[
  {
    "path": ".dockerignore",
    "content": ".github\nbuild\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.go]\nindent_size = 4\nindent_style = tab\n\n[Makefile]\nindent_style = tab\n"
  },
  {
    "path": ".entire/.gitignore",
    "content": "tmp/\nsettings.local.json\nmetadata/\nlogs/\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: If you find an issue, please let us know.\ntitle: '[BUG]: '\nlabels: '[\"bug\"]'\ntype: 'Bug'\nassignees: ''\n\n---\n\n<!--\nThank you in advance for helping us to improve Pactus!\n\nPlease read through the template below and answer all relevant questions.\nYour additional work here is greatly appreciated and will help us respond as quickly as possible.\n-->\n\n## Description\n\n> Provide a clear and concise description of the issue, including what you expected to happen.\n\n### How To Reproduce\n\n> Detail the steps taken to reproduce this error, and\n> whether this issue can be reproduced consistently or if it is intermittent.\n\n1. Step 1\n2. Step 2\n3. Step 3\n\n### What Happened\n\n> What actually happened including any error log or so\n\n### Expected Behavior\n\n> What were you expecting\n\n### Extra\n\n> Any extra information you think is relevant to issue\n\n### Environment\n\n- **Operation System:**\n- **Pactus Version:**\n- **Go Version:**\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Any new functionality for Pactus.\ntitle: '[FEATURE]: '\nlabels: '[\"enhancement\"]'\ntype: \"Feature\"\nassignees: ''\n\n---\n\n<!--\nThank you in advance for helping us to improve Pactus!\n\nPlease read through the template below and answer all relevant questions.\nYour additional work here is greatly appreciated and will help us respond as quickly as possible.\n-->\n\n## Describe the problem you'd like to have solved\n\n> A clear and concise description of what the problem is.\n\n### Describe the ideal solution\n\n> A clear and concise description of what you want to happen.\n\n### Alternatives and current work-around\n\n> A clear and concise description of any alternatives you've considered or any work-around that are currently in place.\n\n### Additional context\n\n> Add any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "## Description\n\n> A clear description of what the pull request does.\n\n## Related Issue\n\nFixes # (issue)\n"
  },
  {
    "path": ".github/actions/windows-signing/action.yml",
    "content": "name: \"Signing Windows Artifacts\"\ndescription: \"Signing Windows Artifacts\"\n\ninputs:\n  signpath-api-token:\n    description: \"SignPath API Token\"\n    required: true\n\n  signpath-signing-policy-slug:\n    description: \"SignPath Signing Policy Slug\"\n    required: true\n\n  artifact-name:\n    description: \"The name of artifact (.zip) file\"\n    required: true\n\nruns:\n  using: \"composite\"\n  steps:\n    - name: upload-unsigned-artifact\n      id: upload-unsigned-artifact\n      uses: actions/upload-artifact@v6\n      with:\n        name: ${{ inputs.artifact-name }}\n        # Based on current SignPath configuration, we can only sign one file per request.\n        path: ./build/unsigned/${{ inputs.artifact-name }}.exe\n\n    - name: sign-artifact\n      id: sign-artifact\n      uses: signpath/github-action-submit-signing-request@v2\n      with:\n        api-token: \"${{ inputs.signpath-api-token }}\"\n        organization-id: \"208fe1b4-fd9d-41c8-be2e-8ebd037cd0db\"\n        project-slug: \"pactus\"\n        signing-policy-slug: \"${{ inputs.signpath-signing-policy-slug }}\"\n        github-artifact-id: \"${{ steps.upload-unsigned-artifact.outputs.artifact-id }}\"\n        wait-for-completion: true\n        wait-for-completion-timeout-in-seconds: 3600\n        output-artifact-directory: ./build/signed/\n"
  },
  {
    "path": ".github/codecov.yml",
    "content": "comment:\n  layout: header, changes, diff, sunburst\ncoverage:\n  status:\n    patch:\n      default:\n        threshold: \"10%\"\n        only_pulls: true\n\n    project:\n      default:\n        target: auto\n        threshold: \"10%\"\n\nignore:\n  - \"*/mock.go\"\n  - \"www/grpc/gen\"\n"
  },
  {
    "path": ".github/packager/js/grpc/README.md",
    "content": "# pactus-grpc\n\nJavaScript client for interacting with the [Pactus](https://pactus.org) blockchain via gRPC.\n\n## Installation\n\n```bash\nnpm install pactus-grpc\n```\n\n## Usage\n\n```javascript\nimport grpc from '@grpc/grpc-js';\nimport blockchain_pb from \"pactus-grpc/blockchain_pb.js\";\nimport blockchain_grpc_pb from \"pactus-grpc/blockchain_grpc_pb.js\";\n\nconst client = new blockchain_grpc_pb.BlockchainClient(\n  \"127.0.0.1:50051\",\n  grpc.credentials.createInsecure()\n);\n\nconst request = new blockchain_pb.GetBlockchainInfoRequest();\nclient.getBlockchainInfo(request, (err, response) => {\n  if (err) {\n    console.log(err);\n  } else {\n    console.log(response.toObject());\n  }\n});\n\n```\n"
  },
  {
    "path": ".github/packager/js/grpc/package.json",
    "content": "{\n  \"name\": \"pactus-grpc\",\n  \"version\": \"{{ VERSION }}\",\n  \"description\": \"JavaScript client for interacting with the Pactus blockchain via gRPC\",\n  \"author\": \"Pactus Development Team\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://pactus.org\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/pactus-project/pactus.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/pactus-project/pactus/issues\"\n  },\n  \"keywords\": [\n    \"pactus\",\n    \"blockchain\",\n    \"grpc\"\n  ],\n  \"dependencies\": {\n    \"@grpc/grpc-js\": \"^1.14.1\",\n    \"grpc-web\": \"^2.0.2\",\n    \"google-protobuf\": \"^4.0.1\"\n  }\n}\n"
  },
  {
    "path": ".github/packager/js/jsonrpc/README.md",
    "content": "# pactus-jsonrpc\n\nJavaScript client for interacting with the [Pactus](https://pactus.org) blockchain via JSON-RPC.\n\n## Installation\n\n```bash\nnpm install pactus-jsonrpc\n```\n\n## Usage\n\n```javascript\nimport PactusOpenRPC from \"pactus-jsonrpc\";\n\nconst jsonrpcClient = new PactusOpenRPC({\n  transport: {\n    type: \"http\",\n    host: \"127.0.0.1\",\n    port: 8545\n  },\n});\n\nconst blockchainInfo = await jsonrpcClient.pactusBlockchainGetBlockchainInfo();\nconsole.log(JSON.stringify(blockchainInfo, null, 2));\n```\n"
  },
  {
    "path": ".github/packager/js/jsonrpc/package.json",
    "content": "{\n  \"name\": \"pactus-jsonrpc\",\n  \"version\": \"{{ VERSION }}\",\n  \"description\": \"JavaScript client for interacting with the Pactus blockchain via JSON-RPC\",\n  \"author\": \"Pactus Development Team\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://pactus.org\",\n  \"main\": \"./index.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/pactus-project/pactus.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/pactus-project/pactus/issues\"\n  },\n  \"keywords\": [\n    \"pactus\",\n    \"blockchain\",\n    \"json-rpc\"\n  ],\n  \"dependencies\": {\n    \"@open-rpc/client-js\": \"1.8.1\",\n    \"@open-rpc/meta-schema\": \"1.14.9\",\n    \"@open-rpc/schema-utils-js\": \"2.1.2\",\n    \"lodash\": \"^4.17.15\"\n  }\n}\n"
  },
  {
    "path": ".github/packager/packager.sh",
    "content": "#!/bin/bash\n\n# The 'set -e' command causes the script to immediately exit\n# if any command returns a non-zero exit status (i.e., an error).\nset -e\n\nreplace_in_place() {\n  if [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n    sed -i '' \"$1\" \"$2\"\n  else\n    sed -i \"$1\" \"$2\"\n  fi\n}\n\nROOT_DIR=\"$(pwd)\"\nPACKAGE_DIR=\"${ROOT_DIR}/packages\"\nPROTO_GEN_DIR=\"${ROOT_DIR}/www/grpc/gen\"\n\nif [[ -z \"$VERSION\" ]]; then\n  echo \"❌ Error: Version tag not found.\"\n  exit 1\nfi\n\n# Remove 'v' prefix from version if present\nVERSION=${VERSION#v}\n\necho \"Packing Version:\" ${VERSION}\n\nrm -rf ${PACKAGE_DIR}\nmkdir -p ${PACKAGE_DIR}\nmkdir -p ${PACKAGE_DIR}/js/{pactus-grpc,pactus-jsonrpc}\nmkdir -p ${PACKAGE_DIR}/python/{pactus-grpc,pactus-jsonrpc}\nmkdir -p ${PACKAGE_DIR}/rust/{pactus-grpc,pactus-jsonrpc}\n\necho \"== Building pactus-grpc package for JavaScript\"\ncp -R ${ROOT_DIR}/.github/packager/js/grpc/* ${PACKAGE_DIR}/js/pactus-grpc\ncp -R ${PROTO_GEN_DIR}/js/* ${PACKAGE_DIR}/js/pactus-grpc\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/js/pactus-grpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" \"${PACKAGE_DIR}/js/pactus-grpc/package.json\"\n\necho \"== Building pactus-jsonrpc package for JavaScript\"\nGENERATOR_DIR=\"${PACKAGE_DIR}/generator\"\ngit clone https://github.com/pactus-project/generator.git \"$GENERATOR_DIR\" && cd \"$GENERATOR_DIR\"\nnpm install && npm run build\ncd \"$ROOT_DIR\" && $GENERATOR_DIR/build/cli.js generate \\\n  -t client \\\n  -l typescript \\\n  -n pactus-jsonrpc \\\n  -d \"${ROOT_DIR}/www/grpc/gen/open-rpc/pactus-openrpc.json\" \\\n  -o \"$GENERATOR_DIR/js\"\ncd \"$GENERATOR_DIR/js/client/typescript\"\n\nnpm install && npx tsc\n\ncp $GENERATOR_DIR/js/client/typescript/build/index.d.ts ${PACKAGE_DIR}/js/pactus-jsonrpc\ncp $GENERATOR_DIR/js/client/typescript/build/index.js ${PACKAGE_DIR}/js/pactus-jsonrpc\ncp $GENERATOR_DIR/js/client/typescript/build/index.js.map ${PACKAGE_DIR}/js/pactus-jsonrpc\ncp -R ${ROOT_DIR}/.github/packager/js/jsonrpc/* ${PACKAGE_DIR}/js/pactus-jsonrpc\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/js/pactus-jsonrpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" \"${PACKAGE_DIR}/js/pactus-jsonrpc/package.json\"\n\n\necho \"== Building pactus-grpc package for Python\"\ncp -R ${ROOT_DIR}/.github/packager/python/grpc/* ${PACKAGE_DIR}/python/pactus-grpc\ncp ${PROTO_GEN_DIR}/python/* ${PACKAGE_DIR}/python/pactus-grpc/pactus_grpc\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/python/pactus-grpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" ${PACKAGE_DIR}/python/pactus-grpc/setup.py\n\necho \"== Building pactus-jsonrpc package for Python\"\npip install openrpcclientgenerator\nORPC_DIR=\"${PACKAGE_DIR}/orpc\"\nmkdir -p ${ORPC_DIR}\ncp \"${ROOT_DIR}/www/grpc/gen/open-rpc/pactus-openrpc.json\" ${ORPC_DIR}/openrpc.json\ncd ${ORPC_DIR}\norpc python example.com ./out\ncp -R ${ROOT_DIR}/.github/packager/python/jsonrpc/* ${PACKAGE_DIR}/python/pactus-jsonrpc\ncp ${ORPC_DIR}/out/python/pactus-open-rpc-http-client/pactus_open_rpc_http_client/client.py ${PACKAGE_DIR}/python/pactus-jsonrpc/pactus_jsonrpc/client.py\ncp ${ORPC_DIR}/out/python/pactus-open-rpc-http-client/pactus_open_rpc_http_client/models.py ${PACKAGE_DIR}/python/pactus-jsonrpc/pactus_jsonrpc/models.py\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/python/pactus-jsonrpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" ${PACKAGE_DIR}/python/pactus-jsonrpc/setup.py\n\necho \"== Building pactus-grpc package for Rust\"\ncp -R ${ROOT_DIR}/.github/packager/rust/grpc/* ${PACKAGE_DIR}/rust/pactus-grpc\ncp -R ${PROTO_GEN_DIR}/rust/* ${PACKAGE_DIR}/rust/pactus-grpc/src\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/rust/pactus-grpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" ${PACKAGE_DIR}/rust/pactus-grpc/Cargo.toml\n\necho \"== Building pactus-jsonrpc package for Rust\"\ncd \"$ROOT_DIR\" && $GENERATOR_DIR/build/cli.js generate \\\n  -t client \\\n  -l rust \\\n  -n pactus-jsonrpc \\\n  -d \"${ROOT_DIR}/www/grpc/gen/open-rpc/pactus-openrpc.json\" \\\n  -o \"$GENERATOR_DIR/rust\"\ncp -R ${ROOT_DIR}/.github/packager/rust/jsonrpc/* ${PACKAGE_DIR}/rust/pactus-jsonrpc\ncp $GENERATOR_DIR/rust/client/rust/src/index.rs ${PACKAGE_DIR}/rust/pactus-jsonrpc/src/pactus.rs\ncp ${ROOT_DIR}/LICENSE ${PACKAGE_DIR}/rust/pactus-jsonrpc\nreplace_in_place \"s/{{ VERSION }}/$VERSION/g\" \"${PACKAGE_DIR}/rust/pactus-jsonrpc/Cargo.toml\"\n"
  },
  {
    "path": ".github/packager/python/grpc/README.md",
    "content": "# pactus-grpc\n\nPython client for interacting with the [Pactus](https://pactus.org) blockchain via gRPC.\n\n## Installation\n\n```bash\npip install pactus-grpc\n```\n\n## Usage\n\n```python\nimport asyncio\nimport grpc\nfrom pactus_grpc import blockchain_pb2_grpc, blockchain_pb2, network_pb2_grpc, network_pb2\n\n\nasync def main():\n    channel = grpc.aio.insecure_channel(\"127.0.0.1:50051\")\n    blockchain_stub = blockchain_pb2_grpc.BlockchainStub(channel)\n    blockchain_request = blockchain_pb2.GetBlockchainInfoRequest()\n    blockchain_response = await blockchain_stub.GetBlockchainInfo(blockchain_request)\n    print(blockchain_response)\n\n    await channel.close()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n"
  },
  {
    "path": ".github/packager/python/grpc/pactus_grpc/__init__.py",
    "content": "import os\nimport sys\nsys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))\n"
  },
  {
    "path": ".github/packager/python/grpc/pactus_grpc/__init__.pyi",
    "content": "import os\nimport sys\nsys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))\n"
  },
  {
    "path": ".github/packager/python/grpc/pyproject.toml",
    "content": "[build-system]\nrequires = [\"setuptools >= 42.0.0\"]\nbuild-backend = \"setuptools.build_meta\"\n"
  },
  {
    "path": ".github/packager/python/grpc/setup.py",
    "content": "from pathlib import Path\n\nfrom setuptools import find_packages, setup\n\nsetup(\n    name=\"pactus-grpc\",\n    version=\"{{ VERSION }}\",\n    author=\"Pactus Development Team\",\n    author_email=\"info@pactus.org\",\n    url=\"https://pactus.org\",\n    description=\"Python client for interacting with the Pactus blockchain via gRPC\",\n    long_description=Path(\"README.md\").read_text(encoding=\"utf-8\"),\n    long_description_content_type=\"text/markdown\",\n    license=\"MIT\",\n    packages=find_packages(),\n    keywords=[\"pactus\", \"blockchain\", \"grpc\"],\n    install_requires=[\n        \"grpcio\",\n        \"protobuf\",\n    ],\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"Topic :: Software Development :: Build Tools\",\n        \"Operating System :: OS Independent\",\n    ],\n    python_requires=\">=3.6\",\n)\n"
  },
  {
    "path": ".github/packager/python/jsonrpc/README.md",
    "content": "# pactus-jsonrpc\n\nPython client for interacting with the [Pactus](https://pactus.org) blockchain via JSON-RPC.\n\n## Installation\n\n```bash\npip install pactus-jsonrpc\n```\n\n## Usage\n\n```python\nimport asyncio\nfrom pactus_jsonrpc.client import PactusOpenRPCClient\n\n\nasync def main():\n    client = PactusOpenRPCClient(\n        headers={},\n        client_url=\"http://127.0.0.1:8545\"\n    )\n\n    blockchain_info = await client.pactus.blockchain.get_blockchain_info()\n    print(blockchain_info)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n"
  },
  {
    "path": ".github/packager/python/jsonrpc/pactus_jsonrpc/__init__.py",
    "content": ""
  },
  {
    "path": ".github/packager/python/jsonrpc/pyproject.toml",
    "content": "[build-system]\nrequires = [\"setuptools >= 42.0.0\"]\nbuild-backend = \"setuptools.build_meta\"\n"
  },
  {
    "path": ".github/packager/python/jsonrpc/setup.py",
    "content": "from pathlib import Path\n\nfrom setuptools import find_packages, setup\n\nsetup(\n    name=\"pactus-jsonrpc\",\n    version=\"{{ VERSION }}\",\n    author=\"Pactus Development Team\",\n    author_email=\"info@pactus.org\",\n    url=\"https://pactus.org\",\n    description=\"Python client for interacting with the Pactus blockchain via JSON-RPC\",\n    long_description=Path(\"README.md\").read_text(encoding=\"utf-8\"),\n    long_description_content_type=\"text/markdown\",\n    packages=find_packages(),\n    license=\"MIT\",\n    install_requires=[\n        \"jsonrpc2-pyclient>=5.2.0\",\n        \"py-undefined>=0.1.5\",\n        \"pydantic>=2.5.3\"\n    ],\n    keywords=[\"pactus\", \"blockchain\", \"json-rpc\"],\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"Topic :: Software Development :: Build Tools\",\n        \"Operating System :: OS Independent\",\n    ],\n    python_requires=\">=3.6\",\n)\n"
  },
  {
    "path": ".github/packager/rust/grpc/Cargo.toml",
    "content": "[package]\nname        = \"pactus-grpc\"\nversion     = \"{{ VERSION }}\"\nedition     = \"2021\"\ndescription = \"Rust client for interacting with the Pactus blockchain via gRPC\"\nauthors     = [ \"Pactus Development Team <info@pactus.org>\" ]\nlicense     = \"MIT\"\nhomepage    = \"https://pactus.org\"\nrepository  = \"https://github.com/pactus-project/pactus\"\nkeywords    = [ \"pactus\", \"blockchain\", \"grpc\" ]\n\n[dependencies]\ntonic = { version = \"0.14\", default-features = false, features = [\"transport\", \"codegen\"] }\nprost = { version = \"0.14\", default-features = false, features = [\"derive\", \"std\"] }\ntonic-prost = { version = \"0.14\", default-features = false, features = [] }\nserde = { version = \"1.0\", default-features = false, features = [] }\nasync-trait = { version = \"0.1\", default-features = false, features = [] }\npbjson = { version = \"0.8\", default-features = false, features = [] }\n"
  },
  {
    "path": ".github/packager/rust/grpc/README.md",
    "content": "# pactus-grpc\n\nRust client for interacting with the [Pactus](https://pactus.org) blockchain via gRPC.\n\n## Installation\n\n```bash\ncargo add pactus-grpc\n```\n\n## Usage\n\n```rust\nuse pactus_grpc::{blockchain_client::BlockchainClient, GetBlockchainInfoRequest};\nuse tonic::transport::Channel;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let channel = Channel::from_static(\"http://127.0.0.1:50051\")\n        .connect()\n        .await?;\n\n    let mut client = BlockchainClient::new(channel);\n\n    let request = tonic::Request::new(GetBlockchainInfoRequest {});\n    let response = client.get_blockchain_info(request).await?;\n    let info = response.into_inner();\n\n    println!(\"get_blockchain_info Response: {:?}\", info);\n\n    Ok(())\n}\n```\n"
  },
  {
    "path": ".github/packager/rust/grpc/src/lib.rs",
    "content": "//! # Pactus gRPC Client\n//!\n//! A Rust client library for interacting with the Pactus blockchain via gRPC.\n//!\n//! ## Example\n//!\n//! ```rust\n//! use pactus_grpc::{blockchain_client::BlockchainClient, GetBlockchainInfoRequest};\n//! use tonic::transport::Channel;\n//!\n//! #[tokio::main]\n//! async fn main() -> Result<(), Box<dyn std::error::Error>> {\n//!     let channel = Channel::from_static(\"http://127.0.0.1:50051\")\n//!         .connect()\n//!         .await?;\n//!\n//!     let mut client = BlockchainClient::new(channel);\n//!\n//!     let request = tonic::Request::new(GetBlockchainInfoRequest {});\n//!     let response = client.get_blockchain_info(request).await?;\n//!     let info = response.into_inner();\n//!\n//!     println!(\"get_blockchain_info Response: {:?}\", info);\n//!\n//!     Ok(())\n//! }\n//! ```\n\npub mod pactus;\n\n// Re-export the main message types\npub use pactus::*;\n"
  },
  {
    "path": ".github/packager/rust/jsonrpc/Cargo.toml",
    "content": "[package]\nname        = \"pactus-jsonrpc\"\nversion     = \"{{ VERSION }}\"\nedition     = \"2021\"\ndescription = \"Rust client for interacting with the Pactus blockchain via JSON-RPC\"\nauthors     = [ \"Pactus Development Team <info@pactus.org>\" ]\nlicense     = \"MIT\"\nhomepage    = \"https://pactus.org\"\nrepository  = \"https://github.com/pactus-project/pactus\"\nkeywords    = [ \"pactus\", \"blockchain\", \"json-rpc\" ]\n\n[dependencies]\njsonrpsee = { version = \"0.26\", default-features = false, features = [\"http-client\"] }\nserde = { version = \"1.0\", default-features = false, features = [\"derive\", \"std\"] }\nserde_json = { version = \"1.0\", default-features = false, features = [\"std\"] }\nderive_builder = { version = \"0.20\", default-features = false, features = [\"std\"] }\n"
  },
  {
    "path": ".github/packager/rust/jsonrpc/README.md",
    "content": "# pactus-jsonrpc\n\nRust client for interacting with the [Pactus](https://pactus.org) blockchain via JSON-RPC.\n\n## Installation\n\n```bash\ncargo add pactus-jsonrpc\n```\n\n## Usage\n\n```rust\nuse jsonrpsee::http_client::HttpClient;\nuse pactus_jsonrpc::pactus::PactusOpenRPC;\n\n#[tokio::main]\nasync fn main() {\n    let client = HttpClient::builder().build(\"http://127.0.0.1:8545\").unwrap();\n    let rpc: PactusOpenRPC<HttpClient> = PactusOpenRPC::new(client);\n\n    let info = rpc.pactus_blockchain_get_blockchain_info().await.unwrap();\n    println!(\"get_blockchain_info Response: {:?}\", info);\n}\n```\n"
  },
  {
    "path": ".github/packager/rust/jsonrpc/src/lib.rs",
    "content": "//! # Pactus JSON-RPC Client\n//!\n//! A Rust client library for interacting with the Pactus blockchain via JSON-RPC.\n//!\n//! ## Example\n//!\n//! ```rust\n//! use jsonrpsee::http_client::HttpClient;\n//! use pactus_jsonrpc::pactus::PactusOpenRPC;\n//!\n//! #[tokio::main]\n//! async fn main() {\n//!     let client = HttpClient::builder().build(\"http://127.0.0.1:8545\").unwrap();\n//!     let rpc: PactusOpenRPC<HttpClient> = PactusOpenRPC::new(client);\n//!\n//!     let info = rpc.pactus_blockchain_get_blockchain_info().await.unwrap();\n//!     println!(\"get_blockchain_info Response: {:?}\", info);\n//! }\n//! ```\n\npub mod pactus;\n"
  },
  {
    "path": ".github/releasers/linux/pactus-gui.desktop",
    "content": "[Desktop Entry]\nName=pactus-gui\nComment=Pactus blockchain node\nExec=pactus-gui\nIcon=pactus\nType=Application\nCategories=Network;\n"
  },
  {
    "path": ".github/releasers/macos/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>CFBundlePackageType</key>\n    <string>APPL</string>\n    <key>CFBundleIdentifier</key>\n    <string>com.github.pactus-project.pactus.pactus-gui</string>\n    <key>CFBundleExecutable</key>\n    <string>pactus-gui</string>\n    <key>CFBundleName</key>\n    <string>pactus-gui</string>\n    <key>CFBundleShortVersionString</key>\n    <string>%SHORTVERSION%</string>\n    <key>CFBundleVersion</key>\n    <string>%VERSION%</string>\n    <key>CFBundleIconFile</key>\n    <string>pactus.icns</string>\n    <key>CFBundleSignature</key>\n    <string>????</string>\n    <key>NSHumanReadableCopyright</key>\n    <string>MIT License.</string>\n    <key>LSMinimumSystemVersion</key>\n    <string>10.15</string>\n</dict>\n</plist>"
  },
  {
    "path": ".github/releasers/macos/gtk3-launcher.sh",
    "content": "#!/bin/sh\n\nif test \"x$GTK_DEBUG_LAUNCHER\" != x; then\n    set -x\nfi\n\nif test \"x$GTK_DEBUG_GDB\" != x; then\n    EXEC=\"gdb --args\"\nelse\n    EXEC=exec\nfi\n\nname=`basename \"$0\"`\ntmp=\"$0\"\ntmp=`dirname \"$tmp\"`\ntmp=`dirname \"$tmp\"`\nbundle=`dirname \"$tmp\"`\nbundle_contents=\"$bundle\"/Contents\nbundle_res=\"$bundle_contents\"/Resources\nbundle_lib=\"$bundle_res\"/lib\nbundle_bin=\"$bundle_res\"/bin\nbundle_data=\"$bundle_res\"/share\nbundle_etc=\"$bundle_res\"/etc\n\nexport DYLD_FALLBACK_LIBRARY_PATH=\"$bundle_lib\"\nexport XDG_CONFIG_DIRS=\"$bundle_etc\"/xdg\nexport XDG_DATA_DIRS=\"$bundle_data\"\nexport GTK_DATA_PREFIX=\"$bundle_res\"\nexport GTK_EXE_PREFIX=\"$bundle_res\"\nexport GTK_PATH=\"$bundle_res\"\n\n# macOS-specific settings\nif [ \"$(uname)\" = \"Darwin\" ]; then\n    # Changing the PANGOCAIRO_BACKEND is necessary on MacOS to render emoji\n    export PANGOCAIRO_BACKEND=\"fontconfig\"\nfi\n\nexport GDK_PIXBUF_MODULE_FILE=\"$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache\"\nif [ `uname -r | cut -d . -f 1` -ge 10 ]; then\n    export GTK_IM_MODULE_FILE=\"$bundle_lib/gtk-3.0/3.0.0/immodules.cache\"\nfi\n\nAPP=$name\n\n# Strip out the argument added by the OS.\nif /bin/expr \"x$1\" : '^x-psn_' > /dev/null; then\n    shift 1\nfi\n\n$EXEC \"$bundle_contents/MacOS/$name-bin\" \"$@\" $EXTRA_ARGS\n"
  },
  {
    "path": ".github/releasers/macos/gui.bundle",
    "content": "<?xml version=\"1.0\" standalone=\"no\"?> <!--*- mode: xml -*-->\n<app-bundle>\n\n  <meta>\n    <!-- Where to pick up the GTK+ installation, icon themes,\n         etc. Note that \"${env:JHBUILD_PREFIX}\" is evaluated to the\n         value of the environment variable JHBUILD_PREFIX. You can\n         define additional prefixes and refer to them in paths\n         throughout this file on the form \"${prefix:name}\". This is\n         useful for installing certain libraries or even the\n         application itself separately. Note that JHBUILD_PREFIX is\n         defined by jhbuild, so it you are not using jhbuild you can\n         either define your own or just hardcode the path here.\n    -->\n    <prefix name=\"default\">${env:LIB_HOME}</prefix>\n\n    <prefix name=\"bundle\">${env:GUI_BUNDLE}</prefix>\n    <!-- The project directory is the default location of the created\n         app. If you leave out the path, the current directory is\n         used. Note the usage of an environment variable here again.\n    -->\n    <destination overwrite=\"yes\">${env:ROOT_DIR}</destination>\n\n    <image>\n      <!-- Not implemented yet (DMG image). -->\n    </image>\n\n    <!-- Comment this out to keep the install names in binaries -->\n    <run-install-name-tool/>\n\n    <!-- Optionally specify a launcher script to use. If the\n         application sets up everything needed itself, like\n         environment variable, linker paths, etc, a launcher script is\n         not needed. If the source path is left out, the default\n         script will be used.\n    -->\n    <launcher-script>${project}/gtk3-launcher.sh</launcher-script >\n\n    <!-- Not implemented: Optional runtime, could be python or mono\n         for example.\n    -->\n    <!-- runtime copy=\"yes\">/usr/bin/python</runtime -->\n    <!-- Indicate the active gtk version to use. This is needed only\n         for gtk+-3.0 projects. -->\n    <gtk>gtk+-3.0</gtk>\n  </meta>\n\n  <!-- The special macro \"${project}\" refers to the directory where\n       this bundle file is located. The application name and bundle\n       identifier are taken from the plist file.\n  -->\n  <plist>${project}/Info.plist</plist>\n\n  <main-binary>${prefix:bundle}/pactus-gui</main-binary>\n\n  <!-- Copy in the input methods. Dunno if they actually work with\n       OSX. Note the ${gtkdir} macro, which expands to the correct\n       library subdirectory for the specified gtk version. -->\n  <binary>\n    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so\n  </binary>\n\n<!-- And the print backends -->\n    <!-- <binary>\n      ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so\n    </binary> -->\n\n<!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->\n  <binary>\n    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so\n  </binary>\n\n  <binary>\n    ${prefix}/lib/gio/modules/libgiognutls.so\n  </binary>\n\n  <!-- Translation filenames, one for each program or library that you\n       want to copy in to the bundle. The \"dest\" attribute is\n       optional, as usual. Bundler will find all translations of that\n       library/program under the indicated directory and copy them.-->\n  <!-- <translations name=\"gtk30\">\n    ${prefix}/share/locale\n  </translations> -->\n\n\n  <!-- Data to copy in, usually Glade/UI files, images, sounds files\n       etc. The destination inside the bundle can be specified if the\n       files should end up at a different location, by using the\n       \"dest\" property. The destination must then start with the macro\n       \"${bundle}\", which refers to the bundle root directory.\n  -->\n  <!-- data>\n    ${prefix}/share/gtk3-demo\n  </data -->\n\n  <!-- Copy in the themes data. You may want to trim this to save space\n       in your bundle. -->\n  <data>\n    ${prefix}/share/themes\n  </data>\n\n  <data>\n    ${prefix}/share/icons\n  </data>\n\n  <!-- Copy icons. Note that the .icns file is an Apple format which\n       contains up to 4 sizes of icon. You can use\n       /Developer/Applications/Utilities/Icon Composer.app to import\n       artwork and create the file. -->\n  <data dest=\"${bundle}/Contents/Resources\">\n    ${prefix:bundle}/pactus.icns\n  </data>\n\n</app-bundle>\n"
  },
  {
    "path": ".github/releasers/macos/run-install-name-tool-change.sh",
    "content": "#!/bin/sh\n\nif [ $# -lt 3 ]; then\n    echo \"Usage: $0 library old_prefix new_prefix action\"\n    exit 1\nfi\n\nLIBRARY=$1\nWRONG_PREFIX=$2\nRIGHT_PREFIX=\"@executable_path/../$3\"\nACTION=$4\n\nchmod u+w $LIBRARY\n\nif [ \"x$ACTION\" = \"xchange\" ]; then\n    libs=\"`otool -L $LIBRARY 2>/dev/null | fgrep compatibility | cut -d\\( -f1 | grep $WRONG_PREFIX | sort | uniq`\"\n    for lib in $libs; do\n        if ! echo $lib | grep --silent \"@executable_path\" ; then\n            if echo $lib | grep --silent \"${LIB_HOME}/Cellar/\"; then\n                fixed=`echo $lib | sed -e \"s|${LIB_HOME}/Cellar/\\([^/]*\\)/[^/]*/|@executable_path/../Resources/opt/\\1/|\"`\n            else\n                fixed=`echo $lib | sed -e s,\\${WRONG_PREFIX},\\${RIGHT_PREFIX},`\n            fi\n            echo  $lib $fixed $LIBRARY\n            install_name_tool -change $lib $fixed $LIBRARY\n        fi\n    done;\nelif [ \"x$ACTION\" = \"xid\" ]; then\n#    echo \"$LIBRARY $WRONG_PREFIX to $RIGHT_PREFIX\"\n    lib=$(otool -D \"$LIBRARY\" 2>/dev/null | grep ^\"$WRONG_PREFIX\" | sed s,\"$WRONG_PREFIX\",,)\n    if [ -n \"$lib\" ]; then\n#        echo \"Rewrite $lib\"\n        install_name_tool -id \"${RIGHT_PREFIX}/${lib}\" $LIBRARY;\n#    else\n#        path=$(otool -D \"$LIBRARY\" 2>/dev/null | sed -n 2p)\n#        echo \"Empty Result $path\"\n    fi\nfi"
  },
  {
    "path": ".github/releasers/pactus_downloader.sh",
    "content": "#!/bin/sh\n\n# Function to check if a command is available\ncommand_exists() {\n    command -v \"$1\" >/dev/null 2>&1\n}\n\n# Download function\ndownload_file() {\n    file_name=$1\n    url=$2\n    echo \"== Downloading ${file_name}...\"\n    if ! curl --fail --proto '=https' --tlsv1.2 -# -L -o \"${file_name}\" \"${url}\" ; then\n        echo \"Failed to download ${file_name}. Check the URL or your internet connection.\"\n        exit 1\n    fi\n}\n\n\n# Check if sha256sum is installed\nif ! command_exists sha256sum; then\n    echo \"sha256sum is not installed. Please install sha256sum and try again.\"\n    exit 1\nfi\n\n# Detect the operating system and CPU type\nOS=$(uname -s)\nARCH=$(uname -m)\nEXT=\".tar.gz\"\n\ncase $OS in\n    ######################\n    Android)\n        OS=\"android\"\n        case $ARCH in\n            aarch64 | arm64)\n                ARCH=\"arm64\"\n                ;;\n            *)\n                echo \"Unrecognized CPU type: $ARCH\"\n                exit 1\n                ;;\n        esac\n        ;;\n\n    ######################\n    Linux)\n        OS=\"linux\"\n        case $ARCH in\n            x86_64)\n                ARCH=\"amd64\"\n                ;;\n            aarch64 | arm64)\n                ARCH=\"arm64\"\n                ;;\n            *)\n                echo \"Unrecognized CPU type: $ARCH\"\n                exit 1\n                ;;\n        esac\n        ;;\n\n    ######################\n    FreeBSD)\n        OS=\"freebsd\"\n        case $ARCH in\n            amd64)\n                ARCH=\"amd64\"\n                ;;\n            *)\n                echo \"Unrecognized CPU type: $ARCH\"\n                exit 1\n                ;;\n        esac\n        ;;\n\n    ######################\n    Darwin)\n        OS=\"darwin\"\n        case $ARCH in\n            x86_64)\n                ARCH=\"amd64\"\n                ;;\n            arm64)\n                ARCH=\"arm64\"\n                ;;\n            *)\n                echo \"Unrecognized CPU type: $ARCH\"\n                exit 1\n                ;;\n        esac\n        ;;\n\n    ######################\n    MINGW* | MSYS* | CYGWIN*)\n        if ! command_exists unzip; then\n            echo \"unzip is not installed. Please install unzip and try again.\"\n            exit 1\n        fi\n        OS=\"windows\"\n        EXT=\".zip\"\n        case $ARCH in\n            i686 | i386)\n                ARCH=\"386\"\n                ;;\n            x86_64)\n                ARCH=\"amd64\"\n                ;;\n            aarch64 | arm64)\n                ARCH=\"arm64\"\n                ;;\n            *)\n                echo \"Unrecognized CPU type: $ARCH\"\n                exit 1\n                ;;\n        esac\n        ;;\n\n    *)\n        echo \"Unrecognized OS type: $OS\"\n        exit 1\n        ;;\nesac\n\n# Version number\nVERSION=\"__VERSION__\"\n\n# Set the server URL where the binary and checksum files are hosted\nSERVER_URL=\"https://github.com/pactus-project/pactus/releases/download/v${VERSION}\"\n\n# Set the filename of the binary and checksum\nCHECKSUM_FILE=\"SHA256SUMS\"\n\n# Set the filename of the binary and checksum\nFILE_NAME=\"pactus-cli_${VERSION}_${OS}_${ARCH}${EXT}\"\n\n# Destination directory that is the current directory\nDEST_DIR=\"$(pwd)\"\nEXTRACTED_DIR=\"${DEST_DIR}/pactus-cli_${VERSION}\"\n\n# Create a temporary directory for downloads\nDOWN_DIR=\"$(mktemp -d)\"\n\n# Check if extractopn folder exists and print an error if it does\nif [ -e \"${EXTRACTED_DIR}\" ]; then\n    echo \"Destination directory '${EXTRACTED_DIR}' already exists.\"\n    exit 1\nfi\n\ncd ${DOWN_DIR}\n\n# Download the files using the download_file function\ndownload_file \"${FILE_NAME}\" \"${SERVER_URL}/${FILE_NAME}\"\ndownload_file \"${CHECKSUM_FILE}\" \"${SERVER_URL}/${CHECKSUM_FILE}\"\n\n# Verify the checksum\necho \"== Verify the checksum...\"\nsha256sum --ignore-missing -c \"${CHECKSUM_FILE}\"\nif [ $? -ne 0 ]; then\n    echo \"Checksum verification failed for ${FILE_NAME}!\"\n    exit 1\nfi\n\n# Extracting\necho \"== Extracting ${FILE_NAME}...\"\nif [ \"${OS}\" = \"windows\" ]; then\n    unzip -n \"${FILE_NAME}\" -d \"${DEST_DIR}\" || {\n        echo \"Error: Extraction failed.\"\n        exit 1\n    }\nelse\n    tar -xzf \"${FILE_NAME}\" -C \"${DEST_DIR}\" || {\n        echo \"Error: Extraction failed.\"\n        exit 1\n    }\nfi\necho \"Extracted at ${EXTRACTED_DIR}\"\n\n\necho \"\"\necho \"Installation completed.\"\n"
  },
  {
    "path": ".github/releasers/releaser_cli.sh",
    "content": "#!/bin/bash\n\n# The 'set -e' command causes the script to immediately exit\n# if any command returns a non-zero exit status (i.e., an error).\nset -e\n\nROOT_DIR=\"$(pwd)\"\nVERSION=\"$(echo `git -C ${ROOT_DIR} describe --abbrev=0 --tags` | sed 's/^.//')\" # \"v1.2.3\" -> \"1.2.3\"\nPACKAGE_NAME=\"pactus-cli_${VERSION}\"\n\n\n# https://go.dev/doc/install/source#environment\n\nfor OS_ARCH in \\\n     \"linux amd64\" \"linux arm64\" \\\n     \"android arm64\" \\\n     \"freebsd amd64\" \"freebsd arm64\" \\\n     \"darwin amd64\" \"darwin arm64\" \\\n     \"windows 386\" \"windows amd64\" \"windows arm64\"; do\n\n    PAIR=($OS_ARCH);\n    OS=${PAIR[0]};\n    ARCH=${PAIR[1]};\n\n    cd ${ROOT_DIR}\n\n    PACKAGE_NAME_OS=${PACKAGE_NAME}_${OS}_${ARCH}\n    BUILD_DIR=${ROOT_DIR}/build/${PACKAGE_NAME_OS}\n\n    if [ $OS = \"windows\" ]; then\n        EXE=\".exe\"\n    fi\n\n    echo \"Building Pactus for ${OS}-${ARCH}...\"\n\n    LD_FLAGS=\"-s -w\"\n    if [[ ${OS} == \"android\" ]]; then\n        LD_FLAGS=\"${LD_FLAGS} -checklinkname=0\"\n    fi\n    CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags \"${LD_FLAGS}\" -trimpath -o ${BUILD_DIR}/${PACKAGE_NAME}/pactus-daemon${EXE} ./cmd/daemon\n    CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags \"${LD_FLAGS}\" -trimpath -o ${BUILD_DIR}/${PACKAGE_NAME}/pactus-wallet${EXE} ./cmd/wallet\n    CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -ldflags \"${LD_FLAGS}\" -trimpath -o ${BUILD_DIR}/${PACKAGE_NAME}/pactus-shell${EXE}  ./cmd/shell\n\n    cd ${BUILD_DIR}\n    if [ $OS = \"windows\" ]; then\n        zip -r ${PACKAGE_NAME_OS}.zip ${PACKAGE_NAME}\n        mv ${PACKAGE_NAME_OS}.zip ${ROOT_DIR}\n    else\n        tar -czvf ${PACKAGE_NAME_OS}.tar.gz -p ${PACKAGE_NAME}\n        mv ${PACKAGE_NAME_OS}.tar.gz ${ROOT_DIR}\n    fi\ndone\n"
  },
  {
    "path": ".github/releasers/releaser_gui_linux.sh",
    "content": "#!/bin/bash\n\nset -e\n\nROOT_DIR=\"$(pwd)\"\nVERSION=\"$(echo `git -C ${ROOT_DIR} describe --abbrev=0 --tags` | sed 's/^.//')\" # \"v1.2.3\" -> \"1.2.3\"\nBUILD_DIR=\"${ROOT_DIR}/build\"\nPACKAGE_NAME=\"pactus-gui_${VERSION}\"\nPACKAGE_DIR=\"${ROOT_DIR}/${PACKAGE_NAME}\"\n\n# Check the architecture\nARC=\"$(uname -m)\"\n\nif [ \"${ARC}\" = \"x86_64\" ]; then\n    FILE_NAME=\"${PACKAGE_NAME}_linux_amd64\"\nelif [ \"${ARC}\" = \"aarch64\" ]; then\n    FILE_NAME=\"${PACKAGE_NAME}_linux_arm64\"\nelse\n    echo \"Unsupported architecture: ${ARC}\"\n    exit 1\nfi\n\nmkdir ${PACKAGE_DIR}\n\necho \"Building the binaries for Linux ${ARC} architecture\"\n\ncd ${ROOT_DIR}\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-daemon ./cmd/daemon\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-wallet ./cmd/wallet\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-shell ./cmd/shell\nCGO_ENABLED=1 go build -ldflags \"-s -w\" -trimpath -tags gtk -o ${BUILD_DIR}/pactus-gui ./cmd/gtk\n\n# Moving binaries to package directory\necho \"Moving binaries\"\nmv ${BUILD_DIR}/pactus-daemon  ${PACKAGE_DIR}/pactus-daemon\nmv ${BUILD_DIR}/pactus-wallet  ${PACKAGE_DIR}/pactus-wallet\nmv ${BUILD_DIR}/pactus-shell   ${PACKAGE_DIR}/pactus-shell\nmv ${BUILD_DIR}/pactus-gui     ${PACKAGE_DIR}/pactus-gui\n\necho \"Creating archive\"\ntar -czvf ${ROOT_DIR}/${FILE_NAME}.tar.gz -p ${PACKAGE_NAME}\n\n# building AppImage\n# https://github.com/linuxdeploy/linuxdeploy-plugin-gtk\n\ncp ${ROOT_DIR}/.github/releasers/linux/*  ${PACKAGE_DIR}\n\ncd ${PACKAGE_DIR}\n\nwget -c \"https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh\"\nwget -c \"https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARC}.AppImage\"\n\nchmod +x linuxdeploy-${ARC}.AppImage linuxdeploy-plugin-gtk.sh\n\nDEPLOY_GTK_VERSION=3 ./linuxdeploy-${ARC}.AppImage \\\n    --executable ./pactus-gui \\\n    --appdir AppDir \\\n    --plugin gtk \\\n    --output appimage \\\n    --icon-file pactus.png \\\n    --desktop-file ./pactus-gui.desktop\n\nmv ./pactus-gui-${ARC}.AppImage ${ROOT_DIR}/${FILE_NAME}.AppImage\n"
  },
  {
    "path": ".github/releasers/releaser_gui_macos.sh",
    "content": "#!/bin/bash\n\nset -e\n\nROOT_DIR=\"$(pwd)\"\nVERSION=\"$(echo `git -C ${ROOT_DIR} describe --abbrev=0 --tags` | sed 's/^.//')\" # \"v1.2.3\" -> \"1.2.3\"\nBUILD_DIR=\"${ROOT_DIR}/build\"\nPACKAGE_NAME=\"pactus-gui_${VERSION}\"\nPACKAGE_DIR=\"${ROOT_DIR}/${PACKAGE_NAME}\"\n\n# Ensure GTK prefix is provided for bundling assets\nif [ -z \"${LIB_HOME}\" ]; then\n    echo \"LIB_HOME is not set. Set it to your GTK prefix (e.g. /opt/homebrew or /usr/local).\"\n    exit 1\nfi\n\n# Check the architecture\nARC=\"$(uname -m)\"\n\nif [ \"${ARC}\" = \"x86_64\" ]; then\n    FILE_NAME=\"${PACKAGE_NAME}_darwin_amd64\"\nelif [ \"${ARC}\" = \"arm64\" ]; then\n    FILE_NAME=\"${PACKAGE_NAME}_darwin_arm64\"\nelse\n    echo \"Unsupported architecture: ${ARC}\"\n    exit 1\nfi\n\nmkdir -p ${PACKAGE_DIR}\n\necho \"Building the binaries for macOS ${ARC} architecture\"\n\ncd ${ROOT_DIR}\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-daemon ./cmd/daemon\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-wallet ./cmd/wallet\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/pactus-shell ./cmd/shell\nCGO_ENABLED=1 go build -ldflags \"-s -w -extldflags -headerpad_max_install_names\" -trimpath -tags gtk -o ${BUILD_DIR}/pactus-gui ./cmd/gtk\n\n\necho \"Installing gtk-mac-bundler\"\ngit clone https://gitlab.gnome.org/GNOME/gtk-mac-bundler.git\ncd gtk-mac-bundler\n\n# A workaround to make bundle without building GTK+ using jhbuild.\nrm bundler/run-install-name-tool-change.sh\ncp ${ROOT_DIR}/.github/releasers/macos/run-install-name-tool-change.sh bundler/run-install-name-tool-change.sh\nchmod +x bundler/run-install-name-tool-change.sh\n\n# make sure launcher is executable\nchmod +x ${ROOT_DIR}/.github/releasers/macos/gtk3-launcher.sh\n\nmake install\n\nexport PATH=${PATH}:${HOME}/.bin:${HOME}/local/bin\nBUNDLER=$(which gtk-mac-bundler)\n\necho \"gtk-mac-bundler found at ${BUNDLER}\"\n\ncd -\n\necho \"Bundling the GUI package\"\nGUI_BUNDLE=${ROOT_DIR}/gui-bundle\nmkdir -p ${GUI_BUNDLE}\n\ncp ${BUILD_DIR}/pactus-gui                ${GUI_BUNDLE}\ncp ${ROOT_DIR}/.github/releasers/macos/*  ${GUI_BUNDLE}\n\n# https://stackoverflow.com/questions/21242932/sed-i-may-not-be-used-with-stdin-on-mac-os-x\nsed -i '' \"s/%SHORTVERSION%/${VERSION}/\"     ${GUI_BUNDLE}/Info.plist\nsed -i '' \"s/%VERSION%/Version ${VERSION}/\"  ${GUI_BUNDLE}/Info.plist\n\nexport GUI_BUNDLE\nexport ROOT_DIR\n\n${BUNDLER} ${GUI_BUNDLE}/gui.bundle\n\n# Removing Cellar as workaround\nrm -rf ${ROOT_DIR}/pactus-gui.app/Contents/Resources/Cellar\n\necho \"Creating dmg\"\n# https://github.com/create-dmg/create-dmg\n\ncreate-dmg --version\n\ncreate-dmg --skip-jenkins \\\n  --volname \"Pactus GUI\" \\\n  \"${FILE_NAME}.dmg\" \\\n  \"${ROOT_DIR}/pactus-gui.app\"\n\necho \"Creating archive\"\ncp ${BUILD_DIR}/pactus-daemon     ${PACKAGE_DIR}\ncp ${BUILD_DIR}/pactus-wallet     ${PACKAGE_DIR}\ncp ${BUILD_DIR}/pactus-shell      ${PACKAGE_DIR}\ncp -R ${ROOT_DIR}/pactus-gui.app  ${PACKAGE_DIR}\n\ntar -czvf ${ROOT_DIR}/${FILE_NAME}.tar.gz -p ${PACKAGE_NAME}\n"
  },
  {
    "path": ".github/releasers/releaser_gui_windows_build.sh",
    "content": "#!/bin/bash\n\nset -e\n\nROOT_DIR=\"$(pwd)\"\nBUILD_DIR=\"${ROOT_DIR}/build\"\n\n# Copy Windows resources file for application icon\ncp ${ROOT_DIR}/.github/releasers/windows/rsrc_windows_amd64.syso ${ROOT_DIR}/cmd/gtk/rsrc_windows_amd64.syso\n\n# This fixes a bug in pkgconfig: invalid flag in pkg-config --libs: -Wl,-luuid\nsed -i -e 's/-Wl,-luuid/-luuid/g' /mingw64/lib/pkgconfig/gdk-3.0.pc\n\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/unsigned/pactus-daemon.exe        ./cmd/daemon\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/unsigned/pactus-wallet.exe        ./cmd/wallet\nCGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ${BUILD_DIR}/unsigned/pactus-shell.exe         ./cmd/shell\nCGO_ENABLED=1 go build -ldflags \"-s -w -H windowsgui\" -trimpath -tags gtk -o ${BUILD_DIR}/unsigned/pactus-gui.exe ./cmd/gtk\n"
  },
  {
    "path": ".github/releasers/releaser_gui_windows_installer.sh",
    "content": "#!/bin/bash\n\nset -e\n\nROOT_DIR=\"$(pwd)\"\nVERSION=\"$(echo `git -C ${ROOT_DIR} describe --abbrev=0 --tags` | sed 's/^.//')\"\nBUILD_DIR=\"${ROOT_DIR}/build\"\nPACKAGE_NAME=\"pactus-gui_${VERSION}\"\nPACKAGE_DIR=\"${ROOT_DIR}/${PACKAGE_NAME}\"\nFILE_NAME=\"${PACKAGE_NAME}_windows_amd64\"\n\necho \"🚀 Starting Pactus GUI Windows packaging...\"\n\n# Create package directory\nmkdir -p \"${PACKAGE_DIR}/pactus-gui\"\n\n# Bundle GTK application using Python bundler\npython3 \"${ROOT_DIR}/.github/releasers/windows/gtk-win-bundler.py\" \\\n    \"${BUILD_DIR}/signed/pactus-gui.exe\" \\\n    \"${PACKAGE_DIR}/pactus-gui\"\n\n# Move other binaries\ncp ${BUILD_DIR}/signed/pactus-daemon.exe  ${PACKAGE_DIR}/pactus-daemon.exe\ncp ${BUILD_DIR}/signed/pactus-wallet.exe  ${PACKAGE_DIR}/pactus-wallet.exe\ncp ${BUILD_DIR}/signed/pactus-shell.exe   ${PACKAGE_DIR}/pactus-shell.exe\ncp ${BUILD_DIR}/signed/pactus-gui.exe     ${PACKAGE_DIR}/pactus-gui/pactus-gui.exe\n\n# Create archive\n7z a ${ROOT_DIR}/${FILE_NAME}.zip ${PACKAGE_DIR}\n\n# Create installer\ncat << EOF > ${ROOT_DIR}/inno.iss\n[Setup]\nAppId=Pactus\nAppName=Pactus\nAppVersion=${VERSION}\nAppPublisher=Pactus\nAppPublisherURL=https://pactus.org/\nDefaultDirName={autopf}/Pactus\nDefaultGroupName=Pactus\nSetupIconFile=.github/releasers/windows/pactus.ico\nLicenseFile=LICENSE\nUninstallable=yes\n\n[Files]\nSource:\"${PACKAGE_NAME}/*\"; DestDir:\"{app}\"; Flags: recursesubdirs\n\n[Icons]\nName:\"{group}\\\\Pactus\"; Filename:\"{app}\\\\pactus-gui\\\\pactus-gui.exe\"\nName:\"{commondesktop}\\\\Pactus\"; Filename:\"{app}\\\\pactus-gui\\\\pactus-gui.exe\"\n\n[Run]\nFilename:\"{app}\\\\pactus-gui\\\\pactus-gui.exe\"; Description:\"Launch Pactus\"; Flags: postinstall nowait\nEOF\n\n# Build installer\nINNO_PATH=\"/c/Program Files (x86)/Inno Setup 6\"\nINNO_DIR=$(cygpath -w -s \"${INNO_PATH}\")\n\"${INNO_DIR}/ISCC.exe\" \"${ROOT_DIR}/inno.iss\"\nmv \"Output/mysetup.exe\" \"${BUILD_DIR}/unsigned/${FILE_NAME}_installer.exe\"\n\necho \"🎉 Build complete! Package: ${BUILD_DIR}/unsigned/${FILE_NAME}_installer.exe\"\n"
  },
  {
    "path": ".github/releasers/windows/README.md",
    "content": "# Generating the Windows resource (.syso)\n1) Install the tool (once):\n   `go install github.com/akavel/rsrc@latest`\n\n2) Generate the .syso in this folder:\n   `rsrc -manifest ./pactus-gui.manifest -ico ./pactus.ico`\n"
  },
  {
    "path": ".github/releasers/windows/gtk-win-bundler.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nGTK Bundle Helper for Windows\nAutomatically detects and bundles all GTK dependencies for Windows distribution.\n\"\"\"\n\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport json\nfrom pathlib import Path\nfrom typing import List, Set, Dict, Optional\n\nclass GTKBundler:\n    def __init__(self, mingw_prefix: str, target_dir: str):\n        self.mingw_prefix = Path(mingw_prefix)\n        self.target_dir = Path(target_dir)\n\n    def run_command(self, cmd: List[str]) -> str:\n        \"\"\"Run a command and return its output.\"\"\"\n        try:\n            result = subprocess.run(cmd, capture_output=True, text=True, check=True)\n            return result.stdout.strip()\n        except subprocess.CalledProcessError as e:\n            print(f\"Error running command {' '.join(cmd)}: {e}\")\n            sys.exit(1)\n\n    def get_dependencies(self, exe_path: Path, dependencies: List[Path]) -> None:\n        \"\"\"Get all DLL dependencies for an executable using ldd.\"\"\"\n\n        # Use ldd to get dependencies\n        ldd_output = self.run_command(['ldd', str(exe_path)])\n\n        for line in ldd_output.split('\\n'):\n            if '/mingw64' in line and '.dll' in line:\n                # Extract the DLL path\n                parts = line.split()\n                if len(parts) >= 3:\n                    dll_path = parts[2].replace('/mingw64', str(self.mingw_prefix))\n                    dll_path = Path(dll_path)\n                    if dll_path not in dependencies:\n                        dependencies.append(dll_path)\n\n    def copy_file(self, src: Path, dst: Path) -> None:\n        \"\"\"Copy a file if it hasn't been copied already.\"\"\"\n        if dst.exists():\n            print(f\"  Already copied: {src.name}\")\n            return\n\n        if not src.exists():\n            print(f\"ERROR: Required file not found: {src}\")\n            sys.exit(1)\n\n        try:\n            # Create parent directories if needed\n            dst.parent.mkdir(parents=True, exist_ok=True)\n\n            # Copy the file\n            shutil.copy2(src, dst)\n            print(f\"  Copied: {src.name}\")\n        except Exception as e:\n            print(f\"ERROR: Failed to copy file {src} to {dst}: {e}\")\n            sys.exit(1)\n\n    def copy_dir(self, src_path: str, dst_path: str) -> None:\n        \"\"\"Copy a directory if it exists.\"\"\"\n        if not Path(src_path).exists():\n            print(f\"ERROR: Required directory not found: {src_path}\")\n            sys.exit(1)\n\n        try:\n            Path(dst_path).parent.mkdir(parents=True, exist_ok=True)\n            shutil.copytree(src_path, dst_path, dirs_exist_ok=True)\n            print(f\"  Copied directory: {Path(src_path).name}\")\n        except Exception as e:\n            print(f\"ERROR: Failed to copy directory {src_path} to {dst_path}: {e}\")\n            sys.exit(1)\n\n    def copy_gtk_dependencies(self, exe_path: Path, target_exe_dir: Path) -> None:\n        \"\"\"Copy all dependencies for the GTK executable.\"\"\"\n        print(f\"Analyzing dependencies for: {exe_path.name}\")\n\n        # Get direct dependencies\n        dependencies = []\n        self.get_dependencies(exe_path, dependencies)\n\n        for dep in dependencies:\n            self.get_dependencies(dep, dependencies)\n\n        # Add dependencies for all pixbuf loader DLLs\n        pixbuf_dir = Path(f\"{self.mingw_prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders\")\n        for loader_file in pixbuf_dir.glob(\"*.dll\"):\n            print(f\"    Scanning pixbuf loader: {loader_file.name}\")\n            self.get_dependencies(loader_file, dependencies)\n\n        for dep in dependencies:\n            self.copy_file(dep, target_exe_dir / dep.name)\n\n    # Copy GTK resources\n    # Based on this tutorial: https://www.gtk.org/docs/installations/windows#building-and-distributing-your-application\n    def copy_gtk_resources(self) -> None:\n        \"\"\"Copy GTK resources (themes, icons, schemas, etc.).\"\"\"\n        print(\"Copying GTK resources...\")\n\n        # Copy GdkPixbuf loaders\n        print(\"  Copying GdkPixbuf loaders...\")\n        self.copy_dir(\n            f\"{self.mingw_prefix}/lib/gdk-pixbuf-2.0\",\n            f\"{self.target_dir}/lib/gdk-pixbuf-2.0\"\n        )\n\n        # Copy icon themes\n        print(\"  Copying icon themes...\")\n        self.copy_dir(\n            f\"{self.mingw_prefix}/share/icons/Adwaita\",\n            f\"{self.target_dir}/share/icons/Adwaita\"\n        )\n        self.copy_dir(\n            f\"{self.mingw_prefix}/share/icons/hicolor\",\n            f\"{self.target_dir}/share/icons/hicolor\"\n        )\n\n        # Copy GTK themes\n        print(\"  Copying GTK themes...\")\n        self.copy_dir(\n            f\"{self.mingw_prefix}/share/gtk-3.0\",\n            f\"{self.target_dir}/share/themes/Windows10/gtk-3.0\"\n        )\n\n        # Copy GSettings schemas\n        print(\"  Copying GSettings schemas...\")\n        self.copy_dir(\n            f\"{self.mingw_prefix}/share/glib-2.0/schemas\",\n            f\"{self.target_dir}/share/glib-2.0/schemas\"\n        )\n\n        # Create settings.ini\n        settings_file = f\"{self.target_dir}/share/gtk-3.0/settings.ini\"\n        Path(settings_file).parent.mkdir(parents=True, exist_ok=True)\n        with open(settings_file, 'w') as f:\n            f.write(\"[Settings]\\n\")\n            f.write(\"gtk-theme-name=Adwaita\\n\")\n            f.write(\"gtk-icon-theme-name=Adwaita\\n\")\n            f.write(\"gtk-font-name=Segoe UI 9\\n\")\n            f.write(\"gtk-application-prefer-dark-theme=true\\n\")\n        print(\"  Created settings.ini\")\n\n    def copy_gtk_executables(self, target_exe_dir: Path) -> None:\n        \"\"\"Copy helper executables that might be needed.\"\"\"\n        print(\"Copying helper executables...\")\n\n        helper_exes = [\n            \"gdbus.exe\",\n            \"gspawn-win64-helper.exe\",\n            \"gspawn-win64-helper-console.exe\"\n        ]\n\n        for exe in helper_exes:\n            exe_src = self.mingw_prefix / \"bin\" / exe\n            if exe_src.exists():\n                self.copy_file(exe_src, target_exe_dir / exe)\n\n\n    def bundle_application(self, exe_path: Path) -> None:\n        \"\"\"Main method to bundle the entire application.\"\"\"\n        print(f\"Bundling GTK application: {exe_path}\")\n\n        # Create target directory structure\n        target_exe_dir = self.target_dir\n        target_exe_dir.mkdir(parents=True, exist_ok=True)\n\n        # Copy all dependencies\n        self.copy_gtk_dependencies(exe_path, target_exe_dir)\n\n        # Copy helper executables\n        self.copy_gtk_executables(target_exe_dir)\n\n        # Copy GTK resources\n        self.copy_gtk_resources()\n\ndef main():\n    if len(sys.argv) != 3:\n        print(\"Usage: python3 gtk-win-bundler.py <exe_path> <target_dir>\")\n        sys.exit(1)\n\n    # Check for MINGW_PREFIX environment variable\n    mingw_prefix = os.environ.get('MINGW_PREFIX')\n    if not mingw_prefix:\n        print(\"Error: MINGW_PREFIX environment variable is not set\")\n        sys.exit(1)\n\n    exe_path = Path(sys.argv[1])\n    target_dir = Path(sys.argv[2])\n\n    bundler = GTKBundler(mingw_prefix, target_dir)\n    bundler.bundle_application(exe_path)\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": ".github/releasers/windows/pactus-gui.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n  <assemblyIdentity version=\"1.0.0.0\"\n                    processorArchitecture=\"amd64\"\n                    name=\"pactus\"\n                    type=\"win32\"/>\n  <description>Pactus GUI</description>\n  <dependency>\n    <dependentAssembly>\n      <assemblyIdentity type=\"win32\"\n                        name=\"Microsoft.Windows.Common-Controls\"\n                        version=\"6.0.0.0\"\n                        processorArchitecture=\"*\"\n                        publicKeyToken=\"6595b64144ccf1df\"\n                        language=\"*\"/>\n    </dependentAssembly>\n  </dependency>\n  <trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <security>\n      <requestedPrivileges>\n        <requestedExecutionLevel level=\"asInvoker\" uiAccess=\"false\"/>\n      </requestedPrivileges>\n    </security>\n  </trustInfo>\n</assembly>\n"
  },
  {
    "path": ".github/workflows/codeql.yml",
    "content": "name: \"CodeQL Advanced\"\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n  schedule:\n    - cron: \"23 3 * * 0\"\n\njobs:\n  analyze:\n    name: Analyze (${{ matrix.language }})\n    runs-on: \"ubuntu-latest\"\n    permissions:\n      # required for all workflows\n      security-events: write\n\n      # required to fetch internal or private CodeQL packs\n      packages: read\n\n    strategy:\n      fail-fast: false\n      matrix:\n        # https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed\n        include:\n          - language: actions\n            build-mode: none\n          - language: go\n            build-mode: manual\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v6\n\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v3\n        with:\n          languages: ${{ matrix.language }}\n          build-mode: ${{ matrix.build-mode }}\n\n          # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs\n          queries: security-extended, security-and-quality\n\n      - if: matrix.build-mode == 'manual'\n        shell: bash\n        run: make build\n\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@v3\n        with:\n          category: \"/language:${{matrix.language}}\"\n"
  },
  {
    "path": ".github/workflows/coverage.yml",
    "content": "name: Reporting Test Coverage\npermissions:\n  contents: read\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n\njobs:\n  coverage:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      - name: Test with coverage\n        run: go test -gcflags=-l -coverprofile=coverage.txt -covermode=atomic ./...\n\n      - name: Upload coverage report\n        uses: codecov/codecov-action@v5\n        env:\n          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/deadlock.yml",
    "content": "name: Deadlock and Data Race Detection\npermissions:\n  contents: read\n\non:\n  pull_request:\n    branches: [\"main\"]\n\njobs:\n  data-race:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      - name: Test with data race detection\n        run: make test_race\n\n      - name: Replace sync.RWMutex with deadlock.RWMutex\n        run: find . -type f -name \"*.go\" -not -path '*/\\.*' -exec sed -i -- 's/\\t\"sync\"/\\tsync \"github.com\\/sasha-s\\/go-deadlock\"/g' {} +\n\n      - name: Adding go-deadlock package\n        run: go get github.com/sasha-s/go-deadlock\n\n      - name: Test with deadlock detection\n        run: make test\n"
  },
  {
    "path": ".github/workflows/docker.yml",
    "content": "name: Building Docker and Push to DockerHub\npermissions:\n  contents: read\n\non:\n  push:\n    tags: [\"v[0-9]+.[0-9]+.[0-9]+\"] # Trigger on version tags (e.g., v1.0.0)\n    branches: [\"main\"]\n\nenv:\n  REGISTRY_IMAGE: pactus/pactus\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        platform:\n          - linux/amd64\n          - linux/arm/v6\n          - linux/arm/v7\n          - linux/arm64\n          - linux/386\n          - linux/ppc64le\n\n    steps:\n      - name: Prepare\n        run: |\n          platform=${{ matrix.platform }}\n          echo \"PLATFORM_PAIR=${platform//\\//-}\" >> $GITHUB_ENV\n\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v3\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Log in to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n\n      - name: Extract metadata (tags, labels) for Docker\n        id: meta\n        uses: docker/metadata-action@v5\n        with:\n          images: ${{ env.REGISTRY_IMAGE }}\n\n      - name: Build and push platform-specific image\n        id: build\n        uses: docker/build-push-action@v6\n        with:\n          context: .\n          platforms: ${{ matrix.platform }}\n          push: true\n          tags: ${{ steps.meta.outputs.tags }}\n          labels: ${{ steps.meta.outputs.labels }}\n\n      - name: Export digest\n        run: |\n          mkdir -p /tmp/digests\n          digest=\"${{ steps.build.outputs.digest }}\"\n          touch \"/tmp/digests/${digest#sha256:}\"\n\n      - name: Upload digest\n        uses: actions/upload-artifact@v6\n        with:\n          name: digests-${{ env.PLATFORM_PAIR }}\n          path: /tmp/digests/*\n          if-no-files-found: error\n          retention-days: 1\n\n  merge:\n    runs-on: ubuntu-latest\n    needs:\n      - build\n    steps:\n      - name: Download digests\n        uses: actions/download-artifact@v6\n        with:\n          path: /tmp/digests\n          pattern: digests-*\n          merge-multiple: true\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Docker meta\n        id: meta\n        uses: docker/metadata-action@v5\n        with:\n          images: ${{ env.REGISTRY_IMAGE }}\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n\n      - name: Create manifest list and push\n        working-directory: /tmp/digests\n        run: |\n          docker buildx imagetools create $(jq -cr '.tags | map(\"-t \" + .) | join(\" \")' <<< \"$DOCKER_METADATA_OUTPUT_JSON\") \\\n            $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)\n\n      - name: Inspect image\n        run: |\n          docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}\n"
  },
  {
    "path": ".github/workflows/gui.yml",
    "content": "name: Build and Test GUI\npermissions:\n  contents: read\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n\njobs:\n  build-gui:\n    runs-on: ${{ matrix.name }}\n    defaults:\n      run:\n        shell: ${{ matrix.shell }}\n    strategy:\n      matrix:\n        # Default values for `defaults.run.shell`\n        # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell\n        include:\n          - name: ubuntu-latest\n            shell: \"bash -e {0}\"\n          - name: macos-latest\n            shell: \"bash -e {0}\"\n          - name: windows-latest\n            shell: \"msys2 {0}\"\n\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Setup Go for macOS and Linux\n        if: runner.os != 'Windows'\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Install Dependencies (Linux)\n        if: runner.os == 'Linux'\n        run: |\n          sudo apt update\n          sudo apt install -y libgtk-3-dev libcairo2-dev libglib2.0-dev\n\n      - name: Install Dependencies (macOS)\n        if: runner.os == 'macOS'\n        run: brew install gtk+3\n\n      - name: Setup MSYS2 and Dependencies (Windows)\n        if: runner.os == 'Windows'\n        uses: msys2/setup-msys2@v2\n        with:\n          msystem: MINGW64\n          install: >-\n            git\n            make\n            glib2-devel\n            mingw-w64-x86_64-go\n            mingw-w64-x86_64-gtk3\n            mingw-w64-x86_64-glib2\n            mingw-w64-x86_64-gcc\n            mingw-w64-x86_64-pkg-config\n\n      - name: Patch pkgconfig (Windows)\n        if: runner.os == 'Windows'\n        run: |\n          sed -i -e 's/-Wl,-luuid/-luuid/g' /mingw64/lib/pkgconfig/gdk-3.0.pc\n\n      #######################################################\n      ## Caching Go modules and GTK dependencies\n\n      - name: Get Go environment\n        id: go-env\n        run: |\n          echo \"cache=$(go env GOCACHE)\" >> $GITHUB_ENV\n          echo \"modcache=$(go env GOMODCACHE)\" >> $GITHUB_ENV\n          echo \"lintcache=$HOME/.cache/golangci-lint\" >> $GITHUB_ENV\n\n      # Example for caching Go dependencies:\n      # https://github.com/actions/cache/blob/main/examples.md#go---modules\n      - uses: actions/cache@v5\n        id: cache\n        with:\n          path: |\n            ${{ env.cache }}\n            ${{ env.modcache }}\n            ${{ env.lintcache }}\n          key: ${{ matrix.name }}-go-${{ hashFiles('**/go.sum') }}\n          restore-keys: |\n            ${{ matrix.name }}-go-\n      #######################################################\n      - name: Install GTK\n        if: steps.cache.outputs.cache-hit != 'true'\n        run: go install github.com/gotk3/gotk3/gtk\n\n      - name: Build the GUI binary\n        run: make build_gui\n\n      - name: Test the GUI binary\n        run: go test -tags gtk ./cmd/gtk/...\n\n      - name: Lint check (Linux only)\n        if: runner.os == 'Linux'\n        uses: golangci/golangci-lint-action@v9\n        with:\n          version: v2.11.4\n          args: --build-tags gtk\n"
  },
  {
    "path": ".github/workflows/linting.yml",
    "content": "name: Lint and Format Check\npermissions:\n  contents: read\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n\njobs:\n  linting:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      - name: Check linting and formatting\n        uses: golangci/golangci-lint-action@v9\n        with:\n          version: v2.11.4\n\n      - name: Check proto files\n        run: |\n          go install github.com/bufbuild/buf/cmd/buf@v1.67.0\n          make proto-check\n"
  },
  {
    "path": ".github/workflows/packager.yml",
    "content": "## Important Notes:\n## 1. The Releaser workflow is triggered when a new tag is pushed to the repository.\n## 2. The Packager workflow is triggered when the Releaser workflow completes successfully.\n## 3. GitHub always executes this workflow using the version from the main branch\n## 4. To package the correct release, it checks out the latest tag.\n##\nname: Packager\npermissions:\n  contents: read\n  id-token: write\n\non:\n  workflow_run:\n    workflows: [\"Releaser\"]\n    types: [\"completed\"]\n\njobs:\n  packager:\n    runs-on: ubuntu-latest\n    if: github.event.workflow_run.conclusion == 'success'\n    outputs:\n      dry_run: ${{ steps.release-type.outputs.dry_run }}\n\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Determine Release Type\n        id: release-type\n        run: |\n          LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)\n          echo \"Latest tag: $LATEST_TAG\"\n\n          if [[ \"$LATEST_TAG\" =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+$ ]]; then\n            echo \"🚀 Final release detected.\"\n            DRY_RUN=false\n          elif [[ \"$LATEST_TAG\" =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$ ]]; then\n            echo \"🧪 Pre-release detected, using dry-run.\"\n            DRY_RUN=true\n          else\n            echo \"Tag $LATEST_TAG is invalid.\"\n            exit 1\n          fi\n\n          echo \"dry_run=$DRY_RUN\" >> \"$GITHUB_OUTPUT\"\n          echo \"LATEST_TAG=$LATEST_TAG\" >> $GITHUB_ENV\n          git checkout $LATEST_TAG\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v6\n        with:\n          node-version: \"20\"\n          registry-url: \"https://registry.npmjs.org\"\n\n      - name: Create Packages\n        run: bash ./.github/packager/packager.sh\n        env:\n          VERSION: ${{ env.LATEST_TAG }}\n\n      - name: Upload `package-js-grpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-js-grpc\n          path: packages/js/pactus-grpc\n\n      - name: Upload `package-js-jsonrpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-js-jsonrpc\n          path: packages/js/pactus-jsonrpc\n\n      - name: Upload `package-python-grpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-python-grpc\n          path: packages/python/pactus-grpc\n\n      - name: Upload `package-python-jsonrpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-python-jsonrpc\n          path: packages/python/pactus-jsonrpc\n\n      - name: Upload `package-rust-grpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-rust-grpc\n          path: packages/rust/pactus-grpc\n\n      - name: Upload `package-rust-jsonrpc` package\n        uses: actions/upload-artifact@v6\n        with:\n          name: package-rust-jsonrpc\n          path: packages/rust/pactus-jsonrpc\n\n  publish-npm-grpc:\n    name: Publish pactus-grpc package to npm\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: npmjs.com\n      url: https://npmjs.com/package/pactus-grpc\n\n    steps:\n      - name: Download JavaScript Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-js-grpc\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v6\n        with:\n          node-version: \"20\"\n          registry-url: \"https://registry.npmjs.org\"\n\n      - name: Publish to npm\n        run: |\n          if [[ \"${{ needs.packager.outputs.dry_run }}\" == \"true\" ]]; then\n            npm publish --access public --dry-run\n          else\n            npm publish --access public\n          fi\n\n  publish-npm-jsonrpc:\n    name: Publish pactus-jsonrpc package to npm\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: npmjs.com\n      url: https://npmjs.com/package/pactus-jsonrpc\n\n    steps:\n      - name: Download JavaScript Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-js-jsonrpc\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v6\n        with:\n          node-version: \"20\"\n          registry-url: \"https://registry.npmjs.org\"\n\n      - name: Publish to npm\n        run: |\n          if [[ \"${{ needs.packager.outputs.dry_run }}\" == \"true\" ]]; then\n            npm publish --access public --dry-run\n          else\n            npm publish --access public\n          fi\n\n  publish-pypi-grpc:\n    name: Publish pactus-grpc package to PyPI\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: pypi.org\n      url: https://pypi.org/p/pactus-grpc\n\n    steps:\n      - name: Download Python Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-python-grpc\n\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: \"3.13\"\n\n      - name: Install build tools and build Python wheel\n        run: |\n          python3 -m pip install build --user\n          python3 -m build\n\n      - name: Publish distribution to PyPI\n        if: needs.packager.outputs.dry_run == 'false'\n        uses: pypa/gh-action-pypi-publish@release/v1\n\n  publish-pypi-jsonrpc:\n    name: Publish pactus-jsonrpc package to PyPI\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: pypi.org\n      url: https://pypi.org/p/pactus-jsonrpc\n\n    steps:\n      - name: Download Python Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-python-jsonrpc\n\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: \"3.13\"\n\n      - name: Install build tools and build Python wheel\n        run: |\n          python3 -m pip install build --user\n          python3 -m build\n\n      - name: Publish distribution to PyPI\n        if: needs.packager.outputs.dry_run == 'false'\n        uses: pypa/gh-action-pypi-publish@release/v1\n\n  publish-crates-grpc:\n    name: Publish pactus-grpc package to crates.io\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: crates.io\n      url: https://crates.io/crates/pactus-grpc\n\n    steps:\n      - name: Download Rust Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-rust-grpc\n\n      - uses: dtolnay/rust-toolchain@stable\n        with:\n          toolchain: 1.90.0\n\n      - name: Publish to crates.io\n        run: |\n          if [[ \"${{ needs.packager.outputs.dry_run }}\" == \"true\" ]]; then\n            cargo publish --dry-run\n          else\n            cargo publish\n          fi\n        env:\n          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}\n\n  publish-crates-jsonrpc:\n    name: Publish pactus-jsonrpc package to crates.io\n    needs: packager\n    runs-on: ubuntu-latest\n\n    environment:\n      name: crates.io\n      url: https://crates.io/crates/pactus-jsonrpc\n\n    steps:\n      - name: Download Rust Package\n        uses: actions/download-artifact@v6\n        with:\n          name: package-rust-jsonrpc\n\n      - uses: dtolnay/rust-toolchain@stable\n        with:\n          toolchain: 1.90.0\n\n      - name: Publish to crates.io\n        run: |\n          if [[ \"${{ needs.packager.outputs.dry_run }}\" == \"true\" ]]; then\n            cargo publish --dry-run\n          else\n            cargo publish\n          fi\n        env:\n          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/releaser.yml",
    "content": "name: Releaser\npermissions:\n  # https://github.com/softprops/action-gh-release?tab=readme-ov-file#permissions\n  contents: write\n\non:\n  push:\n    tags: [\"v*\"]\n\njobs:\n\n  ########################################\n  build-cli:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Install Dependencies\n        run: |\n          sudo apt update\n          sudo apt install zip\n\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Create release files\n        run: bash ./.github/releasers/releaser_cli.sh\n\n      - name: Calculate sha256sum\n        run: sha256sum pactus-*.zip pactus-*tar.gz > checksum-cli.txt\n\n      - name: Upload checksum artifact\n        uses: actions/upload-artifact@v6\n        with:\n          name: checksum-cli\n          path: checksum-cli.txt\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: |\n            pactus-*.zip\n            pactus-*.tar.gz\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  ########################################\n  build-gui-linux:\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      matrix:\n        name: [linux-amd64, linux-arm64]\n        include:\n          - name: linux-amd64\n            runner: ubuntu-24.04\n          - name: linux-arm64\n            runner: ubuntu-24.04-arm\n\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Install Dependencies\n        run: |\n          sudo apt update\n          sudo apt install libgtk-3-dev libcairo2-dev libglib2.0-dev libfuse2 pkg-config dpkg dpkg-dev\n\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Create release files\n        run: bash ./.github/releasers/releaser_gui_linux.sh\n\n      - name: Calculate sha256sum\n        run: sha256sum pactus-gui*.tar.gz pactus-gui*.AppImage > checksum-${{ matrix.name }}.txt\n\n      - name: Upload checksum artifact\n        uses: actions/upload-artifact@v6\n        with:\n          name: checksum-${{ matrix.name }}\n          path: checksum-${{ matrix.name }}.txt\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: |\n            pactus-gui*.tar.gz\n            pactus-gui*.AppImage\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  ########################################\n  build-gui-macos:\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      matrix:\n        name: [macos-amd64, macos-arm64]\n        include:\n          - name: macos-amd64\n            runner: macos-15-intel\n            lib_home: /usr/local\n          - name: macos-arm64\n            runner: macos-26\n            lib_home: /opt/homebrew\n\n    env:\n      LIB_HOME: ${{ matrix.lib_home }}\n\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Install Dependencies\n        run: brew install gtk+3 librsvg create-dmg coreutils gdk-pixbuf glib-networking pkg-config\n\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Create release files\n        run: bash ./.github/releasers/releaser_gui_macos.sh\n\n      - name: Calculate sha256sum\n        run: sha256sum pactus-*.dmg pactus-*.tar.gz > checksum-${{ matrix.name }}.txt\n\n      - name: Upload checksum artifact\n        uses: actions/upload-artifact@v6\n        with:\n          name: checksum-${{ matrix.name }}\n          path: checksum-${{ matrix.name }}.txt\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: |\n            pactus-*.dmg\n            pactus-*.tar.gz\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  ########################################\n  build-gui-windows:\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      matrix:\n        name: [windows_amd64]\n        include:\n          - name: windows_amd64\n            runner: windows-2025\n\n    defaults:\n      run:\n        shell: msys2 {0}\n\n    steps:\n      - uses: actions/checkout@v6\n\n      - uses: msys2/setup-msys2@v2\n        with:\n          msystem: MINGW64\n          update: true\n          install: git\n            make\n            p7zip\n            glib2-devel\n            mingw-w64-x86_64-go\n            mingw-w64-x86_64-gtk3\n            mingw-w64-x86_64-glib2\n            mingw-w64-x86_64-gcc\n            mingw-w64-x86_64-pkg-config\n            mingw-w64-x86_64-adwaita-icon-theme\n            mingw-w64-x86_64-hicolor-icon-theme\n\n      - name: Get Version\n        id: get_version\n        run: |\n          VERSION=\"$(echo `git -C . describe --abbrev=0 --tags` | sed 's/^.//')\"\n          echo \"VERSION=$VERSION\" >> $GITHUB_OUTPUT\n\n      - name: Build Binaries\n        run: bash ./.github/releasers/releaser_gui_windows_build.sh\n\n      - name: Sign Pactus Daemon\n        uses: ./.github/actions/windows-signing\n        with:\n            signpath-api-token: ${{ secrets.SIGNPATH_API_TOKEN }}\n            signpath-signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}\n            artifact-name: pactus-daemon\n\n      - name: Sign Pactus Wallet\n        uses: ./.github/actions/windows-signing\n        with:\n            signpath-api-token: ${{ secrets.SIGNPATH_API_TOKEN }}\n            signpath-signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}\n            artifact-name: pactus-wallet\n\n      - name: Sign Pactus Shell\n        uses: ./.github/actions/windows-signing\n        with:\n            signpath-api-token: ${{ secrets.SIGNPATH_API_TOKEN }}\n            signpath-signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}\n            artifact-name: pactus-shell\n\n      - name: Sign Pactus GUI\n        uses: ./.github/actions/windows-signing\n        with:\n            signpath-api-token: ${{ secrets.SIGNPATH_API_TOKEN }}\n            signpath-signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}\n            artifact-name: pactus-gui\n\n      - name: Build Installer\n        run: bash ./.github/releasers/releaser_gui_windows_installer.sh\n\n      - name: Sign Installer\n        uses: ./.github/actions/windows-signing\n        with:\n            signpath-api-token: ${{ secrets.SIGNPATH_API_TOKEN }}\n            signpath-signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}\n            artifact-name: pactus-gui_${{ steps.get_version.outputs.VERSION }}_${{ matrix.name }}_installer\n\n      - name: Move Installer to Root\n        run: mv ./build/signed/pactus-gui_*_installer.exe .\n\n      - name: Calculate sha256sum\n        run: sha256sum pactus-gui_*.zip pactus-gui_*_installer.exe > checksum-${{ matrix.name }}.txt\n\n      - name: Upload checksum artifact\n        uses: actions/upload-artifact@v6\n        with:\n          name: checksum-${{ matrix.name }}\n          path: checksum-${{ matrix.name }}.txt\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: |\n            pactus-gui_*.zip\n            pactus-gui_*_installer.exe\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  ########################################\n  checksums:\n    needs:\n      [\n        build-cli,\n        build-gui-linux,\n        build-gui-macos,\n        build-gui-windows,\n      ]\n    runs-on: ubuntu-latest\n    steps:\n      - name: Download checksum artifacts\n        uses: actions/download-artifact@v6\n        with:\n          path: checksums\n\n      - name: Combine checksums\n        run: |\n          cat checksums/*/*.txt > SHA256SUMS\n          cat SHA256SUMS\n\n      - name: Upload SHA256SUMS as an artifact\n        uses: actions/upload-artifact@v6\n        with:\n          name: sha256sums\n          path: SHA256SUMS\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: SHA256SUMS\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  ########################################\n  cosign:\n    needs: [checksums]\n    runs-on: ubuntu-latest\n    steps:\n      - name: Download SHA256SUMS artifact\n        uses: actions/download-artifact@v6\n        with:\n          name: sha256sums\n\n      - uses: sigstore/cosign-installer@v3\n\n      - name: Sign Checksum\n        run: cosign sign-blob --yes --key env://COSIGN_PRIVATE_KEY SHA256SUMS > SHA256SUMS.sig\n        env:\n          COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}\n          COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: SHA256SUMS.sig\n\n  ########################################\n  downloader:\n    needs: [cosign]\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n\n      - name: Create Downloader file\n        run: |\n          VERSION=\"$(echo `git -C . describe --abbrev=0 --tags` | sed 's/^.//')\" # \"v1.2.3\" -> \"1.2.3\"\n          echo ${VERSION}\n          sed -i \"s/__VERSION__/${VERSION}/g\" .github/releasers/pactus_downloader.sh\n\n      - name: Publish\n        uses: softprops/action-gh-release@v2\n        with:\n          files: .github/releasers/pactus_downloader.sh\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/semantic-pr.yml",
    "content": "name: Semantic PR\npermissions:\n  pull-requests: read\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n      - synchronize\n      - reopened\n\njobs:\n  main:\n    name: Validate PR title\n    runs-on: ubuntu-latest\n    steps:\n      - uses: amannn/action-semantic-pull-request@v6\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          # Configure which scopes are allowed (newline-delimited).\n          scopes: |\n            github\n            linter\n            deps\n            makefile\n            release\n            releaser\n            packager\n            other\n            daemon\n            cbor\n            cmd\n            firewall\n            gtk\n            shell\n            wallet-cmd\n            committee\n            config\n            consensus\n            crypto\n            docs\n            docker\n            encoding\n            execution\n            genesis\n            network\n            node\n            sandbox\n            scripts\n            sortition\n            state\n            store\n            sync\n            main\n            txpool\n            types\n            util\n            version\n            wallet\n            www\n            grpc\n            proto\n            jsonrpc\n            http\n            html\n            zeromq\n            windows\n            linux\n            macos\n          # Configure that a scope must always be provided.\n          requireScope: true\n          # The subject should not start with an uppercase character and should not end with a period.\n          subjectPattern: ^(?![A-Z]).+[^.]$\n          subjectPatternError: |\n            The subject \"{subject}\" cannot start with an uppercase character or end with a period.\n"
  },
  {
    "path": ".github/workflows/testing.yml",
    "content": "name: Unit Testing\npermissions:\n  contents: read\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n\njobs:\n  test:\n    strategy:\n      matrix:\n        os: [ubuntu-latest, macos-latest, windows-latest]\n    runs-on: ${{ matrix.os }}\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      - name: Install Go\n        uses: actions/setup-go@v6\n        with:\n          go-version: \"1.26.2\"\n\n      - name: Unit tests\n        run: make unit_test\n"
  },
  {
    "path": ".gitignore",
    "content": "build/\n.DS_Store\n\n# IDEs\n.idea\n.vscode\n\n# TODO tasks\ntodo\n\n# Releasers output\n/pactus-*\n\n# VIM artifacts\n.swp\n.*.sw*\npackages/\n"
  },
  {
    "path": ".golangci.yml",
    "content": "version: \"2\"\nlinters:\n  enable:\n    - asasalint\n    - asciicheck\n    - bidichk\n    - bodyclose\n    - contextcheck\n    - copyloopvar\n    - decorder\n    - dogsled\n    - dupword\n    - durationcheck\n    - errchkjson\n    - errname\n    - errorlint\n    - exhaustive\n    - forbidigo\n    - gocheckcompilerdirectives\n    - gocognit\n    - gocritic\n    - gocyclo\n    - godot\n    - goheader\n    - gomoddirectives\n    - gomodguard\n    - goprintffuncname\n    - gosec\n    - gosmopolitan\n    - grouper\n    - importas\n    - lll\n    - loggercheck\n    - maintidx\n    - makezero\n    - mirror\n    - misspell\n    - musttag\n    - nakedret\n    - nestif\n    - nilerr\n    - nilnil\n    - nlreturn\n    - noctx\n    - nolintlint\n    - nosprintfhostport\n    - prealloc\n    - predeclared\n    - promlinter\n    - reassign\n    - revive\n    - rowserrcheck\n    - sqlclosecheck\n    - staticcheck\n    - tagalign\n    - tagliatelle\n    - testableexamples\n    - testifylint\n    - thelper\n    - tparallel\n    - unconvert\n    - unparam\n    - usestdlibvars\n    - usetesting\n    - varnamelen\n    - wastedassign\n    - whitespace\n    - zerologlint\n  settings:\n    gocritic:\n      disabled-checks:\n        - ifElseChain\n        - unnamedResult\n        - importShadow\n      enabled-tags:\n        - diagnostic\n        - style\n        - performance\n    gosec:\n      excludes:\n        - G304\n        - G204\n        - G115\n        - G704  # SSRF via taint analysis - ignore (URLs are validated/trusted)\n        - G705  # XSS via taint analysis - ignore (internal HTML, values escaped)\n    govet:\n      disable:\n        - fieldalignment\n      enable-all: true\n      settings:\n        shadow:\n          strict: true\n    nestif:\n      min-complexity: 6\n    predeclared:\n      ignore:\n        - len\n        - ' min'\n        - ' max'\n      qualified-name: true\n    revive:\n      enable-all-rules: true\n      rules:\n        - name: exported\n          disabled: true\n        - name: package-comments\n          disabled: true\n        - name: add-constant\n          disabled: true\n        - name: line-length-limit\n          disabled: true\n        - name: cognitive-complexity\n          disabled: true\n        - name: function-length\n          disabled: true\n        - name: cyclomatic\n          disabled: true\n        - name: unchecked-type-assertion\n          disabled: true\n        - name: max-public-structs\n          disabled: true\n        - name: flag-parameter\n          disabled: true\n        - name: deep-exit\n          disabled: true\n        - name: get-return\n          disabled: true\n        - name: confusing-naming\n          disabled: true\n        - name: function-result-limit\n          disabled: true\n        - name: import-shadowing\n          disabled: true\n        - name: redefines-builtin-id\n          disabled: true\n        - name: enforce-switch-style\n          disabled: true\n        - name: identical-switch-branches\n          disabled: true\n        - name: package-naming\n          disabled: true\n        # - name: use-slices-sort\n        #   disabled: true\n        - name: var-naming\n          arguments:\n            - [] # AllowList\n            - [] # DenyList\n            - -\n                skip-package-name-checks: true\n        - name: unhandled-error\n          arguments:\n            - fmt.Printf\n            - fmt.Println\n            - fmt.Fprintf\n            - strings.Builder.WriteString\n            - strings.Builder.WriteRune\n            - strings.Builder.WriteByte\n            - bytes.Buffer.Write\n            - bytes.Buffer.WriteString\n    staticcheck:\n      checks:\n        - all\n        - -ST1000\n        - -QF1008\n    testifylint:\n      enable-all: true\n    usetesting:\n      os-temp-dir: true\n      context-background: true\n      context-todo: true\n    tagliatelle:\n      case:\n        rules:\n          json: snake\n          yaml: snake\n        use-field-name: false\n    varnamelen:\n      ignore-names:\n        - ok\n        - ip\n        - db\n        - \"no\"\n        - tt\n        - n\n        - i\n        - j\n        - l\n        - h\n        - il\n        - r\n        - w\n      ignore-decls:\n        - wg sync.WaitGroup\n        - ts *testsuite.TestSuite\n        - td *testData\n        - ma multiaddr.Multiaddr\n        - db *leveldb.DB\n  exclusions:\n    generated: lax\n    rules:\n      - linters:\n          - forbidigo\n          - gocognit\n          - maintidx\n          - nestif\n          - gosec\n        path: _test.go\n      - path: (.+)\\.go$\n        text: 'shadow: declaration of \"err\" shadows'\n      - path: (.+)\\.go$\n        text: 'builtinShadow: shadowing of predeclared identifier: min'\n      - path: (.+)\\.go$\n        text: 'builtinShadow: shadowing of predeclared identifier: max'\n      - path: (.+)\\.go$\n        text: 'builtinShadow: shadowing of predeclared identifier: len'\n    paths:\n      - third_party$\n      - builtin$\n      - examples$\n      - util/bip39/wordlists/\nformatters:\n  enable:\n    - gci\n    - gofmt\n    - gofumpt\n    - goimports\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n## [1.13.0](https://github.com/pactus-project/pactus/compare/v1.12.0...v1.13.0) (2026-04-03)\n\n### Feat\n\n- **grpc**: update validator object to support delegation ([#2117](https://github.com/pactus-project/pactus/pull/2117))\n- **cmd**: add delegation flags for bond and unbond transactions ([#2106](https://github.com/pactus-project/pactus/pull/2106))\n- **other**: implement PIP-49 ([#2101](https://github.com/pactus-project/pactus/pull/2101))\n- **gtk**: add network info tab ([#2098](https://github.com/pactus-project/pactus/pull/2098))\n- **gtk**: add committee info tab ([#2096](https://github.com/pactus-project/pactus/pull/2096))\n\n### Fix\n\n- **sync**: update the latest support version ([#2125](https://github.com/pactus-project/pactus/pull/2125))\n- **state**: fix delegate reward on boundaries ([#2120](https://github.com/pactus-project/pactus/pull/2120))\n- **state**: check subsidy transaction for delegated reward ([#2119](https://github.com/pactus-project/pactus/pull/2119))\n- **types**: check decode size for validator ([#2116](https://github.com/pactus-project/pactus/pull/2116))\n- **cmd**: set protocol version for localnet ([#2114](https://github.com/pactus-project/pactus/pull/2114))\n- **gtk**: set percentage of protocol versions ([#2113](https://github.com/pactus-project/pactus/pull/2113))\n- **gtk**: set public key for known validators ([#2112](https://github.com/pactus-project/pactus/pull/2112))\n- **wallet**: ignore delegation on normal bond tx ([#2111](https://github.com/pactus-project/pactus/pull/2111))\n- **state**: set subsidy for delegated reward ([#2109](https://github.com/pactus-project/pactus/pull/2109))\n- **execution**: check delegation for withdraw execution ([#2108](https://github.com/pactus-project/pactus/pull/2108))\n- **execution**: check delegation for unbond execution ([#2107](https://github.com/pactus-project/pactus/pull/2107))\n- **types**: set delegation-owner for unbond transaction ([#2105](https://github.com/pactus-project/pactus/pull/2105))\n- **types**: fix bond encoding issue ([#2104](https://github.com/pactus-project/pactus/pull/2104))\n- **wallet**: set remote provider if not specified ([#2097](https://github.com/pactus-project/pactus/pull/2097))\n\n## [1.12.0](https://github.com/pactus-project/pactus/compare/v1.11.0...v1.12.0) (2026-02-21)\n\n### Feat\n\n- **grpc**: add committee_size to blockchain_info ([#2091](https://github.com/pactus-project/pactus/pull/2091))\n- **gtk**: add node-agent field ([#2090](https://github.com/pactus-project/pactus/pull/2090))\n- **gtk**: connect to remote node ([#2079](https://github.com/pactus-project/pactus/pull/2079))\n- **grpc**: decouple peer list API ([#2078](https://github.com/pactus-project/pactus/pull/2078))\n- **gtk**: add validator page ([#2068](https://github.com/pactus-project/pactus/pull/2068))\n\n### Fix\n\n- **grpc**: add in_committee field to blockchain info ([#2089](https://github.com/pactus-project/pactus/pull/2089))\n- **util**: prevent panic on sha256 mismatch error ([#2088](https://github.com/pactus-project/pactus/pull/2088))\n- **gtk**: set connection label ([#2085](https://github.com/pactus-project/pactus/pull/2085))\n- **gtk**: update view asynchronously ([#2082](https://github.com/pactus-project/pactus/pull/2082))\n- **gtk**: ensure GTK UIs run on main thread ([#2081](https://github.com/pactus-project/pactus/pull/2081))\n- **gtk**: define validator model ([#2075](https://github.com/pactus-project/pactus/pull/2075))\n- **gtk**: close wallet on node startup ([#2057](https://github.com/pactus-project/pactus/pull/2057))\n\n### Refactor\n\n- **gtk**: refactor controllers ([#2080](https://github.com/pactus-project/pactus/pull/2080))\n- **gtk**: use gRPC connection for node model ([#2077](https://github.com/pactus-project/pactus/pull/2077))\n- **node**: set global context ([#2076](https://github.com/pactus-project/pactus/pull/2076))\n- **grpc**: update blockchain info API ([#2073](https://github.com/pactus-project/pactus/pull/2073))\n- **gtk**: use gRPC for wallet model ([#2070](https://github.com/pactus-project/pactus/pull/2070))\n- **grpc**: define wallet transaction info ([#2071](https://github.com/pactus-project/pactus/pull/2071))\n\n## [1.11.0](https://github.com/pactus-project/pactus/compare/v1.10.0...v1.11.0) (2026-01-25)\n\n### Feat\n\n- **gtk**: use timeout to refresh wallet page ([#2039](https://github.com/pactus-project/pactus/pull/2039))\n- **gtk**: add transactions page ([#2035](https://github.com/pactus-project/pactus/pull/2035))\n- **types**: define ShortString for Address and Hash ([#2031](https://github.com/pactus-project/pactus/pull/2031))\n- **gtk**: add splash screen for starting the node ([#2019](https://github.com/pactus-project/pactus/pull/2019))\n- **wallet**: define query parameters for list of transactions ([#2014](https://github.com/pactus-project/pactus/pull/2014))\n- **wallet**: define Blockchain Provider interface ([#2013](https://github.com/pactus-project/pactus/pull/2013))\n- **wallet**: process blocks for wallet transactions ([#2011](https://github.com/pactus-project/pactus/pull/2011))\n- **cmd**: add transaction command ([#2006](https://github.com/pactus-project/pactus/pull/2006))\n- **grpc**: add List Transaction API for wallets ([#2005](https://github.com/pactus-project/pactus/pull/2005))\n- **grpc**: add Update Password API for wallets ([#2004](https://github.com/pactus-project/pactus/pull/2004))\n- **wallet**: add SQLite3 storage ([#2001](https://github.com/pactus-project/pactus/pull/2001))\n- **util**: add LogString for compact log formatting ([#2000](https://github.com/pactus-project/pactus/pull/2000))\n- **types**: decode transaction from hex string ([#1998](https://github.com/pactus-project/pactus/pull/1998))\n- **types**: decode block from hex string ([#1999](https://github.com/pactus-project/pactus/pull/1999))\n- **types**: format amount with thousand separators ([#1977](https://github.com/pactus-project/pactus/pull/1977))\n\n### Fix\n\n- **txpool**: perform basic check on appending transactions ([#2050](https://github.com/pactus-project/pactus/pull/2050))\n- **gtk**: refresh wallet info ([#2049](https://github.com/pactus-project/pactus/pull/2049))\n- **wallet**: close wallet before starting the node ([#2047](https://github.com/pactus-project/pactus/pull/2047))\n- **gtk**: refresh wallet view on changing address ([#2041](https://github.com/pactus-project/pactus/pull/2041))\n- **wallet**: total balance for non-existing accounts ([#2040](https://github.com/pactus-project/pactus/pull/2040))\n- **wallet**: add no column for transaction table ([#2034](https://github.com/pactus-project/pactus/pull/2034))\n- **wallet**: configure Pragmas and create indices ([#2030](https://github.com/pactus-project/pactus/pull/2030))\n- **wallet**: deprecate load wallet API ([#2029](https://github.com/pactus-project/pactus/pull/2029))\n- **cmd**: ensure provider is set when recovering wallet ([#2027](https://github.com/pactus-project/pactus/pull/2027))\n- **grpc**: correct wallet verbs and add validator addresses route ([#2023](https://github.com/pactus-project/pactus/pull/2023))\n- **wallet**: set default values for address and direction ([#2022](https://github.com/pactus-project/pactus/pull/2022))\n- **cmd**: show transaction list in a table ([#2015](https://github.com/pactus-project/pactus/pull/2015))\n- **grpc**: include driver and path in GetWalletInfo response ([#2010](https://github.com/pactus-project/pactus/pull/2010))\n- **wallet**: load default_wallet on startup ([#2008](https://github.com/pactus-project/pactus/pull/2008))\n- **util**: list only top-level files and directories without recursion ([#2009](https://github.com/pactus-project/pactus/pull/2009))\n- **wallet**: list SQLite wallets in wallet manager ([#2003](https://github.com/pactus-project/pactus/pull/2003))\n- **wallet**: add Close method for wallet ([#2002](https://github.com/pactus-project/pactus/pull/2002))\n- **network**: remove leading and trailing spaces from network key ([#1992](https://github.com/pactus-project/pactus/pull/1992))\n- **gtk**: fix dark theme issue in Windows ([#1973](https://github.com/pactus-project/pactus/pull/1973))\n- **wallet**: panic on disconnect of wallet client connection ([#1971](https://github.com/pactus-project/pactus/pull/1971))\n\n### Refactor\n\n- **other**: use pipeline package ([#2033](https://github.com/pactus-project/pactus/pull/2033))\n- **consensus, network, util**: use scheduler package to manage … ([#2032](https://github.com/pactus-project/pactus/pull/2032))\n- **wallet**: define storage interface ([#1995](https://github.com/pactus-project/pactus/pull/1995))\n- **gtk**: refactor Pactus GUI ([#1994](https://github.com/pactus-project/pactus/pull/1994))\n- **wallet**: refactor wallet manager ([#1993](https://github.com/pactus-project/pactus/pull/1993))\n- **version**: replace Split in loops with more efficient SplitSeq ([#1982](https://github.com/pactus-project/pactus/pull/1982))\n- **crypto**: use b.Loop() to simplify the code and improve performance ([#1970](https://github.com/pactus-project/pactus/pull/1970))\n\n## [1.10.0](https://github.com/pactus-project/pactus/compare/v1.9.0...v1.10.0) (2025-10-27)\n\n### Feat\n\n- **gtk**: prefer dark theme ([#1965](https://github.com/pactus-project/pactus/pull/1965))\n- **wallet**: export the bootstrap and gRPC server list ([#1961](https://github.com/pactus-project/pactus/pull/1961))\n- **util**: operating system signal handling package ([#1959](https://github.com/pactus-project/pactus/pull/1959))\n- **util**: rename Extend to PadToLeft; add PadToRight ([#1953](https://github.com/pactus-project/pactus/pull/1953))\n- **gtk**: set default fee dialog ([#1946](https://github.com/pactus-project/pactus/pull/1946))\n- **gtk**: add address recovery page for restore wallet ([#1940](https://github.com/pactus-project/pactus/pull/1940))\n- **cmd**: update daemon init for recovery addresses ([#1939](https://github.com/pactus-project/pactus/pull/1939))\n- **grpc**: impl gRPC ping api for latency measurement ([#1936](https://github.com/pactus-project/pactus/pull/1936))\n- **wallet**: implement check activity on wallet ([#1938](https://github.com/pactus-project/pactus/pull/1938))\n- **wallet**: introduce address recovery ([#1934](https://github.com/pactus-project/pactus/pull/1934))\n- **state**: calculate the number of active validators ([#1927](https://github.com/pactus-project/pactus/pull/1927))\n- **packager**: add rust-jsonrpc package ([#1911](https://github.com/pactus-project/pactus/pull/1911))\n- **packager**: add rust-grpc package ([#1909](https://github.com/pactus-project/pactus/pull/1909))\n- **consensus**: the Cheetah implementation ([#1858](https://github.com/pactus-project/pactus/pull/1858))\n\n### Fix\n\n- **sync**: set supporting version to 1.9.0 ([#1949](https://github.com/pactus-project/pactus/pull/1949))\n- **network**: set deadline for streams ([#1947](https://github.com/pactus-project/pactus/pull/1947))\n- **grpc**: set default fee for WalletInfo API ([#1944](https://github.com/pactus-project/pactus/pull/1944))\n- **wallet**: use GetAccount API to check active account ([#1945](https://github.com/pactus-project/pactus/pull/1945))\n- **grpc**: set required fields in OpenRPC spec ([#1920](https://github.com/pactus-project/pactus/pull/1920))\n- **grpc**: define map as object in OpenRPC sepc ([#1910](https://github.com/pactus-project/pactus/pull/1910))\n- **network**: set limit for network message size ([#1904](https://github.com/pactus-project/pactus/pull/1904))\n- **cbor**: set limit for Map and Array in CBOR decoder ([#1905](https://github.com/pactus-project/pactus/pull/1905))\n- **encoding**: prevent data-length attack ([#1907](https://github.com/pactus-project/pactus/pull/1907))\n- **gtk**: ensure GTK starts on main thread ([#1885](https://github.com/pactus-project/pactus/pull/1885))\n- **gtk**: change fontmap backend for macOS ([#1884](https://github.com/pactus-project/pactus/pull/1884))\n- **gtk**: resolve crash issue on MacOs  ([#1882](https://github.com/pactus-project/pactus/pull/1882))\n\n### Refactor\n\n- **cmd, gtk**: separate address recovery from node creation flow ([#1964](https://github.com/pactus-project/pactus/pull/1964))\n- **util**: use b.Loop() to simplify the code and improve performance ([#1957](https://github.com/pactus-project/pactus/pull/1957))\n- **wallet**: re-structure the server list ([#1962](https://github.com/pactus-project/pactus/pull/1962))\n- **util**: define terminal package ([#1960](https://github.com/pactus-project/pactus/pull/1960))\n- **cmd**: move prompt to util package ([#1958](https://github.com/pactus-project/pactus/pull/1958))\n- **crypto**: check BLS aggregate primitive error ([#1956](https://github.com/pactus-project/pactus/pull/1956))\n- **network**: use WaitGroup.Go to simplify code ([#1935](https://github.com/pactus-project/pactus/pull/1935))\n- **state**: refactor reward transaction ([#1901](https://github.com/pactus-project/pactus/pull/1901))\n- **state**: check genesis state using certificate presence ([#1899](https://github.com/pactus-project/pactus/pull/1899))\n- **other**: use maps.Copy for cleaner map handling ([#1900](https://github.com/pactus-project/pactus/pull/1900))\n\n## [1.9.0](https://github.com/pactus-project/pactus/compare/v1.8.0...v1.9.0) (2025-09-10)\n\n### Feat\n\n- **grpc**: report current time in node API ([#1864](https://github.com/pactus-project/pactus/pull/1864))\n- **state**: update block version on forks ([#1863](https://github.com/pactus-project/pactus/pull/1863))\n- **state**: set foundation addresses for split reward ([#1859](https://github.com/pactus-project/pactus/pull/1859))\n- **wallet**: set default transaction fee ([#1849](https://github.com/pactus-project/pactus/pull/1849))\n- **committee**: check if committee support a protocol version ([#1855](https://github.com/pactus-project/pactus/pull/1855))\n- **sync**: set protocol version for proposal message  ([#1854](https://github.com/pactus-project/pactus/pull/1854))\n- **committee**: calculate committee protocol version percentages ([#1853](https://github.com/pactus-project/pactus/pull/1853))\n- **state**: set protocol version for validators ([#1851](https://github.com/pactus-project/pactus/pull/1851))\n- **types**: define protocol version ([#1850](https://github.com/pactus-project/pactus/pull/1850))\n- **state**: implement PIP-43 ([#1840](https://github.com/pactus-project/pactus/pull/1840))\n- **cmd**: add label option for new address command ([#1842](https://github.com/pactus-project/pactus/pull/1842))\n\n### Fix\n\n- **util**: ignore filtered levels ([#1874](https://github.com/pactus-project/pactus/pull/1874))\n- **sync**: ignore hello message from outdated nodes ([#1873](https://github.com/pactus-project/pactus/pull/1873))\n- **state**: update protocol version for own validators ([#1871](https://github.com/pactus-project/pactus/pull/1871))\n- **sync**: banned peer recovery ([#1869](https://github.com/pactus-project/pactus/pull/1869))\n- **state**: update block version on enabling fork ([#1866](https://github.com/pactus-project/pactus/pull/1866))\n- **sandbox**: remove check height for banned address ([#1868](https://github.com/pactus-project/pactus/pull/1868))\n- **state**: check protocol version to enable split-reward fork ([#1857](https://github.com/pactus-project/pactus/pull/1857))\n- **cmd**: prevent panic on redownloading chunk ([#1847](https://github.com/pactus-project/pactus/pull/1847))\n- **state**: enable soft fork for split reward ([#1846](https://github.com/pactus-project/pactus/pull/1846))\n- **cmd**: prompt for label if it is empty ([#1845](https://github.com/pactus-project/pactus/pull/1845))\n- **state**: check foundation address in subsidy transaction ([#1844](https://github.com/pactus-project/pactus/pull/1844))\n- **wallet**: set Testnet network on upgrading wallet ([#1841](https://github.com/pactus-project/pactus/pull/1841))\n- **execution**: remove Ed25519 check ([#1835](https://github.com/pactus-project/pactus/pull/1835))\n\n### Refactor\n\n- **sync**: refactor handshaking protocol  ([#1872](https://github.com/pactus-project/pactus/pull/1872))\n- **util**: use slices.Equal to simplify code ([#1837](https://github.com/pactus-project/pactus/pull/1837))\n- **shell**: rename shell command to interactive ([#1734](https://github.com/pactus-project/pactus/pull/1734))\n- **docker**: update go version for Dockerfile ([#1834](https://github.com/pactus-project/pactus/pull/1834))\n- **other**: update dependencies ([#1833](https://github.com/pactus-project/pactus/pull/1833))\n\n## [1.8.0](https://github.com/pactus-project/pactus/compare/v1.7.0...v1.8.0) (2025-07-01)\n\n### Feat\n\n- **cmd**: add transport switch in flag start daemon ([#1681](https://github.com/pactus-project/pactus/pull/1681))\n- **grpc**: add get raw batch transfer transaction ([#1799](https://github.com/pactus-project/pactus/pull/1799))\n- **types**: implement batch transfer payload ([#1793](https://github.com/pactus-project/pactus/pull/1793))\n- **packager**: publish jsonrpc packages on release ([#1776](https://github.com/pactus-project/pactus/pull/1776))\n- **rest**: define base path for REST APIs ([#1770](https://github.com/pactus-project/pactus/pull/1770))\n- **grpc**: define Rest-API server ([#1765](https://github.com/pactus-project/pactus/pull/1765))\n- **docs**: add openrpc template and schema ([#1767](https://github.com/pactus-project/pactus/pull/1767))\n- **grpc**: support gRPC Web library ([#1762](https://github.com/pactus-project/pactus/pull/1762))\n- **jsonrpc**: add CORS support ([#1755](https://github.com/pactus-project/pactus/pull/1755))\n- **grpc**: publish `pactus_grpc` package for Python ([#1732](https://github.com/pactus-project/pactus/pull/1732))\n- **grpc**: publish `pactus_grpc` package for JS ([#1736](https://github.com/pactus-project/pactus/pull/1736))\n- **wallet**: support of AES-256-CBC for the encryption ([#1706](https://github.com/pactus-project/pactus/pull/1706))\n- **wallet-cmd**: add Neuter command for wallet ([#1683](https://github.com/pactus-project/pactus/pull/1683))\n- **grpc**: add decode raw transaction method ([#1671](https://github.com/pactus-project/pactus/pull/1671))\n\n### Fix\n\n- **execution**: check network type for batch transfer ([#1812](https://github.com/pactus-project/pactus/pull/1812))\n- **execution**: set batch transfer height ([#1811](https://github.com/pactus-project/pactus/pull/1811))\n- **util**: panic on importing snapshot ([#1807](https://github.com/pactus-project/pactus/pull/1807))\n- **sync**: drop messages with mismatched consensus height ([#1810](https://github.com/pactus-project/pactus/pull/1810))\n- **firewall**: remove decoding bundle for expired message ([#1682](https://github.com/pactus-project/pactus/pull/1682))\n- **util**: replace go-bip39 ([#1795](https://github.com/pactus-project/pactus/pull/1795))\n- **wallet**: set Argon2 derived bytes for AES IV ([#1703](https://github.com/pactus-project/pactus/pull/1703))\n- **consensus**: schedule timeout to retry querying for the proposal or votes ([#1698](https://github.com/pactus-project/pactus/pull/1698))\n- **util**: add manually copy to prevent invalid cross-device link ([#1684](https://github.com/pactus-project/pactus/pull/1684))\n\n### Refactor\n\n- **util**: use the built-in max/min to simplify the code ([#1819](https://github.com/pactus-project/pactus/pull/1819))\n- **other**: use slices.Contains to simplify code ([#1802](https://github.com/pactus-project/pactus/pull/1802))\n- **www**: rename Rest to HTTP-API ([#1774](https://github.com/pactus-project/pactus/pull/1774))\n- **grpc**: update buf.build ([#1716](https://github.com/pactus-project/pactus/pull/1716))\n\n## [1.7.0](https://github.com/pactus-project/pactus/compare/v1.6.0...v1.7.0) (2025-01-23)\n\n### Feat\n\n- **zeromq**: add ZMQ Publishers to NodeInfo API ([#1674](https://github.com/pactus-project/pactus/pull/1674))\n- **zeromq**: add publisher raw tx ([#1672](https://github.com/pactus-project/pactus/pull/1672))\n- **zeromq**: add publisher raw block ([#1670](https://github.com/pactus-project/pactus/pull/1670))\n- **zeromq**: add publisher transaction info ([#1669](https://github.com/pactus-project/pactus/pull/1669))\n- **zeromq**: add block info publisher ([#1666](https://github.com/pactus-project/pactus/pull/1666))\n- **grpc**: support Ed25519 message signing and verification ([#1667](https://github.com/pactus-project/pactus/pull/1667))\n- **other**: add zeromq server with configuration ([#1660](https://github.com/pactus-project/pactus/pull/1660))\n- **cmd**: read password from file ([#1653](https://github.com/pactus-project/pactus/pull/1653))\n- **network**: evaluate propagate policy for gossip messages ([#1647](https://github.com/pactus-project/pactus/pull/1647))\n- **config**: add firewall module to logger config ([#1637](https://github.com/pactus-project/pactus/pull/1637))\n\n### Fix\n\n- **gtk**: panic on windows 11 and mac ([#1650](https://github.com/pactus-project/pactus/pull/1650))\n- **consensus**: refactor strong termination for change-proposer phase ([#1643](https://github.com/pactus-project/pactus/pull/1643))\n- **network**: restore default message queue size in PubSub module ([#1642](https://github.com/pactus-project/pactus/pull/1642))\n- **consensus**: refactor strong termination for change-proposer phase ([#1641](https://github.com/pactus-project/pactus/pull/1641))\n- **grpc**: define address for the aggregated public key ([#1608](https://github.com/pactus-project/pactus/pull/1608))\n- **gtk**: last block height icon ([#1611](https://github.com/pactus-project/pactus/pull/1611))\n- **crypto, state**: resolve panic on 32-bit OSes ([#1604](https://github.com/pactus-project/pactus/pull/1604))\n- **cmd**: parse withdraw fee using transaction options ([#1602](https://github.com/pactus-project/pactus/pull/1602))\n\n## [1.6.0](https://github.com/pactus-project/pactus/compare/v1.5.0...v1.6.0) (2024-11-14)\n\n### Feat\n\n- **grpc**: add bls public key and signature aggregate methods ([#1587](https://github.com/pactus-project/pactus/pull/1587))\n- **wallet**: create single ed25519 reward address for all validators ([#1570](https://github.com/pactus-project/pactus/pull/1570))\n- **gtk**: add fee entry for transfer, bond and withdraw ([#1575](https://github.com/pactus-project/pactus/pull/1575))\n- **txpool**: add consumptional fee model ([#1572](https://github.com/pactus-project/pactus/pull/1572))\n- **txpool**: calculate consumption when committing a new block ([#1554](https://github.com/pactus-project/pactus/pull/1554))\n- **sync**: add metric to track the network activity ([#1552](https://github.com/pactus-project/pactus/pull/1552))\n- **wallet**: add wallet service API ([#1548](https://github.com/pactus-project/pactus/pull/1548))\n- **config**: add consumption fee configs ([#1547](https://github.com/pactus-project/pactus/pull/1547))\n\n### Fix\n\n- **config**: update TOML parser ([#1592](https://github.com/pactus-project/pactus/pull/1592))\n- **gtk**: prevent duplicate address on enter signal in create modal ([#1590](https://github.com/pactus-project/pactus/pull/1590))\n- **txpool, cmd, gtk**: broadcast transactions with zero fee ([#1589](https://github.com/pactus-project/pactus/pull/1589))\n- **consensus**: send decided vote for previous round on query vote ([#1567](https://github.com/pactus-project/pactus/pull/1567))\n- **grpc**: get tx pool content filter by payload type ([#1581](https://github.com/pactus-project/pactus/pull/1581))\n- **wallet, cmd**: add support for importing Ed25519 private keys ([#1584](https://github.com/pactus-project/pactus/pull/1584))\n- **gtk**: change transactions to transaction in tx link ([#1580](https://github.com/pactus-project/pactus/pull/1580))\n- **grpc**: set Bond public key for decoded transaction ([#1577](https://github.com/pactus-project/pactus/pull/1577))\n- **other**: add varnamelen linter to improve name convention ([#1568](https://github.com/pactus-project/pactus/pull/1568))\n- **grpc**: encode data and signature properly ([#1538](https://github.com/pactus-project/pactus/pull/1538))\n- **gtk**: change some text in GUI and pruned position ([#1536](https://github.com/pactus-project/pactus/pull/1536))\n\n### Refactor\n\n- **cmd**: get first account address from wallet as reward address ([#1594](https://github.com/pactus-project/pactus/pull/1594))\n- **grpc**: revert GetRawTransfer method and undo deprecation ([#1560](https://github.com/pactus-project/pactus/pull/1560))\n- **crypto**: define SerializeSize for PublicKey and Signature ([#1534](https://github.com/pactus-project/pactus/pull/1534))\n\n## [1.5.0](https://github.com/pactus-project/pactus/compare/v1.4.0...v1.5.0) (2024-10-08)\n\n### Feat\n\n- **cmd**: pactus-wallet add info commands ([#1496](https://github.com/pactus-project/pactus/pull/1496))\n- **state**: enable Ed25519 for the Testnet ([#1497](https://github.com/pactus-project/pactus/pull/1497))\n- **gtk**: support create Ed25519 in gtk ([#1489](https://github.com/pactus-project/pactus/pull/1489))\n- **grpc**: add Ed25519 to AddressType proto ([#1492](https://github.com/pactus-project/pactus/pull/1492))\n- **wallet**: upgrade wallet ([#1491](https://github.com/pactus-project/pactus/pull/1491))\n- **wallet**: supporting Ed25519 curve in wallet ([#1484](https://github.com/pactus-project/pactus/pull/1484))\n- **grpc**: add `Proposal` to `ConsensusInfo` API ([#1469](https://github.com/pactus-project/pactus/pull/1469))\n- **crypto**: supporting ed25519 ([#1481](https://github.com/pactus-project/pactus/pull/1481))\n- **gtk**: adding IsPrune to node widget ([#1470](https://github.com/pactus-project/pactus/pull/1470))\n- **daemon**: warn at pruning a prune node attempt ([#1471](https://github.com/pactus-project/pactus/pull/1471))\n- **genesis**: separating chain param from genesis param ([#1463](https://github.com/pactus-project/pactus/pull/1463))\n- **cmd**: pactus-shell support interactive shell ([#1460](https://github.com/pactus-project/pactus/pull/1460))\n\n### Fix\n\n- **gtk**: increase window width to show availability score ([#1529](https://github.com/pactus-project/pactus/pull/1529))\n- **state**: set hard-fork height for the mainnet ([#1528](https://github.com/pactus-project/pactus/pull/1528))\n- **wallet**: change to prompt password for masking ([#1527](https://github.com/pactus-project/pactus/pull/1527))\n- **deps**: go version docker image to build go v1.23.2 ([#1522](https://github.com/pactus-project/pactus/pull/1522))\n- **network**: close stream on timeout ([#1520](https://github.com/pactus-project/pactus/pull/1520))\n- **http**: add pprof link in http web interface ([#1518](https://github.com/pactus-project/pactus/pull/1518))\n- **sync**: close stream on read error ([#1519](https://github.com/pactus-project/pactus/pull/1519))\n- **sync**: set last support version to 1.5.0 ([#1517](https://github.com/pactus-project/pactus/pull/1517))\n- **http**: pprof in http server ([#1515](https://github.com/pactus-project/pactus/pull/1515))\n- **cmd**: add flag debug to enable pprof ([#1512](https://github.com/pactus-project/pactus/pull/1512))\n- **cmd**: add pprof as default in http server ([#1511](https://github.com/pactus-project/pactus/pull/1511))\n- **grpc**: merge raw transaction methods to one rpc method ([#1500](https://github.com/pactus-project/pactus/pull/1500))\n- **wallet, cmd**: adding ed25519_account in help and set as default ([#1485](https://github.com/pactus-project/pactus/pull/1485))\n- **wallet**: add memo in confirmation wallet CLI ([#1499](https://github.com/pactus-project/pactus/pull/1499))\n- **store**: cache Ed25519 Public Keys ([#1495](https://github.com/pactus-project/pactus/pull/1495))\n- **grpc**: adding pyi files for python generated files ([#1479](https://github.com/pactus-project/pactus/pull/1479))\n- **grpc**: change enum type to numeric for documentation ([#1474](https://github.com/pactus-project/pactus/pull/1474))\n- **shell**: stop showing usage on error ([#1467](https://github.com/pactus-project/pactus/pull/1467))\n- **util**: chunked download to improve download speed ([#1459](https://github.com/pactus-project/pactus/pull/1459))\n- **gtk**: width size of listbox and download button ([#1434](https://github.com/pactus-project/pactus/pull/1434))\n- **grpc**: add example json-rpc in generated doc ([#1461](https://github.com/pactus-project/pactus/pull/1461))\n- **grpc**: add basic check for grpc configuration to check basic auth ([#1455](https://github.com/pactus-project/pactus/pull/1455))\n- **util**: remove util.Now helper function ([#1442](https://github.com/pactus-project/pactus/pull/1442))\n\n### Refactor\n\n- **crypto**: replace bls12-381 kilic with gnark ([#1510](https://github.com/pactus-project/pactus/pull/1510))\n- **crypto**: define errors for crypto package ([#1507](https://github.com/pactus-project/pactus/pull/1507))\n- **sync**: define errors for sync package ([#1504](https://github.com/pactus-project/pactus/pull/1504))\n- **types**: define errors for vote package ([#1503](https://github.com/pactus-project/pactus/pull/1503))\n- **state**: define errors for state package ([#1457](https://github.com/pactus-project/pactus/pull/1457))\n- **util**: remove GenericError code ([#1454](https://github.com/pactus-project/pactus/pull/1454))\n- **types**: using options pattern for memo parameter on new tx functions ([#1443](https://github.com/pactus-project/pactus/pull/1443))\n\n## [1.4.0](https://github.com/pactus-project/pactus/compare/v1.3.0...v1.4.0) (2024-08-01)\n\n### Feat\n\n- **cmd**: add node type page to the startup assistant  ([#1431](https://github.com/pactus-project/pactus/pull/1431))\n- **grpc**: adding is-pruned and pruning-height to blockchain info API ([#1420](https://github.com/pactus-project/pactus/pull/1420))\n- **daemon**: add import command to download pruned snapshots ([#1424](https://github.com/pactus-project/pactus/pull/1424))\n- **util**: file downloader with verify sha256 hash ([#1422](https://github.com/pactus-project/pactus/pull/1422))\n- **sync**: define full and prune service ([#1412](https://github.com/pactus-project/pactus/pull/1412))\n- **pip**: implement PIP-23 ([#1397](https://github.com/pactus-project/pactus/pull/1397))\n- **firewall**: check valid gossip and stream messages ([#1402](https://github.com/pactus-project/pactus/pull/1402))\n- **state**: prune block on commit ([#1404](https://github.com/pactus-project/pactus/pull/1404))\n- **core**: pruning client by prune command ([#1400](https://github.com/pactus-project/pactus/pull/1400))\n- **store**: prune block function ([#1399](https://github.com/pactus-project/pactus/pull/1399))\n- **wallet**: add timeout client connection ([#1396](https://github.com/pactus-project/pactus/pull/1396))\n- add backup tool script ([#1373](https://github.com/pactus-project/pactus/pull/1373))\n\n### Fix\n\n- **consensus**: handle query for decided proposal ([#1438](https://github.com/pactus-project/pactus/pull/1438))\n- **gtk**: solve dynamic library dependencies and import path on macOS ([#1435](https://github.com/pactus-project/pactus/pull/1435))\n- **cmd**: prevent sudden crash on download error ([#1432](https://github.com/pactus-project/pactus/pull/1432))\n- **store**: pruning height returns zero when store is not in prune mode ([#1430](https://github.com/pactus-project/pactus/pull/1430))\n- **grpc**: add last-block-time to blockchain-info API ([#1428](https://github.com/pactus-project/pactus/pull/1428))\n- **grpc**: show negative pruning height when is pruned false ([#1429](https://github.com/pactus-project/pactus/pull/1429))\n- **sync**: fix syncing issue on prune mode ([#1415](https://github.com/pactus-project/pactus/pull/1415))\n- **grpc**: return error on invalid arguments for VerifyMessage ([#1411](https://github.com/pactus-project/pactus/pull/1411))\n- **network**: accept messages originating from self ([#1408](https://github.com/pactus-project/pactus/pull/1408))\n- change wallet rpc ip to dns address ([#1398](https://github.com/pactus-project/pactus/pull/1398))\n- **pactus-shell**: pactus shell support basic auth ([#1384](https://github.com/pactus-project/pactus/pull/1384))\n- **gui**: support ctrl+c for interrupt gui ([#1385](https://github.com/pactus-project/pactus/pull/1385))\n- **grpc**: add basic auth in swagger header ([#1383](https://github.com/pactus-project/pactus/pull/1383))\n\n### Refactor\n\n- **execution**: simplify executors and tests ([#1425](https://github.com/pactus-project/pactus/pull/1425))\n\n## [1.3.0](https://github.com/pactus-project/pactus/compare/v1.2.0...v1.3.0) (2024-06-27)\n\n### Feat\n\n- **grpc**: get txpool content API ([#1364](https://github.com/pactus-project/pactus/pull/1364))\n- **network**: permanent peer store ([#1354](https://github.com/pactus-project/pactus/pull/1354))\n\n### Fix\n\n- **grpc**: change bytes type to hex string ([#1371](https://github.com/pactus-project/pactus/pull/1371))\n- **http**: add basic auth middleware for http server ([#1372](https://github.com/pactus-project/pactus/pull/1372))\n- **network**: use goroutines for sending streams ([#1365](https://github.com/pactus-project/pactus/pull/1365))\n\n## [1.2.0](https://github.com/pactus-project/pactus/compare/v1.1.0...v1.2.0) (2024-06-20)\n\n### Feat\n\n- **config**: make minimum fee configurable ([#1349](https://github.com/pactus-project/pactus/pull/1349))\n- apply rate limit for the network topics ([#1332](https://github.com/pactus-project/pactus/pull/1332))\n- add ipblocker package ([#1323](https://github.com/pactus-project/pactus/pull/1323))\n- **consensus**: fast consensus path implementation ([#1253](https://github.com/pactus-project/pactus/pull/1253))\n- **version**: add alias to node version ([#1281](https://github.com/pactus-project/pactus/pull/1281))\n- **ntp**: add ntp util ([#1274](https://github.com/pactus-project/pactus/pull/1274))\n- **gRPC**: add connection info to node info ([#1273](https://github.com/pactus-project/pactus/pull/1273))\n- **gRPC**: add only_connected parameter to getNetworkInfo API ([#1264](https://github.com/pactus-project/pactus/pull/1264))\n- **grpc**: refactor CreateWallet and add RestoreWallet API endpoint ([#1256](https://github.com/pactus-project/pactus/pull/1256))\n- add wallet service ([#1241](https://github.com/pactus-project/pactus/pull/1241))\n- ban attacker validators ([#1235](https://github.com/pactus-project/pactus/pull/1235))\n- **txpool**: prevent spamming transactions by defining a minimum value ([#1233](https://github.com/pactus-project/pactus/pull/1233))\n- reject direct message from non-supporting agents ([#1225](https://github.com/pactus-project/pactus/pull/1225))\n\n### Fix\n\n- **wallet**: add public key on get new address ([#1350](https://github.com/pactus-project/pactus/pull/1350))\n- **sync**: add IsBannedAddress check in processing connect event ([#1347](https://github.com/pactus-project/pactus/pull/1347))\n- **sync**: update latest supporting version ([#1336](https://github.com/pactus-project/pactus/pull/1336))\n- **state**: improve node startup by optimizing availability score calculation ([#1338](https://github.com/pactus-project/pactus/pull/1338))\n- **HTTP**: add clock offset and connection info to node-info API ([#1334](https://github.com/pactus-project/pactus/pull/1334))\n- **grpc**: add stacktrace to locate panic ([#1333](https://github.com/pactus-project/pactus/pull/1333))\n- **consensus**: implement PIP-26 ([#1331](https://github.com/pactus-project/pactus/pull/1331))\n- **grpc**: improve grpc server and client ([#1330](https://github.com/pactus-project/pactus/pull/1330))\n- **util**: add more ntp pool ([#1328](https://github.com/pactus-project/pactus/pull/1328))\n- **jsonrpc**: update JSON-RPC Gateway to support headers and improve client registry ([#1327](https://github.com/pactus-project/pactus/pull/1327))\n- **consensus**: improve consensus alghorithm ([#1329](https://github.com/pactus-project/pactus/pull/1329))\n- **txpool**: set fix fee of 0.1 PAC for transactions ([#1320](https://github.com/pactus-project/pactus/pull/1320))\n- **network**: add block and transaction topics ([#1319](https://github.com/pactus-project/pactus/pull/1319))\n- **gRPC**: prevent concurrent map iteration and map write ([#1279](https://github.com/pactus-project/pactus/pull/1279))\n- **api**: add swagger schemes ([#1270](https://github.com/pactus-project/pactus/pull/1270))\n- **network**: set infinite limit for resource manager  ([#1261](https://github.com/pactus-project/pactus/pull/1261))\n- **sync**: introduce session manager ([#1257](https://github.com/pactus-project/pactus/pull/1257))\n- **HTTP**: using amount type for fee in transaction details ([#1255](https://github.com/pactus-project/pactus/pull/1255))\n- **network**: disconnect from peers that has no protocol ([#1243](https://github.com/pactus-project/pactus/pull/1243))\n- **wallet**: saving wallet file after generating new address in gRPC ([#1236](https://github.com/pactus-project/pactus/pull/1236))\n- prevent zero stake for bond transactions ([#1227](https://github.com/pactus-project/pactus/pull/1227))\n- set bounding interval for first boudning tx only ([#1224](https://github.com/pactus-project/pactus/pull/1224))\n\n### Refactor\n\n- **wallet**: set server address on loading wallet ([#1348](https://github.com/pactus-project/pactus/pull/1348))\n- removed deprecated LockWallet and UnLockWallet from WalletService ([#1343](https://github.com/pactus-project/pactus/pull/1343))\n- **crypto**: decode data to point on verification ([#1339](https://github.com/pactus-project/pactus/pull/1339))\n- **network**: define connection info in network proto ([#1297](https://github.com/pactus-project/pactus/pull/1297))\n- **sync**: define peer package ([#1271](https://github.com/pactus-project/pactus/pull/1271))\n- **network**: refactor peer manager and redefine the min cons ([#1259](https://github.com/pactus-project/pactus/pull/1259))\n\n## [1.1.0](https://github.com/pactus-project/pactus/compare/v1.0.0...v1.1.0) (2024-04-14)\n\n### Feat\n\n- **gRPC**: add get address history method ([#1206](https://github.com/pactus-project/pactus/pull/1206))\n- **grpc**: Add GetNewAddress/GetTotalBalance endpoint to gateway ([#1197](https://github.com/pactus-project/pactus/pull/1197))\n- **GUI**: adding total balance to wallet widget ([#1194](https://github.com/pactus-project/pactus/pull/1194))\n- Add GetNewAddress gRPC API ([#1193](https://github.com/pactus-project/pactus/pull/1193))\n- **gRPC**: add new API to get the total balance of wallet ([#1190](https://github.com/pactus-project/pactus/pull/1190))\n- **GUI**: showing transaction hash after broadcasting transaction ([#1187](https://github.com/pactus-project/pactus/pull/1187))\n- add jsonrpc gateway support ([#1183](https://github.com/pactus-project/pactus/pull/1183))\n- **config**: one reward address in config for all validators ([#1178](https://github.com/pactus-project/pactus/pull/1178))\n- **GUI**: memo field for transactions on GUI wallet ([#1182](https://github.com/pactus-project/pactus/pull/1182))\n- implement basic auth for pactus shell ([#1177](https://github.com/pactus-project/pactus/pull/1177))\n- **grpc**: add rust code gen for proto ([#1151](https://github.com/pactus-project/pactus/pull/1151))\n- **testnet**: define permanent Testent genesis ([#1173](https://github.com/pactus-project/pactus/pull/1173))\n- add basic auth authentication for securing grpc ([#1162](https://github.com/pactus-project/pactus/pull/1162))\n- **grpc**: calculate fee for create-raw-transaction APIs ([#1159](https://github.com/pactus-project/pactus/pull/1159))\n- **grpc**: add fixed-amount to calc-fee API ([#1146](https://github.com/pactus-project/pactus/pull/1146))\n- **wallet**: adding all account address functions ([#1128](https://github.com/pactus-project/pactus/pull/1128))\n- **grpc**: update swagger API to version 1.1 ([#1106](https://github.com/pactus-project/pactus/pull/1106))\n- **GUI**: adding availability score in wallet ([#1118](https://github.com/pactus-project/pactus/pull/1118))\n- **logger**: adding log target ([#1122](https://github.com/pactus-project/pactus/pull/1122))\n- **logger**: adding file_only option ([#1117](https://github.com/pactus-project/pactus/pull/1117))\n- **gui**: add connections and moniker fields to main windows ([#1090](https://github.com/pactus-project/pactus/pull/1090))\n- implementation for PIP-22 ([#1067](https://github.com/pactus-project/pactus/pull/1067))\n- generate documentation for proto files ([#1064](https://github.com/pactus-project/pactus/pull/1064))\n- pactus-ctl ([#946](https://github.com/pactus-project/pactus/pull/946))\n\n### Fix\n\n- **cmd**: ignore error on balance query ([#1220](https://github.com/pactus-project/pactus/pull/1220))\n- **gRPC**: add basic auth option in header ([#1217](https://github.com/pactus-project/pactus/pull/1217))\n- **gRPC**: not return block data on information verbosity ([#1212](https://github.com/pactus-project/pactus/pull/1212))\n- **wallet**: fix wallet conn issue ([#1211](https://github.com/pactus-project/pactus/pull/1211))\n- **GUI**: update total balance on wallet timeout ([#1204](https://github.com/pactus-project/pactus/pull/1204))\n- accept small bond to existing validator ([#1152](https://github.com/pactus-project/pactus/pull/1152))\n- **GUI**: make transaction hash selactable ([#1196](https://github.com/pactus-project/pactus/pull/1196))\n- close connections with peers that have no supported protocol ([#1181](https://github.com/pactus-project/pactus/pull/1181))\n- **sync**: check the start block request height ([#1176](https://github.com/pactus-project/pactus/pull/1176))\n- **config**: load logger levels in Mainnet config ([#1168](https://github.com/pactus-project/pactus/pull/1168))\n- **gRPC**: pactus swagger not found ([#1163](https://github.com/pactus-project/pactus/pull/1163))\n- add error type for invalid configs ([#1153](https://github.com/pactus-project/pactus/pull/1153))\n- save Mainnet config with inline comments ([#1143](https://github.com/pactus-project/pactus/pull/1143))\n- **network**: set deadline for streams ([#1149](https://github.com/pactus-project/pactus/pull/1149))\n- **grpc**: fix error 404 on grpc gateway ([#1144](https://github.com/pactus-project/pactus/pull/1144))\n- **wallet**: checking args in history add ([#1141](https://github.com/pactus-project/pactus/pull/1141))\n- **gRPC**: adding sign raw transaction API to gateway ([#1116](https://github.com/pactus-project/pactus/pull/1116))\n- **sync**: fix concurrent map read-write crash ([#1112](https://github.com/pactus-project/pactus/pull/1112))\n- **network**: remove disconnected peers from peerMgr ([#1110](https://github.com/pactus-project/pactus/pull/1110))\n- **network**: set dial and accept limit in connection gater ([#1089](https://github.com/pactus-project/pactus/pull/1089))\n- stderr logger in windows os ([#1081](https://github.com/pactus-project/pactus/pull/1081))\n- **sync**: improve syncing process ([#1087](https://github.com/pactus-project/pactus/pull/1087))\n- **network**: redefine resource limits ([#1086](https://github.com/pactus-project/pactus/pull/1086))\n\n### Refactor\n\n- **sync**: improve syncing process ([#1207](https://github.com/pactus-project/pactus/pull/1207))\n- move fee calculation logic to execution package  ([#1195](https://github.com/pactus-project/pactus/pull/1195))\n- introduce Amount data type for converting PAC units ([#1174](https://github.com/pactus-project/pactus/pull/1174))\n- using PAC instead of atomic units for external input/outputs ([#1161](https://github.com/pactus-project/pactus/pull/1161))\n- change func() to cancel func type ([#1142](https://github.com/pactus-project/pactus/pull/1142))\n\n## [1.0.0](https://github.com/pactus-project/pactus/compare/v0.20.0...v1.0.0) (2024-01-31)\n\n### Feat\n\n- implement get validator address for grpc ([#975](https://github.com/pactus-project/pactus/pull/975))\n- add bootstrap.json and load in config on build ([#964](https://github.com/pactus-project/pactus/pull/964))\n- add mainnet config and genesis files ([#951](https://github.com/pactus-project/pactus/pull/951))\n- add Consensus-address to network info ([#952](https://github.com/pactus-project/pactus/pull/952))\n- **grpc**: sign transaction using wallet client ([#945](https://github.com/pactus-project/pactus/pull/945))\n- pactus gui lock support ([#947](https://github.com/pactus-project/pactus/pull/947))\n- **consensus**: turning consensus to a zero-config module ([#942](https://github.com/pactus-project/pactus/pull/942))\n\n### Fix\n\n- localnet wallet issue ([#970](https://github.com/pactus-project/pactus/pull/970))\n- **sync**: remove ReachabilityStatus from agent info ([#956](https://github.com/pactus-project/pactus/pull/956))\n- **daemon**: keeping previous behavior for password flag, linting CLI messages ([#950](https://github.com/pactus-project/pactus/pull/950))\n- **consensus**: detect if the system time is behind the network ([#939](https://github.com/pactus-project/pactus/pull/939))\n\n## [0.20.0](https://github.com/pactus-project/pactus/compare/v0.19.0...v0.20.0) (2024-01-11)\n\n### Feat\n\n- implement relay service ([#931](https://github.com/pactus-project/pactus/pull/931))\n- **HTTP**: Integrate AddRowDouble and update tests ([#926](https://github.com/pactus-project/pactus/pull/926))\n- **network**: making listen address private in config ([#921](https://github.com/pactus-project/pactus/pull/921))\n- **http**: adding AvailabilityScore to http module ([#917](https://github.com/pactus-project/pactus/pull/917))\n- **network**: adding 'enable_udp' config ([#918](https://github.com/pactus-project/pactus/pull/918))\n- **network**: removing gossip node service ([#916](https://github.com/pactus-project/pactus/pull/916))\n- **gRPC**: adding AvailabilityScore to gRPC ([#910](https://github.com/pactus-project/pactus/pull/910))\n- **GUI**: unbond and withdraw transaction dialogs ([#908](https://github.com/pactus-project/pactus/pull/908))\n\n### Fix\n\n- **gRPC**: adding missing get raw transaction APIs to gRPC gateway ([#925](https://github.com/pactus-project/pactus/pull/925))\n- **network**: preventing self dial ([#924](https://github.com/pactus-project/pactus/pull/924))\n- fixing time lag on starting node ([#923](https://github.com/pactus-project/pactus/pull/923))\n- **network**: fixing network deadlock on linux arm64 ([#922](https://github.com/pactus-project/pactus/pull/922))\n- **GUI**: updating unbond and withdraw dialogs ([#911](https://github.com/pactus-project/pactus/pull/911))\n- fixing gRPC node info issue ([#906](https://github.com/pactus-project/pactus/pull/906))\n\n## [0.19.0](https://github.com/pactus-project/pactus/compare/v0.18.0...v0.19.0) (2024-01-04)\n\n### Feat\n\n- **gRPC**: defining network and peers info response's properly ([#898](https://github.com/pactus-project/pactus/pull/898))\n- implementing pip-19 ([#899](https://github.com/pactus-project/pactus/pull/899))\n- **network**: disabling GosipSub, only FloodSub ([#895](https://github.com/pactus-project/pactus/pull/895))\n- **www**: adding change proposer round and value to consensus info votes ([#892](https://github.com/pactus-project/pactus/pull/892))\n- **network**: adding relay service to dial relay nodes ([#887](https://github.com/pactus-project/pactus/pull/887))\n- implementing pip-15 ([#843](https://github.com/pactus-project/pactus/pull/843))\n- check already running by lock file ([#871](https://github.com/pactus-project/pactus/pull/871))\n\n### Fix\n\n- **store**: use cache to check if public key exists ([#902](https://github.com/pactus-project/pactus/pull/902))\n- **executor**: not rejecting bond transaction for bootstrap validator ([#901](https://github.com/pactus-project/pactus/pull/901))\n- **GUI**: removing unnecessary tags in transaction confirm dialog ([#893](https://github.com/pactus-project/pactus/pull/893))\n- **network**: close relay connection for public node ([#891](https://github.com/pactus-project/pactus/pull/891))\n- **network**: refining GossipSubParams for Gossiper node ([#882](https://github.com/pactus-project/pactus/pull/882))\n- **sync**: adding sequence number to the bundle ([#881](https://github.com/pactus-project/pactus/pull/881))\n- **network**: turn off mesh for gossiper node ([#880](https://github.com/pactus-project/pactus/pull/880))\n- **consensus**: check voteset for CP strong termination ([#879](https://github.com/pactus-project/pactus/pull/879))\n- adding querier to query messages ([#878](https://github.com/pactus-project/pactus/pull/878))\n- **execution**: fixing issue #869 ([#870](https://github.com/pactus-project/pactus/pull/870))\n- fixing logger issue on rotating log file ([#859](https://github.com/pactus-project/pactus/pull/859))\n\n## [0.18.0](https://github.com/pactus-project/pactus/compare/v0.17.0...v0.18.0) (2023-12-11)\n\n### Feat\n\n- implement pip-14 ([#841](https://github.com/pactus-project/pactus/pull/841))\n- sort wallet addresses ([#836](https://github.com/pactus-project/pactus/pull/836))\n- **grpc**: endpoints for creating raw transaction ([#838](https://github.com/pactus-project/pactus/pull/838))\n- network reachability API ([#834](https://github.com/pactus-project/pactus/pull/834))\n- implement pip-13 ([#835](https://github.com/pactus-project/pactus/pull/835))\n- subscribing to libp2p eventbus ([#831](https://github.com/pactus-project/pactus/pull/831))\n- implement helper methods for wallet address path ([#830](https://github.com/pactus-project/pactus/pull/830))\n- **logger**: adding rotate log file after days, compress and max backups for logger config ([#822](https://github.com/pactus-project/pactus/pull/822))\n- enable bandwidth router metric ([#819](https://github.com/pactus-project/pactus/pull/819))\n\n### Fix\n\n- **network**: refining the connection limit ([#849](https://github.com/pactus-project/pactus/pull/849))\n- corrected mistake when retrieving the reward address ([#848](https://github.com/pactus-project/pactus/pull/848))\n- **config**: restore default config when it is deleted ([#847](https://github.com/pactus-project/pactus/pull/847))\n- **cmd**: changing home directory for root users ([#846](https://github.com/pactus-project/pactus/pull/846))\n- removing BasicCheck for hash ([#845](https://github.com/pactus-project/pactus/pull/845))\n- disabling libp2p ping protocol ([#844](https://github.com/pactus-project/pactus/pull/844))\n- build docker file ([#839](https://github.com/pactus-project/pactus/pull/839))\n- **sync**: ignore publishing a block if it is received before ([#829](https://github.com/pactus-project/pactus/pull/829))\n- **network**: subscribing to the Libp2p event bus ([#828](https://github.com/pactus-project/pactus/pull/828))\n- **sync**: ignore block request if blocks are already inside the cache ([#817](https://github.com/pactus-project/pactus/pull/817))\n\n## [0.17.0](https://github.com/pactus-project/pactus/compare/v0.16.0...v0.17.0) (2023-11-12)\n\n### Feat\n\n- **network**: default configs for bootstrap and relay peers ([#812](https://github.com/pactus-project/pactus/pull/812))\n- introducing node gossip type ([#811](https://github.com/pactus-project/pactus/pull/811))\n- **sync**: adding remote address to the peer info ([#804](https://github.com/pactus-project/pactus/pull/804))\n- **network**: adding public address to factory ([#795](https://github.com/pactus-project/pactus/pull/795))\n- **network**: filter private ips ([#793](https://github.com/pactus-project/pactus/pull/793))\n\n### Fix\n\n- upgrading Testnet ([#814](https://github.com/pactus-project/pactus/pull/814))\n- **sync**: prevent opening sessions indefinitely ([#813](https://github.com/pactus-project/pactus/pull/813))\n- **execution**: fixing mistake on calculating unbonded power ([#806](https://github.com/pactus-project/pactus/pull/806))\n- **network**: check connection threshold on gater ([#803](https://github.com/pactus-project/pactus/pull/803))\n- **network**: no transient connection ([#799](https://github.com/pactus-project/pactus/pull/799))\n- not close connection for bootstrap nodes ([#792](https://github.com/pactus-project/pactus/pull/792))\n\n### Refactor\n\n- **sync**: refactoring sync process ([#807](https://github.com/pactus-project/pactus/pull/807))\n\n## [0.16.0](https://github.com/pactus-project/pactus/compare/v0.15.0...v0.16.0) (2023-10-29)\n\n### Feat\n\n- **gui**: display network ID ([#780](https://github.com/pactus-project/pactus/pull/780))\n- create new validator address (CLI and GUI) ([#757](https://github.com/pactus-project/pactus/pull/757))\n- add community bootstrap nodes to testnet config ([#764](https://github.com/pactus-project/pactus/pull/764))\n- **network**: implementing connection manager ([#773](https://github.com/pactus-project/pactus/pull/773))\n- **network**: adding bootstrapper mode to the network config ([#760](https://github.com/pactus-project/pactus/pull/760))\n\n### Fix\n\n- **network**: redefine the network limits ([#788](https://github.com/pactus-project/pactus/pull/788))\n- **consensus**: not increase the vote-box power on duplicated votes ([#785](https://github.com/pactus-project/pactus/pull/785))\n- **network**: close connection when unbale to get supported protocols ([#781](https://github.com/pactus-project/pactus/pull/781))\n- **network**: enabling peer exchange for bootstrappers ([#779](https://github.com/pactus-project/pactus/pull/779))\n- **network**: set connection limit for the resource manager ([#775](https://github.com/pactus-project/pactus/pull/775))\n- **sync**: peer status set to known on sucessfull handshaking ([#774](https://github.com/pactus-project/pactus/pull/774))\n- **consensus**: strong termination for the binary agreement ([#765](https://github.com/pactus-project/pactus/pull/765))\n- **consensus**: not increase the voting power on duplicated binary votes ([#762](https://github.com/pactus-project/pactus/pull/762))\n\n### Refactor\n\n- **network**: refactoring peer manager ([#787](https://github.com/pactus-project/pactus/pull/787))\n\n## [0.15.0](https://github.com/pactus-project/pactus/compare/v0.13.0...v0.15.0) (2023-10-15)\n\n### Feat\n\n- **gui**: adding the splash screen ([#743](https://github.com/pactus-project/pactus/pull/743))\n- add absentees votes to the certificate ([#746](https://github.com/pactus-project/pactus/pull/746))\n- **logger**: short stringer for loggers ([#732](https://github.com/pactus-project/pactus/pull/732))\n- implementing pip-7 ([#731](https://github.com/pactus-project/pactus/pull/731))\n- implementing pip-11 ([#712](https://github.com/pactus-project/pactus/pull/712))\n- implementing pip-8 ([#711](https://github.com/pactus-project/pactus/pull/711))\n- implementing pip-9 ([#706](https://github.com/pactus-project/pactus/pull/706))\n- new API to get Public key by address ([#704](https://github.com/pactus-project/pactus/pull/704))\n- Adding address field for AccountInfo ([#703](https://github.com/pactus-project/pactus/pull/703))\n- CreateValidatorEvent and CreateAccountEvent for nanomsg ([#702](https://github.com/pactus-project/pactus/pull/702))\n- implementing PIP-2 and PIP-3 ([#699](https://github.com/pactus-project/pactus/pull/699))\n- Adding Hole Punching to network ([#697](https://github.com/pactus-project/pactus/pull/697))\n- write logs into file ([#673](https://github.com/pactus-project/pactus/pull/673))\n- check protocol support before sending connect/disconnect event ([#683](https://github.com/pactus-project/pactus/pull/683))\n- updating genesis for pre-testnet-2 ([#679](https://github.com/pactus-project/pactus/pull/679))\n- adding udp protocol for network ([#672](https://github.com/pactus-project/pactus/pull/672))\n- implementing pip-4 ([#671](https://github.com/pactus-project/pactus/pull/671))\n- Notifee service events ([#628](https://github.com/pactus-project/pactus/pull/628))\n- adding MinimumStake parameter ([#574](https://github.com/pactus-project/pactus/pull/574))\n- adding Sent and Received bytes per message metrics for peers ([#618](https://github.com/pactus-project/pactus/pull/618))\n- add reason to BlockResponse messages ([#607](https://github.com/pactus-project/pactus/pull/607))\n- Add CalcualteFee in GRPC ([#601](https://github.com/pactus-project/pactus/pull/601))\n- add sent bytes and received bytes metrics to peerset plus update grpc ([#606](https://github.com/pactus-project/pactus/pull/606))\n- added metrics of libp2p with supporting prometheus ([#588](https://github.com/pactus-project/pactus/pull/588))\n- Check node address is valid ([#565](https://github.com/pactus-project/pactus/pull/565))\n- add LastSent and LastReceived properties to peer ([#569](https://github.com/pactus-project/pactus/pull/569))\n\n### Fix\n\n- data race issue on updating certificate ([#747](https://github.com/pactus-project/pactus/pull/747))\n- **network**: async connection ([#744](https://github.com/pactus-project/pactus/pull/744))\n- adding query vote timer for CP phase ([#738](https://github.com/pactus-project/pactus/pull/738))\n- trim transactions in proposed block ([#737](https://github.com/pactus-project/pactus/pull/737))\n- fixing query votes and proposal issue ([#736](https://github.com/pactus-project/pactus/pull/736))\n- fixing issue when a block has max transactions ([#735](https://github.com/pactus-project/pactus/pull/735))\n- **consensus**: anti-entroy mechanism for the consensus ([#734](https://github.com/pactus-project/pactus/pull/734))\n- **logger**: invalid level parsing error ([#733](https://github.com/pactus-project/pactus/pull/733))\n- cache certificate by height ([#730](https://github.com/pactus-project/pactus/pull/730))\n- fixing a crash on consensus ([#729](https://github.com/pactus-project/pactus/pull/729))\n- **consensus**: prevent double entry in new height ([#728](https://github.com/pactus-project/pactus/pull/728))\n- resolve consensus halt caused by time discrepancy in network. ([#727](https://github.com/pactus-project/pactus/pull/727))\n- unsorted addresses in wallet listing ([#721](https://github.com/pactus-project/pactus/pull/721))\n- send query votes message, if there is no proposal yet ([#723](https://github.com/pactus-project/pactus/pull/723))\n- fixing logger level issue ([#722](https://github.com/pactus-project/pactus/pull/722))\n- fixing syncing stuck issue ([#720](https://github.com/pactus-project/pactus/pull/720))\n- fixing some minor issues on pre-testnet ([#719](https://github.com/pactus-project/pactus/pull/719))\n- supporting go version 1.21 and higher ([#692](https://github.com/pactus-project/pactus/pull/692))\n- ensure log rotation using tests ([#693](https://github.com/pactus-project/pactus/pull/693))\n- restoring at the first block ([#691](https://github.com/pactus-project/pactus/pull/691))\n- swagger doesn't work with multiple proto files ([#687](https://github.com/pactus-project/pactus/pull/687))\n- fixing wallet-cli issues ([#686](https://github.com/pactus-project/pactus/pull/686))\n- prevent stripping public key for subsidy transactions ([#678](https://github.com/pactus-project/pactus/pull/678))\n- updating the consensus protocol ([#668](https://github.com/pactus-project/pactus/pull/668))\n- aggregating signature for hello message ([#640](https://github.com/pactus-project/pactus/pull/640))\n- error case for logger ([#634](https://github.com/pactus-project/pactus/pull/634))\n- adding committers to the certificate ([#623](https://github.com/pactus-project/pactus/pull/623))\n- updating sortition executor ([#608](https://github.com/pactus-project/pactus/pull/608))\n- update buf and fixing proto generation issue   ([#600](https://github.com/pactus-project/pactus/pull/600))\n- adding block hash to peer ([#584](https://github.com/pactus-project/pactus/pull/584))\n- copy to clipboard option for address and pubkey ([#583](https://github.com/pactus-project/pactus/pull/583))\n- public key aggregate ([#576](https://github.com/pactus-project/pactus/pull/576))\n- remove GetValidators rpc method ([#573](https://github.com/pactus-project/pactus/pull/573))\n- missing swagger ui for grpc get account by number ([#564](https://github.com/pactus-project/pactus/pull/564))\n- incorrect handler for validator by number ([#563](https://github.com/pactus-project/pactus/pull/563))\n\n### Refactor\n\n- **sync**: refactoring syncing process ([#676](https://github.com/pactus-project/pactus/pull/676))\n- remove payload prefix from payload transaction type ([#669](https://github.com/pactus-project/pactus/pull/669))\n- change Hello message from broadcasting to direct messaging ([#665](https://github.com/pactus-project/pactus/pull/665))\n- **committee**: using generic list for validators ([#667](https://github.com/pactus-project/pactus/pull/667))\n- rename SanityCheck to BasicCheck ([#643](https://github.com/pactus-project/pactus/pull/643))\n- **cli**: Migrating from mow.cli to cobra for wallet ([#629](https://github.com/pactus-project/pactus/pull/629))\n- **cli**: replacing mow.cli with cobra for daemon ([#621](https://github.com/pactus-project/pactus/pull/621))\n- **logger**: using fast JSON logger (zerolog) ([#613](https://github.com/pactus-project/pactus/pull/613))\n- Using Generics for calculating Min and Max for numeric type #604 ([#609](https://github.com/pactus-project/pactus/pull/609))\n- Updating LRU cache to version 2 #514 ([#602](https://github.com/pactus-project/pactus/pull/602))\n\n## [0.13.0](https://github.com/pactus-project/pactus/compare/v0.12.0...v0.13.0) (2023-06-30)\n\n### Fix\n\n- implemented restore wallet base on input seed ([#553](https://github.com/pactus-project/pactus/pull/553))\n- measuring total sent and received bytes ([#552](https://github.com/pactus-project/pactus/pull/552))\n- add validate seed and restore wallet ([#533](https://github.com/pactus-project/pactus/pull/533))\n- **HTTP**: Missing handlers ([#549](https://github.com/pactus-project/pactus/pull/549))\n- **gui**: update about dialog and menu items in help ([#532](https://github.com/pactus-project/pactus/pull/532))\n\n### Refactor\n\n- implementing TestSuite ([#535](https://github.com/pactus-project/pactus/pull/535))\n\n## [0.12.0](https://github.com/pactus-project/pactus/compare/v0.11.0...v0.12.0) (2023-06-19)\n\n### Feat\n\n- add GetAccountByNumber API to get account by number ([#511](https://github.com/pactus-project/pactus/pull/511))\n\n### Fix\n\n- caching account and validator in store ([#513](https://github.com/pactus-project/pactus/pull/513))\n- get recent blocks by stamp ([#509](https://github.com/pactus-project/pactus/pull/509))\n- closing the mDNS connection upon stopping the network ([#508](https://github.com/pactus-project/pactus/pull/508))\n- updating linkedmap to use generic ([#507](https://github.com/pactus-project/pactus/pull/507))\n- removing state from cache ([#506](https://github.com/pactus-project/pactus/pull/506))\n- Typo in GUI ([#499](https://github.com/pactus-project/pactus/pull/499))\n- supporting localnet ([#492](https://github.com/pactus-project/pactus/pull/492))\n\n### Refactor\n\n- update total power calculation based on power change(deltas) ([#518](https://github.com/pactus-project/pactus/pull/518))\n- GetValidators return all validators in state validators map ([#512](https://github.com/pactus-project/pactus/pull/512))\n\n## [0.11.0](https://github.com/pactus-project/pactus/compare/v0.10.0...v0.11.0) (2023-05-29)\n\n### Fix\n\n- **gui**: showing the total number of validators ([#474](https://github.com/pactus-project/pactus/pull/474))\n- **network**: fixing relay connection issue ([#475](https://github.com/pactus-project/pactus/pull/475))\n- **consensus**: rejecting vote with round numbers exceeding the limit ([#466](https://github.com/pactus-project/pactus/pull/466))\n- increase failed counter when stream got error ([#489](https://github.com/pactus-project/pactus/pull/489))\n- boosting syncing process ([#482](https://github.com/pactus-project/pactus/pull/482))\n- waiting for proposal in pre-commit phase ([#486](https://github.com/pactus-project/pactus/pull/486))\n- retrieving public key from wallet for bond transactions ([#485](https://github.com/pactus-project/pactus/pull/485))\n- restoring config file to the default ([#484](https://github.com/pactus-project/pactus/pull/484))\n- defining ChainType in genesis to detect the type of network ([#483](https://github.com/pactus-project/pactus/pull/483))\n- reducing the default Argon2d to consume less memory ([#480](https://github.com/pactus-project/pactus/pull/480))\n- adding password option to the start commands ([#473](https://github.com/pactus-project/pactus/pull/473))\n\n### Refactor\n\n- rename send to transfer. ([#469](https://github.com/pactus-project/pactus/pull/469))\n\n## [0.10.0](https://github.com/pactus-project/pactus/compare/v0.9.0...v0.10.0) (2023-05-09)\n\n### Feat\n\n- removing address from account ([#454](https://github.com/pactus-project/pactus/pull/454))\n- supporting multiple consensus instances ([#450](https://github.com/pactus-project/pactus/pull/450))\n- adding sortition interval to the parameters ([#442](https://github.com/pactus-project/pactus/pull/442))\n\n### Fix\n\n- `GetBlockchainInfo` API in gRPC now returns the total number of validators and accounts\n- **gui**: check if the node has an active consensus instance ([#458](https://github.com/pactus-project/pactus/pull/458))\n- wallet path as argument ([#455](https://github.com/pactus-project/pactus/pull/455))\n- adding reward addresses to config ([#453](https://github.com/pactus-project/pactus/pull/453))\n- removing committers from the certificate hash ([#444](https://github.com/pactus-project/pactus/pull/444))\n- prevent data race conditions in committee  ([#452](https://github.com/pactus-project/pactus/pull/452))\n- using 2^256 for the vrf denominator ([#445](https://github.com/pactus-project/pactus/pull/445))\n- updating tla+ readme ([#443](https://github.com/pactus-project/pactus/pull/443))\n\n## 0.9.0 (2022-09-05)\n\nNo changelog\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nThank you for considering contributing to the Pactus blockchain!\nPlease read these guidelines before submitting a pull request or opening an issue.\n\n## Code Guidelines\n\nWe strive to maintain clean, readable, and maintainable code in the Pactus blockchain.\nPlease follow these guidelines when contributing to the project:\n\n- Follow the [Effective Go](https://golang.org/doc/effective_go.html) guidelines.\n- Follow the [Go Doc Comments](https://go.dev/doc/comment) guidelines.\n- Follow the principles of clean code as outlined in\n  Robert C. Martin's \"[Clean Code](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)\" book.\n- Write tests for new code or changes to existing code, and make sure all tests pass before submitting a pull request.\n\n### Makefile Targets\n\nYou can use these commands in the Makefile:\n\n- `make build` compiles the code into executable binaries.\n- `make build_gui` compiles the gtk GUI code into executable binary.\n- `make devtools` installs required development tools.\n- `make fmt` formats the code according to the Go standards.\n- `make check` runs checks on the code, including formatting and linting.\n- `make test` runs all the tests, including unit tests and system tests.\n- `make unit_test` runs only unit tests.\n- `make proto` generates gRPC code from [Protobuf](https://protobuf.dev/) files.\n- `make proto-check` validates Protobuf files against best practices.\n- `make proto-format` formats Protobuf files.\n\n### GUI Development\n\nDevelopment of the Pactus Core GUI have some requirements on your machine which you can find a [quick guide about it here](./docs/gtk-gui-development.md).\n\n### Error and Log Messages\n\nError and log messages should not start with a capital letter (unless it's a proper noun or acronym) and\nshould not end with punctuation.\n\nAll changes on core must contain proper and well-defined unit-tests, also previous tests must be passed as well.\nThis codebase used `testify` for unit tests, make sure you follow these guide for tests:\n\n- For panic cases make sure you use `assert.Panics`\n- For checking err using `assert.ErrorIs` make sure you pass expected error as second argument.\n- For checking equality using `assert.Equal` make sure you pass expected value as the first argument.\n\n\n> This code guideline must be followed for both contributors and maintainers to review the PRs.\n\n#### Examples\n\n- Correct ✅: \"unable to connect to server\"\n- Incorrect ❌: \"Unable to connect to server\"\n- Incorrect ❌: \"unable to connect to server.\"\n\n### Help Messages\n\nFollow these rules for help messages for CLI commands and flags:\n\n- Help string should not start with a capital letter.\n- Help string should not end with punctuation.\n- Don't include default value in the help string.\n- Include the acceptable range for the flags that accept a range of values.\n\n## Commit Guidelines\n\nPlease follow these rules when committing changes to the Pactus blockchain:\n\n- Each commit should represent a single, atomic change to the codebase.\n  Avoid making multiple unrelated changes in a single commit.\n- Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format for commit messages and\n  Pull Request titles.\n\n### Commit type\n\nList of conventional commit [types](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):\n\n| Types    | Description                                                                       |\n| -------- | --------------------------------------------------------------------------------- |\n| fix      | A big fix                                                                         |\n| feat     | A new feature                                                                     |\n| docs     | Documentation only changes                                                        |\n| test     | Adding missing tests or correcting existing tests                                 |\n| build    | Changes that affect the build system or external dependencies                     |\n| ci       | Changes to our CI configuration files and scripts                                 |\n| perf     | A code change that improves performance                                           |\n| refactor | A code change that neither fixes a bug nor adds a feature                         |\n| style    | Changes that do not affect the meaning of the code (white-space, formatting, etc) |\n| chore    | Other changes that don't modify src or test files                                 |\n\n### Commit Scope\n\nThe scope helps specify which part of the code is affected by your commit.\nIt must be included in the commit message to provide clarity.\nMultiple scopes can be used if the changes impact several areas.\n\nHere’s a list of available scopes: [available scopes](./.github/workflows/semantic-pr.yml).\n\n### Commit Description\n\n- Keep the commit message under 50 characters.\n- Start the commit message with a lowercase letter and do not end with punctuation.\n- Write commit messages in the imperative: \"fix bug\" not \"fixed bug\" or \"fixes bug\".\n\n### Examples\n\n  - Correct ✅: \"feat(grpc): sign transaction using wallet client\"\n  - Correct ✅: \"feat(grpc, wallet): sign transaction using wallet client\"\n  - Incorrect ❌: \"feat(gRPC): Sign transaction using wallet client.\"\n  - Incorrect ❌: \"feat(grpc): Sign transaction using wallet client.\"\n  - Incorrect ❌: \"feat(grpc): signed transaction using wallet client\"\n  - Incorrect ❌: \"sign transaction using wallet client\"\n\n## Code of Conduct\n\nThis project has adapted the\n[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)\nto ensure that our community is welcoming and inclusive for all.\nPlease read it before contributing to the project.\n\n---\n\nThank you for your contributions to the Pactus blockchain!\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM golang:1.26.2-alpine3.23 AS builder\n\nRUN apk add --no-cache git gmp-dev build-base g++ openssl-dev\nADD . /pactus\n\n# Building pactus-daemon\nRUN cd /pactus && \\\n    CGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \\\n    CGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ./build/pactus-wallet ./cmd/wallet && \\\n    CGO_ENABLED=0 go build -ldflags \"-s -w\" -trimpath -o ./build/pactus-shell ./cmd/shell\n\n## Copy binary files from builder into second container\nFROM alpine:3.23\n\nCOPY --from=builder /pactus/build/pactus-daemon /usr/bin\nCOPY --from=builder /pactus/build/pactus-wallet /usr/bin\nCOPY --from=builder /pactus/build/pactus-shell /usr/bin\n\nENV WORKING_DIR=\"/pactus\"\n\nVOLUME $WORKING_DIR\nWORKDIR $WORKING_DIR\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Pactus blockchain\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "PACKAGES=$(shell go list ./... | grep -v 'tests' | grep -v 'grpc/gen')\n\nifneq (,$(filter $(OS),Windows_NT MINGW64))\nEXE = .exe\nendif\n\n# Handle sed differences between macOS and Linux\nifeq ($(shell uname),Darwin)\n  SED_CMD = sed -i ''\nelse\n  SED_CMD = sed -i\nendif\n\nall: build test\n\n########################################\n### Tools needed for development\ndevtools:\n\t@echo \"Installing devtools\"\n\tgo install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4\n\tgo install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.28.0\n\tgo install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.28.0\n\tgo install github.com/NathanBaulch/protoc-gen-cobra@v1.2.1\n\tgo install github.com/pactus-project/protoc-gen-doc/cmd/protoc-gen-doc@v0.0.0-20260124125944-b6e7c1776266\n\tgo install github.com/bufbuild/buf/cmd/buf@v1.67.0\n\tgo install mvdan.cc/gofumpt@latest\n\tgo install github.com/pacviewer/jrpc-gateway/protoc-gen-jrpc-gateway@v0.6\n\tgo install go.uber.org/mock/mockgen@latest\n\n########################################\n### Building\nbuild:\n\tgo build -o ./build/pactus-daemon$(EXE) ./cmd/daemon\n\tgo build -o ./build/pactus-wallet$(EXE) ./cmd/wallet\n\tgo build -o ./build/pactus-shell$(EXE)  ./cmd/shell\n\nbuild_race:\n\tgo build -race -o ./build/pactus-daemon$(EXE) ./cmd/daemon\n\tgo build -race -o ./build/pactus-wallet$(EXE) ./cmd/wallet\n\nbuild_gui:\n\tgo build -tags gtk -o ./build/pactus-gui$(EXE) ./cmd/gtk\n\n########################################\n### Testing\nmocks:\n\t@echo \"Generating mocks...\"\n\tmockgen -source=txpool/interface.go -destination=txpool/txpool_mock.go -package=txpool\n\tmockgen -source=wallet/manager/interface.go -destination=wallet/manager/manager_mock.go -package=manager\n\tmockgen -source=wallet/provider/interface.go -destination=wallet/provider/provider_mock.go -package=provider\n\tmockgen -source=wallet/storage/interface.go -destination=wallet/storage/storage_mock.go -package=storage\n\nunit_test:\n\t@go test $(PACKAGES)\n\ntest:\n\t@go test ./... -covermode=atomic\n\ntest_race:\n\t@go test ./... --race\n\n########################################\n### Docker\ndocker:\n\tdocker build --tag pactus .\n\n########################################\n### proto\n\n# This target works only on Unix-like terminals.\nproto:\n\trm -rf www/grpc/gen\n\tcd www/grpc && buf generate --template ./buf/buf.gen.yaml --config ./buf/buf.yaml ./proto\n\nproto-check:\n\tcd www/grpc && buf lint --config ./buf/buf.yaml\n\nproto-format:\n\tcd www/grpc && buf format --config ./buf/buf.yaml -w\n\n\n########################################\n### Formatting the code\nfmt:\n\tgofumpt -l -w .\n\ncheck:\n\tgolangci-lint run --build-tags \"${BUILD_TAG}\" --timeout=20m0s\n\n# To avoid unintended conflicts with file names, always add to .PHONY\n# unless there is a reason not to.\n# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html\n.PHONY: build build_gui\n.PHONY: test unit_test test_race mocks\n.PHONY: proto proto-format proto-check\n.PHONY: devtools fmt check docker\n"
  },
  {
    "path": "README.md",
    "content": "[![codecov](https://codecov.io/gh/pactus-project/pactus/branch/main/graph/badge.svg?token=8N6N60D5UI)](https://codecov.io/gh/pactus-project/pactus)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pactus-project/pactus)](https://goreportcard.com/report/github.com/pactus-project/pactus)\n[![Twitter(X)](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://x.com/PactusChain)\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/H5vZkNnXCu)\n\n------\n\n# Pactus Blockchain\n\nA full-node implementation of the Pactus blockchain in Go.\n\n## Install\n\nPlease check the [install](./docs/install.md) document to build and run the Pactus blockchain.\n\n## Contribution\n\nContributions to the Pactus blockchain are appreciated.\nPlease read the [CONTRIBUTING](./CONTRIBUTING.md) guidelines before submitting a pull request or opening an issue.\n\n## License\n\nThe Pactus blockchain is under MIT [license](./LICENSE).\n\n"
  },
  {
    "path": "cmd/cmd.go",
    "content": "package cmd\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/signal\"\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/node\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\nconst (\n\tDefaultHomeDirName    = \"pactus\"\n\tDefaultWalletsDirName = \"wallets\"\n\tDefaultWalletName     = \"default_wallet\"\n)\n\nfunc PactusDefaultHomeDir() string {\n\thome := \"\"\n\tusr, err := user.Current()\n\tif err != nil {\n\t\tterminal.PrintWarnMsgf(\"unable to get current user: %v\", err)\n\t} else {\n\t\thome = filepath.Join(usr.HomeDir, home, DefaultHomeDirName)\n\t}\n\n\treturn home\n}\n\nfunc PactusWalletDir(home string) string {\n\treturn filepath.Join(home, \"wallets\")\n}\n\nfunc PactusGenesisPath(home string) string {\n\treturn filepath.Join(home, \"genesis.json\")\n}\n\nfunc PactusConfigPath(home string) string {\n\treturn filepath.Join(home, \"config.toml\")\n}\n\nfunc PactusLockFilePath(home string) string {\n\treturn filepath.Join(home, \".pactus.lock\")\n}\n\nfunc PactusDefaultWalletPath(home string) string {\n\treturn filepath.Join(PactusWalletDir(home), DefaultWalletName)\n}\n\nfunc PactusDaemonName() string {\n\tif runtime.GOOS == \"windows\" {\n\t\treturn \"pactus-daemon.exe\"\n\t}\n\n\treturn \"./pactus-daemon\"\n}\n\nfunc CreateNode(ctx context.Context, numValidators int, chain genesis.ChainType, workingDir string,\n\tmnemonic string, walletPassword string,\n) (*wallet.Wallet, string, error) {\n\twalletPath := PactusDefaultWalletPath(workingDir)\n\n\twlt, err := wallet.Create(ctx, walletPath, mnemonic, walletPassword, chain)\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tfor i := 0; i < numValidators; i++ {\n\t\t_, err := wlt.NewAddress(crypto.AddressTypeValidator, fmt.Sprintf(\"Validator address %v\", i+1))\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t}\n\trewardAddrInfo, err := wlt.NewAddress(crypto.AddressTypeEd25519Account, \"Reward address\",\n\t\twallet.WithPassword(walletPassword))\n\tif err != nil {\n\t\treturn nil, \"\", err\n\t}\n\n\tconfPath := PactusConfigPath(workingDir)\n\tgenPath := PactusGenesisPath(workingDir)\n\n\tswitch chain {\n\tcase genesis.Mainnet:\n\t\tgenDoc := genesis.MainnetGenesis()\n\t\tif err := genDoc.SaveToFile(genPath); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\terr := config.SaveMainnetConfig(confPath)\n\t\tif err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\tcase genesis.Testnet:\n\t\tgenDoc := genesis.TestnetGenesis()\n\t\tif err := genDoc.SaveToFile(genPath); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t\tconf := config.DefaultConfigTestnet()\n\t\tif err := conf.Save(confPath); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\tcase genesis.Localnet:\n\t\tif numValidators < 4 {\n\t\t\treturn nil, \"\", errors.New(\"localnet needs at least 4 validators\")\n\t\t}\n\t\tgenDoc := makeLocalGenesis(wlt)\n\t\tif err := genDoc.SaveToFile(genPath); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\n\t\tconf := config.DefaultConfigLocalnet()\n\t\tif err := conf.Save(confPath); err != nil {\n\t\t\treturn nil, \"\", err\n\t\t}\n\t}\n\n\treturn wlt, rewardAddrInfo.Address, nil\n}\n\n// StartNode starts the node from the given working directory.\n// The passwordFetcher will be used to fetch the password for the default_wallet if it is encrypted.\n// It returns an error if the genesis doc or default_wallet can't be found inside the working directory.\n// TODO: write test for me.\nfunc StartNode(ctx context.Context, workingDir string, passwordFetcher func() (string, bool),\n\tconfigModifier func(cfg *config.Config) *config.Config,\n) (*node.Node, error) {\n\tconf, gen, err := MakeConfig(workingDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif configModifier != nil {\n\t\tconf = configModifier(conf)\n\t}\n\n\tdefaultWalletPath := PactusDefaultWalletPath(workingDir)\n\twlt, err := wallet.Open(ctx, defaultWalletPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvalList := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\tif len(valList) == 0 {\n\t\treturn nil, errors.New(\"no validator addresses found in the wallet\")\n\t}\n\n\tif len(valList) > 32 {\n\t\tterminal.PrintWarnMsgf(\"wallet has more than 32 validator addresses, only the first 32 will be used\")\n\t\tvalList = valList[:32]\n\t}\n\n\trewardAddrs, err := MakeRewardAddresses(wlt, valList, conf.Node.RewardAddresses)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvalKeys, err := MakeValidatorKey(wlt, valList, passwordFetcher)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\twlt.Close()\n\n\tnode, err := node.NewNode(ctx, gen, conf, valKeys, rewardAddrs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = node.Start()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn node, nil\n}\n\n// makeLocalGenesis makes genesis file for the local network.\nfunc makeLocalGenesis(wlt *wallet.Wallet) *genesis.Genesis {\n\t// Treasury account\n\tacc := account.NewAccount(0)\n\tacc.AddToBalance(21 * 1e14)\n\taccs := map[crypto.Address]*account.Account{\n\t\tcrypto.TreasuryAddress: acc,\n\t}\n\n\tgenValNum := 4\n\tvals := make([]*validator.Validator, genValNum)\n\taddrs := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\tfor i := 0; i < genValNum; i++ {\n\t\tinfo, _ := wlt.AddressInfo(addrs[i].Address)\n\t\tpub, _ := bls.PublicKeyFromString(info.PublicKey)\n\t\tvals[i] = validator.NewValidator(pub, int32(i))\n\t}\n\n\t// create genesis\n\tparams := genesis.DefaultGenesisParams()\n\tparams.BlockVersion = protocol.ProtocolVersionLatest\n\tgen := genesis.MakeGenesis(util.RoundNow(60), accs, vals, params)\n\n\treturn gen\n}\n\n// MakeConfig attempts to load the configuration file and\n// returns an instance of the configuration along with the genesis document.\n// The genesis document is required to determine the chain type, which influences the configuration settings.\n// The function sets various private configurations, such as the \"wallets directory\" and chain-specific HRP values.\n// If the configuration file cannot be loaded, it tries to recover or restore the configuration.\nfunc MakeConfig(workingDir string) (*config.Config, *genesis.Genesis, error) {\n\tgen, err := genesis.LoadFromFile(PactusGenesisPath(workingDir))\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif !gen.ChainType().IsMainnet() {\n\t\tcrypto.ToTestnetHRP()\n\t}\n\n\twalletsDir := PactusWalletDir(workingDir)\n\tconfPath := PactusConfigPath(workingDir)\n\n\tvar defConf *config.Config\n\tchainType := gen.ChainType()\n\n\tswitch chainType {\n\tcase genesis.Mainnet:\n\t\tdefConf = config.DefaultConfigMainnet()\n\tcase genesis.Testnet:\n\t\tdefConf = config.DefaultConfigTestnet()\n\tcase genesis.Localnet:\n\t\tdefConf = config.DefaultConfigLocalnet()\n\t}\n\n\tconf, err := config.LoadFromFile(confPath, true, defConf)\n\tif err != nil {\n\t\tterminal.PrintWarnMsgf(\"Unable to load the config: %s\", err)\n\t\tterminal.PrintInfoMsgf(\"Attempting to update or restore the config file...\")\n\n\t\tconf, err = RecoverConfig(confPath, defConf, chainType)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t}\n\n\t// Now we can update the private filed, if any\n\tgenParams := gen.Params()\n\n\tconf.Store.TxCacheWindow = genParams.TransactionToLiveInterval\n\tconf.Store.SeedCacheWindow = genParams.SortitionInterval\n\tconf.Store.AccountCacheSize = 1024\n\tconf.Store.PublicKeyCacheSize = 1024\n\n\tconf.WalletManager.ChainType = chainType\n\tconf.WalletManager.WalletsDir = walletsDir\n\n\tif err := conf.BasicCheck(); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn conf, gen, nil\n}\n\nfunc RecoverConfig(confPath string, defConf *config.Config, chainType genesis.ChainType) (*config.Config, error) {\n\t// Try to attempt to load config in non-strict mode\n\tconf, err := config.LoadFromFile(confPath, false, defConf)\n\n\t// Create a backup of the config\n\tif util.PathExists(confPath) {\n\t\tconfBackupPath := fmt.Sprintf(\"%v_bak_%s\", confPath, time.Now().Format(\"2006-01-02T15-04-05\"))\n\t\trenameErr := os.Rename(confPath, confBackupPath)\n\t\tif renameErr != nil {\n\t\t\treturn nil, renameErr\n\t\t}\n\t}\n\n\tif err == nil {\n\t\terr := conf.Save(confPath)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tterminal.PrintSuccessMsgf(\"Config updated.\")\n\t} else {\n\t\tswitch chainType {\n\t\tcase genesis.Mainnet:\n\t\t\terr = config.SaveMainnetConfig(confPath)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\tcase genesis.Testnet,\n\t\t\tgenesis.Localnet:\n\t\t\terr = defConf.Save(confPath)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tterminal.PrintSuccessMsgf(\"Config restored to the default values\")\n\t\tconf, _ = config.LoadFromFile(confPath, true, defConf) // This time it should be OK\n\t}\n\n\treturn conf, err\n}\n\n// MakeRewardAddresses generates a list of reward addresses based on wallet and configuration.\n// If no reward addresses are provided in the config,\n// the function attempts to use Ed25519 or BLS addresses from the wallet.\nfunc MakeRewardAddresses(wlt *wallet.Wallet, valList []types.AddressInfo,\n\tconfRewardAddrs []string,\n) ([]crypto.Address, error) {\n\trewardAddrs := make([]crypto.Address, 0, len(valList))\n\n\tswitch {\n\t// Case 1: No reward addresses in the config file.\n\tcase len(confRewardAddrs) == 0:\n\t\tvar addrInfo *types.AddressInfo\n\t\t// Try to use the first Ed25519 address from the wallet as the reward address.\n\t\ted25519Addrs := wlt.ListAddresses(wallet.WithAddressType(crypto.AddressTypeEd25519Account))\n\t\tif len(ed25519Addrs) == 0 {\n\t\t\t// If no Ed25519 address is found, try the first BLS address instead.\n\t\t\tblsAddrs := wlt.ListAddresses(wallet.WithAddressType(crypto.AddressTypeBLSAccount))\n\t\t\tif len(blsAddrs) == 0 {\n\t\t\t\treturn nil, errors.New(\"unable to find a reward address in the wallet\")\n\t\t\t}\n\n\t\t\taddrInfo = &blsAddrs[0]\n\t\t} else {\n\t\t\taddrInfo = &ed25519Addrs[0]\n\t\t}\n\n\t\taddr, _ := crypto.AddressFromString(addrInfo.Address)\n\t\tfor i := 0; i < len(valList); i++ {\n\t\t\trewardAddrs = append(rewardAddrs, addr)\n\t\t}\n\n\t// Case 2: One reward address is specified in the config file.\n\tcase len(confRewardAddrs) == 1:\n\t\t// Use this single address for all validators.\n\t\taddr, _ := crypto.AddressFromString(confRewardAddrs[0])\n\t\tfor i := 0; i < len(valList); i++ {\n\t\t\trewardAddrs = append(rewardAddrs, addr)\n\t\t}\n\n\t// Case 3: Each validator has a corresponding reward address in the config file.\n\tcase len(confRewardAddrs) == len(valList):\n\t\tfor _, addrStr := range confRewardAddrs {\n\t\t\taddr, _ := crypto.AddressFromString(addrStr)\n\t\t\trewardAddrs = append(rewardAddrs, addr)\n\t\t}\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"expected %v reward addresses, but got %v\",\n\t\t\tlen(valList), len(confRewardAddrs))\n\t}\n\n\treturn rewardAddrs, nil\n}\n\nfunc MakeValidatorKey(walletInstance *wallet.Wallet, valAddrsInfo []types.AddressInfo,\n\tpasswordFetcher func() (string, bool),\n) ([]*bls.ValidatorKey, error) {\n\tvalAddrs := make([]string, len(valAddrsInfo))\n\tfor i := 0; i < len(valAddrs); i++ {\n\t\tvalAddr, _ := crypto.AddressFromString(valAddrsInfo[i].Address)\n\t\tif !valAddr.IsValidatorAddress() {\n\t\t\treturn nil, fmt.Errorf(\"invalid validator address: %s\", valAddrsInfo[i].Address)\n\t\t}\n\t\tvalAddrs[i] = valAddr.String()\n\t}\n\n\tvalKeys := make([]*bls.ValidatorKey, len(valAddrsInfo))\n\n\twalletPassword := \"\"\n\tif walletInstance.IsEncrypted() {\n\t\tpassword, ok := passwordFetcher()\n\t\tif !ok {\n\t\t\treturn nil, errors.New(\"aborted\")\n\t\t}\n\n\t\twalletPassword = password\n\t}\n\n\tprvKeys, err := walletInstance.PrivateKeys(walletPassword, valAddrs)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor i, prv := range prvKeys {\n\t\tvalKeys[i] = bls.NewValidatorKey(prv.(*bls.PrivateKey))\n\t}\n\n\treturn valKeys, nil\n}\n\nfunc RecoverWalletAddresses(wlt *wallet.Wallet, password string) {\n\tctx, cancel := context.WithCancel(context.Background())\n\tsignal.HandleSignals(func(os.Signal) {\n\t\tcancel()\n\t}, syscall.SIGINT, syscall.SIGTERM)\n\n\tterminal.PrintInfoMsgf(\"🔄 Recovering wallet addresses...\")\n\tterminal.PrintInfoMsgf(\"   Press 'Ctrl+C' to abort if needed\")\n\tterminal.PrintLine()\n\n\tindex := 0\n\terr := wlt.RecoveryAddresses(ctx, password, func(addr string) {\n\t\tterminal.PrintInfoMsgf(\"%d. %s\", index+1, addr)\n\t\tindex++\n\t})\n\tif err != nil {\n\t\tif errors.Is(err, context.Canceled) {\n\t\t\tterminal.PrintWarnMsgf(\"Address recovery aborted\")\n\t\t} else {\n\t\t\tterminal.PrintErrorMsgf(\"Address recovery failed: %v\", err)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cmd/cmd_test.go",
    "content": "package cmd\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMakeConfig(t *testing.T) {\n\tt.Run(\"No genesis file, Should return error\", func(t *testing.T) {\n\t\tworkingDir := util.TempDirPath()\n\n\t\t_, _, err := MakeConfig(workingDir)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"No Config file, Should recover it\", func(t *testing.T) {\n\t\tworkingDir := util.TempDirPath()\n\t\tgenPath := PactusGenesisPath(workingDir)\n\t\tgen := genesis.MainnetGenesis()\n\t\terr := gen.SaveToFile(genPath)\n\t\trequire.NoError(t, err)\n\n\t\t_, _, err = MakeConfig(workingDir)\n\t\trequire.NoError(t, err)\n\t})\n\n\tt.Run(\"Invalid Config file, Should recover it\", func(t *testing.T) {\n\t\tworkingDir := util.TempDirPath()\n\t\tgenPath := PactusGenesisPath(workingDir)\n\t\tconfPath := PactusConfigPath(workingDir)\n\n\t\tgen := genesis.MainnetGenesis()\n\t\terr := gen.SaveToFile(genPath)\n\t\trequire.NoError(t, err)\n\n\t\terr = util.WriteFile(confPath, []byte(\"invalid-config\"))\n\t\trequire.NoError(t, err)\n\n\t\t_, _, err = MakeConfig(workingDir)\n\t\trequire.NoError(t, err)\n\t})\n\n\tt.Run(\"Everything is good\", func(t *testing.T) {\n\t\tworkingDir := util.TempDirPath()\n\t\tgenPath := PactusGenesisPath(workingDir)\n\t\tconfPath := PactusConfigPath(workingDir)\n\n\t\tgen := genesis.MainnetGenesis()\n\t\terr := gen.SaveToFile(genPath)\n\t\trequire.NoError(t, err)\n\n\t\terr = config.SaveMainnetConfig(confPath)\n\t\trequire.NoError(t, err)\n\n\t\t_, _, err = MakeConfig(workingDir)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestPathsUnix(t *testing.T) {\n\tif runtime.GOOS == \"windows\" {\n\t\treturn\n\t}\n\ttests := []struct {\n\t\thome                      string\n\t\texpectedWalletDir         string\n\t\texpectedDefaultWalletPath string\n\t\texpectedGenesisPath       string\n\t\texpectedConfigPath        string\n\t}{\n\t\t{\n\t\t\t\"/home/pactus\",\n\t\t\t\"/home/pactus/wallets\",\n\t\t\t\"/home/pactus/wallets/default_wallet\",\n\t\t\t\"/home/pactus/genesis.json\",\n\t\t\t\"/home/pactus/config.toml\",\n\t\t},\n\t\t{\n\t\t\t\"/home/pactus/\",\n\t\t\t\"/home/pactus/wallets\",\n\t\t\t\"/home/pactus/wallets/default_wallet\",\n\t\t\t\"/home/pactus/genesis.json\",\n\t\t\t\"/home/pactus/config.toml\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\twalletDir := PactusWalletDir(tt.home)\n\t\tdefaultWalletPath := PactusDefaultWalletPath(tt.home)\n\t\tgenesisPath := PactusGenesisPath(tt.home)\n\t\tconfigPath := PactusConfigPath(tt.home)\n\n\t\tassert.Equal(t, tt.expectedWalletDir, walletDir)\n\t\tassert.Equal(t, tt.expectedDefaultWalletPath, defaultWalletPath)\n\t\tassert.Equal(t, tt.expectedGenesisPath, genesisPath)\n\t\tassert.Equal(t, tt.expectedConfigPath, configPath)\n\t}\n}\n\nfunc TestPathsWindows(t *testing.T) {\n\tif runtime.GOOS != \"windows\" {\n\t\treturn\n\t}\n\ttests := []struct {\n\t\thome                      string\n\t\texpectedWalletDir         string\n\t\texpectedDefaultWalletPath string\n\t\texpectedGenesisPath       string\n\t\texpectedConfigPath        string\n\t}{\n\t\t{\n\t\t\t\"c:\\\\pactus\",\n\t\t\t\"c:\\\\pactus\\\\wallets\",\n\t\t\t\"c:\\\\pactus\\\\wallets\\\\default_wallet\",\n\t\t\t\"c:\\\\pactus\\\\genesis.json\",\n\t\t\t\"c:\\\\pactus\\\\config.toml\",\n\t\t},\n\t\t{\n\t\t\t\"c:\\\\home\\\\\",\n\t\t\t\"c:\\\\home\\\\wallets\",\n\t\t\t\"c:\\\\home\\\\wallets\\\\default_wallet\",\n\t\t\t\"c:\\\\home\\\\genesis.json\",\n\t\t\t\"c:\\\\home\\\\config.toml\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\twalletDir := PactusWalletDir(tt.home)\n\t\tdefaultWalletPath := PactusDefaultWalletPath(tt.home)\n\t\tgenesisPath := PactusGenesisPath(tt.home)\n\t\tconfigPath := PactusConfigPath(tt.home)\n\n\t\tassert.Equal(t, tt.expectedWalletDir, walletDir)\n\t\tassert.Equal(t, tt.expectedDefaultWalletPath, defaultWalletPath)\n\t\tassert.Equal(t, tt.expectedGenesisPath, genesisPath)\n\t\tassert.Equal(t, tt.expectedConfigPath, configPath)\n\t}\n}\n\nfunc TestMakeRewardAddresses(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsetupWallet := func() *wallet.Wallet {\n\t\twalletPath := util.TempFilePath()\n\t\tmnemonic, _ := wallet.GenerateMnemonic(128)\n\t\twlt, err := wallet.Create(t.Context(), walletPath, mnemonic, \"\", genesis.Mainnet)\n\t\trequire.NoError(t, err)\n\n\t\t_, _ = wlt.NewValidatorAddress(\"Validator 1\")\n\t\t_, _ = wlt.NewValidatorAddress(\"Validator 2\")\n\t\t_, _ = wlt.NewValidatorAddress(\"Validator 3\")\n\n\t\treturn wlt\n\t}\n\n\tt.Run(\"No reward addresses in wallet\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{}\n\t\t_, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\tassert.ErrorContains(t, err, \"unable to find a reward address in the wallet\")\n\t})\n\n\tt.Run(\"Wallet with one Ed25519 address\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\taddr1Info, _ := wlt.NewEd25519AccountAddress(\"\", \"\")\n\t\t_, _ = wlt.NewEd25519AccountAddress(\"\", \"\")\n\t\t_, _ = wlt.NewBLSAccountAddress(\"\")\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{}\n\t\trewardAddrs, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, rewardAddrs[0].String(), addr1Info.Address)\n\t\tassert.Equal(t, rewardAddrs[1].String(), addr1Info.Address)\n\t\tassert.Equal(t, rewardAddrs[2].String(), addr1Info.Address)\n\t})\n\n\tt.Run(\"Wallet with one BLS address\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\taddr1Info, _ := wlt.NewBLSAccountAddress(\"\")\n\t\t_, _ = wlt.NewBLSAccountAddress(\"\")\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{}\n\t\trewardAddrs, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, rewardAddrs[0].String(), addr1Info.Address)\n\t\tassert.Equal(t, rewardAddrs[1].String(), addr1Info.Address)\n\t\tassert.Equal(t, rewardAddrs[2].String(), addr1Info.Address)\n\t})\n\n\tt.Run(\"One reward address in config\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{\n\t\t\tts.RandAccAddress().String(),\n\t\t}\n\t\trewardAddrs, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, rewardAddrs[0].String(), confRewardAddresses[0])\n\t\tassert.Equal(t, rewardAddrs[1].String(), confRewardAddresses[0])\n\t\tassert.Equal(t, rewardAddrs[2].String(), confRewardAddresses[0])\n\t})\n\n\tt.Run(\"Three reward addresses in config\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{\n\t\t\tts.RandAccAddress().String(),\n\t\t\tts.RandAccAddress().String(),\n\t\t\tts.RandAccAddress().String(),\n\t\t}\n\t\trewardAddrs, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, rewardAddrs[0].String(), confRewardAddresses[0])\n\t\tassert.Equal(t, rewardAddrs[1].String(), confRewardAddresses[1])\n\t\tassert.Equal(t, rewardAddrs[2].String(), confRewardAddresses[2])\n\t})\n\n\tt.Run(\"Insufficient reward addresses in config\", func(t *testing.T) {\n\t\twlt := setupWallet()\n\n\t\tvalAddrsInfo := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\tconfRewardAddresses := []string{\n\t\t\tts.RandAccAddress().String(),\n\t\t\tts.RandAccAddress().String(),\n\t\t}\n\t\t_, err := MakeRewardAddresses(wlt, valAddrsInfo, confRewardAddresses)\n\t\tassert.ErrorContains(t, err, \"expected 3 reward addresses, but got 2\")\n\t})\n}\n\nfunc TestCreateNode(t *testing.T) {\n\ttests := []struct {\n\t\tname           string\n\t\tnumValidators  int\n\t\tchain          genesis.ChainType\n\t\tworkingDir     string\n\t\tmnemonic       string\n\t\twithErr        bool\n\t\tvalidatorAddrs []string\n\t\trewardAddrs    string\n\t}{\n\t\t{\n\t\t\tname:           \"Create node for Mainnet\",\n\t\t\tnumValidators:  1,\n\t\t\tchain:          genesis.Mainnet,\n\t\t\tworkingDir:     util.TempDirPath(),\n\t\t\tmnemonic:       \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n\t\t\tvalidatorAddrs: []string{\"pc1pqpu5tkuctj6ecxjs85f9apm802hhc65amwhuyw\"},\n\t\t\trewardAddrs:    \"pc1rkg0nhswqj85wnz9sm0g9kfkxj68lfx9lhftl8n\",\n\t\t\twithErr:        false,\n\t\t},\n\t\t{\n\t\t\tname:           \"Create node for Testnet\",\n\t\t\tnumValidators:  1,\n\t\t\tchain:          genesis.Testnet,\n\t\t\tworkingDir:     util.TempDirPath(),\n\t\t\tmnemonic:       \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n\t\t\tvalidatorAddrs: []string{\"tpc1p54ex6jvqkz6qyld5wgm77qm7walgy664hxz2pc\"},\n\t\t\trewardAddrs:    \"tpc1rps3xncfvepre5w754xtxxqmrmhwuackjvaft5y\",\n\t\t\twithErr:        false,\n\t\t},\n\n\t\t{\n\t\t\tname:          \"Create node for Localnet\",\n\t\t\tnumValidators: 4,\n\t\t\tchain:         genesis.Localnet,\n\t\t\tworkingDir:    util.TempDirPath(),\n\t\t\tmnemonic:      \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n\t\t\tvalidatorAddrs: []string{\n\t\t\t\t\"tpc1p54ex6jvqkz6qyld5wgm77qm7walgy664hxz2pc\",\n\t\t\t\t\"tpc1pdf5e0q4d6eaww3uq5pmw5aayqpaqplra0pj8z2\",\n\t\t\t\t\"tpc1pe5px2dddn6g4zgnu3wpwgrqpdjrufvda57a4wm\",\n\t\t\t\t\"tpc1p8yyhysp380j9q9gxa6vlhstgkd94238kunttpr\",\n\t\t\t},\n\t\t\trewardAddrs: \"tpc1rps3xncfvepre5w754xtxxqmrmhwuackjvaft5y\",\n\t\t\twithErr:     false,\n\t\t},\n\t\t{\n\t\t\tname:           \"Localnet with one validator\",\n\t\t\tnumValidators:  1,\n\t\t\tchain:          genesis.Localnet,\n\t\t\tworkingDir:     util.TempDirPath(),\n\t\t\tmnemonic:       \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n\t\t\tvalidatorAddrs: nil,\n\t\t\trewardAddrs:    \"\",\n\t\t\twithErr:        true,\n\t\t},\n\t\t{\n\t\t\tname:           \"Invalid mnemonic\",\n\t\t\tnumValidators:  4,\n\t\t\tchain:          genesis.Mainnet,\n\t\t\tworkingDir:     util.TempDirPath(),\n\t\t\tmnemonic:       \"\",\n\t\t\tvalidatorAddrs: nil,\n\t\t\trewardAddrs:    \"\",\n\t\t\twithErr:        true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\twlt, rewardAddrs, err := CreateNode(t.Context(),\n\t\t\ttt.numValidators, tt.chain, tt.workingDir, tt.mnemonic, \"\")\n\n\t\tif tt.withErr {\n\t\t\trequire.Error(t, err)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tvalInfos := wlt.ListAddresses(wallet.OnlyValidatorAddresses())\n\t\t\tfor i, addr := range tt.validatorAddrs {\n\t\t\t\tassert.Equal(t, valInfos[i].Address, addr)\n\t\t\t}\n\t\t\tassert.Equal(t, tt.rewardAddrs, rewardAddrs)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cmd/daemon/import.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/ezex-io/gopkg/signal\"\n\t\"github.com/gofrs/flock\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/downloader\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc buildImportCmd(parentCmd *cobra.Command) {\n\timportCmd := &cobra.Command{\n\t\tUse:   \"import\",\n\t\tShort: \"download and import pruned data\",\n\t}\n\tparentCmd.AddCommand(importCmd)\n\n\tworkingDirOpt := addWorkingDirOption(importCmd)\n\tserverAddrOpt := importCmd.Flags().String(\"server-addr\", cmd.DefaultSnapshotURL,\n\t\t\"import server address\")\n\n\timportCmd.Run = func(cobra *cobra.Command, _ []string) {\n\t\tworkingDir, err := filepath.Abs(*workingDirOpt)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\terr = os.Chdir(workingDir)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tconf, gen, err := cmd.MakeConfig(workingDir)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tlockFilePath := filepath.Join(workingDir, \".pactus.lock\")\n\t\tfileLock := flock.New(lockFilePath)\n\n\t\tlocked, err := fileLock.TryLock()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tif !locked {\n\t\t\tterminal.PrintWarnMsgf(\"Could not lock '%s', another instance is running?\", lockFilePath)\n\n\t\t\treturn\n\t\t}\n\n\t\tterminal.PrintLine()\n\n\t\tsnapshotURL := *serverAddrOpt\n\t\timporter, err := cmd.NewImporter(\n\t\t\tgen.ChainType(),\n\t\t\tsnapshotURL,\n\t\t\tconf.Store.DataPath(),\n\t\t)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tmetadata, err := importer.GetMetadata(cobra.Context())\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tsnapshots := make([]string, 0, len(metadata))\n\n\t\tfor _, md := range metadata {\n\t\t\titem := fmt.Sprintf(\"snapshot %s (%s)\",\n\t\t\t\tmd.CreatedAtTime().Format(\"2006-01-02\"),\n\t\t\t\tutil.FormatBytesToHumanReadable(md.Data.Size),\n\t\t\t)\n\n\t\t\tsnapshots = append(snapshots, item)\n\t\t}\n\n\t\tterminal.PrintLine()\n\n\t\tchoice := prompt.PromptSelect(\"Please select a snapshot\", snapshots)\n\n\t\tselected := metadata[choice]\n\n\t\tsignal.HandleInterrupt(func() {\n\t\t\t_ = fileLock.Unlock()\n\t\t\t_ = importer.Cleanup()\n\t\t})\n\n\t\tterminal.PrintLine()\n\n\t\terr = importer.Download(cobra.Context(), &selected, downloadProgressBar)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"📦 Extracting snapshot files...\")\n\n\t\terr = importer.ExtractAndStoreFiles()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintInfoMsgf(\"📁 Moving data to node directory...\")\n\t\terr = importer.MoveStore()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintInfoMsgf(\"🧹 Cleaning up temporary files...\")\n\t\terr = importer.Cleanup()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\t_ = fileLock.Unlock()\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"✅ Node successfully imported pruned data!\")\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"🚀 To start your node, run:\")\n\t\tterminal.PrintInfoMsgBoldf(\"   %s start -w %s\", cmd.PactusDaemonName(), workingDir)\n\t}\n}\n\nfunc downloadProgressBar(fileName string) func(stats downloader.Stats) {\n\treturn func(stats downloader.Stats) {\n\t\tif !stats.Completed {\n\t\t\tbar := terminal.ProgressBar(stats.TotalSize, 30)\n\t\t\tbar.Describe(fmt.Sprintf(\"%s (%s/%s)\",\n\t\t\t\tfileName,\n\t\t\t\tutil.FormatBytesToHumanReadable(uint64(stats.Downloaded)),\n\t\t\t\tutil.FormatBytesToHumanReadable(uint64(stats.TotalSize)),\n\t\t\t))\n\t\t\t// Ignore progress bar errors\n\t\t\t_ = bar.Add64(stats.Downloaded)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cmd/daemon/init.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"path/filepath\"\n\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildInitCmd builds a sub-command to initialize the Pactus blockchain node.\nfunc buildInitCmd(parentCmd *cobra.Command) {\n\tinitCmd := &cobra.Command{\n\t\tUse:   \"init\",\n\t\tShort: \"initialize the Pactus blockchain node\",\n\t}\n\tparentCmd.AddCommand(initCmd)\n\n\tworkingDirOpt := addWorkingDirOption(initCmd)\n\n\ttestnetOpt := initCmd.Flags().Bool(\"testnet\", false,\n\t\t\"initialize working directory for joining the testnet\")\n\n\tlocalnetOpt := initCmd.Flags().Bool(\"localnet\", false,\n\t\t\"initialize working directory for localnet (for development)\")\n\n\trestoreOpt := initCmd.Flags().String(\"restore\", \"\",\n\t\t\"restore the 'default_wallet' using a mnemonic or seed phrase\")\n\n\tpasswordOpt := initCmd.Flags().StringP(\"password\", \"p\", \"\",\n\t\t\"the wallet password\")\n\n\tentropyOpt := initCmd.Flags().IntP(\"entropy\", \"e\", 128,\n\t\t\"entropy bits for seed generation. range: 128 to 256\")\n\n\tvalNumOpt := initCmd.Flags().IntP(\"val-num\", \"\", 0,\n\t\t\"number of validators to be created. range: 1 to 32\")\n\n\tinitCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tworkingDir, _ := filepath.Abs(*workingDirOpt)\n\t\tif !util.IsDirNotExistsOrEmpty(workingDir) {\n\t\t\tterminal.PrintErrorMsgf(\"The working directory is not empty: %s\", workingDir)\n\n\t\t\treturn\n\t\t}\n\n\t\tvar mnemonic string\n\t\tif *restoreOpt == \"\" {\n\t\t\tmnemonic, _ = wallet.GenerateMnemonic(*entropyOpt)\n\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintInfoMsgf(\"🌱 Your wallet seed phrase:\")\n\t\t\tterminal.PrintInfoMsgBoldf(\"   %s\", mnemonic)\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintWarnMsgf(\"⚠️  CRITICAL: Write down this seed phrase and store it safely!\")\n\t\t\tterminal.PrintWarnMsgf(\"   This is the ONLY way to recover your wallet if needed.\")\n\t\t\tterminal.PrintWarnMsgf(\"   Never share it with anyone or store it electronically.\")\n\t\t\tterminal.PrintLine()\n\t\t\tconfirmed := prompt.PromptConfirm(\"Have you written down the seed phrase? Continue with initialization\")\n\t\t\tif !confirmed {\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\tmnemonic = *restoreOpt\n\t\t\terr := wallet.CheckMnemonic(*restoreOpt)\n\t\t\tterminal.FatalErrorCheck(err)\n\t\t}\n\n\t\tvar password string\n\t\tif *passwordOpt == \"\" {\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintInfoMsgf(\"🔐 Set a password for your wallet\")\n\t\t\tterminal.PrintInfoMsgf(\"   This password will be required to access your wallet\")\n\t\t\tpassword = prompt.PromptPassword(\"Wallet Password\", true)\n\t\t} else {\n\t\t\tpassword = *passwordOpt\n\t\t}\n\n\t\tvar valNum int\n\t\tif *valNumOpt == 0 {\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintInfoMsgBoldf(\"🏛️  How many validators do you want to create?\")\n\t\t\tterminal.PrintInfoMsgf(\"   • Each node can run up to 32 validators\")\n\t\t\tterminal.PrintInfoMsgf(\"   • Each validator can stake up to 1,000 coins\")\n\t\t\tterminal.PrintInfoMsgf(\"   • Choose based on your total stake amount\")\n\t\t\tterminal.PrintLine()\n\t\t\tvalNum = prompt.PromptInputWithRange(\"Number of Validators\", 7, 1, 32)\n\t\t} else {\n\t\t\tif *valNumOpt < 1 || *valNumOpt > 32 {\n\t\t\t\tterminal.PrintErrorMsgf(\"%v is not in valid range of validator number, it should be between 1 and 32\", *valNumOpt)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t\tvalNum = *valNumOpt\n\t\t}\n\n\t\tchain := genesis.Mainnet\n\t\t// The order of checking the network (chain type) matters here.\n\t\tif *testnetOpt {\n\t\t\tcrypto.ToTestnetHRP()\n\t\t\tchain = genesis.Testnet\n\t\t}\n\t\tif *localnetOpt {\n\t\t\tcrypto.ToTestnetHRP()\n\t\t\tchain = genesis.Localnet\n\t\t}\n\n\t\tctx := context.Background()\n\t\twlt, rewardAddrs, err := cmd.CreateNode(ctx,\n\t\t\tvalNum, chain, workingDir, mnemonic, password)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\t// Recovering addresses\n\t\tif *restoreOpt != \"\" {\n\t\t\tcmd.RecoverWalletAddresses(wlt, password)\n\t\t}\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgBoldf(\"🏛️  Validator Addresses:\")\n\t\tfor i, addrInfo := range wlt.ListAddresses(wallet.OnlyValidatorAddresses()) {\n\t\t\tterminal.PrintInfoMsgf(\"   %d. %s\", i+1, addrInfo.Address)\n\t\t}\n\t\tterminal.PrintLine()\n\n\t\tterminal.PrintInfoMsgBoldf(\"💰 Reward Address:\")\n\t\tterminal.PrintInfoMsgf(\"   %s\", rewardAddrs)\n\t\tterminal.PrintLine()\n\n\t\tterminal.PrintInfoMsgf(\"🌐 Network: %v\", chain.String())\n\t\tterminal.PrintInfoMsgf(\"📁 Working Directory: %v\", workingDir)\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"✅ Pactus node successfully initialized!\")\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"🚀 To start your node, run:\")\n\t\tterminal.PrintInfoMsgBoldf(\"   %s start -w %s\", cmd.PactusDaemonName(), workingDir)\n\t}\n}\n"
  },
  {
    "path": "cmd/daemon/main.go",
    "content": "package main\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc init() {\n\tversion.NodeAgent.AppType = \"daemon\"\n}\n\nfunc main() {\n\trootCmd := &cobra.Command{\n\t\tUse:               \"pactus-daemon\",\n\t\tShort:             \"Pactus daemon\",\n\t\tCompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true},\n\t}\n\n\t// Hide the \"help\" sub-command\n\trootCmd.SetHelpCommand(&cobra.Command{Hidden: true})\n\n\tbuildVersionCmd(rootCmd)\n\tbuildInitCmd(rootCmd)\n\tbuildStartCmd(rootCmd)\n\tbuildPruneCmd(rootCmd)\n\tbuildImportCmd(rootCmd)\n\n\terr := rootCmd.Execute()\n\tif err != nil {\n\t\tterminal.PrintErrorMsgf(err.Error())\n\t}\n}\n\nfunc addWorkingDirOption(c *cobra.Command) *string {\n\treturn c.Flags().StringP(\"working-dir\", \"w\", cmd.PactusDefaultHomeDir(),\n\t\t\"the path to the working directory that keeps the wallets and node files\")\n}\n"
  },
  {
    "path": "cmd/daemon/prune.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/ezex-io/gopkg/signal\"\n\t\"github.com/gofrs/flock\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc buildPruneCmd(parentCmd *cobra.Command) {\n\tpruneCmd := &cobra.Command{\n\t\tUse:   \"prune\",\n\t\tShort: \"prune old blocks and transactions from the node\",\n\t\tLong: \"The prune command optimizes blockchain storage by removing outdated blocks and transactions, \" +\n\t\t\t\"freeing up disk space and enhancing node performance.\",\n\t}\n\tparentCmd.AddCommand(pruneCmd)\n\n\tworkingDirOpt := addWorkingDirOption(pruneCmd)\n\n\tpruneCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tworkingDir, _ := filepath.Abs(*workingDirOpt)\n\t\t// change working directory\n\t\terr := os.Chdir(workingDir)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\t// Define the lock file path\n\t\tlockFilePath := filepath.Join(workingDir, \".pactus.lock\")\n\t\tfileLock := flock.New(lockFilePath)\n\n\t\tlocked, err := fileLock.TryLock()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tif !locked {\n\t\t\tterminal.PrintWarnMsgf(\"Could not lock '%s', another instance is running?\", lockFilePath)\n\n\t\t\treturn\n\t\t}\n\n\t\tconf, _, err := cmd.MakeConfig(workingDir)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\t// Disable logger\n\t\tconf.Logger.Targets = []string{}\n\t\tlogger.InitGlobalLogger(context.Background(), conf.Logger)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintWarnMsgf(\"⚠️  PRUNE OPERATION WARNING\")\n\t\tterminal.PrintWarnMsgf(\"   This will remove all blocks and transactions older than %d days\", conf.Store.RetentionDays)\n\t\tterminal.PrintWarnMsgf(\"   and convert your node to prune mode.\")\n\t\tterminal.PrintWarnMsgf(\"   This action cannot be undone.\")\n\t\tterminal.PrintLine()\n\t\tconfirmed := prompt.PromptConfirm(\"Are you sure you want to continue\")\n\t\tif !confirmed {\n\t\t\treturn\n\t\t}\n\t\tterminal.PrintLine()\n\n\t\tstore, err := store.NewStore(conf.Store)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tprunedCount := uint32(0)\n\t\tskippedCount := uint32(0)\n\t\ttotalCount := uint32(0)\n\t\tcanceled := false\n\t\tclosed := make(chan bool, 1)\n\n\t\tsignal.HandleInterrupt(func() {\n\t\t\tcanceled = true\n\t\t\t<-closed\n\t\t})\n\n\t\terr = store.Prune(func(pruned bool, pruningHeight types.Height) bool {\n\t\t\tif pruned {\n\t\t\t\tprunedCount++\n\t\t\t} else {\n\t\t\t\tskippedCount++\n\t\t\t}\n\n\t\t\tif totalCount == 0 {\n\t\t\t\ttotalCount = uint32(pruningHeight)\n\t\t\t}\n\n\t\t\tpruningProgressBar(prunedCount, skippedCount, totalCount)\n\n\t\t\treturn canceled\n\t\t})\n\t\tterminal.PrintLine()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tif canceled {\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintWarnMsgf(\"❌ Prune operation cancelled.\")\n\t\t\tterminal.PrintLine()\n\t\t} else if prunedCount == 0 {\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintInfoMsgf(\"ℹ️  No pruning needed\")\n\t\t\tterminal.PrintInfoMsgf(\"   Your node has not reached the retention period (%d days)\", conf.Store.RetentionDays)\n\t\t\tterminal.PrintInfoMsgf(\"   or is already in prune mode.\")\n\t\t\tterminal.PrintLine()\n\t\t} else {\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintSuccessMsgf(\"✅ Your node successfully pruned and changed to prune mode.\")\n\t\t\tterminal.PrintLine()\n\t\t\tterminal.PrintInfoMsgf(\"🚀 To start your node, run:\")\n\t\t\tterminal.PrintInfoMsgBoldf(\"   %s start -w %s\", cmd.PactusDaemonName(), workingDir)\n\t\t}\n\n\t\tstore.Close()\n\t\t_ = fileLock.Unlock()\n\n\t\tclosed <- true\n\t}\n}\n\nfunc pruningProgressBar(prunedCount, skippedCount, totalCount uint32) {\n\tif (prunedCount+skippedCount)%1000 != 0 {\n\t\treturn\n\t}\n\n\tbar := terminal.ProgressBar(int64(totalCount), 30)\n\tbar.Describe(fmt.Sprintf(\"Pruned: %d | Skipped: %d\", prunedCount, skippedCount))\n\terr := bar.Add(int(prunedCount + skippedCount))\n\tterminal.FatalErrorCheck(err)\n}\n"
  },
  {
    "path": "cmd/daemon/start.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/ezex-io/gopkg/signal\"\n\t\"github.com/gofrs/flock\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildStartCmd builds a sub-command to starts the Pactus blockchain node.\nfunc buildStartCmd(parentCmd *cobra.Command) {\n\tstartCmd := &cobra.Command{\n\t\tUse:   \"start\",\n\t\tShort: \"start the Pactus blockchain node\",\n\t}\n\n\tparentCmd.AddCommand(startCmd)\n\n\tworkingDirOpt := addWorkingDirOption(startCmd)\n\n\tpasswordOpt := startCmd.Flags().StringP(\"password\", \"p\", \"\",\n\t\t\"the wallet password\")\n\n\tpasswordFromFileOpt := startCmd.Flags().String(\"password-from-file\", \"\",\n\t\t\"the file containing the wallet password\")\n\n\tgRPCOpt := startCmd.Flags().String(\"grpc\", \"\",\n\t\t\"enable gRPC transport, example: localhost:50051\")\n\n\tgRPCWalletOpt := startCmd.Flags().Bool(\"grpc-wallet\", false, \"enable gRPC wallet service\")\n\n\tstartCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tworkingDir, _ := filepath.Abs(*workingDirOpt)\n\t\t// change working directory\n\t\terr := os.Chdir(workingDir)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\t// Define the lock file path\n\t\tlockFilePath := filepath.Join(workingDir, \".pactus.lock\")\n\t\tfileLock := flock.New(lockFilePath)\n\n\t\tlocked, err := fileLock.TryLock()\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tif !locked {\n\t\t\tterminal.PrintWarnMsgf(\"Could not lock '%s', another instance is running?\", lockFilePath)\n\n\t\t\treturn\n\t\t}\n\n\t\tpasswordFetcher := func() (string, bool) {\n\t\t\tvar password string\n\n\t\t\tif *passwordOpt != \"\" {\n\t\t\t\tpassword = *passwordOpt\n\t\t\t} else if *passwordFromFileOpt != \"\" {\n\t\t\t\tb, err := util.ReadFile(*passwordFromFileOpt)\n\t\t\t\tterminal.FatalErrorCheck(err)\n\n\t\t\t\tpassword = strings.TrimSpace(string(b))\n\t\t\t} else {\n\t\t\t\tpassword = prompt.PromptPassword(\"Wallet password\", false)\n\t\t\t}\n\n\t\t\treturn password, true\n\t\t}\n\n\t\tconfigModifier := func(cfg *config.Config) *config.Config {\n\t\t\tif *gRPCOpt != \"\" {\n\t\t\t\tcfg.GRPC.Enable = true\n\t\t\t\tcfg.GRPC.EnableWallet = *gRPCWalletOpt\n\t\t\t\tcfg.GRPC.Listen = *gRPCOpt\n\t\t\t}\n\n\t\t\treturn cfg\n\t\t}\n\n\t\tctx, cancel := context.WithCancel(context.Background())\n\t\tnode, err := cmd.StartNode(ctx, workingDir, passwordFetcher, configModifier)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tsignal.HandleInterrupt(func() {\n\t\t\tterminal.PrintInfoMsgf(\"Exiting...\")\n\t\t\tcancel()\n\n\t\t\t_ = fileLock.Unlock()\n\t\t\tnode.Stop()\n\t\t})\n\n\t\t// run forever (the node will not be returned)\n\t\tselect {}\n\t}\n}\n"
  },
  {
    "path": "cmd/daemon/version.go",
    "content": "package main\n\nimport (\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/spf13/cobra\"\n)\n\n// Version prints the version of the Pactus node.\nfunc buildVersionCmd(parentCmd *cobra.Command) {\n\tversionCmd := &cobra.Command{\n\t\tUse:   \"version\",\n\t\tShort: \"prints the Pactus version\",\n\t}\n\tparentCmd.AddCommand(versionCmd)\n\tversionCmd.Run = func(c *cobra.Command, _ []string) {\n\t\tc.Printf(\"Pactus version: %s\\n\", version.NodeVersion().StringWithAlias())\n\t}\n}\n"
  },
  {
    "path": "cmd/gtk/app/run.go",
    "content": "//go:build gtk\n\npackage app\n\nimport (\n\t\"context\"\n\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/controller\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc\"\n)\n\ntype GUI struct {\n\tMainWindow    *view.MainWindowView\n\tNodeCtrl      *controller.NodeWidgetController\n\tWalletCtrl    *controller.WalletWidgetController\n\tValidatorCtrl *controller.ValidatorWidgetController\n\tCommitteeCtrl *controller.CommitteeWidgetController\n\tNetworkCtrl   *controller.NetworkWidgetController\n}\n\n// Run builds and shows the main window, wiring views/controllers.\n// It accepts a gRPC connection to the node (standard grpc.ClientConn or gRPC-Web).\n// connectionLabel is \"Remote address\" or \"Working directory\"; connectionValue is the address or path.\n// It returns a cleanup function that closes the window and stops timers.\nfunc Run(ctx context.Context, conn grpc.ClientConnInterface,\n\tgtkApp *gtk.Application, notify func(string),\n\tconnectionLabel, connectionValue string,\n) (*GUI, error) {\n\tblockchainClient := pactus.NewBlockchainClient(conn)\n\ttransactionClient := pactus.NewTransactionClient(conn)\n\tnetworkClient := pactus.NewNetworkClient(conn)\n\twalletClient := pactus.NewWalletClient(conn)\n\n\tnodeModel := model.NewNodeModel(ctx, blockchainClient, networkClient)\n\tvalidatorModel := model.NewValidatorModel(ctx, blockchainClient)\n\twalletModel := model.NewWalletModel(ctx, walletClient, transactionClient, blockchainClient, cmd.DefaultWalletName)\n\tcommitteeModel := model.NewCommitteeModel(ctx, blockchainClient)\n\tnetworkModel := model.NewNetworkModel(ctx, networkClient)\n\n\tnodeView := gtkutil.IdleAddSyncT(view.NewNodeWidgetView)\n\twalletView := gtkutil.IdleAddSyncT(view.NewWalletWidgetView)\n\tvalidatorView := gtkutil.IdleAddSyncT(view.NewValidatorWidgetView)\n\tcommitteeView := gtkutil.IdleAddSyncT(view.NewCommitteeWidgetView)\n\tnetworkView := gtkutil.IdleAddSyncT(view.NewNetworkWidgetView)\n\n\tnodeCtrl := controller.NewNodeWidgetController(nodeView, nodeModel)\n\twalletCtrl := controller.NewWalletWidgetController(walletView, walletModel)\n\tvalidatorCtrl := controller.NewValidatorWidgetController(validatorView, validatorModel)\n\tcommitteeCtrl := controller.NewCommitteeWidgetController(committeeView, committeeModel)\n\tnetworkCtrl := controller.NewNetworkWidgetController(networkView, networkModel)\n\n\tnav := controller.NewNavigator(gtkApp, walletModel, walletCtrl)\n\n\tnotify(\"Fetching Node info...\")\n\terr := nodeCtrl.BuildView(ctx, connectionLabel, connectionValue)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnotify(\"Fetching Validators info...\")\n\terr = validatorCtrl.BuildView(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnotify(\"Fetching Wallet info...\")\n\terr = walletCtrl.BuildView(ctx, nav)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnotify(\"Fetching Committee info...\")\n\terr = committeeCtrl.BuildView(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnotify(\"Fetching Network info...\")\n\terr = networkCtrl.BuildView(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmwView := gtkutil.IdleAddSyncT(func() *view.MainWindowView {\n\t\tmwView := view.NewMainWindowView()\n\n\t\tmwView.BoxNode.Add(nodeView.Box)\n\t\tmwView.BoxDefaultWallet.Add(walletView.Box)\n\t\tmwView.BoxValidators.Add(validatorView.Box)\n\t\tmwView.BoxCommittee.Add(committeeView.Box)\n\t\tmwView.BoxNetwork.Add(networkView.Box)\n\n\t\tmwCtrl := controller.NewMainWindowController(mwView)\n\t\tmwCtrl.BuildView(nav)\n\n\t\tmwView.Window.ShowAll()\n\t\tgtkApp.AddWindow(mwView.Window)\n\n\t\treturn mwView\n\t})\n\n\treturn &GUI{\n\t\tMainWindow:    mwView,\n\t\tNodeCtrl:      nodeCtrl,\n\t\tWalletCtrl:    walletCtrl,\n\t\tValidatorCtrl: validatorCtrl,\n\t\tCommitteeCtrl: committeeCtrl,\n\t\tNetworkCtrl:   networkCtrl,\n\t}, nil\n}\n\nfunc (g *GUI) Cleanup() {\n\tg.MainWindow.Cleanup()\n}\n"
  },
  {
    "path": "cmd/gtk/assets/assets.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport (\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/gotk3/gotk3/gtk\"\n)\n\nfunc InitAssets() {\n\tinitIcons()\n\tinitImages()\n}\n\n// missingPixbuf tries to return an icon-theme \"missing image\" pixbuf and falls\n// back to a simple solid square if the theme isn't available.\nfunc missingPixbuf(size int) *gdk.Pixbuf {\n\ttheme, err := gtk.IconThemeGetDefault()\n\tif err == nil && theme != nil {\n\t\tpixbuf, err := theme.LoadIcon(\"image-missing\", size, 0)\n\t\tif err == nil || pixbuf != nil {\n\t\t\treturn pixbuf\n\t\t}\n\t}\n\n\t// Last resort: a tiny gray square (ARGB32).\n\tpixbuf, err := gdk.PixbufNew(gdk.COLORSPACE_RGB, true, 8, size, size)\n\tif err == nil && pixbuf != nil {\n\t\t// 0xAARRGGBB\n\t\tpixbuf.Fill(0xFF666666)\n\n\t\treturn pixbuf\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "cmd/gtk/assets/css/style.css",
    "content": ".inline_button {\n    padding: 2px;\n    margin-right: 3px;\n}\n\n.copyable_entry {\n    padding-right: 36px;\n}\n\n.warning {\n    color: red;\n}\n"
  },
  {
    "path": "cmd/gtk/assets/css.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport _ \"embed\"\n\n// Main CSS.\n\n//go:embed css/style.css\nvar MainWindowCSS string\n"
  },
  {
    "path": "cmd/gtk/assets/dialogs.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport (\n\t_ \"embed\"\n)\n\n// Dialogs/UI used by the GTK app.\n\n// About dialogs.\n\n//go:embed ui/dialog_about.ui\nvar DialogAboutUI []byte\n\n//go:embed ui/dialog_about_gtk.ui\nvar DialogAboutGTKUI []byte\n\n// Wallet dialogs.\n\n//go:embed ui/dialog_wallet_password.ui\nvar WalletPasswordDialogUI []byte\n\n//go:embed ui/dialog_wallet_create_address.ui\nvar WalletCreateAddressDialogUI []byte\n\n//go:embed ui/dialog_wallet_change_password.ui\nvar WalletChangePasswordDialogUI []byte\n\n//go:embed ui/dialog_wallet_set_default_fee.ui\nvar WalletSetDefaultFeeDialogUI []byte\n\n//go:embed ui/dialog_wallet_show_seed.ui\nvar WalletShowSeedDialogUI []byte\n\n// Address dialogs.\n\n//go:embed ui/dialog_address_label.ui\nvar AddressLabelDialogUI []byte\n\n//go:embed ui/dialog_address_details.ui\nvar AddressDetailsDialogUI []byte\n\n//go:embed ui/dialog_address_private_key.ui\nvar AddressPrivateKeyDialogUI []byte\n\n// Transaction dialogs.\n\n//go:embed ui/dialog_transaction_transfer.ui\nvar TxTransferDialogUI []byte\n\n//go:embed ui/dialog_transaction_bond.ui\nvar TxBondDialogUI []byte\n\n//go:embed ui/dialog_transaction_unbond.ui\nvar TxUnbondDialogUI []byte\n\n//go:embed ui/dialog_transaction_withdraw.ui\nvar TxWithdrawDialogUI []byte\n"
  },
  {
    "path": "cmd/gtk/assets/icons.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport (\n\t_ \"embed\"\n\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\nvar (\n\t//go:embed icons/add.svg\n\ticonAddData     []byte\n\tIconAddPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/ok.svg\n\ticonOKData     []byte\n\tIconOkPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/cancel.svg\n\ticonCancelData     []byte\n\tIconCancelPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/password.svg\n\ticonPasswordData     []byte\n\tIconPasswordPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/seed.svg\n\ticonSeedData     []byte\n\tIconSeedPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/close.svg\n\ticonCloseData     []byte\n\tIconClosePixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/send.svg\n\ticonSendData     []byte\n\tIconSendPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/fee.svg\n\ticonFeeData     []byte\n\tIconFeePixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/refresh.svg\n\ticonRefreshData     []byte\n\tIconRefreshPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/prev.svg\n\ticonPrevData     []byte\n\tIconPrevPixbuf16 *gdk.Pixbuf\n\n\t//go:embed icons/next.svg\n\ticonNextData     []byte\n\tIconNextPixbuf16 *gdk.Pixbuf\n)\n\nfunc initIcons() {\n\ttoPixbuf := func(data []byte) *gdk.Pixbuf {\n\t\tpixbuf, err := gtkutil.PixbufFromBytes(data, gtkutil.WithSize(16, 16))\n\t\tif err != nil {\n\t\t\treturn missingPixbuf(16)\n\t\t}\n\n\t\treturn pixbuf\n\t}\n\n\tIconAddPixbuf16 = toPixbuf(iconAddData)\n\tIconOkPixbuf16 = toPixbuf(iconOKData)\n\tIconCancelPixbuf16 = toPixbuf(iconCancelData)\n\tIconPasswordPixbuf16 = toPixbuf(iconPasswordData)\n\tIconSeedPixbuf16 = toPixbuf(iconSeedData)\n\tIconClosePixbuf16 = toPixbuf(iconCloseData)\n\tIconSendPixbuf16 = toPixbuf(iconSendData)\n\tIconFeePixbuf16 = toPixbuf(iconFeeData)\n\tIconRefreshPixbuf16 = toPixbuf(iconRefreshData)\n\tIconPrevPixbuf16 = toPixbuf(iconPrevData)\n\tIconNextPixbuf16 = toPixbuf(iconNextData)\n}\n"
  },
  {
    "path": "cmd/gtk/assets/images.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport (\n\t_ \"embed\"\n\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\nvar (\n\t//go:embed images/pactus.png\n\timagePactusLogoData   []byte\n\tImagePactusLogoPixbuf *gdk.Pixbuf\n\n\t//go:embed images/gtk.png\n\timageGTKLogoData   []byte\n\tImageGTKLogoPixbuf *gdk.Pixbuf\n\n\t//go:embed images/seed.svg\n\timageSeedData   []byte\n\tImageSeedPixbuf *gdk.Pixbuf\n)\n\nfunc initImages() {\n\ttoPixbuf := func(data []byte) *gdk.Pixbuf {\n\t\tpixbuf, err := gtkutil.PixbufFromBytes(data)\n\t\tif err != nil {\n\t\t\treturn missingPixbuf(128)\n\t\t}\n\n\t\treturn pixbuf\n\t}\n\n\tImagePactusLogoPixbuf = toPixbuf(imagePactusLogoData)\n\tImageGTKLogoPixbuf = toPixbuf(imageGTKLogoData)\n\tImageSeedPixbuf = toPixbuf(imageSeedData)\n}\n"
  },
  {
    "path": "cmd/gtk/assets/main_ui.go",
    "content": "//go:build gtk\n\npackage assets\n\nimport (\n\t_ \"embed\"\n)\n\n// Main window / widgets UI and CSS.\n\n//go:embed ui/main_window.ui\nvar MainWindowUI []byte\n\n//go:embed ui/widget_node.ui\nvar NodeWidgetUI []byte\n\n//go:embed ui/widget_wallet.ui\nvar WalletWidgetUI []byte\n\n//go:embed ui/widget_validator.ui\nvar ValidatorWidgetUI []byte\n\n//go:embed ui/widget_committee.ui\nvar CommitteeWidgetUI []byte\n\n//go:embed ui/widget_network.ui\nvar NetworkWidgetUI []byte\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_about.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.40.0 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkAboutDialog\" id=\"id_dialog_about\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">About Pactus</property>\n    <property name=\"type-hint\">dialog</property>\n    <property name=\"program-name\">Pactus</property>\n    <property name=\"version\">0.0.0</property>\n    <property name=\"comments\" translatable=\"yes\">\nBuilding Decentralized Future Together!\nPactus is a low-cost, high-performance, and scalable decentralized blockchain protocol with the SSPoS consensus mechanism.\n</property>\n    <property name=\"website\">https://pactus.org</property>\n    <property name=\"license-type\">mit-x11</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n      </object>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_about_gtk.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkAboutDialog\" id=\"id_dialog_about_gtk\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">About GTK</property>\n    <property name=\"type-hint\">dialog</property>\n    <property name=\"program-name\">GTK</property>\n    <property name=\"version\">Gtk – 3.0</property>\n    <property name=\"comments\" translatable=\"yes\">\nGTK is a free and open-source cross-platform widget toolkit for creating graphical user interfaces.\nIt is licensed under the terms of the GNU Lesser General Public License, allowing both free and proprietary software to use it.\n</property>\n    <property name=\"website\">https://www.gtk.org/</property>\n    <property name=\"license-type\">lgpl-2-1</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n      </object>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_address_details.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_address_details\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Address details</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_close\">\n                <property name=\"label\">_Close</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_close\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_close\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Address:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkOverlay\" id=\"id_overlay_address\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Public Key:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkOverlay\" id=\"id_overlay_public_key\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Derivation path:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_path\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"editable\">False</property>\n                <property name=\"width-chars\">32</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">5</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-7\">id_button_close</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_address_label.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_address_label\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Enter label</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"receives-default\">False</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_ok\">\n                <property name=\"label\">_Ok</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_ok\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_ok\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=1 n-rows=2 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Enter label for the address:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_label\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"width-chars\">32</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-2\">id_button_cancel</action-widget>\n      <action-widget response=\"-3\">id_button_ok</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_address_private_key.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_address_private_key\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Private key</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_close\">\n                <property name=\"label\">_Close</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_close\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_close\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Address:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_address\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"editable\">False</property>\n                <property name=\"width-chars\">32</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Private Key:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_private_key\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"editable\">False</property>\n                <property name=\"width-chars\">32</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">\n⚠️ Keep your private key secure.\n</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-7\">id_button_close</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_transaction_bond.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_transaction_bond\">\n    <property name=\"width-request\">600</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Broadcasting Bond transaction</property>\n    <property name=\"modal\">True</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_send\">\n                <property name=\"label\">_Send</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_send\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_send\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Account address:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_sender\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <signal name=\"changed\" handler=\"on_sender_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_sender\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Validator address:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"has-focus\">True</property>\n                <property name=\"is-focus\">True</property>\n                <property name=\"has-entry\">True</property>\n                <child internal-child=\"entry\">\n                  <object class=\"GtkEntry\">\n                    <property name=\"can-focus\">True</property>\n                    <signal name=\"changed\" handler=\"on_receiver_changed\" swapped=\"no\"/>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">5</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">6</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">7</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Validator public key (Optional; Only set when it is not your validator):</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">8</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_public_key\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">9</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">10</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Amount:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">11</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_amount\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_amount_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">12</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_amount\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">13</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">14</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Fee:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">15</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_fee_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">16</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">17</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">18</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Memo (Up to 64 characters, Optional):</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">19</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_memo\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">20</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-6\">id_button_cancel</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_transaction_transfer.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_transaction_transfer\">\n    <property name=\"width-request\">600</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Broadcasting Transfer transaction</property>\n    <property name=\"modal\">True</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_send\">\n                <property name=\"label\">_Send</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_send\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_send\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Sender:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_sender\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <signal name=\"changed\" handler=\"on_sender_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_sender\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Receiver:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <signal name=\"changed\" handler=\"on_receiver_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">5</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">6</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">7</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Amount:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">8</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_amount\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_amount_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">9</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_amount\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">10</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">11</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Fee:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">12</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_fee_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">13</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">14</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">15</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Memo (Up to 64 characters, Optional):</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">16</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_memo\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">17</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-6\">id_button_cancel</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_transaction_unbond.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_transaction_unbond\">\n    <property name=\"width-request\">600</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Broadcasting Unbond transaction</property>\n    <property name=\"modal\">True</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_send\">\n                <property name=\"label\">_Send</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_send\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_send\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Validator address:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_validator\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"has-focus\">True</property>\n                <property name=\"is-focus\">True</property>\n                <property name=\"has-entry\">True</property>\n                <child internal-child=\"entry\">\n                  <object class=\"GtkEntry\">\n                    <property name=\"can-focus\">True</property>\n                    <signal name=\"changed\" handler=\"on_validator_changed\" swapped=\"no\"/>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_validator\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Memo (Up to 64 characters, Optional):</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_memo\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">5</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-6\">id_button_cancel</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_transaction_withdraw.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_transaction_withdraw\">\n    <property name=\"width-request\">600</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Broadcasting Withdraw transaction</property>\n    <property name=\"modal\">True</property>\n    <property name=\"default-width\">480</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_send\">\n                <property name=\"label\">_Send</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_send\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_send\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"spacing\">4</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Sender:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_validator\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <signal name=\"changed\" handler=\"on_sender_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_validator\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Receiver:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"has-focus\">True</property>\n                <property name=\"is-focus\">True</property>\n                <property name=\"has-entry\">True</property>\n                <child internal-child=\"entry\">\n                  <object class=\"GtkEntry\">\n                    <property name=\"can-focus\">True</property>\n                    <signal name=\"changed\" handler=\"on_receiver_changed\" swapped=\"no\"/>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">5</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_receiver\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">6</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Stake:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">7</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_stake\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_stake_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">8</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_stake\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">9</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">10</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Fee:</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">12</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n                <property name=\"input-purpose\">number</property>\n                <signal name=\"changed\" handler=\"on_fee_changed\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">13</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_hint_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">14</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">15</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Memo (Up to 64 characters, Optional):</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">16</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_memo\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"caps-lock-warning\">False</property>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">17</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-6\">id_button_cancel</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_wallet_change_password.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_wallet_change_password\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Change password</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"receives-default\">False</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_ok\">\n                <property name=\"label\">_Ok</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_ok\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_ok\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=2 n-rows=3 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_label_old_password\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Old password:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_old_password\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"visibility\">False</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n                <property name=\"input-purpose\">password</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">New password:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_new_password\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"visibility\">False</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n                <property name=\"input-purpose\">password</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_repeat_password\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"visibility\">False</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n                <property name=\"input-purpose\">password</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">2</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Repeat:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">2</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-2\">id_button_cancel</action-widget>\n      <action-widget response=\"-3\">id_button_ok</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_wallet_create_address.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_wallet_create_address\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">New address</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"receives-default\">False</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_ok\">\n                <property name=\"label\">_Ok</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_ok\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_ok\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=2 n-rows=3 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_label_account_label\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Label:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_account_label\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Type:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkComboBoxText\" id=\"id_combo_address_type\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-2\">id_button_cancel</action-widget>\n      <action-widget response=\"-3\">id_button_ok</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_wallet_password.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_wallet_password\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Enter password</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"receives-default\">False</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_ok\">\n                <property name=\"label\">_Ok</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_ok\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_ok\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=1 n-rows=2 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_password\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"visibility\">False</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n                <property name=\"input-purpose\">password</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Enter your wallet password:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-2\">id_button_cancel</action-widget>\n      <action-widget response=\"-3\">id_button_ok</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_wallet_set_default_fee.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_wallet_set_default_fee\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Set Default Fee</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_cancel\">\n                <property name=\"label\">_Cancel</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"receives-default\">False</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_cancel\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_cancel\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_ok\">\n                <property name=\"label\">_Ok</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_ok\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_ok\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=2 n-rows=2 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Default Fee (PAC):</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkEntry\" id=\"id_entry_default_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"activates-default\">True</property>\n                <property name=\"width-chars\">24</property>\n                <property name=\"input-purpose\">number</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_label_current_fee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\" translatable=\"yes\">Current:</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\" id=\"id_label_current_fee_value\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"label\">0.01 PAC</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-2\">id_button_cancel</action-widget>\n      <action-widget response=\"-3\">id_button_ok</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/dialog_wallet_show_seed.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkDialog\" id=\"id_dialog_wallet_show_seed\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Wallet seed</property>\n    <property name=\"default-width\">320</property>\n    <property name=\"type-hint\">dialog</property>\n    <child internal-child=\"vbox\">\n      <object class=\"GtkBox\">\n        <property name=\"can-focus\">False</property>\n        <property name=\"margin-start\">8</property>\n        <property name=\"margin-end\">8</property>\n        <property name=\"margin-top\">4</property>\n        <property name=\"margin-bottom\">4</property>\n        <property name=\"orientation\">vertical</property>\n        <property name=\"spacing\">2</property>\n        <child internal-child=\"action_area\">\n          <object class=\"GtkButtonBox\">\n            <property name=\"can-focus\">False</property>\n            <property name=\"layout-style\">end</property>\n            <child>\n              <object class=\"GtkButton\" id=\"id_button_close\">\n                <property name=\"label\">_Close</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"focus-on-click\">False</property>\n                <property name=\"can-default\">True</property>\n                <property name=\"has-default\">True</property>\n                <property name=\"receives-default\">True</property>\n                <property name=\"use-underline\">True</property>\n                <property name=\"always-show-image\">True</property>\n                <signal name=\"activate\" handler=\"on_close\" swapped=\"no\"/>\n                <signal name=\"clicked\" handler=\"on_close\" swapped=\"no\"/>\n              </object>\n              <packing>\n                <property name=\"expand\">True</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">False</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <!-- n-columns=2 n-rows=2 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">8</property>\n            <property name=\"column-spacing\">8</property>\n            <child>\n              <object class=\"GtkTextView\" id=\"id_textview_seed\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"editable\">False</property>\n                <property name=\"wrap-mode\">word</property>\n                <property name=\"left-margin\">2</property>\n                <property name=\"right-margin\">2</property>\n                <property name=\"top-margin\">2</property>\n                <property name=\"bottom-margin\">2</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkImage\" id=\"id_image_seed\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"stock\">gtk-missing-image</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">&lt;span allow_breaks=\"true\"&gt;\n&lt;b&gt;⚠️ CRITICAL: Write down this seed phrase and store it safely!&lt;/b&gt;\n     This is the ONLY way to recover your wallet if needed.\n     Never share it with anyone or store it electronically.&lt;/span&gt;\n                </property>\n                <property name=\"use-markup\">True</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">True</property>\n            <property name=\"fill\">True</property>\n            <property name=\"padding\">8</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n    <action-widgets>\n      <action-widget response=\"-3\">id_button_close</action-widget>\n    </action-widgets>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/main_window.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.40.0 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkApplicationWindow\" id=\"id_main_window\">\n    <property name=\"can-focus\">False</property>\n    <property name=\"title\" translatable=\"yes\">Pactus GUI</property>\n    <property name=\"default-width\">880</property>\n    <property name=\"default-height\">440</property>\n    <child>\n      <object class=\"GtkBox\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">False</property>\n        <property name=\"orientation\">vertical</property>\n        <child>\n          <object class=\"GtkMenuBar\" id=\"id_menu_bar\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <child>\n              <object class=\"GtkMenuItem\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">_File</property>\n                <property name=\"use-underline\">True</property>\n                <child type=\"submenu\">\n                  <object class=\"GtkMenu\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <child>\n                      <object class=\"GtkSeparatorMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\">_Quit</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_quit\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                  </object>\n                </child>\n              </object>\n            </child>\n            <child>\n              <object class=\"GtkMenuItem\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">_Wallet</property>\n                <property name=\"use-underline\">True</property>\n                <child type=\"submenu\">\n                  <object class=\"GtkMenu\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <child>\n                      <object class=\"GtkMenuItem\" id=\"id_menu_new_address\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_New Address</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_wallet_new_address\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkSeparatorMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\" id=\"id_menu_change_password\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">Change _Password</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_wallet_change_password\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\" id=\"id_menu_show_seed\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">Show _Seed</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_wallet_show_seed\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkSeparatorMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\" id=\"id_menu_set_default_fee\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">Set Default _Fee</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_wallet_set_default_fee\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                  </object>\n                </child>\n              </object>\n            </child>\n            <child>\n              <object class=\"GtkMenuItem\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">_Transaction</property>\n                <property name=\"use-underline\">True</property>\n                <child type=\"submenu\">\n                  <object class=\"GtkMenu\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Transfer</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_transaction_transfer\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Bond</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_transaction_bond\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Unbond</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_transaction_unbond\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Withdraw</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_transaction_withdraw\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                  </object>\n                </child>\n              </object>\n            </child>\n            <child>\n              <object class=\"GtkMenuItem\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">_Help</property>\n                <property name=\"use-underline\">True</property>\n                <child type=\"submenu\">\n                  <object class=\"GtkMenu\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Website</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_open_website\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Explorer</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_open_explorer\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">_Documentation</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_open_docs\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkSeparatorMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">About _Pactus</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_about\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                    <child>\n                      <object class=\"GtkMenuItem\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"label\" translatable=\"yes\">About _GTK</property>\n                        <property name=\"use-underline\">True</property>\n                        <signal name=\"activate\" handler=\"on_about_gtk\" swapped=\"no\"/>\n                      </object>\n                    </child>\n                  </object>\n                </child>\n              </object>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">True</property>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkNotebook\" id=\"id_notebook\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">True</property>\n            <property name=\"vexpand\">True</property>\n            <child>\n              <object class=\"GtkBox\" id=\"id_box_node\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"homogeneous\">True</property>\n                <child>\n                  <placeholder/>\n                </child>\n              </object>\n            </child>\n            <child type=\"tab\">\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">Node </property>\n                <property name=\"justify\">right</property>\n              </object>\n              <packing>\n                <property name=\"tab-fill\">False</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkBox\" id=\"id_box_committee\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"homogeneous\">True</property>\n                <child>\n                  <placeholder/>\n                </child>\n              </object>\n              <packing>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n            <child type=\"tab\">\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">Committee</property>\n              </object>\n              <packing>\n                <property name=\"position\">1</property>\n                <property name=\"tab-fill\">False</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkBox\" id=\"id_box_network\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"homogeneous\">True</property>\n                <child>\n                  <placeholder/>\n                </child>\n              </object>\n              <packing>\n                <property name=\"position\">2</property>\n              </packing>\n            </child>\n            <child type=\"tab\">\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">Network</property>\n              </object>\n              <packing>\n                <property name=\"position\">2</property>\n                <property name=\"tab-fill\">False</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkBox\" id=\"id_box_validators\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"homogeneous\">True</property>\n                <child>\n                  <placeholder/>\n                </child>\n              </object>\n              <packing>\n                <property name=\"position\">3</property>\n              </packing>\n            </child>\n            <child type=\"tab\">\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">My Validators</property>\n              </object>\n              <packing>\n                <property name=\"position\">3</property>\n                <property name=\"tab-fill\">False</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkBox\" id=\"id_box_default_wallet\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"homogeneous\">True</property>\n                <child>\n                  <placeholder/>\n                </child>\n              </object>\n              <packing>\n                <property name=\"position\">4</property>\n              </packing>\n            </child>\n            <child type=\"tab\">\n              <object class=\"GtkLabel\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"label\" translatable=\"yes\">Default wallet</property>\n              </object>\n              <packing>\n                <property name=\"position\">4</property>\n                <property name=\"tab-fill\">False</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"expand\">False</property>\n            <property name=\"fill\">True</property>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n      </object>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/widget_committee.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkBox\" id=\"id_box_committee\">\n    <property name=\"visible\">True</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"orientation\">vertical</property>\n    <property name=\"homogeneous\">True</property>\n    <child>\n      <object class=\"GtkNotebook\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">True</property>\n        <property name=\"tab-pos\">left</property>\n        <child>\n          <object class=\"GtkScrolledWindow\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"hexpand\">True</property>\n            <property name=\"vexpand\">True</property>\n            <child>\n              <object class=\"GtkGrid\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"margin-start\">12</property>\n                <property name=\"margin-end\">12</property>\n                <property name=\"margin-top\">12</property>\n                <property name=\"margin-bottom\">12</property>\n                <property name=\"row-spacing\">6</property>\n                <property name=\"column-spacing\">12</property>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Committee Size:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">0</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_committee_size\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"selectable\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">0</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Committee Power:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">1</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_committee_power\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"selectable\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">1</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Total Power:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">2</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_total_power\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"selectable\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">2</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Protocol Versions:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">3</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_protocol_versions\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"valign\">start</property>\n                    <property name=\"selectable\">True</property>\n                    <property name=\"wrap\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">3</property>\n                  </packing>\n                </child>\n              </object>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Info</property>\n          </object>\n          <packing>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkScrolledWindow\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">True</property>\n            <property name=\"hexpand\">True</property>\n            <property name=\"vexpand\">True</property>\n            <property name=\"shadow-type\">in</property>\n            <child>\n              <object class=\"GtkTreeView\" id=\"id_treeview_committee_members\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <child internal-child=\"selection\">\n                  <object class=\"GtkTreeSelection\"/>\n                </child>\n              </object>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Members</property>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n      </object>\n      <packing>\n        <property name=\"expand\">True</property>\n        <property name=\"fill\">True</property>\n        <property name=\"position\">0</property>\n      </packing>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/widget_network.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkBox\" id=\"id_box_network\">\n    <property name=\"visible\">True</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"orientation\">vertical</property>\n    <property name=\"homogeneous\">True</property>\n    <child>\n      <object class=\"GtkNotebook\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">True</property>\n        <property name=\"tab-pos\">left</property>\n        <child>\n          <object class=\"GtkScrolledWindow\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"hexpand\">True</property>\n            <property name=\"vexpand\">True</property>\n            <child>\n              <object class=\"GtkGrid\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"margin-start\">12</property>\n                <property name=\"margin-end\">12</property>\n                <property name=\"margin-top\">12</property>\n                <property name=\"margin-bottom\">12</property>\n                <property name=\"row-spacing\">6</property>\n                <property name=\"column-spacing\">12</property>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Network Name:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">0</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_network_name\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"selectable\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">0</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"label\" translatable=\"yes\">Connected Peers:</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">0</property>\n                    <property name=\"top-attach\">1</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkLabel\" id=\"id_label_connected_peers\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"selectable\">True</property>\n                  </object>\n                  <packing>\n                    <property name=\"left-attach\">1</property>\n                    <property name=\"top-attach\">1</property>\n                  </packing>\n                </child>\n              </object>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">0</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Info</property>\n          </object>\n          <packing>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkScrolledWindow\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">True</property>\n            <property name=\"hexpand\">True</property>\n            <property name=\"vexpand\">True</property>\n            <property name=\"shadow-type\">in</property>\n            <child>\n              <object class=\"GtkTreeView\" id=\"id_treeview_peers\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <child internal-child=\"selection\">\n                  <object class=\"GtkTreeSelection\"/>\n                </child>\n              </object>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Peers</property>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n      </object>\n      <packing>\n        <property name=\"expand\">True</property>\n        <property name=\"fill\">True</property>\n        <property name=\"position\">0</property>\n      </packing>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/widget_node.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkBox\" id=\"id_box_node\">\n    <property name=\"visible\">True</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"orientation\">vertical</property>\n    <property name=\"baseline-position\">top</property>\n    <child>\n      <!-- n-columns=4 n-rows=3 -->\n      <object class=\"GtkGrid\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">False</property>\n        <property name=\"row-spacing\">6</property>\n        <property name=\"column-spacing\">6</property>\n        <child>\n          <object class=\"GtkFixed\">\n            <property name=\"width-request\">32</property>\n            <property name=\"height-request\">32</property>\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n          </object>\n          <packing>\n            <property name=\"left-attach\">0</property>\n            <property name=\"top-attach\">0</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"valign\">start</property>\n            <property name=\"vexpand\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <property name=\"baseline-position\">top</property>\n            <child>\n              <object class=\"GtkFrame\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"valign\">start</property>\n                <property name=\"margin-start\">6</property>\n                <property name=\"margin-end\">6</property>\n                <property name=\"margin-top\">6</property>\n                <property name=\"margin-bottom\">6</property>\n                <property name=\"hexpand\">False</property>\n                <property name=\"label-xalign\">0.019999999552965164</property>\n                <property name=\"shadow-type\">in</property>\n                <child>\n                  <!-- n-columns=2 n-rows=13 -->\n                  <object class=\"GtkGrid\">\n                    <property name=\"width-request\">400</property>\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"valign\">start</property>\n                    <property name=\"margin-start\">6</property>\n                    <property name=\"margin-end\">6</property>\n                    <property name=\"margin-top\">6</property>\n                    <property name=\"margin-bottom\">6</property>\n                    <property name=\"hexpand\">True</property>\n                    <property name=\"row-spacing\">6</property>\n                    <property name=\"column-spacing\">6</property>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_connection_type\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\"></property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_connection_value\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🌐 Network:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_network\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🧾 Network ID:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_network_id\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🤖 Node Agent:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_agent\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">⏰ Clock Offset:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_clock_offset\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">📡 Connections:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_num_connections\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🔰 Moniker:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">6</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_moniker\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">6</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🔍 Reachability:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">7</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_reachability\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">7</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">✂️ Pruned:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">8</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_is_prune\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">8</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">⛓️ Last Block Height:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">9</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_last_block_height\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">9</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🕔 Last Block Time:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">10</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_last_block_time\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">10</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">📦 Remaining Blocks:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">11</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_blocks_left\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">11</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">🔄 Syncing Progress:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">12</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkProgressBar\" id=\"id_progress_synced\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"vexpand\">False</property>\n                        <property name=\"pulse-step\">0.01</property>\n                        <property name=\"show-text\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">12</property>\n                      </packing>\n                    </child>\n                  </object>\n                </child>\n                <child type=\"label\">\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"label\" translatable=\"yes\">Node info</property>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkFrame\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"valign\">start</property>\n                <property name=\"margin-left\">6</property>\n                <property name=\"margin-right\">6</property>\n                <property name=\"margin-start\">6</property>\n                <property name=\"margin-end\">6</property>\n                <property name=\"margin-top\">6</property>\n                <property name=\"margin-bottom\">6</property>\n                <property name=\"hexpand\">False</property>\n                <property name=\"label-xalign\">0.019999999552965164</property>\n                <property name=\"shadow-type\">in</property>\n                <child>\n                  <!-- n-columns=2 n-rows=6 -->\n                  <object class=\"GtkGrid\">\n                    <property name=\"width-request\">400</property>\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"halign\">start</property>\n                    <property name=\"valign\">start</property>\n                    <property name=\"margin-left\">6</property>\n                    <property name=\"margin-right\">6</property>\n                    <property name=\"margin-start\">6</property>\n                    <property name=\"margin-end\">6</property>\n                    <property name=\"margin-top\">6</property>\n                    <property name=\"margin-bottom\">6</property>\n                    <property name=\"hexpand\">True</property>\n                    <property name=\"row-spacing\">6</property>\n                    <property name=\"column-spacing\">6</property>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">👥 Committee Size:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">💎 In Committee Now:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">⚡️ Committee Power:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_committee_size\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_in_committee\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_committee_power\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_total_power\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">✨ Total Power:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">✅ Active Validators:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_active_validators\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">📈 Average Score:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_average_score\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                  </object>\n                </child>\n                <child type=\"label\">\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"label\" translatable=\"yes\">Committee info</property>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"left-attach\">1</property>\n            <property name=\"top-attach\">1</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkFixed\">\n            <property name=\"width-request\">32</property>\n            <property name=\"height-request\">32</property>\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n          </object>\n          <packing>\n            <property name=\"left-attach\">2</property>\n            <property name=\"top-attach\">2</property>\n          </packing>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n        <child>\n          <placeholder/>\n        </child>\n      </object>\n      <packing>\n        <property name=\"expand\">False</property>\n        <property name=\"fill\">True</property>\n        <property name=\"position\">0</property>\n      </packing>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/widget_validator.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.40.0 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkBox\" id=\"id_box_validator\">\n    <property name=\"visible\">True</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"orientation\">vertical</property>\n    <child>\n      <object class=\"GtkScrolledWindow\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">True</property>\n        <property name=\"hexpand\">True</property>\n        <property name=\"vexpand\">True</property>\n        <property name=\"shadow-type\">in</property>\n        <child>\n          <object class=\"GtkTreeView\" id=\"id_treeview_validators\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">True</property>\n            <child internal-child=\"selection\">\n              <object class=\"GtkTreeSelection\"/>\n            </child>\n          </object>\n        </child>\n      </object>\n      <packing>\n        <property name=\"expand\">True</property>\n        <property name=\"fill\">True</property>\n        <property name=\"position\">0</property>\n      </packing>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/assets/ui/widget_wallet.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Generated with glade 3.38.2 -->\n<interface>\n  <requires lib=\"gtk+\" version=\"3.24\"/>\n  <object class=\"GtkBox\" id=\"id_box_wallet\">\n    <property name=\"visible\">True</property>\n    <property name=\"can-focus\">False</property>\n    <property name=\"orientation\">vertical</property>\n    <property name=\"homogeneous\">True</property>\n    <child>\n      <object class=\"GtkNotebook\">\n        <property name=\"visible\">True</property>\n        <property name=\"can-focus\">True</property>\n        <property name=\"tab-pos\">left</property>\n        <child>\n          <!-- n-columns=3 n-rows=3 -->\n          <object class=\"GtkGrid\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"row-spacing\">6</property>\n            <property name=\"column-spacing\">6</property>\n            <child>\n              <object class=\"GtkFrame\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"halign\">start</property>\n                <property name=\"valign\">start</property>\n                <property name=\"margin-start\">6</property>\n                <property name=\"margin-end\">6</property>\n                <property name=\"margin-top\">6</property>\n                <property name=\"margin-bottom\">6</property>\n                <property name=\"hexpand\">True</property>\n                <property name=\"label-xalign\">0.019999999552965164</property>\n                <property name=\"shadow-type\">in</property>\n                <child>\n                  <!-- n-columns=2 n-rows=8 -->\n                  <object class=\"GtkGrid\">\n                    <property name=\"width-request\">400</property>\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"margin-start\">6</property>\n                    <property name=\"margin-end\">6</property>\n                    <property name=\"margin-top\">6</property>\n                    <property name=\"margin-bottom\">6</property>\n                    <property name=\"row-spacing\">6</property>\n                    <property name=\"column-spacing\">6</property>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Name:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Location:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_name\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">0</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_location\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">1</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_encrypted\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Encrypted:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">4</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Total Balance:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_total_balance\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">5</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Total Stake:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">6</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_total_stake\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">6</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Default Fee:</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">7</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_default_fee\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">7</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Driver:</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"label\" translatable=\"yes\">Created At:</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">0</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_driver\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">2</property>\n                      </packing>\n                    </child>\n                    <child>\n                      <object class=\"GtkLabel\" id=\"id_label_wallet_created_at\">\n                        <property name=\"visible\">True</property>\n                        <property name=\"can-focus\">False</property>\n                        <property name=\"halign\">start</property>\n                        <property name=\"valign\">start</property>\n                        <property name=\"hexpand\">True</property>\n                        <property name=\"vexpand\">True</property>\n                        <property name=\"selectable\">True</property>\n                      </object>\n                      <packing>\n                        <property name=\"left-attach\">1</property>\n                        <property name=\"top-attach\">3</property>\n                      </packing>\n                    </child>\n                  </object>\n                </child>\n                <child type=\"label\">\n                  <object class=\"GtkLabel\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"label\" translatable=\"yes\">Overview</property>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"left-attach\">1</property>\n                <property name=\"top-attach\">1</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkFixed\">\n                <property name=\"width-request\">32</property>\n                <property name=\"height-request\">32</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">0</property>\n                <property name=\"top-attach\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkFixed\">\n                <property name=\"width-request\">32</property>\n                <property name=\"height-request\">32</property>\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n              </object>\n              <packing>\n                <property name=\"left-attach\">2</property>\n                <property name=\"top-attach\">2</property>\n              </packing>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n            <child>\n              <placeholder/>\n            </child>\n          </object>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Overview</property>\n          </object>\n          <packing>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <child>\n              <object class=\"GtkScrolledWindow\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <property name=\"vexpand\">True</property>\n                <child>\n                  <object class=\"GtkTreeView\" id=\"id_treeview_addresses\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">True</property>\n                    <child internal-child=\"selection\">\n                      <object class=\"GtkTreeSelection\"/>\n                    </child>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkToolbar\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_refresh_addresses\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Refresh wallet addresses</property>\n                    <property name=\"is-important\">True</property>\n                    <property name=\"label\" translatable=\"yes\">_Refresh</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_address_refresh\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_new_address\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Create a new address</property>\n                    <property name=\"is-important\">True</property>\n                    <property name=\"label\" translatable=\"yes\">_New Address</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_new_address\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_set_default_fee\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Set the default fee of the wallet</property>\n                    <property name=\"is-important\">True</property>\n                    <property name=\"label\" translatable=\"yes\">Default _Fee</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_set_default_fee\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_change_password\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Change the wallet password</property>\n                    <property name=\"label\" translatable=\"yes\">Change _Password</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_change_password\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_show_seed\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Show the wallet seed</property>\n                    <property name=\"label\" translatable=\"yes\">_Seed</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_show_seed\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Addresses</property>\n          </object>\n          <packing>\n            <property name=\"position\">1</property>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n        <child>\n          <object class=\"GtkBox\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"orientation\">vertical</property>\n            <child>\n              <object class=\"GtkScrolledWindow\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">True</property>\n                <property name=\"vexpand\">True</property>\n                <child>\n                  <object class=\"GtkTreeView\" id=\"id_treeview_transactions\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">True</property>\n                    <child internal-child=\"selection\">\n                      <object class=\"GtkTreeSelection\"/>\n                    </child>\n                  </object>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">0</property>\n              </packing>\n            </child>\n            <child>\n              <object class=\"GtkToolbar\">\n                <property name=\"visible\">True</property>\n                <property name=\"can-focus\">False</property>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_tx_refresh\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Reload transactions</property>\n                    <property name=\"is-important\">True</property>\n                    <property name=\"label\" translatable=\"yes\">_Refresh</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_tx_refresh\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_tx_prev\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Previous page</property>\n                    <property name=\"label\" translatable=\"yes\">_Prev</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_tx_prev\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n                <child>\n                  <object class=\"GtkToolButton\" id=\"id_button_tx_next\">\n                    <property name=\"visible\">True</property>\n                    <property name=\"can-focus\">False</property>\n                    <property name=\"tooltip-text\" translatable=\"yes\">Next page</property>\n                    <property name=\"label\" translatable=\"yes\">_Next</property>\n                    <property name=\"use-underline\">True</property>\n                    <signal name=\"clicked\" handler=\"on_tx_next\" swapped=\"no\"/>\n                  </object>\n                  <packing>\n                    <property name=\"expand\">False</property>\n                    <property name=\"homogeneous\">True</property>\n                  </packing>\n                </child>\n              </object>\n              <packing>\n                <property name=\"expand\">False</property>\n                <property name=\"fill\">True</property>\n                <property name=\"position\">1</property>\n              </packing>\n            </child>\n          </object>\n          <packing>\n            <property name=\"position\">2</property>\n          </packing>\n        </child>\n        <child type=\"tab\">\n          <object class=\"GtkLabel\">\n            <property name=\"visible\">True</property>\n            <property name=\"can-focus\">False</property>\n            <property name=\"label\" translatable=\"yes\">Transactions</property>\n          </object>\n          <packing>\n            <property name=\"position\">2</property>\n            <property name=\"tab-fill\">False</property>\n          </packing>\n        </child>\n      </object>\n      <packing>\n        <property name=\"expand\">False</property>\n        <property name=\"fill\">True</property>\n        <property name=\"position\">0</property>\n      </packing>\n    </child>\n  </object>\n</interface>\n"
  },
  {
    "path": "cmd/gtk/controller/address_details_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype AddressDetailsDialogController struct {\n\tview  *view.AddressDetailsDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewAddressDetailsDialogController(\n\tview *view.AddressDetailsDialogView,\n\tmodel *model.WalletModel,\n) *AddressDetailsDialogController {\n\treturn &AddressDetailsDialogController{view: view, model: model}\n}\n\nfunc (c *AddressDetailsDialogController) Run(addr string) {\n\tinfo := c.model.AddressInfo(addr)\n\tif info == nil {\n\t\tgtkutil.ShowErrorDialog(nil, \"address not found\")\n\n\t\treturn\n\t}\n\n\tc.view.AddressEntry.SetText(info.Address)\n\tc.view.PubKeyEntry.SetText(info.PublicKey)\n\tc.view.PathEntry.SetText(info.Path)\n\n\tonClose := func() { c.view.Dialog.Close() }\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_close\": onClose,\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/address_label_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype AddressLabelDialogController struct {\n\tview  *view.AddressLabelDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewAddressLabelDialogController(\n\tview *view.AddressLabelDialogView,\n\tmodel *model.WalletModel,\n) *AddressLabelDialogController {\n\treturn &AddressLabelDialogController{view: view, model: model}\n}\n\nfunc (c *AddressLabelDialogController) Run(address string) {\n\toldLabel := c.model.AddressLabel(address)\n\tc.view.LabelEntry.SetText(oldLabel)\n\n\tonOk := func() {\n\t\tnewLabel := gtkutil.GetEntryText(c.view.LabelEntry)\n\t\tif err := c.model.SetAddressLabel(address, newLabel); err != nil {\n\t\t\tgtkutil.ShowError(err)\n\n\t\t\treturn\n\t\t}\n\t\tc.view.Dialog.Close()\n\t}\n\tonCancel := func() {\n\t\tc.view.Dialog.Close()\n\t}\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_ok\":     onOk,\n\t\t\"on_cancel\": onCancel,\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/address_private_key_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype AddressPrivateKeyDialogController struct {\n\tview  *view.AddressPrivateKeyDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewAddressPrivateKeyDialogController(\n\tview *view.AddressPrivateKeyDialogView,\n\tmodel *model.WalletModel,\n) *AddressPrivateKeyDialogController {\n\treturn &AddressPrivateKeyDialogController{view: view, model: model}\n}\n\nfunc (c *AddressPrivateKeyDialogController) Run(addr string) {\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\n\tprv, err := c.model.PrivateKey(password, addr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tc.view.AddressEntry.SetText(addr)\n\tc.view.PrvKeyEntry.SetText(prv.String())\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_close\": func() { c.view.Dialog.Close() },\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/committee_widget_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\ntype CommitteeWidgetController struct {\n\tview  *view.CommitteeWidgetView\n\tmodel *model.CommitteeModel\n}\n\nfunc NewCommitteeWidgetController(\n\tview *view.CommitteeWidgetView, model *model.CommitteeModel,\n) *CommitteeWidgetController {\n\treturn &CommitteeWidgetController{view: view, model: model}\n}\n\nfunc (c *CommitteeWidgetController) BuildView(ctx context.Context) error {\n\tscheduler.Every(10*time.Second).Do(ctx, c.refresh)\n\n\tc.refresh(ctx)\n\n\treturn nil\n}\n\nfunc (c *CommitteeWidgetController) refresh(_ context.Context) {\n\tres, err := c.model.GetCommitteeInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tcommitteePowerStr := amount.Amount(res.CommitteePower).String()\n\ttotalPowerStr := amount.Amount(res.TotalPower).String()\n\n\t// Protocol versions: map[int32]float64 -> \"v1: 80%, v2: 20%\"\n\tprotocolLines := make([]string, 0, len(res.ProtocolVersions))\n\tfor ver, percentage := range res.ProtocolVersions {\n\t\tprotocolLines = append(protocolLines, fmt.Sprintf(\"%s: %.2f%%\", protocol.Version(ver), percentage))\n\t}\n\tslices.SortFunc(protocolLines, strings.Compare)\n\tprotocolStr := \"\"\n\tfor i, s := range protocolLines {\n\t\tif i > 0 {\n\t\t\tprotocolStr += \", \"\n\t\t}\n\t\tprotocolStr += s\n\t}\n\tif protocolStr == \"\" {\n\t\tprotocolStr = \"—\"\n\t}\n\n\tgtkutil.IdleAddAsync(func() {\n\t\tc.view.LabelCommitteeSize.SetText(strconv.Itoa(int(res.CommitteeSize)))\n\t\tc.view.LabelCommitteePower.SetText(committeePowerStr)\n\t\tc.view.LabelTotalPower.SetText(totalPowerStr)\n\t\tc.view.LabelProtocolVersions.SetText(protocolStr)\n\n\t\tc.view.ClearRows()\n\t\tfor i, val := range res.Validators {\n\t\t\tstakeStr := amount.Amount(val.GetStake()).String()\n\t\t\tc.view.AppendRow(\n\t\t\t\t[]int{0, 1, 2, 3, 4, 5, 6, 7},\n\t\t\t\t[]any{\n\t\t\t\t\tstrconv.Itoa(i + 1),\n\t\t\t\t\tval.GetAddress(),\n\t\t\t\t\tstrconv.Itoa(int(val.GetNumber())),\n\t\t\t\t\tstakeStr,\n\t\t\t\t\tstrconv.Itoa(int(val.GetLastBondingHeight())),\n\t\t\t\t\tstrconv.Itoa(int(val.GetLastSortitionHeight())),\n\t\t\t\t\tstrconv.Itoa(int(val.GetProtocolVersion())),\n\t\t\t\t\tgtkutil.AvailabilityScorePercent(val.GetAvailabilityScore()),\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "cmd/gtk/controller/controller.go",
    "content": "//go:build gtk\n\npackage controller\n"
  },
  {
    "path": "cmd/gtk/controller/main_window_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype MainWindowController struct {\n\tview *view.MainWindowView\n}\n\nfunc NewMainWindowController(view *view.MainWindowView) *MainWindowController {\n\treturn &MainWindowController{view: view}\n}\n\nfunc (c *MainWindowController) BuildView(nav *Navigator) {\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.ConnectSignals(map[string]any{\n\t\t\t\"on_quit\":                   nav.Quit,\n\t\t\t\"on_transaction_transfer\":   nav.ShowTransactionTransfer,\n\t\t\t\"on_transaction_bond\":       nav.ShowTransactionBond,\n\t\t\t\"on_transaction_unbond\":     nav.ShowTransactionUnbond,\n\t\t\t\"on_transaction_withdraw\":   nav.ShowTransactionWithdraw,\n\t\t\t\"on_wallet_new_address\":     nav.ShowWalletNewAddress,\n\t\t\t\"on_wallet_change_password\": nav.ShowWalletChangePassword,\n\t\t\t\"on_wallet_show_seed\":       nav.ShowWalletShowSeed,\n\t\t\t\"on_wallet_set_default_fee\": nav.ShowWalletSetDefaultFee,\n\t\t\t\"on_about_gtk\":              nav.ShowAboutGtk,\n\t\t\t\"on_about\":                  nav.ShowAbout,\n\t\t\t\"on_open_explorer\":          nav.BrowseExplorer,\n\t\t\t\"on_open_website\":           nav.BrowseWebsite,\n\t\t\t\"on_open_docs\":              nav.BrowseDocs,\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "cmd/gtk/controller/navigator.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\n// Navigator owns dialog creation and UI flows (open -> run -> post-actions).\ntype Navigator struct {\n\twalletModel *model.WalletModel\n\twalletCtrl  *WalletWidgetController\n\tgtkApp      *gtk.Application\n}\n\nfunc NewNavigator(gtkApp *gtk.Application,\n\twalletModel *model.WalletModel, walletCtrl *WalletWidgetController,\n) *Navigator {\n\treturn &Navigator{\n\t\twalletModel: walletModel,\n\t\twalletCtrl:  walletCtrl,\n\t\tgtkApp:      gtkApp,\n\t}\n}\n\nfunc (*Navigator) ShowAbout() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlg := view.NewAboutDialog()\n\t\tdlg.SetVersion(version.NodeVersion().StringWithAlias())\n\t\tgtkutil.RunDialog(&dlg.Dialog)\n\t})\n}\n\nfunc (*Navigator) ShowAboutGtk() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlg := view.NewAboutGTKDialog()\n\t\tdlg.Dialog.SetModal(true)\n\t\tgtkutil.RunDialog(&dlg.Dialog)\n\t})\n}\n\nfunc (n *Navigator) ShowWalletShowSeed() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlgView := view.NewWalletSeedDialogView()\n\t\tdlgCtrl := NewWalletSeedDialogController(dlgView, n.walletModel)\n\t\tdlgCtrl.Run()\n\t})\n}\n\nfunc (n *Navigator) ShowWalletNewAddress() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlgView := view.NewWalletCreateAddressDialogView()\n\t\tdlgCtrl := NewWalletCreateAddressDialogController(dlgView, n.walletModel)\n\t\tdlgCtrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshAddresses()\n\t}()\n}\n\nfunc (n *Navigator) ShowWalletSetDefaultFee() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlgView := view.NewWalletDefaultFeeDialogView()\n\t\tdlgCtrl := NewWalletDefaultFeeDialogController(dlgView, n.walletModel)\n\t\tdlgCtrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshInfo()\n\t}()\n}\n\nfunc (n *Navigator) ShowWalletChangePassword() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdlgView := view.NewWalletChangePasswordDialogView()\n\t\tdlgCtrl := NewWalletChangePasswordDialogController(dlgView, n.walletModel)\n\t\tdlgCtrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshInfo()\n\t}()\n}\n\nfunc (n *Navigator) ShowTransactionTransfer() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdialogView := view.NewTxTransferDialogView()\n\t\tctrl := NewTxTransferDialogController(dialogView, n.walletModel)\n\t\tctrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshTransactions()\n\t}()\n}\n\nfunc (n *Navigator) ShowTransactionBond() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdialogView := view.NewTxBondDialogView()\n\t\tctrl := NewTxBondDialogController(dialogView, n.walletModel)\n\t\tctrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshTransactions()\n\t}()\n}\n\nfunc (n *Navigator) ShowTransactionUnbond() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdialogView := view.NewTxUnbondDialogView()\n\t\tctrl := NewTxUnbondDialogController(dialogView, n.walletModel)\n\t\tctrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshTransactions()\n\t}()\n}\n\nfunc (n *Navigator) ShowTransactionWithdraw() {\n\tgtkutil.IdleAddSync(func() {\n\t\tdialogView := view.NewTxWithdrawDialogView()\n\t\tctrl := NewTxWithdrawDialogController(dialogView, n.walletModel)\n\t\tctrl.Run()\n\t})\n\n\tgo func() {\n\t\tn.walletCtrl.RefreshTransactions()\n\t}()\n}\n\nfunc (n *Navigator) BrowseWebsite() {\n\tn.openWebsite(\"https://pactus.org/\")\n}\n\nfunc (n *Navigator) BrowseExplorer() {\n\tn.openWebsite(\"https://pacviewer.com/\")\n}\n\nfunc (n *Navigator) BrowseDocs() {\n\tn.openWebsite(\"https://docs.pactus.org/\")\n}\n\nfunc (*Navigator) openWebsite(url string) {\n\t_ = gtkutil.OpenURLInBrowser(url)\n}\n\nfunc (n *Navigator) Quit() {\n\tn.gtkApp.Quit()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/network_widget_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\nfunc peerDirectionString(d pactus.Direction) string {\n\tswitch d {\n\tcase pactus.Direction_DIRECTION_UNKNOWN:\n\t\treturn \"Unknown\"\n\tcase pactus.Direction_DIRECTION_INBOUND:\n\t\treturn \"Inbound\"\n\tcase pactus.Direction_DIRECTION_OUTBOUND:\n\t\treturn \"Outbound\"\n\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\ntype NetworkWidgetController struct {\n\tview  *view.NetworkWidgetView\n\tmodel *model.NetworkModel\n}\n\nfunc NewNetworkWidgetController(\n\tview *view.NetworkWidgetView, model *model.NetworkModel,\n) *NetworkWidgetController {\n\treturn &NetworkWidgetController{view: view, model: model}\n}\n\nfunc (c *NetworkWidgetController) BuildView(ctx context.Context) error {\n\tscheduler.Every(10*time.Second).Do(ctx, func(context.Context) { c.refresh() })\n\n\tc.refresh()\n\n\treturn nil\n}\n\nfunc (c *NetworkWidgetController) refresh() {\n\tnetInfo, err := c.model.GetNetworkInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tpeersRes, err := c.model.ListPeers(false) // active peers only\n\tif err != nil {\n\t\treturn\n\t}\n\n\tgtkutil.IdleAddAsync(func() {\n\t\tc.view.LabelNetworkName.SetText(netInfo.GetNetworkName())\n\t\tc.view.LabelConnectedPeers.SetText(strconv.Itoa(int(netInfo.GetConnectedPeersCount())))\n\n\t\tc.view.ClearRows()\n\t\tfor i, peer := range peersRes.GetPeers() {\n\t\t\tc.view.AppendRow(\n\t\t\t\t[]int{0, 1, 2, 3, 4, 5, 6},\n\t\t\t\t[]any{\n\t\t\t\t\tstrconv.Itoa(i + 1),\n\t\t\t\t\tpeer.GetMoniker(),\n\t\t\t\t\tpeer.GetAddress(),\n\t\t\t\t\tpeer.GetPeerId(),\n\t\t\t\t\tstrconv.Itoa(int(peer.GetHeight())),\n\t\t\t\t\tpeer.GetAgent(),\n\t\t\t\t\tpeerDirectionString(peer.GetDirection()),\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "cmd/gtk/controller/node_widget_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\n// clockOutOfSyncThreshold is the clock offset above which we show a warning.\nconst clockOutOfSyncThreshold = 5 * time.Second\n\ntype NodeWidgetController struct {\n\tview  *view.NodeWidgetView\n\tmodel *model.NodeModel\n}\n\nfunc NewNodeWidgetController(view *view.NodeWidgetView, model *model.NodeModel) *NodeWidgetController {\n\treturn &NodeWidgetController{view: view, model: model}\n}\n\n// BuildView builds the node widget. connectionLabel is either \"Remote address\" or \"Working directory\";\n// connectionValue is the remote address or working directory path respectively.\nfunc (c *NodeWidgetController) BuildView(ctx context.Context, connectionLabel, connectionValue string) error {\n\tnodeInfo, err := c.model.GetNodeInfo()\n\tif err != nil {\n\t\treturn err\n\t}\n\tchainInfo, err := c.model.GetBlockchainInfo()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.LabelConnectionType.SetText(connectionLabel + \":\")\n\t\tc.view.LabelConnectionValue.SetText(connectionValue)\n\t\tc.view.LabelNetwork.SetText(nodeInfo.NetworkName)\n\t\tc.view.LabelNetworkID.SetText(nodeInfo.PeerId)\n\t\tc.view.LabelAgent.SetText(nodeInfo.Agent)\n\t\tc.view.LabelMoniker.SetText(nodeInfo.Moniker)\n\t\tc.view.LabelIsPrune.SetText(strconv.FormatBool(chainInfo.IsPruned))\n\n\t\tc.view.ConnectSignals(map[string]any{})\n\t})\n\n\tscheduler.Every(10*time.Second).Do(ctx, func(context.Context) { c.timeout1() })\n\tscheduler.Every(10*time.Second).Do(ctx, func(context.Context) { c.timeout10() })\n\n\t// Initial refresh.\n\tc.timeout1()\n\tc.timeout10()\n\n\treturn nil\n}\n\n// syncProgressWindowBlocks is the number of blocks behind that maps to 0% sync progress (~10 min at 10s/block).\nconst syncProgressWindowBlocks = 60\n\nfunc (c *NodeWidgetController) timeout1() {\n\tchainInfo, err := c.model.GetBlockchainInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\tlastBlockTime := time.Unix(chainInfo.LastBlockTime, 0)\n\tlastBlockHeight := chainInfo.LastBlockHeight\n\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.LabelLastBlockTime.SetText(lastBlockTime.Format(\"02 Jan 06 15:04:05 MST\"))\n\t\tc.view.LabelLastBlockHeight.SetText(strconv.FormatInt(int64(lastBlockHeight), 10))\n\n\t\tnowSec := time.Now().Unix()\n\t\tlastBlockTimeSec := lastBlockTime.Unix()\n\t\tblocksLeft := (nowSec - lastBlockTimeSec) / 10\n\t\tc.view.LabelBlocksLeft.SetText(strconv.FormatInt(blocksLeft, 10))\n\n\t\t// Sync progress: 100% when up-to-date, 0% when syncProgressWindowBlocks behind (no genesis time).\n\t\tpercentage := 1.0 - float64(blocksLeft)/float64(syncProgressWindowBlocks)\n\t\tif percentage < 0 {\n\t\t\tpercentage = 0\n\t\t}\n\t\tif percentage > 1 {\n\t\t\tpercentage = 1\n\t\t}\n\t\tc.view.ProgressBarSynced.SetFraction(percentage)\n\t\tc.view.ProgressBarSynced.SetText(fmt.Sprintf(\"%s %%\", strconv.FormatFloat(percentage*100, 'f', 2, 64)))\n\t})\n}\n\nfunc (c *NodeWidgetController) timeout10() {\n\tchainInfo, err := c.model.GetBlockchainInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tnodeInfo, err := c.model.GetNodeInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tvar clockOffset time.Duration\n\tvar clockOffsetErr error\n\tif nodeInfo != nil {\n\t\tclockOffset = time.Duration(nodeInfo.ClockOffset * float64(time.Second))\n\t}\n\tvar numConnections, reachability string\n\tif nodeInfo != nil && nodeInfo.ConnectionInfo != nil {\n\t\tci := nodeInfo.ConnectionInfo\n\t\tnumConnections = fmt.Sprintf(\"%v (Inbound: %v, Outbound %v)\",\n\t\t\tci.Connections, ci.InboundConnections, ci.OutboundConnections)\n\t\treachability = nodeInfo.Reachability\n\t}\n\tcommitteeStake := amount.Amount(chainInfo.CommitteePower)\n\ttotalStake := amount.Amount(chainInfo.TotalPower)\n\n\tgtkutil.IdleAddSync(func() {\n\t\tstyleContext, err := c.view.LabelClockOffset.GetStyleContext()\n\t\tif err != nil {\n\t\t\tlogger.Error(\"failed to get style context\", \"err\", err)\n\n\t\t\treturn\n\t\t}\n\n\t\tc.view.LabelClockOffset.SetTooltipText(\n\t\t\t\"Difference between time of your machine and network time (NTP) \" +\n\t\t\t\t\"for synchronization.\",\n\t\t)\n\n\t\tc.setClockOffset(styleContext, clockOffset, clockOffsetErr)\n\n\t\tc.view.LabelCommitteeSize.SetText(fmt.Sprintf(\"%v\", chainInfo.CommitteeSize))\n\t\tc.view.LabelActiveValidator.SetText(fmt.Sprintf(\"%v\", chainInfo.ActiveValidators))\n\t\tc.view.LabelCommitteeStake.SetText(committeeStake.String())\n\t\tc.view.LabelTotalStake.SetText(totalStake.String())\n\t\tc.view.LabelAverageScore.SetText(fmt.Sprintf(\"%.2f\", chainInfo.AverageScore))\n\t\tc.view.LabelNumConnections.SetText(numConnections)\n\t\tc.view.LabelReachability.SetText(reachability)\n\n\t\tc.setInCommittee(chainInfo.InCommittee)\n\t})\n}\n\nfunc (c *NodeWidgetController) setClockOffset(styleContext *gtk.StyleContext, offset time.Duration, offsetErr error) {\n\tif offsetErr != nil {\n\t\tstyleContext.AddClass(\"warning\")\n\t\tc.view.LabelClockOffset.SetText(\"N/A\")\n\n\t\treturn\n\t}\n\n\to := math.Round(offset.Seconds())\n\tif o == 0 {\n\t\to = math.Abs(o) // To fix \"-0 second(s)\" issue\n\t}\n\tc.view.LabelClockOffset.SetText(fmt.Sprintf(\"%v second(s)\", o))\n\n\tif offset > clockOutOfSyncThreshold || offset < -clockOutOfSyncThreshold {\n\t\tstyleContext.AddClass(\"warning\")\n\n\t\treturn\n\t}\n\tstyleContext.RemoveClass(\"warning\")\n}\n\nfunc (c *NodeWidgetController) setInCommittee(inCommittee bool) {\n\tif inCommittee {\n\t\tc.view.LabelInCommittee.SetMarkup(\"<span foreground=\\\"#10c92f\\\">Yes</span>\")\n\n\t\treturn\n\t}\n\n\tc.view.LabelInCommittee.SetText(\"No\")\n}\n"
  },
  {
    "path": "cmd/gtk/controller/password_prompt.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\n// Controller represents a UI controller that can be executed.\n// All controllers should have a Run method to execute their primary function.\n\nfunc PasswordProvider(model *model.WalletModel) (string, bool) {\n\tif model == nil || !model.IsEncrypted() {\n\t\treturn \"\", true\n\t}\n\n\treturn PromptWalletPassword()\n}\n\n// PromptWalletPassword shows the wallet password dialog and returns the entered password.\n// It is used by the boot sequence (before models are constructed).\nfunc PromptWalletPassword() (string, bool) {\n\tview := view.NewWalletPasswordDialogView()\n\tctrl := NewWalletPasswordDialogController(view)\n\n\treturn ctrl.Run()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/tx_bond_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype TxBondDialogController struct {\n\tview  *view.TxBondDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewTxBondDialogController(\n\tview *view.TxBondDialogView,\n\tmodel *model.WalletModel,\n) *TxBondDialogController {\n\treturn &TxBondDialogController{view: view, model: model}\n}\n\nfunc setHint(lbl *gtk.Label, hint string) {\n\tif hint == \"\" {\n\t\tlbl.SetMarkup(\"\")\n\n\t\treturn\n\t}\n\tlbl.SetMarkup(gtkutil.SmallGray(hint))\n}\n\nfunc (c *TxBondDialogController) Run() {\n\tif info, err := c.model.WalletInfo(); err == nil {\n\t\tc.view.FeeEntry.SetText(fmt.Sprintf(\"%g\", info.DefaultFee.ToPAC()))\n\t}\n\n\tfor _, ai := range c.model.ListAddresses(crypto.AddressTypeBLSAccount, crypto.AddressTypeEd25519Account) {\n\t\tc.view.SenderCombo.Append(ai.Address, ai.Address)\n\t}\n\tfor _, vi := range c.model.ListAddresses(crypto.AddressTypeValidator) {\n\t\tc.view.ReceiverCombo.Append(vi.Address, vi.Address)\n\t}\n\tc.view.SenderCombo.SetActive(0)\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_sender_changed\":   c.onSenderChanged,\n\t\t\"on_receiver_changed\": c.onReceiverChanged,\n\t\t\"on_fee_changed\":      c.onFeeChanged,\n\t\t\"on_send\":             c.onSend,\n\t\t\"on_cancel\":           c.onCancel,\n\t})\n\n\tc.onSenderChanged()\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n\nfunc (c *TxBondDialogController) onSenderChanged() {\n\tsender := c.view.SenderCombo.GetActiveID()\n\tif info := c.model.AddressInfo(sender); info != nil && info.Label != \"\" {\n\t\tsetHint(c.view.SenderHint, fmt.Sprintf(\"label: %s\", info.Label))\n\t} else {\n\t\tsetHint(c.view.SenderHint, \"\")\n\t}\n\n\tbal, err := c.model.Balance(sender)\n\tif err == nil {\n\t\tsetHint(c.view.AmountHint, fmt.Sprintf(\"Account Balance: %s\", bal))\n\t} else {\n\t\tsetHint(c.view.AmountHint, \"\")\n\t}\n}\n\nfunc (c *TxBondDialogController) onReceiverChanged() {\n\treceiverEntry, _ := c.view.ReceiverCombo.GetEntry()\n\treceiver := gtkutil.GetEntryText(receiverEntry)\n\n\tstake, err := c.model.Stake(receiver)\n\thint := \"\"\n\tif err == nil {\n\t\thint = fmt.Sprintf(\"stake: %s\", stake)\n\t}\n\tif info := c.model.AddressInfo(receiver); info != nil && info.Label != \"\" {\n\t\tif hint != \"\" {\n\t\t\thint += \", \"\n\t\t}\n\t\thint += \"label: \" + info.Label\n\t}\n\tsetHint(c.view.ReceiverHint, hint)\n}\n\nfunc (c *TxBondDialogController) onFeeChanged() {\n\t_ = payload.TypeBond\n\tsetHint(c.view.FeeHint, \"\")\n}\n\nfunc (c *TxBondDialogController) onSend() {\n\tsender := c.view.SenderCombo.GetActiveID()\n\treceiverEntry, _ := c.view.ReceiverCombo.GetEntry()\n\treceiver := gtkutil.GetEntryText(receiverEntry)\n\tpublicKey := gtkutil.GetEntryText(c.view.PublicKeyEntry)\n\tamountStr := gtkutil.GetEntryText(c.view.AmountEntry)\n\tfeeStr := gtkutil.GetEntryText(c.view.FeeEntry)\n\tmemo := gtkutil.GetEntryText(c.view.MemoEntry)\n\n\tamt, err := amount.FromString(amountStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tfee, err := amount.FromString(feeStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\ttrx, err := c.model.MakeBondTx(sender, receiver, publicKey, amt, fee, memo)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tmsg := fmt.Sprintf(`\n📝 Transaction Details:\n<tt>\nType:   Bond\nFrom:   %s\nTo:     %s\nAmount: %s\nFee:    %s\nMemo:   %s\n</tt>\n\nYou are going to sign and broadcast this transaction.\n<b>⚠️ This action cannot be undone.</b>\nDo you want to continue with this transaction?`, sender, receiver, amt, trx.Fee(), trx.Memo())\n\n\tif !gtkutil.ShowQuestionDialog(c.view.Dialog, msg) {\n\t\treturn\n\t}\n\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\n\tif err := c.model.SignTransaction(password, trx); err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\ttxID, err := c.model.BroadcastTransaction(trx)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tgtkutil.ShowInfoDialog(c.view.Dialog,\n\t\tfmt.Sprintf(\"✅ Transaction sent successfully!\\n\\n\"+\n\t\t\t\"Transaction ID: <a href=\\\"https://pacviewer.com/transaction/%s\\\">%s</a>\", txID, txID))\n\tc.view.Dialog.Close()\n}\n\nfunc (c *TxBondDialogController) onCancel() {\n\tc.view.Dialog.Close()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/tx_transfer_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype TxTransferDialogController struct {\n\tview  *view.TxTransferDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewTxTransferDialogController(\n\tview *view.TxTransferDialogView,\n\tmodel *model.WalletModel,\n) *TxTransferDialogController {\n\treturn &TxTransferDialogController{view: view, model: model}\n}\n\nfunc setHintLabel(lbl *gtk.Label, hint string) {\n\tif hint == \"\" {\n\t\tlbl.SetMarkup(\"\")\n\n\t\treturn\n\t}\n\tlbl.SetMarkup(gtkutil.SmallGray(hint))\n}\n\nfunc (c *TxTransferDialogController) Run() {\n\t// Defaults\n\tif info, err := c.model.WalletInfo(); err == nil {\n\t\tc.view.FeeEntry.SetText(fmt.Sprintf(\"%g\", info.DefaultFee.ToPAC()))\n\t}\n\n\t// Fill sender accounts\n\tfor _, ai := range c.model.ListAddresses(crypto.AddressTypeBLSAccount, crypto.AddressTypeEd25519Account) {\n\t\tc.view.SenderCombo.Append(ai.Address, ai.Address)\n\t}\n\tc.view.SenderCombo.SetActive(0)\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_sender_changed\":   c.onSenderChanged,\n\t\t\"on_receiver_changed\": c.onReceiverChanged,\n\t\t\"on_fee_changed\":      c.onFeeChanged,\n\t\t\"on_send\":             c.onSend,\n\t\t\"on_cancel\":           c.onCancel,\n\t})\n\n\tc.onSenderChanged()\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n\nfunc (c *TxTransferDialogController) onSenderChanged() {\n\tsender := c.view.SenderCombo.GetActiveID()\n\tif info := c.model.AddressInfo(sender); info != nil && info.Label != \"\" {\n\t\tsetHintLabel(c.view.SenderHint, fmt.Sprintf(\"label: %s\", info.Label))\n\t} else {\n\t\tsetHintLabel(c.view.SenderHint, \"\")\n\t}\n\n\tbal, err := c.model.Balance(sender)\n\tif err == nil {\n\t\tsetHintLabel(c.view.AmountHint, fmt.Sprintf(\"Account Balance: %s\", bal))\n\t} else {\n\t\tsetHintLabel(c.view.AmountHint, \"\")\n\t}\n}\n\nfunc (c *TxTransferDialogController) onReceiverChanged() {\n\treceiver := gtkutil.GetEntryText(c.view.ReceiverEntry)\n\tif info := c.model.AddressInfo(receiver); info != nil && info.Label != \"\" {\n\t\tsetHintLabel(c.view.ReceiverHint, fmt.Sprintf(\"label: %s\", info.Label))\n\t} else {\n\t\tsetHintLabel(c.view.ReceiverHint, \"\")\n\t}\n}\n\nfunc (c *TxTransferDialogController) onFeeChanged() {\n\t// Placeholder (confirmation time estimation)\n\t_ = payload.TypeTransfer\n\tsetHintLabel(c.view.FeeHint, \"\")\n}\n\nfunc (c *TxTransferDialogController) onSend() {\n\tsender := c.view.SenderCombo.GetActiveID()\n\treceiver := gtkutil.GetEntryText(c.view.ReceiverEntry)\n\tamountStr := gtkutil.GetEntryText(c.view.AmountEntry)\n\tfeeStr := gtkutil.GetEntryText(c.view.FeeEntry)\n\tmemo := gtkutil.GetEntryText(c.view.MemoEntry)\n\n\tamt, err := amount.FromString(amountStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tfee, err := amount.FromString(feeStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\ttrx, err := c.model.MakeTransferTx(sender, receiver, amt, fee, memo)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tmsg := fmt.Sprintf(`\n📝 Transaction Details:\n<tt>\nType:     Transfer\nFrom:     %s\nTo:       %s\nAmount:   %s\nFee:      %s\nMemo:     %s\n</tt>\n\nYou are going to sign and broadcast this transaction.\n<b>⚠️ This action cannot be undone.</b>\nDo you want to continue with this transaction?`, sender, receiver, amt, trx.Fee(), trx.Memo())\n\n\tif !gtkutil.ShowQuestionDialog(c.view.Dialog, msg) {\n\t\treturn\n\t}\n\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\n\tif err := c.model.SignTransaction(password, trx); err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\ttxID, err := c.model.BroadcastTransaction(trx)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tgtkutil.ShowInfoDialog(c.view.Dialog,\n\t\tfmt.Sprintf(\"✅ Transaction sent successfully!\\n\\n\"+\n\t\t\t\"Transaction ID: <a href=\\\"https://pacviewer.com/transaction/%s\\\">%s</a>\", txID, txID))\n\tc.view.Dialog.Close()\n}\n\nfunc (c *TxTransferDialogController) onCancel() {\n\tc.view.Dialog.Close()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/tx_unbond_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\ntype TxUnbondDialogController struct {\n\tview  *view.TxUnbondDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewTxUnbondDialogController(\n\tview *view.TxUnbondDialogView,\n\tmodel *model.WalletModel,\n) *TxUnbondDialogController {\n\treturn &TxUnbondDialogController{view: view, model: model}\n}\n\nfunc (c *TxUnbondDialogController) Run() {\n\tfor _, ai := range c.model.ListAddresses(crypto.AddressTypeValidator) {\n\t\tc.view.ValidatorCombo.Append(ai.Address, ai.Address)\n\t}\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_validator_changed\": c.onValidatorChanged,\n\t\t\"on_send\":              c.onSend,\n\t\t\"on_cancel\":            c.onCancel,\n\t})\n\n\tc.onValidatorChanged()\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n\nfunc (c *TxUnbondDialogController) onValidatorChanged() {\n\treceiverEntry, _ := c.view.ValidatorCombo.GetEntry()\n\tvalidator := gtkutil.GetEntryText(receiverEntry)\n\n\tstake, err := c.model.Stake(validator)\n\thint := \"\"\n\tif err == nil {\n\t\thint = fmt.Sprintf(\"stake: %s\", stake)\n\t}\n\tif info := c.model.AddressInfo(validator); info != nil && info.Label != \"\" {\n\t\tif hint != \"\" {\n\t\t\thint += \", \"\n\t\t}\n\t\thint += \"label: \" + info.Label\n\t}\n\tif hint == \"\" {\n\t\tc.view.ValidatorHint.SetMarkup(\"\")\n\t} else {\n\t\tc.view.ValidatorHint.SetMarkup(gtkutil.SmallGray(hint))\n\t}\n}\n\nfunc (c *TxUnbondDialogController) onSend() {\n\tvalidatorEntry, _ := c.view.ValidatorCombo.GetEntry()\n\tvalidatorAddr := gtkutil.GetEntryText(validatorEntry)\n\tmemo := gtkutil.GetEntryText(c.view.MemoEntry)\n\n\ttrx, err := c.model.MakeUnbondTx(validatorAddr, memo)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tmsg := fmt.Sprintf(`\n📝 Transaction Details:\n<tt>\nType:     Unbond\nValidator: %s\nFee:       %s\nMemo:      %s\n</tt>\n\nYou are going to sign and broadcast this transaction.\n<b>⚠️ This action cannot be undone.</b>\nDo you want to continue with this transaction?`, validatorAddr, trx.Fee(), trx.Memo())\n\n\tif !gtkutil.ShowQuestionDialog(c.view.Dialog, msg) {\n\t\treturn\n\t}\n\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\n\tif err := c.model.SignTransaction(password, trx); err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\ttxID, err := c.model.BroadcastTransaction(trx)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tgtkutil.ShowInfoDialog(c.view.Dialog,\n\t\tfmt.Sprintf(\"✅ Transaction sent successfully!\\n\\n\"+\n\t\t\t\"Transaction ID: <a href=\\\"https://pacviewer.com/transaction/%s\\\">%s</a>\", txID, txID))\n\tc.view.Dialog.Close()\n}\n\nfunc (c *TxUnbondDialogController) onCancel() {\n\tc.view.Dialog.Close()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/tx_withdraw_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype TxWithdrawDialogController struct {\n\tview  *view.TxWithdrawDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewTxWithdrawDialogController(\n\tview *view.TxWithdrawDialogView,\n\tmodel *model.WalletModel,\n) *TxWithdrawDialogController {\n\treturn &TxWithdrawDialogController{view: view, model: model}\n}\n\nfunc (c *TxWithdrawDialogController) Run() {\n\tc.applyDefaults()\n\tc.populateCombos()\n\n\tonCancel := func() { c.view.Dialog.Close() }\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_sender_changed\":   func() { c.onSenderChanged() },\n\t\t\"on_receiver_changed\": func() { c.onReceiverChanged() },\n\t\t\"on_fee_changed\":      func() { c.onFeeChanged() },\n\t\t\"on_send\":             func() { c.onSend() },\n\t\t\"on_cancel\":           onCancel,\n\t})\n\n\tc.onSenderChanged()\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n\nfunc (c *TxWithdrawDialogController) applyDefaults() {\n\tif info, err := c.model.WalletInfo(); err == nil {\n\t\tc.view.FeeEntry.SetText(fmt.Sprintf(\"%g\", info.DefaultFee.ToPAC()))\n\t}\n}\n\nfunc (c *TxWithdrawDialogController) populateCombos() {\n\tfor _, ai := range c.model.ListAddresses(crypto.AddressTypeValidator) {\n\t\tc.view.ValidatorCombo.Append(ai.Address, ai.Address)\n\t}\n\tc.view.ValidatorCombo.SetActive(0)\n\n\tfor _, ai := range c.model.ListAddresses(crypto.AddressTypeBLSAccount, crypto.AddressTypeEd25519Account) {\n\t\tc.view.ReceiverCombo.Append(ai.Address, ai.Address)\n\t}\n}\n\nfunc (c *TxWithdrawDialogController) onSenderChanged() {\n\tsender := c.view.ValidatorCombo.GetActiveID()\n\n\tstake, err := c.model.Stake(sender)\n\n\thint := \"\"\n\tif err == nil {\n\t\thint = fmt.Sprintf(\"stake: %s\", stake)\n\t}\n\tif info := c.model.AddressInfo(sender); info != nil && info.Label != \"\" {\n\t\tif hint != \"\" {\n\t\t\thint += \", \"\n\t\t}\n\t\thint += \"label: \" + info.Label\n\t}\n\tsetHintLabel(c.view.ValidatorHint, hint)\n\n\tif err == nil {\n\t\tsetHintLabel(c.view.StakeHint, fmt.Sprintf(\"Validator Stake: %s\", stake))\n\t} else {\n\t\tsetHintLabel(c.view.StakeHint, \"\")\n\t}\n}\n\nfunc (c *TxWithdrawDialogController) onReceiverChanged() {\n\treceiverEntry, _ := c.view.ReceiverCombo.GetEntry()\n\treceiver := gtkutil.GetEntryText(receiverEntry)\n\tif info := c.model.AddressInfo(receiver); info != nil && info.Label != \"\" {\n\t\tsetHintLabel(c.view.ReceiverHint, fmt.Sprintf(\"label: %s\", info.Label))\n\t} else {\n\t\tsetHintLabel(c.view.ReceiverHint, \"\")\n\t}\n}\n\nfunc (c *TxWithdrawDialogController) onFeeChanged() {\n\t_ = payload.TypeWithdraw\n\tsetHintLabel(c.view.FeeHint, \"\")\n}\n\nfunc (c *TxWithdrawDialogController) onSend() {\n\tsender := c.view.ValidatorCombo.GetActiveID()\n\treceiverEntry, _ := c.view.ReceiverCombo.GetEntry()\n\treceiver := gtkutil.GetEntryText(receiverEntry)\n\tamountStr := gtkutil.GetEntryText(c.view.StakeEntry)\n\tfeeStr := gtkutil.GetEntryText(c.view.FeeEntry)\n\tmemo := gtkutil.GetEntryText(c.view.MemoEntry)\n\n\tamt, err := amount.FromString(amountStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tfee, err := amount.FromString(feeStr)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\ttrx, err := c.model.MakeWithdrawTx(sender, receiver, amt, fee, memo)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tmsg := fmt.Sprintf(`\n📝 Transaction Details:\n<tt>\nType:   Withdraw\nFrom:   %s\nTo:     %s\nAmount: %s\nFee:    %s\nMemo:   %s\n</tt>\n\nYou are going to sign and broadcast this transaction.\n<b>⚠️ This action cannot be undone.</b>\nDo you want to continue with this transaction?`, sender, receiver, amt, trx.Fee(), trx.Memo())\n\n\tif !gtkutil.ShowQuestionDialog(c.view.Dialog, msg) {\n\t\treturn\n\t}\n\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\n\tif err := c.model.SignTransaction(password, trx); err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\ttxID, err := c.model.BroadcastTransaction(trx)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\n\tgtkutil.ShowInfoDialog(c.view.Dialog,\n\t\tfmt.Sprintf(\"✅ Transaction sent successfully!\\n\\n\"+\n\t\t\t\"Transaction ID: <a href=\\\"https://pacviewer.com/transaction/%s\\\">%s</a>\", txID, txID))\n\tc.view.Dialog.Close()\n}\n"
  },
  {
    "path": "cmd/gtk/controller/validator_widget_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n)\n\ntype ValidatorWidgetController struct {\n\tview  *view.ValidatorWidgetView\n\tmodel *model.ValidatorModel\n}\n\nfunc NewValidatorWidgetController(\n\tview *view.ValidatorWidgetView, model *model.ValidatorModel,\n) *ValidatorWidgetController {\n\treturn &ValidatorWidgetController{view: view, model: model}\n}\n\nfunc (c *ValidatorWidgetController) BuildView(ctx context.Context) error {\n\tscheduler.Every(10*time.Second).Do(ctx, func(context.Context) { c.refresh() })\n\n\t// Initial refresh.\n\tc.refresh()\n\n\treturn nil\n}\n\nfunc (c *ValidatorWidgetController) refresh() {\n\tvals, err := c.model.Validators()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tgtkutil.IdleAddAsync(func() {\n\t\tc.view.ClearRows()\n\t\tfor i, val := range vals {\n\t\t\tstakeStr := amount.Amount(val.GetStake()).String()\n\t\t\tc.view.AppendRow(\n\t\t\t\t[]int{0, 1, 2, 3, 4, 5, 6, 7},\n\t\t\t\t[]any{\n\t\t\t\t\tstrconv.Itoa(i + 1),\n\t\t\t\t\tval.GetAddress(),\n\t\t\t\t\tstrconv.Itoa(int(val.GetNumber())),\n\t\t\t\t\tstakeStr,\n\t\t\t\t\tstrconv.Itoa(int(val.GetLastBondingHeight())),\n\t\t\t\t\tstrconv.Itoa(int(val.GetLastSortitionHeight())),\n\t\t\t\t\tstrconv.Itoa(int(val.GetUnbondingHeight())),\n\t\t\t\t\tgtkutil.AvailabilityScorePercent(val.GetAvailabilityScore()),\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_change_password_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype WalletChangePasswordDialogController struct {\n\tview  *view.WalletChangePasswordDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewWalletChangePasswordDialogController(\n\tview *view.WalletChangePasswordDialogView,\n\tmodel *model.WalletModel,\n) *WalletChangePasswordDialogController {\n\treturn &WalletChangePasswordDialogController{view: view, model: model}\n}\n\nfunc (c *WalletChangePasswordDialogController) Run() {\n\tif !c.model.IsEncrypted() {\n\t\tc.view.OldPasswordEntry.SetVisible(false)\n\t\tc.view.OldPasswordLabel.SetVisible(false)\n\t}\n\n\tonOk := func() {\n\t\toldPassword := gtkutil.GetEntryText(c.view.OldPasswordEntry)\n\t\tnewPassword := gtkutil.GetEntryText(c.view.NewPasswordEntry)\n\t\trepeatPassword := gtkutil.GetEntryText(c.view.RepeatEntry)\n\n\t\tif newPassword != repeatPassword {\n\t\t\tgtkutil.ShowWarningDialog(c.view.Dialog, \"Passwords do not match\")\n\n\t\t\treturn\n\t\t}\n\t\tif err := c.model.UpdatePassword(oldPassword, newPassword); err != nil {\n\t\t\tgtkutil.ShowError(err)\n\n\t\t\treturn\n\t\t}\n\t\tc.view.Dialog.Close()\n\t}\n\n\tonCancel := func() { c.view.Dialog.Close() }\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_ok\":     onOk,\n\t\t\"on_cancel\": onCancel,\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_create_address_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\ntype WalletCreateAddressDialogController struct {\n\tview  *view.WalletCreateAddressDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewWalletCreateAddressDialogController(\n\tview *view.WalletCreateAddressDialogView,\n\tmodel *model.WalletModel,\n) *WalletCreateAddressDialogController {\n\treturn &WalletCreateAddressDialogController{view: view, model: model}\n}\n\nfunc (c *WalletCreateAddressDialogController) Run() {\n\tcombo := c.view.AddressTypeCombo\n\tcombo.Append(crypto.AddressTypeEd25519Account.String(), \"ED25519 Account\")\n\tcombo.Append(crypto.AddressTypeBLSAccount.String(), \"BLS Account\")\n\tcombo.Append(crypto.AddressTypeValidator.String(), \"Validator\")\n\tcombo.SetActive(0)\n\n\tonOk := func() {\n\t\tc.view.ButtonOK.SetSensitive(false)\n\t\tdefer c.view.ButtonOK.SetSensitive(true)\n\n\t\tlabel := gtkutil.GetEntryText(c.view.LabelEntry)\n\t\ttyp := combo.GetActiveID()\n\n\t\tvar err error\n\t\tswitch typ {\n\t\tcase crypto.AddressTypeEd25519Account.String():\n\t\t\tpassword, ok := PasswordProvider(c.model)\n\t\t\tif !ok {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t_, err = c.model.NewAddress(\n\t\t\t\tcrypto.AddressTypeEd25519Account,\n\t\t\t\tlabel,\n\t\t\t\tpassword,\n\t\t\t)\n\t\tcase crypto.AddressTypeBLSAccount.String():\n\t\t\t_, err = c.model.NewAddress(crypto.AddressTypeBLSAccount, label, \"\")\n\t\tcase crypto.AddressTypeValidator.String():\n\t\t\t_, err = c.model.NewAddress(crypto.AddressTypeValidator, label, \"\")\n\t\tdefault:\n\t\t\treturn\n\t\t}\n\n\t\tif err != nil {\n\t\t\tgtkutil.ShowError(err)\n\n\t\t\treturn\n\t\t}\n\n\t\tc.view.Dialog.Close()\n\t}\n\n\tonCancel := func() { c.view.Dialog.Close() }\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_ok\":     onOk,\n\t\t\"on_cancel\": onCancel,\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_default_fee_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n)\n\ntype WalletDefaultFeeDialogController struct {\n\tview  *view.WalletDefaultFeeDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewWalletDefaultFeeDialogController(\n\tview *view.WalletDefaultFeeDialogView,\n\tmodel *model.WalletModel,\n) *WalletDefaultFeeDialogController {\n\treturn &WalletDefaultFeeDialogController{view: view, model: model}\n}\n\nfunc (c *WalletDefaultFeeDialogController) Run() {\n\tinfo, err := c.model.WalletInfo()\n\tif err != nil {\n\t\tgtkutil.ShowErrorDialog(c.view.Dialog, fmt.Sprintf(\"Failed to get wallet info: %v\", err))\n\n\t\treturn\n\t}\n\n\tcurrentFee := info.DefaultFee\n\tc.view.CurrentFeeLabel.SetText(currentFee.String())\n\tc.view.FeeEntry.SetText(strings.ReplaceAll(currentFee.String(), \" PAC\", \"\"))\n\n\tonOk := func() {\n\t\tfeeStr := gtkutil.GetEntryText(c.view.FeeEntry)\n\t\tfeeAmount, err := amount.FromString(feeStr)\n\t\tif err != nil {\n\t\t\tgtkutil.ShowErrorDialog(c.view.Dialog, fmt.Sprintf(\"Invalid fee amount: %v\", err))\n\n\t\t\treturn\n\t\t}\n\t\tif err := c.model.SetDefaultFee(feeAmount); err != nil {\n\t\t\tgtkutil.ShowErrorDialog(c.view.Dialog, fmt.Sprintf(\"Failed to set default fee: %v\", err))\n\n\t\t\treturn\n\t\t}\n\t\tc.view.Dialog.Close()\n\t}\n\n\tonCancel := func() { c.view.Dialog.Close() }\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_ok\":     onOk,\n\t\t\"on_cancel\": onCancel,\n\t})\n\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_password_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype WalletPasswordDialogController struct {\n\tview *view.WalletPasswordDialogView\n}\n\nfunc NewWalletPasswordDialogController(\n\tview *view.WalletPasswordDialogView,\n) *WalletPasswordDialogController {\n\treturn &WalletPasswordDialogController{view: view}\n}\n\nfunc (c *WalletPasswordDialogController) Run() (string, bool) {\n\tpassword := \"\"\n\tok := false\n\n\tonOk := func() {\n\t\tpassword = gtkutil.GetEntryText(c.view.PasswordEntry)\n\t\tok = true\n\t\tc.view.Dialog.Close()\n\t}\n\tandClose := func() {\n\t\tc.view.Dialog.Close()\n\t}\n\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_ok\":     onOk,\n\t\t\"on_cancel\": andClose,\n\t})\n\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n\n\treturn password, ok\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_seed_dialog_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n)\n\ntype WalletSeedDialogController struct {\n\tview  *view.WalletSeedDialogView\n\tmodel *model.WalletModel\n}\n\nfunc NewWalletSeedDialogController(\n\tview *view.WalletSeedDialogView,\n\tmodel *model.WalletModel,\n) *WalletSeedDialogController {\n\treturn &WalletSeedDialogController{view: view, model: model}\n}\n\nfunc (c *WalletSeedDialogController) Run() {\n\tpassword, ok := PasswordProvider(c.model)\n\tif !ok {\n\t\treturn\n\t}\n\tseed, err := c.model.Mnemonic(password)\n\tif err != nil {\n\t\tgtkutil.ShowError(err)\n\n\t\treturn\n\t}\n\tgtkutil.SetTextViewContent(c.view.TextView, seed)\n\tc.view.ConnectSignals(map[string]any{\n\t\t\"on_close\": func() { c.view.Dialog.Close() },\n\t})\n\tc.view.Dialog.SetModal(true)\n\tgtkutil.RunDialog(c.view.Dialog)\n}\n"
  },
  {
    "path": "cmd/gtk/controller/wallet_widget_controller.go",
    "content": "//go:build gtk\n\npackage controller\n\nimport (\n\t\"context\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/model\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\ntype WalletWidgetController struct {\n\tview  *view.WalletWidgetView\n\tmodel *model.WalletModel\n\n\ttxSkip  int\n\ttxCount int\n}\n\nfunc NewWalletWidgetController(view *view.WalletWidgetView, model *model.WalletModel) *WalletWidgetController {\n\treturn &WalletWidgetController{\n\t\tview:    view,\n\t\tmodel:   model,\n\t\ttxCount: 20,\n\t}\n}\n\nfunc (c *WalletWidgetController) BuildView(ctx context.Context, nav *Navigator) error {\n\tinfo, err := c.model.WalletInfo()\n\n\tgtkutil.IdleAddSync(func() {\n\t\tif err == nil {\n\t\t\tc.view.LabelName.SetText(c.model.WalletName())\n\t\t\tc.view.LabelDriver.SetText(info.Driver)\n\t\t\tc.view.LabelCreatedAt.SetText(info.CreatedAt.Format(time.RFC1123))\n\t\t\tc.view.LabelLocation.SetText(info.Path)\n\t\t}\n\n\t\tc.view.ConnectSignals(map[string]any{\n\t\t\t\"on_new_address\":     nav.ShowWalletNewAddress,\n\t\t\t\"on_set_default_fee\": nav.ShowWalletSetDefaultFee,\n\t\t\t\"on_change_password\": nav.ShowWalletChangePassword,\n\t\t\t\"on_show_seed\":       nav.ShowWalletShowSeed,\n\n\t\t\t\"on_address_refresh\": c.RefreshAddresses,\n\t\t\t\"on_tx_refresh\":      c.RefreshTransactions,\n\t\t\t\"on_tx_prev\":         c.prevTransactionsPage,\n\t\t\t\"on_tx_next\":         c.nextTransactionsPage,\n\t\t})\n\n\t\t// Context menu actions.\n\t\tc.view.MenuItemUpdateLabel.Connect(\"activate\", func(_ *gtk.MenuItem) {\n\t\t\taddr := c.selectedAddress()\n\t\t\tif addr != \"\" {\n\t\t\t\tc.ShowUpdateLabel(addr)\n\t\t\t}\n\t\t})\n\t\tc.view.MenuItemDetails.Connect(\"activate\", func(_ *gtk.MenuItem) {\n\t\t\taddr := c.selectedAddress()\n\t\t\tif addr != \"\" {\n\t\t\t\tc.ShowAddressDetails(addr)\n\t\t\t}\n\t\t})\n\t\tc.view.MenuItemPrivateKey.Connect(\"activate\", func(_ *gtk.MenuItem) {\n\t\t\taddr := c.selectedAddress()\n\t\t\tif addr != \"\" {\n\t\t\t\tc.ShowPrivateKey(addr)\n\t\t\t}\n\t\t})\n\n\t\t// Right-click popup.\n\t\tc.view.TreeViewWallet.Connect(\"button-press-event\", func(_ *gtk.TreeView, event *gdk.Event) bool {\n\t\t\teventButton := gdk.EventButtonNewFromEvent(event)\n\t\t\tif eventButton.Type() == gdk.EVENT_BUTTON_PRESS && eventButton.Button() == gdk.BUTTON_SECONDARY {\n\t\t\t\tc.view.ContextMenu.PopupAtPointer(event)\n\t\t\t}\n\n\t\t\treturn false\n\t\t})\n\n\t\t// Double-click opens details.\n\t\tc.view.TreeViewWallet.Connect(\"row-activated\", func(_ *gtk.TreeView, _ *gtk.TreePath, _ *gtk.TreeViewColumn) {\n\t\t\taddr := c.selectedAddress()\n\t\t\tif addr != \"\" {\n\t\t\t\tc.ShowAddressDetails(addr)\n\t\t\t}\n\t\t})\n\n\t\ttotalBalance1, _ := c.model.TotalBalance()\n\t\tscheduler.Every(15*time.Second).Do(ctx, func(context.Context) {\n\t\t\ttotalBalance2, _ := c.model.TotalBalance()\n\n\t\t\tif totalBalance1 != totalBalance2 {\n\t\t\t\tc.Refresh()\n\n\t\t\t\ttotalBalance1 = totalBalance2\n\t\t\t}\n\t\t})\n\t})\n\n\tc.Refresh()\n\n\treturn nil\n}\n\nfunc (c *WalletWidgetController) selectedAddress() string {\n\taddr, ok, err := c.view.SelectionAddress(1)\n\tif err != nil || !ok {\n\t\treturn \"\"\n\t}\n\n\treturn addr\n}\n\n// getDirectionTextWithIcon returns formatted text with icon for the transaction direction.\nfunc getDirectionTextWithIcon(dir types.TxDirection) string {\n\tswitch dir {\n\tcase types.TxDirectionIncoming:\n\t\treturn \"incoming ↘\"\n\tcase types.TxDirectionOutgoing:\n\t\treturn \"outgoing ↗\"\n\tcase types.TxDirectionAny:\n\t\treturn \"any\"\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n\nfunc (c *WalletWidgetController) Refresh() {\n\tc.RefreshInfo()\n\tc.RefreshAddresses()\n\tc.RefreshTransactions()\n}\n\nfunc (c *WalletWidgetController) RefreshInfo() {\n\t// Update info lines.\n\tbalance, _ := c.model.TotalBalance()\n\tstake, _ := c.model.TotalStake()\n\tbalanceStr := balance.String()\n\tstakeStr := stake.String()\n\n\tinfo, err := c.model.WalletInfo()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.LabelEncrypted.SetText(gtkutil.YesNo(info.Encrypted))\n\t\tc.view.LabelTotalBalance.SetText(balanceStr)\n\t\tc.view.LabelTotalStake.SetText(stakeStr)\n\t\tc.view.LabelDefaultFee.SetText(info.DefaultFee.String())\n\t})\n}\n\nfunc (c *WalletWidgetController) RefreshAddresses() {\n\trows := c.model.AddressRows()\n\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.ClearRows()\n\t\tfor _, item := range rows {\n\t\t\tc.view.AppendRow(\n\t\t\t\t[]int{0, 1, 2, 3, 4},\n\t\t\t\t[]any{\n\t\t\t\t\tstrconv.Itoa(item.No),\n\t\t\t\t\titem.Address,\n\t\t\t\t\tgtkutil.ImportedLabel(item.Label, item.Imported),\n\t\t\t\t\titem.Balance.String(),\n\t\t\t\t\titem.Stake.String(),\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\t})\n}\n\nfunc (c *WalletWidgetController) RefreshTransactions() {\n\ttrxs := c.model.Transactions(c.txCount, c.txSkip)\n\thasNext := len(trxs) == c.txCount\n\n\tgtkutil.IdleAddSync(func() {\n\t\tc.view.ClearTxRows()\n\n\t\tfor _, trx := range trxs {\n\t\t\tc.view.AppendTxRow(\n\t\t\t\t[]int{0, 1, 2, 3, 4, 5, 6, 7, 8},\n\t\t\t\t[]any{\n\t\t\t\t\ttrx.No,\n\t\t\t\t\tcmd.ShortHash(trx.TxId),\n\t\t\t\t\tcmd.ShortAddress(trx.Sender),\n\t\t\t\t\tcmd.ShortAddress(trx.Receiver),\n\t\t\t\t\tpayload.Type(trx.PayloadType).String(),\n\t\t\t\t\tamount.Amount(trx.Amount).String(),\n\t\t\t\t\tgetDirectionTextWithIcon(types.TxDirection(trx.Direction)),\n\t\t\t\t\ttypes.TransactionStatus(trx.Status).String(),\n\t\t\t\t\ttrx.Comment,\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\n\t\tc.view.SetTxPager(c.txSkip > 0, hasNext)\n\t})\n}\n\nfunc (c *WalletWidgetController) ShowUpdateLabel(address string) {\n\tdlgView := view.NewAddressLabelDialogView()\n\tdlgCtrl := NewAddressLabelDialogController(dlgView, c.model)\n\tdlgCtrl.Run(address)\n\n\tc.RefreshAddresses()\n}\n\nfunc (c *WalletWidgetController) ShowAddressDetails(address string) {\n\tdlgView := view.NewAddressDetailsDialogView()\n\tdlgCtrl := NewAddressDetailsDialogController(dlgView, c.model)\n\tdlgCtrl.Run(address)\n}\n\nfunc (c *WalletWidgetController) ShowPrivateKey(address string) {\n\tdlgView := view.NewAddressPrivateKeyDialogView()\n\tdlgCtrl := NewAddressPrivateKeyDialogController(dlgView, c.model)\n\tdlgCtrl.Run(address)\n}\n\nfunc (c *WalletWidgetController) prevTransactionsPage() {\n\tif c.txSkip >= c.txCount {\n\t\tc.txSkip -= c.txCount\n\t} else {\n\t\tc.txSkip = 0\n\t}\n\tc.RefreshTransactions()\n}\n\nfunc (c *WalletWidgetController) nextTransactionsPage() {\n\tc.txSkip += c.txCount\n\tc.RefreshTransactions()\n}\n"
  },
  {
    "path": "cmd/gtk/gtkutil/format.go",
    "content": "//go:build gtk\n\npackage gtkutil\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nfunc escapeMarkup(text string) string {\n\t// Minimal escaping for Pango markup contexts.\n\tr := strings.NewReplacer(\n\t\t\"&\", \"&amp;\",\n\t\t\"<\", \"&lt;\",\n\t\t\">\", \"&gt;\",\n\t\t\"\\\"\", \"&quot;\",\n\t\t\"'\", \"&apos;\",\n\t)\n\n\treturn r.Replace(text)\n}\n\n// SmallGray wraps text in a small gray Pango markup span.\nfunc SmallGray(text string) string {\n\treturn fmt.Sprintf(\"<span foreground='gray' size='small'>%s</span>\", escapeMarkup(text))\n}\n\n// ImportedLabel appends the imported suffix if needed.\nfunc ImportedLabel(label string, imported bool) string {\n\tif !imported {\n\t\treturn label\n\t}\n\tif strings.TrimSpace(label) == \"\" {\n\t\treturn \"(Imported)\"\n\t}\n\n\treturn label + \" (Imported)\"\n}\n\nfunc YesNo(v bool) string {\n\tif v {\n\t\treturn \"Yes\"\n\t}\n\n\treturn \"No\"\n}\n\n// AvailabilityScorePercent formats an availability score (0–1) as a percentage string with 2 decimal places.\nfunc AvailabilityScorePercent(score float64) string {\n\treturn fmt.Sprintf(\"%.2f%%\", score*100)\n}\n"
  },
  {
    "path": "cmd/gtk/gtkutil/format_test.go",
    "content": "//go:build gtk\n\npackage gtkutil\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestSmallGray_EscapesMarkup(t *testing.T) {\n\tgot := SmallGray(`a<b&\"c\"`)\n\tassert.NotEmpty(t, got)\n\tassert.NotContains(t, got, \"<b\", \"expected markup to be escaped\")\n\tassert.NotContains(t, got, \"&\\\"\", \"expected markup to be escaped\")\n\tassert.NotContains(t, got, `\"`, \"expected markup to be escaped\")\n\tassert.Contains(t, got, \"&lt;\")\n\tassert.Contains(t, got, \"&amp;\")\n}\n"
  },
  {
    "path": "cmd/gtk/gtkutil/gtkutil.go",
    "content": "//go:build gtk\n\npackage gtkutil\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/url\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n)\n\n// updateMessageDialog makes MessageDialog labels selectable and markup-enabled.\n// https://stackoverflow.com/questions/3249053/copying-the-text-from-a-gtk-messagedialog\nfunc updateMessageDialog(dlg *gtk.MessageDialog) {\n\tarea, err := dlg.GetMessageArea()\n\tif err == nil {\n\t\tchildren := area.GetChildren()\n\t\tchildren.Foreach(func(item any) {\n\t\t\tlabel, err := gtk.WidgetToLabel(item.(*gtk.Widget))\n\t\t\tif err == nil {\n\t\t\t\tlabel.SetSelectable(true)\n\t\t\t\tlabel.SetUseMarkup(true)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc ShowQuestionDialog(parent gtk.IWindow, msg string) bool {\n\treturn IdleAddSyncT(func() bool {\n\t\tdlg := gtk.MessageDialogNew(parent,\n\t\t\tgtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, \"%s\", msg)\n\t\tupdateMessageDialog(dlg)\n\t\tres := RunDialog(&dlg.Dialog)\n\n\t\treturn res == gtk.RESPONSE_YES\n\t})\n}\n\nfunc ShowInfoDialog(parent gtk.IWindow, msg string) {\n\tIdleAddSync(func() {\n\t\tdlg := gtk.MessageDialogNew(parent,\n\t\t\tgtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, \"%s\", msg)\n\t\tupdateMessageDialog(dlg)\n\t\tRunDialog(&dlg.Dialog)\n\t})\n}\n\nfunc ShowWarningDialog(parent gtk.IWindow, msg string) {\n\tIdleAddSync(func() {\n\t\tdlg := gtk.MessageDialogNew(parent,\n\t\t\tgtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, \"%s\", msg)\n\t\tupdateMessageDialog(dlg)\n\t\tRunDialog(&dlg.Dialog)\n\t})\n}\n\nfunc ShowErrorDialog(parent gtk.IWindow, msg string) {\n\tIdleAddSync(func() {\n\t\tdlg := gtk.MessageDialogNew(parent,\n\t\t\tgtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, \"%s\", msg)\n\t\tupdateMessageDialog(dlg)\n\t\tRunDialog(&dlg.Dialog)\n\t})\n}\n\n// ShowError displays an error dialog and logs the error message.\nfunc ShowError(err error) {\n\tShowErrorDialog(nil, err.Error())\n\tlog.Print(err.Error())\n}\n\n// FatalErrorCheck checks for an error, shows an error dialog and terminates the program.\n// Use with caution.\nfunc FatalErrorCheck(err error) {\n\tif err != nil {\n\t\tShowErrorDialog(nil, err.Error())\n\t\tlog.Fatal(err.Error())\n\t}\n}\n\n// PixbufOption represents an option for PixbufFromBytes.\ntype PixbufOption func(*pixbufOptions)\n\ntype pixbufOptions struct {\n\twidth  int\n\theight int\n}\n\n// WithSize sets the desired width and height for the pixbuf.\nfunc WithSize(width, height int) PixbufOption {\n\treturn func(opts *pixbufOptions) {\n\t\topts.width = width\n\t\topts.height = height\n\t}\n}\n\n// PixbufFromBytes decodes image bytes (PNG/SVG/etc) into a gdk.Pixbuf.\n// Use WithSize() option to resize the image.\nfunc PixbufFromBytes(data []byte, opts ...PixbufOption) (*gdk.Pixbuf, error) {\n\toptions := &pixbufOptions{}\n\tfor _, opt := range opts {\n\t\topt(options)\n\t}\n\n\tloader, err := gdk.PixbufLoaderNew()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\terr = loader.Close()\n\t\tif err != nil {\n\t\t\tLogf(\"error closing pixbuf loader: %v\", err)\n\t\t}\n\t}()\n\n\tpixbuf, err := loader.WriteAndReturnPixbuf(data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Resize if size options provided\n\tif options.width > 0 && options.height > 0 {\n\t\tresized, err := pixbuf.ScaleSimple(options.width, options.height, gdk.INTERP_NEAREST)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn resized, nil\n\t}\n\n\treturn pixbuf, nil\n}\n\n// ImageFromPixbuf creates a gtk.Image from a pixbuf and applies a marginEnd.\n// If pixbuf is nil, it returns an empty gtk.Image.\nfunc ImageFromPixbuf(pixbuf *gdk.Pixbuf) *gtk.Image {\n\timage, err := gtk.ImageNewFromPixbuf(pixbuf)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\timage.ShowAll()\n\n\treturn image\n}\n\nfunc GetTextViewContent(tv *gtk.TextView) string {\n\tbuf, _ := tv.GetBuffer()\n\tstartIter, endIter := buf.GetBounds()\n\tcontent, err := buf.GetText(startIter, endIter, true)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\n\treturn content\n}\n\nfunc SetTextViewContent(tv *gtk.TextView, content string) {\n\tbuf, err := tv.GetBuffer()\n\tif err != nil {\n\t\treturn\n\t}\n\tbuf.SetText(content)\n}\n\n// OpenURLInBrowser opens a URL in the OS default browser.\nfunc OpenURLInBrowser(address string) error {\n\tvar cmd string\n\targs := make([]string, 0, 2)\n\n\taddr, err := url.Parse(address)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch addr.Scheme {\n\tcase \"http\", \"https\":\n\tdefault:\n\t\treturn errors.New(\"address scheme is invalid\")\n\t}\n\n\tswitch runtime.GOOS {\n\tcase \"windows\":\n\t\tcmd = \"cmd\"\n\t\targs = []string{\"/c\", \"start\"}\n\tcase \"darwin\":\n\t\tcmd = \"open\"\n\tdefault: // \"linux\", \"freebsd\", \"openbsd\", \"netbsd\"\n\t\tcmd = \"xdg-open\"\n\t}\n\targs = append(args, address)\n\n\treturn exec.CommandContext(context.Background(), cmd, args...).Start()\n}\n\nfunc BuildExtendedEntry(builder *gtk.Builder, overlayID string) *gtk.Entry {\n\tobj, err := builder.GetObject(overlayID)\n\tFatalErrorCheck(err)\n\toverlay := obj.(*gtk.Overlay)\n\n\t// Create a new Entry\n\tentry, err := gtk.EntryNew()\n\tFatalErrorCheck(err)\n\tentry.SetCanFocus(true)\n\tentry.SetHExpand(true)\n\tentry.SetEditable(false)\n\n\tSetCSSClass(&entry.Widget, \"copyable_entry\")\n\n\t// Create a new Button\n\tbutton, err := gtk.ButtonNewFromIconName(\"edit-copy-symbolic\", gtk.ICON_SIZE_BUTTON)\n\tFatalErrorCheck(err)\n\n\tbutton.SetTooltipText(\"Copy to Clipboard\") // TODO: Not working!\n\tbutton.SetHAlign(gtk.ALIGN_END)\n\tbutton.SetVAlign(gtk.ALIGN_CENTER)\n\tbutton.SetHExpand(false)\n\tbutton.SetVExpand(false)\n\tbutton.SetBorderWidth(0)\n\n\tSetCSSClass(&button.Widget, \"inline_button\")\n\n\t// Set the click event for the Button\n\tbutton.Connect(\"clicked\", func() {\n\t\tbuffer := GetEntryText(entry)\n\t\tclipboard, _ := gtk.ClipboardGet(gdk.SELECTION_CLIPBOARD)\n\t\tclipboard.SetText(buffer)\n\t})\n\n\toverlay.Add(entry)\n\toverlay.AddOverlay(button)\n\n\toverlay.ShowAll() // Ensure all child widgets are shown\n\n\treturn entry\n}\n\nfunc SetCSSClass(widget *gtk.Widget, name string) {\n\tstyleContext, err := widget.GetStyleContext()\n\tFatalErrorCheck(err)\n\n\tstyleContext.AddClass(name)\n}\n\nfunc RunDialog(dlg *gtk.Dialog) gtk.ResponseType {\n\treturn IdleAddSyncT(func() gtk.ResponseType {\n\t\tresponse := dlg.Run()\n\n\t\t// Destroy should be done after the dialog is closed\n\t\t// Read more here: https://docs.gtk.org/gtk3/method.Dialog.run.html\n\t\tdlg.Destroy()\n\n\t\treturn response\n\t})\n}\n\nfunc ComboBoxActiveValue(combo *gtk.ComboBox) int {\n\titer, err := combo.GetActiveIter()\n\tFatalErrorCheck(err)\n\n\tmodel, err := combo.GetModel()\n\tFatalErrorCheck(err)\n\n\tval, err := model.ToTreeModel().GetValue(iter, 0)\n\tFatalErrorCheck(err)\n\n\tvalueInterface, err := val.GoValue()\n\tFatalErrorCheck(err)\n\n\treturn valueInterface.(int)\n}\n\nfunc GetEntryText(entry *gtk.Entry) string {\n\ttxt, err := entry.GetText()\n\tFatalErrorCheck(err)\n\n\treturn txt\n}\n\n// Color represents different text colors for UI elements.\ntype Color int\n\nconst (\n\tColorRed Color = iota\n\tColorGreen\n\tColorBlue\n\tColorYellow\n\tColorOrange\n\tColorPurple\n\tColorGray\n)\n\n// getColorHex returns the hex color code for the given Color enum.\nfunc getColorHex(color Color) string {\n\tswitch color {\n\tcase ColorRed:\n\t\treturn \"#FF0000\"\n\tcase ColorGreen:\n\t\treturn \"#00FF00\"\n\tcase ColorBlue:\n\t\treturn \"#0000FF\"\n\tcase ColorYellow:\n\t\treturn \"#FFFF00\"\n\tcase ColorOrange:\n\t\treturn \"#FFA500\"\n\tcase ColorPurple:\n\t\treturn \"#800080\"\n\tcase ColorGray:\n\t\treturn \"#808080\"\n\tdefault:\n\t\treturn \"#000000\" // Default to black\n\t}\n}\n\nfunc SetColoredText(label *gtk.Label, str string, color Color) {\n\tcolorHex := getColorHex(color)\n\tformattedText := fmt.Sprintf(\"<span color='%s'>%s</span>\", colorHex, str)\n\tlabel.SetMarkup(formattedText)\n}\n\nfunc IdleAddAsync(fun func()) {\n\tgo func() {\n\t\tglib.IdleAdd(func() bool {\n\t\t\tfun()\n\n\t\t\treturn false\n\t\t})\n\t}()\n}\n\nfunc IdleAddSync(fun func()) {\n\tIdleAddSyncT(func() bool {\n\t\tfun()\n\n\t\treturn false\n\t})\n}\n\nfunc IdleAddSyncT[T any](fun func() T) T {\n\tres, _ := IdleAddSyncTT(func() (T, bool) {\n\t\treturn fun(), false\n\t})\n\n\treturn res\n}\n\nfunc IdleAddSyncTT[T1, T2 any](fun func() (T1, T2)) (T1, T2) {\n\tdone := make(chan bool, 1)\n\tvar va1l T1\n\tvar val2 T2\n\n\tgo func() {\n\t\tglib.IdleAdd(func() bool {\n\t\t\tva1l, val2 = fun()\n\n\t\t\tdone <- true\n\n\t\t\treturn false\n\t\t})\n\t}()\n\n\tglibContext := glib.MainContextDefault()\n\tfor {\n\t\tselect {\n\t\tcase <-done:\n\t\t\treturn va1l, val2\n\t\tdefault:\n\t\t\ttime.Sleep(10 * time.Millisecond)\n\t\t\tglibContext.Iteration(false)\n\t\t}\n\t}\n}\n\nfunc Logf(msg string, args ...any) {\n\tlog.Printf(\"(Go Routine ID %d) %s\", GoroutineID(), fmt.Sprintf(msg, args...))\n}\n\nfunc GoroutineID() int64 {\n\tvar buf [64]byte\n\tn := runtime.Stack(buf[:], false)\n\tvar id int64\n\t_, _ = fmt.Sscanf(string(buf[:n]), \"goroutine %d \", &id)\n\n\treturn id\n}\n"
  },
  {
    "path": "cmd/gtk/gtkutil/gtkutil_test.go",
    "content": "//go:build gtk\n\npackage gtkutil\n"
  },
  {
    "path": "cmd/gtk/main.go",
    "content": "//go:build gtk\n\npackage main\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"flag\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/signal\"\n\t\"github.com/gofrs/flock\"\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\tgtkapp \"github.com/pactus-project/pactus/cmd/gtk/app\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/controller\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/view\"\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/node\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/version\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\nconst appID = \"com.github.pactus-project.pactus.pactus-gui\"\n\nvar (\n\tworkingDirOpt   *string\n\tpasswordOpt     *string\n\ttestnetOpt      *bool\n\tgrpcAddrOpt     *string\n\tgrpcInsecureOpt *bool\n)\n\nfunc init() {\n\tworkingDirOpt = flag.String(\"working-dir\", cmd.PactusDefaultHomeDir(), \"working directory path\")\n\tpasswordOpt = flag.String(\"password\", \"\", \"wallet password\")\n\ttestnetOpt = flag.Bool(\"testnet\", false, \"initializing for the testnet\")\n\tgrpcAddrOpt = flag.String(\"grpc-addr\", \"\", \"connect to remote gRPC server instead of starting local node\")\n\tgrpcInsecureOpt = flag.Bool(\"grpc-insecure\", false, \"use insecure connection to gRPC server\")\n\tversion.NodeAgent.AppType = \"gui\"\n\n\tif runtime.GOOS == \"darwin\" {\n\t\t// Changing the PANGOCAIRO_BACKEND is necessary on MacOS to render emoji\n\t\t_ = os.Setenv(\"PANGOCAIRO_BACKEND\", \"fontconfig\")\n\t}\n\n\tgtk.Init(nil)\n}\n\n//nolint:gocognit // needs refactoring\nfunc main() {\n\tflag.Parse()\n\n\tgtkutil.Logf(\"Starting Pactus GUI\")\n\t// The gtk should run on main thread.\n\truntime.UnlockOSThread()\n\truntime.LockOSThread()\n\tgtkutil.Logf(\"Locking main thread\")\n\n\t// Create a new app.\n\tapp, err := gtk.ApplicationNew(appID, glib.APPLICATION_NON_UNIQUE)\n\tgtkutil.FatalErrorCheck(err)\n\n\tsettings, err := gtk.SettingsGetDefault()\n\tgtkutil.FatalErrorCheck(err)\n\n\terr = settings.Object.Set(\"gtk-application-prefer-dark-theme\", true)\n\tgtkutil.FatalErrorCheck(err)\n\n\tassets.InitAssets()\n\n\tworkingDir, err := filepath.Abs(*workingDirOpt)\n\tif err != nil {\n\t\tgtkutil.Logf(\"Aborted! %v\", err)\n\n\t\treturn\n\t}\n\n\tctx, cancel := context.WithCancel(context.Background())\n\n\tvar fileLock *flock.Flock\n\t//nolint:nestif // complexity acceptable here\n\tif *grpcAddrOpt == \"\" {\n\t\t// If node is not initialized yet\n\t\tif util.IsDirNotExistsOrEmpty(workingDir) {\n\t\t\tnetwork := genesis.Mainnet\n\t\t\tif *testnetOpt {\n\t\t\t\tnetwork = genesis.Testnet\n\t\t\t}\n\t\t\tif !startupAssistant(ctx, workingDir, network) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// Define the lock file path\n\t\tlockFilePath := filepath.Join(workingDir, \".pactus.lock\")\n\t\tfileLock = flock.New(lockFilePath)\n\n\t\tlocked, err := fileLock.TryLock()\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tif !locked {\n\t\t\tgtkutil.Logf(\"Could not lock '%s', another instance is running?\", lockFilePath)\n\n\t\t\treturn\n\t\t}\n\t}\n\tvar guiNode *node.Node\n\n\t// Connect function to application startup event, this is not required.\n\tapp.Connect(\"startup\", func() {\n\t\tgtkutil.Logf(\"application startup\")\n\t})\n\n\tvar gui *gtkapp.GUI\n\tvar grpcConn *grpc.ClientConn\n\tactivateOnce := new(sync.Once)\n\tshutdownOnce := new(sync.Once)\n\n\tshutdown := func() {\n\t\tshutdownOnce.Do(func() {\n\t\t\tcancel()\n\t\t\tif grpcConn != nil {\n\t\t\t\t_ = grpcConn.Close()\n\t\t\t}\n\t\t\tif gui != nil {\n\t\t\t\tgui.Cleanup()\n\t\t\t}\n\t\t\tif guiNode != nil {\n\t\t\t\tguiNode.Stop()\n\t\t\t}\n\t\t\tif fileLock != nil {\n\t\t\t\t_ = fileLock.Unlock()\n\t\t\t}\n\t\t})\n\t}\n\n\t// Connect function to application shutdown event, this is not required.\n\tapp.Connect(\"shutdown\", func() {\n\t\tgtkutil.Logf(\"Application shutdown\")\n\t\tshutdown()\n\t})\n\n\t// Connect function to application activate event\n\tapp.Connect(\"activate\", func() {\n\t\tactivateOnce.Do(func() {\n\t\t\tgtkutil.Logf(\"application activate\")\n\n\t\t\tsplash := view.NewSplashWindow(app)\n\t\t\tsplash.SetVersion(version.NodeVersion().StringWithAlias())\n\t\t\tgtk.WindowSetAutoStartupNotification(false)\n\t\t\tsplash.ShowAll()\n\t\t\tgtk.WindowSetAutoStartupNotification(true)\n\t\t\tapp.AddWindow(splash.Window())\n\n\t\t\tnotify := func(msg string) {\n\t\t\t\tgtkutil.Logf(\"Splash msg: %s\", msg)\n\n\t\t\t\tgtkutil.IdleAddAsync(func() {\n\t\t\t\t\tsplash.SetStatus(msg)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tgo func() {\n\t\t\t\tvar grpcAddr string\n\t\t\t\tvar grpcInsecure bool\n\n\t\t\t\tif *grpcAddrOpt == \"\" {\n\t\t\t\t\treportStatus(notify, \"Starting local node...\")\n\t\t\t\t\ttime.Sleep(1 * time.Second)\n\n\t\t\t\t\tguiNode, err = newNode(ctx, workingDir, notify)\n\t\t\t\t\tgtkutil.FatalErrorCheck(err)\n\n\t\t\t\t\tgrpcAddr = guiNode.GRPC().Address()\n\t\t\t\t\tgrpcInsecure = true\n\t\t\t\t} else {\n\t\t\t\t\treportStatus(notify, \"Connecting to remote node...\")\n\t\t\t\t\ttime.Sleep(1 * time.Second)\n\n\t\t\t\t\tgrpcAddr = *grpcAddrOpt\n\t\t\t\t\tgrpcInsecure = *grpcInsecureOpt\n\t\t\t\t}\n\n\t\t\t\tgrpcConn, err = newRemoteGRPCConn(grpcAddr, grpcInsecure)\n\t\t\t\tgtkutil.FatalErrorCheck(err)\n\n\t\t\t\tvar connectionLabel, connectionValue string\n\t\t\t\tif *grpcAddrOpt == \"\" {\n\t\t\t\t\tconnectionLabel = \"📁 Working directory\"\n\t\t\t\t\tconnectionValue = workingDir\n\t\t\t\t} else {\n\t\t\t\t\tconnectionLabel = \"📡 Remote address\"\n\t\t\t\t\tconnectionValue = *grpcAddrOpt\n\t\t\t\t}\n\t\t\t\tgui, err = gtkapp.Run(ctx, grpcConn, app, notify, connectionLabel, connectionValue)\n\t\t\t\tgtkutil.FatalErrorCheck(err)\n\n\t\t\t\tgtkutil.IdleAddSync(func() {\n\t\t\t\t\tsplash.Destroy()\n\t\t\t\t})\n\t\t\t}()\n\t\t})\n\t})\n\n\tsignal.HandleInterrupt(func() {\n\t\tgtkutil.Logf(\"Exiting...\")\n\t\tgtkutil.IdleAddSync(func() {\n\t\t\tshutdown()\n\t\t})\n\t})\n\n\t// Launch the application\n\tos.Exit(app.Run(nil))\n}\n\ntype statusReporter func(string)\n\nfunc reportStatus(cb statusReporter, msg string) {\n\tif cb != nil {\n\t\tcb(msg)\n\t}\n}\n\n// newRemoteGRPCConn creates a gRPC client for a remote URL.\nfunc newRemoteGRPCConn(addr string, insecureCredentials bool) (*grpc.ClientConn, error) {\n\ttarget, prefix, err := util.ParseGRPCAddr(addr, insecureCredentials)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar creds credentials.TransportCredentials\n\tif insecureCredentials {\n\t\tgtkutil.Logf(\"Connecting to node using insecure credentials. target: %s, prefix: %s\", target, prefix)\n\t\tcreds = insecure.NewCredentials()\n\t} else {\n\t\tgtkutil.Logf(\"Connecting to node using TLS. target: %s, prefix: %s\", target, prefix)\n\t\tcreds = credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12})\n\t}\n\n\topts := []grpc.DialOption{\n\t\tgrpc.WithTransportCredentials(creds),\n\t\tgrpc.WithUnaryInterceptor(methodPrefixUnaryInterceptor(prefix)),\n\t\tgrpc.WithStreamInterceptor(methodPrefixStreamInterceptor(prefix)),\n\t}\n\n\treturn grpc.NewClient(target, opts...)\n}\n\nfunc methodPrefixUnaryInterceptor(prefix string) grpc.UnaryClientInterceptor {\n\treturn func(ctx context.Context, method string, req, reply any,\n\t\tcc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption,\n\t) error {\n\t\treturn invoker(ctx, prefix+method, req, reply, cc, opts...)\n\t}\n}\n\nfunc methodPrefixStreamInterceptor(prefix string) grpc.StreamClientInterceptor {\n\treturn func(ctx context.Context, desc *grpc.StreamDesc,\n\t\tcc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption,\n\t) (grpc.ClientStream, error) {\n\t\treturn streamer(ctx, desc, cc, prefix+method, opts...)\n\t}\n}\n\nfunc newNode(ctx context.Context, workingDir string, statusCb statusReporter) (*node.Node, error) {\n\t// change working directory\n\tif err := os.Chdir(workingDir); err != nil {\n\t\tgtkutil.Logf(\"Aborted! Unable to changes working directory. %v\", err)\n\n\t\treturn nil, err\n\t}\n\n\treportStatus(statusCb, \"Opening wallet...\")\n\tpasswordFetcher := func() (string, bool) {\n\t\tgtkutil.Logf(\"Fetching wallet password\")\n\n\t\tif *passwordOpt != \"\" {\n\t\t\treturn *passwordOpt, true\n\t\t}\n\n\t\treturn gtkutil.IdleAddSyncTT(controller.PromptWalletPassword)\n\t}\n\n\tconfigModifier := func(cfg *config.Config) *config.Config {\n\t\tif !cfg.GRPC.Enable {\n\t\t\tcfg.GRPC.Enable = true\n\t\t\tcfg.GRPC.EnableWallet = true\n\t\t\tcfg.GRPC.Listen = \"localhost:0\"\n\t\t}\n\n\t\treturn cfg\n\t}\n\n\treportStatus(statusCb, \"Starting node services...\")\n\tn, err := cmd.StartNode(ctx, workingDir, passwordFetcher, configModifier)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn n, nil\n}\n"
  },
  {
    "path": "cmd/gtk/model/committee_model.go",
    "content": "//go:build gtk\n\npackage model\n\nimport (\n\t\"context\"\n\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\n// CommitteeModel holds blockchain gRPC client and provides committee data\n// for the committee widget (size, power, total power, validators, protocol versions).\ntype CommitteeModel struct {\n\tctx              context.Context\n\tblockchainClient pactus.BlockchainClient\n}\n\n// NewCommitteeModel creates a CommitteeModel that uses gRPC to fetch committee data.\nfunc NewCommitteeModel(\n\tctx context.Context,\n\tblockchainClient pactus.BlockchainClient,\n) *CommitteeModel {\n\treturn &CommitteeModel{\n\t\tctx:              ctx,\n\t\tblockchainClient: blockchainClient,\n\t}\n}\n\n// GetCommitteeInfo returns current committee info from gRPC.\nfunc (m *CommitteeModel) GetCommitteeInfo() (*pactus.GetCommitteeInfoResponse, error) {\n\treturn m.blockchainClient.GetCommitteeInfo(m.ctx, &pactus.GetCommitteeInfoRequest{})\n}\n"
  },
  {
    "path": "cmd/gtk/model/network_model.go",
    "content": "//go:build gtk\n\npackage model\n\nimport (\n\t\"context\"\n\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\n// NetworkModel holds network gRPC client and provides network and peer data\n// for the network widget.\ntype NetworkModel struct {\n\tctx           context.Context\n\tnetworkClient pactus.NetworkClient\n}\n\n// NewNetworkModel creates a NetworkModel that uses gRPC to fetch network data.\nfunc NewNetworkModel(\n\tctx context.Context,\n\tnetworkClient pactus.NetworkClient,\n) *NetworkModel {\n\treturn &NetworkModel{\n\t\tctx:           ctx,\n\t\tnetworkClient: networkClient,\n\t}\n}\n\n// GetNetworkInfo returns overall network info from gRPC.\nfunc (m *NetworkModel) GetNetworkInfo() (*pactus.GetNetworkInfoResponse, error) {\n\treturn m.networkClient.GetNetworkInfo(m.ctx, &pactus.GetNetworkInfoRequest{})\n}\n\n// ListPeers returns active (connected) peers only. Set includeDisconnected true to include disconnected.\nfunc (m *NetworkModel) ListPeers(includeDisconnected bool) (*pactus.ListPeersResponse, error) {\n\treturn m.networkClient.ListPeers(m.ctx, &pactus.ListPeersRequest{\n\t\tIncludeDisconnected: includeDisconnected,\n\t})\n}\n"
  },
  {
    "path": "cmd/gtk/model/node_model.go",
    "content": "//go:build gtk\n\npackage model\n\nimport (\n\t\"context\"\n\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\n// NodeModel holds blockchain and network gRPC clients and provides node/chain\n// data for the node widget. No controller uses node.Node; they use this model.\ntype NodeModel struct {\n\tctx              context.Context\n\tblockchainClient pactus.BlockchainClient\n\tnetworkClient    pactus.NetworkClient\n}\n\n// NewNodeModel creates a NodeModel that uses gRPC to fetch node and chain data.\nfunc NewNodeModel(\n\tctx context.Context,\n\tblockchainClient pactus.BlockchainClient,\n\tnetworkClient pactus.NetworkClient,\n) *NodeModel {\n\treturn &NodeModel{\n\t\tctx:              ctx,\n\t\tblockchainClient: blockchainClient,\n\t\tnetworkClient:    networkClient,\n\t}\n}\n\n// GetBlockchainInfo returns current blockchain info.\nfunc (m *NodeModel) GetBlockchainInfo() (*pactus.GetBlockchainInfoResponse, error) {\n\treturn m.blockchainClient.GetBlockchainInfo(m.ctx, &pactus.GetBlockchainInfoRequest{})\n}\n\n// GetCommitteeInfo returns current committee info.\nfunc (m *NodeModel) GetCommitteeInfo() (*pactus.GetCommitteeInfoResponse, error) {\n\treturn m.blockchainClient.GetCommitteeInfo(m.ctx, &pactus.GetCommitteeInfoRequest{})\n}\n\n// GetConsensusInfo returns consensus instances (used to determine \"in committee\").\nfunc (m *NodeModel) GetConsensusInfo() (*pactus.GetConsensusInfoResponse, error) {\n\treturn m.blockchainClient.GetConsensusInfo(m.ctx, &pactus.GetConsensusInfoRequest{})\n}\n\n// GetNodeInfo returns this node's info (moniker, peer ID, reachability, clock offset, connections).\nfunc (m *NodeModel) GetNodeInfo() (*pactus.GetNodeInfoResponse, error) {\n\treturn m.networkClient.GetNodeInfo(m.ctx, &pactus.GetNodeInfoRequest{})\n}\n"
  },
  {
    "path": "cmd/gtk/model/validator_model.go",
    "content": "//go:build gtk\n\npackage model\n\nimport (\n\t\"context\"\n\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\n// ValidatorModel holds blockchain gRPC client and provides validator data\n// for the validator widget (this node's consensus instances).\ntype ValidatorModel struct {\n\tctx              context.Context\n\tblockchainClient pactus.BlockchainClient\n}\n\n// NewValidatorModel creates a ValidatorModel that uses gRPC to fetch validator data.\nfunc NewValidatorModel(\n\tctx context.Context,\n\tblockchainClient pactus.BlockchainClient,\n) *ValidatorModel {\n\treturn &ValidatorModel{\n\t\tctx:              ctx,\n\t\tblockchainClient: blockchainClient,\n\t}\n}\n\n// Validators returns validator info for this node's consensus instances.\n// It calls GetConsensusInfo to get instance addresses, then GetValidator for each.\nfunc (m *ValidatorModel) Validators() ([]*pactus.ValidatorInfo, error) {\n\tres, err := m.blockchainClient.GetConsensusInfo(m.ctx, &pactus.GetConsensusInfoRequest{})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvals := make([]*pactus.ValidatorInfo, 0, len(res.Instances))\n\tfor _, inst := range res.Instances {\n\t\tvres, err := m.blockchainClient.GetValidator(m.ctx, &pactus.GetValidatorRequest{\n\t\t\tAddress: inst.Address,\n\t\t})\n\t\tif err != nil {\n\t\t\tcontinue // skip inactive validator\n\t\t}\n\n\t\tvals = append(vals, vres.Validator)\n\t}\n\n\treturn vals, nil\n}\n"
  },
  {
    "path": "cmd/gtk/model/wallet_model.go",
    "content": "//go:build gtk\n\npackage model\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\ntype WalletModel struct {\n\tctx               context.Context\n\twalletClient      pactus.WalletClient\n\ttransactionClient pactus.TransactionClient\n\tblockchainClient  pactus.BlockchainClient\n\twalletName        string\n}\n\n// AddressRow is a UI-friendly but UI-agnostic representation of an address entry.\n// Formatting (strings/markup) should be done by presenters/controllers, not here.\ntype AddressRow struct {\n\tNo       int\n\tAddress  string\n\tLabel    string\n\tPath     string\n\tImported bool\n\tBalance  amount.Amount\n\tStake    amount.Amount\n}\n\nfunc NewWalletModel(\n\tctx context.Context,\n\twalletClient pactus.WalletClient,\n\ttransactionClient pactus.TransactionClient,\n\tblockchainClient pactus.BlockchainClient,\n\twalletName string,\n) *WalletModel {\n\treturn &WalletModel{\n\t\tctx:               ctx,\n\t\twalletClient:      walletClient,\n\t\ttransactionClient: transactionClient,\n\t\tblockchainClient:  blockchainClient,\n\t\twalletName:        walletName,\n\t}\n}\n\n// WalletName returns the display name used in the UI.\nfunc (model *WalletModel) WalletName() string {\n\treturn model.walletName\n}\n\nfunc (model *WalletModel) IsEncrypted() bool {\n\tinfo, err := model.walletClient.GetWalletInfo(model.ctx, &pactus.GetWalletInfoRequest{\n\t\tWalletName: model.walletName,\n\t})\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn info.Encrypted\n}\n\nfunc (model *WalletModel) WalletInfo() (*types.WalletInfo, error) {\n\tinfo, err := model.walletClient.GetWalletInfo(model.ctx, &pactus.GetWalletInfoRequest{\n\t\tWalletName: model.walletName,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tchainType := genesis.Localnet\n\tswitch info.Network {\n\tcase \"Mainnet\":\n\t\tchainType = genesis.Mainnet\n\tcase \"Testnet\":\n\t\tchainType = genesis.Testnet\n\t}\n\n\treturn &types.WalletInfo{\n\t\tPath:       info.Path,\n\t\tEncrypted:  info.Encrypted,\n\t\tUUID:       info.Uuid,\n\t\tNetwork:    chainType,\n\t\tDefaultFee: amount.Amount(info.DefaultFee),\n\t}, nil\n}\n\nfunc (model *WalletModel) TotalBalance() (amount.Amount, error) {\n\tres, err := model.walletClient.GetTotalBalance(model.ctx, &pactus.GetTotalBalanceRequest{\n\t\tWalletName: model.walletName,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn amount.Amount(res.TotalBalance), nil\n}\n\nfunc (model *WalletModel) TotalStake() (amount.Amount, error) {\n\tres, err := model.walletClient.GetTotalStake(model.ctx, &pactus.GetTotalStakeRequest{\n\t\tWalletName: model.walletName,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn amount.Amount(res.TotalStake), nil\n}\n\nfunc (model *WalletModel) AddressInfo(addr string) *pactus.AddressInfo {\n\tres, err := model.walletClient.GetAddressInfo(model.ctx, &pactus.GetAddressInfoRequest{\n\t\tWalletName: model.walletName,\n\t\tAddress:    addr,\n\t})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Addr\n}\n\nfunc (model *WalletModel) ListAddresses(addressTypes ...crypto.AddressType) []*pactus.AddressInfo {\n\taddressTypesPB := make([]pactus.AddressType, 0, len(addressTypes))\n\tfor _, at := range addressTypes {\n\t\taddressTypesPB = append(addressTypesPB, pactus.AddressType(at))\n\t}\n\n\tres, err := model.walletClient.ListAddresses(model.ctx, &pactus.ListAddressesRequest{\n\t\tWalletName:   model.walletName,\n\t\tAddressTypes: addressTypesPB,\n\t})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Addrs\n}\n\nfunc (model *WalletModel) Balance(addr string) (amount.Amount, error) {\n\tres, err := model.blockchainClient.GetAccount(model.ctx, &pactus.GetAccountRequest{\n\t\tAddress: addr,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn amount.Amount(res.Account.Balance), nil\n}\n\nfunc (model *WalletModel) Stake(addr string) (amount.Amount, error) {\n\tres, err := model.blockchainClient.GetValidator(model.ctx, &pactus.GetValidatorRequest{\n\t\tAddress: addr,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn amount.Amount(res.Validator.Stake), nil\n}\n\nfunc (model *WalletModel) ValidatorInfo(addr string) *pactus.ValidatorInfo {\n\tres, err := model.blockchainClient.GetValidator(model.ctx, &pactus.GetValidatorRequest{\n\t\tAddress: addr,\n\t})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Validator\n}\n\nfunc (model *WalletModel) PrivateKey(password, addr string) (crypto.PrivateKey, error) {\n\tres, err := model.walletClient.GetPrivateKey(model.ctx, &pactus.GetPrivateKeyRequest{\n\t\tWalletName: model.walletName,\n\t\tPassword:   password,\n\t\tAddress:    addr,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t_, typ, _, err := bech32m.DecodeToBase256WithTypeNoLimit(res.PrivateKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tswitch typ {\n\tcase crypto.SignatureTypeBLS:\n\t\treturn bls.PrivateKeyFromString(res.PrivateKey)\n\tcase crypto.SignatureTypeEd25519:\n\t\treturn ed25519.PrivateKeyFromString(res.PrivateKey)\n\tdefault:\n\t\treturn nil, crypto.InvalidSignatureTypeError(typ)\n\t}\n}\n\nfunc (model *WalletModel) Mnemonic(password string) (string, error) {\n\tres, err := model.walletClient.GetMnemonic(model.ctx, &pactus.GetMnemonicRequest{\n\t\tWalletName: model.walletName,\n\t\tPassword:   password,\n\t})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn res.Mnemonic, nil\n}\n\nfunc (model *WalletModel) UpdatePassword(oldPassword, newPassword string) error {\n\t_, err := model.walletClient.UpdatePassword(model.ctx, &pactus.UpdatePasswordRequest{\n\t\tWalletName:  model.walletName,\n\t\tOldPassword: oldPassword,\n\t\tNewPassword: newPassword,\n\t})\n\n\treturn err\n}\n\nfunc (model *WalletModel) SetDefaultFee(fee amount.Amount) error {\n\t_, err := model.walletClient.SetDefaultFee(model.ctx, &pactus.SetDefaultFeeRequest{\n\t\tWalletName: model.walletName,\n\t\tAmount:     int64(fee),\n\t})\n\n\treturn err\n}\n\nfunc (model *WalletModel) NewAddress(\n\taddressType crypto.AddressType,\n\tlabel string,\n\tpassword string,\n) (*types.AddressInfo, error) {\n\tres, err := model.walletClient.GetNewAddress(model.ctx, &pactus.GetNewAddressRequest{\n\t\tWalletName:  model.walletName,\n\t\tAddressType: pactus.AddressType(addressType),\n\t\tLabel:       label,\n\t\tPassword:    password,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &types.AddressInfo{\n\t\tAddress:   res.Addr.Address,\n\t\tPublicKey: res.Addr.PublicKey,\n\t\tLabel:     res.Addr.Label,\n\t\tPath:      res.Addr.Path,\n\t}, nil\n}\n\nfunc (model *WalletModel) AddressLabel(addr string) string {\n\tres, err := model.walletClient.GetAddressInfo(model.ctx, &pactus.GetAddressInfoRequest{\n\t\tWalletName: model.walletName,\n\t\tAddress:    addr,\n\t})\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\n\treturn res.Addr.Label\n}\n\nfunc (model *WalletModel) SetAddressLabel(addr, label string) error {\n\t_, err := model.walletClient.SetAddressLabel(model.ctx, &pactus.SetAddressLabelRequest{\n\t\tWalletName: model.walletName,\n\t\tAddress:    addr,\n\t\tLabel:      label,\n\t})\n\n\treturn err\n}\n\n// AddressRows returns typed address rows with domain data only.\nfunc (model *WalletModel) AddressRows() []AddressRow {\n\trows := make([]AddressRow, 0)\n\tres, err := model.walletClient.ListAddresses(model.ctx, &pactus.ListAddressesRequest{\n\t\tWalletName: model.walletName,\n\t})\n\tif err != nil {\n\t\treturn rows\n\t}\n\tfor no, info := range res.Addrs {\n\t\tbalance, _ := model.Balance(info.Address)\n\t\tstake, _ := model.Stake(info.Address)\n\n\t\trows = append(rows, AddressRow{\n\t\t\tNo:       no + 1,\n\t\t\tAddress:  info.Address,\n\t\t\tLabel:    info.Label,\n\t\t\tPath:     info.Path,\n\t\t\tImported: info.Path == \"\",\n\t\t\tBalance:  balance,\n\t\t\tStake:    stake,\n\t\t})\n\t}\n\n\treturn rows\n}\n\nfunc (model *WalletModel) MakeTransferTx(\n\tsender, receiver string,\n\tamt amount.Amount,\n\tfee amount.Amount,\n\tmemo string,\n) (*tx.Tx, error) {\n\tres, err := model.transactionClient.GetRawTransferTransaction(model.ctx,\n\t\t&pactus.GetRawTransferTransactionRequest{\n\t\t\tSender:   sender,\n\t\t\tReceiver: receiver,\n\t\t\tAmount:   int64(amt),\n\t\t\tFee:      int64(fee),\n\t\t\tMemo:     memo,\n\t\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tx.FromString(res.RawTransaction)\n}\n\nfunc (model *WalletModel) MakeBondTx(\n\tsender, receiver, publicKey string,\n\tamt amount.Amount,\n\tfee amount.Amount,\n\tmemo string,\n) (*tx.Tx, error) {\n\tif publicKey == \"\" {\n\t\tvalInfo := model.ValidatorInfo(receiver)\n\t\tif valInfo == nil {\n\t\t\t// Let's check if we can get public key from the wallet\n\t\t\tinfo := model.AddressInfo(receiver)\n\t\t\tif info != nil {\n\t\t\t\tpublicKey = info.PublicKey\n\t\t\t}\n\t\t}\n\t}\n\tres, err := model.transactionClient.GetRawBondTransaction(model.ctx,\n\t\t&pactus.GetRawBondTransactionRequest{\n\t\t\tSender:    sender,\n\t\t\tReceiver:  receiver,\n\t\t\tPublicKey: publicKey,\n\t\t\tStake:     int64(amt),\n\t\t\tFee:       int64(fee),\n\t\t\tMemo:      memo,\n\t\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tx.FromString(res.RawTransaction)\n}\n\nfunc (model *WalletModel) MakeUnbondTx(validatorAddr, memo string) (*tx.Tx, error) {\n\tres, err := model.transactionClient.GetRawUnbondTransaction(model.ctx,\n\t\t&pactus.GetRawUnbondTransactionRequest{\n\t\t\tValidatorAddress: validatorAddr,\n\t\t\tMemo:             memo,\n\t\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tx.FromString(res.RawTransaction)\n}\n\nfunc (model *WalletModel) MakeWithdrawTx(\n\tsender, receiver string,\n\tamt amount.Amount,\n\tfee amount.Amount,\n\tmemo string,\n) (*tx.Tx, error) {\n\tres, err := model.transactionClient.GetRawWithdrawTransaction(model.ctx,\n\t\t&pactus.GetRawWithdrawTransactionRequest{\n\t\t\tValidatorAddress: sender,\n\t\t\tAccountAddress:   receiver,\n\t\t\tAmount:           int64(amt),\n\t\t\tFee:              int64(fee),\n\t\t\tMemo:             memo,\n\t\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tx.FromString(res.RawTransaction)\n}\n\nfunc (model *WalletModel) SignTransaction(password string, trx *tx.Tx) error {\n\traw, err := trx.Bytes()\n\tif err != nil {\n\t\treturn err\n\t}\n\tres, err := model.walletClient.SignRawTransaction(model.ctx, &pactus.SignRawTransactionRequest{\n\t\tWalletName:     model.walletName,\n\t\tRawTransaction: hex.EncodeToString(raw),\n\t\tPassword:       password,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsignedTx, err := tx.FromString(res.SignedRawTransaction)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*trx = *signedTx\n\n\treturn nil\n}\n\nfunc (model *WalletModel) BroadcastTransaction(trx *tx.Tx) (string, error) {\n\traw, err := trx.Bytes()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tres, err := model.transactionClient.BroadcastTransaction(model.ctx, &pactus.BroadcastTransactionRequest{\n\t\tSignedRawTransaction: hex.EncodeToString(raw),\n\t})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn res.Id, nil\n}\n\nfunc (model *WalletModel) Transactions(count, skip int) []*pactus.WalletTransactionInfo {\n\tres, err := model.walletClient.ListTransactions(model.ctx, &pactus.ListTransactionsRequest{\n\t\tWalletName: model.walletName,\n\t\tCount:      int32(count),\n\t\tSkip:       int32(skip),\n\t})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Txs\n}\n"
  },
  {
    "path": "cmd/gtk/startup_assistant.go",
    "content": "//go:build gtk\n\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/downloader\"\n\t\"github.com/pactus-project/pactus/wallet\"\n)\n\ntype assistantFunc func(assistant *gtk.Assistant, content gtk.IWidget, name,\n\ttitle, subject, desc string) *gtk.Widget\n\nfunc setMargin(widget gtk.IWidget, top, bottom, start, end int) {\n\twidget.ToWidget().SetMarginTop(top)\n\twidget.ToWidget().SetMarginBottom(bottom)\n\twidget.ToWidget().SetMarginStart(start)\n\twidget.ToWidget().SetMarginEnd(end)\n}\n\n//nolint:all  // complexity can't be reduced more. It needs to refactor.\nfunc startupAssistant(ctx context.Context, workingDir string, chain genesis.ChainType) bool {\n\tsuccessful := false\n\tassistant, err := gtk.AssistantNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tassistant.SetDefaultSize(600, 400)\n\tassistant.SetTitle(\"Pactus - Node Setup Wizard\")\n\n\tassistFunc := pageAssistant()\n\n\t// --- page_mode\n\twgtWalletMode, radioRestoreWallet, pageModeName := pageWalletMode(assistant, assistFunc)\n\n\t// --- page_seed_generate\n\twgtSeedGenerate, txtSeed, pageSeedGenerateName := pageSeedGenerate(assistant, assistFunc)\n\n\t// --- page_seed_confirm\n\twgtSeedConfirm, pageSeedConfirmName := pageSeedConfirm(assistant, assistFunc, txtSeed)\n\n\t// -- page_seed_restore\n\twgtSeedRestore, textRestoreSeed, pageSeedRestoreName := pageSeedRestore(assistant, assistFunc)\n\n\t// --- page_password\n\twgtPassword, entryPassword, pagePasswordName := pagePassword(assistant, assistFunc)\n\n\t// --- page_num_validators\n\twgtNumValidators, comboNumValidators,\n\t\tpageNumValidatorsName := pageNumValidators(assistant, assistFunc)\n\n\t// -- page_node_type\n\twgtNodeType, gridImport, radioImport, pageNodeTypeName := pageNodeType(assistant, assistFunc)\n\n\t// --- page_address_recovery\n\twgtAddressRecovery, txtRecoveryLog, btnCancelRecovery, lblRecoveryStatus,\n\t\tpageAddressRecoveryName := pageAddressRecovery(assistant, assistFunc)\n\n\t// --- page_summary\n\twgtSummary, txtNodeInfo, pageSummaryName := pageSummary(assistant, assistFunc)\n\n\tassistant.Connect(\"cancel\", func() {\n\t\tassistant.Close()\n\t\tassistant.Destroy()\n\t\tgtk.MainQuit()\n\t})\n\tassistant.Connect(\"close\", func() {\n\t\tassistant.Close()\n\t\tassistant.Destroy()\n\t\tgtk.MainQuit()\n\t})\n\n\tassistant.SetPageType(wgtWalletMode, gtk.ASSISTANT_PAGE_INTRO)        // page 0\n\tassistant.SetPageType(wgtSeedGenerate, gtk.ASSISTANT_PAGE_CONTENT)    // page 1\n\tassistant.SetPageType(wgtSeedConfirm, gtk.ASSISTANT_PAGE_CONTENT)     // page 2\n\tassistant.SetPageType(wgtSeedRestore, gtk.ASSISTANT_PAGE_CONTENT)     // page 3\n\tassistant.SetPageType(wgtPassword, gtk.ASSISTANT_PAGE_CONTENT)        // page 4\n\tassistant.SetPageType(wgtNumValidators, gtk.ASSISTANT_PAGE_CONTENT)   // page 5\n\tassistant.SetPageType(wgtNodeType, gtk.ASSISTANT_PAGE_CONTENT)        // page 6\n\tassistant.SetPageType(wgtAddressRecovery, gtk.ASSISTANT_PAGE_CONTENT) // page 7\n\tassistant.SetPageType(wgtSummary, gtk.ASSISTANT_PAGE_SUMMARY)         // page 8\n\n\tmnemonic := \"\"\n\tprevPageIndex := -1\n\tprevPageAdjust := 0\n\trewardAddr := \"\"\n\trecoveredAddrs := []string{}\n\tnodeCreated := false\n\taddressedRecovered := false\n\tvar nodeWallet *wallet.Wallet\n\n\tassistant.Connect(\"prepare\", func(assistant *gtk.Assistant, page *gtk.Widget) {\n\t\tisRestoreMode := radioRestoreWallet.GetActive()\n\t\tcurPageName, err := page.GetName()\n\t\tcurPageIndex := assistant.GetCurrentPage()\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tisForward := true\n\t\tif curPageIndex > 0 && curPageIndex < prevPageIndex {\n\t\t\tisForward = false\n\t\t}\n\n\t\tlog.Printf(\"%v (restore: %v, prev: %v, cur: %v)\\n\",\n\t\t\tcurPageName, isRestoreMode, prevPageIndex, curPageIndex)\n\t\tswitch curPageName {\n\t\tcase pageModeName:\n\t\t\tassistantPageComplete(assistant, wgtWalletMode, true)\n\n\t\tcase pageSeedGenerateName:\n\t\t\tif isRestoreMode {\n\t\t\t\tif isForward {\n\t\t\t\t\t// forward\n\t\t\t\t\tlog.Print(\"jumping forward from seedGenerate page\")\n\t\t\t\t\tassistant.NextPage()\n\t\t\t\t\tprevPageAdjust = 1\n\t\t\t\t} else {\n\t\t\t\t\t// backward\n\t\t\t\t\tlog.Print(\"jumping backward from seedGenerate page\")\n\t\t\t\t\tassistant.PreviousPage()\n\t\t\t\t\tprevPageAdjust = -1\n\t\t\t\t}\n\t\t\t\tassistantPageComplete(assistant, wgtSeedGenerate, false)\n\t\t\t} else {\n\t\t\t\tmnemonic, _ = wallet.GenerateMnemonic(128)\n\t\t\t\tgtkutil.SetTextViewContent(txtSeed, mnemonic)\n\t\t\t\tassistantPageComplete(assistant, wgtSeedGenerate, true)\n\t\t\t}\n\t\tcase pageSeedConfirmName:\n\t\t\tif isRestoreMode {\n\t\t\t\tif isForward {\n\t\t\t\t\t// forward\n\t\t\t\t\tlog.Print(\"jumping forward from seedConfirm page\")\n\t\t\t\t\tassistant.NextPage()\n\t\t\t\t\tprevPageAdjust = 1\n\t\t\t\t} else {\n\t\t\t\t\t// backward\n\t\t\t\t\tlog.Print(\"jumping backward from seedConfirm page\")\n\t\t\t\t\tassistant.PreviousPage()\n\t\t\t\t\tprevPageAdjust = -1\n\t\t\t\t}\n\t\t\t\tassistantPageComplete(assistant, wgtSeedConfirm, false)\n\t\t\t} else {\n\t\t\t\tassistantPageComplete(assistant, wgtSeedConfirm, false)\n\t\t\t}\n\t\tcase pageSeedRestoreName:\n\t\t\tif !isRestoreMode {\n\t\t\t\tif isForward {\n\t\t\t\t\t// forward\n\t\t\t\t\tlog.Print(\"jumping forward from seedRestore page\")\n\t\t\t\t\tassistant.NextPage()\n\t\t\t\t\tprevPageAdjust = 1\n\t\t\t\t} else {\n\t\t\t\t\t// backward\n\t\t\t\t\tlog.Print(\"jumping backward from seedRestore page\")\n\t\t\t\t\tassistant.PreviousPage()\n\t\t\t\t\tprevPageAdjust = -1\n\t\t\t\t}\n\t\t\t\tassistantPageComplete(assistant, wgtSeedConfirm, false)\n\t\t\t} else {\n\t\t\t\tassistantPageComplete(assistant, wgtSeedRestore, true)\n\t\t\t}\n\t\tcase pagePasswordName:\n\t\t\tif isRestoreMode {\n\t\t\t\tmnemonic = gtkutil.GetTextViewContent(textRestoreSeed)\n\n\t\t\t\tif err := wallet.CheckMnemonic(mnemonic); err != nil {\n\t\t\t\t\tgtkutil.ShowErrorDialog(assistant, \"Invalid seed phrase. Please check your seed phrase and try again.\")\n\t\t\t\t\tassistant.PreviousPage()\n\t\t\t\t}\n\t\t\t}\n\t\t\tassistantPageComplete(assistant, wgtPassword, true)\n\t\tcase pageNumValidatorsName:\n\t\t\tassistantPageComplete(assistant, wgtNumValidators, true)\n\n\t\tcase pageNodeTypeName:\n\t\t\tassistantPageComplete(assistant, wgtNodeType, true)\n\t\t\tssLabel, err := gtk.LabelNew(\"\")\n\t\t\tgtkutil.FatalErrorCheck(err)\n\t\t\tsetMargin(ssLabel, 6, 6, 6, 6)\n\t\t\tssLabel.SetHAlign(gtk.ALIGN_START)\n\n\t\t\tlistBox, err := gtk.ListBoxNew()\n\t\t\tgtkutil.FatalErrorCheck(err)\n\t\t\tsetMargin(listBox, 6, 6, 6, 6)\n\t\t\tlistBox.SetHAlign(gtk.ALIGN_CENTER)\n\t\t\tlistBox.SetSizeRequest(700, -1)\n\n\t\t\tssDLBtn, err := gtk.ButtonNewWithLabel(\"⏬ Download\")\n\t\t\tgtkutil.FatalErrorCheck(err)\n\t\t\tsetMargin(ssDLBtn, 6, 6, 6, 6)\n\t\t\tssDLBtn.SetHAlign(gtk.ALIGN_CENTER)\n\t\t\tssDLBtn.SetSizeRequest(700, -1)\n\n\t\t\tssPBLabel, err := gtk.LabelNew(\"\")\n\t\t\tgtkutil.FatalErrorCheck(err)\n\t\t\tsetMargin(ssPBLabel, 6, 6, 6, 6)\n\t\t\tssPBLabel.SetHAlign(gtk.ALIGN_START)\n\n\t\t\tgridImport.Attach(ssLabel, 0, 1, 1, 1)\n\t\t\tgridImport.Attach(listBox, 0, 2, 1, 1)\n\t\t\tgridImport.Attach(ssDLBtn, 0, 3, 1, 1)\n\t\t\tgridImport.Attach(ssPBLabel, 0, 5, 1, 1)\n\t\t\tssLabel.SetVisible(false)\n\t\t\tlistBox.SetVisible(false)\n\t\t\tssDLBtn.SetVisible(false)\n\t\t\tssPBLabel.SetVisible(false)\n\n\t\t\tsnapshotIndex := 0\n\n\t\t\tif !nodeCreated {\n\t\t\t\tnumValidators := gtkutil.ComboBoxActiveValue(comboNumValidators)\n\t\t\t\twalletPassword := gtkutil.GetEntryText(entryPassword)\n\n\t\t\t\tnodeWallet, rewardAddr, err = cmd.CreateNode(ctx, numValidators, chain, workingDir, mnemonic, walletPassword)\n\t\t\t\tif err != nil {\n\t\t\t\t\tgtkutil.ShowError(err)\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// Prevent re-entry\n\t\t\t\tnodeCreated = true\n\t\t\t}\n\n\t\t\tradioImport.Connect(\"toggled\", func() {\n\t\t\t\tif radioImport.GetActive() {\n\t\t\t\t\tassistantPageComplete(assistant, wgtNodeType, false)\n\n\t\t\t\t\tssLabel.SetVisible(true)\n\t\t\t\t\tssLabel.SetText(\"♻️ Please wait, loading snapshot list...\")\n\n\t\t\t\t\tgo func() {\n\t\t\t\t\t\ttime.Sleep(1 * time.Second)\n\n\t\t\t\t\t\tglib.IdleAdd(func() {\n\t\t\t\t\t\t\tsnapshotURL := cmd.DefaultSnapshotURL // TODO: make me optional...\n\n\t\t\t\t\t\t\tstoreDir := filepath.Join(workingDir, \"data\")\n\t\t\t\t\t\t\timporter, err := cmd.NewImporter(chain, snapshotURL, storeDir)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tgtkutil.ShowError(err)\n\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmdCh := getMetadata(ctx, importer, listBox)\n\n\t\t\t\t\t\t\tif metadata := <-mdCh; metadata == nil {\n\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssLabel, \"❌ Failed to get snapshot list. Please try again later.\", gtkutil.ColorRed)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tssLabel.SetText(\"🔽 Please select a snapshot to download:\")\n\t\t\t\t\t\t\t\tlistBox.SetVisible(true)\n\n\t\t\t\t\t\t\t\tlistBox.Connect(\"row-selected\", func(_ *gtk.ListBox, row *gtk.ListBoxRow) {\n\t\t\t\t\t\t\t\t\tif row != nil {\n\t\t\t\t\t\t\t\t\t\tsnapshotIndex = row.GetIndex()\n\t\t\t\t\t\t\t\t\t\tssDLBtn.SetVisible(true)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\tssDLBtn.Connect(\"clicked\", func() {\n\t\t\t\t\t\t\t\t\tradioGroup, _ := radioImport.GetParent()\n\t\t\t\t\t\t\t\t\tradioImport.SetSensitive(false)\n\t\t\t\t\t\t\t\t\tradioGroup.ToWidget().SetSensitive(false)\n\t\t\t\t\t\t\t\t\tssLabel.SetSensitive(false)\n\t\t\t\t\t\t\t\t\tlistBox.SetSensitive(false)\n\t\t\t\t\t\t\t\t\tssDLBtn.SetSensitive(false)\n\n\t\t\t\t\t\t\t\t\tssDLBtn.SetVisible(false)\n\t\t\t\t\t\t\t\t\tssPBLabel.SetVisible(true)\n\t\t\t\t\t\t\t\t\tlistBox.SetSelectionMode(gtk.SELECTION_NONE)\n\n\t\t\t\t\t\t\t\t\tgo func() {\n\t\t\t\t\t\t\t\t\t\tlog.Print(\"start downloading...\\n\")\n\n\t\t\t\t\t\t\t\t\t\ttime.Sleep(1 * time.Second)\n\t\t\t\t\t\t\t\t\t\terr := importer.Download(ctx, &metadata[snapshotIndex],\n\t\t\t\t\t\t\t\t\t\t\tfunc(fileName string) func(stats downloader.Stats) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn func(stats downloader.Stats) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif !stats.Completed {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpercent := int(stats.Percent)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tglib.IdleAdd(func() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdlMessage := fmt.Sprintf(\"🌐 Downloading %s | %d%% (%s / %s)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfileName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpercent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutil.FormatBytesToHumanReadable(uint64(stats.Downloaded)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tutil.FormatBytesToHumanReadable(uint64(stats.TotalSize)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tssPBLabel.SetText(dlMessage)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t\t\tglib.IdleAdd(func() {\n\t\t\t\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssPBLabel, fmt.Sprintf(\"❌ Import failed: %v\", err), gtkutil.ColorRed)\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tlog.Print(\"extracting data...\\n\")\n\t\t\t\t\t\t\t\t\t\t\tssPBLabel.SetText(\"📂 Extracting downloaded files...\")\n\t\t\t\t\t\t\t\t\t\t\terr := importer.ExtractAndStoreFiles()\n\t\t\t\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssPBLabel, fmt.Sprintf(\"❌ Import failed: %v\", err), gtkutil.ColorRed)\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tlog.Print(\"moving data...\\n\")\n\t\t\t\t\t\t\t\t\t\t\tssPBLabel.SetText(\"📑 Moving data...\")\n\t\t\t\t\t\t\t\t\t\t\terr = importer.MoveStore()\n\t\t\t\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssPBLabel, fmt.Sprintf(\"❌ Import failed: %v\", err), gtkutil.ColorRed)\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tlog.Print(\"cleanup...\\n\")\n\t\t\t\t\t\t\t\t\t\t\terr = importer.Cleanup()\n\t\t\t\t\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssPBLabel, fmt.Sprintf(\"❌ Import failed: %v\", err), gtkutil.ColorRed)\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tgtkutil.SetColoredText(ssPBLabel, \"✅ Import completed.\", gtkutil.ColorGreen)\n\t\t\t\t\t\t\t\t\t\t\tassistantPageComplete(assistant, wgtNodeType, true)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}()\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}()\n\t\t\t\t} else {\n\t\t\t\t\tassistantPageComplete(assistant, wgtNodeType, true)\n\t\t\t\t\tssLabel.SetVisible(false)\n\t\t\t\t\tlistBox.SetVisible(false)\n\t\t\t\t\tssDLBtn.SetVisible(false)\n\t\t\t\t\tssPBLabel.SetVisible(false)\n\t\t\t\t}\n\t\t\t})\n\t\tcase pageAddressRecoveryName:\n\t\t\t// Only handle recovery for restore mode\n\t\t\tif !isRestoreMode {\n\t\t\t\t// Skip this page for new wallets\n\t\t\t\tif isForward {\n\t\t\t\t\tlog.Print(\"jumping forward from addressRecovery page\")\n\t\t\t\t\tassistant.NextPage()\n\t\t\t\t\tprevPageAdjust = 1\n\t\t\t\t} else {\n\t\t\t\t\tlog.Print(\"jumping backward from addressRecovery page\")\n\t\t\t\t\tassistant.PreviousPage()\n\t\t\t\t\tprevPageAdjust = -1\n\t\t\t\t}\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif !addressedRecovered {\n\t\t\t\t// Prevent re-entry\n\t\t\t\taddressedRecovered = true\n\n\t\t\t\t// Disable next button initially\n\t\t\t\tassistantPageComplete(assistant, wgtAddressRecovery, false)\n\n\t\t\t\tlblRecoveryStatus.SetText(\"Processing...\")\n\n\t\t\t\t// Reset recovery context\n\t\t\t\trecoveryCtx, cancelRecovery := context.WithCancel(ctx)\n\n\t\t\t\t// Setup cancel recovery button handler\n\t\t\t\tbtnCancelRecovery.Connect(\"clicked\", func() {\n\t\t\t\t\tlblRecoveryStatus.SetText(\"Cancelling recovery...\")\n\t\t\t\t\tcancelRecovery()\n\t\t\t\t\tbtnCancelRecovery.SetSensitive(false)\n\t\t\t\t})\n\n\t\t\t\tgo func() {\n\t\t\t\t\twalletPassword := gtkutil.GetEntryText(entryPassword)\n\n\t\t\t\t\trecoveryIndex := 0\n\t\t\t\t\terr = nodeWallet.RecoveryAddresses(recoveryCtx, walletPassword, func(addr string) {\n\t\t\t\t\t\tglib.IdleAdd(func() {\n\t\t\t\t\t\t\tcurrentText := gtkutil.GetTextViewContent(txtRecoveryLog)\n\t\t\t\t\t\t\tnewText := fmt.Sprintf(\"%s%d. %s\\n\", currentText, recoveryIndex+1, addr)\n\t\t\t\t\t\t\tgtkutil.SetTextViewContent(txtRecoveryLog, newText)\n\t\t\t\t\t\t\trecoveredAddrs = append(recoveredAddrs, addr)\n\t\t\t\t\t\t\trecoveryIndex++\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\n\t\t\t\t\tglib.IdleAdd(func() {\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tif errors.Is(err, context.Canceled) {\n\t\t\t\t\t\t\t\tgtkutil.SetColoredText(lblRecoveryStatus, \"Address recovery aborted\", gtkutil.ColorYellow)\n\t\t\t\t\t\t\t\tbtnCancelRecovery.SetVisible(false)\n\t\t\t\t\t\t\t\tassistantPageComplete(assistant, wgtAddressRecovery, true)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgtkutil.SetColoredText(lblRecoveryStatus, fmt.Sprintf(\"Address recovery failed: %v\", err), gtkutil.ColorRed)\n\t\t\t\t\t\t\t\tbtnCancelRecovery.SetVisible(false)\n\t\t\t\t\t\t\t\tassistantPageComplete(assistant, wgtAddressRecovery, true)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgtkutil.SetColoredText(lblRecoveryStatus, \"✅ Wallet addresses successfully recovered\", gtkutil.ColorGreen)\n\t\t\t\t\t\t\tbtnCancelRecovery.SetVisible(false)\n\t\t\t\t\t\t\tassistantPageComplete(assistant, wgtAddressRecovery, true)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}()\n\t\t\t}\n\n\t\tcase pageSummaryName:\n\t\t\t// Done! showing the node information\n\t\t\tsuccessful = true\n\t\t\tnodeInfo := \"\"\n\n\t\t\tnodeInfo += \"🔄 Recovered Addresses:\\n\"\n\t\t\tfor i, addr := range recoveredAddrs {\n\t\t\t\tnodeInfo += fmt.Sprintf(\"%v- %s\\n\", i+1, addr)\n\t\t\t}\n\n\t\t\tnodeInfo += \"\\n🏛️ Validator Addresses:\\n\"\n\t\t\tfor i, info := range nodeWallet.ListAddresses(wallet.OnlyValidatorAddresses()) {\n\t\t\t\tnodeInfo += fmt.Sprintf(\"%v- %s\\n\", i+1, info.Address)\n\t\t\t}\n\n\t\t\tnodeInfo += \"\\n💰 Reward Address:\\n\"\n\t\t\tnodeInfo += fmt.Sprintf(\"%s\\n\", rewardAddr)\n\n\t\t\tnodeInfo += fmt.Sprintf(\"\\n📁 Working Directory: %s\", workingDir)\n\t\t\tnodeInfo += fmt.Sprintf(\"\\n🌐 Network: %s\\n\", chain.String())\n\n\t\t\tgtkutil.SetTextViewContent(txtNodeInfo, nodeInfo)\n\t\t}\n\t\tprevPageIndex = curPageIndex + prevPageAdjust\n\t})\n\n\tassistant.SetModal(true)\n\tassistant.ShowAll()\n\n\tgtk.Main()\n\n\tif nodeWallet != nil {\n\t\tnodeWallet.Close()\n\t}\n\n\treturn successful\n}\n\nfunc pageAssistant() assistantFunc {\n\treturn func(assistant *gtk.Assistant, content gtk.IWidget, name, title, subject, desc string) *gtk.Widget {\n\t\tpage, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 20)\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tpage.SetHExpand(true)\n\n\t\tframe, err := gtk.FrameNew(subject)\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tframe.SetHExpand(true)\n\n\t\tlabelDesc, err := gtk.LabelNew(\"\")\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tlabelDesc.SetUseMarkup(true)\n\t\tlabelDesc.SetMarkup(\"<span allow_breaks='true'>\" + desc + \"</span>\")\n\t\tlabelDesc.SetVExpand(true)\n\t\tlabelDesc.SetVAlign(gtk.ALIGN_END)\n\t\tlabelDesc.SetHAlign(gtk.ALIGN_START)\n\t\tsetMargin(labelDesc, 0, 0, 0, 0)\n\t\tframe.Add(content)\n\n\t\tbox, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 10)\n\t\tgtkutil.FatalErrorCheck(err)\n\n\t\tbox.Add(frame)\n\t\tbox.Add(labelDesc)\n\t\tpage.Add(box)\n\t\tpage.SetName(name)\n\t\tassistant.AppendPage(page)\n\t\tassistant.SetPageTitle(page, title)\n\n\t\treturn page.ToWidget()\n\t}\n}\n\nfunc pageWalletMode(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widget, *gtk.RadioButton, string) {\n\tvar mode *gtk.Widget\n\tnewWalletRadio, err := gtk.RadioButtonNewWithLabel(nil, \"Create a new wallet from scratch\")\n\tgtkutil.FatalErrorCheck(err)\n\n\trestoreWalletRadio, err := gtk.RadioButtonNewWithLabelFromWidget(newWalletRadio,\n\t\t\"Restore a wallet from seed phrase\")\n\tgtkutil.FatalErrorCheck(err)\n\n\tradioBox, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)\n\tgtkutil.FatalErrorCheck(err)\n\n\tradioBox.Add(newWalletRadio)\n\tsetMargin(newWalletRadio, 6, 6, 6, 6)\n\tradioBox.Add(restoreWalletRadio)\n\tsetMargin(restoreWalletRadio, 6, 6, 6, 6)\n\n\tpageModeName := \"page_wallet_mode\"\n\tpageModeTitle := \"Wallet Mode\"\n\tpageModeSubject := \"How to create your wallet?\"\n\tpageModeDesc := \"If you are setting up the node for the first time, choose the first option.\"\n\tmode = assistFunc(\n\t\tassistant,\n\t\tradioBox,\n\t\tpageModeName,\n\t\tpageModeTitle,\n\t\tpageModeSubject,\n\t\tpageModeDesc)\n\n\treturn mode, restoreWalletRadio, pageModeName\n}\n\nfunc pageSeedGenerate(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widget, *gtk.TextView, string) {\n\tvar pageWidget *gtk.Widget\n\ttextViewSeed, err := gtk.TextViewNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(textViewSeed, 6, 6, 6, 6)\n\ttextViewSeed.SetWrapMode(gtk.WRAP_WORD)\n\ttextViewSeed.SetEditable(false)\n\ttextViewSeed.SetMonospace(true)\n\ttextViewSeed.SetSizeRequest(0, 80)\n\n\tpageSeedName := \"page_seed_generate\"\n\tpageSeedTitle := \"Wallet Seed\"\n\tpageSeedSubject := \"Your wallet seed phrase:\"\n\tpageSeedDesc := `<b>⚠️ CRITICAL: Write down this seed phrase and store it safely!</b>\n     This is the ONLY way to recover your wallet if needed.\n     Never share it with anyone or store it electronically.`\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\ttextViewSeed,\n\t\tpageSeedName,\n\t\tpageSeedTitle,\n\t\tpageSeedSubject,\n\t\tpageSeedDesc)\n\n\treturn pageWidget, textViewSeed, pageSeedName\n}\n\nfunc pageSeedRestore(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widget, *gtk.TextView, string) {\n\tvar pageWidget *gtk.Widget\n\ttextViewRestoreSeed, err := gtk.TextViewNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(textViewRestoreSeed, 6, 6, 6, 6)\n\ttextViewRestoreSeed.SetWrapMode(gtk.WRAP_WORD)\n\ttextViewRestoreSeed.SetEditable(true)\n\ttextViewRestoreSeed.SetMonospace(true)\n\ttextViewRestoreSeed.SetSizeRequest(0, 80)\n\n\tpageSeedName := \"page_seed_restore\"\n\tpageSeedTitle := \"Wallet Seed Restore\"\n\tpageSeedSubject := \"Enter your wallet seed phrase:\"\n\tpageSeedDesc := \"Please enter your wallet seed phrase to restore your wallet.\"\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\ttextViewRestoreSeed,\n\t\tpageSeedName,\n\t\tpageSeedTitle,\n\t\tpageSeedSubject,\n\t\tpageSeedDesc)\n\n\treturn pageWidget, textViewRestoreSeed, pageSeedName\n}\n\nfunc pageSeedConfirm(assistant *gtk.Assistant, assistFunc assistantFunc,\n\ttextViewSeed *gtk.TextView,\n) (*gtk.Widget, string) {\n\tpageWidget := new(gtk.Widget)\n\ttextViewConfirmSeed, err := gtk.TextViewNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(textViewConfirmSeed, 6, 6, 6, 6)\n\ttextViewConfirmSeed.SetWrapMode(gtk.WRAP_WORD)\n\ttextViewConfirmSeed.SetEditable(true)\n\ttextViewConfirmSeed.SetMonospace(true)\n\ttextViewConfirmSeed.SetSizeRequest(0, 80)\n\n\ttextViewConfirmSeed.Connect(\"paste_clipboard\", func(_ *gtk.TextView) {\n\t\tgtkutil.ShowInfoDialog(assistant, \"Copy and paste is not allowed\")\n\t\ttextViewConfirmSeed.StopEmission(\"paste_clipboard\")\n\t})\n\n\tseedConfirmTextBuffer, err := textViewConfirmSeed.GetBuffer()\n\tgtkutil.FatalErrorCheck(err)\n\n\tseedConfirmTextBuffer.Connect(\"changed\", func(_ *gtk.TextBuffer) {\n\t\tmnemonic1 := gtkutil.GetTextViewContent(textViewSeed)\n\t\tmnemonic2 := gtkutil.GetTextViewContent(textViewConfirmSeed)\n\t\tspace := regexp.MustCompile(`\\s+`)\n\t\tmnemonic2 = space.ReplaceAllString(mnemonic2, \" \")\n\t\tmnemonic2 = strings.TrimSpace(mnemonic2)\n\t\tif mnemonic1 == mnemonic2 {\n\t\t\tassistantPageComplete(assistant, pageWidget, true)\n\t\t} else {\n\t\t\tassistantPageComplete(assistant, pageWidget, false)\n\t\t}\n\t})\n\n\tpageSeedConfirmName := \"page_seed_confirm\"\n\tpageSeedConfirmTitle := \"Confirm Seed\"\n\tpageSeedConfirmSubject := \"What was your seed?\"\n\tpageSeedConfirmDesc := `Your seed phrase is critical for wallet recovery!\nTo ensure you have properly saved your seed phrase, please retype it here.`\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\ttextViewConfirmSeed,\n\t\tpageSeedConfirmName,\n\t\tpageSeedConfirmTitle,\n\t\tpageSeedConfirmSubject,\n\t\tpageSeedConfirmDesc)\n\n\treturn pageWidget, pageSeedConfirmName\n}\n\nfunc pageNodeType(assistant *gtk.Assistant, assistFunc assistantFunc) (\n\t*gtk.Widget,\n\t*gtk.Grid,\n\t*gtk.RadioButton,\n\tstring,\n) {\n\tvar pageWidget *gtk.Widget\n\n\tvbox, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)\n\tgtkutil.FatalErrorCheck(err)\n\n\tgrid, err := gtk.GridNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tbtnFullNode, err := gtk.RadioButtonNewWithLabel(nil, \"Full node\")\n\tgtkutil.FatalErrorCheck(err)\n\tbtnFullNode.SetActive(true)\n\n\tbtnPruneNode, err := gtk.RadioButtonNewWithLabelFromWidget(btnFullNode, \"Pruned node\")\n\tgtkutil.FatalErrorCheck(err)\n\n\tradioBox, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)\n\tgtkutil.FatalErrorCheck(err)\n\n\tradioBox.Add(btnFullNode)\n\tsetMargin(btnFullNode, 6, 6, 6, 6)\n\tradioBox.Add(btnPruneNode)\n\tsetMargin(btnPruneNode, 6, 10, 6, 6)\n\n\tgrid.Attach(radioBox, 0, 0, 1, 1)\n\n\tvbox.PackStart(grid, true, true, 0)\n\n\tpageName := \"page_node_type\"\n\tpageTitle := \"Node Type\"\n\tpageSubject := \"How do you want to start your node?\"\n\tpageDesc := `A pruned node doesn't keep all the historical blockchain data.\nInstead, it only retains the most recent part of the blockchain, deleting older data to save disk space.\nHistorical data is available at: <a href=\"https://snapshot.pactus.org/\">https://snapshot.pactus.org/</a>`\n\n\t// Create and return the page widget using assistFunc\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\tvbox,\n\t\tpageName,\n\t\tpageTitle,\n\t\tpageSubject,\n\t\tpageDesc,\n\t)\n\n\treturn pageWidget, grid, btnPruneNode, pageName\n}\n\nfunc pagePassword(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widget, *gtk.Entry, string) {\n\tpageWidget := new(gtk.Widget)\n\tentryPassword, err := gtk.EntryNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(entryPassword, 6, 6, 6, 6)\n\tentryPassword.SetVisibility(false)\n\tlabelPassword, err := gtk.LabelNew(\"Password: \")\n\tgtkutil.FatalErrorCheck(err)\n\n\tlabelPassword.SetHAlign(gtk.ALIGN_START)\n\tsetMargin(labelPassword, 6, 6, 6, 6)\n\n\tentryConfirmPassword, err := gtk.EntryNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(entryConfirmPassword, 6, 6, 6, 6)\n\tentryConfirmPassword.SetVisibility(false)\n\tlabelConfirmPassword, err := gtk.LabelNew(\"Confirmation: \")\n\tgtkutil.FatalErrorCheck(err)\n\n\tlabelConfirmPassword.SetHAlign(gtk.ALIGN_START)\n\tsetMargin(labelConfirmPassword, 6, 6, 6, 6)\n\n\tgrid, err := gtk.GridNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tlabelMessage, err := gtk.LabelNew(\"\")\n\tgtkutil.FatalErrorCheck(err)\n\n\tgrid.Attach(labelPassword, 0, 0, 1, 1)\n\tgrid.Attach(entryPassword, 1, 0, 1, 1)\n\tgrid.Attach(labelConfirmPassword, 0, 1, 1, 1)\n\tgrid.Attach(entryConfirmPassword, 1, 1, 1, 1)\n\tgrid.Attach(labelMessage, 1, 2, 1, 1)\n\n\tvalidatePassword := func() {\n\t\tpass1 := gtkutil.GetEntryText(entryPassword)\n\t\tpass2 := gtkutil.GetEntryText(entryConfirmPassword)\n\n\t\tif pass1 == pass2 {\n\t\t\tlabelMessage.SetText(\"\")\n\t\t\tassistantPageComplete(assistant, pageWidget, true)\n\t\t} else {\n\t\t\tif pass2 != \"\" {\n\t\t\t\tgtkutil.SetColoredText(labelMessage, \"Passwords do not match\", gtkutil.ColorYellow)\n\t\t\t}\n\t\t\tassistantPageComplete(assistant, pageWidget, false)\n\t\t}\n\t}\n\tentryPassword.Connect(\"changed\", func(_ *gtk.Entry) {\n\t\tvalidatePassword()\n\t})\n\n\tentryConfirmPassword.Connect(\"changed\", func(_ *gtk.Entry) {\n\t\tvalidatePassword()\n\t})\n\n\tpagePasswordName := \"page_password\"\n\tpagePasswordTitle := \"Wallet Password\"\n\tpagePasswordSubject := \"Enter password for your wallet:\"\n\tpagePsswrdDesc := \"Please choose a strong password to protect your wallet.\"\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\tgrid,\n\t\tpagePasswordName,\n\t\tpagePasswordTitle,\n\t\tpagePasswordSubject,\n\t\tpagePsswrdDesc)\n\n\treturn pageWidget, entryPassword, pagePasswordName\n}\n\nfunc pageNumValidators(assistant *gtk.Assistant,\n\tassistFunc assistantFunc,\n) (*gtk.Widget, *gtk.ComboBox, string) {\n\tvar pageWidget *gtk.Widget\n\tlsNumValidators, err := gtk.ListStoreNew(glib.TYPE_INT)\n\tgtkutil.FatalErrorCheck(err)\n\n\tfor i := 0; i < 32; i++ {\n\t\titer := lsNumValidators.Append()\n\t\terr = lsNumValidators.SetValue(iter, 0, i+1)\n\t\tgtkutil.FatalErrorCheck(err)\n\t}\n\n\tcomboNumValidators, err := gtk.ComboBoxNewWithModel(lsNumValidators)\n\tgtkutil.FatalErrorCheck(err)\n\n\tcellRenderer, err := gtk.CellRendererTextNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\t// Set the default selected value to 7 (index 6)\n\tcomboNumValidators.SetActive(6)\n\n\tcomboNumValidators.PackStart(cellRenderer, true)\n\tcomboNumValidators.AddAttribute(cellRenderer, \"text\", 0)\n\n\tlabelNumValidators, err := gtk.LabelNew(\"Number of validators: \")\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(labelNumValidators, 6, 6, 6, 6)\n\tsetMargin(comboNumValidators, 6, 6, 6, 6)\n\n\tgrid, err := gtk.GridNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tgrid.Add(labelNumValidators)\n\tgrid.Attach(comboNumValidators, 1, 0, 1, 1)\n\n\tpageNumValidatorsName := \"page_num_validators\"\n\tpageNumValidatorsTitle := \"Number of Validators\"\n\tpageNumValidatorsSubject := \"How many validators do you want to create?\"\n\tpageNumValidatorsDesc := `Each node can run up to 32 validators, and each validator can hold up to 1000 staked coins.\nYou can define validators based on the amount of coins you want to stake.\nFor more information, look <a href=\"https://pactus.org/user-guides/run-pactus-gui/\">here</a>`\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\tgrid,\n\t\tpageNumValidatorsName,\n\t\tpageNumValidatorsTitle,\n\t\tpageNumValidatorsSubject,\n\t\tpageNumValidatorsDesc)\n\n\treturn pageWidget, comboNumValidators, pageNumValidatorsName\n}\n\nfunc pageAddressRecovery(assistant *gtk.Assistant, assistFunc assistantFunc) (\n\t*gtk.Widget, *gtk.TextView, *gtk.Button, *gtk.Label, string,\n) {\n\tvar pageWidget *gtk.Widget\n\n\t// Create a vertical box to hold all elements\n\tvbox, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 10)\n\tgtkutil.FatalErrorCheck(err)\n\n\t// Create TextView for recovery log (read-only, scrollable)\n\ttextViewRecoveryLog, err := gtk.TextViewNew()\n\tgtkutil.FatalErrorCheck(err)\n\tsetMargin(textViewRecoveryLog, 6, 6, 6, 6)\n\ttextViewRecoveryLog.SetWrapMode(gtk.WRAP_WORD)\n\ttextViewRecoveryLog.SetEditable(false)\n\ttextViewRecoveryLog.SetMonospace(true)\n\n\t// Create scrolled window for the text view\n\tscrolledWindow, err := gtk.ScrolledWindowNew(nil, nil)\n\tgtkutil.FatalErrorCheck(err)\n\tscrolledWindow.SetSizeRequest(0, 200)\n\tscrolledWindow.Add(textViewRecoveryLog)\n\n\t// Create status label\n\tlblRecoveryStatus, err := gtk.LabelNew(\"\")\n\tgtkutil.FatalErrorCheck(err)\n\tsetMargin(lblRecoveryStatus, 6, 6, 6, 6)\n\tlblRecoveryStatus.SetHAlign(gtk.ALIGN_START)\n\n\t// Create cancel button\n\tbtnCancelRecovery, err := gtk.ButtonNewWithLabel(\"Cancel\")\n\tgtkutil.FatalErrorCheck(err)\n\tsetMargin(btnCancelRecovery, 6, 6, 6, 6)\n\tbtnCancelRecovery.SetHAlign(gtk.ALIGN_CENTER)\n\tbtnCancelRecovery.SetSizeRequest(150, -1)\n\n\t// Add widgets to vbox\n\tvbox.PackStart(scrolledWindow, true, true, 0)\n\tvbox.PackStart(lblRecoveryStatus, false, false, 0)\n\tvbox.PackStart(btnCancelRecovery, false, false, 0)\n\n\tpageAddressRecoveryName := \"page_address_recovery\"\n\tpageAddressRecoveryTitle := \"Address Recovery\"\n\tpageAddressRecoverySubject := \"Recovered Addresses\"\n\tpageAddressRecoveryDesc := `Please wait while wallet addresses are recovered...`\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\tvbox,\n\t\tpageAddressRecoveryName,\n\t\tpageAddressRecoveryTitle,\n\t\tpageAddressRecoverySubject,\n\t\tpageAddressRecoveryDesc)\n\n\treturn pageWidget, textViewRecoveryLog, btnCancelRecovery, lblRecoveryStatus, pageAddressRecoveryName\n}\n\nfunc pageSummary(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widget, *gtk.TextView, string) {\n\tvar pageWidget *gtk.Widget\n\ttextViewNodeInfo, err := gtk.TextViewNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tsetMargin(textViewNodeInfo, 6, 6, 6, 6)\n\ttextViewNodeInfo.SetWrapMode(gtk.WRAP_WORD)\n\ttextViewNodeInfo.SetEditable(false)\n\ttextViewNodeInfo.SetMonospace(true)\n\n\tscrolledWindow, err := gtk.ScrolledWindowNew(nil, nil)\n\tgtkutil.FatalErrorCheck(err)\n\n\tscrolledWindow.SetSizeRequest(0, 300)\n\tscrolledWindow.Add(textViewNodeInfo)\n\n\tpageFinalName := \"page_summary\"\n\tpageFinalTitle := \"Summary\"\n\tpageFinalSubject := \"Your node information:\"\n\tpageFinalDesc := `Congratulation. Your node is initialized successfully.\nNow you are ready to start the node!`\n\n\tpageWidget = assistFunc(\n\t\tassistant,\n\t\tscrolledWindow,\n\t\tpageFinalName,\n\t\tpageFinalTitle,\n\t\tpageFinalSubject,\n\t\tpageFinalDesc)\n\n\treturn pageWidget, textViewNodeInfo, pageFinalName\n}\n\nfunc assistantPageComplete(assistant *gtk.Assistant, page gtk.IWidget, completed bool) {\n\tassistant.SetPageComplete(page, completed)\n\tassistant.UpdateButtonsState()\n}\n\nfunc getMetadata(\n\tctx context.Context,\n\timporter *cmd.Importer,\n\tlistBox *gtk.ListBox,\n) <-chan []cmd.Metadata {\n\tmdCh := make(chan []cmd.Metadata, 1)\n\n\tgo func() {\n\t\tdefer close(mdCh)\n\n\t\tchildren := listBox.GetChildren()\n\t\tfor children.Length() > 0 {\n\t\t\tchild := children.Data().(*gtk.Widget)\n\t\t\tlistBox.Remove(child)\n\t\t\tchildren = children.Next()\n\t\t}\n\n\t\tmetadata, err := importer.GetMetadata(ctx)\n\t\tif err != nil {\n\t\t\tmdCh <- nil\n\n\t\t\treturn\n\t\t}\n\n\t\tfor _, md := range metadata {\n\t\t\tlabel, err := gtk.LabelNew(fmt.Sprintf(\"snapshot %s (%s)\",\n\t\t\t\tmd.CreatedAtTime().Format(\"2006-01-02\"),\n\t\t\t\tutil.FormatBytesToHumanReadable(md.Data.Size),\n\t\t\t))\n\t\t\tgtkutil.FatalErrorCheck(err)\n\n\t\t\tlistBoxRow, err := gtk.ListBoxRowNew()\n\t\t\tgtkutil.FatalErrorCheck(err)\n\n\t\t\tlistBoxRow.Add(label)\n\t\t\tlistBox.Add(listBoxRow)\n\t\t}\n\t\tlistBox.ShowAll()\n\t\tmdCh <- metadata\n\t}()\n\n\treturn mdCh\n}\n"
  },
  {
    "path": "cmd/gtk/view/about_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n)\n\nfunc NewAboutDialog() *gtk.AboutDialog {\n\tbuilder := NewViewBuilder(assets.DialogAboutUI)\n\tdlg := builder.GetAboutDialogObj(\"id_dialog_about\")\n\n\tdlg.SetLogo(assets.ImagePactusLogoPixbuf)\n\n\treturn dlg\n}\n"
  },
  {
    "path": "cmd/gtk/view/about_gtk_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n)\n\nfunc NewAboutGTKDialog() *gtk.AboutDialog {\n\tbuilder := NewViewBuilder(assets.DialogAboutGTKUI)\n\tdlg := builder.GetAboutDialogObj(\"id_dialog_about_gtk\")\n\tdlg.SetLogo(assets.ImageGTKLogoPixbuf)\n\n\treturn dlg\n}\n"
  },
  {
    "path": "cmd/gtk/view/address_details_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype AddressDetailsDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tAddressEntry *gtk.Entry\n\tPubKeyEntry  *gtk.Entry\n\tPathEntry    *gtk.Entry\n\n\tButtonClose *gtk.Button\n}\n\nfunc NewAddressDetailsDialogView() *AddressDetailsDialogView {\n\tbuilder := NewViewBuilder(assets.AddressDetailsDialogUI)\n\n\tview := &AddressDetailsDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_address_details\"),\n\n\t\tAddressEntry: builder.BuildExtendedEntry(\"id_overlay_address\"),\n\t\tPubKeyEntry:  builder.BuildExtendedEntry(\"id_overlay_public_key\"),\n\t\tPathEntry:    builder.GetEntryObj(\"id_entry_path\"),\n\n\t\tButtonClose: builder.GetButtonObj(\"id_button_close\"),\n\t}\n\n\tview.ButtonClose.SetImage(gtkutil.ImageFromPixbuf(assets.IconClosePixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/address_label_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype AddressLabelDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tLabelEntry   *gtk.Entry\n\tButtonOK     *gtk.Button\n\tButtonCancel *gtk.Button\n}\n\nfunc NewAddressLabelDialogView() *AddressLabelDialogView {\n\tbuilder := NewViewBuilder(assets.AddressLabelDialogUI)\n\n\tview := &AddressLabelDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_address_label\"),\n\n\t\tLabelEntry:   builder.GetEntryObj(\"id_entry_label\"),\n\t\tButtonOK:     builder.GetButtonObj(\"id_button_ok\"),\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t}\n\n\tview.ButtonOK.SetImage(gtkutil.ImageFromPixbuf(assets.IconOkPixbuf16))\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/address_private_key_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype AddressPrivateKeyDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tAddressEntry *gtk.Entry\n\tPrvKeyEntry  *gtk.Entry\n\tButtonClose  *gtk.Button\n}\n\nfunc NewAddressPrivateKeyDialogView() *AddressPrivateKeyDialogView {\n\tbuilder := NewViewBuilder(assets.AddressPrivateKeyDialogUI)\n\n\tview := &AddressPrivateKeyDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_address_private_key\"),\n\n\t\tAddressEntry: builder.GetEntryObj(\"id_entry_address\"),\n\t\tPrvKeyEntry:  builder.GetEntryObj(\"id_entry_private_key\"),\n\t\tButtonClose:  builder.GetButtonObj(\"id_button_close\"),\n\t}\n\n\tview.ButtonClose.SetImage(gtkutil.ImageFromPixbuf(assets.IconClosePixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/committee_widget_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype CommitteeWidgetView struct {\n\tViewBuilder\n\n\tBox *gtk.Box\n\n\tLabelCommitteeSize    *gtk.Label\n\tLabelCommitteePower   *gtk.Label\n\tLabelTotalPower       *gtk.Label\n\tLabelProtocolVersions *gtk.Label\n\n\tTreeViewMembers *gtk.TreeView\n\tlistStore       *gtk.ListStore\n}\n\nfunc NewCommitteeWidgetView() *CommitteeWidgetView {\n\tbuilder := NewViewBuilder(assets.CommitteeWidgetUI)\n\n\ttreeViewMembers := builder.GetTreeViewObj(\"id_treeview_committee_members\")\n\n\tview := &CommitteeWidgetView{\n\t\tViewBuilder: builder,\n\t\tBox:         builder.GetBoxObj(\"id_box_committee\"),\n\n\t\tLabelCommitteeSize:    builder.GetLabelObj(\"id_label_committee_size\"),\n\t\tLabelCommitteePower:   builder.GetLabelObj(\"id_label_committee_power\"),\n\t\tLabelTotalPower:       builder.GetLabelObj(\"id_label_total_power\"),\n\t\tLabelProtocolVersions: builder.GetLabelObj(\"id_label_protocol_versions\"),\n\n\t\tTreeViewMembers: treeViewMembers,\n\t}\n\n\t// Build list store for committee members table.\n\tlistStore, err := gtk.ListStoreNew(\n\t\tglib.TYPE_STRING, // No\n\t\tglib.TYPE_STRING, // Address\n\t\tglib.TYPE_STRING, // Number\n\t\tglib.TYPE_STRING, // Stake\n\t\tglib.TYPE_STRING, // Last Bonding Height\n\t\tglib.TYPE_STRING, // Last Sortition Height\n\t\tglib.TYPE_STRING, // Protocol Version\n\t\tglib.TYPE_STRING, // Availability Score\n\t)\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.listStore = listStore\n\tview.TreeViewMembers.SetModel(listStore.ToTreeModel())\n\n\tcolNo := createTextColumn(\"No\", 0)\n\tcolAddress := createTextColumn(\"Address\", 1)\n\tcolNumber := createTextColumn(\"Number\", 2)\n\tcolStake := createTextColumn(\"Stake\", 3)\n\tcolBondingHeight := createTextColumn(\"Bonding Height\", 4)\n\tcolSortitionHeight := createTextColumn(\"Sortition Height\", 5)\n\tcolProtocolVersion := createTextColumn(\"Protocol\", 6)\n\tcolScore := createTextColumn(\"Availability\", 7)\n\n\tview.TreeViewMembers.AppendColumn(colNo)\n\tview.TreeViewMembers.AppendColumn(colAddress)\n\tview.TreeViewMembers.AppendColumn(colNumber)\n\tview.TreeViewMembers.AppendColumn(colStake)\n\tview.TreeViewMembers.AppendColumn(colBondingHeight)\n\tview.TreeViewMembers.AppendColumn(colSortitionHeight)\n\tview.TreeViewMembers.AppendColumn(colProtocolVersion)\n\tview.TreeViewMembers.AppendColumn(colScore)\n\n\treturn view\n}\n\nfunc (view *CommitteeWidgetView) ClearRows() {\n\tview.listStore.Clear()\n}\n\nfunc (view *CommitteeWidgetView) AppendRow(cols []int, values []any) {\n\titer := view.listStore.Append()\n\t_ = view.listStore.Set(iter, cols, values)\n}\n"
  },
  {
    "path": "cmd/gtk/view/main_window_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype MainWindowView struct {\n\tViewBuilder\n\n\tWindow *gtk.ApplicationWindow\n\n\tBoxNode          *gtk.Box\n\tBoxDefaultWallet *gtk.Box\n\tBoxValidators    *gtk.Box\n\tBoxCommittee     *gtk.Box\n\tBoxNetwork       *gtk.Box\n}\n\nfunc NewMainWindowView() *MainWindowView {\n\tbuilder := NewViewBuilder(assets.MainWindowUI)\n\n\tboxNode := builder.GetBoxObj(\"id_box_node\")\n\tboxDefaultWallet := builder.GetBoxObj(\"id_box_default_wallet\")\n\tboxValidators := builder.GetBoxObj(\"id_box_validators\")\n\tboxCommittee := builder.GetBoxObj(\"id_box_committee\")\n\tboxNetwork := builder.GetBoxObj(\"id_box_network\")\n\n\tview := &MainWindowView{\n\t\tViewBuilder: builder,\n\t\tWindow:      builder.GetApplicationWindowObj(\"id_main_window\"),\n\n\t\tBoxNode:          boxNode,\n\t\tBoxDefaultWallet: boxDefaultWallet,\n\t\tBoxValidators:    boxValidators,\n\t\tBoxCommittee:     boxCommittee,\n\t\tBoxNetwork:       boxNetwork,\n\t}\n\n\t// apply custom css\n\tprovider, err := gtk.CssProviderNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\terr = provider.LoadFromData(assets.MainWindowCSS)\n\tgtkutil.FatalErrorCheck(err)\n\n\tscreen, err := gdk.ScreenGetDefault()\n\tgtkutil.FatalErrorCheck(err)\n\n\tgtk.AddProviderForScreen(screen, provider, gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)\n\n\treturn view\n}\n\nfunc (v *MainWindowView) Cleanup() {\n\tv.Window.Destroy()\n}\n"
  },
  {
    "path": "cmd/gtk/view/network_widget_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype NetworkWidgetView struct {\n\tViewBuilder\n\n\tBox *gtk.Box\n\n\tLabelNetworkName    *gtk.Label\n\tLabelConnectedPeers *gtk.Label\n\n\tTreeViewPeers *gtk.TreeView\n\tlistStore     *gtk.ListStore\n}\n\nfunc NewNetworkWidgetView() *NetworkWidgetView {\n\tbuilder := NewViewBuilder(assets.NetworkWidgetUI)\n\n\ttreeViewPeers := builder.GetTreeViewObj(\"id_treeview_peers\")\n\n\tview := &NetworkWidgetView{\n\t\tViewBuilder: builder,\n\t\tBox:         builder.GetBoxObj(\"id_box_network\"),\n\n\t\tLabelNetworkName:    builder.GetLabelObj(\"id_label_network_name\"),\n\t\tLabelConnectedPeers: builder.GetLabelObj(\"id_label_connected_peers\"),\n\n\t\tTreeViewPeers: treeViewPeers,\n\t}\n\n\tlistStore, err := gtk.ListStoreNew(\n\t\tglib.TYPE_STRING, // No\n\t\tglib.TYPE_STRING, // Moniker\n\t\tglib.TYPE_STRING, // Address\n\t\tglib.TYPE_STRING, // Peer ID\n\t\tglib.TYPE_STRING, // Height\n\t\tglib.TYPE_STRING, // Agent\n\t\tglib.TYPE_STRING, // Direction\n\t)\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.listStore = listStore\n\tview.TreeViewPeers.SetModel(listStore.ToTreeModel())\n\n\tcolNo := createTextColumn(\"No\", 0)\n\tcolMoniker := createTextColumn(\"Moniker\", 1)\n\tcolAddress := createTextColumn(\"Address\", 2)\n\tcolPeerID := createTextColumn(\"Peer ID\", 3)\n\tcolHeight := createTextColumn(\"Height\", 4)\n\tcolAgent := createTextColumn(\"Agent\", 5)\n\tcolDirection := createTextColumn(\"Direction\", 6)\n\n\tview.TreeViewPeers.AppendColumn(colNo)\n\tview.TreeViewPeers.AppendColumn(colMoniker)\n\tview.TreeViewPeers.AppendColumn(colAddress)\n\tview.TreeViewPeers.AppendColumn(colPeerID)\n\tview.TreeViewPeers.AppendColumn(colHeight)\n\tview.TreeViewPeers.AppendColumn(colAgent)\n\tview.TreeViewPeers.AppendColumn(colDirection)\n\n\treturn view\n}\n\nfunc (view *NetworkWidgetView) ClearRows() {\n\tview.listStore.Clear()\n}\n\nfunc (view *NetworkWidgetView) AppendRow(cols []int, values []any) {\n\titer := view.listStore.Append()\n\t_ = view.listStore.Set(iter, cols, values)\n}\n"
  },
  {
    "path": "cmd/gtk/view/node_widget_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n)\n\ntype NodeWidgetView struct {\n\tViewBuilder\n\n\tBox *gtk.Box\n\n\tLabelConnectionType  *gtk.Label\n\tLabelConnectionValue *gtk.Label\n\tLabelNetwork         *gtk.Label\n\tLabelNetworkID       *gtk.Label\n\tLabelAgent           *gtk.Label\n\tLabelMoniker         *gtk.Label\n\tLabelIsPrune         *gtk.Label\n\n\tLabelClockOffset     *gtk.Label\n\tLabelLastBlockTime   *gtk.Label\n\tLabelLastBlockHeight *gtk.Label\n\tLabelBlocksLeft      *gtk.Label\n\tProgressBarSynced    *gtk.ProgressBar\n\tLabelCommitteeSize   *gtk.Label\n\tLabelActiveValidator *gtk.Label\n\tLabelInCommittee     *gtk.Label\n\tLabelCommitteeStake  *gtk.Label\n\tLabelTotalStake      *gtk.Label\n\tLabelAverageScore    *gtk.Label\n\tLabelNumConnections  *gtk.Label\n\tLabelReachability    *gtk.Label\n}\n\nfunc NewNodeWidgetView() *NodeWidgetView {\n\tbuilder := NewViewBuilder(assets.NodeWidgetUI)\n\n\tview := &NodeWidgetView{\n\t\tViewBuilder: builder,\n\t\tBox:         builder.GetBoxObj(\"id_box_node\"),\n\n\t\tLabelConnectionType:  builder.GetLabelObj(\"id_label_connection_type\"),\n\t\tLabelConnectionValue: builder.GetLabelObj(\"id_label_connection_value\"),\n\t\tLabelNetwork:         builder.GetLabelObj(\"id_label_network\"),\n\t\tLabelNetworkID:       builder.GetLabelObj(\"id_label_network_id\"),\n\t\tLabelAgent:           builder.GetLabelObj(\"id_label_agent\"),\n\t\tLabelMoniker:         builder.GetLabelObj(\"id_label_moniker\"),\n\t\tLabelIsPrune:         builder.GetLabelObj(\"id_label_is_prune\"),\n\n\t\tLabelClockOffset:     builder.GetLabelObj(\"id_label_clock_offset\"),\n\t\tLabelLastBlockTime:   builder.GetLabelObj(\"id_label_last_block_time\"),\n\t\tLabelLastBlockHeight: builder.GetLabelObj(\"id_label_last_block_height\"),\n\t\tLabelBlocksLeft:      builder.GetLabelObj(\"id_label_blocks_left\"),\n\t\tProgressBarSynced:    builder.GetProgressBarObj(\"id_progress_synced\"),\n\t\tLabelCommitteeSize:   builder.GetLabelObj(\"id_label_committee_size\"),\n\t\tLabelActiveValidator: builder.GetLabelObj(\"id_label_active_validators\"),\n\t\tLabelInCommittee:     builder.GetLabelObj(\"id_label_in_committee\"),\n\t\tLabelCommitteeStake:  builder.GetLabelObj(\"id_label_committee_power\"),\n\t\tLabelTotalStake:      builder.GetLabelObj(\"id_label_total_power\"),\n\t\tLabelAverageScore:    builder.GetLabelObj(\"id_label_average_score\"),\n\t\tLabelNumConnections:  builder.GetLabelObj(\"id_label_num_connections\"),\n\t\tLabelReachability:    builder.GetLabelObj(\"id_label_reachability\"),\n\t}\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/splash_window_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gdk\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\n// SplashWindow is a lightweight splash screen that stays visible while the\n// node boots up. Callers can update the status text via SetStatus.\ntype SplashWindow struct {\n\twindow      *gtk.ApplicationWindow\n\tstatusLabel *gtk.Label\n\tversion     *gtk.Label\n\tspinner     *gtk.Spinner\n}\n\nfunc NewSplashWindow(app *gtk.Application) *SplashWindow {\n\twindow, err := gtk.ApplicationWindowNew(app)\n\tgtkutil.FatalErrorCheck(err)\n\n\twindow.SetDecorated(false)\n\twindow.SetResizable(false)\n\twindow.SetTypeHint(gdk.WINDOW_TYPE_HINT_SPLASHSCREEN)\n\twindow.SetPosition(gtk.WIN_POS_CENTER)\n\twindow.SetDefaultSize(420, 220)\n\n\tcontent, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 12)\n\tgtkutil.FatalErrorCheck(err)\n\tcontent.SetBorderWidth(24)\n\n\tlogo := gtkutil.ImageFromPixbuf(assets.ImagePactusLogoPixbuf)\n\tif logo != nil {\n\t\tlogo.SetMarginBottom(8)\n\t\tcontent.Add(logo)\n\t}\n\n\tspinner, err := gtk.SpinnerNew()\n\tgtkutil.FatalErrorCheck(err)\n\tspinner.Start()\n\tspinner.SetMarginBottom(6)\n\tcontent.Add(spinner)\n\n\tstatusLabel, err := gtk.LabelNew(\"Starting node...\")\n\tgtkutil.FatalErrorCheck(err)\n\tstatusLabel.SetHAlign(gtk.ALIGN_START)\n\tcontent.Add(statusLabel)\n\n\tversionLabel, err := gtk.LabelNew(\"\")\n\tgtkutil.FatalErrorCheck(err)\n\tversionLabel.SetHAlign(gtk.ALIGN_START)\n\tversionLabel.SetMarginTop(6)\n\tstyleContext, err := versionLabel.GetStyleContext()\n\tgtkutil.FatalErrorCheck(err)\n\tstyleContext.AddClass(\"dim-label\")\n\tcontent.Add(versionLabel)\n\n\twindow.Add(content)\n\n\treturn &SplashWindow{\n\t\twindow:      window,\n\t\tstatusLabel: statusLabel,\n\t\tspinner:     spinner,\n\t\tversion:     versionLabel,\n\t}\n}\n\nfunc (s *SplashWindow) ShowAll() {\n\ts.window.ShowAll()\n\ts.spinner.Start()\n}\n\nfunc (s *SplashWindow) Destroy() {\n\ts.window.Destroy()\n}\n\nfunc (s *SplashWindow) SetStatus(text string) {\n\ts.statusLabel.SetText(text)\n}\n\nfunc (s *SplashWindow) SetVersion(text string) {\n\ts.version.SetText(text)\n}\n\nfunc (s *SplashWindow) Window() *gtk.ApplicationWindow {\n\treturn s.window\n}\n"
  },
  {
    "path": "cmd/gtk/view/tx_bond_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype TxBondDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tSenderCombo    *gtk.ComboBoxText\n\tSenderHint     *gtk.Label\n\tReceiverCombo  *gtk.ComboBoxText\n\tReceiverHint   *gtk.Label\n\tPublicKeyEntry *gtk.Entry\n\tAmountEntry    *gtk.Entry\n\tAmountHint     *gtk.Label\n\tFeeEntry       *gtk.Entry\n\tFeeHint        *gtk.Label\n\tMemoEntry      *gtk.Entry\n\n\tButtonCancel *gtk.Button\n\tButtonSend   *gtk.Button\n}\n\nfunc NewTxBondDialogView() *TxBondDialogView {\n\tbuilder := NewViewBuilder(assets.TxBondDialogUI)\n\n\tview := &TxBondDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_transaction_bond\"),\n\n\t\tSenderCombo:    builder.GetComboBoxTextObj(\"id_combo_sender\"),\n\t\tSenderHint:     builder.GetLabelObj(\"id_hint_sender\"),\n\t\tReceiverCombo:  builder.GetComboBoxTextObj(\"id_combo_receiver\"),\n\t\tReceiverHint:   builder.GetLabelObj(\"id_hint_receiver\"),\n\t\tPublicKeyEntry: builder.GetEntryObj(\"id_entry_public_key\"),\n\t\tAmountEntry:    builder.GetEntryObj(\"id_entry_amount\"),\n\t\tAmountHint:     builder.GetLabelObj(\"id_hint_amount\"),\n\t\tFeeEntry:       builder.GetEntryObj(\"id_entry_fee\"),\n\t\tFeeHint:        builder.GetLabelObj(\"id_hint_fee\"),\n\t\tMemoEntry:      builder.GetEntryObj(\"id_entry_memo\"),\n\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t\tButtonSend:   builder.GetButtonObj(\"id_button_send\"),\n\t}\n\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\tview.ButtonSend.SetImage(gtkutil.ImageFromPixbuf(assets.IconSendPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/tx_transfer_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype TxTransferDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tSenderCombo   *gtk.ComboBoxText\n\tSenderHint    *gtk.Label\n\tReceiverEntry *gtk.Entry\n\tReceiverHint  *gtk.Label\n\tAmountEntry   *gtk.Entry\n\tAmountHint    *gtk.Label\n\tFeeEntry      *gtk.Entry\n\tFeeHint       *gtk.Label\n\tMemoEntry     *gtk.Entry\n\n\tButtonCancel *gtk.Button\n\tButtonSend   *gtk.Button\n}\n\nfunc NewTxTransferDialogView() *TxTransferDialogView {\n\tbuilder := NewViewBuilder(assets.TxTransferDialogUI)\n\n\tview := &TxTransferDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_transaction_transfer\"),\n\n\t\tSenderCombo:   builder.GetComboBoxTextObj(\"id_combo_sender\"),\n\t\tSenderHint:    builder.GetLabelObj(\"id_hint_sender\"),\n\t\tReceiverEntry: builder.GetEntryObj(\"id_entry_receiver\"),\n\t\tReceiverHint:  builder.GetLabelObj(\"id_hint_receiver\"),\n\t\tAmountEntry:   builder.GetEntryObj(\"id_entry_amount\"),\n\t\tAmountHint:    builder.GetLabelObj(\"id_hint_amount\"),\n\t\tFeeEntry:      builder.GetEntryObj(\"id_entry_fee\"),\n\t\tFeeHint:       builder.GetLabelObj(\"id_hint_fee\"),\n\t\tMemoEntry:     builder.GetEntryObj(\"id_entry_memo\"),\n\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t\tButtonSend:   builder.GetButtonObj(\"id_button_send\"),\n\t}\n\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\tview.ButtonSend.SetImage(gtkutil.ImageFromPixbuf(assets.IconSendPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/tx_unbond_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype TxUnbondDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tValidatorCombo *gtk.ComboBoxText\n\tValidatorHint  *gtk.Label\n\tMemoEntry      *gtk.Entry\n\n\tButtonCancel *gtk.Button\n\tButtonSend   *gtk.Button\n}\n\nfunc NewTxUnbondDialogView() *TxUnbondDialogView {\n\tbuilder := NewViewBuilder(assets.TxUnbondDialogUI)\n\n\tview := &TxUnbondDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_transaction_unbond\"),\n\n\t\tValidatorCombo: builder.GetComboBoxTextObj(\"id_combo_validator\"),\n\t\tValidatorHint:  builder.GetLabelObj(\"id_hint_validator\"),\n\t\tMemoEntry:      builder.GetEntryObj(\"id_entry_memo\"),\n\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t\tButtonSend:   builder.GetButtonObj(\"id_button_send\"),\n\t}\n\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\tview.ButtonSend.SetImage(gtkutil.ImageFromPixbuf(assets.IconSendPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/tx_withdraw_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype TxWithdrawDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tValidatorCombo *gtk.ComboBoxText\n\tValidatorHint  *gtk.Label\n\tReceiverCombo  *gtk.ComboBoxText\n\tReceiverHint   *gtk.Label\n\tStakeEntry     *gtk.Entry\n\tStakeHint      *gtk.Label\n\tFeeEntry       *gtk.Entry\n\tFeeHint        *gtk.Label\n\tMemoEntry      *gtk.Entry\n\n\tButtonCancel *gtk.Button\n\tButtonSend   *gtk.Button\n}\n\nfunc NewTxWithdrawDialogView() *TxWithdrawDialogView {\n\tbuilder := NewViewBuilder(assets.TxWithdrawDialogUI)\n\n\tview := &TxWithdrawDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_transaction_withdraw\"),\n\n\t\tValidatorCombo: builder.GetComboBoxTextObj(\"id_combo_validator\"),\n\t\tValidatorHint:  builder.GetLabelObj(\"id_hint_validator\"),\n\t\tReceiverCombo:  builder.GetComboBoxTextObj(\"id_combo_receiver\"),\n\t\tReceiverHint:   builder.GetLabelObj(\"id_hint_receiver\"),\n\t\tStakeEntry:     builder.GetEntryObj(\"id_entry_stake\"),\n\t\tStakeHint:      builder.GetLabelObj(\"id_hint_stake\"),\n\t\tFeeEntry:       builder.GetEntryObj(\"id_entry_fee\"),\n\t\tFeeHint:        builder.GetLabelObj(\"id_hint_fee\"),\n\t\tMemoEntry:      builder.GetEntryObj(\"id_entry_memo\"),\n\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t\tButtonSend:   builder.GetButtonObj(\"id_button_send\"),\n\t}\n\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\tview.ButtonSend.SetImage(gtkutil.ImageFromPixbuf(assets.IconSendPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/validator_widget_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype ValidatorWidgetView struct {\n\tViewBuilder\n\n\tBox *gtk.Box\n\n\tTreeViewValidators *gtk.TreeView\n\tlistStore          *gtk.ListStore\n}\n\nfunc NewValidatorWidgetView() *ValidatorWidgetView {\n\tbuilder := NewViewBuilder(assets.ValidatorWidgetUI)\n\n\ttreeViewValidators := builder.GetTreeViewObj(\"id_treeview_validators\")\n\n\tview := &ValidatorWidgetView{\n\t\tViewBuilder: builder,\n\t\tBox:         builder.GetBoxObj(\"id_box_validator\"),\n\n\t\tTreeViewValidators: treeViewValidators,\n\t}\n\n\t// Build list store for validator table.\n\tlistStore, err := gtk.ListStoreNew(\n\t\tglib.TYPE_STRING, // no\n\t\tglib.TYPE_STRING, // address\n\t\tglib.TYPE_STRING, // number\n\t\tglib.TYPE_STRING, // stake\n\t\tglib.TYPE_STRING, // last bonding height\n\t\tglib.TYPE_STRING, // last sortition height\n\t\tglib.TYPE_STRING, // unbonding height\n\t\tglib.TYPE_STRING, // availability score\n\t)\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.listStore = listStore\n\tview.TreeViewValidators.SetModel(listStore.ToTreeModel())\n\n\t// Columns.\n\tcolNo := createTextColumn(\"No\", 0)\n\tcolAddress := createTextColumn(\"Address\", 1)\n\tcolNumber := createTextColumn(\"Number\", 2)\n\tcolStake := createTextColumn(\"Stake\", 3)\n\tcolBondingHeight := createTextColumn(\"Bonding Height\", 4)\n\tcolSortitionHeight := createTextColumn(\"Last Sortition Height\", 5)\n\tcolUnbondingHeight := createTextColumn(\"Unbonding Height\", 6)\n\tcolScore := createTextColumn(\"Availability Score\", 7)\n\n\tview.TreeViewValidators.AppendColumn(colNo)\n\tview.TreeViewValidators.AppendColumn(colAddress)\n\tview.TreeViewValidators.AppendColumn(colNumber)\n\tview.TreeViewValidators.AppendColumn(colStake)\n\tview.TreeViewValidators.AppendColumn(colBondingHeight)\n\tview.TreeViewValidators.AppendColumn(colSortitionHeight)\n\tview.TreeViewValidators.AppendColumn(colUnbondingHeight)\n\tview.TreeViewValidators.AppendColumn(colScore)\n\n\treturn view\n}\n\nfunc (view *ValidatorWidgetView) ClearRows() {\n\tview.listStore.Clear()\n}\n\nfunc (view *ValidatorWidgetView) AppendRow(cols []int, values []any) {\n\titer := view.listStore.Append()\n\t_ = view.listStore.Set(iter, cols, values)\n}\n"
  },
  {
    "path": "cmd/gtk/view/view_builder.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\n// ViewBuilder is a small embedded helper for views created from a gtk.Builder.\ntype ViewBuilder struct {\n\tbuilder *gtk.Builder\n}\n\nfunc NewViewBuilder(ui []byte) ViewBuilder {\n\tbuilder, err := gtk.BuilderNewFromString(string(ui))\n\tgtkutil.FatalErrorCheck(err)\n\n\treturn ViewBuilder{builder: builder}\n}\n\nfunc (vb *ViewBuilder) Builder() *gtk.Builder {\n\treturn vb.builder\n}\n\nfunc (vb *ViewBuilder) GetObj(name string) glib.IObject {\n\tobj, err := vb.builder.GetObject(name)\n\tgtkutil.FatalErrorCheck(err)\n\n\treturn obj\n}\n\nfunc (vb *ViewBuilder) GetApplicationWindowObj(name string) *gtk.ApplicationWindow {\n\treturn vb.GetObj(name).(*gtk.ApplicationWindow)\n}\n\nfunc (vb *ViewBuilder) GetDialogObj(name string) *gtk.Dialog {\n\treturn vb.GetObj(name).(*gtk.Dialog)\n}\n\nfunc (vb *ViewBuilder) GetAboutDialogObj(name string) *gtk.AboutDialog {\n\treturn vb.GetObj(name).(*gtk.AboutDialog)\n}\n\nfunc (vb *ViewBuilder) GetComboBoxTextObj(name string) *gtk.ComboBoxText {\n\treturn vb.GetObj(name).(*gtk.ComboBoxText)\n}\n\nfunc (vb *ViewBuilder) GetEntryObj(name string) *gtk.Entry {\n\treturn vb.GetObj(name).(*gtk.Entry)\n}\n\nfunc (vb *ViewBuilder) GetOverlayObj(name string) *gtk.Overlay {\n\treturn vb.GetObj(name).(*gtk.Overlay)\n}\n\nfunc (vb *ViewBuilder) GetTreeViewObj(name string) *gtk.TreeView {\n\treturn vb.GetObj(name).(*gtk.TreeView)\n}\n\nfunc (vb *ViewBuilder) GetTextViewObj(name string) *gtk.TextView {\n\treturn vb.GetObj(name).(*gtk.TextView)\n}\n\nfunc (vb *ViewBuilder) GetBoxObj(name string) *gtk.Box {\n\treturn vb.GetObj(name).(*gtk.Box)\n}\n\nfunc (vb *ViewBuilder) GetLabelObj(name string) *gtk.Label {\n\treturn vb.GetObj(name).(*gtk.Label)\n}\n\nfunc (vb *ViewBuilder) GetToolButtonObj(name string) *gtk.ToolButton {\n\treturn vb.GetObj(name).(*gtk.ToolButton)\n}\n\nfunc (vb *ViewBuilder) GetButtonObj(name string) *gtk.Button {\n\treturn vb.GetObj(name).(*gtk.Button)\n}\n\nfunc (vb *ViewBuilder) GetImageObj(name string) *gtk.Image {\n\treturn vb.GetObj(name).(*gtk.Image)\n}\n\nfunc (vb *ViewBuilder) GetProgressBarObj(name string) *gtk.ProgressBar {\n\treturn vb.GetObj(name).(*gtk.ProgressBar)\n}\n\nfunc (vb *ViewBuilder) GetMenuItem(name string) *gtk.MenuItem {\n\treturn vb.GetObj(name).(*gtk.MenuItem)\n}\n\nfunc (vb *ViewBuilder) BuildExtendedEntry(name string) *gtk.Entry {\n\treturn gtkutil.BuildExtendedEntry(vb.builder, name)\n}\n\nfunc (vb *ViewBuilder) ConnectSignals(signals map[string]any) {\n\tvb.builder.ConnectSignals(signals)\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_change_password_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletChangePasswordDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tOldPasswordEntry *gtk.Entry\n\tOldPasswordLabel *gtk.Label\n\tNewPasswordEntry *gtk.Entry\n\tRepeatEntry      *gtk.Entry\n\n\tButtonOK     *gtk.Button\n\tButtonCancel *gtk.Button\n}\n\nfunc NewWalletChangePasswordDialogView() *WalletChangePasswordDialogView {\n\tbuilder := NewViewBuilder(assets.WalletChangePasswordDialogUI)\n\n\tview := &WalletChangePasswordDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_wallet_change_password\"),\n\n\t\tOldPasswordEntry: builder.GetEntryObj(\"id_entry_old_password\"),\n\t\tOldPasswordLabel: builder.GetLabelObj(\"id_label_old_password\"),\n\t\tNewPasswordEntry: builder.GetEntryObj(\"id_entry_new_password\"),\n\t\tRepeatEntry:      builder.GetEntryObj(\"id_entry_repeat_password\"),\n\n\t\tButtonOK:     builder.GetButtonObj(\"id_button_ok\"),\n\t\tButtonCancel: builder.GetButtonObj(\"id_button_cancel\"),\n\t}\n\n\tview.ButtonOK.SetImage(gtkutil.ImageFromPixbuf(assets.IconOkPixbuf16))\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_create_address_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletCreateAddressDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tLabelEntry       *gtk.Entry\n\tAddressTypeCombo *gtk.ComboBoxText\n\tButtonOK         *gtk.Button\n\tButtonCancel     *gtk.Button\n}\n\nfunc NewWalletCreateAddressDialogView() *WalletCreateAddressDialogView {\n\tbuilder := NewViewBuilder(assets.WalletCreateAddressDialogUI)\n\n\tview := &WalletCreateAddressDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_wallet_create_address\"),\n\n\t\tLabelEntry:       builder.GetEntryObj(\"id_entry_account_label\"),\n\t\tAddressTypeCombo: builder.GetComboBoxTextObj(\"id_combo_address_type\"),\n\t\tButtonOK:         builder.GetButtonObj(\"id_button_ok\"),\n\t\tButtonCancel:     builder.GetButtonObj(\"id_button_cancel\"),\n\t}\n\n\tview.ButtonOK.SetImage(gtkutil.ImageFromPixbuf(assets.IconOkPixbuf16))\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_default_fee_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletDefaultFeeDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tFeeEntry        *gtk.Entry\n\tCurrentFeeLabel *gtk.Label\n\tButtonOK        *gtk.Button\n\tButtonCancel    *gtk.Button\n}\n\nfunc NewWalletDefaultFeeDialogView() *WalletDefaultFeeDialogView {\n\tbuilder := NewViewBuilder(assets.WalletSetDefaultFeeDialogUI)\n\n\tview := &WalletDefaultFeeDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_wallet_set_default_fee\"),\n\n\t\tFeeEntry:        builder.GetEntryObj(\"id_entry_default_fee\"),\n\t\tCurrentFeeLabel: builder.GetLabelObj(\"id_label_current_fee_value\"),\n\t\tButtonOK:        builder.GetButtonObj(\"id_button_ok\"),\n\t\tButtonCancel:    builder.GetButtonObj(\"id_button_cancel\"),\n\t}\n\n\tview.ButtonOK.SetImage(gtkutil.ImageFromPixbuf(assets.IconOkPixbuf16))\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_password_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletPasswordDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tPasswordEntry *gtk.Entry\n\tButtonOK      *gtk.Button\n\tButtonCancel  *gtk.Button\n}\n\nfunc NewWalletPasswordDialogView() *WalletPasswordDialogView {\n\tbuilder := NewViewBuilder(assets.WalletPasswordDialogUI)\n\n\tview := &WalletPasswordDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_wallet_password\"),\n\n\t\tPasswordEntry: builder.GetEntryObj(\"id_entry_password\"),\n\t\tButtonOK:      builder.GetButtonObj(\"id_button_ok\"),\n\t\tButtonCancel:  builder.GetButtonObj(\"id_button_cancel\"),\n\t}\n\n\tview.ButtonOK.SetImage(gtkutil.ImageFromPixbuf(assets.IconOkPixbuf16))\n\tview.ButtonCancel.SetImage(gtkutil.ImageFromPixbuf(assets.IconCancelPixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_seed_dialog_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletSeedDialogView struct {\n\tViewBuilder\n\n\tDialog *gtk.Dialog\n\n\tTextView    *gtk.TextView\n\tImage       *gtk.Image\n\tButtonClose *gtk.Button\n}\n\nfunc NewWalletSeedDialogView() *WalletSeedDialogView {\n\tbuilder := NewViewBuilder(assets.WalletShowSeedDialogUI)\n\n\tview := &WalletSeedDialogView{\n\t\tViewBuilder: builder,\n\t\tDialog:      builder.GetDialogObj(\"id_dialog_wallet_show_seed\"),\n\n\t\tTextView:    builder.GetTextViewObj(\"id_textview_seed\"),\n\t\tImage:       builder.GetImageObj(\"id_image_seed\"),\n\t\tButtonClose: builder.GetButtonObj(\"id_button_close\"),\n\t}\n\n\tview.Image.SetFromPixbuf(assets.ImageSeedPixbuf)\n\tview.ButtonClose.SetImage(gtkutil.ImageFromPixbuf(assets.IconClosePixbuf16))\n\n\treturn view\n}\n"
  },
  {
    "path": "cmd/gtk/view/wallet_widget_view.go",
    "content": "//go:build gtk\n\npackage view\n\nimport (\n\t\"github.com/gotk3/gotk3/glib\"\n\t\"github.com/gotk3/gotk3/gtk\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/assets\"\n\t\"github.com/pactus-project/pactus/cmd/gtk/gtkutil\"\n)\n\ntype WalletWidgetView struct {\n\tViewBuilder\n\n\tBox *gtk.Box\n\n\tTreeViewWallet       *gtk.TreeView\n\tTreeViewTransactions *gtk.TreeView\n\tLabelName            *gtk.Label\n\tLabelDriver          *gtk.Label\n\tLabelCreatedAt       *gtk.Label\n\tLabelLocation        *gtk.Label\n\tLabelEncrypted       *gtk.Label\n\tLabelTotalBalance    *gtk.Label\n\tLabelDefaultFee      *gtk.Label\n\tLabelTotalStake      *gtk.Label\n\n\tBtnRefreshAddresses *gtk.ToolButton\n\tBtnNewAddress       *gtk.ToolButton\n\tBtnSetDefaultFee    *gtk.ToolButton\n\tBtnChangePassword   *gtk.ToolButton\n\tBtnShowSeed         *gtk.ToolButton\n\tBtnTxRefresh        *gtk.ToolButton\n\tBtnTxPrev           *gtk.ToolButton\n\tBtnTxNext           *gtk.ToolButton\n\n\tContextMenu         *gtk.Menu\n\tMenuItemUpdateLabel *gtk.MenuItem\n\tMenuItemDetails     *gtk.MenuItem\n\tMenuItemPrivateKey  *gtk.MenuItem\n\n\tlistStore   *gtk.ListStore\n\ttxListStore *gtk.ListStore\n}\n\nfunc createTextColumn(title string, columnID int) *gtk.TreeViewColumn {\n\tcellRenderer, err := gtk.CellRendererTextNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tcolumn, err := gtk.TreeViewColumnNewWithAttribute(title, cellRenderer, \"text\", columnID)\n\tgtkutil.FatalErrorCheck(err)\n\n\tcolumn.SetResizable(true)\n\n\treturn column\n}\n\nfunc NewWalletWidgetView() *WalletWidgetView {\n\tbuilder := NewViewBuilder(assets.WalletWidgetUI)\n\n\ttreeViewWallet := builder.GetTreeViewObj(\"id_treeview_addresses\")\n\ttreeViewTransactions := builder.GetTreeViewObj(\"id_treeview_transactions\")\n\n\tview := &WalletWidgetView{\n\t\tViewBuilder: builder,\n\t\tBox:         builder.GetBoxObj(\"id_box_wallet\"),\n\n\t\tTreeViewWallet:       treeViewWallet,\n\t\tTreeViewTransactions: treeViewTransactions,\n\t\tLabelName:            builder.GetLabelObj(\"id_label_wallet_name\"),\n\t\tLabelDriver:          builder.GetLabelObj(\"id_label_wallet_driver\"),\n\t\tLabelCreatedAt:       builder.GetLabelObj(\"id_label_wallet_created_at\"),\n\t\tLabelLocation:        builder.GetLabelObj(\"id_label_wallet_location\"),\n\t\tLabelEncrypted:       builder.GetLabelObj(\"id_label_wallet_encrypted\"),\n\n\t\tLabelTotalBalance: builder.GetLabelObj(\"id_label_wallet_total_balance\"),\n\t\tLabelTotalStake:   builder.GetLabelObj(\"id_label_wallet_total_stake\"),\n\t\tLabelDefaultFee:   builder.GetLabelObj(\"id_label_wallet_default_fee\"),\n\n\t\tBtnRefreshAddresses: builder.GetToolButtonObj(\"id_button_refresh_addresses\"),\n\t\tBtnNewAddress:       builder.GetToolButtonObj(\"id_button_new_address\"),\n\t\tBtnSetDefaultFee:    builder.GetToolButtonObj(\"id_button_set_default_fee\"),\n\t\tBtnChangePassword:   builder.GetToolButtonObj(\"id_button_change_password\"),\n\t\tBtnShowSeed:         builder.GetToolButtonObj(\"id_button_show_seed\"),\n\t\tBtnTxRefresh:        builder.GetToolButtonObj(\"id_button_tx_refresh\"),\n\t\tBtnTxPrev:           builder.GetToolButtonObj(\"id_button_tx_prev\"),\n\t\tBtnTxNext:           builder.GetToolButtonObj(\"id_button_tx_next\"),\n\t}\n\n\t// Toolbar icons.\n\tview.BtnRefreshAddresses.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconRefreshPixbuf16))\n\tview.BtnNewAddress.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconAddPixbuf16))\n\tview.BtnSetDefaultFee.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconFeePixbuf16))\n\tview.BtnChangePassword.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconPasswordPixbuf16))\n\tview.BtnShowSeed.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconSeedPixbuf16))\n\tview.BtnTxRefresh.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconRefreshPixbuf16))\n\tview.BtnTxPrev.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconPrevPixbuf16))\n\tview.BtnTxNext.SetIconWidget(gtkutil.ImageFromPixbuf(assets.IconNextPixbuf16))\n\tview.BtnTxPrev.SetSensitive(false)\n\tview.BtnTxNext.SetSensitive(false)\n\n\t// Build list store for address table.\n\tlistStore, err := gtk.ListStoreNew(\n\t\tglib.TYPE_STRING, // No\n\t\tglib.TYPE_STRING, // Address\n\t\tglib.TYPE_STRING, // Label\n\t\tglib.TYPE_STRING, // Balance\n\t\tglib.TYPE_STRING, // Stake\n\t)\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.listStore = listStore\n\tview.TreeViewWallet.SetModel(listStore.ToTreeModel())\n\n\t// Columns.\n\tcolNo := createTextColumn(\"No\", 0)\n\tcolAddress := createTextColumn(\"Address\", 1)\n\tcolLabel := createTextColumn(\"Label\", 2)\n\tcolBalance := createTextColumn(\"Balance\", 3)\n\tcolStake := createTextColumn(\"Stake\", 4)\n\n\tview.TreeViewWallet.AppendColumn(colNo)\n\tview.TreeViewWallet.AppendColumn(colAddress)\n\tview.TreeViewWallet.AppendColumn(colLabel)\n\tview.TreeViewWallet.AppendColumn(colBalance)\n\tview.TreeViewWallet.AppendColumn(colStake)\n\n\t// Transactions list store and columns.\n\ttxStore, err := gtk.ListStoreNew(\n\t\tglib.TYPE_STRING, // no\n\t\tglib.TYPE_STRING, // id\n\t\tglib.TYPE_STRING, // sender\n\t\tglib.TYPE_STRING, // receiver\n\t\tglib.TYPE_STRING, // type\n\t\tglib.TYPE_STRING, // amount\n\t\tglib.TYPE_STRING, // direction\n\t\tglib.TYPE_STRING, // status\n\t\tglib.TYPE_STRING, // comment\n\t)\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.txListStore = txStore\n\tview.TreeViewTransactions.SetModel(txStore.ToTreeModel())\n\n\tcolTxNo := createTextColumn(\"#\", 0)\n\tcolTxID := createTextColumn(\"ID\", 1)\n\tcolTxSender := createTextColumn(\"Sender\", 2)\n\tcolTxReceiver := createTextColumn(\"Receiver\", 3)\n\tcolTxType := createTextColumn(\"Type\", 4)\n\tcolTxAmount := createTextColumn(\"Amount\", 5)\n\tcolTxDir := createTextColumn(\"Direction\", 6)\n\tcolTxStatus := createTextColumn(\"Status\", 7)\n\tcolTxComment := createTextColumn(\"Comment\", 8)\n\n\tview.TreeViewTransactions.AppendColumn(colTxNo)\n\tview.TreeViewTransactions.AppendColumn(colTxID)\n\tview.TreeViewTransactions.AppendColumn(colTxSender)\n\tview.TreeViewTransactions.AppendColumn(colTxReceiver)\n\tview.TreeViewTransactions.AppendColumn(colTxType)\n\tview.TreeViewTransactions.AppendColumn(colTxAmount)\n\tview.TreeViewTransactions.AppendColumn(colTxDir)\n\tview.TreeViewTransactions.AppendColumn(colTxStatus)\n\tview.TreeViewTransactions.AppendColumn(colTxComment)\n\n\t// Context menu (actions are wired by controller).\n\tmenu, err := gtk.MenuNew()\n\tgtkutil.FatalErrorCheck(err)\n\n\tview.ContextMenu = menu\n\n\titem, err := gtk.MenuItemNewWithLabel(\"Update _Label\")\n\tgtkutil.FatalErrorCheck(err)\n\n\titem.SetUseUnderline(true)\n\titem.Show()\n\tmenu.Append(item)\n\tview.MenuItemUpdateLabel = item\n\n\titem, err = gtk.MenuItemNewWithLabel(\"_Details\")\n\tgtkutil.FatalErrorCheck(err)\n\n\titem.SetUseUnderline(true)\n\titem.Show()\n\tmenu.Append(item)\n\tview.MenuItemDetails = item\n\n\titem, err = gtk.MenuItemNewWithLabel(\"_Private key\")\n\tgtkutil.FatalErrorCheck(err)\n\n\titem.SetUseUnderline(true)\n\titem.Show()\n\tmenu.Append(item)\n\tview.MenuItemPrivateKey = item\n\n\treturn view\n}\n\nfunc (view *WalletWidgetView) ClearRows() {\n\tview.listStore.Clear()\n}\n\nfunc (view *WalletWidgetView) AppendRow(cols []int, values []any) {\n\titer := view.listStore.Append()\n\t_ = view.listStore.Set(iter, cols, values)\n}\n\nfunc (view *WalletWidgetView) ClearTxRows() {\n\tview.txListStore.Clear()\n}\n\nfunc (view *WalletWidgetView) AppendTxRow(cols []int, values []any) {\n\titer := view.txListStore.Append()\n\t_ = view.txListStore.Set(iter, cols, values)\n}\n\nfunc (view *WalletWidgetView) SetTxPager(prevEnabled, nextEnabled bool) {\n\tview.BtnTxPrev.SetSensitive(prevEnabled)\n\tview.BtnTxNext.SetSensitive(nextEnabled)\n}\n\nfunc (view *WalletWidgetView) SelectionAddress(addressColumn int) (string, bool, error) {\n\tselection, err := view.TreeViewWallet.GetSelection()\n\tif err != nil {\n\t\treturn \"\", false, err\n\t}\n\tif selection == nil {\n\t\treturn \"\", false, nil\n\t}\n\tmodel, iter, ok := selection.GetSelected()\n\tif !ok {\n\t\treturn \"\", false, nil\n\t}\n\tval, err := model.(*gtk.TreeModel).GetValue(iter, addressColumn)\n\tif err != nil {\n\t\treturn \"\", false, err\n\t}\n\taddr, err := val.GetString()\n\tif err != nil {\n\t\treturn \"\", false, err\n\t}\n\n\treturn addr, true, nil\n}\n"
  },
  {
    "path": "cmd/helper.go",
    "content": "package cmd\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\nfunc ShortHash(id string) string {\n\th, err := hash.FromString(id)\n\tif err != nil {\n\t\treturn id\n\t}\n\n\treturn h.ShortString()\n}\n\nfunc ShortAddress(addr string) string {\n\ta, err := crypto.AddressFromString(addr)\n\tif err != nil {\n\t\treturn addr\n\t}\n\n\treturn a.ShortString()\n}\n"
  },
  {
    "path": "cmd/importer.go",
    "content": "package cmd\n\nimport (\n\t\"archive/zip\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/downloader\"\n)\n\nconst DefaultSnapshotURL = \"https://snapshot.pactus.org\"\n\nconst maxDecompressedSize = 10 << 20 // 10 MB\n\ntype ImporterStateFunc func(fileName string) func(stats downloader.Stats)\n\ntype Metadata struct {\n\tName      string       `json:\"name\"`\n\tCreatedAt string       `json:\"created_at\"`\n\tCompress  string       `json:\"compress\"`\n\tData      SnapshotData `json:\"data\"`\n}\n\ntype SnapshotData struct {\n\tName string `json:\"name\"`\n\tPath string `json:\"path\"`\n\tSha  string `json:\"sha\"`\n\tSize uint64 `json:\"size\"`\n}\n\nfunc (md *Metadata) CreatedAtTime() time.Time {\n\tconst layout = \"2006-01-02T15:04:05.000000\"\n\n\tparsedTime, err := time.Parse(layout, md.CreatedAt)\n\tif err != nil {\n\t\treturn time.Time{}\n\t}\n\n\treturn parsedTime\n}\n\n// Importer downloads and imports the pruned data from a centralized server.\ntype Importer struct {\n\tsnapshotURL  string\n\ttempDir      string\n\tstoreDir     string\n\tdataFileName string\n}\n\nfunc NewImporter(chainType genesis.ChainType, snapshotURL, storeDir string) (*Importer, error) {\n\tif util.PathExists(storeDir) {\n\t\treturn nil, fmt.Errorf(\"data directory is not empty: %s\", storeDir)\n\t}\n\n\tswitch chainType {\n\tcase genesis.Mainnet:\n\t\tsnapshotURL += \"/mainnet/\"\n\tcase genesis.Testnet:\n\t\tsnapshotURL += \"/testnet/\"\n\tcase genesis.Localnet:\n\t\treturn nil, fmt.Errorf(\"unsupported chain type: %s\", chainType)\n\t}\n\n\ttempDir := util.TempDirPath()\n\n\treturn &Importer{\n\t\tsnapshotURL: snapshotURL,\n\t\ttempDir:     tempDir,\n\t\tstoreDir:    storeDir,\n\t}, nil\n}\n\nfunc (i *Importer) GetMetadata(ctx context.Context) ([]Metadata, error) {\n\tcli := http.DefaultClient\n\tmetaURL, err := url.JoinPath(i.snapshotURL, \"metadata.json\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, metaURL, http.NoBody)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresp, err := cli.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\t_ = resp.Body.Close()\n\t}()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, errors.New(resp.Status)\n\t}\n\n\tmetadata := make([]Metadata, 0)\n\n\tdec := json.NewDecoder(resp.Body)\n\n\tif err := dec.Decode(&metadata); err != nil {\n\t\treturn nil, err\n\t}\n\n\tslices.SortStableFunc(metadata, func(a, b Metadata) int {\n\t\treturn b.CreatedAtTime().Compare(a.CreatedAtTime())\n\t})\n\n\treturn metadata, nil\n}\n\nfunc (i *Importer) Download(ctx context.Context, metadata *Metadata,\n\tstateFunc ImporterStateFunc,\n) error {\n\tdlLink, err := url.JoinPath(i.snapshotURL, metadata.Data.Path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfileName := filepath.Base(dlLink)\n\ti.dataFileName = fileName\n\tfilePath := fmt.Sprintf(\"%s/%s\", i.tempDir, fileName)\n\n\tdownload := downloader.New(dlLink, filePath, metadata.Data.Sha,\n\t\tdownloader.WithStatsCallback(stateFunc(fileName)))\n\n\tdownload.Start(ctx)\n\n\treturn nil\n}\n\nfunc (i *Importer) Cleanup() error {\n\treturn os.RemoveAll(i.tempDir)\n}\n\nfunc (i *Importer) ExtractAndStoreFiles() error {\n\tzipPath := filepath.Join(i.tempDir, i.dataFileName)\n\treader, err := zip.OpenReader(zipPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open zip file: %w\", err)\n\t}\n\tdefer func() {\n\t\t_ = reader.Close()\n\t}()\n\n\tfor _, file := range reader.File {\n\t\tif err := i.extractAndWriteFile(file); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (i *Importer) extractAndWriteFile(file *zip.File) error {\n\treader, err := file.Open()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open file in zip archive: %w\", err)\n\t}\n\tdefer func() {\n\t\t_ = reader.Close()\n\t}()\n\n\tfPath, err := util.SanitizeArchivePath(i.tempDir, file.Name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to make archive path: %w\", err)\n\t}\n\n\tif file.FileInfo().IsDir() {\n\t\treturn util.Mkdir(fPath)\n\t}\n\n\tif err := util.Mkdir(filepath.Dir(fPath)); err != nil {\n\t\treturn fmt.Errorf(\"failed to create directory: %w\", err)\n\t}\n\n\toutFile, err := os.Create(fPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create file: %w\", err)\n\t}\n\tdefer func() {\n\t\t_ = outFile.Close()\n\t}()\n\n\t// Use a limited reader to prevent DoS attacks via decompression bomb\n\tlr := &io.LimitedReader{R: reader, N: maxDecompressedSize}\n\twritten, err := io.Copy(outFile, lr)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to copy file contents: %w\", err)\n\t}\n\n\tif written >= maxDecompressedSize {\n\t\treturn fmt.Errorf(\"file exceeds maximum decompressed size limit: %s\", fPath)\n\t}\n\n\treturn nil\n}\n\nfunc (i *Importer) MoveStore() error {\n\treturn util.MoveDirectory(filepath.Join(i.tempDir, \"data\"), i.storeDir)\n}\n"
  },
  {
    "path": "cmd/shell/main.go",
    "content": "package main\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\n\t\"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\t\"github.com/NathanBaulch/protoc-gen-cobra/naming\"\n\t\"github.com/c-bata/go-prompt\"\n\t\"github.com/inancgumus/screen\"\n\t\"github.com/pactus-project/pactus/util/shell\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\tpb \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nconst (\n\tdefaultServerAddr     = \"localhost:50051\"\n\tdefaultResponseFormat = \"prettyjson\"\n)\n\nvar _prefix string\n\n// createRootCommand creates and configures the root command with all subcommands\n// This function contains all the logic from main() but is testable.\nfunc createRootCommand() *cobra.Command {\n\tvar (\n\t\tserverAddr string\n\t\tusername   string\n\t\tpassword   string\n\t)\n\n\trootCmd := &cobra.Command{\n\t\tUse:          \"interactive\",\n\t\tShort:        \"Pactus Shell\",\n\t\tSilenceUsage: true,\n\t\tLong:         \"pactus-shell is a command line tool for interacting with the Pactus blockchain using gRPC\",\n\t}\n\n\tinteractive := shell.New(rootCmd, nil,\n\t\tprompt.OptionSuggestionBGColor(prompt.Black),\n\t\tprompt.OptionSuggestionTextColor(prompt.Green),\n\t\tprompt.OptionDescriptionBGColor(prompt.Black),\n\t\tprompt.OptionDescriptionTextColor(prompt.White),\n\t\tprompt.OptionLivePrefix(livePrefix),\n\t)\n\n\tclient.RegisterFlagBinder(func(fs *pflag.FlagSet, namer naming.Namer) {\n\t\tfs.StringVar(&username, namer(\"auth-username\"), \"\", \"username for gRPC basic authentication\")\n\t\tfs.StringVar(&password, namer(\"auth-password\"), \"\", \"password for gRPC basic authentication\")\n\t})\n\n\tinteractive.Flags().StringVar(&serverAddr, \"server-addr\", defaultServerAddr, \"gRPC server address\")\n\tinteractive.Flags().StringVar(&username, \"auth-username\", \"\",\n\t\t\"username for gRPC basic authentication\")\n\n\tinteractive.Flags().StringVar(&password, \"auth-password\", \"\",\n\t\t\"password for gRPC basic authentication\")\n\n\tinteractive.PreRun = func(_ *cobra.Command, _ []string) {\n\t\tcls()\n\t\tterminal.PrintInfoMsgf(\"Welcome to PactusBlockchain interactive mode\\n\\n- Home: https://pactus.org\\n- \" +\n\t\t\t\"Docs: https://docs.pactus.org\")\n\t\tterminal.PrintLine()\n\t\t_prefix = fmt.Sprintf(\"pactus@%s > \", serverAddr)\n\t}\n\n\tinteractive.PersistentPreRun = func(cmd *cobra.Command, _ []string) {\n\t\tsetAuthContext(cmd, username, password)\n\t}\n\n\trootCmd.PersistentPreRun = func(cmd *cobra.Command, _ []string) {\n\t\tsetAuthContext(cmd, username, password)\n\t}\n\n\tchangeDefaultParameters := func(cobra *cobra.Command) *cobra.Command {\n\t\t_ = cobra.PersistentFlags().Lookup(\"server-addr\").Value.Set(defaultServerAddr)\n\t\tcobra.PersistentFlags().Lookup(\"server-addr\").DefValue = defaultServerAddr\n\t\t_ = cobra.PersistentFlags().Lookup(\"response-format\").Value.Set(defaultResponseFormat)\n\t\tcobra.PersistentFlags().Lookup(\"response-format\").DefValue = defaultResponseFormat\n\n\t\treturn cobra\n\t}\n\n\trootCmd.AddCommand(changeDefaultParameters(pb.BlockchainClientCommand()))\n\trootCmd.AddCommand(changeDefaultParameters(pb.NetworkClientCommand()))\n\trootCmd.AddCommand(changeDefaultParameters(pb.TransactionClientCommand()))\n\trootCmd.AddCommand(changeDefaultParameters(pb.WalletClientCommand()))\n\trootCmd.AddCommand(changeDefaultParameters(pb.UtilsClientCommand()))\n\trootCmd.AddCommand(clearScreen())\n\n\tinteractive.Use = \"interactive\"\n\tinteractive.Short = \"Start pactus-shell in interactive mode\"\n\n\trootCmd.AddCommand(interactive)\n\n\treturn rootCmd\n}\n\nfunc main() {\n\trootCmd := createRootCommand()\n\n\terr := rootCmd.Execute()\n\tif err != nil {\n\t\tterminal.PrintErrorMsgf(err.Error())\n\t}\n}\n\nfunc livePrefix() (string, bool) {\n\treturn _prefix, true\n}\n\nfunc clearScreen() *cobra.Command {\n\treturn &cobra.Command{\n\t\tUse:   \"clear\",\n\t\tShort: \"clear screen\",\n\t\tRun: func(_ *cobra.Command, _ []string) {\n\t\t\tcls()\n\t\t},\n\t}\n}\n\nfunc cls() {\n\tscreen.MoveTopLeft()\n\tscreen.Clear()\n}\n\nfunc setAuthContext(c *cobra.Command, username, password string) {\n\tif username != \"\" && password != \"\" {\n\t\tauth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf(\"%s:%s\", username, password)))\n\t\tmd := metadata.Pairs(\"authorization\", \"Basic \"+auth)\n\t\tctx := metadata.NewOutgoingContext(c.Context(), md)\n\t\tc.SetContext(ctx)\n\t}\n}\n"
  },
  {
    "path": "cmd/shell/main_test.go",
    "content": "package main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCreateRootCommand(t *testing.T) {\n\t// This executes the ENTIRE main() logic including all changed lines\n\trootCmd := createRootCommand()\n\n\t// Verify the root command properties\n\trequire.Equal(t, \"interactive\", rootCmd.Use)\n\trequire.Equal(t, \"Pactus Shell\", rootCmd.Short)\n\trequire.Contains(t, rootCmd.Long, \"pactus-shell is a command line tool\")\n\trequire.True(t, rootCmd.SilenceUsage)\n\n\t// Verify interactive command was added\n\tvar interactiveCmd *cobra.Command\n\tfor _, cmd := range rootCmd.Commands() {\n\t\tif cmd.Use == \"interactive\" {\n\t\t\tinteractiveCmd = cmd\n\n\t\t\tbreak\n\t\t}\n\t}\n\n\trequire.NotNil(t, interactiveCmd, \"interactive command should be added\")\n\trequire.Equal(t, \"interactive\", interactiveCmd.Use)\n\trequire.Equal(t, \"Start pactus-shell in interactive mode\", interactiveCmd.Short)\n\n\t// Verify flags were set up\n\tserverAddrFlag := interactiveCmd.Flags().Lookup(\"server-addr\")\n\trequire.NotNil(t, serverAddrFlag)\n\trequire.Equal(t, defaultServerAddr, serverAddrFlag.DefValue)\n\n\tusernameFlag := interactiveCmd.Flags().Lookup(\"auth-username\")\n\trequire.NotNil(t, usernameFlag)\n\n\tpasswordFlag := interactiveCmd.Flags().Lookup(\"auth-password\")\n\trequire.NotNil(t, passwordFlag)\n\n\t// Verify PreRun and PersistentPreRun are set\n\trequire.NotNil(t, interactiveCmd.PreRun)\n\trequire.NotNil(t, interactiveCmd.PersistentPreRun)\n\n\t// Execute PreRun to hit\n\tinteractiveCmd.PreRun(nil, nil)\n\n\t// Execute PersistentPreRun\n\ttestCmd := &cobra.Command{}\n\ttestCmd.SetContext(t.Context())\n\tinteractiveCmd.PersistentPreRun(testCmd, nil)\n\n\t// Verify other commands were added\n\tvar clearCmd *cobra.Command\n\tfor _, cmd := range rootCmd.Commands() {\n\t\tif cmd.Use == \"clear\" {\n\t\t\tclearCmd = cmd\n\n\t\t\tbreak\n\t\t}\n\t}\n\trequire.NotNil(t, clearCmd)\n\n\trootCmd.SetArgs([]string{\"--help\"})\n\terr := rootCmd.Execute()\n\trequire.NoError(t, err)\n\n\trootCmd.SetArgs([]string{\"interactive\", \"--help\"})\n\terr = rootCmd.Execute()\n\trequire.NoError(t, err)\n\n\t// Test that main function would work\n\trequire.NotNil(t, rootCmd)\n\trequire.Equal(t, \"interactive\", rootCmd.Use)\n}\n\n// TestLivePrefix tests the livePrefix function.\nfunc TestLivePrefix(t *testing.T) {\n\t_prefix = \"test@localhost > \"\n\n\tprefix, ok := livePrefix()\n\trequire.True(t, ok)\n\trequire.Equal(t, \"test@localhost > \", prefix)\n}\n\n// TestClearScreenCommand tests the clearScreen function.\nfunc TestClearScreenCommand(t *testing.T) {\n\tclearCmd := clearScreen()\n\n\trequire.NotNil(t, clearCmd)\n\trequire.Equal(t, \"clear\", clearCmd.Use)\n\trequire.Equal(t, \"clear screen\", clearCmd.Short)\n\trequire.NotNil(t, clearCmd.Run)\n\n\t// Test that the Run function works without error\n\tclearCmd.Run(nil, nil)\n}\n\n// TestSetAuthContext tests the setAuthContext function.\nfunc TestSetAuthContext(t *testing.T) {\n\trootCmd := &cobra.Command{}\n\trootCmd.SetContext(t.Context())\n\n\t// Test with empty credentials (should not modify context)\n\toriginalCtx := rootCmd.Context()\n\tsetAuthContext(rootCmd, \"\", \"\")\n\trequire.Equal(t, originalCtx, rootCmd.Context())\n\n\t// Test with valid credentials (should set auth context)\n\tsetAuthContext(rootCmd, \"testuser\", \"testpass\")\n\trequire.NotNil(t, rootCmd.Context())\n\trequire.NotEqual(t, originalCtx, rootCmd.Context())\n}\n\n// TestConstants tests the defined constants.\nfunc TestConstants(t *testing.T) {\n\trequire.Equal(t, \"localhost:50051\", defaultServerAddr)\n\trequire.Equal(t, \"prettyjson\", defaultResponseFormat)\n}\n\n// TestClsFunction tests the cls function doesn't panic.\nfunc TestClsFunction(t *testing.T) {\n\trequire.NotPanics(t, func() {\n\t\tcls()\n\t}, \"calling cls() should not panic\")\n}\n"
  },
  {
    "path": "cmd/wallet/address.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildAddressCmd builds all sub-commands related to addresses.\nfunc buildAddressCmd(parentCmd *cobra.Command) {\n\taddressCmd := &cobra.Command{\n\t\tUse:   \"address\",\n\t\tShort: \"manage the address book\",\n\t}\n\n\tparentCmd.AddCommand(addressCmd)\n\tbuildAddressAllCmd(addressCmd)\n\tbuildAddressNewCmd(addressCmd)\n\tbuildAddressBalanceCmd(addressCmd)\n\tbuildAddressPrivCmd(addressCmd)\n\tbuildAddressPubCmd(addressCmd)\n\tbuildAddressImportCmd(addressCmd)\n\tbuildAddressLabelCmd(addressCmd)\n}\n\n// buildAddressAllCmd builds a command to list all addresses from the wallet.\nfunc buildAddressAllCmd(parentCmd *cobra.Command) {\n\tallCmd := &cobra.Command{\n\t\tUse:   \"all\",\n\t\tShort: \"displays all stored addresses\",\n\t}\n\tparentCmd.AddCommand(allCmd)\n\n\tbalanceOpt := allCmd.Flags().Bool(\"balance\",\n\t\tfalse, \"displays the account balance for each address\")\n\n\tstakeOpt := allCmd.Flags().Bool(\"stake\",\n\t\tfalse, \"displays the validator stake for each address\")\n\n\tallCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tterminal.PrintLine()\n\t\tfor i, info := range wlt.ListAddresses() {\n\t\t\tline := fmt.Sprintf(\"%v- %s\\t\", i+1, info.Address)\n\n\t\t\tif *balanceOpt {\n\t\t\t\tbalance, _ := wlt.Balance(info.Address)\n\t\t\t\tline += fmt.Sprintf(\"%s\\t\", balance.String())\n\t\t\t}\n\n\t\t\tif *stakeOpt {\n\t\t\t\tstake, _ := wlt.Stake(info.Address)\n\t\t\t\tline += fmt.Sprintf(\"%s\\t\", stake.String())\n\t\t\t}\n\n\t\t\tline += info.Label\n\t\t\tterminal.PrintInfoMsgf(line)\n\t\t}\n\t}\n}\n\n// buildAddressNewCmd builds a command for creating a new wallet address.\nfunc buildAddressNewCmd(parentCmd *cobra.Command) {\n\tnewCmd := &cobra.Command{\n\t\tUse:   \"new\",\n\t\tShort: \"creating a new address\",\n\t}\n\tparentCmd.AddCommand(newCmd)\n\n\taddressType := newCmd.Flags().String(\"type\",\n\t\tcrypto.AddressTypeEd25519Account.String(), \"the type of address: ed25519_account, bls_account and validator\")\n\n\tlabel := newCmd.Flags().String(\"label\", \"\", \"a label for the address\")\n\n\tnewCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tvar addressInfo *types.AddressInfo\n\t\tvar err error\n\n\t\tif *label == \"\" {\n\t\t\tlabelIn := prompt.PromptInput(\"Label\")\n\t\t\tlabel = &labelIn\n\t\t}\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tswitch *addressType {\n\t\tcase crypto.AddressTypeValidator.String():\n\t\t\taddressInfo, err = wlt.NewAddress(crypto.AddressTypeValidator, *label)\n\t\tcase crypto.AddressTypeBLSAccount.String():\n\t\t\taddressInfo, err = wlt.NewAddress(crypto.AddressTypeBLSAccount, *label)\n\t\tcase crypto.AddressTypeEd25519Account.String():\n\t\t\tpassword := \"\"\n\t\t\tif wlt.IsEncrypted() {\n\t\t\t\tpassword = prompt.PromptPassword(\"Password\", false)\n\t\t\t}\n\t\t\taddressInfo, err = wlt.NewAddress(crypto.AddressTypeEd25519Account, *label,\n\t\t\t\twallet.WithPassword(password))\n\t\tdefault:\n\t\t\terr = fmt.Errorf(\"invalid address type '%s'\", *addressType)\n\t\t}\n\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"%s\", addressInfo.Address)\n\t}\n}\n\n// buildAddressBalanceCmd builds a command to display the balance of a given address.\nfunc buildAddressBalanceCmd(parentCmd *cobra.Command) {\n\tbalanceCmd := &cobra.Command{\n\t\tUse:   \"balance [flags] <ADDRESS>\",\n\t\tShort: \"displays the balance of an address\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\tparentCmd.AddCommand(balanceCmd)\n\n\tbalanceCmd.Run = func(_ *cobra.Command, args []string) {\n\t\taddr := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tterminal.PrintLine()\n\n\t\tbalance, _ := wlt.Balance(addr)\n\t\tstake, _ := wlt.Stake(addr)\n\t\tterminal.PrintInfoMsgf(\"balance: %s\\tstake: %s\",\n\t\t\tbalance.String(), stake.String())\n\t}\n}\n\n// buildAddressPrivCmd builds a command to show the private key of a given address.\nfunc buildAddressPrivCmd(parentCmd *cobra.Command) {\n\tprivCmd := &cobra.Command{\n\t\tUse:   \"priv [flags] <ADDRESS>\",\n\t\tShort: \"displays the private key for a specified address\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\n\tparentCmd.AddCommand(privCmd)\n\n\tpassOpt := addPasswordOption(privCmd)\n\n\tprivCmd.Run = func(_ *cobra.Command, args []string) {\n\t\taddr := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tpassword := getPassword(wlt, *passOpt)\n\t\tprv, err := wlt.PrivateKey(password, addr)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintWarnMsgf(\"Private Key: %v\", prv)\n\t}\n}\n\n// buildAddressPubCmd builds a command to show the public key of a given address.\nfunc buildAddressPubCmd(parentCmd *cobra.Command) {\n\tpubCmd := &cobra.Command{\n\t\tUse:   \"pub [flags] <ADDRESS>\",\n\t\tShort: \"displays the public key for a specified address\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\n\tparentCmd.AddCommand(pubCmd)\n\n\tpubCmd.Run = func(_ *cobra.Command, args []string) {\n\t\taddr := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tinfo, err := wlt.AddressInfo(addr)\n\t\tif err != nil {\n\t\t\tterminal.PrintErrorMsgf(err.Error())\n\n\t\t\treturn\n\t\t}\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"Public Key: %v\", info.PublicKey)\n\t\tif info.Path != \"\" {\n\t\t\tterminal.PrintInfoMsgf(\"Path: %v\", info.Path)\n\t\t}\n\t}\n}\n\n// buildAddressImportCmd build a command to import a private key into the wallet.\nfunc buildAddressImportCmd(parentCmd *cobra.Command) {\n\timportCmd := &cobra.Command{\n\t\tUse:   \"import\",\n\t\tShort: \"imports a private key into wallet\",\n\t}\n\tparentCmd.AddCommand(importCmd)\n\n\tpassOpt := addPasswordOption(importCmd)\n\n\timportCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tprvStr := prompt.PromptInput(\"Private Key\")\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tpassword := getPassword(wlt, *passOpt)\n\n\t\tmaybeBLSPrivateKey := func(str string) bool {\n\t\t\t// BLS private keys start with \"SECRET1P...\" or \"TSECRET1P...\".\n\t\t\treturn strings.Contains(strings.ToLower(str), \"secret1p\")\n\t\t}\n\n\t\tmaybeEd25519PrivateKey := func(str string) bool {\n\t\t\t// Ed25519 private keys start with \"SECRET1R...\" or \"TSECRET1R...\".\n\t\t\treturn strings.Contains(strings.ToLower(str), \"secret1r\")\n\t\t}\n\n\t\tswitch {\n\t\tcase maybeBLSPrivateKey(prvStr):\n\t\t\tblsPrv, err := bls.PrivateKeyFromString(prvStr)\n\t\t\tterminal.FatalErrorCheck(err)\n\n\t\t\terr = wlt.ImportBLSPrivateKey(password, blsPrv)\n\t\t\tterminal.FatalErrorCheck(err)\n\n\t\tcase maybeEd25519PrivateKey(prvStr):\n\t\t\ted25519Prv, err := ed25519.PrivateKeyFromString(prvStr)\n\t\t\tterminal.FatalErrorCheck(err)\n\n\t\t\terr = wlt.ImportEd25519PrivateKey(password, ed25519Prv)\n\t\t\tterminal.FatalErrorCheck(err)\n\n\t\tdefault:\n\t\t\t// The private key cannot be decoded as either BLS or Ed25519.\n\t\t\tterminal.PrintErrorMsgf(\"Invalid private key.\")\n\n\t\t\treturn\n\t\t}\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"Private Key imported successfully.\")\n\t}\n}\n\n// buildAddressLabelCmd build a command to set or update the label for an address.\nfunc buildAddressLabelCmd(parentCmd *cobra.Command) {\n\tlabelCmd := &cobra.Command{\n\t\tUse:   \"label [flags] <ADDRESS>\",\n\t\tShort: \"assigns or update a label for a specific address\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\tparentCmd.AddCommand(labelCmd)\n\n\tlabelCmd.Run = func(_ *cobra.Command, args []string) {\n\t\taddr := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\toldLabel := wlt.AddressLabel(addr)\n\t\tnewLabel := prompt.PromptInputWithSuggestion(\"Label\", oldLabel)\n\n\t\terr = wlt.SetAddressLabel(addr, newLabel)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"Label set successfully\")\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/create.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildCreateCmd builds a command to create a new wallet.\nfunc buildCreateCmd(parentCmd *cobra.Command) {\n\tcreateCmd := &cobra.Command{\n\t\tUse:   \"create\",\n\t\tShort: \"create a new wallet\",\n\t}\n\tparentCmd.AddCommand(createCmd)\n\n\ttestnetOpt := createCmd.Flags().Bool(\"testnet\", false,\n\t\t\"create a wallet for the testnet environment\")\n\tentropyOpt := createCmd.Flags().Int(\"entropy\", 128,\n\t\t\"specify the entropy bit length\")\n\n\tcreateCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tpassword := prompt.PromptPassword(\"Password\", true)\n\t\tmnemonic, err := wallet.GenerateMnemonic(*entropyOpt)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tnetwork := genesis.Mainnet\n\t\tif *testnetOpt {\n\t\t\tnetwork = genesis.Testnet\n\t\t}\n\t\twlt, err := wallet.Create(context.Background(), *pathOpt, mnemonic, password, network)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"✅ Wallet successfully created at: %s\", wlt.Path())\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"🌱 Your wallet seed phrase:\")\n\t\tterminal.PrintInfoMsgBoldf(\"   %v\", mnemonic)\n\t\tterminal.PrintLine()\n\t\tterminal.PrintWarnMsgf(\"⚠️  CRITICAL: Write down this seed phrase and store it safely!\")\n\t\tterminal.PrintWarnMsgf(\"   This is the ONLY way to recover your wallet if needed.\")\n\t\tterminal.PrintWarnMsgf(\"   Never share it with anyone or store it electronically.\")\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/fee.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildFeeCmd builds sub-command to set the default fee for the wallet.\nfunc buildFeeCmd(parentCmd *cobra.Command) {\n\tfeeCmd := &cobra.Command{\n\t\tUse:   \"fee [flags] <AMOUNT>\",\n\t\tShort: \"set the default fee for the wallet\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\n\tparentCmd.AddCommand(feeCmd)\n\n\tfeeCmd.Run = func(_ *cobra.Command, args []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tfee, err := amount.FromString(args[0])\n\t\tterminal.FatalErrorCheck(err)\n\n\t\terr = wlt.SetDefaultFee(fee)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintInfoMsgf(\"Default fee is set to %s\", fee.String())\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/info.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildInfoCmd builds all sub-commands related to the wallet information.\nfunc buildInfoCmd(parentCmd *cobra.Command) {\n\tinfoCmd := &cobra.Command{\n\t\tUse:   \"info\",\n\t\tShort: \"retrieving the wallet information\",\n\t}\n\n\tparentCmd.AddCommand(infoCmd)\n\n\tinfoCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tinfo := wlt.Info()\n\n\t\tterminal.PrintInfoMsgf(\"Version: %d\", info.Version)\n\t\tterminal.PrintInfoMsgf(\"UUID: %s\", info.UUID)\n\t\tterminal.PrintInfoMsgf(\"Driver: %s\", info.Driver)\n\t\tterminal.PrintInfoMsgf(\"Created At: %s\", info.CreatedAt.Format(time.RFC1123))\n\t\tterminal.PrintInfoMsgf(\"Default Fee: %s\", info.DefaultFee.String())\n\t\tterminal.PrintInfoMsgf(\"Encrypted: %t\", info.Encrypted)\n\t\tterminal.PrintInfoMsgf(\"Neutered: %t\", info.Neutered)\n\t\tterminal.PrintInfoMsgf(\"Network: %s\", info.Network)\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/main.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/provider/offline\"\n\t\"github.com/pactus-project/pactus/wallet/provider/remote\"\n\t\"github.com/spf13/cobra\"\n)\n\nvar (\n\tpathOpt        *string\n\tofflineOpt     *bool\n\tserverAddrsOpt *[]string\n\ttimeoutOpt     *int\n)\n\nfunc addPasswordOption(c *cobra.Command) *string {\n\treturn c.Flags().StringP(\"password\", \"p\",\n\t\t\"\", \"the wallet password\")\n}\n\nfunc openWallet(ctx context.Context) (*wallet.Wallet, error) {\n\twlt, err := wallet.Open(ctx, *pathOpt, wallet.WithLockMode(false))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = setProvider(ctx, wlt)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn wlt, err\n}\n\nfunc setProvider(ctx context.Context, wlt *wallet.Wallet) error {\n\tif *offlineOpt {\n\t\twlt.SetProvider(offline.NewOfflineBlockchainProvider())\n\n\t\treturn nil\n\t}\n\n\tvar opts []remote.RemoteProviderOption\n\tif *serverAddrsOpt != nil {\n\t\topts = append(opts, remote.WithCustomServers(*serverAddrsOpt))\n\t}\n\n\tif *timeoutOpt > 0 {\n\t\topts = append(opts, remote.WithTimeout(time.Duration(*timeoutOpt)*time.Second))\n\t}\n\n\tprovider, err := remote.NewRemoteBlockchainProvider(ctx, wlt.Info().Network, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\twlt.SetProvider(provider)\n\n\treturn nil\n}\n\nfunc main() {\n\trootCmd := &cobra.Command{\n\t\tUse:               \"pactus-wallet\",\n\t\tShort:             \"Pactus wallet\",\n\t\tCompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true},\n\t}\n\n\t// Hide the \"help\" sub-command\n\trootCmd.SetHelpCommand(&cobra.Command{Hidden: true})\n\n\tpathOpt = rootCmd.PersistentFlags().String(\"path\",\n\t\tcmd.PactusDefaultWalletPath(cmd.PactusDefaultHomeDir()), \"the path to the wallet file\")\n\tofflineOpt = rootCmd.PersistentFlags().Bool(\"offline\", false, \"offline mode\")\n\tserverAddrsOpt = rootCmd.PersistentFlags().StringSlice(\"servers\", nil, \"servers gRPC address\")\n\ttimeoutOpt = rootCmd.PersistentFlags().Int(\"timeout\", 1,\n\t\t\"specifies the timeout duration for the connection in seconds\")\n\n\tbuildCreateCmd(rootCmd)\n\tbuildRecoverCmd(rootCmd)\n\tbuildGetSeedCmd(rootCmd)\n\tbuildFeeCmd(rootCmd)\n\tbuildPasswordCmd(rootCmd)\n\tbuildSendCmd(rootCmd)\n\tbuildAddressCmd(rootCmd)\n\tbuildTransactionCmd(rootCmd)\n\tbuildInfoCmd(rootCmd)\n\tbuildNeuterCmd(rootCmd)\n\n\terr := rootCmd.Execute()\n\tif err != nil {\n\t\tterminal.PrintErrorMsgf(err.Error())\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/neuter.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/ipfs/boxo/util\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc buildNeuterCmd(parentCmd *cobra.Command) {\n\tneuterCmd := &cobra.Command{\n\t\tUse:   \"neuter\",\n\t\tShort: \"convert full wallet to neutered wallet and can only be used to retrieve balances or stakes\",\n\t}\n\tparentCmd.AddCommand(neuterCmd)\n\n\tneuterCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tpath := wlt.Path() + \".neutered\"\n\n\t\tif util.FileExists(path) {\n\t\t\tterminal.FatalErrorCheck(fmt.Errorf(\"neutered wallet already exists, at %s\", path))\n\t\t}\n\n\t\terr = wlt.Neuter(path)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintSuccessMsgf(\"neutered wallet created at %s\", path)\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/password.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildPasswordCmd builds a command to update the wallet's password.\nfunc buildPasswordCmd(parentCmd *cobra.Command) {\n\tpasswordCmd := &cobra.Command{\n\t\tUse:   \"password\",\n\t\tShort: \"changes the wallet's password\",\n\t}\n\tparentCmd.AddCommand(passwordCmd)\n\tpassOpt := addPasswordOption(passwordCmd)\n\n\tpasswordCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\toldPassword := getPassword(wlt, *passOpt)\n\t\tnewPassword := prompt.PromptPassword(\"New Password\", true)\n\n\t\terr = wlt.UpdatePassword(oldPassword, newPassword)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintWarnMsgf(\"Your wallet password successfully updated.\")\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/recover.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildRecoverCmd builds a command to recover a wallet using a mnemonic (seed phrase).\nfunc buildRecoverCmd(parentCmd *cobra.Command) {\n\trecoverCmd := &cobra.Command{\n\t\tUse:   \"recover\",\n\t\tShort: \"recover wallet from the seed phrase or mnemonic\",\n\t}\n\tparentCmd.AddCommand(recoverCmd)\n\n\tpassOpt := addPasswordOption(recoverCmd)\n\ttestnetOpt := recoverCmd.Flags().Bool(\"testnet\", false,\n\t\t\"recover the wallet for the testnet environment\")\n\tseedOpt := recoverCmd.Flags().StringP(\"seed\", \"s\", \"\", \"mnemonic or seed phrase used for wallet recovery\")\n\n\trecoverCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tmnemonic := *seedOpt\n\t\tif mnemonic == \"\" {\n\t\t\tmnemonic = prompt.PromptInput(\"Seed\")\n\t\t}\n\t\tchainType := genesis.Mainnet\n\t\tif *testnetOpt {\n\t\t\tchainType = genesis.Testnet\n\t\t}\n\t\tctx := context.Background()\n\n\t\twlt, err := wallet.Create(ctx, *pathOpt, mnemonic, *passOpt, chainType)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\terr = setProvider(ctx, wlt)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tcmd.RecoverWalletAddresses(wlt, *passOpt)\n\n\t\t// Always save the wallet before exiting\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"💾 Saving wallet...\")\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"✅ Wallet successfully recovered and saved at: %s\", wlt.Path())\n\t}\n}\n\n// buildGetSeedCmd builds a command to display the wallet's mnemonic (seed phrase).\nfunc buildGetSeedCmd(parentCmd *cobra.Command) {\n\tgetSeedCmd := &cobra.Command{\n\t\tUse:   \"seed\",\n\t\tShort: \"displays the seed phrase that can be used to recover this wallet\",\n\t}\n\tparentCmd.AddCommand(getSeedCmd)\n\n\tpassOpt := addPasswordOption(getSeedCmd)\n\n\tgetSeedCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tpassword := getPassword(wlt, *passOpt)\n\t\tmnemonic, err := wlt.Mnemonic(password)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"🌱 Your wallet seed phrase:\")\n\t\tterminal.PrintInfoMsgBoldf(\"   %v\", mnemonic)\n\t\tterminal.PrintLine()\n\t\tterminal.PrintWarnMsgf(\"⚠️  CRITICAL: Write down this seed phrase and store it safely!\")\n\t\tterminal.PrintWarnMsgf(\"   This is the ONLY way to recover your wallet if needed.\")\n\t\tterminal.PrintWarnMsgf(\"   Never share it with anyone or store it electronically.\")\n\t}\n}\n"
  },
  {
    "path": "cmd/wallet/send.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/prompt\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildSendCmd builds all sub-commands related to the transactions.\nfunc buildSendCmd(parentCmd *cobra.Command) {\n\ttxCmd := &cobra.Command{\n\t\tUse:   \"send\",\n\t\tShort: \"create, sign and send a transaction\",\n\t}\n\n\tparentCmd.AddCommand(txCmd)\n\tbuildSendTransferCmd(txCmd)\n\tbuildSendBondCmd(txCmd)\n\tbuildSendUnbondCmd(txCmd)\n\tbuildSendWithdrawCmd(txCmd)\n}\n\n// buildSendTransferCmd builds a command for create, sign and publish a `Transfer` transaction.\nfunc buildSendTransferCmd(parentCmd *cobra.Command) {\n\ttransferCmd := &cobra.Command{\n\t\tUse:   \"transfer [flags] <FROM> <TO> <AMOUNT>\",\n\t\tShort: \"create, sign and publish a `Transfer` transaction\",\n\t\tArgs:  cobra.ExactArgs(3),\n\t}\n\tparentCmd.AddCommand(transferCmd)\n\n\tlockTimeOpt, feeOpt, memoOpt, noConfirmOpt := addCommonTxOptions(transferCmd)\n\tpassOpt := addPasswordOption(transferCmd)\n\n\ttransferCmd.Run = func(_ *cobra.Command, args []string) {\n\t\tsender := args[0]\n\t\treceiver := args[1]\n\t\tamt, err := amount.FromString(args[2])\n\t\tterminal.FatalErrorCheck(err)\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\topts := []wallet.TxOption{\n\t\t\twallet.OptionFee(*feeOpt),\n\t\t\twallet.OptionLockTime(types.Height(*lockTimeOpt)),\n\t\t\twallet.OptionMemo(*memoOpt),\n\t\t}\n\n\t\ttrx, err := wlt.MakeTransferTx(sender, receiver, amt, opts...)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"📝 Transaction Details:\")\n\t\tterminal.PrintInfoMsgf(\"   Type   : Transfer\")\n\t\tterminal.PrintInfoMsgf(\"   From   : %s\", sender)\n\t\tterminal.PrintInfoMsgf(\"   To     : %s\", receiver)\n\t\tterminal.PrintInfoMsgf(\"   Amount : %s\", amt)\n\t\tterminal.PrintInfoMsgf(\"   Fee    : %s\", trx.Fee())\n\t\tterminal.PrintInfoMsgf(\"   Memo   : %s\", trx.Memo())\n\n\t\tsignAndPublishTx(wlt, trx, *noConfirmOpt, *passOpt)\n\t}\n}\n\n// buildSendBondCmd builds a command for create, sign and publish a `Bond` transaction.\nfunc buildSendBondCmd(parentCmd *cobra.Command) {\n\tbondCmd := &cobra.Command{\n\t\tUse:   \"bond [flags] <ACCOUNT> <VALIDATOR> <STAKE>\",\n\t\tShort: \"create, sign and publish a `Bond` transaction\",\n\t\tArgs:  cobra.ExactArgs(3),\n\t}\n\tparentCmd.AddCommand(bondCmd)\n\n\tpubKeyOpt := bondCmd.Flags().String(\"pub\", \"\", \"validator's public key\")\n\tdelegateOwnerOpt := bondCmd.Flags().String(\"delegate-owner\", \"\",\n\t\t\"delegation stake owner account address\")\n\tdelegateShareOpt := bondCmd.Flags().String(\"delegate-share\", \"\",\n\t\t\"delegation owner share in PAC (0 to 0.7)\")\n\tdelegateExpiryOpt := bondCmd.Flags().Uint32(\"delegate-expiry\", 0,\n\t\t\"delegation expiry block height\")\n\tlockTime, feeOpt, memoOpt, noConfirmOpt := addCommonTxOptions(bondCmd)\n\tpassOpt := addPasswordOption(bondCmd)\n\n\tbondCmd.Run = func(_ *cobra.Command, args []string) {\n\t\tsender := args[0]\n\t\treceiver := args[1]\n\t\tamt, err := amount.FromString(args[2])\n\t\tterminal.FatalErrorCheck(err)\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\topts := []wallet.TxOption{\n\t\t\twallet.OptionFee(*feeOpt),\n\t\t\twallet.OptionLockTime(types.Height(*lockTime)),\n\t\t\twallet.OptionMemo(*memoOpt),\n\t\t\twallet.OptionDelegateOwner(*delegateOwnerOpt),\n\t\t\twallet.OptionDelegateShare(*delegateShareOpt),\n\t\t\twallet.OptionDelegateExpiry(types.Height(*delegateExpiryOpt)),\n\t\t}\n\n\t\ttrx, err := wlt.MakeBondTx(sender, receiver, *pubKeyOpt, amt, opts...)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"📝 Transaction Details:\")\n\t\tterminal.PrintInfoMsgf(\"   Type     : Bond\")\n\t\tterminal.PrintInfoMsgf(\"   Account  : %s\", sender)\n\t\tterminal.PrintInfoMsgf(\"   Validator: %s\", receiver)\n\t\tterminal.PrintInfoMsgf(\"   Stake    : %s\", amt)\n\t\tterminal.PrintInfoMsgf(\"   Fee      : %s\", trx.Fee())\n\t\tterminal.PrintInfoMsgf(\"   Memo     : %s\", trx.Memo())\n\n\t\tsignAndPublishTx(wlt, trx, *noConfirmOpt, *passOpt)\n\t}\n}\n\n// buildSendUnbondCmd builds a command for create, sign and publish a `Unbond` transaction.\nfunc buildSendUnbondCmd(parentCmd *cobra.Command) {\n\tunbondCmd := &cobra.Command{\n\t\tUse:   \"unbond [flags] <ADDRESS>\",\n\t\tShort: \"create, sign and publish an `Unbond` transaction\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\tparentCmd.AddCommand(unbondCmd)\n\n\tlockTime, feeOpt, memoOpt, noConfirmOpt := addCommonTxOptions(unbondCmd)\n\tdelegateOwnerOpt := unbondCmd.Flags().String(\"delegate-owner\", \"\",\n\t\t\"delegation stake owner account address\")\n\tpassOpt := addPasswordOption(unbondCmd)\n\n\tunbondCmd.Run = func(_ *cobra.Command, args []string) {\n\t\tfrom := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\topts := []wallet.TxOption{\n\t\t\twallet.OptionFee(*feeOpt),\n\t\t\twallet.OptionLockTime(types.Height(*lockTime)),\n\t\t\twallet.OptionMemo(*memoOpt),\n\t\t\twallet.OptionDelegateOwner(*delegateOwnerOpt),\n\t\t}\n\n\t\ttrx, err := wlt.MakeUnbondTx(from, opts...)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"📝 Transaction Details:\")\n\t\tterminal.PrintInfoMsgf(\"   Type     : Unbond\")\n\t\tterminal.PrintInfoMsgf(\"   Validator: %s\", from)\n\t\tterminal.PrintInfoMsgf(\"   Fee      : %s\", trx.Fee())\n\t\tterminal.PrintInfoMsgf(\"   Memo     : %s\", trx.Memo())\n\n\t\tsignAndPublishTx(wlt, trx, *noConfirmOpt, *passOpt)\n\t}\n}\n\n// buildSendWithdrawCmd builds a command for create, sign and publish a `Withdraw` transaction.\nfunc buildSendWithdrawCmd(parentCmd *cobra.Command) {\n\twithdrawCmd := &cobra.Command{\n\t\tUse:   \"withdraw [flags] <VALIDATOR> <ACCOUNT> <STAKE>\",\n\t\tShort: \"create, sign and publish a `Withdraw` transaction\",\n\t\tArgs:  cobra.ExactArgs(3),\n\t}\n\tparentCmd.AddCommand(withdrawCmd)\n\n\tlockTime, feeOpt, memoOpt, noConfirmOpt := addCommonTxOptions(withdrawCmd)\n\tpassOpt := addPasswordOption(withdrawCmd)\n\n\twithdrawCmd.Run = func(_ *cobra.Command, args []string) {\n\t\tsender := args[0]\n\t\treceiver := args[1]\n\t\tamt, err := amount.FromString(args[2])\n\t\tterminal.FatalErrorCheck(err)\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\topts := []wallet.TxOption{\n\t\t\twallet.OptionFee(*feeOpt),\n\t\t\twallet.OptionLockTime(types.Height(*lockTime)),\n\t\t\twallet.OptionMemo(*memoOpt),\n\t\t}\n\n\t\ttrx, err := wlt.MakeWithdrawTx(sender, receiver, amt, opts...)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintInfoMsgf(\"📝 Transaction Details:\")\n\t\tterminal.PrintInfoMsgf(\"   Type     : Withdraw\")\n\t\tterminal.PrintInfoMsgf(\"   Validator: %s\", sender)\n\t\tterminal.PrintInfoMsgf(\"   Account  : %s\", receiver)\n\t\tterminal.PrintInfoMsgf(\"   Amount   : %s\", amt)\n\t\tterminal.PrintInfoMsgf(\"   Fee      : %s\", trx.Fee())\n\t\tterminal.PrintInfoMsgf(\"   Memo     : %s\", trx.Memo())\n\n\t\tsignAndPublishTx(wlt, trx, *noConfirmOpt, *passOpt)\n\t}\n}\n\nfunc addCommonTxOptions(cobra *cobra.Command) (lockTimeOpt *int, feeOpt, memoOpt *string, noConfirmOpt *bool) {\n\tlockTimeOpt = cobra.Flags().Int(\"lock-time\", 0,\n\t\t\"transaction lock-time, if not specified will be the latest height\")\n\n\tfeeOpt = cobra.Flags().String(\"fee\", \"\",\n\t\t\"transaction fee in PAC, if not specified will set to the estimated value\")\n\n\tmemoOpt = cobra.Flags().String(\"memo\", \"\",\n\t\t\"transaction memo, maximum should be 64 character\")\n\n\tnoConfirmOpt = cobra.Flags().Bool(\"no-confirm\", false,\n\t\t\"no confirmation question\")\n\n\treturn lockTimeOpt, feeOpt, memoOpt, noConfirmOpt\n}\n\nfunc signAndPublishTx(wlt *wallet.Wallet, trx *tx.Tx, noConfirm bool, pass string) {\n\tterminal.PrintLine()\n\tpassword := getPassword(wlt, pass)\n\terr := wlt.SignTransaction(password, trx)\n\tterminal.FatalErrorCheck(err)\n\n\tbs, _ := trx.Bytes()\n\tterminal.PrintLine()\n\tterminal.PrintSuccessMsgf(\"✅ Transaction signed successfully\")\n\tterminal.PrintInfoMsgf(\"   Signed transaction data: %x\", bs)\n\tterminal.PrintLine()\n\n\tif !*offlineOpt {\n\t\tif !noConfirm {\n\t\t\tterminal.PrintWarnMsgf(\"⚠️  You are going to broadcast the signed transaction\")\n\t\t\tterminal.PrintWarnMsgf(\"   This action cannot be undone\")\n\t\t\tterminal.PrintLine()\n\t\t\tconfirmed := prompt.PromptConfirm(\"Do you want to continue\")\n\t\t\tif !confirmed {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tres, err := wlt.BroadcastTransaction(trx)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintLine()\n\t\tterminal.PrintSuccessMsgf(\"✅ Transaction broadcast successfully!\")\n\t\tterminal.PrintInfoMsgf(\"   Transaction ID: %s\", res)\n\t}\n}\n\nfunc getPassword(wlt *wallet.Wallet, passOpt string) string {\n\tpassword := passOpt\n\tif wlt.IsEncrypted() && password == \"\" {\n\t\tpassword = prompt.PromptPassword(\"Wallet password\", false)\n\t}\n\n\treturn password\n}\n"
  },
  {
    "path": "cmd/wallet/transaction.go",
    "content": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/cmd\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util/terminal\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/spf13/cobra\"\n)\n\n// buildTransactionCmd builds all sub-commands related to the wallet transactions.\nfunc buildTransactionCmd(parentCmd *cobra.Command) {\n\ttransactionCmd := &cobra.Command{\n\t\tUse:   \"transaction\",\n\t\tShort: \"Manage and view wallet transactions\",\n\t\tLong:  \"The 'transactions' command allows you to list existing transactions with optional filtering\",\n\t}\n\n\tparentCmd.AddCommand(transactionCmd)\n\tbuildTransactionAddCmd(transactionCmd)\n\tbuildTransactionListCmd(transactionCmd)\n}\n\n// buildTransactionsAddCmd builds the command for adding a transaction to the wallet.\nfunc buildTransactionAddCmd(parentCmd *cobra.Command) {\n\taddCmd := &cobra.Command{\n\t\tUse:   \"add [flags] <ID>\",\n\t\tShort: \"Add a transaction to the wallet\",\n\t\tLong:  \"Add a specific transaction to the wallet using its transaction ID\",\n\t\tArgs:  cobra.ExactArgs(1),\n\t}\n\tparentCmd.AddCommand(addCmd)\n\n\taddCmd.Run = func(_ *cobra.Command, args []string) {\n\t\ttxID := args[0]\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\tid, err := hash.FromString(txID)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\terr = wlt.AddTransactionByID(id)\n\t\tterminal.FatalErrorCheck(err)\n\n\t\tterminal.PrintInfoMsgf(\"Transaction successfully added to the wallet.\")\n\t}\n}\n\n// buildTransactionListCmd builds the command for listing wallet transactions.\nfunc buildTransactionListCmd(parentCmd *cobra.Command) {\n\tlistCmd := &cobra.Command{\n\t\tUse:   \"list [flags]\",\n\t\tShort: \"List transactions in the wallet\",\n\t\tLong: `List transactions stored in the wallet.\n\nExamples:\n  # List last 10 transactions (default)\n  transaction list\n\n  # List last 20 outgoing transactions\n  transaction list --direction outgoing --count 20\n\n  # List transactions for a specific address\n  transaction list --address pc1xyz...`,\n\t}\n\tparentCmd.AddCommand(listCmd)\n\n\tdirectionOpt := listCmd.Flags().String(\"direction\", \"any\",\n\t\t\"Filter transactions by direction: 'any', 'incoming', or 'outgoing'. Default is 'any'.\")\n\taddressOpt := listCmd.Flags().String(\"address\", \"*\",\n\t\t\"Filter transactions by wallet address. Use '*' to include all addresses.\")\n\tcountOpt := listCmd.Flags().Int(\"count\", 10,\n\t\t\"Maximum number of transactions to display. Default is 10.\")\n\tskipOpt := listCmd.Flags().Int(\"skip\", 0,\n\t\t\"Number of transactions to skip for pagination. Default is 0.\")\n\n\tlistCmd.Run = func(_ *cobra.Command, _ []string) {\n\t\tvar direction types.TxDirection\n\t\tswitch *directionOpt {\n\t\tcase \"any\":\n\t\t\tdirection = types.TxDirectionAny\n\t\tcase \"incoming\":\n\t\t\tdirection = types.TxDirectionIncoming\n\t\tcase \"outgoing\":\n\t\t\tdirection = types.TxDirectionOutgoing\n\t\tdefault:\n\t\t\tterminal.PrintErrorMsgf(\"invalid direction: %s\", *directionOpt)\n\n\t\t\treturn\n\t\t}\n\n\t\topts := []wallet.ListTransactionsOption{\n\t\t\twallet.WithAddress(*addressOpt),\n\t\t\twallet.WithDirection(direction),\n\t\t\twallet.WithCount(*countOpt),\n\t\t\twallet.WithSkip(*skipOpt),\n\t\t}\n\n\t\twlt, err := openWallet(context.Background())\n\t\tterminal.FatalErrorCheck(err)\n\t\tdefer wlt.Close()\n\n\t\ttransactions := wlt.ListTransactions(opts...)\n\t\tconst (\n\t\t\tnoWidth      = 4\n\t\t\ttimeWidth    = 16\n\t\t\tidWidth      = 65\n\t\t\taddressWidth = 16\n\t\t\tamountWidth  = 12\n\t\t\ttypeWidth    = 10\n\t\t\tstatusWidth  = 10\n\t\t)\n\n\t\theaderFmt := fmt.Sprintf(\"%%-%dv %%-%dv %%-%dv %%-%dv %%-%dv %%-%dv %%-%dv %%-%dv\",\n\t\t\tnoWidth, timeWidth, idWidth, addressWidth, addressWidth, amountWidth, typeWidth, statusWidth)\n\t\trowFmt := headerFmt\n\n\t\tterminal.PrintInfoMsgBoldf(headerFmt,\n\t\t\t\"No\", \"Time\", \"ID\", \"Sender\", \"Receiver\", \"Amount\", \"Type\", \"Status\")\n\n\t\tfit := func(text string, width int) string {\n\t\t\tif len(text) > width {\n\t\t\t\tif width <= 3 {\n\t\t\t\t\treturn text[:width]\n\t\t\t\t}\n\n\t\t\t\treturn fmt.Sprintf(\"%-*s\", width, text[:width-3]+\"...\")\n\t\t\t}\n\n\t\t\treturn fmt.Sprintf(\"%-*s\", width, text)\n\t\t}\n\n\t\tfor i, trx := range transactions {\n\t\t\tterminal.PrintInfoMsgf(rowFmt,\n\t\t\t\ti+1,\n\t\t\t\ttrx.CreatedAt.Format(\"2/1/2006 15:04\"),\n\t\t\t\tfit(trx.TxID, idWidth),\n\t\t\t\tfit(cmd.ShortAddress(trx.Sender), addressWidth),\n\t\t\t\tfit(cmd.ShortAddress(trx.Receiver), addressWidth),\n\t\t\t\tfit(trx.Amount.String(), amountWidth),\n\t\t\t\tfit(trx.PayloadType.String(), typeWidth),\n\t\t\t\tfit(trx.Status.String(), statusWidth),\n\t\t\t)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "committee/committee.go",
    "content": "package committee\n\nimport (\n\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/linkedlist\"\n)\n\nvar _ Committee = &committee{}\n\ntype committee struct {\n\tcommitteeSize int\n\tvalidatorList *linkedlist.LinkedList[*validator.Validator]\n\tproposerPos   *linkedlist.Element[*validator.Validator]\n}\n\nfunc NewCommittee(validators []*validator.Validator, committeeSize int,\n\tproposerAddress crypto.Address,\n) (Committee, error) {\n\tvalidatorList := linkedlist.New[*validator.Validator]()\n\tvar proposerPos *linkedlist.Element[*validator.Validator]\n\n\tfor _, val := range validators {\n\t\tel := validatorList.InsertAtTail(val.Clone())\n\t\tif val.Address() == proposerAddress {\n\t\t\tproposerPos = el\n\t\t}\n\t}\n\n\tif proposerPos == nil {\n\t\treturn nil, errors.New(\"Proposer is not in the list\")\n\t}\n\n\treturn &committee{\n\t\tcommitteeSize: committeeSize,\n\t\tvalidatorList: validatorList,\n\t\tproposerPos:   proposerPos,\n\t}, nil\n}\n\nfunc (c *committee) TotalPower() int64 {\n\tpower := int64(0)\n\tc.iterate(func(v *validator.Validator) bool {\n\t\tpower += v.Power()\n\n\t\treturn false\n\t})\n\n\treturn power\n}\n\nfunc (c *committee) Update(lastRound types.Round, joined []*validator.Validator) {\n\tslices.SortStableFunc(joined, func(a, b *validator.Validator) int {\n\t\treturn cmp.Compare(a.Number(), b.Number())\n\t})\n\n\t// First update the validator list\n\tfor _, val := range joined {\n\t\tcommitteeVal := c.find(val.Address())\n\t\tif committeeVal == nil {\n\t\t\tc.validatorList.InsertBefore(val.Clone(), c.proposerPos)\n\t\t} else {\n\t\t\tcommitteeVal.UpdateLastSortitionHeight(val.LastSortitionHeight())\n\t\t\tcommitteeVal.UpdateProtocolVersion(val.ProtocolVersion())\n\n\t\t\t// Ensure that a validator's stake and bonding properties\n\t\t\t// remain unchanged while they are part of the committee.\n\t\t\t// Refer to the Bond executor for additional details.\n\t\t\tif committeeVal.Stake() != val.Stake() ||\n\t\t\t\tcommitteeVal.LastBondingHeight() != val.LastBondingHeight() ||\n\t\t\t\tcommitteeVal.UnbondingHeight() != val.UnbondingHeight() {\n\t\t\t\tpanic(\"validators within the committee must be consistent\")\n\t\t\t}\n\t\t}\n\t}\n\n\t// Now, adjust the list\n\toldestFirst := make([]*linkedlist.Element[*validator.Validator], c.validatorList.Length())\n\ti := 0\n\tfor e := c.validatorList.Head; e != nil; e = e.Next {\n\t\toldestFirst[i] = e\n\t\ti++\n\t}\n\n\tslices.SortStableFunc(oldestFirst, func(a, b *linkedlist.Element[*validator.Validator]) int {\n\t\treturn cmp.Compare(a.Data.LastSortitionHeight(), b.Data.LastSortitionHeight())\n\t})\n\n\tfor j := 0; j <= int(lastRound); j++ {\n\t\tc.proposerPos = c.proposerPos.Next\n\t\tif c.proposerPos == nil {\n\t\t\tc.proposerPos = c.validatorList.Head\n\t\t}\n\t}\n\n\tadjust := c.validatorList.Length() - c.committeeSize\n\tfor j := 0; j < adjust; j++ {\n\t\tif oldestFirst[j] == c.proposerPos {\n\t\t\tc.proposerPos = c.proposerPos.Next\n\t\t\tif c.proposerPos == nil {\n\t\t\t\tc.proposerPos = c.validatorList.Head\n\t\t\t}\n\t\t}\n\t\tc.validatorList.Delete(oldestFirst[j])\n\t}\n}\n\n// Validators retrieves a list of all validators in the committee.\n// A cloned instance of each validator is returned to avoid modification of the original objects.\nfunc (c *committee) Validators() []*validator.Validator {\n\tvals := make([]*validator.Validator, c.validatorList.Length())\n\ti := 0\n\tc.iterate(func(v *validator.Validator) bool {\n\t\tvals[i] = v.Clone()\n\t\ti++\n\n\t\treturn false\n\t})\n\n\treturn vals\n}\n\nfunc (c *committee) Contains(addr crypto.Address) bool {\n\treturn c.find(addr) != nil\n}\n\nfunc (c *committee) find(addr crypto.Address) *validator.Validator {\n\tvar found *validator.Validator\n\tc.iterate(func(v *validator.Validator) bool {\n\t\tif v.Address() == addr {\n\t\t\tfound = v\n\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t})\n\n\treturn found\n}\n\n// IsProposer checks if the given address is the proposer for the specified round.\nfunc (c *committee) IsProposer(addr crypto.Address, round types.Round) bool {\n\tp := c.proposer(round)\n\n\treturn p.Address() == addr\n}\n\n// Proposer returns an instance of the proposer validator for the specified round.\n// A cloned instance of the proposer is returned to avoid modification of the original object.\nfunc (c *committee) Proposer(round types.Round) *validator.Validator {\n\treturn c.proposer(round).Clone()\n}\n\nfunc (c *committee) proposer(round types.Round) *validator.Validator {\n\tpos := c.proposerPos\n\tfor i := 0; i < int(round); i++ {\n\t\tpos = pos.Next\n\t\tif pos == nil {\n\t\t\tpos = c.validatorList.Head\n\t\t}\n\t}\n\n\treturn pos.Data\n}\n\nfunc (c *committee) Committers() []int32 {\n\tcommitters := make([]int32, c.validatorList.Length())\n\ti := 0\n\tc.iterate(func(v *validator.Validator) bool {\n\t\tcommitters[i] = v.Number()\n\t\ti++\n\n\t\treturn false\n\t})\n\n\treturn committers\n}\n\nfunc (c *committee) Size() int {\n\treturn c.validatorList.Length()\n}\n\nfunc (c *committee) String() string {\n\tvar builder strings.Builder\n\n\tbuilder.WriteString(\"[ \")\n\tfor _, v := range c.Validators() {\n\t\tfmt.Fprintf(&builder, \"%v(%v)\", v.Number(), v.LastSortitionHeight())\n\t\tif c.IsProposer(v.Address(), 0) {\n\t\t\tbuilder.WriteString(\"*\")\n\t\t}\n\t\tbuilder.WriteString(\" \")\n\t}\n\tbuilder.WriteString(\"]\")\n\n\tstr := builder.String()\n\n\treturn str\n}\n\n// iterate uses for easy iteration over validators in list.\nfunc (c *committee) iterate(consumer func(*validator.Validator) (stop bool)) {\n\tfor e := c.validatorList.Head; e != nil; e = e.Next {\n\t\tif consumer(e.Data) {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// ProtocolVersions returns a map of protocol version to the percentage of validators\n// in the committee that have that version.\nfunc (c *committee) ProtocolVersions() map[protocol.Version]float64 {\n\tpowers := make(map[protocol.Version]int64)\n\ttotal := int64(0)\n\n\tc.iterate(func(v *validator.Validator) bool {\n\t\tversion := v.ProtocolVersion()\n\t\tpowers[version] += v.Power()\n\t\ttotal += v.Power()\n\n\t\treturn false\n\t})\n\n\tpercentages := make(map[protocol.Version]float64)\n\tfor version, count := range powers {\n\t\tpercentages[version] = (float64(count) / float64(total)) * 100\n\t}\n\n\treturn percentages\n}\n\n// SupportProtocolVersion checks if more than 70% of committee members\n// support the given protocol version.\nfunc (c *committee) SupportProtocolVersion(version protocol.Version) bool {\n\tversions := c.ProtocolVersions()\n\tsupported := float64(0)\n\n\tfor ver, percent := range versions {\n\t\tif ver >= version {\n\t\t\tsupported += percent\n\t\t}\n\t}\n\n\treturn supported > 70.0\n}\n"
  },
  {
    "path": "committee/committee_test.go",
    "content": "package committee_test\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestContains(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, valKeys := ts.GenerateTestCommittee(21)\n\tnonExist := ts.RandAccAddress()\n\n\tassert.True(t, cmt.Contains(valKeys[0].Address()))\n\tassert.False(t, cmt.Contains(nonExist))\n}\n\nfunc TestProposer(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\n\tassert.Equal(t, int32(0), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(3), cmt.Proposer(3).Number())\n\tassert.Equal(t, int32(0), cmt.Proposer(4).Number())\n\n\tcmt.Update(0, nil)\n\tassert.Equal(t, int32(1), cmt.Proposer(0).Number())\n}\n\nfunc TestInvalidProposerJoinAndLeave(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(0))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(4))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 4, val5.Address())\n\trequire.Error(t, err)\n\tassert.Nil(t, cmt)\n}\n\nfunc TestProposerMove(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(4))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(5))\n\tval6 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(6))\n\tval7 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(7))\n\n\tcmt, err := committee.NewCommittee(\n\t\t[]*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, 7, val1.Address())\n\trequire.NoError(t, err)\n\n\t//\n\t// +*+-+-+-+-+-+-+    +-+*+-+-+-+-+-+    +-+-+-+-+-+*+-+    +*+-+-+-+-+-+-+\n\t// |1|2|3|4|5|6|7| => |1|2|3|4|5|6|7| => |1|2|3|4|5|6|7| => |1|2|3|4|5|6|7|\n\t// +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+\n\t//\n\n\tassert.Equal(t, int32(1), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(1), cmt.Proposer(7).Number())\n\tassert.Equal(t, []*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, cmt.Validators())\n\tfmt.Println(cmt.String())\n\n\t// Height 1001\n\tcmt.Update(0, nil)\n\tassert.Equal(t, int32(2), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(3), cmt.Proposer(1).Number())\n\tassert.Equal(t, int32(2), cmt.Proposer(7).Number())\n\tassert.Equal(t, []*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, cmt.Validators())\n\tfmt.Println(cmt.String())\n\n\t// Height 1002\n\tcmt.Update(3, nil)\n\tassert.Equal(t, int32(6), cmt.Proposer(0).Number())\n\tassert.Equal(t, []*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, cmt.Validators())\n\tfmt.Println(cmt.String())\n\n\t// Height 1003\n\tcmt.Update(1, nil)\n\tassert.Equal(t, int32(1), cmt.Proposer(0).Number())\n\tassert.Equal(t, []*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, cmt.Validators())\n\tfmt.Println(cmt.String())\n}\n\nfunc TestValidatorConsistency(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(4))\n\n\tcmt, _ := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 4, val1.Address())\n\n\tt.Run(\"Updating validators' stake, Should panic\", func(t *testing.T) {\n\t\tassert.Panics(t, func() {\n\t\t\tval1.AddToStake(1)\n\t\t\tcmt.Update(0, []*validator.Validator{val1})\n\t\t}, \"The code did not panic\")\n\t})\n}\n\nfunc TestProposerJoin(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(4))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(5))\n\tval6 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(6))\n\tval7 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(7))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 7, val1.Address())\n\trequire.NoError(t, err)\n\tassert.Equal(t, 4, cmt.Size())\n\n\t//\n\t// h=1000, r=0  h=1001, r=0    h=1002, r=1    h=1003, r=1        h=1004, r=0\n\t// +-+*+-+-+    +-+$+-+*+-+    +*+-+-+!+-+    +$+$+-+!+*+-+-+    +-+-+-+-+-+*+-+\n\t// |1|2|3|4| => |1|5|2|3|4| => |1|5|2|3|4| => |6|7|1|5|2|3|4| => |6|7|1|5|2|3|4|\n\t// +-+-+-+-+    +-+-+-+-+-+    +-+-+-+-+-+    +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+\n\t//\n\n\t// Height 1000\n\t// Val2 is in the committee\n\tval2.UpdateLastSortitionHeight(1000)\n\tcmt.Update(0, []*validator.Validator{val2})\n\tassert.Equal(t, int32(2), cmt.Proposer(0).Number())\n\tassert.Equal(t, []int32{1, 2, 3, 4}, cmt.Committers())\n\tassert.Equal(t, 4, cmt.Size())\n\tfmt.Println(cmt.String())\n\n\t// Height 1001\n\tval5.UpdateLastSortitionHeight(1001)\n\tcmt.Update(0, []*validator.Validator{val5})\n\tassert.Equal(t, int32(3), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(4), cmt.Proposer(1).Number())\n\tassert.Equal(t, []int32{1, 5, 2, 3, 4}, cmt.Committers())\n\tassert.Equal(t, 5, cmt.Size())\n\tfmt.Println(cmt.String())\n\n\t// Height 1002\n\tcmt.Update(1, nil)\n\tassert.Equal(t, int32(1), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(5), cmt.Proposer(1).Number())\n\tfmt.Println(cmt.String())\n\n\t// Height 1003\n\tval3.UpdateLastSortitionHeight(1003)\n\tval6.UpdateLastSortitionHeight(1003)\n\tval7.UpdateLastSortitionHeight(1003)\n\tcmt.Update(1, []*validator.Validator{val7, val3, val6})\n\tassert.Equal(t, int32(2), cmt.Proposer(0).Number())\n\tassert.Equal(t, []int32{6, 7, 1, 5, 2, 3, 4}, cmt.Committers())\n\tassert.Equal(t, 7, cmt.Size())\n\tfmt.Println(cmt.String())\n\n\t// Height 1004\n\tcmt.Update(0, nil)\n\tassert.Equal(t, int32(3), cmt.Proposer(0).Number())\n\tfmt.Println(cmt.String())\n}\n\nfunc TestProposerJoinAndLeave(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\tpub3, _ := ts.RandBLSKeyPair()\n\tpub4, _ := ts.RandBLSKeyPair()\n\tpub5, _ := ts.RandBLSKeyPair()\n\tpub6, _ := ts.RandBLSKeyPair()\n\tpub7, _ := ts.RandBLSKeyPair()\n\tpub8, _ := ts.RandBLSKeyPair()\n\tpub9, _ := ts.RandBLSKeyPair()\n\tpubA, _ := ts.RandBLSKeyPair()\n\tpubB, _ := ts.RandBLSKeyPair()\n\tpubC, _ := ts.RandBLSKeyPair()\n\n\tval1 := validator.NewValidator(pub1, 1)\n\tval2 := validator.NewValidator(pub2, 2)\n\tval3 := validator.NewValidator(pub3, 3)\n\tval4 := validator.NewValidator(pub4, 4)\n\tval5 := validator.NewValidator(pub5, 5)\n\tval6 := validator.NewValidator(pub6, 6)\n\tval7 := validator.NewValidator(pub7, 7)\n\tval8 := validator.NewValidator(pub8, 8)\n\tval9 := validator.NewValidator(pub9, 9)\n\tvalA := validator.NewValidator(pubA, 10)\n\tvalB := validator.NewValidator(pubB, 11)\n\tvalC := validator.NewValidator(pubC, 12)\n\n\tcmt, err := committee.NewCommittee(\n\t\t[]*validator.Validator{val1, val2, val3, val4, val5, val6, val7}, 7, val1.Address())\n\trequire.NoError(t, err)\n\tfmt.Println(cmt.String())\n\n\t// This code comment explains how the committee changes when new validators join.\n\t//\n\t// The symbols used in the explanation are as follows:\n\t// * represents the current proposer\n\t// ! represents a failed proposer\n\t// $ represents a joined validator\n\t// h is height and r is round number\n\t//\n\t// Initially, the committee consists of validators numbered from 1 to 7.\n\t// Validator 1 is the oldest and the current proposer.\n\t// The committee configuration is represented as:\n\t// +*+-+-+-+-+-+-+\n\t// |1|2|3|4|5|6|7|\n\t// +-+-+-+-+-+-+-+\n\t//\n\t// When new validators join, they are inserted before the current proposer.\n\t// For example, validator 8 joins the committee:\n\t// +$+*+-+-+-+-+-+-+\n\t// |8|1|2|3|4|5|6|7|\n\t// +-+-+-+-+-+-+-+-+\n\t//\n\t// After the addition of a new validator, the committee needs to be adjusted,\n\t// and the oldest validator should leave:\n\t// +$+-+-+-+-+-+-+\n\t// |8|2|3|4|5|6|7|\n\t// +-+-+-+-+-+-+-+\n\t//\n\t// Next, we move to the next proposer.\n\t// +-+*+-+-+-+-+-+\n\t// |8|2|3|4|5|6|7|\n\t// +-+-+-+-+-+-+-+\n\t//\n\t// -------------------------------------\n\t// In this test, we cover the following movements:\n\t//\n\t// h=1000, r=0        h=1001, r=0        h=1002, r=3        h=1003, r=0\n\t// +*+-+-+-+-+-+-+    +$+*+-+-+-+-+-+    +-+-+!+!+!+*+-+    +-+$+-+-+$+-+*+\n\t// |1|2|3|4|5|6|7| => |8|2|3|4|5|6|7| => |8|2|3|4|5|6|7| => |8|2|3|5|9|6|7| =>\n\t// +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+    +-+-+$+-+-+-+-+    +-+-+-+-+-+-+-+\n\t//\n\t// h=1004, r=1        h=1005, r=0        h=1006, r=2        h=1007, r=4\n\t// +!+*+-+-+-+$+-+    +-+$+$+-+*+-+-+    +*+-+-+$+-+!+!+    +*+$+-+!+!+!+!+\n\t// |8|2|3|9|6|A|7| => |8|B|C|2|3|9|A| => |B|C|2|1|3|9|A| => |5|6|B|C|2|1|3|\n\t// +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+    +-+-+-+-+-+-+-+    +$+-+-+-+$+-+$+\n\n\t// Height 1001\n\tval8.UpdateLastSortitionHeight(1001)\n\tcmt.Update(0, []*validator.Validator{val8})\n\tassert.Equal(t, int32(2), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(3), cmt.Proposer(1).Number())\n\tassert.Equal(t, int32(4), cmt.Proposer(2).Number())\n\tassert.Equal(t, []int32{8, 2, 3, 4, 5, 6, 7}, cmt.Committers())\n\tfmt.Println(cmt.String())\n\n\t// Height 1002\n\tval3.UpdateLastSortitionHeight(1002)\n\tcmt.Update(3, []*validator.Validator{val3})\n\tassert.Equal(t, int32(6), cmt.Proposer(0).Number())\n\tfmt.Println(cmt.String())\n\n\t// Height 1003\n\tval2.UpdateLastSortitionHeight(1003)\n\tval9.UpdateLastSortitionHeight(1003)\n\tcmt.Update(0, []*validator.Validator{val9, val2})\n\tassert.Equal(t, int32(7), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(8), cmt.Proposer(1).Number())\n\tassert.Equal(t, []int32{8, 2, 3, 5, 9, 6, 7}, cmt.Committers())\n\tfmt.Println(cmt.String())\n\n\t// Height 1004\n\tvalA.UpdateLastSortitionHeight(1004)\n\tcmt.Update(1, []*validator.Validator{valA})\n\tassert.Equal(t, int32(2), cmt.Proposer(0).Number())\n\tassert.Equal(t, []int32{8, 2, 3, 9, 6, 10, 7}, cmt.Committers())\n\tfmt.Println(cmt.String())\n\n\t// Height 1005\n\tvalB.UpdateLastSortitionHeight(1005)\n\tvalC.UpdateLastSortitionHeight(1005)\n\tcmt.Update(0, []*validator.Validator{valC, valB})\n\tassert.Equal(t, int32(3), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(9), cmt.Proposer(1).Number())\n\tassert.Equal(t, int32(10), cmt.Proposer(2).Number())\n\tassert.Equal(t, []int32{8, 11, 12, 2, 3, 9, 10}, cmt.Committers())\n\tfmt.Println(cmt.String())\n\n\t// Height 1006\n\tval1.UpdateLastSortitionHeight(1006)\n\tcmt.Update(2, []*validator.Validator{val1})\n\tassert.Equal(t, int32(11), cmt.Proposer(0).Number())\n\tassert.Equal(t, []int32{11, 12, 2, 1, 3, 9, 10}, cmt.Committers())\n\tfmt.Println(cmt.String())\n\n\t// Height 1007\n\tval2.UpdateLastSortitionHeight(1007)\n\tval3.UpdateLastSortitionHeight(1007)\n\tval5.UpdateLastSortitionHeight(1007)\n\tval6.UpdateLastSortitionHeight(1007)\n\tcmt.Update(4, []*validator.Validator{val2, val3, val5, val6})\n\tassert.Equal(t, int32(5), cmt.Proposer(0).Number())\n\tassert.Equal(t, []int32{5, 6, 11, 12, 2, 1, 3}, cmt.Committers())\n\tfmt.Println(cmt.String())\n}\n\nfunc TestIsProposer(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(0))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 4, val1.Address())\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, int32(0), cmt.Proposer(0).Number())\n\tassert.Equal(t, int32(1), cmt.Proposer(1).Number())\n\tassert.True(t, cmt.IsProposer(val3.Address(), 2))\n\tassert.False(t, cmt.IsProposer(val4.Address(), 2))\n\tassert.False(t, cmt.IsProposer(ts.RandAccAddress(), 2))\n\tassert.Equal(t, []*validator.Validator{val1, val2, val3, val4}, cmt.Validators())\n}\n\nfunc TestCommitters(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(0))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 4, val1.Address())\n\trequire.NoError(t, err)\n\tassert.Equal(t, []int32{0, 1, 2, 3}, cmt.Committers())\n}\n\nfunc TestSortJoined(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(0))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(4))\n\tval6 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(5))\n\tval7 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(6))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 17, val1.Address())\n\trequire.NoError(t, err)\n\tcommittee2, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4}, 17, val1.Address())\n\trequire.NoError(t, err)\n\n\tcmt.Update(0, []*validator.Validator{val5, val6, val7})\n\tcommittee2.Update(0, []*validator.Validator{val7, val5, val6})\n}\n\nfunc TestTotalPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, _ := ts.RandBLSKeyPair()\n\tval0 := validator.NewValidator(pub, 0) // Bootstrap validator\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(0))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(1))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(2))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithNumber(3))\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val0, val1, val2, val3, val4}, 4, val1.Address())\n\trequire.NoError(t, err)\n\n\ttotalPower := val0.Power() + val1.Power() + val2.Power() + val3.Power() + val4.Power()\n\ttotalStake := val0.Stake() + val1.Stake() + val2.Stake() + val3.Stake() + val4.Stake()\n\tassert.Equal(t, totalPower, cmt.TotalPower())\n\tassert.Equal(t, int64(totalStake+1), cmt.TotalPower())\n}\n\nfunc TestProtocolVersionPercentages(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(500))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(500))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\n\tval2.UpdateProtocolVersion(protocol.ProtocolVersion1)\n\tval3.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\tval4.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\tval5.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4, val5}, 5, val1.Address())\n\trequire.NoError(t, err)\n\n\tpercentages := cmt.ProtocolVersions()\n\tassert.InDelta(t, float64(25), percentages[protocol.ProtocolVersionUnknown], 0.01)\n\tassert.InDelta(t, float64(25), percentages[protocol.ProtocolVersion1], 0.01)\n\tassert.InDelta(t, float64(50), percentages[protocol.ProtocolVersion2], 0.01)\n}\n\nfunc TestSupportProtocolVersion(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\tval2 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\tval3 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(500))\n\tval4 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(500))\n\tval5 := ts.GenerateTestValidator(testsuite.ValidatorWithStake(1000))\n\n\tval2.UpdateProtocolVersion(protocol.ProtocolVersion1)\n\tval3.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\tval4.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\tval5.UpdateProtocolVersion(protocol.ProtocolVersion2)\n\n\tcmt, err := committee.NewCommittee([]*validator.Validator{val1, val2, val3, val4, val5}, 5, val1.Address())\n\trequire.NoError(t, err)\n\n\tsupportVer1 := cmt.SupportProtocolVersion(protocol.ProtocolVersion1)\n\tsupportVer2 := cmt.SupportProtocolVersion(protocol.ProtocolVersion2)\n\n\tassert.True(t, supportVer1)\n\tassert.False(t, supportVer2)\n}\n"
  },
  {
    "path": "committee/interface.go",
    "content": "package committee\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype Reader interface {\n\tValidators() []*validator.Validator\n\tCommitters() []int32\n\tContains(addr crypto.Address) bool\n\tProposer(round types.Round) *validator.Validator\n\tIsProposer(addr crypto.Address, round types.Round) bool\n\tProtocolVersions() map[protocol.Version]float64\n\tSupportProtocolVersion(version protocol.Version) bool\n\tSize() int\n\tTotalPower() int64\n\tString() string\n}\n\ntype Committee interface {\n\tReader\n\n\tUpdate(lastRound types.Round, joined []*validator.Validator)\n}\n"
  },
  {
    "path": "config/banned_addrs.json",
    "content": "[\n    \"pc1p8slveave2zm9tgj7q260fgrdfu2ph8n7ezxhtt\",\n    \"pc1prqnrscsgtcp25sqvwk6d2zj9p9m37wexu0x8z5\",\n    \"pc1pd5mytehyrrgtcvhzjqnl7tkq2q0693w5raqjuz\",\n    \"pc1pg69yuccgflmh8fm4pffgwtrxtvvmz96vzjuvev\",\n    \"pc1p23yw39cz2k3epaudrpc3fy47xwmlt3y7padg6k\",\n    \"pc1pu5y7tprtgve6wf27chhcx2clrp3rxr78yjn2w6\",\n    \"pc1p2qvmcx49d0l30vclh5cra7zaudc5ptl05e6pme\",\n    \"pc1pqp67ea35yu4pvchgps4rv0qh0xq2pjty6h00hv\",\n    \"pc1pggmhgvykakkm65wma06r9ehmeg57qq6rdze9ac\",\n    \"pc1pdtmavngjg6uxexmyre5ulzxdm0273qtsmegw5p\",\n    \"pc1pyl42x03hvdee29jz5t40ak25ykmsv7lz2zde5t\",\n    \"pc1p4updh8l9vzzuz0sl82vyk68st59mzqwwcy968c\",\n    \"pc1ppcula9c5xspaumhr9uf7fz3k6r3g96v0kw70w2\",\n    \"pc1pjcfn6n3ah38rxymyyay4wyeexhv80t6ll7exf4\",\n    \"pc1pvdkeuwyg8t6aadzq6qey7hr6rx7pegaf645x0h\",\n    \"pc1pr23lgtpqk4jejyjymtvhcewdhhcsn3pcg6pnpe\",\n    \"pc1p6hyq0q9ska6d69e0mh4wtjehg59nd6m0jd5sgg\",\n    \"pc1p3p2975j823dtg9ykrex5ldtvzan37n05ujs5yp\",\n    \"pc1pu7lu603kklmaztpedjfped0l76vv9t2g0kfekr\",\n    \"pc1p60wcs73wsayw392xavevfpcw74n27skyxzt22k\",\n    \"pc1ppx792krldzc5te6w9dsud0tg68kea4qjtgl9zz\",\n    \"pc1ppepknw0sw7l28mqk2s9x3lhrc4m6q2kxn7zq65\",\n    \"pc1p42m2tuh4de5uk0x6t4c9vlp03k90300aclzytd\",\n    \"pc1prsvye97z3ghe3z8nkvlsexl8jq4cuuryvj5wse\",\n    \"pc1p4zv86e9r648muzxgacftxt0mpqv3hk7yj7ckg2\",\n    \"pc1pdsg4a9llhwwjd895a6p9832ql7ujwp6w5eafkp\",\n    \"pc1ppwd8cartlsf59pet6fv7epw54wxfkw8sh03vn9\",\n    \"pc1p06x3tdrputewwrl3jjln0t3rmwew4lq83hvvmr\",\n    \"pc1pgemv3f5jfpwqseaq0zrcre2kctxdrtygr4v38g\",\n    \"pc1pcjt9v92rjz67whedeapcg4j7vmg5fkmpu8w5pk\",\n    \"pc1pq7c9r9g6hq2xuhyuxgw7p9aw28ct5l5xjs4rcr\",\n    \"pc1pjnjga6kp995d7ryjhfmpfhypzhc5t842ej4wkn\",\n    \"pc1psmxxv869ktd854u9xugdzc95ctd8gxm0j606yu\",\n    \"pc1pxw82yfrtqvawx0fy2q2jv7fn5ldcv3f9x0cpxq\",\n    \"pc1pwyhe94d0h0nmevz9hj2p3e4gxx6akgcatljpzk\",\n    \"pc1p6pxk2qvkvv9czn4m9y6vt28umxjrg2ysjrc739\",\n    \"pc1pjxef7h7phx2rtjl7xyrqtuch2v7x54jqd5xz08\",\n    \"pc1p9zm2uxeuf0r674ymm94m7tn9trdpvv7xwytr63\",\n    \"pc1p6zrr0almnw4rcd4e8a35yjsvr3nzn34jx5anmf\",\n    \"pc1phx0ztmscj8n99tf2jje4r8zn6szlh2aw3segkl\",\n    \"pc1z2wtq43p8fnueya9qufq9hkutyr899npk2suleu\",\n    \"pc1rjssvgmfd702dt66x9rjakumh2ry3x85s22spz8\"\n]\n"
  },
  {
    "path": "config/bootstrap.json",
    "content": "[\n    {\n        \"name\": \"Pactus\",\n        \"email\": \"info@pactus.org\",\n        \"website\": \"https://pactus.org\",\n        \"address\": \"/dns/bootstrap1.pactus.org/tcp/21888/p2p/12D3KooWMnDsu8TDTk2VV8uD8zsNSB6eUkqtQs6ttg4bHq9zNaBe\"\n    },\n    {\n        \"name\": \"Pactus\",\n        \"email\": \"info@pactus.org\",\n        \"website\": \"https://pactus.org\",\n        \"address\": \"/dns/bootstrap2.pactus.org/tcp/21888/p2p/12D3KooWM39ag7ghta49qybf7McADgT8FLakTYkCsiBvwdnjuG5q\"\n    },\n    {\n        \"name\": \"Pactus\",\n        \"email\": \"info@pactus.org\",\n        \"website\": \"https://pactus.org\",\n        \"address\": \"/dns/bootstrap3.pactus.org/tcp/21888/p2p/12D3KooWBCPSZWheet6tMoHbVBCDfBwQm4yzCwcQ8hJ6NMCN97sj\"\n    },\n    {\n        \"name\": \"Pactus\",\n        \"email\": \"info@pactus.org\",\n        \"website\": \"https://pactus.org\",\n        \"address\": \"/dns/bootstrap4.pactus.org/tcp/21888/p2p/12D3KooWKg6aLa77yAaqMCb45aH5iQuTr5GzRUWUCJ1sZYB5vnoL\"\n    },\n    {\n        \"name\": \"MrHodl\",\n        \"email\": \"hodl@pactus.org\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/65.108.211.187/tcp/21888/p2p/12D3KooWGLrSiE5KWoc9GpXfryvKqheHj6j78ryMDDC17SY4YoCi\"\n    },\n    {\n        \"name\": \"Fabryprog\",\n        \"email\": \"fabryprog@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/84.247.165.249/tcp/21888/p2p/12D3KooWQmv2FcNQfh1EhA98twt8ePdkQaxEPeYfinEYyVS16juY\"\n    },\n    {\n        \"name\": \"JohnVNBnode\",\n        \"email\": \"quynhgiangtranle@gmail.com\",\n        \"website\": \"docs.vnbnode.com\",\n        \"address\": \"/ip4/62.171.130.196/tcp/21888/p2p/12D3KooWSkwB8AiWz3VGyG5cgC3ry5dmCw3TthQNc1jvRNe9EEKH\"\n    },\n    {\n        \"name\": \"NodeSync_Top\",\n        \"email\": \"lthuan2011@gmail.com\",\n        \"website\": \"https://nodesync.top/\",\n        \"address\": \"/ip4/135.181.42.222/tcp/21888/p2p/12D3KooWN46UYQNoZvzd9GiJPQC7LByj6RAg8rRxdUTiQ24vHsN1\"\n    },\n    {\n        \"name\": \"Stakers\",\n        \"email\": \"danile_z@outlook.com\",\n        \"website\": \"\",\n        \"address\": \"/dns/pactus-bootstrap.stakers.world/tcp/21888/p2p/12D3KooWK1DAcxf8RJA2PVkwr9ehk1zgXcnjLyPCsYCpvw1NSfhc\"\n    },\n    {\n        \"name\": \"Karma Nodes\",\n        \"email\": \"karma.nodes@proton.me\",\n        \"website\": \"http://karmanodes.xyz\",\n        \"address\": \"/ip4/158.220.91.129/tcp/21888/p2p/12D3KooWGfehwyZJBu6WUMLyzJ8sDJachvhxhqw5Wh4uU3H99GLq\"\n    },\n    {\n        \"name\": \"IONode\",\n        \"email\": \"orochi@ionode.online\",\n        \"website\": \"https://IONode.Online\",\n        \"address\": \"/dns/pactus-bootstrap.ionode.online/tcp/21888/p2p/12D3KooWG5tvvfS8PRd2Bgyxxqrok7QfohkHSprFPxmT3HTh8dVD\"\n    },\n    {\n        \"name\": \"SGTstake\",\n        \"email\": \"adorid@sgtstake.com\",\n        \"website\": \"https://sgtstake.com\",\n        \"address\": \"/ip4/159.148.146.149/tcp/21888/p2p/12D3KooWKCokWtpdudxgsLRoFcnrW35vhn6w632iGWCga7E5e68Q\"\n    },\n    {\n        \"name\": \"Stake.Works\",\n        \"email\": \"support@stake.works\",\n        \"website\": \"https://stake.works\",\n        \"address\": \"/dns/pactus-bootnode.stake.works/tcp/21888/p2p/12D3KooWJPuhW7Ejmb8KprpVNRzn1eUQXDHU3n5eTo2vodgvVxoJ\"\n    },\n    {\n        \"name\": \"KenZ\",\n        \"email\": \"quangtuyen88@hotmail.com\",\n        \"website\": \"https://www.pr1sm.com/\",\n        \"address\": \"/ip4/65.108.68.214/tcp/21888/p2p/12D3KooWD7X8BDqV9r6zGmoo2dpMYo4Z6YoyDQp6j4UnB2Bj3Fq2\"\n    },\n    {\n        \"name\": \"Validator247\",\n        \"email\": \"Validator247@gmail.com\",\n        \"website\": \"https://validator247.com/\",\n        \"address\": \"/ip4/65.21.180.80/tcp/21888/p2p/12D3KooWANqay6T1xCrK3imfAEr3GpiGzxT6SWCEsRapo8tJWAZN\"\n    },\n    {\n        \"name\": \"BearValidator\",\n        \"email\": \"validator.wiki@gmail.com\",\n        \"website\": \"https://validator.wiki/\",\n        \"address\": \"/ip4/37.27.26.40/tcp/21888/p2p/12D3KooWPehhWgfdZG6x9zE7QdQxuAcfbQPAyBPjcXLfVYfU9FAd\"\n    },\n    {\n        \"name\": \"MoneyLow-VNBnode\",\n        \"email\": \"mfl@vnbnode.com\",\n        \"website\": \"https://VNBnode.com\",\n        \"address\": \"/dns/pactus-bootstrap.mflow.tech/tcp/21888/p2p/12D3KooWJD2PBAur6kXjX31dyrPzjSV947ppZ885QDKCXEvLm9Vb\"\n    },\n    {\n        \"name\": \"alishiaplowden\",\n        \"email\": \"pleasurement7777@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/5.161.222.154/tcp/21888/p2p/12D3KooWQN2VN1RWQ5eWq8rVexpBnwVSy7k34Rpep4R6V57XWYau\"\n    },\n    {\n        \"name\": \"CherryValidator\",\n        \"email\": \"mommeus@gmail.com\",\n        \"website\": \"https://cherryvalidator.us\",\n        \"address\": \"/ip4/65.21.155.128/tcp/21888/p2p/12D3KooWPykSnzWpEasRijCgQ99vxAxWKL32zY24MmvtaXsHapSf\"\n    },\n    {\n        \"name\": \"TeoViTeoVi\",\n        \"email\": \"listening2009@gmail.com\",\n        \"website\": \"https://teoviteovi.com\",\n        \"address\": \"/dns/pactus-bootstrap.teoviteovi.com/tcp/21888/p2p/12D3KooWMP5qWNHF1RfzhpAkBmQZzBfbaSJZCo3QF1fxs5CFXkv8\"\n    },\n    {\n        \"name\": \"p10node\",\n        \"email\": \"pierre@p10node.com\",\n        \"website\": \"https://p10node.com/\",\n        \"address\": \"/ip4/37.60.233.235/tcp/21888/p2p/12D3KooWNzbuBESYzbKGm7UyLkD22cHSgjRMUx4rjEKLBfVSZuY1\"\n    },\n    {\n        \"name\": \"tiantsi\",\n        \"email\": \"xuhaizhu@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/43.135.166.197/tcp/21888/p2p/12D3KooWEqyjMNzFe92HFZMZQd3YZ6zvztuPaC3a4wAUvPf4moyP\"\n    },\n    {\n        \"name\": \"vinhhathacha\",\n        \"email\": \"vinhhathacha@gmail.com\",\n        \"website\": \"https://github.com/vinhhathacha\",\n        \"address\": \"/ip4/46.250.233.5/tcp/21888/p2p/12D3KooWH1kam9g1QFWmtWMLzP2MDY4ptpLTMPU8wSq3Q4k3rvnn\"\n    },\n    {\n        \"name\": \"CodeBlockLabs\",\n        \"email\": \"emailbuatcariduit@gmail.com\",\n        \"website\": \"https://codeblocklabs.com\",\n        \"address\": \"/dns/pactus-bootstrap.codeblocklabs.com/tcp/21888/p2p/12D3KooWSdmPLqWbmv5x5pBiL5nHwKN5S2jhP96oXCKmoEmAhV4Z\"\n    },\n    {\n        \"name\": \"0xSown\",\n        \"email\": \"vtson2707@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/84.247.184.95/tcp/21888/p2p/12D3KooWSjp5GFmCCsYkKcqicrghyHqfjdDCfLfgfqWmG5JTQSDu\"\n    },\n    {\n        \"name\": \"Adora\",\n        \"email\": \"adoratran21@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/dns/pactus-bootstrap.thd.io.vn/tcp/21888/p2p/12D3KooWDgsSSGJzihBJxqNJFqbGwbTEDXRoUBph1BCfwm11R6KY\"\n    },\n    {\n        \"name\": \"Node39\",\n        \"email\": \"contact@node39.top\",\n        \"website\": \"https://node39.top\",\n        \"address\": \"/dns/bootstrap-pactus.node39.top/tcp/21888/p2p/12D3KooWDhWitNS2nNYMUHnTvdGXeQXd5aYBAGppaBTE1VMiyH4B\"\n    },\n    {\n        \"name\": \"sebus\",\n        \"email\": \"john.chatterton@protonmail.com\",\n        \"website\": \"https://linktr.ee/john.chatterton\",\n        \"address\": \"/ip4/173.212.254.120/tcp/21888/p2p/12D3KooWJR19vjuBzuJTceCoy3LG8jggkHCBGb9j5SzdKtoPL7Yb\"\n    },\n    {\n        \"name\": \"Stilucky\",\n        \"email\": \"Stiluckyy@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/62.171.134.3/tcp/21888/p2p/12D3KooWSv5jsXMg1b4PBd2SCcPLj3Mc5KzzBYnpPkiS7JjuqhHF\"\n    },\n    {\n        \"name\": \"Toncatuyvu\",\n        \"email\": \"Toncatuyvu@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/109.123.240.5/tcp/21888/p2p/12D3KooWCT92yaS4JgrHHzeRPsJxaLzRdSEknGEN4HxQFfscoY8k\"\n    },\n    {\n        \"name\": \"TPES\",\n        \"email\": \"duongbo8648@gmail.com\",\n        \"website\": \"https://tpes.com.vn\",\n        \"address\": \"/ip4/75.119.159.113/tcp/21888/p2p/12D3KooWL7nUsmd7JNrhrfbBjg6JxPFiZA5LXbdCDPnw5Xpdp4a9\"\n    },\n    {\n        \"name\": \"toanbm\",\n        \"email\": \"buiminhtoan1985@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/161.97.145.100/tcp/21888/p2p/12D3KooWCjZ35Hu8Mt5GjZ6fJzJBZuUSsAppAzXcbMcXkswR4HrU\"\n    },\n    {\n        \"name\": \"Wanderersg2014\",\n        \"email\": \"wanderersg2014@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/109.123.253.88/tcp/21888/p2p/12D3KooWFUJhDjYcAXgEnW1pTLRDWnH9CLgBPcezgU7pCpxMngt8\"\n    },\n    {\n        \"name\": \"node-life\",\n        \"email\": \"vminairdrop1@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/167.86.80.169/tcp/21888/p2p/12D3KooWDqAPjeRR41GYoQw9RQaSZdFx59k3SpkR29yAycpJUhfF\"\n    },\n    {\n        \"name\": \"DRAGON\",\n        \"email\": \"kiritovn14788@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/65.21.69.53/tcp/21888/p2p/12D3KooWQ1izUE5jcmMyjmxRdb2CmASe8Nfn81UL2G5rYjptC2RV\"\n    },\n    {\n        \"name\": \"VALIDATOR.WIKI\",\n        \"email\": \"admin@validator.wiki\",\n        \"website\": \"https://www.validator.wiki/\",\n        \"address\": \"/dns/pactus-bootstrap.validator.wiki/tcp/21888/p2p/12D3KooWBC5YQJdRAvupSXUPNYHiSctzZeTPNzen1JsRwj9aEyYZ\"\n    },\n    {\n        \"name\": \"SumNode\",\n        \"email\": \"thanhsum@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/157.90.22.45/tcp/21888/p2p/12D3KooWLUYJ55DyJjSZvwPJDQNVYSBYqiMxJ9bFzRcVBgvSkN9L\"\n    },\n    {\n        \"name\": \"bettevinup\",\n        \"email\": \"neitheryounorme1@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/65.21.152.153/tcp/21888/p2p/12D3KooWCirKBMmhmL6a4Ng5TVHQ4Leb6Wfj4M8s9raUzdFQn5aP\"\n    },\n    {\n        \"name\": \"BlockSync\",\n        \"email\": \"topwelder2015@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/128.140.103.90/tcp/21888/p2p/12D3KooWN4eypkp61j12SMSkmrEfQv4RjnggmRfcEfom4mcKUpsR\"\n    },\n    {\n        \"name\": \"hainguyen0094_22439\",\n        \"email\": \"nth1686@hotmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/185.216.75.142/tcp/21888/p2p/12D3KooWNjYFZpq5YwdUC6JgHfkZhUY7SyxTAQCHrdNwf2t1FXSn\"\n    },\n    {\n        \"name\": \"duyenhtm\",\n        \"email\": \"myduyenht1501@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/85.190.246.251/tcp/21888/p2p/12D3KooWMTPKpr6EHMmZ2NSXkup4NaqwKnYmScHEsN3HpcqYgBZL\"\n    },\n    {\n        \"name\": \"minhtoanbui135\",\n        \"email\": \"toanbm.test02@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/45.134.226.48/tcp/21888/p2p/12D3KooWBSP8AdiHkkvPunpbhfZE96YTY6om4hw35Xpe3bJFBUjh\"\n    },\n    {\n        \"name\": \"NodeOps\",\n        \"email\": \"admin@nodeops.dev\",\n        \"website\": \"https://nodeops.dev/\",\n        \"address\": \"/ip4/154.38.187.40/tcp/21888/p2p/12D3KooWQyt7JCyhhnZ8jyT1vso4GGYVbpJhoXJy5KRpnqa8DmPg\"\n    },\n    {\n        \"name\": \"hope3387\",\n        \"email\": \"phuocchunginvestor@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/194.163.164.10/tcp/21888/p2p/12D3KooWDRFCW5ksbnn6Uq7kx3HZt3EnrKjujqqs8QBQmA7TK5o6\"\n    },\n    {\n        \"name\": \"5t0q6pr\",\n        \"email\": \"nth1686@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/167.86.116.61/tcp/21888/p2p/12D3KooWAmc69XaFh6T76BQQaFmSakYFgDyvzDLfVBgTzqmNtyXM\"\n    },\n    {\n        \"name\": \"00PactucValidator32\",\n        \"email\": \"evpc77@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/46.196.214.35/tcp/21888/p2p/12D3KooWJ3H7YAyemqxtToG6yRRzTfLdZD3eJk2xsQRaKxfdNhKf\"\n    },\n    {\n        \"name\": \"anpjwq\",\n        \"email\": \"hain64341@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/42.117.247.180/tcp/21888/p2p/12D3KooWLVZSkgkFgrRNMfkCtULqtErYcNgjqgueeH944vDpDCPv\"\n    },\n    {\n        \"name\": \"Vozer\",\n        \"email\": \"airdropdata7@gmail.com\",\n        \"website\": \"voz.vn\",\n        \"address\": \"/ip4/38.242.225.172/tcp/21888/p2p/12D3KooWDTP7CKGvbcg5WiuKB2Bt4acf2LWMdbUjMqU63dKKCVMB\"\n    },\n    {\n        \"name\": \"Khacbao\",\n        \"email\": \"khacbao114@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/167.86.121.11/tcp/21888/p2p/12D3KooWMpVXMQkr26ff3y8gC5z1h9RZNxTvW4WzZBML8GHHUoL5\"\n    },\n    {\n        \"name\": \"Thomas Jr\",\n        \"email\": \"catsmile91@gmail.com\",\n        \"website\": \"catsmile.tech\",\n        \"address\": \"/ip4/194.163.189.255/tcp/21888/p2p/12D3KooWExbN79BrgDWjdLUd8TZaP2LvCDN8zJkMuPhRHkjKDcJS\"\n    },\n    {\n        \"name\": \"Winnode\",\n        \"email\": \"maladarsih@gmail.com\",\n        \"website\": \"winnode.site\",\n        \"address\": \"/ip4/37.60.245.47/tcp/21888/p2p/12D3KooWBH27VEPdGBYzq1vYciRgnDn3ozStRaUYd2vJWGgaKEUZ\"\n    },\n    {\n        \"name\": \"F2Node\",\n        \"email\": \"lochua3989@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/84.247.172.23/tcp/21888/p2p/12D3KooWFJYk55mUD6FR9Gx2YGQ34PYziwTQhY1kZ3TMS6fGUz6g\"\n    },\n    {\n        \"name\": \"SumNode\",\n        \"email\": \"thanhsum@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/95.216.222.135/tcp/21888/p2p/12D3KooWHicbZ3dBnR7JaVKr4U7WNUWyhDnUn2TwMVmPqW8Ftqop\"\n    },\n    {\n        \"name\": \"Sipannachi\",\n        \"email\": \"sipannachi@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/65.109.143.78/tcp/21888/p2p/12D3KooWPnWgEFV32cvpfuv98oioZQJJKvRM46BEsFaoXYijvgvc\"\n    },\n    {\n        \"name\": \"JackieLuong135\",\n        \"email\": \"jackieluong135@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/116.203.238.65/tcp/21888/p2p/12D3KooWANYW76iXWpFXPQ85mDamWbfRdkyo8KcvxxQMJdfQW33G\"\n    },\n    {\n        \"name\": \"Lisachoake\",\n        \"email\": \"mohamed.solamina@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/49.13.27.37/tcp/21888/p2p/12D3KooWPSh9KMa6tRfSewK3sUC4BDSPnXseVDGJxWqNZxKcXnGM\"\n    },\n    {\n        \"name\": \"Sury\",\n        \"email\": \"lyminhhai102@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/37.60.241.89/tcp/21888/p2p/12D3KooWMZtkk5HS69ukYYdfxD3CgBgTtKZg7kv43mCz1HMrDnQw\"\n    },\n    {\n        \"name\": \"Razizi\",\n        \"email\": \"sumtran.dev@gmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/195.201.112.164/tcp/21888/p2p/12D3KooWKiYGT4mCapgcqLPSwbkJY1KgZMW5hdC8XJMQSU23tiSL\"\n    },\n    {\n        \"name\": \"hainguyen0094_22439\",\n        \"email\": \"nth1686@hotmail.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/94.72.120.50/tcp/21888/p2p/12D3KooWCJX9aLnzmEFtEasvbbaFqHLTboFVFptZxeFnbnSxpb2m\"\n    },\n    {\n        \"name\": \"anpjwq\",\n        \"email\": \"hain64341@gmail.com\",\n        \"website\": \"n/a\",\n        \"address\": \"/ip4/95.111.242.225/tcp/21888/p2p/12D3KooWRNTZpo1XNWKQx2Z5HEu5RnqKeNDV5y4qMKX5f4aLtbv9\"\n    },\n    {\n        \"name\": \"Dezh Technologies\",\n        \"email\": \"hi@dezh.tech\",\n        \"website\": \"https://dezh.tech\",\n        \"address\": \"/dns/pactus-bootstrap1.dezh.tech/tcp/21888/p2p/12D3KooWK1z7QAskVrQd98r98UMSPwTLr4out8B9NkQTrCdZPCZx\"\n    },\n    {\n        \"name\": \"korcano\",\n        \"email\": \"korcan@yaani.com\",\n        \"website\": \"\",\n        \"address\": \"/ip4/5.75.183.248/tcp/21888/p2p/12D3KooWNMfSbFx4RvakvBXrZrsqi9gdqzg6P9PWgpB3wT6uwV8t\"\n    }\n]\n"
  },
  {
    "path": "config/config.go",
    "content": "package config\n\nimport (\n\t\"bytes\"\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/pactus-project/pactus/consensus\"\n\t\"github.com/pactus-project/pactus/consensusv2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/sync\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\t\"github.com/pactus-project/pactus/www/grpc\"\n\t\"github.com/pactus-project/pactus/www/html\"\n\t\"github.com/pactus-project/pactus/www/http\"\n\t\"github.com/pactus-project/pactus/www/jsonrpc\"\n\t\"github.com/pactus-project/pactus/www/zmq\"\n\t\"github.com/pelletier/go-toml/v2\"\n)\n\nvar (\n\t//go:embed example_config.toml\n\texampleConfigBytes []byte\n\n\t//go:embed bootstrap.json\n\tbootstrapInfoBytes []byte\n\n\t//go:embed banned_addrs.json\n\tbannedAddrBytes []byte\n)\n\n// Config defines parameters for the root application configuration.\ntype Config struct {\n\tNode          *NodeConfig     `toml:\"node\"`\n\tStore         *store.Config   `toml:\"store\"`\n\tNetwork       *network.Config `toml:\"network\"`\n\tSync          *sync.Config    `toml:\"sync\"`\n\tTxPool        *txpool.Config  `toml:\"tx_pool\"`\n\tLogger        *logger.Config  `toml:\"logger\"`\n\tGRPC          *grpc.Config    `toml:\"grpc\"`\n\tJSONRPC       *jsonrpc.Config `toml:\"jsonrpc\"`\n\tHTTP          *http.Config    `toml:\"http\"`\n\tHTML          *html.Config    `toml:\"html\"`\n\tZeroMq        *zmq.Config     `toml:\"zeromq\"`\n\tWalletManager *wltmgr.Config  `toml:\"wallet\"`\n\n\tConsensus   *consensus.Config   `toml:\"-\"` // Deprecated: replaced by new consensus algorithm\n\tConsensusV2 *consensusv2.Config `toml:\"-\"`\n}\n\ntype BootstrapInfo struct {\n\tName    string `json:\"name\"`\n\tEmail   string `json:\"email\"`\n\tWebsite string `json:\"website\"`\n\tAddress string `json:\"address\"`\n}\n\ntype NodeConfig struct {\n\tRewardAddresses []string `toml:\"reward_addresses\"`\n}\n\nfunc DefaultNodeConfig() *NodeConfig {\n\treturn &NodeConfig{\n\t\tRewardAddresses: []string{},\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *NodeConfig) BasicCheck() error {\n\tfor _, addrStr := range conf.RewardAddresses {\n\t\taddr, err := crypto.AddressFromString(addrStr)\n\t\tif err != nil {\n\t\t\treturn NodeConfigError{\n\t\t\t\tReason: fmt.Sprintf(\"invalid reward address: %v\", err.Error()),\n\t\t\t}\n\t\t}\n\n\t\tif !addr.IsAccountAddress() {\n\t\t\treturn NodeConfigError{\n\t\t\t\tReason: fmt.Sprintf(\"reward address is not an account address: %s\", addrStr),\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc defaultConfig() *Config {\n\tconf := &Config{\n\t\tNode:          DefaultNodeConfig(),\n\t\tStore:         store.DefaultConfig(),\n\t\tNetwork:       network.DefaultConfig(),\n\t\tSync:          sync.DefaultConfig(),\n\t\tTxPool:        txpool.DefaultConfig(),\n\t\tConsensus:     consensus.DefaultConfig(),\n\t\tConsensusV2:   consensusv2.DefaultConfig(),\n\t\tLogger:        logger.DefaultConfig(),\n\t\tGRPC:          grpc.DefaultConfig(),\n\t\tHTML:          html.DefaultConfig(),\n\t\tHTTP:          http.DefaultConfig(),\n\t\tJSONRPC:       jsonrpc.DefaultConfig(),\n\t\tZeroMq:        zmq.DefaultConfig(),\n\t\tWalletManager: wltmgr.DefaultConfig(),\n\t}\n\n\treturn conf\n}\n\nfunc DefaultConfigMainnet() *Config {\n\tconf := defaultConfig()\n\n\tbootstrapNodes := make([]BootstrapInfo, 0)\n\tif err := json.Unmarshal(bootstrapInfoBytes, &bootstrapNodes); err != nil {\n\t\tpanic(err)\n\t}\n\n\tbootstrapAddrs := make([]string, 0, len(bootstrapNodes))\n\tfor _, node := range bootstrapNodes {\n\t\tbootstrapAddrs = append(bootstrapAddrs, node.Address)\n\t}\n\n\t// The first item in the banned list is for testing.\n\t// The address is: \"pc1p8slveave2zm9tgj7q260fgrdfu2ph8n7ezxhtt\"\n\t// The associated private key: \"SECRET1PP8SYQAH8JH8QLGEEX7L7T8WTU69K6T9AVSNMVCZ8DP6PPLWVYE3SVTHFR8\"\n\tbannedList := make([]string, 0)\n\tif err := json.Unmarshal(bannedAddrBytes, &bannedList); err != nil {\n\t\tpanic(err)\n\t}\n\n\tbannedAddrs := make(map[crypto.Address]bool)\n\tfor _, str := range bannedList {\n\t\taddr, err := crypto.AddressFromString(str)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tbannedAddrs[addr] = true\n\t}\n\n\tconf.Store.BannedAddrs = bannedAddrs\n\tconf.Network.MaxConns = 64\n\tconf.Network.EnableNATService = false\n\tconf.Network.EnableUPnP = false\n\tconf.Network.EnableRelay = true\n\tconf.Network.NetworkName = \"pactus\"\n\tconf.Network.DefaultPort = 21888\n\tconf.Network.DefaultBootstrapAddrStrings = bootstrapAddrs\n\tconf.GRPC.Enable = true\n\tconf.GRPC.Listen = \"127.0.0.1:50051\"\n\tconf.GRPC.BasicAuth = \"\"\n\tconf.HTML.Enable = false\n\tconf.HTML.Listen = \"127.0.0.1:80\"\n\tconf.HTTP.Enable = false\n\tconf.HTTP.Listen = \"127.0.0.1:8080\"\n\tconf.HTTP.BasePath = \"/http\"\n\tconf.JSONRPC.Enable = false\n\tconf.JSONRPC.Listen = \"127.0.0.1:8545\"\n\tconf.JSONRPC.Origins = []string{}\n\tconf.HTML.EnablePprof = false\n\n\treturn conf\n}\n\nfunc DefaultConfigTestnet() *Config {\n\tconf := defaultConfig()\n\tconf.Network.DefaultBootstrapAddrStrings = []string{\n\t\t\"/dns/testnet1.pactus.org/tcp/21777/p2p/12D3KooWR7ZB3nGih1Fz7Yg83Zap8Cpxr73T6PPihBsEpTG5BZyk\",\n\t\t\"/dns/testnet2.pactus.org/tcp/21777/p2p/12D3KooWQcDuFDMGsw6gG7oNFw7C4x7ozoMu69J7WEAojKCaNzji\",\n\t\t\"/dns/testnet3.pactus.org/tcp/21777/p2p/12D3KooWLsAPSJ4xowd9thGbPmbweBT6sg3nEiPjDJccaWZacsUR\",\n\t\t\"/dns/testnet4.pactus.org/tcp/21777/p2p/12D3KooWJKYdHzWZGibnj74NSSgKRu4Ez6MijDWMfLfXxeL4un6v\",\n\t\t\"/ip4/65.108.211.187/tcp/21777/p2p/12D3KooWB42BLfzxSF5SMhSTSEyfJ6yhSM8togLfExrRWFMJeb5u\",\n\t\t\"/ip4/103.27.206.208/tcp/21777/p2p/12D3KooWMTDwDTBMaf2Sem5tWRe1dB6PFY8LeqkZ2e5drrbbPTDn\", // andrut.pactus.testnet\n\t\t\"/ip4/65.108.142.81/tcp/21777/p2p/12D3KooWAdRga2NCbaPfVgSEzAAZW2psfJmPi3PFJzF81qbccJsR\",  // CherryValidator\n\t\t\"/ip4/95.217.89.202/tcp/21777/p2p/12D3KooWH3S9gMYybr1pd4K5o3CBLbZLQ1REKBsPWt6NWPi4bgPn\",  // CodeBlockLab\n\t\t\"/ip4/188.213.198.83/tcp/21777/p2p/12D3KooWJ5kSyD3VQb1ewhgRcmAPPg2zus1rYPbgnBMMGBtC9pr5\",\n\t}\n\tconf.Network.MaxConns = 64\n\tconf.Network.EnableNATService = false\n\tconf.Network.EnableUPnP = false\n\tconf.Network.EnableRelay = true\n\tconf.Network.NetworkName = \"pactus-testnet\"\n\tconf.Network.DefaultPort = 21777\n\tconf.GRPC.Enable = true\n\tconf.GRPC.Listen = \"[::]:50052\"\n\tconf.HTML.Enable = false\n\tconf.HTML.Listen = \"[::]:80\"\n\tconf.HTTP.Enable = true\n\tconf.HTTP.Listen = \"[::]:8080\"\n\tconf.HTTP.BasePath = \"/http\"\n\tconf.JSONRPC.Enable = true\n\tconf.JSONRPC.Listen = \"[::]:8545\"\n\tconf.JSONRPC.Origins = []string{}\n\tconf.HTML.EnablePprof = false\n\n\treturn conf\n}\n\nfunc DefaultConfigLocalnet() *Config {\n\tconf := defaultConfig()\n\tconf.Network.EnableRelay = false\n\tconf.Network.EnableNATService = false\n\tconf.Network.EnableUPnP = false\n\tconf.Network.BootstrapAddrStrings = []string{}\n\tconf.Network.MaxConns = 16\n\tconf.Network.NetworkName = \"pactus-localnet\"\n\tconf.Network.DefaultPort = 0\n\tconf.Network.ForcePrivateNetwork = true\n\tconf.Network.EnableMdns = true\n\tconf.Sync.Moniker = \"localnet-1\"\n\tconf.GRPC.Enable = true\n\tconf.GRPC.EnableWallet = true\n\tconf.GRPC.Listen = \"[::]:50052\"\n\tconf.HTML.Enable = true\n\tconf.HTML.Listen = \"[::]:0\"\n\tconf.HTML.EnablePprof = true\n\tconf.HTTP.Enable = true\n\tconf.HTTP.Listen = \"[::]:8080\"\n\tconf.JSONRPC.Enable = true\n\tconf.JSONRPC.Listen = \"[::]:8545\"\n\tconf.JSONRPC.Origins = []string{\"*\"}\n\tconf.ZeroMq.ZmqPubBlockInfo = \"tcp://127.0.0.1:28332\"\n\tconf.ZeroMq.ZmqPubTxInfo = \"tcp://127.0.0.1:28333\"\n\tconf.ZeroMq.ZmqPubRawBlock = \"tcp://127.0.0.1:28334\"\n\tconf.ZeroMq.ZmqPubRawTx = \"tcp://127.0.0.1:28335\"\n\tconf.ZeroMq.ZmqPubHWM = 1000\n\n\treturn conf\n}\n\nfunc SaveMainnetConfig(path string) error {\n\tconf := string(exampleConfigBytes)\n\n\treturn util.WriteFile(path, []byte(conf))\n}\n\nfunc (conf *Config) Save(path string) error {\n\treturn util.WriteFile(path, conf.toTOML())\n}\n\nfunc (conf *Config) toTOML() []byte {\n\tbuf := new(bytes.Buffer)\n\tencoder := toml.NewEncoder(buf)\n\tencoder.SetIndentTables(true)\n\terr := encoder.Encode(conf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn buf.Bytes()\n}\n\nfunc LoadFromFile(file string, strict bool, defaultConfig *Config) (*Config, error) {\n\tdata, err := os.ReadFile(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconf := defaultConfig\n\tbuf := bytes.NewBuffer(data)\n\tdecoder := toml.NewDecoder(buf)\n\tif strict {\n\t\tdecoder.DisallowUnknownFields()\n\t}\n\tif err := decoder.Decode(conf); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn conf, nil\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif err := conf.Node.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.Store.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.TxPool.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.Consensus.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.ConsensusV2.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.Network.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.Logger.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.Sync.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.JSONRPC.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.HTTP.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.GRPC.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.ZeroMq.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif err := conf.WalletManager.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\n\treturn conf.HTTP.BasicCheck()\n}\n\nfunc GetBootstrapNodes() ([]BootstrapInfo, error) {\n\tbootstrapNodes := make([]BootstrapInfo, 0)\n\tif err := json.Unmarshal(bootstrapInfoBytes, &bootstrapNodes); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn bootstrapNodes, nil\n}\n"
  },
  {
    "path": "config/config_test.go",
    "content": "package config\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSaveMainnetConfig(t *testing.T) {\n\tpath := util.TempFilePath()\n\trequire.NoError(t, SaveMainnetConfig(path))\n\n\tdefConf := DefaultConfigMainnet()\n\tconf, err := LoadFromFile(path, true, defConf)\n\trequire.NoError(t, err)\n\n\trequire.NoError(t, conf.BasicCheck())\n\tassert.Equal(t, conf, DefaultConfigMainnet())\n\n\tconfData, _ := util.ReadFile(path)\n\texampleData, _ := util.ReadFile(\"example_config.toml\")\n\tassert.Equal(t, exampleData, confData)\n}\n\nfunc TestSaveTestnetConfig(t *testing.T) {\n\tcrypto.ToTestnetHRP()\n\tdefer crypto.ToMainnetHRP()\n\n\tpath := util.TempFilePath()\n\tdefConf := DefaultConfigTestnet()\n\trequire.NoError(t, defConf.Save(path))\n\n\tconf, err := LoadFromFile(path, true, defConf)\n\trequire.NoError(t, err)\n\tassert.Equal(t, conf, DefaultConfigTestnet())\n\n\trequire.NoError(t, conf.BasicCheck())\n}\n\nfunc TestDefaultConfig(t *testing.T) {\n\tconf := defaultConfig()\n\n\trequire.NoError(t, conf.BasicCheck())\n\tassert.Empty(t, conf.Network.ListenAddrStrings)\n\tassert.Empty(t, conf.Network.NetworkName)\n\tassert.Empty(t, conf.Network.DefaultPort)\n\n\tassert.False(t, conf.GRPC.Enable)\n\tassert.False(t, conf.HTML.Enable)\n\tassert.False(t, conf.HTTP.Enable)\n\tassert.False(t, conf.JSONRPC.Enable)\n\n\tassert.Empty(t, conf.GRPC.Listen)\n\tassert.Empty(t, conf.HTML.Listen)\n\tassert.Empty(t, conf.HTTP.Listen)\n\tassert.Empty(t, conf.JSONRPC.Listen)\n}\n\nfunc TestMainnetConfig(t *testing.T) {\n\tconf := DefaultConfigMainnet()\n\n\trequire.NoError(t, conf.BasicCheck())\n\tassert.Empty(t, conf.Network.ListenAddrStrings)\n\tassert.Equal(t, \"pactus\", conf.Network.NetworkName)\n\tassert.Equal(t, 21888, conf.Network.DefaultPort)\n\n\tassert.True(t, conf.GRPC.Enable)\n\tassert.False(t, conf.HTML.Enable)\n\tassert.False(t, conf.HTTP.Enable)\n\tassert.False(t, conf.JSONRPC.Enable)\n\n\tassert.Equal(t, \"127.0.0.1:50051\", conf.GRPC.Listen)\n\tassert.Equal(t, \"127.0.0.1:80\", conf.HTML.Listen)\n\tassert.Equal(t, \"127.0.0.1:8080\", conf.HTTP.Listen)\n\tassert.Equal(t, \"127.0.0.1:8545\", conf.JSONRPC.Listen)\n}\n\nfunc TestTestnetConfig(t *testing.T) {\n\tcrypto.ToTestnetHRP()\n\tdefer crypto.ToMainnetHRP()\n\n\tconf := DefaultConfigTestnet()\n\n\trequire.NoError(t, conf.BasicCheck())\n\tassert.Empty(t, conf.Network.ListenAddrStrings)\n\tassert.Equal(t, \"pactus-testnet\", conf.Network.NetworkName)\n\tassert.Equal(t, 21777, conf.Network.DefaultPort)\n\n\tassert.True(t, conf.GRPC.Enable)\n\tassert.False(t, conf.HTML.Enable)\n\tassert.True(t, conf.HTTP.Enable)\n\tassert.True(t, conf.JSONRPC.Enable)\n\n\tassert.Equal(t, \"[::]:50052\", conf.GRPC.Listen)\n\tassert.Equal(t, \"[::]:80\", conf.HTML.Listen)\n\tassert.Equal(t, \"[::]:8080\", conf.HTTP.Listen)\n\tassert.Equal(t, \"[::]:8545\", conf.JSONRPC.Listen)\n}\n\nfunc TestLocalnetConfig(t *testing.T) {\n\tconf := DefaultConfigLocalnet()\n\n\trequire.NoError(t, conf.BasicCheck())\n\tassert.Empty(t, conf.Network.ListenAddrStrings)\n\tassert.Equal(t, \"pactus-localnet\", conf.Network.NetworkName)\n\tassert.Equal(t, 0, conf.Network.DefaultPort)\n\n\tassert.True(t, conf.GRPC.Enable)\n\tassert.True(t, conf.HTML.Enable)\n\tassert.True(t, conf.HTTP.Enable)\n\tassert.True(t, conf.JSONRPC.Enable)\n\n\tassert.Equal(t, \"[::]:50052\", conf.GRPC.Listen)\n\tassert.Equal(t, \"[::]:0\", conf.HTML.Listen)\n\tassert.Equal(t, \"[::]:8080\", conf.HTTP.Listen)\n\tassert.Equal(t, \"[::]:8545\", conf.JSONRPC.Listen)\n}\n\nfunc TestLoadFromFile(t *testing.T) {\n\tpath := util.TempFilePath()\n\tdefConf := DefaultConfigMainnet()\n\n\t_, err := LoadFromFile(path, true, defConf)\n\trequire.Error(t, err, \"not exists\")\n\n\trequire.NoError(t, util.WriteFile(path, []byte(`foo = \"bar\"`)))\n\t_, err = LoadFromFile(path, true, defConf)\n\trequire.Error(t, err, \"unknown field\")\n\n\tconf, err := LoadFromFile(path, false, defConf)\n\trequire.NoError(t, err)\n\tassert.Equal(t, defConf, conf)\n}\n\nfunc TestExampleConfig(t *testing.T) {\n\tlines := strings.Split(string(exampleConfigBytes), \"\\n\")\n\texampleToml := \"\"\n\tfor _, line := range lines {\n\t\t//lint:ignore QF1001 Reason for ignoring (e.g., readability)\n\t\tif !strings.HasPrefix(line, \"# \") &&\n\t\t\t!strings.HasPrefix(line, \"###\") &&\n\t\t\t!strings.HasPrefix(line, \"  # \") &&\n\t\t\t!strings.HasPrefix(line, \"    # \") &&\n\t\t\t!strings.HasPrefix(line, \"      # \") {\n\t\t\texampleToml += line\n\t\t\texampleToml += \"\\n\"\n\t\t}\n\t}\n\n\tdefaultConf := DefaultConfigMainnet()\n\tdefaultToml := string(defaultConf.toTOML())\n\n\texampleToml = strings.ReplaceAll(exampleToml, \"\\r\\n\", \"\\n\") // For Windows\n\texampleToml = strings.ReplaceAll(exampleToml, \"\\n\\n\", \"\\n\")\n\tdefaultToml = strings.ReplaceAll(defaultToml, \"\\n\\n\", \"\\n\")\n\n\tdefaultToml = strings.TrimSpace(defaultToml)\n\texampleToml = strings.TrimSpace(exampleToml)\n\n\tassert.Equal(t, defaultToml, exampleToml)\n}\n\nfunc TestNodeConfigBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\trandValAddr := ts.RandValAddress()\n\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *NodeConfig)\n\t}{\n\t\t{\n\t\t\tname: \"Invalid reward addresses\",\n\t\t\texpectedErr: NodeConfigError{\n\t\t\t\tReason: \"invalid reward address: invalid bech32 string length 4\",\n\t\t\t},\n\t\t\tupdateFn: func(c *NodeConfig) {\n\t\t\t\tc.RewardAddresses = []string{\n\t\t\t\t\t\"abcd\",\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Validator address as reward address\",\n\t\t\texpectedErr: NodeConfigError{\n\t\t\t\tReason: \"reward address is not an account address: \" + randValAddr.String(),\n\t\t\t},\n\t\t\tupdateFn: func(c *NodeConfig) {\n\t\t\t\tc.RewardAddresses = []string{\n\t\t\t\t\trandValAddr.String(),\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Two rewards addresses\",\n\t\t\tupdateFn: func(c *NodeConfig) {\n\t\t\t\tc.RewardAddresses = []string{\n\t\t\t\t\tts.RandAccAddress().String(),\n\t\t\t\t\tts.RandAccAddress().String(),\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"No reward address\",\n\t\t\tupdateFn: func(c *NodeConfig) {\n\t\t\t\tc.RewardAddresses = []string{}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*NodeConfig) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultNodeConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, tt.expectedErr, err,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\",\n\t\t\t\t\tno, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestGetBootstrapNodes(t *testing.T) {\n\tnodes, err := GetBootstrapNodes()\n\trequire.NoError(t, err)\n\tassert.NotEmpty(t, nodes, \"Bootstrap nodes list should not be empty\")\n\n\t// Verify structure of bootstrap nodes\n\tfor _, node := range nodes {\n\t\tassert.NotEmpty(t, node.Address, \"Bootstrap node address should not be empty\")\n\t\t// Name, Email, Website might be empty for some nodes, but Address must exist\n\n\t\t// Verify address format (should be multiaddr format)\n\t\tassert.True(t,\n\t\t\tstrings.HasPrefix(node.Address, \"/dns/\") ||\n\t\t\t\tstrings.HasPrefix(node.Address, \"/ip4/\") ||\n\t\t\t\tstrings.HasPrefix(node.Address, \"/ip6/\"),\n\t\t\t\"Address should be in multiaddr format: %s\", node.Address)\n\t}\n\n\t// Check that official Pactus bootstrap nodes exist\n\tfoundPactusBootstrap := false\n\tfor _, node := range nodes {\n\t\tif node.Name == \"Pactus\" && strings.Contains(node.Address, \"bootstrap\") {\n\t\t\tfoundPactusBootstrap = true\n\t\t\tassert.Equal(t, \"info@pactus.org\", node.Email)\n\t\t\tassert.Equal(t, \"https://pactus.org\", node.Website)\n\n\t\t\tbreak\n\t\t}\n\t}\n\tassert.True(t, foundPactusBootstrap, \"Should contain at least one official Pactus bootstrap node\")\n}\n\nfunc TestBootstrapInfoStructure(t *testing.T) {\n\tnodes, err := GetBootstrapNodes()\n\trequire.NoError(t, err)\n\trequire.NotEmpty(t, nodes)\n\n\t// Verify that the first node has the expected field types\n\tfirstNode := nodes[0]\n\tassert.IsType(t, \"\", firstNode.Name)\n\tassert.IsType(t, \"\", firstNode.Email)\n\tassert.IsType(t, \"\", firstNode.Website)\n\tassert.IsType(t, \"\", firstNode.Address)\n}\n"
  },
  {
    "path": "config/errors.go",
    "content": "package config\n\n// NodeConfigError is returned when the config configuration is invalid.\ntype NodeConfigError struct {\n\tReason string\n}\n\nfunc (e NodeConfigError) Error() string {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "config/example_config.toml",
    "content": "### This configuration file specifies configurations for running a Pactus node.\n\n# `node` contains configuration options for the Pactus node.\n[node]\n\n  # `reward_addresses` specifies the addresses for collecting rewards.\n  # If empty, reward addresses will be obtained from the wallet.\n  # If it has only one address, it is used for all validators.\n  # Otherwise, the number of reward addresses should be the same as the number of validators.\n  reward_addresses = []\n\n# `store` contains configuration options for the store module, which manages storage and retrieval of blockchain data.\n[store]\n\n  # `path` specifies the directory where blockchain data will be stored.\n  # Default is 'data'.\n  path = 'data'\n\n  # `retention_days` this parameter indicates the number of days for which the node should keep or retain the blocks\n  # before pruning them. It is only applicable if the node is in Prune Mode.\n  # Default is `10` days.\n  retention_days = 10\n\n# `network` contains configuration options for the network module, which manages communication between nodes.\n[network]\n\n  # `network_key` specifies the private key filename to use for node authentication and encryption in the p2p protocol.\n  # Default is `'network_key'`.\n  network_key = 'network_key'\n\n  # `public_addr` is the address that is public and accessible to other nodes.\n  public_addr = ''\n\n  # `listen_addrs` specifies the addresses and ports where the node will listen for incoming connections from other nodes.\n  listen_addrs = []\n\n  # `bootstrap_addrs` is a list of peer addresses needed for peer discovery.\n  # These addresses are used by the Pactus node to discover and connect to other peers on the network.\n  bootstrap_addrs = []\n\n  # `max_connections` is the maximum number of connections that the Pactus node maintains.\n  # Default is `64`.\n  max_connections = 64\n\n  # `enable_udp` indicates whether the UDP transport protocol should be enabled or not.\n  # Enabling UDP can improve the network connectivity of the node, but it might also lead to many packet losses.\n  # Default is `false`.\n  enable_udp = false\n\n  # `enable_nat_service` provides a service to other peers for determining their reachability status.\n  # Default is `false`.\n  enable_nat_service = false\n\n  # `enable_upnp` will attempt to open a port in your network's firewall using UPnP.\n  # Default is `false`.\n  enable_upnp = false\n\n  # `enable_relay` indicates whether relay service should be enabled or not.\n  # Relay service is a transport protocol that routes traffic between two peers over a third-party “relay” peer.\n  # Default is `true`.\n  enable_relay = true\n\n  # `enable_relay_service` indicates whether relay service should be enabled or not.\n  # Relay service is a transport protocol that enables peers to discover each other on the peer-to-peer network.\n  # Default is `false`.\n  enable_relay_service = false\n\n  # `enable_mdns` indicates whether MDNS should be enabled or not.\n  # MDNS is a protocol to discover local peers quickly and efficiently.\n  # Default is `false`.\n  enable_mdns = false\n\n  # `enable_metrics` provides the network metrics for the Prometheus software.\n  # Default is `false`.\n  enable_metrics = false\n\n  # `force_private_network` forces the connection to nodes within a private network.\n  # A private network is a computer network that uses private addresses.\n  # Read more about private networks here: https://en.wikipedia.org/wiki/Private_network\n  # Default is `false`.\n  force_private_network = false\n\n# `sync` contains configuration of sync module.\n[sync]\n\n  # `moniker` is a custom human-readable name for this node.\n  moniker = ''\n\n  # `session_timeout` is a timeout for a download session to remain open.\n  # When a block download request is sent, this timer starts. If there is no activity from the target Node,\n  # the session will be closed after the timeout and try to get the block from another peer.\n  # Default is `'10s'`.\n  session_timeout = '10s'\n\n  # `sync.firewall` contains configuration options for the sync firewall.\n  [sync.firewall]\n    # `banned_nets` contains the list of IPs and subnets that should be banned.\n    # Any incoming and outgoing connections to banned addresses will be terminated.\n    banned_nets = []\n\n    # `rate_limit` contains the rate limit configurations for network topics.\n    # The rate limit specifies the number of messages per second that are allowed.\n    # If set to zero, it allows all requests without any limit.\n    [sync.firewall.rate_limit]\n\n      # `block_topic` specifies the rate limit for the block topic.\n      block_topic = 1\n\n      # `transaction_topic` specifies the rate limit for the transaction topic.\n      transaction_topic = 5\n\n      # `consensus_topic` specifies the rate limit for the consensus topic.\n      consensus_topic = 0\n\n# `tx_pool` contains configuration options for the transaction pool module.\n[tx_pool]\n\n  # `max_size` indicates the maximum number of unconfirmed transactions inside the pool.\n  # Default is `1000`.\n  max_size = 1000\n\n  # `tx_pool.fee` contains configuration to calculate the transaction fee.\n  [tx_pool.fee]\n\n    # The `fixed_fee` is a constant fee in PAC that applies to each transaction, regardless of its size or type.\n    # Default is `0.01` PAC.\n    fixed_fee = 0.01\n\n    # The `daily_limit` is the number of bytes an account can send each day without paying a fee.\n    # The `daily_limit` is part of the consumptional fee model.\n    # To understand how the consumptional fee model works, you can refer to\n    # PIP-31: Consumptional Fee Mode (https://pips.pactus.org/PIPs/pip-31)\n    # Default is `360` bytes.\n    daily_limit = 360\n\n    # The `unit_price` defines the fee per byte in PAC.\n    # The `unit_price` is part of the consumptional fee model.\n    # If it is zero, the consumptional fee will be ignored.\n    # To understand how the consumptional fee model works, you can refer to\n    # PIP-31: Consumptional Fee Mode (https://pips.pactus.org/PIPs/pip-31)\n    # Default is `0.0` PAC.\n    unit_price = 0.0\n\n# `logger` contains configuration options for the logger.\n[logger]\n  # `colorful` indicates whether log can be colorful or not.\n  # Default is `true`.\n  colorful = true\n\n  # `max_backups` is the maximum number of old log files to retain.\n  # Default is `0`.\n  max_backups = 0\n\n  # `rotate_log_after_days` is the maximum number of days to retain old log files.\n  # Default is `1`.\n  rotate_log_after_days = 1\n\n  # `compress` determines if the rotated log files should be compressed.\n  # Default is `true`.\n  compress = true\n\n  # `targets` determines where the logs will be shown, saved, or sent.\n  # Default is `['console', 'file']`.\n  targets = ['console', 'file']\n\n  # `logger.levels` contains the level of logger per module.\n  # Available log levels are:\n  #   'trace', 'debug', 'info', 'warn', and 'error'.\n  [logger.levels]\n    _consensus = 'warn'\n    _firewall = 'warn'\n    _grpc = 'info'\n    _html = 'info'\n    _http = 'info'\n    _jsonrpc = 'info'\n    _network = 'error'\n    _pool = 'error'\n    _state = 'info'\n    _sync = 'error'\n    _zmq = 'info'\n    default = 'info'\n\n# `grpc` contains configuration for the gRPC server.\n[grpc]\n\n  # `enable` indicates whether the gRPC service should be enabled.\n  # Default is `true`.\n  enable = true\n\n  # `enable_wallet` indicates whether the Wallet service should be enabled.\n  # Default is `false`.\n  enable_wallet = false\n\n  # `listen` is the address the gRPC server will listen on for incoming connections.\n  listen = '127.0.0.1:50051'\n\n  # `basic_auth` is the Basic Auth credential used to enhance gRPC security.\n  basic_auth = ''\n\n# `jsonrpc` contains configuration for the JSON-RPC server.\n[jsonrpc]\n\n  # `enable` indicates whether the JSON-RPC service should be enabled.\n  # Default is `false`.\n  enable = false\n\n  # `listen` is the address the JSON-RPC server will listen on for incoming connections.\n  listen = '127.0.0.1:8545'\n\n  # `origins` specifies the allowed CORS origins for the JSON-RPC server.\n  # This controls which domains can make requests to the JSON-RPC API from a browser.\n  # Only the specified origins will be allowed. If not set or left empty, CORS is disabled by default.\n  # Example: origins = [\"wallet.pactus.org\"]\n  origins = []\n\n# `http` contains configuration for the HTTP-API server.\n[http]\n\n  # `enable` indicates whether the HTTP-API should be enabled.\n  # Default is `false`.\n  enable = false\n\n  # `listen` is the address the HTTP-API server will listen on for incoming connections.\n  listen = '127.0.0.1:8080'\n\n  # `base_path` sets the URL prefix for all HTTP-API endpoints.\n  base_path = '/http'\n\n  # `enable_cors` indicates whether Cross-Origin Resource Sharing (CORS)\n  # should be enabled.\n  # Default is `false`.\n  enable_cors = false\n\n# `html` contains configuration for the HTML server.\n# HTML server is mostly used for debugging and testing purposes.\n[html]\n\n  # `enable` indicates whether HTML service should be enabled or not.\n  # Default is `false`.\n  enable = false\n\n  # `listen` is the address to listen for incoming connections for HTML server.\n  listen = '127.0.0.1:80'\n\n  # `enable_pprof` Enables Golang's pprof debugger for profiling CPU, memory, and goroutines,\n  # providing key performance insights. Be cautious as it exposes sensitive\n  # data, so enable only in secure environments with restricted access.\n  enable_pprof = false\n\n# ZeroMQ configuration.\n[zeromq]\n\n  # `zmqpubblockinfo` specifies the address for publishing block info notifications.\n  # Example: 'tcp://127.0.0.1:28332'\n  # Default is '', meaning the topic is disabled\n  zmqpubblockinfo = ''\n\n  # `zmqpubtxinfo` specifies the address for publishing transaction info notifications.\n  # Example: 'tcp://127.0.0.1:28332'\n  # Default is '', meaning the topic is disabled\n  zmqpubtxinfo = ''\n\n  # `zmqpubrawblock` specifies the address for publishing raw block notifications.\n  # Example: 'tcp://127.0.0.1:28332'\n  # Default is '', meaning the topic is disabled\n  zmqpubrawblock = ''\n\n  # `zmqpubrawtx` specifies the address for publishing raw transaction notifications.\n  # Example: 'tcp://127.0.0.1:28332'\n  # Default is '', meaning the topic is disabled\n  zmqpubrawtx = ''\n\n  # `zmqpubhwm` defines the High Watermark (HWM) for ZeroMQ message pipes.\n  # This parameter determines the maximum number of messages ZeroMQ can buffer before blocking the publishing of further messages.\n  # The watermark is applied uniformly to all active topics.\n  # Default is 1000\n  zmqpubhwm = 1000\n\n# `wallet` contains wallet storage options.\n[wallet]\n  # `lock_mode` controls how wallets behave when it opens.\n  # If true, wallets will be locked when it opens and won't allow other instances to open the same wallet.\n  # If false, wallets will not be locked when it opens and other instances can open the same wallet.\n  lock_mode = true\n"
  },
  {
    "path": "consensus/commit.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype commitState struct {\n\t*consensus\n}\n\nfunc (s *commitState) enter() {\n\ts.decide()\n}\n\nfunc (s *commitState) decide() {\n\troundProposal := s.log.RoundProposal(s.round)\n\tcertBlock := roundProposal.Block()\n\tprecommits := s.log.PrecommitVoteSet(s.round)\n\tvotes := precommits.BlockVotes(certBlock.Hash())\n\tcert := s.makeCertificate(votes)\n\terr := s.bcState.CommitBlock(certBlock, cert)\n\tif err != nil {\n\t\ts.logger.Error(\"committing block failed\", \"block\", certBlock, \"error\", err)\n\t} else {\n\t\ts.logger.Info(\"block committed, schedule new height\", \"hash\", certBlock.Hash())\n\t}\n\n\t// Now we can announce the committed block and certificate\n\ts.announceNewBlock(certBlock, cert, nil)\n\n\ts.enterNewState(s.newHeightState)\n}\n\nfunc (*commitState) onAddVote(_ *vote.Vote) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) onSetProposal(_ *proposal.Proposal) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) onTimeout(_ *ticker) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) name() string {\n\treturn \"commit\"\n}\n"
  },
  {
    "path": "consensus/config.go",
    "content": "package consensus\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types\"\n)\n\n// Config defines parameters for the legacy consensus algorithm.\ntype Config struct {\n\tChangeProposerTimeout    time.Duration `toml:\"-\"`\n\tChangeProposerDelta      time.Duration `toml:\"-\"`\n\tQueryVoteTimeout         time.Duration `toml:\"-\"`\n\tMinimumAvailabilityScore float64       `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tChangeProposerTimeout:    5 * time.Second,\n\t\tChangeProposerDelta:      5 * time.Second,\n\t\tQueryVoteTimeout:         5 * time.Second,\n\t\tMinimumAvailabilityScore: 0.666667,\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif conf.ChangeProposerTimeout <= 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"change proposer timeout must be greater than zero\",\n\t\t}\n\t}\n\tif conf.ChangeProposerDelta <= 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"change proposer delta must be greater than zero\",\n\t\t}\n\t}\n\tif conf.MinimumAvailabilityScore < 0 || conf.MinimumAvailabilityScore > 1 {\n\t\treturn ConfigError{\n\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (conf *Config) CalculateChangeProposerTimeout(round types.Round) time.Duration {\n\treturn conf.ChangeProposerTimeout +\n\t\tconf.ChangeProposerDelta*time.Duration(round)\n}\n"
  },
  {
    "path": "consensus/config_test.go",
    "content": "package consensus\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname: \"Invalid ChangeProposerDelta\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"change proposer delta must be greater than zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ChangeProposerDelta = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid ChangeProposerTimeout\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"change proposer timeout must be greater than zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ChangeProposerTimeout = -1 * time.Second\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid MinimumAvailabilityScore\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MinimumAvailabilityScore = 1.5\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid MinimumAvailabilityScore - Negative\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MinimumAvailabilityScore = -0.8\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, tt.expectedErr, err,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\", no, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestCalculateChangeProposerTimeout(t *testing.T) {\n\tc := DefaultConfig()\n\n\tassert.Equal(t, c.ChangeProposerTimeout, c.CalculateChangeProposerTimeout(0))\n\tassert.Equal(t, c.ChangeProposerTimeout+c.ChangeProposerDelta, c.CalculateChangeProposerTimeout(1))\n\tassert.Equal(t, c.ChangeProposerTimeout+(4*c.ChangeProposerDelta), c.CalculateChangeProposerTimeout(4))\n}\n"
  },
  {
    "path": "consensus/consensus.go",
    "content": "package consensus\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/consensus/log\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype broadcaster func(crypto.Address, message.Message)\n\ntype consensus struct {\n\tlk sync.RWMutex\n\n\tctx             context.Context\n\tconfig          *Config\n\tlogger          *logger.SubLogger\n\tlog             *log.Log\n\tvalidators      []*validator.Validator\n\tcpWeakValidity  *hash.Hash // The change proposer's weak validity that is a prepared block hash\n\tcpDecided       int\n\theight          types.Height\n\tround           types.Round\n\tcpRound         int16\n\tvalKey          *bls.ValidatorKey\n\trewardAddr      crypto.Address\n\tbcState         state.Facade // Blockchain state\n\tchangeProposer  *changeProposer\n\tnewHeightState  consState\n\tproposeState    consState\n\tprepareState    consState\n\tprecommitState  consState\n\tcommitState     consState\n\tcpPreVoteState  consState\n\tcpMainVoteState consState\n\tcpDecideState   consState\n\tcurrentState    consState\n\tbroadcaster     broadcaster\n\tmediator        mediator\n\tactive          bool\n}\n\nfunc NewConsensus(\n\tctx context.Context,\n\tconf *Config,\n\tbcState state.Facade,\n\tvalKey *bls.ValidatorKey,\n\trewardAddr crypto.Address,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n\tmediator mediator,\n) Consensus {\n\tbroadcaster := func(_ crypto.Address, msg message.Message) {\n\t\tbroadcastPipe.Send(msg)\n\t}\n\n\treturn makeConsensus(ctx, conf, bcState,\n\t\tvalKey, rewardAddr, broadcaster, mediator)\n}\n\nfunc makeConsensus(\n\tctx context.Context,\n\tconf *Config,\n\tbcState state.Facade,\n\tvalKey *bls.ValidatorKey,\n\trewardAddr crypto.Address,\n\tbroadcaster broadcaster,\n\tmediator mediator,\n) *consensus {\n\tcons := &consensus{\n\t\tctx:         ctx,\n\t\tconfig:      conf,\n\t\tbcState:     bcState,\n\t\tbroadcaster: broadcaster,\n\t\tvalKey:      valKey,\n\t}\n\n\t// Update height later, See enterNewHeight.\n\tcons.log = log.NewLog()\n\tcons.logger = logger.NewSubLogger(\"_consensus\", cons)\n\tcons.rewardAddr = rewardAddr\n\n\tcons.changeProposer = &changeProposer{cons}\n\tcons.newHeightState = &newHeightState{cons}\n\tcons.proposeState = &proposeState{cons}\n\tcons.prepareState = &prepareState{cons, false}\n\tcons.precommitState = &precommitState{cons, false}\n\tcons.commitState = &commitState{cons}\n\tcons.cpPreVoteState = &cpPreVoteState{cons.changeProposer}\n\tcons.cpMainVoteState = &cpMainVoteState{cons.changeProposer}\n\tcons.cpDecideState = &cpDecideState{cons.changeProposer}\n\tcons.currentState = cons.newHeightState\n\tcons.mediator = mediator\n\n\tcons.height = 0\n\tcons.round = 0\n\tcons.active = false\n\tcons.mediator = mediator\n\n\tmediator.Register(cons)\n\n\tlogger.Info(\"consensus instance created (Legacy)\",\n\t\t\"validator address\", valKey.Address().String(),\n\t\t\"reward address\", rewardAddr.String())\n\n\treturn cons\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (cs *consensus) LogString() string {\n\treturn fmt.Sprintf(\"{%s %d/%d/%s/%d}\",\n\t\tcs.valKey.Address(),\n\t\tcs.height, cs.round, cs.currentState.name(), cs.cpRound)\n}\n\nfunc (cs *consensus) ConsensusKey() *bls.PublicKey {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.valKey.PublicKey()\n}\n\nfunc (cs *consensus) HeightRound() (types.Height, types.Round) {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.height, cs.round\n}\n\nfunc (cs *consensus) HasVote(h hash.Hash) bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.log.HasVote(h)\n}\n\n// AllVotes returns all valid votes inside the consensus log up to and including\n// the current consensus round.\n// Valid votes from subsequent rounds are not included.\nfunc (cs *consensus) AllVotes() []*vote.Vote {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tvotes := []*vote.Vote{}\n\tfor r := types.Round(0); r <= cs.round; r++ {\n\t\tm := cs.log.RoundMessages(r)\n\t\tvotes = append(votes, m.AllVotes()...)\n\t}\n\n\treturn votes\n}\n\nfunc (cs *consensus) enterNewState(s consState) {\n\tcs.currentState = s\n\tcs.currentState.enter()\n}\n\nfunc (cs *consensus) MoveToNewHeight() {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tif cs.IsDeprecated() {\n\t\treturn\n\t}\n\n\tstateHeight := cs.bcState.LastBlockHeight()\n\tif cs.height != stateHeight+1 {\n\t\tcs.enterNewState(cs.newHeightState)\n\t}\n}\n\nfunc (cs *consensus) scheduleTimeout(duration time.Duration,\n\theight types.Height, round types.Round, target tickerTarget,\n) {\n\tcs.logger.Trace(\"new timer scheduled ⏱️\", \"duration\", duration, \"height\", height, \"round\", round, \"target\", target)\n\n\tticker := &ticker{duration, height, round, target}\n\tscheduler.After(duration).Do(cs.ctx, func(context.Context) {\n\t\tcs.handleTimeout(ticker)\n\t})\n}\n\nfunc (cs *consensus) handleTimeout(ticker *ticker) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tcs.logger.Trace(\"handle ticker\", \"ticker\", ticker)\n\n\t// Old tickers might be triggered now. Ignore them.\n\tif cs.height != ticker.Height || cs.round != ticker.Round {\n\t\tcs.logger.Trace(\"stale ticker\", \"ticker\", ticker)\n\n\t\treturn\n\t}\n\n\tcs.logger.Debug(\"timer expired\", \"ticker\", ticker)\n\tcs.currentState.onTimeout(ticker)\n}\n\nfunc (cs *consensus) SetProposal(prop *proposal.Proposal) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tif !cs.active {\n\t\treturn\n\t}\n\n\tif prop.Height() != cs.height {\n\t\treturn\n\t}\n\n\tif prop.Round() < cs.round {\n\t\tcs.logger.Debug(\"proposal for expired round\", \"proposal\", prop)\n\n\t\treturn\n\t}\n\n\tif err := prop.BasicCheck(); err != nil {\n\t\tcs.logger.Warn(\"invalid proposal\", \"proposal\", prop, \"error\", err)\n\n\t\treturn\n\t}\n\n\troundProposal := cs.log.RoundProposal(prop.Round())\n\tif roundProposal != nil {\n\t\tcs.logger.Trace(\"this round has proposal\", \"proposal\", prop)\n\n\t\treturn\n\t}\n\n\tif prop.Height() == cs.bcState.LastBlockHeight() {\n\t\t// A slow node might receive a proposal after committing the proposed block.\n\t\t// In this case, we accept the proposal and allow nodes to continue.\n\t\t// By doing so, we enable the validator to broadcast its votes and\n\t\t// prevent it from being marked as absent in the block certificate.\n\t\tcs.logger.Warn(\"block committed before receiving proposal\", \"proposal\", prop)\n\t\tif prop.Block().Hash() != cs.bcState.LastBlockHash() {\n\t\t\tcs.logger.Warn(\"proposal is not for the committed block\", \"proposal\", prop)\n\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tproposer := cs.proposer(prop.Round())\n\t\tif err := prop.Verify(proposer.PublicKey()); err != nil {\n\t\t\tcs.logger.Warn(\"proposal is invalid\", \"proposal\", prop, \"error\", err)\n\n\t\t\treturn\n\t\t}\n\n\t\tif err := cs.bcState.ValidateBlock(prop.Block(), prop.Round()); err != nil {\n\t\t\tcs.logger.Warn(\"invalid block\", \"proposal\", prop, \"error\", err)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\tcs.logger.Info(\"proposal set\", \"proposal\", prop)\n\tcs.log.SetRoundProposal(prop.Round(), prop)\n\n\tcs.currentState.onSetProposal(prop)\n}\n\nfunc (cs *consensus) AddVote(vte *vote.Vote) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tif !cs.active {\n\t\treturn\n\t}\n\n\tif vte.Height() != cs.height {\n\t\treturn\n\t}\n\n\tif vte.Round() < cs.round {\n\t\tcs.logger.Debug(\"vote for expired round\", \"vote\", vte)\n\n\t\treturn\n\t}\n\n\tif vte.Type() == vote.VoteTypeCPPreVote ||\n\t\tvte.Type() == vote.VoteTypeCPMainVote ||\n\t\tvte.Type() == vote.VoteTypeCPDecided {\n\t\terr := cs.changeProposer.checkJust(vte)\n\t\tif err != nil {\n\t\t\tcs.logger.Error(\"error on adding a cp vote\", \"vote\", vte, \"error\", err)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\tadded, err := cs.log.AddVote(vte)\n\tif err != nil {\n\t\tcs.logger.Error(\"error on adding a vote\", \"vote\", vte, \"error\", err)\n\t}\n\tif added {\n\t\tcs.logger.Info(\"new vote added\", \"vote\", vte)\n\n\t\tcs.currentState.onAddVote(vte)\n\t}\n}\n\nfunc (cs *consensus) proposer(round types.Round) *validator.Validator {\n\treturn cs.bcState.Proposer(round)\n}\n\nfunc (cs *consensus) IsProposer() bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.isProposer()\n}\n\nfunc (cs *consensus) isProposer() bool {\n\treturn cs.proposer(cs.round).Address() == cs.valKey.Address()\n}\n\nfunc (cs *consensus) signAddCPPreVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPPreVote(h, cs.height,\n\t\tcs.round, cpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensus) signAddCPMainVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPMainVote(h, cs.height, cs.round,\n\t\tcpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensus) signAddCPDecidedVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPDecidedVote(h, cs.height, cs.round,\n\t\tcpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensus) signAddPrepareVote(h hash.Hash) {\n\tv := vote.NewPrepareVote(h, cs.height, cs.round, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensus) signAddPrecommitVote(h hash.Hash) {\n\tv := vote.NewPrecommitVote(h, cs.height, cs.round, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensus) signAddVote(vte *vote.Vote) {\n\tsig := cs.valKey.Sign(vte.SignBytes())\n\tvte.SetSignature(sig)\n\tcs.logger.Info(\"our vote signed and broadcasted\", \"vote\", vte)\n\n\t_, err := cs.log.AddVote(vte)\n\tif err != nil {\n\t\tcs.logger.Warn(\"error on adding our vote\", \"error\", err, \"vote\", vte)\n\t}\n\tcs.broadcastVote(vte)\n}\n\n// queryProposal requests any missing proposal from other validators.\nfunc (cs *consensus) queryProposal() {\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewQueryProposalMessage(cs.height, cs.round, cs.valKey.Address()))\n}\n\n// queryVote requests any missing votes from other validators.\nfunc (cs *consensus) queryVote() {\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewQueryVoteMessage(cs.height, cs.round, cs.valKey.Address()))\n}\n\nfunc (cs *consensus) broadcastProposal(p *proposal.Proposal) {\n\tgo cs.mediator.OnPublishProposal(cs, p)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewProposalMessage(p))\n}\n\nfunc (cs *consensus) broadcastVote(v *vote.Vote) {\n\tgo cs.mediator.OnPublishVote(cs, v)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewVoteMessage(v))\n}\n\nfunc (cs *consensus) announceNewBlock(blk *block.Block,\n\tcert *certificate.Certificate, proof *certificate.Certificate,\n) {\n\tgo cs.mediator.OnBlockAnnounce(cs)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewBlockAnnounceMessage(blk, cert, proof))\n}\n\nfunc (cs *consensus) makeCertificate(votes map[crypto.Address]*vote.Vote,\n) *certificate.Certificate {\n\tcert := certificate.NewCertificate(cs.height, cs.round)\n\tcert.SetSignature(cs.signersInfo(votes))\n\n\treturn cert\n}\n\n// signersInfo processes a map of votes from validators and provides these information:\n// - A list of all validators' numbers eligible to vote in this step.\n// - A list of absentee validators' numbers who did not vote in this step.\n// - An aggregated signature generated from the signatures of participating validators.\nfunc (cs *consensus) signersInfo(votes map[crypto.Address]*vote.Vote) (\n\tcommitters, absentees []int32, aggSig *bls.Signature,\n) {\n\tvals := cs.validators\n\tcommitters = make([]int32, len(vals))\n\tabsentees = make([]int32, 0)\n\tsigs := make([]*bls.Signature, 0)\n\n\tfor i, val := range vals {\n\t\tvote := votes[val.Address()]\n\t\tif vote != nil {\n\t\t\tsigs = append(sigs, vote.Signature())\n\t\t} else {\n\t\t\tabsentees = append(absentees, val.Number())\n\t\t}\n\n\t\tcommitters[i] = val.Number()\n\t}\n\n\taggSig, _ = bls.SignatureAggregate(sigs...)\n\n\treturn committers, absentees, aggSig\n}\n\n// IsActive checks if the consensus is in an active state and participating in the consensus algorithm.\nfunc (cs *consensus) IsActive() bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tif cs.IsDeprecated() {\n\t\treturn false\n\t}\n\n\treturn cs.active\n}\n\nfunc (cs *consensus) Proposal() *proposal.Proposal {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.log.RoundProposal(cs.round)\n}\n\nfunc (cs *consensus) HandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tif !cs.active {\n\t\treturn nil\n\t}\n\n\tif height != cs.height {\n\t\treturn nil\n\t}\n\n\tif round != cs.round {\n\t\treturn nil\n\t}\n\n\tif cs.isProposer() {\n\t\treturn cs.log.RoundProposal(cs.round)\n\t}\n\n\tif cs.cpDecided == 0 {\n\t\t// It is decided not to change the proposer and the proposal is locked.\n\t\t// Locked proposals can be sent by all validators.\n\t\t// This helps prevent a situation where the proposer goes offline after proposing the block.\n\t\treturn cs.log.RoundProposal(cs.round)\n\t}\n\n\treturn nil\n}\n\n// TODO: Improve the performance?\nfunc (cs *consensus) HandleQueryVote(height types.Height, round types.Round) *vote.Vote {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tif !cs.active {\n\t\treturn nil\n\t}\n\n\tif height != cs.height {\n\t\treturn nil\n\t}\n\n\tvotes := []*vote.Vote{}\n\tswitch {\n\tcase round < cs.round:\n\t\t// Past round: Only broadcast cp:decided votes\n\t\tvs := cs.log.CPDecidedVoteSet(round)\n\t\tvotes = append(votes, vs.AllVotes()...)\n\n\tcase round == cs.round:\n\t\t// Current round\n\t\tm := cs.log.RoundMessages(round)\n\t\tvotes = append(votes, m.AllVotes()...)\n\n\tcase round > cs.round:\n\t\t// Future round\n\t}\n\n\tif len(votes) == 0 {\n\t\treturn nil\n\t}\n\n\treturn votes[util.RandInt32(int32(len(votes)))]\n}\n\nfunc (cs *consensus) startChangingProposer() {\n\t// If it is not decided yet.\n\t// TODO: can we remove this condition in new consensus model?\n\tif cs.cpDecided == -1 {\n\t\tcs.logger.Info(\"changing proposer started\",\n\t\t\t\"cpRound\", cs.cpRound, \"proposer\", cs.proposer(cs.round).Address())\n\t\tcs.enterNewState(cs.cpPreVoteState)\n\t}\n}\n\nfunc (*consensus) IsDeprecated() bool {\n\treturn false\n}\n"
  },
  {
    "path": "consensus/consensus_test.go",
    "content": "package consensus\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n\t\"golang.org/x/exp/slices\"\n)\n\nconst (\n\ttIndexX = 0\n\ttIndexY = 1\n\ttIndexB = 2\n\ttIndexP = 3\n)\n\ntype consMessage struct {\n\tsender  crypto.Address\n\tmessage message.Message\n}\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tvalKeys      []*bls.ValidatorKey\n\tmockTxPool   *txpool.MockTxPool\n\tgenDoc       *genesis.Genesis\n\tconsX        *consensus // Good peer\n\tconsY        *consensus // Good peer\n\tconsB        *consensus // Byzantine or offline peer\n\tconsP        *consensus // Partitioned peer\n\tconsMessages []consMessage\n}\n\nfunc testConfig() *Config {\n\treturn &Config{\n\t\tChangeProposerTimeout: 1 * time.Hour, // Disabling timers\n\t\tChangeProposerDelta:   1 * time.Hour, // Disabling timers\n\t\tQueryVoteTimeout:      1 * time.Hour, // Disabling timers\n\t}\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\treturn setupWithSeed(t, testsuite.GenerateSeed())\n}\n\nfunc setupWithSeed(t *testing.T, seed int64) *testData {\n\tt.Helper()\n\n\tfmt.Printf(\"=== test %s, seed: %d\\n\", t.Name(), seed)\n\n\tts := testsuite.NewTestSuiteFromSeed(t, seed)\n\n\t_, valKeys := ts.GenerateTestCommittee(4)\n\tmockTxPool := txpool.NewMockTxPool(ts.Ctrl)\n\tmockTxPool.EXPECT().SetNewSandboxAndRecheck(gomock.Any()).Return().AnyTimes()\n\tmockTxPool.EXPECT().PrepareBlockTransactions().Return(nil).AnyTimes()\n\tmockTxPool.EXPECT().HandleCommittedBlock(gomock.Any()).Return().AnyTimes()\n\n\tvals := make([]*validator.Validator, 4)\n\tfor i, key := range valKeys {\n\t\tval := validator.NewValidator(key.PublicKey(), int32(i))\n\t\tvals[i] = val\n\t}\n\n\tacc := account.NewAccount(0)\n\tacc.AddToBalance(21 * 1e14)\n\taccs := map[crypto.Address]*account.Account{crypto.TreasuryAddress: acc}\n\tparams := genesis.DefaultGenesisParams()\n\tparams.CommitteeSize = 4\n\n\t// To prevent triggering timers before starting the tests and\n\t// avoid double entries for new heights in some tests.\n\tgetTime := util.RoundNow(params.BlockIntervalInSecond).\n\t\tAdd(time.Duration(params.BlockIntervalInSecond) * time.Second)\n\tgenDoc := genesis.MakeGenesis(getTime, accs, vals, params)\n\teventPipe := pipeline.New[any](t.Context())\n\tstateX, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexX]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateY, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexY]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateB, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexB]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateP, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexP]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\n\tconsMessages := make([]consMessage, 0)\n\ttd := &testData{\n\t\tTestSuite:    ts,\n\t\tvalKeys:      valKeys,\n\t\tmockTxPool:   mockTxPool,\n\t\tgenDoc:       genDoc,\n\t\tconsMessages: consMessages,\n\t}\n\tbroadcasterFunc := func(sender crypto.Address, msg message.Message) {\n\t\ttd.consMessages = append(td.consMessages, consMessage{\n\t\t\tsender:  sender,\n\t\t\tmessage: msg,\n\t\t})\n\t}\n\ttd.consX = makeConsensus(t.Context(), testConfig(), stateX, valKeys[tIndexX],\n\t\tvalKeys[tIndexX].PublicKey().AccountAddress(), broadcasterFunc, NewConcreteMediator())\n\ttd.consY = makeConsensus(t.Context(), testConfig(), stateY, valKeys[tIndexY],\n\t\tvalKeys[tIndexY].PublicKey().AccountAddress(), broadcasterFunc, NewConcreteMediator())\n\ttd.consB = makeConsensus(t.Context(), testConfig(), stateB, valKeys[tIndexB],\n\t\tvalKeys[tIndexB].PublicKey().AccountAddress(), broadcasterFunc, NewConcreteMediator())\n\ttd.consP = makeConsensus(t.Context(), testConfig(), stateP, valKeys[tIndexP],\n\t\tvalKeys[tIndexP].PublicKey().AccountAddress(), broadcasterFunc, NewConcreteMediator())\n\n\t// -------------------------------\n\t// Better logging during testing\n\toverrideLogger := func(cons *consensus, name string) {\n\t\tcons.logger = logger.NewSubLogger(\"_consensus\",\n\t\t\ttestsuite.NewOverrideLogStringer(fmt.Sprintf(\"%s - %s: \", name, t.Name()), cons))\n\t}\n\n\toverrideLogger(td.consX, \"consX\")\n\toverrideLogger(td.consY, \"consY\")\n\toverrideLogger(td.consB, \"consB\")\n\toverrideLogger(td.consP, \"consP\")\n\t// -------------------------------\n\n\tlogger.Info(\"setup finished, start running the test\", \"name\", t.Name())\n\n\treturn td\n}\n\nfunc (td *testData) shouldPublishBlockAnnounce(t *testing.T, cons *consensus, hash hash.Hash) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.consMessages {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeBlockAnnounce {\n\t\t\tm := consMsg.message.(*message.BlockAnnounceMessage)\n\t\t\tassert.Equal(t, hash, m.Block.Hash())\n\n\t\t\treturn\n\t\t}\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish block announce for block hash %s\", hash))\n}\n\nfunc (td *testData) shouldPublishProposal(t *testing.T, cons *consensus,\n\theight types.Height, round types.Round,\n) *proposal.Proposal {\n\tt.Helper()\n\n\tfor _, consMsg := range td.consMessages {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeProposal {\n\t\t\tm := consMsg.message.(*message.ProposalMessage)\n\t\t\trequire.Equal(t, height, m.Proposal.Height())\n\t\t\trequire.Equal(t, round, m.Proposal.Round())\n\n\t\t\treturn m.Proposal\n\t\t}\n\t}\n\n\trequire.Fail(t, fmt.Sprintf(\"should publish proposal for height %d and round %d\", height, round))\n\n\treturn nil\n}\n\nfunc (td *testData) shouldNotPublish(t *testing.T, cons *consensus, msgType message.Type) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.consMessages {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == msgType {\n\t\t\trequire.Fail(t, fmt.Sprintf(\"should not publish %s\", msgType))\n\t\t}\n\t}\n}\n\nfunc (td *testData) shouldPublishQueryProposal(t *testing.T, cons *consensus, height types.Height) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.consMessages {\n\t\tif consMsg.sender != cons.valKey.Address() ||\n\t\t\tconsMsg.message.Type() != message.TypeQueryProposal {\n\t\t\tcontinue\n\t\t}\n\n\t\tm := consMsg.message.(*message.QueryProposalMessage)\n\t\tassert.Equal(t, m.Height, height)\n\t\tassert.Equal(t, m.Querier, cons.valKey.Address())\n\n\t\treturn\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish query proposal message for height %d\", height))\n}\n\nfunc (td *testData) shouldPublishQueryVote(t *testing.T, cons *consensus, height types.Height, round types.Round) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.consMessages {\n\t\tif consMsg.sender != cons.valKey.Address() ||\n\t\t\tconsMsg.message.Type() != message.TypeQueryVote {\n\t\t\tcontinue\n\t\t}\n\n\t\tm := consMsg.message.(*message.QueryVoteMessage)\n\t\tassert.Equal(t, m.Height, height)\n\t\tassert.Equal(t, m.Round, round)\n\t\tassert.Equal(t, m.Querier, cons.valKey.Address())\n\n\t\treturn\n\t}\n\n\trequire.Fail(t, fmt.Sprintf(\"should publish query vote message for height %d and round %d\", height, round))\n}\n\nfunc (td *testData) shouldPublishVote(t *testing.T, cons *consensus, voteType vote.Type, hash hash.Hash) *vote.Vote {\n\tt.Helper()\n\n\tfor i := len(td.consMessages) - 1; i >= 0; i-- {\n\t\tconsMsg := td.consMessages[i]\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeVote {\n\t\t\tm := consMsg.message.(*message.VoteMessage)\n\t\t\tif m.Vote.Type() == voteType &&\n\t\t\t\tm.Vote.BlockHash() == hash {\n\t\t\t\treturn m.Vote\n\t\t\t}\n\t\t}\n\t}\n\n\trequire.Fail(t, fmt.Sprintf(\"should publish %s vote for block hash %s\", voteType, hash))\n\n\treturn nil\n}\n\nfunc (*testData) checkHeightRound(t *testing.T, cons *consensus, height types.Height, round types.Round) {\n\tt.Helper()\n\n\th, r := cons.HeightRound()\n\tassert.Equal(t, h, height)\n\tassert.Equal(t, r, round)\n}\n\nfunc (td *testData) addPrepareVote(cons *consensus, blockHash hash.Hash, height types.Height, round types.Round,\n\tvalID int,\n) *vote.Vote {\n\tv := vote.NewPrepareVote(blockHash, height, round, td.valKeys[valID].Address())\n\n\treturn td.addVote(cons, v, valID)\n}\n\nfunc (td *testData) addPrecommitVote(cons *consensus, blockHash hash.Hash, height types.Height, round types.Round,\n\tvalID int,\n) *vote.Vote {\n\tv := vote.NewPrecommitVote(blockHash, height, round, td.valKeys[valID].Address())\n\n\treturn td.addVote(cons, v, valID)\n}\n\nfunc (td *testData) addCPPreVote(cons *consensus, blockHash hash.Hash, height types.Height, round types.Round,\n\tcpVal vote.CPValue, just vote.Just, valID int,\n) {\n\tv := vote.NewCPPreVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\ttd.addVote(cons, v, valID)\n}\n\nfunc (td *testData) addCPMainVote(cons *consensus, blockHash hash.Hash, height types.Height, round types.Round,\n\tcpVal vote.CPValue, just vote.Just, valID int,\n) {\n\tv := vote.NewCPMainVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\ttd.addVote(cons, v, valID)\n}\n\nfunc (td *testData) addCPDecidedVote(cons *consensus, blockHash hash.Hash, height types.Height, round types.Round,\n\tcpVal vote.CPValue, just vote.Just, valID int,\n) {\n\tv := vote.NewCPDecidedVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\ttd.addVote(cons, v, valID)\n}\n\nfunc (td *testData) addVote(cons *consensus, v *vote.Vote, valID int) *vote.Vote {\n\ttd.HelperSignVote(td.valKeys[valID], v)\n\tcons.AddVote(v)\n\n\treturn v\n}\n\nfunc (*testData) newHeightTimeout(cons *consensus) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetNewHeight})\n\tcons.lk.Unlock()\n}\n\nfunc (*testData) queryProposalTimeout(cons *consensus) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetQueryProposal})\n\tcons.lk.Unlock()\n}\n\nfunc (*testData) changeProposerTimeout(cons *consensus) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetChangeProposer})\n\tcons.lk.Unlock()\n}\n\n// enterNewHeight helps tests to enter new height safely\n// without scheduling new height. It boosts the test speed.\nfunc (td *testData) enterNewHeight(cons *consensus) {\n\tcons.lk.Lock()\n\tcons.enterNewState(cons.newHeightState)\n\tcons.lk.Unlock()\n\n\ttd.newHeightTimeout(cons)\n}\n\n// enterNextRound helps tests to enter next round safely.\nfunc (*testData) enterNextRound(cons *consensus) {\n\tcons.lk.Lock()\n\tcons.round++\n\tcons.enterNewState(cons.proposeState)\n\tcons.lk.Unlock()\n}\n\nfunc (td *testData) commitBlockForAllStates(t *testing.T) (*block.Block, *certificate.Certificate) {\n\tt.Helper()\n\n\theight := td.consX.bcState.LastBlockHeight()\n\tvar err error\n\tprop := td.makeProposal(t, height+1, 0)\n\n\tcert := certificate.NewCertificate(height+1, 0)\n\tsignBytes := cert.SignBytesPrecommit(prop.Block().Hash())\n\tsig1 := td.consX.valKey.Sign(signBytes)\n\tsig2 := td.consY.valKey.Sign(signBytes)\n\tsig3 := td.consB.valKey.Sign(signBytes)\n\tsig4 := td.consP.valKey.Sign(signBytes)\n\n\tsig, _ := bls.SignatureAggregate(sig1, sig2, sig3, sig4)\n\tcert.SetSignature([]int32{tIndexX, tIndexY, tIndexB, tIndexP}, []int32{}, sig)\n\tblk := prop.Block()\n\n\terr = td.consX.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consY.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consB.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consP.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\n\treturn blk, cert\n}\n\n// makeProposal generates a signed and valid proposal for the given height and round.\n// If rewardAddr is provided, it will be used instead of the consensus instance's default reward address.\nfunc (td *testData) makeProposal(t *testing.T, height types.Height, round types.Round, rewardAddr ...crypto.Address,\n) *proposal.Proposal {\n\tt.Helper()\n\n\tvar cons *consensus\n\tswitch uint32(height%4) + uint32(round%4) {\n\tcase 1:\n\t\tcons = td.consX\n\tcase 2:\n\t\tcons = td.consY\n\tcase 3:\n\t\tcons = td.consB\n\tcase 4, 0:\n\t\tcons = td.consP\n\t}\n\n\t// Use provided reward address or fall back to consensus instance's default\n\taddr := cons.rewardAddr\n\tif len(rewardAddr) > 0 {\n\t\taddr = rewardAddr[0]\n\t}\n\n\tblk, err := cons.bcState.ProposeBlock(cons.valKey, addr)\n\trequire.NoError(t, err)\n\tp := proposal.NewProposal(height, round, blk)\n\ttd.HelperSignProposal(cons.valKey, p)\n\n\treturn p\n}\n\nfunc (td *testData) makeMainCertificate(t *testing.T,\n\theight types.Height, round types.Round, cpRound int16,\n) *certificate.Certificate {\n\tt.Helper()\n\n\t// === make valid certificate\n\tpreVoteCommitters := make([]int32, 0, len(td.consP.validators))\n\tpreVoteSigs := make([]*bls.Signature, 0, len(td.consP.validators))\n\tfor i, val := range td.consP.validators {\n\t\tpreVoteJust := &vote.JustInitYes{}\n\t\tpreVote := vote.NewCPPreVote(hash.UndefHash, height, round,\n\t\t\tcpRound, vote.CPValueYes, preVoteJust, val.Address())\n\t\tsbPreVote := preVote.SignBytes()\n\n\t\tpreVoteCommitters = append(preVoteCommitters, val.Number())\n\t\tpreVoteSigs = append(preVoteSigs, td.valKeys[i].Sign(sbPreVote))\n\t}\n\tpreVoteAggSig, _ := bls.SignatureAggregate(preVoteSigs...)\n\tcertPreVote := certificate.NewCertificate(height, round)\n\tcertPreVote.SetSignature(preVoteCommitters, []int32{}, preVoteAggSig)\n\n\tmainVoteCommitters := make([]int32, 0, len(td.consP.validators))\n\tmainVoteSigs := make([]*bls.Signature, 0, len(td.consP.validators))\n\tfor i, val := range td.consP.validators {\n\t\tmainVoteJust := &vote.JustMainVoteNoConflict{\n\t\t\tQCert: certPreVote,\n\t\t}\n\t\tmainVote := vote.NewCPMainVote(hash.UndefHash, height, round, cpRound, vote.CPValueYes, mainVoteJust, val.Address())\n\t\tsbMainVote := mainVote.SignBytes()\n\n\t\tmainVoteCommitters = append(mainVoteCommitters, val.Number())\n\t\tmainVoteSigs = append(mainVoteSigs, td.valKeys[i].Sign(sbMainVote))\n\t}\n\tmainVoteAggSig, _ := bls.SignatureAggregate(mainVoteSigs...)\n\tcertMainVote := certificate.NewCertificate(height, round)\n\tcertMainVote.SetSignature(mainVoteCommitters, []int32{}, mainVoteAggSig)\n\n\treturn certMainVote\n}\n\nfunc TestStart(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.consX.MoveToNewHeight()\n\ttd.checkHeightRound(t, td.consX, 1, 0)\n}\n\nfunc TestNotInCommittee(t *testing.T) {\n\ttd := setup(t)\n\n\tvalKey := td.RandValKey()\n\n\tstate := state.MockingState(td.TestSuite)\n\tpipe := pipeline.New[message.Message](t.Context())\n\tconsInt := NewConsensus(t.Context(), testConfig(), state, valKey,\n\t\tvalKey.Address(), pipe, NewConcreteMediator())\n\tcons := consInt.(*consensus)\n\n\ttd.enterNewHeight(cons)\n\ttd.newHeightTimeout(cons)\n\tassert.Equal(t, \"new-height\", cons.currentState.name())\n}\n\nfunc TestIsProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\tassert.False(t, td.consX.IsProposer())\n\tassert.True(t, td.consY.IsProposer())\n}\n\nfunc TestVoteWithInvalidHeight(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\ttd.enterNewHeight(td.consP)\n\n\tv1 := td.addPrepareVote(td.consP, td.RandHash(), 1, 0, tIndexX)\n\tv2 := td.addPrepareVote(td.consP, td.RandHash(), 2, 0, tIndexX)\n\tv3 := td.addPrepareVote(td.consP, td.RandHash(), 2, 0, tIndexY)\n\tv4 := td.addPrepareVote(td.consP, td.RandHash(), 3, 0, tIndexX)\n\n\trequire.False(t, td.consP.HasVote(v1.Hash()))\n\trequire.True(t, td.consP.HasVote(v2.Hash()))\n\trequire.True(t, td.consP.HasVote(v3.Hash()))\n\trequire.False(t, td.consP.HasVote(v4.Hash()))\n}\n\nfunc TestConsensusNormalCase(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consX)\n\ttd.checkHeightRound(t, td.consX, 2, 0)\n\n\tprop := td.makeProposal(t, 2, 0)\n\ttd.consX.SetProposal(prop)\n\n\ttd.addPrepareVote(td.consX, prop.Block().Hash(), 2, 0, tIndexY)\n\ttd.addPrepareVote(td.consX, prop.Block().Hash(), 2, 0, tIndexP)\n\ttd.shouldPublishVote(t, td.consX, vote.VoteTypePrepare, prop.Block().Hash())\n\n\ttd.addPrecommitVote(td.consX, prop.Block().Hash(), 2, 0, tIndexY)\n\ttd.addPrecommitVote(td.consX, prop.Block().Hash(), 2, 0, tIndexP)\n\ttd.shouldPublishVote(t, td.consX, vote.VoteTypePrecommit, prop.Block().Hash())\n\n\ttd.shouldPublishBlockAnnounce(t, td.consX, prop.Block().Hash())\n}\n\nfunc TestConsensusAddVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\tvote1 := td.addPrepareVote(td.consP, td.RandHash(), 1, 0, tIndexX)\n\tvote2 := td.addPrepareVote(td.consP, td.RandHash(), 1, 2, tIndexX)\n\tvote3 := td.addPrepareVote(td.consP, td.RandHash(), 1, 1, tIndexX)\n\tvote4 := td.addPrecommitVote(td.consP, td.RandHash(), 1, 1, tIndexX)\n\tvote5 := td.addPrepareVote(td.consP, td.RandHash(), 2, 0, tIndexX)\n\tvote6, _ := td.GenerateTestPrepareVote(1, 0)\n\ttd.consP.AddVote(vote6)\n\n\tassert.False(t, td.consP.HasVote(vote1.Hash())) // previous round\n\tassert.True(t, td.consP.HasVote(vote2.Hash()))  // next round\n\tassert.True(t, td.consP.HasVote(vote3.Hash()))\n\tassert.True(t, td.consP.HasVote(vote4.Hash()))\n\tassert.False(t, td.consP.HasVote(vote5.Hash())) // valid votes for the next height\n\tassert.False(t, td.consP.HasVote(vote6.Hash())) // invalid votes\n\n\tassert.Equal(t, []*vote.Vote{vote3, vote4}, td.consP.AllVotes())\n\tassert.NotContains(t, td.consP.AllVotes(), vote2)\n}\n\n// TestConsensusLateProposal tests the scenario where a slow node receives a proposal\n// after committing the block.\nfunc TestConsensusLateProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\trequire.NotNil(t, prop)\n\n\ttd.commitBlockForAllStates(t) // height 2\n\n\t// Partitioned node receives proposal now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrepare, prop.Block().Hash())\n}\n\n// TestSetProposalOnPrepare tests the scenario where a slow node receives a proposal\n// in prepare phase.\nfunc TestSetProposalOnPrepare(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\trequire.NotNil(t, prop)\n\n\t// The partitioned node receives all the votes first\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\t// Partitioned node receives proposal now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop.Block().Hash())\n}\n\n// TestSetProposalOnPrecommit tests the scenario where a slow node receives a proposal\n// in precommit phase.\nfunc TestSetProposalOnPrecommit(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\trequire.NotNil(t, prop)\n\n\t// The partitioned node receives all the votes first\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\t// Partitioned node receives proposal now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop.Block().Hash())\n\ttd.shouldPublishBlockAnnounce(t, td.consP, prop.Block().Hash())\n}\n\n// update me from TestHandleQueryVote: consensus:v1.\nfunc TestHandleQueryVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\tcpRound := int16(0)\n\theight := types.Height(1)\n\tassert.Nil(t, td.consP.HandleQueryVote(height, 0))\n\n\t// Add some votes for Round 0\n\ttd.addCPDecidedVote(td.consP, hash.UndefHash, height, 0, vote.CPValueYes,\n\t\t&vote.JustDecided{QCert: td.makeMainCertificate(t, height, 0, cpRound)}, tIndexY)\n\n\t// Add some votes for Round 1\n\ttd.enterNextRound(td.consP)\n\ttd.addPrepareVote(td.consP, td.RandHash(), height, 1, tIndexX)\n\ttd.addCPPreVote(td.consP, hash.UndefHash, height, 1, vote.CPValueYes,\n\t\t&vote.JustInitYes{}, tIndexY)\n\ttd.addCPDecidedVote(td.consP, hash.UndefHash, height, 1, vote.CPValueYes,\n\t\t&vote.JustDecided{QCert: td.makeMainCertificate(t, height, 1, cpRound)}, tIndexY)\n\n\t// Add some votes for Round 2\n\ttd.enterNextRound(td.consP)\n\ttd.addPrepareVote(td.consP, td.RandHash(), height, 2, tIndexY)\n\n\tt.Run(\"Query vote for round 0: should send the decided vote for the round 0\", func(t *testing.T) {\n\t\trndVote := td.consP.HandleQueryVote(height, 0)\n\t\tassert.Equal(t, vote.VoteTypeCPDecided, rndVote.Type())\n\t\tassert.Equal(t, height, rndVote.Height())\n\t\tassert.Equal(t, types.Round(0), rndVote.Round())\n\t})\n\n\tt.Run(\"Query vote for round 1: should send the decided vote for the round 1\", func(t *testing.T) {\n\t\trndVote := td.consP.HandleQueryVote(height, 1)\n\t\tassert.Equal(t, vote.VoteTypeCPDecided, rndVote.Type())\n\t\tassert.Equal(t, height, rndVote.Height())\n\t\tassert.Equal(t, types.Round(1), rndVote.Round())\n\t})\n\n\tt.Run(\"Query vote for round 2: should send the prepare vote for the round 2\", func(t *testing.T) {\n\t\trndVote := td.consP.HandleQueryVote(height, 2)\n\t\tassert.Equal(t, vote.VoteTypePrepare, rndVote.Type())\n\t\tassert.Equal(t, height, rndVote.Height())\n\t\tassert.Equal(t, types.Round(2), rndVote.Round())\n\t})\n\n\tt.Run(\"Query vote for round 3: should not send a vote for the next round\", func(t *testing.T) {\n\t\trndVote := td.consP.HandleQueryVote(height, 3)\n\t\tassert.Nil(t, rndVote)\n\t})\n\n\tt.Run(\"Query vote for height 2: should not send a vote for the next height\", func(t *testing.T) {\n\t\trndVote := td.consP.HandleQueryVote(height+1, 0)\n\t\tassert.Nil(t, rndVote)\n\t})\n}\n\nfunc TestHandleQueryProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\t// Round 1\n\ttd.enterNextRound(td.consX)\n\ttd.enterNextRound(td.consY) // consY is the proposer\n\n\tprop0 := td.consY.HandleQueryProposal(1, 0)\n\tassert.Nil(t, prop0, \"proposer should not send a proposal for the previous round\")\n\n\tprop1 := td.consX.HandleQueryProposal(1, 1)\n\tassert.Nil(t, prop1, \"non-proposer should not send a proposal\")\n\n\tprop2 := td.consY.HandleQueryProposal(1, 1)\n\tassert.NotNil(t, prop2, \"proposer should send a proposal\")\n\n\ttd.consX.cpDecided = 0\n\ttd.consX.SetProposal(td.consY.Proposal())\n\tprop3 := td.consX.HandleQueryProposal(1, 1)\n\tassert.NotNil(t, prop3, \"non-proposer should send a proposal on decided proposal\")\n\n\tprop4 := td.consX.HandleQueryProposal(2, 0)\n\tassert.Nil(t, prop4, \"should not have a proposal for the next height\")\n}\n\nfunc TestSetProposalFromPreviousRound(t *testing.T) {\n\ttd := setup(t)\n\n\tp := td.makeProposal(t, 1, 0)\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\t// It should ignore proposal for previous rounds\n\ttd.consP.SetProposal(p)\n\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.checkHeightRound(t, td.consP, 1, 1)\n}\n\nfunc TestSetProposalFromPreviousHeight(t *testing.T) {\n\ttd := setup(t)\n\n\tp := td.makeProposal(t, 1, 0)\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\ttd.consP.SetProposal(p)\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.checkHeightRound(t, td.consP, 2, 0)\n}\n\nfunc TestDuplicateProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\theight := types.Height(4)\n\tround := types.Round(0)\n\tprop1 := td.makeProposal(t, height, round)\n\n\tprop2 := td.makeProposal(t, height, round, td.RandAccAddress())\n\tassert.NotEqual(t, prop1.Hash(), prop2.Hash())\n\n\ttd.consX.SetProposal(prop1)\n\ttd.consX.SetProposal(prop2)\n\n\tassert.Equal(t, prop1.Hash(), td.consX.Proposal().Hash())\n}\n\nfunc TestNonActiveValidator(t *testing.T) {\n\ttd := setup(t)\n\n\tvalKey := td.RandValKey()\n\tpipe := pipeline.New[message.Message](t.Context())\n\tconsInt := NewConsensus(t.Context(), testConfig(), state.MockingState(td.TestSuite),\n\t\tvalKey, valKey.Address(), pipe, NewConcreteMediator())\n\tnonActiveCons := consInt.(*consensus)\n\n\tt.Run(\"non-active instances should be in new-height state\", func(t *testing.T) {\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\t// Double entry\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\tassert.False(t, nonActiveCons.IsActive())\n\t\tassert.Equal(t, \"new-height\", nonActiveCons.currentState.name())\n\t})\n\n\tt.Run(\"non-active instances should ignore proposals\", func(t *testing.T) {\n\t\tp := td.makeProposal(t, 1, 0)\n\t\tnonActiveCons.SetProposal(p)\n\n\t\tassert.Nil(t, nonActiveCons.Proposal())\n\t})\n\n\tt.Run(\"non-active instances should ignore votes\", func(t *testing.T) {\n\t\tv := td.addPrepareVote(nonActiveCons, td.RandHash(), 1, 0, tIndexX)\n\n\t\tassert.False(t, nonActiveCons.HasVote(v.Hash()))\n\t})\n\n\tt.Run(\"non-active instances should move to new height\", func(t *testing.T) {\n\t\tb1, cert1 := td.commitBlockForAllStates(t)\n\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\trequire.NoError(t, nonActiveCons.bcState.CommitBlock(b1, cert1))\n\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 2, 0)\n\t})\n}\n\nfunc TestVoteWithBigRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\tv := td.addPrepareVote(td.consX, td.RandHash(), 1, types.Round(util.MaxInt16), tIndexB)\n\tassert.True(t, td.consX.HasVote(v.Hash()))\n}\n\nfunc TestProposalWithBigRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\tp := td.makeProposal(t, 1, types.Round(util.MaxInt16))\n\ttd.consP.SetProposal(p)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\nfunc TestInvalidProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\tprop := td.makeProposal(t, 1, 0)\n\tprop.SetSignature(nil) // Make proposal invalid\n\ttd.consP.SetProposal(prop)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\nfunc TestCases(t *testing.T) {\n\ttests := []struct {\n\t\tseed        int64\n\t\tround       types.Round\n\t\tdescription string\n\t}{\n\t\t{1697898884837384019, 2, \"1/3+ cp:PRE-VOTE in Prepare step\"},\n\t\t{1734526933123806220, 1, \"1/3+ cp:PRE-VOTE in Precommit step\"},\n\t\t{1734526832618973590, 1, \"Conflicting cp:PRE-VOTE in cp_round=0\"},\n\t\t{1734527064850322674, 2, \"Conflicting cp:PRE-VOTE in cp_round=1\"},\n\t\t{1734526579569939721, 1, \"consP & consB: Change Proposer, consX & consY: Commit (2 block announces)\"},\n\t}\n\n\tfor no, tt := range tests {\n\t\ttd := setupWithSeed(t, tt.seed)\n\t\ttd.commitBlockForAllStates(t)\n\n\t\ttd.enterNewHeight(td.consX)\n\t\ttd.enterNewHeight(td.consY)\n\t\ttd.enterNewHeight(td.consB)\n\t\ttd.enterNewHeight(td.consP)\n\n\t\tcert, err := checkConsensus(td, 2, nil)\n\t\trequire.NoError(t, err,\n\t\t\t\"test %v failed: %s\", no+1, err)\n\t\trequire.Equal(t, tt.round, cert.Round(),\n\t\t\t\"test %v failed. round not matched (expected %d, got %d)\",\n\t\t\tno+1, tt.round, cert.Round())\n\t}\n}\n\nfunc TestFaulty(t *testing.T) {\n\tfor i := 0; i < 10; i++ {\n\t\ttd := setup(t)\n\t\ttd.commitBlockForAllStates(t)\n\n\t\ttd.enterNewHeight(td.consX)\n\t\ttd.enterNewHeight(td.consY)\n\t\ttd.enterNewHeight(td.consB)\n\t\ttd.enterNewHeight(td.consP)\n\n\t\t_, err := checkConsensus(td, 2, nil)\n\t\trequire.NoError(t, err)\n\t}\n}\n\n// We have four nodes: X, Y, B, and P, which:\n// - B is a Byzantine node\n// - X, Y, and P are honest nodes\n// - However, P is partitioned and perceives the network through B.\n//\n// At height H, B acts maliciously by double proposing:\n// sending one proposal to X and Y, and another proposal to P.\n//\n// Once the partition is healed, honest nodes should either reach consensus\n// on the first proposal or change the proposer.\n// This is due to the randomness of the binary agreement.\nfunc TestByzantine(t *testing.T) {\n\ttd := setup(t)\n\n\tfor i := 0; i < 6; i++ {\n\t\ttd.commitBlockForAllStates(t)\n\t}\n\n\theight := types.Height(7)\n\tround := types.Round(0)\n\tprop1 := td.makeProposal(t, height, round)\n\n\t// =================================\n\t// X, Y votes\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\ttd.consX.SetProposal(prop1)\n\ttd.consY.SetProposal(prop1)\n\n\tvoteX := td.shouldPublishVote(t, td.consX, vote.VoteTypePrepare, prop1.Block().Hash())\n\tvoteY := td.shouldPublishVote(t, td.consY, vote.VoteTypePrepare, prop1.Block().Hash())\n\n\t// Byzantine node doesn't broadcast the prepare vote\n\t// X and Y request to change proposer\n\n\ttd.changeProposerTimeout(td.consX)\n\ttd.changeProposerTimeout(td.consY)\n\n\ttd.shouldPublishVote(t, td.consX, vote.VoteTypeCPPreVote, hash.UndefHash)\n\ttd.shouldPublishVote(t, td.consY, vote.VoteTypeCPPreVote, hash.UndefHash)\n\n\t// X and Y are unable to progress\n\n\t// =================================\n\t// B votes\n\ttd.enterNewHeight(td.consB)\n\n\ttd.consB.SetProposal(prop1)\n\n\ttd.consB.AddVote(voteX)\n\ttd.consB.AddVote(voteY)\n\ttd.shouldPublishVote(t, td.consB, vote.VoteTypePrepare, prop1.Block().Hash())\n\ttd.shouldPublishVote(t, td.consB, vote.VoteTypePrecommit, prop1.Block().Hash())\n\n\ttd.changeProposerTimeout(td.consB)\n\n\t// B requests to NOT change the proposer\n\tbyzVote1 := td.shouldPublishVote(t, td.consB, vote.VoteTypeCPPreVote, prop1.Block().Hash())\n\n\t// =================================\n\t// P votes\n\t// Byzantine node create the second proposal and send it to the partitioned node P\n\tprop2 := td.makeProposal(t, height, round, td.RandAccAddress())\n\n\trequire.NotEqual(t, prop1.Block().Hash(), prop2.Block().Hash())\n\trequire.Equal(t, td.consB.valKey.Address(), prop1.Block().Header().ProposerAddress())\n\trequire.Equal(t, td.consB.valKey.Address(), prop2.Block().Header().ProposerAddress())\n\n\ttd.enterNewHeight(td.consP)\n\n\t// P receives the Seconds proposal\n\ttd.consP.SetProposal(prop2)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrepare, prop2.Block().Hash())\n\tbyzVote2 := td.addPrepareVote(td.consP, prop2.Block().Hash(), height, round, tIndexB)\n\n\t// Request to change proposer\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\n\t// P is unable to progress\n\n\t// =================================\n\n\ttd.checkHeightRound(t, td.consX, height, round)\n\ttd.checkHeightRound(t, td.consY, height, round)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\t// Let's make Byzantine node happy by removing his votes from the log\n\tfor j := len(td.consMessages) - 1; j >= 0; j-- {\n\t\tif td.consMessages[j].sender == td.consB.valKey.Address() {\n\t\t\ttd.consMessages = slices.Delete(td.consMessages, j, j+1)\n\t\t}\n\t}\n\n\t// =================================\n\t// Now, Partition heals\n\tfmt.Println(\"== Partition heals\")\n\tcert, err := checkConsensus(td, height, []*vote.Vote{byzVote1, byzVote2})\n\n\trequire.NoError(t, err)\n\trequire.Equal(t, height, cert.Height())\n\trequire.Contains(t, cert.Absentees(), int32(tIndexB))\n}\n\nfunc checkConsensus(td *testData, height types.Height, byzVotes []*vote.Vote) (\n\t*certificate.Certificate, error,\n) {\n\tinstances := []*consensus{td.consX, td.consY, td.consB, td.consP}\n\n\tif len(byzVotes) > 0 {\n\t\tfor _, v := range byzVotes {\n\t\t\ttd.consB.broadcastVote(v)\n\t\t}\n\n\t\t// remove byzantine node (Byzantine node goes offline)\n\t\tinstances = []*consensus{td.consX, td.consY, td.consP}\n\t}\n\n\t// 70% chance for the first block to be lost\n\tchangeProposerChance := 70\n\n\tblockAnnounces := map[crypto.Address]*message.BlockAnnounceMessage{}\n\tfor len(td.consMessages) > 0 {\n\t\trndIndex := td.RandIntMax(len(td.consMessages))\n\t\trndMsg := td.consMessages[rndIndex]\n\t\ttd.consMessages = slices.Delete(td.consMessages, rndIndex, rndIndex+1)\n\n\t\tswitch rndMsg.message.Type() {\n\t\tcase message.TypeVote:\n\t\t\tm := rndMsg.message.(*message.VoteMessage)\n\t\t\tif m.Vote.Height() == height {\n\t\t\t\tfor _, cons := range instances {\n\t\t\t\t\tcons.AddVote(m.Vote)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeProposal:\n\t\t\tm := rndMsg.message.(*message.ProposalMessage)\n\t\t\tif m.Proposal.Height() == height {\n\t\t\t\tfor _, cons := range instances {\n\t\t\t\t\tcons.SetProposal(m.Proposal)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeQueryProposal:\n\t\t\tm := rndMsg.message.(*message.QueryProposalMessage)\n\t\t\tif m.Height == height {\n\t\t\t\tfor _, cons := range instances {\n\t\t\t\t\tp := cons.Proposal()\n\t\t\t\t\tif p != nil {\n\t\t\t\t\t\ttd.consMessages = append(td.consMessages, consMessage{\n\t\t\t\t\t\t\tsender:  cons.valKey.Address(),\n\t\t\t\t\t\t\tmessage: message.NewProposalMessage(p),\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeBlockAnnounce:\n\t\t\tm := rndMsg.message.(*message.BlockAnnounceMessage)\n\t\t\tblockAnnounces[rndMsg.sender] = m\n\n\t\tcase\n\t\t\tmessage.TypeHello,\n\t\t\tmessage.TypeHelloAck,\n\t\t\tmessage.TypeTransaction,\n\t\t\tmessage.TypeQueryVote,\n\t\t\tmessage.TypeBlocksRequest,\n\t\t\tmessage.TypeBlocksResponse:\n\t\t\t//\n\t\t}\n\n\t\tfor _, cons := range instances {\n\t\t\trnd := td.RandIntMax(100)\n\t\t\tif rnd < changeProposerChance ||\n\t\t\t\tlen(td.consMessages) == 0 {\n\t\t\t\ttd.changeProposerTimeout(cons)\n\t\t\t}\n\t\t}\n\t\tchangeProposerChance -= 5\n\t}\n\n\t// Check if more than 1/3 of nodes has committed the same block\n\tif len(blockAnnounces) >= 2 {\n\t\tvar firstAnnounce *message.BlockAnnounceMessage\n\t\tfor _, msg := range blockAnnounces {\n\t\t\tif firstAnnounce == nil {\n\t\t\t\tfirstAnnounce = msg\n\t\t\t} else if msg.Block.Hash() != firstAnnounce.Block.Hash() {\n\t\t\t\treturn nil, fmt.Errorf(\"consensus violated, seed %v\", td.TestSuite.Seed)\n\t\t\t}\n\t\t}\n\n\t\t// everything is ok\n\t\treturn firstAnnounce.Certificate, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"unable to reach consensus, seed %v\", td.TestSuite.Seed)\n}\n"
  },
  {
    "path": "consensus/cp.go",
    "content": "package consensus\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype changeProposer struct {\n\t*consensus\n}\n\nfunc (*changeProposer) onSetProposal(_ *proposal.Proposal) {\n\t// Ignore proposal\n}\n\nfunc (cp *changeProposer) onTimeout(t *ticker) {\n\tif t.Target == tickerTargetQueryVote {\n\t\tcp.queryVote()\n\t\tcp.scheduleTimeout(t.Duration*2, cp.height, cp.round, tickerTargetQueryVote)\n\t}\n}\n\nfunc (*changeProposer) checkCPValue(vote *vote.Vote, allowedValues ...vote.CPValue) error {\n\tif slices.Contains(allowedValues, vote.CPValue()) {\n\t\treturn nil\n\t}\n\n\treturn InvalidJustificationError{\n\t\tJustType: vote.CPJust().Type(),\n\t\tReason:   fmt.Sprintf(\"invalid value: %v\", vote.CPValue()),\n\t}\n}\n\nfunc (cp *changeProposer) checkJustInitNo(just vote.Just, blockHash hash.Hash) error {\n\tj, ok := just.(*vote.JustInitNo)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\terr := j.QCert.ValidatePrepare(cp.validators, blockHash)\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: j.Type(),\n\t\t\tReason:   err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (*changeProposer) checkJustInitYes(just vote.Just) error {\n\t_, ok := just.(*vote.JustInitYes)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) checkJustPreVoteHard(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustPreVoteHard)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\terr := j.QCert.ValidateCPPreVote(cp.validators,\n\t\tblockHash, cpRound-1, byte(cpValue))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) checkJustPreVoteSoft(just vote.Just,\n\tblockHash hash.Hash, cpRound int16,\n) error {\n\tj, ok := just.(*vote.JustPreVoteSoft)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\terr := j.QCert.ValidateCPMainVote(cp.validators,\n\t\tblockHash, cpRound-1, byte(vote.CPValueAbstain))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) checkJustMainVoteNoConflict(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustMainVoteNoConflict)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\terr := j.QCert.ValidateCPPreVote(cp.validators,\n\t\tblockHash, cpRound, byte(cpValue))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: j.Type(),\n\t\t\tReason:   err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\n//nolint:exhaustive // refactor me; check just by just_type, not vote_type\nfunc (cp *changeProposer) checkJustMainVoteConflict(just vote.Just,\n\tblockHash hash.Hash, cpRound int16,\n) error {\n\tj, ok := just.(*vote.JustMainVoteConflict)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\tif cpRound == 0 {\n\t\terr := cp.checkJustInitNo(j.JustNo, blockHash)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\terr = cp.checkJustInitYes(j.JustYes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t}\n\n\t// Just0 can be for Zero or Abstain values.\n\tswitch j.JustNo.Type() {\n\tcase vote.JustTypePreVoteSoft:\n\t\terr := cp.checkJustPreVoteSoft(j.JustNo, blockHash, cpRound)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tcase vote.JustTypePreVoteHard:\n\t\terr := cp.checkJustPreVoteHard(j.JustNo, blockHash, cpRound, vote.CPValueNo)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tdefault:\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"unexpected justification: %s\", j.JustNo.Type()),\n\t\t}\n\t}\n\n\terr := cp.checkJustPreVoteHard(j.JustYes, hash.UndefHash, cpRound, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n//nolint:exhaustive // refactor me; check just by just_type, not vote_type\nfunc (cp *changeProposer) checkJustPreVote(vte *vote.Vote) error {\n\tjust := vte.CPJust()\n\tif vte.CPRound() == 0 {\n\t\tswitch just.Type() {\n\t\tcase vote.JustTypeInitNo:\n\t\t\terr := cp.checkCPValue(vte, vote.CPValueNo)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn cp.checkJustInitNo(just, vte.BlockHash())\n\n\t\tcase vote.JustTypeInitYes:\n\t\t\terr := cp.checkCPValue(vte, vote.CPValueYes)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn cp.checkJustInitYes(just)\n\t\tdefault:\n\t\t\treturn InvalidJustificationError{\n\t\t\t\tJustType: just.Type(),\n\t\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t\t}\n\t\t}\n\t} else {\n\t\tswitch just.Type() {\n\t\tcase vote.JustTypePreVoteSoft:\n\t\t\terr := cp.checkCPValue(vte, vote.CPValueNo, vote.CPValueYes)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn cp.checkJustPreVoteSoft(just, vte.BlockHash(), vte.CPRound())\n\n\t\tcase vote.JustTypePreVoteHard:\n\t\t\terr := cp.checkCPValue(vte, vote.CPValueNo, vote.CPValueYes)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn cp.checkJustPreVoteHard(just, vte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\t\tdefault:\n\t\t\treturn InvalidJustificationError{\n\t\t\t\tJustType: just.Type(),\n\t\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t\t}\n\t\t}\n\t}\n}\n\n//nolint:exhaustive // refactor me; check just by just_type, not vote_type\nfunc (cp *changeProposer) checkJustMainVote(vte *vote.Vote) error {\n\tjust := vte.CPJust()\n\tswitch just.Type() {\n\tcase vote.JustTypeMainVoteNoConflict:\n\t\terr := cp.checkCPValue(vte, vote.CPValueNo, vote.CPValueYes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn cp.checkJustMainVoteNoConflict(just, vte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypeMainVoteConflict:\n\t\terr := cp.checkCPValue(vte, vote.CPValueAbstain)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn cp.checkJustMainVoteConflict(just, vte.BlockHash(), vte.CPRound())\n\n\tdefault:\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid main-vote justification\",\n\t\t}\n\t}\n}\n\nfunc (cp *changeProposer) checkJustDecide(vte *vote.Vote) error {\n\terr := cp.checkCPValue(vte, vote.CPValueNo, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\tj, ok := vte.CPJust().(*vote.JustDecided)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: j.Type(),\n\t\t\tReason:   \"invalid just data\",\n\t\t}\n\t}\n\n\terr = j.QCert.ValidateCPMainVote(cp.validators,\n\t\tvte.BlockHash(), vte.CPRound(), byte(vte.CPValue()))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tJustType: j.Type(),\n\t\t\tReason:   err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\n//nolint:exhaustive // refactor me; check just by just_type, not vote_type\nfunc (cp *changeProposer) checkJust(vte *vote.Vote) error {\n\tswitch vte.Type() {\n\tcase vote.VoteTypeCPPreVote:\n\t\treturn cp.checkJustPreVote(vte)\n\tcase vote.VoteTypeCPMainVote:\n\t\treturn cp.checkJustMainVote(vte)\n\tcase vote.VoteTypeCPDecided:\n\t\treturn cp.checkJustDecide(vte)\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n}\n\nfunc (cp *changeProposer) cpStrongTermination(round types.Round, cpRound int16) {\n\tcpDecided := cp.log.CPDecidedVoteSet(round)\n\tif cpDecided.HasAnyVoteFor(cpRound, vote.CPValueNo) {\n\t\tcp.round = round\n\t\tcp.cpDecided = 0\n\n\t\troundProposal := cp.log.RoundProposal(round)\n\t\tif roundProposal == nil {\n\t\t\tcp.queryProposal()\n\t\t}\n\t\tcp.enterNewState(cp.prepareState)\n\t} else if cpDecided.HasAnyVoteFor(cpRound, vote.CPValueYes) {\n\t\tcp.round = round + 1\n\t\tcp.cpDecided = 1\n\n\t\tcp.enterNewState(cp.proposeState)\n\t}\n}\n"
  },
  {
    "path": "consensus/cp_decide.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpDecideState struct {\n\t*changeProposer\n}\n\nfunc (s *cpDecideState) enter() {\n\ts.decide()\n\ts.cpStrongTermination(s.round, s.cpRound)\n}\n\nfunc (s *cpDecideState) decide() {\n\tcpMainVotes := s.log.CPMainVoteVoteSet(s.round)\n\tif cpMainVotes.HasTwoThirdOfTotalPower(s.cpRound) {\n\t\tif cpMainVotes.HasQuorumVotesFor(s.cpRound, vote.CPValueYes) {\n\t\t\t// decided for yes, and proceeds to the next round\n\t\t\ts.logger.Info(\"binary agreement decided\", \"value\", 1, \"round\", s.cpRound)\n\n\t\t\tvotes := cpMainVotes.BinaryVotes(s.cpRound, vote.CPValueYes)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustDecided{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPDecidedVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\t\t\ts.cpStrongTermination(s.round, s.cpRound)\n\t\t} else if cpMainVotes.HasQuorumVotesFor(s.cpRound, vote.CPValueNo) {\n\t\t\t// decided for no and proceeds to the next round\n\t\t\ts.logger.Info(\"binary agreement decided\", \"value\", 0, \"round\", s.cpRound)\n\n\t\t\tvotes := cpMainVotes.BinaryVotes(s.cpRound, vote.CPValueNo)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustDecided{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPDecidedVote(*s.cpWeakValidity, s.cpRound, vote.CPValueNo, just)\n\t\t\ts.cpStrongTermination(s.round, s.cpRound)\n\t\t} else {\n\t\t\t// conflicting votes\n\t\t\ts.logger.Debug(\"conflicting main votes\", \"round\", s.cpRound)\n\t\t\ts.cpRound++\n\t\t\ts.enterNewState(s.cpPreVoteState)\n\t\t}\n\t}\n}\n\nfunc (s *cpDecideState) onAddVote(vte *vote.Vote) {\n\tif vte.Type() == vote.VoteTypeCPMainVote {\n\t\ts.decide()\n\t}\n\n\tif vte.IsCPVote() {\n\t\ts.cpStrongTermination(vte.Round(), vte.CPRound())\n\t}\n}\n\nfunc (*cpDecideState) name() string {\n\treturn \"cp:decide\"\n}\n"
  },
  {
    "path": "consensus/cp_mainvote.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpMainVoteState struct {\n\t*changeProposer\n}\n\nfunc (s *cpMainVoteState) enter() {\n\ts.decide()\n\ts.cpStrongTermination(s.round, s.cpRound)\n}\n\nfunc (s *cpMainVoteState) decide() {\n\ts.checkForWeakValidity()\n\ts.detectByzantineProposal()\n\n\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\tif cpPreVotes.HasTwoThirdOfTotalPower(s.cpRound) {\n\t\tif cpPreVotes.HasQuorumVotesFor(s.cpRound, vote.CPValueYes) {\n\t\t\ts.logger.Debug(\"cp: quorum for pre-votes\", \"v\", \"1\")\n\n\t\t\tvotes := cpPreVotes.BinaryVotes(s.cpRound, vote.CPValueYes)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustMainVoteNoConflict{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPMainVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\t\t\ts.enterNewState(s.cpDecideState)\n\t\t} else if cpPreVotes.HasQuorumVotesFor(s.cpRound, vote.CPValueNo) {\n\t\t\ts.logger.Debug(\"cp: quorum for pre-votes\", \"v\", \"0\")\n\n\t\t\tvotes := cpPreVotes.BinaryVotes(s.cpRound, vote.CPValueNo)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustMainVoteNoConflict{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPMainVote(*s.cpWeakValidity, s.cpRound, vote.CPValueNo, just)\n\t\t\ts.enterNewState(s.cpDecideState)\n\t\t} else {\n\t\t\ts.logger.Debug(\"cp: no-quorum for pre-votes\", \"v\", \"abstain\")\n\n\t\t\tvote0 := cpPreVotes.GetRandomVote(s.cpRound, vote.CPValueNo)\n\t\t\tvote1 := cpPreVotes.GetRandomVote(s.cpRound, vote.CPValueYes)\n\n\t\t\tjust := &vote.JustMainVoteConflict{\n\t\t\t\tJustNo:  vote0.CPJust(),\n\t\t\t\tJustYes: vote1.CPJust(),\n\t\t\t}\n\n\t\t\ts.signAddCPMainVote(*s.cpWeakValidity, s.cpRound, vote.CPValueAbstain, just)\n\t\t\ts.enterNewState(s.cpDecideState)\n\t\t}\n\t}\n}\n\nfunc (s *cpMainVoteState) checkForWeakValidity() {\n\tif s.cpWeakValidity == nil {\n\t\tpreVotes := s.log.CPPreVoteVoteSet(s.round)\n\t\tpreVotesZero := preVotes.BinaryVotes(s.cpRound, vote.CPValueNo)\n\n\t\tfor _, v := range preVotesZero {\n\t\t\tbh := v.BlockHash()\n\t\t\ts.cpWeakValidity = &bh\n\n\t\t\tbreak\n\t\t}\n\t}\n}\n\nfunc (s *cpMainVoteState) detectByzantineProposal() {\n\tif s.cpWeakValidity != nil {\n\t\troundProposal := s.log.RoundProposal(s.round)\n\n\t\tif roundProposal != nil &&\n\t\t\troundProposal.Block().Hash() != *s.cpWeakValidity {\n\t\t\ts.logger.Warn(\"double proposal detected\",\n\t\t\t\t\"prepared\", s.cpWeakValidity,\n\t\t\t\t\"roundProposal\", roundProposal.Block().Hash())\n\n\t\t\ts.log.SetRoundProposal(s.round, nil)\n\t\t\ts.queryProposal()\n\t\t}\n\t}\n}\n\nfunc (s *cpMainVoteState) onAddVote(vte *vote.Vote) {\n\tif vte.Type() == vote.VoteTypeCPPreVote {\n\t\ts.decide()\n\t}\n\n\tif vte.IsCPVote() {\n\t\ts.cpStrongTermination(vte.Round(), vte.CPRound())\n\t}\n}\n\nfunc (*cpMainVoteState) name() string {\n\treturn \"cp:main-vote\"\n}\n"
  },
  {
    "path": "consensus/cp_prevote.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpPreVoteState struct {\n\t*changeProposer\n}\n\nfunc (s *cpPreVoteState) enter() {\n\ts.decide()\n}\n\nfunc (s *cpPreVoteState) decide() {\n\tif s.cpRound == 0 {\n\t\t// broadcast the initial value\n\t\tprepares := s.log.PrepareVoteSet(s.round)\n\t\tpreparesQH := prepares.QuorumHash()\n\t\tif preparesQH != nil {\n\t\t\ts.cpWeakValidity = preparesQH\n\t\t\tcert := s.makeCertificate(prepares.BlockVotes(*preparesQH))\n\t\t\tjust := &vote.JustInitNo{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPPreVote(*s.cpWeakValidity, s.cpRound, 0, just)\n\t\t} else {\n\t\t\tjust := &vote.JustInitYes{}\n\t\t\ts.signAddCPPreVote(hash.UndefHash, s.cpRound, 1, just)\n\t\t}\n\t\ts.scheduleTimeout(s.config.QueryVoteTimeout, s.height, s.round, tickerTargetQueryVote)\n\t} else {\n\t\tcpMainVotes := s.log.CPMainVoteVoteSet(s.round)\n\t\tswitch {\n\t\tcase cpMainVotes.HasAnyVoteFor(s.cpRound-1, vote.CPValueYes):\n\t\t\ts.logger.Debug(\"cp: one main-vote for one\", \"b\", \"1\")\n\n\t\t\tvote1 := cpMainVotes.GetRandomVote(s.cpRound-1, vote.CPValueYes)\n\t\t\tjust1 := &vote.JustPreVoteHard{\n\t\t\t\tQCert: vote1.CPJust().(*vote.JustMainVoteNoConflict).QCert,\n\t\t\t}\n\t\t\ts.signAddCPPreVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just1)\n\n\t\tcase cpMainVotes.HasAnyVoteFor(s.cpRound-1, vote.CPValueNo):\n\t\t\ts.logger.Debug(\"cp: one main-vote for zero\", \"b\", \"0\")\n\n\t\t\tvote0 := cpMainVotes.GetRandomVote(s.cpRound-1, vote.CPValueNo)\n\t\t\tjust0 := &vote.JustPreVoteHard{\n\t\t\t\tQCert: vote0.CPJust().(*vote.JustMainVoteNoConflict).QCert,\n\t\t\t}\n\t\t\ts.signAddCPPreVote(*s.cpWeakValidity, s.cpRound, vote.CPValueNo, just0)\n\n\t\tcase cpMainVotes.HasAllVotesFor(s.cpRound-1, vote.CPValueAbstain):\n\t\t\ts.logger.Debug(\"cp: all main-votes are abstain\", \"b\", \"0 (biased)\")\n\n\t\t\tvotes := cpMainVotes.BinaryVotes(s.cpRound-1, vote.CPValueAbstain)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustPreVoteSoft{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPPreVote(*s.cpWeakValidity, s.cpRound, vote.CPValueNo, just)\n\n\t\tdefault:\n\t\t\ts.logger.Panic(\"protocol violated. We have combination of votes for one and zero\")\n\t\t}\n\t}\n\n\ts.enterNewState(s.cpMainVoteState)\n}\n\nfunc (*cpPreVoteState) onAddVote(_ *vote.Vote) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*cpPreVoteState) name() string {\n\treturn \"cp:pre-vote\"\n}\n"
  },
  {
    "path": "consensus/cp_test.go",
    "content": "package consensus\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestChangeProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n\nfunc TestSetProposalAfterChangeProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\n\tp := td.makeProposal(t, 2, 0)\n\ttd.consP.SetProposal(p)\n\tassert.NotNil(t, td.consP.Proposal())\n}\n\nfunc TestChangeProposerAgreementYes(t *testing.T) {\n\ttd := setup(t)\n\n\theight := types.Height(1)\n\tround := types.Round(0)\n\ttd.enterNewHeight(td.consP)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\ttd.addCPPreVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, preVote0.CPJust(), tIndexX)\n\ttd.addCPPreVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, preVote0.CPJust(), tIndexY)\n\n\tmainVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPMainVote, hash.UndefHash)\n\ttd.addCPMainVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, mainVote0.CPJust(), tIndexX)\n\ttd.addCPMainVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, mainVote0.CPJust(), tIndexY)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPDecided, hash.UndefHash)\n\ttd.checkHeightRound(t, td.consP, height, round+1)\n}\n\nfunc TestChangeProposerAgreementNo(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\theight := types.Height(2)\n\tround := types.Round(1)\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\tprop := td.makeProposal(t, height, round)\n\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, prop.Block().Hash())\n\ttd.addCPPreVote(td.consP, prop.Block().Hash(), height, round, vote.CPValueNo, preVote0.CPJust(), tIndexX)\n\ttd.addCPPreVote(td.consP, prop.Block().Hash(), height, round, vote.CPValueNo, preVote0.CPJust(), tIndexY)\n\n\tmainVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPMainVote, prop.Block().Hash())\n\ttd.addCPMainVote(td.consP, prop.Block().Hash(), height, round, vote.CPValueNo, mainVote0.CPJust(), tIndexX)\n\ttd.addCPMainVote(td.consP, prop.Block().Hash(), height, round, vote.CPValueNo, mainVote0.CPJust(), tIndexY)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPDecided, prop.Block().Hash())\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.checkHeightRound(t, td.consP, height, round)\n}\n\n// ConsP receives all `PRE-VOTE:no` votes before receiving a proposal or prepare votes.\n// It should vote `PRE-VOTES:yes` and `MAIN-VOTE:no`.\nfunc TestCrashOnTestnet(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\ttd.consP.MoveToNewHeight()\n\n\tblockHash := td.RandHash()\n\tvote1 := vote.NewPrepareVote(blockHash, height, round, td.consX.valKey.Address())\n\tvote2 := vote.NewPrepareVote(blockHash, height, round, td.consY.valKey.Address())\n\tvote3 := vote.NewPrepareVote(blockHash, height, round, td.consB.valKey.Address())\n\n\ttd.HelperSignVote(td.consX.valKey, vote1)\n\ttd.HelperSignVote(td.consY.valKey, vote2)\n\ttd.HelperSignVote(td.consB.valKey, vote3)\n\n\tvotes := map[crypto.Address]*vote.Vote{}\n\tvotes[vote1.Signer()] = vote1\n\tvotes[vote2.Signer()] = vote2\n\tvotes[vote3.Signer()] = vote3\n\n\tqCert := td.consP.makeCertificate(votes)\n\tjust0 := &vote.JustInitNo{QCert: qCert}\n\ttd.addCPPreVote(td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexX)\n\ttd.addCPPreVote(td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexY)\n\ttd.addCPPreVote(td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexB)\n\n\ttd.newHeightTimeout(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\tmainVote := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPMainVote, blockHash)\n\tassert.Equal(t, vote.CPValueYes, preVote.CPValue())\n\tassert.Equal(t, vote.CPValueNo, mainVote.CPValue())\n}\n\nfunc TestInvalidJustInitOne(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustInitYes{}\n\n\tt.Run(\"invalid value: no\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(hash.UndefHash, height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: no\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid block hash\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(hash.UndefHash, height, round, 1, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t})\n\t})\n\n\tt.Run(\"with main-vote justification\", func(t *testing.T) {\n\t\tinvJust := &vote.JustMainVoteNoConflict{}\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueYes, invJust, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: invJust.Type(),\n\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustInitZero(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustInitNo{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: yes\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: yes\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should be zero\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustPreVoteHard(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustPreVoteHard{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should not be zero\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustPreVoteSoft(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustPreVoteSoft{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should not be zero\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid pre-vote justification\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustMainVoteNoConflict(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustMainVoteNoConflict{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustMainVoteConflict(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\n\tt.Run(\"invalid value: no\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: &vote.JustInitNo{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t\tJustYes: &vote.JustInitYes{},\n\t\t}\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: no\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: yes\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: &vote.JustInitNo{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t\tJustYes: &vote.JustInitYes{},\n\t\t}\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: yes\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: unexpected justification (just0)\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: &vote.JustPreVoteSoft{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t\tJustYes: &vote.JustInitYes{},\n\t\t}\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: vote.JustTypePreVoteSoft,\n\t\t\tReason:   \"invalid just data\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: unexpected justification\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: &vote.JustInitNo{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t\tJustYes: &vote.JustPreVoteSoft{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t}\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"unexpected justification: JustInitNo\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tjust0 := &vote.JustInitNo{\n\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t}\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo:  just0,\n\t\t\tJustYes: &vote.JustInitYes{},\n\t\t}\n\t\tcpVote := vote.NewCPMainVote(td.RandHash(), height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just0.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just0.QCert.Committers()),\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tjust0 := &vote.JustPreVoteSoft{\n\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t}\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: just0,\n\t\t\tJustYes: &vote.JustPreVoteSoft{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t}\n\t\tcpVote := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(cpVote)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just0.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just0.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestInvalidJustDecided(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustDecided{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPDecidedVote(td.RandHash(), height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPDecidedVote(td.RandHash(), height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consX.changeProposer.checkJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tJustType: just.Type(),\n\t\t\tReason:   fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "consensus/errors.go",
    "content": "package consensus\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\n// InvalidJustificationError is returned when the justification for a change-proposer\n// vote is invalid.\ntype InvalidJustificationError struct {\n\tJustType vote.JustType\n\tReason   string\n}\n\nfunc (e InvalidJustificationError) Error() string {\n\treturn fmt.Sprintf(\"invalid justification: %s, reason: %s\",\n\t\te.JustType.String(), e.Reason)\n}\n\n// ConfigError is returned when the config is not valid with a descriptive Reason message.\ntype ConfigError struct {\n\tReason string\n}\n\nfunc (e ConfigError) Error() string {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "consensus/height.go",
    "content": "package consensus\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype newHeightState struct {\n\t*consensus\n}\n\nfunc (s *newHeightState) enter() {\n\ts.decide()\n}\n\nfunc (s *newHeightState) decide() {\n\tsateHeight := s.bcState.LastBlockHeight()\n\tvalidators := s.bcState.CommitteeValidators()\n\ts.log.MoveToNewHeight(validators)\n\n\ts.validators = validators\n\ts.height = sateHeight + 1\n\ts.round = 0\n\ts.active = s.bcState.IsInCommittee(s.valKey.Address())\n\ts.logger.Info(\"entering new height\", \"height\", s.height, \"active\", s.active)\n\n\tsleep := time.Until(s.bcState.LastBlockTime().Add(s.bcState.Params().BlockInterval()))\n\ts.scheduleTimeout(sleep, s.height, s.round, tickerTargetNewHeight)\n}\n\nfunc (s *newHeightState) onAddVote(_ *vote.Vote) {\n\tprepares := s.log.PrepareVoteSet(s.round)\n\tif prepares.HasQuorumHash() {\n\t\t// Add logic to detect when the network majority has voted for a block,\n\t\t// but the new height timer has not yet started. This situation can occur if the system\n\t\t// time is lagging behind the network time.\n\t\ts.logger.Warn(\"detected network majority voting for a block, but the new height timer has not started yet. \" +\n\t\t\t\"system time may be behind the network.\")\n\t\ts.enterNewState(s.proposeState)\n\t}\n}\n\nfunc (*newHeightState) onSetProposal(_ *proposal.Proposal) {\n\t// Ignore proposal\n}\n\nfunc (s *newHeightState) onTimeout(t *ticker) {\n\tif t.Target == tickerTargetNewHeight {\n\t\tif s.active {\n\t\t\ts.enterNewState(s.proposeState)\n\t\t}\n\t}\n}\n\nfunc (*newHeightState) name() string {\n\treturn \"new-height\"\n}\n"
  },
  {
    "path": "consensus/height_test.go",
    "content": "package consensus\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestNewHeightTimeout(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consY)\n\ttd.commitBlockForAllStates(t)\n\n\tconsState := &newHeightState{td.consY}\n\tconsState.enter()\n\n\t// Invalid target\n\tconsState.onTimeout(&ticker{Height: 2, Target: -1})\n\ttd.checkHeightRound(t, td.consY, 2, 0)\n\n\tconsState.onTimeout(&ticker{Height: 2, Target: tickerTargetNewHeight})\n\ttd.checkHeightRound(t, td.consY, 2, 0)\n\ttd.shouldPublishProposal(t, td.consY, 2, 0)\n}\n\nfunc TestNewHeightDoubleEntry(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.consX.MoveToNewHeight()\n\ttd.newHeightTimeout(td.consX)\n\n\t// double entry and timeout\n\ttd.consX.MoveToNewHeight()\n\n\ttd.checkHeightRound(t, td.consX, 2, 0)\n\tassert.True(t, td.consX.active)\n\tassert.NotEqual(t, \"new-height\", td.consX.currentState.name())\n}\n\nfunc TestNewHeightTimeBehindNetwork(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\ttd.consP.MoveToNewHeight()\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\n\ttd.consP.SetProposal(prop)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrepare, prop.Block().Hash())\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop.Block().Hash())\n}\n"
  },
  {
    "path": "consensus/interface.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Reader interface {\n\tConsensusKey() *bls.PublicKey\n\tAllVotes() []*vote.Vote\n\tHandleQueryVote(height types.Height, round types.Round) *vote.Vote\n\tHandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal\n\tProposal() *proposal.Proposal\n\tHasVote(h hash.Hash) bool\n\tHeightRound() (types.Height, types.Round)\n\tIsActive() bool\n\tIsProposer() bool\n}\n\ntype Consensus interface {\n\tReader\n\n\tMoveToNewHeight()\n\tAddVote(vote *vote.Vote)\n\tSetProposal(prop *proposal.Proposal)\n\tIsDeprecated() bool\n}\n"
  },
  {
    "path": "consensus/log/log.go",
    "content": "package log\n\nimport (\n\t\"github.com/pactus-project/pactus/consensus/voteset\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Log struct {\n\tvalidators    map[crypto.Address]*validator.Validator\n\ttotalPower    int64\n\troundMessages map[types.Round]*Messages\n}\n\nfunc NewLog() *Log {\n\treturn &Log{\n\t\troundMessages: make(map[types.Round]*Messages, 0),\n\t}\n}\n\nfunc (log *Log) RoundMessages(round types.Round) *Messages {\n\treturn log.mustGetRoundMessages(round)\n}\n\nfunc (log *Log) HasVote(h hash.Hash) bool {\n\tfor _, m := range log.roundMessages {\n\t\tif m.HasVote(h) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (log *Log) mustGetRoundMessages(round types.Round) *Messages {\n\tmsgs, ok := log.roundMessages[round]\n\tif !ok {\n\t\tmsgs = &Messages{\n\t\t\tprepareVotes:   voteset.NewPrepareVoteSet(round, log.totalPower, log.validators),\n\t\t\tprecommitVotes: voteset.NewPrecommitVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpPreVotes:     voteset.NewCPPreVoteVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpMainVotes:    voteset.NewCPMainVoteVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpDecidedVotes: voteset.NewCPDecidedVoteSet(round, log.totalPower, log.validators),\n\t\t}\n\t\tlog.roundMessages[round] = msgs\n\t}\n\n\treturn msgs\n}\n\nfunc (log *Log) AddVote(v *vote.Vote) (bool, error) {\n\tmsgs := log.mustGetRoundMessages(v.Round())\n\n\treturn msgs.addVote(v)\n}\n\nfunc (log *Log) PrepareVoteSet(round types.Round) *voteset.BlockVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.prepareVotes\n}\n\nfunc (log *Log) PrecommitVoteSet(round types.Round) *voteset.BlockVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.precommitVotes\n}\n\nfunc (log *Log) CPPreVoteVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpPreVotes\n}\n\nfunc (log *Log) CPMainVoteVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpMainVotes\n}\n\nfunc (log *Log) CPDecidedVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpDecidedVotes\n}\n\nfunc (log *Log) HasRoundProposal(round types.Round) bool {\n\treturn log.RoundProposal(round) != nil\n}\n\nfunc (log *Log) RoundProposal(round types.Round) *proposal.Proposal {\n\tm := log.RoundMessages(round)\n\tif m == nil {\n\t\treturn nil\n\t}\n\n\treturn m.proposal\n}\n\nfunc (log *Log) SetRoundProposal(round types.Round, prop *proposal.Proposal) {\n\tmsgs := log.mustGetRoundMessages(round)\n\tmsgs.proposal = prop\n}\n\nfunc (log *Log) MoveToNewHeight(validators []*validator.Validator) {\n\tlog.roundMessages = make(map[types.Round]*Messages)\n\tlog.validators = make(map[crypto.Address]*validator.Validator)\n\tlog.totalPower = 0\n\tfor _, val := range validators {\n\t\tlog.totalPower += val.Power()\n\t\tlog.validators[val.Address()] = val\n\t}\n}\n\nfunc (log *Log) CanVote(addr crypto.Address) bool {\n\tfor _, val := range log.validators {\n\t\tif val.Address() == addr {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "consensus/log/log_test.go",
    "content": "package log\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMustGetRound(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\tassert.NotNil(t, log.RoundMessages(ts.RandRound()))\n}\n\nfunc TestAddValidVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, valKeys := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\n\tprepares := log.PrepareVoteSet(round)\n\tprecommits := log.PrecommitVoteSet(round)\n\tpreVotes := log.CPPreVoteVoteSet(round)\n\tmainVotes := log.CPMainVoteVoteSet(round)\n\n\tvote1 := vote.NewPrepareVote(ts.RandHash(), height, round, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(ts.RandHash(), height, round, valKeys[0].Address())\n\tvote3 := vote.NewCPPreVote(ts.RandHash(), height, round, 0, vote.CPValueYes, &vote.JustInitYes{}, valKeys[0].Address())\n\tvote4 := vote.NewCPMainVote(ts.RandHash(), height, round, 0, vote.CPValueNo, &vote.JustInitYes{}, valKeys[0].Address())\n\n\tfor _, v := range []*vote.Vote{vote1, vote2, vote3, vote4} {\n\t\tts.HelperSignVote(valKeys[0], v)\n\n\t\tadded, err := log.AddVote(v)\n\t\trequire.NoError(t, err)\n\t\tassert.True(t, added)\n\t}\n\n\tassert.True(t, log.HasVote(vote1.Hash()))\n\tassert.True(t, log.HasVote(vote2.Hash()))\n\tassert.True(t, log.HasVote(vote3.Hash()))\n\tassert.True(t, log.HasVote(vote4.Hash()))\n\tassert.False(t, log.HasVote(ts.RandHash()))\n\n\tassert.Contains(t, prepares.AllVotes(), vote1)\n\tassert.Contains(t, precommits.AllVotes(), vote2)\n\tassert.Contains(t, preVotes.AllVotes(), vote3)\n\tassert.Contains(t, mainVotes.AllVotes(), vote4)\n}\n\nfunc TestAddInvalidVoteType(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\n\tdata, _ := hex.DecodeString(\"A7010F0218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06f607f6\")\n\tinvVote := new(vote.Vote)\n\terr := invVote.UnmarshalCBOR(data)\n\trequire.NoError(t, err)\n\n\tadded, err := log.AddVote(invVote)\n\trequire.ErrorContains(t, err, \"unexpected vote type: 15\")\n\tassert.False(t, added)\n\tassert.False(t, log.HasVote(invVote.Hash()))\n}\n\nfunc TestSetRoundProposal(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\n\tcmt, _ := ts.GenerateTestCommittee(7)\n\tprop := ts.GenerateTestProposal(height, round)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\tlog.SetRoundProposal(round, prop)\n\tassert.False(t, log.HasRoundProposal(round+1))\n\tassert.True(t, log.HasRoundProposal(round))\n\tassert.Nil(t, log.RoundProposal(round+1))\n\tassert.Equal(t, prop.Hash(), log.RoundProposal(round).Hash())\n}\n\nfunc TestCanVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, valKeys := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\n\taddr := ts.RandAccAddress()\n\tassert.True(t, log.CanVote(valKeys[0].Address()))\n\tassert.False(t, log.CanVote(addr))\n}\n"
  },
  {
    "path": "consensus/log/messages.go",
    "content": "package log\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/consensus/voteset\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Messages struct {\n\tprepareVotes   *voteset.BlockVoteSet  // Prepare votes\n\tprecommitVotes *voteset.BlockVoteSet  // Precommit votes\n\tcpPreVotes     *voteset.BinaryVoteSet // Change proposer Pre-votes\n\tcpMainVotes    *voteset.BinaryVoteSet // Change proposer Main-votes\n\tcpDecidedVotes *voteset.BinaryVoteSet // Change proposer Decided-votes\n\tproposal       *proposal.Proposal\n}\n\nfunc (m *Messages) addVote(vte *vote.Vote) (bool, error) {\n\tswitch vte.Type() {\n\tcase vote.VoteTypePrepare:\n\t\treturn m.prepareVotes.AddVote(vte)\n\tcase vote.VoteTypePrecommit:\n\t\treturn m.precommitVotes.AddVote(vte)\n\tcase vote.VoteTypeCPPreVote:\n\t\treturn m.cpPreVotes.AddVote(vte)\n\tcase vote.VoteTypeCPMainVote:\n\t\treturn m.cpMainVotes.AddVote(vte)\n\tcase vote.VoteTypeCPDecided:\n\t\treturn m.cpDecidedVotes.AddVote(vte)\n\t}\n\n\treturn false, fmt.Errorf(\"unexpected vote type: %v\", vte.Type())\n}\n\nfunc (m *Messages) HasVote(h hash.Hash) bool {\n\tvotes := m.AllVotes()\n\tfor _, v := range votes {\n\t\tif v.Hash() == h {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (m *Messages) AllVotes() []*vote.Vote {\n\tprepare := m.prepareVotes.AllVotes()\n\tprecommit := m.precommitVotes.AllVotes()\n\tcpPre := m.cpPreVotes.AllVotes()\n\tcpMain := m.cpMainVotes.AllVotes()\n\tcpDecided := m.cpDecidedVotes.AllVotes()\n\n\tvotes := make([]*vote.Vote, 0, len(prepare)+len(precommit)+len(cpPre)+len(cpMain)+len(cpDecided))\n\tvotes = append(votes, prepare...)\n\tvotes = append(votes, precommit...)\n\tvotes = append(votes, cpPre...)\n\tvotes = append(votes, cpMain...)\n\tvotes = append(votes, cpDecided...)\n\n\treturn votes\n}\n"
  },
  {
    "path": "consensus/manager/interface.go",
    "content": "package manager\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Reader interface {\n\tConsensusKey() *bls.PublicKey\n\tAllVotes() []*vote.Vote\n\tHandleQueryVote(height types.Height, round types.Round) *vote.Vote\n\tHandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal\n\tProposal() *proposal.Proposal\n\tHasVote(h hash.Hash) bool\n\tHeightRound() (types.Height, types.Round)\n\tIsActive() bool\n\tIsProposer() bool\n}\n\ntype Consensus interface {\n\tReader\n\n\tMoveToNewHeight()\n\tAddVote(vote *vote.Vote)\n\tSetProposal(prop *proposal.Proposal)\n\tIsDeprecated() bool\n}\n\ntype ManagerReader interface {\n\tInstances() []Reader\n\tHandleQueryVote(height types.Height, round types.Round) *vote.Vote\n\tHandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal\n\tProposal() *proposal.Proposal\n\tHeightRound() (types.Height, types.Round)\n\tHasActiveInstance() bool\n}\n\ntype Manager interface {\n\tManagerReader\n\n\tMoveToNewHeight()\n\tAddVote(vote *vote.Vote)\n\tSetProposal(prop *proposal.Proposal)\n\tIsDeprecated() bool\n}\n"
  },
  {
    "path": "consensus/manager/manager.go",
    "content": "package manager\n\nimport (\n\t\"context\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/consensus\"\n\t\"github.com/pactus-project/pactus/consensusv2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"golang.org/x/exp/slices\"\n)\n\ntype manager struct {\n\tinstances []Consensus\n\n\t// Caching future votes and proposals due to potential server time misalignments.\n\t// Votes and proposals for upcoming blocks may be received before\n\t// the current block's consensus is complete.\n\tupcomingVotes     []*vote.Vote         // Map to cache votes for future block heights\n\tupcomingProposals []*proposal.Proposal // Map to cache proposals for future block heights\n\tstate             state.Facade\n}\n\n// NewManagerV1 creates a new manager instance that manages a set of consensus instances,\n// each associated with a validator key and a reward address.\n// It is not thread-safe.\nfunc NewManagerV1(\n\tctx context.Context,\n\tconf *consensus.Config,\n\tstate state.Facade,\n\tvalKeys []*bls.ValidatorKey,\n\trewardAddrs []crypto.Address,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n) Manager {\n\tmgr := &manager{\n\t\tinstances:         make([]Consensus, len(valKeys)),\n\t\tupcomingVotes:     make([]*vote.Vote, 0),\n\t\tupcomingProposals: make([]*proposal.Proposal, 0),\n\t\tstate:             state,\n\t}\n\tmediatorConcrete := consensus.NewConcreteMediator()\n\n\tfor i, key := range valKeys {\n\t\tcons := consensus.NewConsensus(ctx, conf, state, key, rewardAddrs[i], broadcastPipe, mediatorConcrete)\n\n\t\tmgr.instances[i] = cons\n\t}\n\n\treturn mgr\n}\n\nfunc NewManagerV2(\n\tctx context.Context,\n\tconf *consensusv2.Config,\n\tstate state.Facade,\n\tvalKeys []*bls.ValidatorKey,\n\trewardAddrs []crypto.Address,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n) Manager {\n\tmgr := &manager{\n\t\tinstances:         make([]Consensus, len(valKeys)),\n\t\tupcomingVotes:     make([]*vote.Vote, 0),\n\t\tupcomingProposals: make([]*proposal.Proposal, 0),\n\t\tstate:             state,\n\t}\n\tmediatorConcrete := consensus.NewConcreteMediator()\n\n\tfor i, key := range valKeys {\n\t\tcons := consensusv2.NewConsensus(ctx, conf, state, key, rewardAddrs[i], broadcastPipe, mediatorConcrete)\n\n\t\tmgr.instances[i] = cons\n\t}\n\n\treturn mgr\n}\n\n// Instances return all consensus instances that are read-only and\n// can be safely accessed without modifying their state.\nfunc (mgr *manager) Instances() []Reader {\n\treaders := make([]Reader, len(mgr.instances))\n\tfor i, cons := range mgr.instances {\n\t\treaders[i] = cons\n\t}\n\n\treturn readers\n}\n\n// Proposal returns the current proposal for the active round from a random consensus instance.\nfunc (mgr *manager) Proposal() *proposal.Proposal {\n\tcons := mgr.getBestInstance()\n\n\treturn cons.Proposal()\n}\n\n// HandleQueryProposal returns the proposal for a specific round from a random consensus instance.\nfunc (mgr *manager) HandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal {\n\tcons := mgr.getBestInstance()\n\n\treturn cons.HandleQueryProposal(height, round)\n}\n\n// HandleQueryVote returns a random vote from a random consensus instance.\nfunc (mgr *manager) HandleQueryVote(height types.Height, round types.Round) *vote.Vote {\n\tcons := mgr.getBestInstance()\n\n\treturn cons.HandleQueryVote(height, round)\n}\n\n// HeightRound retrieves the current height and round from a random consensus instance.\nfunc (mgr *manager) HeightRound() (types.Height, types.Round) {\n\tcons := mgr.getBestInstance()\n\n\treturn cons.HeightRound()\n}\n\n// HasActiveInstance checks if any of the consensus instances are currently active.\nfunc (mgr *manager) HasActiveInstance() bool {\n\tfor _, cons := range mgr.instances {\n\t\tif cons.IsActive() {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\n// MoveToNewHeight moves all consensus instances to a new height.\nfunc (mgr *manager) MoveToNewHeight() {\n\tfor _, cons := range mgr.instances {\n\t\tcons.MoveToNewHeight()\n\t}\n\n\tcons := mgr.getBestInstance()\n\tcurHeight, _ := cons.HeightRound()\n\tfor index := len(mgr.upcomingProposals) - 1; index >= 0; index-- {\n\t\tprop := mgr.upcomingProposals[index]\n\t\tswitch {\n\t\tcase prop.Height() < curHeight:\n\t\t\t// Ignore old proposals\n\n\t\tcase prop.Height() > curHeight:\n\t\t\t// Keep this future proposal\n\t\t\tcontinue\n\n\t\tcase prop.Height() == curHeight:\n\t\t\t// Process this current proposal\n\t\t\tfor _, cons := range mgr.instances {\n\t\t\t\tcons.SetProposal(prop)\n\t\t\t}\n\t\t}\n\n\t\tmgr.upcomingProposals = slices.Delete(mgr.upcomingProposals, index, index+1)\n\t}\n\n\tfor index := len(mgr.upcomingVotes) - 1; index >= 0; index-- {\n\t\tvote := mgr.upcomingVotes[index]\n\t\tswitch {\n\t\tcase vote.Height() < curHeight:\n\t\t\t// Ignore old votes\n\n\t\tcase vote.Height() > curHeight:\n\t\t\t// Keep future vote\n\t\t\tcontinue\n\n\t\tcase vote.Height() == curHeight:\n\t\t\t// Process current vote\n\t\t\tfor _, cons := range mgr.instances {\n\t\t\t\tcons.AddVote(vote)\n\t\t\t}\n\t\t}\n\n\t\tmgr.upcomingVotes = slices.Delete(mgr.upcomingVotes, index, index+1)\n\t}\n}\n\n// AddVote adds a vote to all consensus instances.\nfunc (mgr *manager) AddVote(vote *vote.Vote) {\n\tcons := mgr.getBestInstance()\n\tcurHeight, _ := cons.HeightRound()\n\tswitch {\n\tcase vote.Height() < curHeight:\n\t\t_ = mgr.state.UpdateLastCertificate(vote)\n\n\tcase vote.Height() > curHeight:\n\t\tmgr.upcomingVotes = append(mgr.upcomingVotes, vote)\n\n\tcase vote.Height() == curHeight:\n\t\tfor _, cons := range mgr.instances {\n\t\t\tcons.AddVote(vote)\n\t\t}\n\t}\n}\n\n// SetProposal sets the proposal for all consensus instances.\nfunc (mgr *manager) SetProposal(prop *proposal.Proposal) {\n\tcons := mgr.getBestInstance()\n\tcurHeight, _ := cons.HeightRound()\n\tswitch {\n\tcase prop.Height() < curHeight:\n\t\t// discard old proposal\n\n\tcase prop.Height() > curHeight:\n\t\tmgr.upcomingProposals = append(mgr.upcomingProposals, prop)\n\n\tcase prop.Height() == curHeight:\n\t\tfor _, cons := range mgr.instances {\n\t\t\tcons.SetProposal(prop)\n\t\t}\n\t}\n}\n\n// getBestInstance iterates through all consensus instances and returns the instance\n// that is currently active, if there is one.\n// If there are no active instances, it returns the first instance.\n//\n// Note that all active instances are assumed to be in the same state, and all inactive\n// instances are assumed to be in the same state as well.\nfunc (mgr *manager) getBestInstance() Consensus {\n\tfor _, cons := range mgr.instances {\n\t\tif cons.IsActive() {\n\t\t\treturn cons\n\t\t}\n\t}\n\n\treturn mgr.instances[0]\n}\n\n// IsDeprecated checks if any of the consensus instances are deprecated.\nfunc (mgr *manager) IsDeprecated() bool {\n\treturn mgr.instances[0].IsDeprecated()\n}\n"
  },
  {
    "path": "consensus/manager/manager_test.go",
    "content": "package manager\n\nimport (\n\t\"testing\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/consensusv2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestManager(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tstate := state.MockingState(ts)\n\tstate.TestCommittee.Validators()\n\n\trewardAddrs := []crypto.Address{ts.RandAccAddress(), ts.RandAccAddress()}\n\tvalKeys := []*bls.ValidatorKey{state.TestValKeys[0], ts.RandValKey()}\n\tpipe := pipeline.New[message.Message](t.Context())\n\n\trandomHeight := ts.RandHeight()\n\trndBlk, rndCert := ts.GenerateTestBlock(randomHeight)\n\tstate.TestStore.SaveBlock(rndBlk, rndCert)\n\tconf := consensusv2.DefaultConfig()\n\n\tmgrInt := NewManagerV2(t.Context(), conf, state, valKeys, rewardAddrs, pipe)\n\tmgr := mgrInt.(*manager)\n\n\tconsA := mgr.instances[0] // active\n\tconsB := mgr.instances[1] // inactive\n\n\tt.Run(\"Check if keys are assigned properly\", func(t *testing.T) {\n\t\tassert.Equal(t, consA.ConsensusKey(), valKeys[0].PublicKey())\n\t\tassert.Equal(t, consB.ConsensusKey(), valKeys[1].PublicKey())\n\t})\n\n\tt.Run(\"Check if all instances move to new height\", func(t *testing.T) {\n\t\tmgr.MoveToNewHeight()\n\n\t\tstateHeight := mgr.state.LastBlockHeight()\n\t\tconsHeight, consRound := mgr.HeightRound()\n\n\t\tassert.True(t, mgr.HasActiveInstance())\n\t\tassert.Equal(t, stateHeight+1, consHeight)\n\t\tassert.Zero(t, consRound)\n\t})\n\n\tt.Run(\"Testing add vote\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tvote := vote.NewPrecommitVote(ts.RandHash(), consHeight, 0, valKeys[0].Address())\n\t\tts.HelperSignVote(valKeys[0], vote)\n\n\t\tmgr.AddVote(vote)\n\n\t\tassert.True(t, consA.HasVote(vote.Hash()))\n\t\tassert.False(t, consB.HasVote(vote.Hash()))\n\t})\n\n\tt.Run(\"Testing set proposal\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tblk, _ := state.ProposeBlock(valKeys[0], valKeys[0].Address())\n\t\tprop := proposal.NewProposal(consHeight, 0, blk)\n\t\tts.HelperSignProposal(valKeys[0], prop)\n\n\t\tmgr.SetProposal(prop)\n\n\t\tassert.Equal(t, prop, consA.Proposal())\n\t\tassert.Nil(t, consB.Proposal())\n\t})\n\n\tt.Run(\"Check discarding old votes\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tv := vote.NewPrepareVote(ts.RandHash(), consHeight-1, 0, state.TestValKeys[2].Address())\n\t\tts.HelperSignVote(state.TestValKeys[2], v)\n\n\t\tmgr.AddVote(v)\n\t\tassert.Empty(t, mgr.upcomingVotes)\n\t})\n\n\tt.Run(\"Check discarding old proposals\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tblk, _ := state.ProposeBlock(valKeys[0], valKeys[0].Address())\n\t\tprop := proposal.NewProposal(consHeight-1, 1, blk)\n\t\tts.HelperSignProposal(valKeys[0], prop)\n\n\t\tmgr.SetProposal(prop)\n\t\tassert.Empty(t, mgr.upcomingProposals)\n\t})\n\n\tt.Run(\"Processing upcoming votes\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tvote1 := vote.NewPrepareVote(ts.RandHash(), consHeight+1, 0, valKeys[0].Address())\n\t\tvote2 := vote.NewPrepareVote(ts.RandHash(), consHeight+2, 0, valKeys[0].Address())\n\t\tvote3 := vote.NewPrepareVote(ts.RandHash(), consHeight+3, 0, valKeys[0].Address())\n\n\t\tts.HelperSignVote(valKeys[0], vote1)\n\t\tts.HelperSignVote(valKeys[0], vote2)\n\t\tts.HelperSignVote(valKeys[0], vote3)\n\n\t\tmgr.AddVote(vote1)\n\t\tmgr.AddVote(vote2)\n\t\tmgr.AddVote(vote3)\n\n\t\tassert.Len(t, mgr.upcomingVotes, 3)\n\n\t\tblk1, cert1 := ts.GenerateTestBlock(consHeight)\n\t\terr := state.CommitBlock(blk1, cert1)\n\t\trequire.NoError(t, err)\n\n\t\tblk2, cert2 := ts.GenerateTestBlock(consHeight + 1)\n\t\terr = state.CommitBlock(blk2, cert2)\n\t\trequire.NoError(t, err)\n\n\t\tmgr.MoveToNewHeight()\n\n\t\tassert.Len(t, mgr.upcomingVotes, 1)\n\t})\n\n\tt.Run(\"Processing upcoming proposal\", func(t *testing.T) {\n\t\tconsHeight, _ := mgr.HeightRound()\n\t\tprop1 := ts.GenerateTestProposal(consHeight+1, 0)\n\t\tprop2 := ts.GenerateTestProposal(consHeight+2, 0)\n\t\tprop3 := ts.GenerateTestProposal(consHeight+3, 0)\n\n\t\tmgr.SetProposal(prop1)\n\t\tmgr.SetProposal(prop2)\n\t\tmgr.SetProposal(prop3)\n\n\t\tassert.Len(t, mgr.upcomingProposals, 3)\n\n\t\tblk1, cert1 := ts.GenerateTestBlock(consHeight)\n\t\terr := state.CommitBlock(blk1, cert1)\n\t\trequire.NoError(t, err)\n\n\t\tblk2, cert2 := ts.GenerateTestBlock(consHeight + 1)\n\t\terr = state.CommitBlock(blk2, cert2)\n\t\trequire.NoError(t, err)\n\n\t\tmgr.MoveToNewHeight()\n\n\t\tassert.Len(t, mgr.upcomingProposals, 1)\n\t})\n}\n\nfunc TestMediator(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tstate := state.MockingState(ts)\n\tcmt, valKeys := ts.GenerateTestCommittee(4)\n\tstate.TestCommittee = cmt\n\tstate.TestParams.BlockIntervalInSecond = 1\n\n\trewardAddrs := []crypto.Address{\n\t\tts.RandAccAddress(), ts.RandAccAddress(),\n\t\tts.RandAccAddress(), ts.RandAccAddress(),\n\t}\n\tstateHeight := ts.RandHeight()\n\tblk, cert := ts.GenerateTestBlock(stateHeight)\n\tstate.TestStore.SaveBlock(blk, cert)\n\tpipe := pipeline.New[message.Message](t.Context())\n\tconf := consensusv2.DefaultConfig()\n\n\tmgrInt := NewManagerV2(t.Context(), conf, state, valKeys, rewardAddrs, pipe)\n\tmgr := mgrInt.(*manager)\n\n\tmgr.MoveToNewHeight()\n\n\tfor {\n\t\tmsg := <-pipe.UnsafeGetChannel()\n\t\tlogger.Info(\"Published Vote\", \"msg\", msg, \"type\", msg.Type())\n\n\t\tm, ok := msg.(*message.BlockAnnounceMessage)\n\t\tif ok {\n\t\t\trequire.Equal(t, stateHeight+1, m.Height())\n\n\t\t\treturn\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "consensus/manager/mock.go",
    "content": "package manager\n\nimport (\n\t\"github.com/pactus-project/pactus/consensus\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nfunc MockingManager(ts *testsuite.TestSuite, state *state.MockState,\n\tvalKeys []*bls.ValidatorKey,\n) (Manager, []*consensus.MockConsensus) {\n\tmocks := make([]*consensus.MockConsensus, len(valKeys))\n\tinstances := make([]Consensus, len(valKeys))\n\tfor i, key := range valKeys {\n\t\tcons := consensus.MockingConsensus(ts, state, key)\n\t\tmocks[i] = cons\n\t\tinstances[i] = cons\n\t}\n\n\treturn &manager{\n\t\tinstances:         instances,\n\t\tupcomingVotes:     make([]*vote.Vote, 0),\n\t\tupcomingProposals: make([]*proposal.Proposal, 0),\n\t}, mocks\n}\n"
  },
  {
    "path": "consensus/mediator.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\n// The `mediator` interface defines a mechanism for setting proposals and votes\n// between independent consensus instances.\ntype mediator interface {\n\tOnPublishProposal(from Consensus, prop *proposal.Proposal)\n\tOnPublishVote(from Consensus, vote *vote.Vote)\n\tOnBlockAnnounce(from Consensus)\n\tRegister(cons Consensus)\n}\n\n// ConcreteMediator struct.\ntype ConcreteMediator struct {\n\tinstances []Consensus\n}\n\nfunc NewConcreteMediator() mediator {\n\treturn &ConcreteMediator{}\n}\n\nfunc (m *ConcreteMediator) OnPublishProposal(from Consensus, prop *proposal.Proposal) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.SetProposal(prop)\n\t\t}\n\t}\n}\n\nfunc (m *ConcreteMediator) OnPublishVote(from Consensus, vote *vote.Vote) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.AddVote(vote)\n\t\t}\n\t}\n}\n\nfunc (m *ConcreteMediator) OnBlockAnnounce(from Consensus) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.MoveToNewHeight()\n\t\t}\n\t}\n}\n\n// Register a new Consensus instance to the mediator.\nfunc (m *ConcreteMediator) Register(cons Consensus) {\n\tm.instances = append(m.instances, cons)\n}\n"
  },
  {
    "path": "consensus/mock.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nvar _ Consensus = &MockConsensus{}\n\n// MockConsensus is a mock implementation of the Consensus interface for testing.\ntype MockConsensus struct {\n\tts *testsuite.TestSuite\n\n\tState       *state.MockState\n\tValKey      *bls.ValidatorKey\n\tVotes       []*vote.Vote\n\tCurProposal *proposal.Proposal\n\tActive      bool\n\tProposer    bool\n\tHeight      types.Height\n\tRound       types.Round\n}\n\nfunc MockingConsensus(ts *testsuite.TestSuite, state *state.MockState, valKey *bls.ValidatorKey) *MockConsensus {\n\treturn &MockConsensus{\n\t\tts:     ts,\n\t\tState:  state,\n\t\tValKey: valKey,\n\t}\n}\n\nfunc (m *MockConsensus) ConsensusKey() *bls.PublicKey {\n\treturn m.ValKey.PublicKey()\n}\n\nfunc (m *MockConsensus) MoveToNewHeight() {\n\tm.Height = m.State.LastBlockHeight() + 1\n}\n\nfunc (m *MockConsensus) AddVote(v *vote.Vote) {\n\tm.Votes = append(m.Votes, v)\n}\n\nfunc (m *MockConsensus) AllVotes() []*vote.Vote {\n\treturn m.Votes\n}\n\nfunc (m *MockConsensus) SetProposal(p *proposal.Proposal) {\n\tm.CurProposal = p\n}\n\nfunc (m *MockConsensus) HasVote(h hash.Hash) bool {\n\tfor _, v := range m.Votes {\n\t\tif v.Hash() == h {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (m *MockConsensus) Proposal() *proposal.Proposal {\n\treturn m.CurProposal\n}\n\nfunc (m *MockConsensus) HandleQueryProposal(_ types.Height, _ types.Round) *proposal.Proposal {\n\treturn m.CurProposal\n}\n\nfunc (m *MockConsensus) HeightRound() (types.Height, types.Round) {\n\treturn m.Height, m.Round\n}\n\nfunc (*MockConsensus) LogString() string {\n\treturn \"\"\n}\n\nfunc (m *MockConsensus) HandleQueryVote(_ types.Height, _ types.Round) *vote.Vote {\n\tif len(m.Votes) == 0 {\n\t\treturn nil\n\t}\n\tr := m.ts.RandInt32Max(int32(len(m.Votes)))\n\n\treturn m.Votes[r]\n}\n\nfunc (m *MockConsensus) IsActive() bool {\n\treturn m.Active\n}\n\nfunc (m *MockConsensus) IsProposer() bool {\n\treturn m.Proposer\n}\n\nfunc (m *MockConsensus) SetActive(active bool) {\n\tm.Active = active\n}\n\nfunc (*MockConsensus) IsDeprecated() bool {\n\treturn false\n}\n"
  },
  {
    "path": "consensus/precommit.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype precommitState struct {\n\t*consensus\n\thasVoted bool\n}\n\nfunc (s *precommitState) enter() {\n\ts.hasVoted = false\n\n\ts.decide()\n}\n\nfunc (s *precommitState) decide() {\n\ts.vote()\n\n\tprecommits := s.log.PrecommitVoteSet(s.round)\n\tprecommitQH := precommits.QuorumHash()\n\tif precommitQH != nil {\n\t\ts.logger.Debug(\"pre-commit has quorum\", \"hash\", precommitQH)\n\n\t\tif s.hasVoted {\n\t\t\t// To ensure we have voted and won't be absent from the certificate\n\t\t\ts.enterNewState(s.commitState)\n\t\t}\n\t} else {\n\t\t//\n\t\t// If a validator receives a set of f+1 valid cp:PRE-VOTE votes for this round,\n\t\t// it starts the changing proposer phase, even if its timer has not expired;\n\t\t// This prevents it from starting the change-proposer phase too late.\n\t\t//\n\t\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\t\tif cpPreVotes.HasOneThirdOfTotalPower(0) {\n\t\t\ts.startChangingProposer()\n\t\t}\n\t}\n}\n\nfunc (s *precommitState) vote() {\n\tif s.hasVoted {\n\t\treturn\n\t}\n\n\troundProposal := s.log.RoundProposal(s.round)\n\tif roundProposal == nil {\n\t\ts.queryProposal()\n\t\ts.logger.Debug(\"no proposal yet\")\n\n\t\treturn\n\t}\n\n\tprepares := s.log.PrepareVoteSet(s.round)\n\tprepareQH := prepares.QuorumHash()\n\tif !roundProposal.IsForBlock(*prepareQH) {\n\t\ts.log.SetRoundProposal(s.round, nil)\n\t\ts.queryProposal()\n\t\ts.logger.Warn(\"double proposal detected\", \"roundProposal\", roundProposal, \"prepared\", *prepareQH)\n\n\t\treturn\n\t}\n\n\t// Everything is good\n\ts.signAddPrecommitVote(*prepareQH)\n\ts.hasVoted = true\n}\n\nfunc (s *precommitState) onAddVote(v *vote.Vote) {\n\tif v.Type() == vote.VoteTypePrecommit ||\n\t\tv.Type() == vote.VoteTypeCPPreVote {\n\t\ts.decide()\n\t}\n}\n\nfunc (s *precommitState) onSetProposal(_ *proposal.Proposal) {\n\ts.decide()\n}\n\nfunc (s *precommitState) onTimeout(t *ticker) {\n\tif t.Target == tickerTargetChangeProposer {\n\t\ts.startChangingProposer()\n\t}\n}\n\nfunc (*precommitState) name() string {\n\treturn \"precommit\"\n}\n"
  },
  {
    "path": "consensus/precommit_test.go",
    "content": "package consensus\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestPrecommitQueryProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\n\tprop := td.makeProposal(t, height, round)\n\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\ttd.addPrecommitVote(td.consP, prop.Block().Hash(), height, round, tIndexB)\n\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n}\n\nfunc TestPrecommitDuplicatedProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\tprop1 := td.makeProposal(t, height, round)\n\tprop2 := td.makeProposal(t, height, round, td.RandAccAddress())\n\tassert.NotEqual(t, prop1.Hash(), prop2.Hash())\n\n\ttd.enterNewHeight(td.consP)\n\n\t// Byzantine node sends second proposal to Partitioned node\n\t// in prepare step\n\ttd.consP.SetProposal(prop2)\n\tassert.NotNil(t, td.consP.Proposal())\n\n\ttd.addPrepareVote(td.consP, prop1.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop1.Block().Hash(), height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, prop1.Block().Hash(), height, round, tIndexB)\n\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n\n\t// Byzantine node sends second proposal to Partitioned node,\n\t// in precommit step\n\ttd.consP.SetProposal(prop2)\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n\n\ttd.consP.SetProposal(prop1)\n\tassert.NotNil(t, td.consP.Proposal())\n}\n\nfunc TestGoToChangeProposerFromPrecommit(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\tblockHash := td.RandHash()\n\n\ttd.addPrepareVote(td.consP, blockHash, height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, blockHash, height, round, tIndexY)\n\ttd.addPrepareVote(td.consP, blockHash, height, round, tIndexB)\n\n\ttd.addCPPreVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, &vote.JustInitYes{}, tIndexX)\n\ttd.addCPPreVote(td.consP, hash.UndefHash, height, round, vote.CPValueYes, &vote.JustInitYes{}, tIndexY)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, blockHash)\n}\n"
  },
  {
    "path": "consensus/prepare.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype prepareState struct {\n\t*consensus\n\thasVoted bool\n}\n\nfunc (s *prepareState) enter() {\n\ts.hasVoted = false\n\n\tchangeProperTimeout := s.config.CalculateChangeProposerTimeout(s.round)\n\tqueryProposalTimeout := changeProperTimeout / 2\n\ts.scheduleTimeout(queryProposalTimeout, s.height, s.round, tickerTargetQueryProposal)\n\ts.scheduleTimeout(changeProperTimeout, s.height, s.round, tickerTargetChangeProposer)\n\n\ts.decide()\n}\n\nfunc (s *prepareState) decide() {\n\ts.vote()\n\n\tprepares := s.log.PrepareVoteSet(s.round)\n\tprepareQH := prepares.QuorumHash()\n\tif prepareQH != nil {\n\t\ts.logger.Debug(\"prepare has quorum\", \"hash\", prepareQH)\n\t\ts.enterNewState(s.precommitState)\n\t} else {\n\t\t//\n\t\t// If a validator receives a set of f+1 valid cp:PRE-VOTE votes for this round,\n\t\t// it starts changing the proposer phase, even if its timer has not expired;\n\t\t// This prevents it from starting the change-proposer phase too late.\n\t\t//\n\t\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\t\tif cpPreVotes.HasOneThirdOfTotalPower(0) {\n\t\t\ts.startChangingProposer()\n\t\t}\n\t}\n}\n\nfunc (s *prepareState) vote() {\n\tif s.hasVoted {\n\t\treturn\n\t}\n\n\troundProposal := s.log.RoundProposal(s.round)\n\tif roundProposal == nil {\n\t\ts.logger.Debug(\"no proposal yet\")\n\n\t\treturn\n\t}\n\n\t// Everything is good\n\ts.signAddPrepareVote(roundProposal.Block().Hash())\n\ts.hasVoted = true\n}\n\nfunc (s *prepareState) onTimeout(ticker *ticker) {\n\tswitch ticker.Target {\n\tcase tickerTargetQueryProposal:\n\t\troundProposal := s.log.RoundProposal(s.round)\n\t\tif roundProposal == nil {\n\t\t\ts.queryProposal()\n\t\t}\n\t\tif s.isProposer() {\n\t\t\ts.queryVote()\n\t\t}\n\n\t\t// Schedule another timeout to retry querying for the proposal or votes.\n\t\t// This ensures that delayed or missing data doesn't cause the process to stall.\n\t\ts.scheduleTimeout(ticker.Duration*2, s.height, s.round, tickerTargetQueryProposal)\n\n\tcase tickerTargetChangeProposer:\n\t\ts.startChangingProposer()\n\n\tcase tickerTargetNewHeight, tickerTargetQueryVote:\n\t\t// These targets are not used in the prepare state\n\t}\n}\n\nfunc (s *prepareState) onAddVote(v *vote.Vote) {\n\tif v.Type() == vote.VoteTypePrepare ||\n\t\tv.Type() == vote.VoteTypeCPPreVote {\n\t\ts.decide()\n\t}\n}\n\nfunc (s *prepareState) onSetProposal(_ *proposal.Proposal) {\n\ts.decide()\n}\n\nfunc (*prepareState) name() string {\n\treturn \"prepare\"\n}\n"
  },
  {
    "path": "consensus/prepare_test.go",
    "content": "package consensus\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\nfunc TestChangeProposerTimeout(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n\nfunc TestQueryProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\ttd.queryProposalTimeout(td.consP)\n\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryVote)\n}\n\nfunc TestQueryVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(3)\n\tround := types.Round(1)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\t// consP is the proposer for this round, but there are not enough votes.\n\ttd.queryProposalTimeout(td.consP)\n\ttd.shouldPublishProposal(t, td.consP, height, round)\n\ttd.shouldPublishQueryVote(t, td.consP, height, round)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryProposal)\n}\n\nfunc TestGoToChangeProposerFromPrepare(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\ttd.addCPPreVote(td.consP, hash.UndefHash, 2, 0, vote.CPValueYes, &vote.JustInitYes{}, tIndexX)\n\ttd.addCPPreVote(td.consP, hash.UndefHash, 2, 0, vote.CPValueYes, &vote.JustInitYes{}, tIndexY)\n\n\t// should move to the change proposer phase, even if it has the proposal and\n\t// its timer has not expired, if it has received 1/3 of the change-proposer votes.\n\tp := td.makeProposal(t, 2, 0)\n\ttd.consP.SetProposal(p)\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n"
  },
  {
    "path": "consensus/propose.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype proposeState struct {\n\t*consensus\n}\n\nfunc (s *proposeState) enter() {\n\ts.decide()\n}\n\nfunc (s *proposeState) decide() {\n\tproposer := s.proposer(s.round)\n\tif proposer.Address() == s.valKey.Address() {\n\t\ts.logger.Info(\"our turn to propose\", \"proposer\", proposer.Address())\n\t\ts.createProposal(s.height, s.round)\n\t} else {\n\t\ts.logger.Debug(\"not our turn to propose\", \"proposer\", proposer.Address())\n\t}\n\n\ts.cpRound = 0\n\ts.cpDecided = -1\n\ts.cpWeakValidity = nil\n\n\t// TODO: write test for me\n\tscore := s.bcState.AvailabilityScore(proposer.Number())\n\n\t// Based on PIP-19, if the Availability Score is less than the Minimum threshold,\n\t// we initiate the Change-Proposer phase.\n\tif score < s.config.MinimumAvailabilityScore {\n\t\ts.logger.Info(\"availability score of proposer is low\",\n\t\t\t\"score\", score, \"proposer\", proposer.Address())\n\t\ts.startChangingProposer()\n\t} else {\n\t\ts.enterNewState(s.prepareState)\n\t}\n}\n\nfunc (s *proposeState) createProposal(height types.Height, round types.Round) {\n\tblock, err := s.bcState.ProposeBlock(s.valKey, s.rewardAddr)\n\tif err != nil {\n\t\ts.logger.Error(\"unable to propose a block!\", \"error\", err)\n\n\t\treturn\n\t}\n\n\tprop := proposal.NewProposal(height, round, block)\n\tsig := s.valKey.Sign(prop.SignBytes())\n\tprop.SetSignature(sig)\n\n\ts.log.SetRoundProposal(round, prop)\n\n\ts.broadcastProposal(prop)\n\n\ts.logger.Info(\"proposal signed and broadcasted\", \"proposal\", prop)\n}\n\nfunc (*proposeState) onAddVote(_ *vote.Vote) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) onSetProposal(_ *proposal.Proposal) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) onTimeout(_ *ticker) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) name() string {\n\treturn \"propose\"\n}\n"
  },
  {
    "path": "consensus/propose_test.go",
    "content": "package consensus\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProposeBlock(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\tp := td.shouldPublishProposal(t, td.consX, 1, 0)\n\tassert.Equal(t, td.consX.valKey.Address(), p.Block().Header().ProposerAddress())\n}\n\nfunc TestSetProposalInvalidProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consY)\n\tassert.Nil(t, td.consY.Proposal())\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(1, testsuite.BlockWithProposer(addr))\n\tinvalidProp := proposal.NewProposal(1, 0, blk)\n\n\ttd.consY.SetProposal(invalidProp)\n\tassert.Nil(t, td.consY.Proposal())\n\n\ttd.HelperSignProposal(td.consB.valKey, invalidProp)\n\ttd.consY.SetProposal(invalidProp)\n\tassert.Nil(t, td.consY.Proposal())\n}\n\nfunc TestSetProposalInvalidBlock(t *testing.T) {\n\ttd := setup(t)\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(1, testsuite.BlockWithProposer(addr))\n\tinvProp := proposal.NewProposal(1, 2, blk)\n\ttd.HelperSignProposal(td.consB.valKey, invProp)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\ttd.consP.SetProposal(invProp)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\nfunc TestSetProposalInvalidHeight(t *testing.T) {\n\ttd := setup(t)\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(2, testsuite.BlockWithProposer(addr))\n\tinvProp := proposal.NewProposal(2, 0, blk)\n\ttd.HelperSignProposal(td.consB.valKey, invProp)\n\n\ttd.enterNewHeight(td.consY)\n\ttd.consY.SetProposal(invProp)\n\tassert.Nil(t, td.consY.Proposal())\n}\n\nfunc TestNetworkLagging(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\n\t// consP doesn't have the proposal, but it has received prepared votes from other peers\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrepareVote(td.consP, prop.Block().Hash(), height, round, tIndexY)\n\n\ttd.queryProposalTimeout(td.consP)\n\ttd.shouldPublishQueryProposal(t, td.consP, height)\n\n\t// Proposal is received now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrepare, prop.Block().Hash())\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop.Block().Hash())\n}\n\nfunc TestProposalNextRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\t// Byzantine node sends proposal for the second round (his turn) even before the first round is started\n\tb, err := td.consB.bcState.ProposeBlock(td.consB.valKey, td.consB.rewardAddr)\n\trequire.NoError(t, err)\n\tp := proposal.NewProposal(2, 1, b)\n\ttd.HelperSignProposal(td.consB.valKey, p)\n\n\ttd.consX.SetProposal(p)\n\n\t// consX accepts his proposal, but doesn't move to the next round\n\tassert.NotNil(t, td.consX.log.RoundProposal(1))\n\tassert.Nil(t, td.consX.Proposal())\n\tassert.Equal(t, types.Height(2), td.consX.height)\n\tassert.Equal(t, types.Round(0), td.consX.round)\n}\n"
  },
  {
    "path": "consensus/spec/.gitignore",
    "content": "*.dot\n*.out\n*.toolbox\nstates\n*.tex\n*.dvi\n*.aux\n*.log\n"
  },
  {
    "path": "consensus/spec/Pactus.cfg",
    "content": "SPECIFICATION Spec\nCONSTANTS\n  NumFaulty = 1\n  FaultyNodes = {3}\n  MaxHeight = 1\n  MaxRound  = 1\n  MaxCPRound = 1\n\nINVARIANT TypeOK\nPROPERTY Success\n"
  },
  {
    "path": "consensus/spec/Pactus.tla",
    "content": "-------------------------------- MODULE Pactus --------------------------------\n(***************************************************************************)\n(* The specification of the Pactus consensus algorithm:                    *)\n(* `^\\url{https://pactus.org/learn/consensus/protocol/}^'                  *)\n(***************************************************************************)\nEXTENDS Integers, Sequences, FiniteSets, TLC\n\nCONSTANT\n    \\* The maximum number of height.\n    \\* this is to restrict the allowed behaviours that TLC scans through.\n    MaxHeight,\n    \\* The maximum number of round per height.\n    \\* this is to restrict the allowed behaviours that TLC scans through.\n    MaxRound,\n    \\* The maximum number of cp-round per height.\n    \\* this is to restrict the allowed behaviours that TLC scans through.\n    MaxCPRound,\n    \\* The total number of faulty nodes\n    NumFaulty,\n    \\* The index of faulty nodes\n    FaultyNodes\n\nVARIABLES\n    \\* `log` is a set of received messages in the system.\n    log,\n    \\* `states` represents the state of each replica in the consensus protocol.\n    states\n\n\\* Total number of replicas, which is `3f+1', where `f' is the number of faulty nodes.\nReplicas == (3 * NumFaulty) + 1\n\\* Quorum is 2/3+ of total replicas that is `2f+1'\nQuorum == (2 * NumFaulty) + 1\n\\* OneThird is 1/3+ of total  replicas that is `f+1'\nOneThird == NumFaulty + 1\n\n\\* A tuple with all variables in the spec (for ease of use in temporal conditions)\nvars == <<states, log>>\n\nASSUME\n    /\\ NumFaulty >= 1\n    /\\ FaultyNodes \\subseteq 0..Replicas-1\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* Helper functions                                                        *)\n(***************************************************************************)\n\n\\* Fetch a subset of messages in the network based on the params filter.\nSubsetOfMsgs(params) ==\n   {msg \\in log: \\A field \\in DOMAIN params: msg[field] = params[field]}\n\n\\* IsProposer checks if the replica is the proposer for this round.\n\\* To simplify, we assume the proposer always starts with the first replica,\n\\* and moves to the next by the change-proposer phase.\nIsProposer(index) ==\n    states[index].round % Replicas = index\n\n\\* Helper function to check if a node is faulty or not.\nIsFaulty(index) == index \\in FaultyNodes\n\n\\* HasPrepareQuorum checks if there is a quorum of\n\\* the PREPARE votes in this round.\nHasPrepareQuorum(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"PREPARE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> 0])) >= Quorum\n\n\\* HasPrecommitQuorum checks if there is a quorum of\n\\* the PRECOMMIT votes in this round.\nHasPrecommitQuorum(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"PRECOMMIT\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> 0])) >= Quorum\n\nCPHasPreVotesQuorum(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round])) >= Quorum\n\nCPHasPreVotesQuorumForOne(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= Quorum\n\nCPHasPreVotesQuorumForZero(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 0])) >= Quorum\n\nCPHasPreVotesForZeroAndOne(index) ==\n    /\\ Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 0])) >= 1\n    /\\ Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= 1\n\nCPHasOneMainVotesZeroInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 0])) > 0\n\nCPHasOneMainVotesOneInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 1])) > 0\n\nCPAllMainVotesAbstainInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 2])) >= Quorum\n\n\nCPHasMainVotesQuorum(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round])) >= Quorum\n\nCPHasMainVotesQuorumForOne(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= Quorum\n\nCPHasMainVotesQuorumForZero(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 0])) >= Quorum\n\nGetProposal(height, round) ==\n    SubsetOfMsgs([type |-> \"PROPOSAL\", height |-> height, round |-> round])\n\nHasProposal(index) ==\n    Cardinality(GetProposal(states[index].height, states[index].round)) > 0\n\nHasBlockAnnounce(index) ==\n    Cardinality(SubsetOfMsgs([\n        type     |-> \"BLOCK-ANNOUNCE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        cp_round |-> 0,\n        cp_val   |-> 0])) >= 1\n\n\\* Helper function to check if the block is committed or not.\n\\* A block is considered committed iff supermajority of non-faulty replicas announce the same block.\nIsCommitted(height) ==\n    LET subset == SubsetOfMsgs([\n        type     |-> \"BLOCK-ANNOUNCE\",\n        height   |-> height,\n        cp_round |-> 0,\n        cp_val   |-> 0])\n    IN /\\ Cardinality(subset) >= Quorum\n       /\\ \\A m1, m2 \\in subset : m1.round = m2.round\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* Network functions                                                       *)\n(***************************************************************************)\n\n\\* `SendMsg` simulates a replica sending a message by appending it to the `log`.\nSendMsg(msg) ==\n    log' = log \\cup msg\n\n\\* SendProposal is used to broadcast the PROPOSAL into the network.\nSendProposal(index) ==\n    SendMsg({[\n        type     |-> \"PROPOSAL\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0]})\n\n\\* SendPrepareVote is used to broadcast PREPARE votes into the network.\nSendPrepareVote(index) ==\n    SendMsg({[\n        type     |-> \"PREPARE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0]})\n\n\\* SendPrecommitVote is used to broadcast PRECOMMIT votes into the network.\nSendPrecommitVote(index) ==\n    SendMsg({[\n        type     |-> \"PRECOMMIT\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0]})\n\n\\* SendCPPreVote is used to broadcast CP:PRE-VOTE votes into the network.\nSendCPPreVote(index, cp_val) ==\n    SendMsg({[\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> cp_val]})\n\n\\* SendCPMainVote is used to broadcast CP:MAIN-VOTE votes into the network.\nSendCPMainVote(index, cp_val) ==\n    SendMsg({[\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> cp_val]})\n\nSendCPVotesForNextRound(index, cp_val) ==\n    SendMsg({\n    [\n        type     |-> \"CP:PRE-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round + 1,\n        cp_val   |-> cp_val],\n    [\n        type     |-> \"CP:MAIN-VOTE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round + 1,\n        cp_val   |-> cp_val]})\n\n\\* AnnounceBlock is used to broadcast BLOCK-ANNOUNCE messages into the network.\nAnnounceBlock(index)  ==\n    SendMsg({[\n        type     |-> \"BLOCK-ANNOUNCE\",\n        height   |-> states[index].height,\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0]})\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* States functions                                                        *)\n(***************************************************************************)\n\n\\* NewHeight state\nNewHeight(index) ==\n    IF states[index].height >= MaxHeight\n    THEN UNCHANGED <<states, log>>\n    ELSE\n        /\\ ~IsFaulty(index)\n        /\\ states[index].name = \"new-height\"\n        /\\ states[index].height < MaxHeight\n        /\\ states' = [states EXCEPT\n            ![index].name = \"propose\",\n            ![index].height = states[index].height + 1,\n            ![index].round = 0]\n        /\\ UNCHANGED <<log>>\n\n\n\\* Propose state\nPropose(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"propose\"\n    /\\ IF IsProposer(index)\n       THEN SendProposal(index)\n       ELSE UNCHANGED <<log>>\n    /\\ states' = [states EXCEPT\n        ![index].name = \"prepare\",\n        ![index].timeout = FALSE,\n        ![index].cp_round = 0]\n\n\n\\* Prepare state\nPrepare(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"prepare\"\n    /\\ IF HasPrepareQuorum(index)\n       THEN /\\ states' = [states EXCEPT ![index].name = \"precommit\"]\n            /\\ UNCHANGED <<log>>\n       ELSE /\\ HasProposal(index)\n            /\\ SendPrepareVote(index)\n            /\\ UNCHANGED <<states>>\n\n\\* Precommit state\nPrecommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"precommit\"\n    /\\ IF HasPrecommitQuorum(index)\n       THEN /\\ states' = [states EXCEPT ![index].name = \"commit\"]\n            /\\ UNCHANGED <<log>>\n       ELSE /\\ HasProposal(index)\n            /\\ SendPrecommitVote(index)\n            /\\ UNCHANGED <<states>>\n\n\\* Commit state\nCommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"commit\"\n    /\\ AnnounceBlock(index)\n    /\\ states' = [states EXCEPT\n        ![index].name = \"new-height\"]\n\n\\* Timeout: A non-faulty Replica try to change the proposer if its timer expires.\nTimeout(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].round < MaxRound\n    /\\ states[index].timeout = FALSE\n    /\\\n        \\/\n            /\\ states[index].name = \"prepare\"\n            /\\ SendCPPreVote(index, 1)\n\n        \\/\n            /\\ states[index].name = \"precommit\"\n            /\\ SendCPPreVote(index, 0)\n    /\\ states' = [states EXCEPT\n            ![index].name = \"cp:main-vote\",\n            ![index].timeout = TRUE]\n\n\n\nCPPreVote(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:pre-vote\"\n    /\\\n        \\/\n            /\\ CPHasOneMainVotesOneInPrvRound(index)\n            /\\ SendCPPreVote(index, 1)\n        \\/\n            /\\ CPHasOneMainVotesZeroInPrvRound(index)\n            /\\ SendCPPreVote(index, 0)\n        \\/\n            /\\ CPAllMainVotesAbstainInPrvRound(index)\n            /\\ SendCPPreVote(index, 0) \\* biased to zero\n    /\\ states' = [states EXCEPT ![index].name = \"cp:main-vote\"]\n\n\nCPMainVote(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:main-vote\"\n    /\\ CPHasPreVotesQuorum(index)\n    /\\\n        \\/\n               \\* all votes for 1\n            /\\ CPHasPreVotesQuorumForOne(index)\n            /\\ SendCPMainVote(index, 1)\n            /\\ states' = [states EXCEPT ![index].name = \"cp:decide\"]\n        \\/\n               \\* all votes for 0\n            /\\ CPHasPreVotesQuorumForZero(index)\n            /\\ SendCPMainVote(index, 0)\n            /\\ states' = [states EXCEPT ![index].name = \"cp:decide\"]\n        \\/\n               \\* Abstain vote\n            /\\ CPHasPreVotesForZeroAndOne(index)\n            /\\ SendCPMainVote(index, 2)\n            /\\ states' = [states EXCEPT ![index].name = \"cp:decide\"]\n\nCPDecide(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:decide\"\n    /\\\n        \\/\n            /\\ states[index].cp_decided = 1\n            /\\ states' = [states EXCEPT ![index].name = \"propose\",\n                                        ![index].round = states[index].round + 1]\n        \\/\n            /\\ states[index].cp_decided = 0\n            /\\ states' = [states EXCEPT ![index].name = \"prepare\"]\n        \\/\n            /\\ states[index].cp_decided = -1\n            /\\ CPHasMainVotesQuorum(index)\n            /\\\n                IF  /\\ CPHasMainVotesQuorumForOne(index)\n                    /\\ states[index].cp_round /= MaxCPRound - 1\n                THEN states' = [states EXCEPT ![index].name = \"cp:pre-vote\",\n                                              ![index].cp_decided = 1,\n                                              ![index].cp_round = states[index].cp_round + 1]\n                ELSE IF \\/ CPHasMainVotesQuorumForZero(index)\n                        \\/ states[index].cp_round = MaxCPRound - 1\n                    THEN states' = [states EXCEPT ![index].name = \"cp:pre-vote\",\n                                                  ![index].cp_decided = 0,\n                                                  ![index].cp_round = states[index].cp_round + 1]\n                    ELSE states' = [states EXCEPT ![index].name = \"cp:pre-vote\",\n                                                  ![index].cp_round = states[index].cp_round + 1]\n\n    /\\ log' = log\n\n\nSync(index) ==\n    /\\ ~IsFaulty(index)\n    /\\\n        \\/ states[index].name = \"cp:pre-vote\"\n        \\/ states[index].name = \"cp:main-vote\"\n        \\/ states[index].name = \"cp:decide\"\n    /\\ HasBlockAnnounce(index)\n    /\\ states' = [states EXCEPT ![index].name = \"prepare\"]\n    /\\ log' = log\n\n-----------------------------------------------------------------------------\n\nInit ==\n    /\\ log = {}\n    /\\ states = [index \\in 0..Replicas-1 |-> [\n        name       |-> \"new-height\",\n        height     |-> 0,\n        round      |-> 0,\n        timeout    |-> FALSE,\n        cp_round   |-> 0,\n        cp_decided |-> -1]]\n\nNext ==\n    \\E index \\in 0..Replicas-1:\n        \\/ NewHeight(index)\n        \\/ Propose(index)\n        \\/ Prepare(index)\n        \\/ Precommit(index)\n        \\/ Timeout(index)\n        \\/ Commit(index)\n        \\/ Sync(index)\n        \\/ CPPreVote(index)\n        \\/ CPMainVote(index)\n        \\/ CPDecide(index)\n\nSpec ==\n    Init /\\ [][Next]_vars /\\ WF_vars(Next)\n\n\n(***************************************************************************)\n(* Success: All non-faulty nodes eventually commit at MaxHeight.           *)\n(***************************************************************************)\nSuccess == <>(IsCommitted(MaxHeight))\n\n(***************************************************************************)\n(* TypeOK is the type-correctness invariant.                               *)\n(***************************************************************************)\nTypeOK ==\n    /\\ \\A index \\in 0..Replicas-1:\n        /\\ states[index].name \\in {\"new-height\", \"propose\", \"prepare\",\n            \"precommit\", \"commit\", \"cp:pre-vote\", \"cp:main-vote\", \"cp:decide\"}\n        /\\ states[index].height <= MaxHeight\n        /\\ states[index].round <= MaxRound\n        /\\ states[index].cp_round <= MaxCPRound + 1\n        /\\ states[index].name = \"new-height\" /\\ states[index].height > 1 =>\n            /\\ IsCommitted(states[index].height - 1)\n        /\\ states[index].name = \"precommit\" =>\n            /\\ HasPrepareQuorum(index)\n            /\\ HasProposal(index)\n        /\\ states[index].name = \"commit\" =>\n            /\\ HasPrepareQuorum(index)\n            /\\ HasPrecommitQuorum(index)\n            /\\ HasProposal(index)\n        /\\ \\A round \\in 0..states[index].round:\n            \\* Not more than one proposal per round\n            /\\ Cardinality(GetProposal(states[index].height, round)) <= 1\n\n=============================================================================\n"
  },
  {
    "path": "consensus/spec/README.md",
    "content": "# Consensus specification\n\nThis folder contains the consensus specification for the Pactus blockchain,\nwhich is based on the TLA+ formal language.\nThe specification defines the consensus algorithm used by the blockchain.\n\nMore info can be found [here](https://docs.pactus.org/protocol/consensus/specification/)\n\n## Model checking\n\nTo run the model checker, you will need to download and install the [TLA+ Toolbox](https://lamport.azurewebsites.net/tla/toolbox.html),\nwhich includes the TLC model checker. Follow the steps below to run the TLC model checker:\n\n- Add the `Pactus.tla` spec to your TLA+ Toolbox project.\n- Create a new model and specify a temporal formula as `Spec`.\n- Specify an invariants formula as `TypeOK`.\n- Specify a properties formula as `Success`.\n- Define the required constants:\n    - `NumFaulty`: the number of faulty nodes (e.g. 1)\n    - `FaultyNodes`: the index of faulty nodes (e.g. {3})\n    - `MaxHeight`: the maximum height of the system (e.g. 1)\n    - `MaxRound`: the maximum block-creation round of the consensus algorithm (e.g. 1)\n    - `MaxCPRound`: the maximum change-proposer round of the consensus algorithm (e.g. 1)\n- Run the TLC checker to check the correctness of the specification.\n"
  },
  {
    "path": "consensus/state.go",
    "content": "package consensus\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype consState interface {\n\tenter()\n\tdecide()\n\tonAddVote(v *vote.Vote)\n\tonSetProposal(p *proposal.Proposal)\n\tonTimeout(t *ticker)\n\tname() string\n}\n"
  },
  {
    "path": "consensus/ticker.go",
    "content": "package consensus\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype tickerTarget int\n\nconst (\n\ttickerTargetNewHeight      = tickerTarget(1)\n\ttickerTargetChangeProposer = tickerTarget(2)\n\ttickerTargetQueryProposal  = tickerTarget(3)\n\ttickerTargetQueryVote      = tickerTarget(4)\n)\n\nfunc (rs tickerTarget) String() string {\n\tswitch rs {\n\tcase tickerTargetNewHeight:\n\t\treturn \"new-height\"\n\tcase tickerTargetChangeProposer:\n\t\treturn \"change-proposer\"\n\tcase tickerTargetQueryProposal:\n\t\treturn \"query-proposal\"\n\tcase tickerTargetQueryVote:\n\t\treturn \"query-vote\"\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\ntype ticker struct {\n\tDuration time.Duration\n\tHeight   types.Height\n\tRound    types.Round\n\tTarget   tickerTarget\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (ti ticker) LogString() string {\n\treturn fmt.Sprintf(\"%v@ %d/%d/%s\", ti.Duration, ti.Height, ti.Round, ti.Target)\n}\n"
  },
  {
    "path": "consensus/voteset/binary_voteset.go",
    "content": "package voteset\n\nimport (\n\t\"maps\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype roundVotes struct {\n\t// Each vote can have one of 3 possible values: {0,1,Abstain}.\n\tvoteBoxes  [3]*voteBox\n\tallVotes   map[crypto.Address]*vote.Vote\n\tvotedPower int64\n}\n\nfunc newRoundVotes() *roundVotes {\n\tvoteBoxes := [3]*voteBox{}\n\tvoteBoxes[vote.CPValueNo] = newVoteBox()\n\tvoteBoxes[vote.CPValueYes] = newVoteBox()\n\tvoteBoxes[vote.CPValueAbstain] = newVoteBox()\n\n\treturn &roundVotes{\n\t\tvoteBoxes:  voteBoxes,\n\t\tallVotes:   make(map[crypto.Address]*vote.Vote),\n\t\tvotedPower: 0,\n\t}\n}\n\nfunc (rv *roundVotes) addVote(v *vote.Vote, power int64) {\n\tvb := rv.voteBoxes[v.CPValue()]\n\tvb.addVote(v, power)\n}\n\ntype BinaryVoteSet struct {\n\t*voteSet\n\troundVotes []*roundVotes\n}\n\nfunc NewCPPreVoteVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc NewCPMainVoteVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc NewCPDecidedVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc newBinaryVoteSet(voteSet *voteSet) *BinaryVoteSet {\n\treturn &BinaryVoteSet{\n\t\tvoteSet:    voteSet,\n\t\troundVotes: make([]*roundVotes, 0, 1),\n\t}\n}\n\nfunc (vs *BinaryVoteSet) mustGetRoundVotes(cpRound int16) *roundVotes {\n\tfor i := len(vs.roundVotes); i <= int(cpRound); i++ {\n\t\trv := newRoundVotes()\n\t\tvs.roundVotes = append(vs.roundVotes, rv)\n\t}\n\n\treturn vs.roundVotes[cpRound]\n}\n\n// AllVotes returns a list of all votes in the VoteSet.\nfunc (vs *BinaryVoteSet) AllVotes() []*vote.Vote {\n\tvotes := make([]*vote.Vote, 0)\n\tfor _, rv := range vs.roundVotes {\n\t\tfor _, v := range rv.allVotes {\n\t\t\tvotes = append(votes, v)\n\t\t}\n\t}\n\n\treturn votes\n}\n\n// AddVote attempts to add a vote to the VoteSet. Returns an error if the vote is invalid.\nfunc (vs *BinaryVoteSet) AddVote(vote *vote.Vote) (bool, error) {\n\tpower, err := vs.voteSet.verifyVote(vote)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\troundVotes := vs.mustGetRoundVotes(vote.CPRound())\n\texistingVote, ok := roundVotes.allVotes[vote.Signer()]\n\tif ok {\n\t\tif existingVote.Hash() == vote.Hash() {\n\t\t\t// The vote is already added\n\t\t\treturn false, nil\n\t\t}\n\n\t\t// It is a duplicated vote\n\t\terr = ErrDuplicatedVote\n\t} else {\n\t\troundVotes.allVotes[vote.Signer()] = vote\n\t\troundVotes.votedPower += power\n\t}\n\n\troundVotes.addVote(vote, power)\n\n\treturn true, err\n}\n\nfunc (vs *BinaryVoteSet) HasOneThirdOfTotalPower(cpRound int16) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.isOneThirdOfTotalPower(roundVotes.votedPower)\n}\n\nfunc (vs *BinaryVoteSet) HasTwoThirdOfTotalPower(cpRound int16) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.isTwoThirdOfTotalPower(roundVotes.votedPower)\n}\n\nfunc (vs *BinaryVoteSet) HasAnyVoteFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn roundVotes.voteBoxes[cpValue].votedPower > 0\n}\n\nfunc (vs *BinaryVoteSet) HasAllVotesFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn roundVotes.voteBoxes[cpValue].votedPower == roundVotes.votedPower\n}\n\nfunc (vs *BinaryVoteSet) HasQuorumVotesFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.isTwoThirdOfTotalPower(roundVotes.voteBoxes[cpValue].votedPower)\n}\n\nfunc (vs *BinaryVoteSet) BinaryVotes(cpRound int16, cpValue vote.CPValue) map[crypto.Address]*vote.Vote {\n\tvotes := map[crypto.Address]*vote.Vote{}\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\tvoteBox := roundVotes.voteBoxes[cpValue]\n\tmaps.Copy(votes, voteBox.votes)\n\n\treturn votes\n}\n\nfunc (vs *BinaryVoteSet) GetRandomVote(cpRound int16, cpValue vote.CPValue) *vote.Vote {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\tfor _, v := range roundVotes.voteBoxes[cpValue].votes {\n\t\treturn v\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "consensus/voteset/block_voteset.go",
    "content": "package voteset\n\nimport (\n\t\"maps\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype BlockVoteSet struct {\n\t*voteSet\n\tblockVotes map[hash.Hash]*voteBox\n\tallVotes   map[crypto.Address]*vote.Vote\n\tquorumHash *hash.Hash\n}\n\nfunc NewPrepareVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BlockVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBlockVoteSet(voteSet)\n}\n\nfunc NewPrecommitVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BlockVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBlockVoteSet(voteSet)\n}\n\nfunc newBlockVoteSet(voteSet *voteSet) *BlockVoteSet {\n\treturn &BlockVoteSet{\n\t\tvoteSet:    voteSet,\n\t\tblockVotes: make(map[hash.Hash]*voteBox),\n\t\tallVotes:   make(map[crypto.Address]*vote.Vote),\n\t}\n}\n\nfunc (vs *BlockVoteSet) BlockVotes(blockHash hash.Hash) map[crypto.Address]*vote.Vote {\n\tvotes := map[crypto.Address]*vote.Vote{}\n\tblockVotes := vs.mustGetBlockVotes(blockHash)\n\tmaps.Copy(votes, blockVotes.votes)\n\n\treturn votes\n}\n\nfunc (vs *BlockVoteSet) mustGetBlockVotes(blockHash hash.Hash) *voteBox {\n\tblockVotes, exists := vs.blockVotes[blockHash]\n\tif !exists {\n\t\tblockVotes = newVoteBox()\n\t\tvs.blockVotes[blockHash] = blockVotes\n\t}\n\n\treturn blockVotes\n}\n\n// AllVotes returns a list of all votes in the VoteSet.\nfunc (vs *BlockVoteSet) AllVotes() []*vote.Vote {\n\tvotes := make([]*vote.Vote, 0, len(vs.allVotes))\n\tfor _, v := range vs.allVotes {\n\t\tvotes = append(votes, v)\n\t}\n\n\treturn votes\n}\n\n// AddVote attempts to add a vote to the VoteSet. Returns an error if the vote is invalid.\nfunc (vs *BlockVoteSet) AddVote(vote *vote.Vote) (bool, error) {\n\tpower, err := vs.voteSet.verifyVote(vote)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\texistingVote, ok := vs.allVotes[vote.Signer()]\n\tif ok {\n\t\tif existingVote.Hash() == vote.Hash() {\n\t\t\t// The vote is already added\n\t\t\treturn false, nil\n\t\t}\n\n\t\t// It is a duplicated vote\n\t\terr = ErrDuplicatedVote\n\t} else {\n\t\tvs.allVotes[vote.Signer()] = vote\n\t}\n\n\tblockVotes := vs.mustGetBlockVotes(vote.BlockHash())\n\tblockVotes.addVote(vote, power)\n\tif vs.isTwoThirdOfTotalPower(blockVotes.votedPower) {\n\t\th := vote.BlockHash()\n\t\tvs.quorumHash = &h\n\t}\n\n\treturn true, err\n}\n\n// HasQuorumHash checks if there is a block that has received quorum votes (2/3+ of total power).\nfunc (vs *BlockVoteSet) HasQuorumHash() bool {\n\treturn vs.quorumHash != nil\n}\n\n// QuorumHash returns the hash of the block that has received quorum votes (2/3+ of total power).\n// If no block has received the quorum threshold (2/3+ of total voting power), it returns nil.\nfunc (vs *BlockVoteSet) QuorumHash() *hash.Hash {\n\treturn vs.quorumHash\n}\n"
  },
  {
    "path": "consensus/voteset/errors.go",
    "content": "package voteset\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\n// ErrDuplicatedVote is returned when a duplicated vote from a validator is detected.\nvar ErrDuplicatedVote = errors.New(\"duplicated vote\")\n\n// IneligibleVoterError is returned when the voter is not a member of the committee.\ntype IneligibleVoterError struct {\n\tAddress crypto.Address\n}\n\nfunc (e IneligibleVoterError) Error() string {\n\treturn fmt.Sprintf(\"validator %s is not part of the committee\", e.Address)\n}\n"
  },
  {
    "path": "consensus/voteset/vote_box.go",
    "content": "package voteset\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype voteBox struct {\n\tvotes      map[crypto.Address]*vote.Vote\n\tvotedPower int64\n}\n\nfunc newVoteBox() *voteBox {\n\treturn &voteBox{\n\t\tvotes:      make(map[crypto.Address]*vote.Vote),\n\t\tvotedPower: 0,\n\t}\n}\n\nfunc (vs *voteBox) addVote(vote *vote.Vote, power int64) {\n\tif vs.votes[vote.Signer()] == nil {\n\t\tvs.votes[vote.Signer()] = vote\n\t\tvs.votedPower += power\n\t}\n}\n"
  },
  {
    "path": "consensus/voteset/vote_box_test.go",
    "content": "package voteset\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestDuplicateVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tsigner := ts.RandValAddress()\n\tpower := ts.RandInt64Max(1000)\n\n\tv := vote.NewPrepareVote(hash, height, round, signer)\n\n\tvb := newVoteBox()\n\n\tvb.addVote(v, power)\n\tvb.addVote(v, power)\n\n\tassert.Equal(t, power, vb.votedPower)\n}\n"
  },
  {
    "path": "consensus/voteset/voteset.go",
    "content": "package voteset\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype voteSet struct {\n\tround      types.Round\n\tvalidators map[crypto.Address]*validator.Validator\n\ttotalPower int64\n}\n\nfunc newVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *voteSet {\n\treturn &voteSet{\n\t\tround:      round,\n\t\tvalidators: validators,\n\t\ttotalPower: totalPower,\n\t}\n}\n\n// Round returns the round number for the VoteSet.\nfunc (vs *voteSet) Round() types.Round {\n\treturn vs.round\n}\n\n// verifyVote checks if the given vote is valid.\n// It returns the voting power of if valid, or an error if not.\nfunc (vs *voteSet) verifyVote(vote *vote.Vote) (int64, error) {\n\tsigner := vote.Signer()\n\tval := vs.validators[signer]\n\tif val == nil {\n\t\treturn 0, IneligibleVoterError{\n\t\t\tAddress: signer,\n\t\t}\n\t}\n\n\tif err := vote.Verify(val.PublicKey()); err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn val.Power(), nil\n}\n\nfunc (vs *voteSet) isTwoThirdOfTotalPower(power int64) bool {\n\treturn power > (vs.totalPower * 2 / 3)\n}\n\nfunc (vs *voteSet) isOneThirdOfTotalPower(power int64) bool {\n\treturn power > (vs.totalPower * 1 / 3)\n}\n"
  },
  {
    "path": "consensus/voteset/voteset_test.go",
    "content": "package voteset\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc setupCommittee(ts *testsuite.TestSuite, stakes ...amount.Amount) (\n\tmap[crypto.Address]*validator.Validator, []*bls.ValidatorKey, int64,\n) {\n\tvalKeys := make([]*bls.ValidatorKey, 0, len(stakes))\n\tvalsMap := map[crypto.Address]*validator.Validator{}\n\ttotalPower := int64(0)\n\tfor i, s := range stakes {\n\t\tpub, prv := ts.RandBLSKeyPair()\n\t\tval := ts.GenerateTestValidator(\n\t\t\ttestsuite.ValidatorWithNumber(int32(i)),\n\t\t\ttestsuite.ValidatorWithPublicKey(pub),\n\t\t\ttestsuite.ValidatorWithStake(s),\n\t\t)\n\t\tvalsMap[val.Address()] = val\n\t\ttotalPower += val.Power()\n\t\tvalKeys = append(valKeys, bls.NewValidatorKey(prv))\n\t}\n\n\treturn valsMap, valKeys, totalPower\n}\n\nfunc TestAddBlockVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1000, 1500, 2500, 2000)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tinvKey := ts.RandValKey()\n\tvalKey := valKeys[0]\n\tvoteSet := NewPrecommitVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewPrecommitVote(hash1, height, round, invKey.Address())\n\tvote2 := vote.NewPrecommitVote(hash1, height, round, valKey.Address())\n\tvote3 := vote.NewPrecommitVote(hash2, height, round, valKey.Address())\n\n\tts.HelperSignVote(invKey, vote1)\n\tadded, err := voteSet.AddVote(vote1)\n\trequire.ErrorIs(t, err, IneligibleVoterError{Address: vote1.Signer()}) // unknown validator\n\tassert.False(t, added)\n\n\tts.HelperSignVote(invKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature) // invalid signature\n\tassert.False(t, added)\n\n\tts.HelperSignVote(valKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err) // ok\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(vote2) // Adding again\n\tassert.False(t, added)\n\trequire.NoError(t, err)\n\n\tts.HelperSignVote(valKey, vote3)\n\tadded, err = voteSet.AddVote(vote3)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n}\n\nfunc TestAddBinaryVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1000, 1500, 2500, 2000)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcpRound := int16(ts.RandRound())\n\tcpVal := ts.RandIntMax(2)\n\tjust := &vote.JustInitYes{}\n\tinvKey := ts.RandValKey()\n\tvalKey := valKeys[0]\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewCPPreVote(hash1, height, round, cpRound, vote.CPValue(cpVal), just, invKey.Address())\n\tvote2 := vote.NewCPPreVote(hash1, height, round, cpRound, vote.CPValue(cpVal), just, valKey.Address())\n\tvote3 := vote.NewCPPreVote(hash2, height, round, cpRound, vote.CPValue(cpVal), just, valKey.Address())\n\n\tts.HelperSignVote(invKey, vote1)\n\tadded, err := voteSet.AddVote(vote1)\n\trequire.ErrorIs(t, err, IneligibleVoterError{Address: vote1.Signer()}) // unknown validator\n\tassert.False(t, added)\n\n\tts.HelperSignVote(invKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature) // invalid signature\n\tassert.False(t, added)\n\n\tts.HelperSignVote(valKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err) // ok\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(vote2) // Adding again\n\tassert.False(t, added)\n\trequire.NoError(t, err)\n\n\tts.HelperSignVote(valKey, vote3)\n\tadded, err = voteSet.AddVote(vote3)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n}\n\nfunc TestDuplicateBlockVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1, 1, 1, 1)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\thash3 := ts.RandHash()\n\taddr := valKeys[0].Address()\n\tvoteSet := NewPrepareVoteSet(0, totalPower, valsMap)\n\n\tcorrectVote := vote.NewPrepareVote(hash1, 1, 0, addr)\n\tduplicatedVote1 := vote.NewPrepareVote(hash2, 1, 0, addr)\n\tduplicatedVote2 := vote.NewPrepareVote(hash3, 1, 0, addr)\n\n\t// sign the votes\n\tts.HelperSignVote(valKeys[0], correctVote)\n\tts.HelperSignVote(valKeys[0], duplicatedVote1)\n\tts.HelperSignVote(valKeys[0], duplicatedVote2)\n\n\tadded, err := voteSet.AddVote(correctVote)\n\trequire.NoError(t, err)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(duplicatedVote1)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(duplicatedVote2)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n\n\tbv1 := voteSet.BlockVotes(hash1)\n\tbv2 := voteSet.BlockVotes(hash2)\n\tbv3 := voteSet.BlockVotes(hash3)\n\tassert.Equal(t, correctVote, bv1[addr])\n\tassert.Equal(t, duplicatedVote1, bv2[addr])\n\tassert.Equal(t, duplicatedVote2, bv3[addr])\n\tassert.False(t, voteSet.HasQuorumHash())\n}\n\nfunc TestDuplicateBinaryVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1, 1, 1, 1)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\thash3 := ts.RandHash()\n\taddr := valKeys[0].Address()\n\tvoteSet := NewCPPreVoteVoteSet(0, totalPower, valsMap)\n\n\tcorrectVote := vote.NewCPPreVote(hash1, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\tduplicatedVote1 := vote.NewCPPreVote(hash2, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\tduplicatedVote2 := vote.NewCPPreVote(hash3, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\n\t// sign the votes\n\tts.HelperSignVote(valKeys[0], correctVote)\n\tts.HelperSignVote(valKeys[0], duplicatedVote1)\n\tts.HelperSignVote(valKeys[0], duplicatedVote2)\n\n\tadded, err := voteSet.AddVote(correctVote)\n\trequire.NoError(t, err)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(duplicatedVote1)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(duplicatedVote2)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\tassert.True(t, added)\n\n\tassert.False(t, voteSet.HasOneThirdOfTotalPower(0))\n}\n\nfunc TestQuorum(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1000, 1500, 2500, 2000)\n\n\tvoteSet := NewPrecommitVoteSet(0, totalPower, valsMap)\n\tblockHash := ts.RandHash()\n\tvote1 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[1].Address())\n\tvote3 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[2].Address())\n\tvote4 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[3].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\tts.HelperSignVote(valKeys[3], vote4)\n\n\t_, err := voteSet.AddVote(vote1)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err)\n\n\tassert.Nil(t, voteSet.QuorumHash())\n\tassert.False(t, voteSet.HasQuorumHash())\n\tassert.Contains(t, voteSet.BlockVotes(blockHash), vote1.Signer())\n\tassert.Contains(t, voteSet.BlockVotes(blockHash), vote2.Signer())\n\n\t_, err = voteSet.AddVote(vote3)\n\trequire.NoError(t, err)\n\n\tassert.True(t, voteSet.HasQuorumHash())\n\tassert.Contains(t, voteSet.BlockVotes(blockHash), vote3.Signer())\n\tassert.NotContains(t, voteSet.BlockVotes(blockHash), vote4.Signer())\n\n\t// Add one more vote\n\t_, err = voteSet.AddVote(vote4)\n\trequire.NoError(t, err)\n\n\tassert.NotNil(t, voteSet.QuorumHash())\n\tassert.Equal(t, &blockHash, voteSet.QuorumHash())\n\tassert.True(t, voteSet.HasQuorumHash())\n\tassert.Contains(t, voteSet.BlockVotes(blockHash), vote4.Signer())\n}\n\nfunc TestAllBlockVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1000, 1500, 2500, 2000)\n\n\tvoteSet := NewPrecommitVoteSet(1, totalPower, valsMap)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\tvote1 := vote.NewPrecommitVote(hash1, 1, 1, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(hash1, 1, 1, valKeys[1].Address())\n\tvote3 := vote.NewPrecommitVote(hash1, 1, 1, valKeys[2].Address())\n\tvote4 := vote.NewPrecommitVote(hash2, 1, 1, valKeys[0].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\tts.HelperSignVote(valKeys[0], vote4)\n\n\t_, err := voteSet.AddVote(vote1)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote3)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, &hash1, voteSet.QuorumHash())\n\n\t_, err = voteSet.AddVote(vote4)\n\trequire.ErrorIs(t, err, ErrDuplicatedVote)\n\n\t// Check accumulated power\n\tassert.Equal(t, &hash1, voteSet.QuorumHash())\n\n\t// Check previous votes\n\tassert.Contains(t, voteSet.AllVotes(), vote1)\n\tassert.Contains(t, voteSet.AllVotes(), vote2)\n\tassert.Contains(t, voteSet.AllVotes(), vote3)\n\tassert.NotContains(t, voteSet.AllVotes(), vote4)\n}\n\nfunc TestAllBinaryVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1000, 1500, 2500, 2000)\n\n\tvoteSet := NewCPMainVoteVoteSet(1, totalPower, valsMap)\n\n\tvote1 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 0, vote.CPValueNo, &vote.JustInitYes{}, valKeys[0].Address())\n\tvote2 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 1, vote.CPValueYes, &vote.JustInitYes{}, valKeys[1].Address())\n\tvote3 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 2, vote.CPValueAbstain, &vote.JustInitYes{}, valKeys[2].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\n\tassert.Empty(t, voteSet.AllVotes())\n\n\t_, err := voteSet.AddVote(vote1)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote3)\n\trequire.NoError(t, err)\n\n\tassert.Contains(t, voteSet.AllVotes(), vote1)\n\tassert.Contains(t, voteSet.AllVotes(), vote2)\n\tassert.Contains(t, voteSet.AllVotes(), vote3)\n\n\tranVote1 := voteSet.GetRandomVote(1, vote.CPValueNo)\n\tassert.Nil(t, ranVote1)\n\n\tranVote2 := voteSet.GetRandomVote(1, vote.CPValueYes)\n\tassert.Equal(t, vote2, ranVote2)\n}\n\nfunc TestOneThirdPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t// total power = 3000\n\t// 1/3 of total power = 1000\n\t// 2/3 of total power = 2000\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 999, 3, 999, 999)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[1].Address())\n\tvote3 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[2].Address())\n\tvote4 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueNo, just, valKeys[3].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\tts.HelperSignVote(valKeys[3], vote4)\n\n\t_, err := voteSet.AddVote(vote1)\n\trequire.NoError(t, err)\n\tassert.False(t, voteSet.HasOneThirdOfTotalPower(0))\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueAbstain))\n\n\t_, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err)\n\tassert.True(t, voteSet.HasOneThirdOfTotalPower(0))\n\tassert.False(t, voteSet.HasTwoThirdOfTotalPower(0))\n\n\t_, err = voteSet.AddVote(vote3)\n\trequire.NoError(t, err)\n\tassert.True(t, voteSet.HasTwoThirdOfTotalPower(0))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasQuorumVotesFor(0, vote.CPValueNo))\n\tassert.True(t, voteSet.HasQuorumVotesFor(0, vote.CPValueYes))\n\tassert.True(t, voteSet.HasAllVotesFor(0, vote.CPValueYes))\n\n\t_, err = voteSet.AddVote(vote4)\n\trequire.NoError(t, err)\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n\tassert.False(t, voteSet.HasQuorumVotesFor(0, vote.CPValueNo))\n\tassert.True(t, voteSet.HasQuorumVotesFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAllVotesFor(0, vote.CPValueYes))\n\n\tbv1 := voteSet.BinaryVotes(0, vote.CPValueYes)\n\tbv2 := voteSet.BinaryVotes(0, vote.CPValueNo)\n\n\tassert.Contains(t, bv1, vote1.Signer())\n\tassert.Contains(t, bv1, vote2.Signer())\n\tassert.Contains(t, bv1, vote3.Signer())\n\tassert.Contains(t, bv2, vote4.Signer())\n}\n\nfunc TestDecidedVoteset(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 1, 1, 1, 1)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPDecidedVoteSet(round, totalPower, valsMap)\n\n\tvte := vote.NewCPDecidedVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tts.HelperSignVote(valKeys[0], vte)\n\n\t_, err := voteSet.AddVote(vte)\n\trequire.NoError(t, err)\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n}\n"
  },
  {
    "path": "consensusv2/commit.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype commitState struct {\n\t*consensusV2\n}\n\nfunc (s *commitState) enter() {\n\ts.decide()\n}\n\nfunc (s *commitState) decide() {\n\troundProposal := s.log.RoundProposal(s.round)\n\tblock := roundProposal.Block()\n\tprecommits := s.log.PrecommitVoteSet(s.round)\n\tvotes := precommits.BlockVotes(block.Hash())\n\tcert := s.makeCertificate(votes)\n\n\terr := s.bcState.CommitBlock(block, cert)\n\tif err != nil {\n\t\ts.logger.Error(\"committing block failed\", \"block\", block, \"error\", err)\n\t} else {\n\t\ts.logger.Info(\"block committed, schedule new height\", \"hash\", block.Hash())\n\n\t\t// Now we can announce the committed block and certificate\n\t\ts.announceNewBlock(block, cert, s.cpDecidedCert)\n\t}\n\n\ts.enterNewState(s.newHeightState)\n}\n\nfunc (*commitState) onAddVote(_ *vote.Vote) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) onSetProposal(_ *proposal.Proposal) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) onTimeout(_ *ticker) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*commitState) name() string {\n\treturn \"commit\"\n}\n"
  },
  {
    "path": "consensusv2/config.go",
    "content": "package consensusv2\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types\"\n)\n\n// Config defines parameters for the consensusv2 algorithm.\ntype Config struct {\n\tChangeProposerTimeout    time.Duration `toml:\"-\"`\n\tChangeProposerDelta      time.Duration `toml:\"-\"`\n\tQueryVoteTimeout         time.Duration `toml:\"-\"`\n\tMinimumAvailabilityScore float64       `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tChangeProposerTimeout:    5 * time.Second,\n\t\tChangeProposerDelta:      5 * time.Second,\n\t\tQueryVoteTimeout:         5 * time.Second,\n\t\tMinimumAvailabilityScore: 0.666667, // TODO: Shall not be a consensus parameter?\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif conf.ChangeProposerTimeout <= 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"change proposer timeout must be greater than zero\",\n\t\t}\n\t}\n\tif conf.ChangeProposerDelta <= 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"change proposer delta must be greater than zero\",\n\t\t}\n\t}\n\tif conf.MinimumAvailabilityScore < 0 || conf.MinimumAvailabilityScore > 1 {\n\t\treturn ConfigError{\n\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (conf *Config) CalculateChangeProposerTimeout(round types.Round) time.Duration {\n\treturn conf.ChangeProposerTimeout +\n\t\tconf.ChangeProposerDelta*time.Duration(round)\n}\n"
  },
  {
    "path": "consensusv2/config_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname: \"Invalid ChangeProposerDelta\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"change proposer delta must be greater than zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ChangeProposerDelta = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid ChangeProposerTimeout\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"change proposer timeout must be greater than zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ChangeProposerTimeout = -1 * time.Second\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid MinimumAvailabilityScore\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MinimumAvailabilityScore = 1.5\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid MinimumAvailabilityScore - Negative\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"minimum availability score can't be negative or more than 1\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MinimumAvailabilityScore = -0.8\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, tt.expectedErr, err,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\", no, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestConfigCalculateChangeProposerTimeout(t *testing.T) {\n\tc := DefaultConfig()\n\n\tassert.Equal(t, c.ChangeProposerTimeout, c.CalculateChangeProposerTimeout(0))\n\tassert.Equal(t, c.ChangeProposerTimeout+c.ChangeProposerDelta, c.CalculateChangeProposerTimeout(1))\n\tassert.Equal(t, c.ChangeProposerTimeout+(4*c.ChangeProposerDelta), c.CalculateChangeProposerTimeout(4))\n}\n"
  },
  {
    "path": "consensusv2/consensus.go",
    "content": "package consensusv2\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/consensus\"\n\t\"github.com/pactus-project/pactus/consensusv2/log\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype broadcaster func(crypto.Address, message.Message)\n\ntype consensusV2 struct {\n\tlk sync.RWMutex\n\n\tctx         context.Context\n\tconfig      *Config\n\tlogger      *logger.SubLogger\n\tlog         *log.Log\n\tvalidators  []*validator.Validator\n\theight      types.Height\n\tround       types.Round\n\tvalKey      *bls.ValidatorKey\n\trewardAddr  crypto.Address\n\tbcState     state.Facade // Blockchain state\n\tbroadcaster broadcaster\n\tmediator    mediator\n\tactive      bool\n\n\tcpWeakValidity hash.Hash\n\tcpDecidedCert  *certificate.Certificate\n\tcpRound        int16\n\n\tchangeProposer  *changeProposer\n\tnewHeightState  *newHeightState\n\tproposeState    *proposeState\n\tprecommitState  *precommitState\n\tcommitState     *commitState\n\tcpPreVoteState  *cpPreVoteState\n\tcpMainVoteState *cpMainVoteState\n\tcpDecideState   *cpDecideState\n\tcurrentState    consState\n}\n\nfunc NewConsensus(\n\tctx context.Context,\n\tconf *Config,\n\tbcState state.Facade,\n\tvalKey *bls.ValidatorKey,\n\trewardAddr crypto.Address,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n\tmediator mediator,\n) consensus.Consensus {\n\tbroadcaster := func(_ crypto.Address, msg message.Message) {\n\t\tbroadcastPipe.Send(msg)\n\t}\n\n\treturn makeConsensus(ctx, conf, bcState,\n\t\tvalKey, rewardAddr, broadcaster, mediator)\n}\n\nfunc makeConsensus(\n\tctx context.Context,\n\tconf *Config,\n\tbcState state.Facade,\n\tvalKey *bls.ValidatorKey,\n\trewardAddr crypto.Address,\n\tbroadcaster broadcaster,\n\tmediator mediator,\n) *consensusV2 {\n\tcons := &consensusV2{\n\t\tctx:         ctx,\n\t\tconfig:      conf,\n\t\tbcState:     bcState,\n\t\tbroadcaster: broadcaster,\n\t\tvalKey:      valKey,\n\t}\n\n\t// Update height later, See enterNewHeight.\n\tcons.log = log.NewLog()\n\tcons.logger = logger.NewSubLogger(\"_consensus\", cons)\n\tcons.rewardAddr = rewardAddr\n\n\tcons.changeProposer = &changeProposer{cons}\n\tcons.newHeightState = &newHeightState{cons}\n\tcons.proposeState = &proposeState{cons}\n\tcons.precommitState = &precommitState{cons, false}\n\tcons.commitState = &commitState{cons}\n\tcons.cpPreVoteState = &cpPreVoteState{cons.changeProposer}\n\tcons.cpMainVoteState = &cpMainVoteState{cons.changeProposer}\n\tcons.cpDecideState = &cpDecideState{cons.changeProposer}\n\tcons.currentState = cons.newHeightState\n\tcons.mediator = mediator\n\n\tcons.height = 0\n\tcons.round = 0\n\tcons.active = false\n\tcons.mediator = mediator\n\n\tmediator.Register(cons)\n\n\tlogger.Info(\"consensus instance created\",\n\t\t\"validator address\", valKey.Address().String(),\n\t\t\"reward address\", rewardAddr.String())\n\n\treturn cons\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (cs *consensusV2) LogString() string {\n\treturn fmt.Sprintf(\"{%s %d/%d/%s/%d}\",\n\t\tcs.valKey.Address(),\n\t\tcs.height, cs.round, cs.currentState.name(), cs.cpRound)\n}\n\nfunc (cs *consensusV2) ConsensusKey() *bls.PublicKey {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.valKey.PublicKey()\n}\n\nfunc (cs *consensusV2) HeightRound() (types.Height, types.Round) {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.height, cs.round\n}\n\nfunc (cs *consensusV2) HasVote(h hash.Hash) bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.log.HasVote(h)\n}\n\n// AllVotes returns all valid votes inside the consensus log up to and including\n// the current consensus round.\n// Valid votes from subsequent rounds are not included.\nfunc (cs *consensusV2) AllVotes() []*vote.Vote {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tvotes := []*vote.Vote{}\n\tfor r := types.Round(0); r <= cs.round; r++ {\n\t\tm := cs.log.RoundMessages(r)\n\t\tvotes = append(votes, m.AllVotes()...)\n\t}\n\n\treturn votes\n}\n\nfunc (cs *consensusV2) enterNewState(s consState) {\n\tcs.currentState = s\n\tcs.currentState.enter()\n}\n\nfunc (cs *consensusV2) MoveToNewHeight() {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tstateHeight := cs.bcState.LastBlockHeight()\n\tif cs.height != stateHeight+1 {\n\t\tcs.enterNewState(cs.newHeightState)\n\t}\n}\n\nfunc (cs *consensusV2) scheduleTimeout(duration time.Duration,\n\theight types.Height, round types.Round, target tickerTarget,\n) {\n\tcs.logger.Trace(\"new timer scheduled ⏱️\", \"duration\", duration, \"height\", height, \"round\", round, \"target\", target)\n\n\tticker := &ticker{duration, height, round, target}\n\tscheduler.After(duration).Do(cs.ctx, func(context.Context) {\n\t\tcs.handleTimeout(ticker)\n\t})\n}\n\nfunc (cs *consensusV2) handleTimeout(ticker *ticker) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\t// Old tickers might be triggered now. Ignore them.\n\tif cs.height != ticker.Height || cs.round != ticker.Round {\n\t\tcs.logger.Trace(\"stale ticker\", \"ticker\", ticker)\n\n\t\treturn\n\t}\n\n\tcs.logger.Trace(\"timer expired\", \"ticker\", ticker)\n\tcs.currentState.onTimeout(ticker)\n}\n\nfunc (cs *consensusV2) SetProposal(prop *proposal.Proposal) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tif !cs.active {\n\t\treturn\n\t}\n\n\tif prop.Height() != cs.height {\n\t\treturn\n\t}\n\n\tif prop.Round() < cs.round {\n\t\tcs.logger.Debug(\"proposal for expired round\", \"proposal\", prop)\n\n\t\treturn\n\t}\n\n\troundProposal := cs.log.RoundProposal(prop.Round())\n\tif roundProposal != nil {\n\t\tcs.logger.Trace(\"this round has proposal\", \"proposal\", prop)\n\n\t\treturn\n\t}\n\n\tif err := prop.BasicCheck(); err != nil {\n\t\tcs.logger.Warn(\"invalid proposal\", \"proposal\", prop, \"error\", err)\n\n\t\treturn\n\t}\n\n\tproposer := cs.proposer(prop.Round())\n\tif err := prop.Verify(proposer.PublicKey()); err != nil {\n\t\tcs.logger.Warn(\"invalid proposer\", \"proposal\", prop, \"error\", err)\n\n\t\treturn\n\t}\n\n\tif err := cs.bcState.ValidateBlock(prop.Block(), prop.Round()); err != nil {\n\t\tcs.logger.Warn(\"invalid proposed block\", \"proposal\", prop, \"error\", err)\n\n\t\treturn\n\t}\n\n\tcs.logger.Info(\"proposal set\", \"proposal\", prop)\n\tcs.log.SetRoundProposal(prop.Round(), prop)\n\n\tcs.currentState.onSetProposal(prop)\n}\n\nfunc (cs *consensusV2) AddVote(vte *vote.Vote) {\n\tcs.lk.Lock()\n\tdefer cs.lk.Unlock()\n\n\tif !cs.active {\n\t\treturn\n\t}\n\n\tif vte.Height() != cs.height {\n\t\treturn\n\t}\n\n\tif vte.Round() < cs.round {\n\t\tcs.logger.Debug(\"vote for expired round\", \"vote\", vte)\n\n\t\treturn\n\t}\n\n\tif vte.Type() == vote.VoteTypeCPPreVote ||\n\t\tvte.Type() == vote.VoteTypeCPMainVote ||\n\t\tvte.Type() == vote.VoteTypeCPDecided {\n\t\terr := cs.changeProposer.cpCheckJust(vte)\n\t\tif err != nil {\n\t\t\tcs.logger.Error(\"error on adding a cp vote\", \"vote\", vte, \"error\", err)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\tadded, err := cs.log.AddVote(vte)\n\tif err != nil {\n\t\tcs.logger.Warn(\"error on adding a vote\", \"vote\", vte, \"error\", err)\n\t}\n\tif added {\n\t\tcs.logger.Info(\"new vote added\", \"vote\", vte)\n\n\t\tcs.currentState.onAddVote(vte)\n\t}\n}\n\nfunc (cs *consensusV2) proposer(round types.Round) *validator.Validator {\n\treturn cs.bcState.Proposer(round)\n}\n\nfunc (cs *consensusV2) IsProposer() bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.isProposer()\n}\n\nfunc (cs *consensusV2) isProposer() bool {\n\treturn cs.proposer(cs.round).Address() == cs.valKey.Address()\n}\n\nfunc (cs *consensusV2) signAddCPPreVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPPreVote(h, cs.height,\n\t\tcs.round, cpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensusV2) signAddCPMainVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPMainVote(h, cs.height, cs.round,\n\t\tcpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensusV2) signAddCPDecidedVote(h hash.Hash,\n\tcpRound int16, cpValue vote.CPValue, just vote.Just,\n) {\n\tv := vote.NewCPDecidedVote(h, cs.height, cs.round,\n\t\tcpRound, cpValue, just, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensusV2) signAddPrecommitVote(h hash.Hash) {\n\tv := vote.NewPrecommitVote(h, cs.height, cs.round, cs.valKey.Address())\n\tcs.signAddVote(v)\n}\n\nfunc (cs *consensusV2) signAddVote(vte *vote.Vote) {\n\tsig := cs.valKey.Sign(vte.SignBytes())\n\tvte.SetSignature(sig)\n\tcs.logger.Info(\"our vote signed and broadcasted\", \"vote\", vte)\n\n\t_, err := cs.log.AddVote(vte)\n\tif err != nil {\n\t\tcs.logger.Warn(\"error on adding our vote\", \"error\", err, \"vote\", vte)\n\t}\n\tcs.broadcastVote(vte)\n}\n\n// queryProposal requests any missing proposal from other validators.\nfunc (cs *consensusV2) queryProposal() {\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewQueryProposalMessage(cs.height, cs.round, cs.valKey.Address()))\n}\n\n// queryVote requests any missing votes from other validators.\nfunc (cs *consensusV2) queryVote() {\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewQueryVoteMessage(cs.height, cs.round, cs.valKey.Address()))\n}\n\nfunc (cs *consensusV2) broadcastProposal(p *proposal.Proposal) {\n\tgo cs.mediator.OnPublishProposal(cs, p)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewProposalMessage(p))\n}\n\nfunc (cs *consensusV2) broadcastVote(v *vote.Vote) {\n\tgo cs.mediator.OnPublishVote(cs, v)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewVoteMessage(v))\n}\n\nfunc (cs *consensusV2) announceNewBlock(blk *block.Block,\n\tcert *certificate.Certificate,\n\tproof *certificate.Certificate,\n) {\n\tgo cs.mediator.OnBlockAnnounce(cs)\n\tcs.broadcaster(cs.valKey.Address(),\n\t\tmessage.NewBlockAnnounceMessage(blk, cert, proof))\n}\n\nfunc (cs *consensusV2) makeCertificate(votes map[crypto.Address]*vote.Vote,\n) *certificate.Certificate {\n\tcert := certificate.NewCertificate(cs.height, cs.round)\n\tvals := cs.validators\n\tcommitters := make([]int32, len(vals))\n\tabsentees := make([]int32, 0)\n\tsigs := make([]*bls.Signature, 0)\n\n\tfor i, val := range vals {\n\t\tvote := votes[val.Address()]\n\t\tif vote != nil {\n\t\t\tsigs = append(sigs, vote.Signature())\n\t\t} else {\n\t\t\tabsentees = append(absentees, val.Number())\n\t\t}\n\n\t\tcommitters[i] = val.Number()\n\t}\n\n\taggSig, _ := bls.SignatureAggregate(sigs...)\n\tcert.SetSignature(committers, absentees, aggSig)\n\n\treturn cert\n}\n\n// IsActive checks if the consensus is in an active state and participating in the consensus algorithm.\nfunc (cs *consensusV2) IsActive() bool {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.active\n}\n\nfunc (cs *consensusV2) Proposal() *proposal.Proposal {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\treturn cs.log.RoundProposal(cs.round)\n}\n\nfunc (cs *consensusV2) HandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tif !cs.active {\n\t\treturn nil\n\t}\n\n\tif height != cs.height {\n\t\treturn nil\n\t}\n\n\tif round != cs.round {\n\t\treturn nil\n\t}\n\n\tif cs.isProposer() {\n\t\treturn cs.log.RoundProposal(cs.round)\n\t}\n\n\tif cs.cpDecidedCert != nil {\n\t\t// It is decided not to change the proposer and the proposal is locked.\n\t\t// Locked proposals can be sent by all validators.\n\t\t// This helps prevent a situation where the proposer goes offline after proposing the block.\n\t\treturn cs.log.RoundProposal(cs.round)\n\t}\n\n\treturn nil\n}\n\n// TODO: Improve the performance?\nfunc (cs *consensusV2) HandleQueryVote(height types.Height, round types.Round) *vote.Vote {\n\tcs.lk.RLock()\n\tdefer cs.lk.RUnlock()\n\n\tif !cs.active {\n\t\treturn nil\n\t}\n\n\tif height != cs.height {\n\t\treturn nil\n\t}\n\n\tvotes := []*vote.Vote{}\n\tswitch {\n\tcase round < cs.round:\n\t\t// Past round: Only broadcast cp:decided votes\n\t\tvs := cs.log.CPDecidedVoteSet(round)\n\t\tvotes = append(votes, vs.AllVotes()...)\n\n\tcase round == cs.round:\n\t\t// Current round\n\t\tm := cs.log.RoundMessages(round)\n\t\tvotes = append(votes, m.AllVotes()...)\n\n\tcase round > cs.round:\n\t\t// Future round\n\t}\n\n\tif len(votes) == 0 {\n\t\treturn nil\n\t}\n\n\treturn votes[util.RandInt32(int32(len(votes)))]\n}\n\nfunc (cs *consensusV2) startChangingProposer() {\n\t// If it is not decided yet.\n\tif cs.cpDecidedCert == nil {\n\t\tcs.logger.Info(\"changing proposer started\",\n\t\t\t\"cpRound\", cs.cpRound, \"proposer\", cs.proposer(cs.round).Address())\n\t\tcs.enterNewState(cs.cpPreVoteState)\n\t}\n}\n\nfunc (cs *consensusV2) absoluteCommit() {\n\tprop := cs.log.RoundProposal(cs.round)\n\tif prop == nil {\n\t\treturn\n\t}\n\n\tprecommits := cs.log.PrecommitVoteSet(cs.round)\n\tif precommits.Has3FP1VotesFor(prop.Block().Hash()) {\n\t\tcs.logger.Debug(\"precommits has 3f+1 votes\", \"block\", prop.Block().Hash())\n\n\t\tcs.enterNewState(cs.commitState)\n\t}\n}\n\nfunc (*consensusV2) IsDeprecated() bool {\n\treturn false\n}\n"
  },
  {
    "path": "consensusv2/consensus_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n\t\"golang.org/x/exp/slices\"\n)\n\nconst (\n\ttIndexX = 0\n\ttIndexY = 1\n\ttIndexB = 2\n\ttIndexP = 3\n)\n\ntype consMessage struct {\n\tsender   crypto.Address\n\treceiver crypto.Address\n\tmessage  message.Message\n}\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tvalKeys    []*bls.ValidatorKey\n\tmockTxPool *txpool.MockTxPool\n\tgenDoc     *genesis.Genesis\n\tconsX      *consensusV2  // Good peer\n\tconsY      *consensusV2  // Good peer\n\tconsB      *consensusV2  // Byzantine or offline peer\n\tconsP      *consensusV2  // Partitioned peer\n\tnetwork    []consMessage // Network messages\n}\n\nfunc testConfig() *Config {\n\treturn &Config{\n\t\tChangeProposerTimeout: 1 * time.Hour, // Disabling timers\n\t\tChangeProposerDelta:   1 * time.Hour, // Disabling timers\n\t\tQueryVoteTimeout:      1 * time.Hour, // Disabling timers\n\t}\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\treturn setupWithSeed(t, testsuite.GenerateSeed())\n}\n\nfunc setupWithSeed(t *testing.T, seed int64) *testData {\n\tt.Helper()\n\n\tfmt.Printf(\"=== test %s, seed: %d\\n\", t.Name(), seed)\n\n\tts := testsuite.NewTestSuiteFromSeed(t, seed)\n\n\t_, valKeys := ts.GenerateTestCommittee(4)\n\tmockTxPool := txpool.NewMockTxPool(ts.Ctrl)\n\tmockTxPool.EXPECT().SetNewSandboxAndRecheck(gomock.Any()).Return().AnyTimes()\n\tmockTxPool.EXPECT().PrepareBlockTransactions().Return(nil).AnyTimes()\n\tmockTxPool.EXPECT().HandleCommittedBlock(gomock.Any()).Return().AnyTimes()\n\n\tvals := make([]*validator.Validator, 4)\n\tfor i, key := range valKeys {\n\t\tval := validator.NewValidator(key.PublicKey(), int32(i))\n\t\tvals[i] = val\n\t}\n\n\tacc := account.NewAccount(0)\n\tacc.AddToBalance(21 * 1e14)\n\taccs := map[crypto.Address]*account.Account{crypto.TreasuryAddress: acc}\n\tparams := genesis.DefaultGenesisParams()\n\tparams.CommitteeSize = 4\n\n\t// To prevent triggering timers before starting the tests and\n\t// avoid double entries for new heights in some tests.\n\tgetTime := util.RoundNow(params.BlockIntervalInSecond).\n\t\tAdd(time.Duration(params.BlockIntervalInSecond) * time.Second)\n\tgenDoc := genesis.MakeGenesis(getTime, accs, vals, params)\n\teventPipe := pipeline.New[any](t.Context())\n\tstateX, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexX]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateY, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexY]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateB, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexB]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\tstateP, err := state.LoadOrNewState(genDoc, []*bls.ValidatorKey{valKeys[tIndexP]},\n\t\tstore.MockingStore(ts), mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\n\tnetwork := make([]consMessage, 0)\n\ttd := &testData{\n\t\tTestSuite:  ts,\n\t\tvalKeys:    valKeys,\n\t\tmockTxPool: mockTxPool,\n\t\tgenDoc:     genDoc,\n\t\tnetwork:    network,\n\t}\n\tbroadcasterFunc := func(sender crypto.Address, msg message.Message) {\n\t\tfor _, key := range valKeys {\n\t\t\ttd.network = append(td.network,\n\t\t\t\tconsMessage{\n\t\t\t\t\tsender:   sender,\n\t\t\t\t\treceiver: key.Address(),\n\t\t\t\t\tmessage:  msg,\n\t\t\t\t})\n\t\t}\n\t}\n\ttd.consX = makeConsensus(t.Context(), testConfig(), stateX, valKeys[tIndexX],\n\t\tvalKeys[tIndexX].PublicKey().AccountAddress(), broadcasterFunc, newConcreteMediator())\n\ttd.consY = makeConsensus(t.Context(), testConfig(), stateY, valKeys[tIndexY],\n\t\tvalKeys[tIndexY].PublicKey().AccountAddress(), broadcasterFunc, newConcreteMediator())\n\ttd.consB = makeConsensus(t.Context(), testConfig(), stateB, valKeys[tIndexB],\n\t\tvalKeys[tIndexB].PublicKey().AccountAddress(), broadcasterFunc, newConcreteMediator())\n\ttd.consP = makeConsensus(t.Context(), testConfig(), stateP, valKeys[tIndexP],\n\t\tvalKeys[tIndexP].PublicKey().AccountAddress(), broadcasterFunc, newConcreteMediator())\n\n\t// -------------------------------\n\t// Better logging during testing\n\toverrideLogger := func(cons *consensusV2, name string) {\n\t\tcons.logger = logger.NewSubLogger(\"_consensus\",\n\t\t\ttestsuite.NewOverrideLogStringer(fmt.Sprintf(\"%s - %s: \", name, t.Name()), cons))\n\t}\n\n\toverrideLogger(td.consX, \"consX\")\n\toverrideLogger(td.consY, \"consY\")\n\toverrideLogger(td.consB, \"consB\")\n\toverrideLogger(td.consP, \"consP\")\n\t// -------------------------------\n\n\tlogger.Info(\"setup finished, start running the test\", \"name\", t.Name())\n\n\treturn td\n}\n\nfunc (td *testData) shouldNotPublish(t *testing.T, cons *consensusV2, msgType message.Type) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.network {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == msgType {\n\t\t\trequire.Fail(t, fmt.Sprintf(\"should not publish %s\", msgType))\n\t\t}\n\t}\n}\n\nfunc (td *testData) shouldPublishBlockAnnounce(t *testing.T, cons *consensusV2, hash hash.Hash) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.network {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeBlockAnnounce {\n\t\t\tm := consMsg.message.(*message.BlockAnnounceMessage)\n\t\t\tassert.Equal(t, hash, m.Block.Hash())\n\n\t\t\treturn\n\t\t}\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish block announce for block hash %s\", hash))\n}\n\nfunc (td *testData) shouldPublishProposal(t *testing.T, cons *consensusV2,\n\theight types.Height, round types.Round,\n) *proposal.Proposal {\n\tt.Helper()\n\n\tfor _, consMsg := range td.network {\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeProposal {\n\t\t\tm := consMsg.message.(*message.ProposalMessage)\n\t\t\trequire.Equal(t, height, m.Proposal.Height())\n\t\t\trequire.Equal(t, round, m.Proposal.Round())\n\n\t\t\treturn m.Proposal\n\t\t}\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish proposal for height %d and round %d\", height, round))\n\n\treturn nil\n}\n\nfunc (td *testData) shouldPublishQueryProposal(t *testing.T, cons *consensusV2,\n\theight types.Height, round types.Round,\n) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.network {\n\t\tif consMsg.sender != cons.valKey.Address() ||\n\t\t\tconsMsg.message.Type() != message.TypeQueryProposal {\n\t\t\tcontinue\n\t\t}\n\n\t\tm := consMsg.message.(*message.QueryProposalMessage)\n\t\tassert.Equal(t, m.Height, height)\n\t\tassert.Equal(t, m.Round, round)\n\t\tassert.Equal(t, m.Querier, cons.valKey.Address())\n\n\t\treturn\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish query proposal message for height %d and round %d\", height, round))\n}\n\nfunc (td *testData) shouldPublishQueryVote(t *testing.T, cons *consensusV2, height types.Height, round types.Round) {\n\tt.Helper()\n\n\tfor _, consMsg := range td.network {\n\t\tif consMsg.sender != cons.valKey.Address() ||\n\t\t\tconsMsg.message.Type() != message.TypeQueryVote {\n\t\t\tcontinue\n\t\t}\n\n\t\tm := consMsg.message.(*message.QueryVoteMessage)\n\t\tassert.Equal(t, m.Height, height)\n\t\tassert.Equal(t, m.Round, round)\n\t\tassert.Equal(t, m.Querier, cons.valKey.Address())\n\n\t\treturn\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish query vote message for height %d and round %d\", height, round))\n}\n\nfunc (td *testData) shouldPublishVote(t *testing.T, cons *consensusV2, voteType vote.Type, hash hash.Hash) *vote.Vote {\n\tt.Helper()\n\n\tfor i := len(td.network) - 1; i >= 0; i-- {\n\t\tconsMsg := td.network[i]\n\t\tif consMsg.sender == cons.valKey.Address() &&\n\t\t\tconsMsg.message.Type() == message.TypeVote {\n\t\t\tm := consMsg.message.(*message.VoteMessage)\n\t\t\tif m.Vote.Type() == voteType &&\n\t\t\t\tm.Vote.BlockHash() == hash {\n\t\t\t\treturn m.Vote\n\t\t\t}\n\t\t}\n\t}\n\trequire.Fail(t, fmt.Sprintf(\"should publish %s vote for block hash %s\", voteType, hash))\n\n\treturn nil\n}\n\nfunc (*testData) checkHeightRound(t *testing.T, cons *consensusV2, height types.Height, round types.Round) {\n\tt.Helper()\n\n\th, r := cons.HeightRound()\n\tassert.Equal(t, h, height)\n\tassert.Equal(t, r, round)\n}\n\nfunc (td *testData) addPrecommitVote(t *testing.T, cons *consensusV2, blockHash hash.Hash,\n\theight types.Height, round types.Round, valID int,\n) *vote.Vote {\n\tt.Helper()\n\n\tv := vote.NewPrecommitVote(blockHash, height, round, td.valKeys[valID].Address())\n\n\treturn td.addVote(t, cons, v, valID)\n}\n\nfunc (td *testData) addCPPreVote(t *testing.T, cons *consensusV2, blockHash hash.Hash,\n\theight types.Height, round types.Round, cpVal vote.CPValue, just vote.Just, valID int,\n) *vote.Vote {\n\tt.Helper()\n\n\tv := vote.NewCPPreVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\n\treturn td.addVote(t, cons, v, valID)\n}\n\nfunc (td *testData) addCPMainVote(t *testing.T, cons *consensusV2, blockHash hash.Hash,\n\theight types.Height, round types.Round, cpVal vote.CPValue, just vote.Just, valID int,\n) *vote.Vote {\n\tt.Helper()\n\n\tv := vote.NewCPMainVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\n\treturn td.addVote(t, cons, v, valID)\n}\n\nfunc (td *testData) addCPDecidedVote(t *testing.T, cons *consensusV2,\n\tblockHash hash.Hash, height types.Height, round types.Round,\n\tcpVal vote.CPValue, just vote.Just, valID int,\n) *vote.Vote {\n\tt.Helper()\n\n\tv := vote.NewCPDecidedVote(blockHash, height, round, 0, cpVal, just, td.valKeys[valID].Address())\n\n\treturn td.addVote(t, cons, v, valID)\n}\n\nfunc (td *testData) addVote(t *testing.T, cons *consensusV2, vote *vote.Vote, valID int) *vote.Vote {\n\tt.Helper()\n\n\ttd.HelperSignVote(td.valKeys[valID], vote)\n\tcons.AddVote(vote)\n\n\treturn vote\n}\n\nfunc (*testData) newHeightTimeout(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetNewHeight})\n\tcons.lk.Unlock()\n}\n\nfunc (*testData) queryProposalTimeout(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetQueryProposal})\n\tcons.lk.Unlock()\n}\n\nfunc (*testData) changeProposerTimeout(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetChangeProposer})\n\tcons.lk.Unlock()\n}\n\nfunc (*testData) queryVoteTimeout(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.currentState.onTimeout(&ticker{time.Hour, cons.height, cons.round, tickerTargetQueryVote})\n\tcons.lk.Unlock()\n}\n\n// enterNewHeight helps tests to enter new height safely\n// without scheduling new height. It boosts the test speed.\nfunc (td *testData) enterNewHeight(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.enterNewState(cons.newHeightState)\n\tcons.lk.Unlock()\n\n\ttd.newHeightTimeout(cons)\n}\n\n// enterNextRound helps tests to enter next round safely.\nfunc (*testData) enterNextRound(cons *consensusV2) {\n\tcons.lk.Lock()\n\tcons.round++\n\tcons.enterNewState(cons.proposeState)\n\tcons.lk.Unlock()\n}\n\nfunc (td *testData) commitBlockForAllStates(t *testing.T) (*block.Block, *certificate.Certificate) {\n\tt.Helper()\n\n\theight := td.consX.bcState.LastBlockHeight()\n\tvar err error\n\tprop := td.makeProposal(t, height+1, 0)\n\n\tcert := certificate.NewCertificate(height+1, 0)\n\tsb := cert.SignBytesPrecommit(prop.Block().Hash())\n\tsigX := td.consX.valKey.Sign(sb)\n\tsigY := td.consY.valKey.Sign(sb)\n\tsigP := td.consP.valKey.Sign(sb)\n\n\tsig, _ := bls.SignatureAggregate(sigX, sigY, sigP)\n\tcert.SetSignature([]int32{tIndexX, tIndexY, tIndexB, tIndexP}, []int32{tIndexB}, sig)\n\tblk := prop.Block()\n\n\terr = td.consX.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consY.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consB.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\terr = td.consP.bcState.CommitBlock(blk, cert)\n\trequire.NoError(t, err)\n\n\treturn blk, cert\n}\n\n// makeProposal generates a signed and valid proposal for the given height and round.\n// If rewardAddr is provided, it will be used instead of the consensus instance's default reward address.\nfunc (td *testData) makeProposal(t *testing.T, height types.Height, round types.Round, rewardAddr ...crypto.Address,\n) *proposal.Proposal {\n\tt.Helper()\n\n\tvar cons *consensusV2\n\tswitch uint32(height%4) + uint32(round%4) {\n\tcase 1:\n\t\tcons = td.consX\n\tcase 2:\n\t\tcons = td.consY\n\tcase 3:\n\t\tcons = td.consB\n\tcase 4, 0:\n\t\tcons = td.consP\n\t}\n\n\t// Use provided reward address or fall back to consensus instance's default\n\taddr := cons.rewardAddr\n\tif len(rewardAddr) > 0 {\n\t\taddr = rewardAddr[0]\n\t}\n\n\tblk, err := cons.bcState.ProposeBlock(cons.valKey, addr)\n\trequire.NoError(t, err)\n\tp := proposal.NewProposal(height, round, blk)\n\ttd.HelperSignProposal(cons.valKey, p)\n\n\treturn p\n}\n\n// makeChangeProposerJusts generates justifications for changing the proposer at the specified height and round.\n// If `proposal` is nil, it creates justifications for not changing the proposer;\n// otherwise, it generates justifications to change the proposer.\n// It returns three justifications:\n//\n//  1. `JustInitNo` if the proposal is set, or `JustInitYes` if not for the pre-vote step,\n//  2. `JustMainVoteNoConflict` for the main-vote step,\n//  3. `JustDecided` for the decided step.\nfunc (td *testData) makeChangeProposerJusts(t *testing.T, propBlockHash hash.Hash,\n\theight types.Height, round types.Round,\n) (preVoteJust, mainVoteJust, decidedJust vote.Just) {\n\tt.Helper()\n\n\tcpRound := int16(0)\n\n\t// Create PreVote Justification\n\tvar cpValue vote.CPValue\n\n\tif propBlockHash != hash.UndefHash {\n\t\tcpValue = vote.CPValueNo\n\t\tcommitters := make([]int32, 0, len(td.consP.validators))\n\t\tsigs := make([]*bls.Signature, 0, len(td.consP.validators))\n\t\tfor i, val := range td.consP.validators {\n\t\t\tvote := vote.NewPrecommitVote(propBlockHash, height, round, val.Address())\n\t\t\tsignBytes := vote.SignBytes()\n\n\t\t\tcommitters = append(committers, val.Number())\n\t\t\tsigs = append(sigs, td.valKeys[i].Sign(signBytes))\n\t\t}\n\t\taggSig, _ := bls.SignatureAggregate(sigs...)\n\t\tcert := certificate.NewCertificate(height, round)\n\t\tcert.SetSignature(committers, []int32{}, aggSig)\n\n\t\tpreVoteJust = &vote.JustInitNo{\n\t\t\tQCert: cert,\n\t\t}\n\t} else {\n\t\tcpValue = vote.CPValueYes\n\t\tpreVoteJust = &vote.JustInitYes{}\n\t}\n\n\t// Create MainVote Justification\n\tpreVoteCommitters := make([]int32, 0, len(td.consP.validators))\n\tpreVoteSigs := make([]*bls.Signature, 0, len(td.consP.validators))\n\tfor i, val := range td.consP.validators {\n\t\tpreVote := vote.NewCPPreVote(propBlockHash, height, round,\n\t\t\tcpRound, cpValue, preVoteJust, val.Address())\n\t\tsignBytes := preVote.SignBytes()\n\n\t\tpreVoteCommitters = append(preVoteCommitters, val.Number())\n\t\tpreVoteSigs = append(preVoteSigs, td.valKeys[i].Sign(signBytes))\n\t}\n\tpreVoteAggSig, _ := bls.SignatureAggregate(preVoteSigs...)\n\tcertPreVote := certificate.NewCertificate(height, round)\n\tcertPreVote.SetSignature(preVoteCommitters, []int32{}, preVoteAggSig)\n\tmainVoteJust = &vote.JustMainVoteNoConflict{QCert: certPreVote}\n\n\t// Create Decided Justification\n\tmainVoteCommitters := make([]int32, 0, len(td.consP.validators))\n\tmainVoteSigs := make([]*bls.Signature, 0, len(td.consP.validators))\n\tfor i, val := range td.consP.validators {\n\t\tmainVote := vote.NewCPMainVote(propBlockHash, height, round,\n\t\t\tcpRound, cpValue, mainVoteJust, val.Address())\n\t\tsignBytes := mainVote.SignBytes()\n\n\t\tmainVoteCommitters = append(mainVoteCommitters, val.Number())\n\t\tmainVoteSigs = append(mainVoteSigs, td.valKeys[i].Sign(signBytes))\n\t}\n\tmainVoteAggSig, _ := bls.SignatureAggregate(mainVoteSigs...)\n\tcertMainVote := certificate.NewCertificate(height, round)\n\tcertMainVote.SetSignature(mainVoteCommitters, []int32{}, mainVoteAggSig)\n\tdecidedJust = &vote.JustDecided{QCert: certMainVote}\n\n\treturn preVoteJust, mainVoteJust, decidedJust\n}\n\nfunc TestStart(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.consX.MoveToNewHeight()\n\n\ttd.checkHeightRound(t, td.consX, 1, 0)\n}\n\nfunc TestNotInCommittee(t *testing.T) {\n\ttd := setup(t)\n\n\tvalKey := td.RandValKey()\n\tstr := store.MockingStore(td.TestSuite)\n\n\tstate, _ := state.LoadOrNewState(td.genDoc, []*bls.ValidatorKey{valKey}, str, td.mockTxPool, nil)\n\tpipe := pipeline.New[message.Message](t.Context())\n\tconsInst := NewConsensus(t.Context(), testConfig(), state, valKey, valKey.Address(), pipe,\n\t\tnewConcreteMediator())\n\tcons := consInst.(*consensusV2)\n\n\ttd.enterNewHeight(cons)\n\ttd.newHeightTimeout(cons)\n\tassert.Equal(t, \"new-height\", cons.currentState.name())\n}\n\nfunc TestIsProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\tassert.False(t, td.consX.IsProposer())\n\tassert.True(t, td.consY.IsProposer())\n}\n\nfunc TestVoteWithInvalidHeight(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\ttd.enterNewHeight(td.consP)\n\n\tvote1 := td.addPrecommitVote(t, td.consP, td.RandHash(), 1, 0, tIndexX)\n\tvote2 := td.addPrecommitVote(t, td.consP, td.RandHash(), 2, 0, tIndexX)\n\tvote3 := td.addPrecommitVote(t, td.consP, td.RandHash(), 2, 0, tIndexY)\n\tvote4 := td.addPrecommitVote(t, td.consP, td.RandHash(), 3, 0, tIndexX)\n\n\trequire.False(t, td.consP.HasVote(vote1.Hash()))\n\trequire.True(t, td.consP.HasVote(vote2.Hash()))\n\trequire.True(t, td.consP.HasVote(vote3.Hash()))\n\trequire.False(t, td.consP.HasVote(vote4.Hash()))\n}\n\nfunc TestConsensusAbsoluteCommit(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consX)\n\ttd.checkHeightRound(t, td.consX, 2, 0)\n\n\tprop := td.makeProposal(t, 2, 0)\n\ttd.consX.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consX, vote.VoteTypePrecommit, prop.Block().Hash())\n\ttd.addPrecommitVote(t, td.consX, prop.Block().Hash(), 2, 0, tIndexY)\n\ttd.addPrecommitVote(t, td.consX, prop.Block().Hash(), 2, 0, tIndexB)\n\ttd.addPrecommitVote(t, td.consX, prop.Block().Hash(), 2, 0, tIndexP)\n\n\ttd.shouldPublishBlockAnnounce(t, td.consX, prop.Block().Hash())\n}\n\nfunc TestConsensusAddVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\tvote1 := td.addPrecommitVote(t, td.consP, td.RandHash(), 1, 0, tIndexX)\n\tvote2 := td.addPrecommitVote(t, td.consP, td.RandHash(), 1, 2, tIndexX)\n\tvote3 := td.addPrecommitVote(t, td.consP, td.RandHash(), 1, 1, tIndexX)\n\tvote4 := td.addPrecommitVote(t, td.consP, td.RandHash(), 2, 0, tIndexX)\n\tvote5, _ := td.GenerateTestPrecommitVote(1, 0)\n\ttd.consP.AddVote(vote5)\n\n\tassert.False(t, td.consP.HasVote(vote1.Hash())) // previous round\n\tassert.True(t, td.consP.HasVote(vote2.Hash()))  // next round\n\tassert.True(t, td.consP.HasVote(vote3.Hash()))\n\tassert.False(t, td.consP.HasVote(vote4.Hash())) // valid votes for the next height\n\tassert.False(t, td.consP.HasVote(vote5.Hash())) // invalid votes\n\n\tassert.Equal(t, []*vote.Vote{vote3}, td.consP.AllVotes())\n\tassert.NotContains(t, td.consP.AllVotes(), vote2)\n}\n\n// TestConsensusDelayedProposal tests the scenario where a node receives votes\n// before receiving the proposal due to network delays.\nfunc TestConsensusDelayedProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\tblockHash := prop.Block().Hash()\n\n\t// consP receives other votes first\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexY)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexB)\n\n\t// consP receives proposal now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, blockHash)\n\ttd.shouldPublishBlockAnnounce(t, td.consP, blockHash)\n}\n\n// TestConsensusDelayedVote tests the scenario where a node receives votes\n// after timing out due to network delays.\nfunc TestConsensusDelayedVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\tblockHash := prop.Block().Hash()\n\n\ttd.consP.SetProposal(prop)\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, blockHash)\n\n\t// consP moves to change proposer state\n\ttd.changeProposerTimeout(td.consP)\n\n\t// consP receives other votes now\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexY)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexB)\n\n\ttd.shouldPublishBlockAnnounce(t, td.consP, blockHash)\n}\n\nfunc TestHandleQueryVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(2)\n\n\tassert.Nil(t, td.consP.HandleQueryVote(height, 0))\n\n\t// round 0\n\tpreVoteJust, mainVoteJust, decidedJust := td.makeChangeProposerJusts(t, hash.UndefHash, height, 0)\n\tr0Vote1 := td.addCPPreVote(t, td.consP, hash.UndefHash, height, 0, vote.CPValueYes, preVoteJust, tIndexY)\n\tr0Vote2 := td.addCPMainVote(t, td.consP, hash.UndefHash, height, 0, vote.CPValueYes, mainVoteJust, tIndexY)\n\tr0Vote3 := td.addCPDecidedVote(t, td.consP, hash.UndefHash, height, 0, vote.CPValueYes, decidedJust, tIndexY)\n\n\t// round 1\n\ttd.enterNextRound(td.consP)\n\n\thash := td.RandHash()\n\tpreVoteJust, mainVoteJust, decidedJust = td.makeChangeProposerJusts(t, hash, height, 1)\n\tr1Vote1 := td.addPrecommitVote(t, td.consP, td.RandHash(), height, 1, tIndexY)\n\tr1Vote2 := td.addCPPreVote(t, td.consP, hash, height, 1, vote.CPValueNo, preVoteJust, tIndexY)\n\tr1Vote3 := td.addCPMainVote(t, td.consP, hash, height, 1, vote.CPValueNo, mainVoteJust, tIndexY)\n\tr1Vote4 := td.addCPDecidedVote(t, td.consP, hash, height, 1, vote.CPValueNo, decidedJust, tIndexY)\n\n\t// Round 2\n\ttd.enterNextRound(td.consP)\n\n\ttd.addPrecommitVote(t, td.consP, td.RandHash(), height, 2, tIndexY)\n\n\trequire.True(t, td.consP.HasVote(r0Vote1.Hash()))\n\trequire.True(t, td.consP.HasVote(r0Vote2.Hash()))\n\trequire.True(t, td.consP.HasVote(r0Vote3.Hash()))\n\trequire.True(t, td.consP.HasVote(r1Vote1.Hash()))\n\trequire.True(t, td.consP.HasVote(r1Vote2.Hash()))\n\trequire.True(t, td.consP.HasVote(r1Vote3.Hash()))\n\trequire.True(t, td.consP.HasVote(r1Vote4.Hash()))\n\n\trndVote0 := td.consP.HandleQueryVote(height, 0)\n\tassert.Equal(t, r0Vote3, rndVote0, \"should send the decided vote for the round 0\")\n\n\trndVote1 := td.consP.HandleQueryVote(height, 1)\n\tassert.Equal(t, r1Vote4, rndVote1, \"should send the decided vote for the round 1\")\n\n\trndVote2 := td.consP.HandleQueryVote(height, 2)\n\tassert.Equal(t, types.Round(2), rndVote2.Round(), \"should send the precommit vote for the current round\")\n\n\trndVote3 := td.consP.HandleQueryVote(height, 3)\n\tassert.Nil(t, rndVote3, \"should not send a vote for the next round\")\n\n\trndVote4 := td.consP.HandleQueryVote(height+1, 0)\n\tassert.Nil(t, rndVote4, \"should not have a vote for the next height\")\n}\n\nfunc TestHandleQueryProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\t// Round 1\n\ttd.enterNextRound(td.consX)\n\ttd.enterNextRound(td.consY) // consY is the proposer\n\ttd.consX.SetProposal(td.consY.Proposal())\n\n\theight := types.Height(1)\n\tround := types.Round(1)\n\n\tprop0 := td.consY.HandleQueryProposal(height, round-1)\n\tassert.Nil(t, prop0, \"proposer should not send a proposal for the previous round\")\n\n\tprop1 := td.consX.HandleQueryProposal(height, round)\n\tassert.Nil(t, prop1, \"non-proposer should not send a proposal\")\n\n\tprop2 := td.consY.HandleQueryProposal(height, round)\n\tassert.NotNil(t, prop2, \"proposer should send a proposal\")\n\n\ttd.consX.cpDecidedCert = td.GenerateTestCertificate(1) // TODO: better way?\n\tprop3 := td.consX.HandleQueryProposal(height, round)\n\tassert.NotNil(t, prop3, \"non-proposer should send a proposal on decided proposal\")\n\n\tprop4 := td.consX.HandleQueryProposal(height+1, 0)\n\tassert.Nil(t, prop4, \"should not have a proposal for the next height\")\n}\n\nfunc TestSetProposalFromPreviousRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\t// It should ignore proposals for previous rounds\n\tprop := td.makeProposal(t, 1, 0)\n\ttd.consP.SetProposal(prop)\n\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.checkHeightRound(t, td.consP, 1, 1)\n}\n\nfunc TestSetProposalFromPreviousHeight(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\ttd.enterNewHeight(td.consP)\n\n\tprop := td.makeProposal(t, 1, 0)\n\ttd.consP.SetProposal(prop)\n\n\tassert.Nil(t, td.consP.Proposal())\n\ttd.checkHeightRound(t, td.consP, 2, 0)\n}\n\nfunc TestDoubleProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\theight := types.Height(4)\n\tround := types.Round(0)\n\tprop1 := td.makeProposal(t, height, round, td.RandAccAddress())\n\tprop2 := td.makeProposal(t, height, round, td.RandAccAddress())\n\tassert.NotEqual(t, prop1.Hash(), prop2.Hash())\n\n\ttd.consX.SetProposal(prop1)\n\ttd.consX.SetProposal(prop2)\n\n\tassert.Equal(t, td.consX.Proposal().Hash(), prop1.Hash())\n}\n\nfunc TestNonActiveValidator(t *testing.T) {\n\ttd := setup(t)\n\n\tvalKey := td.RandValKey()\n\tpipe := pipeline.New[message.Message](t.Context())\n\tconsInst := NewConsensus(t.Context(), testConfig(), state.MockingState(td.TestSuite),\n\t\tvalKey, valKey.Address(), pipe, newConcreteMediator())\n\tnonActiveCons := consInst.(*consensusV2)\n\n\tt.Run(\"non-active instances should be in new-height state\", func(t *testing.T) {\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\t// Double entry\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\tassert.False(t, nonActiveCons.IsActive())\n\t\tassert.Equal(t, \"new-height\", nonActiveCons.currentState.name())\n\t})\n\n\tt.Run(\"non-active instances should ignore proposals\", func(t *testing.T) {\n\t\tprop := td.makeProposal(t, 1, 0)\n\t\tnonActiveCons.SetProposal(prop)\n\n\t\tassert.Nil(t, nonActiveCons.Proposal())\n\t})\n\n\tt.Run(\"non-active instances should ignore votes\", func(t *testing.T) {\n\t\tv := td.addPrecommitVote(t, nonActiveCons, td.RandHash(), 1, 0, tIndexX)\n\n\t\tassert.False(t, nonActiveCons.HasVote(v.Hash()))\n\t})\n\n\tt.Run(\"non-active instances should move to new height\", func(t *testing.T) {\n\t\tb1, cert1 := td.commitBlockForAllStates(t)\n\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.checkHeightRound(t, nonActiveCons, 1, 0)\n\n\t\trequire.NoError(t, nonActiveCons.bcState.CommitBlock(b1, cert1))\n\n\t\tnonActiveCons.MoveToNewHeight()\n\t\ttd.newHeightTimeout(nonActiveCons)\n\t\ttd.checkHeightRound(t, nonActiveCons, 2, 0)\n\t})\n}\n\nfunc TestVoteWithBigRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\tvote := td.addPrecommitVote(t, td.consX, td.RandHash(), 1, types.Round(util.MaxInt16), tIndexB)\n\tassert.True(t, td.consX.HasVote(vote.Hash()))\n}\n\nfunc TestProposalWithBigRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\tprop := td.makeProposal(t, 1, types.Round(util.MaxInt16))\n\ttd.consP.SetProposal(prop)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\nfunc TestInvalidProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\tprop := td.makeProposal(t, 1, 0)\n\tprop.SetSignature(nil) // Make proposal invalid\n\ttd.consP.SetProposal(prop)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\n// TestCases runs some special cases to test the consensus algorithm.\nfunc TestCasesNormal(t *testing.T) {\n\ttests := []struct {\n\t\tseed        int64\n\t\tcertRound   types.Round\n\t\tdescription string\n\t}{\n\t\t{1758015756630707317, 1, \"precommit: startChangingProposer on 1f+1 pre-votes\"},\n\t\t{1758013793525473037, 1, \"cp_prevote: has one main-vote for `yes` from previous round\"},\n\t\t{1758014151948449992, 0, \"cp_prevote: all main-votes are `abstain` from previous round\"},\n\t\t{1758014780626270377, 2, \"cp_mainvote: has 2f+1 pre-votes for `no`, decided on `no (biased)`\"},\n\t\t{1758014728375405734, 1, \"cp_mainvote: has 2f+1 pre-votes for `yes`\"},\n\t\t{1758014840359554900, 1, \"cp_mainvote: has no pre-votes quorum\"},\n\t\t{1758015210671486317, 2, \"cp_decide: decide on `yes`\"},\n\t\t{1758015258023425309, 0, \"cp_decide: conflicting main-votes\"},\n\t\t{1758015607471650150, 0, \"cons.cpRound = 1, decided vote for `yes` in cpRound 0\"},\n\t}\n\n\tfor _, tt := range tests {\n\t\ttd := setupWithSeed(t, tt.seed)\n\t\tcert := td.executeConsensusNormal(t)\n\n\t\trequire.Equal(t, tt.certRound, cert.Round(),\n\t\t\t\"test '%s' failed. round not matched (expected %d, got %d)\",\n\t\t\ttt.description, tt.certRound, cert.Round())\n\t}\n}\n\n// TestConsensusNormal runs multiple iterations of the consensus process to\n// ensure stability and correctness across repeated executions.\n// If the consensus process fails in any iteration, the test will fail.\n// A random seed is generated for each iteration, allowing the test to be\n// reproduced deterministically with same seed.\n// This test doesn't involve any Byzantine behavior or network partitions.\nfunc TestConsensusNormal(t *testing.T) {\n\tfor i := 0; i < 10; i++ {\n\t\ttd := setup(t)\n\t\ttd.executeConsensusNormal(t)\n\t}\n}\n\nfunc (td *testData) executeConsensusNormal(t *testing.T) *certificate.Certificate {\n\tt.Helper()\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\ttd.enterNewHeight(td.consB)\n\ttd.enterNewHeight(td.consP)\n\n\tcert, err := executeConsensus(td, td.RandBool())\n\trequire.NoError(t, err)\n\trequire.Equal(t, cert.Height(), height)\n\n\treturn cert\n}\n\nfunc TestCasesByzantine(t *testing.T) {\n\ttests := []struct {\n\t\tseed        int64\n\t\tcertRound   types.Round\n\t\tdescription string\n\t}{\n\t\t{1758019943838125552, 0, \"double proposal detected\"},\n\t}\n\n\tfor _, tt := range tests {\n\t\ttd := setupWithSeed(t, tt.seed)\n\t\tcert := td.executeConsensusByzantine(t)\n\n\t\trequire.Equal(t, tt.certRound, cert.Round(),\n\t\t\t\"test '%s' failed. round not matched (expected %d, got %d)\",\n\t\t\ttt.description, tt.certRound, cert.Round())\n\t}\n}\n\n// TestConsensusByzantine tests a scenario involving a Byzantine node and a network partition.\n//\n// We have four nodes: X, Y, B, and P, which:\n// - B is a Byzantine node\n// - X, Y, and P are honest nodes\n// - However, P is partitioned and perceives the network through B.\n//\n// Byzantine node B acts maliciously by double proposing:\n// sending one proposal to X and Y, and another proposal to P.\n// Consensus halts because X and Y cannot reach consensus without P,\n// and P cannot reach consensus without X and Y.\n//\n// The network partition is healed after some time.\n// Once the partition is healed, honest nodes can reach consensus.\n//\n// The Byzantine node B acts maliciously by double proposing and double voting in this test.\nfunc TestConsensusByzantine(t *testing.T) {\n\tfor i := 0; i < 10; i++ {\n\t\ttd := setup(t)\n\t\ttd.executeConsensusByzantine(t)\n\t}\n}\n\nfunc (td *testData) executeConsensusByzantine(t *testing.T) *certificate.Certificate {\n\tt.Helper()\n\n\ttd.commitBlockForAllStates(t)\n\ttd.commitBlockForAllStates(t)\n\n\theight := types.Height(3)\n\tround := types.Round(0)\n\n\t// =================================\n\t// Byzantine node B\n\tprop1 := td.makeProposal(t, height, round, td.RandAccAddress())\n\tprop2 := td.makeProposal(t, height, round, td.RandAccAddress())\n\n\trequire.NotEqual(t, prop1.Block().Hash(), prop2.Block().Hash())\n\trequire.Equal(t, td.consB.valKey.Address(), prop1.Block().Header().ProposerAddress())\n\trequire.Equal(t, td.consB.valKey.Address(), prop2.Block().Header().ProposerAddress())\n\n\t// =================================\n\t// Honest nodes X, Y\n\ttd.enterNewHeight(td.consX)\n\ttd.enterNewHeight(td.consY)\n\n\ttd.consX.SetProposal(prop1)\n\ttd.consY.SetProposal(prop1)\n\n\tvoteX := td.shouldPublishVote(t, td.consX, vote.VoteTypePrecommit, prop1.Block().Hash())\n\tvoteY := td.shouldPublishVote(t, td.consY, vote.VoteTypePrecommit, prop1.Block().Hash())\n\n\t// Byzantine node partitioned the network and blocked the Node P.\n\t// X and Y request to change proposer\n\n\ttd.changeProposerTimeout(td.consX)\n\ttd.changeProposerTimeout(td.consY)\n\n\t// X and Y are unable to progress...\n\n\t// =================================\n\t// Honest node P, partitioned node\n\ttd.enterNewHeight(td.consP)\n\n\t// P receives the second proposal\n\ttd.consP.SetProposal(prop2)\n\n\tvoteP := td.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop2.Block().Hash())\n\n\t// Request to change proposer\n\ttd.changeProposerTimeout(td.consP)\n\n\t// P is unable to progress...\n\n\t// =================================\n\t// Byzantine node B votes on both proposals\n\tbyzVote1 := vote.NewPrecommitVote(prop1.Block().Hash(), height, round, td.consB.valKey.Address())\n\tbyzVote2 := vote.NewPrecommitVote(prop2.Block().Hash(), height, round, td.consB.valKey.Address())\n\ttd.HelperSignVote(td.consB.valKey, byzVote1)\n\ttd.HelperSignVote(td.consB.valKey, byzVote2)\n\n\taggSig1, _ := bls.SignatureAggregate(voteX.Signature(), voteY.Signature())\n\taggSig2, _ := bls.SignatureAggregate(voteP.Signature(), byzVote1.Signature())\n\tcert1 := certificate.NewCertificate(height, round)\n\tcert1.SetSignature([]int32{tIndexX, tIndexY, tIndexB, tIndexP}, []int32{tIndexB, tIndexP}, aggSig1)\n\n\tcert2 := certificate.NewCertificate(height, round)\n\tcert2.SetSignature([]int32{tIndexX, tIndexY, tIndexB, tIndexP}, []int32{tIndexX, tIndexY}, aggSig2)\n\n\tbyzVote3 := vote.NewCPPreVote(prop1.Block().Hash(), height, round, 0, vote.CPValueNo,\n\t\t&vote.JustInitNo{QCert: cert1}, td.consB.valKey.Address())\n\tbyzVote4 := vote.NewCPPreVote(prop2.Block().Hash(), height, round, 0, vote.CPValueNo,\n\t\t&vote.JustInitNo{QCert: cert2}, td.consB.valKey.Address())\n\n\ttd.HelperSignVote(td.consB.valKey, byzVote2)\n\ttd.HelperSignVote(td.consB.valKey, byzVote3)\n\n\ttd.consB.broadcastVote(byzVote1)\n\ttd.consB.broadcastVote(byzVote2)\n\ttd.consB.broadcastVote(byzVote3)\n\ttd.consB.broadcastVote(byzVote4)\n\n\t// =================================\n\t// Now, Partition heals\n\tfmt.Println(\"== Partition heals\")\n\ttd.checkHeightRound(t, td.consX, height, round)\n\ttd.checkHeightRound(t, td.consY, height, round)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\tcert, err := executeConsensus(td, true)\n\trequire.NoError(t, err)\n\trequire.Equal(t, cert.Height(), height)\n\n\treturn cert\n}\n\n// executeConsensus runs the consensus algorithm until it reaches consensus or the network is exhausted.\n// If `withoutByzantineNode` is true, it simulates the scenario where the Byzantine node goes offline.\n// It returns the certificate of the committed block if consensus is reached,\n// or an error if consensus is violated or cannot be reached.\nfunc executeConsensus(td *testData, withoutByzantineNode bool) (\n\t*certificate.Certificate, error,\n) {\n\tinstances := []*consensusV2{td.consX, td.consY, td.consB, td.consP}\n\n\tif withoutByzantineNode {\n\t\t// remove byzantine node (Byzantine node goes offline)\n\t\tinstances = []*consensusV2{td.consX, td.consY, td.consP}\n\t}\n\n\t// 50% chance for the first proposal to be lost,\n\t// then decrease the chance by 5% for each iteration.\n\tchangeProposerChance := 50\n\n\tblockAnnounces := map[crypto.Address]*message.BlockAnnounceMessage{}\n\tfor len(td.network) > 0 {\n\t\trndIndex := td.RandIntMax(len(td.network))\n\t\trndMsg := td.network[rndIndex]\n\t\ttd.network = slices.Delete(td.network, rndIndex, rndIndex+1)\n\n\t\tswitch rndMsg.message.Type() {\n\t\tcase message.TypeVote:\n\t\t\tm := rndMsg.message.(*message.VoteMessage)\n\t\t\tfor _, cons := range instances {\n\t\t\t\tif cons.valKey.Address() == rndMsg.receiver {\n\t\t\t\t\tcons.AddVote(m.Vote)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeProposal:\n\t\t\tm := rndMsg.message.(*message.ProposalMessage)\n\t\t\tfor _, cons := range instances {\n\t\t\t\tif cons.valKey.Address() == rndMsg.receiver {\n\t\t\t\t\tcons.SetProposal(m.Proposal)\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeQueryProposal:\n\t\t\tm := rndMsg.message.(*message.QueryProposalMessage)\n\t\t\tfor _, cons := range instances {\n\t\t\t\tp := cons.HandleQueryProposal(m.Height, m.Round)\n\t\t\t\tif p != nil {\n\t\t\t\t\ttd.network = append(td.network, consMessage{\n\t\t\t\t\t\tsender:  cons.valKey.Address(),\n\t\t\t\t\t\tmessage: message.NewProposalMessage(p),\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase message.TypeQueryVote:\n\t\t\t// To make the test reproducible, we ignore the QueryVote message.\n\t\t\t// This is because QueryVote returns a random vote that can make the test non-reproducible.\n\n\t\tcase message.TypeBlockAnnounce:\n\t\t\tm := rndMsg.message.(*message.BlockAnnounceMessage)\n\t\t\tblockAnnounces[rndMsg.sender] = m\n\n\t\tcase\n\t\t\tmessage.TypeHello,\n\t\t\tmessage.TypeHelloAck,\n\t\t\tmessage.TypeTransaction,\n\t\t\tmessage.TypeBlocksRequest,\n\t\t\tmessage.TypeBlocksResponse:\n\t\t\t//\n\t\t}\n\n\t\tfor _, cons := range instances {\n\t\t\trnd := td.RandIntMax(100)\n\t\t\tif rnd < changeProposerChance ||\n\t\t\t\tlen(td.network) == 0 {\n\t\t\t\ttd.changeProposerTimeout(cons)\n\t\t\t}\n\t\t}\n\t\tchangeProposerChance -= 5\n\t}\n\n\t// Verify whether more than (1f+1) nodes have committed to the same block.\n\tif len(blockAnnounces) >= 2 {\n\t\tvar firstAnnounce *message.BlockAnnounceMessage\n\t\tfor _, msg := range blockAnnounces {\n\t\t\tif firstAnnounce == nil {\n\t\t\t\tfirstAnnounce = msg\n\t\t\t} else if msg.Block.Hash() != firstAnnounce.Block.Hash() {\n\t\t\t\treturn nil, fmt.Errorf(\"consensus violated, seed %v\", td.TestSuite.Seed)\n\t\t\t}\n\t\t}\n\n\t\t// everything is ok\n\t\treturn firstAnnounce.Certificate, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"unable to reach consensus, seed %v\", td.TestSuite.Seed)\n}\n"
  },
  {
    "path": "consensusv2/cp.go",
    "content": "package consensusv2\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype changeProposer struct {\n\t*consensusV2\n}\n\nfunc (*changeProposer) onSetProposal(_ *proposal.Proposal) {\n\t// Ignore proposal\n}\n\nfunc (cp *changeProposer) onTimeout(t *ticker) {\n\tif t.Target == tickerTargetQueryVote {\n\t\tcp.queryVote()\n\t\tcp.scheduleTimeout(t.Duration*2, cp.height, cp.round, tickerTargetQueryVote)\n\t}\n}\n\nfunc (*changeProposer) cpCheckCPValue(value vote.CPValue, allowedValues ...vote.CPValue) error {\n\tif slices.Contains(allowedValues, value) {\n\t\treturn nil\n\t}\n\n\treturn InvalidJustificationError{\n\t\tReason: fmt.Sprintf(\"invalid value: %v\", value),\n\t}\n}\n\nfunc (cp *changeProposer) cpCheckJustInitNo(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustInitNo)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\tif cpRound != 0 {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"invalid round: %v\", cpRound),\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueNo)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = j.QCert.ValidatePrecommit(cp.validators, blockHash)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustInitYes(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\t_, ok := just.(*vote.JustInitYes)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\tif cpRound != 0 {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"invalid round: %v\", cpRound),\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !blockHash.IsUndef() {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"invalid block hash: %s\", blockHash),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustPreVoteHard(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustPreVoteHard)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\tif cpRound == 0 {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueNo, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = j.QCert.ValidateCPPreVote(cp.validators,\n\t\tblockHash, cpRound-1, byte(cpValue))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustPreVoteSoft(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustPreVoteSoft)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\tif cpRound == 0 {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueNo, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = j.QCert.ValidateCPMainVote(cp.validators,\n\t\tblockHash, cpRound-1, byte(vote.CPValueAbstain))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustMainVoteNoConflict(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustMainVoteNoConflict)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueNo, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = j.QCert.ValidateCPPreVote(cp.validators,\n\t\tblockHash, cpRound, byte(cpValue))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustMainVoteConflict(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustMainVoteConflict)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueAbstain)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch j.JustNo.Type() {\n\tcase vote.JustTypeInitNo:\n\t\terr := cp.cpCheckJustInitNo(j.JustNo, blockHash, cpRound, vote.CPValueNo)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tcase vote.JustTypePreVoteHard:\n\t\terr := cp.cpCheckJustPreVoteHard(j.JustNo, blockHash, cpRound, vote.CPValueNo)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tcase vote.JustTypePreVoteSoft:\n\t\terr := cp.cpCheckJustPreVoteSoft(j.JustNo, blockHash, cpRound, vote.CPValueNo)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase vote.JustTypeInitYes,\n\t\tvote.JustTypeMainVoteConflict,\n\t\tvote.JustTypeMainVoteNoConflict,\n\t\tvote.JustTypeDecided:\n\t\treturn InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"unexpected justification: %s\", j.JustNo.Type()),\n\t\t}\n\t}\n\n\tswitch j.JustYes.Type() {\n\tcase vote.JustTypeInitYes:\n\t\terr := cp.cpCheckJustInitYes(j.JustYes, hash.UndefHash, cpRound, vote.CPValueYes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase vote.JustTypePreVoteHard:\n\t\terr := cp.cpCheckJustPreVoteHard(j.JustYes, hash.UndefHash, cpRound, vote.CPValueYes)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\tcase vote.JustTypeInitNo,\n\t\tvote.JustTypePreVoteSoft,\n\t\tvote.JustTypeMainVoteConflict,\n\t\tvote.JustTypeMainVoteNoConflict,\n\t\tvote.JustTypeDecided:\n\t\treturn InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"unexpected justification: %s\", j.JustYes.Type()),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJustDecide(just vote.Just,\n\tblockHash hash.Hash, cpRound int16, cpValue vote.CPValue,\n) error {\n\tj, ok := just.(*vote.JustDecided)\n\tif !ok {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: \"invalid just data\",\n\t\t}\n\t}\n\n\terr := cp.cpCheckCPValue(cpValue, vote.CPValueNo, vote.CPValueYes)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = j.QCert.ValidateCPMainVote(cp.validators,\n\t\tblockHash, cpRound, byte(cpValue))\n\tif err != nil {\n\t\treturn InvalidJustificationError{\n\t\t\tReason: err.Error(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cp *changeProposer) cpCheckJust(vte *vote.Vote) error {\n\tswitch vte.CPJust().Type() {\n\tcase vote.JustTypeInitYes:\n\t\treturn cp.cpCheckJustInitYes(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypeInitNo:\n\t\treturn cp.cpCheckJustInitNo(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypePreVoteSoft:\n\t\treturn cp.cpCheckJustPreVoteSoft(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypePreVoteHard:\n\t\treturn cp.cpCheckJustPreVoteHard(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypeMainVoteNoConflict:\n\t\treturn cp.cpCheckJustMainVoteNoConflict(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypeMainVoteConflict:\n\t\treturn cp.cpCheckJustMainVoteConflict(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tcase vote.JustTypeDecided:\n\t\treturn cp.cpCheckJustDecide(vte.CPJust(),\n\t\t\tvte.BlockHash(), vte.CPRound(), vte.CPValue())\n\n\tdefault:\n\t\tpanic(\"unreachable\")\n\t}\n}\n\n// cpStrongTermination decides if the Change Proposer phase should be terminated.\n// If there is only one proper and justified `Decided` vote, the validators can\n// move on to the next phase.\n// If the `Decided` vote is for \"No\", then validators move to the precommit step and\n// wait for committing the current proposal by gathering enough precommit votes.\n// If the `Decided` vote is for \"Yes\", then the validator moves to the propose step\n// and starts a new round.\nfunc (cp *changeProposer) cpStrongTermination() {\n\tcpDecided := cp.log.CPDecidedVoteSet(cp.round)\n\tfor cpRound := cp.cpRound; cpRound >= 0; cpRound-- {\n\t\tif cpDecided.HasAnyVoteFor(cpRound, vote.CPValueYes) {\n\t\t\tcp.round++\n\t\t\tcp.enterNewState(cp.proposeState)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "consensusv2/cp_decide.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpDecideState struct {\n\t*changeProposer\n}\n\nfunc (s *cpDecideState) enter() {\n\ts.decide()\n}\n\nfunc (s *cpDecideState) decide() {\n\tcpMainVotes := s.log.CPMainVoteVoteSet(s.round)\n\tif cpMainVotes.Has2FP1Votes(s.cpRound) {\n\t\tswitch {\n\t\tcase cpMainVotes.Has2FP1VotesFor(s.cpRound, vote.CPValueNo):\n\t\t\ts.logger.Panic(\"unreachable state: decide on 'no (biased)' should be handled in pre-vote state\")\n\n\t\tcase cpMainVotes.Has2FP1VotesFor(s.cpRound, vote.CPValueYes):\n\t\t\ts.logger.Info(\"binary agreement decided\", \"value\", \"yes\", \"round\", s.cpRound)\n\n\t\t\t// decided for yes, and proceeds to the next round\n\t\t\tvotes := cpMainVotes.BinaryVotes(s.cpRound, vote.CPValueYes)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustDecided{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPDecidedVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\n\t\tdefault:\n\t\t\t// conflicting votes\n\t\t\ts.logger.Debug(\"conflicting main votes\", \"round\", s.cpRound)\n\t\t\ts.cpRound++\n\t\t\ts.enterNewState(s.cpPreVoteState)\n\t\t}\n\t}\n\n\ts.cpStrongTermination()\n\ts.absoluteCommit()\n}\n\nfunc (s *cpDecideState) onAddVote(_ *vote.Vote) {\n\ts.decide()\n}\n\nfunc (*cpDecideState) name() string {\n\treturn \"cp:decide\"\n}\n"
  },
  {
    "path": "consensusv2/cp_mainvote.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpMainVoteState struct {\n\t*changeProposer\n}\n\nfunc (s *cpMainVoteState) enter() {\n\ts.decide()\n}\n\nfunc (s *cpMainVoteState) decide() {\n\ts.checkForWeakValidity()\n\ts.detectDoubleProposal()\n\n\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\tif cpPreVotes.Has2FP1Votes(s.cpRound) {\n\t\tswitch {\n\t\tcase cpPreVotes.Has2FP1VotesFor(s.cpRound, vote.CPValueNo):\n\t\t\ts.logger.Debug(\"cp: quorum for pre-votes\", \"value\", \"no\")\n\n\t\t\tvotes := cpPreVotes.BinaryVotes(s.cpRound, vote.CPValueNo)\n\t\t\ts.cpDecidedCert = s.makeCertificate(votes)\n\t\t\ts.enterNewState(s.precommitState)\n\n\t\tcase cpPreVotes.Has2FP1VotesFor(s.cpRound, vote.CPValueYes):\n\t\t\ts.logger.Debug(\"cp: quorum for pre-votes\", \"value\", \"yes\")\n\n\t\t\tvotes := cpPreVotes.BinaryVotes(s.cpRound, vote.CPValueYes)\n\t\t\tcert := s.makeCertificate(votes)\n\t\t\tjust := &vote.JustMainVoteNoConflict{\n\t\t\t\tQCert: cert,\n\t\t\t}\n\t\t\ts.signAddCPMainVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\t\t\ts.enterNewState(s.cpDecideState)\n\n\t\tdefault:\n\t\t\ts.logger.Debug(\"cp: no-quorum for pre-votes\", \"value\", \"abstain\")\n\n\t\t\tvote0 := cpPreVotes.GetRandomVote(s.cpRound, vote.CPValueNo)\n\t\t\tvote1 := cpPreVotes.GetRandomVote(s.cpRound, vote.CPValueYes)\n\n\t\t\tjust := &vote.JustMainVoteConflict{\n\t\t\t\tJustNo:  vote0.CPJust(),\n\t\t\t\tJustYes: vote1.CPJust(),\n\t\t\t}\n\n\t\t\ts.signAddCPMainVote(s.cpWeakValidity, s.cpRound, vote.CPValueAbstain, just)\n\t\t\ts.enterNewState(s.cpDecideState)\n\t\t}\n\t}\n\n\ts.cpStrongTermination()\n\ts.absoluteCommit()\n}\n\nfunc (s *cpMainVoteState) checkForWeakValidity() {\n\tif s.cpWeakValidity != hash.UndefHash {\n\t\treturn\n\t}\n\n\tpreVotes := s.log.CPPreVoteVoteSet(s.round)\n\trandVote := preVotes.GetRandomVote(s.cpRound, vote.CPValueNo)\n\tif randVote != nil {\n\t\ts.cpWeakValidity = randVote.BlockHash()\n\t}\n}\n\nfunc (s *cpMainVoteState) detectDoubleProposal() {\n\tif s.cpWeakValidity == hash.UndefHash {\n\t\treturn\n\t}\n\n\troundProposal := s.log.RoundProposal(s.round)\n\tif roundProposal != nil &&\n\t\troundProposal.Block().Hash() != s.cpWeakValidity {\n\t\ts.logger.Warn(\"double proposal detected\",\n\t\t\t\"prepared\", s.cpWeakValidity,\n\t\t\t\"roundProposal\", roundProposal.Block().Hash())\n\n\t\ts.log.SetRoundProposal(s.round, nil)\n\t\ts.queryProposal()\n\t}\n}\n\nfunc (s *cpMainVoteState) onAddVote(_ *vote.Vote) {\n\ts.decide()\n}\n\nfunc (*cpMainVoteState) name() string {\n\treturn \"cp:main-vote\"\n}\n"
  },
  {
    "path": "consensusv2/cp_prevote.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype cpPreVoteState struct {\n\t*changeProposer\n}\n\nfunc (s *cpPreVoteState) enter() {\n\ts.scheduleTimeout(s.config.QueryVoteTimeout, s.height, s.round, tickerTargetQueryVote)\n\n\ts.decide()\n}\n\nfunc (s *cpPreVoteState) decide() {\n\tif s.cpRound == 0 {\n\t\ts.decideFirstRound()\n\t} else {\n\t\ts.decideNextRounds()\n\t}\n\n\ts.cpStrongTermination()\n\ts.absoluteCommit()\n}\n\nfunc (s *cpPreVoteState) decideFirstRound() {\n\tif !s.precommitState.hasVoted {\n\t\tjust := &vote.JustInitYes{}\n\t\ts.signAddCPPreVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\t\ts.enterNewState(s.cpMainVoteState)\n\n\t\treturn\n\t}\n\n\tprecommits := s.log.PrecommitVoteSet(s.round)\n\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\tvotedPower := cpPreVotes.VotedPower(0) + precommits.VotedPower()\n\n\tif !certificate.Has2FP1Power(s.log.TotalPower(), votedPower) {\n\t\t// Waiting for more votes...\n\t\t// Transition from Synchronous to Asynchronous Consensus....\n\n\t\treturn\n\t}\n\n\tprop := s.log.RoundProposal(s.round)\n\tif precommits.Has2FP1VotesFor(prop.Block().Hash()) {\n\t\tvotes := precommits.BlockVotes(prop.Block().Hash())\n\t\tcert := s.makeCertificate(votes)\n\t\tjust := &vote.JustInitNo{\n\t\t\tQCert: cert,\n\t\t}\n\t\ts.cpWeakValidity = prop.Block().Hash()\n\t\ts.signAddCPPreVote(s.cpWeakValidity, s.cpRound, vote.CPValueNo, just)\n\t\ts.enterNewState(s.cpMainVoteState)\n\n\t\treturn\n\t}\n\n\tjust := &vote.JustInitYes{}\n\ts.signAddCPPreVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just)\n\ts.enterNewState(s.cpMainVoteState)\n}\n\nfunc (s *cpPreVoteState) decideNextRounds() {\n\tcpMainVotes := s.log.CPMainVoteVoteSet(s.round)\n\tswitch {\n\tcase cpMainVotes.HasAnyVoteFor(s.cpRound-1, vote.CPValueNo):\n\t\ts.logger.Panic(\"unreachable state: decide on 'no (biased)' should be handled in main-vote state\")\n\n\tcase cpMainVotes.HasAnyVoteFor(s.cpRound-1, vote.CPValueYes):\n\t\ts.logger.Debug(\"cp: one main-vote for one\", \"b\", \"1\")\n\n\t\tvote1 := cpMainVotes.GetRandomVote(s.cpRound-1, vote.CPValueYes)\n\t\tjust1 := &vote.JustPreVoteHard{\n\t\t\tQCert: vote1.CPJust().(*vote.JustMainVoteNoConflict).QCert,\n\t\t}\n\t\ts.signAddCPPreVote(hash.UndefHash, s.cpRound, vote.CPValueYes, just1)\n\n\tcase cpMainVotes.HasAllVotesFor(s.cpRound-1, vote.CPValueAbstain):\n\t\ts.logger.Debug(\"cp: all main-votes are abstain\", \"b\", \"0 (biased)\")\n\n\t\tvotes := cpMainVotes.BinaryVotes(s.cpRound-1, vote.CPValueAbstain)\n\t\tcert := s.makeCertificate(votes)\n\t\tjust := &vote.JustPreVoteSoft{\n\t\t\tQCert: cert,\n\t\t}\n\t\ts.signAddCPPreVote(s.cpWeakValidity, s.cpRound, vote.CPValueNo, just)\n\n\tdefault:\n\t\ts.logger.Panic(\"unreachable state\")\n\t}\n\n\ts.enterNewState(s.cpMainVoteState)\n}\n\nfunc (s *cpPreVoteState) onAddVote(_ *vote.Vote) {\n\ts.decide()\n}\n\nfunc (*cpPreVoteState) name() string {\n\treturn \"cp:pre-vote\"\n}\n"
  },
  {
    "path": "consensusv2/cp_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCPChangeProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n\nfunc TestCPQueryVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\ttd.queryVoteTimeout(td.consP)\n\n\ttd.shouldPublishQueryVote(t, td.consP, 2, 0)\n}\n\nfunc TestCPSetProposalAfterChangeProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\n\tprop := td.makeProposal(t, 2, 0)\n\ttd.consP.SetProposal(prop)\n\tassert.NotNil(t, td.consP.Proposal())\n}\n\nfunc TestCPChangeProposerAgreementYes(t *testing.T) {\n\ttd := setup(t)\n\n\theight := types.Height(1)\n\tround := types.Round(0)\n\ttd.enterNewHeight(td.consP)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\ttd.addCPPreVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, preVote0.CPJust(), tIndexX)\n\ttd.addCPPreVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, preVote0.CPJust(), tIndexY)\n\n\tmainVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPMainVote, hash.UndefHash)\n\ttd.addCPMainVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, mainVote0.CPJust(), tIndexX)\n\ttd.addCPMainVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, mainVote0.CPJust(), tIndexY)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPDecided, hash.UndefHash)\n\ttd.checkHeightRound(t, td.consP, height, round+1)\n}\n\nfunc TestCPChangeProposerAgreementNo(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\theight := types.Height(2)\n\tround := types.Round(1)\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\ttd.checkHeightRound(t, td.consP, height, round)\n\n\tprop := td.makeProposal(t, height, round)\n\tblockHash := prop.Block().Hash()\n\n\ttd.consP.SetProposal(prop)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexY)\n\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote0 := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, blockHash)\n\ttd.addCPPreVote(t, td.consP, blockHash, height, round, vote.CPValueNo, preVote0.CPJust(), tIndexX)\n\ttd.addCPPreVote(t, td.consP, blockHash, height, round, vote.CPValueNo, preVote0.CPJust(), tIndexY)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, blockHash)\n\ttd.shouldPublishBlockAnnounce(t, td.consP, blockHash)\n\ttd.checkHeightRound(t, td.consP, height+1, 0)\n}\n\n// ConsP receives all `PRE-VOTE:no` votes before receiving a proposal or precommit votes.\n// It should vote `PRE-VOTES:yes` but goes to the pre-commit phase.\nfunc TestCPCrashOnTestnet(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t) // height 1\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\ttd.consP.MoveToNewHeight()\n\n\tblockHash := td.RandHash()\n\tjust0, _, _ := td.makeChangeProposerJusts(t, blockHash, height, round)\n\ttd.addCPPreVote(t, td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexX)\n\ttd.addCPPreVote(t, td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexY)\n\ttd.addCPPreVote(t, td.consP, blockHash, height, round, vote.CPValueNo, just0, tIndexB)\n\n\ttd.newHeightTimeout(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\tpreVote := td.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n\tassert.Equal(t, vote.CPValueYes, preVote.CPValue())\n\tassert.Equal(t, \"precommit\", td.consP.currentState.name())\n}\n\nfunc TestCPMoveToNextRoundOnDecidedVoteYes(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\thright := types.Height(1)\n\tround := types.Round(0)\n\n\ttd.checkHeightRound(t, td.consP, hright, round)\n\n\t_, _, decideJust := td.makeChangeProposerJusts(t, hash.UndefHash, hright, round)\n\ttd.addCPDecidedVote(t, td.consP, hash.UndefHash, hright, round, vote.CPValueYes, decideJust, tIndexX)\n\n\ttd.checkHeightRound(t, td.consP, hright, round+1)\n}\n\nfunc TestCPInvalidJustInitYes(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustInitYes{}\n\n\tt.Run(\"invalid value: no\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(hash.UndefHash, height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: no\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should be 0\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(hash.UndefHash, height, round, 1, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 1\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid block hash\", func(t *testing.T) {\n\t\tblockHash := td.RandHash()\n\t\tv := vote.NewCPPreVote(blockHash, height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid block hash: \" + blockHash.String(),\n\t\t})\n\t})\n}\n\nfunc TestCPInvalidJustInitNo(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustInitNo{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: yes\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: yes\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should be 0\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 1\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestCPInvalidJustPreVoteHard(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustPreVoteHard{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should not be 0\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestCPInvalidJustPreVoteSoft(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustPreVoteSoft{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"cp-round should not be 0\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPPreVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestCPInvalidJustMainVoteNoConflict(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustMainVoteNoConflict{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPMainVote(td.RandHash(), height, round, 1, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n\nfunc TestCPInvalidJustMainVoteConflict(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\n\tblockHash := td.RandHash()\n\tproperJustInitNo, _, _ := td.makeChangeProposerJusts(t, blockHash, height, round)\n\tproperJustInitYes := &vote.JustInitYes{}\n\n\tt.Run(\"invalid value: no\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo:  properJustInitNo,\n\t\t\tJustYes: properJustInitYes,\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueNo, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: no\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: yes\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo:  properJustInitNo,\n\t\t\tJustYes: properJustInitYes,\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: yes\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: unexpected justification (JustNo)\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo:  &vote.JustInitYes{},\n\t\t\tJustYes: properJustInitYes,\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"unexpected justification: JustInitYes\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid value: unexpected justification (JustYes)\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: properJustInitNo,\n\t\t\tJustYes: &vote.JustInitNo{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"unexpected justification: JustInitNo\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate - No\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: &vote.JustPreVoteSoft{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t\tJustYes: properJustInitYes,\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate - Yes\", func(t *testing.T) {\n\t\tjust := &vote.JustMainVoteConflict{\n\t\t\tJustNo: properJustInitNo,\n\t\t\tJustYes: &vote.JustPreVoteHard{\n\t\t\t\tQCert: td.GenerateTestCertificate(height),\n\t\t\t},\n\t\t}\n\t\tv := vote.NewCPMainVote(blockHash, height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid round: 0\",\n\t\t})\n\t})\n}\n\nfunc TestCPInvalidJustDecided(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tjust := &vote.JustDecided{\n\t\tQCert: td.GenerateTestCertificate(height),\n\t}\n\n\tt.Run(\"invalid value: abstain\", func(t *testing.T) {\n\t\tv := vote.NewCPDecidedVote(td.RandHash(), height, round, 0, vote.CPValueAbstain, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: \"invalid value: abstain\",\n\t\t})\n\t})\n\n\tt.Run(\"invalid certificate\", func(t *testing.T) {\n\t\tv := vote.NewCPDecidedVote(hash.UndefHash, height, round, 0, vote.CPValueYes, just, td.consB.valKey.Address())\n\n\t\terr := td.consP.changeProposer.cpCheckJust(v)\n\t\trequire.ErrorIs(t, err, InvalidJustificationError{\n\t\t\tReason: fmt.Sprintf(\"certificate has an unexpected committers: %v\", just.QCert.Committers()),\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "consensusv2/errors.go",
    "content": "package consensusv2\n\nimport (\n\t\"fmt\"\n)\n\n// InvalidJustificationError is returned when the justification for a change-proposer\n// vote is invalid.\ntype InvalidJustificationError struct {\n\tReason string\n}\n\nfunc (e InvalidJustificationError) Error() string {\n\treturn fmt.Sprintf(\"invalid justification: %s\", e.Reason)\n}\n\n// ConfigError is returned when the config is not valid with a descriptive Reason message.\ntype ConfigError struct {\n\tReason string\n}\n\nfunc (e ConfigError) Error() string {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "consensusv2/height.go",
    "content": "package consensusv2\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype newHeightState struct {\n\t*consensusV2\n}\n\nfunc (s *newHeightState) enter() {\n\ts.decide()\n}\n\nfunc (s *newHeightState) decide() {\n\tsateHeight := s.bcState.LastBlockHeight()\n\n\tvalidators := s.bcState.CommitteeValidators()\n\ts.log.MoveToNewHeight(validators)\n\n\ts.validators = validators\n\ts.height = sateHeight + 1\n\ts.round = 0\n\ts.cpRound = 0\n\ts.cpDecidedCert = nil\n\ts.cpWeakValidity = hash.UndefHash\n\ts.active = s.bcState.IsInCommittee(s.valKey.Address())\n\ts.logger.Info(\"entering new height\", \"height\", s.height, \"active\", s.active)\n\n\tsleep := time.Until(s.bcState.LastBlockTime().Add(s.bcState.Params().BlockInterval()))\n\ts.scheduleTimeout(sleep, s.height, s.round, tickerTargetNewHeight)\n}\n\nfunc (s *newHeightState) onAddVote(_ *vote.Vote) {\n\tprecommits := s.log.PrecommitVoteSet(s.round)\n\tif precommits.Has2FP1Votes() {\n\t\t// Detect when the network majority has voted (2f+1 precommits) but the new height\n\t\t// timer hasn't started yet. This edge case occurs when the local system time is\n\t\t// lagging behind the network time, causing the scheduled timeout to be delayed.\n\t\t// In this scenario, we should immediately transition to the propose state rather\n\t\t// than waiting for the timer to expire.\n\t\ts.logger.Warn(\"network majority has voted but new-height timer has not started yet. \" +\n\t\t\t\"System time may be lagging behind network time.\")\n\t\ts.enterNewState(s.proposeState)\n\t}\n}\n\nfunc (*newHeightState) onSetProposal(_ *proposal.Proposal) {\n\t// Ignore proposal\n}\n\nfunc (s *newHeightState) onTimeout(t *ticker) {\n\tif t.Target == tickerTargetNewHeight {\n\t\tif s.active {\n\t\t\ts.enterNewState(s.proposeState)\n\t\t}\n\t}\n}\n\nfunc (*newHeightState) name() string {\n\treturn \"new-height\"\n}\n"
  },
  {
    "path": "consensusv2/height_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestNewHeightTimeout(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consY)\n\ttd.commitBlockForAllStates(t)\n\n\tconsState := &newHeightState{td.consY}\n\tconsState.enter()\n\n\t// Invalid target\n\tconsState.onTimeout(&ticker{Height: 2, Target: -1})\n\ttd.checkHeightRound(t, td.consY, 2, 0)\n\n\tconsState.onTimeout(&ticker{Height: 2, Target: tickerTargetNewHeight})\n\ttd.checkHeightRound(t, td.consY, 2, 0)\n\ttd.shouldPublishProposal(t, td.consY, 2, 0)\n}\n\nfunc TestNewHeightDoubleEntry(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.consX.MoveToNewHeight()\n\ttd.newHeightTimeout(td.consX)\n\n\t// double entry and timeout\n\ttd.consX.MoveToNewHeight()\n\n\ttd.checkHeightRound(t, td.consX, 2, 0)\n\tassert.True(t, td.consX.active)\n\tassert.NotEqual(t, \"new-height\", td.consX.currentState.name())\n}\n\nfunc TestNewHeightTimeBehindNetwork(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\ttd.consP.MoveToNewHeight()\n\n\theight := types.Height(2)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\tblockHash := prop.Block().Hash()\n\n\ttd.consP.SetProposal(prop)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexY)\n\ttd.addPrecommitVote(t, td.consP, blockHash, height, round, tIndexB)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, blockHash)\n\ttd.shouldPublishBlockAnnounce(t, td.consP, blockHash)\n}\n"
  },
  {
    "path": "consensusv2/log/log.go",
    "content": "package log\n\nimport (\n\t\"github.com/pactus-project/pactus/consensusv2/voteset\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Log struct {\n\tvalidators    map[crypto.Address]*validator.Validator\n\ttotalPower    int64\n\troundMessages map[types.Round]*Messages\n}\n\nfunc NewLog() *Log {\n\treturn &Log{\n\t\troundMessages: make(map[types.Round]*Messages, 0),\n\t}\n}\n\nfunc (log *Log) RoundMessages(round types.Round) *Messages {\n\treturn log.mustGetRoundMessages(round)\n}\n\nfunc (log *Log) HasVote(h hash.Hash) bool {\n\tfor _, m := range log.roundMessages {\n\t\tif m.HasVote(h) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (log *Log) mustGetRoundMessages(round types.Round) *Messages {\n\tmsgs, ok := log.roundMessages[round]\n\tif !ok {\n\t\tmsgs = &Messages{\n\t\t\tprecommitVotes: voteset.NewPrecommitVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpPreVotes:     voteset.NewCPPreVoteVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpMainVotes:    voteset.NewCPMainVoteVoteSet(round, log.totalPower, log.validators),\n\t\t\tcpDecidedVotes: voteset.NewCPDecidedVoteSet(round, log.totalPower, log.validators),\n\t\t}\n\t\tlog.roundMessages[round] = msgs\n\t}\n\n\treturn msgs\n}\n\nfunc (log *Log) AddVote(v *vote.Vote) (bool, error) {\n\tmsgs := log.mustGetRoundMessages(v.Round())\n\n\treturn msgs.addVote(v)\n}\n\nfunc (log *Log) PrecommitVoteSet(round types.Round) *voteset.BlockVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.precommitVotes\n}\n\nfunc (log *Log) CPPreVoteVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpPreVotes\n}\n\nfunc (log *Log) CPMainVoteVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpMainVotes\n}\n\nfunc (log *Log) CPDecidedVoteSet(round types.Round) *voteset.BinaryVoteSet {\n\tmsgs := log.mustGetRoundMessages(round)\n\n\treturn msgs.cpDecidedVotes\n}\n\nfunc (log *Log) HasRoundProposal(round types.Round) bool {\n\treturn log.RoundProposal(round) != nil\n}\n\nfunc (log *Log) RoundProposal(round types.Round) *proposal.Proposal {\n\tm := log.RoundMessages(round)\n\tif m == nil {\n\t\treturn nil\n\t}\n\n\treturn m.proposal\n}\n\nfunc (log *Log) SetRoundProposal(round types.Round, prop *proposal.Proposal) {\n\tmsgs := log.mustGetRoundMessages(round)\n\tmsgs.proposal = prop\n}\n\nfunc (log *Log) MoveToNewHeight(validators []*validator.Validator) {\n\tlog.roundMessages = make(map[types.Round]*Messages)\n\tlog.validators = make(map[crypto.Address]*validator.Validator)\n\tlog.totalPower = 0\n\tfor _, val := range validators {\n\t\tlog.totalPower += val.Power()\n\t\tlog.validators[val.Address()] = val\n\t}\n}\n\nfunc (log *Log) CanVote(addr crypto.Address) bool {\n\tfor _, val := range log.validators {\n\t\tif val.Address() == addr {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (log *Log) TotalPower() int64 {\n\treturn log.totalPower\n}\n"
  },
  {
    "path": "consensusv2/log/log_test.go",
    "content": "package log\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMustGetRound(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\tassert.NotNil(t, log.RoundMessages(ts.RandRound()))\n}\n\nfunc TestAddValidVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, valKeys := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\n\tprecommits := log.PrecommitVoteSet(round)\n\tpreVotes := log.CPPreVoteVoteSet(round)\n\tmainVotes := log.CPMainVoteVoteSet(round)\n\tdecidedVotes := log.CPDecidedVoteSet(round)\n\n\tvote1 := vote.NewPrecommitVote(ts.RandHash(),\n\t\theight, round, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(ts.RandHash(),\n\t\theight, round, 0, vote.CPValueYes, &vote.JustInitYes{}, valKeys[0].Address())\n\tvote3 := vote.NewCPMainVote(ts.RandHash(),\n\t\theight, round, 0, vote.CPValueYes, &vote.JustInitYes{}, valKeys[0].Address())\n\tvote4 := vote.NewCPDecidedVote(ts.RandHash(),\n\t\theight, round, 0, vote.CPValueYes, &vote.JustInitYes{}, valKeys[0].Address())\n\n\tfor _, v := range []*vote.Vote{vote1, vote2, vote3, vote4} {\n\t\tts.HelperSignVote(valKeys[0], v)\n\n\t\tadded, err := log.AddVote(v)\n\t\trequire.NoError(t, err)\n\t\tassert.True(t, added)\n\t}\n\n\tassert.True(t, log.HasVote(vote1.Hash()))\n\tassert.True(t, log.HasVote(vote2.Hash()))\n\tassert.True(t, log.HasVote(vote3.Hash()))\n\tassert.True(t, log.HasVote(vote4.Hash()))\n\tassert.False(t, log.HasVote(ts.RandHash()))\n\n\tassert.Contains(t, precommits.AllVotes(), vote1)\n\tassert.Contains(t, preVotes.AllVotes(), vote2)\n\tassert.Contains(t, mainVotes.AllVotes(), vote3)\n\tassert.Contains(t, decidedVotes.AllVotes(), vote4)\n}\n\nfunc TestAddInvalidVoteType(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\n\tdata, _ := hex.DecodeString(\n\t\t\"A7010F0218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06f607f6\")\n\tinvVote := new(vote.Vote)\n\terr := invVote.UnmarshalCBOR(data)\n\trequire.NoError(t, err)\n\n\tadded, err := log.AddVote(invVote)\n\trequire.ErrorContains(t, err, \"unexpected vote type: 15\")\n\tassert.False(t, added)\n\tassert.False(t, log.HasVote(invVote.Hash()))\n}\n\nfunc TestSetRoundProposal(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\n\tcmt, _ := ts.GenerateTestCommittee(7)\n\tprop := ts.GenerateTestProposal(height, round)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\tlog.SetRoundProposal(round, prop)\n\tassert.False(t, log.HasRoundProposal(round+1))\n\tassert.True(t, log.HasRoundProposal(round))\n\tassert.Nil(t, log.RoundProposal(round+1))\n\tassert.Equal(t, prop.Hash(), log.RoundProposal(round).Hash())\n}\n\nfunc TestCanVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcmt, valKeys := ts.GenerateTestCommittee(4)\n\tlog := NewLog()\n\tlog.MoveToNewHeight(cmt.Validators())\n\n\taddr := ts.RandAccAddress()\n\tassert.True(t, log.CanVote(valKeys[0].Address()))\n\tassert.False(t, log.CanVote(addr))\n}\n\nfunc TestTotalPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tlog := NewLog()\n\tassert.Zero(t, log.TotalPower())\n\n\tcmt, _ := ts.GenerateTestCommittee(4)\n\tlog.MoveToNewHeight(cmt.Validators())\n\tassert.Equal(t, cmt.TotalPower(), log.TotalPower())\n}\n"
  },
  {
    "path": "consensusv2/log/messages.go",
    "content": "package log\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/consensusv2/voteset\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype Messages struct {\n\tprecommitVotes *voteset.BlockVoteSet  // Precommit votes\n\tcpPreVotes     *voteset.BinaryVoteSet // Change proposer Pre-votes\n\tcpMainVotes    *voteset.BinaryVoteSet // Change proposer Main-votes\n\tcpDecidedVotes *voteset.BinaryVoteSet // Change proposer Decided-votes\n\tproposal       *proposal.Proposal\n}\n\nfunc (m *Messages) addVote(vte *vote.Vote) (bool, error) {\n\tswitch vte.Type() {\n\tcase vote.VoteTypePrepare:\n\t\t// Deprecated\n\tcase vote.VoteTypePrecommit:\n\t\treturn m.precommitVotes.AddVote(vte)\n\tcase vote.VoteTypeCPPreVote:\n\t\treturn m.cpPreVotes.AddVote(vte)\n\tcase vote.VoteTypeCPMainVote:\n\t\treturn m.cpMainVotes.AddVote(vte)\n\tcase vote.VoteTypeCPDecided:\n\t\treturn m.cpDecidedVotes.AddVote(vte)\n\t}\n\n\treturn false, fmt.Errorf(\"unexpected vote type: %v\", vte.Type())\n}\n\nfunc (m *Messages) HasVote(h hash.Hash) bool {\n\tvotes := m.AllVotes()\n\tfor _, v := range votes {\n\t\tif v.Hash() == h {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (m *Messages) AllVotes() []*vote.Vote {\n\tprecommit := m.precommitVotes.AllVotes()\n\tcpPre := m.cpPreVotes.AllVotes()\n\tcpMain := m.cpMainVotes.AllVotes()\n\tcpDecided := m.cpDecidedVotes.AllVotes()\n\n\tvotes := make([]*vote.Vote, 0, len(precommit)+len(cpPre)+len(cpMain)+len(cpDecided))\n\tvotes = append(votes, precommit...)\n\tvotes = append(votes, cpPre...)\n\tvotes = append(votes, cpMain...)\n\tvotes = append(votes, cpDecided...)\n\n\treturn votes\n}\n"
  },
  {
    "path": "consensusv2/mediator.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/consensus\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\n// The `mediator` interface defines a mechanism for setting proposals and votes\n// between independent consensus instances.\ntype mediator interface {\n\tOnPublishProposal(from consensus.Consensus, prop *proposal.Proposal)\n\tOnPublishVote(from consensus.Consensus, vte *vote.Vote)\n\tOnBlockAnnounce(from consensus.Consensus)\n\tRegister(cons consensus.Consensus)\n}\n\n// ConcreteMediator struct.\ntype ConcreteMediator struct {\n\tinstances []consensus.Consensus\n}\n\nfunc newConcreteMediator() mediator {\n\treturn &ConcreteMediator{}\n}\n\nfunc (m *ConcreteMediator) OnPublishProposal(from consensus.Consensus, prop *proposal.Proposal) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.SetProposal(prop)\n\t\t}\n\t}\n}\n\nfunc (m *ConcreteMediator) OnPublishVote(from consensus.Consensus, vte *vote.Vote) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.AddVote(vte)\n\t\t}\n\t}\n}\n\nfunc (m *ConcreteMediator) OnBlockAnnounce(from consensus.Consensus) {\n\tfor _, cons := range m.instances {\n\t\tif cons != from {\n\t\t\tcons.MoveToNewHeight()\n\t\t}\n\t}\n}\n\n// Register a new Consensus instance to the mediator.\nfunc (m *ConcreteMediator) Register(cons consensus.Consensus) {\n\tm.instances = append(m.instances, cons)\n}\n"
  },
  {
    "path": "consensusv2/precommit.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype precommitState struct {\n\t*consensusV2\n\thasVoted bool\n}\n\nfunc (s *precommitState) enter() {\n\tif s.cpDecidedCert == nil {\n\t\ts.hasVoted = false\n\n\t\tchangeProperTimeout := s.config.CalculateChangeProposerTimeout(s.round)\n\t\tqueryProposalTimeout := changeProperTimeout / 2\n\t\ts.scheduleTimeout(queryProposalTimeout, s.height, s.round, tickerTargetQueryProposal)\n\t\ts.scheduleTimeout(changeProperTimeout, s.height, s.round, tickerTargetChangeProposer)\n\t}\n\n\ts.decide()\n}\n\nfunc (s *precommitState) decide() {\n\ts.vote()\n\n\t//\n\t// The block can be committed by `2f+1` votes from the committee and\n\t// the proof of the change-proposer phase.\n\t//\n\tif s.cpDecidedCert != nil {\n\t\tprop := s.log.RoundProposal(s.round)\n\t\tif prop == nil {\n\t\t\ts.queryProposal()\n\n\t\t\treturn\n\t\t}\n\n\t\tprecommits := s.log.PrecommitVoteSet(s.round)\n\t\tif !precommits.Has2FP1VotesFor(prop.Block().Hash()) {\n\t\t\ts.queryVote()\n\n\t\t\treturn\n\t\t}\n\n\t\ts.enterNewState(s.commitState)\n\t} else {\n\t\t//\n\t\t// If a validator receives a set of `f+1` valid `cp:PRE-VOTE` votes for this round,\n\t\t// it starts changing the proposer phase, even if its timer has not expired;\n\t\t// This prevents it from starting the change-proposer phase too late.\n\t\t//\n\t\tcpPreVotes := s.log.CPPreVoteVoteSet(s.round)\n\t\tif cpPreVotes.Has1FP1VotesFor(0, vote.CPValueYes) {\n\t\t\ts.startChangingProposer()\n\t\t}\n\n\t\t// TODO: write test for me\n\t\tcpDecide := s.log.CPDecidedVoteSet(s.round)\n\t\tif cpDecide.Has2FP1VotesFor(s.cpRound, vote.CPValueYes) {\n\t\t\ts.startChangingProposer()\n\t\t}\n\t}\n\n\ts.absoluteCommit()\n}\n\nfunc (s *precommitState) vote() {\n\tif s.hasVoted {\n\t\treturn\n\t}\n\n\troundProposal := s.log.RoundProposal(s.round)\n\tif roundProposal == nil {\n\t\ts.logger.Debug(\"no proposal yet\")\n\n\t\treturn\n\t}\n\n\t// Everything is good\n\ts.signAddPrecommitVote(roundProposal.Block().Hash())\n\ts.hasVoted = true\n}\n\nfunc (s *precommitState) onAddVote(_ *vote.Vote) {\n\ts.decide()\n}\n\nfunc (s *precommitState) onSetProposal(_ *proposal.Proposal) {\n\ts.decide()\n}\n\nfunc (s *precommitState) onTimeout(ticker *ticker) {\n\tswitch ticker.Target {\n\tcase tickerTargetQueryProposal:\n\t\troundProposal := s.log.RoundProposal(s.round)\n\t\tif roundProposal == nil {\n\t\t\ts.queryProposal()\n\t\t}\n\t\tif s.isProposer() {\n\t\t\ts.queryVote()\n\t\t}\n\n\t\t// Schedule another timeout to retry querying for the proposal or votes.\n\t\t// This ensures that delayed or missing data doesn't cause the process to stall.\n\t\ts.scheduleTimeout(ticker.Duration*2, s.height, s.round, tickerTargetQueryProposal)\n\n\tcase tickerTargetChangeProposer:\n\t\ts.startChangingProposer()\n\n\tcase tickerTargetNewHeight, tickerTargetQueryVote:\n\t\t// Ignore it\n\t}\n}\n\nfunc (*precommitState) name() string {\n\treturn \"precommit\"\n}\n"
  },
  {
    "path": "consensusv2/precommit_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\nfunc TestPrecommitStrongCommit(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\tprop := td.makeProposal(t, height, round)\n\tpropBlockHash := prop.Block().Hash()\n\n\ttd.addPrecommitVote(t, td.consP, propBlockHash, height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, propBlockHash, height, round, tIndexY)\n\ttd.addPrecommitVote(t, td.consP, propBlockHash, height, round, tIndexB)\n\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, propBlockHash)\n\ttd.shouldPublishBlockAnnounce(t, td.consP, propBlockHash)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryProposal)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryVote)\n}\n\nfunc TestPrecommitQueryProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\t// ConsP is not the proposer for this round.\n\ttd.enterNewHeight(td.consP)\n\ttd.queryProposalTimeout(td.consP)\n\n\ttd.shouldPublishQueryProposal(t, td.consP, height, round)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryVote)\n}\n\nfunc TestPrecommitQueryVote(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\t// ConsY is  the proposer for this round.\n\ttd.enterNewHeight(td.consY)\n\ttd.queryProposalTimeout(td.consY)\n\n\ttd.shouldNotPublish(t, td.consY, message.TypeQueryProposal)\n\ttd.shouldPublishQueryVote(t, td.consY, height, round)\n}\n\nfunc TestPrecommitChangeProposerTimeout(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.changeProposerTimeout(td.consP)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n\nfunc TestPrecommitChangeProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\tprop := td.makeProposal(t, height, round)\n\ttd.consP.SetProposal(prop)\n\n\ttd.addCPPreVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, &vote.JustInitYes{}, tIndexX)\n\ttd.addCPPreVote(t, td.consP, hash.UndefHash, height, round, vote.CPValueYes, &vote.JustInitYes{}, tIndexY)\n\n\t// should move to the change proposer phase, even if it has the proposal and\n\t// its timer has not expired, if it has received 1/3 of the change-proposer votes.\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypeCPPreVote, hash.UndefHash)\n}\n\nfunc TestPrecommitQueryProposalWithCert(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.consP.cpDecidedCert = td.GenerateTestCertificate(height)\n\n\ttd.consP.currentState.decide()\n\n\ttd.shouldPublishQueryProposal(t, td.consP, height, round)\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryVote)\n}\n\nfunc TestPrecommitQueryVoteWithCert(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\theight := types.Height(2)\n\tround := types.Round(0)\n\n\ttd.enterNewHeight(td.consP)\n\tprop := td.makeProposal(t, height, round)\n\ttd.consP.SetProposal(prop)\n\ttd.consP.cpDecidedCert = td.GenerateTestCertificate(height)\n\n\ttd.consP.currentState.decide()\n\n\ttd.shouldNotPublish(t, td.consP, message.TypeQueryProposal)\n\ttd.shouldPublishQueryVote(t, td.consP, height, round)\n}\n"
  },
  {
    "path": "consensusv2/propose.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype proposeState struct {\n\t*consensusV2\n}\n\nfunc (s *proposeState) enter() {\n\ts.decide()\n}\n\nfunc (s *proposeState) decide() {\n\tproposer := s.proposer(s.round)\n\ts.cpRound = 0\n\ts.cpDecidedCert = nil\n\ts.cpWeakValidity = hash.UndefHash\n\n\t// Based on PIP-19, if the Availability Score is less than the Minimum threshold,\n\t// we initiate the Change-Proposer phase.\n\t// TODO: write test for me\n\tscore := s.bcState.AvailabilityScore(proposer.Number())\n\tif score < s.config.MinimumAvailabilityScore {\n\t\ts.logger.Info(\"availability score of proposer is low\",\n\t\t\t\"score\", score, \"proposer\", proposer.Address())\n\t\ts.startChangingProposer()\n\n\t\treturn\n\t}\n\n\tif proposer.Address() == s.valKey.Address() {\n\t\ts.logger.Info(\"our turn to propose\", \"proposer\", proposer.Address())\n\t\ts.createProposal(s.height, s.round)\n\t} else {\n\t\ts.logger.Debug(\"not our turn to propose\", \"proposer\", proposer.Address())\n\t}\n\n\ts.enterNewState(s.precommitState)\n}\n\nfunc (s *proposeState) createProposal(height types.Height, round types.Round) {\n\tblock, err := s.bcState.ProposeBlock(s.valKey, s.rewardAddr)\n\tif err != nil {\n\t\ts.logger.Error(\"unable to propose a block!\", \"error\", err)\n\n\t\treturn\n\t}\n\n\tprop := proposal.NewProposal(height, round, block)\n\tsig := s.valKey.Sign(prop.SignBytes())\n\tprop.SetSignature(sig)\n\n\ts.log.SetRoundProposal(round, prop)\n\n\ts.broadcastProposal(prop)\n\n\ts.logger.Info(\"proposal signed and broadcasted\", \"proposal\", prop)\n}\n\nfunc (*proposeState) onAddVote(_ *vote.Vote) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) onSetProposal(_ *proposal.Proposal) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) onTimeout(_ *ticker) {\n\tpanic(\"Unreachable\")\n}\n\nfunc (*proposeState) name() string {\n\treturn \"propose\"\n}\n"
  },
  {
    "path": "consensusv2/propose_test.go",
    "content": "package consensusv2\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProposePublishProposal(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consX)\n\tp := td.shouldPublishProposal(t, td.consX, 1, 0)\n\tassert.Equal(t, td.consX.valKey.Address(), p.Block().Header().ProposerAddress())\n}\n\nfunc TestProposeInvalidProposer(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consY)\n\tassert.Nil(t, td.consY.Proposal())\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(1, testsuite.BlockWithProposer(addr))\n\tinvalidProp := proposal.NewProposal(1, 0, blk)\n\n\ttd.consY.SetProposal(invalidProp)\n\tassert.Nil(t, td.consY.Proposal())\n\n\ttd.HelperSignProposal(td.consB.valKey, invalidProp)\n\ttd.consY.SetProposal(invalidProp)\n\tassert.Nil(t, td.consY.Proposal())\n}\n\nfunc TestProposeInvalidBlock(t *testing.T) {\n\ttd := setup(t)\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(1, testsuite.BlockWithProposer(addr))\n\tinvProp := proposal.NewProposal(1, 2, blk)\n\ttd.HelperSignProposal(td.consB.valKey, invProp)\n\n\ttd.enterNewHeight(td.consP)\n\ttd.enterNextRound(td.consP)\n\ttd.enterNextRound(td.consP)\n\n\ttd.consP.SetProposal(invProp)\n\tassert.Nil(t, td.consP.Proposal())\n}\n\nfunc TestProposeInvalidHeight(t *testing.T) {\n\ttd := setup(t)\n\n\taddr := td.consB.valKey.Address()\n\tblk, _ := td.GenerateTestBlock(2, testsuite.BlockWithProposer(addr))\n\tinvProp := proposal.NewProposal(2, 0, blk)\n\ttd.HelperSignProposal(td.consB.valKey, invProp)\n\n\ttd.enterNewHeight(td.consY)\n\ttd.consY.SetProposal(invProp)\n\tassert.Nil(t, td.consY.Proposal())\n}\n\nfunc TestProposeNetworkLagging(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.enterNewHeight(td.consP)\n\n\theight := types.Height(1)\n\tround := types.Round(0)\n\tprop := td.makeProposal(t, height, round)\n\n\t// consP doesn't have the proposal, but it has received prepared votes from other peers\n\ttd.addPrecommitVote(t, td.consP, prop.Block().Hash(), height, round, tIndexX)\n\ttd.addPrecommitVote(t, td.consP, prop.Block().Hash(), height, round, tIndexY)\n\n\ttd.queryProposalTimeout(td.consP)\n\ttd.shouldPublishQueryProposal(t, td.consP, height, round)\n\n\t// Proposal is received now\n\ttd.consP.SetProposal(prop)\n\n\ttd.shouldPublishVote(t, td.consP, vote.VoteTypePrecommit, prop.Block().Hash())\n}\n\nfunc TestProposeNextRound(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.commitBlockForAllStates(t)\n\n\ttd.enterNewHeight(td.consX)\n\n\t// Byzantine node sends proposal for the second round (his turn) even before the first round is started\n\tb, err := td.consB.bcState.ProposeBlock(td.consB.valKey, td.consB.rewardAddr)\n\trequire.NoError(t, err)\n\tp := proposal.NewProposal(2, 1, b)\n\ttd.HelperSignProposal(td.consB.valKey, p)\n\n\ttd.consX.SetProposal(p)\n\n\t// consX accepts his proposal, but doesn't move to the next round\n\tassert.NotNil(t, td.consX.log.RoundProposal(1))\n\tassert.Nil(t, td.consX.Proposal())\n\tassert.Equal(t, types.Height(2), td.consX.height)\n\tassert.Equal(t, types.Round(0), td.consX.round)\n}\n"
  },
  {
    "path": "consensusv2/spec/.gitignore",
    "content": "*.dot\n*.out\n*.toolbox\nstates\n*.tex\n*.dvi\n*.aux\n*.log\n"
  },
  {
    "path": "consensusv2/spec/Pactus.cfg",
    "content": "SPECIFICATION Spec\nCONSTANTS\n  N = 4\n  F = 1\n  FaultyNodes = {3}\n  MaxRound = 1\n  MaxCPRound = 1\n\nINVARIANT TypeOK\nPROPERTY Success\n"
  },
  {
    "path": "consensusv2/spec/Pactus.tla",
    "content": "-------------------------------- MODULE Pactus --------------------------------\n(***************************************************************************)\n(* The specification of the Pactus consensus algorithm:                    *)\n(* `^\\url{https://docs.pactus.org/protocol/consensus/protocol/}^'          *)\n(***************************************************************************)\nEXTENDS Integers, Sequences, FiniteSets, TLC\n\nCONSTANT\n    \\* The maximum number of rounds, limiting the range of behaviors evaluated by TLC.\n    MaxRound,\n    \\* The maximum number of change-proposer (CP) rounds, limiting the range of behaviors evaluated by TLC.\n    MaxCPRound,\n    \\* The total number of nodes in the network, denoted as `N` in the protocol.\n    N,\n    \\* The maximum number of faulty nodes in the network, denoted as `F` in the protocol.\n    F,\n    \\* The indices of faulty nodes.\n    FaultyNodes\n\nVARIABLES\n    \\* The set of messages received by the network.\n    network,\n    \\* The set of messages delivered to each replica.\n    logs,\n    \\* The state of each replica in the consensus protocol.\n    states\n\n\\* Helper expressions for common values.\nThreeFPlusOne == (3 * F) + 1\nTwoFPlusOne   == (2 * F) + 1\nOneFPlusOne   == (1 * F) + 1\n\n\\* A tuple containing all variables in the spec for ease of use in temporal conditions.\nvars == <<network, logs, states>>\n\nASSUME\n    \\* Ensure the number of nodes is sufficient to tolerate the specified number of faults.\n    /\\ N >= ThreeFPlusOne\n    \\* Ensure that `FaultyNodes` is a valid subset of node indices.\n    /\\ FaultyNodes \\subseteq 0..N-1\n    \\* Ensure that the number of faulty nodes does not exceed the maximum allowed.\n    /\\ Cardinality(FaultyNodes) <= F\n    \\* Ensure that `MaxRound` is greater than 0.\n    /\\ MaxRound > 0\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* Helper functions                                                        *)\n(***************************************************************************)\n\n\\* Check if the replica is the proposer for this round.\n\\* The proposer starts with the first replica and moves to the next in the change-proposer phase.\nIsProposer(index) ==\n    states[index].round % N = index\n\n\\* Check if a node is faulty.\nIsFaulty(index) == index \\in FaultyNodes\n\n\\* Returns a subset of `bag` where each element matches all criteria specified in `params`.\nSubsetOfMsgs(bag, params) ==\n   {i \\in bag: \\A field \\in DOMAIN params: i[field] = params[field]}\n\n\\* Check if the node has received at least `3f+1` PRECOMMIT votes for a proposal in the current round.\nHasPreCommitAbsolute(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"PRECOMMIT\",\n        round    |-> states[index].round])) >= ThreeFPlusOne\n\n\\* Check if the node has received at least `2f+1` PRECOMMIT votes for a proposal in the current round.\nHasPreCommitQuorum(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"PRECOMMIT\",\n        round    |-> states[index].round])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:PRE-VOTE votes in the current CP round.\nCPHasPreVotesQuorum(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:PRE-VOTE votes with value 1 (yes) in the current CP round.\nCPHasPreVotesQuorumForYes(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:PRE-VOTE votes with value 0 (no) in the current CP round.\nCPHasPreVotesQuorumForNo(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 0])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `f+1` CP:PRE-VOTE votes with value 1 (yes) in the current CP round.\nCPHasPreVotesMinorityForYes(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= OneFPlusOne\n\n\\* Check if the node has received both yes and no CP:PRE-VOTE votes in the current CP round.\nCPHasPreVotesForYesAndNo(index) ==\n    /\\ Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 0])) >= 1\n    /\\ Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= 1\n\n\\* Check if the node has received at least one CP:MAIN-VOTE with value 0 (no) in the previous CP round.\nCPHasOneMainVotesNoInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 0])) > 0\n\n\\* Check if the node has received at least one CP:MAIN-VOTE with value 1 (yes) in the previous CP round.\nCPHasOneMainVotesYesInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 1])) > 0\n\n\\* Check if the node has received at least `2f+1` CP:MAIN-VOTE votes with value 2 (abstain) in the previous CP round.\nCPAllMainVotesAbstainInPrvRound(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round - 1,\n        cp_val   |-> 2])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:MAIN-VOTE votes in the current CP round.\nCPHasMainVotesQuorum(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:MAIN-VOTE votes with value 1 (yes) in the current CP round.\nCPHasMainVotesQuorumForYes(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 1])) >= TwoFPlusOne\n\n\\* Check if the node has received at least `2f+1` CP:MAIN-VOTE votes with value 2 (abstain) in the current CP round.\nCPHasMainVotesQuorumForAbstain(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> 2])) >= TwoFPlusOne\n\n\\* Check if the node has received at least one CP:DECIDED vote with value 1 (yes) in the current round.\nCPHasDecideVotesForYes(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"CP:DECIDED\",\n        round    |-> states[index].round,\n        cp_val   |-> 1])) > 0\n\n\\* Check if the node has received a proposal in the current round.\nHasProposal(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"PROPOSAL\",\n        round    |-> states[index].round])) > 0\n\n\\* Check if the node has sent its own PRECOMMIT vote in the current round.\nHasPrecommited(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"PRECOMMIT\",\n        round    |-> states[index].round,\n        index    |-> index])) = 1\n\n\\* Check if the node has received an announcement message in the current round.\nHasAnnouncement(index) ==\n    Cardinality(SubsetOfMsgs(logs[index], [\n        type     |-> \"ANNOUNCEMENT\",\n        round    |-> states[index].round])) > 0\n\n\\* Check if the proposal is committed.\n\\* A proposal is considered committed if a super-majority of non-faulty replicas announce the same proposal.\nIsCommitted ==\n    LET subset == SubsetOfMsgs(network, [type |-> \"ANNOUNCEMENT\"])\n    IN /\\ Cardinality(subset) >= TwoFPlusOne\n       /\\ \\A m1, m2 \\in subset : m1.round = m2.round\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* Network functions                                                       *)\n(***************************************************************************)\n\n\\* Simulate a replica sending a message by appending it to the `network`.\n\\* The message is delivered to the sender's log immediately.\nSendMsg(msg) ==\n    /\\ network' = network \\cup {msg}\n    /\\ logs' = [logs EXCEPT ![msg.index] = logs[msg.index] \\cup {msg}]\n\n\\* Deliver a message to the specified replica's log.\nDeliverMsg(index) ==\n    LET undeliveredMsgs == network \\ logs[index]\n    IN IF Cardinality(undeliveredMsgs) = 0 THEN\n        UNCHANGED <<vars>>\n    ELSE\n        LET msg == CHOOSE x \\in undeliveredMsgs: TRUE\n        IN\n            /\\ logs' = [logs EXCEPT ![index] = logs[index] \\cup {msg}]\n            /\\ UNCHANGED <<states, network>>\n\n\\* Broadcast a PROPOSAL message into the network.\nSendProposal(index) ==\n    SendMsg([\n        type     |-> \"PROPOSAL\",\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0])\n\n\\* Broadcast PRECOMMIT votes into the network.\nSendPreCommitVote(index) ==\n    SendMsg([\n        type     |-> \"PRECOMMIT\",\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0])\n\n\\* Broadcast CP:PRE-VOTE votes into the network.\nSendCPPreVote(index, cp_val) ==\n    SendMsg([\n        type     |-> \"CP:PRE-VOTE\",\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> cp_val])\n\n\\* Broadcast CP:MAIN-VOTE votes into the network.\nSendCPMainVote(index, cp_val) ==\n    SendMsg([\n        type     |-> \"CP:MAIN-VOTE\",\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> states[index].cp_round,\n        cp_val   |-> cp_val])\n\n\\* Broadcast CP:DECIDED votes into the network.\nSendCPDecideVote(index, cp_val) ==\n    SendMsg([\n        type     |-> \"CP:DECIDED\",\n        round    |-> states[index].round,\n        cp_round |-> states[index].cp_round,\n        index    |-> index,\n        cp_val   |-> cp_val])\n\n\\* Broadcast ANNOUNCEMENT messages into the network.\nAnnounce(index)  ==\n    SendMsg([\n        type     |-> \"ANNOUNCEMENT\",\n        round    |-> states[index].round,\n        index    |-> index,\n        cp_round |-> 0,\n        cp_val   |-> 0])\n\n-----------------------------------------------------------------------------\n(***************************************************************************)\n(* State transition functions                                              *)\n(***************************************************************************)\n\n\\* Transition to the propose state.\nPropose(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"propose\"\n    /\\\n        IF IsProposer(index) THEN\n            SendProposal(index)\n        ELSE\n            UNCHANGED <<logs, network>>\n    /\\ states' = [states EXCEPT ![index].name = \"precommit\"]\n\n\\* Transition to the precommit state.\nPreCommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"precommit\"\n    /\\ HasProposal(index)\n    /\\ SendPreCommitVote(index)\n    /\\ states' = states\n\n\\* AbsoluteCommit checks if 3F+1 replicas voted for the proposal.\nAbsoluteCommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name # \"commit\" \\* to prevent shuttering\n    /\\ HasPreCommitAbsolute(index)\n    /\\ states' = [states EXCEPT ![index].name = \"commit\"]\n    /\\ UNCHANGED <<network, logs>>\n\n\\* QuorumCommit checks if 2F+1 replicas voted for the proposal after the change-proposer phase.\nQuorumCommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"precommit\"\n    /\\ states[index].decided = TRUE\n    /\\ HasPreCommitQuorum(index)\n    /\\ states' = [states EXCEPT ![index].name = \"commit\"]\n    /\\ UNCHANGED <<network, logs>>\n\n\\* Transition to the commit state.\nCommit(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"commit\"\n    /\\ Announce(index)\n    /\\ UNCHANGED <<states>>\n\n\\* Transition for timeout: a non-faulty replica changes the proposer if its timer expires.\nTimeout(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"precommit\"\n    /\\ states[index].decided = FALSE\n    /\\\n        \\* To limit the the behaviors.\n        \\/ states[index].round < MaxRound\n        \\/ HasPreCommitQuorum(index)\n    /\\ states' = [states EXCEPT ![index].name = \"cp:pre-vote\"]\n    /\\ UNCHANGED <<network, logs>>\n\n\\* Transition to the CP pre-vote state.\nCPPreVote(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:pre-vote\"\n    /\\\n        IF states[index].cp_round = 0 THEN\n            IF ~HasPrecommited(index) THEN\n                /\\ SendCPPreVote(index, 1)\n                /\\ states' = [states EXCEPT ![index].name = \"cp:main-vote\"]\n            ELSE IF Cardinality(\n                            SubsetOfMsgs(logs[index], [type |-> \"PRECOMMIT\",   round |-> states[index].round]) \\cup\n                            SubsetOfMsgs(logs[index], [type |-> \"CP:PRE-VOTE\", round |-> states[index].round, cp_round |-> states[index].cp_round])\n                        ) >= TwoFPlusOne THEN\n                    \\* Check if there is quorum of PRECOMMIT votes\n                    IF HasPreCommitQuorum(index) THEN\n                        /\\ SendCPPreVote(index, 0)\n                        /\\ states' = [states EXCEPT ![index].name = \"cp:main-vote\"]\n                    ELSE\n                        /\\ SendCPPreVote(index, 1)\n                        /\\ states' = [states EXCEPT ![index].name = \"cp:main-vote\"]\n            ELSE\n                /\\ UNCHANGED <<vars>>\n        ELSE\n            /\\\n                \\/\n                    /\\ CPHasOneMainVotesNoInPrvRound(index)\n                    /\\ SendCPPreVote(index, 0)\n                \\/\n                    /\\ CPHasOneMainVotesYesInPrvRound(index)\n                    /\\ SendCPPreVote(index, 1)\n                \\/\n                    /\\ CPAllMainVotesAbstainInPrvRound(index)\n                    /\\ SendCPPreVote(index, 0) \\* biased to zero when all votes abstain\n            /\\ states' = [states EXCEPT ![index].name = \"cp:main-vote\"]\n\n\\* Transition to the CP main-vote state.\nCPMainVote(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:main-vote\"\n    /\\ CPHasPreVotesQuorum(index)\n    /\\\n        \\/\n            \\* all votes for 0\n            /\\ CPHasPreVotesQuorumForNo(index)\n            /\\ states' = [states EXCEPT ![index].name = \"precommit\",\n                                        ![index].decided = TRUE]\n            /\\ UNCHANGED <<network, logs>>\n        \\/\n            \\* all votes for 1\n            /\\ CPHasPreVotesQuorumForYes(index)\n            /\\ SendCPMainVote(index, 1)\n            /\\ states' = [states EXCEPT ![index].name = \"cp:decide\"]\n        \\/\n            \\* Abstain vote\n            /\\ CPHasPreVotesForYesAndNo(index)\n            /\\ SendCPMainVote(index, 2) \\* Abstain\n            /\\ states' = [states EXCEPT ![index].name = \"cp:decide\"]\n\n\\* Transition to the CP decide state.\nCPDecide(index) ==\n    /\\ ~IsFaulty(index)\n    /\\ states[index].name = \"cp:decide\"\n    /\\  CPHasMainVotesQuorum(index)\n    /\\\n        \\/\n            /\\ CPHasMainVotesQuorumForYes(index)\n            /\\ SendCPDecideVote(index, 1)\n            /\\ states' = [states EXCEPT ![index].name = \"propose\",\n                                        ![index].round = states[index].round + 1]\n        \\/\n            /\\ states[index].cp_round < MaxCPRound\n            /\\ CPHasMainVotesQuorumForAbstain(index)\n            /\\ states' = [states EXCEPT ![index].name = \"cp:pre-vote\",\n                                        ![index].cp_round = states[index].cp_round + 1]\n            /\\ UNCHANGED <<network, logs>>\n\n\\* Transition for strong termination of Change-Proposer phase.\nCPStrongTerminate(index) ==\n    /\\ ~IsFaulty(index)\n    /\\\n        \\/ states[index].name = \"cp:pre-vote\"\n        \\/ states[index].name = \"cp:main-vote\"\n        \\/ states[index].name = \"cp:decide\"\n    /\\\n        \\* To limit the the behaviors.\n        IF /\\ states[index].cp_round = MaxCPRound\n           /\\ HasPreCommitQuorum(index) THEN\n               /\\ states' = [states EXCEPT ![index].name = \"precommit\",\n                                           ![index].decided = TRUE]\n\n        ELSE IF CPHasDecideVotesForYes(index) THEN\n            /\\ states' = [states EXCEPT ![index].name = \"propose\",\n                                        ![index].round = states[index].round + 1,\n                                        ![index].cp_round = 0]\n        ELSE\n            /\\ states' = states\n\n    /\\ UNCHANGED <<network, logs>>\n\n-----------------------------------------------------------------------------\n\n\\* Initial state\nInit ==\n    /\\ network = {}\n    /\\ logs = [index \\in 0..N-1 |-> {}]\n    /\\ states = [index \\in 0..N-1 |-> [\n        name       |-> \"propose\",\n        decided    |-> FALSE,\n        round      |-> 0,\n        cp_round   |-> 0]]\n\n\\* State transition relation\nNext ==\n    \\E index \\in 0..N-1:\n        \\/ Propose(index)\n        \\/ PreCommit(index)\n        \\/ Timeout(index)\n        \\/ Commit(index)\n        \\/ AbsoluteCommit(index)\n        \\/ QuorumCommit(index)\n        \\/ CPPreVote(index)\n        \\/ CPMainVote(index)\n        \\/ CPDecide(index)\n        \\/ CPStrongTerminate(index)\n        \\/ DeliverMsg(index)\n\n\\* Specification\nSpec ==\n    Init /\\ [][Next]_vars /\\ WF_vars(Next)\n\n(***************************************************************************)\n(* Success: All non-faulty nodes eventually commit.                        *)\n(***************************************************************************)\nSuccess == <>(IsCommitted)\n\n(***************************************************************************)\n(* TypeOK is the type-correctness invariant.                               *)\n(***************************************************************************)\nTypeOK ==\n    /\\ \\A index \\in 0..N-1:\n        /\\ states[index].round <= MaxRound\n        /\\ states[index].cp_round <= MaxCPRound\n        /\\ states[index].round >= 0\n        /\\ states[index].cp_round >= 0\n        /\\ states[index].name \\in {\"propose\", \"precommit\", \"commit\", \"cp:pre-vote\", \"cp:main-vote\", \"cp:decide\"}\n        /\\ states[index].decided \\in {TRUE, FALSE}\n        /\\ states[index].name = \"propose\" /\\ states[index].round > 0 =>\n            /\\ Cardinality(SubsetOfMsgs(network, [\n                type     |-> \"CP:DECIDED\",\n                round    |-> states[index].round-1,\n                cp_val   |-> 1])) > 0\n            /\\ Cardinality(SubsetOfMsgs(network, [\n                type     |-> \"ANNOUNCEMENT\",\n                round    |-> states[index].round-1])) = 0\n        /\\ states[index].name = \"commit\" =>\n            /\\ Cardinality(SubsetOfMsgs(network, [\n                type     |-> \"PRECOMMIT\",\n                round    |-> states[index].round])) >= TwoFPlusOne\n            /\\ Cardinality(SubsetOfMsgs(network, [\n                type     |-> \"PROPOSAL\",\n                round    |-> states[index].round])) = 1\n            /\\  LET subset == SubsetOfMsgs(network, [type |-> \"ANNOUNCEMENT\"])\n                IN /\\ \\A m1, m2 \\in subset : m1.round = m2.round\n    /\\ \\A msg \\in network:\n        /\\ msg.round <= MaxRound\n        /\\ msg.cp_round <= MaxCPRound\n        /\\ msg.round >= 0\n        /\\ msg.cp_round >= 0\n        /\\ msg.type \\in {\"PROPOSAL\", \"PRECOMMIT\", \"CP:PRE-VOTE\", \"CP:MAIN-VOTE\", \"CP:DECIDED\", \"ANNOUNCEMENT\"}\n        /\\ msg.index \\in 0..N-1\n\n\n\n=============================================================================\n"
  },
  {
    "path": "consensusv2/spec/README.md",
    "content": "# Consensus specification\n\nThis folder contains the consensus specification for the Pactus blockchain,\nwhich is based on the TLA+ formal language.\nThe specification defines the consensus algorithm used by the Pactus blockchain.\n\nMore info can be found [here](https://docs.pactus.org/protocol/consensus/specification/)\n\n## Model checking\n\nTo run the model checker, you will need to download and install the [TLA+ Toolbox](https://lamport.azurewebsites.net/tla/toolbox.html),\nwhich includes the TLC model checker. Follow the steps below to run the TLC model checker:\n\n- Add the `Pactus.tla` spec to your TLA+ Toolbox project.\n- Create a new model and specify a temporal formula as `Spec`.\n- Specify an invariants formula as `TypeOK`.\n- Specify a properties formula as `Success`.\n- Define the required constants:\n    - `N`: The total number of nodes (e.g. 4)\n    - `F`: The maximum number of faulty nodes (e.g. 1)\n    - `FaultyNodes`: the index of faulty nodes (e.g. {3})\n    - `MaxRound`: The maximum number of rounds (e.g. 1)\n    - `MaxCPRound`: The maximum number of change-proposer (CP) rounds (e.g. 1)\n- Run the TLC checker to check the correctness of the specification:\n\n```bash\njava -XX:+UseParallelGC -jar /opt/TLA+Toolbox/tla2tools.jar -config ./Pactus.cfg ./Pactus.tla -workers auto -fpmem 1\n```\n"
  },
  {
    "path": "consensusv2/state.go",
    "content": "package consensusv2\n\nimport (\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype consState interface {\n\tenter()\n\tdecide()\n\tonAddVote(v *vote.Vote)\n\tonSetProposal(p *proposal.Proposal)\n\tonTimeout(t *ticker)\n\tname() string\n}\n"
  },
  {
    "path": "consensusv2/ticker.go",
    "content": "package consensusv2\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype tickerTarget int\n\nconst (\n\ttickerTargetNewHeight      = tickerTarget(1)\n\ttickerTargetChangeProposer = tickerTarget(2)\n\ttickerTargetQueryProposal  = tickerTarget(3)\n\ttickerTargetQueryVote      = tickerTarget(4)\n)\n\nfunc (rs tickerTarget) String() string {\n\tswitch rs {\n\tcase tickerTargetNewHeight:\n\t\treturn \"new-height\"\n\tcase tickerTargetChangeProposer:\n\t\treturn \"change-proposer\"\n\tcase tickerTargetQueryProposal:\n\t\treturn \"query-proposal\"\n\tcase tickerTargetQueryVote:\n\t\treturn \"query-vote\"\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\ntype ticker struct {\n\tDuration time.Duration\n\tHeight   types.Height\n\tRound    types.Round\n\tTarget   tickerTarget\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (ti ticker) LogString() string {\n\treturn fmt.Sprintf(\"%v@ %d/%d/%s\", ti.Duration, ti.Height, ti.Round, ti.Target)\n}\n"
  },
  {
    "path": "consensusv2/voteset/binary_voteset.go",
    "content": "package voteset\n\nimport (\n\t\"maps\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype roundVotes struct {\n\t// Each vote can have one of 3 possible values: {0,1,Abstain}.\n\tvoteBoxes  [3]*voteBox\n\tallVotes   map[crypto.Address]*vote.Vote\n\tvotedPower int64\n}\n\nfunc newRoundVotes() *roundVotes {\n\tvoteBoxes := [3]*voteBox{}\n\tvoteBoxes[vote.CPValueNo] = newVoteBox()\n\tvoteBoxes[vote.CPValueYes] = newVoteBox()\n\tvoteBoxes[vote.CPValueAbstain] = newVoteBox()\n\n\treturn &roundVotes{\n\t\tvoteBoxes:  voteBoxes,\n\t\tallVotes:   make(map[crypto.Address]*vote.Vote),\n\t\tvotedPower: 0,\n\t}\n}\n\nfunc (rv *roundVotes) addVote(v *vote.Vote, power int64) {\n\tvb := rv.voteBoxes[v.CPValue()]\n\tvb.addVote(v, power)\n}\n\ntype BinaryVoteSet struct {\n\t*voteSet\n\troundVotes []*roundVotes\n}\n\nfunc NewCPPreVoteVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc NewCPMainVoteVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc NewCPDecidedVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BinaryVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBinaryVoteSet(voteSet)\n}\n\nfunc newBinaryVoteSet(voteSet *voteSet) *BinaryVoteSet {\n\treturn &BinaryVoteSet{\n\t\tvoteSet:    voteSet,\n\t\troundVotes: make([]*roundVotes, 0, 1),\n\t}\n}\n\nfunc (vs *BinaryVoteSet) mustGetRoundVotes(cpRound int16) *roundVotes {\n\tfor i := len(vs.roundVotes); i <= int(cpRound); i++ {\n\t\trv := newRoundVotes()\n\t\tvs.roundVotes = append(vs.roundVotes, rv)\n\t}\n\n\treturn vs.roundVotes[cpRound]\n}\n\n// AllVotes returns a list of all votes in the VoteSet.\nfunc (vs *BinaryVoteSet) AllVotes() []*vote.Vote {\n\tvotes := make([]*vote.Vote, 0)\n\tfor _, rv := range vs.roundVotes {\n\t\tfor _, v := range rv.allVotes {\n\t\t\tvotes = append(votes, v)\n\t\t}\n\t}\n\n\treturn votes\n}\n\n// AddVote attempts to add a vote to the VoteSet. Returns an error if the vote is invalid.\nfunc (vs *BinaryVoteSet) AddVote(vote *vote.Vote) (bool, error) {\n\tpower, err := vs.voteSet.verifyVote(vote)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\troundVotes := vs.mustGetRoundVotes(vote.CPRound())\n\texistingVote, ok := roundVotes.allVotes[vote.Signer()]\n\tif ok {\n\t\tif existingVote.Hash() == vote.Hash() {\n\t\t\t// The vote is already added\n\t\t\treturn false, nil\n\t\t}\n\n\t\t// It is a double vote\n\t\terr = ErrDoubleVote\n\t} else {\n\t\troundVotes.allVotes[vote.Signer()] = vote\n\t\troundVotes.votedPower += power\n\t}\n\n\troundVotes.addVote(vote, power)\n\n\treturn true, err\n}\n\n// Has2FP1Votes checks whether the given change-proposer round has received 2f+1 votes.\nfunc (vs *BinaryVoteSet) Has2FP1Votes(cpRound int16) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.has2FP1Power(roundVotes.votedPower)\n}\n\n// HasAnyVoteFor checks whether the given change-proposer round has received any votes for the given value.\nfunc (vs *BinaryVoteSet) HasAnyVoteFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn roundVotes.voteBoxes[cpValue].votedPower > 0\n}\n\n// HasAllVotesFor checks whether the given change-proposer round has received all votes for the given value.\nfunc (vs *BinaryVoteSet) HasAllVotesFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn roundVotes.voteBoxes[cpValue].votedPower == roundVotes.votedPower\n}\n\n// Has1FP1VotesFor checks whether the given change-proposer round has received f+1 votes for the given value.\nfunc (vs *BinaryVoteSet) Has1FP1VotesFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.has1FP1Power(roundVotes.voteBoxes[cpValue].votedPower)\n}\n\n// Has2FP1VotesFor checks whether the given change-proposer round has received 2f+1 votes for the given value.\nfunc (vs *BinaryVoteSet) Has2FP1VotesFor(cpRound int16, cpValue vote.CPValue) bool {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn vs.has2FP1Power(roundVotes.voteBoxes[cpValue].votedPower)\n}\n\n// BinaryVotes returns the votes for the given change-proposer round and value.\nfunc (vs *BinaryVoteSet) BinaryVotes(cpRound int16, cpValue vote.CPValue) map[crypto.Address]*vote.Vote {\n\tvotes := map[crypto.Address]*vote.Vote{}\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\tvoteBox := roundVotes.voteBoxes[cpValue]\n\tmaps.Copy(votes, voteBox.votes)\n\n\treturn votes\n}\n\n// GetRandomVote returns a random vote for the given change-proposer round and value.\nfunc (vs *BinaryVoteSet) GetRandomVote(cpRound int16, cpValue vote.CPValue) *vote.Vote {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\tfor _, v := range roundVotes.voteBoxes[cpValue].votes {\n\t\treturn v\n\t}\n\n\treturn nil\n}\n\n// VotedPower returns the total voting power of the votes for the given change-proposer round.\nfunc (vs *BinaryVoteSet) VotedPower(cpRound int16) int64 {\n\troundVotes := vs.mustGetRoundVotes(cpRound)\n\n\treturn roundVotes.votedPower\n}\n"
  },
  {
    "path": "consensusv2/voteset/block_voteset.go",
    "content": "package voteset\n\nimport (\n\t\"maps\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype BlockVoteSet struct {\n\t*voteSet\n\tblockVotes map[hash.Hash]*voteBox\n\tallVotes   map[crypto.Address]*vote.Vote\n\tvotedPower int64\n}\n\nfunc NewPrecommitVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *BlockVoteSet {\n\tvoteSet := newVoteSet(round, totalPower, validators)\n\n\treturn newBlockVoteSet(voteSet)\n}\n\nfunc newBlockVoteSet(voteSet *voteSet) *BlockVoteSet {\n\treturn &BlockVoteSet{\n\t\tvoteSet:    voteSet,\n\t\tblockVotes: make(map[hash.Hash]*voteBox),\n\t\tallVotes:   make(map[crypto.Address]*vote.Vote),\n\t\tvotedPower: 0,\n\t}\n}\n\nfunc (vs *BlockVoteSet) BlockVotes(blockHash hash.Hash) map[crypto.Address]*vote.Vote {\n\tvotes := map[crypto.Address]*vote.Vote{}\n\tblockVotes := vs.mustGetBlockVotes(blockHash)\n\tmaps.Copy(votes, blockVotes.votes)\n\n\treturn votes\n}\n\nfunc (vs *BlockVoteSet) mustGetBlockVotes(blockHash hash.Hash) *voteBox {\n\tblockVotes, exists := vs.blockVotes[blockHash]\n\tif !exists {\n\t\tblockVotes = newVoteBox()\n\t\tvs.blockVotes[blockHash] = blockVotes\n\t}\n\n\treturn blockVotes\n}\n\n// AllVotes returns a list of all votes in the VoteSet.\nfunc (vs *BlockVoteSet) AllVotes() []*vote.Vote {\n\tvotes := make([]*vote.Vote, 0, len(vs.allVotes))\n\tfor _, v := range vs.allVotes {\n\t\tvotes = append(votes, v)\n\t}\n\n\treturn votes\n}\n\n// AddVote attempts to add a vote to the VoteSet.\n// Returns an error if the vote is invalid or if it is a double vote.\nfunc (vs *BlockVoteSet) AddVote(vote *vote.Vote) (bool, error) {\n\tpower, err := vs.voteSet.verifyVote(vote)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\texistingVote, ok := vs.allVotes[vote.Signer()]\n\tif ok {\n\t\tif existingVote.Hash() == vote.Hash() {\n\t\t\t// The vote is already added\n\t\t\treturn false, nil\n\t\t}\n\n\t\t// It is a double vote\n\t\terr = ErrDoubleVote\n\t} else {\n\t\tvs.allVotes[vote.Signer()] = vote\n\t\tvs.votedPower += power\n\t}\n\n\tblockVotes := vs.mustGetBlockVotes(vote.BlockHash())\n\tblockVotes.addVote(vote, power)\n\n\treturn true, err\n}\n\n// Has2FP1Votes checks whether has received 2f+1 votes.\nfunc (vs *BlockVoteSet) Has2FP1Votes() bool {\n\treturn vs.has2FP1Power(vs.votedPower)\n}\n\n// Has3FP1VotesFor checks whether the given block has received 3f+1 votes.\nfunc (vs *BlockVoteSet) Has3FP1VotesFor(blockHash hash.Hash) bool {\n\tblockVotes := vs.mustGetBlockVotes(blockHash)\n\n\treturn vs.has3FP1Power(blockVotes.votedPower)\n}\n\n// Has2FP1VotesFor checks whether the given block has received 2f+1 votes.\nfunc (vs *BlockVoteSet) Has2FP1VotesFor(blockHash hash.Hash) bool {\n\tblockVotes := vs.mustGetBlockVotes(blockHash)\n\n\treturn vs.has2FP1Power(blockVotes.votedPower)\n}\n\n// Has1FP1VotesFor checks whether the given block has received f+1 votes.\nfunc (vs *BlockVoteSet) Has1FP1VotesFor(blockHash hash.Hash) bool {\n\tblockVotes := vs.mustGetBlockVotes(blockHash)\n\n\treturn vs.has1FP1Power(blockVotes.votedPower)\n}\n\n// VotedPower returns the total voting power of the votes.\nfunc (vs *BlockVoteSet) VotedPower() int64 {\n\treturn vs.votedPower\n}\n"
  },
  {
    "path": "consensusv2/voteset/errors.go",
    "content": "package voteset\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\n// ErrDoubleVote is returned when a validator casts multiple different votes.\nvar ErrDoubleVote = errors.New(\"double vote\")\n\n// IneligibleVoterError is returned when the voter is not a member of the committee.\ntype IneligibleVoterError struct {\n\tAddress crypto.Address\n}\n\nfunc (e IneligibleVoterError) Error() string {\n\treturn fmt.Sprintf(\"validator %s is not part of the committee\", e.Address)\n}\n"
  },
  {
    "path": "consensusv2/voteset/vote_box.go",
    "content": "package voteset\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype voteBox struct {\n\tvotes      map[crypto.Address]*vote.Vote\n\tvotedPower int64\n}\n\nfunc newVoteBox() *voteBox {\n\treturn &voteBox{\n\t\tvotes:      make(map[crypto.Address]*vote.Vote),\n\t\tvotedPower: 0,\n\t}\n}\n\nfunc (vs *voteBox) addVote(vote *vote.Vote, power int64) {\n\tif vs.votes[vote.Signer()] == nil {\n\t\tvs.votes[vote.Signer()] = vote\n\t\tvs.votedPower += power\n\t}\n}\n"
  },
  {
    "path": "consensusv2/voteset/vote_box_test.go",
    "content": "package voteset\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestDoubleVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tsigner := ts.RandValAddress()\n\tpower := ts.RandInt64Max(1000)\n\n\tv := vote.NewPrecommitVote(hash, height, round, signer)\n\n\tvb := newVoteBox()\n\n\tvb.addVote(v, power)\n\tvb.addVote(v, power)\n\n\tassert.Equal(t, power, vb.votedPower)\n}\n"
  },
  {
    "path": "consensusv2/voteset/voteset.go",
    "content": "package voteset\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype voteSet struct {\n\tround      types.Round\n\tvalidators map[crypto.Address]*validator.Validator\n\ttotalPower int64\n}\n\nfunc newVoteSet(round types.Round, totalPower int64,\n\tvalidators map[crypto.Address]*validator.Validator,\n) *voteSet {\n\treturn &voteSet{\n\t\tround:      round,\n\t\tvalidators: validators,\n\t\ttotalPower: totalPower,\n\t}\n}\n\n// Round returns the round number for the VoteSet.\nfunc (vs *voteSet) Round() types.Round {\n\treturn vs.round\n}\n\n// verifyVote checks if the given vote is valid.\n// It returns the voting power of if valid, or an error if not.\nfunc (vs *voteSet) verifyVote(vote *vote.Vote) (int64, error) {\n\tsigner := vote.Signer()\n\tval := vs.validators[signer]\n\tif val == nil {\n\t\treturn 0, IneligibleVoterError{\n\t\t\tAddress: signer,\n\t\t}\n\t}\n\n\tif err := vote.Verify(val.PublicKey()); err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn val.Power(), nil\n}\n\n// has3FP1Power checks whether the given power is greater than or equal to 3f+1,\n// where f is the maximum faulty power.\nfunc (vs *BlockVoteSet) has3FP1Power(power int64) bool {\n\treturn certificate.Has3FP1Power(vs.totalPower, power)\n}\n\n// has2FP1Power checks whether the given power is greater than or equal to 2f+1,\n// where f is the maximum faulty power.\nfunc (vs *voteSet) has2FP1Power(power int64) bool {\n\treturn certificate.Has2FP1Power(vs.totalPower, power)\n}\n\n// has1FP1Power checks whether the given power is greater than or equal to f+1,\n// where f is the maximum faulty power.\nfunc (vs *voteSet) has1FP1Power(power int64) bool {\n\treturn certificate.Has1FP1Power(vs.totalPower, power)\n}\n"
  },
  {
    "path": "consensusv2/voteset/voteset_test.go",
    "content": "package voteset\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc setupCommittee(ts *testsuite.TestSuite, stakes ...amount.Amount) (\n\tmap[crypto.Address]*validator.Validator, []*bls.ValidatorKey, int64,\n) {\n\tvalKeys := make([]*bls.ValidatorKey, 0, len(stakes))\n\tvalsMap := map[crypto.Address]*validator.Validator{}\n\ttotalPower := int64(0)\n\tfor i, s := range stakes {\n\t\tpub, prv := ts.RandBLSKeyPair()\n\t\tval := validator.NewValidator(pub, int32(i))\n\t\tval.AddToStake(s)\n\t\tvalsMap[val.Address()] = val\n\t\ttotalPower += val.Power()\n\t\tvalKeys = append(valKeys, bls.NewValidatorKey(prv))\n\t}\n\n\treturn valsMap, valKeys, totalPower\n}\n\nfunc TestAddBlockVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tinvKey := ts.RandValKey()\n\tvalKey := valKeys[0]\n\tvoteSet := NewPrecommitVoteSet(round, totalPower, valsMap)\n\tassert.Equal(t, round, voteSet.Round())\n\n\tvote1 := vote.NewPrecommitVote(hash1, height, round, invKey.Address())\n\tvote2 := vote.NewPrecommitVote(hash1, height, round, valKey.Address())\n\tvote3 := vote.NewPrecommitVote(hash2, height, round, valKey.Address())\n\n\tts.HelperSignVote(invKey, vote1)\n\tadded, err := voteSet.AddVote(vote1)\n\trequire.ErrorIs(t, err, IneligibleVoterError{Address: vote1.Signer()}) // unknown validator\n\tassert.False(t, added)\n\n\tts.HelperSignVote(invKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\tassert.False(t, added)\n\n\tts.HelperSignVote(valKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err) // ok\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(vote2) // Adding again\n\tassert.False(t, added)\n\trequire.NoError(t, err)\n\n\tts.HelperSignVote(valKey, vote3)\n\tadded, err = voteSet.AddVote(vote3)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n}\n\nfunc TestAddBinaryVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcpRound := int16(ts.RandRound())\n\tcpVal := ts.RandIntMax(2)\n\tjust := &vote.JustInitYes{}\n\tinvKey := ts.RandValKey()\n\tvalKey := valKeys[0]\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewCPPreVote(hash1, height, round, cpRound, vote.CPValue(cpVal), just, invKey.Address())\n\tvote2 := vote.NewCPPreVote(hash1, height, round, cpRound, vote.CPValue(cpVal), just, valKey.Address())\n\tvote3 := vote.NewCPPreVote(hash2, height, round, cpRound, vote.CPValue(cpVal), just, valKey.Address())\n\n\tts.HelperSignVote(invKey, vote1)\n\tadded, err := voteSet.AddVote(vote1)\n\trequire.ErrorIs(t, err, IneligibleVoterError{Address: vote1.Signer()}) // unknown validator\n\tassert.False(t, added)\n\n\tts.HelperSignVote(invKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\tassert.False(t, added)\n\n\tts.HelperSignVote(valKey, vote2)\n\tadded, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err) // ok\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(vote2) // Adding again\n\tassert.False(t, added)\n\trequire.NoError(t, err)\n\n\tts.HelperSignVote(valKey, vote3)\n\tadded, err = voteSet.AddVote(vote3)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n}\n\nfunc TestDoubleBlockVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\thash3 := ts.RandHash()\n\taddr := valKeys[0].Address()\n\tvoteSet := NewPrecommitVoteSet(0, totalPower, valsMap)\n\n\tcorrectVote := vote.NewPrecommitVote(hash1, 1, 0, addr)\n\tdoubleVote1 := vote.NewPrecommitVote(hash2, 1, 0, addr)\n\tdoubleVote2 := vote.NewPrecommitVote(hash3, 1, 0, addr)\n\n\t// sign the votes\n\tts.HelperSignVote(valKeys[0], correctVote)\n\tts.HelperSignVote(valKeys[0], doubleVote1)\n\tts.HelperSignVote(valKeys[0], doubleVote2)\n\n\tadded, err := voteSet.AddVote(correctVote)\n\trequire.NoError(t, err)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(doubleVote1)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(doubleVote2)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n\n\tassert.Contains(t, voteSet.AllVotes(), correctVote)\n\tassert.NotContains(t, voteSet.AllVotes(), doubleVote1)\n\tassert.NotContains(t, voteSet.AllVotes(), doubleVote2)\n}\n\nfunc TestDoubleBinaryVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\thash3 := ts.RandHash()\n\taddr := valKeys[0].Address()\n\tvoteSet := NewCPPreVoteVoteSet(0, totalPower, valsMap)\n\n\tcorrectVote := vote.NewCPPreVote(hash1, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\tdoubleVote1 := vote.NewCPPreVote(hash2, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\tdoubleVote2 := vote.NewCPPreVote(hash3, 1, 0, 0, vote.CPValueYes, &vote.JustInitYes{}, addr)\n\n\t// sign the votes\n\tts.HelperSignVote(valKeys[0], correctVote)\n\tts.HelperSignVote(valKeys[0], doubleVote1)\n\tts.HelperSignVote(valKeys[0], doubleVote2)\n\n\tadded, err := voteSet.AddVote(correctVote)\n\trequire.NoError(t, err)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(doubleVote1)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n\n\tadded, err = voteSet.AddVote(doubleVote2)\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\tassert.True(t, added)\n\n\tassert.Contains(t, voteSet.AllVotes(), correctVote)\n\tassert.NotContains(t, voteSet.AllVotes(), doubleVote1)\n\tassert.NotContains(t, voteSet.AllVotes(), doubleVote2)\n}\n\nfunc TestAllBlockVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\tvoteSet := NewPrecommitVoteSet(1, totalPower, valsMap)\n\n\tvote1 := vote.NewPrecommitVote(ts.RandHash(), 1, 1, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(ts.RandHash(), 1, 1, valKeys[1].Address())\n\tvote3 := vote.NewPrecommitVote(ts.RandHash(), 1, 1, valKeys[2].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\n\tassert.Empty(t, voteSet.AllVotes())\n\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\t_, _ = voteSet.AddVote(vote3)\n\n\tassert.Contains(t, voteSet.AllVotes(), vote1)\n\tassert.Contains(t, voteSet.AllVotes(), vote2)\n\tassert.Contains(t, voteSet.AllVotes(), vote3)\n}\n\nfunc TestAllBinaryVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\tvoteSet := NewCPMainVoteVoteSet(1, totalPower, valsMap)\n\n\tvote1 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 0, vote.CPValueNo, &vote.JustInitYes{}, valKeys[0].Address())\n\tvote2 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 1, vote.CPValueYes, &vote.JustInitYes{}, valKeys[1].Address())\n\tvote3 := vote.NewCPMainVote(hash.UndefHash, 1, 1, 2, vote.CPValueAbstain, &vote.JustInitYes{}, valKeys[2].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\n\tassert.Empty(t, voteSet.AllVotes())\n\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\t_, _ = voteSet.AddVote(vote3)\n\n\tassert.Contains(t, voteSet.AllVotes(), vote1)\n\tassert.Contains(t, voteSet.AllVotes(), vote2)\n\tassert.Contains(t, voteSet.AllVotes(), vote3)\n\n\tranVote1 := voteSet.GetRandomVote(1, vote.CPValueNo)\n\tassert.Nil(t, ranVote1)\n\n\tranVote2 := voteSet.GetRandomVote(1, vote.CPValueYes)\n\tassert.Equal(t, vote2, ranVote2)\n}\n\nfunc TestBlockQuorumVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t// N = 30 (5+6+8+11)\n\t// f = 9\n\t// 1f+1 = 10\n\t// 2f+1 = 19\n\t// 3f+1 = 28\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\tvoteSet := NewPrecommitVoteSet(0, totalPower, valsMap)\n\tblockHash := ts.RandHash()\n\tvote1 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[1].Address())\n\tvote3 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[2].Address())\n\tvote4 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[3].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\tts.HelperSignVote(valKeys[3], vote4)\n\n\t_, _ = voteSet.AddVote(vote1)\n\tassert.False(t, voteSet.Has1FP1VotesFor(blockHash))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote2)\n\tassert.True(t, voteSet.Has1FP1VotesFor(blockHash))\n\tassert.False(t, voteSet.Has2FP1VotesFor(blockHash))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote3)\n\tassert.True(t, voteSet.Has2FP1VotesFor(blockHash))\n\tassert.False(t, voteSet.Has3FP1VotesFor(blockHash))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote4)\n\tassert.True(t, voteSet.Has3FP1VotesFor(blockHash))\n}\n\nfunc TestBinaryQuorumVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t// N = 30 (5+6+8+11)\n\t// f = 9\n\t// 1f+1 = 10\n\t// 2f+1 = 19\n\t// 3f+1 = 28\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[1].Address())\n\tvote3 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[2].Address())\n\tvote4 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[3].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\tts.HelperSignVote(valKeys[3], vote4)\n\n\t_, _ = voteSet.AddVote(vote1)\n\n\tassert.False(t, voteSet.Has1FP1VotesFor(0, vote.CPValueNo))\n\tassert.False(t, voteSet.Has1FP1VotesFor(0, vote.CPValueYes))\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueAbstain))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote2)\n\n\tassert.True(t, voteSet.Has1FP1VotesFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.Has2FP1VotesFor(0, vote.CPValueYes))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote3)\n\n\tassert.True(t, voteSet.Has2FP1VotesFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAllVotesFor(0, vote.CPValueNo))\n\tassert.True(t, voteSet.HasAllVotesFor(0, vote.CPValueYes))\n\n\t// Add more votes\n\t_, _ = voteSet.AddVote(vote4)\n\n\tassert.True(t, voteSet.HasAllVotesFor(0, vote.CPValueYes))\n}\n\nfunc TestBlockVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tvoteSet := NewPrecommitVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewPrecommitVote(hash, height, round, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(hash, height, round, valKeys[1].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\n\tbv := voteSet.BlockVotes(hash)\n\tassert.Contains(t, bv, vote1.Signer())\n\tassert.Contains(t, bv, vote2.Signer())\n}\n\nfunc TestBinaryVotes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote1 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueNo, just, valKeys[1].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\n\tbv1 := voteSet.BinaryVotes(0, vote.CPValueYes)\n\tassert.Contains(t, bv1, vote1.Signer())\n\tassert.NotContains(t, bv1, vote2.Signer())\n\n\tbv2 := voteSet.BinaryVotes(0, vote.CPValueNo)\n\tassert.NotContains(t, bv2, vote1.Signer())\n\tassert.Contains(t, bv2, vote2.Signer())\n}\n\nfunc TestDecidedVoteset(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPDecidedVoteSet(round, totalPower, valsMap)\n\n\tvte := vote.NewCPDecidedVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\n\tts.HelperSignVote(valKeys[0], vte)\n\n\t_, err := voteSet.AddVote(vte)\n\trequire.NoError(t, err)\n\tassert.True(t, voteSet.HasAnyVoteFor(0, vote.CPValueYes))\n\tassert.False(t, voteSet.HasAnyVoteFor(0, vote.CPValueNo))\n}\n\nfunc TestBlockVotedPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tvoteSet := NewPrecommitVoteSet(round, totalPower, valsMap)\n\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\tvote1a := vote.NewPrecommitVote(hash1, height, round, valKeys[0].Address())\n\tvote1b := vote.NewPrecommitVote(hash2, height, round, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(hash2, height, round, valKeys[1].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1a)\n\tts.HelperSignVote(valKeys[0], vote1b)\n\tts.HelperSignVote(valKeys[1], vote2)\n\n\t_, err := voteSet.AddVote(vote1a)\n\trequire.NoError(t, err)\n\n\t_, err = voteSet.AddVote(vote1b) // Double vote\n\trequire.ErrorIs(t, err, ErrDoubleVote)\n\n\t_, err = voteSet.AddVote(vote2)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, int64(5+6), voteSet.VotedPower())\n}\n\nfunc TestBinaryVotedPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tvoteSet := NewCPPreVoteVoteSet(1, totalPower, valsMap)\n\n\tjust := &vote.JustInitYes{}\n\thash1 := ts.RandHash()\n\thash2 := ts.RandHash()\n\tvote1a := vote.NewCPPreVote(hash1, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote1b := vote.NewCPPreVote(hash2, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote1c := vote.NewCPPreVote(hash1, height, round, 1, vote.CPValueYes, just, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(hash1, height, round, 0, vote.CPValueYes, just, valKeys[1].Address())\n\n\tts.HelperSignVote(valKeys[0], vote1a)\n\tts.HelperSignVote(valKeys[0], vote1b)\n\tts.HelperSignVote(valKeys[0], vote1c)\n\tts.HelperSignVote(valKeys[1], vote2)\n\n\t_, _err := voteSet.AddVote(vote1a)\n\trequire.NoError(t, _err)\n\n\t_, _err = voteSet.AddVote(vote1b) // Double vote\n\trequire.ErrorIs(t, _err, ErrDoubleVote)\n\n\t_, _err = voteSet.AddVote(vote1c) // Next CP:Round\n\trequire.NoError(t, _err)\n\n\t_, _err = voteSet.AddVote(vote2)\n\trequire.NoError(t, _err)\n\n\tassert.Equal(t, int64(5+6), voteSet.VotedPower(0))\n\tassert.Equal(t, int64(5), voteSet.VotedPower(1))\n}\n\nfunc TestBlockHas2FP1Votes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\tvoteSet := NewPrecommitVoteSet(0, totalPower, valsMap)\n\tblockHash := ts.RandHash()\n\tvote0 := vote.NewPrecommitVote(ts.RandHash(), 1, 0, valKeys[0].Address()) // Byzantine vote\n\tvote1 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[0].Address())\n\tvote2 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[1].Address())\n\tvote3 := vote.NewPrecommitVote(blockHash, 1, 0, valKeys[2].Address())\n\n\tts.HelperSignVote(valKeys[0], vote0)\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\n\t_, _ = voteSet.AddVote(vote0)\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\tassert.False(t, voteSet.Has2FP1Votes())\n\n\t_, _ = voteSet.AddVote(vote3)\n\tassert.True(t, voteSet.Has2FP1Votes())\n}\n\nfunc TestBinaryHas3FP1Votes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tvalsMap, valKeys, totalPower := setupCommittee(ts, 5, 6, 8, 11)\n\n\thash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\tvoteSet := NewCPPreVoteVoteSet(round, totalPower, valsMap)\n\n\tvote0 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueNo, just, valKeys[0].Address()) // Byzantine vote\n\tvote1 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[0].Address())\n\tvote2 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[1].Address())\n\tvote3 := vote.NewCPPreVote(hash, height, round, 0, vote.CPValueYes, just, valKeys[2].Address())\n\n\tts.HelperSignVote(valKeys[0], vote0)\n\tts.HelperSignVote(valKeys[0], vote1)\n\tts.HelperSignVote(valKeys[1], vote2)\n\tts.HelperSignVote(valKeys[2], vote3)\n\n\t_, _ = voteSet.AddVote(vote0)\n\t_, _ = voteSet.AddVote(vote1)\n\t_, _ = voteSet.AddVote(vote2)\n\tassert.False(t, voteSet.Has2FP1Votes(0))\n\n\t_, _ = voteSet.AddVote(vote3)\n\tassert.True(t, voteSet.Has2FP1Votes(0))\n}\n"
  },
  {
    "path": "crypto/address.go",
    "content": "package crypto\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\n// Address format:\n// hrp + `1` + type + data + checksum\n\nconst (\n\tSignatureTypeBLS     byte = 1\n\tSignatureTypeEd25519 byte = 3\n)\n\nconst (\n\tAddressSize           = 21\n\ttreasuryAddressString = \"000000000000000000000000000000000000000000\"\n)\n\nvar TreasuryAddress = Address{0}\n\ntype Address [AddressSize]byte\n\n// AddressFromString decodes the input string and returns the Address\n// if the string is a valid bech32m encoding of an address.\nfunc AddressFromString(text string) (Address, error) {\n\tif text == treasuryAddressString {\n\t\treturn TreasuryAddress, nil\n\t}\n\n\t// Decode the bech32m encoded address.\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(text)\n\tif err != nil {\n\t\treturn Address{}, err\n\t}\n\n\t// Check if hrp is valid\n\tif hrp != AddressHRP {\n\t\treturn Address{}, InvalidHRPError(hrp)\n\t}\n\n\t// check type is valid\n\tvalidTypes := []AddressType{\n\t\tAddressTypeValidator,\n\t\tAddressTypeBLSAccount,\n\t\tAddressTypeEd25519Account,\n\t}\n\tif !slices.Contains(validTypes, AddressType(typ)) {\n\t\treturn Address{}, InvalidAddressTypeError(typ)\n\t}\n\n\t// check length is valid\n\tif len(data) != 20 {\n\t\treturn Address{}, InvalidLengthError(len(data) + 1)\n\t}\n\n\tvar addr Address\n\taddr[0] = typ\n\tcopy(addr[1:], data)\n\n\treturn addr, nil\n}\n\n// NewAddress create a new address based.\nfunc NewAddress(typ AddressType, data []byte) Address {\n\tvar addr Address\n\taddr[0] = byte(typ)\n\tcopy(addr[1:], data)\n\n\treturn addr\n}\n\n// Bytes returns the 21 bytes of the address data.\nfunc (addr Address) Bytes() []byte {\n\treturn addr[:]\n}\n\n// String returns a human-readable string for the address.\nfunc (addr Address) String() string {\n\tif addr == TreasuryAddress {\n\t\treturn treasuryAddressString\n\t}\n\n\tstr, _ := bech32m.EncodeFromBase256WithType(\n\t\tAddressHRP,\n\t\taddr[0],\n\t\taddr[1:])\n\n\treturn str\n}\n\n// ShortString returns a shortened string representation of the hash.\nfunc (addr Address) ShortString() string {\n\tstr := addr.String()\n\n\treturn fmt.Sprintf(\"%s-%s\", str[:8], str[len(str)-5:])\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (addr Address) LogString() string {\n\treturn addr.ShortString()\n}\n\nfunc (addr Address) Type() AddressType {\n\treturn AddressType(addr[0])\n}\n\nfunc (addr Address) Encode(w io.Writer) error {\n\tswitch typ := addr.Type(); typ {\n\tcase AddressTypeTreasury:\n\t\treturn encoding.WriteElement(w, uint8(0))\n\tcase AddressTypeValidator,\n\t\tAddressTypeBLSAccount,\n\t\tAddressTypeEd25519Account:\n\t\treturn encoding.WriteElement(w, addr)\n\tdefault:\n\t\treturn InvalidAddressTypeError(typ)\n\t}\n}\n\nfunc (addr *Address) Decode(r io.Reader) error {\n\terr := encoding.ReadElement(r, &addr[0])\n\tif err != nil {\n\t\treturn err\n\t}\n\tswitch typ := addr.Type(); typ {\n\tcase AddressTypeTreasury:\n\t\treturn nil\n\tcase AddressTypeValidator,\n\t\tAddressTypeBLSAccount,\n\t\tAddressTypeEd25519Account:\n\t\treturn encoding.ReadElement(r, addr[1:])\n\tdefault:\n\t\treturn InvalidAddressTypeError(typ)\n\t}\n}\n\n// SerializeSize returns the number of bytes it would take to serialize the address.\nfunc (addr Address) SerializeSize() int {\n\tswitch typ := addr.Type(); typ {\n\tcase AddressTypeTreasury:\n\t\treturn 1\n\tcase AddressTypeValidator,\n\t\tAddressTypeBLSAccount,\n\t\tAddressTypeEd25519Account:\n\t\treturn AddressSize\n\tdefault:\n\t\treturn 0\n\t}\n}\n\nfunc (addr Address) IsTreasuryAddress() bool {\n\treturn addr.Type() == AddressTypeTreasury\n}\n\nfunc (addr Address) IsAccountAddress() bool {\n\treturn addr.Type() == AddressTypeTreasury ||\n\t\taddr.Type() == AddressTypeBLSAccount ||\n\t\taddr.Type() == AddressTypeEd25519Account\n}\n\nfunc (addr Address) IsValidatorAddress() bool {\n\treturn addr.Type() == AddressTypeValidator\n}\n"
  },
  {
    "path": "crypto/address_test.go",
    "content": "package crypto_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"io\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTreasuryAddressType(t *testing.T) {\n\ttreasury := crypto.TreasuryAddress\n\n\tassert.False(t, treasury.IsValidatorAddress())\n\tassert.True(t, treasury.IsAccountAddress())\n\tassert.True(t, treasury.IsTreasuryAddress())\n}\n\nfunc TestAddressType(t *testing.T) {\n\ttests := []struct {\n\t\taddress   string\n\t\taccount   bool\n\t\tvalidator bool\n\t}{\n\t\t{address: \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\", account: false, validator: true},\n\t\t{address: \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\", account: true, validator: false},\n\t\t{address: \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\", account: true, validator: false},\n\t}\n\n\tfor _, tt := range tests {\n\t\taddr, _ := crypto.AddressFromString(tt.address)\n\n\t\tassert.Equal(t, tt.account, addr.IsAccountAddress())\n\t\tassert.Equal(t, tt.validator, addr.IsValidatorAddress())\n\t}\n}\n\nfunc TestFromString(t *testing.T) {\n\ttests := []struct {\n\t\tencoded  string\n\t\terr      error\n\t\tbytes    []byte\n\t\taddrType crypto.AddressType\n\t}{\n\t\t{\n\t\t\t\"000000000000000000000000000000000000000000\",\n\t\t\tnil,\n\t\t\t[]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n\t\t\tcrypto.AddressTypeTreasury,\n\t\t},\n\t\t{\n\t\t\t\"00\",\n\t\t\tbech32m.InvalidLengthError(2),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\tbech32m.InvalidLengthError(0),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"not_proper_encoded\",\n\t\t\tbech32m.InvalidSeparatorIndexError(-1),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"pc1ioiooi\",\n\t\t\tbech32m.NonCharsetCharError(105),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"pc19p72rf\",\n\t\t\tbech32m.InvalidLengthError(0),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"qc1z0hrct7eflrpw4ccrttxzs4qud2axex4dh8zz75\",\n\t\t\tcrypto.InvalidHRPError(\"qc\"),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"pc1p0hrct7eflrpw4ccrttxzs4qud2axex4dg8xaf5\",\n\t\t\tbech32m.InvalidChecksumError{Expected: \"cdzdfr\", Actual: \"g8xaf5\"},\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"pc1p0hrct7eflrpw4ccrttxzs4qud2axexs2dhdk8\",\n\t\t\tcrypto.InvalidLengthError(20),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"pc1y0hrct7eflrpw4ccrttxzs4qud2axex4dksmred\",\n\t\t\tcrypto.InvalidAddressTypeError(4),\n\t\t\tnil,\n\t\t\t0,\n\t\t},\n\t\t{\n\t\t\t\"PC1P0HRCT7EFLRPW4CCRTTXZS4QUD2AXEX4DCDZDFR\", // UPPERCASE\n\t\t\tnil,\n\t\t\t[]byte{\n\t\t\t\t0x01, 0x7d, 0xc7, 0x85, 0xfb, 0x29, 0xf8, 0xc2, 0xea, 0xe3,\n\t\t\t\t0x03, 0x5a, 0xcc, 0x28, 0x54, 0x1c, 0x6a, 0xba, 0x6c, 0x9a, 0xad,\n\t\t\t},\n\t\t\tcrypto.AddressTypeValidator,\n\t\t},\n\t\t{\n\t\t\t\"pc1p0hrct7eflrpw4ccrttxzs4qud2axex4dcdzdfr\",\n\t\t\tnil,\n\t\t\t[]byte{\n\t\t\t\t0x01, 0x7d, 0xc7, 0x85, 0xfb, 0x29, 0xf8, 0xc2, 0xea, 0xe3,\n\t\t\t\t0x03, 0x5a, 0xcc, 0x28, 0x54, 0x1c, 0x6a, 0xba, 0x6c, 0x9a, 0xad,\n\t\t\t},\n\t\t\tcrypto.AddressTypeValidator,\n\t\t},\n\t\t{\n\t\t\t\"pc1zzqkzzu4vyddss052as6c37qrdcfptegquw826x\",\n\t\t\tnil,\n\t\t\t[]byte{\n\t\t\t\t0x02, 0x10, 0x2c, 0x21, 0x72, 0xac, 0x23, 0x5b, 0x08, 0x3e, 0x8a,\n\t\t\t\t0xec, 0x35, 0x88, 0xf8, 0x03, 0x6e, 0x12, 0x15, 0xe5, 0x00,\n\t\t\t},\n\t\t\tcrypto.AddressTypeBLSAccount,\n\t\t},\n\t\t{\n\t\t\t\"pc1rspm7ps49gar9ft5g0tkl6lhxs8ygeakq87quh3\",\n\t\t\tnil,\n\t\t\t[]byte{\n\t\t\t\t0x03, 0x80, 0x77, 0xe0, 0xc2, 0xa5, 0x47, 0x46, 0x54, 0xae,\n\t\t\t\t0x88, 0x7a, 0xed, 0xfd, 0x7e, 0xe6, 0x81, 0xc8, 0x8c, 0xf6, 0xc0,\n\t\t\t},\n\t\t\tcrypto.AddressTypeEd25519Account,\n\t\t},\n\t}\n\tfor no, tt := range tests {\n\t\taddr, err := crypto.AddressFromString(tt.encoded)\n\t\tif tt.err == nil {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.bytes, addr.Bytes(), \"test %v: invalid result\", no)\n\t\t\tassert.Equal(t, strings.ToLower(tt.encoded), addr.String(), \"test %v: invalid encode\", no)\n\t\t\tassert.Equal(t, tt.addrType, addr.Type(), \"test %v: invalid type\", no)\n\t\t} else {\n\t\t\trequire.ErrorIs(t, err, tt.err, \"test %v: invalid error\", no)\n\t\t}\n\t}\n}\n\nfunc TestAddressDecoding(t *testing.T) {\n\ttests := []struct {\n\t\tsize int\n\t\thex  string\n\t\terr  error\n\t}{\n\t\t{\n\t\t\t1,\n\t\t\t\"00\",\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t0,\n\t\t\t\"040000000000000000000000000000000000000000\",\n\t\t\tcrypto.InvalidAddressTypeError(4),\n\t\t},\n\t\t{\n\t\t\t0,\n\t\t\t\"04000102030405060708090a0b0c0d0e0f0001020304\",\n\t\t\tcrypto.InvalidAddressTypeError(4),\n\t\t},\n\t\t{\n\t\t\t21,\n\t\t\t\"0100\",\n\t\t\tio.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\t21,\n\t\t\t\"01000102030405060708090a0b0c0d0e0f000102\",\n\t\t\tio.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\t21,\n\t\t\t\"01000102030405060708090a0b0c0d0e0f00010203\",\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t21,\n\t\t\t\"02000102030405060708090a0b0c0d0e0f00010203\",\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t21,\n\t\t\t\"03000102030405060708090a0b0c0d0e0f00010203\",\n\t\t\tnil,\n\t\t},\n\t}\n\tfor no, tt := range tests {\n\t\tdata, _ := hex.DecodeString(tt.hex)\n\t\tbuf := bytes.NewBuffer(data)\n\t\taddr := new(crypto.Address)\n\n\t\terr := addr.Decode(buf)\n\t\tif tt.err != nil {\n\t\t\trequire.ErrorIs(t, err, tt.err, \"test %v: error not matched\", no)\n\t\t\tassert.Equal(t, tt.size, addr.SerializeSize(), \"test %v invalid size\", no)\n\t\t} else {\n\t\t\trequire.NoError(t, err, \"test %v expected no error\", no)\n\t\t\tassert.Equal(t, tt.size, addr.SerializeSize(), \"test %v invalid size\", no)\n\n\t\t\tlength := addr.SerializeSize()\n\t\t\tfor i := 0; i < length; i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, addr.Encode(w), \"encode test %v failed\", i)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(length)\n\t\t\trequire.NoError(t, addr.Encode(w))\n\t\t\tassert.Equal(t, data, w.Bytes())\n\t\t}\n\t}\n}\n\nfunc TestShortString(t *testing.T) {\n\th, err := crypto.AddressFromString(\"pc1p0hrct7eflrpw4ccrttxzs4qud2axex4dcdzdfr\")\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, \"pc1p0hrc-dzdfr\", h.ShortString())\n\tassert.Equal(t, h.ShortString(), h.LogString())\n}\n"
  },
  {
    "path": "crypto/address_type.go",
    "content": "package crypto\n\ntype AddressType byte\n\nconst (\n\tAddressTypeTreasury       AddressType = 0\n\tAddressTypeValidator      AddressType = 1\n\tAddressTypeBLSAccount     AddressType = 2\n\tAddressTypeEd25519Account AddressType = 3\n)\n\nfunc (t AddressType) String() string {\n\tswitch t {\n\tcase AddressTypeTreasury:\n\t\treturn \"treasury\"\n\tcase AddressTypeBLSAccount:\n\t\treturn \"bls_account\"\n\tcase AddressTypeEd25519Account:\n\t\treturn \"ed25519_account\"\n\tcase AddressTypeValidator:\n\t\treturn \"validator\"\n\n\tdefault:\n\t\treturn \"unknown-address-type\"\n\t}\n}\n"
  },
  {
    "path": "crypto/bls/bls.go",
    "content": "// Package bls implements BLS signatures over the BLS12-381 pairing-friendly curve.\n//\n// This package uses the gnark-crypto BLS12-381 implementation and provides\n// the main primitives used across Pactus: PrivateKey, PublicKey, and\n// Signature. It also exposes helpers for aggregating signatures and public\n// keys when multiple participants are involved.\n//\n// The ciphersuite/domain separation follows `BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_`.\npackage bls\n\nimport (\n\t\"errors\"\n\n\tbls12381 \"github.com/consensys/gnark-crypto/ecc/bls12-381\"\n)\n\n// Ciphersuite for basic mode as defined in:\n// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04#section-4.2.1\nvar (\n\tdst     = []byte(\"BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_\")\n\tgen2Aff bls12381.G2Affine\n\tgen2Jac bls12381.G2Jac\n)\n\nfunc init() {\n\t_, gen2Jac, _, gen2Aff = bls12381.Generators()\n}\n\n// SignatureAggregate aggregates one or more BLS signatures into a single\n// signature. It returns an error if no signatures are provided or if any\n// signature fails to decode to a valid point.\nfunc SignatureAggregate(sigs ...*Signature) (*Signature, error) {\n\tif len(sigs) == 0 {\n\t\treturn nil, errors.New(\"no signatures provided\")\n\t}\n\tgrp1 := new(bls12381.G1Affine)\n\taggPointG1, err := sigs[0].PointG1()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor i := 1; i < len(sigs); i++ {\n\t\tpointG1, err := sigs[i].PointG1()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\taggPointG1 = grp1.Add(aggPointG1, pointG1)\n\t}\n\n\tdata := aggPointG1.Bytes()\n\n\treturn &Signature{\n\t\tdata:    data[:],\n\t\tpointG1: aggPointG1,\n\t}, nil\n}\n\n// PublicKeyAggregate aggregates one or more BLS public keys into a single\n// public key. It returns an error if no public keys are provided or if any\n// public key fails to decode to a valid point.\nfunc PublicKeyAggregate(pubs ...*PublicKey) (*PublicKey, error) {\n\tif len(pubs) == 0 {\n\t\treturn nil, errors.New(\"no public keys provided\")\n\t}\n\tgrp2 := new(bls12381.G2Affine)\n\taggPointG2, err := pubs[0].PointG2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor i := 1; i < len(pubs); i++ {\n\t\tpointG2, err := pubs[i].PointG2()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\taggPointG2 = grp2.Add(aggPointG2, pointG2)\n\t}\n\n\tdata := aggPointG2.Bytes()\n\n\treturn &PublicKey{\n\t\tdata:    data[:],\n\t\tpointG2: aggPointG2,\n\t}, nil\n}\n"
  },
  {
    "path": "crypto/bls/bls_bench_test.go",
    "content": "package bls_test\n\nimport (\n\t\"crypto/rand\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n)\n\nfunc BenchmarkEncode(b *testing.B) {\n\tb.ReportAllocs()\n\n\tbuf := make([]byte, bls.PrivateKeySize)\n\t_, _ = rand.Read(buf)\n\n\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\tpub := prv.PublicKeyNative()\n\n\tfor b.Loop() {\n\t\t_ = pub.Bytes()\n\t}\n}\n\nfunc BenchmarkDecodeSign(b *testing.B) {\n\tb.ReportAllocs()\n\n\tbuf := make([]byte, bls.PrivateKeySize)\n\t_, _ = rand.Read(buf)\n\n\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\tbufMsg := []byte(\"pactus\")\n\tsig := prv.Sign(bufMsg)\n\tsigBytes := sig.Bytes()\n\n\tfor b.Loop() {\n\t\t_, _ = bls.SignatureFromBytes(sigBytes)\n\t}\n}\n\nfunc BenchmarkVerify(b *testing.B) {\n\tb.ReportAllocs()\n\n\tbuf := make([]byte, bls.PrivateKeySize)\n\t_, _ = rand.Read(buf)\n\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\tpub := prv.PublicKeyNative()\n\n\tbufMsg := []byte(\"pactus\")\n\tsig1 := prv.Sign(bufMsg)\n\n\tfor b.Loop() {\n\t\t_ = pub.Verify(bufMsg, sig1)\n\t}\n}\n\nfunc BenchmarkDecode(b *testing.B) {\n\tb.ReportAllocs()\n\n\tbuf := make([]byte, bls.PrivateKeySize)\n\t_, _ = rand.Read(buf)\n\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\tpub := prv.PublicKeyNative()\n\tpubBytes := pub.Bytes()\n\n\tfor b.Loop() {\n\t\t_, _ = bls.PublicKeyFromBytes(pubBytes)\n\t}\n}\n"
  },
  {
    "path": "crypto/bls/bls_test.go",
    "content": "package bls_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\tbls12381 \"github.com/consensys/gnark-crypto/ecc/bls12-381\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSigning(t *testing.T) {\n\tmsg := []byte(\"pactus\")\n\tprv, _ := bls.PrivateKeyFromString(\n\t\t\"SECRET1P9QAUKRJAU7SQ7AT6ZZ6HXHYLMKPQSQYTGDL2VMH5Q5N0P5Q2QW0QL45AY3\")\n\tpub, _ := bls.PublicKeyFromString(\n\t\t\"public1p5dwsgfwmacjpuhaxhy0522j87qc5390v56ndh92f7flxge7vt3zfuxlvuwpnk7tdeed4s4l2r5nj\" +\n\t\t\t\"5zuyjfh0uzjmvrauf4t5xfvff5cpljvpqqpk7pzhv0hxfhf9gt5896vnllsf89ux8kc7anqlu7nxvvxcclw7\")\n\tsig, _ := bls.SignatureFromString(\n\t\t\"8c3ba687e8e4c016293a2c369493faa565065987544a59baba7aadae3f17ada07883552b6c7d1d7eb49f46fbdf0975c4\")\n\taccAddr, _ := crypto.AddressFromString(\"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\")\n\tvalAddr, _ := crypto.AddressFromString(\"pc1p0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpf5uf6u5\")\n\n\tsig1 := prv.Sign(msg)\n\tassert.Equal(t, sig.Bytes(), sig1.Bytes())\n\trequire.NoError(t, pub.Verify(msg, sig))\n\tassert.Equal(t, pub, prv.PublicKey())\n\tassert.Equal(t, valAddr, pub.ValidatorAddress())\n\tassert.Equal(t, accAddr, pub.AccountAddress())\n}\n\nfunc TestSignatureAggregate(t *testing.T) {\n\tmsg := []byte(\"pactus\")\n\tprv1, _ := bls.PrivateKeyFromString(\n\t\t\"SECRET1P9QAUKRJAU7SQ7AT6ZZ6HXHYLMKPQSQYTGDL2VMH5Q5N0P5Q2QW0QL45AY3\")\n\tprv2, _ := bls.PrivateKeyFromString(\n\t\t\"SECRET1PVJHEKQ3F4NX5CA9L69CSLLNWMYWPAXDQ64ZLEQHFSV4JLFGXMXWQPDPHR0\")\n\n\tsig1 := prv1.SignNative(msg)\n\tsig2 := prv2.SignNative(msg)\n\tagg, _ := bls.SignatureAggregate(sig1, sig2)\n\taggExpected, _ := bls.SignatureFromString(\n\t\t\"a74f05102c6217d06527cfcd1854ba6c38f4047f75a74958ad01fe66a5120c77c5416bfd875669588566670dc61f1168\")\n\n\tassert.True(t, agg.EqualsTo(aggExpected))\n}\n\nfunc TestAggregateFailed(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, prv1 := ts.RandBLSKeyPair()\n\tpub2, prv2 := ts.RandBLSKeyPair()\n\tpub3, prv3 := ts.RandBLSKeyPair()\n\tpub4, prv4 := ts.RandBLSKeyPair()\n\tmsg1 := ts.RandBytes(14)\n\tmsg2 := ts.RandBytes(16)\n\n\tsig1 := prv1.Sign(msg1).(*bls.Signature)\n\tsig11 := prv1.Sign(msg2).(*bls.Signature)\n\tsig2 := prv2.Sign(msg1).(*bls.Signature)\n\tsig3 := prv3.Sign(msg1).(*bls.Signature)\n\tsig4 := prv4.Sign(msg1).(*bls.Signature)\n\n\tagg1, _ := bls.SignatureAggregate(sig1, sig2, sig3)\n\tagg2, _ := bls.SignatureAggregate(sig1, sig2, sig4)\n\tagg3, _ := bls.SignatureAggregate(sig11, sig2, sig3)\n\tagg4, _ := bls.SignatureAggregate(sig1, sig2)\n\tagg5, _ := bls.SignatureAggregate(sig3, sig2, sig1)\n\n\tpubs1 := []*bls.PublicKey{pub1, pub2, pub3}\n\tpubs2 := []*bls.PublicKey{pub1, pub2, pub4}\n\tpubs3 := []*bls.PublicKey{pub1, pub2}\n\tpubs4 := []*bls.PublicKey{pub3, pub2, pub1}\n\n\tpubAgg1, _ := bls.PublicKeyAggregate(pubs1...)\n\tpubAgg2, _ := bls.PublicKeyAggregate(pubs2...)\n\tpubAgg3, _ := bls.PublicKeyAggregate(pubs3...)\n\tpubAgg4, _ := bls.PublicKeyAggregate(pubs4...)\n\n\trequire.NoError(t, pub1.Verify(msg1, sig1))\n\trequire.NoError(t, pub2.Verify(msg1, sig2))\n\trequire.NoError(t, pub3.Verify(msg1, sig3))\n\trequire.Error(t, pub2.Verify(msg1, sig1))\n\trequire.Error(t, pub3.Verify(msg1, sig1))\n\trequire.Error(t, pub1.Verify(msg1, agg1))\n\trequire.Error(t, pub2.Verify(msg1, agg1))\n\trequire.Error(t, pub3.Verify(msg1, agg1))\n\n\trequire.NoError(t, pubAgg1.Verify(msg1, agg1))\n\trequire.Error(t, pubAgg1.Verify(msg2, agg1))\n\trequire.Error(t, pubAgg1.Verify(msg1, agg2))\n\trequire.Error(t, pubAgg2.Verify(msg1, agg1))\n\trequire.NoError(t, pubAgg2.Verify(msg1, agg2))\n\trequire.Error(t, pubAgg2.Verify(msg2, agg2))\n\trequire.Error(t, pubAgg1.Verify(msg1, agg3))\n\trequire.Error(t, pubAgg1.Verify(msg2, agg3))\n\trequire.Error(t, pubAgg1.Verify(msg1, agg4))\n\trequire.Error(t, pubAgg3.Verify(msg1, agg1))\n\trequire.NoError(t, pubAgg1.Verify(msg1, agg5))\n\trequire.NoError(t, pubAgg4.Verify(msg1, agg1))\n}\n\nfunc TestAggregateOnlyOneSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv1 := ts.RandBLSKeyPair()\n\tmsg1 := []byte(\"pactus\")\n\tsig1 := prv1.Sign(msg1).(*bls.Signature)\n\tagg1, _ := bls.SignatureAggregate(sig1)\n\n\tassert.True(t, agg1.EqualsTo(sig1))\n}\n\nfunc TestAggregateOnlyOnePublicKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tagg1, _ := bls.PublicKeyAggregate(pub1)\n\n\tassert.True(t, agg1.EqualsTo(pub1))\n}\n\n// TODO: should we check for duplication here?\nfunc TestDuplicatedAggregate(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, prv1 := ts.RandBLSKeyPair()\n\tpub2, prv2 := ts.RandBLSKeyPair()\n\n\tmsg1 := []byte(\"pactus\")\n\n\tsig1 := prv1.Sign(msg1).(*bls.Signature)\n\tsig2 := prv2.Sign(msg1).(*bls.Signature)\n\n\tagg1, _ := bls.SignatureAggregate(sig1, sig2, sig1)\n\tagg2, _ := bls.SignatureAggregate(sig1, sig2)\n\tassert.False(t, agg1.EqualsTo(agg2))\n\n\tpubs1 := []*bls.PublicKey{pub1, pub2}\n\tpubs2 := []*bls.PublicKey{pub1, pub2, pub1}\n\tpubAgg1, _ := bls.PublicKeyAggregate(pubs1...)\n\tpubAgg2, _ := bls.PublicKeyAggregate(pubs2...)\n\tassert.False(t, pubAgg1.EqualsTo(pubAgg2))\n}\n\n// TestHashToCurve ensures that the hash-to-curve function in kilic/bls12-381\n// works as intended and is compatible with the spec.\n// test vectors can be found here:\n// https://datatracker.ietf.org/doc/html/rfc9380\nfunc TestHashToCurve(t *testing.T) {\n\tdomain := []byte(\"QUUX-V01-CS02-with-BLS12381G1_XMD:SHA-256_SSWU_RO_\")\n\ttests := []struct {\n\t\tmsg      string\n\t\texpected string\n\t}{\n\t\t{\n\t\t\t\"\",\n\t\t\t\"052926add2207b76ca4fa57a8734416c8dc95e24501772c814278700eed6d1e4e8cf62d9c09db0fac349612b759e79a1\" +\n\t\t\t\t\"08ba738453bfed09cb546dbb0783dbb3a5f1f566ed67bb6be0e8c67e2e81a4cc68ee29813bb7994998f3eae0c9c6a265\",\n\t\t},\n\t\t{\n\t\t\t\"abc\",\n\t\t\t\"03567bc5ef9c690c2ab2ecdf6a96ef1c139cc0b2f284dca0a9a7943388a49a3aee664ba5379a7655d3c68900be2f6903\" +\n\t\t\t\t\"0b9c15f3fe6e5cf4211f346271d7b01c8f3b28be689c8429c85b67af215533311f0b8dfaaa154fa6b88176c229f2885d\",\n\t\t},\n\t\t{\n\t\t\t\"abcdef0123456789\",\n\t\t\t\"11e0b079dea29a68f0383ee94fed1b940995272407e3bb916bbf268c263ddd57a6a27200a784cbc248e84f357ce82d98\" +\n\t\t\t\t\"03a87ae2caf14e8ee52e51fa2ed8eefe80f02457004ba4d486d6aa1f517c0889501dc7413753f9599b099ebcbbd2d709\",\n\t\t},\n\t\t{\n\t\t\t\"q128_qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\" +\n\t\t\t\t\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\",\n\t\t\t\"15f68eaa693b95ccb85215dc65fa81038d69629f70aeee0d0f677cf22285e7bf58d7cb86eefe8f2e9bc3f8cb84fac488\" +\n\t\t\t\t\"1807a1d50c29f430b8cafc4f8638dfeeadf51211e1602a5f184443076715f91bb90a48ba1e370edce6ae1062f5e6dd38\",\n\t\t},\n\t\t{\n\t\t\t\"a512_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" +\n\t\t\t\t\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" +\n\t\t\t\t\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" +\n\t\t\t\t\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" +\n\t\t\t\t\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" +\n\t\t\t\t\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n\t\t\t\"082aabae8b7dedb0e78aeb619ad3bfd9277a2f77ba7fad20ef6aabdc6c31d19ba5a6d12283553294c1825c4b3ca2dcfe\" +\n\t\t\t\t\"05b84ae5a942248eea39e1d91030458c40153f3b654ab7872d779ad1e942856a20c438e8d99bc8abfbf74729ce1f7ac8\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tmappedPoint, _ := bls12381.HashToG1([]byte(tt.msg), domain)\n\t\td, _ := hex.DecodeString(tt.expected)\n\n\t\texpectedPoint := bls12381.G1Affine{}\n\t\terr := expectedPoint.Unmarshal(d)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, expectedPoint, mappedPoint,\n\t\t\t\"test %v: not match\", no)\n\t}\n}\n\n// TestSignatureAggregateErrorHandling tests error scenarios for SignatureAggregate.\nfunc TestSignatureAggregateErrorHandling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"EmptyInput\", func(t *testing.T) {\n\t\taggSig, err := bls.SignatureAggregate()\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggSig)\n\t\tassert.Contains(t, err.Error(), \"no signatures provided\")\n\t})\n\n\tt.Run(\"InvalidSignature\", func(t *testing.T) {\n\t\t// Point at infinity\n\t\tinvalidSig, err := bls.SignatureFromString(\n\t\t\t\"C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\t\trequire.NoError(t, err)\n\n\t\taggSig, err := bls.SignatureAggregate(invalidSig)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggSig)\n\t})\n\n\tt.Run(\"MixedValidAndInvalid\", func(t *testing.T) {\n\t\tvalidSig := ts.RandBLSSignature()\n\n\t\tinvalidSig, err := bls.SignatureFromString(\n\t\t\t\"C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\t\trequire.NoError(t, err)\n\n\t\taggSig, err := bls.SignatureAggregate(validSig, invalidSig)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggSig)\n\t})\n}\n\n// TestPublicKeyAggregateErrorHandling tests error scenarios for PublicKeyAggregate.\nfunc TestPublicKeyAggregateErrorHandling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"EmptyInput\", func(t *testing.T) {\n\t\taggPub, err := bls.PublicKeyAggregate()\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggPub)\n\t\tassert.Contains(t, err.Error(), \"no public keys provided\")\n\t})\n\n\tt.Run(\"InvalidPublicKeyData\", func(t *testing.T) {\n\t\t// Point at infinity\n\t\tinvalidPub, err := bls.PublicKeyFromString(\n\t\t\t\"public1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\" +\n\t\t\t\t\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqglnhh9\")\n\t\trequire.NoError(t, err)\n\n\t\taggPub, err := bls.PublicKeyAggregate(invalidPub)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggPub)\n\t})\n\n\tt.Run(\"MixedValidAndInvalid\", func(t *testing.T) {\n\t\tvalidPub, _ := ts.RandBLSKeyPair()\n\n\t\tinvalidPub, err := bls.PublicKeyFromString(\n\t\t\t\"public1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\" +\n\t\t\t\t\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqglnhh9\")\n\t\trequire.NoError(t, err)\n\n\t\taggPub, err := bls.PublicKeyAggregate(validPub, invalidPub)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, aggPub)\n\t})\n}\n"
  },
  {
    "path": "crypto/bls/errors.go",
    "content": "package bls\n"
  },
  {
    "path": "crypto/bls/hdkeychain/errors.go",
    "content": "package hdkeychain\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// ErrDeriveHardFromPublic describes an error in which the caller\n\t// attempted to derive a hardened extended key from a public key.\n\tErrDeriveHardFromPublic = errors.New(\"cannot derive a hardened key \" +\n\t\t\"from a public key\")\n\n\t// ErrNotPrivExtKey describes an error in which the caller attempted\n\t// to extract a private key from a public extended key.\n\tErrNotPrivExtKey = errors.New(\"unable to create private keys from a \" +\n\t\t\"public extended key\")\n\n\t// ErrUnusableSeed describes an error in which the provided seed is not\n\t// usable due to the derived key falling outside of the valid range for\n\t// BLS private keys.  This error indicates the caller must choose\n\t// another seed.\n\tErrUnusableSeed = errors.New(\"unusable seed\")\n\n\t// ErrInvalidSeedLen describes an error in which the provided seed or\n\t// seed length is not in the allowed range.\n\tErrInvalidSeedLen = fmt.Errorf(\"seed length must be between %d and %d \"+\n\t\t\"bits\", MinSeedBytes*8, MaxSeedBytes*8)\n\n\t// ErrInvalidKeyData describes an error in which the provided key is\n\t// not valid.\n\tErrInvalidKeyData = errors.New(\"key data is invalid\")\n\n\t// ErrInvalidHRP describes an error in which the HRP is not valid.\n\tErrInvalidHRP = errors.New(\"HRP is invalid\")\n)\n"
  },
  {
    "path": "crypto/bls/hdkeychain/extendedkey.go",
    "content": "package hdkeychain\n\n// References:\n//  PIP-11: Deterministic key hierarchy for BLS12-381 curve\n//  https://pips.pactus.org/PIPs/pip-11\n\nimport (\n\t\"bytes\"\n\t\"crypto/hmac\"\n\t\"crypto/rand\"\n\t\"crypto/sha512\"\n\t\"encoding/binary\"\n\t\"math/big\"\n\t\"strings\"\n\n\tbls12381 \"github.com/kilic/bls12-381\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nconst (\n\t// hardenedKeyStart is the index at which a hardened key starts.  Each\n\t// extended key has 2^31 normal child keys and 2^31 hardened child keys.\n\t// Thus the range for normal child keys is [0, 2^31 - 1] and the range\n\t// for hardened child keys is [2^31, 2^32 - 1].\n\thardenedKeyStart = uint32(0x80000000) // 2^31\n\n\t// MinSeedBytes is the minimum number of bytes allowed for a seed to\n\t// a master node.\n\tMinSeedBytes = 16 // 128 bits\n\n\t// MaxSeedBytes is the maximum number of bytes allowed for a seed to\n\t// a master node.\n\tMaxSeedBytes = 64 // 512 bits\n)\n\n// ExtendedKey houses all the information needed to support a hierarchical\n// deterministic extended key.\ntype ExtendedKey struct {\n\tkey       []byte // This will be the bytes of extended public or private key\n\tchainCode []byte\n\tpath      []uint32\n\tisPrivate bool\n\tpubOnG1   bool\n}\n\n// newExtendedKey returns a new instance of an extended key with the given\n// fields. No error checking is performed here as it's only intended to be a\n// convenience method used to create a populated struct.\nfunc newExtendedKey(key, chainCode []byte, path []uint32, isPrivate, pubOnG1 bool) *ExtendedKey {\n\treturn &ExtendedKey{\n\t\tkey:       key,\n\t\tchainCode: chainCode,\n\t\tpath:      path,\n\t\tisPrivate: isPrivate,\n\t\tpubOnG1:   pubOnG1,\n\t}\n}\n\n// pubKeyBytes returns bytes for the serialized public key associated with this\n// extended key.\n//\n// When the extended key is already a public key, the key is simply returned as\n// is since it's already in the correct form.  However, when the extended key is\n// a private key, the public key will be calculated.\nfunc (k *ExtendedKey) pubKeyBytes() []byte {\n\t// Just return the key if it's already an extended public key.\n\tif !k.isPrivate {\n\t\treturn k.key\n\t}\n\tgrp1 := bls12381.NewG1()\n\n\tprivKey := bls12381.NewFr()\n\tprivKey.FromBytes(k.key)\n\tif k.pubOnG1 {\n\t\tpub := new(bls12381.PointG1)\n\t\tgrp1.MulScalar(pub, grp1.One(), privKey)\n\n\t\treturn grp1.ToCompressed(pub)\n\t}\n\n\tgrp2 := bls12381.NewG2()\n\n\tpub := new(bls12381.PointG2)\n\tgrp2.MulScalar(pub, grp2.One(), privKey)\n\n\treturn grp2.ToCompressed(pub)\n}\n\n// IsPrivate returns whether or not the extended key is a private extended key.\n//\n// A private extended key can be used to derive both hardened and non-hardened\n// child private and public extended keys. A public extended key can only be\n// used to derive non-hardened child public extended keys.\nfunc (k *ExtendedKey) IsPrivate() bool {\n\treturn k.isPrivate\n}\n\n// DerivePath returns a derived child extended key from this master key at the\n// given path.\nfunc (k *ExtendedKey) DerivePath(path []uint32) (*ExtendedKey, error) {\n\text := k\n\tvar err error\n\tfor _, index := range path {\n\t\text, err = ext.Derive(index)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn ext, nil\n}\n\n// Derive returns a derived child extended key at the given index.\n//\n// When this extended key is a private extended key (as determined by the IsPrivate\n// function), a private extended key will be derived. Otherwise, the derived\n// extended key will be a public extended key.\n//\n// When the index is greater to or equal than the hardenedKeyStart constant, the\n// derived extended key will be a hardened extended key.  It is only possible to\n// derive a hardened extended key from a private extended key. Consequently,\n// this function will return ErrDeriveHardFromPublic if a hardened child\n// extended key is requested from a public extended key.\n//\n// A hardened extended key is useful since, as previously mentioned, it requires\n// a parent private extended key to derive. In other words, normal child\n// extended public keys can be derived from a parent public extended key (no\n// knowledge of the parent private key) whereas hardened extended keys may not\n// be.\n//\n//nolint:nestif // complexity can't be reduced more.\nfunc (k *ExtendedKey) Derive(index uint32) (*ExtendedKey, error) {\n\t// There are four scenarios that could happen here:\n\t// 1) Private extended key -> Hardened child private extended key\n\t// 2) Private extended key -> Non-hardened child private extended key\n\t// 3) Public extended key -> Non-hardened child public extended key\n\t// 4) Public extended key -> Hardened child public extended key (INVALID!)\n\n\tisChildHardened := index >= hardenedKeyStart\n\n\t// The data used to derive the child key depends on whether or not the\n\t// child is hardened.\n\t//\n\t// For hardened children:\n\t//   G1: 0x01 || ser256(parentKey) || ser32(i)\n\t//   G2: 0x00 || ser256(parentKey) || ser32(i)\n\t//\n\t// For normal children:\n\t//   G1: serG1(parentPubKey) || ser32(i)\n\t//   G2: serG2(parentPubKey) || ser32(i)\n\t//\n\tdata := make([]byte, 0, 100)\n\tif isChildHardened {\n\t\t// Case #1 and #4.\n\t\tif !k.isPrivate {\n\t\t\t// Case #4\n\t\t\t//\n\t\t\t// A hardened child extended key may not be created from a public\n\t\t\t// extended key.\n\t\t\treturn nil, ErrDeriveHardFromPublic\n\t\t}\n\n\t\t// Case #1\n\t\t//\n\t\t// When the child is a hardened child, the key is known to be a\n\t\t// private key.\n\t\t// Pad it with a leading zero as required by [BIP32] for deriving the child.\n\t\tif len(k.key) != 32 {\n\t\t\treturn nil, ErrInvalidKeyData\n\t\t}\n\t\tif k.pubOnG1 {\n\t\t\tdata = append(data, 0x01)\n\t\t} else {\n\t\t\tdata = append(data, 0x00)\n\t\t}\n\t\tdata = append(data, k.key...)\n\t} else {\n\t\t// Case #2 or #3.\n\t\t//\n\t\t// This is either a public or private extended key, but in\n\t\t// either case, the data which is used to derive the child key\n\t\t// starts with the BLS public key bytes.\n\t\tdata = append(data, k.pubKeyBytes()...)\n\t\tif k.pubOnG1 && len(data) != 48 {\n\t\t\treturn nil, ErrInvalidKeyData\n\t\t}\n\t\tif !k.pubOnG1 && len(data) != 96 {\n\t\t\treturn nil, ErrInvalidKeyData\n\t\t}\n\t}\n\tindexData := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(indexData, index)\n\tdata = append(data, indexData...)\n\n\t// The order is same for all three groups (g1, g2, and gt).\n\tgt := bls12381.NewGT()\n\torder := gt.Q()\n\n\tvar childChainCode, il []byte\n\n\tfor {\n\t\t// Take the HMAC-SHA512 of the current key's chain code and the derived\n\t\t// data:\n\t\t//   I = HMAC-SHA512(Key = chainCode, Data = data)\n\t\thmac512 := hmac.New(sha512.New, k.chainCode)\n\t\t_, _ = hmac512.Write(data)\n\t\tilr := hmac512.Sum(nil)\n\n\t\t// Split \"I\" into two 32-byte sequences Il and Ir where:\n\t\t//   Il = intermediate key used to derive the child\n\t\t//   Ir = child chain code\n\t\til = ilr[:len(ilr)/2]\n\t\tchildChainCode = ilr[len(ilr)/2:]\n\n\t\t// If Il greater or equal to the order of the group, or it is zero,\n\t\t// generate a new \"I\" with data equals to 0x01 || Ir || ser32(i)\n\t\tilNum := big.Int{}\n\t\tilNum.SetBytes(il)\n\t\tif ilNum.Cmp(order) == -1 && ilNum.Cmp(big.NewInt(0)) != 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tdata = make([]byte, 0, 1+len(childChainCode)+len(indexData))\n\t\tdata = append(data, 0x01)\n\t\tdata = append(data, childChainCode...)\n\t\tdata = append(data, indexData...)\n\t}\n\n\tilFr := new(bls12381.Fr)\n\tilFr.FromBytes(il)\n\n\tvar childKey []byte\n\tif k.isPrivate {\n\t\t// Case #1 or #2.\n\t\t// Add the parent private key to the intermediate private key to\n\t\t// derive the final child key.\n\t\t//\n\t\t// childKey = parse256(Il) + parentKey\n\n\t\tkeyNum := new(bls12381.Fr)\n\t\tkeyNum.FromBytes(k.key)\n\n\t\tchildKeyNum := bls12381.NewFr()\n\t\tchildKeyNum.Add(keyNum, ilFr)\n\n\t\tchildKey = childKeyNum.ToBytes()\n\t} else {\n\t\t// Case #3.\n\t\t// Calculate the corresponding intermediate public key for the\n\t\t// intermediate private key.\n\t\t//\n\t\tif k.pubOnG1 {\n\t\t\t// Public key is in G1 subgroup\n\t\t\t//\n\t\t\t// childKey = pointG1(parse256(Il)) + parentKey\n\t\t\tgrp1 := bls12381.NewG1()\n\n\t\t\tilPoint := new(bls12381.PointG1)\n\t\t\tgrp1.MulScalar(ilPoint, grp1.One(), ilFr)\n\n\t\t\tpubKey, err := grp1.FromCompressed(k.key)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tchildPubKey := new(bls12381.PointG1)\n\t\t\tgrp1.Add(childPubKey, pubKey, ilPoint)\n\n\t\t\tchildKey = grp1.ToCompressed(childPubKey)\n\t\t} else {\n\t\t\t// Public key is in G2 subgroup\n\t\t\t//\n\t\t\t// childKey = pointG2(parse256(Il)) + parentKey\n\t\t\tgrp2 := bls12381.NewG2()\n\n\t\t\tilPoint := new(bls12381.PointG2)\n\t\t\tgrp2.MulScalar(ilPoint, grp2.One(), ilFr)\n\n\t\t\tpubKey, err := grp2.FromCompressed(k.key)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tchildPubKey := new(bls12381.PointG2)\n\t\t\tgrp2.Add(childPubKey, pubKey, ilPoint)\n\n\t\t\tchildKey = grp2.ToCompressed(childPubKey)\n\t\t}\n\t}\n\n\tnewPath := make([]uint32, 0, len(k.path)+1)\n\tnewPath = append(newPath, k.path...)\n\tnewPath = append(newPath, index)\n\n\treturn newExtendedKey(childKey, childChainCode,\n\t\tnewPath, k.isPrivate, k.pubOnG1), nil\n}\n\n// Path returns the path of derived key.\n//\n// Path with values between 0 and 2^31-1 are normal child keys,\n// and those values between 2^31 and 2^32-1 are hardened keys.\nfunc (k *ExtendedKey) Path() []uint32 {\n\treturn k.path\n}\n\n// RawPrivateKey returns the raw bytes of the private key.\n// As you might imagine this is only possible if the extended key is a private\n// extended key (as determined by the IsPrivate function).  The ErrNotPrivExtKey\n// error will be returned if this function is called on a public extended key.\nfunc (k *ExtendedKey) RawPrivateKey() ([]byte, error) {\n\tif !k.isPrivate {\n\t\treturn nil, ErrNotPrivExtKey\n\t}\n\n\treturn k.key, nil\n}\n\n// RawPublicKey returns the raw bytes of the public key.\nfunc (k *ExtendedKey) RawPublicKey() []byte {\n\treturn k.pubKeyBytes()\n}\n\n// Neuter returns a new extended public key from this extended private key.  The\n// same extended key will be returned unaltered if it is already an extended\n// public key.\n//\n// As the name implies, an extended public key does not have access to the\n// private key, so it is not capable of signing transactions or deriving\n// child extended private keys.  However, it is capable of deriving further\n// child extended public keys.\nfunc (k *ExtendedKey) Neuter() *ExtendedKey {\n\t// Already an extended public key.\n\tif !k.isPrivate {\n\t\treturn k\n\t}\n\n\t// Convert it to an extended public key.  The key for the new extended\n\t// key will simply be the pubkey of the current extended private key.\n\t//\n\t// This is the function N((k,c)) -> (K, c) from [BIP32].\n\treturn newExtendedKey(k.pubKeyBytes(), k.chainCode,\n\t\tk.path, false, k.pubOnG1)\n}\n\n// String returns the extended key as a bech32-encoded string.\nfunc (k *ExtendedKey) String() string {\n\t//\n\t// The serialized format is structured as follows:\n\t// +-------+---------+------------+-------+------------+----------+\n\t// | Depth | Path    | Chain code | G1/G2 | Key length | Key data |\n\t// +-------+---------+------------+-------+------------+----------+\n\t// | 1     | depth*4 | 32         | 1     | 1          | 32/48/96 |\n\t// +-------+---------+------------+-------+------------+----------+\n\t//\n\t// Description:\n\t// - Depth: 1 byte representing the depth of derivation path.\n\t// - Path: serialized BIP-32 path; each entry is encoded as 32-bit unsigned integer, least significant byte first\n\t// - Chain code: 32 bytes chain code\n\t// - G1 or G2: 1 byte to specify the group.\n\t// - Key length: 1 byte representing the length of the key data.\n\t// - Key data: Can be 32, 48, or 96 bytes.\n\t//\n\n\tbuf := bytes.NewBuffer(make([]byte, 0))\n\terr := encoding.WriteElement(buf, byte(len(k.path)))\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\tfor _, p := range k.path {\n\t\terr := encoding.WriteElement(buf, p)\n\t\tif err != nil {\n\t\t\treturn err.Error()\n\t\t}\n\t}\n\terr = encoding.WriteVarBytes(buf, k.chainCode)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\terr = encoding.WriteElement(buf, k.pubOnG1)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\terr = encoding.WriteVarBytes(buf, k.key)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\thrp := crypto.XPublicKeyHRP\n\tif k.isPrivate {\n\t\thrp = crypto.XPrivateKeyHRP\n\t}\n\n\tstr, err := bech32m.EncodeFromBase256WithType(hrp, crypto.SignatureTypeBLS, buf.Bytes())\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\tif k.isPrivate {\n\t\tstr = strings.ToUpper(str)\n\t}\n\n\treturn str\n}\n\n// NewKeyFromString returns a new extended key instance from a bech32-encoded string.\nfunc NewKeyFromString(str string) (*ExtendedKey, error) {\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(strings.ToLower(str))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif typ != crypto.SignatureTypeBLS {\n\t\treturn nil, ErrInvalidKeyData\n\t}\n\n\treader := bytes.NewReader(data)\n\tdepth := uint8(0)\n\terr = encoding.ReadElement(reader, &depth)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpath := make([]uint32, depth)\n\tfor i := byte(0); i < depth; i++ {\n\t\terr := encoding.ReadElement(reader, &path[i])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tchainCode, err := encoding.ReadVarBytes(reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar pubOnG1 bool\n\terr = encoding.ReadElement(reader, &pubOnG1)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tkey, err := encoding.ReadVarBytes(reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar isPrivate bool\n\tswitch hrp {\n\tcase crypto.XPrivateKeyHRP:\n\t\tisPrivate = true\n\n\tcase crypto.XPublicKeyHRP:\n\t\tisPrivate = false\n\n\tdefault:\n\t\treturn nil, ErrInvalidHRP\n\t}\n\n\treturn newExtendedKey(key, chainCode, path, isPrivate, pubOnG1), nil\n}\n\n// NewMaster creates a new master node for use in creating a hierarchical\n// deterministic key chain.  The seed must be between 128 and 512 bits and\n// should be generated by a cryptographically secure random generation source.\nfunc NewMaster(seed []byte, pubOnG1 bool) (*ExtendedKey, error) {\n\t// Per [BIP32], the seed must be in range [MinSeedBytes, MaxSeedBytes].\n\tif len(seed) < MinSeedBytes || len(seed) > MaxSeedBytes {\n\t\treturn nil, ErrInvalidSeedLen\n\t}\n\n\t// masterKey is the master key used along with a random seed used to generate\n\t// the master node in the hierarchical tree.\n\tmasterKey := []byte(\"BLS12381 seed\")\n\n\t// First take the HMAC-SHA512 of the master key and the seed data:\n\t//   I = HMAC-SHA512(Key = \"BLS12381-HD seed\", Data = S)\n\thmac512 := hmac.New(sha512.New, masterKey)\n\t_, _ = hmac512.Write(seed)\n\tilr := hmac512.Sum(nil)\n\n\t// Split \"I\" into two 32-byte sequences Il and Ir where:\n\t//   Il = master IKM\n\t//   Ir = master chain code\n\tikm := ilr[:len(ilr)/2]\n\tchainCode := ilr[len(ilr)/2:]\n\n\t// Using BLS KeyGen to generate the master private key from the IKM.\n\tprivKey, err := bls.KeyGen(ikm, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn newExtendedKey(privKey.Bytes(), chainCode, []uint32{}, true, pubOnG1), nil\n}\n\n// GenerateSeed returns a cryptographically secure random seed that can be used\n// as the input for the NewMaster function to generate a new master node.\n//\n// The length is in bytes and it must be between 16 and 64 (128 to 512 bits).\n// The recommended length is 32 (256 bits) as defined by the RecommendedSeedLen\n// constant.\nfunc GenerateSeed(length uint8) ([]byte, error) {\n\t// Per [BIP32], the seed must be in range [MinSeedBytes, MaxSeedBytes].\n\tif length < MinSeedBytes || length > MaxSeedBytes {\n\t\treturn nil, ErrInvalidSeedLen\n\t}\n\n\tbuf := make([]byte, length)\n\t_, err := rand.Read(buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf, nil\n}\n"
  },
  {
    "path": "crypto/bls/hdkeychain/extendedkey_test.go",
    "content": "package hdkeychain\n\nimport (\n\t\"encoding/hex\"\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n// TestNonHardenedDerivation tests derive private key and public key in\n// non hardened mode.\nfunc TestNonHardenedDerivation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttestSeed := ts.RandBytes(32)\n\tpath := []uint32{\n\t\tts.RandUint32Max(hardenedKeyStart),\n\t\tts.RandUint32Max(hardenedKeyStart),\n\t\tts.RandUint32Max(hardenedKeyStart),\n\t\tts.RandUint32Max(hardenedKeyStart),\n\t}\n\n\tcheckPublicKeyDerivation := func(masterKey *ExtendedKey, path []uint32) {\n\t\tneuterKey := masterKey.Neuter()\n\n\t\textKey1, _ := masterKey.DerivePath(path)\n\t\textKey2, _ := neuterKey.DerivePath(path)\n\t\tpubKey1 := extKey1.RawPublicKey()\n\t\tpubKey2 := extKey2.RawPublicKey()\n\n\t\trequire.Equal(t, path, extKey1.Path())\n\t\trequire.Equal(t, pubKey1, pubKey2)\n\t}\n\n\tmasterKeyG1, _ := NewMaster(testSeed, true)\n\tmasterKeyG2, _ := NewMaster(testSeed, false)\n\n\tcheckPublicKeyDerivation(masterKeyG1, path)\n\tcheckPublicKeyDerivation(masterKeyG2, path)\n}\n\n// TestHardenedDerivation tests derive private key and public key in\n// hardened mode.\nfunc TestHardenedDerivation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttestSeed := ts.RandBytes(32)\n\tpath := []uint32{\n\t\tts.RandUint32Max(hardenedKeyStart) + hardenedKeyStart,\n\t\tts.RandUint32Max(hardenedKeyStart) + hardenedKeyStart,\n\t\tts.RandUint32Max(hardenedKeyStart) + hardenedKeyStart,\n\t\tts.RandUint32Max(hardenedKeyStart) + hardenedKeyStart,\n\t}\n\n\tmasterKey, _ := NewMaster(testSeed, false)\n\textKey, _ := masterKey.DerivePath(path)\n\tprivKey, _ := extKey.RawPrivateKey()\n\tblsPrivKey, _ := bls.PrivateKeyFromBytes(privKey)\n\tpubKey := extKey.RawPublicKey()\n\n\tassert.Equal(t, path, extKey.Path())\n\tassert.Equal(t, pubKey, blsPrivKey.PublicKey().Bytes())\n}\n\n// TestDerivation tests derive private keys in hardened and non hardened modes.\nfunc TestDerivation(t *testing.T) {\n\ttestSeed, _ := hex.DecodeString(\"000102030405060708090a0b0c0d0e0f\")\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tname       string\n\t\tpath       []uint32\n\t\twantPrivG1 string\n\t\twantPrivG2 string\n\t\twantPubG1  string\n\t\twantPubG2  string\n\t}{\n\t\t{\n\t\t\tname:       \"derivation path: m\",\n\t\t\tpath:       []uint32{},\n\t\t\twantPrivG1: \"4f55e31ee1c4f58af0840fd3f5e635fd6c07eacd14283c45d7d43729003abb84\",\n\t\t\twantPrivG2: \"4f55e31ee1c4f58af0840fd3f5e635fd6c07eacd14283c45d7d43729003abb84\",\n\t\t\twantPubG1:  \"8fbed8842588b629377c0a0d0d9547a9ee17527d5fd6d2c609034a8c3c074dda031e0dfe886b454499bfe0f40a7c4b18\",\n\t\t\twantPubG2: \"b1bad3bf4a4ae87c89dec2c32512603ca08e2db62cfd2254c96bfe75068f5a98e7c4cd7d37cf0496dd6e79703e7c88e5\" +\n\t\t\t\t\"046bdec9c896ef2ad030096bbcf73c6cff17add3da9530f22491901fdf7fd2076c0f08ea35a4fdaa00e7ac6d0a5442e3\",\n\t\t},\n\t\t{\n\t\t\tname:       \"derivation path: m/0H\",\n\t\t\tpath:       []uint32{h},\n\t\t\twantPrivG1: \"5f5d7bfae7eabf2cc3faebc12449e1c7116c2777d7e384ead79df299667b8d9a\",\n\t\t\twantPrivG2: \"5695ba5087a27f8c0d7270455104658b2367b8e90ab6f7f57ac7ce22d4a6836c\",\n\t\t\twantPubG1:  \"b2826a89a22fec3349d64f4379a1eb5632b0b345b985b738324a5b8db640307421201efe36ae6c8c639d32d4124496ae\",\n\t\t\twantPubG2: \"b37da3080662ceeb7f07289801a56e5c555d413434ad096079c084caa162c8d224891f68816921f5bd1453af7d085bc4\" +\n\t\t\t\t\"00341d61ce496ffb11cd10f8e90522447fada1a5f646c45797e00460925876f0b63f4023bf27e828688f7b4dd833e641\",\n\t\t},\n\t\t{\n\t\t\tname:       \"derivation path: m/0H/1\",\n\t\t\tpath:       []uint32{h, 1},\n\t\t\twantPrivG1: \"3bea739c9a2695ba4af566bc3f28e5c62da8e721b977709f9d492f7129b83521\",\n\t\t\twantPrivG2: \"555422bcbffd1d55eea6f87a924ba5d046bb60e2bffe2182daf78bab6a6e179f\",\n\t\t\twantPubG1:  \"af5980f4172797c07174a4040eb0b1859b357b05f0a29ac65c35d957730fd722ffd520d861e8fbe3126d26ceb08dbe52\",\n\t\t\twantPubG2: \"b5f783bb1f1173feebb083f146c5a83470e84f26177862c5ab5b8be34ae6e3955d1b324f501a0d2751d971805f0612bc\" +\n\t\t\t\t\"0b5e966c9060eeb08cf38a7e71037863ffb2f6433694e69db59f731dbe55125f995d2d6ccd139d56d5b481d3bce76baa\",\n\t\t},\n\t\t{\n\t\t\tname:       \"derivation path: m/0H/1/2H\",\n\t\t\tpath:       []uint32{h, 1, 2 + h},\n\t\t\twantPrivG1: \"221e1f998e9599aecdab1c9671162bea925ee50d5f1c5bca2ed19908ac0f2ddd\",\n\t\t\twantPrivG2: \"39e4906c49c05f5daeed89ced104a32cda82782654dcc116346144424746f871\",\n\t\t\twantPubG1:  \"b06503dda77e1408478fc4b2d044a0ce2ab73691e8497a37f99d00e1076782698aacceb8e68fb9c3db6deccb0b8375fe\",\n\t\t\twantPubG2: \"81461b89b446d055ac3bc38b9384363cbabc47cc0a16c97a7c7ea24eeffd70f213daacdfd736a49c45befececcd81832\" +\n\t\t\t\t\"12f04e186bcc9fbf67bfa5de862c57298cff4d36d5409380a166b9e37348b665186019b15498608309936e7ff36a87b5\",\n\t\t},\n\t\t{\n\t\t\tname:       \"derivation path: m/0H/1/2H/2\",\n\t\t\tpath:       []uint32{h, 1, 2 + h, 2},\n\t\t\twantPrivG1: \"26a19ca5ff2f6b32871de71aabd87a30ce79cdde3b0556cbb46692295f0aee15\",\n\t\t\twantPrivG2: \"3aa1e19a9bf2bf631d95b401e29d5f042160edd76ced9696e42a98be80b41faa\",\n\t\t\twantPubG1:  \"afd589792ba6bcb1866598a673a96fdaef9bf94026ef875a1a3e8d4fd839360f4659c9495afaf24c52577c0aa1fb5d45\",\n\t\t\twantPubG2: \"92b20565b4a02bf82229f32e0ccc6f23446ded5ca2d67067afc70931b5a934f9469651e67e1105b5601cb585a1f44538\" +\n\t\t\t\t\"124fe3529f5b1edb27ab44f0900e59a27f57df87aa03395a70825d02433c2498d8396c90986dad79d5ba9e0fc438bea8\",\n\t\t},\n\t\t{\n\t\t\tname:       \"derivation path: m/0H/1/2H/2/1000000000\",\n\t\t\tpath:       []uint32{h, 1, 2 + h, 2, 1000000000},\n\t\t\twantPrivG1: \"44b743b059c2e4cb720378f4f0eda9369a1f02294e140e6a2e444bfdd36b1ad9\",\n\t\t\twantPrivG2: \"2b01ef29730eb62c7114621d9d28ad77cf33f2434572a2bf9b73f1e502fea770\",\n\t\t\twantPubG1:  \"99b404130a1ae6b6dd90ddf2a25c692f405536fee11046257ed6ba11629f101ad80658c61c039f0523de4c6e9f58a5c8\",\n\t\t\twantPubG2: \"b05a01a80c3fe465227c23df7e36be1adcf557111f4cc50bf0f00c66c2b084d1e1d96e2f1c754496cb1f83dd1123456e\" +\n\t\t\t\t\"17697e77a9b99ea557a63c9bf29668a966732882e7baebf079a4afad212910deb10e5151e18ae98ee4a57d0e622332aa\",\n\t\t},\n\t}\n\n\tmasterKeyG1, _ := NewMaster(testSeed, true)\n\tmasterKeyG2, _ := NewMaster(testSeed, false)\n\tfor no, tt := range tests {\n\t\textKeyG1, err := masterKeyG1.DerivePath(tt.path)\n\t\trequire.NoError(t, err)\n\n\t\textKeyG2, err := masterKeyG2.DerivePath(tt.path)\n\t\trequire.NoError(t, err)\n\n\t\tprivKeyG1, err := extKeyG1.RawPrivateKey()\n\t\trequire.NoError(t, err)\n\t\trequire.Equal(t, tt.wantPrivG1, hex.EncodeToString(privKeyG1),\n\t\t\t\"mismatched serialized private key for test #%v\", no+1)\n\n\t\tprivKeyG2, err := extKeyG2.RawPrivateKey()\n\t\trequire.NoError(t, err)\n\t\trequire.Equal(t, tt.wantPrivG2, hex.EncodeToString(privKeyG2),\n\t\t\t\"mismatched serialized private key for test #%v\", no+1)\n\n\t\tpubKeyG1 := extKeyG1.RawPublicKey()\n\t\trequire.Equal(t, tt.wantPubG1, hex.EncodeToString(pubKeyG1),\n\t\t\t\"mismatched serialized public key for test #%v\", no+1)\n\n\t\tpubKeyG2 := extKeyG2.RawPublicKey()\n\t\trequire.Equal(t, tt.wantPubG2, hex.EncodeToString(pubKeyG2),\n\t\t\t\"mismatched serialized public key for test #%v\", no+1)\n\n\t\tneuterKeyG1 := extKeyG1.Neuter()\n\t\tneuterKeyG2 := extKeyG2.Neuter()\n\t\tneuterPubKeyG1 := neuterKeyG1.RawPublicKey()\n\t\tneuterPubKeyG2 := neuterKeyG2.RawPublicKey()\n\n\t\trequire.True(t, extKeyG1.IsPrivate())\n\t\trequire.True(t, extKeyG2.IsPrivate())\n\t\trequire.False(t, neuterKeyG1.IsPrivate())\n\t\trequire.False(t, neuterKeyG2.IsPrivate())\n\t\trequire.Equal(t, pubKeyG1, neuterPubKeyG1)\n\t\trequire.Equal(t, pubKeyG2, neuterPubKeyG2)\n\t\trequire.Equal(t, tt.path, extKeyG1.Path())\n\t\trequire.Equal(t, tt.path, extKeyG2.Path())\n\t\trequire.Equal(t, tt.path, neuterKeyG1.Path())\n\t\trequire.Equal(t, tt.path, neuterKeyG2.Path())\n\n\t\t_, err = neuterKeyG1.RawPrivateKey()\n\t\trequire.ErrorIs(t, err, ErrNotPrivExtKey)\n\n\t\t_, err = neuterKeyG2.RawPrivateKey()\n\t\trequire.ErrorIs(t, err, ErrNotPrivExtKey)\n\n\t\tblsPrivKey, _ := bls.PrivateKeyFromBytes(privKeyG2)\n\t\trequire.Equal(t, pubKeyG2, blsPrivKey.PublicKey().Bytes())\n\t}\n}\n\n// TestInvalidDerivation tests Derive function for invalid data.\nfunc TestInvalidDerivation(t *testing.T) {\n\tt.Run(\"Private key is 31 bytes. It should be 32 bytes\", func(t *testing.T) {\n\t\tkey := [31]byte{0}\n\t\tchainCode := [32]byte{0}\n\t\text := newExtendedKey(key[:], chainCode[:], []uint32{}, true, false)\n\t\t_, err := ext.Derive(hardenedKeyStart)\n\t\trequire.ErrorIs(t, err, ErrInvalidKeyData)\n\t})\n\n\tt.Run(\"Public key on G1 is 96 bytes. It should be 48 bytes\", func(t *testing.T) {\n\t\tkey := [96]byte{0}\n\t\tchainCode := [32]byte{0}\n\t\text := newExtendedKey(key[:], chainCode[:], []uint32{}, false, true)\n\t\t_, err := ext.Derive(0)\n\t\trequire.ErrorIs(t, err, ErrInvalidKeyData)\n\t})\n\n\tt.Run(\"Public key on G2 is 42 bytes. It should be 96 bytes\", func(t *testing.T) {\n\t\tkey := [95]byte{0}\n\t\tchainCode := [32]byte{0}\n\t\text := newExtendedKey(key[:], chainCode[:], []uint32{}, false, false)\n\t\t_, err := ext.Derive(0)\n\t\trequire.ErrorIs(t, err, ErrInvalidKeyData)\n\t})\n\n\tt.Run(\"Invalid key\", func(t *testing.T) {\n\t\tkey := [95]byte{0}\n\t\tchainCode := [32]byte{0}\n\t\text := newExtendedKey(key[:], chainCode[:], []uint32{}, false, false)\n\t\t_, err := ext.Derive(0)\n\t\trequire.ErrorIs(t, err, ErrInvalidKeyData)\n\t})\n\n\tt.Run(\"Derive public key from hardened key\", func(t *testing.T) {\n\t\tkey := [32]byte{0}\n\t\tchainCode := [32]byte{0}\n\t\text := newExtendedKey(key[:], chainCode[:], []uint32{}, false, false)\n\t\t_, err := ext.Derive(hardenedKeyStart)\n\t\trequire.ErrorIs(t, err, ErrDeriveHardFromPublic)\n\t})\n}\n\n// TestGenerateSeed ensures the GenerateSeed function works as intended.\nfunc TestGenerateSeed(t *testing.T) {\n\ttests := []struct {\n\t\tname   string\n\t\tlength uint8\n\t\terr    error\n\t}{\n\t\t// Test various valid lengths.\n\t\t{name: \"16 bytes\", length: 16},\n\t\t{name: \"17 bytes\", length: 17},\n\t\t{name: \"20 bytes\", length: 20},\n\t\t{name: \"32 bytes\", length: 32},\n\t\t{name: \"64 bytes\", length: 64},\n\n\t\t// Test invalid lengths.\n\t\t{name: \"15 bytes\", length: 15, err: ErrInvalidSeedLen},\n\t\t{name: \"65 bytes\", length: 65, err: ErrInvalidSeedLen},\n\t}\n\n\tfor no, tt := range tests {\n\t\tseed, err := GenerateSeed(tt.length)\n\t\trequire.ErrorIs(t, err, tt.err)\n\n\t\tif tt.err == nil {\n\t\t\tassert.Len(t, seed, int(tt.length),\n\t\t\t\t\"GenerateSeed #%d (%s): length mismatch -- got %d, want %d\",\n\t\t\t\tno, tt.name, len(seed), tt.length)\n\t\t}\n\t}\n}\n\n// TestNewMaster ensures the NewMaster function works as intended.\nfunc TestNewMaster(t *testing.T) {\n\ttests := []struct {\n\t\tname    string\n\t\tseed    string\n\t\tprivKey string\n\t\terr     error\n\t}{\n\t\t// Test various valid seeds.\n\t\t{\n\t\t\tname:    \"16 bytes\",\n\t\t\tseed:    \"000102030405060708090a0b0c0d0e0f\",\n\t\t\tprivKey: \"4f55e31ee1c4f58af0840fd3f5e635fd6c07eacd14283c45d7d43729003abb84\",\n\t\t},\n\t\t{\n\t\t\tname:    \"32 bytes\",\n\t\t\tseed:    \"3ddd5602285899a946114506157c7997e5444528f3003f6134712147db19b678\",\n\t\t\tprivKey: \"4c101174339ffca5cc0afca5d2d8e2538834781318e5e1c8afdabf7e6fb77444\",\n\t\t},\n\t\t{\n\t\t\tname: \"64 bytes\",\n\t\t\tseed: \"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7\" +\n\t\t\t\t\"b7875726f6c696663605d5a5754514e4b484542\",\n\t\t\tprivKey: \"47b660cc8dc2d4dc2cdf8893048bda9d5dc6318eb31f301b272b291b26cb20a1\",\n\t\t},\n\n\t\t// Test invalid seeds.\n\t\t{\n\t\t\tname: \"empty seed\",\n\t\t\tseed: \"\",\n\t\t\terr:  ErrInvalidSeedLen,\n\t\t},\n\t\t{\n\t\t\tname: \"15 bytes\",\n\t\t\tseed: \"000000000000000000000000000000\",\n\t\t\terr:  ErrInvalidSeedLen,\n\t\t},\n\t\t{\n\t\t\tname: \"65 bytes\",\n\t\t\tseed: \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000\" +\n\t\t\t\t\"000000000000000000000000000000000000000000000\",\n\t\t\terr: ErrInvalidSeedLen,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tseed, _ := hex.DecodeString(tt.seed)\n\t\textKeyG1, err := NewMaster(seed, true)\n\t\trequire.ErrorIs(t, err, tt.err)\n\n\t\textKeyG2, err := NewMaster(seed, true)\n\t\trequire.ErrorIs(t, err, tt.err)\n\n\t\tif tt.err == nil {\n\t\t\tprivKeyG1, _ := extKeyG1.RawPrivateKey()\n\t\t\tassert.Equal(t, tt.privKey, hex.EncodeToString(privKeyG1),\n\t\t\t\t\"NewMaster #%d (%s): privKeyG1 mismatch -- got %x, want %s\",\n\t\t\t\tno+1, tt.name, privKeyG1, tt.privKey)\n\n\t\t\tprivKeyG2, _ := extKeyG2.RawPrivateKey()\n\t\t\tassert.Equal(t, tt.privKey, hex.EncodeToString(privKeyG2),\n\t\t\t\t\"NewMaster #%d (%s): privKeyG2 mismatch -- got %x, want %s\",\n\t\t\t\tno+1, tt.name, privKeyG2, tt.privKey)\n\t\t}\n\t}\n}\n\n// TestKeyToString ensures the String function works as intended.\n//\n//nolint:lll // long extended keys\nfunc TestKeyToString(t *testing.T) {\n\ttestSeed, _ := hex.DecodeString(\"000102030405060708090a0b0c0d0e0f\")\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tname        string\n\t\tpath        []uint32\n\t\twantXPrivG1 string\n\t\twantXPrivG2 string\n\t\twantXPubG1  string\n\t\twantXPubG2  string\n\t}{\n\t\t{\n\t\t\tname:        \"derivation path: m\",\n\t\t\tpath:        []uint32{},\n\t\t\twantXPrivG1: \"XSECRET1PQQSTS7DSJ7AZNY54YZ53MM3FMCWEGWVVJYRK5SJ9HESHQSN96GCVJUSPYP84TCC7U8Z0TZHSSS8A8A0XXH7KCPL2E52ZS0Z96L2RW2GQ82ACG058EDE\",\n\t\t\twantXPrivG2: \"XSECRET1PQQSTS7DSJ7AZNY54YZ53MM3FMCWEGWVVJYRK5SJ9HESHQSN96GCVJUSQYP84TCC7U8Z0TZHSSS8A8A0XXH7KCPL2E52ZS0Z96L2RW2GQ82ACGWGEQEJ\",\n\t\t\twantXPubG1:  \"xpublic1pqqsts7dsj7azny54yz53mm3fmcwegwvvjyrk5sj9heshqsn96gcvjuspxz8makyyykytv2fh0s9q6rv4g757u96j040ad5kxpyp54rpuqaxa5qc7phlgs669gjvmlc85pf7ykxqqale8c\",\n\t\t\twantXPubG2:  \"xpublic1pqqsts7dsj7azny54yz53mm3fmcwegwvvjyrk5sj9heshqsn96gcvjusqvzcm45alff9wslyfmmpvxfgjvq72pr3dkck06gj5e94luagx3adf3e7ye47n0ncyjmwku7ts8e7g3egyd00vnjykau4dqvqfdw70w0rvlut6m576j5c0yfy3jq0a7l7jqakq7z82xkj0m2squ7kx6zj5gt3snpvg7k\",\n\t\t},\n\t\t{\n\t\t\tname:        \"derivation path: m/0H\",\n\t\t\tpath:        []uint32{h},\n\t\t\twantXPrivG1: \"XSECRET1PQYQQQQYQYQDNX9T02WPS2RZ5SYUKE3JPHE8RGDHJMTNU7684679WEQWRN8STWQFQTAWHH7H8A2LJESL6A0QJGJ0PCUGKCFMH6L3CF6KHNHEFJENM3KDQRD8L6L\",\n\t\t\twantXPrivG2: \"XSECRET1PQYQQQQYQYR38R7SGQNLMC6H96CANRN8XE3WVFVLF0V5XW2LE0FDSPYT52FUNSQPQ262M55Y85FLCCRTJWPZ4ZPR93V3K0W8FP2M00AT6CL8Z949XSDKQ5PJCQ7\",\n\t\t\twantXPubG1:  \"xpublic1pqyqqqqyqyqdnx9t02wps2rz5syuke3jphe8rgdhjmtnu7684679weqwrn8stwqfsk2px4zdz9lkrxjwkfaphng0t2cetpv69hxzmwwpjffdcmdjqxp6zzgq7lcm2umyvvwwn94qjgjt2u0x45lj\",\n\t\t\twantXPubG2:  \"xpublic1pqyqqqqyqyr38r7sgqnlmc6h96canrn8xe3wvfvlf0v5xw2le0fdspyt52funsqrqkd76xzqxvt8wklc89zvqrftwt3246sf5xjksjcreczzv4gtzerfzfzgldzqkjg04h5298tmappdugqp5r4suujt0lvgu6y8cayzjy3rl4ks6tajxc3te0cqyvzf9sahskcl5qgalyl5zs6y00dxasvlxgyepz53e\",\n\t\t},\n\t\t{\n\t\t\tname:        \"derivation path: m/0H/1\",\n\t\t\tpath:        []uint32{h, 1},\n\t\t\twantXPrivG1: \"XSECRET1PQGQQQQYQQYQQQQPQ6AXJT5395S9R89ME3E25LJXAP2QVULMX7S3UFNQ2D49Z0RHR38YQZGPMAFEEEX3XJKAY4ATXHSLJ3EWX9K5WWGDEWACFL82F9ACJNWP4YYSJCVL6\",\n\t\t\twantXPrivG2: \"XSECRET1PQGQQQQYQQYQQQQPQFC96AZPJ5LSJKC3SEG5KUFF9Q7A9TEX2XHLYZVMZ7EF9D0G2M0QQQGZ42S3TE0LAR427AFHC02FYHFWSG6AKPC4LLCSC9KHH3W4K5MSHNUXN9SDC\",\n\t\t\twantXPubG1:  \"xpublic1pqgqqqqyqqyqqqqpq6axjt5395s9r89me3e25ljxap2qvulmx7s3ufnq2d49z0rhr38yqzv90txq0g9e8jlq8za9yqs8tpvv9nv6hkp0s52dvvhp4m9thxr7hytla2gxcv850hccjd5nvavydhefqvzaww5\",\n\t\t\twantXPubG2:  \"xpublic1pqgqqqqyqqyqqqqpqfc96azpj5lsjkc3seg5kuff9q7a9tex2xhlyzvmz7ef9d0g2m0qqqc9477pmk8c3w0lwhvyr79rvt2p5wr5y7fsh0p3vt26m30354ehrj4w3kvj02qdq6f63m9ccqhcxz27qkh5kdjgxpm4s3nec5ln3qdux8laj7epnd98xnk6e7ucahe23yhuet5kkengnn4tdtdyp6w7ww6a2nwzn8e\",\n\t\t},\n\t\t{\n\t\t\tname:        \"derivation path: m/0H/1/2H\",\n\t\t\tpath:        []uint32{h, 1, 2 + h},\n\t\t\twantXPrivG1: \"XSECRET1PQVQQQQYQQYQQQQQZQQQGQGXG02G9WGUD336CLQ7L25X4NPNCE75A4247R2A7S3W9S37XQSQ7FQQJQGS7R7VCA9VE4MX6K8YKWYTZH65JTMJS6HCUT09ZA5VEPZKQ7TWAD83EJ6\",\n\t\t\twantXPrivG2: \"XSECRET1PQVQQQQYQQYQQQQQZQQQGQG8PZVKZLK72R0VSGLSAKL4EMX9UW4VL9WZN6G8GXC24877GHGAFKVQZQW0YJPKYNSZLTKHWMZWW6YZ2XTX6SFUZV4XUCYTRGC2YGFR5D7R3N8ZL8R\",\n\t\t\twantXPubG1:  \"xpublic1pqvqqqqyqqyqqqqqzqqqgqgxg02g9wgud336clq7l25x4npnce75a4247r2a7s3w9s37xqsq7fqqnpvr9q0w6wls5pprcl39j6pz2pn32kumfr6zf0gmln8gquyrk0qnf32kvaw8x37uu8kmdan9shqm4lcszuz63\",\n\t\t\twantXPubG2:  \"xpublic1pqvqqqqyqqyqqqqqzqqqgqg8pzvkzlk72r0vsglsakl4emx9uw4vl9wzn6g8gxc24877ghgafkvqxpq2xrwymg3ks2kkrhsutjwzrv096h3ruczske9a8cl4zfmhl6u8jz0d2eh7hx6jfc3d7lm8vekqcxgf0qnscd0xfl0m8h7jaap3v2u5cel6dxm25pyuq59ntncmnfzmx2xrqrxc4fxrqsvyexmnl7d4g0dgd7v822\",\n\t\t},\n\t\t{\n\t\t\tname:        \"derivation path: m/0H/1/2H/2\",\n\t\t\tpath:        []uint32{h, 1, 2 + h, 2},\n\t\t\twantXPrivG1: \"XSECRET1PQSQQQQYQQYQQQQQZQQQGQQSQQQQZPZWYN98T9Y4TWRN08T5M0ZPVEFVXQCKLYSK269XY7U90VNPXEJJZQYSZDGVU5HLJ76EJSUW7WX4TMPARPNNEEH0RKP2KEW6XDY3FTU9WU9GXSKX25\",\n\t\t\twantXPrivG2: \"XSECRET1PQSQQQQYQQYQQQQQZQQQGQQSQQQQZQTZRQ5QNVZ5MDELTWXSKWAXCS7JGA6SNUM44Z06Q5TRL5WE8W9EQQQSR4G0PN2DL90MRRK2MGQ0ZN40SGGTQAHTKEMVKJMJZ4X97SZ6PL2SP66YRM\",\n\t\t\twantXPubG1:  \"xpublic1pqsqqqqyqqyqqqqqzqqqgqqsqqqqzpzwyn98t9y4twrn08t5m0zpvefvxqcklysk269xy7u90vnpxejjzqyc2l4vf0y46d093seje3fnn49ha4muml9qzdmu8tgdrar20mqunvr6xt8y5jkh67fx9y4mup2slkh29x3erlu\",\n\t\t\twantXPubG2:  \"xpublic1pqsqqqqyqqyqqqqqzqqqgqqsqqqqzqtzrq5qnvz5mdeltwxskwaxcs7jga6snum44z06q5trl5we8w9eqqpsf9vs9vk62q2lcyg5lxtsve3hjx3rda4w294nsv7huwzf3kk5nf72xjeg7vls3qk6kq894skslg3fczf87x55ltv0dkfatgncfqrje5fl40hu84gpnjknssfwsyseuyjvdswtvjzvxmtte6kafur7y8zl2s9y5g8j\",\n\t\t},\n\t\t{\n\t\t\tname:        \"derivation path: m/0H/1/2H/2/1000000000\",\n\t\t\tpath:        []uint32{h, 1, 2 + h, 2, 1000000000},\n\t\t\twantXPrivG1: \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJAT3F4D\",\n\t\t\twantXPrivG2: \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS27RYEFRMHGDM0P29ADH63TVTNMRTDS2MF5R23X7T7ULLJS073DTQQYQ4SRMEFWV8TVTR3Z33PM8FG44MU7VLJGDZH9G4LNDELREGZL6NHQCCQPXC\",\n\t\t\twantXPubG1:  \"xpublic1pq5qqqqyqqyqqqqqzqqqgqqsqqqqqpj568vs9lz67jkww0p6tqy9ny58lv0pcvrqqtaemkgv6uljns99y68jhcvgpxzvmgpqnpgdwddkajrwl9gjudyh5q4fklms3q3390mtt5ytznugp4kqxtrrpcqulq53aunrwnav2tjqzv47re\",\n\t\t\twantXPubG2:  \"xpublic1pq5qqqqyqqyqqqqqzqqqgqqsqqqqqpj568vs27ryefrmhgdm0p29adh63tvtnmrtds2mf5r23x7t7ulljs073dtqqvzc95qdgpsl7gefz0s3a7l3khcddea2hzy05e3gt7rcqcekzkzzdrcwedch3ca2yjm93lq7azy352mshd9l802den6j40f3un0efv69fveej3qh8ht4lq7dy47kjz2gsm6csu523ux9wnrhy547suc3rx24qeppfv3\",\n\t\t},\n\t}\n\n\tmasterKeyG1, _ := NewMaster(testSeed, true)\n\tmasterKeyG2, _ := NewMaster(testSeed, false)\n\tfor no, tt := range tests {\n\t\textKeyG1, _ := masterKeyG1.DerivePath(tt.path)\n\t\tneuterKeyG1 := extKeyG1.Neuter()\n\n\t\textKeyG2, _ := masterKeyG2.DerivePath(tt.path)\n\t\tneuterKeyG2 := extKeyG2.Neuter()\n\n\t\trequire.Equal(t, tt.wantXPrivG1, extKeyG1.String(), \"test %d failed\", no)\n\t\trequire.Equal(t, tt.wantXPubG1, neuterKeyG1.String(), \"test %d failed\", no)\n\t\trequire.Equal(t, tt.wantXPrivG2, extKeyG2.String(), \"test %d failed\", no)\n\t\trequire.Equal(t, tt.wantXPubG2, neuterKeyG2.String(), \"test %d failed\", no)\n\n\t\trecoveredExtKeyG1, err := NewKeyFromString(tt.wantXPrivG1)\n\t\trequire.NoError(t, err)\n\n\t\trecoveredExtKeyG2, err := NewKeyFromString(tt.wantXPrivG2)\n\t\trequire.NoError(t, err)\n\n\t\trecoveredNeuterKeyG1, err := NewKeyFromString(tt.wantXPubG1)\n\t\trequire.NoError(t, err)\n\n\t\trecoveredNeuterKeyG2, err := NewKeyFromString(tt.wantXPubG2)\n\t\trequire.NoError(t, err)\n\n\t\trequire.Equal(t, extKeyG1, recoveredExtKeyG1)\n\t\trequire.Equal(t, extKeyG2, recoveredExtKeyG2)\n\t\trequire.Equal(t, neuterKeyG1, recoveredNeuterKeyG1)\n\t\trequire.Equal(t, neuterKeyG2, recoveredNeuterKeyG2)\n\t\trequire.Equal(t, tt.path, recoveredExtKeyG1.path)\n\t\trequire.Equal(t, tt.path, recoveredExtKeyG2.path)\n\t\trequire.Equal(t, tt.path, recoveredNeuterKeyG1.path)\n\t\trequire.Equal(t, tt.path, recoveredNeuterKeyG2.path)\n\t}\n}\n\n// TestInvalidString checks errors corresponding to the invalid strings\n//\n//nolint:lll // long extended private keys\nfunc TestInvalidString(t *testing.T) {\n\ttests := []struct {\n\t\tdesc          string\n\t\tstr           string\n\t\texpectedError error\n\t}{\n\t\t{\n\t\t\tdesc:          \"invalid checksum\",\n\t\t\tstr:           \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJAT3FD4\",\n\t\t\texpectedError: bech32m.InvalidChecksumError{Expected: \"at3f4d\", Actual: \"at3fd4\"},\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no depth\",\n\t\t\tstr:           \"XSECRET1P6NTYTF\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"wrong path\",\n\t\t\tstr:           \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQESEG08\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no chain code\",\n\t\t\tstr:           \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568V5G6A4P\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no group\",\n\t\t\tstr:           \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGS579U6\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no key\",\n\t\t\tstr:           \"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPJCMNNE\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid type\",\n\t\t\tstr:           \"XSECRET1ZQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJPJKVRX\",\n\t\t\texpectedError: ErrInvalidKeyData,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid type\",\n\t\t\tstr:           \"XPUBLIC1ZQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJ3HALEC\",\n\t\t\texpectedError: ErrInvalidKeyData,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid hrp\",\n\t\t\tstr:           \"SECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJ98PYV5\",\n\t\t\texpectedError: ErrInvalidHRP,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid hrp\",\n\t\t\tstr:           \"PUBLIC1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJ4Z2HK2\",\n\t\t\texpectedError: ErrInvalidHRP,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\t_, err := NewKeyFromString(tt.str)\n\t\trequire.ErrorIs(t, err, tt.expectedError, \"test %d error is not matched\", no)\n\t}\n}\n\n// TestNeuter ensures the Neuter function works as intended.\n//\n//nolint:lll // Long extended private key\nfunc TestNeuter(t *testing.T) {\n\textKey, _ := NewKeyFromString(\"XSECRET1PQ5QQQQYQQYQQQQQZQQQGQQSQQQQQPJ568VS9LZ67JKWW0P6TQY9NY58LV0PCVRQQTAEMKGV6ULJNS99Y68JHCVGPYPZTWSAST8PWFJMJQDU0FU8D4YMF58CZ998PGRN29EZYHLWNDVDDJAT3F4D\")\n\tneuterKey := extKey.Neuter()\n\tassert.Equal(t,\n\t\t\"xpublic1pq5qqqqyqqyqqqqqzqqqgqqsqqqqqpj568vs9lz67jkww0p6tqy9ny58lv0pcvrqqtaemkgv6uljns99y68jhcvgpxzvmgpqnpgdwddkajrwl9gjudyh5q4fklms3q3390mtt5ytznugp4kqxtrrpcqulq53aunrwnav2tjqzv47re\",\n\t\tneuterKey.String())\n\tassert.Equal(t, neuterKey, neuterKey.Neuter())\n}\n"
  },
  {
    "path": "crypto/bls/private_key.go",
    "content": "package bls\n\nimport (\n\t\"crypto/sha256\"\n\t\"errors\"\n\t\"math/big\"\n\t\"strings\"\n\n\tbls12381 \"github.com/consensys/gnark-crypto/ecc/bls12-381\"\n\t\"github.com/consensys/gnark-crypto/ecc/bls12-381/fr\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"golang.org/x/crypto/hkdf\"\n)\n\nvar _ crypto.PrivateKey = &PrivateKey{}\n\nconst PrivateKeySize = 32\n\ntype PrivateKey struct {\n\tscalar *big.Int\n}\n\n// PrivateKeyFromString decodes the input string and returns the PrivateKey\n// if the string is a valid bech32m encoding of a BLS public key.\nfunc PrivateKeyFromString(text string) (*PrivateKey, error) {\n\t// Decode the bech32m encoded private key.\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Check if hrp is valid\n\tif hrp != crypto.PrivateKeyHRP {\n\t\treturn nil, crypto.InvalidHRPError(hrp)\n\t}\n\n\tif typ != crypto.SignatureTypeBLS {\n\t\treturn nil, crypto.InvalidSignatureTypeError(typ)\n\t}\n\n\treturn PrivateKeyFromBytes(data)\n}\n\n// KeyGen generates a private key deterministically from a secret octet string\n// IKM and an optional octet string keyInfo.\n// Based on https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04#section-2.3\nfunc KeyGen(ikm, keyInfo []byte) (*PrivateKey, error) {\n\t// L is `ceil((3 * ceil(log2(r))) / 16) = 48`,\n\t//    where `r` is the order of the BLS 12-381 curve\n\t//    r:  0x73eda753 299d7d48 3339d808 09a1d805 53bda402 fffe5bfe ffffffff 00000001\n\t// \t  https://datatracker.ietf.org/doc/html/draft-yonezawa-pairing-friendly-curves-02#section-4.2.2\n\t//\n\n\tif len(ikm) < 32 {\n\t\treturn nil, errors.New(\"ikm is too short\")\n\t}\n\n\tsecret := make([]byte, 0, len(ikm)+1)\n\tsecret = append(secret, ikm...)\n\tsecret = append(secret, util.I2OSP(big.NewInt(0), 1)...)\n\n\tl := int64(48)\n\tpseudoRandomKey := make([]byte, 0, len(keyInfo)+2)\n\tpseudoRandomKey = append(pseudoRandomKey, keyInfo...)\n\tpseudoRandomKey = append(pseudoRandomKey, util.I2OSP(big.NewInt(l), 2)...)\n\n\tsalt := []byte(\"BLS-SIG-KEYGEN-SALT-\")\n\tnum := big.NewInt(0)\n\tfor num.Sign() == 0 {\n\t\thash := sha256.Sum256(salt)\n\t\tsalt = hash[:]\n\n\t\tokm := make([]byte, l)\n\t\tprk := hkdf.Extract(sha256.New, secret, salt)\n\t\treader := hkdf.Expand(sha256.New, prk, pseudoRandomKey)\n\t\t_, _ = reader.Read(okm)\n\n\t\torder := fr.Modulus()\n\t\tnum = new(big.Int).Mod(util.OS2IP(okm), order)\n\t}\n\n\tsk := make([]byte, 32)\n\tnum.FillBytes(sk)\n\n\treturn PrivateKeyFromBytes(sk)\n}\n\n// PrivateKeyFromBytes constructs a BLS private key from the raw bytes.\nfunc PrivateKeyFromBytes(data []byte) (*PrivateKey, error) {\n\tif len(data) != PrivateKeySize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\n\tscalar := new(big.Int)\n\tscalar = scalar.SetBytes(data)\n\n\treturn &PrivateKey{scalar: scalar}, nil\n}\n\n// String returns a human-readable string for the BLS private key.\nfunc (prv *PrivateKey) String() string {\n\tstr, _ := bech32m.EncodeFromBase256WithType(\n\t\tcrypto.PrivateKeyHRP,\n\t\tcrypto.SignatureTypeBLS,\n\t\tprv.Bytes())\n\n\treturn strings.ToUpper(str)\n}\n\n// Bytes return the raw bytes of the private key.\nfunc (prv *PrivateKey) Bytes() []byte {\n\tdata := prv.scalar.Bytes()\n\tdata = util.PadToLeft(data, PrivateKeySize)\n\n\treturn data\n}\n\n// Sign calculates the signature from the private key and given message.\n// It's defined in section 2.6 of the spec: CoreSign.\nfunc (prv *PrivateKey) Sign(msg []byte) crypto.Signature {\n\treturn prv.SignNative(msg)\n}\n\nfunc (prv *PrivateKey) SignNative(msg []byte) *Signature {\n\tqAffine, err := bls12381.HashToG1(msg, dst)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tqJac := new(bls12381.G1Jac).FromAffine(&qAffine)\n\tsigJac := qJac.ScalarMultiplication(qJac, prv.scalar)\n\tsigAffine := new(bls12381.G1Affine).FromJacobian(sigJac)\n\tdata := sigAffine.Bytes()\n\n\treturn &Signature{\n\t\tdata:    data[:],\n\t\tpointG1: sigAffine,\n\t}\n}\n\nfunc (prv *PrivateKey) PublicKeyNative() *PublicKey {\n\tpkJac := new(bls12381.G2Jac).ScalarMultiplication(&gen2Jac, prv.scalar)\n\tpkAffine := new(bls12381.G2Affine).FromJacobian(pkJac)\n\tdata := pkAffine.Bytes()\n\n\treturn &PublicKey{\n\t\tdata:    data[:],\n\t\tpointG2: pkAffine,\n\t}\n}\n\nfunc (prv *PrivateKey) PublicKey() crypto.PublicKey {\n\treturn prv.PublicKeyNative()\n}\n\nfunc (prv *PrivateKey) EqualsTo(x crypto.PrivateKey) bool {\n\txBLS, ok := x.(*PrivateKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn prv.scalar.Cmp(xBLS.scalar) == 0\n}\n"
  },
  {
    "path": "crypto/bls/private_key_test.go",
    "content": "package bls_test\n\nimport (\n\t\"encoding/hex\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestPrivateKeyEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv1 := ts.RandBLSKeyPair()\n\t_, prv2 := ts.RandBLSKeyPair()\n\t_, prv3 := ts.RandEd25519KeyPair()\n\n\tassert.True(t, prv1.EqualsTo(prv1))\n\tassert.False(t, prv1.EqualsTo(prv2))\n\tassert.False(t, prv1.EqualsTo(prv3))\n}\n\nfunc TestPrivateKeyFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tresult  []byte\n\t}{\n\t\t{\n\t\t\t\"invalid separator index -1\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid bech32 string length 0\",\n\t\t\t\"\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid character not part of charset: 105\",\n\t\t\t\"SECRET1IOIOOI\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid bech32 string length 0\",\n\t\t\t\"SECRET1HPZZU9\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid HRP: xxx\",\n\t\t\t\"XXX1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQMUUMJT\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid checksum (expected qjvk67 got qjvk68)\",\n\t\t\t\"SECRET1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQQJVK68\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 31\",\n\t\t\t\"SECRET1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CCZ0EU7Z\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid signature type: 2\",\n\t\t\t\"SECRET1ZDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQG04E54\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"secret1pdrwtlp5px0fahdx39gxzjp7fkzfalml0d5u9tt9kvqhduc99cmgqqjvk67\", // lowercase\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0x68, 0xdc, 0xbf, 0x86, 0x81, 0x33, 0xd3, 0xdb, 0xb4, 0xd1, 0x2a, 0xc, 0x29, 0x7, 0xc9, 0xb0,\n\t\t\t\t0x93, 0xdf, 0xef, 0xef, 0x6d, 0x38, 0x55, 0xac, 0xb6, 0x60, 0x2e, 0xde, 0x60, 0xa5, 0xc6, 0xd0,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"SECRET1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQQJVK67\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0x68, 0xdc, 0xbf, 0x86, 0x81, 0x33, 0xd3, 0xdb, 0xb4, 0xd1, 0x2a, 0xc, 0x29, 0x7, 0xc9, 0xb0,\n\t\t\t\t0x93, 0xdf, 0xef, 0xef, 0x6d, 0x38, 0x55, 0xac, 0xb6, 0x60, 0x2e, 0xde, 0x60, 0xa5, 0xc6, 0xd0,\n\t\t\t},\n\t\t},\n\t}\n\tfor no, tt := range tests {\n\t\tprv, err := bls.PrivateKeyFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.result, prv.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, strings.ToUpper(tt.encoded), prv.String(), \"test %v: invalid encoded\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n\n// TestKeyGen ensures the KeyGen function works as intended.\nfunc TestKeyGen(t *testing.T) {\n\ttests := []struct {\n\t\tikm string\n\t\tsk  string\n\t}{\n\t\t{\n\t\t\t\"\",\n\t\t\t\"Err\",\n\t\t},\n\t\t{\n\t\t\t\"00000000000000000000000000000000000000000000000000000000000000\",\n\t\t\t\"Err\",\n\t\t},\n\t\t{\n\t\t\t\"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\t\"4d129a19df86a0f5345bad4cc6f249ec2a819ccc3386895beb4f7d98b3db6235\",\n\t\t},\n\t\t{\n\t\t\t\"2b1eb88002e83a622792d0b96d4f0695e328f49fdd32480ec0cf39c2c76463af\",\n\t\t\t\"0000f678e80740072a4a7fe8c7344db88a00ccc7db36aa51fa51f9c68e561584\",\n\t\t},\n\t\t// The test vectors from EIP-2333\n\t\t// https://github.com/ethereum/EIPs/blob/784107449bd83a9327b54f82aba96de28d72b89a/EIPS/eip-2333.md#test-cases\n\t\t{\n\t\t\t\"c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e5349553\" +\n\t\t\t\t\"1f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04\",\n\t\t\t\"0d7359d57963ab8fbbde1852dcf553fedbc31f464d80ee7d40ae683122b45070\",\n\t\t},\n\t\t{\n\t\t\t\"3141592653589793238462643383279502884197169399375105820974944592\",\n\t\t\t\"41c9e07822b092a93fd6797396338c3ada4170cc81829fdfce6b5d34bd5e7ec7\",\n\t\t},\n\t\t{\n\t\t\t\"0099FF991111002299DD7744EE3355BBDD8844115566CC55663355668888CC00\",\n\t\t\t\"3cfa341ab3910a7d00d933d8f7c4fe87c91798a0397421d6b19fd5b815132e80\",\n\t\t},\n\t\t{\n\t\t\t\"d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",\n\t\t\t\"2a0e28ffa5fbbe2f8e7aad4ed94f745d6bf755c51182e119bb1694fe61d3afca\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tikm, _ := hex.DecodeString(tt.ikm)\n\t\tprv, err := bls.KeyGen(ikm, nil)\n\t\tif tt.sk == \"Err\" {\n\t\t\trequire.Error(t, err,\n\t\t\t\t\"test '%v' failed. no error\", no)\n\t\t} else {\n\t\t\trequire.NoError(t, err,\n\t\t\t\t\"test'%v' failed. has error\", no)\n\t\t\tassert.Equal(t, tt.sk, hex.EncodeToString(prv.Bytes()),\n\t\t\t\t\"test '%v' failed. not equal\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/bls/public_key.go",
    "content": "package bls\n\nimport (\n\t\"bytes\"\n\t\"crypto/subtle\"\n\t\"io\"\n\n\tbls12381 \"github.com/consensys/gnark-crypto/ecc/bls12-381\"\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nvar _ crypto.PublicKey = &PublicKey{}\n\nconst PublicKeySize = 96\n\ntype PublicKey struct {\n\tpointG2 *bls12381.G2Affine // Lazily initialized point on G2.\n\tdata    []byte             // Raw public key data.\n}\n\n// PublicKeyFromString decodes the input string and returns the PublicKey\n// if the string is a valid bech32m encoding of a BLS public key.\nfunc PublicKeyFromString(text string) (*PublicKey, error) {\n\t// Decode the bech32m encoded public key.\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Check if hrp is valid\n\tif hrp != crypto.PublicKeyHRP {\n\t\treturn nil, crypto.InvalidHRPError(hrp)\n\t}\n\n\tif typ != crypto.SignatureTypeBLS {\n\t\treturn nil, crypto.InvalidSignatureTypeError(typ)\n\t}\n\n\treturn PublicKeyFromBytes(data)\n}\n\n// PublicKeyFromBytes constructs a BLS public key from the raw bytes.\nfunc PublicKeyFromBytes(data []byte) (*PublicKey, error) {\n\tif len(data) != PublicKeySize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\n\treturn &PublicKey{data: data}, nil\n}\n\n// Bytes returns the raw byte representation of the public key.\nfunc (pub *PublicKey) Bytes() []byte {\n\treturn pub.data\n}\n\n// String returns a human-readable string for the BLS public key.\nfunc (pub *PublicKey) String() string {\n\tstr, _ := bech32m.EncodeFromBase256WithType(\n\t\tcrypto.PublicKeyHRP,\n\t\tcrypto.SignatureTypeBLS,\n\t\tpub.Bytes())\n\n\treturn str\n}\n\n// MarshalCBOR encodes the public key into CBOR format.\nfunc (pub *PublicKey) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(pub.Bytes())\n}\n\n// UnmarshalCBOR decodes the public key from CBOR format.\nfunc (pub *PublicKey) UnmarshalCBOR(bs []byte) error {\n\tvar data []byte\n\tif err := cbor.Unmarshal(bs, &data); err != nil {\n\t\treturn err\n\t}\n\n\treturn pub.Decode(bytes.NewReader(data))\n}\n\n// Encode writes the raw bytes of the public key to the provided writer.\nfunc (pub *PublicKey) Encode(w io.Writer) error {\n\treturn encoding.WriteElements(w, pub.Bytes())\n}\n\n// Decode reads the raw bytes of the public key from the provided reader and initializes the public key.\nfunc (pub *PublicKey) Decode(r io.Reader) error {\n\tdata := make([]byte, PublicKeySize)\n\terr := encoding.ReadElements(r, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tp, _ := PublicKeyFromBytes(data)\n\t*pub = *p\n\n\treturn nil\n}\n\n// Verify checks that a signature is valid for the given message and public key.\n// It's defined in section 2.6 of the spec: CoreVerify.\nfunc (pub *PublicKey) Verify(msg []byte, sig crypto.Signature) error {\n\tif sig == nil {\n\t\treturn crypto.ErrInvalidPublicKey\n\t}\n\n\tr := sig.(*Signature)\n\tpointG1, err := r.PointG1()\n\tif err != nil {\n\t\treturn err\n\t}\n\tpointG2, err := pub.PointG2()\n\tif err != nil {\n\t\treturn err\n\t}\n\tqAffine, err := bls12381.HashToG1(msg, dst)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tvar negP bls12381.G2Affine\n\tnegP.Neg(&gen2Aff)\n\n\tcheck, _ := bls12381.PairingCheck(\n\t\t[]bls12381.G1Affine{qAffine, *pointG1},\n\t\t[]bls12381.G2Affine{*pointG2, negP})\n\n\tif !check {\n\t\treturn crypto.ErrInvalidSignature\n\t}\n\n\treturn nil\n}\n\nfunc (*PublicKey) SerializeSize() int {\n\treturn PublicKeySize\n}\n\n// EqualsTo checks if the current public key is equal to another public key.\nfunc (pub *PublicKey) EqualsTo(x crypto.PublicKey) bool {\n\txBLS, ok := x.(*PublicKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn subtle.ConstantTimeCompare(pub.data, xBLS.data) == 1\n}\n\n// AccountAddress returns the account address derived from the public key.\nfunc (pub *PublicKey) AccountAddress() crypto.Address {\n\tdata := hash.Hash160(hash.Hash256(pub.Bytes()))\n\taddr := crypto.NewAddress(crypto.AddressTypeBLSAccount, data)\n\n\treturn addr\n}\n\n// ValidatorAddress returns the validator address derived from the public key.\nfunc (pub *PublicKey) ValidatorAddress() crypto.Address {\n\tdata := hash.Hash160(hash.Hash256(pub.Bytes()))\n\taddr := crypto.NewAddress(crypto.AddressTypeValidator, data)\n\n\treturn addr\n}\n\n// VerifyAddress checks if the provided address matches the derived address from the public key.\nfunc (pub *PublicKey) VerifyAddress(addr crypto.Address) error {\n\tif addr.IsValidatorAddress() {\n\t\tif addr != pub.ValidatorAddress() {\n\t\t\treturn crypto.AddressMismatchError{\n\t\t\t\tExpected: pub.ValidatorAddress(),\n\t\t\t\tGot:      addr,\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif addr != pub.AccountAddress() {\n\t\t\treturn crypto.AddressMismatchError{\n\t\t\t\tExpected: pub.AccountAddress(),\n\t\t\t\tGot:      addr,\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// PointG2 returns the point on G2 for the public key.\nfunc (pub *PublicKey) PointG2() (*bls12381.G2Affine, error) {\n\tif pub.pointG2 != nil {\n\t\treturn pub.pointG2, nil\n\t}\n\n\tg2Aff := new(bls12381.G2Affine)\n\terr := g2Aff.Unmarshal(pub.data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif g2Aff.IsInfinity() || !g2Aff.IsInSubGroup() {\n\t\treturn nil, crypto.ErrInvalidPublicKey\n\t}\n\n\tpub.pointG2 = g2Aff\n\n\treturn g2Aff, nil\n}\n"
  },
  {
    "path": "crypto/bls/public_key_test.go",
    "content": "package bls_test\n\nimport (\n\t\"encoding/hex\"\n\t\"strings\"\n\t\"testing\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestPublicKeyCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2 := new(bls.PublicKey)\n\n\tbs, err := pub1.MarshalCBOR()\n\trequire.NoError(t, err)\n\trequire.NoError(t, pub2.UnmarshalCBOR(bs))\n\tassert.True(t, pub1.EqualsTo(pub2))\n\n\trequire.Error(t, pub2.UnmarshalCBOR([]byte(\"abcd\")))\n\n\tinv, _ := hex.DecodeString(strings.Repeat(\"ff\", bls.PublicKeySize))\n\tdata, _ := cbor.Marshal(inv)\n\trequire.NoError(t, pub2.UnmarshalCBOR(data))\n\n\t_, err = pub2.PointG2()\n\trequire.Error(t, err)\n}\n\nfunc TestPublicKeyEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\tpub3, _ := ts.RandEd25519KeyPair()\n\n\tassert.True(t, pub1.EqualsTo(pub1))\n\tassert.False(t, pub1.EqualsTo(pub2))\n\tassert.False(t, pub1.EqualsTo(pub3))\n}\n\nfunc TestPublicKeyEncoding(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, _ := ts.RandBLSKeyPair()\n\tfw1 := util.NewFixedWriter(20)\n\trequire.Error(t, pub.Encode(fw1))\n\n\tfw2 := util.NewFixedWriter(bls.PublicKeySize)\n\trequire.NoError(t, pub.Encode(fw2))\n\n\tfr1 := util.NewFixedReader(20, fw2.Bytes())\n\trequire.Error(t, pub.Decode(fr1))\n\n\tfr2 := util.NewFixedReader(bls.PublicKeySize, fw2.Bytes())\n\trequire.NoError(t, pub.Decode(fr2))\n\tassert.Equal(t, bls.PublicKeySize, pub.SerializeSize())\n}\n\nfunc TestPublicKeyVerifyAddress(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\n\terr := pub1.VerifyAddress(pub1.AccountAddress())\n\trequire.NoError(t, err)\n\terr = pub1.VerifyAddress(pub1.ValidatorAddress())\n\trequire.NoError(t, err)\n\n\terr = pub1.VerifyAddress(pub2.AccountAddress())\n\tassert.Equal(t, crypto.AddressMismatchError{\n\t\tExpected: pub1.AccountAddress(),\n\t\tGot:      pub2.AccountAddress(),\n\t}, err)\n\n\terr = pub1.VerifyAddress(pub2.ValidatorAddress())\n\tassert.Equal(t, crypto.AddressMismatchError{\n\t\tExpected: pub1.ValidatorAddress(),\n\t\tGot:      pub2.ValidatorAddress(),\n\t}, err)\n}\n\nfunc TestNilPublicKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub := &bls.PublicKey{}\n\trandSig := ts.RandBLSSignature()\n\trequire.Error(t, pub.VerifyAddress(ts.RandAccAddress()))\n\trequire.Error(t, pub.VerifyAddress(ts.RandValAddress()))\n\trequire.Error(t, pub.Verify(nil, nil))\n\trequire.Error(t, pub.Verify(nil, &bls.Signature{}))\n\trequire.Error(t, pub.Verify(nil, randSig))\n}\n\nfunc TestNilSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, _ := ts.RandBLSKeyPair()\n\trequire.Error(t, pub.Verify(nil, nil))\n\trequire.Error(t, pub.Verify(nil, &bls.Signature{}))\n}\n\nfunc TestPublicKeyFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tresult  []byte\n\t}{\n\t\t{\n\t\t\t\"invalid separator index -1\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid bech32 string length 0\",\n\t\t\t\"\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid character not part of charset: 105\",\n\t\t\t\"public1ioiooi\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid bech32 string length 0\",\n\t\t\t\"public134jkgz\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid HRP: xxx\",\n\t\t\t\"xxx1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjrvqc\" +\n\t\t\t\t\"vf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg7v5evslaq\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid checksum (expected jhx47a got jhx470)\",\n\t\t\t\"public1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjr\" +\n\t\t\t\t\"vqcvf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg7v5jhx470\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 95\",\n\t\t\t\"public1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjr\" +\n\t\t\t\t\"vqcvf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg73y98kl\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid signature type: 2\",\n\t\t\t\"public1z372l5frmm5e7cn7ewfjdkx5t7y62kztqr82rtatat70cl8p8ng3rdzr02mzpwcfl6s2v26kry6mwg\" +\n\t\t\t\t\"xpqy92ywx9wtff80mc9p3kr4cmhgekj048gavx2zdh78tsnh7eg5jzdw6s3et6c0dqyp22vslcgkukxh4l4\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"public1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjr\" +\n\t\t\t\t\"vqcvf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg7v5jhx47a\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0xaf, 0x0f, 0x74, 0x91, 0x7f, 0x50, 0x65, 0xaf, 0x94, 0x72, 0x7a, 0xe9, 0x54, 0x1b, 0x0d, 0xdc,\n\t\t\t\t0xfb, 0x5b, 0x82, 0x8a, 0x9e, 0x01, 0x6b, 0x02, 0x49, 0x8f, 0x47, 0x7e, 0xd3, 0x7f, 0xb4, 0x4d, 0x5d,\n\t\t\t\t0x88, 0x24, 0x95, 0xaf, 0xb6, 0xfd, 0x4f, 0x97, 0x73, 0xe4, 0xea, 0x9d, 0xee, 0xe4, 0x36, 0x03, 0x0c,\n\t\t\t\t0x4d, 0x61, 0xc6, 0xe3, 0xa1, 0x15, 0x15, 0x85, 0xe1, 0xd8, 0x38, 0xca, 0xe1, 0x44, 0x4a, 0x43, 0x8d,\n\t\t\t\t0x08, 0x9c, 0xe7, 0x7e, 0x10, 0xc4, 0x92, 0xa5, 0x5f, 0x69, 0x08, 0x12, 0x5c, 0x5b, 0xe9, 0xb2, 0x36,\n\t\t\t\t0xa2, 0x46, 0xe4, 0x08, 0x2d, 0x08, 0xde, 0x56, 0x4e, 0x11, 0x1e, 0x65,\n\t\t\t},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpub, err := bls.PublicKeyFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.result, pub.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, tt.encoded, pub.String(), \"test %v: invalid encoded\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n\nfunc TestPointG2(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t}{\n\t\t{\n\t\t\t\"short buffer\",\n\t\t\t\"public1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\" +\n\t\t\t\t\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjzu9w8\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"invalid point encoding\",\n\t\t\t\"public1pllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll\" +\n\t\t\t\t\"llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllluhpuzyf\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"invalid public key\",\n\t\t\t\"public1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\" +\n\t\t\t\t\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqglnhh9\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"public1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjr\" +\n\t\t\t\t\"vqcvf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg7v5jhx47a\",\n\t\t\ttrue,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpub, err := bls.PublicKeyFromString(tt.encoded)\n\t\trequire.NoError(t, err)\n\n\t\t_, err = pub.PointG2()\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/bls/signature.go",
    "content": "package bls\n\nimport (\n\t\"bytes\"\n\t\"crypto/subtle\"\n\t\"encoding/hex\"\n\t\"io\"\n\n\tbls12381 \"github.com/consensys/gnark-crypto/ecc/bls12-381\"\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nvar _ crypto.Signature = &Signature{}\n\nconst SignatureSize = 48\n\ntype Signature struct {\n\tpointG1 *bls12381.G1Affine // Lazily initialized point on G1.\n\tdata    []byte             // Raw signature data.\n}\n\n// SignatureFromString decodes the input string and returns the Signature\n// if the string is a valid hexadecimal encoding of a BLS signature.\nfunc SignatureFromString(text string) (*Signature, error) {\n\tdata, err := hex.DecodeString(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn SignatureFromBytes(data)\n}\n\n// SignatureFromBytes constructs a BLS signature from the raw bytes.\nfunc SignatureFromBytes(data []byte) (*Signature, error) {\n\tif len(data) != SignatureSize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\n\treturn &Signature{data: data}, nil\n}\n\n// Bytes returns the raw byte representation of the signature.\nfunc (sig *Signature) Bytes() []byte {\n\treturn sig.data\n}\n\n// String returns the hex-encoded string representation of the signature.\nfunc (sig *Signature) String() string {\n\treturn hex.EncodeToString(sig.Bytes())\n}\n\n// MarshalCBOR encodes the signature into CBOR format.\nfunc (sig *Signature) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(sig.Bytes())\n}\n\n// UnmarshalCBOR decodes the signature from CBOR format.\nfunc (sig *Signature) UnmarshalCBOR(bs []byte) error {\n\tvar data []byte\n\tif err := cbor.Unmarshal(bs, &data); err != nil {\n\t\treturn err\n\t}\n\n\treturn sig.Decode(bytes.NewReader(data))\n}\n\n// Encode writes the raw bytes of the signature to the provided writer.\nfunc (sig *Signature) Encode(w io.Writer) error {\n\treturn encoding.WriteElements(w, sig.Bytes())\n}\n\n// Decode reads the raw bytes of the signature from the provided reader and initializes the signature.\nfunc (sig *Signature) Decode(r io.Reader) error {\n\tdata := make([]byte, SignatureSize)\n\terr := encoding.ReadElements(r, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts, _ := SignatureFromBytes(data)\n\t*sig = *s\n\n\treturn nil\n}\n\nfunc (*Signature) SerializeSize() int {\n\treturn SignatureSize\n}\n\n// EqualsTo checks if the current signature is equal to another signature.\nfunc (sig *Signature) EqualsTo(x crypto.Signature) bool {\n\txBLS, ok := x.(*Signature)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn subtle.ConstantTimeCompare(sig.data, xBLS.data) == 1\n}\n\n// PointG1 returns the point on G1 for the signature.\nfunc (sig *Signature) PointG1() (*bls12381.G1Affine, error) {\n\tif sig.pointG1 != nil {\n\t\treturn sig.pointG1, nil\n\t}\n\n\tg1Aff := new(bls12381.G1Affine)\n\terr := g1Aff.Unmarshal(sig.data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif g1Aff.IsInfinity() || !g1Aff.IsInSubGroup() {\n\t\treturn nil, crypto.ErrInvalidPublicKey\n\t}\n\n\tsig.pointG1 = g1Aff\n\n\treturn g1Aff, nil\n}\n"
  },
  {
    "path": "crypto/bls/signature_test.go",
    "content": "package bls_test\n\nimport (\n\t\"encoding/hex\"\n\t\"strings\"\n\t\"testing\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSignatureCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv := ts.RandBLSKeyPair()\n\tsig1 := prv.Sign(ts.RandBytes(16))\n\tsig2 := new(bls.Signature)\n\n\tbs, err := sig1.MarshalCBOR()\n\trequire.NoError(t, err)\n\trequire.NoError(t, sig2.UnmarshalCBOR(bs))\n\tassert.True(t, sig1.EqualsTo(sig2))\n\n\trequire.Error(t, sig2.UnmarshalCBOR([]byte(\"abcd\")))\n\n\tinv, _ := hex.DecodeString(strings.Repeat(\"ff\", bls.SignatureSize))\n\tdata, _ := cbor.Marshal(inv)\n\trequire.NoError(t, sig2.UnmarshalCBOR(data))\n\n\t_, err = sig2.PointG1()\n\trequire.Error(t, err)\n}\n\nfunc TestSignatureEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv1 := ts.RandBLSKeyPair()\n\t_, prv2 := ts.RandBLSKeyPair()\n\t_, prv3 := ts.RandEd25519KeyPair()\n\n\tsig1 := prv1.Sign([]byte(\"foo\"))\n\tsig2 := prv2.Sign([]byte(\"foo\"))\n\tsig3 := prv3.Sign([]byte(\"foo\"))\n\n\tassert.True(t, sig1.EqualsTo(sig1))\n\tassert.False(t, sig1.EqualsTo(sig2))\n\tassert.False(t, sig1.EqualsTo(sig3))\n}\n\nfunc TestSignatureEncoding(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv := ts.RandBLSKeyPair()\n\tsig := prv.Sign(ts.RandBytes(16))\n\tfw1 := util.NewFixedWriter(20)\n\trequire.Error(t, sig.Encode(fw1))\n\n\tfw2 := util.NewFixedWriter(bls.SignatureSize)\n\trequire.NoError(t, sig.Encode(fw2))\n\n\tfr1 := util.NewFixedReader(20, fw2.Bytes())\n\trequire.Error(t, sig.Decode(fr1))\n\n\tfr2 := util.NewFixedReader(bls.SignatureSize, fw2.Bytes())\n\trequire.NoError(t, sig.Decode(fr2))\n\tassert.Equal(t, bls.SignatureSize, sig.SerializeSize())\n}\n\nfunc TestVerifyingSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tmsg := []byte(\"pactus\")\n\n\tpb1, pv1 := ts.RandBLSKeyPair()\n\tpb2, pv2 := ts.RandBLSKeyPair()\n\tsig1 := pv1.Sign(msg)\n\tsig2 := pv2.Sign(msg)\n\n\tassert.False(t, sig1.EqualsTo(sig2))\n\trequire.NoError(t, pb1.Verify(msg, sig1))\n\trequire.NoError(t, pb2.Verify(msg, sig2))\n\trequire.ErrorIs(t, pb1.Verify(msg, sig2), crypto.ErrInvalidSignature)\n\trequire.ErrorIs(t, pb2.Verify(msg, sig1), crypto.ErrInvalidSignature)\n\trequire.ErrorIs(t, pb1.Verify(msg[1:], sig1), crypto.ErrInvalidSignature)\n}\n\nfunc TestSignatureFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tbytes   []byte\n\t}{\n\t\t{\n\t\t\t\"encoding/hex: invalid byte: U+006E 'n'\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 0\",\n\t\t\t\"\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"encoding/hex: odd length hex string\",\n\t\t\t\"0\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 1\",\n\t\t\t\"00\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"ad0f88cec815e9b8af3f0136297cb242ed8b6369af723fbdac077fa927f5780db7df47c77fb53f3a22324673f000c792\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0xad, 0x0f, 0x88, 0xce, 0xc8, 0x15, 0xe9, 0xb8, 0xaf, 0x3f, 0x01, 0x36, 0x29, 0x7c, 0xb2, 0x42,\n\t\t\t\t0xed, 0x8b, 0x63, 0x69, 0xaf, 0x72, 0x3f, 0xbd, 0xac, 0x07, 0x7f, 0xa9, 0x27, 0xf5, 0x78, 0x0d,\n\t\t\t\t0xb7, 0xdf, 0x47, 0xc7, 0x7f, 0xb5, 0x3f, 0x3a, 0x22, 0x32, 0x46, 0x73, 0xf0, 0x00, 0xc7, 0x92,\n\t\t\t},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tsig, err := bls.SignatureFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.bytes, sig.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, tt.encoded, sig.String(), \"test %v: invalid encode\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n\nfunc TestPointG1(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t}{\n\t\t{\n\t\t\t\"short buffer\",\n\t\t\t\"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"invalid point encoding\",\n\t\t\t\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"invalid public key\",\n\t\t\t\"c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tfalse,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"ad0f88cec815e9b8af3f0136297cb242ed8b6369af723fbdac077fa927f5780db7df47c77fb53f3a22324673f000c792\",\n\t\t\ttrue,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tsig, err := bls.SignatureFromString(tt.encoded)\n\t\trequire.NoError(t, err)\n\n\t\t_, err = sig.PointG1()\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/bls/validator_key.go",
    "content": "package bls\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\n// ValidatorKey wraps a BLS private key, caching its public key and validator address.\ntype ValidatorKey struct {\n\taddress    crypto.Address\n\tpublicKey  *PublicKey\n\tprivateKey *PrivateKey\n}\n\nfunc NewValidatorKey(prv *PrivateKey) *ValidatorKey {\n\tpub := prv.PublicKeyNative()\n\n\treturn &ValidatorKey{\n\t\tprivateKey: prv,\n\t\tpublicKey:  pub,\n\t\taddress:    pub.ValidatorAddress(),\n\t}\n}\n\nfunc (key *ValidatorKey) Address() crypto.Address {\n\treturn key.address\n}\n\nfunc (key *ValidatorKey) PublicKey() *PublicKey {\n\treturn key.publicKey\n}\n\nfunc (key *ValidatorKey) PrivateKey() *PrivateKey {\n\treturn key.privateKey\n}\n\nfunc (key *ValidatorKey) Sign(data []byte) *Signature {\n\treturn key.privateKey.SignNative(data)\n}\n"
  },
  {
    "path": "crypto/bls/validator_key_test.go",
    "content": "package bls_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestValidatorKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, prv := ts.RandBLSKeyPair()\n\tvalKey := bls.NewValidatorKey(prv)\n\tsig := valKey.Sign([]byte(\"foo\"))\n\n\tassert.Equal(t, prv, valKey.PrivateKey())\n\tassert.Equal(t, pub, valKey.PublicKey())\n\tassert.Equal(t, pub.ValidatorAddress(), valKey.Address())\n\trequire.NoError(t, pub.Verify([]byte(\"foo\"), sig))\n}\n"
  },
  {
    "path": "crypto/crypto.go",
    "content": "package crypto\n\nvar (\n\t// AddressHRP is the Human Readable Part (HRP) for address.\n\tAddressHRP = \"pc\"\n\t// PublicKeyHRP is the Human Readable Part (HRP) for public key.\n\tPublicKeyHRP = \"public\"\n\t// PrivateKeyHRP is the Human Readable Part (HRP) for private key.\n\tPrivateKeyHRP = \"secret\"\n\t// XPublicKeyHRP is the Human Readable Part (HRP) for extended public key.\n\tXPublicKeyHRP = \"xpublic\"\n\t// XPrivateKeyHRP is the Human Readable Part (HRP) for extended private key.\n\tXPrivateKeyHRP = \"xsecret\"\n)\n\n// ToTestnetHRP makes HRPs testnet specified.\nfunc ToTestnetHRP() {\n\tAddressHRP = \"tpc\"\n\tPublicKeyHRP = \"tpublic\"\n\tPrivateKeyHRP = \"tsecret\"\n\tXPublicKeyHRP = \"txpublic\"\n\tXPrivateKeyHRP = \"txsecret\"\n}\n\n// ToMainnetHRP makes HRPs mainnet specified.\nfunc ToMainnetHRP() {\n\tAddressHRP = \"pc\"\n\tPublicKeyHRP = \"public\"\n\tPrivateKeyHRP = \"secret\"\n\tXPublicKeyHRP = \"xpublic\"\n\tXPrivateKeyHRP = \"xsecret\"\n}\n"
  },
  {
    "path": "crypto/ed25519/ed25519.go",
    "content": "// Package ed25519 provides Ed25519 signature primitives for Pactus.\n//\n// It implements EdDSA over the Twisted Edwards curve Ed25519 as specified in\n// RFC 8032. The package exposes PrivateKey, PublicKey, and Signature types as\n// the main API, along with deterministic signing and verification.\npackage ed25519\n"
  },
  {
    "path": "crypto/ed25519/ed25519_test.go",
    "content": "package ed25519_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSigning(t *testing.T) {\n\tmsg := []byte(\"pactus\")\n\tprv, _ := ed25519.PrivateKeyFromString(\n\t\t\"SECRET1R3K02X58V70X9RFVWN5QUN0CKHKYXWD7R40G3HX47L8W9HXJQHMASKGEPH2\")\n\tpub, _ := ed25519.PublicKeyFromString(\n\t\t\"public1rd5p573yq3j5wkvnasslqa7ne5vw87qcj5a0wlwxcj2t2xlaca9lstzm8u5\")\n\tsig, _ := ed25519.SignatureFromString(\n\t\t\"d444363761156890e781e73ae545951826d640a9d5ba44effa67fd5a77fad92a\" +\n\t\t\t\"fb3d46f82a86c7d283d7713e72bbd8ed39e7ac505d996f4f214e39b0a3b95f0a\")\n\taddr, _ := crypto.AddressFromString(\"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\")\n\n\tsig1 := prv.Sign(msg)\n\tassert.Equal(t, sig.Bytes(), sig1.Bytes())\n\trequire.NoError(t, pub.Verify(msg, sig))\n\tassert.Equal(t, pub, prv.PublicKey())\n\tassert.Equal(t, addr, pub.AccountAddress())\n}\n\n// TestEd25519S ensures that the implementation of the Ed25519 signature scheme\n// conforms to the specifications outlined in RFC8032. We are using test vectors\n// to verify that the signature generation and verification work as intended:\n// https://www.rfc-editor.org/rfc/rfc8032.txt\nfunc TestEd25519S(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tsk  string\n\t\tpk  string\n\t\tmsg string\n\t\tsig string\n\t}{\n\t\t{\n\t\t\t\"9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60\",\n\t\t\t\"d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a\",\n\t\t\t\"\", // MESSAGE (length 0 bytes)\n\t\t\t\"e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e06522490155\" +\n\t\t\t\t\"5fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b\",\n\t\t},\n\n\t\t{\n\t\t\t\"4ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb\",\n\t\t\t\"3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c\",\n\t\t\t\"72\", // MESSAGE (length 1 byte)\n\t\t\t\"92a009a9f0d4cab8720e820b5f642540a2b27b5416503f8fb3762223ebdb69da\" +\n\t\t\t\t\"085ac1e43e15996e458f3613d0f11d8c387b2eaeb4302aeeb00d291612bb0c00\",\n\t\t},\n\n\t\t{\n\t\t\t\"c5aa8df43f9f837bedb7442f31dcb7b166d38535076f094b85ce3a2e0b4458f7\",\n\t\t\t\"fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025\",\n\t\t\t\"af82\", // MESSAGE (length 2 bytes)\n\t\t\t\"6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac\" +\n\t\t\t\t\"18ff9b538d16f290ae67f760984dc6594a7c15e9716ed28dc027beceea1ec40a\",\n\t\t},\n\n\t\t{\n\t\t\t\"f5e5767cf153319517630f226876b86c8160cc583bc013744c6bf255f5cc0ee5\",\n\t\t\t\"278117fc144c72340f67d0f2316e8386ceffbf2b2428c9c51fef7c597f1d426e\",\n\t\t\t\"08b8b2b733424243760fe426a4b54908632110a66c2f6591eabd3345e3e4eb98\" + // MESSAGE (length 1023 bytes)\n\t\t\t\t\"fa6e264bf09efe12ee50f8f54e9f77b1e355f6c50544e23fb1433ddf73be84d8\" +\n\t\t\t\t\"79de7c0046dc4996d9e773f4bc9efe5738829adb26c81b37c93a1b270b20329d\" +\n\t\t\t\t\"658675fc6ea534e0810a4432826bf58c941efb65d57a338bbd2e26640f89ffbc\" +\n\t\t\t\t\"1a858efcb8550ee3a5e1998bd177e93a7363c344fe6b199ee5d02e82d522c4fe\" +\n\t\t\t\t\"ba15452f80288a821a579116ec6dad2b3b310da903401aa62100ab5d1a36553e\" +\n\t\t\t\t\"06203b33890cc9b832f79ef80560ccb9a39ce767967ed628c6ad573cb116dbef\" +\n\t\t\t\t\"efd75499da96bd68a8a97b928a8bbc103b6621fcde2beca1231d206be6cd9ec7\" +\n\t\t\t\t\"aff6f6c94fcd7204ed3455c68c83f4a41da4af2b74ef5c53f1d8ac70bdcb7ed1\" +\n\t\t\t\t\"85ce81bd84359d44254d95629e9855a94a7c1958d1f8ada5d0532ed8a5aa3fb2\" +\n\t\t\t\t\"d17ba70eb6248e594e1a2297acbbb39d502f1a8c6eb6f1ce22b3de1a1f40cc24\" +\n\t\t\t\t\"554119a831a9aad6079cad88425de6bde1a9187ebb6092cf67bf2b13fd65f270\" +\n\t\t\t\t\"88d78b7e883c8759d2c4f5c65adb7553878ad575f9fad878e80a0c9ba63bcbcc\" +\n\t\t\t\t\"2732e69485bbc9c90bfbd62481d9089beccf80cfe2df16a2cf65bd92dd597b07\" +\n\t\t\t\t\"07e0917af48bbb75fed413d238f5555a7a569d80c3414a8d0859dc65a46128ba\" +\n\t\t\t\t\"b27af87a71314f318c782b23ebfe808b82b0ce26401d2e22f04d83d1255dc51a\" +\n\t\t\t\t\"ddd3b75a2b1ae0784504df543af8969be3ea7082ff7fc9888c144da2af58429e\" +\n\t\t\t\t\"c96031dbcad3dad9af0dcbaaaf268cb8fcffead94f3c7ca495e056a9b47acdb7\" +\n\t\t\t\t\"51fb73e666c6c655ade8297297d07ad1ba5e43f1bca32301651339e22904cc8c\" +\n\t\t\t\t\"42f58c30c04aafdb038dda0847dd988dcda6f3bfd15c4b4c4525004aa06eeff8\" +\n\t\t\t\t\"ca61783aacec57fb3d1f92b0fe2fd1a85f6724517b65e614ad6808d6f6ee34df\" +\n\t\t\t\t\"f7310fdc82aebfd904b01e1dc54b2927094b2db68d6f903b68401adebf5a7e08\" +\n\t\t\t\t\"d78ff4ef5d63653a65040cf9bfd4aca7984a74d37145986780fc0b16ac451649\" +\n\t\t\t\t\"de6188a7dbdf191f64b5fc5e2ab47b57f7f7276cd419c17a3ca8e1b939ae49e4\" +\n\t\t\t\t\"88acba6b965610b5480109c8b17b80e1b7b750dfc7598d5d5011fd2dcc5600a3\" +\n\t\t\t\t\"2ef5b52a1ecc820e308aa342721aac0943bf6686b64b2579376504ccc493d97e\" +\n\t\t\t\t\"6aed3fb0f9cd71a43dd497f01f17c0e2cb3797aa2a2f256656168e6c496afc5f\" +\n\t\t\t\t\"b93246f6b1116398a346f1a641f3b041e989f7914f90cc2c7fff357876e506b5\" +\n\t\t\t\t\"0d334ba77c225bc307ba537152f3f1610e4eafe595f6d9d90d11faa933a15ef1\" +\n\t\t\t\t\"369546868a7f3a45a96768d40fd9d03412c091c6315cf4fde7cb68606937380d\" +\n\t\t\t\t\"b2eaaa707b4c4185c32eddcdd306705e4dc1ffc872eeee475a64dfac86aba41c\" +\n\t\t\t\t\"0618983f8741c5ef68d3a101e8a3b8cac60c905c15fc910840b94c00a0b9d0\",\n\n\t\t\t\"0aab4c900501b3e24d7cdf4663326a3a87df5e4843b2cbdb67cbf6e460fec350\" +\n\t\t\t\t\"aa5371b1508f9f4528ecea23c436d94b5e8fcd4f681e30a6ac00a9704a188a03\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tprivateKey, _ := ed25519.PrivateKeyFromBytes(ts.DecodingHex(tt.sk))\n\t\texpectedPublicKey, _ := ed25519.PublicKeyFromBytes(ts.DecodingHex(tt.pk))\n\t\tmsg := ts.DecodingHex(tt.msg)\n\t\texpectedSig, _ := ed25519.SignatureFromString(tt.sig)\n\t\tsig := privateKey.Sign(msg)\n\n\t\tassert.Equal(t, expectedSig, sig)\n\t\tassert.Equal(t, expectedPublicKey, privateKey.PublicKey())\n\t}\n}\n"
  },
  {
    "path": "crypto/ed25519/errors.go",
    "content": "package ed25519\n"
  },
  {
    "path": "crypto/ed25519/hdkeychain/errors.go",
    "content": "package hdkeychain\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// ErrInvalidSeedLen describes an error in which the provided seed or\n\t// seed length is not in the allowed range.\n\tErrInvalidSeedLen = fmt.Errorf(\"seed length must be between %d and %d \"+\n\t\t\"bits\", MinSeedBytes*8, MaxSeedBytes*8)\n\n\t// ErrInvalidKeyData describes an error in which the provided key is\n\t// not valid.\n\tErrInvalidKeyData = errors.New(\"key data is invalid\")\n\n\t// ErrInvalidHRP describes an error in which the HRP is not valid.\n\tErrInvalidHRP = errors.New(\"HRP is invalid\")\n\n\t// ErrNonHardenedPath is returned when a non-hardened derivation path is used,\n\t// which is not supported by ed25519.\n\tErrNonHardenedPath = errors.New(\"non-hardened derivation not supported\")\n)\n"
  },
  {
    "path": "crypto/ed25519/hdkeychain/extendedkey.go",
    "content": "package hdkeychain\n\n// References:\n//  SLIP-0010: Universal private key derivation from master private key\n//  https://github.com/satoshilabs/slips/blob/master/slip-0010.md\n\nimport (\n\t\"bytes\"\n\t\"crypto/ed25519\"\n\t\"crypto/hmac\"\n\t\"crypto/rand\"\n\t\"crypto/sha512\"\n\t\"encoding/binary\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nconst (\n\t// hardenedKeyStart is the index at which a hardened key starts.\n\thardenedKeyStart = uint32(0x80000000) // 2^31\n\n\t// MinSeedBytes is the minimum number of bytes allowed for a seed to\n\t// a master node.\n\tMinSeedBytes = 16 // 128 bits\n\n\t// MaxSeedBytes is the maximum number of bytes allowed for a seed to\n\t// a master node.\n\tMaxSeedBytes = 64 // 512 bits\n)\n\n// ExtendedKey houses all the information needed to support a hierarchical\n// deterministic extended key.\ntype ExtendedKey struct {\n\tkey       []byte // This will be the bytes of extended public or private key\n\tchainCode []byte\n\tpath      []uint32\n}\n\n// newExtendedKey returns a new instance of an extended key with the given\n// fields. No error checking is performed here as it's only intended to be a\n// convenience method used to create a populated struct.\nfunc newExtendedKey(key, chainCode []byte, path []uint32) *ExtendedKey {\n\treturn &ExtendedKey{\n\t\tkey:       key,\n\t\tchainCode: chainCode,\n\t\tpath:      path,\n\t}\n}\n\n// DerivePath returns a derived child extended key from this master key at the\n// given path.\nfunc (k *ExtendedKey) DerivePath(path []uint32) (*ExtendedKey, error) {\n\text := k\n\tvar err error\n\tfor _, index := range path {\n\t\text, err = ext.Derive(index)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn ext, nil\n}\n\n// Derive returns a derived child extended key at the given index.\n//\n// For ed25519 and curve25519 the private keys are no longer multipliers for the group generator;\n// instead the hash of the private key is the multiplier.\n// For this reason, our scheme for ed25519 and curve25519 does not support public key derivation and\n// uses the produced hashes directly as private keys.\nfunc (k *ExtendedKey) Derive(index uint32) (*ExtendedKey, error) {\n\tisChildHardened := index >= hardenedKeyStart\n\n\tif !isChildHardened {\n\t\treturn nil, ErrNonHardenedPath\n\t}\n\n\t// Calculate derive Data:\n\t//   Data = 0x00 || ser_256(k_par) || ser_32(i)\n\tindexData := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(indexData, index)\n\n\tdata := make([]byte, 0, 37)\n\tdata = append(data, 0x00)\n\tdata = append(data, k.key...)\n\tdata = append(data, indexData...)\n\n\t// Take the HMAC-SHA512 of the current key's chain code and the derived\n\t// data:\n\t//   I = HMAC-SHA512(Key = chainCode, Data = data)\n\thmac512 := hmac.New(sha512.New, k.chainCode)\n\t_, _ = hmac512.Write(data)\n\tilr := hmac512.Sum(nil)\n\n\t// Split I into two 32-byte sequences, IL and IR.\n\t// The returned chain code ci is IR.\n\t// The returned child key ki is IL.\n\tchildChainCode := ilr[32:]\n\tchildKey := ilr[:32]\n\n\tnewPath := make([]uint32, 0, len(k.path)+1)\n\tnewPath = append(newPath, k.path...)\n\tnewPath = append(newPath, index)\n\n\treturn newExtendedKey(childKey, childChainCode, newPath), nil\n}\n\n// Path returns the path of derived key.\n//\n// Path values are always between 2^31 and 2^32-1 as they are hardened keys.\nfunc (k *ExtendedKey) Path() []uint32 {\n\treturn k.path\n}\n\n// RawPrivateKey returns the raw bytes of the private key.\nfunc (k *ExtendedKey) RawPrivateKey() []byte {\n\treturn k.key\n}\n\n// RawPublicKey returns the raw bytes of the public key.\nfunc (k *ExtendedKey) RawPublicKey() []byte {\n\tpub := ed25519.NewKeyFromSeed(k.key).Public()\n\n\treturn pub.(ed25519.PublicKey)[:]\n}\n\n// String returns the extended key as a bech32-encoded string.\nfunc (k *ExtendedKey) String() string {\n\t//\n\t// The serialized format is structured as follows:\n\t// +-------+---------+------------+----------+------------+----------+\n\t// | Depth | Path    | Chain code | Reserved | Key length | Key data |\n\t// +-------+---------+------------+----------+------------+----------+\n\t// | 1     | depth*4 | 32         | 1        | 1          | 32       |\n\t// +-------+---------+------------+----------+------------+----------+\n\t//\n\t// Description:\n\t// - Depth: 1 byte representing the depth of derivation path.\n\t// - Path: serialized BIP-32 path; each entry is encoded as 32-bit unsigned integer, least significant byte first\n\t// - Chain code: 32 bytes chain code\n\t// - Reserved: 1 byte reserved and should set to 0.\n\t// - Key length: 1 byte representing the length of the key data that is 32.\n\t// - Key data: The key data that is 32 bytes.\n\t//\n\n\tbuf := bytes.NewBuffer(make([]byte, 0))\n\terr := encoding.WriteElement(buf, byte(len(k.path)))\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\tfor _, p := range k.path {\n\t\terr := encoding.WriteElement(buf, p)\n\t\tif err != nil {\n\t\t\treturn err.Error()\n\t\t}\n\t}\n\terr = encoding.WriteVarBytes(buf, k.chainCode)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\terr = encoding.WriteElement(buf, uint8(0))\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\terr = encoding.WriteVarBytes(buf, k.key)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\tstr, err := bech32m.EncodeFromBase256WithType(crypto.XPrivateKeyHRP, crypto.SignatureTypeEd25519, buf.Bytes())\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\n\tstr = strings.ToUpper(str)\n\n\treturn str\n}\n\n// NewKeyFromString returns a new extended key instance from a bech32-encoded string.\nfunc NewKeyFromString(str string) (*ExtendedKey, error) {\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(strings.ToLower(str))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif typ != crypto.SignatureTypeEd25519 {\n\t\treturn nil, ErrInvalidKeyData\n\t}\n\n\tif hrp != crypto.XPrivateKeyHRP {\n\t\treturn nil, ErrInvalidHRP\n\t}\n\n\treader := bytes.NewReader(data)\n\tdepth := uint8(0)\n\terr = encoding.ReadElement(reader, &depth)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpath := make([]uint32, depth)\n\tfor i := byte(0); i < depth; i++ {\n\t\terr := encoding.ReadElement(reader, &path[i])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tchainCode, err := encoding.ReadVarBytes(reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar res uint8\n\terr = encoding.ReadElement(reader, &res)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tkey, err := encoding.ReadVarBytes(reader)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn newExtendedKey(key, chainCode, path), nil\n}\n\n// NewMaster creates a new master node for use in creating a hierarchical\n// deterministic key chain.  The seed must be between 128 and 512 bits and\n// should be generated by a cryptographically secure random generation source.\nfunc NewMaster(seed []byte) (*ExtendedKey, error) {\n\t// Per [BIP32], the seed must be in range [MinSeedBytes, MaxSeedBytes].\n\tif len(seed) < MinSeedBytes || len(seed) > MaxSeedBytes {\n\t\treturn nil, ErrInvalidSeedLen\n\t}\n\n\t// First take the HMAC-SHA512 of the master key and the seed data:\n\t//   I = HMAC-SHA512(Key = Curve, Data = Seed)\n\tcurve := []byte(\"ed25519 seed\")\n\thmac512 := hmac.New(sha512.New, curve)\n\t_, _ = hmac512.Write(seed)\n\tilr := hmac512.Sum(nil)\n\n\t// Split \"I\" into two 32-byte sequences Il and Ir where:\n\t//   Il = master key\n\t//   Ir = master chain code\n\tmasterChainCode := ilr[32:]\n\tmasterKey := ilr[:32]\n\n\treturn newExtendedKey(masterKey, masterChainCode, []uint32{}), nil\n}\n\n// GenerateSeed returns a cryptographically secure random seed that can be used\n// as the input for the NewMaster function to generate a new master node.\n//\n// The length is in bytes and it must be between 16 and 64 (128 to 512 bits).\n// The recommended length is 32 (256 bits) as defined by the RecommendedSeedLen\n// constant.\nfunc GenerateSeed(length uint8) ([]byte, error) {\n\t// Per [BIP32], the seed must be in range [MinSeedBytes, MaxSeedBytes].\n\tif length < MinSeedBytes || length > MaxSeedBytes {\n\t\treturn nil, ErrInvalidSeedLen\n\t}\n\n\tbuf := make([]byte, length)\n\t_, err := rand.Read(buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf, nil\n}\n"
  },
  {
    "path": "crypto/ed25519/hdkeychain/extendedkey_test.go",
    "content": "package hdkeychain\n\nimport (\n\t\"encoding/hex\"\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n// TestNonHardenedDerivation tests deriving a new key in non-hardened mode.\n// It should return an error.\nfunc TestNonHardenedDerivation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttestSeed := ts.RandBytes(32)\n\tpath := []uint32{\n\t\tts.RandUint32Max(hardenedKeyStart),\n\t}\n\n\tmasterKey, _ := NewMaster(testSeed)\n\t_, err := masterKey.DerivePath(path)\n\trequire.ErrorIs(t, err, ErrNonHardenedPath)\n}\n\n// TestHardenedDerivation tests derive key in hardened mode.\nfunc TestHardenedDerivation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttestSeed := ts.RandBytes(32)\n\tpath := []uint32{\n\t\tts.RandUint32Max(hardenedKeyStart) + hardenedKeyStart,\n\t}\n\n\tmasterKey, err := NewMaster(testSeed)\n\trequire.NoError(t, err)\n\n\textKey, err := masterKey.DerivePath(path)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, path, extKey.Path())\n}\n\n// TestDerivation verifies the derivation of new keys in hardened mode.\n// The test cases are based on the SLIP-0010 standard.\nfunc TestDerivation(t *testing.T) {\n\ttestSeed, _ := hex.DecodeString(\"000102030405060708090a0b0c0d0e0f\")\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tname    string\n\t\tpath    []uint32\n\t\twantPrv string\n\t\twantPub string\n\t}{\n\t\t{\n\t\t\tname:    \"derivation path: m\",\n\t\t\tpath:    []uint32{},\n\t\t\twantPrv: \"2b4be7f19ee27bbf30c667b642d5f4aa69fd169872f8fc3059c08ebae2eb19e7\",\n\t\t\twantPub: \"a4b2856bfec510abab89753fac1ac0e1112364e7d250545963f135f2a33188ed\",\n\t\t},\n\t\t{\n\t\t\tname:    \"derivation path: m/0H\",\n\t\t\tpath:    []uint32{h},\n\t\t\twantPrv: \"68e0fe46dfb67e368c75379acec591dad19df3cde26e63b93a8e704f1dade7a3\",\n\t\t\twantPub: \"8c8a13df77a28f3445213a0f432fde644acaa215fc72dcdf300d5efaa85d350c\",\n\t\t},\n\t\t{\n\t\t\tname:    \"derivation path: m/0H/1H\",\n\t\t\tpath:    []uint32{h, 1 + h},\n\t\t\twantPrv: \"b1d0bad404bf35da785a64ca1ac54b2617211d2777696fbffaf208f746ae84f2\",\n\t\t\twantPub: \"1932a5270f335bed617d5b935c80aedb1a35bd9fc1e31acafd5372c30f5c1187\",\n\t\t},\n\t\t{\n\t\t\tname:    \"derivation path: m/0H/1H/2H\",\n\t\t\tpath:    []uint32{h, 1 + h, 2 + h},\n\t\t\twantPrv: \"92a5b23c0b8a99e37d07df3fb9966917f5d06e02ddbd909c7e184371463e9fc9\",\n\t\t\twantPub: \"ae98736566d30ed0e9d2f4486a64bc95740d89c7db33f52121f8ea8f76ff0fc1\",\n\t\t},\n\t\t{\n\t\t\tname:    \"derivation path: m/0H/1H/2H/2H\",\n\t\t\tpath:    []uint32{h, 1 + h, 2 + h, 2 + h},\n\t\t\twantPrv: \"30d1dc7e5fc04c31219ab25a27ae00b50f6fd66622f6e9c913253d6511d1e662\",\n\t\t\twantPub: \"8abae2d66361c879b900d204ad2cc4984fa2aa344dd7ddc46007329ac76c429c\",\n\t\t},\n\t\t{\n\t\t\tname:    \"derivation path: m/0H/1H/2H/2H/1000000000H\",\n\t\t\tpath:    []uint32{h, 1 + h, 2 + h, 2 + h, 1000000000 + h},\n\t\t\twantPrv: \"8f94d394a8e8fd6b1bc2f3f49f5c47e385281d5c17e65324b0f62483e37e8793\",\n\t\t\twantPub: \"3c24da049451555d51a7014a37337aa4e12d41e485abccfa46b47dfb2af54b7a\",\n\t\t},\n\t}\n\n\tmasterKey, _ := NewMaster(testSeed)\n\tfor no, tt := range tests {\n\t\textKey, err := masterKey.DerivePath(tt.path)\n\t\trequire.NoError(t, err)\n\n\t\tprivKey := extKey.RawPrivateKey()\n\t\trequire.Equal(t, tt.wantPrv, hex.EncodeToString(privKey),\n\t\t\t\"mismatched serialized private key for test #%v\", no+1)\n\n\t\tpubKey := extKey.RawPublicKey()\n\t\trequire.Equal(t, tt.wantPub, hex.EncodeToString(pubKey),\n\t\t\t\"mismatched serialized public key for test #%v\", no+1)\n\n\t\trequire.Equal(t, tt.path, extKey.Path())\n\t}\n}\n\n// TestGenerateSeed ensures the GenerateSeed function works as intended.\nfunc TestGenerateSeed(t *testing.T) {\n\ttests := []struct {\n\t\tname   string\n\t\tlength uint8\n\t\terr    error\n\t}{\n\t\t// Test various valid lengths.\n\t\t{name: \"16 bytes\", length: 16},\n\t\t{name: \"17 bytes\", length: 17},\n\t\t{name: \"20 bytes\", length: 20},\n\t\t{name: \"32 bytes\", length: 32},\n\t\t{name: \"64 bytes\", length: 64},\n\n\t\t// Test invalid lengths.\n\t\t{name: \"15 bytes\", length: 15, err: ErrInvalidSeedLen},\n\t\t{name: \"65 bytes\", length: 65, err: ErrInvalidSeedLen},\n\t}\n\n\tfor no, tt := range tests {\n\t\tseed, err := GenerateSeed(tt.length)\n\t\trequire.ErrorIs(t, err, tt.err)\n\n\t\tif tt.err == nil {\n\t\t\tassert.Len(t, seed, int(tt.length),\n\t\t\t\t\"GenerateSeed #%d (%s): length mismatch -- got %d, want %d\",\n\t\t\t\tno+1, tt.name, len(seed), tt.length)\n\t\t}\n\t}\n}\n\n// TestNewMaster ensures the NewMaster function works as intended.\nfunc TestNewMaster(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tseed string\n\t\tkey  string\n\t\terr  error\n\t}{\n\t\t// Test various valid seeds.\n\t\t{\n\t\t\tname: \"16 bytes\",\n\t\t\tseed: \"000102030405060708090a0b0c0d0e0f\",\n\t\t\tkey:  \"2b4be7f19ee27bbf30c667b642d5f4aa69fd169872f8fc3059c08ebae2eb19e7\",\n\t\t},\n\t\t{\n\t\t\tname: \"32 bytes\",\n\t\t\tseed: \"3ddd5602285899a946114506157c7997e5444528f3003f6134712147db19b678\",\n\t\t\tkey:  \"4b36bc63a15797f4d506074f36f2f3904bc0f10179b5ab91183c167e9c2dcf0e\",\n\t\t},\n\t\t{\n\t\t\tname: \"64 bytes\",\n\t\t\tseed: \"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784\" +\n\t\t\t\t\"817e7b7875726f6c696663605d5a5754514e4b484542\",\n\t\t\tkey: \"171cb88b1b3c1db25add599712e36245d75bc65a1a5c9e18d76f9f2b1eab4012\",\n\t\t},\n\n\t\t// Test invalid seeds.\n\t\t{\n\t\t\tname: \"empty seed\",\n\t\t\tseed: \"\",\n\t\t\terr:  ErrInvalidSeedLen,\n\t\t},\n\t\t{\n\t\t\tname: \"15 bytes\",\n\t\t\tseed: \"000000000000000000000000000000\",\n\t\t\terr:  ErrInvalidSeedLen,\n\t\t},\n\t\t{\n\t\t\tname: \"65 bytes\",\n\t\t\tseed: \"000000000000000000000000000000000000000000000000000000000000000000000000000\" +\n\t\t\t\t\"0000000000000000000000000000000000000000000000000000000\",\n\t\t\terr: ErrInvalidSeedLen,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tseed, _ := hex.DecodeString(tt.seed)\n\t\textKey, err := NewMaster(seed)\n\t\trequire.ErrorIs(t, err, tt.err)\n\n\t\tif tt.err == nil {\n\t\t\tprivKey := extKey.RawPrivateKey()\n\t\t\tassert.Equal(t, tt.key, hex.EncodeToString(privKey),\n\t\t\t\t\"NewMaster #%d (%s): key mismatch -- got %x, want %s\",\n\t\t\t\tno+1, tt.name, privKey, tt.key)\n\t\t}\n\t}\n}\n\n// TestKeyToString ensures the String function works as intended.\n//\n//nolint:lll // long extended keys\nfunc TestKeyToString(t *testing.T) {\n\ttestSeed, _ := hex.DecodeString(\"000102030405060708090a0b0c0d0e0f\")\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tname      string\n\t\tpath      []uint32\n\t\twantXPriv string\n\t}{\n\t\t{\n\t\t\tname:      \"derivation path: m\",\n\t\t\tpath:      []uint32{},\n\t\t\twantXPriv: \"XSECRET1RQQSFQPR2J0098Q989D0Y2QG8FPT86H4Q9WLK2GHE08S9CRVD3J5LL7CQYQ45HEL3NM38H0ESCENMVSK47J4XNLGKNPE03LPST8QGAWHZAVV7WQ3TTQ3\",\n\t\t},\n\t\t{\n\t\t\tname:      \"derivation path: m/0H\",\n\t\t\tpath:      []uint32{h},\n\t\t\twantXPriv: \"XSECRET1RQYQQQQYQYZ94N2S38Q9KYN5P2PAZ0LKA5K075MGTW7D80ZGC5T7NTY8PD6WXJQPQDRS0U3KLKELRDRR4X7DVA3V3MTGEMU7DUFHX8WF63ECY78DDU73SSP8VGW\",\n\t\t},\n\t\t{\n\t\t\tname:      \"derivation path: m/0H/1H\",\n\t\t\tpath:      []uint32{h, 1 + h},\n\t\t\twantXPriv: \"XSECRET1RQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2QQG936ZADGP9LXHD8SKNYEGDV2JEXZUS36FMHD9HML7HJPRM5DT5Y7GG0AYKR\",\n\t\t},\n\t\t{\n\t\t\tname:      \"derivation path: m/0H/1H/2H\",\n\t\t\tpath:      []uint32{h, 1 + h, 2 + h},\n\t\t\twantXPriv: \"XSECRET1RQVQQQQYQQYQQPQQZQQQGQGPWDXFFUQ944VJS7JWRLVWP9UJJME876TQAHZPCWZ22P7XYE8XDDSQZPY49KG7QHZ5EUD7S0HELHXTXJ9L46PHQ9HDAJZW8UXZRW9RRA87FNLUP3Y\",\n\t\t},\n\t\t{\n\t\t\tname:      \"derivation path: m/0H/1H/2H/2H\",\n\t\t\tpath:      []uint32{h, 1 + h, 2 + h, 2 + h},\n\t\t\twantXPriv: \"XSECRET1RQSQQQQYQQYQQPQQZQQQGQQSQQZQZPRMDSLUN6AGWPM7VMGQH6E32RVC6YEHY5M6EJWC47HQLQLM5M4WVQQSRP5WU0E0UQNP3YXDTYK384CQT2RM06ENZ9AHFEYFJ20T9Z8G7VCSW77AAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"derivation path: m/0H/1H/2H/2H/1000000000H\",\n\t\t\tpath:      []uint32{h, 1 + h, 2 + h, 2 + h, 1000000000 + h},\n\t\t\twantXPriv: \"XSECRET1RQ5QQQQYQQYQQPQQZQQQGQQSQQZQQPJ56HVSXS7YEYWSV4SKDTG53W2J8TL57P7C5E44DKKKE3GL6WQENU7H6YVQQYZ8EF5U54R5066CMCTELF86UGL3C22QATST7V5EYKRMZFQLR06REXGPVGYE\",\n\t\t},\n\t}\n\n\tmasterKey, _ := NewMaster(testSeed)\n\tfor no, tt := range tests {\n\t\textKey, _ := masterKey.DerivePath(tt.path)\n\t\trequire.Equal(t, tt.wantXPriv, extKey.String(), \"test %d failed\", no)\n\n\t\trecoveredExtKey, err := NewKeyFromString(tt.wantXPriv)\n\t\trequire.NoError(t, err)\n\n\t\trequire.Equal(t, extKey, recoveredExtKey)\n\t\trequire.Equal(t, tt.path, recoveredExtKey.path)\n\t}\n}\n\n// TestInvalidString checks errors corresponding to the invalid strings\n//\n//nolint:lll // long extended private keys\nfunc TestInvalidString(t *testing.T) {\n\ttests := []struct {\n\t\tdesc          string\n\t\tstr           string\n\t\texpectedError error\n\t}{\n\t\t{\n\t\t\tdesc:          \"invalid checksum\",\n\t\t\tstr:           \"XSECRET1RQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2QQG936ZADGP9LXHD8SKNYEGDV2JEXZUS36FMHD9HML7HJPRM5DT5Y7GG0AYRK\",\n\t\t\texpectedError: bech32m.InvalidChecksumError{Expected: \"g0aykr\", Actual: \"g0ayrk\"},\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no depth\",\n\t\t\tstr:           \"XSECRET1RFK28CY\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"wrong path\",\n\t\t\tstr:           \"XSECRET1RQGQQQQYQ6EJ6DE\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no chain code\",\n\t\t\tstr:           \"XSECRET1RQGQQQQYQQYQQPQQ98TS98\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no reserved\",\n\t\t\tstr:           \"XSECRET1RQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2Q8GUZZJ\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"no key\",\n\t\t\tstr:           \"XSECRET1RQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2QQ85HSJA\",\n\t\t\texpectedError: io.EOF,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid type\",\n\t\t\tstr:           \"XSECRET1YQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2QQG936ZADGP9LXHD8SKNYEGDV2JEXZUS36FMHD9HML7HJPRM5DT5Y7GTKSQQT\",\n\t\t\texpectedError: ErrInvalidKeyData,\n\t\t},\n\t\t{\n\t\t\tdesc:          \"invalid hrp\",\n\t\t\tstr:           \"SECRET1RQGQQQQYQQYQQPQPQ5VSYYHMH6X6UY5Z6DVDJWWPTXUMGAEJQUD2HCV25Z6QPYS649U2QQG936ZADGP9LXHD8SKNYEGDV2JEXZUS36FMHD9HML7HJPRM5DT5Y7GYQ7VAT\",\n\t\t\texpectedError: ErrInvalidHRP,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\t_, err := NewKeyFromString(tt.str)\n\t\trequire.ErrorIs(t, err, tt.expectedError, \"test %d error is not matched\", no)\n\t}\n}\n"
  },
  {
    "path": "crypto/ed25519/private_key.go",
    "content": "package ed25519\n\nimport (\n\t\"crypto/ed25519\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n)\n\nvar _ crypto.PrivateKey = &PrivateKey{}\n\nconst PrivateKeySize = 32\n\ntype PrivateKey struct {\n\tinner ed25519.PrivateKey\n}\n\n// PrivateKeyFromString decodes the input string and returns the PrivateKey\n// if the string is a valid bech32m encoding of a Ed25519 public key.\nfunc PrivateKeyFromString(text string) (*PrivateKey, error) {\n\t// Decode the bech32m encoded private key.\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Check if hrp is valid\n\tif hrp != crypto.PrivateKeyHRP {\n\t\treturn nil, crypto.InvalidHRPError(hrp)\n\t}\n\n\tif typ != crypto.SignatureTypeEd25519 {\n\t\treturn nil, crypto.InvalidSignatureTypeError(typ)\n\t}\n\n\treturn PrivateKeyFromBytes(data)\n}\n\n// PrivateKeyFromBytes constructs a ED25519 private key from the raw bytes.\nfunc PrivateKeyFromBytes(data []byte) (*PrivateKey, error) {\n\tif len(data) != PrivateKeySize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\tinner := ed25519.NewKeyFromSeed(data)\n\n\treturn &PrivateKey{inner}, nil\n}\n\n// String returns a human-readable string for the ED25519 private key.\nfunc (prv *PrivateKey) String() string {\n\tstr, _ := bech32m.EncodeFromBase256WithType(\n\t\tcrypto.PrivateKeyHRP,\n\t\tcrypto.SignatureTypeEd25519,\n\t\tprv.Bytes())\n\n\treturn strings.ToUpper(str)\n}\n\n// Bytes return the raw bytes of the private key.\nfunc (prv *PrivateKey) Bytes() []byte {\n\treturn prv.inner[:PrivateKeySize]\n}\n\n// Sign calculates the signature from the private key and given message.\n// It's defined in section 2.6 of the spec: CoreSign.\nfunc (prv *PrivateKey) Sign(msg []byte) crypto.Signature {\n\treturn prv.SignNative(msg)\n}\n\nfunc (prv *PrivateKey) SignNative(msg []byte) *Signature {\n\tsig := ed25519.Sign(prv.inner, msg)\n\n\treturn &Signature{\n\t\tdata: sig,\n\t}\n}\n\nfunc (prv *PrivateKey) PublicKeyNative() *PublicKey {\n\tpub := prv.inner.Public()\n\n\t// TODO: fix me, should get from scalar multiplication.\n\treturn &PublicKey{\n\t\tinner: pub.(ed25519.PublicKey),\n\t}\n}\n\nfunc (prv *PrivateKey) PublicKey() crypto.PublicKey {\n\treturn prv.PublicKeyNative()\n}\n\nfunc (prv *PrivateKey) EqualsTo(x crypto.PrivateKey) bool {\n\txEd25519, ok := x.(*PrivateKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn prv.inner.Equal(xEd25519.inner)\n}\n"
  },
  {
    "path": "crypto/ed25519/private_key_test.go",
    "content": "package ed25519_test\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestPrivateKeyEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv1 := ts.RandEd25519KeyPair()\n\t_, prv2 := ts.RandEd25519KeyPair()\n\t_, prv3 := ts.RandBLSKeyPair()\n\n\tassert.True(t, prv1.EqualsTo(prv1))\n\tassert.False(t, prv1.EqualsTo(prv2))\n\tassert.False(t, prv1.EqualsTo(prv3))\n}\n\nfunc TestPrivateKeyFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tresult  []byte\n\t}{\n\t\t{\n\t\t\t\"invalid separator index -1\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid checksum (expected uuk3y0 got uuk30y)\",\n\t\t\t\"SECRET1RYY62A96X25ZAL4DPL5Z63G83GCSFCCQ7K0CMQD3MFNLYK3A6R26QUUK30Y\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid HRP: xxx\",\n\t\t\t\"XXX1RYY62A96X25ZAL4DPL5Z63G83GCSFCCQ7K0CMQD3MFNLYK3A6R26Q8JXUV6\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid signature type: 4\",\n\t\t\t\"SECRET1YVKPE43FDU9TC4C8LPFD4JY9METET3GEKQE7E7ECK4EJYV20WVAPQZCU0KL\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 31\",\n\t\t\t\"SECRET1RDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CCPV3HNE\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"SECRET1RJ6STNTA7Y3P2QLQF8A6QCX05F2H5TFNE5RSH066KZME4WVFXKE7QW097LG\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0x96, 0xa0, 0xb9, 0xaf, 0xbe, 0x24, 0x42, 0xa0, 0x7c, 0x09, 0x3f, 0x74, 0x0c, 0x19, 0xf4, 0x4a,\n\t\t\t\t0xaf, 0x45, 0xa6, 0x79, 0xa0, 0xe1, 0x77, 0xeb, 0x56, 0x16, 0xf3, 0x57, 0x31, 0x26, 0xb6, 0x7c,\n\t\t\t},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tprv, err := ed25519.PrivateKeyFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.result, prv.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, strings.ToUpper(tt.encoded), prv.String(), \"test %v: invalid encoded\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/ed25519/public_key.go",
    "content": "package ed25519\n\nimport (\n\t\"bytes\"\n\t\"crypto/ed25519\"\n\t\"io\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util/bech32m\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nvar _ crypto.PublicKey = &PublicKey{}\n\nconst PublicKeySize = 32\n\ntype PublicKey struct {\n\tinner ed25519.PublicKey\n}\n\n// PublicKeyFromString decodes the input string and returns the PublicKey\n// if the string is a valid bech32m encoding of a Ed25519 public key.\nfunc PublicKeyFromString(text string) (*PublicKey, error) {\n\t// Decode the bech32m encoded public key.\n\thrp, typ, data, err := bech32m.DecodeToBase256WithTypeNoLimit(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Check if hrp is valid\n\tif hrp != crypto.PublicKeyHRP {\n\t\treturn nil, crypto.InvalidHRPError(hrp)\n\t}\n\n\tif typ != crypto.SignatureTypeEd25519 {\n\t\treturn nil, crypto.InvalidSignatureTypeError(typ)\n\t}\n\n\treturn PublicKeyFromBytes(data)\n}\n\n// PublicKeyFromBytes constructs a Ed25519 public key from the raw bytes.\nfunc PublicKeyFromBytes(data []byte) (*PublicKey, error) {\n\tif len(data) != PublicKeySize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\n\treturn &PublicKey{data}, nil\n}\n\n// Bytes returns the raw byte representation of the public key.\nfunc (pub *PublicKey) Bytes() []byte {\n\treturn pub.inner\n}\n\n// String returns a human-readable string for the Ed25519 public key.\nfunc (pub *PublicKey) String() string {\n\tstr, _ := bech32m.EncodeFromBase256WithType(\n\t\tcrypto.PublicKeyHRP,\n\t\tcrypto.SignatureTypeEd25519,\n\t\tpub.Bytes())\n\n\treturn str\n}\n\n// MarshalCBOR encodes the public key into CBOR format.\nfunc (pub *PublicKey) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(pub.Bytes())\n}\n\n// UnmarshalCBOR decodes the public key from CBOR format.\nfunc (pub *PublicKey) UnmarshalCBOR(bs []byte) error {\n\tvar data []byte\n\tif err := cbor.Unmarshal(bs, &data); err != nil {\n\t\treturn err\n\t}\n\n\treturn pub.Decode(bytes.NewReader(data))\n}\n\n// Encode writes the raw bytes of the public key to the provided writer.\nfunc (pub *PublicKey) Encode(w io.Writer) error {\n\treturn encoding.WriteElements(w, pub.Bytes())\n}\n\n// Decode reads the raw bytes of the public key from the provided reader and initializes the public key.\nfunc (pub *PublicKey) Decode(r io.Reader) error {\n\tdata := make([]byte, PublicKeySize)\n\terr := encoding.ReadElements(r, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tp, _ := PublicKeyFromBytes(data)\n\t*pub = *p\n\n\treturn nil\n}\n\nfunc (*PublicKey) SerializeSize() int {\n\treturn PublicKeySize\n}\n\n// Verify checks that a signature is valid for the given message and public key.\n// It's defined in section 2.6 of the spec: CoreVerify.\nfunc (pub *PublicKey) Verify(msg []byte, sig crypto.Signature) error {\n\tif sig == nil {\n\t\treturn crypto.ErrInvalidPublicKey\n\t}\n\n\tif !ed25519.Verify(pub.inner, msg, sig.Bytes()) {\n\t\treturn crypto.ErrInvalidSignature\n\t}\n\n\treturn nil\n}\n\n// EqualsTo checks if the current public key is equal to another public key.\nfunc (pub *PublicKey) EqualsTo(x crypto.PublicKey) bool {\n\txEd25519, ok := x.(*PublicKey)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn pub.inner.Equal(xEd25519.inner)\n}\n\n// AccountAddress returns the account address derived from the public key.\nfunc (pub *PublicKey) AccountAddress() crypto.Address {\n\tdata := hash.Hash160(hash.Hash256(pub.Bytes()))\n\taddr := crypto.NewAddress(crypto.AddressTypeEd25519Account, data)\n\n\treturn addr\n}\n\n// VerifyAddress checks if the provided address matches the derived address from the public key.\nfunc (pub *PublicKey) VerifyAddress(addr crypto.Address) error {\n\tif addr != pub.AccountAddress() {\n\t\treturn crypto.AddressMismatchError{\n\t\t\tExpected: pub.AccountAddress(),\n\t\t\tGot:      addr,\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "crypto/ed25519/public_key_test.go",
    "content": "package ed25519_test\n\nimport (\n\t\"encoding/hex\"\n\t\"strings\"\n\t\"testing\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestPublicKeyCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandEd25519KeyPair()\n\tpub2 := new(ed25519.PublicKey)\n\n\tbs, err := pub1.MarshalCBOR()\n\trequire.NoError(t, err)\n\trequire.NoError(t, pub2.UnmarshalCBOR(bs))\n\tassert.True(t, pub1.EqualsTo(pub2))\n\n\trequire.Error(t, pub2.UnmarshalCBOR([]byte(\"abcd\")))\n\n\tinv, _ := hex.DecodeString(strings.Repeat(\"ff\", ed25519.PublicKeySize))\n\tdata, _ := cbor.Marshal(inv)\n\trequire.NoError(t, pub2.UnmarshalCBOR(data))\n}\n\nfunc TestPublicKeyEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandEd25519KeyPair()\n\tpub2, _ := ts.RandEd25519KeyPair()\n\tpub3, _ := ts.RandBLSKeyPair()\n\n\tassert.True(t, pub1.EqualsTo(pub1))\n\tassert.False(t, pub1.EqualsTo(pub2))\n\tassert.False(t, pub1.EqualsTo(pub3))\n}\n\nfunc TestPublicKeyEncoding(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, _ := ts.RandEd25519KeyPair()\n\tfw1 := util.NewFixedWriter(20)\n\trequire.Error(t, pub.Encode(fw1))\n\n\tfw2 := util.NewFixedWriter(ed25519.PublicKeySize)\n\trequire.NoError(t, pub.Encode(fw2))\n\n\tfr1 := util.NewFixedReader(20, fw2.Bytes())\n\trequire.Error(t, pub.Decode(fr1))\n\n\tfr2 := util.NewFixedReader(ed25519.PublicKeySize, fw2.Bytes())\n\trequire.NoError(t, pub.Decode(fr2))\n\tassert.Equal(t, ed25519.PublicKeySize, pub.SerializeSize())\n}\n\nfunc TestPublicKeyVerifyAddress(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub1, _ := ts.RandEd25519KeyPair()\n\tpub2, _ := ts.RandEd25519KeyPair()\n\n\terr := pub1.VerifyAddress(pub1.AccountAddress())\n\trequire.NoError(t, err)\n\n\terr = pub1.VerifyAddress(pub2.AccountAddress())\n\tassert.Equal(t, crypto.AddressMismatchError{\n\t\tExpected: pub1.AccountAddress(),\n\t\tGot:      pub2.AccountAddress(),\n\t}, err)\n}\n\nfunc TestNilPublicKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub := &ed25519.PublicKey{}\n\trandSig := ts.RandEd25519Signature()\n\trequire.Error(t, pub.VerifyAddress(ts.RandAccAddress()))\n\trequire.Error(t, pub.VerifyAddress(ts.RandValAddress()))\n\trequire.Error(t, pub.Verify(nil, nil))\n\tassert.Panics(t, func() { _ = pub.Verify(nil, randSig) })\n}\n\nfunc TestNilSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, _ := ts.RandEd25519KeyPair()\n\trandSig := ts.RandEd25519Signature()\n\trequire.Error(t, pub.Verify(nil, nil))\n\trequire.Error(t, pub.Verify(nil, randSig))\n}\n\nfunc TestPublicKeyFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tresult  []byte\n\t}{\n\t\t{\n\t\t\t\"invalid separator index -1\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid checksum (expected ztd56p got ztd5p6)\",\n\t\t\t\"public1rafnl324uwngqdq455ax4e52fedmfcvskkwas6wsau0u0nwj4g96qztd5p6\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid HRP: xxx\",\n\t\t\t\"xxx1rafnl324uwngqdq455ax4e52fedmfcvskkwas6wsau0u0nwj4g96qvguamu\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 31\",\n\t\t\t\"public1ruwz86xyvhyehy8g7wg98jsmy07cfkjp6dy8zwxa8hqtdj99hquk7xyus\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid signature type: 4\",\n\t\t\t\"public1yafnl324uwngqdq455ax4e52fedmfcvskkwas6wsau0u0nwj4g96qdnx0mf\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"public1rafnl324uwngqdq455ax4e52fedmfcvskkwas6wsau0u0nwj4g96qztd56p\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0xea, 0x67, 0xf8, 0xaa, 0xbc, 0x74, 0xd0, 0x06, 0x82, 0xb4, 0xa7, 0x4d, 0x5c, 0xd1, 0x49, 0xcb,\n\t\t\t\t0x76, 0x9c, 0x32, 0x16, 0xb3, 0xbb, 0x0d, 0x3a, 0x1d, 0xe3, 0xf8, 0xf9, 0xba, 0x55, 0x41, 0x74,\n\t\t\t},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpub, err := ed25519.PublicKeyFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.result, pub.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, tt.encoded, pub.String(), \"test %v: invalid encoded\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/ed25519/signature.go",
    "content": "package ed25519\n\nimport (\n\t\"bytes\"\n\t\"crypto/subtle\"\n\t\"encoding/hex\"\n\t\"io\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nvar _ crypto.Signature = &Signature{}\n\nconst SignatureSize = 64\n\ntype Signature struct {\n\tdata []byte\n}\n\n// SignatureFromString decodes the input string and returns the Signature\n// if the string is a valid hexadecimal encoding of a Ed25519 signature.\nfunc SignatureFromString(text string) (*Signature, error) {\n\tdata, err := hex.DecodeString(text)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn SignatureFromBytes(data)\n}\n\n// SignatureFromBytes constructs a Ed25519 signature from the raw bytes.\nfunc SignatureFromBytes(data []byte) (*Signature, error) {\n\tif len(data) != SignatureSize {\n\t\treturn nil, crypto.InvalidLengthError(len(data))\n\t}\n\n\treturn &Signature{data: data}, nil\n}\n\n// Bytes returns the raw byte representation of the signature.\nfunc (sig *Signature) Bytes() []byte {\n\treturn sig.data[:SignatureSize]\n}\n\n// String returns the hex-encoded string representation of the signature.\nfunc (sig *Signature) String() string {\n\treturn hex.EncodeToString(sig.Bytes())\n}\n\n// MarshalCBOR encodes the signature into CBOR format.\nfunc (sig *Signature) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(sig.Bytes())\n}\n\n// UnmarshalCBOR decodes the signature from CBOR format.\nfunc (sig *Signature) UnmarshalCBOR(bs []byte) error {\n\tvar data []byte\n\tif err := cbor.Unmarshal(bs, &data); err != nil {\n\t\treturn err\n\t}\n\n\treturn sig.Decode(bytes.NewReader(data))\n}\n\n// Encode writes the raw bytes of the signature to the provided writer.\nfunc (sig *Signature) Encode(w io.Writer) error {\n\treturn encoding.WriteElements(w, sig.Bytes())\n}\n\n// Decode reads the raw bytes of the signature from the provided reader and initializes the signature.\nfunc (sig *Signature) Decode(r io.Reader) error {\n\tdata := make([]byte, SignatureSize)\n\terr := encoding.ReadElements(r, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts, _ := SignatureFromBytes(data)\n\t*sig = *s\n\n\treturn nil\n}\n\nfunc (*Signature) SerializeSize() int {\n\treturn SignatureSize\n}\n\n// EqualsTo checks if the current signature is equal to another signature.\nfunc (sig *Signature) EqualsTo(x crypto.Signature) bool {\n\txEd25519, ok := x.(*Signature)\n\tif !ok {\n\t\treturn false\n\t}\n\n\treturn subtle.ConstantTimeCompare(sig.data, xEd25519.data) == 1\n}\n"
  },
  {
    "path": "crypto/ed25519/signature_test.go",
    "content": "package ed25519_test\n\nimport (\n\t\"encoding/hex\"\n\t\"strings\"\n\t\"testing\"\n\n\tcbor \"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSignatureCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv := ts.RandEd25519KeyPair()\n\tsig1 := prv.Sign(ts.RandBytes(16))\n\tsig2 := new(ed25519.Signature)\n\n\tbs, err := sig1.MarshalCBOR()\n\trequire.NoError(t, err)\n\trequire.NoError(t, sig2.UnmarshalCBOR(bs))\n\tassert.True(t, sig1.EqualsTo(sig2))\n\n\trequire.Error(t, sig2.UnmarshalCBOR([]byte(\"abcd\")))\n\n\tinv, _ := hex.DecodeString(strings.Repeat(\"ff\", ed25519.SignatureSize))\n\tdata, _ := cbor.Marshal(inv)\n\trequire.NoError(t, sig2.UnmarshalCBOR(data))\n}\n\nfunc TestSignatureEqualsTo(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv1 := ts.RandEd25519KeyPair()\n\t_, prv2 := ts.RandEd25519KeyPair()\n\t_, prv3 := ts.RandBLSKeyPair()\n\n\tsig1 := prv1.Sign([]byte(\"foo\"))\n\tsig2 := prv2.Sign([]byte(\"foo\"))\n\tsig3 := prv3.Sign([]byte(\"foo\"))\n\n\tassert.True(t, sig1.EqualsTo(sig1))\n\tassert.False(t, sig1.EqualsTo(sig2))\n\tassert.False(t, sig1.EqualsTo(sig3))\n}\n\nfunc TestSignatureEncoding(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t_, prv := ts.RandEd25519KeyPair()\n\tsig := prv.Sign(ts.RandBytes(16))\n\tfw1 := util.NewFixedWriter(20)\n\trequire.Error(t, sig.Encode(fw1))\n\n\tfw2 := util.NewFixedWriter(ed25519.SignatureSize)\n\trequire.NoError(t, sig.Encode(fw2))\n\n\tfr1 := util.NewFixedReader(20, fw2.Bytes())\n\trequire.Error(t, sig.Decode(fr1))\n\n\tfr2 := util.NewFixedReader(ed25519.SignatureSize, fw2.Bytes())\n\trequire.NoError(t, sig.Decode(fr2))\n\tassert.Equal(t, ed25519.SignatureSize, sig.SerializeSize())\n}\n\nfunc TestVerifyingSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tmsg := []byte(\"pactus\")\n\n\tpb1, pv1 := ts.RandEd25519KeyPair()\n\tpb2, pv2 := ts.RandEd25519KeyPair()\n\tsig1 := pv1.Sign(msg)\n\tsig2 := pv2.Sign(msg)\n\n\tassert.False(t, sig1.EqualsTo(sig2))\n\trequire.NoError(t, pb1.Verify(msg, sig1))\n\trequire.NoError(t, pb2.Verify(msg, sig2))\n\trequire.ErrorIs(t, pb1.Verify(msg, sig2), crypto.ErrInvalidSignature)\n\trequire.ErrorIs(t, pb2.Verify(msg, sig1), crypto.ErrInvalidSignature)\n\trequire.ErrorIs(t, pb1.Verify(msg[1:], sig1), crypto.ErrInvalidSignature)\n}\n\nfunc TestSignatureFromString(t *testing.T) {\n\ttests := []struct {\n\t\terrMsg  string\n\t\tencoded string\n\t\tvalid   bool\n\t\tbytes   []byte\n\t}{\n\t\t{\n\t\t\t\"encoding/hex: invalid byte: U+006E 'n'\",\n\t\t\t\"not_proper_encoded\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"invalid length: 0\",\n\t\t\t\"\",\n\t\t\tfalse, nil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t\"7d6af02f788422319781b03d7f4ed575b78c4c4dc8060ce145624fc8dc9ad92b\" +\n\t\t\t\t\"ae2d28c70242f03a644f313009ad9cc88b5dc37d501e43279c8fbc40b973af04\",\n\t\t\ttrue,\n\t\t\t[]byte{\n\t\t\t\t0x7d, 0x6a, 0xf0, 0x2f, 0x78, 0x84, 0x22, 0x31, 0x97, 0x81, 0xb0, 0x3d, 0x7f, 0x4e, 0xd5, 0x75,\n\t\t\t\t0xb7, 0x8c, 0x4c, 0x4d, 0xc8, 0x06, 0x0c, 0xe1, 0x45, 0x62, 0x4f, 0xc8, 0xdc, 0x9a, 0xd9, 0x2b,\n\t\t\t\t0xae, 0x2d, 0x28, 0xc7, 0x02, 0x42, 0xf0, 0x3a, 0x64, 0x4f, 0x31, 0x30, 0x09, 0xad, 0x9c, 0xc8,\n\t\t\t\t0x8b, 0x5d, 0xc3, 0x7d, 0x50, 0x1e, 0x43, 0x27, 0x9c, 0x8f, 0xbc, 0x40, 0xb9, 0x73, 0xaf, 0x04,\n\t\t\t},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tsig, err := ed25519.SignatureFromString(tt.encoded)\n\t\tif tt.valid {\n\t\t\trequire.NoError(t, err, \"test %v: unexpected error\", no)\n\t\t\tassert.Equal(t, tt.bytes, sig.Bytes(), \"test %v: invalid bytes\", no)\n\t\t\tassert.Equal(t, tt.encoded, sig.String(), \"test %v: invalid encode\", no)\n\t\t} else {\n\t\t\tassert.Contains(t, err.Error(), tt.errMsg, \"test %v: error not matched\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "crypto/errors.go",
    "content": "package crypto\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\n// ErrInvalidSignature is returned when a signature is invalid.\nvar ErrInvalidSignature = errors.New(\"invalid signature\")\n\n// ErrInvalidPublicKey is returned when a public key is invalid.\nvar ErrInvalidPublicKey = errors.New(\"invalid public key\")\n\n// InvalidLengthError is returned when the length of the data\n// does not match the expected length.\ntype InvalidLengthError int\n\nfunc (e InvalidLengthError) Error() string {\n\treturn fmt.Sprintf(\"invalid length: %d\", int(e))\n}\n\n// InvalidHRPError is returned when the provided HRP code\n// does not match the expected value.\ntype InvalidHRPError string\n\nfunc (e InvalidHRPError) Error() string {\n\treturn fmt.Sprintf(\"invalid HRP: %s\", string(e))\n}\n\n// InvalidAddressTypeError is returned when the address type is not recognized or supported.\ntype InvalidAddressTypeError int\n\nfunc (e InvalidAddressTypeError) Error() string {\n\treturn fmt.Sprintf(\"invalid address type: %d\", int(e))\n}\n\n// InvalidSignatureTypeError is returned when the signature type is not recognized or supported.\ntype InvalidSignatureTypeError int\n\nfunc (e InvalidSignatureTypeError) Error() string {\n\treturn fmt.Sprintf(\"invalid signature type: %d\", int(e))\n}\n\n// AddressMismatchError is returned when the provided address is not derived\n// from the corresponding public key.\ntype AddressMismatchError struct {\n\tExpected Address\n\tGot      Address\n}\n\nfunc (e AddressMismatchError) Error() string {\n\treturn fmt.Sprintf(\"address mismatch: expected %s, got %s\",\n\t\te.Expected.String(), e.Got.String())\n}\n"
  },
  {
    "path": "crypto/hash/errors.go",
    "content": "package hash\n\nimport (\n\t\"errors\"\n)\n\n// ErrInvalidSQLType is returned when the type of the data\n// is not supported for SQL database operations.\nvar ErrInvalidSQLType = errors.New(\"invalid SQL type\")\n"
  },
  {
    "path": "crypto/hash/hash.go",
    "content": "package hash\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\n\t\"golang.org/x/crypto/blake2b\"\n\t\"golang.org/x/crypto/ripemd160\" //nolint:all // used to hash the public key to generate the address.\n)\n\nconst HashSize = 32\n\ntype Hash [HashSize]byte\n\nvar UndefHash = Hash{0}\n\nfunc Hash256(data []byte) []byte {\n\th := blake2b.Sum256(data)\n\n\treturn h[:]\n}\n\nfunc Hash160(data []byte) []byte {\n\t//nolint:all // used to hash the public key to generate the address.\n\th := ripemd160.New()\n\tn, err := h.Write(data)\n\tif err != nil {\n\t\treturn nil\n\t}\n\tif n != len(data) {\n\t\treturn nil\n\t}\n\n\treturn h.Sum(nil)\n}\n\n// FromString constructs a new hash from a hex-encoded string.\nfunc FromString(str string) (Hash, error) {\n\tdata, err := hex.DecodeString(str)\n\tif err != nil {\n\t\treturn Hash{}, err\n\t}\n\tif len(data) != HashSize {\n\t\treturn Hash{}, fmt.Errorf(\"Hash should be %d bytes, but it is %v bytes\", HashSize, len(data))\n\t}\n\n\treturn FromBytes(data)\n}\n\n// FromBytes constructs a new hash from raw byte data.\nfunc FromBytes(data []byte) (Hash, error) {\n\tif len(data) != HashSize {\n\t\treturn Hash{}, fmt.Errorf(\"Hash should be %d bytes, but it is %v bytes\", HashSize, len(data))\n\t}\n\n\tvar h Hash\n\tcopy(h[:], data[:HashSize])\n\n\treturn h, nil\n}\n\nfunc CalcHash(data []byte) Hash {\n\th, _ := FromBytes(Hash256(data))\n\n\treturn h\n}\n\n// Bytes returns the raw byte representation of the hash.\nfunc (h Hash) Bytes() []byte {\n\treturn h[:]\n}\n\n// String returns the hex-encoded string representation of the hash.\nfunc (h Hash) String() string {\n\treturn hex.EncodeToString(h[:])\n}\n\n// ShortString returns a shortened string representation of the hash.\nfunc (h Hash) ShortString() string {\n\treturn fmt.Sprintf(\"%x-%x\", h[:3], h[29:])\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (h Hash) LogString() string {\n\treturn h.ShortString()\n}\n\nfunc (h Hash) IsUndef() bool {\n\treturn h == UndefHash\n}\n"
  },
  {
    "path": "crypto/hash/hash_test.go",
    "content": "package hash_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestHashFromString(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\thash1 := ts.RandHash()\n\thash2, err := hash.FromString(hash1.String())\n\trequire.NoError(t, err)\n\tassert.Equal(t, hash1, hash2)\n\n\t_, err = hash.FromString(\"\")\n\trequire.Error(t, err)\n\n\t_, err = hash.FromString(\"inv\")\n\trequire.Error(t, err)\n\n\t_, err = hash.FromString(\"00\")\n\trequire.Error(t, err)\n}\n\nfunc TestHashEmpty(t *testing.T) {\n\t_, err := hash.FromBytes(nil)\n\trequire.Error(t, err)\n\n\t_, err = hash.FromBytes([]byte{1})\n\trequire.Error(t, err)\n}\n\nfunc TestHash256(t *testing.T) {\n\tdata := []byte(\"pactus\")\n\th1 := hash.Hash256(data)\n\texpected, _ := hex.DecodeString(\"ea020ace5c968f755dfc1b5921e574191cd9ff438639badae8a69f667e0d5970\")\n\tassert.Equal(t, expected, h1)\n}\n\nfunc TestHash160(t *testing.T) {\n\tdata := []byte(\"pactus\")\n\th := hash.Hash160(data)\n\texpected, _ := hex.DecodeString(\"1e4633f850c9590a97633631eae007e18648e30e\")\n\tassert.Equal(t, expected, h)\n}\n\nfunc TestHashBasicCheck(t *testing.T) {\n\th, err := hash.FromString(\"0000000000000000000000000000000000000000000000000000000000000000\")\n\trequire.NoError(t, err)\n\tassert.True(t, h.IsUndef())\n\tassert.Equal(t, hash.UndefHash.Bytes(), h.Bytes())\n}\n\nfunc TestShortString(t *testing.T) {\n\th, err := hash.FromString(\"1234560000000000000000000000000000000000000000000000000000abcdef\")\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, \"123456-abcdef\", h.ShortString())\n\tassert.Equal(t, h.ShortString(), h.LogString())\n}\n"
  },
  {
    "path": "crypto/private_key.go",
    "content": "package crypto\n\ntype PrivateKey interface {\n\tBytes() []byte\n\tString() string\n\tSign(msg []byte) Signature\n\tPublicKey() PublicKey\n\tEqualsTo(right PrivateKey) bool\n}\n"
  },
  {
    "path": "crypto/public_key.go",
    "content": "package crypto\n\nimport \"io\"\n\ntype PublicKey interface {\n\tBytes() []byte\n\tString() string\n\tMarshalCBOR() ([]byte, error)\n\tUnmarshalCBOR([]byte) error\n\tEncode(io.Writer) error\n\tDecode(io.Reader) error\n\tSerializeSize() int\n\tVerify(msg []byte, sig Signature) error\n\tVerifyAddress(addr Address) error\n\tEqualsTo(right PublicKey) bool\n}\n"
  },
  {
    "path": "crypto/signature.go",
    "content": "package crypto\n\nimport \"io\"\n\ntype Signature interface {\n\tBytes() []byte\n\tString() string\n\tMarshalCBOR() ([]byte, error)\n\tUnmarshalCBOR([]byte) error\n\tEncode(io.Writer) error\n\tDecode(io.Reader) error\n\tSerializeSize() int\n\tEqualsTo(right Signature) bool\n}\n"
  },
  {
    "path": "docs/bootstrap.md",
    "content": "# Bootstrap Nodes\n\nAs part of the network infrastructure, Bootstrap Nodes play an important role in starting\nand keeping the network secure.\n\n## What are the Bootstrap Nodes?\n\nBootstrap nodes act as the initial contact points for new nodes in the Pactus network.\nWhen a new node starts, it tries to connect to bootstrap nodes.\nThrough these connections, it learns about the entire network and discovers other peers.\n\n## Expectations\n\nBootstrap node operators are essential contributors to the stability and growth of the Pactus\nblockchain. To ensure a seamless integration, operators are expected to adhere to the following\nguidelines:\n\n### IP Address and DNS Stability\n\nBootstrap node operators are expected to maintain the stability of their assigned IP\nor DNS address. It is imperative that these addresses remain unchanged and are not sold or\ntransferred to third parties.\n\n### Security\n\nBootstrap node operators are expected to adhere to best practices in host security and\nmaintain control over the relevant infrastructure.\nSpecifically, they should ensure the security of their \"network key\".\nA network key is a private key used to encrypt messages in the P2P network.\n\n### Reliability (Uptime)\n\nBootstrap node operators are expected to maintain a high level of reliability and uptime.\nThey should ensure that their nodes are consistently available with minimal downtime.\n\n### Responsive\n\nBootstrap node operators are expected to be highly responsive, particularly in times of emergencies.\n\n### Software Updates\n\nBootstrap node operators are expected to apply software updates and patches provided by the Pactus development team.\n\n### Documentation\n\nBootstrap node operators are encouraged, but not required, to publicly document the details of their operating practices.\n\n### Monitoring\n\nBootstrap node operators are encouraged, but not required, to implements monitoring tools to\ntrack the performance and health of their nodes.\n\n## Inclusion in the Pactus Project\n\nUpon meeting the expectations outlined above, Bootstrap node operators can add their node as a Bootstrap node to the list of bootstrap addresses.\nEach Bootstrap address includes the IP or DNS address and the network ID.\nThe network ID can be obtained from the network log.\nOnce you have provided this information, you can open a pull request to add your node as a bootstrap node in the Pactus blockchain.\nAn example of this pull request can be found [here](https://github.com/pactus-project/pactus/pull/965/files).\n\n## Bootstrap Node Configuration\n\nIt is recommended to adjust the Bootstrap node configuration as follows:\n\n### Add Moniker\n\nA Moniker is a name by which a node can be recognized on the network.\n\n### Increase the Maximum Number of Connections\n\nDepending on the server bandwidth, it is recommended to increase the maximum number of connections for the node.\n\n### Enable NAT Service\n\nBy enabling NAT service, you allow other nodes to examine their connection and determine whether they are behind NAT.\n\n### Enable Relay Service\n\nEnabling relay service allows nodes behind NAT to establish connections with each other.\n\n### Disable Relay\n\nSince a Bootstrap node has a public IP, it is important to disable the relay on the Bootstrap Node.\n\n### Enable UDP\n\nIf the Bootstrap node has a reliable UDP connection, you can enable UDP for communication.\n"
  },
  {
    "path": "docs/gtk-gui-development.md",
    "content": "# Pactus GUI\n\nThis document is quick guide for developing and updating [the Pactus Core GUI](../cmd/gtk/).\n\n## Requirements\n\nThe Pactus Core GUI utilizes gtk for desktop GUI. To develop, build and test it you must have these packages installed:\n\n### Linux\n\n1. `libgtk-3-dev`\n2. `libcairo2-dev`\n3. `libglib2.0-dev`\n\nInstall using apt:\n\n```bash\napt install libgtk-3-dev libcairo2-dev libglib2.0-dev\n```\n\n### Mac OS\n\n1. `gtk+3`\n\nInstall using brew:\n\n```bash\nbrew install gtk+3\n```\n\n### Windows\n\n1. `glib2-devel`\n2. `mingw-w64-x86_64-go`\n3. `mingw-w64-x86_64-gtk3`\n4. `mingw-w64-x86_64-glib2`\n5. `mingw-w64-x86_64-gcc`\n6. `mingw-w64-x86_64-pkg-config`\n\n\nWith these packages installed you can build GUI using `make build_gui` command. You can run the GUI like: `./pactus-gui`, `./pactus-gui.exe`.\n\n\nThe [Assets](../cmd/gtk/assets/) file includes required images, icons, ui files and custom CSS files. All [`.ui`](../cmd/gtk/assets/ui/) files are used to defined the user interface of GUI, for a proper edit and change on them make sure you have [Glade](https://gitlab.gnome.org/GNOME/glade) installed on your machine.\n\n## Running linter\n\nWhen you make changes on GUI files and try to run linter using `make check`, it won't include [gtk](../cmd/gtk/) in it's checks. So make sure you add gtk build flag like this:\n\n```bash\nBUILD_TAG=gtk make check\n```\n"
  },
  {
    "path": "docs/install.md",
    "content": "# Installing Pactus\n\n## Requirements\n\nYou need to make sure you have installed [Git](https://git-scm.com/downloads)\nand [Go 1.21 or higher](https://golang.org/) on your machine.\nIf you want to install a GUI application, make sure you have installed\n[GTK+3](https://www.gtk.org/docs/getting-started/) as well.\n\n## Compiling the code\n\nFollow these steps to compile and build Pactus:\n\n```bash\ngit clone https://github.com/pactus-project/pactus.git\ncd pactus\nmake build\n```\n\nThis will compile `pactus-daemon`, `pactus-wallet` and `pactus-shell` on your machine.\n\n```bash\ncd build\n./pactus-daemon version\n```\n\nIf you want to compile the GUI application, run this command in the root folder:\n\n```bash\nmake build_gui\n```\n\nTo run the tests, use this command:\n\n```bash\nmake test\n```\n\nThis may take several minutes to finish.\n\n## What is `pactus-daemon`?\n\n`pactus-daemon` is a full node implementation of the Pactus blockchain.\nYou can use `pactus-daemon` to run a full node:\n\n```bash\n./pactus-daemon init  -w=<working_dir>\n./pactus-daemon start -w=<working_dir>\n```\n\n### Testnet\n\nTo join the Testnet, first you need to initialize your node\nand then start the node:\n\n```bash\n./pactus-daemon init  -w=<working_dir> --testnet\n./pactus-daemon start -w=<working_dir>\n```\n\n### Localnet\n\nYou can create a local node to set up a local network for development purposes on your machine:\n\n```bash\n./pactus-daemon init  -w=<working_dir> --localnet\n./pactus-daemon start -w=<working_dir>\n```\n\n## What is `pactus-wallet`?\n\n`pactus-wallet` is the CLI tool for creating and managing wallets on the Pactus blockchain.\n\n### Getting started\n\nTo create a new wallet, run this command. The wallet will be encrypted by the\nprovided password.\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_1 create\n```\n\nYou can create a new address like this:\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_1 address new\n```\n\nA list of addresses is available with this command:\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_1 address all\n```\n\nTo obtain the public key of an address, run this command:\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_1 address pub <ADDRESS>\n```\n\nTo send a transaction, use the `send` subcommand.\nFor example, to send a bond transaction:\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_1 send bond <FROM> <TO> <AMOUNT>\n```\n\nYou can recover a wallet if you have the seed phrase.\n\n```bash\n./pactus-wallet --path ~/pactus/wallets/wallet_2 recover\n```\n\n## What is `pactus-shell`?\n\n`pactus-shell` is an interactive command-line client for exploring and calling the Pactus gRPC APIs.\n\nStart it against your node (default gRPC address is `localhost:50051`):\n\n```bash\n./pactus-shell interactive --server-addr localhost:50051\n```\n\n## Docker\n\nYou can run Pactus using a Docker image. Please make sure you have installed\n[Docker](https://docs.docker.com/engine/install/) on your machine.\n\nPull the image from Docker Hub:\n\n```bash\ndocker pull pactus/pactus:main\n```\n\nLet's create a working directory at `~/pactus/testnet` for the testnet:\n\n```bash\ndocker run -it --rm -v ~/pactus/testnet:/root/pactus pactus/pactus:main pactus-daemon init --testnet\n```\n\nNow we can run Pactus and join the testnet:\n\n```bash\ndocker run -it -v ~/pactus/testnet:/root/pactus -p 8080:8080 -p 21777:21777 --name pactus-testnet pactus/pactus:main pactus-daemon start\n```\n\nCheck \"[http://localhost:8080](http://localhost:8080)\" for the list of APIs.\n\nYou can stop or start the container:\n\n```bash\ndocker start pactus-testnet\ndocker stop pactus-testnet\n```\n\nOr check the logs:\n\n```bash\ndocker logs pactus-testnet --tail 1000 -f\n```\n\n## Profiling with pprof\n\nIf you need runtime profiling, enable the HTML server with pprof in your node configuration and restart the node.\nOnce running, you can collect and explore a CPU profile with the pprof web UI (replace the host and port with your HTML server address):\n\n```bash\ngo tool pprof -http :3000 \"http://localhost:8081/debug/pprof/profile?debug=1\"\n```\n"
  },
  {
    "path": "docs/metrics.md",
    "content": "# Metrics\n\nPactus node offers [Prometheus](https://prometheus.io/) metrics to monitor and analyze various network-related and resource statistics.\n\n# Usage\n\nTo activate this feature, inside the `config.toml`,  set the `enable_metrics` parameter to true.\nAlso, ensure that the HTTP module is enabled. You can enable HTTP module under the `[http]` section of the `config.toml` file. \nOnce enabled, the metrics can be accessed at [http://localhost:80/metrics/prometheus](http://localhost:80/metrics/prometheus) (this url going to be use by prometheus).\n\n> NOTE: if you are running Pactus with docker image, make sure to expose `:80` port.\n\nAfter these changes, restart the Pactus node; you should now be able to view the metrics.\n\n## Prometheus Configuration\n\nPrometheus is an open-source monitoring and alerting tool that facilitates the collection and processing of metrics. A common method of running Prometheus is via Docker containers. To use Prometheus with Docker, follow these steps:\n\n1- Ensure [Docker](https://www.docker.com/) is installed on your system.\n\n2- Pull the Prometheus Docker image:\n\n```text\ndocker pull prom/prometheus\n```\n\n3- Create a configuration file named `prometheus.yml` to define the Prometheus configuration. You can refer to the Prometheus [documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) for more guidance. As an example, here's a simple configuration:\n\n```yaml\nscrape_configs:\n  - job_name: \"prometheus\"\n    scrape_interval: 1m\n    static_configs:\n      - targets: [ \"127.0.0.1:9090\" ]\n\n  - job_name: \"pactus-metrics\"\n    metrics_path: /metrics/prometheus\n    static_configs:\n      - targets: [ \"localhost:80\" ]\n```\n> NOTE: you should replace localhost with your server IP if you are running Pactus in server.\n\n4- Start Prometheus as a Docker container:\n\n```text\ndocker run -p 9090:9090 -v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus\n```\nReplace `/path/to/prometheus.yml` with the actual path to your configuration file.\n\n5- Prometheus should now be up and running. Access the Prometheus web interface by visiting [http://localhost:9090/](http://localhost:9090/) in your web browser.\n"
  },
  {
    "path": "docs/patching.md",
    "content": "# Patching Process\n\nTo patch a released version, start by creating a dedicated branch for the patch version,\nproceed with the required updates, and eventually release the patched branch.\n\nBefore proceeding with the patching process,\nensure that your `origin` remote is set to `git@github.com:pactus-project/pactus.git`\nand not your local fork.\n\n```bash\ngit remote -vv\n```\n\n## 1. Create a Patch Branch\n\nIf this is the first patch for a specific major version, you'll need to create a branch for this tag.\nReplace `<minor>` with the appropriate minor version number:\n\n```bash\ngit checkout -b 1.<minor>.x v1.<minor>.0\ngit log\ngit push --set-upstream origin 1.<minor>.x\n```\n\nIf you're not creating a new patch branch, switch to the existing patch branch:\n\n```bash\ngit checkout 1.<minor>.x\ngit pull\n```\n\n## 2. Apply Fixes\n\nNow, apply the necessary fixes to the patch branch.\nYou can use [cherry-pick](https://www.atlassian.com/git/tutorials/cherry-pick) to\nselect specific commits from the main branch and apply them to the patch branch:\n\n```bash\ngit cherry-pick <commit-id>\ngit push\n```\n\nDon't forget to update the patch version inside the [version.json](../version/version.json) file.\n\n## 3. Set Environment Variables\n\nReopen this document within the branch version and\ncreate environment variables for the release version, which will be used in subsequent commands throughout this document.\nKeep your terminal open for further steps.\n\n```bash\nPRV_VER=\"1.14.0\"\nCUR_VER=\"1.14.1\"\nNEXT_VER=\"1.14.2\"\nBASE_BRANCH=\"1.14.x\"\nTAG_NAME=\"v${CUR_VER}\"\nTAG_MSG=\"Version ${CUR_VER}\"\n```\n\n## 4. Follow the Releasing Document\n\nRefer to the [Releasing](./releasing.md#5-update-changelog) document and follow the steps outlined from Step 5 until the end.\nThis document will provide you with the necessary guidance to successfully release the patched branch.\n\nEnsure that your terminal remains open throughout the process for seamless execution of the required commands.\n"
  },
  {
    "path": "docs/release-candidate.md",
    "content": "# Release Candidate\n\nRelease candidates are used to test the latest version before a final release.\nThey are **not intended to be stored permanently** and will be removed from GitHub Releases after testing.\nTo create a release candidate, follow the structure below:\n\n## 1. Set Environment Variables\n\nCreate environment variables for the release version, which will be used in subsequent commands throughout this document.\nKeep your terminal open for further steps.\nUpdate `X`, `Y`, `Z`, and `N` to reflect the release candidate (e.g., `1.7.0-rc1`, `1.7.0-rc2`, etc.).\n\n```bash\nCUR_VER=\"X.Y.Z-rcN\"\nTAG_NAME=\"v${CUR_VER}\"\nTAG_MSG=\"Version ${CUR_VER}\"\n```\n\n## 2. Update the Version\n\nSet `rcX` in the `Meta` field and update the `Alias` in [version.go](../version/version.json).\n\n## 3. Make a Release Candidate Commit\n\nCreate a new commit for the release candidate:\n\n```bash\ngit commit -a -m \"chore(release): releasing version ${CUR_VER}\"\n```\n\n## 4. Tag the Release\n\nCreate a signed Git tag:\n\n```bash\ngit tag -s -a ${TAG_NAME} -m \"${TAG_MSG}\"\n```\n\nVerify the tag:\n\n```bash\ngit show ${TAG_NAME}\n```\n\n## 5. Push the Tag\n\nPush the tag to the remote repository:\n\n```bash\ngit push origin ${TAG_NAME}\n```\n\nPushing the tag will automatically trigger the creation of a release candidate and build the binaries.\n"
  },
  {
    "path": "docs/releasing.md",
    "content": "# Release Process\n\nTo ensure a successful release and publication of the Pactus software, it is essential to follow these key steps.\nPlease carefully follow the instructions provided below:\n\n## 1. Preparing Your Environment\n\nBefore proceeding with the release process,\nensure that your `origin` remote is set to `git@github.com:pactus-project/pactus.git`\nand not your local fork.\n\n```bash\ngit remote -vv\n```\n\nIt is recommended to re-clone the project in a location other than your current working directory.\nAlso, make sure that you have set up GPG for your GitHub account.\n\n## 2. Fetch the Latest Code\n\nEnsure that your local repository is up-to-date with the Pactus main repository:\n\n```bash\ngit checkout main\ngit pull\n```\n\n## 3. Set Environment Variables\n\nCreate environment variables for the release version, which will be used in subsequent commands throughout this document.\nKeep your terminal open for further steps.\n\n```bash\nPRV_VER=\"1.13.0\"\nCUR_VER=\"1.14.0\"\nNEXT_VER=\"1.15.0\"\nBASE_BRANCH=\"main\"\nTAG_NAME=\"v${CUR_VER}\"\nTAG_MSG=\"Version ${CUR_VER}\"\n```\n\n## 4. Update the Version\n\nClear Meta and set Alias in [version.json](../version/version.json).\n\n## 5. Update Changelog\n\nUse [Commitizen](https://github.com/commitizen-tools/commitizen) to update the CHANGELOG. Execute the following command:\n\n```bash\ncz changelog --incremental --unreleased-version ${TAG_NAME}\nperl -i -pe \"s/## v${CUR_VER} /## [${CUR_VER}](https:\\/\\/github.com\\/pactus-project\\/pactus\\/compare\\/v${PRV_VER}...v${CUR_VER}) /g\" CHANGELOG.md\nperl -i -pe \"s/\\(#([0-9]+)\\)/([#\\1](https:\\/\\/github.com\\/pactus-project\\/pactus\\/pull\\/\\1))/g\" CHANGELOG.md\n```\n\nOccasionally, you may need to make manual updates to the [CHANGELOG](../CHANGELOG.md).\n\n## 6. Create a Release PR\n\nGenerate a new PR against the base branch.\nIt's better to use [GitHub CLI](https://github.com/cli/cli/) to create the PR, but manual creation is also an option.\n\n```bash\ngit checkout -b releasing_${CUR_VER}\ngit commit -a -m \"chore(release): releasing version ${CUR_VER}\"\ngit push origin HEAD\ngh pr create --title \"chore(release): releasing version ${CUR_VER}\" --body \"Releasing version ${CUR_VER}\" --base ${BASE_BRANCH}\n```\n\nWait for the PR to be approved and merged into the main branch.\n\n## 7. Tagging the Release\n\nCreate a Git tag and sign it using your [GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) with the following commands:\n\n```bash\ngit checkout ${BASE_BRANCH}\ngit pull\ngit tag -s -a ${TAG_NAME} -m \"${TAG_MSG}\"\n```\n\nInspect the tag information:\n\n```bash\ngit show ${TAG_NAME}\n```\n\n## 8. Push the Tag\n\nNow, push the tag to the repository:\n\n```bash\ngit push origin ${TAG_NAME}\n```\n\nPushing the tag will automatically create a release tag and build the binaries.\n\n## 9. Bump the Version\n\nUpdate the version inside [version.json](../version/version.json), add `beta` to the `meta` field, and:\n- If this is a **major release**,\n    * update the versions inside [this document](./releasing.md#3-set-environment-variables) in step 3 and\n    * update the versions inside the [patching](./patching.md#3-set-environment-variables) in step 3.\n- If this is a **patch release**,\n    * update the versions inside the [patching](./patching.md#3-set-environment-variables) in step 3.\n\nCreate a new PR against the base branch:\n\n```bash\ngit checkout -b bumping_${NEXT_VER}\ngit commit -a -m \"chore(version): bumping version to ${NEXT_VER}\"\ngit push origin HEAD\ngh pr create --title \"chore(version): bumping version to ${NEXT_VER}\" --body \"Bumping version to ${NEXT_VER}\" --base ${BASE_BRANCH}\n```\n\nWait for the PR to be approved and merged into the main branch.\n\n## 10. Update the Website\n\nCreate a new announcement post on the\n[blog](https://pactus.org/blog/) and update the\n[Road Map](https://pactus.org/about/roadmap/) and\n[Download](https://pactus.org/download/) pages.\nAdditionally, update the new release on the\n[GitHub Releases](https://github.com/pactus-project/pactus/releases) page.\nIf gRPC APIs has changed in this version,\nbe sure to update the [API documentation](https://docs.pactus.org/api/) and\n[Python SDK](https://github.com/pactus-project/python-sdk) accordingly.\n\n## 11. Celebrate 🎉\n\nBefore celebrating, ensure that the release has been tested and that all documentation is up to date.\nDon't forget to update dependencies after major releases (see [Update Dependencies](./update-dependencies.md)).\n"
  },
  {
    "path": "docs/update-dependencies.md",
    "content": "# Update Dependencies\n\nThis document outlines the steps to update dependencies in the Pactus project repository\nto their latest versions.\n\n## Update Go\n\nFirst, update the Go version to the [latest release](https://go.dev/doc/install) in [go.mod](../go.mod).\nEnsure the Golang version is also updated in the [Dockerfile](../Dockerfile).\n\n## Update Dependencies\n\nTo update Go dependencies to their latest versions, use the following commands:\n\n```sh\ngo get -u ./...\ngo mod tidy\n```\n\nOnce all packages are updated, run `make build`, `make test`, and `make build_gui`\nto ensure no existing functionality is broken.\nIf any packages introduce breaking changes or are deprecated,\nupdate the code to use the new methods or replace the package entirely.\n\n## Update Dev Tools\n\nNext, update development tools such as `golangci-lint`, `buf`, and others.\nRefer to the [Makefile](../Makefile) and locate the `devtools` target.\nReplace each tool with its latest version.\n\n## Update GitHub Workflows\n\nNavigate to the [workflows](../.github/workflows) directory and\nupdate outdated GitHub actions to their latest versions.\nYou can find the latest versions by searching for the action name on GitHub.\n\n## Buf Dependencies\n\nWe use [buf](https://buf.build/explore) to generate code from proto files.\nUpdate the buf plugins in [buf.gen.yaml](../www/grpc/buf/buf.gen.yaml) to their latest versions.\n\n### Packager Dependencies\n\nWhen updating Buf plugins, ensure that the **Runtime dependencies** align with the dependencies\ndefined in the packages within the [packager](../.github/packager/) folder.\n\n## Example Pull Request\n\nFor reference, see this example pull request for updates and commit format:\nhttps://github.com/pactus-project/pactus/pull/1202\n"
  },
  {
    "path": "execution/errors.go",
    "content": "package execution\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n)\n\n// TransactionCommittedError is returned when an attempt is made\n// to replay a transaction that has already been committed.\n// This is to prevent replay attacks where an attacker tries to\n// submit the same transaction more than once.\ntype TransactionCommittedError struct {\n\tID tx.ID\n}\n\nfunc (e TransactionCommittedError) Error() string {\n\treturn fmt.Sprintf(\"the transaction submitted before: %s\",\n\t\te.ID.String())\n}\n\n// LockTimeExpiredError is returned when the lock time of a transaction\n// is in the past and has expired,\n// indicating the transaction can no longer be executed.\ntype LockTimeExpiredError struct {\n\tLockTime types.Height\n}\n\nfunc (e LockTimeExpiredError) Error() string {\n\treturn fmt.Sprintf(\"lock time expired: %v\", e.LockTime)\n}\n\n// LockTimeInFutureError is returned when the lock time of a transaction\n// is in the future,\n// indicating the transaction is not yet eligible for processing.\ntype LockTimeInFutureError struct {\n\tLockTime types.Height\n}\n\nfunc (e LockTimeInFutureError) Error() string {\n\treturn fmt.Sprintf(\"lock time is in the future: %v\", e.LockTime)\n}\n\n// SignerBannedError is returned when the signer of transaction is banned and its assets is freezed.\ntype SignerBannedError struct {\n\tAddress crypto.Address\n}\n\nfunc (e SignerBannedError) Error() string {\n\treturn fmt.Sprintf(\"the signer is banned: %s\", e.Address.String())\n}\n"
  },
  {
    "path": "execution/execution.go",
    "content": "package execution\n\nimport (\n\t\"github.com/pactus-project/pactus/execution/executor\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n)\n\nfunc Execute(trx *tx.Tx, sbx sandbox.Sandbox) error {\n\texe, err := executor.MakeExecutor(trx, sbx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\texe.Execute()\n\tsbx.CommitTransaction(trx)\n\n\treturn nil\n}\n\nfunc CheckAndExecute(trx *tx.Tx, sbx sandbox.Sandbox, strict bool) error {\n\texe, err := executor.MakeExecutor(trx, sbx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif sbx.IsBanned(trx.Payload().Signer()) {\n\t\treturn SignerBannedError{\n\t\t\tAddress: trx.Payload().Signer(),\n\t\t}\n\t}\n\n\tif exists := sbx.RecentTransaction(trx.ID()); exists {\n\t\treturn TransactionCommittedError{\n\t\t\tID: trx.ID(),\n\t\t}\n\t}\n\n\tif err := CheckLockTime(trx, sbx, strict); err != nil {\n\t\treturn err\n\t}\n\n\tif err := exe.Check(strict); err != nil {\n\t\treturn err\n\t}\n\n\texe.Execute()\n\tsbx.CommitTransaction(trx)\n\n\treturn nil\n}\n\nfunc CheckLockTime(trx *tx.Tx, sbx sandbox.Sandbox, strict bool) error {\n\tinterval := sbx.Params().TransactionToLiveInterval\n\n\tif trx.IsSubsidyTx() {\n\t\tinterval = 0\n\t} else if trx.IsSortitionTx() {\n\t\tinterval = sbx.Params().SortitionInterval\n\t}\n\n\tif sbx.CurrentHeight() > types.Height(interval) {\n\t\tif trx.LockTime() < sbx.CurrentHeight().SafeDecrease(interval) {\n\t\t\treturn LockTimeExpiredError{\n\t\t\t\tLockTime: trx.LockTime(),\n\t\t\t}\n\t\t}\n\t}\n\n\tif strict {\n\t\t// In strict mode, transactions with future lock times are rejected.\n\t\t// In non-strict mode, they are added to the transaction pool and\n\t\t// processed once eligible.\n\t\tif trx.LockTime() > sbx.CurrentHeight() {\n\t\t\treturn LockTimeInFutureError{\n\t\t\t\tLockTime: trx.LockTime(),\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "execution/execution_test.go",
    "content": "package execution\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/execution/executor\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTransferLockTime(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestStore.AddTestBlock(8642)\n\n\ttests := []struct {\n\t\tname         string\n\t\tlockTime     types.Height\n\t\tstrictErr    error\n\t\tnonStrictErr error\n\t}{\n\t\t{\n\t\t\tname:         \"Transaction has expired LockTime  (-8641)\",\n\t\t\tlockTime:     sbx.CurrentHeight().SafeDecrease(sbx.TestParams.TransactionToLiveInterval) - 1,\n\t\t\tstrictErr:    LockTimeExpiredError{sbx.CurrentHeight().SafeDecrease(sbx.TestParams.TransactionToLiveInterval) - 1},\n\t\t\tnonStrictErr: LockTimeExpiredError{sbx.CurrentHeight().SafeDecrease(sbx.TestParams.TransactionToLiveInterval) - 1},\n\t\t},\n\t\t{\n\t\t\tname:         \"Transaction has valid LockTime (-8640)\",\n\t\t\tlockTime:     sbx.CurrentHeight().SafeDecrease(sbx.TestParams.TransactionToLiveInterval),\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Transaction has valid LockTime (-88)\",\n\t\t\tlockTime:     sbx.CurrentHeight() - 88,\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Transaction has valid LockTime (0)\",\n\t\t\tlockTime:     sbx.CurrentHeight(),\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Transaction has future LockTime (+1)\",\n\t\t\tlockTime:     sbx.CurrentHeight() + 1,\n\t\t\tstrictErr:    LockTimeInFutureError{sbx.CurrentHeight() + 1},\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\t\ttestsuite.TransactionWithLockTime(tt.lockTime))\n\n\t\t\tstrictErr := CheckLockTime(trx, sbx, true)\n\t\t\trequire.ErrorIs(t, strictErr, tt.strictErr)\n\n\t\t\tnonStrictErr := CheckLockTime(trx, sbx, false)\n\t\t\trequire.ErrorIs(t, nonStrictErr, tt.nonStrictErr)\n\t\t})\n\t}\n}\n\nfunc TestSortitionLockTime(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestAcceptSortition = true\n\tsbx.TestStore.AddTestBlock(8642)\n\n\ttests := []struct {\n\t\tname         string\n\t\tlockTime     types.Height\n\t\tstrictErr    error\n\t\tnonStrictErr error\n\t}{\n\t\t{\n\t\t\tname:         \"Sortition transaction has expired LockTime (-8)\",\n\t\t\tlockTime:     sbx.CurrentHeight().SafeDecrease(sbx.TestParams.SortitionInterval) - 1,\n\t\t\tstrictErr:    LockTimeExpiredError{sbx.CurrentHeight().SafeDecrease(sbx.TestParams.SortitionInterval) - 1},\n\t\t\tnonStrictErr: LockTimeExpiredError{sbx.CurrentHeight().SafeDecrease(sbx.TestParams.SortitionInterval) - 1},\n\t\t},\n\t\t{\n\t\t\tname:         \"Sortition transaction has valid LockTime (-7)\",\n\t\t\tlockTime:     sbx.CurrentHeight().SafeDecrease(sbx.TestParams.SortitionInterval),\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Sortition transaction has valid LockTime (-1)\",\n\t\t\tlockTime:     sbx.CurrentHeight() - 1,\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Sortition transaction has valid LockTime (0)\",\n\t\t\tlockTime:     sbx.CurrentHeight(),\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Sortition transaction has future LockTime (+1)\",\n\t\t\tlockTime:     sbx.CurrentHeight() + 1,\n\t\t\tstrictErr:    LockTimeInFutureError{sbx.CurrentHeight() + 1},\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ttrx := ts.GenerateTestSortitionTx(\n\t\t\t\ttestsuite.TransactionWithLockTime(tt.lockTime))\n\n\t\t\tstrictErr := CheckLockTime(trx, sbx, true)\n\t\t\trequire.ErrorIs(t, strictErr, tt.strictErr)\n\n\t\t\tnonStrictErr := CheckLockTime(trx, sbx, false)\n\t\t\trequire.ErrorIs(t, nonStrictErr, tt.nonStrictErr)\n\t\t})\n\t}\n}\n\nfunc TestSubsidyLockTime(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestStore.AddTestBlock(8642)\n\n\ttests := []struct {\n\t\tname         string\n\t\tlockTime     types.Height\n\t\tstrictErr    error\n\t\tnonStrictErr error\n\t}{\n\t\t{\n\t\t\tname:         \"Subsidy transaction has expired LockTime (-1)\",\n\t\t\tlockTime:     sbx.CurrentHeight() - 1,\n\t\t\tstrictErr:    LockTimeExpiredError{sbx.CurrentHeight() - 1},\n\t\t\tnonStrictErr: LockTimeExpiredError{sbx.CurrentHeight() - 1},\n\t\t},\n\t\t{\n\t\t\tname:         \"Subsidy transaction has valid LockTime (0)\",\n\t\t\tlockTime:     sbx.CurrentHeight(),\n\t\t\tstrictErr:    nil,\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t\t{\n\t\t\tname:         \"Subsidy transaction has future LockTime (+1)\",\n\t\t\tlockTime:     sbx.CurrentHeight() + 1,\n\t\t\tstrictErr:    LockTimeInFutureError{sbx.CurrentHeight() + 1},\n\t\t\tnonStrictErr: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ttrx := ts.GenerateTestSubsidyTx(\n\t\t\t\ttestsuite.TransactionWithLockTime(tt.lockTime))\n\n\t\t\tstrictErr := CheckLockTime(trx, sbx, true)\n\t\t\trequire.ErrorIs(t, strictErr, tt.strictErr)\n\n\t\t\tnonStrictErr := CheckLockTime(trx, sbx, false)\n\t\t\trequire.ErrorIs(t, nonStrictErr, tt.nonStrictErr)\n\t\t})\n\t}\n}\n\nfunc TestExecute(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestStore.AddTestBlock(8642)\n\tknownPub, knownSigner := ts.RandEd25519KeyPair()\n\tsbx.TestStore.AddTestAccount(testsuite.AccountWithAddress(knownPub.AccountAddress()))\n\tlockTime := sbx.CurrentHeight()\n\n\tt.Run(\"Unknown Signer\", func(t *testing.T) {\n\t\t_, unknownSigner := ts.RandKeyPair()\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithSigner(unknownSigner))\n\n\t\terr := Execute(trx, sbx)\n\t\trequire.ErrorIs(t, err, executor.AccountNotFoundError{Address: trx.Payload().Signer()})\n\t})\n\n\tt.Run(\"Valid Transaction\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithSigner(knownSigner))\n\n\t\terr := Execute(trx, sbx)\n\t\trequire.NoError(t, err)\n\n\t\tassert.True(t, sbx.RecentTransaction(trx.ID()))\n\t})\n}\n\nfunc TestCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestStore.AddTestBlock(8642)\n\tknownPub, knownSigner := ts.RandEd25519KeyPair()\n\t_, testAcc := sbx.TestStore.AddTestAccount(testsuite.AccountWithAddress(knownPub.AccountAddress()))\n\tlockTime := sbx.CurrentHeight()\n\n\tt.Run(\"Unknown Sender\", func(t *testing.T) {\n\t\t_, unknownSigner := ts.RandKeyPair()\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithSigner(unknownSigner))\n\n\t\terr := CheckAndExecute(trx, sbx, true)\n\t\trequire.ErrorIs(t, err, executor.AccountNotFoundError{Address: trx.Payload().Signer()})\n\t})\n\n\tt.Run(\"Invalid lock-time, Should return error\", func(t *testing.T) {\n\t\tinvalidLockTime := lockTime + 1\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(invalidLockTime),\n\t\t\ttestsuite.TransactionWithSigner(knownSigner))\n\n\t\terr := CheckAndExecute(trx, sbx, true)\n\t\trequire.ErrorIs(t, err, LockTimeInFutureError{LockTime: invalidLockTime})\n\t})\n\n\tt.Run(\"Invalid transaction, Should return error\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithSigner(knownSigner),\n\t\t\ttestsuite.TransactionWithAmount(testAcc.Balance()+1))\n\n\t\terr := CheckAndExecute(trx, sbx, true)\n\t\trequire.ErrorIs(t, err, executor.ErrInsufficientFunds)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithSigner(knownSigner))\n\n\t\terr := CheckAndExecute(trx, sbx, true)\n\t\trequire.NoError(t, err)\n\t\tassert.True(t, sbx.RecentTransaction(trx.ID()))\n\t})\n}\n\nfunc TestReplay(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\tsbx.TestStore.AddTestBlock(8642)\n\tknownPub, knownSigner := ts.RandEd25519KeyPair()\n\tsbx.TestStore.AddTestAccount(\n\t\ttestsuite.AccountWithAddress(knownPub.AccountAddress()))\n\n\ttrx := ts.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(knownSigner))\n\n\terr := Execute(trx, sbx)\n\trequire.NoError(t, err)\n\n\terr = CheckAndExecute(trx, sbx, false)\n\trequire.ErrorIs(t, err, TransactionCommittedError{\n\t\tID: trx.ID(),\n\t})\n}\n"
  },
  {
    "path": "execution/executor/batch_transfer.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype batchRecipient struct {\n\tAddress crypto.Address\n\tAccount *account.Account\n\tAmount  amount.Amount\n}\n\ntype BatchTransferExecutor struct {\n\tsbx        sandbox.Sandbox\n\tpld        *payload.BatchTransferPayload\n\tfee        amount.Amount\n\tsender     *account.Account\n\trecipients []batchRecipient\n}\n\nfunc newBatchTransferExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*BatchTransferExecutor, error) {\n\tpld := trx.Payload().(*payload.BatchTransferPayload)\n\n\tsender := sbx.Account(pld.From)\n\tif sender == nil {\n\t\treturn nil, AccountNotFoundError{Address: pld.From}\n\t}\n\n\trecipients := make([]batchRecipient, len(pld.Recipients))\n\tfor i, r := range pld.Recipients {\n\t\tif r.To == pld.From {\n\t\t\trecipients[i].Account = sender\n\t\t} else {\n\t\t\treceiver := sbx.Account(r.To)\n\t\t\tif receiver == nil {\n\t\t\t\treceiver = sbx.MakeNewAccount(r.To)\n\t\t\t}\n\t\t\trecipients[i].Account = receiver\n\t\t}\n\n\t\trecipients[i].Address = r.To\n\t\trecipients[i].Amount = r.Amount\n\t}\n\n\treturn &BatchTransferExecutor{\n\t\tsbx:        sbx,\n\t\tpld:        pld,\n\t\tfee:        trx.Fee(),\n\t\tsender:     sender,\n\t\trecipients: recipients,\n\t}, nil\n}\n\nfunc (e *BatchTransferExecutor) Check(_ bool) error {\n\tif e.sender.Balance() < e.pld.Value()+e.fee {\n\t\treturn ErrInsufficientFunds\n\t}\n\n\treturn nil\n}\n\nfunc (e *BatchTransferExecutor) Execute() {\n\te.sender.SubtractFromBalance(e.pld.Value() + e.fee)\n\te.sbx.UpdateAccount(e.pld.From, e.sender)\n\n\tfor _, r := range e.recipients {\n\t\tr.Account.AddToBalance(r.Amount)\n\n\t\te.sbx.UpdateAccount(r.Address, r.Account)\n\t}\n}\n"
  },
  {
    "path": "execution/executor/batch_transfer_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestExecuteBatchTransferTx(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tsenderBalance := senderAcc.Balance()\n\treceiverAddr1 := td.RandAccAddress()\n\treceiverAddr2 := td.RandAccAddress()\n\n\tamt := td.RandAmountRange(0, senderBalance)\n\tamt1 := td.RandAmount(amt / 2)\n\tamt2 := td.RandAmount(amt / 2)\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandAccAddress()\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{To: receiverAddr1, Amount: amt1},\n\t\t\t{To: receiverAddr2, Amount: amt2},\n\t\t}\n\t\ttrx := tx.NewBatchTransferTx(lockTime, randomAddr, recipients, fee)\n\n\t\ttd.check(t, trx, true, AccountNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, AccountNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, insufficient balance\", func(t *testing.T) {\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{To: receiverAddr1, Amount: senderBalance + 1},\n\t\t\t{To: receiverAddr2, Amount: senderBalance + 1},\n\t\t}\n\t\ttrx := tx.NewBatchTransferTx(lockTime, senderAddr, recipients, 0)\n\n\t\ttd.check(t, trx, true, ErrInsufficientFunds)\n\t\ttd.check(t, trx, false, ErrInsufficientFunds)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{To: receiverAddr1, Amount: amt1},\n\t\t\t{To: receiverAddr2, Amount: amt2},\n\t\t}\n\t\ttrx := tx.NewBatchTransferTx(lockTime, senderAddr, recipients, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedSenderAcc := td.sbx.Account(senderAddr)\n\tupdatedReceiverAcc1 := td.sbx.Account(receiverAddr1)\n\tupdatedReceiverAcc2 := td.sbx.Account(receiverAddr2)\n\n\tassert.Equal(t, senderBalance-(amt1+amt2+fee), updatedSenderAcc.Balance())\n\tassert.Equal(t, amt1, updatedReceiverAcc1.Balance())\n\tassert.Equal(t, amt2, updatedReceiverAcc2.Balance())\n\n\ttd.checkTotalCoin(t, fee)\n}\n\nfunc TestBatchTransferToSelf(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tamt := td.RandAmountRange(0, senderAcc.Balance())\n\tamt1 := td.RandAmount(amt / 2)\n\tamt2 := td.RandAmount(amt / 2)\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\n\trecipients := []payload.BatchRecipient{\n\t\t{To: td.RandAccAddress(), Amount: amt1},\n\t\t{To: senderAddr, Amount: amt2},\n\t}\n\ttrx := tx.NewBatchTransferTx(lockTime, senderAddr, recipients, fee)\n\ttd.check(t, trx, true, nil)\n\ttd.check(t, trx, false, nil)\n\ttd.execute(t, trx)\n\n\texpectedBalance := senderAcc.Balance() - amt1 - fee // Fee should be deducted\n\tupdatedAcc := td.sbx.Account(senderAddr)\n\tassert.Equal(t, expectedBalance, updatedAcc.Balance())\n\n\ttd.checkTotalCoin(t, fee)\n}\n"
  },
  {
    "path": "execution/executor/bond.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype BondExecutor struct {\n\tsbx      sandbox.Sandbox\n\tpld      *payload.BondPayload\n\tfee      amount.Amount\n\tsender   *account.Account\n\treceiver *validator.Validator\n}\n\nfunc newBondExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*BondExecutor, error) {\n\tpld := trx.Payload().(*payload.BondPayload)\n\n\tsender := sbx.Account(pld.From)\n\tif sender == nil {\n\t\treturn nil, AccountNotFoundError{Address: pld.From}\n\t}\n\n\treceiver := sbx.Validator(pld.To)\n\tif receiver == nil {\n\t\tif pld.PublicKey == nil {\n\t\t\treturn nil, ErrPublicKeyNotSet\n\t\t}\n\t\treceiver = sbx.MakeNewValidator(pld.PublicKey)\n\t} else if pld.PublicKey != nil {\n\t\treturn nil, ErrPublicKeyAlreadySet\n\t}\n\n\treturn &BondExecutor{\n\t\tsbx:      sbx,\n\t\tpld:      pld,\n\t\tfee:      trx.Fee(),\n\t\tsender:   sender,\n\t\treceiver: receiver,\n\t}, nil\n}\n\nfunc (e *BondExecutor) Check(strict bool) error {\n\tif e.receiver.IsUnbonded() {\n\t\treturn ErrValidatorUnbonded\n\t}\n\n\tif e.pld.IsDelegated() {\n\t\tif e.pld.Stake != e.sbx.Params().MaximumStake {\n\t\t\treturn ErrInvalidDelegation\n\t\t}\n\t\tif e.pld.DelegateExpiry <= e.sbx.CurrentHeight() {\n\t\t\treturn ErrDelegateExpiryInPast\n\t\t}\n\t}\n\n\tif e.sender.Balance() < e.pld.Value()+e.fee {\n\t\treturn ErrInsufficientFunds\n\t}\n\n\tif e.pld.Stake < e.sbx.Params().MinimumStake {\n\t\t// This check prevents a potential attack where an attacker could send zero\n\t\t// or a small amount of stake to a full validator, effectively parking the\n\t\t// validator for the bonding period.\n\t\tif e.pld.Stake == 0 || e.pld.Stake+e.receiver.Stake() != e.sbx.Params().MaximumStake {\n\t\t\treturn SmallStakeError{\n\t\t\t\tMinimum: e.sbx.Params().MinimumStake,\n\t\t\t}\n\t\t}\n\t}\n\n\tif e.receiver.Stake()+e.pld.Stake > e.sbx.Params().MaximumStake {\n\t\treturn MaximumStakeError{\n\t\t\tMaximum: e.sbx.Params().MaximumStake,\n\t\t}\n\t}\n\n\tif strict {\n\t\t// In strict mode, bond transactions will be rejected if a validator is\n\t\t// already in the committee.\n\t\t// In non-strict mode, they are added to the transaction pool and\n\t\t// processed once eligible.\n\t\tif e.sbx.Committee().Contains(e.pld.To) {\n\t\t\treturn ErrValidatorInCommittee\n\t\t}\n\n\t\t// In strict mode, bond transactions will be rejected if a validator is\n\t\t// going to join the committee in the next height.\n\t\t// In non-strict mode, they are added to the transaction pool and\n\t\t// processed once eligible.\n\t\tif e.sbx.IsJoinedCommittee(e.pld.To) {\n\t\t\treturn ErrValidatorInCommittee\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (e *BondExecutor) Execute() {\n\te.sender.SubtractFromBalance(e.pld.Stake + e.fee)\n\te.receiver.AddToStake(e.pld.Stake)\n\te.receiver.UpdateLastBondingHeight(e.sbx.CurrentHeight())\n\n\tif e.pld.IsDelegated() {\n\t\te.receiver.SetDelegation(e.pld.DelegateOwner, e.pld.DelegateShare, e.pld.DelegateExpiry)\n\t}\n\n\te.sbx.UpdatePowerDelta(int64(e.pld.Stake))\n\te.sbx.UpdateAccount(e.pld.From, e.sender)\n\te.sbx.UpdateValidator(e.receiver)\n}\n"
  },
  {
    "path": "execution/executor/bond_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestExecuteBondTx(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tsenderBalance := senderAcc.Balance()\n\tvalPub, _ := td.RandBLSKeyPair()\n\treceiverAddr := valPub.ValidatorAddress()\n\n\tamt := td.RandAmountRange(\n\t\ttd.sbx.TestParams.MinimumStake,\n\t\ttd.sbx.TestParams.MaximumStake)\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandAccAddress()\n\t\ttrx := tx.NewBondTx(lockTime, randomAddr, receiverAddr, valPub, amt, fee)\n\n\t\ttd.check(t, trx, true, AccountNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, AccountNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, public key is not set\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, nil, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrPublicKeyNotSet)\n\t\ttd.check(t, trx, false, ErrPublicKeyNotSet)\n\t})\n\n\tt.Run(\"Should fail, public key should not set for existing validators\", func(t *testing.T) {\n\t\trandPub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(randPub)\n\t\ttd.sbx.UpdateValidator(val)\n\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, randPub.ValidatorAddress(), randPub, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrPublicKeyAlreadySet)\n\t\ttd.check(t, trx, false, ErrPublicKeyAlreadySet)\n\t})\n\n\tt.Run(\"Should fail, insufficient balance\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, valPub, senderBalance+1, 0)\n\n\t\ttd.check(t, trx, true, ErrInsufficientFunds)\n\t\ttd.check(t, trx, false, ErrInsufficientFunds)\n\t})\n\n\tt.Run(\"Should fail, unbonded before\", func(t *testing.T) {\n\t\trandPub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(randPub)\n\t\tval.UpdateUnbondingHeight(td.RandHeight())\n\t\ttd.sbx.UpdateValidator(val)\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, randPub.ValidatorAddress(), nil, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrValidatorUnbonded)\n\t\ttd.check(t, trx, false, ErrValidatorUnbonded)\n\t})\n\n\tt.Run(\"Should fail, amount less than MinimumStake\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, valPub, td.sbx.TestParams.MinimumStake-1, fee)\n\n\t\ttd.check(t, trx, true, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t\ttd.check(t, trx, false, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t})\n\n\tt.Run(\"Should fail, validator's stake exceeds the MaximumStake\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, valPub, td.sbx.TestParams.MaximumStake+1, fee)\n\n\t\ttd.check(t, trx, true, MaximumStakeError{td.sbx.TestParams.MaximumStake})\n\t\ttd.check(t, trx, false, MaximumStakeError{td.sbx.TestParams.MaximumStake})\n\t})\n\n\tt.Run(\"Should fail, inside committee\", func(t *testing.T) {\n\t\tpub0 := td.sbx.Committee().Proposer(0).PublicKey()\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, pub0.ValidatorAddress(), nil, 1e9, fee)\n\n\t\ttd.check(t, trx, true, ErrValidatorInCommittee)\n\t\ttd.check(t, trx, false, nil)\n\t})\n\n\tt.Run(\"Should fail, joining committee\", func(t *testing.T) {\n\t\trandPub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(randPub)\n\t\ttd.sbx.UpdateValidator(val)\n\t\ttd.sbx.JoinedToCommittee(val.Address())\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, randPub.ValidatorAddress(), nil, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrValidatorInCommittee)\n\t\ttd.check(t, trx, false, nil)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, valPub, amt, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedSenderAcc := td.sbx.Account(senderAddr)\n\tupdatedReceiverVal := td.sbx.Validator(receiverAddr)\n\tassert.Equal(t, senderBalance-(amt+fee), updatedSenderAcc.Balance())\n\tassert.Equal(t, amt, updatedReceiverVal.Stake())\n\tassert.Equal(t, lockTime, updatedReceiverVal.LastBondingHeight())\n\n\ttd.checkTotalCoin(t, fee)\n}\n\nfunc TestPowerDeltaBond(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, _ := td.sbx.TestStore.RandomTestAcc()\n\tpub, _ := td.RandBLSKeyPair()\n\treceiverAddr := pub.ValidatorAddress()\n\tamt := td.RandAmountRange(\n\t\ttd.sbx.TestParams.MinimumStake,\n\t\ttd.sbx.TestParams.MaximumStake)\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, pub, amt, fee)\n\n\ttd.execute(t, trx)\n\n\tassert.Equal(t, int64(amt), td.sbx.PowerDelta())\n}\n\n// TestSmallBond tests scenarios involving small and zero stake amounts in bond transactions.\n// This test suite is designed to address the issue reported on GitHub:\n// https://github.com/pactus-project/pactus/issues/1223\nfunc TestSmallBond(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, _ := td.sbx.TestStore.RandomTestAcc()\n\treceiverPub, _ := td.RandBLSKeyPair()\n\treceiverAddr := receiverPub.ValidatorAddress()\n\treceiverVal := td.sbx.MakeNewValidator(receiverPub)\n\treceiverVal.AddToStake(td.sbx.TestParams.MaximumStake - 2)\n\ttd.sbx.UpdateValidator(receiverVal)\n\tlockTime := td.sbx.CurrentHeight()\n\tfee := td.RandFee()\n\n\tt.Run(\"Rejects bond transaction with zero amount\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, nil, 0, fee)\n\n\t\ttd.check(t, trx, true, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t\ttd.check(t, trx, false, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t})\n\n\tt.Run(\"Rejects bond transaction below full validator stake\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, nil, 1, fee)\n\n\t\ttd.check(t, trx, true, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t\ttd.check(t, trx, false, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t})\n\n\tt.Run(\"Accepts bond transaction reaching full validator stake\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, nil, 2, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tt.Run(\"Rejects bond transaction with zero amount on full validator\", func(t *testing.T) {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, nil, 0, fee)\n\n\t\ttd.check(t, trx, true, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t\ttd.check(t, trx, false, SmallStakeError{td.sbx.TestParams.MinimumStake})\n\t})\n\n\treceiverValAfterExecution, _ := td.sbx.TestStore.Validator(receiverVal.Address())\n\tassert.Equal(t, td.sbx.Params().MaximumStake, receiverValAfterExecution.Stake())\n}\n\nfunc TestExecuteDelegatedBondTx(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tsenderBalance := senderAcc.Balance()\n\tvalPub, _ := td.RandBLSKeyPair()\n\treceiverAddr := valPub.ValidatorAddress()\n\tlockTime := td.sbx.CurrentHeight()\n\tfee := td.RandFee()\n\towner := td.RandAccAddress()\n\tdelegateShare := td.RandAmountRange(0, param.MaxDelegateOwnerRewardShare)\n\tdelegateExpiry := td.sbx.CurrentHeight() + 1\n\n\tmakeDelegatedBond := func(stake amount.Amount) *tx.Tx {\n\t\ttrx := tx.NewBondTx(lockTime, senderAddr, receiverAddr, valPub, stake, fee)\n\t\tpld := trx.Payload().(*payload.BondPayload)\n\t\tpld.DelegateOwner = owner\n\t\tpld.DelegateShare = delegateShare\n\t\tpld.DelegateExpiry = delegateExpiry\n\n\t\treturn trx\n\t}\n\n\tt.Run(\"Should fail, delegation stake must equal maximum\", func(t *testing.T) {\n\t\ttrx := makeDelegatedBond(td.sbx.TestParams.MaximumStake - 1)\n\n\t\ttd.check(t, trx, true, ErrInvalidDelegation)\n\t\ttd.check(t, trx, false, ErrInvalidDelegation)\n\t})\n\n\tt.Run(\"Should fail, delegate expiry is in past/current height\", func(t *testing.T) {\n\t\ttrx := makeDelegatedBond(td.sbx.TestParams.MaximumStake)\n\t\tpld := trx.Payload().(*payload.BondPayload)\n\t\tpld.DelegateExpiry = td.sbx.CurrentHeight()\n\n\t\ttd.check(t, trx, true, ErrDelegateExpiryInPast)\n\t\ttd.check(t, trx, false, ErrDelegateExpiryInPast)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := makeDelegatedBond(td.sbx.TestParams.MaximumStake)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedSenderAcc := td.sbx.Account(senderAddr)\n\tupdatedReceiverVal := td.sbx.Validator(receiverAddr)\n\tassert.Equal(t, senderBalance-(td.sbx.TestParams.MaximumStake+fee), updatedSenderAcc.Balance())\n\tassert.Equal(t, td.sbx.TestParams.MaximumStake, updatedReceiverVal.Stake())\n\tassert.Equal(t, owner, updatedReceiverVal.DelegateOwner())\n\tassert.Equal(t, delegateShare, updatedReceiverVal.DelegateShare())\n\tassert.Equal(t, delegateExpiry, updatedReceiverVal.DelegateExpiry())\n\tassert.True(t, updatedReceiverVal.IsDelegated())\n}\n"
  },
  {
    "path": "execution/executor/errors.go",
    "content": "package executor\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\n// ErrInsufficientFunds indicates that the balance is insufficient for the transaction.\nvar ErrInsufficientFunds = errors.New(\"insufficient funds\")\n\n// ErrPublicKeyNotSet indicates that the public key is not set for the initial Bond transaction.\nvar ErrPublicKeyNotSet = errors.New(\"public key is not set\")\n\n// ErrPublicKeyAlreadySet indicates that the public key has already been set for the given validator.\nvar ErrPublicKeyAlreadySet = errors.New(\"public key is already set\")\n\n// ErrValidatorBonded indicates that the validator is bonded.\nvar ErrValidatorBonded = errors.New(\"validator is bonded\")\n\n// ErrValidatorUnbonded indicates that the validator has unbonded.\nvar ErrValidatorUnbonded = errors.New(\"validator has unbonded\")\n\n// ErrBondingPeriod is returned when a validator is in the bonding period.\nvar ErrBondingPeriod = errors.New(\"validator in bonding period\")\n\n// ErrUnbondingPeriod is returned when a validator is in the unbonding period.\nvar ErrUnbondingPeriod = errors.New(\"validator in unbonding period\")\n\n// ErrInvalidSortitionProof indicates that the sortition proof is invalid.\nvar ErrInvalidSortitionProof = errors.New(\"invalid sortition proof\")\n\n// ErrExpiredSortition indicates that the sortition transaction is duplicated or expired.\nvar ErrExpiredSortition = errors.New(\"expired sortition\")\n\n// ErrValidatorInCommittee indicates that the validator is in the committee.\nvar ErrValidatorInCommittee = errors.New(\"validator is in the committee\")\n\n// ErrCommitteeJoinLimitExceeded indicates that at each height,\n// the maximum stake joining the committee can't be more than 1/3 of the committee's total stake.\nvar ErrCommitteeJoinLimitExceeded = errors.New(\n\t\"the maximum stake joining the committee can't be more than 1/3 of the committee's total stake\")\n\n// ErrCommitteeLeaveLimitExceeded indicates that at each height,\n// the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake.\nvar ErrCommitteeLeaveLimitExceeded = errors.New(\n\t\"the maximum stake leaving the committee can't be more than 1/3 of the committee's total stake\")\n\n// ErrOldestValidatorNotProposed indicates that the oldest validator has not proposed any block yet.\nvar ErrOldestValidatorNotProposed = errors.New(\"oldest validator has not proposed any block yet\")\n\n// ErrInvalidBlockVersion is returned when the block version is invalid.\nvar ErrInvalidBlockVersion = errors.New(\"invalid block version\")\n\n// ErrInvalidDelegation is returned when the delegation parameters are invalid.\nvar ErrInvalidDelegation = errors.New(\"invalid delegation\")\n\n// ErrDelegateExpiryInPast is returned when the delegate expiry is in the past.\nvar ErrDelegateExpiryInPast = errors.New(\"delegate expiry must be in the future\")\n\n// ErrWithdrawMustGoToStakeOwner is returned when the withdrawal is not going to the stake owner.\nvar ErrWithdrawMustGoToStakeOwner = errors.New(\"delegated validator withdraw must go to stake owner\")\n\n// ErrInvalidDelegateOwner is returned when the delegate owner is invalid.\nvar ErrInvalidDelegateOwner = errors.New(\"invalid delegate owner\")\n\n// SmallStakeError is returned when the stake amount is less than the minimum stake.\ntype SmallStakeError struct {\n\tMinimum amount.Amount\n}\n\nfunc (e SmallStakeError) Error() string {\n\treturn fmt.Sprintf(\"stake amount can't be less than %v\", e.Minimum.String())\n}\n\n// MaximumStakeError is returned when the validator's stake exceeds the maximum stake limit.\ntype MaximumStakeError struct {\n\tMaximum amount.Amount\n}\n\nfunc (e MaximumStakeError) Error() string {\n\treturn fmt.Sprintf(\"validator's stake amount can't be more than %v\", e.Maximum.String())\n}\n\n// InvalidPayloadTypeError is returned when the transaction payload type is not valid.\ntype InvalidPayloadTypeError struct {\n\tPayloadType payload.Type\n}\n\nfunc (e InvalidPayloadTypeError) Error() string {\n\treturn fmt.Sprintf(\"unknown payload type: %s\", e.PayloadType.String())\n}\n\n// AccountNotFoundError is raised when the given address has no associated account.\ntype AccountNotFoundError struct {\n\tAddress crypto.Address\n}\n\nfunc (e AccountNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"no account found for address: %s\", e.Address.String())\n}\n\n// ValidatorNotFoundError is raised when the given address has no associated validator.\ntype ValidatorNotFoundError struct {\n\tAddress crypto.Address\n}\n\nfunc (e ValidatorNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"no validator found for address: %s\", e.Address.String())\n}\n"
  },
  {
    "path": "execution/executor/executor.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype Executor interface {\n\tCheck(strict bool) error\n\tExecute()\n}\n\nfunc MakeExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (Executor, error) {\n\tvar exe Executor\n\tvar err error\n\tswitch typ := trx.Payload().Type(); typ {\n\tcase payload.TypeTransfer:\n\t\texe, err = newTransferExecutor(trx, sbx)\n\tcase payload.TypeBond:\n\t\texe, err = newBondExecutor(trx, sbx)\n\tcase payload.TypeUnbond:\n\t\texe, err = newUnbondExecutor(trx, sbx)\n\tcase payload.TypeWithdraw:\n\t\texe, err = newWithdrawExecutor(trx, sbx)\n\tcase payload.TypeSortition:\n\t\texe, err = newSortitionExecutor(trx, sbx)\n\tcase payload.TypeBatchTransfer:\n\t\texe, err = newBatchTransferExecutor(trx, sbx)\n\tdefault:\n\t\treturn nil, InvalidPayloadTypeError{\n\t\t\tPayloadType: typ,\n\t\t}\n\t}\n\n\treturn exe, err\n}\n"
  },
  {
    "path": "execution/executor/executor_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tsbx *sandbox.MockSandbox\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tsbx := sandbox.MockingSandbox(ts)\n\trandHeight := ts.RandHeight(\n\t\ttestsuite.HeightWithMin(sbx.TestParams.UnbondInterval))\n\t_ = sbx.TestStore.AddTestBlock(randHeight)\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tsbx:       sbx,\n\t}\n}\n\nfunc (td *testData) checkTotalCoin(t *testing.T, fee amount.Amount) {\n\tt.Helper()\n\n\ttotal := amount.Amount(0)\n\tfor _, acc := range td.sbx.TestStore.Accounts {\n\t\ttotal += acc.Balance()\n\t}\n\n\tfor _, val := range td.sbx.TestStore.Validators {\n\t\ttotal += val.Stake()\n\t}\n\tassert.Equal(t, total+fee, amount.Amount(21_000_000*1e9))\n}\n\nfunc (td *testData) check(t *testing.T, trx *tx.Tx, strict bool, expectedErr error) {\n\tt.Helper()\n\n\texe, err := MakeExecutor(trx, td.sbx)\n\tif err != nil {\n\t\trequire.ErrorIs(t, err, expectedErr)\n\n\t\treturn\n\t}\n\n\terr = exe.Check(strict)\n\trequire.ErrorIs(t, err, expectedErr)\n}\n\nfunc (td *testData) execute(t *testing.T, trx *tx.Tx) {\n\tt.Helper()\n\n\texe, err := MakeExecutor(trx, td.sbx)\n\trequire.NoError(t, err)\n\n\texe.Execute()\n}\n"
  },
  {
    "path": "execution/executor/sortition.go",
    "content": "package executor\n\nimport (\n\t\"cmp\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype SortitionExecutor struct {\n\tsbx             sandbox.Sandbox\n\tpld             *payload.SortitionPayload\n\tvalidator       *validator.Validator\n\tsortitionHeight types.Height\n}\n\nfunc newSortitionExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*SortitionExecutor, error) {\n\tpld := trx.Payload().(*payload.SortitionPayload)\n\n\tval := sbx.Validator(pld.Validator)\n\tif val == nil {\n\t\treturn nil, ValidatorNotFoundError{\n\t\t\tAddress: pld.Validator,\n\t\t}\n\t}\n\n\treturn &SortitionExecutor{\n\t\tpld:             pld,\n\t\tsbx:             sbx,\n\t\tvalidator:       val,\n\t\tsortitionHeight: trx.LockTime(),\n\t}, nil\n}\n\nfunc (e *SortitionExecutor) Check(strict bool) error {\n\tif e.sbx.CurrentHeight().SafeSub(e.validator.LastBondingHeight()) < e.sbx.Params().BondInterval {\n\t\treturn ErrBondingPeriod\n\t}\n\n\tok := e.sbx.VerifyProof(e.sortitionHeight, e.pld.Proof, e.validator)\n\tif !ok {\n\t\treturn ErrInvalidSortitionProof\n\t}\n\n\t// Check for the duplicated or expired sortition transactions\n\tif e.sortitionHeight <= e.validator.LastSortitionHeight() {\n\t\treturn ErrExpiredSortition\n\t}\n\n\tif strict {\n\t\tif err := e.canJoinCommittee(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (e *SortitionExecutor) canJoinCommittee() error {\n\tif e.sbx.Committee().Size() < e.sbx.Params().CommitteeSize {\n\t\t// There are available seats in the committee.\n\t\tif e.sbx.Committee().Contains(e.pld.Validator) {\n\t\t\treturn ErrValidatorInCommittee\n\t\t}\n\n\t\treturn nil\n\t}\n\n\t// The committee is full, check if the validator can join the committee.\n\tjoiningNum := 0\n\tjoiningPower := int64(0)\n\tcommittee := e.sbx.Committee()\n\te.sbx.IterateValidators(func(val *validator.Validator, _ bool, joined bool) {\n\t\tif joined {\n\t\t\tif !committee.Contains(val.Address()) {\n\t\t\t\tjoiningPower += val.Power()\n\t\t\t\tjoiningNum++\n\t\t\t}\n\t\t}\n\t})\n\tif !committee.Contains(e.pld.Validator) {\n\t\tjoiningPower += e.validator.Power()\n\t\tjoiningNum++\n\t}\n\tif joiningPower >= (committee.TotalPower() / 3) {\n\t\treturn ErrCommitteeJoinLimitExceeded\n\t}\n\n\tvals := committee.Validators()\n\tslices.SortStableFunc(vals, func(a, b *validator.Validator) int {\n\t\treturn cmp.Compare(a.LastSortitionHeight(), b.LastSortitionHeight())\n\t})\n\tleavingPower := int64(0)\n\tfor i := 0; i < joiningNum; i++ {\n\t\tleavingPower += vals[i].Power()\n\t}\n\tif leavingPower >= (committee.TotalPower() / 3) {\n\t\treturn ErrCommitteeLeaveLimitExceeded\n\t}\n\n\toldestSortitionHeight := e.sbx.CurrentHeight()\n\tfor _, v := range committee.Validators() {\n\t\tif v.LastSortitionHeight() < oldestSortitionHeight {\n\t\t\toldestSortitionHeight = v.LastSortitionHeight()\n\t\t}\n\t}\n\n\t// If the oldest validator in the committee still hasn't propose a block yet,\n\t// it stays in the committee.\n\tproposerHeight := e.sbx.Committee().Proposer(0).LastSortitionHeight()\n\tif oldestSortitionHeight >= proposerHeight {\n\t\treturn ErrOldestValidatorNotProposed\n\t}\n\n\treturn nil\n}\n\nfunc (e *SortitionExecutor) Execute() {\n\te.validator.UpdateLastSortitionHeight(e.sortitionHeight)\n\n\te.sbx.JoinedToCommittee(e.pld.Validator)\n\te.sbx.UpdateValidator(e.validator)\n}\n"
  },
  {
    "path": "execution/executor/sortition_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc updateCommittee(td *testData) {\n\tjoiningCommittee := make([]*validator.Validator, 0)\n\ttd.sbx.IterateValidators(func(val *validator.Validator, _ bool, joined bool) {\n\t\tif joined {\n\t\t\tjoiningCommittee = append(joiningCommittee, val)\n\t\t}\n\t})\n\n\ttd.sbx.TestCommittee.Update(0, joiningCommittee)\n\ttd.sbx.TestJoinedValidators = make(map[crypto.Address]bool)\n}\n\nfunc TestExecuteSortitionTx(t *testing.T) {\n\ttd := setup(t)\n\n\tbonderAddr, bonderAcc := td.sbx.TestStore.RandomTestAcc()\n\tbonderBalance := bonderAcc.Balance()\n\tstake := td.RandAmountRange(\n\t\ttd.sbx.TestParams.MinimumStake,\n\t\tbonderBalance)\n\tbonderAcc.SubtractFromBalance(stake)\n\ttd.sbx.UpdateAccount(bonderAddr, bonderAcc)\n\n\tvalPub, _ := td.RandBLSKeyPair()\n\tvalAddr := valPub.ValidatorAddress()\n\tval := td.sbx.MakeNewValidator(valPub)\n\tval.AddToStake(stake)\n\ttd.sbx.UpdateValidator(val)\n\n\tcurHeight := td.sbx.CurrentHeight()\n\tlockTime := td.sbx.CurrentHeight()\n\tproof := td.RandProof()\n\n\tval.UpdateLastBondingHeight(curHeight.SafeDecrease(td.sbx.Params().BondInterval - 1))\n\tval.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val)\n\n\tassert.False(t, td.sbx.IsJoinedCommittee(val.Address()))\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandAccAddress()\n\t\ttrx := tx.NewSortitionTx(lockTime, randomAddr, proof)\n\n\t\ttd.check(t, trx, true, ValidatorNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, ValidatorNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, Bonding period\", func(t *testing.T) {\n\t\ttrx := tx.NewSortitionTx(lockTime, val.Address(), proof)\n\n\t\ttd.check(t, trx, true, ErrBondingPeriod)\n\t\ttd.check(t, trx, false, ErrBondingPeriod)\n\t})\n\n\t// Let's add one more block\n\ttd.sbx.TestStore.AddTestBlock(curHeight)\n\n\tt.Run(\"Should fail, invalid proof\", func(t *testing.T) {\n\t\ttrx := tx.NewSortitionTx(lockTime, val.Address(), proof)\n\t\ttd.sbx.TestAcceptSortition = false\n\t\ttd.check(t, trx, true, ErrInvalidSortitionProof)\n\t\ttd.check(t, trx, false, ErrInvalidSortitionProof)\n\t})\n\n\tt.Run(\"Should fail, committee has free seats and validator is in the committee\", func(t *testing.T) {\n\t\tval0 := td.sbx.Committee().Proposer(0)\n\t\tval0.UpdateLastSortitionHeight(lockTime - 1)\n\t\tval0.UpdateLastBondingHeight(curHeight.SafeDecrease(td.sbx.Params().BondInterval + 1))\n\t\ttd.sbx.UpdateValidator(val0)\n\n\t\ttrx := tx.NewSortitionTx(lockTime, val0.Address(), proof)\n\t\ttd.sbx.TestAcceptSortition = true\n\n\t\ttd.check(t, trx, true, ErrValidatorInCommittee)\n\t\ttd.check(t, trx, false, nil)\n\t})\n\n\tt.Run(\"Should be ok\", func(t *testing.T) {\n\t\ttrx := tx.NewSortitionTx(lockTime, val.Address(), proof)\n\t\ttd.sbx.TestAcceptSortition = true\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tt.Run(\"Should fail, expired sortition\", func(t *testing.T) {\n\t\ttrx := tx.NewSortitionTx(lockTime-1, val.Address(), proof)\n\t\ttd.sbx.TestAcceptSortition = true\n\t\ttd.check(t, trx, true, ErrExpiredSortition)\n\t\ttd.check(t, trx, false, ErrExpiredSortition)\n\t})\n\n\tt.Run(\"Should fail, duplicated sortition\", func(t *testing.T) {\n\t\ttrx := tx.NewSortitionTx(lockTime, val.Address(), proof)\n\n\t\ttd.check(t, trx, true, ErrExpiredSortition)\n\t\ttd.check(t, trx, false, ErrExpiredSortition)\n\t})\n\n\tupdatedVal := td.sbx.Validator(valAddr)\n\n\tassert.Equal(t, lockTime, updatedVal.LastSortitionHeight())\n\tassert.True(t, td.sbx.IsJoinedCommittee(val.Address()))\n\n\ttd.checkTotalCoin(t, 0)\n}\n\nfunc TestChangePower1(t *testing.T) {\n\ttd := setup(t)\n\n\t// This moves proposer to next validator\n\tupdateCommittee(td)\n\n\tlockTime := td.sbx.CurrentHeight()\n\tproof := td.RandProof()\n\n\t// Let's create validators first\n\tpub1, _ := td.RandBLSKeyPair()\n\tamt1 := td.sbx.Committee().TotalPower() / 3\n\tval1 := td.sbx.MakeNewValidator(pub1)\n\tval1.AddToStake(amount.Amount(amt1 - 1))\n\tval1.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\tval1.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val1)\n\n\tpub2, _ := td.RandBLSKeyPair()\n\tval2 := td.sbx.MakeNewValidator(pub2)\n\tval2.AddToStake(2)\n\tval2.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\tval2.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val2)\n\n\tval3 := td.sbx.Committee().Proposer(0)\n\tval3.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val3)\n\n\ttd.sbx.TestParams.CommitteeSize = 4\n\ttd.sbx.TestAcceptSortition = true\n\ttrx1 := tx.NewSortitionTx(lockTime, val1.Address(), proof)\n\ttd.check(t, trx1, true, nil)\n\ttd.check(t, trx1, false, nil)\n\ttd.execute(t, trx1)\n\n\ttrx2 := tx.NewSortitionTx(lockTime, val2.Address(), proof)\n\ttd.check(t, trx2, true, ErrCommitteeJoinLimitExceeded)\n\ttd.check(t, trx2, false, nil)\n\n\t// Val3 is a Committee member\n\ttrx3 := tx.NewSortitionTx(lockTime, val3.Address(), proof)\n\ttd.check(t, trx3, true, nil)\n\ttd.check(t, trx3, false, nil)\n}\n\nfunc TestChangePower2(t *testing.T) {\n\ttd := setup(t)\n\n\t// This moves proposer to next validator\n\tupdateCommittee(td)\n\n\tlockTime := td.sbx.CurrentHeight()\n\tproof := td.RandProof()\n\n\t// Let's create validators first\n\tpub1, _ := td.RandBLSKeyPair()\n\tval1 := td.sbx.MakeNewValidator(pub1)\n\tval1.AddToStake(1)\n\tval1.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\tval1.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val1)\n\n\tpub2, _ := td.RandBLSKeyPair()\n\tval2 := td.sbx.MakeNewValidator(pub2)\n\tval2.AddToStake(1)\n\tval2.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\tval2.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val2)\n\n\tpub3, _ := td.RandBLSKeyPair()\n\tval3 := td.sbx.MakeNewValidator(pub3)\n\tval3.AddToStake(1)\n\tval3.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\tval3.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val3)\n\n\tval4 := td.sbx.Committee().Proposer(0)\n\tval4.UpdateLastSortitionHeight(lockTime - 1)\n\ttd.sbx.UpdateValidator(val4)\n\n\ttd.sbx.TestParams.CommitteeSize = 7\n\ttd.sbx.TestAcceptSortition = true\n\ttrx1 := tx.NewSortitionTx(lockTime, val1.Address(), proof)\n\ttd.check(t, trx1, true, nil)\n\ttd.check(t, trx1, false, nil)\n\ttd.execute(t, trx1)\n\n\ttrx2 := tx.NewSortitionTx(lockTime, val2.Address(), proof)\n\ttd.check(t, trx2, true, nil)\n\ttd.check(t, trx2, false, nil)\n\ttd.execute(t, trx2)\n\n\ttrx3 := tx.NewSortitionTx(lockTime, val3.Address(), proof)\n\ttd.check(t, trx3, true, ErrCommitteeLeaveLimitExceeded)\n\ttd.check(t, trx3, false, nil)\n\n\t// Committee member\n\ttrx4 := tx.NewSortitionTx(lockTime, val4.Address(), proof)\n\ttd.check(t, trx4, true, nil)\n\ttd.check(t, trx4, false, nil)\n\ttd.execute(t, trx4)\n}\n\n// TestOldestDidNotPropose tests if the oldest validator in the committee had\n// chance to propose a block or not.\nfunc TestOldestDidNotPropose(t *testing.T) {\n\ttd := setup(t)\n\n\t// Let's create validators first\n\tvals := make([]*validator.Validator, 9)\n\tfor index := 0; index < 9; index++ {\n\t\tpub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(pub)\n\t\tval.AddToStake(10 * 1e9)\n\t\tval.UpdateLastBondingHeight(\n\t\t\ttd.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().BondInterval))\n\t\ttd.sbx.UpdateValidator(val)\n\t\tvals[index] = val\n\t}\n\n\ttd.sbx.TestParams.CommitteeSize = 7\n\ttd.sbx.TestAcceptSortition = true\n\n\t// This moves proposer to the next validator\n\tupdateCommittee(td)\n\n\t// Let's update committee\n\theight := td.sbx.CurrentHeight()\n\tfor i := uint32(0); i < 7; i++ {\n\t\theight++\n\t\t_ = td.sbx.TestStore.AddTestBlock(height)\n\n\t\tlockTime := height\n\t\ttrx := tx.NewSortitionTx(lockTime, vals[i].Address(), td.RandProof())\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\n\t\tupdateCommittee(td)\n\t}\n\n\theight++\n\t_ = td.sbx.TestStore.AddTestBlock(height)\n\tlockTime := td.sbx.CurrentHeight()\n\n\ttrx1 := tx.NewSortitionTx(lockTime, vals[7].Address(), td.RandProof())\n\ttd.check(t, trx1, true, nil)\n\ttd.check(t, trx1, false, nil)\n\ttd.execute(t, trx1)\n\n\ttrx2 := tx.NewSortitionTx(lockTime, vals[8].Address(), td.RandProof())\n\ttd.check(t, trx2, true, nil)\n\ttd.check(t, trx2, false, nil)\n\ttd.execute(t, trx2)\n\n\tupdateCommittee(td)\n\n\theight++\n\t_ = td.sbx.TestStore.AddTestBlock(height)\n\t// Entering validator 16\n\ttrx3 := tx.NewSortitionTx(lockTime+1, vals[8].Address(), td.RandProof())\n\ttd.check(t, trx3, true, ErrOldestValidatorNotProposed)\n\ttd.check(t, trx3, false, nil)\n\ttd.execute(t, trx3)\n}\n"
  },
  {
    "path": "execution/executor/transfer.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\ntype TransferExecutor struct {\n\tsbx      sandbox.Sandbox\n\tpld      *payload.TransferPayload\n\tfee      amount.Amount\n\tsender   *account.Account\n\treceiver *account.Account\n}\n\nfunc newTransferExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*TransferExecutor, error) {\n\tpld := trx.Payload().(*payload.TransferPayload)\n\n\tsender := sbx.Account(pld.From)\n\tif sender == nil {\n\t\treturn nil, AccountNotFoundError{Address: pld.From}\n\t}\n\n\tvar receiver *account.Account\n\tif pld.To == pld.From {\n\t\treceiver = sender\n\t} else {\n\t\treceiver = sbx.Account(pld.To)\n\t\tif receiver == nil {\n\t\t\treceiver = sbx.MakeNewAccount(pld.To)\n\t\t}\n\t}\n\n\treturn &TransferExecutor{\n\t\tsbx:      sbx,\n\t\tpld:      pld,\n\t\tfee:      trx.Fee(),\n\t\tsender:   sender,\n\t\treceiver: receiver,\n\t}, nil\n}\n\nfunc (e *TransferExecutor) Check(_ bool) error {\n\tif e.sender.Balance() < e.pld.Amount+e.fee {\n\t\treturn ErrInsufficientFunds\n\t}\n\n\treturn nil\n}\n\nfunc (e *TransferExecutor) Execute() {\n\te.sender.SubtractFromBalance(e.pld.Amount + e.fee)\n\te.receiver.AddToBalance(e.pld.Amount)\n\n\te.sbx.UpdateAccount(e.pld.From, e.sender)\n\te.sbx.UpdateAccount(e.pld.To, e.receiver)\n}\n"
  },
  {
    "path": "execution/executor/transfer_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestExecuteTransferTx(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tsenderBalance := senderAcc.Balance()\n\treceiverAddr := td.RandAccAddress()\n\n\tamt := td.RandAmountRange(0, senderBalance)\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandAccAddress()\n\t\ttrx := tx.NewTransferTx(lockTime, randomAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, AccountNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, AccountNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, insufficient balance\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(lockTime, senderAddr, receiverAddr, senderBalance+1, 0)\n\n\t\ttd.check(t, trx, true, ErrInsufficientFunds)\n\t\ttd.check(t, trx, false, ErrInsufficientFunds)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(lockTime, senderAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedSenderAcc := td.sbx.Account(senderAddr)\n\tupdatedReceiverAcc := td.sbx.Account(receiverAddr)\n\n\tassert.Equal(t, senderBalance-(amt+fee), updatedSenderAcc.Balance())\n\tassert.Equal(t, amt, updatedReceiverAcc.Balance())\n\n\ttd.checkTotalCoin(t, fee)\n}\n\nfunc TestTransferToSelf(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderAddr, senderAcc := td.sbx.TestStore.RandomTestAcc()\n\tamt := td.RandAmountRange(0, senderAcc.Balance())\n\tfee := td.RandFee()\n\tlockTime := td.sbx.CurrentHeight()\n\n\ttrx := tx.NewTransferTx(lockTime, senderAddr, senderAddr, amt, fee)\n\ttd.check(t, trx, true, nil)\n\ttd.check(t, trx, false, nil)\n\ttd.execute(t, trx)\n\n\texpectedBalance := senderAcc.Balance() - fee // Fee should be deducted\n\tupdatedAcc := td.sbx.Account(senderAddr)\n\tassert.Equal(t, expectedBalance, updatedAcc.Balance())\n\n\ttd.checkTotalCoin(t, fee)\n}\n"
  },
  {
    "path": "execution/executor/unbond.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype UnbondExecutor struct {\n\tsbx       sandbox.Sandbox\n\tpld       *payload.UnbondPayload\n\tvalidator *validator.Validator\n}\n\nfunc newUnbondExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*UnbondExecutor, error) {\n\tpld := trx.Payload().(*payload.UnbondPayload)\n\n\tval := sbx.Validator(pld.Validator)\n\tif val == nil {\n\t\treturn nil, ValidatorNotFoundError{Address: pld.Validator}\n\t}\n\n\treturn &UnbondExecutor{\n\t\tsbx:       sbx,\n\t\tpld:       pld,\n\t\tvalidator: val,\n\t}, nil\n}\n\nfunc (e *UnbondExecutor) Check(strict bool) error {\n\tif e.validator.IsUnbonded() {\n\t\treturn ErrValidatorUnbonded\n\t}\n\n\tif e.validator.IsDelegated() {\n\t\tif e.pld.DelegateOwner != e.validator.DelegateOwner() {\n\t\t\treturn ErrInvalidDelegateOwner\n\t\t}\n\t}\n\n\tif strict {\n\t\t// In strict mode, the unbond transaction will be rejected if the\n\t\t// validator is in the committee.\n\t\t// In non-strict mode, they are added to the transaction pool and\n\t\t// processed once eligible.\n\t\tif e.sbx.Committee().Contains(e.pld.Validator) {\n\t\t\treturn ErrValidatorInCommittee\n\t\t}\n\n\t\t// In strict mode, unbond transactions will be rejected if a validator is\n\t\t// going to be in the committee for the next height.\n\t\t// In non-strict mode, they are added to the transaction pool and\n\t\t// processed once eligible.\n\t\tif e.sbx.IsJoinedCommittee(e.pld.Validator) {\n\t\t\treturn ErrValidatorInCommittee\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (e *UnbondExecutor) Execute() {\n\tunbondedPower := e.validator.Power()\n\te.validator.UpdateUnbondingHeight(e.sbx.CurrentHeight())\n\n\t// The validator's power is reduced to zero,\n\t// so we update the power delta with the negative value of the validator's power.\n\te.sbx.UpdatePowerDelta(-1 * unbondedPower)\n\te.sbx.UpdateValidator(e.validator)\n}\n"
  },
  {
    "path": "execution/executor/unbond_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestExecuteUnbondTx(t *testing.T) {\n\ttd := setup(t)\n\n\tbonderAddr, bonderAcc := td.sbx.TestStore.RandomTestAcc()\n\tbonderBalance := bonderAcc.Balance()\n\tstake := td.RandAmountRange(\n\t\ttd.sbx.TestParams.MinimumStake,\n\t\tbonderBalance)\n\tbonderAcc.SubtractFromBalance(stake)\n\ttd.sbx.UpdateAccount(bonderAddr, bonderAcc)\n\n\tvalPub, _ := td.RandBLSKeyPair()\n\tvalAddr := valPub.ValidatorAddress()\n\tval := td.sbx.MakeNewValidator(valPub)\n\tval.AddToStake(stake)\n\ttd.sbx.UpdateValidator(val)\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandValAddress()\n\t\ttrx := tx.NewUnbondTx(lockTime, randomAddr)\n\n\t\ttd.check(t, trx, true, ValidatorNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, ValidatorNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, inside committee\", func(t *testing.T) {\n\t\tval0 := td.sbx.Committee().Proposer(0)\n\t\ttrx := tx.NewUnbondTx(lockTime, val0.Address())\n\n\t\ttd.check(t, trx, true, ErrValidatorInCommittee)\n\t\ttd.check(t, trx, false, nil)\n\t})\n\n\tt.Run(\"Should fail, joining committee\", func(t *testing.T) {\n\t\trandPub, _ := td.RandBLSKeyPair()\n\t\trandVal := td.sbx.MakeNewValidator(randPub)\n\t\ttd.sbx.UpdateValidator(randVal)\n\t\ttd.sbx.JoinedToCommittee(randVal.Address())\n\t\ttrx := tx.NewUnbondTx(lockTime, randPub.ValidatorAddress())\n\n\t\ttd.check(t, trx, true, ErrValidatorInCommittee)\n\t\ttd.check(t, trx, false, nil)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := tx.NewUnbondTx(lockTime, valAddr)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tt.Run(\"Should fail, Cannot unbond if already unbonded\", func(t *testing.T) {\n\t\ttrx := tx.NewUnbondTx(lockTime, valAddr)\n\n\t\ttd.check(t, trx, true, ErrValidatorUnbonded)\n\t\ttd.check(t, trx, false, ErrValidatorUnbonded)\n\t})\n\n\tupdatedVal := td.sbx.Validator(valAddr)\n\n\tassert.Equal(t, stake, updatedVal.Stake())\n\tassert.Zero(t, updatedVal.Power())\n\tassert.Equal(t, lockTime, updatedVal.UnbondingHeight())\n\tassert.Equal(t, int64(-stake), td.sbx.PowerDelta())\n\n\ttd.checkTotalCoin(t, 0)\n}\n\nfunc TestPowerDeltaUnbond(t *testing.T) {\n\ttd := setup(t)\n\n\tpub, _ := td.RandBLSKeyPair()\n\tvalAddr := pub.ValidatorAddress()\n\tval := td.sbx.MakeNewValidator(pub)\n\tamt := td.RandAmount()\n\tval.AddToStake(amt)\n\ttd.sbx.UpdateValidator(val)\n\tlockTime := td.sbx.CurrentHeight()\n\ttrx := tx.NewUnbondTx(lockTime, valAddr)\n\n\ttd.execute(t, trx)\n\n\tassert.Equal(t, int64(-amt), td.sbx.PowerDelta())\n}\n\nfunc TestExecuteDelegatedUnbondTx(t *testing.T) {\n\ttd := setup(t)\n\n\tvalPub, _ := td.RandBLSKeyPair()\n\tvalAddr := valPub.ValidatorAddress()\n\tval := td.sbx.MakeNewValidator(valPub)\n\tval.AddToStake(td.sbx.TestParams.MaximumStake)\n\towner := td.RandAccAddress()\n\tval.SetDelegation(owner, amount.Amount(0.2e9), td.sbx.CurrentHeight()+10)\n\ttd.sbx.UpdateValidator(val)\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, invalid delegate owner\", func(t *testing.T) {\n\t\ttrx := tx.NewUnbondTx(lockTime, valAddr)\n\t\tpld := trx.Payload().(*payload.UnbondPayload)\n\t\tpld.DelegateOwner = td.RandAccAddress()\n\n\t\ttd.check(t, trx, true, ErrInvalidDelegateOwner)\n\t\ttd.check(t, trx, false, ErrInvalidDelegateOwner)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := tx.NewUnbondTx(lockTime, valAddr)\n\t\tpld := trx.Payload().(*payload.UnbondPayload)\n\t\tpld.DelegateOwner = owner\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedVal := td.sbx.Validator(valAddr)\n\tassert.Equal(t, lockTime, updatedVal.UnbondingHeight())\n}\n"
  },
  {
    "path": "execution/executor/withdraw.go",
    "content": "package executor\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype WithdrawExecutor struct {\n\tsbx      sandbox.Sandbox\n\tpld      *payload.WithdrawPayload\n\tfee      amount.Amount\n\tsender   *validator.Validator\n\treceiver *account.Account\n}\n\nfunc newWithdrawExecutor(trx *tx.Tx, sbx sandbox.Sandbox) (*WithdrawExecutor, error) {\n\tpld := trx.Payload().(*payload.WithdrawPayload)\n\n\tsender := sbx.Validator(pld.From)\n\tif sender == nil {\n\t\treturn nil, ValidatorNotFoundError{Address: pld.From}\n\t}\n\n\treceiver := sbx.Account(pld.To)\n\tif receiver == nil {\n\t\treceiver = sbx.MakeNewAccount(pld.To)\n\t}\n\n\treturn &WithdrawExecutor{\n\t\tsbx:      sbx,\n\t\tpld:      pld,\n\t\tfee:      trx.Fee(),\n\t\tsender:   sender,\n\t\treceiver: receiver,\n\t}, nil\n}\n\nfunc (e *WithdrawExecutor) Check(_ bool) error {\n\tif e.sender.Stake() < e.pld.Value()+e.fee {\n\t\treturn ErrInsufficientFunds\n\t}\n\n\tif !e.sender.IsUnbonded() {\n\t\treturn ErrValidatorBonded\n\t}\n\n\tif e.sbx.CurrentHeight() < e.sender.UnbondingHeight().SafeIncrease(e.sbx.Params().UnbondInterval) {\n\t\treturn ErrUnbondingPeriod\n\t}\n\n\t// For delegated validators (PIP-49), only the stake owner can receive withdrawn principal.\n\tif e.sender.IsDelegated() {\n\t\tif e.pld.To != e.sender.DelegateOwner() {\n\t\t\treturn ErrWithdrawMustGoToStakeOwner\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (e *WithdrawExecutor) Execute() {\n\te.sender.SubtractFromStake(e.pld.Amount + e.fee)\n\te.receiver.AddToBalance(e.pld.Amount)\n\n\te.sbx.UpdateValidator(e.sender)\n\te.sbx.UpdateAccount(e.pld.To, e.receiver)\n}\n"
  },
  {
    "path": "execution/executor/withdraw_test.go",
    "content": "package executor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestExecuteWithdrawTx(t *testing.T) {\n\ttd := setup(t)\n\n\tbonderAddr, bonderAcc := td.sbx.TestStore.RandomTestAcc()\n\tbonderBalance := bonderAcc.Balance()\n\tstake := td.RandAmountRange(\n\t\ttd.sbx.TestParams.MinimumStake,\n\t\tbonderBalance)\n\tbonderAcc.SubtractFromBalance(stake)\n\ttd.sbx.UpdateAccount(bonderAddr, bonderAcc)\n\n\tvalPub, _ := td.RandBLSKeyPair()\n\tval := td.sbx.MakeNewValidator(valPub)\n\tval.AddToStake(stake)\n\ttd.sbx.UpdateValidator(val)\n\n\ttotalStake := val.Stake()\n\tfee := td.RandFee()\n\tamt := td.RandAmountRange(0, totalStake-fee)\n\tsenderAddr := val.Address()\n\treceiverAddr := td.RandAccAddress()\n\tlockTime := td.sbx.CurrentHeight()\n\n\tt.Run(\"Should fail, unknown address\", func(t *testing.T) {\n\t\trandomAddr := td.RandValAddress()\n\t\ttrx := tx.NewWithdrawTx(lockTime, randomAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, ValidatorNotFoundError{Address: randomAddr})\n\t\ttd.check(t, trx, false, ValidatorNotFoundError{Address: randomAddr})\n\t})\n\n\tt.Run(\"Should fail, hasn't unbonded yet\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, senderAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrValidatorBonded)\n\t\ttd.check(t, trx, false, ErrValidatorBonded)\n\t})\n\n\tval.UpdateUnbondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().UnbondInterval) + 1)\n\ttd.sbx.UpdateValidator(val)\n\n\tt.Run(\"Should fail, insufficient balance\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, senderAddr, receiverAddr, totalStake, 1)\n\n\t\ttd.check(t, trx, true, ErrInsufficientFunds)\n\t\ttd.check(t, trx, false, ErrInsufficientFunds)\n\t})\n\n\tt.Run(\"Should fail, hasn't passed unbonding period\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, senderAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, ErrUnbondingPeriod)\n\t\ttd.check(t, trx, false, ErrUnbondingPeriod)\n\t})\n\n\tcurHeight := td.sbx.CurrentHeight()\n\ttd.sbx.TestStore.AddTestBlock(curHeight + 1)\n\n\tt.Run(\"Should pass, Everything is Ok!\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, senderAddr, receiverAddr, amt, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedSenderVal := td.sbx.Validator(senderAddr)\n\tupdatedReceiverAcc := td.sbx.Account(receiverAddr)\n\n\tassert.Equal(t, totalStake-amt-fee, updatedSenderVal.Stake())\n\tassert.Equal(t, amt, updatedReceiverAcc.Balance())\n\n\ttd.checkTotalCoin(t, fee)\n}\n\nfunc TestExecuteDelegatedWithdrawTx(t *testing.T) {\n\ttd := setup(t)\n\n\tvalPub, _ := td.RandBLSKeyPair()\n\tval := td.sbx.MakeNewValidator(valPub)\n\ttotalStake := td.sbx.TestParams.MaximumStake\n\tval.AddToStake(totalStake)\n\towner := td.RandAccAddress()\n\tval.SetDelegation(owner, amount.Amount(0.3e9), td.sbx.CurrentHeight()+10)\n\tval.UpdateUnbondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.Params().UnbondInterval) + 1)\n\ttd.sbx.UpdateValidator(val)\n\n\tfee := td.RandFee()\n\tamt := td.RandAmountRange(0, totalStake-fee)\n\tlockTime := td.sbx.CurrentHeight()\n\n\tcurHeight := td.sbx.CurrentHeight()\n\ttd.sbx.TestStore.AddTestBlock(curHeight + 1)\n\n\tt.Run(\"Should fail, receiver must be stake owner\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, val.Address(), td.RandAccAddress(), amt, fee)\n\n\t\ttd.check(t, trx, true, ErrWithdrawMustGoToStakeOwner)\n\t\ttd.check(t, trx, false, ErrWithdrawMustGoToStakeOwner)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttrx := tx.NewWithdrawTx(lockTime, val.Address(), owner, amt, fee)\n\n\t\ttd.check(t, trx, true, nil)\n\t\ttd.check(t, trx, false, nil)\n\t\ttd.execute(t, trx)\n\t})\n\n\tupdatedVal := td.sbx.Validator(val.Address())\n\tupdatedOwner := td.sbx.Account(owner)\n\tassert.Equal(t, totalStake-amt-fee, updatedVal.Stake())\n\tassert.Equal(t, amt, updatedOwner.Balance())\n}\n"
  },
  {
    "path": "genesis/genesis.go",
    "content": "package genesis\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype ChainType uint8\n\nconst (\n\tMainnet  ChainType = 0\n\tTestnet  ChainType = 1\n\tLocalnet ChainType = 2\n)\n\nfunc (n ChainType) IsMainnet() bool {\n\treturn n == Mainnet\n}\n\nfunc (n ChainType) IsTestnet() bool {\n\treturn n == Testnet\n}\n\nfunc (n ChainType) String() string {\n\tswitch n {\n\tcase Mainnet:\n\t\treturn \"Mainnet\"\n\tcase Testnet:\n\t\treturn \"Testnet\"\n\tcase Localnet:\n\t\treturn \"Localnet\"\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\ntype genAccount struct {\n\tAddress string        `cbor:\"1,keyasint\" json:\"address\"`\n\tBalance amount.Amount `cbor:\"2,keyasint\" json:\"balance\"`\n}\n\ntype genValidator struct {\n\tPublicKey string `cbor:\"1,keyasint\" json:\"public_key\"`\n}\n\n// Genesis is stored in the state database.\ntype Genesis struct {\n\tdata genesisData\n}\n\ntype genesisData struct {\n\tGenesisTime time.Time      `cbor:\"1,keyasint\" json:\"genesis_time\"`\n\tParams      *GenesisParams `cbor:\"2,keyasint\" json:\"params\"`\n\tAccounts    []genAccount   `cbor:\"3,keyasint\" json:\"accounts\"`\n\tValidators  []genValidator `cbor:\"4,keyasint\" json:\"validators\"`\n}\n\nfunc (gen *Genesis) Hash() hash.Hash {\n\tbs, _ := cbor.Marshal(gen.data)\n\n\treturn hash.CalcHash(bs)\n}\n\nfunc (gen *Genesis) GenesisTime() time.Time {\n\treturn gen.data.GenesisTime\n}\n\nfunc (gen *Genesis) Params() *GenesisParams {\n\treturn gen.data.Params\n}\n\nfunc (gen *Genesis) Accounts() map[crypto.Address]*account.Account {\n\taccs := make(map[crypto.Address]*account.Account)\n\tfor i, genAcc := range gen.data.Accounts {\n\t\taddr, err := crypto.AddressFromString(genAcc.Address)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tacc := account.NewAccount(int32(i))\n\t\tacc.AddToBalance(genAcc.Balance)\n\t\taccs[addr] = acc\n\t}\n\n\treturn accs\n}\n\nfunc (gen *Genesis) Validators() []*validator.Validator {\n\tvals := make([]*validator.Validator, 0, len(gen.data.Validators))\n\tfor i, genVal := range gen.data.Validators {\n\t\tpub, _ := bls.PublicKeyFromString(genVal.PublicKey)\n\t\tval := validator.NewValidator(pub, int32(i))\n\t\tvals = append(vals, val)\n\t}\n\n\treturn vals\n}\n\nfunc (gen *Genesis) MarshalJSON() ([]byte, error) {\n\treturn json.MarshalIndent(&gen.data, \"  \", \"  \")\n}\n\nfunc (gen *Genesis) UnmarshalJSON(bs []byte) error {\n\treturn json.Unmarshal(bs, &gen.data)\n}\n\nfunc makeGenesisAccount(addr crypto.Address, acc *account.Account) genAccount {\n\treturn genAccount{\n\t\tAddress: addr.String(),\n\t\tBalance: acc.Balance(),\n\t}\n}\n\nfunc makeGenesisValidator(val *validator.Validator) genValidator {\n\treturn genValidator{\n\t\tPublicKey: val.PublicKey().String(),\n\t}\n}\n\nfunc MakeGenesis(genesisTime time.Time, accounts map[crypto.Address]*account.Account,\n\tvalidators []*validator.Validator, params *GenesisParams,\n) *Genesis {\n\tgenAccs := make([]genAccount, len(accounts))\n\tfor addr, acc := range accounts {\n\t\tgenAcc := makeGenesisAccount(addr, acc)\n\t\tgenAccs[acc.Number()] = genAcc\n\t}\n\n\tgenVals := make([]genValidator, len(validators))\n\tfor _, val := range validators {\n\t\tgenVal := makeGenesisValidator(val)\n\t\tgenVals[val.Number()] = genVal\n\t}\n\n\treturn &Genesis{\n\t\tdata: genesisData{\n\t\t\tGenesisTime: genesisTime,\n\t\t\tAccounts:    genAccs,\n\t\t\tValidators:  genVals,\n\t\t\tParams:      params,\n\t\t},\n\t}\n}\n\n// LoadFromFile loads genesis object from a JSON file.\nfunc LoadFromFile(file string) (*Genesis, error) {\n\tdat, err := os.ReadFile(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar gen Genesis\n\tif err := json.Unmarshal(dat, &gen); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &gen, nil\n}\n\n// SaveToFile saves the genesis into a JSON file.\nfunc (gen *Genesis) SaveToFile(file string) error {\n\tdata, err := gen.MarshalJSON()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// write  dataContent to file\n\treturn util.WriteFile(file, data)\n}\n\nfunc (gen *Genesis) TotalSupply() amount.Amount {\n\ttotalSuppyly := amount.Amount(0)\n\tfor _, acc := range gen.data.Accounts {\n\t\ttotalSuppyly += acc.Balance\n\t}\n\n\treturn totalSuppyly\n}\n\nfunc (gen *Genesis) ChainType() ChainType {\n\tswitch gen.Hash() {\n\tcase MainnetGenesis().Hash():\n\t\treturn Mainnet\n\tcase TestnetGenesis().Hash():\n\t\treturn Testnet\n\tdefault:\n\t\treturn Localnet\n\t}\n}\n"
  },
  {
    "path": "genesis/genesis_params.go",
    "content": "package genesis\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\ntype GenesisParams struct {\n\tBlockVersion              protocol.Version `cbor:\"1,keyasint\"  json:\"block_version\"`\n\tBlockIntervalInSecond     int              `cbor:\"2,keyasint\"  json:\"block_interval_in_second\"`\n\tCommitteeSize             int              `cbor:\"3,keyasint\"  json:\"committee_size\"`\n\tBlockReward               amount.Amount    `cbor:\"4,keyasint\"  json:\"block_reward\"`\n\tTransactionToLiveInterval uint32           `cbor:\"5,keyasint\"  json:\"transaction_to_live_interval\"`\n\tBondInterval              uint32           `cbor:\"6,keyasint\"  json:\"bond_interval\"`\n\tUnbondInterval            uint32           `cbor:\"7,keyasint\"  json:\"unbond_interval\"`\n\tSortitionInterval         uint32           `cbor:\"8,keyasint\"  json:\"sortition_interval\"`\n\tFeeFraction               float64          `cbor:\"9,keyasint\"  json:\"fee_fraction\"` // Deprecated: Replaced by fix fee\n\tMinimumFee                amount.Amount    `cbor:\"10,keyasint\" json:\"minimum_fee\"`  // Deprecated: Replaced by fix fee\n\tMaximumFee                amount.Amount    `cbor:\"11,keyasint\" json:\"maximum_fee\"`  // Deprecated: Replaced by fix fee\n\tMinimumStake              amount.Amount    `cobr:\"12,keyasint\" json:\"minimum_stake\"`\n\tMaximumStake              amount.Amount    `cbor:\"13,keyasint\" json:\"maximum_stake\"`\n}\n\nfunc DefaultGenesisParams() *GenesisParams {\n\treturn &GenesisParams{\n\t\tBlockVersion:              1,\n\t\tBlockIntervalInSecond:     10,\n\t\tCommitteeSize:             51,\n\t\tBlockReward:               1000000000,\n\t\tTransactionToLiveInterval: 8640,   // one day\n\t\tBondInterval:              360,    // one hour\n\t\tUnbondInterval:            181440, // 21 days\n\t\tSortitionInterval:         17,\n\t\tMinimumStake:              1000000000,\n\t\tMaximumStake:              1000000000000,\n\n\t\t// Deprecated: Replaced by fix fee\n\t\tFeeFraction: 0.0,\n\t\tMinimumFee:  0,\n\t\tMaximumFee:  0,\n\t}\n}\n\nfunc (p *GenesisParams) BlockInterval() time.Duration {\n\treturn time.Duration(p.BlockIntervalInSecond) * time.Second\n}\n"
  },
  {
    "path": "genesis/genesis_test.go",
    "content": "package genesis_test\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tacc, addr := ts.GenerateTestAccount(\n\t\ttestsuite.AccountWithNumber(0),\n\t\ttestsuite.AccountWithBalance(100000))\n\tval := ts.GenerateTestValidator(\n\t\ttestsuite.ValidatorWithNumber(0),\n\t)\n\tgen1 := genesis.MakeGenesis(util.RoundNow(10),\n\t\tmap[crypto.Address]*account.Account{addr: acc},\n\t\t[]*validator.Validator{val}, genesis.DefaultGenesisParams())\n\tgen2 := new(genesis.Genesis)\n\n\tassert.Equal(t, 10, gen1.Params().BlockIntervalInSecond)\n\n\tbz, err := json.MarshalIndent(gen1, \" \", \" \")\n\trequire.NoError(t, err)\n\terr = json.Unmarshal(bz, gen2)\n\trequire.NoError(t, err)\n\trequire.Equal(t, gen1.Hash(), gen2.Hash())\n\n\t// Test saving and loading\n\tf := util.TempFilePath()\n\trequire.NoError(t, gen1.SaveToFile(f))\n\tgen3, err := genesis.LoadFromFile(f)\n\trequire.NoError(t, err)\n\trequire.Equal(t, gen1.Hash(), gen3.Hash())\n\n\t_, err = genesis.LoadFromFile(util.TempFilePath())\n\trequire.Error(t, err, \"file not found\")\n}\n\nfunc TestGenesisMainnet(t *testing.T) {\n\tgen := genesis.MainnetGenesis()\n\tassert.Len(t, gen.Validators(), 4)\n\tassert.Len(t, gen.Accounts(), 5)\n\n\tgenTime, _ := time.Parse(\"02 Jan 2006, 15:04 MST\", \"24 Jan 2024, 20:24 UTC\")\n\texpected, _ := hash.FromString(\"e4d59e3145c9d718caf178edb33bc2ca7fe43e5b30990c9d57d53a60c4741432\")\n\tassert.Equal(t, expected, gen.Hash())\n\tassert.Equal(t, genTime, gen.GenesisTime())\n\tassert.Equal(t, uint32(8640/24), gen.Params().BondInterval)\n\tassert.Equal(t, uint32(8640*21), gen.Params().UnbondInterval)\n\tassert.Equal(t, genesis.Mainnet, gen.ChainType())\n\tassert.Equal(t, amount.Amount(42e15), gen.TotalSupply())\n\tassert.True(t, gen.ChainType().IsMainnet())\n}\n\nfunc TestCheckGenesisAccountAndValidator(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\taccs := map[crypto.Address]*account.Account{}\n\tvals := []*validator.Validator{}\n\tfor i := int32(0); i < 10; i++ {\n\t\tpub, _ := ts.RandBLSKeyPair()\n\t\tacc := account.NewAccount(i)\n\t\tval := validator.NewValidator(pub, i)\n\n\t\taccs[pub.AccountAddress()] = acc\n\t\tvals = append(vals, val)\n\t}\n\tgen := genesis.MakeGenesis(time.Now(), accs, vals, genesis.DefaultGenesisParams())\n\n\tfor addr, acc := range gen.Accounts() {\n\t\tassert.Equal(t, accs[addr], acc)\n\t}\n\n\tfor i, val := range gen.Validators() {\n\t\tassert.Equal(t, vals[i].Hash(), val.Hash())\n\t}\n}\n\nfunc TestGenesisTestnet(t *testing.T) {\n\tcrypto.AddressHRP = \"tpc\"\n\n\tgen := genesis.TestnetGenesis()\n\tassert.Len(t, gen.Validators(), 4)\n\tassert.Len(t, gen.Accounts(), 5)\n\n\tgenTime, _ := time.Parse(\"2006-01-02\", \"2024-03-16\")\n\texpected, _ := hash.FromString(\"13f96e6fbc9e0de0d53537ac5e894fc8e66be1600436db2df1511dc30696e822\")\n\tassert.Equal(t, expected, gen.Hash())\n\tassert.Equal(t, genTime, gen.GenesisTime())\n\tassert.Equal(t, uint32(360), gen.Params().BondInterval)\n\tassert.Equal(t, genesis.Testnet, gen.ChainType())\n\tassert.Equal(t, amount.Amount(42e15), gen.TotalSupply())\n\tassert.True(t, gen.ChainType().IsTestnet())\n\n\t// reset address HRP global variable to miannet to prevent next tests failing.\n\tcrypto.AddressHRP = \"pc\"\n}\n"
  },
  {
    "path": "genesis/mainnet.go",
    "content": "package genesis\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n)\n\n//go:embed mainnet.json\nvar mainnetJSON []byte\n\nfunc MainnetGenesis() *Genesis {\n\tgen := new(Genesis)\n\t_ = json.Unmarshal(mainnetJSON, &gen)\n\n\treturn gen\n}\n"
  },
  {
    "path": "genesis/mainnet.json",
    "content": "{\n    \"genesis_time\": \"2024-01-24T20:24:00Z\",\n    \"params\": {\n        \"block_version\": 1,\n        \"block_interval_in_second\": 10,\n        \"committee_size\": 51,\n        \"block_reward\": 1000000000,\n        \"transaction_to_live_interval\": 8640,\n        \"bond_interval\": 360,\n        \"unbond_interval\": 181440,\n        \"sortition_interval\": 17,\n        \"fee_fraction\": 0.0001,\n        \"minimum_fee\": 1000,\n        \"maximum_fee\": 1000000,\n        \"minimum_stake\": 1000000000,\n        \"maximum_stake\": 1000000000000\n    },\n    \"accounts\": [\n        {\n            \"address\": \"000000000000000000000000000000000000000000\",\n            \"balance\": 21000000000000000\n        },\n        {\n            \"address\": \"pc1z2r0fmu8sg2ffa0tgrr08gnefcxl2kq7wvquf8z\",\n            \"balance\": 8400000000000000\n        },\n        {\n            \"address\": \"pc1zprhnvcsy3pthekdcu28cw8muw4f432hkwgfasv\",\n            \"balance\": 6300000000000000\n        },\n        {\n            \"address\": \"pc1znn2qxsugfrt7j4608zvtnxf8dnz8skrxguyf45\",\n            \"balance\": 4200000000000000\n        },\n        {\n            \"address\": \"pc1zs64vdggjcshumjwzaskhfn0j9gfpkvche3kxd3\",\n            \"balance\": 2100000000000000\n        }\n    ],\n    \"validators\": [\n        {\n            \"public_key\": \"public1pslqgpw7c97fxaww6t7lcq88mqgnw43gegttwy7ame6jl83m72nyamek94nlyph75jx4maeq7yf3fwqqy4lw08ykjxduna6cx5tgy089umefcd60tnpe4netln29l5rs9uk9dm8lhefm7q09hytuxg2fzkuj8c7w5\"\n        },\n        {\n            \"public_key\": \"public1p5ww955ah5u35yx5g0v06nmlp4dxmd6achpd7w8t854qlw4vnxmmezpu86qwk07elk9msjfhdexkg6qj46jhgcc6fv22xclrpvxz2d6zjtldm9n3nzmnryszs4tfuufak2a7lea9jqu4asfmharsr86m7jvlekwt9\"\n        },\n        {\n            \"public_key\": \"public1p47uaggm5ya64ftcw28k34u7newp59jlj9g7trxzsgt7deqya6tcqxkmdq0lg2009t55s0z9jf2vu290qxp507s05rteagt2twhg967sec9nnvnrqdew4xkmleym3x9qwwe68hkdh6elhhncpyc472lqzsvvmatqs\"\n        },\n        {\n            \"public_key\": \"public1psxmnqxvu0d3xf66uyah02cj6wqyzlxz8275ha4m4e640txvndgqjydlzcxvc57dfmh0mx5guj2x2uxpw373r4wfgjzmxcxaf5zdd407k9uzjfekkkdjsvep56t5x7z6l7v8d3ppsv799ah2n2e9jmljnssrjj9ru\"\n        }\n    ]\n}"
  },
  {
    "path": "genesis/testnet.go",
    "content": "package genesis\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n)\n\n//go:embed testnet.json\nvar testnetJSON []byte\n\nfunc TestnetGenesis() *Genesis {\n\tgen := new(Genesis)\n\t_ = json.Unmarshal(testnetJSON, &gen)\n\n\treturn gen\n}\n"
  },
  {
    "path": "genesis/testnet.json",
    "content": "{\n    \"genesis_time\": \"2024-03-16T00:00:00Z\",\n    \"params\": {\n        \"block_version\": 1,\n        \"block_interval_in_second\": 10,\n        \"committee_size\": 51,\n        \"block_reward\": 1000000000,\n        \"transaction_to_live_interval\": 8640,\n        \"bond_interval\": 360,\n        \"unbond_interval\": 181440,\n        \"sortition_interval\": 17,\n        \"fee_fraction\": 0.0001,\n        \"minimum_fee\": 1000,\n        \"maximum_fee\": 1000000,\n        \"minimum_stake\": 1000000000,\n        \"maximum_stake\": 1000000000000\n    },\n    \"accounts\": [\n        {\n            \"address\": \"000000000000000000000000000000000000000000\",\n            \"balance\": 21000000000000000\n        },\n        {\n            \"address\": \"tpc1zeszhgvffmf2fx7arpp935n40ek09kx200evaga\",\n            \"balance\": 8400000000000000\n        },\n        {\n            \"address\": \"tpc1z76trjq323tp8cs2staa4vnhaegpxaqc8zm7uzk\",\n            \"balance\": 6300000000000000\n        },\n        {\n            \"address\": \"tpc1zty5pa3x0h879r5zdze6tat4exu97l4y2hyplkm\",\n            \"balance\": 4200000000000000\n        },\n        {\n            \"address\": \"tpc1zq6r4qjkgdn7qg7fdnusa9wsvepc94xeqd6rf6d\",\n            \"balance\": 2100000000000000\n        }\n    ],\n    \"validators\": [\n        {\n            \"public_key\": \"tpublic1ps5e3k3x9v3q0wdgw48sswx5za45w36fkeay8hkcwhgpl3q3w8zqs4uu7ewzhn537d5pnkmum3lf0yzqk9f2sld0qcl3700y372jxcjmt3kjzmfehru29z6ak7ehfmzh0965kgzdanptm7jnf89zvtkglzymnlq6q\"\n        },\n        {\n            \"public_key\": \"tpublic1p49mvzl9ray2rfhwg77ne7m457qlc5knpv897skqnkgfa3luluzq784hf7px30r68knhnhp5td5gayz8ss72dyfxgq8kk2qqm0y86tqsmzss8dvfn433z9j3g0saqhahzcw37f8wy48edrqh6qkf6h9yr4gg8093c\"\n        },\n        {\n            \"public_key\": \"tpublic1p3yyfsjdudntxlr6k5hdt249wxe6ajfnnkg6knklzt8lmj66s8z4j2duqk7qay8n8d47u0n6w97c8qrwwkljewqqw3t3ufy662llqflcq9nn6wsg35twdc3l5vn72j4ez50s982fxxh6per6hftn3e2v7fgm4gx35\"\n        },\n        {\n            \"public_key\": \"tpublic1pjy7z27zm6795xhj8rln65cve88dtqjkg7gca6scxzwwfxpncnmkhg35n2rw3fa9e04cqcc8c9fyqvpm7y39wj0x2e5qrl0he60ms6v79vga3le2uvgn566p7x9exjnyhh3klycqddstj7339afnm73k09v8k52uy\"\n        }\n    ]\n}"
  },
  {
    "path": "go.mod",
    "content": "module github.com/pactus-project/pactus\n\ngo 1.26.2\n\nrequire (\n\tgithub.com/NathanBaulch/protoc-gen-cobra v1.2.1\n\tgithub.com/beevik/ntp v1.5.0\n\tgithub.com/c-bata/go-prompt v0.2.6\n\tgithub.com/consensys/gnark-crypto v0.20.1\n\tgithub.com/ezex-io/gopkg/pipeline v0.0.0-20260127151556-579a32f19aa7\n\tgithub.com/ezex-io/gopkg/scheduler v0.0.0-20260127151556-579a32f19aa7\n\tgithub.com/ezex-io/gopkg/signal v0.0.0-20260127151556-579a32f19aa7\n\tgithub.com/ezex-io/gopkg/testsuite v0.0.0-20260127151556-579a32f19aa7\n\tgithub.com/fxamacker/cbor/v2 v2.9.1\n\tgithub.com/glebarez/go-sqlite v1.22.1-0.20250214171204-e6de9fc0c320\n\tgithub.com/go-zeromq/zmq4 v0.17.0\n\tgithub.com/gofrs/flock v0.13.0\n\tgithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510\n\tgithub.com/google/uuid v1.6.0\n\tgithub.com/gorilla/handlers v1.5.2\n\tgithub.com/gorilla/mux v1.8.1\n\tgithub.com/gotk3/gotk3 v0.6.2\n\tgithub.com/grpc-ecosystem/go-grpc-middleware v1.4.0\n\tgithub.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0\n\tgithub.com/hashicorp/golang-lru/v2 v2.0.7\n\tgithub.com/inancgumus/screen v0.0.0-20190314163918-06e984b86ed3\n\tgithub.com/ipfs/boxo v0.38.0\n\tgithub.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213\n\tgithub.com/kilic/bls12-381 v0.1.1-0.20220929213557-ca162e8a70f4\n\tgithub.com/libp2p/go-libp2p v0.48.0\n\tgithub.com/libp2p/go-libp2p-kad-dht v0.39.0\n\tgithub.com/libp2p/go-libp2p-pubsub v0.15.0\n\tgithub.com/manifoldco/promptui v0.9.0\n\tgithub.com/multiformats/go-multiaddr v0.16.1\n\tgithub.com/pacviewer/jrpc-gateway v0.6.0\n\tgithub.com/pelletier/go-toml/v2 v2.3.0\n\tgithub.com/pkg/errors v0.9.1\n\tgithub.com/prometheus/client_golang v1.23.2\n\tgithub.com/rs/cors v1.11.1\n\tgithub.com/rs/zerolog v1.35.0\n\tgithub.com/schollz/progressbar/v3 v3.19.0\n\tgithub.com/spf13/cobra v1.10.2\n\tgithub.com/spf13/pflag v1.0.10\n\tgithub.com/stretchr/testify v1.11.1\n\tgithub.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d\n\tgo.uber.org/mock v0.6.0\n\tgolang.org/x/crypto v0.50.0\n\tgolang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f\n\tgolang.org/x/term v0.42.0\n\tgoogle.golang.org/grpc v1.80.0\n\tgoogle.golang.org/protobuf v1.36.11\n\tgopkg.in/natefinch/lumberjack.v2 v2.2.1\n)\n\nrequire (\n\tfilippo.io/bigmod v0.1.1-0.20260103110540-f8a47775ebe5 // indirect\n\tfilippo.io/keygen v0.0.0-20260114151900-8e2790ea4c5b // indirect\n\tgithub.com/benbjohnson/clock v1.3.5 // indirect\n\tgithub.com/beorn7/perks v1.0.1 // indirect\n\tgithub.com/bits-and-blooms/bitset v1.24.4 // indirect\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/chzyer/readline v1.5.1 // indirect\n\tgithub.com/clipperhouse/uax29/v2 v2.7.0 // indirect\n\tgithub.com/creachadair/jrpc2 v1.3.5 // indirect\n\tgithub.com/creachadair/mds v0.27.0 // indirect\n\tgithub.com/davecgh/go-spew v1.1.1 // indirect\n\tgithub.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect\n\tgithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect\n\tgithub.com/dunglas/httpsfv v1.1.0 // indirect\n\tgithub.com/dustin/go-humanize v1.0.1 // indirect\n\tgithub.com/felixge/httpsnoop v1.0.4 // indirect\n\tgithub.com/filecoin-project/go-clock v0.1.0 // indirect\n\tgithub.com/flynn/noise v1.1.0 // indirect\n\tgithub.com/go-logr/logr v1.4.3 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/go-zeromq/goczmq/v4 v4.2.2 // indirect\n\tgithub.com/gogo/protobuf v1.3.2 // indirect\n\tgithub.com/golang/snappy v1.0.0 // indirect\n\tgithub.com/google/gopacket v1.1.19 // indirect\n\tgithub.com/gorilla/websocket v1.5.3 // indirect\n\tgithub.com/hashicorp/golang-lru v1.0.2 // indirect\n\tgithub.com/huin/goupnp v1.3.0 // indirect\n\tgithub.com/iancoleman/strcase v0.3.0 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.1.0 // indirect\n\tgithub.com/ipfs/go-cid v0.6.1 // indirect\n\tgithub.com/ipfs/go-datastore v0.9.1 // indirect\n\tgithub.com/ipfs/go-log/v2 v2.9.1 // indirect\n\tgithub.com/ipld/go-ipld-prime v0.22.0 // indirect\n\tgithub.com/jackpal/go-nat-pmp v1.0.2 // indirect\n\tgithub.com/jbenet/go-temp-err-catcher v0.1.0 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.3.0 // indirect\n\tgithub.com/koron/go-ssdp v0.1.0 // indirect\n\tgithub.com/libp2p/go-buffer-pool v0.1.0 // indirect\n\tgithub.com/libp2p/go-cidranger v1.1.0 // indirect\n\tgithub.com/libp2p/go-flow-metrics v0.3.0 // indirect\n\tgithub.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect\n\tgithub.com/libp2p/go-libp2p-kbucket v0.8.0 // indirect\n\tgithub.com/libp2p/go-libp2p-record v0.3.1 // indirect\n\tgithub.com/libp2p/go-libp2p-routing-helpers v0.7.5 // indirect\n\tgithub.com/libp2p/go-msgio v0.3.0 // indirect\n\tgithub.com/libp2p/go-netroute v0.4.0 // indirect\n\tgithub.com/libp2p/go-reuseport v0.4.0 // indirect\n\tgithub.com/libp2p/go-yamux/v5 v5.1.0 // indirect\n\tgithub.com/libp2p/zeroconf/v2 v2.2.0 // indirect\n\tgithub.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect\n\tgithub.com/mattn/go-colorable v0.1.14 // indirect\n\tgithub.com/mattn/go-isatty v0.0.21 // indirect\n\tgithub.com/mattn/go-runewidth v0.0.23 // indirect\n\tgithub.com/mattn/go-tty v0.0.7 // indirect\n\tgithub.com/miekg/dns v1.1.72 // indirect\n\tgithub.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect\n\tgithub.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect\n\tgithub.com/minio/sha256-simd v1.0.1 // indirect\n\tgithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/mr-tron/base58 v1.3.0 // indirect\n\tgithub.com/multiformats/go-base32 v0.1.0 // indirect\n\tgithub.com/multiformats/go-base36 v0.2.0 // indirect\n\tgithub.com/multiformats/go-multiaddr-dns v0.5.0 // indirect\n\tgithub.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect\n\tgithub.com/multiformats/go-multibase v0.3.0 // indirect\n\tgithub.com/multiformats/go-multicodec v0.10.0 // indirect\n\tgithub.com/multiformats/go-multihash v0.2.3 // indirect\n\tgithub.com/multiformats/go-multistream v0.6.1 // indirect\n\tgithub.com/multiformats/go-varint v0.1.0 // indirect\n\tgithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect\n\tgithub.com/ncruces/go-strftime v1.0.0 // indirect\n\tgithub.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect\n\tgithub.com/pion/datachannel v1.6.0 // indirect\n\tgithub.com/pion/dtls/v3 v3.1.2 // indirect\n\tgithub.com/pion/ice/v4 v4.2.3 // indirect\n\tgithub.com/pion/interceptor v0.1.44 // indirect\n\tgithub.com/pion/logging v0.2.4 // indirect\n\tgithub.com/pion/mdns/v2 v2.1.0 // indirect\n\tgithub.com/pion/randutil v0.1.0 // indirect\n\tgithub.com/pion/rtcp v1.2.16 // indirect\n\tgithub.com/pion/rtp v1.10.1 // indirect\n\tgithub.com/pion/sctp v1.9.4 // indirect\n\tgithub.com/pion/sdp/v3 v3.0.18 // indirect\n\tgithub.com/pion/srtp/v3 v3.0.10 // indirect\n\tgithub.com/pion/stun/v3 v3.1.2 // indirect\n\tgithub.com/pion/transport/v4 v4.0.1 // indirect\n\tgithub.com/pion/turn/v4 v4.1.4 // indirect\n\tgithub.com/pion/webrtc/v4 v4.2.11 // indirect\n\tgithub.com/pkg/term v1.2.0-beta.2 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.0 // indirect\n\tgithub.com/polydawn/refmt v0.89.1-0.20231129105047-37766d95467a // indirect\n\tgithub.com/prometheus/client_model v0.6.2 // indirect\n\tgithub.com/prometheus/common v0.67.5 // indirect\n\tgithub.com/prometheus/procfs v0.20.1 // indirect\n\tgithub.com/quic-go/qpack v0.6.0 // indirect\n\tgithub.com/quic-go/quic-go v0.59.0 // indirect\n\tgithub.com/quic-go/webtransport-go v0.10.0 // indirect\n\tgithub.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect\n\tgithub.com/rivo/uniseg v0.4.7 // indirect\n\tgithub.com/spaolacci/murmur3 v1.1.0 // indirect\n\tgithub.com/spf13/cast v1.10.0 // indirect\n\tgithub.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect\n\tgithub.com/wlynxg/anet v0.0.5 // indirect\n\tgithub.com/x448/float16 v0.8.4 // indirect\n\tgo.opentelemetry.io/auto/sdk v1.2.1 // indirect\n\tgo.opentelemetry.io/otel v1.43.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.43.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.43.0 // indirect\n\tgo.uber.org/dig v1.19.0 // indirect\n\tgo.uber.org/fx v1.24.0 // indirect\n\tgo.uber.org/multierr v1.11.0 // indirect\n\tgo.uber.org/zap v1.27.1 // indirect\n\tgo.yaml.in/yaml/v2 v2.4.4 // indirect\n\tgolang.org/x/mod v0.35.0 // indirect\n\tgolang.org/x/net v0.53.0 // indirect\n\tgolang.org/x/sync v0.20.0 // indirect\n\tgolang.org/x/sys v0.43.0 // indirect\n\tgolang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa // indirect\n\tgolang.org/x/text v0.36.0 // indirect\n\tgolang.org/x/time v0.15.0 // indirect\n\tgolang.org/x/tools v0.44.0 // indirect\n\tgonum.org/v1/gonum v0.17.0 // indirect\n\tgoogle.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n\tlukechampine.com/blake3 v1.4.1 // indirect\n\tmodernc.org/libc v1.72.0 // indirect\n\tmodernc.org/mathutil v1.7.1 // indirect\n\tmodernc.org/memory v1.11.0 // indirect\n\tmodernc.org/sqlite v1.48.2 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\nfilippo.io/bigmod v0.1.1-0.20260103110540-f8a47775ebe5 h1:JA0fFr+kxpqTdxR9LOBiTWpGNchqmkcsgmdeJZRclZ0=\nfilippo.io/bigmod v0.1.1-0.20260103110540-f8a47775ebe5/go.mod h1:OjOXDNlClLblvXdwgFFOQFJEocLhhtai8vGLy0JCZlI=\nfilippo.io/keygen v0.0.0-20260114151900-8e2790ea4c5b h1:REI1FbdW71yO56Are4XAxD+OS/e+BQsB3gE4mZRQEXY=\nfilippo.io/keygen v0.0.0-20260114151900-8e2790ea4c5b/go.mod h1:9nnw1SlYHYuPSo/3wjQzNjSbeHlq2NsKo5iEtfJPWP0=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/NathanBaulch/protoc-gen-cobra v1.2.1 h1:BOqX9glwicbqDJDGndMnhHhx8psGTSjGdZzRDY1a7A8=\ngithub.com/NathanBaulch/protoc-gen-cobra v1.2.1/go.mod h1:ZLPLEPQgV3jP3a7IEp+xxYPk8tF4lhY9ViV0hn6K3iA=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/beevik/ntp v1.5.0 h1:y+uj/JjNwlY2JahivxYvtmv4ehfi3h74fAuABB9ZSM4=\ngithub.com/beevik/ntp v1.5.0/go.mod h1:mJEhBrwT76w9D+IfOEGvuzyuudiW9E52U2BaTrMOYow=\ngithub.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=\ngithub.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=\ngithub.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE=\ngithub.com/bits-and-blooms/bitset v1.24.4/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=\ngithub.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=\ngithub.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI=\ngithub.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY=\ngithub.com/canonical/go-sp800.90a-drbg v0.0.0-20210314144037-6eeb1040d6c3 h1:oe6fCvaEpkhyW3qAicT0TnGtyht/UrgvOwMcEgLb7Aw=\ngithub.com/canonical/go-sp800.90a-drbg v0.0.0-20210314144037-6eeb1040d6c3/go.mod h1:qdP0gaj0QtgX2RUZhnlVrceJ+Qln8aSlDyJwelLLFeM=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM=\ngithub.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=\ngithub.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=\ngithub.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=\ngithub.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=\ngithub.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/consensys/gnark-crypto v0.20.1 h1:PXDUBvk8AzhvWowHLWBEAfUQcV1/aZgWIqD6eMpXmDg=\ngithub.com/consensys/gnark-crypto v0.20.1/go.mod h1:RBWrSgy+IDbGR69RRV313th3M/aZU1ubk2om+qHuTSc=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=\ngithub.com/creachadair/jrpc2 v1.3.5 h1:onJko+1u6xoiRph3xwWmfNISR91teCRhbJwSyS9Svzo=\ngithub.com/creachadair/jrpc2 v1.3.5/go.mod h1:YXDmS53AavsiytbAwskrczJPcVHvKC9GoyWzwfSQXoE=\ngithub.com/creachadair/mds v0.27.0 h1:3nRi2FoC8l3mE4AxvNpubEdaiWaZVqfLcAPubbXxoek=\ngithub.com/creachadair/mds v0.27.0/go.mod h1:dMBTCSy3iS3dwh4Rb1zxeZz2d7K8+N24GCTsayWtQRI=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU=\ngithub.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U=\ngithub.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8=\ngithub.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=\ngithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 h1:5RVFMOWjMyRy8cARdy79nAmgYw3hK/4HUq48LQ6Wwqo=\ngithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=\ngithub.com/dunglas/httpsfv v1.1.0 h1:Jw76nAyKWKZKFrpMMcL76y35tOpYHqQPzHQiwDvpe54=\ngithub.com/dunglas/httpsfv v1.1.0/go.mod h1:zID2mqw9mFsnt7YC3vYQ9/cjq30q41W+1AnDwH8TiMg=\ngithub.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=\ngithub.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/ezex-io/gopkg/pipeline v0.0.0-20260127151556-579a32f19aa7 h1:zUmRjqSmASCO4F/4oS5sUFbEh1yjhgmgRHUZLKUtbnQ=\ngithub.com/ezex-io/gopkg/pipeline v0.0.0-20260127151556-579a32f19aa7/go.mod h1:eDWtiQtQ6pAdxKSttVQbk98KXxdeFWzxaZcWKWODbX0=\ngithub.com/ezex-io/gopkg/scheduler v0.0.0-20260127151556-579a32f19aa7 h1:hujO8ZKXb+VwDgnSSa4ngoT6WNwkd9yLF9idzVLKA4Y=\ngithub.com/ezex-io/gopkg/scheduler v0.0.0-20260127151556-579a32f19aa7/go.mod h1:I5PLJTun10b6UvzR2s2oA2++QDsQQbUVVbKQDABLkSI=\ngithub.com/ezex-io/gopkg/signal v0.0.0-20260127151556-579a32f19aa7 h1:tFeQmqXM0SqiWSGz0kvbS3FfIdZusxZoa2Ggeucumww=\ngithub.com/ezex-io/gopkg/signal v0.0.0-20260127151556-579a32f19aa7/go.mod h1:nKAkGKaKCERbJZ1Pn9Jngi7prESr/YKfN6tCCaopZAU=\ngithub.com/ezex-io/gopkg/testsuite v0.0.0-20260127151556-579a32f19aa7 h1:51fXLznSPBGFjG2fc9emSXR9n5IM6X0ANIJy6SHNwtQ=\ngithub.com/ezex-io/gopkg/testsuite v0.0.0-20260127151556-579a32f19aa7/go.mod h1:UY5y7MLtFkTqRPJ8ExnHgXRfZtIryYVIS0JjrI13N5o=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=\ngithub.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/filecoin-project/go-clock v0.1.0 h1:SFbYIM75M8NnFm1yMHhN9Ahy3W5bEZV9gd6MPfXbKVU=\ngithub.com/filecoin-project/go-clock v0.1.0/go.mod h1:4uB/O4PvOjlx1VCMdZ9MyDZXRm//gkj1ELEbxfI1AZs=\ngithub.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg=\ngithub.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=\ngithub.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=\ngithub.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=\ngithub.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=\ngithub.com/fxamacker/cbor/v2 v2.9.1 h1:2rWm8B193Ll4VdjsJY28jxs70IdDsHRWgQYAI80+rMQ=\ngithub.com/fxamacker/cbor/v2 v2.9.1/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/glebarez/go-sqlite v1.22.1-0.20250214171204-e6de9fc0c320 h1:2swBMoqhMMr8Vv5m/XKEEyrTQ218LAFNUNL0pblvWYs=\ngithub.com/glebarez/go-sqlite v1.22.1-0.20250214171204-e6de9fc0c320/go.mod h1:cxXqFxpt08h2E1w0vYo4czkaAEwsdqHqtuY4SdVZMH4=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=\ngithub.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=\ngithub.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=\ngithub.com/go-zeromq/goczmq/v4 v4.2.2 h1:HAJN+i+3NW55ijMJJhk7oWxHKXgAuSBkoFfvr8bYj4U=\ngithub.com/go-zeromq/goczmq/v4 v4.2.2/go.mod h1:Sm/lxrfxP/Oxqs0tnHD6WAhwkWrx+S+1MRrKzcxoaYE=\ngithub.com/go-zeromq/zmq4 v0.17.0 h1:r12/XdqPeRbuaF4C3QZJeWCt7a5vpJbslDH1rTXF+Kc=\ngithub.com/go-zeromq/zmq4 v0.17.0/go.mod h1:EQxjJD92qKnrsVMzAnx62giD6uJIPi1dMGZ781iCDtY=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=\ngithub.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=\ngithub.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=\ngithub.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=\ngithub.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=\ngithub.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=\ngithub.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=\ngithub.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=\ngithub.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=\ngithub.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=\ngithub.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=\ngithub.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=\ngithub.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=\ngithub.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/gotk3/gotk3 v0.6.2 h1:sx/PjaKfKULJPTPq8p2kn2ZbcNFxpOJqi4VLzMbEOO8=\ngithub.com/gotk3/gotk3 v0.6.2/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c=\ngithub.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=\ngithub.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=\ngithub.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=\ngithub.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=\ngithub.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=\ngithub.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=\ngithub.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=\ngithub.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=\ngithub.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/inancgumus/screen v0.0.0-20190314163918-06e984b86ed3 h1:fO9A67/izFYFYky7l1pDP5Dr0BTCRkaQJUG6Jm5ehsk=\ngithub.com/inancgumus/screen v0.0.0-20190314163918-06e984b86ed3/go.mod h1:Ey4uAp+LvIl+s5jRbOHLcZpUDnkjLBROl15fZLwPlTM=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=\ngithub.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=\ngithub.com/ipfs/boxo v0.38.0 h1:Kt/swuNXAtVXs7EP6KEjB5+2lo5/tTrvWzjakQ8IiOo=\ngithub.com/ipfs/boxo v0.38.0/go.mod h1:A6DRpImSXihx6MiEHOeBjXqleDqK5JX3yWDxM0WygPo=\ngithub.com/ipfs/go-block-format v0.2.3 h1:mpCuDaNXJ4wrBJLrtEaGFGXkferrw5eqVvzaHhtFKQk=\ngithub.com/ipfs/go-block-format v0.2.3/go.mod h1:WJaQmPAKhD3LspLixqlqNFxiZ3BZ3xgqxxoSR/76pnA=\ngithub.com/ipfs/go-cid v0.6.1 h1:T5TnNb08+ueovG76Z5gx1L4Y7QOaGTXHg1F6raWFxIc=\ngithub.com/ipfs/go-cid v0.6.1/go.mod h1:zrY0SwOhjrrIdfPQ/kf+k1sXyJ0QE7cMxfCployLBs0=\ngithub.com/ipfs/go-datastore v0.9.1 h1:67Po2epre/o0UxrmkzdS9ZTe2GFGODgTd2odx8Wh6Yo=\ngithub.com/ipfs/go-datastore v0.9.1/go.mod h1:zi07Nvrpq1bQwSkEnx3bfjz+SQZbdbWyCNvyxMh9pN0=\ngithub.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=\ngithub.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=\ngithub.com/ipfs/go-log/v2 v2.9.1 h1:3JXwHWU31dsCpvQ+7asz6/QsFJHqFr4gLgQ0FWteujk=\ngithub.com/ipfs/go-log/v2 v2.9.1/go.mod h1:evFx7sBiohUN3AG12mXlZBw5hacBQld3ZPHrowlJYoo=\ngithub.com/ipfs/go-test v0.2.3 h1:Z/jXNAReQFtCYyn7bsv/ZqUwS6E7iIcSpJ2CuzCvnrc=\ngithub.com/ipfs/go-test v0.2.3/go.mod h1:QW8vSKkwYvWFwIZQLGQXdkt9Ud76eQXRQ9Ao2H+cA1o=\ngithub.com/ipld/go-ipld-prime v0.22.0 h1:YJhDhjEOvOYaqshd3b4atIWUoRg/rKrgmwCyUHwlbuY=\ngithub.com/ipld/go-ipld-prime v0.22.0/go.mod h1:ol7vKxOOVgEh0iAPuiDalM+0gScXVMA5ZZa4DVrTnEA=\ngithub.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=\ngithub.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=\ngithub.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk=\ngithub.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg=\ngithub.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=\ngithub.com/kilic/bls12-381 v0.1.1-0.20220929213557-ca162e8a70f4 h1:xWK4TZ4bRL05WQUU/3x6TG1l+IYAqdXpAeSLt/zZJc4=\ngithub.com/kilic/bls12-381 v0.1.1-0.20220929213557-ca162e8a70f4/go.mod h1:tlkavyke+Ac7h8R3gZIjI5LKBcvMlSWnXNMgT3vZXo8=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=\ngithub.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=\ngithub.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=\ngithub.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/koron/go-ssdp v0.1.0 h1:ckl5x5H6qSNFmi+wCuROvvGUu2FQnMbQrU95IHCcv3Y=\ngithub.com/koron/go-ssdp v0.1.0/go.mod h1:GltaDBjtK1kemZOusWYLGotV0kBeEf59Bp0wtSB0uyU=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=\ngithub.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=\ngithub.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4=\ngithub.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c=\ngithub.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=\ngithub.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=\ngithub.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c=\ngithub.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic=\ngithub.com/libp2p/go-flow-metrics v0.3.0 h1:q31zcHUvHnwDO0SHaukewPYgwOBSxtt830uJtUx6784=\ngithub.com/libp2p/go-flow-metrics v0.3.0/go.mod h1:nuhlreIwEguM1IvHAew3ij7A8BMlyHQJ279ao24eZZo=\ngithub.com/libp2p/go-libp2p v0.48.0 h1:h2BrLAgrj7X8bEN05K7qmrjpNHYA+6tnsGRdprjTnvo=\ngithub.com/libp2p/go-libp2p v0.48.0/go.mod h1:Q1fBZNdmC2Hf82husCTfkKJVfHm2we5zk+NWmOGEmWk=\ngithub.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94=\ngithub.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8=\ngithub.com/libp2p/go-libp2p-kad-dht v0.39.0 h1:mww38eBYiUvdsu+Xl/GLlBC0Aa8M+5HAwvafkFOygAM=\ngithub.com/libp2p/go-libp2p-kad-dht v0.39.0/go.mod h1:Po2JugFEkDq9Vig/JXtc153ntOi0q58o4j7IuITCOVs=\ngithub.com/libp2p/go-libp2p-kbucket v0.8.0 h1:QAK7RzKJpYe+EuSEATAaaHYMYLkPDGC18m9jxPLnU8s=\ngithub.com/libp2p/go-libp2p-kbucket v0.8.0/go.mod h1:JMlxqcEyKwO6ox716eyC0hmiduSWZZl6JY93mGaaqc4=\ngithub.com/libp2p/go-libp2p-pubsub v0.15.0 h1:cG7Cng2BT82WttmPFMi50gDNV+58K626m/wR00vGL1o=\ngithub.com/libp2p/go-libp2p-pubsub v0.15.0/go.mod h1:lr4oE8bFgQaifRcoc2uWhWWiK6tPdOEKpUuR408GFN4=\ngithub.com/libp2p/go-libp2p-record v0.3.1 h1:cly48Xi5GjNw5Wq+7gmjfBiG9HCzQVkiZOUZ8kUl+Fg=\ngithub.com/libp2p/go-libp2p-record v0.3.1/go.mod h1:T8itUkLcWQLCYMqtX7Th6r7SexyUJpIyPgks757td/E=\ngithub.com/libp2p/go-libp2p-routing-helpers v0.7.5 h1:HdwZj9NKovMx0vqq6YNPTh6aaNzey5zHD7HeLJtq6fI=\ngithub.com/libp2p/go-libp2p-routing-helpers v0.7.5/go.mod h1:3YaxrwP0OBPDD7my3D0KxfR89FlcX/IEbxDEDfAmj98=\ngithub.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=\ngithub.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg=\ngithub.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0=\ngithub.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM=\ngithub.com/libp2p/go-netroute v0.4.0 h1:sZZx9hyANYUx9PZyqcgE/E1GUG3iEtTZHUEvdtXT7/Q=\ngithub.com/libp2p/go-netroute v0.4.0/go.mod h1:Nkd5ShYgSMS5MUKy/MU2T57xFoOKvvLR92Lic48LEyA=\ngithub.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s=\ngithub.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU=\ngithub.com/libp2p/go-yamux/v5 v5.1.0 h1:8Qlxj4E9JGJAQVW6+uj2o7mqkqsIVlSUGmTWhlXzoHE=\ngithub.com/libp2p/go-yamux/v5 v5.1.0/go.mod h1:tgIQ07ObtRR/I0IWsFOyQIL9/dR5UXgc2s8xKmNZv1o=\ngithub.com/libp2p/zeroconf/v2 v2.2.0 h1:Cup06Jv6u81HLhIj1KasuNM/RHHrJ8T7wOTS4+Tv53Q=\ngithub.com/libp2p/zeroconf/v2 v2.2.0/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA=\ngithub.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg=\ngithub.com/marcopolo/simnet v0.0.4 h1:50Kx4hS9kFGSRIbrt9xUS3NJX33EyPqHVmpXvaKLqrY=\ngithub.com/marcopolo/simnet v0.0.4/go.mod h1:tfQF1u2DmaB6WHODMtQaLtClEf3a296CKQLq5gAsIS0=\ngithub.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk=\ngithub.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=\ngithub.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=\ngithub.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=\ngithub.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=\ngithub.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=\ngithub.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=\ngithub.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=\ngithub.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0=\ngithub.com/mattn/go-tty v0.0.7 h1:KJ486B6qI8+wBO7kQxYgmmEFDaFEE96JMBQ7h400N8Q=\ngithub.com/mattn/go-tty v0.0.7/go.mod h1:f2i5ZOvXBU/tCABmLmOfzLz9azMo5wdAaElRNnJKr+k=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4=\ngithub.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI=\ngithub.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=\ngithub.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8=\ngithub.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms=\ngithub.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc=\ngithub.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU=\ngithub.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc=\ngithub.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s=\ngithub.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=\ngithub.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=\ngithub.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=\ngithub.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=\ngithub.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=\ngithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=\ngithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=\ngithub.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=\ngithub.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=\ngithub.com/mr-tron/base58 v1.3.0 h1:K6Y13R2h+dku0wOqKtecgRnBUBPrZzLZy5aIj8lCcJI=\ngithub.com/mr-tron/base58 v1.3.0/go.mod h1:2BuubE67DCSWwVfx37JWNG8emOC0sHEU4/HpcYgCLX8=\ngithub.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE=\ngithub.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=\ngithub.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0=\ngithub.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=\ngithub.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo=\ngithub.com/multiformats/go-multiaddr v0.16.1 h1:fgJ0Pitow+wWXzN9do+1b8Pyjmo8m5WhGfzpL82MpCw=\ngithub.com/multiformats/go-multiaddr v0.16.1/go.mod h1:JSVUmXDjsVFiW7RjIFMP7+Ev+h1DTbiJgVeTV/tcmP0=\ngithub.com/multiformats/go-multiaddr-dns v0.5.0 h1:p/FTyHKX0nl59f+S+dEUe8HRK+i5Ow/QHMw8Nh3gPCo=\ngithub.com/multiformats/go-multiaddr-dns v0.5.0/go.mod h1:yJ349b8TPIAANUyuOzn1oz9o22tV9f+06L+cCeMxC14=\ngithub.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E=\ngithub.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo=\ngithub.com/multiformats/go-multibase v0.3.0 h1:8helZD2+4Db7NNWFiktk2NePbF0boolBe6bDQvM4r68=\ngithub.com/multiformats/go-multibase v0.3.0/go.mod h1:MoBLQPCkRTOL3eveIPO81860j2AQY8JwcnNlRkGRUfI=\ngithub.com/multiformats/go-multicodec v0.10.0 h1:UpP223cig/Cx8J76jWt91njpK3GTAO1w02sdcjZDSuc=\ngithub.com/multiformats/go-multicodec v0.10.0/go.mod h1:wg88pM+s2kZJEQfRCKBNU+g32F5aWBEjyFHXvZLTcLI=\ngithub.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=\ngithub.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=\ngithub.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=\ngithub.com/multiformats/go-multistream v0.6.1 h1:4aoX5v6T+yWmc2raBHsTvzmFhOI8WVOer28DeBBEYdQ=\ngithub.com/multiformats/go-multistream v0.6.1/go.mod h1:ksQf6kqHAb6zIsyw7Zm+gAuVo57Qbq84E27YlYqavqw=\ngithub.com/multiformats/go-varint v0.1.0 h1:i2wqFp4sdl3IcIxfAonHQV9qU5OsZ4Ts9IOoETFs5dI=\ngithub.com/multiformats/go-varint v0.1.0/go.mod h1:5KVAVXegtfmNQQm/lCY+ATvDzvJJhSkUlGQV9wgObdI=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=\ngithub.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=\ngithub.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=\ngithub.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=\ngithub.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=\ngithub.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=\ngithub.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=\ngithub.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=\ngithub.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=\ngithub.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=\ngithub.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=\ngithub.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=\ngithub.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=\ngithub.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=\ngithub.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=\ngithub.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=\ngithub.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=\ngithub.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=\ngithub.com/pacviewer/jrpc-gateway v0.6.0 h1:h4btj93+Fyaq74rIz9oODTVE1GiuC/aswKzt4u4exrg=\ngithub.com/pacviewer/jrpc-gateway v0.6.0/go.mod h1:e5x4eyPeACtG4nP9oj3uRYDVOiODh55YdP5iB045WQ0=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=\ngithub.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=\ngithub.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pelletier/go-toml/v2 v2.3.0 h1:k59bC/lIZREW0/iVaQR8nDHxVq8OVlIzYCOJf421CaM=\ngithub.com/pelletier/go-toml/v2 v2.3.0/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=\ngithub.com/pion/datachannel v1.6.0 h1:XecBlj+cvsxhAMZWFfFcPyUaDZtd7IJvrXqlXD/53i0=\ngithub.com/pion/datachannel v1.6.0/go.mod h1:ur+wzYF8mWdC+Mkis5Thosk+u/VOL287apDNEbFpsIk=\ngithub.com/pion/dtls/v3 v3.1.2 h1:gqEdOUXLtCGW+afsBLO0LtDD8GnuBBjEy6HRtyofZTc=\ngithub.com/pion/dtls/v3 v3.1.2/go.mod h1:Hw/igcX4pdY69z1Hgv5x7wJFrUkdgHwAn/Q/uo7YHRo=\ngithub.com/pion/ice/v4 v4.2.3 h1:1QUD3JA+0MUoXk5Bl4pbcuSyUlxRDiTQDPr29PnIPCA=\ngithub.com/pion/ice/v4 v4.2.3/go.mod h1:ELQIH5Xmcs/nsJnKyzLJWij8v9Z/xHOzdPTfpFZMh2o=\ngithub.com/pion/interceptor v0.1.44 h1:sNlZwM8dWXU9JQAkJh8xrarC0Etn8Oolcniukmuy0/I=\ngithub.com/pion/interceptor v0.1.44/go.mod h1:4atVlBkcgXuUP+ykQF0qOCGU2j7pQzX2ofvPRFsY5RY=\ngithub.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8=\ngithub.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so=\ngithub.com/pion/mdns/v2 v2.1.0 h1:3IJ9+Xio6tWYjhN6WwuY142P/1jA0D5ERaIqawg/fOY=\ngithub.com/pion/mdns/v2 v2.1.0/go.mod h1:pcez23GdynwcfRU1977qKU0mDxSeucttSHbCSfFOd9A=\ngithub.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=\ngithub.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=\ngithub.com/pion/rtcp v1.2.16 h1:fk1B1dNW4hsI78XUCljZJlC4kZOPk67mNRuQ0fcEkSo=\ngithub.com/pion/rtcp v1.2.16/go.mod h1:/as7VKfYbs5NIb4h6muQ35kQF/J0ZVNz2Z3xKoCBYOo=\ngithub.com/pion/rtp v1.10.1 h1:xP1prZcCTUuhO2c83XtxyOHJteISg6o8iPsE2acaMtA=\ngithub.com/pion/rtp v1.10.1/go.mod h1:rF5nS1GqbR7H/TCpKwylzeq6yDM+MM6k+On5EgeThEM=\ngithub.com/pion/sctp v1.9.4 h1:cMxEu0F5tbP4qH07bKf1Zjf4rUih9LIo0qQt424e258=\ngithub.com/pion/sctp v1.9.4/go.mod h1:N20Dq6LY+JvJDAh9VVh1JELngb2rQ8dPgds5yBWiPgw=\ngithub.com/pion/sdp/v3 v3.0.18 h1:l0bAXazKHpepazVdp+tPYnrsy9dfh7ZbT8DxesH5ZnI=\ngithub.com/pion/sdp/v3 v3.0.18/go.mod h1:ZREGo6A9ZygQ9XkqAj5xYCQtQpif0i6Pa81HOiAdqQ8=\ngithub.com/pion/srtp/v3 v3.0.10 h1:tFirkpBb3XccP5VEXLi50GqXhv5SKPxqrdlhDCJlZrQ=\ngithub.com/pion/srtp/v3 v3.0.10/go.mod h1:3mOTIB0cq9qlbn59V4ozvv9ClW/BSEbRp4cY0VtaR7M=\ngithub.com/pion/stun/v3 v3.1.2 h1:86IhD8wFn6IDW4b1/0QzoQS+f5PeA8OHHRn8UZW5ErY=\ngithub.com/pion/stun/v3 v3.1.2/go.mod h1:H7gDic7nNwlUL05pbs6T1dtaBehh/KjupxfWw3ZI7cA=\ngithub.com/pion/transport/v3 v3.1.1 h1:Tr684+fnnKlhPceU+ICdrw6KKkTms+5qHMgw6bIkYOM=\ngithub.com/pion/transport/v3 v3.1.1/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ=\ngithub.com/pion/transport/v4 v4.0.1 h1:sdROELU6BZ63Ab7FrOLn13M6YdJLY20wldXW2Cu2k8o=\ngithub.com/pion/transport/v4 v4.0.1/go.mod h1:nEuEA4AD5lPdcIegQDpVLgNoDGreqM/YqmEx3ovP4jM=\ngithub.com/pion/turn/v4 v4.1.4 h1:EU11yMXKIsK43FhcUnjLlrhE4nboHZq+TXBIi3QpcxQ=\ngithub.com/pion/turn/v4 v4.1.4/go.mod h1:ES1DXVFKnOhuDkqn9hn5VJlSWmZPaRJLyBXoOeO/BmQ=\ngithub.com/pion/webrtc/v4 v4.2.11 h1:QUX1QZKlNIn4O7U5JxLPGP0sV5RTncZkzu9SPR3jVNU=\ngithub.com/pion/webrtc/v4 v4.2.11/go.mod h1:s/rAiyy77GyRFrZMx+Ls6aua26dIBPudH8/ZHYbIRWY=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pkg/term v1.2.0-beta.2 h1:L3y/h2jkuBVFdWiJvNfYfKmzcCnILw7mJWm2JQuMppw=\ngithub.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/polydawn/refmt v0.89.1-0.20231129105047-37766d95467a h1:cgqrm0F3zwf9IPzca7xN4w+Zy6MC9ZkPvAC8QEWa/iQ=\ngithub.com/polydawn/refmt v0.89.1-0.20231129105047-37766d95467a/go.mod h1:ocZfO/tLSHqfScRDNTJbAJR1by4D1lewauX9OwTaPuY=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=\ngithub.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=\ngithub.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=\ngithub.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=\ngithub.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=\ngithub.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=\ngithub.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=\ngithub.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=\ngithub.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=\ngithub.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw=\ngithub.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=\ngithub.com/quic-go/webtransport-go v0.10.0 h1:LqXXPOXuETY5Xe8ITdGisBzTYmUOy5eSj+9n4hLTjHI=\ngithub.com/quic-go/webtransport-go v0.10.0/go.mod h1:LeGIXr5BQKE3UsynwVBeQrU1TPrbh73MGoC6jd+V7ow=\ngithub.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=\ngithub.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=\ngithub.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=\ngithub.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=\ngithub.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=\ngithub.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=\ngithub.com/rs/zerolog v1.35.0 h1:VD0ykx7HMiMJytqINBsKcbLS+BJ4WYjz+05us+LRTdI=\ngithub.com/rs/zerolog v1.35.0/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=\ngithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/schollz/progressbar/v3 v3.19.0 h1:Ea18xuIRQXLAUidVDox3AbwfUhD0/1IvohyTutOIFoc=\ngithub.com/schollz/progressbar/v3 v3.19.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=\ngithub.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=\ngithub.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY=\ngithub.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60=\ngithub.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=\ngithub.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=\ngithub.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=\ngithub.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=\ngithub.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=\ngithub.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=\ngithub.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs=\ngithub.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=\ngithub.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=\ngithub.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ=\ngithub.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=\ngithub.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k=\ngithub.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc=\ngithub.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU=\ngithub.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA=\ngithub.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=\ngithub.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngo.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=\ngo.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=\ngo.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=\ngo.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=\ngo.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=\ngo.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=\ngo.opentelemetry.io/otel/sdk v1.42.0 h1:LyC8+jqk6UJwdrI/8VydAq/hvkFKNHZVIWuslJXYsDo=\ngo.opentelemetry.io/otel/sdk v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts=\ngo.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=\ngo.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=\ngo.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=\ngo.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/dig v1.19.0 h1:BACLhebsYdpQ7IROQ1AGPjrXcP5dF80U3gKoFzbaq/4=\ngo.uber.org/dig v1.19.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE=\ngo.uber.org/fx v1.24.0 h1:wE8mruvpg2kiiL1Vqd0CC+tr0/24XIB10Iwp2lLWzkg=\ngo.uber.org/fx v1.24.0/go.mod h1:AmDeGyS+ZARGKM4tlH4FY2Jr63VjbEDJHtqXTGP5hbo=\ngo.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=\ngo.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=\ngo.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=\ngo.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=\ngo.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=\ngo.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngo.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=\ngo.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=\ngo.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=\ngo.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=\ngo.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=\ngo.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=\ngolang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM=\ngolang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=\ngolang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=\ngolang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=\ngolang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=\ngolang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=\ngolang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=\ngolang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=\ngolang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=\ngolang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=\ngolang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa h1:efT73AJZfAAUV7SOip6pWGkwJDzIGiKBZGVzHYa+ve4=\ngolang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa/go.mod h1:kHjTxDEnAu6/Nl9lDkzjWpR+bmKfxeiRuSDlsMb70gE=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=\ngolang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY=\ngolang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=\ngolang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=\ngolang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=\ngolang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=\ngolang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=\ngolang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY=\ngolang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=\ngonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=\ngonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d h1:/aDRtSZJjyLQzm75d+a1wOJaqyKBMvIAfeQmoa3ORiI=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:etfGUgejTiadZAUaEP14NP97xi1RGeawqkjDARA/UOs=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=\ngoogle.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=\ngoogle.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=\ngopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nlukechampine.com/blake3 v1.4.1 h1:I3Smz7gso8w4/TunLKec6K2fn+kyKtDxr/xcQEN84Wg=\nlukechampine.com/blake3 v1.4.1/go.mod h1:QFosUxmjB8mnrWFSNwKmvxHpfY72bmD2tQ0kBMM3kwo=\nmodernc.org/cc/v4 v4.27.3 h1:uNCgn37E5U09mTv1XgskEVUJ8ADKpmFMPxzGJ0TSo+U=\nmodernc.org/cc/v4 v4.27.3/go.mod h1:3YjcbCqhoTTHPycJDRl2WZKKFj0nwcOIPBfEZK0Hdk8=\nmodernc.org/ccgo/v4 v4.32.4 h1:L5OB8rpEX4ZsXEQwGozRfJyJSFHbbNVOoQ59DU9/KuU=\nmodernc.org/ccgo/v4 v4.32.4/go.mod h1:lY7f+fiTDHfcv6YlRgSkxYfhs+UvOEEzj49jAn2TOx0=\nmodernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=\nmodernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=\nmodernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=\nmodernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=\nmodernc.org/gc/v3 v3.1.2 h1:ZtDCnhonXSZexk/AYsegNRV1lJGgaNZJuKjJSWKyEqo=\nmodernc.org/gc/v3 v3.1.2/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=\nmodernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=\nmodernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=\nmodernc.org/libc v1.72.0 h1:IEu559v9a0XWjw0DPoVKtXpO2qt5NVLAnFaBbjq+n8c=\nmodernc.org/libc v1.72.0/go.mod h1:tTU8DL8A+XLVkEY3x5E/tO7s2Q/q42EtnNWda/L5QhQ=\nmodernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=\nmodernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=\nmodernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=\nmodernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=\nmodernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=\nmodernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=\nmodernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=\nmodernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=\nmodernc.org/sqlite v1.48.2 h1:5CnW4uP8joZtA0LedVqLbZV5GD7F/0x91AXeSyjoh5c=\nmodernc.org/sqlite v1.48.2/go.mod h1:hWjRO6Tj/5Ik8ieqxQybiEOUXy0NJFNp2tpvVpKlvig=\nmodernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=\nmodernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=\nmodernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=\nmodernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\n"
  },
  {
    "path": "network/config.go",
    "content": "package network\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\n// Config defines parameters for the network module.\ntype Config struct {\n\tNetworkKey           string   `toml:\"network_key\"`\n\tPublicAddrString     string   `toml:\"public_addr\"`\n\tListenAddrStrings    []string `toml:\"listen_addrs\"`\n\tBootstrapAddrStrings []string `toml:\"bootstrap_addrs\"`\n\tMaxConns             int      `toml:\"max_connections\"`\n\tEnableUDP            bool     `toml:\"enable_udp\"`\n\tEnableNATService     bool     `toml:\"enable_nat_service\"`\n\tEnableUPnP           bool     `toml:\"enable_upnp\"`\n\tEnableRelay          bool     `toml:\"enable_relay\"`\n\tEnableRelayService   bool     `toml:\"enable_relay_service\"`\n\tEnableMdns           bool     `toml:\"enable_mdns\"`\n\tEnableMetrics        bool     `toml:\"enable_metrics\"`\n\tForcePrivateNetwork  bool     `toml:\"force_private_network\"`\n\n\t// Private configs\n\tNetworkName                 string        `toml:\"-\"`\n\tDefaultPort                 int           `toml:\"-\"`\n\tDefaultBootstrapAddrStrings []string      `toml:\"-\"`\n\tIsBootstrapper              bool          `toml:\"-\"`\n\tPeerStorePath               string        `toml:\"-\"`\n\tStreamTimeout               time.Duration `toml:\"-\"`\n\tCheckConnectivityInterval   time.Duration `toml:\"-\"`\n\tMaxGossipMessageSize        int           `toml:\"-\"`\n\tMaxStreamMessageSize        int           `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tNetworkKey:                \"network_key\",\n\t\tPublicAddrString:          \"\",\n\t\tListenAddrStrings:         []string{},\n\t\tBootstrapAddrStrings:      []string{},\n\t\tMaxConns:                  64,\n\t\tEnableUDP:                 false,\n\t\tEnableNATService:          false,\n\t\tEnableUPnP:                false,\n\t\tEnableRelay:               true,\n\t\tEnableRelayService:        false,\n\t\tEnableMdns:                false,\n\t\tEnableMetrics:             false,\n\t\tForcePrivateNetwork:       false,\n\t\tDefaultPort:               0,\n\t\tIsBootstrapper:            false,\n\t\tPeerStorePath:             \"peers.json\",\n\t\tStreamTimeout:             20 * time.Second,\n\t\tCheckConnectivityInterval: 60 * time.Second,\n\t\tMaxGossipMessageSize:      1 * 1024 * 1024, // 1 MB\n\t\tMaxStreamMessageSize:      8 * 1024 * 1024, // 8 MB\n\t}\n}\n\nfunc validateMultiAddr(addrs ...string) error {\n\t_, err := MakeMultiAddrs(addrs)\n\tif err != nil {\n\t\treturn ConfigError{\n\t\t\tReason: fmt.Sprintf(\"address is not valid: %s\", err.Error()),\n\t\t}\n\t}\n\n\treturn err\n}\n\nfunc validateAddrInfo(addrs ...string) error {\n\t_, err := MakeAddrInfos(addrs)\n\tif err != nil {\n\t\treturn ConfigError{\n\t\t\tReason: fmt.Sprintf(\"address is not valid: %s\", err.Error()),\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif conf.PublicAddrString != \"\" {\n\t\tif err := validateMultiAddr(conf.PublicAddrString); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif err := validateMultiAddr(conf.ListenAddrStrings...); err != nil {\n\t\treturn err\n\t}\n\tif err := validateAddrInfo(conf.DefaultBootstrapAddrStrings...); err != nil {\n\t\treturn err\n\t}\n\tif conf.EnableRelay && conf.EnableRelayService {\n\t\treturn ConfigError{\n\t\t\tReason: \"both the relay and relay service cannot be active at the same time\",\n\t\t}\n\t}\n\tif conf.MaxConns < 16 {\n\t\treturn ConfigError{\n\t\t\tReason: \"maximum connection should be greater than 16\",\n\t\t}\n\t}\n\n\treturn validateAddrInfo(conf.BootstrapAddrStrings...)\n}\n\nfunc (conf *Config) PublicAddr() multiaddr.Multiaddr {\n\tif conf.PublicAddrString != \"\" {\n\t\taddr, _ := multiaddr.NewMultiaddr(conf.PublicAddrString)\n\n\t\treturn addr\n\t}\n\n\treturn nil\n}\n\nfunc (conf *Config) ListenAddrs() []multiaddr.Multiaddr {\n\tlistenAddrs := conf.ListenAddrStrings\n\tif len(listenAddrs) == 0 {\n\t\tlistenAddrs = []string{\n\t\t\tfmt.Sprintf(\"/ip4/0.0.0.0/tcp/%d\", conf.DefaultPort),\n\t\t\tfmt.Sprintf(\"/ip4/0.0.0.0/udp/%d/quic-v1\", conf.DefaultPort),\n\t\t\tfmt.Sprintf(\"/ip6/::/tcp/%d\", conf.DefaultPort),\n\t\t\tfmt.Sprintf(\"/ip6/::/udp/%d/quic-v1\", conf.DefaultPort),\n\t\t}\n\t}\n\taddrs, _ := MakeMultiAddrs(listenAddrs)\n\n\treturn addrs\n}\n\nfunc (conf *Config) BootstrapAddrInfos() []lp2ppeer.AddrInfo {\n\taddrs := util.Merge(conf.DefaultBootstrapAddrStrings, conf.BootstrapAddrStrings)\n\taddrInfos, _ := MakeAddrInfos(addrs)\n\n\treturn addrInfos\n}\n\nfunc (conf *Config) CheckIsBootstrapper(pid lp2pcore.PeerID) {\n\taddrInfos := conf.BootstrapAddrInfos()\n\tfor _, ai := range addrInfos {\n\t\tif ai.ID == pid {\n\t\t\tconf.IsBootstrapper = true\n\n\t\t\tbreak\n\t\t}\n\t}\n}\n\nfunc (conf *Config) MinConns() int {\n\treturn (conf.MaxConns / 4) - 2\n}\n"
  },
  {
    "path": "network/config_test.go",
    "content": "package network\n\nimport (\n\t\"testing\"\n\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname: \"Empty ListenAddrStrings\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: failed to parse multiaddr \\\"\\\": empty multiaddr\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ListenAddrStrings = []string{\"\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Both Relay and Relay Service be true\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"both the relay and relay service cannot be active at the same time\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.EnableRelay = true\n\t\t\t\tc.EnableRelayService = true\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid ListenAddrStrings\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: failed to parse multiaddr \\\"127.0.0.1\\\": must begin with /\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ListenAddrStrings = []string{\"127.0.0.1\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid ListenAddrStrings (No port)\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: failed to parse multiaddr \\\"/ip4\\\": unexpected end of multiaddr\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ListenAddrStrings = []string{\"/ip4\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid Public Address\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: failed to parse multiaddr \\\"/ip4\\\": unexpected end of multiaddr\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.PublicAddrString = \"/ip4\"\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid DefaultBootstrapAddrStrings\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: invalid p2p multiaddr\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.DefaultBootstrapAddrStrings = []string{\"/ip4/127.0.0.1/\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid BootstrapAddrStrings\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"address is not valid: invalid p2p multiaddr\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.BootstrapAddrStrings = []string{\"/ip4/127.0.0.1/\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Low MaxConns\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"maximum connection should be greater than 16\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MaxConns = 8\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Valid Public Address\",\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.PublicAddrString = \"/ip4/127.0.0.1/\"\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Valid ListenAddrStrings\",\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.ListenAddrStrings = []string{\"/ip4/127.0.0.1\"}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Valid BootstrapAddrStrings\",\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.BootstrapAddrStrings = []string{\n\t\t\t\t\t\"/ip4/127.0.0.1/p2p/12D3KooWQBpPV6NtZy1dvN2oF7dJdLoooRZfEmwtHiDUf42ArDjT\",\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, err, tt.expectedErr,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\",\n\t\t\t\t\tno, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err,\n\t\t\t\t\t\"Expected no error for test %d-%s, get: %s\",\n\t\t\t\t\tno, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestIsBootstrapper(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.BootstrapAddrStrings = []string{\"/ip4/127.0.0.1/p2p/12D3KooWQBpPV6NtZy1dvN2oF7dJdLoooRZfEmwtHiDUf42ArDjT\"}\n\tconf.DefaultBootstrapAddrStrings = []string{\"/ip4/127.0.0.2/p2p/12D3KooWBqutgDboACf1i1c9uN9BQg9xdREoeXYb2rvFHQU1QcAp\"}\n\n\tpid1, _ := lp2ppeer.Decode(\"12D3KooWQQKidG8Nn6fLgxjryHFhRCfG9fUWU88yGSZNd59Kbqka\")\n\tpid2, _ := lp2ppeer.Decode(\"12D3KooWQBpPV6NtZy1dvN2oF7dJdLoooRZfEmwtHiDUf42ArDjT\")\n\tpid3, _ := lp2ppeer.Decode(\"12D3KooWBqutgDboACf1i1c9uN9BQg9xdREoeXYb2rvFHQU1QcAp\")\n\n\tconf.CheckIsBootstrapper(pid1)\n\tassert.False(t, conf.IsBootstrapper)\n\n\tconf.CheckIsBootstrapper(pid2)\n\tassert.True(t, conf.IsBootstrapper)\n\n\tconf.CheckIsBootstrapper(pid3)\n\tassert.True(t, conf.IsBootstrapper)\n}\n\nfunc TestMinConns(t *testing.T) {\n\ttests := []struct {\n\t\tconfig      Config\n\t\texpectedMin int\n\t}{\n\t\t{Config{MaxConns: 16}, 2},\n\t\t{Config{MaxConns: 30}, 5},\n\t\t{Config{MaxConns: 128}, 30},\n\t}\n\n\tfor _, tt := range tests {\n\t\tresultMin := tt.config.MinConns()\n\t\tif resultMin != tt.expectedMin {\n\t\t\tt.Errorf(\"For MaxConns %d, \"+\n\t\t\t\t\"MinConns() returned %d (expected %d)\",\n\t\t\t\ttt.config.MaxConns,\n\t\t\t\tresultMin, tt.expectedMin)\n\t\t}\n\t}\n}\n\nfunc TestPublicAddr(t *testing.T) {\n\tconf1 := DefaultConfig()\n\tassert.Nil(t, conf1.PublicAddr())\n\n\tconf2 := DefaultConfig()\n\tconf2.PublicAddrString = \"/ip4/127.0.0.1/p2p/12D3KooWQBpPV6NtZy1dvN2oF7dJdLoooRZfEmwtHiDUf42ArDjT\"\n\tassert.NotNil(t, conf2.PublicAddr())\n}\n"
  },
  {
    "path": "network/dht.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\n\tlp2pdht \"github.com/libp2p/go-libp2p-kad-dht\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype dhtService struct {\n\tctx      context.Context\n\thost     lp2phost.Host\n\tkademlia *lp2pdht.IpfsDHT\n\tlogger   *logger.SubLogger\n}\n\nfunc newDHTService(ctx context.Context, host lp2phost.Host, conf *Config,\n\tprotocolID lp2pcore.ProtocolID, log *logger.SubLogger,\n) *dhtService {\n\t// A dirty code in LibP2P!!!\n\t// prevent apply default bootstrap node of libp2p\n\tlp2pdht.DefaultBootstrapPeers = []multiaddr.Multiaddr{}\n\n\tmode := lp2pdht.ModeAuto\n\tif conf.IsBootstrapper {\n\t\tmode = lp2pdht.ModeServer\n\t}\n\topts := []lp2pdht.Option{\n\t\tlp2pdht.Mode(mode),\n\t\tlp2pdht.ProtocolPrefix(protocolID),\n\t\tlp2pdht.BootstrapPeers(conf.BootstrapAddrInfos()...),\n\t}\n\n\tkademlia, err := lp2pdht.New(ctx, host, opts...)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn &dhtService{\n\t\tctx:      ctx,\n\t\thost:     host,\n\t\tkademlia: kademlia,\n\t\tlogger:   log,\n\t}\n}\n\nfunc (s *dhtService) Start() error {\n\treturn s.kademlia.Bootstrap(s.ctx)\n}\n\nfunc (s *dhtService) Stop() {\n\tif err := s.kademlia.Close(); err != nil {\n\t\ts.logger.Error(\"unable to close Kademlia\", \"error\", err)\n\t}\n}\n"
  },
  {
    "path": "network/errors.go",
    "content": "package network\n\nimport \"fmt\"\n\n// ConfigError is returned when the config is not valid with a descriptive Reason message.\ntype ConfigError struct {\n\tReason string\n}\n\nfunc (e ConfigError) Error() string {\n\treturn e.Reason\n}\n\n// NotSubscribedError is returned when the peer is not subscribed to a\n// specific topic.\ntype NotSubscribedError struct {\n\tTopicID TopicID\n}\n\nfunc (e NotSubscribedError) Error() string {\n\treturn fmt.Sprintf(\"not subscribed to the '%s' topic\", e.TopicID.String())\n}\n\n// InvalidTopicError is returned when the Pub-Sub topic is invalid.\ntype InvalidTopicError struct {\n\tTopicID TopicID\n}\n\nfunc (e InvalidTopicError) Error() string {\n\treturn fmt.Sprintf(\"invalid topic: '%s'\", e.TopicID.String())\n}\n\n// LibP2PError is returned when an underlying libp2p operation encounters an error.\ntype LibP2PError struct {\n\tErr error\n}\n\nfunc (e LibP2PError) Error() string {\n\treturn fmt.Sprintf(\"libp2p error: %s\", e.Err.Error())\n}\n"
  },
  {
    "path": "network/gater.go",
    "content": "package network\n\nimport (\n\t\"sync\"\n\n\tlp2pconnmgr \"github.com/libp2p/go-libp2p/core/connmgr\"\n\tlp2pcontrol \"github.com/libp2p/go-libp2p/core/control\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\nvar _ lp2pconnmgr.ConnectionGater = &ConnectionGater{}\n\ntype ConnectionGater struct {\n\tlk sync.RWMutex\n\n\tfilters     *multiaddr.Filters\n\tpeerMgr     *peerMgr\n\tacceptLimit int\n\tdialLimit   int\n\tlogger      *logger.SubLogger\n}\n\nfunc NewConnectionGater(conf *Config, log *logger.SubLogger) (*ConnectionGater, error) {\n\tfilters := multiaddr.NewFilters()\n\tif !conf.ForcePrivateNetwork {\n\t\tprivateSubnets := PrivateSubnets()\n\t\tfilters = SubnetsToFilters(privateSubnets, multiaddr.ActionDeny)\n\t}\n\n\tacceptLimit := conf.MaxConns\n\tdialLimit := conf.MaxConns / 4\n\tlog.Info(\"connection gater created\", \"listen\", acceptLimit, \"dial\", dialLimit)\n\n\treturn &ConnectionGater{\n\t\tfilters:     filters,\n\t\tacceptLimit: acceptLimit,\n\t\tdialLimit:   dialLimit,\n\t\tlogger:      log,\n\t}, nil\n}\n\nfunc (g *ConnectionGater) SetPeerManager(peerMgr *peerMgr) {\n\tg.lk.Lock()\n\tdefer g.lk.Unlock()\n\n\tg.peerMgr = peerMgr\n}\n\nfunc (g *ConnectionGater) onDialLimit() bool {\n\tif g.peerMgr == nil {\n\t\treturn false\n\t}\n\n\treturn g.peerMgr.NumOutbound() > g.dialLimit\n}\n\nfunc (g *ConnectionGater) onAcceptLimit() bool {\n\tif g.peerMgr == nil {\n\t\treturn false\n\t}\n\n\treturn g.peerMgr.NumInbound() > g.acceptLimit\n}\n\nfunc (g *ConnectionGater) InterceptPeerDial(pid lp2ppeer.ID) bool {\n\tg.lk.RLock()\n\tdefer g.lk.RUnlock()\n\n\tif g.onDialLimit() {\n\t\tg.logger.Debug(\"InterceptPeerDial rejected: many connections\",\n\t\t\t\"pid\", pid, \"outbound\", g.peerMgr.NumOutbound())\n\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc (g *ConnectionGater) InterceptAddrDial(pid lp2ppeer.ID, ma multiaddr.Multiaddr) bool {\n\tg.lk.RLock()\n\tdefer g.lk.RUnlock()\n\n\tif g.onDialLimit() {\n\t\tg.logger.Debug(\"InterceptAddrDial rejected: many connections\",\n\t\t\t\"pid\", pid, \"ma\", ma.String(), \"outbound\", g.peerMgr.NumOutbound())\n\n\t\treturn false\n\t}\n\n\tdeny := g.filters.AddrBlocked(ma)\n\tif deny {\n\t\tg.logger.Debug(\"InterceptAddrDial rejected\", \"pid\", pid, \"ma\", ma.String())\n\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc (g *ConnectionGater) InterceptAccept(cma lp2pnetwork.ConnMultiaddrs) bool {\n\tg.lk.RLock()\n\tdefer g.lk.RUnlock()\n\n\tif g.onAcceptLimit() {\n\t\tg.logger.Debug(\"InterceptAccept rejected: many connections\",\n\t\t\t\"inbound\", g.peerMgr.NumInbound())\n\n\t\treturn false\n\t}\n\n\tdeny := g.filters.AddrBlocked(cma.RemoteMultiaddr())\n\tif deny {\n\t\tg.logger.Debug(\"InterceptAccept rejected\")\n\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc (*ConnectionGater) InterceptSecured(_ lp2pnetwork.Direction, _ lp2ppeer.ID, _ lp2pnetwork.ConnMultiaddrs) bool {\n\treturn true\n}\n\nfunc (*ConnectionGater) InterceptUpgraded(_ lp2pnetwork.Conn) (bool, lp2pcontrol.DisconnectReason) {\n\treturn true, 0\n}\n"
  },
  {
    "path": "network/gater_test.go",
    "content": "package network\n\nimport (\n\t\"testing\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\n// mockConnMultiaddrs is a mock implementation of the ConnMultiaddrs interface for testing.\ntype mockConnMultiaddrs struct {\n\tremote multiaddr.Multiaddr\n}\n\nfunc (*mockConnMultiaddrs) LocalMultiaddr() multiaddr.Multiaddr {\n\treturn nil\n}\n\nfunc (cma *mockConnMultiaddrs) RemoteMultiaddr() multiaddr.Multiaddr {\n\treturn cma.remote\n}\n\nfunc TestAllowedConnections(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tconf := testConfig()\n\tnet := makeTestNetwork(t, conf, nil)\n\n\tmaPrivate := multiaddr.StringCast(\"/ip4/127.0.0.1/tcp/1234\")\n\tmaPublic := multiaddr.StringCast(\"/ip4/8.8.8.8/tcp/1234\")\n\tcmaPrivate := &mockConnMultiaddrs{remote: maPrivate}\n\tcmaPublic := &mockConnMultiaddrs{remote: maPublic}\n\tpid := ts.RandPeerID()\n\n\tassert.True(t, net.connGater.InterceptPeerDial(pid))\n\tassert.True(t, net.connGater.InterceptAddrDial(pid, maPrivate))\n\tassert.True(t, net.connGater.InterceptAddrDial(pid, maPublic))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPrivate))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPublic))\n}\n\nfunc TestDenyPrivate(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tconf := testConfig()\n\tconf.ForcePrivateNetwork = false\n\tnet := makeTestNetwork(t, conf, nil)\n\n\tmaPrivate := multiaddr.StringCast(\"/ip4/127.0.0.1/tcp/1234\")\n\tmaPublic := multiaddr.StringCast(\"/ip4/8.8.8.8/tcp/1234\")\n\tcmaPrivate := &mockConnMultiaddrs{remote: maPrivate}\n\tcmaPublic := &mockConnMultiaddrs{remote: maPublic}\n\tpid := ts.RandPeerID()\n\n\tassert.True(t, net.connGater.InterceptPeerDial(pid))\n\tassert.False(t, net.connGater.InterceptAddrDial(pid, maPrivate))\n\tassert.True(t, net.connGater.InterceptAddrDial(pid, maPublic))\n\tassert.False(t, net.connGater.InterceptAccept(cmaPrivate))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPublic))\n}\n\nfunc TestMaxConnection(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tconf := testConfig()\n\tconf.MaxConns = 4\n\tnet := makeTestNetwork(t, conf, nil)\n\n\tmaPrivate := multiaddr.StringCast(\"/ip4/127.0.0.1/tcp/1234\")\n\tmaPublic := multiaddr.StringCast(\"/ip4/8.8.8.8/tcp/1234\")\n\taMultiAddr := multiaddr.StringCast(\"/ip4/1.1.1.1/tcp/1234\")\n\tcmaPrivate := &mockConnMultiaddrs{remote: maPrivate}\n\tcmaPublic := &mockConnMultiaddrs{remote: maPublic}\n\tpid := ts.RandPeerID()\n\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirOutbound)\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirInbound)\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirInbound)\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirInbound)\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirInbound)\n\n\tassert.True(t, net.connGater.InterceptPeerDial(pid))\n\tassert.True(t, net.connGater.InterceptAddrDial(pid, maPrivate))\n\tassert.True(t, net.connGater.InterceptAddrDial(pid, maPublic))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPrivate))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPublic))\n\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirOutbound)\n\n\tassert.False(t, net.connGater.InterceptPeerDial(pid))\n\tassert.False(t, net.connGater.InterceptAddrDial(pid, maPrivate))\n\tassert.False(t, net.connGater.InterceptAddrDial(pid, maPublic))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPrivate))\n\tassert.True(t, net.connGater.InterceptAccept(cmaPublic))\n\n\tnet.peerMgr.SetPeerConnected(ts.RandPeerID(), aMultiAddr, lp2pnetwork.DirInbound)\n\n\tassert.False(t, net.connGater.InterceptPeerDial(pid))\n\tassert.False(t, net.connGater.InterceptAddrDial(pid, maPrivate))\n\tassert.False(t, net.connGater.InterceptAddrDial(pid, maPublic))\n\tassert.False(t, net.connGater.InterceptAccept(cmaPrivate))\n\tassert.False(t, net.connGater.InterceptAccept(cmaPublic))\n}\n"
  },
  {
    "path": "network/gossip.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pps \"github.com/libp2p/go-libp2p-pubsub\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype gossipService struct {\n\tctx              context.Context\n\twg               sync.WaitGroup\n\thost             lp2phost.Host\n\tpubsub           *lp2pps.PubSub\n\ttopics           []*lp2pps.Topic\n\tsubs             []*lp2pps.Subscription\n\ttopicBlock       *lp2pps.Topic\n\ttopicTransaction *lp2pps.Topic\n\ttopicConsensus   *lp2pps.Topic\n\tnetworkName      string\n\tnetworkPipe      pipeline.Pipeline[Event]\n\tlogger           *logger.SubLogger\n}\n\nfunc newGossipService(ctx context.Context, host lp2phost.Host, conf *Config,\n\tnetworkPipe pipeline.Pipeline[Event], log *logger.SubLogger,\n) *gossipService {\n\topts := []lp2pps.Option{\n\t\tlp2pps.WithFloodPublish(true),\n\t\tlp2pps.WithMessageSignaturePolicy(lp2pps.StrictNoSign),\n\t\tlp2pps.WithNoAuthor(),\n\t\tlp2pps.WithMessageIdFn(MessageIDFunc),\n\t\tlp2pps.WithSeenMessagesTTL(60 * time.Second),\n\t\tlp2pps.WithMaxMessageSize(conf.MaxGossipMessageSize),\n\t}\n\n\tif conf.IsBootstrapper {\n\t\t// enable Peer exchange on bootstrappers\n\t\topts = append(opts, lp2pps.WithPeerExchange(true))\n\t}\n\n\tgsParams := lp2pps.DefaultGossipSubParams()\n\tif conf.IsBootstrapper {\n\t\tgsParams.Dhi = 12\n\t\tgsParams.D = 8\n\t\tgsParams.Dlo = 6\n\t\tgsParams.HeartbeatInterval = 700 * time.Millisecond\n\t}\n\topts = append(opts, lp2pps.WithGossipSubParams(gsParams))\n\n\tpubsub, err := lp2pps.NewGossipSub(ctx, host, opts...)\n\tif err != nil {\n\t\tlog.Panic(\"unable to start Gossip service\", \"error\", err)\n\n\t\treturn nil\n\t}\n\n\treturn &gossipService{\n\t\tctx:         ctx,\n\t\tnetworkName: conf.NetworkName,\n\t\thost:        host,\n\t\tpubsub:      pubsub,\n\t\twg:          sync.WaitGroup{},\n\t\tnetworkPipe: networkPipe,\n\t\tlogger:      log,\n\t}\n}\n\n// Broadcast broadcasts a message with the specified topic ID to the network.\nfunc (g *gossipService) Broadcast(msg []byte, topicID TopicID) error {\n\tg.logger.Debug(\"publishing new message\", \"topic\", topicID)\n\n\tswitch topicID {\n\tcase TopicIDUnspecified:\n\t\treturn InvalidTopicError{TopicID: topicID}\n\n\tcase TopicIDBlock:\n\t\tif g.topicBlock == nil {\n\t\t\treturn NotSubscribedError{TopicID: topicID}\n\t\t}\n\n\t\treturn g.publish(msg, g.topicBlock)\n\n\tcase TopicIDTransaction:\n\t\tif g.topicTransaction == nil {\n\t\t\treturn NotSubscribedError{TopicID: topicID}\n\t\t}\n\n\t\treturn g.publish(msg, g.topicTransaction)\n\n\tcase TopicIDConsensus:\n\t\tif g.topicConsensus == nil {\n\t\t\treturn NotSubscribedError{TopicID: topicID}\n\t\t}\n\n\t\treturn g.publish(msg, g.topicConsensus)\n\n\tdefault:\n\t\treturn InvalidTopicError{TopicID: topicID}\n\t}\n}\n\n// publish publishes a message with the specified topic to the network.\nfunc (g *gossipService) publish(msg []byte, topic *lp2pps.Topic) error {\n\terr := topic.Publish(g.ctx, msg)\n\tif err != nil {\n\t\treturn LibP2PError{Err: err}\n\t}\n\n\treturn nil\n}\n\n// JoinTopic joins to the topic with the given name and subscribes to receive topic messages.\nfunc (g *gossipService) JoinTopic(topicID TopicID, evaluator PropagationEvaluator) error {\n\tswitch topicID {\n\tcase TopicIDUnspecified:\n\t\treturn InvalidTopicError{TopicID: topicID}\n\n\tcase TopicIDBlock:\n\t\ttopic, err := g.joinTopic(topicID, evaluator)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tg.topicBlock = topic\n\n\t\treturn nil\n\n\tcase TopicIDTransaction:\n\t\ttopic, err := g.joinTopic(topicID, evaluator)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tg.topicTransaction = topic\n\n\t\treturn nil\n\n\tcase TopicIDConsensus:\n\t\ttopic, err := g.joinTopic(topicID, evaluator)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tg.topicConsensus = topic\n\n\t\treturn nil\n\n\tdefault:\n\t\treturn InvalidTopicError{TopicID: topicID}\n\t}\n}\n\nfunc (g *gossipService) TopicName(topicID TopicID) string {\n\treturn fmt.Sprintf(\"/%s/topic/%s/v1\", g.networkName, topicID.String())\n}\n\n// joinTopic joins a given topic and registers a validator for it.\n// If successful, it returns the topic and subscribes to it.\nfunc (g *gossipService) joinTopic(topicID TopicID, evaluator PropagationEvaluator) (*lp2pps.Topic, error) {\n\ttopicName := g.TopicName(topicID)\n\ttopic, err := g.pubsub.Join(topicName)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\tsub, err := topic.Subscribe()\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\terr = g.pubsub.RegisterTopicValidator(\n\t\ttopicName, g.createValidator(topicID, evaluator))\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\tg.topics = append(g.topics, topic)\n\tg.subs = append(g.subs, sub)\n\n\tg.wg.Go(func() {\n\t\tfor {\n\t\t\tlp2pMsg, err := sub.Next(g.ctx)\n\t\t\tif err != nil {\n\t\t\t\tg.logger.Debug(\"readLoop error\", \"error\", err)\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tmsg := &GossipMessage{\n\t\t\t\tFrom:    lp2pMsg.ReceivedFrom,\n\t\t\t\tData:    lp2pMsg.Data,\n\t\t\t\tTopicID: topicID,\n\t\t\t}\n\n\t\t\tg.onReceiveMessage(msg)\n\t\t}\n\t})\n\n\treturn topic, nil\n}\n\nfunc (g *gossipService) createValidator(topicID TopicID, evaluator PropagationEvaluator,\n) func(context.Context, lp2pcore.PeerID, *lp2pps.Message) lp2pps.ValidationResult {\n\treturn func(_ context.Context, peerId lp2pcore.PeerID, lp2pMsg *lp2pps.Message) lp2pps.ValidationResult {\n\t\tmsg := &GossipMessage{\n\t\t\tFrom:    peerId,\n\t\t\tData:    lp2pMsg.Data,\n\t\t\tTopicID: topicID,\n\t\t}\n\n\t\t// Automatically accept and broadcast messages originating from this node\n\t\tif msg.From == g.host.ID() {\n\t\t\treturn lp2pps.ValidationAccept\n\t\t}\n\n\t\tswitch evaluator(msg) {\n\t\tcase Drop:\n\t\t\tg.logger.Debug(\"message dropped\", \"from\", peerId, \"topic\", topicID)\n\n\t\t\treturn lp2pps.ValidationIgnore\n\n\t\tcase DropButConsume:\n\t\t\tg.logger.Debug(\"message dropped but consumed\", \"from\", peerId, \"topic\", topicID)\n\n\t\t\t// Consume the message first\n\t\t\tg.onReceiveMessage(msg)\n\n\t\t\treturn lp2pps.ValidationIgnore\n\n\t\tcase Propagate:\n\t\t\treturn lp2pps.ValidationAccept\n\n\t\tdefault:\n\t\t\tpanic(\"unreachable\")\n\t\t}\n\t}\n}\n\n// Start starts the gossip service.\nfunc (*gossipService) Start() {\n}\n\n// Stop stops the gossip service.\n// It closes all the joined topics and cancels all the subscriptions.\nfunc (g *gossipService) Stop() {\n\tfor _, t := range g.topics {\n\t\t_ = t.Close()\n\t}\n\tfor _, s := range g.subs {\n\t\ts.Cancel()\n\t}\n\n\tg.wg.Wait()\n}\n\nfunc (g *gossipService) onReceiveMessage(msg *GossipMessage) {\n\t// only forward messages delivered by others\n\tif msg.From == g.host.ID() {\n\t\treturn\n\t}\n\n\tg.logger.Debug(\"receiving new gossip message\", \"from\", msg.From)\n\tg.networkPipe.Send(msg)\n}\n"
  },
  {
    "path": "network/gossip_test.go",
    "content": "package network\n\nimport (\n\t\"testing\"\n\n\tlp2pps \"github.com/libp2p/go-libp2p-pubsub\"\n\tpubsubpb \"github.com/libp2p/go-libp2p-pubsub/pb\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestJoinBlockTopic(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\tmsg := []byte(\"test-block-topic\")\n\n\trequire.ErrorIs(t, net.gossip.Broadcast(msg, TopicIDBlock),\n\t\tNotSubscribedError{\n\t\t\tTopicID: TopicIDBlock,\n\t\t})\n\trequire.NoError(t, net.JoinTopic(TopicIDBlock, alwaysPropagate))\n\trequire.NoError(t, net.gossip.Broadcast(msg, TopicIDBlock))\n\n\trequire.Error(t, net.JoinTopic(TopicIDBlock, alwaysPropagate), \"already joined\")\n}\n\nfunc TestJoinConsensusTopic(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\tmsg := []byte(\"test-consensus-topic\")\n\n\trequire.ErrorIs(t, net.gossip.Broadcast(msg, TopicIDConsensus),\n\t\tNotSubscribedError{\n\t\t\tTopicID: TopicIDConsensus,\n\t\t})\n\trequire.NoError(t, net.JoinTopic(TopicIDConsensus, alwaysPropagate))\n\trequire.NoError(t, net.gossip.Broadcast(msg, TopicIDConsensus))\n\n\trequire.Error(t, net.JoinTopic(TopicIDConsensus, alwaysPropagate), \"already joined\")\n}\n\nfunc TestJoinTransactionTopic(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\tmsg := []byte(\"test-transaction-topic\")\n\n\trequire.ErrorIs(t, net.gossip.Broadcast(msg, TopicIDTransaction),\n\t\tNotSubscribedError{\n\t\t\tTopicID: TopicIDTransaction,\n\t\t})\n\trequire.NoError(t, net.JoinTopic(TopicIDTransaction, alwaysPropagate))\n\trequire.NoError(t, net.gossip.Broadcast(msg, TopicIDTransaction))\n\n\trequire.Error(t, net.JoinTopic(TopicIDTransaction, alwaysPropagate), \"already joined\")\n}\n\nfunc TestJoinInvalidTopic(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\trequire.ErrorIs(t, net.JoinTopic(TopicIDUnspecified, alwaysPropagate),\n\t\tInvalidTopicError{\n\t\t\tTopicID: TopicIDUnspecified,\n\t\t})\n\n\trequire.ErrorIs(t, net.JoinTopic(TopicID(-1), alwaysPropagate),\n\t\tInvalidTopicError{\n\t\t\tTopicID: TopicID(-1),\n\t\t})\n}\n\nfunc TestInvalidTopic(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\tmsg := []byte(\"test-invalid-topic\")\n\n\trequire.ErrorIs(t, net.gossip.Broadcast(msg, TopicIDUnspecified),\n\t\tInvalidTopicError{\n\t\t\tTopicID: TopicIDUnspecified,\n\t\t})\n\n\trequire.ErrorIs(t, net.gossip.Broadcast(msg, -1),\n\t\tInvalidTopicError{\n\t\t\tTopicID: TopicID(-1),\n\t\t})\n}\n\nfunc TestTopicValidator(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\tselfID := net.host.ID()\n\tpropagate := Drop\n\tvalidator := net.gossip.createValidator(TopicIDConsensus,\n\t\tfunc(_ *GossipMessage) PropagationPolicy { return propagate })\n\n\ttests := []struct {\n\t\tname           string\n\t\tpeerID         lp2pcore.PeerID\n\t\tpolicy         PropagationPolicy\n\t\texpectedResult lp2pps.ValidationResult\n\t}{\n\t\t{\n\t\t\tname:           \"Message from self\",\n\t\t\tpolicy:         Drop,\n\t\t\tpeerID:         selfID,\n\t\t\texpectedResult: lp2pps.ValidationAccept,\n\t\t},\n\t\t{\n\t\t\tname:           \"Message from self\",\n\t\t\tpolicy:         DropButConsume,\n\t\t\tpeerID:         selfID,\n\t\t\texpectedResult: lp2pps.ValidationAccept,\n\t\t},\n\t\t{\n\t\t\tname:           \"Message from self\",\n\t\t\tpolicy:         propagate,\n\t\t\tpeerID:         selfID,\n\t\t\texpectedResult: lp2pps.ValidationAccept,\n\t\t},\n\t\t{\n\t\t\tname:           \"Message from other peer, should not propagate\",\n\t\t\tpolicy:         Drop,\n\t\t\tpeerID:         \"other-peerID\",\n\t\t\texpectedResult: lp2pps.ValidationIgnore,\n\t\t},\n\t\t{\n\t\t\tname:           \"Message from other peer, should not propagate\",\n\t\t\tpolicy:         DropButConsume,\n\t\t\tpeerID:         \"other-peerID\",\n\t\t\texpectedResult: lp2pps.ValidationIgnore,\n\t\t},\n\t\t{\n\t\t\tname:           \"Message from other peer, should propagate\",\n\t\t\tpolicy:         Propagate,\n\t\t\tpeerID:         \"other-peerID\",\n\t\t\texpectedResult: lp2pps.ValidationAccept,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tmsg := &lp2pps.Message{\n\t\t\t\tMessage: &pubsubpb.Message{\n\t\t\t\t\tData: []byte(\"some-data\"),\n\t\t\t\t},\n\t\t\t}\n\t\t\tpropagate = tt.policy\n\t\t\tresult := validator(t.Context(), tt.peerID, msg)\n\t\t\tassert.Equal(t, tt.expectedResult, result)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "network/interface.go",
    "content": "package network\n\nimport (\n\t\"io\"\n\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n)\n\ntype TopicID int\n\nconst (\n\tTopicIDUnspecified TopicID = 0\n\tTopicIDBlock       TopicID = 1\n\tTopicIDTransaction TopicID = 2\n\tTopicIDConsensus   TopicID = 3\n)\n\nfunc (t TopicID) String() string {\n\tswitch t {\n\tcase TopicIDUnspecified:\n\t\treturn \"unspecified\"\n\n\tcase TopicIDBlock:\n\t\treturn \"block\"\n\n\tcase TopicIDTransaction:\n\t\treturn \"transaction\"\n\n\tcase TopicIDConsensus:\n\t\treturn \"consensus\"\n\t}\n\n\treturn \"invalid\"\n}\n\ntype EventType int\n\nconst (\n\tEventTypeConnect    EventType = 1\n\tEventTypeDisconnect EventType = 2\n\tEventTypeProtocols  EventType = 3\n\tEventTypeGossip     EventType = 4\n\tEventTypeStream     EventType = 5\n)\n\nfunc (t EventType) String() string {\n\tswitch t {\n\tcase EventTypeConnect:\n\t\treturn \"connect\"\n\n\tcase EventTypeDisconnect:\n\t\treturn \"disconnect\"\n\n\tcase EventTypeProtocols:\n\t\treturn \"protocols\"\n\n\tcase EventTypeGossip:\n\t\treturn \"gossip-msg\"\n\n\tcase EventTypeStream:\n\t\treturn \"stream-msg\"\n\t}\n\n\treturn \"invalid\"\n}\n\ntype Event interface {\n\tType() EventType\n}\n\n// GossipMessage represents message from PubSub module.\n// `From` is the ID of the peer that we received a message from.\ntype GossipMessage struct {\n\tFrom    lp2pcore.PeerID\n\tData    []byte\n\tTopicID TopicID\n}\n\nfunc (*GossipMessage) Type() EventType {\n\treturn EventTypeGossip\n}\n\n// StreamMessage represents message from Stream module.\n// `From` is the ID of the peer that we received a message from.\ntype StreamMessage struct {\n\tFrom   lp2pcore.PeerID\n\tReader io.ReadCloser\n}\n\nfunc (*StreamMessage) Type() EventType {\n\treturn EventTypeStream\n}\n\n// ConnectEvent represents a peer connection event.\ntype ConnectEvent struct {\n\tPeerID        lp2pcore.PeerID\n\tRemoteAddress string\n\tDirection     lp2pnetwork.Direction\n}\n\nfunc (*ConnectEvent) Type() EventType {\n\treturn EventTypeConnect\n}\n\n// DisconnectEvent represents a peer disconnection event.\ntype DisconnectEvent struct {\n\tPeerID lp2pcore.PeerID\n}\n\nfunc (*DisconnectEvent) Type() EventType {\n\treturn EventTypeDisconnect\n}\n\n// ProtocolsEvents represents updating protocols event.\ntype ProtocolsEvents struct {\n\tPeerID    lp2pcore.PeerID\n\tProtocols []string\n}\n\nfunc (*ProtocolsEvents) Type() EventType {\n\treturn EventTypeProtocols\n}\n\n// PropagationPolicy defines the possible actions for how a gossip message should propagate.\ntype PropagationPolicy int\n\nconst (\n\t// Propagate means the message should be forwarded to other peers in the network.\n\tPropagate = PropagationPolicy(0)\n\t// DropButConsume means the message should not be forwarded but should be processed locally.\n\tDropButConsume = PropagationPolicy(1)\n\t// Drop means the message should be discarded without any further processing.\n\tDrop = PropagationPolicy(2)\n)\n\n// PropagationEvaluator is a function that evaluates how a gossip message should propagate.\ntype PropagationEvaluator func(*GossipMessage) PropagationPolicy\n\ntype Network interface {\n\tStart() error\n\tStop()\n\tProtect(lp2pcore.PeerID, string)\n\tBroadcast([]byte, TopicID)\n\tSendTo([]byte, lp2pcore.PeerID)\n\tJoinTopic(TopicID, PropagationEvaluator) error\n\tCloseConnection(lp2pcore.PeerID)\n\tSelfID() lp2pcore.PeerID\n\tNumConnectedPeers() int\n\tNumInbound() int\n\tNumOutbound() int\n\tReachabilityStatus() string\n\tHostAddrs() []string\n\tName() string\n\tProtocols() []string\n}\n"
  },
  {
    "path": "network/mdns.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\tlp2pmdns \"github.com/libp2p/go-libp2p/p2p/discovery/mdns\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype mdnsService struct {\n\tctx     context.Context\n\thost    lp2phost.Host\n\tservice lp2pmdns.Service\n\tlogger  *logger.SubLogger\n}\n\n// newMdnsService creates an mDNS discovery service and attaches it to the libp2p Host.\n// This lets us automatically discover peers on the same LAN and connect to them.\nfunc newMdnsService(ctx context.Context, host lp2phost.Host, log *logger.SubLogger) *mdnsService {\n\tmdns := &mdnsService{\n\t\tctx:    ctx,\n\t\thost:   host,\n\t\tlogger: log,\n\t}\n\t// setup mDNS discovery to find local peers\n\tmdns.service = lp2pmdns.NewMdnsService(host, \"pactus-mdns\", mdns)\n\n\treturn mdns\n}\n\n// HandlePeerFound connects to peers discovered via mDNS. Once they're connected,\n// the PubSub system will automatically start interacting with them if they also\n// support PubSub.\nfunc (s *mdnsService) HandlePeerFound(addrInfo lp2ppeer.AddrInfo) {\n\tctx, cancel := context.WithTimeout(s.ctx, time.Second*10)\n\tdefer cancel()\n\n\tif addrInfo.ID != s.host.ID() {\n\t\ts.logger.Debug(\"connecting to new peer\", \"addr\", addrInfo.Addrs, \"id\", addrInfo.ID)\n\t\tif err := s.host.Connect(ctx, addrInfo); err != nil {\n\t\t\ts.logger.Error(\"error on connecting to peer\", \"id\", addrInfo.ID, \"error\", err)\n\t\t}\n\t}\n}\n\nfunc (s *mdnsService) Start() error {\n\terr := s.service.Start()\n\tif err != nil {\n\t\treturn LibP2PError{Err: err}\n\t}\n\n\treturn nil\n}\n\nfunc (s *mdnsService) Stop() {\n\terr := s.service.Close()\n\tif err != nil {\n\t\ts.logger.Error(\"unable to close the network\", \"error\", err)\n\t}\n}\n"
  },
  {
    "path": "network/mdns_test.go",
    "content": "package network\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMDNS(t *testing.T) {\n\tif runtime.GOOS == \"darwin\" {\n\t\t// Disable this test on darwin (macOS)\n\t\t// Read more here: https://github.com/pactus-project/pactus/issues/1860\n\t\treturn\n\t}\n\n\tconf1 := testConfig()\n\tconf1.ListenAddrStrings = []string{\n\t\t\"/ip6/::1/tcp/0\", \"/ip6/::1/udp/0/quic-v1\",\n\t\t\"/ip4/127.0.0.1/tcp/0\", \"/ip4/127.0.0.1/udp/0/quic-v1\",\n\t}\n\tconf1.EnableMdns = true\n\tnet1 := makeTestNetwork(t, conf1, nil)\n\n\tconf2 := testConfig()\n\tconf2.ListenAddrStrings = []string{\n\t\t\"/ip6/::1/tcp/0\", \"/ip6/::1/udp/0/quic-v1\",\n\t\t\"/ip4/127.0.0.1/tcp/0\", \"/ip4/127.0.0.1/udp/0/quic-v1\",\n\t}\n\tconf2.EnableMdns = true\n\tnet2 := makeTestNetwork(t, conf2, nil)\n\n\trequire.NoError(t, net1.Start())\n\ttime.Sleep(250 * time.Millisecond)\n\n\trequire.NoError(t, net2.Start())\n\ttime.Sleep(250 * time.Millisecond)\n\n\tmsg := []byte(\"test-mdns\")\n\tnet1.SendTo(msg, net2.SelfID())\n\n\tse := shouldReceiveEvent(t, net2, EventTypeStream).(*StreamMessage)\n\tassert.Equal(t, net1.SelfID(), se.From)\n\tassert.Equal(t, msg, readData(t, se.Reader, len(msg)))\n\n\tnet1.Stop()\n\tnet2.Stop()\n}\n"
  },
  {
    "path": "network/mock.go",
    "content": "package network\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"io\"\n\t\"sync\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nvar _ Network = &MockNetwork{}\n\ntype PublishData struct {\n\tData   []byte\n\tTarget *lp2pcore.PeerID\n}\n\n// MockNetwork is a mock implementation of the Network interface for testing.\ntype MockNetwork struct {\n\t*testsuite.TestSuite\n\n\tlk        sync.RWMutex\n\tID        lp2ppeer.ID\n\tPublishCh chan PublishData\n\tEventPipe pipeline.Pipeline[Event]\n\tOtherNets map[lp2ppeer.ID]*MockNetwork\n}\n\nfunc MockingNetwork(ts *testsuite.TestSuite, pid lp2ppeer.ID) *MockNetwork {\n\treturn &MockNetwork{\n\t\tTestSuite: ts,\n\t\tPublishCh: make(chan PublishData, 100),\n\t\tEventPipe: pipeline.New[Event](context.Background()),\n\t\tOtherNets: make(map[lp2ppeer.ID]*MockNetwork),\n\t\tID:        pid,\n\t}\n}\n\nfunc (*MockNetwork) Start() error {\n\treturn nil\n}\n\nfunc (*MockNetwork) Stop() {}\n\nfunc (*MockNetwork) Protect(_ lp2pcore.PeerID, _ string) {}\n\nfunc (*MockNetwork) JoinTopic(_ TopicID, _ PropagationEvaluator) error {\n\treturn nil\n}\n\nfunc (m *MockNetwork) SelfID() lp2ppeer.ID {\n\treturn m.ID\n}\n\nfunc (m *MockNetwork) SendTo(data []byte, pid lp2pcore.PeerID) {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\tnet, exists := m.OtherNets[pid]\n\tif exists {\n\t\t// direct message\n\t\tevent := &StreamMessage{\n\t\t\tFrom:   m.ID,\n\t\t\tReader: io.NopCloser(bytes.NewReader(data)),\n\t\t}\n\n\t\tnet.EventPipe.Send(event)\n\t}\n\n\tm.PublishCh <- PublishData{\n\t\tData:   data,\n\t\tTarget: &pid,\n\t}\n}\n\nfunc (m *MockNetwork) Broadcast(data []byte, _ TopicID) {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\tfor _, net := range m.OtherNets {\n\t\tif net.SelfID() == m.ID {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Broadcast message\n\t\tevent := &GossipMessage{\n\t\t\tFrom: m.ID,\n\t\t\tData: data,\n\t\t}\n\t\tnet.EventPipe.Send(event)\n\t}\n\n\tm.PublishCh <- PublishData{\n\t\tData:   data,\n\t\tTarget: nil, // Send to all\n\t}\n}\n\nfunc (m *MockNetwork) CloseConnection(pid lp2ppeer.ID) {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\tdelete(m.OtherNets, pid)\n}\n\nfunc (m *MockNetwork) IsClosed(pid lp2ppeer.ID) bool {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\t_, exists := m.OtherNets[pid]\n\n\treturn !exists\n}\n\nfunc (m *MockNetwork) NumConnectedPeers() int {\n\treturn len(m.OtherNets)\n}\n\nfunc (m *MockNetwork) AddAnotherNetwork(otherNet *MockNetwork, direction lp2pnetwork.Direction) {\n\tm.lk.Lock()\n\tdefer m.lk.Unlock()\n\n\tm.OtherNets[otherNet.SelfID()] = otherNet\n\n\tm.EventPipe.Send(&ConnectEvent{\n\t\tPeerID:        otherNet.SelfID(),\n\t\tRemoteAddress: m.RandMultiAddress(),\n\t\tDirection:     direction,\n\t})\n\n\tm.EventPipe.Send(&ProtocolsEvents{\n\t\tPeerID:    otherNet.SelfID(),\n\t\tProtocols: []string{\"protocol-1\", \"protocol-2\"},\n\t})\n}\n\nfunc (*MockNetwork) ReachabilityStatus() string {\n\treturn \"Unknown\"\n}\n\nfunc (*MockNetwork) HostAddrs() []string {\n\treturn []string{\"localhost\"}\n}\n\nfunc (*MockNetwork) Name() string {\n\treturn \"pactus\"\n}\n\nfunc (*MockNetwork) Protocols() []string {\n\treturn []string{\"gossip\"}\n}\n\nfunc (m *MockNetwork) NumInbound() int {\n\treturn len(m.OtherNets)\n}\n\nfunc (m *MockNetwork) NumOutbound() int {\n\treturn len(m.OtherNets)\n}\n"
  },
  {
    "path": "network/network.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2p \"github.com/libp2p/go-libp2p\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2pcrypto \"github.com/libp2p/go-libp2p/core/crypto\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2pmetrics \"github.com/libp2p/go-libp2p/core/metrics\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\tlp2pautorelay \"github.com/libp2p/go-libp2p/p2p/host/autorelay\"\n\tlp2prcmgr \"github.com/libp2p/go-libp2p/p2p/host/resource-manager\"\n\tlp2pconnmgr \"github.com/libp2p/go-libp2p/p2p/net/connmgr\"\n\tlp2pproto \"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/proto\"\n\tlp2quic \"github.com/libp2p/go-libp2p/p2p/transport/quic\"\n\tlp2ptcp \"github.com/libp2p/go-libp2p/p2p/transport/tcp\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/exp/slices\"\n)\n\nvar _ Network = &network{}\n\ntype network struct {\n\tctx         context.Context\n\tconfig      *Config\n\thost        lp2phost.Host\n\tmdns        *mdnsService\n\tdht         *dhtService\n\tpeerMgr     *peerMgr\n\tconnGater   *ConnectionGater\n\tstream      *streamService\n\tgossip      *gossipService\n\tnotifee     *NotifeeService\n\tnetworkPipe pipeline.Pipeline[Event]\n\tlogger      *logger.SubLogger\n}\n\nfunc loadOrCreateKey(path string) (lp2pcrypto.PrivKey, error) {\n\tif util.PathExists(path) {\n\t\tdata, err := util.ReadFile(path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\th := strings.TrimSpace(string(data))\n\t\tbs, err := hex.DecodeString(h)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tkey, err := lp2pcrypto.UnmarshalPrivateKey(bs)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn key, nil\n\t}\n\tkey, _, err := lp2pcrypto.GenerateEd25519Key(nil)\n\tif err != nil {\n\t\treturn nil, errors.New(\"failed to generate private key\")\n\t}\n\tbs, err := lp2pcrypto.MarshalPrivateKey(key)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\th := hex.EncodeToString(bs)\n\terr = util.WriteFile(path, []byte(h))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn key, nil\n}\n\nfunc NewNetwork(ctx context.Context, conf *Config, networkPipe pipeline.Pipeline[Event]) (Network, error) {\n\tlog := logger.NewSubLogger(\"_network\", nil)\n\n\treturn makeNetwork(ctx, conf, log, networkPipe, []lp2p.Option{})\n}\n\nfunc makeNetwork(ctx context.Context, conf *Config,\n\tlog *logger.SubLogger, networkPipe pipeline.Pipeline[Event], opts []lp2p.Option,\n) (*network, error) {\n\tself := new(network)\n\n\tnetworkKey, err := loadOrCreateKey(conf.NetworkKey)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\trcMgrOpt := []lp2prcmgr.Option{}\n\tif conf.EnableMetrics {\n\t\tlog.Info(\"metric enabled\")\n\t\tstr, err := lp2prcmgr.NewStatsTraceReporter()\n\t\tif err != nil {\n\t\t\treturn nil, LibP2PError{Err: err}\n\t\t}\n\n\t\t// metrics for rcMgr\n\t\tlp2prcmgr.MustRegisterWith(prometheus.DefaultRegisterer)\n\t\trcMgrOpt = append(rcMgrOpt, lp2prcmgr.WithTraceReporter(str))\n\n\t\t// metrics for lp2p\n\t\tbandwidthCounter := lp2pmetrics.NewBandwidthCounter()\n\t\topts = append(opts, lp2p.BandwidthReporter(bandwidthCounter))\n\t} else {\n\t\trcMgrOpt = append(rcMgrOpt, lp2prcmgr.WithMetricsDisabled())\n\t\topts = append(opts, lp2p.DisableMetrics())\n\t}\n\n\tresMgr, err := lp2prcmgr.NewResourceManager(\n\t\tlp2prcmgr.NewFixedLimiter(lp2prcmgr.InfiniteLimits),\n\t\trcMgrOpt...,\n\t)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\t// https://docs.libp2p.io/concepts/security/dos-mitigation/#limit-the-number-of-connections-your-application-needs\n\t// The ConnManager is in charge of pruning connections to stay below the defined high watermark,\n\t// in contrast, the Resource Manager represents a hard limit where connections will fail to\n\t// be created in the first place once we’ve reached our limits.\n\t//\n\tlowWM := conf.MaxConns                        // Low  Watermark, ex: 64 (if max_conn = 64)\n\thighWM := conf.MaxConns + (conf.MaxConns / 4) // High Watermark, ex: 80 (if max_conn = 64)\n\tconnMgr, err := lp2pconnmgr.NewConnManager(\n\t\tlowWM, highWM,\n\t\tlp2pconnmgr.WithGracePeriod(time.Minute),\n\t)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\tlog.Info(\"connection manager created\", \"lowWM\", lowWM, \"highWM\", highWM)\n\n\topts = append(opts,\n\t\tlp2p.Identity(networkKey),\n\t\tlp2p.ListenAddrs(conf.ListenAddrs()...),\n\t\tlp2p.UserAgent(version.NodeAgent.String()),\n\t\tlp2p.ResourceManager(resMgr),\n\t\tlp2p.ConnectionManager(connMgr),\n\t\tlp2p.Ping(true),\n\t\tlp2p.Transport(lp2ptcp.NewTCPTransport),\n\t)\n\n\tif conf.EnableUDP {\n\t\tlog.Info(\"UDP is enabled\")\n\t\topts = append(opts,\n\t\t\tlp2p.Transport(lp2quic.NewTransport))\n\t}\n\n\tif conf.EnableNATService {\n\t\tlog.Info(\"Nat service enabled\")\n\t\topts = append(opts,\n\t\t\tlp2p.EnableNATService(),\n\t\t)\n\t} else {\n\t\tlog.Info(\"AutoNATv2 enabled\")\n\t\topts = append(opts,\n\t\t\tlp2p.EnableAutoNATv2(),\n\t\t)\n\t}\n\n\tif conf.EnableUPnP {\n\t\tlog.Info(\"UPnP enabled\")\n\t\topts = append(opts,\n\t\t\tlp2p.NATPortMap(),\n\t\t)\n\t}\n\t// networkReady is a channel used to wait until the network is ready.\n\t// This is primarily to avoid reading while writing.\n\tnetworkReady := make(chan struct{})\n\tdefer close(networkReady)\n\n\tnetworkGetter := func() *network {\n\t\t<-networkReady              // Closed when newNetwork is finished\n\t\ttime.Sleep(1 * time.Second) // Adding a safety delay\n\n\t\treturn self\n\t}\n\n\tif conf.EnableRelay {\n\t\tlog.Info(\"relay enabled\")\n\n\t\tautoRelayOpt := []lp2pautorelay.Option{\n\t\t\tlp2pautorelay.WithMinCandidates(1),\n\t\t\tlp2pautorelay.WithMaxCandidates(4),\n\t\t\tlp2pautorelay.WithMinInterval(1 * time.Minute),\n\t\t}\n\n\t\topts = append(opts,\n\t\t\tlp2p.EnableRelay(),\n\t\t\tlp2p.EnableAutoRelayWithPeerSource(findRelayPeers(networkGetter), autoRelayOpt...),\n\t\t\tlp2p.EnableHolePunching(),\n\t\t)\n\t} else {\n\t\tlog.Info(\"relay disabled\")\n\t\topts = append(opts,\n\t\t\tlp2p.DisableRelay(),\n\t\t)\n\t}\n\n\tif conf.EnableRelayService {\n\t\tlog.Info(\"relay service enabled\")\n\t\topts = append(opts, lp2p.EnableRelayService())\n\t}\n\n\tprivateSubnets := PrivateSubnets()\n\tprivateFilters := SubnetsToFilters(privateSubnets, multiaddr.ActionDeny)\n\tpublicAddrs := conf.PublicAddr()\n\n\taddrFactory := lp2p.AddrsFactory(func(mas []multiaddr.Multiaddr) []multiaddr.Multiaddr {\n\t\taddrs := []multiaddr.Multiaddr{}\n\t\tfor _, addr := range mas {\n\t\t\tif conf.ForcePrivateNetwork || !privateFilters.AddrBlocked(addr) {\n\t\t\t\taddrs = append(addrs, addr)\n\t\t\t}\n\t\t}\n\t\tif publicAddrs != nil {\n\t\t\taddrs = append(addrs, publicAddrs)\n\t\t}\n\n\t\treturn addrs\n\t})\n\topts = append(opts, addrFactory)\n\n\tconnGater, err := NewConnectionGater(conf, log)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\topts = append(opts, lp2p.ConnectionGater(connGater))\n\n\thost, err := lp2p.New(opts...)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\tself.ctx = ctx\n\tself.config = conf\n\tself.logger = log\n\tself.host = host\n\tself.connGater = connGater\n\tself.networkPipe = networkPipe\n\n\tlog.SetObj(self)\n\n\tconf.CheckIsBootstrapper(host.ID())\n\n\tkadProtocolID := lp2pcore.ProtocolID(fmt.Sprintf(\"/%s/gossip/v1\", conf.NetworkName)) // TODO: better name?\n\tstreamProtocolID := lp2pcore.ProtocolID(fmt.Sprintf(\"/%s/stream/v1\", conf.NetworkName))\n\n\tif conf.EnableMdns {\n\t\tself.mdns = newMdnsService(ctx, self.host, self.logger)\n\t}\n\n\tself.peerMgr = newPeerMgr(ctx, host, conf, self.logger)\n\tself.dht = newDHTService(ctx, host, conf, kadProtocolID, self.logger)\n\tself.stream = newStreamService(ctx, host, conf, streamProtocolID, self.networkPipe, self.logger)\n\tself.gossip = newGossipService(ctx, host, conf, self.networkPipe, self.logger)\n\tself.notifee = newNotifeeService(ctx, host, self.networkPipe, self.peerMgr, streamProtocolID, self.logger)\n\n\tself.logger.Info(\"network setup\", \"id\", self.host.ID(),\n\t\t\"name\", conf.NetworkName,\n\t\t\"address\", conf.ListenAddrs(),\n\t\t\"bootstrapper\", conf.IsBootstrapper,\n\t\t\"maxConns\", conf.MaxConns)\n\n\treturn self, nil\n}\n\nfunc findRelayPeers(networkGetter func() *network) func(ctx context.Context,\n\tnum int) <-chan lp2ppeer.AddrInfo {\n\treturn func(ctx context.Context, num int) <-chan lp2ppeer.AddrInfo {\n\t\t// make a channel to return, and put items from numPeers on\n\t\t// that channel up to numPeers. Then close it.\n\t\tr := make(chan lp2ppeer.AddrInfo, num)\n\t\tdefer close(r)\n\n\t\t// Because the network is initialized after relay, we need to\n\t\t// obtain them indirectly this way.\n\t\tnet := networkGetter()\n\t\tif net == nil { // context canceled etc.\n\t\t\treturn r\n\t\t}\n\n\t\tnet.logger.Debug(\"try to find relay peers\", \"num\", num)\n\n\t\tpeerStore := net.host.Peerstore()\n\t\tfor _, pid := range peerStore.Peers() {\n\t\t\tprotos, err := peerStore.GetProtocols(pid)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif !slices.Contains(protos, lp2pproto.ProtoIDv2Hop) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\taddr := peerStore.Addrs(pid)\n\t\t\tnet.logger.Debug(\"found relay peer\", \"addr\", addr)\n\t\t\tdhtPeer := lp2ppeer.AddrInfo{ID: pid, Addrs: addr}\n\t\t\t// Attempt to put peers on r if we have space,\n\t\t\t// otherwise return (we reached numPeers)\n\t\t\tselect {\n\t\t\tcase r <- dhtPeer:\n\t\t\tcase <-ctx.Done():\n\t\t\t\treturn r\n\t\t\tdefault:\n\t\t\t\treturn r\n\t\t\t}\n\t\t}\n\n\t\treturn r\n\t}\n}\n\nfunc (n *network) Start() error {\n\tif err := n.dht.Start(); err != nil {\n\t\treturn LibP2PError{Err: err}\n\t}\n\tif n.mdns != nil {\n\t\tif err := n.mdns.Start(); err != nil {\n\t\t\treturn LibP2PError{Err: err}\n\t\t}\n\t}\n\tn.gossip.Start()\n\tn.stream.Start()\n\tn.peerMgr.Start()\n\tn.notifee.Start()\n\n\tn.host.Network().Notify(n.notifee)\n\tn.connGater.SetPeerManager(n.peerMgr)\n\n\tn.logger.Info(\"network started\", \"addr\", n.host.Addrs(), \"id\", n.host.ID())\n\n\treturn nil\n}\n\nfunc (n *network) Stop() {\n\tif n.mdns != nil {\n\t\tn.mdns.Stop()\n\t}\n\n\tn.gossip.Stop()\n\tn.stream.Stop()\n\tn.peerMgr.Stop()\n\tn.notifee.Stop()\n\tn.dht.Stop()\n\n\tif err := n.host.Close(); err != nil {\n\t\tn.logger.Error(\"unable to close the network\", \"error\", err)\n\t}\n}\n\nfunc (n *network) SelfID() lp2ppeer.ID {\n\treturn n.host.ID()\n}\n\nfunc (n *network) Protect(pid lp2pcore.PeerID, tag string) {\n\tn.host.ConnManager().Protect(pid, tag)\n}\n\n// SendTo sends a message to a specific peer identified by pid asynchronously.\n// It uses a goroutine to ensure that if sending is blocked, receiving messages won't be blocked.\nfunc (n *network) SendTo(msg []byte, pid lp2pcore.PeerID) {\n\tgo func() {\n\t\t_, err := n.stream.SendTo(msg, pid)\n\t\tif err != nil {\n\t\t\tn.logger.Warn(\"error on sending msg\", \"pid\", pid, \"error\", err)\n\t\t}\n\t}()\n}\n\n// Broadcast sends a message to all peers subscribed to a specific topic asynchronously.\n// It uses a goroutine to ensure that if broadcasting is blocked, receiving messages won't be blocked.\nfunc (n *network) Broadcast(msg []byte, topicID TopicID) {\n\tgo func() {\n\t\terr := n.gossip.Broadcast(msg, topicID)\n\t\tif err != nil {\n\t\t\tn.logger.Warn(\"error on broadcasting msg\", \"error\", err)\n\t\t}\n\t}()\n}\n\nfunc (n *network) JoinTopic(topicID TopicID, evaluator PropagationEvaluator) error {\n\treturn n.gossip.JoinTopic(topicID, evaluator)\n}\n\nfunc (n *network) CloseConnection(pid lp2ppeer.ID) {\n\tn.logger.Debug(\"closing connection\", \"pid\", pid)\n\n\tif err := n.host.Network().ClosePeer(pid); err != nil {\n\t\tn.logger.Warn(\"unable to close connection\", \"peer\", pid)\n\t}\n\n\tn.logger.Debug(\"connection closed\", \"pid\", pid)\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (n *network) LogString() string {\n\treturn fmt.Sprintf(\"{%d}\", n.NumConnectedPeers())\n}\n\nfunc (n *network) NumConnectedPeers() int {\n\treturn len(n.host.Network().Peers())\n}\n\nfunc (n *network) ReachabilityStatus() string {\n\treturn n.notifee.Reachability().String()\n}\n\nfunc (n *network) HostAddrs() []string {\n\taddrs := make([]string, 0, len(n.host.Addrs()))\n\tfor _, addr := range n.host.Addrs() {\n\t\taddrs = append(addrs, addr.String())\n\t}\n\n\treturn addrs\n}\n\nfunc (n *network) Name() string {\n\treturn n.config.NetworkName\n}\n\nfunc (n *network) Protocols() []string {\n\tprotocolIDs := n.host.Mux().Protocols()\n\tprotocols := make([]string, 0, len(protocolIDs))\n\tfor _, p := range protocolIDs {\n\t\tprotocols = append(protocols, string(p))\n\t}\n\n\treturn protocols\n}\n\nfunc (n *network) NumInbound() int {\n\treturn n.peerMgr.NumInbound()\n}\n\nfunc (n *network) NumOutbound() int {\n\treturn n.peerMgr.NumOutbound()\n}\n"
  },
  {
    "path": "network/network_test.go",
    "content": "package network\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2p \"github.com/libp2p/go-libp2p\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\tlp2pproto \"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/proto\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc alwaysPropagate(_ *GossipMessage) PropagationPolicy {\n\treturn Propagate\n}\n\nfunc makeTestNetwork(t *testing.T, conf *Config, opts []lp2p.Option) *network {\n\tt.Helper()\n\n\tpipe := pipeline.New[Event](t.Context())\n\tlog := logger.NewSubLogger(\"_network\", nil)\n\tnet, err := makeNetwork(t.Context(), conf, log, pipe, opts)\n\trequire.NoError(t, err)\n\n\tlog.SetObj(testsuite.NewOverrideLogStringer(\n\t\tfmt.Sprintf(\"%s - %s: \", net.SelfID().ShortString(), t.Name()), net))\n\n\trequire.NoError(t, net.Start())\n\n\treturn net\n}\n\nfunc testConfig() *Config {\n\treturn &Config{\n\t\tListenAddrStrings:         []string{},\n\t\tNetworkKey:                util.TempFilePath(),\n\t\tBootstrapAddrStrings:      []string{},\n\t\tMaxConns:                  16,\n\t\tEnableUDP:                 true,\n\t\tEnableNATService:          false,\n\t\tEnableUPnP:                false,\n\t\tEnableRelay:               false,\n\t\tEnableRelayService:        false,\n\t\tEnableMdns:                false,\n\t\tForcePrivateNetwork:       true,\n\t\tNetworkName:               \"test\",\n\t\tDefaultPort:               testsuite.FindFreePort(),\n\t\tPeerStorePath:             util.TempFilePath(),\n\t\tStreamTimeout:             10 * time.Second,\n\t\tCheckConnectivityInterval: 1 * time.Second,\n\t\tMaxGossipMessageSize:      1 * 1024 * 1024, // 1 MB\n\t\tMaxStreamMessageSize:      8 * 1024 * 1024, // 8 MB\n\t}\n}\n\nfunc shouldReceiveEvent(t *testing.T, net *network, eventType EventType) Event {\n\tt.Helper()\n\n\ttimer := time.NewTimer(10 * time.Second)\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\trequire.NoError(t, fmt.Errorf(\"shouldReceiveEvent Timeout, test: %v id:%s\", t.Name(), net.SelfID().String()))\n\n\t\t\treturn nil\n\n\t\tcase e := <-net.networkPipe.UnsafeGetChannel():\n\t\t\tif e.Type() == eventType {\n\t\t\t\treturn e\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc shouldNotReceiveEvent(t *testing.T, net *network) {\n\tt.Helper()\n\n\ttimer := time.NewTimer(100 * time.Millisecond)\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\treturn\n\n\t\tcase <-net.networkPipe.UnsafeGetChannel():\n\t\t\trequire.NoError(t, fmt.Errorf(\"shouldNotReceiveEvent, test: %v id:%s\", t.Name(), net.SelfID().String()))\n\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc readData(t *testing.T, r io.ReadCloser, length int) []byte {\n\tt.Helper()\n\n\tbuf := make([]byte, length)\n\t_, err := r.Read(buf)\n\tif !errors.Is(err, io.EOF) {\n\t\trequire.NoError(t, err)\n\t\trequire.NoError(t, r.Close())\n\t}\n\n\treturn buf\n}\n\nfunc TestStoppingNetwork(t *testing.T) {\n\tnet := makeTestNetwork(t, testConfig(), nil)\n\n\trequire.NoError(t, net.Start())\n\trequire.NoError(t, net.JoinTopic(TopicIDBlock, alwaysPropagate))\n\n\t// Should stop peacefully\n\tnet.Stop()\n}\n\n// In this test, we are setting up a simulated network environment that consists of these nodes:\n//   - B is a Bootstrap node\n//   - P is a Public and relay node\n//   - M, N, and X are Private Nodes behind a Network Address Translation (NAT)\n//   - M and N have relay enabled, while X does not.\n//\n// The test evaluates the following scenarios:\n//   - Get supporting protocols\n//   - Connection establishment to the bootstrap node\n//   - Receiving gossip message\n//   - Receiving direct message\n//   - Receiving relayed message (Not covered yet!)\nfunc TestNetwork(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t// Bootstrap node\n\tconfB := testConfig()\n\tfmt.Println(\"Starting Bootstrap node\")\n\tnetworkB := makeTestNetwork(t, confB, []lp2p.Option{\n\t\tlp2p.ForceReachabilityPublic(),\n\t})\n\tbootstrapAddresses := []string{\n\t\tfmt.Sprintf(\"/ip4/127.0.0.1/tcp/%v/p2p/%v\", confB.DefaultPort, networkB.SelfID().String()),\n\t\tfmt.Sprintf(\"/ip4/127.0.0.1/udp/%v/quic-v1/p2p/%v\", confB.DefaultPort, networkB.SelfID().String()),\n\t\tfmt.Sprintf(\"/ip6/::1/tcp/%v/p2p/%v\", confB.DefaultPort, networkB.SelfID().String()),\n\t\tfmt.Sprintf(\"/ip6/::1/udp/%v/quic-v1/p2p/%v\", confB.DefaultPort, networkB.SelfID().String()),\n\t}\n\n\t// Public and relay node\n\tconfP := testConfig()\n\tconfP.BootstrapAddrStrings = bootstrapAddresses\n\tconfP.EnableRelay = false\n\tconfP.EnableRelayService = true\n\tfmt.Println(\"Starting Public node\")\n\tnetworkP := makeTestNetwork(t, confP, []lp2p.Option{\n\t\tlp2p.ForceReachabilityPublic(),\n\t})\n\tpublicAddrInfo, _ := lp2ppeer.AddrInfoFromString(\n\t\tfmt.Sprintf(\"/ip4/127.0.0.1/tcp/%v/p2p/%s\", confP.DefaultPort, networkP.SelfID()))\n\n\t// Private node M\n\tconfM := testConfig()\n\tconfM.EnableRelay = true\n\tconfM.BootstrapAddrStrings = bootstrapAddresses\n\tfmt.Println(\"Starting Private node M\")\n\tnetworkM := makeTestNetwork(t, confM, []lp2p.Option{\n\t\tlp2p.ForceReachabilityPrivate(),\n\t})\n\n\t// Private node N\n\tconfN := testConfig()\n\tconfN.EnableRelay = true\n\tconfN.BootstrapAddrStrings = bootstrapAddresses\n\tfmt.Println(\"Starting Private node N\")\n\tnetworkN := makeTestNetwork(t, confN, []lp2p.Option{\n\t\tlp2p.ForceReachabilityPrivate(),\n\t})\n\n\t// Private node X, doesn't join consensus topic and disabled relay\n\tconfX := testConfig()\n\tconfX.EnableRelay = false\n\tconfX.BootstrapAddrStrings = bootstrapAddresses\n\tfmt.Println(\"Starting Private node X\")\n\tnetworkX := makeTestNetwork(t, confX, []lp2p.Option{\n\t\tlp2p.ForceReachabilityPrivate(),\n\t})\n\n\trequire.NoError(t, networkB.JoinTopic(TopicIDBlock, alwaysPropagate))\n\trequire.NoError(t, networkP.JoinTopic(TopicIDBlock, alwaysPropagate))\n\trequire.NoError(t, networkM.JoinTopic(TopicIDBlock, alwaysPropagate))\n\trequire.NoError(t, networkN.JoinTopic(TopicIDBlock, alwaysPropagate))\n\trequire.NoError(t, networkX.JoinTopic(TopicIDBlock, alwaysPropagate))\n\n\trequire.NoError(t, networkB.JoinTopic(TopicIDConsensus, alwaysPropagate))\n\trequire.NoError(t, networkP.JoinTopic(TopicIDConsensus, alwaysPropagate))\n\trequire.NoError(t, networkM.JoinTopic(TopicIDConsensus, alwaysPropagate))\n\trequire.NoError(t, networkN.JoinTopic(TopicIDConsensus, alwaysPropagate))\n\t// Network X doesn't join the consensus topic\n\n\ttime.Sleep(4 * time.Second)\n\n\tt.Run(\"Supported Protocols\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\tprotos := networkM.Protocols()\n\t\t\tassert.Contains(c, protos, lp2pproto.ProtoIDv2Stop)\n\t\t\tassert.NotContains(c, protos, lp2pproto.ProtoIDv2Hop)\n\t\t}, 2*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\tprotos := networkN.Protocols()\n\t\t\tassert.Contains(c, protos, lp2pproto.ProtoIDv2Stop)\n\t\t\tassert.NotContains(c, protos, lp2pproto.ProtoIDv2Hop)\n\t\t}, 2*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\tprotos := networkP.Protocols()\n\t\t\tassert.NotContains(c, protos, lp2pproto.ProtoIDv2Stop)\n\t\t\tassert.Contains(c, protos, lp2pproto.ProtoIDv2Hop)\n\t\t}, 2*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\tprotos := networkX.Protocols()\n\t\t\tassert.NotContains(c, protos, lp2pproto.ProtoIDv2Stop)\n\t\t\tassert.NotContains(c, protos, lp2pproto.ProtoIDv2Hop)\n\t\t}, 2*time.Second, 100*time.Millisecond)\n\t})\n\n\tt.Run(\"Reachability\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\treachability := networkB.ReachabilityStatus()\n\t\t\trequire.Equal(c, \"Public\", reachability)\n\t\t}, time.Second*2, 500*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\treachability := networkM.ReachabilityStatus()\n\t\t\trequire.Equal(c, \"Private\", reachability)\n\t\t}, time.Second*2, 500*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\treachability := networkN.ReachabilityStatus()\n\t\t\trequire.Equal(c, \"Private\", reachability)\n\t\t}, time.Second*2, 500*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\treachability := networkP.ReachabilityStatus()\n\t\t\trequire.Equal(c, \"Public\", reachability)\n\t\t}, time.Second*2, 500*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\treachability := networkP.ReachabilityStatus()\n\t\t\trequire.Equal(c, \"Public\", reachability)\n\t\t}, time.Second*2, 100*time.Millisecond)\n\t})\n\n\tt.Run(\"all nodes have at least one connection to the bootstrap node B\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\trequire.GreaterOrEqual(c, networkP.NumConnectedPeers(), 1) // Connected to B, M, N, X\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\trequire.GreaterOrEqual(c, networkB.NumConnectedPeers(), 1) // Connected to P, M, N, X\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\trequire.GreaterOrEqual(c, networkM.NumConnectedPeers(), 1) // Connected to B, P, N?\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\trequire.GreaterOrEqual(c, networkN.NumConnectedPeers(), 1) // Connected to B, P, M?\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\trequire.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\t\trequire.GreaterOrEqual(c, networkX.NumConnectedPeers(), 1) // Connected to B, P\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\t})\n\n\tt.Run(\"Gossip: all nodes receive gossip messages\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsg := ts.RandBytes(64)\n\n\t\tnetworkP.Broadcast(msg, TopicIDBlock)\n\n\t\teB := shouldReceiveEvent(t, networkB, EventTypeGossip).(*GossipMessage)\n\t\teM := shouldReceiveEvent(t, networkM, EventTypeGossip).(*GossipMessage)\n\t\teN := shouldReceiveEvent(t, networkN, EventTypeGossip).(*GossipMessage)\n\t\teX := shouldReceiveEvent(t, networkX, EventTypeGossip).(*GossipMessage)\n\n\t\tassert.Equal(t, msg, eB.Data)\n\t\tassert.Equal(t, msg, eM.Data)\n\t\tassert.Equal(t, msg, eN.Data)\n\t\tassert.Equal(t, msg, eX.Data)\n\t})\n\n\tt.Run(\"only nodes subscribed to the consensus topic receive consensus gossip messages\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsg := ts.RandBytes(64)\n\n\t\tnetworkP.Broadcast(msg, TopicIDConsensus)\n\n\t\teB := shouldReceiveEvent(t, networkB, EventTypeGossip).(*GossipMessage)\n\t\teM := shouldReceiveEvent(t, networkM, EventTypeGossip).(*GossipMessage)\n\t\teN := shouldReceiveEvent(t, networkN, EventTypeGossip).(*GossipMessage)\n\t\tshouldNotReceiveEvent(t, networkX) // Not joined the consensus topic\n\n\t\tassert.Equal(t, msg, eB.Data)\n\t\tassert.Equal(t, msg, eM.Data)\n\t\tassert.Equal(t, msg, eN.Data)\n\t})\n\n\tt.Run(\"node P (public) is directly accessible by nodes M and N (private behind NAT)\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.NoError(t, networkM.host.Connect(networkM.ctx, *publicAddrInfo))\n\n\t\tmsgM := ts.RandBytes(64)\n\t\tnetworkM.SendTo(msgM, networkP.SelfID())\n\t\teP := shouldReceiveEvent(t, networkP, EventTypeStream).(*StreamMessage)\n\t\tassert.Equal(t, networkM.SelfID(), eP.From)\n\t\tassert.Equal(t, msgM, readData(t, eP.Reader, len(msgM)))\n\t})\n\n\tt.Run(\"node P (public) is directly accessible by node X (private behind NAT, without relay)\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.NoError(t, networkX.host.Connect(networkX.ctx, *publicAddrInfo))\n\n\t\tmsgX := ts.RandBytes(64)\n\t\tnetworkX.SendTo(msgX, networkP.SelfID())\n\t\teP := shouldReceiveEvent(t, networkP, EventTypeStream).(*StreamMessage)\n\t\tassert.Equal(t, networkX.SelfID(), eP.From)\n\t\tassert.Equal(t, msgX, readData(t, eP.Reader, len(msgX)))\n\t})\n\n\tt.Run(\"node P (public) is directly accessible by node B (bootstrap)\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsgB := ts.RandBytes(64)\n\n\t\tnetworkB.SendTo(msgB, networkP.SelfID())\n\t\teB := shouldReceiveEvent(t, networkP, EventTypeStream).(*StreamMessage)\n\t\tassert.Equal(t, networkB.SelfID(), eB.From)\n\t\tassert.Equal(t, msgB, readData(t, eB.Reader, len(msgB)))\n\t})\n\n\tt.Run(\"Ignore broadcasting identical messages\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsg := ts.RandBytes(64)\n\n\t\tnetworkM.Broadcast(msg, TopicIDBlock)\n\t\tnetworkN.Broadcast(msg, TopicIDBlock)\n\n\t\teX := shouldReceiveEvent(t, networkX, EventTypeGossip).(*GossipMessage)\n\n\t\tassert.Equal(t, msg, eX.Data)\n\t\tassert.NotEqual(t, eX.From, networkM.SelfID(), \"network X has no direct connection with M\")\n\t\tassert.NotEqual(t, eX.From, networkN.SelfID(), \"network X has no direct connection with N\")\n\n\t\tshouldNotReceiveEvent(t, networkX)\n\t})\n\n\tt.Run(\"node X (private, not connected via relay) is not accessible by node M\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsgM := ts.RandBytes(64)\n\t\tnetworkM.SendTo(msgM, networkX.SelfID())\n\t})\n\n\t// TODO: How to test this?\n\t// t.Run(\"nodes M and N (private, connected via relay) can communicate using the relay node R\", func(t *testing.T) {\n\t// \tmsgM := ts.RandBytes(64)\n\t// \tnetworkM.SendTo(msgM, networkN.SelfID())\n\t// \teM := shouldReceiveEvent(t, networkN, EventTypeStream).(*StreamMessage)\n\t// \tassert.Equal(t, msgM, readData(t, eM.Reader, len(msgM)))\n\t// })\n\n\tt.Run(\"closing connection\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\tmsgB := ts.RandBytes(64)\n\n\t\tnetworkP.Stop()\n\t\tnetworkB.CloseConnection(networkP.SelfID())\n\t\te := shouldReceiveEvent(t, networkB, EventTypeDisconnect).(*DisconnectEvent)\n\t\tassert.Equal(t, networkP.SelfID(), e.PeerID)\n\t\tnetworkB.SendTo(msgB, networkP.SelfID())\n\t})\n\n\tt.Run(\"Reachability Status\", func(t *testing.T) {\n\t\tfmt.Printf(\"Running %s\\n\", t.Name())\n\n\t\trequire.Equal(t, \"Public\", networkP.ReachabilityStatus())\n\t\trequire.Equal(t, \"Public\", networkB.ReachabilityStatus())\n\t\trequire.Equal(t, \"Private\", networkM.ReachabilityStatus())\n\t\trequire.Equal(t, \"Private\", networkN.ReachabilityStatus())\n\t\trequire.Equal(t, \"Private\", networkX.ReachabilityStatus())\n\t})\n}\n\nfunc TestHostAddrs(t *testing.T) {\n\tconf := testConfig()\n\tnet := makeTestNetwork(t, conf, nil)\n\n\taddrs := net.HostAddrs()\n\tassert.Contains(t, addrs, fmt.Sprintf(\"/ip4/127.0.0.1/tcp/%d\", conf.DefaultPort))\n\tassert.Contains(t, addrs, fmt.Sprintf(\"/ip4/127.0.0.1/udp/%d/quic-v1\", conf.DefaultPort))\n}\n\nfunc TestNetworkName(t *testing.T) {\n\tconf := testConfig()\n\tnet := makeTestNetwork(t, conf, nil)\n\n\tassert.Equal(t, conf.NetworkName, net.Name())\n}\n\nfunc TestConnections(t *testing.T) {\n\tt.Parallel() // run the tests in parallel\n\n\ttests := []struct {\n\t\tbootstrapAddr string\n\t\tpeerAddr      string\n\t}{\n\t\t{\"/ip4/127.0.0.1/tcp/%d\", \"/ip4/127.0.0.1/tcp/0\"},\n\t\t{\"/ip6/::1/tcp/%d\", \"/ip6/::1/tcp/0\"},\n\t\t{\"/ip4/127.0.0.1/udp/%d/quic-v1\", \"/ip4/127.0.0.1/udp/0/quic-v1\"},\n\t\t{\"/ip6/::1/udp/%d/quic-v1\", \"/ip6/::1/udp/0/quic-v1\"},\n\t}\n\n\tfor no, tt := range tests {\n\t\t// Bootstrap node\n\t\tconfB := testConfig()\n\t\tbootstrapAddr := fmt.Sprintf(tt.bootstrapAddr, confB.DefaultPort)\n\t\tconfB.ListenAddrStrings = []string{bootstrapAddr}\n\t\tfmt.Println(\"Starting Bootstrap node\")\n\t\tnetworkB := makeTestNetwork(t, confB, []lp2p.Option{\n\t\t\tlp2p.ForceReachabilityPublic(),\n\t\t})\n\n\t\t// Public node\n\t\tconfP := testConfig()\n\t\tconfP.BootstrapAddrStrings = []string{\n\t\t\tfmt.Sprintf(\"%s/p2p/%v\", bootstrapAddr, networkB.SelfID().String()),\n\t\t}\n\t\tconfP.ListenAddrStrings = []string{tt.peerAddr}\n\t\tfmt.Println(\"Starting Public node\")\n\t\tnetworkP := makeTestNetwork(t, confP, []lp2p.Option{\n\t\t\tlp2p.ForceReachabilityPublic(),\n\t\t})\n\n\t\tt.Run(fmt.Sprintf(\"Running test %d: %s <-> %s ... \",\n\t\t\tno, bootstrapAddr, tt.peerAddr), func(t *testing.T) {\n\t\t\tt.Parallel() // run the tests in parallel\n\n\t\t\tcheckConnection(t, networkP, networkB)\n\t\t})\n\t}\n}\n\nfunc checkConnection(t *testing.T, networkP, networkB *network) {\n\tt.Helper()\n\n\tassert.EventuallyWithT(t, func(c *assert.CollectT) {\n\t\tassert.GreaterOrEqual(c, networkP.NumConnectedPeers(), 1)\n\t\tassert.GreaterOrEqual(c, networkB.NumConnectedPeers(), 1)\n\t}, 5*time.Second, 100*time.Millisecond)\n\n\tmsg := []byte(\"test-msg\")\n\tnetworkP.SendTo(msg, networkB.SelfID())\n\te := shouldReceiveEvent(t, networkB, EventTypeStream).(*StreamMessage)\n\tassert.Equal(t, networkP.SelfID(), e.From)\n\tassert.Equal(t, msg, readData(t, e.Reader, len(msg)))\n\n\tnetworkB.Stop()\n\tnetworkP.Stop()\n}\n\nfunc TestLoadOrCreateKey(t *testing.T) {\n\tt.Run(\"Should load same network key after being created\", func(t *testing.T) {\n\t\tkeyPath := util.TempFilePath()\n\n\t\t// Create new valid key\n\t\tvalidKey, err := loadOrCreateKey(keyPath)\n\t\trequire.NoError(t, err)\n\n\t\t// Retrieve previously created valid key, the file path exists\n\t\tpreviousValidKey, err := loadOrCreateKey(keyPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, validKey.GetPublic(), previousValidKey.GetPublic())\n\t})\n\n\tt.Run(\"Should return error when file contains invalid data\", func(t *testing.T) {\n\t\ttempFilePath := util.TempFilePath()\n\n\t\terr := util.WriteFile(tempFilePath, []byte(\"invalid_data\"))\n\t\trequire.NoError(t, err)\n\n\t\tkey, err := loadOrCreateKey(tempFilePath)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, key)\n\t})\n\n\tt.Run(\"Should return error when file contains invalid private key\", func(t *testing.T) {\n\t\ttempFilePath := util.TempFilePath()\n\n\t\terr := util.WriteFile(tempFilePath, []byte(\"00\"))\n\t\trequire.NoError(t, err)\n\n\t\tkey, err := loadOrCreateKey(tempFilePath)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, key)\n\t})\n\n\tt.Run(\"Should return error when input path is directory\", func(t *testing.T) {\n\t\ttempDir := t.TempDir()\n\t\tkey, err := loadOrCreateKey(tempDir)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, key)\n\t})\n\n\tt.Run(\"Should return error when input path is invalid\", func(t *testing.T) {\n\t\tinvalidPath := string([]byte{0x00})\n\t\tkey, err := loadOrCreateKey(invalidPath)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, key)\n\t})\n\n\tt.Run(\"Should trim spaces\", func(t *testing.T) {\n\t\ttempFilePath := util.TempFilePath()\n\n\t\terr := util.WriteFile(tempFilePath,\n\t\t\t[]byte(\" 080112406da99c6b29ac8093fad3a92327aaf87acf22dbb60927786db25880f025c0\"+\n\t\t\t\t\"4cb6f80873898709981d9b75795a191eab2d29bc7983ebcb4826e2b44566c85ea194 \\r\\n\"))\n\t\trequire.NoError(t, err)\n\n\t\tkey, err := loadOrCreateKey(tempFilePath)\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, key)\n\t})\n}\n"
  },
  {
    "path": "network/notifee.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2pevent \"github.com/libp2p/go-libp2p/core/event\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2peventbus \"github.com/libp2p/go-libp2p/p2p/host/eventbus\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"golang.org/x/exp/slices\"\n)\n\ntype NotifeeService struct {\n\tctx              context.Context\n\thost             lp2phost.Host\n\tlp2pEventSub     lp2pevent.Subscription\n\tnetworkPipe      pipeline.Pipeline[Event]\n\tlogger           *logger.SubLogger\n\tstreamProtocolID lp2pcore.ProtocolID\n\tpeerMgr          *peerMgr\n\treachability     lp2pnetwork.Reachability\n}\n\nfunc newNotifeeService(ctx context.Context, host lp2phost.Host, networkPipe pipeline.Pipeline[Event],\n\tpeerMgr *peerMgr,\n\tprotocolID lp2pcore.ProtocolID, log *logger.SubLogger,\n) *NotifeeService {\n\tevents := []any{\n\t\tnew(lp2pevent.EvtLocalReachabilityChanged),\n\t\tnew(lp2pevent.EvtPeerIdentificationCompleted),\n\t\tnew(lp2pevent.EvtPeerIdentificationFailed),\n\t\tnew(lp2pevent.EvtPeerProtocolsUpdated),\n\t}\n\tsubOptions := []lp2pevent.SubscriptionOpt{\n\t\tlp2peventbus.BufSize(1024),\n\t}\n\teventSub, err := host.EventBus().Subscribe(events, subOptions...)\n\tif err != nil {\n\t\tlogger.Error(\"failed to register for libp2p events\")\n\t}\n\tnotifee := &NotifeeService{\n\t\tctx:              ctx,\n\t\thost:             host,\n\t\tlp2pEventSub:     eventSub,\n\t\tnetworkPipe:      networkPipe,\n\t\tstreamProtocolID: protocolID,\n\t\tpeerMgr:          peerMgr,\n\t\tlogger:           log,\n\t\treachability:     lp2pnetwork.ReachabilityUnknown,\n\t}\n\n\treturn notifee\n}\n\nfunc (s *NotifeeService) Start() {\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase evt := <-s.lp2pEventSub.Out():\n\t\t\t\tswitch evt := evt.(type) {\n\t\t\t\tcase lp2pevent.EvtLocalReachabilityChanged:\n\t\t\t\t\ts.logger.Info(\"reachability changed\", \"reachability\", evt.Reachability)\n\t\t\t\t\ts.reachability = evt.Reachability\n\n\t\t\t\tcase lp2pevent.EvtPeerIdentificationCompleted:\n\t\t\t\t\ts.logger.Debug(\"identification completed\", \"pid\", evt.Peer)\n\t\t\t\t\ts.sendProtocolsEvent(evt.Peer)\n\n\t\t\t\tcase lp2pevent.EvtPeerIdentificationFailed:\n\t\t\t\t\ts.logger.Warn(\"identification failed\", \"pid\", evt.Peer)\n\n\t\t\t\tcase lp2pevent.EvtPeerProtocolsUpdated:\n\t\t\t\t\ts.logger.Debug(\"protocols updated\", \"pid\", evt.Peer, \"protocols\", evt.Added)\n\t\t\t\t\ts.sendProtocolsEvent(evt.Peer)\n\n\t\t\t\tdefault:\n\t\t\t\t\t// unhandled libp2p event\n\t\t\t\t}\n\n\t\t\tcase <-s.ctx.Done():\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n}\n\nfunc (s *NotifeeService) Stop() {\n\t_ = s.lp2pEventSub.Close()\n}\n\nfunc (s *NotifeeService) Reachability() lp2pnetwork.Reachability {\n\treturn s.reachability\n}\n\nfunc (s *NotifeeService) Connected(_ lp2pnetwork.Network, conn lp2pnetwork.Conn) {\n\tpid := conn.RemotePeer()\n\ts.logger.Info(\"connected to peer\", \"pid\", pid, \"direction\", conn.Stat().Direction, \"addr\", conn.RemoteMultiaddr())\n\n\ts.peerMgr.SetPeerConnected(pid, conn.RemoteMultiaddr(), conn.Stat().Direction)\n\ts.sendConnectEvent(pid, conn.RemoteMultiaddr(), conn.Stat().Direction)\n}\n\nfunc (s *NotifeeService) Disconnected(_ lp2pnetwork.Network, conn lp2pnetwork.Conn) {\n\tpid := conn.RemotePeer()\n\ts.logger.Info(\"disconnected from peer\", \"pid\", pid)\n\n\ts.peerMgr.SetPeerDisconnected(pid)\n\ts.sendDisconnectEvent(pid)\n}\n\nfunc (s *NotifeeService) Listen(_ lp2pnetwork.Network, ma multiaddr.Multiaddr) {\n\t// Handle listen event if needed.\n\ts.logger.Debug(\"notifee Listen event emitted\", \"addr\", ma.String())\n}\n\n// ListenClose is called when the peer stops listening on an address.\nfunc (s *NotifeeService) ListenClose(_ lp2pnetwork.Network, ma multiaddr.Multiaddr) {\n\t// Handle listen close event if needed.\n\ts.logger.Debug(\"notifee ListenClose event emitted\", \"addr\", ma.String())\n}\n\nfunc (s *NotifeeService) sendProtocolsEvent(pid lp2pcore.PeerID) {\n\tprotocols, _ := s.host.Peerstore().GetProtocols(pid)\n\tprotocolsStr := make([]string, 0, len(protocols))\n\tfor _, p := range protocols {\n\t\tprotocolsStr = append(protocolsStr, string(p))\n\t}\n\n\tslices.Sort(protocolsStr)\n\tevent := &ProtocolsEvents{\n\t\tPeerID:    pid,\n\t\tProtocols: protocolsStr,\n\t}\n\ts.networkPipe.Send(event)\n}\n\nfunc (s *NotifeeService) sendConnectEvent(pid lp2pcore.PeerID,\n\tremoteAddress multiaddr.Multiaddr, direction lp2pnetwork.Direction,\n) {\n\tevent := &ConnectEvent{\n\t\tPeerID:        pid,\n\t\tRemoteAddress: remoteAddress.String(),\n\t\tDirection:     direction,\n\t}\n\ts.networkPipe.Send(event)\n}\n\nfunc (s *NotifeeService) sendDisconnectEvent(pid lp2pcore.PeerID) {\n\tevent := &DisconnectEvent{\n\t\tPeerID: pid,\n\t}\n\ts.networkPipe.Send(event)\n}\n"
  },
  {
    "path": "network/peermgr.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2pnet \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype peerInfo struct {\n\tMultiAddress multiaddr.Multiaddr\n\tConnected    bool\n\tDirection    lp2pnet.Direction\n}\n\n// Peer Manager attempts to establish connections with other nodes when the\n// number of connections falls below the minimum threshold.\ntype peerMgr struct {\n\tlk sync.RWMutex\n\n\tctx           context.Context\n\tlogger        *logger.SubLogger\n\tminConns      int\n\tnumInbound    int\n\tnumOutbound   int\n\thost          lp2phost.Host\n\tpeers         map[lp2ppeer.ID]*peerInfo\n\tpeerStorePath string\n\tcheckInterval time.Duration\n}\n\n// newPeerMgr creates a new Peer Manager instance.\nfunc newPeerMgr(ctx context.Context, host lp2phost.Host,\n\tconf *Config, log *logger.SubLogger,\n) *peerMgr {\n\tpeerStore, err := loadPeerStore(conf.PeerStorePath)\n\tif err != nil {\n\t\tlog.Debug(\"failed to load peer store\", \"err\", err)\n\t}\n\tlog.Info(\"peer store loaded successfully\")\n\n\tpeerStore = append(peerStore, conf.BootstrapAddrInfos()...)\n\n\tpeers := make(map[lp2ppeer.ID]*peerInfo)\n\tfor _, ai := range peerStore {\n\t\tpeers[ai.ID] = &peerInfo{\n\t\t\tMultiAddress: ai.Addrs[0],\n\t\t\tConnected:    false,\n\t\t\tDirection:    lp2pnet.DirUnknown,\n\t\t}\n\t}\n\n\tmgr := &peerMgr{\n\t\tctx:           ctx,\n\t\tminConns:      conf.MinConns(),\n\t\tpeers:         peers,\n\t\tpeerStorePath: conf.PeerStorePath,\n\t\thost:          host,\n\t\tlogger:        log,\n\t\tcheckInterval: conf.CheckConnectivityInterval,\n\t}\n\n\tlog.Info(\"peer manager created\", \"minConns\", mgr.minConns)\n\n\treturn mgr\n}\n\n// Start starts the Peer  Manager.\nfunc (mgr *peerMgr) Start() {\n\tmgr.CheckConnectivity()\n\n\tscheduler.Every(mgr.checkInterval).Do(mgr.ctx, func(context.Context) { mgr.CheckConnectivity() })\n}\n\nfunc (mgr *peerMgr) Stop() {\n\tif err := mgr.savePeerStore(); err != nil {\n\t\tmgr.logger.Error(\"can't save peer store\", \"err\", err)\n\t}\n}\n\nfunc (mgr *peerMgr) SetPeerConnected(pid lp2ppeer.ID, ma multiaddr.Multiaddr,\n\tdirection lp2pnet.Direction,\n) {\n\tmgr.lk.Lock()\n\tdefer mgr.lk.Unlock()\n\n\tmgr.setPeerConnected(pid, ma, direction)\n}\n\nfunc (mgr *peerMgr) setPeerConnected(pid lp2ppeer.ID, ma multiaddr.Multiaddr,\n\tdirection lp2pnet.Direction,\n) {\n\tpi, exists := mgr.peers[pid]\n\tif exists && pi.Connected {\n\t\treturn\n\t}\n\n\tswitch direction {\n\tcase lp2pnet.DirInbound:\n\t\tmgr.numInbound++\n\n\tcase lp2pnet.DirOutbound:\n\t\tmgr.numOutbound++\n\n\tcase lp2pnet.DirUnknown:\n\t\t//\n\t}\n\n\tmgr.peers[pid] = &peerInfo{\n\t\tConnected:    true,\n\t\tMultiAddress: ma,\n\t\tDirection:    direction,\n\t}\n}\n\nfunc (mgr *peerMgr) SetPeerDisconnected(pid lp2ppeer.ID) {\n\tmgr.lk.Lock()\n\tdefer mgr.lk.Unlock()\n\n\tmgr.setPeerDisconnected(pid)\n}\n\nfunc (mgr *peerMgr) setPeerDisconnected(pid lp2ppeer.ID) {\n\tpeerInfo, exists := mgr.peers[pid]\n\tif !exists {\n\t\treturn\n\t}\n\n\tif !peerInfo.Connected {\n\t\treturn\n\t}\n\n\tswitch peerInfo.Direction {\n\tcase lp2pnet.DirInbound:\n\t\tmgr.numInbound--\n\n\tcase lp2pnet.DirOutbound:\n\t\tmgr.numOutbound--\n\n\tcase lp2pnet.DirUnknown:\n\t\t//\n\t}\n\n\tpeerInfo.Connected = false\n\tpeerInfo.Direction = lp2pnet.DirUnknown\n}\n\n// CheckConnectivity performs the actual work of maintaining connections.\n// It ensures that the number of connections stays within the minimum and maximum thresholds.\nfunc (mgr *peerMgr) CheckConnectivity() {\n\tmgr.lk.Lock()\n\tdefer mgr.lk.Unlock()\n\n\tnet := mgr.host.Network()\n\n\t// Check if some peers are disconnected\n\tnumConnected := 0\n\tfor pid := range mgr.peers {\n\t\tconnectedness := net.Connectedness(pid)\n\t\tif connectedness == lp2pnet.Connected {\n\t\t\tnumConnected++\n\t\t}\n\t}\n\n\tmgr.logger.Debug(\"check connectivity\",\n\t\t\"numConnected\", numConnected,\n\t\t\"inbound\", mgr.numInbound,\n\t\t\"outbound\", mgr.numOutbound)\n\n\tif numConnected < mgr.minConns {\n\t\tmgr.logger.Info(\"peer count is less than minimum threshold\",\n\t\t\t\"numConnected\", numConnected,\n\t\t\t\"min\", mgr.minConns)\n\n\t\tfor pid, info := range mgr.peers {\n\t\t\t// preventing self dialing.\n\t\t\tif pid == mgr.host.ID() {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmgr.logger.Debug(\"try connecting to a bootstrap peer\", \"peer\", pid.String())\n\n\t\t\t// Don't try to connect to an already connected peer.\n\t\t\tif info.Connected {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tai := lp2ppeer.AddrInfo{\n\t\t\t\tID:    pid,\n\t\t\t\tAddrs: []multiaddr.Multiaddr{info.MultiAddress},\n\t\t\t}\n\t\t\tConnectAsync(mgr.ctx, mgr.host, ai, mgr.logger)\n\t\t}\n\t}\n}\n\nfunc (mgr *peerMgr) NumInbound() int {\n\tmgr.lk.RLock()\n\tdefer mgr.lk.RUnlock()\n\n\treturn mgr.numInbound\n}\n\nfunc (mgr *peerMgr) NumOutbound() int {\n\tmgr.lk.RLock()\n\tdefer mgr.lk.RUnlock()\n\n\treturn mgr.numOutbound\n}\n\nfunc (mgr *peerMgr) savePeerStore() error {\n\tmgr.lk.RLock()\n\tdefer mgr.lk.RUnlock()\n\n\tps := make([]string, 0, len(mgr.peers))\n\tfor id, info := range mgr.peers {\n\t\tps = append(ps, fmt.Sprintf(\"%s/p2p/%s\", info.MultiAddress.String(), id.String()))\n\t}\n\n\tdata, err := json.Marshal(ps)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn util.WriteFile(mgr.peerStorePath, data)\n}\n\nfunc loadPeerStore(path string) ([]lp2ppeer.AddrInfo, error) {\n\tpeerStore := make([]lp2ppeer.AddrInfo, 0)\n\n\tdata, err := util.ReadFile(path)\n\tif err != nil {\n\t\treturn peerStore, err\n\t}\n\n\taddrs := make([]string, 0)\n\terr = json.Unmarshal(data, &addrs)\n\tif err != nil {\n\t\treturn peerStore, err\n\t}\n\n\tpeerStore, err = MakeAddrInfos(addrs)\n\tif err != nil {\n\t\treturn []lp2ppeer.AddrInfo{}, err\n\t}\n\n\treturn peerStore, nil\n}\n"
  },
  {
    "path": "network/peermgr_test.go",
    "content": "package network\n\nimport (\n\t\"testing\"\n\n\tlp2pnet \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestNumInboundOutbound(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tconf := testConfig()\n\tnet := makeTestNetwork(t, conf, nil)\n\n\taddr, _ := IPToMultiAddr(\"1.2.3.4\", 1234)\n\n\tpid1 := ts.RandPeerID()\n\tpid2 := ts.RandPeerID()\n\tpid3 := ts.RandPeerID()\n\n\tnet.peerMgr.SetPeerConnected(pid1, addr, lp2pnet.DirInbound)\n\tnet.peerMgr.SetPeerConnected(pid1, addr, lp2pnet.DirInbound) // Duplicated event\n\tnet.peerMgr.SetPeerConnected(pid2, addr, lp2pnet.DirOutbound)\n\tnet.peerMgr.SetPeerConnected(pid3, addr, lp2pnet.DirOutbound)\n\tnet.peerMgr.SetPeerDisconnected(pid1)\n\tnet.peerMgr.SetPeerDisconnected(pid1) // Duplicated event\n\tnet.peerMgr.SetPeerDisconnected(pid2)\n\tnet.peerMgr.SetPeerDisconnected(ts.RandPeerID())\n\tnet.peerMgr.SetPeerConnected(pid1, addr, lp2pnet.DirInbound) // Connect again\n\n\tassert.Equal(t, 1, net.NumInbound())\n\tassert.Equal(t, 1, net.NumOutbound())\n}\n"
  },
  {
    "path": "network/stream.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2peer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype streamService struct {\n\tctx            context.Context\n\thost           lp2phost.Host\n\tprotocolID     lp2pcore.ProtocolID\n\ttimeout        time.Duration\n\tnetworkPipe    pipeline.Pipeline[Event]\n\tmaxMessageSize int64\n\tlogger         *logger.SubLogger\n}\n\nfunc newStreamService(ctx context.Context, host lp2phost.Host, conf *Config,\n\tprotocolID lp2pcore.ProtocolID, networkPipe pipeline.Pipeline[Event], log *logger.SubLogger,\n) *streamService {\n\tservice := &streamService{\n\t\tctx:            ctx,\n\t\thost:           host,\n\t\tprotocolID:     protocolID,\n\t\ttimeout:        conf.StreamTimeout,\n\t\tnetworkPipe:    networkPipe,\n\t\tmaxMessageSize: int64(conf.MaxStreamMessageSize),\n\t\tlogger:         log,\n\t}\n\n\tservice.host.SetStreamHandler(protocolID, service.handleStream)\n\n\treturn service\n}\n\nfunc (*streamService) Start() {}\n\nfunc (*streamService) Stop() {}\n\nfunc (s *streamService) handleStream(stream lp2pnetwork.Stream) {\n\t// Set a deadline for both reading and writing to ensure\n\t// this stream will eventually be closed.\n\t// In very rare cases, the read or write channel may get stuck.\n\t_ = stream.SetDeadline(time.Now().Add(s.timeout))\n\n\tfrom := stream.Conn().RemotePeer()\n\n\ts.logger.Debug(\"receiving stream\", \"from\", from)\n\tlimitReader := util.LimitReaderClose(stream, s.maxMessageSize)\n\tevent := &StreamMessage{\n\t\tFrom:   from,\n\t\tReader: limitReader,\n\t}\n\n\ts.networkPipe.Send(event)\n}\n\n// SendTo sends a message to a specific peer, assuming there is already a direct connection.\n//\n// For simplicity, we do not use bi-directional streams.\n// Each time a peer wants to send a message, it creates a new stream.\n//\n// For more details on stream multiplexing, refer to: https://docs.libp2p.io/concepts/multiplex/overview/\nfunc (s *streamService) SendTo(msg []byte, pid lp2peer.ID) (lp2pnetwork.Stream, error) {\n\ts.logger.Trace(\"sending stream\", \"to\", pid)\n\t_, err := s.host.Peerstore().SupportsProtocols(pid, s.protocolID)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\t// To prevent a broken stream from being open forever.\n\tctxWithTimeout, cancel := context.WithTimeout(s.ctx, s.timeout)\n\tdefer cancel()\n\n\t// Attempt to open a new stream to the peer, assuming there's already a direct connection.\n\tstream, err := s.host.NewStream(\n\t\tlp2pnetwork.WithNoDial(ctxWithTimeout, \"should already have connection\"), pid, s.protocolID)\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\t_ = stream.SetDeadline(time.Now().Add(s.timeout))\n\n\t_, err = stream.Write(msg)\n\tif err != nil {\n\t\t_ = stream.Reset()\n\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\terr = stream.CloseWrite()\n\tif err != nil {\n\t\treturn nil, LibP2PError{Err: err}\n\t}\n\n\t// We need to close the stream once it is read by the receiver.\n\t// If, for any reason, the receiver doesn't close the stream, we need to close it after a timeout.\n\tgo func() {\n\t\ttimer := time.NewTimer(s.timeout)\n\t\tclosed := make(chan bool)\n\n\t\tgo func() {\n\t\t\t// We need only one byte to read the EOF.\n\t\t\tbuf := make([]byte, 1)\n\t\t\t_, _ = stream.Read(buf)\n\t\t\tclosed <- true\n\t\t}()\n\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\ts.logger.Warn(\"stream timeout\", \"to\", pid)\n\t\t\t_ = stream.Close()\n\n\t\tcase <-closed:\n\t\t\ts.logger.Debug(\"stream closed\", \"to\", pid)\n\t\t\t_ = stream.Close()\n\t\t}\n\t}()\n\n\treturn stream, nil\n}\n"
  },
  {
    "path": "network/stream_test.go",
    "content": "package network\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCloseStream(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tmakeNetworks := func(streamTimeout time.Duration) (networkA, networkB *network) {\n\t\tconfA := testConfig()\n\t\tconfA.StreamTimeout = streamTimeout\n\t\tconfA.CheckConnectivityInterval = 60 * time.Second\n\t\tnetworkA = makeTestNetwork(t, confA, nil)\n\n\t\tconfB := testConfig()\n\t\tconfB.StreamTimeout = streamTimeout\n\t\tconfB.CheckConnectivityInterval = 60 * time.Second\n\t\t_ = util.WriteFile(confB.PeerStorePath,\n\t\t\t[]byte(fmt.Sprintf(\"[\\\"/ip4/127.0.0.1/tcp/%v/p2p/%v\\\"]\",\n\t\t\t\tconfA.DefaultPort, networkA.SelfID().String())))\n\t\tnetworkB = makeTestNetwork(t, confB, nil)\n\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\te := <-networkA.networkPipe.UnsafeGetChannel()\n\t\t\tassert.Equal(collect, EventTypeConnect, e.Type())\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\te := <-networkB.networkPipe.UnsafeGetChannel()\n\t\t\tassert.Equal(collect, EventTypeConnect, e.Type())\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\treturn networkA, networkB\n\t}\n\n\t// streamClosed check if a stream is fully closed for both ends\n\tstreamClosed := func(networkA, networkB *network, streamID string) bool {\n\t\tconnsAtoB := networkA.host.Network().ConnsToPeer(networkB.SelfID())\n\t\tstreamsAtoB := connsAtoB[0].GetStreams()\n\n\t\thasStream := false\n\t\tfor _, s := range streamsAtoB {\n\t\t\tif s.ID() == streamID {\n\t\t\t\thasStream = true\n\t\t\t}\n\t\t}\n\n\t\tconnsBtoA := networkB.host.Network().ConnsToPeer(networkA.SelfID())\n\t\tstreamsBtoA := connsBtoA[0].GetStreams()\n\t\tfor _, s := range streamsBtoA {\n\t\t\tif s.ID() == streamID {\n\t\t\t\thasStream = true\n\t\t\t}\n\t\t}\n\n\t\treturn !hasStream\n\t}\n\n\tt.Run(\"Normal Case\", func(t *testing.T) {\n\t\tnetworkA, networkB := makeNetworks(10 * time.Second)\n\t\tsentMsg := ts.RandBytes(32)\n\t\tstream, err := networkA.stream.SendTo(sentMsg, networkB.SelfID())\n\t\trequire.NoError(t, err)\n\n\t\t// NetworkB close the stream after reading the data\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\te := <-networkB.networkPipe.UnsafeGetChannel()\n\t\t\tstreamMsg, ok := e.(*StreamMessage)\n\t\t\tassert.True(collect, ok)\n\t\t\tif ok {\n\t\t\t\treceivedMsg := make([]byte, len(sentMsg))\n\t\t\t\t_, _ = streamMsg.Reader.Read(receivedMsg)\n\t\t\t\tassert.Equal(collect, sentMsg, receivedMsg)\n\n\t\t\t\t_ = streamMsg.Reader.Close()\n\t\t\t}\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\t// NetworkA should receive EOF and close/remove the stream\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\tassert.True(collect, streamClosed(networkA, networkB, stream.ID()))\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\t})\n\n\tt.Run(\"Receiver (NetworkB) doesn't close the stream\", func(t *testing.T) {\n\t\tnetworkA, networkB := makeNetworks(1 * time.Second)\n\t\tsentMsg := ts.RandBytes(32)\n\t\tstream, err := networkA.stream.SendTo(sentMsg, networkB.SelfID())\n\t\trequire.NoError(t, err)\n\n\t\t// NetworkB close the stream after reading the data.\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\te := <-networkB.networkPipe.UnsafeGetChannel()\n\t\t\ts, ok := e.(*StreamMessage)\n\t\t\tassert.True(collect, ok)\n\t\t\tif ok {\n\t\t\t\treceivedMsg := make([]byte, len(sentMsg))\n\t\t\t\t_, _ = s.Reader.Read(receivedMsg)\n\t\t\t\tassert.Equal(collect, sentMsg, receivedMsg)\n\n\t\t\t\t// NetworkB doesn't close the stream.\n\t\t\t\t// s.Reader.Close()\n\t\t\t}\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\t// NetworkA should close/remove the stream after timeout.\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\tassert.True(collect, streamClosed(networkA, networkB, stream.ID()))\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\t})\n\n\tt.Run(\"Receiver (NetworkB) close the stream without reading\", func(t *testing.T) {\n\t\tnetworkA, networkB := makeNetworks(1 * time.Second)\n\t\tsentMsg := ts.RandBytes(32)\n\t\tstream, err := networkA.stream.SendTo(sentMsg, networkB.SelfID())\n\t\trequire.NoError(t, err)\n\n\t\t// NetworkB close the stream after reading the data\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\te := <-networkB.networkPipe.UnsafeGetChannel()\n\t\t\ts, ok := e.(*StreamMessage)\n\t\t\tassert.True(collect, ok)\n\t\t\tif ok {\n\t\t\t\t_ = s.Reader.Close()\n\t\t\t}\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\t// NetworkA should close/remove the stream as well.\n\t\tassert.EventuallyWithT(t, func(collect *assert.CollectT) {\n\t\t\tassert.True(collect, streamClosed(networkA, networkB, stream.ID()))\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\t})\n}\n"
  },
  {
    "path": "network/utils.go",
    "content": "package network\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"slices\"\n\t\"time\"\n\n\tlp2pspb \"github.com/libp2p/go-libp2p-pubsub/pb\"\n\tlp2phost \"github.com/libp2p/go-libp2p/core/host\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\tlp2pswarm \"github.com/libp2p/go-libp2p/p2p/net/swarm\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\n// MakeMultiAddrs converts a slice of string peer addresses to MultiAddress.\nfunc MakeMultiAddrs(addrs []string) ([]multiaddr.Multiaddr, error) {\n\tmas := make([]multiaddr.Multiaddr, 0, len(addrs))\n\tfor _, addr := range addrs {\n\t\tma, err := multiaddr.NewMultiaddr(addr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmas = append(mas, ma)\n\t}\n\n\treturn mas, nil\n}\n\n// MakeAddrInfos converts a slice of string peer addresses to AddrInfo.\nfunc MakeAddrInfos(addrs []string) ([]lp2ppeer.AddrInfo, error) {\n\tpis := make([]lp2ppeer.AddrInfo, 0, len(addrs))\n\tfor _, addr := range addrs {\n\t\tpinfo, err := lp2ppeer.AddrInfoFromString(addr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpis = append(pis, *pinfo)\n\t}\n\n\treturn pis, nil\n}\n\nfunc IPToMultiAddr(ip string, port int) (multiaddr.Multiaddr, error) {\n\tipParsed := net.ParseIP(ip)\n\tif ipParsed == nil {\n\t\treturn nil, fmt.Errorf(\"invalid IP address: %s\", ip)\n\t}\n\n\tvar addr string\n\tif ipParsed.To4() != nil {\n\t\taddr = fmt.Sprintf(\"/ip4/%s/tcp/%d\", ip, port)\n\t} else {\n\t\taddr = fmt.Sprintf(\"/ip6/%s/tcp/%d\", ip, port)\n\t}\n\tma, err := multiaddr.NewMultiaddr(addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ma, nil\n}\n\n// HasPID checks if a peer ID exists in a list of peer IDs.\nfunc HasPID(pids []lp2ppeer.ID, pid lp2ppeer.ID) bool {\n\treturn slices.Contains(pids, pid)\n}\n\nfunc ConnectAsync(ctx context.Context, h lp2phost.Host, addrInfo lp2ppeer.AddrInfo, log *logger.SubLogger) {\n\tgo func() {\n\t\terr := ConnectSync(ctx, h, addrInfo)\n\t\tif log != nil {\n\t\t\tif err != nil {\n\t\t\t\tlog.Info(\"connection failed\", \"addr\", addrInfo.Addrs, \"err\", err)\n\t\t\t} else {\n\t\t\t\tlog.Debug(\"connection successful\", \"addr\", addrInfo.Addrs)\n\t\t\t}\n\t\t}\n\t}()\n}\n\nfunc ConnectSync(ctx context.Context, h lp2phost.Host, addrInfo lp2ppeer.AddrInfo) error {\n\tif swarm, ok := h.Network().(*lp2pswarm.Swarm); ok {\n\t\tswarm.Backoff().Clear(addrInfo.ID)\n\t}\n\n\treturn h.Connect(lp2pnetwork.WithDialPeerTimeout(ctx, 10*time.Second), addrInfo)\n}\n\nfunc PrivateSubnets() []*net.IPNet {\n\tprivateCIDRs := []string{\n\t\t// -- Ipv4 --\n\t\t// localhost\n\t\t\"127.0.0.0/8\",\n\t\t// private networks\n\t\t\"10.0.0.0/8\",\n\t\t\"100.64.0.0/10\",\n\t\t\"172.16.0.0/12\",\n\t\t\"192.168.0.0/16\",\n\t\t// link local\n\t\t\"169.254.0.0/16\",\n\n\t\t// -- Ipv6 --\n\t\t// localhost\n\t\t\"::1/128\",\n\t\t// ULA reserved\n\t\t\"fc00::/7\",\n\t\t// link local\n\t\t\"fe80::/10\",\n\t}\n\n\tsubnets := make([]*net.IPNet, 0, len(privateCIDRs))\n\tfor _, cidr := range privateCIDRs {\n\t\t_, sn, err := net.ParseCIDR(cidr)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tsubnets = append(subnets, sn)\n\t}\n\n\treturn subnets\n}\n\nfunc SubnetsToFilters(subnets []*net.IPNet, action multiaddr.Action) *multiaddr.Filters {\n\tfilters := multiaddr.NewFilters()\n\tfor _, sn := range subnets {\n\t\tfilters.AddFilter(*sn, action)\n\t}\n\n\treturn filters\n}\n\nfunc MessageIDFunc(m *lp2pspb.Message) string {\n\th := hash.CalcHash(m.Data)\n\n\treturn string(h[:20])\n}\n"
  },
  {
    "path": "network/utils_test.go",
    "content": "package network\n\nimport (\n\t\"testing\"\n\n\tlp2pspb \"github.com/libp2p/go-libp2p-pubsub/pb\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMakeMultiAddrs(t *testing.T) {\n\ttests := []struct {\n\t\tname       string\n\t\tinputAddrs []string\n\t\texpected   []multiaddr.Multiaddr\n\t}{\n\t\t{\n\t\t\tinputAddrs: []string{\n\t\t\t\t\"/ip4/127.0.0.1/tcp/1234\",\n\t\t\t\t\"/ip6/::1/tcp/5678/\",\n\t\t\t\t\"/dns4/example.com\",\n\t\t\t},\n\t\t\texpected: []multiaddr.Multiaddr{\n\t\t\t\tmultiaddr.Cast([]byte{0x04, 0x7f, 0x00, 0x00, 0x01, 0x06, 0x04, 0xd2}),\n\t\t\t\tmultiaddr.Cast([]byte{\n\t\t\t\t\t0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t\t\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x16, 0x2e,\n\t\t\t\t}),\n\t\t\t\tmultiaddr.Cast([]byte{0x36, 0x0b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d}),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tinputAddrs: []string{\n\t\t\t\t\"invalid_address\",\n\t\t\t},\n\t\t\texpected: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tactualPis, actualError := MakeMultiAddrs(tt.inputAddrs)\n\n\t\t\tif tt.expected != nil {\n\t\t\t\tassert.Equal(t, tt.expected, actualPis)\n\t\t\t\trequire.NoError(t, actualError)\n\t\t\t} else {\n\t\t\t\trequire.Error(t, actualError)\n\t\t\t\tassert.Nil(t, actualPis)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMakeAddrInfos(t *testing.T) {\n\tpid, _ := lp2ppeer.Decode(\"12D3KooWCwQZt8UriVXobQHPXPR8m83eceXVoeT6brPNiBHomebc\")\n\ttests := []struct {\n\t\tname        string\n\t\tinputAddrs  []string\n\t\texpectedPis []lp2ppeer.AddrInfo\n\t}{\n\t\t{\n\t\t\tinputAddrs: []string{\n\t\t\t\t\"/ip4/127.0.0.1/tcp/1234/p2p/12D3KooWCwQZt8UriVXobQHPXPR8m83eceXVoeT6brPNiBHomebc\",\n\t\t\t\t\"/ip6/::1/tcp/5678/p2p/12D3KooWCwQZt8UriVXobQHPXPR8m83eceXVoeT6brPNiBHomebc\",\n\t\t\t\t\"/dns4/example.com/tcp/4001/p2p/12D3KooWCwQZt8UriVXobQHPXPR8m83eceXVoeT6brPNiBHomebc\",\n\t\t\t},\n\t\t\texpectedPis: []lp2ppeer.AddrInfo{\n\t\t\t\t{\n\t\t\t\t\tID: pid,\n\t\t\t\t\tAddrs: []multiaddr.Multiaddr{\n\t\t\t\t\t\tmultiaddr.StringCast(\"/ip4/127.0.0.1/tcp/1234\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tID: pid,\n\t\t\t\t\tAddrs: []multiaddr.Multiaddr{\n\t\t\t\t\t\tmultiaddr.StringCast(\"/ip6/::1/tcp/5678\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tID: pid,\n\t\t\t\t\tAddrs: []multiaddr.Multiaddr{\n\t\t\t\t\t\tmultiaddr.StringCast(\"/dns4/example.com/tcp/4001\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tinputAddrs: []string{\n\t\t\t\t\"/ip4/127.0.0.1/tcp/1234\", // No peer id\n\t\t\t},\n\t\t\texpectedPis: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tactualPis, actualError := MakeAddrInfos(tt.inputAddrs)\n\n\t\t\tif tt.expectedPis != nil {\n\t\t\t\tassert.Equal(t, tt.expectedPis, actualPis)\n\t\t\t\trequire.NoError(t, actualError)\n\t\t\t} else {\n\t\t\t\trequire.Error(t, actualError)\n\t\t\t\tassert.Nil(t, actualPis)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestIPToMultiAddr(t *testing.T) {\n\ttests := []struct {\n\t\tip       string\n\t\tport     int\n\t\texpected string\n\t}{\n\t\t{\"127.0.0.1\", 8080, \"/ip4/127.0.0.1/tcp/8080\"},\n\t\t{\"192.168.1.1\", 1234, \"/ip4/192.168.1.1/tcp/1234\"},\n\t\t{\"::1\", 80, \"/ip6/::1/tcp/80\"},\n\t\t{\"invalid_ip\", 80, \"\"},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.expected, func(t *testing.T) {\n\t\t\tma, err := IPToMultiAddr(tt.ip, tt.port)\n\t\t\tif tt.expected != \"\" {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, tt.expected, ma.String())\n\t\t\t} else {\n\t\t\t\trequire.Error(t, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestHasPID(t *testing.T) {\n\tpids := []lp2ppeer.ID{\"peer1\", \"peer2\", \"peer3\"}\n\n\tassert.True(t, HasPID(pids, lp2ppeer.ID(\"peer1\")))\n\tassert.False(t, HasPID(pids, lp2ppeer.ID(\"peer4\")))\n}\n\nfunc TestSubnetsToFilters(t *testing.T) {\n\tsns := PrivateSubnets()\n\tfilter := SubnetsToFilters(sns, multiaddr.ActionDeny)\n\n\tma1, _ := multiaddr.NewMultiaddr(\"/ip4/0.0.0.0\")\n\tma2, _ := multiaddr.NewMultiaddr(\"/ip4/127.0.0.1\")\n\tma3, _ := multiaddr.NewMultiaddr(\"/ip4/8.8.8.8\")\n\n\tassert.False(t, filter.AddrBlocked(ma1))\n\tassert.True(t, filter.AddrBlocked(ma2))\n\tassert.False(t, filter.AddrBlocked(ma3))\n}\n\nfunc TestMessageIdFunc(t *testing.T) {\n\tm := &lp2pspb.Message{Data: []byte(\"pactus\")}\n\tid := MessageIDFunc(m)\n\n\tassert.Equal(t, id, string([]byte{\n\t\t0xea, 0x02, 0x0a, 0xce, 0x5c, 0x96, 0x8f, 0x75,\n\t\t0x5d, 0xfc, 0x1b, 0x59, 0x21, 0xe5, 0x74, 0x19, 0x1c, 0xd9, 0xff, 0x43,\n\t}))\n}\n"
  },
  {
    "path": "node/node.go",
    "content": "package node\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/config\"\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/sync\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/version\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\t\"github.com/pactus-project/pactus/wallet/provider/local\"\n\t\"github.com/pactus-project/pactus/www/grpc\"\n\t\"github.com/pactus-project/pactus/www/html\"\n\t\"github.com/pactus-project/pactus/www/http\"\n\t\"github.com/pactus-project/pactus/www/jsonrpc\"\n\t\"github.com/pactus-project/pactus/www/zmq\"\n\t\"github.com/pkg/errors\"\n)\n\ntype Node struct {\n\tctx           context.Context\n\tgenesisDoc    *genesis.Genesis\n\tconfig        *config.Config\n\tstate         state.Facade\n\tstore         store.Store\n\ttxPool        txpool.TxPool\n\tconsV1Mgr     consmgr.Manager // Deprecated:: replaced by new consensus algorithm\n\tconsV2Mgr     consmgr.Manager\n\tnetwork       network.Network\n\tsync          sync.Synchronizer\n\twalletMgr     wltmgr.IManager\n\tgrpc          *grpc.Server\n\thtml          *html.Server\n\thttp          *http.Server\n\tjsonrpc       *jsonrpc.Server\n\tzeromq        *zmq.Server\n\tbroadcastPipe pipeline.Pipeline[message.Message]\n\tnetworkPipe   pipeline.Pipeline[network.Event]\n\teventPipe     pipeline.Pipeline[any]\n}\n\nfunc NewNode(ctx context.Context, genDoc *genesis.Genesis, conf *config.Config,\n\tvalKeys []*bls.ValidatorKey, rewardAddrs []crypto.Address,\n) (*Node, error) {\n\t// Initialize the logger\n\tlogger.InitGlobalLogger(ctx, conf.Logger)\n\n\tchainType := genDoc.ChainType()\n\n\tbroadcastPipe := pipeline.New[message.Message](ctx,\n\t\tpipeline.WithName(\"Broadcast Pipeline\"), pipeline.WithBufferSize(512))\n\tnetworkPipe := pipeline.New[network.Event](ctx,\n\t\tpipeline.WithName(\"Network Pipeline\"), pipeline.WithBufferSize(1024))\n\teventPipe := pipeline.New[any](ctx,\n\t\tpipeline.WithName(\"Event Pipeline\"), pipeline.WithBufferSize(512))\n\n\tstore, err := store.NewStore(conf.Store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlogger.Info(\"You are running a Pactus blockchain\",\n\t\t\"version\", version.NodeVersion().StringWithAlias(),\n\t\t\"network\", chainType, \"pruned\", store.IsPruned())\n\n\ttxPool := txpool.NewTxPool(conf.TxPool, store, broadcastPipe, eventPipe)\n\n\tstate, err := state.LoadOrNewState(genDoc, valKeys, store, txPool, eventPipe)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnet, err := network.NewNetwork(ctx, conf.Network, networkPipe)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconsV1Mgr := consmgr.NewManagerV1(ctx, conf.Consensus, state, valKeys, rewardAddrs, broadcastPipe)\n\tconsV2Mgr := consmgr.NewManagerV2(ctx, conf.ConsensusV2, state, valKeys, rewardAddrs, broadcastPipe)\n\n\tif !store.IsPruned() {\n\t\tconf.Sync.Services.Append(service.FullNode)\n\t}\n\tsync, err := sync.NewSynchronizer(ctx, conf.Sync, valKeys, state,\n\t\tconsV1Mgr, consV2Mgr, net, broadcastPipe, networkPipe)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tenableHTTPAuth := (conf.GRPC.BasicAuth != \"\")\n\n\tzeromqServer, err := zmq.New(ctx, conf.ZeroMq, eventPipe)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcurConsMgr := consV1Mgr\n\tif consV1Mgr.IsDeprecated() {\n\t\tcurConsMgr = consV2Mgr\n\t}\n\n\twalletProvider := local.NewLocalBlockchainProvider(state)\n\twalletMgr, err := wltmgr.NewManager(ctx, conf.WalletManager, walletProvider, eventPipe)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tgrpcServer := grpc.NewServer(ctx, conf.GRPC, state, sync, net, curConsMgr, walletMgr, zeromqServer.Publishers())\n\thtmlServer := html.NewServer(ctx, conf.HTML, enableHTTPAuth)\n\thttpServer := http.NewServer(ctx, conf.HTTP)\n\tjsonrpcServer := jsonrpc.NewServer(ctx, conf.JSONRPC)\n\n\tnode := &Node{\n\t\tctx:           ctx,\n\t\tconfig:        conf,\n\t\tgenesisDoc:    genDoc,\n\t\tnetwork:       net,\n\t\tstate:         state,\n\t\ttxPool:        txPool,\n\t\tconsV1Mgr:     consV1Mgr,\n\t\tconsV2Mgr:     consV2Mgr,\n\t\tsync:          sync,\n\t\tstore:         store,\n\t\twalletMgr:     walletMgr,\n\t\tgrpc:          grpcServer,\n\t\thtml:          htmlServer,\n\t\thttp:          httpServer,\n\t\tjsonrpc:       jsonrpcServer,\n\t\tzeromq:        zeromqServer,\n\t\tbroadcastPipe: broadcastPipe,\n\t\tnetworkPipe:   networkPipe,\n\t\teventPipe:     eventPipe,\n\t}\n\n\treturn node, nil\n}\n\nfunc (n *Node) Start() error {\n\tnow := time.Now()\n\tgenTime := n.genesisDoc.GenesisTime()\n\tif genTime.After(now) {\n\t\tlogger.Info(\"💤 Genesis time is in the future. Sleeping until then...\",\n\t\t\t\"duration\", genTime.Sub(now), \"genesis_hash\", n.genesisDoc.Hash())\n\t\ttime.Sleep(genTime.Sub(now) - 1*time.Second)\n\t}\n\n\tif err := n.network.Start(); err != nil {\n\t\treturn errors.Wrap(err, \"could not start Network\")\n\t}\n\t// Wait for network to start\n\ttime.Sleep(1 * time.Second)\n\n\tif err := n.sync.Start(); err != nil {\n\t\treturn errors.Wrap(err, \"could not start Sync\")\n\t}\n\n\tcurConsMgr := n.consV1Mgr\n\tif n.consV1Mgr.IsDeprecated() {\n\t\tcurConsMgr = n.consV2Mgr\n\t}\n\tcurConsMgr.MoveToNewHeight()\n\n\terr := n.walletMgr.Start()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"could not start Wallet Manager\")\n\t}\n\n\terr = n.grpc.StartServer()\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"could not start gRPC server\")\n\t}\n\n\terr = n.html.StartServer(n.grpc.Address())\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"could not start HTML server\")\n\t}\n\n\terr = n.http.StartServer(n.grpc.Address())\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"could not start HTTP-API server\")\n\t}\n\n\terr = n.jsonrpc.StartServer(n.grpc.Address())\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"could not start JSON-RPC server\")\n\t}\n\n\treturn nil\n}\n\nfunc (n *Node) Stop() {\n\tlogger.Info(\"stopping Node\")\n\n\tn.broadcastPipe.Close()\n\tn.networkPipe.Close()\n\tn.eventPipe.Close()\n\n\t// Wait for one second\n\ttime.Sleep(1 * time.Second)\n\n\tn.network.Stop()\n\n\t// Wait for network to stop\n\ttime.Sleep(1 * time.Second)\n\n\tn.sync.Stop()\n\tn.state.Close()\n\tn.store.Close()\n\tn.walletMgr.Stop()\n\tn.grpc.StopServer()\n\tn.html.StopServer()\n\tn.http.StopServer()\n\tn.jsonrpc.StopServer()\n\tn.zeromq.Close()\n}\n\n// these methods are using by GUI.\n\nfunc (n *Node) ConsManager() consmgr.ManagerReader {\n\treturn n.consV1Mgr\n}\n\nfunc (n *Node) Sync() sync.Synchronizer {\n\treturn n.sync\n}\n\nfunc (n *Node) State() state.Facade {\n\treturn n.state\n}\n\nfunc (n *Node) GRPC() *grpc.Server {\n\treturn n.grpc\n}\n\nfunc (n *Node) Network() network.Network {\n\treturn n.network\n}\n\nfunc (n *Node) WalletManager() wltmgr.IManager {\n\treturn n.walletMgr\n}\n"
  },
  {
    "path": "node/node_test.go",
    "content": "package node\n\nimport (\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestRunningNode(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\t// Prevent log from messing the workspace\n\tlogger.LogFilename = util.TempFilePath()\n\tpub, _ := ts.RandBLSKeyPair()\n\tacc := account.NewAccount(0)\n\tacc.AddToBalance(21 * 1e14)\n\tval := validator.NewValidator(pub, 0)\n\tgen := genesis.MakeGenesis(time.Now(),\n\t\tmap[crypto.Address]*account.Account{crypto.TreasuryAddress: acc},\n\t\t[]*validator.Validator{val}, genesis.DefaultGenesisParams())\n\tconf := config.DefaultConfigMainnet()\n\tconf.GRPC.Enable = true\n\tconf.GRPC.Listen = \"0.0.0.0:0\"\n\tconf.HTML.Enable = true\n\tconf.HTML.Listen = \"0.0.0.0:0\"\n\tconf.HTTP.Enable = true\n\tconf.HTTP.Listen = \"0.0.0.0:0\"\n\tconf.JSONRPC.Enable = true\n\tconf.JSONRPC.Listen = \"0.0.0.0:0\"\n\tconf.Store.Path = util.TempDirPath()\n\tconf.Network.EnableRelay = false\n\tconf.Network.NetworkKey = util.TempFilePath()\n\tconf.Network.PeerStorePath = util.TempFilePath()\n\tconf.WalletManager.WalletsDir = util.TempDirPath()\n\n\twalletPath := filepath.Join(conf.WalletManager.WalletsDir, \"default_wallet\")\n\tmnemonic, _ := wallet.GenerateMnemonic(128)\n\twlt, err := wallet.Create(t.Context(), walletPath, mnemonic, \"\", genesis.Mainnet)\n\trequire.NoError(t, err)\n\twlt.Close()\n\n\tvalKeys := []*bls.ValidatorKey{ts.RandValKey(), ts.RandValKey()}\n\trewardAddrs := []crypto.Address{ts.RandAccAddress(), ts.RandAccAddress()}\n\tnode, err := NewNode(t.Context(), gen, conf, valKeys, rewardAddrs)\n\trequire.NoError(t, err)\n\n\tassert.True(t, conf.Sync.Services.IsFullNode())\n\tassert.True(t, conf.Sync.Services.IsPrunedNode())\n\tassert.Equal(t, hash.UndefHash, node.state.LastBlockHash())\n\n\terr = node.Start()\n\trequire.NoError(t, err)\n\n\tconsHeight, _ := node.ConsManager().HeightRound()\n\tassert.Equal(t, types.Height(1), consHeight)\n\n\tlastBlockTime := node.State().LastBlockTime()\n\tassert.Equal(t, gen.GenesisTime(), lastBlockTime)\n\n\tsyncSelfID := node.Sync().SelfID()\n\tnetSelfID := node.Network().SelfID()\n\tassert.Equal(t, syncSelfID, netSelfID)\n\n\tassert.NotEmpty(t, node.GRPC().Address())\n\n\twallets, err := node.WalletManager().ListWallets()\n\trequire.NoError(t, err)\n\tassert.NotEmpty(t, wallets)\n\n\tnode.Stop()\n}\n"
  },
  {
    "path": "sandbox/interface.go",
    "content": "package sandbox\n\nimport (\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype Sandbox interface {\n\tAccount(crypto.Address) *account.Account\n\tMakeNewAccount(crypto.Address) *account.Account\n\tUpdateAccount(crypto.Address, *account.Account)\n\n\tCommitTransaction(trx *tx.Tx)\n\tRecentTransaction(txID tx.ID) bool\n\tIsBanned(crypto.Address) bool\n\n\tValidator(crypto.Address) *validator.Validator\n\tMakeNewValidator(*bls.PublicKey) *validator.Validator\n\tUpdateValidator(*validator.Validator)\n\tJoinedToCommittee(crypto.Address)\n\tIsJoinedCommittee(crypto.Address) bool\n\tUpdatePowerDelta(delta int64)\n\tPowerDelta() int64\n\tAccumulatedFee() amount.Amount\n\n\tVerifyProof(types.Height, sortition.Proof, *validator.Validator) bool\n\tCommittee() committee.Reader\n\n\tParams() *param.Params\n\tCurrentHeight() types.Height\n\tIsMainnet() bool\n\n\tIterateAccounts(consumer func(crypto.Address, *account.Account, bool))\n\tIterateValidators(consumer func(*validator.Validator, bool, bool))\n}\n"
  },
  {
    "path": "sandbox/mock.go",
    "content": "package sandbox\n\nimport (\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nvar _ Sandbox = &MockSandbox{}\n\n// MockSandbox is a mock implementation of the Sandbox interface for testing.\ntype MockSandbox struct {\n\tts *testsuite.TestSuite\n\n\tTestParams           *param.Params\n\tTestStore            *store.MockStore\n\tTestCommittee        committee.Committee\n\tTestAcceptSortition  bool\n\tTestJoinedValidators map[crypto.Address]bool\n\tTestCommittedTrxs    map[tx.ID]*tx.Tx\n\tTestPowerDelta       int64\n}\n\nfunc MockingSandbox(ts *testsuite.TestSuite) *MockSandbox {\n\tcmt, _ := ts.GenerateTestCommittee(7)\n\n\tparams := param.FromGenesis(genesis.MainnetGenesis())\n\tparams.BlockVersion = protocol.ProtocolVersion3\n\n\tsbx := &MockSandbox{\n\t\tts:                   ts,\n\t\tTestParams:           params,\n\t\tTestStore:            store.MockingStore(ts),\n\t\tTestCommittee:        cmt,\n\t\tTestJoinedValidators: make(map[crypto.Address]bool),\n\t\tTestCommittedTrxs:    make(map[tx.ID]*tx.Tx),\n\t}\n\n\ttreasuryAmt := amount.Amount(21_000_000 * 1e9)\n\n\tfor i, val := range cmt.Validators() {\n\t\tacc := account.NewAccount(int32(i + 1))\n\t\tacc.AddToBalance(10000 * 1e9)\n\t\tsbx.UpdateAccount(val.Address(), acc)\n\t\tsbx.UpdateValidator(val)\n\n\t\ttreasuryAmt -= val.Stake()\n\t\ttreasuryAmt -= acc.Balance()\n\t}\n\tacc0 := account.NewAccount(0)\n\tacc0.AddToBalance(treasuryAmt)\n\tsbx.UpdateAccount(crypto.TreasuryAddress, acc0)\n\n\treturn sbx\n}\n\nfunc (m *MockSandbox) Account(addr crypto.Address) *account.Account {\n\tacc, _ := m.TestStore.Account(addr)\n\n\treturn acc\n}\n\nfunc (m *MockSandbox) MakeNewAccount(_ crypto.Address) *account.Account {\n\tacc := account.NewAccount(m.TestStore.TotalAccounts())\n\n\treturn acc\n}\n\nfunc (m *MockSandbox) UpdateAccount(addr crypto.Address, acc *account.Account) {\n\tm.TestStore.UpdateAccount(addr, acc)\n}\n\nfunc (m *MockSandbox) RecentTransaction(txID tx.ID) bool {\n\tif m.TestCommittedTrxs[txID] != nil {\n\t\treturn true\n\t}\n\n\treturn m.TestStore.RecentTransaction(txID)\n}\n\nfunc (m *MockSandbox) Validator(addr crypto.Address) *validator.Validator {\n\tval, _ := m.TestStore.Validator(addr)\n\n\treturn val\n}\n\nfunc (m *MockSandbox) JoinedToCommittee(addr crypto.Address) {\n\tm.TestJoinedValidators[addr] = true\n}\n\nfunc (m *MockSandbox) IsJoinedCommittee(addr crypto.Address) bool {\n\treturn m.TestJoinedValidators[addr]\n}\n\nfunc (m *MockSandbox) MakeNewValidator(pub *bls.PublicKey) *validator.Validator {\n\tval := validator.NewValidator(pub, m.TestStore.TotalValidators())\n\n\treturn val\n}\n\nfunc (m *MockSandbox) UpdateValidator(val *validator.Validator) {\n\tm.TestStore.UpdateValidator(val)\n}\n\nfunc (m *MockSandbox) CurrentHeight() types.Height {\n\treturn m.TestStore.LastHeight + 1\n}\n\nfunc (*MockSandbox) IsMainnet() bool {\n\treturn true\n}\n\nfunc (m *MockSandbox) Params() *param.Params {\n\treturn m.TestParams\n}\n\nfunc (m *MockSandbox) IterateAccounts(consumer func(crypto.Address, *account.Account, bool)) {\n\tm.TestStore.IterateAccounts(func(addr crypto.Address, acc *account.Account) bool {\n\t\tconsumer(addr, acc, true)\n\n\t\treturn false\n\t})\n}\n\nfunc (m *MockSandbox) IterateValidators(consumer func(*validator.Validator, bool, bool)) {\n\tm.TestStore.IterateValidators(func(val *validator.Validator) bool {\n\t\tconsumer(val, true, m.TestJoinedValidators[val.Address()])\n\n\t\treturn false\n\t})\n}\n\nfunc (m *MockSandbox) Committee() committee.Reader {\n\treturn m.TestCommittee\n}\n\nfunc (m *MockSandbox) UpdatePowerDelta(delta int64) {\n\tm.TestPowerDelta += delta\n}\n\nfunc (m *MockSandbox) PowerDelta() int64 {\n\treturn m.TestPowerDelta\n}\n\nfunc (m *MockSandbox) VerifyProof(types.Height, sortition.Proof, *validator.Validator) bool {\n\treturn m.TestAcceptSortition\n}\n\nfunc (m *MockSandbox) CommitTransaction(trx *tx.Tx) {\n\tm.TestCommittedTrxs[trx.ID()] = trx\n}\n\nfunc (m *MockSandbox) AccumulatedFee() amount.Amount {\n\treturn m.ts.RandAmount()\n}\n\nfunc (*MockSandbox) IsBanned(crypto.Address) bool {\n\treturn false\n}\n"
  },
  {
    "path": "sandbox/sandbox.go",
    "content": "package sandbox\n\nimport (\n\t\"sync\"\n\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\nvar _ Sandbox = &sandbox{}\n\ntype sandbox struct {\n\tlk sync.RWMutex\n\n\tstore           store.Reader\n\tcommittee       committee.Reader\n\taccounts        map[crypto.Address]*sandboxAccount\n\tvalidators      map[crypto.Address]*sandboxValidator\n\tcommittedTrxs   map[tx.ID]*tx.Tx\n\tparams          *param.Params\n\tisMainnet       bool\n\theight          types.Height\n\ttotalAccounts   int32\n\ttotalValidators int32\n\ttotalPower      int64\n\tpowerDelta      int64\n\taccumulatedFee  amount.Amount\n}\n\ntype sandboxValidator struct {\n\tvalidator *validator.Validator\n\tupdated   bool\n\tjoined    bool // Is joined committee\n}\n\ntype sandboxAccount struct {\n\taccount *account.Account\n\tupdated bool\n}\n\nfunc NewSandbox(height types.Height, store store.Reader, params *param.Params,\n\tcommittee committee.Reader, totalPower int64, isMainnet bool,\n) Sandbox {\n\tsbx := &sandbox{\n\t\theight:     height,\n\t\tstore:      store,\n\t\tcommittee:  committee,\n\t\ttotalPower: totalPower,\n\t\tparams:     params,\n\t\tisMainnet:  isMainnet,\n\t}\n\n\tsbx.accounts = make(map[crypto.Address]*sandboxAccount)\n\tsbx.validators = make(map[crypto.Address]*sandboxValidator)\n\tsbx.committedTrxs = make(map[tx.ID]*tx.Tx)\n\tsbx.totalAccounts = sbx.store.TotalAccounts()\n\tsbx.totalValidators = sbx.store.TotalValidators()\n\n\treturn sbx\n}\n\nfunc (*sandbox) shouldPanicForDuplicatedAddress() {\n\t//\n\t// Why is it necessary to panic here?\n\t//\n\t// An attempt is made to create a new item that already exists in the store.\n\t//\n\tlogger.Panic(\"duplicated address\")\n}\n\nfunc (*sandbox) shouldPanicForUnknownAddress() {\n\t//\n\t// Why is it necessary to panic here?\n\t//\n\t// We only update accounts or validators that are already present within the sandbox.\n\t// This can be achieved either by creating a new account using MakeNewAccount or\n\t// retrieving it from the store using Account.\n\t//\n\tlogger.Panic(\"unknown address\")\n}\n\nfunc (sb *sandbox) Account(addr crypto.Address) *account.Account {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\ts, ok := sb.accounts[addr]\n\tif ok {\n\t\treturn s.account.Clone()\n\t}\n\n\tacc, err := sb.store.Account(addr)\n\tif err != nil {\n\t\treturn nil\n\t}\n\tsb.accounts[addr] = &sandboxAccount{\n\t\taccount: acc,\n\t}\n\n\treturn acc.Clone()\n}\n\nfunc (sb *sandbox) MakeNewAccount(addr crypto.Address) *account.Account {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\tif sb.store.HasAccount(addr) {\n\t\tsb.shouldPanicForDuplicatedAddress()\n\t}\n\n\tacc := account.NewAccount(sb.totalAccounts)\n\tsb.accounts[addr] = &sandboxAccount{\n\t\taccount: acc,\n\t\tupdated: true,\n\t}\n\tsb.totalAccounts++\n\n\treturn acc.Clone()\n}\n\n// This function takes ownership of the account pointer.\n// It is important that the caller should not modify the account data and\n// keep it immutable.\nfunc (sb *sandbox) UpdateAccount(addr crypto.Address, acc *account.Account) {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\ts, ok := sb.accounts[addr]\n\tif !ok {\n\t\tsb.shouldPanicForUnknownAddress()\n\t}\n\ts.account = acc\n\ts.updated = true\n}\n\nfunc (sb *sandbox) RecentTransaction(txID tx.ID) bool {\n\tif sb.committedTrxs[txID] != nil {\n\t\treturn true\n\t}\n\n\treturn sb.store.RecentTransaction(txID)\n}\n\nfunc (sb *sandbox) Validator(addr crypto.Address) *validator.Validator {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\ts, ok := sb.validators[addr]\n\tif ok {\n\t\treturn s.validator.Clone()\n\t}\n\n\tval, err := sb.store.Validator(addr)\n\tif err != nil {\n\t\treturn nil\n\t}\n\tsb.validators[addr] = &sandboxValidator{\n\t\tvalidator: val,\n\t}\n\n\treturn val.Clone()\n}\n\nfunc (sb *sandbox) JoinedToCommittee(addr crypto.Address) {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\ts, ok := sb.validators[addr]\n\tif !ok {\n\t\tsb.shouldPanicForUnknownAddress()\n\t}\n\n\ts.joined = true\n}\n\nfunc (sb *sandbox) IsJoinedCommittee(addr crypto.Address) bool {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\ts, ok := sb.validators[addr]\n\tif ok {\n\t\treturn s.joined\n\t}\n\n\treturn false\n}\n\nfunc (sb *sandbox) MakeNewValidator(pub *bls.PublicKey) *validator.Validator {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\taddr := pub.ValidatorAddress()\n\tif sb.store.HasValidator(addr) {\n\t\tsb.shouldPanicForDuplicatedAddress()\n\t}\n\n\tval := validator.NewValidator(pub, sb.totalValidators)\n\tsb.validators[addr] = &sandboxValidator{\n\t\tvalidator: val,\n\t\tupdated:   true,\n\t}\n\tsb.totalValidators++\n\n\treturn val.Clone()\n}\n\n// This function takes ownership of the validator pointer.\n// It is important that the caller should not modify the validator data and\n// keep it immutable.\nfunc (sb *sandbox) UpdateValidator(val *validator.Validator) {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\taddr := val.Address()\n\tsbVal, ok := sb.validators[addr]\n\tif !ok {\n\t\tsb.shouldPanicForUnknownAddress()\n\t}\n\n\tsbVal.validator = val\n\tsbVal.updated = true\n}\n\nfunc (sb *sandbox) Params() *param.Params {\n\treturn sb.params\n}\n\nfunc (sb *sandbox) CurrentHeight() types.Height {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\treturn sb.height + 1\n}\n\nfunc (sb *sandbox) IsMainnet() bool {\n\treturn sb.isMainnet\n}\n\nfunc (sb *sandbox) IterateAccounts(\n\tconsumer func(crypto.Address, *account.Account, bool),\n) {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\tfor addr, sa := range sb.accounts {\n\t\tconsumer(addr, sa.account, sa.updated)\n\t}\n}\n\nfunc (sb *sandbox) IterateValidators(\n\tconsumer func(*validator.Validator, bool, bool),\n) {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\tfor _, sv := range sb.validators {\n\t\tconsumer(sv.validator, sv.updated, sv.joined)\n\t}\n}\n\nfunc (sb *sandbox) Committee() committee.Reader {\n\treturn sb.committee\n}\n\n// UpdatePowerDelta updates the change in the total power of the blockchain.\n// The delta is the amount of change in the total power and can be either positive or negative.\nfunc (sb *sandbox) UpdatePowerDelta(delta int64) {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\tsb.powerDelta += delta\n}\n\nfunc (sb *sandbox) PowerDelta() int64 {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\treturn sb.powerDelta\n}\n\n// VerifyProof verifies proof of a sortition transaction.\nfunc (sb *sandbox) VerifyProof(blockHeight types.Height, proof sortition.Proof, val *validator.Validator) bool {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\tseed := sb.store.SortitionSeed(blockHeight)\n\tif seed == nil {\n\t\treturn false\n\t}\n\n\treturn sortition.VerifyProof(*seed, proof, val.PublicKey(), sb.totalPower, val.Power())\n}\n\nfunc (sb *sandbox) CommitTransaction(trx *tx.Tx) {\n\tsb.lk.Lock()\n\tdefer sb.lk.Unlock()\n\n\tsb.committedTrxs[trx.ID()] = trx\n\tsb.accumulatedFee += trx.Fee()\n}\n\nfunc (sb *sandbox) AccumulatedFee() amount.Amount {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\treturn sb.accumulatedFee\n}\n\nfunc (sb *sandbox) IsBanned(addr crypto.Address) bool {\n\tsb.lk.RLock()\n\tdefer sb.lk.RUnlock()\n\n\treturn sb.store.IsBanned(addr)\n}\n"
  },
  {
    "path": "sandbox/sandbox_test.go",
    "content": "package sandbox\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tvalKeys []*bls.ValidatorKey\n\tstore   *store.MockStore\n\tsbx     *sandbox\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\tmockStore := store.MockingStore(ts)\n\tgenDoc := genesis.MainnetGenesis()\n\n\tcmt, valKeys := ts.GenerateTestCommittee(21)\n\tacc := account.NewAccount(0)\n\tacc.AddToBalance(21 * 1e14)\n\tmockStore.UpdateAccount(crypto.TreasuryAddress, acc)\n\n\ttotalPower := int64(0)\n\tfor _, val := range cmt.Validators() {\n\t\t// For testing purpose, we create some test accounts first.\n\t\t// Account number is the validator number plus one,\n\t\t// since account #0 is the Treasury account.\n\t\tnewAcc := account.NewAccount(val.Number() + 1)\n\t\tmockStore.UpdateValidator(val)\n\t\tmockStore.UpdateAccount(val.Address(), newAcc)\n\n\t\ttotalPower += val.Power()\n\t}\n\n\tlastHeight := types.Height(21)\n\tfor height := types.Height(1); height < lastHeight; height++ {\n\t\tblk, cert := ts.GenerateTestBlock(height)\n\t\tmockStore.SaveBlock(blk, cert)\n\t}\n\tsbx := NewSandbox(mockStore.LastHeight,\n\t\tmockStore, param.FromGenesis(genDoc), cmt, totalPower, true).(*sandbox)\n\tassert.Equal(t, lastHeight, sbx.CurrentHeight())\n\tassert.Equal(t, param.FromGenesis(genDoc), sbx.Params())\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tvalKeys:   valKeys,\n\t\tstore:     mockStore,\n\t\tsbx:       sbx,\n\t}\n}\n\nfunc TestAccountChange(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Should returns nil for invalid address\", func(t *testing.T) {\n\t\tinvAddr := td.RandAccAddress()\n\t\tassert.Nil(t, td.sbx.Account(invAddr))\n\n\t\ttd.sbx.IterateAccounts(func(_ crypto.Address, _ *account.Account, _ bool) {\n\t\t\tpanic(\"should be empty\")\n\t\t})\n\t})\n\n\tt.Run(\"Retrieve an account from store and update it\", func(t *testing.T) {\n\t\tacc, addr := td.GenerateTestAccount()\n\t\tbal := acc.Balance()\n\t\ttd.store.UpdateAccount(addr, acc)\n\n\t\tsbAcc1 := td.sbx.Account(addr)\n\t\tassert.Equal(t, acc, sbAcc1)\n\n\t\tsbAcc1.AddToBalance(1)\n\n\t\tassert.False(t, td.sbx.accounts[addr].updated)\n\t\tassert.Equal(t, bal, td.sbx.Account(addr).Balance())\n\t\ttd.sbx.UpdateAccount(addr, sbAcc1)\n\t\tassert.True(t, td.sbx.accounts[addr].updated)\n\t\tassert.Equal(t, bal+1, td.sbx.Account(addr).Balance())\n\n\t\tt.Run(\"Update the same account again\", func(t *testing.T) {\n\t\t\tsbAcc2 := td.sbx.Account(addr)\n\t\t\tsbAcc2.AddToBalance(1)\n\n\t\t\tassert.True(t, td.sbx.accounts[addr].updated, \"it is updated before\")\n\t\t\tassert.Equal(t, bal+1, td.sbx.Account(addr).Balance())\n\t\t\ttd.sbx.UpdateAccount(addr, sbAcc2)\n\t\t\tassert.True(t, td.sbx.accounts[addr].updated)\n\t\t\tassert.Equal(t, bal+2, td.sbx.Account(addr).Balance())\n\t\t})\n\n\t\tt.Run(\"Should be iterated\", func(t *testing.T) {\n\t\t\ttd.sbx.IterateAccounts(func(a crypto.Address, acc *account.Account, updated bool) {\n\t\t\t\tassert.Equal(t, addr, a)\n\t\t\t\tassert.True(t, updated)\n\t\t\t\tassert.Equal(t, bal+2, acc.Balance())\n\t\t\t})\n\t\t})\n\t})\n\n\tt.Run(\"Make new account\", func(t *testing.T) {\n\t\taddr := td.RandAccAddress()\n\t\tacc := td.sbx.MakeNewAccount(addr)\n\n\t\tacc.AddToBalance(1)\n\n\t\ttd.sbx.UpdateAccount(addr, acc)\n\t\tsbAcc := td.sbx.Account(addr)\n\t\tassert.Equal(t, acc, sbAcc)\n\n\t\tt.Run(\"Should be iterated\", func(t *testing.T) {\n\t\t\ttd.sbx.IterateAccounts(func(a crypto.Address, acc *account.Account, updated bool) {\n\t\t\t\tif a == addr {\n\t\t\t\t\tassert.True(t, updated)\n\t\t\t\t\tassert.Equal(t, amount.Amount(1), acc.Balance())\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t})\n}\n\nfunc TestRecentTransaction(t *testing.T) {\n\ttd := setup(t)\n\n\trandTx1 := td.GenerateTestTransferTx()\n\trandTx2 := td.GenerateTestTransferTx()\n\ttd.sbx.CommitTransaction(randTx1)\n\ttd.sbx.CommitTransaction(randTx2)\n\n\tassert.True(t, td.sbx.RecentTransaction(randTx1.ID()))\n\tassert.True(t, td.sbx.RecentTransaction(randTx2.ID()))\n\n\ttotalTxFees := randTx1.Fee() + randTx2.Fee()\n\tassert.Equal(t, totalTxFees, td.sbx.AccumulatedFee())\n}\n\nfunc TestValidatorChange(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Should returns nil for invalid address\", func(t *testing.T) {\n\t\tinvAddr := td.RandAccAddress()\n\t\tassert.Nil(t, td.sbx.Validator(invAddr))\n\n\t\ttd.sbx.IterateValidators(func(_ *validator.Validator, _ bool, _ bool) {\n\t\t\tpanic(\"should be empty\")\n\t\t})\n\t})\n\n\tt.Run(\"Retrieve an validator from store and update it\", func(t *testing.T) {\n\t\tval := td.GenerateTestValidator()\n\t\taddr := val.Address()\n\t\tstk := val.Stake()\n\t\ttd.store.UpdateValidator(val)\n\n\t\tsbVal1 := td.sbx.Validator(addr)\n\t\tassert.Equal(t, val.Hash(), sbVal1.Hash())\n\n\t\tsbVal1.AddToStake(1)\n\n\t\tassert.False(t, td.sbx.validators[addr].updated)\n\t\tassert.Equal(t, stk, td.sbx.Validator(addr).Stake())\n\t\ttd.sbx.UpdateValidator(sbVal1)\n\t\tassert.True(t, td.sbx.validators[sbVal1.Address()].updated)\n\t\tassert.Equal(t, stk+1, td.sbx.Validator(addr).Stake())\n\n\t\tt.Run(\"Update the same validator again\", func(t *testing.T) {\n\t\t\tsbVal2 := td.sbx.Validator(addr)\n\t\t\tsbVal2.AddToStake(1)\n\n\t\t\tassert.True(t, td.sbx.validators[addr].updated, \"it is updated before\")\n\t\t\tassert.Equal(t, stk+1, td.sbx.Validator(addr).Stake())\n\t\t\ttd.sbx.UpdateValidator(sbVal2)\n\t\t\tassert.True(t, td.sbx.validators[sbVal1.Address()].updated)\n\t\t\tassert.Equal(t, stk+2, td.sbx.Validator(addr).Stake())\n\t\t})\n\n\t\tt.Run(\"Should be iterated\", func(t *testing.T) {\n\t\t\ttd.sbx.IterateValidators(func(val *validator.Validator, updated bool, joined bool) {\n\t\t\t\tassert.True(t, updated)\n\t\t\t\tassert.False(t, joined)\n\t\t\t\tassert.Equal(t, stk+2, val.Stake())\n\t\t\t})\n\t\t})\n\t})\n\n\tt.Run(\"Make new validator\", func(t *testing.T) {\n\t\tpub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(pub)\n\n\t\tval.AddToStake(1)\n\n\t\ttd.sbx.UpdateValidator(val)\n\t\tsbVal := td.sbx.Validator(val.Address())\n\t\tassert.Equal(t, val, sbVal)\n\n\t\tt.Run(\"Should be iterated\", func(t *testing.T) {\n\t\t\ttd.sbx.IterateValidators(func(val *validator.Validator, updated bool, joined bool) {\n\t\t\t\tif val.PublicKey() == pub {\n\t\t\t\t\tassert.True(t, updated)\n\t\t\t\t\tassert.False(t, joined)\n\t\t\t\t\tassert.Equal(t, amount.Amount(1), val.Stake())\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t})\n}\n\nfunc TestTotalAccountCounter(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Should update total account counter\", func(t *testing.T) {\n\t\ttotalAccs := td.store.TotalAccounts()\n\n\t\tacc1 := td.sbx.MakeNewAccount(td.RandAccAddress())\n\t\tassert.Equal(t, totalAccs, acc1.Number())\n\n\t\tacc2 := td.sbx.MakeNewAccount(td.RandAccAddress())\n\t\tassert.Equal(t, totalAccs+1, acc2.Number())\n\t})\n}\n\nfunc TestTotalValidatorCounter(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Should update total validator counter\", func(t *testing.T) {\n\t\ttotalVals := td.store.TotalValidators()\n\n\t\tpub, _ := td.RandBLSKeyPair()\n\t\tpub2, _ := td.RandBLSKeyPair()\n\t\tval1 := td.sbx.MakeNewValidator(pub)\n\t\tassert.Equal(t, totalVals, val1.Number())\n\n\t\tval2 := td.sbx.MakeNewValidator(pub2)\n\t\tassert.Equal(t, totalVals+1, val2.Number())\n\t})\n}\n\nfunc TestCreateDuplicated(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Try creating duplicated account, Should panic\", func(t *testing.T) {\n\t\tdefer func() {\n\t\t\tif r := recover(); r == nil {\n\t\t\t\tt.Error(\"The code did not panic\")\n\t\t\t}\n\t\t}()\n\t\taddr := crypto.TreasuryAddress\n\t\ttd.sbx.MakeNewAccount(addr)\n\t})\n\n\tt.Run(\"Try creating duplicated validator, Should panic\", func(t *testing.T) {\n\t\tassert.Panics(t, func() {\n\t\t\tpub := td.valKeys[3].PublicKey()\n\t\t\ttd.sbx.MakeNewValidator(pub)\n\t\t})\n\t})\n}\n\nfunc TestUpdateFromOutsideTheSandbox(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Try update an account from outside the sandbox, Should panic\", func(t *testing.T) {\n\t\tassert.Panics(t, func() {\n\t\t\tacc, addr := td.GenerateTestAccount()\n\t\t\ttd.sbx.UpdateAccount(addr, acc)\n\t\t})\n\t})\n\n\tt.Run(\"Try update a validator from outside the sandbox, Should panic\", func(t *testing.T) {\n\t\tassert.Panics(t, func() {\n\t\t\tval := td.GenerateTestValidator()\n\t\t\ttd.sbx.UpdateValidator(val)\n\t\t})\n\t})\n}\n\nfunc TestAccountDeepCopy(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"non existing account\", func(t *testing.T) {\n\t\taddr := td.RandAccAddress()\n\t\tacc := td.sbx.MakeNewAccount(addr)\n\t\tacc.AddToBalance(1)\n\n\t\tassert.NotEqual(t, acc, td.sbx.Account(addr))\n\t})\n\n\tt.Run(\"existing account\", func(t *testing.T) {\n\t\taddr := crypto.TreasuryAddress\n\t\tacc := td.sbx.Account(addr)\n\t\tacc.AddToBalance(1)\n\n\t\tassert.NotEqual(t, acc, td.sbx.Account(addr))\n\t})\n\n\tt.Run(\"sandbox account\", func(t *testing.T) {\n\t\taddr := crypto.TreasuryAddress\n\t\tacc := td.sbx.Account(addr)\n\t\tacc.AddToBalance(1)\n\n\t\tassert.NotEqual(t, acc, td.sbx.Account(addr))\n\t})\n}\n\nfunc TestValidatorDeepCopy(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"non existing validator\", func(t *testing.T) {\n\t\tpub, _ := td.RandBLSKeyPair()\n\t\tval := td.sbx.MakeNewValidator(pub)\n\t\tval.AddToStake(1)\n\n\t\tassert.NotEqual(t, val, td.sbx.Validator(pub.ValidatorAddress()))\n\t})\n\n\tval0, _ := td.store.ValidatorByNumber(0)\n\taddr := val0.Address()\n\tt.Run(\"existing validator\", func(t *testing.T) {\n\t\tval := td.sbx.Validator(addr)\n\t\tval.AddToStake(1)\n\n\t\tassert.NotEqual(t, val, td.sbx.Validator(addr))\n\t})\n\n\tt.Run(\"sandbox validator\", func(t *testing.T) {\n\t\tval := td.sbx.Validator(addr)\n\t\tval.AddToStake(1)\n\n\t\tassert.NotEqual(t, val, td.sbx.Validator(addr))\n\t})\n}\n\nfunc TestPowerDelta(t *testing.T) {\n\ttd := setup(t)\n\n\tassert.Zero(t, td.sbx.PowerDelta())\n\ttd.sbx.UpdatePowerDelta(1)\n\tassert.Equal(t, int64(1), td.sbx.PowerDelta())\n\ttd.sbx.UpdatePowerDelta(-1)\n\tassert.Zero(t, td.sbx.PowerDelta())\n}\n\nfunc TestVerifyProof(t *testing.T) {\n\ttd := setup(t)\n\n\tlastCert := td.store.LastCertificate()\n\tlastHeight := lastCert.Height()\n\tvals := td.sbx.committee.Validators()\n\n\t// Try to evaluate a valid sortition\n\tvar validProof sortition.Proof\n\tvar validLockTime types.Height\n\tvar validVal *validator.Validator\n\tfor height := lastHeight; height > 0; height-- {\n\t\tblock := td.store.Blocks[height]\n\t\tfor index, valKey := range td.valKeys {\n\t\t\tok, proof := sortition.EvaluateSortition(\n\t\t\t\tblock.Header().SortitionSeed(), valKey.PrivateKey(),\n\t\t\t\ttd.sbx.totalPower, vals[index].Power())\n\n\t\t\tif ok {\n\t\t\t\tvalidProof = proof\n\t\t\t\tvalidLockTime = height\n\t\t\t\tvalidVal = vals[index]\n\t\t\t}\n\t\t}\n\t}\n\n\tt.Run(\"invalid proof\", func(t *testing.T) {\n\t\tinvalidProof := td.RandProof()\n\t\tassert.False(t, td.sbx.VerifyProof(validLockTime, invalidProof, validVal))\n\t})\n\tt.Run(\"invalid height\", func(t *testing.T) {\n\t\tassert.False(t, td.sbx.VerifyProof(td.RandHeight(), validProof, validVal))\n\t})\n\n\tt.Run(\"genesis block height\", func(t *testing.T) {\n\t\tassert.False(t, td.sbx.VerifyProof(0, validProof, validVal))\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tassert.True(t, td.sbx.VerifyProof(validLockTime, validProof, validVal))\n\t})\n}\n"
  },
  {
    "path": "scripts/snapshot.py",
    "content": "# Pactus Blockchain Snapshot tool\n#\n# This script first stops the Pactus node if it is running, then creates a backup of the blockchain data by copying\n# or compressing it based on the specified options. The backup is stored in a timestamped snapshot directory along\n# with a `metadata.json` file that contains detailed information about the snapshot, including file paths and\n# checksums. Finally, the script manages the retention of snapshots, ensuring only a specified number of recent\n# backups are kept.\n#\n# Arguments\n#\n# - `--service_path`: This argument specifies the path to the `pactus` service file to manage systemctl service.\n# - `--data_path`: This argument specifies the path to the Pactus data folder to create snapshots.\n#    - Windows: `C:\\Users\\{user}\\pactus\\data`\n#    - Linux or Mac: `/home/{user}/pactus/data`\n# - `--compress`: This argument specifies the compression method based on your choice ['none', 'zip', 'tar'],\n# with 'none' being without compression.\n# - `--retention`: This argument sets the number of snapshots to keep.\n# - `--snapshot_path`: This argument sets a custom path for snapshots, with the default being the current\n# working directory of the script.\n#\n# How to run?\n#\n# For create snapshots just run this command:\n#\n# sudo python3 snapshot.py --service_path /etc/systemd/system/pactus.service --data_path /home/{user}/pactus/data\n# --compress zip --retention 3\n\n\nimport argparse\nimport os\nimport shutil\nimport subprocess\nimport hashlib\nimport json\nimport logging\nimport zipfile\nimport time\nfrom datetime import datetime\n\n\ndef setup_logging():\n    logging.basicConfig(\n        format=\"[%(asctime)s] %(message)s\", datefmt=\"%Y-%m-%d-%H:%M\", level=logging.INFO\n    )\n\n\ndef get_timestamp_str():\n    return datetime.now().strftime(\"%Y%m%d%H%M%S\")\n\n\ndef get_current_time_iso():\n    return datetime.now().isoformat()\n\n\nclass Metadata:\n    @staticmethod\n    def sha256(file_path):\n        hash_sha = hashlib.sha256()\n        with open(file_path, \"rb\") as f:\n            for chunk in iter(lambda: f.read(4096), b\"\"):\n                hash_sha.update(chunk)\n        return hash_sha.hexdigest()\n\n    @staticmethod\n    def update_metadata_file(snapshot_path, snapshot_metadata):\n        metadata_file = os.path.join(snapshot_path, \"metadata.json\")\n        if os.path.isfile(metadata_file):\n            logging.info(f\"Updating existing metadata file '{metadata_file}'\")\n            with open(metadata_file, \"r\") as f:\n                metadata = json.load(f)\n        else:\n            logging.info(f\"Creating new metadata file '{metadata_file}'\")\n            metadata = []\n\n        formatted_metadata = {\n            \"name\": snapshot_metadata[\"name\"],\n            \"created_at\": snapshot_metadata[\"created_at\"],\n            \"compress\": snapshot_metadata[\"compress\"],\n            \"data\": snapshot_metadata[\"data\"],\n        }\n\n        metadata.append(formatted_metadata)\n\n        with open(metadata_file, \"w\") as f:\n            json.dump(metadata, f, indent=4)\n\n    @staticmethod\n    def update_metadata_after_removal(snapshots_dir, removed_snapshots):\n        metadata_file = os.path.join(snapshots_dir, \"metadata.json\")\n        if not os.path.isfile(metadata_file):\n            return\n\n        logging.info(f\"Updating metadata file '{metadata_file}' after snapshot removal\")\n        with open(metadata_file, \"r\") as f:\n            metadata = json.load(f)\n\n        updated_metadata = [\n            entry for entry in metadata if entry[\"name\"] not in removed_snapshots\n        ]\n\n        with open(metadata_file, \"w\") as f:\n            json.dump(updated_metadata, f, indent=4)\n\n    @staticmethod\n    def create_snapshot_json(data_dir, snapshot_subdir):\n        files = []\n        for root, _, filenames in os.walk(data_dir):\n            for filename in filenames:\n                file_path = os.path.join(root, filename)\n                rel_path = os.path.relpath(file_path, data_dir)\n                snapshot_rel_path = os.path.join(snapshot_subdir, rel_path).replace(\n                    \"\\\\\", \"/\"\n                )\n                file_info = {\n                    \"name\": filename,\n                    \"path\": snapshot_rel_path,\n                    \"sha\": Metadata.sha256(file_path),\n                }\n                files.append(file_info)\n\n        return {\"data\": files}\n\n    @staticmethod\n    def create_compressed_snapshot_json(compressed_file, rel_path):\n        compressed_file_size = os.path.getsize(compressed_file)\n        file_info = {\n            \"name\": os.path.basename(compressed_file),\n            \"path\": rel_path,\n            \"sha\": Metadata.sha256(compressed_file),\n            \"size\": compressed_file_size,\n        }\n\n        return {\"data\": file_info}\n\n\ndef run_command(command):\n    logging.info(f\"Running command: {' '.join(command)}\")\n    try:\n        result = subprocess.run(\n            command,\n            check=True,\n            stdout=subprocess.PIPE,\n            stderr=subprocess.PIPE,\n            text=True,\n        )\n\n        if result.stdout.strip():\n            logging.info(f\"Command output: {result.stdout.strip()}\")\n\n        if result.stderr.strip():\n            # Downgrade from error to info for successful commands\n            logging.info(f\"Command stderr: {result.stderr.strip()}\")\n\n        return result.stdout.strip()\n    except subprocess.CalledProcessError as e:\n        logging.error(f\"Command failed with error: {e.stderr.strip()}\")\n        return f\"Error: {e.stderr.strip()}\"\n\n\n\ndef get_service_name(service_path):\n    base_name = os.path.basename(service_path)\n    service_name = os.path.splitext(base_name)[0]\n    return service_name\n\n\nclass DaemonManager:\n    @staticmethod\n    def start_service(service_path=None, docker_compose_path=None, docker_service_name=None):\n        if docker_compose_path and docker_service_name:\n            logging.info(f\"Starting Docker Compose service '{docker_service_name}' at '{docker_compose_path}'\")\n            return run_command([\"docker\", \"compose\", \"-f\", docker_compose_path, \"start\", docker_service_name])\n        elif service_path:\n            sv = get_service_name(service_path)\n            logging.info(f\"Starting systemctl service '{sv}'\")\n            return run_command([\"sudo\", \"systemctl\", \"start\", sv])\n\n        return None\n\n    @staticmethod\n    def stop_service(service_path=None, docker_compose_path=None, docker_service_name=None):\n        if docker_compose_path and docker_service_name:\n            logging.info(f\"Stopping Docker Compose service '{docker_service_name}' at '{docker_compose_path}'\")\n            return run_command([\"docker\", \"compose\", \"-f\", docker_compose_path, \"stop\", docker_service_name])\n        elif service_path:\n            sv = get_service_name(service_path)\n            logging.info(f\"Stopping systemctl service '{sv}'\")\n            return run_command([\"sudo\", \"systemctl\", \"stop\", sv])\n\n        return None\n\n\nclass SnapshotManager:\n    def __init__(self, args):\n        self.args = args\n\n    def manage_snapshots(self):\n        snapshots_dir = self.args.snapshot_path\n        logging.info(f\"Managing snapshots in '{snapshots_dir}'\")\n\n        if not os.path.exists(snapshots_dir):\n            logging.info(\n                f\"Snapshots directory '{snapshots_dir}' does not exist. Creating it.\"\n            )\n            os.makedirs(snapshots_dir)\n\n        snapshots = sorted(\n            [s for s in os.listdir(snapshots_dir) if s != \"metadata.json\"]\n        )\n\n        logging.info(f\"Found snapshots: {snapshots}\")\n        logging.info(f\"Retention policy is to keep {self.args.retention} snapshots\")\n\n        if len(snapshots) >= self.args.retention:\n            num_to_remove = len(snapshots) - self.args.retention + 1\n            to_remove = snapshots[:num_to_remove]\n            logging.info(f\"Snapshots to remove: {to_remove}\")\n            for snapshot in to_remove:\n                snapshot_path = os.path.join(snapshots_dir, snapshot)\n                logging.info(f\"Removing old snapshot '{snapshot_path}'\")\n                shutil.rmtree(snapshot_path)\n\n            Metadata.update_metadata_after_removal(snapshots_dir, to_remove)\n\n    def create_snapshot(self):\n        timestamp_str = get_timestamp_str()\n        snapshot_dir = os.path.join(self.args.snapshot_path, timestamp_str)\n        logging.info(f\"Creating snapshot directory '{snapshot_dir}'\")\n        os.makedirs(snapshot_dir, exist_ok=True)\n\n        data_dir = os.path.join(snapshot_dir, \"data\")\n        if self.args.compress == \"none\":\n            logging.info(f\"Copying data from '{self.args.data_path}' to '{data_dir}'\")\n            shutil.copytree(self.args.data_path, data_dir)\n            snapshot_metadata = Metadata.create_snapshot_json(data_dir, timestamp_str)\n        elif self.args.compress == \"zip\":\n            zip_file = os.path.join(snapshot_dir, \"data.zip\")\n            rel = os.path.relpath(zip_file, snapshot_dir)\n            meta_path = os.path.join(timestamp_str, rel)\n            logging.info(f\"Creating ZIP archive '{zip_file}'\")\n            with zipfile.ZipFile(zip_file, \"w\", zipfile.ZIP_DEFLATED) as zipf:\n                for root, _, files in os.walk(self.args.data_path):\n                    for file in files:\n                        full_path = os.path.join(root, file)\n                        rel_path = os.path.relpath(full_path, self.args.data_path)\n                        zipf.write(full_path, os.path.join(\"data\", rel_path))\n            snapshot_metadata = Metadata.create_compressed_snapshot_json(\n                zip_file, meta_path\n            )\n        elif self.args.compress == \"tar\":\n            tar_file = os.path.join(snapshot_dir, \"data.tar.gz\")\n            rel = os.path.relpath(tar_file, snapshot_dir)\n            meta_path = os.path.join(timestamp_str, rel)\n            logging.info(f\"Creating TAR.GZ archive '{tar_file}'\")\n            subprocess.run([\"tar\", \"-czvf\", tar_file, \"-C\", self.args.data_path, \".\"])\n            snapshot_metadata = Metadata.create_compressed_snapshot_json(\n                tar_file, meta_path\n            )\n\n        snapshot_metadata[\"name\"] = timestamp_str\n        snapshot_metadata[\"created_at\"] = get_current_time_iso()\n        snapshot_metadata[\"compress\"] = self.args.compress\n\n        Metadata.update_metadata_file(self.args.snapshot_path, snapshot_metadata)\n\n\nclass Validation:\n    @staticmethod\n    def validate_args(args):\n        logging.info(\"Validating arguments\")\n\n        # Ensure at least one service method is provided\n        if not args.service_path and not args.docker_compose_path:\n            raise ValueError(\"Either --service_path or --docker_compose_path must be provided.\")\n\n        # Validate systemctl service path if provided\n        if args.service_path:\n            if not os.path.isfile(args.service_path):\n                raise ValueError(f\"Service file '{args.service_path}' does not exist.\")\n            logging.info(f\"Service file '{args.service_path}' exists\")\n\n        # Validate docker-compose if provided\n        if args.docker_compose_path:\n            if not os.path.isfile(args.docker_compose_path):\n                raise ValueError(f\"Docker Compose file '{args.docker_compose_path}' does not exist.\")\n            if not args.docker_service_name:\n                raise ValueError(\"--docker_service_name is required when using --docker_compose_path\")\n            logging.info(f\"Docker Compose file '{args.docker_compose_path}' exists\")\n            logging.info(f\"Docker service name is '{args.docker_service_name}'\")\n\n        # Common validations\n        if not os.path.isdir(args.data_path):\n            raise ValueError(f\"Data path '{args.data_path}' does not exist.\")\n        logging.info(f\"Data path '{args.data_path}' exists\")\n\n        if not os.access(args.data_path, os.W_OK):\n            raise PermissionError(\n                f\"No permission to access data path '{args.data_path}'.\"\n            )\n        logging.info(f\"Permission to access data path '{args.data_path}' confirmed\")\n\n        if args.compress == \"zip\" and not shutil.which(\"zip\"):\n            raise EnvironmentError(\"The 'zip' command is not available.\")\n        elif args.compress == \"zip\":\n            logging.info(\"The 'zip' command is available\")\n\n        if args.compress == \"tar\" and not shutil.which(\"tar\"):\n            raise EnvironmentError(\"The 'tar' command is not available.\")\n        elif args.compress == \"tar\":\n            logging.info(\"The 'tar' command is available\")\n\n        if args.retention <= 0:\n            raise ValueError(\"Retention value must be greater than 0.\")\n        logging.info(f\"Retention value is set to {args.retention}\")\n\n        if not os.access(args.snapshot_path, os.W_OK):\n            raise PermissionError(\n                f\"No permission to access snapshot path '{args.snapshot_path}'.\"\n            )\n        logging.info(\n            f\"Permission to access snapshot path '{args.snapshot_path}' confirmed\"\n        )\n\n        if not os.path.isdir(args.snapshot_path):\n            logging.info(\"Snapshots directory does not exist, creating it\")\n            os.makedirs(args.snapshot_path)\n        else:\n            logging.info(\"Snapshots directory exists\")\n\nclass ProcessBackup:\n    def __init__(self, args):\n        self.args = args\n\n        Validation.validate_args(self.args)\n\n    def run(self):\n        DaemonManager.stop_service(\n            service_path=self.args.service_path,\n            docker_compose_path=self.args.docker_compose_path,\n            docker_service_name=self.args.docker_service_name\n        )\n\n        # sleeps for 5 seconds\n        time.sleep(5)\n\n        snapshot_manager = SnapshotManager(self.args)\n        snapshot_manager.manage_snapshots()\n        snapshot_manager.create_snapshot()\n        DaemonManager.start_service(\n            service_path=self.args.service_path,\n            docker_compose_path=self.args.docker_compose_path,\n            docker_service_name=self.args.docker_service_name\n        )\n\n\ndef parse_args():\n    user_home = os.path.expanduser(\"~\")\n    default_data_path = os.path.join(user_home, \"pactus\")\n\n    parser = argparse.ArgumentParser(description=\"Pactus Blockchain Snapshot Tool\")\n    parser.add_argument(\n        \"--service_path\", help=\"Path to pactus systemctl service\"\n    )\n    parser.add_argument(\n        \"--docker_compose_path\",\n        help=\"Path to docker-compose.yml file to manage Docker-based service\"\n    )\n    parser.add_argument(\n        \"--docker_service_name\",\n        help=\"Name of the Docker service in the Compose file\"\n    )\n    parser.add_argument(\n        \"--data_path\", default=default_data_path, help=\"Path to data directory\"\n    )\n    parser.add_argument(\n        \"--compress\",\n        choices=[\"none\", \"zip\", \"tar\"],\n        default=\"none\",\n        help=\"Compression type\",\n    )\n    parser.add_argument(\n        \"--retention\", type=int, default=3, help=\"Number of snapshots to retain\"\n    )\n    parser.add_argument(\n        \"--snapshot_path\", default=os.getcwd(), help=\"Path to store snapshots\"\n    )\n\n    return parser.parse_args()\n\n\ndef main():\n    setup_logging()\n    args = parse_args()\n    process_backup = ProcessBackup(args)\n    process_backup.run()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "sortition/proof.go",
    "content": "package sortition\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n)\n\ntype Proof [48]byte\n\nfunc ProofFromString(text string) (Proof, error) {\n\tdata, err := hex.DecodeString(text)\n\tif err != nil {\n\t\treturn Proof{}, err\n\t}\n\n\treturn ProofFromBytes(data)\n}\n\nfunc ProofFromBytes(data []byte) (Proof, error) {\n\tif len(data) != 48 {\n\t\treturn Proof{}, errors.New(\"invalid proof length\")\n\t}\n\n\tp := Proof{}\n\tcopy(p[:], data)\n\n\treturn p, nil\n}\n"
  },
  {
    "path": "sortition/proof_test.go",
    "content": "package sortition\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProofFromString(t *testing.T) {\n\t_, err := ProofFromString(\"inv\")\n\trequire.Error(t, err)\n\t_, err = ProofFromBytes([]byte{0})\n\trequire.Error(t, err)\n}\n"
  },
  {
    "path": "sortition/seed.go",
    "content": "package sortition\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\ntype VerifiableSeed [48]byte\n\nvar UndefVerifiableSeed = VerifiableSeed{}\n\nfunc VerifiableSeedFromString(text string) (VerifiableSeed, error) {\n\tdata, err := hex.DecodeString(text)\n\tif err != nil {\n\t\treturn UndefVerifiableSeed, err\n\t}\n\n\treturn VerifiableSeedFromBytes(data)\n}\n\nfunc VerifiableSeedFromBytes(data []byte) (VerifiableSeed, error) {\n\tif len(data) != 48 {\n\t\treturn UndefVerifiableSeed, errors.New(\"invalid seed length\")\n\t}\n\n\ts := UndefVerifiableSeed\n\tcopy(s[:], data)\n\n\treturn s, nil\n}\n\nfunc (s *VerifiableSeed) GenerateNext(prv *bls.PrivateKey) VerifiableSeed {\n\th := hash.CalcHash(s[:])\n\tsig := prv.Sign(h.Bytes())\n\tnewSeed, _ := VerifiableSeedFromBytes(sig.Bytes())\n\n\treturn newSeed\n}\n\nfunc (s *VerifiableSeed) Verify(public *bls.PublicKey, prevSeed VerifiableSeed) bool {\n\tsig, err := bls.SignatureFromBytes(s[:])\n\tif err != nil {\n\t\treturn false\n\t}\n\th := hash.CalcHash(prevSeed[:])\n\n\treturn public.Verify(h.Bytes(), sig) == nil\n}\n"
  },
  {
    "path": "sortition/seed_test.go",
    "content": "package sortition_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSeedFromString(t *testing.T) {\n\t_, err := sortition.VerifiableSeedFromString(\"inv\")\n\trequire.Error(t, err)\n\t_, err = sortition.VerifiableSeedFromBytes([]byte{0})\n\trequire.Error(t, err)\n}\n\nfunc TestValidate(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tvalKey := ts.RandValKey()\n\tseed1 := ts.RandSeed()\n\tseed2 := seed1.GenerateNext(valKey.PrivateKey())\n\tseed3 := sortition.VerifiableSeed{}\n\tseed4, _ := sortition.VerifiableSeedFromString(\n\t\t\"C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\n\tassert.True(t, seed2.Verify(valKey.PublicKey(), seed1))\n\tassert.False(t, seed1.Verify(valKey.PublicKey(), seed2))\n\tassert.False(t, seed2.Verify(valKey.PublicKey(), ts.RandSeed()))\n\tassert.False(t, seed3.Verify(valKey.PublicKey(), seed1))\n\tassert.False(t, seed4.Verify(valKey.PublicKey(), seed1))\n}\n"
  },
  {
    "path": "sortition/sortition.go",
    "content": "package sortition\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n)\n\nfunc EvaluateSortition(seed VerifiableSeed, prv *bls.PrivateKey, total, threshold int64) (bool, Proof) {\n\tindex, proof := Evaluate(seed, prv, uint64(total))\n\tif int64(index) < threshold {\n\t\treturn true, proof\n\t}\n\n\treturn false, Proof{}\n}\n\nfunc VerifyProof(seed VerifiableSeed, proof Proof, pub *bls.PublicKey, total, threshold int64) bool {\n\tindex, result := Verify(seed, pub, proof, uint64(total))\n\tif !result {\n\t\treturn false\n\t}\n\n\treturn int64(index) < threshold\n}\n"
  },
  {
    "path": "sortition/sortition_test.go",
    "content": "package sortition_test\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestEvaluation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tprv, _ := bls.PrivateKeyFromString(\n\t\t\"SECRET1P838V87AW42JS8YWLYYK0AYFJQ9445VR72H23D6LR7GEJ8KW9UQ0QVE8WHE\")\n\tseed, _ := sortition.VerifiableSeedFromString(\n\t\t\"b63179137423ab2da8279d7aa3726d7ad05ae7d3ab3f744db0a9a719d12a720e72dc1d1e9222360243007f2f4adf7009\")\n\tvalKey := bls.NewValidatorKey(prv)\n\n\tt.Run(\"Total stake is zero\", func(t *testing.T) {\n\t\tthreshold := ts.RandInt64Max(int64(1e14))\n\t\tok, proof := sortition.EvaluateSortition(seed, valKey.PrivateKey(), 0, threshold)\n\t\trequire.True(t, ok)\n\t\tok = sortition.VerifyProof(seed, proof, valKey.PublicKey(), 0, threshold)\n\t\trequire.True(t, ok)\n\t})\n\n\tt.Run(\"Total stake is not zero, but validator stake is zero\", func(t *testing.T) {\n\t\ttotal := ts.RandInt64Max(int64(1e14))\n\n\t\tok, _ := sortition.EvaluateSortition(seed, valKey.PrivateKey(), total, 0)\n\t\trequire.False(t, ok)\n\t})\n\n\tt.Run(\"OK!\", func(t *testing.T) {\n\t\tproof1, _ := sortition.ProofFromString(\n\t\t\t\"8cb689ec126465ddadd32493b71dc7ee3bfa2ef5a0a0f4b9b8aa777fb915a5f88def3305a3579e97b96ac862a6d67316\")\n\t\ttotal := int64(1 * 1e14)\n\n\t\tok, proof2 := sortition.EvaluateSortition(seed, valKey.PrivateKey(), total, total/100)\n\t\trequire.True(t, ok)\n\t\trequire.Equal(t, proof1, proof2)\n\n\t\trequire.True(t, sortition.VerifyProof(seed, proof1, valKey.PublicKey(), total, total/100))\n\t\trequire.False(t, sortition.VerifyProof(seed, proof1, valKey.PublicKey(), total, 0))\n\t\trequire.False(t, sortition.VerifyProof(seed, ts.RandProof(), valKey.PublicKey(), total, total/10))\n\t\trequire.False(t, sortition.VerifyProof(seed, sortition.Proof{}, valKey.PublicKey(), total, total/10))\n\t\trequire.False(t, sortition.VerifyProof(ts.RandSeed(), proof1, valKey.PublicKey(), total, total/10))\n\t})\n}\n\nfunc TestInvalidProof(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid proof (Zero proof)\", func(t *testing.T) {\n\t\ttotal := ts.RandInt64Max(int64(1e14))\n\t\tseed := ts.RandSeed()\n\t\tpub, _ := ts.RandBLSKeyPair()\n\t\tproof, _ := sortition.ProofFromString(\n\t\t\t\"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\n\t\trequire.False(t, sortition.VerifyProof(seed, proof, pub, total, total))\n\t})\n\n\tt.Run(\"Invalid proof (Infinity proof)\", func(t *testing.T) {\n\t\ttotal := ts.RandInt64Max(int64(1e14))\n\t\tseed := ts.RandSeed()\n\t\tpub, _ := ts.RandBLSKeyPair()\n\t\tproof, _ := sortition.ProofFromString(\n\t\t\t\"C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\")\n\n\t\trequire.False(t, sortition.VerifyProof(seed, proof, pub, total, total))\n\t})\n}\n\nfunc TestSortitionMedian(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttotal := int64(1 * 1e9)\n\tvalKey := ts.RandValKey()\n\n\tcount := 1000\n\tmedian := 0\n\tfor j := 0; j < count; j++ {\n\t\tseed := ts.RandSeed()\n\t\tok, _ := sortition.EvaluateSortition(seed, valKey.PrivateKey(), total, total/10)\n\t\tif ok {\n\t\t\tmedian++\n\t\t}\n\t}\n\n\t// Should be about 10%\n\tfmt.Printf(\"%v%% \\n\", median*100/count)\n\tassert.GreaterOrEqual(t, median*100/count, 5)\n\tassert.LessOrEqual(t, median*100/count, 15)\n\tassert.NotZero(t, median*100/count)\n}\n"
  },
  {
    "path": "sortition/vrf.go",
    "content": "package sortition\n\nimport (\n\t\"math/big\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\nvar denominator *big.Int\n\nfunc init() {\n\tdenominator = &big.Int{}\n\tdenominator.SetString(\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\", 16)\n}\n\n// Evaluate returns a provable random number between [0, max) along with a proof.\n// It returns the random number and the proof that can regenerate the random number using\n// the public key of the signer, without revealing the private key.\nfunc Evaluate(seed VerifiableSeed, prv *bls.PrivateKey, max uint64) (uint64, Proof) {\n\tsignData := make([]byte, 0, bls.SignatureSize+bls.PublicKeySize)\n\tsignData = append(signData, seed[:]...)\n\tsignData = append(signData, prv.PublicKey().Bytes()...)\n\n\tsig := prv.Sign(signData)\n\n\tproof, _ := ProofFromBytes(sig.Bytes())\n\tindex := GetIndex(proof, max)\n\n\treturn index, proof\n}\n\n// Verify checks if the provided proof, based on the seed and public key, is valid.\n// If the proof is valid, it calculates the random number that\n// can be generated based on the given proof.\nfunc Verify(seed VerifiableSeed, pub *bls.PublicKey, proof Proof, max uint64) (uint64, bool) {\n\tproofSig, err := bls.SignatureFromBytes(proof[:])\n\tif err != nil {\n\t\treturn 0, false\n\t}\n\n\t// Verify signature (proof)\n\tsignData := make([]byte, 0, bls.SignatureSize+bls.PublicKeySize)\n\tsignData = append(signData, seed[:]...)\n\tsignData = append(signData, pub.Bytes()...)\n\tif err := pub.Verify(signData, proofSig); err != nil {\n\t\treturn 0, false\n\t}\n\n\tindex := GetIndex(proof, max)\n\n\treturn index, true\n}\n\nfunc GetIndex(proof Proof, max uint64) uint64 {\n\thash := hash.CalcHash(proof[:])\n\n\t// construct the numerator and denominator for normalizing the proof uint\n\tbigRnd := &big.Int{}\n\tbigMax := &big.Int{}\n\tnumerator := &big.Int{}\n\n\tbigRnd.SetBytes(hash.Bytes())\n\tbigMax.SetUint64(max)\n\n\tnumerator = numerator.Mul(bigRnd, bigMax)\n\n\t// divide numerator and denominator to get the election ratio for this block height\n\tindex := big.NewInt(0)\n\tindex = index.Div(numerator, denominator)\n\n\treturn index.Uint64()\n}\n"
  },
  {
    "path": "sortition/vrf_test.go",
    "content": "package sortition_test\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestVRF(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, prv := ts.RandBLSKeyPair()\n\tvalKey := bls.NewValidatorKey(prv)\n\tfor i := 0; i < 100; i++ {\n\t\tseed := ts.RandSeed()\n\t\tt.Logf(\"seed is: %x \\n\", seed)\n\n\t\tmaxSize := uint64(1 * 1e6)\n\t\tindex, proof := sortition.Evaluate(seed, valKey.PrivateKey(), maxSize)\n\n\t\tassert.LessOrEqual(t, index, maxSize)\n\n\t\tindex2, result := sortition.Verify(seed, pub, proof, maxSize)\n\n\t\tassert.True(t, result)\n\t\tassert.Equal(t, index, index2)\n\t}\n}\n\n// TestRandomUint64 exercises the randomness of the random number generator on\n// the system by ensuring the probability of the generated numbers.  If the RNG\n// is evenly distributed as a proper cryptographic RNG should be, there really\n// should only be 1 number < 2^56 in 2^8 tries for a 64-bit number.  However,\n// use a higher number of 5 to really ensure the test doesn't fail unless the\n// RNG is just horrendous.\nfunc TestRandomUint64(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttries := 1 << 8              // 2^8\n\twatermark := uint64(1 << 56) // 2^56\n\tmaxHits := 5\n\tbadRNG := \"The random number generator on this system is clearly \" +\n\t\t\"terrible since we got %d values less than %d in %d runs \" +\n\t\t\"when only %d was expected\"\n\t_, pv := ts.RandBLSKeyPair()\n\n\tvalKey := bls.NewValidatorKey(pv)\n\n\tnumHits := 0\n\tfor i := 0; i < tries; i++ {\n\t\tseed := ts.RandSeed()\n\n\t\tnonce, _ := sortition.Evaluate(seed, valKey.PrivateKey(), util.MaxUint64)\n\t\tif nonce < watermark {\n\t\t\tnumHits++\n\t\t}\n\t\tif numHits > maxHits {\n\t\t\tstr := fmt.Sprintf(badRNG, numHits, watermark, tries, maxHits)\n\t\t\tt.Errorf(\"Random Uint64 iteration %d failed - %v\", i, str)\n\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc TestGetIndex(t *testing.T) {\n\t// The expected values\n\t//\n\t// Total: 1,000,000\n\t//\n\t// proof: 0x1719b896ec1cc66a0f44c4bf90890d988e341cb2c1a808907780af844c854291536c12fdaef9a526bb7ef80da17c0b03\n\t// proofH: 0xa7b8166584387f4ea76f9caa0969bd6b0bb8df4c3bb8e87f8b6e4dad62bf3359\n\t//\n\t// proofH * 1000000 / denominator = 655152.7021258341\n\tproof1, _ := sortition.ProofFromString(\n\t\t\"1719b896ec1cc66a0f44c4bf90890d988e341cb2c1a808907780af844c854291536c12fdaef9a526bb7ef80da17c0b03\")\n\tassert.Equal(t, uint64(655152), sortition.GetIndex(proof1, 1*1e6))\n\n\t// proof: 45180defab2daae377977bf09dcdd7d76ff4fc96d1b50cc8ac5a1601c0522fb11641c3ed0fefd4b1e1808c498d699396\n\t// proofH: 80212979d1de1ca4ce1258fc0be66a4453b3804e64a5ca8d95f7def2c291c7fe\n\t//\n\t// proofH * 1000000 / denominator = 500506.0121928797\n\tproof2, _ := sortition.ProofFromString(\n\t\t\"45180defab2daae377977bf09dcdd7d76ff4fc96d1b50cc8ac5a1601c0522fb11641c3ed0fefd4b1e1808c498d699396\")\n\tassert.Equal(t, uint64(500506), sortition.GetIndex(proof2, 1*1e6))\n}\n"
  },
  {
    "path": "state/errors.go",
    "content": "package state\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\n// ErrInvalidBlockVersion indicates that the block version is not valid.\nvar ErrInvalidBlockVersion = errors.New(\"invalid block version\")\n\n// ErrInvalidSubsidyTransaction indicates that the subsidy transaction is not valid.\nvar ErrInvalidSubsidyTransaction = errors.New(\"invalid subsidy transaction\")\n\n// ErrDuplicatedSubsidyTransaction indicates that there is more than one subsidy transaction\n// inside the block.\nvar ErrDuplicatedSubsidyTransaction = errors.New(\"duplicated subsidy transaction\")\n\n// ErrInvalidSortitionSeed indicates that the block's sortition seed is either invalid or unverifiable.\nvar ErrInvalidSortitionSeed = errors.New(\"invalid sortition seed\")\n\n// ErrInvalidCertificate indicates that the block certificate is invalid.\nvar ErrInvalidCertificate = errors.New(\"invalid certificate\")\n\n// InvalidSubsidyAmountError is returned when the amount of the subsidy transaction is not as expected.\ntype InvalidSubsidyAmountError struct {\n\tExpected amount.Amount\n\tGot      amount.Amount\n}\n\nfunc (e InvalidSubsidyAmountError) Error() string {\n\treturn fmt.Sprintf(\"invalid subsidy amount, expected: %v, got: %v\", e.Expected, e.Got)\n}\n\n// InvalidVoteForCertificateError is returned when an attempt to update\n// the last certificate with an invalid vote is made.\ntype InvalidVoteForCertificateError struct {\n\tVote *vote.Vote\n}\n\nfunc (e InvalidVoteForCertificateError) Error() string {\n\treturn fmt.Sprintf(\"invalid vote to update the last certificate: %s\",\n\t\te.Vote.Type().String())\n}\n\n// InvalidStateRootHashError is returned when the state root hash of the block\n// does not match the current state root hash.\ntype InvalidStateRootHashError struct {\n\tExpected hash.Hash\n\tGot      hash.Hash\n}\n\nfunc (e InvalidStateRootHashError) Error() string {\n\treturn fmt.Sprintf(\"invalid state root hash, expected: %s, got: %s\",\n\t\te.Expected, e.Got)\n}\n\n// InvalidProposerError is returned when the block proposer is not as expected.\ntype InvalidProposerError struct {\n\tExpected crypto.Address\n\tGot      crypto.Address\n}\n\nfunc (e InvalidProposerError) Error() string {\n\treturn fmt.Sprintf(\"invalid block proposer, expected: %s, got: %s\",\n\t\te.Expected, e.Got)\n}\n\n// InvalidBlockTimeError is returned when the block time is not valid.\ntype InvalidBlockTimeError struct {\n\tReason string\n}\n\nfunc (e InvalidBlockTimeError) Error() string {\n\treturn fmt.Sprintf(\"invalid block time: %s\", e.Reason)\n}\n"
  },
  {
    "path": "state/execution.go",
    "content": "package state\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/execution\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\nfunc (st *state) executeBlock(blk *block.Block, sbx sandbox.Sandbox, check bool) error {\n\tproposerAddr := blk.Header().ProposerAddress()\n\tfor i, trx := range blk.Transactions() {\n\t\tif check {\n\t\t\t// The first transaction should be subsidy transaction\n\t\t\tshouldBeSubsidyTx := (i == 0)\n\t\t\terr := st.checkSubsidy(trx, proposerAddr, shouldBeSubsidyTx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\terr = execution.CheckAndExecute(trx, sbx, true)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\terr := execution.Execute(trx, sbx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tsubsidyTrx := blk.Transactions().Subsidy()\n\taccumulatedFee := sbx.AccumulatedFee()\n\tsubsidyAmt := st.params.BlockReward + sbx.AccumulatedFee()\n\tif subsidyTrx.Payload().Value() != subsidyAmt {\n\t\treturn InvalidSubsidyAmountError{\n\t\t\tExpected: subsidyAmt,\n\t\t\tGot:      subsidyTrx.Payload().Value(),\n\t\t}\n\t}\n\n\t// Claim accumulated fees\n\tacc := sbx.Account(crypto.TreasuryAddress)\n\tacc.AddToBalance(accumulatedFee)\n\tsbx.UpdateAccount(crypto.TreasuryAddress, acc)\n\n\treturn nil\n}\n\nfunc (st *state) checkSubsidy(trx *tx.Tx, proposerAddr crypto.Address, shouldBeSubsidyTx bool) error {\n\tif !shouldBeSubsidyTx {\n\t\tif trx.IsSubsidyTx() {\n\t\t\treturn ErrDuplicatedSubsidyTransaction\n\t\t}\n\n\t\treturn nil\n\t}\n\n\tif !trx.IsSubsidyTx() {\n\t\treturn ErrInvalidSubsidyTransaction\n\t}\n\n\tlockTime := trx.LockTime()\n\tbatchTrx, ok := trx.Payload().(*payload.BatchTransferPayload)\n\tif !ok {\n\t\treturn ErrInvalidSubsidyTransaction\n\t}\n\n\tif batchTrx.Recipients[0].Amount != st.params.FoundationReward {\n\t\treturn ErrInvalidSubsidyTransaction\n\t}\n\n\taddressIndex := int(lockTime) % len(st.params.FoundationAddress)\n\tfoundationAddress := st.params.FoundationAddress[addressIndex]\n\tif batchTrx.Recipients[0].To != foundationAddress {\n\t\treturn ErrInvalidSubsidyTransaction\n\t}\n\n\tval, err := st.store.Validator(proposerAddr)\n\tif err != nil {\n\t\treturn ErrInvalidSubsidyTransaction\n\t}\n\n\tif val.IsDelegated() {\n\t\tif val.DelegateShare() > 0 {\n\t\t\tif batchTrx.Recipients[1].To != val.DelegateOwner() || batchTrx.Recipients[1].Amount < val.DelegateShare() {\n\t\t\t\treturn ErrInvalidSubsidyTransaction\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 2 recipients: foundation + validator\n\t\tif len(batchTrx.Recipients) != 2 {\n\t\t\treturn ErrInvalidSubsidyTransaction\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "state/execution_test.go",
    "content": "package state\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/execution/executor\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProposeBlock(t *testing.T) {\n\ttd := setup(t)\n\n\tlockTime := td.state.LastBlockHeight()\n\tdupSubsidyTx := td.GenerateTestSubsidyTx(testsuite.TransactionWithLockTime(lockTime))\n\tinvTransferTx := td.GenerateTestTransferTx()\n\tinvBondTx := td.GenerateTestBondTx()\n\tinvSortitionTx := td.GenerateTestSortitionTx()\n\n\tvalidTrx1 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\ttestsuite.TransactionWithSigner(td.genAccKey))\n\n\tvalidTrx2 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\ttestsuite.TransactionWithSigner(td.genAccKey))\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{\n\t\tinvTransferTx,\n\t\tinvBondTx,\n\t\tinvSortitionTx,\n\t\tdupSubsidyTx,\n\t\tvalidTrx1,\n\t\tvalidTrx2,\n\t}).Times(1)\n\n\trewardAddr := td.RandAccAddress()\n\tproposerKey := td.proposerKey(t, 0)\n\tblk, err := td.state.ProposeBlock(proposerKey, rewardAddr)\n\trequire.NoError(t, err)\n\n\tblockTrxs := blk.Transactions()\n\trewardTrx := blockTrxs[0]\n\n\tassert.Equal(t, protocol.ProtocolVersionLatest, blk.Header().Version())\n\tassert.Equal(t, td.state.Proposer(0).Address(), blk.Header().ProposerAddress())\n\tassert.Equal(t, td.state.LastBlockHash(), blk.Header().PrevBlockHash())\n\tassert.Equal(t, block.Txs{rewardTrx, validTrx1, validTrx2}, blockTrxs)\n\tassert.Equal(t, td.state.params.BlockReward+validTrx1.Fee()+validTrx2.Fee(), rewardTrx.Payload().Value())\n}\n\nfunc TestExecuteBlock(t *testing.T) {\n\ttd := setup(t)\n\n\tinvTransferTx := td.GenerateTestTransferTx()\n\tvalidTx1 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithLockTime(1),\n\t\ttestsuite.TransactionWithSigner(td.genAccKey))\n\n\tblockHeight := td.state.LastBlockHeight() + 1\n\tproposerAddr := td.proposerKey(t, 0).Address()\n\tinvSubsidyTx := td.state.createSubsidyTx(proposerAddr, td.RandAccAddress(), validTx1.Fee()+1)\n\tvalidSubsidyTx := td.state.createSubsidyTx(proposerAddr, td.RandAccAddress(), validTx1.Fee())\n\n\tt.Run(\"Block has invalid subsidy amount\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(invSubsidyTx)\n\t\ttxs.Append(validTx1)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, InvalidSubsidyAmountError{\n\t\t\tExpected: 1e9 + validTx1.Fee(),\n\t\t\tGot:      1e9 + validTx1.Fee() + 1,\n\t\t})\n\t})\n\n\tt.Run(\"Block has an invalid transaction\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validSubsidyTx)\n\t\ttxs.Append(invTransferTx)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, executor.AccountNotFoundError{\n\t\t\tAddress: invTransferTx.Payload().Signer(),\n\t\t})\n\t})\n\n\tt.Run(\"Subsidy is not first transaction in block\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validTx1)\n\t\ttxs.Append(validSubsidyTx)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Block has no subsidy transaction\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validTx1)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Block has two subsidy transactions\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validSubsidyTx)\n\t\ttxs.Append(validSubsidyTx)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, ErrDuplicatedSubsidyTransaction)\n\t})\n\n\tt.Run(\"Block has invalid proposer\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validSubsidyTx)\n\t\ttxs.Append(validTx1)\n\t\tinvBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(td.RandValAddress()),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\terr := td.state.executeBlock(invBlock, sb, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\ttxs := block.NewTxs()\n\t\ttxs.Append(validSubsidyTx)\n\t\ttxs.Append(validTx1)\n\t\tvalidBlock, _ := td.GenerateTestBlock(blockHeight,\n\t\t\ttestsuite.BlockWithProposer(proposerAddr),\n\t\t\ttestsuite.BlockWithStateHash(td.state.stateRoot()),\n\t\t\ttestsuite.BlockWithPrevCert(td.state.lastInfo.Certificate()),\n\t\t\ttestsuite.BlockWithPrevHash(td.state.lastInfo.BlockHash()),\n\t\t\ttestsuite.BlockWithSeed(td.state.lastInfo.SortitionSeed()),\n\t\t\ttestsuite.BlockWithTransactions(txs))\n\n\t\tsb := td.state.concreteSandbox()\n\t\trequire.NoError(t, td.state.executeBlock(validBlock, sb, true))\n\n\t\t// Check if fee is claimed\n\t\ttreasury := sb.Account(crypto.TreasuryAddress)\n\t\tassert.Equal(t, 21*1e15-(amount.Amount(blockHeight)*td.state.params.BlockReward), treasury.Balance())\n\t})\n}\n\nfunc TestSubsidyTransaction(t *testing.T) {\n\ttd := setup(t)\n\n\tproposerAddr := td.state.Proposer(0).Address()\n\n\tt.Run(\"Legacy Reward\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(td.RandHeight(), crypto.TreasuryAddress, td.RandAccAddress(), td.RandAmount(), 0)\n\n\t\terr := td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Split Reward With No Foundation Address\", func(t *testing.T) {\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.RandAmount(),\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(testsuite.TransactionWithRecipients(recipients))\n\n\t\terr := td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Split Reward With Invalid Foundation Address\", func(t *testing.T) {\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.RandAmount(),\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(testsuite.TransactionWithRecipients(recipients))\n\n\t\terr := td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Split Reward: Ok\", func(t *testing.T) {\n\t\tlockTime := td.RandHeight()\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.state.params.FoundationAddress[lockTime%100],\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.RandAmount(),\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithRecipients(recipients))\n\n\t\terr := td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.NoError(t, err)\n\t})\n\n\tt.Run(\"Non-delegated proposer rejects 3-recipient subsidy\", func(t *testing.T) {\n\t\tlockTime := td.RandHeight()\n\n\t\tval, err := td.state.store.Validator(proposerAddr)\n\t\trequire.NoError(t, err)\n\t\ttd.state.store.UpdateValidator(val)\n\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.state.params.FoundationAddress[lockTime%100],\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.RandAmount(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: 0,\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithRecipients(recipients))\n\n\t\terr = td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Delegated proposer accepts valid 3-recipient subsidy\", func(t *testing.T) {\n\t\tdelegateOwner := td.RandAccAddress()\n\t\tdelegateShare := amount.Amount(2e8)\n\t\tlockTime := td.RandHeight()\n\n\t\tval, err := td.state.store.Validator(proposerAddr)\n\t\trequire.NoError(t, err)\n\t\tval.SetDelegation(delegateOwner, delegateShare, td.RandHeight())\n\t\ttd.state.store.UpdateValidator(val)\n\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.state.params.FoundationAddress[lockTime%100],\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     delegateOwner,\n\t\t\t\tAmount: delegateShare,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.state.params.BlockReward - td.state.params.FoundationReward - delegateShare,\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithRecipients(recipients))\n\n\t\terr = td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.NoError(t, err)\n\t})\n\n\tt.Run(\"Delegated proposer rejects invalid owner amount/address in 3-recipient subsidy\", func(t *testing.T) {\n\t\tdelegateOwner := td.RandAccAddress()\n\t\tdelegateShare := amount.Amount(0.3e9)\n\t\tlockTime := td.RandHeight()\n\n\t\tval, err := td.state.store.Validator(proposerAddr)\n\t\trequire.NoError(t, err)\n\t\tval.SetDelegation(delegateOwner, delegateShare, td.RandHeight())\n\t\ttd.state.store.UpdateValidator(val)\n\n\t\tbadRecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.state.params.FoundationAddress[lockTime%100],\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.state.params.BlockReward - td.state.params.FoundationReward - delegateShare,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: delegateShare + 1,\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithRecipients(badRecipients))\n\n\t\terr = td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.ErrorIs(t, err, ErrInvalidSubsidyTransaction)\n\t})\n\n\tt.Run(\"Delegated proposer with zero share for owner\", func(t *testing.T) {\n\t\tlockTime := td.RandHeight()\n\n\t\tval, err := td.state.store.Validator(proposerAddr)\n\t\trequire.NoError(t, err)\n\n\t\tval.SetDelegation(td.RandAccAddress(), 0, td.RandHeight())\n\t\ttd.state.store.UpdateValidator(val)\n\n\t\trecipients := []payload.BatchRecipient{\n\t\t\t{\n\t\t\t\tTo:     td.state.params.FoundationAddress[lockTime%100],\n\t\t\t\tAmount: td.state.params.FoundationReward,\n\t\t\t},\n\t\t\t{\n\t\t\t\tTo:     td.RandAccAddress(),\n\t\t\t\tAmount: td.RandAmount(),\n\t\t\t},\n\t\t}\n\t\ttrx := td.GenerateTestSubsidyTx(\n\t\t\ttestsuite.TransactionWithLockTime(lockTime),\n\t\t\ttestsuite.TransactionWithRecipients(recipients))\n\n\t\terr = td.state.checkSubsidy(trx, proposerAddr, true)\n\t\trequire.NoError(t, err)\n\t})\n}\n"
  },
  {
    "path": "state/facade.go",
    "content": "package state\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype ChainInfo struct {\n\tLastBlockHeight types.Height\n\tLastBlockHash   hash.Hash\n\tLastBlockTime   time.Time\n\n\tTotalPower     int64\n\tCommitteePower int64\n\tCommitteeSize  int\n\n\tTotalAccounts    int32\n\tTotalValidators  int32\n\tActiveValidators int32\n\tAverageScore     float64\n\n\tIsPruned      bool\n\tPruningHeight types.Height\n}\n\n// CommitteeInfo holds committee validators, protocol versions, and total power.\ntype CommitteeInfo struct {\n\tValidators       []*validator.Validator\n\tProtocolVersions map[protocol.Version]float64\n\tCommitteePower   int64\n}\n\ntype Facade interface {\n\tGenesis() *genesis.Genesis\n\tParams() *param.Params\n\tLastBlockHeight() types.Height\n\tLastBlockHash() hash.Hash\n\tLastBlockTime() time.Time\n\tLastCertificate() *certificate.Certificate\n\tUpdateLastCertificate(v *vote.Vote) error\n\tProposeBlock(valKey *bls.ValidatorKey, rewardAddr crypto.Address) (*block.Block, error)\n\tValidateBlock(blk *block.Block, round types.Round) error\n\tCommitBlock(blk *block.Block, cert *certificate.Certificate) error\n\tCommitteeValidators() []*validator.Validator\n\tCommitteeInfo() *CommitteeInfo\n\tIsInCommittee(addr crypto.Address) bool\n\tProposer(round types.Round) *validator.Validator\n\tIsProposer(addr crypto.Address, round types.Round) bool\n\tPendingTx(txID tx.ID) *tx.Tx\n\tAddPendingTx(trx *tx.Tx) error\n\tAddPendingTxAndBroadcast(trx *tx.Tx) error\n\tCommittedBlock(height types.Height) (*store.CommittedBlock, error)\n\tCommittedTx(txID tx.ID) (*store.CommittedTx, error)\n\tBlockHash(height types.Height) hash.Hash\n\tBlockHeight(h hash.Hash) types.Height\n\tAccountByAddress(addr crypto.Address) (*account.Account, error)\n\tValidatorByAddress(addr crypto.Address) (*validator.Validator, error)\n\tValidatorByNumber(number int32) (*validator.Validator, error)\n\tValidatorAddresses() []crypto.Address\n\tUpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version)\n\tCalculateFee(amt amount.Amount, payloadType payload.Type) amount.Amount\n\tPublicKey(addr crypto.Address) (crypto.PublicKey, error)\n\tAvailabilityScore(valNum int32) float64\n\tAllPendingTxs() []*tx.Tx\n\tChainInfo() *ChainInfo\n\tCheckTransaction(trx *tx.Tx) error\n\n\tClose()\n}\n"
  },
  {
    "path": "state/lastinfo/last_info.go",
    "content": "package lastinfo\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype LastInfo struct {\n\tlastSortitionSeed sortition.VerifiableSeed\n\tlastBlockHash     hash.Hash\n\tlastCert          *certificate.Certificate\n\tlastBlockTime     time.Time\n\tlastValidators    []*validator.Validator\n}\n\nfunc NewLastInfo() *LastInfo {\n\treturn &LastInfo{}\n}\n\nfunc (li *LastInfo) SortitionSeed() sortition.VerifiableSeed {\n\treturn li.lastSortitionSeed\n}\n\nfunc (li *LastInfo) BlockHeight() types.Height {\n\tif li.lastCert == nil {\n\t\treturn 0\n\t}\n\n\treturn li.lastCert.Height()\n}\n\nfunc (li *LastInfo) BlockHash() hash.Hash {\n\treturn li.lastBlockHash\n}\n\nfunc (li *LastInfo) Certificate() *certificate.Certificate {\n\treturn li.lastCert\n}\n\nfunc (li *LastInfo) BlockTime() time.Time {\n\treturn li.lastBlockTime\n}\n\nfunc (li *LastInfo) Validators() []*validator.Validator {\n\treturn li.lastValidators\n}\n\nfunc (li *LastInfo) UpdateSortitionSeed(lastSortitionSeed sortition.VerifiableSeed) {\n\tli.lastSortitionSeed = lastSortitionSeed\n}\n\nfunc (li *LastInfo) UpdateBlockHash(lastBlockHash hash.Hash) {\n\tli.lastBlockHash = lastBlockHash\n}\n\nfunc (li *LastInfo) UpdateCertificate(lastCertificate *certificate.Certificate) {\n\tli.lastCert = lastCertificate\n}\n\nfunc (li *LastInfo) UpdateBlockTime(lastBlockTime time.Time) {\n\tli.lastBlockTime = lastBlockTime\n}\n\nfunc (li *LastInfo) UpdateValidators(vals []*validator.Validator) {\n\tli.lastValidators = vals\n}\n\nfunc (li *LastInfo) RestoreLastInfo(store store.Store, committeeSize int) (\n\tcommittee.Committee, protocol.Version, error,\n) {\n\tlastCert := store.LastCertificate()\n\tlastHeight := lastCert.Height()\n\tlogger.Debug(\"try to restore last state info\", \"height\", lastHeight)\n\tsb, err := store.Block(lastHeight)\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"unable to retrieve block %v: %w\", lastHeight, err)\n\t}\n\n\tlastBlock, err := sb.ToBlock()\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tli.lastCert = lastCert\n\tli.lastSortitionSeed = lastBlock.Header().SortitionSeed()\n\tli.lastBlockHash = lastBlock.Hash()\n\tli.lastBlockTime = lastBlock.Header().Time()\n\n\tcmt, err := li.restoreCommittee(store, lastBlock, committeeSize)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\treturn cmt, lastBlock.Header().Version(), nil\n}\n\nfunc (li *LastInfo) restoreCommittee(store store.Store, lastBlock *block.Block,\n\tcommitteeSize int,\n) (committee.Committee, error) {\n\tjoinedVals := make([]*validator.Validator, 0)\n\tfor _, trx := range lastBlock.Transactions() {\n\t\t// If there is any sortition transaction in the last block,\n\t\t// we should update the last committee.\n\t\tif trx.IsSortitionTx() {\n\t\t\tpld := trx.Payload().(*payload.SortitionPayload)\n\t\t\tval, err := store.Validator(pld.Validator)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unable to retrieve validator %s: %w\", pld.Validator, err)\n\t\t\t}\n\t\t\tjoinedVals = append(joinedVals, val)\n\t\t}\n\t}\n\n\tproposerIndex := -1\n\tcurCommitteeSize := len(li.lastCert.Committers())\n\tvals := make([]*validator.Validator, len(li.lastCert.Committers()))\n\tfor i, num := range li.lastCert.Committers() {\n\t\tval, err := store.ValidatorByNumber(num)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to retrieve committee member %v: %w\", num, err)\n\t\t}\n\t\tif lastBlock.Header().ProposerAddress() == val.Address() {\n\t\t\tproposerIndex = i\n\t\t}\n\t\tvals[i] = val\n\t}\n\tli.lastValidators = vals\n\n\t// First, we restore the previous committee; then, we update it to get the latest committee.\n\tproposerIndex = (proposerIndex + curCommitteeSize -\n\t\t(int(li.lastCert.Round()) % curCommitteeSize)) % curCommitteeSize\n\tcmt, err := committee.NewCommittee(vals, committeeSize, vals[proposerIndex].Address())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to create last committee: %w\", err)\n\t}\n\tcmt.Update(li.lastCert.Round(), joinedVals)\n\n\treturn cmt, nil\n}\n"
  },
  {
    "path": "state/lastinfo/last_info_test.go",
    "content": "package lastinfo\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n// The best way to test this module is by writing test code in the `state.CommitBlock` function\n// to restore the state after each commit.\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tstore    *store.MockStore\n\tlastInfo *LastInfo\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\tmockStore := store.MockingStore(ts)\n\tlastInfo := NewLastInfo()\n\n\trequire.Zero(t, lastInfo.BlockHeight())\n\trequire.Equal(t, hash.UndefHash, lastInfo.BlockHash())\n\n\tpub0, _ := ts.RandBLSKeyPair()\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\tpub3, _ := ts.RandBLSKeyPair()\n\tpub4, prv4 := ts.RandBLSKeyPair()\n\n\tval0 := validator.NewValidator(pub0, 0)\n\tval1 := validator.NewValidator(pub1, 1)\n\tval2 := validator.NewValidator(pub2, 2)\n\tval3 := validator.NewValidator(pub3, 3)\n\tval4 := validator.NewValidator(pub4, 4)\n\n\tval0.AddToStake(100)\n\tval1.AddToStake(100)\n\tval2.AddToStake(100)\n\tval3.AddToStake(100)\n\tval4.AddToStake(100)\n\n\tval0.UpdateLastSortitionHeight(0)\n\tval1.UpdateLastSortitionHeight(0)\n\tval2.UpdateLastSortitionHeight(0)\n\tval3.UpdateLastSortitionHeight(0)\n\tval4.UpdateLastSortitionHeight(100)\n\n\tmockStore.UpdateValidator(val0)\n\tmockStore.UpdateValidator(val1)\n\tmockStore.UpdateValidator(val2)\n\tmockStore.UpdateValidator(val3)\n\tmockStore.UpdateValidator(val4)\n\n\t// Last block\n\tcommitters := []int32{0, 1, 2, 3}\n\ttrx := tx.NewSortitionTx(1, pub4.ValidatorAddress(), ts.RandProof())\n\tts.HelperSignTransaction(prv4, trx)\n\tprevHash := ts.RandHash()\n\tlastHeight := ts.RandHeight()\n\tprevCert := ts.GenerateTestCertificate(lastHeight - 1)\n\tlastSeed := ts.RandSeed()\n\tlastBlock := block.MakeBlock(protocol.ProtocolVersion2, time.Now(), block.Txs{trx},\n\t\tprevHash,\n\t\tts.RandHash(),\n\t\tprevCert, lastSeed, val2.Address())\n\n\tsig := ts.RandBLSSignature()\n\tlastCert := certificate.NewCertificate(lastHeight, 0)\n\tlastCert.SetSignature(committers, []int32{}, sig)\n\tmockStore.SaveBlock(lastBlock, lastCert)\n\tassert.Equal(t, lastHeight, mockStore.LastHeight)\n\n\tlastInfo.UpdateSortitionSeed(lastSeed)\n\tlastInfo.UpdateBlockHash(lastBlock.Hash())\n\tlastInfo.UpdateCertificate(lastCert)\n\tlastInfo.UpdateBlockTime(lastBlock.Header().Time())\n\tlastInfo.UpdateValidators([]*validator.Validator{val0, val1, val2, val3})\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tstore:     mockStore,\n\t\tlastInfo:  lastInfo,\n\t}\n}\n\nfunc TestRestoreCommittee(t *testing.T) {\n\ttd := setup(t)\n\n\tlastInfo := NewLastInfo()\n\n\tcmt, _, err := lastInfo.RestoreLastInfo(td.store, 4)\n\trequire.NoError(t, err)\n\n\tval0, _ := td.store.ValidatorByNumber(0)\n\tval1, _ := td.store.ValidatorByNumber(1)\n\tval2, _ := td.store.ValidatorByNumber(2)\n\tval3, _ := td.store.ValidatorByNumber(3)\n\n\tassert.Equal(t, td.lastInfo.SortitionSeed(), lastInfo.SortitionSeed())\n\tassert.Equal(t, td.lastInfo.BlockHeight(), lastInfo.BlockHeight())\n\tassert.Equal(t, td.lastInfo.BlockHash(), lastInfo.BlockHash())\n\tassert.Equal(t, td.lastInfo.Certificate().Hash(), lastInfo.Certificate().Hash())\n\tassert.Equal(t, td.lastInfo.BlockTime(), lastInfo.BlockTime())\n\tassert.Equal(t, []*validator.Validator{val0, val1, val2, val3}, td.lastInfo.Validators())\n\tassert.Equal(t, []int32{1, 4, 2, 3}, cmt.Committers())\n}\n\nfunc TestRestoreFailed(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Unable to get validator from store\", func(t *testing.T) {\n\t\tsetup(t)\n\n\t\tli := NewLastInfo()\n\n\t\ttd.store.Validators = make(map[crypto.Address]*validator.Validator) // Reset Validators\n\t\t_, _, err := li.RestoreLastInfo(td.store, 4)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Unable to get block from store\", func(t *testing.T) {\n\t\tsetup(t)\n\n\t\tli := NewLastInfo()\n\n\t\ttd.store.Blocks = make(map[types.Height]*block.Block) // Reset Blocks\n\t\t_, _, err := li.RestoreLastInfo(td.store, 4)\n\t\trequire.Error(t, err)\n\t})\n}\n"
  },
  {
    "path": "state/mock.go",
    "content": "package state\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nvar _ Facade = &MockState{}\n\n// MockState is a mock implementation of the State interface for testing.\ntype MockState struct {\n\t// This locks prevents the Data Race in tests\n\tlk sync.RWMutex\n\tts *testsuite.TestSuite\n\n\tTestGenesis   *genesis.Genesis\n\tTestStore     *store.MockStore\n\tMockTxPool    *txpool.MockTxPool\n\tTestCommittee committee.Committee\n\tTestValKeys   []*bls.ValidatorKey\n\tTestParams    *param.Params\n}\n\nfunc MockingState(ts *testsuite.TestSuite) *MockState {\n\tcmt, valKeys := ts.GenerateTestCommittee(21)\n\tgenDoc := genesis.MainnetGenesis()\n\n\treturn &MockState{\n\t\tts:            ts,\n\t\tTestGenesis:   genDoc,\n\t\tTestStore:     store.MockingStore(ts),\n\t\tMockTxPool:    txpool.NewMockTxPool(ts.Ctrl),\n\t\tTestCommittee: cmt,\n\t\tTestValKeys:   valKeys,\n\t\tTestParams:    param.FromGenesis(genDoc),\n\t}\n}\n\nfunc (m *MockState) CommitTestBlocks(num int) {\n\tfor i := 0; i < num; i++ {\n\t\theight := m.TestStore.LastHeight + 1\n\t\tblk, cert := m.ts.GenerateTestBlock(height)\n\n\t\tm.TestStore.SaveBlock(blk, cert)\n\t}\n}\n\nfunc (m *MockState) Genesis() *genesis.Genesis {\n\treturn m.TestGenesis\n}\n\nfunc (m *MockState) LastBlockHeight() types.Height {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.LastHeight\n}\n\nfunc (m *MockState) LastBlockHash() hash.Hash {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.BlockHash(m.TestStore.LastHeight)\n}\n\nfunc (m *MockState) LastBlockTime() time.Time {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\tif len(m.TestStore.Blocks) > 0 {\n\t\treturn m.TestStore.Blocks[m.TestStore.LastHeight].Header().Time()\n\t}\n\n\treturn m.Genesis().GenesisTime()\n}\n\nfunc (m *MockState) LastCertificate() *certificate.Certificate {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.LastCert\n}\n\nfunc (*MockState) UpdateLastCertificate(_ *vote.Vote) error {\n\treturn nil\n}\n\nfunc (m *MockState) CommitBlock(blk *block.Block, cert *certificate.Certificate) error {\n\tm.lk.Lock()\n\tdefer m.lk.Unlock()\n\n\tm.TestStore.SaveBlock(blk, cert)\n\n\treturn nil\n}\n\nfunc (*MockState) Close() {}\n\nfunc (m *MockState) ProposeBlock(valKey *bls.ValidatorKey, _ crypto.Address) (*block.Block, error) {\n\tblk, _ := m.ts.GenerateTestBlock(m.TestStore.LastHeight, testsuite.BlockWithProposer(valKey.Address()))\n\n\treturn blk, nil\n}\n\nfunc (*MockState) ValidateBlock(_ *block.Block, _ types.Round) error {\n\treturn nil\n}\n\nfunc (m *MockState) CommitteeValidators() []*validator.Validator {\n\treturn m.TestCommittee.Validators()\n}\n\nfunc (m *MockState) IsInCommittee(addr crypto.Address) bool {\n\treturn m.TestCommittee.Contains(addr)\n}\n\nfunc (m *MockState) Proposer(round types.Round) *validator.Validator {\n\treturn m.TestCommittee.Proposer(round)\n}\n\nfunc (m *MockState) IsProposer(addr crypto.Address, round types.Round) bool {\n\treturn m.TestCommittee.IsProposer(addr, round)\n}\n\nfunc (m *MockState) IsValidator(addr crypto.Address) bool {\n\treturn m.TestStore.HasValidator(addr)\n}\n\nfunc (m *MockState) CommittedBlock(height types.Height) (*store.CommittedBlock, error) {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.Block(height)\n}\n\nfunc (m *MockState) CommittedTx(txID tx.ID) (*store.CommittedTx, error) {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.Transaction(txID)\n}\n\nfunc (m *MockState) BlockHash(height types.Height) hash.Hash {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.BlockHash(height)\n}\n\nfunc (m *MockState) BlockHeight(h hash.Hash) types.Height {\n\tm.lk.RLock()\n\tdefer m.lk.RUnlock()\n\n\treturn m.TestStore.BlockHeight(h)\n}\n\nfunc (m *MockState) AccountByAddress(addr crypto.Address) (*account.Account, error) {\n\ta, _ := m.TestStore.Account(addr)\n\n\treturn a, nil\n}\n\nfunc (m *MockState) ValidatorAddresses() []crypto.Address {\n\treturn m.TestStore.ValidatorAddresses()\n}\n\nfunc (m *MockState) ValidatorByAddress(addr crypto.Address) (*validator.Validator, error) {\n\tv, _ := m.TestStore.Validator(addr)\n\n\treturn v, nil\n}\n\nfunc (m *MockState) ValidatorByNumber(n int32) (*validator.Validator, error) {\n\tv, _ := m.TestStore.ValidatorByNumber(n)\n\n\treturn v, nil\n}\n\nfunc (m *MockState) PendingTx(txID tx.ID) *tx.Tx {\n\treturn m.MockTxPool.PendingTx(txID)\n}\n\nfunc (m *MockState) AddPendingTx(trx *tx.Tx) error {\n\treturn m.MockTxPool.AppendTx(trx)\n}\n\nfunc (m *MockState) AddPendingTxAndBroadcast(trx *tx.Tx) error {\n\treturn m.MockTxPool.AppendTxAndBroadcast(trx)\n}\n\nfunc (m *MockState) Params() *param.Params {\n\treturn m.TestParams\n}\n\nfunc (m *MockState) CalculateFee(amt amount.Amount, payloadType payload.Type) amount.Amount {\n\treturn m.MockTxPool.EstimatedFee(amt, payloadType)\n}\n\nfunc (m *MockState) PublicKey(addr crypto.Address) (crypto.PublicKey, error) {\n\treturn m.TestStore.PublicKey(addr)\n}\n\nfunc (*MockState) AvailabilityScore(_ int32) float64 {\n\treturn 0.987\n}\n\nfunc (m *MockState) AllPendingTxs() []*tx.Tx {\n\treturn m.MockTxPool.AllPendingTxs()\n}\n\nfunc (m *MockState) UpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version) {\n\tm.TestStore.UpdateValidatorProtocolVersion(addr, ver)\n}\n\nfunc (m *MockState) CommitteeInfo() *CommitteeInfo {\n\treturn &CommitteeInfo{\n\t\tValidators:       m.TestCommittee.Validators(),\n\t\tProtocolVersions: m.TestCommittee.ProtocolVersions(),\n\t\tCommitteePower:   m.TestCommittee.TotalPower(),\n\t}\n}\n\nfunc (m *MockState) ChainInfo() *ChainInfo {\n\treturn &ChainInfo{\n\t\tLastBlockHeight:  m.LastBlockHeight(),\n\t\tLastBlockHash:    m.LastBlockHash(),\n\t\tLastBlockTime:    m.LastBlockTime(),\n\t\tTotalPower:       m.TestCommittee.TotalPower(),\n\t\tCommitteePower:   m.TestCommittee.TotalPower(),\n\t\tCommitteeSize:    m.TestCommittee.Size(),\n\t\tTotalAccounts:    m.TestStore.TotalAccounts(),\n\t\tTotalValidators:  m.TestStore.TotalValidators(),\n\t\tActiveValidators: m.TestStore.ActiveValidators(),\n\t\tAverageScore:     0,\n\t\tIsPruned:         m.TestStore.IsPruned(),\n\t\tPruningHeight:    m.TestStore.PruningHeight(),\n\t}\n}\n\nfunc (*MockState) CheckTransaction(*tx.Tx) error {\n\treturn nil\n}\n"
  },
  {
    "path": "state/param/foundation_mainnet.json",
    "content": "[\n    \"pc1z0k5ctvn02hsxvl9t3d2efnkv2d5k46ayfddzxg\",\n    \"pc1zrv84qnh96pmkg2sykedtz5mlu0q72st2l5c6gg\",\n    \"pc1zuyqdsewxl4leth4rsmzhme2qxwwsvv5qvp6lfl\",\n    \"pc1zslj5zcrsz8f83dn04yd06pjfntn8fqstxusp2q\",\n    \"pc1z4pus6lp0nd35nqvhl0u22aquh6dh5lkq9pkx8t\",\n    \"pc1zpjjm2vjqvcrktsxhr0d4k46u83cv2q4nrtteft\",\n    \"pc1z524hsllxjd25n2mzjew9np9ymwte2mg3kf3jqx\",\n    \"pc1zvnjnprk99wt6jq85saqz8ymc4n8n0utzm9gkq8\",\n    \"pc1zzepy0rdc70eagaj0h9ypvy9nt2y8l3gyav00s8\",\n    \"pc1zr9q4cg8zltkdndc2cadmskvptrftsghgzh8emx\",\n    \"pc1z4zvhmkp4q6pwasea6wc2yp7vvk58wnlcqp7c08\",\n    \"pc1zum42zls02q7hys0gyn0lkk9rhr58jylwkv8xc8\",\n    \"pc1z4zn4z5tqa23qu0lckn0jd0n8r0l3dxynlrv5fc\",\n    \"pc1zu9xnuwppsx57htmhkm8dah4crkv3yxuepuxvts\",\n    \"pc1z9e22jhexznp4v3a5je2f5uhp7u2nnd8528j4u3\",\n    \"pc1zktyzkpld8qjzw9uy32xchssh5ajkp0uhqrhuvx\",\n    \"pc1zxcexp09alrfvdzettn6v7a9c6wxr6tgt7zu23d\",\n    \"pc1z7zgxvg457nsevl30utyhpr5pne6l7vuwmxmu0y\",\n    \"pc1z8vzqyr3rdw0ut89yezfs9rmzd3ju05m7t6ume9\",\n    \"pc1z23mrkftlg6tgfh3y7pw053tlx8k7e8cuq6v4gk\",\n    \"pc1zfwdvv7paddhz3hpj5re4tvqavklc8lcn3laqpj\",\n    \"pc1zs29lv7gxcglsf48k9zx0gewcewh86u05v7q2jd\",\n    \"pc1zzhvnqgklwg9x6kukkg2at5298rqwq7r3zntmcd\",\n    \"pc1zaqt8f58zlwj6ujft8hqtlmgequxlgh53z7m2va\",\n    \"pc1zamglslh02haafxwcnlvtmaqk2q7zy6el3ul8ty\",\n    \"pc1z9cqfp98qzue0wyhv4eqf5sc4rphv9jz066fjkp\",\n    \"pc1ztjzwvxx5hva8f4uneualr7w8rfgnyq2w022y6d\",\n    \"pc1zhefja2m90z82lwg07w2l82g672x9l3gl5cuyd8\",\n    \"pc1z4l6mxwl09rjag99e0hvayj93zagt4m3apt4ydg\",\n    \"pc1zmww5k5xzwzapkg9hwuppvqsmgjgcf7xe8t3skn\",\n    \"pc1zazjcm67d9gcr227s673cmzl049ey7s9eeqntcu\",\n    \"pc1zufm93ys6xe0axcclxlw43c9ygfslggdpqakc4g\",\n    \"pc1znup58n2karq46ulgy64l43znc538h5wnthdnr7\",\n    \"pc1zzekctnhk7unqa6e9gw76q3csmd22r8adzth2h7\",\n    \"pc1zwdrghnnyrymsul52c6lz9g0etn5nr7k76f0e0n\",\n    \"pc1zs2dag7jn8szjq5rau5jacy0fcn2z20wk0xmgtf\",\n    \"pc1zc2mqdajamhsphmaqpcc3htytverdarl99v55my\",\n    \"pc1z2cmlxtyz4yaruggar84kelp2kakma6lt3v2wp5\",\n    \"pc1zg9duch5lavgnrxh8p7e4vw4f4u8v45e0264f4n\",\n    \"pc1zxayue97rjzdwrs6xe3jmzzt43r5m6z7ua0xemf\",\n    \"pc1z2lupx42vt3ydx7gxldg7j2870rxw437zk6g270\",\n    \"pc1z30p2aht7lyxvj0xy0s663q0x8hrf9qz2as2kte\",\n    \"pc1z030a9vkt7nmd5qdk9m8jrgj457degeuy3yes06\",\n    \"pc1z644fc3ftd2d5fj83ppjq0dnnetzp3u3sa4zvdn\",\n    \"pc1z9usnds5wqgmr78dqrf8q8ce9axsj2hpj5yjhcy\",\n    \"pc1zt3mpyy79uf4zu2pdaw09s2cgg3e0plwja0hehz\",\n    \"pc1ze65ate4uxj9jpusfjzezs94peln8h82q4uw3mu\",\n    \"pc1zqs0lv79xlqd68rrqc97lgt9853f2yngrwpmt0p\",\n    \"pc1zxhw5sghlzs44aylqlpg5wzjca63f7y83dpukqp\",\n    \"pc1zakefesc7kdveptfyv7aklxat44r0clk2tmxxmq\",\n    \"pc1zlzws4ellhspcast96f7l6pqtzy762x08th7tgz\",\n    \"pc1z4tdnddwmxeppa3pcaquxhq4rrc5adcx7t3qfj0\",\n    \"pc1zmn43x36e0jcjtqqewxj50n5rjeh8sus7e9ty2j\",\n    \"pc1zn6e3wcg7epkq36eqmupdksy7xtcezlenwhzw4s\",\n    \"pc1ze7fwpmqv0fq3g8c2xsl2tmqh6tsgltpncgyr0j\",\n    \"pc1z8dwn7ewj357624cugsvpcahd9z50qk5u8lv0hu\",\n    \"pc1zzj0hcgywnh9lx3678yfg8362ap2xvw68mwp6px\",\n    \"pc1zq2242trf7w04qp65kz8w4c8vzmnfzv4qkq5nx9\",\n    \"pc1z433apczddfy94agee5du2c7lwgagq0r3qzpwfg\",\n    \"pc1zanv4v6a686g56z4zppw4yfh9tzhr0vu3ex37y4\",\n    \"pc1zw9wy204u2y5mr90ufl6zkqysyxk2mymp947dkd\",\n    \"pc1z6nn9qxzl62c69t0wrd2e6fnf62mdsavvqv7wh9\",\n    \"pc1zk7vz7s0ejk05x2cl7e3z04kjmgwj0lva3jzjuh\",\n    \"pc1zc7h8x3z6etyvmxk04l9h2p5mmpvcmf6wtywvq0\",\n    \"pc1zx6z6ymvl9lud4zes4lelrzzl70cl9tyrx92yp2\",\n    \"pc1zsscy3xneaz6jagmzrnhwccfps7xjauzge8l8pc\",\n    \"pc1zvvfm7l7g670vjsnup3g3z5jajhgdk8zpz6djzs\",\n    \"pc1zl4ryxj2etw9ulv4yst9cm5fwl7g0se7j8hh9fp\",\n    \"pc1zyj4rfns3p7uaat42rpm5hk72frss8uzu63y7ds\",\n    \"pc1zcc9a34x6ckw6jf46e0e5emrcy5kdpvn6ahazlc\",\n    \"pc1zgu6qxesu5ceux0582nf38vp0nmfr6a59qm8wzk\",\n    \"pc1z20p3fkzre4ved2fkuuvfkusr3ejusgx5frt4eh\",\n    \"pc1zqhxs703hhttk8mgjy096uxc98tz20a637alxdd\",\n    \"pc1zqettg2qcm4kejsf39895ua8vau8j4p7j38ws3j\",\n    \"pc1zxz5myr8evp54ces0zfdxz3ftrfx8kyunq504zl\",\n    \"pc1zqtlu57upjzhzpkxdldj4cw8vc847pm7yvezx96\",\n    \"pc1zhg4gc6ezpvndph964p3qd3plzupuf792jk2xxq\",\n    \"pc1z6e4v3q2quj5kxazxck5uv8pczdkusmzquptx47\",\n    \"pc1z67kjqzr02wcwryt3fym0td8ugt7mk7zmmzqm8d\",\n    \"pc1zrqs39vs5l84pk4efplg6qsz5t0q70qejp47qrh\",\n    \"pc1z3d692p24watvepg9hgm8p3f8rr28m5wxct3lhz\",\n    \"pc1zlx8gr05vdrqcttvwhaav6npqpanzcfld8v7zw8\",\n    \"pc1z6ceypvm6r88uqtfm7nqepwlxm03dydwucdzkas\",\n    \"pc1zgqysx75cu8jw6v54pagtgr0qyqen0tvftxydz8\",\n    \"pc1zcvtmzxllvkal3qk2dtk5j8cdkszgtlvqpfwsud\",\n    \"pc1z9hy6mgtpwe8zkfhs9f6pl7rqz29ncq0xylw0qc\",\n    \"pc1z7dteekv7007xzj7evxvjh8kuanfr3klyhkqs35\",\n    \"pc1zv3uvz8taq66hv5rlff77nv06f6a6eww5ydfg8q\",\n    \"pc1z8sne0w5twj6ayexyq9y9t6em0un7u4pdv0ytr7\",\n    \"pc1zevt5r6h35eg70dygsfnffphn8hv4qx39wukvey\",\n    \"pc1zw8zp3mm9f3723unpcfymyjms5uvpl3gp007uwg\",\n    \"pc1zsq02f2ukn63pw4rpywksl75ku3s5kcjzh4p2cg\",\n    \"pc1ztvxet33xzc0h52syujk0jf3wyncwn0ucp56vqy\",\n    \"pc1zakujzs606fk049xvnuts75hll5gmkhzp3xx2gq\",\n    \"pc1zluxwytlxaesa4mdskpjh90mqjuc5uxcsxymvtm\",\n    \"pc1znrjpkruxcmqrwq60zlc67nz5sft7eetf9r4h40\",\n    \"pc1zmy564huaxd4cmzgyujqe55dr3pgsg336pp4m3l\",\n    \"pc1zre6lx6m27g9jsrdxt70a2qrtvsqsmshje9e34m\",\n    \"pc1zphprc83wqy3xpqyequ4andeuuz22t2pdd9whg2\",\n    \"pc1zgqq766nf3782gxvrncv8cvfszdda4ss20y4e7a\"\n]\n"
  },
  {
    "path": "state/param/foundation_testnet.json",
    "content": "[\n    \"tpc1zkkjnu6hqkkedmtlvs7v6y0z6txk7eqhwg5cr38\",\n    \"tpc1zxu54fm05fqg6t5u7j96rl9fthaj3g64yg288nt\",\n    \"tpc1z3n27d7x9xu3l0lss448vytpczdsxgc8j2ltwhf\",\n    \"tpc1z9zsen2expdgpny8xgjsepwaz4mf9y0wrf9ttur\",\n    \"tpc1zngaf3q08vtqe96rydu5ppplvzqyzeu0nv8t97u\",\n    \"tpc1zr5h235l3q6ehktrpjuudxpfl8kt63863zehxva\",\n    \"tpc1z4gd6ansakknll4hkmppg4j3gkyadfpxs802rts\",\n    \"tpc1zj5uvweqwam0230xug4z64uhd8jgf4tzmtu7tqq\",\n    \"tpc1z9rudal827f3550km8s3kny9rtaav8aeq9tzs8m\",\n    \"tpc1ze0vggdekzlsuljtdzwgzhjmsd37pexq6jywv3n\",\n    \"tpc1zahzuun0tds9qm458pkysnkws6nthnqv84zdxxn\",\n    \"tpc1z3krskej32sgqjllwehrds6ztgqt7lz5zj0aspp\",\n    \"tpc1z65ddexykp3sc7rdnpeme38rp3u340hg9lecgr0\",\n    \"tpc1z7fjv0vsg4q0ml67zgkn8dn5zvmjrzjnw92zdmw\",\n    \"tpc1zjsujauvurgm0n46y7396k2eghfcxhfzqxjr5xl\",\n    \"tpc1z52daa8euyx7t73fx5pvmwr2pgvrw2w4lamlmte\",\n    \"tpc1z8us3l07alk4nacftdsf265mg970zdjf4g8c4fp\",\n    \"tpc1zj0tpzsvw23fyzxp3mqfrs7fezydnc5uqe9nxy4\",\n    \"tpc1zcuw2h8geklrskr8s90nyuqdz20cu7rfuy05dkv\",\n    \"tpc1zme9yn5kzd0agre00nekcyvx6v0tpy0yt0nukql\",\n    \"tpc1zuctmks9purfw4qku6k5ncls2kghfh4qdwq24d7\",\n    \"tpc1zm38604zk8r3rv5yjnaz6xwypp93u6qefeld9ay\",\n    \"tpc1zkw32fhnuu83nxa564m6hhn3pdxqess2qfzey3a\",\n    \"tpc1zshqkful8yps6w6ph0ej2yhtgup3tl3jqacw9c5\",\n    \"tpc1z29kxc8zuph7jgxupdyp6l53y5j2vzcp35suvzq\",\n    \"tpc1zndv9zxeuc7xycqfy0qfy5yfd9feca5qu0j3als\",\n    \"tpc1z4gzlyzdc2v44tprynakrnluu9t4a2wxz0dhws9\",\n    \"tpc1zlfm6a6sy8f87cwa0a5sajgcmr75lq0jfw0mk4v\",\n    \"tpc1zd69kgvks9dz32t509fakv3jf9sdmej0see4mut\",\n    \"tpc1zu3efcymqu2efv203fw6jd8stqn8xlhgr74rup9\",\n    \"tpc1zr057yp3cyj7l7hp5lnnka0gzlcdg062dq8v29x\",\n    \"tpc1zmu5afwq9sc9szt733x7nrmdjr50z0lteu6shtl\",\n    \"tpc1zwu7wf0mwgh9sep3zjnuun8fmzu5dl2afevgwdp\",\n    \"tpc1zkrc5m9p9nkmn8tmd7nat5d2fn7zg3qxx2lv06m\",\n    \"tpc1zxjuaau588jqsk7nqplpx9h488nns0wa5ke3clx\",\n    \"tpc1zd8cvnsrk7n0ey3cglyyl6zf9pntllfpayhhq35\",\n    \"tpc1zwayssykgh9c96xm5wnvvxnrqmum73rfat5fag2\",\n    \"tpc1zvcexewgfhetqpptfrlwe7fzvj2vlkh0qdjzmsh\",\n    \"tpc1zgenmk09t0xr55uxvadwxn3d3rvy3vdz3lkhv97\",\n    \"tpc1zawmp27uv9ys3lakrmkuwjszft34yf8rg082eaz\",\n    \"tpc1zyxehwn3ytw2aeu79qhx3uc2p53vlkljg0vl7qv\",\n    \"tpc1z9m6cp6f7hfmxjczm0qgjl48pvdzn2wed383yhj\",\n    \"tpc1zmmdjq90sk796ndr22sxjkydfca09wkdggyua9v\",\n    \"tpc1zgl99cyqe54r3nv6sh9latz7j6yyv0u23teky4r\",\n    \"tpc1zppppga0szm0xmfrx3gjq9q4q07nw368n6djpce\",\n    \"tpc1z0skj2cw84nwpzlcw2h4ksj4njhfcy0fegrwqte\",\n    \"tpc1zl4c0g5cl77h8l0wysd7lmcvjqd4u7zkl549rys\",\n    \"tpc1zlpryhzv4yat30454p8cmefwjsa9smpu6xmkavg\",\n    \"tpc1z3dshr6rqand03h5uzwxgm6c5hum7eu90ct8x3e\",\n    \"tpc1zrt2ps85uukmywyw9e3wvgv2hf0ksp8xxyg45fe\",\n    \"tpc1z6myk3rs8hsvkcm7ydwzwlc2z66zwmw62guzge0\",\n    \"tpc1z08k4fwvjt82xewlrnnxz77860flg4qhsdpuetu\",\n    \"tpc1zpxqky3yqukm79qyz8yz6545qwj2xv75mkhedv6\",\n    \"tpc1zpffh95pgdlh60hkhc4qunrshw5xhndrs6xdcjz\",\n    \"tpc1zcsyffvs8yc32qkcdyjkwuy2t0qjr02cflqcanx\",\n    \"tpc1zstedmhxykve30wd35c5n6stu9pk9wcnkey5jyc\",\n    \"tpc1zc76hgn8c9vtedhw776jd0cv2yxeya2azjeu3p3\",\n    \"tpc1zvsreq53869uywetf84ha5nrs4vg5f3fuvqheup\",\n    \"tpc1z002d7zu4w3r7f9rcdru38eh04nekj7fh45umdn\",\n    \"tpc1zv6f34pe3pdwlf24nvz7nevf8r4f0eun9glstxr\",\n    \"tpc1zq2ll9qmglr3etd4038mfzvazhw0xkz03m3lw5z\",\n    \"tpc1zqwqfykfkzzlr7gcw3z0vkau0vu2j8ezycldefq\",\n    \"tpc1zhly6dlr20x02tqh2zraz2x9l82pq30lpmpaa06\",\n    \"tpc1za6ymx6ud8xtdve5jc3w7st44kwrjtslj43x8dj\",\n    \"tpc1zu8he7z6eq2qdt0dv00l4nvlmjr4eawdh0jemz0\",\n    \"tpc1zem8uevskqn3esy5sewysk2pawrht2t0wshny7d\",\n    \"tpc1zvel9wp8fq8n7yrm0uy3lxvtz6f8cw0ecnafln8\",\n    \"tpc1zagmwzqaxmr5x37ftmjrhzvn33s9lty3yrvkl0w\",\n    \"tpc1zph9vvh9yq049gd9gdladck6r47aweluquzy3g4\",\n    \"tpc1zljvq36a54g7fdx98r9559c425xyy3w9078kxw4\",\n    \"tpc1zgnn4d6fa4rjumn9wgaap0naqwzf4dvh3cxreds\",\n    \"tpc1zku76xy2d52m95rtnrhtelnqeexky3js24mxdw5\",\n    \"tpc1zxactzwcucm882je5hkvwak8u9m6jzdsqmxfd9l\",\n    \"tpc1z8lqsc83p7axv6qddjekm723m2k7r364rp0m8vy\",\n    \"tpc1z0aatm57eqe6yj8zqn6lk4x3rykvdj6dntmcysu\",\n    \"tpc1zqxtfmfjx0qutlhwfvuejmeuzx38v3dh32laaf7\",\n    \"tpc1zfawja200zwymq930m0z3etcpla5axs0k5ardrm\",\n    \"tpc1z3tpez707ekhamury657x4wn5dyfeh4m006aee0\",\n    \"tpc1z890x2mt3gnqeu5hcnej98yngnumjq8lfjt6tj0\",\n    \"tpc1zwh7mnrk703uuaxsgkgdua8rhksy8fvyygenxut\",\n    \"tpc1zulykmttfv8kwesu9pfx7p6ypvzq2m2468cs9us\",\n    \"tpc1zskshqxt6492a9hak2a880l0gd09lnge6ts5p22\",\n    \"tpc1znnxhfd83d2frcf694sh4qx4pgr84ynnz80pwpw\",\n    \"tpc1z8ng6xxw9jgqypxz0gqprc5u8lnd8kay4jg9ka5\",\n    \"tpc1zskln40663ttaj72gj0jamuh79lrgch0pu8ter5\",\n    \"tpc1zwkthy0ujk232ek9ryva5whkf2w2zj7qqeuyv4q\",\n    \"tpc1zrvulzwzv3x7sdc6u5ynffng8rv76f8v8j7whra\",\n    \"tpc1zr0zwwgzdtw7wcsh06qzymm6cvgsfwfgq9mye5a\",\n    \"tpc1zvxjhz9fewhas6vtr23u64mxhf8ht4q9rq2n4xy\",\n    \"tpc1zg0uctnpta9n2knf0vv8tda7tmvn7047t6t0g77\",\n    \"tpc1z5y6qvanklwwegrqcd8w7vc34hs886dsmdlcyed\",\n    \"tpc1zuec2x4t8hv72ymnf0w7aaf5yumq308taje7p02\",\n    \"tpc1zutwaj2xh9c5zzcs0llxunqsfc295r2dz6prm0e\",\n    \"tpc1z9a5rmjysa0qaa5aagt3lv2fu9qdpwdaw8kn45v\",\n    \"tpc1z2pdc6kwxct48l9qnfmjgmj48ss7ndgwkr8ntv3\",\n    \"tpc1zx4lxdnfaar9hrzt0kv6lqw59rv6ev7vzda3yjg\",\n    \"tpc1zjdar58w6gmfu96qgvq22h8yfsk6mwah4u6vssj\",\n    \"tpc1zp63pwuefzj9r6xed8v0he45mwpquk5tjpluk4l\",\n    \"tpc1z4k8m2drc6dqea80rsnj36y8tghn8ap9fskrtnc\",\n    \"tpc1zhvu0tvqczpjx24uwhhzrfmuph7vxurdxpdcnrn\"\n]\n"
  },
  {
    "path": "state/param/param.go",
    "content": "package param\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\n//go:embed foundation_testnet.json\nvar foundationTestnetBytes []byte\n\n//go:embed foundation_mainnet.json\nvar foundationMainnetBytes []byte\n\n// MaxDelegateOwnerRewardShare is the maximum stake-owner share of the block reward\n// under PIP-49 validator delegation (0.7 PAC in nano PAC).\nconst MaxDelegateOwnerRewardShare = amount.Amount(0.7 * amount.NanoPACPerPAC)\n\n// Params is the parameters of the Pactus protocol.\n// These parameters are fixed among all the nodes in the network.\n// TODO: Save them in DB and load them on startng the node.\ntype Params struct {\n\tBlockVersion              protocol.Version\n\tBlockIntervalInSecond     int\n\tMaxTransactionsPerBlock   int\n\tCommitteeSize             int\n\tBlockReward               amount.Amount\n\tTransactionToLiveInterval uint32\n\tBondInterval              uint32\n\tUnbondInterval            uint32\n\tSortitionInterval         uint32\n\tMinimumStake              amount.Amount\n\tMaximumStake              amount.Amount\n\tFoundationReward          amount.Amount\n\tFoundationAddress         []crypto.Address\n}\n\nfunc FromGenesis(genDoc *genesis.Genesis) *Params {\n\tparams := &Params{\n\t\t// genesis parameters\n\t\tBlockVersion:              genDoc.Params().BlockVersion,\n\t\tBlockIntervalInSecond:     genDoc.Params().BlockIntervalInSecond,\n\t\tCommitteeSize:             genDoc.Params().CommitteeSize,\n\t\tBlockReward:               genDoc.Params().BlockReward,\n\t\tTransactionToLiveInterval: genDoc.Params().TransactionToLiveInterval,\n\t\tBondInterval:              genDoc.Params().BondInterval,\n\t\tUnbondInterval:            genDoc.Params().UnbondInterval,\n\t\tSortitionInterval:         genDoc.Params().SortitionInterval,\n\t\tMaximumStake:              genDoc.Params().MaximumStake,\n\t\tMinimumStake:              genDoc.Params().MinimumStake,\n\n\t\t// chain parameters\n\t\tMaxTransactionsPerBlock: 1000,\n\t\tFoundationAddress:       make([]crypto.Address, 0, 100),\n\t\tFoundationReward:        amount.Amount(300_000_000),\n\t}\n\n\tfoundationAddressList := make([]string, 0)\n\tswitch genDoc.ChainType() {\n\tcase genesis.Mainnet:\n\t\tif err := json.Unmarshal(foundationMainnetBytes, &foundationAddressList); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\tcase genesis.Testnet:\n\t\tif err := json.Unmarshal(foundationTestnetBytes, &foundationAddressList); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\tcase genesis.Localnet:\n\t\tfor i := 0; i < 100; i++ {\n\t\t\tbuf := hash.CalcHash([]byte{byte(i)}).Bytes()\n\t\t\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\n\t\t\tfoundationAddressList = append(foundationAddressList, prv.PublicKeyNative().AccountAddress().String())\n\t\t}\n\t}\n\n\tfor _, addrStr := range foundationAddressList {\n\t\taddr, err := crypto.AddressFromString(addrStr)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tparams.FoundationAddress = append(params.FoundationAddress, addr)\n\t}\n\n\treturn params\n}\n\nfunc (p *Params) BlockInterval() time.Duration {\n\treturn time.Duration(p.BlockIntervalInSecond) * time.Second\n}\n"
  },
  {
    "path": "state/score/score.go",
    "content": "package score\n\nimport (\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n)\n\ntype scoreData struct {\n\tinCommittee int // Number of times a validator was in the committee\n\tabsent      int // Number of times a validator was absent from the committee (not voted)\n}\n\ntype Manager struct {\n\tcerts   map[types.Height]*certificate.Certificate\n\tvals    map[int32]*scoreData\n\tmaxCert uint32\n}\n\nfunc NewScoreManager(maxCert uint32) *Manager {\n\treturn &Manager{\n\t\tcerts:   make(map[types.Height]*certificate.Certificate),\n\t\tvals:    make(map[int32]*scoreData),\n\t\tmaxCert: maxCert,\n\t}\n}\n\nfunc (sm *Manager) SetCertificate(cert *certificate.Certificate) {\n\tlastHeight := cert.Height()\n\tsm.certs[lastHeight] = cert\n\n\tfor _, num := range cert.Committers() {\n\t\tdata, ok := sm.vals[num]\n\t\tif !ok {\n\t\t\tdata = new(scoreData)\n\t\t\tsm.vals[num] = data\n\t\t}\n\n\t\tdata.inCommittee++\n\t}\n\n\tfor _, num := range cert.Absentees() {\n\t\tdata := sm.vals[num]\n\t\tsm.vals[num] = data\n\n\t\tdata.absent++\n\t}\n\n\toldHeight := lastHeight.SafeDecrease(sm.maxCert)\n\toldCert, ok := sm.certs[oldHeight]\n\tif ok {\n\t\tfor _, num := range oldCert.Committers() {\n\t\t\tdata := sm.vals[num]\n\t\t\tdata.inCommittee--\n\t\t}\n\n\t\tfor _, num := range oldCert.Absentees() {\n\t\t\tdata := sm.vals[num]\n\t\t\tdata.absent--\n\t\t}\n\n\t\tdelete(sm.certs, oldHeight)\n\t}\n}\n\nfunc (sm *Manager) AvailabilityScore(valNum int32) float64 {\n\tdata, ok := sm.vals[valNum]\n\tif ok {\n\t\tif data.inCommittee == 0 {\n\t\t\treturn 1.0\n\t\t}\n\n\t\treturn 1 - (float64(data.absent) / float64(data.inCommittee))\n\t}\n\n\treturn 1.0\n}\n"
  },
  {
    "path": "state/score/score_test.go",
    "content": "package score\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestScoreManager(t *testing.T) {\n\tmaxCert := uint32(3)\n\tscoreMgr := NewScoreManager(maxCert)\n\n\tcert1 := certificate.NewCertificate(1, 0)\n\tcert1.SetSignature([]int32{0, 1, 2, 3}, []int32{0}, nil)\n\n\tcert2 := certificate.NewCertificate(2, 0)\n\tcert2.SetSignature([]int32{0, 1, 2, 3}, []int32{3}, nil)\n\n\tcert3 := certificate.NewCertificate(3, 0)\n\tcert3.SetSignature([]int32{1, 2, 3, 4}, []int32{2}, nil)\n\n\tcert4 := certificate.NewCertificate(4, 0)\n\tcert4.SetSignature([]int32{1, 2, 3, 4}, []int32{2}, nil)\n\n\tcert5 := certificate.NewCertificate(5, 0)\n\tcert5.SetSignature([]int32{1, 2, 3, 4}, []int32{2}, nil)\n\n\ttests := []struct {\n\t\tcert   *certificate.Certificate\n\t\tscore0 float64\n\t\tscore1 float64\n\t\tscore2 float64\n\t\tscore3 float64\n\t\tscore4 float64\n\t}{\n\t\t{cert1, 0, 1, 1, 1, 1},\n\t\t{cert2, 0.5, 1, 1, 0.5, 1},\n\t\t{cert3, 0.5, 1, 1 - (float64(1) / float64(3)), 1 - (float64(1) / float64(3)), 1},\n\t\t{cert4, 1, 1, 1 - (float64(2) / float64(3)), 1 - (float64(1) / float64(3)), 1},\n\t\t{cert5, 1, 1, 0, 1, 1},\n\t}\n\n\tfor no, tt := range tests {\n\t\tscoreMgr.SetCertificate(tt.cert)\n\n\t\tscore0 := scoreMgr.AvailabilityScore(0)\n\t\tassert.InDelta(t, tt.score0, score0, 0.00001, \"#%v: invalid score0, expected %v, got %v\",\n\t\t\tno, tt.score0, score0)\n\n\t\tscore1 := scoreMgr.AvailabilityScore(1)\n\t\tassert.InDelta(t, tt.score1, score1, 0.00001, \"#%v: invalid score1, expected %v, got %v\",\n\t\t\tno, tt.score1, score1)\n\n\t\tscore2 := scoreMgr.AvailabilityScore(2)\n\t\tassert.InDelta(t, tt.score2, score2, 0.00001, \"#%v: invalid score2, expected %v, got %v\",\n\t\t\tno, tt.score2, score2)\n\n\t\tscore3 := scoreMgr.AvailabilityScore(3)\n\t\tassert.InDelta(t, tt.score3, score3, 0.00001, \"#%v: invalid score3, expected %v, got %v\",\n\t\t\tno, tt.score3, score3)\n\n\t\tscore4 := scoreMgr.AvailabilityScore(4)\n\t\tassert.InDelta(t, tt.score4, score4, 0.00001, \"#%v: invalid score4, expected %v, got %v\",\n\t\t\tno, tt.score4, score4)\n\t}\n}\n"
  },
  {
    "path": "state/state.go",
    "content": "package state\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"slices\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/execution\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/state/lastinfo\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/state/score\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/persistentmerkle\"\n\t\"github.com/pactus-project/pactus/util/simplemerkle\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\ntype state struct {\n\tlk sync.RWMutex\n\n\tvalKeys         []*bls.ValidatorKey\n\tgenDoc          *genesis.Genesis\n\tstore           store.Store\n\tparams          *param.Params\n\ttxPool          txpool.TxPool\n\tcommittee       committee.Committee\n\ttotalPower      int64\n\tlastInfo        *lastinfo.LastInfo\n\taccountMerkle   *persistentmerkle.Tree\n\tvalidatorMerkle *persistentmerkle.Tree\n\tscoreMgr        *score.Manager\n\tlogger          *logger.SubLogger\n\teventPipe       pipeline.Pipeline[any]\n}\n\nfunc LoadOrNewState(\n\tgenDoc *genesis.Genesis,\n\tvalKeys []*bls.ValidatorKey,\n\tstore store.Store,\n\ttxPool txpool.TxPool,\n\teventPipe pipeline.Pipeline[any],\n) (Facade, error) {\n\tstate := &state{\n\t\tvalKeys:         valKeys,\n\t\tgenDoc:          genDoc,\n\t\ttxPool:          txPool,\n\t\tparams:          param.FromGenesis(genDoc),\n\t\tstore:           store,\n\t\tlastInfo:        lastinfo.NewLastInfo(),\n\t\taccountMerkle:   persistentmerkle.New(),\n\t\tvalidatorMerkle: persistentmerkle.New(),\n\t\teventPipe:       eventPipe,\n\t}\n\tstate.logger = logger.NewSubLogger(\"_state\", state)\n\tstate.store = store\n\n\t// If there is no certificate, we are at the genesis height.\n\t// Only the genesis block has no certificate.\n\tif store.LastCertificate() == nil {\n\t\t// Initialize the state at genesis.\n\t\terr := state.makeGenesisState(genDoc)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\t// Otherwise, try to restore the last known state.\n\t\terr := state.tryLoadLastInfo()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tstate.totalPower = state.retrieveTotalPower()\n\n\tstate.loadMerkels()\n\n\ttxPool.SetNewSandboxAndRecheck(state.concreteSandbox())\n\n\t// Restoring score manager\n\tstate.logger.Info(\"calculating the availability scores...\")\n\tscoreWindow := uint32(60000)\n\tstartHeight := types.Height(2)\n\tendHeight := state.lastInfo.BlockHeight()\n\tif uint32(endHeight) > scoreWindow {\n\t\tstartHeight = endHeight.SafeDecrease(scoreWindow)\n\t}\n\n\tscoreMgr := score.NewScoreManager(scoreWindow)\n\tfor h := startHeight; h <= endHeight; h++ {\n\t\tcBlk, err := state.store.Block(h)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// This code decodes the block certificate from the block data\n\t\t// without decoding the header and transactions.\n\t\tr := bytes.NewReader(cBlk.Data[138:]) // Block header is 138 bytes\n\t\tcert := new(certificate.Certificate)\n\t\terr = cert.Decode(r)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tscoreMgr.SetCertificate(cert)\n\t}\n\tstate.scoreMgr = scoreMgr\n\n\tfor _, num := range state.committee.Committers() {\n\t\tstate.logger.Debug(\"availability score\", \"val\", num, \"score\", state.scoreMgr.AvailabilityScore(num))\n\t}\n\n\t// Set ProtocolVersion for own validators.\n\tfor _, key := range valKeys {\n\t\tval, _ := store.Validator(key.Address())\n\t\tif val == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tstore.UpdateValidatorProtocolVersion(val.Address(), version.NodeAgent.ProtocolVersion)\n\t}\n\n\tstate.logger.Debug(\"last info\", \"committers\", state.committee.Committers(), \"state_root\", state.stateRoot())\n\n\treturn state, nil\n}\n\nfunc (st *state) concreteSandbox() sandbox.Sandbox {\n\treturn sandbox.NewSandbox(st.lastInfo.BlockHeight(),\n\t\tst.store, st.params, st.committee, st.totalPower,\n\t\tst.genDoc.ChainType().IsMainnet())\n}\n\nfunc (st *state) tryLoadLastInfo() error {\n\tlogger.Debug(\"try to restore the last state\")\n\tcommitteeInstance, blockVersion, err := st.lastInfo.RestoreLastInfo(st.store, st.params.CommitteeSize)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tst.committee = committeeInstance\n\tst.params.BlockVersion = blockVersion\n\n\tlogger.Info(\"last state restored\",\n\t\t\"last height\", st.lastInfo.BlockHeight(),\n\t\t\"last block time\", st.lastInfo.BlockTime())\n\n\treturn nil\n}\n\nfunc (st *state) makeGenesisState(genDoc *genesis.Genesis) error {\n\taccs := genDoc.Accounts()\n\tfor addr, acc := range accs {\n\t\tst.store.UpdateAccount(addr, acc)\n\t}\n\n\tvals := genDoc.Validators()\n\tfor _, val := range vals {\n\t\tst.store.UpdateValidator(val)\n\t}\n\n\terr := st.store.WriteBatch()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcmt, err := committee.NewCommittee(vals, st.params.CommitteeSize, vals[0].Address())\n\tif err != nil {\n\t\treturn err\n\t}\n\tst.committee = cmt\n\tst.lastInfo.UpdateBlockTime(genDoc.GenesisTime())\n\n\treturn nil\n}\n\nfunc (st *state) loadMerkels() {\n\tst.store.IterateAccounts(func(_ crypto.Address, acc *account.Account) bool {\n\t\tst.accountMerkle.SetHash(acc.Number(), acc.Hash())\n\n\t\treturn false\n\t})\n\n\tst.store.IterateValidators(func(val *validator.Validator) bool {\n\t\tst.validatorMerkle.SetHash(val.Number(), val.Hash())\n\n\t\treturn false\n\t})\n}\n\nfunc (st *state) retrieveTotalPower() int64 {\n\ttotalPower := int64(0)\n\tst.store.IterateValidators(func(val *validator.Validator) bool {\n\t\ttotalPower += val.Power()\n\n\t\treturn false\n\t})\n\n\treturn totalPower\n}\n\nfunc (st *state) stateRoot() hash.Hash {\n\taccRoot := st.accountMerkle.Root()\n\tvalRoot := st.validatorMerkle.Root()\n\n\tstateRoot := simplemerkle.HashMerkleBranches(&accRoot, &valRoot)\n\n\treturn *stateRoot\n}\n\nfunc (st *state) Close() {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\tst.store.Close()\n}\n\nfunc (st *state) Genesis() *genesis.Genesis {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.genDoc\n}\n\nfunc (st *state) LastBlockHeight() types.Height {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.lastInfo.BlockHeight()\n}\n\nfunc (st *state) LastBlockHash() hash.Hash {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.lastInfo.BlockHash()\n}\n\nfunc (st *state) LastBlockTime() time.Time {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.lastInfo.BlockTime()\n}\n\nfunc (st *state) LastCertificate() *certificate.Certificate {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.lastInfo.Certificate()\n}\n\nfunc (st *state) UpdateLastCertificate(vte *vote.Vote) error {\n\tst.lk.Lock()\n\tdefer st.lk.Unlock()\n\n\tlastCert := st.lastInfo.Certificate()\n\tif vte.Type() != vote.VoteTypePrecommit ||\n\t\tvte.Height() != lastCert.Height() ||\n\t\tvte.Round() != lastCert.Round() {\n\t\treturn InvalidVoteForCertificateError{\n\t\t\tVote: vte,\n\t\t}\n\t}\n\n\tval, err := st.store.Validator(vte.Signer())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !slices.Contains(lastCert.Absentees(), val.Number()) {\n\t\treturn InvalidVoteForCertificateError{\n\t\t\tVote: vte,\n\t\t}\n\t}\n\n\terr = vte.Verify(val.PublicKey())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// prevent race condition\n\tcloneLastCert := lastCert.Clone()\n\n\tcloneLastCert.AddSignature(val.Number(), vte.Signature())\n\tst.lastInfo.UpdateCertificate(cloneLastCert)\n\n\tst.logger.Debug(\"certificate updated\", \"validator\", val.Address(), \"power\", val.Power())\n\n\treturn nil\n}\n\nfunc (st *state) createSubsidyTx(valAddr, rewardAddr crypto.Address, accumulatedFee amount.Amount) *tx.Tx {\n\tlockTime := st.lastInfo.BlockHeight() + 1\n\n\taddressIndex := int(lockTime) % len(st.params.FoundationAddress)\n\tfoundationAddress := st.params.FoundationAddress[addressIndex]\n\trecipients := make([]payload.BatchRecipient, 0, 3)\n\trecipients = append(recipients, payload.BatchRecipient{\n\t\tTo:     foundationAddress,\n\t\tAmount: st.params.FoundationReward,\n\t})\n\n\tval, _ := st.store.Validator(valAddr)\n\n\tif val.IsDelegated() {\n\t\t// Base on PIP-49, the maximum delegate share is 0.7 PAC.\n\t\t// If the delegate share is equal to 0 PAC, the delegate owner should not receive any reward.\n\t\t// If the delegate share is equal to 0.7 PAC, the delegate owner receives\n\t\t// all the remaining reward, and transaction fee.\n\n\t\tdlgOwnerAddr := val.DelegateOwner()\n\t\tdlgOwnerShare := val.DelegateShare()\n\n\t\tif dlgOwnerShare > 0 {\n\t\t\tamount := dlgOwnerShare\n\t\t\tif dlgOwnerShare == param.MaxDelegateOwnerRewardShare {\n\t\t\t\tamount += accumulatedFee\n\t\t\t}\n\t\t\trecipients = append(recipients,\n\t\t\t\tpayload.BatchRecipient{\n\t\t\t\t\tTo:     dlgOwnerAddr,\n\t\t\t\t\tAmount: amount,\n\t\t\t\t})\n\t\t}\n\n\t\tif dlgOwnerShare < param.MaxDelegateOwnerRewardShare {\n\t\t\trecipients = append(recipients,\n\t\t\t\tpayload.BatchRecipient{\n\t\t\t\t\tTo:     rewardAddr,\n\t\t\t\t\tAmount: st.params.BlockReward + accumulatedFee - st.params.FoundationReward - dlgOwnerShare,\n\t\t\t\t})\n\t\t}\n\t} else {\n\t\trecipients = append(recipients,\n\t\t\tpayload.BatchRecipient{\n\t\t\t\tTo:     rewardAddr,\n\t\t\t\tAmount: st.params.BlockReward + accumulatedFee - st.params.FoundationReward,\n\t\t\t})\n\t}\n\n\treturn tx.NewSubsidyTx(lockTime, recipients)\n}\n\nfunc (st *state) ProposeBlock(valKey *bls.ValidatorKey, rewardAddr crypto.Address) (*block.Block, error) {\n\tst.lk.Lock()\n\tdefer st.lk.Unlock()\n\n\t// Create new sandbox and execute transactions\n\tsbx := st.concreteSandbox()\n\n\t// Re-check all transactions strictly and remove invalid ones\n\ttxs := st.txPool.PrepareBlockTransactions()\n\ttxs = util.Trim(txs, st.params.MaxTransactionsPerBlock-1)\n\tfor i := 0; i < txs.Len(); i++ {\n\t\t// Only one subsidy transaction per block\n\t\tif txs[i].IsSubsidyTx() {\n\t\t\tst.logger.Error(\"found duplicated subsidy transaction\", \"tx\", txs[i])\n\t\t\ttxs.Remove(i)\n\t\t\ti--\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := execution.CheckAndExecute(txs[i], sbx, true); err != nil {\n\t\t\tst.logger.Debug(\"found invalid transaction\", \"tx\", txs[i], \"error\", err)\n\t\t\ttxs.Remove(i)\n\t\t\ti--\n\t\t}\n\t}\n\n\tvalAddr := valKey.Address()\n\tsubsidyTx := st.createSubsidyTx(valAddr, rewardAddr, sbx.AccumulatedFee())\n\ttxs.Prepend(subsidyTx)\n\tprevSeed := st.lastInfo.SortitionSeed()\n\n\tblk := block.MakeBlock(\n\t\tst.params.BlockVersion,\n\t\tst.proposeNextBlockTime(),\n\t\ttxs,\n\t\tst.lastInfo.BlockHash(),\n\t\tst.stateRoot(),\n\t\tst.lastInfo.Certificate(),\n\t\tprevSeed.GenerateNext(valKey.PrivateKey()),\n\t\tvalAddr)\n\n\treturn blk, nil\n}\n\nfunc (st *state) ValidateBlock(blk *block.Block, round types.Round) error {\n\tst.lk.Lock()\n\tdefer st.lk.Unlock()\n\n\tif err := st.validateBlock(blk, round); err != nil {\n\t\treturn err\n\t}\n\n\tt := blk.Header().Time()\n\tif err := st.validateBlockTime(t); err != nil {\n\t\treturn err\n\t}\n\n\tsb := st.concreteSandbox()\n\n\treturn st.executeBlock(blk, sb, true)\n}\n\nfunc (st *state) CommitBlock(blk *block.Block, cert *certificate.Certificate) error {\n\tst.lk.Lock()\n\tdefer st.lk.Unlock()\n\n\theight := cert.Height()\n\tif height != st.lastInfo.BlockHeight()+1 {\n\t\tst.logger.Debug(\"block is committed before\", \"height\", height)\n\n\t\treturn nil\n\t}\n\n\terr := st.validateCurCertificate(cert, blk.Hash())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// There are two modules that can commit a block: Consensus and Sync.\n\t// The Consensus engine is ours, we have full control over that, and we know when\n\t// and why a block should be committed.\n\t// On the other hand, Sync module receives new blocks from the network and\n\t// tries to commit them.\n\t// We should never have a fork in our blockchain.\n\t// But if it happens, here we can catch it.\n\tif blk.Header().PrevBlockHash() != st.lastInfo.BlockHash() {\n\t\tst.logger.Panic(\"a possible fork is detected\",\n\t\t\t\"our hash\", st.lastInfo.BlockHash(),\n\t\t\t\"block hash\", blk.Header().PrevBlockHash())\n\t}\n\n\terr = st.validateBlock(blk, cert.Round())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// -----------------------------------\n\t// Execute block\n\tsbx := st.concreteSandbox()\n\tif err := st.executeBlock(blk, sbx, false); err != nil {\n\t\treturn err\n\t}\n\n\t// -----------------------------------\n\t// Commit block\n\tst.lastInfo.UpdateBlockHash(blk.Hash())\n\tst.lastInfo.UpdateBlockTime(blk.Header().Time())\n\tst.lastInfo.UpdateSortitionSeed(blk.Header().SortitionSeed())\n\tst.lastInfo.UpdateCertificate(cert)\n\tst.lastInfo.UpdateValidators(st.committee.Validators())\n\n\t// Commit and update the committee\n\tst.commitSandbox(sbx, cert.Round())\n\n\tst.store.SaveBlock(blk, cert)\n\n\tif err := st.store.WriteBatch(); err != nil {\n\t\tst.logger.Panic(\"unable to update state\", \"error\", err)\n\t}\n\n\t// Remove transactions from pool and update consumption\n\tst.txPool.HandleCommittedBlock(blk)\n\n\tst.logger.Info(\"new block committed\", \"block\", blk, \"round\", cert.Round())\n\n\tst.evaluateSortition()\n\n\t// -----------------------------------\n\t// At this point we can assign a new sandbox to tx pool\n\tst.txPool.SetNewSandboxAndRecheck(st.concreteSandbox())\n\n\t// -----------------------------------\n\t// Updating the score manager:\n\t// This code updates the availability scores.\n\t// To enhance syncing process, only blocks with timestamps from the last 10 days are considered.\n\tif blk.Header().Time().After(time.Now().AddDate(0, 0, -10)) {\n\t\tprevCert := blk.PrevCertificate()\n\t\tif prevCert != nil {\n\t\t\tst.scoreMgr.SetCertificate(prevCert)\n\t\t}\n\t}\n\n\t// publish committed block to event channel zeromq\n\tst.publishEvent(blk)\n\n\treturn nil\n}\n\nfunc (st *state) evaluateSortition() bool {\n\tevaluated := false\n\tfor _, key := range st.valKeys {\n\t\tval, _ := st.store.Validator(key.Address())\n\t\tif val == nil {\n\t\t\t// We are not a validator\n\t\t\tcontinue\n\t\t}\n\n\t\tif st.lastInfo.BlockHeight().SafeSub(val.LastBondingHeight()) < st.params.BondInterval {\n\t\t\t// Bonding period\n\t\t\tcontinue\n\t\t}\n\n\t\tif val.IsUnbonded() {\n\t\t\t// we have Unbonded\n\t\t\tcontinue\n\t\t}\n\n\t\tok, proof := sortition.EvaluateSortition(st.lastInfo.SortitionSeed(),\n\t\t\tkey.PrivateKey(), st.totalPower, int64(val.Stake()))\n\t\tif ok {\n\t\t\ttrx := tx.NewSortitionTx(st.lastInfo.BlockHeight(), val.Address(), proof)\n\t\t\tsig := key.Sign(trx.SignBytes())\n\t\t\ttrx.SetSignature(sig)\n\t\t\ttrx.SetPublicKey(key.PublicKey())\n\n\t\t\terr := st.txPool.AppendTxAndBroadcast(trx)\n\t\t\tif err == nil {\n\t\t\t\tst.logger.Info(\"sortition transaction broadcasted\",\n\t\t\t\t\t\"address\", key.Address(), \"power\", val.Power(), \"tx\", trx)\n\n\t\t\t\tevaluated = true\n\t\t\t} else {\n\t\t\t\tst.logger.Error(\"our sortition transaction is invalid!\",\n\t\t\t\t\t\"address\", key.Address(), \"power\", val.Power(), \"tx\", trx, \"error\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn evaluated\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (st *state) LogString() string {\n\treturn fmt.Sprintf(\"{#%d ⌘ %v 🕣 %v}\",\n\t\tst.lastInfo.BlockHeight(),\n\t\tst.lastInfo.BlockHash().LogString(),\n\t\tst.lastInfo.BlockTime().Format(\"15.04.05\"))\n}\n\nfunc (st *state) commitSandbox(sbx sandbox.Sandbox, round types.Round) {\n\tjoiningCommittee := make([]*validator.Validator, 0)\n\tsbx.IterateValidators(func(val *validator.Validator, _ bool, joined bool) {\n\t\tif joined {\n\t\t\tst.logger.Debug(\"new validator joined\", \"address\", val.Address(), \"power\", val.Power())\n\n\t\t\tjoiningCommittee = append(joiningCommittee, val)\n\t\t}\n\t})\n\tst.committee.Update(round, joiningCommittee)\n\n\tsbx.IterateAccounts(func(addr crypto.Address, acc *account.Account, updated bool) {\n\t\tif updated {\n\t\t\tst.store.UpdateAccount(addr, acc)\n\t\t\tst.accountMerkle.SetHash(acc.Number(), acc.Hash())\n\t\t}\n\t})\n\n\tsbx.IterateValidators(func(val *validator.Validator, updated bool, _ bool) {\n\t\tif updated {\n\t\t\tst.store.UpdateValidator(val)\n\t\t\tst.validatorMerkle.SetHash(val.Number(), val.Hash())\n\t\t}\n\t})\n\n\tst.totalPower += sbx.PowerDelta()\n}\n\nfunc (st *state) validateBlockTime(blockTime time.Time) error {\n\tif blockTime.Second()%st.params.BlockIntervalInSecond != 0 {\n\t\treturn InvalidBlockTimeError{\n\t\t\tReason: fmt.Sprintf(\"block time (%s) is not rounded\",\n\t\t\t\tblockTime.String()),\n\t\t}\n\t}\n\tif blockTime.Before(st.lastInfo.BlockTime()) {\n\t\treturn InvalidBlockTimeError{\n\t\t\tReason: fmt.Sprintf(\"block time (%s) is before the last block time (%s)\",\n\t\t\t\tblockTime.String(), st.lastInfo.BlockTime()),\n\t\t}\n\t}\n\tif blockTime.Equal(st.lastInfo.BlockTime()) {\n\t\treturn InvalidBlockTimeError{\n\t\t\tReason: fmt.Sprintf(\"block time (%s) is same as the last block time\",\n\t\t\t\tblockTime.String()),\n\t\t}\n\t}\n\tproposeTime := st.proposeNextBlockTime()\n\tthreshold := st.params.BlockInterval()\n\tif blockTime.After(proposeTime.Add(threshold)) {\n\t\treturn InvalidBlockTimeError{\n\t\t\tReason: fmt.Sprintf(\"block time (%s) is more than threshold (%s)\",\n\t\t\t\tblockTime.String(), proposeTime.String()),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (st *state) proposeNextBlockTime() time.Time {\n\ttimestamp := st.lastInfo.BlockTime().Add(st.params.BlockInterval())\n\n\tnow := time.Now()\n\tif now.After(timestamp.Add(10 * time.Second)) {\n\t\tst.logger.Debug(\"it looks the last block had delay\", \"delay\", now.Sub(timestamp))\n\t\ttimestamp = util.RoundNow(st.params.BlockIntervalInSecond)\n\t}\n\n\treturn timestamp\n}\n\nfunc (st *state) CommitteeValidators() []*validator.Validator {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.committee.Validators()\n}\n\nfunc (st *state) IsInCommittee(addr crypto.Address) bool {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.committee.Contains(addr)\n}\n\nfunc (st *state) Proposer(round types.Round) *validator.Validator {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.committee.Proposer(round)\n}\n\nfunc (st *state) IsProposer(addr crypto.Address, round types.Round) bool {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.committee.IsProposer(addr, round)\n}\n\nfunc (st *state) CommittedBlock(height types.Height) (*store.CommittedBlock, error) {\n\treturn st.store.Block(height)\n}\n\nfunc (st *state) CommittedTx(txID tx.ID) (*store.CommittedTx, error) {\n\treturn st.store.Transaction(txID)\n}\n\nfunc (st *state) BlockHash(height types.Height) hash.Hash {\n\treturn st.store.BlockHash(height)\n}\n\nfunc (st *state) BlockHeight(h hash.Hash) types.Height {\n\treturn st.store.BlockHeight(h)\n}\n\nfunc (st *state) AccountByAddress(addr crypto.Address) (*account.Account, error) {\n\treturn st.store.Account(addr)\n}\n\nfunc (st *state) ValidatorAddresses() []crypto.Address {\n\treturn st.store.ValidatorAddresses()\n}\n\nfunc (st *state) ValidatorByAddress(addr crypto.Address) (*validator.Validator, error) {\n\treturn st.store.Validator(addr)\n}\n\n// ValidatorByNumber returns validator data based on validator number.\nfunc (st *state) ValidatorByNumber(n int32) (*validator.Validator, error) {\n\treturn st.store.ValidatorByNumber(n)\n}\n\nfunc (st *state) PendingTx(txID tx.ID) *tx.Tx {\n\treturn st.txPool.PendingTx(txID)\n}\n\nfunc (st *state) AddPendingTx(trx *tx.Tx) error {\n\treturn st.txPool.AppendTx(trx)\n}\n\nfunc (st *state) AddPendingTxAndBroadcast(trx *tx.Tx) error {\n\treturn st.txPool.AppendTxAndBroadcast(trx)\n}\n\nfunc (st *state) Params() *param.Params {\n\treturn st.params\n}\n\nfunc (st *state) CalculateFee(amt amount.Amount, payloadType payload.Type) amount.Amount {\n\treturn st.txPool.EstimatedFee(amt, payloadType)\n}\n\nfunc (st *state) PublicKey(addr crypto.Address) (crypto.PublicKey, error) {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.store.PublicKey(addr)\n}\n\nfunc (st *state) AvailabilityScore(valNum int32) float64 {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.scoreMgr.AvailabilityScore(valNum)\n}\n\nfunc (st *state) AllPendingTxs() []*tx.Tx {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn st.txPool.AllPendingTxs()\n}\n\nfunc (st *state) publishEvent(msg any) {\n\tst.eventPipe.Send(msg)\n}\n\nfunc (st *state) UpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version) {\n\tst.store.UpdateValidatorProtocolVersion(addr, ver)\n}\n\nfunc (st *state) CommitteeInfo() *CommitteeInfo {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn &CommitteeInfo{\n\t\tValidators:       st.committee.Validators(),\n\t\tProtocolVersions: st.committee.ProtocolVersions(),\n\t\tCommitteePower:   st.committee.TotalPower(),\n\t}\n}\n\nfunc (st *state) ChainInfo() *ChainInfo {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn &ChainInfo{\n\t\tLastBlockHeight:  st.lastInfo.BlockHeight(),\n\t\tLastBlockHash:    st.lastInfo.BlockHash(),\n\t\tLastBlockTime:    st.lastInfo.BlockTime(),\n\t\tTotalPower:       st.totalPower,\n\t\tCommitteePower:   st.committee.TotalPower(),\n\t\tCommitteeSize:    st.committee.Size(),\n\t\tTotalAccounts:    st.store.TotalAccounts(),\n\t\tTotalValidators:  st.store.TotalValidators(),\n\t\tActiveValidators: st.store.ActiveValidators(),\n\t\tAverageScore:     st.calculateAverageScore(),\n\t\tIsPruned:         st.store.IsPruned(),\n\t\tPruningHeight:    st.store.PruningHeight(),\n\t}\n}\n\nfunc (st *state) calculateAverageScore() float64 {\n\ttotalScore := 0.0\n\ttotalWithStake := 0.0\n\tfor _, key := range st.valKeys {\n\t\tval, _ := st.store.Validator(key.Address())\n\t\tif val == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif !val.IsActive() {\n\t\t\tcontinue\n\t\t}\n\n\t\ttotalScore += st.scoreMgr.AvailabilityScore(val.Number())\n\t\ttotalWithStake++\n\t}\n\n\taverageScore := 0.0\n\tif totalWithStake > 0 {\n\t\taverageScore = (totalScore / totalWithStake) * 100\n\t}\n\n\treturn averageScore\n}\n\nfunc (st *state) CheckTransaction(trx *tx.Tx) error {\n\tst.lk.RLock()\n\tdefer st.lk.RUnlock()\n\n\treturn execution.CheckAndExecute(trx, st.concreteSandbox(), false)\n}\n"
  },
  {
    "path": "state/state_test.go",
    "content": "package state\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n\t\"golang.org/x/exp/slices\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tstate      *state\n\tmockTxPool *txpool.MockTxPool\n\tgenValKeys []*bls.ValidatorKey\n\tgenAccKey  *ed25519.PrivateKey\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tgenValNum := 4\n\tgenValKeys := make([]*bls.ValidatorKey, 0, genValNum)\n\tgenVals := make([]*validator.Validator, 0, genValNum)\n\tfor i := 0; i < genValNum; i++ {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), int32(i))\n\n\t\tgenValKeys = append(genValKeys, valKey)\n\t\tgenVals = append(genVals, val)\n\t}\n\n\tnumBlocks := ts.RandHeight(\n\t\ttestsuite.HeightWithMin(1),\n\t\ttestsuite.HeightWithMax(10))\n\tmockTxPool := txpool.NewMockTxPool(ts.Ctrl)\n\tmockTxPool.EXPECT().SetNewSandboxAndRecheck(gomock.Any()).Return().AnyTimes()\n\tmockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(int(numBlocks))\n\tmockTxPool.EXPECT().HandleCommittedBlock(gomock.Any()).Return().AnyTimes()\n\n\tmockStore := store.MockingStore(ts)\n\n\tgenTime := util.RoundNow(10).Add(-8640 * time.Second)\n\n\tgenParams := genesis.DefaultGenesisParams()\n\tgenParams.CommitteeSize = 7\n\tgenParams.BondInterval = 10\n\tgenParams.BlockVersion = protocol.ProtocolVersion3\n\n\tgenAcc1 := account.NewAccount(0)\n\tgenAcc1.AddToBalance(21 * 1e15) // 21,000,000.000,000,000\n\tgenAcc2 := account.NewAccount(1)\n\tgenAcc2.AddToBalance(21 * 1e15) // 21,000,000.000,000,000\n\tgenAccPubKey, genAccPrvKey := ts.RandEd25519KeyPair()\n\n\tgenAccs := map[crypto.Address]*account.Account{\n\t\tcrypto.TreasuryAddress:        genAcc1,\n\t\tgenAccPubKey.AccountAddress(): genAcc2,\n\t}\n\n\tgnDoc := genesis.MakeGenesis(genTime, genAccs, genVals, genParams)\n\n\t// First validator is in the committee\n\tvalKeys := []*bls.ValidatorKey{genValKeys[0], ts.RandValKey()}\n\teventPipe := pipeline.New[any](t.Context())\n\tst1, err := LoadOrNewState(gnDoc, valKeys, mockStore, mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\n\tstate, _ := st1.(*state)\n\n\ttd := &testData{\n\t\tTestSuite:  ts,\n\t\tstate:      state,\n\t\tmockTxPool: mockTxPool,\n\t\tgenValKeys: genValKeys,\n\t\tgenAccKey:  genAccPrvKey,\n\t}\n\n\ttd.commitBlocks(t, numBlocks)\n\n\treturn td\n}\n\nfunc (td *testData) proposerKey(t *testing.T, round types.Round) *bls.ValidatorKey {\n\tt.Helper()\n\n\tblockProposer := td.state.Proposer(round)\n\tvalKeyIndex := slices.IndexFunc(td.genValKeys, func(e *bls.ValidatorKey) bool {\n\t\treturn e.Address() == blockProposer.Address()\n\t})\n\n\treturn td.genValKeys[valKeyIndex]\n}\n\nfunc (td *testData) makeBlockAndCertificate(t *testing.T, round types.Round) (\n\t*block.Block, *certificate.Certificate,\n) {\n\tt.Helper()\n\n\tvalKey := td.proposerKey(t, round)\n\tblk, _ := td.state.ProposeBlock(valKey, td.RandAccAddress())\n\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\n\treturn blk, cert\n}\n\nfunc (td *testData) makeCertificateAndSign(t *testing.T, blockHash hash.Hash,\n\tround types.Round,\n) *certificate.Certificate {\n\tt.Helper()\n\n\tsigs := make([]*bls.Signature, 0, len(td.genValKeys))\n\theight := td.state.LastBlockHeight()\n\tcert := certificate.NewCertificate(height+1, round)\n\tsignBytes := cert.SignBytesPrecommit(blockHash)\n\tcommitters := []int32{0, 1, 2, 3}\n\tabsentees := []int32{3}\n\n\tfor _, key := range td.genValKeys[:len(td.genValKeys)-1] {\n\t\tsig := key.Sign(signBytes)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\taggSig, _ := bls.SignatureAggregate(sigs...)\n\tcert.SetSignature(committers, absentees, aggSig)\n\n\treturn cert\n}\n\nfunc (td *testData) commitBlocks(t *testing.T, count types.Height) {\n\tt.Helper()\n\n\tfor i := types.Height(0); i < count; i++ {\n\t\tblk, cert := td.makeBlockAndCertificate(t, 0)\n\t\trequire.NoError(t, td.state.CommitBlock(blk, cert))\n\t}\n}\n\nfunc TestClosingState(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.state.Close()\n}\n\nfunc TestBlockSubsidyTx(t *testing.T) {\n\ttd := setup(t)\n\n\t// Without reward address in config\n\trewardAddr := td.RandAccAddress()\n\tproposerAddr := td.state.Proposer(0).Address()\n\tfoundationAddr := td.state.params.FoundationAddress[td.state.LastBlockHeight()+1]\n\n\ttests := []struct {\n\t\tname               string\n\t\taccumulatedFee     amount.Amount\n\t\texpectedRecipients []payload.BatchRecipient\n\t}{\n\t\t{\n\t\t\tname:           \"subsidy with zero transaction fee\",\n\t\t\taccumulatedFee: 0,\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.7e9},\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tname:           \"subsidy with transaction fee\",\n\t\t\taccumulatedFee: 0.01e9, // 0.1 PAC\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.71e9},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ttrx := td.state.createSubsidyTx(proposerAddr, rewardAddr, tt.accumulatedFee)\n\n\t\t\terr := td.state.checkSubsidy(trx, td.genValKeys[0].Address(), true)\n\t\t\trequire.NoError(t, err)\n\n\t\t\tpayload := trx.Payload().(*payload.BatchTransferPayload)\n\n\t\t\tfor i, recipient := range payload.Recipients {\n\t\t\t\tassert.Equal(t, tt.expectedRecipients[i].To, recipient.To)\n\t\t\t\tassert.Equal(t, tt.expectedRecipients[i].Amount, recipient.Amount)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestBlockSubsidyWithDelegationTx(t *testing.T) {\n\ttd := setup(t)\n\n\t// Without reward address in config\n\trewardAddr := td.RandAccAddress()\n\tdlgOwnerAddr := td.RandAccAddress()\n\tproposerAddr := td.state.Proposer(0).Address()\n\taddressIndex := int(td.state.LastBlockHeight()+1) % len(td.state.params.FoundationAddress)\n\tfoundationAddr := td.state.params.FoundationAddress[addressIndex]\n\n\ttests := []struct {\n\t\tname               string\n\t\taccumulatedFee     amount.Amount\n\t\townerShare         amount.Amount\n\t\texpectedRecipients []payload.BatchRecipient\n\t}{\n\t\t{\n\t\t\tname:           \"owner share 0, without transaction fee\",\n\t\t\taccumulatedFee: 0,\n\t\t\townerShare:     0,\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.7e9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:           \"owner share 0.2, without transaction fee\",\n\t\t\taccumulatedFee: 0,\n\t\t\townerShare:     0.2e9, // 0.2 PAC\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: dlgOwnerAddr, Amount: 0.2e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.5e9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:           \"owner share 0.7, without transaction fee\",\n\t\t\taccumulatedFee: 0,\n\t\t\townerShare:     0.7e9, // 0.7 PAC\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: dlgOwnerAddr, Amount: 0.7e9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:           \"owner share 0, with transaction fee\",\n\t\t\taccumulatedFee: 0.01e9, // 0.01 PAC\n\t\t\townerShare:     0,\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.71e9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:           \"owner share 0.2, with transaction fee\",\n\t\t\taccumulatedFee: 0.01e9, // 0.01 PAC\n\t\t\townerShare:     0.2e9,  // 0.2 PAC\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: dlgOwnerAddr, Amount: 0.2e9},\n\t\t\t\t{To: rewardAddr, Amount: 0.51e9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:           \"owner share 0.7, with transaction fee\",\n\t\t\taccumulatedFee: 0.01e9, // 0.01 PAC\n\t\t\townerShare:     0.7e9,  // 0.7 PAC\n\t\t\texpectedRecipients: []payload.BatchRecipient{\n\t\t\t\t{To: foundationAddr, Amount: 0.3e9},\n\t\t\t\t{To: dlgOwnerAddr, Amount: 0.71e9},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tval, _ := td.state.ValidatorByAddress(proposerAddr)\n\t\t\tval.SetDelegation(dlgOwnerAddr, tt.ownerShare, td.RandHeight())\n\t\t\ttd.state.store.UpdateValidator(val)\n\n\t\t\ttrx := td.state.createSubsidyTx(proposerAddr, rewardAddr, tt.accumulatedFee)\n\n\t\t\terr := td.state.checkSubsidy(trx, proposerAddr, true)\n\t\t\trequire.NoError(t, err)\n\n\t\t\tpayload := trx.Payload().(*payload.BatchTransferPayload)\n\n\t\t\tfor i, recipient := range payload.Recipients {\n\t\t\t\tassert.Equal(t, tt.expectedRecipients[i].To, recipient.To)\n\t\t\t\tassert.Equal(t, tt.expectedRecipients[i].Amount, recipient.Amount)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestTryCommitInvalidCertificate(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(1)\n\n\tblk, _ := td.makeBlockAndCertificate(t, td.RandRound())\n\tinvCert := td.GenerateTestCertificate(td.state.LastBlockHeight() + 1)\n\n\trequire.Error(t, td.state.CommitBlock(blk, invCert))\n}\n\nfunc TestTryCommitValidBlocks(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(1)\n\n\tblk, cert := td.makeBlockAndCertificate(t, 0)\n\trequire.NoError(t, td.state.CommitBlock(blk, cert))\n\n\t// Commit again\n\t// No error here but block is ignored, because the height is invalid\n\trequire.NoError(t, td.state.CommitBlock(blk, cert))\n\n\tassert.Equal(t, blk.Hash(), td.state.LastBlockHash())\n\tassert.Equal(t, blk.Header().Time(), td.state.LastBlockTime())\n\tassert.Equal(t, cert.Hash(), td.state.LastCertificate().Hash())\n\tassert.Equal(t, cert.Height(), td.state.LastBlockHeight())\n}\n\nfunc TestCommitSandbox(t *testing.T) {\n\tt.Run(\"Add new account\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\taddr := td.RandAccAddress()\n\t\tsb := td.state.concreteSandbox()\n\t\tnewAcc := sb.MakeNewAccount(addr)\n\t\tnewAcc.AddToBalance(td.RandAmount())\n\t\tsb.UpdateAccount(addr, newAcc)\n\t\ttd.state.commitSandbox(sb, 0)\n\n\t\tstateAcc, _ := td.state.AccountByAddress(addr)\n\t\tassert.Equal(t, stateAcc, newAcc)\n\t})\n\n\tt.Run(\"Add new validator\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\tpub, _ := td.RandBLSKeyPair()\n\t\tsb := td.state.concreteSandbox()\n\t\tnewVal := sb.MakeNewValidator(pub)\n\t\tnewVal.AddToStake(td.RandAmount())\n\t\tsb.UpdateValidator(newVal)\n\t\ttd.state.commitSandbox(sb, 0)\n\n\t\tstateValByNumber, _ := td.state.ValidatorByAddress(pub.ValidatorAddress())\n\t\tstateValByAddr, _ := td.state.ValidatorByAddress(pub.ValidatorAddress())\n\t\tassert.Equal(t, stateValByNumber, newVal)\n\t\tassert.Equal(t, stateValByAddr, newVal)\n\t})\n\n\tt.Run(\"Modify account\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\tsbx := td.state.concreteSandbox()\n\t\taddr := td.genAccKey.PublicKeyNative().AccountAddress()\n\t\tacc := sbx.Account(addr)\n\t\tbal := acc.Balance()\n\t\tamt := td.RandAmount()\n\t\tacc.SubtractFromBalance(amt)\n\t\tsbx.UpdateAccount(addr, acc)\n\t\ttd.state.commitSandbox(sbx, 0)\n\n\t\tstateAcc, _ := td.state.AccountByAddress(addr)\n\t\tassert.Equal(t, bal-amt, stateAcc.Balance())\n\t})\n\n\tt.Run(\"Modify validator\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\tsbx := td.state.concreteSandbox()\n\t\taddr := td.genValKeys[0].Address()\n\t\tval := sbx.Validator(addr)\n\t\tstake := val.Stake()\n\t\tamt := td.RandAmount()\n\t\tval.AddToStake(amt)\n\t\tsbx.UpdateValidator(val)\n\t\ttd.state.commitSandbox(sbx, 0)\n\n\t\tstateVal, _ := td.state.ValidatorByAddress(addr)\n\t\tassert.Equal(t, stake+amt, stateVal.Stake(), \"%+v\", val.Stake())\n\t})\n\n\tt.Run(\"Move committee\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\tproposer0 := td.state.committee.Proposer(0)\n\t\tproposer1 := td.state.committee.Proposer(1)\n\t\tassert.Equal(t, proposer0, td.state.committee.Proposer(0))\n\n\t\tsb := td.state.concreteSandbox()\n\t\ttd.state.commitSandbox(sb, 0)\n\n\t\tassert.Equal(t, proposer1, td.state.committee.Proposer(0))\n\t})\n\n\tt.Run(\"Move committee next round\", func(t *testing.T) {\n\t\ttd := setup(t)\n\n\t\tproposer0 := td.state.committee.Proposer(0)\n\t\tproposer1 := td.state.committee.Proposer(1)\n\t\tproposer2 := td.state.committee.Proposer(2)\n\t\tassert.Equal(t, proposer0, td.state.committee.Proposer(0))\n\t\tassert.Equal(t, proposer1, td.state.committee.Proposer(1))\n\n\t\tsb := td.state.concreteSandbox()\n\t\ttd.state.commitSandbox(sb, 1)\n\n\t\tassert.Equal(t, proposer2, td.state.committee.Proposer(0))\n\t})\n}\n\nfunc TestUpdateLastCertificate(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(1)\n\tblk, cert := td.makeBlockAndCertificate(t, 1)\n\t_ = td.state.CommitBlock(blk, cert)\n\n\t// the above `cert` is not signed by the last validators\n\tvalKey1 := td.genValKeys[0]\n\tvalKey4 := td.genValKeys[len(td.genValKeys)-1]\n\tinvValKey := td.RandValKey()\n\n\tvote1 := vote.NewPrepareVote(blk.Hash(), cert.Height(), cert.Round(), valKey4.Address())\n\tvote2 := vote.NewPrecommitVote(blk.Hash(), cert.Height()+1, cert.Round(), valKey4.Address())\n\tvote3 := vote.NewPrecommitVote(blk.Hash(), cert.Height(), cert.Round()-1, valKey4.Address())\n\tvote4 := vote.NewPrecommitVote(blk.Hash(), cert.Height(), cert.Round(), valKey4.Address())\n\tvote5 := vote.NewPrecommitVote(blk.Hash(), cert.Height(), cert.Round(), invValKey.Address())\n\tvote6 := vote.NewPrecommitVote(blk.Hash(), cert.Height(), cert.Round(), valKey1.Address())\n\tvote7 := vote.NewPrecommitVote(blk.Hash(), cert.Height(), cert.Round(), valKey4.Address())\n\n\ttd.HelperSignVote(valKey4, vote1)\n\ttd.HelperSignVote(valKey4, vote2)\n\ttd.HelperSignVote(valKey4, vote3)\n\ttd.HelperSignVote(invValKey, vote4)\n\ttd.HelperSignVote(invValKey, vote5)\n\ttd.HelperSignVote(valKey4, vote6)\n\ttd.HelperSignVote(valKey4, vote7)\n\n\ttests := []struct {\n\t\tvote   *vote.Vote\n\t\terr    error\n\t\treason string\n\t}{\n\t\t{vote1, InvalidVoteForCertificateError{Vote: vote1}, \"invalid vote type\"},\n\t\t{vote2, InvalidVoteForCertificateError{Vote: vote2}, \"invalid height\"},\n\t\t{vote3, InvalidVoteForCertificateError{Vote: vote3}, \"invalid round\"},\n\t\t{vote4, crypto.ErrInvalidSignature, \"invalid signature\"},\n\t\t{vote5, store.ErrNotFound, \"unknown validator\"},\n\t\t{vote6, InvalidVoteForCertificateError{Vote: vote6}, \"not in absentee\"},\n\t\t{vote7, nil, \"ok\"},\n\t}\n\n\tfor no, tt := range tests {\n\t\terr := td.state.UpdateLastCertificate(tt.vote)\n\t\trequire.ErrorIs(t, err, tt.err, \"error not matched for test %v\", no)\n\t}\n}\n\nfunc TestForkDetection(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Two blocks with different previous block hashes\", func(t *testing.T) {\n\t\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(1)\n\n\t\tassert.Panics(t, func() {\n\t\t\tblk0, _ := td.makeBlockAndCertificate(t, 0)\n\t\t\tblkFork := block.MakeBlock(\n\t\t\t\tblk0.Header().Version(),\n\t\t\t\tblk0.Header().Time(),\n\t\t\t\tblk0.Transactions(),\n\t\t\t\ttd.RandHash(),\n\t\t\t\tblk0.Header().StateRoot(),\n\t\t\t\tblk0.PrevCertificate(),\n\t\t\t\tblk0.Header().SortitionSeed(),\n\t\t\t\tblk0.Header().ProposerAddress())\n\t\t\tcertFork := td.makeCertificateAndSign(t, blkFork.Hash(), 0)\n\n\t\t\t_ = td.state.CommitBlock(blkFork, certFork)\n\t\t})\n\t})\n}\n\nfunc TestSortition(t *testing.T) {\n\ttd := setup(t)\n\n\tvalKey := td.state.valKeys[1]\n\tassert.False(t, td.state.evaluateSortition()) //  not a validator\n\tassert.Equal(t, int64(4), td.state.ChainInfo().CommitteePower)\n\n\ttrx := tx.NewBondTx(1, td.genAccKey.PublicKeyNative().AccountAddress(),\n\t\tvalKey.Address(), valKey.PublicKey(), 1000000000, 100000)\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{trx}).Times(1)\n\ttd.commitBlocks(t, 1)\n\n\tassert.False(t, td.state.evaluateSortition()) // bonding period\n\tassert.Equal(t, int64(4), td.state.ChainInfo().CommitteePower)\n\tassert.False(t, td.state.committee.Contains(valKey.Address())) // Not in the committee\n\n\t// Committing another 10 blocks\n\tvar sortitionTrx *tx.Tx\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(10)\n\ttd.mockTxPool.EXPECT().AppendTxAndBroadcast(gomock.Any()).Do(func(trx *tx.Tx) {\n\t\tsortitionTrx = trx // Capture the input argument here\n\t}).Return(nil).Times(1)\n\ttd.commitBlocks(t, 10)\n\n\tassert.Equal(t, payload.TypeSortition, sortitionTrx.Payload().Type())\n\tassert.Equal(t, valKey.Address(), sortitionTrx.Payload().Signer())\n\tassert.False(t, td.state.committee.Contains(valKey.Address())) // Still not in the committee\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{sortitionTrx}).Times(1)\n\ttd.mockTxPool.EXPECT().AppendTxAndBroadcast(gomock.Any()).Return(nil).Times(1)\n\n\ttd.commitBlocks(t, 1)\n\n\tassert.Equal(t, int64(1000000004), td.state.ChainInfo().CommitteePower)\n\tassert.True(t, td.state.committee.Contains(valKey.Address())) // In the committee\n}\n\nfunc TestValidateBlockTime(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Time is not rounded\", func(t *testing.T) {\n\t\troundedNow := util.RoundNow(10)\n\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(-15*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(-5*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(5*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(15*time.Second)))\n\t})\n\n\tt.Run(\"Last block is committed 10 seconds ago\", func(t *testing.T) {\n\t\troundedNow := util.RoundNow(10)\n\t\ttd.state.lastInfo.UpdateBlockTime(roundedNow.Add(-10 * time.Second))\n\n\t\t// Before or same as the last block time\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(-20*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(-10*time.Second)))\n\n\t\t// Ok\n\t\trequire.NoError(t, td.state.validateBlockTime(roundedNow))\n\t\trequire.NoError(t, td.state.validateBlockTime(roundedNow.Add(10*time.Second)))\n\n\t\t// More than the threshold\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(20*time.Second)))\n\n\t\texpectedProposeTime := roundedNow\n\t\tassert.Equal(t, expectedProposeTime, td.state.proposeNextBlockTime())\n\t})\n\n\tt.Run(\"Last block is committed one minute ago\", func(t *testing.T) {\n\t\troundedNow := util.RoundNow(10)\n\t\ttd.state.lastInfo.UpdateBlockTime(roundedNow.Add(-1 * time.Minute)) // One minute ago\n\t\tlastBlockTime := td.state.LastBlockTime()\n\n\t\t// Before or same as the last block time\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime.Add(-10*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime))\n\n\t\t// Ok\n\t\trequire.NoError(t, td.state.validateBlockTime(roundedNow.Add(-10*time.Second)))\n\t\trequire.NoError(t, td.state.validateBlockTime(roundedNow))\n\t\trequire.NoError(t, td.state.validateBlockTime(roundedNow.Add(10*time.Second)))\n\n\t\t// More than the threshold\n\t\trequire.Error(t, td.state.validateBlockTime(roundedNow.Add(30*time.Second)))\n\n\t\texpectedProposeTime := util.RoundNow(10)\n\t\tassert.Equal(t, expectedProposeTime, td.state.proposeNextBlockTime())\n\t})\n\n\tt.Run(\"Last block is committed in future\", func(t *testing.T) {\n\t\troundedNow := util.RoundNow(10)\n\t\ttd.state.lastInfo.UpdateBlockTime(roundedNow.Add(1 * time.Minute)) // One minute later\n\t\tlastBlockTime := td.state.LastBlockTime()\n\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime.Add(+1*time.Minute)))\n\n\t\t// Before the last block time\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime.Add(-10*time.Second)))\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime))\n\n\t\t// Ok\n\t\trequire.NoError(t, td.state.validateBlockTime(lastBlockTime.Add(10*time.Second)))\n\t\trequire.NoError(t, td.state.validateBlockTime(lastBlockTime.Add(20*time.Second)))\n\n\t\t// More than the threshold\n\t\trequire.Error(t, td.state.validateBlockTime(lastBlockTime.Add(30*time.Second)))\n\n\t\texpectedProposeTime := roundedNow.Add(1 * time.Minute).Add(\n\t\t\ttime.Duration(td.state.params.BlockIntervalInSecond) * time.Second)\n\t\tassert.Equal(t, expectedProposeTime, td.state.proposeNextBlockTime())\n\t})\n}\n\nfunc TestValidatorHelpers(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Should return error non-existing validator by address\", func(t *testing.T) {\n\t\t_, err := td.state.ValidatorByAddress(td.RandValAddress())\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Should return error for non-existing validator by number\", func(t *testing.T) {\n\t\t_, err := td.state.ValidatorByNumber(10)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Should return validator for existing validator by address\", func(t *testing.T) {\n\t\texistingValidator, err := td.state.ValidatorByAddress(td.genValKeys[0].Address())\n\t\trequire.NoError(t, err)\n\t\tassert.Zero(t, existingValidator.Number())\n\t})\n\n\tt.Run(\"Should return validator for existing validator by number\", func(t *testing.T) {\n\t\texistingValidator, err := td.state.ValidatorByNumber(0)\n\t\trequire.NoError(t, err)\n\t\tassert.Zero(t, existingValidator.Number())\n\t})\n}\n\nfunc TestLoadState(t *testing.T) {\n\ttd := setup(t)\n\n\t// Add a bond transactions to change total power (stake)\n\tpub, _ := td.RandBLSKeyPair()\n\tlockTime := td.state.LastBlockHeight()\n\tbondTrx := tx.NewBondTx(lockTime, td.genAccKey.PublicKeyNative().AccountAddress(),\n\t\tpub.ValidatorAddress(), pub, 1000000000, 100000)\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{bondTrx}).Times(1)\n\tblk5, cert5 := td.makeBlockAndCertificate(t, 1)\n\tassert.Equal(t, 2, blk5.Transactions().Len())\n\trequire.NoError(t, td.state.CommitBlock(blk5, cert5))\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).Times(1)\n\tblk6, cert6 := td.makeBlockAndCertificate(t, 0)\n\n\t// Load last state info\n\teventPipe := pipeline.New[any](t.Context())\n\tnewState, err := LoadOrNewState(td.state.genDoc, td.state.valKeys,\n\t\ttd.state.store, td.mockTxPool, eventPipe)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, td.state.Params(), newState.Params())\n\tassert.ElementsMatch(t, td.state.ValidatorAddresses(), newState.ValidatorAddresses())\n\tassert.Equal(t, td.state.ChainInfo(), newState.ChainInfo())\n\n\t// Try committing the next block\n\trequire.NoError(t, newState.CommitBlock(blk6, cert6))\n}\n\nfunc TestIsInCommittee(t *testing.T) {\n\ttd := setup(t)\n\n\tproposer0 := td.proposerKey(t, 0).Address()\n\tproposer1 := td.proposerKey(t, 1).Address()\n\tassert.True(t, td.state.IsInCommittee(proposer0))\n\tassert.True(t, td.state.IsProposer(proposer0, 0))\n\tassert.True(t, td.state.IsInCommittee(proposer1))\n\tassert.True(t, td.state.IsProposer(proposer1, 1))\n\n\taddr := td.RandAccAddress()\n\tassert.False(t, td.state.IsInCommittee(addr))\n\tassert.False(t, td.state.IsProposer(addr, 0))\n\tassert.False(t, td.state.IsInCommittee(addr))\n}\n\nfunc TestCalculateFee(t *testing.T) {\n\ttd := setup(t)\n\n\texpectedFee := td.RandFee()\n\ttd.mockTxPool.EXPECT().EstimatedFee(gomock.Any(), payload.TypeTransfer).Return(expectedFee).Times(1)\n\n\tfee := td.state.CalculateFee(td.RandAmount(), payload.TypeTransfer)\n\n\tassert.Equal(t, expectedFee, fee)\n}\n\nfunc TestCheckMaximumTransactionPerBlock(t *testing.T) {\n\ttd := setup(t)\n\n\ttxs := block.Txs{}\n\ttd.state.params.MaxTransactionsPerBlock = 10\n\tlockTime := td.state.LastBlockHeight()\n\tsenderAddr := td.genAccKey.PublicKeyNative().AccountAddress()\n\tfor i := 0; i < td.state.params.MaxTransactionsPerBlock+2; i++ {\n\t\ttrx := tx.NewTransferTx(lockTime, senderAddr,\n\t\t\ttd.RandAccAddress(), td.RandAmount(), td.RandFee())\n\n\t\ttxs = append(txs, trx)\n\t}\n\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(txs).Times(1)\n\tblk, err := td.state.ProposeBlock(td.state.valKeys[0], td.RandAccAddress())\n\trequire.NoError(t, err)\n\tassert.Equal(t, td.state.params.MaxTransactionsPerBlock, blk.Transactions().Len())\n}\n\nfunc TestCommittedBlock(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Block at 0\", func(t *testing.T) {\n\t\tcBlkZero, err := td.state.CommittedBlock(0)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, cBlkZero)\n\t\tassert.Equal(t, hash.UndefHash, td.state.BlockHash(0))\n\t\tassert.Equal(t, types.Height(0), td.state.BlockHeight(hash.UndefHash))\n\t})\n\n\tt.Run(\"First block (Genesis)\", func(t *testing.T) {\n\t\tcBlkOne, err := td.state.CommittedBlock(1)\n\t\trequire.NoError(t, err)\n\t\tblkOne, err := cBlkOne.ToBlock()\n\t\trequire.NoError(t, err)\n\t\tassert.Nil(t, blkOne.PrevCertificate())\n\t\tassert.Equal(t, hash.UndefHash, blkOne.Header().PrevBlockHash())\n\t})\n\n\tt.Run(\"Last block\", func(t *testing.T) {\n\t\tcBlkLast, err := td.state.CommittedBlock(td.state.LastBlockHeight())\n\t\trequire.NoError(t, err)\n\t\tblkLast, err := cBlkLast.ToBlock()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, blkLast.Hash(), td.state.LastBlockHash())\n\t})\n}\n\nfunc TestUpdateProptocolVersion(t *testing.T) {\n\ttd := setup(t)\n\n\tval, err := td.state.ValidatorByAddress(td.state.valKeys[0].Address())\n\trequire.NoError(t, err)\n\tassert.Equal(t, protocol.ProtocolVersionLatest, val.ProtocolVersion())\n}\n"
  },
  {
    "path": "state/validation.go",
    "content": "package state\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\nfunc (st *state) validateBlock(blk *block.Block, round types.Round) error {\n\tif blk.Header().Version() > protocol.ProtocolVersionLatest ||\n\t\tblk.Header().Version() < st.params.BlockVersion {\n\t\treturn ErrInvalidBlockVersion\n\t}\n\n\tif blk.Header().StateRoot() != st.stateRoot() {\n\t\treturn InvalidStateRootHashError{\n\t\t\tExpected: st.stateRoot(),\n\t\t\tGot:      blk.Header().StateRoot(),\n\t\t}\n\t}\n\n\t// Verify proposer\n\tproposer := st.committee.Proposer(round)\n\tif proposer.Address() != blk.Header().ProposerAddress() {\n\t\treturn InvalidProposerError{\n\t\t\tExpected: proposer.Address(),\n\t\t\tGot:      blk.Header().ProposerAddress(),\n\t\t}\n\t}\n\n\t// Validate sortition seed\n\tseed := blk.Header().SortitionSeed()\n\tif !seed.Verify(proposer.PublicKey(), st.lastInfo.SortitionSeed()) {\n\t\treturn ErrInvalidSortitionSeed\n\t}\n\n\treturn st.validatePrevCertificate(blk.PrevCertificate(), blk.Header().PrevBlockHash())\n}\n\n// validatePrevCertificate validates certificate for the previous block.\nfunc (st *state) validatePrevCertificate(cert *certificate.Certificate, blockHash hash.Hash) error {\n\tif cert == nil {\n\t\tif !st.lastInfo.BlockHash().IsUndef() {\n\t\t\treturn ErrInvalidCertificate\n\t\t}\n\t} else {\n\t\terr := cert.ValidatePrecommit(st.lastInfo.Validators(), blockHash)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// validateCurCertificate validates certificate for the current height.\nfunc (st *state) validateCurCertificate(cert *certificate.Certificate, blockHash hash.Hash) error {\n\terr := cert.ValidatePrecommit(st.committee.Validators(), blockHash)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "state/validation_test.go",
    "content": "package state\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBlockValidation(t *testing.T) {\n\ttd := setup(t)\n\n\tround := td.RandRound()\n\ttd.mockTxPool.EXPECT().PrepareBlockTransactions().Return(block.Txs{}).AnyTimes()\n\n\tt.Run(\"Invalid version, greater than latest\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvBlockVersion := protocol.ProtocolVersionLatest + 1\n\t\tblk := block.MakeBlock(\n\t\t\tinvBlockVersion,\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tblk0.PrevCertificate(),\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, ErrInvalidBlockVersion)\n\n\t\t// Receiving a block with version 2 and rejects it.\n\t\t// It is possible that the same block would be considered valid by other nodes (Hard Fork).\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, ErrInvalidBlockVersion)\n\t})\n\n\tt.Run(\"Invalid version, less than current\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvBlockVersion := protocol.ProtocolVersion1\n\t\tblk := block.MakeBlock(\n\t\t\tinvBlockVersion,\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tblk0.PrevCertificate(),\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, ErrInvalidBlockVersion)\n\n\t\t// Receiving a block with version 2 and rejects it.\n\t\t// It is possible that the same block would be considered valid by other nodes (Hard Fork).\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, ErrInvalidBlockVersion)\n\t})\n\n\tt.Run(\"Invalid time\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvBlockTime := td.state.LastBlockTime().Add(-10 * time.Second)\n\t\tblk := block.MakeBlock(\n\t\t\tblk0.Header().Version(),\n\t\t\tinvBlockTime,\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tblk0.PrevCertificate(),\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, InvalidBlockTimeError{\n\t\t\tReason: fmt.Sprintf(\"block time (%s) is before the last block time (%s)\",\n\t\t\t\tinvBlockTime, td.state.LastBlockTime()),\n\t\t})\n\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.NoError(t, err)\n\t})\n\n\tt.Run(\"Invalid StateRoot\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvStateRoot := td.RandHash()\n\t\tblk := block.MakeBlock(\n\t\t\tblk0.Header().Version(),\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tinvStateRoot,\n\t\t\tblk0.PrevCertificate(),\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, InvalidStateRootHashError{\n\t\t\tExpected: td.state.stateRoot(),\n\t\t\tGot:      blk.Header().StateRoot(),\n\t\t})\n\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, InvalidStateRootHashError{\n\t\t\tExpected: td.state.stateRoot(),\n\t\t\tGot:      blk.Header().StateRoot(),\n\t\t})\n\t})\n\n\tt.Run(\"Invalid PrevCertificate\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvPrevCert := certificate.NewCertificate(\n\t\t\tblk0.PrevCertificate().Height(),\n\t\t\tblk0.PrevCertificate().Round(),\n\t\t)\n\t\tinvPrevCert.SetSignature(\n\t\t\tblk0.PrevCertificate().Committers(),\n\t\t\tblk0.PrevCertificate().Absentees(),\n\t\t\ttd.RandBLSSignature())\n\n\t\tblk := block.MakeBlock(\n\t\t\tblk0.Header().Version(),\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tinvPrevCert,\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Invalid ProposerAddress\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvProposerAddress := td.RandValAddress()\n\t\tblk := block.MakeBlock(\n\t\t\tblk0.Header().Version(),\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tblk0.PrevCertificate(),\n\t\t\tblk0.Header().SortitionSeed(),\n\t\t\tinvProposerAddress)\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, InvalidProposerError{\n\t\t\tExpected: td.state.committee.Proposer(round).Address(),\n\t\t\tGot:      invProposerAddress,\n\t\t})\n\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, InvalidProposerError{\n\t\t\tExpected: td.state.committee.Proposer(round).Address(),\n\t\t\tGot:      invProposerAddress,\n\t\t})\n\t})\n\n\tt.Run(\"Invalid SortitionSeed\", func(t *testing.T) {\n\t\tblk0, _ := td.makeBlockAndCertificate(t, round)\n\t\tinvSortitionSeed, _ := sortition.VerifiableSeedFromBytes(td.RandBLSSignature().Bytes())\n\t\tblk := block.MakeBlock(\n\t\t\tblk0.Header().Version(),\n\t\t\tblk0.Header().Time(),\n\t\t\tblk0.Transactions(),\n\t\t\tblk0.Header().PrevBlockHash(),\n\t\t\tblk0.Header().StateRoot(),\n\t\t\tblk0.PrevCertificate(),\n\t\t\tinvSortitionSeed,\n\t\t\tblk0.Header().ProposerAddress())\n\t\tcert := td.makeCertificateAndSign(t, blk.Hash(), round)\n\t\terr := td.state.ValidateBlock(blk, round)\n\t\trequire.ErrorIs(t, err, ErrInvalidSortitionSeed)\n\n\t\terr = td.state.CommitBlock(blk, cert)\n\t\trequire.ErrorIs(t, err, ErrInvalidSortitionSeed)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tblk, cert := td.makeBlockAndCertificate(t, round)\n\n\t\trequire.NoError(t, td.state.ValidateBlock(blk, round))\n\t\trequire.NoError(t, td.state.CommitBlock(blk, cert))\n\t})\n}\n"
  },
  {
    "path": "store/account.go",
    "content": "package store\n\nimport (\n\tlru \"github.com/hashicorp/golang-lru/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n\t\"github.com/syndtr/goleveldb/leveldb/util\"\n)\n\ntype accountStore struct {\n\tdb       *leveldb.DB\n\taccCache *lru.Cache[crypto.Address, *account.Account]\n\ttotal    int32\n}\n\nfunc accountKey(addr crypto.Address) []byte { return append(accountPrefix, addr.Bytes()...) }\n\nfunc newAccountStore(db *leveldb.DB, cacheSize int) *accountStore {\n\ttotal := int32(0)\n\taddrLruCache, err := lru.New[crypto.Address, *account.Account](cacheSize)\n\tif err != nil {\n\t\tlogger.Panic(\"unable to create new instance of lru cache\", \"error\", err)\n\t}\n\n\tr := util.BytesPrefix(accountPrefix)\n\titer := db.NewIterator(r, nil)\n\tfor iter.Next() {\n\t\ttotal++\n\t}\n\titer.Release()\n\n\treturn &accountStore{\n\t\tdb:       db,\n\t\ttotal:    total,\n\t\taccCache: addrLruCache,\n\t}\n}\n\nfunc (as *accountStore) hasAccount(addr crypto.Address) bool {\n\tok := as.accCache.Contains(addr)\n\tif !ok {\n\t\tok = tryHas(as.db, accountKey(addr))\n\t}\n\n\treturn ok\n}\n\nfunc (as *accountStore) account(addr crypto.Address) (*account.Account, error) {\n\tacc, ok := as.accCache.Get(addr)\n\tif ok {\n\t\treturn acc.Clone(), nil\n\t}\n\n\trawData, err := tryGet(as.db, accountKey(addr))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tacc, err = account.FromBytes(rawData)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tas.accCache.Add(addr, acc)\n\n\treturn acc.Clone(), nil\n}\n\nfunc (as *accountStore) iterateAccounts(consumer func(crypto.Address, *account.Account) (stop bool)) {\n\tr := util.BytesPrefix(accountPrefix)\n\titer := as.db.NewIterator(r, nil)\n\tfor iter.Next() {\n\t\tkey := iter.Key()\n\t\tvalue := iter.Value()\n\n\t\tacc, err := account.FromBytes(value)\n\t\tif err != nil {\n\t\t\tlogger.Panic(\"unable to decode account\", \"error\", err)\n\t\t}\n\n\t\tvar addr crypto.Address\n\t\tcopy(addr[:], key[1:])\n\n\t\tstopped := consumer(addr, acc)\n\t\tif stopped {\n\t\t\treturn\n\t\t}\n\t}\n\titer.Release()\n}\n\n// This function takes ownership of the account pointer.\n// It is important that the caller should not modify the account data and\n// keep it immutable.\nfunc (as *accountStore) updateAccount(batch *leveldb.Batch, addr crypto.Address, acc *account.Account) {\n\tdata, err := acc.Bytes()\n\tif err != nil {\n\t\tlogger.Panic(\"unable to encode account\", \"error\", err)\n\t}\n\tif !as.hasAccount(addr) {\n\t\tas.total++\n\t}\n\tas.accCache.Add(addr, acc)\n\n\tbatch.Put(accountKey(addr), data)\n}\n"
  },
  {
    "path": "store/account_test.go",
    "content": "package store\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestAccountCounter(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tacc, addr := td.GenerateTestAccount()\n\n\tt.Run(\"Add new account, should increase the total accounts number\", func(t *testing.T) {\n\t\tassert.Zero(t, td.store.TotalAccounts())\n\n\t\ttd.store.UpdateAccount(addr, acc)\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, int32(1), td.store.TotalAccounts())\n\t})\n\n\tt.Run(\"Update account, should not increase the total accounts number\", func(t *testing.T) {\n\t\tacc.AddToBalance(1)\n\t\ttd.store.UpdateAccount(addr, acc)\n\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, int32(1), td.store.TotalAccounts())\n\t})\n\n\tt.Run(\"Get account\", func(t *testing.T) {\n\t\tacc1, err := td.store.Account(addr)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, acc1.Hash(), acc.Hash())\n\t\tassert.Equal(t, int32(1), td.store.TotalAccounts())\n\t\tassert.True(t, td.store.HasAccount(addr))\n\t})\n}\n\nfunc TestAccountBatchSaving(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\tt.Run(\"Add some accounts\", func(t *testing.T) {\n\t\tfor i := int32(0); i < total; i++ {\n\t\t\tacc, addr := td.GenerateTestAccount(testsuite.AccountWithNumber(i))\n\t\t\ttd.store.UpdateAccount(addr, acc)\n\t\t}\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, total, td.store.TotalAccounts())\n\t})\n\n\tt.Run(\"Close and load db\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\tstore, _ := NewStore(td.store.config)\n\t\tassert.Equal(t, total, store.TotalAccounts())\n\t})\n}\n\nfunc TestAccountByAddress(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\tvar lastAddr crypto.Address\n\tt.Run(\"Add some accounts\", func(t *testing.T) {\n\t\tfor i := int32(0); i < total; i++ {\n\t\t\tacc, addr := td.GenerateTestAccount(testsuite.AccountWithNumber(i))\n\t\t\ttd.store.UpdateAccount(addr, acc)\n\n\t\t\tlastAddr = addr\n\t\t}\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, total, td.store.TotalAccounts())\n\t})\n\n\tt.Run(\"Non existing account\", func(t *testing.T) {\n\t\taddr := td.RandAccAddress()\n\t\tacc, err := td.store.Account(addr)\n\t\thas := td.store.HasAccount(addr)\n\n\t\tassert.False(t, has)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, acc)\n\t})\n\n\tt.Run(\"Reopen the store\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\tstore, _ := NewStore(td.store.config)\n\n\t\tacc, err := store.Account(lastAddr)\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, acc)\n\t\tassert.Equal(t, total-1, acc.Number())\n\t})\n}\n\nfunc TestIterateAccounts(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\thashes1 := []hash.Hash{}\n\tfor i := int32(0); i < total; i++ {\n\t\tacc, addr := td.GenerateTestAccount(testsuite.AccountWithNumber(i))\n\t\ttd.store.UpdateAccount(addr, acc)\n\t\thashes1 = append(hashes1, acc.Hash())\n\t}\n\trequire.NoError(t, td.store.WriteBatch())\n\n\thashes2 := []hash.Hash{}\n\ttd.store.IterateAccounts(func(_ crypto.Address, acc *account.Account) bool {\n\t\thashes2 = append(hashes2, acc.Hash())\n\n\t\treturn false\n\t})\n\tassert.ElementsMatch(t, hashes1, hashes2)\n\n\tstopped := false\n\ttd.store.IterateAccounts(func(_ crypto.Address, acc *account.Account) bool {\n\t\tif acc.Hash() == hashes1[0] {\n\t\t\tstopped = true\n\t\t}\n\n\t\treturn stopped\n\t})\n\tassert.True(t, stopped)\n}\n\nfunc TestAccountDeepCopy(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tacc1, addr := td.GenerateTestAccount()\n\ttd.store.UpdateAccount(addr, acc1)\n\n\tacc2, _ := td.store.Account(addr)\n\tacc2.AddToBalance(1)\n\taccCache, _ := td.store.accountStore.accCache.Get(addr)\n\tassert.NotEqual(t, acc2.Hash(), accCache.Hash())\n}\n"
  },
  {
    "path": "store/block.go",
    "content": "package store\n\nimport (\n\t\"bytes\"\n\n\tlru \"github.com/hashicorp/golang-lru/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n\t\"github.com/pactus-project/pactus/util/pairslice\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n)\n\nfunc blockKey(height types.Height) []byte {\n\treturn append(blockPrefix, height.BytesLE()...)\n}\n\nfunc publicKeyKey(addr crypto.Address) []byte {\n\treturn append(publicKeyPrefix, addr.Bytes()...)\n}\n\nfunc blockHashKey(h hash.Hash) []byte {\n\treturn append(blockHeightPrefix, h.Bytes()...)\n}\n\ntype blockStore struct {\n\tdb              *leveldb.DB\n\tpubKeyCache     *lru.Cache[crypto.Address, crypto.PublicKey]\n\tseedCache       *pairslice.PairSlice[types.Height, *sortition.VerifiableSeed]\n\tseedCacheWindow uint32\n}\n\nfunc newBlockStore(db *leveldb.DB, seedCacheWindow uint32, publicKeyCacheSize int) *blockStore {\n\tpubKeyCache, err := lru.New[crypto.Address, crypto.PublicKey](publicKeyCacheSize)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn &blockStore{\n\t\tdb:              db,\n\t\tseedCache:       pairslice.New[types.Height, *sortition.VerifiableSeed](int(seedCacheWindow)),\n\t\tpubKeyCache:     pubKeyCache,\n\t\tseedCacheWindow: seedCacheWindow,\n\t}\n}\n\nfunc (bs *blockStore) saveBlock(batch *leveldb.Batch, height types.Height, blk *block.Block) []blockRegion {\n\tblockHash := blk.Hash()\n\tregs := make([]blockRegion, blk.Transactions().Len())\n\tbuf := bytes.NewBuffer(make([]byte, 0, blk.SerializeSize()+hash.HashSize))\n\terr := encoding.WriteElement(buf, &blockHash)\n\tif err != nil {\n\t\tpanic(err) // Should we panic?\n\t}\n\terr = blk.Header().Encode(buf)\n\tif err != nil {\n\t\tpanic(err) // Should we panic?\n\t}\n\tif blk.PrevCertificate() != nil {\n\t\terr = blk.PrevCertificate().Encode(buf)\n\t\tif err != nil {\n\t\t\tpanic(err) // Should we panic?\n\t\t}\n\t}\n\terr = encoding.WriteVarInt(buf, uint64(blk.Transactions().Len()))\n\tif err != nil {\n\t\tpanic(err) // Should we panic?\n\t}\n\tfor i, trx := range blk.Transactions() {\n\t\toffset := buf.Len()\n\t\tregs[i].height = height\n\t\tregs[i].offset = uint32(offset)\n\n\t\tvar encodeOpts []tx.EncodeOption\n\t\tpubKey := trx.PublicKey()\n\t\tif pubKey != nil {\n\t\t\tif !bs.hasPublicKey(trx.Payload().Signer()) {\n\t\t\t\tpublicKeyKey := publicKeyKey(trx.Payload().Signer())\n\t\t\t\tbatch.Put(publicKeyKey, pubKey.Bytes())\n\t\t\t} else {\n\t\t\t\t// we have indexed this public key, so we can skip encoding it\n\t\t\t\tencodeOpts = append(encodeOpts, tx.StripPublicKey())\n\t\t\t}\n\t\t}\n\n\t\terr := trx.Encode(buf, encodeOpts...)\n\t\tif err != nil {\n\t\t\tpanic(err) // Should we panic?\n\t\t}\n\t\tregs[i].length = uint32(buf.Len() - offset)\n\t}\n\tblockKey := blockKey(height)\n\tblockHashKey := blockHashKey(blockHash)\n\n\tbatch.Put(blockKey, buf.Bytes())\n\tbatch.Put(blockHashKey, height.BytesLE())\n\n\tsortitionSeed := blk.Header().SortitionSeed()\n\tbs.addToCache(height, sortitionSeed)\n\n\treturn regs\n}\n\nfunc (bs *blockStore) block(height types.Height) ([]byte, error) {\n\tdata, err := tryGet(bs.db, blockKey(height))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn data, nil\n}\n\nfunc (bs *blockStore) blockHeight(h hash.Hash) types.Height {\n\tdata, err := tryGet(bs.db, blockHashKey(h))\n\tif err != nil {\n\t\treturn 0\n\t}\n\n\treturn types.HeightFromBytesLE(data)\n}\n\nfunc (bs *blockStore) sortitionSeed(blockHeight types.Height) *sortition.VerifiableSeed {\n\tstartHeight, _, _ := bs.seedCache.First()\n\n\tif blockHeight < startHeight {\n\t\treturn nil\n\t}\n\n\tindex := blockHeight - startHeight\n\t_, sortitionSeed, ok := bs.seedCache.Get(int(index))\n\tif !ok {\n\t\treturn nil\n\t}\n\n\treturn sortitionSeed\n}\n\nfunc (bs *blockStore) hasBlock(height types.Height) bool {\n\treturn tryHas(bs.db, blockKey(height))\n}\n\nfunc (bs *blockStore) publicKey(addr crypto.Address) (crypto.PublicKey, error) {\n\tif pubKey, ok := bs.pubKeyCache.Get(addr); ok {\n\t\treturn pubKey, nil\n\t}\n\n\tdata, err := tryGet(bs.db, publicKeyKey(addr))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar pubKey crypto.PublicKey\n\tswitch addr.Type() {\n\tcase crypto.AddressTypeValidator,\n\t\tcrypto.AddressTypeBLSAccount:\n\t\tpubKey, err = bls.PublicKeyFromBytes(data)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tcase crypto.AddressTypeEd25519Account:\n\t\tpubKey, err = ed25519.PublicKeyFromBytes(data)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\tcase crypto.AddressTypeTreasury:\n\t\tpanic(\"unreachable\")\n\n\tdefault:\n\t\treturn nil, PublicKeyNotFoundError{Address: addr}\n\t}\n\n\tbs.pubKeyCache.Add(addr, pubKey)\n\n\treturn pubKey, err\n}\n\nfunc (bs *blockStore) hasPublicKey(addr crypto.Address) bool {\n\tok := bs.pubKeyCache.Contains(addr)\n\tif !ok {\n\t\tok = tryHas(bs.db, publicKeyKey(addr))\n\t}\n\n\treturn ok\n}\n\nfunc (bs *blockStore) addToCache(blockHeight types.Height, sortitionSeed sortition.VerifiableSeed) {\n\tbs.seedCache.Append(blockHeight, &sortitionSeed)\n\tif bs.seedCache.Len() > int(bs.seedCacheWindow) {\n\t\tbs.seedCache.RemoveFirst()\n\t}\n}\n"
  },
  {
    "path": "store/block_test.go",
    "content": "package store\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBlockStore(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tlastCert := td.store.LastCertificate()\n\tlastHeight := lastCert.Height()\n\tnextBlk, nextCert := td.GenerateTestBlock(lastHeight + 1)\n\n\tt.Run(\"Add block, don't batch write\", func(t *testing.T) {\n\t\ttd.store.SaveBlock(nextBlk, nextCert)\n\t\tb2, err := td.store.Block(lastHeight + 1)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, b2)\n\t})\n\n\tt.Run(\"Add block, batch write\", func(t *testing.T) {\n\t\ttd.store.SaveBlock(nextBlk, nextCert)\n\t\trequire.NoError(t, td.store.WriteBatch())\n\n\t\tcBlk, err := td.store.Block(lastHeight + 1)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, lastHeight+1, cBlk.Height)\n\n\t\td, _ := nextBlk.Bytes()\n\t\tassert.True(t, bytes.Equal(cBlk.Data, d))\n\n\t\tcert := td.store.LastCertificate()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, nextCert.Hash(), cert.Hash())\n\t})\n}\n\nfunc TestSortitionSeed(t *testing.T) {\n\tconf := testConfig()\n\tconf.SeedCacheWindow = 7\n\n\ttd := setup(t, conf)\n\tlastHeight := td.store.LastCertificate().Height()\n\n\tt.Run(\"Test height zero\", func(t *testing.T) {\n\t\tassert.Nil(t, td.store.SortitionSeed(0))\n\t})\n\n\tt.Run(\"Test non existing height\", func(t *testing.T) {\n\t\tassert.Nil(t, td.store.SortitionSeed(lastHeight+1))\n\t})\n\n\tt.Run(\"Test not cached height\", func(t *testing.T) {\n\t\tassert.Nil(t, td.store.SortitionSeed(3))\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tcommittedBlk, _ := td.store.Block(5)\n\t\tblk, _ := committedBlk.ToBlock()\n\t\texpectedSortition := blk.Header().SortitionSeed()\n\t\tassert.Equal(t, &expectedSortition, td.store.SortitionSeed(5))\n\t})\n}\n"
  },
  {
    "path": "store/config.go",
    "content": "package store\n\nimport (\n\t\"path/filepath\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\nconst blockPerDay = 8640\n\n// Config defines parameters for the store module.\ntype Config struct {\n\tPath          string `toml:\"path\"`\n\tRetentionDays uint32 `toml:\"retention_days\"`\n\n\t// Private configs\n\tTxCacheWindow      uint32                  `toml:\"-\"`\n\tSeedCacheWindow    uint32                  `toml:\"-\"`\n\tAccountCacheSize   int                     `toml:\"-\"`\n\tPublicKeyCacheSize int                     `toml:\"-\"`\n\tBannedAddrs        map[crypto.Address]bool `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tPath:               \"data\",\n\t\tRetentionDays:      10,\n\t\tTxCacheWindow:      1024,\n\t\tSeedCacheWindow:    1024,\n\t\tAccountCacheSize:   1024,\n\t\tPublicKeyCacheSize: 1024,\n\t\tBannedAddrs:        map[crypto.Address]bool{},\n\t}\n}\n\nfunc (conf *Config) DataPath() string {\n\treturn util.MakeAbs(conf.Path)\n}\n\nfunc (conf *Config) StorePath() string {\n\treturn filepath.Join(conf.DataPath(), \"store.db\")\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif !util.IsValidDirPath(conf.Path) {\n\t\treturn ConfigError{\n\t\t\tReason: \"path is not valid\",\n\t\t}\n\t}\n\n\tif conf.TxCacheWindow == 0 ||\n\t\tconf.SeedCacheWindow == 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"cache window set to zero\",\n\t\t}\n\t}\n\n\tif conf.AccountCacheSize == 0 ||\n\t\tconf.PublicKeyCacheSize == 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"cache size set to zero\",\n\t\t}\n\t}\n\n\tif conf.RetentionDays < 10 {\n\t\treturn ConfigError{\n\t\t\tReason: \"retention days can't be less than 10 days\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (conf *Config) RetentionBlocks() uint32 {\n\treturn conf.RetentionDays * blockPerDay\n}\n"
  },
  {
    "path": "store/config_test.go",
    "content": "package store\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname: \"Invalid Path\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"path is not valid\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.Path = \"/invalid:path/\\x00*folder?\\\\CON\"\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid TxCacheWindow\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"cache window set to zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.TxCacheWindow = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid AccountCacheSize\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"cache size set to zero\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.AccountCacheSize = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid RetentionDays\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"retention days can't be less than 10 days\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.RetentionDays = 1\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, err, tt.expectedErr,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\", no, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestConfigStorePath(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.Path = util.TempDirPath()\n\trequire.NoError(t, conf.BasicCheck())\n\n\tif runtime.GOOS != \"windows\" {\n\t\tassert.Equal(t, conf.Path+\"/store.db\", conf.StorePath())\n\t} else {\n\t\tassert.Equal(t, conf.Path+\"\\\\store.db\", conf.StorePath())\n\t}\n}\n"
  },
  {
    "path": "store/errors.go",
    "content": "package store\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\n// ConfigError is returned when the store configuration is invalid.\ntype ConfigError struct {\n\tReason string\n}\n\nfunc (e ConfigError) Error() string {\n\treturn e.Reason\n}\n\n// PublicKeyNotFoundError is returned when the public key associated with an address\n// is not found in the store.\ntype PublicKeyNotFoundError struct {\n\tAddress crypto.Address\n}\n\nfunc (e PublicKeyNotFoundError) Error() string {\n\treturn fmt.Sprintf(\"public key not found for: %s\",\n\t\te.Address.String())\n}\n"
  },
  {
    "path": "store/interface.go",
    "content": "package store\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\n// TODO: store blocks inside flat files (to reduce the size of levelDB)\n// Bitcoin impl:\n// https://github.com/btcsuite/btcd/blob/0886f1e5c1fd28ad24aaca4dbccc5f4ab85e58ca/database/ffldb/blockio.go\n// https://bitcoindev.network/understanding-the-data/\n\n// TODO: How to undo or rollback at least for last 21 blocks\n\ntype CommittedBlock struct {\n\tstore Store\n\n\tBlockHash hash.Hash\n\tHeight    types.Height\n\tData      []byte\n}\n\nfunc (s *CommittedBlock) ToBlock() (*block.Block, error) {\n\tblk, err := block.FromBytes(s.Data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttrxs := blk.Transactions()\n\tfor i := 0; i < trxs.Len(); i++ {\n\t\ttrx := trxs[i]\n\t\tif trx.IsPublicKeyStriped() {\n\t\t\tpub, err := s.store.PublicKey(trx.Payload().Signer())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, PublicKeyNotFoundError{\n\t\t\t\t\tAddress: trx.Payload().Signer(),\n\t\t\t\t}\n\t\t\t}\n\t\t\ttrx.SetPublicKey(pub)\n\t\t}\n\t}\n\n\treturn blk, nil\n}\n\ntype CommittedTx struct {\n\tstore *store\n\n\tTxID      tx.ID\n\tHeight    types.Height\n\tBlockTime uint32\n\tData      []byte\n}\n\nfunc (s *CommittedTx) ToTx() (*tx.Tx, error) {\n\ttrx, err := tx.FromBytes(s.Data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif trx.IsPublicKeyStriped() {\n\t\tpub, err := s.store.PublicKey(trx.Payload().Signer())\n\t\tif err != nil {\n\t\t\treturn nil, PublicKeyNotFoundError{\n\t\t\t\tAddress: trx.Payload().Signer(),\n\t\t\t}\n\t\t}\n\t\ttrx.SetPublicKey(pub)\n\t}\n\n\treturn trx, nil\n}\n\ntype Reader interface {\n\tBlock(height types.Height) (*CommittedBlock, error)\n\tBlockHeight(h hash.Hash) types.Height\n\tBlockHash(height types.Height) hash.Hash\n\tSortitionSeed(blockHeight types.Height) *sortition.VerifiableSeed\n\tTransaction(txID tx.ID) (*CommittedTx, error)\n\tRecentTransaction(txID tx.ID) bool\n\tPublicKey(addr crypto.Address) (crypto.PublicKey, error)\n\tHasPublicKey(addr crypto.Address) bool\n\tHasAccount(crypto.Address) bool\n\tAccount(addr crypto.Address) (*account.Account, error)\n\tTotalAccounts() int32\n\tHasValidator(addr crypto.Address) bool\n\tValidatorAddresses() []crypto.Address\n\tValidator(addr crypto.Address) (*validator.Validator, error)\n\tValidatorByNumber(num int32) (*validator.Validator, error)\n\tIterateValidators(consumer func(*validator.Validator) (stop bool))\n\tIterateAccounts(consumer func(crypto.Address, *account.Account) (stop bool))\n\tTotalValidators() int32\n\tActiveValidators() int32\n\tLastCertificate() *certificate.Certificate\n\tIsBanned(addr crypto.Address) bool\n\tIsPruned() bool\n\tPruningHeight() types.Height\n}\n\ntype Store interface {\n\tReader\n\n\tUpdateAccount(addr crypto.Address, acc *account.Account)\n\tUpdateValidator(val *validator.Validator)\n\tUpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version)\n\tSaveBlock(blk *block.Block, cert *certificate.Certificate)\n\tPrune(callback func(pruned bool, pruningHeight types.Height) bool) error\n\tWriteBatch() error\n\n\tClose()\n}\n"
  },
  {
    "path": "store/mock.go",
    "content": "package store\n\nimport (\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n)\n\nvar _ Store = &MockStore{}\n\n// MockStore is a mock implementation of the Store interface for testing.\ntype MockStore struct {\n\tts *testsuite.TestSuite\n\n\tBlocks     map[types.Height]*block.Block\n\tAccounts   map[crypto.Address]*account.Account\n\tValidators map[crypto.Address]*validator.Validator\n\tLastCert   *certificate.Certificate\n\tLastHeight types.Height\n}\n\nfunc MockingStore(ts *testsuite.TestSuite) *MockStore {\n\treturn &MockStore{\n\t\tts:         ts,\n\t\tBlocks:     make(map[types.Height]*block.Block),\n\t\tAccounts:   make(map[crypto.Address]*account.Account),\n\t\tValidators: make(map[crypto.Address]*validator.Validator),\n\t}\n}\n\nfunc (m *MockStore) Block(height types.Height) (*CommittedBlock, error) {\n\tblk, ok := m.Blocks[height]\n\tif ok {\n\t\tdata, _ := blk.Bytes()\n\n\t\treturn &CommittedBlock{\n\t\t\tstore:     m,\n\t\t\tBlockHash: blk.Hash(),\n\t\t\tHeight:    height,\n\t\t\tData:      data,\n\t\t}, nil\n\t}\n\n\treturn nil, errors.New(\"not found\")\n}\n\nfunc (m *MockStore) BlockHash(height types.Height) hash.Hash {\n\tb, ok := m.Blocks[height]\n\tif ok {\n\t\treturn b.Hash()\n\t}\n\n\treturn hash.UndefHash\n}\n\nfunc (m *MockStore) BlockHeight(h hash.Hash) types.Height {\n\tfor height, b := range m.Blocks {\n\t\tif b.Hash() == h {\n\t\t\treturn height\n\t\t}\n\t}\n\n\treturn 0\n}\n\nfunc (m *MockStore) SortitionSeed(blockHeight types.Height) *sortition.VerifiableSeed {\n\tif blk, ok := m.Blocks[blockHeight]; ok {\n\t\tsortitionSeed := blk.Header().SortitionSeed()\n\n\t\treturn &sortitionSeed\n\t}\n\n\treturn nil\n}\n\nfunc (m *MockStore) PublicKey(addr crypto.Address) (crypto.PublicKey, error) {\n\tfor _, blk := range m.Blocks {\n\t\tfor _, trx := range blk.Transactions() {\n\t\t\tif trx.Payload().Signer() == addr {\n\t\t\t\treturn trx.PublicKey(), nil\n\t\t\t}\n\t\t}\n\t}\n\tfor _, val := range m.Validators {\n\t\tif val.Address() == addr {\n\t\t\treturn val.PublicKey(), nil\n\t\t}\n\t}\n\n\treturn nil, ErrNotFound\n}\n\nfunc (m *MockStore) HasPublicKey(addr crypto.Address) bool {\n\tpub, _ := m.PublicKey(addr)\n\n\treturn pub != nil\n}\n\nfunc (m *MockStore) Transaction(txID tx.ID) (*CommittedTx, error) {\n\tfor height, blk := range m.Blocks {\n\t\tfor _, trx := range blk.Transactions() {\n\t\t\tif trx.ID() == txID {\n\t\t\t\tdata, _ := trx.Bytes()\n\n\t\t\t\treturn &CommittedTx{\n\t\t\t\t\tTxID:      txID,\n\t\t\t\t\tHeight:    height,\n\t\t\t\t\tBlockTime: blk.Header().UnixTime(),\n\t\t\t\t\tData:      data,\n\t\t\t\t}, nil\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"not found\")\n}\n\nfunc (m *MockStore) RecentTransaction(txID tx.ID) bool {\n\tfor _, blk := range m.Blocks {\n\t\tfor _, trx := range blk.Transactions() {\n\t\t\tif trx.ID() == txID {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (m *MockStore) HasAccount(addr crypto.Address) bool {\n\t_, ok := m.Accounts[addr]\n\n\treturn ok\n}\n\nfunc (m *MockStore) Account(addr crypto.Address) (*account.Account, error) {\n\ta, ok := m.Accounts[addr]\n\tif ok {\n\t\treturn a.Clone(), nil\n\t}\n\n\treturn nil, errors.New(\"not found\")\n}\n\nfunc (m *MockStore) AccountByNumber(number int32) (*account.Account, error) {\n\tfor _, v := range m.Accounts {\n\t\tif v.Number() == number {\n\t\t\treturn v.Clone(), nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"not found\")\n}\n\nfunc (m *MockStore) UpdateAccount(addr crypto.Address, acc *account.Account) {\n\tm.Accounts[addr] = acc\n}\n\nfunc (m *MockStore) TotalAccounts() int32 {\n\treturn int32(len(m.Accounts))\n}\n\nfunc (m *MockStore) HasValidator(addr crypto.Address) bool {\n\t_, ok := m.Validators[addr]\n\n\treturn ok\n}\n\nfunc (m *MockStore) ValidatorAddresses() []crypto.Address {\n\taddrs := make([]crypto.Address, 0, len(m.Validators))\n\tfor addr := range m.Validators {\n\t\taddrs = append(addrs, addr)\n\t}\n\n\treturn addrs\n}\n\nfunc (m *MockStore) Validator(addr crypto.Address) (*validator.Validator, error) {\n\tv, ok := m.Validators[addr]\n\tif ok {\n\t\treturn v.Clone(), nil\n\t}\n\n\treturn nil, ErrNotFound\n}\n\nfunc (m *MockStore) ValidatorByNumber(num int32) (*validator.Validator, error) {\n\tfor _, v := range m.Validators {\n\t\tif v.Number() == num {\n\t\t\treturn v.Clone(), nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"not found\")\n}\n\nfunc (m *MockStore) UpdateValidator(val *validator.Validator) {\n\tm.Validators[val.Address()] = val\n}\n\nfunc (m *MockStore) TotalValidators() int32 {\n\treturn int32(len(m.Validators))\n}\n\nfunc (m *MockStore) ActiveValidators() int32 {\n\treturn int32(len(m.Validators))\n}\n\nfunc (*MockStore) Close() {}\n\nfunc (m *MockStore) HasAnyBlock() bool {\n\treturn len(m.Blocks) > 0\n}\n\nfunc (m *MockStore) IterateAccounts(consumer func(crypto.Address, *account.Account) (stop bool)) {\n\tfor addr, acc := range m.Accounts {\n\t\tstopped := consumer(addr, acc.Clone())\n\t\tif stopped {\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (m *MockStore) IterateValidators(consumer func(*validator.Validator) (stop bool)) {\n\tfor _, val := range m.Validators {\n\t\tstopped := consumer(val.Clone())\n\t\tif stopped {\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (m *MockStore) SaveBlock(blk *block.Block, cert *certificate.Certificate) {\n\tm.Blocks[cert.Height()] = blk\n\tm.LastHeight = cert.Height()\n\tm.LastCert = cert\n}\n\nfunc (m *MockStore) LastCertificate() *certificate.Certificate {\n\tif m.LastHeight == 0 {\n\t\treturn nil\n\t}\n\n\treturn m.LastCert\n}\n\nfunc (*MockStore) WriteBatch() error {\n\treturn nil\n}\n\nfunc (m *MockStore) AddTestValidator(options ...testsuite.ValidatorMakerOption) *validator.Validator {\n\tval := m.ts.GenerateTestValidator(options...)\n\tm.UpdateValidator(val)\n\n\treturn val\n}\n\nfunc (m *MockStore) AddTestAccount(options ...testsuite.AccountMakerOption) (crypto.Address, *account.Account) {\n\tacc, addr := m.ts.GenerateTestAccount(options...)\n\tm.UpdateAccount(addr, acc)\n\n\treturn addr, acc\n}\n\nfunc (m *MockStore) AddTestBlock(height types.Height) *block.Block {\n\tblk, cert := m.ts.GenerateTestBlock(height)\n\tm.SaveBlock(blk, cert)\n\n\treturn blk\n}\n\nfunc (m *MockStore) RandomTestAcc() (crypto.Address, *account.Account) {\n\tfor addr, acc := range m.Accounts {\n\t\t// Do not return the Treasury address for tests,\n\t\t// as it may cause some tests to randomly fail.\n\t\tif addr == crypto.TreasuryAddress {\n\t\t\tcontinue\n\t\t}\n\n\t\treturn addr, acc\n\t}\n\tpanic(\"no account in sandbox\")\n}\n\nfunc (m *MockStore) RandomTestVal() *validator.Validator {\n\tfor _, val := range m.Validators {\n\t\treturn val\n\t}\n\tpanic(\"no validator in sandbox\")\n}\n\nfunc (*MockStore) IsBanned(_ crypto.Address) bool {\n\treturn false\n}\n\nfunc (*MockStore) Prune(_ func(_ bool, _ types.Height) bool) error {\n\treturn nil\n}\n\nfunc (*MockStore) IsPruned() bool {\n\treturn false\n}\n\nfunc (*MockStore) PruningHeight() types.Height {\n\treturn 0\n}\n\nfunc (m *MockStore) UpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version) {\n\tval, ok := m.Validators[addr]\n\tif ok {\n\t\tval.UpdateProtocolVersion(ver)\n\t}\n}\n"
  },
  {
    "path": "store/store.go",
    "content": "package store\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"sync\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n\t\"github.com/syndtr/goleveldb/leveldb/opt\"\n)\n\nvar (\n\tErrNotFound  = errors.New(\"not found\")\n\tErrBadOffset = errors.New(\"offset is out of range\")\n)\n\nconst (\n\tlastStoreVersion = int32(1)\n)\n\nvar (\n\tlastInfoKey       = []byte{0x00}\n\tblockPrefix       = []byte{0x01}\n\ttxPrefix          = []byte{0x03}\n\taccountPrefix     = []byte{0x05}\n\tvalidatorPrefix   = []byte{0x07}\n\tblockHeightPrefix = []byte{0x09}\n\tpublicKeyPrefix   = []byte{0x0b}\n)\n\nfunc tryGet(db *leveldb.DB, key []byte) ([]byte, error) {\n\tdata, err := db.Get(key, nil)\n\tif err != nil {\n\t\t// Probably key doesn't exist in database\n\t\tlogger.Trace(\"database `get` error\", \"error\", err, \"key\", key)\n\n\t\treturn nil, err\n\t}\n\n\treturn data, nil\n}\n\nfunc tryHas(db *leveldb.DB, key []byte) bool {\n\thas, err := db.Has(key, nil)\n\tif err != nil {\n\t\tlogger.Error(\"database `has` error\", \"error\", err, \"key\", key)\n\n\t\treturn false\n\t}\n\n\treturn has\n}\n\ntype store struct {\n\tlk sync.RWMutex\n\n\tconfig         *Config\n\tdb             *leveldb.DB\n\tbatch          *leveldb.Batch\n\tblockStore     *blockStore\n\ttxStore        *txStore\n\taccountStore   *accountStore\n\tvalidatorStore *validatorStore\n\tisPruned       bool\n}\n\nfunc NewStore(conf *Config) (Store, error) {\n\toptions := &opt.Options{\n\t\tStrict:      opt.DefaultStrict,\n\t\tCompression: opt.NoCompression,\n\t}\n\n\tdb, err := leveldb.OpenFile(conf.StorePath(), options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstore := &store{\n\t\tconfig:         conf,\n\t\tdb:             db,\n\t\tbatch:          new(leveldb.Batch),\n\t\tblockStore:     newBlockStore(db, conf.SeedCacheWindow, conf.PublicKeyCacheSize),\n\t\ttxStore:        newTxStore(db, conf.TxCacheWindow),\n\t\taccountStore:   newAccountStore(db, conf.AccountCacheSize),\n\t\tvalidatorStore: newValidatorStore(db),\n\t\tisPruned:       false,\n\t}\n\n\tlastCert := store.lastCertificate()\n\tif lastCert == nil {\n\t\treturn store, nil\n\t}\n\n\t// Check if the node is pruned by checking genesis block.\n\tcBlkOne, _ := store.block(1)\n\tif cBlkOne == nil {\n\t\tstore.isPruned = true\n\t}\n\n\tcurrentHeight := lastCert.Height()\n\tstartHeight := types.Height(1)\n\tif currentHeight > types.Height(conf.TxCacheWindow) {\n\t\tstartHeight = currentHeight.SafeDecrease(conf.TxCacheWindow)\n\t}\n\n\tfor height := startHeight; height < currentHeight+1; height++ {\n\t\tcBlk, err := store.block(height)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tblk, err := cBlk.ToBlock()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\ttxs := blk.Transactions()\n\t\tfor _, transaction := range txs {\n\t\t\tstore.txStore.addToCache(transaction.ID(), height)\n\t\t}\n\n\t\tsortitionSeed := blk.Header().SortitionSeed()\n\t\tstore.blockStore.addToCache(height, sortitionSeed)\n\t}\n\n\treturn store, nil\n}\n\nfunc (s *store) Close() {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\terr := s.db.Close()\n\tif err != nil && !errors.Is(err, leveldb.ErrClosed) {\n\t\tlogger.Error(\"error on closing store\", \"error\", err)\n\t}\n}\n\nfunc (s *store) SaveBlock(blk *block.Block, cert *certificate.Certificate) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\theight := cert.Height()\n\tregs := s.blockStore.saveBlock(s.batch, height, blk)\n\ts.txStore.saveTxs(s.batch, blk.Transactions(), regs)\n\ts.txStore.pruneCache(height)\n\n\t// Removing old block from prune node store.\n\tif s.isPruned && uint32(height) > s.config.RetentionBlocks() {\n\t\tpruneHeight := height.SafeDecrease(s.config.RetentionBlocks())\n\t\tdeleted, err := s.pruneBlock(pruneHeight)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif deleted {\n\t\t\t// TODO: Let's use state logger in store[?].\n\t\t\tlogger.Debug(\"old block is pruned\", \"height\", pruneHeight)\n\t\t} else {\n\t\t\tlogger.Warn(\"unable to prune the old block\", \"height\", pruneHeight, \"error\", err)\n\t\t}\n\t}\n\n\t// Save last certificate: [version: 4 bytes]+[certificate: variant]\n\tbuf := bytes.NewBuffer(make([]byte, 0, 4+cert.SerializeSize()))\n\terr := encoding.WriteElements(buf, lastStoreVersion)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\terr = cert.Encode(buf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\ts.batch.Put(lastInfoKey, buf.Bytes())\n}\n\nfunc (s *store) Block(height types.Height) (*CommittedBlock, error) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\treturn s.block(height)\n}\n\nfunc (s *store) block(height types.Height) (*CommittedBlock, error) {\n\tdata, err := s.blockStore.block(height)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tblockHash, err := hash.FromBytes(data[0:hash.HashSize])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &CommittedBlock{\n\t\tstore:     s,\n\t\tBlockHash: blockHash,\n\t\tHeight:    height,\n\t\tData:      data[hash.HashSize:],\n\t}, nil\n}\n\nfunc (s *store) BlockHeight(h hash.Hash) types.Height {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\treturn s.blockStore.blockHeight(h)\n}\n\nfunc (s *store) BlockHash(height types.Height) hash.Hash {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\tdata, err := s.blockStore.block(height)\n\tif err == nil {\n\t\tblockHash, _ := hash.FromBytes(data[0:hash.HashSize])\n\n\t\treturn blockHash\n\t}\n\n\treturn hash.UndefHash\n}\n\nfunc (s *store) SortitionSeed(blockHeight types.Height) *sortition.VerifiableSeed {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\treturn s.blockStore.sortitionSeed(blockHeight)\n}\n\nfunc (s *store) PublicKey(addr crypto.Address) (crypto.PublicKey, error) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.blockStore.publicKey(addr)\n}\n\nfunc (s *store) HasPublicKey(addr crypto.Address) bool {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn tryHas(s.db, publicKeyKey(addr))\n}\n\nfunc (s *store) Transaction(txID tx.ID) (*CommittedTx, error) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\tpos, err := s.txStore.tx(txID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdata, err := s.blockStore.block(pos.height)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstart := pos.offset\n\tend := pos.offset + pos.length\n\tif end > uint32(len(data)) {\n\t\treturn nil, ErrBadOffset\n\t}\n\tblockTime := util.BytesToUint32LE(data[hash.HashSize+1 : hash.HashSize+5])\n\n\treturn &CommittedTx{\n\t\tstore:     s,\n\t\tTxID:      txID,\n\t\tHeight:    pos.height,\n\t\tBlockTime: blockTime,\n\t\tData:      data[start:end],\n\t}, nil\n}\n\n// RecentTransaction checks if there is a transaction with the given ID\n// within the last 8640 blocks.\n// The time window for recent transactions is determined by the\n// TransactionToLive interval, which is part of the consensus parameters.\nfunc (s *store) RecentTransaction(txID tx.ID) bool {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.txStore.recentTransaction(txID)\n}\n\nfunc (s *store) HasAccount(addr crypto.Address) bool {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.accountStore.hasAccount(addr)\n}\n\nfunc (s *store) Account(addr crypto.Address) (*account.Account, error) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.accountStore.account(addr)\n}\n\n// TotalAccounts returns the total number of accounts.\nfunc (s *store) TotalAccounts() int32 {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\treturn s.accountStore.total\n}\n\nfunc (s *store) IterateAccounts(consumer func(crypto.Address, *account.Account) (stop bool)) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\ts.accountStore.iterateAccounts(consumer)\n}\n\nfunc (s *store) UpdateAccount(addr crypto.Address, acc *account.Account) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\ts.accountStore.updateAccount(s.batch, addr, acc)\n}\n\nfunc (s *store) HasValidator(addr crypto.Address) bool {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.hasValidator(addr)\n}\n\nfunc (s *store) ValidatorAddresses() []crypto.Address {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.ValidatorAddresses()\n}\n\nfunc (s *store) Validator(addr crypto.Address) (*validator.Validator, error) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.validator(addr)\n}\n\nfunc (s *store) ValidatorByNumber(num int32) (*validator.Validator, error) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.validatorByNumber(num)\n}\n\n// TotalValidators returns the total number of validators.\nfunc (s *store) TotalValidators() int32 {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.total\n}\n\n// ActiveValidators returns the number of active (not unbonded) validators.\nfunc (s *store) ActiveValidators() int32 {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.validatorStore.active\n}\n\nfunc (s *store) IterateValidators(consumer func(*validator.Validator) (stop bool)) {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\ts.validatorStore.iterateValidators(consumer)\n}\n\nfunc (s *store) UpdateValidator(acc *validator.Validator) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\ts.validatorStore.updateValidator(s.batch, acc)\n}\n\nfunc (s *store) UpdateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version) {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\ts.validatorStore.updateValidatorProtocolVersion(addr, ver)\n}\n\nfunc (s *store) LastCertificate() *certificate.Certificate {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\treturn s.lastCertificate()\n}\n\nfunc (s *store) lastCertificate() *certificate.Certificate {\n\tdata, _ := tryGet(s.db, lastInfoKey)\n\tif data == nil {\n\t\t// Genesis block\n\t\treturn nil\n\t}\n\treader := bytes.NewReader(data)\n\tversion := int32(0)\n\tcert := new(certificate.Certificate)\n\terr := encoding.ReadElements(reader, &version)\n\tif err != nil {\n\t\treturn nil\n\t}\n\terr = cert.Decode(reader)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn cert\n}\n\nfunc (s *store) WriteBatch() error {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\treturn s.writeBatch()\n}\n\nfunc (s *store) writeBatch() error {\n\tif err := s.db.Write(s.batch, nil); err != nil {\n\t\t// TODO: Should we panic here?\n\t\t// The store is unreliable if the stored data does not match the cached data.\n\t\treturn err\n\t}\n\ts.batch.Reset()\n\n\treturn nil\n}\n\nfunc (s *store) IsBanned(addr crypto.Address) bool {\n\treturn s.config.BannedAddrs[addr]\n}\n\n// IsPruned returns true if the store is in prune mode, otherwise false.\nfunc (s *store) IsPruned() bool {\n\treturn s.isPruned\n}\n\n// PruningHeight returns the height at which blocks will be pruned if the store is in prune mode.\n// If the store is not in prune mode, it returns 0.\nfunc (s *store) PruningHeight() types.Height {\n\ts.lk.RLock()\n\tdefer s.lk.RUnlock()\n\n\tif !s.isPruned {\n\t\treturn 0\n\t}\n\n\t// TODO: it can be optimized (and safer?) by keeping the last block height in memory.\n\tcert := s.lastCertificate()\n\n\treturn cert.Height().SafeDecrease(s.config.RetentionBlocks())\n}\n\n// Prune iterates over all blocks from the pruning height to the genesis block and prunes them.\n// The pruning height is `LastBlockHeight - RetentionBlocks`.\n// The callback function is called after each block is pruned and can cancel the process.\nfunc (s *store) Prune(callback func(pruned bool, pruningHeight types.Height) bool) error {\n\ts.lk.Lock()\n\tdefer s.lk.Unlock()\n\n\tcert := s.lastCertificate()\n\n\t// Store is at the genesis height\n\tif cert == nil {\n\t\treturn nil\n\t}\n\n\tretentionBlocks := s.config.RetentionBlocks()\n\tpruningHeight := cert.Height().SafeDecrease(retentionBlocks)\n\tfor height := pruningHeight; height >= 1; height-- {\n\t\tdeleted, err := s.pruneBlock(height)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := s.writeBatch(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif callback(deleted, height) {\n\t\t\t// canceled\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// pruneBlock removes a block and all transactions inside the block from the store.\n// It accepts a block height to prune, and returns a boolean that\n// indicate whether the block at the specified height existed and pruned,\n// or did not exist, along with any encountered errors.\nfunc (s *store) pruneBlock(blockHeight types.Height) (bool, error) {\n\tif !s.blockStore.hasBlock(blockHeight) {\n\t\treturn false, nil\n\t}\n\n\tcBlock, err := s.block(blockHeight)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tblk, err := block.FromBytes(cBlock.Data)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\ts.batch.Delete(blockHashKey(blk.Hash()))\n\ts.batch.Delete(blockKey(blockHeight))\n\n\tfor _, t := range blk.Transactions() {\n\t\ts.batch.Delete(t.ID().Bytes())\n\t}\n\n\treturn true, nil\n}\n"
  },
  {
    "path": "store/store_test.go",
    "content": "package store\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tstore *store\n}\n\nfunc testConfig() *Config {\n\treturn &Config{\n\t\tPath:               util.TempDirPath(),\n\t\tTxCacheWindow:      1024,\n\t\tSeedCacheWindow:    1024,\n\t\tAccountCacheSize:   1024,\n\t\tPublicKeyCacheSize: 1024,\n\t\tBannedAddrs:        make(map[crypto.Address]bool),\n\t}\n}\n\nfunc setup(t *testing.T, config *Config) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tif config == nil {\n\t\tconfig = testConfig()\n\t}\n\n\tstoreInt, err := NewStore(config)\n\trequire.NoError(t, err)\n\tassert.False(t, storeInt.IsPruned(), \"empty store should not be in prune mode\")\n\tassert.Zero(t, storeInt.PruningHeight(), \"pruning height should be zero for an empty store\")\n\n\ttd := &testData{\n\t\tTestSuite: ts,\n\t\tstore:     storeInt.(*store),\n\t}\n\n\t// Save 10 blocks\n\tfor height := types.Height(0); height < 10; height++ {\n\t\tblk, cert := td.GenerateTestBlock(height + 1)\n\t\ttd.store.SaveBlock(blk, cert)\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t}\n\n\treturn td\n}\n\nfunc TestReopenStore(t *testing.T) {\n\ttd := setup(t, nil)\n\ttd.store.Close()\n\tstore, _ := NewStore(td.store.config)\n\n\tassert.False(t, store.IsPruned())\n\tassert.Zero(t, store.PruningHeight())\n\tassert.Equal(t, types.Height(10), store.LastCertificate().Height())\n}\n\nfunc TestBlockHash(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tsb, _ := td.store.Block(1)\n\n\tassert.Equal(t, hash.UndefHash, td.store.BlockHash(0))\n\tassert.Equal(t, hash.UndefHash, td.store.BlockHash(types.Height(util.MaxUint32)))\n\tassert.Equal(t, sb.BlockHash, td.store.BlockHash(1))\n}\n\nfunc TestBlockHeight(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tsb, _ := td.store.Block(1)\n\n\tassert.Equal(t, types.Height(0), td.store.BlockHeight(hash.UndefHash))\n\tassert.Equal(t, types.Height(0), td.store.BlockHeight(td.RandHash()))\n\tassert.Equal(t, types.Height(1), td.store.BlockHeight(sb.BlockHash))\n}\n\nfunc TestUnknownTransactionID(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrx, err := td.store.Transaction(td.RandHash())\n\trequire.Error(t, err)\n\tassert.Nil(t, trx)\n}\n\nfunc TestWriteAndClosePeacefully(t *testing.T) {\n\ttd := setup(t, nil)\n\n\t// After closing the database, writing will result in an error\n\ttd.store.Close()\n\trequire.Error(t, td.store.WriteBatch())\n}\n\nfunc TestRetrieveBlockAndTransactions(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tlastCert := td.store.LastCertificate()\n\tlastHeight := lastCert.Height()\n\tcBlk, err := td.store.Block(lastHeight)\n\trequire.NoError(t, err)\n\tassert.Equal(t, lastHeight, cBlk.Height)\n\tblk, _ := cBlk.ToBlock()\n\tassert.Equal(t, lastHeight-1, blk.PrevCertificate().Height())\n\n\tfor _, trx := range blk.Transactions() {\n\t\tcommittedTx, err := td.store.Transaction(trx.ID())\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, committedTx.BlockTime, blk.Header().UnixTime())\n\t\tassert.Equal(t, committedTx.TxID, trx.ID())\n\t\tassert.Equal(t, committedTx.Height, lastHeight)\n\t\ttrx2, _ := committedTx.ToTx()\n\t\tassert.Equal(t, trx.ID(), trx2.ID())\n\t}\n}\n\nfunc TestIndexingPublicKeys(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Query existing public key\", func(t *testing.T) {\n\t\tcBlk, _ := td.store.Block(1)\n\t\tblk, _ := cBlk.ToBlock()\n\t\tfor _, trx := range blk.Transactions()[1:] {\n\t\t\taddr := trx.Payload().Signer()\n\t\t\tpub, err := td.store.PublicKey(addr)\n\t\t\trequire.NoError(t, err)\n\n\t\t\tok := td.store.HasPublicKey(addr)\n\t\t\tassert.True(t, ok)\n\n\t\t\tassert.True(t, trx.PublicKey().EqualsTo(pub))\n\t\t}\n\t})\n\n\tt.Run(\"Query non existing public key\", func(t *testing.T) {\n\t\trandValAddress := td.RandValAddress()\n\t\tpubKey, err := td.store.PublicKey(randValAddress)\n\n\t\tok := td.store.HasPublicKey(randValAddress)\n\t\tassert.False(t, ok)\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, pubKey)\n\t})\n}\n\nfunc TestStrippedPublicKey(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tlastHeight := td.store.LastCertificate().Height()\n\t_, blsPrv := td.RandBLSKeyPair()\n\tcommittedTrx1 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(blsPrv),\n\t)\n\t_, ed25519Prv := td.RandEd25519KeyPair()\n\tcommittedTrx2 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(ed25519Prv),\n\t)\n\tblk0, cert0 := td.GenerateTestBlock(lastHeight+1,\n\t\ttestsuite.BlockWithTransactions([]*tx.Tx{committedTrx1, committedTrx2}))\n\ttd.store.SaveBlock(blk0, cert0)\n\terr := td.store.writeBatch()\n\trequire.NoError(t, err)\n\n\t// We have some known and index public key, run tests...\n\ttrx1 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(blsPrv),\n\t)\n\ttrx2 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(ed25519Prv),\n\t)\n\ttrx3 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(blsPrv),\n\t)\n\ttrx4 := td.GenerateTestTransferTx(\n\t\ttestsuite.TransactionWithSigner(ed25519Prv),\n\t)\n\ttrx5 := td.GenerateTestTransferTx()\n\n\ttrx3.StripPublicKey()\n\ttrx4.StripPublicKey()\n\ttrx5.StripPublicKey()\n\n\ttests := []struct {\n\t\ttrx    *tx.Tx\n\t\tfailed bool\n\t}{\n\t\t{trx1, false}, // indexed public key and not stripped\n\t\t{trx2, false}, // indexed public key and not stripped\n\t\t{trx3, false}, // indexed public key and stripped\n\t\t{trx4, false}, // indexed public key and stripped\n\t\t{trx5, true},  // unknown public key and stripped\n\t}\n\n\tfor no, tt := range tests {\n\t\ttrxs := block.Txs{tt.trx}\n\t\tblockHeight := td.store.LastCertificate().Height()\n\t\tblk, cert := td.GenerateTestBlock(blockHeight+1, testsuite.BlockWithTransactions(trxs))\n\t\ttd.store.SaveBlock(blk, cert)\n\t\terr := td.store.writeBatch()\n\t\trequire.NoError(t, err)\n\n\t\tcBlk, err := td.store.Block(blockHeight + 1)\n\t\trequire.NoError(t, err)\n\n\t\tcTrx, err := td.store.Transaction(tt.trx.ID())\n\t\trequire.NoError(t, err)\n\n\t\t//\n\t\tif tt.failed {\n\t\t\t_, err := cBlk.ToBlock()\n\t\t\trequire.ErrorIs(t, err, PublicKeyNotFoundError{\n\t\t\t\tAddress: tt.trx.Payload().Signer(),\n\t\t\t}, \"test %d failed, expected error\", no+1)\n\n\t\t\t_, err = cTrx.ToTx()\n\t\t\trequire.ErrorIs(t, err, PublicKeyNotFoundError{\n\t\t\t\tAddress: tt.trx.Payload().Signer(),\n\t\t\t}, \"test %d failed, expected error\", no+1)\n\t\t} else {\n\t\t\t_, err := cBlk.ToBlock()\n\t\t\trequire.NoError(t, err, \"test %d failed, not expected error\", no+1)\n\n\t\t\t_, err = cTrx.ToTx()\n\t\t\trequire.NoError(t, err, \"test %d failed, not expected error\", no+1)\n\t\t}\n\t}\n}\n\nfunc TestIsBanned(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\n\tbannedAddr := td.RandValAddress()\n\tconf.BannedAddrs[bannedAddr] = true\n\n\tassert.False(t, td.store.IsBanned(td.RandAccAddress()))\n\tassert.True(t, td.store.IsBanned(bannedAddr))\n}\n\nfunc TestPruneBlock(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\n\tt.Run(\"Prune existing block\", func(t *testing.T) {\n\t\theight := types.Height(1)\n\t\tcBlkOne, _ := td.store.Block(height)\n\t\tblkOne, _ := cBlkOne.ToBlock()\n\t\tpruned, err := td.store.pruneBlock(height)\n\t\tassert.True(t, pruned)\n\t\trequire.NoError(t, err)\n\n\t\terr = td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\n\t\tcBlk, _ := td.store.Block(height)\n\t\tassert.Nil(t, cBlk)\n\n\t\th := td.store.BlockHash(height)\n\t\tassert.Equal(t, hash.UndefHash, h)\n\n\t\tfor _, trx := range blkOne.Transactions() {\n\t\t\tcTrx, _ := td.store.Transaction(trx.ID())\n\t\t\tassert.Nil(t, cTrx)\n\t\t}\n\t})\n\n\tt.Run(\"Prune non existing block\", func(t *testing.T) {\n\t\theight := types.Height(11)\n\t\tpruned, err := td.store.pruneBlock(height)\n\t\tassert.False(t, pruned)\n\t\trequire.NoError(t, err)\n\n\t\terr = td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestPrune(t *testing.T) {\n\tconf := testConfig()\n\tconf.RetentionDays = 1\n\ttd := setup(t, conf)\n\n\ttotalPruned := uint32(0)\n\tlastPruningHeight := types.Height(0)\n\tcallback := func(pruned bool, pruningHeight types.Height) bool {\n\t\tif pruned {\n\t\t\ttotalPruned++\n\t\t}\n\t\tlastPruningHeight = pruningHeight\n\n\t\treturn false\n\t}\n\n\tt.Run(\"Not enough block to prune\", func(t *testing.T) {\n\t\ttotalPruned = uint32(0)\n\t\tlastPruningHeight = types.Height(0)\n\n\t\t// Store doesn't have blocks for one day\n\t\terr := td.store.Prune(callback)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Zero(t, totalPruned)\n\t\tassert.Zero(t, lastPruningHeight)\n\t})\n\n\tt.Run(\"Prune database\", func(t *testing.T) {\n\t\ttotalPruned = uint32(0)\n\t\tlastPruningHeight = types.Height(0)\n\n\t\tblk, cert := td.GenerateTestBlock(blockPerDay + 7)\n\t\ttd.store.SaveBlock(blk, cert)\n\t\terr := td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\n\t\tblk, cert = td.GenerateTestBlock(blockPerDay + 8)\n\t\ttd.store.SaveBlock(blk, cert)\n\t\terr = td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\n\t\t// It should remove blocks [1..8]\n\t\terr = td.store.Prune(callback)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, uint32(8), totalPruned)\n\t\tassert.Equal(t, types.Height(1), lastPruningHeight)\n\t})\n\n\tt.Run(\"Reopen the store\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\ttd.store.config.TxCacheWindow = 1\n\t\ts, err := NewStore(td.store.config)\n\t\trequire.NoError(t, err)\n\t\ttd.store = s.(*store)\n\n\t\tassert.True(t, td.store.IsPruned(), \"store should be in prune mode\")\n\t\tassert.Equal(t, types.Height(8), td.store.PruningHeight())\n\t})\n\n\tt.Run(\"Commit new block\", func(t *testing.T) {\n\t\tblk, cert := td.GenerateTestBlock(blockPerDay + 9)\n\t\ttd.store.SaveBlock(blk, cert)\n\t\terr := td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\n\t\tcBlk, err := td.store.Block(9)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, cBlk)\n\n\t\tassert.Equal(t, types.Height(9), td.store.PruningHeight())\n\t})\n}\n\nfunc TestCancelPrune(t *testing.T) {\n\tconf := testConfig()\n\tconf.RetentionDays = 1\n\ttd := setup(t, conf)\n\n\thits := uint32(0)\n\tcallback := func(_ bool, _ types.Height) bool {\n\t\thits++\n\n\t\treturn true // Cancel pruning\n\t}\n\n\tt.Run(\"Cancel Pruning database\", func(t *testing.T) {\n\t\tblk, cert := td.GenerateTestBlock(blockPerDay + 7)\n\t\ttd.store.SaveBlock(blk, cert)\n\t\terr := td.store.WriteBatch()\n\t\trequire.NoError(t, err)\n\n\t\terr = td.store.Prune(callback)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, uint32(1), hits)\n\t})\n}\n\nfunc TestRecentTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tlastHeight := td.store.LastCertificate().Height()\n\toldTrx := td.GenerateTestTransferTx()\n\tblkOld, certOld := td.GenerateTestBlock(lastHeight+1,\n\t\ttestsuite.BlockWithTransactions([]*tx.Tx{oldTrx}))\n\ttd.store.SaveBlock(blkOld, certOld)\n\terr := td.store.writeBatch()\n\trequire.NoError(t, err)\n\tassert.True(t, td.store.RecentTransaction(oldTrx.ID()))\n\n\tblk, cert := td.GenerateTestBlock(lastHeight.SafeIncrease(td.store.txStore.txCacheWindow + 2))\n\ttd.store.SaveBlock(blk, cert)\n\terr = td.store.writeBatch()\n\trequire.NoError(t, err)\n\n\tassert.False(t, td.store.RecentTransaction(oldTrx.ID()))\n\tassert.False(t, td.store.RecentTransaction(td.RandHash()))\n}\n"
  },
  {
    "path": "store/tx.go",
    "content": "package store\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n\t\"github.com/pactus-project/pactus/util/linkedmap\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n)\n\ntype blockRegion struct {\n\theight types.Height\n\toffset uint32\n\tlength uint32\n}\n\nfunc txKey(txID tx.ID) []byte { return append(txPrefix, txID.Bytes()...) }\n\ntype txStore struct {\n\tdb            *leveldb.DB\n\ttxCache       *linkedmap.LinkedMap[tx.ID, types.Height]\n\ttxCacheWindow uint32\n}\n\nfunc newTxStore(db *leveldb.DB, txCacheWindow uint32) *txStore {\n\treturn &txStore{\n\t\tdb:            db,\n\t\ttxCache:       linkedmap.New[tx.ID, types.Height](0),\n\t\ttxCacheWindow: txCacheWindow,\n\t}\n}\n\nfunc (ts *txStore) saveTxs(batch *leveldb.Batch, txs block.Txs, regs []blockRegion) {\n\tfor i, trx := range txs {\n\t\tbuf := bytes.NewBuffer(make([]byte, 0, 32+4))\n\n\t\treg := regs[i]\n\t\terr := encoding.WriteElements(buf, &reg.height, &reg.offset, &reg.length)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\ttxID := trx.ID()\n\t\tkey := txKey(txID)\n\t\tbatch.Put(key, buf.Bytes())\n\t\tts.addToCache(txID, reg.height)\n\t}\n}\n\nfunc (ts *txStore) pruneCache(currentHeight types.Height) {\n\tfor {\n\t\thead := ts.txCache.HeadNode()\n\t\ttxHeight := head.Data.Value\n\n\t\tif currentHeight.SafeSub(txHeight) <= ts.txCacheWindow {\n\t\t\tbreak\n\t\t}\n\t\tts.txCache.RemoveHead()\n\t}\n}\n\nfunc (ts *txStore) recentTransaction(txID tx.ID) bool {\n\treturn ts.txCache.Has(txID)\n}\n\nfunc (ts *txStore) tx(txID tx.ID) (*blockRegion, error) {\n\tdata, err := tryGet(ts.db, txKey(txID))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tr := bytes.NewReader(data)\n\treg := new(blockRegion)\n\tif err := encoding.ReadElements(r, &reg.height, &reg.offset, &reg.length); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn reg, nil\n}\n\nfunc (ts *txStore) addToCache(txID tx.ID, height types.Height) {\n\tts.txCache.PushBack(txID, height)\n}\n"
  },
  {
    "path": "store/validator.go",
    "content": "package store\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/syndtr/goleveldb/leveldb\"\n\t\"github.com/syndtr/goleveldb/leveldb/util\"\n)\n\ntype validatorStore struct {\n\tdb         *leveldb.DB\n\tnumberMap  map[int32]*validator.Validator\n\taddressMap map[crypto.Address]*validator.Validator\n\ttotal      int32\n\tactive     int32\n}\n\nfunc valKey(addr crypto.Address) []byte { return append(validatorPrefix, addr.Bytes()...) }\n\nfunc newValidatorStore(db *leveldb.DB) *validatorStore {\n\ttotal := int32(0)\n\tactive := int32(0)\n\tnumberMap := make(map[int32]*validator.Validator)\n\taddressMap := make(map[crypto.Address]*validator.Validator)\n\tr := util.BytesPrefix(validatorPrefix)\n\titer := db.NewIterator(r, nil)\n\tfor iter.Next() {\n\t\tvalue := iter.Value()\n\n\t\tval, err := validator.FromBytes(value)\n\t\tif err != nil {\n\t\t\tlogger.Panic(\"unable to decode validator\", \"error\", err)\n\t\t}\n\n\t\tnumberMap[val.Number()] = val\n\t\taddressMap[val.Address()] = val\n\t\ttotal++\n\n\t\tif !val.IsUnbonded() {\n\t\t\tactive++\n\t\t}\n\t}\n\titer.Release()\n\n\treturn &validatorStore{\n\t\tdb:         db,\n\t\ttotal:      total,\n\t\tactive:     active,\n\t\tnumberMap:  numberMap,\n\t\taddressMap: addressMap,\n\t}\n}\n\nfunc (vs *validatorStore) hasValidator(addr crypto.Address) bool {\n\t_, ok := vs.addressMap[addr]\n\n\treturn ok\n}\n\nfunc (vs *validatorStore) ValidatorAddresses() []crypto.Address {\n\taddrs := make([]crypto.Address, 0, len(vs.addressMap))\n\tfor addr := range vs.addressMap {\n\t\taddrs = append(addrs, addr)\n\t}\n\n\treturn addrs\n}\n\nfunc (vs *validatorStore) validator(addr crypto.Address) (*validator.Validator, error) {\n\tval, ok := vs.addressMap[addr]\n\tif ok {\n\t\treturn val.Clone(), nil\n\t}\n\n\treturn nil, ErrNotFound\n}\n\nfunc (vs *validatorStore) validatorByNumber(num int32) (*validator.Validator, error) {\n\tval, ok := vs.numberMap[num]\n\tif ok {\n\t\treturn val.Clone(), nil\n\t}\n\n\treturn nil, ErrNotFound\n}\n\nfunc (vs *validatorStore) iterateValidators(consumer func(*validator.Validator) (stop bool)) {\n\tfor _, val := range vs.addressMap {\n\t\tstopped := consumer(val.Clone())\n\t\tif stopped {\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// This function takes ownership of the validator pointer.\n// It is important that the caller should not modify the validator data and\n// keep it immutable.\nfunc (vs *validatorStore) updateValidator(batch *leveldb.Batch, val *validator.Validator) {\n\tdata, err := val.Bytes()\n\tif err != nil {\n\t\tlogger.Panic(\"unable to encode validator\", \"error\", err)\n\t}\n\n\toldVal, ok := vs.addressMap[val.Address()]\n\tif !ok {\n\t\tvs.total++\n\t\tvs.active++\n\t} else if !oldVal.IsUnbonded() && val.IsUnbonded() {\n\t\tvs.active--\n\t}\n\tvs.numberMap[val.Number()] = val\n\tvs.addressMap[val.Address()] = val\n\n\tbatch.Put(valKey(val.Address()), data)\n}\n\nfunc (vs *validatorStore) updateValidatorProtocolVersion(addr crypto.Address, ver protocol.Version) {\n\tval, ok := vs.addressMap[addr]\n\tif ok {\n\t\tval.UpdateProtocolVersion(ver)\n\t}\n}\n"
  },
  {
    "path": "store/validator_test.go",
    "content": "package store\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestValidatorCounter(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tval := td.GenerateTestValidator()\n\n\tt.Run(\"Add new validator, should increase the total validators number\", func(t *testing.T) {\n\t\tnewVal := val.Clone()\n\t\ttd.store.UpdateValidator(newVal)\n\n\t\tassert.Equal(t, int32(1), td.store.TotalValidators())\n\t\tassert.Equal(t, int32(1), td.store.ActiveValidators())\n\t})\n\n\tt.Run(\"Update validator, should not change the total and active validators number\", func(t *testing.T) {\n\t\tnewVal := val.Clone()\n\t\tnewVal.AddToStake(1)\n\t\ttd.store.UpdateValidator(newVal)\n\n\t\tassert.Equal(t, int32(1), td.store.TotalValidators())\n\t\tassert.Equal(t, int32(1), td.store.ActiveValidators())\n\t})\n\n\tt.Run(\"Unbond validator, should decrease the active validators number\", func(t *testing.T) {\n\t\tnewVal := val.Clone()\n\t\tnewVal.UpdateUnbondingHeight(td.RandHeight())\n\t\ttd.store.UpdateValidator(newVal)\n\n\t\tassert.Equal(t, int32(1), td.store.TotalValidators())\n\t\tassert.Equal(t, int32(0), td.store.ActiveValidators())\n\t})\n\n\tt.Run(\"Update unbonded validator, should not change the active validators number\", func(t *testing.T) {\n\t\tnewVal := val.Clone()\n\t\tnewVal.UpdateUnbondingHeight(td.RandHeight())\n\t\ttd.store.UpdateValidator(newVal)\n\n\t\tassert.Equal(t, int32(1), td.store.TotalValidators())\n\t\tassert.Equal(t, int32(0), td.store.ActiveValidators())\n\t})\n}\n\nfunc TestValidatorBatchSaving(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\tt.Run(\"Add some validators\", func(t *testing.T) {\n\t\tfor i := int32(0); i < total; i++ {\n\t\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithNumber(i))\n\t\t\ttd.store.UpdateValidator(val)\n\t\t}\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, total, td.store.TotalValidators())\n\t})\n\n\tt.Run(\"Close and load db\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\tstore, _ := NewStore(td.store.config)\n\t\tassert.Equal(t, total, store.TotalValidators())\n\t})\n}\n\nfunc TestValidatorAddresses(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\taddrs1 := make([]crypto.Address, 0, total)\n\n\tfor i := int32(0); i < total; i++ {\n\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithNumber(i))\n\t\ttd.store.UpdateValidator(val)\n\t\taddrs1 = append(addrs1, val.Address())\n\t}\n\n\taddrs2 := td.store.ValidatorAddresses()\n\tassert.ElementsMatch(t, addrs1, addrs2)\n}\n\nfunc TestValidatorByNumber(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\tt.Run(\"Add some validators\", func(t *testing.T) {\n\t\tfor i := int32(0); i < total; i++ {\n\t\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithNumber(i))\n\t\t\ttd.store.UpdateValidator(val)\n\t\t}\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, total, td.store.TotalValidators())\n\t})\n\n\tt.Run(\"Get a random Validator\", func(t *testing.T) {\n\t\tnum := td.RandInt32Max(total)\n\t\tval, err := td.store.ValidatorByNumber(num)\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, val)\n\t\tassert.Equal(t, num, val.Number())\n\t})\n\n\tt.Run(\"Negative number\", func(t *testing.T) {\n\t\tval, err := td.store.ValidatorByNumber(-1)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, val)\n\t})\n\n\tt.Run(\"Non existing validator\", func(t *testing.T) {\n\t\taddr := td.RandValAddress()\n\t\tval, err := td.store.Validator(addr)\n\t\thas := td.store.HasValidator(addr)\n\n\t\tassert.False(t, has)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, val)\n\t})\n\n\tt.Run(\"Reopen the store\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\tstore, _ := NewStore(td.store.config)\n\n\t\tnum := td.RandInt32Max(total)\n\t\tval, err := store.ValidatorByNumber(num)\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, val)\n\t\tassert.Equal(t, num, val.Number())\n\n\t\tval, err = td.store.ValidatorByNumber(total + 1)\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, val)\n\t})\n}\n\nfunc TestValidatorByAddress(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\tt.Run(\"Add some validators\", func(t *testing.T) {\n\t\tfor i := int32(0); i < total; i++ {\n\t\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithNumber(i))\n\t\t\ttd.store.UpdateValidator(val)\n\t\t}\n\t\trequire.NoError(t, td.store.WriteBatch())\n\t\tassert.Equal(t, total, td.store.TotalValidators())\n\t})\n\n\tt.Run(\"Get random validator\", func(t *testing.T) {\n\t\tnum := td.RandInt32Max(total)\n\t\tval0, _ := td.store.ValidatorByNumber(num)\n\t\tval, err := td.store.Validator(val0.Address())\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, val)\n\t\tassert.Equal(t, num, val.Number())\n\t})\n\n\tt.Run(\"Unknown address\", func(t *testing.T) {\n\t\tval, err := td.store.Validator(td.RandAccAddress())\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, val)\n\t})\n\n\tt.Run(\"Reopen the store\", func(t *testing.T) {\n\t\ttd.store.Close()\n\t\tstore, _ := NewStore(td.store.config)\n\n\t\tnum := td.RandInt32Max(total)\n\t\tval0, _ := store.ValidatorByNumber(num)\n\t\tval, err := store.Validator(val0.Address())\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, val)\n\t\tassert.Equal(t, num, val.Number())\n\t})\n}\n\nfunc TestIterateValidators(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttotal := td.RandInt32NonZero(100)\n\thashes1 := []hash.Hash{}\n\tfor i := int32(0); i < total; i++ {\n\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithNumber(i))\n\t\ttd.store.UpdateValidator(val)\n\t\thashes1 = append(hashes1, val.Hash())\n\t}\n\trequire.NoError(t, td.store.WriteBatch())\n\n\thashes2 := []hash.Hash{}\n\ttd.store.IterateValidators(func(val *validator.Validator) bool {\n\t\thashes2 = append(hashes2, val.Hash())\n\n\t\treturn false\n\t})\n\tassert.ElementsMatch(t, hashes1, hashes2)\n\n\tstopped := false\n\ttd.store.IterateValidators(func(val *validator.Validator) bool {\n\t\tif val.Hash() == hashes1[0] {\n\t\t\tstopped = true\n\t\t}\n\n\t\treturn stopped\n\t})\n\tassert.True(t, stopped)\n}\n\nfunc TestValidatorDeepCopy(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tnum := td.RandInt32NonZero(1000)\n\tval1 := td.GenerateTestValidator(testsuite.ValidatorWithNumber(num))\n\ttd.store.UpdateValidator(val1)\n\n\tval2, _ := td.store.ValidatorByNumber(num)\n\tval2.AddToStake(1)\n\tassert.NotEqual(t, td.store.validatorStore.numberMap[num].Hash(), val2.Hash())\n\n\tval3, _ := td.store.Validator(val1.Address())\n\tval3.AddToStake(1)\n\tassert.NotEqual(t, td.store.validatorStore.numberMap[num].Hash(), val3.Hash())\n}\n\nfunc TestUpdateValidatorProtocolVersion(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tval1 := td.GenerateTestValidator()\n\ttd.store.UpdateValidator(val1)\n\ttd.store.UpdateValidatorProtocolVersion(val1.Address(), protocol.ProtocolVersion2)\n\n\tval2, _ := td.store.Validator(val1.Address())\n\tassert.Equal(t, protocol.ProtocolVersion2, val2.ProtocolVersion())\n}\n"
  },
  {
    "path": "sync/bundle/bundle.go",
    "content": "package bundle\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\nconst (\n\tBundleFlagNetworkMainnet = 0x0001\n\tBundleFlagNetworkTestnet = 0x0002\n\tBundleFlagCarrierLibP2P  = 0x0010\n\tBundleFlagCompressed     = 0x0100\n\tBundleFlagBroadcasted    = 0x0200\n\tBundleFlagHandshaking    = 0x0400\n)\n\n// Custom type to enforce uint32 encoding as 4 bytes, ignoring zeros.\ntype fixedUint32 uint32\n\nfunc (u fixedUint32) MarshalCBOR() ([]byte, error) {\n\tbuf := make([]byte, 0, 5)\n\n\t// The header for a 4-byte integer is 0x1A followed by the 4 bytes of the uint32.\n\tbuf = append(buf, 0x1A)\n\n\t// Append the uint32 in big-endian format\n\tbuf = binary.BigEndian.AppendUint32(buf, uint32(u))\n\n\treturn buf, nil\n}\n\ntype Bundle struct {\n\tFlags           int\n\tMessage         message.Message\n\tConsensusHeight types.Height\n}\n\nfunc NewBundle(msg message.Message) *Bundle {\n\treturn &Bundle{\n\t\tFlags:           0,\n\t\tMessage:         msg,\n\t\tConsensusHeight: msg.ConsensusHeight(),\n\t}\n}\n\n// BasicCheck performs basic validation checks on the bundle and its message.\nfunc (b *Bundle) BasicCheck() error {\n\treturn b.Message.BasicCheck()\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (b *Bundle) LogString() string {\n\treturn fmt.Sprintf(\"%s%s\", b.Message.Type(), b.Message.LogString())\n}\n\nfunc (b *Bundle) CompressIt() {\n\tb.Flags = util.SetFlag(b.Flags, BundleFlagCompressed)\n}\n\ntype _Bundle struct {\n\tFlags           int          `cbor:\"1,keyasint\"`\n\tMessageType     message.Type `cbor:\"2,keyasint\"`\n\tMessageData     []byte       `cbor:\"3,keyasint\"`\n\tConsensusHeight fixedUint32  `cbor:\"4,keyasint,omitempty\"`\n}\n\nfunc (b *Bundle) Encode() ([]byte, error) {\n\tdata, err := cbor.Marshal(b.Message)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif util.IsFlagSet(b.Flags, BundleFlagCompressed) {\n\t\tc, err := util.CompressBuffer(data)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata = c\n\t}\n\n\tmsg := &_Bundle{\n\t\tFlags:           b.Flags,\n\t\tMessageType:     b.Message.Type(),\n\t\tMessageData:     data,\n\t\tConsensusHeight: fixedUint32(b.ConsensusHeight),\n\t}\n\n\treturn cbor.Marshal(msg)\n}\n\nfunc (b *Bundle) Decode(r io.Reader) (int, error) {\n\tvar bdl _Bundle\n\tdecOpts := cbor.DecOptions{}\n\tdecOpts.MaxArrayElements = 65_536 // default in 131072\n\tdecOpts.MaxMapPairs = 65_536      // default in 131072\n\tdecMode, _ := decOpts.DecMode()\n\td := decMode.NewDecoder(r)\n\terr := d.Decode(&bdl)\n\tbytesRead := d.NumBytesRead()\n\tif err != nil {\n\t\treturn bytesRead, err\n\t}\n\n\tdata := bdl.MessageData\n\tmsg, err := message.MakeMessage(bdl.MessageType)\n\tif err != nil {\n\t\treturn bytesRead, err\n\t}\n\n\tif util.IsFlagSet(bdl.Flags, BundleFlagCompressed) {\n\t\tc, err := util.DecompressBuffer(bdl.MessageData)\n\t\tif err != nil {\n\t\t\treturn bytesRead, err\n\t\t}\n\t\tdata = c\n\t}\n\n\tb.Flags = bdl.Flags\n\tb.Message = msg\n\tb.ConsensusHeight = types.Height(bdl.ConsensusHeight)\n\n\treturn bytesRead, cbor.Unmarshal(data, msg)\n}\n"
  },
  {
    "path": "sync/bundle/bundle_test.go",
    "content": "package bundle\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestInvalidCBOR(t *testing.T) {\n\tdata1, _ := hex.DecodeString(\"00\")\n\tdata2, _ := hex.DecodeString(\"A3\")\n\tdata3, _ := hex.DecodeString(\"A3010002000340\")\n\tbdl := new(Bundle)\n\t_, err := bdl.Decode(bytes.NewReader(data1))\n\trequire.Error(t, err)\n\t_, err = bdl.Decode(bytes.NewReader(data2))\n\trequire.Error(t, err)\n\t_, err = bdl.Decode(bytes.NewReader(data3))\n\trequire.Error(t, err)\n}\n\nfunc TestMessageCompress(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblocksData := [][]byte{}\n\tfor i := 0; i < ts.RandIntMax(40); i++ {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\t\tdata, _ := blk.Bytes()\n\t\tblocksData = append(blocksData, data)\n\t}\n\tmsg1 := message.NewBlocksResponseMessage(message.ResponseCodeOK, message.ResponseCodeOK.String(),\n\t\t1234, 888, blocksData, nil)\n\tbdl := NewBundle(msg1)\n\tbs0, err := bdl.Encode()\n\trequire.NoError(t, err)\n\tassert.False(t, util.IsFlagSet(bdl.Flags, BundleFlagCompressed))\n\n\tbdl.CompressIt()\n\tbs1, err := bdl.Encode()\n\trequire.NoError(t, err)\n\tassert.True(t, util.IsFlagSet(bdl.Flags, BundleFlagCompressed))\n\n\tfmt.Printf(\"Compressed :%v%%\\n\", 100-len(bs1)*100/(len(bs0)))\n\tfmt.Printf(\"Uncompressed len :%v\\n\", len(bs0))\n\tfmt.Printf(\"Compressed len :%v\\n\", len(bs1))\n\n\tmsg2 := new(Bundle)\n\tbytesRead1, err := msg2.Decode(bytes.NewReader(bs0))\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(bs0), bytesRead1)\n\trequire.NoError(t, msg2.BasicCheck())\n\n\tmsg3 := new(Bundle)\n\tbytesRead2, err := msg3.Decode(bytes.NewReader(bs1))\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(bs1), bytesRead2)\n\trequire.NoError(t, msg3.BasicCheck())\n}\n\nfunc TestDecodeVoteMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tv, _ := ts.GenerateTestPrecommitVote(88, 0)\n\tmsg := message.NewVoteMessage(v)\n\tbdl := NewBundle(msg)\n\tbs0, err := bdl.Encode()\n\trequire.NoError(t, err)\n\tbdl.CompressIt()\n\tbs1, err := bdl.Encode()\n\trequire.NoError(t, err)\n\tfmt.Printf(\"Compressed :%v%%\\n\", 100-len(bs1)*100/(len(bs0)))\n\tfmt.Printf(\"Uncompressed len :%v\\n\", len(bs0))\n\tfmt.Printf(\"Compressed len :%v\\n\", len(bs1))\n}\n\nfunc TestDecodeVoteCBOR(t *testing.T) {\n\tdat1, _ := hex.DecodeString(\n\t\t\"a4\" + // Map(4)\n\t\t\t\"0100\" + // Flags = 0\n\t\t\t\"0207\" + // Message Type = 7 (TypeVote)\n\t\t\t\"035879\" + // Message + Len\n\t\t\t\"\" + \"a101a7010102186403010458200264572d4d6bfcd2140d4f885fd5a32fe42fdb\" + // Vote Message Uncompressed\n\t\t\t\"\" + \"f40551e4ff89f3d235e32b4b92055501c0067d277f2dff99943016d6a0f379cf\" +\n\t\t\t\"\" + \"09846c6f06f60758308ab7aecbe03c4ed5b688bcb7e848baffa62bcbf1a40215\" +\n\t\t\t\"\" + \"22c56693f0a7bbcc1fe865277556ee59c1f63ba592acfe1b43\" +\n\t\t\t\"041a00001234\") // Consensus Height (0x00001234)\n\tdata2, _ := hex.DecodeString(\n\t\t\"a4\" + // Map(4)\n\t\t\t\"01190100\" + // Flags = 0x0100 (compressed)\n\t\t\t\"0207\" + // Message Type = 7 (TypeVote)\n\t\t\t\"035895\" + // Message + Len\n\t\t\t\"\" + \"1f8b08000000000000ff00790086ffa101a7010102186403010458200264572d\" + // Vote Uncompressed\n\t\t\t\"\" + \"4d6bfcd2140d4f885fd5a32fe42fdbf40551e4ff89f3d235e32b4b92055501c0\" +\n\t\t\t\"\" + \"067d277f2dff99943016d6a0f379cf09846c6f06f60758308ab7aecbe03c4ed5\" +\n\t\t\t\"\" + \"b688bcb7e848baffa62bcbf1a4021522c56693f0a7bbcc1fe865277556ee59c1\" +\n\t\t\t\"\" + \"f63ba592acfe1b43010000ffff798ce7ec79000000\" +\n\t\t\t\"041a00001234\") // Consensus Height (0x00001234)\n\n\tbdl1 := new(Bundle)\n\tbdl2 := new(Bundle)\n\tbytesRead1, err := bdl1.Decode(bytes.NewReader(dat1))\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(dat1), bytesRead1)\n\trequire.NoError(t, bdl1.BasicCheck())\n\n\tbytesRead2, err := bdl2.Decode(bytes.NewReader(data2))\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(data2), bytesRead2)\n\trequire.NoError(t, bdl2.BasicCheck())\n\n\tassert.Equal(t, bdl1.Message, bdl2.Message)\n\tassert.Equal(t, 0x0000, bdl1.Flags)\n\tassert.Equal(t, 0x0100, bdl2.Flags)\n\tassert.Contains(t, bdl1.LogString(), \"vote\")\n\n\tassert.Equal(t, types.Height(0x1234), bdl1.ConsensusHeight)\n\tassert.Equal(t, types.Height(0x1234), bdl2.ConsensusHeight)\n}\n\nfunc TestEncodingData(t *testing.T) {\n\tt.Run(\"Encoding non-consensus message\", func(t *testing.T) {\n\t\tmsg := message.NewBlocksRequestMessage(0x00, 0x12, 0x13)\n\t\tbdl := NewBundle(msg)\n\t\tdata, _ := bdl.Encode()\n\n\t\texpectedData := \"a4\" + // Map(3)\n\t\t\t\"0100\" + // Flags = 0\n\t\t\t\"0209\" + // Message Type = 9 (TypeBlocksRequest)\n\t\t\t\"0347\" + // Message + Len\n\t\t\t\"\" + \"a3\" +\n\t\t\t\"\" + \"0100\" +\n\t\t\t\"\" + \"0212\" +\n\t\t\t\"\" + \"0313\" +\n\t\t\t\"041a00000000\" // Consensus height (0x00000000)\n\t\tassert.Equal(t, expectedData, hex.EncodeToString(data))\n\t\tassert.Equal(t, types.Height(0x00), bdl.ConsensusHeight)\n\t})\n\n\tt.Run(\"Encoding consensus message\", func(t *testing.T) {\n\t\tts := testsuite.NewTestSuite(t)\n\n\t\trndAddr := ts.RandValAddress()\n\t\tmsg := message.NewQueryVoteMessage(0x12, 0x01, rndAddr)\n\t\tbdl := NewBundle(msg)\n\t\tdata, _ := bdl.Encode()\n\n\t\texpectedData := \"a4\" + // Map(3)\n\t\t\t\"0100\" + // Flags = 0\n\t\t\t\"0206\" + // Message Type = 6 (TypeQueryVote)\n\t\t\t\"03581c\" + // Message + Len\n\t\t\t\"\" + \"a3\" +\n\t\t\t\"\" + \"0112\" +\n\t\t\t\"\" + \"0201\" +\n\t\t\t\"\" + \"0355\" + hex.EncodeToString(rndAddr.Bytes()) +\n\t\t\t\"041a00000012\" // Consensus height (0x00000012)\n\t\tassert.Equal(t, expectedData, hex.EncodeToString(data))\n\t\tassert.Equal(t, types.Height(0x12), bdl.ConsensusHeight)\n\t})\n}\n\nfunc TestCBORLengthAttack(t *testing.T) {\n\ttests := []struct {\n\t\tdata string\n\t\tmsg  string\n\t}{\n\t\t{\"9A00010001\", \"exceeded max number of elements 65536\"},        // Major type 4 (100x xxxx): Array\n\t\t{\"BA00010001\", \"exceeded max number of key-value pairs 65536\"}, // Major type 5 (101x xxxx): Map\n\t}\n\n\tfor _, tt := range tests {\n\t\tdata, _ := hex.DecodeString(tt.data)\n\t\tbdl := new(Bundle)\n\t\t_, err := bdl.Decode(bytes.NewReader(data))\n\n\t\tassert.ErrorContains(t, err, tt.msg)\n\t}\n}\n"
  },
  {
    "path": "sync/bundle/message/block_announce.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n)\n\ntype BlockAnnounceMessage struct {\n\tBlock       *block.Block             `cbor:\"1,keyasint\"`\n\tCertificate *certificate.Certificate `cbor:\"2,keyasint\"`\n\tProof       *certificate.Certificate `cbor:\"3,keyasint\"`\n}\n\nfunc NewBlockAnnounceMessage(blk *block.Block,\n\tcert *certificate.Certificate, proof *certificate.Certificate,\n) *BlockAnnounceMessage {\n\treturn &BlockAnnounceMessage{\n\t\tBlock:       blk,\n\t\tCertificate: cert,\n\t\tProof:       proof,\n\t}\n}\n\nfunc (m *BlockAnnounceMessage) BasicCheck() error {\n\tif err := m.Block.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\n\tif m.Proof != nil {\n\t\tif err := m.Proof.BasicCheck(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn m.Certificate.BasicCheck()\n}\n\nfunc (m *BlockAnnounceMessage) Height() types.Height {\n\treturn m.Certificate.Height()\n}\n\nfunc (*BlockAnnounceMessage) Type() Type {\n\treturn TypeBlockAnnounce\n}\n\nfunc (*BlockAnnounceMessage) TopicID() network.TopicID {\n\treturn network.TopicIDBlock\n}\n\nfunc (*BlockAnnounceMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (m *BlockAnnounceMessage) ConsensusHeight() types.Height {\n\treturn m.Certificate.Height()\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *BlockAnnounceMessage) LogString() string {\n\treturn fmt.Sprintf(\"{⌘ %d %v}\",\n\t\tm.Certificate.Height(),\n\t\tm.Block.Hash().LogString())\n}\n"
  },
  {
    "path": "sync/bundle/message/block_announce_test.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBlockAnnounceType(t *testing.T) {\n\tsmg := &BlockAnnounceMessage{}\n\tassert.Equal(t, TypeBlockAnnounce, smg.Type())\n}\n\nfunc TestBlockAnnounceMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid block certificate\", func(t *testing.T) {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\t\tcert := certificate.NewCertificate(0, 0)\n\t\tmsg := NewBlockAnnounceMessage(blk, cert, nil)\n\t\terr := msg.BasicCheck()\n\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"height is not positive: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid proof\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\tblk, cert := ts.GenerateTestBlock(height)\n\t\tproof := ts.GenerateTestCertificate(0)\n\t\tmsg := NewBlockAnnounceMessage(blk, cert, proof)\n\t\terr := msg.BasicCheck()\n\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"height is not positive: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\tblk, cert := ts.GenerateTestBlock(height)\n\t\tmsg := NewBlockAnnounceMessage(blk, cert, nil)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Equal(t, height, msg.ConsensusHeight())\n\t\tassert.Contains(t, msg.LogString(), fmt.Sprintf(\"%d\", height))\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/blocks_request.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype BlocksRequestMessage struct {\n\tSessionID int          `cbor:\"1,keyasint\"`\n\tFrom      types.Height `cbor:\"2,keyasint\"`\n\tCount     uint32       `cbor:\"3,keyasint\"`\n}\n\nfunc NewBlocksRequestMessage(sid int, from types.Height, count uint32) *BlocksRequestMessage {\n\treturn &BlocksRequestMessage{\n\t\tSessionID: sid,\n\t\tFrom:      from,\n\t\tCount:     count,\n\t}\n}\n\nfunc (m *BlocksRequestMessage) To() types.Height {\n\treturn m.From.SafeIncrease(m.Count) - 1\n}\n\nfunc (m *BlocksRequestMessage) BasicCheck() error {\n\tif m.From == 0 {\n\t\treturn BasicCheckError{Reason: \"invalid height\"}\n\t}\n\tif m.Count == 0 {\n\t\treturn BasicCheckError{Reason: \"count is zero\"}\n\t}\n\n\treturn nil\n}\n\nfunc (*BlocksRequestMessage) Type() Type {\n\treturn TypeBlocksRequest\n}\n\nfunc (*BlocksRequestMessage) TopicID() network.TopicID {\n\treturn network.TopicIDUnspecified\n}\n\nfunc (*BlocksRequestMessage) ShouldBroadcast() bool {\n\treturn false\n}\n\nfunc (*BlocksRequestMessage) ConsensusHeight() types.Height {\n\treturn 0\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *BlocksRequestMessage) LogString() string {\n\treturn fmt.Sprintf(\"{⚓ %d %v:%v}\", m.SessionID, m.From, m.To())\n}\n"
  },
  {
    "path": "sync/bundle/message/blocks_request_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestLatestBlocksRequestType(t *testing.T) {\n\tmsg := &BlocksRequestMessage{}\n\tassert.Equal(t, TypeBlocksRequest, msg.Type())\n}\n\nfunc TestBlocksRequestMessage(t *testing.T) {\n\tt.Run(\"Invalid height\", func(t *testing.T) {\n\t\tmsg := NewBlocksRequestMessage(1, 0, 0)\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{Reason: \"invalid height\"})\n\t})\n\tt.Run(\"Invalid count\", func(t *testing.T) {\n\t\tmsg := NewBlocksRequestMessage(1, 200, 0)\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{Reason: \"count is zero\"})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tmsg := NewBlocksRequestMessage(1, 100, 7)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Equal(t, types.Height(106), msg.To())\n\t\tassert.Contains(t, msg.LogString(), \"100\")\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/blocks_response.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n)\n\ntype BlocksResponseMessage struct {\n\tResponseCode    ResponseCode             `cbor:\"1,keyasint\"`\n\tSessionID       int                      `cbor:\"2,keyasint\"`\n\tFrom            types.Height             `cbor:\"3,keyasint\"`\n\tBlocksData      [][]byte                 `cbor:\"4,keyasint\"`\n\tLastCertificate *certificate.Certificate `cbor:\"5,keyasint\"`\n\tReason          string                   `cbor:\"6,keyasint\"`\n}\n\nfunc NewBlocksResponseMessage(code ResponseCode, reason string, sid int, from types.Height,\n\tblocksData [][]byte, lastCert *certificate.Certificate,\n) *BlocksResponseMessage {\n\treturn &BlocksResponseMessage{\n\t\tResponseCode:    code,\n\t\tSessionID:       sid,\n\t\tFrom:            from,\n\t\tBlocksData:      blocksData,\n\t\tLastCertificate: lastCert,\n\t\tReason:          reason,\n\t}\n}\n\nfunc (m *BlocksResponseMessage) BasicCheck() error {\n\tif m.LastCertificate != nil {\n\t\tif err := m.LastCertificate.BasicCheck(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (*BlocksResponseMessage) Type() Type {\n\treturn TypeBlocksResponse\n}\n\nfunc (*BlocksResponseMessage) TopicID() network.TopicID {\n\treturn network.TopicIDUnspecified\n}\n\nfunc (*BlocksResponseMessage) ShouldBroadcast() bool {\n\treturn false\n}\n\nfunc (*BlocksResponseMessage) ConsensusHeight() types.Height {\n\treturn 0\n}\n\nfunc (m *BlocksResponseMessage) Count() uint32 {\n\treturn uint32(len(m.BlocksData))\n}\n\nfunc (m *BlocksResponseMessage) To() types.Height {\n\t// response message without any block\n\tif len(m.BlocksData) == 0 {\n\t\treturn 0\n\t}\n\n\treturn m.From.SafeIncrease(m.Count()) - 1\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *BlocksResponseMessage) LogString() string {\n\treturn fmt.Sprintf(\"{⚓ %d %s %v-%v}\", m.SessionID, m.ResponseCode, m.From, m.To())\n}\n\nfunc (m *BlocksResponseMessage) IsRequestRejected() bool {\n\treturn m.ResponseCode == ResponseCodeRejected\n}\n"
  },
  {
    "path": "sync/bundle/message/blocks_response_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestLatestBlocksResponseType(t *testing.T) {\n\tmsg := &BlocksResponseMessage{}\n\tassert.Equal(t, TypeBlocksResponse, msg.Type())\n}\n\nfunc TestBlocksResponseMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsid := 123\n\tt.Run(\"Invalid certificate\", func(t *testing.T) {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\t\tcert := certificate.NewCertificate(0, 0)\n\t\td, _ := blk.Bytes()\n\t\tmsg := NewBlocksResponseMessage(ResponseCodeMoreBlocks, ResponseCodeMoreBlocks.String(),\n\t\t\tsid, ts.RandHeight(), [][]byte{d}, cert)\n\t\terr := msg.BasicCheck()\n\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"height is not positive: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\tblk1, _ := ts.GenerateTestBlock(height)\n\t\tblk2, cert2 := ts.GenerateTestBlock(height + 1)\n\t\td1, _ := blk1.Bytes()\n\t\td2, _ := blk2.Bytes()\n\t\tmsg := NewBlocksResponseMessage(ResponseCodeMoreBlocks, ResponseCodeMoreBlocks.String(),\n\t\t\tsid, 100, [][]byte{d1, d2}, cert2)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), \"100\")\n\t\tassert.Equal(t, ResponseCodeMoreBlocks.String(), msg.Reason)\n\t})\n}\n\nfunc TestLatestBlocksResponseCode(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"rejected\", func(t *testing.T) {\n\t\treason := ts.RandString(16)\n\t\tmsg := NewBlocksResponseMessage(ResponseCodeRejected, reason, 1, 0, nil, nil)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Zero(t, msg.From)\n\t\tassert.Zero(t, msg.To())\n\t\tassert.Zero(t, msg.Count())\n\t\tassert.True(t, msg.IsRequestRejected())\n\t\tassert.Equal(t, reason, msg.Reason)\n\t})\n\n\tt.Run(\"OK - MoreBlocks\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\tblk1, _ := ts.GenerateTestBlock(height)\n\t\tblk2, _ := ts.GenerateTestBlock(height + 1)\n\t\td1, _ := blk1.Bytes()\n\t\td2, _ := blk2.Bytes()\n\t\treason := ts.RandString(16)\n\t\tmsg := NewBlocksResponseMessage(ResponseCodeMoreBlocks, reason, 1, 100, [][]byte{d1, d2}, nil)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Equal(t, types.Height(100), msg.From)\n\t\tassert.Equal(t, types.Height(101), msg.To())\n\t\tassert.Equal(t, uint32(2), msg.Count())\n\t\tassert.False(t, msg.IsRequestRejected())\n\t\tassert.Equal(t, reason, msg.Reason)\n\t})\n\n\tt.Run(\"OK - Synced\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\t_, cert := ts.GenerateTestBlock(height)\n\n\t\treason := ts.RandString(16)\n\t\tmsg := NewBlocksResponseMessage(ResponseCodeSynced, reason, 1, 100, nil, cert)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Equal(t, types.Height(100), msg.From)\n\t\tassert.Zero(t, msg.To())\n\t\tassert.Zero(t, msg.Count())\n\t\tassert.False(t, msg.IsRequestRejected())\n\t\tassert.Equal(t, reason, msg.Reason)\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/errors.go",
    "content": "package message\n\nimport \"fmt\"\n\n// BasicCheckError is returned when the basic check on the message fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n\n// InvalidMessageTypeError is returned when the message type is not valid.\ntype InvalidMessageTypeError struct {\n\tType int\n}\n\nfunc (e InvalidMessageTypeError) Error() string {\n\treturn fmt.Sprintf(\"invalid message type: %d\", e.Type)\n}\n"
  },
  {
    "path": "sync/bundle/message/hello.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\ntype HelloMessage struct {\n\tPeerID          peer.ID          `cbor:\"1,keyasint\"`\n\tAgent           string           `cbor:\"2,keyasint\"`\n\tMoniker         string           `cbor:\"3,keyasint\"`\n\tPublicKeys      []*bls.PublicKey `cbor:\"4,keyasint\"`\n\tSignature       *bls.Signature   `cbor:\"5,keyasint\"`\n\tHeight          types.Height     `cbor:\"6,keyasint\"`\n\tServices        service.Services `cbor:\"7,keyasint\"`\n\tGenesisHash     hash.Hash        `cbor:\"8,keyasint\"`\n\tBlockHash       hash.Hash        `cbor:\"9,keyasint\"`\n\tMyTimeUnixMilli int64            `cbor:\"10,keyasint\"`\n}\n\nfunc NewHelloMessage(pid peer.ID, moniker string,\n\tservices service.Services, height types.Height, blockHash, genesisHash hash.Hash,\n) *HelloMessage {\n\treturn &HelloMessage{\n\t\tPeerID:          pid,\n\t\tAgent:           version.NodeAgent.String(),\n\t\tMoniker:         moniker,\n\t\tGenesisHash:     genesisHash,\n\t\tBlockHash:       blockHash,\n\t\tHeight:          height,\n\t\tServices:        services,\n\t\tMyTimeUnixMilli: time.Now().UnixMilli(),\n\t}\n}\n\nfunc (m *HelloMessage) BasicCheck() error {\n\tif m.Signature == nil {\n\t\treturn BasicCheckError{\"no signature\"}\n\t}\n\tif len(m.PublicKeys) == 0 {\n\t\treturn BasicCheckError{\"no public key\"}\n\t}\n\taggPub, err := bls.PublicKeyAggregate(m.PublicKeys...)\n\tif err != nil {\n\t\treturn BasicCheckError{err.Error()}\n\t}\n\n\treturn aggPub.Verify(m.SignBytes(), m.Signature)\n}\n\nfunc (m *HelloMessage) MyTime() time.Time {\n\treturn time.UnixMilli(m.MyTimeUnixMilli)\n}\n\nfunc (m *HelloMessage) SignBytes() []byte {\n\treturn []byte(fmt.Sprintf(\"%s:%s:%s:%s\", m.Type(), m.Agent, m.PeerID, m.GenesisHash.String()))\n}\n\nfunc (*HelloMessage) Type() Type {\n\treturn TypeHello\n}\n\nfunc (*HelloMessage) TopicID() network.TopicID {\n\treturn network.TopicIDUnspecified\n}\n\nfunc (*HelloMessage) ShouldBroadcast() bool {\n\treturn false\n}\n\nfunc (*HelloMessage) ConsensusHeight() types.Height {\n\treturn 0\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *HelloMessage) LogString() string {\n\treturn fmt.Sprintf(\"{%s %d %s}\", m.Moniker, m.Height, m.Services)\n}\n\nfunc (m *HelloMessage) Sign(valKeys []*bls.ValidatorKey) {\n\tsignatures := make([]*bls.Signature, len(valKeys))\n\tpublicKeys := make([]*bls.PublicKey, len(valKeys))\n\tsignBytes := m.SignBytes()\n\tfor i, key := range valKeys {\n\t\tsignatures[i] = key.Sign(signBytes)\n\t\tpublicKeys[i] = key.PublicKey()\n\t}\n\taggSig, _ := bls.SignatureAggregate(signatures...)\n\tm.Signature = aggSig\n\tm.PublicKeys = publicKeys\n}\n"
  },
  {
    "path": "sync/bundle/message/hello_ack.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype HelloAckMessage struct {\n\tResponseCode ResponseCode `cbor:\"1,keyasint\"`\n\tReason       string       `cbor:\"2,keyasint\"`\n\tHeight       types.Height `cbor:\"3,keyasint\"`\n}\n\nfunc NewHelloAckMessage(code ResponseCode, reason string, height types.Height) *HelloAckMessage {\n\treturn &HelloAckMessage{\n\t\tResponseCode: code,\n\t\tReason:       reason,\n\t\tHeight:       height,\n\t}\n}\n\nfunc (*HelloAckMessage) BasicCheck() error {\n\treturn nil\n}\n\nfunc (*HelloAckMessage) Type() Type {\n\treturn TypeHelloAck\n}\n\nfunc (*HelloAckMessage) TopicID() network.TopicID {\n\treturn network.TopicIDUnspecified\n}\n\nfunc (*HelloAckMessage) ShouldBroadcast() bool {\n\treturn false\n}\n\nfunc (*HelloAckMessage) ConsensusHeight() types.Height {\n\treturn 0\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *HelloAckMessage) LogString() string {\n\treturn fmt.Sprintf(\"{%s: %s %v}\", m.ResponseCode, m.Reason, m.Height)\n}\n"
  },
  {
    "path": "sync/bundle/message/hello_ack_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestHelloAckType(t *testing.T) {\n\tsmg := &HelloAckMessage{}\n\tassert.Equal(t, TypeHelloAck, smg.Type())\n}\n\nfunc TestHelloAckMessage(t *testing.T) {\n\tmsg := NewHelloAckMessage(ResponseCodeRejected, \"rejected\", 0)\n\trequire.NoError(t, msg.BasicCheck())\n}\n"
  },
  {
    "path": "sync/bundle/message/hello_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestHelloType(t *testing.T) {\n\tmsg := &HelloMessage{}\n\tassert.Equal(t, TypeHello, msg.Type())\n}\n\nfunc TestHelloMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid signature\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Oscar\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\tmsg.Sign([]*bls.ValidatorKey{valKey})\n\t\tmsg.Signature = ts.RandBLSSignature()\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Signature is nil\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Oscar\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\tmsg.Sign([]*bls.ValidatorKey{valKey})\n\t\tmsg.Signature = nil\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{\"no signature\"})\n\t})\n\n\tt.Run(\"PublicKeys are empty\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Oscar\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\tmsg.Sign([]*bls.ValidatorKey{valKey})\n\t\tmsg.PublicKeys = make([]*bls.PublicKey, 0)\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{\"no public key\"})\n\t})\n\n\tt.Run(\"Invalid PublicKey\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Oscar\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\tmsg.Sign([]*bls.ValidatorKey{valKey})\n\t\tmsg.PublicKeys = []*bls.PublicKey{{}}\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{\"short buffer\"})\n\t})\n\n\tt.Run(\"Check hello message time\", func(t *testing.T) {\n\t\ttime1 := time.Now()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Alice\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\ttime2 := time.Now()\n\n\t\tassert.GreaterOrEqual(t, msg.MyTime().UnixMilli(), time1.UnixMilli())\n\t\tassert.LessOrEqual(t, msg.MyTime().UnixMilli(), time2.UnixMilli())\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\tmsg := NewHelloMessage(ts.RandPeerID(), \"Alice\", service.New(service.FullNode),\n\t\t\tts.RandHeight(), ts.RandHash(), ts.RandHash())\n\t\tmsg.Sign([]*bls.ValidatorKey{valKey})\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), \"Alice\")\n\t\tassert.Contains(t, msg.LogString(), \"FULL\")\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/message.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype ResponseCode int\n\nconst (\n\tResponseCodeOK           = ResponseCode(0)\n\tResponseCodeRejected     = ResponseCode(1)\n\tResponseCodeMoreBlocks   = ResponseCode(2)\n\tResponseCodeNoMoreBlocks = ResponseCode(3)\n\tResponseCodeSynced       = ResponseCode(4)\n)\n\nfunc (c ResponseCode) String() string {\n\tswitch c {\n\tcase ResponseCodeOK:\n\t\treturn \"ok\"\n\n\tcase ResponseCodeRejected:\n\t\treturn \"rejected\"\n\n\tcase ResponseCodeMoreBlocks:\n\t\treturn \"more-blocks\"\n\n\tcase ResponseCodeNoMoreBlocks:\n\t\treturn \"no-more-blocks\"\n\n\tcase ResponseCodeSynced:\n\t\treturn \"synced\"\n\t}\n\n\treturn fmt.Sprintf(\"%d\", c)\n}\n\ntype Type int32\n\nconst (\n\tTypeHello          = Type(1)\n\tTypeHelloAck       = Type(2)\n\tTypeTransaction    = Type(3)\n\tTypeQueryProposal  = Type(4)\n\tTypeProposal       = Type(5)\n\tTypeQueryVote      = Type(6)\n\tTypeVote           = Type(7)\n\tTypeBlockAnnounce  = Type(8)\n\tTypeBlocksRequest  = Type(9)\n\tTypeBlocksResponse = Type(10)\n)\n\nfunc (t Type) String() string {\n\tswitch t {\n\tcase TypeHello:\n\t\treturn \"hello\"\n\n\tcase TypeHelloAck:\n\t\treturn \"hello-ack\"\n\n\tcase TypeTransaction:\n\t\treturn \"transaction\"\n\n\tcase TypeQueryProposal:\n\t\treturn \"query-proposal\"\n\n\tcase TypeProposal:\n\t\treturn \"proposal\"\n\n\tcase TypeQueryVote:\n\t\treturn \"query-vote\"\n\n\tcase TypeVote:\n\t\treturn \"vote\"\n\n\tcase TypeBlockAnnounce:\n\t\treturn \"block-announce\"\n\n\tcase TypeBlocksRequest:\n\t\treturn \"blocks-request\"\n\n\tcase TypeBlocksResponse:\n\t\treturn \"blocks-response\"\n\n\tdefault:\n\t\treturn fmt.Sprintf(\"%d\", t)\n\t}\n}\n\nfunc MakeMessage(msgType Type) (Message, error) {\n\tvar msg Message\n\tswitch msgType {\n\tcase TypeHello:\n\t\tmsg = &HelloMessage{}\n\n\tcase TypeHelloAck:\n\t\tmsg = &HelloAckMessage{}\n\n\tcase TypeTransaction:\n\t\tmsg = &TransactionsMessage{}\n\n\tcase TypeQueryProposal:\n\t\tmsg = &QueryProposalMessage{}\n\n\tcase TypeProposal:\n\t\tmsg = &ProposalMessage{}\n\n\tcase TypeQueryVote:\n\t\tmsg = &QueryVoteMessage{}\n\n\tcase TypeVote:\n\t\tmsg = &VoteMessage{}\n\n\tcase TypeBlockAnnounce:\n\t\tmsg = &BlockAnnounceMessage{}\n\n\tcase TypeBlocksRequest:\n\t\tmsg = &BlocksRequestMessage{}\n\n\tcase TypeBlocksResponse:\n\t\tmsg = &BlocksResponseMessage{}\n\n\tdefault:\n\t\treturn nil, InvalidMessageTypeError{Type: int(msgType)}\n\t}\n\n\t//\n\treturn msg, nil\n}\n\ntype Message interface {\n\t// BasicCheck performs basic validation checks on the message.\n\tBasicCheck() error\n\t// Type returns the message type.\n\tType() Type\n\t// TopicID returns the topic ID for the message.\n\tTopicID() network.TopicID\n\t// ShouldBroadcast indicates whether the message should be broadcasted\n\t// or send directly as stream.\n\tShouldBroadcast() bool\n\t// ConsensusHeight indicates the consensus height at which the message is broadcast.\n\t// This is applicable for consensus messages, including BlockAnnounce.\n\t// For non-consensus messages, this height is set to zero.\n\tConsensusHeight() types.Height\n\t// LogString returns a concise string representation intended for use in logs.\n\tLogString() string\n}\n"
  },
  {
    "path": "sync/bundle/message/message_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestMessage(t *testing.T) {\n\ttests := []struct {\n\t\tmsgType         Type\n\t\ttypeName        string\n\t\ttopicID         network.TopicID\n\t\tshouldBroadcast bool\n\t}{\n\t\t{TypeHello, \"hello\", network.TopicIDUnspecified, false},\n\t\t{TypeHelloAck, \"hello-ack\", network.TopicIDUnspecified, false},\n\t\t{TypeTransaction, \"transaction\", network.TopicIDTransaction, true},\n\t\t{TypeQueryProposal, \"query-proposal\", network.TopicIDConsensus, true},\n\t\t{TypeProposal, \"proposal\", network.TopicIDConsensus, true},\n\t\t{TypeQueryVote, \"query-vote\", network.TopicIDConsensus, true},\n\t\t{TypeVote, \"vote\", network.TopicIDConsensus, true},\n\t\t{TypeBlockAnnounce, \"block-announce\", network.TopicIDBlock, true},\n\t\t{TypeBlocksRequest, \"blocks-request\", network.TopicIDUnspecified, false},\n\t\t{TypeBlocksResponse, \"blocks-response\", network.TopicIDUnspecified, false},\n\t}\n\n\tfor _, tt := range tests {\n\t\tmsg, err := MakeMessage(tt.msgType)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, tt.typeName, msg.Type().String())\n\t\tassert.Equal(t, tt.topicID, msg.TopicID())\n\t\tassert.Equal(t, tt.shouldBroadcast, msg.ShouldBroadcast())\n\t}\n}\n\nfunc TestInvalidMessageType(t *testing.T) {\n\t_, err := MakeMessage(66)\n\trequire.ErrorIs(t, err, InvalidMessageTypeError{Type: 66})\n}\n"
  },
  {
    "path": "sync/bundle/message/proposal.go",
    "content": "package message\n\nimport (\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\ntype ProposalMessage struct {\n\tProposal        *proposal.Proposal `cbor:\"1,keyasint\"`\n\tProtocolVersion protocol.Version   `cbor:\"2,keyasint\"`\n}\n\nfunc NewProposalMessage(p *proposal.Proposal) *ProposalMessage {\n\treturn &ProposalMessage{\n\t\tProposal:        p,\n\t\tProtocolVersion: protocol.ProtocolVersionLatest,\n\t}\n}\n\nfunc (*ProposalMessage) BasicCheck() error {\n\t// Basic checks for the proposal are deferred to the consensus phase\n\t// to avoid unnecessary validation for validators outside the committee.\n\treturn nil\n}\n\nfunc (*ProposalMessage) Type() Type {\n\treturn TypeProposal\n}\n\nfunc (*ProposalMessage) TopicID() network.TopicID {\n\treturn network.TopicIDConsensus\n}\n\nfunc (*ProposalMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (m *ProposalMessage) ConsensusHeight() types.Height {\n\treturn m.Height()\n}\n\nfunc (m *ProposalMessage) Height() types.Height {\n\treturn m.Proposal.Height()\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *ProposalMessage) LogString() string {\n\treturn m.Proposal.LogString()\n}\n"
  },
  {
    "path": "sync/bundle/message/proposal_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProposalType(t *testing.T) {\n\tmsg := &ProposalMessage{}\n\tassert.Equal(t, TypeProposal, msg.Type())\n}\n\nfunc TestProposalMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tprop := ts.GenerateTestProposal(100, 0)\n\t\tmsg := NewProposalMessage(prop)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), \"100\")\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/query_proposal.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype QueryProposalMessage struct {\n\tHeight  types.Height   `cbor:\"1,keyasint\"`\n\tRound   types.Round    `cbor:\"3,keyasint\"`\n\tQuerier crypto.Address `cbor:\"2,keyasint\"`\n}\n\nfunc NewQueryProposalMessage(height types.Height, round types.Round, querier crypto.Address) *QueryProposalMessage {\n\treturn &QueryProposalMessage{\n\t\tHeight:  height,\n\t\tRound:   round,\n\t\tQuerier: querier,\n\t}\n}\n\nfunc (m *QueryProposalMessage) BasicCheck() error {\n\tif m.Round < 0 {\n\t\treturn BasicCheckError{Reason: \"invalid round\"}\n\t}\n\n\treturn nil\n}\n\nfunc (*QueryProposalMessage) Type() Type {\n\treturn TypeQueryProposal\n}\n\nfunc (*QueryProposalMessage) TopicID() network.TopicID {\n\treturn network.TopicIDConsensus\n}\n\nfunc (*QueryProposalMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (m *QueryProposalMessage) ConsensusHeight() types.Height {\n\treturn m.Height\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *QueryProposalMessage) LogString() string {\n\treturn fmt.Sprintf(\"{%v %s}\", m.Height, m.Querier.LogString())\n}\n"
  },
  {
    "path": "sync/bundle/message/query_proposal_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestQueryProposalType(t *testing.T) {\n\tmsg := &QueryProposalMessage{}\n\tassert.Equal(t, TypeQueryProposal, msg.Type())\n}\n\nfunc TestQueryProposalMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tmsg := NewQueryProposalMessage(0, -1, ts.RandValAddress())\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{\"invalid round\"})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tmsg := NewQueryProposalMessage(100, 0, ts.RandValAddress())\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), \"100\")\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/query_votes.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype QueryVoteMessage struct {\n\tHeight  types.Height   `cbor:\"1,keyasint\"`\n\tRound   types.Round    `cbor:\"2,keyasint\"`\n\tQuerier crypto.Address `cbor:\"3,keyasint\"`\n}\n\nfunc NewQueryVoteMessage(height types.Height, round types.Round, querier crypto.Address) *QueryVoteMessage {\n\treturn &QueryVoteMessage{\n\t\tHeight:  height,\n\t\tRound:   round,\n\t\tQuerier: querier,\n\t}\n}\n\nfunc (m *QueryVoteMessage) BasicCheck() error {\n\tif m.Round < 0 {\n\t\treturn BasicCheckError{Reason: \"invalid round\"}\n\t}\n\n\treturn nil\n}\n\nfunc (*QueryVoteMessage) Type() Type {\n\treturn TypeQueryVote\n}\n\nfunc (*QueryVoteMessage) TopicID() network.TopicID {\n\treturn network.TopicIDConsensus\n}\n\nfunc (*QueryVoteMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (m *QueryVoteMessage) ConsensusHeight() types.Height {\n\treturn m.Height\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *QueryVoteMessage) LogString() string {\n\treturn fmt.Sprintf(\"{%d/%d %s}\", m.Height, m.Round, m.Querier.LogString())\n}\n"
  },
  {
    "path": "sync/bundle/message/query_votes_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestQueryVotesType(t *testing.T) {\n\tmsg := &QueryVoteMessage{}\n\tassert.Equal(t, TypeQueryVote, msg.Type())\n}\n\nfunc TestQueryVoteMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tmsg := NewQueryVoteMessage(0, -1, ts.RandValAddress())\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{Reason: \"invalid round\"})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tmsg := NewQueryVoteMessage(100, 0, ts.RandValAddress())\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), \"100\")\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/transactions.go",
    "content": "package message\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n)\n\ntype TransactionsMessage struct {\n\tTransactions []*tx.Tx `cbor:\"1,keyasint\"`\n}\n\nfunc NewTransactionsMessage(trxs []*tx.Tx) *TransactionsMessage {\n\treturn &TransactionsMessage{\n\t\tTransactions: trxs,\n\t}\n}\n\nfunc (m *TransactionsMessage) BasicCheck() error {\n\tif len(m.Transactions) == 0 {\n\t\treturn BasicCheckError{Reason: \"no transaction\"}\n\t}\n\tfor _, trx := range m.Transactions {\n\t\tif err := trx.BasicCheck(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (*TransactionsMessage) Type() Type {\n\treturn TypeTransaction\n}\n\nfunc (*TransactionsMessage) TopicID() network.TopicID {\n\treturn network.TopicIDTransaction\n}\n\nfunc (*TransactionsMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (*TransactionsMessage) ConsensusHeight() types.Height {\n\treturn 0\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *TransactionsMessage) LogString() string {\n\tvar builder strings.Builder\n\n\tfor _, trx := range m.Transactions {\n\t\tfmt.Fprintf(&builder, \"%v \", trx.ID().LogString())\n\t}\n\tfmt.Fprintf(&builder, \"{%v: ⌘ [%v]}\", len(m.Transactions), builder.String())\n\n\treturn builder.String()\n}\n"
  },
  {
    "path": "sync/bundle/message/transactions_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTransactionsType(t *testing.T) {\n\tmsg := &TransactionsMessage{}\n\tassert.Equal(t, TypeTransaction, msg.Type())\n}\n\nfunc TestTransactionsMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"No transactions\", func(t *testing.T) {\n\t\tmsg := NewTransactionsMessage(nil)\n\n\t\terr := msg.BasicCheck()\n\t\trequire.ErrorIs(t, err, BasicCheckError{Reason: \"no transaction\"})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\tmsg := NewTransactionsMessage([]*tx.Tx{trx})\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), trx.ID().LogString())\n\t})\n}\n"
  },
  {
    "path": "sync/bundle/message/vote.go",
    "content": "package message\n\nimport (\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n)\n\ntype VoteMessage struct {\n\tVote *vote.Vote `cbor:\"1,keyasint\"`\n}\n\nfunc NewVoteMessage(v *vote.Vote) *VoteMessage {\n\treturn &VoteMessage{\n\t\tVote: v,\n\t}\n}\n\nfunc (m *VoteMessage) BasicCheck() error {\n\treturn m.Vote.BasicCheck()\n}\n\nfunc (*VoteMessage) Type() Type {\n\treturn TypeVote\n}\n\nfunc (*VoteMessage) TopicID() network.TopicID {\n\treturn network.TopicIDConsensus\n}\n\nfunc (*VoteMessage) ShouldBroadcast() bool {\n\treturn true\n}\n\nfunc (m *VoteMessage) ConsensusHeight() types.Height {\n\treturn m.Vote.Height()\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (m *VoteMessage) LogString() string {\n\treturn m.Vote.LogString()\n}\n"
  },
  {
    "path": "sync/bundle/message/vote_test.go",
    "content": "package message\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestVoteType(t *testing.T) {\n\tmsg := &VoteMessage{}\n\tassert.Equal(t, TypeVote, msg.Type())\n}\n\nfunc TestVoteMessage(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid vote\", func(t *testing.T) {\n\t\tvte := vote.NewPrepareVote(ts.RandHash(), ts.RandHeight(), -1, ts.RandValAddress())\n\t\tmsg := NewVoteMessage(vte)\n\n\t\trequire.ErrorIs(t, msg.BasicCheck(), vote.BasicCheckError{Reason: \"invalid round\"})\n\t})\n\n\tt.Run(\"OK\", func(t *testing.T) {\n\t\tvte, _ := ts.GenerateTestPrepareVote(100, 0)\n\t\tmsg := NewVoteMessage(vte)\n\n\t\trequire.NoError(t, msg.BasicCheck())\n\t\tassert.Contains(t, msg.LogString(), vte.LogString())\n\t})\n}\n"
  },
  {
    "path": "sync/cache/cache.go",
    "content": "package cache\n\nimport (\n\tlru \"github.com/hashicorp/golang-lru/v2\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype Cache struct {\n\tblocks *lru.Cache[types.Height, *block.Block] // it's thread safe\n\tcerts  *lru.Cache[types.Height, *certificate.Certificate]\n}\n\nfunc NewCache(size int) (*Cache, error) {\n\tblockCache, err := lru.New[types.Height, *block.Block](size)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcertCache, err := lru.New[types.Height, *certificate.Certificate](size)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Cache{\n\t\tblocks: blockCache,\n\t\tcerts:  certCache,\n\t}, nil\n}\n\nfunc (c *Cache) HasBlockInCache(height types.Height) bool {\n\treturn c.blocks.Contains(height)\n}\n\nfunc (c *Cache) GetBlock(height types.Height) *block.Block {\n\tblk, ok := c.blocks.Get(height)\n\tif ok {\n\t\treturn blk\n\t}\n\n\treturn nil\n}\n\nfunc (c *Cache) AddBlock(blk *block.Block) {\n\tprvCert := blk.PrevCertificate()\n\tif prvCert == nil {\n\t\tc.blocks.Add(1, blk)\n\t} else {\n\t\tc.blocks.Add(prvCert.Height()+1, blk)\n\t\tc.certs.Add(prvCert.Height(), prvCert)\n\t}\n}\n\nfunc (c *Cache) GetCertificate(height types.Height) *certificate.Certificate {\n\tcert, ok := c.certs.Get(height)\n\tif ok {\n\t\treturn cert\n\t}\n\n\treturn nil\n}\n\nfunc (c *Cache) AddCertificate(cert *certificate.Certificate) {\n\tif cert != nil {\n\t\tc.certs.Add(cert.Height(), cert)\n\t}\n}\n\n// RemoveBlock removes the block and certificates at the specified height from the cache.\nfunc (c *Cache) RemoveBlock(height types.Height) {\n\tc.blocks.Remove(height)\n\tc.certs.Remove(height)\n}\n\n// Len returns the maximum number of items in the blocks and certificates cache.\nfunc (c *Cache) Len() int {\n\treturn util.Max(c.blocks.Len(), c.certs.Len())\n}\n\nfunc (c *Cache) Clear() {\n\tc.blocks.Purge()\n\tc.certs.Purge()\n}\n"
  },
  {
    "path": "sync/cache/cache_test.go",
    "content": "package cache\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAddBlockOne(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tcache, _ := NewCache(10)\n\n\tblk1, _ := ts.GenerateTestBlock(1)\n\tcache.AddBlock(blk1)\n\n\tassert.True(t, cache.HasBlockInCache(1))\n\tassert.Equal(t, blk1, cache.GetBlock(1))\n\tassert.Nil(t, cache.GetCertificate(0))\n}\n\nfunc TestAddBlocks(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tcache, _ := NewCache(10)\n\n\ttestHeight := ts.RandHeight()\n\tblk1, _ := ts.GenerateTestBlock(testHeight)\n\tcache.AddBlock(blk1)\n\n\tassert.True(t, cache.HasBlockInCache(testHeight))\n\tassert.Equal(t, blk1, cache.GetBlock(testHeight))\n\tassert.Equal(t, blk1.PrevCertificate(), cache.GetCertificate(testHeight-1))\n}\n\nfunc TestAddCertificate(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tcache, _ := NewCache(10)\n\n\ttestHeight := ts.RandHeight()\n\t_, cert1 := ts.GenerateTestBlock(testHeight)\n\tcache.AddCertificate(cert1)\n\n\tassert.Equal(t, cert1, cache.GetCertificate(testHeight))\n}\n\nfunc TestClearCache(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcache, _ := NewCache(10)\n\n\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\tcache.AddBlock(blk)\n\n\tassert.Equal(t, 1, cache.Len())\n\tcache.Clear()\n\tassert.Equal(t, 0, cache.Len())\n\tassert.Nil(t, cache.GetBlock(2))\n}\n\nfunc TestCacheIsFull(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcache, _ := NewCache(10)\n\n\theight := types.Height(0)\n\tfor ; height < 10; height++ {\n\t\tblk, _ := ts.GenerateTestBlock(height + 1)\n\t\tcache.AddBlock(blk)\n\t}\n\n\tnewBlock, _ := ts.GenerateTestBlock(height + 1)\n\tcache.AddBlock(newBlock)\n\n\tassert.NotNil(t, cache.GetBlock(height+1))\n\tassert.Nil(t, cache.GetBlock(1))\n}\n\nfunc TestAddAgain(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcache, _ := NewCache(10)\n\n\theight := ts.RandHeight()\n\tfirstBlk, _ := ts.GenerateTestBlock(height)\n\tsecondBlk, _ := ts.GenerateTestBlock(height)\n\n\tcache.AddBlock(firstBlk)\n\tassert.Equal(t, firstBlk, cache.GetBlock(height))\n\n\tcache.AddBlock(secondBlk)\n\tassert.Equal(t, secondBlk, cache.GetBlock(height))\n}\n\nfunc TestRemoveBlock(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcache, _ := NewCache(10)\n\n\theight := ts.RandHeight()\n\tblk1, _ := ts.GenerateTestBlock(height)\n\tblk2, _ := ts.GenerateTestBlock(height + 1)\n\tcache.AddBlock(blk1)\n\tcache.AddBlock(blk2)\n\n\tcache.RemoveBlock(height)\n\tassert.Nil(t, cache.GetBlock(height))\n\tassert.Nil(t, cache.GetCertificate(height))\n}\n"
  },
  {
    "path": "sync/config.go",
    "content": "package sync\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/sync/firewall\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\n// Config defines parameters for the sync module.\ntype Config struct {\n\tMoniker           string           `toml:\"moniker\"`\n\tSessionTimeoutStr string           `toml:\"session_timeout\"`\n\tFirewall          *firewall.Config `toml:\"firewall\"`\n\n\t// Private configs\n\tMaxSessions         int              `toml:\"-\"`\n\tBlockPerSession     uint32           `toml:\"-\"`\n\tBlockPerMessage     uint32           `toml:\"-\"`\n\tPruneWindow         uint32           `toml:\"-\"`\n\tLatestSupportingVer version.Version  `toml:\"-\"`\n\tServices            service.Services `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tSessionTimeoutStr: \"10s\",\n\t\tServices:          service.New(service.PrunedNode),\n\t\tMaxSessions:       8,\n\t\tBlockPerSession:   720,\n\t\tBlockPerMessage:   60,\n\t\tPruneWindow:       86_400, // Default retention blocks in prune mode\n\t\tFirewall:          firewall.DefaultConfig(),\n\t\t// v1.9.0 is the hard-fork for Split-Reward support.\n\t\tLatestSupportingVer: version.Version{\n\t\t\tMajor: 1,\n\t\t\tMinor: 9,\n\t\t\tPatch: 0,\n\t\t},\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\t_, err := time.ParseDuration(conf.SessionTimeoutStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn conf.Firewall.BasicCheck()\n}\n\nfunc (conf *Config) CacheSize() int {\n\treturn util.LogScale(\n\t\tint(conf.BlockPerMessage * conf.BlockPerSession))\n}\n\nfunc (conf *Config) SessionTimeout() time.Duration {\n\ttimeout, _ := time.ParseDuration(conf.SessionTimeoutStr)\n\n\treturn timeout\n}\n"
  },
  {
    "path": "sync/config_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr string\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname:        \"Invalid Session Timeout\",\n\t\t\texpectedErr: \"time: invalid duration\",\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.SessionTimeoutStr = \"INVALID-DURATION\"\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != \"\" {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\tassert.ErrorContains(t, err, tt.expectedErr,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\", no, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestDefaultConfigCheck(t *testing.T) {\n\tc := DefaultConfig()\n\trequire.NoError(t, c.BasicCheck())\n\tassert.Equal(t, 10*time.Second, c.SessionTimeout())\n}\n"
  },
  {
    "path": "sync/firewall/config.go",
    "content": "package firewall\n\nimport (\n\t\"net\"\n)\n\ntype RateLimit struct {\n\tBlockTopic       int `toml:\"block_topic\"`\n\tTransactionTopic int `toml:\"transaction_topic\"`\n\tConsensusTopic   int `toml:\"consensus_topic\"`\n}\n\n// Config defines parameters for the firewall module.\ntype Config struct {\n\tBannedNets []string  `toml:\"banned_nets\"`\n\tRateLimit  RateLimit `toml:\"rate_limit\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tBannedNets: make([]string, 0),\n\t\tRateLimit: RateLimit{\n\t\t\tBlockTopic:       1,\n\t\t\tTransactionTopic: 5,\n\t\t\tConsensusTopic:   0,\n\t\t},\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tfor _, address := range conf.BannedNets {\n\t\t_, _, err := net.ParseCIDR(address)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "sync/firewall/errors.go",
    "content": "package firewall\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tlp2pcore \"github.com/libp2p/go-libp2p/core\"\n)\n\n// ErrGossipMessage is returned when a stream message sends as gossip message.\nvar ErrGossipMessage = errors.New(\"receive stream message as gossip message\")\n\n// ErrStreamMessage is returned when a gossip message sends as stream message.\nvar ErrStreamMessage = errors.New(\"receive gossip message as stream message\")\n\n// ErrNetworkMismatch is returned when the bundle doesn't belong to this network.\nvar ErrNetworkMismatch = errors.New(\"bundle is not for this network\")\n\n// ErrMisMatchConsensusHeight is returned when the bundle height mismatches with the message consensus height.\nvar ErrMisMatchConsensusHeight = errors.New(\"bundle and message consensus height mismatch\")\n\n// PeerBannedError is returned when a message received from a banned peer-id or banned address.\ntype PeerBannedError struct {\n\tPeerID  lp2pcore.PeerID\n\tAddress string\n}\n\nfunc (e PeerBannedError) Error() string {\n\treturn fmt.Sprintf(\"peer is banned, peer-id: %s, remote-address: %s\", e.PeerID, e.Address)\n}\n"
  },
  {
    "path": "sync/firewall/firewall.go",
    "content": "package firewall\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/peerset\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/util/ipblocker\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/ratelimit\"\n)\n\n// Firewall check packets before passing them to sync module.\ntype Firewall struct {\n\tconfig               *Config\n\tnetwork              network.Network\n\tpeerSet              *peerset.PeerSet\n\tstate                state.Facade\n\tipBlocker            *ipblocker.IPBlocker\n\tblockRateLimit       *ratelimit.RateLimit\n\ttransactionRateLimit *ratelimit.RateLimit\n\tconsensusRateLimit   *ratelimit.RateLimit\n\tlogger               *logger.SubLogger\n}\n\nfunc NewFirewall(conf *Config, network network.Network, peerSet *peerset.PeerSet, state state.Facade,\n) (*Firewall, error) {\n\tblocker, err := ipblocker.New(conf.BannedNets)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tblockRateLimit := ratelimit.NewRateLimit(conf.RateLimit.BlockTopic, time.Second)\n\ttransactionRateLimit := ratelimit.NewRateLimit(conf.RateLimit.TransactionTopic, time.Second)\n\tconsensusRateLimit := ratelimit.NewRateLimit(conf.RateLimit.ConsensusTopic, time.Second)\n\n\treturn &Firewall{\n\t\tconfig:               conf,\n\t\tnetwork:              network,\n\t\tpeerSet:              peerSet,\n\t\tstate:                state,\n\t\tipBlocker:            blocker,\n\t\tblockRateLimit:       blockRateLimit,\n\t\ttransactionRateLimit: transactionRateLimit,\n\t\tconsensusRateLimit:   consensusRateLimit,\n\t\tlogger:               logger.NewSubLogger(\"_firewall\", nil),\n\t}, nil\n}\n\nfunc (f *Firewall) OpenGossipBundle(data []byte, from peer.ID) (*bundle.Bundle, error) {\n\tbdl, err := f.openBundle(bytes.NewReader(data), from)\n\tif err != nil {\n\t\treturn bdl, err\n\t}\n\n\tif !bdl.Message.ShouldBroadcast() {\n\t\tf.logger.Warn(\"firewall: receive stream message as gossip message\",\n\t\t\t\"error\", err, \"bundle\", bdl, \"from\", from)\n\n\t\tf.closeConnection(from)\n\n\t\treturn nil, ErrGossipMessage\n\t}\n\n\tif bdl.ConsensusHeight != bdl.Message.ConsensusHeight() {\n\t\tf.logger.Debug(\"firewall: consensus height mismatch\",\n\t\t\t\"peer\", from,\n\t\t\t\"bundle_height\", bdl.ConsensusHeight,\n\t\t\t\"message_height\", bdl.Message.ConsensusHeight(),\n\t\t)\n\n\t\t// Drop the message. In next releases we may ban these peers.\n\t\treturn nil, ErrMisMatchConsensusHeight\n\t}\n\n\treturn bdl, nil\n}\n\n// IsBannedAddress checks if the remote IP address is banned.\nfunc (f *Firewall) IsBannedAddress(remoteAddr string) bool {\n\tip, err := f.getIPFromMultiAddress(remoteAddr)\n\tif err != nil {\n\t\t// Connect event not yet received from this peer.\n\t\t// Refer to: https://github.com/libp2p/go-libp2p/issues/3074\n\t\tf.logger.Debug(\"firewall: unable to parse remote address\", \"error\", err, \"addr\", remoteAddr)\n\n\t\treturn false\n\t}\n\n\treturn f.ipBlocker.IsBanned(ip)\n}\n\nfunc (f *Firewall) OpenStreamBundle(r io.Reader, from peer.ID) (*bundle.Bundle, error) {\n\tbdl, err := f.openBundle(r, from)\n\tif err != nil {\n\t\tf.logger.Debug(\"firewall: unable to open a stream bundle\",\n\t\t\t\"error\", err, \"bundle\", bdl, \"from\", from)\n\n\t\treturn nil, err\n\t}\n\n\tif bdl.Message.ShouldBroadcast() {\n\t\tf.logger.Warn(\"firewall: receive gossip message as stream message\",\n\t\t\t\"error\", err, \"bundle\", bdl, \"from\", from)\n\n\t\tf.closeConnection(from)\n\n\t\treturn nil, ErrStreamMessage\n\t}\n\n\treturn bdl, nil\n}\n\nfunc (f *Firewall) openBundle(r io.Reader, from peer.ID) (*bundle.Bundle, error) {\n\tf.peerSet.UpdateLastReceived(from)\n\n\tpeer := f.peerSet.GetPeer(from)\n\tif peer.Status.IsBanned() {\n\t\tf.closeConnection(from)\n\n\t\treturn nil, PeerBannedError{\n\t\t\tPeerID:  peer.PeerID,\n\t\t\tAddress: peer.Address,\n\t\t}\n\t}\n\n\tif f.IsBannedAddress(peer.Address) {\n\t\tf.closeConnection(from)\n\t\tf.peerSet.UpdateStatus(from, status.StatusBanned)\n\n\t\treturn nil, PeerBannedError{\n\t\t\tPeerID:  peer.PeerID,\n\t\t\tAddress: peer.Address,\n\t\t}\n\t}\n\n\tbdl, bytesRead, err := f.decodeBundle(r)\n\tif err != nil {\n\t\tf.peerSet.UpdateInvalidMetric(from, int64(bytesRead))\n\n\t\treturn nil, err\n\t}\n\n\tif err := f.checkBundle(bdl); err != nil {\n\t\tf.peerSet.UpdateInvalidMetric(from, int64(bytesRead))\n\n\t\treturn bdl, err\n\t}\n\n\tf.peerSet.UpdateReceivedMetric(from, bdl.Message.Type(), int64(bytesRead))\n\n\treturn bdl, nil\n}\n\nfunc (*Firewall) decodeBundle(r io.Reader) (*bundle.Bundle, int, error) {\n\tbdl := new(bundle.Bundle)\n\tbytesRead, err := bdl.Decode(r)\n\tif err != nil {\n\t\treturn nil, bytesRead, err\n\t}\n\n\treturn bdl, bytesRead, nil\n}\n\nfunc (f *Firewall) checkBundle(bdl *bundle.Bundle) error {\n\tif err := bdl.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\n\tswitch f.state.Genesis().ChainType() {\n\tcase genesis.Mainnet:\n\t\tif bdl.Flags&0x3 != bundle.BundleFlagNetworkMainnet {\n\t\t\treturn ErrNetworkMismatch\n\t\t}\n\n\tcase genesis.Testnet:\n\t\tif bdl.Flags&0x3 != bundle.BundleFlagNetworkTestnet {\n\t\t\treturn ErrNetworkMismatch\n\t\t}\n\n\tcase genesis.Localnet:\n\t\tif bdl.Flags&0x3 != 0 {\n\t\t\treturn ErrNetworkMismatch\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (f *Firewall) closeConnection(pid peer.ID) {\n\tf.network.CloseConnection(pid)\n}\n\nfunc (*Firewall) getIPFromMultiAddress(address string) (string, error) {\n\taddr, err := multiaddr.NewMultiaddr(address)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tcomponents := addr.Protocols()\n\n\tvar ip string\n\tfor _, comp := range components {\n\t\tswitch comp.Name {\n\t\t// TODO: can parse dns address and find ip??\n\t\tcase \"ip4\", \"ip6\":\n\t\t\tipComponent, err := addr.ValueForProtocol(comp.Code)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tip = ipComponent\n\t\t}\n\t}\n\n\treturn ip, nil\n}\n\nfunc (f *Firewall) isExpiredMessage(msgData []byte) bool {\n\tmsgLen := len(msgData)\n\tif msgLen < 6 {\n\t\treturn true\n\t}\n\n\t// Consensus height is the last 4 bytes of the bundle.\n\t// Refer to the bundle encoding for more details.\n\tconsensusHeight := binary.BigEndian.Uint32(msgData[msgLen-4:])\n\n\t// The message is expired, or the consensus height is behind the network's current height.\n\tif f.state.LastBlockHeight() > 0 && consensusHeight < uint32(f.state.LastBlockHeight()-1) {\n\t\tf.logger.Debug(\"firewall: expired message\", \"message height\", consensusHeight,\n\t\t\t\"our height\", f.state.LastBlockHeight())\n\n\t\treturn true\n\t}\n\n\treturn false\n}\n\nfunc (f *Firewall) AllowBlockRequest(gossipMsg *network.GossipMessage) network.PropagationPolicy {\n\tif f.isExpiredMessage(gossipMsg.Data) {\n\t\treturn network.Drop\n\t}\n\n\tif !f.blockRateLimit.AllowRequest() {\n\t\treturn network.DropButConsume\n\t}\n\n\treturn network.Propagate\n}\n\nfunc (f *Firewall) AllowTransactionRequest(_ *network.GossipMessage) network.PropagationPolicy {\n\tif !f.transactionRateLimit.AllowRequest() {\n\t\treturn network.DropButConsume\n\t}\n\n\treturn network.Propagate\n}\n\nfunc (f *Firewall) AllowConsensusRequest(gossipMsg *network.GossipMessage) network.PropagationPolicy {\n\tif f.isExpiredMessage(gossipMsg.Data) {\n\t\treturn network.Drop\n\t}\n\n\tif !f.consensusRateLimit.AllowRequest() {\n\t\treturn network.DropButConsume\n\t}\n\n\treturn network.Propagate\n}\n"
  },
  {
    "path": "sync/firewall/firewall_test.go",
    "content": "package firewall\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"testing\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tfirewall      *Firewall\n\tbannedPeerID  peer.ID\n\tgoodPeerID    peer.ID\n\tunknownPeerID peer.ID\n\tnetwork       *network.MockNetwork\n\tstate         *state.MockState\n}\n\nfunc setup(t *testing.T, conf *Config) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tpeerSet := peerset.NewPeerSet(1 * time.Minute)\n\tstate := state.MockingState(ts)\n\tnet := network.MockingNetwork(ts, ts.RandPeerID())\n\n\tif conf == nil {\n\t\tconf = DefaultConfig()\n\t}\n\trequire.NoError(t, conf.BasicCheck())\n\tfirewall, err := NewFirewall(conf, net, peerSet, state)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tassert.NotNil(t, firewall)\n\tbannedPeerID := ts.RandPeerID()\n\tgoodPeerID := ts.RandPeerID()\n\tunknownPeerID := ts.RandPeerID()\n\n\tnet.AddAnotherNetwork(network.MockingNetwork(ts, goodPeerID), lp2pnetwork.DirOutbound)\n\tnet.AddAnotherNetwork(network.MockingNetwork(ts, unknownPeerID), lp2pnetwork.DirOutbound)\n\tnet.AddAnotherNetwork(network.MockingNetwork(ts, bannedPeerID), lp2pnetwork.DirOutbound)\n\n\tfirewall.peerSet.UpdateStatus(goodPeerID, status.StatusKnown)\n\tfirewall.peerSet.UpdateStatus(bannedPeerID, status.StatusBanned)\n\n\treturn &testData{\n\t\tTestSuite:     ts,\n\t\tfirewall:      firewall,\n\t\tnetwork:       net,\n\t\tstate:         state,\n\t\tbannedPeerID:  bannedPeerID,\n\t\tgoodPeerID:    goodPeerID,\n\t\tunknownPeerID: unknownPeerID,\n\t}\n}\n\nfunc (td *testData) testGossipBundle() []byte {\n\tbdl := bundle.NewBundle(message.NewQueryVoteMessage(td.RandHeight(), td.RandRound(), td.RandValAddress()))\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\td, _ := bdl.Encode()\n\n\treturn d\n}\n\nfunc (td *testData) testStreamBundle() []byte {\n\tbdl := bundle.NewBundle(message.NewBlocksRequestMessage(td.RandIntMax(100), 1, 100))\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\td, _ := bdl.Encode()\n\n\treturn d\n}\n\nfunc TestDecodeBundles(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttests := []struct {\n\t\tname    string\n\t\tdata    string\n\t\tpeerID  string\n\t\twantErr bool\n\t}{\n\t\t{\n\t\t\tname:    \"invalid data\",\n\t\t\tdata:    \"bad0\",\n\t\t\twantErr: true,\n\t\t},\n\t\t{\n\t\t\tname:    \"nil data\",\n\t\t\tdata:    \"\",\n\t\t\twantErr: true,\n\t\t},\n\t\t{\n\t\t\tname: \"invalid bundle (round is -1)\",\n\t\t\tdata: \"a4\" + // Map with 4 key-value pairs\n\t\t\t\t\"01\" + \"01\" + // Key 1 (Flags), Value: 1 (Mainnet)\n\t\t\t\t\"02\" + \"06\" + // Key 2 (Message Type), Value: 6 (QueryVote)\n\t\t\t\t\"03\" + \"581d\" + // Key 3 (Message), Value: 30 Bytes\n\t\t\t\t\"\" + \"a3\" + // Map with 3 key-value pairs\n\t\t\t\t\"\" + \"01\" + \"1864\" + // Key 1 (Height), Value: 100\n\t\t\t\t\"\" + \"02\" + \"20\" + // Key 2 (Round), Value: -1\n\t\t\t\t\"\" + \"03\" + \"5501aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" + // Key 3 (Querier), Value: 21 Bytes\n\t\t\t\t\"04\" + \"1a00000064\", // Key 4 (Consensus Height), Value: 100\n\t\t\twantErr: true,\n\t\t},\n\n\t\t{\n\t\t\tname: \"valid bundle (invalid network, Testnet)\",\n\t\t\tdata: \"a4\" + // Map with 4 key-value pairs\n\t\t\t\t\"01\" + \"02\" + // Key 1 (Flags), Value: 1 (Testnet)\n\t\t\t\t\"02\" + \"06\" + // Key 2 (Message Type), Value: 6 (QueryVote)\n\t\t\t\t\"03\" + \"581d\" + // Key 3 (Message), Value: 30 Bytes\n\t\t\t\t\"\" + \"a3\" + // Map with 3 key-value pairs\n\t\t\t\t\"\" + \"01\" + \"1864\" + // Key 1 (Height), Value: 100\n\t\t\t\t\"\" + \"02\" + \"00\" + // Key 2 (Round), Value: 0\n\t\t\t\t\"\" + \"03\" + \"5501aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" + // Key 3 (Querier), Value: 21 Bytes\n\t\t\t\t\"04\" + \"1a00000064\", // Key 4 (Consensus Height), Value: 100\n\t\t\twantErr: true,\n\t\t},\n\t\t{\n\t\t\tname: \"valid bundle\",\n\t\t\tdata: \"a4\" + // Map with 4 key-value pairs\n\t\t\t\t\"01\" + \"01\" + // Key 1 (Flags), Value: 1 (Mainnet)\n\t\t\t\t\"02\" + \"06\" + // Key 2 (Message Type), Value: 6 (QueryVote)\n\t\t\t\t\"03\" + \"581d\" + // Key 3 (Message), Value: 29 Bytes\n\t\t\t\t\"\" + \"a3\" + // Map with 3 key-value pairs\n\t\t\t\t\"\" + \"01\" + \"1864\" + // Key 1 (Height), Value: 100\n\t\t\t\t\"\" + \"02\" + \"00\" + // Key 2 (Round), Value: 0\n\t\t\t\t\"\" + \"03\" + \"5501aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" + // Key 3 (Querier), Value: 21 Bytes\n\t\t\t\t\"04\" + \"1a00000064\", // Key 4 (Consensus Height), Value: 100\n\t\t\twantErr: false,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tbs := td.DecodingHex(tt.data)\n\t\t\t_, err := td.firewall.OpenGossipBundle(bs, td.unknownPeerID)\n\t\t\tif tt.wantErr {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t}\n\t\t})\n\t}\n\n\tp := td.firewall.peerSet.GetPeer(td.unknownPeerID)\n\tassert.Equal(t, int64(1), p.Metric.TotalReceived.Bundles)\n\tassert.Equal(t, int64(4), p.Metric.TotalInvalid.Bundles)\n}\n\nfunc TestGossipMismatchBundleHeight(t *testing.T) {\n\ttd := setup(t, nil)\n\tcorruptedData := \"a4\" + // Map with 4 key-value pairs\n\t\t\"01\" + \"01\" + // Key 1 (Flags), Value: 1 (Mainnet)\n\t\t\"02\" + \"06\" + // Key 2 (Message Type), Value: 6 (QueryVote)\n\t\t\"03\" + \"581d\" + // Key 3 (Message), Value: 29 Bytes\n\t\t\"\" + \"a3\" + // Map with 3 key-value pairs\n\t\t\"\" + \"01\" + \"1864\" + // Key 1 (Height), Value: 100\n\t\t\"\" + \"02\" + \"00\" + // Key 2 (Round), Value: 0\n\t\t\"\" + \"03\" + \"5501aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" + // Key 3 (Querier), Value: 21 Bytes\n\t\t\"04\" + \"1a0000029a\" // Bundle Consensus Height = 666\n\n\trawMsg := td.DecodingHex(corruptedData)\n\tbdl, err := td.firewall.OpenGossipBundle(rawMsg, td.unknownPeerID)\n\tassert.Nil(t, bdl)\n\trequire.Error(t, err)\n\tassert.Equal(t, err, ErrMisMatchConsensusHeight)\n\n\tassert.Equal(t, status.StatusUnknown, td.firewall.peerSet.GetPeerStatus(td.unknownPeerID))\n}\n\nfunc TestGossipMessage(t *testing.T) {\n\tt.Run(\"Message is nil\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\t_, err := td.firewall.OpenGossipBundle(nil, td.unknownPeerID)\n\t\trequire.Error(t, err)\n\t\tassert.False(t, td.network.IsClosed(td.unknownPeerID))\n\t})\n\n\tt.Run(\"Message from banned peer\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testGossipBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.bannedPeerID))\n\t\t_, err := td.firewall.OpenGossipBundle(data, td.bannedPeerID)\n\t\trequire.ErrorIs(t, err, PeerBannedError{\n\t\t\tPeerID:  td.bannedPeerID,\n\t\t\tAddress: \"\",\n\t\t})\n\t\tassert.True(t, td.network.IsClosed(td.bannedPeerID))\n\t})\n\n\tt.Run(\"Stream message as gossip message\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testStreamBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.unknownPeerID))\n\t\t_, err := td.firewall.OpenGossipBundle(data, td.unknownPeerID)\n\t\trequire.ErrorIs(t, err, ErrGossipMessage)\n\t\tassert.True(t, td.network.IsClosed(td.unknownPeerID))\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testGossipBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.goodPeerID))\n\t\t_, err := td.firewall.OpenGossipBundle(data, td.goodPeerID)\n\t\trequire.NoError(t, err)\n\t\tassert.False(t, td.network.IsClosed(td.goodPeerID))\n\t})\n}\n\nfunc TestStreamMessage(t *testing.T) {\n\tt.Run(\"Message is nil\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tassert.False(t, td.network.IsClosed(td.unknownPeerID))\n\t\t_, err := td.firewall.OpenStreamBundle(bytes.NewReader(nil), td.unknownPeerID)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Message from banned peer\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testStreamBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.bannedPeerID))\n\t\t_, err := td.firewall.OpenStreamBundle(bytes.NewReader(data), td.bannedPeerID)\n\t\trequire.ErrorIs(t, err, PeerBannedError{\n\t\t\tPeerID:  td.bannedPeerID,\n\t\t\tAddress: \"\",\n\t\t})\n\n\t\tassert.True(t, td.network.IsClosed(td.bannedPeerID))\n\t})\n\n\tt.Run(\"Gossip message as direct message\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testGossipBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.unknownPeerID))\n\t\t_, err := td.firewall.OpenStreamBundle(bytes.NewReader(data), td.unknownPeerID)\n\t\trequire.ErrorIs(t, err, ErrStreamMessage)\n\t\tassert.True(t, td.network.IsClosed(td.unknownPeerID))\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tdata := td.testStreamBundle()\n\n\t\tassert.False(t, td.network.IsClosed(td.goodPeerID))\n\t\t_, err := td.firewall.OpenStreamBundle(bytes.NewReader(data), td.goodPeerID)\n\t\trequire.NoError(t, err)\n\t\tassert.False(t, td.network.IsClosed(td.goodPeerID))\n\t})\n}\n\nfunc TestUpdateLastReceived(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tdata := td.testGossipBundle()\n\tnowNano := time.Now().UnixNano()\n\t_, err := td.firewall.OpenGossipBundle(data, td.goodPeerID)\n\trequire.NoError(t, err)\n\n\tpeerGood := td.firewall.peerSet.GetPeer(td.goodPeerID)\n\tassert.GreaterOrEqual(t, peerGood.LastReceived.UnixNano(), nowNano)\n}\n\nfunc TestBannedAddress(t *testing.T) {\n\tconf := &Config{\n\t\tBannedNets: []string{\n\t\t\t\"115.193.0.0/16\",\n\t\t\t\"240e:390:8a1:ae80:0000:0000:0000:0000/64\",\n\t\t},\n\t}\n\ttd := setup(t, conf)\n\n\ttests := []struct {\n\t\taddr   string\n\t\tbanned bool\n\t}{\n\t\t{\n\t\t\taddr:   \"/ip4/115.193.157.138/tcp/21888\",\n\t\t\tbanned: true,\n\t\t},\n\t\t{\n\t\t\taddr:   \"/ip4/10.10.10.10\",\n\t\t\tbanned: false,\n\t\t},\n\t\t{\n\t\t\taddr:   \"/ip6/240e:390:8a1:ae80:7dbc:64b6:e84c:d2bf/udp/21888\",\n\t\t\tbanned: true,\n\t\t},\n\t\t{\n\t\t\taddr:   \"/ip6/2a01:4f9:4a:1d85::2\",\n\t\t\tbanned: false,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpeerID := td.RandPeerID()\n\t\ttd.firewall.peerSet.UpdateAddress(peerID, tt.addr, lp2pnetwork.DirInbound)\n\t\tdata := td.testGossipBundle()\n\t\t_, err := td.firewall.OpenGossipBundle(data, peerID)\n\n\t\tif tt.banned {\n\t\t\texpectedErr := PeerBannedError{\n\t\t\t\tPeerID:  peerID,\n\t\t\t\tAddress: tt.addr,\n\t\t\t}\n\t\t\trequire.ErrorIs(t, err, expectedErr,\n\t\t\t\t\"test %v failed, addr %v should be banned\", no, tt.addr)\n\t\t} else {\n\t\t\trequire.NoError(t, err,\n\t\t\t\t\"test %v failed, addr %v should not be banned\", no, tt.addr)\n\t\t}\n\t}\n}\n\nfunc TestNetworkFlagsMainnet(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tbdl := bundle.NewBundle(message.NewQueryVoteMessage(td.RandHeight(), td.RandRound(), td.RandValAddress()))\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\terr := td.firewall.checkBundle(bdl)\n\trequire.NoError(t, err)\n\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkTestnet)\n\terr = td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n\n\tbdl.Flags = 0\n\terr = td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n}\n\nfunc TestNetworkFlagsTestnet(t *testing.T) {\n\ttd := setup(t, nil)\n\ttd.state.TestGenesis = genesis.TestnetGenesis()\n\n\tbdl := bundle.NewBundle(message.NewQueryVoteMessage(td.RandHeight(), td.RandRound(), td.RandValAddress()))\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkTestnet)\n\terr := td.firewall.checkBundle(bdl)\n\trequire.NoError(t, err)\n\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\terr = td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n\n\tbdl.Flags = 0\n\terr = td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n}\n\nfunc TestNetworkFlagsLocalnet(t *testing.T) {\n\ttd := setup(t, nil)\n\ttd.state.Genesis().Params().BlockVersion = 0x3f // changing genesis hash\n\n\tbdl := bundle.NewBundle(message.NewQueryVoteMessage(td.RandHeight(), td.RandRound(), td.RandValAddress()))\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkTestnet)\n\terr := td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\terr = td.firewall.checkBundle(bdl)\n\trequire.ErrorIs(t, err, ErrNetworkMismatch)\n\n\tbdl.Flags = 0\n\terr = td.firewall.checkBundle(bdl)\n\trequire.NoError(t, err)\n}\n\nfunc TestParseP2PAddr(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttests := []struct {\n\t\tname        string\n\t\taddress     string\n\t\texpectedIP  string\n\t\texpectError bool\n\t}{\n\t\t{\n\t\t\tname:       \"Valid IPv4 with p2p\",\n\t\t\taddress:    \"/ip4/84.247.165.249/tcp/21888/p2p/12D3KooWQmv2FcNQfh1EhA98twt8ePdkQaxEPeYfinEYyVS16juY\",\n\t\t\texpectedIP: \"84.247.165.249\",\n\t\t},\n\t\t{\n\t\t\tname:       \"Valid IPv4 without p2p\",\n\t\t\taddress:    \"/ip4/115.193.157.138/tcp/21888\",\n\t\t\texpectedIP: \"115.193.157.138\",\n\t\t},\n\t\t{\n\t\t\tname: \"Valid IPv6 with p2p\",\n\t\t\taddress: \"/ip6/240e:390:8a1:ae80:7dbc:64b6:e84c:d2bf/tcp/21888/p2p/\" +\n\t\t\t\t\"12D3KooWQmv2FcNQfh1EhA98twt8ePdkQaxEPeYfinEYyVS16juY\",\n\t\t\texpectedIP: \"240e:390:8a1:ae80:7dbc:64b6:e84c:d2bf\",\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid address\",\n\t\t\taddress:     \"/invalid/address\",\n\t\t\texpectError: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tip, err := td.firewall.getIPFromMultiAddress(tt.address)\n\t\t\tif tt.expectError {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, tt.expectedIP, ip)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc makeTestGossipMessage(consensusHeight uint32) *network.GossipMessage {\n\tdata := make([]byte, 0, 6)\n\tdata = append(data, 0x04, 0x1a)\n\tdata = binary.BigEndian.AppendUint32(data, consensusHeight)\n\n\treturn &network.GossipMessage{\n\t\tData: data,\n\t}\n}\n\nfunc TestAllowBlockRequest(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.RateLimit.BlockTopic = 1\n\n\ttd := setup(t, conf)\n\n\ttestBlk, testCert := td.GenerateTestBlock(2_900_001)\n\trequire.NoError(t, td.state.CommitBlock(testBlk, testCert))\n\n\tt.Run(\"expired message\", func(t *testing.T) {\n\t\tmsg := makeTestGossipMessage(uint32(td.state.LastBlockHeight() - 2))\n\n\t\tassert.Equal(t, network.Drop, td.firewall.AllowBlockRequest(msg))\n\t})\n\n\tt.Run(\"rate limit exceeded\", func(t *testing.T) {\n\t\tmsg := makeTestGossipMessage(uint32(td.state.LastBlockHeight()))\n\n\t\tassert.Equal(t, network.Propagate, td.firewall.AllowBlockRequest(msg))\n\t\tassert.Equal(t, network.DropButConsume, td.firewall.AllowBlockRequest(msg))\n\t})\n}\n\nfunc TestAllowTransactionRequest(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.RateLimit.TransactionTopic = 1\n\n\ttd := setup(t, conf)\n\n\tt.Run(\"rate limit exceeded\", func(t *testing.T) {\n\t\tmsg := makeTestGossipMessage(uint32(td.state.LastBlockHeight()))\n\n\t\tassert.Equal(t, network.Propagate, td.firewall.AllowTransactionRequest(msg))\n\t\tassert.Equal(t, network.DropButConsume, td.firewall.AllowTransactionRequest(msg))\n\t})\n}\n\nfunc TestAllowConsensusRequest(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.RateLimit.ConsensusTopic = 1\n\n\ttd := setup(t, conf)\n\n\ttestBlk, testCert := td.GenerateTestBlock(2_900_001)\n\trequire.NoError(t, td.state.CommitBlock(testBlk, testCert))\n\n\tt.Run(\"expired message\", func(t *testing.T) {\n\t\tmsg := makeTestGossipMessage(uint32(td.state.LastBlockHeight() - 2))\n\n\t\tassert.Equal(t, network.Drop, td.firewall.AllowConsensusRequest(msg))\n\t})\n\n\tt.Run(\"rate limit exceeded\", func(t *testing.T) {\n\t\tmsg := makeTestGossipMessage(uint32(td.state.LastBlockHeight()))\n\n\t\tassert.Equal(t, network.Propagate, td.firewall.AllowConsensusRequest(msg))\n\t\tassert.Equal(t, network.DropButConsume, td.firewall.AllowConsensusRequest(msg))\n\t})\n}\n"
  },
  {
    "path": "sync/handler.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype messageHandler interface {\n\tParseMessage(message.Message, peer.ID)\n\tPrepareBundle(message.Message) *bundle.Bundle\n}\n"
  },
  {
    "path": "sync/handler_block_announce.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype blockAnnounceHandler struct {\n\t*synchronizer\n}\n\nfunc newBlockAnnounceHandler(sync *synchronizer) messageHandler {\n\treturn &blockAnnounceHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *blockAnnounceHandler) ParseMessage(m message.Message, pid peer.ID) {\n\tmsg := m.(*message.BlockAnnounceMessage)\n\thandler.logger.Trace(\"parsing BlockAnnounce message\", \"msg\", msg)\n\n\tif handler.cache.HasBlockInCache(msg.Height()) {\n\t\t// We have processed this block before.\n\n\t\treturn\n\t}\n\n\thandler.peerSet.UpdateHeight(pid, msg.Height(), msg.Block.Hash())\n\thandler.cache.AddCertificate(msg.Certificate)\n\thandler.cache.AddBlock(msg.Block)\n\n\thandler.tryCommitBlocks()\n\thandler.moveConsensusToNewHeight()\n\thandler.updateBlockchain()\n}\n\nfunc (*blockAnnounceHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\n\treturn bdl\n}\n"
  },
  {
    "path": "sync/handler_block_announce_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerBlockAnnounceParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.CommitTestBlocks(10)\n\n\tpid := td.RandPeerID()\n\tlastHeight := td.state.LastBlockHeight()\n\tblk1, cert1 := td.GenerateTestBlock(lastHeight + 1)\n\tmsg1 := message.NewBlockAnnounceMessage(blk1, cert1, nil)\n\n\tblk2, cert2 := td.GenerateTestBlock(lastHeight + 2)\n\tmsg2 := message.NewBlockAnnounceMessage(blk2, cert2, nil)\n\n\tt.Run(\"Receiving new block announce message, without committing previous block\", func(t *testing.T) {\n\t\ttd.receivingNewMessage(td.sync, msg2, pid)\n\n\t\tstateHeight := td.sync.state.LastBlockHeight()\n\t\tconsHeight, _ := td.sync.getConsMgr().HeightRound()\n\t\tassert.Equal(t, lastHeight, stateHeight)\n\t\tassert.Equal(t, lastHeight+1, consHeight)\n\t})\n\n\tt.Run(\"Receiving missed block, should commit both blocks\", func(t *testing.T) {\n\t\ttd.receivingNewMessage(td.sync, msg1, pid)\n\n\t\tassert.Equal(t, lastHeight+2, td.sync.state.LastBlockHeight())\n\t})\n}\n\nfunc TestHandlerBlockAnnounceBroadcastingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\ttd.sync.broadcast(msg)\n\n\tmsg1 := td.shouldPublishMessageWithThisType(t, message.TypeBlockAnnounce)\n\tassert.Equal(t, msg.Certificate.Height(), msg1.Message.(*message.BlockAnnounceMessage).Certificate.Height())\n}\n\nfunc TestHandlerBlockAnnounceCacheBlock(t *testing.T) {\n\ttd := setup(t, nil)\n\n\theight := td.RandHeight()\n\tblk1, cert1 := td.GenerateTestBlock(height)\n\tblk2, cert2 := td.GenerateTestBlock(height)\n\tmsg1 := message.NewBlockAnnounceMessage(blk1, cert1, nil)\n\tmsg2 := message.NewBlockAnnounceMessage(blk2, cert2, nil)\n\n\ttd.receivingNewMessage(td.sync, msg1, td.RandPeerID())\n\ttd.receivingNewMessage(td.sync, msg2, td.RandPeerID())\n\n\tcachedBlock := td.sync.cache.GetBlock(height)\n\tcachedCert := td.sync.cache.GetCertificate(height)\n\tassert.Equal(t, blk1, cachedBlock)\n\tassert.Equal(t, cert1, cachedCert)\n}\n"
  },
  {
    "path": "sync/handler_blocks_request.go",
    "content": "package sync\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype blocksRequestHandler struct {\n\t*synchronizer\n}\n\nfunc newBlocksRequestHandler(sync *synchronizer) messageHandler {\n\treturn &blocksRequestHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *blocksRequestHandler) ParseMessage(m message.Message, pid peer.ID) {\n\tmsg := m.(*message.BlocksRequestMessage)\n\thandler.logger.Trace(\"parsing BlocksRequest message\", \"msg\", msg)\n\n\tpeer := handler.peerSet.GetPeer(pid)\n\tif peer == nil {\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeRejected,\n\t\t\tfmt.Sprintf(\"unknown peer (%s)\", pid.String()), msg.SessionID, 0, nil, nil)\n\n\t\thandler.respond(response, pid)\n\n\t\treturn\n\t}\n\n\tif !peer.Status.IsKnown() {\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeRejected,\n\t\t\tfmt.Sprintf(\"not handshaked (%s)\", peer.Status.String()), msg.SessionID, 0, nil, nil)\n\n\t\thandler.respond(response, pid)\n\n\t\treturn\n\t}\n\n\tourHeight := handler.state.LastBlockHeight()\n\tif msg.From > ourHeight {\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeRejected,\n\t\t\tfmt.Sprintf(\"requested blocks from %v exceed current height %v\",\n\t\t\t\tmsg.From, ourHeight), msg.SessionID, 0, nil, nil)\n\n\t\thandler.respond(response, pid)\n\n\t\treturn\n\t}\n\n\tif msg.Count > handler.config.BlockPerSession {\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeRejected,\n\t\t\tfmt.Sprintf(\"requested block range %v-%v exceeds the allowed %v blocks per session\",\n\t\t\t\tmsg.From, msg.To(), handler.config.BlockPerSession), msg.SessionID, 0, nil, nil)\n\n\t\thandler.respond(response, pid)\n\n\t\treturn\n\t}\n\n\t// Help this peer to sync up\n\theight := msg.From\n\tcount := msg.Count\n\tfor {\n\t\tblockCount := util.Min(handler.config.BlockPerMessage, count)\n\t\tblocksData := handler.prepareBlocks(height, blockCount)\n\t\tif len(blocksData) == 0 {\n\t\t\tbreak\n\t\t}\n\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeMoreBlocks,\n\t\t\tmessage.ResponseCodeMoreBlocks.String(), msg.SessionID, height, blocksData, nil)\n\t\thandler.respond(response, pid)\n\n\t\theight += types.Height(len(blocksData))\n\t\tcount -= uint32(len(blocksData))\n\t\tif count <= 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif msg.To() >= ourHeight {\n\t\tlastCert := handler.state.LastCertificate()\n\t\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeSynced,\n\t\t\tmessage.ResponseCodeSynced.String(), msg.SessionID, lastCert.Height(), nil, lastCert)\n\n\t\thandler.respond(response, pid)\n\n\t\treturn\n\t}\n\n\tresponse := message.NewBlocksResponseMessage(message.ResponseCodeNoMoreBlocks,\n\t\tmessage.ResponseCodeNoMoreBlocks.String(), msg.SessionID, 0, nil, nil)\n\n\thandler.respond(response, pid)\n}\n\nfunc (*blocksRequestHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\treturn bundle.NewBundle(m)\n}\n\nfunc (handler *blocksRequestHandler) respond(msg *message.BlocksResponseMessage, pid peer.ID) {\n\tif msg.ResponseCode == message.ResponseCodeRejected {\n\t\thandler.logger.Debug(\"rejecting block request message\", \"msg\", msg,\n\t\t\t\"pid\", pid, \"reason\", msg.Reason)\n\n\t\thandler.sendTo(msg, pid)\n\t} else {\n\t\thandler.logger.Info(\"responding block request message\", \"msg\", msg, \"pid\", pid)\n\n\t\thandler.sendTo(msg, pid)\n\t}\n}\n"
  },
  {
    "path": "sync/handler_blocks_request_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerBlocksRequestParsingMessages(t *testing.T) {\n\tt.Run(\"NetworkLimited service is enabled\", func(t *testing.T) {\n\t\tconfig := testConfig()\n\t\tconfig.Services = service.Services(service.PrunedNode)\n\n\t\ttd := setup(t, config)\n\t\tsid := td.RandIntMax(100)\n\n\t\ttd.state.CommitTestBlocks(31)\n\t\tcurHeight := td.state.LastBlockHeight()\n\n\t\tt.Run(\"Reject request from unknown peers\", func(t *testing.T) {\n\t\t\tpid := td.RandPeerID()\n\t\t\tmsg := message.NewBlocksRequestMessage(sid, curHeight-1, 1)\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tres := bdl.Message.(*message.BlocksResponseMessage)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, res.ResponseCode)\n\t\t\tassert.Contains(t, res.Reason, \"unknown peer\")\n\t\t\tassert.Zero(t, res.From)\n\t\t\tassert.Equal(t, sid, res.SessionID)\n\t\t})\n\n\t\tt.Run(\"Reject request from peers without handshaking\", func(t *testing.T) {\n\t\t\tpid := td.addPeer(t, status.StatusConnected, service.New(service.None))\n\t\t\tmsg := message.NewBlocksRequestMessage(sid, curHeight-1, 1)\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tres := bdl.Message.(*message.BlocksResponseMessage)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, res.ResponseCode)\n\t\t\tassert.Contains(t, res.Reason, \"not handshaked\")\n\t\t})\n\n\t\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\n\t\tt.Run(\"Peer requested blocks that we don't have\", func(t *testing.T) {\n\t\t\tmsg := message.NewBlocksRequestMessage(sid, curHeight+1, 1)\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tres := bdl.Message.(*message.BlocksResponseMessage)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, res.ResponseCode)\n\t\t\tassert.Contains(t, res.Reason, \"requested blocks from 32 exceed current height 31\")\n\t\t})\n\n\t\tt.Run(\"Request blocks more than `BlockPerSession`\", func(t *testing.T) {\n\t\t\tmsg := message.NewBlocksRequestMessage(sid, 10, config.BlockPerSession+1)\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tres := bdl.Message.(*message.BlocksResponseMessage)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, res.ResponseCode)\n\t\t\tassert.Contains(t, res.Reason, \"requested block range 10-37 exceeds the allowed 27 blocks per session\")\n\t\t})\n\n\t\tt.Run(\"Accept request within `BlockPerSession`\", func(t *testing.T) {\n\t\t\tt.Run(\"Peer needs more block\", func(t *testing.T) {\n\t\t\t\tmsg := message.NewBlocksRequestMessage(sid, curHeight-types.Height(config.BlockPerMessage), config.BlockPerMessage)\n\t\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\t\tbdl1 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\t\tres1 := bdl1.Message.(*message.BlocksResponseMessage)\n\t\t\t\tassert.Equal(t, message.ResponseCodeMoreBlocks, res1.ResponseCode)\n\t\t\t\tassert.Equal(t, curHeight-types.Height(config.BlockPerMessage), res1.From)\n\t\t\t\tassert.Equal(t, curHeight-1, res1.To())\n\t\t\t\tassert.Equal(t, config.BlockPerMessage, res1.Count())\n\n\t\t\t\tbdl2 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\t\tres2 := bdl2.Message.(*message.BlocksResponseMessage)\n\t\t\t\tassert.Equal(t, message.ResponseCodeNoMoreBlocks, res2.ResponseCode)\n\t\t\t\tassert.Zero(t, res2.From)\n\t\t\t\tassert.Zero(t, res2.To())\n\t\t\t\tassert.Zero(t, res2.Count())\n\t\t\t})\n\n\t\t\tt.Run(\"Peer synced\", func(t *testing.T) {\n\t\t\t\tmsg := message.NewBlocksRequestMessage(sid,\n\t\t\t\t\tcurHeight-types.Height(config.BlockPerMessage)+1, config.BlockPerMessage)\n\t\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\t\tbdl1 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\t\tres1 := bdl1.Message.(*message.BlocksResponseMessage)\n\t\t\t\tassert.Equal(t, message.ResponseCodeMoreBlocks, res1.ResponseCode)\n\t\t\t\tassert.Equal(t, curHeight-types.Height(config.BlockPerMessage)+1, res1.From)\n\t\t\t\tassert.Equal(t, curHeight, res1.To())\n\t\t\t\tassert.Equal(t, config.BlockPerMessage, res1.Count())\n\n\t\t\t\tbdl2 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\t\tres2 := bdl2.Message.(*message.BlocksResponseMessage)\n\t\t\t\tassert.Equal(t, message.ResponseCodeSynced, res2.ResponseCode)\n\t\t\t\tassert.Equal(t, curHeight, res2.From)\n\t\t\t\tassert.Zero(t, res2.To())\n\t\t\t\tassert.Zero(t, res2.Count())\n\t\t\t})\n\t\t})\n\t})\n\n\tt.Run(\"Network service is enabled\", func(t *testing.T) {\n\t\tconfig := testConfig()\n\t\tconfig.Services = service.New(service.FullNode)\n\n\t\ttd := setup(t, config)\n\t\tsid := td.RandIntMax(100)\n\n\t\ttd.state.CommitTestBlocks(31)\n\t\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\n\t\tt.Run(\"Requesting one block\", func(t *testing.T) {\n\t\t\tmsg := message.NewBlocksRequestMessage(sid, 1, 2)\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\t\tmsg1 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tassert.Equal(t, message.ResponseCodeMoreBlocks, msg1.Message.(*message.BlocksResponseMessage).ResponseCode)\n\n\t\t\tmsg2 := td.shouldPublishMessageWithThisType(t, message.TypeBlocksResponse)\n\t\t\tassert.Equal(t, message.ResponseCodeNoMoreBlocks, msg2.Message.(*message.BlocksResponseMessage).ResponseCode)\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "sync/handler_blocks_response.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/types/block\"\n)\n\ntype blocksResponseHandler struct {\n\t*synchronizer\n}\n\nfunc newBlocksResponseHandler(sync *synchronizer) messageHandler {\n\treturn &blocksResponseHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *blocksResponseHandler) ParseMessage(m message.Message, pid peer.ID) {\n\tmsg := m.(*message.BlocksResponseMessage)\n\thandler.logger.Trace(\"parsing BlocksResponse message\", \"msg\", msg)\n\n\tif msg.IsRequestRejected() {\n\t\thandler.logger.Warn(\"blocks request is rejected\", \"pid\", pid,\n\t\t\t\"reason\", msg.Reason, \"sid\", msg.SessionID)\n\t} else {\n\t\thandler.logger.Info(\"blocks received\", \"from\", msg.From, \"count\", msg.Count(),\n\t\t\t\"pid\", pid, \"sid\", msg.SessionID)\n\n\t\t// TODO:\n\t\t// It is good to check the latest height before adding blocks to the cache.\n\t\t// If they have already been committed, this message can be ignored.\n\t\t// Need to test!\n\t\tfor _, data := range msg.BlocksData {\n\t\t\tblk, err := block.FromBytes(data)\n\t\t\tif err != nil {\n\t\t\t\thandler.logger.Warn(\"unable to decode block data\",\n\t\t\t\t\t\"from\", msg.From, \"pid\", pid, \"error\", err)\n\t\t\t} else {\n\t\t\t\thandler.cache.AddBlock(blk)\n\t\t\t}\n\t\t}\n\t\thandler.cache.AddCertificate(msg.LastCertificate)\n\t\thandler.tryCommitBlocks()\n\t}\n\n\thandler.updateSession(msg.SessionID, msg.ResponseCode)\n}\n\nfunc (*blocksResponseHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\tbdl.CompressIt()\n\n\treturn bdl\n}\n\nfunc (handler *blocksResponseHandler) updateSession(sid int, code message.ResponseCode) {\n\tswitch code {\n\tcase message.ResponseCodeOK:\n\t\thandler.logger.Debug(\"session accepted. keep session open\", \"sid\", sid)\n\t\thandler.peerSet.UpdateSessionLastActivity(sid)\n\n\tcase message.ResponseCodeRejected:\n\t\thandler.logger.Debug(\"session rejected, uncompleted session\", \"sid\", sid)\n\t\thandler.peerSet.SetSessionUncompleted(sid)\n\n\tcase message.ResponseCodeMoreBlocks:\n\t\thandler.logger.Debug(\"peer responding us. keep session open\", \"sid\", sid)\n\t\thandler.peerSet.UpdateSessionLastActivity(sid)\n\n\tcase message.ResponseCodeNoMoreBlocks:\n\t\thandler.logger.Debug(\"peer sent all blocks. close session\", \"sid\", sid)\n\t\thandler.peerSet.SetSessionCompleted(sid) // TODO: test me\n\t\thandler.updateBlockchain()\n\n\tcase message.ResponseCodeSynced:\n\t\thandler.logger.Debug(\"peer informed us we are synced. close session\", \"sid\", sid)\n\t\thandler.peerSet.SetSessionCompleted(sid) // TODO: test me\n\t\thandler.moveConsensusToNewHeight()\n\t}\n}\n"
  },
  {
    "path": "sync/handler_blocks_response_test.go",
    "content": "package sync\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestHandlerBlocksResponseInvalidBlockData(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.CommitTestBlocks(10)\n\tlastHeight := td.state.LastBlockHeight()\n\tblk, cert := td.GenerateTestBlock(lastHeight+1, testsuite.BlockWithPrevCert(nil))\n\tdata, _ := blk.Bytes()\n\ttests := []struct {\n\t\tdata []byte\n\t}{\n\t\t{data: td.RandBytes(16)},\n\t\t{data: data},\n\t}\n\n\tfor _, tt := range tests {\n\t\tpid := td.RandPeerID()\n\t\tsid := td.RandIntMax(1000)\n\t\tmsg := message.NewBlocksResponseMessage(message.ResponseCodeMoreBlocks,\n\t\t\tmessage.ResponseCodeMoreBlocks.String(),\n\t\t\tsid, lastHeight+1, [][]byte{tt.data}, cert)\n\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\tassert.Nil(t, td.sync.cache.GetBlock(msg.From))\n\t}\n}\n\nfunc TestHandlerBlocksResponseOneBlockShorter(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.CommitTestBlocks(10)\n\n\tlastHeight := td.state.LastBlockHeight()\n\tblk1, cert1 := td.GenerateTestBlock(lastHeight + 1)\n\td1, _ := blk1.Bytes()\n\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\n\tsid := td.RandIntMax(1000)\n\tmsg := message.NewBlocksResponseMessage(message.ResponseCodeSynced, t.Name(), sid,\n\t\tlastHeight+1, [][]byte{d1}, cert1)\n\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\tassert.Equal(t, lastHeight+1, td.state.LastBlockHeight())\n}\n\nfunc TestHandlerBlocksResponseStrippedPublicKey(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.CommitTestBlocks(10)\n\n\tlastHeight := td.state.LastBlockHeight()\n\n\t// Add a new block and keep the signer key\n\t_, indexedPrv := td.RandBLSKeyPair()\n\ttrx0 := td.GenerateTestTransferTx(testsuite.TransactionWithSigner(indexedPrv))\n\ttrxs0 := []*tx.Tx{trx0}\n\tblk0, cert0 := td.GenerateTestBlock(lastHeight+1, testsuite.BlockWithTransactions(trxs0))\n\terr := td.state.CommitBlock(blk0, cert0)\n\trequire.NoError(t, err)\n\tlastHeight++\n\t// -----\n\n\t_, rndPrv := td.RandBLSKeyPair()\n\ttrx1 := td.GenerateTestTransferTx(testsuite.TransactionWithSigner(rndPrv))\n\ttrx1.StripPublicKey()\n\ttrxs1 := []*tx.Tx{trx1}\n\tblk1, _ := td.GenerateTestBlock(lastHeight+1, testsuite.BlockWithTransactions(trxs1))\n\n\ttrx2 := td.GenerateTestTransferTx(testsuite.TransactionWithSigner(indexedPrv))\n\ttrx2.StripPublicKey()\n\ttrxs2 := []*tx.Tx{trx2}\n\tblk2, _ := td.GenerateTestBlock(lastHeight+1, testsuite.BlockWithTransactions(trxs2))\n\n\ttests := []struct {\n\t\treceivedBlock *block.Block\n\t\tshouldFail    bool\n\t}{\n\t\t{\n\t\t\treceivedBlock: blk1,\n\t\t\tshouldFail:    true,\n\t\t},\n\t\t{\n\t\t\treceivedBlock: blk2,\n\t\t\tshouldFail:    false,\n\t\t},\n\t}\n\n\t// Add a peer\n\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\n\tfor _, tt := range tests {\n\t\tblkData, _ := tt.receivedBlock.Bytes()\n\t\tsid := td.RandIntMax(1000)\n\t\tcert := td.GenerateTestCertificate(lastHeight + 1)\n\t\tmsg := message.NewBlocksResponseMessage(message.ResponseCodeMoreBlocks, message.ResponseCodeMoreBlocks.String(), sid,\n\t\t\tlastHeight+1, [][]byte{blkData}, cert)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\tif tt.shouldFail {\n\t\t\tassert.Nil(t, td.sync.cache.GetBlock(msg.From))\n\t\t} else {\n\t\t\tassert.NotNil(t, td.sync.cache.GetBlock(msg.From))\n\t\t}\n\t}\n}\n\nfunc shouldPublishBlockRequest(t *testing.T, net *network.MockNetwork, from types.Height) {\n\tt.Helper()\n\n\tbdl := shouldPublishMessageWithThisType(t, net, message.TypeBlocksRequest)\n\tmsg := bdl.Message.(*message.BlocksRequestMessage)\n\trequire.Equal(t, from, msg.From)\n}\n\nfunc shouldPublishBlockResponse(t *testing.T, net *network.MockNetwork,\n\tfrom types.Height, count uint32, code message.ResponseCode,\n) {\n\tt.Helper()\n\n\tbdl := shouldPublishMessageWithThisType(t, net, message.TypeBlocksResponse)\n\tmsg := bdl.Message.(*message.BlocksResponseMessage)\n\trequire.Equal(t, from, msg.From)\n\trequire.Equal(t, count, msg.Count())\n\trequire.Equal(t, code, msg.ResponseCode)\n}\n\ntype networkAliceBob struct {\n\t*testsuite.TestSuite\n\n\tstateAlice   *state.MockState\n\tstateBob     *state.MockState\n\tnetworkAlice *network.MockNetwork\n\tnetworkBob   *network.MockNetwork\n\tsyncAlice    *synchronizer\n\tsyncBob      *synchronizer\n}\n\nfunc makeAliceAndBobNetworks(t *testing.T) *networkAliceBob {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tconfigAlice := testConfig()\n\tconfigBob := testConfig()\n\n\tvalKeyAlice := []*bls.ValidatorKey{ts.RandValKey()}\n\tvalKeyBob := []*bls.ValidatorKey{ts.RandValKey()}\n\tstateAlice := state.MockingState(ts)\n\tstateBob := state.MockingState(ts)\n\tconsV1MgrAlice, _ := consmgr.MockingManager(ts, stateAlice, valKeyAlice)\n\tconsV2MgrAlice, _ := consmgr.MockingManager(ts, stateAlice, valKeyAlice)\n\tconsV1MgrBob, _ := consmgr.MockingManager(ts, stateBob, valKeyBob)\n\tconsV2MgrBob, _ := consmgr.MockingManager(ts, stateBob, valKeyBob)\n\tbroadcastPipe := pipeline.New[message.Message](t.Context())\n\tnetworkAlice := network.MockingNetwork(ts, ts.RandPeerID())\n\tnetworkBob := network.MockingNetwork(ts, ts.RandPeerID())\n\n\tsync1, err := NewSynchronizer(t.Context(), configAlice, valKeyAlice, stateAlice,\n\t\tconsV1MgrAlice, consV2MgrAlice, networkAlice, broadcastPipe, networkAlice.EventPipe)\n\trequire.NoError(t, err)\n\tsyncAlice := sync1.(*synchronizer)\n\n\tsync2, err := NewSynchronizer(t.Context(), configBob, valKeyBob, stateBob,\n\t\tconsV1MgrBob, consV2MgrBob, networkBob, broadcastPipe, networkBob.EventPipe)\n\trequire.NoError(t, err)\n\tsyncBob := sync2.(*synchronizer)\n\n\t// -------------------------------\n\t// Better logging during testing\n\toverrideLogger := func(sync *synchronizer, name string) {\n\t\tsync.logger = logger.NewSubLogger(\"_sync\",\n\t\t\ttestsuite.NewOverrideLogStringer(fmt.Sprintf(\"%s - %s: \", name, t.Name()), sync))\n\t}\n\n\toverrideLogger(syncAlice, \"Alice\")\n\toverrideLogger(syncBob, \"Bob\")\n\t// -------------------------------\n\n\trequire.NoError(t, syncAlice.Start())\n\trequire.NoError(t, syncBob.Start())\n\n\t// Connect the networks of Alice and Bob to each other (Alice is outbound, Bob is inbound)\n\tnetworkBob.AddAnotherNetwork(networkAlice, lp2pnetwork.DirInbound)\n\tnetworkAlice.AddAnotherNetwork(networkBob, lp2pnetwork.DirOutbound)\n\n\t// Verify that Hello messages are exchanged between Alice and Bob\n\t// Alice sends hello to Bob\n\tshouldPublishMessageWithThisType(t, networkAlice, message.TypeHello)\n\tshouldPublishMessageWithThisType(t, networkBob, message.TypeHello)\n\n\tshouldPublishMessageWithThisType(t, networkBob, message.TypeHelloAck)\n\tshouldPublishMessageWithThisType(t, networkAlice, message.TypeHelloAck)\n\n\t// Ensure Alice and Bob are connected and handshaked\n\trequire.Eventually(t, func() bool {\n\t\treturn syncAlice.PeerSet().GetPeerStatus(syncBob.SelfID()).IsKnown() &&\n\t\t\tsyncBob.PeerSet().GetPeerStatus(syncAlice.SelfID()).IsKnown()\n\t}, 2*time.Second, 100*time.Millisecond)\n\n\treturn &networkAliceBob{\n\t\tTestSuite:    ts,\n\t\tsyncAlice:    syncAlice,\n\t\tstateAlice:   stateAlice,\n\t\tnetworkAlice: networkAlice,\n\t\tsyncBob:      syncBob,\n\t\tstateBob:     stateBob,\n\t\tnetworkBob:   networkBob,\n\t}\n}\n\n// TestIdenticalBundles tests if two different peers publish the same message,\n// whether the bundle data is also the same.\nfunc TestHandlerBlocksResponseIdenticalBundles(t *testing.T) {\n\tnets := makeAliceAndBobNetworks(t)\n\n\tblk, cert := nets.GenerateTestBlock(nets.RandHeight())\n\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\n\tbdlAlice := nets.syncAlice.prepareBundle(msg)\n\tbdlBob := nets.syncBob.prepareBundle(msg)\n\n\tassert.Equal(t, bdlAlice, bdlBob)\n}\n\n// TestSyncing is an important test to verify the syncing process between two\n// test nodes, Alice and Bob. In real-world scenarios, multiple nodes are typically\n// involved, but the procedure remains similar.\nfunc TestHandlerBlocksResponseSyncing(t *testing.T) {\n\tnets := makeAliceAndBobNetworks(t)\n\n\t// Adding 100 blocks for Bob\n\tblockInterval := nets.syncBob.state.Genesis().Params().BlockInterval()\n\tblockTime := nets.syncBob.state.Genesis().GenesisTime()\n\tfor i := types.Height(0); i < 100; i++ {\n\t\tblk, cert := nets.GenerateTestBlock(i+1, testsuite.BlockWithTime(blockTime))\n\t\trequire.NoError(t, nets.syncBob.state.CommitBlock(blk, cert))\n\n\t\tblockTime = blockTime.Add(blockInterval)\n\t}\n\n\tassert.Equal(t, types.Height(0), nets.syncAlice.state.LastBlockHeight())\n\tassert.Equal(t, types.Height(100), nets.syncBob.state.LastBlockHeight())\n\n\t// Announcing a block\n\tblk, cert := nets.GenerateTestBlock(nets.RandHeight())\n\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\tnets.syncBob.broadcast(msg)\n\tshouldPublishMessageWithThisType(t, nets.networkBob, message.TypeBlockAnnounce)\n\n\t// Perform block syncing\n\tassert.Equal(t, uint32(11), nets.syncAlice.config.BlockPerMessage)\n\tassert.Equal(t, uint32(27), nets.syncAlice.config.BlockPerSession)\n\n\tshouldPublishBlockRequest(t, nets.networkAlice, 1)\n\tshouldPublishBlockResponse(t, nets.networkBob, 1, 11, message.ResponseCodeMoreBlocks)  // 1-11\n\tshouldPublishBlockResponse(t, nets.networkBob, 12, 11, message.ResponseCodeMoreBlocks) // 12-22\n\tshouldPublishBlockResponse(t, nets.networkBob, 23, 5, message.ResponseCodeMoreBlocks)  // 23-27\n\tshouldPublishBlockResponse(t, nets.networkBob, 0, 0, message.ResponseCodeNoMoreBlocks) // NoMoreBlock\n\n\tshouldPublishBlockRequest(t, nets.networkAlice, 28)\n\tshouldPublishBlockResponse(t, nets.networkBob, 28, 11, message.ResponseCodeMoreBlocks) // 28-38\n\tshouldPublishBlockResponse(t, nets.networkBob, 39, 11, message.ResponseCodeMoreBlocks) // 39-49\n\tshouldPublishBlockResponse(t, nets.networkBob, 50, 5, message.ResponseCodeMoreBlocks)  // 50-54\n\tshouldPublishBlockResponse(t, nets.networkBob, 0, 0, message.ResponseCodeNoMoreBlocks) // NoMoreBlock\n\n\tshouldPublishBlockRequest(t, nets.networkAlice, 55)\n\tshouldPublishBlockResponse(t, nets.networkBob, 55, 11, message.ResponseCodeMoreBlocks) // 55-65\n\tshouldPublishBlockResponse(t, nets.networkBob, 66, 11, message.ResponseCodeMoreBlocks) // 66-76\n\tshouldPublishBlockResponse(t, nets.networkBob, 77, 5, message.ResponseCodeMoreBlocks)  // 77-81\n\tshouldPublishBlockResponse(t, nets.networkBob, 0, 0, message.ResponseCodeNoMoreBlocks) // NoMoreBlock\n\n\tshouldPublishBlockRequest(t, nets.networkAlice, 82)\n\tshouldPublishBlockResponse(t, nets.networkBob, 82, 11, message.ResponseCodeMoreBlocks) // 82-92\n\tshouldPublishBlockResponse(t, nets.networkBob, 93, 8, message.ResponseCodeMoreBlocks)  // 93-100\n\tshouldPublishBlockResponse(t, nets.networkBob, 100, 0, message.ResponseCodeSynced)     // Synced\n\n\tassert.Eventually(t, func() bool {\n\t\treturn nets.syncAlice.state.LastBlockHeight() == types.Height(100)\n\t}, 10*time.Second, 1*time.Second)\n}\n\nfunc TestHandlerBlocksResponseSyncingHasBlockInCache(t *testing.T) {\n\tnets := makeAliceAndBobNetworks(t)\n\n\t// Adding 100 blocks for Bob\n\tblockInterval := nets.syncBob.state.Genesis().Params().BlockInterval()\n\tblockTime := nets.syncBob.state.Genesis().GenesisTime()\n\tfor i := types.Height(0); i < 23; i++ {\n\t\tblk, cert := nets.GenerateTestBlock(i+1, testsuite.BlockWithTime(blockTime))\n\t\trequire.NoError(t, nets.syncBob.state.CommitBlock(blk, cert))\n\n\t\tblockTime = blockTime.Add(blockInterval)\n\t}\n\n\tassert.Equal(t, types.Height(0), nets.syncAlice.state.LastBlockHeight())\n\tassert.Equal(t, types.Height(23), nets.syncBob.state.LastBlockHeight())\n\n\t// Adding some blocks to the cache\n\tblk1 := nets.stateBob.TestStore.Blocks[1]\n\tblk2 := nets.stateBob.TestStore.Blocks[2]\n\tblk3 := nets.stateBob.TestStore.Blocks[3]\n\tnets.syncAlice.cache.AddBlock(blk1)\n\tnets.syncAlice.cache.AddBlock(blk2)\n\tnets.syncAlice.cache.AddBlock(blk3)\n\n\t// Announcing a block\n\tblk, cert := nets.GenerateTestBlock(nets.RandHeight())\n\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\tnets.syncBob.broadcast(msg)\n\tshouldPublishMessageWithThisType(t, nets.networkBob, message.TypeBlockAnnounce)\n\n\t// blocks 1-2 are inside the cache\n\tshouldPublishBlockRequest(t, nets.networkAlice, 4)\n\tshouldPublishBlockResponse(t, nets.networkBob, 4, 11, message.ResponseCodeMoreBlocks) // 4-14\n\tshouldPublishBlockResponse(t, nets.networkBob, 15, 9, message.ResponseCodeMoreBlocks) // 15-23\n\tshouldPublishBlockResponse(t, nets.networkBob, 23, 0, message.ResponseCodeSynced)     // Synced\n}\n"
  },
  {
    "path": "sync/handler_hello.go",
    "content": "package sync\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\n//\n// Handshake protocol in Pactus\n//\n// Handshake protocol is used to exchange information between two peers\n// when they first connect to each other. The handshake process involves\n// the following steps:\n//\n// 1. When two peers connect, the outbound peer first sends a Hello message to the inbound peer.\n// 2. The inbound peer responds with a HelloAck message.\n// 3. Then the Inbound peer sends a Hello message to the outbound peer.\n// 4. Finally, the outbound peer responds with a HelloAck message.\n//\n//                  |                        |\n//    Outbound Peer |                        | Inbound Peer\n//                  |                        |\n//        Connected |                        | Connected\n//                  |                        |\n//                  |         Hello          |\n//                  | ---------------------> |\n//                  |         HelloAck       |\n//                  | <--------------------- |\n//                  |                        |\n//                  |         Hello          |\n//            Known | <--------------------- |\n//                  |         HelloAck       |\n//                  | ---------------------> | Known\n//                  |                        |\n//\n// After the handshake process is complete, both peers have exchanged\n// information about their status, such as their latest block height,\n// genesis hash, and supported services. This information is used to\n// determine whether the peers are compatible and can communicate\n// effectively.\n//\n\ntype helloHandler struct {\n\t*synchronizer\n}\n\nfunc newHelloHandler(sync *synchronizer) messageHandler {\n\treturn &helloHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *helloHandler) ParseMessage(m message.Message, pid peer.ID) {\n\tmsg := m.(*message.HelloMessage)\n\thandler.logger.Trace(\"parsing Hello message\", \"msg\", msg)\n\n\thandler.logger.Debug(\"updating peer info\",\n\t\t\"pid\", pid,\n\t\t\"moniker\", msg.Moniker,\n\t\t\"services\", msg.Services)\n\n\thandler.peerSet.UpdateInfo(pid,\n\t\tmsg.Moniker,\n\t\tmsg.Agent,\n\t\tmsg.PublicKeys,\n\t\tmsg.Services)\n\thandler.peerSet.UpdateHeight(pid, msg.Height, msg.BlockHash)\n\n\tif msg.GenesisHash != handler.state.Genesis().Hash() {\n\t\tresponse := message.NewHelloAckMessage(message.ResponseCodeRejected,\n\t\t\tfmt.Sprintf(\"invalid genesis hash, expected: %v, got: %v\",\n\t\t\t\thandler.state.Genesis().Hash(), msg.GenesisHash), 0)\n\n\t\thandler.acknowledge(response, pid)\n\n\t\treturn\n\t}\n\n\tif math.Abs(time.Since(msg.MyTime()).Seconds()) > 10 {\n\t\tresponse := message.NewHelloAckMessage(message.ResponseCodeRejected,\n\t\t\t\"time discrepancy exceeds 10 seconds\", 0)\n\n\t\thandler.acknowledge(response, pid)\n\n\t\treturn\n\t}\n\n\tagent, _ := version.ParseAgent(msg.Agent)\n\tif agent.Version.Compare(handler.config.LatestSupportingVer) == -1 {\n\t\tresponse := message.NewHelloAckMessage(message.ResponseCodeRejected,\n\t\t\t\"not supporting Pactus version\", 0)\n\n\t\thandler.acknowledge(response, pid)\n\n\t\treturn\n\t}\n\n\tfor _, pub := range msg.PublicKeys {\n\t\thandler.state.UpdateValidatorProtocolVersion(pub.ValidatorAddress(), agent.ProtocolVersion)\n\t}\n\n\tif handler.state.Params().BlockVersion == protocol.ProtocolVersionLatest &&\n\t\tagent.ProtocolVersion < protocol.ProtocolVersionLatest {\n\t\tresponse := message.NewHelloAckMessage(message.ResponseCodeRejected,\n\t\t\t\"not supporting protocol version\", 0)\n\n\t\thandler.acknowledge(response, pid)\n\n\t\treturn\n\t}\n\n\tpeer := handler.peerSet.GetPeer(pid)\n\n\tswitch peer.Direction {\n\tcase lp2pnetwork.DirUnknown:\n\t\thandler.logger.Warn(\"received unexpected Hello message\",\n\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\t\thandler.network.CloseConnection(pid)\n\n\t\treturn\n\n\tcase lp2pnetwork.DirInbound:\n\t\tif peer.OutboundHelloSent {\n\t\t\thandler.logger.Warn(\"received unexpected Hello message\",\n\t\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\n\t\t\treturn\n\t\t}\n\n\t\t// Mark that we've received the hello message from the outbound peer\n\t\thandler.peerSet.UpdateOutboundHelloSent(pid, true)\n\n\t\thandler.logger.Info(\"sending Hello message (inbound)\", \"to\", pid)\n\t\thandler.sayHello(pid)\n\n\tcase lp2pnetwork.DirOutbound:\n\t\tif !peer.OutboundHelloSent {\n\t\t\thandler.logger.Warn(\"received unexpected Hello message\",\n\t\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\n\t\t\treturn\n\t\t}\n\n\t\thandler.peerSet.UpdateStatus(pid, status.StatusKnown)\n\t}\n\n\tresponse := message.NewHelloAckMessage(message.ResponseCodeOK, \"Ok\", handler.state.LastBlockHeight())\n\thandler.acknowledge(response, pid)\n}\n\nfunc (*helloHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagHandshaking)\n\n\treturn bdl\n}\n\nfunc (handler *helloHandler) acknowledge(msg *message.HelloAckMessage, pid peer.ID) {\n\tif msg.ResponseCode == message.ResponseCodeRejected {\n\t\thandler.logger.Info(\"rejecting hello message\", \"msg\", msg,\n\t\t\t\"pid\", pid, \"reason\", msg.Reason)\n\n\t\thandler.sendTo(msg, pid)\n\t\thandler.peerSet.UpdateStatus(pid, status.StatusBanned)\n\t} else {\n\t\thandler.logger.Info(\"acknowledging hello message\", \"msg\", msg,\n\t\t\t\"pid\", pid)\n\n\t\thandler.sendTo(msg, pid)\n\t}\n}\n"
  },
  {
    "path": "sync/handler_hello_ack.go",
    "content": "package sync\n\nimport (\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype helloAckHandler struct {\n\t*synchronizer\n}\n\nfunc newHelloAckHandler(sync *synchronizer) messageHandler {\n\treturn &helloAckHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *helloAckHandler) ParseMessage(m message.Message, pid peer.ID) {\n\tmsg := m.(*message.HelloAckMessage)\n\thandler.logger.Trace(\"parsing HelloAck message\", \"msg\", msg)\n\n\tif msg.ResponseCode == message.ResponseCodeRejected {\n\t\thandler.logger.Warn(\"hello message rejected\",\n\t\t\t\"from\", pid, \"reason\", msg.Reason)\n\t\thandler.network.CloseConnection(pid)\n\n\t\treturn\n\t}\n\n\tpeer := handler.peerSet.GetPeer(pid)\n\tif peer == nil {\n\t\thandler.logger.Warn(\"received HelloAck from unknown peer\", \"pid\", pid)\n\t\thandler.network.CloseConnection(pid)\n\n\t\treturn\n\t}\n\n\tswitch peer.Direction {\n\tcase lp2pnetwork.DirUnknown:\n\t\thandler.logger.Warn(\"received unexpected HelloAc message\",\n\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\t\thandler.network.CloseConnection(pid)\n\n\t\treturn\n\n\tcase lp2pnetwork.DirInbound:\n\t\tif !peer.OutboundHelloSent {\n\t\t\thandler.logger.Warn(\"received unexpected HelloAc message\",\n\t\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\n\t\t\treturn\n\t\t}\n\n\tcase lp2pnetwork.DirOutbound:\n\t\tif !peer.OutboundHelloSent {\n\t\t\thandler.logger.Warn(\"received unexpected HelloAc message\",\n\t\t\t\t\"pid\", pid, \"direction\", peer.Direction)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\thandler.peerSet.UpdateStatus(pid, status.StatusKnown)\n\thandler.logger.Info(\"hello message acknowledged\", \"pid\", pid, \"reason\", msg.Reason)\n\n\tif msg.Height > handler.state.LastBlockHeight() {\n\t\thandler.updateBlockchain()\n\t}\n}\n\nfunc (*helloAckHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagHandshaking)\n\n\treturn bdl\n}\n"
  },
  {
    "path": "sync/handler_hello_ack_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n)\n\nfunc TestHandlerHelloAckParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Receiving HelloAck message: Rejected hello\",\n\t\tfunc(t *testing.T) {\n\t\t\tpid := td.RandPeerID()\n\t\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeRejected, \"rejected\", td.RandHeight())\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\t\ttd.checkPeerStatus(t, pid, status.StatusUnknown)\n\t\t})\n\n\tt.Run(\"Receiving HelloAck message from unknown peer\",\n\t\tfunc(t *testing.T) {\n\t\t\tpid := td.RandPeerID()\n\t\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\t\ttd.checkPeerStatus(t, pid, status.StatusUnknown)\n\t\t})\n}\n\nfunc TestHandlerHelloAckHandshaking(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Unknown Direction\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\ttd.connectPeer(pid, lp2pnetwork.DirUnknown, false)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"Inbound Direction, Outbound Hello Not Sent\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\ttd.connectPeer(pid, lp2pnetwork.DirInbound, false)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.checkPeerStatus(t, pid, status.StatusConnected)\n\t})\n\n\tt.Run(\"Outbound Direction, Outbound Hello Not Sent\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\ttd.connectPeer(pid, lp2pnetwork.DirOutbound, false)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.checkPeerStatus(t, pid, status.StatusConnected)\n\t})\n\n\tt.Run(\"Inbound Direction, Outbound Hello Sent\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\ttd.connectPeer(pid, lp2pnetwork.DirInbound, true)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\ttd.checkPeerStatus(t, pid, status.StatusKnown)\n\t})\n\n\tt.Run(\"Outbound Direction, Outbound Hello Sent\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewHelloAckMessage(message.ResponseCodeOK, \"ok\", td.RandHeight())\n\n\t\ttd.connectPeer(pid, lp2pnetwork.DirOutbound, true)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.checkPeerStatus(t, pid, status.StatusKnown)\n\t})\n}\n"
  },
  {
    "path": "sync/handler_hello_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc (td *testData) validHelloMessage() *message.HelloMessage {\n\tvalKey1 := td.RandValKey()\n\tvalKey2 := td.RandValKey()\n\tmsg := message.NewHelloMessage(td.RandPeerID(), td.RandString(12),\n\t\tservice.New(service.FullNode),\n\t\ttd.RandHeight(), td.RandHash(), td.state.Genesis().Hash())\n\n\tmsg.Sign([]*bls.ValidatorKey{valKey1, valKey2})\n\n\treturn msg\n}\n\nfunc (td *testData) connectPeer(pid peer.ID, direction lp2pnetwork.Direction, outboundHelloSent bool) {\n\ttd.sync.peerSet.UpdateAddress(pid, \"some-address\", direction)\n\ttd.sync.peerSet.UpdateStatus(pid, status.StatusConnected)\n\ttd.sync.peerSet.UpdateOutboundHelloSent(pid, outboundHelloSent)\n}\n\nfunc TestHandlerHelloParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.CommitTestBlocks(21)\n\n\tt.Run(\"Receiving Hello message from a peer. Genesis hash is wrong.\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tmsg.GenesisHash = td.RandHash()\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusBanned)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\t\t})\n\n\tt.Run(\"Receiving a Hello message from a peer. The time difference is greater than or equal to -10\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tmsg.MyTimeUnixMilli = msg.MyTime().Add(-10 * time.Second).UnixMilli()\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusBanned)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\t\t})\n\n\tt.Run(\"Receiving Hello message from a peer. Difference is less or equal than 20 seconds.\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tmsg.MyTimeUnixMilli = msg.MyTime().Add(20 * time.Second).UnixMilli()\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusBanned)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\t\t})\n\n\tt.Run(\"Non supporting version\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tnodeAgent := version.NodeAgent\n\t\t\tnodeAgent.Version = version.Version{\n\t\t\t\tMajor: 1,\n\t\t\t\tMinor: 8,\n\t\t\t\tPatch: 0,\n\t\t\t}\n\t\t\tmsg.Agent = nodeAgent.String()\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusBanned)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\t\t})\n\n\tt.Run(\"Invalid agent\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tmsg.Agent = \"invalid-agent\"\n\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusBanned)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeRejected, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\t\t})\n\n\tt.Run(\"Outdated protocol version\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\t\t\tnodeAgent := version.NodeAgent\n\t\t\tnodeAgent.ProtocolVersion = protocol.ProtocolVersionLatest - 1\n\t\t\tmsg.Agent = nodeAgent.String()\n\n\t\t\ttd.sync.peerSet.UpdateStatus(msg.PeerID, status.StatusConnected)\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusConnected)\n\t\t\ttd.shouldNotPublishAnyMessage(t)\n\t\t})\n\n\tt.Run(\"Receiving Hello message from a peer. It should be acknowledged and updates the peer info\",\n\t\tfunc(t *testing.T) {\n\t\t\tmsg := td.validHelloMessage()\n\n\t\t\ttd.sync.peerSet.UpdateAddress(msg.PeerID, \"some-address\", lp2pnetwork.DirInbound)\n\t\t\ttd.sync.peerSet.UpdateStatus(msg.PeerID, status.StatusConnected)\n\t\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\n\t\t\ttd.shouldPublishMessageWithThisType(t, message.TypeHello)\n\t\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\t\tassert.Equal(t, message.ResponseCodeOK, bdl.Message.(*message.HelloAckMessage).ResponseCode)\n\n\t\t\t// Check if the peer info is updated\n\t\t\tpeer := td.sync.peerSet.GetPeer(msg.PeerID)\n\n\t\t\tassert.Equal(t, status.StatusConnected, peer.Status)\n\t\t\tassert.Equal(t, version.NodeAgent.String(), peer.Agent)\n\t\t\tassert.Equal(t, msg.Moniker, peer.Moniker)\n\t\t\tassert.Equal(t, msg.PublicKeys, peer.ConsensusKeys)\n\t\t\tassert.Equal(t, msg.PeerID, peer.PeerID)\n\t\t\tassert.Equal(t, msg.Height, peer.Height)\n\t\t\tassert.True(t, peer.IsFullNode())\n\t\t})\n}\n\nfunc TestHandlerHelloHandshaking(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Unknown Direction\", func(t *testing.T) {\n\t\tmsg := td.validHelloMessage()\n\n\t\ttd.connectPeer(msg.PeerID, lp2pnetwork.DirUnknown, false)\n\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"Inbound Direction, Outbound Hello Not Sent\", func(t *testing.T) {\n\t\tmsg := td.validHelloMessage()\n\n\t\ttd.connectPeer(msg.PeerID, lp2pnetwork.DirInbound, false)\n\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeHello)\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusConnected)\n\t})\n\n\tt.Run(\"Outbound Direction, Outbound Hello Not Sent\", func(t *testing.T) {\n\t\tmsg := td.validHelloMessage()\n\n\t\ttd.connectPeer(msg.PeerID, lp2pnetwork.DirOutbound, false)\n\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusConnected)\n\t})\n\n\tt.Run(\"Inbound Direction, Outbound Hello Sent\", func(t *testing.T) {\n\t\tmsg := td.validHelloMessage()\n\n\t\ttd.connectPeer(msg.PeerID, lp2pnetwork.DirInbound, true)\n\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusConnected)\n\t})\n\n\tt.Run(\"Outbound Direction, Outbound Hello Sent\", func(t *testing.T) {\n\t\tmsg := td.validHelloMessage()\n\n\t\ttd.connectPeer(msg.PeerID, lp2pnetwork.DirOutbound, true)\n\t\ttd.receivingNewMessage(td.sync, msg, msg.PeerID)\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeHelloAck)\n\t\ttd.checkPeerStatus(t, msg.PeerID, status.StatusKnown)\n\t})\n}\n"
  },
  {
    "path": "sync/handler_proposal.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\ntype proposalHandler struct {\n\t*synchronizer\n}\n\nfunc newProposalHandler(sync *synchronizer) messageHandler {\n\treturn &proposalHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *proposalHandler) ParseMessage(m message.Message, _ peer.ID) {\n\tmsg := m.(*message.ProposalMessage)\n\thandler.logger.Trace(\"parsing Proposal message\", \"msg\", msg)\n\n\thandler.getConsMgr().SetProposal(msg.Proposal)\n\n\t// TODO: This condition can be removed in future releases.\n\t// This helps to support old nodes that don't specify their protocol version in proposal.\n\tif msg.ProtocolVersion != protocol.ProtocolVersionUnknown {\n\t\thandler.state.UpdateValidatorProtocolVersion(\n\t\t\tmsg.Proposal.Block().Header().ProposerAddress(),\n\t\t\tmsg.ProtocolVersion,\n\t\t)\n\t}\n}\n\nfunc (*proposalHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\treturn bundle.NewBundle(m)\n}\n"
  },
  {
    "path": "sync/handler_proposal_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerProposalParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Set proposal for consensus\", func(t *testing.T) {\n\t\tconsensusHeight := td.state.LastBlockHeight() + 1\n\t\tprop := td.GenerateTestProposal(consensusHeight, 0)\n\t\tmsg := message.NewProposalMessage(prop)\n\t\tpid := td.RandPeerID()\n\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\tassert.Equal(t, prop, td.sync.getConsMgr().Proposal())\n\t})\n\n\tt.Run(\"Update protocol version of the proposer\", func(t *testing.T) {\n\t\tconsensusHeight := td.state.LastBlockHeight() + 1\n\t\tvalKey := td.RandValKey()\n\t\tval := td.GenerateTestValidator(testsuite.ValidatorWithPublicKey(valKey.PublicKey()))\n\t\ttd.state.TestStore.UpdateValidator(val)\n\t\tprop := td.GenerateTestProposal(consensusHeight, 0, testsuite.ProposalWithKey(valKey))\n\t\tmsg := message.NewProposalMessage(prop)\n\t\tpid := td.RandPeerID()\n\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\tassert.Equal(t, protocol.ProtocolVersionLatest, val.ProtocolVersion())\n\t})\n}\n"
  },
  {
    "path": "sync/handler_query_proposal.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype queryProposalHandler struct {\n\t*synchronizer\n}\n\nfunc newQueryProposalHandler(sync *synchronizer) messageHandler {\n\treturn &queryProposalHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *queryProposalHandler) ParseMessage(m message.Message, _ peer.ID) {\n\tmsg := m.(*message.QueryProposalMessage)\n\thandler.logger.Trace(\"parsing QueryProposal message\", \"msg\", msg)\n\n\tprop := handler.getConsMgr().HandleQueryProposal(msg.Height, msg.Round)\n\tif prop != nil {\n\t\tresponse := message.NewProposalMessage(prop)\n\t\thandler.broadcast(response)\n\t}\n}\n\nfunc (*queryProposalHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\n\treturn bdl\n}\n"
  },
  {
    "path": "sync/handler_query_proposal_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerQueryProposalParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tconsHeight, consRound := td.sync.getConsMgr().HeightRound()\n\n\tt.Run(\"doesn't have the proposal\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewQueryProposalMessage(consHeight, consRound, td.RandValAddress())\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"should respond to the query proposal message\", func(t *testing.T) {\n\t\tprop := td.GenerateTestProposal(consHeight, 0)\n\t\tpid := td.RandPeerID()\n\t\ttd.sync.getConsMgr().SetProposal(prop)\n\t\tmsg := message.NewQueryProposalMessage(consHeight, consRound, td.RandValAddress())\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeProposal)\n\t\tassert.Equal(t, prop.Hash(), bdl.Message.(*message.ProposalMessage).Proposal.Hash())\n\t})\n}\n\nfunc TestHandlerQueryProposalBroadcastingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tconsHeight, consRound := td.sync.getConsMgr().HeightRound()\n\tmsg := message.NewQueryProposalMessage(consHeight, consRound, td.RandValAddress())\n\ttd.sync.broadcast(msg)\n\n\ttd.shouldPublishMessageWithThisType(t, message.TypeQueryProposal)\n}\n"
  },
  {
    "path": "sync/handler_query_votes.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype queryVoteHandler struct {\n\t*synchronizer\n}\n\nfunc newQueryVoteHandler(sync *synchronizer) messageHandler {\n\treturn &queryVoteHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *queryVoteHandler) ParseMessage(m message.Message, _ peer.ID) {\n\tmsg := m.(*message.QueryVoteMessage)\n\thandler.logger.Trace(\"parsing QueryVote message\", \"msg\", msg)\n\n\tv := handler.getConsMgr().HandleQueryVote(msg.Height, msg.Round)\n\tif v != nil {\n\t\tresponse := message.NewVoteMessage(v)\n\t\thandler.broadcast(response)\n\t}\n}\n\nfunc (*queryVoteHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\tbdl := bundle.NewBundle(m)\n\n\treturn bdl\n}\n"
  },
  {
    "path": "sync/handler_query_votes_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerQueryVoteParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tconsHeight, consRound := td.sync.getConsMgr().HeightRound()\n\tt.Run(\"doesn't have any votes\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewQueryVoteMessage(consHeight, consRound, td.RandValAddress())\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"should respond to the query votes message\", func(t *testing.T) {\n\t\tvote, _ := td.GenerateTestPrecommitVote(consHeight, consRound)\n\t\ttd.sync.getConsMgr().AddVote(vote)\n\t\tpid := td.RandPeerID()\n\t\tmsg := message.NewQueryVoteMessage(consHeight, consRound, td.RandValAddress())\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\tbdl := td.shouldPublishMessageWithThisType(t, message.TypeVote)\n\t\tassert.Equal(t, vote.Hash(), bdl.Message.(*message.VoteMessage).Vote.Hash())\n\t})\n}\n\nfunc TestHandlerQueryVoteBroadcastingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tconsensusHeight := td.state.LastBlockHeight() + 1\n\tmsg := message.NewQueryVoteMessage(consensusHeight, 1, td.RandValAddress())\n\ttd.sync.broadcast(msg)\n\n\ttd.shouldPublishMessageWithThisType(t, message.TypeQueryVote)\n}\n"
  },
  {
    "path": "sync/handler_transactions.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype transactionsHandler struct {\n\t*synchronizer\n}\n\nfunc newTransactionsHandler(sync *synchronizer) messageHandler {\n\treturn &transactionsHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *transactionsHandler) ParseMessage(m message.Message, _ peer.ID) {\n\tmsg := m.(*message.TransactionsMessage)\n\thandler.logger.Trace(\"parsing Transactions message\", \"msg\", msg)\n\n\tfor _, trx := range msg.Transactions {\n\t\tif err := handler.state.AddPendingTx(trx); err != nil {\n\t\t\thandler.logger.Debug(\"cannot append transaction\", \"tx\", trx, \"error\", err)\n\t\t}\n\t}\n}\n\nfunc (*transactionsHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\treturn bundle.NewBundle(m)\n}\n"
  },
  {
    "path": "sync/handler_transactions_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n)\n\nfunc TestHandlerTransactionsParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Parsing transactions message\", func(*testing.T) {\n\t\ttrx1 := td.GenerateTestBondTx()\n\t\tmsg := message.NewTransactionsMessage([]*tx.Tx{trx1})\n\t\tpid := td.RandPeerID()\n\n\t\ttd.state.MockTxPool.EXPECT().AppendTx(trx1).Return(nil).Times(1)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t})\n}\n\nfunc TestHandlerTransactionsBroadcastingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrx1 := td.GenerateTestBondTx()\n\tmsg := message.NewTransactionsMessage([]*tx.Tx{trx1})\n\ttd.sync.broadcast(msg)\n\n\ttd.shouldPublishMessageWithThisType(t, message.TypeTransaction)\n}\n"
  },
  {
    "path": "sync/handler_vote.go",
    "content": "package sync\n\nimport (\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n)\n\ntype voteHandler struct {\n\t*synchronizer\n}\n\nfunc newVoteHandler(sync *synchronizer) messageHandler {\n\treturn &voteHandler{\n\t\tsync,\n\t}\n}\n\nfunc (handler *voteHandler) ParseMessage(m message.Message, _ peer.ID) {\n\tmsg := m.(*message.VoteMessage)\n\thandler.logger.Trace(\"parsing Vote message\", \"msg\", msg)\n\n\thandler.getConsMgr().AddVote(msg.Vote)\n}\n\nfunc (*voteHandler) PrepareBundle(m message.Message) *bundle.Bundle {\n\treturn bundle.NewBundle(m)\n}\n"
  },
  {
    "path": "sync/handler_vote_test.go",
    "content": "package sync\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerVoteParsingMessages(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Parsing vote message\", func(t *testing.T) {\n\t\tv, _ := td.GenerateTestPrecommitVote(1, 0)\n\t\tmsg := message.NewVoteMessage(v)\n\t\tpid := td.RandPeerID()\n\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\t\tassert.Contains(t, td.consMocks[0].AllVotes(), v)\n\t})\n}\n"
  },
  {
    "path": "sync/interface.go",
    "content": "package sync\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/sync/peerset\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n)\n\ntype Synchronizer interface {\n\tStart() error\n\tStop()\n\tMoniker() string\n\tSelfID() peer.ID\n\tPeerSet() *peerset.PeerSet\n\tServices() service.Services\n\tClockOffset() (time.Duration, error)\n\tIsClockOutOfSync() bool\n}\n"
  },
  {
    "path": "sync/mock.go",
    "content": "package sync\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sync/peerset\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/version\"\n)\n\nvar _ Synchronizer = &MockSync{}\n\n// MockSync is a mock implementation of the Synchronizer interface for testing.\ntype MockSync struct {\n\tTestID       peer.ID\n\tTestPeerSet  *peerset.PeerSet\n\tTestServices service.Services\n}\n\nfunc MockingSync(ts *testsuite.TestSuite) *MockSync {\n\tpeerSet := peerset.NewPeerSet(1 * time.Second)\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\tpid1 := ts.RandPeerID()\n\tpid2 := ts.RandPeerID()\n\tpeerSet.UpdateInfo(\n\t\tpid1,\n\t\t\"test-peer-1\",\n\t\tversion.NodeAgent.String(),\n\t\t[]*bls.PublicKey{pub1},\n\t\tservice.New(service.FullNode))\n\tpeerSet.UpdateHeight(pid1, ts.RandHeight(), ts.RandHash())\n\n\tpeerSet.UpdateInfo(\n\t\tpid2,\n\t\t\"test-peer-2\",\n\t\tversion.NodeAgent.String(),\n\t\t[]*bls.PublicKey{pub2},\n\t\tservice.New(service.None))\n\tpeerSet.UpdateHeight(pid1, ts.RandHeight(), ts.RandHash())\n\n\tservices := service.New()\n\n\treturn &MockSync{\n\t\tTestID:       ts.RandPeerID(),\n\t\tTestPeerSet:  peerSet,\n\t\tTestServices: services,\n\t}\n}\n\nfunc (*MockSync) Start() error {\n\treturn nil\n}\n\nfunc (*MockSync) Stop() {\n}\n\nfunc (m *MockSync) SelfID() peer.ID {\n\treturn m.TestID\n}\n\nfunc (*MockSync) Moniker() string {\n\treturn \"test-moniker\"\n}\n\nfunc (m *MockSync) PeerSet() *peerset.PeerSet {\n\treturn m.TestPeerSet\n}\n\nfunc (m *MockSync) Services() service.Services {\n\treturn m.TestServices\n}\n\nfunc (*MockSync) ClockOffset() (time.Duration, error) {\n\treturn 1 * time.Second, nil\n}\n\nfunc (*MockSync) IsClockOutOfSync() bool {\n\treturn false\n}\n"
  },
  {
    "path": "sync/peerset/peer/metric/metric.go",
    "content": "package metric\n\nimport \"github.com/pactus-project/pactus/sync/bundle/message\"\n\ntype Counter struct {\n\tBytes   int64\n\tBundles int64\n}\n\ntype Metric struct {\n\tTotalInvalid    Counter\n\tTotalSent       Counter\n\tTotalReceived   Counter\n\tMessageSent     map[message.Type]*Counter\n\tMessageReceived map[message.Type]*Counter\n}\n\nfunc NewMetric() Metric {\n\treturn Metric{\n\t\tMessageSent:     make(map[message.Type]*Counter),\n\t\tMessageReceived: make(map[message.Type]*Counter),\n\t}\n}\n\nfunc (m *Metric) UpdateSentMetric(msgType message.Type, bytes int64) {\n\tm.TotalSent.Bundles++\n\tm.TotalSent.Bytes += bytes\n\n\t_, ok := m.MessageSent[msgType]\n\tif !ok {\n\t\tm.MessageSent[msgType] = &Counter{}\n\t}\n\n\tm.MessageSent[msgType].Bundles++\n\tm.MessageSent[msgType].Bytes += bytes\n}\n\nfunc (m *Metric) UpdateReceivedMetric(msgType message.Type, bytes int64) {\n\tm.TotalReceived.Bundles++\n\tm.TotalReceived.Bytes += bytes\n\n\t_, ok := m.MessageReceived[msgType]\n\tif !ok {\n\t\tm.MessageReceived[msgType] = &Counter{}\n\t}\n\n\tm.MessageReceived[msgType].Bundles++\n\tm.MessageReceived[msgType].Bytes += bytes\n}\n\nfunc (m *Metric) UpdateInvalidMetric(bytes int64) {\n\tm.TotalInvalid.Bundles++\n\tm.TotalInvalid.Bytes += bytes\n}\n"
  },
  {
    "path": "sync/peerset/peer/metric/metric_test.go",
    "content": "package metric\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestUpdateSentMetric(t *testing.T) {\n\tmetric := NewMetric()\n\n\ttestMsgType := message.Type(1)\n\n\tmetric.UpdateSentMetric(testMsgType, 100)\n\n\tassert.Equal(t, int64(1), metric.TotalSent.Bundles)\n\tassert.Equal(t, int64(100), metric.TotalSent.Bytes)\n\n\tassert.NotNil(t, metric.MessageSent[testMsgType])\n\tassert.Equal(t, int64(1), metric.MessageSent[testMsgType].Bundles)\n\tassert.Equal(t, int64(100), metric.MessageSent[testMsgType].Bytes)\n}\n\nfunc TestUpdateReceivedMetric(t *testing.T) {\n\tmetric := NewMetric()\n\n\ttestMsgType := message.Type(2)\n\n\tmetric.UpdateReceivedMetric(testMsgType, 200)\n\n\tassert.Equal(t, int64(1), metric.TotalReceived.Bundles)\n\tassert.Equal(t, int64(200), metric.TotalReceived.Bytes)\n\n\tassert.NotNil(t, metric.MessageReceived[testMsgType])\n\tassert.Equal(t, int64(1), metric.MessageReceived[testMsgType].Bundles)\n\tassert.Equal(t, int64(200), metric.MessageReceived[testMsgType].Bytes)\n}\n\nfunc TestUpdateInvalidMetric(t *testing.T) {\n\tmetric := NewMetric()\n\n\tmetric.UpdateInvalidMetric(123)\n\tassert.Equal(t, int64(1), metric.TotalInvalid.Bundles)\n\tassert.Equal(t, int64(123), metric.TotalInvalid.Bytes)\n}\n"
  },
  {
    "path": "sync/peerset/peer/peer.go",
    "content": "package peer\n\nimport (\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/metric\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype ID = lp2ppeer.ID\n\ntype Peer struct {\n\tStatus            status.Status\n\tMoniker           string\n\tAgent             string\n\tAddress           string\n\tDirection         lp2pnetwork.Direction\n\tProtocols         []string\n\tPeerID            ID\n\tConsensusKeys     []*bls.PublicKey\n\tServices          service.Services\n\tLastSent          time.Time\n\tLastReceived      time.Time\n\tLastBlockHash     hash.Hash\n\tHeight            types.Height\n\tTotalSessions     int\n\tCompletedSessions int\n\tMetric            metric.Metric\n\t// OutboundHelloSent tracks whether we've sent the initial hello message for outbound connections\n\tOutboundHelloSent bool\n}\n\nfunc NewPeer(peerID ID) *Peer {\n\treturn &Peer{\n\t\tConsensusKeys: make([]*bls.PublicKey, 0),\n\t\tStatus:        status.StatusUnknown,\n\t\tPeerID:        peerID,\n\t\tMetric:        metric.NewMetric(),\n\t\tProtocols:     make([]string, 0),\n\t}\n}\n\nfunc (p *Peer) IsFullNode() bool {\n\treturn p.Services.IsFullNode()\n}\n\nfunc (p *Peer) DownloadScore() int {\n\treturn (p.CompletedSessions + 1) * 100 / (p.TotalSessions + 1)\n}\n"
  },
  {
    "path": "sync/peerset/peer/peer_test.go",
    "content": "package peer\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestPeerStatus(t *testing.T) {\n\ttests := []struct {\n\t\tstatus             status.Status\n\t\tisDisconnected     bool\n\t\tisBanned           bool\n\t\tisConnected        bool\n\t\tisKnown            bool\n\t\tisKnownOrConnected bool\n\t}{\n\t\t{status: status.StatusBanned, isBanned: true},\n\t\t{status: status.StatusDisconnected, isDisconnected: true},\n\t\t{status: status.StatusConnected, isConnected: true, isKnownOrConnected: true},\n\t\t{status: status.StatusKnown, isKnown: true, isKnownOrConnected: true},\n\t}\n\n\tfor _, tt := range tests {\n\t\tpeer := NewPeer(\"test\")\n\t\tpeer.Status = tt.status\n\n\t\tassert.Equal(t, tt.isDisconnected, peer.Status.IsDisconnected())\n\t\tassert.Equal(t, tt.isBanned, peer.Status.IsBanned())\n\t\tassert.Equal(t, tt.isConnected, peer.Status.IsConnected())\n\t\tassert.Equal(t, tt.isKnown, peer.Status.IsKnown())\n\t\tassert.Equal(t, tt.isKnownOrConnected, peer.Status.IsConnectedOrKnown())\n\t}\n}\n\nfunc TestIsFullNode(t *testing.T) {\n\tp1 := NewPeer(\"peer-1\")\n\tp2 := NewPeer(\"peer-1\")\n\tp1.Services = service.New(service.PrunedNode)\n\tp2.Services = service.New(service.FullNode)\n\n\tassert.False(t, p1.IsFullNode())\n\tassert.True(t, p2.IsFullNode())\n}\n\nfunc TestDownloadScore(t *testing.T) {\n\ttests := []struct {\n\t\ttotalSession     int\n\t\tcompletedSession int\n\t\texpectedScore    int\n\t}{\n\t\t{0, 0, 100},\n\t\t{1, 1, 100},\n\t\t{1, 0, 50},\n\t\t{2, 0, 33},\n\t\t{3, 0, 25},\n\t\t{5, 4, 83},\n\t\t{6, 5, 85},\n\t\t{7, 6, 87},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpeer := NewPeer(\"test\")\n\t\tpeer.TotalSessions = tt.totalSession\n\t\tpeer.CompletedSessions = tt.completedSession\n\n\t\tscore := peer.DownloadScore()\n\t\tassert.Equal(t, tt.expectedScore, score,\n\t\t\t\"Test %v failed. expected score %d, got %d\",\n\t\t\tno+1, tt.expectedScore, score)\n\t}\n}\n"
  },
  {
    "path": "sync/peerset/peer/service/services.go",
    "content": "package service\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype (\n\tServices int\n\tService  int\n)\n\nconst (\n\tNone Service = 0x00\n\n\t// FullNode indicates that the node has a full blockchain history.\n\tFullNode Service = 0x01\n\n\t// PrunedNode indicates that the node has a pruned blockchain history.\n\tPrunedNode Service = 0x02\n)\n\nfunc New(flags ...Service) Services {\n\ts := None\n\tfor _, f := range flags {\n\t\ts = util.SetFlag(s, f)\n\t}\n\n\treturn Services(s)\n}\n\nfunc (s *Services) Append(flag Service) {\n\t*s = util.SetFlag(*s, Services(flag))\n}\n\nfunc (s Services) String() string {\n\tservices := \"\"\n\tflags := s\n\tif util.IsFlagSet(flags, Services(FullNode)) {\n\t\tservices += \"FULL | \"\n\t\tflags = util.UnsetFlag(flags, Services(FullNode))\n\t}\n\n\tif util.IsFlagSet(flags, Services(PrunedNode)) {\n\t\tservices += \"PRUNED | \"\n\t\tflags = util.UnsetFlag(flags, Services(PrunedNode))\n\t}\n\n\tif flags != 0 {\n\t\tservices += fmt.Sprintf(\"%d\", flags)\n\t} else if services != \"\" {\n\t\tservices = services[:len(services)-3]\n\t}\n\n\treturn services\n}\n\nfunc (s Services) IsFullNode() bool {\n\treturn util.IsFlagSet(s, Services(FullNode))\n}\n\nfunc (s Services) IsPrunedNode() bool {\n\treturn util.IsFlagSet(s, Services(PrunedNode))\n}\n"
  },
  {
    "path": "sync/peerset/peer/service/services_test.go",
    "content": "package service\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestServicesString(t *testing.T) {\n\tassert.Empty(t, New(None).String())\n\tassert.Equal(t, \"FULL\", New(FullNode).String())\n\tassert.Equal(t, \"PRUNED\", New(PrunedNode).String())\n\tassert.Equal(t, \"FULL | PRUNED\", New(FullNode, PrunedNode).String())\n\tassert.Equal(t, \"FULL | 4\", New(5).String())\n\tassert.Equal(t, \"PRUNED | 4\", New(6).String())\n}\n\nfunc TestAppend(t *testing.T) {\n\tservices := New(FullNode)\n\tassert.True(t, services.IsFullNode())\n\tassert.False(t, services.IsPrunedNode())\n\n\tservices.Append(PrunedNode)\n\tassert.True(t, services.IsFullNode())\n\tassert.True(t, services.IsPrunedNode())\n}\n"
  },
  {
    "path": "sync/peerset/peer/status/status.go",
    "content": "package status\n\ntype Status int\n\nconst (\n\t// The Status here, tells us the status os the connection.\n\tStatusBanned       = Status(-1)\n\tStatusUnknown      = Status(0)\n\tStatusDisconnected = Status(1)\n\tStatusConnected    = Status(2)\n\tStatusKnown        = Status(3)\n)\n\nfunc (s Status) String() string {\n\tswitch s {\n\tcase StatusBanned:\n\t\treturn \"banned\"\n\tcase StatusUnknown:\n\t\treturn \"unknown\"\n\tcase StatusDisconnected:\n\t\treturn \"disconnected\"\n\tcase StatusConnected:\n\t\treturn \"connected\"\n\tcase StatusKnown:\n\t\treturn \"known\"\n\t}\n\n\treturn \"invalid\"\n}\n\nfunc (s Status) IsUnknown() bool {\n\treturn s == StatusUnknown\n}\n\nfunc (s Status) IsKnown() bool {\n\treturn s == StatusKnown\n}\n\nfunc (s Status) IsDisconnected() bool {\n\treturn s == StatusDisconnected\n}\n\nfunc (s Status) IsConnected() bool {\n\treturn s == StatusConnected\n}\n\nfunc (s Status) IsConnectedOrKnown() bool {\n\treturn s == StatusConnected || s == StatusKnown\n}\n\nfunc (s Status) IsBanned() bool {\n\treturn s == StatusBanned\n}\n"
  },
  {
    "path": "sync/peerset/peer_set.go",
    "content": "package peerset\n\nimport (\n\t\"sync\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/metric\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/sync/peerset/session\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util\"\n)\n\ntype PeerSet struct {\n\tlk sync.RWMutex\n\n\tpeers          map[peer.ID]*peer.Peer\n\tsessionManager *session.Manager\n\tstartedAt      time.Time\n\tmetric         metric.Metric\n}\n\n// NewPeerSet constructs a new PeerSet for managing peer information.\nfunc NewPeerSet(sessionTimeout time.Duration) *PeerSet {\n\treturn &PeerSet{\n\t\tpeers:          make(map[peer.ID]*peer.Peer),\n\t\tsessionManager: session.NewManager(sessionTimeout),\n\t\tmetric:         metric.NewMetric(),\n\t\tstartedAt:      time.Now(),\n\t}\n}\n\n// OpenSession opens a new session for downloading blocks and returns the session ID.\nfunc (ps *PeerSet) OpenSession(pid peer.ID, from types.Height, count uint32) int {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tssn := ps.sessionManager.OpenSession(pid, from, count)\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.TotalSessions++\n\n\treturn ssn.SessionID\n}\n\n// NumberOfSessions returns the total number of sessions.\nfunc (ps *PeerSet) NumberOfSessions() int {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\treturn ps.sessionManager.NumberOfSessions()\n}\n\n// HasOpenSession checks if the specified peer has an open session for downloading blocks.\n// Note that a peer may have more than one session.\nfunc (ps *PeerSet) HasOpenSession(pid peer.ID) bool {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.sessionManager.HasOpenSession(pid)\n}\n\nfunc (ps *PeerSet) SessionStats() session.Stats {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.sessionManager.Stats()\n}\n\nfunc (ps *PeerSet) HasAnyOpenSession() bool {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.sessionManager.HasAnyOpenSession()\n}\n\nfunc (ps *PeerSet) UpdateSessionLastActivity(sid int) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.sessionManager.UpdateSessionLastActivity(sid)\n}\n\nfunc (ps *PeerSet) SetExpiredSessionsAsUncompleted() {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.sessionManager.SetExpiredSessionsAsUncompleted()\n}\n\nfunc (ps *PeerSet) SetSessionUncompleted(sid int) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.sessionManager.SetSessionUncompleted(sid)\n}\n\nfunc (ps *PeerSet) SetSessionCompleted(sid int) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tssn := ps.sessionManager.SetSessionCompleted(sid)\n\tif ssn != nil {\n\t\tp := ps.findOrCreatePeer(ssn.PeerID)\n\t\tp.CompletedSessions++\n\t}\n}\n\nfunc (ps *PeerSet) RemoveAllSessions() {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.sessionManager.RemoveAllSessions()\n}\n\nfunc (ps *PeerSet) Len() int {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn len(ps.peers)\n}\n\nfunc (ps *PeerSet) RemovePeer(pid peer.ID) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tdelete(ps.peers, pid)\n}\n\n// GetPeer finds a peer by id and returns a copy of the peer object.\nfunc (ps *PeerSet) GetPeer(pid peer.ID) *peer.Peer {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.findPeer(pid)\n}\n\n// HasPeer checks if a peer with the given id exists in the set.\nfunc (ps *PeerSet) HasPeer(pid peer.ID) bool {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\t_, ok := ps.peers[pid]\n\n\treturn ok\n}\n\nfunc (ps *PeerSet) findPeer(pid peer.ID) *peer.Peer {\n\tif p, ok := ps.peers[pid]; ok {\n\t\treturn p\n\t}\n\n\treturn nil\n}\n\n// FindOrCreatePeer tries to find a peer with the given pid.\n// If not found, it creates a new peer and assigns the pid to it.\nfunc (ps *PeerSet) findOrCreatePeer(pid peer.ID) *peer.Peer {\n\tper := ps.findPeer(pid)\n\tif per == nil {\n\t\tper = peer.NewPeer(pid)\n\t\tps.peers[pid] = per\n\t}\n\n\treturn per\n}\n\n// GetPeerStatus finds a peer by id and returns the status of the Peer.\nfunc (ps *PeerSet) GetPeerStatus(pid peer.ID) status.Status {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\tp := ps.findPeer(pid)\n\tif p != nil {\n\t\treturn p.Status\n\t}\n\n\treturn status.StatusUnknown\n}\n\nfunc (ps *PeerSet) UpdateInfo(\n\tpid peer.ID,\n\tmoniker string,\n\tagent string,\n\tconsKeys []*bls.PublicKey,\n\tservices service.Services,\n) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Moniker = moniker\n\tp.Agent = agent\n\tp.ConsensusKeys = consKeys\n\tp.Services = services\n}\n\nfunc (ps *PeerSet) UpdateHeight(pid peer.ID, height types.Height, lastBlockHash hash.Hash) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Height = height\n\tp.LastBlockHash = lastBlockHash\n}\n\nfunc (ps *PeerSet) UpdateAddress(pid peer.ID, addr string, direction lp2pnetwork.Direction) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Address = addr\n\tp.Direction = direction\n}\n\nfunc (ps *PeerSet) UpdateOutboundHelloSent(pid peer.ID, sent bool) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.OutboundHelloSent = sent\n}\n\nfunc (ps *PeerSet) UpdateStatus(pid peer.ID, status status.Status) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tpeer := ps.findOrCreatePeer(pid)\n\n\t// Don't update the status if peer is banned (unless status is disconnected).\n\t// This helps banned peers to recover, like fixing their system time, etc.\n\tif peer.Status.IsBanned() && !status.IsDisconnected() {\n\t\treturn\n\t}\n\n\t// Don't change status to connected if peer is known already\n\tif peer.Status.IsKnown() && status.IsConnected() {\n\t\treturn\n\t}\n\n\tpeer.Status = status\n\n\tif status.IsDisconnected() {\n\t\tpeer.OutboundHelloSent = false\n\n\t\tfor _, ssn := range ps.sessionManager.Sessions() {\n\t\t\tif ssn.PeerID == pid {\n\t\t\t\tssn.Status = session.Uncompleted\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (ps *PeerSet) UpdateProtocols(pid peer.ID, protocols []string) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Protocols = protocols\n}\n\nfunc (ps *PeerSet) UpdateLastSent(pid peer.ID) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.LastSent = time.Now()\n}\n\nfunc (ps *PeerSet) UpdateLastReceived(pid peer.ID) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.LastReceived = time.Now()\n}\n\nfunc (ps *PeerSet) UpdateInvalidMetric(pid peer.ID, bytes int64) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.metric.UpdateInvalidMetric(bytes)\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Metric.UpdateInvalidMetric(bytes)\n}\n\nfunc (ps *PeerSet) UpdateReceivedMetric(pid peer.ID, msgType message.Type, bytes int64) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.metric.UpdateReceivedMetric(msgType, bytes)\n\n\tp := ps.findOrCreatePeer(pid)\n\tp.Metric.UpdateReceivedMetric(msgType, bytes)\n}\n\nfunc (ps *PeerSet) UpdateSentMetric(pid *peer.ID, msgType message.Type, bytes int64) {\n\tps.lk.Lock()\n\tdefer ps.lk.Unlock()\n\n\tps.metric.UpdateSentMetric(msgType, bytes)\n\n\tif pid != nil {\n\t\tp := ps.findOrCreatePeer(*pid)\n\t\tp.Metric.UpdateSentMetric(msgType, bytes)\n\t}\n}\n\nfunc (ps *PeerSet) StartedAt() time.Time {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.startedAt\n}\n\nfunc (ps *PeerSet) IteratePeers(consumer func(p *peer.Peer) (stop bool)) {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\tfor _, p := range ps.peers {\n\t\tstopped := consumer(p)\n\t\tif stopped {\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (ps *PeerSet) Sessions() []*session.Session {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.sessionManager.Sessions()\n}\n\nfunc (ps *PeerSet) Metric() metric.Metric {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\treturn ps.metric\n}\n\n// GetRandomPeer selects a random peer from the peer set based on their download score.\n// Peers with higher score are more likely to be selected.\nfunc (ps *PeerSet) GetRandomPeer() *peer.Peer {\n\tps.lk.RLock()\n\tdefer ps.lk.RUnlock()\n\n\ttype scoredPeer struct {\n\t\tpeer  *peer.Peer\n\t\tscore int\n\t}\n\n\t//\n\ttotalScore := 0\n\tpeers := make([]scoredPeer, 0, len(ps.peers))\n\tfor _, peer := range ps.peers {\n\t\tif !peer.Status.IsConnectedOrKnown() {\n\t\t\tcontinue\n\t\t}\n\n\t\tscore := peer.DownloadScore()\n\t\ttotalScore += score\n\t\tpeers = append(peers, scoredPeer{\n\t\t\tpeer:  peer,\n\t\t\tscore: score,\n\t\t})\n\t}\n\n\tif len(peers) == 0 {\n\t\treturn nil\n\t}\n\n\trnd := int(util.RandUint32(uint32(totalScore)))\n\n\t// Find the index where the random number falls\n\tfor _, p := range peers {\n\t\ttotalScore -= p.score\n\n\t\tif rnd >= totalScore {\n\t\t\treturn p.peer\n\t\t}\n\t}\n\tpanic(\"unreachable code\")\n}\n"
  },
  {
    "path": "sync/peerset/peer_set_test.go",
    "content": "package peerset\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/sync/peerset/session\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc getSessionByID(ps *PeerSet, sid int) *session.Session {\n\tssns := ps.Sessions()\n\tfor _, ssn := range ssns {\n\t\tif ssn.SessionID == sid {\n\t\t\treturn ssn\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc TestPeerSet(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpk11, _ := ts.RandBLSKeyPair()\n\tpk12, _ := ts.RandBLSKeyPair()\n\tpk21, _ := ts.RandBLSKeyPair()\n\tpk31, _ := ts.RandBLSKeyPair()\n\tpk32, _ := ts.RandBLSKeyPair()\n\tpid1 := ts.RandPeerID()\n\tpid2 := ts.RandPeerID()\n\tpid3 := ts.RandPeerID()\n\tpeerSet.UpdateInfo(pid1, \"Moniker1\", \"Agent1\",\n\t\t[]*bls.PublicKey{pk11, pk12}, service.New(service.FullNode))\n\tpeerSet.UpdateInfo(pid2, \"Moniker2\", \"Agent2\",\n\t\t[]*bls.PublicKey{pk21}, service.New(service.None))\n\tpeerSet.UpdateInfo(pid3, \"Moniker3\", \"Agent3\",\n\t\t[]*bls.PublicKey{pk31, pk32}, service.New(service.FullNode))\n\n\tt.Run(\"Testing Len\", func(t *testing.T) {\n\t\tassert.Equal(t, 3, peerSet.Len())\n\t})\n\n\tt.Run(\"Testing Iterate peers\", func(t *testing.T) {\n\t\t// Verify that the peer list contains the expected peers\n\t\tfound := false\n\t\tpeerSet.IteratePeers(func(p *peer.Peer) bool {\n\t\t\tif p.PeerID == pid2 {\n\t\t\t\tfound = true\n\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\treturn false\n\t\t})\n\n\t\tassert.True(t, found, \"Peer with ID %s not found in the peer list\", pid2)\n\t})\n\n\tt.Run(\"Testing hasPeer\", func(t *testing.T) {\n\t\tassert.True(t, peerSet.HasPeer(pid1))\n\t\tassert.False(t, peerSet.HasPeer(ts.RandPeerID()))\n\t})\n\n\tt.Run(\"Testing GetPeer\", func(t *testing.T) {\n\t\tp := peerSet.GetPeer(pid2)\n\t\tassert.Equal(t, pid2, p.PeerID)\n\t\tassert.True(t, p.Status.IsUnknown())\n\n\t\tp = peerSet.GetPeer(ts.RandPeerID())\n\t\tassert.Nil(t, p)\n\t})\n\n\tt.Run(\"Testing ConsensusKeys\", func(t *testing.T) {\n\t\tp := peerSet.GetPeer(pid3)\n\n\t\tassert.Contains(t, p.ConsensusKeys, pk31)\n\t\tassert.Contains(t, p.ConsensusKeys, pk32)\n\t})\n\n\tt.Run(\"Testing counters\", func(t *testing.T) {\n\t\tpeerSet.UpdateInvalidMetric(pid1, 123)\n\t\tpeerSet.UpdateReceivedMetric(pid1, message.TypeBlocksResponse, 100)\n\t\tpeerSet.UpdateReceivedMetric(pid1, message.TypeTransaction, 150)\n\t\tpeerSet.UpdateSentMetric(nil, message.TypeBlocksRequest, 200)\n\t\tpeerSet.UpdateSentMetric(&pid1, message.TypeBlocksRequest, 250)\n\n\t\tpeer1 := peerSet.findPeer(pid1)\n\t\tassert.Equal(t, int64(1), peer1.Metric.TotalInvalid.Bundles)\n\t\tassert.Equal(t, int64(2), peer1.Metric.TotalReceived.Bundles)\n\t\tassert.Equal(t, int64(100), peer1.Metric.MessageReceived[message.TypeBlocksResponse].Bytes)\n\t\tassert.Equal(t, int64(150), peer1.Metric.MessageReceived[message.TypeTransaction].Bytes)\n\t\tassert.Equal(t, int64(250), peer1.Metric.MessageSent[message.TypeBlocksRequest].Bytes)\n\n\t\tpeerSetMetric := peerSet.Metric()\n\t\tassert.Equal(t, int64(250), peerSetMetric.TotalReceived.Bytes)\n\t\tassert.Equal(t, int64(100), peerSetMetric.MessageReceived[message.TypeBlocksResponse].Bytes)\n\t\tassert.Equal(t, int64(150), peerSetMetric.MessageReceived[message.TypeTransaction].Bytes)\n\t\tassert.Equal(t, int64(450), peerSetMetric.TotalSent.Bytes)\n\t\tassert.Equal(t, int64(450), peerSetMetric.MessageSent[message.TypeBlocksRequest].Bytes)\n\t})\n\n\tt.Run(\"Testing UpdateHeight\", func(t *testing.T) {\n\t\theight := ts.RandHeight()\n\t\th := ts.RandHash()\n\t\tpeerSet.UpdateHeight(pid1, height, h)\n\n\t\tpeer1 := peerSet.findPeer(pid1)\n\t\tassert.Equal(t, height, peer1.Height)\n\t\tassert.Equal(t, h, peer1.LastBlockHash)\n\t})\n\n\tt.Run(\"Testing UpdateLastSent\", func(t *testing.T) {\n\t\tnow := time.Now()\n\t\tpeerSet.UpdateLastSent(pid1)\n\n\t\tpeer1 := peerSet.findPeer(pid1)\n\t\tassert.GreaterOrEqual(t, peer1.LastSent, now)\n\t})\n\n\tt.Run(\"Testing UpdateLastReceived\", func(t *testing.T) {\n\t\tnow := time.Now()\n\t\tpeerSet.UpdateLastReceived(pid1)\n\n\t\tpeer1 := peerSet.findPeer(pid1)\n\t\tassert.GreaterOrEqual(t, peer1.LastReceived, now)\n\t})\n\n\tt.Run(\"Testing StartedAt\", func(t *testing.T) {\n\t\tassert.LessOrEqual(t, peerSet.StartedAt(), time.Now())\n\t})\n\n\tt.Run(\"Testing RemovePeer\", func(t *testing.T) {\n\t\tpeerSet.RemovePeer(ts.RandPeerID())\n\t\tassert.Equal(t, 3, peerSet.Len())\n\n\t\tpeerSet.RemovePeer(pid2)\n\t\tassert.Equal(t, 2, peerSet.Len())\n\t})\n}\n\nfunc TestOpenSession(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpid1 := ts.RandPeerID()\n\tpid2 := ts.RandPeerID()\n\tsid1 := peerSet.OpenSession(pid1, 100, 10)\n\tsid2 := peerSet.OpenSession(pid2, 110, 10)\n\n\tssn1 := getSessionByID(peerSet, sid1)\n\tssn2 := getSessionByID(peerSet, sid1)\n\tassert.NotNil(t, ssn1)\n\tassert.Equal(t, types.Height(100), ssn1.From)\n\tassert.Equal(t, types.Height(100), ssn2.From)\n\tassert.Equal(t, uint32(10), ssn1.Count)\n\tassert.Equal(t, uint32(10), ssn2.Count)\n\tassert.Equal(t, pid1, ssn1.PeerID)\n\tassert.Equal(t, session.Open, ssn1.Status)\n\tassert.LessOrEqual(t, ssn1.LastActivity, time.Now())\n\tassert.Equal(t, 0, sid1)\n\tassert.Equal(t, 1, sid2)\n\tassert.True(t, peerSet.HasOpenSession(pid1))\n\tassert.True(t, peerSet.HasOpenSession(pid2))\n\tassert.False(t, peerSet.HasOpenSession(ts.RandPeerID()))\n\tassert.Equal(t, 2, peerSet.NumberOfSessions())\n}\n\nfunc TestNumberOfSessions(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\t// Test when there are no open sessions\n\tassert.Equal(t, 0, peerSet.NumberOfSessions())\n\n\t// Test when there are multiple open sessions\n\tpeerSet.OpenSession(\"peer1\", 100, 101)\n\tpeerSet.OpenSession(\"peer2\", 200, 201)\n\tpeerSet.OpenSession(\"peer3\", 300, 301)\n\n\tassert.Equal(t, 3, peerSet.NumberOfSessions())\n}\n\nfunc TestHasAnyOpenSession(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\t// Test when there are no open sessions\n\tassert.False(t, peerSet.HasAnyOpenSession())\n\n\tsid := peerSet.OpenSession(\"peer1\", 100, 101)\n\tassert.True(t, peerSet.HasAnyOpenSession())\n\n\tpeerSet.SetSessionCompleted(sid)\n\tassert.False(t, peerSet.HasAnyOpenSession())\n}\n\nfunc TestRemoveAllSessions(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\t_ = peerSet.OpenSession(\"peer1\", 100, 101)\n\t_ = peerSet.OpenSession(\"peer2\", 100, 101)\n\t_ = peerSet.OpenSession(\"peer3\", 100, 101)\n\n\tpeerSet.RemoveAllSessions()\n\tassert.Zero(t, peerSet.NumberOfSessions())\n\tassert.False(t, peerSet.HasAnyOpenSession())\n}\n\nfunc TestCompletedSession(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tsid := peerSet.OpenSession(\"peer1\", 100, 101)\n\tssn := getSessionByID(peerSet, sid)\n\tassert.Equal(t, session.Open, ssn.Status)\n\n\tpeerSet.SetSessionCompleted(sid)\n\tassert.Equal(t, 1, peerSet.NumberOfSessions())\n\tassert.False(t, peerSet.HasAnyOpenSession())\n\tassert.Equal(t, session.Completed, ssn.Status)\n}\n\nfunc TestUncompletedSession(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tsid := peerSet.OpenSession(\"peer1\", 100, 101)\n\tssn := getSessionByID(peerSet, sid)\n\tassert.Equal(t, session.Open, ssn.Status)\n\n\tpeerSet.SetSessionUncompleted(sid)\n\tassert.Equal(t, 1, peerSet.NumberOfSessions())\n\tassert.False(t, peerSet.HasAnyOpenSession())\n\tassert.Equal(t, session.Uncompleted, ssn.Status)\n}\n\nfunc TestExpireSessions(t *testing.T) {\n\ttimeout := 100 * time.Millisecond\n\tpeerSet := NewPeerSet(timeout)\n\n\tsid := peerSet.OpenSession(\"peer1\", 100, 101)\n\tssn := getSessionByID(peerSet, sid)\n\ttime.Sleep(timeout)\n\n\tpeerSet.SetExpiredSessionsAsUncompleted()\n\tassert.Equal(t, 1, peerSet.NumberOfSessions())\n\tassert.False(t, peerSet.HasAnyOpenSession())\n\tassert.Equal(t, session.Uncompleted, ssn.Status)\n}\n\nfunc TestGetRandomPeer(t *testing.T) {\n\t// We create 6 peers for testing:\n\t//\n\t// peer_1 has score 100\n\t// peer_2 has score 83\n\t// peer_3 has score 66\n\t// peer_4 has score 50\n\t// peer_5 has score 33\n\t// peer_6 has score 16\n\tpeerSet := NewPeerSet(time.Minute)\n\tfor index := 0; index < 6; index++ {\n\t\tpid := peer.ID(fmt.Sprintf(\"peer_%v\", index+1))\n\t\tpeerSet.UpdateInfo(pid, fmt.Sprintf(\"Moniker_%v\", index+1), \"Agent1\", nil, service.New())\n\t\tpeerSet.UpdateStatus(pid, status.StatusKnown)\n\n\t\tfor r := 0; r < 5; r++ {\n\t\t\tsid := peerSet.OpenSession(pid, 0, 0)\n\n\t\t\tif r < 5-index {\n\t\t\t\tpeerSet.SetSessionCompleted(sid)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Now let's run TestGetRandomPeer for 1000 times\n\thits := make(map[peer.ID]int)\n\tfor i := 0; i < 1000; i++ {\n\t\trandomPeer := peerSet.GetRandomPeer()\n\t\thits[randomPeer.PeerID]++\n\t}\n\n\tassert.Greater(t, hits[peer.ID(\"peer_1\")], hits[peer.ID(\"peer_3\")])\n\tassert.Greater(t, hits[peer.ID(\"peer_2\")], hits[peer.ID(\"peer_4\")])\n\tassert.Greater(t, hits[peer.ID(\"peer_3\")], hits[peer.ID(\"peer_5\")])\n\tassert.Greater(t, hits[peer.ID(\"peer_4\")], hits[peer.ID(\"peer_6\")])\n}\n\nfunc TestGetRandomPeerConnected(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpidBanned := peer.ID(\"known\")\n\tpidConnected := peer.ID(\"connected\")\n\tpidDisconnected := peer.ID(\"disconnected\")\n\tpeerSet.UpdateInfo(pidBanned, \"moniker\", \"agent\", nil, service.New())\n\tpeerSet.UpdateInfo(pidConnected, \"moniker\", \"agent\", nil, service.New())\n\tpeerSet.UpdateInfo(pidDisconnected, \"moniker\", \"agent\", nil, service.New())\n\n\tpeerSet.UpdateStatus(pidBanned, status.StatusBanned)\n\tpeerSet.UpdateStatus(pidConnected, status.StatusConnected)\n\tpeerSet.UpdateStatus(pidDisconnected, status.StatusDisconnected)\n\n\tpeer := peerSet.GetRandomPeer()\n\n\tassert.NotEqual(t, peer.PeerID, pidBanned)\n\tassert.NotEqual(t, peer.PeerID, pidDisconnected)\n\tassert.Equal(t, peer.PeerID, pidConnected)\n}\n\nfunc TestGetRandomPeerNoPeer(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\trandomPeer := peerSet.GetRandomPeer()\n\tassert.Nil(t, randomPeer)\n}\n\nfunc TestGetRandomPeerOnePeer(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpidAlice := peer.ID(\"alice\")\n\tpeerSet.UpdateInfo(pidAlice, \"alice\", \"agent\", nil, service.New())\n\tpeerSet.UpdateStatus(pidAlice, status.StatusKnown)\n\n\trandomPeer := peerSet.GetRandomPeer()\n\tassert.Equal(t, randomPeer.PeerID, pidAlice)\n}\n\nfunc TestUpdateAddress(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpid := peer.ID(\"peer1\")\n\taddr := \"pid-1-address\"\n\tdir := lp2pnetwork.DirInbound\n\tpeerSet.UpdateAddress(pid, addr, dir)\n\n\tp := peerSet.GetPeer(pid)\n\tassert.Equal(t, addr, p.Address)\n\tassert.Equal(t, dir, p.Direction)\n}\n\nfunc TestUpdateSessionLastActivity(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tsid := peerSet.OpenSession(\"peer1\", 100, 101)\n\tssn := getSessionByID(peerSet, sid)\n\tactivity1 := ssn.LastActivity\n\ttime.Sleep(10 * time.Millisecond)\n\tpeerSet.UpdateSessionLastActivity(sid)\n\tassert.Greater(t, ssn.LastActivity, activity1)\n}\n\nfunc TestUpdateProtocols(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tpid := peer.ID(\"peer-1\")\n\tprotocols := []string{\"protocol-1\"}\n\tpeerSet.UpdateProtocols(pid, protocols)\n\n\tp := peerSet.GetPeer(pid)\n\tassert.Equal(t, protocols, p.Protocols)\n}\n\nfunc TestUpdateOutboundHelloSent(t *testing.T) {\n\tpeerSet := NewPeerSet(time.Minute)\n\tpid := peer.ID(\"peer1\")\n\tpeerSet.UpdateOutboundHelloSent(pid, true)\n\n\tp := peerSet.GetPeer(pid)\n\tassert.True(t, p.OutboundHelloSent)\n}\n\nfunc TestUpdateStatus(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tpeerSet := NewPeerSet(time.Minute)\n\n\tt.Run(\"Status of Unknown peer\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\n\t\tassert.Equal(t, status.StatusUnknown, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"UpdateStatus from Known to Banned\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusKnown)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusBanned)\n\t\tassert.Equal(t, status.StatusBanned, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"UpdateStatus from Known to Disconnected\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusKnown)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusDisconnected)\n\t\tassert.Equal(t, status.StatusDisconnected, peerSet.GetPeerStatus(pid))\n\t\tassert.False(t, peerSet.GetPeer(pid).OutboundHelloSent)\n\t})\n\n\tt.Run(\"UpdateStatus from Known to Connected (should not change)\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusKnown)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusConnected)\n\t\tassert.Equal(t, status.StatusKnown, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"UpdateStatus from Banned to Disconnected (should change)\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusBanned)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusDisconnected)\n\t\tassert.Equal(t, status.StatusDisconnected, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"UpdateStatus from Banned to Connected\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusBanned)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusConnected)\n\t\tassert.Equal(t, status.StatusBanned, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"UpdateStatus from Banned to Known\", func(t *testing.T) {\n\t\tpid := ts.RandPeerID()\n\t\tpeerSet.UpdateStatus(pid, status.StatusBanned)\n\n\t\tpeerSet.UpdateStatus(pid, status.StatusKnown)\n\t\tassert.Equal(t, status.StatusBanned, peerSet.GetPeerStatus(pid))\n\t})\n\n\tt.Run(\"Close Sessions On Disconnect\", func(t *testing.T) {\n\t\tpid1 := ts.RandPeerID()\n\t\tpid2 := ts.RandPeerID()\n\t\tpeerSet.OpenSession(pid1, 100, 10)\n\t\tpeerSet.OpenSession(pid2, 110, 10)\n\n\t\tpeerSet.UpdateStatus(pid1, status.StatusDisconnected)\n\n\t\tassert.False(t, peerSet.HasOpenSession(pid1))\n\t\tassert.True(t, peerSet.HasOpenSession(pid2))\n\t})\n}\n"
  },
  {
    "path": "sync/peerset/session/manager.go",
    "content": "package session\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype Manager struct {\n\tsessionTimeout time.Duration\n\tsessions       map[int]*Session\n\tnextSessionID  int\n}\n\nfunc NewManager(sessionTimeout time.Duration) *Manager {\n\treturn &Manager{\n\t\tsessionTimeout: sessionTimeout,\n\t\tsessions:       make(map[int]*Session),\n\t}\n}\n\nfunc (sm *Manager) Stats() Stats {\n\ttotal := len(sm.sessions)\n\topen := 0\n\tcompleted := 0\n\tunCompleted := 0\n\tfor _, ssn := range sm.sessions {\n\t\tswitch ssn.Status {\n\t\tcase Open:\n\t\t\topen++\n\n\t\tcase Completed:\n\t\t\tcompleted++\n\n\t\tcase Uncompleted:\n\t\t\tunCompleted++\n\t\t}\n\t}\n\n\treturn Stats{\n\t\tTotal:       total,\n\t\tOpen:        open,\n\t\tCompleted:   completed,\n\t\tUncompleted: unCompleted,\n\t}\n}\n\nfunc (sm *Manager) OpenSession(pid peer.ID, from types.Height, count uint32) *Session {\n\tssn := NewSession(sm.nextSessionID, pid, from, count)\n\tsm.sessions[ssn.SessionID] = ssn\n\tsm.nextSessionID++\n\n\treturn ssn\n}\n\nfunc (sm *Manager) NumberOfSessions() int {\n\treturn len(sm.sessions)\n}\n\nfunc (sm *Manager) HasOpenSession(pid peer.ID) bool {\n\tfor _, ssn := range sm.sessions {\n\t\tif ssn.PeerID == pid && ssn.Status == Open {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (sm *Manager) HasAnyOpenSession() bool {\n\tfor _, ssn := range sm.sessions {\n\t\tif ssn.Status == Open {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (sm *Manager) UpdateSessionLastActivity(sid int) {\n\tssn := sm.sessions[sid]\n\tif ssn != nil {\n\t\tssn.LastActivity = time.Now()\n\t}\n}\n\nfunc (sm *Manager) SetExpiredSessionsAsUncompleted() {\n\tfor _, ssn := range sm.sessions {\n\t\tif sm.sessionTimeout < time.Since(ssn.LastActivity) {\n\t\t\tssn.Status = Uncompleted\n\t\t}\n\t}\n}\n\nfunc (sm *Manager) SetSessionUncompleted(sid int) {\n\tssn := sm.sessions[sid]\n\tif ssn != nil {\n\t\tssn.Status = Uncompleted\n\t}\n}\n\nfunc (sm *Manager) SetSessionCompleted(sid int) *Session {\n\tssn := sm.sessions[sid]\n\tif ssn != nil {\n\t\tssn.Status = Completed\n\t}\n\n\treturn ssn\n}\n\nfunc (sm *Manager) RemoveAllSessions() {\n\tsm.sessions = make(map[int]*Session)\n}\n\nfunc (sm *Manager) Sessions() []*Session {\n\tsessions := make([]*Session, 0, len(sm.sessions))\n\n\tfor _, ssn := range sm.sessions {\n\t\tsessions = append(sessions, ssn)\n\t}\n\n\treturn sessions\n}\n"
  },
  {
    "path": "sync/peerset/session/session.go",
    "content": "package session\n\nimport (\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/types\"\n)\n\ntype Status int\n\nconst (\n\tOpen        = Status(0)\n\tCompleted   = Status(2)\n\tUncompleted = Status(1)\n)\n\ntype Session struct {\n\tSessionID    int\n\tStatus       Status\n\tPeerID       peer.ID\n\tFrom         types.Height\n\tCount        uint32\n\tLastActivity time.Time\n}\n\nfunc NewSession(id int, peerID peer.ID, from types.Height, count uint32) *Session {\n\treturn &Session{\n\t\tSessionID:    id,\n\t\tStatus:       Open,\n\t\tPeerID:       peerID,\n\t\tFrom:         from,\n\t\tCount:        count,\n\t\tLastActivity: time.Now(),\n\t}\n}\n"
  },
  {
    "path": "sync/peerset/session/stats.go",
    "content": "package session\n\nimport \"fmt\"\n\ntype Stats struct {\n\tTotal       int\n\tOpen        int\n\tCompleted   int\n\tUncompleted int\n}\n\nfunc (ss *Stats) String() string {\n\treturn fmt.Sprintf(\"total: %v, open: %v, completed: %v, uncompleted: %v\",\n\t\tss.Total, ss.Open, ss.Completed, ss.Uncompleted)\n}\n"
  },
  {
    "path": "sync/sync.go",
    "content": "package sync\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/cache\"\n\t\"github.com/pactus-project/pactus/sync/firewall\"\n\t\"github.com/pactus-project/pactus/sync/peerset\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/sync/peerset/session\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/ntp\"\n)\n\n// IMPORTANT NOTES:\n//\n// 1. The Sync module is based on pulling instead of pushing. This means that the network\n// does not update a node (push); instead, a node should update itself (pull).\n//\n// 2. The Synchronizer should not have any locks to prevent deadlocks. All submodules,\n// such as state or consensus, should be thread-safe.\n\ntype synchronizer struct {\n\tconfig        *Config\n\tvalKeys       []*bls.ValidatorKey\n\tstate         state.Facade\n\tconsV1Mgr     consmgr.Manager\n\tconsV2Mgr     consmgr.Manager\n\tpeerSet       *peerset.PeerSet\n\tfirewall      *firewall.Firewall\n\tcache         *cache.Cache\n\thandlers      map[message.Type]messageHandler\n\tbroadcastPipe pipeline.Pipeline[message.Message]\n\tnetworkPipe   pipeline.Pipeline[network.Event]\n\tnetwork       network.Network\n\tlogger        *logger.SubLogger\n\tntp           *ntp.Checker\n}\n\n//nolint:revive // arguments can't be reduced.\nfunc NewSynchronizer(\n\tctx context.Context,\n\tconf *Config,\n\tvalKeys []*bls.ValidatorKey,\n\tstate state.Facade,\n\tconsV1Mgr consmgr.Manager,\n\tconsV2Mgr consmgr.Manager,\n\tnetwork network.Network,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n\tnetworkPipe pipeline.Pipeline[network.Event],\n) (Synchronizer, error) {\n\tsync := &synchronizer{\n\t\tconfig:        conf,\n\t\tvalKeys:       valKeys,\n\t\tstate:         state,\n\t\tconsV1Mgr:     consV1Mgr,\n\t\tconsV2Mgr:     consV2Mgr,\n\t\tnetwork:       network,\n\t\tbroadcastPipe: broadcastPipe,\n\t\tnetworkPipe:   networkPipe,\n\t\tntp:           ntp.NewNtpChecker(ctx),\n\t}\n\n\tsync.peerSet = peerset.NewPeerSet(conf.SessionTimeout())\n\tsync.logger = logger.NewSubLogger(\"_sync\", sync)\n\tfw, err := firewall.NewFirewall(conf.Firewall, network, sync.peerSet, state)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsync.firewall = fw\n\n\tcacheSize := conf.CacheSize()\n\tca, err := cache.NewCache(conf.CacheSize())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsync.cache = ca\n\tsync.logger.Info(\"cache setup\", \"size\", cacheSize)\n\n\thandlers := make(map[message.Type]messageHandler)\n\n\thandlers[message.TypeHello] = newHelloHandler(sync)\n\thandlers[message.TypeHelloAck] = newHelloAckHandler(sync)\n\thandlers[message.TypeTransaction] = newTransactionsHandler(sync)\n\thandlers[message.TypeQueryProposal] = newQueryProposalHandler(sync)\n\thandlers[message.TypeProposal] = newProposalHandler(sync)\n\thandlers[message.TypeQueryVote] = newQueryVoteHandler(sync)\n\thandlers[message.TypeVote] = newVoteHandler(sync)\n\thandlers[message.TypeBlockAnnounce] = newBlockAnnounceHandler(sync)\n\thandlers[message.TypeBlocksRequest] = newBlocksRequestHandler(sync)\n\thandlers[message.TypeBlocksResponse] = newBlocksResponseHandler(sync)\n\n\tsync.handlers = handlers\n\n\tsync.networkPipe.RegisterReceiver(sync.processNetworkEvent)\n\tsync.broadcastPipe.RegisterReceiver(sync.broadcastMessage)\n\n\treturn sync, nil\n}\n\nfunc (sync *synchronizer) Start() error {\n\tif err := sync.network.JoinTopic(network.TopicIDBlock, sync.blockTopicEvaluator); err != nil {\n\t\treturn err\n\t}\n\tif err := sync.network.JoinTopic(network.TopicIDTransaction, sync.transactionTopicEvaluator); err != nil {\n\t\treturn err\n\t}\n\t// TODO: Not joining consensus topic when we are syncing\n\tif err := sync.network.JoinTopic(network.TopicIDConsensus, sync.consensusTopicEvaluator); err != nil {\n\t\treturn err\n\t}\n\n\tsync.ntp.Start()\n\n\treturn nil\n}\n\nfunc (sync *synchronizer) Stop() {\n\tsync.ntp.Stop()\n}\n\nfunc (sync *synchronizer) ClockOffset() (time.Duration, error) {\n\treturn sync.ntp.ClockOffset()\n}\n\nfunc (sync *synchronizer) IsClockOutOfSync() bool {\n\treturn sync.ntp.IsOutOfSync()\n}\n\nfunc (sync *synchronizer) stateHeight() types.Height {\n\tstateHeight := sync.state.LastBlockHeight()\n\n\treturn stateHeight\n}\n\nfunc (sync *synchronizer) moveConsensusToNewHeight() {\n\tstateHeight := sync.stateHeight()\n\tconsHeight, _ := sync.getConsMgr().HeightRound()\n\tif stateHeight >= consHeight {\n\t\tsync.getConsMgr().MoveToNewHeight()\n\t}\n}\n\nfunc (sync *synchronizer) prepareBundle(msg message.Message) *bundle.Bundle {\n\th := sync.handlers[msg.Type()]\n\tbdl := h.PrepareBundle(msg)\n\n\t// Bundles will be carried through LibP2P.\n\t// In future we might support other libraries.\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagCarrierLibP2P)\n\n\tswitch sync.state.Genesis().ChainType() {\n\tcase genesis.Mainnet:\n\t\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkMainnet)\n\tcase genesis.Testnet:\n\t\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagNetworkTestnet)\n\tcase genesis.Localnet:\n\t\t// It's localnet and for testing purpose only\n\t}\n\n\treturn bdl\n}\n\nfunc (sync *synchronizer) sendTo(msg message.Message, pid peer.ID) {\n\tbdl := sync.prepareBundle(msg)\n\tdata, _ := bdl.Encode()\n\n\tsync.network.SendTo(data, pid)\n\tsync.peerSet.UpdateLastSent(pid)\n\tsync.peerSet.UpdateSentMetric(&pid, msg.Type(), int64(len(data)))\n\n\tsync.logger.Debug(\"bundle sent\", \"bundle\", bdl, \"pid\", pid)\n}\n\nfunc (sync *synchronizer) broadcast(msg message.Message) {\n\tif msg.Type() == message.TypeBlockAnnounce {\n\t\tm := msg.(*message.BlockAnnounceMessage)\n\t\tif sync.cache.HasBlockInCache(m.Height()) {\n\t\t\t// We have received the block announcement from other peers before,\n\t\t\t// so we can simply ignore broadcasting it again.\n\t\t\t// This helps to reduce the network bandwidth.\n\t\t\treturn\n\t\t}\n\t}\n\n\tbdl := sync.prepareBundle(msg)\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagBroadcasted)\n\n\tdata, _ := bdl.Encode()\n\tsync.network.Broadcast(data, msg.TopicID())\n\tsync.peerSet.UpdateSentMetric(nil, msg.Type(), int64(len(data)))\n\n\tsync.logger.Debug(\"bundle broadcasted\", \"bundle\", bdl)\n}\n\nfunc (sync *synchronizer) SelfID() peer.ID {\n\treturn sync.network.SelfID()\n}\n\nfunc (sync *synchronizer) Moniker() string {\n\treturn sync.config.Moniker\n}\n\nfunc (sync *synchronizer) PeerSet() *peerset.PeerSet {\n\treturn sync.peerSet\n}\n\nfunc (sync *synchronizer) Services() service.Services {\n\treturn sync.config.Services\n}\n\nfunc (sync *synchronizer) sayHello(pid peer.ID) {\n\tpeer := sync.peerSet.GetPeer(pid)\n\tif peer.Status.IsKnown() {\n\t\treturn\n\t}\n\n\tmsg := message.NewHelloMessage(\n\t\tsync.SelfID(),\n\t\tsync.config.Moniker,\n\t\tsync.config.Services,\n\t\tsync.stateHeight(),\n\t\tsync.state.LastBlockHash(),\n\t\tsync.state.Genesis().Hash(),\n\t)\n\tmsg.Sign(sync.valKeys)\n\n\tsync.sendTo(msg, pid)\n}\n\nfunc (sync *synchronizer) broadcastMessage(msg message.Message) {\n\tsync.broadcast(msg)\n}\n\nfunc (sync *synchronizer) processNetworkEvent(evt network.Event) {\n\tswitch evt.Type() {\n\tcase network.EventTypeGossip:\n\t\tge := evt.(*network.GossipMessage)\n\t\tsync.processGossipMessage(ge)\n\n\tcase network.EventTypeStream:\n\t\tse := evt.(*network.StreamMessage)\n\t\tsync.processStreamMessage(se)\n\n\tcase network.EventTypeConnect:\n\t\tce := evt.(*network.ConnectEvent)\n\t\tsync.processConnectEvent(ce)\n\n\tcase network.EventTypeDisconnect:\n\t\tde := evt.(*network.DisconnectEvent)\n\t\tsync.processDisconnectEvent(de)\n\n\tcase network.EventTypeProtocols:\n\t\tpe := evt.(*network.ProtocolsEvents)\n\t\tsync.processProtocolsEvent(pe)\n\t}\n}\n\nfunc (sync *synchronizer) processGossipMessage(msg *network.GossipMessage) {\n\tsync.logger.Debug(\"processing gossip message\", \"pid\", msg.From)\n\n\tbdl, err := sync.firewall.OpenGossipBundle(msg.Data, msg.From)\n\tif err != nil {\n\t\tsync.logger.Debug(\"error on parsing a Gossip bundle\",\n\t\t\t\"from\", msg.From, \"bundle\", bdl, \"error\", err)\n\n\t\treturn\n\t}\n\tsync.processIncomingBundle(bdl, msg.From)\n}\n\nfunc (sync *synchronizer) processStreamMessage(msg *network.StreamMessage) {\n\tsync.logger.Debug(\"processing stream message\", \"pid\", msg.From)\n\n\tdefer func() {\n\t\t_ = msg.Reader.Close()\n\t}()\n\n\tbdl, err := sync.firewall.OpenStreamBundle(msg.Reader, msg.From)\n\tif err != nil {\n\t\tsync.logger.Debug(\"error on parsing a Stream bundle\",\n\t\t\t\"from\", msg.From, \"bundle\", bdl, \"error\", err)\n\n\t\treturn\n\t}\n\n\tsync.processIncomingBundle(bdl, msg.From)\n}\n\nfunc (sync *synchronizer) processConnectEvent(eve *network.ConnectEvent) {\n\tsync.logger.Debug(\"processing connect event\", \"pid\", eve.PeerID)\n\n\tsync.peerSet.UpdateAddress(eve.PeerID, eve.RemoteAddress, eve.Direction)\n\tsync.peerSet.UpdateStatus(eve.PeerID, status.StatusConnected)\n}\n\nfunc (sync *synchronizer) processProtocolsEvent(eve *network.ProtocolsEvents) {\n\tsync.logger.Debug(\"processing protocols event\", \"pid\", eve.PeerID, \"protocols\", eve.Protocols)\n\n\tsync.peerSet.UpdateProtocols(eve.PeerID, eve.Protocols)\n\n\tpeer := sync.peerSet.GetPeer(eve.PeerID)\n\tif peer.Direction == lp2pnetwork.DirOutbound {\n\t\tsync.logger.Info(\"sending Hello message (outbound)\", \"to\", eve.PeerID)\n\t\tsync.sayHello(eve.PeerID)\n\n\t\t// Mark that we've sent the hello message to the inbound peer\n\t\tsync.peerSet.UpdateOutboundHelloSent(eve.PeerID, true)\n\t}\n}\n\nfunc (sync *synchronizer) processDisconnectEvent(de *network.DisconnectEvent) {\n\tsync.logger.Debug(\"processing disconnect event\", \"pid\", de.PeerID)\n\n\tsync.peerSet.UpdateStatus(de.PeerID, status.StatusDisconnected)\n}\n\nfunc (sync *synchronizer) processIncomingBundle(bdl *bundle.Bundle, from peer.ID) {\n\tsync.logger.Debug(\"received a bundle\", \"from\", from, \"bundle\", bdl)\n\thandler := sync.handlers[bdl.Message.Type()]\n\tif handler == nil {\n\t\tsync.logger.Error(\"invalid message type\", \"type\", bdl.Message.Type())\n\n\t\treturn\n\t}\n\n\thandler.ParseMessage(bdl.Message, from)\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (sync *synchronizer) LogString() string {\n\treturn fmt.Sprintf(\"{☍ %d ⛃ %d}\",\n\t\tsync.peerSet.Len(),\n\t\tsync.cache.Len())\n}\n\n// updateBlockchain checks whether the node's height is shorter than the network's height or not.\n// If the node's height is shorter than the network's height by more than two hours (720 blocks),\n// it should start downloading blocks from the network's nodes.\n// Otherwise, the node can request the latest blocks from any nodes.\nfunc (sync *synchronizer) updateBlockchain() {\n\t// Maybe we have some blocks inside the cache?\n\tsync.tryCommitBlocks()\n\n\t// Check if we have any expired sessions\n\tsync.peerSet.SetExpiredSessionsAsUncompleted()\n\n\t// Try to re-download the blocks for uncompleted sessions\n\tsessions := sync.peerSet.Sessions()\n\tfor _, ssn := range sessions {\n\t\tif ssn.Status == session.Uncompleted {\n\t\t\tsync.logger.Info(\"uncompleted block request, re-download\",\n\t\t\t\t\"sid\", ssn.SessionID, \"pid\", ssn.PeerID,\n\t\t\t\t\"stats\", sync.peerSet.SessionStats())\n\n\t\t\tsent := sync.sendBlockRequestToRandomPeer(ssn.From, ssn.Count, false)\n\t\t\tif !sent {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check if there are any open sessions.\n\t// If open sessions exist, we should wait for them to close.\n\t// Otherwise, we might request to download the same blocks from different peers.\n\t// TODO: write test for me\n\tif sync.peerSet.HasAnyOpenSession() {\n\t\tsync.logger.Debug(\"we have open session\",\n\t\t\t\"stats\", sync.peerSet.SessionStats())\n\n\t\treturn\n\t}\n\n\tsync.peerSet.RemoveAllSessions()\n\n\tblockInterval := sync.state.Params().BlockInterval()\n\tcurTime := util.RoundNow(int(blockInterval.Seconds()))\n\tlastBlockTime := sync.state.LastBlockTime()\n\tdiff := curTime.Sub(lastBlockTime)\n\tnumOfBlocks := uint32(diff.Seconds() / blockInterval.Seconds())\n\n\tif numOfBlocks <= 1 {\n\t\t// We are sync\n\t\treturn\n\t}\n\n\tdownloadHeight := sync.state.LastBlockHeight()\n\tdownloadHeight++\n\n\tif sync.cache.HasBlockInCache(downloadHeight) {\n\t\t// The last block exists inside the cache, without the certificate.\n\t\t// Ignore downloading this block again.\n\t\tdownloadHeight++\n\t}\n\n\tsync.logger.Info(\"start syncing with the network\",\n\t\t\"numOfBlocks\", numOfBlocks, \"height\", downloadHeight)\n\n\tif numOfBlocks > sync.config.PruneWindow {\n\t\t// Don't have blocks for more than 10 days\n\t\tsync.downloadBlocks(downloadHeight, true)\n\t} else {\n\t\tsync.downloadBlocks(downloadHeight, false)\n\t}\n}\n\n// downloadBlocks starts downloading blocks from the network.\nfunc (sync *synchronizer) downloadBlocks(from types.Height, onlyFullNodes bool) {\n\tsync.logger.Debug(\"downloading blocks\", \"from\", from)\n\n\tfor i := sync.peerSet.NumberOfSessions(); i < sync.config.MaxSessions; i++ {\n\t\tcount := sync.config.BlockPerSession\n\t\tsent := sync.sendBlockRequestToRandomPeer(from, count, onlyFullNodes)\n\t\tif !sent {\n\t\t\treturn\n\t\t}\n\n\t\tfrom += types.Height(count)\n\t}\n}\n\nfunc (sync *synchronizer) sendBlockRequestToRandomPeer(from types.Height, count uint32, onlyFullNodes bool) bool {\n\t// Prevent downloading blocks that might be cached before\n\tfor sync.cache.HasBlockInCache(from) {\n\t\tfrom++\n\t\tcount--\n\n\t\tif count == 0 {\n\t\t\t// we have blocks inside the cache\n\t\t\tsync.logger.Debug(\"sending download request ignored\", \"from\", from+1)\n\n\t\t\treturn true\n\t\t}\n\t}\n\n\tfor i := sync.peerSet.NumberOfSessions(); i < sync.config.MaxSessions; i++ {\n\t\tpeer := sync.peerSet.GetRandomPeer()\n\t\tif peer == nil {\n\t\t\tbreak\n\t\t}\n\n\t\t// Don't open a new session if we already have an open session with the same peer.\n\t\t// This helps us to get blocks from different peers.\n\t\tif sync.peerSet.HasOpenSession(peer.PeerID) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// We haven't completed the handshake with this peer.\n\t\tif !peer.Status.IsKnown() {\n\t\t\tif onlyFullNodes {\n\t\t\t\tsync.network.CloseConnection(peer.PeerID)\n\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif onlyFullNodes && !peer.IsFullNode() {\n\t\t\tif onlyFullNodes {\n\t\t\t\tsync.network.CloseConnection(peer.PeerID)\n\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\tsid := sync.peerSet.OpenSession(peer.PeerID, from, count)\n\t\tmsg := message.NewBlocksRequestMessage(sid, from, count)\n\t\tsync.sendTo(msg, peer.PeerID)\n\n\t\tsync.logger.Info(\"blocks request sent\",\n\t\t\t\"from\", from+1, \"count\", count, \"pid\", peer.PeerID, \"sid\", sid)\n\n\t\treturn true\n\t}\n\n\tsync.logger.Warn(\"unable to open a new session\",\n\t\t\"stats\", sync.peerSet.SessionStats())\n\n\treturn false\n}\n\nfunc (sync *synchronizer) tryCommitBlocks() {\n\tonError := func(height types.Height, err error) {\n\t\tsync.logger.Warn(\"committing block failed, removing block from the cache\",\n\t\t\t\"height\", height, \"error\", err)\n\n\t\tsync.cache.RemoveBlock(height)\n\t}\n\n\theight := sync.stateHeight() + 1\n\tfor {\n\t\tblk := sync.cache.GetBlock(height)\n\t\tif blk == nil {\n\t\t\tbreak\n\t\t}\n\t\tcert := sync.cache.GetCertificate(height)\n\t\tif cert == nil {\n\t\t\tbreak\n\t\t}\n\t\ttrxs := blk.Transactions()\n\t\tfor i := 0; i < trxs.Len(); i++ {\n\t\t\ttrx := trxs[i]\n\t\t\tif trx.IsPublicKeyStriped() {\n\t\t\t\tpub, err := sync.state.PublicKey(trx.Payload().Signer())\n\t\t\t\tif err != nil {\n\t\t\t\t\tonError(height, err)\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\ttrx.SetPublicKey(pub)\n\t\t\t}\n\t\t}\n\n\t\tif err := blk.BasicCheck(); err != nil {\n\t\t\tonError(height, err)\n\n\t\t\treturn\n\t\t}\n\t\tif err := cert.BasicCheck(); err != nil {\n\t\t\tonError(height, err)\n\n\t\t\treturn\n\t\t}\n\n\t\tsync.logger.Trace(\"committing block\", \"height\", height, \"block\", blk)\n\t\tif err := sync.state.CommitBlock(blk, cert); err != nil {\n\t\t\tonError(height, err)\n\n\t\t\treturn\n\t\t}\n\t\theight++\n\t}\n}\n\nfunc (sync *synchronizer) prepareBlocks(from types.Height, count uint32) [][]byte {\n\tourHeight := sync.stateHeight()\n\n\tif from > ourHeight {\n\t\tsync.logger.Debug(\"we don't have block at this height\", \"height\", from)\n\n\t\treturn nil\n\t}\n\n\tif from+types.Height(count) > ourHeight {\n\t\tcount = uint32(ourHeight - from + 1)\n\t}\n\n\tblocks := make([][]byte, 0, count)\n\n\tfor height := from; height < from+types.Height(count); height++ {\n\t\tcBlk, err := sync.state.CommittedBlock(height)\n\t\tif err != nil {\n\t\t\tsync.logger.Warn(\"unable to find a block\", \"height\", height)\n\n\t\t\treturn nil\n\t\t}\n\n\t\tblocks = append(blocks, cBlk.Data)\n\t}\n\n\treturn blocks\n}\n\nfunc (sync *synchronizer) blockTopicEvaluator(msg *network.GossipMessage) network.PropagationPolicy {\n\treturn sync.firewall.AllowBlockRequest(msg)\n}\n\nfunc (sync *synchronizer) transactionTopicEvaluator(msg *network.GossipMessage) network.PropagationPolicy {\n\treturn sync.firewall.AllowTransactionRequest(msg)\n}\n\nfunc (sync *synchronizer) consensusTopicEvaluator(msg *network.GossipMessage) network.PropagationPolicy {\n\treturn sync.firewall.AllowConsensusRequest(msg)\n}\n\n// getConsMgr returns consensus manager based on the upgrade condition.\n// After the chain is fully upgraded, we can remove this function.\nfunc (sync *synchronizer) getConsMgr() consmgr.Manager {\n\tif sync.consV1Mgr.IsDeprecated() {\n\t\treturn sync.consV2Mgr\n\t}\n\n\treturn sync.consV1Mgr\n}\n"
  },
  {
    "path": "sync/sync_test.go",
    "content": "package sync\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/consensus\"\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync/bundle\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/firewall\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tconfig    *Config\n\tstate     *state.MockState\n\tconsMocks []*consensus.MockConsensus\n\tnetwork   *network.MockNetwork\n\tsync      *synchronizer\n}\n\nfunc testConfig() *Config {\n\treturn &Config{\n\t\tMoniker:             \"test\",\n\t\tSessionTimeoutStr:   \"1s\",\n\t\tBlockPerMessage:     11,\n\t\tMaxSessions:         4,\n\t\tBlockPerSession:     27,\n\t\tPruneWindow:         13,\n\t\tFirewall:            firewall.DefaultConfig(),\n\t\tLatestSupportingVer: DefaultConfig().LatestSupportingVer,\n\t\tServices:            service.New(service.FullNode, service.PrunedNode),\n\t}\n}\n\nfunc setup(t *testing.T, config *Config) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tif config == nil {\n\t\tconfig = testConfig()\n\t\tconfig.Moniker = \"Alice\"\n\t}\n\tvalKeys := []*bls.ValidatorKey{ts.RandValKey(), ts.RandValKey()}\n\tmockState := state.MockingState(ts)\n\n\tconsV1Mgr, consMocks := consmgr.MockingManager(ts, mockState, []*bls.ValidatorKey{valKeys[0], valKeys[1]})\n\tconsV1Mgr.MoveToNewHeight()\n\n\tconsV2Mgr, _ := consmgr.MockingManager(ts, mockState, []*bls.ValidatorKey{valKeys[0], valKeys[1]})\n\tconsV2Mgr.MoveToNewHeight()\n\n\tmockNetwork := network.MockingNetwork(ts, ts.RandPeerID())\n\tbroadcastPipe := pipeline.New[message.Message](t.Context())\n\n\tsyncInst, err := NewSynchronizer(t.Context(), config, valKeys,\n\t\tmockState, consV1Mgr, consV2Mgr, mockNetwork, broadcastPipe, mockNetwork.EventPipe)\n\trequire.NoError(t, err)\n\tsync := syncInst.(*synchronizer)\n\n\ttd := &testData{\n\t\tTestSuite: ts,\n\t\tconfig:    config,\n\t\tstate:     mockState,\n\t\tconsMocks: consMocks,\n\t\tnetwork:   mockNetwork,\n\t\tsync:      sync,\n\t}\n\n\trequire.NoError(t, td.sync.Start())\n\tassert.Equal(t, config.Moniker, td.sync.Moniker())\n\tassert.Equal(t, config.Services, td.sync.Services())\n\n\tlogger.Info(\"setup finished, running the tests\", \"name\", t.Name())\n\n\treturn td\n}\n\nfunc shouldPublishMessageWithThisType(t *testing.T, net *network.MockNetwork, msgType message.Type) *bundle.Bundle {\n\tt.Helper()\n\n\ttimer := time.NewTimer(3 * time.Second)\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\trequire.NoError(t, fmt.Errorf(\"shouldPublishMessageWithThisType %v: Timeout, test: %v\", msgType, t.Name()))\n\n\t\t\treturn nil\n\n\t\tcase data := <-net.PublishCh:\n\t\t\t// Decode message again to check the message type\n\t\t\tbdl := new(bundle.Bundle)\n\t\t\t_, err := bdl.Decode(bytes.NewReader(data.Data))\n\t\t\trequire.NoError(t, err)\n\n\t\t\t// -----------\n\t\t\t// Check flags\n\t\t\trequire.True(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagCarrierLibP2P), \"invalid flag: %v\", bdl)\n\t\t\trequire.True(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagNetworkMainnet), \"invalid flag: %v\", bdl)\n\n\t\t\tif data.Target == nil {\n\t\t\t\trequire.True(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagBroadcasted), \"invalid flag: %v\", bdl)\n\t\t\t} else {\n\t\t\t\trequire.False(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagBroadcasted), \"invalid flag: %v\", bdl)\n\t\t\t}\n\n\t\t\tif bdl.Message.Type() == message.TypeHello ||\n\t\t\t\tbdl.Message.Type() == message.TypeHelloAck {\n\t\t\t\trequire.True(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagHandshaking), \"invalid flag: %v\", bdl)\n\t\t\t} else {\n\t\t\t\trequire.False(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagHandshaking), \"invalid flag: %v\", bdl)\n\t\t\t}\n\t\t\t// -----------\n\n\t\t\trequire.Equal(t, msgType, bdl.Message.Type(), \"not expected message: %s\", msgType)\n\n\t\t\treturn bdl\n\t\t}\n\t}\n}\n\nfunc (td *testData) shouldPublishMessageWithThisType(t *testing.T, msgType message.Type,\n) *bundle.Bundle {\n\tt.Helper()\n\n\treturn shouldPublishMessageWithThisType(t, td.network, msgType)\n}\n\nfunc shouldNotPublishAnyMessage(t *testing.T, net *network.MockNetwork) {\n\tt.Helper()\n\n\ttimer := time.NewTimer(3 * time.Millisecond)\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\treturn\n\n\t\tcase data := <-net.PublishCh:\n\t\t\t// Decode message again to check the message type\n\t\t\tbdl := new(bundle.Bundle)\n\t\t\t_, err := bdl.Decode(bytes.NewReader(data.Data))\n\t\t\trequire.NoError(t, err)\n\t\t\trequire.Fail(t, \"published unexpected message: \"+bdl.Message.Type().String())\n\t\t}\n\t}\n}\n\nfunc (td *testData) shouldNotPublishAnyMessage(t *testing.T) {\n\tt.Helper()\n\n\tshouldNotPublishAnyMessage(t, td.network)\n}\n\nfunc (*testData) receivingNewMessage(sync *synchronizer, msg message.Message, from peer.ID) {\n\tbdl := bundle.NewBundle(msg)\n\tbdl.Flags = util.SetFlag(bdl.Flags, bundle.BundleFlagCarrierLibP2P|bundle.BundleFlagNetworkMainnet)\n\n\tsync.processIncomingBundle(bdl, from)\n}\n\nfunc (td *testData) addPeer(t *testing.T, status status.Status, services service.Services) peer.ID {\n\tt.Helper()\n\n\tpid := td.RandPeerID()\n\tpub, _ := td.RandBLSKeyPair()\n\n\ttd.sync.peerSet.UpdateInfo(pid, t.Name(),\n\t\tversion.NodeAgent.String(), []*bls.PublicKey{pub}, services)\n\ttd.sync.peerSet.UpdateStatus(pid, status)\n\n\treturn pid\n}\n\nfunc (td *testData) addValidatorToCommittee(t *testing.T, pub *bls.PublicKey) {\n\tt.Helper()\n\n\tif pub == nil {\n\t\tpub, _ = td.RandBLSKeyPair()\n\t}\n\tval := td.GenerateTestValidator(testsuite.ValidatorWithPublicKey(pub))\n\t// Note: This may not be completely accurate, but it has no harm for testing purposes.\n\tval.UpdateLastSortitionHeight(td.state.TestCommittee.Proposer(0).LastSortitionHeight() + 1)\n\ttd.state.TestStore.UpdateValidator(val)\n\ttd.state.TestCommittee.Update(0, []*validator.Validator{val})\n\trequire.True(t, td.state.TestCommittee.Contains(pub.ValidatorAddress()))\n\n\tfor _, cons := range td.consMocks {\n\t\tcons.SetActive(cons.ValKey.PublicKey().EqualsTo(pub))\n\t}\n}\n\nfunc (td *testData) checkPeerStatus(t *testing.T, pid peer.ID, code status.Status) {\n\tt.Helper()\n\n\trequire.Equal(t, code, td.sync.peerSet.GetPeerStatus(pid))\n}\n\nfunc TestStop(t *testing.T) {\n\ttd := setup(t, nil)\n\n\t// Should stop gracefully.\n\ttd.sync.Stop()\n}\n\nfunc TestConnectEvent(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tpid := td.RandPeerID()\n\tremoteAddr := \"/ip4/2.2.2.2/tcp/21888\"\n\tce := &network.ConnectEvent{\n\t\tPeerID:        pid,\n\t\tRemoteAddress: remoteAddr,\n\t\tDirection:     lp2pnetwork.DirInbound,\n\t}\n\ttd.network.EventPipe.Send(ce)\n\n\tassert.Eventually(t, func() bool {\n\t\treturn td.sync.peerSet.HasPeer(pid)\n\t}, time.Second, 100*time.Millisecond)\n\n\tpeer := td.sync.peerSet.GetPeer(pid)\n\tassert.Equal(t, status.StatusConnected, peer.Status)\n\tassert.Equal(t, remoteAddr, peer.Address)\n\tassert.Equal(t, lp2pnetwork.DirInbound, peer.Direction)\n}\n\nfunc TestDisconnectEvent(t *testing.T) {\n\ttd := setup(t, nil)\n\tpid := td.RandPeerID()\n\tde := &network.DisconnectEvent{\n\t\tPeerID: pid,\n\t}\n\ttd.network.EventPipe.Send(de)\n\n\tassert.Eventually(t, func() bool {\n\t\treturn td.sync.peerSet.HasPeer(pid)\n\t}, time.Second, 100*time.Millisecond)\n\n\ttd.checkPeerStatus(t, pid, status.StatusDisconnected)\n}\n\nfunc TestProtocolsEvent(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tpid := td.RandPeerID()\n\tpe := &network.ProtocolsEvents{\n\t\tPeerID:    pid,\n\t\tProtocols: []string{\"protocol-1\", \"protocol-2\"},\n\t}\n\ttd.network.EventPipe.Send(pe)\n\n\tassert.Eventually(t, func() bool {\n\t\treturn td.sync.peerSet.HasPeer(pid)\n\t}, time.Second, 100*time.Millisecond)\n\n\tpeer := td.sync.peerSet.GetPeer(pid)\n\tassert.Equal(t, []string{\"protocol-1\", \"protocol-2\"}, peer.Protocols)\n}\n\nfunc TestSendHello(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Peer with unknown Direction\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\tpe := &network.ProtocolsEvents{\n\t\t\tPeerID:    pid,\n\t\t\tProtocols: []string{\"protocol-1\"},\n\t\t}\n\t\ttd.network.EventPipe.Send(pe)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"Peer with inbound Direction\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\ttd.sync.peerSet.UpdateAddress(pid, \"test-address\", lp2pnetwork.DirInbound)\n\n\t\tpe := &network.ProtocolsEvents{\n\t\t\tPeerID:    pid,\n\t\t\tProtocols: []string{\"protocol-1\"},\n\t\t}\n\t\ttd.network.EventPipe.Send(pe)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n\n\tt.Run(\"Peer with outbound Direction\", func(t *testing.T) {\n\t\tpid := td.RandPeerID()\n\t\ttd.sync.peerSet.UpdateAddress(pid, \"test-address\", lp2pnetwork.DirOutbound)\n\n\t\tpe := &network.ProtocolsEvents{\n\t\t\tPeerID:    pid,\n\t\t\tProtocols: []string{\"protocol-1\"},\n\t\t}\n\t\ttd.network.EventPipe.Send(pe)\n\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeHello)\n\t})\n}\n\nfunc TestTestNetFlags(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttd.state.TestGenesis = genesis.TestnetGenesis()\n\ttd.addValidatorToCommittee(t, td.sync.valKeys[0].PublicKey())\n\tbdl := td.sync.prepareBundle(message.NewQueryProposalMessage(td.RandHeight(), td.RandRound(), td.RandValAddress()))\n\n\trequire.False(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagNetworkMainnet), \"invalid flag: %v\", bdl)\n\trequire.True(t, util.IsFlagSet(bdl.Flags, bundle.BundleFlagNetworkTestnet), \"invalid flag: %v\", bdl)\n}\n\nfunc TestDownload(t *testing.T) {\n\tconf := testConfig()\n\t// Let's not allow `GetRandomPeer` to disappoint us!\n\tconf.MaxSessions = 32\n\n\tt.Run(\"try to download blocks, but the peer is not known\", func(t *testing.T) {\n\t\ttd := setup(t, conf)\n\n\t\tpid := td.addPeer(t, status.StatusConnected, service.New(service.None))\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\t\tbaMsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\t\ttd.receivingNewMessage(td.sync, baMsg, pid)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.network.IsClosed(pid)\n\t})\n\n\tt.Run(\"try to download blocks, but the peer is not a network node\", func(t *testing.T) {\n\t\ttd := setup(t, conf)\n\n\t\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\t\tbaMsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\t\ttd.receivingNewMessage(td.sync, baMsg, pid)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t\ttd.network.IsClosed(pid)\n\t})\n\n\tt.Run(\"try to download blocks and the peer is a network node\", func(t *testing.T) {\n\t\ttd := setup(t, conf)\n\n\t\tpid := td.addPeer(t, status.StatusKnown, service.New(service.FullNode))\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\t\tbaMsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\t\ttd.receivingNewMessage(td.sync, baMsg, pid)\n\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeBlocksRequest)\n\t})\n\n\tt.Run(\"download request is rejected\", func(t *testing.T) {\n\t\ttd := setup(t, conf)\n\n\t\tpid := td.addPeer(t, status.StatusKnown, service.New(service.None))\n\t\tfrom := td.sync.stateHeight() + 1\n\t\tcount := uint32(123)\n\t\tsid := td.sync.peerSet.OpenSession(pid, from, count)\n\t\tmsg := message.NewBlocksResponseMessage(message.ResponseCodeRejected, t.Name(),\n\t\t\tsid, 1, nil, nil)\n\t\ttd.receivingNewMessage(td.sync, msg, pid)\n\n\t\tassert.False(t, td.sync.peerSet.HasOpenSession(pid))\n\t})\n}\n\nfunc TestBroadcastBlockAnnounce(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"Should announce the block\", func(t *testing.T) {\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\t\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\n\t\ttd.sync.broadcast(msg)\n\n\t\ttd.shouldPublishMessageWithThisType(t, message.TypeBlockAnnounce)\n\t})\n\n\tt.Run(\"Should NOT announce the block\", func(t *testing.T) {\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight())\n\t\tmsg := message.NewBlockAnnounceMessage(blk, cert, nil)\n\n\t\ttd.sync.cache.AddBlock(blk)\n\t\ttd.sync.broadcast(msg)\n\n\t\ttd.shouldNotPublishAnyMessage(t)\n\t})\n}\n\nfunc TestAllBlocksInCache(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tblk100, _ := td.GenerateTestBlock(100)\n\tblk101, _ := td.GenerateTestBlock(101)\n\tblk102, _ := td.GenerateTestBlock(102)\n\n\ttd.sync.cache.AddBlock(blk100)\n\ttd.sync.cache.AddBlock(blk101)\n\ttd.sync.cache.AddBlock(blk102)\n\n\tres := td.sync.sendBlockRequestToRandomPeer(100, 3, true)\n\tassert.True(t, res)\n}\n"
  },
  {
    "path": "tests/account_test.go",
    "content": "package tests\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc getAccount(t *testing.T, addr crypto.Address) *pactus.AccountInfo {\n\tt.Helper()\n\n\tres, err := tBlockchainClient.GetAccount(tCtx,\n\t\t&pactus.GetAccountRequest{Address: addr.String()})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Account\n}\n\nfunc TestGetAccount(t *testing.T) {\n\tacc := getAccount(t, crypto.TreasuryAddress)\n\trequire.NotNil(t, acc)\n\tassert.Equal(t, int32(0), acc.Number)\n}\n"
  },
  {
    "path": "tests/block_test.go",
    "content": "package tests\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\nfunc lastHeight() types.Height {\n\tres, err := tBlockchainClient.GetBlockchainInfo(tCtx,\n\t\t&pactus.GetBlockchainInfoRequest{})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn types.Height(res.LastBlockHeight)\n}\n\nfunc waitForNewBlocks(num uint32) {\n\tfor i := uint32(0); i < num; i++ {\n\t\theight := lastHeight()\n\t\tif lastHeight() > height {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(4 * time.Second)\n\t}\n}\n\nfunc lastBlock() *pactus.GetBlockResponse {\n\treturn getBlockAt(lastHeight())\n}\n\nfunc getBlockAt(height types.Height) *pactus.GetBlockResponse {\n\tfor i := 0; i < 120; i++ {\n\t\tres, err := tBlockchainClient.GetBlock(tCtx,\n\t\t\t&pactus.GetBlockRequest{\n\t\t\t\tHeight:    uint32(height),\n\t\t\t\tVerbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_INFO,\n\t\t\t},\n\t\t)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"getBlockAt err: %s\\n\", err.Error())\n\t\t\ttime.Sleep(1 * time.Second)\n\n\t\t\tcontinue\n\t\t}\n\n\t\treturn res\n\t}\n\tlogger.Panic(\"getBlockAt timeout\", \"height\", height)\n\n\treturn nil\n}\n"
  },
  {
    "path": "tests/main_test.go",
    "content": "package tests\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/config\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/node\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/txpool\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\nvar (\n\ttValKeys           [][]*bls.ValidatorKey\n\ttConfigs           []*config.Config\n\ttNodes             []*node.Node\n\ttGRPCAddress       = \"127.0.0.1:1337\"\n\ttGenDoc            *genesis.Genesis\n\ttBlockchainClient  pactus.BlockchainClient\n\ttTransactionClient pactus.TransactionClient\n\ttNetwork           pactus.NetworkClient\n\ttCtx               context.Context\n)\n\nconst (\n\ttNodeIdx1      = 0\n\ttNodeIdx2      = 1\n\ttNodeIdx3      = 2\n\ttNodeIdx4      = 3\n\ttTotalNodes    = 4 // each node has 3 validators\n\ttCommitteeSize = 7\n)\n\nfunc TestMain(m *testing.M) {\n\t// Prevent log from messing the workspace\n\tlogger.LogFilename = util.TempFilePath()\n\n\ttValKeys = make([][]*bls.ValidatorKey, tTotalNodes)\n\ttConfigs = make([]*config.Config, tTotalNodes)\n\ttNodes = make([]*node.Node, tTotalNodes)\n\n\tikm := hash.CalcHash([]byte{})\n\tfor i := 0; i < tTotalNodes; i++ {\n\t\tikm = hash.CalcHash(ikm.Bytes())\n\t\tkey0, _ := bls.KeyGen(ikm.Bytes(), nil)\n\t\tikm = hash.CalcHash(ikm.Bytes())\n\t\tkey1, _ := bls.KeyGen(ikm.Bytes(), nil)\n\t\tikm = hash.CalcHash(ikm.Bytes())\n\t\tkey2, _ := bls.KeyGen(ikm.Bytes(), nil)\n\n\t\ttValKeys[i] = make([]*bls.ValidatorKey, 3)\n\t\ttValKeys[i][0] = bls.NewValidatorKey(key0)\n\t\ttValKeys[i][1] = bls.NewValidatorKey(key1)\n\t\ttValKeys[i][2] = bls.NewValidatorKey(key2)\n\t\ttConfigs[i] = config.DefaultConfigMainnet()\n\n\t\ttConfigs[i].TxPool.Fee = &txpool.FeeConfig{\n\t\t\tFixedFee:   0.000001,\n\t\t\tDailyLimit: 280,\n\t\t\tUnitPrice:  0,\n\t\t}\n\t\ttConfigs[i].Store.Path = util.TempDirPath()\n\t\ttConfigs[i].Consensus.ChangeProposerTimeout = 2 * time.Second\n\t\ttConfigs[i].Consensus.ChangeProposerDelta = 2 * time.Second\n\t\ttConfigs[i].Consensus.QueryVoteTimeout = 2 * time.Second\n\t\ttConfigs[i].ConsensusV2.ChangeProposerTimeout = 2 * time.Second\n\t\ttConfigs[i].ConsensusV2.ChangeProposerDelta = 2 * time.Second\n\t\ttConfigs[i].ConsensusV2.QueryVoteTimeout = 2 * time.Second\n\t\ttConfigs[i].Logger.Levels[\"default\"] = \"info\"\n\t\ttConfigs[i].Logger.Levels[\"_state\"] = \"info\"\n\t\ttConfigs[i].Logger.Levels[\"_sync\"] = \"info\"\n\t\ttConfigs[i].Logger.Levels[\"_consensus\"] = \"debug\"\n\t\ttConfigs[i].Logger.Levels[\"_network\"] = \"info\"\n\t\ttConfigs[i].Logger.Levels[\"_pool\"] = \"info\"\n\t\ttConfigs[i].Sync.Firewall.BannedNets = make([]string, 0)\n\t\ttConfigs[i].Sync.BlockPerSession = 10\n\t\ttConfigs[i].Network.EnableMdns = true\n\t\ttConfigs[i].Network.EnableRelay = false\n\t\ttConfigs[i].Network.DefaultBootstrapAddrStrings = []string{}\n\t\ttConfigs[i].Network.BootstrapAddrStrings = []string{}\n\t\ttConfigs[i].Network.ForcePrivateNetwork = true\n\t\ttConfigs[i].Network.NetworkKey = util.TempFilePath()\n\t\ttConfigs[i].Network.NetworkName = \"test\"\n\t\ttConfigs[i].Network.ListenAddrStrings = []string{\"/ip4/127.0.0.1/tcp/0\", \"/ip4/127.0.0.1/udp/0/quic-v1\"}\n\t\ttConfigs[i].Network.MaxConns = 32\n\t\ttConfigs[i].Network.PeerStorePath = util.TempFilePath()\n\t\ttConfigs[i].HTML.Enable = false\n\t\ttConfigs[i].GRPC.Enable = false\n\t\ttConfigs[i].WalletManager.WalletsDir = util.TempDirPath()\n\n\t\twalletPath := filepath.Join(tConfigs[i].WalletManager.WalletsDir, \"default_wallet\")\n\t\tmnemonic, _ := wallet.GenerateMnemonic(128)\n\t\twlt, err := wallet.Create(context.Background(), walletPath, mnemonic, \"\", genesis.Mainnet)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to create wallet: %w\", err))\n\t\t}\n\t\twlt.Close()\n\n\t\tif i == 0 {\n\t\t\ttConfigs[i].GRPC.Enable = true\n\t\t\ttConfigs[i].GRPC.Listen = tGRPCAddress\n\t\t}\n\t\tfmt.Printf(\"Node %d created.\\n\", i+1)\n\t}\n\n\tacc1 := account.NewAccount(0)\n\tacc1.AddToBalance(21 * 1e14)\n\tkey, _ := bls.KeyGen(ikm.Bytes(), nil)\n\tacc2 := account.NewAccount(1)\n\tacc2.AddToBalance(21 * 1e14)\n\n\taccs := map[crypto.Address]*account.Account{\n\t\tcrypto.TreasuryAddress:                 acc1,\n\t\tkey.PublicKeyNative().AccountAddress(): acc2,\n\t}\n\n\tvals := make([]*validator.Validator, 4)\n\tvals[0] = validator.NewValidator(tValKeys[tNodeIdx1][0].PublicKey(), 0)\n\tvals[1] = validator.NewValidator(tValKeys[tNodeIdx2][0].PublicKey(), 1)\n\tvals[2] = validator.NewValidator(tValKeys[tNodeIdx3][0].PublicKey(), 2)\n\tvals[3] = validator.NewValidator(tValKeys[tNodeIdx4][0].PublicKey(), 3)\n\n\tgenParams := genesis.DefaultGenesisParams()\n\tgenParams.BlockVersion = protocol.ProtocolVersionLatest\n\tgenParams.MinimumStake = 1000\n\tgenParams.BlockIntervalInSecond = 2\n\tgenParams.BondInterval = 8\n\tgenParams.CommitteeSize = tCommitteeSize\n\tgenParams.TransactionToLiveInterval = 8\n\ttGenDoc = genesis.MakeGenesis(time.Now().Add(10*time.Second), accs, vals, genParams)\n\n\ttCtx = context.Background()\n\n\tfor i := 0; i < tTotalNodes; i++ {\n\t\ttNodes[i], _ = node.NewNode(\n\t\t\ttCtx,\n\t\t\ttGenDoc, tConfigs[i],\n\t\t\ttValKeys[i],\n\t\t\t[]crypto.Address{\n\t\t\t\ttValKeys[i][0].PublicKey().AccountAddress(),\n\t\t\t\ttValKeys[i][1].PublicKey().AccountAddress(),\n\t\t\t\ttValKeys[i][2].PublicKey().AccountAddress(),\n\t\t\t})\n\n\t\tif err := tNodes[i].Start(); err != nil {\n\t\t\tpanic(fmt.Sprintf(\"Error on starting the node: %v\", err))\n\t\t}\n\n\t\tif i == 0 {\n\t\t\t// Set bootstrap address for better connectivity\n\t\t\tbootstrapAddr := fmt.Sprintf(\"%v/p2p/%v\",\n\t\t\t\ttNodes[i].Network().HostAddrs()[0], tNodes[i].Network().SelfID())\n\t\t\tfmt.Println(\"Bootstrap address is: \" + bootstrapAddr)\n\n\t\t\ttConfigs[tNodeIdx2].Network.BootstrapAddrStrings = []string{bootstrapAddr}\n\t\t\ttConfigs[tNodeIdx3].Network.BootstrapAddrStrings = []string{bootstrapAddr}\n\t\t\ttConfigs[tNodeIdx4].Network.BootstrapAddrStrings = []string{bootstrapAddr}\n\t\t}\n\t}\n\n\ttime.Sleep(10 * time.Second)\n\n\tgrpcConn, err := grpc.NewClient(\n\t\ttGRPCAddress,\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t)\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"failed to dial server: %w\", err))\n\t}\n\n\ttBlockchainClient = pactus.NewBlockchainClient(grpcConn)\n\ttTransactionClient = pactus.NewTransactionClient(grpcConn)\n\ttNetwork = pactus.NewNetworkClient(grpcConn)\n\n\t// Wait for some blocks\n\tfmt.Println(\"Waiting to commit some blocks...\")\n\twaitForNewBlocks(8)\n\n\tfmt.Println(\"Running tests...\")\n\tm.Run()\n\t// Commit more blocks, then new nodes can catch up and send sortition transactions\n\n\tfmt.Println(\"Waiting to commit some blocks...\")\n\twaitForNewBlocks(20)\n\n\t// Check if sortition worked or not?\n\tblock := lastBlock()\n\tcert := block.PrevCert\n\tif block.Height == 1 {\n\t\tpanic(\"block height should be greater than 1\")\n\t}\n\tif len(cert.Committers) == 4 {\n\t\tpanic(\"Sortition didn't work\")\n\t}\n\n\t// Lets shutdown the nodes\n\ttCtx.Done()\n\tfor i := 0; i < tTotalNodes; i++ {\n\t\ttNodes[i].Stop()\n\t}\n\n\tstore, _ := store.NewStore(tConfigs[tNodeIdx1].Store)\n\ttotal := amount.Amount(0)\n\tstore.IterateAccounts(func(_ crypto.Address, acc *account.Account) bool {\n\t\ttotal += acc.Balance()\n\n\t\treturn false\n\t})\n\n\tstore.IterateValidators(func(v *validator.Validator) bool {\n\t\ttotal += v.Stake()\n\n\t\treturn false\n\t})\n\tif total != tGenDoc.TotalSupply() {\n\t\tpanic(fmt.Sprintf(\"Some coins missed: %v\", tGenDoc.TotalSupply()-total))\n\t}\n}\n"
  },
  {
    "path": "tests/transaction_test.go",
    "content": "package tests\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc sendRawTx(t *testing.T, raw []byte) error {\n\tt.Helper()\n\n\t_, err := tTransactionClient.BroadcastTransaction(tCtx,\n\t\t&pactus.BroadcastTransactionRequest{SignedRawTransaction: hex.EncodeToString(raw)})\n\n\treturn err\n}\n\nfunc broadcastSendTransaction(t *testing.T, sender *bls.ValidatorKey, receiver crypto.Address,\n\tamt, fee amount.Amount,\n) error {\n\tt.Helper()\n\n\tlockTime := lastHeight() + 1\n\ttrx := tx.NewTransferTx(lockTime, sender.PublicKey().AccountAddress(), receiver, amt, fee)\n\tsig := sender.Sign(trx.SignBytes())\n\n\ttrx.SetPublicKey(sender.PublicKey())\n\ttrx.SetSignature(sig)\n\n\td, _ := trx.Bytes()\n\n\treturn sendRawTx(t, d)\n}\n\nfunc broadcastBondTransaction(t *testing.T, sender *bls.ValidatorKey, pub *bls.PublicKey,\n\tstake, fee amount.Amount,\n) error {\n\tt.Helper()\n\n\tlockTime := lastHeight() + 1\n\ttrx := tx.NewBondTx(lockTime, sender.PublicKey().AccountAddress(), pub.ValidatorAddress(), pub, stake, fee)\n\tsig := sender.Sign(trx.SignBytes())\n\n\ttrx.SetPublicKey(sender.PublicKey())\n\ttrx.SetSignature(sig)\n\n\td, _ := trx.Bytes()\n\n\treturn sendRawTx(t, d)\n}\n\nfunc TestTransactions(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpubAlice, prvAlice := ts.RandBLSKeyPair()\n\tpubBob, prvBob := ts.RandBLSKeyPair()\n\tpubCarol, _ := ts.RandBLSKeyPair()\n\tpubDave, _ := ts.RandBLSKeyPair()\n\n\tvalKeyAlice := bls.NewValidatorKey(prvAlice)\n\tvalKeyBob := bls.NewValidatorKey(prvBob)\n\n\tt.Run(\"Sending normal transaction\", func(t *testing.T) {\n\t\trequire.NoError(t, broadcastSendTransaction(t, tValKeys[tNodeIdx2][0], pubAlice.AccountAddress(), 80000000, 8000))\n\t})\n\n\tt.Run(\"Alice tries double spending\", func(t *testing.T) {\n\t\trequire.NoError(t, broadcastSendTransaction(t, valKeyAlice, pubBob.AccountAddress(), 50000000, 5000))\n\n\t\trequire.Error(t, broadcastSendTransaction(t, valKeyAlice, pubCarol.AccountAddress(), 50000000, 5000))\n\t})\n\n\tt.Run(\"Bob sends two transaction at once\", func(t *testing.T) {\n\t\trequire.NoError(t, broadcastSendTransaction(t, valKeyBob, pubCarol.AccountAddress(), 10, 1000))\n\n\t\trequire.NoError(t, broadcastSendTransaction(t, valKeyBob, pubDave.AccountAddress(), 1, 1000))\n\t})\n\n\tt.Run(\"Bonding transactions\", func(t *testing.T) {\n\t\t// These validators are not in the committee now.\n\t\t// Bond transactions are valid and they can enter the committee soon\n\t\tfor i := 0; i < tTotalNodes; i++ {\n\t\t\tamt := amount.Amount(1000000)\n\t\t\tfee := amount.Amount(1000)\n\t\t\tvalKey := tValKeys[tNodeIdx1][0]\n\n\t\t\trequire.NoError(t, broadcastBondTransaction(t, valKey, tValKeys[i][1].PublicKey(), amt, fee))\n\t\t\tfmt.Printf(\"Staking %v to %v\\n\", amt, tValKeys[i][1].Address())\n\n\t\t\trequire.NoError(t, broadcastBondTransaction(t, valKey, tValKeys[i][2].PublicKey(), amt, fee))\n\t\t\tfmt.Printf(\"Staking %v to %v\\n\", amt, tValKeys[i][2].Address())\n\t\t}\n\t})\n\n\t// Make sure all transactions are confirmed\n\twaitForNewBlocks(8)\n\n\taccAlice := getAccount(t, pubAlice.AccountAddress())\n\taccBob := getAccount(t, pubBob.AccountAddress())\n\taccCarol := getAccount(t, pubCarol.AccountAddress())\n\taccDave := getAccount(t, pubDave.AccountAddress())\n\trequire.NotNil(t, accAlice)\n\trequire.NotNil(t, accBob)\n\trequire.NotNil(t, accCarol)\n\trequire.NotNil(t, accDave)\n\n\tassert.Equal(t, int64(80000000-50005000), accAlice.Balance)\n\tassert.Equal(t, int64(50000000-2011), accBob.Balance)\n\tassert.Equal(t, int64(10), accCarol.Balance)\n\tassert.Equal(t, int64(1), accDave.Balance)\n}\n"
  },
  {
    "path": "tests/validator_test.go",
    "content": "package tests\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc getValidator(t *testing.T, addr crypto.Address) *pactus.ValidatorInfo {\n\tt.Helper()\n\n\tres, err := tBlockchainClient.GetValidator(tCtx,\n\t\t&pactus.GetValidatorRequest{Address: addr.String()})\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn res.Validator\n}\n\nfunc TestGetValidator(t *testing.T) {\n\tval := getValidator(t, tValKeys[tNodeIdx2][0].Address())\n\trequire.NotNil(t, val)\n\tassert.Equal(t, int32(1), val.Number)\n}\n"
  },
  {
    "path": "txpool/config.go",
    "content": "package txpool\n\nimport \"github.com/pactus-project/pactus/types/amount\"\n\n// Config defines parameters for the transaction pool.\ntype Config struct {\n\tMaxSize int        `toml:\"max_size\"`\n\tFee     *FeeConfig `toml:\"fee\"`\n\n\t// Private configuration\n\tConsumptionWindow uint32 `toml:\"-\"`\n}\n\n// FeeConfig holds fee-related settings used to estimate and validate\n// transaction fees.\ntype FeeConfig struct {\n\tFixedFee   float64 `toml:\"fixed_fee\"`\n\tDailyLimit int     `toml:\"daily_limit\"`\n\tUnitPrice  float64 `toml:\"unit_price\"`\n}\n\n// DefaultConfig returns the default transaction pool configuration.\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tMaxSize:           1000,\n\t\tFee:               DefaultFeeConfig(),\n\t\tConsumptionWindow: 8640,\n\t}\n}\n\n// DefaultFeeConfig returns the default fee configuration.\nfunc DefaultFeeConfig() *FeeConfig {\n\treturn &FeeConfig{\n\t\tFixedFee:   0.01,\n\t\tDailyLimit: 360,\n\t\tUnitPrice:  0,\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (conf *Config) BasicCheck() error {\n\tif conf.MaxSize < 10 {\n\t\treturn ConfigError{\n\t\t\tReason: \"maxSize can't be less than 10\",\n\t\t}\n\t}\n\n\tif conf.Fee.DailyLimit <= 0 {\n\t\treturn ConfigError{\n\t\t\tReason: \"dailyLimit should be positive\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (conf *Config) calculateConsumption() bool {\n\treturn conf.Fee.UnitPrice > 0\n}\n\nfunc (conf *Config) fixedFee() amount.Amount {\n\tamt, _ := amount.NewAmount(conf.Fee.FixedFee)\n\n\treturn amt\n}\n\nfunc (conf *Config) sortitionPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.1)\n}\n\nfunc (conf *Config) bondPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.1)\n}\n\nfunc (conf *Config) unbondPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.1)\n}\n\nfunc (conf *Config) withdrawPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.1)\n}\n\nfunc (conf *Config) transferPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.5)\n}\n\nfunc (conf *Config) batchTransferPoolSize() int {\n\treturn int(float32(conf.MaxSize) * 0.1)\n}\n"
  },
  {
    "path": "txpool/config_test.go",
    "content": "package txpool\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestDefaultConfig(t *testing.T) {\n\tconf := DefaultConfig()\n\trequire.NoError(t, conf.BasicCheck())\n\n\tassert.Equal(t, 500, conf.transferPoolSize())\n\tassert.Equal(t, 100, conf.bondPoolSize())\n\tassert.Equal(t, 100, conf.unbondPoolSize())\n\tassert.Equal(t, 100, conf.withdrawPoolSize())\n\tassert.Equal(t, 100, conf.sortitionPoolSize())\n\tassert.Equal(t, 100, conf.batchTransferPoolSize())\n\tassert.Equal(t, amount.Amount(0.01e9), conf.fixedFee())\n\n\tassert.Equal(t,\n\t\tconf.transferPoolSize()+\n\t\t\tconf.bondPoolSize()+\n\t\t\tconf.unbondPoolSize()+\n\t\t\tconf.withdrawPoolSize()+\n\t\t\tconf.sortitionPoolSize()+\n\t\t\tconf.batchTransferPoolSize(), conf.MaxSize)\n}\n\nfunc TestConfigBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\texpectedErr error\n\t\tupdateFn    func(c *Config)\n\t}{\n\t\t{\n\t\t\tname: \"Invalid MaxSize\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"maxSize can't be less than 10\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MaxSize = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid MaxSize\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"maxSize can't be less than 10\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MaxSize = 9\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Invalid DailyLimit\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"dailyLimit should be positive\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.Fee.DailyLimit = 0\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Negative DailyLimit\",\n\t\t\texpectedErr: ConfigError{\n\t\t\t\tReason: \"dailyLimit should be positive\",\n\t\t\t},\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.Fee.DailyLimit = -1\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Valid Config\",\n\t\t\tupdateFn: func(c *Config) {\n\t\t\t\tc.MaxSize = 100\n\t\t\t\tc.Fee = &FeeConfig{\n\t\t\t\t\tFixedFee:   0.01,\n\t\t\t\t\tDailyLimit: 280,\n\t\t\t\t\tUnitPrice:  0,\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname:     \"DefaultConfig\",\n\t\t\tupdateFn: func(*Config) {},\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tconf := DefaultConfig()\n\t\t\ttt.updateFn(conf)\n\t\t\tif tt.expectedErr != nil {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, tt.expectedErr, err,\n\t\t\t\t\t\"Expected error not matched for test %d-%s, expected: %s, got: %s\", no, tt.name, tt.expectedErr, err)\n\t\t\t} else {\n\t\t\t\terr := conf.BasicCheck()\n\t\t\t\trequire.NoError(t, err, \"Expected no error for test %d-%s, get: %s\", no, tt.name, err)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "txpool/errors.go",
    "content": "package txpool\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n)\n\n// ConfigError is returned when the transaction pool configuration is invalid.\ntype ConfigError struct {\n\tReason string\n}\n\nfunc (e ConfigError) Error() string {\n\treturn e.Reason\n}\n\n// InvalidFeeError indicates that a transaction fee is below the required minimum.\ntype InvalidFeeError struct {\n\tMinimumFee amount.Amount\n}\n\nfunc (e InvalidFeeError) Error() string {\n\treturn fmt.Sprintf(\"transaction fee is below the minimum of %s\", e.MinimumFee)\n}\n"
  },
  {
    "path": "txpool/interface.go",
    "content": "package txpool\n\nimport (\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\n// Reader exposes read-only operations on the transaction pool.\ntype Reader interface {\n\tPrepareBlockTransactions() block.Txs\n\tPendingTx(txID tx.ID) *tx.Tx\n\tHasTx(txID tx.ID) bool\n\tSize() int\n\tEstimatedFee(amt amount.Amount, payloadType payload.Type) amount.Amount\n\tAllPendingTxs() []*tx.Tx\n}\n\n// TxPool defines the full transaction pool interface with read and write\n// operations.\ntype TxPool interface {\n\tReader\n\n\tSetNewSandboxAndRecheck(sbx sandbox.Sandbox)\n\tAppendTxAndBroadcast(trx *tx.Tx) error\n\tAppendTx(trx *tx.Tx) error\n\tHandleCommittedBlock(blk *block.Block)\n}\n"
  },
  {
    "path": "txpool/pool.go",
    "content": "package txpool\n\nimport (\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/linkedmap\"\n)\n\ntype pool struct {\n\tlist   *linkedmap.LinkedMap[tx.ID, *tx.Tx]\n\tminFee amount.Amount\n}\n\nfunc newPool(maxSize int, minFee amount.Amount) pool {\n\treturn pool{\n\t\tlist:   linkedmap.New[tx.ID, *tx.Tx](maxSize),\n\t\tminFee: minFee,\n\t}\n}\n\nfunc (p *pool) estimatedFee() amount.Amount {\n\treturn p.minFee\n}\n"
  },
  {
    "path": "txpool/txpool.go",
    "content": "package txpool\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/execution\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/store\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util/linkedlist\"\n\t\"github.com/pactus-project/pactus/util/linkedmap\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype txPool struct {\n\tlk sync.RWMutex\n\n\tconfig         *Config\n\tsbx            sandbox.Sandbox\n\tpools          map[payload.Type]pool\n\tconsumptionMap map[crypto.Address]int\n\tbroadcastPipe  pipeline.Pipeline[message.Message]\n\teventPipe      pipeline.Pipeline[any]\n\tstore          store.Reader\n\tlogger         *logger.SubLogger\n}\n\n// NewTxPool constructs a new transaction pool with sub-pools per transaction\n// type. The pool also maintains a consumption map for tracking per-address\n// daily byte usage.\nfunc NewTxPool(conf *Config, storeReader store.Reader,\n\tbroadcastPipe pipeline.Pipeline[message.Message],\n\teventPipe pipeline.Pipeline[any],\n) TxPool {\n\tpools := make(map[payload.Type]pool)\n\tpools[payload.TypeTransfer] = newPool(conf.transferPoolSize(), conf.fixedFee())\n\tpools[payload.TypeBond] = newPool(conf.bondPoolSize(), conf.fixedFee())\n\tpools[payload.TypeUnbond] = newPool(conf.unbondPoolSize(), 0)\n\tpools[payload.TypeWithdraw] = newPool(conf.withdrawPoolSize(), conf.fixedFee())\n\tpools[payload.TypeSortition] = newPool(conf.sortitionPoolSize(), 0)\n\tpools[payload.TypeBatchTransfer] = newPool(conf.batchTransferPoolSize(), conf.fixedFee())\n\n\tpool := &txPool{\n\t\tconfig:         conf,\n\t\tpools:          pools,\n\t\tconsumptionMap: make(map[crypto.Address]int),\n\t\tstore:          storeReader,\n\t\tbroadcastPipe:  broadcastPipe,\n\t\teventPipe:      eventPipe,\n\t}\n\n\tpool.logger = logger.NewSubLogger(\"_pool\", pool)\n\n\treturn pool\n}\n\n// SetNewSandboxAndRecheck updates the sandbox and rechecks all transactions,\n// removing transactions that are now invalid.\nfunc (p *txPool) SetNewSandboxAndRecheck(sbx sandbox.Sandbox) {\n\tp.lk.Lock()\n\tdefer p.lk.Unlock()\n\n\tp.sbx = sbx\n\tp.logger.Debug(\"set new sandbox\")\n\n\tvar next *linkedlist.Element[linkedmap.Pair[tx.ID, *tx.Tx]]\n\tfor _, pool := range p.pools {\n\t\tfor e := pool.list.HeadNode(); e != nil; e = next {\n\t\t\tnext = e.Next\n\t\t\ttrx := e.Data.Value\n\n\t\t\tif err := p.checkTx(trx); err != nil {\n\t\t\t\tp.logger.Debug(\"invalid transaction after rechecking\", \"id\", trx.ID())\n\t\t\t\tpool.list.Remove(trx.ID())\n\t\t\t}\n\t\t}\n\t}\n}\n\n// AppendTx validates the transaction and adds it to the transaction pool\n// without broadcasting it.\nfunc (p *txPool) AppendTx(trx *tx.Tx) error {\n\tp.lk.Lock()\n\tdefer p.lk.Unlock()\n\n\tif err := p.checkTx(trx); err != nil {\n\t\treturn err\n\t}\n\n\tif err := p.checkFee(trx); err != nil {\n\t\treturn err\n\t}\n\n\tp.appendTx(trx)\n\n\treturn nil\n}\n\n// AppendTxAndBroadcast validates the transaction, adds it to the transaction\n// pool if the fee is acceptable, and broadcasts it in any case.\nfunc (p *txPool) AppendTxAndBroadcast(trx *tx.Tx) error {\n\tp.lk.Lock()\n\tdefer p.lk.Unlock()\n\n\tif err := p.checkTx(trx); err != nil {\n\t\treturn err\n\t}\n\n\terr := p.checkFee(trx)\n\tif err == nil {\n\t\tp.appendTx(trx)\n\t}\n\n\tgo func(t *tx.Tx) {\n\t\tmsg := message.NewTransactionsMessage([]*tx.Tx{t})\n\t\tp.broadcastPipe.Send(msg)\n\t\tp.eventPipe.Send(t)\n\t}(trx)\n\n\treturn nil\n}\n\nfunc (p *txPool) appendTx(trx *tx.Tx) {\n\tpayloadType := trx.Payload().Type()\n\tpayloadPool := p.pools[payloadType]\n\n\tpayloadPool.list.PushBack(trx.ID(), trx)\n\tp.logger.Debug(\"transaction appended into pool\", \"trx\", trx)\n}\n\nfunc (p *txPool) checkFee(trx *tx.Tx) error {\n\tif !trx.IsFreeTx() {\n\t\tminFee := p.estimatedMinimumFee(trx)\n\n\t\tif trx.Fee() < minFee {\n\t\t\tp.logger.Warn(\"low fee transaction\", \"txs\", trx, \"minFee\", minFee)\n\n\t\t\treturn InvalidFeeError{\n\t\t\t\tMinimumFee: minFee,\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *txPool) checkTx(trx *tx.Tx) error {\n\tif err := trx.BasicCheck(); err != nil {\n\t\tp.logger.Debug(\"invalid transaction\", \"trx\", trx, \"error\", err)\n\n\t\treturn err\n\t}\n\n\tif err := execution.CheckAndExecute(trx, p.sbx, false); err != nil {\n\t\tp.logger.Debug(\"invalid transaction\", \"trx\", trx, \"error\", err)\n\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (p *txPool) EstimatedFee(_ amount.Amount, payloadType payload.Type) amount.Amount {\n\tselectedPool, ok := p.pools[payloadType]\n\tif !ok {\n\t\treturn 0\n\t}\n\n\treturn selectedPool.estimatedFee()\n}\n\nfunc (p *txPool) HandleCommittedBlock(blk *block.Block) {\n\tp.lk.Lock()\n\tdefer p.lk.Unlock()\n\n\tfor _, trx := range blk.Transactions() {\n\t\tp.removeTx(trx.ID())\n\t}\n\n\tif p.config.calculateConsumption() {\n\t\tp.increaseConsumption(blk)\n\t\tp.decreaseConsumption(blk.Height())\n\t}\n}\n\nfunc (p *txPool) increaseConsumption(blk *block.Block) {\n\t// The first transaction is always the subsidy transaction.\n\tfor _, trx := range blk.Transactions()[1:] {\n\t\tsigner := trx.Payload().Signer()\n\n\t\tp.consumptionMap[signer] += trx.SerializeSize()\n\t}\n}\n\nfunc (p *txPool) decreaseConsumption(curHeight types.Height) {\n\t// If height is less than or equal to ConsumptionWindow, nothing to do.\n\tif curHeight <= types.Height(p.config.ConsumptionWindow) {\n\t\treturn\n\t}\n\n\t// Calculate the block height that has passed out of the consumption window.\n\twindowedBlockHeight := curHeight.SafeDecrease(p.config.ConsumptionWindow)\n\tcommittedBlock, err := p.store.Block(windowedBlockHeight)\n\tif err != nil {\n\t\tp.logger.Error(\"failed to read block\", \"height\", windowedBlockHeight, \"err\", err)\n\n\t\treturn\n\t}\n\n\tblk, err := committedBlock.ToBlock()\n\tif err != nil {\n\t\tp.logger.Error(\"failed to parse block\", \"height\", windowedBlockHeight, \"err\", err)\n\n\t\treturn\n\t}\n\n\tfor _, trx := range blk.Transactions()[1:] {\n\t\tsigner := trx.Payload().Signer()\n\t\tif consumption, ok := p.consumptionMap[signer]; ok {\n\t\t\t// Decrease the consumption by the size of the transaction\n\t\t\tconsumption -= trx.SerializeSize()\n\n\t\t\tif consumption <= 0 {\n\t\t\t\t// If the new value is zero, remove the signer from the consumptionMap\n\t\t\t\tdelete(p.consumptionMap, signer)\n\t\t\t} else {\n\t\t\t\t// Otherwise, update the map with the new value\n\t\t\t\tp.consumptionMap[signer] = consumption\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (p *txPool) removeTx(txID tx.ID) {\n\tfor _, pool := range p.pools {\n\t\tif pool.list.Remove(txID) {\n\t\t\tbreak\n\t\t}\n\t}\n}\n\n// PendingTx searches the transaction pool and returns the associated\n// transaction. If it doesn't exist in the pool, it returns nil.\nfunc (p *txPool) PendingTx(txID tx.ID) *tx.Tx {\n\tp.lk.Lock()\n\tdefer p.lk.Unlock()\n\n\tfor _, pool := range p.pools {\n\t\tn := pool.list.GetNode(txID)\n\t\tif n != nil {\n\t\t\treturn n.Data.Value\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *txPool) PrepareBlockTransactions() block.Txs {\n\ttrxs := make([]*tx.Tx, 0, p.Size())\n\n\tp.lk.RLock()\n\tdefer p.lk.RUnlock()\n\n\t// Appending one sortition transaction\n\tpoolSortition := p.pools[payload.TypeSortition]\n\tfor n := poolSortition.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\t// Appending bond transactions\n\tpoolBond := p.pools[payload.TypeBond]\n\tfor n := poolBond.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\t// Appending unbond transactions\n\tpoolUnbond := p.pools[payload.TypeUnbond]\n\tfor n := poolUnbond.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\t// Appending withdraw transactions\n\tpoolWithdraw := p.pools[payload.TypeWithdraw]\n\tfor n := poolWithdraw.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\t// Appending transfer transactions\n\tpoolTransfer := p.pools[payload.TypeTransfer]\n\tfor n := poolTransfer.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\tpoolBatchTransfer := p.pools[payload.TypeBatchTransfer]\n\tfor n := poolBatchTransfer.list.HeadNode(); n != nil; n = n.Next {\n\t\ttrxs = append(trxs, n.Data.Value)\n\t}\n\n\treturn trxs\n}\n\nfunc (p *txPool) HasTx(txID tx.ID) bool {\n\tp.lk.RLock()\n\tdefer p.lk.RUnlock()\n\n\tfor _, pool := range p.pools {\n\t\tif pool.list.Has(txID) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc (p *txPool) Size() int {\n\tp.lk.RLock()\n\tdefer p.lk.RUnlock()\n\n\treturn p.size()\n}\n\nfunc (p *txPool) size() int {\n\tsize := 0\n\tfor _, pool := range p.pools {\n\t\tsize += pool.list.Size()\n\t}\n\n\treturn size\n}\n\nfunc (p *txPool) estimatedMinimumFee(trx *tx.Tx) amount.Amount {\n\treturn p.fixedFee() + p.consumptionalFee(trx)\n}\n\nfunc (p *txPool) fixedFee() amount.Amount {\n\treturn p.config.fixedFee()\n}\n\n// consumptionalFee calculates the dynamic fee based on the amount of data an\n// address consumes daily.\nfunc (p *txPool) consumptionalFee(trx *tx.Tx) amount.Amount {\n\tif !p.config.calculateConsumption() {\n\t\treturn 0\n\t}\n\n\tvar consumption int\n\tsigner := trx.Payload().Signer()\n\ttxSize := trx.SerializeSize()\n\n\tif !p.store.HasPublicKey(signer) {\n\t\tconsumption = p.config.Fee.DailyLimit\n\t} else {\n\t\tconsumption = p.consumptionMap[signer] + txSize + p.getPendingConsumption(signer)\n\t}\n\n\tcoefficient := consumption / p.config.Fee.DailyLimit\n\n\tconsumptionalFee, _ := amount.NewAmount(float64(coefficient) * float64(consumption) * p.config.Fee.UnitPrice)\n\n\treturn consumptionalFee\n}\n\nfunc (p *txPool) AllPendingTxs() []*tx.Tx {\n\tp.lk.RLock()\n\tdefer p.lk.RUnlock()\n\n\ttxs := make([]*tx.Tx, 0, p.size())\n\n\tvar next *linkedlist.Element[linkedmap.Pair[tx.ID, *tx.Tx]]\n\tfor _, pool := range p.pools {\n\t\tfor e := pool.list.HeadNode(); e != nil; e = next {\n\t\t\tnext = e.Next\n\t\t\ttrx := e.Data.Value\n\n\t\t\ttxs = append(txs, trx)\n\t\t}\n\t}\n\n\treturn txs\n}\n\nfunc (p *txPool) getPendingConsumption(signer crypto.Address) int {\n\ttotalSize := int(0)\n\n\t// TODO: big o is \"o(n * m)\"\n\tvar next *linkedlist.Element[linkedmap.Pair[tx.ID, *tx.Tx]]\n\tfor _, pool := range p.pools {\n\t\tfor e := pool.list.HeadNode(); e != nil; e = next {\n\t\t\tnext = e.Next\n\t\t\tif e.Data.Value.Payload().Signer() == signer {\n\t\t\t\ttotalSize += e.Data.Value.SerializeSize()\n\t\t\t}\n\t\t}\n\t}\n\n\treturn totalSize\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *txPool) LogString() string {\n\treturn fmt.Sprintf(\"{💸 %v💸 %v 🔐 %v 🔓 %v 🎯 %v 🧾 %v}\",\n\t\tp.pools[payload.TypeTransfer].list.Size(),\n\t\tp.pools[payload.TypeBatchTransfer].list.Size(),\n\t\tp.pools[payload.TypeBond].list.Size(),\n\t\tp.pools[payload.TypeUnbond].list.Size(),\n\t\tp.pools[payload.TypeSortition].list.Size(),\n\t\tp.pools[payload.TypeWithdraw].list.Size(),\n\t)\n}\n"
  },
  {
    "path": "txpool/txpool_mock.go",
    "content": "// Code generated by MockGen. DO NOT EDIT.\n// Source: txpool/interface.go\n//\n// Generated by this command:\n//\n//\tmockgen -source=txpool/interface.go -destination=txpool/txpool_mock.go -package=txpool\n//\n\n// Package txpool is a generated GoMock package.\npackage txpool\n\nimport (\n\treflect \"reflect\"\n\n\tsandbox \"github.com/pactus-project/pactus/sandbox\"\n\tamount \"github.com/pactus-project/pactus/types/amount\"\n\tblock \"github.com/pactus-project/pactus/types/block\"\n\ttx \"github.com/pactus-project/pactus/types/tx\"\n\tpayload \"github.com/pactus-project/pactus/types/tx/payload\"\n\tgomock \"go.uber.org/mock/gomock\"\n)\n\n// MockReader is a mock of Reader interface.\ntype MockReader struct {\n\tctrl     *gomock.Controller\n\trecorder *MockReaderMockRecorder\n\tisgomock struct{}\n}\n\n// MockReaderMockRecorder is the mock recorder for MockReader.\ntype MockReaderMockRecorder struct {\n\tmock *MockReader\n}\n\n// NewMockReader creates a new mock instance.\nfunc NewMockReader(ctrl *gomock.Controller) *MockReader {\n\tmock := &MockReader{ctrl: ctrl}\n\tmock.recorder = &MockReaderMockRecorder{mock}\n\treturn mock\n}\n\n// EXPECT returns an object that allows the caller to indicate expected use.\nfunc (m *MockReader) EXPECT() *MockReaderMockRecorder {\n\treturn m.recorder\n}\n\n// AllPendingTxs mocks base method.\nfunc (m *MockReader) AllPendingTxs() []*tx.Tx {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AllPendingTxs\")\n\tret0, _ := ret[0].([]*tx.Tx)\n\treturn ret0\n}\n\n// AllPendingTxs indicates an expected call of AllPendingTxs.\nfunc (mr *MockReaderMockRecorder) AllPendingTxs() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AllPendingTxs\", reflect.TypeOf((*MockReader)(nil).AllPendingTxs))\n}\n\n// EstimatedFee mocks base method.\nfunc (m *MockReader) EstimatedFee(amt amount.Amount, payloadType payload.Type) amount.Amount {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"EstimatedFee\", amt, payloadType)\n\tret0, _ := ret[0].(amount.Amount)\n\treturn ret0\n}\n\n// EstimatedFee indicates an expected call of EstimatedFee.\nfunc (mr *MockReaderMockRecorder) EstimatedFee(amt, payloadType any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"EstimatedFee\", reflect.TypeOf((*MockReader)(nil).EstimatedFee), amt, payloadType)\n}\n\n// HasTx mocks base method.\nfunc (m *MockReader) HasTx(txID tx.ID) bool {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"HasTx\", txID)\n\tret0, _ := ret[0].(bool)\n\treturn ret0\n}\n\n// HasTx indicates an expected call of HasTx.\nfunc (mr *MockReaderMockRecorder) HasTx(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"HasTx\", reflect.TypeOf((*MockReader)(nil).HasTx), txID)\n}\n\n// PendingTx mocks base method.\nfunc (m *MockReader) PendingTx(txID tx.ID) *tx.Tx {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"PendingTx\", txID)\n\tret0, _ := ret[0].(*tx.Tx)\n\treturn ret0\n}\n\n// PendingTx indicates an expected call of PendingTx.\nfunc (mr *MockReaderMockRecorder) PendingTx(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PendingTx\", reflect.TypeOf((*MockReader)(nil).PendingTx), txID)\n}\n\n// PrepareBlockTransactions mocks base method.\nfunc (m *MockReader) PrepareBlockTransactions() block.Txs {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"PrepareBlockTransactions\")\n\tret0, _ := ret[0].(block.Txs)\n\treturn ret0\n}\n\n// PrepareBlockTransactions indicates an expected call of PrepareBlockTransactions.\nfunc (mr *MockReaderMockRecorder) PrepareBlockTransactions() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PrepareBlockTransactions\", reflect.TypeOf((*MockReader)(nil).PrepareBlockTransactions))\n}\n\n// Size mocks base method.\nfunc (m *MockReader) Size() int {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Size\")\n\tret0, _ := ret[0].(int)\n\treturn ret0\n}\n\n// Size indicates an expected call of Size.\nfunc (mr *MockReaderMockRecorder) Size() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Size\", reflect.TypeOf((*MockReader)(nil).Size))\n}\n\n// MockTxPool is a mock of TxPool interface.\ntype MockTxPool struct {\n\tctrl     *gomock.Controller\n\trecorder *MockTxPoolMockRecorder\n\tisgomock struct{}\n}\n\n// MockTxPoolMockRecorder is the mock recorder for MockTxPool.\ntype MockTxPoolMockRecorder struct {\n\tmock *MockTxPool\n}\n\n// NewMockTxPool creates a new mock instance.\nfunc NewMockTxPool(ctrl *gomock.Controller) *MockTxPool {\n\tmock := &MockTxPool{ctrl: ctrl}\n\tmock.recorder = &MockTxPoolMockRecorder{mock}\n\treturn mock\n}\n\n// EXPECT returns an object that allows the caller to indicate expected use.\nfunc (m *MockTxPool) EXPECT() *MockTxPoolMockRecorder {\n\treturn m.recorder\n}\n\n// AllPendingTxs mocks base method.\nfunc (m *MockTxPool) AllPendingTxs() []*tx.Tx {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AllPendingTxs\")\n\tret0, _ := ret[0].([]*tx.Tx)\n\treturn ret0\n}\n\n// AllPendingTxs indicates an expected call of AllPendingTxs.\nfunc (mr *MockTxPoolMockRecorder) AllPendingTxs() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AllPendingTxs\", reflect.TypeOf((*MockTxPool)(nil).AllPendingTxs))\n}\n\n// AppendTx mocks base method.\nfunc (m *MockTxPool) AppendTx(trx *tx.Tx) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AppendTx\", trx)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// AppendTx indicates an expected call of AppendTx.\nfunc (mr *MockTxPoolMockRecorder) AppendTx(trx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AppendTx\", reflect.TypeOf((*MockTxPool)(nil).AppendTx), trx)\n}\n\n// AppendTxAndBroadcast mocks base method.\nfunc (m *MockTxPool) AppendTxAndBroadcast(trx *tx.Tx) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AppendTxAndBroadcast\", trx)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// AppendTxAndBroadcast indicates an expected call of AppendTxAndBroadcast.\nfunc (mr *MockTxPoolMockRecorder) AppendTxAndBroadcast(trx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AppendTxAndBroadcast\", reflect.TypeOf((*MockTxPool)(nil).AppendTxAndBroadcast), trx)\n}\n\n// EstimatedFee mocks base method.\nfunc (m *MockTxPool) EstimatedFee(amt amount.Amount, payloadType payload.Type) amount.Amount {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"EstimatedFee\", amt, payloadType)\n\tret0, _ := ret[0].(amount.Amount)\n\treturn ret0\n}\n\n// EstimatedFee indicates an expected call of EstimatedFee.\nfunc (mr *MockTxPoolMockRecorder) EstimatedFee(amt, payloadType any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"EstimatedFee\", reflect.TypeOf((*MockTxPool)(nil).EstimatedFee), amt, payloadType)\n}\n\n// HandleCommittedBlock mocks base method.\nfunc (m *MockTxPool) HandleCommittedBlock(blk *block.Block) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"HandleCommittedBlock\", blk)\n}\n\n// HandleCommittedBlock indicates an expected call of HandleCommittedBlock.\nfunc (mr *MockTxPoolMockRecorder) HandleCommittedBlock(blk any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"HandleCommittedBlock\", reflect.TypeOf((*MockTxPool)(nil).HandleCommittedBlock), blk)\n}\n\n// HasTx mocks base method.\nfunc (m *MockTxPool) HasTx(txID tx.ID) bool {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"HasTx\", txID)\n\tret0, _ := ret[0].(bool)\n\treturn ret0\n}\n\n// HasTx indicates an expected call of HasTx.\nfunc (mr *MockTxPoolMockRecorder) HasTx(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"HasTx\", reflect.TypeOf((*MockTxPool)(nil).HasTx), txID)\n}\n\n// PendingTx mocks base method.\nfunc (m *MockTxPool) PendingTx(txID tx.ID) *tx.Tx {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"PendingTx\", txID)\n\tret0, _ := ret[0].(*tx.Tx)\n\treturn ret0\n}\n\n// PendingTx indicates an expected call of PendingTx.\nfunc (mr *MockTxPoolMockRecorder) PendingTx(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PendingTx\", reflect.TypeOf((*MockTxPool)(nil).PendingTx), txID)\n}\n\n// PrepareBlockTransactions mocks base method.\nfunc (m *MockTxPool) PrepareBlockTransactions() block.Txs {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"PrepareBlockTransactions\")\n\tret0, _ := ret[0].(block.Txs)\n\treturn ret0\n}\n\n// PrepareBlockTransactions indicates an expected call of PrepareBlockTransactions.\nfunc (mr *MockTxPoolMockRecorder) PrepareBlockTransactions() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PrepareBlockTransactions\", reflect.TypeOf((*MockTxPool)(nil).PrepareBlockTransactions))\n}\n\n// SetNewSandboxAndRecheck mocks base method.\nfunc (m *MockTxPool) SetNewSandboxAndRecheck(sbx sandbox.Sandbox) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"SetNewSandboxAndRecheck\", sbx)\n}\n\n// SetNewSandboxAndRecheck indicates an expected call of SetNewSandboxAndRecheck.\nfunc (mr *MockTxPoolMockRecorder) SetNewSandboxAndRecheck(sbx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SetNewSandboxAndRecheck\", reflect.TypeOf((*MockTxPool)(nil).SetNewSandboxAndRecheck), sbx)\n}\n\n// Size mocks base method.\nfunc (m *MockTxPool) Size() int {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Size\")\n\tret0, _ := ret[0].(int)\n\treturn ret0\n}\n\n// Size indicates an expected call of Size.\nfunc (mr *MockTxPoolMockRecorder) Size() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Size\", reflect.TypeOf((*MockTxPool)(nil).Size))\n}\n"
  },
  {
    "path": "txpool/txpool_test.go",
    "content": "package txpool\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/execution\"\n\t\"github.com/pactus-project/pactus/execution/executor\"\n\t\"github.com/pactus-project/pactus/sandbox\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tpool          *txPool\n\tsbx           *sandbox.MockSandbox\n\tbroadcastPipe pipeline.Pipeline[message.Message]\n\teventPipe     pipeline.Pipeline[any]\n}\n\nfunc testDefaultConfig() *Config {\n\treturn DefaultConfig()\n}\n\nfunc testConsumptionalConfig() *Config {\n\treturn &Config{\n\t\tMaxSize:           10,\n\t\tConsumptionWindow: 3,\n\t\tFee: &FeeConfig{\n\t\t\tFixedFee:   0,\n\t\t\tDailyLimit: 360,\n\t\t\tUnitPrice:  0.000005,\n\t\t},\n\t}\n}\n\nfunc setup(t *testing.T, cfg *Config) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuiteFromSeed(t, 1776497511988844581)\n\n\tbroadcastPipe := pipeline.New[message.Message](t.Context())\n\teventPipe := pipeline.New[any](t.Context())\n\tsbx := sandbox.MockingSandbox(ts)\n\tconfig := testDefaultConfig()\n\tif cfg != nil {\n\t\tconfig = cfg\n\t}\n\tpoolInt := NewTxPool(config, sbx.TestStore, broadcastPipe, eventPipe)\n\tpoolInt.SetNewSandboxAndRecheck(sbx)\n\tpool := poolInt.(*txPool)\n\tassert.NotNil(t, pool)\n\n\tsbx.TestAcceptSortition = true\n\n\trandHeight := ts.RandHeight(\n\t\ttestsuite.HeightWithMin(sbx.TestParams.UnbondInterval))\n\t_ = sbx.TestStore.AddTestBlock(randHeight)\n\n\treturn &testData{\n\t\tTestSuite:     ts,\n\t\tpool:          pool,\n\t\tsbx:           sbx,\n\t\tbroadcastPipe: broadcastPipe,\n\t\teventPipe:     eventPipe,\n\t}\n}\n\nfunc (td *testData) shouldPublishTransaction(t *testing.T, txID tx.ID) {\n\tt.Helper()\n\n\ttimer := time.NewTimer(1 * time.Second)\n\n\tfor {\n\t\tselect {\n\t\tcase <-timer.C:\n\t\t\trequire.Fail(t, \"Publish transaction timeout\")\n\n\t\t\treturn\n\n\t\tcase msg := <-td.broadcastPipe.UnsafeGetChannel():\n\t\t\tlogger.Info(\"shouldPublishTransaction\", \"msg\", msg)\n\n\t\t\tif msg.Type() == message.TypeTransaction {\n\t\t\t\tm := msg.(*message.TransactionsMessage)\n\t\t\t\tassert.Equal(t, txID, m.Transactions[0].ID())\n\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\n// makeValidTransferTx makes a valid Transfer transaction for testing purpose.\nfunc (td *testData) makeValidTransferTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestTransferTx(opts...)\n\tsigner := trx.Payload().Signer()\n\n\tacc := td.sbx.MakeNewAccount(signer)\n\tacc.AddToBalance(trx.Payload().Value() + trx.Fee())\n\ttd.sbx.UpdateAccount(signer, acc)\n\n\treturn trx\n}\n\n// makeValidBatchTransferTx make a valid Batch transfer transaction for test purpose.\nfunc (td *testData) makeValidBatchTransferTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestBatchTransferTx(opts...)\n\tsigner := trx.Payload().Signer()\n\n\tacc := td.sbx.MakeNewAccount(signer)\n\tacc.AddToBalance(trx.Payload().Value() + trx.Fee())\n\ttd.sbx.UpdateAccount(signer, acc)\n\n\treturn trx\n}\n\n// makeValidSubsidyTx make a valid Batch transfer transaction for test purpose.\nfunc (td *testData) makeValidSubsidyTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\n\treturn td.GenerateTestSubsidyTx(opts...)\n}\n\n// makeValidBondTx makes a valid Bond transaction for testing purpose.\nfunc (td *testData) makeValidBondTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestBondTx(opts...)\n\tsigner := trx.Payload().Signer()\n\n\tacc := td.sbx.MakeNewAccount(signer)\n\tacc.AddToBalance(trx.Payload().Value() + trx.Fee())\n\ttd.sbx.UpdateAccount(signer, acc)\n\n\treturn trx\n}\n\n// makeValidUnbondTx makes a valid Unbond transaction for testing purpose.\n// Ensure that the signer key is set through the opts.\nfunc (td *testData) makeValidUnbondTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestUnbondTx(opts...)\n\n\tvalidatorPublicKey := trx.PublicKey().(*bls.PublicKey)\n\tval := td.sbx.MakeNewValidator(validatorPublicKey)\n\ttd.sbx.UpdateValidator(val)\n\n\treturn trx\n}\n\n// makeValidWithdrawTx makes a valid Withdraw transaction for testing purpose.\n// Ensure that the signer key is set through the opts.\nfunc (td *testData) makeValidWithdrawTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestWithdrawTx(opts...)\n\n\tvalidatorPublicKey := trx.PublicKey().(*bls.PublicKey)\n\tval := td.sbx.MakeNewValidator(validatorPublicKey)\n\tval.AddToStake(trx.Payload().Value() + trx.Fee())\n\tval.UpdateUnbondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.TestParams.UnbondInterval + 1))\n\ttd.sbx.UpdateValidator(val)\n\n\treturn trx\n}\n\n// makeValidSortitionTx makes a valid Sortition transaction for testing purpose.\n// Ensure that the signer key is set through the opts.\nfunc (td *testData) makeValidSortitionTx(opts ...testsuite.TransactionMakerOption) *tx.Tx {\n\topts = util.Prepend(opts, testsuite.TransactionWithLockTime(td.sbx.CurrentHeight()))\n\ttrx := td.GenerateTestSortitionTx(opts...)\n\n\tvalidatorPublicKey := trx.PublicKey().(*bls.PublicKey)\n\tval := td.sbx.MakeNewValidator(validatorPublicKey)\n\tval.UpdateLastBondingHeight(td.sbx.CurrentHeight().SafeDecrease(td.sbx.TestParams.BondInterval + 1))\n\ttd.sbx.UpdateValidator(val)\n\n\treturn trx\n}\n\nfunc TestAppendAndRemove(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrx := td.makeValidTransferTx()\n\n\trequire.NoError(t, td.pool.AppendTx(trx))\n\tassert.True(t, td.pool.HasTx(trx.ID()))\n\tassert.Equal(t, trx, td.pool.PendingTx(trx.ID()))\n\n\ttd.pool.removeTx(trx.ID())\n\tassert.False(t, td.pool.HasTx(trx.ID()), \"Transaction should be removed\")\n\tassert.Nil(t, td.pool.PendingTx(trx.ID()))\n}\n\nfunc TestAppendSameTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrx := td.makeValidTransferTx()\n\n\terr := td.pool.AppendTx(trx)\n\trequire.NoError(t, err)\n\n\terr = td.pool.AppendTx(trx)\n\trequire.ErrorIs(t, err, execution.TransactionCommittedError{ID: trx.ID()})\n}\n\nfunc TestDisableConsumption(t *testing.T) {\n\ttd := setup(t, testDefaultConfig())\n\n\ttrx := td.GenerateTestTransferTx()\n\tassert.Zero(t, td.pool.consumptionalFee(trx))\n}\n\nfunc TestCalculatingConsumption(t *testing.T) {\n\ttd := setup(t, testConsumptionalConfig())\n\n\t// Generate keys for different transaction signers\n\t_, prv1 := td.RandEd25519KeyPair()\n\tpub2, prv2 := td.RandEd25519KeyPair()\n\tpub3, prv3 := td.RandBLSKeyPair()\n\tpub4, prv4 := td.RandBLSKeyPair()\n\n\t// Generate different types of transactions\n\ttrx10 := td.makeValidSubsidyTx()\n\ttrx11 := td.makeValidTransferTx(testsuite.TransactionWithSigner(prv1))\n\ttrx12 := td.makeValidBondTx(testsuite.TransactionWithSigner(prv2))\n\ttrx13 := td.makeValidUnbondTx(testsuite.TransactionWithSigner(prv4))\n\ttrx20 := td.makeValidSubsidyTx()\n\ttrx21 := td.makeValidTransferTx(testsuite.TransactionWithSigner(prv1))\n\ttrx30 := td.makeValidSubsidyTx()\n\ttrx31 := td.makeValidBondTx(testsuite.TransactionWithSigner(prv3))\n\ttrx32 := td.makeValidSortitionTx(testsuite.TransactionWithSigner(prv4))\n\ttrx40 := td.makeValidSubsidyTx()\n\ttrx41 := td.makeValidUnbondTx(testsuite.TransactionWithSigner(prv3))\n\ttrx42 := td.makeValidTransferTx(testsuite.TransactionWithSigner(prv2))\n\ttrx50 := td.makeValidSubsidyTx()\n\ttrx51 := td.makeValidWithdrawTx(testsuite.TransactionWithSigner(prv3))\n\ttrx52 := td.makeValidTransferTx(testsuite.TransactionWithSigner(prv2))\n\ttrx53 := td.makeValidBatchTransferTx(testsuite.TransactionWithSigner(prv2))\n\n\t// Commit the first block\n\tblk1, cert1 := td.GenerateTestBlock(1,\n\t\ttestsuite.BlockWithTransactions([]*tx.Tx{trx10, trx11, trx12, trx13}))\n\ttd.sbx.TestStore.SaveBlock(blk1, cert1)\n\n\t// Expected consumption map after transactions\n\tdiff2 := 0\n\tif trx42.SerializeSize() > trx12.SerializeSize() {\n\t\tdiff2 = trx42.SerializeSize() - trx12.SerializeSize()\n\t}\n\n\texpected := map[crypto.Address]int{\n\t\tpub2.AccountAddress():   trx52.SerializeSize() + trx53.SerializeSize() + diff2,\n\t\tpub3.AccountAddress():   trx31.SerializeSize(),\n\t\tpub3.ValidatorAddress(): trx41.SerializeSize() + trx51.SerializeSize(),\n\t\tpub4.ValidatorAddress(): trx32.SerializeSize() - trx13.SerializeSize(),\n\t}\n\n\ttests := []struct {\n\t\theight types.Height\n\t\ttxs    []*tx.Tx\n\t}{\n\t\t{2, []*tx.Tx{trx20, trx21}},\n\t\t{3, []*tx.Tx{trx30, trx31, trx32}},\n\t\t{4, []*tx.Tx{trx40, trx41, trx42}},\n\t\t{5, []*tx.Tx{trx50, trx51, trx52, trx53}},\n\t}\n\n\tfor _, tt := range tests {\n\t\t// Generate a block with the transactions for the given height\n\t\tblk, cert := td.GenerateTestBlock(tt.height, testsuite.BlockWithTransactions(tt.txs))\n\t\ttd.sbx.TestStore.SaveBlock(blk, cert)\n\n\t\t// Handle the block in the transaction pool\n\t\ttd.pool.HandleCommittedBlock(blk)\n\n\t\tt.Logf(\"consumption Map: %v\\n\", td.pool.consumptionMap)\n\t}\n\n\trequire.Equal(t, expected, td.pool.consumptionMap)\n}\n\nfunc TestEstimatedConsumptionalFee(t *testing.T) {\n\ttd := setup(t, testConsumptionalConfig())\n\n\tt.Run(\"Test indexed signer\", func(t *testing.T) {\n\t\t_, accPrv := td.RandEd25519KeyPair()\n\t\ttrx := td.makeValidTransferTx(testsuite.TransactionWithSigner(accPrv))\n\t\tblk, cert := td.GenerateTestBlock(td.RandHeight(), testsuite.BlockWithTransactions([]*tx.Tx{trx}))\n\t\ttd.sbx.TestStore.SaveBlock(blk, cert)\n\n\t\ttests := []struct {\n\t\t\tfee     amount.Amount\n\t\t\twithErr bool\n\t\t}{\n\t\t\t{0, false},\n\t\t\t{0, false},\n\t\t\t{2_310_000, false},\n\t\t\t{3_090_000, false},\n\t\t\t{7_740_000, false},\n\t\t\t{9_300_000, false},\n\t\t\t{0, true},\n\t\t}\n\n\t\tfor _, tt := range tests {\n\t\t\ttestTrx := td.makeValidTransferTx(\n\t\t\t\ttestsuite.TransactionWithSigner(accPrv),\n\t\t\t\ttestsuite.TransactionWithFee(tt.fee))\n\n\t\t\terr := td.pool.AppendTx(testTrx)\n\t\t\tif tt.withErr {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t}\n\t\t}\n\t})\n\n\tt.Run(\"Test non-indexed signer\", func(t *testing.T) {\n\t\ttrx := td.makeValidTransferTx(testsuite.TransactionWithFee(0))\n\n\t\terr := td.pool.AppendTx(trx)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestAppendInvalidTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tt.Run(\"basic check error\", func(t *testing.T) {\n\t\ttrx := td.makeValidTransferTx()\n\t\ttrx.SetSignature(nil)\n\n\t\terr := td.pool.AppendTx(trx)\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"no signature\",\n\t\t})\n\t})\n\n\tt.Run(\"execution error\", func(t *testing.T) {\n\t\tinvTrx := td.GenerateTestTransferTx()\n\n\t\terr := td.pool.AppendTx(invTrx)\n\t\trequire.ErrorIs(t, err, executor.AccountNotFoundError{\n\t\t\tAddress: invTrx.Payload().Signer(),\n\t\t})\n\t})\n}\n\n// TestFullPool tests if the pool prunes the old transactions when it is full.\nfunc TestFullPool(t *testing.T) {\n\tconf := testDefaultConfig()\n\tconf.MaxSize = 10\n\ttd := setup(t, conf)\n\n\ttrxs := make([]*tx.Tx, td.pool.config.transferPoolSize()+1)\n\n\t// Make sure the pool is empty\n\tassert.Equal(t, 0, td.pool.Size())\n\n\tfor i := 0; i < len(trxs); i++ {\n\t\ttrx := td.makeValidTransferTx()\n\n\t\trequire.NoError(t, td.pool.AppendTx(trx))\n\t\ttrxs[i] = trx\n\t}\n\n\tassert.False(t, td.pool.HasTx(trxs[0].ID()))\n\tassert.True(t, td.pool.HasTx(trxs[1].ID()))\n\tassert.Equal(t, td.pool.config.transferPoolSize(), td.pool.Size())\n}\n\nfunc TestEmptyPool(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrxs := td.pool.AllPendingTxs()\n\tassert.Empty(t, trxs, \"pool should be empty\")\n}\n\nfunc TestPrepareBlockTransactions(t *testing.T) {\n\ttd := setup(t, nil)\n\n\tpub1, _ := td.RandBLSKeyPair()\n\t_, prv2 := td.RandBLSKeyPair()\n\t_, prv3 := td.RandBLSKeyPair()\n\t_, prv4 := td.RandBLSKeyPair()\n\t_, prv5 := td.RandBLSKeyPair()\n\n\ttransferTx := td.makeValidTransferTx()\n\tbondTx := td.makeValidBondTx(testsuite.TransactionWithValidatorPublicKey(pub1))\n\tunbondTx := td.makeValidUnbondTx(testsuite.TransactionWithSigner(prv2))\n\twithdrawTx := td.makeValidWithdrawTx(testsuite.TransactionWithSigner(prv3))\n\tsortitionTx := td.makeValidSortitionTx(testsuite.TransactionWithSigner(prv4))\n\tbatchTransferTx := td.makeValidBatchTransferTx(testsuite.TransactionWithSigner(prv5))\n\n\trequire.NoError(t, td.pool.AppendTx(transferTx))\n\trequire.NoError(t, td.pool.AppendTx(unbondTx))\n\trequire.NoError(t, td.pool.AppendTx(withdrawTx))\n\trequire.NoError(t, td.pool.AppendTx(bondTx))\n\trequire.NoError(t, td.pool.AppendTx(sortitionTx))\n\trequire.NoError(t, td.pool.AppendTx(batchTransferTx))\n\n\ttrxs := td.pool.PrepareBlockTransactions()\n\tassert.Len(t, trxs, 6)\n\tassert.Equal(t, sortitionTx.ID(), trxs[0].ID())\n\tassert.Equal(t, bondTx.ID(), trxs[1].ID())\n\tassert.Equal(t, unbondTx.ID(), trxs[2].ID())\n\tassert.Equal(t, withdrawTx.ID(), trxs[3].ID())\n\tassert.Equal(t, transferTx.ID(), trxs[4].ID())\n\tassert.Equal(t, batchTransferTx.ID(), trxs[5].ID())\n}\n\nfunc TestAddSubsidyTransactions(t *testing.T) {\n\tt.Run(\"invalid transaction: Should return error\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\trandHeight := td.RandHeight()\n\t\ttd.sbx.TestStore.AddTestBlock(randHeight)\n\t\ttrx := td.makeValidSubsidyTx(testsuite.TransactionWithLockTime(randHeight))\n\n\t\terr := td.pool.AppendTx(trx)\n\t\trequire.ErrorIs(t, err, execution.LockTimeExpiredError{\n\t\t\tLockTime: randHeight,\n\t\t})\n\t})\n\n\tt.Run(\"valid transaction: Should add it to the pool\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\trandHeight := td.RandHeight()\n\t\ttd.sbx.TestStore.AddTestBlock(randHeight)\n\t\ttrx := td.makeValidSubsidyTx(testsuite.TransactionWithLockTime(randHeight + 1))\n\n\t\terr := td.pool.AppendTx(trx)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestRecheckTransactions(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrx := td.makeValidSubsidyTx()\n\n\terr := td.pool.AppendTx(trx)\n\trequire.NoError(t, err)\n\tassert.Equal(t, 1, td.pool.Size())\n\n\ttd.pool.SetNewSandboxAndRecheck(td.sbx)\n\tassert.Equal(t, 0, td.pool.Size())\n}\n\nfunc TestAppendAndBroadcast(t *testing.T) {\n\tt.Run(\"Invalid transaction: Should return error\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\tinvTrx := td.GenerateTestTransferTx()\n\t\trequire.Error(t, td.pool.AppendTxAndBroadcast(invTrx))\n\t})\n\n\tt.Run(\"Valid transaction with valid fee: Should add to pool and broadcast\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\ttrx := td.makeValidTransferTx()\n\n\t\terr := td.pool.AppendTxAndBroadcast(trx)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, 1, td.pool.Size())\n\t\ttd.shouldPublishTransaction(t, trx.ID())\n\t})\n\n\tt.Run(\"Valid transaction with zero fee: Should broadcast but not add to the pool\", func(t *testing.T) {\n\t\ttd := setup(t, nil)\n\n\t\ttrx := td.makeValidTransferTx(testsuite.TransactionWithFee(0))\n\n\t\terr := td.pool.AppendTxAndBroadcast(trx)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Zero(t, td.pool.Size())\n\t\ttd.shouldPublishTransaction(t, trx.ID())\n\t})\n}\n\nfunc TestAllPendingTxs(t *testing.T) {\n\ttd := setup(t, nil)\n\n\ttrxs := td.pool.AllPendingTxs()\n\tassert.Empty(t, trxs, \"%+v\", 0)\n\n\tpub1, _ := td.RandBLSKeyPair()\n\t_, prv2 := td.RandBLSKeyPair()\n\n\ttransferTx := td.makeValidTransferTx()\n\tbondTx := td.makeValidBondTx(testsuite.TransactionWithValidatorPublicKey(pub1))\n\tunbondTx := td.makeValidUnbondTx()\n\twithdrawTx := td.makeValidWithdrawTx()\n\tsortitionTx := td.makeValidSortitionTx(testsuite.TransactionWithSigner(prv2))\n\tbatchTransferTx := td.makeValidBatchTransferTx()\n\n\trequire.NoError(t, td.pool.AppendTx(transferTx))\n\trequire.NoError(t, td.pool.AppendTx(bondTx))\n\trequire.NoError(t, td.pool.AppendTx(unbondTx))\n\trequire.NoError(t, td.pool.AppendTx(withdrawTx))\n\trequire.NoError(t, td.pool.AppendTx(sortitionTx))\n\trequire.NoError(t, td.pool.AppendTx(batchTransferTx))\n\n\ttrxs = td.pool.AllPendingTxs()\n\tassert.Len(t, trxs, 6)\n}\n\nfunc TestEstimatedFee(t *testing.T) {\n\ttd := setup(t, nil)\n\n\testimatedFee := td.pool.EstimatedFee(td.RandAmount(), payload.TypeTransfer)\n\tassert.Equal(t, td.pool.config.fixedFee(), estimatedFee)\n}\n"
  },
  {
    "path": "types/account/account.go",
    "content": "// Package account provides functionality for managing account information.\npackage account\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\n// The Account struct represents an account object.\ntype Account struct {\n\tdata accountData\n}\n\n// accountData contains the data associated with an account.\ntype accountData struct {\n\tNumber  int32\n\tBalance amount.Amount\n}\n\n// NewAccount constructs a new account from the given number.\nfunc NewAccount(number int32) *Account {\n\treturn &Account{\n\t\tdata: accountData{\n\t\t\tNumber: number,\n\t\t},\n\t}\n}\n\n// FromBytes constructs a new account from raw byte data.\nfunc FromBytes(data []byte) (*Account, error) {\n\tacc := new(Account)\n\tr := bytes.NewReader(data)\n\terr := encoding.ReadElements(r,\n\t\t&acc.data.Number,\n\t\t&acc.data.Balance)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn acc, nil\n}\n\n// Number returns the number of the account.\nfunc (acc Account) Number() int32 {\n\treturn acc.data.Number\n}\n\n// Balance returns the balance of the account.\nfunc (acc Account) Balance() amount.Amount {\n\treturn acc.data.Balance\n}\n\n// SubtractFromBalance subtracts the given amount from the account's balance.\nfunc (acc *Account) SubtractFromBalance(amt amount.Amount) {\n\tacc.data.Balance -= amt\n}\n\n// AddToBalance adds the given amount to the account's balance.\nfunc (acc *Account) AddToBalance(amt amount.Amount) {\n\tacc.data.Balance += amt\n}\n\n// Hash calculates and returns the hash of the account.\nfunc (acc *Account) Hash() hash.Hash {\n\tbs, err := acc.Bytes()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn hash.CalcHash(bs)\n}\n\n// SerializeSize returns the size in bytes required to serialize the account.\nfunc (*Account) SerializeSize() int {\n\treturn 12 // 4+8\n}\n\n// Bytes returns the serialized byte representation of the account.\nfunc (acc *Account) Bytes() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, acc.SerializeSize()))\n\terr := encoding.WriteElements(buf,\n\t\tacc.data.Number,\n\t\tacc.data.Balance)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf.Bytes(), nil\n}\n\n// Clone creates a deep copy of the account.\nfunc (acc *Account) Clone() *Account {\n\tcloned := new(Account)\n\t*cloned = *acc\n\n\treturn cloned\n}\n"
  },
  {
    "path": "types/account/account_test.go",
    "content": "package account_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestFromBytes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tacc, _ := ts.GenerateTestAccount()\n\tbs, err := acc.Bytes()\n\trequire.NoError(t, err)\n\trequire.Equal(t, len(bs), acc.SerializeSize())\n\tacc2, err := account.FromBytes(bs)\n\trequire.NoError(t, err)\n\tassert.Equal(t, acc, acc2)\n\n\t_, err = account.FromBytes([]byte(\"asdfghjkl\"))\n\trequire.Error(t, err)\n}\n\nfunc TestDecoding(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"01000000\" + // number\n\t\t\t\"0200000000000000\") // balance\n\n\tacc, err := account.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, int32(1), acc.Number())\n\tassert.Equal(t, amount.Amount(2), acc.Balance())\n\taccData, _ := acc.Bytes()\n\tassert.Equal(t, data, accData)\n\tassert.Equal(t, hash.CalcHash(data), acc.Hash())\n\texpected, _ := hash.FromString(\"c3b75f08e64a66cb980fdc03c3a0b78635a7b1db049096e8bbbd9a2873f3071a\")\n\tassert.Equal(t, expected, acc.Hash())\n\tassert.Equal(t, len(data), acc.SerializeSize())\n}\n\nfunc TestAddToBalance(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tacc, _ := ts.GenerateTestAccount()\n\tbal := acc.Balance()\n\tacc.AddToBalance(1)\n\tassert.Equal(t, bal+1, acc.Balance())\n}\n\nfunc TestSubtractFromBalance(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tacc, _ := ts.GenerateTestAccount()\n\tbal := acc.Balance()\n\tacc.SubtractFromBalance(1)\n\tassert.Equal(t, bal-1, acc.Balance())\n}\n\nfunc TestClone(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tacc, _ := ts.GenerateTestAccount()\n\tcloned := acc.Clone()\n\tcloned.AddToBalance(1)\n\n\tassert.Equal(t, acc.Number(), cloned.Number())\n\tassert.NotEqual(t, acc.Balance(), cloned.Balance())\n}\n"
  },
  {
    "path": "types/amount/amount.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage amount\n\nimport (\n\t\"database/sql/driver\"\n\t\"errors\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/util\"\n)\n\nconst (\n\t// NanoPACPerPAC is the number of NanoPAC in one PAC.\n\tNanoPACPerPAC = 1e9\n\n\t// MaxNanoPAC is the maximum transaction amount allowed in NanoPAC.\n\tMaxNanoPAC = 42e6 * NanoPACPerPAC\n)\n\n// Unit describes a method of converting an Amount to something\n// other than the base unit of PAC.  The value of the Unit\n// is the exponent component of the decimal multiple to convert from\n// an amount in PAC to an amount counted in units.\ntype Unit int\n\n// These constants define various units used when describing a Pactus\n// monetary amount.\nconst (\n\tUnitMegaPAC  Unit = 6\n\tUnitKiloPAC  Unit = 3\n\tUnitPAC      Unit = 0\n\tUnitMilliPAC Unit = -3\n\tUnitMicroPAC Unit = -6\n\tUnitNanoPAC  Unit = -9\n)\n\n// String returns the unit as a string.  For recognized units, the SI\n// prefix is used, or \"NanoPAC\" for the base unit.  For all unrecognized\n// units, \"1eN PAC\" is returned, where N is the Unit.\nfunc (u Unit) String() string {\n\tswitch u {\n\tcase UnitMegaPAC:\n\t\treturn \"MPAC\"\n\tcase UnitKiloPAC:\n\t\treturn \"kPAC\"\n\tcase UnitPAC:\n\t\treturn \"PAC\"\n\tcase UnitMilliPAC:\n\t\treturn \"mPAC\"\n\tcase UnitMicroPAC:\n\t\treturn \"μPAC\"\n\tcase UnitNanoPAC:\n\t\treturn \"NanoPAC\"\n\tdefault:\n\t\treturn \"1e\" + strconv.FormatInt(int64(u), 10) + \" PAC\"\n\t}\n}\n\n// Amount represents the atomic unit in Pactus blockchain.\n// Each unit equals 1e-9 of a PAC.\ntype Amount int64\n\n// round converts a floating point number, which may or may not be representable\n// as an integer, to the Amount integer type by rounding to the nearest integer.\n// This is performed by adding or subtracting 0.5 depending on the sign, and\n// relying on integer truncation to round the value to the nearest Amount.\nfunc round(f float64) Amount {\n\tif f < 0 {\n\t\treturn Amount(f - 0.5)\n\t}\n\n\treturn Amount(f + 0.5)\n}\n\n// NewAmount creates an Amount from a floating-point value representing\n// an amount in PAC.  NewAmount returns an error if f is NaN or +-Infinity,\n// but it does not check whether the amount is within the total amount of PAC\n// producible, as it may not refer to an amount at a single moment in time.\n//\n// NewAmount is specifically for converting PAC to NanoPAC.\n// For creating a new Amount with an int64 value which denotes a quantity of NanoPAC,\n// do a simple type conversion from type int64 to Amount.\nfunc NewAmount(pac float64) (Amount, error) {\n\t// The amount is only considered invalid if it cannot be represented\n\t// as an integer type. This may happen if f is NaN or +-Infinity.\n\tswitch {\n\tcase math.IsNaN(pac),\n\t\tmath.IsInf(pac, 1),\n\t\tmath.IsInf(pac, -1):\n\t\treturn 0, errors.New(\"invalid PAC amount\")\n\t}\n\n\treturn round(pac * float64(NanoPACPerPAC)), nil\n}\n\n// FromString parses a string representing a value in PAC.\n// It then uses NewAmount to create an Amount based on the parsed\n// floating-point value.\n// If the parsing of the string fails, it returns an error.\n// TODO: Parse Unit and remove delimiters...\nfunc FromString(str string) (Amount, error) {\n\tstr = strings.Replace(str, \"PAC\", \"\", 1)\n\tstr = strings.TrimSpace(str)\n\tf, err := strconv.ParseFloat(str, 64)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn NewAmount(f)\n}\n\n// ToUnit converts a monetary amount counted in NanoPAC (base units) to a\n// floating-point value representing an amount in the specified unit.\nfunc (a Amount) ToUnit(u Unit) float64 {\n\treturn float64(a) / math.Pow10(int(u+9))\n}\n\n// ToPAC is equivalent to calling ToUnit with UnitPAC.\nfunc (a Amount) ToPAC() float64 {\n\treturn a.ToUnit(UnitPAC)\n}\n\n// ToNanoPAC returns the amount of NanoPAC (atomic units) as a 64-bit integer.\nfunc (a Amount) ToNanoPAC() int64 {\n\treturn int64(a)\n}\n\n// formatOptions holds options for formatting amounts.\ntype formatOptions struct {\n\tunit           Unit\n\tWithUnit       bool\n\twithDelimiters bool\n}\n\n// FormatOption is a function that configures formatting options.\ntype FormatOption func(*formatOptions)\n\n// WithUnit sets the unit for formatting.\nfunc WithUnit(u Unit) FormatOption {\n\treturn func(opts *formatOptions) {\n\t\topts.unit = u\n\t\topts.WithUnit = true\n\t}\n}\n\n// WithDelimiters enables delimiter formatting (e.g., \"1,234.56\").\nfunc WithDelimiters() FormatOption {\n\treturn func(opts *formatOptions) {\n\t\topts.withDelimiters = true\n\t}\n}\n\n// Format formats a monetary amount counted in Pactus base units as a\n// string for a given unit.  The conversion will succeed for any unit,\n// however, known units will be formatted with an appended label describing\n// the units with SI notation, and \"NanoPAC\" for the base unit.\n//\n// Format accepts options:\n//   - WithUnit(u Unit): sets the unit for formatting (defaults to no unit)\n//   - WithDelimiters(): enables comma delimiters in the formatted number (defaults to false)\nfunc (a Amount) Format(opts ...FormatOption) string {\n\toptions := &formatOptions{}\n\n\t// Apply options\n\tfor _, opt := range opts {\n\t\topt(options)\n\t}\n\n\tprecision := -int(options.unit + 9)\n\tvalue := a.ToUnit(options.unit)\n\n\tvar formatted string\n\tif options.withDelimiters {\n\t\tformatted = util.FormatFloatWithDelimiters(value, precision)\n\t} else {\n\t\tformatted = strconv.FormatFloat(value, 'f', precision, 64)\n\t}\n\n\tif options.WithUnit {\n\t\tformatted += \" \" + options.unit.String()\n\t}\n\n\treturn formatted\n}\n\n// String is the equivalent of calling Format with UnitPAC.\nfunc (a Amount) String() string {\n\treturn a.Format(WithUnit(UnitPAC), WithDelimiters())\n}\n\n// MulF64 multiplies an Amount by a floating point value.\nfunc (a Amount) MulF64(f float64) Amount {\n\treturn round(float64(a) * f)\n}\n\n// Scan implements the sql.Scanner interface for SQL database operations.\n// It accepts int64 values representing NanoPAC and converts them to Amount.\nfunc (a *Amount) Scan(src any) error {\n\tswitch v := src.(type) {\n\tcase int64:\n\t\t*a = Amount(v)\n\n\t\treturn nil\n\tdefault:\n\t\treturn ErrInvalidSQLType\n\t}\n}\n\n// Value implements the driver.Valuer interface for SQL database operations.\n// It returns the Amount as NanoPAC (int64) to avoid floating-point precision issues.\nfunc (a Amount) Value() (driver.Value, error) {\n\treturn int64(a), nil\n}\n"
  },
  {
    "path": "types/amount/amount_test.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage amount_test\n\nimport (\n\t\"math\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestAmountCreation(t *testing.T) {\n\ttests := []struct {\n\t\tname     string\n\t\tamount   float64\n\t\tvalid    bool\n\t\texpected amount.Amount\n\t}{\n\t\t// Positive tests.\n\t\t{\n\t\t\tname:     \"zero\",\n\t\t\tamount:   0,\n\t\t\tvalid:    true,\n\t\t\texpected: 0,\n\t\t},\n\t\t{\n\t\t\tname:     \"max producible\",\n\t\t\tamount:   42e6,\n\t\t\tvalid:    true,\n\t\t\texpected: amount.MaxNanoPAC,\n\t\t},\n\t\t{\n\t\t\tname:     \"min producible\",\n\t\t\tamount:   -42e6,\n\t\t\tvalid:    true,\n\t\t\texpected: -amount.MaxNanoPAC,\n\t\t},\n\t\t{\n\t\t\tname:     \"exceeds max producible\",\n\t\t\tamount:   42e6 + 8e-9,\n\t\t\tvalid:    true,\n\t\t\texpected: amount.MaxNanoPAC + 8,\n\t\t},\n\t\t{\n\t\t\tname:     \"exceeds min producible\",\n\t\t\tamount:   -42e6 - 8e-9,\n\t\t\tvalid:    true,\n\t\t\texpected: -amount.MaxNanoPAC - 8,\n\t\t},\n\t\t{\n\t\t\tname:     \"one hundred\",\n\t\t\tamount:   100,\n\t\t\tvalid:    true,\n\t\t\texpected: 100 * amount.NanoPACPerPAC,\n\t\t},\n\t\t{\n\t\t\tname:     \"fraction\",\n\t\t\tamount:   0.012345678,\n\t\t\tvalid:    true,\n\t\t\texpected: 12345678,\n\t\t},\n\t\t{\n\t\t\tname:     \"rounding up\",\n\t\t\tamount:   54.999999999999943157,\n\t\t\tvalid:    true,\n\t\t\texpected: 55 * amount.NanoPACPerPAC,\n\t\t},\n\t\t{\n\t\t\tname:     \"rounding down\",\n\t\t\tamount:   55.000000000000056843,\n\t\t\tvalid:    true,\n\t\t\texpected: 55 * amount.NanoPACPerPAC,\n\t\t},\n\n\t\t// Negative tests.\n\t\t{\n\t\t\tname:   \"not-a-number\",\n\t\t\tamount: math.NaN(),\n\t\t\tvalid:  false,\n\t\t},\n\t\t{\n\t\t\tname:   \"-infinity\",\n\t\t\tamount: math.Inf(-1),\n\t\t\tvalid:  false,\n\t\t},\n\t\t{\n\t\t\tname:   \"+infinity\",\n\t\t\tamount: math.Inf(1),\n\t\t\tvalid:  false,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tamt, err := amount.NewAmount(tt.amount)\n\t\tif tt.valid {\n\t\t\trequire.NoErrorf(t, err,\n\t\t\t\t\"%v: Positive test Amount creation failed with: %v\", tt.name, err)\n\t\t} else {\n\t\t\trequire.Errorf(t, err,\n\t\t\t\t\"%v: Negative test Amount creation succeeded (value %v) when should fail\", tt.name, amt)\n\t\t}\n\n\t\tassert.Equal(t, tt.expected, amt,\n\t\t\t\"%v: Created amount %v does not match expected %v\", tt.name, amt, tt.expected)\n\t}\n}\n\nfunc TestAmountUnitConversions(t *testing.T) {\n\ttests := []struct {\n\t\tname      string\n\t\tamount    amount.Amount\n\t\tunit      amount.Unit\n\t\tconverted float64\n\t\tstr       string\n\t}{\n\t\t{\n\t\t\tname:      \"MPAC\",\n\t\t\tamount:    amount.MaxNanoPAC,\n\t\t\tunit:      amount.UnitMegaPAC,\n\t\t\tconverted: 42,\n\t\t\tstr:       \"42 MPAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"kPAC\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.UnitKiloPAC,\n\t\t\tconverted: 444.333_222_111_000,\n\t\t\tstr:       \"444.333222111 kPAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"PAC\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.UnitPAC,\n\t\t\tconverted: 444_333.222_111,\n\t\t\tstr:       \"444,333.222111 PAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"a thousand NanoPAC as PAC\",\n\t\t\tamount:    1_000,\n\t\t\tunit:      amount.UnitPAC,\n\t\t\tconverted: 0.000_001,\n\t\t\tstr:       \"0.000001 PAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"a single NanoPAC as PAC\",\n\t\t\tamount:    1,\n\t\t\tunit:      amount.UnitPAC,\n\t\t\tconverted: 0.000_000_001,\n\t\t\tstr:       \"0.000000001 PAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"amount with trailing zero but no decimals\",\n\t\t\tamount:    10_000_000_000,\n\t\t\tunit:      amount.UnitPAC,\n\t\t\tconverted: 10,\n\t\t\tstr:       \"10 PAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"mPAC\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.UnitMilliPAC,\n\t\t\tconverted: 444_333_222.111_000,\n\t\t\tstr:       \"444,333,222.111 mPAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"μPAC\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.UnitMicroPAC,\n\t\t\tconverted: 444_333_222_111.000,\n\t\t\tstr:       \"444,333,222,111 μPAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"NanoPAC\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.UnitNanoPAC,\n\t\t\tconverted: 444_333_222_111_000,\n\t\t\tstr:       \"444,333,222,111,000 NanoPAC\",\n\t\t},\n\t\t{\n\t\t\tname:      \"non-standard unit\",\n\t\t\tamount:    444_333_222_111_000,\n\t\t\tunit:      amount.Unit(-1),\n\t\t\tconverted: 4_443_332.221_110_00,\n\t\t\tstr:       \"4,443,332.22111 1e-1 PAC\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tf := tt.amount.ToUnit(tt.unit)\n\t\tassert.InDelta(t, tt.converted, f, 0.00001,\n\t\t\t\"%v: converted value %v does not match expected %v\", tt.name, f, tt.converted)\n\n\t\tstr := tt.amount.Format(amount.WithUnit(tt.unit), amount.WithDelimiters())\n\t\tassert.Equal(t, tt.str, str,\n\t\t\t\"%v: format '%v' does not match expected '%v'\", tt.name, str, tt.str)\n\n\t\t// Verify that Amount.ToPAC works as advertised.\n\t\tf1 := tt.amount.ToUnit(amount.UnitPAC)\n\t\tf2 := tt.amount.ToPAC()\n\t\tassert.InDelta(t, f1, f2, 0.00001,\n\t\t\t\"%v: ToPAC does not match ToUnit(AmountPAC): %v != %v\", tt.name, f1, f2)\n\n\t\t// Verify that Amount.String works as advertised.\n\t\ts1 := tt.amount.Format(amount.WithUnit(amount.UnitPAC), amount.WithDelimiters())\n\t\ts2 := tt.amount.String()\n\t\tassert.Equal(t, s1, s2,\n\t\t\t\"%v: String does not match Format(AmountPac): %v != %v\", tt.name, s1, s2)\n\t}\n}\n\nfunc TestFormatOptions(t *testing.T) {\n\ttests := []struct {\n\t\tname     string\n\t\tamt      amount.Amount\n\t\topts     []amount.FormatOption\n\t\texpected string\n\t}{\n\t\t{\n\t\t\tname:     \"default\",\n\t\t\tamt:      123456e7,\n\t\t\topts:     []amount.FormatOption{},\n\t\t\texpected: \"1234.56\",\n\t\t},\n\t\t{\n\t\t\tname:     \"with unit\",\n\t\t\tamt:      123456e7,\n\t\t\topts:     []amount.FormatOption{amount.WithUnit(amount.UnitPAC)},\n\t\t\texpected: \"1234.56 PAC\",\n\t\t},\n\t\t{\n\t\t\tname:     \"with delimiters\",\n\t\t\tamt:      123456e7,\n\t\t\topts:     []amount.FormatOption{amount.WithDelimiters()},\n\t\t\texpected: \"1,234.56\",\n\t\t},\n\t\t{\n\t\t\tname:     \"with unit and delimiters\",\n\t\t\tamt:      123456e7,\n\t\t\topts:     []amount.FormatOption{amount.WithUnit(amount.UnitPAC), amount.WithDelimiters()},\n\t\t\texpected: \"1,234.56 PAC\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tassert.Equal(t, tt.expected, tt.amt.Format(tt.opts...),\n\t\t\t\"%v: Format does not match expected %v\", tt.name, tt.expected)\n\t}\n}\n\nfunc TestAmountMulF64(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tamt  amount.Amount\n\t\tmul  float64\n\t\tres  amount.Amount\n\t}{\n\t\t{\n\t\t\tname: \"Multiply 0.1 PAC by 2\",\n\t\t\tamt:  100e6, // 0.1 PAC\n\t\t\tmul:  2,\n\t\t\tres:  200e6, // 0.2 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 0.2 PAC by 0.02\",\n\t\t\tamt:  200e6, // 0.2 PAC\n\t\t\tmul:  1.02,\n\t\t\tres:  204e6, // 0.204 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 0.1 PAC by -2\",\n\t\t\tamt:  100e6, // 0.1 PAC\n\t\t\tmul:  -2,\n\t\t\tres:  -200e6, // -0.2 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 0.2 PAC by -0.02\",\n\t\t\tamt:  200e6, // 0.2 PAC\n\t\t\tmul:  -1.02,\n\t\t\tres:  -204e6, // -0.204 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply -0.1 PAC by 2\",\n\t\t\tamt:  -100e6, // -0.1 PAC\n\t\t\tmul:  2,\n\t\t\tres:  -200e6, // -0.2 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply -0.2 PAC by 0.02\",\n\t\t\tamt:  -200e6, // -0.2 PAC\n\t\t\tmul:  1.02,\n\t\t\tres:  -204e6, // -0.204 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply -0.1 PAC by -2\",\n\t\t\tamt:  -100e6, // -0.1 PAC\n\t\t\tmul:  -2,\n\t\t\tres:  200e6, // 0.2 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply -0.2 PAC by -0.02\",\n\t\t\tamt:  -200e6, // -0.2 PAC\n\t\t\tmul:  -1.02,\n\t\t\tres:  204e6, // 0.204 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Round down\",\n\t\t\tamt:  49, // 49 NanoPACs\n\t\t\tmul:  0.01,\n\t\t\tres:  0,\n\t\t},\n\t\t{\n\t\t\tname: \"Round up\",\n\t\t\tamt:  50, // 50 NanoPACs\n\t\t\tmul:  0.01,\n\t\t\tres:  1, // 1 NanoPAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply by 0\",\n\t\t\tamt:  1e9, // 1 PAC\n\t\t\tmul:  0,\n\t\t\tres:  0, // 0 PAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 1 by 0.5\",\n\t\t\tamt:  1, // 1 NanoPAC\n\t\t\tmul:  0.5,\n\t\t\tres:  1, // 1 NanoPAC\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 100 by 66%\",\n\t\t\tamt:  100, // 100 NanoPACs\n\t\t\tmul:  0.66,\n\t\t\tres:  66, // 66 NanoPACs\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 100 by 66.6%\",\n\t\t\tamt:  100, // 100 NanoPACs\n\t\t\tmul:  0.666,\n\t\t\tres:  67, // 67 NanoPACs\n\t\t},\n\t\t{\n\t\t\tname: \"Multiply 100 by 2/3\",\n\t\t\tamt:  100, // 100 NanoPACs\n\t\t\tmul:  2.0 / 3,\n\t\t\tres:  67, // 67 NanoPACs\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\ta := tt.amt.MulF64(tt.mul)\n\t\tif a != tt.res {\n\t\t\tt.Errorf(\"%v: expected %v got %v\", tt.name, tt.res, a)\n\t\t}\n\t}\n}\n\nfunc TestFromString(t *testing.T) {\n\ttests := []struct {\n\t\tamount  string\n\t\tPAC     float64\n\t\tNanoPac int64\n\t\tstr     string\n\t\tparsErr error\n\t}{\n\t\t{\"0\", 0, 0, \"0 PAC\", nil},\n\t\t{\"1\", 1, 1000000000, \"1 PAC\", nil},\n\t\t{\"1 PAC\", 1, 1000000000, \"1 PAC\", nil},\n\t\t{\"123.123\", 123.123, 123123000000, \"123.123 PAC\", nil},\n\t\t{\"123.0123\", 123.0123, 123012300000, \"123.0123 PAC\", nil},\n\t\t{\"123.01230\", 123.0123, 123012300000, \"123.0123 PAC\", nil},\n\t\t{\"123.000123\", 123.000123, 123000123000, \"123.000123 PAC\", nil},\n\t\t{\"123.000000123\", 123.000000123, 123000000123, \"123.000000123 PAC\", nil},\n\t\t{\"-123.000000123\", -123.000000123, -123000000123, \"-123.000000123 PAC\", nil},\n\t\t{\"0123.000000123\", 123.000000123, 123000000123, \"123.000000123 PAC\", nil},\n\t\t{\"+123.000000123\", 123.000000123, 123000000123, \"123.000000123 PAC\", nil},\n\t\t{\"123.0000001234\", 123.000000123, 123000000123, \"123.000000123 PAC\", nil},\n\t\t{\"1coin\", 0, 0, \"0\", strconv.ErrSyntax},\n\t}\n\tfor _, tt := range tests {\n\t\tamt, err := amount.FromString(tt.amount)\n\t\tif tt.parsErr == nil {\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, tt.NanoPac, amt.ToNanoPAC())\n\t\t\tassert.InDelta(t, tt.PAC, amt.ToPAC(), 0.00001)\n\t\t\tassert.Equal(t, tt.str, amt.String())\n\t\t} else {\n\t\t\trequire.ErrorIs(t, err, tt.parsErr)\n\t\t}\n\t}\n}\n\nfunc TestSQLDriver(t *testing.T) {\n\tt.Run(\"Value returns int64\", func(t *testing.T) {\n\t\tamt := amount.Amount(123456000000)\n\t\tval, err := amt.Value()\n\t\trequire.NoError(t, err)\n\t\tassert.IsType(t, int64(0), val)\n\t\tassert.Equal(t, int64(123456000000), val.(int64))\n\t})\n\n\tt.Run(\"Scan from int64 succeeds\", func(t *testing.T) {\n\t\tvar amt amount.Amount\n\t\terr := amt.Scan(int64(123456000000))\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int64(123456000000), amt.ToNanoPAC())\n\t})\n\n\tt.Run(\"Scan from nil fails\", func(t *testing.T) {\n\t\tvar amt amount.Amount\n\t\terr := amt.Scan(nil)\n\t\trequire.ErrorIs(t, err, amount.ErrInvalidSQLType)\n\t})\n\n\tt.Run(\"Scan from float64 fails\", func(t *testing.T) {\n\t\tvar amt amount.Amount\n\t\terr := amt.Scan(123.456)\n\t\trequire.ErrorIs(t, err, amount.ErrInvalidSQLType)\n\t})\n\n\tt.Run(\"Round trip Value and Scan\", func(t *testing.T) {\n\t\toriginal := amount.Amount(util.RandInt64(1000e9))\n\t\tval, err := original.Value()\n\t\trequire.NoError(t, err)\n\n\t\tvar scanned amount.Amount\n\t\terr = scanned.Scan(val)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, original.ToNanoPAC(), scanned.ToNanoPAC())\n\t})\n}\n"
  },
  {
    "path": "types/amount/errors.go",
    "content": "package amount\n\nimport (\n\t\"errors\"\n)\n\n// ErrInvalidSQLType is returned when the type of the data\n// is not supported for SQL database operations.\nvar ErrInvalidSQLType = errors.New(\"invalid SQL type\")\n"
  },
  {
    "path": "types/block/block.go",
    "content": "package block\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype Block struct {\n\tmemorizedHash *hash.Hash\n\tmemorizedData []byte\n\tdata          blockData\n}\n\ntype blockData struct {\n\tHeader   *Header\n\tPrevCert *certificate.Certificate\n\tTxs      Txs\n}\n\nfunc NewBlock(header *Header, prevCert *certificate.Certificate, txs Txs) *Block {\n\treturn &Block{\n\t\tdata: blockData{\n\t\t\tHeader:   header,\n\t\t\tPrevCert: prevCert,\n\t\t\tTxs:      txs,\n\t\t},\n\t}\n}\n\n// FromString constructs a new block from a hex-encoded string.\nfunc FromString(str string) (*Block, error) {\n\tbs, err := hex.DecodeString(str)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn FromBytes(bs)\n}\n\n// FromBytes constructs a new block from raw byte data.\nfunc FromBytes(data []byte) (*Block, error) {\n\tblk := new(Block)\n\treader := bytes.NewReader(data)\n\tif err := blk.Decode(reader); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn blk, nil\n}\n\nfunc MakeBlock(version protocol.Version, timestamp time.Time, txs Txs,\n\tprevBlockHash, stateRoot hash.Hash,\n\tprevCert *certificate.Certificate, sortitionSeed sortition.VerifiableSeed, proposer crypto.Address,\n) *Block {\n\theader := NewHeader(version, timestamp,\n\t\tstateRoot, prevBlockHash, sortitionSeed, proposer)\n\n\treturn NewBlock(header, prevCert, txs)\n}\n\nfunc (b *Block) Header() *Header {\n\treturn b.data.Header\n}\n\nfunc (b *Block) PrevCertificate() *certificate.Certificate {\n\treturn b.data.PrevCert\n}\n\nfunc (b *Block) Transactions() Txs {\n\treturn b.data.Txs\n}\n\n// BasicCheck performs basic validation checks on the block structure and its contents.\nfunc (b *Block) BasicCheck() error {\n\tif err := b.Header().BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\tif b.Transactions().Len() == 0 {\n\t\t// block at least should have one transaction\n\t\treturn BasicCheckError{\n\t\t\tReason: \"no subsidy transaction\",\n\t\t}\n\t}\n\tif b.Transactions().Len() > 1000 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"block is full\",\n\t\t}\n\t}\n\tif b.PrevCertificate() != nil {\n\t\tif err := b.PrevCertificate().BasicCheck(); err != nil {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: fmt.Sprintf(\"invalid certificate: %s\", err.Error()),\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Genesis block checks\n\t\tif !b.Header().PrevBlockHash().IsUndef() {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"invalid genesis block hash\",\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, trx := range b.Transactions() {\n\t\tif err := trx.BasicCheck(); err != nil {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: fmt.Sprintf(\"invalid transaction: %s\", err.Error()),\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Hash returns the hash of the block.\n// The hash is memorized after the first calculation.\nfunc (b *Block) Hash() hash.Hash {\n\tif b.memorizedHash != nil {\n\t\treturn *b.memorizedHash\n\t}\n\n\tbuf := bytes.NewBuffer(make([]byte, 0, b.SerializeSize()))\n\tif err := b.data.Header.Encode(buf); err != nil {\n\t\treturn hash.UndefHash\n\t}\n\t// Genesis block has no certificate\n\tif b.data.PrevCert != nil {\n\t\tbuf.Write(b.data.PrevCert.Hash().Bytes())\n\t}\n\tbuf.Write(b.data.Txs.Root().Bytes())\n\tbuf.Write(util.Int32ToBytesLE(int32(b.data.Txs.Len())))\n\n\th := hash.CalcHash(buf.Bytes())\n\tb.memorizedHash = &h\n\n\treturn h\n}\n\n// Height returns the height of the block.\n// TODO: return types.Height type.\nfunc (b *Block) Height() types.Height {\n\tif b.data.PrevCert == nil {\n\t\treturn 1\n\t}\n\n\treturn b.PrevCertificate().Height() + 1\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (b *Block) LogString() string {\n\treturn fmt.Sprintf(\"{⌘ %v 👤 %v 💻 %v 📨 %d}\",\n\t\tb.Hash().LogString(),\n\t\tb.data.Header.ProposerAddress().LogString(),\n\t\tb.data.Header.StateRoot().LogString(),\n\t\tb.data.Txs.Len(),\n\t)\n}\n\nfunc (b *Block) MarshalCBOR() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, b.SerializeSize()))\n\tif err := b.Encode(buf); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cbor.Marshal(buf.Bytes())\n}\n\nfunc (b *Block) UnmarshalCBOR(bs []byte) error {\n\tdata := make([]byte, 0, b.SerializeSize())\n\terr := cbor.Unmarshal(bs, &data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbuf := bytes.NewBuffer(data)\n\n\treturn b.Decode(buf)\n}\n\nfunc (b *Block) Encode(w io.Writer) error {\n\tif err := b.data.Header.Encode(w); err != nil {\n\t\treturn err\n\t}\n\tif b.data.PrevCert != nil {\n\t\tif err := b.data.PrevCert.Encode(w); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif err := encoding.WriteVarInt(w, uint64(b.data.Txs.Len())); err != nil {\n\t\treturn err\n\t}\n\tfor _, trx := range b.Transactions() {\n\t\tif err := trx.Encode(w); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (b *Block) Decode(r io.Reader) error {\n\tb.data.Header = new(Header)\n\tif err := b.data.Header.Decode(r); err != nil {\n\t\treturn err\n\t}\n\tif !b.data.Header.PrevBlockHash().IsUndef() {\n\t\tb.data.PrevCert = new(certificate.Certificate)\n\t\tif err := b.data.PrevCert.Decode(r); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tlength, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// We set 1000 as a hardcoded value,\n\t// matching the maximum number of transactions allowed in a block.\n\tif length > 1000 {\n\t\treturn ErrTooManyTransactions\n\t}\n\n\tb.data.Txs = make([]*tx.Tx, length)\n\tfor i := 0; i < int(length); i++ {\n\t\ttrx := new(tx.Tx)\n\t\tif err := trx.Decode(r); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tb.data.Txs[i] = trx\n\t}\n\n\treturn nil\n}\n\n// SerializeSize returns the number of bytes it would take to serialize the block.\nfunc (b *Block) SerializeSize() int {\n\tsize := b.Header().SerializeSize()\n\n\tif b.PrevCertificate() != nil {\n\t\tsize += b.PrevCertificate().SerializeSize()\n\t}\n\n\tsize += encoding.VarIntSerializeSize(uint64(b.Transactions().Len()))\n\tfor _, trx := range b.Transactions() {\n\t\tsize += trx.SerializeSize()\n\t}\n\n\treturn size\n}\n\n// Bytes returns the serialized bytes for the Block. It caches the\n// result so subsequent calls are more efficient.\nfunc (b *Block) Bytes() ([]byte, error) {\n\t// Return the cached serialized bytes if it has already been generated.\n\tif len(b.memorizedData) != 0 {\n\t\treturn b.memorizedData, nil\n\t}\n\n\twriter := bytes.NewBuffer(make([]byte, 0, b.SerializeSize()))\n\terr := b.Encode(writer)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Cache the serialized bytes and return them.\n\tb.memorizedData = writer.Bytes()\n\n\treturn b.memorizedData, nil\n}\n"
  },
  {
    "path": "types/block/block_test.go",
    "content": "package block_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/simplemerkle\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"No transactions\", func(t *testing.T) {\n\t\tstr := \"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"00\" // Txs: Len\n\n\t\tblk, _ := block.FromString(str)\n\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"no subsidy transaction\",\n\t\t})\n\t})\n\n\tt.Run(\"Too many transactions\", func(t *testing.T) {\n\t\tstr := \"02\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"e907\" // Txs: Len (1001)\n\n\t\t_, err := block.FromString(str)\n\t\trequire.ErrorIs(t, err, block.ErrTooManyTransactions)\n\t})\n\n\tt.Run(\"Without the previous certificate\", func(t *testing.T) {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight(), testsuite.BlockWithPrevCert(nil))\n\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"invalid genesis block hash\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid certificate\", func(t *testing.T) {\n\t\tstr := \"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"00000000\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"01\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\tblk, _ := block.FromString(str)\n\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"invalid certificate: height is not positive: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid transaction\", func(t *testing.T) {\n\t\tstr := \"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"00\" + // Tx[0]: Version\n\t\t\t\"00000000\" + // Tx[0]: LockTime\n\t\t\t\"00\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\tblk, _ := block.FromString(str)\n\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"invalid transaction: invalid version: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid previous block hash\", func(t *testing.T) {\n\t\tstr := \"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"0000000000000000000000000000000000000000000000000000000000000000\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"00\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"01\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\t_, err := block.FromString(str)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Invalid proposer address (type is 2)\", func(t *testing.T) {\n\t\tstr := \"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"02AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"01\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\tblk, _ := block.FromString(str)\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"invalid proposer address: pc1z42424242424242424242424242424242klpmq4\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid Version\", func(t *testing.T) {\n\t\tstr := \"00\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"00\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\tblk, _ := block.FromString(str)\n\t\terr := blk.BasicCheck()\n\t\trequire.ErrorIs(t, err, block.BasicCheckError{\n\t\t\tReason: \"invalid block version: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tstr := \"03\" + // Version (ProtocolVersionLatest = 3, PIP-49)\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"00\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"022222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\" // Tx[0]: Amount\n\n\t\tblk, _ := block.FromString(str)\n\t\trequire.NoError(t, blk.BasicCheck())\n\t\tassert.Zero(t, blk.Header().UnixTime())\n\t\tassert.Equal(t, protocol.ProtocolVersionLatest, blk.Header().Version())\n\t})\n}\n\nfunc TestCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblk1, _ := ts.GenerateTestBlock(ts.RandHeight())\n\tbz1, err := cbor.Marshal(blk1)\n\trequire.NoError(t, err)\n\tvar blk2 block.Block\n\terr = cbor.Unmarshal(bz1, &blk2)\n\trequire.NoError(t, err)\n\trequire.NoError(t, blk2.BasicCheck())\n\tassert.Equal(t, blk1.Hash(), blk2.Hash())\n\n\tassert.Equal(t, blk1.Hash(), blk2.Hash())\n\n\terr = cbor.Unmarshal([]byte{1}, &blk2)\n\trequire.Error(t, err)\n}\n\nfunc TestEncodingBlock(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\tlength := blk.SerializeSize()\n\n\tfor i := 0; i < length; i++ {\n\t\tw := util.NewFixedWriter(i)\n\t\trequire.Error(t, blk.Encode(w), \"encode test %v failed\", i)\n\t}\n\twriter := util.NewFixedWriter(length)\n\trequire.NoError(t, blk.Encode(writer))\n\n\tfor i := 0; i < length; i++ {\n\t\tblk2 := new(block.Block)\n\t\tr := util.NewFixedReader(i, writer.Bytes())\n\t\trequire.Error(t, blk2.Decode(r), \"decode test %v failed\", i)\n\t}\n\n\tblk2 := new(block.Block)\n\tr := util.NewFixedReader(length, writer.Bytes())\n\trequire.NoError(t, blk2.Decode(r))\n\tassert.Equal(t, blk.Hash(), blk2.Hash())\n\tassert.Equal(t, blk.Header(), blk2.Header())\n}\n\nfunc TestInvalidString(t *testing.T) {\n\t_, err := block.FromString(\"badcow\")\n\trequire.Error(t, err)\n}\n\nfunc TestBlockHash(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"01\" + // Version\n\t\t\t\"00000000\" + // UnixTime\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // PrevBlockHash\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // StateRoot\n\t\t\t\"333333333333333333333333333333333333333333333333\" + // SortitionSeed\n\t\t\t\"333333333333333333333333333333333333333333333333\" +\n\t\t\t\"01AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // ProposerAddress\n\t\t\t\"04030201\" + // PrevCert: Height\n\t\t\t\"0100\" + // PrevCert: Round\n\t\t\t\"0401020304\" + // PrevCert: Committers\n\t\t\t\"0102\" + // PrevCert: Absentees\n\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d\" +\n\t\t\t\"2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\" + // PrevCert: Signature\n\t\t\t\"01\" + // Txs: Len\n\t\t\t\"02\" + // Tx[0]: Flags\n\t\t\t\"01\" + // Tx[0]: Version\n\t\t\t\"01000000\" + // Tx[0]: LockTime\n\t\t\t\"01\" + // Tx[0]: Fee\n\t\t\t\"00\" + // Tx[0]: Memo\n\t\t\t\"01\" + // Tx[0]: PayloadType\n\t\t\t\"00\" + // Tx[0]: Sender (treasury)\n\t\t\t\"012222222222222222222222222222222222222222\" + // Tx[0]: Receiver\n\t\t\t\"01\") // Tx[0]: Amount\n\n\tblk, err := block.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(data), blk.SerializeSize())\n\n\tblockData, _ := blk.Bytes()\n\tassert.Equal(t, data, blockData)\n\n\theaderSize := blk.Header().SerializeSize()\n\theaderData := data[:headerSize]\n\tcertSize := blk.PrevCertificate().SerializeSize()\n\tcertData := data[headerSize : headerSize+certSize]\n\tcertHash := hash.CalcHash(certData)\n\n\ttxHashes := make([]hash.Hash, 0, blk.Transactions().Len())\n\tfor _, trx := range blk.Transactions() {\n\t\ttxHashes = append(txHashes, trx.ID())\n\t}\n\ttxRoot := simplemerkle.NewTreeFromHashes(txHashes).Root()\n\n\thashData := headerData\n\thashData = append(hashData, certHash.Bytes()...)\n\thashData = append(hashData, txRoot.Bytes()...)\n\thashData = append(hashData, util.Int32ToBytesLE(int32(blk.Transactions().Len()))...)\n\n\texpected1 := hash.CalcHash(hashData)\n\texpected2, _ := hash.FromString(\"43399fa59adcfb7d8c515460ec9ca27b6a1cb865f5b7d9bde8fe56c18eaec9ab\")\n\tassert.Equal(t, expected1, blk.Hash())\n\tassert.Equal(t, expected2, blk.Hash())\n}\n\nfunc TestMakeBlock(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblk0, _ := ts.GenerateTestBlock(ts.RandHeight())\n\tblk1 := block.MakeBlock(protocol.ProtocolVersion2, blk0.Header().Time(), blk0.Transactions(),\n\t\tblk0.Header().PrevBlockHash(),\n\t\tblk0.Header().StateRoot(),\n\t\tblk0.PrevCertificate(),\n\t\tblk0.Header().SortitionSeed(),\n\t\tblk0.Header().ProposerAddress())\n\n\tassert.Equal(t, blk0.Hash(), blk1.Hash())\n}\n\nfunc TestBlockHeight(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblk1, _ := ts.GenerateTestBlock(1, testsuite.BlockWithPrevCert(nil), testsuite.BlockWithPrevHash(hash.UndefHash))\n\tblk2, _ := ts.GenerateTestBlock(2)\n\n\trequire.NoError(t, blk1.BasicCheck())\n\trequire.NoError(t, blk2.BasicCheck())\n\n\tassert.Equal(t, types.Height(1), blk1.Height())\n\tassert.Equal(t, types.Height(2), blk2.Height())\n}\n"
  },
  {
    "path": "types/block/errors.go",
    "content": "package block\n\nimport \"errors\"\n\nvar ErrTooManyTransactions = errors.New(\"too many transactions in block\")\n\n// BasicCheckError is returned when the basic check on the certificate fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "types/block/header.go",
    "content": "package block\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype Header struct {\n\tdata headerData\n}\n\ntype headerData struct {\n\tVersion         protocol.Version\n\tUnixTime        uint32\n\tPrevBlockHash   hash.Hash\n\tStateRoot       hash.Hash\n\tSortitionSeed   sortition.VerifiableSeed\n\tProposerAddress crypto.Address\n}\n\n// Version returns the block version.\nfunc (h *Header) Version() protocol.Version {\n\treturn h.data.Version\n}\n\n// Time returns the block time.\nfunc (h *Header) Time() time.Time {\n\treturn time.Unix(int64(h.data.UnixTime), 0)\n}\n\n// UnixTime returns the block time in Unix value.\nfunc (h *Header) UnixTime() uint32 {\n\treturn h.data.UnixTime\n}\n\n// StateRoot returns the state root hash.\nfunc (h *Header) StateRoot() hash.Hash {\n\treturn h.data.StateRoot\n}\n\n// PrevBlockHash returns the previous block hash.\nfunc (h *Header) PrevBlockHash() hash.Hash {\n\treturn h.data.PrevBlockHash\n}\n\n// SortitionSeed returns the sortition seed.\nfunc (h *Header) SortitionSeed() sortition.VerifiableSeed {\n\treturn h.data.SortitionSeed\n}\n\n// ProposerAddress returns the proposer address.\nfunc (h *Header) ProposerAddress() crypto.Address {\n\treturn h.data.ProposerAddress\n}\n\nfunc NewHeader(version protocol.Version, tme time.Time, stateRoot, prevBlockHash hash.Hash,\n\tsortitionSeed sortition.VerifiableSeed, proposerAddress crypto.Address,\n) *Header {\n\treturn &Header{\n\t\tdata: headerData{\n\t\t\tVersion:         version,\n\t\t\tUnixTime:        uint32(tme.Unix()),\n\t\t\tPrevBlockHash:   prevBlockHash,\n\t\t\tStateRoot:       stateRoot,\n\t\t\tProposerAddress: proposerAddress,\n\t\t\tSortitionSeed:   sortitionSeed,\n\t\t},\n\t}\n}\n\nfunc (h *Header) BasicCheck() error {\n\tif h.data.Version == 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid block version: 0\",\n\t\t}\n\t}\n\n\tif !h.data.ProposerAddress.IsValidatorAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"invalid proposer address: %s\",\n\t\t\t\th.data.ProposerAddress.String()),\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// SerializeSize returns the number of bytes it would take to serialize the header.\nfunc (*Header) SerializeSize() int {\n\treturn 138 // 5 + (2 * 32) + 48 + 21\n}\n\nfunc (h *Header) Encode(w io.Writer) error {\n\treturn encoding.WriteElements(w,\n\t\th.data.Version,\n\t\th.data.UnixTime,\n\t\th.data.PrevBlockHash,\n\t\th.data.StateRoot,\n\t\th.data.SortitionSeed,\n\t\th.data.ProposerAddress)\n}\n\nfunc (h *Header) Decode(r io.Reader) error {\n\treturn encoding.ReadElements(r,\n\t\t&h.data.Version,\n\t\t&h.data.UnixTime,\n\t\t&h.data.PrevBlockHash,\n\t\t&h.data.StateRoot,\n\t\t&h.data.SortitionSeed,\n\t\t&h.data.ProposerAddress)\n}\n"
  },
  {
    "path": "types/block/txs.go",
    "content": "package block\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/simplemerkle\"\n)\n\ntype Txs []*tx.Tx\n\nfunc NewTxs() Txs {\n\treturn make([]*tx.Tx, 0)\n}\n\nfunc (txs *Txs) Append(trx *tx.Tx) {\n\t*txs = append(*txs, trx)\n}\n\nfunc (txs *Txs) Prepend(trx *tx.Tx) {\n\t*txs = append(*txs, nil)\n\tcopy((*txs)[1:], (*txs)[0:])\n\t(*txs)[0] = trx\n}\n\nfunc (txs *Txs) Remove(i int) {\n\t// https://github.com/golang/go/wiki/SliceTricks#delete\n\tcopy((*txs)[i:], (*txs)[i+1:])\n\t(*txs)[txs.Len()-1] = nil\n\t*txs = (*txs)[:txs.Len()-1]\n}\n\nfunc (txs Txs) Root() hash.Hash {\n\thashes := make([]hash.Hash, txs.Len())\n\tfor i, trx := range txs {\n\t\thashes[i] = trx.ID()\n\t}\n\tmerkle := simplemerkle.NewTreeFromHashes(hashes)\n\n\treturn merkle.Root()\n}\n\nfunc (txs Txs) IsEmpty() bool {\n\treturn txs.Len() == 0\n}\n\nfunc (txs Txs) Len() int {\n\treturn len(txs)\n}\n\nfunc (txs Txs) Get(i int) *tx.Tx {\n\treturn txs[i]\n}\n\nfunc (txs Txs) Subsidy() *tx.Tx {\n\treturn txs[0]\n}\n"
  },
  {
    "path": "types/block/txs_test.go",
    "content": "package block_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestTxsMerkle(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttxs := block.NewTxs()\n\ttrx1 := ts.GenerateTestTransferTx()\n\ttrx2 := ts.GenerateTestTransferTx()\n\ttxs.Append(trx1)\n\tmerkle := txs.Root()\n\tassert.Equal(t, trx1.ID(), merkle)\n\n\ttxs.Append(trx2)\n\tmerkle = txs.Root()\n\tdata := make([]byte, 64)\n\tcopy(data[:32], trx1.ID().Bytes())\n\tcopy(data[32:], trx2.ID().Bytes())\n\tassert.Equal(t, hash.CalcHash(data), merkle)\n}\n\nfunc TestAppendPrependRemove(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttxs := block.NewTxs()\n\ttrx1 := ts.GenerateTestTransferTx()\n\ttrx2 := ts.GenerateTestTransferTx()\n\ttrx3 := ts.GenerateTestTransferTx()\n\ttrx4 := ts.GenerateTestTransferTx()\n\ttrx5 := ts.GenerateTestTransferTx()\n\ttxs.Append(trx2)\n\ttxs.Append(trx3)\n\ttxs.Prepend(trx1)\n\ttxs.Append(trx5)\n\ttxs.Append(trx4)\n\ttxs.Remove(3)\n\n\tassert.Equal(t, block.Txs{trx1, trx2, trx3, trx4}, txs)\n}\n\nfunc TestIsEmpty(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttxs := block.NewTxs()\n\tassert.True(t, txs.IsEmpty())\n\n\ttrx := ts.GenerateTestTransferTx()\n\ttxs.Append(trx)\n\tassert.False(t, txs.IsEmpty())\n}\n\nfunc TestGetTransaction(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttxs := block.NewTxs()\n\ttrx1 := ts.GenerateTestTransferTx()\n\ttrx2 := ts.GenerateTestTransferTx()\n\ttxs.Append(trx1)\n\ttxs.Append(trx2)\n\tassert.Equal(t, trx1, txs.Get(0))\n}\n\nfunc TestSubsidy(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\tassert.Equal(t, blk.Transactions()[0], blk.Transactions().Subsidy())\n}\n"
  },
  {
    "path": "types/certificate/certificate.go",
    "content": "package certificate\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"slices\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\n// Certificate represents a base structure for both Certificate and Certificate.\n// As a Certificate, it verifies if a block is signed by a majority of validators.\n// As a Certificate, it checks whether a majority of validators have voted in the consensus step.\ntype Certificate struct {\n\theight     types.Height\n\tround      types.Round\n\tcommitters []int32\n\tabsentees  []int32\n\tsignature  *bls.Signature\n}\n\n// NewCertificate creates a new Certificate instance.\nfunc NewCertificate(height types.Height, round types.Round) *Certificate {\n\treturn &Certificate{\n\t\theight: height,\n\t\tround:  round,\n\t}\n}\n\nfunc (cert *Certificate) Height() types.Height {\n\treturn cert.height\n}\n\nfunc (cert *Certificate) Round() types.Round {\n\treturn cert.round\n}\n\nfunc (cert *Certificate) Committers() []int32 {\n\treturn cert.committers\n}\n\nfunc (cert *Certificate) Absentees() []int32 {\n\treturn cert.absentees\n}\n\nfunc (cert *Certificate) Signature() *bls.Signature {\n\treturn cert.signature\n}\n\nfunc (cert *Certificate) BasicCheck() error {\n\tif cert.height <= 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"height is not positive: %d\", cert.height),\n\t\t}\n\t}\n\tif cert.round < 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"round is negative: %d\", cert.round),\n\t\t}\n\t}\n\tif cert.signature == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"signature is missing\",\n\t\t}\n\t}\n\tif cert.committers == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"committers is missing\",\n\t\t}\n\t}\n\tif cert.absentees == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"absentees is missing\",\n\t\t}\n\t}\n\tif !util.IsSubset(cert.committers, cert.absentees) {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"absentees are not a subset of committers: %v, %v\",\n\t\t\t\tcert.committers, cert.absentees),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (cert *Certificate) Hash() hash.Hash {\n\tbuf := bytes.NewBuffer(make([]byte, 0, cert.SerializeSize()))\n\tif err := cert.Encode(buf); err != nil {\n\t\treturn hash.UndefHash\n\t}\n\n\treturn hash.CalcHash(buf.Bytes())\n}\n\nfunc (cert *Certificate) SetSignature(committers, absentees []int32, signature *bls.Signature) {\n\tcert.committers = committers\n\tcert.absentees = absentees\n\tcert.signature = signature\n}\n\n// SerializeSize returns the number of bytes it would take to serialize the block.\nfunc (cert *Certificate) SerializeSize() int {\n\tsize := 6 + // height (4) + round(2)\n\t\tencoding.VarIntSerializeSize(uint64(len(cert.committers))) +\n\t\tencoding.VarIntSerializeSize(uint64(len(cert.absentees))) +\n\t\tbls.SignatureSize\n\n\tfor _, n := range cert.committers {\n\t\tsize += encoding.VarIntSerializeSize(uint64(n))\n\t}\n\n\tfor _, n := range cert.absentees {\n\t\tsize += encoding.VarIntSerializeSize(uint64(n))\n\t}\n\n\treturn size\n}\n\nfunc (cert *Certificate) MarshalCBOR() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, cert.SerializeSize()))\n\tif err := cert.Encode(buf); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cbor.Marshal(buf.Bytes())\n}\n\nfunc (cert *Certificate) UnmarshalCBOR(bs []byte) error {\n\tdata := make([]byte, 0, cert.SerializeSize())\n\terr := cbor.Unmarshal(bs, &data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbuf := bytes.NewBuffer(data)\n\n\treturn cert.Decode(buf)\n}\n\nfunc (cert *Certificate) Encode(w io.Writer) error {\n\tif err := encoding.WriteElements(w, cert.height, cert.round); err != nil {\n\t\treturn err\n\t}\n\tif err := encoding.WriteVarInt(w, uint64(len(cert.committers))); err != nil {\n\t\treturn err\n\t}\n\tfor _, n := range cert.committers {\n\t\tif err := encoding.WriteVarInt(w, uint64(n)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif err := encoding.WriteVarInt(w, uint64(len(cert.absentees))); err != nil {\n\t\treturn err\n\t}\n\tfor _, n := range cert.absentees {\n\t\tif err := encoding.WriteVarInt(w, uint64(n)); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn cert.signature.Encode(w)\n}\n\nfunc (cert *Certificate) Decode(r io.Reader) error {\n\terr := encoding.ReadElements(r, &cert.height, &cert.round)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tlenCommitters, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// We set 51 as a hardcoded value,\n\t// matching the maximum number of committers allowed in a block.\n\tif lenCommitters > 51 {\n\t\treturn ErrTooManyCommitters\n\t}\n\n\tcommitters := make([]int32, lenCommitters)\n\tfor i := 0; i < int(lenCommitters); i++ {\n\t\tn, err := encoding.ReadVarInt(r)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcommitters[i] = int32(n)\n\t}\n\n\tlenAbsentees, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// We set 51 as a hardcoded value,\n\t// matching the maximum number of committers allowed in a block.\n\tif lenAbsentees > 51 {\n\t\treturn ErrTooManyAbsentees\n\t}\n\n\tabsentees := make([]int32, lenAbsentees)\n\tfor i := 0; i < int(lenAbsentees); i++ {\n\t\tn, err := encoding.ReadVarInt(r)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tabsentees[i] = int32(n)\n\t}\n\n\tsig := new(bls.Signature)\n\tif err := sig.Decode(r); err != nil {\n\t\treturn err\n\t}\n\n\tcert.committers = committers\n\tcert.absentees = absentees\n\tcert.signature = sig\n\n\treturn nil\n}\n\nfunc (cert *Certificate) SignBytesPrepare(blockHash hash.Hash) []byte {\n\treturn cert.signBytes(blockHash,\n\t\tutil.StringToBytes(\"PREPARE\"))\n}\n\nfunc (cert *Certificate) SignBytesPrecommit(blockHash hash.Hash) []byte {\n\treturn cert.signBytes(blockHash)\n}\n\nfunc (cert *Certificate) SignBytesCPPreVote(blockHash hash.Hash, cpRound int16, cpValue byte) []byte {\n\treturn cert.signBytes(blockHash,\n\t\tutil.StringToBytes(\"PRE-VOTE\"),\n\t\tutil.Int16ToBytesLE(cpRound),\n\t\t[]byte{cpValue})\n}\n\nfunc (cert *Certificate) SignBytesCPMainVote(blockHash hash.Hash, cpRound int16, cpValue byte) []byte {\n\treturn cert.signBytes(blockHash,\n\t\tutil.StringToBytes(\"MAIN-VOTE\"),\n\t\tutil.Int16ToBytesLE(cpRound),\n\t\t[]byte{cpValue})\n}\n\nfunc (cert *Certificate) SignBytesCPDecided(blockHash hash.Hash, cpRound int16, cpValue byte) []byte {\n\treturn cert.signBytes(blockHash,\n\t\tutil.StringToBytes(\"DECIDED\"),\n\t\tutil.Int16ToBytesLE(cpRound),\n\t\t[]byte{cpValue})\n}\n\n// signBytes returns the sign bytes for the vote certificate.\nfunc (cert *Certificate) signBytes(blockHash hash.Hash, extraData ...[]byte) []byte {\n\tsignBytes := blockHash.Bytes()\n\tsignBytes = append(signBytes, cert.height.BytesLE()...)\n\tsignBytes = append(signBytes, cert.round.BytesLE()...)\n\tfor _, data := range extraData {\n\t\tsignBytes = append(signBytes, data...)\n\t}\n\n\treturn signBytes\n}\n\nfunc (cert *Certificate) ValidatePrepare(validators []*validator.Validator,\n\tblockHash hash.Hash,\n) error {\n\tsignBytes := cert.SignBytesPrepare(blockHash)\n\n\treturn cert.validate(validators, signBytes, Required2FP1Power)\n}\n\nfunc (cert *Certificate) ValidatePrecommit(validators []*validator.Validator,\n\tblockHash hash.Hash,\n) error {\n\tsignBytes := cert.SignBytesPrecommit(blockHash)\n\n\treturn cert.validate(validators, signBytes, Required2FP1Power)\n}\n\nfunc (cert *Certificate) ValidateCPPreVote(validators []*validator.Validator,\n\tblockHash hash.Hash, cpRound int16, cpValue byte,\n) error {\n\tsignBytes := cert.SignBytesCPPreVote(blockHash, cpRound, cpValue)\n\n\treturn cert.validate(validators, signBytes, Required2FP1Power)\n}\n\nfunc (cert *Certificate) ValidateCPMainVote(validators []*validator.Validator,\n\tblockHash hash.Hash, cpRound int16, cpValue byte,\n) error {\n\tsignBytes := cert.SignBytesCPMainVote(blockHash, cpRound, cpValue)\n\n\treturn cert.validate(validators, signBytes, Required2FP1Power)\n}\n\nfunc (cert *Certificate) validate(validators []*validator.Validator,\n\tsignBytes []byte, requiredPowerFn RequiredPowerFn,\n) error {\n\tif len(validators) != len(cert.committers) {\n\t\treturn UnexpectedCommittersError{\n\t\t\tCommitters: cert.committers,\n\t\t}\n\t}\n\n\tpubs := make([]*bls.PublicKey, 0, len(cert.committers))\n\tcommitteePower := int64(0)\n\tsignedPower := int64(0)\n\n\tfor index, num := range cert.committers {\n\t\tval := validators[index]\n\t\tif val.Number() != num {\n\t\t\treturn UnexpectedCommittersError{\n\t\t\t\tCommitters: cert.committers,\n\t\t\t}\n\t\t}\n\n\t\tif !slices.Contains(cert.absentees, num) {\n\t\t\tpubs = append(pubs, val.PublicKey())\n\t\t\tsignedPower += val.Power()\n\t\t}\n\t\tcommitteePower += val.Power()\n\t}\n\n\trequiredPower := requiredPowerFn(committeePower)\n\n\t// Check if signers have enough power\n\tif signedPower < requiredPower {\n\t\treturn InsufficientPowerError{\n\t\t\tSignedPower:   signedPower,\n\t\t\tRequiredPower: requiredPower,\n\t\t}\n\t}\n\n\taggPub, _ := bls.PublicKeyAggregate(pubs...)\n\n\treturn aggPub.Verify(signBytes, cert.signature)\n}\n\n// AddSignature adds a new signature to the certificate.\n// It does not check the validity of the signature.\n// The caller should ensure that the signature is valid.\nfunc (cert *Certificate) AddSignature(valNum int32, sig *bls.Signature) {\n\tabsentees, removed := util.RemoveFirstOccurrenceOf(cert.absentees, valNum)\n\tif removed {\n\t\taggSig, _ := bls.SignatureAggregate(cert.signature, sig)\n\t\tcert.signature = aggSig\n\t\tcert.absentees = absentees\n\t}\n}\n\nfunc (cert *Certificate) Clone() *Certificate {\n\tcloned := &Certificate{\n\t\theight:     cert.height,\n\t\tround:      cert.round,\n\t\tcommitters: make([]int32, len(cert.committers)),\n\t\tabsentees:  make([]int32, len(cert.absentees)),\n\t\tsignature:  new(bls.Signature),\n\t}\n\n\tcopy(cloned.committers, cert.committers)\n\tcopy(cloned.absentees, cert.absentees)\n\t*cloned.signature = *cert.signature\n\n\treturn cloned\n}\n"
  },
  {
    "path": "types/certificate/certificate_test.go",
    "content": "package certificate_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"golang.org/x/exp/slices\"\n)\n\nfunc TestDecoding(t *testing.T) {\n\tt.Run(\"Too many committers\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\n\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"34\") // Committers: Len (52)\n\n\t\tr := bytes.NewReader(data)\n\t\tcert := new(certificate.Certificate)\n\t\terr := cert.Decode(r)\n\t\trequire.ErrorIs(t, err, certificate.ErrTooManyCommitters)\n\t})\n\n\tt.Run(\"Too many absentees\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\n\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"0102\" + // Committers\n\t\t\t\t\"34\") // Absentees: Len (52)\n\n\t\tr := bytes.NewReader(data)\n\t\tcert := new(certificate.Certificate)\n\t\terr := cert.Decode(r)\n\t\trequire.ErrorIs(t, err, certificate.ErrTooManyAbsentees)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\n\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"06010203040506\" + // Committers\n\t\t\t\t\"0102\" + // Absentees\n\t\t\t\t\"b53d79e156e9417e010fa21f2b2a96bee6be46fcd233295d2f697cdb9e782b6112ac01c80d0d9d64c2320664c77fa2a6\") // Signature\n\n\t\tcertHash, _ := hash.FromString(\"ac755295a6850b141286bde42bb8ba06ae1671f0562cbef90043924091177815\")\n\t\tr := bytes.NewReader(data)\n\t\tcert := new(certificate.Certificate)\n\t\terr := cert.Decode(r)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, types.Height(0x01020304), cert.Height())\n\t\tassert.Equal(t, types.Round(0x0001), cert.Round())\n\t\tassert.Equal(t, []int32{1, 2, 3, 4, 5, 6}, cert.Committers())\n\t\tassert.Equal(t, []int32{2}, cert.Absentees())\n\t\tassert.Equal(t, certHash, cert.Hash())\n\n\t\tblockHash, _ := hash.FromString(\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\")\n\t\texpectedPrepareSignByte, _ := hex.DecodeString(\n\t\t\t\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\" + // Block hash\n\t\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"50524550415245\") // PREPARE\n\t\texpectedPrecommitSignByte, _ := hex.DecodeString(\n\t\t\t\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\" + // Block hash\n\t\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\") // Round\n\t\texpectedCPPreVoteSignByte, _ := hex.DecodeString(\n\t\t\t\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\" + // Block hash\n\t\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"5052452d564f5445\" + // PRE-VOTE\n\t\t\t\t\"0100\" + // CP Round\n\t\t\t\t\"02\") // CP Value\n\n\t\texpectedCPMainVoteSignByte, _ := hex.DecodeString(\n\t\t\t\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\" + // Block hash\n\t\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"4d41494e2d564f5445\" + // MAIN-VOTE\n\t\t\t\t\"0100\" + // CP Round\n\t\t\t\t\"02\") // CP Value\n\n\t\texpectedCPDecidedSignByte, _ := hex.DecodeString(\n\t\t\t\"000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f\" + // Block hash\n\t\t\t\t\"04030201\" + // Height\n\t\t\t\t\"0100\" + // Round\n\t\t\t\t\"44454349444544\" + // DECIDED\n\t\t\t\t\"0100\" + // CP Round\n\t\t\t\t\"02\") // CP Value\n\n\t\tassert.Equal(t, expectedPrepareSignByte, cert.SignBytesPrepare(blockHash))\n\t\tassert.Equal(t, expectedPrecommitSignByte, cert.SignBytesPrecommit(blockHash))\n\t\tassert.Equal(t, expectedCPPreVoteSignByte, cert.SignBytesCPPreVote(blockHash, 1, 2))\n\t\tassert.Equal(t, expectedCPMainVoteSignByte, cert.SignBytesCPMainVote(blockHash, 1, 2))\n\t\tassert.Equal(t, expectedCPDecidedSignByte, cert.SignBytesCPDecided(blockHash, 1, 2))\n\t})\n}\n\nfunc TestCertificateCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcert1 := ts.GenerateTestCertificate(ts.RandHeight())\n\tbz1, err := cbor.Marshal(cert1)\n\trequire.NoError(t, err)\n\tvar cert2 certificate.Certificate\n\terr = cbor.Unmarshal(bz1, &cert2)\n\trequire.NoError(t, err)\n\trequire.NoError(t, cert2.BasicCheck())\n\n\tassert.True(t, cert1.Signature().EqualsTo(cert2.Signature()))\n\tassert.Equal(t, cert1.Hash(), cert2.Hash())\n\n\terr = cbor.Unmarshal([]byte{1}, &cert2)\n\trequire.Error(t, err)\n}\n\nfunc TestBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Invalid height\", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(0, 0)\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"height is not positive: 0\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(1, -1)\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"round is negative: -1\",\n\t\t})\n\t})\n\n\tt.Run(\"Committers is nil\", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(ts.RandHeight(), ts.RandRound())\n\t\tcert.SetSignature(nil, []int32{1}, ts.RandBLSSignature())\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"committers is missing\",\n\t\t})\n\t})\n\n\tt.Run(\"Absentees is nil\", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(ts.RandHeight(), ts.RandRound())\n\t\tcert.SetSignature([]int32{1, 2, 3, 4}, nil, ts.RandBLSSignature())\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"absentees is missing\",\n\t\t})\n\t})\n\n\tt.Run(\"Signature is nil\", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(ts.RandHeight(), ts.RandRound())\n\t\tcert.SetSignature([]int32{1, 2, 3, 4, 5, 6}, []int32{1}, nil)\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: \"signature is missing\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid Absentees \", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(ts.RandHeight(), ts.RandRound())\n\t\tcert.SetSignature([]int32{11, 2, 3, 4, 5, 6}, []int32{66}, ts.RandBLSSignature())\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"absentees are not a subset of committers: %v, %v\",\n\t\t\t\tcert.Committers(), []int32{66}),\n\t\t})\n\t})\n\n\tt.Run(\"Invalid Absentees \", func(t *testing.T) {\n\t\tcert := certificate.NewCertificate(ts.RandHeight(), ts.RandRound())\n\t\tcert.SetSignature([]int32{1, 2, 3, 4, 5, 6}, []int32{2, 1}, ts.RandBLSSignature())\n\n\t\terr := cert.BasicCheck()\n\t\trequire.ErrorIs(t, err, certificate.BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"absentees are not a subset of committers: %v, %v\",\n\t\t\t\tcert.Committers(), []int32{2, 1}),\n\t\t})\n\t})\n}\n\nfunc TestEncodingCertificate(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcert1 := ts.GenerateTestCertificate(ts.RandHeight())\n\tlength := cert1.SerializeSize()\n\n\tfor i := 0; i < length; i++ {\n\t\tw := util.NewFixedWriter(i)\n\t\trequire.Error(t, cert1.Encode(w), \"encode test %v failed\", i)\n\t}\n\twriter := util.NewFixedWriter(length)\n\trequire.NoError(t, cert1.Encode(writer))\n\n\tfor i := 0; i < length; i++ {\n\t\tcert := new(certificate.Certificate)\n\t\tr := util.NewFixedReader(i, writer.Bytes())\n\t\trequire.Error(t, cert.Decode(r), \"decode test %v failed\", i)\n\t}\n\n\tcert2 := new(certificate.Certificate)\n\treader := util.NewFixedReader(length, writer.Bytes())\n\trequire.NoError(t, cert2.Decode(reader))\n\tassert.Equal(t, cert1.Hash(), cert2.Hash())\n}\n\nfunc TestAddSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcert := certificate.NewCertificate(height, round)\n\tsignBytes := cert.SignBytesPrecommit(blockHash)\n\tcommitters := ts.RandSlice(4)\n\tsigs := make([]*bls.Signature, 0, len(committers))\n\tvalidators := make([]*validator.Validator, 0, len(committers))\n\n\tfor _, committer := range committers {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), committer)\n\t\tsig := valKey.Sign(signBytes)\n\n\t\tvalidators = append(validators, val)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\tabsentees := committers[3:]\n\taggSig, _ := bls.SignatureAggregate(sigs[:3]...)\n\tcert.SetSignature(committers, absentees, aggSig)\n\n\terr := cert.ValidatePrecommit(validators, blockHash)\n\trequire.NoError(t, err)\n\n\tnumAbsentees := len(cert.Absentees())\n\n\tt.Run(\"Add an existing signature\", func(t *testing.T) {\n\t\tcert.AddSignature(validators[0].Number(), sigs[0])\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Len(t, cert.Absentees(), numAbsentees)\n\t})\n\n\tt.Run(\"Add non existing signature\", func(t *testing.T) {\n\t\tcert.AddSignature(validators[3].Number(), sigs[3])\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Len(t, cert.Absentees(), numAbsentees-1)\n\t})\n}\n\n// Deprecated test.\nfunc TestCertificateValidatePrepare(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcert := certificate.NewCertificate(height, round)\n\tsignBytes := cert.SignBytesPrepare(blockHash)\n\tcommitters := ts.RandSlice(4)\n\tsigs := make([]*bls.Signature, 0, len(committers))\n\tvalidators := make([]*validator.Validator, 0, len(committers))\n\n\tfor _, committer := range committers {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), committer)\n\t\tsig := valKey.Sign(signBytes)\n\n\t\tvalidators = append(validators, val)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\tt.Run(\"Doesn't have 2f+1 majority\", func(t *testing.T) {\n\t\tabsentees := committers[2:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:2]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrepare(validators, blockHash)\n\t\trequire.ErrorIs(t, err, certificate.InsufficientPowerError{\n\t\t\tSignedPower:   2,\n\t\t\tRequiredPower: 3,\n\t\t})\n\t})\n\n\tt.Run(\"Ok, should return no error\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrepare(validators, blockHash)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestCertificateValidatePrecommit(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcert := certificate.NewCertificate(height, round)\n\tsignBytes := cert.SignBytesPrecommit(blockHash)\n\tcommitters := ts.RandSlice(4)\n\tsigs := make([]*bls.Signature, 0, len(committers))\n\tvalidators := make([]*validator.Validator, 0, len(committers))\n\n\tfor _, committer := range committers {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), committer)\n\t\tsig := valKey.Sign(signBytes)\n\n\t\tvalidators = append(validators, val)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\tt.Run(\"Invalid committer, should return error\", func(t *testing.T) {\n\t\tinvCommitters := slices.Clone(committers)\n\t\tinvCommitters = append(invCommitters, ts.Rand.Int31n(10000))\n\t\tabsentees := committers[4:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:4]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(invCommitters, absentees, aggSig)\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.ErrorIs(t, err, certificate.UnexpectedCommittersError{\n\t\t\tCommitters: invCommitters,\n\t\t})\n\t})\n\n\tt.Run(\"Invalid validator\", func(t *testing.T) {\n\t\tabsentees := committers[4:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:4]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\tinvValidators := slices.Clone(validators)\n\t\tinvValidators[0] = ts.GenerateTestValidator()\n\t\terr := cert.ValidatePrecommit(invValidators, blockHash)\n\t\trequire.ErrorIs(t, err, certificate.UnexpectedCommittersError{\n\t\t\tCommitters: committers,\n\t\t})\n\t})\n\n\tt.Run(\"Doesn't have 2f+1 majority\", func(t *testing.T) {\n\t\tabsentees := committers[2:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:2]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.ErrorIs(t, err, certificate.InsufficientPowerError{\n\t\t\tSignedPower:   2,\n\t\t\tRequiredPower: 3,\n\t\t})\n\t})\n\n\tt.Run(\"One signature short, should return an error for invalid signature\", func(t *testing.T) {\n\t\tabsentees := committers[4:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[3:]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Invalid block hash\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrecommit(validators, ts.RandHash())\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Ok, should return no error\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidatePrecommit(validators, blockHash)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestCertificateValidateCPPreVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcpRound := int16(ts.RandRound())\n\tcpValue := byte(2)\n\tcert := certificate.NewCertificate(height, round)\n\tsignBytes := cert.SignBytesCPPreVote(blockHash, cpRound, cpValue)\n\tcommitters := ts.RandSlice(4)\n\tsigs := make([]*bls.Signature, 0, len(committers))\n\tvalidators := make([]*validator.Validator, 0, len(committers))\n\n\tfor _, committer := range committers {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), committer)\n\t\tsig := valKey.Sign(signBytes)\n\n\t\tvalidators = append(validators, val)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\tt.Run(\"Invalid cpValue\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPPreVote(validators, blockHash, cpRound, byte(0))\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Doesn't have 2f+1 majority\", func(t *testing.T) {\n\t\tabsentees := committers[2:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:2]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPPreVote(validators, blockHash, cpRound, cpValue)\n\t\trequire.ErrorIs(t, err, certificate.InsufficientPowerError{\n\t\t\tSignedPower:   2,\n\t\t\tRequiredPower: 3,\n\t\t})\n\t})\n\n\tt.Run(\"Ok, should return no error\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPPreVote(validators, blockHash, cpRound, cpValue)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestCertificateValidateCPMainVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tcpRound := int16(ts.RandRound())\n\tcpValue := byte(2)\n\tcert := certificate.NewCertificate(height, round)\n\tsignBytes := cert.SignBytesCPMainVote(blockHash, cpRound, cpValue)\n\tcommitters := ts.RandSlice(4)\n\tsigs := make([]*bls.Signature, 0, len(committers))\n\tvalidators := make([]*validator.Validator, 0, len(committers))\n\n\tfor _, committer := range committers {\n\t\tvalKey := ts.RandValKey()\n\t\tval := validator.NewValidator(valKey.PublicKey(), committer)\n\t\tsig := valKey.Sign(signBytes)\n\n\t\tvalidators = append(validators, val)\n\t\tsigs = append(sigs, sig)\n\t}\n\n\tt.Run(\"Invalid cpValue\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPMainVote(validators, blockHash, cpRound, byte(0))\n\t\trequire.ErrorIs(t, err, crypto.ErrInvalidSignature)\n\t})\n\n\tt.Run(\"Doesn't have 2f+1 majority\", func(t *testing.T) {\n\t\tabsentees := committers[2:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:2]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPMainVote(validators, blockHash, cpRound, cpValue)\n\t\trequire.ErrorIs(t, err, certificate.InsufficientPowerError{\n\t\t\tSignedPower:   2,\n\t\t\tRequiredPower: 3,\n\t\t})\n\t})\n\n\tt.Run(\"Ok, should return no error\", func(t *testing.T) {\n\t\tabsentees := committers[3:]\n\t\taggSig, sigErr := bls.SignatureAggregate(sigs[:3]...)\n\t\trequire.NoError(t, sigErr)\n\t\tcert.SetSignature(committers, absentees, aggSig)\n\n\t\terr := cert.ValidateCPMainVote(validators, blockHash, cpRound, cpValue)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestClone(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tcert1 := ts.GenerateTestCertificate(ts.RandHeight())\n\tcert2 := cert1.Clone()\n\tcert2.AddSignature(cert2.Absentees()[0], ts.RandBLSSignature())\n\tassert.NotEqual(t, cert1.Absentees(), cert2.Absentees())\n\tassert.NotEqual(t, cert1, cert2)\n}\n"
  },
  {
    "path": "types/certificate/errors.go",
    "content": "package certificate\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n)\n\nvar (\n\tErrTooManyCommitters = errors.New(\"too many committers in certificate\")\n\tErrTooManyAbsentees  = errors.New(\"too many absentees in certificate\")\n)\n\n// BasicCheckError is returned when the basic check on the certificate fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n\n// UnexpectedCommittersError is returned when the list of committers\n// does not match the expectations.\ntype UnexpectedCommittersError struct {\n\tCommitters []int32\n}\n\nfunc (e UnexpectedCommittersError) Error() string {\n\treturn fmt.Sprintf(\"certificate has an unexpected committers: %v\",\n\t\te.Committers)\n}\n\nfunc (e UnexpectedCommittersError) Is(target error) bool {\n\treturn reflect.DeepEqual(e, target)\n}\n\n// InsufficientPowerError is returned when the accumulated power does not meet\n// the required threshold.\ntype InsufficientPowerError struct {\n\tSignedPower   int64\n\tRequiredPower int64\n}\n\nfunc (e InsufficientPowerError) Error() string {\n\treturn fmt.Sprintf(\"accumulated power is %v, should be at least %v\",\n\t\te.SignedPower, e.RequiredPower)\n}\n"
  },
  {
    "path": "types/certificate/power.go",
    "content": "package certificate\n\n// faultyPower calculates the maximum faulty power based on the total voting power.\n// The formula used is: `f = (n - 1) / 3`, where `n` is the total voting power.\nfunc faultyPower(totalPower int64) int64 {\n\treturn (totalPower - 1) / 3\n}\n\ntype RequiredPowerFn func(int64) int64\n\nvar Required3FP1Power = func(power int64) int64 {\n\tf := faultyPower(power)\n\tp := (3 * f) + 1\n\n\treturn p\n}\n\nvar Required2FP1Power = func(power int64) int64 {\n\tf := faultyPower(power)\n\tp := (2 * f) + 1\n\n\treturn p\n}\n\nvar Required1FP1Power = func(totalPower int64) int64 {\n\tf := faultyPower(totalPower)\n\tp := (1 * f) + 1\n\n\treturn p\n}\n\n// Has1FP1Power checks whether the signed power is greater than or equal to f+1,\n// where f is the maximum faulty power.\nfunc Has1FP1Power(totalPower, signedPower int64) bool {\n\treturn signedPower >= Required1FP1Power(totalPower)\n}\n\n// Has2FP1Power checks whether the signed power is greater than or equal to 2f+1,\n// where f is the maximum faulty power.\nfunc Has2FP1Power(totalPower, signedPower int64) bool {\n\treturn signedPower >= Required2FP1Power(totalPower)\n}\n\n// Has3FP1Power checks whether the signed power is greater than or equal to 3f+1,\n// where f is the maximum faulty power.\nfunc Has3FP1Power(totalPower, signedPower int64) bool {\n\treturn signedPower >= Required3FP1Power(totalPower)\n}\n"
  },
  {
    "path": "types/certificate/power_test.go",
    "content": "package certificate_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestPowerFunctions(t *testing.T) {\n\ttests := []struct {\n\t\ttotalPower   int64\n\t\tsignedPower  int64\n\t\thas1FP1Power bool\n\t\thas2FP1Power bool\n\t\thas3FP1Power bool\n\t}{\n\t\t{totalPower: 7, signedPower: 2, has1FP1Power: false, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 7, signedPower: 3, has1FP1Power: true, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 7, signedPower: 5, has1FP1Power: true, has2FP1Power: true, has3FP1Power: false},\n\t\t{totalPower: 7, signedPower: 7, has1FP1Power: true, has2FP1Power: true, has3FP1Power: true},\n\n\t\t{totalPower: 8, signedPower: 2, has1FP1Power: false, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 8, signedPower: 3, has1FP1Power: true, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 8, signedPower: 5, has1FP1Power: true, has2FP1Power: true, has3FP1Power: false},\n\t\t{totalPower: 8, signedPower: 7, has1FP1Power: true, has2FP1Power: true, has3FP1Power: true},\n\n\t\t{totalPower: 9, signedPower: 2, has1FP1Power: false, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 9, signedPower: 3, has1FP1Power: true, has2FP1Power: false, has3FP1Power: false},\n\t\t{totalPower: 9, signedPower: 5, has1FP1Power: true, has2FP1Power: true, has3FP1Power: false},\n\t\t{totalPower: 9, signedPower: 7, has1FP1Power: true, has2FP1Power: true, has3FP1Power: true},\n\t}\n\n\tfor _, tt := range tests {\n\t\tassert.Equal(t, tt.has1FP1Power, certificate.Has1FP1Power(tt.totalPower, tt.signedPower),\n\t\t\t\"Has1FP1Power(%d, %d)\", tt.totalPower, tt.signedPower)\n\n\t\tassert.Equal(t, tt.has2FP1Power, certificate.Has2FP1Power(tt.totalPower, tt.signedPower),\n\t\t\t\"Has2FP1Power(%d, %d)\", tt.totalPower, tt.signedPower)\n\n\t\tassert.Equal(t, tt.has3FP1Power, certificate.Has3FP1Power(tt.totalPower, tt.signedPower),\n\t\t\t\"Has3FP1Power(%d, %d)\", tt.totalPower, tt.signedPower)\n\t}\n}\n"
  },
  {
    "path": "types/height.go",
    "content": "package types\n\nimport \"github.com/pactus-project/pactus/util\"\n\ntype Height uint32\n\n// HeightFromBytesLE creates a Height from a byte slice in little-endian format.\nfunc HeightFromBytesLE(data []byte) Height {\n\treturn Height(util.BytesToUint32LE(data))\n}\n\n// SafeIncrease returns a new Height that is the result of adding count to h.\nfunc (h Height) SafeIncrease(count uint32) Height {\n\treturn Height(uint32(h) + count)\n}\n\n// SafeDecrease returns the result of subtracting other from h,\n// but it returns 0 if the result would be negative.\nfunc (h Height) SafeDecrease(count uint32) Height {\n\tif uint32(h) < count {\n\t\treturn 0\n\t}\n\n\treturn Height(uint32(h) - count)\n}\n\n// SafeSub returns the result of subtracting other from h,\n// but it returns 0 if the result would be negative.\nfunc (h Height) SafeSub(other Height) uint32 {\n\tif h < other {\n\t\treturn 0\n\t}\n\n\treturn uint32(h - other)\n}\n\n// BytesLE encodes the height as a byte slice in little-endian format.\nfunc (h Height) BytesLE() []byte {\n\treturn util.Uint32ToBytesLE(uint32(h))\n}\n"
  },
  {
    "path": "types/height_test.go",
    "content": "package types_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHeightSafeSub(t *testing.T) {\n\tsub := types.Height(10).SafeSub(5)\n\tassert.Equal(t, uint32(5), sub)\n\n\tsub = types.Height(5).SafeSub(10)\n\tassert.Equal(t, uint32(0), sub)\n\n\tsub = types.Height(10).SafeSub(10)\n\tassert.Equal(t, uint32(0), sub)\n}\n\nfunc TestHeightEncodeAsSlice(t *testing.T) {\n\ttests := []struct {\n\t\theight   types.Height\n\t\texpected []byte\n\t}{\n\t\t{height: 0, expected: []byte{0, 0, 0, 0}},\n\t\t{height: 1, expected: []byte{1, 0, 0, 0}},\n\t\t{height: 255, expected: []byte{0xff, 0, 0, 0}},\n\t\t{height: 256, expected: []byte{0, 1, 0, 0}},\n\t\t{height: 65535, expected: []byte{0xff, 0xff, 0, 0}},\n\t\t{height: 65536, expected: []byte{0, 0, 1, 0}},\n\t}\n\n\tfor _, test := range tests {\n\t\tslice := test.height.BytesLE()\n\t\theight := types.HeightFromBytesLE(slice)\n\n\t\tassert.Equal(t, test.expected, slice)\n\t\tassert.Equal(t, test.height, height)\n\t}\n}\n"
  },
  {
    "path": "types/proposal/errors.go",
    "content": "package proposal\n\nimport \"errors\"\n\n// BasicCheckError is returned when the basic check on the proposal fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n\n// ErrNoSignature is returned when the proposal has no signature.\nvar ErrNoSignature = errors.New(\"no signature\")\n"
  },
  {
    "path": "types/proposal/proposal.go",
    "content": "package proposal\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n)\n\ntype Proposal struct {\n\tdata proposalData\n}\ntype proposalData struct {\n\tHeight    types.Height   `cbor:\"1,keyasint\"`\n\tRound     types.Round    `cbor:\"2,keyasint\"`\n\tBlock     *block.Block   `cbor:\"3,keyasint\"`\n\tSignature *bls.Signature `cbor:\"4,keyasint\"`\n}\n\nfunc NewProposal(height types.Height, round types.Round, blk *block.Block) *Proposal {\n\treturn &Proposal{\n\t\tdata: proposalData{\n\t\t\tHeight: height,\n\t\t\tRound:  round,\n\t\t\tBlock:  blk,\n\t\t},\n\t}\n}\n\nfunc (p *Proposal) Height() types.Height {\n\treturn p.data.Height\n}\n\nfunc (p *Proposal) Round() types.Round {\n\treturn p.data.Round\n}\n\nfunc (p *Proposal) Block() *block.Block {\n\treturn p.data.Block\n}\n\nfunc (p *Proposal) Signature() *bls.Signature {\n\treturn p.data.Signature\n}\n\nfunc (p *Proposal) BasicCheck() error {\n\tif p.data.Block == nil {\n\t\treturn BasicCheckError{Reason: \"no block\"}\n\t}\n\tif p.data.Signature == nil {\n\t\treturn BasicCheckError{Reason: \"no signature\"}\n\t}\n\tif err := p.data.Block.BasicCheck(); err != nil {\n\t\treturn BasicCheckError{Reason: fmt.Sprintf(\"invalid block: %s\", err.Error())}\n\t}\n\tif p.data.Height <= 0 {\n\t\treturn BasicCheckError{Reason: \"invalid height\"}\n\t}\n\tif p.data.Round < 0 {\n\t\treturn BasicCheckError{Reason: \"invalid round\"}\n\t}\n\n\treturn nil\n}\n\nfunc (p *Proposal) SetSignature(sig *bls.Signature) {\n\tp.data.Signature = sig\n}\n\nfunc (p *Proposal) SignBytes() []byte {\n\treturn SignBytes(p.Block().Hash(), p.Height(), p.Round())\n}\n\nfunc (p *Proposal) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(p.data)\n}\n\nfunc (p *Proposal) UnmarshalCBOR(bs []byte) error {\n\treturn cbor.Unmarshal(bs, &p.data)\n}\n\nfunc (p *Proposal) Verify(pubKey crypto.PublicKey) error {\n\tif p.data.Signature == nil {\n\t\treturn ErrNoSignature\n\t}\n\tif err := pubKey.VerifyAddress(p.data.Block.Header().ProposerAddress()); err != nil {\n\t\treturn err\n\t}\n\n\treturn pubKey.Verify(p.SignBytes(), p.data.Signature)\n}\n\nfunc (p *Proposal) Hash() hash.Hash {\n\treturn hash.CalcHash(p.SignBytes())\n}\n\nfunc (p *Proposal) IsForBlock(h hash.Hash) bool {\n\treturn p.Block().Hash() == h\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p Proposal) LogString() string {\n\tb := p.Block()\n\n\treturn fmt.Sprintf(\"{%v/%v 🗃 %v}\", p.data.Height, p.data.Round, b.LogString())\n}\n\nfunc SignBytes(blockHash hash.Hash, height types.Height, round types.Round) []byte {\n\tsb := blockHash.Bytes()\n\tsb = append(sb, height.BytesLE()...)\n\tsb = append(sb, round.BytesLE()...)\n\n\treturn sb\n}\n\nfunc ChecKSignature(blockHash hash.Hash, height types.Height, round types.Round,\n\tsig *bls.Signature, pubKey *bls.PublicKey,\n) error {\n\tsb := SignBytes(blockHash, height, round)\n\n\treturn pubKey.Verify(sb, sig)\n}\n"
  },
  {
    "path": "types/proposal/proposal_test.go",
    "content": "package proposal_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestProposalMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tprop := ts.GenerateTestProposal(10, 10)\n\tdata, err := prop.MarshalCBOR()\n\trequire.NoError(t, err)\n\tvar p2 proposal.Proposal\n\terr = p2.UnmarshalCBOR(data)\n\trequire.NoError(t, err)\n}\n\nfunc TestProposalSignBytes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tprop := ts.GenerateTestProposal(ts.RandHeight(), ts.RandRound())\n\tsb := prop.Block().Hash().Bytes()\n\tsb = append(sb, prop.Height().BytesLE()...)\n\tsb = append(sb, prop.Round().BytesLE()...)\n\n\tassert.Equal(t, sb, prop.SignBytes())\n\tassert.Equal(t, hash.CalcHash(sb), prop.Hash())\n}\n\nfunc TestIsForBlock(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tprop := ts.GenerateTestProposal(ts.RandHeight(), ts.RandRound())\n\tassert.False(t, prop.IsForBlock(ts.RandHash()))\n\tassert.True(t, prop.IsForBlock(prop.Block().Hash()))\n}\n\nfunc TestProposalSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tproposerKey := ts.RandValKey()\n\tprop := ts.GenerateTestProposal(ts.RandHeight(), ts.RandRound(), testsuite.ProposalWithKey(proposerKey))\n\n\terr := prop.Verify(proposerKey.PublicKey())\n\trequire.NoError(t, err)\n\n\trndValKey := ts.RandValKey()\n\terr = prop.Verify(rndValKey.PublicKey())\n\trequire.ErrorIs(t, err, crypto.AddressMismatchError{\n\t\tExpected: rndValKey.Address(),\n\t\tGot:      prop.Block().Header().ProposerAddress(),\n\t})\n\n\tts.HelperSignProposal(rndValKey, prop)\n\terr = prop.Verify(proposerKey.PublicKey())\n\trequire.ErrorIs(t, crypto.ErrInvalidSignature, err)\n}\n\nfunc TestBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"No block\", func(t *testing.T) {\n\t\tp := &proposal.Proposal{}\n\t\terr := p.BasicCheck()\n\t\trequire.ErrorIs(t, err, proposal.BasicCheckError{\n\t\t\tReason: \"no block\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid height\", func(t *testing.T) {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\t\tp := proposal.NewProposal(0, 0, blk)\n\t\tp.SetSignature(ts.RandBLSSignature())\n\t\terr := p.BasicCheck()\n\t\trequire.ErrorIs(t, err, proposal.BasicCheckError{\n\t\t\tReason: \"invalid height\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tblk, _ := ts.GenerateTestBlock(ts.RandHeight())\n\t\tp := proposal.NewProposal(ts.RandHeight(), -1, blk)\n\t\tp.SetSignature(ts.RandBLSSignature())\n\t\terr := p.BasicCheck()\n\t\trequire.ErrorIs(t, err, proposal.BasicCheckError{\n\t\t\tReason: \"invalid round\",\n\t\t})\n\t})\n\n\tt.Run(\"No signature\", func(t *testing.T) {\n\t\tpub, _ := ts.RandBLSKeyPair()\n\t\tdata := ts.DecodingHex(\n\t\t\t\"a401186402000358c80140da9b641551048b59a859946ca7f9ab95c9cf84da488a1a5c49ba643b29b653dc223bc20a4e9ff03158165f3d42\" +\n\t\t\t\t\"4e2a74677bfe24a7295d1ce2e55ca3644cbe9a5a5e7d913b8e1ba6a020afbd5a25024a12b37cf8e1ed0b9498f91d75b294db0f95123d8593\" +\n\t\t\t\t\"05aa5deea3d4216777e74310b6a601bb4d4d6b13c9b295781ab1533aea032978d4f89305000000010004060f1b23010fab4f72234cc7c120\" +\n\t\t\t\t\"48bbbc616c005573d8ad4d5c6997996d6f488946cdd78410f0a400c4a7f9bdb41506bdf717a892fa0004f6\")\n\t\tprop := &proposal.Proposal{}\n\t\terr := cbor.Unmarshal(data, &prop)\n\t\trequire.NoError(t, err)\n\n\t\terr = prop.BasicCheck()\n\t\trequire.ErrorIs(t, err, proposal.BasicCheckError{\n\t\t\tReason: \"no signature\",\n\t\t})\n\n\t\terr = prop.Verify(pub)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tprop := ts.GenerateTestProposal(100, 0)\n\t\trequire.NoError(t, prop.BasicCheck())\n\t})\n}\n"
  },
  {
    "path": "types/protocol/protocol.go",
    "content": "package protocol\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\ntype Version uint8\n\nconst (\n\tProtocolVersionUnknown Version = 0\n\tProtocolVersion1       Version = 1 // Initial version\n\tProtocolVersion2       Version = 2 // Split Reward Fork (PIP-43)\n\tProtocolVersion3       Version = 3 // Validator Delegation (PIP-49)\n\n\tProtocolVersionLatest = ProtocolVersion3\n)\n\nfunc ParseVersion(s string) (Version, error) {\n\tv, err := strconv.ParseInt(s, 10, 8)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn Version(v), nil\n}\n\nfunc (v Version) String() string {\n\treturn fmt.Sprintf(\"%d\", v)\n}\n"
  },
  {
    "path": "types/protocol/protocol_test.go",
    "content": "package protocol\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestParseVersion(t *testing.T) {\n\ttests := []struct {\n\t\tinput    string\n\t\texpected Version\n\t\thasError bool\n\t}{\n\t\t{\"1\", ProtocolVersion1, false},\n\t\t{\"2\", ProtocolVersion2, false},\n\t\t{\"3\", ProtocolVersion3, false},\n\t\t{\"3\", ProtocolVersionLatest, false},\n\t\t{\"invalid\", 0, true},\n\t\t{\"0\", 0, false},\n\t\t{\"-1\", Version(255), false},\n\t\t{\"127\", Version(127), false},\n\t\t{\"128\", 0, true}, // out of int8 range\n\t}\n\n\tfor _, test := range tests {\n\t\tresult, err := ParseVersion(test.input)\n\t\tif test.hasError {\n\t\t\trequire.Error(t, err, \"ParseVersion(%q) should return error\", test.input)\n\t\t} else {\n\t\t\trequire.NoError(t, err, \"ParseVersion(%q) should not return error\", test.input)\n\t\t\tassert.Equal(t, test.expected, result, \"ParseVersion(%q)\", test.input)\n\t\t}\n\t}\n}\n\nfunc TestVersionString(t *testing.T) {\n\ttests := []struct {\n\t\tversion  Version\n\t\texpected string\n\t}{\n\t\t{ProtocolVersion1, \"1\"},\n\t\t{ProtocolVersion2, \"2\"},\n\t\t{ProtocolVersion3, \"3\"},\n\t\t{ProtocolVersionLatest, \"3\"},\n\t\t{0, \"0\"},\n\t\t{127, \"127\"},\n\t\t{255, \"255\"},\n\t}\n\n\tfor _, test := range tests {\n\t\tresult := test.version.String()\n\t\tassert.Equal(t, test.expected, result, \"Version(%d).String()\", test.version)\n\t}\n}\n"
  },
  {
    "path": "types/round.go",
    "content": "package types\n\nimport \"github.com/pactus-project/pactus/util\"\n\ntype Round int16\n\n// RoundFromBytesLE creates a Round from a byte slice in little-endian format.\nfunc RoundFromBytesLE(data []byte) Round {\n\treturn Round(util.BytesToInt16LE(data))\n}\n\n// SafeIncrease returns a new Round that is the result of adding count to h.\nfunc (h Round) SafeIncrease(count uint32) Round {\n\treturn Round(uint32(h) + count)\n}\n\n// SafeDecrease returns the result of subtracting other from h,\n// but it returns 0 if the result would be negative.\nfunc (h Round) SafeDecrease(count uint32) Round {\n\tif uint32(h) < count {\n\t\treturn 0\n\t}\n\n\treturn Round(uint32(h) - count)\n}\n\n// SafeSub returns the result of subtracting other from h,\n// but it returns 0 if the result would be negative.\nfunc (h Round) SafeSub(other Round) uint32 {\n\tif h < other {\n\t\treturn 0\n\t}\n\n\treturn uint32(h - other)\n}\n\n// BytesLE encodes the Round as a byte slice in little-endian format.\nfunc (h Round) BytesLE() []byte {\n\treturn util.Int16ToBytesLE(int16(h))\n}\n"
  },
  {
    "path": "types/round_test.go",
    "content": "package types_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRoundSafeSub(t *testing.T) {\n\tsub := types.Round(10).SafeSub(5)\n\tassert.Equal(t, uint32(5), sub)\n\n\tsub = types.Round(5).SafeSub(10)\n\tassert.Equal(t, uint32(0), sub)\n\n\tsub = types.Round(10).SafeSub(10)\n\tassert.Equal(t, uint32(0), sub)\n}\n\nfunc TestRoundEncodeAsSlice(t *testing.T) {\n\ttests := []struct {\n\t\tround    types.Round\n\t\texpected []byte\n\t}{\n\t\t{round: 0, expected: []byte{0, 0}},\n\t\t{round: 1, expected: []byte{1, 0}},\n\t\t{round: 255, expected: []byte{0xff, 0}},\n\t\t{round: 256, expected: []byte{0, 1}},\n\t\t{round: -1, expected: []byte{0xff, 0xff}},\n\t}\n\n\tfor _, test := range tests {\n\t\tslice := test.round.BytesLE()\n\t\tround := types.RoundFromBytesLE(slice)\n\n\t\tassert.Equal(t, test.expected, slice)\n\t\tassert.Equal(t, test.round, round)\n\t}\n}\n"
  },
  {
    "path": "types/tx/errors.go",
    "content": "package tx\n\nimport (\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\n// ErrInvalidSigner is returned when the signer address is not valid.\nvar ErrInvalidSigner = errors.New(\"invalid signer address\")\n\n// BasicCheckError is returned when the basic check on the transaction fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n\n// InvalidPayloadTypeError is returned when the payload type is not valid.\ntype InvalidPayloadTypeError struct {\n\tPayloadType payload.Type\n}\n\nfunc (e InvalidPayloadTypeError) Error() string {\n\treturn \"invalid payload type: \" + e.PayloadType.String()\n}\n"
  },
  {
    "path": "types/tx/factory.go",
    "content": "package tx\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\nfunc NewSubsidyTx(lockTime types.Height,\n\trecipients []payload.BatchRecipient, opts ...TxOption,\n) *Tx {\n\treturn NewBatchTransferTx(\n\t\tlockTime,\n\t\tcrypto.TreasuryAddress,\n\t\trecipients,\n\t\t0,\n\t\topts...)\n}\n\nfunc NewTransferTx(lockTime types.Height,\n\tsender, receiver crypto.Address,\n\tamt, fee amount.Amount, opts ...TxOption,\n) *Tx {\n\tpld := &payload.TransferPayload{\n\t\tFrom:   sender,\n\t\tTo:     receiver,\n\t\tAmount: amt,\n\t}\n\n\treturn newTx(lockTime, pld, fee, opts...)\n}\n\nfunc NewBatchTransferTx(lockTime types.Height,\n\tsender crypto.Address, recipients []payload.BatchRecipient,\n\tfee amount.Amount, opts ...TxOption,\n) *Tx {\n\tpld := &payload.BatchTransferPayload{\n\t\tFrom:       sender,\n\t\tRecipients: recipients,\n\t}\n\n\treturn newTx(lockTime, pld, fee, opts...)\n}\n\nfunc NewBondTx(lockTime types.Height,\n\tsender, receiver crypto.Address,\n\tpubKey *bls.PublicKey,\n\tstake, fee amount.Amount, opts ...TxOption,\n) *Tx {\n\tpld := &payload.BondPayload{\n\t\tFrom:      sender,\n\t\tTo:        receiver,\n\t\tPublicKey: pubKey,\n\t\tStake:     stake,\n\t}\n\n\treturn newTx(lockTime, pld, fee, opts...)\n}\n\nfunc NewUnbondTx(lockTime types.Height,\n\tval crypto.Address,\n\topts ...TxOption,\n) *Tx {\n\tpld := &payload.UnbondPayload{\n\t\tValidator: val,\n\t}\n\n\treturn newTx(lockTime, pld, 0, opts...)\n}\n\nfunc NewWithdrawTx(lockTime types.Height,\n\tval, acc crypto.Address,\n\tamt, fee amount.Amount,\n\topts ...TxOption,\n) *Tx {\n\tpld := &payload.WithdrawPayload{\n\t\tFrom:   val,\n\t\tTo:     acc,\n\t\tAmount: amt,\n\t}\n\n\treturn newTx(lockTime, pld, fee, opts...)\n}\n\nfunc NewSortitionTx(lockTime types.Height,\n\taddr crypto.Address,\n\tproof sortition.Proof,\n) *Tx {\n\tpld := &payload.SortitionPayload{\n\t\tValidator: addr,\n\t\tProof:     proof,\n\t}\n\n\treturn newTx(lockTime, pld, 0)\n}\n"
  },
  {
    "path": "types/tx/payload/batch_transfer.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nconst maxBatchRecipients = 8\n\ntype BatchRecipient struct {\n\tTo     crypto.Address\n\tAmount amount.Amount\n}\n\nfunc (tr *BatchRecipient) BasicCheck() error {\n\tif !tr.To.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"receiver is not an account address: \" + tr.To.String(),\n\t\t}\n\t}\n\n\tif tr.Amount <= 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"amount must be greater than zero: %d\", tr.Amount),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (tr *BatchRecipient) SerializeSize() int {\n\treturn tr.To.SerializeSize() +\n\t\tencoding.VarIntSerializeSize(uint64(tr.Amount))\n}\n\nfunc (tr *BatchRecipient) Encode(w io.Writer) error {\n\terr := tr.To.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn encoding.WriteVarInt(w, uint64(tr.Amount))\n}\n\nfunc (tr *BatchRecipient) Decode(r io.Reader) error {\n\terr := tr.To.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tamt, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttr.Amount = amount.Amount(amt)\n\n\treturn nil\n}\n\ntype BatchTransferPayload struct {\n\tFrom       crypto.Address\n\tRecipients []BatchRecipient\n}\n\nfunc (*BatchTransferPayload) Type() Type {\n\treturn TypeBatchTransfer\n}\n\nfunc (p *BatchTransferPayload) Signer() crypto.Address {\n\treturn p.From\n}\n\nfunc (p *BatchTransferPayload) Value() amount.Amount {\n\tvalue := amount.Amount(0)\n\tfor _, r := range p.Recipients {\n\t\tvalue += r.Amount\n\t}\n\n\treturn value\n}\n\n// BasicCheck performs basic checks on the Batch Transfer payload.\nfunc (p *BatchTransferPayload) BasicCheck() error {\n\tif !p.From.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"sender is not an account address: \" + p.From.String(),\n\t\t}\n\t}\n\n\tif len(p.Recipients) < 2 || len(p.Recipients) > maxBatchRecipients {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"recipients must be between 2 and %d\", maxBatchRecipients),\n\t\t}\n\t}\n\n\tfor _, r := range p.Recipients {\n\t\tif err := r.BasicCheck(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *BatchTransferPayload) SerializeSize() int {\n\tsize := p.From.SerializeSize()\n\tsize += encoding.VarIntSerializeSize(uint64(len(p.Recipients)))\n\tfor _, r := range p.Recipients {\n\t\tsize += r.SerializeSize()\n\t}\n\n\treturn size\n}\n\nfunc (p *BatchTransferPayload) Encode(w io.Writer) error {\n\terr := p.From.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = encoding.WriteVarInt(w, uint64(len(p.Recipients)))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, r := range p.Recipients {\n\t\terr = r.Encode(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *BatchTransferPayload) Decode(_ DecodeContext, r io.Reader) error {\n\terr := p.From.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tnumberOfRecipients, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif numberOfRecipients > maxBatchRecipients {\n\t\treturn ErrTooManyRecipients\n\t}\n\n\tp.Recipients = make([]BatchRecipient, numberOfRecipients)\n\tfor i := uint64(0); i < numberOfRecipients; i++ {\n\t\terr := p.Recipients[i].Decode(r)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *BatchTransferPayload) LogString() string {\n\treturn fmt.Sprintf(\"{BatchTransfer 💸 %s->[%d] %s\",\n\t\tp.From.LogString(),\n\t\tlen(p.Recipients),\n\t\tp.Value())\n}\n"
  },
  {
    "path": "types/tx/payload/batch_transfer_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBatchTransferType(t *testing.T) {\n\tpld := payload.BatchTransferPayload{}\n\tassert.Equal(t, payload.TypeBatchTransfer, pld.Type())\n}\n\nfunc TestBatchTransferString(t *testing.T) {\n\tpld := payload.BatchTransferPayload{}\n\tassert.Contains(t, pld.LogString(), \"{BatchTransfer \")\n}\n\nfunc TestBatchTransferDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw:     []byte{},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x09, // number Of Recipients (9)\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: payload.ErrTooManyRecipients,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, // number Of Recipients (2)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, // receiver-1\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, // number Of Recipients (2)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver-1\n\t\t\t\t0x80, 0x80, 0x80, // amount-1\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, // number Of Recipients (2)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver-1\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount-1\n\t\t\t\t0x02, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,\n\t\t\t\t0x19, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,\n\t\t\t\t0x41, 0x42, 0x43, 0x44, 0x45, // receiver-2\n\t\t\t\t0x80, 0x80, 0x80, // amount-2\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, // number Of Recipients (2)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver-1\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount-1\n\t\t\t\t0x02, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,\n\t\t\t\t0x19, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,\n\t\t\t\t0x41, 0x42, 0x43, 0x44, 0x45, // receiver-2\n\t\t\t\t0x80, 0x80, 0x80, 0x02, // amount-2\n\t\t\t},\n\t\t\tvalue:   0x200000 + 0x400000,\n\t\t\treadErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, // sender\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x02, // number Of Recipients (2)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver-1\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount-1\n\t\t\t\t0x02, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,\n\t\t\t\t0x19, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40,\n\t\t\t\t0x41, 0x42, 0x43, 0x44, 0x45, // receiver-2\n\t\t\t\t0x80, 0x80, 0x80, 0x02, // amount-2\n\t\t\t},\n\t\t\tvalue:   0x600000,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.BatchTransferPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tif tt.raw[0] != 0 {\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t}\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestBatchTransferBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tpld payload.BatchTransferPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.BatchTransferPayload{\n\t\t\t\tFrom:       ts.RandAccAddress(),\n\t\t\t\tRecipients: []payload.BatchRecipient{},\n\t\t\t},\n\t\t\terr: \"recipients must be between 2 and 8\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BatchTransferPayload{\n\t\t\t\tFrom: ts.RandAccAddress(),\n\t\t\t\tRecipients: []payload.BatchRecipient{\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: ts.RandAmount()},\n\t\t\t\t},\n\t\t\t},\n\t\t\terr: \"recipients must be between 2 and 8\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BatchTransferPayload{\n\t\t\t\tFrom: ts.RandAccAddress(),\n\t\t\t\tRecipients: []payload.BatchRecipient{\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: ts.RandAmount()},\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: -1},\n\t\t\t\t},\n\t\t\t},\n\t\t\terr: \"amount must be greater than zero: -1\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BatchTransferPayload{\n\t\t\t\tFrom: ts.RandAccAddress(),\n\t\t\t\tRecipients: []payload.BatchRecipient{\n\t\t\t\t\t{To: ts.RandValAddress(), Amount: ts.RandAmount()},\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: ts.RandAmount()},\n\t\t\t\t},\n\t\t\t},\n\t\t\terr: \"receiver is not an account address\",\n\t\t},\n\n\t\t{\n\t\t\tpld: payload.BatchTransferPayload{\n\t\t\t\tFrom: ts.RandValAddress(),\n\t\t\t\tRecipients: []payload.BatchRecipient{\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: ts.RandAmount()},\n\t\t\t\t\t{To: ts.RandAccAddress(), Amount: ts.RandAmount()},\n\t\t\t\t},\n\t\t\t},\n\t\t\terr: \"sender is not an account address\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t}\n}\n"
  },
  {
    "path": "types/tx/payload/bond.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype BondPayload struct {\n\tFrom      crypto.Address\n\tTo        crypto.Address\n\tPublicKey *bls.PublicKey\n\tStake     amount.Amount\n\n\t// Delegation fields\n\tDelegateOwner  crypto.Address\n\tDelegateShare  amount.Amount\n\tDelegateExpiry types.Height\n}\n\nfunc (*BondPayload) Type() Type {\n\treturn TypeBond\n}\n\nfunc (p *BondPayload) Signer() crypto.Address {\n\treturn p.From\n}\n\nfunc (p *BondPayload) Value() amount.Amount {\n\treturn p.Stake\n}\n\nfunc (p *BondPayload) IsDelegated() bool {\n\treturn p.DelegateOwner != crypto.TreasuryAddress\n}\n\n// BasicCheck performs basic checks on the Bond payload.\nfunc (p *BondPayload) BasicCheck() error {\n\tif !p.From.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"sender is not an account address: \" + p.From.String(),\n\t\t}\n\t}\n\n\tif !p.To.IsValidatorAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"receiver is not a validator address: \" + p.To.String(),\n\t\t}\n\t}\n\n\tif p.PublicKey != nil {\n\t\tif err := p.PublicKey.VerifyAddress(p.To); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif p.IsDelegated() {\n\t\tif !p.DelegateOwner.IsAccountAddress() {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"delegate owner is not an account address: \" + p.DelegateOwner.String(),\n\t\t\t}\n\t\t}\n\n\t\tif p.DelegateShare < 0 || p.DelegateShare > param.MaxDelegateOwnerRewardShare {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"delegate share must be between 0 and 0.7 PAC\",\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *BondPayload) SerializeSize() int {\n\tsize := 43 + encoding.VarIntSerializeSize(uint64(p.Stake))\n\tif p.PublicKey != nil {\n\t\tsize += 96 // pubkey size\n\t}\n\tif p.IsDelegated() {\n\t\t// delegate owner size (21) + delegate share size (var) + delegate expiry size (4)\n\t\tsize += 21 + encoding.VarIntSerializeSize(uint64(p.DelegateShare)) + 4\n\t}\n\n\treturn size\n}\n\nfunc (p *BondPayload) Encode(w io.Writer) error {\n\terr := p.From.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif p.PublicKey != nil {\n\t\terr := encoding.WriteElements(w, uint8(bls.PublicKeySize))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = p.PublicKey.Encode(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\terr := encoding.WriteElements(w, uint8(0))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif err := encoding.WriteVarInt(w, uint64(p.Stake)); err != nil {\n\t\treturn err\n\t}\n\n\tif p.IsDelegated() {\n\t\tif err := p.DelegateOwner.Encode(w); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := encoding.WriteVarInt(w, uint64(p.DelegateShare)); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := encoding.WriteElement(w, p.DelegateExpiry); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *BondPayload) Decode(ctx DecodeContext, r io.Reader) error {\n\terr := p.From.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpubKeySize, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif pubKeySize == bls.PublicKeySize {\n\t\tp.PublicKey = new(bls.PublicKey)\n\t\terr = p.PublicKey.Decode(r)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if pubKeySize != 0 {\n\t\treturn ErrInvalidPublicKeySize\n\t}\n\n\tstake, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.Stake = amount.Amount(stake)\n\n\tif ctx.WithDelegation {\n\t\tif err := p.DelegateOwner.Decode(r); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tshare, err := encoding.ReadVarInt(r)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp.DelegateShare = amount.Amount(share)\n\n\t\tif err := encoding.ReadElement(r, &p.DelegateExpiry); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *BondPayload) LogString() string {\n\treturn fmt.Sprintf(\"{Bond 🔐 %s->%s %s\",\n\t\tp.From.LogString(),\n\t\tp.To.LogString(),\n\t\tp.Stake)\n}\n"
  },
  {
    "path": "types/tx/payload/bond_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/state/param\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBondType(t *testing.T) {\n\tpld := payload.BondPayload{}\n\tassert.Equal(t, payload.TypeBond, pld.Type())\n}\n\nfunc TestBondString(t *testing.T) {\n\tpld := payload.BondPayload{}\n\tassert.Contains(t, pld.LogString(), \"{Bond \")\n}\n\nfunc TestBondDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw:     []byte{},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, // sender\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, // receiver\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,             // public key size\n\t\t\t\t0x80, 0x80, 0x80, // stake\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,                   // public key size\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00, // public key size\n\t\t\t\t0x00, // stake is zero\n\t\t\t},\n\t\t\tvalue:   0x0,\n\t\t\treadErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x01, // public key size\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: payload.ErrInvalidPublicKeySize,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x60, // public key size\n\t\t\t\t0xaf, // public key\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0xa1, 0x95, 0xd7, 0xfe, 0xcb, 0xa4, 0xc6,\n\t\t\t\t0x36, 0x83, 0x2f, 0x1d, 0xb0, 0xcd, 0x0e, 0xa1,\n\t\t\t\t0x4d, 0xb6, 0xdb, 0x8c, 0x71, // receiver\n\t\t\t\t0x60, // public key size\n\t\t\t\t0xaf, 0x0f, 0x74, 0x91, 0x7f, 0x50, 0x65, 0xaf, 0x94, 0x72,\n\t\t\t\t0x7a, 0xe9, 0x54, 0x1b, 0x0d, 0xdc, 0xfb, 0x5b, 0x82, 0x8a,\n\t\t\t\t0x9e, 0x01, 0x6b, 0x02, 0x49, 0x8f, 0x47, 0x7e, 0xd3, 0x7f,\n\t\t\t\t0xb4, 0x4d, 0x5d, 0x88, 0x24, 0x95, 0xaf, 0xb6, 0xfd, 0x4f,\n\t\t\t\t0x97, 0x73, 0xe4, 0xea, 0x9d, 0xee, 0xe4, 0x36, 0x03, 0x0c,\n\t\t\t\t0x4d, 0x61, 0xc6, 0xe3, 0xa1, 0x15, 0x15, 0x85, 0xe1, 0xd8,\n\t\t\t\t0x38, 0xca, 0xe1, 0x44, 0x4a, 0x43, 0x8d, 0x08, 0x9c, 0xe7,\n\t\t\t\t0x7e, 0x10, 0xc4, 0x92, 0xa5, 0x5f, 0x69, 0x08, 0x12, 0x5c,\n\t\t\t\t0x5b, 0xe9, 0xb2, 0x36, 0xa2, 0x46, 0xe4, 0x08, 0x2d, 0x08,\n\t\t\t\t0xde, 0x56, 0x4e, 0x11, 0x1e, 0x65, // public key\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.BondPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestBondWithDelegateDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw      []byte\n\t\tvalue    amount.Amount\n\t\treadErr  error\n\t\tbasicErr error\n\t}{\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,                   // public key size\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,                   // public key size\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x22, 0x23, 0x24, 0x25, // Delegate Owner\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,                   // public key size\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x22, 0x23, 0x24, 0x25, // Delegate Owner\n\t\t\t\t0x80, 0xca, 0xb5, 0xee, 0x01, // Delegate share: 0.5 PAC\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x00,                   // public key size\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // stake\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x22, 0x23, 0x24, 0x25, // Delegate Owner\n\t\t\t\t0x80, 0xca, 0xb5, 0xee, 0x01, // Delegate share: 0.5 PAC\n\t\t\t\t0x10, 0x00, 0x00, 0x00, // Delegate expiry: 1\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.BondPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{WithDelegation: true}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\tif tt.basicErr != nil {\n\t\t\t\terr := pld.BasicCheck()\n\t\t\t\trequire.ErrorIs(t, err, tt.basicErr, \"basic check %v failed\", no)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t\t// Check signer\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestBondBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tranPub, _ := ts.RandBLSKeyPair()\n\ttests := []struct {\n\t\tpld payload.BondPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:  ts.RandValAddress(),\n\t\t\t\tTo:    ts.RandValAddress(),\n\t\t\t\tStake: ts.RandAmount(),\n\t\t\t},\n\t\t\terr: \"sender is not an account address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:  ts.RandAccAddress(),\n\t\t\t\tTo:    ts.RandAccAddress(),\n\t\t\t\tStake: ts.RandAmount(),\n\t\t\t},\n\t\t\terr: \"receiver is not a validator address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:      ts.RandAccAddress(),\n\t\t\t\tTo:        ts.RandValAddress(),\n\t\t\t\tStake:     ts.RandAmount(),\n\t\t\t\tPublicKey: ranPub,\n\t\t\t},\n\t\t\terr: \"address mismatch\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:          ts.RandAccAddress(),\n\t\t\t\tTo:            ts.RandValAddress(),\n\t\t\t\tStake:         ts.RandAmount(),\n\t\t\t\tDelegateOwner: ts.RandValAddress(),\n\t\t\t},\n\t\t\terr: \"delegate owner is not an account address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:          ts.RandAccAddress(),\n\t\t\t\tTo:            ts.RandValAddress(),\n\t\t\t\tStake:         ts.RandAmount(),\n\t\t\t\tDelegateOwner: ts.RandAccAddress(),\n\t\t\t\tDelegateShare: -1,\n\t\t\t},\n\t\t\terr: \"delegate share must be between 0 and 0.7 PAC\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:          ts.RandAccAddress(),\n\t\t\t\tTo:            ts.RandValAddress(),\n\t\t\t\tStake:         ts.RandAmount(),\n\t\t\t\tDelegateOwner: ts.RandAccAddress(),\n\t\t\t\tDelegateShare: param.MaxDelegateOwnerRewardShare + 1,\n\t\t\t},\n\t\t\terr: \"delegate share must be between 0 and 0.7 PAC\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.BondPayload{\n\t\t\t\tFrom:          ts.RandAccAddress(),\n\t\t\t\tTo:            ts.RandValAddress(),\n\t\t\t\tStake:         ts.RandAmount(),\n\t\t\t\tDelegateOwner: ts.RandAccAddress(),\n\t\t\t\tDelegateShare: 0, // 0 PAC\n\t\t\t},\n\t\t\terr: \"\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tif tt.err == \"\" {\n\t\t\trequire.NoError(t, tt.pld.BasicCheck(), \"test %v failed\", no)\n\t\t} else {\n\t\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "types/tx/payload/errors.go",
    "content": "package payload\n\nimport \"errors\"\n\n// ErrInvalidPublicKeySize is returned when the public key size is not valid.\nvar (\n\tErrInvalidPublicKeySize = errors.New(\"invalid public key size\")\n\tErrTooManyRecipients    = errors.New(\"too many recipients in batch transfer\")\n)\n\n// BasicCheckError describes is returned when the basic check on the transaction's payload fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "types/tx/payload/payload.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n)\n\ntype Type uint8\n\nconst (\n\tTypeTransfer      = Type(1)\n\tTypeBond          = Type(2)\n\tTypeSortition     = Type(3)\n\tTypeUnbond        = Type(4)\n\tTypeWithdraw      = Type(5)\n\tTypeBatchTransfer = Type(6)\n)\n\nfunc (t Type) String() string {\n\tswitch t {\n\tcase TypeTransfer:\n\t\treturn \"transfer\"\n\tcase TypeBond:\n\t\treturn \"bond\"\n\tcase TypeUnbond:\n\t\treturn \"unbond\"\n\tcase TypeWithdraw:\n\t\treturn \"withdraw\"\n\tcase TypeSortition:\n\t\treturn \"sortition\"\n\tcase TypeBatchTransfer:\n\t\treturn \"batch-transfer\"\n\t}\n\n\treturn fmt.Sprintf(\"%d\", t)\n}\n\n// DecodeContext holds options passed when decoding a payload.\ntype DecodeContext struct {\n\tWithDelegation bool\n}\n\ntype Payload interface {\n\tSigner() crypto.Address\n\tValue() amount.Amount\n\tType() Type\n\tSerializeSize() int\n\tEncode(io.Writer) error\n\tDecode(DecodeContext, io.Reader) error\n\tBasicCheck() error\n\tLogString() string\n}\n"
  },
  {
    "path": "types/tx/payload/sortition.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype SortitionPayload struct {\n\tValidator crypto.Address\n\tProof     sortition.Proof\n}\n\nfunc (*SortitionPayload) Type() Type {\n\treturn TypeSortition\n}\n\nfunc (p *SortitionPayload) Signer() crypto.Address {\n\treturn p.Validator\n}\n\nfunc (*SortitionPayload) Value() amount.Amount {\n\treturn 0\n}\n\n// BasicCheck performs basic checks on the Sortition payload.\nfunc (p *SortitionPayload) BasicCheck() error {\n\tif !p.Validator.IsValidatorAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"address is not a validator address: \" + p.Validator.String(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (*SortitionPayload) SerializeSize() int {\n\treturn 69 // 48+21\n}\n\nfunc (p *SortitionPayload) Encode(w io.Writer) error {\n\terr := p.Validator.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn encoding.WriteElements(w, &p.Proof)\n}\n\nfunc (p *SortitionPayload) Decode(_ DecodeContext, r io.Reader) error {\n\treturn encoding.ReadElements(r, &p.Validator, &p.Proof)\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *SortitionPayload) LogString() string {\n\treturn fmt.Sprintf(\"{Sortition 🎯 %s\",\n\t\tp.Validator.LogString())\n}\n"
  },
  {
    "path": "types/tx/payload/sortition_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSortitionType(t *testing.T) {\n\tpld := payload.SortitionPayload{}\n\tassert.Equal(t, payload.TypeSortition, pld.Type())\n}\n\nfunc TestSortitionString(t *testing.T) {\n\tpld := payload.SortitionPayload{}\n\tassert.Contains(t, pld.LogString(), \"{Sortition \")\n}\n\nfunc TestSortitionDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw:     []byte{},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, // address\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // address\n\t\t\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n\t\t\t\t0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,\n\t\t\t\t0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n\t\t\t\t0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,\n\t\t\t\t0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,\n\t\t\t\t0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, // proof\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // address\n\t\t\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n\t\t\t\t0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,\n\t\t\t\t0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n\t\t\t\t0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,\n\t\t\t\t0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,\n\t\t\t\t0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, // proof\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.SortitionPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tif tt.raw[0] != 0 {\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t}\n\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestSortitionBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tpld payload.SortitionPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.SortitionPayload{\n\t\t\t\tValidator: ts.RandAccAddress(),\n\t\t\t},\n\t\t\terr: \"address is not a validator address\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t}\n}\n"
  },
  {
    "path": "types/tx/payload/transfer.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype TransferPayload struct {\n\tFrom   crypto.Address\n\tTo     crypto.Address\n\tAmount amount.Amount\n}\n\nfunc (*TransferPayload) Type() Type {\n\treturn TypeTransfer\n}\n\nfunc (p *TransferPayload) Signer() crypto.Address {\n\treturn p.From\n}\n\nfunc (p *TransferPayload) Value() amount.Amount {\n\treturn p.Amount\n}\n\n// BasicCheck performs basic checks on the Transfer payload.\nfunc (p *TransferPayload) BasicCheck() error {\n\tif !p.From.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"sender is not an account address: \" + p.From.String(),\n\t\t}\n\t}\n\tif !p.To.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"receiver is not an account address: \" + p.To.String(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *TransferPayload) SerializeSize() int {\n\treturn p.From.SerializeSize() +\n\t\tp.To.SerializeSize() +\n\t\tencoding.VarIntSerializeSize(uint64(p.Amount))\n}\n\nfunc (p *TransferPayload) Encode(w io.Writer) error {\n\terr := p.From.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn encoding.WriteVarInt(w, uint64(p.Amount))\n}\n\nfunc (p *TransferPayload) Decode(_ DecodeContext, r io.Reader) error {\n\terr := p.From.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tamt, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.Amount = amount.Amount(amt)\n\n\treturn nil\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *TransferPayload) LogString() string {\n\treturn fmt.Sprintf(\"{Transfer 💸 %s->%s %s\",\n\t\tp.From.LogString(),\n\t\tp.To.LogString(),\n\t\tp.Amount)\n}\n"
  },
  {
    "path": "types/tx/payload/transfer_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTransferType(t *testing.T) {\n\tpld := payload.TransferPayload{}\n\tassert.Equal(t, payload.TypeTransfer, pld.Type())\n}\n\nfunc TestTransferString(t *testing.T) {\n\tpld := payload.TransferPayload{}\n\tassert.Contains(t, pld.LogString(), \"{Transfer \")\n}\n\nfunc TestTransferDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw:     []byte{},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, // receiver\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x80, 0x80, 0x80, // amount\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x00, // sender (Treasury)\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, // sender\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // sender\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // receiver\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount\n\t\t\t},\n\t\t\tvalue:   0x200000,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.TransferPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tif tt.raw[0] != 0 {\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t}\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestTransferBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tpld payload.TransferPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.TransferPayload{\n\t\t\t\tFrom: ts.RandValAddress(),\n\t\t\t\tTo:   ts.RandAccAddress(),\n\t\t\t},\n\t\t\terr: \"sender is not an account address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.TransferPayload{\n\t\t\t\tFrom: ts.RandAccAddress(),\n\t\t\t\tTo:   ts.RandValAddress(),\n\t\t\t},\n\t\t\terr: \"receiver is not an account address\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t}\n}\n"
  },
  {
    "path": "types/tx/payload/unbond.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n)\n\ntype UnbondPayload struct {\n\tValidator crypto.Address\n\n\t// Delegation fields\n\tDelegateOwner crypto.Address\n}\n\nfunc (*UnbondPayload) Type() Type {\n\treturn TypeUnbond\n}\n\nfunc (p *UnbondPayload) Signer() crypto.Address {\n\tif p.IsDelegated() {\n\t\treturn p.DelegateOwner\n\t}\n\n\treturn p.Validator\n}\n\nfunc (*UnbondPayload) Value() amount.Amount {\n\treturn 0\n}\n\n// BasicCheck performs basic checks on the Unbond payload.\nfunc (p *UnbondPayload) BasicCheck() error {\n\tif !p.Validator.IsValidatorAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"address is not a validator address: \" + p.Validator.String(),\n\t\t}\n\t}\n\n\tif p.IsDelegated() {\n\t\tif !p.DelegateOwner.IsAccountAddress() {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"delegation owner is not an account address: \" + p.DelegateOwner.String(),\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *UnbondPayload) SerializeSize() int {\n\tsize := 21 // Validator address size\n\tif p.IsDelegated() {\n\t\tsize += 21 // Delegate owner address size\n\t}\n\n\treturn size\n}\n\nfunc (p *UnbondPayload) Encode(w io.Writer) error {\n\tif err := p.Validator.Encode(w); err != nil {\n\t\treturn err\n\t}\n\tif p.IsDelegated() {\n\t\tif err := p.DelegateOwner.Encode(w); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *UnbondPayload) Decode(ctx DecodeContext, r io.Reader) error {\n\tif err := p.Validator.Decode(r); err != nil {\n\t\treturn err\n\t}\n\tif ctx.WithDelegation {\n\t\tif err := p.DelegateOwner.Decode(r); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *UnbondPayload) IsDelegated() bool {\n\treturn p.DelegateOwner != crypto.TreasuryAddress\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *UnbondPayload) LogString() string {\n\treturn fmt.Sprintf(\"{Unbond 🔓 %s\",\n\t\tp.Validator.LogString(),\n\t)\n}\n"
  },
  {
    "path": "types/tx/payload/unbond_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestUnbondType(t *testing.T) {\n\tpld := payload.UnbondPayload{}\n\tassert.Equal(t, payload.TypeUnbond, pld.Type())\n}\n\nfunc TestUnbondString(t *testing.T) {\n\tpld := payload.UnbondPayload{}\n\tassert.Contains(t, pld.LogString(), \"{Unbond \")\n}\n\nfunc TestUnbondDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw:     []byte{},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24,\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.ErrUnexpectedEOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // validator\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.UnbondPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tif tt.raw[0] != 0 {\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t}\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestUnbondWithDelegationDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw     []byte\n\t\tvalue   amount.Amount\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // validator\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: io.EOF,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // validator\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // Delegate Owner\n\t\t\t},\n\t\t\tvalue:   0,\n\t\t\treadErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.UnbondPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{WithDelegation: true}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\n\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t// Check signer\n\t\t\tif tt.raw[0] != 0 {\n\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[21:42]), pld.Signer())\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t}\n\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t}\n\t}\n}\n\nfunc TestUnbondBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tpld payload.UnbondPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.UnbondPayload{\n\t\t\t\tValidator: ts.RandAccAddress(),\n\t\t\t},\n\t\t\terr: \"address is not a validator address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.UnbondPayload{\n\t\t\t\tValidator:     ts.RandValAddress(),\n\t\t\t\tDelegateOwner: ts.RandValAddress(),\n\t\t\t},\n\t\t\terr: \"delegation owner is not an account address\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t}\n}\n"
  },
  {
    "path": "types/tx/payload/withdraw.go",
    "content": "package payload\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\ntype WithdrawPayload struct {\n\tFrom   crypto.Address // withdraw from validator address\n\tTo     crypto.Address // deposit to account address\n\tAmount amount.Amount  // amount to deposit\n}\n\nfunc (*WithdrawPayload) Type() Type {\n\treturn TypeWithdraw\n}\n\nfunc (p *WithdrawPayload) Signer() crypto.Address {\n\treturn p.From\n}\n\nfunc (p *WithdrawPayload) Value() amount.Amount {\n\treturn p.Amount\n}\n\n// BasicCheck performs basic checks on the Withdraw payload.\nfunc (p *WithdrawPayload) BasicCheck() error {\n\tif !p.From.IsValidatorAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"sender is not a validator address: \" + p.From.String(),\n\t\t}\n\t}\n\tif !p.To.IsAccountAddress() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"receiver is not an account address: \" + p.To.String(),\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (p *WithdrawPayload) SerializeSize() int {\n\treturn p.From.SerializeSize() +\n\t\tp.To.SerializeSize() +\n\t\tencoding.VarIntSerializeSize(uint64(p.Amount))\n}\n\nfunc (p *WithdrawPayload) Encode(w io.Writer) error {\n\terr := p.From.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn encoding.WriteVarInt(w, uint64(p.Amount))\n}\n\nfunc (p *WithdrawPayload) Decode(_ DecodeContext, r io.Reader) error {\n\terr := p.From.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = p.To.Decode(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tamt, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.Amount = amount.Amount(amt)\n\n\treturn nil\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (p *WithdrawPayload) LogString() string {\n\treturn fmt.Sprintf(\"{Withdraw 🧾 %s->%s %s\",\n\t\tp.From.LogString(),\n\t\tp.To.LogString(),\n\t\tp.Amount)\n}\n"
  },
  {
    "path": "types/tx/payload/withdraw_test.go",
    "content": "package payload_test\n\nimport (\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestWithdrawType(t *testing.T) {\n\tpld := payload.WithdrawPayload{}\n\tassert.Equal(t, payload.TypeWithdraw, pld.Type())\n}\n\nfunc TestWithdrawString(t *testing.T) {\n\tpld := payload.WithdrawPayload{}\n\tassert.Contains(t, pld.LogString(), \"{Withdraw \")\n}\n\nfunc TestWithdrawDecoding(t *testing.T) {\n\ttests := []struct {\n\t\traw      []byte\n\t\tvalue    amount.Amount\n\t\treadErr  error\n\t\tbasicErr error\n\t}{\n\t\t{\n\t\t\traw:      []byte{},\n\t\t\tvalue:    0,\n\t\t\treadErr:  io.EOF,\n\t\t\tbasicErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, // from\n\t\t\t},\n\t\t\tvalue:    0,\n\t\t\treadErr:  io.ErrUnexpectedEOF,\n\t\t\tbasicErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // from\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, // to\n\t\t\t},\n\t\t\tvalue:    0,\n\t\t\treadErr:  io.ErrUnexpectedEOF,\n\t\t\tbasicErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // from\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // to\n\t\t\t\t0x80, 0x80, 0x80, // amount\n\t\t\t},\n\t\t\tvalue:    0,\n\t\t\treadErr:  io.EOF,\n\t\t\tbasicErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // from\n\t\t\t\t0x02, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20,\n\t\t\t\t0x21, 0x12, 0x23, 0x24, 0x25, // to\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount\n\t\t\t},\n\t\t\tvalue:    0x200000,\n\t\t\treadErr:  nil,\n\t\t\tbasicErr: nil,\n\t\t},\n\t\t{\n\t\t\traw: []byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, // from\n\t\t\t\t0x00,                   // to (treasury address)\n\t\t\t\t0x80, 0x80, 0x80, 0x01, // amount\n\t\t\t},\n\t\t\tvalue:    0x200000,\n\t\t\treadErr:  nil,\n\t\t\tbasicErr: nil,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tpld := payload.WithdrawPayload{}\n\t\tr := util.NewFixedReader(len(tt.raw), tt.raw)\n\t\terr := pld.Decode(payload.DecodeContext{}, r)\n\t\tif tt.readErr != nil {\n\t\t\trequire.ErrorIs(t, err, tt.readErr)\n\t\t} else {\n\t\t\trequire.NoError(t, err)\n\n\t\t\tfor i := 0; i < pld.SerializeSize(); i++ {\n\t\t\t\tw := util.NewFixedWriter(i)\n\t\t\t\trequire.Error(t, pld.Encode(w), \"encode test %v failed\", no)\n\t\t\t}\n\t\t\tw := util.NewFixedWriter(pld.SerializeSize())\n\t\t\trequire.NoError(t, pld.Encode(w))\n\t\t\tassert.Len(t, w.Bytes(), pld.SerializeSize())\n\t\t\tassert.Equal(t, tt.raw, w.Bytes())\n\n\t\t\t// Basic check\n\t\t\tif tt.basicErr != nil {\n\t\t\t\trequire.ErrorIs(t, pld.BasicCheck(), tt.basicErr)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, pld.BasicCheck())\n\n\t\t\t\t// Check signer\n\t\t\t\tif tt.raw[0] != 0 {\n\t\t\t\t\tassert.Equal(t, crypto.Address(tt.raw[:21]), pld.Signer())\n\t\t\t\t} else {\n\t\t\t\t\tassert.Equal(t, crypto.TreasuryAddress, pld.Signer())\n\t\t\t\t}\n\t\t\t\tassert.Equal(t, tt.value, pld.Value())\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestWithdrawBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tpld payload.WithdrawPayload\n\t\terr string\n\t}{\n\t\t{\n\t\t\tpld: payload.WithdrawPayload{\n\t\t\t\tFrom: ts.RandAccAddress(),\n\t\t\t\tTo:   ts.RandAccAddress(),\n\t\t\t},\n\t\t\terr: \"sender is not a validator address\",\n\t\t},\n\t\t{\n\t\t\tpld: payload.WithdrawPayload{\n\t\t\t\tFrom: ts.RandValAddress(),\n\t\t\t\tTo:   ts.RandValAddress(),\n\t\t\t},\n\t\t\terr: \"receiver is not an account address\",\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tassert.ErrorContains(t, tt.pld.BasicCheck(), tt.err, \"test %v failed\", no)\n\t}\n}\n"
  },
  {
    "path": "types/tx/tx.go",
    "content": "package tx\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\nconst (\n\tversionLatest        = 0x01\n\tflagStripedPublicKey = 0x01\n\tflagNotSigned        = 0x02\n\tflagWithDelegation   = 0x04\n\tmaxMemoLength        = 64\n)\n\ntype ID = hash.Hash\n\ntype Tx struct {\n\tmemorizedID  *ID\n\tbasicChecked bool\n\n\tdata txData\n}\n\ntype txData struct {\n\tVersion   uint8\n\tLockTime  types.Height\n\tFee       amount.Amount\n\tMemo      string\n\tPayload   payload.Payload\n\tSignature crypto.Signature\n\tPublicKey crypto.PublicKey\n}\n\ntype TxOption func(*txData)\n\nfunc WithMemo(memo string) TxOption {\n\treturn func(td *txData) {\n\t\ttd.Memo = memo\n\t}\n}\n\nfunc newTx(lockTime types.Height, pld payload.Payload, fee amount.Amount, opts ...TxOption) *Tx {\n\tdata := txData{\n\t\tLockTime: lockTime,\n\t\tVersion:  versionLatest,\n\t\tPayload:  pld,\n\t\tFee:      fee,\n\t}\n\n\tfor _, opt := range opts {\n\t\topt(&data)\n\t}\n\n\treturn &Tx{data: data}\n}\n\n// FromString constructs a new transaction from a hex-encoded string.\nfunc FromString(str string) (*Tx, error) {\n\tbs, err := hex.DecodeString(str)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn FromBytes(bs)\n}\n\n// FromBytes constructs a new transaction from raw byte data.\nfunc FromBytes(bs []byte) (*Tx, error) {\n\ttrx := new(Tx)\n\tr := bytes.NewReader(bs)\n\tif err := trx.Decode(r); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn trx, nil\n}\n\nfunc (tx *Tx) Version() uint8 {\n\treturn tx.data.Version & 0x0f\n}\n\nfunc (tx *Tx) LockTime() types.Height {\n\treturn tx.data.LockTime\n}\n\nfunc (tx *Tx) Payload() payload.Payload {\n\treturn tx.data.Payload\n}\n\nfunc (tx *Tx) Fee() amount.Amount {\n\treturn tx.data.Fee\n}\n\nfunc (tx *Tx) Memo() string {\n\treturn tx.data.Memo\n}\n\nfunc (tx *Tx) PublicKey() crypto.PublicKey {\n\treturn tx.data.PublicKey\n}\n\nfunc (tx *Tx) Signature() crypto.Signature {\n\treturn tx.data.Signature\n}\n\n// IsFreeTx checks if the transaction fee should be set to zero.\nfunc (tx *Tx) IsFreeTx() bool {\n\treturn tx.IsSubsidyTx() || tx.IsSortitionTx() || tx.IsUnbondTx()\n}\n\nfunc (tx *Tx) SetSignature(sig crypto.Signature) {\n\ttx.basicChecked = false\n\ttx.data.Signature = sig\n}\n\nfunc (tx *Tx) SetPublicKey(pub crypto.PublicKey) {\n\ttx.basicChecked = false\n\ttx.data.PublicKey = pub\n}\n\nfunc (tx *Tx) BasicCheck() error {\n\tif tx.basicChecked {\n\t\treturn nil\n\t}\n\tif tx.Version() != versionLatest {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"invalid version: %d\", tx.Version()),\n\t\t}\n\t}\n\tif tx.LockTime() == 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"lock time is not defined\",\n\t\t}\n\t}\n\tif len(tx.Memo()) > maxMemoLength {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"memo length exceeded: %d\", len(tx.Memo())),\n\t\t}\n\t}\n\tif tx.Payload().Value() < 0 || tx.Payload().Value() > amount.MaxNanoPAC {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"invalid amount: %s\", tx.Payload().Value()),\n\t\t}\n\t}\n\tif err := tx.Payload().BasicCheck(); err != nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"invalid payload: %s\", err.Error()),\n\t\t}\n\t}\n\tif err := tx.checkFee(); err != nil {\n\t\treturn err\n\t}\n\tif err := tx.checkSignature(); err != nil {\n\t\treturn err\n\t}\n\n\ttx.basicChecked = true\n\n\treturn nil\n}\n\nfunc (tx *Tx) checkFee() error {\n\tif tx.Fee() < 0 || tx.Fee() > amount.MaxNanoPAC {\n\t\treturn BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"invalid fee: %s\", tx.Fee()),\n\t\t}\n\t}\n\tif tx.IsFreeTx() {\n\t\tif tx.Fee() != 0 {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: fmt.Sprintf(\"invalid fee: %s\", tx.Fee()),\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (tx *Tx) checkSignature() error {\n\tif tx.IsSubsidyTx() {\n\t\t// Ensure no signatory is set for subsidy transactions.\n\t\tif tx.PublicKey() != nil || tx.Signature() != nil {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"subsidy transaction with signatory\",\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n\n\t// Non-subsidy transactions should have a valid signatory.\n\tif tx.PublicKey() == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"no public key\",\n\t\t}\n\t}\n\n\tif tx.Signature() == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"no signature\",\n\t\t}\n\t}\n\n\tif err := tx.PublicKey().VerifyAddress(tx.Payload().Signer()); err != nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: err.Error(),\n\t\t}\n\t}\n\n\tsignBytes := tx.SignBytes()\n\tif err := tx.PublicKey().Verify(signBytes, tx.Signature()); err != nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid signature\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Bytes returns the serialized bytes for the Transaction.\nfunc (tx *Tx) Bytes() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize()))\n\terr := tx.Encode(buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf.Bytes(), nil\n}\n\nfunc (tx *Tx) MarshalCBOR() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize()))\n\tif err := tx.Encode(buf); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn cbor.Marshal(buf.Bytes())\n}\n\nfunc (tx *Tx) UnmarshalCBOR(bs []byte) error {\n\tdata := make([]byte, 0, tx.SerializeSize())\n\terr := cbor.Unmarshal(bs, &data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbuf := bytes.NewBuffer(data)\n\n\treturn tx.Decode(buf)\n}\n\n// SerializeSize returns the number of bytes it would take to serialize the transaction.\nfunc (tx *Tx) SerializeSize() int {\n\tsize := 7 + //  flag (1) + version (1) + payload type (1) + lock_time (4)\n\t\tencoding.VarIntSerializeSize(uint64(tx.Fee())) +\n\t\tencoding.VarStringSerializeSize(tx.Memo())\n\tif tx.Payload() != nil {\n\t\tsize += tx.Payload().SerializeSize()\n\t}\n\tif tx.data.Signature != nil {\n\t\tsize += tx.data.Signature.SerializeSize()\n\t}\n\tif tx.data.PublicKey != nil {\n\t\tsize += tx.data.PublicKey.SerializeSize()\n\t}\n\n\treturn size\n}\n\ntype EncodeOption func(*encodeOptions)\n\ntype encodeOptions struct {\n\tstripPublicKey bool\n}\n\nfunc defaultEncodeOptions() *encodeOptions {\n\treturn &encodeOptions{\n\t\tstripPublicKey: false,\n\t}\n}\n\nfunc StripPublicKey() EncodeOption {\n\treturn func(opts *encodeOptions) {\n\t\topts.stripPublicKey = true\n\t}\n}\n\nfunc (tx *Tx) Encode(w io.Writer, opts ...EncodeOption) error {\n\tencOpts := defaultEncodeOptions()\n\tfor _, opt := range opts {\n\t\topt(encOpts)\n\t}\n\n\tflags := uint8(flagNotSigned)\n\tif tx.IsSigned() {\n\t\tflags = util.UnsetFlag(flags, flagNotSigned)\n\t\tif encOpts.stripPublicKey || tx.IsPublicKeyStriped() {\n\t\t\tflags = util.SetFlag(flags, flagStripedPublicKey)\n\t\t}\n\t}\n\n\tif pld, ok := tx.data.Payload.(*payload.BondPayload); ok && pld.IsDelegated() {\n\t\tflags = util.SetFlag(flags, flagWithDelegation)\n\t}\n\tif pld, ok := tx.data.Payload.(*payload.UnbondPayload); ok && pld.IsDelegated() {\n\t\tflags = util.SetFlag(flags, flagWithDelegation)\n\t}\n\n\terr := encoding.WriteElement(w, flags)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = tx.encodeWithNoSignatory(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif tx.data.Signature != nil {\n\t\terr = tx.data.Signature.Encode(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif tx.data.PublicKey != nil && !encOpts.stripPublicKey {\n\t\terr = tx.data.PublicKey.Encode(w)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (tx *Tx) encodeWithNoSignatory(w io.Writer) error {\n\terr := encoding.WriteElements(w, tx.data.Version, tx.data.LockTime)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = encoding.WriteVarInt(w, uint64(tx.data.Fee))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = encoding.WriteVarString(w, tx.data.Memo)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = encoding.WriteElement(w, uint8(tx.data.Payload.Type()))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = tx.data.Payload.Encode(w)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (tx *Tx) Decode(r io.Reader) error {\n\tflags := uint8(0)\n\terr := encoding.ReadElements(r, &flags, &tx.data.Version, &tx.data.LockTime)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfee, err := encoding.ReadVarInt(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttx.data.Fee = amount.Amount(fee)\n\n\ttx.data.Memo, err = encoding.ReadVarString(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpayloadType := uint8(0)\n\terr = encoding.ReadElement(r, &payloadType)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tswitch typ := payload.Type(payloadType); typ {\n\tcase payload.TypeTransfer:\n\t\ttx.data.Payload = new(payload.TransferPayload)\n\tcase payload.TypeBond:\n\t\ttx.data.Payload = new(payload.BondPayload)\n\tcase payload.TypeUnbond:\n\t\ttx.data.Payload = new(payload.UnbondPayload)\n\tcase payload.TypeWithdraw:\n\t\ttx.data.Payload = new(payload.WithdrawPayload)\n\tcase payload.TypeSortition:\n\t\ttx.data.Payload = new(payload.SortitionPayload)\n\tcase payload.TypeBatchTransfer:\n\t\ttx.data.Payload = new(payload.BatchTransferPayload)\n\n\tdefault:\n\t\treturn InvalidPayloadTypeError{\n\t\t\tPayloadType: typ,\n\t\t}\n\t}\n\n\tctx := payload.DecodeContext{\n\t\tWithDelegation: util.IsFlagSet(flags, flagWithDelegation),\n\t}\n\terr = tx.data.Payload.Decode(ctx, r)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif util.IsFlagSet(flags, flagNotSigned) {\n\t\treturn nil\n\t}\n\t// It is a signed transaction, Decode signatory.\n\tsig, err := tx.decodeSignature(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttx.data.Signature = sig\n\n\tif util.IsFlagSet(flags, flagStripedPublicKey) {\n\t\treturn nil\n\t}\n\t// It has a public key, decode it.\n\tpub, err := tx.decodePublicKey(r)\n\tif err != nil {\n\t\treturn err\n\t}\n\ttx.data.PublicKey = pub\n\n\treturn nil\n}\n\nfunc (tx *Tx) decodeSignature(r io.Reader) (crypto.Signature, error) {\n\tswitch tx.data.Payload.Signer().Type() {\n\tcase crypto.AddressTypeValidator,\n\t\tcrypto.AddressTypeBLSAccount:\n\t\tsig := new(bls.Signature)\n\t\terr := sig.Decode(r)\n\n\t\treturn sig, err\n\n\tcase crypto.AddressTypeEd25519Account:\n\t\tsig := new(ed25519.Signature)\n\t\terr := sig.Decode(r)\n\n\t\treturn sig, err\n\n\tcase crypto.AddressTypeTreasury:\n\t\treturn nil, ErrInvalidSigner\n\n\tdefault:\n\t\treturn nil, ErrInvalidSigner\n\t}\n}\n\nfunc (tx *Tx) decodePublicKey(r io.Reader) (crypto.PublicKey, error) {\n\tswitch tx.data.Payload.Signer().Type() {\n\tcase crypto.AddressTypeValidator,\n\t\tcrypto.AddressTypeBLSAccount:\n\t\tpub := new(bls.PublicKey)\n\t\terr := pub.Decode(r)\n\n\t\treturn pub, err\n\n\tcase crypto.AddressTypeEd25519Account:\n\t\tpub := new(ed25519.PublicKey)\n\t\terr := pub.Decode(r)\n\n\t\treturn pub, err\n\n\tcase crypto.AddressTypeTreasury:\n\t\treturn nil, ErrInvalidSigner\n\n\tdefault:\n\t\treturn nil, ErrInvalidSigner\n\t}\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (tx *Tx) LogString() string {\n\treturn fmt.Sprintf(\"{⌘ %v - %v 🏵 %v}\",\n\t\ttx.ID().LogString(),\n\t\ttx.LockTime(),\n\t\ttx.data.Payload.LogString())\n}\n\nfunc (tx *Tx) SignBytes() []byte {\n\tbuf := bytes.Buffer{}\n\terr := tx.encodeWithNoSignatory(&buf)\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\treturn buf.Bytes()\n}\n\nfunc (tx *Tx) ID() ID {\n\tif tx.memorizedID != nil {\n\t\treturn *tx.memorizedID\n\t}\n\tid := hash.CalcHash(tx.SignBytes())\n\ttx.memorizedID = &id\n\n\treturn id\n}\n\nfunc (tx *Tx) IsTransferTx() bool {\n\treturn tx.Payload().Type() == payload.TypeTransfer\n}\n\nfunc (tx *Tx) IsBatchTransferTx() bool {\n\treturn tx.Payload().Type() == payload.TypeBatchTransfer\n}\n\nfunc (tx *Tx) IsBondTx() bool {\n\treturn tx.Payload().Type() == payload.TypeBond\n}\n\nfunc (tx *Tx) IsSubsidyTx() bool {\n\treturn tx.Payload().Signer() == crypto.TreasuryAddress\n}\n\nfunc (tx *Tx) IsSortitionTx() bool {\n\treturn tx.Payload().Type() == payload.TypeSortition\n}\n\nfunc (tx *Tx) IsUnbondTx() bool {\n\treturn tx.Payload().Type() == payload.TypeUnbond\n}\n\nfunc (tx *Tx) IsWithdrawTx() bool {\n\treturn tx.Payload().Type() == payload.TypeWithdraw\n}\n\n// StripPublicKey removes the public key from the transaction.\n// It is an alias function for `SetPublicKey(nil)`.\nfunc (tx *Tx) StripPublicKey() {\n\ttx.SetPublicKey(nil)\n}\n\n// IsPublicKeyStriped returns true if the public key stripped from the transaction.\nfunc (tx *Tx) IsPublicKeyStriped() bool {\n\tif tx.data.PublicKey != nil {\n\t\treturn false\n\t}\n\n\tif tx.IsSubsidyTx() {\n\t\t// Subsidy transactions do not have a public key, but they are not considered striped.\n\t\treturn false\n\t}\n\n\treturn true\n}\n\n// IsSigned returns true if the transaction has been signed and includes the signature.\nfunc (tx *Tx) IsSigned() bool {\n\treturn tx.data.Signature != nil\n}\n"
  },
  {
    "path": "types/tx/tx_test.go",
    "content": "package tx_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCBORMarshaling(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttx1 := ts.GenerateTestTransferTx()\n\tbz, err := cbor.Marshal(tx1)\n\trequire.NoError(t, err)\n\ttx2 := new(tx.Tx)\n\trequire.NoError(t, cbor.Unmarshal(bz, tx2))\n\tassert.Equal(t, tx1.ID(), tx2.ID())\n\n\trequire.Error(t, cbor.Unmarshal([]byte{1}, tx2))\n}\n\nfunc TestEncodingTx(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx1 := ts.GenerateTestTransferTx()\n\ttrx2 := ts.GenerateTestSubsidyTx()\n\ttrx3 := ts.GenerateTestBatchTransferTx()\n\ttrx4 := ts.GenerateTestBondTx()\n\ttrx5 := ts.GenerateTestUnbondTx()\n\ttrx6 := ts.GenerateTestWithdrawTx()\n\ttrx7 := ts.GenerateTestSortitionTx()\n\n\ttests := []*tx.Tx{trx1, trx2, trx3, trx4, trx5, trx6, trx7}\n\tfor _, trx := range tests {\n\t\trequire.NoError(t, trx.BasicCheck())\n\t\trequire.NoError(t, trx.BasicCheck()) // double basic check\n\n\t\tlength := trx.SerializeSize()\n\t\tfor i := 0; i < length; i++ {\n\t\t\tw := util.NewFixedWriter(i)\n\t\t\trequire.Error(t, trx.Encode(w), \"encode test %v failed\", i)\n\t\t}\n\t\tw := util.NewFixedWriter(length)\n\t\trequire.NoError(t, trx.Encode(w))\n\n\t\tfor i := 0; i < length; i++ {\n\t\t\tnewTrx := new(tx.Tx)\n\t\t\tr := util.NewFixedReader(i, w.Bytes())\n\t\t\trequire.Error(t, newTrx.Decode(r), \"decode test %v failed\", i)\n\t\t}\n\n\t\tbz, err := trx.Bytes()\n\t\trequire.NoError(t, err)\n\t\tdecodedTrx, err := tx.FromBytes(bz)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, trx.ID(), decodedTrx.ID())\n\t}\n\n\t_, err := tx.FromString(\"badcow\")\n\trequire.Error(t, err)\n}\n\nfunc TestTxIDNoSignatory(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx := ts.GenerateTestTransferTx()\n\tid1 := trx.ID()\n\n\ttrx.SetSignature(nil)\n\ttrx.SetPublicKey(nil)\n\tid2 := trx.ID()\n\n\trequire.Equal(t, id1, id2)\n}\n\nfunc TestBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"LockTime is not defined\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(0,\n\t\t\tts.RandAccAddress(), ts.RandAccAddress(), ts.RandAmount(), ts.RandFee())\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"lock time is not defined\",\n\t\t})\n\t})\n\n\tt.Run(\"Big memo, Should returns error\", func(t *testing.T) {\n\t\tbigMemo := strings.Repeat(\"a\", 65)\n\n\t\ttrx := tx.NewTransferTx(ts.RandHeight(),\n\t\t\tts.RandAccAddress(), ts.RandAccAddress(), ts.RandAmount(), ts.RandFee(), tx.WithMemo(bigMemo))\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"memo length exceeded: 65\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid payload, Should returns error\", func(t *testing.T) {\n\t\tinvAddr := ts.RandAccAddress()\n\t\tinvAddr[0] = 4\n\t\ttrx := tx.NewTransferTx(ts.RandHeight(), ts.RandAccAddress(), invAddr, 1e9, ts.RandFee())\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid payload: receiver is not an account address: \" + invAddr.String(),\n\t\t})\n\t})\n\n\tt.Run(\"Invalid amount\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(ts.RandHeight(), ts.RandAccAddress(), ts.RandAccAddress(), -1, 1)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid amount: -0.000000001 PAC\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid amount\", func(t *testing.T) {\n\t\ttrx := tx.NewTransferTx(ts.RandHeight(), ts.RandAccAddress(), ts.RandAccAddress(), (42e15)+1, 1)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid amount: 42,000,000 PAC\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid signer address\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\ttrx := tx.NewTransferTx(ts.RandHeight(), ts.RandAccAddress(), ts.RandAccAddress(), 1, 1)\n\t\tsig := valKey.PrivateKey().Sign(trx.SignBytes())\n\t\ttrx.SetSignature(sig)\n\t\ttrx.SetPublicKey(valKey.PublicKey())\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"address mismatch: expected %s, got %s\",\n\t\t\t\tvalKey.PublicKey().AccountAddress(), trx.Payload().Signer()),\n\t\t})\n\t})\n\n\tt.Run(\"Invalid version\", func(t *testing.T) {\n\t\tstr := \"02\" + // Flags\n\t\t\t\"02\" + // Version\n\t\t\t\"01020304\" + // LockTime\n\t\t\t\"01\" + // Fee\n\t\t\t\"00\" + // Memo\n\t\t\t\"01\" + // PayloadType\n\t\t\t\"00\" + // Sender (treasury)\n\t\t\t\"012222222222222222222222222222222222222222\" + // Receiver\n\t\t\t\"01\" // Amount\n\n\t\ttrx, err := tx.FromString(str)\n\t\trequire.NoError(t, err)\n\t\terr = trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid version: 2\",\n\t\t})\n\t})\n}\n\nfunc TestInvalidPayloadType(t *testing.T) {\n\tstr := \"02\" + // Flags\n\t\t\"01\" + // Version\n\t\t\"01020300\" + // LockTime\n\t\t\"01\" + // Fee\n\t\t\"00\" + // Memo\n\t\t\"07\" + // PayloadType\n\t\t\"00\" + // Sender (treasury)\n\t\t\"012222222222222222222222222222222222222222\" + // Receiver\n\t\t\"01\" // Amount\n\n\t_, err := tx.FromString(str)\n\trequire.ErrorIs(t, err, tx.InvalidPayloadTypeError{\n\t\tPayloadType: payload.Type(7),\n\t})\n}\n\nfunc TestSubsidyTx(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tpub, prv := ts.RandEd25519KeyPair()\n\n\tt.Run(\"Has signature\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestSubsidyTx()\n\t\tsig := prv.Sign(trx.SignBytes())\n\t\ttrx.SetSignature(sig)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"subsidy transaction with signatory\",\n\t\t})\n\t})\n\n\tt.Run(\"Has public key\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestSubsidyTx()\n\t\ttrx.SetPublicKey(pub)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"subsidy transaction with signatory\",\n\t\t})\n\t})\n\n\tt.Run(\"Strip public key\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestSubsidyTx()\n\t\ttrx.StripPublicKey()\n\n\t\terr := trx.BasicCheck()\n\t\trequire.NoError(t, err)\n\t\tassert.False(t, trx.IsPublicKeyStriped())\n\t})\n}\n\nfunc TestInvalidSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Good\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\trequire.NoError(t, trx.BasicCheck())\n\t})\n\n\tt.Run(\"No signature\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\ttrx.SetSignature(nil)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"no signature\",\n\t\t})\n\t})\n\n\tt.Run(\"No public key\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\ttrx.SetPublicKey(nil)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"no public key\",\n\t\t})\n\t})\n\n\tpbInv, pvInv := ts.RandBLSKeyPair()\n\tt.Run(\"Invalid signature\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\tsig := pvInv.Sign(trx.SignBytes())\n\t\ttrx.SetSignature(sig)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid signature\",\n\t\t})\n\t})\n\n\tt.Run(\"Invalid public key\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\ttrx.SetPublicKey(pbInv)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"address mismatch: expected %s, got %s\", pbInv.AccountAddress(), trx.Payload().Signer()),\n\t\t})\n\t})\n\n\tt.Run(\"Invalid sign Bytes\", func(t *testing.T) {\n\t\tvalKey := ts.RandValKey()\n\t\ttrx0 := ts.GenerateTestUnbondTx(testsuite.TransactionWithSigner(valKey.PrivateKey()))\n\n\t\ttrx := tx.NewUnbondTx(trx0.LockTime(), valKey.Address(), tx.WithMemo(\"invalidate signature\"))\n\t\ttrx.SetPublicKey(trx0.PublicKey())\n\t\ttrx.SetSignature(trx0.Signature())\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid signature\",\n\t\t})\n\t})\n\n\tt.Run(\"Zero signature\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\ttrx.SetSignature(&bls.Signature{})\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: \"invalid signature\",\n\t\t})\n\t})\n\n\tt.Run(\"Zero public key\", func(t *testing.T) {\n\t\ttrx := ts.GenerateTestTransferTx()\n\t\tzeroPubKey := &bls.PublicKey{}\n\t\ttrx.SetPublicKey(zeroPubKey)\n\n\t\terr := trx.BasicCheck()\n\t\trequire.ErrorIs(t, err, tx.BasicCheckError{\n\t\t\tReason: fmt.Sprintf(\"address mismatch: expected %s, got %s\",\n\t\t\t\tzeroPubKey.AccountAddress().String(), trx.Payload().Signer()),\n\t\t})\n\t})\n}\n\nfunc TestSignBytesBLS(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"00\" + // Flags\n\t\t\t\"01\" + // Version\n\t\t\t\"01020304\" + // LockTime\n\t\t\t\"e807\" + // Fee\n\t\t\t\"0474657374\" + // Memo\n\t\t\t\"01\" + // PayloadType\n\t\t\t\"022109324a70c5bd7a0591bcd8d597cb3a06a91770\" + // Sender (pc1zyyynyjnsck7h5pv3hnvdt97t8gr2j9ms0vrrp7)\n\t\t\t\"02b00c16e60f46390455baff5a8b69ac70e67f10c8\" + // Receiver (pc1zkqxpdes0gcusg4d6ladgk6dvwrn87yxgumzwn3)\n\t\t\t\"a09c01\" + // Amount\n\t\t\t\"86d45b6532d447070cf1ee67d4a04a13f337f6a2bfd6c54419efdd4b502b529d3f3be52567d8adaf494e0edc93d4ae51\" + // Signature\n\t\t\t\"b805043a816c3213c67f365f83c6946546049f517ebe470f186b36ff53fb996ae2468b119582a7f18fe8f0bfb4e055d5\" + // PublicKey\n\t\t\t\"190601a983fb4636c36287a73d80dbb14f244f319da5eeac02ce7ee9026245ac36b9978cabd6d2cbb3c1f87e55e2fc29\")\n\n\ttxID, _ := hash.FromString(\"7ab1287fe4882918e69b9f83215378ea08f2d91e0700c2e35a73b7aae1d7bf2d\")\n\ttrx, err := tx.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(data), trx.SerializeSize())\n\n\tsignBytes := data[1 : len(data)-bls.PublicKeySize-bls.SignatureSize]\n\tassert.Equal(t, signBytes, trx.SignBytes())\n\tassert.Equal(t, hash.CalcHash(signBytes), trx.ID())\n\tassert.Equal(t, txID, trx.ID())\n\tassert.Equal(t, types.Height(0x04030201), trx.LockTime())\n\tassert.Equal(t, \"test\", trx.Memo())\n\tassert.Equal(t, amount.Amount(1000), trx.Fee())\n\tassert.Equal(t, amount.Amount(20000), trx.Payload().Value())\n\tassert.Equal(t, \"pc1zyyynyjnsck7h5pv3hnvdt97t8gr2j9ms0vrrp7\", trx.Payload().Signer().String())\n}\n\nfunc TestSignBytesEd25519(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"00\" + // Flags\n\t\t\t\"01\" + // Version\n\t\t\t\"01020300\" + // LockTime\n\t\t\t\"e807\" + // Fee (1000)\n\t\t\t\"0474657374\" + // Memo (\"test\")\n\t\t\t\"01\" + // PayloadType\n\t\t\t\"037098338e0b6808119dfd4457ab806b9c2059b89b\" + // Sender (pc1rwzvr8rstdqypr80ag3t6hqrtnss9nwymcxy3lr)\n\t\t\t\"037a14ae24533816e7faaa6ed28fcdde8e55a7df21\" + // Receiver (pc1r0g22ufzn8qtw0742dmfglnw73e260hep0k3yra)\n\t\t\t\"a09c01\" + // Amount (20000)\n\t\t\t\"95794161374b22c696dabb98e93f6ca9300b22f3b904921fbf560bb72145f4fa\" + // Signature\n\t\t\t\"50ac25c7125271489b0cd230549257c93fb8c6265f2914a988ba7b81c1bc47ff\" + // PublicKey\n\t\t\t\"f027412dd59447867911035ff69742d171060a1f132ac38b95acc6e39ec0bd09\")\n\n\ttxID, _ := hash.FromString(\"34cd4656a98f7eb996e83efdc384cefbe3a9c52dca79a99245b4eacc0b0b4311\")\n\ttrx, err := tx.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, len(data), trx.SerializeSize())\n\n\tsignBytes := data[1 : len(data)-ed25519.PublicKeySize-ed25519.SignatureSize]\n\tassert.Equal(t, signBytes, trx.SignBytes())\n\tassert.Equal(t, hash.CalcHash(signBytes), trx.ID())\n\tassert.Equal(t, txID, trx.ID())\n\tassert.Equal(t, types.Height(0x00030201), trx.LockTime())\n\tassert.Equal(t, \"test\", trx.Memo())\n\tassert.Equal(t, amount.Amount(1000), trx.Fee())\n\tassert.Equal(t, amount.Amount(20000), trx.Payload().Value())\n\tassert.Equal(t, \"pc1rwzvr8rstdqypr80ag3t6hqrtnss9nwymcxy3lr\", trx.Payload().Signer().String())\n}\n\nfunc TestStripPublicKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx1 := ts.GenerateTestTransferTx()\n\tid1 := trx1.ID()\n\trequire.NoError(t, trx1.BasicCheck())\n\n\ttrx1.StripPublicKey()\n\tassert.True(t, trx1.IsPublicKeyStriped())\n\tassert.Equal(t, id1, trx1.ID())\n\trequire.ErrorIs(t, trx1.BasicCheck(),\n\t\ttx.BasicCheckError{\n\t\t\tReason: \"no public key\",\n\t\t})\n\n\tbs1, _ := trx1.Bytes()\n\ttrx2, _ := tx.FromBytes(bs1)\n\tbs2, _ := trx2.Bytes()\n\n\tassert.Equal(t, bs1, bs2)\n\tassert.Equal(t, trx1.ID(), trx2.ID())\n\tassert.Nil(t, trx2.PublicKey())\n}\n\nfunc TestFlagNotSigned(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx := tx.NewTransferTx(ts.RandHeight(), ts.RandAccAddress(), ts.RandAccAddress(),\n\t\tts.RandAmount(), ts.RandFee())\n\tassert.False(t, trx.IsSigned(), \"FlagNotSigned should not be set for new transactions\")\n\n\ttrx.SetSignature(ts.RandBLSSignature())\n\tassert.True(t, trx.IsSigned(), \"FlagNotSigned should be set for a signed transaction\")\n\n\ttrx.SetSignature(nil)\n\tassert.False(t, trx.IsSigned(), \"FlagNotSigned should not be set when the signature is set to nil\")\n}\n\nfunc TestInvalidSignerSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx := tx.NewTransferTx(ts.RandHeight(), crypto.TreasuryAddress, ts.RandAccAddress(),\n\t\tts.RandAmount(), ts.RandFee())\n\ttrx.SetSignature(ts.RandBLSSignature())\n\n\tbytes, _ := trx.Bytes()\n\t_, err := tx.FromBytes(bytes)\n\trequire.ErrorIs(t, err, tx.ErrInvalidSigner)\n}\n\nfunc TestInvalidSignerPublicKey(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx := tx.NewTransferTx(ts.RandHeight(), crypto.TreasuryAddress, ts.RandAccAddress(),\n\t\tts.RandAmount(), ts.RandFee())\n\tpub, _ := ts.RandBLSKeyPair()\n\ttrx.SetSignature(ts.RandBLSSignature())\n\ttrx.SetPublicKey(pub)\n\n\tbytes, _ := trx.Bytes()\n\t_, err := tx.FromBytes(bytes)\n\trequire.ErrorIs(t, err, tx.ErrInvalidSigner)\n}\n\nfunc TestIsFreeTx(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttrx1 := ts.GenerateTestTransferTx()\n\ttrx2 := ts.GenerateTestBatchTransferTx()\n\ttrx3 := ts.GenerateTestBondTx()\n\ttrx4 := ts.GenerateTestUnbondTx()\n\ttrx5 := ts.GenerateTestWithdrawTx()\n\ttrx6 := ts.GenerateTestSortitionTx()\n\n\tassert.True(t, trx1.IsTransferTx())\n\tassert.True(t, trx2.IsBatchTransferTx())\n\tassert.True(t, trx3.IsBondTx())\n\tassert.True(t, trx4.IsUnbondTx())\n\tassert.True(t, trx5.IsWithdrawTx())\n\tassert.True(t, trx6.IsSortitionTx())\n\n\tassert.False(t, trx1.IsFreeTx())\n\tassert.False(t, trx2.IsFreeTx())\n\tassert.False(t, trx3.IsFreeTx())\n\tassert.True(t, trx4.IsFreeTx())\n\tassert.False(t, trx5.IsFreeTx())\n\tassert.True(t, trx6.IsFreeTx())\n}\n\nfunc TestCheckFee(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\ttests := []struct {\n\t\tname        string\n\t\ttrx         *tx.Tx\n\t\texpectedErr error\n\t}{\n\t\t{\n\t\t\tname: \"Negative fee\",\n\t\t\ttrx: ts.GenerateTestTransferTx(\n\t\t\t\ttestsuite.TransactionWithFee(-1)),\n\t\t\texpectedErr: tx.BasicCheckError{Reason: \"invalid fee: -0.000000001 PAC\"},\n\t\t},\n\t\t{\n\t\t\tname: \"Big fee\",\n\t\t\ttrx: ts.GenerateTestTransferTx(\n\t\t\t\ttestsuite.TransactionWithFee(42e15 + 1)),\n\t\t\texpectedErr: tx.BasicCheckError{Reason: \"invalid fee: 42,000,000 PAC\"},\n\t\t},\n\t\t{\n\t\t\tname:        \"Subsidy transaction with fee\",\n\t\t\ttrx:         tx.NewTransferTx(ts.RandHeight(), crypto.TreasuryAddress, ts.RandAccAddress(), ts.RandAmount(), 1),\n\t\t\texpectedErr: tx.BasicCheckError{Reason: \"invalid fee: 0.000000001 PAC\"},\n\t\t},\n\t\t{\n\t\t\tname:        \"Subsidy transaction with zero fee\",\n\t\t\ttrx:         tx.NewTransferTx(ts.RandHeight(), crypto.TreasuryAddress, ts.RandAccAddress(), ts.RandAmount(), 0),\n\t\t\texpectedErr: nil,\n\t\t},\n\t\t{\n\t\t\tname: \"Transfer transaction with zero fee\",\n\t\t\ttrx: ts.GenerateTestTransferTx(\n\t\t\t\ttestsuite.TransactionWithFee(0)),\n\t\t\texpectedErr: nil,\n\t\t},\n\t\t{\n\t\t\tname: \"Transfer transaction with non-zero fee\",\n\t\t\ttrx: ts.GenerateTestTransferTx(\n\t\t\t\ttestsuite.TransactionWithFee(1)),\n\t\t\texpectedErr: nil,\n\t\t},\n\t\t{\n\t\t\tname: \"Unbond transaction with zero fee\",\n\t\t\ttrx: ts.GenerateTestUnbondTx(\n\t\t\t\ttestsuite.TransactionWithFee(0)),\n\t\t\texpectedErr: nil,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\terr := tt.trx.BasicCheck()\n\t\t\trequire.ErrorIs(t, err, tt.expectedErr)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "types/validator/validator.go",
    "content": "// Package validator provides functionality for managing validator information.\npackage validator\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/util/encoding\"\n)\n\n// The Validator struct represents a validator object.\ntype Validator struct {\n\tdata validatorData\n}\n\n// validatorData contains the data associated with a validator.\ntype validatorData struct {\n\tPublicKey           *bls.PublicKey\n\tNumber              int32\n\tStake               amount.Amount\n\tLastBondingHeight   types.Height\n\tUnbondingHeight     types.Height\n\tLastSortitionHeight types.Height\n\n\t// Optional delegation (PIP-49). Zero DelegateOwner means not delegated.\n\tDelegateOwner  crypto.Address\n\tDelegateShare  amount.Amount\n\tDelegateExpiry types.Height\n\n\t// The protocol version of the validator.\n\t// This is in memory and not saved to the blockchain.\n\tProtocolVersion protocol.Version\n}\n\nconst delegationPayloadSize = 21 + 8 + 4 // owner + share + expiry\n\n// NewValidator constructs a new validator from the given public key and number.\nfunc NewValidator(publicKey *bls.PublicKey, number int32) *Validator {\n\tval := &Validator{\n\t\tdata: validatorData{\n\t\t\tPublicKey: publicKey,\n\t\t\tNumber:    number,\n\t\t},\n\t}\n\n\treturn val\n}\n\n// FromBytes constructs a new validator from raw byte data.\nfunc FromBytes(data []byte) (*Validator, error) {\n\tval := new(Validator)\n\treader := bytes.NewReader(data)\n\n\tval.data.PublicKey = new(bls.PublicKey)\n\tif err := val.data.PublicKey.Decode(reader); err != nil {\n\t\treturn nil, err\n\t}\n\n\terr := encoding.ReadElements(reader,\n\t\t&val.data.Number,\n\t\t&val.data.Stake,\n\t\t&val.data.LastBondingHeight,\n\t\t&val.data.UnbondingHeight,\n\t\t&val.data.LastSortitionHeight,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Optional delegation (PIP-49)\n\tif reader.Len() > 0 {\n\t\tif err := val.data.DelegateOwner.Decode(reader); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := encoding.ReadElements(reader, &val.data.DelegateShare, &val.data.DelegateExpiry); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn val, nil\n}\n\n// PublicKey returns the public key of the validator.\nfunc (val *Validator) PublicKey() *bls.PublicKey {\n\treturn val.data.PublicKey\n}\n\n// Address returns the address of the validator.\nfunc (val *Validator) Address() crypto.Address {\n\treturn val.data.PublicKey.ValidatorAddress()\n}\n\n// Number returns the number of the validator.\nfunc (val *Validator) Number() int32 {\n\treturn val.data.Number\n}\n\n// Stake returns the stake of the validator.\nfunc (val *Validator) Stake() amount.Amount {\n\treturn val.data.Stake\n}\n\n// LastBondingHeight returns the last height in which the validator bonded stake.\nfunc (val *Validator) LastBondingHeight() types.Height {\n\treturn val.data.LastBondingHeight\n}\n\n// UnbondingHeight returns the last height in which the validator unbonded stake.\nfunc (val *Validator) UnbondingHeight() types.Height {\n\treturn val.data.UnbondingHeight\n}\n\n// IsUnbonded returns true if the validator is unbonded.\nfunc (val *Validator) IsUnbonded() bool {\n\treturn val.data.UnbondingHeight > 0\n}\n\n// IsDelegated returns true if the validator has delegation (stake owner != operator).\nfunc (val *Validator) IsDelegated() bool {\n\treturn val.data.DelegateOwner != crypto.TreasuryAddress\n}\n\n// DelegateOwner returns the stake owner account address for delegated validators.\nfunc (val *Validator) DelegateOwner() crypto.Address {\n\treturn val.data.DelegateOwner\n}\n\n// DelegateShare returns the stake owner's reward share (in nano PAC) for delegated validators.\nfunc (val *Validator) DelegateShare() amount.Amount {\n\treturn val.data.DelegateShare\n}\n\n// DelegateExpiry returns the block height at which delegation expires (0 = no expiry).\nfunc (val *Validator) DelegateExpiry() types.Height {\n\treturn val.data.DelegateExpiry\n}\n\n// DelegateExpired returns true if delegation has expired at the given height.\nfunc (val *Validator) DelegateExpired(height types.Height) bool {\n\tif !val.IsDelegated() {\n\t\treturn false\n\t}\n\n\treturn val.data.DelegateExpiry <= height\n}\n\n// SetDelegation sets the delegation fields (PIP-49). Use zero owner to clear delegation.\nfunc (val *Validator) SetDelegation(owner crypto.Address, share amount.Amount, expiry types.Height) {\n\tval.data.DelegateOwner = owner\n\tval.data.DelegateShare = share\n\tval.data.DelegateExpiry = expiry\n}\n\n// LastSortitionHeight returns the last height in which the validator evaluated sortition.\nfunc (val *Validator) LastSortitionHeight() types.Height {\n\treturn val.data.LastSortitionHeight\n}\n\n// Power returns the power of the validator.\nfunc (val *Validator) Power() int64 {\n\tif val.data.UnbondingHeight > 0 {\n\t\t// Power for unbonded validators is set to zero.\n\t\treturn 0\n\t} else if val.data.Stake == 0 {\n\t\t// Only bootstrap validators at the genesis block have no stake.\n\t\treturn 1\n\t}\n\n\treturn int64(val.data.Stake)\n}\n\n// SubtractFromStake subtracts the given amount from the validator's stake.\nfunc (val *Validator) SubtractFromStake(amt amount.Amount) {\n\tval.data.Stake -= amt\n}\n\n// AddToStake adds the given amount to the validator's stake.\nfunc (val *Validator) AddToStake(amt amount.Amount) {\n\tval.data.Stake += amt\n}\n\n// UpdateLastSortitionHeight updates the last height at which the validator performed a valid sortition.\nfunc (val *Validator) UpdateLastSortitionHeight(height types.Height) {\n\tval.data.LastSortitionHeight = height\n}\n\n// UpdateLastBondingHeight updates the last height at which the validator bonded some stakes.\nfunc (val *Validator) UpdateLastBondingHeight(height types.Height) {\n\tval.data.LastBondingHeight = height\n}\n\n// UpdateUnbondingHeight updates the unbonding height for the validator.\nfunc (val *Validator) UpdateUnbondingHeight(height types.Height) {\n\tval.data.UnbondingHeight = height\n}\n\n// Hash calculates and returns the hash of the validator.\nfunc (val *Validator) Hash() hash.Hash {\n\tbs, err := val.Bytes()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn hash.CalcHash(bs)\n}\n\n// SerializeSize returns the size in bytes required to serialize the validator.\nfunc (val *Validator) SerializeSize() int {\n\tsize := 120 // 96+4+4+8+4+4\n\tif val.IsDelegated() {\n\t\tsize += delegationPayloadSize\n\t}\n\n\treturn size\n}\n\n// Bytes returns the serialized byte representation of the validator.\nfunc (val *Validator) Bytes() ([]byte, error) {\n\tbuf := bytes.NewBuffer(make([]byte, 0, val.SerializeSize()))\n\n\tif err := val.data.PublicKey.Encode(buf); err != nil {\n\t\treturn nil, err\n\t}\n\n\terr := encoding.WriteElements(buf,\n\t\tval.data.Number,\n\t\tval.data.Stake,\n\t\tval.data.LastBondingHeight,\n\t\tval.data.UnbondingHeight,\n\t\tval.data.LastSortitionHeight)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif val.IsDelegated() {\n\t\tif err := val.data.DelegateOwner.Encode(buf); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := encoding.WriteElements(buf, val.data.DelegateShare, val.data.DelegateExpiry); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn buf.Bytes(), nil\n}\n\n// Clone creates a deep copy of the validator.\nfunc (val *Validator) Clone() *Validator {\n\tcloned := new(Validator)\n\t*cloned = *val\n\n\treturn cloned\n}\n\n// UpdateProtocolVersion updates the protocol version of the validator.\nfunc (val *Validator) UpdateProtocolVersion(ver protocol.Version) {\n\tval.data.ProtocolVersion = ver\n}\n\n// ProtocolVersion returns the protocol version of the validator.\nfunc (val *Validator) ProtocolVersion() protocol.Version {\n\treturn val.data.ProtocolVersion\n}\n\n// IsActive returns true if the validator is active (has stake and is not unbonded).\nfunc (val *Validator) IsActive() bool {\n\treturn val.Stake() > 0 && !val.IsUnbonded()\n}\n"
  },
  {
    "path": "types/validator/validator_test.go",
    "content": "package validator_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestFromBytes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator()\n\tassert.False(t, val1.IsDelegated())\n\tassert.False(t, val1.DelegateExpired(ts.RandHeight()))\n\n\t// Round-trip serialization\n\tdata, err := val1.Bytes()\n\trequire.NoError(t, err)\n\tassert.Len(t, data, 120)\n\n\tfor i := range len(data) {\n\t\t_, err := validator.FromBytes(data[:i])\n\t\trequire.Error(t, err)\n\t}\n\n\tval2, err := validator.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, val1.Hash(), val2.Hash())\n\tassert.Equal(t, val1.Address(), val2.Address())\n\tassert.Equal(t, val1.Number(), val2.Number())\n}\n\nfunc TestFromBytesDelegation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval1 := ts.GenerateTestValidator()\n\n\towner := ts.RandAccAddress()\n\tshare := amount.Amount(350_000_000) // 0.35 PAC\n\texpiry := types.Height(1000)\n\tval1.SetDelegation(owner, share, expiry)\n\n\tassert.True(t, val1.IsDelegated())\n\tassert.Equal(t, owner, val1.DelegateOwner())\n\tassert.Equal(t, share, val1.DelegateShare())\n\tassert.Equal(t, expiry, val1.DelegateExpiry())\n\tassert.False(t, val1.DelegateExpired(999))\n\tassert.True(t, val1.DelegateExpired(1000))\n\tassert.True(t, val1.DelegateExpired(1001))\n\n\t// Round-trip serialization with delegation\n\tdata, err := val1.Bytes()\n\trequire.NoError(t, err)\n\tassert.Len(t, data, 120+21+8+4)\n\n\tfor i := range 32 {\n\t\t_, err := validator.FromBytes(data[0 : 121+i])\n\t\trequire.Error(t, err)\n\t}\n\n\tval2, err := validator.FromBytes(data)\n\trequire.NoError(t, err)\n\tassert.Equal(t, val1.Hash(), val2.Hash())\n}\n\nfunc TestUpdateValidator(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\n\tbondingHeight := ts.RandHeight()\n\tsortitionHeight := ts.RandHeight()\n\tunbondingHeight := ts.RandHeight()\n\n\tval.UpdateLastBondingHeight(bondingHeight)\n\tval.UpdateLastSortitionHeight(sortitionHeight)\n\tval.UpdateUnbondingHeight(unbondingHeight)\n\n\tassert.Equal(t, bondingHeight, val.LastBondingHeight())\n\tassert.Equal(t, sortitionHeight, val.LastSortitionHeight())\n\tassert.Equal(t, unbondingHeight, val.UnbondingHeight())\n}\n\nfunc TestDecoding(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"8d82fa4fcac04a3b565267685e90db1b01420285d2f8295683c138c092c209479983ba1591370778846681b7b558e061\" + // PublicKey\n\t\t\t\"1776208c0718006311c84b4a113335c70d1f5c7c5dd93a5625c4af51c48847abd0b590c055306162d2a03ca1cbf7bcc1\" +\n\t\t\t\"01000000\" + // Number\n\t\t\t\"0200000000000000\" + // Stake\n\t\t\t\"03000000\" + // LastBondingHeight\n\t\t\t\"04000000\" + // UnbondingHeight\n\t\t\t\"05000000\") // LastSortitionHeight\n\n\tval, err := validator.FromBytes(data)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, int32(1), val.Number())\n\tassert.Equal(t, amount.Amount(2), val.Stake())\n\tassert.Equal(t, types.Height(3), val.LastBondingHeight())\n\tassert.Equal(t, types.Height(4), val.UnbondingHeight())\n\tassert.Equal(t, types.Height(5), val.LastSortitionHeight())\n\n\td2, _ := val.Bytes()\n\tassert.Equal(t, data, d2)\n\tassert.Equal(t, len(data), val.SerializeSize())\n\n\tassert.Equal(t, hash.CalcHash(data), val.Hash())\n\texpected, _ := hash.FromString(\"243e65ae04727f21d5f7618cea9ff8d4bc82fded1179cf8bd9e11a6b99ac42b2\")\n\tassert.Equal(t, expected, val.Hash())\n}\n\nfunc TestPower(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tval.SubtractFromStake(val.Stake())\n\tassert.Equal(t, amount.Amount(0), val.Stake())\n\tassert.Equal(t, int64(1), val.Power())\n\tval.AddToStake(1)\n\tassert.Equal(t, amount.Amount(1), val.Stake())\n\tassert.Equal(t, int64(1), val.Power())\n\tval.UpdateUnbondingHeight(1)\n\tassert.Equal(t, amount.Amount(1), val.Stake())\n\tassert.Equal(t, int64(0), val.Power())\n}\n\nfunc TestAddToStake(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tstake := val.Stake()\n\tval.AddToStake(1)\n\tassert.Equal(t, stake+1, val.Stake())\n}\n\nfunc TestSubtractFromStake(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tstake := val.Stake()\n\tval.SubtractFromStake(1)\n\tassert.Equal(t, stake-1, val.Stake())\n}\n\nfunc TestClone(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tcloned := val.Clone()\n\tcloned.AddToStake(1)\n\n\tassert.Equal(t, val.Number(), cloned.Number())\n\tassert.Equal(t, val.PublicKey(), cloned.PublicKey())\n\tassert.NotEqual(t, val.Stake(), cloned.Stake())\n}\n\nfunc TestIsUnbonded(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tassert.False(t, val.IsUnbonded())\n\n\tval.UpdateUnbondingHeight(ts.RandHeight())\n\tassert.True(t, val.IsUnbonded())\n}\n\nfunc TestUpdateProtocolVersion(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tassert.Equal(t, protocol.Version(0), val.ProtocolVersion())\n\n\tval.UpdateProtocolVersion(1)\n\tassert.Equal(t, protocol.Version(1), val.ProtocolVersion())\n}\n\nfunc TestIsActive(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tval := ts.GenerateTestValidator()\n\tassert.True(t, val.IsActive())\n\n\tval.UpdateUnbondingHeight(ts.RandHeight())\n\tassert.False(t, val.IsActive())\n\n\tval.UpdateUnbondingHeight(0)\n\tval.SubtractFromStake(val.Stake())\n\tassert.False(t, val.IsActive())\n}\n"
  },
  {
    "path": "types/vote/cp_just.go",
    "content": "package vote\n\nimport (\n\t\"github.com/pactus-project/pactus/types/certificate\"\n)\n\ntype JustType uint8\n\nconst (\n\tJustTypeInitNo             = JustType(1)\n\tJustTypeInitYes            = JustType(2)\n\tJustTypePreVoteSoft        = JustType(3)\n\tJustTypePreVoteHard        = JustType(4)\n\tJustTypeMainVoteConflict   = JustType(5)\n\tJustTypeMainVoteNoConflict = JustType(6)\n\tJustTypeDecided            = JustType(7)\n)\n\nfunc (t JustType) String() string {\n\tswitch t {\n\tcase JustTypeInitNo:\n\t\treturn \"JustInitNo\"\n\tcase JustTypeInitYes:\n\t\treturn \"JustInitYes\"\n\tcase JustTypePreVoteSoft:\n\t\treturn \"JustPreVoteSoft\"\n\tcase JustTypePreVoteHard:\n\t\treturn \"JustPreVoteHard\"\n\tcase JustTypeMainVoteConflict:\n\t\treturn \"JustMainVoteConflict\"\n\tcase JustTypeMainVoteNoConflict:\n\t\treturn \"JustMainVoteNoConflict\"\n\tcase JustTypeDecided:\n\t\treturn \"JustDecided\"\n\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\ntype Just interface {\n\tType() JustType\n\tBasicCheck() error\n}\n\nfunc makeJust(t JustType) Just {\n\tswitch t {\n\tcase JustTypeInitNo:\n\t\treturn &JustInitNo{}\n\tcase JustTypeInitYes:\n\t\treturn &JustInitYes{}\n\tcase JustTypePreVoteSoft:\n\t\treturn &JustPreVoteSoft{}\n\tcase JustTypePreVoteHard:\n\t\treturn &JustPreVoteHard{}\n\tcase JustTypeMainVoteConflict:\n\t\treturn &JustMainVoteConflict{}\n\tcase JustTypeMainVoteNoConflict:\n\t\treturn &JustMainVoteNoConflict{}\n\tcase JustTypeDecided:\n\t\treturn &JustDecided{}\n\tdefault:\n\t\treturn nil\n\t}\n}\n\ntype JustInitNo struct {\n\tQCert *certificate.Certificate `cbor:\"1,keyasint\"`\n}\n\ntype JustInitYes struct {\n\t//\n}\n\ntype JustPreVoteSoft struct {\n\tQCert *certificate.Certificate `cbor:\"1,keyasint\"`\n}\n\ntype JustPreVoteHard struct {\n\tQCert *certificate.Certificate `cbor:\"1,keyasint\"`\n}\ntype JustMainVoteConflict struct {\n\tJustNo  Just\n\tJustYes Just\n}\n\ntype JustMainVoteConflictV2 struct {\n\tJust1 Just\n\tJust2 Just\n}\n\ntype JustMainVoteNoConflict struct {\n\tQCert *certificate.Certificate `cbor:\"1,keyasint\"`\n}\n\ntype JustDecided struct {\n\tQCert *certificate.Certificate `cbor:\"1,keyasint\"`\n}\n\nfunc (*JustInitNo) Type() JustType {\n\treturn JustTypeInitNo\n}\n\nfunc (*JustInitYes) Type() JustType {\n\treturn JustTypeInitYes\n}\n\nfunc (*JustPreVoteSoft) Type() JustType {\n\treturn JustTypePreVoteSoft\n}\n\nfunc (*JustPreVoteHard) Type() JustType {\n\treturn JustTypePreVoteHard\n}\n\nfunc (*JustMainVoteConflict) Type() JustType {\n\treturn JustTypeMainVoteConflict\n}\n\nfunc (*JustMainVoteNoConflict) Type() JustType {\n\treturn JustTypeMainVoteNoConflict\n}\n\nfunc (*JustDecided) Type() JustType {\n\treturn JustTypeDecided\n}\n\nfunc (j *JustInitNo) BasicCheck() error {\n\terr := j.QCert.BasicCheck()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (*JustInitYes) BasicCheck() error {\n\treturn nil\n}\n\nfunc (j *JustPreVoteSoft) BasicCheck() error {\n\treturn j.QCert.BasicCheck()\n}\n\nfunc (j *JustPreVoteHard) BasicCheck() error {\n\treturn j.QCert.BasicCheck()\n}\n\nfunc (j *JustMainVoteConflict) BasicCheck() error {\n\tif err := j.JustNo.BasicCheck(); err != nil {\n\t\treturn err\n\t}\n\n\treturn j.JustYes.BasicCheck()\n}\n\nfunc (j *JustMainVoteNoConflict) BasicCheck() error {\n\treturn j.QCert.BasicCheck()\n}\n\nfunc (j *JustDecided) BasicCheck() error {\n\treturn j.QCert.BasicCheck()\n}\n"
  },
  {
    "path": "types/vote/cp_vote.go",
    "content": "package vote\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n)\n\ntype CPValue int8\n\nconst (\n\tCPValueNo      = CPValue(0)\n\tCPValueYes     = CPValue(1)\n\tCPValueAbstain = CPValue(2)\n)\n\nfunc (v CPValue) String() string {\n\tswitch v {\n\tcase CPValueNo:\n\t\treturn \"no\"\n\tcase CPValueYes:\n\t\treturn \"yes\"\n\tcase CPValueAbstain:\n\t\treturn \"abstain\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"unknown: %d\", v)\n\t}\n}\n\ntype cpVote struct {\n\tRound int16\n\tValue CPValue\n\tJust  Just\n}\n\nfunc (v *cpVote) BasicCheck() error {\n\tif v.Round < 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid CP round\",\n\t\t}\n\t}\n\tif v.Value < CPValueNo ||\n\t\tv.Value > CPValueAbstain {\n\t\t// Invalid values\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid CP value\",\n\t\t}\n\t}\n\n\treturn v.Just.BasicCheck()\n}\n\ntype _cpVote struct {\n\tRound    int16    `cbor:\"1,keyasint\"`\n\tValue    CPValue  `cbor:\"2,keyasint\"`\n\tJustType JustType `cbor:\"3,keyasint\"`\n\tJustData []byte   `cbor:\"4,keyasint\"`\n}\n\ntype _JustMainVoteConflict struct {\n\tJust0Type JustType `cbor:\"1,keyasint\"`\n\tJust0Data []byte   `cbor:\"2,keyasint\"`\n\tJust1Type JustType `cbor:\"3,keyasint\"`\n\tJust1Data []byte   `cbor:\"4,keyasint\"`\n}\n\n// MarshalCBOR encodes the cpVote into CBOR format.\nfunc (v *cpVote) MarshalCBOR() ([]byte, error) {\n\tjustData := []byte{}\n\tif v.Just.Type() == JustTypeMainVoteConflict {\n\t\tconflictJust := v.Just.(*JustMainVoteConflict)\n\t\tdata0, err := cbor.Marshal(conflictJust.JustNo)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata1, err := cbor.Marshal(conflictJust.JustYes)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t_conflictingJust := _JustMainVoteConflict{\n\t\t\tJust0Type: conflictJust.JustNo.Type(),\n\t\t\tJust0Data: data0,\n\t\t\tJust1Type: conflictJust.JustYes.Type(),\n\t\t\tJust1Data: data1,\n\t\t}\n\t\tdata, err := cbor.Marshal(_conflictingJust)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tjustData = append(justData, data...)\n\t} else {\n\t\tdata, err := cbor.Marshal(v.Just)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tjustData = append(justData, data...)\n\t}\n\n\tmsg := &_cpVote{\n\t\tRound:    v.Round,\n\t\tValue:    v.Value,\n\t\tJustType: v.Just.Type(),\n\t\tJustData: justData,\n\t}\n\n\treturn cbor.Marshal(msg)\n}\n\n// UnmarshalCBOR decodes the cpVote from CBOR format.\nfunc (v *cpVote) UnmarshalCBOR(bs []byte) error {\n\tvar _cp _cpVote\n\terr := cbor.Unmarshal(bs, &_cp)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar just Just\n\tif _cp.JustType == JustTypeMainVoteConflict {\n\t\t_conflictingJust := &_JustMainVoteConflict{}\n\t\terr := cbor.Unmarshal(_cp.JustData, _conflictingJust)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tjust0 := makeJust(_conflictingJust.Just0Type)\n\t\terr = cbor.Unmarshal(_conflictingJust.Just0Data, just0)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tjust1 := makeJust(_conflictingJust.Just1Type)\n\t\terr = cbor.Unmarshal(_conflictingJust.Just1Data, just1)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tjust = &JustMainVoteConflict{\n\t\t\tJustNo:  just0,\n\t\t\tJustYes: just1,\n\t\t}\n\t} else {\n\t\tjust = makeJust(_cp.JustType)\n\t\terr := cbor.Unmarshal(_cp.JustData, just)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tv.Round = _cp.Round\n\tv.Value = _cp.Value\n\tv.Just = just\n\n\treturn nil\n}\n"
  },
  {
    "path": "types/vote/errors.go",
    "content": "package vote\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n)\n\n// BasicCheckError is returned when the basic check on the transaction fails.\ntype BasicCheckError struct {\n\tReason string\n}\n\nfunc (e BasicCheckError) Error() string {\n\treturn e.Reason\n}\n\n// InvalidSignerError is returned when the vote signer does not match with the\n// public key.\ntype InvalidSignerError struct {\n\tExpected crypto.Address\n\tGot      crypto.Address\n}\n\nfunc (e InvalidSignerError) Error() string {\n\treturn fmt.Sprintf(\"invalid signer, expected: %s, got: %s\",\n\t\te.Expected.String(), e.Got.String())\n}\n"
  },
  {
    "path": "types/vote/vote.go",
    "content": "package vote\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n)\n\n// Vote is a struct that represents a consensus vote.\ntype Vote struct {\n\tdata voteData\n}\n\ntype voteData struct {\n\tType      Type           `cbor:\"1,keyasint\"`\n\tHeight    types.Height   `cbor:\"2,keyasint\"`\n\tRound     types.Round    `cbor:\"3,keyasint\"`\n\tBlockHash hash.Hash      `cbor:\"4,keyasint\"`\n\tSigner    crypto.Address `cbor:\"5,keyasint\"`\n\tCPVote    *cpVote        `cbor:\"6,keyasint\"`\n\tSignature *bls.Signature `cbor:\"7,keyasint\"`\n}\n\n// NewPrepareVote creates a new PREPARE with the specified parameters.\nfunc NewPrepareVote(blockHash hash.Hash, height types.Height, round types.Round, signer crypto.Address) *Vote {\n\treturn newVote(VoteTypePrepare, blockHash, height, round, signer)\n}\n\n// NewPrecommitVote creates a new PRECOMMIT with the specified parameters.\nfunc NewPrecommitVote(blockHash hash.Hash, height types.Height, round types.Round, signer crypto.Address) *Vote {\n\treturn newVote(VoteTypePrecommit, blockHash, height, round, signer)\n}\n\n// NewCPPreVote creates a new cp:PRE-VOTE with the specified parameters.\nfunc NewCPPreVote(blockHash hash.Hash, height types.Height, round types.Round,\n\tcpRound int16, cpValue CPValue, just Just, signer crypto.Address,\n) *Vote {\n\tvote := newVote(VoteTypeCPPreVote, blockHash, height, round, signer)\n\tvote.data.CPVote = &cpVote{\n\t\tRound: cpRound,\n\t\tValue: cpValue,\n\t\tJust:  just,\n\t}\n\n\treturn vote\n}\n\n// NewCPMainVote creates a new cp:MAIN-VOTE with the specified parameters.\nfunc NewCPMainVote(blockHash hash.Hash, height types.Height, round types.Round,\n\tcpRound int16, cpValue CPValue, just Just, signer crypto.Address,\n) *Vote {\n\tvote := newVote(VoteTypeCPMainVote, blockHash, height, round, signer)\n\tvote.data.CPVote = &cpVote{\n\t\tRound: cpRound,\n\t\tValue: cpValue,\n\t\tJust:  just,\n\t}\n\n\treturn vote\n}\n\n// NewCPDecidedVote creates a new cp:Decided with the specified parameters.\nfunc NewCPDecidedVote(blockHash hash.Hash, height types.Height, round types.Round,\n\tcpRound int16, cpValue CPValue, just Just, signer crypto.Address,\n) *Vote {\n\tvote := newVote(VoteTypeCPDecided, blockHash, height, round, signer)\n\tvote.data.CPVote = &cpVote{\n\t\tRound: cpRound,\n\t\tValue: cpValue,\n\t\tJust:  just,\n\t}\n\n\treturn vote\n}\n\n// newVote creates a new vote with the specified parameters.\nfunc newVote(voteType Type, blockHash hash.Hash, height types.Height, round types.Round,\n\tsigner crypto.Address,\n) *Vote {\n\treturn &Vote{\n\t\tdata: voteData{\n\t\t\tType:      voteType,\n\t\t\tHeight:    height,\n\t\t\tRound:     round,\n\t\t\tBlockHash: blockHash,\n\t\t\tSigner:    signer,\n\t\t},\n\t}\n}\n\n// SignBytes generates the bytes to be signed for the vote.\nfunc (v *Vote) SignBytes() []byte {\n\tcert := certificate.NewCertificate(v.data.Height, v.data.Round)\n\n\tswitch typ := v.Type(); typ {\n\tcase VoteTypePrecommit:\n\t\treturn cert.SignBytesPrecommit(v.data.BlockHash)\n\n\tcase VoteTypePrepare:\n\t\treturn cert.SignBytesPrepare(v.data.BlockHash)\n\n\tcase VoteTypeCPPreVote:\n\t\treturn cert.SignBytesCPPreVote(v.data.BlockHash, v.data.CPVote.Round, byte(v.data.CPVote.Value))\n\n\tcase VoteTypeCPMainVote:\n\t\treturn cert.SignBytesCPMainVote(v.data.BlockHash, v.data.CPVote.Round, byte(v.data.CPVote.Value))\n\n\tcase VoteTypeCPDecided:\n\t\treturn cert.SignBytesCPDecided(v.data.BlockHash, v.data.CPVote.Round, byte(v.data.CPVote.Value))\n\n\tdefault:\n\t\treturn nil\n\t}\n}\n\n// Type returns the type of the vote.\nfunc (v *Vote) Type() Type {\n\treturn v.data.Type\n}\n\n// Height returns the height of the block in the vote.\nfunc (v *Vote) Height() types.Height {\n\treturn v.data.Height\n}\n\n// Round returns the round the vote.\nfunc (v *Vote) Round() types.Round {\n\treturn v.data.Round\n}\n\n// CPRound returns the change proposer round the vote.\nfunc (v *Vote) CPRound() int16 {\n\treturn v.data.CPVote.Round\n}\n\n// CPValue returns the change proposer value the vote.\nfunc (v *Vote) CPValue() CPValue {\n\treturn v.data.CPVote.Value\n}\n\n// CPJust returns the change proposer justification for the vote.\nfunc (v *Vote) CPJust() Just {\n\treturn v.data.CPVote.Just\n}\n\n// BlockHash returns the hash of the block in the vote.\nfunc (v *Vote) BlockHash() hash.Hash {\n\treturn v.data.BlockHash\n}\n\n// Signer returns the address of the signer of the vote.\nfunc (v *Vote) Signer() crypto.Address {\n\treturn v.data.Signer\n}\n\n// Signature returns the signature of the vote.\nfunc (v *Vote) Signature() *bls.Signature {\n\treturn v.data.Signature\n}\n\n// SetSignature sets the signature of the vote.\nfunc (v *Vote) SetSignature(sig *bls.Signature) {\n\tv.data.Signature = sig\n}\n\n// MarshalCBOR encodes the vote into CBOR format.\nfunc (v *Vote) MarshalCBOR() ([]byte, error) {\n\treturn cbor.Marshal(v.data)\n}\n\n// UnmarshalCBOR decodes the vote from CBOR format.\nfunc (v *Vote) UnmarshalCBOR(bs []byte) error {\n\treturn cbor.Unmarshal(bs, &v.data)\n}\n\n// Hash calculates the hash of the vote.\nfunc (v *Vote) Hash() hash.Hash {\n\tbz, _ := cbor.Marshal(v.data)\n\n\treturn hash.CalcHash(bz)\n}\n\n// Verify checks the signature of the vote with the given public key.\nfunc (v *Vote) Verify(pubKey *bls.PublicKey) error {\n\tif v.Signer() != pubKey.ValidatorAddress() {\n\t\treturn InvalidSignerError{\n\t\t\tExpected: pubKey.ValidatorAddress(),\n\t\t\tGot:      v.Signer(),\n\t\t}\n\t}\n\n\treturn pubKey.Verify(v.SignBytes(), v.Signature())\n}\n\nfunc (v *Vote) IsCPVote() bool {\n\tif v.data.Type == VoteTypeCPPreVote ||\n\t\tv.data.Type == VoteTypeCPMainVote ||\n\t\tv.data.Type == VoteTypeCPDecided {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// BasicCheck performs a basic check on the vote.\nfunc (v *Vote) BasicCheck() error {\n\tif !v.data.Type.IsValid() {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid vote type\",\n\t\t}\n\t}\n\tif v.data.Height <= 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid height\",\n\t\t}\n\t}\n\tif v.data.Round < 0 {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"invalid round\",\n\t\t}\n\t}\n\tif v.IsCPVote() {\n\t\tif v.data.CPVote == nil {\n\t\t\treturn BasicCheckError{\n\t\t\t\tReason: \"should have CP data\",\n\t\t\t}\n\t\t}\n\t\tif err := v.data.CPVote.BasicCheck(); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else if v.data.CPVote != nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"should not have CP data\",\n\t\t}\n\t}\n\tif v.Signature() == nil {\n\t\treturn BasicCheckError{\n\t\t\tReason: \"no signature\",\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// LogString returns a concise string representation intended for use in logs.\nfunc (v *Vote) LogString() string {\n\tswitch v.Type() {\n\tcase VoteTypePrepare, VoteTypePrecommit:\n\t\treturn fmt.Sprintf(\"{%d/%d/%s ⌘ %v 👤 %s}\",\n\t\t\tv.Height(),\n\t\t\tv.Round(),\n\t\t\tv.Type(),\n\t\t\tv.BlockHash().LogString(),\n\t\t\tv.Signer().LogString(),\n\t\t)\n\tcase VoteTypeCPPreVote, VoteTypeCPMainVote, VoteTypeCPDecided:\n\t\treturn fmt.Sprintf(\"{%d/%d/%s/%d/%s ⌘ %v 👤 %s}\",\n\t\t\tv.Height(),\n\t\t\tv.Round(),\n\t\t\tv.Type(),\n\t\t\tv.CPRound(),\n\t\t\tv.CPValue(),\n\t\t\tv.BlockHash().LogString(),\n\t\t\tv.Signer().LogString(),\n\t\t)\n\n\tdefault:\n\t\treturn \"unknown type\"\n\t}\n}\n"
  },
  {
    "path": "types/vote/vote_test.go",
    "content": "package vote_test\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestVoteMarshaling(t *testing.T) {\n\ttests := []struct {\n\t\tdata      string\n\t\tjustType  string\n\t\tsignBytes string\n\t}{\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0101\" + // Type: 1 (prepare vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06f6\" + // CP_vote -> Null\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB32000000010050524550415245\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0102\" + // Type: 2 (precommit vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06f6\" + // CP_vote -> Null\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB320000000100\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0103\" + // Type: 3 (cp:pre-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0100\" + // CP_Round: 0\n\t\t\t\t\"0200\" + // CP_Value: 0\n\t\t\t\t\"0301\" + // Just type: 1\n\t\t\t\t\"045840\" + // Just: JustTypeInitNo\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustInitNo\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB3200000001005052452d564f5445000000\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0103\" + // Type: 3 (cp:pre-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"0458200000000000000000000000000000000000000000000000000000000000000000\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0100\" + // CP_Round: 0\n\t\t\t\t\"0201\" + // CP_Value: 1\n\t\t\t\t\"0302\" + // Just type: 2\n\t\t\t\t\"0441\" + // Just: JustTypeInitYes\n\t\t\t\t\"A0\" + // Empty Array\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustInitYes\",\n\t\t\t\"00000000000000000000000000000000000000000000000000000000000000003200000001005052452d564f5445000001\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0103\" + // Type: 3 (cp:pre-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // CP_Round: 1\n\t\t\t\t\"0200\" + // CP_Value: 0\n\t\t\t\t\"0303\" + // Just type: 3\n\t\t\t\t\"045840\" + // Just: JustPreVoteSoft\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustPreVoteSoft\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB3200000001005052452d564f5445010000\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0103\" + // Type: 3 (cp:pre-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // CP_Round: 1\n\t\t\t\t\"0200\" + // CP_Value: 0\n\t\t\t\t\"0304\" + // Just type: 4\n\t\t\t\t\"045840\" + // Just: JustPreVoteHard\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustPreVoteHard\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB3200000001005052452d564f5445010000\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0104\" + // Type: 4 (cp:main-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // CP_Round: 1\n\t\t\t\t\"0202\" + // CP_Value: 2 (abstain)\n\t\t\t\t\"0305\" + // Just type: 5\n\t\t\t\t\"04584b\" + // Just: JustTypeMainVoteConflict\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // Just0: Type (No)\n\t\t\t\t\"025840\" + // Just0Data\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"0302\" + // Just1: Type (JustTypeInitYes)\n\t\t\t\t\"0441\" + // Just1Data\n\t\t\t\t\"A0\" + // Empty Array\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustMainVoteConflict\",\n\t\t\t\"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB3200000001004d41494e2d564f5445010002\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0104\" + // Type: 4 (cp:main-vote)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"0458200000000000000000000000000000000000000000000000000000000000000000\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // CP_Round: 1\n\t\t\t\t\"0201\" + // CP_Value: 1\n\t\t\t\t\"0306\" + // Just type: 6\n\t\t\t\t\"045840\" + // Just: JustTypeMainVoteNoConflict\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustMainVoteNoConflict\",\n\t\t\t\"00000000000000000000000000000000000000000000000000000000000000003200000001004d41494e2d564f5445010001\",\n\t\t},\n\t\t{\n\t\t\t\"A7\" + // map(7)\n\t\t\t\t\"0105\" + // Type: 4 (cp:decided)\n\t\t\t\t\"021832\" + // Height: 50\n\t\t\t\t\"0301\" + // Round: 1\n\t\t\t\t\"0458200000000000000000000000000000000000000000000000000000000000000000\" + // Block Hash\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\t\"06\" + // CP_vote\n\t\t\t\t\"A4\" + // map(4)\n\t\t\t\t\"0101\" + // CP_Round: 1\n\t\t\t\t\"0201\" + // CP_Value: 1\n\t\t\t\t\"0307\" + // Just type: 7\n\t\t\t\t\"045840\" + // Just: JustTypeDecided\n\t\t\t\t\"A1\" + // map(1)\n\t\t\t\t\"01583C\" + // Certificate (60 bytes)\n\t\t\t\t\"32000000010004010203040094D25422904AC1D130AC981374AA4424F988\" + // Certificate Data\n\t\t\t\t\"61E99131078EFEFD62FC52CF072B0C08BB04E4E6496BA48DE4F3D3309AAB\" +\n\t\t\t\t\"07f6\", // Signature -> Null\n\t\t\t\"JustDecided\",\n\t\t\t\"000000000000000000000000000000000000000000000000000000000000000032000000010044454349444544010001\",\n\t\t},\n\t}\n\n\tts := testsuite.NewTestSuite(t)\n\tfor _, tt := range tests {\n\t\tbz1, _ := hex.DecodeString(tt.data)\n\n\t\tvote := new(vote.Vote)\n\t\terr := vote.UnmarshalCBOR(bz1)\n\t\trequire.NoError(t, err)\n\n\t\tbz2, err := vote.MarshalCBOR()\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, bz1, bz2)\n\n\t\texpectedHash := hash.CalcHash(bz1)\n\t\tassert.Equal(t, expectedHash, vote.Hash())\n\n\t\tvote.SetSignature(ts.RandBLSSignature())\n\t\trequire.NoError(t, vote.BasicCheck())\n\n\t\texpectedSignBytes, _ := hex.DecodeString(tt.signBytes)\n\t\tassert.Equal(t, expectedSignBytes, vote.SignBytes())\n\n\t\tif tt.justType != \"\" {\n\t\t\tassert.Equal(t, tt.justType, vote.CPJust().Type().String())\n\t\t}\n\t}\n}\n\nfunc TestVoteSignature(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\thash1 := ts.RandHash()\n\tpub1, prv1 := ts.RandBLSKeyPair()\n\tpub2, prv2 := ts.RandBLSKeyPair()\n\n\tvote1 := vote.NewPrepareVote(hash1, 101, 5, pub1.ValidatorAddress())\n\tvote2 := vote.NewPrepareVote(hash1, 101, 5, pub2.ValidatorAddress())\n\n\trequire.Error(t, vote1.BasicCheck(), \"No signature\")\n\n\tsig1 := prv1.SignNative(vote1.SignBytes())\n\tvote1.SetSignature(sig1)\n\terr1 := vote1.Verify(pub1)\n\trequire.NoError(t, err1, \"Ok\")\n\n\tsig2 := prv2.SignNative(vote2.SignBytes())\n\tvote2.SetSignature(sig2)\n\terr2 := vote2.Verify(pub1)\n\trequire.ErrorIs(t, err2, vote.InvalidSignerError{\n\t\tExpected: pub1.ValidatorAddress(),\n\t\tGot:      pub2.ValidatorAddress(),\n\t})\n\n\tsig3 := prv1.SignNative(vote2.SignBytes())\n\tvote2.SetSignature(sig3)\n\terr3 := vote2.Verify(pub2)\n\trequire.ErrorIs(t, err3, crypto.ErrInvalidSignature)\n}\n\nfunc TestCPPreVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\n\tt.Run(\"Invalid CP round\", func(t *testing.T) {\n\t\tinvalidCPRound := int16(-1)\n\t\tcpVote := vote.NewCPPreVote(hash.UndefHash, height, round,\n\t\t\tinvalidCPRound, vote.CPValueYes, just, ts.RandAccAddress())\n\n\t\terr := cpVote.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP round\"})\n\t})\n\n\tt.Run(\"invalid CP value\", func(t *testing.T) {\n\t\tinvalidCPValue := vote.CPValue(3)\n\t\tcpVote := vote.NewCPPreVote(hash.UndefHash, height, round,\n\t\t\t1, invalidCPValue, just, ts.RandAccAddress())\n\n\t\terr := cpVote.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP value\"})\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPPreVote(hash.UndefHash, height, round,\n\t\t\t1, vote.CPValueNo, just, ts.RandAccAddress())\n\t\tcpVote.SetSignature(ts.RandBLSSignature())\n\n\t\terr := cpVote.BasicCheck()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int16(1), cpVote.CPRound())\n\t\tassert.Equal(t, vote.CPValueNo, cpVote.CPValue())\n\t\tassert.NotNil(t, cpVote.CPJust())\n\t})\n}\n\nfunc TestCPMainVote(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\n\tt.Run(\"Invalid CP round\", func(t *testing.T) {\n\t\tinvalidCPRound := int16(-1)\n\t\tinvVote := vote.NewCPMainVote(hash.UndefHash, height, round,\n\t\t\tinvalidCPRound, vote.CPValueNo, just, ts.RandAccAddress())\n\n\t\terr := invVote.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP round\"})\n\t})\n\n\tt.Run(\"No CP data\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\n\t\t\t\"A701040218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06f607f6\")\n\t\tdecVote := new(vote.Vote)\n\t\t_ = decVote.UnmarshalCBOR(data)\n\t\tdecVote.SetSignature(ts.RandBLSSignature())\n\n\t\terr := decVote.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"should have CP data\"})\n\t})\n\n\tt.Run(\"Invalid CP value\", func(t *testing.T) {\n\t\tinvalidCPValue := vote.CPValue(3)\n\t\tcpVote := vote.NewCPMainVote(hash.UndefHash, height, round,\n\t\t\t1, invalidCPValue, just, ts.RandAccAddress())\n\n\t\terr := cpVote.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP value\"})\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tcpVote := vote.NewCPMainVote(hash.UndefHash, height, round,\n\t\t\t1, vote.CPValueAbstain, just, ts.RandAccAddress())\n\t\tcpVote.SetSignature(ts.RandBLSSignature())\n\n\t\terr := cpVote.BasicCheck()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int16(1), cpVote.CPRound())\n\t\tassert.Equal(t, vote.CPValueAbstain, cpVote.CPValue())\n\t\tassert.NotNil(t, cpVote.CPJust())\n\t})\n}\n\nfunc TestCPDecided(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\theight := ts.RandHeight()\n\tround := ts.RandRound()\n\tjust := &vote.JustInitYes{}\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tinvalidCPRound := int16(-1)\n\t\tv := vote.NewCPDecidedVote(hash.UndefHash, height, round,\n\t\t\tinvalidCPRound, vote.CPValueNo, just, ts.RandAccAddress())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP round\"})\n\t})\n\n\tt.Run(\"No CP data\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\"A701050218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06f607f6\")\n\t\tv := new(vote.Vote)\n\t\t_ = v.UnmarshalCBOR(data)\n\t\tv.SetSignature(ts.RandBLSSignature())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"should have CP data\"})\n\t})\n\n\tt.Run(\"Invalid CP value\", func(t *testing.T) {\n\t\tinvalidCPValue := vote.CPValue(3)\n\t\tv := vote.NewCPDecidedVote(hash.UndefHash, height, round,\n\t\t\t1, invalidCPValue, just, ts.RandAccAddress())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid CP value\"})\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tvte := vote.NewCPDecidedVote(hash.UndefHash, height, round,\n\t\t\t1, vote.CPValueAbstain, just, ts.RandAccAddress())\n\t\tvte.SetSignature(ts.RandBLSSignature())\n\n\t\terr := vte.BasicCheck()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int16(1), vte.CPRound())\n\t\tassert.Equal(t, vote.CPValueAbstain, vte.CPValue())\n\t\tassert.NotNil(t, vte.CPJust())\n\t})\n}\n\nfunc TestBasicCheck(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tt.Run(\"Should have CP data\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\"A701050218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06f607f6\")\n\t\tv := new(vote.Vote)\n\t\terr := v.UnmarshalCBOR(data)\n\t\trequire.NoError(t, err)\n\n\t\terr = v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"should have CP data\"})\n\t})\n\n\tt.Run(\"Invalid height\", func(t *testing.T) {\n\t\tv := vote.NewPrepareVote(ts.RandHash(), 0, 0, ts.RandAccAddress())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid height\"})\n\t})\n\n\tt.Run(\"Invalid round\", func(t *testing.T) {\n\t\tv := vote.NewPrepareVote(ts.RandHash(), 100, -1, ts.RandAccAddress())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"invalid round\"})\n\t})\n\n\tt.Run(\"No signature\", func(t *testing.T) {\n\t\tv := vote.NewPrepareVote(ts.RandHash(), 100, 0, ts.RandAccAddress())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"no signature\"})\n\t})\n\n\tt.Run(\"Should not have CP data\", func(t *testing.T) {\n\t\tdata, _ := hex.DecodeString(\"A701020218320301045820BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\" +\n\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA06A40100020103020441A007f6\")\n\t\tv := new(vote.Vote)\n\t\t_ = v.UnmarshalCBOR(data)\n\t\tv.SetSignature(ts.RandBLSSignature())\n\n\t\terr := v.BasicCheck()\n\t\trequire.ErrorIs(t, err, vote.BasicCheckError{Reason: \"should not have CP data\"})\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tv := vote.NewPrepareVote(ts.RandHash(), 100, 0, ts.RandAccAddress())\n\t\tv.SetSignature(ts.RandBLSSignature())\n\n\t\trequire.NoError(t, v.BasicCheck())\n\t})\n}\n\nfunc TestSignBytes(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsigner := ts.RandAccAddress()\n\tblockHash := ts.RandHash()\n\theight := ts.RandHeight()\n\tround := types.Round(10)\n\tcpRound := int16(10)\n\tjust := &vote.JustInitNo{}\n\n\tvote1 := vote.NewPrepareVote(blockHash, height, round, signer)\n\tvote2 := vote.NewPrecommitVote(blockHash, height, round, signer)\n\tvote3 := vote.NewCPPreVote(blockHash, height, round, cpRound, vote.CPValueNo, just, signer)\n\tvote4 := vote.NewCPMainVote(blockHash, height, round, cpRound, vote.CPValueAbstain, just, signer)\n\tvote5 := vote.NewCPDecidedVote(blockHash, height, round, cpRound, vote.CPValueYes, just, signer)\n\n\tsby1 := vote1.SignBytes()\n\tsby2 := vote2.SignBytes()\n\tsby3 := vote3.SignBytes()\n\tsby4 := vote4.SignBytes()\n\tsby5 := vote5.SignBytes()\n\n\tassert.Len(t, sby1, 45)\n\tassert.Len(t, sby2, 38)\n\tassert.Len(t, sby3, 49)\n\tassert.Len(t, sby4, 50)\n\tassert.Len(t, sby5, 48)\n\n\tassert.Contains(t, string(sby1), \"PREPARE\")\n\tassert.Contains(t, string(sby3), \"PRE-VOTE\")\n\tassert.Contains(t, string(sby4), \"MAIN-VOTE\")\n\tassert.Contains(t, string(sby5), \"DECIDED\")\n}\n\nfunc TestLogString(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tsigner := ts.RandAccAddress()\n\tblockHash := ts.RandHash()\n\theight := types.Height(100)\n\tround := types.Round(2)\n\tjust := &vote.JustInitNo{}\n\n\tv1 := vote.NewPrepareVote(blockHash, height, round, signer)\n\tv2 := vote.NewPrecommitVote(blockHash, height, round, signer)\n\tv3 := vote.NewCPPreVote(blockHash, height, round, 1, vote.CPValueNo, just, signer)\n\tv4 := vote.NewCPMainVote(blockHash, height, round, 1, vote.CPValueAbstain, just, signer)\n\n\tassert.Contains(t, v1.LogString(), \"100/2/PREPARE\")\n\tassert.Contains(t, v2.LogString(), \"100/2/PRECOMMIT\")\n\tassert.Contains(t, v3.LogString(), \"100/2/PRE-VOTE/1\")\n\tassert.Contains(t, v4.LogString(), \"100/2/MAIN-VOTE/1\")\n}\n\nfunc TestCPValueToString(t *testing.T) {\n\tassert.Equal(t, \"no\", vote.CPValueNo.String())\n\tassert.Equal(t, \"yes\", vote.CPValueYes.String())\n\tassert.Equal(t, \"abstain\", vote.CPValueAbstain.String())\n\tassert.Equal(t, \"unknown: -1\", vote.CPValue(-1).String())\n}\n\nfunc TestCPInvalidJustType(t *testing.T) {\n\tvoteData, _ := hex.DecodeString(\n\t\t\"A7\" + // map(7)\n\t\t\t\"0103\" + // Type: 3 (cp:pre-vote)\n\t\t\t\"021832\" + // Height: 50\n\t\t\t\"0301\" + // Round: 1\n\t\t\t\"0458200000000000000000000000000000000000000000000000000000000000000000\" + // Block Hash\n\t\t\t\"055501AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + // Signer\n\t\t\t\"06\" + // CP_vote\n\t\t\t\"A4\" + // map(4)\n\t\t\t\"0100\" + // CP_Round: 0\n\t\t\t\"0201\" + // CP_Value: 1\n\t\t\t\"0308\" + // Just type: 8 <<<(Unknown Just Type)>>>\n\t\t\t\"0441\" + // Just: JustTypeInitYes\n\t\t\t\"A0\" + // Empty Array\n\t\t\t\"07f6\") // Signature -> Null\n\n\tv := new(vote.Vote)\n\terr := v.UnmarshalCBOR(voteData)\n\trequire.Error(t, err)\n}\n"
  },
  {
    "path": "types/vote/vote_type.go",
    "content": "package vote\n\nimport \"fmt\"\n\ntype Type int\n\nconst (\n\tVoteTypePrepare    = Type(1) // Deprecated  prepare vote\n\tVoteTypePrecommit  = Type(2) // precommit vote\n\tVoteTypeCPPreVote  = Type(3) // change-proposer:pre-vote\n\tVoteTypeCPMainVote = Type(4) // change-proposer:main-vote\n\tVoteTypeCPDecided  = Type(5) // change-proposer:decided\n)\n\nfunc (t Type) IsValid() bool {\n\tswitch t {\n\tcase VoteTypePrepare, VoteTypePrecommit,\n\t\tVoteTypeCPPreVote, VoteTypeCPMainVote, VoteTypeCPDecided:\n\t\treturn true\n\t}\n\n\treturn false\n}\n\nfunc (t Type) String() string {\n\tswitch t {\n\tcase VoteTypePrepare:\n\t\treturn \"PREPARE\"\n\tcase VoteTypePrecommit:\n\t\treturn \"PRECOMMIT\"\n\tcase VoteTypeCPPreVote:\n\t\treturn \"PRE-VOTE\"\n\tcase VoteTypeCPMainVote:\n\t\treturn \"MAIN-VOTE\"\n\tcase VoteTypeCPDecided:\n\t\treturn \"DECIDED\"\n\tdefault:\n\t\treturn fmt.Sprintf(\"%d\", t)\n\t}\n}\n"
  },
  {
    "path": "util/bech32m/bech32m.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage bech32m\n\nimport (\n\t\"strings\"\n)\n\n// ChecksumConst is a type that represents the currently defined bech32\n// checksum constants.\nconst ChecksumConst = int(0x2bc830a3)\n\n// charset is the set of characters used in the data section of bech32 strings.\n// Note that this is ordered, such that for a given charset[i], i is the binary\n// value of the character.\nconst charset = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"\n\n// gen encodes the generator polynomial for the bech32 BCH checksum.\nvar gen = []int{0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3}\n\n// toBytes converts each character in the string 'chars' to the value of the\n// index of the corresponding character in 'charset'.\nfunc toBytes(chars string) ([]byte, error) {\n\tdecoded := make([]byte, 0, len(chars))\n\tfor i := 0; i < len(chars); i++ {\n\t\tindex := strings.IndexByte(charset, chars[i])\n\t\tif index < 0 {\n\t\t\treturn nil, NonCharsetCharError(chars[i])\n\t\t}\n\t\tdecoded = append(decoded, byte(index))\n\t}\n\n\treturn decoded, nil\n}\n\n// bech32Polymod calculates the BCH checksum for a given hrp, values and\n// checksum data. Checksum is optional, and if nil a 0 checksum is assumed.\n//\n// Values and checksum (if provided) MUST be encoded as 5 bits per element (base\n// 32), otherwise the results are undefined.\n//\n// For more details on the polymod calculation, please refer to BIP 173.\n//\n//nolint:gocognit // complexity can't be reduced more.\nfunc bech32Polymod(hrp string, values, checksum []byte) int {\n\tchk := 1\n\n\t// Account for the high bits of the HRP in the checksum.\n\tfor i := 0; i < len(hrp); i++ {\n\t\tb := chk >> 25\n\t\thiBits := int(hrp[i]) >> 5\n\t\tchk = (chk&0x1ffffff)<<5 ^ hiBits\n\t\tfor j := 0; j < 5; j++ {\n\t\t\tif (b>>uint(j))&1 == 1 {\n\t\t\t\tchk ^= gen[j]\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for the separator (0) between high and low bits of the HRP.\n\t// x^0 == x, so we eliminate the redundant xor used in the other rounds.\n\tb0 := chk >> 25\n\tchk = (chk & 0x1ffffff) << 5\n\tfor i := 0; i < 5; i++ {\n\t\tif (b0>>uint(i))&1 == 1 {\n\t\t\tchk ^= gen[i]\n\t\t}\n\t}\n\n\t// Account for the low bits of the HRP.\n\tfor i := 0; i < len(hrp); i++ {\n\t\tb := chk >> 25\n\t\tloBits := int(hrp[i]) & 31\n\t\tchk = (chk&0x1ffffff)<<5 ^ loBits\n\t\tfor j := 0; j < 5; j++ {\n\t\t\tif (b>>uint(j))&1 == 1 {\n\t\t\t\tchk ^= gen[j]\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for the values.\n\tfor _, v := range values {\n\t\tb := chk >> 25\n\t\tchk = (chk&0x1ffffff)<<5 ^ int(v)\n\t\tfor i := 0; i < 5; i++ {\n\t\t\tif (b>>uint(i))&1 == 1 {\n\t\t\t\tchk ^= gen[i]\n\t\t\t}\n\t\t}\n\t}\n\n\tif checksum == nil {\n\t\t// A nil checksum is used during encoding, so assume all bytes are zero.\n\t\t// x^0 == x, so we eliminate the redundant xor used in the other rounds.\n\t\tfor v := 0; v < 6; v++ {\n\t\t\tb := chk >> 25\n\t\t\tchk = (chk & 0x1ffffff) << 5\n\t\t\tfor i := 0; i < 5; i++ {\n\t\t\t\tif (b>>uint(i))&1 == 1 {\n\t\t\t\t\tchk ^= gen[i]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Checksum is provided during decoding, so use it.\n\t\tfor _, v := range checksum {\n\t\t\tb := chk >> 25\n\t\t\tchk = (chk&0x1ffffff)<<5 ^ int(v)\n\t\t\tfor i := 0; i < 5; i++ {\n\t\t\t\tif (b>>uint(i))&1 == 1 {\n\t\t\t\t\tchk ^= gen[i]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chk\n}\n\n// writeBech32Checksum calculates the checksum data expected for a string that\n// will have the given hrp and payload data and writes it to the provided string\n// builder.\n//\n// The payload data MUST be encoded as a base 32 (5 bits per element) byte slice\n// and the hrp MUST only use the allowed character set (ascii chars between 33\n// and 126), otherwise the results are undefined.\n//\n// For more details on the checksum calculation, please refer to BIP 173.\nfunc writeBech32Checksum(hrp string, data []byte, bldr *strings.Builder) {\n\tpolymod := bech32Polymod(hrp, data, nil) ^ ChecksumConst\n\tfor i := 0; i < 6; i++ {\n\t\tb := byte((polymod >> uint(5*(5-i))) & 31)\n\n\t\t// This can't fail, given we explicitly cap the previous b byte by the\n\t\t// first 31 bits.\n\t\tc := charset[b]\n\t\tbldr.WriteByte(c)\n\t}\n}\n\n// bech32VerifyChecksum verifies whether the bech32 string specified by the\n// provided hrp and payload data (encoded as 5 bits per element byte slice) has\n// the correct checksum suffix.\n//\n// Data MUST have more than 6 elements, otherwise this function panics.\n//\n// For more details on the checksum verification, please refer to BIP 173.\nfunc bech32VerifyChecksum(hrp string, data []byte) bool {\n\tchecksum := data[len(data)-6:]\n\tvalues := data[:len(data)-6]\n\tpolymod := bech32Polymod(hrp, values, checksum)\n\n\treturn polymod == ChecksumConst\n}\n\n// DecodeNoLimit decodes a bech32 encoded string, returning the human-readable\n// part and the data part excluding the checksum.  This function does NOT\n// validate against the BIP-173 maximum length allowed for bech32 strings.\n//\n// Note that the returned data is 5-bit (base32) encoded and the human-readable\n// part will be lowercase.\nfunc DecodeNoLimit(bech string) (string, []byte, error) {\n\t// The minimum allowed size of a bech32 string is 8 characters, since it\n\t// needs a non-empty HRP, a separator, and a 6 character checksum.\n\tif len(bech) < 8 {\n\t\treturn \"\", nil, InvalidLengthError(len(bech))\n\t}\n\n\t// Only\tASCII characters between 33 and 126 are allowed.\n\tvar hasLower, hasUpper bool\n\tfor index := 0; index < len(bech); index++ {\n\t\tif bech[index] < 33 || bech[index] > 126 {\n\t\t\treturn \"\", nil, InvalidCharacterError(bech[index])\n\t\t}\n\n\t\t// The characters must be either all lowercase or all uppercase. Testing\n\t\t// directly with ascii codes is safe here, given the previous test.\n\t\thasLower = hasLower || (bech[index] >= 97 && bech[index] <= 122)\n\t\thasUpper = hasUpper || (bech[index] >= 65 && bech[index] <= 90)\n\t\tif hasLower && hasUpper {\n\t\t\treturn \"\", nil, MixedCaseError{}\n\t\t}\n\t}\n\n\t// Bech32 standard uses only the lowercase for of strings for checksum\n\t// calculation.\n\tif hasUpper {\n\t\tbech = strings.ToLower(bech)\n\t}\n\n\t// The string is invalid if the last '1' is non-existent, it is the\n\t// first character of the string (no human-readable part) or one of the\n\t// last 6 characters of the string (since checksum cannot contain '1').\n\tone := strings.LastIndexByte(bech, '1')\n\tif one < 1 || one+7 > len(bech) {\n\t\treturn \"\", nil, InvalidSeparatorIndexError(one)\n\t}\n\n\t// The human-readable part is everything before the last '1'.\n\thrp := bech[:one]\n\tdata := bech[one+1:]\n\n\t// Each character corresponds to the byte with value of the index in\n\t// 'charset'.\n\tdecoded, err := toBytes(data)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\t// Verify if the checksum (stored inside decoded[:]) is valid, given the\n\t// previously decoded hrp.\n\tif !bech32VerifyChecksum(hrp, decoded) {\n\t\t// Invalid checksum. Calculate what it should have been, so that the\n\t\t// error contains this information.\n\n\t\t// Extract the payload bytes and actual checksum in the string.\n\t\tactual := bech[len(bech)-6:]\n\t\tpayload := decoded[:len(decoded)-6]\n\n\t\t// Calculate the expected checksum, given the hrp and payload data.\n\t\tvar expectedBldr strings.Builder\n\t\texpectedBldr.Grow(6)\n\t\twriteBech32Checksum(hrp, payload, &expectedBldr)\n\t\texpected := expectedBldr.String()\n\n\t\terr = InvalidChecksumError{\n\t\t\tExpected: expected,\n\t\t\tActual:   actual,\n\t\t}\n\n\t\treturn \"\", nil, err\n\t}\n\n\t// We exclude the last 6 bytes, which is the checksum.\n\treturn hrp, decoded[:len(decoded)-6], nil\n}\n\n// Decode decodes a bech32 encoded string, returning the human-readable part and\n// the data part excluding the checksum.\n//\n// Note that the returned data is 5-bit (base32) encoded and the human-readable\n// part will be lowercase.\nfunc Decode(bech string) (string, []byte, error) {\n\t// The maximum allowed length for a bech32 string is 90.\n\tif len(bech) > 90 {\n\t\treturn \"\", nil, InvalidLengthError(len(bech))\n\t}\n\n\treturn DecodeNoLimit(bech)\n}\n\n// Encode encodes a byte slice into a bech32 string with the given\n// human-readable part (HRP).  The HRP will be converted to lowercase if needed\n// since mixed cased encodings are not permitted and lowercase is used for\n// checksum purposes.  Note that the bytes must each encode 5 bits (base32).\nfunc Encode(hrp string, data []byte) (string, error) {\n\t// The resulting bech32 string is the concatenation of the lowercase hrp,\n\t// the separator 1, data and the 6-byte checksum.\n\thrp = strings.ToLower(hrp)\n\tvar bldr strings.Builder\n\tbldr.Grow(len(hrp) + 1 + len(data) + 6)\n\tbldr.WriteString(hrp)\n\tbldr.WriteString(\"1\")\n\n\t// Write the data part, using the bech32 charset.\n\tfor _, b := range data {\n\t\tif int(b) >= len(charset) {\n\t\t\treturn \"\", InvalidDataByteError(b)\n\t\t}\n\t\tbldr.WriteByte(charset[b])\n\t}\n\n\t// Calculate and write the checksum of the data.\n\twriteBech32Checksum(hrp, data, &bldr)\n\n\treturn bldr.String(), nil\n}\n\n// ConvertBits converts a byte slice where each byte is encoding fromBits bits,\n// to a byte slice where each byte is encoding toBits bits.\nfunc ConvertBits(data []byte, fromBits, toBits uint8, pad bool) ([]byte, error) {\n\tif fromBits < 1 || fromBits > 8 || toBits < 1 || toBits > 8 {\n\t\treturn nil, InvalidBitGroupsError{}\n\t}\n\n\t// Determine the maximum size the resulting array can have after base\n\t// conversion, so that we can size it a single time. This might be off\n\t// by a byte depending on whether padding is used or not and if the input\n\t// data is a multiple of both fromBits and toBits, but we ignore that and\n\t// just size it to the maximum possible.\n\tmaxSize := len(data)*int(fromBits)/int(toBits) + 1\n\n\t// The final bytes, each byte encoding toBits bits.\n\tregrouped := make([]byte, 0, maxSize)\n\n\t// Keep track of the next byte we create and how many bits we have\n\t// added to it out of the toBits goal.\n\tnextByte := byte(0)\n\tfilledBits := uint8(0)\n\n\tfor _, byt := range data {\n\t\t// Discard unused bits.\n\t\tbyt <<= (8 - fromBits)\n\n\t\t// How many bits remaining to extract from the input data.\n\t\tremFromBits := fromBits\n\t\tfor remFromBits > 0 {\n\t\t\t// How many bits remaining to be added to the next byte.\n\t\t\tremToBits := toBits - filledBits\n\n\t\t\t// The number of bytes to next extract is the minimum of\n\t\t\t// remFromBits and remToBits.\n\t\t\ttoExtract := min(remToBits, remFromBits)\n\n\t\t\t// Add the next bits to nextByte, shifting the already\n\t\t\t// added bits to the left.\n\t\t\tnextByte = (nextByte << toExtract) | (byt >> (8 - toExtract))\n\n\t\t\t// Discard the bits we just extracted and get ready for\n\t\t\t// next iteration.\n\t\t\tbyt <<= toExtract\n\t\t\tremFromBits -= toExtract\n\t\t\tfilledBits += toExtract\n\n\t\t\t// If the nextByte is completely filled, we add it to\n\t\t\t// our regrouped bytes and start on the next byte.\n\t\t\tif filledBits == toBits {\n\t\t\t\tregrouped = append(regrouped, nextByte)\n\t\t\t\tfilledBits = 0\n\t\t\t\tnextByte = 0\n\t\t\t}\n\t\t}\n\t}\n\n\t// We pad any unfinished group if specified.\n\tif pad && filledBits > 0 {\n\t\tnextByte <<= (toBits - filledBits)\n\t\tregrouped = append(regrouped, nextByte)\n\t\tfilledBits = 0\n\t\tnextByte = 0\n\t}\n\n\t// Any incomplete group must be <= 4 bits, and all zeroes.\n\tif filledBits > 0 && (filledBits > 4 || nextByte != 0) {\n\t\treturn nil, InvalidIncompleteGroupError{}\n\t}\n\n\treturn regrouped, nil\n}\n\n// EncodeFromBase256 converts a base256-encoded byte slice into a base32-encoded\n// byte slice and then encodes it into a bech32 string with the given\n// human-readable part (HRP).  The HRP will be converted to lowercase if needed\n// since mixed cased encodings are not permitted and lowercase is used for\n// checksum purposes.\nfunc EncodeFromBase256(hrp string, data []byte) (string, error) {\n\tconverted, err := ConvertBits(data, 8, 5, true)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn Encode(hrp, converted)\n}\n\n// DecodeToBase256 decodes a bech32-encoded string into its associated\n// human-readable part (HRP) and base32-encoded data, converts that data to a\n// base256-encoded byte slice and returns it along with the lowercase HRP.\nfunc DecodeToBase256(bech string) (string, []byte, error) {\n\thrp, data, err := Decode(bech)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tconverted, err := ConvertBits(data, 5, 8, false)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\treturn hrp, converted, nil\n}\n\n// EncodeFromBase256WithType converts a base256-encoded byte slice into a\n// base32-encoded byte slice and, concatenates the given type at the beginning\n// and then encodes it into a bech32 string with the given human-readable part (HRP).\n//\n// The HRP will be converted to lowercase if needed since mixed cased encodings\n// are not permitted and lowercase is used for checksum purposes. The maximum\n// size of type byte is 5 bits.\nfunc EncodeFromBase256WithType(hrp string, typ byte, data []byte) (string, error) {\n\t// Group the data bytes into 5 bit groups, as this is what is used to\n\t// encode each character in the bech32 string.\n\tconverted, err := ConvertBits(data, 8, 5, true)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Concatenate the type and encode the resulting bytes using bech32m encoding.\n\tcombined := make([]byte, len(converted)+1)\n\tcombined[0] = typ\n\tcopy(combined[1:], converted)\n\tstr, err := Encode(hrp, combined)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn str, nil\n}\n\n// DecodeToBase256WithTypeNoLimit decodes a bech32-encoded string into its associated\n// human-readable part (HRP), type byte and base32-encoded data, converts that data\n// to a base256-encoded byte slice.\n//\n// This function does NOT validate against the BIP-173 maximum length allowed\n// for bech32 strings.\nfunc DecodeToBase256WithTypeNoLimit(bech string) (string, byte, []byte, error) {\n\t// Decode the bech32m encoded string.\n\thrp, data, err := DecodeNoLimit(bech)\n\tif err != nil {\n\t\treturn \"\", 0, nil, err\n\t}\n\n\t// The first byte of the decoded data is the type, it must exist.\n\tif len(data) < 1 {\n\t\treturn \"\", 0, nil, InvalidLengthError(0)\n\t}\n\n\t// The remaining characters of the data are grouped into\n\t// words of 5 bits. In order to restore the original program\n\t// bytes, we'll need to regroup into 8 bit words.\n\tregrouped, err := ConvertBits(data[1:], 5, 8, false)\n\tif err != nil {\n\t\treturn \"\", 0, nil, err\n\t}\n\n\treturn hrp, data[0], regrouped, nil\n}\n"
  },
  {
    "path": "util/bech32m/bech32m_test.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage bech32m\n\nimport (\n\t\"bytes\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n)\n\n// TestBech32M tests that the following set of strings, based on the test\n// vectors in BIP-350 are either valid or invalid using the new bech32m\n// checksum algo. Some of these strings are similar to the set of above test\n// vectors, but end up with different checksums.\nfunc TestBech32M(t *testing.T) {\n\ttests := []struct {\n\t\tstr           string\n\t\texpectedError error\n\t}{\n\t\t{\"A1LQFN3A\", nil},\n\t\t{\"a1lqfn3a\", nil},\n\t\t{\"an83characterlonghumanreadablepartthatcontainsthetheexcludedcharactersbioandnumber11sg7hg6\", nil},\n\t\t{\"abcdef1l7aum6echk45nj3s0wdvt2fg8x9yrzpqzd3ryx\", nil},\n\t\t{\"11llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllludsr8\", nil},\n\t\t{\"split1checkupstagehandshakeupstreamerranterredcaperredlc445v\", nil},\n\t\t{\"?1v759aa\", nil},\n\n\t\t// Additional test vectors used in bitcoin core\n\t\t{\"\\x201xj0phk\", InvalidCharacterError('\\x20')},\n\t\t{\"\\x7f1g6xzxy\", InvalidCharacterError('\\x7f')},\n\t\t{\"\\x801vctc34\", InvalidCharacterError('\\x80')},\n\t\t{\n\t\t\t\"an84characterslonghumanreadablepartthatcontainsthetheexcludedcharactersbioandnumber11d6pts4\",\n\t\t\tInvalidLengthError(91),\n\t\t},\n\t\t{\"qyrz8wqd2c9m\", InvalidSeparatorIndexError(-1)},\n\t\t{\"1qyrz8wqd2c9m\", InvalidSeparatorIndexError(0)},\n\t\t{\"y1b0jsk6g\", NonCharsetCharError(98)},\n\t\t{\"lt1igcx5c0\", NonCharsetCharError(105)},\n\t\t{\"in1muywd\", InvalidSeparatorIndexError(2)},\n\t\t{\"mm1crxm3i\", NonCharsetCharError(105)},\n\t\t{\"au1s5cgom\", NonCharsetCharError(111)},\n\t\t{\"16plkw9\", InvalidLengthError(7)},\n\t\t{\"1p2gdwpf\", InvalidSeparatorIndexError(0)},\n\n\t\t{\" 1nwldj5\", InvalidCharacterError(' ')},\n\t\t{\"\\x7f\" + \"1axkwrx\", InvalidCharacterError(0x7f)},\n\t\t{\"\\x801eym55h\", InvalidCharacterError(0x80)},\n\t}\n\n\tfor no, tt := range tests {\n\t\tstr := tt.str\n\t\thrp, decoded, err := Decode(str)\n\t\tif !errors.Is(err, tt.expectedError) {\n\t\t\tt.Errorf(\"%d: (%v) expected decoding error %v \"+\n\t\t\t\t\"instead got %v\", no, str, tt.expectedError,\n\t\t\t\terr)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif err != nil {\n\t\t\t// End test case here if a decoding error was expected.\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check that it encodes to the same string, using bech32 m.\n\t\tencoded, err := Encode(hrp, decoded)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"encoding failed: %v\", err)\n\t\t}\n\n\t\tif !strings.EqualFold(encoded, str) {\n\t\t\tt.Errorf(\"expected data to encode to %v, but got %v\",\n\t\t\t\tstr, encoded)\n\t\t}\n\n\t\t// Flip a bit in the string an make sure it is caught.\n\t\tpos := strings.LastIndexAny(str, \"1\")\n\t\tflipped := str[:pos+1] + string((str[pos+1] ^ 1)) + str[pos+2:]\n\t\t_, _, err = Decode(flipped)\n\t\tif err == nil {\n\t\t\tt.Error(\"expected decoding to fail\")\n\t\t}\n\t}\n}\n\n// TestMixedCaseEncode ensures mixed case HRPs are converted to lowercase as\n// expected when encoding and that decoding the produced encoding when converted\n// to all uppercase produces the lowercase HRP and original data.\nfunc TestMixedCaseEncode(t *testing.T) {\n\ttests := []struct {\n\t\tname    string\n\t\thrp     string\n\t\tdata    string\n\t\tencoded string\n\t}{{\n\t\tname:    \"all uppercase HRP with no data\",\n\t\thrp:     \"A\",\n\t\tdata:    \"\",\n\t\tencoded: \"a1lqfn3a\",\n\t}, {\n\t\tname:    \"all uppercase HRP with data\",\n\t\thrp:     \"UPPERCASE\",\n\t\tdata:    \"787878\",\n\t\tencoded: \"uppercase10pu8s9vw67r\",\n\t}, {\n\t\tname:    \"mixed case HRP even offsets uppercase\",\n\t\thrp:     \"AbCdEf\",\n\t\tdata:    \"00443214c74254b635cf84653a56d7c675be77df\",\n\t\tencoded: \"abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lwusvrv\",\n\t}, {\n\t\tname:    \"mixed case HRP odd offsets uppercase \",\n\t\thrp:     \"aBcDeF\",\n\t\tdata:    \"00443214c74254b635cf84653a56d7c675be77df\",\n\t\tencoded: \"abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lwusvrv\",\n\t}, {\n\t\tname:    \"all lowercase HRP\",\n\t\thrp:     \"abcdef\",\n\t\tdata:    \"00443214c74254b635cf84653a56d7c675be77df\",\n\t\tencoded: \"abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lwusvrv\",\n\t}}\n\n\tfor _, tt := range tests {\n\t\t// Convert the text hex to bytes, convert those bytes from base256 to\n\t\t// base32, then ensure the encoded result with the HRP provided in the\n\t\t// test data is as expected.\n\t\tdata, err := hex.DecodeString(tt.data)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: invalid hex %q: %v\", tt.name, tt.data, err)\n\n\t\t\tcontinue\n\t\t}\n\t\tconvertedData, err := ConvertBits(data, 8, 5, true)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected convert bits error: %v\", tt.name,\n\t\t\t\terr)\n\n\t\t\tcontinue\n\t\t}\n\t\tgotEncoded, err := Encode(tt.hrp, convertedData)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected encode error: %v\", tt.name, err)\n\n\t\t\tcontinue\n\t\t}\n\t\tif gotEncoded != tt.encoded {\n\t\t\tt.Errorf(\"%q: mismatched encoding -- got %q, want %q\", tt.name,\n\t\t\t\tgotEncoded, tt.encoded)\n\n\t\t\tcontinue\n\t\t}\n\n\t\t// Ensure the decoding the expected lowercase encoding converted to all\n\t\t// uppercase produces the lowercase HRP and original data.\n\t\tgotHRP, gotData, err := Decode(strings.ToUpper(tt.encoded))\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected decode error: %v\", tt.name, err)\n\n\t\t\tcontinue\n\t\t}\n\t\twantHRP := strings.ToLower(tt.hrp)\n\t\tif gotHRP != wantHRP {\n\t\t\tt.Errorf(\"%q: mismatched decoded HRP -- got %q, want %q\", tt.name,\n\t\t\t\tgotHRP, wantHRP)\n\n\t\t\tcontinue\n\t\t}\n\t\tconvertedGotData, err := ConvertBits(gotData, 5, 8, false)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected convert bits error: %v\", tt.name,\n\t\t\t\terr)\n\n\t\t\tcontinue\n\t\t}\n\t\tif !bytes.Equal(convertedGotData, data) {\n\t\t\tt.Errorf(\"%q: mismatched data -- got %x, want %x\", tt.name,\n\t\t\t\tconvertedGotData, data)\n\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\n// TestCanDecodeUnlimtedBech32 tests whether decoding a large bech32 string works\n// when using the DecodeNoLimit version.\nfunc TestCanDecodeUnlimtedBech32(t *testing.T) {\n\tinput := \"11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqp2krp0\"\n\n\t// basic check that an input of this length errors on regular Decode()\n\t_, _, err := Decode(input)\n\tif err == nil {\n\t\tt.Fatal(\"Test vector not appropriate\")\n\t}\n\n\t// Try and decode it.\n\thrp, data, err := DecodeNoLimit(input)\n\tif err != nil {\n\t\tt.Fatalf(\"Expected decoding of large string to work. Got error: %v\", err)\n\t}\n\n\t// Verify data for correctness.\n\tif hrp != \"1\" {\n\t\tt.Fatalf(\"Unexpected hrp: %v\", hrp)\n\t}\n\tdecodedHex := fmt.Sprintf(\"%x\", data)\n\texpected := \"00000000000000000000000000000000000000000000000000000000000000000000000000000000000\" +\n\t\t\"00000000010000000000000000000000000000000000000000000000000000000000000000000000000\"\n\tif decodedHex != expected {\n\t\tt.Fatalf(\"Unexpected decoded data: %s\", decodedHex)\n\t}\n}\n\n// TestBech32Base256 ensures decoding and encoding various bech32, HRPs, and\n// data produces the expected results when using EncodeFromBase256 and\n// DecodeToBase256.  It includes tests for proper handling of case\n// manipulations.\nfunc TestBech32Base256(t *testing.T) {\n\ttests := []struct {\n\t\tname    string // test name\n\t\tencoded string // bech32 string to decode\n\t\thrp     string // expected human-readable part\n\t\tdata    string // expected hex-encoded data\n\t\terr     error  // expected error\n\t}{{\n\t\tname:    \"all uppercase, no data\",\n\t\tencoded: \"A1LQFN3A\",\n\t\thrp:     \"a\",\n\t\tdata:    \"\",\n\t}, {\n\t\tname:    \"long hrp with separator and excluded chars, no data\",\n\t\tencoded: \"an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio17hy8dj\",\n\t\thrp:     \"an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio\",\n\t\tdata:    \"\",\n\t}, {\n\t\tname:    \"6 char hrp with data with leading zero\",\n\t\tencoded: \"abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lwusvrv\",\n\t\thrp:     \"abcdef\",\n\t\tdata:    \"00443214c74254b635cf84653a56d7c675be77df\",\n\t}, {\n\t\tname:    \"hrp same as separator and max length encoded string\",\n\t\tencoded: \"11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdm6ems\",\n\t\thrp:     \"1\",\n\t\tdata:    \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t}, {\n\t\tname:    \"5 char hrp with data chosen to produce human-readable data part\",\n\t\tencoded: \"split1checkupstagehandshakeupstreamerranterredcaperredlc445v\",\n\t\thrp:     \"split\",\n\t\tdata:    \"c5f38b70305f519bf66d85fb6cf03058f3dde463ecd7918f2dc743918f2d\",\n\t}, {\n\t\tname:    \"same as previous but with checksum invalidated\",\n\t\tencoded: \"split1checkupstagehandshakeupstreamerranterredcaperred2y9e2w\",\n\t\terr:     InvalidChecksumError{\"lc445v\", \"2y9e2w\"},\n\t}, {\n\t\tname:    \"hrp with invalid character (space)\",\n\t\tencoded: \"s lit1checkupstagehandshakeupstreamerranterredcaperredp8hs2p\",\n\t\terr:     InvalidCharacterError(' '),\n\t}, {\n\t\tname:    \"hrp with invalid character (DEL)\",\n\t\tencoded: \"spl\\x7ft1checkupstagehandshakeupstreamerranterredcaperredlc445v\",\n\t\terr:     InvalidCharacterError(127),\n\t}, {\n\t\tname:    \"data part with invalid character (o)\",\n\t\tencoded: \"split1cheo2y9e2w\",\n\t\terr:     NonCharsetCharError('o'),\n\t}, {\n\t\tname:    \"data part too short\",\n\t\tencoded: \"split1a2y9w\",\n\t\terr:     InvalidSeparatorIndexError(5),\n\t}, {\n\t\tname:    \"empty hrp\",\n\t\tencoded: \"1checkupstagehandshakeupstreamerranterredcaperredlc445v\",\n\t\terr:     InvalidSeparatorIndexError(0),\n\t}, {\n\t\tname:    \"no separator\",\n\t\tencoded: \"pzry9x0s0muk\",\n\t\terr:     InvalidSeparatorIndexError(-1),\n\t}, {\n\t\tname:    \"too long by one char\",\n\t\tencoded: \"11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j\",\n\t\terr:     InvalidLengthError(91),\n\t}, {\n\t\tname:    \"invalid due to mixed case in hrp\",\n\t\tencoded: \"aBcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw\",\n\t\terr:     MixedCaseError{},\n\t}, {\n\t\tname:    \"invalid due to mixed case in data part\",\n\t\tencoded: \"abcdef1Qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw\",\n\t\terr:     MixedCaseError{},\n\t}}\n\n\tfor _, tt := range tests {\n\t\t// Ensure the decode either produces an error or not as expected.\n\t\tstr := tt.encoded\n\t\tgotHRP, gotData, err := DecodeToBase256(str)\n\t\tif !errors.Is(tt.err, err) {\n\t\t\tt.Errorf(\"%q: unexpected decode error -- got %v, want %v\",\n\t\t\t\ttt.name, err, tt.err)\n\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\t// End test case here if a decoding error was expected.\n\t\t\tcontinue\n\t\t}\n\n\t\t// Ensure the expected HRP and original data are as expected.\n\t\tif gotHRP != tt.hrp {\n\t\t\tt.Errorf(\"%q: mismatched decoded HRP -- got %q, want %q\", tt.name,\n\t\t\t\tgotHRP, tt.hrp)\n\n\t\t\tcontinue\n\t\t}\n\t\tdata, err := hex.DecodeString(tt.data)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: invalid hex %q: %v\", tt.name, tt.data, err)\n\n\t\t\tcontinue\n\t\t}\n\t\tif !bytes.Equal(gotData, data) {\n\t\t\tt.Errorf(\"%q: mismatched data -- got %x, want %x\", tt.name,\n\t\t\t\tgotData, data)\n\n\t\t\tcontinue\n\t\t}\n\n\t\t// Encode the same data with the HRP converted to all uppercase and\n\t\t// ensure the result is the lowercase version of the original encoded\n\t\t// bech32 string.\n\t\tgotEncoded, err := EncodeFromBase256(strings.ToUpper(tt.hrp), data)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected uppercase HRP encode error: %v\", tt.name,\n\t\t\t\terr)\n\t\t}\n\t\twantEncoded := strings.ToLower(str)\n\t\tif gotEncoded != wantEncoded {\n\t\t\tt.Errorf(\"%q: mismatched encoding -- got %q, want %q\", tt.name,\n\t\t\t\tgotEncoded, wantEncoded)\n\t\t}\n\n\t\t// Encode the same data with the HRP converted to all lowercase and\n\t\t// ensure the result is the lowercase version of the original encoded\n\t\t// bech32 string.\n\t\tgotEncoded, err = EncodeFromBase256(strings.ToLower(tt.hrp), data)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected lowercase HRP encode error: %v\", tt.name,\n\t\t\t\terr)\n\t\t}\n\t\tif gotEncoded != wantEncoded {\n\t\t\tt.Errorf(\"%q: mismatched encoding -- got %q, want %q\", tt.name,\n\t\t\t\tgotEncoded, wantEncoded)\n\t\t}\n\n\t\t// Encode the same data with the HRP converted to mixed upper and\n\t\t// lowercase and ensure the result is the lowercase version of the\n\t\t// original encoded bech32 string.\n\t\tvar mixedHRPBuilder strings.Builder\n\t\tfor index, chr := range tt.hrp {\n\t\t\tif index%2 == 0 {\n\t\t\t\tmixedHRPBuilder.WriteString(strings.ToUpper(string(chr)))\n\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmixedHRPBuilder.WriteRune(chr)\n\t\t}\n\t\tgotEncoded, err = EncodeFromBase256(mixedHRPBuilder.String(), data)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%q: unexpected lowercase HRP encode error: %v\", tt.name,\n\t\t\t\terr)\n\t\t}\n\t\tif gotEncoded != wantEncoded {\n\t\t\tt.Errorf(\"%q: mismatched encoding -- got %q, want %q\", tt.name,\n\t\t\t\tgotEncoded, wantEncoded)\n\t\t}\n\n\t\t// Ensure a bit flip in the string is caught.\n\t\tpos := strings.LastIndexAny(tt.encoded, \"1\")\n\t\tflipped := str[:pos+1] + string((str[pos+1] ^ 1)) + str[pos+2:]\n\t\t_, _, err = DecodeToBase256(flipped)\n\t\tif err == nil {\n\t\t\tt.Error(\"expected decoding to fail\")\n\t\t}\n\t}\n}\n\n// BenchmarkEncodeDecodeCycle performs a benchmark for a full encode/decode\n// cycle of a bech32 string. It also  reports the allocation count, which we\n// expect to be 2 for a fully optimized cycle.\nfunc BenchmarkEncodeDecodeCycle(b *testing.B) {\n\t// Use a fixed, 49-byte raw data for testing.\n\tinputData, err := hex.DecodeString(\n\t\t\"cbe6365ddbcda9a9915422c3f091c13f8c7b2f263b8d34067bd12c274408473fa764871c9dd51b1bb34873b3473b633ed1\")\n\tif err != nil {\n\t\tb.Fatalf(\"failed to initialize input data: %v\", err)\n\t}\n\n\t// Convert this into a 79-byte, base 32 byte slice.\n\tbase32Input, err := ConvertBits(inputData, 8, 5, true)\n\tif err != nil {\n\t\tb.Fatalf(\"failed to convert input to 32 bits-per-element: %v\", err)\n\t}\n\n\t// Use a fixed hrp for the tests. This should generate an encoded bech32\n\t// string of size 90 (the maximum allowed by BIP-173).\n\thrp := \"bc\"\n\n\t// Begin the benchmark. Given that we test one roundtrip per iteration\n\t// (that is, one Encode() and one Decode() operation), we expect at most\n\t// 2 allocations per reported test op.\n\tb.ReportAllocs()\n\n\tfor b.Loop() {\n\t\tstr, err := Encode(hrp, base32Input)\n\t\tif err != nil {\n\t\t\tb.Fatalf(\"failed to encode input: %v\", err)\n\t\t}\n\n\t\t_, _, err = Decode(str)\n\t\tif err != nil {\n\t\t\tb.Fatalf(\"failed to decode string: %v\", err)\n\t\t}\n\t}\n}\n\n// TestConvertBits tests whether base conversion works using TestConvertBits().\nfunc TestConvertBits(t *testing.T) {\n\ttests := []struct {\n\t\tinput    string\n\t\toutput   string\n\t\tfromBits uint8\n\t\ttoBits   uint8\n\t\tpad      bool\n\t}{\n\t\t// Trivial empty conversions.\n\t\t{\"\", \"\", 8, 5, false},\n\t\t{\"\", \"\", 8, 5, true},\n\t\t{\"\", \"\", 5, 8, false},\n\t\t{\"\", \"\", 5, 8, true},\n\n\t\t// Conversions of 0 value with/without padding.\n\t\t{\"00\", \"00\", 8, 5, false},\n\t\t{\"00\", \"0000\", 8, 5, true},\n\t\t{\"0000\", \"00\", 5, 8, false},\n\t\t{\"0000\", \"0000\", 5, 8, true},\n\n\t\t// Testing when conversion ends exactly at the byte edge. This makes\n\t\t// both padded and unpadded versions the same.\n\t\t{\"0000000000\", \"0000000000000000\", 8, 5, false},\n\t\t{\"0000000000\", \"0000000000000000\", 8, 5, true},\n\t\t{\"0000000000000000\", \"0000000000\", 5, 8, false},\n\t\t{\"0000000000000000\", \"0000000000\", 5, 8, true},\n\n\t\t// Conversions of full byte sequences.\n\t\t{\"ffffff\", \"1f1f1f1f1e\", 8, 5, true},\n\t\t{\"1f1f1f1f1e\", \"ffffff\", 5, 8, false},\n\t\t{\"1f1f1f1f1e\", \"ffffff00\", 5, 8, true},\n\n\t\t// Sample random conversions.\n\t\t{\"c9ca\", \"190705\", 8, 5, false},\n\t\t{\"c9ca\", \"19070500\", 8, 5, true},\n\t\t{\"19070500\", \"c9ca\", 5, 8, false},\n\t\t{\"19070500\", \"c9ca00\", 5, 8, true},\n\n\t\t// Test cases tested on TestConvertBitsFailures with their corresponding\n\t\t// fixes.\n\t\t{\"ff\", \"1f1c\", 8, 5, true},\n\t\t{\"1f1c10\", \"ff20\", 5, 8, true},\n\n\t\t// Large conversions.\n\t\t{\n\t\t\t\"cbe6365ddbcda9a9915422c3f091c13f8c7b2f263b8d34067bd12c274408473fa764871c9dd51b1bb34873b3473b633ed1\",\n\t\t\t\"190f13030c170e1b1916141a13040a14040b011f01040e01071e0607160b1906070e06130801131\" +\n\t\t\t\t\"b1a0416020e110008081c1f1a0e19040703120e1d0a06181b160d0407070c1a07070d11131d1408\",\n\t\t\t8, 5, true,\n\t\t},\n\t\t{\n\t\t\t\"190f13030c170e1b1916141a13040a14040b011f01040e01071e0607160b1906070e06130801131\" +\n\t\t\t\t\"b1a0416020e110008081c1f1a0e19040703120e1d0a06181b160d0407070c1a07070d11131d1408\",\n\t\t\t\"cbe6365ddbcda9a9915422c3f091c13f8c7b2f263b8d34067bd12c274408473fa764871c9dd51b1bb34873b3473b633ed100\",\n\t\t\t5, 8, true,\n\t\t},\n\t}\n\n\tfor no, tt := range tests {\n\t\tinput, err := hex.DecodeString(tt.input)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"invalid test input data: %v\", err)\n\t\t}\n\n\t\texpected, err := hex.DecodeString(tt.output)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"invalid test output data: %v\", err)\n\t\t}\n\n\t\tactual, err := ConvertBits(input, tt.fromBits, tt.toBits, tt.pad)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"test case %d failed: %v\", no, err)\n\t\t}\n\n\t\tif !bytes.Equal(actual, expected) {\n\t\t\tt.Fatalf(\"test case %d has wrong output; expected=%x actual=%x\",\n\t\t\t\tno, expected, actual)\n\t\t}\n\t}\n}\n\n// TestConvertBitsFailures tests for the expected conversion failures of\n// ConvertBits().\nfunc TestConvertBitsFailures(t *testing.T) {\n\ttests := []struct {\n\t\tinput    string\n\t\tfromBits uint8\n\t\ttoBits   uint8\n\t\tpad      bool\n\t\terr      error\n\t}{\n\t\t// Not enough output bytes when not using padding.\n\t\t{\"ff\", 8, 5, false, InvalidIncompleteGroupError{}},\n\t\t{\"1f1c10\", 5, 8, false, InvalidIncompleteGroupError{}},\n\n\t\t// Unsupported bit conversions.\n\t\t{\"\", 0, 5, false, InvalidBitGroupsError{}},\n\t\t{\"\", 10, 5, false, InvalidBitGroupsError{}},\n\t\t{\"\", 5, 0, false, InvalidBitGroupsError{}},\n\t\t{\"\", 5, 10, false, InvalidBitGroupsError{}},\n\t}\n\n\tfor no, tt := range tests {\n\t\tinput, err := hex.DecodeString(tt.input)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"invalid test input data: %v\", err)\n\t\t}\n\n\t\t_, err = ConvertBits(input, tt.fromBits, tt.toBits, tt.pad)\n\t\tif !errors.Is(err, tt.err) {\n\t\t\tt.Fatalf(\"test case %d failure: expected '%v' got '%v'\", no,\n\t\t\t\ttt.err, err)\n\t\t}\n\t}\n}\n\n// BenchmarkConvertBitsDown benchmarks the speed and memory allocation behavior\n// of ConvertBits when converting from a higher base into a lower base (e.g. 8\n// => 5).\n//\n// Only a single allocation is expected, which is used for the output array.\nfunc BenchmarkConvertBitsDown(b *testing.B) {\n\t// Use a fixed, 49-byte raw data for testing.\n\tinputData, err := hex.DecodeString(\n\t\t\"cbe6365ddbcda9a9915422c3f091c13f8c7b2f263b8d34067bd12c274408473fa764871c9dd51b1bb34873b3473b633ed1\")\n\tif err != nil {\n\t\tb.Fatalf(\"failed to initialize input data: %v\", err)\n\t}\n\n\tb.ReportAllocs()\n\n\tfor b.Loop() {\n\t\t_, err := ConvertBits(inputData, 8, 5, true)\n\t\tif err != nil {\n\t\t\tb.Fatalf(\"error converting bits: %v\", err)\n\t\t}\n\t}\n}\n\n// BenchmarkConvertBitsUp benchmarks the speed and memory allocation behavior\n// of ConvertBits when converting from a lower base into a higher base (e.g. 5\n// => 8).\n//\n// Only a single allocation is expected, which is used for the output array.\nfunc BenchmarkConvertBitsUp(b *testing.B) {\n\t// Use a fixed, 79-byte raw data for testing.\n\tinputData, err := hex.DecodeString(\n\t\t\"190f13030c170e1b1916141a13040a14040b011f01040e01071e0607160b1906070e06130801131\" +\n\t\t\t\"b1a0416020e110008081c1f1a0e19040703120e1d0a06181b160d0407070c1a07070d11131d1408\")\n\tif err != nil {\n\t\tb.Fatalf(\"failed to initialize input data: %v\", err)\n\t}\n\n\tb.ReportAllocs()\n\n\tfor b.Loop() {\n\t\t_, err := ConvertBits(inputData, 8, 5, true)\n\t\tif err != nil {\n\t\t\tb.Fatalf(\"error converting bits: %v\", err)\n\t\t}\n\t}\n}\n\n// TestEncodeFromBase256WithType tests for the expected behavior of\n// EncodeFromBase256WithType function.\nfunc TestEncodeFromBase256WithType(t *testing.T) {\n\ttests := []struct {\n\t\thrp           string\n\t\ttyp           byte\n\t\tinput         string\n\t\texpectedBech  string\n\t\texpectedError error\n\t}{\n\t\t{\"A\", 0, \"\", \"a1qy52hkn\", nil},\n\t\t{\"AbC\", 1, \"1234\", \"abc1pzg6qgtt0h8\", nil},\n\t\t{\"\", 1, \"abcd\", \"1p40xsjtqww4\", nil},\n\t\t{\"\", 32, \"1\", \"\", InvalidDataByteError(32)},\n\t}\n\n\tfor no, tt := range tests {\n\t\tdata, _ := hex.DecodeString(tt.input)\n\t\tenc, err := EncodeFromBase256WithType(tt.hrp, tt.typ, data)\n\t\tif !errors.Is(err, tt.expectedError) {\n\t\t\tt.Errorf(\"%d: (%v) expected encoding error \"+\n\t\t\t\t\"instead got %v\", no, tt.expectedError,\n\t\t\t\terr)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif enc != tt.expectedBech {\n\t\t\tt.Errorf(\"%d: mismatched encoding -- got %q, want %q\", no,\n\t\t\t\tenc, tt.expectedBech)\n\t\t}\n\t}\n}\n\n// TestDecodeToBase256WithTypeNoLimit tests for the expected behavior of\n// DecodeToBase256WithTypeNoLimit function.\nfunc TestDecodeToBase256WithTypeNoLimit(t *testing.T) {\n\ttests := []struct {\n\t\tbech          string\n\t\texpectedHRP   string\n\t\texpectedTyp   byte\n\t\texpectedData  string\n\t\texpectedError error\n\t}{\n\t\t{\"a1qy52hkn\", \"a\", 0, \"\", nil},\n\t\t{\"abc1pzg6qgtt0h8\", \"abc\", 1, \"1234\", nil},\n\t\t{\"1p40xsjtqww4\", \"\", 0, \"\", InvalidSeparatorIndexError(0)},\n\t\t{\"a1lqfn3a\", \"\", 0, \"\", InvalidLengthError(0)},\n\t}\n\n\tfor no, tt := range tests {\n\t\thrp, typ, data, err := DecodeToBase256WithTypeNoLimit(tt.bech)\n\t\tif !errors.Is(err, tt.expectedError) {\n\t\t\tt.Errorf(\"%d: (%v) expected encoding error \"+\n\t\t\t\t\"instead got %v\", no, tt.expectedError,\n\t\t\t\terr)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif hrp != tt.expectedHRP {\n\t\t\tt.Errorf(\"%d: mismatched HRP -- got %q, want %q\", no,\n\t\t\t\thrp, tt.expectedHRP)\n\t\t}\n\n\t\tif typ != tt.expectedTyp {\n\t\t\tt.Errorf(\"%d: mismatched Type -- got %q, want %q\", no,\n\t\t\t\ttyp, tt.expectedTyp)\n\t\t}\n\n\t\texpectedData, _ := hex.DecodeString(tt.expectedData)\n\t\tif !bytes.Equal(expectedData, data) {\n\t\t\tt.Errorf(\"%d: mismatched HRP -- got \\\"%x\\\", want %q\", no,\n\t\t\t\tdata, tt.expectedData)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/bech32m/error.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage bech32m\n\nimport (\n\t\"fmt\"\n)\n\n// MixedCaseError is returned when the bech32 string has both lower and uppercase\n// characters.\ntype MixedCaseError struct{}\n\nfunc (MixedCaseError) Error() string {\n\treturn \"string not all lowercase or all uppercase\"\n}\n\n// InvalidBitGroupsError is returned when conversion is attempted between byte\n// slices using bit-per-element of unsupported value.\ntype InvalidBitGroupsError struct{}\n\nfunc (InvalidBitGroupsError) Error() string {\n\treturn \"only bit groups between 1 and 8 allowed\"\n}\n\n// InvalidIncompleteGroupError is returned when then byte slice used as input has\n// data of wrong length.\ntype InvalidIncompleteGroupError struct{}\n\nfunc (InvalidIncompleteGroupError) Error() string {\n\treturn \"invalid incomplete group\"\n}\n\n// InvalidLengthError is returned when the bech32 string has an invalid length\n// given the BIP-173 defined restrictions.\ntype InvalidLengthError int\n\nfunc (e InvalidLengthError) Error() string {\n\treturn fmt.Sprintf(\"invalid bech32 string length %d\", int(e))\n}\n\n// InvalidCharacterError is returned when the bech32 string has a character\n// outside the range of the supported charset.\ntype InvalidCharacterError rune\n\nfunc (e InvalidCharacterError) Error() string {\n\treturn fmt.Sprintf(\"invalid character in string: '%c'\", rune(e))\n}\n\n// InvalidSeparatorIndexError is returned when the separator character '1' is\n// in an invalid position in the bech32 string.\ntype InvalidSeparatorIndexError int\n\nfunc (e InvalidSeparatorIndexError) Error() string {\n\treturn fmt.Sprintf(\"invalid separator index %d\", int(e))\n}\n\n// NonCharsetCharError is returned when a character outside the specific\n// bech32 charset is used in the string.\ntype NonCharsetCharError rune\n\nfunc (e NonCharsetCharError) Error() string {\n\treturn fmt.Sprintf(\"invalid character not part of charset: %v\", int(e))\n}\n\n// InvalidChecksumError is returned when the extracted checksum of the string\n// is different than what was expected.\ntype InvalidChecksumError struct {\n\tExpected string\n\tActual   string\n}\n\nfunc (e InvalidChecksumError) Error() string {\n\treturn fmt.Sprintf(\"invalid checksum (expected %v got %v)\",\n\t\te.Expected, e.Actual)\n}\n\n// InvalidDataByteError is returned when a byte outside the range required for\n// conversion into a string was found.\ntype InvalidDataByteError byte\n\nfunc (e InvalidDataByteError) Error() string {\n\treturn fmt.Sprintf(\"invalid data byte: %v\", byte(e))\n}\n"
  },
  {
    "path": "util/bip39/README.md",
    "content": "# go-bip39\n\nA golang implementation of the BIP0039 spec for mnemonic seeds\n\n## Example\n\n```go\npackage main\n\nimport (\n  \"github.com/pactus-project/pactus/util/bip39\"\n  \"fmt\"\n)\n\nfunc main(){\n  // Generate a mnemonic for memorization or user-friendly seeds\n  entropy, _ := bip39.NewEntropy(256)\n  mnemonic, _ := bip39.NewMnemonic(entropy)\n\n  // Generate a seed from the mnemonic\n  seed := bip39.NewSeed(mnemonic, \"Secret Passphrase\")\n\n  // Display mnemonic and seed\n  fmt.Println(\"Mnemonic: \", mnemonic)\n  fmt.Println(\"Seed: \", seed)\n}\n```\n\n## Credits\n\nWordlists are from the [bip39 spec](https://github.com/bitcoin/bips/tree/master/bip-0039).\n\nTest vectors are from the standard Python BIP0039 implementation from the\nTrezor team: [https://github.com/trezor/python-mnemonic](https://github.com/trezor/python-mnemonic)\n"
  },
  {
    "path": "util/bip39/bip39.go",
    "content": "// Package bip39 is the Golang implementation of the BIP39 spec.\n//\n// The official BIP39 spec can be found at\n// https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\npackage bip39\n\nimport (\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/util/bip39/wordlists\"\n\t\"golang.org/x/crypto/pbkdf2\"\n)\n\nvar (\n\t// Some bitwise operands for working with big.Ints.\n\tlast11BitsMask  = big.NewInt(2047)\n\tshift11BitsMask = big.NewInt(2048)\n\tbigOne          = big.NewInt(1)\n\tbigTwo          = big.NewInt(2)\n\n\t// used to isolate the checksum bits from the entropy+checksum byte array.\n\twordLengthChecksumMasksMapping = map[int]*big.Int{\n\t\t12: big.NewInt(15),\n\t\t15: big.NewInt(31),\n\t\t18: big.NewInt(63),\n\t\t21: big.NewInt(127),\n\t\t24: big.NewInt(255),\n\t}\n\t// used to use only the desired x of 8 available checksum bits.\n\t// 256 bit (word length 24) requires all 8 bits of the checksum,\n\t// and thus no shifting is needed for it (we would get a divByZero crash if we did).\n\twordLengthChecksumShiftMapping = map[int]*big.Int{\n\t\t12: big.NewInt(16),\n\t\t15: big.NewInt(8),\n\t\t18: big.NewInt(4),\n\t\t21: big.NewInt(2),\n\t}\n\n\t// wordList is the set of words to use.\n\twordList []string\n\n\t// wordMap is a reverse lookup map for wordList.\n\twordMap map[string]int\n)\n\nvar (\n\t// ErrInvalidMnemonic is returned when trying to use a malformed mnemonic.\n\tErrInvalidMnemonic = errors.New(\"invalid mnenomic\")\n\n\t// ErrEntropyLengthInvalid is returned when trying to use an entropy set with\n\t// an invalid size.\n\tErrEntropyLengthInvalid = errors.New(\"entropy length must be [128, 256] and a multiple of 32\")\n\n\t// ErrValidatedSeedLengthMismatch is returned when a validated seed is not the\n\t// same size as the given seed. This should never happen is present only as a\n\t// sanity assertion.\n\tErrValidatedSeedLengthMismatch = errors.New(\"seed length does not match validated seed length\")\n\n\t// ErrChecksumIncorrect is returned when entropy has the incorrect checksum.\n\tErrChecksumIncorrect = errors.New(\"checksum incorrect\")\n)\n\nfunc init() {\n\tSetWordList(wordlists.English)\n}\n\n// SetWordList sets the list of words to use for mnemonics. Currently the list\n// that is set is used package-wide.\nfunc SetWordList(list []string) {\n\twordList = list\n\twordMap = map[string]int{}\n\tfor i, v := range wordList {\n\t\twordMap[v] = i\n\t}\n}\n\n// GetWordList gets the list of words to use for mnemonics.\nfunc GetWordList() []string {\n\treturn wordList\n}\n\n// GetWordIndex gets word index in wordMap.\nfunc GetWordIndex(word string) (int, bool) {\n\tidx, ok := wordMap[word]\n\n\treturn idx, ok\n}\n\n// NewEntropy will create random entropy bytes\n// so long as the requested size bitSize is an appropriate size.\n//\n// bitSize has to be a multiple 32 and be within the inclusive range of {128, 256}.\nfunc NewEntropy(bitSize int) ([]byte, error) {\n\terr := validateEntropyBitSize(bitSize)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tentropy := make([]byte, bitSize/8)\n\t_, err = rand.Read(entropy)\n\n\treturn entropy, err\n}\n\n// EntropyFromMnemonic takes a mnemonic generated by this library,\n// and returns the input entropy used to generate the given mnemonic.\n// An error is returned if the given mnemonic is invalid.\nfunc EntropyFromMnemonic(mnemonic string) ([]byte, error) {\n\tmnemonicSlice, isValid := splitMnemonicWords(mnemonic)\n\tif !isValid {\n\t\treturn nil, ErrInvalidMnemonic\n\t}\n\n\t// Decode the words into a big.Int.\n\tbigInt := big.NewInt(0)\n\tfor _, v := range mnemonicSlice {\n\t\tindex, found := wordMap[v]\n\t\tif !found {\n\t\t\treturn nil, fmt.Errorf(\"word `%v` not found in reverse map\", v)\n\t\t}\n\t\tvar wordBytes [2]byte\n\t\tbinary.BigEndian.PutUint16(wordBytes[:], uint16(index))\n\t\tbigInt = bigInt.Mul(bigInt, shift11BitsMask)\n\t\tbigInt = bigInt.Or(bigInt, big.NewInt(0).SetBytes(wordBytes[:]))\n\t}\n\n\t// Build and add the checksum to the big.Int.\n\tchecksum := big.NewInt(0)\n\tchecksumMask := wordLengthChecksumMasksMapping[len(mnemonicSlice)]\n\tchecksum = checksum.And(bigInt, checksumMask)\n\n\tbigInt.Div(bigInt, big.NewInt(0).Add(checksumMask, bigOne))\n\n\t// The entropy is the underlying bytes of the big.Int. Any upper bytes of\n\t// all 0's are not returned so we pad the beginning of the slice with empty\n\t// bytes if necessary.\n\tentropy := bigInt.Bytes()\n\tentropy = padByteSlice(entropy, len(mnemonicSlice)/3*4)\n\n\t// Generate the checksum and compare with the one we got from the mneomnic.\n\tentropyChecksumBytes := computeChecksum(entropy)\n\tentropyChecksum := big.NewInt(int64(entropyChecksumBytes[0]))\n\tif l := len(mnemonicSlice); l != 24 {\n\t\tchecksumShift := wordLengthChecksumShiftMapping[l]\n\t\tentropyChecksum.Div(entropyChecksum, checksumShift)\n\t}\n\n\tif checksum.Cmp(entropyChecksum) != 0 {\n\t\treturn nil, ErrChecksumIncorrect\n\t}\n\n\treturn entropy, nil\n}\n\n// NewMnemonic will return a string consisting of the mnemonic words for\n// the given entropy.\n// If the provide entropy is invalid, an error will be returned.\nfunc NewMnemonic(entropy []byte) (string, error) {\n\t// Compute some lengths for convenience.\n\tentropyBitLength := len(entropy) * 8\n\tchecksumBitLength := entropyBitLength / 32\n\tsentenceLength := (entropyBitLength + checksumBitLength) / 11\n\n\t// Validate that the requested size is supported.\n\terr := validateEntropyBitSize(entropyBitLength)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Add checksum to entropy.\n\tentropy = addChecksum(entropy)\n\n\t// Break entropy up into sentenceLength chunks of 11 bits.\n\t// For each word AND mask the rightmost 11 bits and find the word at that index.\n\t// Then bitshift entropy 11 bits right and repeat.\n\t// Add to the last empty slot so we can work with LSBs instead of MSB.\n\n\t// Entropy as an int so we can bitmask without worrying about bytes slices.\n\tentropyInt := new(big.Int).SetBytes(entropy)\n\n\t// Slice to hold words in.\n\twords := make([]string, sentenceLength)\n\n\t// Throw away big.Int for AND masking.\n\tword := big.NewInt(0)\n\n\tfor i := sentenceLength - 1; i >= 0; i-- {\n\t\t// Get 11 right most bits and bitshift 11 to the right for next time.\n\t\tword.And(entropyInt, last11BitsMask)\n\t\tentropyInt.Div(entropyInt, shift11BitsMask)\n\n\t\t// Get the bytes representing the 11 bits as a 2 byte slice.\n\t\twordBytes := padByteSlice(word.Bytes(), 2)\n\n\t\t// Convert bytes to an index and add that word to the list.\n\t\twords[i] = wordList[binary.BigEndian.Uint16(wordBytes)]\n\t}\n\n\treturn strings.Join(words, \" \"), nil\n}\n\n// MnemonicToByteArray takes a mnemonic string and turns it into a byte array\n// suitable for creating another mnemonic.\n// An error is returned if the mnemonic is invalid.\nfunc MnemonicToByteArray(mnemonic string, raw ...bool) ([]byte, error) {\n\tvar (\n\t\tmnemonicSlice    = strings.Split(mnemonic, \" \")\n\t\tentropyBitSize   = len(mnemonicSlice) * 11\n\t\tchecksumBitSize  = entropyBitSize % 32\n\t\tfullByteSize     = (entropyBitSize-checksumBitSize)/8 + 1\n\t\tchecksumByteSize = fullByteSize - (fullByteSize % 4)\n\t)\n\n\t// Pre validate that the mnemonic is well formed and only contains words that\n\t// are present in the word list.\n\tif !IsMnemonicValid(mnemonic) {\n\t\treturn nil, ErrInvalidMnemonic\n\t}\n\n\t// Convert word indices to a big.Int representing the entropy.\n\tchecksummedEntropy := big.NewInt(0)\n\tmodulo := big.NewInt(2048)\n\tfor _, v := range mnemonicSlice {\n\t\tindex := big.NewInt(int64(wordMap[v]))\n\t\tchecksummedEntropy.Mul(checksummedEntropy, modulo)\n\t\tchecksummedEntropy.Add(checksummedEntropy, index)\n\t}\n\n\t// Calculate the unchecksummed entropy so we can validate that the checksum is\n\t// correct.\n\tchecksumModulo := big.NewInt(0).Exp(bigTwo, big.NewInt(int64(checksumBitSize)), nil)\n\trawEntropy := big.NewInt(0).Div(checksummedEntropy, checksumModulo)\n\n\t// Convert big.Ints to byte padded byte slices.\n\trawEntropyBytes := padByteSlice(rawEntropy.Bytes(), checksumByteSize)\n\tchecksummedEntropyBytes := padByteSlice(checksummedEntropy.Bytes(), fullByteSize)\n\n\t// Validate that the checksum is correct.\n\tnewChecksummedEntropyBytes := padByteSlice(addChecksum(rawEntropyBytes), fullByteSize)\n\tif !compareByteSlices(checksummedEntropyBytes, newChecksummedEntropyBytes) {\n\t\treturn nil, ErrChecksumIncorrect\n\t}\n\n\tif len(raw) > 0 && raw[0] {\n\t\treturn rawEntropyBytes, nil\n\t}\n\n\treturn checksummedEntropyBytes, nil\n}\n\n// NewSeedWithErrorChecking creates a hashed seed output given the mnemonic string and a password.\n// An error is returned if the mnemonic is not convertible to a byte array.\nfunc NewSeedWithErrorChecking(mnemonic, password string) ([]byte, error) {\n\t_, err := MnemonicToByteArray(mnemonic)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn NewSeed(mnemonic, password), nil\n}\n\n// NewSeed creates a hashed seed output given a provided string and password.\n// No checking is performed to validate that the string provided is a valid mnemonic.\nfunc NewSeed(mnemonic, password string) []byte {\n\treturn pbkdf2.Key([]byte(mnemonic), []byte(\"mnemonic\"+password), 2048, 64, sha512.New)\n}\n\n// IsMnemonicValid attempts to verify that the provided mnemonic is valid.\n// Validity is determined by both the number of words being appropriate,\n// and that all the words in the mnemonic are present in the word list.\nfunc IsMnemonicValid(mnemonic string) bool {\n\t_, err := EntropyFromMnemonic(mnemonic)\n\n\treturn err == nil\n}\n\n// Appends to data the first (len(data) / 32)bits of the result of sha256(data).\n// Currently only supports data up to 32 bytes.\nfunc addChecksum(data []byte) []byte {\n\t// Get first byte of sha256\n\thash := computeChecksum(data)\n\tfirstChecksumByte := hash[0]\n\n\t// len() is in bytes so we divide by 4\n\tchecksumBitLength := uint(len(data) / 4)\n\n\t// For each bit of check sum we want we shift the data one the left\n\t// and then set the (new) right most bit equal to checksum bit at that index\n\t// staring from the left\n\tdataBigInt := new(big.Int).SetBytes(data)\n\tfor i := uint(0); i < checksumBitLength; i++ {\n\t\t// Bitshift 1 left\n\t\tdataBigInt.Mul(dataBigInt, bigTwo)\n\n\t\t// Set rightmost bit if leftmost checksum bit is set\n\t\tif firstChecksumByte&(1<<(7-i)) > 0 {\n\t\t\tdataBigInt.Or(dataBigInt, bigOne)\n\t\t}\n\t}\n\n\treturn dataBigInt.Bytes()\n}\n\nfunc computeChecksum(data []byte) []byte {\n\thasher := sha256.New()\n\t_, _ = hasher.Write(data)\n\n\treturn hasher.Sum(nil)\n}\n\n// validateEntropyBitSize ensures that entropy is the correct size for being a\n// mnemonic.\nfunc validateEntropyBitSize(bitSize int) error {\n\tif (bitSize%32) != 0 || bitSize < 128 || bitSize > 256 {\n\t\treturn ErrEntropyLengthInvalid\n\t}\n\n\treturn nil\n}\n\n// padByteSlice returns a byte slice of the given size with contents of the\n// given slice left padded and any empty spaces filled with 0's.\nfunc padByteSlice(slice []byte, length int) []byte {\n\toffset := length - len(slice)\n\tif offset <= 0 {\n\t\treturn slice\n\t}\n\tnewSlice := make([]byte, length)\n\tcopy(newSlice[offset:], slice)\n\n\treturn newSlice\n}\n\n// compareByteSlices returns true of the byte slices have equal contents and\n// returns false otherwise.\nfunc compareByteSlices(a, b []byte) bool {\n\treturn slices.Equal(a, b)\n}\n\nfunc splitMnemonicWords(mnemonic string) ([]string, bool) {\n\t// Create a list of all the words in the mnemonic sentence\n\twords := strings.Fields(mnemonic)\n\n\t// Get num of words\n\tnumOfWords := len(words)\n\n\t// The number of words should be 12, 15, 18, 21 or 24\n\tif numOfWords%3 != 0 || numOfWords < 12 || numOfWords > 24 {\n\t\treturn nil, false\n\t}\n\n\treturn words, true\n}\n"
  },
  {
    "path": "util/bip39/bip39_test.go",
    "content": "//nolint:dupword,lll // BIP39 test data contains repeated words and long cryptographic strings\npackage bip39\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/bip39/wordlists\"\n)\n\ntype vector struct {\n\tentropy  string\n\tmnemonic string\n\tseed     string\n}\n\nfunc TestGetWordList(t *testing.T) {\n\tassertEqualStringSlices(t, wordlists.English, GetWordList())\n}\n\nfunc TestGetWordIndex(t *testing.T) {\n\tfor expectedIdx, word := range wordList {\n\t\tactualIdx, ok := GetWordIndex(word)\n\t\tassertTrue(t, ok)\n\t\tassertEqual(t, actualIdx, expectedIdx)\n\t}\n\n\tfor _, word := range []string{\"a\", \"set\", \"of\", \"invalid\", \"words\"} {\n\t\tactualIdx, ok := GetWordIndex(word)\n\t\tassertFalse(t, ok)\n\t\tassertEqual(t, actualIdx, 0)\n\t}\n}\n\nfunc TestNewMnemonic(t *testing.T) {\n\tfor _, vector := range testVectors() {\n\t\tentropy, err := hex.DecodeString(vector.entropy)\n\t\tassertNil(t, err)\n\n\t\tmnemonic, err := NewMnemonic(entropy)\n\t\tassertNil(t, err)\n\t\tassertEqualString(t, vector.mnemonic, mnemonic)\n\n\t\t_, err = NewSeedWithErrorChecking(mnemonic, \"TREZOR\")\n\t\tassertNil(t, err)\n\n\t\tseed := NewSeed(mnemonic, \"TREZOR\")\n\t\tassertEqualString(t, vector.seed, hex.EncodeToString(seed))\n\t}\n}\n\nfunc TestNewMnemonicInvalidEntropy(t *testing.T) {\n\t_, err := NewMnemonic([]byte{})\n\tassertNotNil(t, err)\n}\n\nfunc TestNewSeedWithErrorCheckingInvalidMnemonics(t *testing.T) {\n\tfor _, vector := range badMnemonicSentences() {\n\t\t_, err := NewSeedWithErrorChecking(vector.mnemonic, \"TREZOR\")\n\t\tassertNotNil(t, err)\n\t}\n}\n\nfunc TestIsMnemonicValid(t *testing.T) {\n\tfor _, vector := range badMnemonicSentences() {\n\t\tassertFalse(t, IsMnemonicValid(vector.mnemonic))\n\t}\n\n\tfor _, vector := range testVectors() {\n\t\tassertTrue(t, IsMnemonicValid(vector.mnemonic))\n\t}\n}\n\nfunc TestMnemonicToByteArrayInvalidMnemonic(t *testing.T) {\n\tfor _, vector := range badMnemonicSentences() {\n\t\t_, err := MnemonicToByteArray(vector.mnemonic)\n\t\tassertNotNil(t, err)\n\t}\n\n\t_, err := MnemonicToByteArray(\"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon yellow\")\n\tassertNotNil(t, err)\n\tassertEqual(t, err, ErrInvalidMnemonic)\n}\n\nfunc TestNewEntropy(t *testing.T) {\n\t// Good tests.\n\tfor i := 128; i <= 256; i += 32 {\n\t\t_, err := NewEntropy(i)\n\t\tassertNil(t, err)\n\t}\n\t// Bad Values\n\tfor i := 0; i <= 256; i++ {\n\t\tif i%8 != 0 {\n\t\t\t_, err := NewEntropy(i)\n\t\t\tassertNotNil(t, err)\n\t\t}\n\t}\n}\n\nfunc TestMnemonicToByteArrayForDifferentArrayLangths(t *testing.T) {\n\tmax := 1000\n\tfor i := 0; i < max; i++ {\n\t\t// 16, 20, 24, 28, 32\n\t\tlength := 16 + (i%5)*4\n\t\tseed := make([]byte, length)\n\t\tif n, err := rand.Read(seed); err != nil {\n\t\t\tt.Errorf(\"%v\", err)\n\t\t} else if n != length {\n\t\t\tt.Errorf(\"Wrong number of bytes read: %d\", n)\n\t\t}\n\n\t\tmnemonic, err := NewMnemonic(seed)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%v\", err)\n\t\t}\n\n\t\t_, err = MnemonicToByteArray(mnemonic)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Failed for %x - %v\", seed, mnemonic)\n\t\t}\n\t}\n}\n\nfunc TestPadByteSlice(t *testing.T) {\n\tassertEqualByteSlices(t, []byte{0}, padByteSlice([]byte{}, 1))\n\tassertEqualByteSlices(t, []byte{0, 1}, padByteSlice([]byte{1}, 2))\n\tassertEqualByteSlices(t, []byte{1, 1}, padByteSlice([]byte{1, 1}, 2))\n\tassertEqualByteSlices(t, []byte{1, 1, 1}, padByteSlice([]byte{1, 1, 1}, 2))\n}\n\nfunc TestCompareByteSlices(t *testing.T) {\n\tassertTrue(t, compareByteSlices([]byte{}, []byte{}))\n\tassertTrue(t, compareByteSlices([]byte{1}, []byte{1}))\n\tassertFalse(t, compareByteSlices([]byte{1}, []byte{0}))\n\tassertFalse(t, compareByteSlices([]byte{1}, []byte{}))\n\tassertFalse(t, compareByteSlices([]byte{1}, nil))\n}\n\nfunc TestMnemonicToByteArrayForZeroLeadingSeeds(t *testing.T) {\n\tmnemonics := []string{\n\t\t\"00000000000000000000000000000000\",\n\t\t\"00a84c51041d49acca66e6160c1fa999\",\n\t\t\"00ca45df1673c76537a2020bfed1dafd\",\n\t\t\"0019d5871c7b81fd83d474ef1c1e1dae\",\n\t\t\"00dcb021afb35ffcdd1d032d2056fc86\",\n\t\t\"0062be7bd09a27288b6cf0eb565ec739\",\n\t\t\"00dc705b5efa0adf25b9734226ba60d4\",\n\t\t\"0017747418d54c6003fa64fade83374b\",\n\t\t\"000d44d3ee7c3dfa45e608c65384431b\",\n\t\t\"008241c1ef976b0323061affe5bf24b9\",\n\t\t\"00a6aec77e4d16bea80b50a34991aaba\",\n\t\t\"0011527b8c6ddecb9d0c20beccdeb58d\",\n\t\t\"001c938c503c8f5a2bba2248ff621546\",\n\t\t\"0002f90aaf7a8327698f0031b6317c36\",\n\t\t\"00bff43071ed7e07f77b14f615993bac\",\n\t\t\"00da143e00ef17fc63b6fb22dcc2c326\",\n\t\t\"00ffc6764fb32a354cab1a3ddefb015d\",\n\t\t\"0062ef47e0985e8953f24760b7598cdd\",\n\t\t\"003bf9765064f71d304908d906c065f5\",\n\t\t\"00993851503471439d154b3613947474\",\n\t\t\"007ad0ffe9eae753a483a76af06dfa67\",\n\t\t\"00091824db9ec19e663bee51d64c83cc\",\n\t\t\"00f48ac621f7e3cb39b2012ac3121543\",\n\t\t\"0072917415cdca24dfa66c4a92c885b4\",\n\t\t\"0027ced2b279ea8a91d29364487cdbf4\",\n\t\t\"00b9c0d37fb10ba272e55842ad812583\",\n\t\t\"004b3d0d2b9285946c687a5350479c8c\",\n\t\t\"00c7c12a37d3a7f8c1532b17c89b724c\",\n\t\t\"00f400c5545f06ae17ad00f3041e4e26\",\n\t\t\"001e290be10df4d209f247ac5878662b\",\n\t\t\"00bf0f74568e582a7dd1ee64f792ec8b\",\n\t\t\"00d2e43ecde6b72b847db1539ed89e23\",\n\t\t\"00cecba6678505bb7bfec8ed307251f6\",\n\t\t\"000aeed1a9edcbb4bc88f610d3ce84eb\",\n\t\t\"00d06206aadfc25c2b21805d283f15ae\",\n\t\t\"00a31789a2ab2d54f8fadd5331010287\",\n\t\t\"003493c5f520e8d5c0483e895a121dc9\",\n\t\t\"004706112800b76001ece2e268bc830e\",\n\t\t\"00ab31e28bb5305be56e38337dbfa486\",\n\t\t\"006872fe85df6b0fa945248e6f9379d1\",\n\t\t\"00717e5e375da6934e3cfdf57edaf3bd\",\n\t\t\"007f1b46e7b9c4c76e77c434b9bccd6b\",\n\t\t\"00dc93735aa35def3b9a2ff676560205\",\n\t\t\"002cd5dcd881a49c7b87714c6a570a76\",\n\t\t\"0013b5af9e13fac87e0c505686cfb6bf\",\n\t\t\"007ab1ec9526b0bc04b64ae65fd42631\",\n\t\t\"00abb4e11d8385c1cca905a6a65e9144\",\n\t\t\"00574fc62a0501ad8afada2e246708c3\",\n\t\t\"005207e0a815bb2da6b4c35ec1f2bf52\",\n\t\t\"00f3460f136fb9700080099cbd62bc18\",\n\t\t\"007a591f204c03ca7b93981237112526\",\n\t\t\"00cfe0befd428f8e5f83a5bfc801472e\",\n\t\t\"00987551ac7a879bf0c09b8bc474d9af\",\n\t\t\"00cadd3ce3d78e49fbc933a85682df3f\",\n\t\t\"00bfbf2e346c855ccc360d03281455a1\",\n\t\t\"004cdf55d429d028f715544ce22d4f31\",\n\t\t\"0075c84a7d15e0ac85e1e41025eed23b\",\n\t\t\"00807dddd61f71725d336cab844d2cb5\",\n\t\t\"00422f21b77fe20e367467ed98c18410\",\n\t\t\"00b44d0ac622907119c626c850a462fd\",\n\t\t\"00363f5e7f22fc49f3cd662a28956563\",\n\t\t\"000fe5837e68397bbf58db9f221bdc4e\",\n\t\t\"0056af33835c888ef0c22599686445d3\",\n\t\t\"00790a8647fd3dfb38b7e2b6f578f2c6\",\n\t\t\"00da8d9009675cb7beec930e263014fb\",\n\t\t\"00d4b384540a5bb54aa760edaa4fb2fe\",\n\t\t\"00be9b1479ed680fdd5d91a41eb926d0\",\n\t\t\"009182347502af97077c40a6e74b4b5c\",\n\t\t\"00f5c90ee1c67fa77fd821f8e9fab4f1\",\n\t\t\"005568f9a2dd6b0c0cc2f5ba3d9cac38\",\n\t\t\"008b481f8678577d9cf6aa3f6cd6056b\",\n\t\t\"00c4323ece5e4fe3b6cd4c5c932931af\",\n\t\t\"009791f7550c3798c5a214cb2d0ea773\",\n\t\t\"008a7baab22481f0ad8167dd9f90d55c\",\n\t\t\"00f0e601519aafdc8ff94975e64c946d\",\n\t\t\"0083b61e0daa9219df59d697c270cd31\",\n\t}\n\n\tfor _, m := range mnemonics {\n\t\tseed, _ := hex.DecodeString(m)\n\n\t\tmnemonic, err := NewMnemonic(seed)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"%v\", err)\n\t\t}\n\n\t\t_, err = MnemonicToByteArray(mnemonic)\n\t\tif err != nil {\n\t\t\tt.Errorf(\"Failed for %x - %v\", seed, mnemonic)\n\t\t}\n\t}\n}\n\nfunc TestEntropyFromMnemonic128(t *testing.T) {\n\ttestEntropyFromMnemonic(t, 128)\n}\n\nfunc TestEntropyFromMnemonic160(t *testing.T) {\n\ttestEntropyFromMnemonic(t, 160)\n}\n\nfunc TestEntropyFromMnemonic192(t *testing.T) {\n\ttestEntropyFromMnemonic(t, 192)\n}\n\nfunc TestEntropyFromMnemonic224(t *testing.T) {\n\ttestEntropyFromMnemonic(t, 224)\n}\n\nfunc TestEntropyFromMnemonic256(t *testing.T) {\n\ttestEntropyFromMnemonic(t, 256)\n}\n\nfunc TestEntropyFromMnemonicInvalidChecksum(t *testing.T) {\n\t_, err := EntropyFromMnemonic(\"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon yellow\")\n\tassertEqual(t, ErrChecksumIncorrect, err)\n}\n\nfunc TestEntropyFromMnemonicInvalidMnemonicSize(t *testing.T) {\n\tfor _, mnemonic := range []string{\n\t\t\"a a a a a a a a a a a a a a a a a a a a a a a a a\", // Too many words\n\t\t\"a\",                           // Too few\n\t\t\"a a a a a a a a a a a a a a\", // Not multiple of 3\n\t} {\n\t\t_, err := EntropyFromMnemonic(mnemonic)\n\t\tassertEqual(t, ErrInvalidMnemonic, err)\n\t}\n}\n\nfunc testEntropyFromMnemonic(t *testing.T, bitSize int) {\n\tt.Helper()\n\n\tfor i := 0; i < 512; i++ {\n\t\texpectedEntropy, err := NewEntropy(bitSize)\n\t\tassertNil(t, err)\n\t\tassertTrue(t, expectedEntropy != nil)\n\n\t\tmnemonic, err := NewMnemonic(expectedEntropy)\n\t\tassertNil(t, err)\n\t\tassertTrue(t, mnemonic != \"\")\n\n\t\tactualEntropy, err := EntropyFromMnemonic(mnemonic)\n\t\tassertNil(t, err)\n\t\tassertEqualByteSlices(t, expectedEntropy, actualEntropy)\n\t}\n}\n\nfunc testVectors() []vector {\n\treturn []vector{\n\t\t{\n\t\t\tentropy:  \"00000000000000000000000000000000\",\n\t\t\tmnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\",\n\t\t\tseed:     \"c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n\t\t\tmnemonic: \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n\t\t\tseed:     \"2e8905819b8723fe2c1d161860e5ee1830318dbf49a83bd451cfb8440c28bd6fa457fe1296106559a3c80937a1c1069be3a3a5bd381ee6260e8d9739fce1f607\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"80808080808080808080808080808080\",\n\t\t\tmnemonic: \"letter advice cage absurd amount doctor acoustic avoid letter advice cage above\",\n\t\t\tseed:     \"d71de856f81a8acc65e6fc851a38d4d7ec216fd0796d0a6827a3ad6ed5511a30fa280f12eb2e47ed2ac03b5c462a0358d18d69fe4f985ec81778c1b370b652a8\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"ffffffffffffffffffffffffffffffff\",\n\t\t\tmnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong\",\n\t\t\tseed:     \"ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a13332572917f0f8e5a589620c6f15b11c61dee327651a14c34e18231052e48c069\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"000000000000000000000000000000000000000000000000\",\n\t\t\tmnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent\",\n\t\t\tseed:     \"035895f2f481b1b0f01fcf8c289c794660b289981a78f8106447707fdd9666ca06da5a9a565181599b79f53b844d8a71dd9f439c52a3d7b3e8a79c906ac845fa\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n\t\t\tmnemonic: \"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will\",\n\t\t\tseed:     \"f2b94508732bcbacbcc020faefecfc89feafa6649a5491b8c952cede496c214a0c7b3c392d168748f2d4a612bada0753b52a1c7ac53c1e93abd5c6320b9e95dd\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"808080808080808080808080808080808080808080808080\",\n\t\t\tmnemonic: \"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always\",\n\t\t\tseed:     \"107d7c02a5aa6f38c58083ff74f04c607c2d2c0ecc55501dadd72d025b751bc27fe913ffb796f841c49b1d33b610cf0e91d3aa239027f5e99fe4ce9e5088cd65\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n\t\t\tmnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when\",\n\t\t\tseed:     \"0cd6e5d827bb62eb8fc1e262254223817fd068a74b5b449cc2f667c3f1f985a76379b43348d952e2265b4cd129090758b3e3c2c49103b5051aac2eaeb890a528\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tmnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art\",\n\t\t\tseed:     \"bda85446c68413707090a52022edd26a1c9462295029f2e60cd7c4f2bbd3097170af7a4d73245cafa9c3cca8d561a7c3de6f5d4a10be8ed2a5e608d68f92fcc8\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n\t\t\tmnemonic: \"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title\",\n\t\t\tseed:     \"bc09fca1804f7e69da93c2f2028eb238c227f2e9dda30cd63699232578480a4021b146ad717fbb7e451ce9eb835f43620bf5c514db0f8add49f5d121449d3e87\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"8080808080808080808080808080808080808080808080808080808080808080\",\n\t\t\tmnemonic: \"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless\",\n\t\t\tseed:     \"c0c519bd0e91a2ed54357d9d1ebef6f5af218a153624cf4f2da911a0ed8f7a09e2ef61af0aca007096df430022f7a2b6fb91661a9589097069720d015e4e982f\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n\t\t\tmnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote\",\n\t\t\tseed:     \"dd48c104698c30cfe2b6142103248622fb7bb0ff692eebb00089b32d22484e1613912f0a5b694407be899ffd31ed3992c456cdf60f5d4564b8ba3f05a69890ad\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"77c2b00716cec7213839159e404db50d\",\n\t\t\tmnemonic: \"jelly better achieve collect unaware mountain thought cargo oxygen act hood bridge\",\n\t\t\tseed:     \"b5b6d0127db1a9d2226af0c3346031d77af31e918dba64287a1b44b8ebf63cdd52676f672a290aae502472cf2d602c051f3e6f18055e84e4c43897fc4e51a6ff\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"b63a9c59a6e641f288ebc103017f1da9f8290b3da6bdef7b\",\n\t\t\tmnemonic: \"renew stay biology evidence goat welcome casual join adapt armor shuffle fault little machine walk stumble urge swap\",\n\t\t\tseed:     \"9248d83e06f4cd98debf5b6f010542760df925ce46cf38a1bdb4e4de7d21f5c39366941c69e1bdbf2966e0f6e6dbece898a0e2f0a4c2b3e640953dfe8b7bbdc5\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"3e141609b97933b66a060dcddc71fad1d91677db872031e85f4c015c5e7e8982\",\n\t\t\tmnemonic: \"dignity pass list indicate nasty swamp pool script soccer toe leaf photo multiply desk host tomato cradle drill spread actor shine dismiss champion exotic\",\n\t\t\tseed:     \"ff7f3184df8696d8bef94b6c03114dbee0ef89ff938712301d27ed8336ca89ef9635da20af07d4175f2bf5f3de130f39c9d9e8dd0472489c19b1a020a940da67\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"0460ef47585604c5660618db2e6a7e7f\",\n\t\t\tmnemonic: \"afford alter spike radar gate glance object seek swamp infant panel yellow\",\n\t\t\tseed:     \"65f93a9f36b6c85cbe634ffc1f99f2b82cbb10b31edc7f087b4f6cb9e976e9faf76ff41f8f27c99afdf38f7a303ba1136ee48a4c1e7fcd3dba7aa876113a36e4\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"72f60ebac5dd8add8d2a25a797102c3ce21bc029c200076f\",\n\t\t\tmnemonic: \"indicate race push merry suffer human cruise dwarf pole review arch keep canvas theme poem divorce alter left\",\n\t\t\tseed:     \"3bbf9daa0dfad8229786ace5ddb4e00fa98a044ae4c4975ffd5e094dba9e0bb289349dbe2091761f30f382d4e35c4a670ee8ab50758d2c55881be69e327117ba\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"2c85efc7f24ee4573d2b81a6ec66cee209b2dcbd09d8eddc51e0215b0b68e416\",\n\t\t\tmnemonic: \"clutch control vehicle tonight unusual clog visa ice plunge glimpse recipe series open hour vintage deposit universe tip job dress radar refuse motion taste\",\n\t\t\tseed:     \"fe908f96f46668b2d5b37d82f558c77ed0d69dd0e7e043a5b0511c48c2f1064694a956f86360c93dd04052a8899497ce9e985ebe0c8c52b955e6ae86d4ff4449\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"eaebabb2383351fd31d703840b32e9e2\",\n\t\t\tmnemonic: \"turtle front uncle idea crush write shrug there lottery flower risk shell\",\n\t\t\tseed:     \"bdfb76a0759f301b0b899a1e3985227e53b3f51e67e3f2a65363caedf3e32fde42a66c404f18d7b05818c95ef3ca1e5146646856c461c073169467511680876c\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"7ac45cfe7722ee6c7ba84fbc2d5bd61b45cb2fe5eb65aa78\",\n\t\t\tmnemonic: \"kiss carry display unusual confirm curtain upgrade antique rotate hello void custom frequent obey nut hole price segment\",\n\t\t\tseed:     \"ed56ff6c833c07982eb7119a8f48fd363c4a9b1601cd2de736b01045c5eb8ab4f57b079403485d1c4924f0790dc10a971763337cb9f9c62226f64fff26397c79\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"4fa1a8bc3e6d80ee1316050e862c1812031493212b7ec3f3bb1b08f168cabeef\",\n\t\t\tmnemonic: \"exile ask congress lamp submit jacket era scheme attend cousin alcohol catch course end lucky hurt sentence oven short ball bird grab wing top\",\n\t\t\tseed:     \"095ee6f817b4c2cb30a5a797360a81a40ab0f9a4e25ecd672a3f58a0b5ba0687c096a6b14d2c0deb3bdefce4f61d01ae07417d502429352e27695163f7447a8c\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"18ab19a9f54a9274f03e5209a2ac8a91\",\n\t\t\tmnemonic: \"board flee heavy tunnel powder denial science ski answer betray cargo cat\",\n\t\t\tseed:     \"6eff1bb21562918509c73cb990260db07c0ce34ff0e3cc4a8cb3276129fbcb300bddfe005831350efd633909f476c45c88253276d9fd0df6ef48609e8bb7dca8\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"18a2e1d81b8ecfb2a333adcb0c17a5b9eb76cc5d05db91a4\",\n\t\t\tmnemonic: \"board blade invite damage undo sun mimic interest slam gaze truly inherit resist great inject rocket museum chief\",\n\t\t\tseed:     \"f84521c777a13b61564234bf8f8b62b3afce27fc4062b51bb5e62bdfecb23864ee6ecf07c1d5a97c0834307c5c852d8ceb88e7c97923c0a3b496bedd4e5f88a9\",\n\t\t},\n\t\t{\n\t\t\tentropy:  \"15da872c95a13dd738fbf50e427583ad61f18fd99f628c417a61cf8343c90419\",\n\t\t\tmnemonic: \"beyond stage sleep clip because twist token leaf atom beauty genius food business side grid unable middle armed observe pair crouch tonight away coconut\",\n\t\t\tseed:     \"b15509eaa2d09d3efd3e006ef42151b30367dc6e3aa5e44caba3fe4d3e352e65101fbdb86a96776b91946ff06f8eac594dc6ee1d3e82a42dfe1b40fef6bcc3fd\",\n\t\t},\n\t}\n}\n\nfunc badMnemonicSentences() []vector {\n\treturn []vector{\n\t\t{mnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon\"},\n\t\t{mnemonic: \"legal winner thank year wave sausage worth useful legal winner thank yellow yellow\"},\n\t\t{mnemonic: \"letter advice cage absurd amount doctor acoustic avoid letter advice caged above\"},\n\t\t{mnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo, wrong\"},\n\t\t{mnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon\"},\n\t\t{mnemonic: \"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will will will\"},\n\t\t{mnemonic: \"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always.\"},\n\t\t{mnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo why\"},\n\t\t{mnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art art\"},\n\t\t{mnemonic: \"legal winner thank year wave sausage worth useful legal winner thanks year wave worth useful legal winner thank year wave sausage worth title\"},\n\t\t{mnemonic: \"letter advice cage absurd amount doctor acoustic avoid letters advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless\"},\n\t\t{mnemonic: \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo voted\"},\n\t\t{mnemonic: \"jello better achieve collect unaware mountain thought cargo oxygen act hood bridge\"},\n\t\t{mnemonic: \"renew, stay, biology, evidence, goat, welcome, casual, join, adapt, armor, shuffle, fault, little, machine, walk, stumble, urge, swap\"},\n\t\t{mnemonic: \"dignity pass list indicate nasty\"},\n\n\t\t// From issue 32\n\t\t{mnemonic: \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon letter\"},\n\t}\n}\n\nfunc assertNil(t *testing.T, object any) {\n\tt.Helper()\n\n\tif object != nil {\n\t\tt.Errorf(\"Expected nil, got %v\", object)\n\t}\n}\n\nfunc assertNotNil(t *testing.T, object any) {\n\tt.Helper()\n\n\tif object == nil {\n\t\tt.Error(\"Expected not nil\")\n\t}\n}\n\nfunc assertTrue(t *testing.T, a bool) {\n\tt.Helper()\n\n\tif !a {\n\t\tt.Error(\"Expected true, got false\")\n\t}\n}\n\nfunc assertFalse(t *testing.T, a bool) {\n\tt.Helper()\n\n\tif a {\n\t\tt.Error(\"Expected false, got true\")\n\t}\n}\n\nfunc assertEqual(t *testing.T, expected, actual any) {\n\tt.Helper()\n\n\tif expected != actual {\n\t\tt.Errorf(\"Objects not equal, expected `%s` and got `%s`\", expected, actual)\n\t}\n}\n\nfunc assertEqualString(t *testing.T, expected, actual string) {\n\tt.Helper()\n\n\tif expected != actual {\n\t\tt.Errorf(\"Strings not equal, expected `%s` and got `%s`\", expected, actual)\n\t}\n}\n\nfunc assertEqualStringSlices(t *testing.T, expected, actual []string) {\n\tt.Helper()\n\n\tif len(expected) != len(actual) {\n\t\tt.Errorf(\"String slices not equal, expected %v and got %v\", expected, actual)\n\n\t\treturn\n\t}\n\tfor i := range expected {\n\t\tif expected[i] != actual[i] {\n\t\t\tt.Errorf(\"String slices not equal, expected %v and got %v\", expected, actual)\n\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc assertEqualByteSlices(t *testing.T, expected, actual []byte) {\n\tt.Helper()\n\n\tif len(expected) != len(actual) {\n\t\tt.Errorf(\"Byte slices not equal, expected %v and got %v\", expected, actual)\n\n\t\treturn\n\t}\n\tfor i := range expected {\n\t\tif expected[i] != actual[i] {\n\t\t\tt.Errorf(\"Byte slices not equal, expected %v and got %v\", expected, actual)\n\n\t\t\treturn\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "util/bip39/example_test.go",
    "content": "//nolint:lll // long hex strings in test output\npackage bip39_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/util/bip39\"\n)\n\nfunc ExampleNewMnemonic() {\n\t// the entropy can be any byte slice, generated how pleased,\n\t// as long its bit size is a multiple of 32 and is within\n\t// the inclusive range of {128,256}\n\tentropy, _ := hex.DecodeString(\"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\")\n\n\t// generate a mnemomic\n\tmnemomic, _ := bip39.NewMnemonic(entropy)\n\tfmt.Println(mnemomic)\n\t// output:\n\t// all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform\n}\n\nfunc ExampleNewSeed() {\n\tseed := bip39.NewSeed(\"all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform\", \"TREZOR\")\n\tfmt.Println(hex.EncodeToString(seed))\n\t// output:\n\t// 26e975ec644423f4a4c4f4215ef09b4bd7ef924e85d1d17c4cf3f136c2863cf6df0a475045652c57eb5fb41513ca2a2d67722b77e954b4b3fc11f7590449191d\n}\n"
  },
  {
    "path": "util/bip39/wordlists/chinese_simplified.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_simplified.txt\n\t// $ crc32 chinese_simplified.txt\n\t// e3721bbf\n\tchecksum := crc32.ChecksumIEEE([]byte(chineseSimplified))\n\tif fmt.Sprintf(\"%x\", checksum) != \"e3721bbf\" {\n\t\tpanic(\"chineseSimplified checksum invalid\")\n\t}\n}\n\n// ChineseSimplified is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_simplified.txt\nvar (\n\tChineseSimplified = strings.Split(strings.TrimSpace(chineseSimplified), \"\\n\")\n\tchineseSimplified = `的\n一\n是\n在\n不\n了\n有\n和\n人\n这\n中\n大\n为\n上\n个\n国\n我\n以\n要\n他\n时\n来\n用\n们\n生\n到\n作\n地\n于\n出\n就\n分\n对\n成\n会\n可\n主\n发\n年\n动\n同\n工\n也\n能\n下\n过\n子\n说\n产\n种\n面\n而\n方\n后\n多\n定\n行\n学\n法\n所\n民\n得\n经\n十\n三\n之\n进\n着\n等\n部\n度\n家\n电\n力\n里\n如\n水\n化\n高\n自\n二\n理\n起\n小\n物\n现\n实\n加\n量\n都\n两\n体\n制\n机\n当\n使\n点\n从\n业\n本\n去\n把\n性\n好\n应\n开\n它\n合\n还\n因\n由\n其\n些\n然\n前\n外\n天\n政\n四\n日\n那\n社\n义\n事\n平\n形\n相\n全\n表\n间\n样\n与\n关\n各\n重\n新\n线\n内\n数\n正\n心\n反\n你\n明\n看\n原\n又\n么\n利\n比\n或\n但\n质\n气\n第\n向\n道\n命\n此\n变\n条\n只\n没\n结\n解\n问\n意\n建\n月\n公\n无\n系\n军\n很\n情\n者\n最\n立\n代\n想\n已\n通\n并\n提\n直\n题\n党\n程\n展\n五\n果\n料\n象\n员\n革\n位\n入\n常\n文\n总\n次\n品\n式\n活\n设\n及\n管\n特\n件\n长\n求\n老\n头\n基\n资\n边\n流\n路\n级\n少\n图\n山\n统\n接\n知\n较\n将\n组\n见\n计\n别\n她\n手\n角\n期\n根\n论\n运\n农\n指\n几\n九\n区\n强\n放\n决\n西\n被\n干\n做\n必\n战\n先\n回\n则\n任\n取\n据\n处\n队\n南\n给\n色\n光\n门\n即\n保\n治\n北\n造\n百\n规\n热\n领\n七\n海\n口\n东\n导\n器\n压\n志\n世\n金\n增\n争\n济\n阶\n油\n思\n术\n极\n交\n受\n联\n什\n认\n六\n共\n权\n收\n证\n改\n清\n美\n再\n采\n转\n更\n单\n风\n切\n打\n白\n教\n速\n花\n带\n安\n场\n身\n车\n例\n真\n务\n具\n万\n每\n目\n至\n达\n走\n积\n示\n议\n声\n报\n斗\n完\n类\n八\n离\n华\n名\n确\n才\n科\n张\n信\n马\n节\n话\n米\n整\n空\n元\n况\n今\n集\n温\n传\n土\n许\n步\n群\n广\n石\n记\n需\n段\n研\n界\n拉\n林\n律\n叫\n且\n究\n观\n越\n织\n装\n影\n算\n低\n持\n音\n众\n书\n布\n复\n容\n儿\n须\n际\n商\n非\n验\n连\n断\n深\n难\n近\n矿\n千\n周\n委\n素\n技\n备\n半\n办\n青\n省\n列\n习\n响\n约\n支\n般\n史\n感\n劳\n便\n团\n往\n酸\n历\n市\n克\n何\n除\n消\n构\n府\n称\n太\n准\n精\n值\n号\n率\n族\n维\n划\n选\n标\n写\n存\n候\n毛\n亲\n快\n效\n斯\n院\n查\n江\n型\n眼\n王\n按\n格\n养\n易\n置\n派\n层\n片\n始\n却\n专\n状\n育\n厂\n京\n识\n适\n属\n圆\n包\n火\n住\n调\n满\n县\n局\n照\n参\n红\n细\n引\n听\n该\n铁\n价\n严\n首\n底\n液\n官\n德\n随\n病\n苏\n失\n尔\n死\n讲\n配\n女\n黄\n推\n显\n谈\n罪\n神\n艺\n呢\n席\n含\n企\n望\n密\n批\n营\n项\n防\n举\n球\n英\n氧\n势\n告\n李\n台\n落\n木\n帮\n轮\n破\n亚\n师\n围\n注\n远\n字\n材\n排\n供\n河\n态\n封\n另\n施\n减\n树\n溶\n怎\n止\n案\n言\n士\n均\n武\n固\n叶\n鱼\n波\n视\n仅\n费\n紧\n爱\n左\n章\n早\n朝\n害\n续\n轻\n服\n试\n食\n充\n兵\n源\n判\n护\n司\n足\n某\n练\n差\n致\n板\n田\n降\n黑\n犯\n负\n击\n范\n继\n兴\n似\n余\n坚\n曲\n输\n修\n故\n城\n夫\n够\n送\n笔\n船\n占\n右\n财\n吃\n富\n春\n职\n觉\n汉\n画\n功\n巴\n跟\n虽\n杂\n飞\n检\n吸\n助\n升\n阳\n互\n初\n创\n抗\n考\n投\n坏\n策\n古\n径\n换\n未\n跑\n留\n钢\n曾\n端\n责\n站\n简\n述\n钱\n副\n尽\n帝\n射\n草\n冲\n承\n独\n令\n限\n阿\n宣\n环\n双\n请\n超\n微\n让\n控\n州\n良\n轴\n找\n否\n纪\n益\n依\n优\n顶\n础\n载\n倒\n房\n突\n坐\n粉\n敌\n略\n客\n袁\n冷\n胜\n绝\n析\n块\n剂\n测\n丝\n协\n诉\n念\n陈\n仍\n罗\n盐\n友\n洋\n错\n苦\n夜\n刑\n移\n频\n逐\n靠\n混\n母\n短\n皮\n终\n聚\n汽\n村\n云\n哪\n既\n距\n卫\n停\n烈\n央\n察\n烧\n迅\n境\n若\n印\n洲\n刻\n括\n激\n孔\n搞\n甚\n室\n待\n核\n校\n散\n侵\n吧\n甲\n游\n久\n菜\n味\n旧\n模\n湖\n货\n损\n预\n阻\n毫\n普\n稳\n乙\n妈\n植\n息\n扩\n银\n语\n挥\n酒\n守\n拿\n序\n纸\n医\n缺\n雨\n吗\n针\n刘\n啊\n急\n唱\n误\n训\n愿\n审\n附\n获\n茶\n鲜\n粮\n斤\n孩\n脱\n硫\n肥\n善\n龙\n演\n父\n渐\n血\n欢\n械\n掌\n歌\n沙\n刚\n攻\n谓\n盾\n讨\n晚\n粒\n乱\n燃\n矛\n乎\n杀\n药\n宁\n鲁\n贵\n钟\n煤\n读\n班\n伯\n香\n介\n迫\n句\n丰\n培\n握\n兰\n担\n弦\n蛋\n沉\n假\n穿\n执\n答\n乐\n谁\n顺\n烟\n缩\n征\n脸\n喜\n松\n脚\n困\n异\n免\n背\n星\n福\n买\n染\n井\n概\n慢\n怕\n磁\n倍\n祖\n皇\n促\n静\n补\n评\n翻\n肉\n践\n尼\n衣\n宽\n扬\n棉\n希\n伤\n操\n垂\n秋\n宜\n氢\n套\n督\n振\n架\n亮\n末\n宪\n庆\n编\n牛\n触\n映\n雷\n销\n诗\n座\n居\n抓\n裂\n胞\n呼\n娘\n景\n威\n绿\n晶\n厚\n盟\n衡\n鸡\n孙\n延\n危\n胶\n屋\n乡\n临\n陆\n顾\n掉\n呀\n灯\n岁\n措\n束\n耐\n剧\n玉\n赵\n跳\n哥\n季\n课\n凯\n胡\n额\n款\n绍\n卷\n齐\n伟\n蒸\n殖\n永\n宗\n苗\n川\n炉\n岩\n弱\n零\n杨\n奏\n沿\n露\n杆\n探\n滑\n镇\n饭\n浓\n航\n怀\n赶\n库\n夺\n伊\n灵\n税\n途\n灭\n赛\n归\n召\n鼓\n播\n盘\n裁\n险\n康\n唯\n录\n菌\n纯\n借\n糖\n盖\n横\n符\n私\n努\n堂\n域\n枪\n润\n幅\n哈\n竟\n熟\n虫\n泽\n脑\n壤\n碳\n欧\n遍\n侧\n寨\n敢\n彻\n虑\n斜\n薄\n庭\n纳\n弹\n饲\n伸\n折\n麦\n湿\n暗\n荷\n瓦\n塞\n床\n筑\n恶\n户\n访\n塔\n奇\n透\n梁\n刀\n旋\n迹\n卡\n氯\n遇\n份\n毒\n泥\n退\n洗\n摆\n灰\n彩\n卖\n耗\n夏\n择\n忙\n铜\n献\n硬\n予\n繁\n圈\n雪\n函\n亦\n抽\n篇\n阵\n阴\n丁\n尺\n追\n堆\n雄\n迎\n泛\n爸\n楼\n避\n谋\n吨\n野\n猪\n旗\n累\n偏\n典\n馆\n索\n秦\n脂\n潮\n爷\n豆\n忽\n托\n惊\n塑\n遗\n愈\n朱\n替\n纤\n粗\n倾\n尚\n痛\n楚\n谢\n奋\n购\n磨\n君\n池\n旁\n碎\n骨\n监\n捕\n弟\n暴\n割\n贯\n殊\n释\n词\n亡\n壁\n顿\n宝\n午\n尘\n闻\n揭\n炮\n残\n冬\n桥\n妇\n警\n综\n招\n吴\n付\n浮\n遭\n徐\n您\n摇\n谷\n赞\n箱\n隔\n订\n男\n吹\n园\n纷\n唐\n败\n宋\n玻\n巨\n耕\n坦\n荣\n闭\n湾\n键\n凡\n驻\n锅\n救\n恩\n剥\n凝\n碱\n齿\n截\n炼\n麻\n纺\n禁\n废\n盛\n版\n缓\n净\n睛\n昌\n婚\n涉\n筒\n嘴\n插\n岸\n朗\n庄\n街\n藏\n姑\n贸\n腐\n奴\n啦\n惯\n乘\n伙\n恢\n匀\n纱\n扎\n辩\n耳\n彪\n臣\n亿\n璃\n抵\n脉\n秀\n萨\n俄\n网\n舞\n店\n喷\n纵\n寸\n汗\n挂\n洪\n贺\n闪\n柬\n爆\n烯\n津\n稻\n墙\n软\n勇\n像\n滚\n厘\n蒙\n芳\n肯\n坡\n柱\n荡\n腿\n仪\n旅\n尾\n轧\n冰\n贡\n登\n黎\n削\n钻\n勒\n逃\n障\n氨\n郭\n峰\n币\n港\n伏\n轨\n亩\n毕\n擦\n莫\n刺\n浪\n秘\n援\n株\n健\n售\n股\n岛\n甘\n泡\n睡\n童\n铸\n汤\n阀\n休\n汇\n舍\n牧\n绕\n炸\n哲\n磷\n绩\n朋\n淡\n尖\n启\n陷\n柴\n呈\n徒\n颜\n泪\n稍\n忘\n泵\n蓝\n拖\n洞\n授\n镜\n辛\n壮\n锋\n贫\n虚\n弯\n摩\n泰\n幼\n廷\n尊\n窗\n纲\n弄\n隶\n疑\n氏\n宫\n姐\n震\n瑞\n怪\n尤\n琴\n循\n描\n膜\n违\n夹\n腰\n缘\n珠\n穷\n森\n枝\n竹\n沟\n催\n绳\n忆\n邦\n剩\n幸\n浆\n栏\n拥\n牙\n贮\n礼\n滤\n钠\n纹\n罢\n拍\n咱\n喊\n袖\n埃\n勤\n罚\n焦\n潜\n伍\n墨\n欲\n缝\n姓\n刊\n饱\n仿\n奖\n铝\n鬼\n丽\n跨\n默\n挖\n链\n扫\n喝\n袋\n炭\n污\n幕\n诸\n弧\n励\n梅\n奶\n洁\n灾\n舟\n鉴\n苯\n讼\n抱\n毁\n懂\n寒\n智\n埔\n寄\n届\n跃\n渡\n挑\n丹\n艰\n贝\n碰\n拔\n爹\n戴\n码\n梦\n芽\n熔\n赤\n渔\n哭\n敬\n颗\n奔\n铅\n仲\n虎\n稀\n妹\n乏\n珍\n申\n桌\n遵\n允\n隆\n螺\n仓\n魏\n锐\n晓\n氮\n兼\n隐\n碍\n赫\n拨\n忠\n肃\n缸\n牵\n抢\n博\n巧\n壳\n兄\n杜\n讯\n诚\n碧\n祥\n柯\n页\n巡\n矩\n悲\n灌\n龄\n伦\n票\n寻\n桂\n铺\n圣\n恐\n恰\n郑\n趣\n抬\n荒\n腾\n贴\n柔\n滴\n猛\n阔\n辆\n妻\n填\n撤\n储\n签\n闹\n扰\n紫\n砂\n递\n戏\n吊\n陶\n伐\n喂\n疗\n瓶\n婆\n抚\n臂\n摸\n忍\n虾\n蜡\n邻\n胸\n巩\n挤\n偶\n弃\n槽\n劲\n乳\n邓\n吉\n仁\n烂\n砖\n租\n乌\n舰\n伴\n瓜\n浅\n丙\n暂\n燥\n橡\n柳\n迷\n暖\n牌\n秧\n胆\n详\n簧\n踏\n瓷\n谱\n呆\n宾\n糊\n洛\n辉\n愤\n竞\n隙\n怒\n粘\n乃\n绪\n肩\n籍\n敏\n涂\n熙\n皆\n侦\n悬\n掘\n享\n纠\n醒\n狂\n锁\n淀\n恨\n牲\n霸\n爬\n赏\n逆\n玩\n陵\n祝\n秒\n浙\n貌\n役\n彼\n悉\n鸭\n趋\n凤\n晨\n畜\n辈\n秩\n卵\n署\n梯\n炎\n滩\n棋\n驱\n筛\n峡\n冒\n啥\n寿\n译\n浸\n泉\n帽\n迟\n硅\n疆\n贷\n漏\n稿\n冠\n嫩\n胁\n芯\n牢\n叛\n蚀\n奥\n鸣\n岭\n羊\n凭\n串\n塘\n绘\n酵\n融\n盆\n锡\n庙\n筹\n冻\n辅\n摄\n袭\n筋\n拒\n僚\n旱\n钾\n鸟\n漆\n沈\n眉\n疏\n添\n棒\n穗\n硝\n韩\n逼\n扭\n侨\n凉\n挺\n碗\n栽\n炒\n杯\n患\n馏\n劝\n豪\n辽\n勃\n鸿\n旦\n吏\n拜\n狗\n埋\n辊\n掩\n饮\n搬\n骂\n辞\n勾\n扣\n估\n蒋\n绒\n雾\n丈\n朵\n姆\n拟\n宇\n辑\n陕\n雕\n偿\n蓄\n崇\n剪\n倡\n厅\n咬\n驶\n薯\n刷\n斥\n番\n赋\n奉\n佛\n浇\n漫\n曼\n扇\n钙\n桃\n扶\n仔\n返\n俗\n亏\n腔\n鞋\n棱\n覆\n框\n悄\n叔\n撞\n骗\n勘\n旺\n沸\n孤\n吐\n孟\n渠\n屈\n疾\n妙\n惜\n仰\n狠\n胀\n谐\n抛\n霉\n桑\n岗\n嘛\n衰\n盗\n渗\n脏\n赖\n涌\n甜\n曹\n阅\n肌\n哩\n厉\n烃\n纬\n毅\n昨\n伪\n症\n煮\n叹\n钉\n搭\n茎\n笼\n酷\n偷\n弓\n锥\n恒\n杰\n坑\n鼻\n翼\n纶\n叙\n狱\n逮\n罐\n络\n棚\n抑\n膨\n蔬\n寺\n骤\n穆\n冶\n枯\n册\n尸\n凸\n绅\n坯\n牺\n焰\n轰\n欣\n晋\n瘦\n御\n锭\n锦\n丧\n旬\n锻\n垄\n搜\n扑\n邀\n亭\n酯\n迈\n舒\n脆\n酶\n闲\n忧\n酚\n顽\n羽\n涨\n卸\n仗\n陪\n辟\n惩\n杭\n姚\n肚\n捉\n飘\n漂\n昆\n欺\n吾\n郎\n烷\n汁\n呵\n饰\n萧\n雅\n邮\n迁\n燕\n撒\n姻\n赴\n宴\n烦\n债\n帐\n斑\n铃\n旨\n醇\n董\n饼\n雏\n姿\n拌\n傅\n腹\n妥\n揉\n贤\n拆\n歪\n葡\n胺\n丢\n浩\n徽\n昂\n垫\n挡\n览\n贪\n慰\n缴\n汪\n慌\n冯\n诺\n姜\n谊\n凶\n劣\n诬\n耀\n昏\n躺\n盈\n骑\n乔\n溪\n丛\n卢\n抹\n闷\n咨\n刮\n驾\n缆\n悟\n摘\n铒\n掷\n颇\n幻\n柄\n惠\n惨\n佳\n仇\n腊\n窝\n涤\n剑\n瞧\n堡\n泼\n葱\n罩\n霍\n捞\n胎\n苍\n滨\n俩\n捅\n湘\n砍\n霞\n邵\n萄\n疯\n淮\n遂\n熊\n粪\n烘\n宿\n档\n戈\n驳\n嫂\n裕\n徙\n箭\n捐\n肠\n撑\n晒\n辨\n殿\n莲\n摊\n搅\n酱\n屏\n疫\n哀\n蔡\n堵\n沫\n皱\n畅\n叠\n阁\n莱\n敲\n辖\n钩\n痕\n坝\n巷\n饿\n祸\n丘\n玄\n溜\n曰\n逻\n彭\n尝\n卿\n妨\n艇\n吞\n韦\n怨\n矮\n歇\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/chinese_traditional.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_traditional.txt\n\t// $ crc32 chinese_traditional.txt\n\t// 3c20b443\n\tchecksum := crc32.ChecksumIEEE([]byte(chineseTraditional))\n\tif fmt.Sprintf(\"%x\", checksum) != \"3c20b443\" {\n\t\tpanic(\"chineseTraditional checksum invalid\")\n\t}\n}\n\n// ChineseTraditional is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_traditional.txt\nvar (\n\tChineseTraditional = strings.Split(strings.TrimSpace(chineseTraditional), \"\\n\")\n\tchineseTraditional = `的\n一\n是\n在\n不\n了\n有\n和\n人\n這\n中\n大\n為\n上\n個\n國\n我\n以\n要\n他\n時\n來\n用\n們\n生\n到\n作\n地\n於\n出\n就\n分\n對\n成\n會\n可\n主\n發\n年\n動\n同\n工\n也\n能\n下\n過\n子\n說\n產\n種\n面\n而\n方\n後\n多\n定\n行\n學\n法\n所\n民\n得\n經\n十\n三\n之\n進\n著\n等\n部\n度\n家\n電\n力\n裡\n如\n水\n化\n高\n自\n二\n理\n起\n小\n物\n現\n實\n加\n量\n都\n兩\n體\n制\n機\n當\n使\n點\n從\n業\n本\n去\n把\n性\n好\n應\n開\n它\n合\n還\n因\n由\n其\n些\n然\n前\n外\n天\n政\n四\n日\n那\n社\n義\n事\n平\n形\n相\n全\n表\n間\n樣\n與\n關\n各\n重\n新\n線\n內\n數\n正\n心\n反\n你\n明\n看\n原\n又\n麼\n利\n比\n或\n但\n質\n氣\n第\n向\n道\n命\n此\n變\n條\n只\n沒\n結\n解\n問\n意\n建\n月\n公\n無\n系\n軍\n很\n情\n者\n最\n立\n代\n想\n已\n通\n並\n提\n直\n題\n黨\n程\n展\n五\n果\n料\n象\n員\n革\n位\n入\n常\n文\n總\n次\n品\n式\n活\n設\n及\n管\n特\n件\n長\n求\n老\n頭\n基\n資\n邊\n流\n路\n級\n少\n圖\n山\n統\n接\n知\n較\n將\n組\n見\n計\n別\n她\n手\n角\n期\n根\n論\n運\n農\n指\n幾\n九\n區\n強\n放\n決\n西\n被\n幹\n做\n必\n戰\n先\n回\n則\n任\n取\n據\n處\n隊\n南\n給\n色\n光\n門\n即\n保\n治\n北\n造\n百\n規\n熱\n領\n七\n海\n口\n東\n導\n器\n壓\n志\n世\n金\n增\n爭\n濟\n階\n油\n思\n術\n極\n交\n受\n聯\n什\n認\n六\n共\n權\n收\n證\n改\n清\n美\n再\n採\n轉\n更\n單\n風\n切\n打\n白\n教\n速\n花\n帶\n安\n場\n身\n車\n例\n真\n務\n具\n萬\n每\n目\n至\n達\n走\n積\n示\n議\n聲\n報\n鬥\n完\n類\n八\n離\n華\n名\n確\n才\n科\n張\n信\n馬\n節\n話\n米\n整\n空\n元\n況\n今\n集\n溫\n傳\n土\n許\n步\n群\n廣\n石\n記\n需\n段\n研\n界\n拉\n林\n律\n叫\n且\n究\n觀\n越\n織\n裝\n影\n算\n低\n持\n音\n眾\n書\n布\n复\n容\n兒\n須\n際\n商\n非\n驗\n連\n斷\n深\n難\n近\n礦\n千\n週\n委\n素\n技\n備\n半\n辦\n青\n省\n列\n習\n響\n約\n支\n般\n史\n感\n勞\n便\n團\n往\n酸\n歷\n市\n克\n何\n除\n消\n構\n府\n稱\n太\n準\n精\n值\n號\n率\n族\n維\n劃\n選\n標\n寫\n存\n候\n毛\n親\n快\n效\n斯\n院\n查\n江\n型\n眼\n王\n按\n格\n養\n易\n置\n派\n層\n片\n始\n卻\n專\n狀\n育\n廠\n京\n識\n適\n屬\n圓\n包\n火\n住\n調\n滿\n縣\n局\n照\n參\n紅\n細\n引\n聽\n該\n鐵\n價\n嚴\n首\n底\n液\n官\n德\n隨\n病\n蘇\n失\n爾\n死\n講\n配\n女\n黃\n推\n顯\n談\n罪\n神\n藝\n呢\n席\n含\n企\n望\n密\n批\n營\n項\n防\n舉\n球\n英\n氧\n勢\n告\n李\n台\n落\n木\n幫\n輪\n破\n亞\n師\n圍\n注\n遠\n字\n材\n排\n供\n河\n態\n封\n另\n施\n減\n樹\n溶\n怎\n止\n案\n言\n士\n均\n武\n固\n葉\n魚\n波\n視\n僅\n費\n緊\n愛\n左\n章\n早\n朝\n害\n續\n輕\n服\n試\n食\n充\n兵\n源\n判\n護\n司\n足\n某\n練\n差\n致\n板\n田\n降\n黑\n犯\n負\n擊\n范\n繼\n興\n似\n餘\n堅\n曲\n輸\n修\n故\n城\n夫\n夠\n送\n筆\n船\n佔\n右\n財\n吃\n富\n春\n職\n覺\n漢\n畫\n功\n巴\n跟\n雖\n雜\n飛\n檢\n吸\n助\n昇\n陽\n互\n初\n創\n抗\n考\n投\n壞\n策\n古\n徑\n換\n未\n跑\n留\n鋼\n曾\n端\n責\n站\n簡\n述\n錢\n副\n盡\n帝\n射\n草\n衝\n承\n獨\n令\n限\n阿\n宣\n環\n雙\n請\n超\n微\n讓\n控\n州\n良\n軸\n找\n否\n紀\n益\n依\n優\n頂\n礎\n載\n倒\n房\n突\n坐\n粉\n敵\n略\n客\n袁\n冷\n勝\n絕\n析\n塊\n劑\n測\n絲\n協\n訴\n念\n陳\n仍\n羅\n鹽\n友\n洋\n錯\n苦\n夜\n刑\n移\n頻\n逐\n靠\n混\n母\n短\n皮\n終\n聚\n汽\n村\n雲\n哪\n既\n距\n衛\n停\n烈\n央\n察\n燒\n迅\n境\n若\n印\n洲\n刻\n括\n激\n孔\n搞\n甚\n室\n待\n核\n校\n散\n侵\n吧\n甲\n遊\n久\n菜\n味\n舊\n模\n湖\n貨\n損\n預\n阻\n毫\n普\n穩\n乙\n媽\n植\n息\n擴\n銀\n語\n揮\n酒\n守\n拿\n序\n紙\n醫\n缺\n雨\n嗎\n針\n劉\n啊\n急\n唱\n誤\n訓\n願\n審\n附\n獲\n茶\n鮮\n糧\n斤\n孩\n脫\n硫\n肥\n善\n龍\n演\n父\n漸\n血\n歡\n械\n掌\n歌\n沙\n剛\n攻\n謂\n盾\n討\n晚\n粒\n亂\n燃\n矛\n乎\n殺\n藥\n寧\n魯\n貴\n鐘\n煤\n讀\n班\n伯\n香\n介\n迫\n句\n豐\n培\n握\n蘭\n擔\n弦\n蛋\n沉\n假\n穿\n執\n答\n樂\n誰\n順\n煙\n縮\n徵\n臉\n喜\n松\n腳\n困\n異\n免\n背\n星\n福\n買\n染\n井\n概\n慢\n怕\n磁\n倍\n祖\n皇\n促\n靜\n補\n評\n翻\n肉\n踐\n尼\n衣\n寬\n揚\n棉\n希\n傷\n操\n垂\n秋\n宜\n氫\n套\n督\n振\n架\n亮\n末\n憲\n慶\n編\n牛\n觸\n映\n雷\n銷\n詩\n座\n居\n抓\n裂\n胞\n呼\n娘\n景\n威\n綠\n晶\n厚\n盟\n衡\n雞\n孫\n延\n危\n膠\n屋\n鄉\n臨\n陸\n顧\n掉\n呀\n燈\n歲\n措\n束\n耐\n劇\n玉\n趙\n跳\n哥\n季\n課\n凱\n胡\n額\n款\n紹\n卷\n齊\n偉\n蒸\n殖\n永\n宗\n苗\n川\n爐\n岩\n弱\n零\n楊\n奏\n沿\n露\n桿\n探\n滑\n鎮\n飯\n濃\n航\n懷\n趕\n庫\n奪\n伊\n靈\n稅\n途\n滅\n賽\n歸\n召\n鼓\n播\n盤\n裁\n險\n康\n唯\n錄\n菌\n純\n借\n糖\n蓋\n橫\n符\n私\n努\n堂\n域\n槍\n潤\n幅\n哈\n竟\n熟\n蟲\n澤\n腦\n壤\n碳\n歐\n遍\n側\n寨\n敢\n徹\n慮\n斜\n薄\n庭\n納\n彈\n飼\n伸\n折\n麥\n濕\n暗\n荷\n瓦\n塞\n床\n築\n惡\n戶\n訪\n塔\n奇\n透\n梁\n刀\n旋\n跡\n卡\n氯\n遇\n份\n毒\n泥\n退\n洗\n擺\n灰\n彩\n賣\n耗\n夏\n擇\n忙\n銅\n獻\n硬\n予\n繁\n圈\n雪\n函\n亦\n抽\n篇\n陣\n陰\n丁\n尺\n追\n堆\n雄\n迎\n泛\n爸\n樓\n避\n謀\n噸\n野\n豬\n旗\n累\n偏\n典\n館\n索\n秦\n脂\n潮\n爺\n豆\n忽\n托\n驚\n塑\n遺\n愈\n朱\n替\n纖\n粗\n傾\n尚\n痛\n楚\n謝\n奮\n購\n磨\n君\n池\n旁\n碎\n骨\n監\n捕\n弟\n暴\n割\n貫\n殊\n釋\n詞\n亡\n壁\n頓\n寶\n午\n塵\n聞\n揭\n炮\n殘\n冬\n橋\n婦\n警\n綜\n招\n吳\n付\n浮\n遭\n徐\n您\n搖\n谷\n贊\n箱\n隔\n訂\n男\n吹\n園\n紛\n唐\n敗\n宋\n玻\n巨\n耕\n坦\n榮\n閉\n灣\n鍵\n凡\n駐\n鍋\n救\n恩\n剝\n凝\n鹼\n齒\n截\n煉\n麻\n紡\n禁\n廢\n盛\n版\n緩\n淨\n睛\n昌\n婚\n涉\n筒\n嘴\n插\n岸\n朗\n莊\n街\n藏\n姑\n貿\n腐\n奴\n啦\n慣\n乘\n夥\n恢\n勻\n紗\n扎\n辯\n耳\n彪\n臣\n億\n璃\n抵\n脈\n秀\n薩\n俄\n網\n舞\n店\n噴\n縱\n寸\n汗\n掛\n洪\n賀\n閃\n柬\n爆\n烯\n津\n稻\n牆\n軟\n勇\n像\n滾\n厘\n蒙\n芳\n肯\n坡\n柱\n盪\n腿\n儀\n旅\n尾\n軋\n冰\n貢\n登\n黎\n削\n鑽\n勒\n逃\n障\n氨\n郭\n峰\n幣\n港\n伏\n軌\n畝\n畢\n擦\n莫\n刺\n浪\n秘\n援\n株\n健\n售\n股\n島\n甘\n泡\n睡\n童\n鑄\n湯\n閥\n休\n匯\n舍\n牧\n繞\n炸\n哲\n磷\n績\n朋\n淡\n尖\n啟\n陷\n柴\n呈\n徒\n顏\n淚\n稍\n忘\n泵\n藍\n拖\n洞\n授\n鏡\n辛\n壯\n鋒\n貧\n虛\n彎\n摩\n泰\n幼\n廷\n尊\n窗\n綱\n弄\n隸\n疑\n氏\n宮\n姐\n震\n瑞\n怪\n尤\n琴\n循\n描\n膜\n違\n夾\n腰\n緣\n珠\n窮\n森\n枝\n竹\n溝\n催\n繩\n憶\n邦\n剩\n幸\n漿\n欄\n擁\n牙\n貯\n禮\n濾\n鈉\n紋\n罷\n拍\n咱\n喊\n袖\n埃\n勤\n罰\n焦\n潛\n伍\n墨\n欲\n縫\n姓\n刊\n飽\n仿\n獎\n鋁\n鬼\n麗\n跨\n默\n挖\n鏈\n掃\n喝\n袋\n炭\n污\n幕\n諸\n弧\n勵\n梅\n奶\n潔\n災\n舟\n鑑\n苯\n訟\n抱\n毀\n懂\n寒\n智\n埔\n寄\n屆\n躍\n渡\n挑\n丹\n艱\n貝\n碰\n拔\n爹\n戴\n碼\n夢\n芽\n熔\n赤\n漁\n哭\n敬\n顆\n奔\n鉛\n仲\n虎\n稀\n妹\n乏\n珍\n申\n桌\n遵\n允\n隆\n螺\n倉\n魏\n銳\n曉\n氮\n兼\n隱\n礙\n赫\n撥\n忠\n肅\n缸\n牽\n搶\n博\n巧\n殼\n兄\n杜\n訊\n誠\n碧\n祥\n柯\n頁\n巡\n矩\n悲\n灌\n齡\n倫\n票\n尋\n桂\n鋪\n聖\n恐\n恰\n鄭\n趣\n抬\n荒\n騰\n貼\n柔\n滴\n猛\n闊\n輛\n妻\n填\n撤\n儲\n簽\n鬧\n擾\n紫\n砂\n遞\n戲\n吊\n陶\n伐\n餵\n療\n瓶\n婆\n撫\n臂\n摸\n忍\n蝦\n蠟\n鄰\n胸\n鞏\n擠\n偶\n棄\n槽\n勁\n乳\n鄧\n吉\n仁\n爛\n磚\n租\n烏\n艦\n伴\n瓜\n淺\n丙\n暫\n燥\n橡\n柳\n迷\n暖\n牌\n秧\n膽\n詳\n簧\n踏\n瓷\n譜\n呆\n賓\n糊\n洛\n輝\n憤\n競\n隙\n怒\n粘\n乃\n緒\n肩\n籍\n敏\n塗\n熙\n皆\n偵\n懸\n掘\n享\n糾\n醒\n狂\n鎖\n淀\n恨\n牲\n霸\n爬\n賞\n逆\n玩\n陵\n祝\n秒\n浙\n貌\n役\n彼\n悉\n鴨\n趨\n鳳\n晨\n畜\n輩\n秩\n卵\n署\n梯\n炎\n灘\n棋\n驅\n篩\n峽\n冒\n啥\n壽\n譯\n浸\n泉\n帽\n遲\n矽\n疆\n貸\n漏\n稿\n冠\n嫩\n脅\n芯\n牢\n叛\n蝕\n奧\n鳴\n嶺\n羊\n憑\n串\n塘\n繪\n酵\n融\n盆\n錫\n廟\n籌\n凍\n輔\n攝\n襲\n筋\n拒\n僚\n旱\n鉀\n鳥\n漆\n沈\n眉\n疏\n添\n棒\n穗\n硝\n韓\n逼\n扭\n僑\n涼\n挺\n碗\n栽\n炒\n杯\n患\n餾\n勸\n豪\n遼\n勃\n鴻\n旦\n吏\n拜\n狗\n埋\n輥\n掩\n飲\n搬\n罵\n辭\n勾\n扣\n估\n蔣\n絨\n霧\n丈\n朵\n姆\n擬\n宇\n輯\n陝\n雕\n償\n蓄\n崇\n剪\n倡\n廳\n咬\n駛\n薯\n刷\n斥\n番\n賦\n奉\n佛\n澆\n漫\n曼\n扇\n鈣\n桃\n扶\n仔\n返\n俗\n虧\n腔\n鞋\n棱\n覆\n框\n悄\n叔\n撞\n騙\n勘\n旺\n沸\n孤\n吐\n孟\n渠\n屈\n疾\n妙\n惜\n仰\n狠\n脹\n諧\n拋\n黴\n桑\n崗\n嘛\n衰\n盜\n滲\n臟\n賴\n湧\n甜\n曹\n閱\n肌\n哩\n厲\n烴\n緯\n毅\n昨\n偽\n症\n煮\n嘆\n釘\n搭\n莖\n籠\n酷\n偷\n弓\n錐\n恆\n傑\n坑\n鼻\n翼\n綸\n敘\n獄\n逮\n罐\n絡\n棚\n抑\n膨\n蔬\n寺\n驟\n穆\n冶\n枯\n冊\n屍\n凸\n紳\n坯\n犧\n焰\n轟\n欣\n晉\n瘦\n禦\n錠\n錦\n喪\n旬\n鍛\n壟\n搜\n撲\n邀\n亭\n酯\n邁\n舒\n脆\n酶\n閒\n憂\n酚\n頑\n羽\n漲\n卸\n仗\n陪\n闢\n懲\n杭\n姚\n肚\n捉\n飄\n漂\n昆\n欺\n吾\n郎\n烷\n汁\n呵\n飾\n蕭\n雅\n郵\n遷\n燕\n撒\n姻\n赴\n宴\n煩\n債\n帳\n斑\n鈴\n旨\n醇\n董\n餅\n雛\n姿\n拌\n傅\n腹\n妥\n揉\n賢\n拆\n歪\n葡\n胺\n丟\n浩\n徽\n昂\n墊\n擋\n覽\n貪\n慰\n繳\n汪\n慌\n馮\n諾\n姜\n誼\n兇\n劣\n誣\n耀\n昏\n躺\n盈\n騎\n喬\n溪\n叢\n盧\n抹\n悶\n諮\n刮\n駕\n纜\n悟\n摘\n鉺\n擲\n頗\n幻\n柄\n惠\n慘\n佳\n仇\n臘\n窩\n滌\n劍\n瞧\n堡\n潑\n蔥\n罩\n霍\n撈\n胎\n蒼\n濱\n倆\n捅\n湘\n砍\n霞\n邵\n萄\n瘋\n淮\n遂\n熊\n糞\n烘\n宿\n檔\n戈\n駁\n嫂\n裕\n徙\n箭\n捐\n腸\n撐\n曬\n辨\n殿\n蓮\n攤\n攪\n醬\n屏\n疫\n哀\n蔡\n堵\n沫\n皺\n暢\n疊\n閣\n萊\n敲\n轄\n鉤\n痕\n壩\n巷\n餓\n禍\n丘\n玄\n溜\n曰\n邏\n彭\n嘗\n卿\n妨\n艇\n吞\n韋\n怨\n矮\n歇\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/czech.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/czech.txt\n\t// $ crc32 czech.txt\n\t// d1b5fda0\n\tchecksum := crc32.ChecksumIEEE([]byte(czech))\n\tif fmt.Sprintf(\"%x\", checksum) != \"d1b5fda0\" {\n\t\tpanic(\"czech checksum invalid\")\n\t}\n}\n\n// Czech is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/czech.txt\nvar (\n\tCzech = strings.Split(strings.TrimSpace(czech), \"\\n\")\n\tczech = `abdikace\nabeceda\nadresa\nagrese\nakce\naktovka\nalej\nalkohol\namputace\nananas\nandulka\nanekdota\nanketa\nantika\nanulovat\narcha\narogance\nasfalt\nasistent\naspirace\nastma\nastronom\natlas\natletika\natol\nautobus\nazyl\nbabka\nbachor\nbacil\nbaculka\nbadatel\nbageta\nbagr\nbahno\nbakterie\nbalada\nbaletka\nbalkon\nbalonek\nbalvan\nbalza\nbambus\nbankomat\nbarbar\nbaret\nbarman\nbaroko\nbarva\nbaterka\nbatoh\nbavlna\nbazalka\nbazilika\nbazuka\nbedna\nberan\nbeseda\nbestie\nbeton\nbezinka\nbezmoc\nbeztak\nbicykl\nbidlo\nbiftek\nbikiny\nbilance\nbiograf\nbiolog\nbitva\nbizon\nblahobyt\nblatouch\nblecha\nbledule\nblesk\nblikat\nblizna\nblokovat\nbloudit\nblud\nbobek\nbobr\nbodlina\nbodnout\nbohatost\nbojkot\nbojovat\nbokorys\nbolest\nborec\nborovice\nbota\nboubel\nbouchat\nbouda\nboule\nbourat\nboxer\nbradavka\nbrambora\nbranka\nbratr\nbrepta\nbriketa\nbrko\nbrloh\nbronz\nbroskev\nbrunetka\nbrusinka\nbrzda\nbrzy\nbublina\nbubnovat\nbuchta\nbuditel\nbudka\nbudova\nbufet\nbujarost\nbukvice\nbuldok\nbulva\nbunda\nbunkr\nburza\nbutik\nbuvol\nbuzola\nbydlet\nbylina\nbytovka\nbzukot\ncapart\ncarevna\ncedr\ncedule\ncejch\ncejn\ncela\nceler\ncelkem\ncelnice\ncenina\ncennost\ncenovka\ncentrum\ncenzor\ncestopis\ncetka\nchalupa\nchapadlo\ncharita\nchata\nchechtat\nchemie\nchichot\nchirurg\nchlad\nchleba\nchlubit\nchmel\nchmura\nchobot\nchochol\nchodba\ncholera\nchomout\nchopit\nchoroba\nchov\nchrapot\nchrlit\nchrt\nchrup\nchtivost\nchudina\nchutnat\nchvat\nchvilka\nchvost\nchyba\nchystat\nchytit\ncibule\ncigareta\ncihelna\ncihla\ncinkot\ncirkus\ncisterna\ncitace\ncitrus\ncizinec\ncizost\nclona\ncokoliv\ncouvat\nctitel\nctnost\ncudnost\ncuketa\ncukr\ncupot\ncvaknout\ncval\ncvik\ncvrkot\ncyklista\ndaleko\ndareba\ndatel\ndatum\ndcera\ndebata\ndechovka\ndecibel\ndeficit\ndeflace\ndekl\ndekret\ndemokrat\ndeprese\nderby\ndeska\ndetektiv\ndikobraz\ndiktovat\ndioda\ndiplom\ndisk\ndisplej\ndivadlo\ndivoch\ndlaha\ndlouho\ndluhopis\ndnes\ndobro\ndobytek\ndocent\ndochutit\ndodnes\ndohled\ndohoda\ndohra\ndojem\ndojnice\ndoklad\ndokola\ndoktor\ndokument\ndolar\ndoleva\ndolina\ndoma\ndominant\ndomluvit\ndomov\ndonutit\ndopad\ndopis\ndoplnit\ndoposud\ndoprovod\ndopustit\ndorazit\ndorost\ndort\ndosah\ndoslov\ndostatek\ndosud\ndosyta\ndotaz\ndotek\ndotknout\ndoufat\ndoutnat\ndovozce\ndozadu\ndoznat\ndozorce\ndrahota\ndrak\ndramatik\ndravec\ndraze\ndrdol\ndrobnost\ndrogerie\ndrozd\ndrsnost\ndrtit\ndrzost\nduben\nduchovno\ndudek\nduha\nduhovka\ndusit\ndusno\ndutost\ndvojice\ndvorec\ndynamit\nekolog\nekonomie\nelektron\nelipsa\nemail\nemise\nemoce\nempatie\nepizoda\nepocha\nepopej\nepos\nesej\nesence\neskorta\neskymo\netiketa\neuforie\nevoluce\nexekuce\nexkurze\nexpedice\nexploze\nexport\nextrakt\nfacka\nfajfka\nfakulta\nfanatik\nfantazie\nfarmacie\nfavorit\nfazole\nfederace\nfejeton\nfenka\nfialka\nfigurant\nfilozof\nfiltr\nfinance\nfinta\nfixace\nfjord\nflanel\nflirt\nflotila\nfond\nfosfor\nfotbal\nfotka\nfoton\nfrakce\nfreska\nfronta\nfukar\nfunkce\nfyzika\ngaleje\ngarant\ngenetika\ngeolog\ngilotina\nglazura\nglejt\ngolem\ngolfista\ngotika\ngraf\ngramofon\ngranule\ngrep\ngril\ngrog\ngroteska\nguma\nhadice\nhadr\nhala\nhalenka\nhanba\nhanopis\nharfa\nharpuna\nhavran\nhebkost\nhejkal\nhejno\nhejtman\nhektar\nhelma\nhematom\nherec\nherna\nheslo\nhezky\nhistorik\nhladovka\nhlasivky\nhlava\nhledat\nhlen\nhlodavec\nhloh\nhloupost\nhltat\nhlubina\nhluchota\nhmat\nhmota\nhmyz\nhnis\nhnojivo\nhnout\nhoblina\nhoboj\nhoch\nhodiny\nhodlat\nhodnota\nhodovat\nhojnost\nhokej\nholinka\nholka\nholub\nhomole\nhonitba\nhonorace\nhoral\nhorda\nhorizont\nhorko\nhorlivec\nhormon\nhornina\nhoroskop\nhorstvo\nhospoda\nhostina\nhotovost\nhouba\nhouf\nhoupat\nhouska\nhovor\nhradba\nhranice\nhravost\nhrazda\nhrbolek\nhrdina\nhrdlo\nhrdost\nhrnek\nhrobka\nhromada\nhrot\nhrouda\nhrozen\nhrstka\nhrubost\nhryzat\nhubenost\nhubnout\nhudba\nhukot\nhumr\nhusita\nhustota\nhvozd\nhybnost\nhydrant\nhygiena\nhymna\nhysterik\nidylka\nihned\nikona\niluze\nimunita\ninfekce\ninflace\ninkaso\ninovace\ninspekce\ninternet\ninvalida\ninvestor\ninzerce\nironie\njablko\njachta\njahoda\njakmile\njakost\njalovec\njantar\njarmark\njaro\njasan\njasno\njatka\njavor\njazyk\njedinec\njedle\njednatel\njehlan\njekot\njelen\njelito\njemnost\njenom\njepice\njeseter\njevit\njezdec\njezero\njinak\njindy\njinoch\njiskra\njistota\njitrnice\njizva\njmenovat\njogurt\njurta\nkabaret\nkabel\nkabinet\nkachna\nkadet\nkadidlo\nkahan\nkajak\nkajuta\nkakao\nkaktus\nkalamita\nkalhoty\nkalibr\nkalnost\nkamera\nkamkoliv\nkamna\nkanibal\nkanoe\nkantor\nkapalina\nkapela\nkapitola\nkapka\nkaple\nkapota\nkapr\nkapusta\nkapybara\nkaramel\nkarotka\nkarton\nkasa\nkatalog\nkatedra\nkauce\nkauza\nkavalec\nkazajka\nkazeta\nkazivost\nkdekoliv\nkdesi\nkedluben\nkemp\nkeramika\nkino\nklacek\nkladivo\nklam\nklapot\nklasika\nklaun\nklec\nklenba\nklepat\nklesnout\nklid\nklima\nklisna\nklobouk\nklokan\nklopa\nkloub\nklubovna\nklusat\nkluzkost\nkmen\nkmitat\nkmotr\nkniha\nknot\nkoalice\nkoberec\nkobka\nkobliha\nkobyla\nkocour\nkohout\nkojenec\nkokos\nkoktejl\nkolaps\nkoleda\nkolize\nkolo\nkomando\nkometa\nkomik\nkomnata\nkomora\nkompas\nkomunita\nkonat\nkoncept\nkondice\nkonec\nkonfese\nkongres\nkonina\nkonkurs\nkontakt\nkonzerva\nkopanec\nkopie\nkopnout\nkoprovka\nkorbel\nkorektor\nkormidlo\nkoroptev\nkorpus\nkoruna\nkoryto\nkorzet\nkosatec\nkostka\nkotel\nkotleta\nkotoul\nkoukat\nkoupelna\nkousek\nkouzlo\nkovboj\nkoza\nkozoroh\nkrabice\nkrach\nkrajina\nkralovat\nkrasopis\nkravata\nkredit\nkrejcar\nkresba\nkreveta\nkriket\nkritik\nkrize\nkrkavec\nkrmelec\nkrmivo\nkrocan\nkrok\nkronika\nkropit\nkroupa\nkrovka\nkrtek\nkruhadlo\nkrupice\nkrutost\nkrvinka\nkrychle\nkrypta\nkrystal\nkryt\nkudlanka\nkufr\nkujnost\nkukla\nkulajda\nkulich\nkulka\nkulomet\nkultura\nkuna\nkupodivu\nkurt\nkurzor\nkutil\nkvalita\nkvasinka\nkvestor\nkynolog\nkyselina\nkytara\nkytice\nkytka\nkytovec\nkyvadlo\nlabrador\nlachtan\nladnost\nlaik\nlakomec\nlamela\nlampa\nlanovka\nlasice\nlaso\nlastura\nlatinka\nlavina\nlebka\nleckdy\nleden\nlednice\nledovka\nledvina\nlegenda\nlegie\nlegrace\nlehce\nlehkost\nlehnout\nlektvar\nlenochod\nlentilka\nlepenka\nlepidlo\nletadlo\nletec\nletmo\nletokruh\nlevhart\nlevitace\nlevobok\nlibra\nlichotka\nlidojed\nlidskost\nlihovina\nlijavec\nlilek\nlimetka\nlinie\nlinka\nlinoleum\nlistopad\nlitina\nlitovat\nlobista\nlodivod\nlogika\nlogoped\nlokalita\nloket\nlomcovat\nlopata\nlopuch\nlord\nlosos\nlotr\nloudal\nlouh\nlouka\nlouskat\nlovec\nlstivost\nlucerna\nlucifer\nlump\nlusk\nlustrace\nlvice\nlyra\nlyrika\nlysina\nmadam\nmadlo\nmagistr\nmahagon\nmajetek\nmajitel\nmajorita\nmakak\nmakovice\nmakrela\nmalba\nmalina\nmalovat\nmalvice\nmaminka\nmandle\nmanko\nmarnost\nmasakr\nmaskot\nmasopust\nmatice\nmatrika\nmaturita\nmazanec\nmazivo\nmazlit\nmazurka\nmdloba\nmechanik\nmeditace\nmedovina\nmelasa\nmeloun\nmentolka\nmetla\nmetoda\nmetr\nmezera\nmigrace\nmihnout\nmihule\nmikina\nmikrofon\nmilenec\nmilimetr\nmilost\nmimika\nmincovna\nminibar\nminomet\nminulost\nmiska\nmistr\nmixovat\nmladost\nmlha\nmlhovina\nmlok\nmlsat\nmluvit\nmnich\nmnohem\nmobil\nmocnost\nmodelka\nmodlitba\nmohyla\nmokro\nmolekula\nmomentka\nmonarcha\nmonokl\nmonstrum\nmontovat\nmonzun\nmosaz\nmoskyt\nmost\nmotivace\nmotorka\nmotyka\nmoucha\nmoudrost\nmozaika\nmozek\nmozol\nmramor\nmravenec\nmrkev\nmrtvola\nmrzet\nmrzutost\nmstitel\nmudrc\nmuflon\nmulat\nmumie\nmunice\nmuset\nmutace\nmuzeum\nmuzikant\nmyslivec\nmzda\nnabourat\nnachytat\nnadace\nnadbytek\nnadhoz\nnadobro\nnadpis\nnahlas\nnahnat\nnahodile\nnahradit\nnaivita\nnajednou\nnajisto\nnajmout\nnaklonit\nnakonec\nnakrmit\nnalevo\nnamazat\nnamluvit\nnanometr\nnaoko\nnaopak\nnaostro\nnapadat\nnapevno\nnaplnit\nnapnout\nnaposled\nnaprosto\nnarodit\nnaruby\nnarychlo\nnasadit\nnasekat\nnaslepo\nnastat\nnatolik\nnavenek\nnavrch\nnavzdory\nnazvat\nnebe\nnechat\nnecky\nnedaleko\nnedbat\nneduh\nnegace\nnehet\nnehoda\nnejen\nnejprve\nneklid\nnelibost\nnemilost\nnemoc\nneochota\nneonka\nnepokoj\nnerost\nnerv\nnesmysl\nnesoulad\nnetvor\nneuron\nnevina\nnezvykle\nnicota\nnijak\nnikam\nnikdy\nnikl\nnikterak\nnitro\nnocleh\nnohavice\nnominace\nnora\nnorek\nnositel\nnosnost\nnouze\nnoviny\nnovota\nnozdra\nnuda\nnudle\nnuget\nnutit\nnutnost\nnutrie\nnymfa\nobal\nobarvit\nobava\nobdiv\nobec\nobehnat\nobejmout\nobezita\nobhajoba\nobilnice\nobjasnit\nobjekt\nobklopit\noblast\noblek\nobliba\nobloha\nobluda\nobnos\nobohatit\nobojek\nobout\nobrazec\nobrna\nobruba\nobrys\nobsah\nobsluha\nobstarat\nobuv\nobvaz\nobvinit\nobvod\nobvykle\nobyvatel\nobzor\nocas\nocel\nocenit\nochladit\nochota\nochrana\nocitnout\nodboj\nodbyt\nodchod\nodcizit\nodebrat\nodeslat\nodevzdat\nodezva\nodhadce\nodhodit\nodjet\nodjinud\nodkaz\nodkoupit\nodliv\nodluka\nodmlka\nodolnost\nodpad\nodpis\nodplout\nodpor\nodpustit\nodpykat\nodrazka\nodsoudit\nodstup\nodsun\nodtok\nodtud\nodvaha\nodveta\nodvolat\nodvracet\nodznak\nofina\nofsajd\nohlas\nohnisko\nohrada\nohrozit\nohryzek\nokap\nokenice\noklika\nokno\nokouzlit\nokovy\nokrasa\nokres\nokrsek\nokruh\nokupant\nokurka\nokusit\nolejnina\nolizovat\nomak\nomeleta\nomezit\nomladina\nomlouvat\nomluva\nomyl\nonehdy\nopakovat\nopasek\noperace\nopice\nopilost\nopisovat\nopora\nopozice\nopravdu\noproti\norbital\norchestr\norgie\norlice\norloj\nortel\nosada\noschnout\nosika\nosivo\noslava\noslepit\noslnit\noslovit\nosnova\nosoba\nosolit\nospalec\nosten\nostraha\nostuda\nostych\nosvojit\noteplit\notisk\notop\notrhat\notrlost\notrok\notruby\notvor\novanout\novar\noves\novlivnit\novoce\noxid\nozdoba\npachatel\npacient\npadouch\npahorek\npakt\npalanda\npalec\npalivo\npaluba\npamflet\npamlsek\npanenka\npanika\npanna\npanovat\npanstvo\npantofle\npaprika\nparketa\nparodie\nparta\nparuka\nparyba\npaseka\npasivita\npastelka\npatent\npatrona\npavouk\npazneht\npazourek\npecka\npedagog\npejsek\npeklo\npeloton\npenalta\npendrek\npenze\nperiskop\npero\npestrost\npetarda\npetice\npetrolej\npevnina\npexeso\npianista\npiha\npijavice\npikle\npiknik\npilina\npilnost\npilulka\npinzeta\npipeta\npisatel\npistole\npitevna\npivnice\npivovar\nplacenta\nplakat\nplamen\nplaneta\nplastika\nplatit\nplavidlo\nplaz\nplech\nplemeno\nplenta\nples\npletivo\nplevel\nplivat\nplnit\nplno\nplocha\nplodina\nplomba\nplout\npluk\nplyn\npobavit\npobyt\npochod\npocit\npoctivec\npodat\npodcenit\npodepsat\npodhled\npodivit\npodklad\npodmanit\npodnik\npodoba\npodpora\npodraz\npodstata\npodvod\npodzim\npoezie\npohanka\npohnutka\npohovor\npohroma\npohyb\npointa\npojistka\npojmout\npokazit\npokles\npokoj\npokrok\npokuta\npokyn\npoledne\npolibek\npolknout\npoloha\npolynom\npomalu\npominout\npomlka\npomoc\npomsta\npomyslet\nponechat\nponorka\nponurost\npopadat\npopel\npopisek\npoplach\npoprosit\npopsat\npopud\nporadce\nporce\nporod\nporucha\nporyv\nposadit\nposed\nposila\nposkok\nposlanec\nposoudit\npospolu\npostava\nposudek\nposyp\npotah\npotkan\npotlesk\npotomek\npotrava\npotupa\npotvora\npoukaz\npouto\npouzdro\npovaha\npovidla\npovlak\npovoz\npovrch\npovstat\npovyk\npovzdech\npozdrav\npozemek\npoznatek\npozor\npozvat\npracovat\nprahory\npraktika\nprales\npraotec\npraporek\nprase\npravda\nprincip\nprkno\nprobudit\nprocento\nprodej\nprofese\nprohra\nprojekt\nprolomit\npromile\npronikat\npropad\nprorok\nprosba\nproton\nproutek\nprovaz\nprskavka\nprsten\nprudkost\nprut\nprvek\nprvohory\npsanec\npsovod\npstruh\nptactvo\npuberta\npuch\npudl\npukavec\npuklina\npukrle\npult\npumpa\npunc\npupen\npusa\npusinka\npustina\nputovat\nputyka\npyramida\npysk\npytel\nracek\nrachot\nradiace\nradnice\nradon\nraft\nragby\nraketa\nrakovina\nrameno\nrampouch\nrande\nrarach\nrarita\nrasovna\nrastr\nratolest\nrazance\nrazidlo\nreagovat\nreakce\nrecept\nredaktor\nreferent\nreflex\nrejnok\nreklama\nrekord\nrekrut\nrektor\nreputace\nrevize\nrevma\nrevolver\nrezerva\nriskovat\nriziko\nrobotika\nrodokmen\nrohovka\nrokle\nrokoko\nromaneto\nropovod\nropucha\nrorejs\nrosol\nrostlina\nrotmistr\nrotoped\nrotunda\nroubenka\nroucho\nroup\nroura\nrovina\nrovnice\nrozbor\nrozchod\nrozdat\nrozeznat\nrozhodce\nrozinka\nrozjezd\nrozkaz\nrozloha\nrozmar\nrozpad\nrozruch\nrozsah\nroztok\nrozum\nrozvod\nrubrika\nruchadlo\nrukavice\nrukopis\nryba\nrybolov\nrychlost\nrydlo\nrypadlo\nrytina\nryzost\nsadista\nsahat\nsako\nsamec\nsamizdat\nsamota\nsanitka\nsardinka\nsasanka\nsatelit\nsazba\nsazenice\nsbor\nschovat\nsebranka\nsecese\nsedadlo\nsediment\nsedlo\nsehnat\nsejmout\nsekera\nsekta\nsekunda\nsekvoje\nsemeno\nseno\nservis\nsesadit\nseshora\nseskok\nseslat\nsestra\nsesuv\nsesypat\nsetba\nsetina\nsetkat\nsetnout\nsetrvat\nsever\nseznam\nshoda\nshrnout\nsifon\nsilnice\nsirka\nsirotek\nsirup\nsituace\nskafandr\nskalisko\nskanzen\nskaut\nskeptik\nskica\nskladba\nsklenice\nsklo\nskluz\nskoba\nskokan\nskoro\nskripta\nskrz\nskupina\nskvost\nskvrna\nslabika\nsladidlo\nslanina\nslast\nslavnost\nsledovat\nslepec\nsleva\nslezina\nslib\nslina\nsliznice\nslon\nsloupek\nslovo\nsluch\nsluha\nslunce\nslupka\nslza\nsmaragd\nsmetana\nsmilstvo\nsmlouva\nsmog\nsmrad\nsmrk\nsmrtka\nsmutek\nsmysl\nsnad\nsnaha\nsnob\nsobota\nsocha\nsodovka\nsokol\nsopka\nsotva\nsouboj\nsoucit\nsoudce\nsouhlas\nsoulad\nsoumrak\nsouprava\nsoused\nsoutok\nsouviset\nspalovna\nspasitel\nspis\nsplav\nspodek\nspojenec\nspolu\nsponzor\nspornost\nspousta\nsprcha\nspustit\nsranda\nsraz\nsrdce\nsrna\nsrnec\nsrovnat\nsrpen\nsrst\nsrub\nstanice\nstarosta\nstatika\nstavba\nstehno\nstezka\nstodola\nstolek\nstopa\nstorno\nstoupat\nstrach\nstres\nstrhnout\nstrom\nstruna\nstudna\nstupnice\nstvol\nstyk\nsubjekt\nsubtropy\nsuchar\nsudost\nsukno\nsundat\nsunout\nsurikata\nsurovina\nsvah\nsvalstvo\nsvetr\nsvatba\nsvazek\nsvisle\nsvitek\nsvoboda\nsvodidlo\nsvorka\nsvrab\nsykavka\nsykot\nsynek\nsynovec\nsypat\nsypkost\nsyrovost\nsysel\nsytost\ntabletka\ntabule\ntahoun\ntajemno\ntajfun\ntajga\ntajit\ntajnost\ntaktika\ntamhle\ntampon\ntancovat\ntanec\ntanker\ntapeta\ntavenina\ntazatel\ntechnika\ntehdy\ntekutina\ntelefon\ntemnota\ntendence\ntenista\ntenor\nteplota\ntepna\nteprve\nterapie\ntermoska\ntextil\nticho\ntiskopis\ntitulek\ntkadlec\ntkanina\ntlapka\ntleskat\ntlukot\ntlupa\ntmel\ntoaleta\ntopinka\ntopol\ntorzo\ntouha\ntoulec\ntradice\ntraktor\ntramp\ntrasa\ntraverza\ntrefit\ntrest\ntrezor\ntrhavina\ntrhlina\ntrochu\ntrojice\ntroska\ntrouba\ntrpce\ntrpitel\ntrpkost\ntrubec\ntruchlit\ntruhlice\ntrus\ntrvat\ntudy\ntuhnout\ntuhost\ntundra\nturista\nturnaj\ntuzemsko\ntvaroh\ntvorba\ntvrdost\ntvrz\ntygr\ntykev\nubohost\nuboze\nubrat\nubrousek\nubrus\nubytovna\nucho\nuctivost\nudivit\nuhradit\nujednat\nujistit\nujmout\nukazatel\nuklidnit\nuklonit\nukotvit\nukrojit\nulice\nulita\nulovit\numyvadlo\nunavit\nuniforma\nuniknout\nupadnout\nuplatnit\nuplynout\nupoutat\nupravit\nuran\nurazit\nusednout\nusilovat\nusmrtit\nusnadnit\nusnout\nusoudit\nustlat\nustrnout\nutahovat\nutkat\nutlumit\nutonout\nutopenec\nutrousit\nuvalit\nuvolnit\nuvozovka\nuzdravit\nuzel\nuzenina\nuzlina\nuznat\nvagon\nvalcha\nvaloun\nvana\nvandal\nvanilka\nvaran\nvarhany\nvarovat\nvcelku\nvchod\nvdova\nvedro\nvegetace\nvejce\nvelbloud\nveletrh\nvelitel\nvelmoc\nvelryba\nvenkov\nveranda\nverze\nveselka\nveskrze\nvesnice\nvespodu\nvesta\nveterina\nveverka\nvibrace\nvichr\nvideohra\nvidina\nvidle\nvila\nvinice\nviset\nvitalita\nvize\nvizitka\nvjezd\nvklad\nvkus\nvlajka\nvlak\nvlasec\nvlevo\nvlhkost\nvliv\nvlnovka\nvloupat\nvnucovat\nvnuk\nvoda\nvodivost\nvodoznak\nvodstvo\nvojensky\nvojna\nvojsko\nvolant\nvolba\nvolit\nvolno\nvoskovka\nvozidlo\nvozovna\nvpravo\nvrabec\nvracet\nvrah\nvrata\nvrba\nvrcholek\nvrhat\nvrstva\nvrtule\nvsadit\nvstoupit\nvstup\nvtip\nvybavit\nvybrat\nvychovat\nvydat\nvydra\nvyfotit\nvyhledat\nvyhnout\nvyhodit\nvyhradit\nvyhubit\nvyjasnit\nvyjet\nvyjmout\nvyklopit\nvykonat\nvylekat\nvymazat\nvymezit\nvymizet\nvymyslet\nvynechat\nvynikat\nvynutit\nvypadat\nvyplatit\nvypravit\nvypustit\nvyrazit\nvyrovnat\nvyrvat\nvyslovit\nvysoko\nvystavit\nvysunout\nvysypat\nvytasit\nvytesat\nvytratit\nvyvinout\nvyvolat\nvyvrhel\nvyzdobit\nvyznat\nvzadu\nvzbudit\nvzchopit\nvzdor\nvzduch\nvzdychat\nvzestup\nvzhledem\nvzkaz\nvzlykat\nvznik\nvzorek\nvzpoura\nvztah\nvztek\nxylofon\nzabrat\nzabydlet\nzachovat\nzadarmo\nzadusit\nzafoukat\nzahltit\nzahodit\nzahrada\nzahynout\nzajatec\nzajet\nzajistit\nzaklepat\nzakoupit\nzalepit\nzamezit\nzamotat\nzamyslet\nzanechat\nzanikat\nzaplatit\nzapojit\nzapsat\nzarazit\nzastavit\nzasunout\nzatajit\nzatemnit\nzatknout\nzaujmout\nzavalit\nzavelet\nzavinit\nzavolat\nzavrtat\nzazvonit\nzbavit\nzbrusu\nzbudovat\nzbytek\nzdaleka\nzdarma\nzdatnost\nzdivo\nzdobit\nzdroj\nzdvih\nzdymadlo\nzelenina\nzeman\nzemina\nzeptat\nzezadu\nzezdola\nzhatit\nzhltnout\nzhluboka\nzhotovit\nzhruba\nzima\nzimnice\nzjemnit\nzklamat\nzkoumat\nzkratka\nzkumavka\nzlato\nzlehka\nzloba\nzlom\nzlost\nzlozvyk\nzmapovat\nzmar\nzmatek\nzmije\nzmizet\nzmocnit\nzmodrat\nzmrzlina\nzmutovat\nznak\nznalost\nznamenat\nznovu\nzobrazit\nzotavit\nzoubek\nzoufale\nzplodit\nzpomalit\nzprava\nzprostit\nzprudka\nzprvu\nzrada\nzranit\nzrcadlo\nzrnitost\nzrno\nzrovna\nzrychlit\nzrzavost\nzticha\nztratit\nzubovina\nzubr\nzvednout\nzvenku\nzvesela\nzvon\nzvrat\nzvukovod\nzvyk\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/english.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt\n\t// $ crc32 english.txt\n\t// c1dbd296\n\tchecksum := crc32.ChecksumIEEE([]byte(english))\n\tif fmt.Sprintf(\"%x\", checksum) != \"c1dbd296\" {\n\t\tpanic(\"english checksum invalid\")\n\t}\n}\n\n// English is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt\nvar (\n\tEnglish = strings.Split(strings.TrimSpace(english), \"\\n\")\n\tenglish = `abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/french.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/french.txt\n\t// $ crc32 french.txt\n\t// 3e56b216\n\tchecksum := crc32.ChecksumIEEE([]byte(french))\n\tif fmt.Sprintf(\"%x\", checksum) != \"3e56b216\" {\n\t\tpanic(\"french checksum invalid\")\n\t}\n}\n\n// French is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/french.txt\nvar (\n\tFrench = strings.Split(strings.TrimSpace(french), \"\\n\")\n\tfrench = `abaisser\nabandon\nabdiquer\nabeille\nabolir\naborder\naboutir\naboyer\nabrasif\nabreuver\nabriter\nabroger\nabrupt\nabsence\nabsolu\nabsurde\nabusif\nabyssal\nacadémie\nacajou\nacarien\naccabler\naccepter\nacclamer\naccolade\naccroche\naccuser\nacerbe\nachat\nacheter\naciduler\nacier\nacompte\nacquérir\nacronyme\nacteur\nactif\nactuel\nadepte\nadéquat\nadhésif\nadjectif\nadjuger\nadmettre\nadmirer\nadopter\nadorer\nadoucir\nadresse\nadroit\nadulte\nadverbe\naérer\naéronef\naffaire\naffecter\naffiche\naffreux\naffubler\nagacer\nagencer\nagile\nagiter\nagrafer\nagréable\nagrume\naider\naiguille\nailier\naimable\naisance\najouter\najuster\nalarmer\nalchimie\nalerte\nalgèbre\nalgue\naliéner\naliment\nalléger\nalliage\nallouer\nallumer\nalourdir\nalpaga\naltesse\nalvéole\namateur\nambigu\nambre\naménager\namertume\namidon\namiral\namorcer\namour\namovible\namphibie\nampleur\namusant\nanalyse\nanaphore\nanarchie\nanatomie\nancien\nanéantir\nangle\nangoisse\nanguleux\nanimal\nannexer\nannonce\nannuel\nanodin\nanomalie\nanonyme\nanormal\nantenne\nantidote\nanxieux\napaiser\napéritif\naplanir\napologie\nappareil\nappeler\napporter\nappuyer\naquarium\naqueduc\narbitre\narbuste\nardeur\nardoise\nargent\narlequin\narmature\narmement\narmoire\narmure\narpenter\narracher\narriver\narroser\narsenic\nartériel\narticle\naspect\nasphalte\naspirer\nassaut\nasservir\nassiette\nassocier\nassurer\nasticot\nastre\nastuce\natelier\natome\natrium\natroce\nattaque\nattentif\nattirer\nattraper\naubaine\nauberge\naudace\naudible\naugurer\naurore\nautomne\nautruche\navaler\navancer\navarice\navenir\naverse\naveugle\naviateur\navide\navion\naviser\navoine\navouer\navril\naxial\naxiome\nbadge\nbafouer\nbagage\nbaguette\nbaignade\nbalancer\nbalcon\nbaleine\nbalisage\nbambin\nbancaire\nbandage\nbanlieue\nbannière\nbanquier\nbarbier\nbaril\nbaron\nbarque\nbarrage\nbassin\nbastion\nbataille\nbateau\nbatterie\nbaudrier\nbavarder\nbelette\nbélier\nbelote\nbénéfice\nberceau\nberger\nberline\nbermuda\nbesace\nbesogne\nbétail\nbeurre\nbiberon\nbicycle\nbidule\nbijou\nbilan\nbilingue\nbillard\nbinaire\nbiologie\nbiopsie\nbiotype\nbiscuit\nbison\nbistouri\nbitume\nbizarre\nblafard\nblague\nblanchir\nblessant\nblinder\nblond\nbloquer\nblouson\nbobard\nbobine\nboire\nboiser\nbolide\nbonbon\nbondir\nbonheur\nbonifier\nbonus\nbordure\nborne\nbotte\nboucle\nboueux\nbougie\nboulon\nbouquin\nbourse\nboussole\nboutique\nboxeur\nbranche\nbrasier\nbrave\nbrebis\nbrèche\nbreuvage\nbricoler\nbrigade\nbrillant\nbrioche\nbrique\nbrochure\nbroder\nbronzer\nbrousse\nbroyeur\nbrume\nbrusque\nbrutal\nbruyant\nbuffle\nbuisson\nbulletin\nbureau\nburin\nbustier\nbutiner\nbutoir\nbuvable\nbuvette\ncabanon\ncabine\ncachette\ncadeau\ncadre\ncaféine\ncaillou\ncaisson\ncalculer\ncalepin\ncalibre\ncalmer\ncalomnie\ncalvaire\ncamarade\ncaméra\ncamion\ncampagne\ncanal\ncaneton\ncanon\ncantine\ncanular\ncapable\ncaporal\ncaprice\ncapsule\ncapter\ncapuche\ncarabine\ncarbone\ncaresser\ncaribou\ncarnage\ncarotte\ncarreau\ncarton\ncascade\ncasier\ncasque\ncassure\ncauser\ncaution\ncavalier\ncaverne\ncaviar\ncédille\nceinture\ncéleste\ncellule\ncendrier\ncensurer\ncentral\ncercle\ncérébral\ncerise\ncerner\ncerveau\ncesser\nchagrin\nchaise\nchaleur\nchambre\nchance\nchapitre\ncharbon\nchasseur\nchaton\nchausson\nchavirer\nchemise\nchenille\nchéquier\nchercher\ncheval\nchien\nchiffre\nchignon\nchimère\nchiot\nchlorure\nchocolat\nchoisir\nchose\nchouette\nchrome\nchute\ncigare\ncigogne\ncimenter\ncinéma\ncintrer\ncirculer\ncirer\ncirque\nciterne\ncitoyen\ncitron\ncivil\nclairon\nclameur\nclaquer\nclasse\nclavier\nclient\ncligner\nclimat\nclivage\ncloche\nclonage\ncloporte\ncobalt\ncobra\ncocasse\ncocotier\ncoder\ncodifier\ncoffre\ncogner\ncohésion\ncoiffer\ncoincer\ncolère\ncolibri\ncolline\ncolmater\ncolonel\ncombat\ncomédie\ncommande\ncompact\nconcert\nconduire\nconfier\ncongeler\nconnoter\nconsonne\ncontact\nconvexe\ncopain\ncopie\ncorail\ncorbeau\ncordage\ncorniche\ncorpus\ncorrect\ncortège\ncosmique\ncostume\ncoton\ncoude\ncoupure\ncourage\ncouteau\ncouvrir\ncoyote\ncrabe\ncrainte\ncravate\ncrayon\ncréature\ncréditer\ncrémeux\ncreuser\ncrevette\ncribler\ncrier\ncristal\ncritère\ncroire\ncroquer\ncrotale\ncrucial\ncruel\ncrypter\ncubique\ncueillir\ncuillère\ncuisine\ncuivre\nculminer\ncultiver\ncumuler\ncupide\ncuratif\ncurseur\ncyanure\ncycle\ncylindre\ncynique\ndaigner\ndamier\ndanger\ndanseur\ndauphin\ndébattre\ndébiter\ndéborder\ndébrider\ndébutant\ndécaler\ndécembre\ndéchirer\ndécider\ndéclarer\ndécorer\ndécrire\ndécupler\ndédale\ndéductif\ndéesse\ndéfensif\ndéfiler\ndéfrayer\ndégager\ndégivrer\ndéglutir\ndégrafer\ndéjeuner\ndélice\ndéloger\ndemander\ndemeurer\ndémolir\ndénicher\ndénouer\ndentelle\ndénuder\ndépart\ndépenser\ndéphaser\ndéplacer\ndéposer\ndéranger\ndérober\ndésastre\ndescente\ndésert\ndésigner\ndésobéir\ndessiner\ndestrier\ndétacher\ndétester\ndétourer\ndétresse\ndevancer\ndevenir\ndeviner\ndevoir\ndiable\ndialogue\ndiamant\ndicter\ndifférer\ndigérer\ndigital\ndigne\ndiluer\ndimanche\ndiminuer\ndioxyde\ndirectif\ndiriger\ndiscuter\ndisposer\ndissiper\ndistance\ndivertir\ndiviser\ndocile\ndocteur\ndogme\ndoigt\ndomaine\ndomicile\ndompter\ndonateur\ndonjon\ndonner\ndopamine\ndortoir\ndorure\ndosage\ndoseur\ndossier\ndotation\ndouanier\ndouble\ndouceur\ndouter\ndoyen\ndragon\ndraper\ndresser\ndribbler\ndroiture\nduperie\nduplexe\ndurable\ndurcir\ndynastie\néblouir\nécarter\nécharpe\néchelle\néclairer\néclipse\néclore\nécluse\nécole\néconomie\nécorce\nécouter\nécraser\nécrémer\nécrivain\nécrou\nécume\nécureuil\nédifier\néduquer\neffacer\neffectif\neffigie\neffort\neffrayer\neffusion\négaliser\négarer\néjecter\nélaborer\nélargir\nélectron\nélégant\néléphant\nélève\néligible\nélitisme\néloge\nélucider\néluder\nemballer\nembellir\nembryon\némeraude\némission\nemmener\némotion\némouvoir\nempereur\nemployer\nemporter\nemprise\némulsion\nencadrer\nenchère\nenclave\nencoche\nendiguer\nendosser\nendroit\nenduire\nénergie\nenfance\nenfermer\nenfouir\nengager\nengin\nenglober\nénigme\nenjamber\nenjeu\nenlever\nennemi\nennuyeux\nenrichir\nenrobage\nenseigne\nentasser\nentendre\nentier\nentourer\nentraver\nénumérer\nenvahir\nenviable\nenvoyer\nenzyme\néolien\népaissir\népargne\népatant\népaule\népicerie\népidémie\népier\népilogue\népine\népisode\népitaphe\népoque\népreuve\néprouver\népuisant\néquerre\néquipe\nériger\nérosion\nerreur\néruption\nescalier\nespadon\nespèce\nespiègle\nespoir\nesprit\nesquiver\nessayer\nessence\nessieu\nessorer\nestime\nestomac\nestrade\nétagère\nétaler\nétanche\nétatique\néteindre\nétendoir\néternel\néthanol\néthique\nethnie\nétirer\nétoffer\nétoile\nétonnant\nétourdir\nétrange\nétroit\nétude\neuphorie\névaluer\névasion\néventail\névidence\néviter\névolutif\névoquer\nexact\nexagérer\nexaucer\nexceller\nexcitant\nexclusif\nexcuse\nexécuter\nexemple\nexercer\nexhaler\nexhorter\nexigence\nexiler\nexister\nexotique\nexpédier\nexplorer\nexposer\nexprimer\nexquis\nextensif\nextraire\nexulter\nfable\nfabuleux\nfacette\nfacile\nfacture\nfaiblir\nfalaise\nfameux\nfamille\nfarceur\nfarfelu\nfarine\nfarouche\nfasciner\nfatal\nfatigue\nfaucon\nfautif\nfaveur\nfavori\nfébrile\nféconder\nfédérer\nfélin\nfemme\nfémur\nfendoir\nféodal\nfermer\nféroce\nferveur\nfestival\nfeuille\nfeutre\nfévrier\nfiasco\nficeler\nfictif\nfidèle\nfigure\nfilature\nfiletage\nfilière\nfilleul\nfilmer\nfilou\nfiltrer\nfinancer\nfinir\nfiole\nfirme\nfissure\nfixer\nflairer\nflamme\nflasque\nflatteur\nfléau\nflèche\nfleur\nflexion\nflocon\nflore\nfluctuer\nfluide\nfluvial\nfolie\nfonderie\nfongible\nfontaine\nforcer\nforgeron\nformuler\nfortune\nfossile\nfoudre\nfougère\nfouiller\nfoulure\nfourmi\nfragile\nfraise\nfranchir\nfrapper\nfrayeur\nfrégate\nfreiner\nfrelon\nfrémir\nfrénésie\nfrère\nfriable\nfriction\nfrisson\nfrivole\nfroid\nfromage\nfrontal\nfrotter\nfruit\nfugitif\nfuite\nfureur\nfurieux\nfurtif\nfusion\nfutur\ngagner\ngalaxie\ngalerie\ngambader\ngarantir\ngardien\ngarnir\ngarrigue\ngazelle\ngazon\ngéant\ngélatine\ngélule\ngendarme\ngénéral\ngénie\ngenou\ngentil\ngéologie\ngéomètre\ngéranium\ngerme\ngestuel\ngeyser\ngibier\ngicler\ngirafe\ngivre\nglace\nglaive\nglisser\nglobe\ngloire\nglorieux\ngolfeur\ngomme\ngonfler\ngorge\ngorille\ngoudron\ngouffre\ngoulot\ngoupille\ngourmand\ngoutte\ngraduel\ngraffiti\ngraine\ngrand\ngrappin\ngratuit\ngravir\ngrenat\ngriffure\ngriller\ngrimper\ngrogner\ngronder\ngrotte\ngroupe\ngruger\ngrutier\ngruyère\nguépard\nguerrier\nguide\nguimauve\nguitare\ngustatif\ngymnaste\ngyrostat\nhabitude\nhachoir\nhalte\nhameau\nhangar\nhanneton\nharicot\nharmonie\nharpon\nhasard\nhélium\nhématome\nherbe\nhérisson\nhermine\nhéron\nhésiter\nheureux\nhiberner\nhibou\nhilarant\nhistoire\nhiver\nhomard\nhommage\nhomogène\nhonneur\nhonorer\nhonteux\nhorde\nhorizon\nhorloge\nhormone\nhorrible\nhouleux\nhousse\nhublot\nhuileux\nhumain\nhumble\nhumide\nhumour\nhurler\nhydromel\nhygiène\nhymne\nhypnose\nidylle\nignorer\niguane\nillicite\nillusion\nimage\nimbiber\nimiter\nimmense\nimmobile\nimmuable\nimpact\nimpérial\nimplorer\nimposer\nimprimer\nimputer\nincarner\nincendie\nincident\nincliner\nincolore\nindexer\nindice\ninductif\ninédit\nineptie\ninexact\ninfini\ninfliger\ninformer\ninfusion\ningérer\ninhaler\ninhiber\ninjecter\ninjure\ninnocent\ninoculer\ninonder\ninscrire\ninsecte\ninsigne\ninsolite\ninspirer\ninstinct\ninsulter\nintact\nintense\nintime\nintrigue\nintuitif\ninutile\ninvasion\ninventer\ninviter\ninvoquer\nironique\nirradier\nirréel\nirriter\nisoler\nivoire\nivresse\njaguar\njaillir\njambe\njanvier\njardin\njauger\njaune\njavelot\njetable\njeton\njeudi\njeunesse\njoindre\njoncher\njongler\njoueur\njouissif\njournal\njovial\njoyau\njoyeux\njubiler\njugement\njunior\njupon\njuriste\njustice\njuteux\njuvénile\nkayak\nkimono\nkiosque\nlabel\nlabial\nlabourer\nlacérer\nlactose\nlagune\nlaine\nlaisser\nlaitier\nlambeau\nlamelle\nlampe\nlanceur\nlangage\nlanterne\nlapin\nlargeur\nlarme\nlaurier\nlavabo\nlavoir\nlecture\nlégal\nléger\nlégume\nlessive\nlettre\nlevier\nlexique\nlézard\nliasse\nlibérer\nlibre\nlicence\nlicorne\nliège\nlièvre\nligature\nligoter\nligue\nlimer\nlimite\nlimonade\nlimpide\nlinéaire\nlingot\nlionceau\nliquide\nlisière\nlister\nlithium\nlitige\nlittoral\nlivreur\nlogique\nlointain\nloisir\nlombric\nloterie\nlouer\nlourd\nloutre\nlouve\nloyal\nlubie\nlucide\nlucratif\nlueur\nlugubre\nluisant\nlumière\nlunaire\nlundi\nluron\nlutter\nluxueux\nmachine\nmagasin\nmagenta\nmagique\nmaigre\nmaillon\nmaintien\nmairie\nmaison\nmajorer\nmalaxer\nmaléfice\nmalheur\nmalice\nmallette\nmammouth\nmandater\nmaniable\nmanquant\nmanteau\nmanuel\nmarathon\nmarbre\nmarchand\nmardi\nmaritime\nmarqueur\nmarron\nmarteler\nmascotte\nmassif\nmatériel\nmatière\nmatraque\nmaudire\nmaussade\nmauve\nmaximal\nméchant\nméconnu\nmédaille\nmédecin\nméditer\nméduse\nmeilleur\nmélange\nmélodie\nmembre\nmémoire\nmenacer\nmener\nmenhir\nmensonge\nmentor\nmercredi\nmérite\nmerle\nmessager\nmesure\nmétal\nmétéore\nméthode\nmétier\nmeuble\nmiauler\nmicrobe\nmiette\nmignon\nmigrer\nmilieu\nmillion\nmimique\nmince\nminéral\nminimal\nminorer\nminute\nmiracle\nmiroiter\nmissile\nmixte\nmobile\nmoderne\nmoelleux\nmondial\nmoniteur\nmonnaie\nmonotone\nmonstre\nmontagne\nmonument\nmoqueur\nmorceau\nmorsure\nmortier\nmoteur\nmotif\nmouche\nmoufle\nmoulin\nmousson\nmouton\nmouvant\nmultiple\nmunition\nmuraille\nmurène\nmurmure\nmuscle\nmuséum\nmusicien\nmutation\nmuter\nmutuel\nmyriade\nmyrtille\nmystère\nmythique\nnageur\nnappe\nnarquois\nnarrer\nnatation\nnation\nnature\nnaufrage\nnautique\nnavire\nnébuleux\nnectar\nnéfaste\nnégation\nnégliger\nnégocier\nneige\nnerveux\nnettoyer\nneurone\nneutron\nneveu\nniche\nnickel\nnitrate\nniveau\nnoble\nnocif\nnocturne\nnoirceur\nnoisette\nnomade\nnombreux\nnommer\nnormatif\nnotable\nnotifier\nnotoire\nnourrir\nnouveau\nnovateur\nnovembre\nnovice\nnuage\nnuancer\nnuire\nnuisible\nnuméro\nnuptial\nnuque\nnutritif\nobéir\nobjectif\nobliger\nobscur\nobserver\nobstacle\nobtenir\nobturer\noccasion\noccuper\nocéan\noctobre\noctroyer\noctupler\noculaire\nodeur\nodorant\noffenser\nofficier\noffrir\nogive\noiseau\noisillon\nolfactif\nolivier\nombrage\nomettre\nonctueux\nonduler\nonéreux\nonirique\nopale\nopaque\nopérer\nopinion\nopportun\nopprimer\nopter\noptique\norageux\norange\norbite\nordonner\noreille\norgane\norgueil\norifice\nornement\norque\nortie\nosciller\nosmose\nossature\notarie\nouragan\nourson\noutil\noutrager\nouvrage\novation\noxyde\noxygène\nozone\npaisible\npalace\npalmarès\npalourde\npalper\npanache\npanda\npangolin\npaniquer\npanneau\npanorama\npantalon\npapaye\npapier\npapoter\npapyrus\nparadoxe\nparcelle\nparesse\nparfumer\nparler\nparole\nparrain\nparsemer\npartager\nparure\nparvenir\npassion\npastèque\npaternel\npatience\npatron\npavillon\npavoiser\npayer\npaysage\npeigne\npeintre\npelage\npélican\npelle\npelouse\npeluche\npendule\npénétrer\npénible\npensif\npénurie\npépite\npéplum\nperdrix\nperforer\npériode\npermuter\nperplexe\npersil\nperte\npeser\npétale\npetit\npétrir\npeuple\npharaon\nphobie\nphoque\nphoton\nphrase\nphysique\npiano\npictural\npièce\npierre\npieuvre\npilote\npinceau\npipette\npiquer\npirogue\npiscine\npiston\npivoter\npixel\npizza\nplacard\nplafond\nplaisir\nplaner\nplaque\nplastron\nplateau\npleurer\nplexus\npliage\nplomb\nplonger\npluie\nplumage\npochette\npoésie\npoète\npointe\npoirier\npoisson\npoivre\npolaire\npolicier\npollen\npolygone\npommade\npompier\nponctuel\npondérer\nponey\nportique\nposition\nposséder\nposture\npotager\npoteau\npotion\npouce\npoulain\npoumon\npourpre\npoussin\npouvoir\nprairie\npratique\nprécieux\nprédire\npréfixe\nprélude\nprénom\nprésence\nprétexte\nprévoir\nprimitif\nprince\nprison\npriver\nproblème\nprocéder\nprodige\nprofond\nprogrès\nproie\nprojeter\nprologue\npromener\npropre\nprospère\nprotéger\nprouesse\nproverbe\nprudence\npruneau\npsychose\npublic\npuceron\npuiser\npulpe\npulsar\npunaise\npunitif\npupitre\npurifier\npuzzle\npyramide\nquasar\nquerelle\nquestion\nquiétude\nquitter\nquotient\nracine\nraconter\nradieux\nragondin\nraideur\nraisin\nralentir\nrallonge\nramasser\nrapide\nrasage\nratisser\nravager\nravin\nrayonner\nréactif\nréagir\nréaliser\nréanimer\nrecevoir\nréciter\nréclamer\nrécolter\nrecruter\nreculer\nrecycler\nrédiger\nredouter\nrefaire\nréflexe\nréformer\nrefrain\nrefuge\nrégalien\nrégion\nréglage\nrégulier\nréitérer\nrejeter\nrejouer\nrelatif\nrelever\nrelief\nremarque\nremède\nremise\nremonter\nremplir\nremuer\nrenard\nrenfort\nrenifler\nrenoncer\nrentrer\nrenvoi\nreplier\nreporter\nreprise\nreptile\nrequin\nréserve\nrésineux\nrésoudre\nrespect\nrester\nrésultat\nrétablir\nretenir\nréticule\nretomber\nretracer\nréunion\nréussir\nrevanche\nrevivre\nrévolte\nrévulsif\nrichesse\nrideau\nrieur\nrigide\nrigoler\nrincer\nriposter\nrisible\nrisque\nrituel\nrival\nrivière\nrocheux\nromance\nrompre\nronce\nrondin\nroseau\nrosier\nrotatif\nrotor\nrotule\nrouge\nrouille\nrouleau\nroutine\nroyaume\nruban\nrubis\nruche\nruelle\nrugueux\nruiner\nruisseau\nruser\nrustique\nrythme\nsabler\nsaboter\nsabre\nsacoche\nsafari\nsagesse\nsaisir\nsalade\nsalive\nsalon\nsaluer\nsamedi\nsanction\nsanglier\nsarcasme\nsardine\nsaturer\nsaugrenu\nsaumon\nsauter\nsauvage\nsavant\nsavonner\nscalpel\nscandale\nscélérat\nscénario\nsceptre\nschéma\nscience\nscinder\nscore\nscrutin\nsculpter\nséance\nsécable\nsécher\nsecouer\nsécréter\nsédatif\nséduire\nseigneur\nséjour\nsélectif\nsemaine\nsembler\nsemence\nséminal\nsénateur\nsensible\nsentence\nséparer\nséquence\nserein\nsergent\nsérieux\nserrure\nsérum\nservice\nsésame\nsévir\nsevrage\nsextuple\nsidéral\nsiècle\nsiéger\nsiffler\nsigle\nsignal\nsilence\nsilicium\nsimple\nsincère\nsinistre\nsiphon\nsirop\nsismique\nsituer\nskier\nsocial\nsocle\nsodium\nsoigneux\nsoldat\nsoleil\nsolitude\nsoluble\nsombre\nsommeil\nsomnoler\nsonde\nsongeur\nsonnette\nsonore\nsorcier\nsortir\nsosie\nsottise\nsoucieux\nsoudure\nsouffle\nsoulever\nsoupape\nsource\nsoutirer\nsouvenir\nspacieux\nspatial\nspécial\nsphère\nspiral\nstable\nstation\nsternum\nstimulus\nstipuler\nstrict\nstudieux\nstupeur\nstyliste\nsublime\nsubstrat\nsubtil\nsubvenir\nsuccès\nsucre\nsuffixe\nsuggérer\nsuiveur\nsulfate\nsuperbe\nsupplier\nsurface\nsuricate\nsurmener\nsurprise\nsursaut\nsurvie\nsuspect\nsyllabe\nsymbole\nsymétrie\nsynapse\nsyntaxe\nsystème\ntabac\ntablier\ntactile\ntailler\ntalent\ntalisman\ntalonner\ntambour\ntamiser\ntangible\ntapis\ntaquiner\ntarder\ntarif\ntartine\ntasse\ntatami\ntatouage\ntaupe\ntaureau\ntaxer\ntémoin\ntemporel\ntenaille\ntendre\nteneur\ntenir\ntension\nterminer\nterne\nterrible\ntétine\ntexte\nthème\nthéorie\nthérapie\nthorax\ntibia\ntiède\ntimide\ntirelire\ntiroir\ntissu\ntitane\ntitre\ntituber\ntoboggan\ntolérant\ntomate\ntonique\ntonneau\ntoponyme\ntorche\ntordre\ntornade\ntorpille\ntorrent\ntorse\ntortue\ntotem\ntoucher\ntournage\ntousser\ntoxine\ntraction\ntrafic\ntragique\ntrahir\ntrain\ntrancher\ntravail\ntrèfle\ntremper\ntrésor\ntreuil\ntriage\ntribunal\ntricoter\ntrilogie\ntriomphe\ntripler\ntriturer\ntrivial\ntrombone\ntronc\ntropical\ntroupeau\ntuile\ntulipe\ntumulte\ntunnel\nturbine\ntuteur\ntutoyer\ntuyau\ntympan\ntyphon\ntypique\ntyran\nubuesque\nultime\nultrason\nunanime\nunifier\nunion\nunique\nunitaire\nunivers\nuranium\nurbain\nurticant\nusage\nusine\nusuel\nusure\nutile\nutopie\nvacarme\nvaccin\nvagabond\nvague\nvaillant\nvaincre\nvaisseau\nvalable\nvalise\nvallon\nvalve\nvampire\nvanille\nvapeur\nvarier\nvaseux\nvassal\nvaste\nvecteur\nvedette\nvégétal\nvéhicule\nveinard\nvéloce\nvendredi\nvénérer\nvenger\nvenimeux\nventouse\nverdure\nvérin\nvernir\nverrou\nverser\nvertu\nveston\nvétéran\nvétuste\nvexant\nvexer\nviaduc\nviande\nvictoire\nvidange\nvidéo\nvignette\nvigueur\nvilain\nvillage\nvinaigre\nviolon\nvipère\nvirement\nvirtuose\nvirus\nvisage\nviseur\nvision\nvisqueux\nvisuel\nvital\nvitesse\nviticole\nvitrine\nvivace\nvivipare\nvocation\nvoguer\nvoile\nvoisin\nvoiture\nvolaille\nvolcan\nvoltiger\nvolume\nvorace\nvortex\nvoter\nvouloir\nvoyage\nvoyelle\nwagon\nxénon\nyacht\nzèbre\nzénith\nzeste\nzoologie\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/italian.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/italian.txt\n\t// $ crc32 italian.txt\n\t// 2fc7d07e\n\tchecksum := crc32.ChecksumIEEE([]byte(italian))\n\tif fmt.Sprintf(\"%x\", checksum) != \"2fc7d07e\" {\n\t\tpanic(\"italian checksum invalid\")\n\t}\n}\n\n// Italian is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/italian.txt\nvar (\n\tItalian = strings.Split(strings.TrimSpace(italian), \"\\n\")\n\titalian = `abaco\nabbaglio\nabbinato\nabete\nabisso\nabolire\nabrasivo\nabrogato\naccadere\naccenno\naccusato\nacetone\nachille\nacido\nacqua\nacre\nacrilico\nacrobata\nacuto\nadagio\naddebito\naddome\nadeguato\naderire\nadipe\nadottare\nadulare\naffabile\naffetto\naffisso\naffranto\naforisma\nafoso\nafricano\nagave\nagente\nagevole\naggancio\nagire\nagitare\nagonismo\nagricolo\nagrumeto\naguzzo\nalabarda\nalato\nalbatro\nalberato\nalbo\nalbume\nalce\nalcolico\nalettone\nalfa\nalgebra\naliante\nalibi\nalimento\nallagato\nallegro\nallievo\nallodola\nallusivo\nalmeno\nalogeno\nalpaca\nalpestre\naltalena\nalterno\nalticcio\naltrove\nalunno\nalveolo\nalzare\namalgama\namanita\namarena\nambito\nambrato\nameba\namerica\nametista\namico\nammasso\nammenda\nammirare\nammonito\namore\nampio\nampliare\namuleto\nanacardo\nanagrafe\nanalista\nanarchia\nanatra\nanca\nancella\nancora\nandare\nandrea\nanello\nangelo\nangolare\nangusto\nanima\nannegare\nannidato\nanno\nannuncio\nanonimo\nanticipo\nanzi\napatico\napertura\napode\napparire\nappetito\nappoggio\napprodo\nappunto\naprile\narabica\narachide\naragosta\naraldica\narancio\naratura\narazzo\narbitro\narchivio\nardito\narenile\nargento\nargine\narguto\naria\narmonia\narnese\narredato\narringa\narrosto\narsenico\narso\nartefice\narzillo\nasciutto\nascolto\nasepsi\nasettico\nasfalto\nasino\nasola\naspirato\naspro\nassaggio\nasse\nassoluto\nassurdo\nasta\nastenuto\nastice\nastratto\natavico\nateismo\natomico\natono\nattesa\nattivare\nattorno\nattrito\nattuale\nausilio\naustria\nautista\nautonomo\nautunno\navanzato\navere\navvenire\navviso\navvolgere\nazione\nazoto\nazzimo\nazzurro\nbabele\nbaccano\nbacino\nbaco\nbadessa\nbadilata\nbagnato\nbaita\nbalcone\nbaldo\nbalena\nballata\nbalzano\nbambino\nbandire\nbaraonda\nbarbaro\nbarca\nbaritono\nbarlume\nbarocco\nbasilico\nbasso\nbatosta\nbattuto\nbaule\nbava\nbavosa\nbecco\nbeffa\nbelgio\nbelva\nbenda\nbenevole\nbenigno\nbenzina\nbere\nberlina\nbeta\nbibita\nbici\nbidone\nbifido\nbiga\nbilancia\nbimbo\nbinocolo\nbiologo\nbipede\nbipolare\nbirbante\nbirra\nbiscotto\nbisesto\nbisnonno\nbisonte\nbisturi\nbizzarro\nblando\nblatta\nbollito\nbonifico\nbordo\nbosco\nbotanico\nbottino\nbozzolo\nbraccio\nbradipo\nbrama\nbranca\nbravura\nbretella\nbrevetto\nbrezza\nbriglia\nbrillante\nbrindare\nbroccolo\nbrodo\nbronzina\nbrullo\nbruno\nbubbone\nbuca\nbudino\nbuffone\nbuio\nbulbo\nbuono\nburlone\nburrasca\nbussola\nbusta\ncadetto\ncaduco\ncalamaro\ncalcolo\ncalesse\ncalibro\ncalmo\ncaloria\ncambusa\ncamerata\ncamicia\ncammino\ncamola\ncampale\ncanapa\ncandela\ncane\ncanino\ncanotto\ncantina\ncapace\ncapello\ncapitolo\ncapogiro\ncappero\ncapra\ncapsula\ncarapace\ncarcassa\ncardo\ncarisma\ncarovana\ncarretto\ncartolina\ncasaccio\ncascata\ncaserma\ncaso\ncassone\ncastello\ncasuale\ncatasta\ncatena\ncatrame\ncauto\ncavillo\ncedibile\ncedrata\ncefalo\ncelebre\ncellulare\ncena\ncenone\ncentesimo\nceramica\ncercare\ncerto\ncerume\ncervello\ncesoia\ncespo\nceto\nchela\nchiaro\nchicca\nchiedere\nchimera\nchina\nchirurgo\nchitarra\nciao\nciclismo\ncifrare\ncigno\ncilindro\nciottolo\ncirca\ncirrosi\ncitrico\ncittadino\nciuffo\ncivetta\ncivile\nclassico\nclinica\ncloro\ncocco\ncodardo\ncodice\ncoerente\ncognome\ncollare\ncolmato\ncolore\ncolposo\ncoltivato\ncolza\ncoma\ncometa\ncommando\ncomodo\ncomputer\ncomune\nconciso\ncondurre\nconferma\ncongelare\nconiuge\nconnesso\nconoscere\nconsumo\ncontinuo\nconvegno\ncoperto\ncopione\ncoppia\ncopricapo\ncorazza\ncordata\ncoricato\ncornice\ncorolla\ncorpo\ncorredo\ncorsia\ncortese\ncosmico\ncostante\ncottura\ncovato\ncratere\ncravatta\ncreato\ncredere\ncremoso\ncrescita\ncreta\ncriceto\ncrinale\ncrisi\ncritico\ncroce\ncronaca\ncrostata\ncruciale\ncrusca\ncucire\ncuculo\ncugino\ncullato\ncupola\ncuratore\ncursore\ncurvo\ncuscino\ncustode\ndado\ndaino\ndalmata\ndamerino\ndaniela\ndannoso\ndanzare\ndatato\ndavanti\ndavvero\ndebutto\ndecennio\ndeciso\ndeclino\ndecollo\ndecreto\ndedicato\ndefinito\ndeforme\ndegno\ndelegare\ndelfino\ndelirio\ndelta\ndemenza\ndenotato\ndentro\ndeposito\nderapata\nderivare\nderoga\ndescritto\ndeserto\ndesiderio\ndesumere\ndetersivo\ndevoto\ndiametro\ndicembre\ndiedro\ndifeso\ndiffuso\ndigerire\ndigitale\ndiluvio\ndinamico\ndinnanzi\ndipinto\ndiploma\ndipolo\ndiradare\ndire\ndirotto\ndirupo\ndisagio\ndiscreto\ndisfare\ndisgelo\ndisposto\ndistanza\ndisumano\ndito\ndivano\ndivelto\ndividere\ndivorato\ndoblone\ndocente\ndoganale\ndogma\ndolce\ndomato\ndomenica\ndominare\ndondolo\ndono\ndormire\ndote\ndottore\ndovuto\ndozzina\ndrago\ndruido\ndubbio\ndubitare\nducale\nduna\nduomo\nduplice\nduraturo\nebano\neccesso\necco\neclissi\neconomia\nedera\nedicola\nedile\neditoria\neducare\negemonia\negli\negoismo\negregio\nelaborato\nelargire\nelegante\nelencato\neletto\nelevare\nelfico\nelica\nelmo\nelsa\neluso\nemanato\nemblema\nemesso\nemiro\nemotivo\nemozione\nempirico\nemulo\nendemico\nenduro\nenergia\nenfasi\nenoteca\nentrare\nenzima\nepatite\nepilogo\nepisodio\nepocale\neppure\nequatore\nerario\nerba\nerboso\nerede\neremita\nerigere\nermetico\neroe\nerosivo\nerrante\nesagono\nesame\nesanime\nesaudire\nesca\nesempio\nesercito\nesibito\nesigente\nesistere\nesito\nesofago\nesortato\nesoso\nespanso\nespresso\nessenza\nesso\nesteso\nestimare\nestonia\nestroso\nesultare\netilico\netnico\netrusco\netto\neuclideo\neuropa\nevaso\nevidenza\nevitato\nevoluto\nevviva\nfabbrica\nfaccenda\nfachiro\nfalco\nfamiglia\nfanale\nfanfara\nfango\nfantasma\nfare\nfarfalla\nfarinoso\nfarmaco\nfascia\nfastoso\nfasullo\nfaticare\nfato\nfavoloso\nfebbre\nfecola\nfede\nfegato\nfelpa\nfeltro\nfemmina\nfendere\nfenomeno\nfermento\nferro\nfertile\nfessura\nfestivo\nfetta\nfeudo\nfiaba\nfiducia\nfifa\nfigurato\nfilo\nfinanza\nfinestra\nfinire\nfiore\nfiscale\nfisico\nfiume\nflacone\nflamenco\nflebo\nflemma\nflorido\nfluente\nfluoro\nfobico\nfocaccia\nfocoso\nfoderato\nfoglio\nfolata\nfolclore\nfolgore\nfondente\nfonetico\nfonia\nfontana\nforbito\nforchetta\nforesta\nformica\nfornaio\nforo\nfortezza\nforzare\nfosfato\nfosso\nfracasso\nfrana\nfrassino\nfratello\nfreccetta\nfrenata\nfresco\nfrigo\nfrollino\nfronde\nfrugale\nfrutta\nfucilata\nfucsia\nfuggente\nfulmine\nfulvo\nfumante\nfumetto\nfumoso\nfune\nfunzione\nfuoco\nfurbo\nfurgone\nfurore\nfuso\nfutile\ngabbiano\ngaffe\ngalateo\ngallina\ngaloppo\ngambero\ngamma\ngaranzia\ngarbo\ngarofano\ngarzone\ngasdotto\ngasolio\ngastrico\ngatto\ngaudio\ngazebo\ngazzella\ngeco\ngelatina\ngelso\ngemello\ngemmato\ngene\ngenitore\ngennaio\ngenotipo\ngergo\nghepardo\nghiaccio\nghisa\ngiallo\ngilda\nginepro\ngiocare\ngioiello\ngiorno\ngiove\ngirato\ngirone\ngittata\ngiudizio\ngiurato\ngiusto\nglobulo\nglutine\ngnomo\ngobba\ngolf\ngomito\ngommone\ngonfio\ngonna\ngoverno\ngracile\ngrado\ngrafico\ngrammo\ngrande\ngrattare\ngravoso\ngrazia\ngreca\ngregge\ngrifone\ngrigio\ngrinza\ngrotta\ngruppo\nguadagno\nguaio\nguanto\nguardare\ngufo\nguidare\nibernato\nicona\nidentico\nidillio\nidolo\nidra\nidrico\nidrogeno\nigiene\nignaro\nignorato\nilare\nilleso\nillogico\nilludere\nimballo\nimbevuto\nimbocco\nimbuto\nimmane\nimmerso\nimmolato\nimpacco\nimpeto\nimpiego\nimporto\nimpronta\ninalare\ninarcare\ninattivo\nincanto\nincendio\ninchino\nincisivo\nincluso\nincontro\nincrocio\nincubo\nindagine\nindia\nindole\ninedito\ninfatti\ninfilare\ninflitto\ningaggio\ningegno\ninglese\ningordo\ningrosso\ninnesco\ninodore\ninoltrare\ninondato\ninsano\ninsetto\ninsieme\ninsonnia\ninsulina\nintasato\nintero\nintonaco\nintuito\ninumidire\ninvalido\ninvece\ninvito\niperbole\nipnotico\nipotesi\nippica\niride\nirlanda\nironico\nirrigato\nirrorare\nisolato\nisotopo\nisterico\nistituto\nistrice\nitalia\niterare\nlabbro\nlabirinto\nlacca\nlacerato\nlacrima\nlacuna\nladdove\nlago\nlampo\nlancetta\nlanterna\nlardoso\nlarga\nlaringe\nlastra\nlatenza\nlatino\nlattuga\nlavagna\nlavoro\nlegale\nleggero\nlembo\nlentezza\nlenza\nleone\nlepre\nlesivo\nlessato\nlesto\nletterale\nleva\nlevigato\nlibero\nlido\nlievito\nlilla\nlimatura\nlimitare\nlimpido\nlineare\nlingua\nliquido\nlira\nlirica\nlisca\nlite\nlitigio\nlivrea\nlocanda\nlode\nlogica\nlombare\nlondra\nlongevo\nloquace\nlorenzo\nloto\nlotteria\nluce\nlucidato\nlumaca\nluminoso\nlungo\nlupo\nluppolo\nlusinga\nlusso\nlutto\nmacabro\nmacchina\nmacero\nmacinato\nmadama\nmagico\nmaglia\nmagnete\nmagro\nmaiolica\nmalafede\nmalgrado\nmalinteso\nmalsano\nmalto\nmalumore\nmana\nmancia\nmandorla\nmangiare\nmanifesto\nmannaro\nmanovra\nmansarda\nmantide\nmanubrio\nmappa\nmaratona\nmarcire\nmaretta\nmarmo\nmarsupio\nmaschera\nmassaia\nmastino\nmaterasso\nmatricola\nmattone\nmaturo\nmazurca\nmeandro\nmeccanico\nmecenate\nmedesimo\nmeditare\nmega\nmelassa\nmelis\nmelodia\nmeninge\nmeno\nmensola\nmercurio\nmerenda\nmerlo\nmeschino\nmese\nmessere\nmestolo\nmetallo\nmetodo\nmettere\nmiagolare\nmica\nmicelio\nmichele\nmicrobo\nmidollo\nmiele\nmigliore\nmilano\nmilite\nmimosa\nminerale\nmini\nminore\nmirino\nmirtillo\nmiscela\nmissiva\nmisto\nmisurare\nmitezza\nmitigare\nmitra\nmittente\nmnemonico\nmodello\nmodifica\nmodulo\nmogano\nmogio\nmole\nmolosso\nmonastero\nmonco\nmondina\nmonetario\nmonile\nmonotono\nmonsone\nmontato\nmonviso\nmora\nmordere\nmorsicato\nmostro\nmotivato\nmotosega\nmotto\nmovenza\nmovimento\nmozzo\nmucca\nmucosa\nmuffa\nmughetto\nmugnaio\nmulatto\nmulinello\nmultiplo\nmummia\nmunto\nmuovere\nmurale\nmusa\nmuscolo\nmusica\nmutevole\nmuto\nnababbo\nnafta\nnanometro\nnarciso\nnarice\nnarrato\nnascere\nnastrare\nnaturale\nnautica\nnaviglio\nnebulosa\nnecrosi\nnegativo\nnegozio\nnemmeno\nneofita\nneretto\nnervo\nnessuno\nnettuno\nneutrale\nneve\nnevrotico\nnicchia\nninfa\nnitido\nnobile\nnocivo\nnodo\nnome\nnomina\nnordico\nnormale\nnorvegese\nnostrano\nnotare\nnotizia\nnotturno\nnovella\nnucleo\nnulla\nnumero\nnuovo\nnutrire\nnuvola\nnuziale\noasi\nobbedire\nobbligo\nobelisco\noblio\nobolo\nobsoleto\noccasione\nocchio\noccidente\noccorrere\noccultare\nocra\noculato\nodierno\nodorare\nofferta\noffrire\noffuscato\noggetto\noggi\nognuno\nolandese\nolfatto\noliato\noliva\nologramma\noltre\nomaggio\nombelico\nombra\nomega\nomissione\nondoso\nonere\nonice\nonnivoro\nonorevole\nonta\noperato\nopinione\nopposto\noracolo\norafo\nordine\norecchino\norefice\norfano\norganico\norigine\norizzonte\norma\normeggio\nornativo\norologio\norrendo\norribile\nortensia\nortica\norzata\norzo\nosare\noscurare\nosmosi\nospedale\nospite\nossa\nossidare\nostacolo\noste\notite\notre\nottagono\nottimo\nottobre\novale\novest\novino\noviparo\novocito\novunque\novviare\nozio\npacchetto\npace\npacifico\npadella\npadrone\npaese\npaga\npagina\npalazzina\npalesare\npallido\npalo\npalude\npandoro\npannello\npaolo\npaonazzo\npaprica\nparabola\nparcella\nparere\npargolo\npari\nparlato\nparola\npartire\nparvenza\nparziale\npassivo\npasticca\npatacca\npatologia\npattume\npavone\npeccato\npedalare\npedonale\npeggio\npeloso\npenare\npendice\npenisola\npennuto\npenombra\npensare\npentola\npepe\npepita\nperbene\npercorso\nperdonato\nperforare\npergamena\nperiodo\npermesso\nperno\nperplesso\npersuaso\npertugio\npervaso\npesatore\npesista\npeso\npestifero\npetalo\npettine\npetulante\npezzo\npiacere\npianta\npiattino\npiccino\npicozza\npiega\npietra\npiffero\npigiama\npigolio\npigro\npila\npilifero\npillola\npilota\npimpante\npineta\npinna\npinolo\npioggia\npiombo\npiramide\npiretico\npirite\npirolisi\npitone\npizzico\nplacebo\nplanare\nplasma\nplatano\nplenario\npochezza\npoderoso\npodismo\npoesia\npoggiare\npolenta\npoligono\npollice\npolmonite\npolpetta\npolso\npoltrona\npolvere\npomice\npomodoro\nponte\npopoloso\nporfido\nporoso\nporpora\nporre\nportata\nposa\npositivo\npossesso\npostulato\npotassio\npotere\npranzo\nprassi\npratica\nprecluso\npredica\nprefisso\npregiato\nprelievo\npremere\nprenotare\npreparato\npresenza\npretesto\nprevalso\nprima\nprincipe\nprivato\nproblema\nprocura\nprodurre\nprofumo\nprogetto\nprolunga\npromessa\npronome\nproposta\nproroga\nproteso\nprova\nprudente\nprugna\nprurito\npsiche\npubblico\npudica\npugilato\npugno\npulce\npulito\npulsante\npuntare\npupazzo\npupilla\npuro\nquadro\nqualcosa\nquasi\nquerela\nquota\nraccolto\nraddoppio\nradicale\nradunato\nraffica\nragazzo\nragione\nragno\nramarro\nramingo\nramo\nrandagio\nrantolare\nrapato\nrapina\nrappreso\nrasatura\nraschiato\nrasente\nrassegna\nrastrello\nrata\nravveduto\nreale\nrecepire\nrecinto\nrecluta\nrecondito\nrecupero\nreddito\nredimere\nregalato\nregistro\nregola\nregresso\nrelazione\nremare\nremoto\nrenna\nreplica\nreprimere\nreputare\nresa\nresidente\nresponso\nrestauro\nrete\nretina\nretorica\nrettifica\nrevocato\nriassunto\nribadire\nribelle\nribrezzo\nricarica\nricco\nricevere\nriciclato\nricordo\nricreduto\nridicolo\nridurre\nrifasare\nriflesso\nriforma\nrifugio\nrigare\nrigettato\nrighello\nrilassato\nrilevato\nrimanere\nrimbalzo\nrimedio\nrimorchio\nrinascita\nrincaro\nrinforzo\nrinnovo\nrinomato\nrinsavito\nrintocco\nrinuncia\nrinvenire\nriparato\nripetuto\nripieno\nriportare\nripresa\nripulire\nrisata\nrischio\nriserva\nrisibile\nriso\nrispetto\nristoro\nrisultato\nrisvolto\nritardo\nritegno\nritmico\nritrovo\nriunione\nriva\nriverso\nrivincita\nrivolto\nrizoma\nroba\nrobotico\nrobusto\nroccia\nroco\nrodaggio\nrodere\nroditore\nrogito\nrollio\nromantico\nrompere\nronzio\nrosolare\nrospo\nrotante\nrotondo\nrotula\nrovescio\nrubizzo\nrubrica\nruga\nrullino\nrumine\nrumoroso\nruolo\nrupe\nrussare\nrustico\nsabato\nsabbiare\nsabotato\nsagoma\nsalasso\nsaldatura\nsalgemma\nsalivare\nsalmone\nsalone\nsaltare\nsaluto\nsalvo\nsapere\nsapido\nsaporito\nsaraceno\nsarcasmo\nsarto\nsassoso\nsatellite\nsatira\nsatollo\nsaturno\nsavana\nsavio\nsaziato\nsbadiglio\nsbalzo\nsbancato\nsbarra\nsbattere\nsbavare\nsbendare\nsbirciare\nsbloccato\nsbocciato\nsbrinare\nsbruffone\nsbuffare\nscabroso\nscadenza\nscala\nscambiare\nscandalo\nscapola\nscarso\nscatenare\nscavato\nscelto\nscenico\nscettro\nscheda\nschiena\nsciarpa\nscienza\nscindere\nscippo\nsciroppo\nscivolo\nsclerare\nscodella\nscolpito\nscomparto\nsconforto\nscoprire\nscorta\nscossone\nscozzese\nscriba\nscrollare\nscrutinio\nscuderia\nscultore\nscuola\nscuro\nscusare\nsdebitare\nsdoganare\nseccatura\nsecondo\nsedano\nseggiola\nsegnalato\nsegregato\nseguito\nselciato\nselettivo\nsella\nselvaggio\nsemaforo\nsembrare\nseme\nseminato\nsempre\nsenso\nsentire\nsepolto\nsequenza\nserata\nserbato\nsereno\nserio\nserpente\nserraglio\nservire\nsestina\nsetola\nsettimana\nsfacelo\nsfaldare\nsfamato\nsfarzoso\nsfaticato\nsfera\nsfida\nsfilato\nsfinge\nsfocato\nsfoderare\nsfogo\nsfoltire\nsforzato\nsfratto\nsfruttato\nsfuggito\nsfumare\nsfuso\nsgabello\nsgarbato\nsgonfiare\nsgorbio\nsgrassato\nsguardo\nsibilo\nsiccome\nsierra\nsigla\nsignore\nsilenzio\nsillaba\nsimbolo\nsimpatico\nsimulato\nsinfonia\nsingolo\nsinistro\nsino\nsintesi\nsinusoide\nsipario\nsisma\nsistole\nsituato\nslitta\nslogatura\nsloveno\nsmarrito\nsmemorato\nsmentito\nsmeraldo\nsmilzo\nsmontare\nsmottato\nsmussato\nsnellire\nsnervato\nsnodo\nsobbalzo\nsobrio\nsoccorso\nsociale\nsodale\nsoffitto\nsogno\nsoldato\nsolenne\nsolido\nsollazzo\nsolo\nsolubile\nsolvente\nsomatico\nsomma\nsonda\nsonetto\nsonnifero\nsopire\nsoppeso\nsopra\nsorgere\nsorpasso\nsorriso\nsorso\nsorteggio\nsorvolato\nsospiro\nsosta\nsottile\nspada\nspalla\nspargere\nspatola\nspavento\nspazzola\nspecie\nspedire\nspegnere\nspelatura\nsperanza\nspessore\nspettrale\nspezzato\nspia\nspigoloso\nspillato\nspinoso\nspirale\nsplendido\nsportivo\nsposo\nspranga\nsprecare\nspronato\nspruzzo\nspuntino\nsquillo\nsradicare\nsrotolato\nstabile\nstacco\nstaffa\nstagnare\nstampato\nstantio\nstarnuto\nstasera\nstatuto\nstelo\nsteppa\nsterzo\nstiletto\nstima\nstirpe\nstivale\nstizzoso\nstonato\nstorico\nstrappo\nstregato\nstridulo\nstrozzare\nstrutto\nstuccare\nstufo\nstupendo\nsubentro\nsuccoso\nsudore\nsuggerito\nsugo\nsultano\nsuonare\nsuperbo\nsupporto\nsurgelato\nsurrogato\nsussurro\nsutura\nsvagare\nsvedese\nsveglio\nsvelare\nsvenuto\nsvezia\nsviluppo\nsvista\nsvizzera\nsvolta\nsvuotare\ntabacco\ntabulato\ntacciare\ntaciturno\ntale\ntalismano\ntampone\ntannino\ntara\ntardivo\ntargato\ntariffa\ntarpare\ntartaruga\ntasto\ntattico\ntaverna\ntavolata\ntazza\nteca\ntecnico\ntelefono\ntemerario\ntempo\ntemuto\ntendone\ntenero\ntensione\ntentacolo\nteorema\nterme\nterrazzo\nterzetto\ntesi\ntesserato\ntestato\ntetro\ntettoia\ntifare\ntigella\ntimbro\ntinto\ntipico\ntipografo\ntiraggio\ntiro\ntitanio\ntitolo\ntitubante\ntizio\ntizzone\ntoccare\ntollerare\ntolto\ntombola\ntomo\ntonfo\ntonsilla\ntopazio\ntopologia\ntoppa\ntorba\ntornare\ntorrone\ntortora\ntoscano\ntossire\ntostatura\ntotano\ntrabocco\ntrachea\ntrafila\ntragedia\ntralcio\ntramonto\ntransito\ntrapano\ntrarre\ntrasloco\ntrattato\ntrave\ntreccia\ntremolio\ntrespolo\ntributo\ntricheco\ntrifoglio\ntrillo\ntrincea\ntrio\ntristezza\ntriturato\ntrivella\ntromba\ntrono\ntroppo\ntrottola\ntrovare\ntruccato\ntubatura\ntuffato\ntulipano\ntumulto\ntunisia\nturbare\nturchino\ntuta\ntutela\nubicato\nuccello\nuccisore\nudire\nuditivo\nuffa\nufficio\nuguale\nulisse\nultimato\numano\numile\numorismo\nuncinetto\nungere\nungherese\nunicorno\nunificato\nunisono\nunitario\nunte\nuovo\nupupa\nuragano\nurgenza\nurlo\nusanza\nusato\nuscito\nusignolo\nusuraio\nutensile\nutilizzo\nutopia\nvacante\nvaccinato\nvagabondo\nvagliato\nvalanga\nvalgo\nvalico\nvalletta\nvaloroso\nvalutare\nvalvola\nvampata\nvangare\nvanitoso\nvano\nvantaggio\nvanvera\nvapore\nvarano\nvarcato\nvariante\nvasca\nvedetta\nvedova\nveduto\nvegetale\nveicolo\nvelcro\nvelina\nvelluto\nveloce\nvenato\nvendemmia\nvento\nverace\nverbale\nvergogna\nverifica\nvero\nverruca\nverticale\nvescica\nvessillo\nvestale\nveterano\nvetrina\nvetusto\nviandante\nvibrante\nvicenda\nvichingo\nvicinanza\nvidimare\nvigilia\nvigneto\nvigore\nvile\nvillano\nvimini\nvincitore\nviola\nvipera\nvirgola\nvirologo\nvirulento\nviscoso\nvisione\nvispo\nvissuto\nvisura\nvita\nvitello\nvittima\nvivanda\nvivido\nviziare\nvoce\nvoga\nvolatile\nvolere\nvolpe\nvoragine\nvulcano\nzampogna\nzanna\nzappato\nzattera\nzavorra\nzefiro\nzelante\nzelo\nzenzero\nzerbino\nzibetto\nzinco\nzircone\nzitto\nzolla\nzotico\nzucchero\nzufolo\nzulu\nzuppa\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/japanese.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/japanese.txt\n\t// $ crc32 japanese.txt\n\t// 0acc1419\n\tchecksum := crc32.ChecksumIEEE([]byte(japanese))\n\tif fmt.Sprintf(\"%x\", checksum) != \"acc1419\" {\n\t\tpanic(fmt.Sprintf(\"japanese checksum invalid: %x\", checksum))\n\t}\n}\n\n// Japanese is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/japanese.txt\nvar (\n\tJapanese = strings.Split(strings.TrimSpace(japanese), \"\\n\")\n\tjapanese = `あいこくしん\nあいさつ\nあいだ\nあおぞら\nあかちゃん\nあきる\nあけがた\nあける\nあこがれる\nあさい\nあさひ\nあしあと\nあじわう\nあずかる\nあずき\nあそぶ\nあたえる\nあたためる\nあたりまえ\nあたる\nあつい\nあつかう\nあっしゅく\nあつまり\nあつめる\nあてな\nあてはまる\nあひる\nあぶら\nあぶる\nあふれる\nあまい\nあまど\nあまやかす\nあまり\nあみもの\nあめりか\nあやまる\nあゆむ\nあらいぐま\nあらし\nあらすじ\nあらためる\nあらゆる\nあらわす\nありがとう\nあわせる\nあわてる\nあんい\nあんがい\nあんこ\nあんぜん\nあんてい\nあんない\nあんまり\nいいだす\nいおん\nいがい\nいがく\nいきおい\nいきなり\nいきもの\nいきる\nいくじ\nいくぶん\nいけばな\nいけん\nいこう\nいこく\nいこつ\nいさましい\nいさん\nいしき\nいじゅう\nいじょう\nいじわる\nいずみ\nいずれ\nいせい\nいせえび\nいせかい\nいせき\nいぜん\nいそうろう\nいそがしい\nいだい\nいだく\nいたずら\nいたみ\nいたりあ\nいちおう\nいちじ\nいちど\nいちば\nいちぶ\nいちりゅう\nいつか\nいっしゅん\nいっせい\nいっそう\nいったん\nいっち\nいってい\nいっぽう\nいてざ\nいてん\nいどう\nいとこ\nいない\nいなか\nいねむり\nいのち\nいのる\nいはつ\nいばる\nいはん\nいびき\nいひん\nいふく\nいへん\nいほう\nいみん\nいもうと\nいもたれ\nいもり\nいやがる\nいやす\nいよかん\nいよく\nいらい\nいらすと\nいりぐち\nいりょう\nいれい\nいれもの\nいれる\nいろえんぴつ\nいわい\nいわう\nいわかん\nいわば\nいわゆる\nいんげんまめ\nいんさつ\nいんしょう\nいんよう\nうえき\nうえる\nうおざ\nうがい\nうかぶ\nうかべる\nうきわ\nうくらいな\nうくれれ\nうけたまわる\nうけつけ\nうけとる\nうけもつ\nうける\nうごかす\nうごく\nうこん\nうさぎ\nうしなう\nうしろがみ\nうすい\nうすぎ\nうすぐらい\nうすめる\nうせつ\nうちあわせ\nうちがわ\nうちき\nうちゅう\nうっかり\nうつくしい\nうったえる\nうつる\nうどん\nうなぎ\nうなじ\nうなずく\nうなる\nうねる\nうのう\nうぶげ\nうぶごえ\nうまれる\nうめる\nうもう\nうやまう\nうよく\nうらがえす\nうらぐち\nうらない\nうりあげ\nうりきれ\nうるさい\nうれしい\nうれゆき\nうれる\nうろこ\nうわき\nうわさ\nうんこう\nうんちん\nうんてん\nうんどう\nえいえん\nえいが\nえいきょう\nえいご\nえいせい\nえいぶん\nえいよう\nえいわ\nえおり\nえがお\nえがく\nえきたい\nえくせる\nえしゃく\nえすて\nえつらん\nえのぐ\nえほうまき\nえほん\nえまき\nえもじ\nえもの\nえらい\nえらぶ\nえりあ\nえんえん\nえんかい\nえんぎ\nえんげき\nえんしゅう\nえんぜつ\nえんそく\nえんちょう\nえんとつ\nおいかける\nおいこす\nおいしい\nおいつく\nおうえん\nおうさま\nおうじ\nおうせつ\nおうたい\nおうふく\nおうべい\nおうよう\nおえる\nおおい\nおおう\nおおどおり\nおおや\nおおよそ\nおかえり\nおかず\nおがむ\nおかわり\nおぎなう\nおきる\nおくさま\nおくじょう\nおくりがな\nおくる\nおくれる\nおこす\nおこなう\nおこる\nおさえる\nおさない\nおさめる\nおしいれ\nおしえる\nおじぎ\nおじさん\nおしゃれ\nおそらく\nおそわる\nおたがい\nおたく\nおだやか\nおちつく\nおっと\nおつり\nおでかけ\nおとしもの\nおとなしい\nおどり\nおどろかす\nおばさん\nおまいり\nおめでとう\nおもいで\nおもう\nおもたい\nおもちゃ\nおやつ\nおやゆび\nおよぼす\nおらんだ\nおろす\nおんがく\nおんけい\nおんしゃ\nおんせん\nおんだん\nおんちゅう\nおんどけい\nかあつ\nかいが\nがいき\nがいけん\nがいこう\nかいさつ\nかいしゃ\nかいすいよく\nかいぜん\nかいぞうど\nかいつう\nかいてん\nかいとう\nかいふく\nがいへき\nかいほう\nかいよう\nがいらい\nかいわ\nかえる\nかおり\nかかえる\nかがく\nかがし\nかがみ\nかくご\nかくとく\nかざる\nがぞう\nかたい\nかたち\nがちょう\nがっきゅう\nがっこう\nがっさん\nがっしょう\nかなざわし\nかのう\nがはく\nかぶか\nかほう\nかほご\nかまう\nかまぼこ\nかめれおん\nかゆい\nかようび\nからい\nかるい\nかろう\nかわく\nかわら\nがんか\nかんけい\nかんこう\nかんしゃ\nかんそう\nかんたん\nかんち\nがんばる\nきあい\nきあつ\nきいろ\nぎいん\nきうい\nきうん\nきえる\nきおう\nきおく\nきおち\nきおん\nきかい\nきかく\nきかんしゃ\nききて\nきくばり\nきくらげ\nきけんせい\nきこう\nきこえる\nきこく\nきさい\nきさく\nきさま\nきさらぎ\nぎじかがく\nぎしき\nぎじたいけん\nぎじにってい\nぎじゅつしゃ\nきすう\nきせい\nきせき\nきせつ\nきそう\nきぞく\nきぞん\nきたえる\nきちょう\nきつえん\nぎっちり\nきつつき\nきつね\nきてい\nきどう\nきどく\nきない\nきなが\nきなこ\nきぬごし\nきねん\nきのう\nきのした\nきはく\nきびしい\nきひん\nきふく\nきぶん\nきぼう\nきほん\nきまる\nきみつ\nきむずかしい\nきめる\nきもだめし\nきもち\nきもの\nきゃく\nきやく\nぎゅうにく\nきよう\nきょうりゅう\nきらい\nきらく\nきりん\nきれい\nきれつ\nきろく\nぎろん\nきわめる\nぎんいろ\nきんかくじ\nきんじょ\nきんようび\nぐあい\nくいず\nくうかん\nくうき\nくうぐん\nくうこう\nぐうせい\nくうそう\nぐうたら\nくうふく\nくうぼ\nくかん\nくきょう\nくげん\nぐこう\nくさい\nくさき\nくさばな\nくさる\nくしゃみ\nくしょう\nくすのき\nくすりゆび\nくせげ\nくせん\nぐたいてき\nくださる\nくたびれる\nくちこみ\nくちさき\nくつした\nぐっすり\nくつろぐ\nくとうてん\nくどく\nくなん\nくねくね\nくのう\nくふう\nくみあわせ\nくみたてる\nくめる\nくやくしょ\nくらす\nくらべる\nくるま\nくれる\nくろう\nくわしい\nぐんかん\nぐんしょく\nぐんたい\nぐんて\nけあな\nけいかく\nけいけん\nけいこ\nけいさつ\nげいじゅつ\nけいたい\nげいのうじん\nけいれき\nけいろ\nけおとす\nけおりもの\nげきか\nげきげん\nげきだん\nげきちん\nげきとつ\nげきは\nげきやく\nげこう\nげこくじょう\nげざい\nけさき\nげざん\nけしき\nけしごむ\nけしょう\nげすと\nけたば\nけちゃっぷ\nけちらす\nけつあつ\nけつい\nけつえき\nけっこん\nけつじょ\nけっせき\nけってい\nけつまつ\nげつようび\nげつれい\nけつろん\nげどく\nけとばす\nけとる\nけなげ\nけなす\nけなみ\nけぬき\nげねつ\nけねん\nけはい\nげひん\nけぶかい\nげぼく\nけまり\nけみかる\nけむし\nけむり\nけもの\nけらい\nけろけろ\nけわしい\nけんい\nけんえつ\nけんお\nけんか\nげんき\nけんげん\nけんこう\nけんさく\nけんしゅう\nけんすう\nげんそう\nけんちく\nけんてい\nけんとう\nけんない\nけんにん\nげんぶつ\nけんま\nけんみん\nけんめい\nけんらん\nけんり\nこあくま\nこいぬ\nこいびと\nごうい\nこうえん\nこうおん\nこうかん\nごうきゅう\nごうけい\nこうこう\nこうさい\nこうじ\nこうすい\nごうせい\nこうそく\nこうたい\nこうちゃ\nこうつう\nこうてい\nこうどう\nこうない\nこうはい\nごうほう\nごうまん\nこうもく\nこうりつ\nこえる\nこおり\nごかい\nごがつ\nごかん\nこくご\nこくさい\nこくとう\nこくない\nこくはく\nこぐま\nこけい\nこける\nここのか\nこころ\nこさめ\nこしつ\nこすう\nこせい\nこせき\nこぜん\nこそだて\nこたい\nこたえる\nこたつ\nこちょう\nこっか\nこつこつ\nこつばん\nこつぶ\nこてい\nこてん\nことがら\nことし\nことば\nことり\nこなごな\nこねこね\nこのまま\nこのみ\nこのよ\nごはん\nこひつじ\nこふう\nこふん\nこぼれる\nごまあぶら\nこまかい\nごますり\nこまつな\nこまる\nこむぎこ\nこもじ\nこもち\nこもの\nこもん\nこやく\nこやま\nこゆう\nこゆび\nこよい\nこよう\nこりる\nこれくしょん\nころっけ\nこわもて\nこわれる\nこんいん\nこんかい\nこんき\nこんしゅう\nこんすい\nこんだて\nこんとん\nこんなん\nこんびに\nこんぽん\nこんまけ\nこんや\nこんれい\nこんわく\nざいえき\nさいかい\nさいきん\nざいげん\nざいこ\nさいしょ\nさいせい\nざいたく\nざいちゅう\nさいてき\nざいりょう\nさうな\nさかいし\nさがす\nさかな\nさかみち\nさがる\nさぎょう\nさくし\nさくひん\nさくら\nさこく\nさこつ\nさずかる\nざせき\nさたん\nさつえい\nざつおん\nざっか\nざつがく\nさっきょく\nざっし\nさつじん\nざっそう\nさつたば\nさつまいも\nさてい\nさといも\nさとう\nさとおや\nさとし\nさとる\nさのう\nさばく\nさびしい\nさべつ\nさほう\nさほど\nさます\nさみしい\nさみだれ\nさむけ\nさめる\nさやえんどう\nさゆう\nさよう\nさよく\nさらだ\nざるそば\nさわやか\nさわる\nさんいん\nさんか\nさんきゃく\nさんこう\nさんさい\nざんしょ\nさんすう\nさんせい\nさんそ\nさんち\nさんま\nさんみ\nさんらん\nしあい\nしあげ\nしあさって\nしあわせ\nしいく\nしいん\nしうち\nしえい\nしおけ\nしかい\nしかく\nじかん\nしごと\nしすう\nじだい\nしたうけ\nしたぎ\nしたて\nしたみ\nしちょう\nしちりん\nしっかり\nしつじ\nしつもん\nしてい\nしてき\nしてつ\nじてん\nじどう\nしなぎれ\nしなもの\nしなん\nしねま\nしねん\nしのぐ\nしのぶ\nしはい\nしばかり\nしはつ\nしはらい\nしはん\nしひょう\nしふく\nじぶん\nしへい\nしほう\nしほん\nしまう\nしまる\nしみん\nしむける\nじむしょ\nしめい\nしめる\nしもん\nしゃいん\nしゃうん\nしゃおん\nじゃがいも\nしやくしょ\nしゃくほう\nしゃけん\nしゃこ\nしゃざい\nしゃしん\nしゃせん\nしゃそう\nしゃたい\nしゃちょう\nしゃっきん\nじゃま\nしゃりん\nしゃれい\nじゆう\nじゅうしょ\nしゅくはく\nじゅしん\nしゅっせき\nしゅみ\nしゅらば\nじゅんばん\nしょうかい\nしょくたく\nしょっけん\nしょどう\nしょもつ\nしらせる\nしらべる\nしんか\nしんこう\nじんじゃ\nしんせいじ\nしんちく\nしんりん\nすあげ\nすあし\nすあな\nずあん\nすいえい\nすいか\nすいとう\nずいぶん\nすいようび\nすうがく\nすうじつ\nすうせん\nすおどり\nすきま\nすくう\nすくない\nすける\nすごい\nすこし\nずさん\nすずしい\nすすむ\nすすめる\nすっかり\nずっしり\nずっと\nすてき\nすてる\nすねる\nすのこ\nすはだ\nすばらしい\nずひょう\nずぶぬれ\nすぶり\nすふれ\nすべて\nすべる\nずほう\nすぼん\nすまい\nすめし\nすもう\nすやき\nすらすら\nするめ\nすれちがう\nすろっと\nすわる\nすんぜん\nすんぽう\nせあぶら\nせいかつ\nせいげん\nせいじ\nせいよう\nせおう\nせかいかん\nせきにん\nせきむ\nせきゆ\nせきらんうん\nせけん\nせこう\nせすじ\nせたい\nせたけ\nせっかく\nせっきゃく\nぜっく\nせっけん\nせっこつ\nせっさたくま\nせつぞく\nせつだん\nせつでん\nせっぱん\nせつび\nせつぶん\nせつめい\nせつりつ\nせなか\nせのび\nせはば\nせびろ\nせぼね\nせまい\nせまる\nせめる\nせもたれ\nせりふ\nぜんあく\nせんい\nせんえい\nせんか\nせんきょ\nせんく\nせんげん\nぜんご\nせんさい\nせんしゅ\nせんすい\nせんせい\nせんぞ\nせんたく\nせんちょう\nせんてい\nせんとう\nせんぬき\nせんねん\nせんぱい\nぜんぶ\nぜんぽう\nせんむ\nせんめんじょ\nせんもん\nせんやく\nせんゆう\nせんよう\nぜんら\nぜんりゃく\nせんれい\nせんろ\nそあく\nそいとげる\nそいね\nそうがんきょう\nそうき\nそうご\nそうしん\nそうだん\nそうなん\nそうび\nそうめん\nそうり\nそえもの\nそえん\nそがい\nそげき\nそこう\nそこそこ\nそざい\nそしな\nそせい\nそせん\nそそぐ\nそだてる\nそつう\nそつえん\nそっかん\nそつぎょう\nそっけつ\nそっこう\nそっせん\nそっと\nそとがわ\nそとづら\nそなえる\nそなた\nそふぼ\nそぼく\nそぼろ\nそまつ\nそまる\nそむく\nそむりえ\nそめる\nそもそも\nそよかぜ\nそらまめ\nそろう\nそんかい\nそんけい\nそんざい\nそんしつ\nそんぞく\nそんちょう\nぞんび\nぞんぶん\nそんみん\nたあい\nたいいん\nたいうん\nたいえき\nたいおう\nだいがく\nたいき\nたいぐう\nたいけん\nたいこ\nたいざい\nだいじょうぶ\nだいすき\nたいせつ\nたいそう\nだいたい\nたいちょう\nたいてい\nだいどころ\nたいない\nたいねつ\nたいのう\nたいはん\nだいひょう\nたいふう\nたいへん\nたいほ\nたいまつばな\nたいみんぐ\nたいむ\nたいめん\nたいやき\nたいよう\nたいら\nたいりょく\nたいる\nたいわん\nたうえ\nたえる\nたおす\nたおる\nたおれる\nたかい\nたかね\nたきび\nたくさん\nたこく\nたこやき\nたさい\nたしざん\nだじゃれ\nたすける\nたずさわる\nたそがれ\nたたかう\nたたく\nただしい\nたたみ\nたちばな\nだっかい\nだっきゃく\nだっこ\nだっしゅつ\nだったい\nたてる\nたとえる\nたなばた\nたにん\nたぬき\nたのしみ\nたはつ\nたぶん\nたべる\nたぼう\nたまご\nたまる\nだむる\nためいき\nためす\nためる\nたもつ\nたやすい\nたよる\nたらす\nたりきほんがん\nたりょう\nたりる\nたると\nたれる\nたれんと\nたろっと\nたわむれる\nだんあつ\nたんい\nたんおん\nたんか\nたんき\nたんけん\nたんご\nたんさん\nたんじょうび\nだんせい\nたんそく\nたんたい\nだんち\nたんてい\nたんとう\nだんな\nたんにん\nだんねつ\nたんのう\nたんぴん\nだんぼう\nたんまつ\nたんめい\nだんれつ\nだんろ\nだんわ\nちあい\nちあん\nちいき\nちいさい\nちえん\nちかい\nちから\nちきゅう\nちきん\nちけいず\nちけん\nちこく\nちさい\nちしき\nちしりょう\nちせい\nちそう\nちたい\nちたん\nちちおや\nちつじょ\nちてき\nちてん\nちぬき\nちぬり\nちのう\nちひょう\nちへいせん\nちほう\nちまた\nちみつ\nちみどろ\nちめいど\nちゃんこなべ\nちゅうい\nちゆりょく\nちょうし\nちょさくけん\nちらし\nちらみ\nちりがみ\nちりょう\nちるど\nちわわ\nちんたい\nちんもく\nついか\nついたち\nつうか\nつうじょう\nつうはん\nつうわ\nつかう\nつかれる\nつくね\nつくる\nつけね\nつける\nつごう\nつたえる\nつづく\nつつじ\nつつむ\nつとめる\nつながる\nつなみ\nつねづね\nつのる\nつぶす\nつまらない\nつまる\nつみき\nつめたい\nつもり\nつもる\nつよい\nつるぼ\nつるみく\nつわもの\nつわり\nてあし\nてあて\nてあみ\nていおん\nていか\nていき\nていけい\nていこく\nていさつ\nていし\nていせい\nていたい\nていど\nていねい\nていひょう\nていへん\nていぼう\nてうち\nておくれ\nてきとう\nてくび\nでこぼこ\nてさぎょう\nてさげ\nてすり\nてそう\nてちがい\nてちょう\nてつがく\nてつづき\nでっぱ\nてつぼう\nてつや\nでぬかえ\nてぬき\nてぬぐい\nてのひら\nてはい\nてぶくろ\nてふだ\nてほどき\nてほん\nてまえ\nてまきずし\nてみじか\nてみやげ\nてらす\nてれび\nてわけ\nてわたし\nでんあつ\nてんいん\nてんかい\nてんき\nてんぐ\nてんけん\nてんごく\nてんさい\nてんし\nてんすう\nでんち\nてんてき\nてんとう\nてんない\nてんぷら\nてんぼうだい\nてんめつ\nてんらんかい\nでんりょく\nでんわ\nどあい\nといれ\nどうかん\nとうきゅう\nどうぐ\nとうし\nとうむぎ\nとおい\nとおか\nとおく\nとおす\nとおる\nとかい\nとかす\nときおり\nときどき\nとくい\nとくしゅう\nとくてん\nとくに\nとくべつ\nとけい\nとける\nとこや\nとさか\nとしょかん\nとそう\nとたん\nとちゅう\nとっきゅう\nとっくん\nとつぜん\nとつにゅう\nとどける\nととのえる\nとない\nとなえる\nとなり\nとのさま\nとばす\nどぶがわ\nとほう\nとまる\nとめる\nともだち\nともる\nどようび\nとらえる\nとんかつ\nどんぶり\nないかく\nないこう\nないしょ\nないす\nないせん\nないそう\nなおす\nながい\nなくす\nなげる\nなこうど\nなさけ\nなたでここ\nなっとう\nなつやすみ\nななおし\nなにごと\nなにもの\nなにわ\nなのか\nなふだ\nなまいき\nなまえ\nなまみ\nなみだ\nなめらか\nなめる\nなやむ\nならう\nならび\nならぶ\nなれる\nなわとび\nなわばり\nにあう\nにいがた\nにうけ\nにおい\nにかい\nにがて\nにきび\nにくしみ\nにくまん\nにげる\nにさんかたんそ\nにしき\nにせもの\nにちじょう\nにちようび\nにっか\nにっき\nにっけい\nにっこう\nにっさん\nにっしょく\nにっすう\nにっせき\nにってい\nになう\nにほん\nにまめ\nにもつ\nにやり\nにゅういん\nにりんしゃ\nにわとり\nにんい\nにんか\nにんき\nにんげん\nにんしき\nにんずう\nにんそう\nにんたい\nにんち\nにんてい\nにんにく\nにんぷ\nにんまり\nにんむ\nにんめい\nにんよう\nぬいくぎ\nぬかす\nぬぐいとる\nぬぐう\nぬくもり\nぬすむ\nぬまえび\nぬめり\nぬらす\nぬんちゃく\nねあげ\nねいき\nねいる\nねいろ\nねぐせ\nねくたい\nねくら\nねこぜ\nねこむ\nねさげ\nねすごす\nねそべる\nねだん\nねつい\nねっしん\nねつぞう\nねったいぎょ\nねぶそく\nねふだ\nねぼう\nねほりはほり\nねまき\nねまわし\nねみみ\nねむい\nねむたい\nねもと\nねらう\nねわざ\nねんいり\nねんおし\nねんかん\nねんきん\nねんぐ\nねんざ\nねんし\nねんちゃく\nねんど\nねんぴ\nねんぶつ\nねんまつ\nねんりょう\nねんれい\nのいず\nのおづま\nのがす\nのきなみ\nのこぎり\nのこす\nのこる\nのせる\nのぞく\nのぞむ\nのたまう\nのちほど\nのっく\nのばす\nのはら\nのべる\nのぼる\nのみもの\nのやま\nのらいぬ\nのらねこ\nのりもの\nのりゆき\nのれん\nのんき\nばあい\nはあく\nばあさん\nばいか\nばいく\nはいけん\nはいご\nはいしん\nはいすい\nはいせん\nはいそう\nはいち\nばいばい\nはいれつ\nはえる\nはおる\nはかい\nばかり\nはかる\nはくしゅ\nはけん\nはこぶ\nはさみ\nはさん\nはしご\nばしょ\nはしる\nはせる\nぱそこん\nはそん\nはたん\nはちみつ\nはつおん\nはっかく\nはづき\nはっきり\nはっくつ\nはっけん\nはっこう\nはっさん\nはっしん\nはったつ\nはっちゅう\nはってん\nはっぴょう\nはっぽう\nはなす\nはなび\nはにかむ\nはぶらし\nはみがき\nはむかう\nはめつ\nはやい\nはやし\nはらう\nはろうぃん\nはわい\nはんい\nはんえい\nはんおん\nはんかく\nはんきょう\nばんぐみ\nはんこ\nはんしゃ\nはんすう\nはんだん\nぱんち\nぱんつ\nはんてい\nはんとし\nはんのう\nはんぱ\nはんぶん\nはんぺん\nはんぼうき\nはんめい\nはんらん\nはんろん\nひいき\nひうん\nひえる\nひかく\nひかり\nひかる\nひかん\nひくい\nひけつ\nひこうき\nひこく\nひさい\nひさしぶり\nひさん\nびじゅつかん\nひしょ\nひそか\nひそむ\nひたむき\nひだり\nひたる\nひつぎ\nひっこし\nひっし\nひつじゅひん\nひっす\nひつぜん\nぴったり\nぴっちり\nひつよう\nひてい\nひとごみ\nひなまつり\nひなん\nひねる\nひはん\nひびく\nひひょう\nひほう\nひまわり\nひまん\nひみつ\nひめい\nひめじし\nひやけ\nひやす\nひよう\nびょうき\nひらがな\nひらく\nひりつ\nひりょう\nひるま\nひるやすみ\nひれい\nひろい\nひろう\nひろき\nひろゆき\nひんかく\nひんけつ\nひんこん\nひんしゅ\nひんそう\nぴんち\nひんぱん\nびんぼう\nふあん\nふいうち\nふうけい\nふうせん\nぷうたろう\nふうとう\nふうふ\nふえる\nふおん\nふかい\nふきん\nふくざつ\nふくぶくろ\nふこう\nふさい\nふしぎ\nふじみ\nふすま\nふせい\nふせぐ\nふそく\nぶたにく\nふたん\nふちょう\nふつう\nふつか\nふっかつ\nふっき\nふっこく\nぶどう\nふとる\nふとん\nふのう\nふはい\nふひょう\nふへん\nふまん\nふみん\nふめつ\nふめん\nふよう\nふりこ\nふりる\nふるい\nふんいき\nぶんがく\nぶんぐ\nふんしつ\nぶんせき\nふんそう\nぶんぽう\nへいあん\nへいおん\nへいがい\nへいき\nへいげん\nへいこう\nへいさ\nへいしゃ\nへいせつ\nへいそ\nへいたく\nへいてん\nへいねつ\nへいわ\nへきが\nへこむ\nべにいろ\nべにしょうが\nへらす\nへんかん\nべんきょう\nべんごし\nへんさい\nへんたい\nべんり\nほあん\nほいく\nぼうぎょ\nほうこく\nほうそう\nほうほう\nほうもん\nほうりつ\nほえる\nほおん\nほかん\nほきょう\nぼきん\nほくろ\nほけつ\nほけん\nほこう\nほこる\nほしい\nほしつ\nほしゅ\nほしょう\nほせい\nほそい\nほそく\nほたて\nほたる\nぽちぶくろ\nほっきょく\nほっさ\nほったん\nほとんど\nほめる\nほんい\nほんき\nほんけ\nほんしつ\nほんやく\nまいにち\nまかい\nまかせる\nまがる\nまける\nまこと\nまさつ\nまじめ\nますく\nまぜる\nまつり\nまとめ\nまなぶ\nまぬけ\nまねく\nまほう\nまもる\nまゆげ\nまよう\nまろやか\nまわす\nまわり\nまわる\nまんが\nまんきつ\nまんぞく\nまんなか\nみいら\nみうち\nみえる\nみがく\nみかた\nみかん\nみけん\nみこん\nみじかい\nみすい\nみすえる\nみせる\nみっか\nみつかる\nみつける\nみてい\nみとめる\nみなと\nみなみかさい\nみねらる\nみのう\nみのがす\nみほん\nみもと\nみやげ\nみらい\nみりょく\nみわく\nみんか\nみんぞく\nむいか\nむえき\nむえん\nむかい\nむかう\nむかえ\nむかし\nむぎちゃ\nむける\nむげん\nむさぼる\nむしあつい\nむしば\nむじゅん\nむしろ\nむすう\nむすこ\nむすぶ\nむすめ\nむせる\nむせん\nむちゅう\nむなしい\nむのう\nむやみ\nむよう\nむらさき\nむりょう\nむろん\nめいあん\nめいうん\nめいえん\nめいかく\nめいきょく\nめいさい\nめいし\nめいそう\nめいぶつ\nめいれい\nめいわく\nめぐまれる\nめざす\nめした\nめずらしい\nめだつ\nめまい\nめやす\nめんきょ\nめんせき\nめんどう\nもうしあげる\nもうどうけん\nもえる\nもくし\nもくてき\nもくようび\nもちろん\nもどる\nもらう\nもんく\nもんだい\nやおや\nやける\nやさい\nやさしい\nやすい\nやすたろう\nやすみ\nやせる\nやそう\nやたい\nやちん\nやっと\nやっぱり\nやぶる\nやめる\nややこしい\nやよい\nやわらかい\nゆうき\nゆうびんきょく\nゆうべ\nゆうめい\nゆけつ\nゆしゅつ\nゆせん\nゆそう\nゆたか\nゆちゃく\nゆでる\nゆにゅう\nゆびわ\nゆらい\nゆれる\nようい\nようか\nようきゅう\nようじ\nようす\nようちえん\nよかぜ\nよかん\nよきん\nよくせい\nよくぼう\nよけい\nよごれる\nよさん\nよしゅう\nよそう\nよそく\nよっか\nよてい\nよどがわく\nよねつ\nよやく\nよゆう\nよろこぶ\nよろしい\nらいう\nらくがき\nらくご\nらくさつ\nらくだ\nらしんばん\nらせん\nらぞく\nらたい\nらっか\nられつ\nりえき\nりかい\nりきさく\nりきせつ\nりくぐん\nりくつ\nりけん\nりこう\nりせい\nりそう\nりそく\nりてん\nりねん\nりゆう\nりゅうがく\nりよう\nりょうり\nりょかん\nりょくちゃ\nりょこう\nりりく\nりれき\nりろん\nりんご\nるいけい\nるいさい\nるいじ\nるいせき\nるすばん\nるりがわら\nれいかん\nれいぎ\nれいせい\nれいぞうこ\nれいとう\nれいぼう\nれきし\nれきだい\nれんあい\nれんけい\nれんこん\nれんさい\nれんしゅう\nれんぞく\nれんらく\nろうか\nろうご\nろうじん\nろうそく\nろくが\nろこつ\nろじうら\nろしゅつ\nろせん\nろてん\nろめん\nろれつ\nろんぎ\nろんぱ\nろんぶん\nろんり\nわかす\nわかめ\nわかやま\nわかれる\nわしつ\nわじまし\nわすれもの\nわらう\nわれる\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/korean.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/korean.txt\n\t// $ crc32 korean.txt\n\t// 4ef461eb\n\tchecksum := crc32.ChecksumIEEE([]byte(korean))\n\tif fmt.Sprintf(\"%x\", checksum) != \"4ef461eb\" {\n\t\tpanic(\"korean checksum invalid\")\n\t}\n}\n\n// Korean is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/korean.txt\nvar (\n\tKorean = strings.Split(strings.TrimSpace(korean), \"\\n\")\n\tkorean = `가격\n가끔\n가난\n가능\n가득\n가르침\n가뭄\n가방\n가상\n가슴\n가운데\n가을\n가이드\n가입\n가장\n가정\n가족\n가죽\n각오\n각자\n간격\n간부\n간섭\n간장\n간접\n간판\n갈등\n갈비\n갈색\n갈증\n감각\n감기\n감소\n감수성\n감자\n감정\n갑자기\n강남\n강당\n강도\n강력히\n강변\n강북\n강사\n강수량\n강아지\n강원도\n강의\n강제\n강조\n같이\n개구리\n개나리\n개방\n개별\n개선\n개성\n개인\n객관적\n거실\n거액\n거울\n거짓\n거품\n걱정\n건강\n건물\n건설\n건조\n건축\n걸음\n검사\n검토\n게시판\n게임\n겨울\n견해\n결과\n결국\n결론\n결석\n결승\n결심\n결정\n결혼\n경계\n경고\n경기\n경력\n경복궁\n경비\n경상도\n경영\n경우\n경쟁\n경제\n경주\n경찰\n경치\n경향\n경험\n계곡\n계단\n계란\n계산\n계속\n계약\n계절\n계층\n계획\n고객\n고구려\n고궁\n고급\n고등학생\n고무신\n고민\n고양이\n고장\n고전\n고집\n고춧가루\n고통\n고향\n곡식\n골목\n골짜기\n골프\n공간\n공개\n공격\n공군\n공급\n공기\n공동\n공무원\n공부\n공사\n공식\n공업\n공연\n공원\n공장\n공짜\n공책\n공통\n공포\n공항\n공휴일\n과목\n과일\n과장\n과정\n과학\n관객\n관계\n관광\n관념\n관람\n관련\n관리\n관습\n관심\n관점\n관찰\n광경\n광고\n광장\n광주\n괴로움\n굉장히\n교과서\n교문\n교복\n교실\n교양\n교육\n교장\n교직\n교통\n교환\n교훈\n구경\n구름\n구멍\n구별\n구분\n구석\n구성\n구속\n구역\n구입\n구청\n구체적\n국가\n국기\n국내\n국립\n국물\n국민\n국수\n국어\n국왕\n국적\n국제\n국회\n군대\n군사\n군인\n궁극적\n권리\n권위\n권투\n귀국\n귀신\n규정\n규칙\n균형\n그날\n그냥\n그늘\n그러나\n그룹\n그릇\n그림\n그제서야\n그토록\n극복\n극히\n근거\n근교\n근래\n근로\n근무\n근본\n근원\n근육\n근처\n글씨\n글자\n금강산\n금고\n금년\n금메달\n금액\n금연\n금요일\n금지\n긍정적\n기간\n기관\n기념\n기능\n기독교\n기둥\n기록\n기름\n기법\n기본\n기분\n기쁨\n기숙사\n기술\n기억\n기업\n기온\n기운\n기원\n기적\n기준\n기침\n기혼\n기획\n긴급\n긴장\n길이\n김밥\n김치\n김포공항\n깍두기\n깜빡\n깨달음\n깨소금\n껍질\n꼭대기\n꽃잎\n나들이\n나란히\n나머지\n나물\n나침반\n나흘\n낙엽\n난방\n날개\n날씨\n날짜\n남녀\n남대문\n남매\n남산\n남자\n남편\n남학생\n낭비\n낱말\n내년\n내용\n내일\n냄비\n냄새\n냇물\n냉동\n냉면\n냉방\n냉장고\n넥타이\n넷째\n노동\n노란색\n노력\n노인\n녹음\n녹차\n녹화\n논리\n논문\n논쟁\n놀이\n농구\n농담\n농민\n농부\n농업\n농장\n농촌\n높이\n눈동자\n눈물\n눈썹\n뉴욕\n느낌\n늑대\n능동적\n능력\n다방\n다양성\n다음\n다이어트\n다행\n단계\n단골\n단독\n단맛\n단순\n단어\n단위\n단점\n단체\n단추\n단편\n단풍\n달걀\n달러\n달력\n달리\n닭고기\n담당\n담배\n담요\n담임\n답변\n답장\n당근\n당분간\n당연히\n당장\n대규모\n대낮\n대단히\n대답\n대도시\n대략\n대량\n대륙\n대문\n대부분\n대신\n대응\n대장\n대전\n대접\n대중\n대책\n대출\n대충\n대통령\n대학\n대한민국\n대합실\n대형\n덩어리\n데이트\n도대체\n도덕\n도둑\n도망\n도서관\n도심\n도움\n도입\n도자기\n도저히\n도전\n도중\n도착\n독감\n독립\n독서\n독일\n독창적\n동화책\n뒷모습\n뒷산\n딸아이\n마누라\n마늘\n마당\n마라톤\n마련\n마무리\n마사지\n마약\n마요네즈\n마을\n마음\n마이크\n마중\n마지막\n마찬가지\n마찰\n마흔\n막걸리\n막내\n막상\n만남\n만두\n만세\n만약\n만일\n만점\n만족\n만화\n많이\n말기\n말씀\n말투\n맘대로\n망원경\n매년\n매달\n매력\n매번\n매스컴\n매일\n매장\n맥주\n먹이\n먼저\n먼지\n멀리\n메일\n며느리\n며칠\n면담\n멸치\n명단\n명령\n명예\n명의\n명절\n명칭\n명함\n모금\n모니터\n모델\n모든\n모범\n모습\n모양\n모임\n모조리\n모집\n모퉁이\n목걸이\n목록\n목사\n목소리\n목숨\n목적\n목표\n몰래\n몸매\n몸무게\n몸살\n몸속\n몸짓\n몸통\n몹시\n무관심\n무궁화\n무더위\n무덤\n무릎\n무슨\n무엇\n무역\n무용\n무조건\n무지개\n무척\n문구\n문득\n문법\n문서\n문제\n문학\n문화\n물가\n물건\n물결\n물고기\n물론\n물리학\n물음\n물질\n물체\n미국\n미디어\n미사일\n미술\n미역\n미용실\n미움\n미인\n미팅\n미혼\n민간\n민족\n민주\n믿음\n밀가루\n밀리미터\n밑바닥\n바가지\n바구니\n바나나\n바늘\n바닥\n바닷가\n바람\n바이러스\n바탕\n박물관\n박사\n박수\n반대\n반드시\n반말\n반발\n반성\n반응\n반장\n반죽\n반지\n반찬\n받침\n발가락\n발걸음\n발견\n발달\n발레\n발목\n발바닥\n발생\n발음\n발자국\n발전\n발톱\n발표\n밤하늘\n밥그릇\n밥맛\n밥상\n밥솥\n방금\n방면\n방문\n방바닥\n방법\n방송\n방식\n방안\n방울\n방지\n방학\n방해\n방향\n배경\n배꼽\n배달\n배드민턴\n백두산\n백색\n백성\n백인\n백제\n백화점\n버릇\n버섯\n버튼\n번개\n번역\n번지\n번호\n벌금\n벌레\n벌써\n범위\n범인\n범죄\n법률\n법원\n법적\n법칙\n베이징\n벨트\n변경\n변동\n변명\n변신\n변호사\n변화\n별도\n별명\n별일\n병실\n병아리\n병원\n보관\n보너스\n보라색\n보람\n보름\n보상\n보안\n보자기\n보장\n보전\n보존\n보통\n보편적\n보험\n복도\n복사\n복숭아\n복습\n볶음\n본격적\n본래\n본부\n본사\n본성\n본인\n본질\n볼펜\n봉사\n봉지\n봉투\n부근\n부끄러움\n부담\n부동산\n부문\n부분\n부산\n부상\n부엌\n부인\n부작용\n부장\n부정\n부족\n부지런히\n부친\n부탁\n부품\n부회장\n북부\n북한\n분노\n분량\n분리\n분명\n분석\n분야\n분위기\n분필\n분홍색\n불고기\n불과\n불교\n불꽃\n불만\n불법\n불빛\n불안\n불이익\n불행\n브랜드\n비극\n비난\n비닐\n비둘기\n비디오\n비로소\n비만\n비명\n비밀\n비바람\n비빔밥\n비상\n비용\n비율\n비중\n비타민\n비판\n빌딩\n빗물\n빗방울\n빗줄기\n빛깔\n빨간색\n빨래\n빨리\n사건\n사계절\n사나이\n사냥\n사람\n사랑\n사립\n사모님\n사물\n사방\n사상\n사생활\n사설\n사슴\n사실\n사업\n사용\n사월\n사장\n사전\n사진\n사촌\n사춘기\n사탕\n사투리\n사흘\n산길\n산부인과\n산업\n산책\n살림\n살인\n살짝\n삼계탕\n삼국\n삼십\n삼월\n삼촌\n상관\n상금\n상대\n상류\n상반기\n상상\n상식\n상업\n상인\n상자\n상점\n상처\n상추\n상태\n상표\n상품\n상황\n새벽\n색깔\n색연필\n생각\n생명\n생물\n생방송\n생산\n생선\n생신\n생일\n생활\n서랍\n서른\n서명\n서민\n서비스\n서양\n서울\n서적\n서점\n서쪽\n서클\n석사\n석유\n선거\n선물\n선배\n선생\n선수\n선원\n선장\n선전\n선택\n선풍기\n설거지\n설날\n설렁탕\n설명\n설문\n설사\n설악산\n설치\n설탕\n섭씨\n성공\n성당\n성명\n성별\n성인\n성장\n성적\n성질\n성함\n세금\n세미나\n세상\n세월\n세종대왕\n세탁\n센터\n센티미터\n셋째\n소규모\n소극적\n소금\n소나기\n소년\n소득\n소망\n소문\n소설\n소속\n소아과\n소용\n소원\n소음\n소중히\n소지품\n소질\n소풍\n소형\n속담\n속도\n속옷\n손가락\n손길\n손녀\n손님\n손등\n손목\n손뼉\n손실\n손질\n손톱\n손해\n솔직히\n솜씨\n송아지\n송이\n송편\n쇠고기\n쇼핑\n수건\n수년\n수단\n수돗물\n수동적\n수면\n수명\n수박\n수상\n수석\n수술\n수시로\n수업\n수염\n수영\n수입\n수준\n수집\n수출\n수컷\n수필\n수학\n수험생\n수화기\n숙녀\n숙소\n숙제\n순간\n순서\n순수\n순식간\n순위\n숟가락\n술병\n술집\n숫자\n스님\n스물\n스스로\n스승\n스웨터\n스위치\n스케이트\n스튜디오\n스트레스\n스포츠\n슬쩍\n슬픔\n습관\n습기\n승객\n승리\n승부\n승용차\n승진\n시각\n시간\n시골\n시금치\n시나리오\n시댁\n시리즈\n시멘트\n시민\n시부모\n시선\n시설\n시스템\n시아버지\n시어머니\n시월\n시인\n시일\n시작\n시장\n시절\n시점\n시중\n시즌\n시집\n시청\n시합\n시험\n식구\n식기\n식당\n식량\n식료품\n식물\n식빵\n식사\n식생활\n식초\n식탁\n식품\n신고\n신규\n신념\n신문\n신발\n신비\n신사\n신세\n신용\n신제품\n신청\n신체\n신화\n실감\n실내\n실력\n실례\n실망\n실수\n실습\n실시\n실장\n실정\n실질적\n실천\n실체\n실컷\n실태\n실패\n실험\n실현\n심리\n심부름\n심사\n심장\n심정\n심판\n쌍둥이\n씨름\n씨앗\n아가씨\n아나운서\n아드님\n아들\n아쉬움\n아스팔트\n아시아\n아울러\n아저씨\n아줌마\n아직\n아침\n아파트\n아프리카\n아픔\n아홉\n아흔\n악기\n악몽\n악수\n안개\n안경\n안과\n안내\n안녕\n안동\n안방\n안부\n안주\n알루미늄\n알코올\n암시\n암컷\n압력\n앞날\n앞문\n애인\n애정\n액수\n앨범\n야간\n야단\n야옹\n약간\n약국\n약속\n약수\n약점\n약품\n약혼녀\n양념\n양력\n양말\n양배추\n양주\n양파\n어둠\n어려움\n어른\n어젯밤\n어쨌든\n어쩌다가\n어쩐지\n언니\n언덕\n언론\n언어\n얼굴\n얼른\n얼음\n얼핏\n엄마\n업무\n업종\n업체\n엉덩이\n엉망\n엉터리\n엊그제\n에너지\n에어컨\n엔진\n여건\n여고생\n여관\n여군\n여권\n여대생\n여덟\n여동생\n여든\n여론\n여름\n여섯\n여성\n여왕\n여인\n여전히\n여직원\n여학생\n여행\n역사\n역시\n역할\n연결\n연구\n연극\n연기\n연락\n연설\n연세\n연속\n연습\n연애\n연예인\n연인\n연장\n연주\n연출\n연필\n연합\n연휴\n열기\n열매\n열쇠\n열심히\n열정\n열차\n열흘\n염려\n엽서\n영국\n영남\n영상\n영양\n영역\n영웅\n영원히\n영하\n영향\n영혼\n영화\n옆구리\n옆방\n옆집\n예감\n예금\n예방\n예산\n예상\n예선\n예술\n예습\n예식장\n예약\n예전\n예절\n예정\n예컨대\n옛날\n오늘\n오락\n오랫동안\n오렌지\n오로지\n오른발\n오븐\n오십\n오염\n오월\n오전\n오직\n오징어\n오페라\n오피스텔\n오히려\n옥상\n옥수수\n온갖\n온라인\n온몸\n온종일\n온통\n올가을\n올림픽\n올해\n옷차림\n와이셔츠\n와인\n완성\n완전\n왕비\n왕자\n왜냐하면\n왠지\n외갓집\n외국\n외로움\n외삼촌\n외출\n외침\n외할머니\n왼발\n왼손\n왼쪽\n요금\n요일\n요즘\n요청\n용기\n용서\n용어\n우산\n우선\n우승\n우연히\n우정\n우체국\n우편\n운동\n운명\n운반\n운전\n운행\n울산\n울음\n움직임\n웃어른\n웃음\n워낙\n원고\n원래\n원서\n원숭이\n원인\n원장\n원피스\n월급\n월드컵\n월세\n월요일\n웨이터\n위반\n위법\n위성\n위원\n위험\n위협\n윗사람\n유난히\n유럽\n유명\n유물\n유산\n유적\n유치원\n유학\n유행\n유형\n육군\n육상\n육십\n육체\n은행\n음력\n음료\n음반\n음성\n음식\n음악\n음주\n의견\n의논\n의문\n의복\n의식\n의심\n의외로\n의욕\n의원\n의학\n이것\n이곳\n이념\n이놈\n이달\n이대로\n이동\n이렇게\n이력서\n이론적\n이름\n이민\n이발소\n이별\n이불\n이빨\n이상\n이성\n이슬\n이야기\n이용\n이웃\n이월\n이윽고\n이익\n이전\n이중\n이튿날\n이틀\n이혼\n인간\n인격\n인공\n인구\n인근\n인기\n인도\n인류\n인물\n인생\n인쇄\n인연\n인원\n인재\n인종\n인천\n인체\n인터넷\n인하\n인형\n일곱\n일기\n일단\n일대\n일등\n일반\n일본\n일부\n일상\n일생\n일손\n일요일\n일월\n일정\n일종\n일주일\n일찍\n일체\n일치\n일행\n일회용\n임금\n임무\n입대\n입력\n입맛\n입사\n입술\n입시\n입원\n입장\n입학\n자가용\n자격\n자극\n자동\n자랑\n자부심\n자식\n자신\n자연\n자원\n자율\n자전거\n자정\n자존심\n자판\n작가\n작년\n작성\n작업\n작용\n작은딸\n작품\n잔디\n잔뜩\n잔치\n잘못\n잠깐\n잠수함\n잠시\n잠옷\n잠자리\n잡지\n장관\n장군\n장기간\n장래\n장례\n장르\n장마\n장면\n장모\n장미\n장비\n장사\n장소\n장식\n장애인\n장인\n장점\n장차\n장학금\n재능\n재빨리\n재산\n재생\n재작년\n재정\n재채기\n재판\n재학\n재활용\n저것\n저고리\n저곳\n저녁\n저런\n저렇게\n저번\n저울\n저절로\n저축\n적극\n적당히\n적성\n적용\n적응\n전개\n전공\n전기\n전달\n전라도\n전망\n전문\n전반\n전부\n전세\n전시\n전용\n전자\n전쟁\n전주\n전철\n전체\n전통\n전혀\n전후\n절대\n절망\n절반\n절약\n절차\n점검\n점수\n점심\n점원\n점점\n점차\n접근\n접시\n접촉\n젓가락\n정거장\n정도\n정류장\n정리\n정말\n정면\n정문\n정반대\n정보\n정부\n정비\n정상\n정성\n정오\n정원\n정장\n정지\n정치\n정확히\n제공\n제과점\n제대로\n제목\n제발\n제법\n제삿날\n제안\n제일\n제작\n제주도\n제출\n제품\n제한\n조각\n조건\n조금\n조깅\n조명\n조미료\n조상\n조선\n조용히\n조절\n조정\n조직\n존댓말\n존재\n졸업\n졸음\n종교\n종로\n종류\n종소리\n종업원\n종종\n종합\n좌석\n죄인\n주관적\n주름\n주말\n주머니\n주먹\n주문\n주민\n주방\n주변\n주식\n주인\n주일\n주장\n주전자\n주택\n준비\n줄거리\n줄기\n줄무늬\n중간\n중계방송\n중국\n중년\n중단\n중독\n중반\n중부\n중세\n중소기업\n중순\n중앙\n중요\n중학교\n즉석\n즉시\n즐거움\n증가\n증거\n증권\n증상\n증세\n지각\n지갑\n지경\n지극히\n지금\n지급\n지능\n지름길\n지리산\n지방\n지붕\n지식\n지역\n지우개\n지원\n지적\n지점\n지진\n지출\n직선\n직업\n직원\n직장\n진급\n진동\n진로\n진료\n진리\n진짜\n진찰\n진출\n진통\n진행\n질문\n질병\n질서\n짐작\n집단\n집안\n집중\n짜증\n찌꺼기\n차남\n차라리\n차량\n차림\n차별\n차선\n차츰\n착각\n찬물\n찬성\n참가\n참기름\n참새\n참석\n참여\n참외\n참조\n찻잔\n창가\n창고\n창구\n창문\n창밖\n창작\n창조\n채널\n채점\n책가방\n책방\n책상\n책임\n챔피언\n처벌\n처음\n천국\n천둥\n천장\n천재\n천천히\n철도\n철저히\n철학\n첫날\n첫째\n청년\n청바지\n청소\n청춘\n체계\n체력\n체온\n체육\n체중\n체험\n초등학생\n초반\n초밥\n초상화\n초순\n초여름\n초원\n초저녁\n초점\n초청\n초콜릿\n촛불\n총각\n총리\n총장\n촬영\n최근\n최상\n최선\n최신\n최악\n최종\n추석\n추억\n추진\n추천\n추측\n축구\n축소\n축제\n축하\n출근\n출발\n출산\n출신\n출연\n출입\n출장\n출판\n충격\n충고\n충돌\n충분히\n충청도\n취업\n취직\n취향\n치약\n친구\n친척\n칠십\n칠월\n칠판\n침대\n침묵\n침실\n칫솔\n칭찬\n카메라\n카운터\n칼국수\n캐릭터\n캠퍼스\n캠페인\n커튼\n컨디션\n컬러\n컴퓨터\n코끼리\n코미디\n콘서트\n콜라\n콤플렉스\n콩나물\n쾌감\n쿠데타\n크림\n큰길\n큰딸\n큰소리\n큰아들\n큰어머니\n큰일\n큰절\n클래식\n클럽\n킬로\n타입\n타자기\n탁구\n탁자\n탄생\n태권도\n태양\n태풍\n택시\n탤런트\n터널\n터미널\n테니스\n테스트\n테이블\n텔레비전\n토론\n토마토\n토요일\n통계\n통과\n통로\n통신\n통역\n통일\n통장\n통제\n통증\n통합\n통화\n퇴근\n퇴원\n퇴직금\n튀김\n트럭\n특급\n특별\n특성\n특수\n특징\n특히\n튼튼히\n티셔츠\n파란색\n파일\n파출소\n판결\n판단\n판매\n판사\n팔십\n팔월\n팝송\n패션\n팩스\n팩시밀리\n팬티\n퍼센트\n페인트\n편견\n편의\n편지\n편히\n평가\n평균\n평생\n평소\n평양\n평일\n평화\n포스터\n포인트\n포장\n포함\n표면\n표정\n표준\n표현\n품목\n품질\n풍경\n풍속\n풍습\n프랑스\n프린터\n플라스틱\n피곤\n피망\n피아노\n필름\n필수\n필요\n필자\n필통\n핑계\n하느님\n하늘\n하드웨어\n하룻밤\n하반기\n하숙집\n하순\n하여튼\n하지만\n하천\n하품\n하필\n학과\n학교\n학급\n학기\n학년\n학력\n학번\n학부모\n학비\n학생\n학술\n학습\n학용품\n학원\n학위\n학자\n학점\n한계\n한글\n한꺼번에\n한낮\n한눈\n한동안\n한때\n한라산\n한마디\n한문\n한번\n한복\n한식\n한여름\n한쪽\n할머니\n할아버지\n할인\n함께\n함부로\n합격\n합리적\n항공\n항구\n항상\n항의\n해결\n해군\n해답\n해당\n해물\n해석\n해설\n해수욕장\n해안\n핵심\n핸드백\n햄버거\n햇볕\n햇살\n행동\n행복\n행사\n행운\n행위\n향기\n향상\n향수\n허락\n허용\n헬기\n현관\n현금\n현대\n현상\n현실\n현장\n현재\n현지\n혈액\n협력\n형부\n형사\n형수\n형식\n형제\n형태\n형편\n혜택\n호기심\n호남\n호랑이\n호박\n호텔\n호흡\n혹시\n홀로\n홈페이지\n홍보\n홍수\n홍차\n화면\n화분\n화살\n화요일\n화장\n화학\n확보\n확인\n확장\n확정\n환갑\n환경\n환영\n환율\n환자\n활기\n활동\n활발히\n활용\n활짝\n회견\n회관\n회복\n회색\n회원\n회장\n회전\n횟수\n횡단보도\n효율적\n후반\n후춧가루\n훈련\n훨씬\n휴식\n휴일\n흉내\n흐름\n흑백\n흑인\n흔적\n흔히\n흥미\n흥분\n희곡\n희망\n희생\n흰색\n힘껏\n`\n)\n"
  },
  {
    "path": "util/bip39/wordlists/spanish.go",
    "content": "package wordlists\n\nimport (\n\t\"fmt\"\n\t\"hash/crc32\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// Ensure word list is correct\n\t// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/spanish.txt\n\t// $ crc32 spanish.txt\n\t// 266e4f3d\n\tchecksum := crc32.ChecksumIEEE([]byte(spanish))\n\tif fmt.Sprintf(\"%x\", checksum) != \"266e4f3d\" {\n\t\tpanic(\"spanish checksum invalid\")\n\t}\n}\n\n// Spanish is a slice of mnemonic words taken from the bip39 specification\n// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/spanish.txt\nvar (\n\tSpanish = strings.Split(strings.TrimSpace(spanish), \"\\n\")\n\tspanish = `ábaco\nabdomen\nabeja\nabierto\nabogado\nabono\naborto\nabrazo\nabrir\nabuelo\nabuso\nacabar\nacademia\nacceso\nacción\naceite\nacelga\nacento\naceptar\nácido\naclarar\nacné\nacoger\nacoso\nactivo\nacto\nactriz\nactuar\nacudir\nacuerdo\nacusar\nadicto\nadmitir\nadoptar\nadorno\naduana\nadulto\naéreo\nafectar\nafición\nafinar\nafirmar\nágil\nagitar\nagonía\nagosto\nagotar\nagregar\nagrio\nagua\nagudo\náguila\naguja\nahogo\nahorro\naire\naislar\najedrez\najeno\najuste\nalacrán\nalambre\nalarma\nalba\nálbum\nalcalde\naldea\nalegre\nalejar\nalerta\naleta\nalfiler\nalga\nalgodón\naliado\naliento\nalivio\nalma\nalmeja\nalmíbar\naltar\nalteza\naltivo\nalto\naltura\nalumno\nalzar\namable\namante\namapola\namargo\namasar\námbar\námbito\nameno\namigo\namistad\namor\namparo\namplio\nancho\nanciano\nancla\nandar\nandén\nanemia\nángulo\nanillo\nánimo\nanís\nanotar\nantena\nantiguo\nantojo\nanual\nanular\nanuncio\nañadir\nañejo\naño\napagar\naparato\napetito\napio\naplicar\napodo\naporte\napoyo\naprender\naprobar\napuesta\napuro\narado\naraña\narar\nárbitro\nárbol\narbusto\narchivo\narco\narder\nardilla\narduo\nárea\nárido\naries\narmonía\narnés\naroma\narpa\narpón\narreglo\narroz\narruga\narte\nartista\nasa\nasado\nasalto\nascenso\nasegurar\naseo\nasesor\nasiento\nasilo\nasistir\nasno\nasombro\náspero\nastilla\nastro\nastuto\nasumir\nasunto\natajo\nataque\natar\natento\nateo\nático\natleta\nátomo\natraer\natroz\natún\naudaz\naudio\nauge\naula\naumento\nausente\nautor\naval\navance\navaro\nave\navellana\navena\navestruz\navión\naviso\nayer\nayuda\nayuno\nazafrán\nazar\nazote\nazúcar\nazufre\nazul\nbaba\nbabor\nbache\nbahía\nbaile\nbajar\nbalanza\nbalcón\nbalde\nbambú\nbanco\nbanda\nbaño\nbarba\nbarco\nbarniz\nbarro\nbáscula\nbastón\nbasura\nbatalla\nbatería\nbatir\nbatuta\nbaúl\nbazar\nbebé\nbebida\nbello\nbesar\nbeso\nbestia\nbicho\nbien\nbingo\nblanco\nbloque\nblusa\nboa\nbobina\nbobo\nboca\nbocina\nboda\nbodega\nboina\nbola\nbolero\nbolsa\nbomba\nbondad\nbonito\nbono\nbonsái\nborde\nborrar\nbosque\nbote\nbotín\nbóveda\nbozal\nbravo\nbrazo\nbrecha\nbreve\nbrillo\nbrinco\nbrisa\nbroca\nbroma\nbronce\nbrote\nbruja\nbrusco\nbruto\nbuceo\nbucle\nbueno\nbuey\nbufanda\nbufón\nbúho\nbuitre\nbulto\nburbuja\nburla\nburro\nbuscar\nbutaca\nbuzón\ncaballo\ncabeza\ncabina\ncabra\ncacao\ncadáver\ncadena\ncaer\ncafé\ncaída\ncaimán\ncaja\ncajón\ncal\ncalamar\ncalcio\ncaldo\ncalidad\ncalle\ncalma\ncalor\ncalvo\ncama\ncambio\ncamello\ncamino\ncampo\ncáncer\ncandil\ncanela\ncanguro\ncanica\ncanto\ncaña\ncañón\ncaoba\ncaos\ncapaz\ncapitán\ncapote\ncaptar\ncapucha\ncara\ncarbón\ncárcel\ncareta\ncarga\ncariño\ncarne\ncarpeta\ncarro\ncarta\ncasa\ncasco\ncasero\ncaspa\ncastor\ncatorce\ncatre\ncaudal\ncausa\ncazo\ncebolla\nceder\ncedro\ncelda\ncélebre\nceloso\ncélula\ncemento\nceniza\ncentro\ncerca\ncerdo\ncereza\ncero\ncerrar\ncerteza\ncésped\ncetro\nchacal\nchaleco\nchampú\nchancla\nchapa\ncharla\nchico\nchiste\nchivo\nchoque\nchoza\nchuleta\nchupar\nciclón\nciego\ncielo\ncien\ncierto\ncifra\ncigarro\ncima\ncinco\ncine\ncinta\nciprés\ncirco\nciruela\ncisne\ncita\nciudad\nclamor\nclan\nclaro\nclase\nclave\ncliente\nclima\nclínica\ncobre\ncocción\ncochino\ncocina\ncoco\ncódigo\ncodo\ncofre\ncoger\ncohete\ncojín\ncojo\ncola\ncolcha\ncolegio\ncolgar\ncolina\ncollar\ncolmo\ncolumna\ncombate\ncomer\ncomida\ncómodo\ncompra\nconde\nconejo\nconga\nconocer\nconsejo\ncontar\ncopa\ncopia\ncorazón\ncorbata\ncorcho\ncordón\ncorona\ncorrer\ncoser\ncosmos\ncosta\ncráneo\ncráter\ncrear\ncrecer\ncreído\ncrema\ncría\ncrimen\ncripta\ncrisis\ncromo\ncrónica\ncroqueta\ncrudo\ncruz\ncuadro\ncuarto\ncuatro\ncubo\ncubrir\ncuchara\ncuello\ncuento\ncuerda\ncuesta\ncueva\ncuidar\nculebra\nculpa\nculto\ncumbre\ncumplir\ncuna\ncuneta\ncuota\ncupón\ncúpula\ncurar\ncurioso\ncurso\ncurva\ncutis\ndama\ndanza\ndar\ndardo\ndátil\ndeber\ndébil\ndécada\ndecir\ndedo\ndefensa\ndefinir\ndejar\ndelfín\ndelgado\ndelito\ndemora\ndenso\ndental\ndeporte\nderecho\nderrota\ndesayuno\ndeseo\ndesfile\ndesnudo\ndestino\ndesvío\ndetalle\ndetener\ndeuda\ndía\ndiablo\ndiadema\ndiamante\ndiana\ndiario\ndibujo\ndictar\ndiente\ndieta\ndiez\ndifícil\ndigno\ndilema\ndiluir\ndinero\ndirecto\ndirigir\ndisco\ndiseño\ndisfraz\ndiva\ndivino\ndoble\ndoce\ndolor\ndomingo\ndon\ndonar\ndorado\ndormir\ndorso\ndos\ndosis\ndragón\ndroga\nducha\nduda\nduelo\ndueño\ndulce\ndúo\nduque\ndurar\ndureza\nduro\nébano\nebrio\nechar\neco\necuador\nedad\nedición\nedificio\neditor\neducar\nefecto\neficaz\neje\nejemplo\nelefante\nelegir\nelemento\nelevar\nelipse\nélite\nelixir\nelogio\neludir\nembudo\nemitir\nemoción\nempate\nempeño\nempleo\nempresa\nenano\nencargo\nenchufe\nencía\nenemigo\nenero\nenfado\nenfermo\nengaño\nenigma\nenlace\nenorme\nenredo\nensayo\nenseñar\nentero\nentrar\nenvase\nenvío\népoca\nequipo\nerizo\nescala\nescena\nescolar\nescribir\nescudo\nesencia\nesfera\nesfuerzo\nespada\nespejo\nespía\nesposa\nespuma\nesquí\nestar\neste\nestilo\nestufa\netapa\neterno\nética\netnia\nevadir\nevaluar\nevento\nevitar\nexacto\nexamen\nexceso\nexcusa\nexento\nexigir\nexilio\nexistir\néxito\nexperto\nexplicar\nexponer\nextremo\nfábrica\nfábula\nfachada\nfácil\nfactor\nfaena\nfaja\nfalda\nfallo\nfalso\nfaltar\nfama\nfamilia\nfamoso\nfaraón\nfarmacia\nfarol\nfarsa\nfase\nfatiga\nfauna\nfavor\nfax\nfebrero\nfecha\nfeliz\nfeo\nferia\nferoz\nfértil\nfervor\nfestín\nfiable\nfianza\nfiar\nfibra\nficción\nficha\nfideo\nfiebre\nfiel\nfiera\nfiesta\nfigura\nfijar\nfijo\nfila\nfilete\nfilial\nfiltro\nfin\nfinca\nfingir\nfinito\nfirma\nflaco\nflauta\nflecha\nflor\nflota\nfluir\nflujo\nflúor\nfobia\nfoca\nfogata\nfogón\nfolio\nfolleto\nfondo\nforma\nforro\nfortuna\nforzar\nfosa\nfoto\nfracaso\nfrágil\nfranja\nfrase\nfraude\nfreír\nfreno\nfresa\nfrío\nfrito\nfruta\nfuego\nfuente\nfuerza\nfuga\nfumar\nfunción\nfunda\nfurgón\nfuria\nfusil\nfútbol\nfuturo\ngacela\ngafas\ngaita\ngajo\ngala\ngalería\ngallo\ngamba\nganar\ngancho\nganga\nganso\ngaraje\ngarza\ngasolina\ngastar\ngato\ngavilán\ngemelo\ngemir\ngen\ngénero\ngenio\ngente\ngeranio\ngerente\ngermen\ngesto\ngigante\ngimnasio\ngirar\ngiro\nglaciar\nglobo\ngloria\ngol\ngolfo\ngoloso\ngolpe\ngoma\ngordo\ngorila\ngorra\ngota\ngoteo\ngozar\ngrada\ngráfico\ngrano\ngrasa\ngratis\ngrave\ngrieta\ngrillo\ngripe\ngris\ngrito\ngrosor\ngrúa\ngrueso\ngrumo\ngrupo\nguante\nguapo\nguardia\nguerra\nguía\nguiño\nguion\nguiso\nguitarra\ngusano\ngustar\nhaber\nhábil\nhablar\nhacer\nhacha\nhada\nhallar\nhamaca\nharina\nhaz\nhazaña\nhebilla\nhebra\nhecho\nhelado\nhelio\nhembra\nherir\nhermano\nhéroe\nhervir\nhielo\nhierro\nhígado\nhigiene\nhijo\nhimno\nhistoria\nhocico\nhogar\nhoguera\nhoja\nhombre\nhongo\nhonor\nhonra\nhora\nhormiga\nhorno\nhostil\nhoyo\nhueco\nhuelga\nhuerta\nhueso\nhuevo\nhuida\nhuir\nhumano\nhúmedo\nhumilde\nhumo\nhundir\nhuracán\nhurto\nicono\nideal\nidioma\nídolo\niglesia\niglú\nigual\nilegal\nilusión\nimagen\nimán\nimitar\nimpar\nimperio\nimponer\nimpulso\nincapaz\níndice\ninerte\ninfiel\ninforme\ningenio\ninicio\ninmenso\ninmune\ninnato\ninsecto\ninstante\ninterés\níntimo\nintuir\ninútil\ninvierno\nira\niris\nironía\nisla\nislote\njabalí\njabón\njamón\njarabe\njardín\njarra\njaula\njazmín\njefe\njeringa\njinete\njornada\njoroba\njoven\njoya\njuerga\njueves\njuez\njugador\njugo\njuguete\njuicio\njunco\njungla\njunio\njuntar\njúpiter\njurar\njusto\njuvenil\njuzgar\nkilo\nkoala\nlabio\nlacio\nlacra\nlado\nladrón\nlagarto\nlágrima\nlaguna\nlaico\nlamer\nlámina\nlámpara\nlana\nlancha\nlangosta\nlanza\nlápiz\nlargo\nlarva\nlástima\nlata\nlátex\nlatir\nlaurel\nlavar\nlazo\nleal\nlección\nleche\nlector\nleer\nlegión\nlegumbre\nlejano\nlengua\nlento\nleña\nleón\nleopardo\nlesión\nletal\nletra\nleve\nleyenda\nlibertad\nlibro\nlicor\nlíder\nlidiar\nlienzo\nliga\nligero\nlima\nlímite\nlimón\nlimpio\nlince\nlindo\nlínea\nlingote\nlino\nlinterna\nlíquido\nliso\nlista\nlitera\nlitio\nlitro\nllaga\nllama\nllanto\nllave\nllegar\nllenar\nllevar\nllorar\nllover\nlluvia\nlobo\nloción\nloco\nlocura\nlógica\nlogro\nlombriz\nlomo\nlonja\nlote\nlucha\nlucir\nlugar\nlujo\nluna\nlunes\nlupa\nlustro\nluto\nluz\nmaceta\nmacho\nmadera\nmadre\nmaduro\nmaestro\nmafia\nmagia\nmago\nmaíz\nmaldad\nmaleta\nmalla\nmalo\nmamá\nmambo\nmamut\nmanco\nmando\nmanejar\nmanga\nmaniquí\nmanjar\nmano\nmanso\nmanta\nmañana\nmapa\nmáquina\nmar\nmarco\nmarea\nmarfil\nmargen\nmarido\nmármol\nmarrón\nmartes\nmarzo\nmasa\nmáscara\nmasivo\nmatar\nmateria\nmatiz\nmatriz\nmáximo\nmayor\nmazorca\nmecha\nmedalla\nmedio\nmédula\nmejilla\nmejor\nmelena\nmelón\nmemoria\nmenor\nmensaje\nmente\nmenú\nmercado\nmerengue\nmérito\nmes\nmesón\nmeta\nmeter\nmétodo\nmetro\nmezcla\nmiedo\nmiel\nmiembro\nmiga\nmil\nmilagro\nmilitar\nmillón\nmimo\nmina\nminero\nmínimo\nminuto\nmiope\nmirar\nmisa\nmiseria\nmisil\nmismo\nmitad\nmito\nmochila\nmoción\nmoda\nmodelo\nmoho\nmojar\nmolde\nmoler\nmolino\nmomento\nmomia\nmonarca\nmoneda\nmonja\nmonto\nmoño\nmorada\nmorder\nmoreno\nmorir\nmorro\nmorsa\nmortal\nmosca\nmostrar\nmotivo\nmover\nmóvil\nmozo\nmucho\nmudar\nmueble\nmuela\nmuerte\nmuestra\nmugre\nmujer\nmula\nmuleta\nmulta\nmundo\nmuñeca\nmural\nmuro\nmúsculo\nmuseo\nmusgo\nmúsica\nmuslo\nnácar\nnación\nnadar\nnaipe\nnaranja\nnariz\nnarrar\nnasal\nnatal\nnativo\nnatural\nnáusea\nnaval\nnave\nnavidad\nnecio\nnéctar\nnegar\nnegocio\nnegro\nneón\nnervio\nneto\nneutro\nnevar\nnevera\nnicho\nnido\nniebla\nnieto\nniñez\nniño\nnítido\nnivel\nnobleza\nnoche\nnómina\nnoria\nnorma\nnorte\nnota\nnoticia\nnovato\nnovela\nnovio\nnube\nnuca\nnúcleo\nnudillo\nnudo\nnuera\nnueve\nnuez\nnulo\nnúmero\nnutria\noasis\nobeso\nobispo\nobjeto\nobra\nobrero\nobservar\nobtener\nobvio\noca\nocaso\nocéano\nochenta\nocho\nocio\nocre\noctavo\noctubre\noculto\nocupar\nocurrir\nodiar\nodio\nodisea\noeste\nofensa\noferta\noficio\nofrecer\nogro\noído\noír\nojo\nola\noleada\nolfato\nolivo\nolla\nolmo\nolor\nolvido\nombligo\nonda\nonza\nopaco\nopción\nópera\nopinar\noponer\noptar\nóptica\nopuesto\noración\norador\noral\nórbita\norca\norden\noreja\nórgano\norgía\norgullo\noriente\norigen\norilla\noro\norquesta\noruga\nosadía\noscuro\nosezno\noso\nostra\notoño\notro\noveja\nóvulo\nóxido\noxígeno\noyente\nozono\npacto\npadre\npaella\npágina\npago\npaís\npájaro\npalabra\npalco\npaleta\npálido\npalma\npaloma\npalpar\npan\npanal\npánico\npantera\npañuelo\npapá\npapel\npapilla\npaquete\nparar\nparcela\npared\nparir\nparo\npárpado\nparque\npárrafo\nparte\npasar\npaseo\npasión\npaso\npasta\npata\npatio\npatria\npausa\npauta\npavo\npayaso\npeatón\npecado\npecera\npecho\npedal\npedir\npegar\npeine\npelar\npeldaño\npelea\npeligro\npellejo\npelo\npeluca\npena\npensar\npeñón\npeón\npeor\npepino\npequeño\npera\npercha\nperder\npereza\nperfil\nperico\nperla\npermiso\nperro\npersona\npesa\npesca\npésimo\npestaña\npétalo\npetróleo\npez\npezuña\npicar\npichón\npie\npiedra\npierna\npieza\npijama\npilar\npiloto\npimienta\npino\npintor\npinza\npiña\npiojo\npipa\npirata\npisar\npiscina\npiso\npista\npitón\npizca\nplaca\nplan\nplata\nplaya\nplaza\npleito\npleno\nplomo\npluma\nplural\npobre\npoco\npoder\npodio\npoema\npoesía\npoeta\npolen\npolicía\npollo\npolvo\npomada\npomelo\npomo\npompa\nponer\nporción\nportal\nposada\nposeer\nposible\nposte\npotencia\npotro\npozo\nprado\nprecoz\npregunta\npremio\nprensa\npreso\nprevio\nprimo\npríncipe\nprisión\nprivar\nproa\nprobar\nproceso\nproducto\nproeza\nprofesor\nprograma\nprole\npromesa\npronto\npropio\npróximo\nprueba\npúblico\npuchero\npudor\npueblo\npuerta\npuesto\npulga\npulir\npulmón\npulpo\npulso\npuma\npunto\npuñal\npuño\npupa\npupila\npuré\nquedar\nqueja\nquemar\nquerer\nqueso\nquieto\nquímica\nquince\nquitar\nrábano\nrabia\nrabo\nración\nradical\nraíz\nrama\nrampa\nrancho\nrango\nrapaz\nrápido\nrapto\nrasgo\nraspa\nrato\nrayo\nraza\nrazón\nreacción\nrealidad\nrebaño\nrebote\nrecaer\nreceta\nrechazo\nrecoger\nrecreo\nrecto\nrecurso\nred\nredondo\nreducir\nreflejo\nreforma\nrefrán\nrefugio\nregalo\nregir\nregla\nregreso\nrehén\nreino\nreír\nreja\nrelato\nrelevo\nrelieve\nrelleno\nreloj\nremar\nremedio\nremo\nrencor\nrendir\nrenta\nreparto\nrepetir\nreposo\nreptil\nres\nrescate\nresina\nrespeto\nresto\nresumen\nretiro\nretorno\nretrato\nreunir\nrevés\nrevista\nrey\nrezar\nrico\nriego\nrienda\nriesgo\nrifa\nrígido\nrigor\nrincón\nriñón\nrío\nriqueza\nrisa\nritmo\nrito\nrizo\nroble\nroce\nrociar\nrodar\nrodeo\nrodilla\nroer\nrojizo\nrojo\nromero\nromper\nron\nronco\nronda\nropa\nropero\nrosa\nrosca\nrostro\nrotar\nrubí\nrubor\nrudo\nrueda\nrugir\nruido\nruina\nruleta\nrulo\nrumbo\nrumor\nruptura\nruta\nrutina\nsábado\nsaber\nsabio\nsable\nsacar\nsagaz\nsagrado\nsala\nsaldo\nsalero\nsalir\nsalmón\nsalón\nsalsa\nsalto\nsalud\nsalvar\nsamba\nsanción\nsandía\nsanear\nsangre\nsanidad\nsano\nsanto\nsapo\nsaque\nsardina\nsartén\nsastre\nsatán\nsauna\nsaxofón\nsección\nseco\nsecreto\nsecta\nsed\nseguir\nseis\nsello\nselva\nsemana\nsemilla\nsenda\nsensor\nseñal\nseñor\nseparar\nsepia\nsequía\nser\nserie\nsermón\nservir\nsesenta\nsesión\nseta\nsetenta\nsevero\nsexo\nsexto\nsidra\nsiesta\nsiete\nsiglo\nsigno\nsílaba\nsilbar\nsilencio\nsilla\nsímbolo\nsimio\nsirena\nsistema\nsitio\nsituar\nsobre\nsocio\nsodio\nsol\nsolapa\nsoldado\nsoledad\nsólido\nsoltar\nsolución\nsombra\nsondeo\nsonido\nsonoro\nsonrisa\nsopa\nsoplar\nsoporte\nsordo\nsorpresa\nsorteo\nsostén\nsótano\nsuave\nsubir\nsuceso\nsudor\nsuegra\nsuelo\nsueño\nsuerte\nsufrir\nsujeto\nsultán\nsumar\nsuperar\nsuplir\nsuponer\nsupremo\nsur\nsurco\nsureño\nsurgir\nsusto\nsutil\ntabaco\ntabique\ntabla\ntabú\ntaco\ntacto\ntajo\ntalar\ntalco\ntalento\ntalla\ntalón\ntamaño\ntambor\ntango\ntanque\ntapa\ntapete\ntapia\ntapón\ntaquilla\ntarde\ntarea\ntarifa\ntarjeta\ntarot\ntarro\ntarta\ntatuaje\ntauro\ntaza\ntazón\nteatro\ntecho\ntecla\ntécnica\ntejado\ntejer\ntejido\ntela\nteléfono\ntema\ntemor\ntemplo\ntenaz\ntender\ntener\ntenis\ntenso\nteoría\nterapia\nterco\ntérmino\nternura\nterror\ntesis\ntesoro\ntestigo\ntetera\ntexto\ntez\ntibio\ntiburón\ntiempo\ntienda\ntierra\ntieso\ntigre\ntijera\ntilde\ntimbre\ntímido\ntimo\ntinta\ntío\ntípico\ntipo\ntira\ntirón\ntitán\ntítere\ntítulo\ntiza\ntoalla\ntobillo\ntocar\ntocino\ntodo\ntoga\ntoldo\ntomar\ntono\ntonto\ntopar\ntope\ntoque\ntórax\ntorero\ntormenta\ntorneo\ntoro\ntorpedo\ntorre\ntorso\ntortuga\ntos\ntosco\ntoser\ntóxico\ntrabajo\ntractor\ntraer\ntráfico\ntrago\ntraje\ntramo\ntrance\ntrato\ntrauma\ntrazar\ntrébol\ntregua\ntreinta\ntren\ntrepar\ntres\ntribu\ntrigo\ntripa\ntriste\ntriunfo\ntrofeo\ntrompa\ntronco\ntropa\ntrote\ntrozo\ntruco\ntrueno\ntrufa\ntubería\ntubo\ntuerto\ntumba\ntumor\ntúnel\ntúnica\nturbina\nturismo\nturno\ntutor\nubicar\núlcera\numbral\nunidad\nunir\nuniverso\nuno\nuntar\nuña\nurbano\nurbe\nurgente\nurna\nusar\nusuario\nútil\nutopía\nuva\nvaca\nvacío\nvacuna\nvagar\nvago\nvaina\nvajilla\nvale\nválido\nvalle\nvalor\nválvula\nvampiro\nvara\nvariar\nvarón\nvaso\nvecino\nvector\nvehículo\nveinte\nvejez\nvela\nvelero\nveloz\nvena\nvencer\nvenda\nveneno\nvengar\nvenir\nventa\nvenus\nver\nverano\nverbo\nverde\nvereda\nverja\nverso\nverter\nvía\nviaje\nvibrar\nvicio\nvíctima\nvida\nvídeo\nvidrio\nviejo\nviernes\nvigor\nvil\nvilla\nvinagre\nvino\nviñedo\nviolín\nviral\nvirgo\nvirtud\nvisor\nvíspera\nvista\nvitamina\nviudo\nvivaz\nvivero\nvivir\nvivo\nvolcán\nvolumen\nvolver\nvoraz\nvotar\nvoto\nvoz\nvuelo\nvulgar\nyacer\nyate\nyegua\nyema\nyerno\nyeso\nyodo\nyoga\nyogur\nzafiro\nzanja\nzapato\nzarza\nzona\nzorro\nzumo\nzurdo\n`\n)\n"
  },
  {
    "path": "util/downloader/chunk.go",
    "content": "package downloader\n\nimport \"fmt\"\n\ntype chunk struct {\n\tstart, end int64\n}\n\nfunc createChunks(contentLength, totalChunks int64) []*chunk {\n\tchunks := make([]*chunk, 0, totalChunks)\n\tchunkSize := contentLength / totalChunks\n\tfor i := int64(0); i < totalChunks; i++ {\n\t\tstart := i * chunkSize\n\t\tend := start + chunkSize - 1\n\t\t// adjust the end for the last chunk\n\t\tif i == totalChunks-1 {\n\t\t\tend = contentLength - 1\n\t\t}\n\t\tchunks = append(chunks, &chunk{start: start, end: end})\n\t}\n\n\treturn chunks\n}\n\nfunc (c *chunk) rangeHeader() string {\n\treturn fmt.Sprintf(\"bytes=%d-%d\", c.start, c.end)\n}\n\nfunc (c *chunk) size() int64 {\n\treturn (c.end + 1) - c.start\n}\n"
  },
  {
    "path": "util/downloader/chunk_test.go",
    "content": "package downloader\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCreateChunks(t *testing.T) {\n\ttests := []struct {\n\t\tcontentLength int64\n\t\ttotalChunks   int64\n\t\texpected      []*chunk\n\t}{\n\t\t{\n\t\t\tcontentLength: 181403648,\n\t\t\ttotalChunks:   16,\n\t\t\texpected: []*chunk{\n\t\t\t\t{start: 0, end: 11337727},\n\t\t\t\t{start: 11337728, end: 22675455},\n\t\t\t\t{start: 22675456, end: 34013183},\n\t\t\t\t{start: 34013184, end: 45350911},\n\t\t\t\t{start: 45350912, end: 56688639},\n\t\t\t\t{start: 56688640, end: 68026367},\n\t\t\t\t{start: 68026368, end: 79364095},\n\t\t\t\t{start: 79364096, end: 90701823},\n\t\t\t\t{start: 90701824, end: 102039551},\n\t\t\t\t{start: 102039552, end: 113377279},\n\t\t\t\t{start: 113377280, end: 124715007},\n\t\t\t\t{start: 124715008, end: 136052735},\n\t\t\t\t{start: 136052736, end: 147390463},\n\t\t\t\t{start: 147390464, end: 158728191},\n\t\t\t\t{start: 158728192, end: 170065919},\n\t\t\t\t{start: 170065920, end: 181403647},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tcontentLength: 10,\n\t\t\ttotalChunks:   3,\n\t\t\texpected: []*chunk{\n\t\t\t\t{start: 0, end: 2},\n\t\t\t\t{start: 3, end: 5},\n\t\t\t\t{start: 6, end: 9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tcontentLength: 10,\n\t\t\ttotalChunks:   1,\n\t\t\texpected: []*chunk{\n\t\t\t\t{start: 0, end: 9},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tcontentLength: 0,\n\t\t\ttotalChunks:   1,\n\t\t\texpected: []*chunk{\n\t\t\t\t{start: 0, end: -1},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tactual := createChunks(tt.contentLength, tt.totalChunks)\n\t\tassert.Equal(t, tt.expected, actual)\n\t}\n}\n\nfunc TestChunkRangeHeader(t *testing.T) {\n\ttests := []struct {\n\t\tchunk    chunk\n\t\texpected string\n\t}{\n\t\t{\n\t\t\tchunk:    chunk{start: 0, end: 499},\n\t\t\texpected: \"bytes=0-499\",\n\t\t},\n\t\t{\n\t\t\tchunk:    chunk{start: 500, end: 999},\n\t\t\texpected: \"bytes=500-999\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tactual := tt.chunk.rangeHeader()\n\t\tassert.Equal(t, tt.expected, actual)\n\t}\n}\n\nfunc TestChunkSize(t *testing.T) {\n\ttests := []struct {\n\t\tchunk    chunk\n\t\texpected int64\n\t}{\n\t\t{\n\t\t\tchunk:    chunk{start: 0, end: 499},\n\t\t\texpected: 500,\n\t\t},\n\t\t{\n\t\t\tchunk:    chunk{start: 500, end: 999},\n\t\t\texpected: 500,\n\t\t},\n\t\t{\n\t\t\tchunk:    chunk{start: 0, end: 0},\n\t\t\texpected: 1,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tactual := tt.chunk.size()\n\t\tassert.Equal(t, tt.expected, actual)\n\t}\n}\n"
  },
  {
    "path": "util/downloader/downloader.go",
    "content": "package downloader\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\nconst (\n\t_defaultConcurrencyPerChunk = 16\n\t_defaultMinSizeForChunk     = 1 << 20\n\t_defaultMaxRetries          = 3\n)\n\ntype Downloader struct {\n\tclient        *http.Client\n\turl           string\n\tfilePath      string\n\tsha256Sum     string\n\tfileType      string\n\tfileName      string\n\tmaxRetries    int\n\tcancel        context.CancelFunc\n\tstatsCallback func(Stats)\n\n\tchunks []*chunk\n\n\tmu         sync.Mutex\n\tdownloaded int64\n}\n\ntype Stats struct {\n\tDownloaded int64\n\tTotalSize  int64\n\tPercent    float64\n\tCompleted  bool\n}\n\nfunc New(url, filePath, sha256Sum string, opts ...Option) *Downloader {\n\topt := defaultOptions()\n\n\tfor _, o := range opts {\n\t\to(opt)\n\t}\n\n\treturn &Downloader{\n\t\tclient:        opt.client,\n\t\tstatsCallback: opt.statsCallBack,\n\t\turl:           url,\n\t\tfilePath:      filePath,\n\t\tsha256Sum:     sha256Sum,\n\t\tchunks:        make([]*chunk, 0, _defaultConcurrencyPerChunk),\n\t\tmaxRetries:    opt.maxRetries,\n\t}\n}\n\nfunc (d *Downloader) Start(ctx context.Context) {\n\td.download(ctx)\n}\n\nfunc (d *Downloader) FileType() string {\n\treturn d.fileType\n}\n\nfunc (d *Downloader) FileName() string {\n\treturn d.fileName\n}\n\nfunc (d *Downloader) download(ctx context.Context) {\n\tctx, cancel := context.WithCancel(ctx)\n\td.cancel = cancel\n\n\ttotalSize, err := d.getHeader(ctx)\n\tif err != nil {\n\t\td.handleError(err)\n\n\t\treturn\n\t}\n\n\td.fileName = filepath.Base(d.filePath)\n\tif err := d.createDir(); err != nil {\n\t\td.handleError(err)\n\n\t\treturn\n\t}\n\n\tout, err := os.OpenFile(d.filePath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)\n\tif err != nil {\n\t\td.handleError(err)\n\n\t\treturn\n\t}\n\tdefer func() {\n\t\t_ = out.Close()\n\t}()\n\n\td.updateStats(0, totalSize, false)\n\n\tvar wg sync.WaitGroup\n\tfor _, chk := range d.chunks {\n\t\twg.Go(func() {\n\t\t\tif err := d.downloadChunk(ctx, out, chk, totalSize); err != nil {\n\t\t\t\td.handleError(err)\n\t\t\t}\n\t\t})\n\t}\n\n\twg.Wait()\n\n\tif ctx.Err() != nil {\n\t\treturn\n\t}\n\n\tif err := d.finalizeDownload(); err != nil {\n\t\td.handleError(err)\n\n\t\treturn\n\t}\n}\n\nfunc (d *Downloader) getHeader(ctx context.Context) (int64, error) {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodHead, d.url, http.NoBody)\n\tif err != nil {\n\t\treturn 0, &Error{Message: \"failed to create new request for get header\", Reason: err}\n\t}\n\n\tresp, err := d.client.Do(req)\n\tif err != nil {\n\t\treturn 0, &Error{Message: \"failed to do request get header\", Reason: err}\n\t}\n\n\tdefer func() {\n\t\t_ = resp.Body.Close()\n\t}()\n\n\td.fileType = resp.Header.Get(\"Content-Type\")\n\n\tif resp.ContentLength > _defaultMinSizeForChunk {\n\t\td.chunks = createChunks(resp.ContentLength, _defaultConcurrencyPerChunk)\n\t} else {\n\t\td.chunks = append(d.chunks, &chunk{\n\t\t\tstart: 0,\n\t\t\tend:   resp.ContentLength,\n\t\t})\n\t}\n\n\treturn resp.ContentLength, nil\n}\n\nfunc (d *Downloader) createDir() error {\n\tdir := filepath.Dir(d.filePath)\n\tif err := os.MkdirAll(dir, 0o750); err != nil {\n\t\treturn &Error{Message: \"failed to create file path directory\", Reason: err}\n\t}\n\n\treturn nil\n}\n\nfunc (d *Downloader) downloadChunk(ctx context.Context, out *os.File, chk *chunk, totalSize int64) error {\n\tvar err error\n\tfor i := 0; i < d.maxRetries; i++ {\n\t\terr = d.downloadChunkWithContext(ctx, out, chk, totalSize)\n\t\tif err == nil || ctx.Err() != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn err\n}\n\nfunc (d *Downloader) downloadChunkWithContext(ctx context.Context, out *os.File, chk *chunk, totalSize int64) error {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, d.url, http.NoBody)\n\tif err != nil {\n\t\treturn &Error{Message: \"failed to create new request for download chunk\", Reason: err}\n\t}\n\n\treq.Header.Set(\"Range\", chk.rangeHeader())\n\tresp, err := d.client.Do(req)\n\tif err != nil {\n\t\treturn &Error{Message: \"failed to do request download chunk\", Reason: err}\n\t}\n\n\tdefer func() {\n\t\t_ = resp.Body.Close()\n\t}()\n\n\tif resp.StatusCode != http.StatusPartialContent && resp.StatusCode != http.StatusOK {\n\t\treturn &Error{\n\t\t\tMessage: \"response has invalid status code\",\n\t\t\tReason:  fmt.Errorf(\"got http response %s from %s: %w\", resp.Status, d.url, err),\n\t\t}\n\t}\n\n\tbuf := make([]byte, 32*1024) // 32KB buffer for reading the response body\n\toffset := chk.start\n\tfor {\n\t\tcount, err := resp.Body.Read(buf)\n\t\tif count > 0 {\n\t\t\td.mu.Lock()\n\t\t\tfor written := 0; written < count; {\n\t\t\t\tnumBytes, err := out.WriteAt(buf[written:count], offset+int64(written))\n\t\t\t\tif err != nil {\n\t\t\t\t\td.mu.Unlock()\n\n\t\t\t\t\treturn &Error{Message: \"failed write data into file\", Reason: err}\n\t\t\t\t}\n\t\t\t\twritten += numBytes\n\t\t\t}\n\t\t\toffset += int64(count)\n\t\t\td.downloaded += int64(count)\n\t\t\td.updateStats(d.downloaded, totalSize, false)\n\t\t\td.mu.Unlock()\n\t\t}\n\t\tif err != nil {\n\t\t\t// if error is io.EOF stop write for loop response body.\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\treturn &Error{Message: \"error read body download chunk\", Reason: err}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (d *Downloader) updateStats(downloaded, totalSize int64, completed bool) {\n\tif d.statsCallback != nil {\n\t\tif downloaded > totalSize {\n\t\t\t// In case of re-downloading a chunk...\n\t\t\tdownloaded = totalSize\n\t\t}\n\t\tstats := Stats{\n\t\t\tDownloaded: downloaded,\n\t\t\tTotalSize:  totalSize,\n\t\t\tPercent:    float64(downloaded) / float64(totalSize) * 100,\n\t\t}\n\n\t\tif completed {\n\t\t\tstats.Completed = true\n\t\t}\n\n\t\td.statsCallback(stats)\n\t}\n}\n\nfunc (d *Downloader) finalizeDownload() error {\n\t// Recalculate the hash by re-reading the entire file\n\tout, err := os.Open(d.filePath)\n\tif err != nil {\n\t\treturn &Error{Message: \"failed to open file\", Reason: err}\n\t}\n\tdefer func() {\n\t\t_ = out.Close()\n\t}()\n\n\thasher := sha256.New()\n\tif _, err := io.Copy(hasher, out); err != nil {\n\t\treturn &Error{Message: \"failed copy file data to hasher for calculate hash\", Reason: err}\n\t}\n\n\tsum := hex.EncodeToString(hasher.Sum(nil))\n\tif sum != d.sha256Sum {\n\t\treturn &Error{Message: \"sha256 mismatch\", Reason: fmt.Errorf(\"expected %s, got %s\", d.sha256Sum, sum)}\n\t}\n\n\td.updateStats(0, 0, true)\n\n\treturn nil\n}\n\nfunc (d *Downloader) handleError(err error) {\n\tlogger.Error(\"failed to download\", \"error\", err)\n\tif d.cancel != nil {\n\t\td.cancel()\n\t}\n}\n"
  },
  {
    "path": "util/downloader/downloader_test.go",
    "content": "package downloader\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestDownloader(t *testing.T) {\n\tfileContent := make([]byte, 1*1024*1024) // 1 MB\n\tfor i := range fileContent {\n\t\tfileContent[i] = byte(i % 256)\n\t}\n\n\tfileURL := \"/testfile\"\n\texpectedSHA256 := sha256.Sum256(fileContent)\n\texpectedSHA256Hex := hex.EncodeToString(expectedSHA256[:])\n\n\tserver := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif r.URL.Path == fileURL {\n\t\t\tw.Header().Set(\"Content-Length\", fmt.Sprintf(\"%d\", len(fileContent)))\n\t\t\t_, err := w.Write(fileContent)\n\t\t\tassert.NoError(t, err)\n\t\t} else {\n\t\t\thttp.NotFound(w, r)\n\t\t}\n\t}))\n\tdefer server.Close()\n\n\tfilePath := util.TempFilePath()\n\n\tdefer func() {\n\t\trequire.NoError(t, os.RemoveAll(\"./testdata\"))\n\t}()\n\n\tdownloader := New(server.URL+fileURL, filePath, expectedSHA256Hex,\n\t\tWithCustomClient(server.Client()),\n\t\tWithStatsCallback(printDownloaderStats),\n\t)\n\n\tctx, cancel := context.WithTimeout(t.Context(), 2*time.Minute)\n\tdefer cancel()\n\n\tdownloader.Start(ctx)\n\n\tt.Log(downloader.FileName())\n\tt.Log(downloader.FileType())\n\n\tdownloadedContent, err := os.ReadFile(filePath)\n\trequire.NoError(t, err, \"Failed to read the downloaded file\")\n\tassert.Equal(t, fileContent, downloadedContent, \"Downloaded file content does not match expected content\")\n}\n\nfunc printDownloaderStats(sts Stats) {\n\tif !sts.Completed {\n\t\tfmt.Printf(\"Downloaded: %d / %d (%.2f%%)\\n\", sts.Downloaded, sts.TotalSize, sts.Percent)\n\t}\n}\n"
  },
  {
    "path": "util/downloader/errors.go",
    "content": "package downloader\n\nimport (\n\t\"fmt\"\n)\n\ntype Error struct {\n\tMessage string\n\tReason  error\n}\n\nfunc (e *Error) Error() string {\n\treturn fmt.Sprintf(\"%s: %s\", e.Message, e.Reason.Error())\n}\n\nfunc (e *Error) Unwrap() error {\n\treturn e.Reason\n}\n"
  },
  {
    "path": "util/downloader/options.go",
    "content": "package downloader\n\nimport \"net/http\"\n\ntype options struct {\n\tclient        *http.Client\n\tstatsCallBack func(Stats)\n\tmaxRetries    int\n}\n\ntype Option func(*options)\n\nfunc defaultOptions() *options {\n\treturn &options{\n\t\tclient:     http.DefaultClient,\n\t\tmaxRetries: _defaultMaxRetries,\n\t}\n}\n\nfunc WithCustomClient(client *http.Client) Option {\n\treturn func(o *options) {\n\t\to.client = client\n\t}\n}\n\nfunc WithMaxRetries(n int) Option {\n\treturn func(o *options) {\n\t\tif n > 0 {\n\t\t\to.maxRetries = n\n\t\t}\n\t}\n}\n\nfunc WithStatsCallback(cb func(Stats)) Option {\n\treturn func(opt *options) {\n\t\topt.statsCallBack = cb\n\t}\n}\n"
  },
  {
    "path": "util/encoding/encoding.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage encoding\n\nimport (\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\nconst (\n\t// MaxPayloadSize is the maximum bytes a message can be regardless of other\n\t// individual limits imposed by messages themselves.\n\tMaxPayloadSize = 1024 * 1024 * 32 // 32MB\n\t// binaryFreeListMaxItems is the number of buffers to keep in the free\n\t// list to use for binary serialization and deserialization.\n\tbinaryFreeListMaxItems = 1024\n)\n\nvar (\n\tErrOverflow     = errors.New(\"overflow\")\n\tErrNonCanonical = errors.New(\"non canonical\")\n)\n\n// binaryFreeList defines a concurrent safe free list of byte slices (up to the\n// maximum number defined by the binaryFreeListMaxItems constant) that have a\n// cap of 8 (thus it supports up to a uint64).  It is used to provide temporary\n// buffers for serializing and deserializing primitive numbers to and from their\n// binary encoding in order to greatly reduce the number of allocations\n// required.\n//\n// For convenience, functions are provided for each of the primitive unsigned\n// integers that automatically obtain a buffer from the free list, perform the\n// necessary binary conversion, read from or write to the given io.Reader or\n// io.Writer, and return the buffer to the free list.\ntype binaryFreeList chan []byte\n\n// Borrow returns a byte slice from the free list with a length of 8.  A new\n// buffer is allocated if there are not any available on the free list.\nfunc (l binaryFreeList) Borrow() []byte {\n\tvar buf []byte\n\tselect {\n\tcase buf = <-l:\n\tdefault:\n\t\tbuf = make([]byte, 8)\n\t}\n\n\treturn buf[:8]\n}\n\n// Return puts the provided byte slice back on the free list.  The buffer MUST\n// have been obtained via the Borrow function and therefore have a cap of 8.\nfunc (l binaryFreeList) Return(buf []byte) {\n\tselect {\n\tcase l <- buf:\n\tdefault:\n\t\t// Let it go to the garbage collector.\n\t}\n}\n\n// Uint8 reads a single byte from the provided reader using a buffer from the\n// free list.\nfunc (l binaryFreeList) Uint8(r io.Reader, val *uint8) error {\n\tbuf := l.Borrow()[:1]\n\tif _, err := io.ReadFull(r, buf); err != nil {\n\t\tl.Return(buf)\n\n\t\treturn err\n\t}\n\t*val = buf[0]\n\tl.Return(buf)\n\n\treturn nil\n}\n\n// Uint16 reads two bytes from the provided reader using a buffer from the\n// free list, converts it to a number in little endian byte order.\nfunc (l binaryFreeList) Uint16(r io.Reader, val *uint16) error {\n\tbuf := l.Borrow()[:2]\n\tif _, err := io.ReadFull(r, buf); err != nil {\n\t\tl.Return(buf)\n\n\t\treturn err\n\t}\n\t*val = binary.LittleEndian.Uint16(buf)\n\tl.Return(buf)\n\n\treturn nil\n}\n\n// Uint32 reads four bytes from the provided reader using a buffer from the\n// free list, converts it to a number in little endian byte order.\nfunc (l binaryFreeList) Uint32(r io.Reader, val *uint32) error {\n\tbuf := l.Borrow()[:4]\n\tif _, err := io.ReadFull(r, buf); err != nil {\n\t\tl.Return(buf)\n\n\t\treturn err\n\t}\n\t*val = binary.LittleEndian.Uint32(buf)\n\tl.Return(buf)\n\n\treturn nil\n}\n\n// Uint64 reads eight bytes from the provided reader using a buffer from the\n// free list, converts it to a number in little endian byte order..\nfunc (l binaryFreeList) Uint64(r io.Reader, val *uint64) error {\n\tbuf := l.Borrow()[:8]\n\tif _, err := io.ReadFull(r, buf); err != nil {\n\t\tl.Return(buf)\n\n\t\treturn err\n\t}\n\t*val = binary.LittleEndian.Uint64(buf)\n\tl.Return(buf)\n\n\treturn nil\n}\n\n// PutUint8 copies the provided uint8 into a buffer from the free list and\n// writes the resulting byte to the given writer.\nfunc (l binaryFreeList) PutUint8(w io.Writer, val uint8) error {\n\tbuf := l.Borrow()[:1]\n\tbuf[0] = val\n\t_, err := w.Write(buf)\n\tl.Return(buf)\n\n\treturn err\n}\n\n// PutUint16 serializes the provided uint16 using the given byte order into a\n// buffer from the free list and writes the resulting two bytes to the given\n// writer.\nfunc (l binaryFreeList) PutUint16(w io.Writer, val uint16) error {\n\tbuf := l.Borrow()[:2]\n\tbinary.LittleEndian.PutUint16(buf, val)\n\t_, err := w.Write(buf)\n\tl.Return(buf)\n\n\treturn err\n}\n\n// PutUint32 serializes the provided uint32 using the given byte order into a\n// buffer from the free list and writes the resulting four bytes to the given\n// writer.\nfunc (l binaryFreeList) PutUint32(w io.Writer, val uint32) error {\n\tbuf := l.Borrow()[:4]\n\tbinary.LittleEndian.PutUint32(buf, val)\n\t_, err := w.Write(buf)\n\tl.Return(buf)\n\n\treturn err\n}\n\n// PutUint64 serializes the provided uint64 using the given byte order into a\n// buffer from the free list and writes the resulting eight bytes to the given\n// writer.\nfunc (l binaryFreeList) PutUint64(w io.Writer, val uint64) error {\n\tbuf := l.Borrow()[:8]\n\tbinary.LittleEndian.PutUint64(buf, val)\n\t_, err := w.Write(buf)\n\tl.Return(buf)\n\n\treturn err\n}\n\n// binarySerializer provides a free list of buffers to use for serializing and\n// deserializing primitive integer values to and from io.Readers and io.Writers.\nvar binarySerializer binaryFreeList = make(chan []byte, binaryFreeListMaxItems)\n\n// ReadElement reads the next sequence of bytes from r using little endian\n// depending on the concrete type of element pointed to.\nfunc ReadElement(r io.Reader, elm any) error {\n\t// Attempt to read the element based on the concrete type via fast\n\t// type assertions first.\n\tvar err error\n\tswitch elm := elm.(type) {\n\tcase *bool:\n\t\tval := uint8(0)\n\t\terr = binarySerializer.Uint8(r, &val)\n\t\t*elm = val != 0x00\n\tcase *int8:\n\t\tval := uint8(0)\n\t\terr = binarySerializer.Uint8(r, &val)\n\t\t*elm = int8(val)\n\tcase *uint8:\n\t\terr = binarySerializer.Uint8(r, elm)\n\tcase *int16:\n\t\tval := uint16(0)\n\t\terr = binarySerializer.Uint16(r, &val)\n\t\t*elm = int16(val)\n\tcase *uint16:\n\t\terr = binarySerializer.Uint16(r, elm)\n\tcase *int32:\n\t\trv := uint32(0)\n\t\terr = binarySerializer.Uint32(r, &rv)\n\t\t*elm = int32(rv)\n\tcase *uint32:\n\t\terr = binarySerializer.Uint32(r, elm)\n\tcase *int64:\n\t\tval := uint64(0)\n\t\terr = binarySerializer.Uint64(r, &val)\n\t\t*elm = int64(val)\n\tcase *uint64:\n\t\terr = binarySerializer.Uint64(r, elm)\n\tcase *hash.Hash:\n\t\t_, err = io.ReadFull(r, elm[:])\n\tdefault:\n\t\t// Fall back to the slower binary.Read if a fast path was not available\n\t\t// above.\n\t\terr = binary.Read(r, binary.LittleEndian, elm)\n\t}\n\n\treturn err\n}\n\n// ReadElements reads multiple items from r.  It is equivalent to multiple\n// calls to readElement.\nfunc ReadElements(r io.Reader, elms ...any) error {\n\tfor _, element := range elms {\n\t\terr := ReadElement(r, element)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// WriteElement writes the little endian representation of element to w.\nfunc WriteElement(w io.Writer, elm any) error {\n\t// Attempt to write the element based on the concrete type via fast\n\t// type assertions first.\n\tvar err error\n\tswitch elm := elm.(type) {\n\tcase bool:\n\t\tif elm {\n\t\t\terr = binarySerializer.PutUint8(w, 0x01)\n\t\t} else {\n\t\t\terr = binarySerializer.PutUint8(w, 0x00)\n\t\t}\n\tcase int8:\n\t\terr = binarySerializer.PutUint8(w, uint8(elm))\n\tcase uint8:\n\t\terr = binarySerializer.PutUint8(w, elm)\n\tcase int16:\n\t\terr = binarySerializer.PutUint16(w, uint16(elm))\n\tcase uint16:\n\t\terr = binarySerializer.PutUint16(w, elm)\n\tcase int32:\n\t\terr = binarySerializer.PutUint32(w, uint32(elm))\n\tcase uint32:\n\t\terr = binarySerializer.PutUint32(w, elm)\n\tcase int64:\n\t\terr = binarySerializer.PutUint64(w, uint64(elm))\n\tcase uint64:\n\t\terr = binarySerializer.PutUint64(w, elm)\n\tcase *hash.Hash:\n\t\t_, err = w.Write(elm[:])\n\tdefault:\n\t\t// Fall back to the slower binary.Write if a fast path was not available\n\t\t// above.\n\t\terr = binary.Write(w, binary.LittleEndian, elm)\n\t}\n\n\treturn err\n}\n\n// WriteElements writes multiple items to w.  It is equivalent to multiple\n// calls to writeElement.\nfunc WriteElements(w io.Writer, elements ...any) error {\n\tfor _, element := range elements {\n\t\terr := WriteElement(w, element)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// ReadVarInt reads a variable length integer from r and returns it as a uint64.\nfunc ReadVarInt(r io.Reader) (uint64, error) {\n\tbits := 64\n\twrite := uint64(0)\n\tfor shift := 0; ; shift += 7 {\n\t\tbyt := uint8(0)\n\t\terr := binarySerializer.Uint8(r, &byt)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif shift+7 >= bits && byt >= 1<<(bits-shift) {\n\t\t\treturn uint64(0), ErrOverflow\n\t\t}\n\t\tif byt == 0 && shift != 0 {\n\t\t\treturn uint64(0), ErrNonCanonical\n\t\t}\n\n\t\twrite |= uint64(byt&0x7f) << shift // Does the actually placing into write, stripping the first bit\n\n\t\t// If there is no next\n\t\tif (byt & 0x80) == 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn write, nil\n}\n\n// WriteVarInt serializes val to w using a variable number of bytes depending\n// on its value.\nfunc WriteVarInt(w io.Writer, val uint64) error {\n\t// Make sure that there is one after this\n\tfor val >= 0x80 {\n\t\tn := (uint8(val) & 0x7f) | 0x80\n\t\terr := binarySerializer.PutUint8(w, n)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tval >>= 7 // It should be in multiples of 7, this should just get the next part\n\t}\n\n\treturn binarySerializer.PutUint8(w, uint8(val))\n}\n\n// VarIntSerializeSize returns the number of bytes it would take to serialize\n// val as a variable length integer.\nfunc VarIntSerializeSize(val uint64) int {\n\tswitch {\n\tcase val >= 0x8000000000000000:\n\t\treturn 10\n\tcase val >= 0x100000000000000:\n\t\treturn 9\n\tcase val >= 0x2000000000000:\n\t\treturn 8\n\tcase val >= 0x40000000000:\n\t\treturn 7\n\tcase val >= 0x800000000:\n\t\treturn 6\n\tcase val >= 0x10000000:\n\t\treturn 5\n\tcase val >= 0x200000:\n\t\treturn 4\n\tcase val >= 0x4000:\n\t\treturn 3\n\tcase val >= 0x80:\n\t\treturn 2\n\tdefault:\n\t\treturn 1\n\t}\n}\n\n// VarStringSerializeSize returns the number of bytes it would take to serialize\n// val as a string.\nfunc VarStringSerializeSize(str string) int {\n\treturn VarIntSerializeSize(uint64(len(str))) + len(str)\n}\n\n// VarBytesSerializeSize returns the number of bytes it would take to serialize\n// val as a byte array.\nfunc VarBytesSerializeSize(bytes []byte) int {\n\treturn VarIntSerializeSize(uint64(len(bytes))) + len(bytes)\n}\n\n// ReadVarString reads a variable length string from r and returns it as a Go\n// string. A variable length string is encoded as a variable length integer\n// containing the length of the string followed by the bytes that represent the\n// string itself. An error is returned if the length is greater than the\n// maximum payload size since it helps protect against memory exhaustion\n// attacks and forced panics through malformed messages.\nfunc ReadVarString(r io.Reader) (string, error) {\n\tcount, err := ReadVarInt(r)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Prevent variable length strings that are larger than the maximum\n\t// payload size.  It would be possible to cause memory exhaustion and\n\t// panics without a sane upper bound on this count.\n\tif count > MaxPayloadSize {\n\t\treturn \"\", fmt.Errorf(\"variable length string is too long \"+\n\t\t\t\"[count %d, max %d]\", count, MaxPayloadSize)\n\t}\n\n\tbuf := make([]byte, count)\n\t_, err = io.ReadFull(r, buf)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn string(buf), nil\n}\n\n// WriteVarString serializes str to w as a variable length integer containing\n// the length of the string followed by the bytes that represent the string\n// itself.\nfunc WriteVarString(w io.Writer, str string) error {\n\terr := WriteVarInt(w, uint64(len(str)))\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = w.Write([]byte(str))\n\n\treturn err\n}\n\n// ReadVarBytes reads a variable length byte array.  A byte array is encoded\n// as a varInt containing the length of the array followed by the bytes\n// themselves.  An error is returned if the length is greater than the\n// maximum payload size since it helps protect against memory exhaustion\n// attacks and forced panics through malformed messages.\nfunc ReadVarBytes(r io.Reader) ([]byte, error) {\n\tcount, err := ReadVarInt(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Prevent byte array larger than the max message size. It would\n\t// be possible to cause memory exhaustion and panics without a sane\n\t// upper bound on this count.\n\tif count > uint64(MaxPayloadSize) {\n\t\treturn nil, fmt.Errorf(\"variable length byte array is too long \"+\n\t\t\t\"[count %d, max %d]\", count, MaxPayloadSize)\n\t}\n\n\tbuf := make([]byte, count)\n\t_, err = io.ReadFull(r, buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf, nil\n}\n\n// WriteVarBytes serializes a variable length byte array to w as a varInt\n// containing the number of bytes, followed by the bytes themselves.\nfunc WriteVarBytes(w io.Writer, bytes []byte) error {\n\tslen := uint64(len(bytes))\n\terr := WriteVarInt(w, slen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = w.Write(bytes)\n\n\treturn err\n}\n"
  },
  {
    "path": "util/encoding/encoding_test.go",
    "content": "// This file contains code modified from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage encoding\n\nimport (\n\t\"bytes\"\n\t\"crypto/rand\"\n\t\"io\"\n\t\"math/big\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n// TestElementEncoding tests encode and decode for various element types.  This\n// is mainly to test the \"fast\" paths in readElement and writeElement which use\n// type assertions to avoid reflection when possible.\nfunc TestElementEncoding(t *testing.T) {\n\ttype writeElementReflect int32\n\n\ttests := []struct {\n\t\tin  any    // Value to encode\n\t\tbuf []byte // encoding bytes\n\t}{\n\t\t{int8(-128), []byte{0x80}},\n\t\t{int8(127), []byte{0x7f}},\n\t\t{uint8(1), []byte{0x01}},\n\t\t{int16(-32256), []byte{0x00, 0x82}},\n\t\t{int16(127), []byte{0x7f, 0x00}},\n\t\t{uint16(65535), []byte{0xff, 0xff}},\n\t\t{int32(-1), []byte{0xff, 0xff, 0xff, 0xff}},\n\t\t{int32(1), []byte{0x01, 0x00, 0x00, 0x00}},\n\t\t{uint32(256), []byte{0x00, 0x01, 0x00, 0x00}},\n\t\t{int64(-65536), []byte{0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},\n\t\t{int64(65536), []byte{0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}},\n\t\t{uint64(4294967296), []byte{0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}},\n\t\t{true, []byte{0x01}},\n\t\t{false, []byte{0x00}},\n\t\t{\n\t\t\t&hash.Hash{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,\n\t\t\t},\n\t\t\t[]byte{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,\n\t\t\t},\n\t\t},\n\n\t\t// Type not supported by the \"fast\" path and requires reflection.\n\t\t{\n\t\t\twriteElementReflect(1),\n\t\t\t[]byte{0x01, 0x00, 0x00, 0x00},\n\t\t},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tvar buf bytes.Buffer\n\t\terr := WriteElement(&buf, tt.in)\n\t\trequire.NoError(t, err, \"writeElement #%d\", no)\n\t\tassert.Equal(t, buf.Bytes(), tt.buf, \"writeElement #%d\", no)\n\n\t\trbuf := bytes.NewReader(tt.buf)\n\t\tval := tt.in\n\t\tif reflect.ValueOf(tt.in).Kind() != reflect.Ptr {\n\t\t\tval = reflect.New(reflect.TypeOf(tt.in)).Interface()\n\t\t}\n\t\terr = ReadElement(rbuf, val)\n\t\trequire.NoError(t, err, \"readElement #%d\", no)\n\n\t\tival := val\n\t\tif reflect.ValueOf(tt.in).Kind() != reflect.Ptr {\n\t\t\tival = reflect.Indirect(reflect.ValueOf(val)).Interface()\n\t\t}\n\t\tassert.Equal(t, ival, tt.in, \"readElement #%d\", no)\n\t}\n}\n\n// TestElementEncodingErrors performs negative tests against encode and decode\n// of various element types to confirm error paths work correctly.\nfunc TestElementEncodingErrors(t *testing.T) {\n\ttests := []struct {\n\t\tin       any   // Value to encode\n\t\tmax      int   // Max size of fixed buffer to induce errors\n\t\twriteErr error // Expected write error\n\t\treadErr  error // Expected read error\n\t}{\n\t\t{int8(127), 0, io.ErrShortWrite, io.EOF},\n\t\t{uint8(1), 0, io.ErrShortWrite, io.EOF},\n\t\t{int16(127), 1, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{uint16(256), 1, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{int32(256), 3, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{uint32(256), 3, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{int64(65536), 7, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{uint64(4294967296), 7, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t{true, 0, io.ErrShortWrite, io.EOF},\n\t\t{false, 0, io.ErrShortWrite, io.EOF},\n\t\t{\n\t\t\t&hash.Hash{\n\t\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n\t\t\t\t0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,\n\t\t\t\t0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,\n\t\t\t\t0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,\n\t\t\t},\n\t\t\t0, io.ErrShortWrite, io.EOF,\n\t\t},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tw := util.NewFixedWriter(tt.max)\n\t\terr := WriteElement(w, tt.in)\n\t\trequire.ErrorIs(t, err, tt.writeErr, \"writeElement #%d\", no)\n\n\t\tr := util.NewFixedReader(tt.max, nil)\n\t\tval := tt.in\n\t\tif reflect.ValueOf(tt.in).Kind() != reflect.Ptr {\n\t\t\tval = reflect.New(reflect.TypeOf(tt.in)).Interface()\n\t\t}\n\t\terr = ReadElement(r, val)\n\t\trequire.ErrorIs(t, err, tt.readErr, \"readElement #%d\", no)\n\t}\n}\n\n// TestVarStringEncoding tests encode and decode for variable length strings.\nfunc TestVarStringEncoding(t *testing.T) {\n\t// str256 is a string that takes a 2-byte varint to encode.\n\tstr256 := strings.Repeat(\"test\", 64)\n\n\ttests := []struct {\n\t\tin  string // String to encode\n\t\tout string // String to decoded value\n\t\tbuf []byte // Encoding bytes\n\t}{\n\t\t// Latest protocol version.\n\t\t// Empty string\n\t\t{\"\", \"\", []byte{0x00}},\n\t\t// Single byte varint + string\n\t\t{\"Test\", \"Test\", append([]byte{0x04}, []byte(\"Test\")...)},\n\t\t// 2-byte varint + string\n\t\t{str256, str256, append([]byte{0x80, 0x02}, []byte(str256)...)},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tvar buf bytes.Buffer\n\t\terr := WriteVarString(&buf, tt.in)\n\t\trequire.NoError(t, err, \"WriteVarString #%d \", no)\n\t\tassert.Equal(t, buf.Bytes(), tt.buf, \"WriteVarString #%d\", no)\n\n\t\trbuf := bytes.NewReader(tt.buf)\n\t\tval, err := ReadVarString(rbuf)\n\t\trequire.NoError(t, err, \"ReadVarString #%d\", no)\n\t\tassert.Equal(t, val, tt.out, \"ReadVarString #%d\", no)\n\t\tassert.Len(t, tt.buf, VarStringSerializeSize(tt.in))\n\t}\n}\n\n// TestVarStringEncodingErrors performs negative tests against encode and\n// decode of variable length strings to confirm error paths work correctly.\nfunc TestVarStringEncodingErrors(t *testing.T) {\n\t// str256 is a string that takes a 2-byte varint to encode.\n\tstr256 := strings.Repeat(\"test\", 64)\n\n\ttests := []struct {\n\t\tin       string // Value to encode\n\t\tbuf      []byte // Encoding bytes\n\t\tmax      int    // Max size of fixed buffer to induce errors\n\t\twriteErr error  // Expected write error\n\t\treadErr  error  // Expected read error\n\t}{\n\t\t// Latest protocol version with intentional read/write errors.\n\t\t// Force errors on empty string.\n\t\t{\"\", []byte{0x00}, 0, io.ErrShortWrite, io.EOF},\n\t\t// Force error on single byte varint + string.\n\t\t{\"Test\", []byte{0x04}, 2, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t// Force errors on 2-byte varint + string.\n\t\t{str256, []byte{0x80}, 1, io.ErrShortWrite, io.EOF},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tw := util.NewFixedWriter(tt.max)\n\t\terr := WriteVarString(w, tt.in)\n\t\trequire.ErrorIs(t, err, tt.writeErr, \"WriteVarString #%d\", no)\n\n\t\tr := util.NewFixedReader(tt.max, tt.buf)\n\t\t_, err = ReadVarString(r)\n\t\trequire.ErrorIs(t, err, tt.readErr, \"ReadVarString #%d wrong\", no)\n\t}\n}\n\n// TestVarStringOverflowErrors performs tests to ensure deserializing variable\n// length strings intentionally crafted to use large values for the string\n// length are handled properly.  This could otherwise potentially be used as an\n// attack vector.\nfunc TestVarStringOverflowErrors(t *testing.T) {\n\ttests := []struct {\n\t\tbuf []byte // Encoding bytes\n\t}{\n\t\t{[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{[]byte{0x80, 0x80, 0x80, 0x11}},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\trbuf := bytes.NewReader(tt.buf)\n\t\t_, err := ReadVarString(rbuf)\n\t\tassert.Contains(t, err.Error(), \"variable length string is too long\", \"ReadVarString #%d\", no)\n\t}\n}\n\n// TestVarBytesEncoding tests encode and decode for variable length byte array.\nfunc TestVarBytesEncoding(t *testing.T) {\n\t// bytes256 is a byte array that takes a 2-byte varint to encode.\n\tbytes256 := bytes.Repeat([]byte{0x01}, 256)\n\n\ttests := []struct {\n\t\tin  []byte // Byte Array to write\n\t\tbuf []byte // Encoding bytes\n\t}{\n\t\t// Latest protocol version.\n\t\t// Empty byte array\n\t\t{[]byte{}, []byte{0x00}},\n\t\t// Single byte varint + byte array\n\t\t{[]byte{0x01}, []byte{0x01, 0x01}},\n\t\t// 2-byte varint + byte array\n\t\t{bytes256, append([]byte{0x80, 0x02}, bytes256...)},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tvar buf bytes.Buffer\n\t\terr := WriteVarBytes(&buf, tt.in)\n\t\trequire.NoError(t, err, \"WriteVarBytes #%d\", no)\n\t\tassert.Equal(t, buf.Bytes(), tt.buf, \"WriteVarBytes #%d\", no)\n\n\t\trbuf := bytes.NewReader(tt.buf)\n\t\tval, err := ReadVarBytes(rbuf)\n\t\trequire.NoError(t, err, \"ReadVarBytes #%d\", no)\n\t\tassert.Equal(t, buf.Bytes(), tt.buf, \"ReadVarBytes #%d\", no)\n\t\tassert.Equal(t, val, tt.in, \"ReadVarBytes #%d\", no)\n\t\tassert.Len(t, tt.buf, VarBytesSerializeSize(tt.in))\n\t}\n}\n\n// TestVarBytesEncodingErrors performs negative tests against encode and\n// decode of variable length byte arrays to confirm error paths work correctly.\nfunc TestVarBytesEncodingErrors(t *testing.T) {\n\t// bytes256 is a byte array that takes a 2-byte varint to encode.\n\tbytes256 := bytes.Repeat([]byte{0x01}, 256)\n\n\ttests := []struct {\n\t\tin       []byte // Byte Array to write\n\t\tbuf      []byte // Encoding bytes\n\t\tmax      int    // Max size of fixed buffer to induce errors\n\t\twriteErr error  // Expected write error\n\t\treadErr  error  // Expected read error\n\t}{\n\t\t// Latest protocol version with intentional read/write errors.\n\t\t// Force errors on empty byte array.\n\t\t{[]byte{}, []byte{0x00}, 0, io.ErrShortWrite, io.EOF},\n\t\t// Force error on single byte varint + byte array.\n\t\t{[]byte{0x01, 0x02, 0x03}, []byte{0x04}, 2, io.ErrShortWrite, io.ErrUnexpectedEOF},\n\t\t// Force errors on 2-byte varint + byte array.\n\t\t{bytes256, []byte{0x80}, 1, io.ErrShortWrite, io.EOF},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\tw := util.NewFixedWriter(tt.max)\n\t\terr := WriteVarBytes(w, tt.in)\n\t\trequire.ErrorIs(t, err, tt.writeErr, \"WriteVarBytes #%d\", no)\n\n\t\tr := util.NewFixedReader(tt.max, tt.buf)\n\t\t_, err = ReadVarBytes(r)\n\t\trequire.ErrorIs(t, err, tt.readErr, \"ReadVarBytes #%d\", no)\n\t}\n}\n\n// TestVarBytesOverflowErrors performs tests to ensure deserializing variable\n// length byte arrays intentionally crafted to use large values for the array\n// length are handled properly. This could otherwise potentially be used as an\n// attack vector.\nfunc TestVarBytesOverflowErrors(t *testing.T) {\n\ttests := []struct {\n\t\tbuf []byte\n\t}{\n\t\t{[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{[]byte{0x80, 0x80, 0x80, 0x11}},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\trbuf := bytes.NewReader(tt.buf)\n\t\t_, err := ReadVarBytes(rbuf)\n\t\tassert.Contains(t, err.Error(), \"variable length byte array is too long\", \"ReadVarString #%d\", no)\n\t}\n}\n\n// TestVarInt performs tests to ensure deserializing variable integers are\n// handled properly. This could otherwise potentially be used as an attack\n// vector.\nfunc TestVarInt(t *testing.T) {\n\ttests := []struct {\n\t\tin  uint64 // Value to encode\n\t\tbuf []byte // Encoded bytes\n\t}{\n\t\t{uint64(0x0), []byte{0x00}},\n\t\t{uint64(0xff), []byte{0xff, 0x01}},\n\t\t{uint64(0x7fff), []byte{0xff, 0xff, 0x01}},\n\t\t{uint64(0x3fffff), []byte{0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0x1fffffff), []byte{0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0xfffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0x7ffffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0x3ffffffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0x1ffffffffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0xffffffffffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}},\n\t\t{uint64(0x200), []byte{0x80, 0x04}},\n\t\t{uint64(0x027f), []byte{0xff, 0x04}},\n\t\t{uint64(0xff00000000), []byte{0x80, 0x80, 0x80, 0x80, 0xf0, 0x1f}},\n\t\t{uint64(0xffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0x0f}},\n\t\t{uint64(0x100000000), []byte{0x80, 0x80, 0x80, 0x80, 0x10}},\n\t\t{uint64(0x7ffffffff), []byte{0xff, 0xff, 0xff, 0xff, 0x7f}},\n\t\t{uint64(0x800000000), []byte{0x80, 0x80, 0x80, 0x80, 0x80, 0x1}},\n\t}\n\tfor no, tt := range tests {\n\t\tvar buf bytes.Buffer\n\t\terr := WriteVarInt(&buf, tt.in)\n\t\trequire.NoError(t, err, \"WriteVarInt #%d\", no)\n\t\tassert.Equal(t, buf.Bytes(), tt.buf, \"WriteVarInt #%d\", no)\n\n\t\tval, err := ReadVarInt(&buf)\n\t\trequire.NoError(t, err, \"ReadVarInt #%d\", no)\n\t\tassert.Equal(t, val, tt.in, \"ReadVarInt #%d\", no)\n\t\tassert.Len(t, tt.buf, VarIntSerializeSize(tt.in))\n\t}\n}\n\n// TestVarIntError ensures variable length integers that are not encoded\n// properly return the expected error.\nfunc TestVarIntError(t *testing.T) {\n\ttests := []struct {\n\t\tin      []byte // Value to decode\n\t\treadErr error\n\t}{\n\t\t{\n\t\t\t[]byte{0x98, 0}, ErrNonCanonical,\n\t\t},\n\t\t{\n\t\t\t[]byte{0xFF}, io.EOF,\n\t\t},\n\t\t{\n\t\t\t[]byte{0x80, 0x00}, ErrNonCanonical,\n\t\t},\n\t\t{\n\t\t\t[]byte{0x80, 0xfe}, io.EOF,\n\t\t},\n\t\t{\n\t\t\t[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02}, ErrOverflow,\n\t\t},\n\t\t{\n\t\t\t[]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, ErrOverflow,\n\t\t},\n\t}\n\n\tt.Logf(\"Running %d tests\", len(tests))\n\tfor no, tt := range tests {\n\t\trbuf := bytes.NewReader(tt.in)\n\t\tval, err := ReadVarInt(rbuf)\n\t\trequire.ErrorIs(t, err, tt.readErr, \"ReadVarInt #%d\", no)\n\t\tassert.Zero(t, val, \"ReadVarInt #%d\", no)\n\t}\n}\n\nfunc TestVarIntRandom(t *testing.T) {\n\tmax := new(big.Int).SetUint64(^uint64(0)) // max uint64\n\trandIntBig, _ := rand.Int(rand.Reader, max)\n\trandInt1 := randIntBig.Uint64()\n\n\tvar wBuf bytes.Buffer\n\terr := WriteVarInt(&wBuf, randInt1)\n\trequire.NoError(t, err)\n\n\trBuf := bytes.NewReader(wBuf.Bytes())\n\trandInt2, err := ReadVarInt(rBuf)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, randInt1, randInt2)\n}\n\nfunc TestWriteElements(t *testing.T) {\n\tel1 := uint8(1)\n\tel2 := uint16(2)\n\tel3 := uint32(3)\n\tel4 := uint64(4)\n\tvar buf bytes.Buffer\n\terr := WriteElements(&buf, &el1, &el2, &el3, &el4)\n\trequire.NoError(t, err)\n\tassert.Equal(t, []byte{0x1, 0x2, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, buf.Bytes())\n}\n\nfunc TestReadElements(t *testing.T) {\n\tel1 := uint8(1)\n\tel2 := uint16(2)\n\tel3 := uint32(3)\n\tel4 := uint64(4)\n\tr := bytes.NewReader([]byte{0x1, 0x2, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})\n\terr := ReadElements(r, &el1, &el2, &el3, &el4)\n\trequire.NoError(t, err)\n\tassert.Equal(t, uint8(1), el1)\n\tassert.Equal(t, uint16(2), el2)\n\tassert.Equal(t, uint32(3), el3)\n\tassert.Equal(t, uint64(4), el4)\n}\n"
  },
  {
    "path": "util/htpasswd/htpasswd.go",
    "content": "package htpasswd\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"strings\"\n\n\t\"golang.org/x/crypto/bcrypt\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nconst (\n\t// passwordSeparator defines the separator used in basic auth credentials (username:password).\n\tpasswordSeparator = \":\"\n)\n\nvar (\n\tErrInvalidUser             = errors.New(\"user is invalid\")\n\tErrFailedToParseBasicAuth  = errors.New(\"the provided basic authentication credentials are invalid\")\n\tErrMetadataNotFound        = errors.New(\"metadata not found\")\n\tErrAuthHeaderNotFound      = errors.New(\"authorization header not found\")\n\tErrFailedToDecodeBasicAuth = errors.New(\"failed to decode authorization header\")\n\tErrAuthHeaderInvalidFormat = errors.New(\"invalid authorization header format\")\n\tErrInvalidPassword         = errors.New(\"password is invalid\")\n)\n\n// CompareBasicAuth compares a stored credential (username:password_hash) with a provided username and password.\n// It uses bcrypt to securely compare the password hash stored in the credential with the provided password.\nfunc CompareBasicAuth(storedCredential, user, password string) error {\n\tstoredUser, storedPasswordHash, err := ExtractBasicAuth(storedCredential)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif storedUser != user {\n\t\treturn ErrInvalidUser\n\t}\n\n\tif err := bcrypt.CompareHashAndPassword([]byte(storedPasswordHash), []byte(password)); err != nil {\n\t\treturn ErrInvalidPassword\n\t}\n\n\treturn nil\n}\n\n// ExtractBasicAuth extracts the user and password or password hash from the given basic auth credential.\n// The credential should be in the form \"user:password\" or \"user:password_hahs\".\nfunc ExtractBasicAuth(basicAuthCredential string) (user, password string, err error) {\n\tparts := strings.SplitN(basicAuthCredential, passwordSeparator, 2)\n\tif len(parts) != 2 {\n\t\treturn \"\", \"\", ErrFailedToParseBasicAuth\n\t}\n\n\tuser = parts[0]\n\tpassword = parts[1]\n\n\treturn user, password, nil\n}\n\n// ExtractBasicAuthFromContext extracts the user and password from the incoming context in gRPC request.\nfunc ExtractBasicAuthFromContext(ctx context.Context) (user, password string, err error) {\n\tmd, ok := metadata.FromIncomingContext(ctx)\n\tif !ok {\n\t\treturn \"\", \"\", ErrMetadataNotFound\n\t}\n\n\tauthHeader, ok := md[\"authorization\"]\n\tif !ok || len(authHeader) == 0 {\n\t\treturn \"\", \"\", ErrAuthHeaderNotFound\n\t}\n\n\tauth := strings.TrimPrefix(authHeader[0], \"Basic \")\n\tdecoded, err := base64.StdEncoding.DecodeString(auth)\n\tif err != nil {\n\t\treturn \"\", \"\", ErrFailedToDecodeBasicAuth\n\t}\n\n\tparts := strings.SplitN(string(decoded), \":\", 2)\n\tif len(parts) != 2 {\n\t\treturn \"\", \"\", ErrAuthHeaderInvalidFormat\n\t}\n\n\treturn parts[0], parts[1], nil\n}\n"
  },
  {
    "path": "util/htpasswd/htpasswd_test.go",
    "content": "package htpasswd\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nfunc TestExtractBasicAuth(t *testing.T) {\n\ttests := []struct {\n\t\tinput           string\n\t\tuser            string\n\t\tencodedPassword string\n\t}{\n\t\t{\n\t\t\tinput:           \"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t\tuser:            \"user\",\n\t\t\tencodedPassword: \"$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t},\n\t\t{\n\t\t\tinput:           \"user1:$2y$10$/4EcZtrJUgivhcTJPGOz/uhQEUAQP.zvThFwIHwdjQT97iL4gWMri\",\n\t\t\tuser:            \"user1\",\n\t\t\tencodedPassword: \"$2y$10$/4EcZtrJUgivhcTJPGOz/uhQEUAQP.zvThFwIHwdjQT97iL4gWMri\",\n\t\t},\n\t\t{\n\t\t\tinput:           \"user2:$2y$10$xXmx6BQv6re3P2sOAoPGNu/MJOwWxDtxtNzlEJ2qkUVRK6SqAXD9m\",\n\t\t\tuser:            \"user2\",\n\t\t\tencodedPassword: \"$2y$10$xXmx6BQv6re3P2sOAoPGNu/MJOwWxDtxtNzlEJ2qkUVRK6SqAXD9m\",\n\t\t},\n\t\t{\n\t\t\tinput:           \"user3:$2y$10$eKLWzld7iMPrcyDqam8.Y.R1deeSUBWFD3P6eQHJ0Iqa1qR4yBxaq\",\n\t\t\tuser:            \"user3\",\n\t\t\tencodedPassword: \"$2y$10$eKLWzld7iMPrcyDqam8.Y.R1deeSUBWFD3P6eQHJ0Iqa1qR4yBxaq\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.user, func(t *testing.T) {\n\t\t\tuser, encodedPass, err := ExtractBasicAuth(tt.input)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\n\t\t\trequire.Equal(t, tt.input, user+\":\"+encodedPass)\n\t\t})\n\t}\n}\n\nfunc TestCompareBasicAuth(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\tinput       string\n\t\tuser        string\n\t\tpassword    string\n\t\texpectError error\n\t}{\n\t\t{\n\t\t\tname:        \"SuccessfulAuthentication\",\n\t\t\tinput:       \"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\", // hashed 'foobar'\n\t\t\tuser:        \"user\",\n\t\t\tpassword:    \"foobar\",\n\t\t\texpectError: nil,\n\t\t},\n\t\t{\n\t\t\tname:        \"UserMismatch\",\n\t\t\tinput:       \"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t\tuser:        \"wronguser\",\n\t\t\tpassword:    \"foobar\",\n\t\t\texpectError: ErrInvalidUser,\n\t\t},\n\t\t{\n\t\t\tname:        \"PasswordMismatch\",\n\t\t\tinput:       \"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t\tuser:        \"user\",\n\t\t\tpassword:    \"wrongpassword\",\n\t\t\texpectError: ErrInvalidPassword,\n\t\t},\n\t\t{\n\t\t\tname:        \"MalformedCredential\",\n\t\t\tinput:       \"malformed\",\n\t\t\tuser:        \"user\",\n\t\t\tpassword:    \"foobar\",\n\t\t\texpectError: ErrFailedToParseBasicAuth,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\terr := CompareBasicAuth(tt.input, tt.user, tt.password)\n\n\t\t\tif tt.expectError == nil {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t} else {\n\t\t\t\trequire.ErrorIs(t, err, tt.expectError)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc BenchmarkParseHtpasswd(b *testing.B) {\n\tauth := []string{\n\t\t\"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t\"user1:$2y$05$y9dWO1FBS34D7RSZSNZ6S.NjE3LMNBvSAwidgTrER/AHBNN9cBeR.\",\n\t\t\"user2:$2y$11$RuWzAY2N57m.iZuT9bUh2ufOj2nNd02BviZSVx2Hbid8PvonjPWRi\",\n\t\t\"user3:$2y$09$866UNklDooeXGSd6MI/XPu1Fg9.2nTX6dFnPsEdgtBY6HMF5.NhPq\",\n\t}\n\n\tb.ReportAllocs()\n\n\tfor b.Loop() {\n\t\tfor _, a := range auth {\n\t\t\t_, _, err := ExtractBasicAuth(a)\n\t\t\tif err != nil {\n\t\t\t\tb.Fatal(err)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc BenchmarkCompareBasicAuth(b *testing.B) {\n\ttests := []struct {\n\t\tinput    string\n\t\tuser     string\n\t\tpassword string\n\t}{\n\t\t{\n\t\t\tinput:    \"user:$2y$10$q6I6fxG2c79jBSXJ8L2jde15czipSRpu/uhW5Le.ooJLyfXiaPDZG\",\n\t\t\tuser:     \"user\",\n\t\t\tpassword: \"foobar\",\n\t\t},\n\t\t{\n\t\t\tinput:    \"user1:$2y$05$y9dWO1FBS34D7RSZSNZ6S.NjE3LMNBvSAwidgTrER/AHBNN9cBeR.\",\n\t\t\tuser:     \"user1\",\n\t\t\tpassword: \"foobar1\",\n\t\t},\n\t\t{\n\t\t\tinput:    \"user2:$2y$11$RuWzAY2N57m.iZuT9bUh2ufOj2nNd02BviZSVx2Hbid8PvonjPWRi\",\n\t\t\tuser:     \"user2\",\n\t\t\tpassword: \"foobar2\",\n\t\t},\n\t\t{\n\t\t\tinput:    \"user3:$2y$09$866UNklDooeXGSd6MI/XPu1Fg9.2nTX6dFnPsEdgtBY6HMF5.NhPq\",\n\t\t\tuser:     \"user3\",\n\t\t\tpassword: \"foobar3\",\n\t\t},\n\t}\n\n\tb.ReportAllocs()\n\n\tfor b.Loop() {\n\t\tfor _, tt := range tests {\n\t\t\t_ = CompareBasicAuth(tt.input, tt.user, tt.password)\n\t\t}\n\t}\n}\n\nfunc TestExtractBasicAuthFromContext(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\tctx         context.Context\n\t\twantUser    string\n\t\twantPass    string\n\t\texpectError error\n\t}{\n\t\t{\n\t\t\tname:        \"ValidCredentials\",\n\t\t\tctx:         createTestContext(\"Basic \" + base64.StdEncoding.EncodeToString([]byte(\"user:password\"))),\n\t\t\twantUser:    \"user\",\n\t\t\twantPass:    \"password\",\n\t\t\texpectError: nil,\n\t\t},\n\t\t{\n\t\t\tname:        \"InvalidEncoding\",\n\t\t\tctx:         createTestContext(\"Basic user:password\"),\n\t\t\twantUser:    \"\",\n\t\t\twantPass:    \"\",\n\t\t\texpectError: ErrFailedToDecodeBasicAuth,\n\t\t},\n\t\t{\n\t\t\tname:        \"NoMetadata\",\n\t\t\tctx:         t.Context(),\n\t\t\twantUser:    \"\",\n\t\t\twantPass:    \"\",\n\t\t\texpectError: ErrMetadataNotFound,\n\t\t},\n\t\t{\n\t\t\tname:        \"NoAuthorizationHeader\",\n\t\t\tctx:         metadata.NewIncomingContext(t.Context(), metadata.MD{}),\n\t\t\twantUser:    \"\",\n\t\t\twantPass:    \"\",\n\t\t\texpectError: ErrAuthHeaderNotFound,\n\t\t},\n\t\t{\n\t\t\tname:        \"IncorrectFormat\",\n\t\t\tctx:         createTestContext(\"Basic \" + base64.StdEncoding.EncodeToString([]byte(\"userpassword\"))),\n\t\t\twantUser:    \"\",\n\t\t\twantPass:    \"\",\n\t\t\texpectError: ErrAuthHeaderInvalidFormat,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tuser, pass, err := ExtractBasicAuthFromContext(tt.ctx)\n\t\t\tif tt.expectError == nil {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t} else {\n\t\t\t\trequire.ErrorIs(t, err, tt.expectError)\n\t\t\t}\n\t\t\tif user != tt.wantUser || pass != tt.wantPass {\n\t\t\t\tt.Errorf(\"ExtractBasicAuthFromContext() got = %v, %v, want %v, %v\", user, pass, tt.wantUser, tt.wantPass)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc createTestContext(authValue string) context.Context {\n\tmd := metadata.New(map[string]string{\"authorization\": authValue})\n\n\treturn metadata.NewIncomingContext(context.Background(), md)\n}\n"
  },
  {
    "path": "util/io.go",
    "content": "package util\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nfunc IsAbsPath(path string) bool {\n\treturn filepath.IsAbs(path)\n}\n\nfunc MakeAbs(path string) string {\n\tif IsAbsPath(path) {\n\t\treturn path\n\t}\n\twd, err := os.Getwd()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn filepath.Clean(filepath.Join(wd, path))\n}\n\nfunc ReadFile(filename string) ([]byte, error) {\n\treturn os.ReadFile(filename)\n}\n\nfunc WriteFile(filename string, data []byte) error {\n\t// create directory\n\tif err := Mkdir(filepath.Dir(filename)); err != nil {\n\t\treturn err\n\t}\n\tif err := os.WriteFile(filename, data, 0o600); err != nil {\n\t\treturn fmt.Errorf(\"failed to write to %s: %w\", filename, err)\n\t}\n\n\treturn nil\n}\n\nfunc Mkdir(path string) error {\n\t// create the directory\n\tif err := os.MkdirAll(path, 0o750); err != nil {\n\t\treturn fmt.Errorf(\"could not create directory %s\", path)\n\t}\n\n\treturn nil\n}\n\nfunc IsDir(path string) bool {\n\tfi, err := os.Stat(path)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn fi.IsDir()\n}\n\nfunc PathExists(path string) bool {\n\t_, err := os.Stat(path)\n\tif os.IsNotExist(err) {\n\t\treturn false\n\t}\n\n\treturn err == nil\n}\n\nfunc TempDirPath() string {\n\tpath, err := os.MkdirTemp(\"\", \"pactus*\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn path\n}\n\nfunc TempFilePath() string {\n\treturn filepath.Join(TempDirPath(), \"file\")\n}\n\n// IsDirEmpty checks if a directory is empty.\nfunc IsDirEmpty(path string) bool {\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer func() {\n\t\t_ = file.Close()\n\t}()\n\n\t// read in ONLY one file\n\t_, err = file.Readdir(1)\n\n\t// and if the file is EOF... well, the dir is empty.\n\treturn errors.Is(err, io.EOF)\n}\n\n// IsDirNotExistsOrEmpty checks if the path exists and, if so, whether the directory is empty.\nfunc IsDirNotExistsOrEmpty(path string) bool {\n\tif !PathExists(path) {\n\t\treturn true\n\t}\n\n\treturn IsDirEmpty(path)\n}\n\nfunc IsValidDirPath(path string) bool {\n\tfi, err := os.Stat(path)\n\tif err == nil {\n\t\tif fi.IsDir() {\n\t\t\tif err := os.WriteFile(path+\"/test\", []byte{}, 0o600); err != nil {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t_ = os.Remove(path + \"/test\")\n\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\tif err := Mkdir(path); err != nil {\n\t\treturn false\n\t}\n\t_ = os.Remove(path)\n\n\treturn true\n}\n\n// TODO: move these to a test suite\n\n// FixedWriter implements the io.Writer interface and intentionally allows\n// testing of error paths by forcing short writes.\ntype FixedWriter struct {\n\tb   []byte\n\tpos int\n}\n\n// Write writes the contents of p to w. When the contents of p would cause\n// the writer to exceed the maximum allowed size of the fixed writer,\n// io.ErrShortWrite is returned and the writer is left unchanged.\n//\n// This satisfies the io.Writer interface.\nfunc (w *FixedWriter) Write(data []byte) (int, error) {\n\tlenp := len(data)\n\n\tif w.pos+lenp > cap(w.b) {\n\t\treturn 0, io.ErrShortWrite\n\t}\n\n\tw.pos += copy(w.b[w.pos:], data)\n\n\treturn lenp, nil\n}\n\n// Bytes returns the bytes already written to the fixed writer.\nfunc (w *FixedWriter) Bytes() []byte {\n\treturn w.b\n}\n\n// NewFixedWriter returns a new io.Writer that will error once more bytes than\n// the specified max have been written.\nfunc NewFixedWriter(max int) *FixedWriter {\n\tb := make([]byte, max)\n\tfw := FixedWriter{b, 0}\n\n\treturn &fw\n}\n\n// FixedReader implements the io.Reader interface and intentionally allows\n// testing of error paths by forcing short reads.\ntype FixedReader struct {\n\tbuf   []byte\n\tpos   int\n\tiobuf *bytes.Buffer\n}\n\n// Read reads the next len(p) bytes from the fixed reader.  When the number of\n// bytes read would exceed the maximum number of allowed bytes to be read from\n// the fixed writer, an error is returned.\n//\n// This satisfies the io.Reader interface.\nfunc (fr *FixedReader) Read(p []byte) (int, error) {\n\tcount, err := fr.iobuf.Read(p)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tfr.pos += count\n\n\treturn count, nil\n}\n\n// NewFixedReader returns a new io.Reader that will error once more bytes than\n// the specified max have been read.\nfunc NewFixedReader(max int, data []byte) *FixedReader {\n\tbuf := make([]byte, max)\n\tif data != nil {\n\t\tcopy(buf, data)\n\t}\n\n\tiobuf := bytes.NewBuffer(buf)\n\tfr := FixedReader{buf, 0, iobuf}\n\n\treturn &fr\n}\n\n// MoveDirectory moves a directory from srcDir to dstDir, including all its contents.\n// If dstDir already exists and is not empty, it returns an error.\n// If the parent directory of dstDir does not exist, it will be created.\nfunc MoveDirectory(srcDir, dstDir string) error {\n\tif PathExists(dstDir) {\n\t\treturn fmt.Errorf(\"destination directory %s already exists\", dstDir)\n\t}\n\n\tparentDir := filepath.Dir(dstDir)\n\tif err := Mkdir(parentDir); err != nil {\n\t\treturn fmt.Errorf(\"failed to create parent directories for %s: %w\", dstDir, err)\n\t}\n\n\terr := os.Rename(srcDir, dstDir)\n\tif err != nil {\n\t\t// To prevent invalid cross-device link perform a manual copy\n\t\tif err := copyDirectory(srcDir, dstDir); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to move directory from %s to %s: %w\", srcDir, dstDir, err)\n\t\t}\n\n\t\t// Remove source directory after successful copy\n\t\tif err := os.RemoveAll(srcDir); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to remove source directory %s: %w\", srcDir, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc copyDirectory(src, dst string) error {\n\treturn filepath.Walk(src, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\trelPath, err := filepath.Rel(src, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdstPath := filepath.Join(dst, relPath)\n\n\t\tif info.IsDir() {\n\t\t\treturn os.MkdirAll(dstPath, info.Mode())\n\t\t}\n\n\t\treturn copyFile(path, dstPath, info)\n\t})\n}\n\nfunc copyFile(src, dst string, info os.FileInfo) error {\n\tinput, err := os.Open(src)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\t_ = input.Close()\n\t}()\n\n\tout, err := os.Create(dst)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\t_ = out.Close()\n\t}()\n\n\tif _, err = io.Copy(out, input); err != nil {\n\t\treturn err\n\t}\n\n\t// Preserve file permissions\n\treturn os.Chmod(dst, info.Mode())\n}\n\n// SanitizeArchivePath mitigates the \"Zip Slip\" vulnerability by sanitizing archive file paths.\n// It ensures that the file path is contained within the specified base directory to prevent directory\n// traversal attacks. For more details on the vulnerability, see https://snyk.io/research/zip-slip-vulnerability.\nfunc SanitizeArchivePath(baseDir, archivePath string) (fullPath string, err error) {\n\tfullPath = filepath.Join(baseDir, archivePath)\n\tif strings.HasPrefix(fullPath, filepath.Clean(baseDir)) {\n\t\treturn fullPath, nil\n\t}\n\n\treturn \"\", fmt.Errorf(\"%s: %s\", \"content filepath is tainted\", archivePath)\n}\n\ntype listFilesConfig struct {\n\texcludeDirs bool\n}\n\nvar defaultListFilesConfig = listFilesConfig{\n\texcludeDirs: false,\n}\n\ntype ListFilesOption func(*listFilesConfig)\n\n// ExcludeDirectories prevents entering subdirectories.\nfunc ExcludeDirectories() ListFilesOption {\n\treturn func(c *listFilesConfig) {\n\t\tc.excludeDirs = true\n\t}\n}\n\n// ListFilesInDir return list of files in directory.\nfunc ListFilesInDir(dir string, opts ...ListFilesOption) ([]string, error) {\n\tcfg := defaultListFilesConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tfiles := make([]string, 0)\n\tentries, err := os.ReadDir(dir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, entry := range entries {\n\t\tif cfg.excludeDirs && entry.IsDir() {\n\t\t\tcontinue\n\t\t}\n\n\t\tfulPath := filepath.Join(dir, entry.Name())\n\t\tfiles = append(files, fulPath)\n\t}\n\n\treturn files, nil\n}\n\n// LimitReaderClose returns a ReadCloser that reads from r\n// but stops with EOF after n bytes.\n// The returned ReadCloser always forwards Close to r.\n// The underlying implementation is a *LimitedReadCloser.\nfunc LimitReaderClose(r io.ReadCloser, n int64) io.ReadCloser {\n\treturn &LimitedReadCloser{R: r, N: n}\n}\n\n// LimitedReadCloser reads from R but limits the amount of\n// data returned to just N bytes. Each call to Read updates N\n// to reflect the new amount remaining. Read returns EOF when\n// N <= 0 or when the underlying R returns EOF.\n// Close always calls R.Close.\ntype LimitedReadCloser struct {\n\tR io.ReadCloser // underlying reader with close support\n\tN int64         // max bytes remaining\n}\n\nfunc (l *LimitedReadCloser) Read(buf []byte) (n int, err error) {\n\tif l.N <= 0 {\n\t\treturn 0, io.EOF\n\t}\n\tif int64(len(buf)) > l.N {\n\t\tbuf = buf[:l.N]\n\t}\n\tn, err = l.R.Read(buf)\n\tl.N -= int64(n)\n\n\treturn n, err\n}\n\nfunc (l *LimitedReadCloser) Close() error {\n\treturn l.R.Close()\n}\n"
  },
  {
    "path": "util/io_test.go",
    "content": "package util\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nconst invalidDirName = \"/invalid:path/\\x00*folder?\\\\CON\"\n\nfunc TestWriteFile(t *testing.T) {\n\tp := TempDirPath()\n\td := []byte(\"some-data\")\n\trequire.NoError(t, WriteFile(p+\"/d.dat\", d))\n\trequire.NoError(t, WriteFile(p+\"/another-folder/d.dat\", d))\n}\n\nfunc TestEmptyPath(t *testing.T) {\n\tp := TempDirPath()\n\tassert.Equal(t, p, MakeAbs(p))\n\tassert.True(t, IsDirEmpty(p))\n\n\tf := TempFilePath()\n\td := []byte(\"pactus\")\n\trequire.NoError(t, WriteFile(f, d))\n\to, err := ReadFile(f)\n\trequire.NoError(t, err)\n\tassert.Equal(t, d, o)\n}\n\nfunc TestAbsPath(t *testing.T) {\n\tabs := MakeAbs(\".\")\n\tassert.True(t, IsAbsPath(abs))\n\tassert.False(t, IsAbsPath(\"abs\"))\n\tassert.False(t, IsDirEmpty(abs))\n\tassert.False(t, IsDirNotExistsOrEmpty(abs))\n}\n\nfunc TestTempDir(t *testing.T) {\n\ttmpDir := TempDirPath()\n\n\tassert.True(t, IsAbsPath(tmpDir))\n\tassert.True(t, IsDirEmpty(tmpDir))\n\tassert.True(t, PathExists(tmpDir))\n\tassert.True(t, IsDirNotExistsOrEmpty(tmpDir))\n}\n\nfunc TestTempFile(t *testing.T) {\n\ttmpFile := TempFilePath()\n\n\tassert.True(t, IsAbsPath(tmpFile))\n\tt.Run(\"Should panic because it doesn't exist\", func(t *testing.T) {\n\t\tdefer func() {\n\t\t\tif r := recover(); r == nil {\n\t\t\t\tt.Error(\"The code did not panic\")\n\t\t\t}\n\t\t}()\n\t\tIsDirEmpty(tmpFile)\n\t})\n\tassert.False(t, PathExists(tmpFile))\n\tassert.True(t, IsDirNotExistsOrEmpty(tmpFile))\n\trequire.NoError(t, Mkdir(tmpFile))\n\tassert.True(t, IsDirNotExistsOrEmpty(tmpFile))\n\tassert.True(t, IsDirEmpty(tmpFile)) // no panic now\n}\n\nfunc isRoot() bool {\n\tcmd := exec.CommandContext(context.Background(), \"id\", \"-u\")\n\toutput, err := cmd.Output()\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// 0 = root, 501 = non-root user\n\ti, err := strconv.Atoi(string(output[:len(output)-1]))\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\treturn i == 0\n}\n\nfunc TestIsValidPath(t *testing.T) {\n\t// To pass this tests inside docker\n\tif runtime.GOOS != \"windows\" && !isRoot() {\n\t\tassert.False(t, IsValidDirPath(\"/root\"))\n\t\tassert.False(t, IsValidDirPath(\"/test\"))\n\t}\n\tassert.False(t, IsValidDirPath(invalidDirName))\n\tassert.False(t, IsValidDirPath(\"./io_test.go\"))\n\tassert.True(t, IsValidDirPath(\"/tmp\"))\n\tassert.True(t, IsValidDirPath(\"/tmp/pactus\"))\n}\n\nfunc TestMoveDirectory(t *testing.T) {\n\tt.Run(\"DestinationDirectoryExistsAndNotEmpty\", func(t *testing.T) {\n\t\tsrcDir := TempDirPath()\n\t\tdstDir := TempDirPath()\n\n\t\terr := MoveDirectory(srcDir, dstDir)\n\t\trequire.Error(t, err)\n\t\tassert.Contains(t, err.Error(), \"destination directory\")\n\t})\n\n\tt.Run(\"ParentDirectoryCreationFailure\", func(t *testing.T) {\n\t\tsrcDir := TempDirPath()\n\n\t\terr := MoveDirectory(srcDir, invalidDirName)\n\t\trequire.Error(t, err)\n\t\tassert.Contains(t, err.Error(), \"failed to create parent directories\")\n\t})\n\n\tt.Run(\"SourceDirectoryRenameFailure\", func(t *testing.T) {\n\t\tsrcDir := TempDirPath()\n\t\tdstDir := TempDirPath()\n\n\t\terr := os.RemoveAll(dstDir)\n\t\trequire.NoError(t, err)\n\n\t\t// Remove the source directory to simulate the rename failure\n\t\terr = os.RemoveAll(srcDir)\n\t\trequire.NoError(t, err)\n\n\t\terr = MoveDirectory(srcDir, dstDir)\n\t\trequire.Error(t, err)\n\t\tassert.Contains(t, err.Error(), \"failed to move directory\")\n\t})\n\n\tt.Run(\"MoveDirectorySuccess\", func(t *testing.T) {\n\t\t// Create temporary directories\n\t\tsrcDir := TempDirPath()\n\t\tdstDir := TempDirPath()\n\t\tdefer func() { _ = os.RemoveAll(srcDir) }()\n\t\tdefer func() { _ = os.RemoveAll(dstDir) }()\n\n\t\t// Create a subdirectory in the source directory\n\t\tsubDir := filepath.Join(srcDir, \"subdir\")\n\t\terr := Mkdir(subDir)\n\t\trequire.NoError(t, err)\n\n\t\t// Create multiple files in the subdirectory\n\t\tfiles := []struct {\n\t\t\tname    string\n\t\t\tcontent string\n\t\t}{\n\t\t\t{\"file1.txt\", \"content 1\"},\n\t\t\t{\"file2.txt\", \"content 2\"},\n\t\t}\n\n\t\tfor _, file := range files {\n\t\t\tfilePath := filepath.Join(subDir, file.name)\n\t\t\terr = WriteFile(filePath, []byte(file.content))\n\t\t\trequire.NoError(t, err)\n\t\t}\n\n\t\t// Move the directory\n\t\tdstDirPath := filepath.Join(dstDir, \"movedir\")\n\t\terr = MoveDirectory(srcDir, dstDirPath)\n\t\trequire.NoError(t, err)\n\n\t\t// Assert the source directory no longer exists\n\t\tassert.False(t, PathExists(srcDir))\n\n\t\t// Assert the destination directory exists\n\t\tassert.True(t, PathExists(dstDirPath))\n\n\t\t// Verify that all files have been moved and their contents are correct\n\t\tfor _, file := range files {\n\t\t\tmovedFilePath := filepath.Join(dstDirPath, \"subdir\", file.name)\n\t\t\tdata, err := ReadFile(movedFilePath)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, file.content, string(data))\n\t\t}\n\t})\n}\n\nfunc TestSanitizeArchivePath(t *testing.T) {\n\tif runtime.GOOS == \"windows\" {\n\t\treturn\n\t}\n\n\tbaseDir := \"/safe/directory\"\n\n\ttests := []struct {\n\t\tname      string\n\t\tinputPath string\n\t\texpected  string\n\t\texpectErr bool\n\t}{\n\t\t{\"Valid path\", \"file.txt\", \"/safe/directory/file.txt\", false},\n\t\t{\"Valid path in subdirectory\", \"subdir/file.txt\", \"/safe/directory/subdir/file.txt\", false},\n\t\t{\"Path with parent directory traversal\", \"../outside/file.txt\", \"\", true},\n\t\t{\"Absolute path outside base directory\", \"/etc/passwd\", \"/safe/directory/etc/passwd\", false},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tresult, err := SanitizeArchivePath(baseDir, tt.inputPath)\n\t\t\tif tt.expectErr {\n\t\t\t\trequire.Error(t, err, \"Expected error but got none\")\n\t\t\t\tassert.Empty(t, result, \"Expected empty result due to error\")\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err, \"Unexpected error occurred\")\n\t\t\t\tassert.Equal(t, tt.expected, result, \"Sanitized path did not match expected\")\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestListFilesInDir(t *testing.T) {\n\ttmpDir := TempDirPath()\n\n\tfile1Path := filepath.Join(tmpDir, \"public_file\")\n\tfile1, err := os.Create(file1Path)\n\trequire.NoError(t, err)\n\trequire.NoError(t, file1.Close())\n\n\tfile2Path := filepath.Join(tmpDir, \".hidden_file\")\n\tfile2, err := os.Create(file2Path)\n\trequire.NoError(t, err)\n\trequire.NoError(t, file2.Close())\n\n\tfile3Path := filepath.Join(tmpDir, \"directory\")\n\terr = Mkdir(file3Path)\n\trequire.NoError(t, err)\n\n\tfile4Path := filepath.Join(file3Path, \"file_in_directory\")\n\terr = Mkdir(file4Path)\n\trequire.NoError(t, err)\n\n\tt.Run(\"Exclude Directories\", func(t *testing.T) {\n\t\tfiles, err := ListFilesInDir(tmpDir, ExcludeDirectories())\n\t\trequire.NoError(t, err)\n\n\t\tassert.Len(t, files, 2)\n\t\tassert.Contains(t, files, file1Path)\n\t\tassert.Contains(t, files, file2Path)\n\t})\n\n\tt.Run(\"Include Directories\", func(t *testing.T) {\n\t\tfiles, err := ListFilesInDir(tmpDir)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Len(t, files, 3)\n\t\tassert.Contains(t, files, file1Path)\n\t\tassert.Contains(t, files, file2Path)\n\t\tassert.Contains(t, files, file3Path)\n\t})\n}\n\nfunc TestLimitReaderClose(t *testing.T) {\n\t// Helper to create a ReadCloser from a byte slice\n\tnewReadCloser := func(data []byte) io.ReadCloser {\n\t\treturn io.NopCloser(bytes.NewReader(data))\n\t}\n\n\tt.Run(\"Read less than limit\", func(t *testing.T) {\n\t\tdata := []byte(\"hello world\")\n\t\tlimit := int64(5)\n\t\tr := LimitReaderClose(newReadCloser(data), limit)\n\t\tbuf := make([]byte, 10)\n\t\tn, err := r.Read(buf)\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int(limit), n)\n\t\tassert.Equal(t, data[:limit], buf[:n])\n\n\t\t// Next read should return EOF\n\t\tn, err = r.Read(buf)\n\t\tassert.Equal(t, 0, n)\n\t\tassert.Equal(t, io.EOF, err)\n\t\trequire.NoError(t, r.Close())\n\t})\n\n\tt.Run(\"Read exactly limit\", func(t *testing.T) {\n\t\tdata := []byte(\"hello world\")\n\t\tlimit := int64(len(data))\n\t\tr := LimitReaderClose(newReadCloser(data), limit)\n\t\tbuf := make([]byte, limit)\n\t\tn, err := r.Read(buf)\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, int(limit), n)\n\t\tassert.Equal(t, data, buf)\n\n\t\tn, err = r.Read(buf)\n\t\tassert.Equal(t, 0, n)\n\t\tassert.Equal(t, io.EOF, err)\n\n\t\trequire.NoError(t, r.Close())\n\t})\n\n\tt.Run(\"Read with zero limit\", func(t *testing.T) {\n\t\tdata := []byte(\"hello world\")\n\t\tr := LimitReaderClose(newReadCloser(data), 0)\n\t\tbuf := make([]byte, 10)\n\t\tn, err := r.Read(buf)\n\t\tassert.Equal(t, 0, n)\n\t\tassert.Equal(t, io.EOF, err)\n\n\t\trequire.NoError(t, r.Close())\n\t})\n\n\tt.Run(\"Underlying reader returns EOF before limit\", func(t *testing.T) {\n\t\tdata := []byte(\"short\")\n\t\tlimit := int64(10)\n\t\tr := LimitReaderClose(newReadCloser(data), limit)\n\t\tbuf := make([]byte, 10)\n\t\tn, err := r.Read(buf)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, len(data), n)\n\t\tassert.Equal(t, data, buf[:n])\n\n\t\tn, err = r.Read(buf)\n\t\tassert.Equal(t, 0, n)\n\t\tassert.Equal(t, io.EOF, err)\n\n\t\trequire.NoError(t, r.Close())\n\t})\n}\n\nfunc TestIsDir(t *testing.T) {\n\tassert.True(t, IsDir(TempDirPath()))\n\tassert.False(t, IsDir(TempFilePath()))\n}\n"
  },
  {
    "path": "util/ipblocker/ipblocker.go",
    "content": "package ipblocker\n\nimport (\n\t\"net\"\n)\n\ntype IPBlocker struct {\n\tcidrs []*net.IPNet\n}\n\nfunc New(bannedNets []string) (*IPBlocker, error) {\n\tipBlocker := &IPBlocker{\n\t\tcidrs: make([]*net.IPNet, 0),\n\t}\n\n\tfor _, cidr := range bannedNets {\n\t\t_, ipNet, err := net.ParseCIDR(cidr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tipBlocker.cidrs = append(ipBlocker.cidrs, ipNet)\n\t}\n\n\treturn ipBlocker, nil\n}\n\nfunc (i *IPBlocker) IsBanned(ip string) bool {\n\tparsedIP := net.ParseIP(ip)\n\tif parsedIP == nil {\n\t\treturn false\n\t}\n\n\t// TODO: if scaled cidrs and ips items we can improve using trie or radix tree\n\tfor _, cidr := range i.cidrs {\n\t\tif cidr.Contains(parsedIP) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "util/ipblocker/ipblocker_test.go",
    "content": "package ipblocker\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestNew(t *testing.T) {\n\ttests := []struct {\n\t\tname           string\n\t\tbannedNets     []string\n\t\texpectedError  bool\n\t\texpectedLength int\n\t}{\n\t\t{\n\t\t\t\"Valid CIDRs\",\n\t\t\t[]string{\"240e:390:8a1:ae80::/64\", \"192.168.1.0/24\"},\n\t\t\tfalse, 2,\n\t\t},\n\t\t{\"Invalid CIDR\", []string{\"invalid-cidr\"}, true, 0},\n\t\t{\"Empty CIDRs\", []string{}, false, 0},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tipBlocker, err := New(tt.bannedNets)\n\t\t\tif tt.expectedError {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Len(t, ipBlocker.cidrs, tt.expectedLength)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestIsBlocked(t *testing.T) {\n\ttests := []struct {\n\t\tname       string\n\t\tbannedNets []string\n\t\tip         string\n\t\texpected   bool\n\t}{\n\t\t{\n\t\t\t\"Blocked IPv6\",\n\t\t\t[]string{\"240e:390:8a1:ae80::/64\"},\n\t\t\t\"240e:390:8a1:ae80:7dbc:64b6:e84c:d2bf\", true,\n\t\t},\n\t\t{\n\t\t\t\"Not Blocked IPv6\",\n\t\t\t[]string{\"240e:390:8a1:ae80::/64\"},\n\t\t\t\"240e:391:8a1:ae80:7dbc:64b6:e84c:d2bf\", false,\n\t\t},\n\t\t{\"Blocked IPv4\", []string{\"192.168.1.0/24\"}, \"192.168.1.1\", true},\n\t\t{\"Not Blocked IPv4\", []string{\"192.168.1.0/24\"}, \"10.0.0.1\", false},\n\t\t{\"Empty CIDR List\", []string{}, \"192.168.1.1\", false},\n\t\t{\"Invalid IP\", []string{\"192.168.1.0/24\"}, \"invalid-ip\", false},\n\t\t{\n\t\t\t\"Blocked IPv4 in multiple CIDRs\",\n\t\t\t[]string{\"10.0.0.0/8\", \"192.168.1.0/24\"},\n\t\t\t\"192.168.1.1\", true,\n\t\t},\n\t\t{\n\t\t\t\"Blocked IPv6 in multiple CIDRs\",\n\t\t\t[]string{\"240e:390:8a1:ae80::/64\", \"2001:db8::/32\"},\n\t\t\t\"2001:db8::1\", true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tipBlocker, err := New(tt.bannedNets)\n\t\t\trequire.NoError(t, err)\n\t\t\tresult := ipBlocker.IsBanned(tt.ip)\n\t\t\tassert.Equal(t, tt.expected, result)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "util/linkedlist/linkedlist.go",
    "content": "package linkedlist\n\ntype Element[T any] struct {\n\tData T\n\tNext *Element[T]\n\tPrev *Element[T]\n}\n\nfunc NewElement[T any](data T) *Element[T] {\n\treturn &Element[T]{\n\t\tData: data,\n\t\tNext: nil,\n\t\tPrev: nil,\n\t}\n}\n\n// LinkedList represents a doubly linked list.\ntype LinkedList[T any] struct {\n\tHead   *Element[T]\n\tTail   *Element[T]\n\tlength int\n}\n\nfunc New[T any]() *LinkedList[T] {\n\treturn &LinkedList[T]{\n\t\tHead:   nil,\n\t\tTail:   nil,\n\t\tlength: 0,\n\t}\n}\n\n// InsertAtHead inserts a new element at the head of the list.\nfunc (ll *LinkedList[T]) InsertAtHead(data T) *Element[T] {\n\telm := NewElement(data)\n\tif ll.Head == nil {\n\t\t// Empty list case\n\t\tll.Head = elm\n\t\tll.Tail = elm\n\t} else {\n\t\telm.Next = ll.Head\n\t\tll.Head.Prev = elm\n\t\tll.Head = elm\n\t}\n\n\tll.length++\n\n\treturn elm\n}\n\n// InsertAtTail appends a new element at the tail of the list.\nfunc (ll *LinkedList[T]) InsertAtTail(data T) *Element[T] {\n\telm := NewElement(data)\n\tif ll.Head == nil {\n\t\t// Empty list case\n\t\tll.Head = elm\n\t\tll.Tail = elm\n\t} else {\n\t\telm.Prev = ll.Tail\n\t\tll.Tail.Next = elm\n\t\tll.Tail = elm\n\t}\n\n\tll.length++\n\n\treturn elm\n}\n\nfunc (ll *LinkedList[T]) InsertBefore(data T, pos *Element[T]) *Element[T] {\n\telm := NewElement[T](data)\n\tif pos == ll.Head {\n\t\tll.Head = elm\n\t\telm.Next = pos\n\t\telm.Next.Prev = elm\n\t} else {\n\t\telm.Prev = pos.Prev\n\t\telm.Next = pos\n\t\telm.Next.Prev = elm\n\t\telm.Prev.Next = elm\n\t}\n\tll.length++\n\n\treturn elm\n}\n\nfunc (ll *LinkedList[T]) InsertAfter(data T, pos *Element[T]) *Element[T] {\n\telm := NewElement[T](data)\n\tif pos == ll.Tail {\n\t\tll.Tail = elm\n\t\telm.Prev = pos\n\t\telm.Prev.Next = elm\n\t} else {\n\t\telm.Prev = pos\n\t\telm.Next = pos.Next\n\t\telm.Prev.Next = elm\n\t\telm.Next.Prev = elm\n\t}\n\tll.length++\n\n\treturn elm\n}\n\n// DeleteAtHead deletes the element at the head of the list.\nfunc (ll *LinkedList[T]) DeleteAtHead() {\n\tif ll.Head == nil {\n\t\t// Empty list case\n\t\treturn\n\t}\n\n\tll.Head = ll.Head.Next\n\tif ll.Head != nil {\n\t\tll.Head.Prev = nil\n\t} else {\n\t\tll.Tail = nil\n\t}\n\n\tll.length--\n}\n\n// DeleteAtTail deletes the element at the tail of the list.\nfunc (ll *LinkedList[T]) DeleteAtTail() {\n\tif ll.Tail == nil {\n\t\t// Empty list case\n\t\treturn\n\t}\n\n\tll.Tail = ll.Tail.Prev\n\tif ll.Tail != nil {\n\t\tll.Tail.Next = nil\n\t} else {\n\t\tll.Head = nil\n\t}\n\n\tll.length--\n}\n\n// Delete removes a specific element from the list.\nfunc (ll *LinkedList[T]) Delete(elm *Element[T]) {\n\tif elm.Prev != nil {\n\t\telm.Prev.Next = elm.Next\n\t} else {\n\t\tll.Head = elm.Next\n\t}\n\n\tif elm.Next != nil {\n\t\telm.Next.Prev = elm.Prev\n\t} else {\n\t\tll.Tail = elm.Prev\n\t}\n\n\tll.length--\n}\n\n// Length returns the number of elements in the list.\nfunc (ll *LinkedList[T]) Length() int {\n\treturn ll.length\n}\n\n// Values returns a slice of values in the list.\nfunc (ll *LinkedList[T]) Values() []T {\n\tvalues := []T{}\n\tcur := ll.Head\n\tfor cur != nil {\n\t\tvalues = append(values, cur.Data)\n\t\tcur = cur.Next\n\t}\n\n\treturn values\n}\n\n// Clear removes all elements from the list, making it empty.\nfunc (ll *LinkedList[T]) Clear() {\n\tll.Head = nil\n\tll.Tail = nil\n\tll.length = 0\n}\n"
  },
  {
    "path": "util/linkedlist/linkedlist_test.go",
    "content": "package linkedlist_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/linkedlist\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestDoublyLink_InsertAtHead(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\tlist.InsertAtHead(1)\n\tlist.InsertAtHead(2)\n\tlist.InsertAtHead(3)\n\tlist.InsertAtHead(4)\n\n\tassert.Equal(t, []int{4, 3, 2, 1}, list.Values())\n\tassert.Equal(t, 4, list.Length())\n\tassert.Equal(t, 4, list.Head.Data)\n\tassert.Equal(t, 1, list.Tail.Data)\n}\n\nfunc TestSinglyLink_InsertAtTail(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\tlist.InsertAtTail(1)\n\tlist.InsertAtTail(2)\n\tlist.InsertAtTail(3)\n\tlist.InsertAtTail(4)\n\n\tassert.Equal(t, []int{1, 2, 3, 4}, list.Values())\n\tassert.Equal(t, 4, list.Length())\n\tassert.Equal(t, 1, list.Head.Data)\n\tassert.Equal(t, 4, list.Tail.Data)\n}\n\nfunc TestDeleteAtHead(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\tlist.InsertAtTail(1)\n\tlist.InsertAtTail(2)\n\tlist.InsertAtTail(3)\n\n\tlist.DeleteAtHead()\n\tassert.Equal(t, []int{2, 3}, list.Values())\n\tassert.Equal(t, 2, list.Length())\n\n\tlist.DeleteAtHead()\n\tassert.Equal(t, []int{3}, list.Values())\n\tassert.Equal(t, 1, list.Length())\n\n\tlist.DeleteAtHead()\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n\n\tlist.DeleteAtHead()\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n}\n\nfunc TestDeleteAtTail(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\tlist.InsertAtTail(1)\n\tlist.InsertAtTail(2)\n\tlist.InsertAtTail(3)\n\n\tlist.DeleteAtTail()\n\tassert.Equal(t, []int{1, 2}, list.Values())\n\tassert.Equal(t, 2, list.Length())\n\n\tlist.DeleteAtTail()\n\tassert.Equal(t, []int{1}, list.Values())\n\tassert.Equal(t, 1, list.Length())\n\n\tlist.DeleteAtTail()\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n\n\tlist.DeleteAtTail()\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n}\n\nfunc TestDelete(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\telm1 := list.InsertAtTail(1)\n\telm2 := list.InsertAtTail(2)\n\telm3 := list.InsertAtTail(3)\n\telm4 := list.InsertAtTail(4)\n\n\tlist.Delete(elm1)\n\tassert.Equal(t, []int{2, 3, 4}, list.Values())\n\tassert.Equal(t, 3, list.Length())\n\n\tlist.Delete(elm4)\n\tassert.Equal(t, []int{2, 3}, list.Values())\n\tassert.Equal(t, 2, list.Length())\n\n\tlist.Delete(elm2)\n\tassert.Equal(t, []int{3}, list.Values())\n\tassert.Equal(t, 1, list.Length())\n\n\tlist.Delete(elm3)\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n}\n\nfunc TestClear(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\tlist.InsertAtTail(1)\n\tlist.InsertAtTail(2)\n\tlist.InsertAtTail(3)\n\n\tlist.Clear()\n\tassert.Equal(t, []int{}, list.Values())\n\tassert.Equal(t, 0, list.Length())\n}\n\nfunc TestInsertAfter(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\telm1 := list.InsertAtHead(1)\n\telm2 := list.InsertAfter(2, elm1)\n\tlist.InsertAfter(3, elm2)\n\tlist.InsertAfter(4, list.Head)\n\tlist.InsertAfter(5, list.Tail)\n\n\tassert.Equal(t, []int{1, 4, 2, 3, 5}, list.Values())\n}\n\nfunc TestInsertBefore(t *testing.T) {\n\tlist := linkedlist.New[int]()\n\telm1 := list.InsertAtHead(1)\n\telm2 := list.InsertBefore(2, elm1)\n\tlist.InsertBefore(3, elm2)\n\tlist.InsertBefore(4, list.Head)\n\tlist.InsertBefore(5, list.Tail)\n\n\tassert.Equal(t, []int{4, 3, 2, 5, 1}, list.Values())\n}\n"
  },
  {
    "path": "util/linkedmap/linkedmap.go",
    "content": "package linkedmap\n\nimport (\n\t\"github.com/pactus-project/pactus/util/linkedlist\"\n)\n\ntype Pair[K comparable, V any] struct {\n\tKey   K\n\tValue V\n}\n\ntype LinkedMap[K comparable, V any] struct {\n\tlist     *linkedlist.LinkedList[Pair[K, V]]\n\thashmap  map[K]*linkedlist.Element[Pair[K, V]]\n\tcapacity int\n}\n\n// New creates a new LinkedMap with the specified capacity.\nfunc New[K comparable, V any](capacity int) *LinkedMap[K, V] {\n\treturn &LinkedMap[K, V]{\n\t\tlist:     linkedlist.New[Pair[K, V]](),\n\t\thashmap:  make(map[K]*linkedlist.Element[Pair[K, V]]),\n\t\tcapacity: capacity,\n\t}\n}\n\n// SetCapacity sets the capacity of the LinkedMap and prunes the excess elements if needed.\nfunc (lm *LinkedMap[K, V]) SetCapacity(capacity int) {\n\tlm.capacity = capacity\n\n\tlm.prune()\n}\n\n// Has checks if the specified key exists in the LinkedMap.\nfunc (lm *LinkedMap[K, V]) Has(key K) bool {\n\t_, found := lm.hashmap[key]\n\n\treturn found\n}\n\n// PushBack adds a new key-value pair to the end of the LinkedMap.\nfunc (lm *LinkedMap[K, V]) PushBack(key K, value V) {\n\tnode, found := lm.hashmap[key]\n\tif found {\n\t\t// Update the value if the key already exists\n\t\tnode.Data.Value = value\n\n\t\treturn\n\t}\n\n\tp := Pair[K, V]{Key: key, Value: value}\n\tnode = lm.list.InsertAtTail(p)\n\tlm.hashmap[key] = node\n\n\tlm.prune()\n}\n\n// PushFront adds a new key-value pair to the beginning of the LinkedMap.\nfunc (lm *LinkedMap[K, V]) PushFront(key K, value V) {\n\tnode, found := lm.hashmap[key]\n\tif found {\n\t\t// Update the value if the key already exists\n\t\tnode.Data.Value = value\n\n\t\treturn\n\t}\n\n\tp := Pair[K, V]{Key: key, Value: value}\n\tnode = lm.list.InsertAtHead(p)\n\tlm.hashmap[key] = node\n\n\tlm.prune()\n}\n\n// GetNode returns the Element corresponding to the specified key.\nfunc (lm *LinkedMap[K, V]) GetNode(key K) *linkedlist.Element[Pair[K, V]] {\n\tnode, found := lm.hashmap[key]\n\tif found {\n\t\treturn node\n\t}\n\n\treturn nil\n}\n\n// TailNode returns the Element at the end (tail) of the LinkedMap.\nfunc (lm *LinkedMap[K, V]) TailNode() *linkedlist.Element[Pair[K, V]] {\n\tnode := lm.list.Tail\n\tif node == nil {\n\t\treturn nil\n\t}\n\n\treturn node\n}\n\nfunc (lm *LinkedMap[K, V]) RemoveTail() {\n\tlm.remove(lm.list.Tail)\n}\n\n// HeadNode returns the Element at the beginning (head) of the LinkedMap.\nfunc (lm *LinkedMap[K, V]) HeadNode() *linkedlist.Element[Pair[K, V]] {\n\tnode := lm.list.Head\n\tif node == nil {\n\t\treturn nil\n\t}\n\n\treturn node\n}\n\nfunc (lm *LinkedMap[K, V]) RemoveHead() {\n\tlm.remove(lm.list.Head)\n}\n\n// Remove removes the key-value pair with the specified key from the LinkedMap.\n// It returns true if the key was found and removed, otherwise false.\nfunc (lm *LinkedMap[K, V]) Remove(key K) bool {\n\telement, found := lm.hashmap[key]\n\tif found {\n\t\tlm.remove(element)\n\t}\n\n\treturn found\n}\n\n// remove removes the specified element pair from the LinkedMap.\nfunc (lm *LinkedMap[K, V]) remove(element *linkedlist.Element[Pair[K, V]]) {\n\tlm.list.Delete(element)\n\tdelete(lm.hashmap, element.Data.Key)\n}\n\n// Empty checks if the LinkedMap is empty (contains no key-value pairs).\nfunc (lm *LinkedMap[K, V]) Empty() bool {\n\treturn lm.Size() == 0\n}\n\n// Capacity returns the capacity of the LinkedMap.\nfunc (lm *LinkedMap[K, V]) Capacity() int {\n\treturn lm.capacity\n}\n\n// Size returns the number of key-value pairs in the LinkedMap.\nfunc (lm *LinkedMap[K, V]) Size() int {\n\treturn lm.list.Length()\n}\n\n// Full checks if the LinkedMap is full (reached its capacity).\nfunc (lm *LinkedMap[K, V]) Full() bool {\n\treturn lm.list.Length() == lm.capacity\n}\n\n// Clear removes all key-value pairs from the LinkedMap, making it empty.\nfunc (lm *LinkedMap[K, V]) Clear() {\n\tlm.list.Clear()\n\tlm.hashmap = make(map[K]*linkedlist.Element[Pair[K, V]])\n}\n\n// prune removes excess elements from the LinkedMap if its size exceeds the capacity.\nfunc (lm *LinkedMap[K, V]) prune() {\n\tif lm.capacity == 0 {\n\t\treturn\n\t}\n\n\tfor lm.list.Length() > lm.capacity {\n\t\thead := lm.list.Head\n\t\tkey := head.Data.Key\n\t\tlm.list.Delete(head)\n\t\tdelete(lm.hashmap, key)\n\t}\n}\n"
  },
  {
    "path": "util/linkedmap/linkedmap_test.go",
    "content": "package linkedmap\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestLinkedMap(t *testing.T) {\n\tt.Run(\"Test FirstNode\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\t\tassert.Nil(t, lmp.HeadNode())\n\n\t\tlmp.PushFront(3, \"c\")\n\t\tlmp.PushFront(2, \"b\")\n\t\tlmp.PushFront(1, \"a\")\n\n\t\tassert.Equal(t, 1, lmp.HeadNode().Data.Key)\n\t\tassert.Equal(t, \"a\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Test LastNode\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\t\tassert.Nil(t, lmp.TailNode())\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tassert.Equal(t, 3, lmp.TailNode().Data.Key)\n\t\tassert.Equal(t, \"c\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test Get\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tnode := lmp.GetNode(2)\n\t\tassert.Equal(t, 2, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tnode = lmp.GetNode(5)\n\t\tassert.Nil(t, node)\n\t})\n\n\tt.Run(\"Test Remove\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tassert.True(t, lmp.Remove(2))\n\t\tassert.False(t, lmp.Remove(2))\n\t})\n\n\tt.Run(\"Test RemoveTail\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\n\t\tlmp.RemoveTail()\n\t\tassert.Equal(t, \"a\", lmp.TailNode().Data.Value)\n\t\tassert.NotEqual(t, \"b\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test RemoveHead\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\n\t\tlmp.RemoveHead()\n\t\tassert.Equal(t, \"a\", lmp.HeadNode().Data.Value)\n\t\tassert.NotEqual(t, \"-\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Should updates v\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tlmp.PushBack(1, \"b\")\n\t\tnode := lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tlmp.PushFront(1, \"c\")\n\t\tnode = lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"c\", node.Data.Value)\n\t})\n\n\tt.Run(\"Should prunes oldest item\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tnode := lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"a\", node.Data.Value)\n\n\t\tlmp.PushBack(5, \"e\")\n\n\t\tnode = lmp.GetNode(1)\n\t\tassert.Nil(t, node)\n\t})\n\n\tt.Run(\"Should prunes by changing capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](4)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tlmp.SetCapacity(6)\n\n\t\tnode := lmp.GetNode(2)\n\t\tassert.Equal(t, 2, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tlmp.SetCapacity(2)\n\t\tassert.True(t, lmp.Full())\n\n\t\tnode = lmp.GetNode(2)\n\t\tassert.Nil(t, node)\n\t})\n\n\tt.Run(\"Test PushBack and prune\", func(t *testing.T) {\n\t\tlmp := New[int, string](3)\n\n\t\tlmp.PushBack(1, \"a\") // This item should be pruned\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tnode := lmp.HeadNode()\n\t\tassert.Equal(t, 2, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\t})\n\n\tt.Run(\"Test PushFront and prune\", func(t *testing.T) {\n\t\tlmp := New[int, string](3)\n\n\t\tlmp.PushFront(1, \"a\")\n\t\tlmp.PushFront(2, \"b\")\n\t\tlmp.PushFront(3, \"c\")\n\t\tlmp.PushFront(4, \"d\") // This item should be pruned\n\n\t\tnode := lmp.TailNode()\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"a\", node.Data.Value)\n\t})\n\n\tt.Run(\"Delete first \", func(t *testing.T) {\n\t\tlmp := New[int, string](3)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tlmp.Remove(1)\n\n\t\tassert.Equal(t, 2, lmp.HeadNode().Data.Key)\n\t\tassert.Equal(t, \"b\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Delete last\", func(t *testing.T) {\n\t\tlmp := New[int, string](3)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tlmp.Remove(3)\n\n\t\tassert.Equal(t, 2, lmp.TailNode().Data.Key)\n\t\tassert.Equal(t, \"b\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test Has function\", func(t *testing.T) {\n\t\tlmp := New[int, string](2)\n\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tassert.True(t, lmp.Has(1))\n\t\tassert.False(t, lmp.Has(2))\n\t})\n\n\tt.Run(\"Test Clear\", func(t *testing.T) {\n\t\tlmp := New[int, string](2)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.Clear()\n\t\tassert.True(t, lmp.Empty())\n\t})\n}\n\nfunc TestCapacity(t *testing.T) {\n\tt.Run(\"Check Capacity\", func(t *testing.T) {\n\t\tcapacity := 100\n\t\tlmp := New[int, string](capacity)\n\t\tassert.Equal(t, capacity, lmp.Capacity())\n\t})\n\n\tt.Run(\"Test FirstNode with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\t\tassert.Nil(t, lmp.HeadNode())\n\n\t\tlmp.PushFront(3, \"c\")\n\t\tlmp.PushFront(2, \"b\")\n\t\tlmp.PushFront(1, \"a\")\n\n\t\tassert.Equal(t, 1, lmp.HeadNode().Data.Key)\n\t\tassert.Equal(t, \"a\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Test LastNode with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\t\tassert.Nil(t, lmp.TailNode())\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tassert.Equal(t, 3, lmp.TailNode().Data.Key)\n\t\tassert.Equal(t, \"c\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test Get with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tnode := lmp.GetNode(2)\n\t\tassert.Equal(t, 2, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tnode = lmp.GetNode(5)\n\t\tassert.Nil(t, node)\n\t})\n\n\tt.Run(\"Test Remove with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tassert.True(t, lmp.Remove(2))\n\t\tassert.False(t, lmp.Remove(2))\n\t})\n\n\tt.Run(\"Test RemoveTail with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\n\t\tlmp.RemoveTail()\n\t\tassert.Equal(t, \"a\", lmp.TailNode().Data.Value)\n\t\tassert.NotEqual(t, \"b\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test RemoveHead with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\t\tlmp.PushBack(0, \"-\")\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\n\t\tlmp.RemoveHead()\n\t\tassert.Equal(t, \"a\", lmp.HeadNode().Data.Value)\n\t\tassert.NotEqual(t, \"-\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Should updates v with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tlmp.PushBack(1, \"b\")\n\t\tnode := lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tlmp.PushFront(1, \"c\")\n\t\tnode = lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"c\", node.Data.Value)\n\t})\n\n\tt.Run(\"Should not prunes oldest item with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tnode := lmp.GetNode(1)\n\t\tassert.Equal(t, 1, node.Data.Key)\n\t\tassert.Equal(t, \"a\", node.Data.Value)\n\n\t\tlmp.PushBack(5, \"e\")\n\n\t\tnode = lmp.GetNode(1)\n\t\tassert.NotNil(t, node)\n\t})\n\n\tt.Run(\"Should prunes by changing capacity with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tlmp.SetCapacity(6)\n\n\t\tnode := lmp.GetNode(2)\n\t\tassert.Equal(t, 2, node.Data.Key)\n\t\tassert.Equal(t, \"b\", node.Data.Value)\n\n\t\tlmp.SetCapacity(2)\n\t\tassert.True(t, lmp.Full())\n\n\t\tnode = lmp.GetNode(2)\n\t\tassert.Nil(t, node)\n\t})\n\n\tt.Run(\"Test PushBack and should not prune with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\") // This item should be pruned\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\t\tlmp.PushBack(4, \"d\")\n\n\t\tnode := lmp.TailNode()\n\t\tassert.Equal(t, 4, node.Data.Key)\n\t\tassert.Equal(t, \"d\", node.Data.Value)\n\t})\n\n\tt.Run(\"Test PushFront and prune with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushFront(1, \"a\")\n\t\tlmp.PushFront(2, \"b\")\n\t\tlmp.PushFront(3, \"c\")\n\t\tlmp.PushFront(4, \"d\") // This item should be pruned\n\n\t\tn := lmp.TailNode()\n\t\tassert.Equal(t, 1, n.Data.Key)\n\t\tassert.Equal(t, \"a\", n.Data.Value)\n\t})\n\n\tt.Run(\"Delete first with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tlmp.Remove(1)\n\n\t\tassert.Equal(t, 2, lmp.HeadNode().Data.Key)\n\t\tassert.Equal(t, \"b\", lmp.HeadNode().Data.Value)\n\t})\n\n\tt.Run(\"Delete last with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.PushBack(2, \"b\")\n\t\tlmp.PushBack(3, \"c\")\n\n\t\tlmp.Remove(3)\n\n\t\tassert.Equal(t, 2, lmp.TailNode().Data.Key)\n\t\tassert.Equal(t, \"b\", lmp.TailNode().Data.Value)\n\t})\n\n\tt.Run(\"Test Has function with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\n\t\tassert.True(t, lmp.Has(1))\n\t\tassert.False(t, lmp.Has(2))\n\t})\n\n\tt.Run(\"Test Clear with Zero Capacity\", func(t *testing.T) {\n\t\tlmp := New[int, string](0)\n\n\t\tlmp.PushBack(1, \"a\")\n\t\tlmp.Clear()\n\t\tassert.True(t, lmp.Empty())\n\t})\n}\n"
  },
  {
    "path": "util/logger/config.go",
    "content": "package logger\n\n// Config defines parameters for the logger module.\ntype Config struct {\n\tColorful           bool              `toml:\"colorful\"`\n\tMaxBackups         int               `toml:\"max_backups\"`\n\tRotateLogAfterDays int               `toml:\"rotate_log_after_days\"`\n\tCompress           bool              `toml:\"compress\"`\n\tTargets            []string          `toml:\"targets\"`\n\tLevels             map[string]string `toml:\"levels\"`\n}\n\nfunc DefaultConfig() *Config {\n\tconf := &Config{\n\t\tLevels:             make(map[string]string),\n\t\tColorful:           true,\n\t\tMaxBackups:         0,\n\t\tRotateLogAfterDays: 1,\n\t\tCompress:           true,\n\t\tTargets:            []string{\"console\", \"file\"},\n\t}\n\n\tconf.Levels[\"default\"] = \"info\"\n\tconf.Levels[\"_network\"] = \"error\"\n\tconf.Levels[\"_consensus\"] = \"warn\"\n\tconf.Levels[\"_state\"] = \"info\"\n\tconf.Levels[\"_sync\"] = \"error\"\n\tconf.Levels[\"_pool\"] = \"error\"\n\tconf.Levels[\"_http\"] = \"info\"\n\tconf.Levels[\"_html\"] = \"info\"\n\tconf.Levels[\"_grpc\"] = \"info\"\n\tconf.Levels[\"_jsonrpc\"] = \"info\"\n\tconf.Levels[\"_zmq\"] = \"info\"\n\tconf.Levels[\"_firewall\"] = \"warn\"\n\n\treturn conf\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (*Config) BasicCheck() error {\n\treturn nil\n}\n"
  },
  {
    "path": "util/logger/logger.go",
    "content": "package logger\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/rs/zerolog\"\n\t\"github.com/rs/zerolog/log\"\n\t\"gopkg.in/natefinch/lumberjack.v2\"\n)\n\ntype LogStringer interface {\n\tLogString() string\n}\n\nvar (\n\tLogFilename = \"pactus.log\"\n\tMaxLogSize  = 10 // 10MB to rotate a log file\n)\n\nvar globalInst *logger\n\ntype logger struct {\n\tconfig *Config\n\tsubs   map[string]*SubLogger\n\twriter io.Writer\n}\n\ntype SubLogger struct {\n\tlogger zerolog.Logger\n\tname   string\n\tobj    LogStringer\n}\n\nfunc getLoggersInst() *logger {\n\tif globalInst == nil {\n\t\t// Only during tests the globalInst is nil\n\t\tLogFilename = util.TempFilePath()\n\n\t\tconf := &Config{\n\t\t\tLevels:   make(map[string]string),\n\t\t\tColorful: true,\n\t\t}\n\t\tconf.Levels[\"default\"] = \"debug\"\n\t\tconf.Levels[\"_network\"] = \"debug\"\n\t\tconf.Levels[\"_consensus\"] = \"debug\"\n\t\tconf.Levels[\"_state\"] = \"debug\"\n\t\tconf.Levels[\"_sync\"] = \"debug\"\n\t\tconf.Levels[\"_pool\"] = \"debug\"\n\t\tconf.Levels[\"_http\"] = \"debug\"\n\t\tconf.Levels[\"_grpc\"] = \"debug\"\n\t\tconf.Levels[\"_zmq\"] = \"debug\"\n\t\tconf.Levels[\"_firewall\"] = \"debug\"\n\t\tglobalInst = &logger{\n\t\t\tconfig: conf,\n\t\t\tsubs:   make(map[string]*SubLogger),\n\t\t\twriter: zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: \"15:04:05\"},\n\t\t}\n\t\tlog.Logger = zerolog.New(globalInst.writer).With().Timestamp().Logger()\n\t}\n\n\treturn globalInst\n}\n\nfunc InitGlobalLogger(ctx context.Context, conf *Config) {\n\tif globalInst != nil {\n\t\treturn\n\t}\n\n\twriters := []io.Writer{}\n\n\tif slices.Contains(conf.Targets, \"file\") {\n\t\tfileWriter := &lumberjack.Logger{\n\t\t\tFilename:   LogFilename,\n\t\t\tMaxSize:    MaxLogSize,\n\t\t\tMaxBackups: conf.MaxBackups,\n\t\t\tCompress:   conf.Compress,\n\t\t\tMaxAge:     conf.RotateLogAfterDays,\n\t\t}\n\t\twriters = append(writers, fileWriter)\n\t}\n\n\tif slices.Contains(conf.Targets, \"console\") {\n\t\t// console writer\n\t\tif conf.Colorful {\n\t\t\tconsoleWriter := &zerolog.ConsoleWriter{\n\t\t\t\tOut:        os.Stderr,\n\t\t\t\tTimeFormat: \"15:04:05\",\n\t\t\t}\n\t\t\twriters = append(writers, consoleWriter)\n\t\t} else {\n\t\t\twriters = append(writers, os.Stderr)\n\t\t}\n\t}\n\n\tglobalInst = &logger{\n\t\tconfig: conf,\n\t\tsubs:   make(map[string]*SubLogger),\n\t\twriter: io.MultiWriter(writers...),\n\t}\n\tlog.Logger = zerolog.New(globalInst.writer).With().Ctx(ctx).Timestamp().Logger()\n\n\tlvl, err := zerolog.ParseLevel(conf.Levels[\"default\"])\n\tif err != nil {\n\t\tWarn(\"invalid default log level\", \"error\", err)\n\t}\n\tlog.Logger = log.Logger.Level(lvl)\n}\n\nfunc addFields(event *zerolog.Event, keyvals ...any) *zerolog.Event {\n\tif event == nil {\n\t\treturn nil\n\t}\n\n\tif len(keyvals)%2 != 0 {\n\t\tkeyvals = append(keyvals, \"!MISSING-VALUE!\")\n\t}\n\tfor index := 0; index < len(keyvals); index += 2 {\n\t\tkey, ok := keyvals[index].(string)\n\t\tif !ok {\n\t\t\tkey = \"!INVALID-KEY!\"\n\t\t}\n\n\t\tvalue := keyvals[index+1]\n\t\tswitch typ := value.(type) {\n\t\tcase LogStringer:\n\t\t\tif isNil(typ) {\n\t\t\t\tevent.Any(key, typ)\n\t\t\t} else {\n\t\t\t\tevent.Str(key, typ.LogString())\n\t\t\t}\n\t\tcase fmt.Stringer:\n\t\t\tif isNil(typ) {\n\t\t\t\tevent.Any(key, typ)\n\t\t\t} else {\n\t\t\t\tevent.Stringer(key, typ)\n\t\t\t}\n\t\tcase error:\n\t\t\tevent.AnErr(key, typ)\n\t\tcase []byte:\n\t\t\tevent.Str(key, hex.EncodeToString(typ))\n\t\tdefault:\n\t\t\tevent.Any(key, typ)\n\t\t}\n\t}\n\n\treturn event\n}\n\nfunc NewSubLogger(name string, obj LogStringer) *SubLogger {\n\tinst := getLoggersInst()\n\tsub := &SubLogger{\n\t\tlogger: zerolog.New(inst.writer).With().Timestamp().Logger(),\n\t\tname:   name,\n\t\tobj:    obj,\n\t}\n\n\tlvlStr := inst.config.Levels[name]\n\tif lvlStr == \"\" {\n\t\tlvlStr = inst.config.Levels[\"default\"]\n\t}\n\n\tlvl, err := zerolog.ParseLevel(lvlStr)\n\tif err != nil {\n\t\tWarn(\"invalid log level\", \"error\", err, \"name\", name)\n\t}\n\tsub.logger = sub.logger.Level(lvl)\n\n\tinst.subs[name] = sub\n\n\treturn sub\n}\n\nfunc (sl *SubLogger) logObj(event *zerolog.Event, msg string, keyvals ...any) {\n\tif event == nil {\n\t\treturn\n\t}\n\n\tif sl.obj != nil {\n\t\tevent = event.Str(sl.name, sl.obj.LogString())\n\t}\n\n\taddFields(event, keyvals...).Msg(msg)\n}\n\nfunc (sl *SubLogger) Trace(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Trace(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Debug(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Debug(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Info(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Info(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Warn(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Warn(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Error(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Error(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Fatal(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Fatal(), msg, keyvals...)\n}\n\nfunc (sl *SubLogger) Panic(msg string, keyvals ...any) {\n\tsl.logObj(sl.logger.Panic(), msg, keyvals...)\n}\n\nfunc Trace(msg string, keyvals ...any) {\n\taddFields(log.Trace(), keyvals...).Msg(msg)\n}\n\nfunc Debug(msg string, keyvals ...any) {\n\taddFields(log.Debug(), keyvals...).Msg(msg)\n}\n\nfunc Info(msg string, keyvals ...any) {\n\taddFields(log.Info(), keyvals...).Msg(msg)\n}\n\nfunc Warn(msg string, keyvals ...any) {\n\taddFields(log.Warn(), keyvals...).Msg(msg)\n}\n\nfunc Error(msg string, keyvals ...any) {\n\taddFields(log.Error(), keyvals...).Msg(msg)\n}\n\nfunc Fatal(msg string, keyvals ...any) {\n\taddFields(log.Fatal(), keyvals...).Msg(msg)\n}\n\nfunc Panic(msg string, keyvals ...any) {\n\taddFields(log.Panic(), keyvals...).Msg(msg)\n}\n\nfunc isNil(val any) bool {\n\tif val == nil {\n\t\treturn true\n\t}\n\tif reflect.TypeOf(val).Kind() == reflect.Ptr {\n\t\treturn reflect.ValueOf(val).IsNil()\n\t}\n\n\treturn false\n}\n\nfunc (sl *SubLogger) SetObj(obj LogStringer) {\n\tsl.obj = obj\n}\n"
  },
  {
    "path": "util/logger/logger_test.go",
    "content": "package logger\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/rs/zerolog/log\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\ntype Foo struct{}\n\nfunc (Foo) LogString() string {\n\treturn \"foo\"\n}\n\nfunc TestNilObjLogger(t *testing.T) {\n\tl := NewSubLogger(\"test\", nil)\n\tvar buf bytes.Buffer\n\tl.logger = l.logger.Output(&buf)\n\n\tl.Info(\"hello\", \"error\", errors.New(\"error\"))\n\tassert.Contains(t, buf.String(), \"hello\")\n\tassert.Contains(t, buf.String(), \"error\")\n}\n\nfunc TestSubLogger(t *testing.T) {\n\tglobalInst = nil\n\tc := DefaultConfig()\n\tc.Colorful = false\n\tInitGlobalLogger(t.Context(), c)\n\n\tglobalInst.config.Levels[\"test\"] = \"warn\"\n\tsubLogger := NewSubLogger(\"test\", Foo{})\n\tvar buf bytes.Buffer\n\tsubLogger.logger = subLogger.logger.Output(&buf)\n\n\tsubLogger.Trace(\"msg\")\n\tsubLogger.Debug(\"msg\")\n\tsubLogger.Info(\"msg\")\n\tsubLogger.Warn(\"msg\")\n\tsubLogger.Error(\"msg\")\n\n\tout := buf.String()\n\n\tassert.Contains(t, out, \"foo\")\n\tassert.NotContains(t, out, \"trace\")\n\tassert.NotContains(t, out, \"debug\")\n\tassert.NotContains(t, out, \"info\")\n\tassert.Contains(t, out, \"warn\")\n\tassert.Contains(t, out, \"error\")\n}\n\nfunc TestLogger(t *testing.T) {\n\tglobalInst = nil\n\tc := DefaultConfig()\n\tc.Colorful = true\n\tInitGlobalLogger(t.Context(), c)\n\n\tvar buf bytes.Buffer\n\tlog.Logger = log.Output(&buf)\n\n\tTrace(\"msg\", \"trace\", \"trace\")\n\tDebug(\"msg\", \"trace\", \"trace\")\n\tInfo(\"msg\", nil)\n\tInfo(\"msg\", \"a\", nil)\n\tInfo(\"msg\", \"b\", []byte{1, 2, 3})\n\tWarn(\"msg\", \"x\")\n\tError(\"msg\", \"y\", Foo{})\n\n\tout := buf.String()\n\n\tfmt.Println(out)\n\tassert.NotContains(t, out, \"trace\")\n\tassert.NotContains(t, out, \"debug\")\n\tassert.Contains(t, out, \"foo\")\n\tassert.Contains(t, out, \"010203\")\n\tassert.Contains(t, out, \"!INVALID-KEY!\")\n\tassert.Contains(t, out, \"!MISSING-VALUE!\")\n\tassert.Contains(t, out, \"null\")\n\tassert.NotContains(t, out, \"trace\")\n\tassert.NotContains(t, out, \"debug\")\n\tassert.Contains(t, out, \"info\")\n\tassert.Contains(t, out, \"warn\")\n\tassert.Contains(t, out, \"error\")\n}\n\nfunc TestNilValue(t *testing.T) {\n\tvar buf bytes.Buffer\n\tlog.Logger = log.Output(&buf)\n\n\tfoo := new(Foo)\n\tif true {\n\t\t// to avoid some linting errors\n\t\tfoo = nil\n\t}\n\n\tInfo(\"msg\", \"null\", nil)\n\tInfo(\"msg\", \"error\", error(nil))\n\tInfo(\"msg\", \"stringer\", foo)\n\n\tout := buf.String()\n\n\tfmt.Println(out)\n\tassert.Contains(t, out, \"null\")\n\tassert.Contains(t, out, \"error\")\n\tassert.Contains(t, out, \"stringer\")\n}\n\nfunc TestInvalidLevel(t *testing.T) {\n\tglobalInst = nil\n\tc := DefaultConfig()\n\tc.Colorful = false\n\tInitGlobalLogger(t.Context(), c)\n\n\tvar buf bytes.Buffer\n\tlog.Logger = log.Logger.Output(&buf)\n\n\tglobalInst.config.Levels[\"test\"] = \"invalid\"\n\tl := NewSubLogger(\"test\", Foo{})\n\n\tvar buf2 bytes.Buffer\n\tl.logger = l.logger.Output(&buf2)\n\n\tl.Error(\"message\", \"key\", \"val\")\n\n\tout := buf.String()\n\tout2 := buf2.String()\n\n\tfmt.Println(out)\n\tassert.Contains(t, out, \"Unknown Level String\")\n\tassert.NotContains(t, out2, \"error\")\n\tassert.NotContains(t, out2, \"message\")\n}\n"
  },
  {
    "path": "util/net.go",
    "content": "package util\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"time\"\n)\n\n// NetworkListen listens on a network address with a context.\nfunc NetworkListen(ctx context.Context, network, address string) (net.Listener, error) {\n\tvar lc net.ListenConfig\n\n\treturn lc.Listen(ctx, network, address)\n}\n\n// NetworkDialTimeout dials a network address with a timeout and a context.\nfunc NetworkDialTimeout(ctx context.Context, network, address string, timeout time.Duration) (net.Conn, error) {\n\td := net.Dialer{Timeout: timeout}\n\n\treturn d.DialContext(ctx, network, address)\n}\n"
  },
  {
    "path": "util/ntp/ntp.go",
    "content": "package ntp\n\nimport (\n\t\"context\"\n\t\"math\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/scheduler\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\nconst (\n\tmaxClockOffset = time.Duration(math.MinInt64)\n)\n\n// QueryError is returned when a query from all NTP pools encounters an error\n// and we have no valid response from them.\ntype QueryError struct{}\n\nfunc (QueryError) Error() string {\n\treturn \"failed to get NTP query from all pools\"\n}\n\nvar _pools = []string{\n\t\"pool.ntp.org\",\n\t\"time.google.com\",\n\t\"time.cloudflare.com\",\n\t\"time.apple.com\",\n\t\"time.windows.com\",\n\t\"ntp.ubuntu.com\",\n}\n\n// Checker represents a NTP checker that periodically checks the system time against the network time.\ntype Checker struct {\n\tlk sync.RWMutex\n\n\tctx       context.Context\n\tcancel    func()\n\tquerier   Querier\n\toffset    time.Duration\n\tinterval  time.Duration\n\tthreshold time.Duration\n}\n\n// CheckerOption defines the type for functions that configure a Checker.\ntype CheckerOption func(*Checker)\n\n// WithQuerier sets the Querier for the Checker.\nfunc WithQuerier(querier Querier) CheckerOption {\n\treturn func(c *Checker) {\n\t\tc.querier = querier\n\t}\n}\n\n// WithInterval sets the interval at which the checker will run.\n// Default interval is 1 minute.\nfunc WithInterval(interval time.Duration) CheckerOption {\n\treturn func(c *Checker) {\n\t\tc.interval = interval\n\t}\n}\n\n// WithThreshold sets the threshold for determining if the system time is out of sync.\n// Default threshold is 1 second.\nfunc WithThreshold(threshold time.Duration) CheckerOption {\n\treturn func(c *Checker) {\n\t\tc.threshold = threshold\n\t}\n}\n\n// NewNtpChecker creates a new Checker with the provided options.\n// If no options are provided, it uses default values for interval and threshold.\nfunc NewNtpChecker(ctx context.Context, opts ...CheckerOption) *Checker {\n\tctx, cancel := context.WithCancel(ctx)\n\tdefaultInterval := time.Minute\n\tdefaultThreshold := time.Second\n\n\t// Initialize the checker with default values.\n\tchecker := &Checker{\n\t\tctx:       ctx,\n\t\tcancel:    cancel,\n\t\tinterval:  defaultInterval,\n\t\tthreshold: defaultThreshold,\n\t\tquerier:   RemoteQuerier{},\n\t}\n\n\t// Apply provided options to override default values.\n\tfor _, opt := range opts {\n\t\topt(checker)\n\t}\n\n\treturn checker\n}\n\nfunc (c *Checker) Start() {\n\tscheduler.Every(c.interval).Do(c.ctx, func(_ context.Context) {\n\t\toffset, _ := c.queryClockOffset()\n\n\t\tc.lk.Lock()\n\t\tc.offset = offset\n\t\tc.lk.Unlock()\n\n\t\tif c.offset != maxClockOffset && c.IsOutOfSync() {\n\t\t\tlogger.Error(\n\t\t\t\t\"the system time is out of sync with the network time by more than one second\",\n\t\t\t\t\"threshold\", c.threshold, \"offset\", offset)\n\t\t}\n\t})\n}\n\nfunc (c *Checker) Stop() {\n\tc.cancel()\n}\n\nfunc (c *Checker) IsOutOfSync() bool {\n\tc.lk.RLock()\n\tdefer c.lk.RUnlock()\n\n\treturn c.offset.Abs() > c.threshold\n}\n\nfunc (c *Checker) ClockOffset() (time.Duration, error) {\n\tc.lk.RLock()\n\tdefer c.lk.RUnlock()\n\n\tif c.offset == maxClockOffset {\n\t\treturn 0, QueryError{}\n\t}\n\n\treturn c.offset, nil\n}\n\nfunc (c *Checker) queryClockOffset() (time.Duration, error) {\n\tfor _, server := range _pools {\n\t\tresponse, err := c.querier.Query(server)\n\t\tif err != nil {\n\t\t\tlogger.Debug(\"ntp query error\", \"server\", server, \"error\", err)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := response.Validate(); err != nil {\n\t\t\tlogger.Debug(\"ntp validate error\", \"server\", server, \"error\", err)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tlogger.Debug(\"successful ntp query\", \"offset\", response.ClockOffset, \"RTT\", response.RTT)\n\n\t\treturn response.ClockOffset, nil\n\t}\n\n\tlogger.Error(\"failed to get ntp query from all pool\")\n\n\treturn maxClockOffset, QueryError{}\n}\n"
  },
  {
    "path": "util/ntp/ntp_test.go",
    "content": "package ntp\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/beevik/ntp\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testQuerier struct {\n\terr error\n\tres *ntp.Response\n}\n\nfunc (q *testQuerier) Query(_ string) (*ntp.Response, error) {\n\treturn q.res, q.err\n}\n\ntype testData struct {\n\tchecker *Checker\n\tquerier *testQuerier\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tquerier := &testQuerier{}\n\topts := []CheckerOption{\n\t\tWithInterval(100 * time.Millisecond),\n\t\tWithThreshold(1 * time.Second),\n\t\tWithQuerier(querier),\n\t}\n\n\tchecker := NewNtpChecker(t.Context(), opts...)\n\n\ttd := &testData{\n\t\tchecker: checker,\n\t\tquerier: querier,\n\t}\n\n\treturn td\n}\n\nfunc (td *testData) Stop() {\n\ttd.checker.Stop()\n}\n\nfunc TestNTPChecker(t *testing.T) {\n\tt.Run(\"Offset less than one second\", func(t *testing.T) {\n\t\ttd := setup(t)\n\t\tdefer td.Stop()\n\n\t\tntpOffset := 100 * time.Millisecond\n\t\ttd.querier.res = &ntp.Response{\n\t\t\tStratum:     1,\n\t\t\tClockOffset: ntpOffset,\n\t\t}\n\n\t\tgo td.checker.Start()\n\n\t\trequire.Eventually(t, func() bool {\n\t\t\toffset, _ := td.checker.ClockOffset()\n\n\t\t\treturn offset == ntpOffset\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\toffset, err := td.checker.ClockOffset()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, ntpOffset, offset)\n\t\tassert.False(t, td.checker.IsOutOfSync())\n\t})\n\n\tt.Run(\"Offset more than one second\", func(t *testing.T) {\n\t\ttd := setup(t)\n\t\tdefer td.Stop()\n\n\t\tntpOffset := 2 * time.Second\n\t\ttd.querier.res = &ntp.Response{\n\t\t\tStratum:     1,\n\t\t\tClockOffset: ntpOffset,\n\t\t}\n\n\t\tgo td.checker.Start()\n\n\t\trequire.Eventually(t, func() bool {\n\t\t\toffset, _ := td.checker.ClockOffset()\n\n\t\t\treturn offset == ntpOffset\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\toffset, err := td.checker.ClockOffset()\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, ntpOffset, offset)\n\t\tassert.True(t, td.checker.IsOutOfSync())\n\t})\n\n\tt.Run(\"Query error\", func(t *testing.T) {\n\t\ttd := setup(t)\n\t\tdefer td.Stop()\n\n\t\ttd.querier.err = errors.New(\"unable to query\")\n\n\t\tgo td.checker.Start()\n\n\t\trequire.Eventually(t, func() bool {\n\t\t\t_, err := td.checker.ClockOffset()\n\n\t\t\treturn err != nil\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\toffset, err := td.checker.ClockOffset()\n\t\trequire.Error(t, err)\n\t\tassert.Zero(t, offset)\n\t\tassert.True(t, td.checker.IsOutOfSync())\n\t})\n\n\tt.Run(\"Validation error\", func(t *testing.T) {\n\t\ttd := setup(t)\n\t\tdefer td.Stop()\n\n\t\ttd.querier.err = nil\n\t\ttd.querier.res = &ntp.Response{\n\t\t\tStratum: 0,\n\t\t}\n\n\t\tgo td.checker.Start()\n\n\t\trequire.Eventually(t, func() bool {\n\t\t\t_, err := td.checker.ClockOffset()\n\n\t\t\treturn err != nil\n\t\t}, 5*time.Second, 100*time.Millisecond)\n\n\t\toffset, err := td.checker.ClockOffset()\n\t\trequire.Error(t, err)\n\t\tassert.Zero(t, offset)\n\t\tassert.True(t, td.checker.IsOutOfSync())\n\t})\n}\n"
  },
  {
    "path": "util/ntp/query.go",
    "content": "package ntp\n\nimport \"github.com/beevik/ntp\"\n\ntype Querier interface {\n\tQuery(address string) (*ntp.Response, error)\n}\n\ntype RemoteQuerier struct{}\n\nfunc (RemoteQuerier) Query(address string) (*ntp.Response, error) {\n\treturn ntp.Query(address)\n}\n"
  },
  {
    "path": "util/number.go",
    "content": "package util\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc FormatIntWithDelimiters(num int64) string {\n\tnumStr := strconv.FormatInt(num, 10)\n\n\treturn formatNumberString(numStr)\n}\n\nfunc FormatFloatWithDelimiters(num float64, prec int) string {\n\tnumStr := strconv.FormatFloat(num, 'f', prec, 64)\n\n\tparts := strings.Split(numStr, \".\")\n\tnumStr = parts[0]\n\tnumStr = formatNumberString(numStr)\n\n\tif len(parts) > 1 {\n\t\tnumStr += \".\" + parts[1]\n\t}\n\n\treturn numStr\n}\n\nfunc formatNumberString(numStr string) string {\n\tvar formattedNum string\n\tif strings.HasPrefix(numStr, \"-\") {\n\t\tformattedNum = \"-\"\n\t\tnumStr = numStr[1:]\n\t}\n\tfor i, c := range numStr {\n\t\tif (i > 0) && (len(numStr)-i)%3 == 0 {\n\t\t\tformattedNum += \",\"\n\t\t}\n\t\tformattedNum += string(c)\n\t}\n\n\treturn formattedNum\n}\n"
  },
  {
    "path": "util/number_test.go",
    "content": "package util\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestFormatNumberWithDelimiters(t *testing.T) {\n\ttests := []struct {\n\t\tinput    int64\n\t\texpected string\n\t}{\n\t\t{123456, \"123,456\"},\n\t\t{123, \"123\"},\n\t\t{0, \"0\"},\n\t\t{-123, \"-123\"},\n\t\t{-123456, \"-123,456\"},\n\t}\n\n\tfor _, test := range tests {\n\t\tresult := FormatIntWithDelimiters(test.input)\n\t\tassert.Equal(t, test.expected, result, \"FormatNumber(%d)\", test.input)\n\t}\n}\n\nfunc TestFormatFloatWithDelimiters(t *testing.T) {\n\ttests := []struct {\n\t\tinput    float64\n\t\texpected string\n\t}{\n\t\t{123456.789, \"123,456.789\"},\n\t\t{123.456, \"123.456\"},\n\t\t{0.0, \"0\"},\n\t\t{-123.456, \"-123.456\"},\n\t\t{-123456.789, \"-123,456.789\"},\n\n\t\t{123456, \"123,456\"},\n\t\t{123, \"123\"},\n\t\t{0, \"0\"},\n\t\t{-123, \"-123\"},\n\t\t{-123456, \"-123,456\"},\n\t}\n\n\tfor _, test := range tests {\n\t\tresult := FormatFloatWithDelimiters(test.input, -1)\n\t\tassert.Equal(t, test.expected, result, \"FormatFloat(%f)\", test.input)\n\t}\n}\n"
  },
  {
    "path": "util/pairslice/pairslice.go",
    "content": "package pairslice\n\nimport (\n\t\"golang.org/x/exp/slices\"\n)\n\n// Pair represents a key-value pair.\ntype Pair[K comparable, V any] struct {\n\tFirst  K\n\tSecond V\n}\n\n// PairSlice represents a slice of key-value pairs.\ntype PairSlice[K comparable, V any] struct {\n\tpairs []*Pair[K, V]\n}\n\n// New creates a new instance of PairSlice with a specified capacity.\nfunc New[K comparable, V any](capacity int) *PairSlice[K, V] {\n\treturn &PairSlice[K, V]{\n\t\tpairs: make([]*Pair[K, V], 0, capacity),\n\t}\n}\n\n// Append adds the first and second to the end of the slice.\nfunc (ps *PairSlice[K, V]) Append(first K, second V) {\n\tps.pairs = append(ps.pairs, &Pair[K, V]{first, second})\n}\n\n// RemoveFirst removes the first element from PairSlice.\nfunc (ps *PairSlice[K, V]) RemoveFirst() {\n\tps.remove(0)\n}\n\n// RemoveLast removes the last element from PairSlice.\nfunc (ps *PairSlice[K, V]) RemoveLast() {\n\tps.remove(ps.Len() - 1)\n}\n\n// Len returns the number of elements in the PairSlice.\nfunc (ps *PairSlice[K, V]) Len() int {\n\treturn len(ps.pairs)\n}\n\n// remove removes the element at the specified index from PairSlice.\nfunc (ps *PairSlice[K, V]) remove(index int) {\n\tps.pairs = slices.Delete(ps.pairs, index, index+1)\n}\n\n// Get returns the properties at the specified index. If the index is out of bounds, it returns false.\nfunc (ps *PairSlice[K, V]) Get(index int) (K, V, bool) {\n\tif index < 0 || index >= len(ps.pairs) {\n\t\tvar first K\n\t\tvar second V\n\n\t\treturn first, second, false\n\t}\n\tpair := ps.pairs[index]\n\n\treturn pair.First, pair.Second, true\n}\n\n// First returns the first properties in the PairSlice. If the PairSlice is empty, it returns false.\nfunc (ps *PairSlice[K, V]) First() (K, V, bool) {\n\treturn ps.Get(0)\n}\n\n// Last returns the last properties in the PairSlice. If the PairSlice is empty, it returns false.\nfunc (ps *PairSlice[K, V]) Last() (K, V, bool) {\n\treturn ps.Get(ps.Len() - 1)\n}\n"
  },
  {
    "path": "util/pairslice/pairslice_test.go",
    "content": "package pairslice\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestNew(t *testing.T) {\n\tslice := New[int, string](10)\n\n\tassert.NotNil(t, slice)\n\tassert.Equal(t, 10, cap(slice.pairs))\n\tassert.Empty(t, slice.pairs)\n}\n\nfunc TestPairSlice(t *testing.T) {\n\tt.Run(\"Test Append\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\n\t\tassert.Equal(t, 3, slice.Len())\n\t\tassert.Equal(t, 3, slice.pairs[2].First)\n\t\tassert.Equal(t, \"c\", slice.pairs[2].Second)\n\t})\n\n\tt.Run(\"Test RemoveFirst\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\n\t\tslice.RemoveFirst()\n\n\t\tassert.Equal(t, 2, slice.pairs[0].First)\n\t\tassert.Equal(t, \"b\", slice.pairs[0].Second)\n\t})\n\n\tt.Run(\"Test RemoveLast\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\t\tslice.Append(4, \"d\")\n\n\t\tslice.RemoveLast()\n\n\t\tassert.Equal(t, 3, slice.pairs[2].First)\n\t\tassert.Equal(t, \"c\", slice.pairs[2].Second)\n\t})\n\n\tt.Run(\"Test Len\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\n\t\tassert.Equal(t, 2, slice.Len())\n\t})\n\n\tt.Run(\"Test Remove\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\t\tslice.Append(4, \"d\")\n\n\t\tslice.remove(1)\n\n\t\tassert.Equal(t, 3, slice.pairs[1].First)\n\t\tassert.Equal(t, \"c\", slice.pairs[1].Second)\n\t})\n\n\tt.Run(\"Test Get\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\t\tslice.Append(4, \"d\")\n\n\t\tfirst, second, _ := slice.Get(2)\n\t\tassert.Equal(t, slice.pairs[2].First, first)\n\t\tassert.Equal(t, slice.pairs[2].Second, second)\n\t})\n\n\tt.Run(\"Test Get negative index or bigger than len\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(4, \"d\")\n\n\t\t_, _, result1 := slice.Get(-1)\n\t\t_, _, result2 := slice.Get(10)\n\t\tassert.False(t, result1)\n\t\tassert.False(t, result2)\n\t})\n\n\tt.Run(\"Test First\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\t\tslice.Append(4, \"d\")\n\n\t\tfirst, second, _ := slice.First()\n\t\tassert.Equal(t, slice.pairs[0].First, first)\n\t\tassert.Equal(t, slice.pairs[0].Second, second)\n\t})\n\n\tt.Run(\"Test Last\", func(t *testing.T) {\n\t\tslice := New[int, string](4)\n\n\t\tslice.Append(1, \"a\")\n\t\tslice.Append(2, \"b\")\n\t\tslice.Append(3, \"c\")\n\t\tslice.Append(4, \"d\")\n\n\t\tfirst, second, _ := slice.Last()\n\t\tassert.Equal(t, slice.pairs[3].First, first)\n\t\tassert.Equal(t, slice.pairs[3].Second, second)\n\t})\n}\n"
  },
  {
    "path": "util/persistentmerkle/merkle.go",
    "content": "package persistentmerkle\n\nimport (\n\t\"math\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\ntype Tree struct {\n\tnodes     map[uint32]*node\n\tmaxWidth  int32\n\tmaxHeight int32\n}\n\ntype node struct {\n\twidth  int32\n\theight int32\n\thash   *hash.Hash\n}\n\n// nodeID return the node ID (four bytes):\n// +-+---+\n// |h| w |\n// +-+---+\n// h: height\n// w: width\nfunc nodeID(width, height int32) uint32 {\n\treturn (uint32(height&0xff) << 24) | uint32(width&0xffffff)\n}\n\nfunc New() *Tree {\n\treturn &Tree{\n\t\tnodes: make(map[uint32]*node),\n\t}\n}\n\nfunc (*Tree) createNode(width, height int32) *node {\n\treturn &node{\n\t\twidth:  width,\n\t\theight: height,\n\t}\n}\n\nfunc (t *Tree) getNode(width, height int32) *node {\n\tid := nodeID(width, height)\n\n\treturn t.nodes[id]\n}\n\nfunc (t *Tree) getOrCreateNode(width, height int32) *node {\n\tid := nodeID(width, height)\n\tnode, ok := t.nodes[id]\n\tif !ok {\n\t\tnode = t.createNode(width, height)\n\t\tt.nodes[id] = node\n\t}\n\n\treturn node\n}\n\nfunc (t *Tree) invalidateNode(width, height int32) {\n\tn := t.getOrCreateNode(width, height)\n\tn.hash = nil\n}\n\nfunc (t *Tree) recalculateHeight(maxWidth int32) {\n\tif maxWidth > t.maxWidth {\n\t\tt.maxWidth = maxWidth\n\n\t\tmaxHeight := math.Log2(float64(maxWidth))\n\t\tif math.Remainder(maxHeight, 1.0) != 0 {\n\t\t\tt.maxHeight = int32(math.Trunc(maxHeight)) + 2\n\t\t} else {\n\t\t\tt.maxHeight = int32(math.Trunc(maxHeight)) + 1\n\t\t}\n\t}\n}\n\nfunc (t *Tree) SetData(leaf int32, data []byte) {\n\tt.SetHash(leaf, hash.CalcHash(data))\n}\n\nfunc (t *Tree) SetHash(leaf int32, h hash.Hash) {\n\tt.recalculateHeight(leaf + 1)\n\n\tnode := t.getOrCreateNode(leaf, 0)\n\tnode.hash = &h\n\n\tw := leaf / 2\n\tfor h := int32(1); h < t.maxHeight; h++ {\n\t\tt.invalidateNode(w, h)\n\t\tw /= 2\n\t}\n}\n\nfunc (t *Tree) Root() hash.Hash {\n\treturn t.nodeHash(0, t.maxHeight-1)\n}\n\nfunc (t *Tree) nodeHash(width, height int32) hash.Hash {\n\tnode := t.getNode(width, height)\n\tif node == nil {\n\t\tnode = t.getNode(width-1, height)\n\t\tif node == nil {\n\t\t\tpanic(\"invalid merkle tree\")\n\t\t}\n\t}\n\tif node.hash != nil {\n\t\treturn *node.hash\n\t}\n\n\tleft := t.nodeHash(width*2, height-1)\n\tright := t.nodeHash(width*2+1, height-1)\n\n\tdata := make([]byte, len(left)+len(right))\n\tcopy(data[:hash.HashSize], left.Bytes())\n\tcopy(data[hash.HashSize:], right.Bytes())\n\n\th := hash.CalcHash(data)\n\tnode.hash = &h\n\n\treturn h\n}\n"
  },
  {
    "path": "util/persistentmerkle/merkle_test.go",
    "content": "package persistentmerkle\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestNodeID(t *testing.T) {\n\tassert.Equal(t, uint32(0x00000000), nodeID(0, 0))\n\tassert.Equal(t, uint32(0x01000000), nodeID(0, 1))\n\tassert.Equal(t, uint32(0x00000001), nodeID(1, 0))\n\tassert.Equal(t, uint32(0x01000001), nodeID(1, 1))\n\tassert.Equal(t, uint32(0xffffffff), nodeID(0xffffff, 0xff))\n\tassert.Equal(t, uint32(0x00ffffff), nodeID(0xffffff, 0x00))\n\tassert.Equal(t, uint32(0x77ff00ff), nodeID(0xff00ff, 0x77))\n}\n\nfunc TestCalculateHeight(t *testing.T) {\n\ttree := New()\n\n\ttree.recalculateHeight(0)\n\tassert.Equal(t, int32(0), tree.maxHeight)\n\n\ttree.recalculateHeight(1)\n\tassert.Equal(t, int32(1), tree.maxHeight)\n\n\ttree.recalculateHeight(2)\n\tassert.Equal(t, int32(2), tree.maxHeight)\n\n\ttree.recalculateHeight(4)\n\tassert.Equal(t, int32(3), tree.maxHeight)\n\n\ttree.recalculateHeight(5)\n\tassert.Equal(t, int32(4), tree.maxHeight)\n\n\ttree.recalculateHeight(8)\n\tassert.Equal(t, int32(4), tree.maxHeight)\n\n\ttree.recalculateHeight(9)\n\tassert.Equal(t, int32(5), tree.maxHeight)\n}\n\nfunc TestMerkleTree(t *testing.T) {\n\ttree := New()\n\n\tdata := []string{\n\t\t\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\",\n\t\t\"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",\n\t}\n\troots := []string{\n\t\t\"a3a0081351bb785d0758ddf68076a95ffd3f10b88bbc9911e9fea4d793c06414\",\n\t\t\"f8c780ed425c674e458b1e42abc894d144af4660476b63adc900e5ca72ef3a7d\",\n\t\t\"fba254b63bc4f71e560d3d94bacaa555b57b0d15073bdde95d028176cc702952\",\n\t\t\"62edcdc731948255463d6a8b7809bf26de2bdc1e2b351e76bf0adb5a2b863f5a\",\n\t\t\"c0c5e5d5389593188ef48b73f808571f88252491696cb481d8d587e3d59a282b\",\n\t\t\"0ff43eeca0576185050fea37c7cfc81219ceca762f9e29bc77c57a651efc6ae6\",\n\t\t\"e071cda6628d87d405c82c9948795b99b5afabb01c5a93b4970b4f97b866b32b\",\n\t\t\"f4b351a896639e122c81c5819d278fc67392abc87592daeaa1bddda9bec57186\",\n\t\t\"0086ad0c0b55b087d82733f8feaff319bc9dd7bcfbc6ddd3f8322e4dc9bd492e\",\n\t\t\"b0b18c74adc184b14f6dc6546062aad6475f4b167334bc4a4a537c5b78a22b44\",\n\t\t\"fbb6818ed0eb4b31ae3a273498e2cd26d4dbdb44d09ea71a115958f31687ebf5\",\n\t\t\"8e7cc64ef18bf44612520a06e9cfa2b6117d2587a1832ec79365b463656b81ea\",\n\t\t\"7d1fa0a14c9d83fde2638c7f404041a667365c1ada96e59c42ff2573a4b1bd83\",\n\t\t\"dcab86df00b139cec708c3cfe2c29cc4adf47ba3b9981059e3f62403d26635bb\",\n\t\t\"6d44b6badb9521bdafc83b84bfd4ce3dbc2eae270ad22b676c84e356fab81c9c\",\n\t\t\"41cfad12a1964a1e5f534dd3b247f6b9e80fb6e64772ad9ff7f7f8cee375b94c\",\n\t\t\"673fe9e5a964a3d2fd2fea41be5a4bc8e6fcc958422f6636d26c25156902f0ea\",\n\t\t\"880e8f2691c0ebc2292b8e03733ad96796a4f9792d1a604a28e575fbfcc56b45\",\n\t\t\"a1796d57ebf723c58b8518c6c70ee602f772afe6bc3b127a74804c0944957162\",\n\t\t\"3618d980b28f432b383d8658c0d8ee8c087c206df59a1d535c7512c85fa745c3\",\n\t\t\"e05db943b9ef0f90c90989d2bd29e74ece5cc99882d7ef75832b575cd14f8c88\",\n\t\t\"4c490979a140a3d4a4661ccb0804c08aabb3ee15fc941d473f866fa04cef0613\",\n\t\t\"414e11e90180869501a2bf1762be6e3e5c34eaa2b9eb7510b7a77b7bf32f08d2\",\n\t\t\"e0e435e50a8bb83d1610b4288f11a4d313db0b47a61929078990508185243bbc\",\n\t\t\"7f8da04ec98800942cb7b9bb2fe795b51cdb91b2ff48b3451d4e74da0414b6ef\",\n\t\t\"1d1f6d1c6e1afb8a6c3e6b93d708cebbfcaab5fc8d27c7d44ff5454d8906e3e9\",\n\t}\n\n\tfor i, d := range data {\n\t\ttree.SetData(int32(i), []byte(d))\n\t\texpected, _ := hex.DecodeString(roots[i])\n\t\tassert.Equal(t, expected, tree.Root().Bytes(), \"Root %d not matched\", i)\n\t}\n\n\t// Modifying some data blocks\n\ttree.SetData(0, []byte(\"a\"))\n\ttree.SetData(21, []byte(\"v\"))\n\texpected, _ := hex.DecodeString(\"ec4446ea16b8f82083cc2d727b8f9e7b9c318e35bb37295a2e87064393572800\")\n\tassert.Equal(t, expected, tree.Root().Bytes())\n}\n"
  },
  {
    "path": "util/prompt/prompt.go",
    "content": "//nolint:forbidigo // enable printing function for prompt package\npackage prompt\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/manifoldco/promptui\"\n)\n\nfunc checkError(err error) {\n\tif err == nil {\n\t\treturn\n\t}\n\n\tif errors.Is(err, promptui.ErrAbort) {\n\t\treturn\n\t}\n\n\tif errors.Is(err, promptui.ErrInterrupt) ||\n\t\terrors.Is(err, promptui.ErrEOF) {\n\t\tfmt.Printf(\"%v\\n\", err)\n\t\tos.Exit(1)\n\t}\n\n\tfmt.Printf(\"Prompt failed: %v\\n\", err)\n\tos.Exit(1)\n}\n\n// PromptPassword prompts the user to enter a password.\n// If confirmation is true, the user will be asked to re-enter the password\n// for confirmation.\nfunc PromptPassword(label string, confirmation bool) string {\n\tprompt := promptui.Prompt{\n\t\tLabel:   label,\n\t\tMask:    '*',\n\t\tPointer: promptui.PipeCursor,\n\t}\n\tpassword, err := prompt.Run()\n\tcheckError(err)\n\n\tif confirmation {\n\t\tvalidate := func(input string) error {\n\t\t\tif input != password {\n\t\t\t\treturn errors.New(\"passwords do not match\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t}\n\n\t\tconfirmPrompt := promptui.Prompt{\n\t\t\tLabel:    \"Confirm password\",\n\t\t\tValidate: validate,\n\t\t\tMask:     '*',\n\t\t\tPointer:  promptui.PipeCursor,\n\t\t}\n\n\t\t_, err := confirmPrompt.Run()\n\t\tcheckError(err)\n\t}\n\n\treturn password\n}\n\n// PromptConfirm prompts the user to confirm an operation.\n// It returns true if the user confirms (Y/y), otherwise false.\n// The program exits if the user aborts or if an unexpected error occurs.\nfunc PromptConfirm(label string) bool {\n\tprompt := promptui.Prompt{\n\t\tLabel:     label,\n\t\tIsConfirm: true,\n\t\tPointer:   promptui.PipeCursor,\n\t}\n\tresult, err := prompt.Run()\n\tcheckError(err)\n\n\tif result != \"\" && strings.ToUpper(result[:1]) == \"Y\" {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// PromptInput prompts the user for a string input.\nfunc PromptInput(label string) string {\n\tprompt := promptui.Prompt{\n\t\tLabel:   label,\n\t\tPointer: promptui.PipeCursor,\n\t}\n\tresult, err := prompt.Run()\n\tcheckError(err)\n\n\treturn result\n}\n\n// PromptSelect displays a list of choices for the user to select from.\n// It returns the index of the selected item.\nfunc PromptSelect(label string, items []string) int {\n\tprompt := promptui.Select{\n\t\tLabel:   label,\n\t\tItems:   items,\n\t\tPointer: promptui.PipeCursor,\n\t}\n\n\tchoice, _, err := prompt.Run()\n\tcheckError(err)\n\n\treturn choice\n}\n\n// PromptInputWithSuggestion prompts the user for a string input,\n// showing a suggested default value.\nfunc PromptInputWithSuggestion(label, suggestion string) string {\n\tprompt := promptui.Prompt{\n\t\tLabel:   label,\n\t\tDefault: suggestion,\n\t\tPointer: promptui.PipeCursor,\n\t}\n\tresult, err := prompt.Run()\n\tcheckError(err)\n\n\treturn result\n}\n\n// PromptInputWithRange prompts the user to enter an integer value\n// within the specified range [min, max]. The default value is shown as a suggestion.\nfunc PromptInputWithRange(label string, def, min, max int) int {\n\tprompt := promptui.Prompt{\n\t\tLabel:   label,\n\t\tDefault: fmt.Sprintf(\"%v\", def),\n\t\tPointer: promptui.PipeCursor,\n\t\tValidate: func(input string) error {\n\t\t\tnum, err := strconv.Atoi(input)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid number %q\", input)\n\t\t\t}\n\t\t\tif num < min || num > max {\n\t\t\t\treturn fmt.Errorf(\"enter a number between %v and %v\", min, max)\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t}\n\tresult, err := prompt.Run()\n\tcheckError(err)\n\n\tnum, _ := strconv.Atoi(result)\n\n\treturn num\n}\n"
  },
  {
    "path": "util/ratelimit/ratelimit.go",
    "content": "package ratelimit\n\nimport (\n\t\"sync\"\n\t\"time\"\n)\n\ntype RateLimit struct {\n\tlk sync.RWMutex\n\n\treferenceTime time.Time\n\tthreshold     int\n\tcounter       int\n\twindow        time.Duration\n}\n\n// NewRateLimit initializes a new RateLimit instance with the given threshold and window duration.\nfunc NewRateLimit(threshold int, window time.Duration) *RateLimit {\n\treturn &RateLimit{\n\t\treferenceTime: time.Now(),\n\t\tthreshold:     threshold,\n\t\tcounter:       0,\n\t\twindow:        window,\n\t}\n}\n\nfunc (r *RateLimit) diff() time.Duration {\n\treturn time.Since(r.referenceTime)\n}\n\nfunc (r *RateLimit) reset() {\n\tr.counter = 0\n\tr.referenceTime = time.Now()\n}\n\n// AllowRequest increments the counter and checks if the rate limit is exceeded.\n// If the threshold is zero, it allows all requests.\nfunc (r *RateLimit) AllowRequest() bool {\n\tr.lk.Lock()\n\tdefer r.lk.Unlock()\n\n\t// If the threshold is zero, allow all requests\n\tif r.threshold == 0 {\n\t\treturn true\n\t}\n\n\t// Check if the window has expired and reset if necessary\n\tif r.diff() > r.window {\n\t\tr.reset()\n\t}\n\n\tr.counter++\n\n\t// Check if the threshold is exceeded\n\treturn r.counter <= r.threshold\n}\n"
  },
  {
    "path": "util/ratelimit/ratelimit_test.go",
    "content": "package ratelimit\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRateLimit(t *testing.T) {\n\tthreshold := 5\n\twindow := 100 * time.Millisecond\n\trateLimit := NewRateLimit(threshold, window)\n\n\tt.Run(\"InitialState\", func(t *testing.T) {\n\t\tassert.Equal(t, 0, rateLimit.counter)\n\t})\n\n\tt.Run(\"AllowRequestWithinThreshold\", func(t *testing.T) {\n\t\tfor i := 0; i < threshold; i++ {\n\t\t\tassert.True(t, rateLimit.AllowRequest())\n\t\t}\n\t\tassert.Equal(t, threshold, rateLimit.counter)\n\t})\n\n\tt.Run(\"ExceedThreshold\", func(t *testing.T) {\n\t\tassert.False(t, rateLimit.AllowRequest())\n\t})\n\n\tt.Run(\"ResetAfterWindow\", func(t *testing.T) {\n\t\ttime.Sleep(window + 10*time.Millisecond)\n\t\tassert.True(t, rateLimit.AllowRequest())\n\t\tassert.Equal(t, 1, rateLimit.counter)\n\t})\n\n\tt.Run(\"ResetMethod\", func(t *testing.T) {\n\t\trateLimit.reset()\n\t\tassert.Equal(t, 0, rateLimit.counter)\n\t\tassert.True(t, rateLimit.AllowRequest())\n\t\tassert.Equal(t, 1, rateLimit.counter)\n\t})\n\n\tt.Run(\"DiffMethod\", func(t *testing.T) {\n\t\tassert.LessOrEqual(t, rateLimit.diff(), window)\n\t})\n}\n\nfunc TestRateLimitZeroThreshold(t *testing.T) {\n\twindow := 100 * time.Millisecond\n\tr := NewRateLimit(0, window)\n\n\tassert.True(t, r.AllowRequest())\n\tassert.Zero(t, r.counter)\n}\n"
  },
  {
    "path": "util/shell/shell.go",
    "content": "package shell\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/c-bata/go-prompt\"\n\t\"github.com/google/shlex\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n\t\"golang.org/x/term\"\n)\n\ntype lexer struct {\n\troot    *cobra.Command\n\trefresh func() *cobra.Command\n\tcache   map[string][]prompt.Suggest\n\tstdin   *term.State\n}\n\n// New creates a Cobra CLI command named \"interactive\" which runs an interactive shell prompt for the root command.\nfunc New(root *cobra.Command, refresh func() *cobra.Command, opts ...prompt.Option) *cobra.Command {\n\tlexer := &lexer{\n\t\troot:    root,\n\t\trefresh: refresh,\n\t\tcache:   make(map[string][]prompt.Suggest),\n\t}\n\n\tprefix := fmt.Sprintf(\"> %s \", root.Name())\n\topts = append(opts, prompt.OptionPrefix(prefix), prompt.OptionShowCompletionAtStart())\n\n\treturn &cobra.Command{\n\t\tUse:   \"interactive\",\n\t\tShort: \"Start pactus-shell in interactive mode\",\n\t\tRun: func(cmd *cobra.Command, _ []string) {\n\t\t\tlexer.saveStdin()\n\n\t\t\tlexer.editCommandTree(cmd)\n\t\t\tprompt.New(lexer.executor, lexer.completer, opts...).Run()\n\n\t\t\tlexer.restoreStdin()\n\t\t},\n\t}\n}\n\nfunc (s *lexer) editCommandTree(shell *cobra.Command) {\n\ts.root.RemoveCommand(shell)\n\n\t// Hide the \"completion\" command\n\tif cmd, _, err := s.root.Find([]string{\"completion\"}); err == nil {\n\t\t// TODO: Remove this command\n\t\tcmd.Hidden = true\n\t}\n\n\ts.root.AddCommand(&cobra.Command{\n\t\tUse:   \"exit\",\n\t\tShort: \"Exit the interactive shell\",\n\t\tRun: func(*cobra.Command, []string) {\n\t\t\t// TODO: Exit cleanly without help from the os package\n\t\t\tos.Exit(0)\n\t\t},\n\t})\n\n\tinitDefaultHelpFlag(s.root)\n}\n\nfunc initDefaultHelpFlag(cmd *cobra.Command) {\n\tcmd.InitDefaultHelpFlag()\n\n\tfor _, subcommand := range cmd.Commands() {\n\t\tinitDefaultHelpFlag(subcommand)\n\t}\n}\n\nfunc (s *lexer) saveStdin() {\n\tstate, err := term.GetState(int(os.Stdin.Fd()))\n\tif err != nil {\n\t\treturn\n\t}\n\ts.stdin = state\n}\n\nfunc (s *lexer) executor(line string) {\n\t// Allow command to read from stdin\n\ts.restoreStdin()\n\n\targs, _ := shlex.Split(line)\n\t_ = execute(s.root, args)\n\n\tif s.refresh != nil {\n\t\ts.root = s.refresh()\n\t\ts.editCommandTree(s.root)\n\t} else {\n\t\tif cmd, _, err := s.root.Find(args); err == nil {\n\t\t\tcmd.Flags().VisitAll(func(flag *pflag.Flag) {\n\t\t\t\tflag.Changed = false\n\t\t\t})\n\t\t}\n\t}\n\n\ts.cache = make(map[string][]prompt.Suggest)\n}\n\nfunc (s *lexer) restoreStdin() {\n\tif s.stdin != nil {\n\t\t_ = term.Restore(int(os.Stdin.Fd()), s.stdin)\n\t}\n}\n\nfunc (s *lexer) completer(doc prompt.Document) []prompt.Suggest {\n\targs, err := buildCompletionArgs(doc.CurrentLine())\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tif !isFlag(args[len(args)-1]) {\n\t\t// Clear partial strings to generate all possible completions\n\t\targs[len(args)-1] = \"\"\n\t}\n\tkey := strings.Join(args, \" \")\n\n\tsuggestions, ok := s.cache[key]\n\tif !ok {\n\t\tout, err := readCommandOutput(s.root, args)\n\t\tif err != nil {\n\t\t\treturn nil\n\t\t}\n\t\tsuggestions = parseSuggestions(out)\n\t\ts.cache[key] = suggestions\n\t}\n\n\treturn prompt.FilterHasPrefix(suggestions, doc.GetWordBeforeCursor(), true)\n}\n\nfunc buildCompletionArgs(input string) ([]string, error) {\n\targs, err := shlex.Split(input)\n\n\targs = append([]string{\"__complete\"}, args...)\n\tif input == \"\" || input[len(input)-1] == ' ' {\n\t\targs = append(args, \"\")\n\t}\n\n\treturn args, err\n}\n\nfunc readCommandOutput(cmd *cobra.Command, args []string) (string, error) {\n\tbuf := new(bytes.Buffer)\n\n\tstdout := cmd.OutOrStdout()\n\tstderr := os.Stderr\n\n\tcmd.SetOut(buf)\n\t_, os.Stderr, _ = os.Pipe()\n\n\terr := execute(cmd, args)\n\n\tcmd.SetOut(stdout)\n\tos.Stderr = stderr\n\n\treturn buf.String(), err\n}\n\nfunc execute(cmd *cobra.Command, args []string) error {\n\tif cobraCmd, _, err := cmd.Find(args); err == nil {\n\t\t// Reset flag values between runs due to a limitation in Cobra\n\t\tcobraCmd.Flags().VisitAll(func(flag *pflag.Flag) {\n\t\t\tif val, ok := flag.Value.(pflag.SliceValue); ok {\n\t\t\t\t_ = val.Replace([]string{})\n\t\t\t} else {\n\t\t\t\t_ = flag.Value.Set(flag.DefValue)\n\t\t\t}\n\n\t\t\t_ = cobraCmd.Flags().SetAnnotation(flag.Name, cobra.BashCompOneRequiredFlag, []string{\"false\"})\n\t\t})\n\n\t\tcobraCmd.InitDefaultHelpFlag()\n\t}\n\n\tcmd.SetArgs(args)\n\n\treturn cmd.Execute()\n}\n\nfunc parseSuggestions(out string) []prompt.Suggest {\n\tsuggestions := make([]prompt.Suggest, 0)\n\n\tx := strings.Split(out, \"\\n\")\n\tif len(x) < 2 {\n\t\treturn nil\n\t}\n\n\tfor _, line := range x[:len(x)-2] {\n\t\ttokens := strings.SplitN(line, \"\\t\", 2)\n\n\t\tif isShorthandFlag(tokens[0]) {\n\t\t\tcontinue\n\t\t}\n\n\t\tsuggestion := prompt.Suggest{Text: escapeSpecialCharacters(tokens[0])}\n\t\tif len(tokens) > 1 {\n\t\t\tsuggestion.Description = tokens[1]\n\t\t}\n\n\t\tsuggestions = append(suggestions, suggestion)\n\t}\n\n\tslices.SortFunc(suggestions, func(a, b prompt.Suggest) int {\n\t\taText, bText := a.Text, b.Text\n\t\taFlag, bFlag := isFlag(aText), isFlag(bText)\n\t\tswitch {\n\t\tcase aFlag && bFlag:\n\t\t\treturn strings.Compare(aText, bText)\n\t\tcase aFlag:\n\t\t\treturn 1\n\t\tcase bFlag:\n\t\t\treturn -1\n\t\tdefault:\n\t\t\treturn strings.Compare(aText, bText)\n\t\t}\n\t})\n\n\treturn suggestions\n}\n\nfunc escapeSpecialCharacters(val string) string {\n\tfor _, c := range []string{`\\`, `\"`, \"$\", \"`\", \"!\"} {\n\t\tval = strings.ReplaceAll(val, c, `\\`+c)\n\t}\n\n\tif strings.ContainsAny(val, \" #&*;<>?[]|~\") {\n\t\tval = fmt.Sprintf(\"%q\", val)\n\t}\n\n\treturn val\n}\n\nfunc isFlag(arg string) bool {\n\treturn strings.HasPrefix(arg, \"-\")\n}\n\nfunc isShorthandFlag(arg string) bool {\n\treturn isFlag(arg) && !strings.HasPrefix(arg, \"--\")\n}\n"
  },
  {
    "path": "util/shell/shell_test.go",
    "content": "package shell\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/c-bata/go-prompt\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBuildCompletionArgs_Empty(t *testing.T) {\n\targs, err := buildCompletionArgs(\"\")\n\trequire.NoError(t, err)\n\n\texpected := []string{\"__complete\", \"\"}\n\trequire.Equal(t, expected, args)\n}\n\nfunc TestBuildCompletionArgs_CurrentArg(t *testing.T) {\n\targs, err := buildCompletionArgs(\"a b\")\n\trequire.NoError(t, err)\n\n\texpected := []string{\"__complete\", \"a\", \"b\"}\n\trequire.Equal(t, expected, args)\n}\n\nfunc TestBuildCompletionArgs_MultiwordString(t *testing.T) {\n\targs, err := buildCompletionArgs(`a \"b c\"`)\n\trequire.NoError(t, err)\n\n\texpected := []string{\"__complete\", \"a\", \"b c\"}\n\trequire.Equal(t, expected, args)\n}\n\nfunc TestBuildCompletionArgs_NextArg(t *testing.T) {\n\targs, err := buildCompletionArgs(\"a b \")\n\trequire.NoError(t, err)\n\n\texpected := []string{\"__complete\", \"a\", \"b\", \"\"}\n\trequire.Equal(t, expected, args)\n}\n\nfunc TestReadCommandOutput_Stdout(t *testing.T) {\n\tcmd := &cobra.Command{\n\t\tUse: \"command\",\n\t\tRun: func(cmd *cobra.Command, _ []string) {\n\t\t\tcmd.Print(\"out\")\n\t\t},\n\t}\n\n\tout, err := readCommandOutput(cmd, []string{})\n\trequire.NoError(t, err)\n\trequire.Equal(t, \"out\", out)\n}\n\nfunc TestReadCommandOutput_Stderr(t *testing.T) {\n\tcmd := &cobra.Command{\n\t\tUse: \"command\",\n\t\tRun: func(cmd *cobra.Command, _ []string) {\n\t\t\tcmd.PrintErr(\"out\")\n\t\t},\n\t}\n\n\tout, err := readCommandOutput(cmd, []string{})\n\trequire.NoError(t, err)\n\trequire.Empty(t, out)\n}\n\nfunc TestReadCommandOutput_Err(t *testing.T) {\n\tcmd := &cobra.Command{\n\t\tUse: \"command\",\n\t\tRunE: func(_ *cobra.Command, _ []string) error {\n\t\t\treturn errors.New(\"err\")\n\t\t},\n\t}\n\n\t_, err := readCommandOutput(cmd, []string{})\n\trequire.Error(t, err)\n}\n\nfunc TestParseSuggestions_WithDescription(t *testing.T) {\n\tout := `command-with-description\tdescription\n:4\nCompletion ended with directive: ShellCompDirectiveNoFileComp`\n\texpected := []prompt.Suggest{{Text: \"command-with-description\", Description: \"description\"}}\n\trequire.Equal(t, expected, parseSuggestions(out))\n}\n\nfunc TestParseSuggestions_WithoutDescription(t *testing.T) {\n\tout := `command-without-description\n:4\nCompletion ended with directive: ShellCompDirectiveNoFileComp`\n\texpected := []prompt.Suggest{{Text: \"command-without-description\"}}\n\trequire.Equal(t, expected, parseSuggestions(out))\n}\n\nfunc TestParseSuggestions_HideShorthandFlags(t *testing.T) {\n\tout := `--flag\tA flag.\n-f\tA flag.\n:4\nCompletion ended with directive: ShellCompDirectiveNoFileComp`\n\texpected := []prompt.Suggest{{Text: \"--flag\", Description: \"A flag.\"}}\n\trequire.Equal(t, expected, parseSuggestions(out))\n}\n\nfunc TestParseSuggestions_Sort(t *testing.T) {\n\tout := `b\na\n:4\nCompletion ended with directive: ShellCompDirectiveNoFileComp`\n\texpected := []prompt.Suggest{{Text: \"a\"}, {Text: \"b\"}}\n\trequire.Equal(t, expected, parseSuggestions(out))\n}\n\nfunc TestEscapeSpecialCharacters_Spaces(t *testing.T) {\n\trequire.Equal(t, `\"string with spaces\"`, escapeSpecialCharacters(\"string with spaces\"))\n}\n\nfunc TestEscapeSpecialCharacters_All(t *testing.T) {\n\trequire.Equal(t, \"\\\\\\\\\\\\\\\"\\\\$\\\\`\\\\!\", escapeSpecialCharacters(\"\\\\\\\"$`!\"))\n}\n\nfunc TestEditCommandTree_RemoveShell(t *testing.T) {\n\troot := &cobra.Command{}\n\tsh := &cobra.Command{Use: \"lexer\"}\n\troot.AddCommand(sh)\n\n\ts := &lexer{root: root}\n\ts.editCommandTree(sh)\n\trequire.False(t, hasSubcommand(root, \"lexer\"))\n}\n\nfunc TestEditCommandTree_AddExit(t *testing.T) {\n\troot := &cobra.Command{}\n\n\ts := &lexer{root: root}\n\ts.editCommandTree(nil)\n\trequire.True(t, hasSubcommand(root, \"exit\"))\n}\n\nfunc hasSubcommand(cmd *cobra.Command, name string) bool {\n\tfor _, subcommand := range cmd.Commands() {\n\t\tif subcommand.Name() == name {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc TestNew_CommandProperties(t *testing.T) {\n\t// Test that the New function creates a command with correct properties\n\troot := &cobra.Command{}\n\n\tinteractiveCmd := New(root, nil)\n\n\trequire.Equal(t, \"interactive\", interactiveCmd.Use)\n\trequire.Equal(t, \"Start pactus-shell in interactive mode\", interactiveCmd.Short)\n\trequire.NotNil(t, interactiveCmd.Run)\n}\n\nfunc TestNew_CommandName(t *testing.T) {\n\t// Test that the command is named \"interactive\" not \"shell\"\n\troot := &cobra.Command{}\n\n\tinteractiveCmd := New(root, nil)\n\n\trequire.Equal(t, \"interactive\", interactiveCmd.Name())\n\trequire.NotEqual(t, \"shell\", interactiveCmd.Name())\n}\n\nfunc TestNew_WithOptions(t *testing.T) {\n\t// Test that New function accepts prompt options\n\troot := &cobra.Command{}\n\n\t// Test with some dummy options\n\tinteractiveCmd := New(root, nil,\n\t\tprompt.OptionPrefix(\"test> \"),\n\t\tprompt.OptionShowCompletionAtStart(),\n\t)\n\n\trequire.Equal(t, \"interactive\", interactiveCmd.Use)\n\trequire.NotNil(t, interactiveCmd.Run)\n}\n\nfunc TestNew_InteractiveCommandCreation(t *testing.T) {\n\t// Test that the New function creates a command with the exact changed properties\n\troot := &cobra.Command{}\n\n\tinteractiveCmd := New(root, nil)\n\n\t// Verify the specific changed lines\n\trequire.Equal(t, \"interactive\", interactiveCmd.Use)\n\trequire.Equal(t, \"Start pactus-shell in interactive mode\", interactiveCmd.Short)\n\trequire.NotNil(t, interactiveCmd.Run)\n\n\t// Test that it's not the old values\n\trequire.NotEqual(t, \"shell\", interactiveCmd.Use)\n\trequire.NotEqual(t, \"Start an interactive shell\", interactiveCmd.Short)\n}\n\nfunc TestNew_WithAllOptions(t *testing.T) {\n\troot := &cobra.Command{}\n\trefresh := func() *cobra.Command { return root }\n\n\tinteractiveCmd := New(root, refresh,\n\t\tprompt.OptionPrefix(\"test> \"),\n\t\tprompt.OptionShowCompletionAtStart(),\n\t\tprompt.OptionSuggestionBGColor(prompt.Black),\n\t\tprompt.OptionSuggestionTextColor(prompt.Green),\n\t)\n\n\t// Verify the changed properties are correct\n\trequire.Equal(t, \"interactive\", interactiveCmd.Use)\n\trequire.Equal(t, \"Start pactus-shell in interactive mode\", interactiveCmd.Short)\n\trequire.NotNil(t, interactiveCmd.Run)\n}\n\nfunc TestNew_CommandNameNotShell(t *testing.T) {\n\t// Explicitly test that the command is NOT named \"shell\" anymore\n\troot := &cobra.Command{}\n\n\tinteractiveCmd := New(root, nil)\n\n\t// This ensures we're testing the actual change\n\trequire.NotEqual(t, \"shell\", interactiveCmd.Name())\n\trequire.Equal(t, \"interactive\", interactiveCmd.Name())\n}\n\nfunc TestChangedLinesExecution(t *testing.T) {\n\troot := &cobra.Command{}\n\n\tcmd := New(root, nil)\n\n\t// Verify the exact changes\n\trequire.Equal(t, \"interactive\", cmd.Use)\n\trequire.Equal(t, \"Start pactus-shell in interactive mode\", cmd.Short)\n\n\trequire.NotEqual(t, \"shell\", cmd.Use)\n\trequire.NotEqual(t, \"Start an interactive shell\", cmd.Short)\n}\n"
  },
  {
    "path": "util/simplemerkle/merkle.go",
    "content": "// This file contains code from the btcd project,\n// which is licensed under the ISC License.\n//\n// Original license: https://github.com/btcsuite/btcd/blob/master/LICENSE\n//\n\npackage simplemerkle\n\nimport (\n\t\"math\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n)\n\nvar hasher func([]byte) hash.Hash\n\nfunc init() {\n\thasher = hash.CalcHash\n}\n\ntype Tree struct {\n\tmerkles []*hash.Hash\n}\n\n// nextPowerOfTwo returns the smallest power of two that is greater than or equal to\n// the given number. If the number is already a power of two, it returns the number itself.\nfunc nextPowerOfTwo(num int) int {\n\t// Return the number if it's already a power of 2.\n\tif num&(num-1) == 0 {\n\t\treturn num\n\t}\n\n\t// Figure out and return the next power of two.\n\texponent := uint(math.Log2(float64(num))) + 1\n\n\treturn 1 << exponent // 2^exponent\n}\n\n// HashMerkleBranches takes two hashes, treated as the left and right tree\n// nodes, and returns the hash of their concatenation.  This is a helper\n// function used to aid in the generation of a merkle tree.\nfunc HashMerkleBranches(left, right *hash.Hash) *hash.Hash {\n\t// Concatenate the left and right nodes.\n\tvar h [hash.HashSize * 2]byte\n\tcopy(h[:hash.HashSize], left.Bytes())\n\tcopy(h[hash.HashSize:], right.Bytes())\n\n\tnewHash := hasher(h[:])\n\n\treturn &newHash\n}\n\nfunc NewTreeFromSlices(slices [][]byte) *Tree {\n\thashes := make([]hash.Hash, len(slices))\n\tfor i, b := range slices {\n\t\thashes[i] = hasher(b)\n\t}\n\n\treturn NewTreeFromHashes(hashes)\n}\n\nfunc NewTreeFromHashes(hashes []hash.Hash) *Tree {\n\tif len(hashes) == 0 {\n\t\treturn nil\n\t}\n\t// Calculate how many entries are required to hold the binary merkle\n\t// tree as a linear array and create an array of that size.\n\tnextPoT := nextPowerOfTwo(len(hashes))\n\tarraySize := nextPoT*2 - 1\n\tmerkles := make([]*hash.Hash, arraySize)\n\n\tfor i := range hashes {\n\t\tmerkles[i] = &hashes[i]\n\t}\n\n\t// Start the array offset after the last transaction and adjusted to the\n\t// next power of two.\n\toffset := nextPoT\n\tfor index := 0; index < arraySize-1; index += 2 {\n\t\tswitch {\n\t\t// When there is no left child node, the parent is nil too.\n\t\tcase merkles[index] == nil:\n\t\t\tmerkles[offset] = nil\n\n\t\t// When there is no right child, the parent is generated by\n\t\t// hashing the concatenation of the left child with itself.\n\t\tcase merkles[index+1] == nil:\n\t\t\tnewHash := HashMerkleBranches(merkles[index], merkles[index])\n\t\t\tmerkles[offset] = newHash\n\n\t\t// The normal case sets the parent node to the double sha256\n\t\t// of the concatenation of the left and right children.\n\t\tdefault:\n\t\t\tnewHash := HashMerkleBranches(merkles[index], merkles[index+1])\n\t\t\tmerkles[offset] = newHash\n\t\t}\n\t\toffset++\n\t}\n\n\treturn &Tree{merkles: merkles}\n}\n\nfunc (tree *Tree) Root() hash.Hash {\n\tif tree == nil {\n\t\treturn hash.UndefHash\n\t}\n\th := tree.merkles[len(tree.merkles)-1]\n\tif h != nil {\n\t\treturn *h\n\t}\n\n\treturn hash.UndefHash\n}\n\nfunc (tree *Tree) Depth() int {\n\tif tree == nil {\n\t\treturn 0\n\t}\n\n\treturn int(math.Log2(float64(len(tree.merkles))))\n}\n"
  },
  {
    "path": "util/simplemerkle/merkle_test.go",
    "content": "package simplemerkle\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc strToHash(str string) hash.Hash {\n\th := hash.CalcHash([]byte(str))\n\n\treturn h\n}\n\nfunc TestMerkleTree(t *testing.T) {\n\tslices := [][]byte{[]byte(\"a\"), []byte(\"b\"), []byte(\"c\")}\n\thashes := []hash.Hash{\n\t\tstrToHash(\"a\"),\n\t\tstrToHash(\"b\"),\n\t\tstrToHash(\"c\"),\n\t}\n\n\ttree1 := NewTreeFromHashes(hashes)\n\tif tree1.Root().String() != \"e6061997a9011668bcf216020aaad9cc7f5f34d5b6f78f1e63ef6257c1aa1f37\" {\n\t\tt.Error(\"invalid merkle root\")\n\t}\n\n\ttree2 := NewTreeFromSlices(slices)\n\tassert.Equal(t, tree1.Root(), tree2.Root())\n\n\tfmt.Println(tree2.ToString())\n}\n\nfunc TestMerkleTreeDepth2(t *testing.T) {\n\tslices := [][]byte{[]byte(\"a\"), []byte(\"b\"), []byte(\"c\")}\n\thashes := []hash.Hash{\n\t\tstrToHash(\"a\"),\n\t\tstrToHash(\"b\"),\n\t\tstrToHash(\"c\"),\n\t}\n\n\ttree1 := NewTreeFromHashes(hashes)\n\tif tree1.Root().String() != \"e6061997a9011668bcf216020aaad9cc7f5f34d5b6f78f1e63ef6257c1aa1f37\" {\n\t\tt.Error(\"invalid merkle root\")\n\t}\n\n\ttree2 := NewTreeFromSlices(slices)\n\tassert.Equal(t, tree1.Root(), tree2.Root())\n\n\tfmt.Println(tree2.ToString())\n}\n\nfunc TestMerkleTree_Bitcoin_Block100000(t *testing.T) {\n\thasher = func(data []byte) hash.Hash {\n\t\tfirst := sha256.Sum256(data)\n\t\tsecond := sha256.Sum256(first[:])\n\t\th, _ := hash.FromBytes(second[:])\n\n\t\treturn h\n\t}\n\n\t// Block 100000 in bitcoin\n\troot, _ := hash.FromString(\"6657A9252AACD5C0B2940996ECFF952228C3067CC38D4885EFB5A4AC4247E9F3\")\n\thash1, _ := hash.FromString(\"876DD0A3EF4A2816FFD1C12AB649825A958B0FF3BB3D6F3E1250F13DDBF0148C\")\n\thash2, _ := hash.FromString(\"C40297F730DD7B5A99567EB8D27B78758F607507C52292D02D4031895B52F2FF\")\n\thash3, _ := hash.FromString(\"C46E239AB7D28E2C019B6D66AD8FAE98A56EF1F21AEECB94D1B1718186F05963\")\n\thash4, _ := hash.FromString(\"1D0CB83721529A062D9675B98D6E5C587E4A770FC84ED00ABC5A5DE04568A6E9\")\n\n\thashes := []hash.Hash{\n\t\thash1,\n\t\thash2,\n\t\thash3,\n\t\thash4,\n\t}\n\n\ttree := NewTreeFromHashes(hashes)\n\tassert.Equal(t, root, tree.Root())\n\tassert.Equal(t, 2, tree.Depth())\n}\n\nfunc TestMerkleTree_Bitcoin_Block153342(t *testing.T) {\n\thasher = func(data []byte) hash.Hash {\n\t\tfirst := sha256.Sum256(data)\n\t\tsecond := sha256.Sum256(first[:])\n\t\th, _ := hash.FromBytes(second[:])\n\n\t\treturn h\n\t}\n\n\t// Block 153342 in bitcoin\n\twantMerkle, _ := hex.DecodeString(\"dd8ee246e19ec5c77ddd46c1138e8af6a272da4dbb6500ea74a79c0bf89e2c07\")\n\thash1, _ := hash.FromString(\"216404816ca6261f9206d471d0403ba49bda4264719d879819fbda9849781e62\")\n\thash2, _ := hash.FromString(\"56f2602c15cb0b8e0b38e54b2961a2e541a7febbe852516cd425aa5fb72c5578\")\n\thash3, _ := hash.FromString(\"0d065da59871386321c2c9b2e4b6482426bcce88600ab7f55f0d27b9916a9e0c\")\n\thash4, _ := hash.FromString(\"1129038c38783f4c4241e54d9d702965b305b8d1e54c091fdd9f9df21240586e\")\n\thash5, _ := hash.FromString(\"81461f9e0e093dad14d0c5fb3978431a321bf61de33512d6cc344edb86f359f3\")\n\thash6, _ := hash.FromString(\"22140f4b15d76ff27d657a731fdc3040487c22ee3577c6522239d9cfbe0292ad\")\n\thash7, _ := hash.FromString(\"0fa273bce5137a0dbffac068ebb6f1ebe64e6be2b00cdae5a967edeb0cd96b93\")\n\thash8, _ := hash.FromString(\"cab481631e7f2f7d864a65d23c34bd357f46ecba60bb8117f55ed43232aa75e5\")\n\thash9, _ := hash.FromString(\"dffea4c267fa6949111fed23b15977d5e2efa82fefd9cd5ac81e38518d2c2bef\")\n\thash10, _ := hash.FromString(\"ed9f4ee5e07a47a7026725173de32efa7372243117be1aa7f60a650aef075475\")\n\thash11, _ := hash.FromString(\"8822c80afa3eb84bc3603509b8b6deeee37cf771ca7b49d3dd73294e05f7b29f\")\n\thash12, _ := hash.FromString(\"23ad44934167cc712b358f2a097b7316ca2b3c2f34472017273969e7c7e5cdb4\")\n\thash13, _ := hash.FromString(\"c1dc3762c6a57757a9aa895b8229613d96f272f79d14c9854132b980eaa2a2c4\")\n\n\troot, _ := hash.FromBytes(wantMerkle)\n\n\thashes := []hash.Hash{\n\t\thash1, hash2, hash3, hash4, hash5, hash6, hash7, hash8, hash9, hash10, hash11, hash12, hash13,\n\t}\n\n\ttree := NewTreeFromHashes(hashes)\n\tassert.Equal(t, root, tree.Root())\n\tassert.Equal(t, 4, tree.Depth())\n\tfmt.Println(tree.ToString())\n\tassert.Contains(t, tree.ToString(), root.String())\n\n\tright, _ := hash.FromString(\"4a3ee07bb7baf6dfa265fa5c85a8955c8e79ddab0f70657a14df5744a103e24d\")\n\tleft, _ := hash.FromString(\"114799e25e6dc376d65fd5406516919e1e619b89316be91ea064a69400472d1e\")\n\n\troot2 := HashMerkleBranches(&left, &right)\n\tassert.Equal(t, root, *root2)\n}\n"
  },
  {
    "path": "util/simplemerkle/printing.go",
    "content": "package simplemerkle\n\nimport (\n\t\"strings\"\n)\n\nfunc (tree *Tree) ToString() string {\n\tnodes := tree.merkles\n\tif len(nodes) == 0 {\n\t\treturn \"\"\n\t}\n\n\tlines := make([]string, len(tree.merkles))\n\tdepth := 1\n\toffset := 0\n\tindent := \"\"\n\tj := 1\n\tfor i := len(nodes) - 1; i >= 0; i-- {\n\t\tif j == (1 << depth) {\n\t\t\tlines[offset] += \"\\n\"\n\t\t\tindent += \"   \"\n\t\t\tdepth++\n\t\t}\n\t\tif nodes[i] != nil {\n\t\t\tlines[offset] = indent + nodes[i].String()\n\t\t} else {\n\t\t\tlines[offset] = indent + \"<EMPTY>\"\n\t\t}\n\n\t\tj++\n\t\toffset++\n\t}\n\n\treturn strings.Join(lines, \"\\n\")\n}\n"
  },
  {
    "path": "util/slice.go",
    "content": "package util\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"crypto/subtle\"\n\t\"encoding/binary\"\n\t\"math/rand\"\n\t\"slices\"\n)\n\nfunc Uint16ToBytesLE(n uint16) []byte {\n\tbs := make([]byte, 2)\n\tbinary.LittleEndian.PutUint16(bs, n)\n\n\treturn bs\n}\n\nfunc Int16ToBytesLE(n int16) []byte {\n\treturn Uint16ToBytesLE(uint16(n))\n}\n\nfunc BytesToUint16LE(bs []byte) uint16 {\n\treturn binary.LittleEndian.Uint16(bs)\n}\n\nfunc BytesToInt16LE(bs []byte) int16 {\n\treturn int16(BytesToUint16LE(bs))\n}\n\nfunc Uint32ToBytesLE(n uint32) []byte {\n\tbs := make([]byte, 4)\n\tbinary.LittleEndian.PutUint32(bs, n)\n\n\treturn bs\n}\n\nfunc Int32ToBytesLE(n int32) []byte {\n\treturn Uint32ToBytesLE(uint32(n))\n}\n\nfunc BytesToUint32LE(bs []byte) uint32 {\n\treturn binary.LittleEndian.Uint32(bs)\n}\n\nfunc BytesToInt32LE(bs []byte) int32 {\n\treturn int32(BytesToUint32LE(bs))\n}\n\nfunc Uint64ToBytesLE(n uint64) []byte {\n\tbs := make([]byte, 8)\n\tbinary.LittleEndian.PutUint64(bs, n)\n\n\treturn bs\n}\n\nfunc Int64ToBytesLE(n int64) []byte {\n\treturn Uint64ToBytesLE(uint64(n))\n}\n\nfunc BytesToUint64LE(bs []byte) uint64 {\n\tn := binary.LittleEndian.Uint64(bs)\n\n\treturn n\n}\n\nfunc BytesToInt64LE(bs []byte) int64 {\n\treturn int64(BytesToUint64LE(bs))\n}\n\n// StringToBytes converts a string to a slice of bytes.\nfunc StringToBytes(s string) []byte {\n\treturn []byte(s)\n}\n\nfunc CompressBuffer(data []byte) ([]byte, error) {\n\tvar buf bytes.Buffer\n\tgz := gzip.NewWriter(&buf)\n\tif _, err := gz.Write(data); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := gz.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf.Bytes(), nil\n}\n\nfunc DecompressBuffer(s []byte) ([]byte, error) {\n\tbuf := bytes.NewBuffer(s)\n\treader, err := gzip.NewReader(buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar res bytes.Buffer\n\tif _, err = res.ReadFrom(reader); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res.Bytes(), nil\n}\n\n// Subtracts removes elements of slice2 from slice1 while preserving order.\n// Examples:\n//\n//\t[1,2,3,4] - [1,2] = [3,4]\n//\t[1,2,3,4] - [2,4] = [1,3]\n//\t[1,2,3,4] - [4,2] = [1,3]\n//\t[1,2,3,4] - [4,5] = [1,2,3]\nfunc Subtracts(slice1, slice2 []int32) []int32 {\n\tsub := []int32{}\n\tif slice2 == nil {\n\t\treturn slice1\n\t}\n\n\tfor _, num1 := range slice1 {\n\t\tfound := slices.Contains(slice2, num1)\n\t\tif !found {\n\t\t\tsub = append(sub, num1)\n\t\t}\n\t}\n\n\treturn sub\n}\n\n// SafeCmp compares two slices with constant time.\n// Note that we are using the subtle.ConstantTimeCompare() function for this\n// to help prevent timing attacks.\nfunc SafeCmp(left, right []byte) bool {\n\treturn subtle.ConstantTimeCompare(left, right) == 1\n}\n\n// Merge accepts multiple slices and returns a single merged slice.\nfunc Merge[T any](slices ...[]T) []T {\n\tvar totalLength int\n\n\t// Calculate the total length of the merged slice.\n\tfor _, slice := range slices {\n\t\ttotalLength += len(slice)\n\t}\n\n\t// Create a merged slice with the appropriate capacity.\n\tmerged := make([]T, 0, totalLength)\n\n\t// Append each input slice to the merged slice.\n\tfor _, slice := range slices {\n\t\tmerged = append(merged, slice...)\n\t}\n\n\treturn merged\n}\n\n// Reverse replaces the contents of a slice with the same elements in reverse\n// order.\nfunc Reverse[S ~[]E, E any](slice S) {\n\tfor i, j := 0, len(slice)-1; i < j; i, j = i+1, j-1 {\n\t\tslice[i], slice[j] = slice[j], slice[i]\n\t}\n}\n\n// PadToLeft grows the slice to the given length by prepending zero-valued\n// elements if necessary.\nfunc PadToLeft[T any](slice []T, length int) []T {\n\tif len(slice) < length {\n\t\tpad := make([]T, length-len(slice), length+len(slice))\n\t\tslice = append(pad, slice...)\n\t}\n\n\treturn slice\n}\n\n// PadToRight grows the slice to the given length by appending zero-valued\n// elements if necessary.\nfunc PadToRight[T any](slice []T, length int) []T {\n\tif len(slice) < length {\n\t\tpad := make([]T, length-len(slice))\n\t\tslice = append(slice, pad...)\n\t}\n\n\treturn slice\n}\n\n// IsSubset checks if subSet is a subset of parentSet.\n// It returns true if all elements of subSet are in parentSet.\nfunc IsSubset[T comparable](parentSet, subSet []T) bool {\n\tlastIndex := 0\n\tfor i := 0; i < len(subSet); i++ {\n\t\tmatchFound := false\n\t\tfor j := lastIndex; j < len(parentSet); j++ {\n\t\t\tif subSet[i] == parentSet[j] {\n\t\t\t\tmatchFound = true\n\t\t\t\tlastIndex = j\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !matchFound {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\n// RemoveFirstOccurrenceOf removes the first occurrence of element from slice.\n// It returns the modified slice and a boolean indicating whether an element was removed.\nfunc RemoveFirstOccurrenceOf[T comparable](slice []T, element T) ([]T, bool) {\n\tfor i, v := range slice {\n\t\tif v == element {\n\t\t\treturn append(slice[:i], slice[i+1:]...), true\n\t\t}\n\t}\n\n\treturn slice, false\n}\n\n// Trim truncates a slice to the given length.\nfunc Trim[T any](slice []T, newLength int) []T {\n\tif newLength <= len(slice) {\n\t\treturn slice[:newLength]\n\t}\n\n\treturn slice\n}\n\n// Shuffle randomly permutes the elements of slice in place.\nfunc Shuffle[T any](slice []T) {\n\trand.Shuffle(len(slice), func(i, j int) {\n\t\tslice[i], slice[j] = slice[j], slice[i]\n\t})\n}\n\n// Prepend adds elements to the beginning of a slice and returns the modified slice.\nfunc Prepend[T any](slice []T, elements ...T) []T {\n\treturn append(elements, slice...)\n}\n"
  },
  {
    "path": "util/slice_test.go",
    "content": "package util\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSliceToInt16(t *testing.T) {\n\ttests := []struct {\n\t\tin    int16\n\t\tslice []byte\n\t}{\n\t\t{MinInt16, []byte{0x00, 0x80}},\n\t\t{int16(-128), []byte{0x80, 0xff}},\n\t\t{int16(-1), []byte{0xff, 0xff}},\n\t\t{int16(0), []byte{0x00, 0x00}},\n\t\t{int16(1), []byte{0x01, 0x00}},\n\t\t{int16(256), []byte{0x00, 0x01}},\n\t\t{MaxInt16, []byte{0xff, 0x7f}},\n\t}\n\n\tfor _, tt := range tests {\n\t\ts1 := Uint16ToBytesLE(uint16(tt.in))\n\t\ts2 := Int16ToBytesLE(tt.in)\n\t\tassert.Equal(t, s1, s2)\n\t\tassert.Equal(t, tt.slice, s1)\n\n\t\tv1 := BytesToInt16LE(tt.slice)\n\t\tv2 := BytesToUint16LE(tt.slice)\n\t\tassert.Equal(t, int16(v2), v1)\n\t\tassert.Equal(t, tt.in, v1)\n\t}\n}\n\nfunc TestSliceToInt32(t *testing.T) {\n\ttests := []struct {\n\t\tin    int32\n\t\tslice []byte\n\t}{\n\t\t{MinInt32, []byte{0x00, 0x00, 0x00, 0x80}},\n\t\t{int32(-128), []byte{0x80, 0xff, 0xff, 0xff}},\n\t\t{int32(-1), []byte{0xff, 0xff, 0xff, 0xff}},\n\t\t{int32(0), []byte{0x00, 0x00, 0x00, 0x00}},\n\t\t{int32(1), []byte{0x01, 0x00, 0x00, 0x00}},\n\t\t{int32(256), []byte{0x00, 0x01, 0x00, 0x00}},\n\t\t{MaxInt32, []byte{0xff, 0xff, 0xff, 0x7f}},\n\t}\n\n\tfor _, tt := range tests {\n\t\ts1 := Uint32ToBytesLE(uint32(tt.in))\n\t\ts2 := Int32ToBytesLE(tt.in)\n\t\tassert.Equal(t, s1, s2)\n\t\tassert.Equal(t, tt.slice, s1)\n\n\t\tv1 := BytesToInt32LE(tt.slice)\n\t\tv2 := BytesToUint32LE(tt.slice)\n\t\tassert.Equal(t, int32(v2), v1)\n\t\tassert.Equal(t, tt.in, v1)\n\t}\n}\n\nfunc TestSliceToInt64(t *testing.T) {\n\ttests := []struct {\n\t\tin    int64\n\t\tslice []byte\n\t}{\n\t\t{MinInt64, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80}},\n\t\t{int64(-128), []byte{0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},\n\t\t{int64(-1), []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},\n\t\t{int64(0), []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},\n\t\t{int64(1), []byte{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},\n\t\t{int64(256), []byte{0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},\n\t\t{MaxInt64, []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}},\n\t}\n\n\tfor _, tt := range tests {\n\t\ts1 := Uint64ToBytesLE(uint64(tt.in))\n\t\ts2 := Int64ToBytesLE(tt.in)\n\t\tassert.Equal(t, s1, s2)\n\t\tassert.Equal(t, tt.slice, s1)\n\n\t\tv1 := BytesToInt64LE(tt.slice)\n\t\tv2 := BytesToUint64LE(tt.slice)\n\t\tassert.Equal(t, int64(v2), v1)\n\t\tassert.Equal(t, tt.in, v1)\n\t}\n}\n\nfunc TestCompress(t *testing.T) {\n\ta := []byte{1, 2, 3, 4, 5, 6, 7}\n\tc, err := CompressBuffer(a)\n\trequire.NoError(t, err)\n\tb, err := DecompressBuffer(c)\n\trequire.NoError(t, err)\n\tassert.Equal(t, a, b)\n}\n\nfunc TestDecompress(t *testing.T) {\n\tdata, _ := hex.DecodeString(\n\t\t\"1f8b08000000000000ff5accb8929191492afefe9620e60805060280254221ac2238cb57f8d6da3ecfc47b617bd47bf80fbe503b11b7aef3\" +\n\t\t\t\"85a6c0ba159a2142ac110a1d8f2e447cd46a3f3d71d6fc5c9eac45377ec4efffa0b76c33bb1377fead15f5cdf7d9085bc44e58094784c216\" +\n\t\t\t\"9fcd92c947ee35a43a49ff5d57b563eeaad9415b8ed6d685bd72aaf9afd3b5898b334455a26edf71fd634957941ead7f15ad5fe0e96517ce\" +\n\t\t\t\"f48d79216323616702020000ffffa63359ef1b010000\")\n\t_, err := DecompressBuffer(data[1:])\n\trequire.Error(t, err)\n\t_, err = DecompressBuffer(data)\n\trequire.NoError(t, err)\n}\n\nfunc TestSubtractAndSubset(t *testing.T) {\n\tt.Run(\"Case 1\", func(t *testing.T) {\n\t\ts1 := []int32{1, 2, 3, 4}\n\t\ts2 := []int32{1, 2, 3}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{4}, s3)\n\t})\n\n\tt.Run(\"Case 2\", func(t *testing.T) {\n\t\ts1 := []int32{1, 2, 3, 4}\n\t\ts2 := []int32{2, 3, 5}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{1, 4}, s3)\n\t})\n\n\tt.Run(\"Case 3\", func(t *testing.T) {\n\t\ts1 := []int32{1, 2, 3, 4}\n\t\ts2 := []int32{}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{1, 2, 3, 4}, s3)\n\t})\n\n\tt.Run(\"Case 4\", func(t *testing.T) {\n\t\ts1 := []int32{}\n\t\ts2 := []int32{1, 2, 3, 4}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{}, s3)\n\t})\n\n\tt.Run(\"Case 5\", func(t *testing.T) {\n\t\ts1 := []int32{1, 2, 3, 4}\n\t\ts2 := []int32{1, 2, 3, 4}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{}, s3)\n\t})\n\n\tt.Run(\"Case 6\", func(t *testing.T) {\n\t\ts1 := []int32{1, 3, 5}\n\t\ts2 := []int32{1, 2, 3, 4, 5}\n\t\ts3 := Subtracts(s1, s2)\n\t\tassert.Equal(t, []int32{}, s3)\n\t})\n\n\tt.Run(\"Case 7\", func(t *testing.T) {\n\t\ts1 := []int32{1, 2, 3, 4}\n\t\ts3 := Subtracts(s1, nil)\n\t\tassert.Equal(t, s3, s1)\n\t})\n\n\tt.Run(\"Case 8\", func(t *testing.T) {\n\t\ts2 := []int32{1, 2, 3, 4}\n\t\ts3 := Subtracts(nil, s2)\n\t\tassert.Equal(t, []int32{}, s3)\n\t})\n}\n\nfunc TestSafeCmp(t *testing.T) {\n\tassert.True(t, SafeCmp([]byte{1, 2, 3}, []byte{1, 2, 3}))\n\tassert.False(t, SafeCmp([]byte{1, 2, 3, 3}, []byte{1, 2, 3}))\n}\n\nfunc TestMerge(t *testing.T) {\n\ttests := []struct {\n\t\tslices [][]byte\n\t\tmerged []byte\n\t}{\n\t\t{[][]byte{nil}, []byte{}},\n\t\t{[][]byte{{0, 1, 2}}, []byte{0, 1, 2}},\n\t\t{[][]byte{{}}, []byte{}},\n\t\t{[][]byte{{}, {}}, []byte{}},\n\t\t{[][]byte{{0}, {0}}, []byte{0, 0}},\n\t\t{[][]byte{{0}, {1}, {2}}, []byte{0, 1, 2}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tmerged := Merge(tt.slices...)\n\t\tassert.Equal(t, tt.merged, merged)\n\t}\n}\n\nfunc TestReverse(t *testing.T) {\n\ttests := []struct {\n\t\tslice    []byte\n\t\treversed []byte\n\t}{\n\t\t{[]byte{}, []byte{}},\n\t\t{[]byte{0}, []byte{0}},\n\t\t{[]byte{1, 2, 3}, []byte{3, 2, 1}},\n\t\t{[]byte{1, 2}, []byte{2, 1}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tReverse(tt.slice)\n\t\tassert.Equal(t, tt.slice, tt.reversed)\n\t}\n}\n\nfunc TestPadToLeft(t *testing.T) {\n\ttests := []struct {\n\t\tin   []int\n\t\tsize int\n\t\twant []int\n\t}{\n\t\t{[]int{1, 2, 3}, 5, []int{0, 0, 1, 2, 3}},\n\t\t{[]int{1, 2, 3}, 3, []int{1, 2, 3}},\n\t\t{[]int{1, 2, 3}, 2, []int{1, 2, 3}},\n\t\t{[]int{}, 5, []int{0, 0, 0, 0, 0}},\n\t\t{[]int{}, 0, []int{}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := PadToLeft(tt.in, tt.size)\n\t\tassert.Equal(t, tt.want, got, \"PadToLeft failed, got %v, want %v\", got, tt.want)\n\t}\n}\n\nfunc TestPadToRight(t *testing.T) {\n\ttests := []struct {\n\t\tin   []int\n\t\tsize int\n\t\twant []int\n\t}{\n\t\t{[]int{1, 2, 3}, 5, []int{1, 2, 3, 0, 0}},\n\t\t{[]int{1, 2, 3}, 3, []int{1, 2, 3}},\n\t\t{[]int{1, 2, 3}, 2, []int{1, 2, 3}},\n\t\t{[]int{}, 4, []int{0, 0, 0, 0}},\n\t\t{[]int{}, 0, []int{}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := PadToRight(tt.in, tt.size)\n\t\tassert.Equal(t, tt.want, got, \"PadToRight failed, got %v, want %v\", got, tt.want)\n\t}\n}\n\nfunc TestIsSubset(t *testing.T) {\n\ttests := []struct {\n\t\tarr1, arr2 []int\n\t\twant       bool\n\t}{\n\t\t{[]int{11, 1, 13, 21, 3, 7}, []int{11, 3, 7}, true},\n\t\t{[]int{11, 1, 13, 21, 3, 7}, []int{3, 11, 7}, false},\n\t\t{[]int{1, 2, 3, 4, 5}, []int{1, 2, 3}, true},\n\t\t{[]int{1, 2, 3}, []int{1, 2, 3, 4}, false},\n\t\t{[]int{1, 2, 3, 4, 5}, []int{6, 7, 8}, false},\n\t\t{[]int{}, []int{1, 2, 3, 4, 5}, false},\n\t\t{[]int{1, 2, 3, 4, 5}, []int{}, true},\n\t\t{[]int{}, []int{}, true},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := IsSubset(tt.arr1, tt.arr2)\n\t\tassert.Equal(t, tt.want, got,\n\t\t\t\"isSubset(%v, %v) = %v; want %v\", tt.arr1, tt.arr2, got, tt.want)\n\t}\n}\n\nfunc TestStringToBytes(t *testing.T) {\n\ttests := []struct {\n\t\tinput  string\n\t\toutput []byte\n\t}{\n\t\t{\"Hello\", []byte(\"Hello\")},\n\t\t{\"Go\", []byte(\"Go\")},\n\t\t{\"\", []byte(\"\")},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := StringToBytes(tt.input)\n\t\tassert.Equal(t, tt.output, got, \"StringToBytes('%s') =  %v, want %v\", tt.input, got, tt.output)\n\t}\n}\n\nfunc TestRemoveFirstOccurrenceOf(t *testing.T) {\n\ttests := []struct {\n\t\tname    string\n\t\ts       []int\n\t\te       int\n\t\twant    []int\n\t\tremoved bool\n\t}{\n\t\t{\n\t\t\tname:    \"empty slice\",\n\t\t\ts:       []int{},\n\t\t\te:       1,\n\t\t\twant:    []int{},\n\t\t\tremoved: false,\n\t\t},\n\t\t{\n\t\t\tname:    \"element not in slice\",\n\t\t\ts:       []int{1, 2, 3},\n\t\t\te:       4,\n\t\t\twant:    []int{1, 2, 3},\n\t\t\tremoved: false,\n\t\t},\n\t\t{\n\t\t\tname:    \"element in slice\",\n\t\t\ts:       []int{1, 2, 3},\n\t\t\te:       2,\n\t\t\twant:    []int{1, 3},\n\t\t\tremoved: true,\n\t\t},\n\t\t{\n\t\t\tname:    \"two elements in slice\",\n\t\t\ts:       []int{1, 2, 2, 3},\n\t\t\te:       2,\n\t\t\twant:    []int{1, 2, 3},\n\t\t\tremoved: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot, removed := RemoveFirstOccurrenceOf(tt.s, tt.e)\n\n\t\tassert.Equal(t, tt.want, got, \"%s failed: got %v, want %v\", tt.name, got, tt.want)\n\t\tassert.Equal(t, tt.removed, removed, \"%s failed: got %v, want %v\", tt.name, removed, tt.removed)\n\t}\n}\n\nfunc TestTrimSlice(t *testing.T) {\n\ttests := []struct {\n\t\tinput     []int\n\t\tnewLength int\n\t\twant      []int\n\t}{\n\t\t{[]int{1, 2, 3, 4, 5}, 3, []int{1, 2, 3}},\n\t\t{[]int{1}, 3, []int{1}},\n\t\t{[]int{}, 3, []int{}},\n\t\t{[]int{1, 2, 3, 4, 5}, 0, []int{}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := Trim(tt.input, tt.newLength)\n\t\tassert.Equal(t, tt.want, got, \"Trim() = %v, want %v\", got, tt.want)\n\t}\n}\n\nfunc TestShuffle(t *testing.T) {\n\t// Create a slice with 100 integers\n\tints := make([]int, 100)\n\tfor i := range ints {\n\t\tints[i] = i + 1\n\t}\n\toriginalInts := make([]int, len(ints))\n\tcopy(originalInts, ints)\n\n\tShuffle(ints)\n\n\tassert.NotEqual(t, originalInts, ints, \"ints slice was not shuffled\")\n\tassert.ElementsMatch(t, originalInts, ints, \"ints slice does not contain the same elements\")\n}\n\nfunc TestPrepend(t *testing.T) {\n\ttests := []struct {\n\t\tslice    []int\n\t\telements []int\n\t\twant     []int\n\t}{\n\t\t{[]int{3, 4, 5}, []int{1, 2}, []int{1, 2, 3, 4, 5}},\n\t\t{[]int{3, 4, 5}, []int{}, []int{3, 4, 5}},\n\t\t{[]int{}, []int{1, 2}, []int{1, 2}},\n\t\t{[]int{}, []int{}, []int{}},\n\t}\n\n\tfor _, tt := range tests {\n\t\tgot := Prepend(tt.slice, tt.elements...)\n\t\tassert.Equal(t, tt.want, got,\n\t\t\t\"Prepend(%v, %v) = %v; want %v\", tt.slice, tt.elements, got, tt.want)\n\t}\n}\n"
  },
  {
    "path": "util/terminal/terminal.go",
    "content": "//nolint:forbidigo // enable printing function for terminal package\npackage terminal\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/k0kubun/go-ansi\"\n\t\"github.com/schollz/progressbar/v3\"\n)\n\nvar terminalSupported = false\n\nfunc init() {\n\tterminalSupported = CheckTerminalSupported()\n}\n\n// CheckTerminalSupported returns true if the current terminal supports\n// ANSI escape sequences and advanced terminal features.\nfunc CheckTerminalSupported() bool {\n\tbad := map[string]bool{\"\": true, \"dumb\": true, \"cons25\": true}\n\n\treturn !bad[strings.ToLower(os.Getenv(\"TERM\"))]\n}\n\nfunc FatalErrorCheck(err error) {\n\tif err != nil {\n\t\tif terminalSupported {\n\t\t\tfmt.Printf(\"\\033[31m%s\\033[0m\\n\", err.Error())\n\t\t} else {\n\t\t\tfmt.Printf(\"%s\\n\", err.Error())\n\t\t}\n\n\t\tos.Exit(1)\n\t}\n}\n\nfunc PrintErrorMsgf(format string, args ...any) {\n\tformat = \"[ERROR] \" + format\n\tif terminalSupported {\n\t\t// Print error msg with red color\n\t\tformat = fmt.Sprintf(\"\\033[31m%s\\033[0m\", format)\n\t}\n\tfmt.Printf(format+\"\\n\", args...)\n}\n\nfunc PrintSuccessMsgf(format string, a ...any) {\n\tif terminalSupported {\n\t\t// Print successful msg with green color\n\t\tformat = fmt.Sprintf(\"\\033[32m%s\\033[0m\", format)\n\t}\n\tfmt.Printf(format+\"\\n\", a...)\n}\n\nfunc PrintWarnMsgf(format string, a ...any) {\n\tif terminalSupported {\n\t\t// Print warning msg with yellow color\n\t\tformat = fmt.Sprintf(\"\\033[33m%s\\033[0m\", format)\n\t}\n\tfmt.Printf(format+\"\\n\", a...)\n}\n\nfunc PrintInfoMsgf(format string, a ...any) {\n\tfmt.Printf(format+\"\\n\", a...)\n}\n\nfunc PrintInfoMsgBoldf(format string, a ...any) {\n\tif terminalSupported {\n\t\tformat = fmt.Sprintf(\"\\033[1m%s\\033[0m\", format)\n\t}\n\tfmt.Printf(format+\"\\n\", a...)\n}\n\nfunc PrintLine() {\n\tfmt.Println()\n}\n\nfunc PrintJSONData(data []byte) {\n\tvar out bytes.Buffer\n\terr := json.Indent(&out, data, \"\", \"   \")\n\tFatalErrorCheck(err)\n\n\tPrintInfoMsgf(out.String())\n}\n\nfunc PrintJSONObject(obj any) {\n\tdata, err := json.Marshal(obj)\n\tFatalErrorCheck(err)\n\n\tPrintJSONData(data)\n}\n\nfunc ProgressBar(totalSize int64, barWidth int) *progressbar.ProgressBar {\n\tif barWidth < 15 {\n\t\tbarWidth = 15\n\t}\n\n\topts := []progressbar.Option{\n\t\tprogressbar.OptionSetWriter(ansi.NewAnsiStdout()),\n\t\tprogressbar.OptionEnableColorCodes(true),\n\t\tprogressbar.OptionSetWidth(barWidth),\n\t\tprogressbar.OptionSetElapsedTime(false),\n\t\tprogressbar.OptionSetPredictTime(false),\n\t\tprogressbar.OptionShowDescriptionAtLineEnd(),\n\t\tprogressbar.OptionSetTheme(progressbar.Theme{\n\t\t\tSaucer:        \"[green]=[reset]\",\n\t\t\tSaucerHead:    \"[green]>[reset]\",\n\t\t\tSaucerPadding: \" \",\n\t\t\tBarStart:      \"[\",\n\t\t\tBarEnd:        \"]\",\n\t\t}),\n\t}\n\n\treturn progressbar.NewOptions64(totalSize, opts...)\n}\n"
  },
  {
    "path": "util/terminal/terminal_test.go",
    "content": "package terminal\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\n// captureOutput is a helper function to capture the printed output of a function.\nfunc captureOutput(fun func()) string {\n\t// Redirect stdout to a buffer\n\toldStdout := os.Stdout\n\treader, writer, _ := os.Pipe()\n\tos.Stdout = writer\n\n\t// Capture the printed output\n\toutC := make(chan string)\n\tgo func() {\n\t\tvar buf bytes.Buffer\n\t\t_, _ = io.Copy(&buf, reader)\n\t\toutC <- buf.String()\n\t}()\n\n\t// Execute the function\n\tfun()\n\n\t// Reset stdout\n\t_ = writer.Close()\n\tos.Stdout = oldStdout\n\tout := <-outC\n\n\treturn out\n}\n\nfunc TestPrintNotSupported(t *testing.T) {\n\tterminalSupported = false\n\toutput := captureOutput(func() {\n\t\tPrintJSONObject([]int{1, 2, 3})\n\t\tPrintLine()\n\t\tPrintInfoMsgBoldf(\"This is PrintInfoMsgBoldf: %s\", \"msg\")\n\t\tPrintInfoMsgf(\"This is PrintInfoMsgf: %s\", \"msg\")\n\t\tPrintSuccessMsgf(\"This is PrintSuccessMsgf: %s\", \"msg\")\n\t\tPrintWarnMsgf(\"This is PrintWarnMsgf: %s\", \"msg\")\n\t\tPrintErrorMsgf(\"This is PrintErrorMsgf: %s\", \"msg\")\n\t})\n\n\texpected := \"[\\n   1,\\n   2,\\n   3\\n]\\n\" +\n\t\t\"\\n\" +\n\t\t\"This is PrintInfoMsgBoldf: msg\\n\" +\n\t\t\"This is PrintInfoMsgf: msg\\n\" +\n\t\t\"This is PrintSuccessMsgf: msg\\n\" +\n\t\t\"This is PrintWarnMsgf: msg\\n\" +\n\t\t\"[ERROR] This is PrintErrorMsgf: msg\\n\"\n\n\tassert.Equal(t, expected, output)\n}\n\nfunc TestPrintSupported(t *testing.T) {\n\tterminalSupported = true\n\toutput := captureOutput(func() {\n\t\tPrintJSONObject([]int{1, 2, 3})\n\t\tPrintLine()\n\t\tPrintInfoMsgBoldf(\"This is PrintInfoMsgBoldf: %s\", \"msg\")\n\t\tPrintInfoMsgf(\"This is PrintInfoMsgf: %s\", \"msg\")\n\t\tPrintSuccessMsgf(\"This is PrintSuccessMsgf: %s\", \"msg\")\n\t\tPrintWarnMsgf(\"This is PrintWarnMsgf: %s\", \"msg\")\n\t\tPrintErrorMsgf(\"This is PrintErrorMsgf: %s\", \"msg\")\n\t})\n\n\texpected := \"[\\n   1,\\n   2,\\n   3\\n]\\n\" +\n\t\t\"\\n\" +\n\t\t\"\\x1b[1mThis is PrintInfoMsgBoldf: msg\\x1b[0m\\n\" +\n\t\t\"This is PrintInfoMsgf: msg\\n\" +\n\t\t\"\\x1b[32mThis is PrintSuccessMsgf: msg\\x1b[0m\\n\" +\n\t\t\"\\x1b[33mThis is PrintWarnMsgf: msg\\x1b[0m\\n\" +\n\t\t\"\\x1b[31m[ERROR] This is PrintErrorMsgf: msg\\x1b[0m\\n\"\n\n\tassert.Equal(t, expected, output)\n}\n"
  },
  {
    "path": "util/testsuite/logger.go",
    "content": "package testsuite\n\nimport (\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype OverrideStringer struct {\n\tobj  logger.LogStringer\n\tname string\n}\n\nfunc NewOverrideLogStringer(name string, obj logger.LogStringer) *OverrideStringer {\n\treturn &OverrideStringer{\n\t\tobj:  obj,\n\t\tname: name,\n\t}\n}\n\nfunc (o *OverrideStringer) LogString() string {\n\treturn o.name + o.obj.LogString()\n}\n"
  },
  {
    "path": "util/testsuite/testsuite.go",
    "content": "package testsuite\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"net\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/ezex-io/gopkg/testsuite\"\n\t\"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/committee\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/sortition\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/certificate\"\n\t\"github.com/pactus-project/pactus/types/proposal\"\n\t\"github.com/pactus-project/pactus/types/protocol\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"go.uber.org/mock/gomock\"\n\t\"golang.org/x/exp/slices\"\n)\n\n// TestSuite provides a set of helper functions for testing purposes.\n// All the random values are generated based on a logged seed.\n// By using a pre-generated seed, it is possible to reproduce failed tests\n// by re-evaluating all the random values. This helps in identifying and debugging\n// failures in testing conditions.\ntype TestSuite struct {\n\ttestsuite.TestSuite\n\tCtrl *gomock.Controller\n}\n\nfunc GenerateSeed() int64 {\n\treturn time.Now().UTC().UnixNano()\n}\n\n// NewTestSuiteFromSeed creates a new TestSuite with the given seed.\nfunc NewTestSuiteFromSeed(t *testing.T, seed int64) *TestSuite {\n\tt.Helper()\n\n\tctrl := gomock.NewController(t)\n\tt.Cleanup(ctrl.Finish)\n\n\treturn &TestSuite{\n\t\tTestSuite: *testsuite.NewTestSuiteFromSeed(t, seed),\n\t\tCtrl:      ctrl,\n\t}\n}\n\n// NewTestSuite creates a new TestSuite by generating new seed.\nfunc NewTestSuite(t *testing.T) *TestSuite {\n\tt.Helper()\n\n\tseed := GenerateSeed()\n\tt.Logf(\"%v seed is %v\", t.Name(), seed)\n\n\treturn NewTestSuiteFromSeed(t, seed)\n}\n\nfunc (ts *TestSuite) MockingController() *gomock.Controller {\n\treturn ts.Ctrl\n}\n\ntype HeightRange struct {\n\tMin types.Height\n\tMax types.Height\n}\n\nfunc NewHeightRange() *HeightRange {\n\treturn &HeightRange{\n\t\tMin: 1e3,\n\t\tMax: 1e6,\n\t}\n}\n\ntype HeightRangeOption func(*HeightRange)\n\nfunc HeightWithMin(min uint32) HeightRangeOption {\n\treturn func(h *HeightRange) {\n\t\th.Min = types.Height(min)\n\t}\n}\n\nfunc HeightWithMax(max uint32) HeightRangeOption {\n\treturn func(h *HeightRange) {\n\t\th.Max = types.Height(max)\n\t}\n}\n\n// RandHeight returns a random number between [1,000, 1,000,000] for block height.\nfunc (ts *TestSuite) RandHeight(opts ...HeightRangeOption) types.Height {\n\th := NewHeightRange()\n\tfor _, opt := range opts {\n\t\topt(h)\n\t}\n\n\treturn types.Height(ts.RandUint32(\n\t\ttestsuite.WithMin(uint32(h.Min)),\n\t\ttestsuite.WithMax(uint32(h.Max))))\n}\n\n// RandRound returns a random number between [0, 10) for block round.\nfunc (ts *TestSuite) RandRound() types.Round {\n\treturn types.Round(ts.RandInt16(testsuite.WithMax(int16(10))))\n}\n\n// RandInt32NonZero returns a random int32 in [1, max].\nfunc (ts *TestSuite) RandInt32NonZero(max int32) int32 {\n\treturn ts.RandInt32(testsuite.WithMin(int32(1)), testsuite.WithMax(max))\n}\n\n// RandUint32Max returns a random uint32 in [0, max).\nfunc (ts *TestSuite) RandUint32Max(max uint32) uint32 {\n\treturn ts.RandUint32(testsuite.WithMax(max))\n}\n\n// RandInt32Max returns a random int32 in [0, max).\nfunc (ts *TestSuite) RandInt32Max(max int32) int32 {\n\treturn ts.RandInt32(testsuite.WithMax(max))\n}\n\n// RandIntMax returns a random int in [0, max).\nfunc (ts *TestSuite) RandIntMax(max int) int {\n\treturn ts.RandInt(testsuite.WithMax(max))\n}\n\n// RandInt64Max returns a random int64 in [0, max).\nfunc (ts *TestSuite) RandInt64Max(max int64) int64 {\n\treturn ts.RandInt64(testsuite.WithMax(max))\n}\n\n// RandIntNonZero returns a random int in [1, max].\nfunc (ts *TestSuite) RandIntNonZero(max int) int {\n\treturn ts.RandInt(testsuite.WithMin(1), testsuite.WithMax(max))\n}\n\n// RandAmount returns a random amount between [1e9, max).\n// If max is not set, it defaults to 100e9.\nfunc (ts *TestSuite) RandAmount(max ...amount.Amount) amount.Amount {\n\tmaxAmt := amount.Amount(100e9) // default max amount\n\tif len(max) > 0 {\n\t\tmaxAmt = max[0]\n\t}\n\n\treturn ts.RandAmountRange(1e9, maxAmt)\n}\n\n// RandAmountRange returns a random amount between [min, max).\nfunc (ts *TestSuite) RandAmountRange(min, max amount.Amount) amount.Amount {\n\treturn amount.Amount(ts.RandInt64(testsuite.WithMin(min.ToNanoPAC()), testsuite.WithMax(max.ToNanoPAC())))\n}\n\n// RandFee returns a random fee between [1e7, max).\n// If max is not set, it defaults to 1e9.\nfunc (ts *TestSuite) RandFee(max ...amount.Amount) amount.Amount {\n\tmaxFee := amount.Amount(1e9) // default max fee\n\tif len(max) > 0 {\n\t\tmaxFee = max[0]\n\t}\n\n\treturn ts.RandAmountRange(1e7, maxFee)\n}\n\n// RandBytes returns a slice of random bytes of the given length.\nfunc (ts *TestSuite) RandBytes(length int) []byte {\n\tbuf := make([]byte, length)\n\t_, _ = ts.Rand.Read(buf)\n\n\treturn buf\n}\n\n// RandSlice generates a random non-repeating slice of int32 elements with the specified length.\nfunc (ts *TestSuite) RandSlice(length int) []int32 {\n\tslice := []int32{}\n\tfor {\n\t\trandInt := ts.RandInt32(testsuite.WithMax(int32(1000)))\n\t\tif !slices.Contains(slice, randInt) {\n\t\t\tslice = append(slice, randInt)\n\t\t}\n\n\t\tif len(slice) == length {\n\t\t\treturn slice\n\t\t}\n\t}\n}\n\n// RandString generates a random string of the given length.\nfunc (ts *TestSuite) RandString(length int) string {\n\tconst letterBytes = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\n\tb := make([]byte, length)\n\tfor i := range b {\n\t\tb[i] = letterBytes[ts.RandInt(testsuite.WithMax(52))]\n\t}\n\n\treturn string(b)\n}\n\n// DecodingHex decodes the input string from hexadecimal format and returns the resulting byte slice.\nfunc (*TestSuite) DecodingHex(in string) []byte {\n\td, _ := hex.DecodeString(in)\n\n\treturn d\n}\n\nfunc (ts *TestSuite) RandKeyPair() (crypto.PublicKey, crypto.PrivateKey) {\n\tswitch ts.RandInt(testsuite.WithMax(2)) {\n\tcase 0:\n\t\treturn ts.RandBLSKeyPair()\n\tcase 1:\n\t\treturn ts.RandEd25519KeyPair()\n\t}\n\n\t// Impossible\n\treturn nil, nil\n}\n\n// RandBLSKeyPair generates a random BLS key pair for testing purposes.\nfunc (ts *TestSuite) RandBLSKeyPair() (*bls.PublicKey, *bls.PrivateKey) {\n\tbuf := ts.RandBytes(bls.PrivateKeySize)\n\tprv, _ := bls.PrivateKeyFromBytes(buf)\n\tpub := prv.PublicKeyNative()\n\n\treturn pub, prv\n}\n\n// RandEd25519KeyPair generates a random Ed25519 key pair for testing purposes.\nfunc (ts *TestSuite) RandEd25519KeyPair() (*ed25519.PublicKey, *ed25519.PrivateKey) {\n\tbuf := ts.RandBytes(ed25519.PrivateKeySize)\n\tprv, _ := ed25519.PrivateKeyFromBytes(buf)\n\tpub := prv.PublicKeyNative()\n\n\treturn pub, prv\n}\n\n// RandValKey generates a random validator key for testing purposes.\nfunc (ts *TestSuite) RandValKey() *bls.ValidatorKey {\n\t_, prv := ts.RandBLSKeyPair()\n\n\treturn bls.NewValidatorKey(prv)\n}\n\n// RandBLSSignature generates a random BLS signature for testing purposes.\nfunc (ts *TestSuite) RandBLSSignature() *bls.Signature {\n\t_, prv := ts.RandBLSKeyPair()\n\n\treturn prv.SignNative(ts.RandBytes(8))\n}\n\n// RandEd25519Signature generates a random BLS signature for testing purposes.\nfunc (ts *TestSuite) RandEd25519Signature() *ed25519.Signature {\n\t_, prv := ts.RandEd25519KeyPair()\n\n\treturn prv.SignNative(ts.RandBytes(8))\n}\n\n// RandHash generates a random hash for testing purposes.\nfunc (ts *TestSuite) RandHash() hash.Hash {\n\treturn hash.CalcHash(util.Int64ToBytesLE(ts.RandInt64(testsuite.WithMax(util.MaxInt64))))\n}\n\n// RandAccAddress generates a random account address for testing purposes.\nfunc (ts *TestSuite) RandAccAddress() crypto.Address {\n\tuseBLSAddress := ts.RandBool()\n\tif useBLSAddress {\n\t\treturn crypto.NewAddress(crypto.AddressTypeBLSAccount, ts.RandBytes(20))\n\t}\n\n\treturn crypto.NewAddress(crypto.AddressTypeEd25519Account, ts.RandBytes(20))\n}\n\n// RandValAddress generates a random validator address for testing purposes.\nfunc (ts *TestSuite) RandValAddress() crypto.Address {\n\taddr := crypto.NewAddress(crypto.AddressTypeValidator, ts.RandBytes(20))\n\n\treturn addr\n}\n\n// RandSeed generates a random VerifiableSeed for testing purposes.\nfunc (ts *TestSuite) RandSeed() sortition.VerifiableSeed {\n\tsig := ts.RandBLSSignature()\n\tseed, _ := sortition.VerifiableSeedFromBytes(sig.Bytes())\n\n\treturn seed\n}\n\n// RandProof generates a random Proof for testing purposes.\nfunc (ts *TestSuite) RandProof() sortition.Proof {\n\t_, prv := ts.RandBLSKeyPair()\n\tsig := prv.Sign(ts.RandHash().Bytes())\n\tproof, _ := sortition.ProofFromBytes(sig.Bytes())\n\n\treturn proof\n}\n\n// RandPeerID returns a random peer ID.\nfunc (ts *TestSuite) RandPeerID() peer.ID {\n\ts := ts.RandBytes(32)\n\tid := [34]byte{0x12, 32}\n\tcopy(id[2:], s)\n\n\treturn peer.ID(id[:])\n}\n\n// RandMultiAddress returns a random MultiAddress.\nfunc (ts *TestSuite) RandMultiAddress() string {\n\treturn fmt.Sprintf(\"/dns/%s/udp/1234\", ts.RandString(12))\n}\n\ntype AccountMaker struct {\n\tNumber  int32\n\tBalance amount.Amount\n\tAddress crypto.Address\n}\n\ntype AccountMakerOption func(*AccountMaker)\n\n// NewAccountMaker creates a new instance of AccountMaker with random values.\nfunc (ts *TestSuite) NewAccountMaker() *AccountMaker {\n\treturn &AccountMaker{\n\t\tNumber:  ts.RandInt32(testsuite.WithMin(int32(1)), testsuite.WithMax(int32(100000))),\n\t\tBalance: ts.RandAmountRange(100e9, 1000e9),\n\t\tAddress: ts.RandAccAddress(),\n\t}\n}\n\n// AccountWithAddress sets the address for the generated test account.\nfunc AccountWithAddress(address crypto.Address) AccountMakerOption {\n\treturn func(am *AccountMaker) {\n\t\tam.Address = address\n\t}\n}\n\n// AccountWithNumber sets the account number for the generated test account.\nfunc AccountWithNumber(number int32) AccountMakerOption {\n\treturn func(am *AccountMaker) {\n\t\tam.Number = number\n\t}\n}\n\n// AccountWithBalance sets the balance for the generated test account.\nfunc AccountWithBalance(balance amount.Amount) AccountMakerOption {\n\treturn func(am *AccountMaker) {\n\t\tam.Balance = balance\n\t}\n}\n\n// GenerateTestAccount generates an account for testing purposes.\nfunc (ts *TestSuite) GenerateTestAccount(opts ...AccountMakerOption) (*account.Account, crypto.Address) {\n\tamk := ts.NewAccountMaker()\n\tfor _, opt := range opts {\n\t\topt(amk)\n\t}\n\tacc := account.NewAccount(amk.Number)\n\tacc.AddToBalance(amk.Balance)\n\n\treturn acc, amk.Address\n}\n\ntype ValidatorMaker struct {\n\tNumber    int32\n\tStake     amount.Amount\n\tPublicKey *bls.PublicKey\n}\n\ntype ValidatorMakerOption func(*ValidatorMaker)\n\n// NewValidatorMaker creates a new instance of ValidatorMaker with random values.\nfunc (ts *TestSuite) NewValidatorMaker() *ValidatorMaker {\n\treturn &ValidatorMaker{\n\t\tNumber:    ts.RandInt32(testsuite.WithMax(int32(100000))),\n\t\tStake:     ts.RandAmountRange(100e9, 1000e9),\n\t\tPublicKey: ts.RandValKey().PublicKey(),\n\t}\n}\n\n// ValidatorWithNumber sets the validator number for the generated test validator.\nfunc ValidatorWithNumber(number int32) ValidatorMakerOption {\n\treturn func(vm *ValidatorMaker) {\n\t\tvm.Number = number\n\t}\n}\n\n// ValidatorWithStake sets the stake for the generated test account.\nfunc ValidatorWithStake(stake amount.Amount) ValidatorMakerOption {\n\treturn func(vm *ValidatorMaker) {\n\t\tvm.Stake = stake\n\t}\n}\n\n// ValidatorWithPublicKey sets the public Key for the generated test account.\nfunc ValidatorWithPublicKey(publicKey *bls.PublicKey) ValidatorMakerOption {\n\treturn func(vm *ValidatorMaker) {\n\t\tvm.PublicKey = publicKey\n\t}\n}\n\n// GenerateTestValidator generates a validator for testing purposes.\nfunc (ts *TestSuite) GenerateTestValidator(opts ...ValidatorMakerOption) *validator.Validator {\n\tvmk := ts.NewValidatorMaker()\n\tfor _, opt := range opts {\n\t\topt(vmk)\n\t}\n\n\tval := validator.NewValidator(vmk.PublicKey, vmk.Number)\n\tval.AddToStake(vmk.Stake)\n\n\treturn val\n}\n\ntype BlockMaker struct {\n\tVersion   protocol.Version\n\tTxs       block.Txs\n\tProposer  crypto.Address\n\tTime      time.Time\n\tStateHash hash.Hash\n\tPrevHash  hash.Hash\n\tSeed      sortition.VerifiableSeed\n\tPrevCert  *certificate.Certificate\n}\n\ntype BlockMakerOption func(*BlockMaker)\n\n// NewBlockMaker creates a new BlockMaker instance.\nfunc (ts *TestSuite) NewBlockMaker() *BlockMaker {\n\ttxs := block.NewTxs()\n\ttx0 := ts.GenerateTestSubsidyTx()\n\ttx1 := ts.GenerateTestTransferTx()\n\ttx2 := ts.GenerateTestSortitionTx()\n\ttx3 := ts.GenerateTestBondTx()\n\ttx4 := ts.GenerateTestUnbondTx()\n\ttx5 := ts.GenerateTestWithdrawTx()\n\n\ttxs.Append(tx0)\n\ttxs.Append(tx1)\n\ttxs.Append(tx2)\n\ttxs.Append(tx3)\n\ttxs.Append(tx4)\n\ttxs.Append(tx5)\n\n\treturn &BlockMaker{\n\t\tVersion:  protocol.ProtocolVersion2,\n\t\tTxs:      txs,\n\t\tProposer: ts.RandValAddress(),\n\t\tTime:     time.Now(),\n\t\tPrevHash: ts.RandHash(),\n\t\tSeed:     ts.RandSeed(),\n\t\tPrevCert: nil,\n\t}\n}\n\n// BlockWithVersion sets version to the block.\nfunc BlockWithVersion(ver protocol.Version) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.Version = ver\n\t}\n}\n\n// BlockWithProposer sets proposer address to the block.\nfunc BlockWithProposer(addr crypto.Address) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.Proposer = addr\n\t}\n}\n\n// BlockWithTime sets block creation time to the block.\nfunc BlockWithTime(t time.Time) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.Time = t\n\t}\n}\n\n// BlockWithStateHash sets state hash to the block.\nfunc BlockWithStateHash(h hash.Hash) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.StateHash = h\n\t}\n}\n\n// BlockWithPrevHash sets previous block hash to the block.\nfunc BlockWithPrevHash(h hash.Hash) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.PrevHash = h\n\t}\n}\n\n// BlockWithSeed sets verifiable seed to the block.\nfunc BlockWithSeed(seed sortition.VerifiableSeed) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.Seed = seed\n\t}\n}\n\n// BlockWithPrevCert sets previous block certificate to the block.\nfunc BlockWithPrevCert(cert *certificate.Certificate) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.PrevCert = cert\n\t}\n}\n\n// BlockWithTransactions adds transactions to the block.\nfunc BlockWithTransactions(txs block.Txs) BlockMakerOption {\n\treturn func(bm *BlockMaker) {\n\t\tbm.Txs = txs\n\t}\n}\n\n// GenerateTestBlock generates a block for testing purposes with optional configuration.\nfunc (ts *TestSuite) GenerateTestBlock(height types.Height, opts ...BlockMakerOption) (\n\t*block.Block, *certificate.Certificate,\n) {\n\tbmk := ts.NewBlockMaker()\n\tbmk.PrevCert = ts.GenerateTestCertificate(height - 1)\n\n\tif height == 1 {\n\t\tbmk.PrevCert = nil\n\t\tbmk.PrevHash = hash.UndefHash\n\t}\n\n\tfor _, opt := range opts {\n\t\topt(bmk)\n\t}\n\n\theader := block.NewHeader(bmk.Version, bmk.Time, bmk.PrevHash, bmk.PrevHash, bmk.Seed, bmk.Proposer)\n\tblk := block.NewBlock(header, bmk.PrevCert, bmk.Txs)\n\n\tblockCert := ts.GenerateTestCertificate(height)\n\n\treturn blk, blockCert\n}\n\n// GenerateTestCertificate generates a block certificate for testing purposes.\nfunc (ts *TestSuite) GenerateTestCertificate(height types.Height) *certificate.Certificate {\n\tsig := ts.RandBLSSignature()\n\n\tcert := certificate.NewCertificate(height, ts.RandRound())\n\n\tcommitters := ts.RandSlice(4)\n\tabsentees := []int32{committers[3]}\n\tcert.SetSignature(committers, absentees, sig)\n\n\treturn cert\n}\n\ntype ProposalMaker struct {\n\tProposerKey *bls.ValidatorKey\n}\n\n// NewProposalMaker creates a new NewProposalMaker instance.\nfunc (ts *TestSuite) NewProposalMaker() *ProposalMaker {\n\treturn &ProposalMaker{\n\t\tProposerKey: ts.RandValKey(),\n\t}\n}\n\n// ProposalWithKey sets the private key of the proposer.\nfunc ProposalWithKey(key *bls.ValidatorKey) func(*ProposalMaker) {\n\treturn func(pm *ProposalMaker) {\n\t\tpm.ProposerKey = key\n\t}\n}\n\n// GenerateTestProposal generates a proposal for testing purposes.\nfunc (ts *TestSuite) GenerateTestProposal(height types.Height, round types.Round,\n\topts ...func(*ProposalMaker),\n) *proposal.Proposal {\n\tpmk := ts.NewProposalMaker()\n\n\tfor _, opt := range opts {\n\t\topt(pmk)\n\t}\n\n\tblk, _ := ts.GenerateTestBlock(height, BlockWithProposer(pmk.ProposerKey.Address()))\n\tprop := proposal.NewProposal(height, round, blk)\n\tts.HelperSignProposal(pmk.ProposerKey, prop)\n\n\treturn prop\n}\n\ntype TransactionMaker struct {\n\tLockTime   types.Height\n\tAmount     amount.Amount\n\tFee        amount.Amount\n\tSigner     crypto.PrivateKey\n\tValPubKey  *bls.PublicKey\n\tRecipients []payload.BatchRecipient\n\tReceiver   crypto.Address\n}\n\ntype TransactionMakerOption func(*TransactionMaker)\n\nfunc (tm *TransactionMaker) SignerAccountAddress() crypto.Address {\n\tblsPub, ok := tm.Signer.PublicKey().(*bls.PublicKey)\n\tif ok {\n\t\treturn blsPub.AccountAddress()\n\t}\n\ted25519Pub := tm.Signer.PublicKey().(*ed25519.PublicKey)\n\n\treturn ed25519Pub.AccountAddress()\n}\n\nfunc (tm *TransactionMaker) SignerValidatorAddress() crypto.Address {\n\tblsPub := tm.Signer.PublicKey().(*bls.PublicKey)\n\n\treturn blsPub.ValidatorAddress()\n}\n\n// NewTransactionMaker creates a new TransactionMaker instance.\nfunc (ts *TestSuite) NewTransactionMaker() *TransactionMaker {\n\tnumOfRecipients := ts.RandInt(testsuite.WithMax(6)) + 2\n\trecipients := make([]payload.BatchRecipient, numOfRecipients)\n\n\tfor i := 0; i < numOfRecipients; i++ {\n\t\trecipients[i] = payload.BatchRecipient{\n\t\t\tTo:     ts.RandAccAddress(),\n\t\t\tAmount: ts.RandAmount(10e9),\n\t\t}\n\t}\n\n\t_, signer := ts.RandBLSKeyPair()\n\n\treturn &TransactionMaker{\n\t\tLockTime:   ts.RandHeight(),\n\t\tAmount:     ts.RandAmount(),\n\t\tFee:        ts.RandFee(),\n\t\tSigner:     signer,\n\t\tValPubKey:  nil,\n\t\tRecipients: recipients,\n\t\tReceiver:   ts.RandAccAddress(),\n\t}\n}\n\n// TransactionWithLockTime sets lock-time to the transaction.\nfunc TransactionWithLockTime(lockTime types.Height) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.LockTime = lockTime\n\t}\n}\n\n// TransactionWithAmount sets amount to the transaction.\nfunc TransactionWithAmount(amt amount.Amount) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.Amount = amt\n\t}\n}\n\n// TransactionWithFee sets fee to the transaction.\nfunc TransactionWithFee(fee amount.Amount) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.Fee = fee\n\t}\n}\n\n// TransactionWithSigner sets the BLS signer to sign the test transaction.\nfunc TransactionWithSigner(signer crypto.PrivateKey) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.Signer = signer\n\t}\n}\n\n// TransactionWithValidatorPublicKey sets the Validator's public key for the Bond transaction.\nfunc TransactionWithValidatorPublicKey(pubKey *bls.PublicKey) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.ValPubKey = pubKey\n\t}\n}\n\n// TransactionWithRecipients sets the recipients for the Bath Transfer transaction.\nfunc TransactionWithRecipients(recipients []payload.BatchRecipient) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.Recipients = recipients\n\t}\n}\n\n// TransactionWithReceiver sets the receiver for the Transfer transaction.\nfunc TransactionWithReceiver(receiver crypto.Address) TransactionMakerOption {\n\treturn func(tm *TransactionMaker) {\n\t\ttm.Receiver = receiver\n\t}\n}\n\n// GenerateTestTransferTx generates a transfer transaction for testing purposes.\nfunc (ts *TestSuite) GenerateTestTransferTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tsender := tmk.SignerAccountAddress()\n\ttrx := tx.NewTransferTx(tmk.LockTime, sender, tmk.Receiver, tmk.Amount, tmk.Fee)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestBatchTransferTx generate a batch transfer transaction for test.\nfunc (ts *TestSuite) GenerateTestBatchTransferTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tnumOfRecip := ts.RandInt(testsuite.WithMax(6)) + 2\n\trecipients := make([]payload.BatchRecipient, numOfRecip)\n\n\tfor i := 0; i < numOfRecip; i++ {\n\t\trecipients[i] = payload.BatchRecipient{\n\t\t\tTo:     ts.RandAccAddress(),\n\t\t\tAmount: ts.RandAmount(10e9),\n\t\t}\n\t}\n\n\ttrx := tx.NewBatchTransferTx(tmk.LockTime, tmk.SignerAccountAddress(), tmk.Recipients, tmk.Fee)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestSubsidyTx creates a subsidy transaction for testing.\nfunc (ts *TestSuite) GenerateTestSubsidyTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\tif tmk.LockTime == 0 {\n\t\ttmk.LockTime = ts.RandHeight()\n\t}\n\n\treturn tx.NewSubsidyTx(tmk.LockTime, tmk.Recipients)\n}\n\n// GenerateTestBondTx generates a bond transaction for testing purposes.\nfunc (ts *TestSuite) GenerateTestBondTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tsender := tmk.SignerAccountAddress()\n\treceiver := ts.RandValAddress()\n\tif tmk.ValPubKey != nil {\n\t\treceiver = tmk.ValPubKey.ValidatorAddress()\n\t}\n\ttrx := tx.NewBondTx(tmk.LockTime, sender, receiver, tmk.ValPubKey, tmk.Amount, tmk.Fee)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestSortitionTx generates a sortition transaction for testing purposes.\nfunc (ts *TestSuite) GenerateTestSortitionTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tproof := ts.RandProof()\n\tsender := tmk.SignerValidatorAddress()\n\ttrx := tx.NewSortitionTx(tmk.LockTime, sender, proof)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestUnbondTx generates an unbond transaction for testing purposes.\nfunc (ts *TestSuite) GenerateTestUnbondTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tsender := tmk.SignerValidatorAddress()\n\ttrx := tx.NewUnbondTx(tmk.LockTime, sender)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestWithdrawTx generates a withdraw transaction for testing purposes.\nfunc (ts *TestSuite) GenerateTestWithdrawTx(opts ...TransactionMakerOption) *tx.Tx {\n\ttmk := ts.NewTransactionMaker()\n\n\tfor _, opt := range opts {\n\t\topt(tmk)\n\t}\n\n\tsender := tmk.SignerValidatorAddress()\n\ttrx := tx.NewWithdrawTx(tmk.LockTime, sender, tmk.Receiver, tmk.Amount, tmk.Fee)\n\tts.HelperSignTransaction(tmk.Signer, trx)\n\n\treturn trx\n}\n\n// GenerateTestPrecommitVote generates a precommit vote for testing purposes.\nfunc (ts *TestSuite) GenerateTestPrecommitVote(height types.Height, round types.Round) (*vote.Vote, *bls.ValidatorKey) {\n\tvalKey := ts.RandValKey()\n\tvote := vote.NewPrecommitVote(\n\t\tts.RandHash(),\n\t\theight, round,\n\t\tvalKey.Address())\n\tts.HelperSignVote(valKey, vote)\n\n\treturn vote, valKey\n}\n\n// GenerateTestPrepareVote generates a prepare vote for testing purposes.\nfunc (ts *TestSuite) GenerateTestPrepareVote(height types.Height, round types.Round) (*vote.Vote, *bls.ValidatorKey) {\n\tvalKey := ts.RandValKey()\n\tvote := vote.NewPrepareVote(\n\t\tts.RandHash(),\n\t\theight, round,\n\t\tvalKey.Address())\n\tts.HelperSignVote(valKey, vote)\n\n\treturn vote, valKey\n}\n\n// GenerateTestCommittee generates a committee for testing purposes.\n// All committee members have the same power.\nfunc (ts *TestSuite) GenerateTestCommittee(num int) (committee.Committee, []*bls.ValidatorKey) {\n\tvalKeys := make([]*bls.ValidatorKey, num)\n\tvals := make([]*validator.Validator, num)\n\tfor index := int32(0); index < int32(num); index++ {\n\t\tvalKey := ts.RandValKey()\n\t\tval := ts.GenerateTestValidator(\n\t\t\tValidatorWithNumber(index),\n\t\t\tValidatorWithPublicKey(valKey.PublicKey()))\n\t\tvalKeys[index] = valKey\n\t\tvals[index] = val\n\n\t\tval.UpdateLastBondingHeight(types.Height(1 + index))\n\t\tval.UpdateLastSortitionHeight(types.Height(1 + index))\n\t\tval.SubtractFromStake(val.Stake())\n\t\tval.AddToStake(10e9)\n\t}\n\n\tcmt, _ := committee.NewCommittee(vals, num, vals[0].Address())\n\n\treturn cmt, valKeys\n}\n\nfunc (*TestSuite) HelperSignVote(valKey *bls.ValidatorKey, v *vote.Vote) {\n\tsig := valKey.Sign(v.SignBytes())\n\tv.SetSignature(sig)\n}\n\nfunc (*TestSuite) HelperSignProposal(valKey *bls.ValidatorKey, p *proposal.Proposal) {\n\tsig := valKey.Sign(p.SignBytes())\n\tp.SetSignature(sig)\n}\n\nfunc (*TestSuite) HelperSignTransaction(prv crypto.PrivateKey, trx *tx.Tx) {\n\tif prv != nil {\n\t\tsig := prv.Sign(trx.SignBytes())\n\t\ttrx.SetSignature(sig)\n\t\ttrx.SetPublicKey(prv.PublicKey())\n\t}\n}\n\nfunc FindFreePort() int {\n\tvar freePort int\n\tfor {\n\t\t// Find a free TCP port\n\t\tlistenerTCP, err := util.NetworkListen(context.Background(), \"tcp\", \"127.0.0.1:0\")\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tfreePort = listenerTCP.Addr().(*net.TCPAddr).Port\n\t\t_ = listenerTCP.Close()\n\n\t\tudpAddr, err := net.ResolveUDPAddr(\"udp\", fmt.Sprintf(\"127.0.0.1:%d\", freePort))\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\tudpConn, err := net.ListenUDP(\"udp\", udpAddr)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\t_ = udpConn.Close()\n\n\t\tbreak\n\t}\n\n\treturn freePort\n}\n"
  },
  {
    "path": "util/time.go",
    "content": "package util\n\nimport (\n\t\"time\"\n)\n\n// RoundNow returns the result of rounding sec to the current time in UTC.\n// The rounding behavior is rounding down.\nfunc RoundNow(sec int) time.Time {\n\treturn roundDownTime(time.Now(), sec)\n}\n\nfunc roundDownTime(t time.Time, sec int) time.Time {\n\tt = t.Truncate(time.Duration(sec) * time.Second)\n\tt = t.UTC()\n\n\treturn t\n}\n"
  },
  {
    "path": "util/time_test.go",
    "content": "package util\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestRoundNow(t *testing.T) {\n\ttime1 := time.Now()\n\ttime2 := RoundNow(1)\n\ttime3 := RoundNow(5)\n\n\tassert.NotEqual(t, time1, time2)\n\tassert.Equal(t, time1.Second(), time2.Second())\n\tassert.Equal(t, int64(0), time2.UnixMicro()%1000000)\n\tassert.Equal(t, int64(0), time2.UnixMilli()%1000)\n\tassert.Equal(t, 0, time3.Nanosecond())\n\tassert.Equal(t, 0, time3.Second()%5)\n}\n\nfunc TestRoundingTime(t *testing.T) {\n\ttests := []struct {\n\t\tinput    string\n\t\texpected int\n\t}{\n\t\t{\"2006-01-02T15:04:11.111111111Z\", 10},\n\t\t{\"2006-01-02T15:04:24.333333333Z\", 20},\n\t\t{\"2006-01-02T15:04:35.555555555Z\", 30},\n\t\t{\"2006-01-02T15:04:48.777777777Z\", 40},\n\t\t{\"2006-01-02T15:04:59.999999999Z\", 50},\n\t}\n\n\tfor _, tt := range tests {\n\t\tparsedTime, err := time.Parse(time.RFC3339Nano, tt.input)\n\t\trequire.NoError(t, err, \"Failed to parse time\")\n\n\t\troundedTime := roundDownTime(parsedTime, 10)\n\n\t\tassert.Equal(t, 0, roundedTime.Nanosecond(), \"Nanoseconds should be rounded to 0\")\n\t\tassert.Equal(t, tt.expected, roundedTime.Second(), \"Seconds should match the expected rounded value\")\n\t}\n}\n"
  },
  {
    "path": "util/utils.go",
    "content": "package util\n\nimport (\n\tcrand \"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"math/bits\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"golang.org/x/exp/constraints\"\n)\n\nconst (\n\tMaxUint16 = ^uint16(0)\n\tMinUint16 = 0\n\tMaxInt16  = int16(MaxUint16 >> 1)\n\tMinInt16  = -MaxInt16 - 1\n)\n\nconst (\n\tMaxUint32 = ^uint32(0)\n\tMinUint32 = 0\n\tMaxInt32  = int32(MaxUint32 >> 1)\n\tMinInt32  = -MaxInt32 - 1\n)\n\nconst (\n\tMaxUint64 = ^uint64(0)\n\tMinUint64 = 0\n\tMaxInt64  = int64(MaxUint64 >> 1)\n\tMinInt64  = -MaxInt64 - 1\n)\n\n// Max returns the biggest of two integer numbers.\nfunc Max[T constraints.Integer](a, b T) T {\n\tif a > b {\n\t\treturn a\n\t}\n\n\treturn b\n}\n\n// Min returns the smallest of two integer numbers.\nfunc Min[T constraints.Integer](a, b T) T {\n\tif a < b {\n\t\treturn a\n\t}\n\n\treturn b\n}\n\n// RandInt16 returns a random int16 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxInt16.\nfunc RandInt16(max int16) int16 {\n\treturn int16(RandUint64(uint64(max)))\n}\n\n// RandUint16 returns a random uint16 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxUint16.\nfunc RandUint16(max uint32) uint16 {\n\treturn uint16(RandUint64(uint64(max)))\n}\n\n// RandInt32 returns a random int32 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxInt32.\nfunc RandInt32(max int32) int32 {\n\treturn int32(RandUint64(uint64(max)))\n}\n\n// RandUint32 returns a random uint32 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxUint32.\nfunc RandUint32(max uint32) uint32 {\n\treturn uint32(RandUint64(uint64(max)))\n}\n\n// RandInt64 returns a random int64 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxInt64.\nfunc RandInt64(max int64) int64 {\n\treturn int64(RandUint64(uint64(max)))\n}\n\n// RandUint64 returns a random uint64 in between 0 and max.\n// If max set to zero or negative, the max will set to MaxUint64.\nfunc RandUint64(max uint64) uint64 {\n\tif max <= 0 {\n\t\tmax = MaxUint64\n\t}\n\n\tbigMax := &big.Int{}\n\tbigMax.SetUint64(max)\n\tbigRnd, _ := crand.Int(crand.Reader, bigMax)\n\n\treturn bigRnd.Uint64()\n}\n\n// SetFlag applies mask to the flags.\nfunc SetFlag[T constraints.Integer](flags, mask T) T {\n\treturn flags | mask\n}\n\n// UnsetFlag removes mask from the flags.\nfunc UnsetFlag[T constraints.Integer](flags, mask T) T {\n\treturn flags & ^mask\n}\n\n// IsFlagSet checks if the mask is set for the given flags.\nfunc IsFlagSet[T constraints.Integer](flags, mask T) bool {\n\treturn flags&mask == mask\n}\n\n// OS2IP converts an octet string to a nonnegative integer.\n// OS2IP: https://datatracker.ietf.org/doc/html/rfc8017#section-4.2\nfunc OS2IP(x []byte) *big.Int {\n\treturn new(big.Int).SetBytes(x)\n}\n\n// I2OSP converts a nonnegative integer to an octet string of a specified length.\n// https://datatracker.ietf.org/doc/html/rfc8017#section-4.1\nfunc I2OSP(num *big.Int, len int) []byte {\n\tif num.Sign() == -1 {\n\t\treturn nil\n\t}\n\tbuf := make([]byte, len)\n\n\treturn num.FillBytes(buf)\n}\n\n// LogScale computes 2^⌈log₂(val)⌉, where ⌈x⌉ represents the ceiling of x.\n// For more information, refer to: https://en.wikipedia.org/wiki/Logarithmic_scale\nfunc LogScale(val int) int {\n\tbitlen := bits.Len(uint(val - 1))\n\n\treturn 1 << bitlen\n}\n\nfunc FormatBytesToHumanReadable(bytes uint64) string {\n\tconst (\n\t\t_        = iota\n\t\tKiloBYte = 1 << (10 * iota)\n\t\tMegaBYte\n\t\tGigaByte\n\t\tTeraByte\n\t)\n\tunit := \"Bytes\"\n\tvalue := float64(bytes)\n\n\tswitch {\n\tcase bytes >= TeraByte:\n\t\tunit = \"TB\"\n\t\tvalue /= TeraByte\n\tcase bytes >= GigaByte:\n\t\tunit = \"GB\"\n\t\tvalue /= GigaByte\n\tcase bytes >= MegaBYte:\n\t\tunit = \"MB\"\n\t\tvalue /= MegaBYte\n\tcase bytes >= KiloBYte:\n\t\tunit = \"KB\"\n\t\tvalue /= KiloBYte\n\t}\n\n\treturn fmt.Sprintf(\"%.2f %s\", value, unit)\n}\n\nfunc ParseGRPCAddr(addr string, insecureCredentials bool) (target, prefix string, err error) {\n\tif insecureCredentials {\n\t\tif strings.HasPrefix(addr, \"https://\") {\n\t\t\treturn \"\", \"\", errors.New(\"insecure credentials are not supported for HTTPS addresses\")\n\t\t}\n\t\taddr = strings.TrimPrefix(addr, \"http://\")\n\n\t\treturn addr, \"\", nil\n\t}\n\n\tif strings.HasPrefix(addr, \"http://\") {\n\t\treturn \"\", \"\", errors.New(\"insecure credentials are not supported for HTTP addresses\")\n\t}\n\tif !strings.HasPrefix(addr, \"https://\") {\n\t\taddr = \"https://\" + addr\n\t}\n\n\tparsed, err := url.Parse(addr)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\ttarget = parsed.Host\n\tprefix = parsed.Path\n\tif parsed.Port() == \"\" {\n\t\tif parsed.Scheme == \"https\" {\n\t\t\ttarget = parsed.Host + \":443\"\n\t\t}\n\t}\n\n\treturn target, prefix, nil\n}\n"
  },
  {
    "path": "util/utils_test.go",
    "content": "package util\n\nimport (\n\t\"math/big\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestUtils(t *testing.T) {\n\tassert.Equal(t, int32(1), Min(int32(1), 1))\n\tassert.Equal(t, int32(1), Min(int32(1), 2))\n\tassert.Equal(t, int32(1), Min(2, int32(1)))\n\tassert.Equal(t, int32(2), Max(int32(2), 2))\n\tassert.Equal(t, int32(2), Max(1, int32(2)))\n\tassert.Equal(t, int32(2), Max(int32(2), 1))\n\n\tassert.Equal(t, uint32(1), Min(uint32(1), 1))\n\tassert.Equal(t, uint32(1), Min(uint32(1), 2))\n\tassert.Equal(t, uint32(1), Min(2, uint32(1)))\n\tassert.Equal(t, uint32(2), Max(uint32(2), 2))\n\tassert.Equal(t, uint32(2), Max(1, uint32(2)))\n\tassert.Equal(t, uint32(2), Max(uint32(2), 1))\n\n\tassert.Equal(t, MaxUint32, uint32(0xffffffff))\n\tassert.Equal(t, MaxUint64, uint64(0xffffffffffffffff))\n\tassert.Equal(t, MaxInt32, int32(0x7fffffff))\n\tassert.Equal(t, MaxInt64, int64(0x7fffffffffffffff))\n\tassert.Equal(t, MaxInt64, Max(MaxInt64, 1))\n\tassert.Equal(t, MaxInt64, Max(MinInt64, MaxInt64))\n\tassert.Equal(t, int64(1), Min(MaxInt64, 1))\n\tassert.Equal(t, MinInt64, Min(MinInt64, MaxInt64))\n}\n\nfunc TestSetFlags(t *testing.T) {\n\tflags := 0\n\tflags = SetFlag(flags, 0x2)\n\tflags = SetFlag(flags, 0x8)\n\tassert.Equal(t, 0xa, flags)\n\tassert.True(t, IsFlagSet(flags, 0x2))\n\tassert.False(t, IsFlagSet(flags, 0x4))\n\tflags = UnsetFlag(flags, 0x2)\n\tassert.False(t, IsFlagSet(flags, 0x2))\n\tassert.Equal(t, 0x8, flags)\n}\n\nfunc TestRandUint16(t *testing.T) {\n\trnd := RandUint16(4)\n\tassert.LessOrEqual(t, rnd, uint16(4))\n}\n\nfunc TestRandInt16(t *testing.T) {\n\trnd := RandInt16(4)\n\tassert.GreaterOrEqual(t, rnd, int16(0))\n\tassert.LessOrEqual(t, rnd, int16(4))\n}\n\nfunc TestRandUint32(t *testing.T) {\n\trnd := RandUint32(4)\n\tassert.LessOrEqual(t, rnd, uint32(4))\n}\n\nfunc TestRandInt32(t *testing.T) {\n\trnd := RandInt32(4)\n\tassert.GreaterOrEqual(t, rnd, int32(0))\n\tassert.LessOrEqual(t, rnd, int32(4))\n}\n\nfunc TestRandInt64(t *testing.T) {\n\trnd := RandInt64(4)\n\tassert.GreaterOrEqual(t, rnd, int64(0))\n\tassert.LessOrEqual(t, rnd, int64(4))\n}\n\nfunc TestRandUint64(t *testing.T) {\n\trnd1 := RandUint64(4)\n\tassert.LessOrEqual(t, rnd1, uint64(4))\n\n\trnd2 := RandUint64(0)\n\tassert.NotZero(t, rnd2)\n}\n\nfunc TestI2OSP(t *testing.T) {\n\tassert.Nil(t, I2OSP(big.NewInt(int64(-1)), 2))\n\n\tassert.Equal(t, []byte{0, 0}, I2OSP(big.NewInt(int64(0)), 2))\n\tassert.Equal(t, []byte{0, 1}, I2OSP(big.NewInt(int64(1)), 2))\n\tassert.Equal(t, []byte{0, 255}, I2OSP(big.NewInt(int64(255)), 2))\n\tassert.Equal(t, []byte{1, 0}, I2OSP(big.NewInt(int64(256)), 2))\n\tassert.Equal(t, []byte{255, 255}, I2OSP(big.NewInt(int64(65535)), 2))\n}\n\nfunc TestIS2OP(t *testing.T) {\n\tassert.Equal(t, int64(0), OS2IP([]byte{0, 0}).Int64())\n\tassert.Equal(t, int64(1), OS2IP([]byte{0, 1}).Int64())\n\tassert.Equal(t, int64(255), OS2IP([]byte{0, 255}).Int64())\n\tassert.Equal(t, int64(256), OS2IP([]byte{1, 0}).Int64())\n\tassert.Equal(t, int64(65535), OS2IP([]byte{255, 255}).Int64())\n}\n\nfunc TestLogScale(t *testing.T) {\n\ttests := []struct {\n\t\tinput    int\n\t\texpected int\n\t}{\n\t\t{1, 1},\n\t\t{2, 2},\n\t\t{3, 4},\n\t\t{7, 8},\n\t\t{8, 8},\n\t}\n\n\tfor _, tt := range tests {\n\t\tresult := LogScale(tt.input)\n\t\tassert.Equal(t, tt.expected, result, \"LogScale(%d) failed\", tt.input)\n\t}\n}\n\nfunc TestFormatBytesToHumanReadable(t *testing.T) {\n\ttests := []struct {\n\t\tbytes    uint64\n\t\texpected string\n\t}{\n\t\t{1048576, \"1.00 MB\"},\n\t\t{3145728, \"3.00 MB\"},\n\t\t{1024, \"1.00 KB\"},\n\t\t{512, \"512.00 Bytes\"},\n\t\t{1_073_741_824, \"1.00 GB\"},\n\t\t{1_099_511_627_776, \"1.00 TB\"},\n\t}\n\n\tfor _, tt := range tests {\n\t\tresult := FormatBytesToHumanReadable(tt.bytes)\n\t\tif result != tt.expected {\n\t\t\tt.Errorf(\"FormatBytesToHumanReadable(%d) returned %s, expected %s\", tt.bytes, result, tt.expected)\n\t\t}\n\t}\n}\n\nfunc TestParseGRPCAddr(t *testing.T) {\n\ttests := []struct {\n\t\taddr       string\n\t\tinsecure   bool\n\t\twantTarget string\n\t\twantPrefix string\n\t\twantError  bool\n\t}{\n\t\t{\n\t\t\taddr: \"localhost:50051\", insecure: true,\n\t\t\twantTarget: \"localhost:50051\", wantPrefix: \"\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"example.com:50051\", insecure: true,\n\t\t\twantTarget: \"example.com:50051\", wantPrefix: \"\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"http://example.com:50051\", insecure: true,\n\t\t\twantTarget: \"example.com:50051\", wantPrefix: \"\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"https://example.com:50051\", insecure: false,\n\t\t\twantTarget: \"example.com:50051\", wantPrefix: \"\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"https://example.com:50051/path\", insecure: false,\n\t\t\twantTarget: \"example.com:50051\", wantPrefix: \"/path\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"https://example.com/path\", insecure: false,\n\t\t\twantTarget: \"example.com:443\", wantPrefix: \"/path\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"https://example.com/path1/path2\", insecure: false,\n\t\t\twantTarget: \"example.com:443\", wantPrefix: \"/path1/path2\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"example.com/path\", insecure: false,\n\t\t\twantTarget: \"example.com:443\", wantPrefix: \"/path\", wantError: false,\n\t\t},\n\t\t{\n\t\t\taddr: \"https://example.com:50051\", insecure: true,\n\t\t\twantTarget: \"\", wantPrefix: \"\", wantError: true,\n\t\t},\n\t\t{\n\t\t\taddr: \"http://example.com:50051\", insecure: false,\n\t\t\twantTarget: \"\", wantPrefix: \"\", wantError: true,\n\t\t},\n\t\t{\n\t\t\taddr: \"\\x00\", insecure: false,\n\t\t\twantTarget: \"\", wantPrefix: \"\", wantError: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.addr, func(t *testing.T) {\n\t\t\tif tt.wantError {\n\t\t\t\t_, _, err := ParseGRPCAddr(tt.addr, tt.insecure)\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\ttarget, prefix, err := ParseGRPCAddr(tt.addr, tt.insecure)\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, tt.wantTarget, target)\n\t\t\t\tassert.Equal(t, tt.wantPrefix, prefix)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "version/agent.go",
    "content": "package version\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/types/protocol\"\n)\n\nvar NodeAgent = Agent{\n\tVersion:         NodeVersion(),\n\tProtocolVersion: protocol.ProtocolVersionLatest,\n\tOS:              runtime.GOOS,\n\tArch:            runtime.GOARCH,\n}\n\ntype Agent struct {\n\tAppType         string\n\tVersion         Version\n\tProtocolVersion protocol.Version\n\tOS              string\n\tArch            string\n}\n\n// ParseAgent parses a string into an Agent struct.\nfunc ParseAgent(agentStr string) (Agent, error) {\n\tvar agent Agent\n\n\tparts := strings.SplitSeq(agentStr, \"/\")\n\tfor part := range parts {\n\t\tfields := strings.Split(part, \"=\")\n\t\tif len(fields) != 2 {\n\t\t\treturn agent, errors.New(\"invalid field format in agent string\")\n\t\t}\n\t\tkey := fields[0]\n\t\tvalue := fields[1]\n\n\t\tswitch key {\n\t\tcase \"node\":\n\t\t\tagent.AppType = value\n\t\tcase \"node-version\":\n\t\t\tv, err := ParseVersion(value)\n\t\t\tif err != nil {\n\t\t\t\treturn agent, fmt.Errorf(\"failed to parse version: %w\", err)\n\t\t\t}\n\t\t\tagent.Version = v\n\t\tcase \"protocol-version\":\n\t\t\tprotocolVersion, err := protocol.ParseVersion(value)\n\t\t\tif err != nil {\n\t\t\t\treturn agent, fmt.Errorf(\"failed to parse protocol version: %w\", err)\n\t\t\t}\n\t\t\tagent.ProtocolVersion = protocolVersion\n\t\tcase \"os\":\n\t\t\tagent.OS = value\n\t\tcase \"arch\":\n\t\t\tagent.Arch = value\n\t\tdefault:\n\t\t\treturn agent, fmt.Errorf(\"unknown key in agent string: %s\", key)\n\t\t}\n\t}\n\n\treturn agent, nil\n}\n\nfunc (a *Agent) String() string {\n\treturn fmt.Sprintf(\"node=%s/node-version=%s/protocol-version=%d/os=%s/arch=%s\",\n\t\ta.AppType, a.Version.String(), a.ProtocolVersion, a.OS, a.Arch)\n}\n"
  },
  {
    "path": "version/agent_test.go",
    "content": "package version_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestAgentString(t *testing.T) {\n\tagent := version.Agent{\n\t\tAppType:         \"gui\",\n\t\tVersion:         version.Version{Major: 1, Minor: 2, Patch: 3, Meta: \"beta\"},\n\t\tProtocolVersion: 2,\n\t\tOS:              \"linux\",\n\t\tArch:            \"amd64\",\n\t}\n\n\texpected := \"node=gui/node-version=1.2.3-beta/protocol-version=2/os=linux/arch=amd64\"\n\tresult := agent.String()\n\n\tassert.Equal(t, expected, result)\n}\n\nfunc TestParseAgent(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\tagentStr    string\n\t\texpected    version.Agent\n\t\texpectedErr bool\n\t}{\n\t\t{\n\t\t\tname:     \"Valid Agent String\",\n\t\t\tagentStr: \"node=gui/node-version=1.2.3-beta/protocol-version=2/os=linux/arch=amd64\",\n\t\t\texpected: version.Agent{\n\t\t\t\tAppType: \"gui\", Version: version.Version{\n\t\t\t\t\tMajor: 1, Minor: 2, Patch: 3, Meta: \"beta\",\n\t\t\t\t},\n\t\t\t\tProtocolVersion: 2, OS: \"linux\", Arch: \"amd64\",\n\t\t\t},\n\t\t\texpectedErr: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Agent String (Invalid Protocol Version)\",\n\t\t\tagentStr:    \"node=gui/node-version=1.2.3-beta/protocol-version=abc/os=linux/arch=amd64\",\n\t\t\texpected:    version.Agent{},\n\t\t\texpectedErr: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tagent, err := version.ParseAgent(tt.agentStr)\n\n\t\t\tif tt.expectedErr {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, tt.expected, agent)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "version/version.go",
    "content": "package version\n\nimport (\n\t_ \"embed\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n//go:embed version.json\nvar versionData []byte\n\n// Version defines the version of the Pactus software.\n// It follows the Semantic Versioning 2.0.0 spec: http://semver.org/.\n//\n// Update this struct with each new release by adjusting the Major, Minor, or Patch numbers.\n// For major releases, clear the Meta field (set to an empty string).\n// Use the Meta field to indicate pre-release stages, such as \"rc1\", \"rc2\", or \"beta\" during development.\ntype Version struct {\n\tMajor uint   `json:\"major\"` // Major version number\n\tMinor uint   `json:\"minor\"` // Minor version number\n\tPatch uint   `json:\"patch\"` // Patch version number\n\tMeta  string `json:\"meta\"`  // Metadata for version (e.g., \"beta\", \"rc1\")\n\tAlias string `json:\"alias\"` // Alias for version (e.g., \"London\")\n}\n\nvar nodeVersion *Version\n\n// NodeVersion represents the current version of the node software.\nfunc NodeVersion() Version {\n\tif nodeVersion == nil {\n\t\t// Initialize the version from the embedded version.json.\n\t\tnodeVersion = new(Version)\n\t\tif err := json.Unmarshal(versionData, nodeVersion); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\treturn *nodeVersion\n}\n\n// ParseVersion parses a version string into a Version struct.\n// The format should be \"Major.Minor.Patch-Meta\", where Meta is optional.\n// Returns the parsed Version struct and an error if parsing fails.\nfunc ParseVersion(versionStr string) (Version, error) {\n\tvar ver Version\n\n\tif versionStr[0] == 'v' {\n\t\tversionStr = versionStr[1:]\n\t}\n\t// Split the version string into parts\n\tparts := strings.Split(versionStr, \".\")\n\tif len(parts) != 3 {\n\t\treturn ver, errors.New(\"invalid version format\")\n\t}\n\n\t// Parse Major version\n\tmajor, err := strconv.ParseUint(parts[0], 10, 64)\n\tif err != nil {\n\t\treturn ver, fmt.Errorf(\"failed to parse Major version: %w\", err)\n\t}\n\tver.Major = uint(major)\n\n\t// Parse Minor version\n\tminor, err := strconv.ParseUint(parts[1], 10, 64)\n\tif err != nil {\n\t\treturn ver, fmt.Errorf(\"failed to parse Minor version: %w\", err)\n\t}\n\tver.Minor = uint(minor)\n\n\t// Parse Patch version and Meta (if present)\n\tpatchMeta := strings.Split(parts[2], \"-\")\n\tif len(patchMeta) > 2 {\n\t\treturn ver, errors.New(\"invalid Patch and Meta format\")\n\t}\n\n\tpatch, err := strconv.ParseUint(patchMeta[0], 10, 64)\n\tif err != nil {\n\t\treturn ver, fmt.Errorf(\"failed to parse Patch version: %w\", err)\n\t}\n\tver.Patch = uint(patch)\n\n\tif len(patchMeta) == 2 {\n\t\tver.Meta = patchMeta[1]\n\t}\n\n\treturn ver, nil\n}\n\n// StringWithAlias returns a string representation of the Version object with the alias.\nfunc (v Version) StringWithAlias() string {\n\tif v.Alias == \"\" {\n\t\treturn v.String()\n\t}\n\n\treturn fmt.Sprintf(\"%s (%s)\", v.String(), v.Alias)\n}\n\n// String returns a string representation of the Version object.\nfunc (v Version) String() string {\n\tver := fmt.Sprintf(\"%d.%d.%d\", v.Major, v.Minor, v.Patch)\n\tif v.Meta != \"\" {\n\t\tver = fmt.Sprintf(\"%s-%s\", ver, v.Meta)\n\t}\n\n\treturn ver\n}\n\n// Compare compares the current version (v) with another version (other)\n// and returns:\n//\n//\t-1 if v < other\n//\t 0 if v == other\n//\t 1 if v > other\nfunc (v Version) Compare(other Version) int {\n\tif v.Major != other.Major {\n\t\treturn compareInt(v.Major, other.Major)\n\t}\n\tif v.Minor != other.Minor {\n\t\treturn compareInt(v.Minor, other.Minor)\n\t}\n\n\treturn compareInt(v.Patch, other.Patch)\n}\n\nfunc compareInt(a, b uint) int {\n\tif a < b {\n\t\treturn -1\n\t} else if a > b {\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n\nvar _ = NodeVersion()\n"
  },
  {
    "path": "version/version.json",
    "content": "{\n    \"major\": 1,\n    \"minor\": 14,\n    \"patch\": 0,\n    \"meta\": \"beta\",\n    \"alias\": \"\"\n  }\n"
  },
  {
    "path": "version/version_test.go",
    "content": "package version_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestVersionString(t *testing.T) {\n\ttests := []struct {\n\t\tname     string\n\t\tversion  version.Version\n\t\texpected string\n\t}{\n\t\t{\n\t\t\tname:     \"Version with Meta\",\n\t\t\tversion:  version.Version{Major: 1, Minor: 2, Patch: 3, Meta: \"beta\"},\n\t\t\texpected: \"1.2.3-beta\",\n\t\t},\n\t\t{\n\t\t\tname:     \"Version without Meta\",\n\t\t\tversion:  version.Version{Major: 2, Minor: 0, Patch: 0, Meta: \"\"},\n\t\t\texpected: \"2.0.0\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tresult := tt.version.String()\n\t\t\tassert.Equal(t, tt.expected, result)\n\t\t})\n\t}\n}\n\nfunc TestParseVersion(t *testing.T) {\n\ttests := []struct {\n\t\tname        string\n\t\tinput       string\n\t\texpected    version.Version\n\t\texpectedErr bool\n\t}{\n\t\t{\n\t\t\tname:        \"Valid Version String starts with 'v'\",\n\t\t\tinput:       \"v1.2.3\",\n\t\t\texpected:    version.Version{Major: 1, Minor: 2, Patch: 3, Meta: \"\"},\n\t\t\texpectedErr: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Valid Version String with Meta\",\n\t\t\tinput:       \"1.2.3-beta\",\n\t\t\texpected:    version.Version{Major: 1, Minor: 2, Patch: 3, Meta: \"beta\"},\n\t\t\texpectedErr: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Valid Version String without Meta\",\n\t\t\tinput:       \"2.0.0\",\n\t\t\texpected:    version.Version{Major: 2, Minor: 0, Patch: 0, Meta: \"\"},\n\t\t\texpectedErr: false,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Version String\",\n\t\t\tinput:       \"1.2\",\n\t\t\texpected:    version.Version{},\n\t\t\texpectedErr: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Major number\",\n\t\t\tinput:       \"one.2.3\",\n\t\t\texpected:    version.Version{},\n\t\t\texpectedErr: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Minor number\",\n\t\t\tinput:       \"1.two.3\",\n\t\t\texpected:    version.Version{},\n\t\t\texpectedErr: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Patch number\",\n\t\t\tinput:       \"1.2.three\",\n\t\t\texpected:    version.Version{},\n\t\t\texpectedErr: true,\n\t\t},\n\t\t{\n\t\t\tname:        \"Invalid Patch-Meta Format\",\n\t\t\tinput:       \"1.2.3-rc1-dev\",\n\t\t\texpected:    version.Version{},\n\t\t\texpectedErr: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tver, err := version.ParseVersion(tt.input)\n\n\t\t\tif tt.expectedErr {\n\t\t\t\trequire.Error(t, err)\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err)\n\t\t\t\tassert.Equal(t, tt.expected, ver)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestVersionComparison(t *testing.T) {\n\ttests := []struct {\n\t\tname         string\n\t\tv1Input      string\n\t\tv2Input      string\n\t\texpectedSign int\n\t}{\n\t\t{\n\t\t\tname:         \"Equal Versions\",\n\t\t\tv1Input:      \"1.2.3\",\n\t\t\tv2Input:      \"1.2.3\",\n\t\t\texpectedSign: 0,\n\t\t},\n\t\t{\n\t\t\tname:         \"Equal Versions\",\n\t\t\tv1Input:      \"1.2.3-beta\",\n\t\t\tv2Input:      \"1.2.3\",\n\t\t\texpectedSign: 0,\n\t\t},\n\t\t{\n\t\t\tname:         \"Equal Versions\",\n\t\t\tv1Input:      \"1.2.3-beta\",\n\t\t\tv2Input:      \"1.2.3-rc1\",\n\t\t\texpectedSign: 0,\n\t\t},\n\t\t{\n\t\t\tname:         \"Lesser Patch Version\",\n\t\t\tv1Input:      \"1.2.2\",\n\t\t\tv2Input:      \"1.2.3\",\n\t\t\texpectedSign: -1,\n\t\t},\n\t\t{\n\t\t\tname:         \"Lesser Minor Version\",\n\t\t\tv1Input:      \"2.1.0\",\n\t\t\tv2Input:      \"2.2.0\",\n\t\t\texpectedSign: -1,\n\t\t},\n\t\t{\n\t\t\tname:         \"Greater Major Version\",\n\t\t\tv1Input:      \"2.1.0\",\n\t\t\tv2Input:      \"1.2.3\",\n\t\t\texpectedSign: 1,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tver1, err := version.ParseVersion(tt.v1Input)\n\t\t\trequire.NoError(t, err)\n\n\t\t\tver2, err := version.ParseVersion(tt.v2Input)\n\t\t\trequire.NoError(t, err)\n\n\t\t\texpectedSign := tt.expectedSign\n\t\t\tactualSign := ver1.Compare(ver2)\n\n\t\t\tassert.Equalf(t, expectedSign, actualSign,\n\t\t\t\t\"Comparison result mismatch for %s vs %s\", tt.v1Input, tt.v2Input)\n\t\t})\n\t}\n}\n\n// TestCheckVersionString checks if the current version string is valid and parsable.\nfunc TestCheckVersionString(t *testing.T) {\n\tcurVer := version.NodeVersion()\n\tparsedVer, err := version.ParseVersion(curVer.String())\n\trequire.NoError(t, err)\n\tassert.Equal(t, curVer.Major, parsedVer.Major)\n\tassert.Equal(t, curVer.Minor, parsedVer.Minor)\n\tassert.Equal(t, curVer.Patch, parsedVer.Patch)\n\tassert.Equal(t, curVer.Meta, parsedVer.Meta)\n}\n"
  },
  {
    "path": "wallet/addresses.go",
    "content": "package wallet\n\nimport (\n\t\"cmp\"\n\t\"slices\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\ntype addresses struct {\n\tstorage storage.IStorage\n}\n\nfunc newAddresses(storage storage.IStorage) addresses {\n\treturn addresses{\n\t\tstorage: storage,\n\t}\n}\n\nfunc (a *addresses) AddressInfo(addr string) (*types.AddressInfo, error) {\n\treturn a.storage.AddressInfo(addr)\n}\n\n// listAddressConfig contains options for filtering addresses.\ntype listAddressConfig struct {\n\taddressTypes []crypto.AddressType\n}\n\nvar defaultListAddressConfig = listAddressConfig{\n\taddressTypes: []crypto.AddressType{},\n}\n\n// ListAddressOption is a functional option for ListAddresses.\ntype ListAddressOption func(*listAddressConfig)\n\n// WithAddressTypes filters addresses by the specified type.\nfunc WithAddressTypes(addressTypes []crypto.AddressType) ListAddressOption {\n\treturn func(cfg *listAddressConfig) {\n\t\tcfg.addressTypes = addressTypes\n\t}\n}\n\n// WithAddressType filters addresses by the specified type.\nfunc WithAddressType(addressType crypto.AddressType) ListAddressOption {\n\treturn func(cfg *listAddressConfig) {\n\t\tcfg.addressTypes = []crypto.AddressType{addressType}\n\t}\n}\n\n// OnlyValidatorAddresses filters to show only validator addresses.\nfunc OnlyValidatorAddresses() ListAddressOption {\n\treturn func(cfg *listAddressConfig) {\n\t\tcfg.addressTypes = []crypto.AddressType{crypto.AddressTypeValidator}\n\t}\n}\n\n// OnlyAccountAddresses filters to show only account addresses (BLS and Ed25519).\nfunc OnlyAccountAddresses() ListAddressOption {\n\treturn func(cfg *listAddressConfig) {\n\t\tcfg.addressTypes = []crypto.AddressType{\n\t\t\tcrypto.AddressTypeBLSAccount,\n\t\t\tcrypto.AddressTypeEd25519Account,\n\t\t}\n\t}\n}\n\nfunc (a *addresses) ListAddresses(opts ...ListAddressOption) []types.AddressInfo {\n\tcfg := defaultListAddressConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tinfos := make([]types.AddressInfo, 0)\n\tfor _, info := range a.storage.AllAddresses() {\n\t\tif len(cfg.addressTypes) == 0 {\n\t\t\tinfos = append(infos, info)\n\n\t\t\tcontinue\n\t\t}\n\n\t\taddr, err := crypto.AddressFromString(info.Address)\n\t\tif err != nil {\n\t\t\treturn nil\n\t\t}\n\n\t\tfor _, addrType := range cfg.addressTypes {\n\t\t\tif addr.Type() == addrType {\n\t\t\t\tinfos = append(infos, info)\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\ta.sortAddressesByAddressIndex(infos...)\n\ta.sortAddressesByAddressType(infos...)\n\ta.sortAddressesByPurpose(infos...)\n\n\treturn infos\n}\n\nfunc (*addresses) sortAddressesByPurpose(addrs ...types.AddressInfo) {\n\tslices.SortStableFunc(addrs, func(a, b types.AddressInfo) int {\n\t\tpathA, _ := addresspath.FromString(a.Path)\n\t\tpathB, _ := addresspath.FromString(b.Path)\n\n\t\treturn cmp.Compare(pathA.Purpose(), pathB.Purpose())\n\t})\n}\n\nfunc (*addresses) sortAddressesByAddressType(addrs ...types.AddressInfo) {\n\tslices.SortStableFunc(addrs, func(a, b types.AddressInfo) int {\n\t\tpathA, _ := addresspath.FromString(a.Path)\n\t\tpathB, _ := addresspath.FromString(b.Path)\n\n\t\treturn cmp.Compare(pathA.AddressType(), pathB.AddressType())\n\t})\n}\n\nfunc (*addresses) sortAddressesByAddressIndex(addrs ...types.AddressInfo) {\n\tslices.SortStableFunc(addrs, func(a, b types.AddressInfo) int {\n\t\tpathA, _ := addresspath.FromString(a.Path)\n\t\tpathB, _ := addresspath.FromString(b.Path)\n\n\t\treturn cmp.Compare(pathA.AddressIndex(), pathB.AddressIndex())\n\t})\n}\n\n// AddressCount returns the number of addresses inside the wallet.\nfunc (a *addresses) AddressCount() int {\n\treturn a.storage.AddressCount()\n}\n\nfunc (a *addresses) ImportBLSPrivateKey(password string, prv *bls.PrivateKey) error {\n\tpub := prv.PublicKeyNative()\n\taccAddr := pub.AccountAddress()\n\tif a.HasAddress(accAddr.String()) {\n\t\treturn ErrAddressExists\n\t}\n\n\tvault := a.storage.Vault()\n\taccInfo, valInfo, err := vault.ImportBLSPrivateKey(password, prv)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = a.storage.InsertAddress(accInfo)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = a.storage.InsertAddress(valInfo)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn a.storage.UpdateVault(vault)\n}\n\nfunc (a *addresses) ImportEd25519PrivateKey(password string, prv *ed25519.PrivateKey) error {\n\tpub := prv.PublicKeyNative()\n\n\taccAddr := pub.AccountAddress()\n\tif a.HasAddress(accAddr.String()) {\n\t\treturn ErrAddressExists\n\t}\n\n\tvault := a.storage.Vault()\n\taccInfo, err := vault.ImportEd25519PrivateKey(password, prv)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = a.storage.InsertAddress(accInfo)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn a.storage.UpdateVault(vault)\n}\n\nfunc (a *addresses) PrivateKey(password, addr string) (crypto.PrivateKey, error) {\n\tkeys, err := a.PrivateKeys(password, []string{addr})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn keys[0], nil\n}\n\nfunc (a *addresses) PrivateKeys(password string, addrs []string) ([]crypto.PrivateKey, error) {\n\tpaths := make([]addresspath.Path, len(addrs))\n\tfor i, addr := range addrs {\n\t\tinfo, err := a.AddressInfo(addr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\thdPath, err := addresspath.FromString(info.Path)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tpaths[i] = hdPath\n\t}\n\n\treturn a.storage.Vault().PrivateKeys(password, paths)\n}\n\n// newAddressConfig contains options for creating new addresses.\ntype newAddressConfig struct {\n\tpassword string\n}\n\nvar defaultNewAddressConfig = newAddressConfig{\n\tpassword: \"\",\n}\n\n// NewAddressOption is a functional option for NewAddresa.\ntype NewAddressOption func(*newAddressConfig)\n\n// WithPassword sets the password for address creation required for Ed25519 accounta.\nfunc WithPassword(password string) NewAddressOption {\n\treturn func(cfg *newAddressConfig) {\n\t\tcfg.password = password\n\t}\n}\n\nfunc (a *addresses) NewAddress(addressType crypto.AddressType, label string, opts ...NewAddressOption,\n) (*types.AddressInfo, error) {\n\tcfg := defaultNewAddressConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tvault := a.storage.Vault()\n\tvar info *types.AddressInfo\n\tvar err error\n\tswitch addressType {\n\tcase crypto.AddressTypeValidator:\n\t\tinfo, err = vault.NewValidatorAddress(label)\n\tcase crypto.AddressTypeBLSAccount:\n\t\tinfo, err = vault.NewBLSAccountAddress(label)\n\tcase crypto.AddressTypeEd25519Account:\n\t\tinfo, err = vault.NewEd25519AccountAddress(label, cfg.password)\n\tcase crypto.AddressTypeTreasury:\n\t\treturn nil, ErrInvalidAddressType\n\n\tdefault:\n\t\treturn nil, ErrInvalidAddressType\n\t}\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = a.storage.InsertAddress(info)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = a.storage.UpdateVault(vault)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn info, nil\n}\n\n// NewBLSAccountAddress create a new BLS-based account address and\n// associates it with the given label.\nfunc (a *addresses) NewBLSAccountAddress(label string) (*types.AddressInfo, error) {\n\treturn a.NewAddress(crypto.AddressTypeBLSAccount, label)\n}\n\n// NewEd25519AccountAddress create a new Ed25519-based account address and\n// associates it with the given label.\n// The password is required to access the master private key needed for address generation.\nfunc (a *addresses) NewEd25519AccountAddress(label, password string) (*types.AddressInfo, error) {\n\treturn a.NewAddress(crypto.AddressTypeEd25519Account, label, WithPassword(password))\n}\n\n// NewValidatorAddress creates a new BLS validator address and\n// associates it with the given label.\nfunc (a *addresses) NewValidatorAddress(label string) (*types.AddressInfo, error) {\n\treturn a.NewAddress(crypto.AddressTypeValidator, label)\n}\n\nfunc (a *addresses) HasAddress(addr string) bool {\n\treturn a.storage.HasAddress(addr)\n}\n\n// AddressLabel returns label of the given addresa.\nfunc (a *addresses) AddressLabel(addr string) string {\n\tinfo, err := a.AddressInfo(addr)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\n\treturn info.Label\n}\n\n// SetAddressLabel updates the label of the given addresa.\nfunc (a *addresses) SetAddressLabel(addr, label string) error {\n\tinfo, err := a.AddressInfo(addr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tinfo.Label = label\n\n\treturn a.storage.UpdateAddress(info)\n}\n"
  },
  {
    "path": "wallet/addresses_test.go",
    "content": "package wallet\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/wallet/encrypter\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n)\n\nfunc TestPrivateKey(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Unknown address\", func(t *testing.T) {\n\t\taddr := td.RandAccAddress().String()\n\t\ttd.mockStorage.EXPECT().AddressInfo(addr).Return(nil, storage.ErrNotFound)\n\n\t\t_, err := td.wallet.PrivateKey(td.password, addr)\n\t\trequire.ErrorIs(t, err, storage.ErrNotFound)\n\t})\n}\n\nfunc TestAddressCount(t *testing.T) {\n\ttd := setup(t)\n\n\tcount := td.RandIntMax(100)\n\ttd.mockStorage.EXPECT().AddressCount().Return(count)\n\tassert.Equal(t, count, td.wallet.AddressCount())\n}\n\nfunc TestHasAddress(t *testing.T) {\n\ttd := setup(t)\n\n\tknownAddr := td.RandAccAddress().String()\n\ttd.mockStorage.EXPECT().HasAddress(knownAddr).Return(true)\n\ttd.mockStorage.EXPECT().HasAddress(gomock.Any()).Return(false)\n\n\tt.Run(\"Known address\", func(t *testing.T) {\n\t\tassert.True(t, td.wallet.HasAddress(knownAddr))\n\t})\n\n\tt.Run(\"Unknown address\", func(t *testing.T) {\n\t\tunknownAddr := td.RandAccAddress().String()\n\t\tassert.False(t, td.wallet.HasAddress(unknownAddr))\n\t})\n}\n\nfunc TestListAddresses(t *testing.T) {\n\ttd := setup(t)\n\n\tvalInfo, _ := td.testVault.NewValidatorAddress(\"addr-1\")\n\taccInfo, _ := td.testVault.NewBLSAccountAddress(\"addr-2\")\n\tedInfo, _ := td.testVault.NewEd25519AccountAddress(\"addr-3\", td.password)\n\n\t_, prv1 := td.RandBLSKeyPair()\n\timpAcc, impVal, _ := td.testVault.ImportBLSPrivateKey(td.password, prv1)\n\t_, prv2 := td.RandEd25519KeyPair()\n\timpEd, _ := td.testVault.ImportEd25519PrivateKey(td.password, prv2)\n\n\texisting := []types.AddressInfo{\n\t\t*impAcc,\n\t\t*impVal,\n\t\t*impEd,\n\t\t*valInfo,\n\t\t*accInfo,\n\t\t*edInfo,\n\t}\n\ttd.mockStorage.EXPECT().AllAddresses().Return(existing).AnyTimes()\n\n\tt.Run(\"List should be sorted\", func(t *testing.T) {\n\t\tlisted := td.wallet.ListAddresses()\n\n\t\tassert.Equal(t, \"m/44'/21888'/3'/0'\", listed[0].Path)\n\t\tassert.Equal(t, \"m/12381'/21888'/1'/0\", listed[1].Path)\n\t\tassert.Equal(t, \"m/12381'/21888'/2'/0\", listed[2].Path)\n\t\tassert.Equal(t, \"m/65535'/21888'/1'/0'\", listed[3].Path)\n\t\tassert.Equal(t, \"m/65535'/21888'/2'/0'\", listed[4].Path)\n\t\tassert.Equal(t, \"m/65535'/21888'/3'/1'\", listed[5].Path)\n\t})\n\n\tt.Run(\"Only account addresses\", func(t *testing.T) {\n\t\tinfos := td.wallet.ListAddresses(OnlyAccountAddresses())\n\n\t\tfor _, i := range infos {\n\t\t\taddr, _ := crypto.AddressFromString(i.Address)\n\t\t\tassert.True(t, addr.IsAccountAddress())\n\t\t}\n\t})\n\n\tt.Run(\"Only validator addresses\", func(t *testing.T) {\n\t\tinfos := td.wallet.ListAddresses(OnlyValidatorAddresses())\n\n\t\tfor _, i := range infos {\n\t\t\taddr, _ := crypto.AddressFromString(i.Address)\n\t\t\tassert.True(t, addr.IsValidatorAddress())\n\t\t}\n\t})\n}\n\nfunc TestNewValidatorAddress(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\tlabel := td.RandString(16)\n\taddressInfo, err := td.wallet.NewValidatorAddress(label)\n\trequire.NoError(t, err)\n\tassert.NotEmpty(t, addressInfo.Address)\n\tassert.NotEmpty(t, addressInfo.PublicKey)\n\tassert.Equal(t, label, addressInfo.Label)\n\tassert.Equal(t, \"m/12381'/21888'/1'/0\", addressInfo.Path)\n\n\tpub, _ := bls.PublicKeyFromString(addressInfo.PublicKey)\n\tassert.Equal(t, pub.ValidatorAddress().String(), addressInfo.Address)\n}\n\nfunc TestNewBLSAccountAddress(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\tlabel := td.RandString(16)\n\taddressInfo, err := td.wallet.NewBLSAccountAddress(label)\n\trequire.NoError(t, err)\n\tassert.NotEmpty(t, addressInfo.Address)\n\tassert.NotEmpty(t, addressInfo.PublicKey)\n\tassert.Equal(t, label, addressInfo.Label)\n\tassert.Equal(t, \"m/12381'/21888'/2'/0\", addressInfo.Path)\n\n\tpub, _ := bls.PublicKeyFromString(addressInfo.PublicKey)\n\tassert.Equal(t, pub.AccountAddress().String(), addressInfo.Address)\n}\n\nfunc TestNewE225519AccountAddress(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\tlabel := td.RandString(16)\n\taddressInfo, err := td.wallet.NewEd25519AccountAddress(label, td.password)\n\trequire.NoError(t, err)\n\tassert.NotEmpty(t, addressInfo.Address)\n\tassert.NotEmpty(t, addressInfo.PublicKey)\n\tassert.Equal(t, label, addressInfo.Label)\n\tassert.Equal(t, \"m/44'/21888'/3'/0'\", addressInfo.Path)\n\n\tpub, _ := ed25519.PublicKeyFromString(addressInfo.PublicKey)\n\tassert.Equal(t, pub.AccountAddress().String(), addressInfo.Address)\n}\n\nfunc TestImportBLSPrivateKey(t *testing.T) {\n\ttd := setup(t)\n\n\tpub, prv := td.RandBLSKeyPair()\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(false)\n\n\t\terr := td.wallet.ImportBLSPrivateKey(\"invalid-password\", prv)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(false)\n\t\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil).Times(2)\n\t\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\n\t\terr := td.wallet.ImportBLSPrivateKey(td.password, prv)\n\t\trequire.NoError(t, err)\n\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(true)\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.ValidatorAddress().String()).Return(true)\n\n\t\tassert.True(t, td.wallet.HasAddress(pub.AccountAddress().String()))\n\t\tassert.True(t, td.wallet.HasAddress(pub.ValidatorAddress().String()))\n\t})\n\n\tt.Run(\"Reimporting private key\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(true)\n\n\t\terr := td.wallet.ImportBLSPrivateKey(td.password, prv)\n\t\trequire.ErrorIs(t, err, ErrAddressExists)\n\t})\n}\n\nfunc TestImportEd25519PrivateKey(t *testing.T) {\n\ttd := setup(t)\n\n\tpub, prv := td.RandEd25519KeyPair()\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(false)\n\n\t\terr := td.wallet.ImportEd25519PrivateKey(\"invalid-password\", prv)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(false)\n\t\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\t\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\n\t\terr := td.wallet.ImportEd25519PrivateKey(td.password, prv)\n\t\trequire.NoError(t, err)\n\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(true)\n\t\tassert.True(t, td.wallet.HasAddress(pub.AccountAddress().String()))\n\t})\n\n\tt.Run(\"Reimporting private key\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().HasAddress(pub.AccountAddress().String()).Return(true)\n\n\t\terr := td.wallet.ImportEd25519PrivateKey(td.password, prv)\n\t\trequire.ErrorIs(t, err, ErrAddressExists)\n\t})\n}\n\nfunc TestSetAddressLabel(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\ttestAddr, err := td.wallet.NewBLSAccountAddress(\"test\")\n\trequire.NoError(t, err)\n\n\tt.Run(\"Set label for unknown address\", func(t *testing.T) {\n\t\tinvAddr := td.RandAccAddress().String()\n\t\ttd.mockStorage.EXPECT().AddressInfo(invAddr).Return(nil, storage.ErrNotFound).AnyTimes()\n\n\t\terr := td.wallet.SetAddressLabel(invAddr, \"i have label\")\n\t\trequire.ErrorIs(t, err, storage.ErrNotFound)\n\t\tassert.Empty(t, td.wallet.AddressLabel(invAddr))\n\t})\n\n\tt.Run(\"Update label\", func(t *testing.T) {\n\t\tupdatedInfo := *testAddr\n\t\tupdatedInfo.Label = \"I have a label\"\n\n\t\ttd.mockStorage.EXPECT().AddressInfo(testAddr.Address).Return(testAddr, nil)\n\t\ttd.mockStorage.EXPECT().UpdateAddress(&updatedInfo).Return(nil)\n\t\ttd.mockStorage.EXPECT().AddressInfo(testAddr.Address).Return(&updatedInfo, nil)\n\n\t\terr := td.wallet.SetAddressLabel(testAddr.Address, \"I have a label\")\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"I have a label\", td.wallet.AddressLabel(testAddr.Address))\n\t})\n\n\tt.Run(\"Remove label\", func(t *testing.T) {\n\t\tnoLabelInfo := *testAddr\n\t\tnoLabelInfo.Label = \"\"\n\n\t\ttd.mockStorage.EXPECT().AddressInfo(testAddr.Address).Return(testAddr, nil)\n\t\ttd.mockStorage.EXPECT().UpdateAddress(&noLabelInfo).Return(nil)\n\t\ttd.mockStorage.EXPECT().AddressInfo(testAddr.Address).Return(&noLabelInfo, nil)\n\n\t\terr := td.wallet.SetAddressLabel(testAddr.Address, \"\")\n\t\trequire.NoError(t, err)\n\t\tassert.Empty(t, td.wallet.AddressLabel(testAddr.Address))\n\t})\n}\n"
  },
  {
    "path": "wallet/addresspath/errors.go",
    "content": "package addresspath\n\nimport \"errors\"\n\n// ErrInvalidPath describes an error in which the key path is invalid.\nvar ErrInvalidPath = errors.New(\"the key path is invalid\")\n"
  },
  {
    "path": "wallet/addresspath/path.go",
    "content": "package addresspath\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"golang.org/x/exp/constraints\"\n)\n\ntype Purpose uint32\n\nconst (\n\tPurposeBLS12381         Purpose = 12381\n\tPurposeBIP44            Purpose = 44\n\tPurposeImportPrivateKey Purpose = 65535\n)\n\ntype CoinType uint32\n\nconst (\n\tCoinTypePactusMainnet CoinType = 21888\n\tCoinTypePactusTestnet CoinType = 21777\n)\n\nconst hardenedKeyStart = uint32(0x80000000) // 2^31\n\n// Harden hardens the integer value 'i' by adding 0x80000000 (2^31) to it.\n// This function does not check if 'i' is already hardened.\nfunc Harden[T constraints.Integer](i T) uint32 {\n\treturn uint32(i) + hardenedKeyStart\n}\n\n// UnHarden unhardens the integer value 'i' by subtracting 0x80000000 (2^31) from it.\n// This function does not check if 'i' is already non-hardened.\nfunc UnHarden[T constraints.Integer](i T) uint32 {\n\treturn uint32(i) - hardenedKeyStart\n}\n\ntype Path []uint32\n\nfunc NewPath(indexes ...uint32) Path {\n\tp := make([]uint32, 0, len(indexes))\n\tp = append(p, indexes...)\n\n\treturn p\n}\n\nfunc FromString(str string) (Path, error) {\n\tsub := strings.Split(str, \"/\")\n\tif sub[0] != \"m\" {\n\t\treturn nil, ErrInvalidPath\n\t}\n\n\t// TODO: check the path should exactly 4 levels.\n\n\tvar path []uint32\n\tfor i := 1; i < len(sub); i++ {\n\t\tindexStr := sub[i]\n\t\tadded := uint32(0)\n\t\tif indexStr[len(indexStr)-1] == '\\'' {\n\t\t\tadded = hardenedKeyStart\n\t\t\tindexStr = indexStr[:len(indexStr)-1]\n\t\t}\n\t\tval, err := strconv.ParseInt(indexStr, 10, 32)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpath = append(path, uint32(val)+added)\n\t}\n\n\treturn path, nil\n}\n\nfunc (p Path) String() string {\n\tvar builder strings.Builder\n\tbuilder.WriteString(\"m\")\n\tfor _, i := range p {\n\t\tif i >= hardenedKeyStart {\n\t\t\tfmt.Fprintf(&builder, \"/%d'\", i-hardenedKeyStart)\n\t\t} else {\n\t\t\tfmt.Fprintf(&builder, \"/%d\", i)\n\t\t}\n\t}\n\n\treturn builder.String()\n}\n\n// TODO: we can add IsBLSPurpose or IsImportedPurpose functions\n\nfunc (p Path) Purpose() Purpose {\n\treturn Purpose(UnHarden(p[0]))\n}\n\nfunc (p Path) CoinType() CoinType {\n\treturn CoinType(UnHarden(p[len(p)-3]))\n}\n\nfunc (p Path) AddressType() crypto.AddressType {\n\treturn crypto.AddressType(UnHarden(p[len(p)-2]))\n}\n\nfunc (p Path) AddressIndex() uint32 {\n\treturn p[len(p)-1]\n}\n"
  },
  {
    "path": "wallet/addresspath/path_test.go",
    "content": "package addresspath\n\nimport (\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHardenedKey(t *testing.T) {\n\tnum := uint32(12345)\n\thardenedNum := Harden(num)\n\tunhardenedNum := UnHarden(hardenedNum)\n\n\tassert.Equal(t, num, unhardenedNum)\n}\n\nfunc TestPathToString(t *testing.T) {\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tpath    Path\n\t\twantStr string\n\t}{\n\t\t{NewPath(), \"m\"},\n\t\t{NewPath(0), \"m/0\"},\n\t\t{NewPath(0, 1), \"m/0/1\"},\n\t\t{NewPath(0, 1, 1000000000), \"m/0/1/1000000000\"},\n\t\t{NewPath(h), \"m/0'\"},\n\t\t{NewPath(h, h+1), \"m/0'/1'\"},\n\t\t{NewPath(h, h+1, h+1000000000), \"m/0'/1'/1000000000'\"},\n\t}\n\tfor no, tt := range tests {\n\t\tassert.Equal(t, tt.wantStr, tt.path.String(), \"case %d failed\", no)\n\t}\n}\n\nfunc TestStringToPath(t *testing.T) {\n\th := hardenedKeyStart\n\ttests := []struct {\n\t\tstr      string\n\t\twantPath Path\n\t\twantErr  error\n\t}{\n\t\t{\"m\", nil, nil},\n\t\t{\"m/0\", Path{0}, nil},\n\t\t{\"m/0/1\", Path{0, 1}, nil},\n\t\t{\"m/0/1/1000000000\", Path{0, 1, 1000000000}, nil},\n\t\t{\"m/0'\", Path{h}, nil},\n\t\t{\"m/0'/1'\", Path{h, h + 1}, nil},\n\t\t{\"m/0'/1'/1000000000'\", Path{h, h + 1, h + 1000000000}, nil},\n\t\t{\"i\", nil, ErrInvalidPath},\n\t\t{\"m/'\", nil, strconv.ErrSyntax},\n\t\t{\"m/abc'\", nil, strconv.ErrSyntax},\n\t}\n\tfor no, tt := range tests {\n\t\tpath, err := FromString(tt.str)\n\t\tassert.Equal(t, tt.wantPath, path, \"case %d failed\", no)\n\t\tassert.ErrorIsf(t, err, tt.wantErr, \"case %d failed\", no)\n\t}\n}\n\nfunc TestPathHelpers(t *testing.T) {\n\tpath := Path{\n\t\t12381 + hardenedKeyStart,\n\t\t21888 + hardenedKeyStart,\n\t\t2 + hardenedKeyStart,\n\t\t1,\n\t}\n\n\tassert.Equal(t, PurposeBLS12381, path.Purpose())\n\tassert.Equal(t, CoinTypePactusMainnet, path.CoinType())\n\tassert.Equal(t, crypto.AddressTypeBLSAccount, path.AddressType())\n\tassert.Equal(t, uint32(1), path.AddressIndex())\n}\n"
  },
  {
    "path": "wallet/encrypter/encrypter.go",
    "content": "package encrypter\n\nimport (\n\t\"bytes\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/pactus-project/pactus/util\"\n\t\"golang.org/x/crypto/argon2\"\n)\n\n// Parameters are set based on the spec recommendation\n// Read more here https://datatracker.ietf.org/doc/html/rfc9106#section-4\ntype argon2dParameters struct {\n\titerations  uint32\n\tmemory      uint32\n\tparallelism uint8\n\tkeyLen      uint32\n}\n\ntype Option func(p *argon2dParameters)\n\nfunc OptionIteration(iterations uint32) func(p *argon2dParameters) {\n\treturn func(p *argon2dParameters) {\n\t\tp.iterations = iterations\n\t}\n}\n\nfunc OptionMemory(memory uint32) func(p *argon2dParameters) {\n\treturn func(p *argon2dParameters) {\n\t\tp.memory = memory\n\t}\n}\n\nfunc OptionParallelism(parallelism uint8) func(p *argon2dParameters) {\n\treturn func(p *argon2dParameters) {\n\t\tp.parallelism = parallelism\n\t}\n}\n\nconst (\n\tnameParamIterations  = \"iterations\"\n\tnameParamMemory      = \"memory\"\n\tnameParamParallelism = \"parallelism\"\n\tnameParamKeyLen      = \"keylen\"\n\n\tnameFuncNope      = \"\"\n\tnameFuncArgon2ID  = \"ARGON2ID\"\n\tnameFuncAES256CTR = \"AES_256_CTR\"\n\tnameFuncAES256CBC = \"AES_256_CBC\"\n\tnameFuncMACv1     = \"MACV1\"\n\n\t// Parameter Choice\n\t// https://www.rfc-editor.org/rfc/rfc9106.html#section-4\n\tdefaultIterations  = 3\n\tdefaultMemory      = 65536 // 2 ^ 16\n\tdefaultParallelism = 4\n\tdefaultKeyLen      = 48\n)\n\n// Encrypter keeps the method and parameters for the cipher algorithm.\ntype Encrypter struct {\n\tMethod string `json:\"method,omitempty\"`\n\tParams params `json:\"params,omitempty\"`\n}\n\n// NopeEncrypter creates a nope encrypter instance.\n//\n// The nope encrypter doesn't encrypt the message and the cipher message is same\n// as original message.\nfunc NopeEncrypter() Encrypter {\n\treturn Encrypter{\n\t\tMethod: nameFuncNope,\n\t\tParams: nil,\n\t}\n}\n\n// DefaultEncrypter creates a new encrypter instance.\n// If no option sets it uses the default parameters.\n//\n// The default encrypter uses Argon2ID as password hasher and AES_256_CTR as\n// encryption algorithm.\nfunc DefaultEncrypter(opts ...Option) Encrypter {\n\targon2dParameters := &argon2dParameters{\n\t\titerations:  defaultIterations,\n\t\tmemory:      defaultMemory,\n\t\tparallelism: defaultParallelism,\n\t\tkeyLen:      defaultKeyLen,\n\t}\n\tfor _, opt := range opts {\n\t\topt(argon2dParameters)\n\t}\n\n\tmethod := fmt.Sprintf(\"%s-%s-%s\",\n\t\tnameFuncArgon2ID, nameFuncAES256CTR, nameFuncMACv1)\n\n\tencParams := newParams()\n\tencParams.SetUint32(nameParamIterations, argon2dParameters.iterations)\n\tencParams.SetUint32(nameParamMemory, argon2dParameters.memory)\n\tencParams.SetUint8(nameParamParallelism, argon2dParameters.parallelism)\n\tencParams.SetUint32(nameParamKeyLen, argon2dParameters.keyLen)\n\n\treturn Encrypter{\n\t\tMethod: method,\n\t\tParams: encParams,\n\t}\n}\n\nfunc (e *Encrypter) IsEncrypted() bool {\n\treturn e.Method != nameFuncNope\n}\n\n// Encrypt encrypts the `message` using give `password` and returns the cipher message.\nfunc (e *Encrypter) Encrypt(message, password string) (string, error) {\n\tif e.Method == nameFuncNope {\n\t\tif password != \"\" {\n\t\t\treturn \"\", ErrInvalidPassword\n\t\t}\n\n\t\treturn message, nil\n\t}\n\n\t// Check if password is empty\n\tif password == \"\" {\n\t\treturn \"\", ErrInvalidPassword\n\t}\n\n\tfuncs := strings.Split(e.Method, \"-\")\n\tif len(funcs) != 3 {\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\t// Password hasher method\n\tsalt := make([]byte, 16)\n\t_, err := rand.Read(salt)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\titerations := e.Params.GetUint32(nameParamIterations)\n\tmemory := e.Params.GetUint32(nameParamMemory)\n\tparallelism := e.Params.GetUint8(nameParamParallelism)\n\tkeyLen := e.Params.GetUint32(nameParamKeyLen)\n\n\tif keyLen == 32 {\n\t\t// Legacy encryption methods where the same salt is reused as the IV.\n\t\t// Update to 48 byes key length.\n\t\tkeyLen = 48\n\t\te.Params.SetUint32(nameParamKeyLen, 48)\n\t}\n\n\t// Password hasher method\n\tvar passwordHash []byte\n\tswitch funcs[0] {\n\tcase nameFuncArgon2ID:\n\t\t// Argon2 currently has three modes:\n\t\t// - data-dependent Argon2d,\n\t\t// - data-independent Argon2i,\n\t\t// - a mix of the two, Argon2id.\n\t\tpasswordHash = argon2.IDKey([]byte(password), salt, iterations, memory, parallelism, keyLen)\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\t// Encrypter method\n\t// The first 32 bytes are used as the encryption key, and the last 16 bytes are used as the IV.\n\tcipherKey := passwordHash[:32]\n\tinitVec := passwordHash[32:]\n\tvar cipher []byte\n\tswitch funcs[1] {\n\tcase nameFuncAES256CTR:\n\t\tcipher = aes256CTRCrypt([]byte(message), initVec, cipherKey)\n\n\tcase nameFuncAES256CBC:\n\t\tcipher = aes256CBCEncrypt([]byte(message), initVec, cipherKey)\n\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\t// MAC method\n\tdata := make([]byte, 0)\n\tswitch funcs[2] {\n\tcase nameFuncMACv1:\n\t\t// Calculate the MAC\n\t\t// We use the MAC to check if the password is correct.\n\t\t// Use Cipher key as the key for the MAC.\n\t\t// https: //en.wikipedia.org/wiki/Authenticated_encryption#Encrypt-then-MAC_(EtM)\n\t\tmac := calcMACv1(cipherKey[16:32], cipher)\n\n\t\tdata = append(data, salt...)\n\t\tdata = append(data, cipher...)\n\t\tdata = append(data, mac...)\n\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\tcipherText := base64.StdEncoding.EncodeToString(data)\n\n\treturn cipherText, nil\n}\n\n// Decrypt decrypts the `cipher` using give `password` and returns the original message.\nfunc (e *Encrypter) Decrypt(cipherText, password string) (string, error) {\n\tif e.Method == nameFuncNope {\n\t\tif password != \"\" {\n\t\t\treturn \"\", ErrInvalidPassword\n\t\t}\n\n\t\treturn cipherText, nil\n\t}\n\n\tfuncs := strings.Split(e.Method, \"-\")\n\tif len(funcs) != 3 {\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\tdata, err := base64.StdEncoding.DecodeString(cipherText)\n\tif err != nil {\n\t\treturn \"\", ErrInvalidCipher\n\t}\n\n\t// Minimum length of data should be 20 (16 salt + 4 bytes mac)\n\tif len(data) < 20 {\n\t\treturn \"\", ErrInvalidCipher\n\t}\n\n\titerations := e.Params.GetUint32(nameParamIterations)\n\tmemory := e.Params.GetUint32(nameParamMemory)\n\tparallelism := e.Params.GetUint8(nameParamParallelism)\n\tkeyLen := e.Params.GetUint32(nameParamKeyLen)\n\n\t// Password hasher method\n\tsalt := data[0:16]\n\tvar passwordHash []byte\n\n\tswitch funcs[0] {\n\tcase nameFuncArgon2ID:\n\t\tpasswordHash = argon2.IDKey([]byte(password), salt, iterations, memory, parallelism, keyLen)\n\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\t// Encrypter method\n\tvar initVec, cipherKey []byte\n\n\tswitch keyLen {\n\tcase 32:\n\t\t// This case supports legacy encryption methods where the same salt is reused as the IV.\n\t\tcipherKey = passwordHash\n\t\tinitVec = salt\n\n\tcase 48:\n\t\t// The first 32 bytes are used as the encryption key, and the last 16 bytes are used as the IV.\n\t\tcipherKey = passwordHash[:32]\n\t\tinitVec = passwordHash[32:]\n\n\tdefault:\n\t\treturn \"\", ErrInvalidParam\n\t}\n\n\tcipher := data[16 : len(data)-4]\n\tvar msg []byte\n\n\tswitch funcs[1] {\n\tcase nameFuncAES256CTR:\n\t\tmsg = aes256CTRCrypt(cipher, initVec, cipherKey)\n\n\tcase nameFuncAES256CBC:\n\t\tmsg = aes256CBCDecrypt(cipher, initVec, cipherKey)\n\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\t// MAC method\n\tswitch funcs[2] {\n\tcase nameFuncMACv1:\n\t\tmac := data[len(data)-4:]\n\t\tif !util.SafeCmp(mac, calcMACv1(cipherKey[16:32], cipher)) {\n\t\t\treturn \"\", ErrInvalidPassword\n\t\t}\n\n\tdefault:\n\t\treturn \"\", ErrMethodNotSupported\n\t}\n\n\treturn string(msg), nil\n}\n\n// aes256CTRCrypt encrypts or decrypts a message using AES-256-CTR mode.\n// It requires a 32-byte (256-bit) cipher key and a 16-byte (128-bit) initialization vector (IV).\n// Returns the encrypted or decrypted output.\nfunc aes256CTRCrypt(input, initVec, cipherKey []byte) []byte {\n\taesCipher, _ := aes.NewCipher(cipherKey)\n\n\toutput := make([]byte, len(input))\n\tstream := cipher.NewCTR(aesCipher, initVec)\n\tstream.XORKeyStream(output, input)\n\n\treturn output\n}\n\n// aes256CBCEncrypt encrypts a plain message using AES-256-CBC mode.\n// It requires a 32-byte (256-bit) cipher key and a 16-byte (128-bit) initialization vector (IV).\n// Returns the encrypted cipher message.\nfunc aes256CBCEncrypt(plainMsg, initVec, cipherKey []byte) []byte {\n\taesCipher, _ := aes.NewCipher(cipherKey)\n\n\tplainMsg = pkcs7Padding(plainMsg, aes.BlockSize)\n\tcipherMsg := make([]byte, len(plainMsg))\n\tenc := cipher.NewCBCEncrypter(aesCipher, initVec)\n\tenc.CryptBlocks(cipherMsg, plainMsg)\n\n\treturn cipherMsg\n}\n\n// aes256CBCDecrypt decrypts a cipher message using AES-256-CBC mode.\n// It requires a 32-byte (256-bit) cipher key and a 16-byte (128-bit) initialization vector (IV).\n// Returns the decrypted plain message.\nfunc aes256CBCDecrypt(cipherMsg, initVec, cipherKey []byte) []byte {\n\taesCipher, _ := aes.NewCipher(cipherKey)\n\n\tplainMsg := make([]byte, len(cipherMsg))\n\tdec := cipher.NewCBCDecrypter(aesCipher, initVec)\n\tdec.CryptBlocks(plainMsg, cipherMsg)\n\tplainMsg = pkcs7UnPadding(plainMsg)\n\n\treturn plainMsg\n}\n\nfunc pkcs7Padding(cipherMsg []byte, blockSize int) []byte {\n\tpadding := blockSize - len(cipherMsg)%blockSize\n\tpadMsg := bytes.Repeat([]byte{byte(padding)}, padding)\n\n\treturn append(cipherMsg, padMsg...)\n}\n\nfunc pkcs7UnPadding(plainMsg []byte) []byte {\n\tlength := len(plainMsg)\n\tunpadding := int(plainMsg[length-1])\n\tif length-unpadding <= 0 {\n\t\treturn plainMsg\n\t}\n\n\treturn plainMsg[:(length - unpadding)]\n}\n\n// calcMACv1 calculates the 4 bytes MAC of the given slices base on SHA-256.\nfunc calcMACv1(data ...[]byte) []byte {\n\thasher := sha256.New()\n\tfor _, d := range data {\n\t\t_, _ = hasher.Write(d)\n\t}\n\n\treturn hasher.Sum(nil)[:4]\n}\n"
  },
  {
    "path": "wallet/encrypter/encrypter_test.go",
    "content": "package encrypter\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestNopeEncrypterParams(t *testing.T) {\n\tenc := NopeEncrypter()\n\tassert.Empty(t, enc.Method)\n\tassert.Nil(t, enc.Params)\n\tassert.False(t, enc.IsEncrypted())\n}\n\nfunc TestNopeEncrypter(t *testing.T) {\n\tenc := NopeEncrypter()\n\n\tmsg := \"foo\"\n\t_, err := enc.Encrypt(msg, \"password\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n\tcipher, err := enc.Encrypt(msg, \"\")\n\trequire.NoError(t, err)\n\tassert.Equal(t, msg, cipher)\n\n\t_, err = enc.Decrypt(cipher, \"password\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n\tdecipher, err := enc.Decrypt(cipher, \"\")\n\trequire.NoError(t, err)\n\tassert.Equal(t, msg, decipher)\n}\n\nfunc TestDefaultEncrypterParams(t *testing.T) {\n\topts := []Option{\n\t\tOptionIteration(3),\n\t\tOptionMemory(4),\n\t\tOptionParallelism(5),\n\t}\n\tenc := DefaultEncrypter(opts...)\n\tassert.Equal(t, \"ARGON2ID-AES_256_CTR-MACV1\", enc.Method)\n\tassert.Equal(t, \"3\", enc.Params[\"iterations\"])\n\tassert.Equal(t, \"4\", enc.Params[\"memory\"])\n\tassert.Equal(t, \"5\", enc.Params[\"parallelism\"])\n\tassert.Equal(t, \"48\", enc.Params[\"keylen\"])\n\tassert.True(t, enc.IsEncrypted())\n}\n\nfunc TestDefaultEncrypter(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\n\tenc := &Encrypter{\n\t\tMethod: \"ARGON2ID-AES_256_CTR-MACV1\",\n\t\tParams: params{\n\t\t\tnameParamIterations:  \"1\",\n\t\t\tnameParamMemory:      \"8\",\n\t\t\tnameParamParallelism: \"1\",\n\t\t\tnameParamKeyLen:      \"48\",\n\t\t},\n\t}\n\n\tmsg := ts.RandString(ts.RandIntNonZero(100))\n\tpassword := ts.RandString(ts.RandIntNonZero(100))\n\n\t_, err := enc.Encrypt(msg, \"\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n\n\tcipher, err := enc.Encrypt(msg, password)\n\trequire.NoError(t, err)\n\n\tdec, err := enc.Decrypt(cipher, password)\n\trequire.NoError(t, err)\n\tassert.Equal(t, msg, dec)\n\n\t_, err = enc.Decrypt(cipher, \"invalid-password\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n}\n\nfunc TestInvalidMethod(t *testing.T) {\n\ttests := []struct {\n\t\tmethod string\n\t}{\n\t\t{\"XXX-AES_256_CTR-MACV1\"},\n\t\t{\"ARGON2ID-XXX-MACV1\"},\n\t\t{\"ARGON2ID-AES_256_CTR-XXX\"},\n\t\t{\"XXX\"},\n\t}\n\n\tfor _, tt := range tests {\n\t\tenc := &Encrypter{\n\t\t\tMethod: tt.method,\n\t\t\tParams: params{\n\t\t\t\tnameParamIterations:  \"1\",\n\t\t\t\tnameParamMemory:      \"8\",\n\t\t\t\tnameParamParallelism: \"1\",\n\t\t\t\tnameParamKeyLen:      \"48\",\n\t\t\t},\n\t\t}\n\n\t\t_, err := enc.Encrypt(\"foo\", \"password\")\n\t\trequire.ErrorIs(t, err, ErrMethodNotSupported)\n\n\t\t_, err = enc.Decrypt(\"AJFPsGu6bDMJ5iuMWDJS/87xVs7r\", \"password\")\n\t\trequire.ErrorIs(t, err, ErrMethodNotSupported)\n\t}\n}\n\nfunc TestInvalidDecrypt(t *testing.T) {\n\tenc := &Encrypter{\n\t\tMethod: \"ARGON2ID-AES_256_CTR-MACV1\",\n\t\tParams: params{\n\t\t\tnameParamIterations:  \"1\",\n\t\t\tnameParamMemory:      \"8\",\n\t\t\tnameParamParallelism: \"1\",\n\t\t\tnameParamKeyLen:      \"48\",\n\t\t},\n\t}\n\n\t_, err := enc.Decrypt(\"\", \"password\")\n\trequire.ErrorIs(t, err, ErrInvalidCipher)\n\n\t_, err = enc.Decrypt(\"invalid-base64\", \"password\")\n\trequire.ErrorIs(t, err, ErrInvalidCipher)\n\n\tenc.Params.SetUint32(nameParamKeyLen, 64)\n\t_, err = enc.Decrypt(\"AJFPsGu6bDMJ5iuMWDJS/87xVs7r\", \"password\")\n\trequire.ErrorIs(t, err, ErrInvalidParam)\n}\n\nfunc TestAES256CBC(t *testing.T) {\n\tenc := &Encrypter{\n\t\tMethod: \"ARGON2ID-AES_256_CBC-MACV1\",\n\t\tParams: params{\n\t\t\tnameParamIterations:  \"1\",\n\t\t\tnameParamMemory:      \"8\",\n\t\t\tnameParamParallelism: \"1\",\n\t\t\tnameParamKeyLen:      \"48\",\n\t\t},\n\t}\n\n\tmsg := \"foo\"\n\tpassword := \"cowboy\"\n\n\t_, err := enc.Encrypt(msg, \"\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n\n\tcipher, err := enc.Encrypt(msg, password)\n\trequire.NoError(t, err)\n\n\tdec, err := enc.Decrypt(cipher, password)\n\trequire.NoError(t, err)\n\tassert.Equal(t, msg, dec)\n\n\t_, err = enc.Decrypt(cipher, \"invalid-password\")\n\trequire.ErrorIs(t, err, ErrInvalidPassword)\n}\n\nfunc TestDecrypt(t *testing.T) {\n\tmsg := \"foo\"\n\tpassword := \"cowboy\"\n\n\ttests := []struct {\n\t\tname   string\n\t\tenc    Encrypter\n\t\tcipher string\n\t}{\n\t\t{\n\t\t\tname: \"Legacy cipher with keylen 32\",\n\t\t\tenc: Encrypter{\n\t\t\t\tMethod: \"ARGON2ID-AES_256_CTR-MACV1\",\n\t\t\t\tParams: params{\n\t\t\t\t\tnameParamIterations:  \"1\",\n\t\t\t\t\tnameParamMemory:      \"8\",\n\t\t\t\t\tnameParamParallelism: \"1\",\n\t\t\t\t\tnameParamKeyLen:      \"32\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t// 854fe79513661e1297075b6fdf6124b7 872da0 fec644bc\n\t\t\tcipher: \"hU/nlRNmHhKXB1tv32Ekt4ctoP7GRLw=\",\n\t\t},\n\t\t{\n\t\t\tname: \"Stream Cipher with keylen 48\",\n\t\t\tenc: Encrypter{\n\t\t\t\tMethod: \"ARGON2ID-AES_256_CTR-MACV1\",\n\t\t\t\tParams: params{\n\t\t\t\t\tnameParamIterations:  \"1\",\n\t\t\t\t\tnameParamMemory:      \"8\",\n\t\t\t\t\tnameParamParallelism: \"1\",\n\t\t\t\t\tnameParamKeyLen:      \"48\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t// f000c3271de35c14162b0ddceeac0492 b4da66 b04cae34\n\t\t\tcipher: \"8ADDJx3jXBQWKw3c7qwEkrTaZrBMrjQ=\",\n\t\t},\n\t\t{\n\t\t\tname: \"Block Cipher with keylen 48\",\n\t\t\tenc: Encrypter{\n\t\t\t\tMethod: \"ARGON2ID-AES_256_CBC-MACV1\",\n\t\t\t\tParams: params{\n\t\t\t\t\tnameParamIterations:  \"1\",\n\t\t\t\t\tnameParamMemory:      \"8\",\n\t\t\t\t\tnameParamParallelism: \"1\",\n\t\t\t\t\tnameParamKeyLen:      \"48\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t// b14b280a9e5f7907671a405b8b8c918a 639f113cef2b6d37e7d590678b5d5a45 b422f34e\n\t\t\tcipher: \"sUsoCp5feQdnGkBbi4yRimOfETzvK20359WQZ4tdWkW0IvNO\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tdec, err := tt.enc.Decrypt(tt.cipher, password)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, msg, dec)\n\t}\n}\n"
  },
  {
    "path": "wallet/encrypter/error.go",
    "content": "package encrypter\n\nimport (\n\t\"errors\"\n)\n\n// ErrInvalidPassword describes an error in which the password is invalid.\nvar ErrInvalidPassword = errors.New(\"invalid password\")\n\n// ErrInvalidParam describes an error in which the encryption parameter is invalid.\nvar ErrInvalidParam = errors.New(\"invalid param\")\n\n// ErrInvalidCipher describes an error in which the cipher message is invalid.\nvar ErrInvalidCipher = errors.New(\"invalid cipher message\")\n\n// ErrMethodNotSupported describes an error in which the cipher method is not known.\nvar ErrMethodNotSupported = errors.New(\"cipher method is not supported\")\n"
  },
  {
    "path": "wallet/encrypter/params.go",
    "content": "package encrypter\n\nimport (\n\t\"encoding/base64\"\n\t\"strconv\"\n)\n\ntype params map[string]string\n\nfunc newParams() params {\n\treturn make(map[string]string)\n}\n\nfunc (p params) SetUint8(key string, val uint8) {\n\tp.SetUint64(key, uint64(val))\n}\n\nfunc (p params) SetUint32(key string, val uint32) {\n\tp.SetUint64(key, uint64(val))\n}\n\nfunc (p params) SetUint64(key string, val uint64) {\n\tp[key] = strconv.FormatUint(val, 10)\n}\n\nfunc (p params) SetBytes(key string, val []byte) {\n\tp[key] = base64.StdEncoding.EncodeToString(val)\n}\n\nfunc (p params) SetString(key, val string) {\n\tp[key] = val\n}\n\nfunc (p params) GetUint8(key string) uint8 {\n\treturn uint8(p.GetUint64(key))\n}\n\nfunc (p params) GetUint32(key string) uint32 {\n\treturn uint32(p.GetUint64(key))\n}\n\nfunc (p params) GetUint64(key string) uint64 {\n\tval, err := strconv.ParseUint(p[key], 10, 64)\n\tif err != nil {\n\t\treturn 0\n\t}\n\n\treturn val\n}\n\nfunc (p params) GetBytes(key string) []byte {\n\tval, err := base64.StdEncoding.DecodeString(p[key])\n\tif err != nil {\n\t\treturn []byte{}\n\t}\n\n\treturn val\n}\n\nfunc (p params) GetString(key string) string {\n\treturn p[key]\n}\n"
  },
  {
    "path": "wallet/encrypter/params_test.go",
    "content": "package encrypter\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestParamsUint8(t *testing.T) {\n\ttests := []struct {\n\t\tkey string\n\t\tval uint8\n\t}{\n\t\t{\"k1\", uint8(0)},\n\t\t{\"k2\", uint8(0xFF)},\n\t}\n\n\tp := params{}\n\tfor _, tt := range tests {\n\t\tp.SetUint8(tt.key, tt.val)\n\t\tassert.Equal(t, tt.val, p.GetUint8(tt.key))\n\t}\n}\n\nfunc TestParamsUint32(t *testing.T) {\n\ttests := []struct {\n\t\tkey string\n\t\tval uint32\n\t}{\n\t\t{\"k1\", uint32(0)},\n\t\t{\"k2\", uint32(0xFFFFFFFF)},\n\t}\n\n\tp := params{}\n\tfor _, tt := range tests {\n\t\tp.SetUint32(tt.key, tt.val)\n\t\tassert.Equal(t, tt.val, p.GetUint32(tt.key))\n\t}\n}\n\nfunc TestParamsUint64(t *testing.T) {\n\ttests := []struct {\n\t\tkey string\n\t\tval uint64\n\t}{\n\t\t{\"k1\", uint64(0)},\n\t\t{\"k2\", uint64(0xFFFFFFFFFFFFFFFF)},\n\t}\n\n\tp := params{}\n\tfor _, tt := range tests {\n\t\tp.SetUint64(tt.key, tt.val)\n\t\tassert.Equal(t, tt.val, p.GetUint64(tt.key))\n\t}\n}\n\nfunc TestParamsBytes(t *testing.T) {\n\ttests := []struct {\n\t\tkey    string\n\t\tval    []byte\n\t\tbase64 string\n\t}{\n\t\t{\"k1\", []byte{0, 0}, \"AAA=\"},\n\t\t{\"k2\", []byte{0xff, 0xff}, \"//8=\"},\n\t\t{\"k2\", []byte{}, \"\"},\n\t}\n\n\tp := params{}\n\tfor _, tt := range tests {\n\t\tp.SetBytes(tt.key, tt.val)\n\t\tassert.Equal(t, tt.val, p.GetBytes(tt.key))\n\t\tassert.Equal(t, tt.base64, p.GetString(tt.key))\n\t}\n}\n\nfunc TestParamsString(t *testing.T) {\n\ttests := []struct {\n\t\tkey string\n\t\tval string\n\t}{\n\t\t{\"k1\", \"foo\"},\n\t\t{\"k2\", \"bar\"},\n\t\t{\"k3\", \"\"},\n\t}\n\n\tp := params{}\n\tfor _, tt := range tests {\n\t\tp.SetString(tt.key, tt.val)\n\t\tassert.Equal(t, tt.val, p.GetString(tt.key))\n\t}\n}\n"
  },
  {
    "path": "wallet/errors.go",
    "content": "package wallet\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// ErrInvalidAddressType describes an error in which the address type is invalid.\n\tErrInvalidAddressType = errors.New(\"invalid address type\")\n\n\t// ErrAddressExists describes an error in which the address already exist\n\t// in wallet.\n\tErrAddressExists = errors.New(\"address already exists\")\n\n\t// ErrTransactionExists indicates the transaction already exists in the wallet.\n\tErrTransactionExists = errors.New(\"transaction already exists\")\n)\n\n// ExitsError describes an error in which a wallet exists in the\n// given path.\ntype ExitsError struct {\n\tPath string\n}\n\nfunc (e ExitsError) Error() string {\n\treturn fmt.Sprintf(\"a wallet exists at: %s\", e.Path)\n}\n"
  },
  {
    "path": "wallet/manager/config.go",
    "content": "package manager\n\nimport (\n\t\"github.com/pactus-project/pactus/genesis\"\n)\n\n// Config defines parameters for the wallet module.\ntype Config struct {\n\tLockMode bool `toml:\"lock_mode\"`\n\n\t// private config\n\tChainType  genesis.ChainType `toml:\"-\"`\n\tWalletsDir string            `toml:\"-\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tLockMode: true,\n\t}\n}\n\nfunc (*Config) BasicCheck() error {\n\treturn nil\n}\n"
  },
  {
    "path": "wallet/manager/config_test.go",
    "content": "package manager\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestConfig(t *testing.T) {\n\tconf := DefaultConfig()\n\n\tassert.True(t, conf.LockMode)\n\trequire.NoError(t, conf.BasicCheck())\n}\n"
  },
  {
    "path": "wallet/manager/errors.go",
    "content": "package manager\n\nimport (\n\t\"errors\"\n)\n\nvar (\n\t// ErrWalletAlreadyExists indicates a wallet already exists on disk.\n\tErrWalletAlreadyExists = errors.New(\"wallet already exists\")\n\n\t// ErrWalletNotLoaded indicates a wallet is not loaded in memory.\n\tErrWalletNotLoaded = errors.New(\"wallet is not loaded\")\n)\n"
  },
  {
    "path": "wallet/manager/interface.go",
    "content": "package manager\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\n// IManager defines the public API of the wallet manager.\ntype IManager interface {\n\tStart() error\n\tStop()\n\n\tGetValidatorAddress(publicKey string) (string, error)\n\tCreateWallet(walletName, password string) (string, error)\n\tRestoreWallet(walletName, mnemonic, password string) error\n\n\tListWallets() ([]string, error)\n\tWalletInfo(walletName string) (*types.WalletInfo, error)\n\tUpdatePassword(walletName, oldPassword, newPassword string) error\n\tTotalBalance(walletName string) (amount.Amount, error)\n\tTotalStake(walletName string) (amount.Amount, error)\n\tSetDefaultFee(walletName string, fee amount.Amount) error\n\n\tSignRawTransaction(walletName, password string, rawTx []byte) (txID, data []byte, err error)\n\tSignMessage(walletName, password, addr, msg string) (string, error)\n\tPrivateKey(walletName, password, addr string) (crypto.PrivateKey, error)\n\tMnemonic(walletName, password string) (string, error)\n\n\tNewAddress(walletName string, addressType crypto.AddressType, label string,\n\t\topts ...wallet.NewAddressOption) (*types.AddressInfo, error)\n\tListAddresses(walletName string, opts ...wallet.ListAddressOption) ([]types.AddressInfo, error)\n\tAddressInfo(walletName, address string) (*types.AddressInfo, error)\n\tAddressLabel(walletName, addr string) (string, error)\n\tSetAddressLabel(walletName, addr, label string) error\n\tBalance(walletName, addr string) (amount.Amount, error)\n\tStake(walletName, addr string) (amount.Amount, error)\n\n\t// Transaction creation / signing / broadcast\n\tMakeTransferTx(walletName, sender, receiver string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error)\n\tMakeBondTx(walletName, sender, receiver, publicKey string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error)\n\tMakeUnbondTx(walletName, validator string, opts ...wallet.TxOption) (*tx.Tx, error)\n\tMakeWithdrawTx(walletName, sender, receiver string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error)\n\tSignTransaction(walletName, password string, trx *tx.Tx) error\n\tBroadcastTransaction(walletName string, trx *tx.Tx) (string, error)\n\tListTransactions(walletName string, opts ...wallet.ListTransactionsOption) ([]*types.TransactionInfo, error)\n}\n"
  },
  {
    "path": "wallet/manager/manager.go",
    "content": "package manager\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"path/filepath\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\nvar _ IManager = (*Manager)(nil)\n\ntype Manager struct {\n\tctx               context.Context\n\twallets           map[string]*wallet.Wallet\n\tchainType         genesis.ChainType\n\twalletDirectory   string\n\tDefaultWalletName string\n\tprovider          provider.IBlockchainProvider\n\teventPipe         pipeline.Pipeline[any]\n}\n\nfunc NewManager(ctx context.Context, conf *Config,\n\tprovider provider.IBlockchainProvider,\n\teventPipe pipeline.Pipeline[any],\n) (IManager, error) {\n\twallets := make(map[string]*wallet.Wallet)\n\tfiles, err := util.ListFilesInDir(conf.WalletsDir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, file := range files {\n\t\topts := []wallet.OpenWalletOption{\n\t\t\twallet.WithBlockchainProvider(provider),\n\t\t\twallet.WithEventPipe(eventPipe),\n\t\t\twallet.WithLockMode(conf.LockMode),\n\t\t}\n\t\twlt, err := wallet.Open(ctx, file, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to open wallet %s: %w\", file, err)\n\t\t}\n\n\t\twallets[filepath.Base(file)] = wlt\n\t}\n\n\treturn &Manager{\n\t\tctx:             ctx,\n\t\twallets:         wallets,\n\t\tchainType:       conf.ChainType,\n\t\twalletDirectory: conf.WalletsDir,\n\t\tprovider:        provider,\n\t\teventPipe:       eventPipe,\n\t}, nil\n}\n\nfunc (*Manager) Start() error {\n\treturn nil\n}\n\nfunc (wm *Manager) Stop() {\n\tfor _, wlt := range wm.wallets {\n\t\twlt.Close()\n\t}\n}\n\nfunc (wm *Manager) getWalletPath(walletName string) string {\n\treturn util.MakeAbs(filepath.Join(wm.walletDirectory, walletName))\n}\n\nfunc (wm *Manager) createWalletWithMnemonic(\n\twalletName, mnemonic, password string,\n) error {\n\twalletPath := wm.getWalletPath(walletName)\n\tif isExists := util.PathExists(walletPath); isExists {\n\t\treturn ErrWalletAlreadyExists\n\t}\n\n\twlt, err := wallet.Create(wm.ctx, walletPath, mnemonic, password, wm.chainType,\n\t\twallet.WithBlockchainProvider(wm.provider),\n\t\twallet.WithEventPipe(wm.eventPipe))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\twm.wallets[walletName] = wlt\n\n\treturn nil\n}\n\n// Deprecated: Move it to the utils service.\nfunc (*Manager) GetValidatorAddress(\n\tpublicKey string,\n) (string, error) {\n\tpubKey, err := bls.PublicKeyFromString(publicKey)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn pubKey.ValidatorAddress().String(), nil\n}\n\nfunc (wm *Manager) CreateWallet(\n\twalletName, password string,\n) (string, error) {\n\tmnemonic, err := wallet.GenerateMnemonic(128)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif err := wm.createWalletWithMnemonic(walletName, mnemonic, password); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn mnemonic, nil\n}\n\nfunc (wm *Manager) RestoreWallet(walletName, mnemonic, password string) error {\n\treturn wm.createWalletWithMnemonic(walletName, mnemonic, password)\n}\n\nfunc (wm *Manager) NewAddress(walletName string, addressType crypto.AddressType, label string,\n\topts ...wallet.NewAddressOption,\n) (*types.AddressInfo, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.NewAddress(addressType, label, opts...)\n}\n\nfunc (wm *Manager) PrivateKey(walletName, password, addr string) (crypto.PrivateKey, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.PrivateKey(password, addr)\n}\n\nfunc (wm *Manager) Mnemonic(walletName, password string) (string, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn \"\", ErrWalletNotLoaded\n\t}\n\n\treturn wlt.Mnemonic(password)\n}\n\nfunc (wm *Manager) AddressLabel(walletName, addr string) (string, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn \"\", ErrWalletNotLoaded\n\t}\n\n\treturn wlt.AddressLabel(addr), nil\n}\n\nfunc (wm *Manager) SetAddressLabel(walletName, addr, label string) error {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn ErrWalletNotLoaded\n\t}\n\n\treturn wlt.SetAddressLabel(addr, label)\n}\n\nfunc (wm *Manager) Balance(walletName, addr string) (amount.Amount, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn 0, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.Balance(addr)\n}\n\nfunc (wm *Manager) Stake(walletName, addr string) (amount.Amount, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn 0, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.Stake(addr)\n}\n\nfunc (wm *Manager) SetDefaultFee(walletName string, fee amount.Amount) error {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn ErrWalletNotLoaded\n\t}\n\n\treturn wlt.SetDefaultFee(fee)\n}\n\nfunc (wm *Manager) MakeTransferTx(\n\twalletName, sender, receiver string,\n\tamt amount.Amount,\n\topts ...wallet.TxOption,\n) (*tx.Tx, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.MakeTransferTx(sender, receiver, amt, opts...)\n}\n\nfunc (wm *Manager) MakeBondTx(\n\twalletName, sender, receiver, publicKey string,\n\tamt amount.Amount,\n\topts ...wallet.TxOption,\n) (*tx.Tx, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.MakeBondTx(sender, receiver, publicKey, amt, opts...)\n}\n\nfunc (wm *Manager) MakeUnbondTx(walletName, validatorAddr string, opts ...wallet.TxOption) (*tx.Tx, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.MakeUnbondTx(validatorAddr, opts...)\n}\n\nfunc (wm *Manager) MakeWithdrawTx(\n\twalletName, sender, receiver string,\n\tamt amount.Amount,\n\topts ...wallet.TxOption,\n) (*tx.Tx, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.MakeWithdrawTx(sender, receiver, amt, opts...)\n}\n\nfunc (wm *Manager) SignTransaction(walletName, password string, trx *tx.Tx) error {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn ErrWalletNotLoaded\n\t}\n\n\treturn wlt.SignTransaction(password, trx)\n}\n\nfunc (wm *Manager) BroadcastTransaction(walletName string, trx *tx.Tx) (string, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn \"\", ErrWalletNotLoaded\n\t}\n\n\treturn wlt.BroadcastTransaction(trx)\n}\n\nfunc (wm *Manager) TotalBalance(walletName string) (amount.Amount, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn 0, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.TotalBalance()\n}\n\nfunc (wm *Manager) TotalStake(walletName string) (amount.Amount, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn 0, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.TotalStake()\n}\n\nfunc (wm *Manager) SignRawTransaction(\n\twalletName, password string, rawTx []byte,\n) (txID, data []byte, err error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, nil, ErrWalletNotLoaded\n\t}\n\n\ttrx, err := tx.FromBytes(rawTx)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif err := wlt.SignTransaction(password, trx); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tdata, err = trx.Bytes()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn trx.ID().Bytes(), data, nil\n}\n\nfunc (wm *Manager) SignMessage(walletName, password, addr, msg string) (string, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn \"\", ErrWalletNotLoaded\n\t}\n\n\treturn wlt.SignMessage(password, addr, msg)\n}\n\nfunc (wm *Manager) AddressInfo(walletName, address string) (*types.AddressInfo, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.AddressInfo(address)\n}\n\nfunc (wm *Manager) WalletInfo(walletName string) (*types.WalletInfo, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.Info(), nil\n}\n\nfunc (wm *Manager) ListWallets() ([]string, error) {\n\twallets := make([]string, 0, len(wm.wallets))\n\tfor name := range wm.wallets {\n\t\twallets = append(wallets, name)\n\t}\n\n\treturn wallets, nil\n}\n\nfunc (wm *Manager) ListAddresses(walletName string, opts ...wallet.ListAddressOption) ([]types.AddressInfo, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.ListAddresses(opts...), nil\n}\n\nfunc (wm *Manager) ListTransactions(walletName string,\n\topts ...wallet.ListTransactionsOption,\n) ([]*types.TransactionInfo, error) {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn nil, ErrWalletNotLoaded\n\t}\n\n\treturn wlt.ListTransactions(opts...), nil\n}\n\nfunc (wm *Manager) UpdatePassword(walletName, oldPassword, newPassword string) error {\n\twlt, ok := wm.wallets[walletName]\n\tif !ok {\n\t\treturn ErrWalletNotLoaded\n\t}\n\n\treturn wlt.UpdatePassword(oldPassword, newPassword)\n}\n"
  },
  {
    "path": "wallet/manager/manager_mock.go",
    "content": "// Code generated by MockGen. DO NOT EDIT.\n// Source: wallet/manager/interface.go\n//\n// Generated by this command:\n//\n//\tmockgen -source=wallet/manager/interface.go -destination=wallet/manager/manager_mock.go -package=manager\n//\n\n// Package manager is a generated GoMock package.\npackage manager\n\nimport (\n\treflect \"reflect\"\n\n\tcrypto \"github.com/pactus-project/pactus/crypto\"\n\tamount \"github.com/pactus-project/pactus/types/amount\"\n\ttx \"github.com/pactus-project/pactus/types/tx\"\n\twallet \"github.com/pactus-project/pactus/wallet\"\n\ttypes \"github.com/pactus-project/pactus/wallet/types\"\n\tgomock \"go.uber.org/mock/gomock\"\n)\n\n// MockIManager is a mock of IManager interface.\ntype MockIManager struct {\n\tctrl     *gomock.Controller\n\trecorder *MockIManagerMockRecorder\n\tisgomock struct{}\n}\n\n// MockIManagerMockRecorder is the mock recorder for MockIManager.\ntype MockIManagerMockRecorder struct {\n\tmock *MockIManager\n}\n\n// NewMockIManager creates a new mock instance.\nfunc NewMockIManager(ctrl *gomock.Controller) *MockIManager {\n\tmock := &MockIManager{ctrl: ctrl}\n\tmock.recorder = &MockIManagerMockRecorder{mock}\n\treturn mock\n}\n\n// EXPECT returns an object that allows the caller to indicate expected use.\nfunc (m *MockIManager) EXPECT() *MockIManagerMockRecorder {\n\treturn m.recorder\n}\n\n// AddressInfo mocks base method.\nfunc (m *MockIManager) AddressInfo(walletName, address string) (*types.AddressInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AddressInfo\", walletName, address)\n\tret0, _ := ret[0].(*types.AddressInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// AddressInfo indicates an expected call of AddressInfo.\nfunc (mr *MockIManagerMockRecorder) AddressInfo(walletName, address any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AddressInfo\", reflect.TypeOf((*MockIManager)(nil).AddressInfo), walletName, address)\n}\n\n// AddressLabel mocks base method.\nfunc (m *MockIManager) AddressLabel(walletName, addr string) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AddressLabel\", walletName, addr)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// AddressLabel indicates an expected call of AddressLabel.\nfunc (mr *MockIManagerMockRecorder) AddressLabel(walletName, addr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AddressLabel\", reflect.TypeOf((*MockIManager)(nil).AddressLabel), walletName, addr)\n}\n\n// Balance mocks base method.\nfunc (m *MockIManager) Balance(walletName, addr string) (amount.Amount, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Balance\", walletName, addr)\n\tret0, _ := ret[0].(amount.Amount)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// Balance indicates an expected call of Balance.\nfunc (mr *MockIManagerMockRecorder) Balance(walletName, addr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Balance\", reflect.TypeOf((*MockIManager)(nil).Balance), walletName, addr)\n}\n\n// BroadcastTransaction mocks base method.\nfunc (m *MockIManager) BroadcastTransaction(walletName string, trx *tx.Tx) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"BroadcastTransaction\", walletName, trx)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// BroadcastTransaction indicates an expected call of BroadcastTransaction.\nfunc (mr *MockIManagerMockRecorder) BroadcastTransaction(walletName, trx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"BroadcastTransaction\", reflect.TypeOf((*MockIManager)(nil).BroadcastTransaction), walletName, trx)\n}\n\n// CreateWallet mocks base method.\nfunc (m *MockIManager) CreateWallet(walletName, password string) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"CreateWallet\", walletName, password)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// CreateWallet indicates an expected call of CreateWallet.\nfunc (mr *MockIManagerMockRecorder) CreateWallet(walletName, password any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"CreateWallet\", reflect.TypeOf((*MockIManager)(nil).CreateWallet), walletName, password)\n}\n\n// GetValidatorAddress mocks base method.\nfunc (m *MockIManager) GetValidatorAddress(publicKey string) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetValidatorAddress\", publicKey)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// GetValidatorAddress indicates an expected call of GetValidatorAddress.\nfunc (mr *MockIManagerMockRecorder) GetValidatorAddress(publicKey any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetValidatorAddress\", reflect.TypeOf((*MockIManager)(nil).GetValidatorAddress), publicKey)\n}\n\n// ListAddresses mocks base method.\nfunc (m *MockIManager) ListAddresses(walletName string, opts ...wallet.ListAddressOption) ([]types.AddressInfo, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"ListAddresses\", varargs...)\n\tret0, _ := ret[0].([]types.AddressInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// ListAddresses indicates an expected call of ListAddresses.\nfunc (mr *MockIManagerMockRecorder) ListAddresses(walletName any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListAddresses\", reflect.TypeOf((*MockIManager)(nil).ListAddresses), varargs...)\n}\n\n// ListTransactions mocks base method.\nfunc (m *MockIManager) ListTransactions(walletName string, opts ...wallet.ListTransactionsOption) ([]*types.TransactionInfo, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"ListTransactions\", varargs...)\n\tret0, _ := ret[0].([]*types.TransactionInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// ListTransactions indicates an expected call of ListTransactions.\nfunc (mr *MockIManagerMockRecorder) ListTransactions(walletName any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListTransactions\", reflect.TypeOf((*MockIManager)(nil).ListTransactions), varargs...)\n}\n\n// ListWallets mocks base method.\nfunc (m *MockIManager) ListWallets() ([]string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"ListWallets\")\n\tret0, _ := ret[0].([]string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// ListWallets indicates an expected call of ListWallets.\nfunc (mr *MockIManagerMockRecorder) ListWallets() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"ListWallets\", reflect.TypeOf((*MockIManager)(nil).ListWallets))\n}\n\n// MakeBondTx mocks base method.\nfunc (m *MockIManager) MakeBondTx(walletName, sender, receiver, publicKey string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName, sender, receiver, publicKey, amt}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"MakeBondTx\", varargs...)\n\tret0, _ := ret[0].(*tx.Tx)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// MakeBondTx indicates an expected call of MakeBondTx.\nfunc (mr *MockIManagerMockRecorder) MakeBondTx(walletName, sender, receiver, publicKey, amt any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName, sender, receiver, publicKey, amt}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"MakeBondTx\", reflect.TypeOf((*MockIManager)(nil).MakeBondTx), varargs...)\n}\n\n// MakeTransferTx mocks base method.\nfunc (m *MockIManager) MakeTransferTx(walletName, sender, receiver string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName, sender, receiver, amt}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"MakeTransferTx\", varargs...)\n\tret0, _ := ret[0].(*tx.Tx)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// MakeTransferTx indicates an expected call of MakeTransferTx.\nfunc (mr *MockIManagerMockRecorder) MakeTransferTx(walletName, sender, receiver, amt any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName, sender, receiver, amt}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"MakeTransferTx\", reflect.TypeOf((*MockIManager)(nil).MakeTransferTx), varargs...)\n}\n\n// MakeUnbondTx mocks base method.\nfunc (m *MockIManager) MakeUnbondTx(walletName, validator string, opts ...wallet.TxOption) (*tx.Tx, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName, validator}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"MakeUnbondTx\", varargs...)\n\tret0, _ := ret[0].(*tx.Tx)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// MakeUnbondTx indicates an expected call of MakeUnbondTx.\nfunc (mr *MockIManagerMockRecorder) MakeUnbondTx(walletName, validator any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName, validator}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"MakeUnbondTx\", reflect.TypeOf((*MockIManager)(nil).MakeUnbondTx), varargs...)\n}\n\n// MakeWithdrawTx mocks base method.\nfunc (m *MockIManager) MakeWithdrawTx(walletName, sender, receiver string, amt amount.Amount, opts ...wallet.TxOption) (*tx.Tx, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName, sender, receiver, amt}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"MakeWithdrawTx\", varargs...)\n\tret0, _ := ret[0].(*tx.Tx)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// MakeWithdrawTx indicates an expected call of MakeWithdrawTx.\nfunc (mr *MockIManagerMockRecorder) MakeWithdrawTx(walletName, sender, receiver, amt any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName, sender, receiver, amt}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"MakeWithdrawTx\", reflect.TypeOf((*MockIManager)(nil).MakeWithdrawTx), varargs...)\n}\n\n// Mnemonic mocks base method.\nfunc (m *MockIManager) Mnemonic(walletName, password string) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Mnemonic\", walletName, password)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// Mnemonic indicates an expected call of Mnemonic.\nfunc (mr *MockIManagerMockRecorder) Mnemonic(walletName, password any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Mnemonic\", reflect.TypeOf((*MockIManager)(nil).Mnemonic), walletName, password)\n}\n\n// NewAddress mocks base method.\nfunc (m *MockIManager) NewAddress(walletName string, addressType crypto.AddressType, label string, opts ...wallet.NewAddressOption) (*types.AddressInfo, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []any{walletName, addressType, label}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"NewAddress\", varargs...)\n\tret0, _ := ret[0].(*types.AddressInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// NewAddress indicates an expected call of NewAddress.\nfunc (mr *MockIManagerMockRecorder) NewAddress(walletName, addressType, label any, opts ...any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\tvarargs := append([]any{walletName, addressType, label}, opts...)\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"NewAddress\", reflect.TypeOf((*MockIManager)(nil).NewAddress), varargs...)\n}\n\n// PrivateKey mocks base method.\nfunc (m *MockIManager) PrivateKey(walletName, password, addr string) (crypto.PrivateKey, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"PrivateKey\", walletName, password, addr)\n\tret0, _ := ret[0].(crypto.PrivateKey)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// PrivateKey indicates an expected call of PrivateKey.\nfunc (mr *MockIManagerMockRecorder) PrivateKey(walletName, password, addr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"PrivateKey\", reflect.TypeOf((*MockIManager)(nil).PrivateKey), walletName, password, addr)\n}\n\n// RestoreWallet mocks base method.\nfunc (m *MockIManager) RestoreWallet(walletName, mnemonic, password string) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"RestoreWallet\", walletName, mnemonic, password)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// RestoreWallet indicates an expected call of RestoreWallet.\nfunc (mr *MockIManagerMockRecorder) RestoreWallet(walletName, mnemonic, password any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"RestoreWallet\", reflect.TypeOf((*MockIManager)(nil).RestoreWallet), walletName, mnemonic, password)\n}\n\n// SetAddressLabel mocks base method.\nfunc (m *MockIManager) SetAddressLabel(walletName, addr, label string) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SetAddressLabel\", walletName, addr, label)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// SetAddressLabel indicates an expected call of SetAddressLabel.\nfunc (mr *MockIManagerMockRecorder) SetAddressLabel(walletName, addr, label any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SetAddressLabel\", reflect.TypeOf((*MockIManager)(nil).SetAddressLabel), walletName, addr, label)\n}\n\n// SetDefaultFee mocks base method.\nfunc (m *MockIManager) SetDefaultFee(walletName string, fee amount.Amount) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SetDefaultFee\", walletName, fee)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// SetDefaultFee indicates an expected call of SetDefaultFee.\nfunc (mr *MockIManagerMockRecorder) SetDefaultFee(walletName, fee any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SetDefaultFee\", reflect.TypeOf((*MockIManager)(nil).SetDefaultFee), walletName, fee)\n}\n\n// SignMessage mocks base method.\nfunc (m *MockIManager) SignMessage(walletName, password, addr, msg string) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SignMessage\", walletName, password, addr, msg)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// SignMessage indicates an expected call of SignMessage.\nfunc (mr *MockIManagerMockRecorder) SignMessage(walletName, password, addr, msg any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SignMessage\", reflect.TypeOf((*MockIManager)(nil).SignMessage), walletName, password, addr, msg)\n}\n\n// SignRawTransaction mocks base method.\nfunc (m *MockIManager) SignRawTransaction(walletName, password string, rawTx []byte) ([]byte, []byte, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SignRawTransaction\", walletName, password, rawTx)\n\tret0, _ := ret[0].([]byte)\n\tret1, _ := ret[1].([]byte)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}\n\n// SignRawTransaction indicates an expected call of SignRawTransaction.\nfunc (mr *MockIManagerMockRecorder) SignRawTransaction(walletName, password, rawTx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SignRawTransaction\", reflect.TypeOf((*MockIManager)(nil).SignRawTransaction), walletName, password, rawTx)\n}\n\n// SignTransaction mocks base method.\nfunc (m *MockIManager) SignTransaction(walletName, password string, trx *tx.Tx) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SignTransaction\", walletName, password, trx)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// SignTransaction indicates an expected call of SignTransaction.\nfunc (mr *MockIManagerMockRecorder) SignTransaction(walletName, password, trx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SignTransaction\", reflect.TypeOf((*MockIManager)(nil).SignTransaction), walletName, password, trx)\n}\n\n// Stake mocks base method.\nfunc (m *MockIManager) Stake(walletName, addr string) (amount.Amount, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Stake\", walletName, addr)\n\tret0, _ := ret[0].(amount.Amount)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// Stake indicates an expected call of Stake.\nfunc (mr *MockIManagerMockRecorder) Stake(walletName, addr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Stake\", reflect.TypeOf((*MockIManager)(nil).Stake), walletName, addr)\n}\n\n// Start mocks base method.\nfunc (m *MockIManager) Start() error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Start\")\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// Start indicates an expected call of Start.\nfunc (mr *MockIManagerMockRecorder) Start() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Start\", reflect.TypeOf((*MockIManager)(nil).Start))\n}\n\n// Stop mocks base method.\nfunc (m *MockIManager) Stop() {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Stop\")\n}\n\n// Stop indicates an expected call of Stop.\nfunc (mr *MockIManagerMockRecorder) Stop() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Stop\", reflect.TypeOf((*MockIManager)(nil).Stop))\n}\n\n// TotalBalance mocks base method.\nfunc (m *MockIManager) TotalBalance(walletName string) (amount.Amount, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"TotalBalance\", walletName)\n\tret0, _ := ret[0].(amount.Amount)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// TotalBalance indicates an expected call of TotalBalance.\nfunc (mr *MockIManagerMockRecorder) TotalBalance(walletName any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"TotalBalance\", reflect.TypeOf((*MockIManager)(nil).TotalBalance), walletName)\n}\n\n// TotalStake mocks base method.\nfunc (m *MockIManager) TotalStake(walletName string) (amount.Amount, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"TotalStake\", walletName)\n\tret0, _ := ret[0].(amount.Amount)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// TotalStake indicates an expected call of TotalStake.\nfunc (mr *MockIManagerMockRecorder) TotalStake(walletName any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"TotalStake\", reflect.TypeOf((*MockIManager)(nil).TotalStake), walletName)\n}\n\n// UpdatePassword mocks base method.\nfunc (m *MockIManager) UpdatePassword(walletName, oldPassword, newPassword string) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"UpdatePassword\", walletName, oldPassword, newPassword)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// UpdatePassword indicates an expected call of UpdatePassword.\nfunc (mr *MockIManagerMockRecorder) UpdatePassword(walletName, oldPassword, newPassword any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"UpdatePassword\", reflect.TypeOf((*MockIManager)(nil).UpdatePassword), walletName, oldPassword, newPassword)\n}\n\n// WalletInfo mocks base method.\nfunc (m *MockIManager) WalletInfo(walletName string) (*types.WalletInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"WalletInfo\", walletName)\n\tret0, _ := ret[0].(*types.WalletInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// WalletInfo indicates an expected call of WalletInfo.\nfunc (mr *MockIManagerMockRecorder) WalletInfo(walletName any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"WalletInfo\", reflect.TypeOf((*MockIManager)(nil).WalletInfo), walletName)\n}\n"
  },
  {
    "path": "wallet/manager/manager_test.go",
    "content": "package manager_test\n"
  },
  {
    "path": "wallet/provider/interface.go",
    "content": "package provider\n\nimport (\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n)\n\ntype IBlockchainProvider interface {\n\tLastBlockHeight() (types.Height, error)\n\tGetAccount(addrStr string) (*account.Account, error)\n\tGetValidator(addrStr string) (*validator.Validator, error)\n\tGetTransaction(txID string) (*tx.Tx, types.Height, error)\n\tCheckTransaction(data []byte) error\n\n\tSendTx(trx *tx.Tx) (string, error)\n\n\tClose() error\n}\n"
  },
  {
    "path": "wallet/provider/local/local.go",
    "content": "package local\n\nimport (\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n)\n\nvar _ provider.IBlockchainProvider = (*LocalBlockchainProvider)(nil)\n\ntype LocalBlockchainProvider struct {\n\tstate state.Facade\n}\n\nfunc NewLocalBlockchainProvider(state state.Facade) *LocalBlockchainProvider {\n\treturn &LocalBlockchainProvider{\n\t\tstate: state,\n\t}\n}\n\nfunc (p *LocalBlockchainProvider) LastBlockHeight() (types.Height, error) {\n\treturn p.state.LastBlockHeight(), nil\n}\n\nfunc (p *LocalBlockchainProvider) GetAccount(addrStr string) (*account.Account, error) {\n\taddr, err := crypto.AddressFromString(addrStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn p.state.AccountByAddress(addr)\n}\n\nfunc (p *LocalBlockchainProvider) GetValidator(addrStr string) (*validator.Validator, error) {\n\taddr, err := crypto.AddressFromString(addrStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn p.state.ValidatorByAddress(addr)\n}\n\nfunc (p *LocalBlockchainProvider) GetTransaction(txID string) (*tx.Tx, types.Height, error) {\n\tidHash, err := hash.FromString(txID)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tcTrx, err := p.state.CommittedTx(idHash)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\ttrx, err := cTrx.ToTx()\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\treturn trx, cTrx.Height, nil\n}\n\nfunc (p *LocalBlockchainProvider) SendTx(trx *tx.Tx) (string, error) {\n\tif err := p.state.AddPendingTxAndBroadcast(trx); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn trx.ID().String(), nil\n}\n\nfunc (*LocalBlockchainProvider) Close() error {\n\treturn nil\n}\n\nfunc (p *LocalBlockchainProvider) CheckTransaction(data []byte) error {\n\ttrx, err := tx.FromBytes(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn p.state.CheckTransaction(trx)\n}\n"
  },
  {
    "path": "wallet/provider/offline/offline.go",
    "content": "package offline\n\nimport (\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n)\n\nvar _ provider.IBlockchainProvider = (*OfflineBlockchainProvider)(nil)\n\n// ErrOffline describes an error in which the wallet is offline.\nvar ErrOffline = errors.New(\"wallet is in offline mode\")\n\ntype OfflineBlockchainProvider struct{}\n\nfunc NewOfflineBlockchainProvider() *OfflineBlockchainProvider {\n\treturn &OfflineBlockchainProvider{}\n}\n\nfunc (*OfflineBlockchainProvider) LastBlockHeight() (types.Height, error) {\n\treturn 0, ErrOffline\n}\n\nfunc (*OfflineBlockchainProvider) GetAccount(string) (*account.Account, error) {\n\treturn nil, ErrOffline\n}\n\nfunc (*OfflineBlockchainProvider) GetValidator(string) (*validator.Validator, error) {\n\treturn nil, ErrOffline\n}\n\nfunc (*OfflineBlockchainProvider) GetTransaction(string) (*tx.Tx, types.Height, error) {\n\treturn nil, 0, ErrOffline\n}\n\nfunc (*OfflineBlockchainProvider) SendTx(*tx.Tx) (string, error) {\n\treturn \"\", ErrOffline\n}\n\nfunc (*OfflineBlockchainProvider) Close() error {\n\treturn nil\n}\n\nfunc (*OfflineBlockchainProvider) CheckTransaction([]byte) error {\n\treturn ErrOffline\n}\n"
  },
  {
    "path": "wallet/provider/provider_mock.go",
    "content": "// Code generated by MockGen. DO NOT EDIT.\n// Source: wallet/provider/interface.go\n//\n// Generated by this command:\n//\n//\tmockgen -source=wallet/provider/interface.go -destination=wallet/provider/provider_mock.go -package=provider\n//\n\n// Package provider is a generated GoMock package.\npackage provider\n\nimport (\n\treflect \"reflect\"\n\n\ttypes \"github.com/pactus-project/pactus/types\"\n\taccount \"github.com/pactus-project/pactus/types/account\"\n\ttx \"github.com/pactus-project/pactus/types/tx\"\n\tvalidator \"github.com/pactus-project/pactus/types/validator\"\n\tgomock \"go.uber.org/mock/gomock\"\n)\n\n// MockIBlockchainProvider is a mock of IBlockchainProvider interface.\ntype MockIBlockchainProvider struct {\n\tctrl     *gomock.Controller\n\trecorder *MockIBlockchainProviderMockRecorder\n\tisgomock struct{}\n}\n\n// MockIBlockchainProviderMockRecorder is the mock recorder for MockIBlockchainProvider.\ntype MockIBlockchainProviderMockRecorder struct {\n\tmock *MockIBlockchainProvider\n}\n\n// NewMockIBlockchainProvider creates a new mock instance.\nfunc NewMockIBlockchainProvider(ctrl *gomock.Controller) *MockIBlockchainProvider {\n\tmock := &MockIBlockchainProvider{ctrl: ctrl}\n\tmock.recorder = &MockIBlockchainProviderMockRecorder{mock}\n\treturn mock\n}\n\n// EXPECT returns an object that allows the caller to indicate expected use.\nfunc (m *MockIBlockchainProvider) EXPECT() *MockIBlockchainProviderMockRecorder {\n\treturn m.recorder\n}\n\n// CheckTransaction mocks base method.\nfunc (m *MockIBlockchainProvider) CheckTransaction(data []byte) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"CheckTransaction\", data)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// CheckTransaction indicates an expected call of CheckTransaction.\nfunc (mr *MockIBlockchainProviderMockRecorder) CheckTransaction(data any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"CheckTransaction\", reflect.TypeOf((*MockIBlockchainProvider)(nil).CheckTransaction), data)\n}\n\n// Close mocks base method.\nfunc (m *MockIBlockchainProvider) Close() error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Close\")\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// Close indicates an expected call of Close.\nfunc (mr *MockIBlockchainProviderMockRecorder) Close() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Close\", reflect.TypeOf((*MockIBlockchainProvider)(nil).Close))\n}\n\n// GetAccount mocks base method.\nfunc (m *MockIBlockchainProvider) GetAccount(addrStr string) (*account.Account, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetAccount\", addrStr)\n\tret0, _ := ret[0].(*account.Account)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// GetAccount indicates an expected call of GetAccount.\nfunc (mr *MockIBlockchainProviderMockRecorder) GetAccount(addrStr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetAccount\", reflect.TypeOf((*MockIBlockchainProvider)(nil).GetAccount), addrStr)\n}\n\n// GetTransaction mocks base method.\nfunc (m *MockIBlockchainProvider) GetTransaction(txID string) (*tx.Tx, types.Height, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetTransaction\", txID)\n\tret0, _ := ret[0].(*tx.Tx)\n\tret1, _ := ret[1].(types.Height)\n\tret2, _ := ret[2].(error)\n\treturn ret0, ret1, ret2\n}\n\n// GetTransaction indicates an expected call of GetTransaction.\nfunc (mr *MockIBlockchainProviderMockRecorder) GetTransaction(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetTransaction\", reflect.TypeOf((*MockIBlockchainProvider)(nil).GetTransaction), txID)\n}\n\n// GetValidator mocks base method.\nfunc (m *MockIBlockchainProvider) GetValidator(addrStr string) (*validator.Validator, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetValidator\", addrStr)\n\tret0, _ := ret[0].(*validator.Validator)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// GetValidator indicates an expected call of GetValidator.\nfunc (mr *MockIBlockchainProviderMockRecorder) GetValidator(addrStr any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetValidator\", reflect.TypeOf((*MockIBlockchainProvider)(nil).GetValidator), addrStr)\n}\n\n// LastBlockHeight mocks base method.\nfunc (m *MockIBlockchainProvider) LastBlockHeight() (types.Height, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"LastBlockHeight\")\n\tret0, _ := ret[0].(types.Height)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// LastBlockHeight indicates an expected call of LastBlockHeight.\nfunc (mr *MockIBlockchainProviderMockRecorder) LastBlockHeight() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"LastBlockHeight\", reflect.TypeOf((*MockIBlockchainProvider)(nil).LastBlockHeight))\n}\n\n// SendTx mocks base method.\nfunc (m *MockIBlockchainProvider) SendTx(trx *tx.Tx) (string, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SendTx\", trx)\n\tret0, _ := ret[0].(string)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// SendTx indicates an expected call of SendTx.\nfunc (mr *MockIBlockchainProviderMockRecorder) SendTx(trx any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SendTx\", reflect.TypeOf((*MockIBlockchainProvider)(nil).SendTx), trx)\n}\n"
  },
  {
    "path": "wallet/provider/remote/errors.go",
    "content": "package remote\n\nimport \"errors\"\n\n// ErrInvalidNetwork describes an error in which the network is invalid.\nvar ErrInvalidNetwork = errors.New(\"invalid network\")\n"
  },
  {
    "path": "wallet/provider/remote/remote.go",
    "content": "package remote\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\nvar _ provider.IBlockchainProvider = (*RemoteBlockchainProvider)(nil)\n\ntype remoteProviderConfig struct {\n\ttimeout time.Duration\n\tservers []string\n}\n\nvar defaultOpenWalletConfig = remoteProviderConfig{\n\ttimeout: 5 * time.Second,\n\tservers: nil,\n}\n\ntype RemoteProviderOption func(*remoteProviderConfig)\n\nfunc WithTimeout(timeout time.Duration) RemoteProviderOption {\n\treturn func(cfg *remoteProviderConfig) {\n\t\tcfg.timeout = timeout\n\t}\n}\n\nfunc WithCustomServers(servers []string) RemoteProviderOption {\n\treturn func(cfg *remoteProviderConfig) {\n\t\tcfg.servers = servers\n\t}\n}\n\n// RemoteBlockchainProvider is a blockchain provider that connects to a remote gRPC server.\n// It randomly selects a server from a predefined list.\ntype RemoteBlockchainProvider struct {\n\tctx               context.Context\n\tservers           []string\n\tconn              *grpc.ClientConn\n\ttimeout           time.Duration\n\tblockchainClient  pactus.BlockchainClient\n\ttransactionClient pactus.TransactionClient\n}\n\nfunc NewRemoteBlockchainProvider(ctx context.Context, network genesis.ChainType,\n\topts ...RemoteProviderOption,\n) (*RemoteBlockchainProvider, error) {\n\tcfg := defaultOpenWalletConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tif cfg.servers == nil {\n\t\tvar servers []string\n\n\t\tserversData := map[string][]ServerInfo{}\n\t\terr := json.Unmarshal(serversJSON, &serversData)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch network {\n\t\tcase genesis.Mainnet:\n\t\t\tfor _, srv := range serversData[\"mainnet\"] {\n\t\t\t\tservers = append(servers, srv.Address)\n\t\t\t}\n\n\t\tcase genesis.Testnet:\n\t\t\tfor _, srv := range serversData[\"testnet\"] {\n\t\t\t\tservers = append(servers, srv.Address)\n\t\t\t}\n\n\t\tcase genesis.Localnet:\n\t\t\tservers = []string{\"localhost:50052\"}\n\n\t\tdefault:\n\t\t\treturn nil, ErrInvalidNetwork\n\t\t}\n\n\t\tutil.Shuffle(servers)\n\n\t\tcfg.servers = servers\n\t}\n\n\treturn &RemoteBlockchainProvider{\n\t\tctx:     ctx,\n\t\tservers: cfg.servers,\n\t\ttimeout: cfg.timeout,\n\t}, nil\n}\n\nfunc (p *RemoteBlockchainProvider) connect() error {\n\tif p.conn != nil {\n\t\treturn nil\n\t}\n\n\tfor _, server := range p.servers {\n\t\tconn, err := grpc.NewClient(server,\n\t\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t\t\tgrpc.WithContextDialer(func(ctx context.Context, address string) (net.Conn, error) {\n\t\t\t\treturn util.NetworkDialTimeout(ctx, \"tcp\", address, p.timeout)\n\t\t\t}))\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tblockchainClient := pactus.NewBlockchainClient(conn)\n\t\ttransactionClient := pactus.NewTransactionClient(conn)\n\n\t\t// Check if client is responding\n\t\t// TODO: Use Ping API in version 1.11.0\n\t\t_, err = blockchainClient.GetBlockchainInfo(p.ctx,\n\t\t\t&pactus.GetBlockchainInfoRequest{})\n\t\tif err != nil {\n\t\t\t_ = conn.Close()\n\n\t\t\tcontinue\n\t\t}\n\n\t\tp.conn = conn\n\t\tp.blockchainClient = blockchainClient\n\t\tp.transactionClient = transactionClient\n\n\t\treturn nil\n\t}\n\n\treturn errors.New(\"unable to connect to the servers\")\n}\n\nfunc (p *RemoteBlockchainProvider) Close() error {\n\tif p.conn != nil {\n\t\treturn p.conn.Close()\n\t}\n\n\treturn nil\n}\n\nfunc (p *RemoteBlockchainProvider) LastBlockHeight() (types.Height, error) {\n\tif err := p.connect(); err != nil {\n\t\treturn 0, err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\tres, err := p.blockchainClient.GetBlockchainInfo(ctx,\n\t\t&pactus.GetBlockchainInfoRequest{})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn types.Height(res.LastBlockHeight), nil\n}\n\nfunc (p *RemoteBlockchainProvider) GetAccount(addrStr string) (*account.Account, error) {\n\tif err := p.connect(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\tres, err := p.blockchainClient.GetAccount(ctx,\n\t\t&pactus.GetAccountRequest{Address: addrStr})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdata, err := hex.DecodeString(res.Account.Data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn account.FromBytes(data)\n}\n\nfunc (p *RemoteBlockchainProvider) GetValidator(addrStr string) (*validator.Validator, error) {\n\tif err := p.connect(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\tres, err := p.blockchainClient.GetValidator(ctx,\n\t\t&pactus.GetValidatorRequest{Address: addrStr})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdata, err := hex.DecodeString(res.Validator.Data)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn validator.FromBytes(data)\n}\n\nfunc (p *RemoteBlockchainProvider) SendTx(trx *tx.Tx) (string, error) {\n\tif err := p.connect(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tdata, err := trx.Bytes()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\tres, err := p.transactionClient.BroadcastTransaction(ctx,\n\t\t&pactus.BroadcastTransactionRequest{SignedRawTransaction: hex.EncodeToString(data)})\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn res.Id, nil\n}\n\nfunc (p *RemoteBlockchainProvider) GetTransaction(txID string) (*tx.Tx, types.Height, error) {\n\tif err := p.connect(); err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\tres, err := p.transactionClient.GetTransaction(ctx,\n\t\t&pactus.GetTransactionRequest{\n\t\t\tId:        txID,\n\t\t\tVerbosity: pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_DATA,\n\t\t})\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\tdata, err := hex.DecodeString(res.Transaction.Data)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\ttx, err := tx.FromBytes(data)\n\tif err != nil {\n\t\treturn nil, 0, err\n\t}\n\n\treturn tx, types.Height(res.BlockHeight), nil\n}\n\nfunc (p *RemoteBlockchainProvider) CheckTransaction(data []byte) error {\n\tif err := p.connect(); err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := context.WithTimeout(p.ctx, p.timeout)\n\tdefer cancel()\n\n\t_, err := p.transactionClient.CheckTransaction(ctx,\n\t\t&pactus.CheckTransactionRequest{RawTransaction: hex.EncodeToString(data)})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "wallet/provider/remote/servers.go",
    "content": "package remote\n\nimport _ \"embed\"\n\n//go:embed servers.json\nvar serversJSON []byte\n\ntype ServerInfo struct {\n\tName    string `json:\"name\"`\n\tEmail   string `json:\"email\"`\n\tWebsite string `json:\"website\"`\n\tAddress string `json:\"address\"`\n}\n"
  },
  {
    "path": "wallet/provider/remote/servers.json",
    "content": "{\n    \"mainnet\": [\n        {\n            \"name\": \"Pactus Bootstrap 1\",\n            \"email\": \"info@pactus.org\",\n            \"website\": \"https://pactus.org\",\n            \"address\": \"bootstrap1.pactus.org:50051\"\n        },\n        {\n            \"name\": \"Pactus Bootstrap 2\",\n            \"email\": \"info@pactus.org\",\n            \"website\": \"https://pactus.org\",\n            \"address\": \"bootstrap2.pactus.org:50051\"\n        },\n        {\n            \"name\": \"Pactus Bootstrap 3\",\n            \"email\": \"info@pactus.org\",\n            \"website\": \"https://pactus.org\",\n            \"address\": \"bootstrap3.pactus.org:50051\"\n        },\n        {\n            \"name\": \"Pactus Bootstrap 4\",\n            \"email\": \"info@pactus.org\",\n            \"website\": \"https://pactus.org\",\n            \"address\": \"bootstrap4.pactus.org:50051\"\n        }\n    ],\n    \"testnet\": [\n        {\n            \"address\": \"localhost:50052\"\n        },\n        {\n            \"address\": \"testnet1.pactus.org:50052\"\n        },\n        {\n            \"address\": \"testnet2.pactus.org:50052\"\n        },\n        {\n            \"address\": \"testnet3.pactus.org:50052\"\n        },\n        {\n            \"address\": \"testnet4.pactus.org:50052\"\n        }\n    ]\n}\n"
  },
  {
    "path": "wallet/storage/errors.go",
    "content": "package storage\n\nimport \"errors\"\n\nvar (\n\t// ErrNotFound indicates that a requested resource was not found.\n\tErrNotFound = errors.New(\"resource not found\")\n\n\t// ErrDuplicateEntry indicates that a duplicate entry was attempted to be inserted.\n\tErrDuplicateEntry = errors.New(\"duplicate entry\")\n\n\t// ErrInvalidInput indicates that the input provided is invalid.\n\tErrInvalidInput = errors.New(\"invalid input\")\n)\n"
  },
  {
    "path": "wallet/storage/interface.go",
    "content": "package storage\n\nimport (\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n)\n\n// QueryParams specifies filters for querying stored transactions.\ntype QueryParams struct {\n\tAddress   string\n\tDirection wtypes.TxDirection\n\tCount     int\n\tSkip      int\n}\n\ntype IStorage interface {\n\tWalletInfo() *wtypes.WalletInfo\n\tVault() *vault.Vault\n\tUpdateVault(vault *vault.Vault) error\n\tSetDefaultFee(fee amount.Amount) error\n\n\tAllAddresses() []wtypes.AddressInfo\n\tAddressInfo(address string) (*wtypes.AddressInfo, error)\n\tHasAddress(address string) bool\n\tAddressCount() int\n\tInsertAddress(info *wtypes.AddressInfo) error\n\tUpdateAddress(info *wtypes.AddressInfo) error\n\n\tInsertTransaction(info *wtypes.TransactionInfo) error\n\tGetPendingTransactions() (map[string]*wtypes.TransactionInfo, error)\n\tUpdateTransactionStatus(no int64, status wtypes.TransactionStatus, blockHeight types.Height) error\n\tGetTransaction(no int64) (*wtypes.TransactionInfo, error)\n\tHasTransaction(txID string) bool\n\tQueryTransactions(params QueryParams) ([]*wtypes.TransactionInfo, error)\n\n\tClose() error\n\tClone(path string) (IStorage, error)\n\tIsLegacy() bool\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/errors.go",
    "content": "package jsonstorage\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar ErrUnsupported = errors.New(\"operation not supported\")\n\n// CRCNotMatchError describes an error in which the wallet CRC is not matched.\ntype CRCNotMatchError struct {\n\tExpected uint32\n\tGot      uint32\n}\n\nfunc (e CRCNotMatchError) Error() string {\n\treturn fmt.Sprintf(\"crc not matched, expected: %d, got: %d\", e.Expected, e.Got)\n}\n\n// UnsupportedVersionError indicates the wallet version is incompatible with the software's supported version.\ntype UnsupportedVersionError struct {\n\tWalletVersion    int\n\tSupportedVersion int\n}\n\nfunc (e UnsupportedVersionError) Error() string {\n\treturn fmt.Sprintf(\"wallet version %d is not supported, latest supported version is %d\",\n\t\te.WalletVersion, e.SupportedVersion)\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/storage.go",
    "content": "package jsonstorage\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n)\n\ntype Storage struct {\n\tpath  string\n\tstore store\n}\n\nfunc Create(path string, network genesis.ChainType, vault *vault.Vault) (*Storage, error) {\n\tstore := store{\n\t\tVersion:    VersionLatest,\n\t\tUUID:       uuid.New(),\n\t\tCreatedAt:  util.RoundNow(1),\n\t\tNetwork:    network,\n\t\tDefaultFee: amount.Amount(10_000_000),\n\t\tVault:      *vault,\n\t\tAddresses:  make(map[string]wtypes.AddressInfo),\n\t}\n\n\tif err := store.Save(path); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn Open(path)\n}\n\nfunc Open(path string) (*Storage, error) {\n\tdata, err := util.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar store store\n\tif err := json.Unmarshal(data, &store); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := store.ValidateCRC(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Storage{\n\t\tpath:  path,\n\t\tstore: store,\n\t}, nil\n}\n\nfunc (*Storage) Close() error {\n\treturn nil\n}\n\nfunc (s *Storage) save() error {\n\treturn s.store.Save(s.path)\n}\n\nfunc (s *Storage) WalletInfo() *wtypes.WalletInfo {\n\treturn &wtypes.WalletInfo{\n\t\tPath:       s.path,\n\t\tDriver:     \"JSON (legacy)\",\n\t\tVersion:    s.store.Version,\n\t\tNetwork:    s.store.Network,\n\t\tDefaultFee: s.store.DefaultFee,\n\t\tUUID:       s.store.UUID.String(),\n\t\tEncrypted:  s.store.Vault.IsEncrypted(),\n\t\tNeutered:   s.store.Vault.IsNeutered(),\n\t\tCreatedAt:  s.store.CreatedAt,\n\t}\n}\n\nfunc (s *Storage) Vault() *vault.Vault {\n\treturn &s.store.Vault\n}\n\nfunc (s *Storage) UpdateVault(vault *vault.Vault) error {\n\ts.store.Vault = *vault\n\n\treturn s.save()\n}\n\nfunc (s *Storage) SetDefaultFee(fee amount.Amount) error {\n\ts.store.DefaultFee = fee\n\n\treturn s.save()\n}\n\nfunc (s *Storage) AllAddresses() []wtypes.AddressInfo {\n\taddrs := make([]wtypes.AddressInfo, 0, len(s.store.Addresses))\n\tfor _, info := range s.store.Addresses {\n\t\taddrs = append(addrs, info)\n\t}\n\n\treturn addrs\n}\n\nfunc (s *Storage) AddressInfo(address string) (*wtypes.AddressInfo, error) {\n\tinfo, exists := s.store.Addresses[address]\n\tif !exists {\n\t\treturn nil, storage.ErrNotFound\n\t}\n\n\treturn &info, nil\n}\n\nfunc (s *Storage) InsertAddress(info *wtypes.AddressInfo) error {\n\ts.store.Addresses[info.Address] = *info\n\n\treturn s.save()\n}\n\nfunc (s *Storage) HasAddress(address string) bool {\n\t_, exists := s.store.Addresses[address]\n\n\treturn exists\n}\n\nfunc (s *Storage) AddressCount() int {\n\treturn len(s.store.Addresses)\n}\n\nfunc (s *Storage) UpdateAddress(info *wtypes.AddressInfo) error {\n\ts.store.Addresses[info.Address] = *info\n\n\treturn s.save()\n}\n\nfunc (*Storage) InsertTransaction(_ *wtypes.TransactionInfo) error {\n\treturn ErrUnsupported\n}\n\nfunc (*Storage) UpdateTransactionStatus(_ int64, _ wtypes.TransactionStatus, _ types.Height) error {\n\treturn ErrUnsupported\n}\n\nfunc (*Storage) HasTransaction(_ string) bool {\n\treturn false\n}\n\nfunc (*Storage) GetTransaction(_ int64) (*wtypes.TransactionInfo, error) {\n\treturn nil, ErrUnsupported\n}\n\nfunc (*Storage) GetPendingTransactions() (map[string]*wtypes.TransactionInfo, error) {\n\treturn nil, ErrUnsupported\n}\n\nfunc (*Storage) QueryTransactions(_ storage.QueryParams) ([]*wtypes.TransactionInfo, error) {\n\treturn nil, ErrUnsupported\n}\n\nfunc (s *Storage) Clone(path string) (storage.IStorage, error) {\n\tcloned := store{\n\t\tVersion:    s.store.Version,\n\t\tUUID:       uuid.New(),\n\t\tCreatedAt:  util.RoundNow(1),\n\t\tNetwork:    s.store.Network,\n\t\tDefaultFee: s.store.DefaultFee,\n\t\tVault:      s.store.Vault,\n\t\tAddresses:  s.store.Addresses,\n\t}\n\n\tstrg := &Storage{\n\t\tpath:  path,\n\t\tstore: cloned,\n\t}\n\n\terr := strg.save()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn strg, nil\n}\n\nfunc (*Storage) IsLegacy() bool {\n\treturn true\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/storage_test.go",
    "content": "package jsonstorage\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n//nolint:dupword // duplicated seed phrase words\nvar testMnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus\"\n\nfunc TestCreate(t *testing.T) {\n\ttempPath := util.TempFilePath()\n\n\tvlt, err := vault.CreateVaultFromMnemonic(testMnemonic, 21888)\n\trequire.NoError(t, err)\n\n\tstrg, err := Create(tempPath, genesis.Mainnet, vlt)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\tassert.Equal(t, genesis.Mainnet, strg.WalletInfo().Network)\n\tassert.Equal(t, vlt, strg.Vault())\n}\n\nfunc TestOpenNeuterWallet(t *testing.T) {\n\tdata, err := util.ReadFile(\"./testdata/neuter_wallet\")\n\trequire.NoError(t, err)\n\n\ttempPath := util.TempFilePath()\n\terr = util.WriteFile(tempPath, data)\n\trequire.NoError(t, err)\n\n\tstrg, err := Open(tempPath)\n\trequire.NoError(t, err)\n\n\tassert.False(t, strg.Vault().IsNeutered())\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/store.go",
    "content": "package jsonstorage\n\nimport (\n\t\"encoding/json\"\n\t\"hash/crc32\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n)\n\ntype store struct {\n\tVersion    int                          `json:\"version\"`\n\tUUID       uuid.UUID                    `json:\"uuid\"`\n\tCreatedAt  time.Time                    `json:\"created_at\"`\n\tNetwork    genesis.ChainType            `json:\"network\"`\n\tVaultCRC   uint32                       `json:\"crc\"`\n\tDefaultFee amount.Amount                `json:\"default_fee\"`\n\tVault      vault.Vault                  `json:\"vault\"`\n\tAddresses  map[string]types.AddressInfo `json:\"addresses\"`\n}\n\nfunc (s *store) Save(path string) error {\n\ts.VaultCRC = s.calcVaultCRC()\n\n\tdata, err := json.MarshalIndent(s, \"  \", \"  \")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn util.WriteFile(path, data)\n}\n\nfunc (s *store) ValidateCRC() error {\n\tcrc := s.calcVaultCRC()\n\tif s.VaultCRC != crc {\n\t\treturn CRCNotMatchError{\n\t\t\tExpected: crc,\n\t\t\tGot:      s.VaultCRC,\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (s *store) calcVaultCRC() uint32 {\n\td, err := json.Marshal(s.Vault)\n\tif err != nil {\n\t\treturn 0\n\t}\n\n\treturn crc32.ChecksumIEEE(d)\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/neuter_wallet",
    "content": "{\n  \"version\": 5,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 2985143697,\n  \"default_fee\": 20000000,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"encrypter\": null,\n    \"key_store\": \"\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 0,\n        \"next_validator_index\": 0\n      }\n    }\n  },\n  \"addresses\": {\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/testnet_wallet",
    "content": "{\n  \"version\": 1,\n  \"uuid\": \"a72f03c0-2f77-4401-afac-16d2ccbf129f\",\n  \"created_at\": \"2025-12-24T03:07:00Z\",\n  \"network\": 1,\n  \"crc\": 885152871,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21777,\n    \"addresses\": {\n      \"tpc1zft4nhnr3r7467kzkyay9sm7kydrs7unypgwqtw\": {\n        \"address\": \"tpc1zft4nhnr3r7467kzkyay9sm7kydrs7unypgwqtw\",\n        \"public_key\": \"tpublic1pnyyphf30dpufuqprmjjrqn2nwzxgpyz7l5awg5ld7qwq06xvfe9vd8zwtrvks9t93jsu09chatl0qqn2ecgxqjst7twl66209hj60m3x7dhs7cv5q3vzppl7h4w4yvwcg5ndqhv5djv0yewahx8ercn2ycx8zask\",\n        \"label\": \"Tesnte Address 1\",\n        \"path\": \"m/12381'/21777'/2'/0\"\n      }\n    },\n    \"encrypter\": {},\n    \"key_store\": \"{\\\"master_node\\\":{\\\"seed\\\":\\\"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus\\\"},\\\"imported_keys\\\":[]}\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      }\n    }\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/unsupported_wallet",
    "content": "{\n  \"version\": 6\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/wallet_version_1",
    "content": "{\n  \"version\": 1,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 885152871,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"addresses\": {\n      \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\": {\n        \"address\": \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Validator Address\",\n        \"path\": \"m/65535'/21888'/1'/0'\"\n      },\n      \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\": {\n        \"address\": \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported BLS Account Address\",\n        \"path\": \"m/65535'/21888'/2'/0'\"\n      },\n      \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\": {\n        \"address\": \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\",\n        \"public_key\": \"\",\n        \"label\": \"Validator Address\",\n        \"path\": \"m/12381'/21888'/1'/0\"\n      },\n      \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\": {\n        \"address\": \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\",\n        \"public_key\": \"\",\n        \"label\": \"BLS Account Address\",\n        \"path\": \"m/12381'/21888'/2'/0\"\n      }\n    },\n    \"encrypter\": {\n      \"method\": \"ARGON2ID-AES_256_CTR-MACV1\",\n      \"params\": {\n        \"iterations\": \"1\",\n        \"memory\": \"8\",\n        \"parallelism\": \"1\"\n      }\n    },\n    \"key_store\": \"/ccHYYuAAwurC8s6ZUFJAcqcwKAedRztvt6QAZ4Wj5xR5j2AwjIMutl4fYNhi4B0Pux39iQTiL5LKSl/Dh73Vn8z5M5b/juHVywYcLshki0jEzio4dakAdw3kYr1b8rTrOSLAHQhbD5RBpQNCck489LDvEzyuRfeIBTCaUj2UTDJqKUOYHFwFjUJVLqDrsTDGkm3BjzmuW5t6rUEV6PvrwH2s8dv7bFz5yHBbVovUhTJnEEK/jgH7OsojW6TH91sz8lDzyjtRGW8ZKr1sHglcfUjSOSN/OY/Pd8+Fnq2l4bMR8ZP\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      }\n    }\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/wallet_version_2",
    "content": "{\n  \"version\": 2,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 42093467,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"addresses\": {\n      \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\": {\n        \"address\": \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Validator Address\",\n        \"path\": \"m/65535'/21888'/1'/0'\"\n      },\n      \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\": {\n        \"address\": \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Reward Address\",\n        \"path\": \"m/65535'/21888'/2'/0'\"\n      },\n      \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\": {\n        \"address\": \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\",\n        \"public_key\": \"public1p3mzchmke52mghze9mlsnszvj8jueggxxa9n3va8zhpjzgys82zje93ajrhaye7flzv54g4ydhlauupr5zh4ffsem80xyflzyzkeh79prnkx9jtyxe24kvpkrtfg0f6a6rma8v6x4nsc786s4f35a8ankcueym98h\",\n        \"label\": \"Validator Address\",\n        \"path\": \"m/12381'/21888'/1'/0\"\n      },\n      \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\": {\n        \"address\": \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\",\n        \"public_key\": \"public1p5dwsgfwmacjpuhaxhy0522j87qc5390v56ndh92f7flxge7vt3zfuxlvuwpnk7tdeed4s4l2r5nj5zuyjfh0uzjmvrauf4t5xfvff5cpljvpqqpk7pzhv0hxfhf9gt5896vnllsf89ux8kc7anqlu7nxvvxcclw7\",\n        \"label\": \"BLS Account Address\",\n        \"path\": \"m/12381'/21888'/2'/0\"\n      },\n      \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\": {\n        \"address\": \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\",\n        \"public_key\": \"public1rd5p573yq3j5wkvnasslqa7ne5vw87qcj5a0wlwxcj2t2xlaca9lstzm8u5\",\n        \"label\": \"Ed25519 Account Address\",\n        \"path\": \"m/44'/21888'/3'/0'\"\n      }\n    },\n    \"encrypter\": {\n      \"method\": \"ARGON2ID-AES_256_CTR-MACV1\",\n      \"params\": {\n        \"iterations\": \"1\",\n        \"memory\": \"8\",\n        \"parallelism\": \"1\"\n      }\n    },\n    \"key_store\": \"/ccHYYuAAwurC8s6ZUFJAcqcwKAedRztvt6QAZ4Wj5xR5j2AwjIMutl4fYNhi4B0Pux39iQTiL5LKSl/Dh73Vn8z5M5b/juHVywYcLshki0jEzio4dakAdw3kYr1b8rTrOSLAHQhbD5RBpQNCck489LDvEzyuRfeIBTCaUj2UTDJqKUOYHFwFjUJVLqDrsTDGkm3BjzmuW5t6rUEV6PvrwH2s8dv7bFz5yHBbVovUhTJnEEK/jgH7OsojW6TH91sz8lDzyjtRGW8ZKr1sHglcfUjSOSN/OY/Pd8+Fnq2l4bMR8ZP\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      },\n      \"purpose_bip44\": {\n        \"next_ed25519_index\": 1\n      }\n    }\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/wallet_version_3",
    "content": "{\n  \"version\": 3,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 2777809414,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"addresses\": {\n      \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\": {\n        \"address\": \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Validator Address\",\n        \"path\": \"m/65535'/21888'/1'/0'\"\n      },\n      \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\": {\n        \"address\": \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Reward Address\",\n        \"path\": \"m/65535'/21888'/2'/0'\"\n      },\n      \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\": {\n        \"address\": \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\",\n        \"public_key\": \"public1p3mzchmke52mghze9mlsnszvj8jueggxxa9n3va8zhpjzgys82zje93ajrhaye7flzv54g4ydhlauupr5zh4ffsem80xyflzyzkeh79prnkx9jtyxe24kvpkrtfg0f6a6rma8v6x4nsc786s4f35a8ankcueym98h\",\n        \"label\": \"Validator Address\",\n        \"path\": \"m/12381'/21888'/1'/0\"\n      },\n      \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\": {\n        \"address\": \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\",\n        \"public_key\": \"public1p5dwsgfwmacjpuhaxhy0522j87qc5390v56ndh92f7flxge7vt3zfuxlvuwpnk7tdeed4s4l2r5nj5zuyjfh0uzjmvrauf4t5xfvff5cpljvpqqpk7pzhv0hxfhf9gt5896vnllsf89ux8kc7anqlu7nxvvxcclw7\",\n        \"label\": \"BLS Account Address\",\n        \"path\": \"m/12381'/21888'/2'/0\"\n      },\n      \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\": {\n        \"address\": \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\",\n        \"public_key\": \"public1rd5p573yq3j5wkvnasslqa7ne5vw87qcj5a0wlwxcj2t2xlaca9lstzm8u5\",\n        \"label\": \"Ed25519 Account Address\",\n        \"path\": \"m/44'/21888'/3'/0'\"\n      }\n    },\n    \"encrypter\": {\n      \"method\": \"ARGON2ID-AES_256_CBC-MACV1\",\n      \"params\": {\n        \"iterations\": \"1\",\n        \"keylen\": \"48\",\n        \"memory\": \"8\",\n        \"parallelism\": \"1\"\n      }\n    },\n    \"key_store\": \"ZQHdkrbVekwBYAAkXqU4m3TbgJsLVx1CkNdaYG035PEJlRIpc7yhc6VqaxMNZmCH1XpNbMQt97+DGX9ar8KqBauCMEgAUBMyeYqL2AMpXZcV5fVVtjHetfBmd6ywqH7/poGVjBoK8daXRz9X2tGB023FELUS93ZaVT29TX5S4f/LM9MoOsjjeXPT6tlSFgvCpeB7oiNZECUYwAFtfH1fbYLBpaPhENPXFWD8IHgC/Dd9tWm3wOCPkI2BnYy1aQZ9qqImcTJTpkM5pp/kvjTU4TmUDzmn6Y+EdWQqOjBphmXUdF8nkqJEKw51vmFGr8cp6TRAOw==\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      },\n      \"purpose_bip44\": {\n        \"next_ed25519_index\": 1\n      }\n    }\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/wallet_version_4",
    "content": "{\n  \"version\": 4,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 3937455804,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"default_fee\": 20000000,\n    \"addresses\": {\n      \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\": {\n        \"address\": \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Validator Address\",\n        \"path\": \"m/65535'/21888'/1'/0'\"\n      },\n      \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\": {\n        \"address\": \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\",\n        \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n        \"label\": \"Imported Reward Address\",\n        \"path\": \"m/65535'/21888'/2'/0'\"\n      },\n      \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\": {\n        \"address\": \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\",\n        \"public_key\": \"public1p3mzchmke52mghze9mlsnszvj8jueggxxa9n3va8zhpjzgys82zje93ajrhaye7flzv54g4ydhlauupr5zh4ffsem80xyflzyzkeh79prnkx9jtyxe24kvpkrtfg0f6a6rma8v6x4nsc786s4f35a8ankcueym98h\",\n        \"label\": \"Validator Address\",\n        \"path\": \"m/12381'/21888'/1'/0\"\n      },\n      \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\": {\n        \"address\": \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\",\n        \"public_key\": \"public1p5dwsgfwmacjpuhaxhy0522j87qc5390v56ndh92f7flxge7vt3zfuxlvuwpnk7tdeed4s4l2r5nj5zuyjfh0uzjmvrauf4t5xfvff5cpljvpqqpk7pzhv0hxfhf9gt5896vnllsf89ux8kc7anqlu7nxvvxcclw7\",\n        \"label\": \"BLS Account Address\",\n        \"path\": \"m/12381'/21888'/2'/0\"\n      },\n      \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\": {\n        \"address\": \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\",\n        \"public_key\": \"public1rd5p573yq3j5wkvnasslqa7ne5vw87qcj5a0wlwxcj2t2xlaca9lstzm8u5\",\n        \"label\": \"Ed25519 Account Address\",\n        \"path\": \"m/44'/21888'/3'/0'\"\n      }\n    },\n    \"encrypter\": {\n      \"method\": \"ARGON2ID-AES_256_CTR-MACV1\",\n      \"params\": {\n        \"iterations\": \"1\",\n        \"memory\": \"8\",\n        \"parallelism\": \"1\",\n        \"keylen\": \"48\"\n      }\n    },\n    \"key_store\": \"aLEdVCpZOJmZZz067JTxWivw/41sWooR+E2iM46WYjskjFTE3VviPzc9SQ6gba5g+8CWWcw1q1YT9x1XAg/QAt2Rd7zR2FKL+ACwCbmZ/H+lLPDBt3nlvOkD2qkxi2rjjLpbAtf2UjKrW2b3+/KxSJGuG5GPIqPvPonqHhSWrF1j0nnKqm+btD1gaeJ5IRLchi27BNorMR4qvETMeV7YjkvZlrEFdNffqpWee+o4+bnr33MwysXm4hZU1c4/zzMIODAyxsMRgbrfTDfdQ19c0yjYmDGAPDpAqNAvMmDL07nGKR2f\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      },\n      \"purpose_bip44\": {\n        \"next_ed25519_index\": 1\n      }\n    }\n  },\n  \"history\": {\n    \"transactions\": null,\n    \"activities\": null,\n    \"pendings\": null\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/testdata/wallet_version_5",
    "content": "{\n  \"version\": 5,\n  \"uuid\": \"44156117-268a-49f0-a906-400659b7a051\",\n  \"created_at\": \"2024-08-27T16:45:08Z\",\n  \"network\": 0,\n  \"crc\": 3937455804,\n  \"default_fee\": 20000000,\n  \"vault\": {\n    \"type\": 1,\n    \"coin_type\": 21888,\n    \"encrypter\": {\n      \"method\": \"ARGON2ID-AES_256_CTR-MACV1\",\n      \"params\": {\n        \"iterations\": \"1\",\n        \"memory\": \"8\",\n        \"parallelism\": \"1\",\n        \"keylen\": \"48\"\n      }\n    },\n    \"key_store\": \"aLEdVCpZOJmZZz067JTxWivw/41sWooR+E2iM46WYjskjFTE3VviPzc9SQ6gba5g+8CWWcw1q1YT9x1XAg/QAt2Rd7zR2FKL+ACwCbmZ/H+lLPDBt3nlvOkD2qkxi2rjjLpbAtf2UjKrW2b3+/KxSJGuG5GPIqPvPonqHhSWrF1j0nnKqm+btD1gaeJ5IRLchi27BNorMR4qvETMeV7YjkvZlrEFdNffqpWee+o4+bnr33MwysXm4hZU1c4/zzMIODAyxsMRgbrfTDfdQ19c0yjYmDGAPDpAqNAvMmDL07nGKR2f\",\n    \"purposes\": {\n      \"purpose_bls\": {\n        \"xpub_account\": \"xpublic1pqdwnqqyqsp2spqqpqqqgqgxj6mlduay8ase6hkefwa2lk2esz0gn2yu59tnk3w2tgnlfk5hleuqxpqdlt5q2f207qrwq9gasqscpckjv8hggc57n044gvml7u05cpzu8ra0zq2s3x3mak6xhtzga27tdx5pypnqxhlkf9aedptzcsd8l3q6m7ch6g4lphzsdv20fvc3dsu7mlj8kdy3n5fyllg07wecmpr8y6nsr95zlz\",\n        \"xpub_validator\": \"xpublic1pqdwnqqyqsp2spqqzqqqgqgx4n38q9n6qtvgrnx5r8atntrfnj4thwj6my5tx8tfe6ex6p89y7qqxptrfzgmnu62rut65lddgxl5nujdn82tusz5w2wqpjqpdpgplj0zx3gaaz9wv93yqcls6clepehlvhsvdp2ndwphhmag3j3hgsfxxz434hduxvqq4n8njxh4x9mnal2wma4sw5kp6y680tkut62gk6trfjscmsdumc\",\n        \"next_account_index\": 1,\n        \"next_validator_index\": 1\n      },\n      \"purpose_bip44\": {\n        \"next_ed25519_index\": 1\n      }\n    }\n  },\n  \"addresses\": {\n    \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\": {\n      \"address\": \"pc1p4xuja689hg2434yhr32clhn97x6afw58qlrcyd\",\n      \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n      \"label\": \"Imported Validator Address\",\n      \"path\": \"m/65535'/21888'/1'/0'\"\n    },\n    \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\": {\n      \"address\": \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\",\n      \"public_key\": \"public1p3wmdecume03kehtcaks95jjyem2m7pev0da2yx7t0gws66nkgp7vaah5sdd5gv0s4d34y0nqxch0cqq7fnsy9v46kum7e46gx9dua4sss7ne57m5c776h0e9dt0dw8hv24uushps9arv0zk8dc2xe0k7pgk588tf\",\n      \"label\": \"Imported Reward Address\",\n      \"path\": \"m/65535'/21888'/2'/0'\"\n    },\n    \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\": {\n      \"address\": \"pc1pjneygutecly9gtandrdt8j36v8g4fl42k4y5xp\",\n      \"public_key\": \"public1p3mzchmke52mghze9mlsnszvj8jueggxxa9n3va8zhpjzgys82zje93ajrhaye7flzv54g4ydhlauupr5zh4ffsem80xyflzyzkeh79prnkx9jtyxe24kvpkrtfg0f6a6rma8v6x4nsc786s4f35a8ankcueym98h\",\n      \"label\": \"Validator Address\",\n      \"path\": \"m/12381'/21888'/1'/0\"\n    },\n    \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\": {\n      \"address\": \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\",\n      \"public_key\": \"public1p5dwsgfwmacjpuhaxhy0522j87qc5390v56ndh92f7flxge7vt3zfuxlvuwpnk7tdeed4s4l2r5nj5zuyjfh0uzjmvrauf4t5xfvff5cpljvpqqpk7pzhv0hxfhf9gt5896vnllsf89ux8kc7anqlu7nxvvxcclw7\",\n      \"label\": \"BLS Account Address\",\n      \"path\": \"m/12381'/21888'/2'/0\"\n    },\n    \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\": {\n      \"address\": \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\",\n      \"public_key\": \"public1rd5p573yq3j5wkvnasslqa7ne5vw87qcj5a0wlwxcj2t2xlaca9lstzm8u5\",\n      \"label\": \"Ed25519 Account Address\",\n      \"path\": \"m/44'/21888'/3'/0'\"\n    }\n  }\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/upgrader.go",
    "content": "package jsonstorage\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\tblshdkeychain \"github.com/pactus-project/pactus/crypto/bls/hdkeychain\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/encrypter\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n)\n\ntype upgrader struct {\n\tpath string\n\tdata []byte\n}\n\nfunc Upgrade(path string) error {\n\tdata, err := util.ReadFile(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tu := upgrader{\n\t\tpath: path,\n\t\tdata: data,\n\t}\n\n\treturn u.upgrade()\n}\n\ntype legacyVault struct {\n\tEncrypter  encrypter.Encrypter          `json:\"encrypter\"`\n\tPurposes   vault.Purposes               `json:\"purposes\"` // Contains Purposes of the vault\n\tDefaultFee amount.Amount                `json:\"default_fee\"`\n\tAddresses  map[string]types.AddressInfo `json:\"addresses\"`\n}\n\ntype legacyStore struct {\n\tVault legacyVault `json:\"vault\"`\n}\n\nfunc (u *upgrader) upgrade() error {\n\tstore := new(store)\n\terr := json.Unmarshal(u.data, store)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tlegacyStore := new(legacyStore)\n\terr = json.Unmarshal(u.data, &legacyStore)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !store.Network.IsMainnet() {\n\t\tcrypto.ToTestnetHRP()\n\t}\n\n\tswitch store.Version {\n\tcase Version1:\n\t\tif err := u.setPublicKeys(legacyStore); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tlogger.Info(fmt.Sprintf(\"wallet upgraded from version %d to version %d\", Version1, Version2))\n\n\t\tfallthrough\n\n\tcase Version2:\n\t\tif legacyStore.Vault.Encrypter.IsEncrypted() {\n\t\t\tstore.Vault.Encrypter.Params.SetUint32(\"keylen\", 32)\n\t\t}\n\n\t\tlogger.Info(fmt.Sprintf(\"wallet upgraded from version %d to version %d\", Version2, Version3))\n\n\t\tfallthrough\n\n\tcase Version3:\n\t\tlegacyStore.Vault.DefaultFee = amount.Amount(10_000_000) // Set default fee to 0.01 PAC\n\n\t\tlogger.Info(fmt.Sprintf(\"wallet upgraded from version %d to version %d\", Version3, Version4))\n\n\t\tfallthrough\n\n\tcase Version4:\n\t\tstore.DefaultFee = legacyStore.Vault.DefaultFee\n\t\tstore.Addresses = make(map[string]types.AddressInfo)\n\t\tstore.Version = Version5\n\t\tstore.VaultCRC = store.calcVaultCRC()\n\n\t\tfor addr, ai := range legacyStore.Vault.Addresses {\n\t\t\tstore.Addresses[addr] = types.AddressInfo{\n\t\t\t\tAddress:   ai.Address,\n\t\t\t\tPublicKey: ai.PublicKey,\n\t\t\t\tLabel:     ai.Label,\n\t\t\t\tPath:      ai.Path,\n\t\t\t}\n\t\t}\n\n\t\tlogger.Info(fmt.Sprintf(\"wallet upgraded from version %d to version %d\", Version4, Version5))\n\n\t\treturn store.Save(u.path)\n\n\tcase Version5:\n\t\t// Latest version, no need to upgrade.\n\t\treturn nil\n\n\tdefault:\n\t\treturn UnsupportedVersionError{\n\t\t\tWalletVersion:    store.Version,\n\t\t\tSupportedVersion: VersionLatest,\n\t\t}\n\t}\n}\n\nfunc (*upgrader) setPublicKeys(store *legacyStore) error {\n\tfor addrKey, info := range store.Vault.Addresses {\n\t\tif info.PublicKey != \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Some old wallet doesn't have public key for all addresses.\n\t\taddr, err := crypto.AddressFromString(info.Address)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar xPub string\n\t\tif addr.IsAccountAddress() {\n\t\t\txPub = store.Vault.Purposes.PurposeBLS.XPubAccount\n\t\t} else if addr.IsValidatorAddress() {\n\t\t\txPub = store.Vault.Purposes.PurposeBLS.XPubValidator\n\t\t}\n\n\t\text, err := blshdkeychain.NewKeyFromString(xPub)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tp, err := addresspath.FromString(info.Path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\textendedKey, err := ext.Derive(p.AddressIndex())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tblsPubKey, err := bls.PublicKeyFromBytes(extendedKey.RawPublicKey())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tinfo.PublicKey = blsPubKey.String()\n\t\tstore.Vault.Addresses[addrKey] = info\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/upgrader_test.go",
    "content": "package jsonstorage\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestUnsupportedWallet(t *testing.T) {\n\terr := Upgrade(\"./testdata/unsupported_wallet\")\n\trequire.ErrorIs(t, err, UnsupportedVersionError{\n\t\tWalletVersion:    6,\n\t\tSupportedVersion: VersionLatest,\n\t})\n}\n\n// TestUpgrade ensures that old JSON wallets can be safely upgraded to the latest version.\n// Encryption parameters are intentionally reduced to speed up the test.\nfunc TestUpgrade(t *testing.T) {\n\tpassword := \"password\"\n\n\tt.Run(\"Upgrade Wallet From Version 1\", func(t *testing.T) {\n\t\t// In this upgrade, some addresses may not have a public key.\n\t\t// This test ensures that after the upgrade, all addresses have a public key.\n\t\tdata, err := util.ReadFile(\"./testdata/wallet_version_1\")\n\t\trequire.NoError(t, err)\n\n\t\ttempPath := util.TempFilePath()\n\t\terr = util.WriteFile(tempPath, data)\n\t\trequire.NoError(t, err)\n\n\t\terr = Upgrade(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tstrg, err := Open(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\n\t\tinfos := strg.AllAddresses()\n\t\tfor _, info := range infos {\n\t\t\tassert.NotEmpty(t, info.PublicKey)\n\t\t}\n\t})\n\n\tt.Run(\"Upgrade Wallet From Version 2\", func(t *testing.T) {\n\t\t// In this upgrade, the IV for AES is generated from derived bytes using the Argon2id hasher.\n\t\t// This test ensures that wallet decryption works after the upgrade.\n\t\tdata, err := util.ReadFile(\"./testdata/wallet_version_2\")\n\t\trequire.NoError(t, err)\n\n\t\ttempPath := util.TempFilePath()\n\t\terr = util.WriteFile(tempPath, data)\n\t\trequire.NoError(t, err)\n\n\t\terr = Upgrade(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tstrg, err := Open(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\t\tassert.Equal(t, \"ARGON2ID-AES_256_CTR-MACV1\", strg.Vault().Encrypter.Method)\n\t\tassert.Equal(t, uint32(32), strg.Vault().Encrypter.Params.GetUint32(\"keylen\"))\n\n\t\terr = strg.Vault().UpdatePassword(password, password)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"ARGON2ID-AES_256_CTR-MACV1\", strg.Vault().Encrypter.Method)\n\t\tassert.Equal(t, uint32(48), strg.Vault().Encrypter.Params.GetUint32(\"keylen\"))\n\t})\n\n\tt.Run(\"Upgrade Wallet From Version 3\", func(t *testing.T) {\n\t\tdata, err := util.ReadFile(\"./testdata/wallet_version_3\")\n\t\trequire.NoError(t, err)\n\n\t\ttempPath := util.TempFilePath()\n\t\terr = util.WriteFile(tempPath, data)\n\t\trequire.NoError(t, err)\n\n\t\terr = Upgrade(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tstrg, err := Open(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\n\t\tmnemonic, err := strg.Vault().Mnemonic(password)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"ARGON2ID-AES_256_CBC-MACV1\", strg.Vault().Encrypter.Method)\n\t\tassert.Equal(t, testMnemonic, mnemonic)\n\t})\n\n\tt.Run(\"Upgrade Wallet From Version 4\", func(t *testing.T) {\n\t\tdata, err := util.ReadFile(\"./testdata/wallet_version_4\")\n\t\trequire.NoError(t, err)\n\n\t\ttempPath := util.TempFilePath()\n\t\terr = util.WriteFile(tempPath, data)\n\t\trequire.NoError(t, err)\n\n\t\terr = Upgrade(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tstrg, err := Open(tempPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\t\tassert.Equal(t, genesis.Mainnet, strg.WalletInfo().Network)\n\t\tassert.Equal(t, amount.Amount(2e7), strg.WalletInfo().DefaultFee) // 0.02 PAC\n\n\t\tinfos := strg.AllAddresses()\n\t\tassert.Len(t, infos, 5)\n\t})\n}\n\nfunc TestUpgradeTestnet(t *testing.T) {\n\tdata, err := util.ReadFile(\"./testdata/testnet_wallet\")\n\trequire.NoError(t, err)\n\n\ttempPath := util.TempFilePath()\n\terr = util.WriteFile(tempPath, data)\n\trequire.NoError(t, err)\n\n\terr = Upgrade(tempPath)\n\trequire.NoError(t, err)\n\n\tstrg, err := Open(tempPath)\n\trequire.NoError(t, err)\n\n\tassert.Equal(t, VersionLatest, strg.WalletInfo().Version)\n\tassert.Equal(t, genesis.Testnet, strg.WalletInfo().Network)\n}\n"
  },
  {
    "path": "wallet/storage/jsonstorage/version.go",
    "content": "package jsonstorage\n\nconst (\n\tVersion1 = 1 // Initial version\n\tVersion2 = 2 // Supporting Ed25519\n\tVersion3 = 3 // Supporting AEC-256-CBC encryption method\n\tVersion4 = 4 // Set Default Fee for the Wallet\n\tVersion5 = 5 // Define Storage Interface\n\n\tVersionLatest = Version5\n)\n"
  },
  {
    "path": "wallet/storage/sqlitestorage/options.go",
    "content": "package sqlitestorage\n\n// SQLite settings.\ntype settings struct {\n\tlockingMode string\n}\n\nfunc defaultSettings() settings {\n\treturn settings{\n\t\tlockingMode: \"EXCLUSIVE\",\n\t}\n}\n\n// Option configures SQLite settings.\ntype Option func(*settings)\n\n// WithLockingMode sets SQLite locking mode (e.g. NORMAL, EXCLUSIVE).\nfunc WithLockingMode(lockMode bool) Option {\n\treturn func(p *settings) {\n\t\tif lockMode {\n\t\t\tp.lockingMode = \"EXCLUSIVE\"\n\t\t} else {\n\t\t\tp.lockingMode = \"NORMAL\"\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "wallet/storage/sqlitestorage/sql.go",
    "content": "package sqlitestorage\n\n// SQL queries and schema definitions.\n\nconst (\n\t// Schema creation queries.\n\tcreateWalletTableSQL = `\n\t\tCREATE TABLE wallet (\n\t\t\tname \t\t\tTEXT PRIMARY KEY,\n\t\t\tvalue \t\t\tTEXT NOT NULL\n\t\t)`\n\n\tcreateAddressesTableSQL = `\n\t\tCREATE TABLE addresses (\n\t\t\taddress \t\tTEXT PRIMARY KEY,\n\t\t\tpublic_key \t\tTEXT NOT NULL DEFAULT '',\n\t\t\tpath \t\t\tTEXT NOT NULL DEFAULT '',\n\t\t\tlabel \t\t\tTEXT NOT NULL DEFAULT '',\n\t\t\tcreated_at \t\tDATETIME DEFAULT CURRENT_TIMESTAMP,\n\t\t\tupdated_at \t\tDATETIME DEFAULT CURRENT_TIMESTAMP\n\t\t)`\n\n\tcreateTransactionsTableSQL = `\n\t\tCREATE TABLE transactions (\n\t\t\tno \t\t\t\tINTEGER PRIMARY KEY,   -- alias for rowid, auto-incremented starting at 1\n\t\t\ttx_id \t\t\tTEXT NOT NULL,         -- transaction identifier\n\t\t\tsender \t\t\tTEXT NOT NULL,\n\t\t\treceiver \t\tTEXT NOT NULL,\n\t\t\tdirection \t\tINTEGER NOT NULL,\n\t\t\tamount \t\t\tINTEGER NOT NULL,\n\t\t\tfee \t\t\tINTEGER NOT NULL,\n\t\t\tmemo \t\t\tTEXT NOT NULL DEFAULT '',\n\t\t\tstatus \t\t\tINTEGER NOT NULL,      -- status: failed=-1, pending=0, confirmed=1\n\t\t\tblock_height \tINTEGER NOT NULL,\n\t\t\tpayload_type \tINTEGER NOT NULL,\n\t\t\tdata \t\t\tBLOB NOT NULL DEFAULT X'',\n\t\t\tcomment \t\tTEXT NOT NULL DEFAULT '',\n\t\t\tcreated_at \t\tDATETIME DEFAULT CURRENT_TIMESTAMP,\n\t\t\tupdated_at \t\tDATETIME DEFAULT CURRENT_TIMESTAMP,\n\n\t\t\tUNIQUE (tx_id, receiver)\n\t\t\tCHECK (direction IN (1, 2)) -- incoming=1, outgoing=2\n\t\t)`\n\n\tcreateAddressesUpdatedAtTriggerSQL = `\n\t\tCREATE TRIGGER IF NOT EXISTS trg_addresses_updated_at\n\t\tAFTER UPDATE ON addresses\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tUPDATE addresses\n\t\t\tSET updated_at = CURRENT_TIMESTAMP\n\t\t\tWHERE address = OLD.address;\n\t\tEND`\n\n\tcreateTransactionsUpdatedAtTriggerSQL = `\n\t\tCREATE TRIGGER IF NOT EXISTS trg_transactions_updated_at\n\t\tAFTER UPDATE ON transactions\n\t\tFOR EACH ROW\n\t\tBEGIN\n\t\t\tUPDATE transactions\n\t\t\tSET updated_at = CURRENT_TIMESTAMP\n\t\t\tWHERE no = OLD.no;\n\t\tEND`\n\n\t// Partial index to speed up pending-transaction queries ordered by creation time.\n\tcreatePendingNoIdxSQL = `\n\t\tCREATE INDEX IF NOT EXISTS idx_transactions_pending_no\n\t\tON transactions (no DESC)\n\t\tWHERE status = 0`\n\n\t// Indexes to speed up lookups by sender/receiver and ordering by created_at.\n\tcreateTxSenderNoIdxSQL = `\n\t\tCREATE INDEX IF NOT EXISTS idx_tx_sender_no\n\t\tON transactions(sender, no DESC)`\n\n\tcreateTxReceiverNoIdxSQL = `\n\t\tCREATE INDEX IF NOT EXISTS idx_tx_receiver_no\n\t\tON transactions(receiver, no DESC)`\n\n\t// Wallet table operations.\n\tinsertWalletEntrySQL = `\n\t\tINSERT INTO wallet (name, value) VALUES (?, ?)`\n\n\tupdateWalletEntrySQL = `\n\t\tUPDATE wallet SET value = ? WHERE name = ?`\n\n\tselectAllWalletEntriesSQL = `\n\t\tSELECT name, value FROM wallet`\n\n\t// Address table operations.\n\tinsertAddressSQL = `\n\t\tINSERT INTO addresses (address, public_key, label, path)\n\t\tVALUES (?, ?, ?, ?)`\n\n\tupdateAddressSQL = `\n\t\tUPDATE addresses SET label = ?, public_key = ?, path = ?\n\t\tWHERE address = ?`\n\n\tselectAllAddressesSQL = `\n\t\tSELECT address, public_key, label, path, created_at, updated_at\n\t\tFROM addresses ORDER BY created_at ASC`\n\n\t// Transaction table operations.\n\tinsertTransactionSQL = `\n\t\tINSERT INTO transactions (tx_id, sender, receiver, direction, amount, fee, memo,\n\t\t\tstatus, block_height, payload_type, data, comment)\n\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`\n\n\tupdateTransactionStatusSQL = `\n\t\tUPDATE transactions SET status = ?, block_height = ?\n\t\tWHERE no = ?`\n\n\tselectTransactionByNoSQL = `\n\t\tSELECT\n\t\t\tno, tx_id, sender, receiver, direction, amount, fee, memo, status, block_height, payload_type,\n\t\t\tdata, comment, created_at, updated_at\n\t\tFROM transactions\n\t\tWHERE no = ?\n\t\tLIMIT 1`\n\n\tcountTransactionByTxIDSQL = `\n\t\tSELECT COUNT(*) FROM transactions WHERE tx_id = ?`\n\n\tselectPendingTransactionsSQL = `\n\t\tSELECT\n\t\tno, tx_id, sender, receiver, direction, amount, fee, memo, status, block_height, payload_type,\n\t\tdata, comment, created_at, updated_at\n\t\tFROM transactions WHERE status = ?\n\t\tORDER BY created_at DESC`\n)\n"
  },
  {
    "path": "wallet/storage/sqlitestorage/storage.go",
    "content": "package sqlitestorage\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\t_ \"github.com/glebarez/go-sqlite\" // sqlite driver\n\t\"github.com/google/uuid\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n)\n\n// Wallet metadata keys.\nconst (\n\tkeyVersion    = \"version\"\n\tkeyUUID       = \"uuid\"\n\tkeyCreatedAt  = \"created_at\"\n\tkeyNetwork    = \"network\"\n\tkeyDefaultFee = \"default_fee\"\n\tkeyVault      = \"vault\"\n)\n\n// Storage represents the SQLite-based wallet storage implementing IStorage interface.\ntype Storage struct {\n\tctx  context.Context\n\tdb   *sql.DB\n\tpath string\n\tinfo *wtypes.WalletInfo\n\tvlt  *vault.Vault\n\n\taddressMap map[string]wtypes.AddressInfo\n}\n\nfunc dbPath(path string) string {\n\treturn filepath.Join(path, \"wallet.db\")\n}\n\nfunc configurePragmas(ctx context.Context, db *sql.DB, lockingMode string) error {\n\tpragmas := []string{\n\t\tfmt.Sprintf(\"PRAGMA locking_mode=%s;\", lockingMode),\n\t\t\"PRAGMA journal_mode=WAL;\",\n\t\t\"PRAGMA synchronous=NORMAL;\",\n\t}\n\n\tfor _, pragma := range pragmas {\n\t\tif _, err := db.ExecContext(ctx, pragma); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to set pragma %q: %w\", pragma, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc openDB(ctx context.Context, path string, opts ...Option) (*sql.DB, error) {\n\tdsn := fmt.Sprintf(\"file:%s?_busy_timeout=5000\", dbPath(path))\n\tdb, err := sql.Open(\"sqlite\", dsn)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open database: %w\", err)\n\t}\n\n\tp := defaultSettings()\n\tfor _, opt := range opts {\n\t\topt(&p)\n\t}\n\tif err := configurePragmas(ctx, db, p.lockingMode); err != nil {\n\t\t_ = db.Close()\n\n\t\treturn nil, err\n\t}\n\n\treturn db, nil\n}\n\n// Create creates a new SQLite storage instance and initializes the schema.\nfunc Create(ctx context.Context, path string, network genesis.ChainType, vlt *vault.Vault,\n\topts ...Option,\n) (*Storage, error) {\n\tif err := util.Mkdir(path); err != nil {\n\t\treturn nil, err\n\t}\n\n\tdb, err := openDB(ctx, path, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Initialize database schema\n\ttables := []string{\n\t\tcreateWalletTableSQL,\n\t\tcreateAddressesTableSQL,\n\t\tcreateTransactionsTableSQL,\n\n\t\tcreateAddressesUpdatedAtTriggerSQL,\n\t\tcreateTransactionsUpdatedAtTriggerSQL,\n\n\t\tcreatePendingNoIdxSQL,\n\t\tcreateTxSenderNoIdxSQL,\n\t\tcreateTxReceiverNoIdxSQL,\n\t}\n\tfor _, query := range tables {\n\t\tif _, err := db.ExecContext(ctx, query); err != nil {\n\t\t\t_ = db.Close()\n\n\t\t\treturn nil, fmt.Errorf(\"failed to create table: %w\", err)\n\t\t}\n\t}\n\n\t// Marshal vault to JSON\n\tvaultJSON, err := json.Marshal(vlt)\n\tif err != nil {\n\t\t_ = db.Close()\n\n\t\treturn nil, fmt.Errorf(\"failed to marshal vault: %w\", err)\n\t}\n\n\t// Store wallet metadata\n\t// KeyValue represents a key-value pair for wallet entries.\n\ttype KeyValue struct {\n\t\tKey   string\n\t\tValue string\n\t}\n\n\tentries := []KeyValue{\n\t\t{Key: keyVersion, Value: fmt.Sprintf(\"%d\", VersionLatest)},\n\t\t{Key: keyUUID, Value: uuid.New().String()},\n\t\t{Key: keyCreatedAt, Value: fmt.Sprintf(\"%d\", util.RoundNow(1).Unix())},\n\t\t{Key: keyNetwork, Value: fmt.Sprintf(\"%d\", network)},\n\t\t{Key: keyDefaultFee, Value: fmt.Sprintf(\"%d\", amount.Amount(10_000_000))},\n\t\t{Key: keyVault, Value: string(vaultJSON)},\n\t}\n\n\tfor _, entry := range entries {\n\t\tif _, err := db.ExecContext(ctx, insertWalletEntrySQL, entry.Key, entry.Value); err != nil {\n\t\t\t_ = db.Close()\n\n\t\t\treturn nil, fmt.Errorf(\"failed to insert wallet entry %s: %w\", entry.Key, err)\n\t\t}\n\t}\n\n\treturn open(ctx, db, path)\n}\n\n// Open opens an existing SQLite storage instance without creating schema.\nfunc Open(ctx context.Context, path string, opts ...Option) (*Storage, error) {\n\tdb, err := openDB(ctx, path, opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn open(ctx, db, path)\n}\n\n// open loads wallet info and returns a Storage instance.\nfunc open(ctx context.Context, db *sql.DB, path string) (*Storage, error) {\n\tstrg := &Storage{\n\t\tctx:  ctx,\n\t\tdb:   db,\n\t\tpath: path,\n\t}\n\n\t// Load wallet info into memory\n\tif err := strg.loadWalletInfo(); err != nil {\n\t\t_ = db.Close()\n\n\t\treturn nil, fmt.Errorf(\"failed to load wallet info: %w\", err)\n\t}\n\n\t// Load addresses into memory\n\tif err := strg.loadAddresses(); err != nil {\n\t\t_ = db.Close()\n\n\t\treturn nil, fmt.Errorf(\"failed to load addresses: %w\", err)\n\t}\n\n\treturn strg, nil\n}\n\n// Close closes the database connection.\nfunc (s *Storage) Close() error {\n\tif s.db != nil {\n\t\treturn s.db.Close()\n\t}\n\n\treturn nil\n}\n\n// WalletInfo returns the wallet information.\nfunc (s *Storage) WalletInfo() *wtypes.WalletInfo {\n\treturn s.info\n}\n\n// loadWalletInfo loads wallet information from the database into memory.\nfunc (s *Storage) loadWalletInfo() error {\n\t// Fetch all wallet entries at once\n\trows, err := s.db.QueryContext(s.ctx, selectAllWalletEntriesSQL)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to query wallet entries: %w\", err)\n\t}\n\tdefer func() { _ = rows.Close() }()\n\n\tentries := make(map[string]string)\n\tfor rows.Next() {\n\t\tvar name, value string\n\t\tif err := rows.Scan(&name, &value); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to scan wallet entry: %w\", err)\n\t\t}\n\t\tentries[name] = value\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn fmt.Errorf(\"failed to iterate wallet entries: %w\", err)\n\t}\n\n\tversion := 0\n\tif _, err := fmt.Sscanf(entries[keyVersion], \"%d\", &version); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse version: %w\", err)\n\t}\n\n\tvar defaultFee amount.Amount\n\tif _, err := fmt.Sscanf(entries[keyDefaultFee], \"%d\", &defaultFee); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse default fee: %w\", err)\n\t}\n\n\tvar createdAtUnix int64\n\tif _, err := fmt.Sscanf(entries[keyCreatedAt], \"%d\", &createdAtUnix); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse created_at: %w\", err)\n\t}\n\tcreatedAt := time.Unix(createdAtUnix, 0)\n\n\t// Parse network type\n\tvar network genesis.ChainType\n\tif _, err := fmt.Sscanf(entries[keyNetwork], \"%d\", &network); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse network: %w\", err)\n\t}\n\n\tvar vlt vault.Vault\n\tif vaultJSON, ok := entries[keyVault]; ok {\n\t\tif err := json.Unmarshal([]byte(vaultJSON), &vlt); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to unmarshal vault: %w\", err)\n\t\t}\n\t}\n\ts.vlt = &vlt\n\n\ts.info = &wtypes.WalletInfo{\n\t\tPath:       s.path,\n\t\tDriver:     \"SQLite\",\n\t\tVersion:    version,\n\t\tNetwork:    network,\n\t\tDefaultFee: defaultFee,\n\t\tUUID:       entries[keyUUID],\n\t\tEncrypted:  s.vlt.IsEncrypted(),\n\t\tNeutered:   s.vlt.IsNeutered(),\n\t\tCreatedAt:  createdAt,\n\t}\n\n\treturn nil\n}\n\n// loadAddresses loads addresses into memory.\nfunc (s *Storage) loadAddresses() error {\n\trows, err := s.db.QueryContext(s.ctx, selectAllAddressesSQL)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to query addresses: %w\", err)\n\t}\n\tdefer func() { _ = rows.Close() }()\n\n\ts.addressMap = make(map[string]wtypes.AddressInfo)\n\tfor rows.Next() {\n\t\taddr, err := scanAddress(rows)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to scan address: %w\", err)\n\t\t}\n\n\t\ts.addressMap[addr.Address] = *addr\n\t}\n\n\treturn rows.Err()\n}\n\n// Vault returns the vault.\nfunc (s *Storage) Vault() *vault.Vault {\n\treturn s.vlt\n}\n\n// UpdateVault updates the vault in storage.\nfunc (s *Storage) UpdateVault(vlt *vault.Vault) error {\n\tif err := s.saveVault(vlt); err != nil {\n\t\treturn err\n\t}\n\ts.vlt = vlt\n\ts.info.Encrypted = vlt.IsEncrypted()\n\ts.info.Neutered = vlt.IsNeutered()\n\n\treturn nil\n}\n\n// SetDefaultFee sets the default fee.\nfunc (s *Storage) SetDefaultFee(fee amount.Amount) error {\n\tif err := s.updateWalletEntry(keyDefaultFee, fmt.Sprintf(\"%d\", fee)); err != nil {\n\t\treturn err\n\t}\n\ts.info.DefaultFee = fee\n\n\treturn nil\n}\n\n// AllAddresses returns all addresses in the wallet.\nfunc (s *Storage) AllAddresses() []wtypes.AddressInfo {\n\taddresses := make([]wtypes.AddressInfo, 0, len(s.addressMap))\n\tfor _, addr := range s.addressMap {\n\t\taddresses = append(addresses, addr)\n\t}\n\n\treturn addresses\n}\n\n// AddressCount returns the number of addresses in the wallet.\nfunc (s *Storage) AddressCount() int {\n\treturn len(s.addressMap)\n}\n\n// AddressInfo returns the address information for the given address.\nfunc (s *Storage) AddressInfo(address string) (*wtypes.AddressInfo, error) {\n\tinfo, exists := s.addressMap[address]\n\tif !exists {\n\t\treturn nil, storage.ErrNotFound\n\t}\n\n\treturn &info, nil\n}\n\n// InsertAddress inserts a new address.\nfunc (s *Storage) InsertAddress(info *wtypes.AddressInfo) error {\n\t_, err := s.db.ExecContext(s.ctx, insertAddressSQL,\n\t\tinfo.Address, info.PublicKey, info.Label, info.Path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn s.loadAddresses()\n}\n\n// UpdateAddress updates an existing address.\nfunc (s *Storage) UpdateAddress(info *wtypes.AddressInfo) error {\n\t_, err := s.db.ExecContext(s.ctx, updateAddressSQL,\n\t\tinfo.Label, info.PublicKey, info.Path, info.Address)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn s.loadAddresses()\n}\n\n// HasAddress checks if an address exists.\nfunc (s *Storage) HasAddress(address string) bool {\n\t_, exists := s.addressMap[address]\n\n\treturn exists\n}\n\n// InsertTransaction inserts a new transaction.\nfunc (s *Storage) InsertTransaction(info *wtypes.TransactionInfo) error {\n\tresult, err := s.db.ExecContext(s.ctx, insertTransactionSQL,\n\t\tinfo.TxID,\n\t\tinfo.Sender,\n\t\tinfo.Receiver,\n\t\tinfo.Direction,\n\t\tinfo.Amount,\n\t\tinfo.Fee,\n\t\tinfo.Memo,\n\t\tinfo.Status,\n\t\tinfo.BlockHeight,\n\t\tint(info.PayloadType),\n\t\tinfo.Data,\n\t\tinfo.Comment,\n\t)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tinfo.No, _ = result.LastInsertId()\n\n\treturn nil\n}\n\n// UpdateTransactionStatus updates the status and block height for all transactions with the given primary key.\nfunc (s *Storage) UpdateTransactionStatus(no int64, status wtypes.TransactionStatus, blockHeight types.Height) error {\n\t_, err := s.db.ExecContext(s.ctx, updateTransactionStatusSQL, int(status), blockHeight, no)\n\n\treturn err\n}\n\n// HasTransaction checks if a transaction exists by transaction ID.\nfunc (s *Storage) HasTransaction(txID string) bool {\n\tvar count int\n\terr := s.db.QueryRowContext(s.ctx, countTransactionByTxIDSQL, txID).Scan(&count)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\treturn count > 0\n}\n\n// scanner is an interface that both *sql.Row and *sql.Rows satisfy.\ntype scanner interface {\n\tScan(dest ...any) error\n}\n\n// scanAddress scans a row into an AddressInfo struct.\nfunc scanAddress(s scanner) (*wtypes.AddressInfo, error) {\n\tvar info wtypes.AddressInfo\n\n\terr := s.Scan(\n\t\t&info.Address,\n\t\t&info.PublicKey,\n\t\t&info.Label,\n\t\t&info.Path,\n\t\t&info.CreatedAt,\n\t\t&info.UpdatedAt,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &info, nil\n}\n\n// scanTransaction scans a row into a TransactionInfo struct.\nfunc scanTransaction(s scanner) (*wtypes.TransactionInfo, error) {\n\tvar info wtypes.TransactionInfo\n\tvar status, payloadType int\n\n\terr := s.Scan(\n\t\t&info.No,\n\t\t&info.TxID,\n\t\t&info.Sender,\n\t\t&info.Receiver,\n\t\t&info.Direction,\n\t\t&info.Amount,\n\t\t&info.Fee,\n\t\t&info.Memo,\n\t\t&status,\n\t\t&info.BlockHeight,\n\t\t&payloadType,\n\t\t&info.Data,\n\t\t&info.Comment,\n\t\t&info.CreatedAt,\n\t\t&info.UpdatedAt,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tinfo.Status = wtypes.TransactionStatus(status)\n\tinfo.PayloadType = payload.Type(payloadType)\n\n\treturn &info, nil\n}\n\n// GetTransaction retrieves a transaction by primary key.\nfunc (s *Storage) GetTransaction(no int64) (*wtypes.TransactionInfo, error) {\n\tinfo, err := scanTransaction(s.db.QueryRowContext(s.ctx, selectTransactionByNoSQL, no))\n\tif err != nil {\n\t\tif errors.Is(err, sql.ErrNoRows) {\n\t\t\treturn nil, storage.ErrNotFound\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\treturn info, nil\n}\n\n// QueryTransactions returns transactions matching the provided filters with pagination.\n// Empty or \"*\" address value is treated as no filter. Filters are combined with AND.\nfunc (s *Storage) QueryTransactions(params storage.QueryParams) ([]*wtypes.TransactionInfo, error) {\n\tconditions := make([]string, 0, 3)\n\targs := make([]any, 0, 6)\n\n\tif params.Direction != wtypes.TxDirectionAny {\n\t\tconditions = append(conditions, \"direction = ?\")\n\t\targs = append(args, params.Direction)\n\t}\n\n\tif params.Address != \"*\" {\n\t\tswitch params.Direction {\n\t\tcase wtypes.TxDirectionAny:\n\t\t\tconditions = append(conditions, \"(sender = ? OR receiver = ?)\")\n\t\t\targs = append(args, params.Address, params.Address)\n\t\tcase wtypes.TxDirectionIncoming:\n\t\t\tconditions = append(conditions, \"receiver = ?\")\n\t\t\targs = append(args, params.Address)\n\t\tcase wtypes.TxDirectionOutgoing:\n\t\t\tconditions = append(conditions, \"sender = ?\")\n\t\t\targs = append(args, params.Address)\n\t\t}\n\t}\n\n\twhere := \"\"\n\tif len(conditions) > 0 {\n\t\twhere = \"WHERE \" + strings.Join(conditions, \" AND \")\n\t}\n\n\t// Apply pagination\n\targs = append(args, params.Count, params.Skip)\n\n\tvar queryBuilder strings.Builder\n\tqueryBuilder.WriteString(`\n\t\tSELECT\n\t\t\tno, tx_id, sender, receiver, direction, amount, fee, memo, status, block_height, payload_type,\n\t\t\tdata, comment, created_at, updated_at\n\t\tFROM transactions\n\t`)\n\tif where != \"\" {\n\t\tqueryBuilder.WriteString(where)\n\t\tqueryBuilder.WriteString(\"\\n\")\n\t}\n\tqueryBuilder.WriteString(`ORDER BY created_at DESC\n\t\tLIMIT ? OFFSET ?`)\n\n\tquery := queryBuilder.String()\n\n\trows, err := s.db.QueryContext(s.ctx, query, args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = rows.Close() }()\n\n\ttransactions := make([]*wtypes.TransactionInfo, 0)\n\tfor rows.Next() {\n\t\tinfo, err := scanTransaction(rows)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\ttransactions = append(transactions, info)\n\t}\n\n\treturn transactions, rows.Err()\n}\n\n// GetPendingTransactions returns pending transactions keyed by transaction ID.\nfunc (s *Storage) GetPendingTransactions() (map[string]*wtypes.TransactionInfo, error) {\n\trows, err := s.db.QueryContext(s.ctx, selectPendingTransactionsSQL, int(wtypes.TransactionStatusPending))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = rows.Close() }()\n\n\tpending := make(map[string]*wtypes.TransactionInfo)\n\tfor rows.Next() {\n\t\tinfo, err := scanTransaction(rows)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tpending[info.TxID] = info\n\t}\n\n\treturn pending, rows.Err()\n}\n\n// Clone creates a copy of the storage at a new path.\nfunc (s *Storage) Clone(path string) (storage.IStorage, error) {\n\tif err := util.Mkdir(path); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Use VACUUM INTO to create a backup\n\t_, err := s.db.ExecContext(s.ctx, fmt.Sprintf(\"VACUUM INTO '%s'\", dbPath(path)))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to backup database: %w\", err)\n\t}\n\n\t// Open the cloned database\n\tclonedStorage, err := Open(s.ctx, path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Update UUID and CreatedAt for the cloned wallet\n\tnewUUID := uuid.New().String()\n\tif err := clonedStorage.updateWalletEntry(keyUUID, newUUID); err != nil {\n\t\t_ = clonedStorage.Close()\n\n\t\treturn nil, err\n\t}\n\tclonedStorage.info.UUID = newUUID\n\n\tnewCreatedAt := util.RoundNow(1)\n\tif err := clonedStorage.updateWalletEntry(keyCreatedAt, fmt.Sprintf(\"%d\", newCreatedAt.Unix())); err != nil {\n\t\t_ = clonedStorage.Close()\n\n\t\treturn nil, err\n\t}\n\tclonedStorage.info.CreatedAt = newCreatedAt\n\tclonedStorage.info.Path = path\n\n\treturn clonedStorage, nil\n}\n\nfunc (s *Storage) updateWalletEntry(key, value string) error {\n\t_, err := s.db.ExecContext(s.ctx, updateWalletEntrySQL, value, key)\n\n\treturn err\n}\n\nfunc (s *Storage) saveVault(vlt *vault.Vault) error {\n\tvaultJSON, err := json.Marshal(vlt)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to marshal vault: %w\", err)\n\t}\n\n\treturn s.updateWalletEntry(keyVault, string(vaultJSON))\n}\n\nfunc (*Storage) IsLegacy() bool {\n\treturn false\n}\n"
  },
  {
    "path": "wallet/storage/sqlitestorage/storage_test.go",
    "content": "package sqlitestorage\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\n//nolint:dupword // duplicated seed phrase words\nvar testMnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus\"\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tstorage *Storage\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tvlt, err := vault.CreateVaultFromMnemonic(testMnemonic, addresspath.CoinTypePactusTestnet)\n\trequire.NoError(t, err)\n\n\tpath := util.TempDirPath()\n\tstrg, err := Create(t.Context(), path, genesis.Testnet, vlt)\n\trequire.NoError(t, err)\n\n\tt.Cleanup(func() {\n\t\t_ = strg.Close()\n\t})\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tstorage:   strg,\n\t}\n}\n\nfunc (td *testData) RandomAddressInfo(t *testing.T) *types.AddressInfo {\n\tt.Helper()\n\n\treturn &types.AddressInfo{\n\t\tAddress:   td.RandAccAddress().String(),\n\t\tPublicKey: td.RandString(32),\n\t\tLabel:     td.RandString(16),\n\t\tPath:      td.RandString(16),\n\t}\n}\n\nfunc (td *testData) InsertRandomAddressInfo(t *testing.T) *types.AddressInfo {\n\tt.Helper()\n\n\taddrInfo := td.RandomAddressInfo(t)\n\terr := td.storage.InsertAddress(addrInfo)\n\trequire.NoError(t, err)\n\n\t// Get the address info from the database\n\taddrInfo, err = td.storage.AddressInfo(addrInfo.Address)\n\trequire.NoError(t, err)\n\n\treturn addrInfo\n}\n\nfunc (td *testData) RandomDirection(t *testing.T) types.TxDirection {\n\tt.Helper()\n\n\treturn types.TxDirection(td.RandIntMax(2) + 1)\n}\n\nfunc (td *testData) RandomTransactionInfo(t *testing.T, direction types.TxDirection,\n\topts ...testsuite.TransactionMakerOption,\n) *types.TransactionInfo {\n\tt.Helper()\n\n\ttrx := td.GenerateTestTransferTx(opts...)\n\ttxInfos, err := types.MakeTransactionInfos(trx, types.TransactionStatusPending, 0)\n\trequire.NoError(t, err)\n\n\ttxInfos[0].Direction = direction\n\n\treturn txInfos[0]\n}\n\nfunc (td *testData) InsertRandomTransactionInfo(t *testing.T, direction types.TxDirection,\n\topts ...testsuite.TransactionMakerOption,\n) *types.TransactionInfo {\n\tt.Helper()\n\n\ttxInfo := td.RandomTransactionInfo(t, direction, opts...)\n\terr := td.storage.InsertTransaction(txInfo)\n\trequire.NoError(t, err)\n\n\t// Get the transaction info from the database\n\ttxInfo, err = td.storage.GetTransaction(txInfo.No)\n\trequire.NoError(t, err)\n\n\treturn txInfo\n}\n\nfunc TestWalletInfo(t *testing.T) {\n\ttd := setup(t)\n\n\tinfo := td.storage.WalletInfo()\n\tassert.Equal(t, VersionLatest, info.Version)\n\tassert.Equal(t, genesis.Testnet, info.Network)\n\tassert.Equal(t, \"SQLite\", info.Driver)\n\tassert.NotEmpty(t, info.UUID)\n\tassert.Equal(t, amount.Amount(10_000_000), info.DefaultFee)\n\tassert.False(t, info.CreatedAt.IsZero())\n}\n\nfunc TestVault(t *testing.T) {\n\ttd := setup(t)\n\n\tvlt := td.storage.Vault()\n\trequire.NotNil(t, vlt)\n\tassert.False(t, vlt.IsEncrypted())\n\tassert.False(t, vlt.IsNeutered())\n}\n\nfunc TestUpdateVault(t *testing.T) {\n\ttd := setup(t)\n\n\tvlt1 := td.storage.Vault()\n\trequire.NotNil(t, vlt1)\n\n\t// Create a new address to modify the vault\n\t_, err := vlt1.NewValidatorAddress(\"Test Validator\")\n\trequire.NoError(t, err)\n\n\t// Update vault\n\terr = td.storage.UpdateVault(vlt1)\n\trequire.NoError(t, err)\n\n\t// Verify update\n\tvlt2 := td.storage.Vault()\n\tassert.Equal(t, uint32(1), vlt2.Purposes.PurposeBLS.NextValidatorIndex)\n}\n\nfunc TestSetDefaultFee(t *testing.T) {\n\ttd := setup(t)\n\n\tnewFee := amount.Amount(20_000_000)\n\terr := td.storage.SetDefaultFee(newFee)\n\trequire.NoError(t, err)\n\n\tinfo := td.storage.WalletInfo()\n\tassert.Equal(t, newFee, info.DefaultFee)\n}\n\nfunc TestAddressOperations(t *testing.T) {\n\ttd := setup(t)\n\n\taddrInfo1 := td.InsertRandomAddressInfo(t)\n\taddrInfo2 := td.InsertRandomAddressInfo(t)\n\n\t// Test AllAddresses\n\taddresses := td.storage.AllAddresses()\n\trequire.Len(t, addresses, 2)\n\n\tassert.Equal(t, 2, td.storage.AddressCount())\n\n\tassert.True(t, td.storage.HasAddress(addrInfo1.Address))\n\tassert.True(t, td.storage.HasAddress(addrInfo2.Address))\n\n\t// Test GetAddress\n\tretrieved1, err := td.storage.AddressInfo(addrInfo1.Address)\n\trequire.NoError(t, err)\n\tassert.Equal(t, addrInfo1.Address, retrieved1.Address)\n\tassert.Equal(t, addrInfo1.PublicKey, retrieved1.PublicKey)\n\tassert.Equal(t, addrInfo1.Path, retrieved1.Path)\n\tassert.Equal(t, addrInfo1.Label, retrieved1.Label)\n\n\t// Test UpdateAddress\n\taddrInfo2.Label = \"Updated Label\"\n\terr = td.storage.UpdateAddress(addrInfo2)\n\trequire.NoError(t, err)\n\n\tretrieved2, err := td.storage.AddressInfo(addrInfo2.Address)\n\trequire.NoError(t, err)\n\tassert.Equal(t, \"Updated Label\", retrieved2.Label)\n\n\t// Test GetAddress not found\n\t_, err = td.storage.AddressInfo(\"non_existent\")\n\trequire.ErrorIs(t, err, storage.ErrNotFound)\n}\n\nfunc TestInsertAddress(t *testing.T) {\n\ttd := setup(t)\n\n\taddrInfo1 := td.InsertRandomAddressInfo(t)\n\tassert.True(t, td.storage.HasAddress(addrInfo1.Address))\n\n\taddrInfo2 := td.InsertRandomAddressInfo(t)\n\tassert.True(t, td.storage.HasAddress(addrInfo2.Address))\n\n\tassert.Equal(t, 2, td.storage.AddressCount())\n}\n\nfunc TestTransactionOperations(t *testing.T) {\n\ttd := setup(t)\n\n\ttxInfo := td.InsertRandomTransactionInfo(t, td.RandomDirection(t))\n\n\t// Test HasTransaction\n\tassert.True(t, td.storage.HasTransaction(txInfo.TxID))\n\tassert.False(t, td.storage.HasTransaction(\"non_existing\"))\n\n\t// Test GetTransaction\n\tretrieved, err := td.storage.GetTransaction(txInfo.No)\n\trequire.NoError(t, err)\n\tassert.Equal(t, txInfo.TxID, retrieved.TxID)\n\tassert.Equal(t, txInfo.Sender, retrieved.Sender)\n\tassert.Equal(t, txInfo.Receiver, retrieved.Receiver)\n\tassert.Equal(t, txInfo.Amount, retrieved.Amount)\n\tassert.Equal(t, txInfo.Fee, retrieved.Fee)\n\tassert.Equal(t, txInfo.Memo, retrieved.Memo)\n\tassert.Equal(t, txInfo.Status, retrieved.Status)\n\tassert.Equal(t, txInfo.BlockHeight, retrieved.BlockHeight)\n\tassert.Equal(t, txInfo.PayloadType, retrieved.PayloadType)\n\tassert.Equal(t, txInfo.Comment, retrieved.Comment)\n\n\t// Test GetTransaction not found\n\t_, err = td.storage.GetTransaction(-1)\n\trequire.ErrorIs(t, err, storage.ErrNotFound)\n\n\t// Test UpdateTransactionStatus\n\terr = td.storage.UpdateTransactionStatus(txInfo.No, types.TransactionStatusConfirmed, 1)\n\trequire.NoError(t, err)\n\n\tretrieved, err = td.storage.GetTransaction(txInfo.No)\n\trequire.NoError(t, err)\n\tassert.Equal(t, types.TransactionStatusConfirmed, retrieved.Status)\n}\n\nfunc TestQueryTransactions_Range(t *testing.T) {\n\ttd := setup(t)\n\n\t// Insert multiple transactions\n\treceiver := td.RandAccAddress()\n\tfor i := 0; i < 5; i++ {\n\t\ttd.InsertRandomTransactionInfo(t, td.RandomDirection(t), testsuite.TransactionWithReceiver(receiver))\n\t}\n\n\t// Test QueryTransactions with pagination\n\ttransactions, err := td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   receiver.String(),\n\t\tDirection: types.TxDirectionAny,\n\t\tCount:     3,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, transactions, 3)\n\n\t// Test with skip\n\ttransactions, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   receiver.String(),\n\t\tDirection: types.TxDirectionAny,\n\t\tCount:     3,\n\t\tSkip:      3,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, transactions, 2)\n\n\t// Test with different receiver\n\ttransactions, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   \"other_receiver\",\n\t\tDirection: types.TxDirectionAny,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Empty(t, transactions)\n}\n\nfunc TestQueryTransactions_Direction(t *testing.T) {\n\ttd := setup(t)\n\n\t// create three tx rows:\n\t// 1) sender A -> receiver B\n\t// 2) sender A -> receiver C\n\t// 3) sender D -> receiver B\n\tpubA, signerA := td.RandEd25519KeyPair()\n\tpubD, signerD := td.RandEd25519KeyPair()\n\taddrB := td.RandAccAddress()\n\taddrC := td.RandAccAddress()\n\n\ttd.InsertRandomTransactionInfo(t, types.TxDirectionOutgoing,\n\t\ttestsuite.TransactionWithSigner(signerA), testsuite.TransactionWithReceiver(addrB))\n\ttd.InsertRandomTransactionInfo(t, types.TxDirectionOutgoing,\n\t\ttestsuite.TransactionWithSigner(signerA), testsuite.TransactionWithReceiver(addrC))\n\ttd.InsertRandomTransactionInfo(t, types.TxDirectionIncoming,\n\t\ttestsuite.TransactionWithSigner(signerD), testsuite.TransactionWithReceiver(addrB))\n\n\t// Wildcard both: all 3\n\ttxs, err := td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   \"*\",\n\t\tDirection: types.TxDirectionAny,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, txs, 3)\n\n\t// Filter sender only (A): rows 1 and 2\n\ttxs, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   pubA.AccountAddress().String(),\n\t\tDirection: types.TxDirectionOutgoing,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, txs, 2)\n\n\t// Filter sender only (D): rows 3\n\ttxs, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   pubD.AccountAddress().String(),\n\t\tDirection: types.TxDirectionOutgoing,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Empty(t, txs)\n\t// Filter receiver only (B): rows with incoming to B (row 3)\n\ttxs, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   addrB.String(),\n\t\tDirection: types.TxDirectionIncoming,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, txs, 1)\n\n\t// Outgoing from A: rows 1 and 2\n\ttxs, err = td.storage.QueryTransactions(storage.QueryParams{\n\t\tAddress:   pubA.AccountAddress().String(),\n\t\tDirection: types.TxDirectionOutgoing,\n\t\tCount:     10,\n\t\tSkip:      0,\n\t})\n\trequire.NoError(t, err)\n\tassert.Len(t, txs, 2)\n}\n\nfunc TestGetPendingTransactions(t *testing.T) {\n\ttd := setup(t)\n\n\t// Insert multiple transactions\n\ttxInfo1 := td.InsertRandomTransactionInfo(t, types.TxDirectionOutgoing)\n\ttxInfo2 := td.InsertRandomTransactionInfo(t, types.TxDirectionOutgoing)\n\ttxInfo3 := td.InsertRandomTransactionInfo(t, types.TxDirectionIncoming)\n\n\tpendings, err := td.storage.GetPendingTransactions()\n\trequire.NoError(t, err)\n\trequire.Len(t, pendings, 3)\n\n\t_ = td.storage.UpdateTransactionStatus(txInfo1.No, types.TransactionStatusConfirmed, td.RandHeight())\n\t_ = td.storage.UpdateTransactionStatus(txInfo2.No, types.TransactionStatusFailed, 0)\n\n\tpendings, err = td.storage.GetPendingTransactions()\n\trequire.NoError(t, err)\n\trequire.Len(t, pendings, 1)\n\n\tassert.Contains(t, pendings, txInfo3.TxID)\n}\n\nfunc TestClone(t *testing.T) {\n\ttd := setup(t)\n\n\tclonePath := util.TempDirPath()\n\tcloned, err := td.storage.Clone(clonePath)\n\trequire.NoError(t, err)\n\tdefer func() { _ = cloned.Close() }()\n\n\t// Verify cloned storage has different UUID and CreatedAt\n\toriginalInfo := td.storage.WalletInfo()\n\tclonedInfo := cloned.WalletInfo()\n\tassert.NotEqual(t, originalInfo.UUID, clonedInfo.UUID)\n\tassert.NotEqual(t, originalInfo.CreatedAt, clonedInfo.CreatedAt)\n\tassert.Equal(t, originalInfo.Network, clonedInfo.Network)\n\tassert.Equal(t, originalInfo.Version, clonedInfo.Version)\n\tassert.Equal(t, originalInfo.DefaultFee, clonedInfo.DefaultFee)\n\tassert.Equal(t, originalInfo.Encrypted, clonedInfo.Encrypted)\n\tassert.Equal(t, originalInfo.Driver, clonedInfo.Driver)\n\tassert.Equal(t, td.storage.Vault(), cloned.Vault())\n\tassert.Equal(t, td.storage.AllAddresses(), cloned.AllAddresses())\n}\n\nfunc TestUpdatedAt(t *testing.T) {\n\ttd := setup(t)\n\n\taddrInfo := td.InsertRandomAddressInfo(t)\n\ttrxInfo := td.InsertRandomTransactionInfo(t, td.RandomDirection(t))\n\n\taddrInfo1, err := td.storage.AddressInfo(addrInfo.Address)\n\trequire.NoError(t, err)\n\n\ttrxInfo1, err := td.storage.GetTransaction(trxInfo.No)\n\trequire.NoError(t, err)\n\n\ttime.Sleep(1 * time.Second)\n\n\terr = td.storage.UpdateAddress(addrInfo)\n\trequire.NoError(t, err)\n\n\terr = td.storage.UpdateTransactionStatus(trxInfo.No, types.TransactionStatusConfirmed, td.RandHeight())\n\trequire.NoError(t, err)\n\n\taddrInfo2, err := td.storage.AddressInfo(addrInfo.Address)\n\trequire.NoError(t, err)\n\tassert.NotEqual(t, addrInfo1.UpdatedAt, addrInfo2.UpdatedAt)\n\n\ttrxInfo2, err := td.storage.GetTransaction(trxInfo.No)\n\trequire.NoError(t, err)\n\tassert.NotEqual(t, trxInfo1.UpdatedAt, trxInfo2.UpdatedAt)\n}\n\nfunc TestInsertDuplicateTransaction(t *testing.T) {\n\ttd := setup(t)\n\n\ttxInfo := td.InsertRandomTransactionInfo(t, td.RandomDirection(t))\n\n\terr := td.storage.InsertTransaction(txInfo)\n\trequire.Error(t, err)\n}\n"
  },
  {
    "path": "wallet/storage/sqlitestorage/version.go",
    "content": "package sqlitestorage\n\nconst (\n\tVersion1 = 1 // Initial version\n\n\tVersionLatest = Version1\n)\n"
  },
  {
    "path": "wallet/storage/storage_mock.go",
    "content": "// Code generated by MockGen. DO NOT EDIT.\n// Source: wallet/storage/interface.go\n//\n// Generated by this command:\n//\n//\tmockgen -source=wallet/storage/interface.go -destination=wallet/storage/storage_mock.go -package=storage\n//\n\n// Package storage is a generated GoMock package.\npackage storage\n\nimport (\n\treflect \"reflect\"\n\n\ttypes \"github.com/pactus-project/pactus/types\"\n\tamount \"github.com/pactus-project/pactus/types/amount\"\n\ttypes0 \"github.com/pactus-project/pactus/wallet/types\"\n\tvault \"github.com/pactus-project/pactus/wallet/vault\"\n\tgomock \"go.uber.org/mock/gomock\"\n)\n\n// MockIStorage is a mock of IStorage interface.\ntype MockIStorage struct {\n\tctrl     *gomock.Controller\n\trecorder *MockIStorageMockRecorder\n\tisgomock struct{}\n}\n\n// MockIStorageMockRecorder is the mock recorder for MockIStorage.\ntype MockIStorageMockRecorder struct {\n\tmock *MockIStorage\n}\n\n// NewMockIStorage creates a new mock instance.\nfunc NewMockIStorage(ctrl *gomock.Controller) *MockIStorage {\n\tmock := &MockIStorage{ctrl: ctrl}\n\tmock.recorder = &MockIStorageMockRecorder{mock}\n\treturn mock\n}\n\n// EXPECT returns an object that allows the caller to indicate expected use.\nfunc (m *MockIStorage) EXPECT() *MockIStorageMockRecorder {\n\treturn m.recorder\n}\n\n// AddressCount mocks base method.\nfunc (m *MockIStorage) AddressCount() int {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AddressCount\")\n\tret0, _ := ret[0].(int)\n\treturn ret0\n}\n\n// AddressCount indicates an expected call of AddressCount.\nfunc (mr *MockIStorageMockRecorder) AddressCount() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AddressCount\", reflect.TypeOf((*MockIStorage)(nil).AddressCount))\n}\n\n// AddressInfo mocks base method.\nfunc (m *MockIStorage) AddressInfo(address string) (*types0.AddressInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AddressInfo\", address)\n\tret0, _ := ret[0].(*types0.AddressInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// AddressInfo indicates an expected call of AddressInfo.\nfunc (mr *MockIStorageMockRecorder) AddressInfo(address any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AddressInfo\", reflect.TypeOf((*MockIStorage)(nil).AddressInfo), address)\n}\n\n// AllAddresses mocks base method.\nfunc (m *MockIStorage) AllAddresses() []types0.AddressInfo {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"AllAddresses\")\n\tret0, _ := ret[0].([]types0.AddressInfo)\n\treturn ret0\n}\n\n// AllAddresses indicates an expected call of AllAddresses.\nfunc (mr *MockIStorageMockRecorder) AllAddresses() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"AllAddresses\", reflect.TypeOf((*MockIStorage)(nil).AllAddresses))\n}\n\n// Clone mocks base method.\nfunc (m *MockIStorage) Clone(path string) (IStorage, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Clone\", path)\n\tret0, _ := ret[0].(IStorage)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// Clone indicates an expected call of Clone.\nfunc (mr *MockIStorageMockRecorder) Clone(path any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Clone\", reflect.TypeOf((*MockIStorage)(nil).Clone), path)\n}\n\n// Close mocks base method.\nfunc (m *MockIStorage) Close() error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Close\")\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// Close indicates an expected call of Close.\nfunc (mr *MockIStorageMockRecorder) Close() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Close\", reflect.TypeOf((*MockIStorage)(nil).Close))\n}\n\n// GetPendingTransactions mocks base method.\nfunc (m *MockIStorage) GetPendingTransactions() (map[string]*types0.TransactionInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetPendingTransactions\")\n\tret0, _ := ret[0].(map[string]*types0.TransactionInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// GetPendingTransactions indicates an expected call of GetPendingTransactions.\nfunc (mr *MockIStorageMockRecorder) GetPendingTransactions() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetPendingTransactions\", reflect.TypeOf((*MockIStorage)(nil).GetPendingTransactions))\n}\n\n// GetTransaction mocks base method.\nfunc (m *MockIStorage) GetTransaction(no int64) (*types0.TransactionInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"GetTransaction\", no)\n\tret0, _ := ret[0].(*types0.TransactionInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// GetTransaction indicates an expected call of GetTransaction.\nfunc (mr *MockIStorageMockRecorder) GetTransaction(no any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"GetTransaction\", reflect.TypeOf((*MockIStorage)(nil).GetTransaction), no)\n}\n\n// HasAddress mocks base method.\nfunc (m *MockIStorage) HasAddress(address string) bool {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"HasAddress\", address)\n\tret0, _ := ret[0].(bool)\n\treturn ret0\n}\n\n// HasAddress indicates an expected call of HasAddress.\nfunc (mr *MockIStorageMockRecorder) HasAddress(address any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"HasAddress\", reflect.TypeOf((*MockIStorage)(nil).HasAddress), address)\n}\n\n// HasTransaction mocks base method.\nfunc (m *MockIStorage) HasTransaction(txID string) bool {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"HasTransaction\", txID)\n\tret0, _ := ret[0].(bool)\n\treturn ret0\n}\n\n// HasTransaction indicates an expected call of HasTransaction.\nfunc (mr *MockIStorageMockRecorder) HasTransaction(txID any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"HasTransaction\", reflect.TypeOf((*MockIStorage)(nil).HasTransaction), txID)\n}\n\n// InsertAddress mocks base method.\nfunc (m *MockIStorage) InsertAddress(info *types0.AddressInfo) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"InsertAddress\", info)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// InsertAddress indicates an expected call of InsertAddress.\nfunc (mr *MockIStorageMockRecorder) InsertAddress(info any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"InsertAddress\", reflect.TypeOf((*MockIStorage)(nil).InsertAddress), info)\n}\n\n// InsertTransaction mocks base method.\nfunc (m *MockIStorage) InsertTransaction(info *types0.TransactionInfo) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"InsertTransaction\", info)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// InsertTransaction indicates an expected call of InsertTransaction.\nfunc (mr *MockIStorageMockRecorder) InsertTransaction(info any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"InsertTransaction\", reflect.TypeOf((*MockIStorage)(nil).InsertTransaction), info)\n}\n\n// IsLegacy mocks base method.\nfunc (m *MockIStorage) IsLegacy() bool {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"IsLegacy\")\n\tret0, _ := ret[0].(bool)\n\treturn ret0\n}\n\n// IsLegacy indicates an expected call of IsLegacy.\nfunc (mr *MockIStorageMockRecorder) IsLegacy() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"IsLegacy\", reflect.TypeOf((*MockIStorage)(nil).IsLegacy))\n}\n\n// QueryTransactions mocks base method.\nfunc (m *MockIStorage) QueryTransactions(params QueryParams) ([]*types0.TransactionInfo, error) {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"QueryTransactions\", params)\n\tret0, _ := ret[0].([]*types0.TransactionInfo)\n\tret1, _ := ret[1].(error)\n\treturn ret0, ret1\n}\n\n// QueryTransactions indicates an expected call of QueryTransactions.\nfunc (mr *MockIStorageMockRecorder) QueryTransactions(params any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"QueryTransactions\", reflect.TypeOf((*MockIStorage)(nil).QueryTransactions), params)\n}\n\n// SetDefaultFee mocks base method.\nfunc (m *MockIStorage) SetDefaultFee(fee amount.Amount) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"SetDefaultFee\", fee)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// SetDefaultFee indicates an expected call of SetDefaultFee.\nfunc (mr *MockIStorageMockRecorder) SetDefaultFee(fee any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"SetDefaultFee\", reflect.TypeOf((*MockIStorage)(nil).SetDefaultFee), fee)\n}\n\n// UpdateAddress mocks base method.\nfunc (m *MockIStorage) UpdateAddress(info *types0.AddressInfo) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"UpdateAddress\", info)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// UpdateAddress indicates an expected call of UpdateAddress.\nfunc (mr *MockIStorageMockRecorder) UpdateAddress(info any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"UpdateAddress\", reflect.TypeOf((*MockIStorage)(nil).UpdateAddress), info)\n}\n\n// UpdateTransactionStatus mocks base method.\nfunc (m *MockIStorage) UpdateTransactionStatus(no int64, status types0.TransactionStatus, blockHeight types.Height) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"UpdateTransactionStatus\", no, status, blockHeight)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// UpdateTransactionStatus indicates an expected call of UpdateTransactionStatus.\nfunc (mr *MockIStorageMockRecorder) UpdateTransactionStatus(no, status, blockHeight any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"UpdateTransactionStatus\", reflect.TypeOf((*MockIStorage)(nil).UpdateTransactionStatus), no, status, blockHeight)\n}\n\n// UpdateVault mocks base method.\nfunc (m *MockIStorage) UpdateVault(arg0 *vault.Vault) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"UpdateVault\", arg0)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}\n\n// UpdateVault indicates an expected call of UpdateVault.\nfunc (mr *MockIStorageMockRecorder) UpdateVault(arg0 any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"UpdateVault\", reflect.TypeOf((*MockIStorage)(nil).UpdateVault), arg0)\n}\n\n// Vault mocks base method.\nfunc (m *MockIStorage) Vault() *vault.Vault {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Vault\")\n\tret0, _ := ret[0].(*vault.Vault)\n\treturn ret0\n}\n\n// Vault indicates an expected call of Vault.\nfunc (mr *MockIStorageMockRecorder) Vault() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"Vault\", reflect.TypeOf((*MockIStorage)(nil).Vault))\n}\n\n// WalletInfo mocks base method.\nfunc (m *MockIStorage) WalletInfo() *types0.WalletInfo {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"WalletInfo\")\n\tret0, _ := ret[0].(*types0.WalletInfo)\n\treturn ret0\n}\n\n// WalletInfo indicates an expected call of WalletInfo.\nfunc (mr *MockIStorageMockRecorder) WalletInfo() *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"WalletInfo\", reflect.TypeOf((*MockIStorage)(nil).WalletInfo))\n}\n"
  },
  {
    "path": "wallet/transactions.go",
    "content": "package wallet\n\nimport (\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n)\n\ntype transactions struct {\n\tstorage  storage.IStorage\n\tprovider provider.IBlockchainProvider\n}\n\nfunc newTransactions(storage storage.IStorage,\n\tprovider provider.IBlockchainProvider,\n) transactions {\n\treturn transactions{\n\t\tstorage:  storage,\n\t\tprovider: provider,\n\t}\n}\n\n// listTransactionsConfig contains options for listing transactions.\ntype listTransactionsConfig struct {\n\tdirection wtypes.TxDirection\n\taddress   string\n\tcount     int\n\tskip      int\n}\n\nvar defaultListTransactionsConfig = listTransactionsConfig{\n\tdirection: wtypes.TxDirectionAny,\n\taddress:   \"*\",\n\tcount:     10,\n\tskip:      0,\n}\n\n// ListTransactionsOption is a functional option for ListTransactions.\ntype ListTransactionsOption func(*listTransactionsConfig)\n\n// WithDirection filters transactions by direction (incoming or outgoing).\nfunc WithDirection(dir wtypes.TxDirection) ListTransactionsOption {\n\treturn func(cfg *listTransactionsConfig) {\n\t\tcfg.direction = dir\n\t}\n}\n\n// WithAddress filters transactions by the specified address.\nfunc WithAddress(address string) ListTransactionsOption {\n\treturn func(cfg *listTransactionsConfig) {\n\t\tif address != \"\" {\n\t\t\tcfg.address = address\n\t\t}\n\t}\n}\n\n// WithCount sets the maximum number of transactions to return.\nfunc WithCount(count int) ListTransactionsOption {\n\treturn func(cfg *listTransactionsConfig) {\n\t\tif count > 0 {\n\t\t\tcfg.count = count\n\t\t}\n\t}\n}\n\n// WithSkip sets the number of transactions to skip.\nfunc WithSkip(skip int) ListTransactionsOption {\n\treturn func(cfg *listTransactionsConfig) {\n\t\tif skip > 0 {\n\t\t\tcfg.skip = skip\n\t\t}\n\t}\n}\n\nfunc (t *transactions) ListTransactions(opts ...ListTransactionsOption) []*wtypes.TransactionInfo {\n\tif t.storage.IsLegacy() {\n\t\treturn nil\n\t}\n\n\tcfg := defaultListTransactionsConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tparams := storage.QueryParams{\n\t\tAddress:   cfg.address,\n\t\tDirection: cfg.direction,\n\t\tCount:     cfg.count,\n\t\tSkip:      cfg.skip,\n\t}\n\n\ttxs, _ := t.storage.QueryTransactions(params)\n\n\treturn txs\n}\n\nfunc (t *transactions) processEvent(event any) {\n\tif t.storage.IsLegacy() {\n\t\treturn\n\t}\n\n\tswitch evt := event.(type) {\n\tcase *block.Block:\n\t\tt.processBlock(evt)\n\tcase *tx.Tx:\n\t\tt.processTransaction(evt)\n\tdefault:\n\t\t// ignore other events\n\t}\n}\n\nfunc (t *transactions) processBlock(blk *block.Block) {\n\tpendingTxs := t.getPendingTransaction()\n\n\tfor _, trx := range blk.Transactions() {\n\t\ttxID := trx.ID().String()\n\n\t\tif _, ok := pendingTxs[txID]; ok {\n\t\t\tpendingInfo := pendingTxs[txID]\n\t\t\tif err := t.storage.UpdateTransactionStatus(pendingInfo.No,\n\t\t\t\twtypes.TransactionStatusConfirmed, blk.Height()); err != nil {\n\t\t\t\tlogger.Warn(\"failed to update transaction status\", \"error\", err, \"id\", txID)\n\t\t\t}\n\n\t\t\tlogger.Info(\"confirmed pending transaction\", \"id\", trx.ID())\n\n\t\t\tcontinue\n\t\t}\n\n\t\t_ = t.addTransactionWithStatus(trx, wtypes.TransactionStatusConfirmed, blk.Height())\n\t}\n}\n\nfunc (t *transactions) processTransaction(trx *tx.Tx) {\n\t_ = t.addTransactionWithStatus(trx, wtypes.TransactionStatusPending, 0)\n}\n\nfunc (t *transactions) getPendingTransaction() map[string]*wtypes.TransactionInfo {\n\tpendingTxs, err := t.storage.GetPendingTransactions()\n\tif err != nil {\n\t\tlogger.Warn(\"failed to get pending transactions\", \"error\", err)\n\n\t\treturn nil\n\t}\n\n\tfor _, pendingInfo := range pendingTxs {\n\t\ttrx, err := tx.FromBytes(pendingInfo.Data)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\terr = t.provider.CheckTransaction(pendingInfo.Data)\n\t\tif err != nil {\n\t\t\tlogger.Warn(\"pending transaction is invalid\", \"error\", err, \"id\", pendingInfo.TxID)\n\t\t\tif err := t.storage.UpdateTransactionStatus(pendingInfo.No,\n\t\t\t\twtypes.TransactionStatusFailed, 0); err != nil {\n\t\t\t\tlogger.Warn(\"failed to update transaction status\", \"error\", err, \"id\", pendingInfo.TxID)\n\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\t// Re-broadcast the transaction\n\t\t_, err = t.provider.SendTx(trx)\n\t\tif err != nil {\n\t\t\tlogger.Debug(\"failed to re-broadcast pending transaction\", \"error\", err, \"id\", pendingInfo.TxID)\n\n\t\t\tcontinue\n\t\t}\n\t}\n\n\treturn pendingTxs\n}\n\nfunc (t *transactions) AddTransactionByID(txID tx.ID) error {\n\tif t.storage.IsLegacy() {\n\t\treturn nil\n\t}\n\n\tidStr := txID.String()\n\tif t.storage.HasTransaction(idStr) {\n\t\treturn ErrTransactionExists\n\t}\n\n\ttrx, height, err := t.provider.GetTransaction(idStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn t.addTransactionWithStatus(trx, wtypes.TransactionStatusConfirmed, height)\n}\n\nfunc (t *transactions) addTransactionWithStatus(trx *tx.Tx,\n\tstatus wtypes.TransactionStatus, blockHeight types.Height,\n) error {\n\ttxInfos, err := wtypes.MakeTransactionInfos(trx, status, blockHeight)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, info := range txInfos {\n\t\tif t.storage.HasAddress(info.Sender) {\n\t\t\tinfo.Direction = wtypes.TxDirectionOutgoing\n\t\t} else if t.storage.HasAddress(info.Receiver) {\n\t\t\tinfo.Direction = wtypes.TxDirectionIncoming\n\t\t} else {\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := t.storage.InsertTransaction(info); err != nil {\n\t\t\tlogger.Warn(\"failed to insert transaction into storage\", \"error\", err, \"id\", trx.ID())\n\n\t\t\treturn err\n\t\t}\n\n\t\tlogger.Info(\"added outgoing transaction to wallet\",\n\t\t\t\"id\", trx.ID(), \"status\", status, \"blockHeight\", blockHeight)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "wallet/transactions_test.go",
    "content": "package wallet\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n)\n\nfunc TestTransactionsListOptions(t *testing.T) {\n\ttests := []struct {\n\t\topts     []ListTransactionsOption\n\t\texpDir   wtypes.TxDirection\n\t\texpAddr  string\n\t\texpCount int\n\t\texpSkip  int\n\t}{\n\t\t{\n\t\t\topts:   []ListTransactionsOption{},\n\t\t\texpDir: wtypes.TxDirectionAny, expAddr: \"*\", expCount: 10, expSkip: 0,\n\t\t},\n\t\t{\n\t\t\topts: []ListTransactionsOption{\n\t\t\t\tWithDirection(wtypes.TxDirectionAny),\n\t\t\t\tWithAddress(\"\"),\n\t\t\t\tWithCount(-1),\n\t\t\t\tWithSkip(-1),\n\t\t\t},\n\t\t\texpDir: wtypes.TxDirectionAny, expAddr: \"*\", expCount: 10, expSkip: 0,\n\t\t},\n\t\t{\n\t\t\topts: []ListTransactionsOption{\n\t\t\t\tWithDirection(wtypes.TxDirectionOutgoing),\n\t\t\t\tWithAddress(\"*\"),\n\t\t\t\tWithCount(0),\n\t\t\t\tWithSkip(0),\n\t\t\t},\n\t\t\texpDir: wtypes.TxDirectionOutgoing, expAddr: \"*\", expCount: 10, expSkip: 0,\n\t\t},\n\t\t{\n\t\t\topts: []ListTransactionsOption{\n\t\t\t\tWithDirection(wtypes.TxDirectionIncoming),\n\t\t\t\tWithAddress(\"addr1\"),\n\t\t\t\tWithCount(5),\n\t\t\t\tWithSkip(2),\n\t\t\t},\n\t\t\texpDir: wtypes.TxDirectionIncoming, expAddr: \"addr1\", expCount: 5, expSkip: 2,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tcfg := defaultListTransactionsConfig\n\t\tfor _, opt := range tt.opts {\n\t\t\topt(&cfg)\n\t\t}\n\n\t\tassert.Equal(t, tt.expDir, cfg.direction)\n\t\tassert.Equal(t, tt.expAddr, cfg.address)\n\t\tassert.Equal(t, tt.expCount, cfg.count)\n\t\tassert.Equal(t, tt.expSkip, cfg.skip)\n\t}\n}\n\nfunc TestAddTransaction(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"add non-existent transaction returns error\", func(t *testing.T) {\n\t\ttxID := td.RandHash()\n\n\t\ttd.mockStorage.EXPECT().IsLegacy().Return(false)\n\t\ttd.mockStorage.EXPECT().HasTransaction(txID.String()).Return(false)\n\t\ttd.mockProvider.EXPECT().\n\t\t\tGetTransaction(txID.String()).\n\t\t\tReturn(nil, types.Height(0), errors.New(\"not exists\"))\n\n\t\terr := td.wallet.AddTransactionByID(txID)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"transaction already exists in storage\", func(t *testing.T) {\n\t\ttxID := td.RandHash()\n\n\t\ttd.mockStorage.EXPECT().IsLegacy().Return(false)\n\t\ttd.mockStorage.EXPECT().HasTransaction(txID.String()).Return(true)\n\n\t\terr := td.wallet.AddTransactionByID(txID)\n\t\trequire.ErrorIs(t, err, ErrTransactionExists)\n\t})\n\n\tt.Run(\"add new transaction successfully\", func(t *testing.T) {\n\t\ttrx := td.GenerateTestTransferTx()\n\n\t\ttd.mockStorage.EXPECT().IsLegacy().Return(false)\n\t\ttd.mockStorage.EXPECT().HasTransaction(trx.ID().String()).Return(false)\n\t\ttd.mockProvider.EXPECT().\n\t\t\tGetTransaction(trx.ID().String()).\n\t\t\tReturn(trx, td.RandHeight(), nil)\n\t\ttd.mockStorage.EXPECT().HasAddress(gomock.Any()).Return(true)\n\t\ttd.mockStorage.EXPECT().InsertTransaction(gomock.Any()).Return(nil)\n\n\t\terr := td.wallet.AddTransactionByID(trx.ID())\n\t\trequire.NoError(t, err)\n\t})\n}\n"
  },
  {
    "path": "wallet/tx_builder.go",
    "content": "package wallet\n\nimport (\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n)\n\n// TxOption defines a function type used to apply options to a txBuilder.\ntype TxOption func(builder *txBuilder) error\n\n// OptionLockTime sets the lock time for the transaction.\nfunc OptionLockTime(lockTime types.Height) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tbuilder.lockTime = lockTime\n\n\t\treturn nil\n\t}\n}\n\n// OptionFee sets the transaction fee using a string input.\nfunc OptionFee(feeStr string) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tif feeStr == \"\" {\n\t\t\treturn nil\n\t\t}\n\n\t\tfee, err := amount.FromString(feeStr)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbuilder.fee = fee\n\n\t\treturn nil\n\t}\n}\n\n// OptionMemo sets a memo or note for the transaction.\nfunc OptionMemo(memo string) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tbuilder.memo = memo\n\n\t\treturn nil\n\t}\n}\n\n// OptionDelegateOwner sets delegation owner address for bond/unbond transactions.\nfunc OptionDelegateOwner(owner string) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tif owner == \"\" {\n\t\t\treturn nil\n\t\t}\n\n\t\tdelegateOwner, err := crypto.AddressFromString(owner)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbuilder.delegateOwner = &delegateOwner\n\n\t\treturn nil\n\t}\n}\n\n// OptionDelegateShare sets delegation owner reward share for delegated bond transactions.\nfunc OptionDelegateShare(shareStr string) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tif shareStr == \"\" {\n\t\t\treturn nil\n\t\t}\n\n\t\tshare, err := amount.FromString(shareStr)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbuilder.delegateShare = share\n\n\t\treturn nil\n\t}\n}\n\n// OptionDelegateExpiry sets delegation expiry height for delegated bond transactions.\nfunc OptionDelegateExpiry(expiry types.Height) func(builder *txBuilder) error {\n\treturn func(builder *txBuilder) error {\n\t\tbuilder.delegateExpiry = expiry\n\n\t\treturn nil\n\t}\n}\n\n// txBuilder helps build and configure a transaction before submitting it.\ntype txBuilder struct {\n\tprovider       provider.IBlockchainProvider\n\tsender         *crypto.Address\n\treceiver       *crypto.Address\n\tpub            *bls.PublicKey\n\tdelegateOwner  *crypto.Address\n\tdelegateShare  amount.Amount\n\tdelegateExpiry types.Height\n\ttyp            payload.Type\n\tlockTime       types.Height\n\tamount         amount.Amount\n\tfee            amount.Amount\n\tmemo           string\n}\n\n// setSenderAddr sets the sender's address for the transaction.\nfunc (m *txBuilder) setSenderAddr(addr string) error {\n\tsender, err := crypto.AddressFromString(addr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.sender = &sender\n\n\treturn nil\n}\n\n// setReceiverAddress sets the recipient's address for the transaction.\nfunc (m *txBuilder) setReceiverAddress(addr string) error {\n\treceiver, err := crypto.AddressFromString(addr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.receiver = &receiver\n\n\treturn nil\n}\n\n// setPublicKey sets the public key for the transaction, typically used in bond transactions.\nfunc (m *txBuilder) setPublicKey(pubStr string) error {\n\tpub, err := bls.PublicKeyFromString(pubStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tm.pub = pub\n\n\treturn nil\n}\n\n// build constructs and finalizes the transaction, selecting the appropriate type based on the builder's configuration.\nfunc (m *txBuilder) build() (*tx.Tx, error) {\n\terr := m.setLockTime()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar trx *tx.Tx\n\tswitch m.typ {\n\tcase payload.TypeTransfer:\n\t\ttrx = tx.NewTransferTx(m.lockTime, *m.sender, *m.receiver, m.amount, m.fee, tx.WithMemo(m.memo))\n\tcase payload.TypeBond:\n\t\tpub := m.pub\n\t\tval, _ := m.provider.GetValidator(m.receiver.String())\n\t\tif val != nil {\n\t\t\t// validator exists\n\t\t\tpub = nil\n\t\t}\n\t\ttrx = tx.NewBondTx(m.lockTime, *m.sender, *m.receiver, pub, m.amount, m.fee, tx.WithMemo(m.memo))\n\t\tif m.delegateOwner != nil {\n\t\t\tbondPld := trx.Payload().(*payload.BondPayload)\n\t\t\tbondPld.DelegateOwner = *m.delegateOwner\n\t\t\tbondPld.DelegateShare = m.delegateShare\n\t\t\tbondPld.DelegateExpiry = m.delegateExpiry\n\t\t}\n\n\tcase payload.TypeUnbond:\n\t\ttrx = tx.NewUnbondTx(m.lockTime, *m.sender, tx.WithMemo(m.memo))\n\t\tif m.delegateOwner != nil {\n\t\t\tunbondPld := trx.Payload().(*payload.UnbondPayload)\n\t\t\tunbondPld.DelegateOwner = *m.delegateOwner\n\t\t}\n\n\tcase payload.TypeWithdraw:\n\t\ttrx = tx.NewWithdrawTx(m.lockTime, *m.sender, *m.receiver, m.amount, m.fee, tx.WithMemo(m.memo))\n\n\tcase payload.TypeBatchTransfer:\n\t\treturn nil, errors.New(\"BatchTransfer is not implemented yet\")\n\n\tcase payload.TypeSortition:\n\t\treturn nil, errors.New(\"unable to build sortition transactions\")\n\t}\n\n\treturn trx, nil\n}\n\n// setLockTime assigns a lock time to the transaction.\n// If not provided, it retrieves the last block height and increments it.\nfunc (m *txBuilder) setLockTime() error {\n\tif m.lockTime == 0 {\n\t\theight, err := m.provider.LastBlockHeight()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tm.lockTime = height + 1\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "wallet/types/types.go",
    "content": "package types\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n)\n\n// WalletInfo represents the information about the wallet.\ntype WalletInfo struct {\n\tVersion    int\n\tDriver     string\n\tPath       string\n\tNetwork    genesis.ChainType\n\tDefaultFee amount.Amount\n\tUUID       string\n\tEncrypted  bool\n\tNeutered   bool\n\tCreatedAt  time.Time\n}\n\n// AddressInfo represents the information about a wallet address.\ntype AddressInfo struct {\n\tAddress   string    `json:\"address\"`\n\tPublicKey string    `json:\"public_key\"`\n\tLabel     string    `json:\"label\"`\n\tPath      string    `json:\"path\"`\n\tCreatedAt time.Time `json:\"-\"`\n\tUpdatedAt time.Time `json:\"-\"`\n}\n\ntype TransactionStatus int\n\nconst (\n\tTransactionStatusFailed    = TransactionStatus(-1)\n\tTransactionStatusPending   = TransactionStatus(0)\n\tTransactionStatusConfirmed = TransactionStatus(1)\n)\n\nfunc (ts TransactionStatus) String() string {\n\tswitch ts {\n\tcase TransactionStatusFailed:\n\t\treturn \"failed\"\n\tcase TransactionStatusPending:\n\t\treturn \"pending\"\n\tcase TransactionStatusConfirmed:\n\t\treturn \"confirmed\"\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n\n// TxDirection indicates whether to include incoming or outgoing transactions.\ntype TxDirection int\n\nconst (\n\t// TxDirectionAny includes both incoming and outgoing transactions.\n\tTxDirectionAny TxDirection = 0\n\t// TxDirectionIncoming includes only incoming transactions where the wallet receives funds.\n\tTxDirectionIncoming = 1\n\t// TxDirectionOutgoing includes only outgoing transactions where the wallet sends funds.\n\tTxDirectionOutgoing = 2\n)\n\nfunc (dir TxDirection) String() string {\n\tswitch dir {\n\tcase TxDirectionAny:\n\t\treturn \"any\"\n\tcase TxDirectionIncoming:\n\t\treturn \"incoming\"\n\tcase TxDirectionOutgoing:\n\t\treturn \"outgoing\"\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n\ntype TransactionInfo struct {\n\tNo          int64\n\tTxID        string\n\tSender      string\n\tReceiver    string\n\tDirection   TxDirection\n\tAmount      amount.Amount\n\tFee         amount.Amount\n\tMemo        string\n\tStatus      TransactionStatus\n\tBlockHeight types.Height\n\tPayloadType payload.Type\n\tData        []byte\n\tComment     string\n\tCreatedAt   time.Time\n\tUpdatedAt   time.Time\n}\n\n// MakeTransactionInfos builds one or more TransactionInfo entries from the given transaction.\n//\n// It may return multiple entries (one per recipient) to support batch transfer transactions.\n// Note that the caller is responsible for setting the transaction direction.\nfunc MakeTransactionInfos(trx *tx.Tx, status TransactionStatus, blockHeight types.Height) ([]*TransactionInfo, error) {\n\tdata, err := trx.Bytes()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to serialize tx: %w\", err)\n\t}\n\n\treceivers := make([]string, 0)\n\tswitch pld := trx.Payload().(type) {\n\tcase *payload.TransferPayload:\n\t\treceivers = append(receivers, pld.To.String())\n\tcase *payload.BondPayload:\n\t\treceivers = append(receivers, pld.To.String())\n\tcase *payload.UnbondPayload:\n\t\treceivers = append(receivers, pld.Validator.String())\n\tcase *payload.WithdrawPayload:\n\t\treceivers = append(receivers, pld.To.String())\n\tcase *payload.SortitionPayload:\n\t\treceivers = append(receivers, \"\")\n\tcase *payload.BatchTransferPayload:\n\t\tfor _, recipient := range pld.Recipients {\n\t\t\treceivers = append(receivers, recipient.To.String())\n\t\t}\n\t}\n\n\tinfos := make([]*TransactionInfo, len(receivers))\n\tfor i, receiver := range receivers {\n\t\tinfos[i] = &TransactionInfo{\n\t\t\tTxID:        trx.ID().String(),\n\t\t\tSender:      trx.Payload().Signer().String(),\n\t\t\tReceiver:    receiver,\n\t\t\tDirection:   TxDirectionAny,\n\t\t\tAmount:      trx.Payload().Value(),\n\t\t\tFee:         trx.Fee(),\n\t\t\tMemo:        trx.Memo(),\n\t\t\tStatus:      status,\n\t\t\tBlockHeight: blockHeight,\n\t\t\tPayloadType: trx.Payload().Type(),\n\t\t\tData:        data,\n\t\t}\n\t}\n\n\treturn infos, nil\n}\n"
  },
  {
    "path": "wallet/vault/errors.go",
    "content": "package vault\n\nimport (\n\t\"errors\"\n)\n\nvar (\n\t// ErrInvalidPath describes an error in which the key path is invalid.\n\tErrInvalidPath = errors.New(\"the key path is invalid\")\n\n\t// ErrNeutered describes an error in which the wallet is neutered.\n\tErrNeutered = errors.New(\"wallet is neutered\")\n\n\t// ErrUnsupportedPurpose describes an error in which the purpose is not supported.\n\tErrUnsupportedPurpose = errors.New(\"unsupported purpose\")\n)\n"
  },
  {
    "path": "wallet/vault/utils.go",
    "content": "package vault\n\nimport (\n\t\"github.com/pactus-project/pactus/util/bip39\"\n)\n\n// GenerateMnemonic generates a new mnemonic (seed phrase) based on BIP-39\n// https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\nfunc GenerateMnemonic(bitSize int) (string, error) {\n\tentropy, err := bip39.NewEntropy(bitSize)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn bip39.NewMnemonic(entropy)\n}\n\n// CheckMnemonic validates a mnemonic (seed phrase) based on BIP-39.\nfunc CheckMnemonic(mnemonic string) error {\n\t_, err := bip39.EntropyFromMnemonic(mnemonic)\n\n\treturn err\n}\n"
  },
  {
    "path": "wallet/vault/utils_test.go",
    "content": "package vault\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestGenerateMnemonic(t *testing.T) {\n\t_, err := GenerateMnemonic(127)\n\trequire.Error(t, err, \"low entropy\")\n\n\t_, err = GenerateMnemonic(128)\n\trequire.NoError(t, err)\n\n\t_, err = GenerateMnemonic(257)\n\trequire.Error(t, err, \"high entropy\")\n\n\t_, err = GenerateMnemonic(256)\n\trequire.NoError(t, err)\n}\n\nfunc TestValidateMnemonic(t *testing.T) {\n\ttests := []struct {\n\t\tmnenomic string\n\t\terrStr   string\n\t}{\n\t\t{\n\t\t\t\"\",\n\t\t\t\"invalid mnenomic\",\n\t\t},\n\t\t{\n\t\t\t\"abandon ability able about above absent absorb abstract absurd abuse access\",\n\t\t\t\"invalid mnenomic\",\n\t\t},\n\t\t{\n\t\t\t\"bandon ability able about above absent absorb abstract absurd abuse access ability\",\n\t\t\t\"word `bandon` not found in reverse map\",\n\t\t},\n\t\t{\n\t\t\t\"abandon ability able about above absent absorb abstract absurd abuse access accident\",\n\t\t\t\"checksum incorrect\",\n\t\t},\n\t\t{\n\t\t\t\"abandon ability able about above absent absorb abstract absurd abuse access ability\",\n\t\t\t\"\",\n\t\t},\n\t}\n\tfor no, tt := range tests {\n\t\terr := CheckMnemonic(tt.mnenomic)\n\t\tif err != nil {\n\t\t\tassert.Equal(t, tt.errStr, err.Error(), \"test %v failed\", no)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "wallet/vault/vault.go",
    "content": "package vault\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\tblshdkeychain \"github.com/pactus-project/pactus/crypto/bls/hdkeychain\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\ted25519hdkeychain \"github.com/pactus-project/pactus/crypto/ed25519/hdkeychain\"\n\t\"github.com/pactus-project/pactus/util/bip39\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/encrypter\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n)\n\n//\n// Deterministic Hierarchical Derivation Path\n//\n// Overview:\n//\n// This specification defines a hierarchical derivation path for generating addresses, based on BIP32.\n// The path is structured into four distinct levels:\n//\n// m / purpose' / coin_type' / address_type' / address_index\n//\n// Explanation:\n//\n//   `m` Denotes the master node (or root) of the tree\n//   `'` Apostrophe in the path indicates that BIP32 hardened derivation is used.\n//   `/` Separates the tree into depths, thus i / j signifies that j is a child of i\n//\n// Path Components:\n//\n// * `purpose`: Indicates the specific use case for the derived addresses:\n//    - 12381: Used for the BLS12-381 curve, based on PIP-8.\n//    - 65535: Used for imported private keys, based on PIP-13.\n//    - 44: A comprehensive purpose for standard curves, based on BIP-44.\n//\n// * `coin_type`: Identifies the coin type:\n//    - 21888: Pactus Mainnet\n//    - 21777: Pactus Testnet\n//\n// * `address_type`: Specifies the type of address.\n//\n// * `address_index`: A sequential number and increase when a new address is derived.\n//\n// References:\n//  - https://pips.pactus.org/PIPs/pip-8\n//  - https://pips.pactus.org/PIPs/pip-13\n//  - https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki\n//\n\n// VaultType represents the type of vault.\ntype VaultType int\n\nconst (\n\tTypeFull     VaultType = iota + 1 // Full vault with private keys.\n\tTypeNeutered                      // Neutered vault without private keys.\n)\n\n// String returns the string representation of the VaultType.\nfunc (vt VaultType) String() string {\n\tswitch vt {\n\tcase TypeFull:\n\t\treturn \"Full\"\n\tcase TypeNeutered:\n\t\treturn \"Neutered\"\n\tdefault:\n\t\treturn \"Unknown\"\n\t}\n}\n\n// AddressGapLimit is the maximum number of consecutive inactive addresses before stopping recovery.\nconst AddressGapLimit = 8\n\ntype Vault struct {\n\tType      VaultType            `json:\"type\"`      // Vault type: Full or Neutered\n\tCoinType  addresspath.CoinType `json:\"coin_type\"` // Coin type: 21888 for Mainnet, 21777 for Testnet\n\tEncrypter encrypter.Encrypter  `json:\"encrypter\"` // Encryption algorithm\n\tKeyStore  string               `json:\"key_store\"` // KeyStore that stores the secrets and encrypts using Encrypter\n\tPurposes  Purposes             `json:\"purposes\"`  // Contains Purposes of the vault\n}\n\ntype keyStore struct {\n\tMasterNode   masterNode `json:\"master_node\"`   // HD Root Tree (Master node)\n\tImportedKeys []string   `json:\"imported_keys\"` // Imported private keys\n}\n\ntype masterNode struct {\n\tMnemonic string `json:\"seed,omitempty\"` // Seed phrase or mnemonic (encrypted)\n}\n\ntype Purposes struct {\n\tPurposeBLS   purposeBLS   `json:\"purpose_bls\"`   // BLS Purpose: m/12381'/21888'/1' or 2'/0\n\tPurposeBIP44 purposeBIP44 `json:\"purpose_bip44\"` // BIP44 Purpose: m/44'/21888'/3'/0'\n}\n\ntype purposeBLS struct {\n\tXPubValidator      string `json:\"xpub_account\"`         // Extended public key for account: m/12381'/21888'/1'/0\n\tXPubAccount        string `json:\"xpub_validator\"`       // Extended public key for validator: m/12381'/21888'/2'/0\n\tNextAccountIndex   uint32 `json:\"next_account_index\"`   // Index of next derived account\n\tNextValidatorIndex uint32 `json:\"next_validator_index\"` // Index of next derived validator\n}\n\ntype purposeBIP44 struct {\n\tNextEd25519Index uint32 `json:\"next_ed25519_index\"` // Index of next Ed25519 derived account: m/44'/21888/3'/0'\n}\n\nfunc CreateVaultFromMnemonic(mnemonic string, coinType addresspath.CoinType) (*Vault, error) {\n\tseed, err := bip39.NewSeedWithErrorChecking(mnemonic, \"\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmasterKey, err := blshdkeychain.NewMaster(seed, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tenc := encrypter.NopeEncrypter()\n\n\txPubValidator, err := masterKey.DerivePath([]uint32{\n\t\taddresspath.Harden(addresspath.PurposeBLS12381),\n\t\taddresspath.Harden(coinType),\n\t\taddresspath.Harden(crypto.AddressTypeValidator),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\txPubAccount, err := masterKey.DerivePath([]uint32{\n\t\taddresspath.Harden(addresspath.PurposeBLS12381),\n\t\taddresspath.Harden(coinType),\n\t\taddresspath.Harden(crypto.AddressTypeBLSAccount),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tstore := keyStore{\n\t\tMasterNode: masterNode{\n\t\t\tMnemonic: mnemonic,\n\t\t},\n\t\tImportedKeys: make([]string, 0),\n\t}\n\n\tstoreDate, err := json.Marshal(store)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Vault{\n\t\tType:      TypeFull,\n\t\tCoinType:  coinType,\n\t\tEncrypter: enc,\n\t\tKeyStore:  string(storeDate),\n\t\tPurposes: Purposes{\n\t\t\tPurposeBLS: purposeBLS{\n\t\t\t\tXPubValidator: xPubValidator.Neuter().String(),\n\t\t\t\tXPubAccount:   xPubAccount.Neuter().String(),\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\nfunc (v *Vault) Neuter() {\n\tv.Type = TypeNeutered\n\tv.Encrypter = encrypter.NopeEncrypter()\n\tv.KeyStore = \"\"\n}\n\nfunc (v *Vault) IsNeutered() bool {\n\treturn v.Type == TypeNeutered\n}\n\nfunc (v *Vault) UpdatePassword(oldPassword, newPassword string, opts ...encrypter.Option) error {\n\tif v.IsNeutered() {\n\t\treturn ErrNeutered\n\t}\n\n\tkeyStore, err := v.decryptKeyStore(oldPassword)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tnewEncrypter := encrypter.NopeEncrypter()\n\tif newPassword != \"\" {\n\t\tnewEncrypter = encrypter.DefaultEncrypter(opts...)\n\t}\n\tv.Encrypter = newEncrypter\n\terr = v.encryptKeyStore(keyStore, newPassword)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tv.Encrypter = newEncrypter\n\n\treturn nil\n}\n\nfunc (v *Vault) IsEncrypted() bool {\n\treturn v.Encrypter.IsEncrypted()\n}\n\nfunc (v *Vault) ImportBLSPrivateKey(password string, prv *bls.PrivateKey) (\n\tvalInfo *types.AddressInfo, accInfo *types.AddressInfo, err error,\n) {\n\tif v.IsNeutered() {\n\t\treturn nil, nil, ErrNeutered\n\t}\n\n\tkeyStore, err := v.decryptKeyStore(password)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tpub := prv.PublicKeyNative()\n\taddressIndex := len(keyStore.ImportedKeys)\n\n\tblsAccPathStr := addresspath.NewPath(\n\t\taddresspath.Harden(addresspath.PurposeImportPrivateKey),\n\t\taddresspath.Harden(v.CoinType),\n\t\taddresspath.Harden(crypto.AddressTypeBLSAccount),\n\t\taddresspath.Harden(addressIndex)).String()\n\n\tblsValidatorPathStr := addresspath.NewPath(\n\t\taddresspath.Harden(addresspath.PurposeImportPrivateKey),\n\t\taddresspath.Harden(v.CoinType),\n\t\taddresspath.Harden(crypto.AddressTypeValidator),\n\t\taddresspath.Harden(addressIndex)).String()\n\n\taccInfo = &types.AddressInfo{\n\t\tAddress:   pub.AccountAddress().String(),\n\t\tPublicKey: pub.String(),\n\t\tLabel:     \"Imported BLS Account Address\",\n\t\tPath:      blsAccPathStr,\n\t}\n\n\tvalInfo = &types.AddressInfo{\n\t\tAddress:   pub.ValidatorAddress().String(),\n\t\tPublicKey: pub.String(),\n\t\tLabel:     \"Imported Validator Address\",\n\t\tPath:      blsValidatorPathStr,\n\t}\n\n\tkeyStore.ImportedKeys = append(keyStore.ImportedKeys, prv.String())\n\n\terr = v.encryptKeyStore(keyStore, password)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn valInfo, accInfo, nil\n}\n\nfunc (v *Vault) ImportEd25519PrivateKey(password string, prv *ed25519.PrivateKey) (*types.AddressInfo, error) {\n\tif v.IsNeutered() {\n\t\treturn nil, ErrNeutered\n\t}\n\n\tkeyStore, err := v.decryptKeyStore(password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddressIndex := len(keyStore.ImportedKeys)\n\tpub := prv.PublicKeyNative()\n\n\taccPathStr := addresspath.NewPath(\n\t\taddresspath.Harden(addresspath.PurposeImportPrivateKey),\n\t\taddresspath.Harden(v.CoinType),\n\t\taddresspath.Harden(crypto.AddressTypeEd25519Account),\n\t\taddresspath.Harden(addressIndex)).String()\n\n\taccInfo := &types.AddressInfo{\n\t\tAddress:   pub.AccountAddress().String(),\n\t\tPublicKey: pub.String(),\n\t\tLabel:     \"Imported Ed25519 Account Address\",\n\t\tPath:      accPathStr,\n\t}\n\n\tkeyStore.ImportedKeys = append(keyStore.ImportedKeys, prv.String())\n\n\terr = v.encryptKeyStore(keyStore, password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn accInfo, nil\n}\n\n// PrivateKeys retrieves the private keys for the given addresses using the provided password.\nfunc (v *Vault) PrivateKeys(password string, paths []addresspath.Path) ([]crypto.PrivateKey, error) {\n\tif v.IsNeutered() {\n\t\treturn nil, ErrNeutered\n\t}\n\n\t// Decrypt the key store once to avoid decrypting for each key.\n\tkeyStore, err := v.decryptKeyStore(password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tseed := bip39.NewSeed(keyStore.MasterNode.Mnemonic, \"\")\n\n\tkeys := make([]crypto.PrivateKey, len(paths))\n\tfor i, path := range paths {\n\t\tswitch path.Purpose() {\n\t\tcase addresspath.PurposeBLS12381:\n\t\t\tprvKey, err := v.deriveBLSPrivateKey(seed, path)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tkeys[i] = prvKey\n\t\tcase addresspath.PurposeBIP44:\n\t\t\tprvKey, err := v.deriveEd25519PrivateKey(seed, path)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tkeys[i] = prvKey\n\t\tcase addresspath.PurposeImportPrivateKey:\n\t\t\tindex := addresspath.UnHarden(path.AddressIndex())\n\t\t\tstr := keyStore.ImportedKeys[index]\n\n\t\t\tvar prv crypto.PrivateKey\n\t\t\tswitch uint32(path.AddressType()) {\n\t\t\tcase uint32(crypto.AddressTypeValidator),\n\t\t\t\tuint32(crypto.AddressTypeBLSAccount):\n\t\t\t\tprv, err = bls.PrivateKeyFromString(str)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\tcase uint32(crypto.AddressTypeEd25519Account):\n\t\t\t\tprv, err = ed25519.PrivateKeyFromString(str)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tkeys[i] = prv\n\t\tdefault:\n\t\t\treturn nil, ErrUnsupportedPurpose\n\t\t}\n\t}\n\n\treturn keys, nil\n}\n\nfunc (v *Vault) NewValidatorAddress(label string) (*types.AddressInfo, error) {\n\text, err := blshdkeychain.NewKeyFromString(v.Purposes.PurposeBLS.XPubValidator)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tindex := v.Purposes.PurposeBLS.NextValidatorIndex\n\text, err = ext.DerivePath([]uint32{index})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tblsPubKey, err := bls.PublicKeyFromBytes(ext.RawPublicKey())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddr := blsPubKey.ValidatorAddress().String()\n\tinfo := types.AddressInfo{\n\t\tAddress:   addr,\n\t\tLabel:     label,\n\t\tPublicKey: blsPubKey.String(),\n\t\tPath:      addresspath.NewPath(ext.Path()...).String(),\n\t}\n\n\tv.Purposes.PurposeBLS.NextValidatorIndex++\n\n\treturn &info, nil\n}\n\nfunc (v *Vault) NewBLSAccountAddress(label string) (*types.AddressInfo, error) {\n\text, err := blshdkeychain.NewKeyFromString(v.Purposes.PurposeBLS.XPubAccount)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tindex := v.Purposes.PurposeBLS.NextAccountIndex\n\tinfo, err := v.deriveBLSAccountAddressAt(ext, index, label)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tv.Purposes.PurposeBLS.NextAccountIndex++\n\n\treturn info, nil\n}\n\nfunc (*Vault) deriveBLSAccountAddressAt(ext *blshdkeychain.ExtendedKey,\n\tindex uint32, label string,\n) (*types.AddressInfo, error) {\n\text, err := ext.DerivePath([]uint32{index})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tblsPubKey, err := bls.PublicKeyFromBytes(ext.RawPublicKey())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddr := blsPubKey.AccountAddress().String()\n\tinfo := types.AddressInfo{\n\t\tAddress:   addr,\n\t\tLabel:     label,\n\t\tPublicKey: blsPubKey.String(),\n\t\tPath:      addresspath.NewPath(ext.Path()...).String(),\n\t}\n\n\treturn &info, nil\n}\n\nfunc (v *Vault) NewEd25519AccountAddress(label, password string) (*types.AddressInfo, error) {\n\tseed, err := v.MnemonicSeed(password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmasterKey, err := ed25519hdkeychain.NewMaster(seed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tindex := v.Purposes.PurposeBIP44.NextEd25519Index\n\tinfo, err := v.deriveEd25519AccountAddressAt(masterKey, index, label)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tv.Purposes.PurposeBIP44.NextEd25519Index++\n\n\treturn info, nil\n}\n\nfunc (v *Vault) deriveEd25519AccountAddressAt(masterKey *ed25519hdkeychain.ExtendedKey,\n\tindex uint32, label string,\n) (*types.AddressInfo, error) {\n\text, err := masterKey.DerivePath([]uint32{\n\t\taddresspath.Harden(addresspath.PurposeBIP44),\n\t\taddresspath.Harden(v.CoinType),\n\t\taddresspath.Harden(crypto.AddressTypeEd25519Account),\n\t\taddresspath.Harden(index),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ted25519PubKey, err := ed25519.PublicKeyFromBytes(ext.RawPublicKey())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddr := ed25519PubKey.AccountAddress().String()\n\tinfo := types.AddressInfo{\n\t\tAddress:   addr,\n\t\tLabel:     label,\n\t\tPublicKey: ed25519PubKey.String(),\n\t\tPath:      addresspath.NewPath(ext.Path()...).String(),\n\t}\n\n\treturn &info, nil\n}\n\nfunc (v *Vault) Mnemonic(password string) (string, error) {\n\tkeyStore, err := v.decryptKeyStore(password)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn keyStore.MasterNode.Mnemonic, nil\n}\n\nfunc (v *Vault) MnemonicSeed(password string) ([]byte, error) {\n\tmnemonic, err := v.Mnemonic(password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tseed := bip39.NewSeed(mnemonic, \"\")\n\n\treturn seed, nil\n}\n\nfunc (v *Vault) decryptKeyStore(password string) (*keyStore, error) {\n\tif v.IsNeutered() {\n\t\treturn nil, ErrNeutered\n\t}\n\n\tkeyStoreData, err := v.Encrypter.Decrypt(v.KeyStore, password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tkeyStore := new(keyStore)\n\terr = json.Unmarshal([]byte(keyStoreData), keyStore)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn keyStore, nil\n}\n\nfunc (v *Vault) encryptKeyStore(keyStore *keyStore, password string) error {\n\tkeyStoreData, err := json.Marshal(keyStore)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tkeyStoreEnc, err := v.Encrypter.Encrypt(string(keyStoreData), password)\n\tif err != nil {\n\t\treturn err\n\t}\n\tv.KeyStore = keyStoreEnc\n\n\treturn nil\n}\n\nfunc (*Vault) deriveBLSPrivateKey(mnemonicSeed []byte, path []uint32) (*bls.PrivateKey, error) {\n\tmasterKey, err := blshdkeychain.NewMaster(mnemonicSeed, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\text, err := masterKey.DerivePath(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tprvBytes, err := ext.RawPrivateKey()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn bls.PrivateKeyFromBytes(prvBytes)\n}\n\nfunc (*Vault) deriveEd25519PrivateKey(mnemonicSeed []byte, path []uint32) (*ed25519.PrivateKey, error) {\n\tmasterKey, err := ed25519hdkeychain.NewMaster(mnemonicSeed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\text, err := masterKey.DerivePath(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tprvBytes := ext.RawPrivateKey()\n\n\treturn ed25519.PrivateKeyFromBytes(prvBytes)\n}\n\n// RecoverAddresses automatically recovers used addresses when restoring a wallet from a mnemonic phrase.\n// This implementation follows PIP-41 specification for address recovery.\n//\n// The function recovers both BLS and Ed25519 account addresses, with Ed25519 being the default\n// address type for recovery when the wallet is empty.\n//\n// An address is considered active if its public key is stored in the blockchain database.\n// The hasActivity function should return true if the address has been used before.\n//\n// Limitation: Users cannot automatically recover a used address if it is separated by more than 8\n// inactive or empty addresses. In this case, manual address creation is required.\n//\n// Reference: https://pips.pactus.org/PIPs/pip-41\nfunc (v *Vault) RecoverAddresses(ctx context.Context, password string,\n\thasActivity func(addr string) (bool, error),\n) ([]types.AddressInfo, error) {\n\trecovered1, err := v.recoverBLSAccountAddresses(ctx, hasActivity)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecovered2, err := v.recoverEd25519AccountAddresses(ctx, password, hasActivity)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecovered1 = append(recovered1, recovered2...)\n\n\treturn recovered1, nil\n}\n\n// scanRecoveredCount scans derived addresses until the gap limit is exceeded and\n// returns how many addresses should be recovered according to PIP-41.\nfunc (*Vault) scanRecoveredCount(\n\tctx context.Context,\n\tstartIndex uint32,\n\tderiveAt func(index uint32) (*types.AddressInfo, error),\n\thasActivity func(addr string) (bool, error),\n) (int, error) {\n\trecoveredCount := 0\n\tinactiveCount := 1\n\tcurrentIndex := startIndex\n\n\tinfo, err := deriveAt(currentIndex)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tfor {\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn 0, ctx.Err()\n\t\tdefault:\n\t\t}\n\n\t\tisActive, err := hasActivity(info.Address)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\n\t\tif isActive {\n\t\t\trecoveredCount += inactiveCount\n\t\t\tinactiveCount = 1\n\t\t} else {\n\t\t\tinactiveCount++\n\t\t\tif inactiveCount > AddressGapLimit {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tcurrentIndex++\n\t\tinfo, err = deriveAt(currentIndex)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\treturn recoveredCount, nil\n}\n\n// recoverBLSAccountAddresses recovers BLS account addresses following the PIP-41 specification.\nfunc (v *Vault) recoverBLSAccountAddresses(ctx context.Context,\n\thasActivity func(addrs string) (bool, error),\n) ([]types.AddressInfo, error) {\n\text, err := blshdkeychain.NewKeyFromString(v.Purposes.PurposeBLS.XPubAccount)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecoveredCount, err := v.scanRecoveredCount(\n\t\tctx,\n\t\tv.Purposes.PurposeBLS.NextAccountIndex,\n\t\tfunc(index uint32) (*types.AddressInfo, error) {\n\t\t\treturn v.deriveBLSAccountAddressAt(ext, index, \"\")\n\t\t},\n\t\thasActivity,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecovered := make([]types.AddressInfo, 0, recoveredCount)\n\tfor i := 0; i < recoveredCount; i++ {\n\t\tinfo, _ := v.NewBLSAccountAddress(fmt.Sprintf(\"BLS Account Address %d\", i))\n\t\trecovered = append(recovered, *info)\n\t}\n\n\treturn recovered, nil\n}\n\n// recoverEd25519AccountAddresses recovers Ed25519 account addresses following the PIP-41 specification.\nfunc (v *Vault) recoverEd25519AccountAddresses(ctx context.Context, password string,\n\thasActivity func(addrs string) (bool, error),\n) ([]types.AddressInfo, error) {\n\tseed, err := v.MnemonicSeed(password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmasterKey, err := ed25519hdkeychain.NewMaster(seed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecoveredCount, err := v.scanRecoveredCount(\n\t\tctx,\n\t\tv.Purposes.PurposeBIP44.NextEd25519Index,\n\t\tfunc(index uint32) (*types.AddressInfo, error) {\n\t\t\treturn v.deriveEd25519AccountAddressAt(masterKey, index, \"\")\n\t\t},\n\t\thasActivity,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trecovered := make([]types.AddressInfo, 0, recoveredCount)\n\tfor i := 0; i < recoveredCount; i++ {\n\t\tinfo, _ := v.NewEd25519AccountAddress(fmt.Sprintf(\"Ed25519 Account Address %d\", i), password)\n\t\trecovered = append(recovered, *info)\n\t}\n\n\treturn recovered, nil\n}\n"
  },
  {
    "path": "wallet/vault/vault_test.go",
    "content": "package vault\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/encrypter\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tvault     *Vault\n\tmnemonic  string\n\tpassword  string\n\ttestAddrs []*types.AddressInfo\n}\n\n// setup returns an instances of vault fo testing.\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tpassword := ts.RandString(32)\n\tmnemonic, _ := GenerateMnemonic(128)\n\tvault, err := CreateVaultFromMnemonic(mnemonic, 21888)\n\trequire.NoError(t, err)\n\n\t// Create some test address\n\taddr1, err := vault.NewBLSAccountAddress(\"bls-account-address\")\n\trequire.NoError(t, err)\n\taddr2, err := vault.NewEd25519AccountAddress(\"ed25519-account-address\", \"\")\n\trequire.NoError(t, err)\n\taddr3, err := vault.NewValidatorAddress(\"validator-address\")\n\trequire.NoError(t, err)\n\n\t_, importedBLSPrv := ts.RandBLSKeyPair()\n\taddr4, addr5, err := vault.ImportBLSPrivateKey(\"\", importedBLSPrv)\n\trequire.NoError(t, err)\n\n\t_, importedEd25519Prv := ts.RandEd25519KeyPair()\n\taddr6, err := vault.ImportEd25519PrivateKey(\"\", importedEd25519Prv)\n\trequire.NoError(t, err)\n\n\ttestAddrs := []*types.AddressInfo{addr1, addr2, addr3, addr4, addr5, addr6}\n\n\tassert.False(t, vault.IsEncrypted())\n\n\t// Set encryption options to minimal values for faster test execution.\n\topts := []encrypter.Option{\n\t\tencrypter.OptionIteration(1),\n\t\tencrypter.OptionMemory(8),\n\t\tencrypter.OptionParallelism(1),\n\t}\n\n\terr = vault.UpdatePassword(\"\", password, opts...)\n\trequire.NoError(t, err)\n\tassert.True(t, vault.IsEncrypted())\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tvault:     vault,\n\t\tpassword:  password,\n\t\tmnemonic:  mnemonic,\n\t\ttestAddrs: testAddrs,\n\t}\n}\n\nfunc TestCreateVaultFromMnemonic(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Invalid mnemonic\", func(t *testing.T) {\n\t\t_, err := CreateVaultFromMnemonic(\"invalid mnemonic phrase seed\", 21888)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\trecovered, err := CreateVaultFromMnemonic(td.mnemonic, 21888)\n\t\trequire.NoError(t, err)\n\n\t\tvaultMnemonic, err := recovered.Mnemonic(\"\")\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, vaultMnemonic, td.mnemonic)\n\n\t\tassert.Zero(t, recovered.Purposes.PurposeBLS.NextAccountIndex)\n\t\tassert.Zero(t, recovered.Purposes.PurposeBLS.NextValidatorIndex)\n\t\tassert.Zero(t, recovered.Purposes.PurposeBIP44.NextEd25519Index)\n\n\t\t// Recover addresses\n\t\t_, err = recovered.NewBLSAccountAddress(\"bls-account-address\")\n\t\trequire.NoError(t, err)\n\t\t_, err = recovered.NewEd25519AccountAddress(\"ed25519-account-address\", \"\")\n\t\trequire.NoError(t, err)\n\t\t_, err = recovered.NewValidatorAddress(\"validator-address\")\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, recovered.Purposes, td.vault.Purposes)\n\t})\n}\n\nfunc TestGetPrivateKeys(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Unknown purpose\", func(t *testing.T) {\n\t\tpath, _ := addresspath.FromString(\"m/0\")\n\t\t_, err := td.vault.PrivateKeys(td.password, []addresspath.Path{path})\n\t\trequire.ErrorIs(t, err, ErrUnsupportedPurpose)\n\t})\n\n\tt.Run(\"No password\", func(t *testing.T) {\n\t\tpath, _ := addresspath.FromString(\"m/44/21888/3/0\")\n\t\t_, err := td.vault.PrivateKeys(\"\", []addresspath.Path{path})\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\tpath, _ := addresspath.FromString(\"m/44/21888/3/0\")\n\t\t_, err := td.vault.PrivateKeys(\"wrong_password\", []addresspath.Path{path})\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Check all the private keys\", func(t *testing.T) {\n\t\tfor _, info := range td.testAddrs {\n\t\t\tpath, _ := addresspath.FromString(info.Path)\n\t\t\tprv, err := td.vault.PrivateKeys(td.password, []addresspath.Path{path})\n\t\t\trequire.NoError(t, err)\n\n\t\t\tswitch path.AddressType() {\n\t\t\tcase crypto.AddressTypeBLSAccount,\n\t\t\t\tcrypto.AddressTypeValidator:\n\t\t\t\tpub, _ := bls.PublicKeyFromString(info.PublicKey)\n\t\t\t\trequire.True(t, prv[0].PublicKey().EqualsTo(pub))\n\t\t\tcase crypto.AddressTypeEd25519Account:\n\t\t\t\tpub, _ := ed25519.PublicKeyFromString(info.PublicKey)\n\t\t\t\trequire.True(t, prv[0].PublicKey().EqualsTo(pub))\n\t\t\tcase crypto.AddressTypeTreasury:\n\t\t\t\tassert.Fail(t, \"not supported\")\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc TestImportBLSPrivateKey(t *testing.T) {\n\ttd := setup(t)\n\n\t_, prv := td.RandBLSKeyPair()\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\t_, _, err := td.vault.ImportBLSPrivateKey(\"invalid-password\", prv)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\taccInfo, valInfo, err := td.vault.ImportBLSPrivateKey(td.password, prv)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, prv.PublicKeyNative().String(), accInfo.PublicKey)\n\t\tassert.Equal(t, prv.PublicKeyNative().String(), valInfo.PublicKey)\n\n\t\tassert.Equal(t, \"m/65535'/21888'/1'/2'\", accInfo.Path)\n\t\tassert.Equal(t, \"m/65535'/21888'/2'/2'\", valInfo.Path)\n\t})\n}\n\nfunc TestImportEd25519PrivateKey(t *testing.T) {\n\ttd := setup(t)\n\n\t_, prv := td.RandEd25519KeyPair()\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\t_, err := td.vault.ImportEd25519PrivateKey(\"invalid-password\", prv)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tinfo, err := td.vault.ImportEd25519PrivateKey(td.password, prv)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, prv.PublicKeyNative().String(), info.PublicKey)\n\t\tassert.Equal(t, \"m/65535'/21888'/3'/2'\", info.Path)\n\t})\n}\n\nfunc TestGetMnemonic(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"Invalid password\", func(t *testing.T) {\n\t\t_, err := td.vault.Mnemonic(\"invalid-password\")\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"No password\", func(t *testing.T) {\n\t\t_, err := td.vault.Mnemonic(\"\")\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\tm, err := td.vault.Mnemonic(td.password)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, m, td.mnemonic)\n\t})\n}\n\nfunc TestUpdatePassword(t *testing.T) {\n\ttd := setup(t)\n\n\topts := []encrypter.Option{\n\t\tencrypter.OptionIteration(1),\n\t\tencrypter.OptionMemory(1),\n\t\tencrypter.OptionParallelism(1),\n\t}\n\n\tnewPassword := \"new-password\"\n\n\tt.Run(\"Rejects empty current password\", func(t *testing.T) {\n\t\terr := td.vault.UpdatePassword(\"\", newPassword)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Rejects incorrect current password\", func(t *testing.T) {\n\t\terr := td.vault.UpdatePassword(\"invalid-password\", newPassword)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Updates password with valid current password\", func(t *testing.T) {\n\t\trequire.NoError(t, td.vault.UpdatePassword(td.password, newPassword, opts...))\n\t\tassert.True(t, td.vault.IsEncrypted())\n\t})\n\n\tt.Run(\"Old password is no longer valid after update\", func(t *testing.T) {\n\t\terr := td.vault.UpdatePassword(td.password, newPassword)\n\t\trequire.ErrorIs(t, err, encrypter.ErrInvalidPassword)\n\t})\n\n\tt.Run(\"Clears vault password when new password is empty\", func(t *testing.T) {\n\t\trequire.NoError(t, td.vault.UpdatePassword(newPassword, \"\"))\n\t\tassert.False(t, td.vault.IsEncrypted())\n\t})\n}\n\nfunc TestNeuter(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.vault.Neuter()\n\n\tassert.True(t, td.vault.IsNeutered())\n\n\t_, err := td.vault.Mnemonic(td.password)\n\trequire.ErrorIs(t, err, ErrNeutered)\n\n\t_, err = td.vault.PrivateKeys(td.password, []addresspath.Path{})\n\trequire.ErrorIs(t, err, ErrNeutered)\n\n\t_, _, err = td.vault.ImportBLSPrivateKey(\"any\", nil)\n\trequire.ErrorIs(t, err, ErrNeutered)\n\n\t_, err = td.vault.ImportEd25519PrivateKey(\"any\", nil)\n\trequire.ErrorIs(t, err, ErrNeutered)\n\n\terr = td.vault.UpdatePassword(\"any\", \"any\")\n\trequire.ErrorIs(t, err, ErrNeutered)\n}\n\n// TestAddressRecovery tests the address recovery functionality according to PIP-41 specification.\n// This test verifies that the RecoverAddresses function correctly identifies and recovers\n// previously used addresses when restoring a wallet from a mnemonic phrase.\n//\n// The first 8 BLS account addresses for the test mnemonic are:\n// pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf (index 0)\n// pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns (index 1)\n// pc1zaj6dzh6zg8zsgzy2rrtvyyeg0l4d32p8e6xn5h (index 2)\n// pc1ztmex7taes23h6z4jf0awwmps0zpzmecuzcsev0 (index 3)\n// pc1zkry0kt7fxufqjql6zus54a397w4ukqqg0l2sz4 (index 4)\n// pc1zqar4tm23a3k0cyy3n86fq59psajah3wgm3hc4x (index 5)\n// pc1zpmxu83gp7y84ekn89rfkyf099sj6f9jlmututf (index 6)\n// pc1zydjhrq06ngg6nwqs8n8jkyw6u58qlqc5cqqxht (index 7)\n//\n// The first 8 Ed25519 account addresses for the test mnemonic are:\n// pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3 (index 0)\n// pc1r7aynw9urvh66ktr3fte2gskjjnxzruflkgde94 (index 1)\n// pc1ruumtknmwr6ns32rkezfph38tawwx7gesmykk4g (index 2)\n// pc1r4waddcacrxw2vg4ge8vtlnk9mnccnuv0374xuv (index 3)\n// pc1re5an4nasvgpmxmuptxxd8hqy6adncqy4qyhj8w (index 4)\n// pc1rul34wczhq44s5chtxvlgmrgf6dp0xx47zzg9ud (index 5)\n// pc1r77rvd98gld8vfgzfa89har678dlpm9pkxex4zf (index 6)\n// pc1rmzpqfhs4ekrevmwwj2gsz6m4kjym3eg99x7zk5 (index 7)\n//\n// The test uses a mock hasActivity function to simulate blockchain activity checks.\nfunc TestAddressRecovery(t *testing.T) {\n\t//nolint:dupword // has duplicated words\n\ttestMnemonic := \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon cactus\"\n\n\tt.Run(\"recover addresses from a fresh wallet without any active addresses\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\t// Mock hasActivity to return false for all addresses (no active addresses)\n\t\thasActivity := func(_ string) (bool, error) {\n\t\t\treturn false, nil\n\t\t}\n\n\t\trecovered, err := vault.RecoverAddresses(t.Context(), \"\", hasActivity)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Empty(t, recovered)\n\t})\n\n\tt.Run(\"recover addresses with one gap at the beginning\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\t// Mock hasActivity to return true only for the first call (address at index 0)\n\t\thasActivity := func(addr string) (bool, error) {\n\t\t\treturn addr == \"pc1r7aynw9urvh66ktr3fte2gskjjnxzruflkgde94\" ||\n\t\t\t\taddr == \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\", nil\n\t\t}\n\n\t\trecovered, err := vault.RecoverAddresses(t.Context(), \"\", hasActivity)\n\t\trequire.NoError(t, err)\n\n\t\t// Should have 4 addresses\n\t\tassert.Len(t, recovered, 4)\n\t\tassert.Equal(t, \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\", recovered[0].Address)\n\t\tassert.Equal(t, \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\", recovered[1].Address)\n\t\tassert.Equal(t, \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\", recovered[2].Address)\n\t\tassert.Equal(t, \"pc1r7aynw9urvh66ktr3fte2gskjjnxzruflkgde94\", recovered[3].Address)\n\t})\n\n\tt.Run(\"recover addresses with gaps in the middle of the address list\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\thasActivity := func(addr string) (bool, error) {\n\t\t\treturn addr == \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\" ||\n\t\t\t\taddr == \"pc1r7aynw9urvh66ktr3fte2gskjjnxzruflkgde94\" ||\n\t\t\t\taddr == \"pc1r4waddcacrxw2vg4ge8vtlnk9mnccnuv0374xuv\" ||\n\t\t\t\taddr == \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\" ||\n\t\t\t\taddr == \"pc1ztmex7taes23h6z4jf0awwmps0zpzmecuzcsev0\", nil\n\t\t}\n\n\t\trecovered, err := vault.RecoverAddresses(t.Context(), \"\", hasActivity)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Len(t, recovered, 8)\n\n\t\tassert.Equal(t, \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\", recovered[0].Address)\n\t\tassert.Equal(t, \"pc1z4xuja689hg2434yhr32clhn97x6afw58a5n9ns\", recovered[1].Address)\n\t\tassert.Equal(t, \"pc1zaj6dzh6zg8zsgzy2rrtvyyeg0l4d32p8e6xn5h\", recovered[2].Address)\n\t\tassert.Equal(t, \"pc1ztmex7taes23h6z4jf0awwmps0zpzmecuzcsev0\", recovered[3].Address)\n\t\tassert.Equal(t, \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\", recovered[4].Address)\n\t\tassert.Equal(t, \"pc1r7aynw9urvh66ktr3fte2gskjjnxzruflkgde94\", recovered[5].Address)\n\t\tassert.Equal(t, \"pc1ruumtknmwr6ns32rkezfph38tawwx7gesmykk4g\", recovered[6].Address)\n\t\tassert.Equal(t, \"pc1r4waddcacrxw2vg4ge8vtlnk9mnccnuv0374xuv\", recovered[7].Address)\n\t})\n\n\tt.Run(\"prevent recovering existing address\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\t_, _ = vault.NewEd25519AccountAddress(\"existing address\", \"\")\n\n\t\thasActivity := func(addr string) (bool, error) {\n\t\t\treturn addr == \"pc1rcx9x55nfme5juwdgxd2ksjdcmhvmvkrygmxpa3\", nil\n\t\t}\n\n\t\trecovered, err := vault.RecoverAddresses(t.Context(), \"\", hasActivity)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Empty(t, recovered)\n\t})\n\n\tt.Run(\"error handling\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\t// Mock hasActivity to return an error\n\t\thasActivity := func(_ string) (bool, error) {\n\t\t\treturn false, errors.New(\"blockchain connection error\")\n\t\t}\n\n\t\t_, err = vault.RecoverAddresses(t.Context(), \"\", hasActivity)\n\t\trequire.Error(t, err)\n\t\tassert.Contains(t, err.Error(), \"blockchain connection error\")\n\t})\n\n\tt.Run(\"cancel recovery with context cancel signal\", func(t *testing.T) {\n\t\tvault, err := CreateVaultFromMnemonic(testMnemonic, 21888) // Mainnet\n\t\trequire.NoError(t, err)\n\n\t\t// Create a cancellable context\n\t\tctx, cancel := context.WithCancel(t.Context())\n\n\t\t// Counter to track how many times hasActivity is called\n\t\tcallCount := 0\n\n\t\t// Mock hasActivity to cancel context after a few calls\n\t\thasActivity := func(_ string) (bool, error) {\n\t\t\tcallCount++\n\t\t\t// Cancel the context after 3 calls to simulate interruption during recovery\n\t\t\tif callCount >= 3 {\n\t\t\t\tcancel()\n\t\t\t}\n\n\t\t\treturn false, nil\n\t\t}\n\n\t\t_, err = vault.RecoverAddresses(ctx, \"\", hasActivity)\n\t\trequire.Error(t, err)\n\t\tassert.Equal(t, context.Canceled, err)\n\t})\n}\n"
  },
  {
    "path": "wallet/wallet.go",
    "content": "package wallet\n\nimport (\n\t\"context\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/encrypter\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n\t\"github.com/pactus-project/pactus/wallet/provider/offline\"\n\t\"github.com/pactus-project/pactus/wallet/provider/remote\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\t\"github.com/pactus-project/pactus/wallet/storage/jsonstorage\"\n\t\"github.com/pactus-project/pactus/wallet/storage/sqlitestorage\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\ntype Wallet struct {\n\taddresses\n\ttransactions\n\n\tprovider provider.IBlockchainProvider\n\tstorage  storage.IStorage\n}\n\n// GenerateMnemonic is a wrapper for `vault.GenerateMnemonic`.\nfunc GenerateMnemonic(entropy int) (string, error) {\n\treturn vault.GenerateMnemonic(entropy)\n}\n\n// CheckMnemonic is a wrapper for `vault.CheckMnemonic`.\nfunc CheckMnemonic(mnemonic string) error {\n\treturn vault.CheckMnemonic(mnemonic)\n}\n\n// Create creates a wallet from mnemonic (seed phrase) and save it at the\n// given path.\nfunc Create(ctx context.Context, walletPath, mnemonic, password string,\n\tchain genesis.ChainType, opts ...OpenWalletOption,\n) (*Wallet, error) {\n\twalletPath = util.MakeAbs(walletPath)\n\tif util.PathExists(walletPath) {\n\t\treturn nil, ExitsError{\n\t\t\tPath: walletPath,\n\t\t}\n\t}\n\n\tcoinType := addresspath.CoinTypePactusMainnet\n\tif chain != genesis.Mainnet {\n\t\tcoinType = addresspath.CoinTypePactusTestnet\n\t\tcrypto.ToTestnetHRP()\n\t}\n\n\tvlt, err := vault.CreateVaultFromMnemonic(mnemonic, coinType)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\terr = vlt.UpdatePassword(\"\", password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcfg := defaultOpenWalletConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tstorage, err := sqlitestorage.Create(ctx, walletPath, chain, vlt,\n\t\tsqlitestorage.WithLockingMode(cfg.lockMode))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn New(ctx, storage, opts...)\n}\n\n// Open tries to open a wallet at the given path.\n// It first tries the SQLite backend; if that fails, it falls back to the legacy JSON wallet format.\n// A wallet can be opened in offline or online modes.\n// Offline wallet doesn’t have any connection to any node.\n// Online wallet has a connection to one of the pre-defined servers.\nfunc Open(ctx context.Context, walletPath string, opts ...OpenWalletOption) (*Wallet, error) {\n\tcfg := defaultOpenWalletConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tif util.IsDir(walletPath) {\n\t\tsqliteStrg, err := sqlitestorage.Open(ctx, walletPath,\n\t\t\tsqlitestorage.WithLockingMode(cfg.lockMode))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn New(ctx, sqliteStrg, opts...)\n\t}\n\n\t// Fallback to JSON storage for legacy wallets\n\tif err := jsonstorage.Upgrade(walletPath); err != nil {\n\t\treturn nil, err\n\t}\n\n\tjsonStrg, err := jsonstorage.Open(walletPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn New(ctx, jsonStrg, opts...)\n}\n\ntype openWalletConfig struct {\n\teventPipe pipeline.Pipeline[any]\n\tprovider  provider.IBlockchainProvider\n\tlockMode  bool\n}\n\nvar defaultOpenWalletConfig = openWalletConfig{\n\teventPipe: nil,\n\tprovider:  nil,\n\tlockMode:  true,\n}\n\ntype OpenWalletOption func(*openWalletConfig)\n\nfunc WithEventPipe(eventPipe pipeline.Pipeline[any]) OpenWalletOption {\n\treturn func(cfg *openWalletConfig) {\n\t\tcfg.eventPipe = eventPipe\n\t}\n}\n\nfunc WithBlockchainProvider(provider provider.IBlockchainProvider) OpenWalletOption {\n\treturn func(cfg *openWalletConfig) {\n\t\tcfg.provider = provider\n\t}\n}\n\nfunc WithOfflineProvider() OpenWalletOption {\n\treturn func(cfg *openWalletConfig) {\n\t\tcfg.provider = offline.NewOfflineBlockchainProvider()\n\t}\n}\n\n// WithLockMode configures exclusive or normal database locking.\nfunc WithLockMode(lockMode bool) OpenWalletOption {\n\treturn func(cfg *openWalletConfig) {\n\t\tcfg.lockMode = lockMode\n\t}\n}\n\nfunc New(ctx context.Context, storage storage.IStorage, opts ...OpenWalletOption) (*Wallet, error) {\n\tif storage.Vault().CoinType != addresspath.CoinTypePactusMainnet {\n\t\tcrypto.ToTestnetHRP()\n\t}\n\n\tcfg := defaultOpenWalletConfig\n\tfor _, opt := range opts {\n\t\topt(&cfg)\n\t}\n\n\tif cfg.provider == nil {\n\t\tprovider, err := remote.NewRemoteBlockchainProvider(ctx, storage.WalletInfo().Network)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcfg.provider = provider\n\t}\n\n\twlt := &Wallet{\n\t\taddresses:    newAddresses(storage),\n\t\ttransactions: newTransactions(storage, cfg.provider),\n\t\tprovider:     cfg.provider,\n\t\tstorage:      storage,\n\t}\n\n\tif cfg.eventPipe != nil {\n\t\tcfg.eventPipe.RegisterReceiver(wlt.transactions.processEvent)\n\t}\n\n\treturn wlt, nil\n}\n\nfunc (w *Wallet) Close() {\n\tif err := w.provider.Close(); err != nil {\n\t\tlogger.Warn(\"failed to close provider\", \"error\", err)\n\t}\n\n\tif err := w.storage.Close(); err != nil {\n\t\tlogger.Warn(\"failed to close storage\", \"error\", err)\n\t}\n}\n\nfunc (w *Wallet) Version() int {\n\treturn w.storage.WalletInfo().Version\n}\n\nfunc (w *Wallet) Info() *types.WalletInfo {\n\treturn w.storage.WalletInfo()\n}\n\nfunc (w *Wallet) Path() string {\n\treturn w.storage.WalletInfo().Path\n}\n\nfunc (w *Wallet) IsEncrypted() bool {\n\treturn w.storage.WalletInfo().Encrypted\n}\n\n// Neuter clones the wallet and neuters it and saves it at the given path.\nfunc (w *Wallet) Neuter(path string) error {\n\tcloned, err := w.storage.Clone(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvault := cloned.Vault()\n\tvault.Neuter()\n\n\treturn cloned.UpdateVault(vault)\n}\n\n// RecoveryAddresses recovers active addresses in the wallet.\nfunc (w *Wallet) RecoveryAddresses(ctx context.Context, password string,\n\teventFunc func(addr string),\n) error {\n\tvault := w.storage.Vault()\n\trecovered, err := vault.RecoverAddresses(ctx, password, func(addr string) (bool, error) {\n\t\t_, err := w.provider.GetAccount(addr)\n\t\tif err != nil {\n\t\t\ts, ok := status.FromError(err)\n\t\t\tif ok && s.Code() == codes.NotFound {\n\t\t\t\treturn false, nil\n\t\t\t}\n\n\t\t\treturn false, err\n\t\t}\n\n\t\tif eventFunc != nil {\n\t\t\teventFunc(addr)\n\t\t}\n\n\t\treturn true, nil\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, info := range recovered {\n\t\terr := w.storage.InsertAddress(&info)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn w.storage.UpdateVault(vault)\n}\n\n// Balance returns balance of the account associated with the address..\nfunc (w *Wallet) Balance(addrStr string) (amount.Amount, error) {\n\tacc, err := w.provider.GetAccount(addrStr)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn acc.Balance(), nil\n}\n\n// Stake returns stake of the validator associated with the address..\nfunc (w *Wallet) Stake(addrStr string) (amount.Amount, error) {\n\tval, err := w.provider.GetValidator(addrStr)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\treturn val.Stake(), nil\n}\n\n// TotalBalance return the total available balance of the wallet.\nfunc (w *Wallet) TotalBalance() (amount.Amount, error) {\n\ttotalBalance := amount.Amount(0)\n\tinfos := w.ListAddresses(OnlyAccountAddresses())\n\tfor _, info := range infos {\n\t\tacc, err := w.provider.GetAccount(info.Address)\n\t\tif err == nil {\n\t\t\ttotalBalance += acc.Balance()\n\t\t}\n\t}\n\n\treturn totalBalance, nil\n}\n\n// TotalStake return total available stake of the wallet.\nfunc (w *Wallet) TotalStake() (amount.Amount, error) {\n\ttotalStake := amount.Amount(0)\n\n\tinfos := w.ListAddresses(OnlyValidatorAddresses())\n\tfor _, info := range infos {\n\t\tval, err := w.provider.GetValidator(info.Address)\n\t\tif err == nil {\n\t\t\ttotalStake += val.Stake()\n\t\t}\n\t}\n\n\treturn totalStake, nil\n}\n\n// MakeTransferTx creates a new transfer transaction based on the given parameters.\nfunc (w *Wallet) MakeTransferTx(sender, receiver string, amt amount.Amount,\n\toptions ...TxOption,\n) (*tx.Tx, error) {\n\tmaker, err := w.makeTxBuilder(options...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setSenderAddr(sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setReceiverAddress(receiver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmaker.amount = amt\n\tmaker.typ = payload.TypeTransfer\n\n\treturn maker.build()\n}\n\n// MakeBondTx creates a new bond transaction based on the given parameters.\nfunc (w *Wallet) MakeBondTx(sender, receiver, pubKey string, amt amount.Amount,\n\toptions ...TxOption,\n) (*tx.Tx, error) {\n\tmaker, err := w.makeTxBuilder(options...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setSenderAddr(sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setReceiverAddress(receiver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif pubKey == \"\" {\n\t\t// Let's check if we can get public key from the wallet\n\t\tinfo, _ := w.AddressInfo(receiver)\n\t\tif info != nil {\n\t\t\tpubKey = info.PublicKey\n\t\t}\n\t}\n\tif pubKey != \"\" {\n\t\terr = maker.setPublicKey(pubKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tmaker.amount = amt\n\tmaker.typ = payload.TypeBond\n\n\treturn maker.build()\n}\n\n// MakeUnbondTx creates a new unbond transaction based on the given parameters.\nfunc (w *Wallet) MakeUnbondTx(addr string, opts ...TxOption) (*tx.Tx, error) {\n\tmaker, err := w.makeTxBuilder(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setSenderAddr(addr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmaker.typ = payload.TypeUnbond\n\n\treturn maker.build()\n}\n\n// MakeWithdrawTx creates a new withdraw transaction based on the given\n// parameters.\nfunc (w *Wallet) MakeWithdrawTx(sender, receiver string, amt amount.Amount,\n\toptions ...TxOption,\n) (*tx.Tx, error) {\n\tmaker, err := w.makeTxBuilder(options...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setSenderAddr(sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = maker.setReceiverAddress(receiver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmaker.amount = amt\n\tmaker.typ = payload.TypeWithdraw\n\n\treturn maker.build()\n}\n\nfunc (w *Wallet) SignTransaction(password string, trx *tx.Tx) error {\n\tprv, err := w.PrivateKey(password, trx.Payload().Signer().String())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsig := prv.Sign(trx.SignBytes())\n\ttrx.SetSignature(sig)\n\ttrx.SetPublicKey(prv.PublicKey())\n\n\treturn nil\n}\n\nfunc (w *Wallet) BroadcastTransaction(trx *tx.Tx) (string, error) {\n\thash, err := w.provider.SendTx(trx)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\ttxInfos, _ := types.MakeTransactionInfos(trx, types.TransactionStatusPending, 0)\n\tfor _, info := range txInfos {\n\t\tinfo.Direction = types.TxDirectionOutgoing\n\t\terr := w.storage.InsertTransaction(info)\n\t\tif err != nil {\n\t\t\tlogger.Warn(\"transaction broadcasted but not recorded in wallet storage\", \"error\", err)\n\t\t}\n\t}\n\n\treturn hash, nil\n}\n\nfunc (w *Wallet) UpdatePassword(oldPassword, newPassword string, opts ...encrypter.Option) error {\n\tvault := w.storage.Vault()\n\terr := vault.UpdatePassword(oldPassword, newPassword, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn w.storage.UpdateVault(vault)\n}\n\nfunc (w *Wallet) Mnemonic(password string) (string, error) {\n\treturn w.storage.Vault().Mnemonic(password)\n}\n\nfunc (w *Wallet) SignMessage(password, addr, msg string) (string, error) {\n\tprv, err := w.PrivateKey(password, addr)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn prv.Sign([]byte(msg)).String(), nil\n}\n\n// makeTxBuilder initializes a txBuilder with provided options, allowing for flexible configuration of the transaction.\nfunc (w *Wallet) makeTxBuilder(options ...TxOption) (*txBuilder, error) {\n\tbuilder := &txBuilder{\n\t\tprovider: w.provider,\n\t\tfee:      w.storage.WalletInfo().DefaultFee,\n\t}\n\tfor _, op := range options {\n\t\terr := op(builder)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn builder, nil\n}\n\nfunc (w *Wallet) SetDefaultFee(fee amount.Amount) error {\n\treturn w.storage.SetDefaultFee(fee)\n}\n\n// SetProvider sets the blockchain provider for the wallet.\nfunc (w *Wallet) SetProvider(provider provider.IBlockchainProvider) {\n\tw.provider = provider\n\tw.transactions.provider = provider\n}\n"
  },
  {
    "path": "wallet/wallet_test.go",
    "content": "package wallet\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/pactus-project/pactus/wallet/addresspath\"\n\t\"github.com/pactus-project/pactus/wallet/provider\"\n\t\"github.com/pactus-project/pactus/wallet/provider/offline\"\n\t\"github.com/pactus-project/pactus/wallet/storage\"\n\twtypes \"github.com/pactus-project/pactus/wallet/types\"\n\t\"github.com/pactus-project/pactus/wallet/vault\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\twallet       *Wallet\n\tpassword     string\n\ttestVault    *vault.Vault\n\tmockStorage  *storage.MockIStorage\n\tmockProvider *provider.MockIBlockchainProvider\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\tmockStorage := storage.NewMockIStorage(ts.Ctrl)\n\tmockProvider := provider.NewMockIBlockchainProvider(ts.Ctrl)\n\n\tmnemonic1, _ := GenerateMnemonic(128)\n\ttestVault, _ := vault.CreateVaultFromMnemonic(mnemonic1, addresspath.CoinTypePactusMainnet)\n\tmockStorage.EXPECT().Vault().Return(testVault).AnyTimes()\n\n\tvar wlt *Wallet\n\n\tt.Cleanup(func() {\n\t\tmockProvider.EXPECT().Close().Times(1)\n\t\tmockStorage.EXPECT().Close().Times(1)\n\t\tif wlt != nil {\n\t\t\twlt.Close()\n\t\t}\n\t})\n\n\twlt, err := New(t.Context(), mockStorage, WithBlockchainProvider(mockProvider))\n\trequire.NoError(t, err)\n\n\treturn &testData{\n\t\tTestSuite:    ts,\n\t\ttestVault:    testVault,\n\t\tmockStorage:  mockStorage,\n\t\tmockProvider: mockProvider,\n\t\twallet:       wlt,\n\t\tpassword:     \"\",\n\t}\n}\n\nfunc (td *testData) RandMemo() string {\n\treturn td.RandString(32)\n}\n\nfunc TestCheckMnemonic(t *testing.T) {\n\tfor _, entropy := range []int{128, 160, 192, 224, 256} {\n\t\tmnemonic, _ := GenerateMnemonic(entropy)\n\t\trequire.NoError(t, CheckMnemonic(mnemonic))\n\t}\n}\n\nfunc TestOpenWallet(t *testing.T) {\n\tt.Run(\"Invalid wallet path\", func(t *testing.T) {\n\t\t_, err := Open(t.Context(), util.TempFilePath())\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Invalid data\", func(t *testing.T) {\n\t\tpath := util.TempFilePath()\n\t\trequire.NoError(t, util.WriteFile(path, []byte(\"invalid_data\")))\n\n\t\t_, err := Open(t.Context(), path)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestCreateWallet(t *testing.T) {\n\tmnemonic, _ := GenerateMnemonic(256)\n\tpassword := \"\"\n\tt.Run(\"Wallet exists\", func(t *testing.T) {\n\t\tpath := util.TempFilePath()\n\t\terr := util.WriteFile(path, []byte(\"something-here\"))\n\t\trequire.NoError(t, err)\n\n\t\t_, err = Create(t.Context(), path, mnemonic, password, genesis.Mainnet)\n\t\trequire.Error(t, err, \"%+v\", ExitsError{Path: path})\n\t})\n\n\tt.Run(\"Invalid mnemonic\", func(t *testing.T) {\n\t\t_, err := Create(t.Context(), util.TempFilePath(), \"invalid mnemonic\", password, genesis.Mainnet)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Invalid path\", func(t *testing.T) {\n\t\t_, err := Create(t.Context(), \"\\x00\", mnemonic, password, genesis.Mainnet)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\twalletPath := util.TempFilePath()\n\t\t_, err := Create(t.Context(), walletPath, mnemonic, password, genesis.Mainnet)\n\t\trequire.NoError(t, err)\n\t})\n}\n\nfunc TestSetDefaultFee(t *testing.T) {\n\ttd := setup(t)\n\n\tfee := td.RandFee()\n\ttd.mockStorage.EXPECT().SetDefaultFee(fee).Return(nil)\n\n\terr := td.wallet.SetDefaultFee(fee)\n\trequire.NoError(t, err)\n}\n\nfunc TestMnemonic(t *testing.T) {\n\ttd := setup(t)\n\n\tmnemonic1, err := td.testVault.Mnemonic(td.password)\n\trequire.NoError(t, err)\n\n\tmnemonic2, err := td.wallet.Mnemonic(td.password)\n\trequire.NoError(t, err)\n\tassert.Equal(t, mnemonic1, mnemonic2)\n}\n\nfunc TestSignMessage(t *testing.T) {\n\ttd := setup(t)\n\n\tmsg := \"pactus\"\n\texpectedSig := \"8c3ba687e8e4c016293a2c369493faa565065987544a59baba7aadae3f17ada07883552b6c7d1d7eb49f46fbdf0975c4\"\n\tprv, err := bls.PrivateKeyFromString(\"SECRET1P9QAUKRJAU7SQ7AT6ZZ6HXHYLMKPQSQYTGDL2VMH5Q5N0P5Q2QW0QL45AY3\")\n\trequire.NoError(t, err)\n\n\t_, accInfo, err := td.testVault.ImportBLSPrivateKey(td.password, prv)\n\trequire.NoError(t, err)\n\n\tt.Run(\"Unexpected Error\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().AddressInfo(accInfo.Address).Return(nil, errors.New(\"unexpected error\"))\n\n\t\t_, err := td.wallet.SignMessage(td.password, \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\", msg)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"Ok\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().AddressInfo(accInfo.Address).Return(accInfo, nil)\n\n\t\tsig, err := td.wallet.SignMessage(td.password, \"pc1z0m0vw8sjfgv7f2zgq2hfxutg8rwn7gpffhe8tf\", msg)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, expectedSig, sig)\n\t})\n}\n\nfunc TestBalance(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"existing account\", func(t *testing.T) {\n\t\tacc, addr := td.GenerateTestAccount()\n\t\ttd.mockProvider.EXPECT().GetAccount(addr.String()).Return(acc, nil)\n\n\t\tamt, err := td.wallet.Balance(addr.String())\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, amt, acc.Balance())\n\t})\n\n\tt.Run(\"non-existing account\", func(t *testing.T) {\n\t\taddr := td.RandAccAddress()\n\t\ttd.mockProvider.EXPECT().GetAccount(addr.String()).Return(nil, errors.New(\"account not found\"))\n\n\t\tamt, err := td.wallet.Balance(addr.String())\n\t\trequire.Error(t, err)\n\t\tassert.Zero(t, amt)\n\t})\n}\n\nfunc TestStake(t *testing.T) {\n\ttd := setup(t)\n\n\tt.Run(\"existing validator\", func(t *testing.T) {\n\t\tval := td.GenerateTestValidator()\n\t\ttd.mockProvider.EXPECT().GetValidator(val.Address().String()).Return(val, nil)\n\n\t\tamt, err := td.wallet.Stake(val.Address().String())\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, amt, val.Stake())\n\t})\n\n\tt.Run(\"non-existing validator\", func(t *testing.T) {\n\t\taddr := td.RandValAddress()\n\t\ttd.mockProvider.EXPECT().GetValidator(addr.String()).Return(nil, errors.New(\"validator not found\"))\n\n\t\tamt, err := td.wallet.Stake(addr.String())\n\t\trequire.Error(t, err)\n\t\tassert.Zero(t, amt)\n\t})\n}\n\nfunc TestSigningTxWithBLS(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderInfo, err := td.testVault.NewBLSAccountAddress(\"test\")\n\trequire.NoError(t, err)\n\treceiver := td.RandAccAddress()\n\tamt := td.RandAmount()\n\tfee := td.RandFee()\n\tlockTime := td.RandHeight()\n\tmemo := td.RandMemo()\n\n\topts := []TxOption{\n\t\tOptionFee(fee.String()),\n\t\tOptionLockTime(lockTime),\n\t\tOptionMemo(memo),\n\t}\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()})\n\ttd.mockStorage.EXPECT().AddressInfo(senderInfo.Address).Return(senderInfo, nil)\n\n\ttrx, err := td.wallet.MakeTransferTx(senderInfo.Address, receiver.String(), amt, opts...)\n\trequire.NoError(t, err)\n\terr = td.wallet.SignTransaction(td.password, trx)\n\trequire.NoError(t, err)\n\tassert.NotNil(t, trx.Signature())\n\trequire.NoError(t, trx.BasicCheck())\n\n\ttd.mockProvider.EXPECT().SendTx(trx).Return(trx.ID().String(), nil)\n\ttd.mockStorage.EXPECT().InsertTransaction(gomock.Any()).Return(nil)\n\n\tid, err := td.wallet.BroadcastTransaction(trx)\n\trequire.NoError(t, err)\n\tassert.Equal(t, trx.ID().String(), id)\n\tassert.Equal(t, fee, trx.Fee())\n\tassert.Equal(t, lockTime, trx.LockTime())\n\tassert.Equal(t, memo, trx.Memo())\n}\n\nfunc TestSigningTxWithEd25519(t *testing.T) {\n\ttd := setup(t)\n\n\tsenderInfo, err := td.testVault.NewEd25519AccountAddress(\"testing addr\", td.password)\n\trequire.NoError(t, err)\n\treceiver := td.RandAccAddress()\n\tamt := td.RandAmount()\n\tfee := td.RandFee()\n\tlockTime := td.RandHeight()\n\tmemo := td.RandMemo()\n\n\topts := []TxOption{\n\t\tOptionFee(fee.String()),\n\t\tOptionLockTime(lockTime),\n\t\tOptionMemo(memo),\n\t}\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()})\n\ttd.mockStorage.EXPECT().AddressInfo(senderInfo.Address).Return(senderInfo, nil)\n\ttrx, err := td.wallet.MakeTransferTx(senderInfo.Address, receiver.String(), amt, opts...)\n\trequire.NoError(t, err)\n\n\terr = td.wallet.SignTransaction(td.password, trx)\n\trequire.NoError(t, err)\n\tassert.NotNil(t, trx.Signature())\n\trequire.NoError(t, trx.BasicCheck())\n\n\ttd.mockProvider.EXPECT().SendTx(trx).Return(trx.ID().String(), nil)\n\ttd.mockStorage.EXPECT().InsertTransaction(gomock.Any()).Return(nil)\n\n\tid, err := td.wallet.BroadcastTransaction(trx)\n\trequire.NoError(t, err)\n\tassert.Equal(t, trx.ID().String(), id)\n\tassert.Equal(t, fee, trx.Fee())\n\tassert.Equal(t, lockTime, trx.LockTime())\n\tassert.Equal(t, memo, trx.Memo())\n}\n\nfunc TestMakeTransferTx(t *testing.T) {\n\ttd := setup(t)\n\n\tsender := td.RandAccAddress()\n\treceiver := td.RandAccAddress()\n\tamt := td.RandAmount()\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()}).AnyTimes()\n\n\tt.Run(\"set parameters manually\", func(t *testing.T) {\n\t\tfee := td.RandFee()\n\t\tlockTime := td.RandHeight()\n\t\tmemo := td.RandMemo()\n\t\topts := []TxOption{\n\t\t\tOptionFee(fee.String()),\n\t\t\tOptionLockTime(lockTime),\n\t\t\tOptionMemo(memo),\n\t\t}\n\n\t\ttrx, err := td.wallet.MakeTransferTx(sender.String(), receiver.String(), amt, opts...)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, fee, trx.Fee())\n\t\tassert.Equal(t, lockTime, trx.LockTime())\n\t\tassert.Equal(t, memo, trx.Memo())\n\t})\n\n\tt.Run(\"query parameters from the node\", func(t *testing.T) {\n\t\ttestHeight := td.RandHeight()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(testHeight, nil)\n\n\t\ttrx, err := td.wallet.MakeTransferTx(sender.String(), receiver.String(), amt)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, testHeight+1, trx.LockTime())\n\t\tassert.Equal(t, amt, trx.Payload().Value())\n\t})\n\n\tt.Run(\"invalid sender address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeTransferTx(\"invalid_addr_string\", receiver.String(), amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"invalid receiver address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeTransferTx(sender.String(), \"invalid_addr_string\", amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"unable to get the blockchain info\", func(t *testing.T) {\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(types.Height(0), errors.New(\"not found\"))\n\n\t\t_, err := td.wallet.MakeTransferTx(td.RandAccAddress().String(), receiver.String(), amt)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestMakeBondTx(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()}).AnyTimes()\n\n\tsender := td.RandAccAddress()\n\tamt := td.RandAmount()\n\n\tt.Run(\"set parameters manually\", func(t *testing.T) {\n\t\treceiver := td.RandValKey()\n\n\t\tlockTime := td.RandHeight()\n\t\tfee := td.RandFee()\n\t\tmemo := td.RandMemo()\n\t\topts := []TxOption{\n\t\t\tOptionFee(fee.String()),\n\t\t\tOptionLockTime(lockTime),\n\t\t\tOptionMemo(memo),\n\t\t}\n\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(nil, nil)\n\n\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiver.Address().String(),\n\t\t\treceiver.PublicKey().String(), amt, opts...)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, fee, trx.Fee())\n\t\tassert.Equal(t, lockTime, trx.LockTime())\n\t\tassert.Equal(t, memo, trx.Memo())\n\t})\n\n\tt.Run(\"query parameters from the node\", func(t *testing.T) {\n\t\treceiver := td.RandValKey()\n\n\t\ttestHeight := td.RandHeight()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(testHeight, nil)\n\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(nil, nil)\n\n\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiver.Address().String(), receiver.PublicKey().String(), amt)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, testHeight+1, trx.LockTime())\n\t\tassert.Equal(t, amt, trx.Payload().Value())\n\t})\n\n\tt.Run(\"validator address is not stored in wallet\", func(t *testing.T) {\n\t\treceiver := td.RandValKey()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(td.RandHeight(), nil).Times(4)\n\t\ttd.mockStorage.EXPECT().AddressInfo(receiver.Address().String()).Return(nil, storage.ErrNotFound).AnyTimes()\n\n\t\tt.Run(\"validator doesn't exist and public key not set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(nil, errors.New(\"not exist\"))\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiver.Address().String(), \"\", amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Nil(t, trx.Payload().(*payload.BondPayload).PublicKey)\n\t\t})\n\n\t\tt.Run(\"validator doesn't exist and public key set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(nil, errors.New(\"not exist\"))\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiver.Address().String(), receiver.PublicKey().String(), amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, receiver.PublicKey().String(), trx.Payload().(*payload.BondPayload).PublicKey.String())\n\t\t})\n\n\t\tt.Run(\"validator exists and public key not set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(td.GenerateTestValidator(), nil)\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiver.Address().String(), \"\", amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Nil(t, trx.Payload().(*payload.BondPayload).PublicKey)\n\t\t})\n\n\t\tt.Run(\"validator exists and public key set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiver.Address().String()).Return(td.GenerateTestValidator(), nil)\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(),\n\t\t\t\treceiver.Address().String(), receiver.PublicKey().String(), amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Nil(t, trx.Payload().(*payload.BondPayload).PublicKey)\n\t\t})\n\t})\n\n\tt.Run(\"validator address stored in wallet\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().InsertAddress(gomock.Any()).Return(nil)\n\t\ttd.mockStorage.EXPECT().UpdateVault(td.testVault).Return(nil)\n\t\treceiverInfo, err := td.wallet.NewValidatorAddress(\"validator-address\")\n\t\trequire.NoError(t, err)\n\n\t\ttd.mockStorage.EXPECT().AddressInfo(receiverInfo.Address).Return(receiverInfo, nil).AnyTimes()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(td.RandHeight(), nil).Times(4)\n\n\t\tt.Run(\"validator doesn't exist and public key not set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiverInfo.Address).Return(nil, errors.New(\"not exist\"))\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiverInfo.Address, \"\", amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, receiverInfo.PublicKey, trx.Payload().(*payload.BondPayload).PublicKey.String())\n\t\t})\n\n\t\tt.Run(\"validator doesn't exist and public key set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiverInfo.Address).Return(nil, errors.New(\"not exist\"))\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(), receiverInfo.Address, receiverInfo.PublicKey, amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, receiverInfo.PublicKey, trx.Payload().(*payload.BondPayload).PublicKey.String())\n\t\t})\n\n\t\tt.Run(\"validator exists and public key not set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiverInfo.Address).Return(td.GenerateTestValidator(), nil)\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(),\n\t\t\t\treceiverInfo.Address, \"\", amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Nil(t, trx.Payload().(*payload.BondPayload).PublicKey)\n\t\t})\n\n\t\tt.Run(\"validator exists and public key set\", func(t *testing.T) {\n\t\t\ttd.mockProvider.EXPECT().GetValidator(receiverInfo.Address).Return(td.GenerateTestValidator(), nil)\n\n\t\t\ttrx, err := td.wallet.MakeBondTx(sender.String(),\n\t\t\t\treceiverInfo.Address, receiverInfo.PublicKey, amt)\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Nil(t, trx.Payload().(*payload.BondPayload).PublicKey)\n\t\t})\n\t})\n\n\tt.Run(\"invalid sender address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeBondTx(\"invalid_addr_string\", td.RandValAddress().String(), \"\", amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"invalid receiver address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeBondTx(sender.String(), \"invalid_addr_string\", \"\", amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"invalid public key\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeBondTx(sender.String(), td.RandValAddress().String(), \"invalid-pub-key\", amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"unable to get the blockchain info\", func(t *testing.T) {\n\t\ttd.mockStorage.EXPECT().AddressInfo(gomock.Any()).Return(nil, storage.ErrNotFound)\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(types.Height(0), errors.New(\"unable to get height\"))\n\t\ttd.mockProvider.EXPECT().GetValidator(gomock.Any()).Return(nil, errors.New(\"unable to get validator info\")).AnyTimes()\n\n\t\t_, err := td.wallet.MakeBondTx(td.RandAccAddress().String(), td.RandValAddress().String(), \"\", amt)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestMakeUnbondTx(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()}).AnyTimes()\n\n\tsender := td.RandValAddress()\n\n\tt.Run(\"set parameters manually\", func(t *testing.T) {\n\t\tlockTime := td.RandHeight()\n\t\topts := []TxOption{\n\t\t\tOptionLockTime(lockTime),\n\t\t\tOptionMemo(\"test\"),\n\t\t}\n\n\t\ttrx, err := td.wallet.MakeUnbondTx(sender.String(), opts...)\n\t\trequire.NoError(t, err)\n\t\tassert.Zero(t, trx.Fee())\n\t\tassert.Equal(t, lockTime, trx.LockTime())\n\t\tassert.Equal(t, \"test\", trx.Memo())\n\t})\n\n\tt.Run(\"query parameters from the node\", func(t *testing.T) {\n\t\ttestHeight := td.RandHeight()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(testHeight, nil)\n\n\t\ttrx, err := td.wallet.MakeUnbondTx(sender.String())\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, testHeight+1, trx.LockTime())\n\t\tassert.Zero(t, trx.Payload().Value())\n\t\tassert.Zero(t, trx.Fee())\n\t})\n\n\tt.Run(\"invalid sender address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeUnbondTx(\"invalid_addr_string\")\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"unable to get the blockchain info\", func(t *testing.T) {\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(types.Height(0), errors.New(\"unable to get height\"))\n\n\t\t_, err := td.wallet.MakeUnbondTx(td.RandAccAddress().String())\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestMakeWithdrawTx(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockStorage.EXPECT().WalletInfo().Return(&wtypes.WalletInfo{DefaultFee: td.RandFee()}).AnyTimes()\n\n\tsender := td.RandValAddress()\n\treceiver := td.RandAccAddress()\n\n\tamt := td.RandAmount()\n\n\tt.Run(\"set parameters manually\", func(t *testing.T) {\n\t\tlockTime := td.RandHeight()\n\t\tfee := td.RandFee()\n\t\topts := []TxOption{\n\t\t\tOptionFee(fee.String()),\n\t\t\tOptionLockTime(lockTime),\n\t\t\tOptionMemo(\"test\"),\n\t\t}\n\n\t\ttrx, err := td.wallet.MakeWithdrawTx(sender.String(), receiver.String(), amt, opts...)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, fee, trx.Fee())\n\t\tassert.Equal(t, lockTime, trx.LockTime())\n\t\tassert.Equal(t, \"test\", trx.Memo())\n\t})\n\n\tt.Run(\"query parameters from the node\", func(t *testing.T) {\n\t\ttestHeight := td.RandHeight()\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(testHeight, nil)\n\n\t\ttrx, err := td.wallet.MakeWithdrawTx(sender.String(), receiver.String(), amt)\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, testHeight+1, trx.LockTime())\n\t\tassert.Equal(t, amt, trx.Payload().Value())\n\t})\n\n\tt.Run(\"invalid sender address\", func(t *testing.T) {\n\t\t_, err := td.wallet.MakeWithdrawTx(\"invalid_addr_string\", receiver.String(), amt)\n\t\trequire.Error(t, err)\n\t})\n\n\tt.Run(\"unable to get the blockchain info\", func(t *testing.T) {\n\t\ttd.mockProvider.EXPECT().LastBlockHeight().Return(types.Height(0), errors.New(\"unable to get height\"))\n\n\t\t_, err := td.wallet.MakeWithdrawTx(td.RandAccAddress().String(), receiver.String(), amt)\n\t\trequire.Error(t, err)\n\t})\n}\n\nfunc TestTotalBalance(t *testing.T) {\n\ttd := setup(t)\n\n\taccInfo1, _ := td.testVault.NewBLSAccountAddress(\"account-1\")\n\taccInfo2, _ := td.testVault.NewBLSAccountAddress(\"account-2\")\n\taccInfo3, _ := td.testVault.NewBLSAccountAddress(\"account-3\")\n\n\taddr1, err := crypto.AddressFromString(accInfo1.Address)\n\trequire.NoError(t, err)\n\taddr2, err := crypto.AddressFromString(accInfo2.Address)\n\trequire.NoError(t, err)\n\n\tacc1, _ := td.GenerateTestAccount(testsuite.AccountWithAddress(addr1))\n\tacc2, _ := td.GenerateTestAccount(testsuite.AccountWithAddress(addr2))\n\n\ttd.mockStorage.EXPECT().AllAddresses().Return([]wtypes.AddressInfo{*accInfo1, *accInfo2, *accInfo3})\n\ttd.mockProvider.EXPECT().GetAccount(accInfo1.Address).Return(acc1, nil)\n\ttd.mockProvider.EXPECT().GetAccount(accInfo2.Address).Return(acc2, nil)\n\ttd.mockProvider.EXPECT().GetAccount(accInfo3.Address).Return(nil, errors.New(\"not found\"))\n\n\ttotalBalance, err := td.wallet.TotalBalance()\n\trequire.NoError(t, err)\n\tassert.Equal(t, acc1.Balance()+acc2.Balance(), totalBalance)\n}\n\nfunc TestTotalStake(t *testing.T) {\n\ttd := setup(t)\n\n\tvalInfo1, _ := td.testVault.NewValidatorAddress(\"val-1\")\n\tvalInfo2, _ := td.testVault.NewValidatorAddress(\"val-2\")\n\tvalInfo3, _ := td.testVault.NewValidatorAddress(\"val-3\")\n\n\tpub1, err := bls.PublicKeyFromString(valInfo1.PublicKey)\n\trequire.NoError(t, err)\n\tpub2, err := bls.PublicKeyFromString(valInfo2.PublicKey)\n\trequire.NoError(t, err)\n\n\tval1 := td.GenerateTestValidator(testsuite.ValidatorWithPublicKey(pub1))\n\tval2 := td.GenerateTestValidator(testsuite.ValidatorWithPublicKey(pub2))\n\n\ttd.mockStorage.EXPECT().AllAddresses().Return([]wtypes.AddressInfo{*valInfo1, *valInfo2, *valInfo3})\n\ttd.mockProvider.EXPECT().GetValidator(valInfo1.Address).Return(val1, nil)\n\ttd.mockProvider.EXPECT().GetValidator(valInfo2.Address).Return(val2, nil)\n\ttd.mockProvider.EXPECT().GetValidator(valInfo3.Address).Return(nil, errors.New(\"not found\"))\n\n\tstake, err := td.wallet.TotalStake()\n\trequire.NoError(t, err)\n\trequire.Equal(t, val1.Stake()+val2.Stake(), stake)\n}\n\nfunc TestNeuter(t *testing.T) {\n\ttd := setup(t)\n\n\tpath := util.TempFilePath()\n\tclonedStorage := storage.NewMockIStorage(td.Ctrl)\n\n\ttd.mockStorage.EXPECT().Clone(path).Return(clonedStorage, nil)\n\tclonedStorage.EXPECT().Vault().Return(td.testVault)\n\tclonedStorage.EXPECT().UpdateVault(gomock.Any()).DoAndReturn(func(vlt *vault.Vault) error {\n\t\tassert.True(t, vlt.IsNeutered())\n\t\tassert.False(t, vlt.IsEncrypted())\n\n\t\treturn nil\n\t})\n\n\terr := td.wallet.Neuter(path)\n\trequire.NoError(t, err)\n}\n\nfunc TestTestnetWallet(t *testing.T) {\n\twalletPath := util.TempFilePath()\n\n\tt.Run(\"Create Testnet wallet\", func(t *testing.T) {\n\t\tmnemonic, _ := GenerateMnemonic(128)\n\t\twlt, err := Create(t.Context(), walletPath, mnemonic, \"\", genesis.Testnet)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, genesis.Testnet, wlt.Info().Network)\n\n\t\tinfo, err := wlt.NewBLSAccountAddress(\"testnet-addr-1\")\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"m/12381'/21777'/2'/0\", info.Path)\n\t\tassert.True(t, strings.HasPrefix(info.Address, \"tpc1\"))\n\n\t\twlt.Close()\n\t})\n\n\tt.Run(\"Open Testnet wallet\", func(t *testing.T) {\n\t\twlt, err := Open(t.Context(), walletPath)\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, genesis.Testnet, wlt.Info().Network)\n\n\t\tinfo, err := wlt.NewBLSAccountAddress(\"testnet-addr-2\")\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"m/12381'/21777'/2'/1\", info.Path)\n\t\tassert.True(t, strings.HasPrefix(info.Address, \"tpc1\"))\n\n\t\twlt.Close()\n\t})\n}\n\nfunc TestOfflineWallet(t *testing.T) {\n\ttd := setup(t)\n\n\tstrg := storage.NewMockIStorage(td.Ctrl)\n\tstrg.EXPECT().Vault().Return(td.testVault).Times(1)\n\tstrg.EXPECT().Close().Return(nil).Times(1)\n\n\twlt, err := New(t.Context(), strg, WithOfflineProvider())\n\trequire.NoError(t, err)\n\n\t_, err = wlt.Balance(td.RandAccAddress().String())\n\trequire.ErrorIs(t, err, offline.ErrOffline)\n\n\twlt.Close()\n}\n"
  },
  {
    "path": "www/grpc/README.md",
    "content": "# gRPC\n\nThis directory contains required files for [gRPC](https://github.com/grpc-ecosystem/grpc-gateway) service.\n\nIn order to compile [pactus.proto](./proto/pactus.proto) file, run this command:\n\n```bash\nmake proto\n```\n"
  },
  {
    "path": "www/grpc/basicauth/basicauth.go",
    "content": "package basicauth\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n)\n\n// EncodeBasicAuth generates a Basic Authentication header value using the provided username and password\n// according to RFC 7617. It formats the authString as \"username:password\", encodes it in base64,\n// and returns the Basic Auth header in the format \"Basic <base64EncodedString>\".\nfunc EncodeBasicAuth(username, password string) string {\n\tauthString := fmt.Sprintf(\"%s:%s\", username, password)\n\tencodedAuth := base64.StdEncoding.EncodeToString([]byte(authString))\n\n\treturn fmt.Sprintf(\"Basic %s\", encodedAuth)\n}\n\n// BasicAuth is an implementation of grpc.PerRPCCredentials based on the Basic HTTP Authentication Schema.\ntype BasicAuth struct {\n\tUsername string\n\tPassword string\n}\n\nfunc New(username, password string) *BasicAuth {\n\treturn &BasicAuth{\n\t\tUsername: username,\n\t\tPassword: password,\n\t}\n}\n\n// GetRequestMetadata gets the request metadata as a map of strings.\nfunc (b *BasicAuth) GetRequestMetadata(context.Context, ...string) (map[string]string, error) {\n\treturn map[string]string{\n\t\t\"authorization\": EncodeBasicAuth(b.Username, b.Password),\n\t}, nil\n}\n\n// RequireTransportSecurity indicates whether the credentials requires transport security.\nfunc (*BasicAuth) RequireTransportSecurity() bool {\n\treturn false\n}\n"
  },
  {
    "path": "www/grpc/basicauth/basicauth_test.go",
    "content": "package basicauth\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestMakeCredentials(t *testing.T) {\n\ttests := []struct {\n\t\tusername string\n\t\tpassword string\n\t\texpected string\n\t}{\n\t\t{\"user\", \"pass\", \"Basic dXNlcjpwYXNz\"},\n\t\t{\"admin\", \"admin123\", \"Basic YWRtaW46YWRtaW4xMjM=\"},\n\t\t{\"\", \"\", \"Basic Og==\"},\n\t\t{\"test\", \"123£\", \"Basic dGVzdDoxMjPCow==\"},\n\t}\n\n\t// Iterate over test cases\n\tfor _, tt := range tests {\n\t\tt.Run(fmt.Sprintf(\"Username: %s, Password: %s\", tt.username, tt.password), func(t *testing.T) {\n\t\t\t// Call basicAuth function\n\t\t\tresult := EncodeBasicAuth(tt.username, tt.password)\n\n\t\t\t// Check if the result matches the expected output\n\t\t\tassert.Equal(t, tt.expected, result)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "www/grpc/blockchain.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/account\"\n\t\"github.com/pactus-project/pactus/types/validator\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\ntype blockchainServer struct {\n\t*Server\n}\n\nfunc newBlockchainServer(server *Server) *blockchainServer {\n\treturn &blockchainServer{\n\t\tServer: server,\n\t}\n}\n\nfunc (s *blockchainServer) GetBlockchainInfo(_ context.Context,\n\t_ *pactus.GetBlockchainInfoRequest,\n) (*pactus.GetBlockchainInfoResponse, error) {\n\tchainInfo := s.state.ChainInfo()\n\n\tinCommittee := false\n\tcommitteeVals := s.state.CommitteeValidators()\n\tfor _, cons := range s.consMgr.Instances() {\n\t\tfor _, val := range committeeVals {\n\t\t\tif cons.ConsensusKey().EqualsTo(val.PublicKey()) {\n\t\t\t\tinCommittee = true\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn &pactus.GetBlockchainInfoResponse{\n\t\tLastBlockHeight:  uint32(chainInfo.LastBlockHeight),\n\t\tLastBlockHash:    chainInfo.LastBlockHash.String(),\n\t\tLastBlockTime:    chainInfo.LastBlockTime.Unix(),\n\t\tTotalAccounts:    chainInfo.TotalAccounts,\n\t\tTotalValidators:  chainInfo.TotalValidators,\n\t\tActiveValidators: chainInfo.ActiveValidators,\n\t\tAverageScore:     chainInfo.AverageScore,\n\t\tTotalPower:       chainInfo.TotalPower,\n\t\tCommitteePower:   chainInfo.CommitteePower,\n\t\tCommitteeSize:    int32(chainInfo.CommitteeSize),\n\t\tIsPruned:         chainInfo.IsPruned,\n\t\tPruningHeight:    uint32(chainInfo.PruningHeight),\n\t\tInCommittee:      inCommittee,\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetCommitteeInfo(_ context.Context,\n\t_ *pactus.GetCommitteeInfoRequest,\n) (*pactus.GetCommitteeInfoResponse, error) {\n\tinfo := s.state.CommitteeInfo()\n\tchainInfo := s.state.ChainInfo()\n\tvalInfos := make([]*pactus.ValidatorInfo, 0, len(info.Validators))\n\tfor _, val := range info.Validators {\n\t\tvalInfos = append(valInfos, s.validatorToProto(val))\n\t}\n\tprotocolVersions := make(map[int32]float64)\n\tfor k, v := range info.ProtocolVersions {\n\t\tprotocolVersions[int32(k)] = v\n\t}\n\n\treturn &pactus.GetCommitteeInfoResponse{\n\t\tValidators:       valInfos,\n\t\tProtocolVersions: protocolVersions,\n\t\tCommitteePower:   info.CommitteePower,\n\t\tCommitteeSize:    int32(len(info.Validators)),\n\t\tTotalPower:       chainInfo.TotalPower,\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetConsensusInfo(_ context.Context,\n\t_ *pactus.GetConsensusInfoRequest,\n) (*pactus.GetConsensusInfoResponse, error) {\n\tconsInstances := s.consMgr.Instances()\n\tinstances := make([]*pactus.ConsensusInfo, 0, len(consInstances))\n\n\tfor _, cons := range consInstances {\n\t\theight, round := cons.HeightRound()\n\t\tvotes := cons.AllVotes()\n\t\tvoteInfos := make([]*pactus.VoteInfo, 0, len(votes))\n\t\tfor _, v := range votes {\n\t\t\tvoteInfos = append(voteInfos, s.voteToProto(v))\n\t\t}\n\n\t\tinstances = append(instances,\n\t\t\t&pactus.ConsensusInfo{\n\t\t\t\tAddress: cons.ConsensusKey().ValidatorAddress().String(),\n\t\t\t\tActive:  cons.IsActive(),\n\t\t\t\tHeight:  uint32(height),\n\t\t\t\tRound:   int32(round),\n\t\t\t\tVotes:   voteInfos,\n\t\t\t})\n\t}\n\n\tvar proposalInfo *pactus.ProposalInfo\n\tprop := s.consMgr.Proposal()\n\tif prop != nil {\n\t\tvar blockData string\n\t\tdata, err := prop.Block().Bytes()\n\t\tif err != nil {\n\t\t\treturn nil, status.Error(codes.Internal, err.Error())\n\t\t}\n\t\tblockData = hex.EncodeToString(data)\n\n\t\tproposalInfo = &pactus.ProposalInfo{\n\t\t\tHeight:    uint32(prop.Height()),\n\t\t\tRound:     int32(prop.Round()),\n\t\t\tBlockData: blockData,\n\t\t\tSignature: prop.Signature().String(),\n\t\t}\n\t}\n\n\treturn &pactus.GetConsensusInfoResponse{\n\t\tInstances: instances,\n\t\tProposal:  proposalInfo,\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetBlockHash(_ context.Context,\n\treq *pactus.GetBlockHashRequest,\n) (*pactus.GetBlockHashResponse, error) {\n\theight := req.GetHeight()\n\th := s.state.BlockHash(types.Height(height))\n\tif h.IsUndef() {\n\t\treturn nil, status.Errorf(codes.NotFound, \"block not found with this height\")\n\t}\n\n\treturn &pactus.GetBlockHashResponse{\n\t\tHash: h.String(),\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetBlockHeight(_ context.Context,\n\treq *pactus.GetBlockHeightRequest,\n) (*pactus.GetBlockHeightResponse, error) {\n\th, err := hash.FromString(req.GetHash())\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"invalid hash: %v\", err)\n\t}\n\theight := s.state.BlockHeight(h)\n\tif height == 0 {\n\t\treturn nil, status.Errorf(codes.NotFound, \"block not found with this hash\")\n\t}\n\n\treturn &pactus.GetBlockHeightResponse{\n\t\tHeight: uint32(height),\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetBlock(_ context.Context,\n\treq *pactus.GetBlockRequest,\n) (*pactus.GetBlockResponse, error) {\n\theight := req.GetHeight()\n\tcBlk, err := s.state.CommittedBlock(types.Height(height))\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"block not found\")\n\t}\n\tres := &pactus.GetBlockResponse{\n\t\tHeight: uint32(cBlk.Height),\n\t\tHash:   cBlk.BlockHash.String(),\n\t}\n\n\tswitch req.Verbosity {\n\tcase pactus.BlockVerbosity_BLOCK_VERBOSITY_DATA:\n\t\tres.Data = hex.EncodeToString(cBlk.Data)\n\n\tcase pactus.BlockVerbosity_BLOCK_VERBOSITY_INFO,\n\t\tpactus.BlockVerbosity_BLOCK_VERBOSITY_TRANSACTIONS:\n\t\tblock, err := cBlk.ToBlock()\n\t\tif err != nil {\n\t\t\treturn nil, status.Error(codes.Internal, err.Error())\n\t\t}\n\t\tblockTime := block.Header().UnixTime()\n\t\tseed := block.Header().SortitionSeed()\n\t\tcert := block.PrevCertificate()\n\t\tvar prevCert *pactus.CertificateInfo\n\n\t\tif cert != nil {\n\t\t\tcommitters := make([]int32, len(cert.Committers()))\n\t\t\tfor i, n := range cert.Committers() {\n\t\t\t\tcommitters[i] = n\n\t\t\t}\n\t\t\tabsentees := make([]int32, len(cert.Absentees()))\n\t\t\tfor i, n := range cert.Absentees() {\n\t\t\t\tabsentees[i] = n\n\t\t\t}\n\t\t\tprevCert = &pactus.CertificateInfo{\n\t\t\t\tHash:       cert.Hash().String(),\n\t\t\t\tRound:      int32(cert.Round()),\n\t\t\t\tCommitters: committers,\n\t\t\t\tAbsentees:  absentees,\n\t\t\t\tSignature:  cert.Signature().String(),\n\t\t\t}\n\t\t}\n\t\theader := &pactus.BlockHeaderInfo{\n\t\t\tVersion:         int32(block.Header().Version()),\n\t\t\tPrevBlockHash:   block.Header().PrevBlockHash().String(),\n\t\t\tStateRoot:       block.Header().StateRoot().String(),\n\t\t\tSortitionSeed:   hex.EncodeToString(seed[:]),\n\t\t\tProposerAddress: block.Header().ProposerAddress().String(),\n\t\t}\n\n\t\tlastBlockHeight := s.state.LastBlockHeight()\n\t\tconfirmations := int(lastBlockHeight) - int(cBlk.Height)\n\t\ttrxs := make([]*pactus.TransactionInfo, 0, block.Transactions().Len())\n\t\tfor _, trx := range block.Transactions() {\n\t\t\tif req.Verbosity == pactus.BlockVerbosity_BLOCK_VERBOSITY_INFO {\n\t\t\t\tdata, _ := trx.Bytes()\n\t\t\t\ttrxs = append(trxs, &pactus.TransactionInfo{\n\t\t\t\t\tId:   trx.ID().String(),\n\t\t\t\t\tData: hex.EncodeToString(data),\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\ttrxs = append(trxs, transactionToProto(trx, cBlk.Height, confirmations))\n\t\t\t}\n\t\t}\n\n\t\tres.BlockTime = blockTime\n\t\tres.Header = header\n\t\tres.Txs = trxs\n\t\tres.PrevCert = prevCert\n\t}\n\n\treturn res, nil\n}\n\nfunc (s *blockchainServer) GetAccount(_ context.Context,\n\treq *pactus.GetAccountRequest,\n) (*pactus.GetAccountResponse, error) {\n\taddr, err := crypto.AddressFromString(req.Address)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"invalid address: %v\", err)\n\t}\n\tacc, err := s.state.AccountByAddress(addr)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"account not found\")\n\t}\n\tres := &pactus.GetAccountResponse{\n\t\tAccount: s.accountToProto(addr, acc),\n\t}\n\n\treturn res, nil\n}\n\nfunc (s *blockchainServer) GetValidatorByNumber(_ context.Context,\n\treq *pactus.GetValidatorByNumberRequest,\n) (*pactus.GetValidatorResponse, error) {\n\tval, err := s.state.ValidatorByNumber(req.Number)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"validator not found\")\n\t}\n\n\treturn &pactus.GetValidatorResponse{\n\t\tValidator: s.validatorToProto(val),\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetValidator(_ context.Context,\n\treq *pactus.GetValidatorRequest,\n) (*pactus.GetValidatorResponse, error) {\n\taddr, err := crypto.AddressFromString(req.Address)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"invalid validator address: %v\", err.Error())\n\t}\n\tval, err := s.state.ValidatorByAddress(addr)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"validator not found\")\n\t}\n\n\treturn &pactus.GetValidatorResponse{\n\t\tValidator: s.validatorToProto(val),\n\t}, nil\n}\n\nfunc (s *blockchainServer) GetValidatorAddresses(_ context.Context,\n\t_ *pactus.GetValidatorAddressesRequest,\n) (*pactus.GetValidatorAddressesResponse, error) {\n\taddresses := s.state.ValidatorAddresses()\n\taddressesPB := make([]string, 0, len(addresses))\n\tfor _, address := range addresses {\n\t\taddressesPB = append(addressesPB, address.String())\n\t}\n\n\treturn &pactus.GetValidatorAddressesResponse{Addresses: addressesPB}, nil\n}\n\nfunc (s *blockchainServer) GetPublicKey(_ context.Context,\n\treq *pactus.GetPublicKeyRequest,\n) (*pactus.GetPublicKeyResponse, error) {\n\taddr, err := crypto.AddressFromString(req.Address)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"invalid account address: %v\", err.Error())\n\t}\n\n\tpublicKey, err := s.state.PublicKey(addr)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.NotFound, \"public key not found\")\n\t}\n\n\treturn &pactus.GetPublicKeyResponse{PublicKey: publicKey.String()}, nil\n}\n\nfunc (s *blockchainServer) GetTxPoolContent(_ context.Context,\n\treq *pactus.GetTxPoolContentRequest,\n) (*pactus.GetTxPoolContentResponse, error) {\n\tresult := make([]*pactus.TransactionInfo, 0)\n\n\tfor _, t := range s.state.AllPendingTxs() {\n\t\tif req.PayloadType == pactus.PayloadType_PAYLOAD_TYPE_UNSPECIFIED ||\n\t\t\treq.PayloadType == pactus.PayloadType(t.Payload().Type()) {\n\t\t\tresult = append(result, transactionToProto(t, 0, 0))\n\t\t}\n\t}\n\n\treturn &pactus.GetTxPoolContentResponse{\n\t\tTxs: result,\n\t}, nil\n}\n\nfunc (s *blockchainServer) validatorToProto(val *validator.Validator) *pactus.ValidatorInfo {\n\tdata, _ := val.Bytes()\n\n\tisDelegated := val.IsDelegated()\n\tvar delegateOwner string\n\tvar delegateShare int64\n\tvar delegateExpiry uint32\n\tif isDelegated {\n\t\t// For non-delegated validators these fields are left empty/zero.\n\t\t// This makes the response consistent with the intent of PIP-49 delegation.\n\t\tdelegateOwner = val.DelegateOwner().String()\n\t\tdelegateShare = val.DelegateShare().ToNanoPAC()\n\t\tdelegateExpiry = uint32(val.DelegateExpiry())\n\t}\n\n\treturn &pactus.ValidatorInfo{\n\t\tHash:                val.Hash().String(),\n\t\tData:                hex.EncodeToString(data),\n\t\tPublicKey:           val.PublicKey().String(),\n\t\tAddress:             val.Address().String(),\n\t\tNumber:              val.Number(),\n\t\tStake:               val.Stake().ToNanoPAC(),\n\t\tLastBondingHeight:   uint32(val.LastBondingHeight()),\n\t\tLastSortitionHeight: uint32(val.LastSortitionHeight()),\n\t\tUnbondingHeight:     uint32(val.UnbondingHeight()),\n\t\tAvailabilityScore:   s.state.AvailabilityScore(val.Number()),\n\t\tProtocolVersion:     int32(val.ProtocolVersion()),\n\t\tIsDelegated:         isDelegated,\n\t\tDelegateOwner:       delegateOwner,\n\t\tDelegateShare:       delegateShare,\n\t\tDelegateExpiry:      delegateExpiry,\n\t}\n}\n\nfunc (*blockchainServer) accountToProto(addr crypto.Address, acc *account.Account) *pactus.AccountInfo {\n\tdata, _ := acc.Bytes()\n\n\treturn &pactus.AccountInfo{\n\t\tHash:    acc.Hash().String(),\n\t\tData:    hex.EncodeToString(data),\n\t\tNumber:  acc.Number(),\n\t\tBalance: acc.Balance().ToNanoPAC(),\n\t\tAddress: addr.String(),\n\t}\n}\n\nfunc (*blockchainServer) voteToProto(vte *vote.Vote) *pactus.VoteInfo {\n\tcpRound := int32(0)\n\tcpValue := int32(0)\n\tif vte.IsCPVote() {\n\t\tcpRound = int32(vte.CPRound())\n\t\tcpValue = int32(vte.CPValue())\n\t}\n\n\treturn &pactus.VoteInfo{\n\t\tType:      pactus.VoteType(vte.Type()),\n\t\tVoter:     vte.Signer().String(),\n\t\tBlockHash: vte.BlockHash().String(),\n\t\tRound:     int32(vte.Round()),\n\t\tCpRound:   cpRound,\n\t\tCpValue:   cpValue,\n\t}\n}\n"
  },
  {
    "path": "www/grpc/blockchain_test.go",
    "content": "package grpc\n\nimport (\n\t\"encoding/hex\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestGetBlock(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\theight := types.Height(100)\n\tblk := td.mockState.TestStore.AddTestBlock(height)\n\tdata, _ := blk.Bytes()\n\n\tt.Run(\"Should return nil for non existing block \", func(t *testing.T) {\n\t\tres, err := client.GetBlock(t.Context(),\n\t\t\t&pactus.GetBlockRequest{\n\t\t\t\tHeight: uint32(height + 1), Verbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_DATA,\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return an existing block data (verbosity: 0)\", func(t *testing.T) {\n\t\tres, err := client.GetBlock(t.Context(),\n\t\t\t&pactus.GetBlockRequest{Height: uint32(height), Verbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_DATA})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, uint32(height), res.Height)\n\t\tassert.Equal(t, blk.Hash().String(), res.Hash)\n\t\tassert.Equal(t, hex.EncodeToString(data), res.Data)\n\t\tassert.Empty(t, res.Header)\n\t\tassert.Empty(t, res.Txs)\n\t})\n\n\tt.Run(\"Should return object with (verbosity: 1)\", func(t *testing.T) {\n\t\tres, err := client.GetBlock(t.Context(),\n\t\t\t&pactus.GetBlockRequest{Height: uint32(height), Verbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_INFO})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, uint32(height), res.Height)\n\t\tassert.Equal(t, blk.Hash().String(), res.Hash)\n\t\tassert.Empty(t, res.Data)\n\t\tassert.NotEmpty(t, res.Header)\n\t\tassert.Equal(t, blk.PrevCertificate().Committers(), res.PrevCert.Committers)\n\t\tassert.Equal(t, blk.PrevCertificate().Absentees(), res.PrevCert.Absentees)\n\t\tfor i, trx := range res.Txs {\n\t\t\tblockTrx := blk.Transactions()[i]\n\t\t\tblk, err := blockTrx.Bytes()\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.Equal(t, trx.Id, blockTrx.ID().String())\n\t\t\tassert.Equal(t, trx.Data, hex.EncodeToString(blk))\n\t\t\tassert.Zero(t, trx.LockTime)\n\t\t\tassert.Empty(t, trx.Signature)\n\t\t\tassert.Empty(t, trx.PublicKey)\n\t\t}\n\t})\n\n\tt.Run(\"Should return object with (verbosity: 2)\", func(t *testing.T) {\n\t\tres, err := client.GetBlock(t.Context(),\n\t\t\t&pactus.GetBlockRequest{Height: uint32(height), Verbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_TRANSACTIONS})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, uint32(height), res.Height)\n\t\tassert.Equal(t, blk.Hash().String(), res.Hash)\n\t\tassert.Empty(t, res.Data)\n\t\tassert.NotEmpty(t, res.Header)\n\t\tassert.NotEmpty(t, res.Txs)\n\t\tfor i, trx := range res.Txs {\n\t\t\tblockTrx := blk.Transactions()[i]\n\n\t\t\tassert.Equal(t, trx.Id, blockTrx.ID().String())\n\t\t\tassert.Empty(t, trx.Data)\n\t\t\tassert.Equal(t, uint32(blockTrx.LockTime()), trx.LockTime)\n\t\t\tif blockTrx.IsSubsidyTx() {\n\t\t\t\tassert.Empty(t, trx.Signature)\n\t\t\t\tassert.Empty(t, trx.PublicKey)\n\t\t\t} else {\n\t\t\t\tassert.Equal(t, trx.Signature, blockTrx.Signature().String())\n\t\t\t\tassert.Equal(t, trx.PublicKey, blockTrx.PublicKey().String())\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc TestGetBlockHash(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\theight := td.RandHeight()\n\tblk := td.mockState.TestStore.AddTestBlock(height)\n\n\tt.Run(\"Should return error for non existing block\", func(t *testing.T) {\n\t\tres, err := client.GetBlockHash(t.Context(),\n\t\t\t&pactus.GetBlockHashRequest{Height: 0})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return height of existing block\", func(t *testing.T) {\n\t\tres, err := client.GetBlockHash(t.Context(),\n\t\t\t&pactus.GetBlockHashRequest{Height: uint32(height)})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, blk.Hash().String(), res.Hash)\n\t})\n}\n\nfunc TestGetBlockHeight(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\theight := td.RandHeight()\n\tblk := td.mockState.TestStore.AddTestBlock(height)\n\n\tt.Run(\"Should return error for invalid hash\", func(t *testing.T) {\n\t\tres, err := client.GetBlockHeight(t.Context(),\n\t\t\t&pactus.GetBlockHeightRequest{Hash: \"\"})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return error for non existing block\", func(t *testing.T) {\n\t\tres, err := client.GetBlockHeight(t.Context(),\n\t\t\t&pactus.GetBlockHeightRequest{Hash: td.RandHash().String()})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return height of existing block\", func(t *testing.T) {\n\t\tres, err := client.GetBlockHeight(t.Context(),\n\t\t\t&pactus.GetBlockHeightRequest{Hash: blk.Hash().String()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, uint32(height), res.Height)\n\t})\n}\n\nfunc TestGetBlockchainInfo(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tt.Run(\"Should return the last block height\", func(t *testing.T) {\n\t\tres, err := client.GetBlockchainInfo(t.Context(),\n\t\t\t&pactus.GetBlockchainInfoRequest{})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, uint32(td.mockState.TestStore.LastHeight), res.LastBlockHeight)\n\t\tassert.NotEmpty(t, res.LastBlockHash)\n\t\tassert.Zero(t, res.PruningHeight)\n\t\tassert.False(t, res.IsPruned)\n\t})\n}\n\nfunc TestGetCommitteeInfo(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tt.Run(\"Should return committee info\", func(t *testing.T) {\n\t\tres, err := client.GetCommitteeInfo(t.Context(),\n\t\t\t&pactus.GetCommitteeInfoRequest{})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.GreaterOrEqual(t, res.CommitteePower, int64(0))\n\t\tassert.NotNil(t, res.Validators)\n\t\tassert.NotNil(t, res.ProtocolVersions)\n\t})\n}\n\nfunc TestGetAccount(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\taddr, acc := td.mockState.TestStore.AddTestAccount()\n\n\tt.Run(\"Should return error for non-parsable address \", func(t *testing.T) {\n\t\tres, err := client.GetAccount(t.Context(),\n\t\t\t&pactus.GetAccountRequest{Address: \"\"})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return nil for non existing account \", func(t *testing.T) {\n\t\tres, err := client.GetAccount(t.Context(),\n\t\t\t&pactus.GetAccountRequest{Address: td.RandAccAddress().String()})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return account details\", func(t *testing.T) {\n\t\tres, err := client.GetAccount(t.Context(),\n\t\t\t&pactus.GetAccountRequest{Address: addr.String()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, acc.Balance().ToNanoPAC(), res.Account.Balance)\n\t\tassert.Equal(t, acc.Number(), res.Account.Number)\n\t})\n}\n\nfunc TestGetValidator(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tval1 := td.mockState.TestStore.AddTestValidator()\n\n\tt.Run(\"Should return nil value due to invalid address\", func(t *testing.T) {\n\t\tres, err := client.GetValidator(t.Context(),\n\t\t\t&pactus.GetValidatorRequest{Address: \"\"})\n\n\t\trequire.Error(t, err, \"Error should be returned\")\n\t\tassert.Nil(t, res, \"Response should be empty\")\n\t})\n\n\tt.Run(\"should return Not Found\", func(t *testing.T) {\n\t\tres, err := client.GetValidator(t.Context(),\n\t\t\t&pactus.GetValidatorRequest{Address: td.RandAccAddress().String()})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return validator, and the public keys should match\", func(t *testing.T) {\n\t\tres, err := client.GetValidator(t.Context(),\n\t\t\t&pactus.GetValidatorRequest{Address: val1.Address().String()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, val1.PublicKey().String(), res.GetValidator().PublicKey)\n\t})\n\n\tt.Run(\"Should return delegation info for delegated validators\", func(t *testing.T) {\n\t\tdlgOwnerAddr := td.RandAccAddress()\n\t\tdlgOwnerShare := td.RandAmount()\n\t\tdlgExpiry := td.RandHeight()\n\n\t\tval1.SetDelegation(dlgOwnerAddr, dlgOwnerShare, dlgExpiry)\n\t\ttd.mockState.TestStore.UpdateValidator(val1)\n\n\t\tres, err := client.GetValidator(t.Context(),\n\t\t\t&pactus.GetValidatorRequest{Address: val1.Address().String()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\n\t\tv := res.GetValidator()\n\t\tassert.True(t, v.IsDelegated)\n\t\tassert.Equal(t, dlgOwnerAddr.String(), v.DelegateOwner)\n\t\tassert.Equal(t, dlgOwnerShare.ToNanoPAC(), v.DelegateShare)\n\t\tassert.Equal(t, uint32(dlgExpiry), v.DelegateExpiry)\n\t})\n}\n\nfunc TestGetValidatorByNumber(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tval1 := td.mockState.TestStore.AddTestValidator()\n\n\tt.Run(\"Should return nil value due to invalid number\", func(t *testing.T) {\n\t\tres, err := client.GetValidatorByNumber(t.Context(),\n\t\t\t&pactus.GetValidatorByNumberRequest{Number: -1})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"should return Not Found\", func(t *testing.T) {\n\t\tres, err := client.GetValidatorByNumber(t.Context(),\n\t\t\t&pactus.GetValidatorByNumberRequest{Number: val1.Number() + 1})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return validator matching with public key and number\", func(t *testing.T) {\n\t\tres, err := client.GetValidatorByNumber(t.Context(),\n\t\t\t&pactus.GetValidatorByNumberRequest{Number: val1.Number()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, val1.PublicKey().String(), res.GetValidator().PublicKey)\n\t\tassert.Equal(t, val1.Number(), res.GetValidator().GetNumber())\n\t})\n}\n\nfunc TestGetValidatorAddresses(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tt.Run(\"should return list of validator addresses\", func(t *testing.T) {\n\t\ttd.mockState.TestStore.AddTestValidator()\n\t\ttd.mockState.TestStore.AddTestValidator()\n\n\t\tres, err := client.GetValidatorAddresses(t.Context(),\n\t\t\t&pactus.GetValidatorAddressesRequest{})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Len(t, res.GetAddresses(), 2)\n\t})\n}\n\nfunc TestGetPublicKey(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tval := td.mockState.TestStore.AddTestValidator()\n\n\tt.Run(\"Should return error for non-parsable address \", func(t *testing.T) {\n\t\tres, err := client.GetPublicKey(t.Context(),\n\t\t\t&pactus.GetPublicKeyRequest{Address: \"\"})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return nil for non existing public key \", func(t *testing.T) {\n\t\tres, err := client.GetPublicKey(t.Context(),\n\t\t\t&pactus.GetPublicKeyRequest{Address: td.RandAccAddress().String()})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return the public key\", func(t *testing.T) {\n\t\tres, err := client.GetPublicKey(t.Context(),\n\t\t\t&pactus.GetPublicKeyRequest{Address: val.Address().String()})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, val.PublicKey().String(), res.PublicKey)\n\t})\n}\n\nfunc TestConsensusInfo(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\tconsHeight := td.RandHeight()\n\tconsRound := td.RandRound()\n\tvote1, _ := td.GenerateTestPrepareVote(consHeight, consRound)\n\tvote2, _ := td.GenerateTestPrecommitVote(consHeight, consRound)\n\tprop := td.GenerateTestProposal(consHeight, consRound)\n\n\ttd.consMocks[0].Active = true\n\ttd.consMocks[0].Height = consHeight\n\ttd.consMocks[0].Round = consRound\n\ttd.consMocks[0].AddVote(vote1)\n\ttd.consMocks[0].AddVote(vote2)\n\ttd.consMocks[0].SetProposal(prop)\n\n\ttd.consMocks[1].Active = false\n\ttd.consMocks[1].Height = consHeight\n\ttd.consMocks[1].Round = consRound\n\n\tt.Run(\"Should return the consensus info\", func(t *testing.T) {\n\t\tres, err := client.GetConsensusInfo(t.Context(), &pactus.GetConsensusInfoRequest{})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\n\t\tassert.True(t, res.Instances[0].Active)\n\t\tassert.Equal(t, uint32(consHeight), res.Instances[0].Height)\n\t\tassert.Equal(t, int32(consRound), res.Instances[0].Round)\n\t\tassert.Len(t, res.Instances[0].Votes, 2)\n\t\tassert.Equal(t, pactus.VoteType_VOTE_TYPE_PREPARE, res.Instances[0].Votes[0].Type)\n\t\tassert.Equal(t, pactus.VoteType_VOTE_TYPE_PRECOMMIT, res.Instances[0].Votes[1].Type)\n\n\t\tassert.False(t, res.Instances[1].Active)\n\t\tassert.Equal(t, uint32(consHeight), res.Instances[1].Height)\n\t\tassert.Equal(t, int32(consRound), res.Instances[1].Round)\n\n\t\tassert.Equal(t, uint32(consHeight), res.Proposal.Height)\n\t\tassert.Equal(t, int32(consRound), res.Proposal.Round)\n\t\tassert.Equal(t, prop.Signature().String(), res.Proposal.Signature)\n\t})\n}\n\nfunc TestGetTxPoolContent(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.blockchainClient(t)\n\n\ttrx1 := td.GenerateTestTransferTx()\n\ttrx2 := td.GenerateTestBatchTransferTx()\n\ttrx3 := td.GenerateTestSubsidyTx()\n\ttrx4 := td.GenerateTestBondTx()\n\ttrx5 := td.GenerateTestUnbondTx()\n\ttrx6 := td.GenerateTestSortitionTx()\n\ttrx7 := td.GenerateTestWithdrawTx()\n\n\ttd.mockState.MockTxPool.EXPECT().AllPendingTxs().Return([]*tx.Tx{\n\t\ttrx1, trx2, trx3, trx4, trx5, trx6, trx7,\n\t}).AnyTimes()\n\n\tt.Run(\"Should return all transactions\", func(t *testing.T) {\n\t\tin := &pactus.GetTxPoolContentRequest{\n\t\t\tPayloadType: pactus.PayloadType_PAYLOAD_TYPE_UNSPECIFIED,\n\t\t}\n\t\tresp, err := client.GetTxPoolContent(t.Context(), in)\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, resp)\n\n\t\tassert.Len(t, resp.Txs, 7)\n\t})\n\n\tt.Run(\"Should return transactions by type\", func(t *testing.T) {\n\t\tpayloadTypes := []pactus.PayloadType{\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_TRANSFER,\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_BOND,\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_SORTITION,\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_UNBOND,\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_WITHDRAW,\n\t\t\tpactus.PayloadType_PAYLOAD_TYPE_BATCH_TRANSFER,\n\t\t}\n\n\t\tfor _, payloadType := range payloadTypes {\n\t\t\tin := &pactus.GetTxPoolContentRequest{\n\t\t\t\tPayloadType: payloadType,\n\t\t\t}\n\t\t\tresp, err := client.GetTxPoolContent(t.Context(), in)\n\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.NotNil(t, resp)\n\t\t\tassert.NotEmpty(t, resp.Txs)\n\n\t\t\tfor _, tx := range resp.Txs {\n\t\t\t\tassert.Equal(t, payloadType, tx.PayloadType)\n\t\t\t}\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "www/grpc/buf/buf.gen.yaml",
    "content": "version: v2\nplugins:\n  - local: protoc-gen-cobra\n    out: ./gen/go\n    opt: paths=source_relative\n  - local: protoc-gen-doc\n    out: ./gen/open-rpc\n    opt: ./buf/templates/openrpc.tmpl,pactus-openrpc.json\n  - local: protoc-gen-doc\n    out: ./gen/docs\n    opt: ./buf/templates/components.tmpl;./buf/templates/grpc.md.tmpl,grpc.md\n  - local: protoc-gen-doc\n    out: ./gen/docs\n    opt: ./buf/templates/components.tmpl;./buf/templates/json-rpc.md.tmpl,json-rpc.md\n  - local: protoc-gen-jrpc-gateway\n    out: ./gen/go\n  - local: protoc-gen-grpc-gateway\n    out: ./gen/go\n    opt:\n      - paths=source_relative\n      - grpc_api_configuration=./buf/grpc-gateway.config.yaml\n  - local: protoc-gen-openapiv2\n    out: ../http/swagger-ui\n    opt:\n      - grpc_api_configuration=./buf/grpc-gateway.config.yaml,allow_merge=true,merge_file_name=pactus\n      - openapi_configuration=./buf/openapi.config.yaml\n    # https://buf.build/protocolbuffers/go\n  - remote: buf.build/protocolbuffers/go:v1.36.11\n    out: ./gen/go\n    opt: paths=source_relative\n    # https://buf.build/grpc/go\n  - remote: buf.build/grpc/go:v1.6.0\n    out: ./gen/go\n    opt: paths=source_relative,require_unimplemented_servers=false\n    # https://buf.build/protocolbuffers/js\n  - remote: buf.build/protocolbuffers/js:v4.0.1\n    out: ./gen/js\n    opt:\n      - import_style=commonjs\n      - binary\n    # https://buf.build/grpc/node\n  - remote: buf.build/grpc/node:v1.13.1\n    out: ./gen/js\n    opt:\n      - import_style=commonjs\n      - grpc_js\n    # https://buf.build/grpc/web\n  - remote: buf.build/grpc/web:v2.0.2\n    out: ./gen/js\n    opt:\n      - import_style=commonjs\n      - mode=grpcweb\n    # https://buf.build/protocolbuffers/dart\n  - remote: buf.build/protocolbuffers/dart:v25.0.0\n    out: ./gen/dart\n    # https://buf.build/protocolbuffers/java\n  - remote: buf.build/protocolbuffers/java:v33.2\n    out: ./gen/java\n    # https://buf.build/grpc/java\n  - remote: buf.build/grpc/java:v1.77.0\n    out: ./gen/java\n    # https://buf.build/protocolbuffers/python\n  - remote: buf.build/protocolbuffers/python:v33.2\n    out: ./gen/python\n    # https://buf.build/grpc/python\n  - remote: buf.build/grpc/python:v1.76.0\n    out: ./gen/python\n    # https://buf.build/protocolbuffers/pyi\n  - remote: buf.build/protocolbuffers/pyi:v33.2\n    out: ./gen/python\n    # https://buf.build/community/neoeinstein-prost\n    # https://github.com/neoeinstein/protoc-gen-prost\n  - remote: buf.build/community/neoeinstein-prost:v0.5.0\n    out: ./gen/rust\n    opt:\n      - flat_output_dir=true\n      - compile_well_known_types=true\n    # https://buf.build/community/neoeinstein-prost-serde\n    # https://github.com/neoeinstein/protoc-gen-prost\n  - remote: buf.build/community/neoeinstein-prost-serde:v0.4.0\n    out: ./gen/rust\n    opt:\n      - flat_output_dir=true\n    # https://buf.build/community/neoeinstein-tonic\n    # https://github.com/neoeinstein/protoc-gen-prost\n  - remote: buf.build/community/neoeinstein-tonic:v0.5.0\n    out: ./gen/rust\n    opt:\n      - flat_output_dir=true\n      - compile_well_known_types=true\n"
  },
  {
    "path": "www/grpc/buf/buf.yaml",
    "content": "# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml\nversion: v2\nmodules:\n  - path: ./proto\n    lint:\n      use:\n        - STANDARD\n        - COMMENT_ENUM\n        - COMMENT_ENUM_VALUE\n        - COMMENT_FIELD\n        - COMMENT_MESSAGE\n        - COMMENT_ONEOF\n        - COMMENT_RPC\n        - COMMENT_SERVICE\n        - RPC_NO_CLIENT_STREAMING\n        - RPC_NO_SERVER_STREAMING\n\n      except:\n        - PACKAGE_DIRECTORY_MATCH\n        - PACKAGE_VERSION_SUFFIX\n        - SERVICE_SUFFIX\n        - RPC_REQUEST_RESPONSE_UNIQUE\n        - RPC_RESPONSE_STANDARD_NAME\n        - ENUM_ZERO_VALUE_SUFFIX\n      disallow_comment_ignores: true\n"
  },
  {
    "path": "www/grpc/buf/grpc-gateway.config.yaml",
    "content": "type: google.api.Service\nconfig_version: 3\n\nhttp:\n  rules:\n    # Blockchain APIs\n    - selector: pactus.Blockchain.GetBlock\n      get: \"/pactus/blockchain/get_block\"\n\n    - selector: pactus.Blockchain.GetBlockHash\n      get: \"/pactus/blockchain/get_block_hash\"\n\n    - selector: pactus.Blockchain.GetBlockHeight\n      get: \"/pactus/blockchain/get_block_height\"\n\n    - selector: pactus.Blockchain.GetAccount\n      get: \"/pactus/blockchain/get_account\"\n\n    - selector: pactus.Blockchain.GetValidator\n      get: \"/pactus/blockchain/get_validator\"\n\n    - selector: pactus.Blockchain.GetValidatorByNumber\n      get: \"/pactus/blockchain/get_validator_by_number\"\n\n    - selector: pactus.Blockchain.GetValidatorAddresses\n      get: \"/pactus/blockchain/get_validator_addresses\"\n\n    - selector: pactus.Blockchain.GetBlockchainInfo\n      get: \"/pactus/blockchain/get_blockchain_info\"\n\n    - selector: pactus.Blockchain.GetCommitteeInfo\n      get: \"/pactus/blockchain/get_committee_info\"\n\n    - selector: pactus.Blockchain.GetConsensusInfo\n      get: \"/pactus/blockchain/get_consensus_info\"\n\n    - selector: pactus.Blockchain.GetPublicKey\n      get: \"/pactus/blockchain/get_public_key\"\n\n    - selector: pactus.Blockchain.GetTxPoolContent\n      get: \"/pactus/blockchain/get_txpool_content\"\n\n    # Transaction APIs\n    - selector: pactus.Transaction.GetTransaction\n      get: \"/pactus/transaction/get_transaction\"\n\n    - selector: pactus.Transaction.BroadcastTransaction\n      post: \"/pactus/transaction/broadcast_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.CalculateFee\n      post: \"/pactus/transaction/calculate_fee\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.GetRawTransferTransaction\n      post: \"/pactus/transaction/get_raw_transfer_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.GetRawBondTransaction\n      post: \"/pactus/transaction/get_raw_bond_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.GetRawUnbondTransaction\n      post: \"/pactus/transaction/get_raw_unbond_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.GetRawWithdrawTransaction\n      post: \"/pactus/transaction/get_raw_withdraw_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.DecodeRawTransaction\n      post: \"/pactus/transaction/decode_raw_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Transaction.GetRawBatchTransferTransaction\n      post: \"/pactus/transaction/get_raw_batch_transfer_transaction\"\n      body: \"*\"\n\n    # Network APIs\n    - selector: pactus.Network.GetNetworkInfo\n      get: \"/pactus/network/get_network_info\"\n\n    - selector: pactus.Network.GetNodeInfo\n      get: \"/pactus/network/get_node_info\"\n\n    # Wallet APIs\n    - selector: pactus.Wallet.GetValidatorAddress\n      get: \"/pactus/wallet/get_validator_address\"\n\n    - selector: pactus.Wallet.CreateWallet\n      post: \"/pactus/wallet/create_wallet\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.RestoreWallet\n      post: \"/pactus/wallet/restore_wallet\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.LoadWallet\n      post: \"/pactus/wallet/load_wallet\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.UnloadWallet\n      post: \"/pactus/wallet/unload_wallet\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.ListWallets\n      get: \"/pactus/wallet/list_wallets\"\n\n    - selector: pactus.Wallet.GetWalletInfo\n      get: \"/pactus/wallet/get_wallet_info\"\n\n    - selector: pactus.Wallet.UpdatePassword\n      post: \"/pactus/wallet/update_password\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.SignRawTransaction\n      post: \"/pactus/wallet/sign_raw_transaction\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.GetNewAddress\n      post: \"/pactus/wallet/get_new_address\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.GetTotalBalance\n      get: \"/pactus/wallet/get_total_balance\"\n\n    - selector: pactus.Wallet.SignMessage\n      post: \"/pactus/wallet/sign_message\"\n      body: \"*\"\n\n    - selector: pactus.Wallet.GetTotalStake\n      get: \"/pactus/wallet/get_total_stake\"\n\n    - selector: pactus.Wallet.GetAddressInfo\n      get: \"/pactus/wallet/get_address_info\"\n\n    - selector: pactus.Wallet.SetAddressLabel\n      patch: \"/pactus/wallet/set_address_label\"\n\n    - selector: pactus.Wallet.ListAddresses\n      get: \"/pactus/wallet/list_addresses\"\n\n    - selector: pactus.Wallet.ListTransactions\n      get: \"/pactus/wallet/list_transactions\"\n\n      # Util APIs\n    - selector: pactus.Utils.SignMessageWithPrivateKey\n      post: \"/pactus/Utils/sign_message_with_private_key\"\n      body: \"*\"\n\n    - selector: pactus.Utils.VerifyMessage\n      post: \"/pactus/Utils/verify_message\"\n      body: \"*\"\n\n    - selector: pactus.Utils.PublicKeyAggregation\n      post: \"/pactus/Utils/public_key_aggregation\"\n      body: \"*\"\n\n    - selector: pactus.Utils.SignatureAggregation\n      post: \"/pactus/Utils/signature_aggregation\"\n      body: \"*\"\n\n    - selector: pactus.Network.Ping\n      get: \"/pactus/network/ping\"\n"
  },
  {
    "path": "www/grpc/buf/openapi.config.yaml",
    "content": "# Example\n# https://github.com/grpc-ecosystem/grpc-gateway/blob/main/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml#L4\nopenapiOptions:\n  file:\n    - file: \"transaction.proto\"\n      option:\n        basePath: \"/http/api\"\n        info:\n          title: Pactus APIs\n          version: \"2.0\"\n          description: |\n            Every node in the Pactus network can be configured to expose HTTP-APIs for communication.\n            These APIs follow the [OpenAPI (Swagger)](https://swagger.io/specification/) specification, and a complete list of available endpoints can be found here.\n\n            ## Units\n\n            All the amounts are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain.\n            Each PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.\n          contact:\n            name: Pactus Blockchain\n            url: https://pactus.org\n          license:\n            name: MIT License\n            url: https://github.com/pactus-project/pactus/blob/main/LICENSE\n        schemes:\n          - HTTP\n          - HTTPS\n        securityDefinitions:\n          security:\n            BasicAuth:\n              type: TYPE_BASIC\n        security:\n          - securityRequirement:\n              BasicAuth: {}\n"
  },
  {
    "path": "www/grpc/buf/templates/components.tmpl",
    "content": "{{/* ---------- components ---------- */}}\n{{- define \"field_desc\"}}\n  {{if .IsEnum}}(Enum){{end -}}\n  {{if .IsOneOf}}(OneOf){{end -}}\n  {{if (index .Options \"deprecated\"|default false)}}<strong>(Deprecated) </strong>{{end -}}\n  {{.Description -}}\n  {{if .DefaultValue}}Default: {{.DefaultValue}}{{end -}}\n  {{with getEnum .LongType }}\n      <br>Available values:<ul>\n      {{range .Values -}}\n      <li>{{.Name}} = {{.Number}} ({{ .Description }})</li>\n      {{end -}}\n      </ul>\n  {{- end -}}\n{{end -}}\n\n"
  },
  {
    "path": "www/grpc/buf/templates/grpc.md.tmpl",
    "content": "{{/* This template generates gRPC document for https://docs.pactus.org/api/grpc/ */}}---\ntitle: GRPC API Reference\nweight: 1\n---\n\nEvery node in the Pactus network can be configured to use the\n[gRPC](https://grpc.io/) protocol for communication.\nHere you can find the list of all gRPC methods and messages.\n\n## Units\n\nAll the amounts are in NanoPAC units,\nwhich are atomic and the smallest unit in the Pactus blockchain.\nEach PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.\n\n## Packages\n\nFor seamless integration with Pactus, you can use these client libraries:\n\n- <i class=\"fa-brands fa-js\"></i> [pactus-grpc](https://www.npmjs.com/package/pactus-grpc/) package for Javascript\n- <i class=\"fa-brands fa-python\"></i> [pactus-grpc](https://pypi.org/project/pactus-grpc/) package for Python\n- <i class=\"fa-brands fa-rust\"></i> [pactus-grpc](https://crates.io/crates/pactus-grpc) package for Rust\n\n## gRPC Services\n\n<div id=\"toc-container\">\n  <ul class=\"\">\n  {{- range .Files -}}\n    {{ range .Services }}\n    <li> {{.Name}} Service\n      <ul>{{- $service_name := .FullName -}}\n        {{ range .Methods }}\n        <li>\n          <a href=\"#{{$service_name}}.{{.Name}}\">\n          <span class=\"rpc-badge\"></span>{{.Name}}</a>\n        </li>\n        {{- end }}\n      </ul>\n    </li>\n    {{- end -}}\n  {{- end }}\n  </ul>\n</div>\n\n<div class=\"api-doc\">\n{{- range .Files -}}\n{{- range .Services }}\n\n### {{.Name}} Service\n\n{{p .Description}}\n{{- $service_name := .FullName }}\n{{- range .Methods }}\n\n#### {{.Name}} <span id=\"{{$service_name}}.{{.Name}}\" class=\"rpc-badge\"></span>\n\n{{p .Description}}\n\n<h4>{{.RequestLongType}} <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n\n{{- with getMessage .RequestLongType }}\n{{ if .HasFields -}}\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  {{ range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{.Name}}</td>\n    <td>{{.Label}} {{.LongType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{ end -}}\n  </tbody>\n</table>\n{{- else -}}\nRequest Message has no fields.\n{{- end -}}\n{{- end }}\n\n<h4>{{.ResponseLongType}} <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n\n{{- with getMessage .ResponseLongType }}\n{{ if .HasFields -}}\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  {{ range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{.Name}}</td>\n    <td>{{.Label}} {{.LongType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{$msg0 := .}} {{with getMessage .LongType -}}\n  {{- range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{$msg0.Name}}{{if $msg0.IsRepeated}}[]{{end}}.{{.Name}}</td>\n    <td>{{.Label}} {{.LongType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{$msg1 := .}} {{with getMessage .LongType -}}\n  {{- range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{$msg0.Name}}{{if $msg0.IsRepeated}}[]{{end}}.{{$msg1.Name}}{{if $msg1.IsRepeated}}[]{{end}}.{{.Name}}</td>\n    <td>{{.Label}} {{.LongType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n{{- end}}{{end}}{{end}}{{end}}{{end -}}\n</tbody>\n</table>\n{{- else -}}\nResponse Message has no fields.\n{{- end}}{{end}}{{end}}{{end -}}\n{{- end -}}\n\n## Scalar Value Types\n\n<table class=\"table table-bordered table-sm\">\n  <thead>\n    <tr><td>.proto Type</td><td>Go</td><td>C++</td><td>Rust</td><td>Java</td><td>Python</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">{{range .Scalars}}\n      <tr id=\"{{.ProtoType}}\">\n        <td class=\"fw-bold\">{{.ProtoType}}</td>\n        <td>{{.GoType}}</td>\n        <td>{{.CppType}}</td>\n        <td>{{.RustType}}</td>\n        <td>{{.JavaType}}</td>\n        <td>{{.PythonType}}</td>\n      </tr>{{end}}\n  </tbody>\n</table>\n</div>\n"
  },
  {
    "path": "www/grpc/buf/templates/json-rpc.md.tmpl",
    "content": "{{/* This template generates JSON-RPC document for https://docs.pactus.org/api/json-rpc/ */}}---\ntitle: JSON-RPC API Reference\nweight: 2\n---\n\nEvery node in the Pactus network can be configured to use the\n[JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.\nHere, you can find the list of all JSON-RPC methods, params and result.\n\n## Units\n\nAll the amounts are in NanoPAC units,\nwhich are atomic and the smallest unit in the Pactus blockchain.\nEach PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.\n\n## Packages\n\nFor seamless integration with Pactus, you can use these client libraries:\n\n- <i class=\"fa-brands fa-js\"></i> [pactus-jsonrpc](https://www.npmjs.com/package/pactus-jsonrpc/) package for Javascript\n- <i class=\"fa-brands fa-python\"></i> [pactus-jsonrpc](https://pypi.org/project/pactus-jsonrpc/) package for Python\n- <i class=\"fa-brands fa-rust\"></i> [pactus-jsonrpc](https://crates.io/crates/pactus-jsonrpc) package for Rust\n\n## Example\n\nTo call JSON-RPC methods, you need to create the JSON-RPC request:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"pactus.network.get_node_info\",\n  \"params\": {}\n}\n```\n\n> Make sure you always add the `params` field, even if no parameters are needed, and ensure you use curly braces.\n\nThen you use the `curl` command to send the request to the node:\n\n```bash\ncurl --location 'http://localhost:8545/' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"pactus.network.get_node_info\",\n    \"params\": {}\n}'\n```\n\n> Before sending the request, you need to enable the JSON-RPC service inside the\n> [configuration](/get-started/configuration/).\n\n### Using Basic Auth\n\nIf you have enabled the [gRPC Basic Authentication](/tutorials/grpc-sign-transactions/),\nthen you need to set the `Authorization` header.\n\n```bash\ncurl --location 'http://localhost:8545/' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Basic <BASIC-AUTH-TOKEN>' \\\n--data '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"pactus.blockchain.get_account\",\n    \"params\": {\n        \"address\": \"pc1z2r0fmu8sg2ffa0tgrr08gnefcxl2kq7wvquf8z\"\n    }\n}'\n```\n\n## JSON-RPC Methods\n\n<div id=\"toc-container\">\n  <ul class=\"\">\n  {{- range .Files -}}\n    {{ range .Services }}\n    <li> {{.Name}} Service\n      <ul>{{- $service_name := .SnakeName -}}\n        {{ range .Methods }}\n        <li>\n          <a href=\"#{{.SnakeName}}\">\n          <span class=\"rpc-badge\"></span>{{.SnakeName}}</a>\n        </li>\n        {{- end }}\n      </ul>\n    </li>\n    {{- end -}}\n  {{- end }}\n  </ul>\n</div>\n\n<div class=\"api-doc\">\n{{- range .Files -}}\n{{- range .Services }}\n\n### {{.Name}} Service\n\n{{p .Description}}\n{{- $service_name := .FullName }}\n{{- range .Methods }}\n\n#### {{.SnakeName}} <span id=\"{{.SnakeName}}\" class=\"rpc-badge\"></span>\n\n{{p .Description}}\n\n<h4>Parameters</h4>\n\n{{- with getMessage .RequestLongType }}\n{{ if .HasFields -}}\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  {{ range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{.SnakeName}}</td>\n    <td>{{.Label}} {{.JSONType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{ end -}}\n  </tbody>\n</table>\n{{- else -}}\nParameters has no fields.\n{{- end -}}\n{{- end }}\n\n<h4>Result</h4>\n\n{{- with getMessage .ResponseLongType }}\n{{ if .HasFields -}}\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  {{- range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{.Name}}</td>\n    <td>{{.Label}} {{.JSONType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{$msg0 := .}} {{with getMessage .LongType -}}\n  {{- range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{$msg0.Name}}{{if $msg0.IsRepeated}}[]{{end}}.{{.Name}}</td>\n    <td>{{.Label}} {{.JSONType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n  {{$msg1 := .}} {{with getMessage .LongType -}}\n  {{- range .Fields -}}\n  <tr>\n    <td class=\"fw-bold\">{{$msg0.Name}}{{if $msg0.IsRepeated}}[]{{end}}.{{$msg1.Name}}{{if $msg1.IsRepeated}}[]{{end}}.{{.Name}}</td>\n    <td>{{.Label}} {{.JSONType}}</td>\n    <td>\n{{- template \"field_desc\" . }}\n    </td>\n  </tr>\n{{- end}}{{end}}{{end}}{{end}}{{end -}}\n</tbody>\n</table>\n{{- else -}}\nResult has no fields.\n{{- end}}{{end}}{{end}}{{end -}}\n{{- end}}\n</div>\n"
  },
  {
    "path": "www/grpc/buf/templates/openrpc.tmpl",
    "content": "{\n  \"openrpc\": \"1.2.1\",\n  \"info\": {\n    \"title\": \"Pactus OpenRPC\",\n    \"version\": \"1.2.1\"\n  },\n  \"methods\": [\n{{- $firstMethod := true -}}\n{{- range .Files -}}\n  {{- range .Services -}}{{- $ServiceName := .SnakeName -}}\n    {{ range .Methods }}\n      {{- if not $firstMethod -}},{{- end -}}\n      {{- $firstMethod = false -}}\n    {\n      \"name\": \"{{ .SnakeName }}\",\n      \"description\": \"{{ .Description | nobr }}\",\n      \"tags\": [{ \"name\": \"{{ $ServiceName}}\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [\n{{- with getMessage .RequestLongType -}}\n  {{- $firstParam := true -}}\n  {{ range .Fields }}\n    {{- if not $firstParam -}},{{- end -}}\n    {{- $firstParam = false -}}\n        {\n          \"name\": \"{{ .SnakeName }}\",\n          \"description\": \"{{ .Description | nobr }}\",\n          \"schema\": {{ template \"renderFieldSchema\" . }}\n        }\n  {{- end -}}\n{{- end -}}\n      ],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\n{{- with getMessage .ResponseLongType -}}\n          \"required\": [\n          {{- $firstField := true -}}\n          {{- range .Fields -}}\n            {{- if not $firstField -}},{{- end -}}\n            {{- $firstField = false -}}\n            \"{{ .SnakeName }}\"\n          {{- end -}} ],\n          \"properties\": {\n  {{- $firstField := true -}}\n  {{- range .Fields -}}\n              {{- if not $firstField -}},{{- end -}}\n              {{- $firstField = false -}}\n              \"{{ .SnakeName }}\": {{ template \"renderFieldSchema\" . -}}\n  {{- end -}}\n{{- end -}}\n            }\n          }\n        }\n      }\n    {{- end -}}\n  {{- end -}}\n{{- end -}}\n  ]\n}\n\n{{/* --- Helpers --- */}}\n\n{{ define \"renderFieldSchema\" }}\n{{- if .IsMap -}}\n{\n  \"type\": \"object\"\n}\n{{- else if .IsRepeated -}}\n{\n  \"type\": \"array\",\n  \"items\": {{ template \"renderFieldItemSchema\" . }}\n}\n{{- else -}}\n{{- template \"renderFieldItemSchema\" . -}}\n{{- end -}}\n{{- end -}}\n\n{{- define \"renderFieldItemSchema\" -}}\n{{- if or (eq .OpenRPCType \"string\") (eq .OpenRPCType \"boolean\") (eq .OpenRPCType \"integer\") (eq .OpenRPCType \"number\") -}}\n{ \"type\": \"{{ .OpenRPCType }}\" }\n{{- else -}}\n{\n  \"type\": \"object\",\n{{- with getMessage .LongType -}}\n  \"required\": [\n    {{- $firstField := true -}}\n    {{- range .Fields -}}\n      {{- if not $firstField -}},{{- end -}}\n      {{- $firstField = false -}}\n      \"{{ .SnakeName }}\"\n    {{- end -}} ],\n  \"properties\": {\n  {{- $first := true -}}\n  {{- range .Fields -}}\n    {{- if not $first -}},{{- end -}}\n    {{- $first = false -}}\n    \"{{ .SnakeName }}\": {{ template \"renderFieldSchema\" . }}\n  {{- end -}}\n{{- end -}}\n  }\n}\n{{- end -}}\n{{- end -}}\n"
  },
  {
    "path": "www/grpc/config.go",
    "content": "package grpc\n\nimport \"github.com/pactus-project/pactus/util/htpasswd\"\n\n// Config defines parameters for the gRPC server.\ntype Config struct {\n\tEnable       bool   `toml:\"enable\"`\n\tEnableWallet bool   `toml:\"enable_wallet\"`\n\tListen       string `toml:\"listen\"`\n\tBasicAuth    string `toml:\"basic_auth\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tEnable: false,\n\t\tListen: \"\",\n\t}\n}\n\nfunc (c *Config) BasicCheck() error {\n\tif c.BasicAuth != \"\" {\n\t\tif _, _, err := htpasswd.ExtractBasicAuth(c.BasicAuth); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "www/grpc/gen/dart/blockchain.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from blockchain.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'blockchain.pbenum.dart';\nimport 'transaction.pb.dart' as $0;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'blockchain.pbenum.dart';\n\n/// Request message for retrieving account information.\nclass GetAccountRequest extends $pb.GeneratedMessage {\n  factory GetAccountRequest({\n    $core.String? address,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetAccountRequest._();\n\n  factory GetAccountRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetAccountRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetAccountRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAccountRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAccountRequest copyWith(void Function(GetAccountRequest) updates) =>\n      super.copyWith((message) => updates(message as GetAccountRequest))\n          as GetAccountRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetAccountRequest create() => GetAccountRequest._();\n  @$core.override\n  GetAccountRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetAccountRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetAccountRequest>(create);\n  static GetAccountRequest? _defaultInstance;\n\n  /// The address of the account to retrieve information for.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n}\n\n/// Response message contains account information.\nclass GetAccountResponse extends $pb.GeneratedMessage {\n  factory GetAccountResponse({\n    AccountInfo? account,\n  }) {\n    final result = create();\n    if (account != null) result.account = account;\n    return result;\n  }\n\n  GetAccountResponse._();\n\n  factory GetAccountResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetAccountResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetAccountResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOM<AccountInfo>(1, _omitFieldNames ? '' : 'account',\n        subBuilder: AccountInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAccountResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAccountResponse copyWith(void Function(GetAccountResponse) updates) =>\n      super.copyWith((message) => updates(message as GetAccountResponse))\n          as GetAccountResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetAccountResponse create() => GetAccountResponse._();\n  @$core.override\n  GetAccountResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetAccountResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetAccountResponse>(create);\n  static GetAccountResponse? _defaultInstance;\n\n  /// Detailed information about the account.\n  @$pb.TagNumber(1)\n  AccountInfo get account => $_getN(0);\n  @$pb.TagNumber(1)\n  set account(AccountInfo value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAccount() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAccount() => $_clearField(1);\n  @$pb.TagNumber(1)\n  AccountInfo ensureAccount() => $_ensure(0);\n}\n\n/// Request message for retrieving validator addresses.\nclass GetValidatorAddressesRequest extends $pb.GeneratedMessage {\n  factory GetValidatorAddressesRequest() => create();\n\n  GetValidatorAddressesRequest._();\n\n  factory GetValidatorAddressesRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorAddressesRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorAddressesRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressesRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressesRequest copyWith(\n          void Function(GetValidatorAddressesRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetValidatorAddressesRequest))\n          as GetValidatorAddressesRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressesRequest create() =>\n      GetValidatorAddressesRequest._();\n  @$core.override\n  GetValidatorAddressesRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressesRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorAddressesRequest>(create);\n  static GetValidatorAddressesRequest? _defaultInstance;\n}\n\n/// Response message contains list of validator addresses.\nclass GetValidatorAddressesResponse extends $pb.GeneratedMessage {\n  factory GetValidatorAddressesResponse({\n    $core.Iterable<$core.String>? addresses,\n  }) {\n    final result = create();\n    if (addresses != null) result.addresses.addAll(addresses);\n    return result;\n  }\n\n  GetValidatorAddressesResponse._();\n\n  factory GetValidatorAddressesResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorAddressesResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorAddressesResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'addresses')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressesResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressesResponse copyWith(\n          void Function(GetValidatorAddressesResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetValidatorAddressesResponse))\n          as GetValidatorAddressesResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressesResponse create() =>\n      GetValidatorAddressesResponse._();\n  @$core.override\n  GetValidatorAddressesResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressesResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorAddressesResponse>(create);\n  static GetValidatorAddressesResponse? _defaultInstance;\n\n  /// List of validator addresses.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get addresses => $_getList(0);\n}\n\n/// Request message for retrieving validator information by address.\nclass GetValidatorRequest extends $pb.GeneratedMessage {\n  factory GetValidatorRequest({\n    $core.String? address,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetValidatorRequest._();\n\n  factory GetValidatorRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorRequest copyWith(void Function(GetValidatorRequest) updates) =>\n      super.copyWith((message) => updates(message as GetValidatorRequest))\n          as GetValidatorRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorRequest create() => GetValidatorRequest._();\n  @$core.override\n  GetValidatorRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorRequest>(create);\n  static GetValidatorRequest? _defaultInstance;\n\n  /// The address of the validator to retrieve information for.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n}\n\n/// Request message for retrieving validator information by number.\nclass GetValidatorByNumberRequest extends $pb.GeneratedMessage {\n  factory GetValidatorByNumberRequest({\n    $core.int? number,\n  }) {\n    final result = create();\n    if (number != null) result.number = number;\n    return result;\n  }\n\n  GetValidatorByNumberRequest._();\n\n  factory GetValidatorByNumberRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorByNumberRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorByNumberRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'number')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorByNumberRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorByNumberRequest copyWith(\n          void Function(GetValidatorByNumberRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetValidatorByNumberRequest))\n          as GetValidatorByNumberRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorByNumberRequest create() =>\n      GetValidatorByNumberRequest._();\n  @$core.override\n  GetValidatorByNumberRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorByNumberRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorByNumberRequest>(create);\n  static GetValidatorByNumberRequest? _defaultInstance;\n\n  /// The unique number of the validator to retrieve information for.\n  @$pb.TagNumber(1)\n  $core.int get number => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set number($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNumber() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNumber() => $_clearField(1);\n}\n\n/// Response message contains validator information.\nclass GetValidatorResponse extends $pb.GeneratedMessage {\n  factory GetValidatorResponse({\n    ValidatorInfo? validator,\n  }) {\n    final result = create();\n    if (validator != null) result.validator = validator;\n    return result;\n  }\n\n  GetValidatorResponse._();\n\n  factory GetValidatorResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOM<ValidatorInfo>(1, _omitFieldNames ? '' : 'validator',\n        subBuilder: ValidatorInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorResponse copyWith(void Function(GetValidatorResponse) updates) =>\n      super.copyWith((message) => updates(message as GetValidatorResponse))\n          as GetValidatorResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorResponse create() => GetValidatorResponse._();\n  @$core.override\n  GetValidatorResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorResponse>(create);\n  static GetValidatorResponse? _defaultInstance;\n\n  /// Detailed information about the validator.\n  @$pb.TagNumber(1)\n  ValidatorInfo get validator => $_getN(0);\n  @$pb.TagNumber(1)\n  set validator(ValidatorInfo value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValidator() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValidator() => $_clearField(1);\n  @$pb.TagNumber(1)\n  ValidatorInfo ensureValidator() => $_ensure(0);\n}\n\n/// Request message for retrieving public key by address.\nclass GetPublicKeyRequest extends $pb.GeneratedMessage {\n  factory GetPublicKeyRequest({\n    $core.String? address,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetPublicKeyRequest._();\n\n  factory GetPublicKeyRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetPublicKeyRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetPublicKeyRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPublicKeyRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPublicKeyRequest copyWith(void Function(GetPublicKeyRequest) updates) =>\n      super.copyWith((message) => updates(message as GetPublicKeyRequest))\n          as GetPublicKeyRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetPublicKeyRequest create() => GetPublicKeyRequest._();\n  @$core.override\n  GetPublicKeyRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetPublicKeyRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetPublicKeyRequest>(create);\n  static GetPublicKeyRequest? _defaultInstance;\n\n  /// The address for which to retrieve the public key.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n}\n\n/// Response message contains public key information.\nclass GetPublicKeyResponse extends $pb.GeneratedMessage {\n  factory GetPublicKeyResponse({\n    $core.String? publicKey,\n  }) {\n    final result = create();\n    if (publicKey != null) result.publicKey = publicKey;\n    return result;\n  }\n\n  GetPublicKeyResponse._();\n\n  factory GetPublicKeyResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetPublicKeyResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetPublicKeyResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'publicKey')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPublicKeyResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPublicKeyResponse copyWith(void Function(GetPublicKeyResponse) updates) =>\n      super.copyWith((message) => updates(message as GetPublicKeyResponse))\n          as GetPublicKeyResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetPublicKeyResponse create() => GetPublicKeyResponse._();\n  @$core.override\n  GetPublicKeyResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetPublicKeyResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetPublicKeyResponse>(create);\n  static GetPublicKeyResponse? _defaultInstance;\n\n  /// The public key associated with the provided address.\n  @$pb.TagNumber(1)\n  $core.String get publicKey => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set publicKey($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPublicKey() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPublicKey() => $_clearField(1);\n}\n\n/// Request message for retrieving block information based on height and verbosity level.\nclass GetBlockRequest extends $pb.GeneratedMessage {\n  factory GetBlockRequest({\n    $core.int? height,\n    BlockVerbosity? verbosity,\n  }) {\n    final result = create();\n    if (height != null) result.height = height;\n    if (verbosity != null) result.verbosity = verbosity;\n    return result;\n  }\n\n  GetBlockRequest._();\n\n  factory GetBlockRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..aE<BlockVerbosity>(2, _omitFieldNames ? '' : 'verbosity',\n        enumValues: BlockVerbosity.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockRequest copyWith(void Function(GetBlockRequest) updates) =>\n      super.copyWith((message) => updates(message as GetBlockRequest))\n          as GetBlockRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockRequest create() => GetBlockRequest._();\n  @$core.override\n  GetBlockRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockRequest>(create);\n  static GetBlockRequest? _defaultInstance;\n\n  /// The height of the block to retrieve.\n  @$pb.TagNumber(1)\n  $core.int get height => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set height($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHeight() => $_clearField(1);\n\n  /// The verbosity level for block information.\n  @$pb.TagNumber(2)\n  BlockVerbosity get verbosity => $_getN(1);\n  @$pb.TagNumber(2)\n  set verbosity(BlockVerbosity value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasVerbosity() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearVerbosity() => $_clearField(2);\n}\n\n/// Response message contains block information.\nclass GetBlockResponse extends $pb.GeneratedMessage {\n  factory GetBlockResponse({\n    $core.int? height,\n    $core.String? hash,\n    $core.String? data,\n    $core.int? blockTime,\n    BlockHeaderInfo? header,\n    CertificateInfo? prevCert,\n    $core.Iterable<$0.TransactionInfo>? txs,\n  }) {\n    final result = create();\n    if (height != null) result.height = height;\n    if (hash != null) result.hash = hash;\n    if (data != null) result.data = data;\n    if (blockTime != null) result.blockTime = blockTime;\n    if (header != null) result.header = header;\n    if (prevCert != null) result.prevCert = prevCert;\n    if (txs != null) result.txs.addAll(txs);\n    return result;\n  }\n\n  GetBlockResponse._();\n\n  factory GetBlockResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'hash')\n    ..aOS(3, _omitFieldNames ? '' : 'data')\n    ..aI(4, _omitFieldNames ? '' : 'blockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOM<BlockHeaderInfo>(5, _omitFieldNames ? '' : 'header',\n        subBuilder: BlockHeaderInfo.create)\n    ..aOM<CertificateInfo>(6, _omitFieldNames ? '' : 'prevCert',\n        subBuilder: CertificateInfo.create)\n    ..pPM<$0.TransactionInfo>(7, _omitFieldNames ? '' : 'txs',\n        subBuilder: $0.TransactionInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockResponse copyWith(void Function(GetBlockResponse) updates) =>\n      super.copyWith((message) => updates(message as GetBlockResponse))\n          as GetBlockResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockResponse create() => GetBlockResponse._();\n  @$core.override\n  GetBlockResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockResponse>(create);\n  static GetBlockResponse? _defaultInstance;\n\n  /// The height of the block.\n  @$pb.TagNumber(1)\n  $core.int get height => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set height($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHeight() => $_clearField(1);\n\n  /// The hash of the block.\n  @$pb.TagNumber(2)\n  $core.String get hash => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set hash($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasHash() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearHash() => $_clearField(2);\n\n  /// Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n  @$pb.TagNumber(3)\n  $core.String get data => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set data($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasData() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearData() => $_clearField(3);\n\n  /// The timestamp of the block.\n  @$pb.TagNumber(4)\n  $core.int get blockTime => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set blockTime($core.int value) => $_setUnsignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasBlockTime() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearBlockTime() => $_clearField(4);\n\n  /// Header information of the block.\n  @$pb.TagNumber(5)\n  BlockHeaderInfo get header => $_getN(4);\n  @$pb.TagNumber(5)\n  set header(BlockHeaderInfo value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasHeader() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearHeader() => $_clearField(5);\n  @$pb.TagNumber(5)\n  BlockHeaderInfo ensureHeader() => $_ensure(4);\n\n  /// Certificate information of the previous block.\n  @$pb.TagNumber(6)\n  CertificateInfo get prevCert => $_getN(5);\n  @$pb.TagNumber(6)\n  set prevCert(CertificateInfo value) => $_setField(6, value);\n  @$pb.TagNumber(6)\n  $core.bool hasPrevCert() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearPrevCert() => $_clearField(6);\n  @$pb.TagNumber(6)\n  CertificateInfo ensurePrevCert() => $_ensure(5);\n\n  /// List of transactions in the block, available when verbosity level is set to\n  /// BLOCK_VERBOSITY_TRANSACTIONS.\n  @$pb.TagNumber(7)\n  $pb.PbList<$0.TransactionInfo> get txs => $_getList(6);\n}\n\n/// Request message for retrieving block hash by height.\nclass GetBlockHashRequest extends $pb.GeneratedMessage {\n  factory GetBlockHashRequest({\n    $core.int? height,\n  }) {\n    final result = create();\n    if (height != null) result.height = height;\n    return result;\n  }\n\n  GetBlockHashRequest._();\n\n  factory GetBlockHashRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockHashRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockHashRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHashRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHashRequest copyWith(void Function(GetBlockHashRequest) updates) =>\n      super.copyWith((message) => updates(message as GetBlockHashRequest))\n          as GetBlockHashRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHashRequest create() => GetBlockHashRequest._();\n  @$core.override\n  GetBlockHashRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHashRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockHashRequest>(create);\n  static GetBlockHashRequest? _defaultInstance;\n\n  /// The height of the block to retrieve the hash for.\n  @$pb.TagNumber(1)\n  $core.int get height => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set height($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHeight() => $_clearField(1);\n}\n\n/// Response message contains block hash.\nclass GetBlockHashResponse extends $pb.GeneratedMessage {\n  factory GetBlockHashResponse({\n    $core.String? hash,\n  }) {\n    final result = create();\n    if (hash != null) result.hash = hash;\n    return result;\n  }\n\n  GetBlockHashResponse._();\n\n  factory GetBlockHashResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockHashResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockHashResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'hash')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHashResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHashResponse copyWith(void Function(GetBlockHashResponse) updates) =>\n      super.copyWith((message) => updates(message as GetBlockHashResponse))\n          as GetBlockHashResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHashResponse create() => GetBlockHashResponse._();\n  @$core.override\n  GetBlockHashResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHashResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockHashResponse>(create);\n  static GetBlockHashResponse? _defaultInstance;\n\n  /// The hash of the block.\n  @$pb.TagNumber(1)\n  $core.String get hash => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set hash($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHash() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHash() => $_clearField(1);\n}\n\n/// Request message for retrieving block height by hash.\nclass GetBlockHeightRequest extends $pb.GeneratedMessage {\n  factory GetBlockHeightRequest({\n    $core.String? hash,\n  }) {\n    final result = create();\n    if (hash != null) result.hash = hash;\n    return result;\n  }\n\n  GetBlockHeightRequest._();\n\n  factory GetBlockHeightRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockHeightRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockHeightRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'hash')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHeightRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHeightRequest copyWith(\n          void Function(GetBlockHeightRequest) updates) =>\n      super.copyWith((message) => updates(message as GetBlockHeightRequest))\n          as GetBlockHeightRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHeightRequest create() => GetBlockHeightRequest._();\n  @$core.override\n  GetBlockHeightRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHeightRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockHeightRequest>(create);\n  static GetBlockHeightRequest? _defaultInstance;\n\n  /// The hash of the block to retrieve the height for.\n  @$pb.TagNumber(1)\n  $core.String get hash => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set hash($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHash() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHash() => $_clearField(1);\n}\n\n/// Response message contains block height.\nclass GetBlockHeightResponse extends $pb.GeneratedMessage {\n  factory GetBlockHeightResponse({\n    $core.int? height,\n  }) {\n    final result = create();\n    if (height != null) result.height = height;\n    return result;\n  }\n\n  GetBlockHeightResponse._();\n\n  factory GetBlockHeightResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockHeightResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockHeightResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHeightResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockHeightResponse copyWith(\n          void Function(GetBlockHeightResponse) updates) =>\n      super.copyWith((message) => updates(message as GetBlockHeightResponse))\n          as GetBlockHeightResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHeightResponse create() => GetBlockHeightResponse._();\n  @$core.override\n  GetBlockHeightResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockHeightResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockHeightResponse>(create);\n  static GetBlockHeightResponse? _defaultInstance;\n\n  /// The height of the block.\n  @$pb.TagNumber(1)\n  $core.int get height => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set height($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHeight() => $_clearField(1);\n}\n\n/// Request message for retrieving blockchain information.\nclass GetBlockchainInfoRequest extends $pb.GeneratedMessage {\n  factory GetBlockchainInfoRequest() => create();\n\n  GetBlockchainInfoRequest._();\n\n  factory GetBlockchainInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockchainInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockchainInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockchainInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockchainInfoRequest copyWith(\n          void Function(GetBlockchainInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetBlockchainInfoRequest))\n          as GetBlockchainInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockchainInfoRequest create() => GetBlockchainInfoRequest._();\n  @$core.override\n  GetBlockchainInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockchainInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockchainInfoRequest>(create);\n  static GetBlockchainInfoRequest? _defaultInstance;\n}\n\n/// Response message contains general blockchain information.\nclass GetBlockchainInfoResponse extends $pb.GeneratedMessage {\n  factory GetBlockchainInfoResponse({\n    $core.int? lastBlockHeight,\n    $core.String? lastBlockHash,\n    $core.int? totalAccounts,\n    $core.int? totalValidators,\n    $fixnum.Int64? totalPower,\n    $fixnum.Int64? committeePower,\n    $core.bool? isPruned,\n    $core.int? pruningHeight,\n    $fixnum.Int64? lastBlockTime,\n    $core.int? activeValidators,\n    $core.bool? inCommittee,\n    $core.int? committeeSize,\n    $core.double? averageScore,\n  }) {\n    final result = create();\n    if (lastBlockHeight != null) result.lastBlockHeight = lastBlockHeight;\n    if (lastBlockHash != null) result.lastBlockHash = lastBlockHash;\n    if (totalAccounts != null) result.totalAccounts = totalAccounts;\n    if (totalValidators != null) result.totalValidators = totalValidators;\n    if (totalPower != null) result.totalPower = totalPower;\n    if (committeePower != null) result.committeePower = committeePower;\n    if (isPruned != null) result.isPruned = isPruned;\n    if (pruningHeight != null) result.pruningHeight = pruningHeight;\n    if (lastBlockTime != null) result.lastBlockTime = lastBlockTime;\n    if (activeValidators != null) result.activeValidators = activeValidators;\n    if (inCommittee != null) result.inCommittee = inCommittee;\n    if (committeeSize != null) result.committeeSize = committeeSize;\n    if (averageScore != null) result.averageScore = averageScore;\n    return result;\n  }\n\n  GetBlockchainInfoResponse._();\n\n  factory GetBlockchainInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetBlockchainInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetBlockchainInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lastBlockHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'lastBlockHash')\n    ..aI(3, _omitFieldNames ? '' : 'totalAccounts')\n    ..aI(4, _omitFieldNames ? '' : 'totalValidators')\n    ..aInt64(5, _omitFieldNames ? '' : 'totalPower')\n    ..aInt64(6, _omitFieldNames ? '' : 'committeePower')\n    ..aOB(8, _omitFieldNames ? '' : 'isPruned')\n    ..aI(9, _omitFieldNames ? '' : 'pruningHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aInt64(10, _omitFieldNames ? '' : 'lastBlockTime')\n    ..aI(12, _omitFieldNames ? '' : 'activeValidators')\n    ..aOB(13, _omitFieldNames ? '' : 'inCommittee')\n    ..aI(14, _omitFieldNames ? '' : 'committeeSize')\n    ..aD(15, _omitFieldNames ? '' : 'averageScore')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockchainInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetBlockchainInfoResponse copyWith(\n          void Function(GetBlockchainInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetBlockchainInfoResponse))\n          as GetBlockchainInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetBlockchainInfoResponse create() => GetBlockchainInfoResponse._();\n  @$core.override\n  GetBlockchainInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetBlockchainInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetBlockchainInfoResponse>(create);\n  static GetBlockchainInfoResponse? _defaultInstance;\n\n  /// The height of the last block in the blockchain.\n  @$pb.TagNumber(1)\n  $core.int get lastBlockHeight => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lastBlockHeight($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLastBlockHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLastBlockHeight() => $_clearField(1);\n\n  /// The hash of the last block in the blockchain.\n  @$pb.TagNumber(2)\n  $core.String get lastBlockHash => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set lastBlockHash($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasLastBlockHash() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearLastBlockHash() => $_clearField(2);\n\n  /// The total number of accounts in the blockchain.\n  @$pb.TagNumber(3)\n  $core.int get totalAccounts => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set totalAccounts($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasTotalAccounts() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearTotalAccounts() => $_clearField(3);\n\n  /// The total number of validators in the blockchain.\n  @$pb.TagNumber(4)\n  $core.int get totalValidators => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set totalValidators($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasTotalValidators() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearTotalValidators() => $_clearField(4);\n\n  /// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get totalPower => $_getI64(4);\n  @$pb.TagNumber(5)\n  set totalPower($fixnum.Int64 value) => $_setInt64(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasTotalPower() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearTotalPower() => $_clearField(5);\n\n  /// The power of the committee.\n  @$pb.TagNumber(6)\n  $fixnum.Int64 get committeePower => $_getI64(5);\n  @$pb.TagNumber(6)\n  set committeePower($fixnum.Int64 value) => $_setInt64(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasCommitteePower() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearCommitteePower() => $_clearField(6);\n\n  /// If the blocks are subject to pruning.\n  @$pb.TagNumber(8)\n  $core.bool get isPruned => $_getBF(6);\n  @$pb.TagNumber(8)\n  set isPruned($core.bool value) => $_setBool(6, value);\n  @$pb.TagNumber(8)\n  $core.bool hasIsPruned() => $_has(6);\n  @$pb.TagNumber(8)\n  void clearIsPruned() => $_clearField(8);\n\n  /// Lowest-height block stored (only present if pruning is enabled)\n  @$pb.TagNumber(9)\n  $core.int get pruningHeight => $_getIZ(7);\n  @$pb.TagNumber(9)\n  set pruningHeight($core.int value) => $_setUnsignedInt32(7, value);\n  @$pb.TagNumber(9)\n  $core.bool hasPruningHeight() => $_has(7);\n  @$pb.TagNumber(9)\n  void clearPruningHeight() => $_clearField(9);\n\n  /// The timestamp of the last block in Unix format.\n  @$pb.TagNumber(10)\n  $fixnum.Int64 get lastBlockTime => $_getI64(8);\n  @$pb.TagNumber(10)\n  set lastBlockTime($fixnum.Int64 value) => $_setInt64(8, value);\n  @$pb.TagNumber(10)\n  $core.bool hasLastBlockTime() => $_has(8);\n  @$pb.TagNumber(10)\n  void clearLastBlockTime() => $_clearField(10);\n\n  /// The number of active (not unbonded) validators in the blockchain.\n  @$pb.TagNumber(12)\n  $core.int get activeValidators => $_getIZ(9);\n  @$pb.TagNumber(12)\n  set activeValidators($core.int value) => $_setSignedInt32(9, value);\n  @$pb.TagNumber(12)\n  $core.bool hasActiveValidators() => $_has(9);\n  @$pb.TagNumber(12)\n  void clearActiveValidators() => $_clearField(12);\n\n  /// Indicates whether this node participates in consensus: true if at least one\n  /// of its running validators is a member of the current committee.\n  @$pb.TagNumber(13)\n  $core.bool get inCommittee => $_getBF(10);\n  @$pb.TagNumber(13)\n  set inCommittee($core.bool value) => $_setBool(10, value);\n  @$pb.TagNumber(13)\n  $core.bool hasInCommittee() => $_has(10);\n  @$pb.TagNumber(13)\n  void clearInCommittee() => $_clearField(13);\n\n  /// The number of validators in the current committee.\n  @$pb.TagNumber(14)\n  $core.int get committeeSize => $_getIZ(11);\n  @$pb.TagNumber(14)\n  set committeeSize($core.int value) => $_setSignedInt32(11, value);\n  @$pb.TagNumber(14)\n  $core.bool hasCommitteeSize() => $_has(11);\n  @$pb.TagNumber(14)\n  void clearCommitteeSize() => $_clearField(14);\n\n  /// Average availability score of validators with stake, in percentage (0-100).\n  @$pb.TagNumber(15)\n  $core.double get averageScore => $_getN(12);\n  @$pb.TagNumber(15)\n  set averageScore($core.double value) => $_setDouble(12, value);\n  @$pb.TagNumber(15)\n  $core.bool hasAverageScore() => $_has(12);\n  @$pb.TagNumber(15)\n  void clearAverageScore() => $_clearField(15);\n}\n\n/// Request message for retrieving committee information.\nclass GetCommitteeInfoRequest extends $pb.GeneratedMessage {\n  factory GetCommitteeInfoRequest() => create();\n\n  GetCommitteeInfoRequest._();\n\n  factory GetCommitteeInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetCommitteeInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetCommitteeInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetCommitteeInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetCommitteeInfoRequest copyWith(\n          void Function(GetCommitteeInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetCommitteeInfoRequest))\n          as GetCommitteeInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetCommitteeInfoRequest create() => GetCommitteeInfoRequest._();\n  @$core.override\n  GetCommitteeInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetCommitteeInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetCommitteeInfoRequest>(create);\n  static GetCommitteeInfoRequest? _defaultInstance;\n}\n\n/// Response message contains committee information.\nclass GetCommitteeInfoResponse extends $pb.GeneratedMessage {\n  factory GetCommitteeInfoResponse({\n    $core.int? committeeSize,\n    $fixnum.Int64? committeePower,\n    $fixnum.Int64? totalPower,\n    $core.Iterable<ValidatorInfo>? validators,\n    $core.Iterable<$core.MapEntry<$core.int, $core.double>>? protocolVersions,\n  }) {\n    final result = create();\n    if (committeeSize != null) result.committeeSize = committeeSize;\n    if (committeePower != null) result.committeePower = committeePower;\n    if (totalPower != null) result.totalPower = totalPower;\n    if (validators != null) result.validators.addAll(validators);\n    if (protocolVersions != null)\n      result.protocolVersions.addEntries(protocolVersions);\n    return result;\n  }\n\n  GetCommitteeInfoResponse._();\n\n  factory GetCommitteeInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetCommitteeInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetCommitteeInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'committeeSize')\n    ..aInt64(2, _omitFieldNames ? '' : 'committeePower')\n    ..aInt64(3, _omitFieldNames ? '' : 'totalPower')\n    ..pPM<ValidatorInfo>(4, _omitFieldNames ? '' : 'validators',\n        subBuilder: ValidatorInfo.create)\n    ..m<$core.int, $core.double>(5, _omitFieldNames ? '' : 'protocolVersions',\n        entryClassName: 'GetCommitteeInfoResponse.ProtocolVersionsEntry',\n        keyFieldType: $pb.PbFieldType.O3,\n        valueFieldType: $pb.PbFieldType.OD,\n        packageName: const $pb.PackageName('pactus'))\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetCommitteeInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetCommitteeInfoResponse copyWith(\n          void Function(GetCommitteeInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetCommitteeInfoResponse))\n          as GetCommitteeInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetCommitteeInfoResponse create() => GetCommitteeInfoResponse._();\n  @$core.override\n  GetCommitteeInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetCommitteeInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetCommitteeInfoResponse>(create);\n  static GetCommitteeInfoResponse? _defaultInstance;\n\n  /// The number of validators in the committee.\n  @$pb.TagNumber(1)\n  $core.int get committeeSize => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set committeeSize($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasCommitteeSize() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearCommitteeSize() => $_clearField(1);\n\n  /// The power of the committee.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get committeePower => $_getI64(1);\n  @$pb.TagNumber(2)\n  set committeePower($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasCommitteePower() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearCommitteePower() => $_clearField(2);\n\n  /// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n  @$pb.TagNumber(3)\n  $fixnum.Int64 get totalPower => $_getI64(2);\n  @$pb.TagNumber(3)\n  set totalPower($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasTotalPower() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearTotalPower() => $_clearField(3);\n\n  /// List of committee validators.\n  @$pb.TagNumber(4)\n  $pb.PbList<ValidatorInfo> get validators => $_getList(3);\n\n  /// Map of protocol versions and their percentages in the committee.\n  @$pb.TagNumber(5)\n  $pb.PbMap<$core.int, $core.double> get protocolVersions => $_getMap(4);\n}\n\n/// Request message for retrieving consensus information.\nclass GetConsensusInfoRequest extends $pb.GeneratedMessage {\n  factory GetConsensusInfoRequest() => create();\n\n  GetConsensusInfoRequest._();\n\n  factory GetConsensusInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetConsensusInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetConsensusInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetConsensusInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetConsensusInfoRequest copyWith(\n          void Function(GetConsensusInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetConsensusInfoRequest))\n          as GetConsensusInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetConsensusInfoRequest create() => GetConsensusInfoRequest._();\n  @$core.override\n  GetConsensusInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetConsensusInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetConsensusInfoRequest>(create);\n  static GetConsensusInfoRequest? _defaultInstance;\n}\n\n/// Response message contains consensus information.\nclass GetConsensusInfoResponse extends $pb.GeneratedMessage {\n  factory GetConsensusInfoResponse({\n    ProposalInfo? proposal,\n    $core.Iterable<ConsensusInfo>? instances,\n  }) {\n    final result = create();\n    if (proposal != null) result.proposal = proposal;\n    if (instances != null) result.instances.addAll(instances);\n    return result;\n  }\n\n  GetConsensusInfoResponse._();\n\n  factory GetConsensusInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetConsensusInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetConsensusInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOM<ProposalInfo>(1, _omitFieldNames ? '' : 'proposal',\n        subBuilder: ProposalInfo.create)\n    ..pPM<ConsensusInfo>(2, _omitFieldNames ? '' : 'instances',\n        subBuilder: ConsensusInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetConsensusInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetConsensusInfoResponse copyWith(\n          void Function(GetConsensusInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetConsensusInfoResponse))\n          as GetConsensusInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetConsensusInfoResponse create() => GetConsensusInfoResponse._();\n  @$core.override\n  GetConsensusInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetConsensusInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetConsensusInfoResponse>(create);\n  static GetConsensusInfoResponse? _defaultInstance;\n\n  /// The proposal of the consensus info.\n  @$pb.TagNumber(1)\n  ProposalInfo get proposal => $_getN(0);\n  @$pb.TagNumber(1)\n  set proposal(ProposalInfo value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasProposal() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearProposal() => $_clearField(1);\n  @$pb.TagNumber(1)\n  ProposalInfo ensureProposal() => $_ensure(0);\n\n  /// List of consensus instances.\n  @$pb.TagNumber(2)\n  $pb.PbList<ConsensusInfo> get instances => $_getList(1);\n}\n\n/// Request message for retrieving transactions in the transaction pool.\nclass GetTxPoolContentRequest extends $pb.GeneratedMessage {\n  factory GetTxPoolContentRequest({\n    $0.PayloadType? payloadType,\n  }) {\n    final result = create();\n    if (payloadType != null) result.payloadType = payloadType;\n    return result;\n  }\n\n  GetTxPoolContentRequest._();\n\n  factory GetTxPoolContentRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTxPoolContentRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTxPoolContentRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aE<$0.PayloadType>(1, _omitFieldNames ? '' : 'payloadType',\n        enumValues: $0.PayloadType.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTxPoolContentRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTxPoolContentRequest copyWith(\n          void Function(GetTxPoolContentRequest) updates) =>\n      super.copyWith((message) => updates(message as GetTxPoolContentRequest))\n          as GetTxPoolContentRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTxPoolContentRequest create() => GetTxPoolContentRequest._();\n  @$core.override\n  GetTxPoolContentRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTxPoolContentRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTxPoolContentRequest>(create);\n  static GetTxPoolContentRequest? _defaultInstance;\n\n  /// The type of transactions to retrieve from the transaction pool. 0 means all types.\n  @$pb.TagNumber(1)\n  $0.PayloadType get payloadType => $_getN(0);\n  @$pb.TagNumber(1)\n  set payloadType($0.PayloadType value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPayloadType() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPayloadType() => $_clearField(1);\n}\n\n/// Response message contains transactions in the transaction pool.\nclass GetTxPoolContentResponse extends $pb.GeneratedMessage {\n  factory GetTxPoolContentResponse({\n    $core.Iterable<$0.TransactionInfo>? txs,\n  }) {\n    final result = create();\n    if (txs != null) result.txs.addAll(txs);\n    return result;\n  }\n\n  GetTxPoolContentResponse._();\n\n  factory GetTxPoolContentResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTxPoolContentResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTxPoolContentResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPM<$0.TransactionInfo>(1, _omitFieldNames ? '' : 'txs',\n        subBuilder: $0.TransactionInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTxPoolContentResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTxPoolContentResponse copyWith(\n          void Function(GetTxPoolContentResponse) updates) =>\n      super.copyWith((message) => updates(message as GetTxPoolContentResponse))\n          as GetTxPoolContentResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTxPoolContentResponse create() => GetTxPoolContentResponse._();\n  @$core.override\n  GetTxPoolContentResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTxPoolContentResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTxPoolContentResponse>(create);\n  static GetTxPoolContentResponse? _defaultInstance;\n\n  /// List of transactions currently in the pool.\n  @$pb.TagNumber(1)\n  $pb.PbList<$0.TransactionInfo> get txs => $_getList(0);\n}\n\n/// Message contains information about a validator.\nclass ValidatorInfo extends $pb.GeneratedMessage {\n  factory ValidatorInfo({\n    $core.String? hash,\n    $core.String? data,\n    $core.String? publicKey,\n    $core.int? number,\n    $fixnum.Int64? stake,\n    $core.int? lastBondingHeight,\n    $core.int? lastSortitionHeight,\n    $core.int? unbondingHeight,\n    $core.String? address,\n    $core.double? availabilityScore,\n    $core.int? protocolVersion,\n    $core.bool? isDelegated,\n    $core.String? delegateOwner,\n    $fixnum.Int64? delegateShare,\n    $core.int? delegateExpiry,\n  }) {\n    final result = create();\n    if (hash != null) result.hash = hash;\n    if (data != null) result.data = data;\n    if (publicKey != null) result.publicKey = publicKey;\n    if (number != null) result.number = number;\n    if (stake != null) result.stake = stake;\n    if (lastBondingHeight != null) result.lastBondingHeight = lastBondingHeight;\n    if (lastSortitionHeight != null)\n      result.lastSortitionHeight = lastSortitionHeight;\n    if (unbondingHeight != null) result.unbondingHeight = unbondingHeight;\n    if (address != null) result.address = address;\n    if (availabilityScore != null) result.availabilityScore = availabilityScore;\n    if (protocolVersion != null) result.protocolVersion = protocolVersion;\n    if (isDelegated != null) result.isDelegated = isDelegated;\n    if (delegateOwner != null) result.delegateOwner = delegateOwner;\n    if (delegateShare != null) result.delegateShare = delegateShare;\n    if (delegateExpiry != null) result.delegateExpiry = delegateExpiry;\n    return result;\n  }\n\n  ValidatorInfo._();\n\n  factory ValidatorInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ValidatorInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ValidatorInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'hash')\n    ..aOS(2, _omitFieldNames ? '' : 'data')\n    ..aOS(3, _omitFieldNames ? '' : 'publicKey')\n    ..aI(4, _omitFieldNames ? '' : 'number')\n    ..aInt64(5, _omitFieldNames ? '' : 'stake')\n    ..aI(6, _omitFieldNames ? '' : 'lastBondingHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aI(7, _omitFieldNames ? '' : 'lastSortitionHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aI(8, _omitFieldNames ? '' : 'unbondingHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aOS(9, _omitFieldNames ? '' : 'address')\n    ..aD(10, _omitFieldNames ? '' : 'availabilityScore')\n    ..aI(11, _omitFieldNames ? '' : 'protocolVersion')\n    ..aOB(12, _omitFieldNames ? '' : 'isDelegated')\n    ..aOS(13, _omitFieldNames ? '' : 'delegateOwner')\n    ..aInt64(14, _omitFieldNames ? '' : 'delegateShare')\n    ..aI(15, _omitFieldNames ? '' : 'delegateExpiry',\n        fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ValidatorInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ValidatorInfo copyWith(void Function(ValidatorInfo) updates) =>\n      super.copyWith((message) => updates(message as ValidatorInfo))\n          as ValidatorInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ValidatorInfo create() => ValidatorInfo._();\n  @$core.override\n  ValidatorInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ValidatorInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ValidatorInfo>(create);\n  static ValidatorInfo? _defaultInstance;\n\n  /// The hash of the validator.\n  @$pb.TagNumber(1)\n  $core.String get hash => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set hash($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHash() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHash() => $_clearField(1);\n\n  /// The serialized data of the validator.\n  @$pb.TagNumber(2)\n  $core.String get data => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set data($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasData() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearData() => $_clearField(2);\n\n  /// The public key of the validator.\n  @$pb.TagNumber(3)\n  $core.String get publicKey => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set publicKey($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPublicKey() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPublicKey() => $_clearField(3);\n\n  /// The unique number assigned to the validator.\n  @$pb.TagNumber(4)\n  $core.int get number => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set number($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasNumber() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearNumber() => $_clearField(4);\n\n  /// The stake of the validator in NanoPAC.\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get stake => $_getI64(4);\n  @$pb.TagNumber(5)\n  set stake($fixnum.Int64 value) => $_setInt64(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasStake() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearStake() => $_clearField(5);\n\n  /// The height at which the validator last bonded.\n  @$pb.TagNumber(6)\n  $core.int get lastBondingHeight => $_getIZ(5);\n  @$pb.TagNumber(6)\n  set lastBondingHeight($core.int value) => $_setUnsignedInt32(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasLastBondingHeight() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearLastBondingHeight() => $_clearField(6);\n\n  /// The height at which the validator last participated in sortition.\n  @$pb.TagNumber(7)\n  $core.int get lastSortitionHeight => $_getIZ(6);\n  @$pb.TagNumber(7)\n  set lastSortitionHeight($core.int value) => $_setUnsignedInt32(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasLastSortitionHeight() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearLastSortitionHeight() => $_clearField(7);\n\n  /// The height at which the validator will unbond.\n  @$pb.TagNumber(8)\n  $core.int get unbondingHeight => $_getIZ(7);\n  @$pb.TagNumber(8)\n  set unbondingHeight($core.int value) => $_setUnsignedInt32(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasUnbondingHeight() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearUnbondingHeight() => $_clearField(8);\n\n  /// The address of the validator.\n  @$pb.TagNumber(9)\n  $core.String get address => $_getSZ(8);\n  @$pb.TagNumber(9)\n  set address($core.String value) => $_setString(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasAddress() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearAddress() => $_clearField(9);\n\n  /// The availability score of the validator.\n  @$pb.TagNumber(10)\n  $core.double get availabilityScore => $_getN(9);\n  @$pb.TagNumber(10)\n  set availabilityScore($core.double value) => $_setDouble(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasAvailabilityScore() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearAvailabilityScore() => $_clearField(10);\n\n  /// The protocol version of the validator.\n  @$pb.TagNumber(11)\n  $core.int get protocolVersion => $_getIZ(10);\n  @$pb.TagNumber(11)\n  set protocolVersion($core.int value) => $_setSignedInt32(10, value);\n  @$pb.TagNumber(11)\n  $core.bool hasProtocolVersion() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearProtocolVersion() => $_clearField(11);\n\n  /// Whether the validator is delegated.\n  @$pb.TagNumber(12)\n  $core.bool get isDelegated => $_getBF(11);\n  @$pb.TagNumber(12)\n  set isDelegated($core.bool value) => $_setBool(11, value);\n  @$pb.TagNumber(12)\n  $core.bool hasIsDelegated() => $_has(11);\n  @$pb.TagNumber(12)\n  void clearIsDelegated() => $_clearField(12);\n\n  /// The address of the stake owner of the validator.\n  @$pb.TagNumber(13)\n  $core.String get delegateOwner => $_getSZ(12);\n  @$pb.TagNumber(13)\n  set delegateOwner($core.String value) => $_setString(12, value);\n  @$pb.TagNumber(13)\n  $core.bool hasDelegateOwner() => $_has(12);\n  @$pb.TagNumber(13)\n  void clearDelegateOwner() => $_clearField(13);\n\n  /// The share of the stake owner of the validator.\n  @$pb.TagNumber(14)\n  $fixnum.Int64 get delegateShare => $_getI64(13);\n  @$pb.TagNumber(14)\n  set delegateShare($fixnum.Int64 value) => $_setInt64(13, value);\n  @$pb.TagNumber(14)\n  $core.bool hasDelegateShare() => $_has(13);\n  @$pb.TagNumber(14)\n  void clearDelegateShare() => $_clearField(14);\n\n  /// The expiry of the stake owner of the validator.\n  @$pb.TagNumber(15)\n  $core.int get delegateExpiry => $_getIZ(14);\n  @$pb.TagNumber(15)\n  set delegateExpiry($core.int value) => $_setUnsignedInt32(14, value);\n  @$pb.TagNumber(15)\n  $core.bool hasDelegateExpiry() => $_has(14);\n  @$pb.TagNumber(15)\n  void clearDelegateExpiry() => $_clearField(15);\n}\n\n/// Message contains information about an account.\nclass AccountInfo extends $pb.GeneratedMessage {\n  factory AccountInfo({\n    $core.String? hash,\n    $core.String? data,\n    $core.int? number,\n    $fixnum.Int64? balance,\n    $core.String? address,\n  }) {\n    final result = create();\n    if (hash != null) result.hash = hash;\n    if (data != null) result.data = data;\n    if (number != null) result.number = number;\n    if (balance != null) result.balance = balance;\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  AccountInfo._();\n\n  factory AccountInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory AccountInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'AccountInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'hash')\n    ..aOS(2, _omitFieldNames ? '' : 'data')\n    ..aI(3, _omitFieldNames ? '' : 'number')\n    ..aInt64(4, _omitFieldNames ? '' : 'balance')\n    ..aOS(5, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  AccountInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  AccountInfo copyWith(void Function(AccountInfo) updates) =>\n      super.copyWith((message) => updates(message as AccountInfo))\n          as AccountInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static AccountInfo create() => AccountInfo._();\n  @$core.override\n  AccountInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static AccountInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<AccountInfo>(create);\n  static AccountInfo? _defaultInstance;\n\n  /// The hash of the account.\n  @$pb.TagNumber(1)\n  $core.String get hash => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set hash($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHash() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHash() => $_clearField(1);\n\n  /// The serialized data of the account.\n  @$pb.TagNumber(2)\n  $core.String get data => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set data($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasData() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearData() => $_clearField(2);\n\n  /// The unique number assigned to the account.\n  @$pb.TagNumber(3)\n  $core.int get number => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set number($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasNumber() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearNumber() => $_clearField(3);\n\n  /// The balance of the account in NanoPAC.\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get balance => $_getI64(3);\n  @$pb.TagNumber(4)\n  set balance($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasBalance() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearBalance() => $_clearField(4);\n\n  /// The address of the account.\n  @$pb.TagNumber(5)\n  $core.String get address => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set address($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasAddress() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearAddress() => $_clearField(5);\n}\n\n/// Message contains information about the header of a block.\nclass BlockHeaderInfo extends $pb.GeneratedMessage {\n  factory BlockHeaderInfo({\n    $core.int? version,\n    $core.String? prevBlockHash,\n    $core.String? stateRoot,\n    $core.String? sortitionSeed,\n    $core.String? proposerAddress,\n  }) {\n    final result = create();\n    if (version != null) result.version = version;\n    if (prevBlockHash != null) result.prevBlockHash = prevBlockHash;\n    if (stateRoot != null) result.stateRoot = stateRoot;\n    if (sortitionSeed != null) result.sortitionSeed = sortitionSeed;\n    if (proposerAddress != null) result.proposerAddress = proposerAddress;\n    return result;\n  }\n\n  BlockHeaderInfo._();\n\n  factory BlockHeaderInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory BlockHeaderInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'BlockHeaderInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'version')\n    ..aOS(2, _omitFieldNames ? '' : 'prevBlockHash')\n    ..aOS(3, _omitFieldNames ? '' : 'stateRoot')\n    ..aOS(4, _omitFieldNames ? '' : 'sortitionSeed')\n    ..aOS(5, _omitFieldNames ? '' : 'proposerAddress')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BlockHeaderInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BlockHeaderInfo copyWith(void Function(BlockHeaderInfo) updates) =>\n      super.copyWith((message) => updates(message as BlockHeaderInfo))\n          as BlockHeaderInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static BlockHeaderInfo create() => BlockHeaderInfo._();\n  @$core.override\n  BlockHeaderInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static BlockHeaderInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<BlockHeaderInfo>(create);\n  static BlockHeaderInfo? _defaultInstance;\n\n  /// The version of the block.\n  @$pb.TagNumber(1)\n  $core.int get version => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set version($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasVersion() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearVersion() => $_clearField(1);\n\n  /// The hash of the previous block.\n  @$pb.TagNumber(2)\n  $core.String get prevBlockHash => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set prevBlockHash($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPrevBlockHash() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPrevBlockHash() => $_clearField(2);\n\n  /// The state root hash of the blockchain.\n  @$pb.TagNumber(3)\n  $core.String get stateRoot => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set stateRoot($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasStateRoot() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearStateRoot() => $_clearField(3);\n\n  /// The sortition seed of the block.\n  @$pb.TagNumber(4)\n  $core.String get sortitionSeed => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set sortitionSeed($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasSortitionSeed() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearSortitionSeed() => $_clearField(4);\n\n  /// The address of the proposer of the block.\n  @$pb.TagNumber(5)\n  $core.String get proposerAddress => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set proposerAddress($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasProposerAddress() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearProposerAddress() => $_clearField(5);\n}\n\n/// Message contains information about a certificate.\nclass CertificateInfo extends $pb.GeneratedMessage {\n  factory CertificateInfo({\n    $core.String? hash,\n    $core.int? round,\n    $core.Iterable<$core.int>? committers,\n    $core.Iterable<$core.int>? absentees,\n    $core.String? signature,\n  }) {\n    final result = create();\n    if (hash != null) result.hash = hash;\n    if (round != null) result.round = round;\n    if (committers != null) result.committers.addAll(committers);\n    if (absentees != null) result.absentees.addAll(absentees);\n    if (signature != null) result.signature = signature;\n    return result;\n  }\n\n  CertificateInfo._();\n\n  factory CertificateInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CertificateInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CertificateInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'hash')\n    ..aI(2, _omitFieldNames ? '' : 'round')\n    ..p<$core.int>(3, _omitFieldNames ? '' : 'committers', $pb.PbFieldType.K3)\n    ..p<$core.int>(4, _omitFieldNames ? '' : 'absentees', $pb.PbFieldType.K3)\n    ..aOS(5, _omitFieldNames ? '' : 'signature')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CertificateInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CertificateInfo copyWith(void Function(CertificateInfo) updates) =>\n      super.copyWith((message) => updates(message as CertificateInfo))\n          as CertificateInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CertificateInfo create() => CertificateInfo._();\n  @$core.override\n  CertificateInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CertificateInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CertificateInfo>(create);\n  static CertificateInfo? _defaultInstance;\n\n  /// The hash of the certificate.\n  @$pb.TagNumber(1)\n  $core.String get hash => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set hash($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHash() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHash() => $_clearField(1);\n\n  /// The round of the certificate.\n  @$pb.TagNumber(2)\n  $core.int get round => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set round($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasRound() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearRound() => $_clearField(2);\n\n  /// List of committers in the certificate.\n  @$pb.TagNumber(3)\n  $pb.PbList<$core.int> get committers => $_getList(2);\n\n  /// List of absentees in the certificate.\n  @$pb.TagNumber(4)\n  $pb.PbList<$core.int> get absentees => $_getList(3);\n\n  /// The signature of the certificate.\n  @$pb.TagNumber(5)\n  $core.String get signature => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set signature($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSignature() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSignature() => $_clearField(5);\n}\n\n/// Message contains information about a vote.\nclass VoteInfo extends $pb.GeneratedMessage {\n  factory VoteInfo({\n    VoteType? type,\n    $core.String? voter,\n    $core.String? blockHash,\n    $core.int? round,\n    $core.int? cpRound,\n    $core.int? cpValue,\n  }) {\n    final result = create();\n    if (type != null) result.type = type;\n    if (voter != null) result.voter = voter;\n    if (blockHash != null) result.blockHash = blockHash;\n    if (round != null) result.round = round;\n    if (cpRound != null) result.cpRound = cpRound;\n    if (cpValue != null) result.cpValue = cpValue;\n    return result;\n  }\n\n  VoteInfo._();\n\n  factory VoteInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory VoteInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'VoteInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aE<VoteType>(1, _omitFieldNames ? '' : 'type',\n        enumValues: VoteType.values)\n    ..aOS(2, _omitFieldNames ? '' : 'voter')\n    ..aOS(3, _omitFieldNames ? '' : 'blockHash')\n    ..aI(4, _omitFieldNames ? '' : 'round')\n    ..aI(5, _omitFieldNames ? '' : 'cpRound')\n    ..aI(6, _omitFieldNames ? '' : 'cpValue')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VoteInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VoteInfo copyWith(void Function(VoteInfo) updates) =>\n      super.copyWith((message) => updates(message as VoteInfo)) as VoteInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static VoteInfo create() => VoteInfo._();\n  @$core.override\n  VoteInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static VoteInfo getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<VoteInfo>(create);\n  static VoteInfo? _defaultInstance;\n\n  /// The type of the vote.\n  @$pb.TagNumber(1)\n  VoteType get type => $_getN(0);\n  @$pb.TagNumber(1)\n  set type(VoteType value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasType() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearType() => $_clearField(1);\n\n  /// The address of the voter.\n  @$pb.TagNumber(2)\n  $core.String get voter => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set voter($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasVoter() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearVoter() => $_clearField(2);\n\n  /// The hash of the block being voted on.\n  @$pb.TagNumber(3)\n  $core.String get blockHash => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set blockHash($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasBlockHash() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearBlockHash() => $_clearField(3);\n\n  /// The consensus round of the vote.\n  @$pb.TagNumber(4)\n  $core.int get round => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set round($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasRound() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearRound() => $_clearField(4);\n\n  /// The change-proposer round of the vote.\n  @$pb.TagNumber(5)\n  $core.int get cpRound => $_getIZ(4);\n  @$pb.TagNumber(5)\n  set cpRound($core.int value) => $_setSignedInt32(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasCpRound() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearCpRound() => $_clearField(5);\n\n  /// The change-proposer value of the vote.\n  @$pb.TagNumber(6)\n  $core.int get cpValue => $_getIZ(5);\n  @$pb.TagNumber(6)\n  set cpValue($core.int value) => $_setSignedInt32(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasCpValue() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearCpValue() => $_clearField(6);\n}\n\n/// Message contains information about a consensus instance.\nclass ConsensusInfo extends $pb.GeneratedMessage {\n  factory ConsensusInfo({\n    $core.String? address,\n    $core.bool? active,\n    $core.int? height,\n    $core.int? round,\n    $core.Iterable<VoteInfo>? votes,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    if (active != null) result.active = active;\n    if (height != null) result.height = height;\n    if (round != null) result.round = round;\n    if (votes != null) result.votes.addAll(votes);\n    return result;\n  }\n\n  ConsensusInfo._();\n\n  factory ConsensusInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ConsensusInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ConsensusInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..aOB(2, _omitFieldNames ? '' : 'active')\n    ..aI(3, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..aI(4, _omitFieldNames ? '' : 'round')\n    ..pPM<VoteInfo>(5, _omitFieldNames ? '' : 'votes',\n        subBuilder: VoteInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ConsensusInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ConsensusInfo copyWith(void Function(ConsensusInfo) updates) =>\n      super.copyWith((message) => updates(message as ConsensusInfo))\n          as ConsensusInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ConsensusInfo create() => ConsensusInfo._();\n  @$core.override\n  ConsensusInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ConsensusInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ConsensusInfo>(create);\n  static ConsensusInfo? _defaultInstance;\n\n  /// The address of the consensus instance.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n\n  /// Indicates whether the consensus instance is active and part of the committee.\n  @$pb.TagNumber(2)\n  $core.bool get active => $_getBF(1);\n  @$pb.TagNumber(2)\n  set active($core.bool value) => $_setBool(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasActive() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearActive() => $_clearField(2);\n\n  /// The height of the consensus instance.\n  @$pb.TagNumber(3)\n  $core.int get height => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set height($core.int value) => $_setUnsignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasHeight() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearHeight() => $_clearField(3);\n\n  /// The round of the consensus instance.\n  @$pb.TagNumber(4)\n  $core.int get round => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set round($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasRound() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearRound() => $_clearField(4);\n\n  /// List of votes in the consensus instance.\n  @$pb.TagNumber(5)\n  $pb.PbList<VoteInfo> get votes => $_getList(4);\n}\n\n/// Message contains information about a proposal.\nclass ProposalInfo extends $pb.GeneratedMessage {\n  factory ProposalInfo({\n    $core.int? height,\n    $core.int? round,\n    $core.String? blockData,\n    $core.String? signature,\n  }) {\n    final result = create();\n    if (height != null) result.height = height;\n    if (round != null) result.round = round;\n    if (blockData != null) result.blockData = blockData;\n    if (signature != null) result.signature = signature;\n    return result;\n  }\n\n  ProposalInfo._();\n\n  factory ProposalInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ProposalInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ProposalInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..aI(2, _omitFieldNames ? '' : 'round')\n    ..aOS(3, _omitFieldNames ? '' : 'blockData')\n    ..aOS(4, _omitFieldNames ? '' : 'signature')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ProposalInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ProposalInfo copyWith(void Function(ProposalInfo) updates) =>\n      super.copyWith((message) => updates(message as ProposalInfo))\n          as ProposalInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ProposalInfo create() => ProposalInfo._();\n  @$core.override\n  ProposalInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ProposalInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ProposalInfo>(create);\n  static ProposalInfo? _defaultInstance;\n\n  /// The height of the proposal.\n  @$pb.TagNumber(1)\n  $core.int get height => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set height($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearHeight() => $_clearField(1);\n\n  /// The round of the proposal.\n  @$pb.TagNumber(2)\n  $core.int get round => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set round($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasRound() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearRound() => $_clearField(2);\n\n  /// The block data of the proposal.\n  @$pb.TagNumber(3)\n  $core.String get blockData => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set blockData($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasBlockData() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearBlockData() => $_clearField(3);\n\n  /// The signature of the proposal, signed by the proposer.\n  @$pb.TagNumber(4)\n  $core.String get signature => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set signature($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasSignature() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearSignature() => $_clearField(4);\n}\n\n/// Blockchain service defines RPC methods for interacting with the blockchain.\nclass BlockchainApi {\n  final $pb.RpcClient _client;\n\n  BlockchainApi(this._client);\n\n  /// GetBlock retrieves information about a block based on the provided request parameters.\n  $async.Future<GetBlockResponse> getBlock(\n          $pb.ClientContext? ctx, GetBlockRequest request) =>\n      _client.invoke<GetBlockResponse>(\n          ctx, 'Blockchain', 'GetBlock', request, GetBlockResponse());\n\n  /// GetBlockHash retrieves the hash of a block at the specified height.\n  $async.Future<GetBlockHashResponse> getBlockHash(\n          $pb.ClientContext? ctx, GetBlockHashRequest request) =>\n      _client.invoke<GetBlockHashResponse>(\n          ctx, 'Blockchain', 'GetBlockHash', request, GetBlockHashResponse());\n\n  /// GetBlockHeight retrieves the height of a block with the specified hash.\n  $async.Future<GetBlockHeightResponse> getBlockHeight(\n          $pb.ClientContext? ctx, GetBlockHeightRequest request) =>\n      _client.invoke<GetBlockHeightResponse>(ctx, 'Blockchain',\n          'GetBlockHeight', request, GetBlockHeightResponse());\n\n  /// GetBlockchainInfo retrieves general information about the blockchain.\n  $async.Future<GetBlockchainInfoResponse> getBlockchainInfo(\n          $pb.ClientContext? ctx, GetBlockchainInfoRequest request) =>\n      _client.invoke<GetBlockchainInfoResponse>(ctx, 'Blockchain',\n          'GetBlockchainInfo', request, GetBlockchainInfoResponse());\n\n  /// GetCommitteeInfo retrieves information about the current committee.\n  $async.Future<GetCommitteeInfoResponse> getCommitteeInfo(\n          $pb.ClientContext? ctx, GetCommitteeInfoRequest request) =>\n      _client.invoke<GetCommitteeInfoResponse>(ctx, 'Blockchain',\n          'GetCommitteeInfo', request, GetCommitteeInfoResponse());\n\n  /// GetConsensusInfo retrieves information about the consensus instances.\n  $async.Future<GetConsensusInfoResponse> getConsensusInfo(\n          $pb.ClientContext? ctx, GetConsensusInfoRequest request) =>\n      _client.invoke<GetConsensusInfoResponse>(ctx, 'Blockchain',\n          'GetConsensusInfo', request, GetConsensusInfoResponse());\n\n  /// GetAccount retrieves information about an account based on the provided address.\n  $async.Future<GetAccountResponse> getAccount(\n          $pb.ClientContext? ctx, GetAccountRequest request) =>\n      _client.invoke<GetAccountResponse>(\n          ctx, 'Blockchain', 'GetAccount', request, GetAccountResponse());\n\n  /// GetValidator retrieves information about a validator based on the provided address.\n  $async.Future<GetValidatorResponse> getValidator(\n          $pb.ClientContext? ctx, GetValidatorRequest request) =>\n      _client.invoke<GetValidatorResponse>(\n          ctx, 'Blockchain', 'GetValidator', request, GetValidatorResponse());\n\n  /// GetValidatorByNumber retrieves information about a validator based on the provided number.\n  $async.Future<GetValidatorResponse> getValidatorByNumber(\n          $pb.ClientContext? ctx, GetValidatorByNumberRequest request) =>\n      _client.invoke<GetValidatorResponse>(ctx, 'Blockchain',\n          'GetValidatorByNumber', request, GetValidatorResponse());\n\n  /// GetValidatorAddresses retrieves a list of all validator addresses.\n  $async.Future<GetValidatorAddressesResponse> getValidatorAddresses(\n          $pb.ClientContext? ctx, GetValidatorAddressesRequest request) =>\n      _client.invoke<GetValidatorAddressesResponse>(ctx, 'Blockchain',\n          'GetValidatorAddresses', request, GetValidatorAddressesResponse());\n\n  /// GetPublicKey retrieves the public key of an account based on the provided address.\n  $async.Future<GetPublicKeyResponse> getPublicKey(\n          $pb.ClientContext? ctx, GetPublicKeyRequest request) =>\n      _client.invoke<GetPublicKeyResponse>(\n          ctx, 'Blockchain', 'GetPublicKey', request, GetPublicKeyResponse());\n\n  /// GetTxPoolContent retrieves current transactions in the transaction pool.\n  $async.Future<GetTxPoolContentResponse> getTxPoolContent(\n          $pb.ClientContext? ctx, GetTxPoolContentRequest request) =>\n      _client.invoke<GetTxPoolContentResponse>(ctx, 'Blockchain',\n          'GetTxPoolContent', request, GetTxPoolContentResponse());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/blockchain.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from blockchain.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// Enumeration for verbosity levels when requesting block information.\nclass BlockVerbosity extends $pb.ProtobufEnum {\n  /// Request only block data.\n  static const BlockVerbosity BLOCK_VERBOSITY_DATA =\n      BlockVerbosity._(0, _omitEnumNames ? '' : 'BLOCK_VERBOSITY_DATA');\n\n  /// Request block information and transaction IDs.\n  static const BlockVerbosity BLOCK_VERBOSITY_INFO =\n      BlockVerbosity._(1, _omitEnumNames ? '' : 'BLOCK_VERBOSITY_INFO');\n\n  /// Request block information and detailed transaction data.\n  static const BlockVerbosity BLOCK_VERBOSITY_TRANSACTIONS =\n      BlockVerbosity._(2, _omitEnumNames ? '' : 'BLOCK_VERBOSITY_TRANSACTIONS');\n\n  static const $core.List<BlockVerbosity> values = <BlockVerbosity>[\n    BLOCK_VERBOSITY_DATA,\n    BLOCK_VERBOSITY_INFO,\n    BLOCK_VERBOSITY_TRANSACTIONS,\n  ];\n\n  static final $core.List<BlockVerbosity?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static BlockVerbosity? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const BlockVerbosity._(super.value, super.name);\n}\n\n/// Enumeration for types of votes.\nclass VoteType extends $pb.ProtobufEnum {\n  /// Unspecified vote type.\n  static const VoteType VOTE_TYPE_UNSPECIFIED =\n      VoteType._(0, _omitEnumNames ? '' : 'VOTE_TYPE_UNSPECIFIED');\n\n  /// Prepare vote type.\n  static const VoteType VOTE_TYPE_PREPARE =\n      VoteType._(1, _omitEnumNames ? '' : 'VOTE_TYPE_PREPARE');\n\n  /// Precommit vote type.\n  static const VoteType VOTE_TYPE_PRECOMMIT =\n      VoteType._(2, _omitEnumNames ? '' : 'VOTE_TYPE_PRECOMMIT');\n\n  /// Change-proposer:pre-vote vote type.\n  static const VoteType VOTE_TYPE_CP_PRE_VOTE =\n      VoteType._(3, _omitEnumNames ? '' : 'VOTE_TYPE_CP_PRE_VOTE');\n\n  /// Change-proposer:main-vote vote type.\n  static const VoteType VOTE_TYPE_CP_MAIN_VOTE =\n      VoteType._(4, _omitEnumNames ? '' : 'VOTE_TYPE_CP_MAIN_VOTE');\n\n  /// Change-proposer:decided vote type.\n  static const VoteType VOTE_TYPE_CP_DECIDED =\n      VoteType._(5, _omitEnumNames ? '' : 'VOTE_TYPE_CP_DECIDED');\n\n  static const $core.List<VoteType> values = <VoteType>[\n    VOTE_TYPE_UNSPECIFIED,\n    VOTE_TYPE_PREPARE,\n    VOTE_TYPE_PRECOMMIT,\n    VOTE_TYPE_CP_PRE_VOTE,\n    VOTE_TYPE_CP_MAIN_VOTE,\n    VOTE_TYPE_CP_DECIDED,\n  ];\n\n  static final $core.List<VoteType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 5);\n  static VoteType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const VoteType._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/blockchain.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from blockchain.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\nimport 'transaction.pbjson.dart' as $0;\n\n@$core.Deprecated('Use blockVerbosityDescriptor instead')\nconst BlockVerbosity$json = {\n  '1': 'BlockVerbosity',\n  '2': [\n    {'1': 'BLOCK_VERBOSITY_DATA', '2': 0},\n    {'1': 'BLOCK_VERBOSITY_INFO', '2': 1},\n    {'1': 'BLOCK_VERBOSITY_TRANSACTIONS', '2': 2},\n  ],\n};\n\n/// Descriptor for `BlockVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List blockVerbosityDescriptor = $convert.base64Decode(\n    'Cg5CbG9ja1ZlcmJvc2l0eRIYChRCTE9DS19WRVJCT1NJVFlfREFUQRAAEhgKFEJMT0NLX1ZFUk'\n    'JPU0lUWV9JTkZPEAESIAocQkxPQ0tfVkVSQk9TSVRZX1RSQU5TQUNUSU9OUxAC');\n\n@$core.Deprecated('Use voteTypeDescriptor instead')\nconst VoteType$json = {\n  '1': 'VoteType',\n  '2': [\n    {'1': 'VOTE_TYPE_UNSPECIFIED', '2': 0},\n    {'1': 'VOTE_TYPE_PREPARE', '2': 1},\n    {'1': 'VOTE_TYPE_PRECOMMIT', '2': 2},\n    {'1': 'VOTE_TYPE_CP_PRE_VOTE', '2': 3},\n    {'1': 'VOTE_TYPE_CP_MAIN_VOTE', '2': 4},\n    {'1': 'VOTE_TYPE_CP_DECIDED', '2': 5},\n  ],\n};\n\n/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode(\n    'CghWb3RlVHlwZRIZChVWT1RFX1RZUEVfVU5TUEVDSUZJRUQQABIVChFWT1RFX1RZUEVfUFJFUE'\n    'FSRRABEhcKE1ZPVEVfVFlQRV9QUkVDT01NSVQQAhIZChVWT1RFX1RZUEVfQ1BfUFJFX1ZPVEUQ'\n    'AxIaChZWT1RFX1RZUEVfQ1BfTUFJTl9WT1RFEAQSGAoUVk9URV9UWVBFX0NQX0RFQ0lERUQQBQ'\n    '==');\n\n@$core.Deprecated('Use getAccountRequestDescriptor instead')\nconst GetAccountRequest$json = {\n  '1': 'GetAccountRequest',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetAccountRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getAccountRequestDescriptor = $convert.base64Decode(\n    'ChFHZXRBY2NvdW50UmVxdWVzdBIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNz');\n\n@$core.Deprecated('Use getAccountResponseDescriptor instead')\nconst GetAccountResponse$json = {\n  '1': 'GetAccountResponse',\n  '2': [\n    {\n      '1': 'account',\n      '3': 1,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.AccountInfo',\n      '10': 'account'\n    },\n  ],\n};\n\n/// Descriptor for `GetAccountResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getAccountResponseDescriptor = $convert.base64Decode(\n    'ChJHZXRBY2NvdW50UmVzcG9uc2USLQoHYWNjb3VudBgBIAEoCzITLnBhY3R1cy5BY2NvdW50SW'\n    '5mb1IHYWNjb3VudA==');\n\n@$core.Deprecated('Use getValidatorAddressesRequestDescriptor instead')\nconst GetValidatorAddressesRequest$json = {\n  '1': 'GetValidatorAddressesRequest',\n};\n\n/// Descriptor for `GetValidatorAddressesRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorAddressesRequestDescriptor =\n    $convert.base64Decode('ChxHZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXF1ZXN0');\n\n@$core.Deprecated('Use getValidatorAddressesResponseDescriptor instead')\nconst GetValidatorAddressesResponse$json = {\n  '1': 'GetValidatorAddressesResponse',\n  '2': [\n    {'1': 'addresses', '3': 1, '4': 3, '5': 9, '10': 'addresses'},\n  ],\n};\n\n/// Descriptor for `GetValidatorAddressesResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorAddressesResponseDescriptor =\n    $convert.base64Decode(\n        'Ch1HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRIcCglhZGRyZXNzZXMYASADKAlSCWFkZH'\n        'Jlc3Nlcw==');\n\n@$core.Deprecated('Use getValidatorRequestDescriptor instead')\nconst GetValidatorRequest$json = {\n  '1': 'GetValidatorRequest',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetValidatorRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorRequestDescriptor =\n    $convert.base64Decode(\n        'ChNHZXRWYWxpZGF0b3JSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M=');\n\n@$core.Deprecated('Use getValidatorByNumberRequestDescriptor instead')\nconst GetValidatorByNumberRequest$json = {\n  '1': 'GetValidatorByNumberRequest',\n  '2': [\n    {'1': 'number', '3': 1, '4': 1, '5': 5, '10': 'number'},\n  ],\n};\n\n/// Descriptor for `GetValidatorByNumberRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorByNumberRequestDescriptor =\n    $convert.base64Decode(\n        'ChtHZXRWYWxpZGF0b3JCeU51bWJlclJlcXVlc3QSFgoGbnVtYmVyGAEgASgFUgZudW1iZXI=');\n\n@$core.Deprecated('Use getValidatorResponseDescriptor instead')\nconst GetValidatorResponse$json = {\n  '1': 'GetValidatorResponse',\n  '2': [\n    {\n      '1': 'validator',\n      '3': 1,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.ValidatorInfo',\n      '10': 'validator'\n    },\n  ],\n};\n\n/// Descriptor for `GetValidatorResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorResponseDescriptor = $convert.base64Decode(\n    'ChRHZXRWYWxpZGF0b3JSZXNwb25zZRIzCgl2YWxpZGF0b3IYASABKAsyFS5wYWN0dXMuVmFsaW'\n    'RhdG9ySW5mb1IJdmFsaWRhdG9y');\n\n@$core.Deprecated('Use getPublicKeyRequestDescriptor instead')\nconst GetPublicKeyRequest$json = {\n  '1': 'GetPublicKeyRequest',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetPublicKeyRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getPublicKeyRequestDescriptor =\n    $convert.base64Decode(\n        'ChNHZXRQdWJsaWNLZXlSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M=');\n\n@$core.Deprecated('Use getPublicKeyResponseDescriptor instead')\nconst GetPublicKeyResponse$json = {\n  '1': 'GetPublicKeyResponse',\n  '2': [\n    {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'},\n  ],\n};\n\n/// Descriptor for `GetPublicKeyResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getPublicKeyResponseDescriptor = $convert.base64Decode(\n    'ChRHZXRQdWJsaWNLZXlSZXNwb25zZRIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaWNLZXk=');\n\n@$core.Deprecated('Use getBlockRequestDescriptor instead')\nconst GetBlockRequest$json = {\n  '1': 'GetBlockRequest',\n  '2': [\n    {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'},\n    {\n      '1': 'verbosity',\n      '3': 2,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.BlockVerbosity',\n      '10': 'verbosity'\n    },\n  ],\n};\n\n/// Descriptor for `GetBlockRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockRequestDescriptor = $convert.base64Decode(\n    'Cg9HZXRCbG9ja1JlcXVlc3QSFgoGaGVpZ2h0GAEgASgNUgZoZWlnaHQSNAoJdmVyYm9zaXR5GA'\n    'IgASgOMhYucGFjdHVzLkJsb2NrVmVyYm9zaXR5Ugl2ZXJib3NpdHk=');\n\n@$core.Deprecated('Use getBlockResponseDescriptor instead')\nconst GetBlockResponse$json = {\n  '1': 'GetBlockResponse',\n  '2': [\n    {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'},\n    {'1': 'hash', '3': 2, '4': 1, '5': 9, '10': 'hash'},\n    {'1': 'data', '3': 3, '4': 1, '5': 9, '10': 'data'},\n    {'1': 'block_time', '3': 4, '4': 1, '5': 13, '10': 'blockTime'},\n    {\n      '1': 'header',\n      '3': 5,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.BlockHeaderInfo',\n      '10': 'header'\n    },\n    {\n      '1': 'prev_cert',\n      '3': 6,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CertificateInfo',\n      '10': 'prevCert'\n    },\n    {\n      '1': 'txs',\n      '3': 7,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.TransactionInfo',\n      '10': 'txs'\n    },\n  ],\n};\n\n/// Descriptor for `GetBlockResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockResponseDescriptor = $convert.base64Decode(\n    'ChBHZXRCbG9ja1Jlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0EhIKBGhhc2gYAiABKA'\n    'lSBGhhc2gSEgoEZGF0YRgDIAEoCVIEZGF0YRIdCgpibG9ja190aW1lGAQgASgNUglibG9ja1Rp'\n    'bWUSLwoGaGVhZGVyGAUgASgLMhcucGFjdHVzLkJsb2NrSGVhZGVySW5mb1IGaGVhZGVyEjQKCX'\n    'ByZXZfY2VydBgGIAEoCzIXLnBhY3R1cy5DZXJ0aWZpY2F0ZUluZm9SCHByZXZDZXJ0EikKA3R4'\n    'cxgHIAMoCzIXLnBhY3R1cy5UcmFuc2FjdGlvbkluZm9SA3R4cw==');\n\n@$core.Deprecated('Use getBlockHashRequestDescriptor instead')\nconst GetBlockHashRequest$json = {\n  '1': 'GetBlockHashRequest',\n  '2': [\n    {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'},\n  ],\n};\n\n/// Descriptor for `GetBlockHashRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockHashRequestDescriptor =\n    $convert.base64Decode(\n        'ChNHZXRCbG9ja0hhc2hSZXF1ZXN0EhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0');\n\n@$core.Deprecated('Use getBlockHashResponseDescriptor instead')\nconst GetBlockHashResponse$json = {\n  '1': 'GetBlockHashResponse',\n  '2': [\n    {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'},\n  ],\n};\n\n/// Descriptor for `GetBlockHashResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockHashResponseDescriptor = $convert\n    .base64Decode('ChRHZXRCbG9ja0hhc2hSZXNwb25zZRISCgRoYXNoGAEgASgJUgRoYXNo');\n\n@$core.Deprecated('Use getBlockHeightRequestDescriptor instead')\nconst GetBlockHeightRequest$json = {\n  '1': 'GetBlockHeightRequest',\n  '2': [\n    {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'},\n  ],\n};\n\n/// Descriptor for `GetBlockHeightRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockHeightRequestDescriptor =\n    $convert.base64Decode(\n        'ChVHZXRCbG9ja0hlaWdodFJlcXVlc3QSEgoEaGFzaBgBIAEoCVIEaGFzaA==');\n\n@$core.Deprecated('Use getBlockHeightResponseDescriptor instead')\nconst GetBlockHeightResponse$json = {\n  '1': 'GetBlockHeightResponse',\n  '2': [\n    {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'},\n  ],\n};\n\n/// Descriptor for `GetBlockHeightResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockHeightResponseDescriptor =\n    $convert.base64Decode(\n        'ChZHZXRCbG9ja0hlaWdodFJlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0');\n\n@$core.Deprecated('Use getBlockchainInfoRequestDescriptor instead')\nconst GetBlockchainInfoRequest$json = {\n  '1': 'GetBlockchainInfoRequest',\n};\n\n/// Descriptor for `GetBlockchainInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockchainInfoRequestDescriptor =\n    $convert.base64Decode('ChhHZXRCbG9ja2NoYWluSW5mb1JlcXVlc3Q=');\n\n@$core.Deprecated('Use getBlockchainInfoResponseDescriptor instead')\nconst GetBlockchainInfoResponse$json = {\n  '1': 'GetBlockchainInfoResponse',\n  '2': [\n    {\n      '1': 'last_block_height',\n      '3': 1,\n      '4': 1,\n      '5': 13,\n      '10': 'lastBlockHeight'\n    },\n    {'1': 'last_block_hash', '3': 2, '4': 1, '5': 9, '10': 'lastBlockHash'},\n    {'1': 'last_block_time', '3': 10, '4': 1, '5': 3, '10': 'lastBlockTime'},\n    {'1': 'total_accounts', '3': 3, '4': 1, '5': 5, '10': 'totalAccounts'},\n    {'1': 'total_validators', '3': 4, '4': 1, '5': 5, '10': 'totalValidators'},\n    {\n      '1': 'active_validators',\n      '3': 12,\n      '4': 1,\n      '5': 5,\n      '10': 'activeValidators'\n    },\n    {'1': 'total_power', '3': 5, '4': 1, '5': 3, '10': 'totalPower'},\n    {'1': 'committee_power', '3': 6, '4': 1, '5': 3, '10': 'committeePower'},\n    {'1': 'is_pruned', '3': 8, '4': 1, '5': 8, '10': 'isPruned'},\n    {'1': 'pruning_height', '3': 9, '4': 1, '5': 13, '10': 'pruningHeight'},\n    {'1': 'in_committee', '3': 13, '4': 1, '5': 8, '10': 'inCommittee'},\n    {'1': 'committee_size', '3': 14, '4': 1, '5': 5, '10': 'committeeSize'},\n    {'1': 'average_score', '3': 15, '4': 1, '5': 1, '10': 'averageScore'},\n  ],\n};\n\n/// Descriptor for `GetBlockchainInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getBlockchainInfoResponseDescriptor = $convert.base64Decode(\n    'ChlHZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlEioKEWxhc3RfYmxvY2tfaGVpZ2h0GAEgASgNUg'\n    '9sYXN0QmxvY2tIZWlnaHQSJgoPbGFzdF9ibG9ja19oYXNoGAIgASgJUg1sYXN0QmxvY2tIYXNo'\n    'EiYKD2xhc3RfYmxvY2tfdGltZRgKIAEoA1INbGFzdEJsb2NrVGltZRIlCg50b3RhbF9hY2NvdW'\n    '50cxgDIAEoBVINdG90YWxBY2NvdW50cxIpChB0b3RhbF92YWxpZGF0b3JzGAQgASgFUg90b3Rh'\n    'bFZhbGlkYXRvcnMSKwoRYWN0aXZlX3ZhbGlkYXRvcnMYDCABKAVSEGFjdGl2ZVZhbGlkYXRvcn'\n    'MSHwoLdG90YWxfcG93ZXIYBSABKANSCnRvdGFsUG93ZXISJwoPY29tbWl0dGVlX3Bvd2VyGAYg'\n    'ASgDUg5jb21taXR0ZWVQb3dlchIbCglpc19wcnVuZWQYCCABKAhSCGlzUHJ1bmVkEiUKDnBydW'\n    '5pbmdfaGVpZ2h0GAkgASgNUg1wcnVuaW5nSGVpZ2h0EiEKDGluX2NvbW1pdHRlZRgNIAEoCFIL'\n    'aW5Db21taXR0ZWUSJQoOY29tbWl0dGVlX3NpemUYDiABKAVSDWNvbW1pdHRlZVNpemUSIwoNYX'\n    'ZlcmFnZV9zY29yZRgPIAEoAVIMYXZlcmFnZVNjb3Jl');\n\n@$core.Deprecated('Use getCommitteeInfoRequestDescriptor instead')\nconst GetCommitteeInfoRequest$json = {\n  '1': 'GetCommitteeInfoRequest',\n};\n\n/// Descriptor for `GetCommitteeInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getCommitteeInfoRequestDescriptor =\n    $convert.base64Decode('ChdHZXRDb21taXR0ZWVJbmZvUmVxdWVzdA==');\n\n@$core.Deprecated('Use getCommitteeInfoResponseDescriptor instead')\nconst GetCommitteeInfoResponse$json = {\n  '1': 'GetCommitteeInfoResponse',\n  '2': [\n    {'1': 'committee_size', '3': 1, '4': 1, '5': 5, '10': 'committeeSize'},\n    {'1': 'committee_power', '3': 2, '4': 1, '5': 3, '10': 'committeePower'},\n    {'1': 'total_power', '3': 3, '4': 1, '5': 3, '10': 'totalPower'},\n    {\n      '1': 'validators',\n      '3': 4,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.ValidatorInfo',\n      '10': 'validators'\n    },\n    {\n      '1': 'protocol_versions',\n      '3': 5,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.GetCommitteeInfoResponse.ProtocolVersionsEntry',\n      '10': 'protocolVersions'\n    },\n  ],\n  '3': [GetCommitteeInfoResponse_ProtocolVersionsEntry$json],\n};\n\n@$core.Deprecated('Use getCommitteeInfoResponseDescriptor instead')\nconst GetCommitteeInfoResponse_ProtocolVersionsEntry$json = {\n  '1': 'ProtocolVersionsEntry',\n  '2': [\n    {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'},\n    {'1': 'value', '3': 2, '4': 1, '5': 1, '10': 'value'},\n  ],\n  '7': {'7': true},\n};\n\n/// Descriptor for `GetCommitteeInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getCommitteeInfoResponseDescriptor = $convert.base64Decode(\n    'ChhHZXRDb21taXR0ZWVJbmZvUmVzcG9uc2USJQoOY29tbWl0dGVlX3NpemUYASABKAVSDWNvbW'\n    '1pdHRlZVNpemUSJwoPY29tbWl0dGVlX3Bvd2VyGAIgASgDUg5jb21taXR0ZWVQb3dlchIfCgt0'\n    'b3RhbF9wb3dlchgDIAEoA1IKdG90YWxQb3dlchI1Cgp2YWxpZGF0b3JzGAQgAygLMhUucGFjdH'\n    'VzLlZhbGlkYXRvckluZm9SCnZhbGlkYXRvcnMSYwoRcHJvdG9jb2xfdmVyc2lvbnMYBSADKAsy'\n    'Ni5wYWN0dXMuR2V0Q29tbWl0dGVlSW5mb1Jlc3BvbnNlLlByb3RvY29sVmVyc2lvbnNFbnRyeV'\n    'IQcHJvdG9jb2xWZXJzaW9ucxpDChVQcm90b2NvbFZlcnNpb25zRW50cnkSEAoDa2V5GAEgASgF'\n    'UgNrZXkSFAoFdmFsdWUYAiABKAFSBXZhbHVlOgI4AQ==');\n\n@$core.Deprecated('Use getConsensusInfoRequestDescriptor instead')\nconst GetConsensusInfoRequest$json = {\n  '1': 'GetConsensusInfoRequest',\n};\n\n/// Descriptor for `GetConsensusInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getConsensusInfoRequestDescriptor =\n    $convert.base64Decode('ChdHZXRDb25zZW5zdXNJbmZvUmVxdWVzdA==');\n\n@$core.Deprecated('Use getConsensusInfoResponseDescriptor instead')\nconst GetConsensusInfoResponse$json = {\n  '1': 'GetConsensusInfoResponse',\n  '2': [\n    {\n      '1': 'proposal',\n      '3': 1,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.ProposalInfo',\n      '10': 'proposal'\n    },\n    {\n      '1': 'instances',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.ConsensusInfo',\n      '10': 'instances'\n    },\n  ],\n};\n\n/// Descriptor for `GetConsensusInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode(\n    'ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USMAoIcHJvcG9zYWwYASABKAsyFC5wYWN0dXMuUH'\n    'JvcG9zYWxJbmZvUghwcm9wb3NhbBIzCglpbnN0YW5jZXMYAiADKAsyFS5wYWN0dXMuQ29uc2Vu'\n    'c3VzSW5mb1IJaW5zdGFuY2Vz');\n\n@$core.Deprecated('Use getTxPoolContentRequestDescriptor instead')\nconst GetTxPoolContentRequest$json = {\n  '1': 'GetTxPoolContentRequest',\n  '2': [\n    {\n      '1': 'payload_type',\n      '3': 1,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.PayloadType',\n      '10': 'payloadType'\n    },\n  ],\n};\n\n/// Descriptor for `GetTxPoolContentRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTxPoolContentRequestDescriptor =\n    $convert.base64Decode(\n        'ChdHZXRUeFBvb2xDb250ZW50UmVxdWVzdBI2CgxwYXlsb2FkX3R5cGUYASABKA4yEy5wYWN0dX'\n        'MuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBl');\n\n@$core.Deprecated('Use getTxPoolContentResponseDescriptor instead')\nconst GetTxPoolContentResponse$json = {\n  '1': 'GetTxPoolContentResponse',\n  '2': [\n    {\n      '1': 'txs',\n      '3': 1,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.TransactionInfo',\n      '10': 'txs'\n    },\n  ],\n};\n\n/// Descriptor for `GetTxPoolContentResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTxPoolContentResponseDescriptor =\n    $convert.base64Decode(\n        'ChhHZXRUeFBvb2xDb250ZW50UmVzcG9uc2USKQoDdHhzGAEgAygLMhcucGFjdHVzLlRyYW5zYW'\n        'N0aW9uSW5mb1IDdHhz');\n\n@$core.Deprecated('Use validatorInfoDescriptor instead')\nconst ValidatorInfo$json = {\n  '1': 'ValidatorInfo',\n  '2': [\n    {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'},\n    {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'},\n    {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'number', '3': 4, '4': 1, '5': 5, '10': 'number'},\n    {'1': 'stake', '3': 5, '4': 1, '5': 3, '10': 'stake'},\n    {\n      '1': 'last_bonding_height',\n      '3': 6,\n      '4': 1,\n      '5': 13,\n      '10': 'lastBondingHeight'\n    },\n    {\n      '1': 'last_sortition_height',\n      '3': 7,\n      '4': 1,\n      '5': 13,\n      '10': 'lastSortitionHeight'\n    },\n    {'1': 'unbonding_height', '3': 8, '4': 1, '5': 13, '10': 'unbondingHeight'},\n    {'1': 'address', '3': 9, '4': 1, '5': 9, '10': 'address'},\n    {\n      '1': 'availability_score',\n      '3': 10,\n      '4': 1,\n      '5': 1,\n      '10': 'availabilityScore'\n    },\n    {'1': 'protocol_version', '3': 11, '4': 1, '5': 5, '10': 'protocolVersion'},\n    {'1': 'is_delegated', '3': 12, '4': 1, '5': 8, '10': 'isDelegated'},\n    {'1': 'delegate_owner', '3': 13, '4': 1, '5': 9, '10': 'delegateOwner'},\n    {'1': 'delegate_share', '3': 14, '4': 1, '5': 3, '10': 'delegateShare'},\n    {'1': 'delegate_expiry', '3': 15, '4': 1, '5': 13, '10': 'delegateExpiry'},\n  ],\n};\n\n/// Descriptor for `ValidatorInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List validatorInfoDescriptor = $convert.base64Decode(\n    'Cg1WYWxpZGF0b3JJbmZvEhIKBGhhc2gYASABKAlSBGhhc2gSEgoEZGF0YRgCIAEoCVIEZGF0YR'\n    'IdCgpwdWJsaWNfa2V5GAMgASgJUglwdWJsaWNLZXkSFgoGbnVtYmVyGAQgASgFUgZudW1iZXIS'\n    'FAoFc3Rha2UYBSABKANSBXN0YWtlEi4KE2xhc3RfYm9uZGluZ19oZWlnaHQYBiABKA1SEWxhc3'\n    'RCb25kaW5nSGVpZ2h0EjIKFWxhc3Rfc29ydGl0aW9uX2hlaWdodBgHIAEoDVITbGFzdFNvcnRp'\n    'dGlvbkhlaWdodBIpChB1bmJvbmRpbmdfaGVpZ2h0GAggASgNUg91bmJvbmRpbmdIZWlnaHQSGA'\n    'oHYWRkcmVzcxgJIAEoCVIHYWRkcmVzcxItChJhdmFpbGFiaWxpdHlfc2NvcmUYCiABKAFSEWF2'\n    'YWlsYWJpbGl0eVNjb3JlEikKEHByb3RvY29sX3ZlcnNpb24YCyABKAVSD3Byb3RvY29sVmVyc2'\n    'lvbhIhCgxpc19kZWxlZ2F0ZWQYDCABKAhSC2lzRGVsZWdhdGVkEiUKDmRlbGVnYXRlX293bmVy'\n    'GA0gASgJUg1kZWxlZ2F0ZU93bmVyEiUKDmRlbGVnYXRlX3NoYXJlGA4gASgDUg1kZWxlZ2F0ZV'\n    'NoYXJlEicKD2RlbGVnYXRlX2V4cGlyeRgPIAEoDVIOZGVsZWdhdGVFeHBpcnk=');\n\n@$core.Deprecated('Use accountInfoDescriptor instead')\nconst AccountInfo$json = {\n  '1': 'AccountInfo',\n  '2': [\n    {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'},\n    {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'},\n    {'1': 'number', '3': 3, '4': 1, '5': 5, '10': 'number'},\n    {'1': 'balance', '3': 4, '4': 1, '5': 3, '10': 'balance'},\n    {'1': 'address', '3': 5, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `AccountInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List accountInfoDescriptor = $convert.base64Decode(\n    'CgtBY2NvdW50SW5mbxISCgRoYXNoGAEgASgJUgRoYXNoEhIKBGRhdGEYAiABKAlSBGRhdGESFg'\n    'oGbnVtYmVyGAMgASgFUgZudW1iZXISGAoHYmFsYW5jZRgEIAEoA1IHYmFsYW5jZRIYCgdhZGRy'\n    'ZXNzGAUgASgJUgdhZGRyZXNz');\n\n@$core.Deprecated('Use blockHeaderInfoDescriptor instead')\nconst BlockHeaderInfo$json = {\n  '1': 'BlockHeaderInfo',\n  '2': [\n    {'1': 'version', '3': 1, '4': 1, '5': 5, '10': 'version'},\n    {'1': 'prev_block_hash', '3': 2, '4': 1, '5': 9, '10': 'prevBlockHash'},\n    {'1': 'state_root', '3': 3, '4': 1, '5': 9, '10': 'stateRoot'},\n    {'1': 'sortition_seed', '3': 4, '4': 1, '5': 9, '10': 'sortitionSeed'},\n    {'1': 'proposer_address', '3': 5, '4': 1, '5': 9, '10': 'proposerAddress'},\n  ],\n};\n\n/// Descriptor for `BlockHeaderInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List blockHeaderInfoDescriptor = $convert.base64Decode(\n    'Cg9CbG9ja0hlYWRlckluZm8SGAoHdmVyc2lvbhgBIAEoBVIHdmVyc2lvbhImCg9wcmV2X2Jsb2'\n    'NrX2hhc2gYAiABKAlSDXByZXZCbG9ja0hhc2gSHQoKc3RhdGVfcm9vdBgDIAEoCVIJc3RhdGVS'\n    'b290EiUKDnNvcnRpdGlvbl9zZWVkGAQgASgJUg1zb3J0aXRpb25TZWVkEikKEHByb3Bvc2VyX2'\n    'FkZHJlc3MYBSABKAlSD3Byb3Bvc2VyQWRkcmVzcw==');\n\n@$core.Deprecated('Use certificateInfoDescriptor instead')\nconst CertificateInfo$json = {\n  '1': 'CertificateInfo',\n  '2': [\n    {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'},\n    {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'},\n    {'1': 'committers', '3': 3, '4': 3, '5': 5, '10': 'committers'},\n    {'1': 'absentees', '3': 4, '4': 3, '5': 5, '10': 'absentees'},\n    {'1': 'signature', '3': 5, '4': 1, '5': 9, '10': 'signature'},\n  ],\n};\n\n/// Descriptor for `CertificateInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List certificateInfoDescriptor = $convert.base64Decode(\n    'Cg9DZXJ0aWZpY2F0ZUluZm8SEgoEaGFzaBgBIAEoCVIEaGFzaBIUCgVyb3VuZBgCIAEoBVIFcm'\n    '91bmQSHgoKY29tbWl0dGVycxgDIAMoBVIKY29tbWl0dGVycxIcCglhYnNlbnRlZXMYBCADKAVS'\n    'CWFic2VudGVlcxIcCglzaWduYXR1cmUYBSABKAlSCXNpZ25hdHVyZQ==');\n\n@$core.Deprecated('Use voteInfoDescriptor instead')\nconst VoteInfo$json = {\n  '1': 'VoteInfo',\n  '2': [\n    {\n      '1': 'type',\n      '3': 1,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.VoteType',\n      '10': 'type'\n    },\n    {'1': 'voter', '3': 2, '4': 1, '5': 9, '10': 'voter'},\n    {'1': 'block_hash', '3': 3, '4': 1, '5': 9, '10': 'blockHash'},\n    {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'},\n    {'1': 'cp_round', '3': 5, '4': 1, '5': 5, '10': 'cpRound'},\n    {'1': 'cp_value', '3': 6, '4': 1, '5': 5, '10': 'cpValue'},\n  ],\n};\n\n/// Descriptor for `VoteInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List voteInfoDescriptor = $convert.base64Decode(\n    'CghWb3RlSW5mbxIkCgR0eXBlGAEgASgOMhAucGFjdHVzLlZvdGVUeXBlUgR0eXBlEhQKBXZvdG'\n    'VyGAIgASgJUgV2b3RlchIdCgpibG9ja19oYXNoGAMgASgJUglibG9ja0hhc2gSFAoFcm91bmQY'\n    'BCABKAVSBXJvdW5kEhkKCGNwX3JvdW5kGAUgASgFUgdjcFJvdW5kEhkKCGNwX3ZhbHVlGAYgAS'\n    'gFUgdjcFZhbHVl');\n\n@$core.Deprecated('Use consensusInfoDescriptor instead')\nconst ConsensusInfo$json = {\n  '1': 'ConsensusInfo',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'active', '3': 2, '4': 1, '5': 8, '10': 'active'},\n    {'1': 'height', '3': 3, '4': 1, '5': 13, '10': 'height'},\n    {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'},\n    {\n      '1': 'votes',\n      '3': 5,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.VoteInfo',\n      '10': 'votes'\n    },\n  ],\n};\n\n/// Descriptor for `ConsensusInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List consensusInfoDescriptor = $convert.base64Decode(\n    'Cg1Db25zZW5zdXNJbmZvEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFgoGYWN0aXZlGAIgAS'\n    'gIUgZhY3RpdmUSFgoGaGVpZ2h0GAMgASgNUgZoZWlnaHQSFAoFcm91bmQYBCABKAVSBXJvdW5k'\n    'EiYKBXZvdGVzGAUgAygLMhAucGFjdHVzLlZvdGVJbmZvUgV2b3Rlcw==');\n\n@$core.Deprecated('Use proposalInfoDescriptor instead')\nconst ProposalInfo$json = {\n  '1': 'ProposalInfo',\n  '2': [\n    {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'},\n    {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'},\n    {'1': 'block_data', '3': 3, '4': 1, '5': 9, '10': 'blockData'},\n    {'1': 'signature', '3': 4, '4': 1, '5': 9, '10': 'signature'},\n  ],\n};\n\n/// Descriptor for `ProposalInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List proposalInfoDescriptor = $convert.base64Decode(\n    'CgxQcm9wb3NhbEluZm8SFgoGaGVpZ2h0GAEgASgNUgZoZWlnaHQSFAoFcm91bmQYAiABKAVSBX'\n    'JvdW5kEh0KCmJsb2NrX2RhdGEYAyABKAlSCWJsb2NrRGF0YRIcCglzaWduYXR1cmUYBCABKAlS'\n    'CXNpZ25hdHVyZQ==');\n\nconst $core.Map<$core.String, $core.dynamic> BlockchainServiceBase$json = {\n  '1': 'Blockchain',\n  '2': [\n    {\n      '1': 'GetBlock',\n      '2': '.pactus.GetBlockRequest',\n      '3': '.pactus.GetBlockResponse'\n    },\n    {\n      '1': 'GetBlockHash',\n      '2': '.pactus.GetBlockHashRequest',\n      '3': '.pactus.GetBlockHashResponse'\n    },\n    {\n      '1': 'GetBlockHeight',\n      '2': '.pactus.GetBlockHeightRequest',\n      '3': '.pactus.GetBlockHeightResponse'\n    },\n    {\n      '1': 'GetBlockchainInfo',\n      '2': '.pactus.GetBlockchainInfoRequest',\n      '3': '.pactus.GetBlockchainInfoResponse'\n    },\n    {\n      '1': 'GetCommitteeInfo',\n      '2': '.pactus.GetCommitteeInfoRequest',\n      '3': '.pactus.GetCommitteeInfoResponse'\n    },\n    {\n      '1': 'GetConsensusInfo',\n      '2': '.pactus.GetConsensusInfoRequest',\n      '3': '.pactus.GetConsensusInfoResponse'\n    },\n    {\n      '1': 'GetAccount',\n      '2': '.pactus.GetAccountRequest',\n      '3': '.pactus.GetAccountResponse'\n    },\n    {\n      '1': 'GetValidator',\n      '2': '.pactus.GetValidatorRequest',\n      '3': '.pactus.GetValidatorResponse'\n    },\n    {\n      '1': 'GetValidatorByNumber',\n      '2': '.pactus.GetValidatorByNumberRequest',\n      '3': '.pactus.GetValidatorResponse'\n    },\n    {\n      '1': 'GetValidatorAddresses',\n      '2': '.pactus.GetValidatorAddressesRequest',\n      '3': '.pactus.GetValidatorAddressesResponse'\n    },\n    {\n      '1': 'GetPublicKey',\n      '2': '.pactus.GetPublicKeyRequest',\n      '3': '.pactus.GetPublicKeyResponse'\n    },\n    {\n      '1': 'GetTxPoolContent',\n      '2': '.pactus.GetTxPoolContentRequest',\n      '3': '.pactus.GetTxPoolContentResponse'\n    },\n  ],\n};\n\n@$core.Deprecated('Use blockchainServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    BlockchainServiceBase$messageJson = {\n  '.pactus.GetBlockRequest': GetBlockRequest$json,\n  '.pactus.GetBlockResponse': GetBlockResponse$json,\n  '.pactus.BlockHeaderInfo': BlockHeaderInfo$json,\n  '.pactus.CertificateInfo': CertificateInfo$json,\n  '.pactus.TransactionInfo': $0.TransactionInfo$json,\n  '.pactus.PayloadTransfer': $0.PayloadTransfer$json,\n  '.pactus.PayloadBond': $0.PayloadBond$json,\n  '.pactus.PayloadSortition': $0.PayloadSortition$json,\n  '.pactus.PayloadUnbond': $0.PayloadUnbond$json,\n  '.pactus.PayloadWithdraw': $0.PayloadWithdraw$json,\n  '.pactus.PayloadBatchTransfer': $0.PayloadBatchTransfer$json,\n  '.pactus.Recipient': $0.Recipient$json,\n  '.pactus.GetBlockHashRequest': GetBlockHashRequest$json,\n  '.pactus.GetBlockHashResponse': GetBlockHashResponse$json,\n  '.pactus.GetBlockHeightRequest': GetBlockHeightRequest$json,\n  '.pactus.GetBlockHeightResponse': GetBlockHeightResponse$json,\n  '.pactus.GetBlockchainInfoRequest': GetBlockchainInfoRequest$json,\n  '.pactus.GetBlockchainInfoResponse': GetBlockchainInfoResponse$json,\n  '.pactus.GetCommitteeInfoRequest': GetCommitteeInfoRequest$json,\n  '.pactus.GetCommitteeInfoResponse': GetCommitteeInfoResponse$json,\n  '.pactus.ValidatorInfo': ValidatorInfo$json,\n  '.pactus.GetCommitteeInfoResponse.ProtocolVersionsEntry':\n      GetCommitteeInfoResponse_ProtocolVersionsEntry$json,\n  '.pactus.GetConsensusInfoRequest': GetConsensusInfoRequest$json,\n  '.pactus.GetConsensusInfoResponse': GetConsensusInfoResponse$json,\n  '.pactus.ProposalInfo': ProposalInfo$json,\n  '.pactus.ConsensusInfo': ConsensusInfo$json,\n  '.pactus.VoteInfo': VoteInfo$json,\n  '.pactus.GetAccountRequest': GetAccountRequest$json,\n  '.pactus.GetAccountResponse': GetAccountResponse$json,\n  '.pactus.AccountInfo': AccountInfo$json,\n  '.pactus.GetValidatorRequest': GetValidatorRequest$json,\n  '.pactus.GetValidatorResponse': GetValidatorResponse$json,\n  '.pactus.GetValidatorByNumberRequest': GetValidatorByNumberRequest$json,\n  '.pactus.GetValidatorAddressesRequest': GetValidatorAddressesRequest$json,\n  '.pactus.GetValidatorAddressesResponse': GetValidatorAddressesResponse$json,\n  '.pactus.GetPublicKeyRequest': GetPublicKeyRequest$json,\n  '.pactus.GetPublicKeyResponse': GetPublicKeyResponse$json,\n  '.pactus.GetTxPoolContentRequest': GetTxPoolContentRequest$json,\n  '.pactus.GetTxPoolContentResponse': GetTxPoolContentResponse$json,\n};\n\n/// Descriptor for `Blockchain`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List blockchainServiceDescriptor = $convert.base64Decode(\n    'CgpCbG9ja2NoYWluEj0KCEdldEJsb2NrEhcucGFjdHVzLkdldEJsb2NrUmVxdWVzdBoYLnBhY3'\n    'R1cy5HZXRCbG9ja1Jlc3BvbnNlEkkKDEdldEJsb2NrSGFzaBIbLnBhY3R1cy5HZXRCbG9ja0hh'\n    'c2hSZXF1ZXN0GhwucGFjdHVzLkdldEJsb2NrSGFzaFJlc3BvbnNlEk8KDkdldEJsb2NrSGVpZ2'\n    'h0Eh0ucGFjdHVzLkdldEJsb2NrSGVpZ2h0UmVxdWVzdBoeLnBhY3R1cy5HZXRCbG9ja0hlaWdo'\n    'dFJlc3BvbnNlElgKEUdldEJsb2NrY2hhaW5JbmZvEiAucGFjdHVzLkdldEJsb2NrY2hhaW5Jbm'\n    'ZvUmVxdWVzdBohLnBhY3R1cy5HZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlElUKEEdldENvbW1p'\n    'dHRlZUluZm8SHy5wYWN0dXMuR2V0Q29tbWl0dGVlSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q2'\n    '9tbWl0dGVlSW5mb1Jlc3BvbnNlElUKEEdldENvbnNlbnN1c0luZm8SHy5wYWN0dXMuR2V0Q29u'\n    'c2Vuc3VzSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1Jlc3BvbnNlEkMKCk'\n    'dldEFjY291bnQSGS5wYWN0dXMuR2V0QWNjb3VudFJlcXVlc3QaGi5wYWN0dXMuR2V0QWNjb3Vu'\n    'dFJlc3BvbnNlEkkKDEdldFZhbGlkYXRvchIbLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXF1ZXN0Gh'\n    'wucGFjdHVzLkdldFZhbGlkYXRvclJlc3BvbnNlElkKFEdldFZhbGlkYXRvckJ5TnVtYmVyEiMu'\n    'cGFjdHVzLkdldFZhbGlkYXRvckJ5TnVtYmVyUmVxdWVzdBocLnBhY3R1cy5HZXRWYWxpZGF0b3'\n    'JSZXNwb25zZRJkChVHZXRWYWxpZGF0b3JBZGRyZXNzZXMSJC5wYWN0dXMuR2V0VmFsaWRhdG9y'\n    'QWRkcmVzc2VzUmVxdWVzdBolLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZR'\n    'JJCgxHZXRQdWJsaWNLZXkSGy5wYWN0dXMuR2V0UHVibGljS2V5UmVxdWVzdBocLnBhY3R1cy5H'\n    'ZXRQdWJsaWNLZXlSZXNwb25zZRJVChBHZXRUeFBvb2xDb250ZW50Eh8ucGFjdHVzLkdldFR4UG'\n    '9vbENvbnRlbnRSZXF1ZXN0GiAucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXNwb25zZQ==');\n"
  },
  {
    "path": "www/grpc/gen/dart/blockchain.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from blockchain.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'blockchain.pb.dart' as $1;\nimport 'blockchain.pbjson.dart';\n\nexport 'blockchain.pb.dart';\n\nabstract class BlockchainServiceBase extends $pb.GeneratedService {\n  $async.Future<$1.GetBlockResponse> getBlock(\n      $pb.ServerContext ctx, $1.GetBlockRequest request);\n  $async.Future<$1.GetBlockHashResponse> getBlockHash(\n      $pb.ServerContext ctx, $1.GetBlockHashRequest request);\n  $async.Future<$1.GetBlockHeightResponse> getBlockHeight(\n      $pb.ServerContext ctx, $1.GetBlockHeightRequest request);\n  $async.Future<$1.GetBlockchainInfoResponse> getBlockchainInfo(\n      $pb.ServerContext ctx, $1.GetBlockchainInfoRequest request);\n  $async.Future<$1.GetCommitteeInfoResponse> getCommitteeInfo(\n      $pb.ServerContext ctx, $1.GetCommitteeInfoRequest request);\n  $async.Future<$1.GetConsensusInfoResponse> getConsensusInfo(\n      $pb.ServerContext ctx, $1.GetConsensusInfoRequest request);\n  $async.Future<$1.GetAccountResponse> getAccount(\n      $pb.ServerContext ctx, $1.GetAccountRequest request);\n  $async.Future<$1.GetValidatorResponse> getValidator(\n      $pb.ServerContext ctx, $1.GetValidatorRequest request);\n  $async.Future<$1.GetValidatorResponse> getValidatorByNumber(\n      $pb.ServerContext ctx, $1.GetValidatorByNumberRequest request);\n  $async.Future<$1.GetValidatorAddressesResponse> getValidatorAddresses(\n      $pb.ServerContext ctx, $1.GetValidatorAddressesRequest request);\n  $async.Future<$1.GetPublicKeyResponse> getPublicKey(\n      $pb.ServerContext ctx, $1.GetPublicKeyRequest request);\n  $async.Future<$1.GetTxPoolContentResponse> getTxPoolContent(\n      $pb.ServerContext ctx, $1.GetTxPoolContentRequest request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'GetBlock':\n        return $1.GetBlockRequest();\n      case 'GetBlockHash':\n        return $1.GetBlockHashRequest();\n      case 'GetBlockHeight':\n        return $1.GetBlockHeightRequest();\n      case 'GetBlockchainInfo':\n        return $1.GetBlockchainInfoRequest();\n      case 'GetCommitteeInfo':\n        return $1.GetCommitteeInfoRequest();\n      case 'GetConsensusInfo':\n        return $1.GetConsensusInfoRequest();\n      case 'GetAccount':\n        return $1.GetAccountRequest();\n      case 'GetValidator':\n        return $1.GetValidatorRequest();\n      case 'GetValidatorByNumber':\n        return $1.GetValidatorByNumberRequest();\n      case 'GetValidatorAddresses':\n        return $1.GetValidatorAddressesRequest();\n      case 'GetPublicKey':\n        return $1.GetPublicKeyRequest();\n      case 'GetTxPoolContent':\n        return $1.GetTxPoolContentRequest();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'GetBlock':\n        return getBlock(ctx, request as $1.GetBlockRequest);\n      case 'GetBlockHash':\n        return getBlockHash(ctx, request as $1.GetBlockHashRequest);\n      case 'GetBlockHeight':\n        return getBlockHeight(ctx, request as $1.GetBlockHeightRequest);\n      case 'GetBlockchainInfo':\n        return getBlockchainInfo(ctx, request as $1.GetBlockchainInfoRequest);\n      case 'GetCommitteeInfo':\n        return getCommitteeInfo(ctx, request as $1.GetCommitteeInfoRequest);\n      case 'GetConsensusInfo':\n        return getConsensusInfo(ctx, request as $1.GetConsensusInfoRequest);\n      case 'GetAccount':\n        return getAccount(ctx, request as $1.GetAccountRequest);\n      case 'GetValidator':\n        return getValidator(ctx, request as $1.GetValidatorRequest);\n      case 'GetValidatorByNumber':\n        return getValidatorByNumber(\n            ctx, request as $1.GetValidatorByNumberRequest);\n      case 'GetValidatorAddresses':\n        return getValidatorAddresses(\n            ctx, request as $1.GetValidatorAddressesRequest);\n      case 'GetPublicKey':\n        return getPublicKey(ctx, request as $1.GetPublicKeyRequest);\n      case 'GetTxPoolContent':\n        return getTxPoolContent(ctx, request as $1.GetTxPoolContentRequest);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json =>\n      BlockchainServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => BlockchainServiceBase$messageJson;\n}\n"
  },
  {
    "path": "www/grpc/gen/dart/network.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from network.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'network.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'network.pbenum.dart';\n\n/// Request message for retrieving overall network information.\nclass GetNetworkInfoRequest extends $pb.GeneratedMessage {\n  factory GetNetworkInfoRequest() => create();\n\n  GetNetworkInfoRequest._();\n\n  factory GetNetworkInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNetworkInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNetworkInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNetworkInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNetworkInfoRequest copyWith(\n          void Function(GetNetworkInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetNetworkInfoRequest))\n          as GetNetworkInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNetworkInfoRequest create() => GetNetworkInfoRequest._();\n  @$core.override\n  GetNetworkInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNetworkInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNetworkInfoRequest>(create);\n  static GetNetworkInfoRequest? _defaultInstance;\n}\n\n/// Response message contains information about the overall network.\nclass GetNetworkInfoResponse extends $pb.GeneratedMessage {\n  factory GetNetworkInfoResponse({\n    $core.String? networkName,\n    $core.int? connectedPeersCount,\n    MetricInfo? metricInfo,\n  }) {\n    final result = create();\n    if (networkName != null) result.networkName = networkName;\n    if (connectedPeersCount != null)\n      result.connectedPeersCount = connectedPeersCount;\n    if (metricInfo != null) result.metricInfo = metricInfo;\n    return result;\n  }\n\n  GetNetworkInfoResponse._();\n\n  factory GetNetworkInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNetworkInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNetworkInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'networkName')\n    ..aI(2, _omitFieldNames ? '' : 'connectedPeersCount',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aOM<MetricInfo>(4, _omitFieldNames ? '' : 'metricInfo',\n        subBuilder: MetricInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNetworkInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNetworkInfoResponse copyWith(\n          void Function(GetNetworkInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetNetworkInfoResponse))\n          as GetNetworkInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNetworkInfoResponse create() => GetNetworkInfoResponse._();\n  @$core.override\n  GetNetworkInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNetworkInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNetworkInfoResponse>(create);\n  static GetNetworkInfoResponse? _defaultInstance;\n\n  /// Name of the P2P network.\n  @$pb.TagNumber(1)\n  $core.String get networkName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set networkName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNetworkName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNetworkName() => $_clearField(1);\n\n  /// Number of connected peers.\n  @$pb.TagNumber(2)\n  $core.int get connectedPeersCount => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set connectedPeersCount($core.int value) => $_setUnsignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasConnectedPeersCount() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearConnectedPeersCount() => $_clearField(2);\n\n  /// Metrics related to node activity.\n  @$pb.TagNumber(4)\n  MetricInfo get metricInfo => $_getN(2);\n  @$pb.TagNumber(4)\n  set metricInfo(MetricInfo value) => $_setField(4, value);\n  @$pb.TagNumber(4)\n  $core.bool hasMetricInfo() => $_has(2);\n  @$pb.TagNumber(4)\n  void clearMetricInfo() => $_clearField(4);\n  @$pb.TagNumber(4)\n  MetricInfo ensureMetricInfo() => $_ensure(2);\n}\n\n/// Request message for listing peers.\nclass ListPeersRequest extends $pb.GeneratedMessage {\n  factory ListPeersRequest({\n    $core.bool? includeDisconnected,\n  }) {\n    final result = create();\n    if (includeDisconnected != null)\n      result.includeDisconnected = includeDisconnected;\n    return result;\n  }\n\n  ListPeersRequest._();\n\n  factory ListPeersRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListPeersRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListPeersRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'includeDisconnected')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListPeersRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListPeersRequest copyWith(void Function(ListPeersRequest) updates) =>\n      super.copyWith((message) => updates(message as ListPeersRequest))\n          as ListPeersRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListPeersRequest create() => ListPeersRequest._();\n  @$core.override\n  ListPeersRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListPeersRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListPeersRequest>(create);\n  static ListPeersRequest? _defaultInstance;\n\n  /// If true, includes disconnected peers (default: connected peers only).\n  @$pb.TagNumber(1)\n  $core.bool get includeDisconnected => $_getBF(0);\n  @$pb.TagNumber(1)\n  set includeDisconnected($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasIncludeDisconnected() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearIncludeDisconnected() => $_clearField(1);\n}\n\n/// Response message for listing peers.\nclass ListPeersResponse extends $pb.GeneratedMessage {\n  factory ListPeersResponse({\n    $core.Iterable<PeerInfo>? peers,\n  }) {\n    final result = create();\n    if (peers != null) result.peers.addAll(peers);\n    return result;\n  }\n\n  ListPeersResponse._();\n\n  factory ListPeersResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListPeersResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListPeersResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPM<PeerInfo>(1, _omitFieldNames ? '' : 'peers',\n        subBuilder: PeerInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListPeersResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListPeersResponse copyWith(void Function(ListPeersResponse) updates) =>\n      super.copyWith((message) => updates(message as ListPeersResponse))\n          as ListPeersResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListPeersResponse create() => ListPeersResponse._();\n  @$core.override\n  ListPeersResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListPeersResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListPeersResponse>(create);\n  static ListPeersResponse? _defaultInstance;\n\n  /// List of peers.\n  @$pb.TagNumber(1)\n  $pb.PbList<PeerInfo> get peers => $_getList(0);\n}\n\n/// Request message for retrieving information of the node.\nclass GetNodeInfoRequest extends $pb.GeneratedMessage {\n  factory GetNodeInfoRequest() => create();\n\n  GetNodeInfoRequest._();\n\n  factory GetNodeInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNodeInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNodeInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNodeInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNodeInfoRequest copyWith(void Function(GetNodeInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetNodeInfoRequest))\n          as GetNodeInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNodeInfoRequest create() => GetNodeInfoRequest._();\n  @$core.override\n  GetNodeInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNodeInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNodeInfoRequest>(create);\n  static GetNodeInfoRequest? _defaultInstance;\n}\n\n/// Response message contains information about a specific node in the network.\nclass GetNodeInfoResponse extends $pb.GeneratedMessage {\n  factory GetNodeInfoResponse({\n    $core.String? moniker,\n    $core.String? agent,\n    $core.String? peerId,\n    $fixnum.Int64? startedAt,\n    $core.String? reachability,\n    $core.int? services,\n    $core.String? servicesNames,\n    $core.Iterable<$core.String>? localAddrs,\n    $core.Iterable<$core.String>? protocols,\n    $core.double? clockOffset,\n    ConnectionInfo? connectionInfo,\n    $core.Iterable<ZMQPublisherInfo>? zmqPublishers,\n    $fixnum.Int64? currentTime,\n    $core.String? networkName,\n  }) {\n    final result = create();\n    if (moniker != null) result.moniker = moniker;\n    if (agent != null) result.agent = agent;\n    if (peerId != null) result.peerId = peerId;\n    if (startedAt != null) result.startedAt = startedAt;\n    if (reachability != null) result.reachability = reachability;\n    if (services != null) result.services = services;\n    if (servicesNames != null) result.servicesNames = servicesNames;\n    if (localAddrs != null) result.localAddrs.addAll(localAddrs);\n    if (protocols != null) result.protocols.addAll(protocols);\n    if (clockOffset != null) result.clockOffset = clockOffset;\n    if (connectionInfo != null) result.connectionInfo = connectionInfo;\n    if (zmqPublishers != null) result.zmqPublishers.addAll(zmqPublishers);\n    if (currentTime != null) result.currentTime = currentTime;\n    if (networkName != null) result.networkName = networkName;\n    return result;\n  }\n\n  GetNodeInfoResponse._();\n\n  factory GetNodeInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNodeInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNodeInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'moniker')\n    ..aOS(2, _omitFieldNames ? '' : 'agent')\n    ..aOS(3, _omitFieldNames ? '' : 'peerId')\n    ..a<$fixnum.Int64>(\n        4, _omitFieldNames ? '' : 'startedAt', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..aOS(5, _omitFieldNames ? '' : 'reachability')\n    ..aI(6, _omitFieldNames ? '' : 'services')\n    ..aOS(7, _omitFieldNames ? '' : 'servicesNames')\n    ..pPS(8, _omitFieldNames ? '' : 'localAddrs')\n    ..pPS(9, _omitFieldNames ? '' : 'protocols')\n    ..aD(13, _omitFieldNames ? '' : 'clockOffset')\n    ..aOM<ConnectionInfo>(14, _omitFieldNames ? '' : 'connectionInfo',\n        subBuilder: ConnectionInfo.create)\n    ..pPM<ZMQPublisherInfo>(15, _omitFieldNames ? '' : 'zmqPublishers',\n        subBuilder: ZMQPublisherInfo.create)\n    ..a<$fixnum.Int64>(\n        16, _omitFieldNames ? '' : 'currentTime', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..aOS(17, _omitFieldNames ? '' : 'networkName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNodeInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNodeInfoResponse copyWith(void Function(GetNodeInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetNodeInfoResponse))\n          as GetNodeInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNodeInfoResponse create() => GetNodeInfoResponse._();\n  @$core.override\n  GetNodeInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNodeInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNodeInfoResponse>(create);\n  static GetNodeInfoResponse? _defaultInstance;\n\n  /// Moniker or Human-readable name identifying this node in the network.\n  @$pb.TagNumber(1)\n  $core.String get moniker => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set moniker($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMoniker() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMoniker() => $_clearField(1);\n\n  /// Version and agent details of the node.\n  @$pb.TagNumber(2)\n  $core.String get agent => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set agent($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAgent() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAgent() => $_clearField(2);\n\n  /// Peer ID of the node.\n  @$pb.TagNumber(3)\n  $core.String get peerId => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set peerId($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPeerId() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPeerId() => $_clearField(3);\n\n  /// Unix timestamp when the node was started (UTC).\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get startedAt => $_getI64(3);\n  @$pb.TagNumber(4)\n  set startedAt($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasStartedAt() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearStartedAt() => $_clearField(4);\n\n  /// Reachability status of the node.\n  @$pb.TagNumber(5)\n  $core.String get reachability => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set reachability($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasReachability() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearReachability() => $_clearField(5);\n\n  /// Bitfield representing the services provided by the node.\n  @$pb.TagNumber(6)\n  $core.int get services => $_getIZ(5);\n  @$pb.TagNumber(6)\n  set services($core.int value) => $_setSignedInt32(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasServices() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearServices() => $_clearField(6);\n\n  /// Names of services provided by the node.\n  @$pb.TagNumber(7)\n  $core.String get servicesNames => $_getSZ(6);\n  @$pb.TagNumber(7)\n  set servicesNames($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasServicesNames() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearServicesNames() => $_clearField(7);\n\n  /// List of addresses associated with the node.\n  @$pb.TagNumber(8)\n  $pb.PbList<$core.String> get localAddrs => $_getList(7);\n\n  /// List of protocols supported by the node.\n  @$pb.TagNumber(9)\n  $pb.PbList<$core.String> get protocols => $_getList(8);\n\n  /// Offset between the node's clock and the network's clock (in seconds).\n  @$pb.TagNumber(13)\n  $core.double get clockOffset => $_getN(9);\n  @$pb.TagNumber(13)\n  set clockOffset($core.double value) => $_setDouble(9, value);\n  @$pb.TagNumber(13)\n  $core.bool hasClockOffset() => $_has(9);\n  @$pb.TagNumber(13)\n  void clearClockOffset() => $_clearField(13);\n\n  /// Information about the node's connections.\n  @$pb.TagNumber(14)\n  ConnectionInfo get connectionInfo => $_getN(10);\n  @$pb.TagNumber(14)\n  set connectionInfo(ConnectionInfo value) => $_setField(14, value);\n  @$pb.TagNumber(14)\n  $core.bool hasConnectionInfo() => $_has(10);\n  @$pb.TagNumber(14)\n  void clearConnectionInfo() => $_clearField(14);\n  @$pb.TagNumber(14)\n  ConnectionInfo ensureConnectionInfo() => $_ensure(10);\n\n  /// List of active ZeroMQ publishers.\n  @$pb.TagNumber(15)\n  $pb.PbList<ZMQPublisherInfo> get zmqPublishers => $_getList(11);\n\n  /// Current Unix timestamp of the node (UTC).\n  @$pb.TagNumber(16)\n  $fixnum.Int64 get currentTime => $_getI64(12);\n  @$pb.TagNumber(16)\n  set currentTime($fixnum.Int64 value) => $_setInt64(12, value);\n  @$pb.TagNumber(16)\n  $core.bool hasCurrentTime() => $_has(12);\n  @$pb.TagNumber(16)\n  void clearCurrentTime() => $_clearField(16);\n\n  /// Name of the P2P network.\n  @$pb.TagNumber(17)\n  $core.String get networkName => $_getSZ(13);\n  @$pb.TagNumber(17)\n  set networkName($core.String value) => $_setString(13, value);\n  @$pb.TagNumber(17)\n  $core.bool hasNetworkName() => $_has(13);\n  @$pb.TagNumber(17)\n  void clearNetworkName() => $_clearField(17);\n}\n\n/// ZMQPublisherInfo contains information about a ZeroMQ publisher.\nclass ZMQPublisherInfo extends $pb.GeneratedMessage {\n  factory ZMQPublisherInfo({\n    $core.String? topic,\n    $core.String? address,\n    $core.int? hwm,\n  }) {\n    final result = create();\n    if (topic != null) result.topic = topic;\n    if (address != null) result.address = address;\n    if (hwm != null) result.hwm = hwm;\n    return result;\n  }\n\n  ZMQPublisherInfo._();\n\n  factory ZMQPublisherInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ZMQPublisherInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ZMQPublisherInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'topic')\n    ..aOS(2, _omitFieldNames ? '' : 'address')\n    ..aI(3, _omitFieldNames ? '' : 'hwm')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ZMQPublisherInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ZMQPublisherInfo copyWith(void Function(ZMQPublisherInfo) updates) =>\n      super.copyWith((message) => updates(message as ZMQPublisherInfo))\n          as ZMQPublisherInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ZMQPublisherInfo create() => ZMQPublisherInfo._();\n  @$core.override\n  ZMQPublisherInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ZMQPublisherInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ZMQPublisherInfo>(create);\n  static ZMQPublisherInfo? _defaultInstance;\n\n  /// The topic associated with the publisher.\n  @$pb.TagNumber(1)\n  $core.String get topic => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set topic($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasTopic() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearTopic() => $_clearField(1);\n\n  /// The address of the publisher.\n  @$pb.TagNumber(2)\n  $core.String get address => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set address($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddress() => $_clearField(2);\n\n  /// The high-water mark (HWM) for the publisher, indicating the\n  /// maximum number of messages to queue before dropping older ones.\n  @$pb.TagNumber(3)\n  $core.int get hwm => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set hwm($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasHwm() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearHwm() => $_clearField(3);\n}\n\n/// PeerInfo contains information about a peer in the network.\nclass PeerInfo extends $pb.GeneratedMessage {\n  factory PeerInfo({\n    $core.int? status,\n    $core.String? moniker,\n    $core.String? agent,\n    $core.String? peerId,\n    $core.Iterable<$core.String>? consensusKeys,\n    $core.Iterable<$core.String>? consensusAddresses,\n    $core.int? services,\n    $core.String? lastBlockHash,\n    $core.int? height,\n    $fixnum.Int64? lastSent,\n    $fixnum.Int64? lastReceived,\n    $core.String? address,\n    Direction? direction,\n    $core.Iterable<$core.String>? protocols,\n    $core.int? totalSessions,\n    $core.int? completedSessions,\n    MetricInfo? metricInfo,\n    $core.bool? outboundHelloSent,\n  }) {\n    final result = create();\n    if (status != null) result.status = status;\n    if (moniker != null) result.moniker = moniker;\n    if (agent != null) result.agent = agent;\n    if (peerId != null) result.peerId = peerId;\n    if (consensusKeys != null) result.consensusKeys.addAll(consensusKeys);\n    if (consensusAddresses != null)\n      result.consensusAddresses.addAll(consensusAddresses);\n    if (services != null) result.services = services;\n    if (lastBlockHash != null) result.lastBlockHash = lastBlockHash;\n    if (height != null) result.height = height;\n    if (lastSent != null) result.lastSent = lastSent;\n    if (lastReceived != null) result.lastReceived = lastReceived;\n    if (address != null) result.address = address;\n    if (direction != null) result.direction = direction;\n    if (protocols != null) result.protocols.addAll(protocols);\n    if (totalSessions != null) result.totalSessions = totalSessions;\n    if (completedSessions != null) result.completedSessions = completedSessions;\n    if (metricInfo != null) result.metricInfo = metricInfo;\n    if (outboundHelloSent != null) result.outboundHelloSent = outboundHelloSent;\n    return result;\n  }\n\n  PeerInfo._();\n\n  factory PeerInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PeerInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PeerInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'status')\n    ..aOS(2, _omitFieldNames ? '' : 'moniker')\n    ..aOS(3, _omitFieldNames ? '' : 'agent')\n    ..aOS(4, _omitFieldNames ? '' : 'peerId')\n    ..pPS(5, _omitFieldNames ? '' : 'consensusKeys')\n    ..pPS(6, _omitFieldNames ? '' : 'consensusAddresses')\n    ..aI(7, _omitFieldNames ? '' : 'services', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(8, _omitFieldNames ? '' : 'lastBlockHash')\n    ..aI(9, _omitFieldNames ? '' : 'height', fieldType: $pb.PbFieldType.OU3)\n    ..aInt64(10, _omitFieldNames ? '' : 'lastSent')\n    ..aInt64(11, _omitFieldNames ? '' : 'lastReceived')\n    ..aOS(12, _omitFieldNames ? '' : 'address')\n    ..aE<Direction>(13, _omitFieldNames ? '' : 'direction',\n        enumValues: Direction.values)\n    ..pPS(14, _omitFieldNames ? '' : 'protocols')\n    ..aI(15, _omitFieldNames ? '' : 'totalSessions')\n    ..aI(16, _omitFieldNames ? '' : 'completedSessions')\n    ..aOM<MetricInfo>(17, _omitFieldNames ? '' : 'metricInfo',\n        subBuilder: MetricInfo.create)\n    ..aOB(18, _omitFieldNames ? '' : 'outboundHelloSent')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PeerInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PeerInfo copyWith(void Function(PeerInfo) updates) =>\n      super.copyWith((message) => updates(message as PeerInfo)) as PeerInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PeerInfo create() => PeerInfo._();\n  @$core.override\n  PeerInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PeerInfo getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<PeerInfo>(create);\n  static PeerInfo? _defaultInstance;\n\n  /// Current status of the peer (e.g., connected, disconnected).\n  @$pb.TagNumber(1)\n  $core.int get status => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set status($core.int value) => $_setSignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasStatus() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearStatus() => $_clearField(1);\n\n  /// Moniker or Human-Readable name of the peer.\n  @$pb.TagNumber(2)\n  $core.String get moniker => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set moniker($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasMoniker() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearMoniker() => $_clearField(2);\n\n  /// Version and agent details of the peer.\n  @$pb.TagNumber(3)\n  $core.String get agent => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set agent($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAgent() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAgent() => $_clearField(3);\n\n  /// Peer ID of the peer in P2P network.\n  @$pb.TagNumber(4)\n  $core.String get peerId => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set peerId($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPeerId() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearPeerId() => $_clearField(4);\n\n  /// List of consensus keys used by the peer.\n  @$pb.TagNumber(5)\n  $pb.PbList<$core.String> get consensusKeys => $_getList(4);\n\n  /// List of consensus addresses used by the peer.\n  @$pb.TagNumber(6)\n  $pb.PbList<$core.String> get consensusAddresses => $_getList(5);\n\n  /// Bitfield representing the services provided by the peer.\n  @$pb.TagNumber(7)\n  $core.int get services => $_getIZ(6);\n  @$pb.TagNumber(7)\n  set services($core.int value) => $_setUnsignedInt32(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasServices() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearServices() => $_clearField(7);\n\n  /// Hash of the last block the peer knows.\n  @$pb.TagNumber(8)\n  $core.String get lastBlockHash => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set lastBlockHash($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasLastBlockHash() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearLastBlockHash() => $_clearField(8);\n\n  /// Blockchain height of the peer.\n  @$pb.TagNumber(9)\n  $core.int get height => $_getIZ(8);\n  @$pb.TagNumber(9)\n  set height($core.int value) => $_setUnsignedInt32(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasHeight() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearHeight() => $_clearField(9);\n\n  /// Unix timestamp of the last bundle sent to the peer (UTC).\n  @$pb.TagNumber(10)\n  $fixnum.Int64 get lastSent => $_getI64(9);\n  @$pb.TagNumber(10)\n  set lastSent($fixnum.Int64 value) => $_setInt64(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasLastSent() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearLastSent() => $_clearField(10);\n\n  /// Unix timestamp of the last bundle received from the peer (UTC).\n  @$pb.TagNumber(11)\n  $fixnum.Int64 get lastReceived => $_getI64(10);\n  @$pb.TagNumber(11)\n  set lastReceived($fixnum.Int64 value) => $_setInt64(10, value);\n  @$pb.TagNumber(11)\n  $core.bool hasLastReceived() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearLastReceived() => $_clearField(11);\n\n  /// Network address of the peer.\n  @$pb.TagNumber(12)\n  $core.String get address => $_getSZ(11);\n  @$pb.TagNumber(12)\n  set address($core.String value) => $_setString(11, value);\n  @$pb.TagNumber(12)\n  $core.bool hasAddress() => $_has(11);\n  @$pb.TagNumber(12)\n  void clearAddress() => $_clearField(12);\n\n  /// Connection direction (e.g., inbound, outbound).\n  @$pb.TagNumber(13)\n  Direction get direction => $_getN(12);\n  @$pb.TagNumber(13)\n  set direction(Direction value) => $_setField(13, value);\n  @$pb.TagNumber(13)\n  $core.bool hasDirection() => $_has(12);\n  @$pb.TagNumber(13)\n  void clearDirection() => $_clearField(13);\n\n  /// List of protocols supported by the peer.\n  @$pb.TagNumber(14)\n  $pb.PbList<$core.String> get protocols => $_getList(13);\n\n  /// Total download sessions with the peer.\n  @$pb.TagNumber(15)\n  $core.int get totalSessions => $_getIZ(14);\n  @$pb.TagNumber(15)\n  set totalSessions($core.int value) => $_setSignedInt32(14, value);\n  @$pb.TagNumber(15)\n  $core.bool hasTotalSessions() => $_has(14);\n  @$pb.TagNumber(15)\n  void clearTotalSessions() => $_clearField(15);\n\n  /// Completed download sessions with the peer.\n  @$pb.TagNumber(16)\n  $core.int get completedSessions => $_getIZ(15);\n  @$pb.TagNumber(16)\n  set completedSessions($core.int value) => $_setSignedInt32(15, value);\n  @$pb.TagNumber(16)\n  $core.bool hasCompletedSessions() => $_has(15);\n  @$pb.TagNumber(16)\n  void clearCompletedSessions() => $_clearField(16);\n\n  /// Metrics related to peer activity.\n  @$pb.TagNumber(17)\n  MetricInfo get metricInfo => $_getN(16);\n  @$pb.TagNumber(17)\n  set metricInfo(MetricInfo value) => $_setField(17, value);\n  @$pb.TagNumber(17)\n  $core.bool hasMetricInfo() => $_has(16);\n  @$pb.TagNumber(17)\n  void clearMetricInfo() => $_clearField(17);\n  @$pb.TagNumber(17)\n  MetricInfo ensureMetricInfo() => $_ensure(16);\n\n  /// Whether the hello message was sent from the outbound connection.\n  @$pb.TagNumber(18)\n  $core.bool get outboundHelloSent => $_getBF(17);\n  @$pb.TagNumber(18)\n  set outboundHelloSent($core.bool value) => $_setBool(17, value);\n  @$pb.TagNumber(18)\n  $core.bool hasOutboundHelloSent() => $_has(17);\n  @$pb.TagNumber(18)\n  void clearOutboundHelloSent() => $_clearField(18);\n}\n\n/// ConnectionInfo contains information about the node's connections.\nclass ConnectionInfo extends $pb.GeneratedMessage {\n  factory ConnectionInfo({\n    $fixnum.Int64? connections,\n    $fixnum.Int64? inboundConnections,\n    $fixnum.Int64? outboundConnections,\n  }) {\n    final result = create();\n    if (connections != null) result.connections = connections;\n    if (inboundConnections != null)\n      result.inboundConnections = inboundConnections;\n    if (outboundConnections != null)\n      result.outboundConnections = outboundConnections;\n    return result;\n  }\n\n  ConnectionInfo._();\n\n  factory ConnectionInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ConnectionInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ConnectionInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..a<$fixnum.Int64>(\n        1, _omitFieldNames ? '' : 'connections', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..a<$fixnum.Int64>(\n        2, _omitFieldNames ? '' : 'inboundConnections', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..a<$fixnum.Int64>(\n        3, _omitFieldNames ? '' : 'outboundConnections', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ConnectionInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ConnectionInfo copyWith(void Function(ConnectionInfo) updates) =>\n      super.copyWith((message) => updates(message as ConnectionInfo))\n          as ConnectionInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ConnectionInfo create() => ConnectionInfo._();\n  @$core.override\n  ConnectionInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ConnectionInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ConnectionInfo>(create);\n  static ConnectionInfo? _defaultInstance;\n\n  /// Total number of connections.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get connections => $_getI64(0);\n  @$pb.TagNumber(1)\n  set connections($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasConnections() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearConnections() => $_clearField(1);\n\n  /// Number of inbound connections.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get inboundConnections => $_getI64(1);\n  @$pb.TagNumber(2)\n  set inboundConnections($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasInboundConnections() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearInboundConnections() => $_clearField(2);\n\n  /// Number of outbound connections.\n  @$pb.TagNumber(3)\n  $fixnum.Int64 get outboundConnections => $_getI64(2);\n  @$pb.TagNumber(3)\n  set outboundConnections($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasOutboundConnections() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearOutboundConnections() => $_clearField(3);\n}\n\n/// MetricInfo contains metrics data regarding network activity.\nclass MetricInfo extends $pb.GeneratedMessage {\n  factory MetricInfo({\n    CounterInfo? totalInvalid,\n    CounterInfo? totalSent,\n    CounterInfo? totalReceived,\n    $core.Iterable<$core.MapEntry<$core.int, CounterInfo>>? messageSent,\n    $core.Iterable<$core.MapEntry<$core.int, CounterInfo>>? messageReceived,\n  }) {\n    final result = create();\n    if (totalInvalid != null) result.totalInvalid = totalInvalid;\n    if (totalSent != null) result.totalSent = totalSent;\n    if (totalReceived != null) result.totalReceived = totalReceived;\n    if (messageSent != null) result.messageSent.addEntries(messageSent);\n    if (messageReceived != null)\n      result.messageReceived.addEntries(messageReceived);\n    return result;\n  }\n\n  MetricInfo._();\n\n  factory MetricInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory MetricInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'MetricInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOM<CounterInfo>(1, _omitFieldNames ? '' : 'totalInvalid',\n        subBuilder: CounterInfo.create)\n    ..aOM<CounterInfo>(2, _omitFieldNames ? '' : 'totalSent',\n        subBuilder: CounterInfo.create)\n    ..aOM<CounterInfo>(3, _omitFieldNames ? '' : 'totalReceived',\n        subBuilder: CounterInfo.create)\n    ..m<$core.int, CounterInfo>(4, _omitFieldNames ? '' : 'messageSent',\n        entryClassName: 'MetricInfo.MessageSentEntry',\n        keyFieldType: $pb.PbFieldType.O3,\n        valueFieldType: $pb.PbFieldType.OM,\n        valueCreator: CounterInfo.create,\n        valueDefaultOrMaker: CounterInfo.getDefault,\n        packageName: const $pb.PackageName('pactus'))\n    ..m<$core.int, CounterInfo>(5, _omitFieldNames ? '' : 'messageReceived',\n        entryClassName: 'MetricInfo.MessageReceivedEntry',\n        keyFieldType: $pb.PbFieldType.O3,\n        valueFieldType: $pb.PbFieldType.OM,\n        valueCreator: CounterInfo.create,\n        valueDefaultOrMaker: CounterInfo.getDefault,\n        packageName: const $pb.PackageName('pactus'))\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MetricInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  MetricInfo copyWith(void Function(MetricInfo) updates) =>\n      super.copyWith((message) => updates(message as MetricInfo)) as MetricInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static MetricInfo create() => MetricInfo._();\n  @$core.override\n  MetricInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static MetricInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<MetricInfo>(create);\n  static MetricInfo? _defaultInstance;\n\n  /// Total number of invalid bundles.\n  @$pb.TagNumber(1)\n  CounterInfo get totalInvalid => $_getN(0);\n  @$pb.TagNumber(1)\n  set totalInvalid(CounterInfo value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasTotalInvalid() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearTotalInvalid() => $_clearField(1);\n  @$pb.TagNumber(1)\n  CounterInfo ensureTotalInvalid() => $_ensure(0);\n\n  /// Total number of bundles sent.\n  @$pb.TagNumber(2)\n  CounterInfo get totalSent => $_getN(1);\n  @$pb.TagNumber(2)\n  set totalSent(CounterInfo value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasTotalSent() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearTotalSent() => $_clearField(2);\n  @$pb.TagNumber(2)\n  CounterInfo ensureTotalSent() => $_ensure(1);\n\n  /// Total number of bundles received.\n  @$pb.TagNumber(3)\n  CounterInfo get totalReceived => $_getN(2);\n  @$pb.TagNumber(3)\n  set totalReceived(CounterInfo value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasTotalReceived() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearTotalReceived() => $_clearField(3);\n  @$pb.TagNumber(3)\n  CounterInfo ensureTotalReceived() => $_ensure(2);\n\n  /// Number of sent bundles categorized by message type.\n  @$pb.TagNumber(4)\n  $pb.PbMap<$core.int, CounterInfo> get messageSent => $_getMap(3);\n\n  /// Number of received bundles categorized by message type.\n  @$pb.TagNumber(5)\n  $pb.PbMap<$core.int, CounterInfo> get messageReceived => $_getMap(4);\n}\n\n/// CounterInfo holds counter data regarding byte and bundle counts.\nclass CounterInfo extends $pb.GeneratedMessage {\n  factory CounterInfo({\n    $fixnum.Int64? bytes,\n    $fixnum.Int64? bundles,\n  }) {\n    final result = create();\n    if (bytes != null) result.bytes = bytes;\n    if (bundles != null) result.bundles = bundles;\n    return result;\n  }\n\n  CounterInfo._();\n\n  factory CounterInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CounterInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CounterInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'bytes', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..a<$fixnum.Int64>(2, _omitFieldNames ? '' : 'bundles', $pb.PbFieldType.OU6,\n        defaultOrMaker: $fixnum.Int64.ZERO)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CounterInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CounterInfo copyWith(void Function(CounterInfo) updates) =>\n      super.copyWith((message) => updates(message as CounterInfo))\n          as CounterInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CounterInfo create() => CounterInfo._();\n  @$core.override\n  CounterInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CounterInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CounterInfo>(create);\n  static CounterInfo? _defaultInstance;\n\n  /// Total number of bytes.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get bytes => $_getI64(0);\n  @$pb.TagNumber(1)\n  set bytes($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasBytes() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearBytes() => $_clearField(1);\n\n  /// Total number of bundles.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get bundles => $_getI64(1);\n  @$pb.TagNumber(2)\n  set bundles($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasBundles() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearBundles() => $_clearField(2);\n}\n\n/// Request message for ping - intentionally empty for measuring round-trip time.\nclass PingRequest extends $pb.GeneratedMessage {\n  factory PingRequest() => create();\n\n  PingRequest._();\n\n  factory PingRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PingRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PingRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PingRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PingRequest copyWith(void Function(PingRequest) updates) =>\n      super.copyWith((message) => updates(message as PingRequest))\n          as PingRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PingRequest create() => PingRequest._();\n  @$core.override\n  PingRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PingRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PingRequest>(create);\n  static PingRequest? _defaultInstance;\n}\n\n/// Response message for ping - intentionally empty for measuring round-trip time.\nclass PingResponse extends $pb.GeneratedMessage {\n  factory PingResponse() => create();\n\n  PingResponse._();\n\n  factory PingResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PingResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PingResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PingResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PingResponse copyWith(void Function(PingResponse) updates) =>\n      super.copyWith((message) => updates(message as PingResponse))\n          as PingResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PingResponse create() => PingResponse._();\n  @$core.override\n  PingResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PingResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PingResponse>(create);\n  static PingResponse? _defaultInstance;\n}\n\n/// Network service provides RPCs for retrieving information about the network.\nclass NetworkApi {\n  final $pb.RpcClient _client;\n\n  NetworkApi(this._client);\n\n  /// GetNetworkInfo retrieves information about the overall network.\n  $async.Future<GetNetworkInfoResponse> getNetworkInfo(\n          $pb.ClientContext? ctx, GetNetworkInfoRequest request) =>\n      _client.invoke<GetNetworkInfoResponse>(\n          ctx, 'Network', 'GetNetworkInfo', request, GetNetworkInfoResponse());\n\n  /// ListPeers lists all peers in the network.\n  $async.Future<ListPeersResponse> listPeers(\n          $pb.ClientContext? ctx, ListPeersRequest request) =>\n      _client.invoke<ListPeersResponse>(\n          ctx, 'Network', 'ListPeers', request, ListPeersResponse());\n\n  /// GetNodeInfo retrieves information about a specific node in the network.\n  $async.Future<GetNodeInfoResponse> getNodeInfo(\n          $pb.ClientContext? ctx, GetNodeInfoRequest request) =>\n      _client.invoke<GetNodeInfoResponse>(\n          ctx, 'Network', 'GetNodeInfo', request, GetNodeInfoResponse());\n\n  /// Ping provides a simple connectivity test and latency measurement.\n  $async.Future<PingResponse> ping(\n          $pb.ClientContext? ctx, PingRequest request) =>\n      _client.invoke<PingResponse>(\n          ctx, 'Network', 'Ping', request, PingResponse());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/network.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from network.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// Direction represents the connection direction between peers.\nclass Direction extends $pb.ProtobufEnum {\n  /// Unknown direction (default value).\n  static const Direction DIRECTION_UNKNOWN =\n      Direction._(0, _omitEnumNames ? '' : 'DIRECTION_UNKNOWN');\n\n  /// Inbound connection - peer connected to us.\n  static const Direction DIRECTION_INBOUND =\n      Direction._(1, _omitEnumNames ? '' : 'DIRECTION_INBOUND');\n\n  /// Outbound connection - we connected to peer.\n  static const Direction DIRECTION_OUTBOUND =\n      Direction._(2, _omitEnumNames ? '' : 'DIRECTION_OUTBOUND');\n\n  static const $core.List<Direction> values = <Direction>[\n    DIRECTION_UNKNOWN,\n    DIRECTION_INBOUND,\n    DIRECTION_OUTBOUND,\n  ];\n\n  static final $core.List<Direction?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static Direction? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const Direction._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/network.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from network.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use directionDescriptor instead')\nconst Direction$json = {\n  '1': 'Direction',\n  '2': [\n    {'1': 'DIRECTION_UNKNOWN', '2': 0},\n    {'1': 'DIRECTION_INBOUND', '2': 1},\n    {'1': 'DIRECTION_OUTBOUND', '2': 2},\n  ],\n};\n\n/// Descriptor for `Direction`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List directionDescriptor = $convert.base64Decode(\n    'CglEaXJlY3Rpb24SFQoRRElSRUNUSU9OX1VOS05PV04QABIVChFESVJFQ1RJT05fSU5CT1VORB'\n    'ABEhYKEkRJUkVDVElPTl9PVVRCT1VORBAC');\n\n@$core.Deprecated('Use getNetworkInfoRequestDescriptor instead')\nconst GetNetworkInfoRequest$json = {\n  '1': 'GetNetworkInfoRequest',\n};\n\n/// Descriptor for `GetNetworkInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNetworkInfoRequestDescriptor =\n    $convert.base64Decode('ChVHZXROZXR3b3JrSW5mb1JlcXVlc3Q=');\n\n@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead')\nconst GetNetworkInfoResponse$json = {\n  '1': 'GetNetworkInfoResponse',\n  '2': [\n    {'1': 'network_name', '3': 1, '4': 1, '5': 9, '10': 'networkName'},\n    {\n      '1': 'connected_peers_count',\n      '3': 2,\n      '4': 1,\n      '5': 13,\n      '10': 'connectedPeersCount'\n    },\n    {\n      '1': 'metric_info',\n      '3': 4,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.MetricInfo',\n      '10': 'metricInfo'\n    },\n  ],\n};\n\n/// Descriptor for `GetNetworkInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNetworkInfoResponseDescriptor = $convert.base64Decode(\n    'ChZHZXROZXR3b3JrSW5mb1Jlc3BvbnNlEiEKDG5ldHdvcmtfbmFtZRgBIAEoCVILbmV0d29ya0'\n    '5hbWUSMgoVY29ubmVjdGVkX3BlZXJzX2NvdW50GAIgASgNUhNjb25uZWN0ZWRQZWVyc0NvdW50'\n    'EjMKC21ldHJpY19pbmZvGAQgASgLMhIucGFjdHVzLk1ldHJpY0luZm9SCm1ldHJpY0luZm8=');\n\n@$core.Deprecated('Use listPeersRequestDescriptor instead')\nconst ListPeersRequest$json = {\n  '1': 'ListPeersRequest',\n  '2': [\n    {\n      '1': 'include_disconnected',\n      '3': 1,\n      '4': 1,\n      '5': 8,\n      '10': 'includeDisconnected'\n    },\n  ],\n};\n\n/// Descriptor for `ListPeersRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listPeersRequestDescriptor = $convert.base64Decode(\n    'ChBMaXN0UGVlcnNSZXF1ZXN0EjEKFGluY2x1ZGVfZGlzY29ubmVjdGVkGAEgASgIUhNpbmNsdW'\n    'RlRGlzY29ubmVjdGVk');\n\n@$core.Deprecated('Use listPeersResponseDescriptor instead')\nconst ListPeersResponse$json = {\n  '1': 'ListPeersResponse',\n  '2': [\n    {\n      '1': 'peers',\n      '3': 1,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.PeerInfo',\n      '10': 'peers'\n    },\n  ],\n};\n\n/// Descriptor for `ListPeersResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listPeersResponseDescriptor = $convert.base64Decode(\n    'ChFMaXN0UGVlcnNSZXNwb25zZRImCgVwZWVycxgBIAMoCzIQLnBhY3R1cy5QZWVySW5mb1IFcG'\n    'VlcnM=');\n\n@$core.Deprecated('Use getNodeInfoRequestDescriptor instead')\nconst GetNodeInfoRequest$json = {\n  '1': 'GetNodeInfoRequest',\n};\n\n/// Descriptor for `GetNodeInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNodeInfoRequestDescriptor =\n    $convert.base64Decode('ChJHZXROb2RlSW5mb1JlcXVlc3Q=');\n\n@$core.Deprecated('Use getNodeInfoResponseDescriptor instead')\nconst GetNodeInfoResponse$json = {\n  '1': 'GetNodeInfoResponse',\n  '2': [\n    {'1': 'moniker', '3': 1, '4': 1, '5': 9, '10': 'moniker'},\n    {'1': 'agent', '3': 2, '4': 1, '5': 9, '10': 'agent'},\n    {'1': 'peer_id', '3': 3, '4': 1, '5': 9, '10': 'peerId'},\n    {'1': 'started_at', '3': 4, '4': 1, '5': 4, '10': 'startedAt'},\n    {'1': 'reachability', '3': 5, '4': 1, '5': 9, '10': 'reachability'},\n    {'1': 'services', '3': 6, '4': 1, '5': 5, '10': 'services'},\n    {'1': 'services_names', '3': 7, '4': 1, '5': 9, '10': 'servicesNames'},\n    {'1': 'local_addrs', '3': 8, '4': 3, '5': 9, '10': 'localAddrs'},\n    {'1': 'protocols', '3': 9, '4': 3, '5': 9, '10': 'protocols'},\n    {'1': 'clock_offset', '3': 13, '4': 1, '5': 1, '10': 'clockOffset'},\n    {\n      '1': 'connection_info',\n      '3': 14,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.ConnectionInfo',\n      '10': 'connectionInfo'\n    },\n    {\n      '1': 'zmq_publishers',\n      '3': 15,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.ZMQPublisherInfo',\n      '10': 'zmqPublishers'\n    },\n    {'1': 'current_time', '3': 16, '4': 1, '5': 4, '10': 'currentTime'},\n    {'1': 'network_name', '3': 17, '4': 1, '5': 9, '10': 'networkName'},\n  ],\n};\n\n/// Descriptor for `GetNodeInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNodeInfoResponseDescriptor = $convert.base64Decode(\n    'ChNHZXROb2RlSW5mb1Jlc3BvbnNlEhgKB21vbmlrZXIYASABKAlSB21vbmlrZXISFAoFYWdlbn'\n    'QYAiABKAlSBWFnZW50EhcKB3BlZXJfaWQYAyABKAlSBnBlZXJJZBIdCgpzdGFydGVkX2F0GAQg'\n    'ASgEUglzdGFydGVkQXQSIgoMcmVhY2hhYmlsaXR5GAUgASgJUgxyZWFjaGFiaWxpdHkSGgoIc2'\n    'VydmljZXMYBiABKAVSCHNlcnZpY2VzEiUKDnNlcnZpY2VzX25hbWVzGAcgASgJUg1zZXJ2aWNl'\n    'c05hbWVzEh8KC2xvY2FsX2FkZHJzGAggAygJUgpsb2NhbEFkZHJzEhwKCXByb3RvY29scxgJIA'\n    'MoCVIJcHJvdG9jb2xzEiEKDGNsb2NrX29mZnNldBgNIAEoAVILY2xvY2tPZmZzZXQSPwoPY29u'\n    'bmVjdGlvbl9pbmZvGA4gASgLMhYucGFjdHVzLkNvbm5lY3Rpb25JbmZvUg5jb25uZWN0aW9uSW'\n    '5mbxI/Cg56bXFfcHVibGlzaGVycxgPIAMoCzIYLnBhY3R1cy5aTVFQdWJsaXNoZXJJbmZvUg16'\n    'bXFQdWJsaXNoZXJzEiEKDGN1cnJlbnRfdGltZRgQIAEoBFILY3VycmVudFRpbWUSIQoMbmV0d2'\n    '9ya19uYW1lGBEgASgJUgtuZXR3b3JrTmFtZQ==');\n\n@$core.Deprecated('Use zMQPublisherInfoDescriptor instead')\nconst ZMQPublisherInfo$json = {\n  '1': 'ZMQPublisherInfo',\n  '2': [\n    {'1': 'topic', '3': 1, '4': 1, '5': 9, '10': 'topic'},\n    {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'hwm', '3': 3, '4': 1, '5': 5, '10': 'hwm'},\n  ],\n};\n\n/// Descriptor for `ZMQPublisherInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List zMQPublisherInfoDescriptor = $convert.base64Decode(\n    'ChBaTVFQdWJsaXNoZXJJbmZvEhQKBXRvcGljGAEgASgJUgV0b3BpYxIYCgdhZGRyZXNzGAIgAS'\n    'gJUgdhZGRyZXNzEhAKA2h3bRgDIAEoBVIDaHdt');\n\n@$core.Deprecated('Use peerInfoDescriptor instead')\nconst PeerInfo$json = {\n  '1': 'PeerInfo',\n  '2': [\n    {'1': 'status', '3': 1, '4': 1, '5': 5, '10': 'status'},\n    {'1': 'moniker', '3': 2, '4': 1, '5': 9, '10': 'moniker'},\n    {'1': 'agent', '3': 3, '4': 1, '5': 9, '10': 'agent'},\n    {'1': 'peer_id', '3': 4, '4': 1, '5': 9, '10': 'peerId'},\n    {'1': 'consensus_keys', '3': 5, '4': 3, '5': 9, '10': 'consensusKeys'},\n    {\n      '1': 'consensus_addresses',\n      '3': 6,\n      '4': 3,\n      '5': 9,\n      '10': 'consensusAddresses'\n    },\n    {'1': 'services', '3': 7, '4': 1, '5': 13, '10': 'services'},\n    {'1': 'last_block_hash', '3': 8, '4': 1, '5': 9, '10': 'lastBlockHash'},\n    {'1': 'height', '3': 9, '4': 1, '5': 13, '10': 'height'},\n    {'1': 'last_sent', '3': 10, '4': 1, '5': 3, '10': 'lastSent'},\n    {'1': 'last_received', '3': 11, '4': 1, '5': 3, '10': 'lastReceived'},\n    {'1': 'address', '3': 12, '4': 1, '5': 9, '10': 'address'},\n    {\n      '1': 'direction',\n      '3': 13,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.Direction',\n      '10': 'direction'\n    },\n    {'1': 'protocols', '3': 14, '4': 3, '5': 9, '10': 'protocols'},\n    {'1': 'total_sessions', '3': 15, '4': 1, '5': 5, '10': 'totalSessions'},\n    {\n      '1': 'completed_sessions',\n      '3': 16,\n      '4': 1,\n      '5': 5,\n      '10': 'completedSessions'\n    },\n    {\n      '1': 'metric_info',\n      '3': 17,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.MetricInfo',\n      '10': 'metricInfo'\n    },\n    {\n      '1': 'outbound_hello_sent',\n      '3': 18,\n      '4': 1,\n      '5': 8,\n      '10': 'outboundHelloSent'\n    },\n  ],\n};\n\n/// Descriptor for `PeerInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List peerInfoDescriptor = $convert.base64Decode(\n    'CghQZWVySW5mbxIWCgZzdGF0dXMYASABKAVSBnN0YXR1cxIYCgdtb25pa2VyGAIgASgJUgdtb2'\n    '5pa2VyEhQKBWFnZW50GAMgASgJUgVhZ2VudBIXCgdwZWVyX2lkGAQgASgJUgZwZWVySWQSJQoO'\n    'Y29uc2Vuc3VzX2tleXMYBSADKAlSDWNvbnNlbnN1c0tleXMSLwoTY29uc2Vuc3VzX2FkZHJlc3'\n    'NlcxgGIAMoCVISY29uc2Vuc3VzQWRkcmVzc2VzEhoKCHNlcnZpY2VzGAcgASgNUghzZXJ2aWNl'\n    'cxImCg9sYXN0X2Jsb2NrX2hhc2gYCCABKAlSDWxhc3RCbG9ja0hhc2gSFgoGaGVpZ2h0GAkgAS'\n    'gNUgZoZWlnaHQSGwoJbGFzdF9zZW50GAogASgDUghsYXN0U2VudBIjCg1sYXN0X3JlY2VpdmVk'\n    'GAsgASgDUgxsYXN0UmVjZWl2ZWQSGAoHYWRkcmVzcxgMIAEoCVIHYWRkcmVzcxIvCglkaXJlY3'\n    'Rpb24YDSABKA4yES5wYWN0dXMuRGlyZWN0aW9uUglkaXJlY3Rpb24SHAoJcHJvdG9jb2xzGA4g'\n    'AygJUglwcm90b2NvbHMSJQoOdG90YWxfc2Vzc2lvbnMYDyABKAVSDXRvdGFsU2Vzc2lvbnMSLQ'\n    'oSY29tcGxldGVkX3Nlc3Npb25zGBAgASgFUhFjb21wbGV0ZWRTZXNzaW9ucxIzCgttZXRyaWNf'\n    'aW5mbxgRIAEoCzISLnBhY3R1cy5NZXRyaWNJbmZvUgptZXRyaWNJbmZvEi4KE291dGJvdW5kX2'\n    'hlbGxvX3NlbnQYEiABKAhSEW91dGJvdW5kSGVsbG9TZW50');\n\n@$core.Deprecated('Use connectionInfoDescriptor instead')\nconst ConnectionInfo$json = {\n  '1': 'ConnectionInfo',\n  '2': [\n    {'1': 'connections', '3': 1, '4': 1, '5': 4, '10': 'connections'},\n    {\n      '1': 'inbound_connections',\n      '3': 2,\n      '4': 1,\n      '5': 4,\n      '10': 'inboundConnections'\n    },\n    {\n      '1': 'outbound_connections',\n      '3': 3,\n      '4': 1,\n      '5': 4,\n      '10': 'outboundConnections'\n    },\n  ],\n};\n\n/// Descriptor for `ConnectionInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List connectionInfoDescriptor = $convert.base64Decode(\n    'Cg5Db25uZWN0aW9uSW5mbxIgCgtjb25uZWN0aW9ucxgBIAEoBFILY29ubmVjdGlvbnMSLwoTaW'\n    '5ib3VuZF9jb25uZWN0aW9ucxgCIAEoBFISaW5ib3VuZENvbm5lY3Rpb25zEjEKFG91dGJvdW5k'\n    'X2Nvbm5lY3Rpb25zGAMgASgEUhNvdXRib3VuZENvbm5lY3Rpb25z');\n\n@$core.Deprecated('Use metricInfoDescriptor instead')\nconst MetricInfo$json = {\n  '1': 'MetricInfo',\n  '2': [\n    {\n      '1': 'total_invalid',\n      '3': 1,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CounterInfo',\n      '10': 'totalInvalid'\n    },\n    {\n      '1': 'total_sent',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CounterInfo',\n      '10': 'totalSent'\n    },\n    {\n      '1': 'total_received',\n      '3': 3,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CounterInfo',\n      '10': 'totalReceived'\n    },\n    {\n      '1': 'message_sent',\n      '3': 4,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.MetricInfo.MessageSentEntry',\n      '10': 'messageSent'\n    },\n    {\n      '1': 'message_received',\n      '3': 5,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.MetricInfo.MessageReceivedEntry',\n      '10': 'messageReceived'\n    },\n  ],\n  '3': [MetricInfo_MessageSentEntry$json, MetricInfo_MessageReceivedEntry$json],\n};\n\n@$core.Deprecated('Use metricInfoDescriptor instead')\nconst MetricInfo_MessageSentEntry$json = {\n  '1': 'MessageSentEntry',\n  '2': [\n    {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'},\n    {\n      '1': 'value',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CounterInfo',\n      '10': 'value'\n    },\n  ],\n  '7': {'7': true},\n};\n\n@$core.Deprecated('Use metricInfoDescriptor instead')\nconst MetricInfo_MessageReceivedEntry$json = {\n  '1': 'MessageReceivedEntry',\n  '2': [\n    {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'},\n    {\n      '1': 'value',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.CounterInfo',\n      '10': 'value'\n    },\n  ],\n  '7': {'7': true},\n};\n\n/// Descriptor for `MetricInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List metricInfoDescriptor = $convert.base64Decode(\n    'CgpNZXRyaWNJbmZvEjgKDXRvdGFsX2ludmFsaWQYASABKAsyEy5wYWN0dXMuQ291bnRlckluZm'\n    '9SDHRvdGFsSW52YWxpZBIyCgp0b3RhbF9zZW50GAIgASgLMhMucGFjdHVzLkNvdW50ZXJJbmZv'\n    'Ugl0b3RhbFNlbnQSOgoOdG90YWxfcmVjZWl2ZWQYAyABKAsyEy5wYWN0dXMuQ291bnRlckluZm'\n    '9SDXRvdGFsUmVjZWl2ZWQSRgoMbWVzc2FnZV9zZW50GAQgAygLMiMucGFjdHVzLk1ldHJpY0lu'\n    'Zm8uTWVzc2FnZVNlbnRFbnRyeVILbWVzc2FnZVNlbnQSUgoQbWVzc2FnZV9yZWNlaXZlZBgFIA'\n    'MoCzInLnBhY3R1cy5NZXRyaWNJbmZvLk1lc3NhZ2VSZWNlaXZlZEVudHJ5Ug9tZXNzYWdlUmVj'\n    'ZWl2ZWQaUwoQTWVzc2FnZVNlbnRFbnRyeRIQCgNrZXkYASABKAVSA2tleRIpCgV2YWx1ZRgCIA'\n    'EoCzITLnBhY3R1cy5Db3VudGVySW5mb1IFdmFsdWU6AjgBGlcKFE1lc3NhZ2VSZWNlaXZlZEVu'\n    'dHJ5EhAKA2tleRgBIAEoBVIDa2V5EikKBXZhbHVlGAIgASgLMhMucGFjdHVzLkNvdW50ZXJJbm'\n    'ZvUgV2YWx1ZToCOAE=');\n\n@$core.Deprecated('Use counterInfoDescriptor instead')\nconst CounterInfo$json = {\n  '1': 'CounterInfo',\n  '2': [\n    {'1': 'bytes', '3': 1, '4': 1, '5': 4, '10': 'bytes'},\n    {'1': 'bundles', '3': 2, '4': 1, '5': 4, '10': 'bundles'},\n  ],\n};\n\n/// Descriptor for `CounterInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List counterInfoDescriptor = $convert.base64Decode(\n    'CgtDb3VudGVySW5mbxIUCgVieXRlcxgBIAEoBFIFYnl0ZXMSGAoHYnVuZGxlcxgCIAEoBFIHYn'\n    'VuZGxlcw==');\n\n@$core.Deprecated('Use pingRequestDescriptor instead')\nconst PingRequest$json = {\n  '1': 'PingRequest',\n};\n\n/// Descriptor for `PingRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List pingRequestDescriptor =\n    $convert.base64Decode('CgtQaW5nUmVxdWVzdA==');\n\n@$core.Deprecated('Use pingResponseDescriptor instead')\nconst PingResponse$json = {\n  '1': 'PingResponse',\n};\n\n/// Descriptor for `PingResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List pingResponseDescriptor =\n    $convert.base64Decode('CgxQaW5nUmVzcG9uc2U=');\n\nconst $core.Map<$core.String, $core.dynamic> NetworkServiceBase$json = {\n  '1': 'Network',\n  '2': [\n    {\n      '1': 'GetNetworkInfo',\n      '2': '.pactus.GetNetworkInfoRequest',\n      '3': '.pactus.GetNetworkInfoResponse'\n    },\n    {\n      '1': 'ListPeers',\n      '2': '.pactus.ListPeersRequest',\n      '3': '.pactus.ListPeersResponse'\n    },\n    {\n      '1': 'GetNodeInfo',\n      '2': '.pactus.GetNodeInfoRequest',\n      '3': '.pactus.GetNodeInfoResponse'\n    },\n    {'1': 'Ping', '2': '.pactus.PingRequest', '3': '.pactus.PingResponse'},\n  ],\n};\n\n@$core.Deprecated('Use networkServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    NetworkServiceBase$messageJson = {\n  '.pactus.GetNetworkInfoRequest': GetNetworkInfoRequest$json,\n  '.pactus.GetNetworkInfoResponse': GetNetworkInfoResponse$json,\n  '.pactus.MetricInfo': MetricInfo$json,\n  '.pactus.CounterInfo': CounterInfo$json,\n  '.pactus.MetricInfo.MessageSentEntry': MetricInfo_MessageSentEntry$json,\n  '.pactus.MetricInfo.MessageReceivedEntry':\n      MetricInfo_MessageReceivedEntry$json,\n  '.pactus.ListPeersRequest': ListPeersRequest$json,\n  '.pactus.ListPeersResponse': ListPeersResponse$json,\n  '.pactus.PeerInfo': PeerInfo$json,\n  '.pactus.GetNodeInfoRequest': GetNodeInfoRequest$json,\n  '.pactus.GetNodeInfoResponse': GetNodeInfoResponse$json,\n  '.pactus.ConnectionInfo': ConnectionInfo$json,\n  '.pactus.ZMQPublisherInfo': ZMQPublisherInfo$json,\n  '.pactus.PingRequest': PingRequest$json,\n  '.pactus.PingResponse': PingResponse$json,\n};\n\n/// Descriptor for `Network`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List networkServiceDescriptor = $convert.base64Decode(\n    'CgdOZXR3b3JrEk8KDkdldE5ldHdvcmtJbmZvEh0ucGFjdHVzLkdldE5ldHdvcmtJbmZvUmVxdW'\n    'VzdBoeLnBhY3R1cy5HZXROZXR3b3JrSW5mb1Jlc3BvbnNlEkAKCUxpc3RQZWVycxIYLnBhY3R1'\n    'cy5MaXN0UGVlcnNSZXF1ZXN0GhkucGFjdHVzLkxpc3RQZWVyc1Jlc3BvbnNlEkYKC0dldE5vZG'\n    'VJbmZvEhoucGFjdHVzLkdldE5vZGVJbmZvUmVxdWVzdBobLnBhY3R1cy5HZXROb2RlSW5mb1Jl'\n    'c3BvbnNlEjEKBFBpbmcSEy5wYWN0dXMuUGluZ1JlcXVlc3QaFC5wYWN0dXMuUGluZ1Jlc3Bvbn'\n    'Nl');\n"
  },
  {
    "path": "www/grpc/gen/dart/network.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from network.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'network.pb.dart' as $0;\nimport 'network.pbjson.dart';\n\nexport 'network.pb.dart';\n\nabstract class NetworkServiceBase extends $pb.GeneratedService {\n  $async.Future<$0.GetNetworkInfoResponse> getNetworkInfo(\n      $pb.ServerContext ctx, $0.GetNetworkInfoRequest request);\n  $async.Future<$0.ListPeersResponse> listPeers(\n      $pb.ServerContext ctx, $0.ListPeersRequest request);\n  $async.Future<$0.GetNodeInfoResponse> getNodeInfo(\n      $pb.ServerContext ctx, $0.GetNodeInfoRequest request);\n  $async.Future<$0.PingResponse> ping(\n      $pb.ServerContext ctx, $0.PingRequest request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'GetNetworkInfo':\n        return $0.GetNetworkInfoRequest();\n      case 'ListPeers':\n        return $0.ListPeersRequest();\n      case 'GetNodeInfo':\n        return $0.GetNodeInfoRequest();\n      case 'Ping':\n        return $0.PingRequest();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'GetNetworkInfo':\n        return getNetworkInfo(ctx, request as $0.GetNetworkInfoRequest);\n      case 'ListPeers':\n        return listPeers(ctx, request as $0.ListPeersRequest);\n      case 'GetNodeInfo':\n        return getNodeInfo(ctx, request as $0.GetNodeInfoRequest);\n      case 'Ping':\n        return ping(ctx, request as $0.PingRequest);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json => NetworkServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => NetworkServiceBase$messageJson;\n}\n"
  },
  {
    "path": "www/grpc/gen/dart/transaction.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from transaction.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'transaction.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'transaction.pbenum.dart';\n\n/// Request message for retrieving transaction details.\nclass GetTransactionRequest extends $pb.GeneratedMessage {\n  factory GetTransactionRequest({\n    $core.String? id,\n    TransactionVerbosity? verbosity,\n  }) {\n    final result = create();\n    if (id != null) result.id = id;\n    if (verbosity != null) result.verbosity = verbosity;\n    return result;\n  }\n\n  GetTransactionRequest._();\n\n  factory GetTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'id')\n    ..aE<TransactionVerbosity>(2, _omitFieldNames ? '' : 'verbosity',\n        enumValues: TransactionVerbosity.values)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTransactionRequest copyWith(\n          void Function(GetTransactionRequest) updates) =>\n      super.copyWith((message) => updates(message as GetTransactionRequest))\n          as GetTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTransactionRequest create() => GetTransactionRequest._();\n  @$core.override\n  GetTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTransactionRequest>(create);\n  static GetTransactionRequest? _defaultInstance;\n\n  /// The unique ID of the transaction to retrieve.\n  @$pb.TagNumber(1)\n  $core.String get id => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set id($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasId() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearId() => $_clearField(1);\n\n  /// The verbosity level for transaction details.\n  @$pb.TagNumber(2)\n  TransactionVerbosity get verbosity => $_getN(1);\n  @$pb.TagNumber(2)\n  set verbosity(TransactionVerbosity value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasVerbosity() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearVerbosity() => $_clearField(2);\n}\n\n/// Response message contains details of a transaction.\nclass GetTransactionResponse extends $pb.GeneratedMessage {\n  factory GetTransactionResponse({\n    $core.int? blockHeight,\n    $core.int? blockTime,\n    TransactionInfo? transaction,\n  }) {\n    final result = create();\n    if (blockHeight != null) result.blockHeight = blockHeight;\n    if (blockTime != null) result.blockTime = blockTime;\n    if (transaction != null) result.transaction = transaction;\n    return result;\n  }\n\n  GetTransactionResponse._();\n\n  factory GetTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'blockHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aI(2, _omitFieldNames ? '' : 'blockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOM<TransactionInfo>(3, _omitFieldNames ? '' : 'transaction',\n        subBuilder: TransactionInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTransactionResponse copyWith(\n          void Function(GetTransactionResponse) updates) =>\n      super.copyWith((message) => updates(message as GetTransactionResponse))\n          as GetTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTransactionResponse create() => GetTransactionResponse._();\n  @$core.override\n  GetTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTransactionResponse>(create);\n  static GetTransactionResponse? _defaultInstance;\n\n  /// The height of the block containing the transaction.\n  @$pb.TagNumber(1)\n  $core.int get blockHeight => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set blockHeight($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasBlockHeight() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearBlockHeight() => $_clearField(1);\n\n  /// The UNIX timestamp of the block containing the transaction.\n  @$pb.TagNumber(2)\n  $core.int get blockTime => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set blockTime($core.int value) => $_setUnsignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasBlockTime() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearBlockTime() => $_clearField(2);\n\n  /// Detailed information about the transaction.\n  @$pb.TagNumber(3)\n  TransactionInfo get transaction => $_getN(2);\n  @$pb.TagNumber(3)\n  set transaction(TransactionInfo value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasTransaction() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearTransaction() => $_clearField(3);\n  @$pb.TagNumber(3)\n  TransactionInfo ensureTransaction() => $_ensure(2);\n}\n\n/// Request message for calculating transaction fee.\nclass CalculateFeeRequest extends $pb.GeneratedMessage {\n  factory CalculateFeeRequest({\n    $fixnum.Int64? amount,\n    PayloadType? payloadType,\n    $core.bool? fixedAmount,\n  }) {\n    final result = create();\n    if (amount != null) result.amount = amount;\n    if (payloadType != null) result.payloadType = payloadType;\n    if (fixedAmount != null) result.fixedAmount = fixedAmount;\n    return result;\n  }\n\n  CalculateFeeRequest._();\n\n  factory CalculateFeeRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CalculateFeeRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CalculateFeeRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aInt64(1, _omitFieldNames ? '' : 'amount')\n    ..aE<PayloadType>(2, _omitFieldNames ? '' : 'payloadType',\n        enumValues: PayloadType.values)\n    ..aOB(3, _omitFieldNames ? '' : 'fixedAmount')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CalculateFeeRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CalculateFeeRequest copyWith(void Function(CalculateFeeRequest) updates) =>\n      super.copyWith((message) => updates(message as CalculateFeeRequest))\n          as CalculateFeeRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CalculateFeeRequest create() => CalculateFeeRequest._();\n  @$core.override\n  CalculateFeeRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CalculateFeeRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CalculateFeeRequest>(create);\n  static CalculateFeeRequest? _defaultInstance;\n\n  /// The amount involved in the transaction, specified in NanoPAC.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get amount => $_getI64(0);\n  @$pb.TagNumber(1)\n  set amount($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAmount() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAmount() => $_clearField(1);\n\n  /// The type of transaction payload.\n  @$pb.TagNumber(2)\n  PayloadType get payloadType => $_getN(1);\n  @$pb.TagNumber(2)\n  set payloadType(PayloadType value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPayloadType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPayloadType() => $_clearField(2);\n\n  /// Indicates if the amount should be fixed and include the fee.\n  @$pb.TagNumber(3)\n  $core.bool get fixedAmount => $_getBF(2);\n  @$pb.TagNumber(3)\n  set fixedAmount($core.bool value) => $_setBool(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasFixedAmount() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearFixedAmount() => $_clearField(3);\n}\n\n/// Response message contains the calculated transaction fee.\nclass CalculateFeeResponse extends $pb.GeneratedMessage {\n  factory CalculateFeeResponse({\n    $fixnum.Int64? amount,\n    $fixnum.Int64? fee,\n  }) {\n    final result = create();\n    if (amount != null) result.amount = amount;\n    if (fee != null) result.fee = fee;\n    return result;\n  }\n\n  CalculateFeeResponse._();\n\n  factory CalculateFeeResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CalculateFeeResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CalculateFeeResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aInt64(1, _omitFieldNames ? '' : 'amount')\n    ..aInt64(2, _omitFieldNames ? '' : 'fee')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CalculateFeeResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CalculateFeeResponse copyWith(void Function(CalculateFeeResponse) updates) =>\n      super.copyWith((message) => updates(message as CalculateFeeResponse))\n          as CalculateFeeResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CalculateFeeResponse create() => CalculateFeeResponse._();\n  @$core.override\n  CalculateFeeResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CalculateFeeResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CalculateFeeResponse>(create);\n  static CalculateFeeResponse? _defaultInstance;\n\n  /// The calculated amount in NanoPAC.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get amount => $_getI64(0);\n  @$pb.TagNumber(1)\n  set amount($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAmount() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAmount() => $_clearField(1);\n\n  /// The calculated transaction fee in NanoPAC.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get fee => $_getI64(1);\n  @$pb.TagNumber(2)\n  set fee($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasFee() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearFee() => $_clearField(2);\n}\n\n/// Request message for broadcasting a signed transaction to the network.\nclass BroadcastTransactionRequest extends $pb.GeneratedMessage {\n  factory BroadcastTransactionRequest({\n    $core.String? signedRawTransaction,\n  }) {\n    final result = create();\n    if (signedRawTransaction != null)\n      result.signedRawTransaction = signedRawTransaction;\n    return result;\n  }\n\n  BroadcastTransactionRequest._();\n\n  factory BroadcastTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory BroadcastTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'BroadcastTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'signedRawTransaction')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BroadcastTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BroadcastTransactionRequest copyWith(\n          void Function(BroadcastTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as BroadcastTransactionRequest))\n          as BroadcastTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static BroadcastTransactionRequest create() =>\n      BroadcastTransactionRequest._();\n  @$core.override\n  BroadcastTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static BroadcastTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<BroadcastTransactionRequest>(create);\n  static BroadcastTransactionRequest? _defaultInstance;\n\n  /// The signed raw transaction data to be broadcasted.\n  @$pb.TagNumber(1)\n  $core.String get signedRawTransaction => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set signedRawTransaction($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSignedRawTransaction() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSignedRawTransaction() => $_clearField(1);\n}\n\n/// Response message contains the ID of the broadcasted transaction.\nclass BroadcastTransactionResponse extends $pb.GeneratedMessage {\n  factory BroadcastTransactionResponse({\n    $core.String? id,\n  }) {\n    final result = create();\n    if (id != null) result.id = id;\n    return result;\n  }\n\n  BroadcastTransactionResponse._();\n\n  factory BroadcastTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory BroadcastTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'BroadcastTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'id')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BroadcastTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  BroadcastTransactionResponse copyWith(\n          void Function(BroadcastTransactionResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as BroadcastTransactionResponse))\n          as BroadcastTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static BroadcastTransactionResponse create() =>\n      BroadcastTransactionResponse._();\n  @$core.override\n  BroadcastTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static BroadcastTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<BroadcastTransactionResponse>(create);\n  static BroadcastTransactionResponse? _defaultInstance;\n\n  /// The unique ID of the broadcasted transaction.\n  @$pb.TagNumber(1)\n  $core.String get id => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set id($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasId() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearId() => $_clearField(1);\n}\n\n/// Request message for retrieving raw details of a transfer transaction.\nclass GetRawTransferTransactionRequest extends $pb.GeneratedMessage {\n  factory GetRawTransferTransactionRequest({\n    $core.int? lockTime,\n    $core.String? sender,\n    $core.String? receiver,\n    $fixnum.Int64? amount,\n    $fixnum.Int64? fee,\n    $core.String? memo,\n  }) {\n    final result = create();\n    if (lockTime != null) result.lockTime = lockTime;\n    if (sender != null) result.sender = sender;\n    if (receiver != null) result.receiver = receiver;\n    if (amount != null) result.amount = amount;\n    if (fee != null) result.fee = fee;\n    if (memo != null) result.memo = memo;\n    return result;\n  }\n\n  GetRawTransferTransactionRequest._();\n\n  factory GetRawTransferTransactionRequest.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawTransferTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawTransferTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'sender')\n    ..aOS(3, _omitFieldNames ? '' : 'receiver')\n    ..aInt64(4, _omitFieldNames ? '' : 'amount')\n    ..aInt64(5, _omitFieldNames ? '' : 'fee')\n    ..aOS(6, _omitFieldNames ? '' : 'memo')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawTransferTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawTransferTransactionRequest copyWith(\n          void Function(GetRawTransferTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetRawTransferTransactionRequest))\n          as GetRawTransferTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawTransferTransactionRequest create() =>\n      GetRawTransferTransactionRequest._();\n  @$core.override\n  GetRawTransferTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawTransferTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetRawTransferTransactionRequest>(\n          create);\n  static GetRawTransferTransactionRequest? _defaultInstance;\n\n  /// The lock time for the transaction. If not set, defaults to the last block height.\n  @$pb.TagNumber(1)\n  $core.int get lockTime => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lockTime($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLockTime() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLockTime() => $_clearField(1);\n\n  /// The sender's account address.\n  @$pb.TagNumber(2)\n  $core.String get sender => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set sender($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSender() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSender() => $_clearField(2);\n\n  /// The receiver's account address.\n  @$pb.TagNumber(3)\n  $core.String get receiver => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set receiver($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasReceiver() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearReceiver() => $_clearField(3);\n\n  /// The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get amount => $_getI64(3);\n  @$pb.TagNumber(4)\n  set amount($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasAmount() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearAmount() => $_clearField(4);\n\n  /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get fee => $_getI64(4);\n  @$pb.TagNumber(5)\n  set fee($fixnum.Int64 value) => $_setInt64(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasFee() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearFee() => $_clearField(5);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(6)\n  $core.String get memo => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set memo($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasMemo() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearMemo() => $_clearField(6);\n}\n\n/// Request message for retrieving raw details of a bond transaction.\nclass GetRawBondTransactionRequest extends $pb.GeneratedMessage {\n  factory GetRawBondTransactionRequest({\n    $core.int? lockTime,\n    $core.String? sender,\n    $core.String? receiver,\n    $fixnum.Int64? stake,\n    $core.String? publicKey,\n    $fixnum.Int64? fee,\n    $core.String? memo,\n    $core.String? delegateOwner,\n    $fixnum.Int64? delegateShare,\n    $core.int? delegateExpiry,\n  }) {\n    final result = create();\n    if (lockTime != null) result.lockTime = lockTime;\n    if (sender != null) result.sender = sender;\n    if (receiver != null) result.receiver = receiver;\n    if (stake != null) result.stake = stake;\n    if (publicKey != null) result.publicKey = publicKey;\n    if (fee != null) result.fee = fee;\n    if (memo != null) result.memo = memo;\n    if (delegateOwner != null) result.delegateOwner = delegateOwner;\n    if (delegateShare != null) result.delegateShare = delegateShare;\n    if (delegateExpiry != null) result.delegateExpiry = delegateExpiry;\n    return result;\n  }\n\n  GetRawBondTransactionRequest._();\n\n  factory GetRawBondTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawBondTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawBondTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'sender')\n    ..aOS(3, _omitFieldNames ? '' : 'receiver')\n    ..aInt64(4, _omitFieldNames ? '' : 'stake')\n    ..aOS(5, _omitFieldNames ? '' : 'publicKey')\n    ..aInt64(6, _omitFieldNames ? '' : 'fee')\n    ..aOS(7, _omitFieldNames ? '' : 'memo')\n    ..aOS(8, _omitFieldNames ? '' : 'delegateOwner')\n    ..aInt64(9, _omitFieldNames ? '' : 'delegateShare')\n    ..aI(10, _omitFieldNames ? '' : 'delegateExpiry',\n        fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawBondTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawBondTransactionRequest copyWith(\n          void Function(GetRawBondTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetRawBondTransactionRequest))\n          as GetRawBondTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawBondTransactionRequest create() =>\n      GetRawBondTransactionRequest._();\n  @$core.override\n  GetRawBondTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawBondTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetRawBondTransactionRequest>(create);\n  static GetRawBondTransactionRequest? _defaultInstance;\n\n  /// The lock time for the transaction. If not set, defaults to the last block height.\n  @$pb.TagNumber(1)\n  $core.int get lockTime => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lockTime($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLockTime() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLockTime() => $_clearField(1);\n\n  /// The sender's account address.\n  @$pb.TagNumber(2)\n  $core.String get sender => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set sender($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSender() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSender() => $_clearField(2);\n\n  /// The receiver's validator address.\n  @$pb.TagNumber(3)\n  $core.String get receiver => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set receiver($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasReceiver() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearReceiver() => $_clearField(3);\n\n  /// The stake amount in NanoPAC. Must be greater than 0.\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get stake => $_getI64(3);\n  @$pb.TagNumber(4)\n  set stake($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasStake() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearStake() => $_clearField(4);\n\n  /// The public key of the validator.\n  /// Optional, but required when registering a new validator.;\n  @$pb.TagNumber(5)\n  $core.String get publicKey => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set publicKey($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasPublicKey() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearPublicKey() => $_clearField(5);\n\n  /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  @$pb.TagNumber(6)\n  $fixnum.Int64 get fee => $_getI64(5);\n  @$pb.TagNumber(6)\n  set fee($fixnum.Int64 value) => $_setInt64(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasFee() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearFee() => $_clearField(6);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(7)\n  $core.String get memo => $_getSZ(6);\n  @$pb.TagNumber(7)\n  set memo($core.String value) => $_setString(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasMemo() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearMemo() => $_clearField(7);\n\n  /// The address of the delegate owner.\n  /// Optional, but required when registering a new validator with delegation.;\n  @$pb.TagNumber(8)\n  $core.String get delegateOwner => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set delegateOwner($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasDelegateOwner() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearDelegateOwner() => $_clearField(8);\n\n  /// The share percentage for the delegate owner.\n  /// Optional, but required when registering a new validator with delegation.;\n  /// Must be between 0 and 0.7 PAC in nano PAC.\n  @$pb.TagNumber(9)\n  $fixnum.Int64 get delegateShare => $_getI64(8);\n  @$pb.TagNumber(9)\n  set delegateShare($fixnum.Int64 value) => $_setInt64(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasDelegateShare() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearDelegateShare() => $_clearField(9);\n\n  /// The expiry height for the delegate relationship.\n  /// Optional, but required when registering a new validator with delegation.;\n  @$pb.TagNumber(10)\n  $core.int get delegateExpiry => $_getIZ(9);\n  @$pb.TagNumber(10)\n  set delegateExpiry($core.int value) => $_setUnsignedInt32(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasDelegateExpiry() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearDelegateExpiry() => $_clearField(10);\n}\n\n/// Request message for retrieving raw details of an unbond transaction.\nclass GetRawUnbondTransactionRequest extends $pb.GeneratedMessage {\n  factory GetRawUnbondTransactionRequest({\n    $core.int? lockTime,\n    $core.String? validatorAddress,\n    $core.String? memo,\n    $core.String? delegateOwner,\n  }) {\n    final result = create();\n    if (lockTime != null) result.lockTime = lockTime;\n    if (validatorAddress != null) result.validatorAddress = validatorAddress;\n    if (memo != null) result.memo = memo;\n    if (delegateOwner != null) result.delegateOwner = delegateOwner;\n    return result;\n  }\n\n  GetRawUnbondTransactionRequest._();\n\n  factory GetRawUnbondTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawUnbondTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawUnbondTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'validatorAddress')\n    ..aOS(3, _omitFieldNames ? '' : 'memo')\n    ..aOS(4, _omitFieldNames ? '' : 'delegateOwner')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawUnbondTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawUnbondTransactionRequest copyWith(\n          void Function(GetRawUnbondTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetRawUnbondTransactionRequest))\n          as GetRawUnbondTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawUnbondTransactionRequest create() =>\n      GetRawUnbondTransactionRequest._();\n  @$core.override\n  GetRawUnbondTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawUnbondTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetRawUnbondTransactionRequest>(create);\n  static GetRawUnbondTransactionRequest? _defaultInstance;\n\n  /// The lock time for the transaction. If not set, defaults to the last block height.\n  @$pb.TagNumber(1)\n  $core.int get lockTime => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lockTime($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLockTime() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLockTime() => $_clearField(1);\n\n  /// The address of the validator to unbond from.\n  @$pb.TagNumber(2)\n  $core.String get validatorAddress => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set validatorAddress($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasValidatorAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearValidatorAddress() => $_clearField(2);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(3)\n  $core.String get memo => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set memo($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasMemo() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearMemo() => $_clearField(3);\n\n  /// The address of the delegate owner.\n  /// Optional, but required when the validator is a delegated validator.;\n  @$pb.TagNumber(4)\n  $core.String get delegateOwner => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set delegateOwner($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasDelegateOwner() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearDelegateOwner() => $_clearField(4);\n}\n\n/// Request message for retrieving raw details of a withdraw transaction.\nclass GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage {\n  factory GetRawWithdrawTransactionRequest({\n    $core.int? lockTime,\n    $core.String? validatorAddress,\n    $core.String? accountAddress,\n    $fixnum.Int64? amount,\n    $fixnum.Int64? fee,\n    $core.String? memo,\n  }) {\n    final result = create();\n    if (lockTime != null) result.lockTime = lockTime;\n    if (validatorAddress != null) result.validatorAddress = validatorAddress;\n    if (accountAddress != null) result.accountAddress = accountAddress;\n    if (amount != null) result.amount = amount;\n    if (fee != null) result.fee = fee;\n    if (memo != null) result.memo = memo;\n    return result;\n  }\n\n  GetRawWithdrawTransactionRequest._();\n\n  factory GetRawWithdrawTransactionRequest.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawWithdrawTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawWithdrawTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'validatorAddress')\n    ..aOS(3, _omitFieldNames ? '' : 'accountAddress')\n    ..aInt64(4, _omitFieldNames ? '' : 'amount')\n    ..aInt64(5, _omitFieldNames ? '' : 'fee')\n    ..aOS(6, _omitFieldNames ? '' : 'memo')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawWithdrawTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawWithdrawTransactionRequest copyWith(\n          void Function(GetRawWithdrawTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetRawWithdrawTransactionRequest))\n          as GetRawWithdrawTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawWithdrawTransactionRequest create() =>\n      GetRawWithdrawTransactionRequest._();\n  @$core.override\n  GetRawWithdrawTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawWithdrawTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetRawWithdrawTransactionRequest>(\n          create);\n  static GetRawWithdrawTransactionRequest? _defaultInstance;\n\n  /// The lock time for the transaction. If not set, defaults to the last block height.\n  @$pb.TagNumber(1)\n  $core.int get lockTime => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lockTime($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLockTime() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLockTime() => $_clearField(1);\n\n  /// The address of the validator to withdraw from.\n  @$pb.TagNumber(2)\n  $core.String get validatorAddress => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set validatorAddress($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasValidatorAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearValidatorAddress() => $_clearField(2);\n\n  /// The address of the account to withdraw to.\n  @$pb.TagNumber(3)\n  $core.String get accountAddress => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set accountAddress($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAccountAddress() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAccountAddress() => $_clearField(3);\n\n  /// The withdrawal amount in NanoPAC. Must be greater than 0.\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get amount => $_getI64(3);\n  @$pb.TagNumber(4)\n  set amount($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasAmount() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearAmount() => $_clearField(4);\n\n  /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get fee => $_getI64(4);\n  @$pb.TagNumber(5)\n  set fee($fixnum.Int64 value) => $_setInt64(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasFee() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearFee() => $_clearField(5);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(6)\n  $core.String get memo => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set memo($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasMemo() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearMemo() => $_clearField(6);\n}\n\n/// Request message for retrieving raw details of a batch transfer transaction.\nclass GetRawBatchTransferTransactionRequest extends $pb.GeneratedMessage {\n  factory GetRawBatchTransferTransactionRequest({\n    $core.int? lockTime,\n    $core.String? sender,\n    $core.Iterable<Recipient>? recipients,\n    $fixnum.Int64? fee,\n    $core.String? memo,\n  }) {\n    final result = create();\n    if (lockTime != null) result.lockTime = lockTime;\n    if (sender != null) result.sender = sender;\n    if (recipients != null) result.recipients.addAll(recipients);\n    if (fee != null) result.fee = fee;\n    if (memo != null) result.memo = memo;\n    return result;\n  }\n\n  GetRawBatchTransferTransactionRequest._();\n\n  factory GetRawBatchTransferTransactionRequest.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawBatchTransferTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawBatchTransferTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aI(1, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aOS(2, _omitFieldNames ? '' : 'sender')\n    ..pPM<Recipient>(3, _omitFieldNames ? '' : 'recipients',\n        subBuilder: Recipient.create)\n    ..aInt64(4, _omitFieldNames ? '' : 'fee')\n    ..aOS(5, _omitFieldNames ? '' : 'memo')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawBatchTransferTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawBatchTransferTransactionRequest copyWith(\n          void Function(GetRawBatchTransferTransactionRequest) updates) =>\n      super.copyWith((message) =>\n              updates(message as GetRawBatchTransferTransactionRequest))\n          as GetRawBatchTransferTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawBatchTransferTransactionRequest create() =>\n      GetRawBatchTransferTransactionRequest._();\n  @$core.override\n  GetRawBatchTransferTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawBatchTransferTransactionRequest getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<\n          GetRawBatchTransferTransactionRequest>(create);\n  static GetRawBatchTransferTransactionRequest? _defaultInstance;\n\n  /// The lock time for the transaction. If not set, defaults to the last block height.\n  @$pb.TagNumber(1)\n  $core.int get lockTime => $_getIZ(0);\n  @$pb.TagNumber(1)\n  set lockTime($core.int value) => $_setUnsignedInt32(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasLockTime() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearLockTime() => $_clearField(1);\n\n  /// The sender's account address.\n  @$pb.TagNumber(2)\n  $core.String get sender => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set sender($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSender() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSender() => $_clearField(2);\n\n  /// The list of recipients with their amounts. Minimum 2 recipients required.\n  @$pb.TagNumber(3)\n  $pb.PbList<Recipient> get recipients => $_getList(2);\n\n  /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  @$pb.TagNumber(4)\n  $fixnum.Int64 get fee => $_getI64(3);\n  @$pb.TagNumber(4)\n  set fee($fixnum.Int64 value) => $_setInt64(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasFee() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearFee() => $_clearField(4);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(5)\n  $core.String get memo => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set memo($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasMemo() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearMemo() => $_clearField(5);\n}\n\n/// Response message contains raw transaction data.\nclass GetRawTransactionResponse extends $pb.GeneratedMessage {\n  factory GetRawTransactionResponse({\n    $core.String? rawTransaction,\n    $core.String? id,\n  }) {\n    final result = create();\n    if (rawTransaction != null) result.rawTransaction = rawTransaction;\n    if (id != null) result.id = id;\n    return result;\n  }\n\n  GetRawTransactionResponse._();\n\n  factory GetRawTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetRawTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetRawTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'rawTransaction')\n    ..aOS(2, _omitFieldNames ? '' : 'id')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetRawTransactionResponse copyWith(\n          void Function(GetRawTransactionResponse) updates) =>\n      super.copyWith((message) => updates(message as GetRawTransactionResponse))\n          as GetRawTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetRawTransactionResponse create() => GetRawTransactionResponse._();\n  @$core.override\n  GetRawTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetRawTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetRawTransactionResponse>(create);\n  static GetRawTransactionResponse? _defaultInstance;\n\n  /// The raw transaction data in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get rawTransaction => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set rawTransaction($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasRawTransaction() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearRawTransaction() => $_clearField(1);\n\n  /// The unique ID of the transaction.\n  @$pb.TagNumber(2)\n  $core.String get id => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set id($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasId() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearId() => $_clearField(2);\n}\n\n/// Payload for a transfer transaction.\nclass PayloadTransfer extends $pb.GeneratedMessage {\n  factory PayloadTransfer({\n    $core.String? sender,\n    $core.String? receiver,\n    $fixnum.Int64? amount,\n  }) {\n    final result = create();\n    if (sender != null) result.sender = sender;\n    if (receiver != null) result.receiver = receiver;\n    if (amount != null) result.amount = amount;\n    return result;\n  }\n\n  PayloadTransfer._();\n\n  factory PayloadTransfer.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadTransfer.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadTransfer',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'sender')\n    ..aOS(2, _omitFieldNames ? '' : 'receiver')\n    ..aInt64(3, _omitFieldNames ? '' : 'amount')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadTransfer clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadTransfer copyWith(void Function(PayloadTransfer) updates) =>\n      super.copyWith((message) => updates(message as PayloadTransfer))\n          as PayloadTransfer;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadTransfer create() => PayloadTransfer._();\n  @$core.override\n  PayloadTransfer createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadTransfer getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadTransfer>(create);\n  static PayloadTransfer? _defaultInstance;\n\n  /// The sender's address.\n  @$pb.TagNumber(1)\n  $core.String get sender => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set sender($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSender() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSender() => $_clearField(1);\n\n  /// The receiver's address.\n  @$pb.TagNumber(2)\n  $core.String get receiver => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set receiver($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasReceiver() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearReceiver() => $_clearField(2);\n\n  /// The amount to be transferred in NanoPAC.\n  @$pb.TagNumber(3)\n  $fixnum.Int64 get amount => $_getI64(2);\n  @$pb.TagNumber(3)\n  set amount($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAmount() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAmount() => $_clearField(3);\n}\n\n/// Payload for a bond transaction.\nclass PayloadBond extends $pb.GeneratedMessage {\n  factory PayloadBond({\n    $core.String? sender,\n    $core.String? receiver,\n    $fixnum.Int64? stake,\n    $core.String? publicKey,\n    $core.bool? isDelegated,\n    $core.String? delegateOwner,\n    $fixnum.Int64? delegateShare,\n    $core.int? delegateExpiry,\n  }) {\n    final result = create();\n    if (sender != null) result.sender = sender;\n    if (receiver != null) result.receiver = receiver;\n    if (stake != null) result.stake = stake;\n    if (publicKey != null) result.publicKey = publicKey;\n    if (isDelegated != null) result.isDelegated = isDelegated;\n    if (delegateOwner != null) result.delegateOwner = delegateOwner;\n    if (delegateShare != null) result.delegateShare = delegateShare;\n    if (delegateExpiry != null) result.delegateExpiry = delegateExpiry;\n    return result;\n  }\n\n  PayloadBond._();\n\n  factory PayloadBond.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadBond.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadBond',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'sender')\n    ..aOS(2, _omitFieldNames ? '' : 'receiver')\n    ..aInt64(3, _omitFieldNames ? '' : 'stake')\n    ..aOS(4, _omitFieldNames ? '' : 'publicKey')\n    ..aOB(5, _omitFieldNames ? '' : 'isDelegated')\n    ..aOS(6, _omitFieldNames ? '' : 'delegateOwner')\n    ..aInt64(7, _omitFieldNames ? '' : 'delegateShare')\n    ..aI(8, _omitFieldNames ? '' : 'delegateExpiry',\n        fieldType: $pb.PbFieldType.OU3)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadBond clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadBond copyWith(void Function(PayloadBond) updates) =>\n      super.copyWith((message) => updates(message as PayloadBond))\n          as PayloadBond;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadBond create() => PayloadBond._();\n  @$core.override\n  PayloadBond createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadBond getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadBond>(create);\n  static PayloadBond? _defaultInstance;\n\n  /// The sender's address.\n  @$pb.TagNumber(1)\n  $core.String get sender => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set sender($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSender() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSender() => $_clearField(1);\n\n  /// The receiver's address.\n  @$pb.TagNumber(2)\n  $core.String get receiver => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set receiver($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasReceiver() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearReceiver() => $_clearField(2);\n\n  /// The stake amount in NanoPAC.\n  @$pb.TagNumber(3)\n  $fixnum.Int64 get stake => $_getI64(2);\n  @$pb.TagNumber(3)\n  set stake($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasStake() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearStake() => $_clearField(3);\n\n  /// The public key of the validator.\n  @$pb.TagNumber(4)\n  $core.String get publicKey => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set publicKey($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPublicKey() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearPublicKey() => $_clearField(4);\n\n  /// Indicates whether the bond transaction is a delegation.\n  @$pb.TagNumber(5)\n  $core.bool get isDelegated => $_getBF(4);\n  @$pb.TagNumber(5)\n  set isDelegated($core.bool value) => $_setBool(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasIsDelegated() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearIsDelegated() => $_clearField(5);\n\n  /// The address of the delegate owner.\n  /// Optional, but required when registering a new validator with delegation.;\n  @$pb.TagNumber(6)\n  $core.String get delegateOwner => $_getSZ(5);\n  @$pb.TagNumber(6)\n  set delegateOwner($core.String value) => $_setString(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasDelegateOwner() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearDelegateOwner() => $_clearField(6);\n\n  /// The share percentage for the delegate owner.\n  /// Optional, but required when registering a new validator with delegation.;\n  /// Must be between 0 and 0.7 PAC in nano PAC.\n  @$pb.TagNumber(7)\n  $fixnum.Int64 get delegateShare => $_getI64(6);\n  @$pb.TagNumber(7)\n  set delegateShare($fixnum.Int64 value) => $_setInt64(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasDelegateShare() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearDelegateShare() => $_clearField(7);\n\n  /// The expiry height for the delegate relationship.\n  /// Optional, but required when registering a new validator with delegation.;\n  @$pb.TagNumber(8)\n  $core.int get delegateExpiry => $_getIZ(7);\n  @$pb.TagNumber(8)\n  set delegateExpiry($core.int value) => $_setUnsignedInt32(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasDelegateExpiry() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearDelegateExpiry() => $_clearField(8);\n}\n\n/// Payload for a sortition transaction.\nclass PayloadSortition extends $pb.GeneratedMessage {\n  factory PayloadSortition({\n    $core.String? address,\n    $core.String? proof,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    if (proof != null) result.proof = proof;\n    return result;\n  }\n\n  PayloadSortition._();\n\n  factory PayloadSortition.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadSortition.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadSortition',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..aOS(2, _omitFieldNames ? '' : 'proof')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadSortition clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadSortition copyWith(void Function(PayloadSortition) updates) =>\n      super.copyWith((message) => updates(message as PayloadSortition))\n          as PayloadSortition;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadSortition create() => PayloadSortition._();\n  @$core.override\n  PayloadSortition createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadSortition getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadSortition>(create);\n  static PayloadSortition? _defaultInstance;\n\n  /// The validator address associated with the sortition proof.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n\n  /// The proof for the sortition.\n  @$pb.TagNumber(2)\n  $core.String get proof => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set proof($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasProof() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearProof() => $_clearField(2);\n}\n\n/// Payload for an unbond transaction.\nclass PayloadUnbond extends $pb.GeneratedMessage {\n  factory PayloadUnbond({\n    $core.String? validator,\n    $core.String? delegateOwner,\n  }) {\n    final result = create();\n    if (validator != null) result.validator = validator;\n    if (delegateOwner != null) result.delegateOwner = delegateOwner;\n    return result;\n  }\n\n  PayloadUnbond._();\n\n  factory PayloadUnbond.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadUnbond.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadUnbond',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'validator')\n    ..aOS(2, _omitFieldNames ? '' : 'delegateOwner')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadUnbond clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadUnbond copyWith(void Function(PayloadUnbond) updates) =>\n      super.copyWith((message) => updates(message as PayloadUnbond))\n          as PayloadUnbond;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadUnbond create() => PayloadUnbond._();\n  @$core.override\n  PayloadUnbond createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadUnbond getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadUnbond>(create);\n  static PayloadUnbond? _defaultInstance;\n\n  /// The address of the validator to unbond from.\n  @$pb.TagNumber(1)\n  $core.String get validator => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set validator($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValidator() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValidator() => $_clearField(1);\n\n  /// The address of the delegate owner.\n  /// Optional, but required when the validator is a delegated validator.;\n  @$pb.TagNumber(2)\n  $core.String get delegateOwner => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set delegateOwner($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasDelegateOwner() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearDelegateOwner() => $_clearField(2);\n}\n\n/// Payload for a withdraw transaction.\nclass PayloadWithdraw extends $pb.GeneratedMessage {\n  factory PayloadWithdraw({\n    $core.String? validatorAddress,\n    $core.String? accountAddress,\n    $fixnum.Int64? amount,\n  }) {\n    final result = create();\n    if (validatorAddress != null) result.validatorAddress = validatorAddress;\n    if (accountAddress != null) result.accountAddress = accountAddress;\n    if (amount != null) result.amount = amount;\n    return result;\n  }\n\n  PayloadWithdraw._();\n\n  factory PayloadWithdraw.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadWithdraw.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadWithdraw',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'validatorAddress')\n    ..aOS(2, _omitFieldNames ? '' : 'accountAddress')\n    ..aInt64(3, _omitFieldNames ? '' : 'amount')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadWithdraw clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadWithdraw copyWith(void Function(PayloadWithdraw) updates) =>\n      super.copyWith((message) => updates(message as PayloadWithdraw))\n          as PayloadWithdraw;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadWithdraw create() => PayloadWithdraw._();\n  @$core.override\n  PayloadWithdraw createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadWithdraw getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadWithdraw>(create);\n  static PayloadWithdraw? _defaultInstance;\n\n  /// The address of the validator to withdraw from.\n  @$pb.TagNumber(1)\n  $core.String get validatorAddress => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set validatorAddress($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasValidatorAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearValidatorAddress() => $_clearField(1);\n\n  /// The address of the account to withdraw to.\n  @$pb.TagNumber(2)\n  $core.String get accountAddress => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set accountAddress($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAccountAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAccountAddress() => $_clearField(2);\n\n  /// The withdrawal amount in NanoPAC.\n  @$pb.TagNumber(3)\n  $fixnum.Int64 get amount => $_getI64(2);\n  @$pb.TagNumber(3)\n  set amount($fixnum.Int64 value) => $_setInt64(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAmount() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAmount() => $_clearField(3);\n}\n\n/// Payload for a batch transfer transaction.\nclass PayloadBatchTransfer extends $pb.GeneratedMessage {\n  factory PayloadBatchTransfer({\n    $core.String? sender,\n    $core.Iterable<Recipient>? recipients,\n  }) {\n    final result = create();\n    if (sender != null) result.sender = sender;\n    if (recipients != null) result.recipients.addAll(recipients);\n    return result;\n  }\n\n  PayloadBatchTransfer._();\n\n  factory PayloadBatchTransfer.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PayloadBatchTransfer.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PayloadBatchTransfer',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'sender')\n    ..pPM<Recipient>(2, _omitFieldNames ? '' : 'recipients',\n        subBuilder: Recipient.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadBatchTransfer clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PayloadBatchTransfer copyWith(void Function(PayloadBatchTransfer) updates) =>\n      super.copyWith((message) => updates(message as PayloadBatchTransfer))\n          as PayloadBatchTransfer;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PayloadBatchTransfer create() => PayloadBatchTransfer._();\n  @$core.override\n  PayloadBatchTransfer createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PayloadBatchTransfer getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PayloadBatchTransfer>(create);\n  static PayloadBatchTransfer? _defaultInstance;\n\n  /// The sender's address.\n  @$pb.TagNumber(1)\n  $core.String get sender => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set sender($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSender() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSender() => $_clearField(1);\n\n  /// The list of recipients with their amounts.\n  @$pb.TagNumber(2)\n  $pb.PbList<Recipient> get recipients => $_getList(1);\n}\n\n/// Recipient is receiver with amount.\nclass Recipient extends $pb.GeneratedMessage {\n  factory Recipient({\n    $core.String? receiver,\n    $fixnum.Int64? amount,\n  }) {\n    final result = create();\n    if (receiver != null) result.receiver = receiver;\n    if (amount != null) result.amount = amount;\n    return result;\n  }\n\n  Recipient._();\n\n  factory Recipient.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory Recipient.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'Recipient',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'receiver')\n    ..aInt64(2, _omitFieldNames ? '' : 'amount')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Recipient clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  Recipient copyWith(void Function(Recipient) updates) =>\n      super.copyWith((message) => updates(message as Recipient)) as Recipient;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static Recipient create() => Recipient._();\n  @$core.override\n  Recipient createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static Recipient getDefault() =>\n      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Recipient>(create);\n  static Recipient? _defaultInstance;\n\n  /// The receiver's address.\n  @$pb.TagNumber(1)\n  $core.String get receiver => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set receiver($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasReceiver() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearReceiver() => $_clearField(1);\n\n  /// The amount in NanoPAC.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get amount => $_getI64(1);\n  @$pb.TagNumber(2)\n  set amount($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAmount() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAmount() => $_clearField(2);\n}\n\nenum TransactionInfo_Payload {\n  transfer,\n  bond,\n  sortition,\n  unbond,\n  withdraw,\n  batchTransfer,\n  notSet\n}\n\n/// Information about a transaction.\nclass TransactionInfo extends $pb.GeneratedMessage {\n  factory TransactionInfo({\n    $core.String? id,\n    $core.String? data,\n    $core.int? version,\n    $core.int? lockTime,\n    $fixnum.Int64? value,\n    $fixnum.Int64? fee,\n    PayloadType? payloadType,\n    $core.String? memo,\n    $core.String? publicKey,\n    $core.String? signature,\n    $core.int? blockHeight,\n    $core.bool? confirmed,\n    $core.int? confirmations,\n    PayloadTransfer? transfer,\n    PayloadBond? bond,\n    PayloadSortition? sortition,\n    PayloadUnbond? unbond,\n    PayloadWithdraw? withdraw,\n    PayloadBatchTransfer? batchTransfer,\n  }) {\n    final result = create();\n    if (id != null) result.id = id;\n    if (data != null) result.data = data;\n    if (version != null) result.version = version;\n    if (lockTime != null) result.lockTime = lockTime;\n    if (value != null) result.value = value;\n    if (fee != null) result.fee = fee;\n    if (payloadType != null) result.payloadType = payloadType;\n    if (memo != null) result.memo = memo;\n    if (publicKey != null) result.publicKey = publicKey;\n    if (signature != null) result.signature = signature;\n    if (blockHeight != null) result.blockHeight = blockHeight;\n    if (confirmed != null) result.confirmed = confirmed;\n    if (confirmations != null) result.confirmations = confirmations;\n    if (transfer != null) result.transfer = transfer;\n    if (bond != null) result.bond = bond;\n    if (sortition != null) result.sortition = sortition;\n    if (unbond != null) result.unbond = unbond;\n    if (withdraw != null) result.withdraw = withdraw;\n    if (batchTransfer != null) result.batchTransfer = batchTransfer;\n    return result;\n  }\n\n  TransactionInfo._();\n\n  factory TransactionInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory TransactionInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static const $core.Map<$core.int, TransactionInfo_Payload>\n      _TransactionInfo_PayloadByTag = {\n    30: TransactionInfo_Payload.transfer,\n    31: TransactionInfo_Payload.bond,\n    32: TransactionInfo_Payload.sortition,\n    33: TransactionInfo_Payload.unbond,\n    34: TransactionInfo_Payload.withdraw,\n    35: TransactionInfo_Payload.batchTransfer,\n    0: TransactionInfo_Payload.notSet\n  };\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'TransactionInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..oo(0, [30, 31, 32, 33, 34, 35])\n    ..aOS(1, _omitFieldNames ? '' : 'id')\n    ..aOS(2, _omitFieldNames ? '' : 'data')\n    ..aI(3, _omitFieldNames ? '' : 'version')\n    ..aI(4, _omitFieldNames ? '' : 'lockTime', fieldType: $pb.PbFieldType.OU3)\n    ..aInt64(5, _omitFieldNames ? '' : 'value')\n    ..aInt64(6, _omitFieldNames ? '' : 'fee')\n    ..aE<PayloadType>(7, _omitFieldNames ? '' : 'payloadType',\n        enumValues: PayloadType.values)\n    ..aOS(8, _omitFieldNames ? '' : 'memo')\n    ..aOS(9, _omitFieldNames ? '' : 'publicKey')\n    ..aOS(10, _omitFieldNames ? '' : 'signature')\n    ..aI(11, _omitFieldNames ? '' : 'blockHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aOB(12, _omitFieldNames ? '' : 'confirmed')\n    ..aI(13, _omitFieldNames ? '' : 'confirmations')\n    ..aOM<PayloadTransfer>(30, _omitFieldNames ? '' : 'transfer',\n        subBuilder: PayloadTransfer.create)\n    ..aOM<PayloadBond>(31, _omitFieldNames ? '' : 'bond',\n        subBuilder: PayloadBond.create)\n    ..aOM<PayloadSortition>(32, _omitFieldNames ? '' : 'sortition',\n        subBuilder: PayloadSortition.create)\n    ..aOM<PayloadUnbond>(33, _omitFieldNames ? '' : 'unbond',\n        subBuilder: PayloadUnbond.create)\n    ..aOM<PayloadWithdraw>(34, _omitFieldNames ? '' : 'withdraw',\n        subBuilder: PayloadWithdraw.create)\n    ..aOM<PayloadBatchTransfer>(35, _omitFieldNames ? '' : 'batchTransfer',\n        subBuilder: PayloadBatchTransfer.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TransactionInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  TransactionInfo copyWith(void Function(TransactionInfo) updates) =>\n      super.copyWith((message) => updates(message as TransactionInfo))\n          as TransactionInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static TransactionInfo create() => TransactionInfo._();\n  @$core.override\n  TransactionInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static TransactionInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<TransactionInfo>(create);\n  static TransactionInfo? _defaultInstance;\n\n  @$pb.TagNumber(30)\n  @$pb.TagNumber(31)\n  @$pb.TagNumber(32)\n  @$pb.TagNumber(33)\n  @$pb.TagNumber(34)\n  @$pb.TagNumber(35)\n  TransactionInfo_Payload whichPayload() =>\n      _TransactionInfo_PayloadByTag[$_whichOneof(0)]!;\n  @$pb.TagNumber(30)\n  @$pb.TagNumber(31)\n  @$pb.TagNumber(32)\n  @$pb.TagNumber(33)\n  @$pb.TagNumber(34)\n  @$pb.TagNumber(35)\n  void clearPayload() => $_clearField($_whichOneof(0));\n\n  /// The unique ID of the transaction.\n  @$pb.TagNumber(1)\n  $core.String get id => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set id($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasId() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearId() => $_clearField(1);\n\n  /// The raw transaction data in hexadecimal format.\n  @$pb.TagNumber(2)\n  $core.String get data => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set data($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasData() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearData() => $_clearField(2);\n\n  /// The version of the transaction.\n  @$pb.TagNumber(3)\n  $core.int get version => $_getIZ(2);\n  @$pb.TagNumber(3)\n  set version($core.int value) => $_setSignedInt32(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasVersion() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearVersion() => $_clearField(3);\n\n  /// The lock time for the transaction.\n  @$pb.TagNumber(4)\n  $core.int get lockTime => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set lockTime($core.int value) => $_setUnsignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasLockTime() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearLockTime() => $_clearField(4);\n\n  /// The value of the transaction in NanoPAC.\n  @$pb.TagNumber(5)\n  $fixnum.Int64 get value => $_getI64(4);\n  @$pb.TagNumber(5)\n  set value($fixnum.Int64 value) => $_setInt64(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasValue() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearValue() => $_clearField(5);\n\n  /// The fee for the transaction in NanoPAC.\n  @$pb.TagNumber(6)\n  $fixnum.Int64 get fee => $_getI64(5);\n  @$pb.TagNumber(6)\n  set fee($fixnum.Int64 value) => $_setInt64(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasFee() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearFee() => $_clearField(6);\n\n  /// The type of transaction payload.\n  @$pb.TagNumber(7)\n  PayloadType get payloadType => $_getN(6);\n  @$pb.TagNumber(7)\n  set payloadType(PayloadType value) => $_setField(7, value);\n  @$pb.TagNumber(7)\n  $core.bool hasPayloadType() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearPayloadType() => $_clearField(7);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(8)\n  $core.String get memo => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set memo($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasMemo() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearMemo() => $_clearField(8);\n\n  /// The public key associated with the transaction.\n  @$pb.TagNumber(9)\n  $core.String get publicKey => $_getSZ(8);\n  @$pb.TagNumber(9)\n  set publicKey($core.String value) => $_setString(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasPublicKey() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearPublicKey() => $_clearField(9);\n\n  /// The signature for the transaction.\n  @$pb.TagNumber(10)\n  $core.String get signature => $_getSZ(9);\n  @$pb.TagNumber(10)\n  set signature($core.String value) => $_setString(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasSignature() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearSignature() => $_clearField(10);\n\n  /// The block height containing the transaction.\n  /// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n  @$pb.TagNumber(11)\n  $core.int get blockHeight => $_getIZ(10);\n  @$pb.TagNumber(11)\n  set blockHeight($core.int value) => $_setUnsignedInt32(10, value);\n  @$pb.TagNumber(11)\n  $core.bool hasBlockHeight() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearBlockHeight() => $_clearField(11);\n\n  /// Indicates whether the transaction is confirmed.\n  @$pb.TagNumber(12)\n  $core.bool get confirmed => $_getBF(11);\n  @$pb.TagNumber(12)\n  set confirmed($core.bool value) => $_setBool(11, value);\n  @$pb.TagNumber(12)\n  $core.bool hasConfirmed() => $_has(11);\n  @$pb.TagNumber(12)\n  void clearConfirmed() => $_clearField(12);\n\n  /// The number of blocks that have been added to the chain after this transaction was included in a block.\n  /// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n  @$pb.TagNumber(13)\n  $core.int get confirmations => $_getIZ(12);\n  @$pb.TagNumber(13)\n  set confirmations($core.int value) => $_setSignedInt32(12, value);\n  @$pb.TagNumber(13)\n  $core.bool hasConfirmations() => $_has(12);\n  @$pb.TagNumber(13)\n  void clearConfirmations() => $_clearField(13);\n\n  /// Transfer transaction payload.\n  @$pb.TagNumber(30)\n  PayloadTransfer get transfer => $_getN(13);\n  @$pb.TagNumber(30)\n  set transfer(PayloadTransfer value) => $_setField(30, value);\n  @$pb.TagNumber(30)\n  $core.bool hasTransfer() => $_has(13);\n  @$pb.TagNumber(30)\n  void clearTransfer() => $_clearField(30);\n  @$pb.TagNumber(30)\n  PayloadTransfer ensureTransfer() => $_ensure(13);\n\n  /// Bond transaction payload.\n  @$pb.TagNumber(31)\n  PayloadBond get bond => $_getN(14);\n  @$pb.TagNumber(31)\n  set bond(PayloadBond value) => $_setField(31, value);\n  @$pb.TagNumber(31)\n  $core.bool hasBond() => $_has(14);\n  @$pb.TagNumber(31)\n  void clearBond() => $_clearField(31);\n  @$pb.TagNumber(31)\n  PayloadBond ensureBond() => $_ensure(14);\n\n  /// Sortition transaction payload.\n  @$pb.TagNumber(32)\n  PayloadSortition get sortition => $_getN(15);\n  @$pb.TagNumber(32)\n  set sortition(PayloadSortition value) => $_setField(32, value);\n  @$pb.TagNumber(32)\n  $core.bool hasSortition() => $_has(15);\n  @$pb.TagNumber(32)\n  void clearSortition() => $_clearField(32);\n  @$pb.TagNumber(32)\n  PayloadSortition ensureSortition() => $_ensure(15);\n\n  /// Unbond transaction payload.\n  @$pb.TagNumber(33)\n  PayloadUnbond get unbond => $_getN(16);\n  @$pb.TagNumber(33)\n  set unbond(PayloadUnbond value) => $_setField(33, value);\n  @$pb.TagNumber(33)\n  $core.bool hasUnbond() => $_has(16);\n  @$pb.TagNumber(33)\n  void clearUnbond() => $_clearField(33);\n  @$pb.TagNumber(33)\n  PayloadUnbond ensureUnbond() => $_ensure(16);\n\n  /// Withdraw transaction payload.\n  @$pb.TagNumber(34)\n  PayloadWithdraw get withdraw => $_getN(17);\n  @$pb.TagNumber(34)\n  set withdraw(PayloadWithdraw value) => $_setField(34, value);\n  @$pb.TagNumber(34)\n  $core.bool hasWithdraw() => $_has(17);\n  @$pb.TagNumber(34)\n  void clearWithdraw() => $_clearField(34);\n  @$pb.TagNumber(34)\n  PayloadWithdraw ensureWithdraw() => $_ensure(17);\n\n  /// Batch Transfer transaction payload.\n  @$pb.TagNumber(35)\n  PayloadBatchTransfer get batchTransfer => $_getN(18);\n  @$pb.TagNumber(35)\n  set batchTransfer(PayloadBatchTransfer value) => $_setField(35, value);\n  @$pb.TagNumber(35)\n  $core.bool hasBatchTransfer() => $_has(18);\n  @$pb.TagNumber(35)\n  void clearBatchTransfer() => $_clearField(35);\n  @$pb.TagNumber(35)\n  PayloadBatchTransfer ensureBatchTransfer() => $_ensure(18);\n}\n\n/// Request message for decoding a raw transaction.\nclass DecodeRawTransactionRequest extends $pb.GeneratedMessage {\n  factory DecodeRawTransactionRequest({\n    $core.String? rawTransaction,\n  }) {\n    final result = create();\n    if (rawTransaction != null) result.rawTransaction = rawTransaction;\n    return result;\n  }\n\n  DecodeRawTransactionRequest._();\n\n  factory DecodeRawTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DecodeRawTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DecodeRawTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'rawTransaction')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DecodeRawTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DecodeRawTransactionRequest copyWith(\n          void Function(DecodeRawTransactionRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as DecodeRawTransactionRequest))\n          as DecodeRawTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DecodeRawTransactionRequest create() =>\n      DecodeRawTransactionRequest._();\n  @$core.override\n  DecodeRawTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DecodeRawTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DecodeRawTransactionRequest>(create);\n  static DecodeRawTransactionRequest? _defaultInstance;\n\n  /// The raw transaction data in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get rawTransaction => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set rawTransaction($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasRawTransaction() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearRawTransaction() => $_clearField(1);\n}\n\n/// Response message contains the decoded transaction.\nclass DecodeRawTransactionResponse extends $pb.GeneratedMessage {\n  factory DecodeRawTransactionResponse({\n    TransactionInfo? transaction,\n  }) {\n    final result = create();\n    if (transaction != null) result.transaction = transaction;\n    return result;\n  }\n\n  DecodeRawTransactionResponse._();\n\n  factory DecodeRawTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory DecodeRawTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'DecodeRawTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOM<TransactionInfo>(1, _omitFieldNames ? '' : 'transaction',\n        subBuilder: TransactionInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DecodeRawTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  DecodeRawTransactionResponse copyWith(\n          void Function(DecodeRawTransactionResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as DecodeRawTransactionResponse))\n          as DecodeRawTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static DecodeRawTransactionResponse create() =>\n      DecodeRawTransactionResponse._();\n  @$core.override\n  DecodeRawTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static DecodeRawTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<DecodeRawTransactionResponse>(create);\n  static DecodeRawTransactionResponse? _defaultInstance;\n\n  /// The decoded transaction information.\n  @$pb.TagNumber(1)\n  TransactionInfo get transaction => $_getN(0);\n  @$pb.TagNumber(1)\n  set transaction(TransactionInfo value) => $_setField(1, value);\n  @$pb.TagNumber(1)\n  $core.bool hasTransaction() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearTransaction() => $_clearField(1);\n  @$pb.TagNumber(1)\n  TransactionInfo ensureTransaction() => $_ensure(0);\n}\n\n/// Request message for checking a transaction.\nclass CheckTransactionRequest extends $pb.GeneratedMessage {\n  factory CheckTransactionRequest({\n    $core.String? rawTransaction,\n  }) {\n    final result = create();\n    if (rawTransaction != null) result.rawTransaction = rawTransaction;\n    return result;\n  }\n\n  CheckTransactionRequest._();\n\n  factory CheckTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CheckTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CheckTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'rawTransaction')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CheckTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CheckTransactionRequest copyWith(\n          void Function(CheckTransactionRequest) updates) =>\n      super.copyWith((message) => updates(message as CheckTransactionRequest))\n          as CheckTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CheckTransactionRequest create() => CheckTransactionRequest._();\n  @$core.override\n  CheckTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CheckTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CheckTransactionRequest>(create);\n  static CheckTransactionRequest? _defaultInstance;\n\n  /// The raw transaction data to be checked.\n  @$pb.TagNumber(1)\n  $core.String get rawTransaction => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set rawTransaction($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasRawTransaction() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearRawTransaction() => $_clearField(1);\n}\n\n/// Response message contains the result of the transaction check.\nclass CheckTransactionResponse extends $pb.GeneratedMessage {\n  factory CheckTransactionResponse({\n    $core.bool? isValid,\n    $core.String? errorMessage,\n  }) {\n    final result = create();\n    if (isValid != null) result.isValid = isValid;\n    if (errorMessage != null) result.errorMessage = errorMessage;\n    return result;\n  }\n\n  CheckTransactionResponse._();\n\n  factory CheckTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CheckTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CheckTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'isValid')\n    ..aOS(2, _omitFieldNames ? '' : 'errorMessage')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CheckTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CheckTransactionResponse copyWith(\n          void Function(CheckTransactionResponse) updates) =>\n      super.copyWith((message) => updates(message as CheckTransactionResponse))\n          as CheckTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CheckTransactionResponse create() => CheckTransactionResponse._();\n  @$core.override\n  CheckTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CheckTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CheckTransactionResponse>(create);\n  static CheckTransactionResponse? _defaultInstance;\n\n  /// Indicates whether the transaction is valid.\n  @$pb.TagNumber(1)\n  $core.bool get isValid => $_getBF(0);\n  @$pb.TagNumber(1)\n  set isValid($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasIsValid() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearIsValid() => $_clearField(1);\n\n  /// An error message if the transaction is invalid.\n  /// Empty if the transaction is valid.\n  @$pb.TagNumber(2)\n  $core.String get errorMessage => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set errorMessage($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasErrorMessage() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearErrorMessage() => $_clearField(2);\n}\n\n/// Transaction service defines various RPC methods for interacting with transactions.\nclass TransactionApi {\n  final $pb.RpcClient _client;\n\n  TransactionApi(this._client);\n\n  /// GetTransaction retrieves transaction details based on the provided request parameters.\n  $async.Future<GetTransactionResponse> getTransaction(\n          $pb.ClientContext? ctx, GetTransactionRequest request) =>\n      _client.invoke<GetTransactionResponse>(ctx, 'Transaction',\n          'GetTransaction', request, GetTransactionResponse());\n\n  /// CalculateFee calculates the transaction fee based on the specified amount and payload type.\n  $async.Future<CalculateFeeResponse> calculateFee(\n          $pb.ClientContext? ctx, CalculateFeeRequest request) =>\n      _client.invoke<CalculateFeeResponse>(\n          ctx, 'Transaction', 'CalculateFee', request, CalculateFeeResponse());\n\n  /// BroadcastTransaction broadcasts a signed transaction to the network.\n  $async.Future<BroadcastTransactionResponse> broadcastTransaction(\n          $pb.ClientContext? ctx, BroadcastTransactionRequest request) =>\n      _client.invoke<BroadcastTransactionResponse>(ctx, 'Transaction',\n          'BroadcastTransaction', request, BroadcastTransactionResponse());\n\n  /// GetRawTransferTransaction retrieves raw details of a transfer transaction.\n  $async.Future<GetRawTransactionResponse> getRawTransferTransaction(\n          $pb.ClientContext? ctx, GetRawTransferTransactionRequest request) =>\n      _client.invoke<GetRawTransactionResponse>(ctx, 'Transaction',\n          'GetRawTransferTransaction', request, GetRawTransactionResponse());\n\n  /// GetRawBondTransaction retrieves raw details of a bond transaction.\n  $async.Future<GetRawTransactionResponse> getRawBondTransaction(\n          $pb.ClientContext? ctx, GetRawBondTransactionRequest request) =>\n      _client.invoke<GetRawTransactionResponse>(ctx, 'Transaction',\n          'GetRawBondTransaction', request, GetRawTransactionResponse());\n\n  /// GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n  $async.Future<GetRawTransactionResponse> getRawUnbondTransaction(\n          $pb.ClientContext? ctx, GetRawUnbondTransactionRequest request) =>\n      _client.invoke<GetRawTransactionResponse>(ctx, 'Transaction',\n          'GetRawUnbondTransaction', request, GetRawTransactionResponse());\n\n  /// GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n  $async.Future<GetRawTransactionResponse> getRawWithdrawTransaction(\n          $pb.ClientContext? ctx, GetRawWithdrawTransactionRequest request) =>\n      _client.invoke<GetRawTransactionResponse>(ctx, 'Transaction',\n          'GetRawWithdrawTransaction', request, GetRawTransactionResponse());\n\n  /// GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n  $async.Future<GetRawTransactionResponse> getRawBatchTransferTransaction(\n          $pb.ClientContext? ctx,\n          GetRawBatchTransferTransactionRequest request) =>\n      _client.invoke<GetRawTransactionResponse>(\n          ctx,\n          'Transaction',\n          'GetRawBatchTransferTransaction',\n          request,\n          GetRawTransactionResponse());\n\n  /// DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n  $async.Future<DecodeRawTransactionResponse> decodeRawTransaction(\n          $pb.ClientContext? ctx, DecodeRawTransactionRequest request) =>\n      _client.invoke<DecodeRawTransactionResponse>(ctx, 'Transaction',\n          'DecodeRawTransaction', request, DecodeRawTransactionResponse());\n\n  /// CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n  $async.Future<CheckTransactionResponse> checkTransaction(\n          $pb.ClientContext? ctx, CheckTransactionRequest request) =>\n      _client.invoke<CheckTransactionResponse>(ctx, 'Transaction',\n          'CheckTransaction', request, CheckTransactionResponse());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/transaction.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from transaction.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// Enumeration for different types of transaction payloads.\nclass PayloadType extends $pb.ProtobufEnum {\n  /// Unspecified payload type.\n  static const PayloadType PAYLOAD_TYPE_UNSPECIFIED =\n      PayloadType._(0, _omitEnumNames ? '' : 'PAYLOAD_TYPE_UNSPECIFIED');\n\n  /// Transfer payload type.\n  static const PayloadType PAYLOAD_TYPE_TRANSFER =\n      PayloadType._(1, _omitEnumNames ? '' : 'PAYLOAD_TYPE_TRANSFER');\n\n  /// Bond payload type.\n  static const PayloadType PAYLOAD_TYPE_BOND =\n      PayloadType._(2, _omitEnumNames ? '' : 'PAYLOAD_TYPE_BOND');\n\n  /// Sortition payload type.\n  static const PayloadType PAYLOAD_TYPE_SORTITION =\n      PayloadType._(3, _omitEnumNames ? '' : 'PAYLOAD_TYPE_SORTITION');\n\n  /// Unbond payload type.\n  static const PayloadType PAYLOAD_TYPE_UNBOND =\n      PayloadType._(4, _omitEnumNames ? '' : 'PAYLOAD_TYPE_UNBOND');\n\n  /// Withdraw payload type.\n  static const PayloadType PAYLOAD_TYPE_WITHDRAW =\n      PayloadType._(5, _omitEnumNames ? '' : 'PAYLOAD_TYPE_WITHDRAW');\n\n  /// Batch transfer payload type.\n  static const PayloadType PAYLOAD_TYPE_BATCH_TRANSFER =\n      PayloadType._(6, _omitEnumNames ? '' : 'PAYLOAD_TYPE_BATCH_TRANSFER');\n\n  static const $core.List<PayloadType> values = <PayloadType>[\n    PAYLOAD_TYPE_UNSPECIFIED,\n    PAYLOAD_TYPE_TRANSFER,\n    PAYLOAD_TYPE_BOND,\n    PAYLOAD_TYPE_SORTITION,\n    PAYLOAD_TYPE_UNBOND,\n    PAYLOAD_TYPE_WITHDRAW,\n    PAYLOAD_TYPE_BATCH_TRANSFER,\n  ];\n\n  static final $core.List<PayloadType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 6);\n  static PayloadType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const PayloadType._(super.value, super.name);\n}\n\n/// Enumeration for verbosity levels when requesting transaction details.\nclass TransactionVerbosity extends $pb.ProtobufEnum {\n  /// Request transaction data only.\n  static const TransactionVerbosity TRANSACTION_VERBOSITY_DATA =\n      TransactionVerbosity._(\n          0, _omitEnumNames ? '' : 'TRANSACTION_VERBOSITY_DATA');\n\n  /// Request detailed transaction information.\n  static const TransactionVerbosity TRANSACTION_VERBOSITY_INFO =\n      TransactionVerbosity._(\n          1, _omitEnumNames ? '' : 'TRANSACTION_VERBOSITY_INFO');\n\n  static const $core.List<TransactionVerbosity> values = <TransactionVerbosity>[\n    TRANSACTION_VERBOSITY_DATA,\n    TRANSACTION_VERBOSITY_INFO,\n  ];\n\n  static final $core.List<TransactionVerbosity?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 1);\n  static TransactionVerbosity? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const TransactionVerbosity._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/transaction.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from transaction.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use payloadTypeDescriptor instead')\nconst PayloadType$json = {\n  '1': 'PayloadType',\n  '2': [\n    {'1': 'PAYLOAD_TYPE_UNSPECIFIED', '2': 0},\n    {'1': 'PAYLOAD_TYPE_TRANSFER', '2': 1},\n    {'1': 'PAYLOAD_TYPE_BOND', '2': 2},\n    {'1': 'PAYLOAD_TYPE_SORTITION', '2': 3},\n    {'1': 'PAYLOAD_TYPE_UNBOND', '2': 4},\n    {'1': 'PAYLOAD_TYPE_WITHDRAW', '2': 5},\n    {'1': 'PAYLOAD_TYPE_BATCH_TRANSFER', '2': 6},\n  ],\n};\n\n/// Descriptor for `PayloadType`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List payloadTypeDescriptor = $convert.base64Decode(\n    'CgtQYXlsb2FkVHlwZRIcChhQQVlMT0FEX1RZUEVfVU5TUEVDSUZJRUQQABIZChVQQVlMT0FEX1'\n    'RZUEVfVFJBTlNGRVIQARIVChFQQVlMT0FEX1RZUEVfQk9ORBACEhoKFlBBWUxPQURfVFlQRV9T'\n    'T1JUSVRJT04QAxIXChNQQVlMT0FEX1RZUEVfVU5CT05EEAQSGQoVUEFZTE9BRF9UWVBFX1dJVE'\n    'hEUkFXEAUSHwobUEFZTE9BRF9UWVBFX0JBVENIX1RSQU5TRkVSEAY=');\n\n@$core.Deprecated('Use transactionVerbosityDescriptor instead')\nconst TransactionVerbosity$json = {\n  '1': 'TransactionVerbosity',\n  '2': [\n    {'1': 'TRANSACTION_VERBOSITY_DATA', '2': 0},\n    {'1': 'TRANSACTION_VERBOSITY_INFO', '2': 1},\n  ],\n};\n\n/// Descriptor for `TransactionVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List transactionVerbosityDescriptor = $convert.base64Decode(\n    'ChRUcmFuc2FjdGlvblZlcmJvc2l0eRIeChpUUkFOU0FDVElPTl9WRVJCT1NJVFlfREFUQRAAEh'\n    '4KGlRSQU5TQUNUSU9OX1ZFUkJPU0lUWV9JTkZPEAE=');\n\n@$core.Deprecated('Use getTransactionRequestDescriptor instead')\nconst GetTransactionRequest$json = {\n  '1': 'GetTransactionRequest',\n  '2': [\n    {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},\n    {\n      '1': 'verbosity',\n      '3': 2,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.TransactionVerbosity',\n      '10': 'verbosity'\n    },\n  ],\n};\n\n/// Descriptor for `GetTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTransactionRequestDescriptor = $convert.base64Decode(\n    'ChVHZXRUcmFuc2FjdGlvblJlcXVlc3QSDgoCaWQYASABKAlSAmlkEjoKCXZlcmJvc2l0eRgCIA'\n    'EoDjIcLnBhY3R1cy5UcmFuc2FjdGlvblZlcmJvc2l0eVIJdmVyYm9zaXR5');\n\n@$core.Deprecated('Use getTransactionResponseDescriptor instead')\nconst GetTransactionResponse$json = {\n  '1': 'GetTransactionResponse',\n  '2': [\n    {'1': 'block_height', '3': 1, '4': 1, '5': 13, '10': 'blockHeight'},\n    {'1': 'block_time', '3': 2, '4': 1, '5': 13, '10': 'blockTime'},\n    {\n      '1': 'transaction',\n      '3': 3,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.TransactionInfo',\n      '10': 'transaction'\n    },\n  ],\n};\n\n/// Descriptor for `GetTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTransactionResponseDescriptor = $convert.base64Decode(\n    'ChZHZXRUcmFuc2FjdGlvblJlc3BvbnNlEiEKDGJsb2NrX2hlaWdodBgBIAEoDVILYmxvY2tIZW'\n    'lnaHQSHQoKYmxvY2tfdGltZRgCIAEoDVIJYmxvY2tUaW1lEjkKC3RyYW5zYWN0aW9uGAMgASgL'\n    'MhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1ILdHJhbnNhY3Rpb24=');\n\n@$core.Deprecated('Use calculateFeeRequestDescriptor instead')\nconst CalculateFeeRequest$json = {\n  '1': 'CalculateFeeRequest',\n  '2': [\n    {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'},\n    {\n      '1': 'payload_type',\n      '3': 2,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.PayloadType',\n      '10': 'payloadType'\n    },\n    {'1': 'fixed_amount', '3': 3, '4': 1, '5': 8, '10': 'fixedAmount'},\n  ],\n};\n\n/// Descriptor for `CalculateFeeRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List calculateFeeRequestDescriptor = $convert.base64Decode(\n    'ChNDYWxjdWxhdGVGZWVSZXF1ZXN0EhYKBmFtb3VudBgBIAEoA1IGYW1vdW50EjYKDHBheWxvYW'\n    'RfdHlwZRgCIAEoDjITLnBhY3R1cy5QYXlsb2FkVHlwZVILcGF5bG9hZFR5cGUSIQoMZml4ZWRf'\n    'YW1vdW50GAMgASgIUgtmaXhlZEFtb3VudA==');\n\n@$core.Deprecated('Use calculateFeeResponseDescriptor instead')\nconst CalculateFeeResponse$json = {\n  '1': 'CalculateFeeResponse',\n  '2': [\n    {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'},\n    {'1': 'fee', '3': 2, '4': 1, '5': 3, '10': 'fee'},\n  ],\n};\n\n/// Descriptor for `CalculateFeeResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List calculateFeeResponseDescriptor = $convert.base64Decode(\n    'ChRDYWxjdWxhdGVGZWVSZXNwb25zZRIWCgZhbW91bnQYASABKANSBmFtb3VudBIQCgNmZWUYAi'\n    'ABKANSA2ZlZQ==');\n\n@$core.Deprecated('Use broadcastTransactionRequestDescriptor instead')\nconst BroadcastTransactionRequest$json = {\n  '1': 'BroadcastTransactionRequest',\n  '2': [\n    {\n      '1': 'signed_raw_transaction',\n      '3': 1,\n      '4': 1,\n      '5': 9,\n      '10': 'signedRawTransaction'\n    },\n  ],\n};\n\n/// Descriptor for `BroadcastTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List broadcastTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'ChtCcm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QSNAoWc2lnbmVkX3Jhd190cmFuc2FjdGlvbh'\n        'gBIAEoCVIUc2lnbmVkUmF3VHJhbnNhY3Rpb24=');\n\n@$core.Deprecated('Use broadcastTransactionResponseDescriptor instead')\nconst BroadcastTransactionResponse$json = {\n  '1': 'BroadcastTransactionResponse',\n  '2': [\n    {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},\n  ],\n};\n\n/// Descriptor for `BroadcastTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List broadcastTransactionResponseDescriptor =\n    $convert.base64Decode(\n        'ChxCcm9hZGNhc3RUcmFuc2FjdGlvblJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZA==');\n\n@$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead')\nconst GetRawTransferTransactionRequest$json = {\n  '1': 'GetRawTransferTransactionRequest',\n  '2': [\n    {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'},\n    {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'},\n    {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'},\n    {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'},\n    {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'},\n    {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'},\n  ],\n};\n\n/// Descriptor for `GetRawTransferTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawTransferTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'CiBHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCG'\n        'xvY2tUaW1lEhYKBnNlbmRlchgCIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAMgASgJUghyZWNl'\n        'aXZlchIWCgZhbW91bnQYBCABKANSBmFtb3VudBIQCgNmZWUYBSABKANSA2ZlZRISCgRtZW1vGA'\n        'YgASgJUgRtZW1v');\n\n@$core.Deprecated('Use getRawBondTransactionRequestDescriptor instead')\nconst GetRawBondTransactionRequest$json = {\n  '1': 'GetRawBondTransactionRequest',\n  '2': [\n    {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'},\n    {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'},\n    {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'},\n    {'1': 'stake', '3': 4, '4': 1, '5': 3, '10': 'stake'},\n    {'1': 'public_key', '3': 5, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'},\n    {'1': 'memo', '3': 7, '4': 1, '5': 9, '10': 'memo'},\n    {'1': 'delegate_owner', '3': 8, '4': 1, '5': 9, '10': 'delegateOwner'},\n    {'1': 'delegate_share', '3': 9, '4': 1, '5': 3, '10': 'delegateShare'},\n    {'1': 'delegate_expiry', '3': 10, '4': 1, '5': 13, '10': 'delegateExpiry'},\n  ],\n};\n\n/// Descriptor for `GetRawBondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawBondTransactionRequestDescriptor = $convert.base64Decode(\n    'ChxHZXRSYXdCb25kVHJhbnNhY3Rpb25SZXF1ZXN0EhsKCWxvY2tfdGltZRgBIAEoDVIIbG9ja1'\n    'RpbWUSFgoGc2VuZGVyGAIgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAyABKAlSCHJlY2VpdmVy'\n    'EhQKBXN0YWtlGAQgASgDUgVzdGFrZRIdCgpwdWJsaWNfa2V5GAUgASgJUglwdWJsaWNLZXkSEA'\n    'oDZmVlGAYgASgDUgNmZWUSEgoEbWVtbxgHIAEoCVIEbWVtbxIlCg5kZWxlZ2F0ZV9vd25lchgI'\n    'IAEoCVINZGVsZWdhdGVPd25lchIlCg5kZWxlZ2F0ZV9zaGFyZRgJIAEoA1INZGVsZWdhdGVTaG'\n    'FyZRInCg9kZWxlZ2F0ZV9leHBpcnkYCiABKA1SDmRlbGVnYXRlRXhwaXJ5');\n\n@$core.Deprecated('Use getRawUnbondTransactionRequestDescriptor instead')\nconst GetRawUnbondTransactionRequest$json = {\n  '1': 'GetRawUnbondTransactionRequest',\n  '2': [\n    {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'},\n    {\n      '1': 'validator_address',\n      '3': 2,\n      '4': 1,\n      '5': 9,\n      '10': 'validatorAddress'\n    },\n    {'1': 'memo', '3': 3, '4': 1, '5': 9, '10': 'memo'},\n    {'1': 'delegate_owner', '3': 4, '4': 1, '5': 9, '10': 'delegateOwner'},\n  ],\n};\n\n/// Descriptor for `GetRawUnbondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawUnbondTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'Ch5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2'\n        'NrVGltZRIrChF2YWxpZGF0b3JfYWRkcmVzcxgCIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxISCgRt'\n        'ZW1vGAMgASgJUgRtZW1vEiUKDmRlbGVnYXRlX293bmVyGAQgASgJUg1kZWxlZ2F0ZU93bmVy');\n\n@$core.Deprecated('Use getRawWithdrawTransactionRequestDescriptor instead')\nconst GetRawWithdrawTransactionRequest$json = {\n  '1': 'GetRawWithdrawTransactionRequest',\n  '2': [\n    {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'},\n    {\n      '1': 'validator_address',\n      '3': 2,\n      '4': 1,\n      '5': 9,\n      '10': 'validatorAddress'\n    },\n    {'1': 'account_address', '3': 3, '4': 1, '5': 9, '10': 'accountAddress'},\n    {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'},\n    {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'},\n    {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'},\n  ],\n};\n\n/// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCG'\n        'xvY2tUaW1lEisKEXZhbGlkYXRvcl9hZGRyZXNzGAIgASgJUhB2YWxpZGF0b3JBZGRyZXNzEicK'\n        'D2FjY291bnRfYWRkcmVzcxgDIAEoCVIOYWNjb3VudEFkZHJlc3MSFgoGYW1vdW50GAQgASgDUg'\n        'ZhbW91bnQSEAoDZmVlGAUgASgDUgNmZWUSEgoEbWVtbxgGIAEoCVIEbWVtbw==');\n\n@$core.Deprecated('Use getRawBatchTransferTransactionRequestDescriptor instead')\nconst GetRawBatchTransferTransactionRequest$json = {\n  '1': 'GetRawBatchTransferTransactionRequest',\n  '2': [\n    {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'},\n    {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'},\n    {\n      '1': 'recipients',\n      '3': 3,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.Recipient',\n      '10': 'recipients'\n    },\n    {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'},\n    {'1': 'memo', '3': 5, '4': 1, '5': 9, '10': 'memo'},\n  ],\n};\n\n/// Descriptor for `GetRawBatchTransferTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawBatchTransferTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'CiVHZXRSYXdCYXRjaFRyYW5zZmVyVHJhbnNhY3Rpb25SZXF1ZXN0EhsKCWxvY2tfdGltZRgBIA'\n        'EoDVIIbG9ja1RpbWUSFgoGc2VuZGVyGAIgASgJUgZzZW5kZXISMQoKcmVjaXBpZW50cxgDIAMo'\n        'CzIRLnBhY3R1cy5SZWNpcGllbnRSCnJlY2lwaWVudHMSEAoDZmVlGAQgASgDUgNmZWUSEgoEbW'\n        'VtbxgFIAEoCVIEbWVtbw==');\n\n@$core.Deprecated('Use getRawTransactionResponseDescriptor instead')\nconst GetRawTransactionResponse$json = {\n  '1': 'GetRawTransactionResponse',\n  '2': [\n    {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'},\n    {'1': 'id', '3': 2, '4': 1, '5': 9, '10': 'id'},\n  ],\n};\n\n/// Descriptor for `GetRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getRawTransactionResponseDescriptor =\n    $convert.base64Decode(\n        'ChlHZXRSYXdUcmFuc2FjdGlvblJlc3BvbnNlEicKD3Jhd190cmFuc2FjdGlvbhgBIAEoCVIOcm'\n        'F3VHJhbnNhY3Rpb24SDgoCaWQYAiABKAlSAmlk');\n\n@$core.Deprecated('Use payloadTransferDescriptor instead')\nconst PayloadTransfer$json = {\n  '1': 'PayloadTransfer',\n  '2': [\n    {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'},\n    {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'},\n    {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'},\n  ],\n};\n\n/// Descriptor for `PayloadTransfer`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode(\n    'Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAi'\n    'ABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50');\n\n@$core.Deprecated('Use payloadBondDescriptor instead')\nconst PayloadBond$json = {\n  '1': 'PayloadBond',\n  '2': [\n    {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'},\n    {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'},\n    {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'},\n    {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'is_delegated', '3': 5, '4': 1, '5': 8, '10': 'isDelegated'},\n    {'1': 'delegate_owner', '3': 6, '4': 1, '5': 9, '10': 'delegateOwner'},\n    {'1': 'delegate_share', '3': 7, '4': 1, '5': 3, '10': 'delegateShare'},\n    {'1': 'delegate_expiry', '3': 8, '4': 1, '5': 13, '10': 'delegateExpiry'},\n  ],\n};\n\n/// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode(\n    'CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCV'\n    'IIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1'\n    'YmxpY0tleRIhCgxpc19kZWxlZ2F0ZWQYBSABKAhSC2lzRGVsZWdhdGVkEiUKDmRlbGVnYXRlX2'\n    '93bmVyGAYgASgJUg1kZWxlZ2F0ZU93bmVyEiUKDmRlbGVnYXRlX3NoYXJlGAcgASgDUg1kZWxl'\n    'Z2F0ZVNoYXJlEicKD2RlbGVnYXRlX2V4cGlyeRgIIAEoDVIOZGVsZWdhdGVFeHBpcnk=');\n\n@$core.Deprecated('Use payloadSortitionDescriptor instead')\nconst PayloadSortition$json = {\n  '1': 'PayloadSortition',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'proof', '3': 2, '4': 1, '5': 9, '10': 'proof'},\n  ],\n};\n\n/// Descriptor for `PayloadSortition`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadSortitionDescriptor = $convert.base64Decode(\n    'ChBQYXlsb2FkU29ydGl0aW9uEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFAoFcHJvb2YYAi'\n    'ABKAlSBXByb29m');\n\n@$core.Deprecated('Use payloadUnbondDescriptor instead')\nconst PayloadUnbond$json = {\n  '1': 'PayloadUnbond',\n  '2': [\n    {'1': 'validator', '3': 1, '4': 1, '5': 9, '10': 'validator'},\n    {'1': 'delegate_owner', '3': 2, '4': 1, '5': 9, '10': 'delegateOwner'},\n  ],\n};\n\n/// Descriptor for `PayloadUnbond`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadUnbondDescriptor = $convert.base64Decode(\n    'Cg1QYXlsb2FkVW5ib25kEhwKCXZhbGlkYXRvchgBIAEoCVIJdmFsaWRhdG9yEiUKDmRlbGVnYX'\n    'RlX293bmVyGAIgASgJUg1kZWxlZ2F0ZU93bmVy');\n\n@$core.Deprecated('Use payloadWithdrawDescriptor instead')\nconst PayloadWithdraw$json = {\n  '1': 'PayloadWithdraw',\n  '2': [\n    {\n      '1': 'validator_address',\n      '3': 1,\n      '4': 1,\n      '5': 9,\n      '10': 'validatorAddress'\n    },\n    {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'},\n    {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'},\n  ],\n};\n\n/// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode(\n    'Cg9QYXlsb2FkV2l0aGRyYXcSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvck'\n    'FkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91'\n    'bnQYAyABKANSBmFtb3VudA==');\n\n@$core.Deprecated('Use payloadBatchTransferDescriptor instead')\nconst PayloadBatchTransfer$json = {\n  '1': 'PayloadBatchTransfer',\n  '2': [\n    {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'},\n    {\n      '1': 'recipients',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.Recipient',\n      '10': 'recipients'\n    },\n  ],\n};\n\n/// Descriptor for `PayloadBatchTransfer`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List payloadBatchTransferDescriptor = $convert.base64Decode(\n    'ChRQYXlsb2FkQmF0Y2hUcmFuc2ZlchIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIxCgpyZWNpcG'\n    'llbnRzGAIgAygLMhEucGFjdHVzLlJlY2lwaWVudFIKcmVjaXBpZW50cw==');\n\n@$core.Deprecated('Use recipientDescriptor instead')\nconst Recipient$json = {\n  '1': 'Recipient',\n  '2': [\n    {'1': 'receiver', '3': 1, '4': 1, '5': 9, '10': 'receiver'},\n    {'1': 'amount', '3': 2, '4': 1, '5': 3, '10': 'amount'},\n  ],\n};\n\n/// Descriptor for `Recipient`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List recipientDescriptor = $convert.base64Decode(\n    'CglSZWNpcGllbnQSGgoIcmVjZWl2ZXIYASABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgCIAEoA1'\n    'IGYW1vdW50');\n\n@$core.Deprecated('Use transactionInfoDescriptor instead')\nconst TransactionInfo$json = {\n  '1': 'TransactionInfo',\n  '2': [\n    {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},\n    {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'},\n    {'1': 'version', '3': 3, '4': 1, '5': 5, '10': 'version'},\n    {'1': 'lock_time', '3': 4, '4': 1, '5': 13, '10': 'lockTime'},\n    {'1': 'value', '3': 5, '4': 1, '5': 3, '10': 'value'},\n    {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'},\n    {\n      '1': 'payload_type',\n      '3': 7,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.PayloadType',\n      '10': 'payloadType'\n    },\n    {\n      '1': 'transfer',\n      '3': 30,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadTransfer',\n      '9': 0,\n      '10': 'transfer'\n    },\n    {\n      '1': 'bond',\n      '3': 31,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadBond',\n      '9': 0,\n      '10': 'bond'\n    },\n    {\n      '1': 'sortition',\n      '3': 32,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadSortition',\n      '9': 0,\n      '10': 'sortition'\n    },\n    {\n      '1': 'unbond',\n      '3': 33,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadUnbond',\n      '9': 0,\n      '10': 'unbond'\n    },\n    {\n      '1': 'withdraw',\n      '3': 34,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadWithdraw',\n      '9': 0,\n      '10': 'withdraw'\n    },\n    {\n      '1': 'batch_transfer',\n      '3': 35,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.PayloadBatchTransfer',\n      '9': 0,\n      '10': 'batchTransfer'\n    },\n    {'1': 'memo', '3': 8, '4': 1, '5': 9, '10': 'memo'},\n    {'1': 'public_key', '3': 9, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'signature', '3': 10, '4': 1, '5': 9, '10': 'signature'},\n    {'1': 'block_height', '3': 11, '4': 1, '5': 13, '10': 'blockHeight'},\n    {'1': 'confirmed', '3': 12, '4': 1, '5': 8, '10': 'confirmed'},\n    {'1': 'confirmations', '3': 13, '4': 1, '5': 5, '10': 'confirmations'},\n  ],\n  '8': [\n    {'1': 'payload'},\n  ],\n};\n\n/// Descriptor for `TransactionInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List transactionInfoDescriptor = $convert.base64Decode(\n    'Cg9UcmFuc2FjdGlvbkluZm8SDgoCaWQYASABKAlSAmlkEhIKBGRhdGEYAiABKAlSBGRhdGESGA'\n    'oHdmVyc2lvbhgDIAEoBVIHdmVyc2lvbhIbCglsb2NrX3RpbWUYBCABKA1SCGxvY2tUaW1lEhQK'\n    'BXZhbHVlGAUgASgDUgV2YWx1ZRIQCgNmZWUYBiABKANSA2ZlZRI2CgxwYXlsb2FkX3R5cGUYBy'\n    'ABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBlEjUKCHRyYW5zZmVyGB4gASgL'\n    'MhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGB8gASgLMhMucG'\n    'FjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSOAoJc29ydGl0aW9uGCAgASgLMhgucGFjdHVzLlBh'\n    'eWxvYWRTb3J0aXRpb25IAFIJc29ydGl0aW9uEi8KBnVuYm9uZBghIAEoCzIVLnBhY3R1cy5QYX'\n    'lsb2FkVW5ib25kSABSBnVuYm9uZBI1Cgh3aXRoZHJhdxgiIAEoCzIXLnBhY3R1cy5QYXlsb2Fk'\n    'V2l0aGRyYXdIAFIId2l0aGRyYXcSRQoOYmF0Y2hfdHJhbnNmZXIYIyABKAsyHC5wYWN0dXMuUG'\n    'F5bG9hZEJhdGNoVHJhbnNmZXJIAFINYmF0Y2hUcmFuc2ZlchISCgRtZW1vGAggASgJUgRtZW1v'\n    'Eh0KCnB1YmxpY19rZXkYCSABKAlSCXB1YmxpY0tleRIcCglzaWduYXR1cmUYCiABKAlSCXNpZ2'\n    '5hdHVyZRIhCgxibG9ja19oZWlnaHQYCyABKA1SC2Jsb2NrSGVpZ2h0EhwKCWNvbmZpcm1lZBgM'\n    'IAEoCFIJY29uZmlybWVkEiQKDWNvbmZpcm1hdGlvbnMYDSABKAVSDWNvbmZpcm1hdGlvbnNCCQ'\n    'oHcGF5bG9hZA==');\n\n@$core.Deprecated('Use decodeRawTransactionRequestDescriptor instead')\nconst DecodeRawTransactionRequest$json = {\n  '1': 'DecodeRawTransactionRequest',\n  '2': [\n    {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'},\n  ],\n};\n\n/// Descriptor for `DecodeRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List decodeRawTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'ChtEZWNvZGVSYXdUcmFuc2FjdGlvblJlcXVlc3QSJwoPcmF3X3RyYW5zYWN0aW9uGAEgASgJUg'\n        '5yYXdUcmFuc2FjdGlvbg==');\n\n@$core.Deprecated('Use decodeRawTransactionResponseDescriptor instead')\nconst DecodeRawTransactionResponse$json = {\n  '1': 'DecodeRawTransactionResponse',\n  '2': [\n    {\n      '1': 'transaction',\n      '3': 1,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.TransactionInfo',\n      '10': 'transaction'\n    },\n  ],\n};\n\n/// Descriptor for `DecodeRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List decodeRawTransactionResponseDescriptor =\n    $convert.base64Decode(\n        'ChxEZWNvZGVSYXdUcmFuc2FjdGlvblJlc3BvbnNlEjkKC3RyYW5zYWN0aW9uGAEgASgLMhcucG'\n        'FjdHVzLlRyYW5zYWN0aW9uSW5mb1ILdHJhbnNhY3Rpb24=');\n\n@$core.Deprecated('Use checkTransactionRequestDescriptor instead')\nconst CheckTransactionRequest$json = {\n  '1': 'CheckTransactionRequest',\n  '2': [\n    {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'},\n  ],\n};\n\n/// Descriptor for `CheckTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List checkTransactionRequestDescriptor =\n    $convert.base64Decode(\n        'ChdDaGVja1RyYW5zYWN0aW9uUmVxdWVzdBInCg9yYXdfdHJhbnNhY3Rpb24YASABKAlSDnJhd1'\n        'RyYW5zYWN0aW9u');\n\n@$core.Deprecated('Use checkTransactionResponseDescriptor instead')\nconst CheckTransactionResponse$json = {\n  '1': 'CheckTransactionResponse',\n  '2': [\n    {'1': 'is_valid', '3': 1, '4': 1, '5': 8, '10': 'isValid'},\n    {'1': 'error_message', '3': 2, '4': 1, '5': 9, '10': 'errorMessage'},\n  ],\n};\n\n/// Descriptor for `CheckTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List checkTransactionResponseDescriptor =\n    $convert.base64Decode(\n        'ChhDaGVja1RyYW5zYWN0aW9uUmVzcG9uc2USGQoIaXNfdmFsaWQYASABKAhSB2lzVmFsaWQSIw'\n        'oNZXJyb3JfbWVzc2FnZRgCIAEoCVIMZXJyb3JNZXNzYWdl');\n\nconst $core.Map<$core.String, $core.dynamic> TransactionServiceBase$json = {\n  '1': 'Transaction',\n  '2': [\n    {\n      '1': 'GetTransaction',\n      '2': '.pactus.GetTransactionRequest',\n      '3': '.pactus.GetTransactionResponse'\n    },\n    {\n      '1': 'CalculateFee',\n      '2': '.pactus.CalculateFeeRequest',\n      '3': '.pactus.CalculateFeeResponse'\n    },\n    {\n      '1': 'BroadcastTransaction',\n      '2': '.pactus.BroadcastTransactionRequest',\n      '3': '.pactus.BroadcastTransactionResponse'\n    },\n    {\n      '1': 'GetRawTransferTransaction',\n      '2': '.pactus.GetRawTransferTransactionRequest',\n      '3': '.pactus.GetRawTransactionResponse'\n    },\n    {\n      '1': 'GetRawBondTransaction',\n      '2': '.pactus.GetRawBondTransactionRequest',\n      '3': '.pactus.GetRawTransactionResponse'\n    },\n    {\n      '1': 'GetRawUnbondTransaction',\n      '2': '.pactus.GetRawUnbondTransactionRequest',\n      '3': '.pactus.GetRawTransactionResponse'\n    },\n    {\n      '1': 'GetRawWithdrawTransaction',\n      '2': '.pactus.GetRawWithdrawTransactionRequest',\n      '3': '.pactus.GetRawTransactionResponse'\n    },\n    {\n      '1': 'GetRawBatchTransferTransaction',\n      '2': '.pactus.GetRawBatchTransferTransactionRequest',\n      '3': '.pactus.GetRawTransactionResponse'\n    },\n    {\n      '1': 'DecodeRawTransaction',\n      '2': '.pactus.DecodeRawTransactionRequest',\n      '3': '.pactus.DecodeRawTransactionResponse'\n    },\n    {\n      '1': 'CheckTransaction',\n      '2': '.pactus.CheckTransactionRequest',\n      '3': '.pactus.CheckTransactionResponse'\n    },\n  ],\n};\n\n@$core.Deprecated('Use transactionServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    TransactionServiceBase$messageJson = {\n  '.pactus.GetTransactionRequest': GetTransactionRequest$json,\n  '.pactus.GetTransactionResponse': GetTransactionResponse$json,\n  '.pactus.TransactionInfo': TransactionInfo$json,\n  '.pactus.PayloadTransfer': PayloadTransfer$json,\n  '.pactus.PayloadBond': PayloadBond$json,\n  '.pactus.PayloadSortition': PayloadSortition$json,\n  '.pactus.PayloadUnbond': PayloadUnbond$json,\n  '.pactus.PayloadWithdraw': PayloadWithdraw$json,\n  '.pactus.PayloadBatchTransfer': PayloadBatchTransfer$json,\n  '.pactus.Recipient': Recipient$json,\n  '.pactus.CalculateFeeRequest': CalculateFeeRequest$json,\n  '.pactus.CalculateFeeResponse': CalculateFeeResponse$json,\n  '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json,\n  '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json,\n  '.pactus.GetRawTransferTransactionRequest':\n      GetRawTransferTransactionRequest$json,\n  '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json,\n  '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json,\n  '.pactus.GetRawUnbondTransactionRequest': GetRawUnbondTransactionRequest$json,\n  '.pactus.GetRawWithdrawTransactionRequest':\n      GetRawWithdrawTransactionRequest$json,\n  '.pactus.GetRawBatchTransferTransactionRequest':\n      GetRawBatchTransferTransactionRequest$json,\n  '.pactus.DecodeRawTransactionRequest': DecodeRawTransactionRequest$json,\n  '.pactus.DecodeRawTransactionResponse': DecodeRawTransactionResponse$json,\n  '.pactus.CheckTransactionRequest': CheckTransactionRequest$json,\n  '.pactus.CheckTransactionResponse': CheckTransactionResponse$json,\n};\n\n/// Descriptor for `Transaction`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List transactionServiceDescriptor = $convert.base64Decode(\n    'CgtUcmFuc2FjdGlvbhJPCg5HZXRUcmFuc2FjdGlvbhIdLnBhY3R1cy5HZXRUcmFuc2FjdGlvbl'\n    'JlcXVlc3QaHi5wYWN0dXMuR2V0VHJhbnNhY3Rpb25SZXNwb25zZRJJCgxDYWxjdWxhdGVGZWUS'\n    'Gy5wYWN0dXMuQ2FsY3VsYXRlRmVlUmVxdWVzdBocLnBhY3R1cy5DYWxjdWxhdGVGZWVSZXNwb2'\n    '5zZRJhChRCcm9hZGNhc3RUcmFuc2FjdGlvbhIjLnBhY3R1cy5Ccm9hZGNhc3RUcmFuc2FjdGlv'\n    'blJlcXVlc3QaJC5wYWN0dXMuQnJvYWRjYXN0VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYX'\n    'dUcmFuc2ZlclRyYW5zYWN0aW9uEigucGFjdHVzLkdldFJhd1RyYW5zZmVyVHJhbnNhY3Rpb25S'\n    'ZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5zYWN0aW9uUmVzcG9uc2USYAoVR2V0UmF3Qm9uZF'\n    'RyYW5zYWN0aW9uEiQucGFjdHVzLkdldFJhd0JvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0'\n    'dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJkChdHZXRSYXdVbmJvbmRUcmFuc2FjdGlvbh'\n    'ImLnBhY3R1cy5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3'\n    'VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uEigucGFjdH'\n    'VzLkdldFJhd1dpdGhkcmF3VHJhbnNhY3Rpb25SZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5z'\n    'YWN0aW9uUmVzcG9uc2UScgoeR2V0UmF3QmF0Y2hUcmFuc2ZlclRyYW5zYWN0aW9uEi0ucGFjdH'\n    'VzLkdldFJhd0JhdGNoVHJhbnNmZXJUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3'\n    'VHJhbnNhY3Rpb25SZXNwb25zZRJhChREZWNvZGVSYXdUcmFuc2FjdGlvbhIjLnBhY3R1cy5EZW'\n    'NvZGVSYXdUcmFuc2FjdGlvblJlcXVlc3QaJC5wYWN0dXMuRGVjb2RlUmF3VHJhbnNhY3Rpb25S'\n    'ZXNwb25zZRJVChBDaGVja1RyYW5zYWN0aW9uEh8ucGFjdHVzLkNoZWNrVHJhbnNhY3Rpb25SZX'\n    'F1ZXN0GiAucGFjdHVzLkNoZWNrVHJhbnNhY3Rpb25SZXNwb25zZQ==');\n"
  },
  {
    "path": "www/grpc/gen/dart/transaction.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from transaction.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'transaction.pb.dart' as $0;\nimport 'transaction.pbjson.dart';\n\nexport 'transaction.pb.dart';\n\nabstract class TransactionServiceBase extends $pb.GeneratedService {\n  $async.Future<$0.GetTransactionResponse> getTransaction(\n      $pb.ServerContext ctx, $0.GetTransactionRequest request);\n  $async.Future<$0.CalculateFeeResponse> calculateFee(\n      $pb.ServerContext ctx, $0.CalculateFeeRequest request);\n  $async.Future<$0.BroadcastTransactionResponse> broadcastTransaction(\n      $pb.ServerContext ctx, $0.BroadcastTransactionRequest request);\n  $async.Future<$0.GetRawTransactionResponse> getRawTransferTransaction(\n      $pb.ServerContext ctx, $0.GetRawTransferTransactionRequest request);\n  $async.Future<$0.GetRawTransactionResponse> getRawBondTransaction(\n      $pb.ServerContext ctx, $0.GetRawBondTransactionRequest request);\n  $async.Future<$0.GetRawTransactionResponse> getRawUnbondTransaction(\n      $pb.ServerContext ctx, $0.GetRawUnbondTransactionRequest request);\n  $async.Future<$0.GetRawTransactionResponse> getRawWithdrawTransaction(\n      $pb.ServerContext ctx, $0.GetRawWithdrawTransactionRequest request);\n  $async.Future<$0.GetRawTransactionResponse> getRawBatchTransferTransaction(\n      $pb.ServerContext ctx, $0.GetRawBatchTransferTransactionRequest request);\n  $async.Future<$0.DecodeRawTransactionResponse> decodeRawTransaction(\n      $pb.ServerContext ctx, $0.DecodeRawTransactionRequest request);\n  $async.Future<$0.CheckTransactionResponse> checkTransaction(\n      $pb.ServerContext ctx, $0.CheckTransactionRequest request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'GetTransaction':\n        return $0.GetTransactionRequest();\n      case 'CalculateFee':\n        return $0.CalculateFeeRequest();\n      case 'BroadcastTransaction':\n        return $0.BroadcastTransactionRequest();\n      case 'GetRawTransferTransaction':\n        return $0.GetRawTransferTransactionRequest();\n      case 'GetRawBondTransaction':\n        return $0.GetRawBondTransactionRequest();\n      case 'GetRawUnbondTransaction':\n        return $0.GetRawUnbondTransactionRequest();\n      case 'GetRawWithdrawTransaction':\n        return $0.GetRawWithdrawTransactionRequest();\n      case 'GetRawBatchTransferTransaction':\n        return $0.GetRawBatchTransferTransactionRequest();\n      case 'DecodeRawTransaction':\n        return $0.DecodeRawTransactionRequest();\n      case 'CheckTransaction':\n        return $0.CheckTransactionRequest();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'GetTransaction':\n        return getTransaction(ctx, request as $0.GetTransactionRequest);\n      case 'CalculateFee':\n        return calculateFee(ctx, request as $0.CalculateFeeRequest);\n      case 'BroadcastTransaction':\n        return broadcastTransaction(\n            ctx, request as $0.BroadcastTransactionRequest);\n      case 'GetRawTransferTransaction':\n        return getRawTransferTransaction(\n            ctx, request as $0.GetRawTransferTransactionRequest);\n      case 'GetRawBondTransaction':\n        return getRawBondTransaction(\n            ctx, request as $0.GetRawBondTransactionRequest);\n      case 'GetRawUnbondTransaction':\n        return getRawUnbondTransaction(\n            ctx, request as $0.GetRawUnbondTransactionRequest);\n      case 'GetRawWithdrawTransaction':\n        return getRawWithdrawTransaction(\n            ctx, request as $0.GetRawWithdrawTransactionRequest);\n      case 'GetRawBatchTransferTransaction':\n        return getRawBatchTransferTransaction(\n            ctx, request as $0.GetRawBatchTransferTransactionRequest);\n      case 'DecodeRawTransaction':\n        return decodeRawTransaction(\n            ctx, request as $0.DecodeRawTransactionRequest);\n      case 'CheckTransaction':\n        return checkTransaction(ctx, request as $0.CheckTransactionRequest);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json =>\n      TransactionServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => TransactionServiceBase$messageJson;\n}\n"
  },
  {
    "path": "www/grpc/gen/dart/utils.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from utils.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\n/// Request message for signing a message with a private key.\nclass SignMessageWithPrivateKeyRequest extends $pb.GeneratedMessage {\n  factory SignMessageWithPrivateKeyRequest({\n    $core.String? privateKey,\n    $core.String? message,\n  }) {\n    final result = create();\n    if (privateKey != null) result.privateKey = privateKey;\n    if (message != null) result.message = message;\n    return result;\n  }\n\n  SignMessageWithPrivateKeyRequest._();\n\n  factory SignMessageWithPrivateKeyRequest.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignMessageWithPrivateKeyRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignMessageWithPrivateKeyRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'privateKey')\n    ..aOS(2, _omitFieldNames ? '' : 'message')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageWithPrivateKeyRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageWithPrivateKeyRequest copyWith(\n          void Function(SignMessageWithPrivateKeyRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as SignMessageWithPrivateKeyRequest))\n          as SignMessageWithPrivateKeyRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignMessageWithPrivateKeyRequest create() =>\n      SignMessageWithPrivateKeyRequest._();\n  @$core.override\n  SignMessageWithPrivateKeyRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignMessageWithPrivateKeyRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignMessageWithPrivateKeyRequest>(\n          create);\n  static SignMessageWithPrivateKeyRequest? _defaultInstance;\n\n  /// The private key to sign the message.\n  @$pb.TagNumber(1)\n  $core.String get privateKey => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set privateKey($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPrivateKey() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPrivateKey() => $_clearField(1);\n\n  /// The message content to be signed.\n  @$pb.TagNumber(2)\n  $core.String get message => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set message($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasMessage() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearMessage() => $_clearField(2);\n}\n\n/// Response message contains the signature generated from the message.\nclass SignMessageWithPrivateKeyResponse extends $pb.GeneratedMessage {\n  factory SignMessageWithPrivateKeyResponse({\n    $core.String? signature,\n  }) {\n    final result = create();\n    if (signature != null) result.signature = signature;\n    return result;\n  }\n\n  SignMessageWithPrivateKeyResponse._();\n\n  factory SignMessageWithPrivateKeyResponse.fromBuffer(\n          $core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignMessageWithPrivateKeyResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignMessageWithPrivateKeyResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'signature')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageWithPrivateKeyResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageWithPrivateKeyResponse copyWith(\n          void Function(SignMessageWithPrivateKeyResponse) updates) =>\n      super.copyWith((message) =>\n              updates(message as SignMessageWithPrivateKeyResponse))\n          as SignMessageWithPrivateKeyResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignMessageWithPrivateKeyResponse create() =>\n      SignMessageWithPrivateKeyResponse._();\n  @$core.override\n  SignMessageWithPrivateKeyResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignMessageWithPrivateKeyResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignMessageWithPrivateKeyResponse>(\n          create);\n  static SignMessageWithPrivateKeyResponse? _defaultInstance;\n\n  /// The resulting signature in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get signature => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set signature($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSignature() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSignature() => $_clearField(1);\n}\n\n/// Request message for verifying a message signature.\nclass VerifyMessageRequest extends $pb.GeneratedMessage {\n  factory VerifyMessageRequest({\n    $core.String? message,\n    $core.String? signature,\n    $core.String? publicKey,\n  }) {\n    final result = create();\n    if (message != null) result.message = message;\n    if (signature != null) result.signature = signature;\n    if (publicKey != null) result.publicKey = publicKey;\n    return result;\n  }\n\n  VerifyMessageRequest._();\n\n  factory VerifyMessageRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory VerifyMessageRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'VerifyMessageRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'message')\n    ..aOS(2, _omitFieldNames ? '' : 'signature')\n    ..aOS(3, _omitFieldNames ? '' : 'publicKey')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VerifyMessageRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VerifyMessageRequest copyWith(void Function(VerifyMessageRequest) updates) =>\n      super.copyWith((message) => updates(message as VerifyMessageRequest))\n          as VerifyMessageRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static VerifyMessageRequest create() => VerifyMessageRequest._();\n  @$core.override\n  VerifyMessageRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static VerifyMessageRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<VerifyMessageRequest>(create);\n  static VerifyMessageRequest? _defaultInstance;\n\n  /// The original message content that was signed.\n  @$pb.TagNumber(1)\n  $core.String get message => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set message($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMessage() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMessage() => $_clearField(1);\n\n  /// The signature to verify in hexadecimal format.\n  @$pb.TagNumber(2)\n  $core.String get signature => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set signature($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSignature() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSignature() => $_clearField(2);\n\n  /// The public key of the signer.\n  @$pb.TagNumber(3)\n  $core.String get publicKey => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set publicKey($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPublicKey() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPublicKey() => $_clearField(3);\n}\n\n/// Response message contains the verification result.\nclass VerifyMessageResponse extends $pb.GeneratedMessage {\n  factory VerifyMessageResponse({\n    $core.bool? isValid,\n  }) {\n    final result = create();\n    if (isValid != null) result.isValid = isValid;\n    return result;\n  }\n\n  VerifyMessageResponse._();\n\n  factory VerifyMessageResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory VerifyMessageResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'VerifyMessageResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOB(1, _omitFieldNames ? '' : 'isValid')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VerifyMessageResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  VerifyMessageResponse copyWith(\n          void Function(VerifyMessageResponse) updates) =>\n      super.copyWith((message) => updates(message as VerifyMessageResponse))\n          as VerifyMessageResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static VerifyMessageResponse create() => VerifyMessageResponse._();\n  @$core.override\n  VerifyMessageResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static VerifyMessageResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<VerifyMessageResponse>(create);\n  static VerifyMessageResponse? _defaultInstance;\n\n  /// Boolean indicating whether the signature is valid for the given message and public key.\n  @$pb.TagNumber(1)\n  $core.bool get isValid => $_getBF(0);\n  @$pb.TagNumber(1)\n  set isValid($core.bool value) => $_setBool(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasIsValid() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearIsValid() => $_clearField(1);\n}\n\n/// Request message for aggregating multiple BLS public keys.\nclass PublicKeyAggregationRequest extends $pb.GeneratedMessage {\n  factory PublicKeyAggregationRequest({\n    $core.Iterable<$core.String>? publicKeys,\n  }) {\n    final result = create();\n    if (publicKeys != null) result.publicKeys.addAll(publicKeys);\n    return result;\n  }\n\n  PublicKeyAggregationRequest._();\n\n  factory PublicKeyAggregationRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PublicKeyAggregationRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PublicKeyAggregationRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'publicKeys')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PublicKeyAggregationRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PublicKeyAggregationRequest copyWith(\n          void Function(PublicKeyAggregationRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as PublicKeyAggregationRequest))\n          as PublicKeyAggregationRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PublicKeyAggregationRequest create() =>\n      PublicKeyAggregationRequest._();\n  @$core.override\n  PublicKeyAggregationRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PublicKeyAggregationRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PublicKeyAggregationRequest>(create);\n  static PublicKeyAggregationRequest? _defaultInstance;\n\n  /// List of BLS public keys to be aggregated.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get publicKeys => $_getList(0);\n}\n\n/// Response message contains the aggregated BLS public key result.\nclass PublicKeyAggregationResponse extends $pb.GeneratedMessage {\n  factory PublicKeyAggregationResponse({\n    $core.String? publicKey,\n    $core.String? address,\n  }) {\n    final result = create();\n    if (publicKey != null) result.publicKey = publicKey;\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  PublicKeyAggregationResponse._();\n\n  factory PublicKeyAggregationResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory PublicKeyAggregationResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'PublicKeyAggregationResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'publicKey')\n    ..aOS(2, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PublicKeyAggregationResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  PublicKeyAggregationResponse copyWith(\n          void Function(PublicKeyAggregationResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as PublicKeyAggregationResponse))\n          as PublicKeyAggregationResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static PublicKeyAggregationResponse create() =>\n      PublicKeyAggregationResponse._();\n  @$core.override\n  PublicKeyAggregationResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static PublicKeyAggregationResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<PublicKeyAggregationResponse>(create);\n  static PublicKeyAggregationResponse? _defaultInstance;\n\n  /// The aggregated BLS public key.\n  @$pb.TagNumber(1)\n  $core.String get publicKey => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set publicKey($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPublicKey() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPublicKey() => $_clearField(1);\n\n  /// The blockchain address derived from the aggregated public key.\n  @$pb.TagNumber(2)\n  $core.String get address => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set address($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddress() => $_clearField(2);\n}\n\n/// Request message for aggregating multiple BLS signatures.\nclass SignatureAggregationRequest extends $pb.GeneratedMessage {\n  factory SignatureAggregationRequest({\n    $core.Iterable<$core.String>? signatures,\n  }) {\n    final result = create();\n    if (signatures != null) result.signatures.addAll(signatures);\n    return result;\n  }\n\n  SignatureAggregationRequest._();\n\n  factory SignatureAggregationRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignatureAggregationRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignatureAggregationRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'signatures')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignatureAggregationRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignatureAggregationRequest copyWith(\n          void Function(SignatureAggregationRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as SignatureAggregationRequest))\n          as SignatureAggregationRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignatureAggregationRequest create() =>\n      SignatureAggregationRequest._();\n  @$core.override\n  SignatureAggregationRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignatureAggregationRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignatureAggregationRequest>(create);\n  static SignatureAggregationRequest? _defaultInstance;\n\n  /// List of BLS signatures to be aggregated.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get signatures => $_getList(0);\n}\n\n/// Response message contains the aggregated BLS signature.\nclass SignatureAggregationResponse extends $pb.GeneratedMessage {\n  factory SignatureAggregationResponse({\n    $core.String? signature,\n  }) {\n    final result = create();\n    if (signature != null) result.signature = signature;\n    return result;\n  }\n\n  SignatureAggregationResponse._();\n\n  factory SignatureAggregationResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignatureAggregationResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignatureAggregationResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'signature')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignatureAggregationResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignatureAggregationResponse copyWith(\n          void Function(SignatureAggregationResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as SignatureAggregationResponse))\n          as SignatureAggregationResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignatureAggregationResponse create() =>\n      SignatureAggregationResponse._();\n  @$core.override\n  SignatureAggregationResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignatureAggregationResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignatureAggregationResponse>(create);\n  static SignatureAggregationResponse? _defaultInstance;\n\n  /// The aggregated BLS signature in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get signature => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set signature($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSignature() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSignature() => $_clearField(1);\n}\n\n/// Utils service defines RPC methods for utility functions such as message\n/// signing, verification, and other cryptographic operations.\nclass UtilsApi {\n  final $pb.RpcClient _client;\n\n  UtilsApi(this._client);\n\n  /// SignMessageWithPrivateKey signs a message with the provided private key.\n  $async.Future<SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey(\n          $pb.ClientContext? ctx, SignMessageWithPrivateKeyRequest request) =>\n      _client.invoke<SignMessageWithPrivateKeyResponse>(\n          ctx,\n          'Utils',\n          'SignMessageWithPrivateKey',\n          request,\n          SignMessageWithPrivateKeyResponse());\n\n  /// VerifyMessage verifies a signature against the public key and message.\n  $async.Future<VerifyMessageResponse> verifyMessage(\n          $pb.ClientContext? ctx, VerifyMessageRequest request) =>\n      _client.invoke<VerifyMessageResponse>(\n          ctx, 'Utils', 'VerifyMessage', request, VerifyMessageResponse());\n\n  /// PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n  $async.Future<PublicKeyAggregationResponse> publicKeyAggregation(\n          $pb.ClientContext? ctx, PublicKeyAggregationRequest request) =>\n      _client.invoke<PublicKeyAggregationResponse>(ctx, 'Utils',\n          'PublicKeyAggregation', request, PublicKeyAggregationResponse());\n\n  /// SignatureAggregation aggregates multiple BLS signatures into a single signature.\n  $async.Future<SignatureAggregationResponse> signatureAggregation(\n          $pb.ClientContext? ctx, SignatureAggregationRequest request) =>\n      _client.invoke<SignatureAggregationResponse>(ctx, 'Utils',\n          'SignatureAggregation', request, SignatureAggregationResponse());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/utils.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from utils.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n"
  },
  {
    "path": "www/grpc/gen/dart/utils.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from utils.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use signMessageWithPrivateKeyRequestDescriptor instead')\nconst SignMessageWithPrivateKeyRequest$json = {\n  '1': 'SignMessageWithPrivateKeyRequest',\n  '2': [\n    {'1': 'private_key', '3': 1, '4': 1, '5': 9, '10': 'privateKey'},\n    {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'},\n  ],\n};\n\n/// Descriptor for `SignMessageWithPrivateKeyRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signMessageWithPrivateKeyRequestDescriptor =\n    $convert.base64Decode(\n        'CiBTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVxdWVzdBIfCgtwcml2YXRlX2tleRgBIAEoCV'\n        'IKcHJpdmF0ZUtleRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdl');\n\n@$core.Deprecated('Use signMessageWithPrivateKeyResponseDescriptor instead')\nconst SignMessageWithPrivateKeyResponse$json = {\n  '1': 'SignMessageWithPrivateKeyResponse',\n  '2': [\n    {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'},\n  ],\n};\n\n/// Descriptor for `SignMessageWithPrivateKeyResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signMessageWithPrivateKeyResponseDescriptor =\n    $convert.base64Decode(\n        'CiFTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVzcG9uc2USHAoJc2lnbmF0dXJlGAEgASgJUg'\n        'lzaWduYXR1cmU=');\n\n@$core.Deprecated('Use verifyMessageRequestDescriptor instead')\nconst VerifyMessageRequest$json = {\n  '1': 'VerifyMessageRequest',\n  '2': [\n    {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'},\n    {'1': 'signature', '3': 2, '4': 1, '5': 9, '10': 'signature'},\n    {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'},\n  ],\n};\n\n/// Descriptor for `VerifyMessageRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List verifyMessageRequestDescriptor = $convert.base64Decode(\n    'ChRWZXJpZnlNZXNzYWdlUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEhwKCXNpZ2'\n    '5hdHVyZRgCIAEoCVIJc2lnbmF0dXJlEh0KCnB1YmxpY19rZXkYAyABKAlSCXB1YmxpY0tleQ==');\n\n@$core.Deprecated('Use verifyMessageResponseDescriptor instead')\nconst VerifyMessageResponse$json = {\n  '1': 'VerifyMessageResponse',\n  '2': [\n    {'1': 'is_valid', '3': 1, '4': 1, '5': 8, '10': 'isValid'},\n  ],\n};\n\n/// Descriptor for `VerifyMessageResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List verifyMessageResponseDescriptor =\n    $convert.base64Decode(\n        'ChVWZXJpZnlNZXNzYWdlUmVzcG9uc2USGQoIaXNfdmFsaWQYASABKAhSB2lzVmFsaWQ=');\n\n@$core.Deprecated('Use publicKeyAggregationRequestDescriptor instead')\nconst PublicKeyAggregationRequest$json = {\n  '1': 'PublicKeyAggregationRequest',\n  '2': [\n    {'1': 'public_keys', '3': 1, '4': 3, '5': 9, '10': 'publicKeys'},\n  ],\n};\n\n/// Descriptor for `PublicKeyAggregationRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List publicKeyAggregationRequestDescriptor =\n    $convert.base64Decode(\n        'ChtQdWJsaWNLZXlBZ2dyZWdhdGlvblJlcXVlc3QSHwoLcHVibGljX2tleXMYASADKAlSCnB1Ym'\n        'xpY0tleXM=');\n\n@$core.Deprecated('Use publicKeyAggregationResponseDescriptor instead')\nconst PublicKeyAggregationResponse$json = {\n  '1': 'PublicKeyAggregationResponse',\n  '2': [\n    {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `PublicKeyAggregationResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List publicKeyAggregationResponseDescriptor =\n    $convert.base64Decode(\n        'ChxQdWJsaWNLZXlBZ2dyZWdhdGlvblJlc3BvbnNlEh0KCnB1YmxpY19rZXkYASABKAlSCXB1Ym'\n        'xpY0tleRIYCgdhZGRyZXNzGAIgASgJUgdhZGRyZXNz');\n\n@$core.Deprecated('Use signatureAggregationRequestDescriptor instead')\nconst SignatureAggregationRequest$json = {\n  '1': 'SignatureAggregationRequest',\n  '2': [\n    {'1': 'signatures', '3': 1, '4': 3, '5': 9, '10': 'signatures'},\n  ],\n};\n\n/// Descriptor for `SignatureAggregationRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signatureAggregationRequestDescriptor =\n    $convert.base64Decode(\n        'ChtTaWduYXR1cmVBZ2dyZWdhdGlvblJlcXVlc3QSHgoKc2lnbmF0dXJlcxgBIAMoCVIKc2lnbm'\n        'F0dXJlcw==');\n\n@$core.Deprecated('Use signatureAggregationResponseDescriptor instead')\nconst SignatureAggregationResponse$json = {\n  '1': 'SignatureAggregationResponse',\n  '2': [\n    {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'},\n  ],\n};\n\n/// Descriptor for `SignatureAggregationResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signatureAggregationResponseDescriptor =\n    $convert.base64Decode(\n        'ChxTaWduYXR1cmVBZ2dyZWdhdGlvblJlc3BvbnNlEhwKCXNpZ25hdHVyZRgBIAEoCVIJc2lnbm'\n        'F0dXJl');\n\nconst $core.Map<$core.String, $core.dynamic> UtilsServiceBase$json = {\n  '1': 'Utils',\n  '2': [\n    {\n      '1': 'SignMessageWithPrivateKey',\n      '2': '.pactus.SignMessageWithPrivateKeyRequest',\n      '3': '.pactus.SignMessageWithPrivateKeyResponse'\n    },\n    {\n      '1': 'VerifyMessage',\n      '2': '.pactus.VerifyMessageRequest',\n      '3': '.pactus.VerifyMessageResponse'\n    },\n    {\n      '1': 'PublicKeyAggregation',\n      '2': '.pactus.PublicKeyAggregationRequest',\n      '3': '.pactus.PublicKeyAggregationResponse'\n    },\n    {\n      '1': 'SignatureAggregation',\n      '2': '.pactus.SignatureAggregationRequest',\n      '3': '.pactus.SignatureAggregationResponse'\n    },\n  ],\n};\n\n@$core.Deprecated('Use utilsServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    UtilsServiceBase$messageJson = {\n  '.pactus.SignMessageWithPrivateKeyRequest':\n      SignMessageWithPrivateKeyRequest$json,\n  '.pactus.SignMessageWithPrivateKeyResponse':\n      SignMessageWithPrivateKeyResponse$json,\n  '.pactus.VerifyMessageRequest': VerifyMessageRequest$json,\n  '.pactus.VerifyMessageResponse': VerifyMessageResponse$json,\n  '.pactus.PublicKeyAggregationRequest': PublicKeyAggregationRequest$json,\n  '.pactus.PublicKeyAggregationResponse': PublicKeyAggregationResponse$json,\n  '.pactus.SignatureAggregationRequest': SignatureAggregationRequest$json,\n  '.pactus.SignatureAggregationResponse': SignatureAggregationResponse$json,\n};\n\n/// Descriptor for `Utils`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List utilsServiceDescriptor = $convert.base64Decode(\n    'CgVVdGlscxJwChlTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5EigucGFjdHVzLlNpZ25NZXNzYW'\n    'dlV2l0aFByaXZhdGVLZXlSZXF1ZXN0GikucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVL'\n    'ZXlSZXNwb25zZRJMCg1WZXJpZnlNZXNzYWdlEhwucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXF1ZX'\n    'N0Gh0ucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXNwb25zZRJhChRQdWJsaWNLZXlBZ2dyZWdhdGlv'\n    'bhIjLnBhY3R1cy5QdWJsaWNLZXlBZ2dyZWdhdGlvblJlcXVlc3QaJC5wYWN0dXMuUHVibGljS2'\n    'V5QWdncmVnYXRpb25SZXNwb25zZRJhChRTaWduYXR1cmVBZ2dyZWdhdGlvbhIjLnBhY3R1cy5T'\n    'aWduYXR1cmVBZ2dyZWdhdGlvblJlcXVlc3QaJC5wYWN0dXMuU2lnbmF0dXJlQWdncmVnYXRpb2'\n    '5SZXNwb25zZQ==');\n"
  },
  {
    "path": "www/grpc/gen/dart/utils.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from utils.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'utils.pb.dart' as $0;\nimport 'utils.pbjson.dart';\n\nexport 'utils.pb.dart';\n\nabstract class UtilsServiceBase extends $pb.GeneratedService {\n  $async.Future<$0.SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey(\n      $pb.ServerContext ctx, $0.SignMessageWithPrivateKeyRequest request);\n  $async.Future<$0.VerifyMessageResponse> verifyMessage(\n      $pb.ServerContext ctx, $0.VerifyMessageRequest request);\n  $async.Future<$0.PublicKeyAggregationResponse> publicKeyAggregation(\n      $pb.ServerContext ctx, $0.PublicKeyAggregationRequest request);\n  $async.Future<$0.SignatureAggregationResponse> signatureAggregation(\n      $pb.ServerContext ctx, $0.SignatureAggregationRequest request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'SignMessageWithPrivateKey':\n        return $0.SignMessageWithPrivateKeyRequest();\n      case 'VerifyMessage':\n        return $0.VerifyMessageRequest();\n      case 'PublicKeyAggregation':\n        return $0.PublicKeyAggregationRequest();\n      case 'SignatureAggregation':\n        return $0.SignatureAggregationRequest();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'SignMessageWithPrivateKey':\n        return signMessageWithPrivateKey(\n            ctx, request as $0.SignMessageWithPrivateKeyRequest);\n      case 'VerifyMessage':\n        return verifyMessage(ctx, request as $0.VerifyMessageRequest);\n      case 'PublicKeyAggregation':\n        return publicKeyAggregation(\n            ctx, request as $0.PublicKeyAggregationRequest);\n      case 'SignatureAggregation':\n        return signatureAggregation(\n            ctx, request as $0.SignatureAggregationRequest);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json => UtilsServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => UtilsServiceBase$messageJson;\n}\n"
  },
  {
    "path": "www/grpc/gen/dart/wallet.pb.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from wallet.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:fixnum/fixnum.dart' as $fixnum;\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'transaction.pbenum.dart' as $0;\nimport 'wallet.pbenum.dart';\n\nexport 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;\n\nexport 'wallet.pbenum.dart';\n\n/// AddressInfo contains detailed information about a wallet address.\nclass AddressInfo extends $pb.GeneratedMessage {\n  factory AddressInfo({\n    $core.String? address,\n    $core.String? publicKey,\n    $core.String? label,\n    $core.String? path,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    if (publicKey != null) result.publicKey = publicKey;\n    if (label != null) result.label = label;\n    if (path != null) result.path = path;\n    return result;\n  }\n\n  AddressInfo._();\n\n  factory AddressInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory AddressInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'AddressInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..aOS(2, _omitFieldNames ? '' : 'publicKey')\n    ..aOS(3, _omitFieldNames ? '' : 'label')\n    ..aOS(4, _omitFieldNames ? '' : 'path')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  AddressInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  AddressInfo copyWith(void Function(AddressInfo) updates) =>\n      super.copyWith((message) => updates(message as AddressInfo))\n          as AddressInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static AddressInfo create() => AddressInfo._();\n  @$core.override\n  AddressInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static AddressInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<AddressInfo>(create);\n  static AddressInfo? _defaultInstance;\n\n  /// The address string.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n\n  /// The public key associated with the address.\n  @$pb.TagNumber(2)\n  $core.String get publicKey => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set publicKey($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPublicKey() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPublicKey() => $_clearField(2);\n\n  /// A human-readable label associated with the address.\n  @$pb.TagNumber(3)\n  $core.String get label => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set label($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasLabel() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearLabel() => $_clearField(3);\n\n  /// The Hierarchical Deterministic (HD) path of the address within the wallet.\n  @$pb.TagNumber(4)\n  $core.String get path => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set path($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPath() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearPath() => $_clearField(4);\n}\n\n/// Request message for generating a new wallet address.\nclass GetNewAddressRequest extends $pb.GeneratedMessage {\n  factory GetNewAddressRequest({\n    $core.String? walletName,\n    AddressType? addressType,\n    $core.String? label,\n    $core.String? password,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (addressType != null) result.addressType = addressType;\n    if (label != null) result.label = label;\n    if (password != null) result.password = password;\n    return result;\n  }\n\n  GetNewAddressRequest._();\n\n  factory GetNewAddressRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNewAddressRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNewAddressRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aE<AddressType>(2, _omitFieldNames ? '' : 'addressType',\n        enumValues: AddressType.values)\n    ..aOS(3, _omitFieldNames ? '' : 'label')\n    ..aOS(4, _omitFieldNames ? '' : 'password')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNewAddressRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNewAddressRequest copyWith(void Function(GetNewAddressRequest) updates) =>\n      super.copyWith((message) => updates(message as GetNewAddressRequest))\n          as GetNewAddressRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNewAddressRequest create() => GetNewAddressRequest._();\n  @$core.override\n  GetNewAddressRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNewAddressRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNewAddressRequest>(create);\n  static GetNewAddressRequest? _defaultInstance;\n\n  /// The name of the wallet to generate a new address.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The type of address to generate.\n  @$pb.TagNumber(2)\n  AddressType get addressType => $_getN(1);\n  @$pb.TagNumber(2)\n  set addressType(AddressType value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddressType() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddressType() => $_clearField(2);\n\n  /// A label for the new address.\n  @$pb.TagNumber(3)\n  $core.String get label => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set label($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasLabel() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearLabel() => $_clearField(3);\n\n  /// Password for the new address. It's required when address_type is Ed25519 type.\n  @$pb.TagNumber(4)\n  $core.String get password => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set password($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasPassword() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearPassword() => $_clearField(4);\n}\n\n/// Response message contains newly generated address information.\nclass GetNewAddressResponse extends $pb.GeneratedMessage {\n  factory GetNewAddressResponse({\n    $core.String? walletName,\n    AddressInfo? addr,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (addr != null) result.addr = addr;\n    return result;\n  }\n\n  GetNewAddressResponse._();\n\n  factory GetNewAddressResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetNewAddressResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetNewAddressResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOM<AddressInfo>(2, _omitFieldNames ? '' : 'addr',\n        subBuilder: AddressInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNewAddressResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetNewAddressResponse copyWith(\n          void Function(GetNewAddressResponse) updates) =>\n      super.copyWith((message) => updates(message as GetNewAddressResponse))\n          as GetNewAddressResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetNewAddressResponse create() => GetNewAddressResponse._();\n  @$core.override\n  GetNewAddressResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetNewAddressResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetNewAddressResponse>(create);\n  static GetNewAddressResponse? _defaultInstance;\n\n  /// The name of the wallet where address was generated.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Detailed information about the new address.\n  @$pb.TagNumber(2)\n  AddressInfo get addr => $_getN(1);\n  @$pb.TagNumber(2)\n  set addr(AddressInfo value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddr() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddr() => $_clearField(2);\n  @$pb.TagNumber(2)\n  AddressInfo ensureAddr() => $_ensure(1);\n}\n\n/// Request message for restoring a wallet from mnemonic (seed phrase).\nclass RestoreWalletRequest extends $pb.GeneratedMessage {\n  factory RestoreWalletRequest({\n    $core.String? walletName,\n    $core.String? mnemonic,\n    $core.String? password,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (mnemonic != null) result.mnemonic = mnemonic;\n    if (password != null) result.password = password;\n    return result;\n  }\n\n  RestoreWalletRequest._();\n\n  factory RestoreWalletRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory RestoreWalletRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'RestoreWalletRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'mnemonic')\n    ..aOS(3, _omitFieldNames ? '' : 'password')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RestoreWalletRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RestoreWalletRequest copyWith(void Function(RestoreWalletRequest) updates) =>\n      super.copyWith((message) => updates(message as RestoreWalletRequest))\n          as RestoreWalletRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static RestoreWalletRequest create() => RestoreWalletRequest._();\n  @$core.override\n  RestoreWalletRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static RestoreWalletRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<RestoreWalletRequest>(create);\n  static RestoreWalletRequest? _defaultInstance;\n\n  /// The name for the restored wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The mnemonic (seed phrase) for wallet recovery.\n  @$pb.TagNumber(2)\n  $core.String get mnemonic => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set mnemonic($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasMnemonic() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearMnemonic() => $_clearField(2);\n\n  /// Password to secure the restored wallet.\n  @$pb.TagNumber(3)\n  $core.String get password => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set password($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPassword() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPassword() => $_clearField(3);\n}\n\n/// Response message confirming wallet restoration.\nclass RestoreWalletResponse extends $pb.GeneratedMessage {\n  factory RestoreWalletResponse({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  RestoreWalletResponse._();\n\n  factory RestoreWalletResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory RestoreWalletResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'RestoreWalletResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RestoreWalletResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  RestoreWalletResponse copyWith(\n          void Function(RestoreWalletResponse) updates) =>\n      super.copyWith((message) => updates(message as RestoreWalletResponse))\n          as RestoreWalletResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static RestoreWalletResponse create() => RestoreWalletResponse._();\n  @$core.override\n  RestoreWalletResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static RestoreWalletResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<RestoreWalletResponse>(create);\n  static RestoreWalletResponse? _defaultInstance;\n\n  /// The name of the restored wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Request message for creating a new wallet.\nclass CreateWalletRequest extends $pb.GeneratedMessage {\n  factory CreateWalletRequest({\n    $core.String? walletName,\n    $core.String? password,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (password != null) result.password = password;\n    return result;\n  }\n\n  CreateWalletRequest._();\n\n  factory CreateWalletRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CreateWalletRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CreateWalletRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'password')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CreateWalletRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CreateWalletRequest copyWith(void Function(CreateWalletRequest) updates) =>\n      super.copyWith((message) => updates(message as CreateWalletRequest))\n          as CreateWalletRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CreateWalletRequest create() => CreateWalletRequest._();\n  @$core.override\n  CreateWalletRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CreateWalletRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CreateWalletRequest>(create);\n  static CreateWalletRequest? _defaultInstance;\n\n  /// The name for the new wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Password to secure the new wallet.\n  @$pb.TagNumber(2)\n  $core.String get password => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set password($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPassword() => $_clearField(2);\n}\n\n/// Response message contains wallet recovery mnemonic (seed phrase).\nclass CreateWalletResponse extends $pb.GeneratedMessage {\n  factory CreateWalletResponse({\n    $core.String? walletName,\n    $core.String? mnemonic,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (mnemonic != null) result.mnemonic = mnemonic;\n    return result;\n  }\n\n  CreateWalletResponse._();\n\n  factory CreateWalletResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory CreateWalletResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'CreateWalletResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'mnemonic')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CreateWalletResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  CreateWalletResponse copyWith(void Function(CreateWalletResponse) updates) =>\n      super.copyWith((message) => updates(message as CreateWalletResponse))\n          as CreateWalletResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static CreateWalletResponse create() => CreateWalletResponse._();\n  @$core.override\n  CreateWalletResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static CreateWalletResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<CreateWalletResponse>(create);\n  static CreateWalletResponse? _defaultInstance;\n\n  /// The name for the new wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The mnemonic (seed phrase) for wallet recovery.\n  @$pb.TagNumber(2)\n  $core.String get mnemonic => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set mnemonic($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasMnemonic() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearMnemonic() => $_clearField(2);\n}\n\n/// Request message for loading an existing wallet.\n/// Deprecated: It will be removed in a future version.\nclass LoadWalletRequest extends $pb.GeneratedMessage {\n  factory LoadWalletRequest({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  LoadWalletRequest._();\n\n  factory LoadWalletRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory LoadWalletRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'LoadWalletRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  LoadWalletRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  LoadWalletRequest copyWith(void Function(LoadWalletRequest) updates) =>\n      super.copyWith((message) => updates(message as LoadWalletRequest))\n          as LoadWalletRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static LoadWalletRequest create() => LoadWalletRequest._();\n  @$core.override\n  LoadWalletRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static LoadWalletRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<LoadWalletRequest>(create);\n  static LoadWalletRequest? _defaultInstance;\n\n  /// The name of the wallet to load.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Response message confirming wallet loaded.\n/// Deprecated: It will be removed in a future version.\nclass LoadWalletResponse extends $pb.GeneratedMessage {\n  factory LoadWalletResponse({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  LoadWalletResponse._();\n\n  factory LoadWalletResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory LoadWalletResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'LoadWalletResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  LoadWalletResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  LoadWalletResponse copyWith(void Function(LoadWalletResponse) updates) =>\n      super.copyWith((message) => updates(message as LoadWalletResponse))\n          as LoadWalletResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static LoadWalletResponse create() => LoadWalletResponse._();\n  @$core.override\n  LoadWalletResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static LoadWalletResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<LoadWalletResponse>(create);\n  static LoadWalletResponse? _defaultInstance;\n\n  /// The name of the loaded wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Request message for unloading a wallet.\n/// Deprecated: It will be removed in a future version.\nclass UnloadWalletRequest extends $pb.GeneratedMessage {\n  factory UnloadWalletRequest({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  UnloadWalletRequest._();\n\n  factory UnloadWalletRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UnloadWalletRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UnloadWalletRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UnloadWalletRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UnloadWalletRequest copyWith(void Function(UnloadWalletRequest) updates) =>\n      super.copyWith((message) => updates(message as UnloadWalletRequest))\n          as UnloadWalletRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UnloadWalletRequest create() => UnloadWalletRequest._();\n  @$core.override\n  UnloadWalletRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UnloadWalletRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UnloadWalletRequest>(create);\n  static UnloadWalletRequest? _defaultInstance;\n\n  /// The name of the wallet to unload.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Response message confirming wallet unloading.\n/// Deprecated: It will be removed in a future version.\nclass UnloadWalletResponse extends $pb.GeneratedMessage {\n  factory UnloadWalletResponse({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  UnloadWalletResponse._();\n\n  factory UnloadWalletResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UnloadWalletResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UnloadWalletResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UnloadWalletResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UnloadWalletResponse copyWith(void Function(UnloadWalletResponse) updates) =>\n      super.copyWith((message) => updates(message as UnloadWalletResponse))\n          as UnloadWalletResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UnloadWalletResponse create() => UnloadWalletResponse._();\n  @$core.override\n  UnloadWalletResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UnloadWalletResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UnloadWalletResponse>(create);\n  static UnloadWalletResponse? _defaultInstance;\n\n  /// The name of the unloaded wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Request message for obtaining the validator address associated with a public key.\nclass GetValidatorAddressRequest extends $pb.GeneratedMessage {\n  factory GetValidatorAddressRequest({\n    $core.String? publicKey,\n  }) {\n    final result = create();\n    if (publicKey != null) result.publicKey = publicKey;\n    return result;\n  }\n\n  GetValidatorAddressRequest._();\n\n  factory GetValidatorAddressRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorAddressRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorAddressRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'publicKey')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressRequest copyWith(\n          void Function(GetValidatorAddressRequest) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetValidatorAddressRequest))\n          as GetValidatorAddressRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressRequest create() => GetValidatorAddressRequest._();\n  @$core.override\n  GetValidatorAddressRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorAddressRequest>(create);\n  static GetValidatorAddressRequest? _defaultInstance;\n\n  /// The public key of the validator.\n  @$pb.TagNumber(1)\n  $core.String get publicKey => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set publicKey($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPublicKey() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPublicKey() => $_clearField(1);\n}\n\n/// Response message containing the validator address corresponding to a public key.\nclass GetValidatorAddressResponse extends $pb.GeneratedMessage {\n  factory GetValidatorAddressResponse({\n    $core.String? address,\n  }) {\n    final result = create();\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetValidatorAddressResponse._();\n\n  factory GetValidatorAddressResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetValidatorAddressResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetValidatorAddressResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetValidatorAddressResponse copyWith(\n          void Function(GetValidatorAddressResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as GetValidatorAddressResponse))\n          as GetValidatorAddressResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressResponse create() =>\n      GetValidatorAddressResponse._();\n  @$core.override\n  GetValidatorAddressResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetValidatorAddressResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetValidatorAddressResponse>(create);\n  static GetValidatorAddressResponse? _defaultInstance;\n\n  /// The validator address associated with the public key.\n  @$pb.TagNumber(1)\n  $core.String get address => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set address($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasAddress() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearAddress() => $_clearField(1);\n}\n\n/// Request message for signing a raw transaction.\nclass SignRawTransactionRequest extends $pb.GeneratedMessage {\n  factory SignRawTransactionRequest({\n    $core.String? walletName,\n    $core.String? rawTransaction,\n    $core.String? password,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (rawTransaction != null) result.rawTransaction = rawTransaction;\n    if (password != null) result.password = password;\n    return result;\n  }\n\n  SignRawTransactionRequest._();\n\n  factory SignRawTransactionRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignRawTransactionRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignRawTransactionRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'rawTransaction')\n    ..aOS(3, _omitFieldNames ? '' : 'password')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignRawTransactionRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignRawTransactionRequest copyWith(\n          void Function(SignRawTransactionRequest) updates) =>\n      super.copyWith((message) => updates(message as SignRawTransactionRequest))\n          as SignRawTransactionRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignRawTransactionRequest create() => SignRawTransactionRequest._();\n  @$core.override\n  SignRawTransactionRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignRawTransactionRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignRawTransactionRequest>(create);\n  static SignRawTransactionRequest? _defaultInstance;\n\n  /// The name of the wallet used for signing.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The raw transaction data to be signed.\n  @$pb.TagNumber(2)\n  $core.String get rawTransaction => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set rawTransaction($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasRawTransaction() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearRawTransaction() => $_clearField(2);\n\n  /// Wallet password required for signing.\n  @$pb.TagNumber(3)\n  $core.String get password => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set password($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasPassword() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearPassword() => $_clearField(3);\n}\n\n/// Response message contains the transaction ID and signed raw transaction.\nclass SignRawTransactionResponse extends $pb.GeneratedMessage {\n  factory SignRawTransactionResponse({\n    $core.String? transactionId,\n    $core.String? signedRawTransaction,\n  }) {\n    final result = create();\n    if (transactionId != null) result.transactionId = transactionId;\n    if (signedRawTransaction != null)\n      result.signedRawTransaction = signedRawTransaction;\n    return result;\n  }\n\n  SignRawTransactionResponse._();\n\n  factory SignRawTransactionResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignRawTransactionResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignRawTransactionResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'transactionId')\n    ..aOS(2, _omitFieldNames ? '' : 'signedRawTransaction')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignRawTransactionResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignRawTransactionResponse copyWith(\n          void Function(SignRawTransactionResponse) updates) =>\n      super.copyWith(\n              (message) => updates(message as SignRawTransactionResponse))\n          as SignRawTransactionResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignRawTransactionResponse create() => SignRawTransactionResponse._();\n  @$core.override\n  SignRawTransactionResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignRawTransactionResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignRawTransactionResponse>(create);\n  static SignRawTransactionResponse? _defaultInstance;\n\n  /// The ID of the signed transaction.\n  @$pb.TagNumber(1)\n  $core.String get transactionId => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set transactionId($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasTransactionId() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearTransactionId() => $_clearField(1);\n\n  /// The signed raw transaction data.\n  @$pb.TagNumber(2)\n  $core.String get signedRawTransaction => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set signedRawTransaction($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasSignedRawTransaction() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearSignedRawTransaction() => $_clearField(2);\n}\n\n/// Request message for obtaining the total available balance of a wallet.\nclass GetTotalBalanceRequest extends $pb.GeneratedMessage {\n  factory GetTotalBalanceRequest({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  GetTotalBalanceRequest._();\n\n  factory GetTotalBalanceRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTotalBalanceRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTotalBalanceRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalBalanceRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalBalanceRequest copyWith(\n          void Function(GetTotalBalanceRequest) updates) =>\n      super.copyWith((message) => updates(message as GetTotalBalanceRequest))\n          as GetTotalBalanceRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTotalBalanceRequest create() => GetTotalBalanceRequest._();\n  @$core.override\n  GetTotalBalanceRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTotalBalanceRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTotalBalanceRequest>(create);\n  static GetTotalBalanceRequest? _defaultInstance;\n\n  /// The name of the wallet to get the total balance.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Response message contains the total available balance of the wallet.\nclass GetTotalBalanceResponse extends $pb.GeneratedMessage {\n  factory GetTotalBalanceResponse({\n    $core.String? walletName,\n    $fixnum.Int64? totalBalance,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (totalBalance != null) result.totalBalance = totalBalance;\n    return result;\n  }\n\n  GetTotalBalanceResponse._();\n\n  factory GetTotalBalanceResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTotalBalanceResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTotalBalanceResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aInt64(2, _omitFieldNames ? '' : 'totalBalance')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalBalanceResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalBalanceResponse copyWith(\n          void Function(GetTotalBalanceResponse) updates) =>\n      super.copyWith((message) => updates(message as GetTotalBalanceResponse))\n          as GetTotalBalanceResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTotalBalanceResponse create() => GetTotalBalanceResponse._();\n  @$core.override\n  GetTotalBalanceResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTotalBalanceResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTotalBalanceResponse>(create);\n  static GetTotalBalanceResponse? _defaultInstance;\n\n  /// The name of the queried wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The total balance of the wallet in NanoPAC.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get totalBalance => $_getI64(1);\n  @$pb.TagNumber(2)\n  set totalBalance($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasTotalBalance() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearTotalBalance() => $_clearField(2);\n}\n\n/// Request message to sign an arbitrary message.\nclass SignMessageRequest extends $pb.GeneratedMessage {\n  factory SignMessageRequest({\n    $core.String? walletName,\n    $core.String? password,\n    $core.String? address,\n    $core.String? message,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (password != null) result.password = password;\n    if (address != null) result.address = address;\n    if (message != null) result.message = message;\n    return result;\n  }\n\n  SignMessageRequest._();\n\n  factory SignMessageRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignMessageRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignMessageRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'password')\n    ..aOS(3, _omitFieldNames ? '' : 'address')\n    ..aOS(4, _omitFieldNames ? '' : 'message')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageRequest copyWith(void Function(SignMessageRequest) updates) =>\n      super.copyWith((message) => updates(message as SignMessageRequest))\n          as SignMessageRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignMessageRequest create() => SignMessageRequest._();\n  @$core.override\n  SignMessageRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignMessageRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignMessageRequest>(create);\n  static SignMessageRequest? _defaultInstance;\n\n  /// The name of the wallet to sign with.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Wallet password required for signing.\n  @$pb.TagNumber(2)\n  $core.String get password => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set password($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPassword() => $_clearField(2);\n\n  /// The address whose private key should be used for signing the message.\n  @$pb.TagNumber(3)\n  $core.String get address => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set address($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAddress() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAddress() => $_clearField(3);\n\n  /// The arbitrary message to be signed.\n  @$pb.TagNumber(4)\n  $core.String get message => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set message($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasMessage() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearMessage() => $_clearField(4);\n}\n\n/// Response message contains message signature.\nclass SignMessageResponse extends $pb.GeneratedMessage {\n  factory SignMessageResponse({\n    $core.String? signature,\n  }) {\n    final result = create();\n    if (signature != null) result.signature = signature;\n    return result;\n  }\n\n  SignMessageResponse._();\n\n  factory SignMessageResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SignMessageResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SignMessageResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'signature')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SignMessageResponse copyWith(void Function(SignMessageResponse) updates) =>\n      super.copyWith((message) => updates(message as SignMessageResponse))\n          as SignMessageResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SignMessageResponse create() => SignMessageResponse._();\n  @$core.override\n  SignMessageResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SignMessageResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SignMessageResponse>(create);\n  static SignMessageResponse? _defaultInstance;\n\n  /// The signature in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get signature => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set signature($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasSignature() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearSignature() => $_clearField(1);\n}\n\n/// Request message for obtaining the total stake of a wallet.\nclass GetTotalStakeRequest extends $pb.GeneratedMessage {\n  factory GetTotalStakeRequest({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  GetTotalStakeRequest._();\n\n  factory GetTotalStakeRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTotalStakeRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTotalStakeRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalStakeRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalStakeRequest copyWith(void Function(GetTotalStakeRequest) updates) =>\n      super.copyWith((message) => updates(message as GetTotalStakeRequest))\n          as GetTotalStakeRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTotalStakeRequest create() => GetTotalStakeRequest._();\n  @$core.override\n  GetTotalStakeRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTotalStakeRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTotalStakeRequest>(create);\n  static GetTotalStakeRequest? _defaultInstance;\n\n  /// The name of the wallet to get the total stake.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Response message contains the total stake of the wallet.\nclass GetTotalStakeResponse extends $pb.GeneratedMessage {\n  factory GetTotalStakeResponse({\n    $core.String? walletName,\n    $fixnum.Int64? totalStake,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (totalStake != null) result.totalStake = totalStake;\n    return result;\n  }\n\n  GetTotalStakeResponse._();\n\n  factory GetTotalStakeResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetTotalStakeResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetTotalStakeResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aInt64(2, _omitFieldNames ? '' : 'totalStake')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalStakeResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetTotalStakeResponse copyWith(\n          void Function(GetTotalStakeResponse) updates) =>\n      super.copyWith((message) => updates(message as GetTotalStakeResponse))\n          as GetTotalStakeResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetTotalStakeResponse create() => GetTotalStakeResponse._();\n  @$core.override\n  GetTotalStakeResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetTotalStakeResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetTotalStakeResponse>(create);\n  static GetTotalStakeResponse? _defaultInstance;\n\n  /// The name of the queried wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The total stake amount in NanoPAC.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get totalStake => $_getI64(1);\n  @$pb.TagNumber(2)\n  set totalStake($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasTotalStake() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearTotalStake() => $_clearField(2);\n}\n\n/// Request message for getting address information.\nclass GetAddressInfoRequest extends $pb.GeneratedMessage {\n  factory GetAddressInfoRequest({\n    $core.String? walletName,\n    $core.String? address,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetAddressInfoRequest._();\n\n  factory GetAddressInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetAddressInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetAddressInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAddressInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAddressInfoRequest copyWith(\n          void Function(GetAddressInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetAddressInfoRequest))\n          as GetAddressInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetAddressInfoRequest create() => GetAddressInfoRequest._();\n  @$core.override\n  GetAddressInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetAddressInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetAddressInfoRequest>(create);\n  static GetAddressInfoRequest? _defaultInstance;\n\n  /// The name of the wallet containing the address.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The address to query.\n  @$pb.TagNumber(2)\n  $core.String get address => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set address($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddress() => $_clearField(2);\n}\n\n/// Response message contains address details.\nclass GetAddressInfoResponse extends $pb.GeneratedMessage {\n  factory GetAddressInfoResponse({\n    $core.String? walletName,\n    AddressInfo? addr,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (addr != null) result.addr = addr;\n    return result;\n  }\n\n  GetAddressInfoResponse._();\n\n  factory GetAddressInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetAddressInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetAddressInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOM<AddressInfo>(2, _omitFieldNames ? '' : 'addr',\n        subBuilder: AddressInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAddressInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetAddressInfoResponse copyWith(\n          void Function(GetAddressInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetAddressInfoResponse))\n          as GetAddressInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetAddressInfoResponse create() => GetAddressInfoResponse._();\n  @$core.override\n  GetAddressInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetAddressInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetAddressInfoResponse>(create);\n  static GetAddressInfoResponse? _defaultInstance;\n\n  /// The name of the wallet containing the address.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Detailed information about the address.\n  @$pb.TagNumber(2)\n  AddressInfo get addr => $_getN(1);\n  @$pb.TagNumber(2)\n  set addr(AddressInfo value) => $_setField(2, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddr() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddr() => $_clearField(2);\n  @$pb.TagNumber(2)\n  AddressInfo ensureAddr() => $_ensure(1);\n}\n\n/// Request message for setting address label.\nclass SetAddressLabelRequest extends $pb.GeneratedMessage {\n  factory SetAddressLabelRequest({\n    $core.String? walletName,\n    $core.String? password,\n    $core.String? address,\n    $core.String? label,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (password != null) result.password = password;\n    if (address != null) result.address = address;\n    if (label != null) result.label = label;\n    return result;\n  }\n\n  SetAddressLabelRequest._();\n\n  factory SetAddressLabelRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SetAddressLabelRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SetAddressLabelRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'password')\n    ..aOS(3, _omitFieldNames ? '' : 'address')\n    ..aOS(4, _omitFieldNames ? '' : 'label')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetAddressLabelRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetAddressLabelRequest copyWith(\n          void Function(SetAddressLabelRequest) updates) =>\n      super.copyWith((message) => updates(message as SetAddressLabelRequest))\n          as SetAddressLabelRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SetAddressLabelRequest create() => SetAddressLabelRequest._();\n  @$core.override\n  SetAddressLabelRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SetAddressLabelRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SetAddressLabelRequest>(create);\n  static SetAddressLabelRequest? _defaultInstance;\n\n  /// The name of the wallet containing the address.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Wallet password required for modification.\n  @$pb.TagNumber(2)\n  $core.String get password => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set password($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPassword() => $_clearField(2);\n\n  /// The address to label.\n  @$pb.TagNumber(3)\n  $core.String get address => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set address($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAddress() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAddress() => $_clearField(3);\n\n  /// The new label for the address.\n  @$pb.TagNumber(4)\n  $core.String get label => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set label($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasLabel() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearLabel() => $_clearField(4);\n}\n\n/// Response message for updated address label.\nclass SetAddressLabelResponse extends $pb.GeneratedMessage {\n  factory SetAddressLabelResponse({\n    $core.String? walletName,\n    $core.String? address,\n    $core.String? label,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (address != null) result.address = address;\n    if (label != null) result.label = label;\n    return result;\n  }\n\n  SetAddressLabelResponse._();\n\n  factory SetAddressLabelResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SetAddressLabelResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SetAddressLabelResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'address')\n    ..aOS(3, _omitFieldNames ? '' : 'label')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetAddressLabelResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetAddressLabelResponse copyWith(\n          void Function(SetAddressLabelResponse) updates) =>\n      super.copyWith((message) => updates(message as SetAddressLabelResponse))\n          as SetAddressLabelResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SetAddressLabelResponse create() => SetAddressLabelResponse._();\n  @$core.override\n  SetAddressLabelResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SetAddressLabelResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SetAddressLabelResponse>(create);\n  static SetAddressLabelResponse? _defaultInstance;\n\n  /// The name of the wallet where the address label was updated.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The address where the label was updated.\n  @$pb.TagNumber(2)\n  $core.String get address => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set address($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddress() => $_clearField(2);\n\n  /// The new label for the address.\n  @$pb.TagNumber(3)\n  $core.String get label => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set label($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasLabel() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearLabel() => $_clearField(3);\n}\n\n/// Request message for listing wallets.\nclass ListWalletsRequest extends $pb.GeneratedMessage {\n  factory ListWalletsRequest() => create();\n\n  ListWalletsRequest._();\n\n  factory ListWalletsRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListWalletsRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListWalletsRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListWalletsRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListWalletsRequest copyWith(void Function(ListWalletsRequest) updates) =>\n      super.copyWith((message) => updates(message as ListWalletsRequest))\n          as ListWalletsRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListWalletsRequest create() => ListWalletsRequest._();\n  @$core.override\n  ListWalletsRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListWalletsRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListWalletsRequest>(create);\n  static ListWalletsRequest? _defaultInstance;\n}\n\n/// Response message contains wallet names.\nclass ListWalletsResponse extends $pb.GeneratedMessage {\n  factory ListWalletsResponse({\n    $core.Iterable<$core.String>? wallets,\n  }) {\n    final result = create();\n    if (wallets != null) result.wallets.addAll(wallets);\n    return result;\n  }\n\n  ListWalletsResponse._();\n\n  factory ListWalletsResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListWalletsResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListWalletsResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..pPS(1, _omitFieldNames ? '' : 'wallets')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListWalletsResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListWalletsResponse copyWith(void Function(ListWalletsResponse) updates) =>\n      super.copyWith((message) => updates(message as ListWalletsResponse))\n          as ListWalletsResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListWalletsResponse create() => ListWalletsResponse._();\n  @$core.override\n  ListWalletsResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListWalletsResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListWalletsResponse>(create);\n  static ListWalletsResponse? _defaultInstance;\n\n  /// Array of wallet names.\n  @$pb.TagNumber(1)\n  $pb.PbList<$core.String> get wallets => $_getList(0);\n}\n\n/// Request message for getting wallet information.\nclass GetWalletInfoRequest extends $pb.GeneratedMessage {\n  factory GetWalletInfoRequest({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  GetWalletInfoRequest._();\n\n  factory GetWalletInfoRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetWalletInfoRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetWalletInfoRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetWalletInfoRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetWalletInfoRequest copyWith(void Function(GetWalletInfoRequest) updates) =>\n      super.copyWith((message) => updates(message as GetWalletInfoRequest))\n          as GetWalletInfoRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetWalletInfoRequest create() => GetWalletInfoRequest._();\n  @$core.override\n  GetWalletInfoRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetWalletInfoRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetWalletInfoRequest>(create);\n  static GetWalletInfoRequest? _defaultInstance;\n\n  /// The name of the wallet to query.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Response message contains wallet details.\nclass GetWalletInfoResponse extends $pb.GeneratedMessage {\n  factory GetWalletInfoResponse({\n    $core.String? walletName,\n    $core.int? version,\n    $core.String? network,\n    $core.bool? encrypted,\n    $core.String? uuid,\n    $fixnum.Int64? createdAt,\n    $fixnum.Int64? defaultFee,\n    $core.String? driver,\n    $core.String? path,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (version != null) result.version = version;\n    if (network != null) result.network = network;\n    if (encrypted != null) result.encrypted = encrypted;\n    if (uuid != null) result.uuid = uuid;\n    if (createdAt != null) result.createdAt = createdAt;\n    if (defaultFee != null) result.defaultFee = defaultFee;\n    if (driver != null) result.driver = driver;\n    if (path != null) result.path = path;\n    return result;\n  }\n\n  GetWalletInfoResponse._();\n\n  factory GetWalletInfoResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetWalletInfoResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetWalletInfoResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aI(2, _omitFieldNames ? '' : 'version')\n    ..aOS(3, _omitFieldNames ? '' : 'network')\n    ..aOB(4, _omitFieldNames ? '' : 'encrypted')\n    ..aOS(5, _omitFieldNames ? '' : 'uuid')\n    ..aInt64(6, _omitFieldNames ? '' : 'createdAt')\n    ..aInt64(7, _omitFieldNames ? '' : 'defaultFee')\n    ..aOS(8, _omitFieldNames ? '' : 'driver')\n    ..aOS(9, _omitFieldNames ? '' : 'path')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetWalletInfoResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetWalletInfoResponse copyWith(\n          void Function(GetWalletInfoResponse) updates) =>\n      super.copyWith((message) => updates(message as GetWalletInfoResponse))\n          as GetWalletInfoResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetWalletInfoResponse create() => GetWalletInfoResponse._();\n  @$core.override\n  GetWalletInfoResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetWalletInfoResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetWalletInfoResponse>(create);\n  static GetWalletInfoResponse? _defaultInstance;\n\n  /// The name of the wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The wallet format version.\n  @$pb.TagNumber(2)\n  $core.int get version => $_getIZ(1);\n  @$pb.TagNumber(2)\n  set version($core.int value) => $_setSignedInt32(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasVersion() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearVersion() => $_clearField(2);\n\n  /// The network the wallet is connected to (e.g., mainnet, testnet).\n  @$pb.TagNumber(3)\n  $core.String get network => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set network($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasNetwork() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearNetwork() => $_clearField(3);\n\n  /// Indicates if the wallet is encrypted.\n  @$pb.TagNumber(4)\n  $core.bool get encrypted => $_getBF(3);\n  @$pb.TagNumber(4)\n  set encrypted($core.bool value) => $_setBool(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasEncrypted() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearEncrypted() => $_clearField(4);\n\n  /// A unique identifier of the wallet.\n  @$pb.TagNumber(5)\n  $core.String get uuid => $_getSZ(4);\n  @$pb.TagNumber(5)\n  set uuid($core.String value) => $_setString(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasUuid() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearUuid() => $_clearField(5);\n\n  /// Unix timestamp of wallet creation.\n  @$pb.TagNumber(6)\n  $fixnum.Int64 get createdAt => $_getI64(5);\n  @$pb.TagNumber(6)\n  set createdAt($fixnum.Int64 value) => $_setInt64(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasCreatedAt() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearCreatedAt() => $_clearField(6);\n\n  /// The default fee of the wallet.\n  @$pb.TagNumber(7)\n  $fixnum.Int64 get defaultFee => $_getI64(6);\n  @$pb.TagNumber(7)\n  set defaultFee($fixnum.Int64 value) => $_setInt64(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasDefaultFee() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearDefaultFee() => $_clearField(7);\n\n  /// The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n  @$pb.TagNumber(8)\n  $core.String get driver => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set driver($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasDriver() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearDriver() => $_clearField(8);\n\n  /// Path to the wallet file or storage location.\n  @$pb.TagNumber(9)\n  $core.String get path => $_getSZ(8);\n  @$pb.TagNumber(9)\n  set path($core.String value) => $_setString(8, value);\n  @$pb.TagNumber(9)\n  $core.bool hasPath() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearPath() => $_clearField(9);\n}\n\n/// Request message for listing wallet addresses.\nclass ListAddressesRequest extends $pb.GeneratedMessage {\n  factory ListAddressesRequest({\n    $core.String? walletName,\n    $core.Iterable<AddressType>? addressTypes,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (addressTypes != null) result.addressTypes.addAll(addressTypes);\n    return result;\n  }\n\n  ListAddressesRequest._();\n\n  factory ListAddressesRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListAddressesRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListAddressesRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..pc<AddressType>(\n        2, _omitFieldNames ? '' : 'addressTypes', $pb.PbFieldType.KE,\n        valueOf: AddressType.valueOf,\n        enumValues: AddressType.values,\n        defaultEnumValue: AddressType.ADDRESS_TYPE_TREASURY)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListAddressesRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListAddressesRequest copyWith(void Function(ListAddressesRequest) updates) =>\n      super.copyWith((message) => updates(message as ListAddressesRequest))\n          as ListAddressesRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListAddressesRequest create() => ListAddressesRequest._();\n  @$core.override\n  ListAddressesRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListAddressesRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListAddressesRequest>(create);\n  static ListAddressesRequest? _defaultInstance;\n\n  /// The name of the queried wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Filter addresses by their types. If empty, all address types are included.\n  @$pb.TagNumber(2)\n  $pb.PbList<AddressType> get addressTypes => $_getList(1);\n}\n\n/// Response message contains wallet addresses.\nclass ListAddressesResponse extends $pb.GeneratedMessage {\n  factory ListAddressesResponse({\n    $core.String? walletName,\n    $core.Iterable<AddressInfo>? addrs,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (addrs != null) result.addrs.addAll(addrs);\n    return result;\n  }\n\n  ListAddressesResponse._();\n\n  factory ListAddressesResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListAddressesResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListAddressesResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..pPM<AddressInfo>(2, _omitFieldNames ? '' : 'addrs',\n        subBuilder: AddressInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListAddressesResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListAddressesResponse copyWith(\n          void Function(ListAddressesResponse) updates) =>\n      super.copyWith((message) => updates(message as ListAddressesResponse))\n          as ListAddressesResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListAddressesResponse create() => ListAddressesResponse._();\n  @$core.override\n  ListAddressesResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListAddressesResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListAddressesResponse>(create);\n  static ListAddressesResponse? _defaultInstance;\n\n  /// The name of the queried wallet.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// List of all addresses in the wallet with their details.\n  @$pb.TagNumber(2)\n  $pb.PbList<AddressInfo> get addrs => $_getList(1);\n}\n\n/// Request message for updating wallet password.\nclass UpdatePasswordRequest extends $pb.GeneratedMessage {\n  factory UpdatePasswordRequest({\n    $core.String? walletName,\n    $core.String? oldPassword,\n    $core.String? newPassword,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (oldPassword != null) result.oldPassword = oldPassword;\n    if (newPassword != null) result.newPassword = newPassword;\n    return result;\n  }\n\n  UpdatePasswordRequest._();\n\n  factory UpdatePasswordRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UpdatePasswordRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UpdatePasswordRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'oldPassword')\n    ..aOS(3, _omitFieldNames ? '' : 'newPassword')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UpdatePasswordRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UpdatePasswordRequest copyWith(\n          void Function(UpdatePasswordRequest) updates) =>\n      super.copyWith((message) => updates(message as UpdatePasswordRequest))\n          as UpdatePasswordRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UpdatePasswordRequest create() => UpdatePasswordRequest._();\n  @$core.override\n  UpdatePasswordRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UpdatePasswordRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UpdatePasswordRequest>(create);\n  static UpdatePasswordRequest? _defaultInstance;\n\n  /// The name of the wallet whose password will be updated.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The current wallet password.\n  @$pb.TagNumber(2)\n  $core.String get oldPassword => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set oldPassword($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasOldPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearOldPassword() => $_clearField(2);\n\n  /// The new wallet password.\n  @$pb.TagNumber(3)\n  $core.String get newPassword => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set newPassword($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasNewPassword() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearNewPassword() => $_clearField(3);\n}\n\n/// Response message confirming wallet password update.\nclass UpdatePasswordResponse extends $pb.GeneratedMessage {\n  factory UpdatePasswordResponse({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  UpdatePasswordResponse._();\n\n  factory UpdatePasswordResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory UpdatePasswordResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'UpdatePasswordResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UpdatePasswordResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  UpdatePasswordResponse copyWith(\n          void Function(UpdatePasswordResponse) updates) =>\n      super.copyWith((message) => updates(message as UpdatePasswordResponse))\n          as UpdatePasswordResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static UpdatePasswordResponse create() => UpdatePasswordResponse._();\n  @$core.override\n  UpdatePasswordResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static UpdatePasswordResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<UpdatePasswordResponse>(create);\n  static UpdatePasswordResponse? _defaultInstance;\n\n  /// The name of the wallet whose password was updated.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// WalletTransactionInfo contains information about a transaction in a wallet.\nclass WalletTransactionInfo extends $pb.GeneratedMessage {\n  factory WalletTransactionInfo({\n    $fixnum.Int64? no,\n    $core.String? txId,\n    $core.String? sender,\n    $core.String? receiver,\n    TxDirection? direction,\n    $fixnum.Int64? amount,\n    $fixnum.Int64? fee,\n    $core.String? memo,\n    TransactionStatus? status,\n    $core.int? blockHeight,\n    $0.PayloadType? payloadType,\n    $core.List<$core.int>? data,\n    $core.String? comment,\n    $fixnum.Int64? createdAt,\n    $fixnum.Int64? updatedAt,\n  }) {\n    final result = create();\n    if (no != null) result.no = no;\n    if (txId != null) result.txId = txId;\n    if (sender != null) result.sender = sender;\n    if (receiver != null) result.receiver = receiver;\n    if (direction != null) result.direction = direction;\n    if (amount != null) result.amount = amount;\n    if (fee != null) result.fee = fee;\n    if (memo != null) result.memo = memo;\n    if (status != null) result.status = status;\n    if (blockHeight != null) result.blockHeight = blockHeight;\n    if (payloadType != null) result.payloadType = payloadType;\n    if (data != null) result.data = data;\n    if (comment != null) result.comment = comment;\n    if (createdAt != null) result.createdAt = createdAt;\n    if (updatedAt != null) result.updatedAt = updatedAt;\n    return result;\n  }\n\n  WalletTransactionInfo._();\n\n  factory WalletTransactionInfo.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory WalletTransactionInfo.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'WalletTransactionInfo',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aInt64(1, _omitFieldNames ? '' : 'no')\n    ..aOS(2, _omitFieldNames ? '' : 'txId')\n    ..aOS(3, _omitFieldNames ? '' : 'sender')\n    ..aOS(4, _omitFieldNames ? '' : 'receiver')\n    ..aE<TxDirection>(5, _omitFieldNames ? '' : 'direction',\n        enumValues: TxDirection.values)\n    ..aInt64(6, _omitFieldNames ? '' : 'amount')\n    ..aInt64(7, _omitFieldNames ? '' : 'fee')\n    ..aOS(8, _omitFieldNames ? '' : 'memo')\n    ..aE<TransactionStatus>(9, _omitFieldNames ? '' : 'status',\n        enumValues: TransactionStatus.values)\n    ..aI(10, _omitFieldNames ? '' : 'blockHeight',\n        fieldType: $pb.PbFieldType.OU3)\n    ..aE<$0.PayloadType>(11, _omitFieldNames ? '' : 'payloadType',\n        enumValues: $0.PayloadType.values)\n    ..a<$core.List<$core.int>>(\n        12, _omitFieldNames ? '' : 'data', $pb.PbFieldType.OY)\n    ..aOS(13, _omitFieldNames ? '' : 'comment')\n    ..aInt64(14, _omitFieldNames ? '' : 'createdAt')\n    ..aInt64(15, _omitFieldNames ? '' : 'updatedAt')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  WalletTransactionInfo clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  WalletTransactionInfo copyWith(\n          void Function(WalletTransactionInfo) updates) =>\n      super.copyWith((message) => updates(message as WalletTransactionInfo))\n          as WalletTransactionInfo;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static WalletTransactionInfo create() => WalletTransactionInfo._();\n  @$core.override\n  WalletTransactionInfo createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static WalletTransactionInfo getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<WalletTransactionInfo>(create);\n  static WalletTransactionInfo? _defaultInstance;\n\n  /// A sequence number for the transaction in the wallet.\n  @$pb.TagNumber(1)\n  $fixnum.Int64 get no => $_getI64(0);\n  @$pb.TagNumber(1)\n  set no($fixnum.Int64 value) => $_setInt64(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasNo() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearNo() => $_clearField(1);\n\n  /// The unique ID of the transaction.\n  @$pb.TagNumber(2)\n  $core.String get txId => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set txId($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasTxId() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearTxId() => $_clearField(2);\n\n  /// The sender's address.\n  @$pb.TagNumber(3)\n  $core.String get sender => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set sender($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasSender() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearSender() => $_clearField(3);\n\n  /// The receiver's address.\n  @$pb.TagNumber(4)\n  $core.String get receiver => $_getSZ(3);\n  @$pb.TagNumber(4)\n  set receiver($core.String value) => $_setString(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasReceiver() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearReceiver() => $_clearField(4);\n\n  /// The direction of the transaction relative to the wallet.\n  @$pb.TagNumber(5)\n  TxDirection get direction => $_getN(4);\n  @$pb.TagNumber(5)\n  set direction(TxDirection value) => $_setField(5, value);\n  @$pb.TagNumber(5)\n  $core.bool hasDirection() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearDirection() => $_clearField(5);\n\n  /// The amount involved in the transaction in NanoPAC.\n  @$pb.TagNumber(6)\n  $fixnum.Int64 get amount => $_getI64(5);\n  @$pb.TagNumber(6)\n  set amount($fixnum.Int64 value) => $_setInt64(5, value);\n  @$pb.TagNumber(6)\n  $core.bool hasAmount() => $_has(5);\n  @$pb.TagNumber(6)\n  void clearAmount() => $_clearField(6);\n\n  /// The transaction fee in NanoPAC.\n  @$pb.TagNumber(7)\n  $fixnum.Int64 get fee => $_getI64(6);\n  @$pb.TagNumber(7)\n  set fee($fixnum.Int64 value) => $_setInt64(6, value);\n  @$pb.TagNumber(7)\n  $core.bool hasFee() => $_has(6);\n  @$pb.TagNumber(7)\n  void clearFee() => $_clearField(7);\n\n  /// A memo string for the transaction.\n  @$pb.TagNumber(8)\n  $core.String get memo => $_getSZ(7);\n  @$pb.TagNumber(8)\n  set memo($core.String value) => $_setString(7, value);\n  @$pb.TagNumber(8)\n  $core.bool hasMemo() => $_has(7);\n  @$pb.TagNumber(8)\n  void clearMemo() => $_clearField(8);\n\n  /// The current status of the transaction.\n  @$pb.TagNumber(9)\n  TransactionStatus get status => $_getN(8);\n  @$pb.TagNumber(9)\n  set status(TransactionStatus value) => $_setField(9, value);\n  @$pb.TagNumber(9)\n  $core.bool hasStatus() => $_has(8);\n  @$pb.TagNumber(9)\n  void clearStatus() => $_clearField(9);\n\n  /// The block height containing the transaction.\n  @$pb.TagNumber(10)\n  $core.int get blockHeight => $_getIZ(9);\n  @$pb.TagNumber(10)\n  set blockHeight($core.int value) => $_setUnsignedInt32(9, value);\n  @$pb.TagNumber(10)\n  $core.bool hasBlockHeight() => $_has(9);\n  @$pb.TagNumber(10)\n  void clearBlockHeight() => $_clearField(10);\n\n  /// The type of transaction payload.\n  @$pb.TagNumber(11)\n  $0.PayloadType get payloadType => $_getN(10);\n  @$pb.TagNumber(11)\n  set payloadType($0.PayloadType value) => $_setField(11, value);\n  @$pb.TagNumber(11)\n  $core.bool hasPayloadType() => $_has(10);\n  @$pb.TagNumber(11)\n  void clearPayloadType() => $_clearField(11);\n\n  /// The raw transaction data.\n  @$pb.TagNumber(12)\n  $core.List<$core.int> get data => $_getN(11);\n  @$pb.TagNumber(12)\n  set data($core.List<$core.int> value) => $_setBytes(11, value);\n  @$pb.TagNumber(12)\n  $core.bool hasData() => $_has(11);\n  @$pb.TagNumber(12)\n  void clearData() => $_clearField(12);\n\n  /// A comment associated with the transaction in the wallet.\n  @$pb.TagNumber(13)\n  $core.String get comment => $_getSZ(12);\n  @$pb.TagNumber(13)\n  set comment($core.String value) => $_setString(12, value);\n  @$pb.TagNumber(13)\n  $core.bool hasComment() => $_has(12);\n  @$pb.TagNumber(13)\n  void clearComment() => $_clearField(13);\n\n  /// Unix timestamp of when the transaction was created.\n  @$pb.TagNumber(14)\n  $fixnum.Int64 get createdAt => $_getI64(13);\n  @$pb.TagNumber(14)\n  set createdAt($fixnum.Int64 value) => $_setInt64(13, value);\n  @$pb.TagNumber(14)\n  $core.bool hasCreatedAt() => $_has(13);\n  @$pb.TagNumber(14)\n  void clearCreatedAt() => $_clearField(14);\n\n  /// Unix timestamp of when the transaction was last updated.\n  @$pb.TagNumber(15)\n  $fixnum.Int64 get updatedAt => $_getI64(14);\n  @$pb.TagNumber(15)\n  set updatedAt($fixnum.Int64 value) => $_setInt64(14, value);\n  @$pb.TagNumber(15)\n  $core.bool hasUpdatedAt() => $_has(14);\n  @$pb.TagNumber(15)\n  void clearUpdatedAt() => $_clearField(15);\n}\n\n/// Request message for listing transactions of a wallet, optionally filtered by a specific address.\nclass ListTransactionsRequest extends $pb.GeneratedMessage {\n  factory ListTransactionsRequest({\n    $core.String? walletName,\n    $core.String? address,\n    TxDirection? direction,\n    $core.int? count,\n    $core.int? skip,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (address != null) result.address = address;\n    if (direction != null) result.direction = direction;\n    if (count != null) result.count = count;\n    if (skip != null) result.skip = skip;\n    return result;\n  }\n\n  ListTransactionsRequest._();\n\n  factory ListTransactionsRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListTransactionsRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListTransactionsRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'address')\n    ..aE<TxDirection>(3, _omitFieldNames ? '' : 'direction',\n        enumValues: TxDirection.values)\n    ..aI(4, _omitFieldNames ? '' : 'count')\n    ..aI(5, _omitFieldNames ? '' : 'skip')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListTransactionsRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListTransactionsRequest copyWith(\n          void Function(ListTransactionsRequest) updates) =>\n      super.copyWith((message) => updates(message as ListTransactionsRequest))\n          as ListTransactionsRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListTransactionsRequest create() => ListTransactionsRequest._();\n  @$core.override\n  ListTransactionsRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListTransactionsRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListTransactionsRequest>(create);\n  static ListTransactionsRequest? _defaultInstance;\n\n  /// The name of the wallet to query transactions for.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Optional: The address to filter transactions.\n  /// If empty or set to '*', transactions for all addresses in the wallet are included.\n  @$pb.TagNumber(2)\n  $core.String get address => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set address($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAddress() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAddress() => $_clearField(2);\n\n  /// Filter transactions by direction relative to the wallet.\n  /// Defaults to any direction if not set.\n  @$pb.TagNumber(3)\n  TxDirection get direction => $_getN(2);\n  @$pb.TagNumber(3)\n  set direction(TxDirection value) => $_setField(3, value);\n  @$pb.TagNumber(3)\n  $core.bool hasDirection() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearDirection() => $_clearField(3);\n\n  /// Optional: The maximum number of transactions to return.\n  /// Defaults to 10 if not set.\n  @$pb.TagNumber(4)\n  $core.int get count => $_getIZ(3);\n  @$pb.TagNumber(4)\n  set count($core.int value) => $_setSignedInt32(3, value);\n  @$pb.TagNumber(4)\n  $core.bool hasCount() => $_has(3);\n  @$pb.TagNumber(4)\n  void clearCount() => $_clearField(4);\n\n  /// Optional: The number of transactions to skip (for pagination).\n  /// Defaults to 0 if not set.\n  @$pb.TagNumber(5)\n  $core.int get skip => $_getIZ(4);\n  @$pb.TagNumber(5)\n  set skip($core.int value) => $_setSignedInt32(4, value);\n  @$pb.TagNumber(5)\n  $core.bool hasSkip() => $_has(4);\n  @$pb.TagNumber(5)\n  void clearSkip() => $_clearField(5);\n}\n\n/// Response message containing a list of transactions.\nclass ListTransactionsResponse extends $pb.GeneratedMessage {\n  factory ListTransactionsResponse({\n    $core.String? walletName,\n    $core.Iterable<WalletTransactionInfo>? txs,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (txs != null) result.txs.addAll(txs);\n    return result;\n  }\n\n  ListTransactionsResponse._();\n\n  factory ListTransactionsResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory ListTransactionsResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'ListTransactionsResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..pPM<WalletTransactionInfo>(2, _omitFieldNames ? '' : 'txs',\n        subBuilder: WalletTransactionInfo.create)\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListTransactionsResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  ListTransactionsResponse copyWith(\n          void Function(ListTransactionsResponse) updates) =>\n      super.copyWith((message) => updates(message as ListTransactionsResponse))\n          as ListTransactionsResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static ListTransactionsResponse create() => ListTransactionsResponse._();\n  @$core.override\n  ListTransactionsResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static ListTransactionsResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<ListTransactionsResponse>(create);\n  static ListTransactionsResponse? _defaultInstance;\n\n  /// The name of the wallet queried.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// List of transactions for the wallet, filtered by the specified address if provided.\n  @$pb.TagNumber(2)\n  $pb.PbList<WalletTransactionInfo> get txs => $_getList(1);\n}\n\n/// Request message for setting default fee.\nclass SetDefaultFeeRequest extends $pb.GeneratedMessage {\n  factory SetDefaultFeeRequest({\n    $core.String? walletName,\n    $fixnum.Int64? amount,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (amount != null) result.amount = amount;\n    return result;\n  }\n\n  SetDefaultFeeRequest._();\n\n  factory SetDefaultFeeRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SetDefaultFeeRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SetDefaultFeeRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aInt64(2, _omitFieldNames ? '' : 'amount')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetDefaultFeeRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetDefaultFeeRequest copyWith(void Function(SetDefaultFeeRequest) updates) =>\n      super.copyWith((message) => updates(message as SetDefaultFeeRequest))\n          as SetDefaultFeeRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SetDefaultFeeRequest create() => SetDefaultFeeRequest._();\n  @$core.override\n  SetDefaultFeeRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SetDefaultFeeRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SetDefaultFeeRequest>(create);\n  static SetDefaultFeeRequest? _defaultInstance;\n\n  /// The name of the wallet to set the default fee.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// The default fee amount in NanoPAC.\n  @$pb.TagNumber(2)\n  $fixnum.Int64 get amount => $_getI64(1);\n  @$pb.TagNumber(2)\n  set amount($fixnum.Int64 value) => $_setInt64(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasAmount() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearAmount() => $_clearField(2);\n}\n\n/// Response message for updated default fee.\nclass SetDefaultFeeResponse extends $pb.GeneratedMessage {\n  factory SetDefaultFeeResponse({\n    $core.String? walletName,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    return result;\n  }\n\n  SetDefaultFeeResponse._();\n\n  factory SetDefaultFeeResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory SetDefaultFeeResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'SetDefaultFeeResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetDefaultFeeResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  SetDefaultFeeResponse copyWith(\n          void Function(SetDefaultFeeResponse) updates) =>\n      super.copyWith((message) => updates(message as SetDefaultFeeResponse))\n          as SetDefaultFeeResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static SetDefaultFeeResponse create() => SetDefaultFeeResponse._();\n  @$core.override\n  SetDefaultFeeResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static SetDefaultFeeResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<SetDefaultFeeResponse>(create);\n  static SetDefaultFeeResponse? _defaultInstance;\n\n  /// The name of the wallet where the default fee was updated.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n}\n\n/// Request message for getting mnemonic.\nclass GetMnemonicRequest extends $pb.GeneratedMessage {\n  factory GetMnemonicRequest({\n    $core.String? walletName,\n    $core.String? password,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (password != null) result.password = password;\n    return result;\n  }\n\n  GetMnemonicRequest._();\n\n  factory GetMnemonicRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetMnemonicRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetMnemonicRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'password')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetMnemonicRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetMnemonicRequest copyWith(void Function(GetMnemonicRequest) updates) =>\n      super.copyWith((message) => updates(message as GetMnemonicRequest))\n          as GetMnemonicRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetMnemonicRequest create() => GetMnemonicRequest._();\n  @$core.override\n  GetMnemonicRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetMnemonicRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetMnemonicRequest>(create);\n  static GetMnemonicRequest? _defaultInstance;\n\n  /// The name of the wallet to get the mnemonic.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Wallet password.\n  @$pb.TagNumber(2)\n  $core.String get password => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set password($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPassword() => $_clearField(2);\n}\n\n/// Response message contains mnemonic.\nclass GetMnemonicResponse extends $pb.GeneratedMessage {\n  factory GetMnemonicResponse({\n    $core.String? mnemonic,\n  }) {\n    final result = create();\n    if (mnemonic != null) result.mnemonic = mnemonic;\n    return result;\n  }\n\n  GetMnemonicResponse._();\n\n  factory GetMnemonicResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetMnemonicResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetMnemonicResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'mnemonic')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetMnemonicResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetMnemonicResponse copyWith(void Function(GetMnemonicResponse) updates) =>\n      super.copyWith((message) => updates(message as GetMnemonicResponse))\n          as GetMnemonicResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetMnemonicResponse create() => GetMnemonicResponse._();\n  @$core.override\n  GetMnemonicResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetMnemonicResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetMnemonicResponse>(create);\n  static GetMnemonicResponse? _defaultInstance;\n\n  /// The mnemonic (seed phrase).\n  @$pb.TagNumber(1)\n  $core.String get mnemonic => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set mnemonic($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasMnemonic() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearMnemonic() => $_clearField(1);\n}\n\n/// Request message for getting private key.\nclass GetPrivateKeyRequest extends $pb.GeneratedMessage {\n  factory GetPrivateKeyRequest({\n    $core.String? walletName,\n    $core.String? password,\n    $core.String? address,\n  }) {\n    final result = create();\n    if (walletName != null) result.walletName = walletName;\n    if (password != null) result.password = password;\n    if (address != null) result.address = address;\n    return result;\n  }\n\n  GetPrivateKeyRequest._();\n\n  factory GetPrivateKeyRequest.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetPrivateKeyRequest.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetPrivateKeyRequest',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'walletName')\n    ..aOS(2, _omitFieldNames ? '' : 'password')\n    ..aOS(3, _omitFieldNames ? '' : 'address')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPrivateKeyRequest clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPrivateKeyRequest copyWith(void Function(GetPrivateKeyRequest) updates) =>\n      super.copyWith((message) => updates(message as GetPrivateKeyRequest))\n          as GetPrivateKeyRequest;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetPrivateKeyRequest create() => GetPrivateKeyRequest._();\n  @$core.override\n  GetPrivateKeyRequest createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetPrivateKeyRequest getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetPrivateKeyRequest>(create);\n  static GetPrivateKeyRequest? _defaultInstance;\n\n  /// The name of the wallet containing the address.\n  @$pb.TagNumber(1)\n  $core.String get walletName => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set walletName($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasWalletName() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearWalletName() => $_clearField(1);\n\n  /// Wallet password.\n  @$pb.TagNumber(2)\n  $core.String get password => $_getSZ(1);\n  @$pb.TagNumber(2)\n  set password($core.String value) => $_setString(1, value);\n  @$pb.TagNumber(2)\n  $core.bool hasPassword() => $_has(1);\n  @$pb.TagNumber(2)\n  void clearPassword() => $_clearField(2);\n\n  /// The address to get the private key.\n  @$pb.TagNumber(3)\n  $core.String get address => $_getSZ(2);\n  @$pb.TagNumber(3)\n  set address($core.String value) => $_setString(2, value);\n  @$pb.TagNumber(3)\n  $core.bool hasAddress() => $_has(2);\n  @$pb.TagNumber(3)\n  void clearAddress() => $_clearField(3);\n}\n\n/// Response message contains private key.\nclass GetPrivateKeyResponse extends $pb.GeneratedMessage {\n  factory GetPrivateKeyResponse({\n    $core.String? privateKey,\n  }) {\n    final result = create();\n    if (privateKey != null) result.privateKey = privateKey;\n    return result;\n  }\n\n  GetPrivateKeyResponse._();\n\n  factory GetPrivateKeyResponse.fromBuffer($core.List<$core.int> data,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromBuffer(data, registry);\n  factory GetPrivateKeyResponse.fromJson($core.String json,\n          [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>\n      create()..mergeFromJson(json, registry);\n\n  static final $pb.BuilderInfo _i = $pb.BuilderInfo(\n      _omitMessageNames ? '' : 'GetPrivateKeyResponse',\n      package: const $pb.PackageName(_omitMessageNames ? '' : 'pactus'),\n      createEmptyInstance: create)\n    ..aOS(1, _omitFieldNames ? '' : 'privateKey')\n    ..hasRequiredFields = false;\n\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPrivateKeyResponse clone() => deepCopy();\n  @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')\n  GetPrivateKeyResponse copyWith(\n          void Function(GetPrivateKeyResponse) updates) =>\n      super.copyWith((message) => updates(message as GetPrivateKeyResponse))\n          as GetPrivateKeyResponse;\n\n  @$core.override\n  $pb.BuilderInfo get info_ => _i;\n\n  @$core.pragma('dart2js:noInline')\n  static GetPrivateKeyResponse create() => GetPrivateKeyResponse._();\n  @$core.override\n  GetPrivateKeyResponse createEmptyInstance() => create();\n  @$core.pragma('dart2js:noInline')\n  static GetPrivateKeyResponse getDefault() => _defaultInstance ??=\n      $pb.GeneratedMessage.$_defaultFor<GetPrivateKeyResponse>(create);\n  static GetPrivateKeyResponse? _defaultInstance;\n\n  /// The private key in hexadecimal format.\n  @$pb.TagNumber(1)\n  $core.String get privateKey => $_getSZ(0);\n  @$pb.TagNumber(1)\n  set privateKey($core.String value) => $_setString(0, value);\n  @$pb.TagNumber(1)\n  $core.bool hasPrivateKey() => $_has(0);\n  @$pb.TagNumber(1)\n  void clearPrivateKey() => $_clearField(1);\n}\n\n/// Wallet service provides RPC methods for wallet management operations.\nclass WalletApi {\n  final $pb.RpcClient _client;\n\n  WalletApi(this._client);\n\n  /// CreateWallet creates a new wallet with the specified parameters.\n  $async.Future<CreateWalletResponse> createWallet(\n          $pb.ClientContext? ctx, CreateWalletRequest request) =>\n      _client.invoke<CreateWalletResponse>(\n          ctx, 'Wallet', 'CreateWallet', request, CreateWalletResponse());\n\n  /// RestoreWallet restores an existing wallet with the given mnemonic.\n  $async.Future<RestoreWalletResponse> restoreWallet(\n          $pb.ClientContext? ctx, RestoreWalletRequest request) =>\n      _client.invoke<RestoreWalletResponse>(\n          ctx, 'Wallet', 'RestoreWallet', request, RestoreWalletResponse());\n\n  /// LoadWallet loads an existing wallet with the given name.\n  /// deprecated: It will be removed in a future version.\n  $async.Future<LoadWalletResponse> loadWallet(\n          $pb.ClientContext? ctx, LoadWalletRequest request) =>\n      _client.invoke<LoadWalletResponse>(\n          ctx, 'Wallet', 'LoadWallet', request, LoadWalletResponse());\n\n  /// UnloadWallet unloads a currently loaded wallet with the specified name.\n  /// deprecated: It will be removed in a future version.\n  $async.Future<UnloadWalletResponse> unloadWallet(\n          $pb.ClientContext? ctx, UnloadWalletRequest request) =>\n      _client.invoke<UnloadWalletResponse>(\n          ctx, 'Wallet', 'UnloadWallet', request, UnloadWalletResponse());\n\n  /// ListWallets returns a list of all available wallets.\n  $async.Future<ListWalletsResponse> listWallets(\n          $pb.ClientContext? ctx, ListWalletsRequest request) =>\n      _client.invoke<ListWalletsResponse>(\n          ctx, 'Wallet', 'ListWallets', request, ListWalletsResponse());\n\n  /// GetWalletInfo returns detailed information about a specific wallet.\n  $async.Future<GetWalletInfoResponse> getWalletInfo(\n          $pb.ClientContext? ctx, GetWalletInfoRequest request) =>\n      _client.invoke<GetWalletInfoResponse>(\n          ctx, 'Wallet', 'GetWalletInfo', request, GetWalletInfoResponse());\n\n  /// UpdatePassword updates the password of an existing wallet.\n  $async.Future<UpdatePasswordResponse> updatePassword(\n          $pb.ClientContext? ctx, UpdatePasswordRequest request) =>\n      _client.invoke<UpdatePasswordResponse>(\n          ctx, 'Wallet', 'UpdatePassword', request, UpdatePasswordResponse());\n\n  /// GetTotalBalance returns the total available balance of the wallet.\n  $async.Future<GetTotalBalanceResponse> getTotalBalance(\n          $pb.ClientContext? ctx, GetTotalBalanceRequest request) =>\n      _client.invoke<GetTotalBalanceResponse>(\n          ctx, 'Wallet', 'GetTotalBalance', request, GetTotalBalanceResponse());\n\n  /// GetTotalStake returns the total stake amount in the wallet.\n  $async.Future<GetTotalStakeResponse> getTotalStake(\n          $pb.ClientContext? ctx, GetTotalStakeRequest request) =>\n      _client.invoke<GetTotalStakeResponse>(\n          ctx, 'Wallet', 'GetTotalStake', request, GetTotalStakeResponse());\n\n  /// GetValidatorAddress retrieves the validator address associated with a public key.\n  /// Deprecated: Will move into utils.\n  $async.Future<GetValidatorAddressResponse> getValidatorAddress(\n          $pb.ClientContext? ctx, GetValidatorAddressRequest request) =>\n      _client.invoke<GetValidatorAddressResponse>(ctx, 'Wallet',\n          'GetValidatorAddress', request, GetValidatorAddressResponse());\n\n  /// GetAddressInfo returns detailed information about a specific address.\n  $async.Future<GetAddressInfoResponse> getAddressInfo(\n          $pb.ClientContext? ctx, GetAddressInfoRequest request) =>\n      _client.invoke<GetAddressInfoResponse>(\n          ctx, 'Wallet', 'GetAddressInfo', request, GetAddressInfoResponse());\n\n  /// SetAddressLabel sets or updates the label for a given address.\n  $async.Future<SetAddressLabelResponse> setAddressLabel(\n          $pb.ClientContext? ctx, SetAddressLabelRequest request) =>\n      _client.invoke<SetAddressLabelResponse>(\n          ctx, 'Wallet', 'SetAddressLabel', request, SetAddressLabelResponse());\n\n  /// GetNewAddress generates a new address for the specified wallet.\n  $async.Future<GetNewAddressResponse> getNewAddress(\n          $pb.ClientContext? ctx, GetNewAddressRequest request) =>\n      _client.invoke<GetNewAddressResponse>(\n          ctx, 'Wallet', 'GetNewAddress', request, GetNewAddressResponse());\n\n  /// ListAddresses returns all addresses in the specified wallet.\n  $async.Future<ListAddressesResponse> listAddresses(\n          $pb.ClientContext? ctx, ListAddressesRequest request) =>\n      _client.invoke<ListAddressesResponse>(\n          ctx, 'Wallet', 'ListAddresses', request, ListAddressesResponse());\n\n  /// SignMessage signs an arbitrary message using a wallet's private key.\n  $async.Future<SignMessageResponse> signMessage(\n          $pb.ClientContext? ctx, SignMessageRequest request) =>\n      _client.invoke<SignMessageResponse>(\n          ctx, 'Wallet', 'SignMessage', request, SignMessageResponse());\n\n  /// SignRawTransaction signs a raw transaction for a specified wallet.\n  $async.Future<SignRawTransactionResponse> signRawTransaction(\n          $pb.ClientContext? ctx, SignRawTransactionRequest request) =>\n      _client.invoke<SignRawTransactionResponse>(ctx, 'Wallet',\n          'SignRawTransaction', request, SignRawTransactionResponse());\n\n  /// ListTransactions returns a list of transactions for a wallet,\n  /// optionally filtered by a specific address, with pagination support.\n  $async.Future<ListTransactionsResponse> listTransactions(\n          $pb.ClientContext? ctx, ListTransactionsRequest request) =>\n      _client.invoke<ListTransactionsResponse>(ctx, 'Wallet',\n          'ListTransactions', request, ListTransactionsResponse());\n\n  /// SetDefaultFee sets the default fee for the wallet.\n  $async.Future<SetDefaultFeeResponse> setDefaultFee(\n          $pb.ClientContext? ctx, SetDefaultFeeRequest request) =>\n      _client.invoke<SetDefaultFeeResponse>(\n          ctx, 'Wallet', 'SetDefaultFee', request, SetDefaultFeeResponse());\n\n  /// GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n  $async.Future<GetMnemonicResponse> getMnemonic(\n          $pb.ClientContext? ctx, GetMnemonicRequest request) =>\n      _client.invoke<GetMnemonicResponse>(\n          ctx, 'Wallet', 'GetMnemonic', request, GetMnemonicResponse());\n\n  /// GetPrivateKey returns the private key for a given address.\n  $async.Future<GetPrivateKeyResponse> getPrivateKey(\n          $pb.ClientContext? ctx, GetPrivateKeyRequest request) =>\n      _client.invoke<GetPrivateKeyResponse>(\n          ctx, 'Wallet', 'GetPrivateKey', request, GetPrivateKeyResponse());\n}\n\nconst $core.bool _omitFieldNames =\n    $core.bool.fromEnvironment('protobuf.omit_field_names');\nconst $core.bool _omitMessageNames =\n    $core.bool.fromEnvironment('protobuf.omit_message_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/wallet.pbenum.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from wallet.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\n/// AddressType defines different types of blockchain addresses.\nclass AddressType extends $pb.ProtobufEnum {\n  /// Treasury address type.\n  /// Should not be used to generate new addresses.\n  static const AddressType ADDRESS_TYPE_TREASURY =\n      AddressType._(0, _omitEnumNames ? '' : 'ADDRESS_TYPE_TREASURY');\n\n  /// Validator address type used for validator nodes.\n  static const AddressType ADDRESS_TYPE_VALIDATOR =\n      AddressType._(1, _omitEnumNames ? '' : 'ADDRESS_TYPE_VALIDATOR');\n\n  /// Account address type with BLS signature scheme.\n  static const AddressType ADDRESS_TYPE_BLS_ACCOUNT =\n      AddressType._(2, _omitEnumNames ? '' : 'ADDRESS_TYPE_BLS_ACCOUNT');\n\n  /// Account address type with Ed25519 signature scheme.\n  /// Note: Generating a new Ed25519 address requires the wallet password.\n  static const AddressType ADDRESS_TYPE_ED25519_ACCOUNT =\n      AddressType._(3, _omitEnumNames ? '' : 'ADDRESS_TYPE_ED25519_ACCOUNT');\n\n  static const $core.List<AddressType> values = <AddressType>[\n    ADDRESS_TYPE_TREASURY,\n    ADDRESS_TYPE_VALIDATOR,\n    ADDRESS_TYPE_BLS_ACCOUNT,\n    ADDRESS_TYPE_ED25519_ACCOUNT,\n  ];\n\n  static final $core.List<AddressType?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 3);\n  static AddressType? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const AddressType._(super.value, super.name);\n}\n\n/// TxDirection indicates the direction of a transaction relative to the wallet.\nclass TxDirection extends $pb.ProtobufEnum {\n  /// include both incoming and outgoing transactions.\n  static const TxDirection TX_DIRECTION_ANY =\n      TxDirection._(0, _omitEnumNames ? '' : 'TX_DIRECTION_ANY');\n\n  /// Include only incoming transactions where the wallet receives funds.\n  static const TxDirection TX_DIRECTION_INCOMING =\n      TxDirection._(1, _omitEnumNames ? '' : 'TX_DIRECTION_INCOMING');\n\n  /// Include only outgoing transactions where the wallet sends funds.\n  static const TxDirection TX_DIRECTION_OUTGOING =\n      TxDirection._(2, _omitEnumNames ? '' : 'TX_DIRECTION_OUTGOING');\n\n  static const $core.List<TxDirection> values = <TxDirection>[\n    TX_DIRECTION_ANY,\n    TX_DIRECTION_INCOMING,\n    TX_DIRECTION_OUTGOING,\n  ];\n\n  static final $core.List<TxDirection?> _byValue =\n      $pb.ProtobufEnum.$_initByValueList(values, 2);\n  static TxDirection? valueOf($core.int value) =>\n      value < 0 || value >= _byValue.length ? null : _byValue[value];\n\n  const TxDirection._(super.value, super.name);\n}\n\n/// TransactionStatus defines the status of a transaction.\nclass TransactionStatus extends $pb.ProtobufEnum {\n  /// Pending status for transactions in the mempool.\n  static const TransactionStatus TRANSACTION_STATUS_PENDING =\n      TransactionStatus._(\n          0, _omitEnumNames ? '' : 'TRANSACTION_STATUS_PENDING');\n\n  /// Confirmed status for transactions included in a block.\n  static const TransactionStatus TRANSACTION_STATUS_CONFIRMED =\n      TransactionStatus._(\n          1, _omitEnumNames ? '' : 'TRANSACTION_STATUS_CONFIRMED');\n\n  /// Failed status for transactions that were not successful.\n  static const TransactionStatus TRANSACTION_STATUS_FAILED =\n      TransactionStatus._(\n          -1, _omitEnumNames ? '' : 'TRANSACTION_STATUS_FAILED');\n\n  static const $core.List<TransactionStatus> values = <TransactionStatus>[\n    TRANSACTION_STATUS_PENDING,\n    TRANSACTION_STATUS_CONFIRMED,\n    TRANSACTION_STATUS_FAILED,\n  ];\n\n  static final $core.Map<$core.int, TransactionStatus> _byValue =\n      $pb.ProtobufEnum.initByValue(values);\n  static TransactionStatus? valueOf($core.int value) => _byValue[value];\n\n  const TransactionStatus._(super.value, super.name);\n}\n\nconst $core.bool _omitEnumNames =\n    $core.bool.fromEnvironment('protobuf.omit_enum_names');\n"
  },
  {
    "path": "www/grpc/gen/dart/wallet.pbjson.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from wallet.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n// ignore_for_file: unused_import\n\nimport 'dart:convert' as $convert;\nimport 'dart:core' as $core;\nimport 'dart:typed_data' as $typed_data;\n\n@$core.Deprecated('Use addressTypeDescriptor instead')\nconst AddressType$json = {\n  '1': 'AddressType',\n  '2': [\n    {'1': 'ADDRESS_TYPE_TREASURY', '2': 0},\n    {'1': 'ADDRESS_TYPE_VALIDATOR', '2': 1},\n    {'1': 'ADDRESS_TYPE_BLS_ACCOUNT', '2': 2},\n    {'1': 'ADDRESS_TYPE_ED25519_ACCOUNT', '2': 3},\n  ],\n};\n\n/// Descriptor for `AddressType`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List addressTypeDescriptor = $convert.base64Decode(\n    'CgtBZGRyZXNzVHlwZRIZChVBRERSRVNTX1RZUEVfVFJFQVNVUlkQABIaChZBRERSRVNTX1RZUE'\n    'VfVkFMSURBVE9SEAESHAoYQUREUkVTU19UWVBFX0JMU19BQ0NPVU5UEAISIAocQUREUkVTU19U'\n    'WVBFX0VEMjU1MTlfQUNDT1VOVBAD');\n\n@$core.Deprecated('Use txDirectionDescriptor instead')\nconst TxDirection$json = {\n  '1': 'TxDirection',\n  '2': [\n    {'1': 'TX_DIRECTION_ANY', '2': 0},\n    {'1': 'TX_DIRECTION_INCOMING', '2': 1},\n    {'1': 'TX_DIRECTION_OUTGOING', '2': 2},\n  ],\n};\n\n/// Descriptor for `TxDirection`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List txDirectionDescriptor = $convert.base64Decode(\n    'CgtUeERpcmVjdGlvbhIUChBUWF9ESVJFQ1RJT05fQU5ZEAASGQoVVFhfRElSRUNUSU9OX0lOQ0'\n    '9NSU5HEAESGQoVVFhfRElSRUNUSU9OX09VVEdPSU5HEAI=');\n\n@$core.Deprecated('Use transactionStatusDescriptor instead')\nconst TransactionStatus$json = {\n  '1': 'TransactionStatus',\n  '2': [\n    {'1': 'TRANSACTION_STATUS_PENDING', '2': 0},\n    {'1': 'TRANSACTION_STATUS_CONFIRMED', '2': 1},\n    {'1': 'TRANSACTION_STATUS_FAILED', '2': -1},\n  ],\n};\n\n/// Descriptor for `TransactionStatus`. Decode as a `google.protobuf.EnumDescriptorProto`.\nfinal $typed_data.Uint8List transactionStatusDescriptor = $convert.base64Decode(\n    'ChFUcmFuc2FjdGlvblN0YXR1cxIeChpUUkFOU0FDVElPTl9TVEFUVVNfUEVORElORxAAEiAKHF'\n    'RSQU5TQUNUSU9OX1NUQVRVU19DT05GSVJNRUQQARImChlUUkFOU0FDVElPTl9TVEFUVVNfRkFJ'\n    'TEVEEP///////////wE=');\n\n@$core.Deprecated('Use addressInfoDescriptor instead')\nconst AddressInfo$json = {\n  '1': 'AddressInfo',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'public_key', '3': 2, '4': 1, '5': 9, '10': 'publicKey'},\n    {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'},\n    {'1': 'path', '3': 4, '4': 1, '5': 9, '10': 'path'},\n  ],\n};\n\n/// Descriptor for `AddressInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List addressInfoDescriptor = $convert.base64Decode(\n    'CgtBZGRyZXNzSW5mbxIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNzEh0KCnB1YmxpY19rZXkYAi'\n    'ABKAlSCXB1YmxpY0tleRIUCgVsYWJlbBgDIAEoCVIFbGFiZWwSEgoEcGF0aBgEIAEoCVIEcGF0'\n    'aA==');\n\n@$core.Deprecated('Use getNewAddressRequestDescriptor instead')\nconst GetNewAddressRequest$json = {\n  '1': 'GetNewAddressRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'address_type',\n      '3': 2,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.AddressType',\n      '10': 'addressType'\n    },\n    {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'},\n    {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'},\n  ],\n};\n\n/// Descriptor for `GetNewAddressRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNewAddressRequestDescriptor = $convert.base64Decode(\n    'ChRHZXROZXdBZGRyZXNzUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'I2CgxhZGRyZXNzX3R5cGUYAiABKA4yEy5wYWN0dXMuQWRkcmVzc1R5cGVSC2FkZHJlc3NUeXBl'\n    'EhQKBWxhYmVsGAMgASgJUgVsYWJlbBIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQ=');\n\n@$core.Deprecated('Use getNewAddressResponseDescriptor instead')\nconst GetNewAddressResponse$json = {\n  '1': 'GetNewAddressResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'addr',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.AddressInfo',\n      '10': 'addr'\n    },\n  ],\n};\n\n/// Descriptor for `GetNewAddressResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getNewAddressResponseDescriptor = $convert.base64Decode(\n    'ChVHZXROZXdBZGRyZXNzUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USJwoEYWRkchgCIAEoCzITLnBhY3R1cy5BZGRyZXNzSW5mb1IEYWRkcg==');\n\n@$core.Deprecated('Use restoreWalletRequestDescriptor instead')\nconst RestoreWalletRequest$json = {\n  '1': 'RestoreWalletRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'},\n    {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'},\n  ],\n};\n\n/// Descriptor for `RestoreWalletRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List restoreWalletRequestDescriptor = $convert.base64Decode(\n    'ChRSZXN0b3JlV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'IaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWMSGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk');\n\n@$core.Deprecated('Use restoreWalletResponseDescriptor instead')\nconst RestoreWalletResponse$json = {\n  '1': 'RestoreWalletResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `RestoreWalletResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List restoreWalletResponseDescriptor = $convert.base64Decode(\n    'ChVSZXN0b3JlV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'U=');\n\n@$core.Deprecated('Use createWalletRequestDescriptor instead')\nconst CreateWalletRequest$json = {\n  '1': 'CreateWalletRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},\n  ],\n};\n\n/// Descriptor for `CreateWalletRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List createWalletRequestDescriptor = $convert.base64Decode(\n    'ChNDcmVhdGVXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1lEh'\n    'oKCHBhc3N3b3JkGAIgASgJUghwYXNzd29yZA==');\n\n@$core.Deprecated('Use createWalletResponseDescriptor instead')\nconst CreateWalletResponse$json = {\n  '1': 'CreateWalletResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'},\n  ],\n};\n\n/// Descriptor for `CreateWalletResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List createWalletResponseDescriptor = $convert.base64Decode(\n    'ChRDcmVhdGVXYWxsZXRSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'IaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWM=');\n\n@$core.Deprecated('Use loadWalletRequestDescriptor instead')\nconst LoadWalletRequest$json = {\n  '1': 'LoadWalletRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `LoadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List loadWalletRequestDescriptor = $convert.base64Decode(\n    'ChFMb2FkV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ==');\n\n@$core.Deprecated('Use loadWalletResponseDescriptor instead')\nconst LoadWalletResponse$json = {\n  '1': 'LoadWalletResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `LoadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List loadWalletResponseDescriptor = $convert.base64Decode(\n    'ChJMb2FkV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWU=');\n\n@$core.Deprecated('Use unloadWalletRequestDescriptor instead')\nconst UnloadWalletRequest$json = {\n  '1': 'UnloadWalletRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `UnloadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List unloadWalletRequestDescriptor = $convert.base64Decode(\n    'ChNVbmxvYWRXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1l');\n\n@$core.Deprecated('Use unloadWalletResponseDescriptor instead')\nconst UnloadWalletResponse$json = {\n  '1': 'UnloadWalletResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `UnloadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List unloadWalletResponseDescriptor = $convert.base64Decode(\n    'ChRVbmxvYWRXYWxsZXRSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ'\n    '==');\n\n@$core.Deprecated('Use getValidatorAddressRequestDescriptor instead')\nconst GetValidatorAddressRequest$json = {\n  '1': 'GetValidatorAddressRequest',\n  '2': [\n    {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'},\n  ],\n};\n\n/// Descriptor for `GetValidatorAddressRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorAddressRequestDescriptor =\n    $convert.base64Decode(\n        'ChpHZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaW'\n        'NLZXk=');\n\n@$core.Deprecated('Use getValidatorAddressResponseDescriptor instead')\nconst GetValidatorAddressResponse$json = {\n  '1': 'GetValidatorAddressResponse',\n  '2': [\n    {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetValidatorAddressResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getValidatorAddressResponseDescriptor =\n    $convert.base64Decode(\n        'ChtHZXRWYWxpZGF0b3JBZGRyZXNzUmVzcG9uc2USGAoHYWRkcmVzcxgBIAEoCVIHYWRkcmVzcw'\n        '==');\n\n@$core.Deprecated('Use signRawTransactionRequestDescriptor instead')\nconst SignRawTransactionRequest$json = {\n  '1': 'SignRawTransactionRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'raw_transaction', '3': 2, '4': 1, '5': 9, '10': 'rawTransaction'},\n    {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'},\n  ],\n};\n\n/// Descriptor for `SignRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signRawTransactionRequestDescriptor = $convert.base64Decode(\n    'ChlTaWduUmF3VHJhbnNhY3Rpb25SZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZX'\n    'ROYW1lEicKD3Jhd190cmFuc2FjdGlvbhgCIAEoCVIOcmF3VHJhbnNhY3Rpb24SGgoIcGFzc3dv'\n    'cmQYAyABKAlSCHBhc3N3b3Jk');\n\n@$core.Deprecated('Use signRawTransactionResponseDescriptor instead')\nconst SignRawTransactionResponse$json = {\n  '1': 'SignRawTransactionResponse',\n  '2': [\n    {'1': 'transaction_id', '3': 1, '4': 1, '5': 9, '10': 'transactionId'},\n    {\n      '1': 'signed_raw_transaction',\n      '3': 2,\n      '4': 1,\n      '5': 9,\n      '10': 'signedRawTransaction'\n    },\n  ],\n};\n\n/// Descriptor for `SignRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signRawTransactionResponseDescriptor =\n    $convert.base64Decode(\n        'ChpTaWduUmF3VHJhbnNhY3Rpb25SZXNwb25zZRIlCg50cmFuc2FjdGlvbl9pZBgBIAEoCVINdH'\n        'JhbnNhY3Rpb25JZBI0ChZzaWduZWRfcmF3X3RyYW5zYWN0aW9uGAIgASgJUhRzaWduZWRSYXdU'\n        'cmFuc2FjdGlvbg==');\n\n@$core.Deprecated('Use getTotalBalanceRequestDescriptor instead')\nconst GetTotalBalanceRequest$json = {\n  '1': 'GetTotalBalanceRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `GetTotalBalanceRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTotalBalanceRequestDescriptor =\n    $convert.base64Decode(\n        'ChZHZXRUb3RhbEJhbGFuY2VSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW'\n        '1l');\n\n@$core.Deprecated('Use getTotalBalanceResponseDescriptor instead')\nconst GetTotalBalanceResponse$json = {\n  '1': 'GetTotalBalanceResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'total_balance', '3': 2, '4': 1, '5': 3, '10': 'totalBalance'},\n  ],\n};\n\n/// Descriptor for `GetTotalBalanceResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTotalBalanceResponseDescriptor =\n    $convert.base64Decode(\n        'ChdHZXRUb3RhbEJhbGFuY2VSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0Tm'\n        'FtZRIjCg10b3RhbF9iYWxhbmNlGAIgASgDUgx0b3RhbEJhbGFuY2U=');\n\n@$core.Deprecated('Use signMessageRequestDescriptor instead')\nconst SignMessageRequest$json = {\n  '1': 'SignMessageRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},\n    {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'message', '3': 4, '4': 1, '5': 9, '10': 'message'},\n  ],\n};\n\n/// Descriptor for `SignMessageRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signMessageRequestDescriptor = $convert.base64Decode(\n    'ChJTaWduTWVzc2FnZVJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGg'\n    'oIcGFzc3dvcmQYAiABKAlSCHBhc3N3b3JkEhgKB2FkZHJlc3MYAyABKAlSB2FkZHJlc3MSGAoH'\n    'bWVzc2FnZRgEIAEoCVIHbWVzc2FnZQ==');\n\n@$core.Deprecated('Use signMessageResponseDescriptor instead')\nconst SignMessageResponse$json = {\n  '1': 'SignMessageResponse',\n  '2': [\n    {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'},\n  ],\n};\n\n/// Descriptor for `SignMessageResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List signMessageResponseDescriptor =\n    $convert.base64Decode(\n        'ChNTaWduTWVzc2FnZVJlc3BvbnNlEhwKCXNpZ25hdHVyZRgBIAEoCVIJc2lnbmF0dXJl');\n\n@$core.Deprecated('Use getTotalStakeRequestDescriptor instead')\nconst GetTotalStakeRequest$json = {\n  '1': 'GetTotalStakeRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `GetTotalStakeRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTotalStakeRequestDescriptor = $convert.base64Decode(\n    'ChRHZXRUb3RhbFN0YWtlUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ'\n    '==');\n\n@$core.Deprecated('Use getTotalStakeResponseDescriptor instead')\nconst GetTotalStakeResponse$json = {\n  '1': 'GetTotalStakeResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'total_stake', '3': 2, '4': 1, '5': 3, '10': 'totalStake'},\n  ],\n};\n\n/// Descriptor for `GetTotalStakeResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getTotalStakeResponseDescriptor = $convert.base64Decode(\n    'ChVHZXRUb3RhbFN0YWtlUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USHwoLdG90YWxfc3Rha2UYAiABKANSCnRvdGFsU3Rha2U=');\n\n@$core.Deprecated('Use getAddressInfoRequestDescriptor instead')\nconst GetAddressInfoRequest$json = {\n  '1': 'GetAddressInfoRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetAddressInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getAddressInfoRequestDescriptor = $convert.base64Decode(\n    'ChVHZXRBZGRyZXNzSW5mb1JlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USGAoHYWRkcmVzcxgCIAEoCVIHYWRkcmVzcw==');\n\n@$core.Deprecated('Use getAddressInfoResponseDescriptor instead')\nconst GetAddressInfoResponse$json = {\n  '1': 'GetAddressInfoResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'addr',\n      '3': 2,\n      '4': 1,\n      '5': 11,\n      '6': '.pactus.AddressInfo',\n      '10': 'addr'\n    },\n  ],\n};\n\n/// Descriptor for `GetAddressInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getAddressInfoResponseDescriptor =\n    $convert.base64Decode(\n        'ChZHZXRBZGRyZXNzSW5mb1Jlc3BvbnNlEh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW'\n        '1lEicKBGFkZHIYAiABKAsyEy5wYWN0dXMuQWRkcmVzc0luZm9SBGFkZHI=');\n\n@$core.Deprecated('Use setAddressLabelRequestDescriptor instead')\nconst SetAddressLabelRequest$json = {\n  '1': 'SetAddressLabelRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},\n    {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'label', '3': 4, '4': 1, '5': 9, '10': 'label'},\n  ],\n};\n\n/// Descriptor for `SetAddressLabelRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List setAddressLabelRequestDescriptor = $convert.base64Decode(\n    'ChZTZXRBZGRyZXNzTGFiZWxSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW'\n    '1lEhoKCHBhc3N3b3JkGAIgASgJUghwYXNzd29yZBIYCgdhZGRyZXNzGAMgASgJUgdhZGRyZXNz'\n    'EhQKBWxhYmVsGAQgASgJUgVsYWJlbA==');\n\n@$core.Deprecated('Use setAddressLabelResponseDescriptor instead')\nconst SetAddressLabelResponse$json = {\n  '1': 'SetAddressLabelResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'},\n    {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'},\n  ],\n};\n\n/// Descriptor for `SetAddressLabelResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List setAddressLabelResponseDescriptor = $convert.base64Decode(\n    'ChdTZXRBZGRyZXNzTGFiZWxSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0Tm'\n    'FtZRIYCgdhZGRyZXNzGAIgASgJUgdhZGRyZXNzEhQKBWxhYmVsGAMgASgJUgVsYWJlbA==');\n\n@$core.Deprecated('Use listWalletsRequestDescriptor instead')\nconst ListWalletsRequest$json = {\n  '1': 'ListWalletsRequest',\n};\n\n/// Descriptor for `ListWalletsRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listWalletsRequestDescriptor =\n    $convert.base64Decode('ChJMaXN0V2FsbGV0c1JlcXVlc3Q=');\n\n@$core.Deprecated('Use listWalletsResponseDescriptor instead')\nconst ListWalletsResponse$json = {\n  '1': 'ListWalletsResponse',\n  '2': [\n    {'1': 'wallets', '3': 1, '4': 3, '5': 9, '10': 'wallets'},\n  ],\n};\n\n/// Descriptor for `ListWalletsResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listWalletsResponseDescriptor =\n    $convert.base64Decode(\n        'ChNMaXN0V2FsbGV0c1Jlc3BvbnNlEhgKB3dhbGxldHMYASADKAlSB3dhbGxldHM=');\n\n@$core.Deprecated('Use getWalletInfoRequestDescriptor instead')\nconst GetWalletInfoRequest$json = {\n  '1': 'GetWalletInfoRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `GetWalletInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getWalletInfoRequestDescriptor = $convert.base64Decode(\n    'ChRHZXRXYWxsZXRJbmZvUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ'\n    '==');\n\n@$core.Deprecated('Use getWalletInfoResponseDescriptor instead')\nconst GetWalletInfoResponse$json = {\n  '1': 'GetWalletInfoResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'version', '3': 2, '4': 1, '5': 5, '10': 'version'},\n    {'1': 'network', '3': 3, '4': 1, '5': 9, '10': 'network'},\n    {'1': 'encrypted', '3': 4, '4': 1, '5': 8, '10': 'encrypted'},\n    {'1': 'uuid', '3': 5, '4': 1, '5': 9, '10': 'uuid'},\n    {'1': 'created_at', '3': 6, '4': 1, '5': 3, '10': 'createdAt'},\n    {'1': 'default_fee', '3': 7, '4': 1, '5': 3, '10': 'defaultFee'},\n    {'1': 'driver', '3': 8, '4': 1, '5': 9, '10': 'driver'},\n    {'1': 'path', '3': 9, '4': 1, '5': 9, '10': 'path'},\n  ],\n};\n\n/// Descriptor for `GetWalletInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getWalletInfoResponseDescriptor = $convert.base64Decode(\n    'ChVHZXRXYWxsZXRJbmZvUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USGAoHdmVyc2lvbhgCIAEoBVIHdmVyc2lvbhIYCgduZXR3b3JrGAMgASgJUgduZXR3b3JrEhwK'\n    'CWVuY3J5cHRlZBgEIAEoCFIJZW5jcnlwdGVkEhIKBHV1aWQYBSABKAlSBHV1aWQSHQoKY3JlYX'\n    'RlZF9hdBgGIAEoA1IJY3JlYXRlZEF0Eh8KC2RlZmF1bHRfZmVlGAcgASgDUgpkZWZhdWx0RmVl'\n    'EhYKBmRyaXZlchgIIAEoCVIGZHJpdmVyEhIKBHBhdGgYCSABKAlSBHBhdGg=');\n\n@$core.Deprecated('Use listAddressesRequestDescriptor instead')\nconst ListAddressesRequest$json = {\n  '1': 'ListAddressesRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'address_types',\n      '3': 2,\n      '4': 3,\n      '5': 14,\n      '6': '.pactus.AddressType',\n      '10': 'addressTypes'\n    },\n  ],\n};\n\n/// Descriptor for `ListAddressesRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listAddressesRequestDescriptor = $convert.base64Decode(\n    'ChRMaXN0QWRkcmVzc2VzUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'I4Cg1hZGRyZXNzX3R5cGVzGAIgAygOMhMucGFjdHVzLkFkZHJlc3NUeXBlUgxhZGRyZXNzVHlw'\n    'ZXM=');\n\n@$core.Deprecated('Use listAddressesResponseDescriptor instead')\nconst ListAddressesResponse$json = {\n  '1': 'ListAddressesResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'addrs',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.AddressInfo',\n      '10': 'addrs'\n    },\n  ],\n};\n\n/// Descriptor for `ListAddressesResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listAddressesResponseDescriptor = $convert.base64Decode(\n    'ChVMaXN0QWRkcmVzc2VzUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USKQoFYWRkcnMYAiADKAsyEy5wYWN0dXMuQWRkcmVzc0luZm9SBWFkZHJz');\n\n@$core.Deprecated('Use updatePasswordRequestDescriptor instead')\nconst UpdatePasswordRequest$json = {\n  '1': 'UpdatePasswordRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'old_password', '3': 2, '4': 1, '5': 9, '10': 'oldPassword'},\n    {'1': 'new_password', '3': 3, '4': 1, '5': 9, '10': 'newPassword'},\n  ],\n};\n\n/// Descriptor for `UpdatePasswordRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List updatePasswordRequestDescriptor = $convert.base64Decode(\n    'ChVVcGRhdGVQYXNzd29yZFJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'USIQoMb2xkX3Bhc3N3b3JkGAIgASgJUgtvbGRQYXNzd29yZBIhCgxuZXdfcGFzc3dvcmQYAyAB'\n    'KAlSC25ld1Bhc3N3b3Jk');\n\n@$core.Deprecated('Use updatePasswordResponseDescriptor instead')\nconst UpdatePasswordResponse$json = {\n  '1': 'UpdatePasswordResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `UpdatePasswordResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List updatePasswordResponseDescriptor =\n    $convert.base64Decode(\n        'ChZVcGRhdGVQYXNzd29yZFJlc3BvbnNlEh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW'\n        '1l');\n\n@$core.Deprecated('Use walletTransactionInfoDescriptor instead')\nconst WalletTransactionInfo$json = {\n  '1': 'WalletTransactionInfo',\n  '2': [\n    {'1': 'no', '3': 1, '4': 1, '5': 3, '10': 'no'},\n    {'1': 'tx_id', '3': 2, '4': 1, '5': 9, '10': 'txId'},\n    {'1': 'sender', '3': 3, '4': 1, '5': 9, '10': 'sender'},\n    {'1': 'receiver', '3': 4, '4': 1, '5': 9, '10': 'receiver'},\n    {\n      '1': 'direction',\n      '3': 5,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.TxDirection',\n      '10': 'direction'\n    },\n    {'1': 'amount', '3': 6, '4': 1, '5': 3, '10': 'amount'},\n    {'1': 'fee', '3': 7, '4': 1, '5': 3, '10': 'fee'},\n    {'1': 'memo', '3': 8, '4': 1, '5': 9, '10': 'memo'},\n    {\n      '1': 'status',\n      '3': 9,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.TransactionStatus',\n      '10': 'status'\n    },\n    {'1': 'block_height', '3': 10, '4': 1, '5': 13, '10': 'blockHeight'},\n    {\n      '1': 'payload_type',\n      '3': 11,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.PayloadType',\n      '10': 'payloadType'\n    },\n    {'1': 'data', '3': 12, '4': 1, '5': 12, '10': 'data'},\n    {'1': 'comment', '3': 13, '4': 1, '5': 9, '10': 'comment'},\n    {'1': 'created_at', '3': 14, '4': 1, '5': 3, '10': 'createdAt'},\n    {'1': 'updated_at', '3': 15, '4': 1, '5': 3, '10': 'updatedAt'},\n  ],\n};\n\n/// Descriptor for `WalletTransactionInfo`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List walletTransactionInfoDescriptor = $convert.base64Decode(\n    'ChVXYWxsZXRUcmFuc2FjdGlvbkluZm8SDgoCbm8YASABKANSAm5vEhMKBXR4X2lkGAIgASgJUg'\n    'R0eElkEhYKBnNlbmRlchgDIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAQgASgJUghyZWNlaXZl'\n    'chIxCglkaXJlY3Rpb24YBSABKA4yEy5wYWN0dXMuVHhEaXJlY3Rpb25SCWRpcmVjdGlvbhIWCg'\n    'ZhbW91bnQYBiABKANSBmFtb3VudBIQCgNmZWUYByABKANSA2ZlZRISCgRtZW1vGAggASgJUgRt'\n    'ZW1vEjEKBnN0YXR1cxgJIAEoDjIZLnBhY3R1cy5UcmFuc2FjdGlvblN0YXR1c1IGc3RhdHVzEi'\n    'EKDGJsb2NrX2hlaWdodBgKIAEoDVILYmxvY2tIZWlnaHQSNgoMcGF5bG9hZF90eXBlGAsgASgO'\n    'MhMucGFjdHVzLlBheWxvYWRUeXBlUgtwYXlsb2FkVHlwZRISCgRkYXRhGAwgASgMUgRkYXRhEh'\n    'gKB2NvbW1lbnQYDSABKAlSB2NvbW1lbnQSHQoKY3JlYXRlZF9hdBgOIAEoA1IJY3JlYXRlZEF0'\n    'Eh0KCnVwZGF0ZWRfYXQYDyABKANSCXVwZGF0ZWRBdA==');\n\n@$core.Deprecated('Use listTransactionsRequestDescriptor instead')\nconst ListTransactionsRequest$json = {\n  '1': 'ListTransactionsRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'},\n    {\n      '1': 'direction',\n      '3': 3,\n      '4': 1,\n      '5': 14,\n      '6': '.pactus.TxDirection',\n      '10': 'direction'\n    },\n    {'1': 'count', '3': 4, '4': 1, '5': 5, '10': 'count'},\n    {'1': 'skip', '3': 5, '4': 1, '5': 5, '10': 'skip'},\n  ],\n};\n\n/// Descriptor for `ListTransactionsRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listTransactionsRequestDescriptor = $convert.base64Decode(\n    'ChdMaXN0VHJhbnNhY3Rpb25zUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0Tm'\n    'FtZRIYCgdhZGRyZXNzGAIgASgJUgdhZGRyZXNzEjEKCWRpcmVjdGlvbhgDIAEoDjITLnBhY3R1'\n    'cy5UeERpcmVjdGlvblIJZGlyZWN0aW9uEhQKBWNvdW50GAQgASgFUgVjb3VudBISCgRza2lwGA'\n    'UgASgFUgRza2lw');\n\n@$core.Deprecated('Use listTransactionsResponseDescriptor instead')\nconst ListTransactionsResponse$json = {\n  '1': 'ListTransactionsResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {\n      '1': 'txs',\n      '3': 2,\n      '4': 3,\n      '5': 11,\n      '6': '.pactus.WalletTransactionInfo',\n      '10': 'txs'\n    },\n  ],\n};\n\n/// Descriptor for `ListTransactionsResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List listTransactionsResponseDescriptor =\n    $convert.base64Decode(\n        'ChhMaXN0VHJhbnNhY3Rpb25zUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE'\n        '5hbWUSLwoDdHhzGAIgAygLMh0ucGFjdHVzLldhbGxldFRyYW5zYWN0aW9uSW5mb1IDdHhz');\n\n@$core.Deprecated('Use setDefaultFeeRequestDescriptor instead')\nconst SetDefaultFeeRequest$json = {\n  '1': 'SetDefaultFeeRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'amount', '3': 2, '4': 1, '5': 3, '10': 'amount'},\n  ],\n};\n\n/// Descriptor for `SetDefaultFeeRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List setDefaultFeeRequestDescriptor = $convert.base64Decode(\n    'ChRTZXREZWZhdWx0RmVlUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'IWCgZhbW91bnQYAiABKANSBmFtb3VudA==');\n\n@$core.Deprecated('Use setDefaultFeeResponseDescriptor instead')\nconst SetDefaultFeeResponse$json = {\n  '1': 'SetDefaultFeeResponse',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n  ],\n};\n\n/// Descriptor for `SetDefaultFeeResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List setDefaultFeeResponseDescriptor = $convert.base64Decode(\n    'ChVTZXREZWZhdWx0RmVlUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbW'\n    'U=');\n\n@$core.Deprecated('Use getMnemonicRequestDescriptor instead')\nconst GetMnemonicRequest$json = {\n  '1': 'GetMnemonicRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},\n  ],\n};\n\n/// Descriptor for `GetMnemonicRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getMnemonicRequestDescriptor = $convert.base64Decode(\n    'ChJHZXRNbmVtb25pY1JlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGg'\n    'oIcGFzc3dvcmQYAiABKAlSCHBhc3N3b3Jk');\n\n@$core.Deprecated('Use getMnemonicResponseDescriptor instead')\nconst GetMnemonicResponse$json = {\n  '1': 'GetMnemonicResponse',\n  '2': [\n    {'1': 'mnemonic', '3': 1, '4': 1, '5': 9, '10': 'mnemonic'},\n  ],\n};\n\n/// Descriptor for `GetMnemonicResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getMnemonicResponseDescriptor =\n    $convert.base64Decode(\n        'ChNHZXRNbmVtb25pY1Jlc3BvbnNlEhoKCG1uZW1vbmljGAEgASgJUghtbmVtb25pYw==');\n\n@$core.Deprecated('Use getPrivateKeyRequestDescriptor instead')\nconst GetPrivateKeyRequest$json = {\n  '1': 'GetPrivateKeyRequest',\n  '2': [\n    {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'},\n    {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},\n    {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'},\n  ],\n};\n\n/// Descriptor for `GetPrivateKeyRequest`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getPrivateKeyRequestDescriptor = $convert.base64Decode(\n    'ChRHZXRQcml2YXRlS2V5UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZR'\n    'IaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQSGAoHYWRkcmVzcxgDIAEoCVIHYWRkcmVzcw==');\n\n@$core.Deprecated('Use getPrivateKeyResponseDescriptor instead')\nconst GetPrivateKeyResponse$json = {\n  '1': 'GetPrivateKeyResponse',\n  '2': [\n    {'1': 'private_key', '3': 1, '4': 1, '5': 9, '10': 'privateKey'},\n  ],\n};\n\n/// Descriptor for `GetPrivateKeyResponse`. Decode as a `google.protobuf.DescriptorProto`.\nfinal $typed_data.Uint8List getPrivateKeyResponseDescriptor = $convert.base64Decode(\n    'ChVHZXRQcml2YXRlS2V5UmVzcG9uc2USHwoLcHJpdmF0ZV9rZXkYASABKAlSCnByaXZhdGVLZX'\n    'k=');\n\nconst $core.Map<$core.String, $core.dynamic> WalletServiceBase$json = {\n  '1': 'Wallet',\n  '2': [\n    {\n      '1': 'CreateWallet',\n      '2': '.pactus.CreateWalletRequest',\n      '3': '.pactus.CreateWalletResponse'\n    },\n    {\n      '1': 'RestoreWallet',\n      '2': '.pactus.RestoreWalletRequest',\n      '3': '.pactus.RestoreWalletResponse'\n    },\n    {\n      '1': 'LoadWallet',\n      '2': '.pactus.LoadWalletRequest',\n      '3': '.pactus.LoadWalletResponse'\n    },\n    {\n      '1': 'UnloadWallet',\n      '2': '.pactus.UnloadWalletRequest',\n      '3': '.pactus.UnloadWalletResponse'\n    },\n    {\n      '1': 'ListWallets',\n      '2': '.pactus.ListWalletsRequest',\n      '3': '.pactus.ListWalletsResponse'\n    },\n    {\n      '1': 'GetWalletInfo',\n      '2': '.pactus.GetWalletInfoRequest',\n      '3': '.pactus.GetWalletInfoResponse'\n    },\n    {\n      '1': 'UpdatePassword',\n      '2': '.pactus.UpdatePasswordRequest',\n      '3': '.pactus.UpdatePasswordResponse'\n    },\n    {\n      '1': 'GetTotalBalance',\n      '2': '.pactus.GetTotalBalanceRequest',\n      '3': '.pactus.GetTotalBalanceResponse'\n    },\n    {\n      '1': 'GetTotalStake',\n      '2': '.pactus.GetTotalStakeRequest',\n      '3': '.pactus.GetTotalStakeResponse'\n    },\n    {\n      '1': 'GetValidatorAddress',\n      '2': '.pactus.GetValidatorAddressRequest',\n      '3': '.pactus.GetValidatorAddressResponse'\n    },\n    {\n      '1': 'GetAddressInfo',\n      '2': '.pactus.GetAddressInfoRequest',\n      '3': '.pactus.GetAddressInfoResponse'\n    },\n    {\n      '1': 'SetAddressLabel',\n      '2': '.pactus.SetAddressLabelRequest',\n      '3': '.pactus.SetAddressLabelResponse'\n    },\n    {\n      '1': 'GetNewAddress',\n      '2': '.pactus.GetNewAddressRequest',\n      '3': '.pactus.GetNewAddressResponse'\n    },\n    {\n      '1': 'ListAddresses',\n      '2': '.pactus.ListAddressesRequest',\n      '3': '.pactus.ListAddressesResponse'\n    },\n    {\n      '1': 'SignMessage',\n      '2': '.pactus.SignMessageRequest',\n      '3': '.pactus.SignMessageResponse'\n    },\n    {\n      '1': 'SignRawTransaction',\n      '2': '.pactus.SignRawTransactionRequest',\n      '3': '.pactus.SignRawTransactionResponse'\n    },\n    {\n      '1': 'ListTransactions',\n      '2': '.pactus.ListTransactionsRequest',\n      '3': '.pactus.ListTransactionsResponse'\n    },\n    {\n      '1': 'SetDefaultFee',\n      '2': '.pactus.SetDefaultFeeRequest',\n      '3': '.pactus.SetDefaultFeeResponse'\n    },\n    {\n      '1': 'GetMnemonic',\n      '2': '.pactus.GetMnemonicRequest',\n      '3': '.pactus.GetMnemonicResponse'\n    },\n    {\n      '1': 'GetPrivateKey',\n      '2': '.pactus.GetPrivateKeyRequest',\n      '3': '.pactus.GetPrivateKeyResponse'\n    },\n  ],\n};\n\n@$core.Deprecated('Use walletServiceDescriptor instead')\nconst $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n    WalletServiceBase$messageJson = {\n  '.pactus.CreateWalletRequest': CreateWalletRequest$json,\n  '.pactus.CreateWalletResponse': CreateWalletResponse$json,\n  '.pactus.RestoreWalletRequest': RestoreWalletRequest$json,\n  '.pactus.RestoreWalletResponse': RestoreWalletResponse$json,\n  '.pactus.LoadWalletRequest': LoadWalletRequest$json,\n  '.pactus.LoadWalletResponse': LoadWalletResponse$json,\n  '.pactus.UnloadWalletRequest': UnloadWalletRequest$json,\n  '.pactus.UnloadWalletResponse': UnloadWalletResponse$json,\n  '.pactus.ListWalletsRequest': ListWalletsRequest$json,\n  '.pactus.ListWalletsResponse': ListWalletsResponse$json,\n  '.pactus.GetWalletInfoRequest': GetWalletInfoRequest$json,\n  '.pactus.GetWalletInfoResponse': GetWalletInfoResponse$json,\n  '.pactus.UpdatePasswordRequest': UpdatePasswordRequest$json,\n  '.pactus.UpdatePasswordResponse': UpdatePasswordResponse$json,\n  '.pactus.GetTotalBalanceRequest': GetTotalBalanceRequest$json,\n  '.pactus.GetTotalBalanceResponse': GetTotalBalanceResponse$json,\n  '.pactus.GetTotalStakeRequest': GetTotalStakeRequest$json,\n  '.pactus.GetTotalStakeResponse': GetTotalStakeResponse$json,\n  '.pactus.GetValidatorAddressRequest': GetValidatorAddressRequest$json,\n  '.pactus.GetValidatorAddressResponse': GetValidatorAddressResponse$json,\n  '.pactus.GetAddressInfoRequest': GetAddressInfoRequest$json,\n  '.pactus.GetAddressInfoResponse': GetAddressInfoResponse$json,\n  '.pactus.AddressInfo': AddressInfo$json,\n  '.pactus.SetAddressLabelRequest': SetAddressLabelRequest$json,\n  '.pactus.SetAddressLabelResponse': SetAddressLabelResponse$json,\n  '.pactus.GetNewAddressRequest': GetNewAddressRequest$json,\n  '.pactus.GetNewAddressResponse': GetNewAddressResponse$json,\n  '.pactus.ListAddressesRequest': ListAddressesRequest$json,\n  '.pactus.ListAddressesResponse': ListAddressesResponse$json,\n  '.pactus.SignMessageRequest': SignMessageRequest$json,\n  '.pactus.SignMessageResponse': SignMessageResponse$json,\n  '.pactus.SignRawTransactionRequest': SignRawTransactionRequest$json,\n  '.pactus.SignRawTransactionResponse': SignRawTransactionResponse$json,\n  '.pactus.ListTransactionsRequest': ListTransactionsRequest$json,\n  '.pactus.ListTransactionsResponse': ListTransactionsResponse$json,\n  '.pactus.WalletTransactionInfo': WalletTransactionInfo$json,\n  '.pactus.SetDefaultFeeRequest': SetDefaultFeeRequest$json,\n  '.pactus.SetDefaultFeeResponse': SetDefaultFeeResponse$json,\n  '.pactus.GetMnemonicRequest': GetMnemonicRequest$json,\n  '.pactus.GetMnemonicResponse': GetMnemonicResponse$json,\n  '.pactus.GetPrivateKeyRequest': GetPrivateKeyRequest$json,\n  '.pactus.GetPrivateKeyResponse': GetPrivateKeyResponse$json,\n};\n\n/// Descriptor for `Wallet`. Decode as a `google.protobuf.ServiceDescriptorProto`.\nfinal $typed_data.Uint8List walletServiceDescriptor = $convert.base64Decode(\n    'CgZXYWxsZXQSSQoMQ3JlYXRlV2FsbGV0EhsucGFjdHVzLkNyZWF0ZVdhbGxldFJlcXVlc3QaHC'\n    '5wYWN0dXMuQ3JlYXRlV2FsbGV0UmVzcG9uc2USTAoNUmVzdG9yZVdhbGxldBIcLnBhY3R1cy5S'\n    'ZXN0b3JlV2FsbGV0UmVxdWVzdBodLnBhY3R1cy5SZXN0b3JlV2FsbGV0UmVzcG9uc2USQwoKTG'\n    '9hZFdhbGxldBIZLnBhY3R1cy5Mb2FkV2FsbGV0UmVxdWVzdBoaLnBhY3R1cy5Mb2FkV2FsbGV0'\n    'UmVzcG9uc2USSQoMVW5sb2FkV2FsbGV0EhsucGFjdHVzLlVubG9hZFdhbGxldFJlcXVlc3QaHC'\n    '5wYWN0dXMuVW5sb2FkV2FsbGV0UmVzcG9uc2USRgoLTGlzdFdhbGxldHMSGi5wYWN0dXMuTGlz'\n    'dFdhbGxldHNSZXF1ZXN0GhsucGFjdHVzLkxpc3RXYWxsZXRzUmVzcG9uc2USTAoNR2V0V2FsbG'\n    'V0SW5mbxIcLnBhY3R1cy5HZXRXYWxsZXRJbmZvUmVxdWVzdBodLnBhY3R1cy5HZXRXYWxsZXRJ'\n    'bmZvUmVzcG9uc2USTwoOVXBkYXRlUGFzc3dvcmQSHS5wYWN0dXMuVXBkYXRlUGFzc3dvcmRSZX'\n    'F1ZXN0Gh4ucGFjdHVzLlVwZGF0ZVBhc3N3b3JkUmVzcG9uc2USUgoPR2V0VG90YWxCYWxhbmNl'\n    'Eh4ucGFjdHVzLkdldFRvdGFsQmFsYW5jZVJlcXVlc3QaHy5wYWN0dXMuR2V0VG90YWxCYWxhbm'\n    'NlUmVzcG9uc2USTAoNR2V0VG90YWxTdGFrZRIcLnBhY3R1cy5HZXRUb3RhbFN0YWtlUmVxdWVz'\n    'dBodLnBhY3R1cy5HZXRUb3RhbFN0YWtlUmVzcG9uc2USXgoTR2V0VmFsaWRhdG9yQWRkcmVzcx'\n    'IiLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBojLnBhY3R1cy5HZXRWYWxpZGF0'\n    'b3JBZGRyZXNzUmVzcG9uc2USTwoOR2V0QWRkcmVzc0luZm8SHS5wYWN0dXMuR2V0QWRkcmVzc0'\n    'luZm9SZXF1ZXN0Gh4ucGFjdHVzLkdldEFkZHJlc3NJbmZvUmVzcG9uc2USUgoPU2V0QWRkcmVz'\n    'c0xhYmVsEh4ucGFjdHVzLlNldEFkZHJlc3NMYWJlbFJlcXVlc3QaHy5wYWN0dXMuU2V0QWRkcm'\n    'Vzc0xhYmVsUmVzcG9uc2USTAoNR2V0TmV3QWRkcmVzcxIcLnBhY3R1cy5HZXROZXdBZGRyZXNz'\n    'UmVxdWVzdBodLnBhY3R1cy5HZXROZXdBZGRyZXNzUmVzcG9uc2USTAoNTGlzdEFkZHJlc3Nlcx'\n    'IcLnBhY3R1cy5MaXN0QWRkcmVzc2VzUmVxdWVzdBodLnBhY3R1cy5MaXN0QWRkcmVzc2VzUmVz'\n    'cG9uc2USRgoLU2lnbk1lc3NhZ2USGi5wYWN0dXMuU2lnbk1lc3NhZ2VSZXF1ZXN0GhsucGFjdH'\n    'VzLlNpZ25NZXNzYWdlUmVzcG9uc2USWwoSU2lnblJhd1RyYW5zYWN0aW9uEiEucGFjdHVzLlNp'\n    'Z25SYXdUcmFuc2FjdGlvblJlcXVlc3QaIi5wYWN0dXMuU2lnblJhd1RyYW5zYWN0aW9uUmVzcG'\n    '9uc2USVQoQTGlzdFRyYW5zYWN0aW9ucxIfLnBhY3R1cy5MaXN0VHJhbnNhY3Rpb25zUmVxdWVz'\n    'dBogLnBhY3R1cy5MaXN0VHJhbnNhY3Rpb25zUmVzcG9uc2USTAoNU2V0RGVmYXVsdEZlZRIcLn'\n    'BhY3R1cy5TZXREZWZhdWx0RmVlUmVxdWVzdBodLnBhY3R1cy5TZXREZWZhdWx0RmVlUmVzcG9u'\n    'c2USRgoLR2V0TW5lbW9uaWMSGi5wYWN0dXMuR2V0TW5lbW9uaWNSZXF1ZXN0GhsucGFjdHVzLk'\n    'dldE1uZW1vbmljUmVzcG9uc2USTAoNR2V0UHJpdmF0ZUtleRIcLnBhY3R1cy5HZXRQcml2YXRl'\n    'S2V5UmVxdWVzdBodLnBhY3R1cy5HZXRQcml2YXRlS2V5UmVzcG9uc2U=');\n"
  },
  {
    "path": "www/grpc/gen/dart/wallet.pbserver.dart",
    "content": "// This is a generated file - do not edit.\n//\n// Generated from wallet.proto.\n\n// @dart = 3.3\n\n// ignore_for_file: annotate_overrides, camel_case_types, comment_references\n// ignore_for_file: constant_identifier_names\n// ignore_for_file: curly_braces_in_flow_control_structures\n// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes\n// ignore_for_file: non_constant_identifier_names, prefer_relative_imports\n\nimport 'dart:async' as $async;\nimport 'dart:core' as $core;\n\nimport 'package:protobuf/protobuf.dart' as $pb;\n\nimport 'wallet.pb.dart' as $1;\nimport 'wallet.pbjson.dart';\n\nexport 'wallet.pb.dart';\n\nabstract class WalletServiceBase extends $pb.GeneratedService {\n  $async.Future<$1.CreateWalletResponse> createWallet(\n      $pb.ServerContext ctx, $1.CreateWalletRequest request);\n  $async.Future<$1.RestoreWalletResponse> restoreWallet(\n      $pb.ServerContext ctx, $1.RestoreWalletRequest request);\n  $async.Future<$1.LoadWalletResponse> loadWallet(\n      $pb.ServerContext ctx, $1.LoadWalletRequest request);\n  $async.Future<$1.UnloadWalletResponse> unloadWallet(\n      $pb.ServerContext ctx, $1.UnloadWalletRequest request);\n  $async.Future<$1.ListWalletsResponse> listWallets(\n      $pb.ServerContext ctx, $1.ListWalletsRequest request);\n  $async.Future<$1.GetWalletInfoResponse> getWalletInfo(\n      $pb.ServerContext ctx, $1.GetWalletInfoRequest request);\n  $async.Future<$1.UpdatePasswordResponse> updatePassword(\n      $pb.ServerContext ctx, $1.UpdatePasswordRequest request);\n  $async.Future<$1.GetTotalBalanceResponse> getTotalBalance(\n      $pb.ServerContext ctx, $1.GetTotalBalanceRequest request);\n  $async.Future<$1.GetTotalStakeResponse> getTotalStake(\n      $pb.ServerContext ctx, $1.GetTotalStakeRequest request);\n  $async.Future<$1.GetValidatorAddressResponse> getValidatorAddress(\n      $pb.ServerContext ctx, $1.GetValidatorAddressRequest request);\n  $async.Future<$1.GetAddressInfoResponse> getAddressInfo(\n      $pb.ServerContext ctx, $1.GetAddressInfoRequest request);\n  $async.Future<$1.SetAddressLabelResponse> setAddressLabel(\n      $pb.ServerContext ctx, $1.SetAddressLabelRequest request);\n  $async.Future<$1.GetNewAddressResponse> getNewAddress(\n      $pb.ServerContext ctx, $1.GetNewAddressRequest request);\n  $async.Future<$1.ListAddressesResponse> listAddresses(\n      $pb.ServerContext ctx, $1.ListAddressesRequest request);\n  $async.Future<$1.SignMessageResponse> signMessage(\n      $pb.ServerContext ctx, $1.SignMessageRequest request);\n  $async.Future<$1.SignRawTransactionResponse> signRawTransaction(\n      $pb.ServerContext ctx, $1.SignRawTransactionRequest request);\n  $async.Future<$1.ListTransactionsResponse> listTransactions(\n      $pb.ServerContext ctx, $1.ListTransactionsRequest request);\n  $async.Future<$1.SetDefaultFeeResponse> setDefaultFee(\n      $pb.ServerContext ctx, $1.SetDefaultFeeRequest request);\n  $async.Future<$1.GetMnemonicResponse> getMnemonic(\n      $pb.ServerContext ctx, $1.GetMnemonicRequest request);\n  $async.Future<$1.GetPrivateKeyResponse> getPrivateKey(\n      $pb.ServerContext ctx, $1.GetPrivateKeyRequest request);\n\n  $pb.GeneratedMessage createRequest($core.String methodName) {\n    switch (methodName) {\n      case 'CreateWallet':\n        return $1.CreateWalletRequest();\n      case 'RestoreWallet':\n        return $1.RestoreWalletRequest();\n      case 'LoadWallet':\n        return $1.LoadWalletRequest();\n      case 'UnloadWallet':\n        return $1.UnloadWalletRequest();\n      case 'ListWallets':\n        return $1.ListWalletsRequest();\n      case 'GetWalletInfo':\n        return $1.GetWalletInfoRequest();\n      case 'UpdatePassword':\n        return $1.UpdatePasswordRequest();\n      case 'GetTotalBalance':\n        return $1.GetTotalBalanceRequest();\n      case 'GetTotalStake':\n        return $1.GetTotalStakeRequest();\n      case 'GetValidatorAddress':\n        return $1.GetValidatorAddressRequest();\n      case 'GetAddressInfo':\n        return $1.GetAddressInfoRequest();\n      case 'SetAddressLabel':\n        return $1.SetAddressLabelRequest();\n      case 'GetNewAddress':\n        return $1.GetNewAddressRequest();\n      case 'ListAddresses':\n        return $1.ListAddressesRequest();\n      case 'SignMessage':\n        return $1.SignMessageRequest();\n      case 'SignRawTransaction':\n        return $1.SignRawTransactionRequest();\n      case 'ListTransactions':\n        return $1.ListTransactionsRequest();\n      case 'SetDefaultFee':\n        return $1.SetDefaultFeeRequest();\n      case 'GetMnemonic':\n        return $1.GetMnemonicRequest();\n      case 'GetPrivateKey':\n        return $1.GetPrivateKeyRequest();\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,\n      $core.String methodName, $pb.GeneratedMessage request) {\n    switch (methodName) {\n      case 'CreateWallet':\n        return createWallet(ctx, request as $1.CreateWalletRequest);\n      case 'RestoreWallet':\n        return restoreWallet(ctx, request as $1.RestoreWalletRequest);\n      case 'LoadWallet':\n        return loadWallet(ctx, request as $1.LoadWalletRequest);\n      case 'UnloadWallet':\n        return unloadWallet(ctx, request as $1.UnloadWalletRequest);\n      case 'ListWallets':\n        return listWallets(ctx, request as $1.ListWalletsRequest);\n      case 'GetWalletInfo':\n        return getWalletInfo(ctx, request as $1.GetWalletInfoRequest);\n      case 'UpdatePassword':\n        return updatePassword(ctx, request as $1.UpdatePasswordRequest);\n      case 'GetTotalBalance':\n        return getTotalBalance(ctx, request as $1.GetTotalBalanceRequest);\n      case 'GetTotalStake':\n        return getTotalStake(ctx, request as $1.GetTotalStakeRequest);\n      case 'GetValidatorAddress':\n        return getValidatorAddress(\n            ctx, request as $1.GetValidatorAddressRequest);\n      case 'GetAddressInfo':\n        return getAddressInfo(ctx, request as $1.GetAddressInfoRequest);\n      case 'SetAddressLabel':\n        return setAddressLabel(ctx, request as $1.SetAddressLabelRequest);\n      case 'GetNewAddress':\n        return getNewAddress(ctx, request as $1.GetNewAddressRequest);\n      case 'ListAddresses':\n        return listAddresses(ctx, request as $1.ListAddressesRequest);\n      case 'SignMessage':\n        return signMessage(ctx, request as $1.SignMessageRequest);\n      case 'SignRawTransaction':\n        return signRawTransaction(ctx, request as $1.SignRawTransactionRequest);\n      case 'ListTransactions':\n        return listTransactions(ctx, request as $1.ListTransactionsRequest);\n      case 'SetDefaultFee':\n        return setDefaultFee(ctx, request as $1.SetDefaultFeeRequest);\n      case 'GetMnemonic':\n        return getMnemonic(ctx, request as $1.GetMnemonicRequest);\n      case 'GetPrivateKey':\n        return getPrivateKey(ctx, request as $1.GetPrivateKeyRequest);\n      default:\n        throw $core.ArgumentError('Unknown method: $methodName');\n    }\n  }\n\n  $core.Map<$core.String, $core.dynamic> get $json => WalletServiceBase$json;\n  $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>>\n      get $messageJson => WalletServiceBase$messageJson;\n}\n"
  },
  {
    "path": "www/grpc/gen/docs/grpc.md",
    "content": "---\ntitle: GRPC API Reference\nweight: 1\n---\n\nEvery node in the Pactus network can be configured to use the\n[gRPC](https://grpc.io/) protocol for communication.\nHere you can find the list of all gRPC methods and messages.\n\n## Units\n\nAll the amounts are in NanoPAC units,\nwhich are atomic and the smallest unit in the Pactus blockchain.\nEach PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.\n\n## Packages\n\nFor seamless integration with Pactus, you can use these client libraries:\n\n- <i class=\"fa-brands fa-js\"></i> [pactus-grpc](https://www.npmjs.com/package/pactus-grpc/) package for Javascript\n- <i class=\"fa-brands fa-python\"></i> [pactus-grpc](https://pypi.org/project/pactus-grpc/) package for Python\n- <i class=\"fa-brands fa-rust\"></i> [pactus-grpc](https://crates.io/crates/pactus-grpc) package for Rust\n\n## gRPC Services\n\n<div id=\"toc-container\">\n  <ul class=\"\">\n    <li> Transaction Service\n      <ul>\n        <li>\n          <a href=\"#pactus.Transaction.GetTransaction\">\n          <span class=\"rpc-badge\"></span>GetTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.CalculateFee\">\n          <span class=\"rpc-badge\"></span>CalculateFee</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.BroadcastTransaction\">\n          <span class=\"rpc-badge\"></span>BroadcastTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.GetRawTransferTransaction\">\n          <span class=\"rpc-badge\"></span>GetRawTransferTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.GetRawBondTransaction\">\n          <span class=\"rpc-badge\"></span>GetRawBondTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.GetRawUnbondTransaction\">\n          <span class=\"rpc-badge\"></span>GetRawUnbondTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.GetRawWithdrawTransaction\">\n          <span class=\"rpc-badge\"></span>GetRawWithdrawTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.GetRawBatchTransferTransaction\">\n          <span class=\"rpc-badge\"></span>GetRawBatchTransferTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.DecodeRawTransaction\">\n          <span class=\"rpc-badge\"></span>DecodeRawTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Transaction.CheckTransaction\">\n          <span class=\"rpc-badge\"></span>CheckTransaction</a>\n        </li>\n      </ul>\n    </li>\n    <li> Blockchain Service\n      <ul>\n        <li>\n          <a href=\"#pactus.Blockchain.GetBlock\">\n          <span class=\"rpc-badge\"></span>GetBlock</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetBlockHash\">\n          <span class=\"rpc-badge\"></span>GetBlockHash</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetBlockHeight\">\n          <span class=\"rpc-badge\"></span>GetBlockHeight</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetBlockchainInfo\">\n          <span class=\"rpc-badge\"></span>GetBlockchainInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetCommitteeInfo\">\n          <span class=\"rpc-badge\"></span>GetCommitteeInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetConsensusInfo\">\n          <span class=\"rpc-badge\"></span>GetConsensusInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetAccount\">\n          <span class=\"rpc-badge\"></span>GetAccount</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetValidator\">\n          <span class=\"rpc-badge\"></span>GetValidator</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetValidatorByNumber\">\n          <span class=\"rpc-badge\"></span>GetValidatorByNumber</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetValidatorAddresses\">\n          <span class=\"rpc-badge\"></span>GetValidatorAddresses</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetPublicKey\">\n          <span class=\"rpc-badge\"></span>GetPublicKey</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Blockchain.GetTxPoolContent\">\n          <span class=\"rpc-badge\"></span>GetTxPoolContent</a>\n        </li>\n      </ul>\n    </li>\n    <li> Network Service\n      <ul>\n        <li>\n          <a href=\"#pactus.Network.GetNetworkInfo\">\n          <span class=\"rpc-badge\"></span>GetNetworkInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Network.ListPeers\">\n          <span class=\"rpc-badge\"></span>ListPeers</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Network.GetNodeInfo\">\n          <span class=\"rpc-badge\"></span>GetNodeInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Network.Ping\">\n          <span class=\"rpc-badge\"></span>Ping</a>\n        </li>\n      </ul>\n    </li>\n    <li> Utils Service\n      <ul>\n        <li>\n          <a href=\"#pactus.Utils.SignMessageWithPrivateKey\">\n          <span class=\"rpc-badge\"></span>SignMessageWithPrivateKey</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Utils.VerifyMessage\">\n          <span class=\"rpc-badge\"></span>VerifyMessage</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Utils.PublicKeyAggregation\">\n          <span class=\"rpc-badge\"></span>PublicKeyAggregation</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Utils.SignatureAggregation\">\n          <span class=\"rpc-badge\"></span>SignatureAggregation</a>\n        </li>\n      </ul>\n    </li>\n    <li> Wallet Service\n      <ul>\n        <li>\n          <a href=\"#pactus.Wallet.CreateWallet\">\n          <span class=\"rpc-badge\"></span>CreateWallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.RestoreWallet\">\n          <span class=\"rpc-badge\"></span>RestoreWallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.LoadWallet\">\n          <span class=\"rpc-badge\"></span>LoadWallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.UnloadWallet\">\n          <span class=\"rpc-badge\"></span>UnloadWallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.ListWallets\">\n          <span class=\"rpc-badge\"></span>ListWallets</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetWalletInfo\">\n          <span class=\"rpc-badge\"></span>GetWalletInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.UpdatePassword\">\n          <span class=\"rpc-badge\"></span>UpdatePassword</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetTotalBalance\">\n          <span class=\"rpc-badge\"></span>GetTotalBalance</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetTotalStake\">\n          <span class=\"rpc-badge\"></span>GetTotalStake</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetValidatorAddress\">\n          <span class=\"rpc-badge\"></span>GetValidatorAddress</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetAddressInfo\">\n          <span class=\"rpc-badge\"></span>GetAddressInfo</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.SetAddressLabel\">\n          <span class=\"rpc-badge\"></span>SetAddressLabel</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetNewAddress\">\n          <span class=\"rpc-badge\"></span>GetNewAddress</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.ListAddresses\">\n          <span class=\"rpc-badge\"></span>ListAddresses</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.SignMessage\">\n          <span class=\"rpc-badge\"></span>SignMessage</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.SignRawTransaction\">\n          <span class=\"rpc-badge\"></span>SignRawTransaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.ListTransactions\">\n          <span class=\"rpc-badge\"></span>ListTransactions</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.SetDefaultFee\">\n          <span class=\"rpc-badge\"></span>SetDefaultFee</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetMnemonic\">\n          <span class=\"rpc-badge\"></span>GetMnemonic</a>\n        </li>\n        <li>\n          <a href=\"#pactus.Wallet.GetPrivateKey\">\n          <span class=\"rpc-badge\"></span>GetPrivateKey</a>\n        </li>\n      </ul>\n    </li>\n  </ul>\n</div>\n\n<div class=\"api-doc\">\n\n### Transaction Service\n\n<p>Transaction service defines various RPC methods for interacting with transactions.</p>\n\n#### GetTransaction <span id=\"pactus.Transaction.GetTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetTransaction retrieves transaction details based on the provided request parameters.</p>\n\n<h4>GetTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction to retrieve.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">verbosity</td>\n    <td> TransactionVerbosity</td>\n    <td>\n  (Enum)The verbosity level for transaction details.\n      <br>Available values:<ul>\n      <li>TRANSACTION_VERBOSITY_DATA = 0 (Request transaction data only.)</li>\n      <li>TRANSACTION_VERBOSITY_INFO = 1 (Request detailed transaction information.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">block_height</td>\n    <td> uint32</td>\n    <td>\n  The height of the block containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">block_time</td>\n    <td> uint32</td>\n    <td>\n  The UNIX timestamp of the block containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction</td>\n    <td> TransactionInfo</td>\n    <td>\n  Detailed information about the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.version</td>\n    <td> int32</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.value</td>\n    <td> int64</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.fee</td>\n    <td> int64</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer</td>\n    <td> PayloadTransfer</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.amount</td>\n    <td> int64</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond</td>\n    <td> PayloadBond</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.stake</td>\n    <td> int64</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition</td>\n    <td> PayloadSortition</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond</td>\n    <td> PayloadUnbond</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw</td>\n    <td> PayloadWithdraw</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.amount</td>\n    <td> int64</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer</td>\n    <td> PayloadBatchTransfer</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.recipients</td>\n    <td>repeated Recipient</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.block_height</td>\n    <td> uint32</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmed</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmations</td>\n    <td> int32</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### CalculateFee <span id=\"pactus.Transaction.CalculateFee\" class=\"rpc-badge\"></span>\n\n<p>CalculateFee calculates the transaction fee based on the specified amount and payload type.</p>\n\n<h4>CalculateFeeRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> int64</td>\n    <td>\n  The amount involved in the transaction, specified in NanoPAC.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fixed_amount</td>\n    <td> bool</td>\n    <td>\n  Indicates if the amount should be fixed and include the fee.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>CalculateFeeResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> int64</td>\n    <td>\n  The calculated amount in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> int64</td>\n    <td>\n  The calculated transaction fee in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### BroadcastTransaction <span id=\"pactus.Transaction.BroadcastTransaction\" class=\"rpc-badge\"></span>\n\n<p>BroadcastTransaction broadcasts a signed transaction to the network.</p>\n\n<h4>BroadcastTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signed_raw_transaction</td>\n    <td> string</td>\n    <td>\n  The signed raw transaction data to be broadcasted.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>BroadcastTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the broadcasted transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetRawTransferTransaction <span id=\"pactus.Transaction.GetRawTransferTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawTransferTransaction retrieves raw details of a transfer transaction.</p>\n\n<h4>GetRawTransferTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> int64</td>\n    <td>\n  The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> int64</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetRawBondTransaction <span id=\"pactus.Transaction.GetRawBondTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawBondTransaction retrieves raw details of a bond transaction.</p>\n\n<h4>GetRawBondTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's validator address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">stake</td>\n    <td> int64</td>\n    <td>\n  The stake amount in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\nOptional, but required when registering a new validator.;\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> int64</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetRawUnbondTransaction <span id=\"pactus.Transaction.GetRawUnbondTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawUnbondTransaction retrieves raw details of an unbond transaction.</p>\n\n<h4>GetRawUnbondTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetRawWithdrawTransaction <span id=\"pactus.Transaction.GetRawWithdrawTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.</p>\n\n<h4>GetRawWithdrawTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> int64</td>\n    <td>\n  The withdrawal amount in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> int64</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetRawBatchTransferTransaction <span id=\"pactus.Transaction.GetRawBatchTransferTransaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.</p>\n\n<h4>GetRawBatchTransferTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">recipients</td>\n    <td>repeated Recipient</td>\n    <td>\n  The list of recipients with their amounts. Minimum 2 recipients required.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> int64</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### DecodeRawTransaction <span id=\"pactus.Transaction.DecodeRawTransaction\" class=\"rpc-badge\"></span>\n\n<p>DecodeRawTransaction accepts raw transaction and returns decoded transaction.</p>\n\n<h4>DecodeRawTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>DecodeRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">transaction</td>\n    <td> TransactionInfo</td>\n    <td>\n  The decoded transaction information.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.version</td>\n    <td> int32</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.value</td>\n    <td> int64</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.fee</td>\n    <td> int64</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer</td>\n    <td> PayloadTransfer</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.amount</td>\n    <td> int64</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond</td>\n    <td> PayloadBond</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.stake</td>\n    <td> int64</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition</td>\n    <td> PayloadSortition</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond</td>\n    <td> PayloadUnbond</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw</td>\n    <td> PayloadWithdraw</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.amount</td>\n    <td> int64</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer</td>\n    <td> PayloadBatchTransfer</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.recipients</td>\n    <td>repeated Recipient</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.block_height</td>\n    <td> uint32</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmed</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmations</td>\n    <td> int32</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### CheckTransaction <span id=\"pactus.Transaction.CheckTransaction\" class=\"rpc-badge\"></span>\n\n<p>CheckTransaction checks if the transaction is valid and can be included in the blockchain.</p>\n\n<h4>CheckTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data to be checked.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>CheckTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">is_valid</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the transaction is valid.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">error_message</td>\n    <td> string</td>\n    <td>\n  An error message if the transaction is invalid.\nEmpty if the transaction is valid.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Blockchain Service\n\n<p>Blockchain service defines RPC methods for interacting with the blockchain.</p>\n\n#### GetBlock <span id=\"pactus.Blockchain.GetBlock\" class=\"rpc-badge\"></span>\n\n<p>GetBlock retrieves information about a block based on the provided request parameters.</p>\n\n<h4>GetBlockRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> uint32</td>\n    <td>\n  The height of the block to retrieve.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">verbosity</td>\n    <td> BlockVerbosity</td>\n    <td>\n  (Enum)The verbosity level for block information.\n      <br>Available values:<ul>\n      <li>BLOCK_VERBOSITY_DATA = 0 (Request only block data.)</li>\n      <li>BLOCK_VERBOSITY_INFO = 1 (Request block information and transaction IDs.)</li>\n      <li>BLOCK_VERBOSITY_TRANSACTIONS = 2 (Request block information and detailed transaction data.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetBlockResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> uint32</td>\n    <td>\n  The height of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">data</td>\n    <td> string</td>\n    <td>\n  Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">block_time</td>\n    <td> uint32</td>\n    <td>\n  The timestamp of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header</td>\n    <td> BlockHeaderInfo</td>\n    <td>\n  Header information of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.version</td>\n    <td> int32</td>\n    <td>\n  The version of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.prev_block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the previous block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.state_root</td>\n    <td> string</td>\n    <td>\n  The state root hash of the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.sortition_seed</td>\n    <td> string</td>\n    <td>\n  The sortition seed of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.proposer_address</td>\n    <td> string</td>\n    <td>\n  The address of the proposer of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert</td>\n    <td> CertificateInfo</td>\n    <td>\n  Certificate information of the previous block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.round</td>\n    <td> int32</td>\n    <td>\n  The round of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.committers</td>\n    <td>repeated int32</td>\n    <td>\n  List of committers in the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.absentees</td>\n    <td>repeated int32</td>\n    <td>\n  List of absentees in the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.signature</td>\n    <td> string</td>\n    <td>\n  The signature of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated TransactionInfo</td>\n    <td>\n  List of transactions in the block, available when verbosity level is set to\nBLOCK_VERBOSITY_TRANSACTIONS.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].version</td>\n    <td> int32</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].value</td>\n    <td> int64</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> int64</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer</td>\n    <td> PayloadTransfer</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.amount</td>\n    <td> int64</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond</td>\n    <td> PayloadBond</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.stake</td>\n    <td> int64</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition</td>\n    <td> PayloadSortition</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond</td>\n    <td> PayloadUnbond</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw</td>\n    <td> PayloadWithdraw</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.amount</td>\n    <td> int64</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer</td>\n    <td> PayloadBatchTransfer</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.recipients</td>\n    <td>repeated Recipient</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> uint32</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmed</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmations</td>\n    <td> int32</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetBlockHash <span id=\"pactus.Blockchain.GetBlockHash\" class=\"rpc-badge\"></span>\n\n<p>GetBlockHash retrieves the hash of a block at the specified height.</p>\n\n<h4>GetBlockHashRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> uint32</td>\n    <td>\n  The height of the block to retrieve the hash for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetBlockHashResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetBlockHeight <span id=\"pactus.Blockchain.GetBlockHeight\" class=\"rpc-badge\"></span>\n\n<p>GetBlockHeight retrieves the height of a block with the specified hash.</p>\n\n<h4>GetBlockHeightRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block to retrieve the height for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetBlockHeightResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> uint32</td>\n    <td>\n  The height of the block.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetBlockchainInfo <span id=\"pactus.Blockchain.GetBlockchainInfo\" class=\"rpc-badge\"></span>\n\n<p>GetBlockchainInfo retrieves general information about the blockchain.</p>\n\n<h4>GetBlockchainInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetBlockchainInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">last_block_height</td>\n    <td> uint32</td>\n    <td>\n  The height of the last block in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">last_block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the last block in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">last_block_time</td>\n    <td> int64</td>\n    <td>\n  The timestamp of the last block in Unix format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_accounts</td>\n    <td> int32</td>\n    <td>\n  The total number of accounts in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_validators</td>\n    <td> int32</td>\n    <td>\n  The total number of validators in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">active_validators</td>\n    <td> int32</td>\n    <td>\n  The number of active (not unbonded) validators in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_power</td>\n    <td> int64</td>\n    <td>\n  The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_power</td>\n    <td> int64</td>\n    <td>\n  The power of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">is_pruned</td>\n    <td> bool</td>\n    <td>\n  If the blocks are subject to pruning.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">pruning_height</td>\n    <td> uint32</td>\n    <td>\n  Lowest-height block stored (only present if pruning is enabled)\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">in_committee</td>\n    <td> bool</td>\n    <td>\n  Indicates whether this node participates in consensus: true if at least one\nof its running validators is a member of the current committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_size</td>\n    <td> int32</td>\n    <td>\n  The number of validators in the current committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">average_score</td>\n    <td> double</td>\n    <td>\n  Average availability score of validators with stake, in percentage (0-100).\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetCommitteeInfo <span id=\"pactus.Blockchain.GetCommitteeInfo\" class=\"rpc-badge\"></span>\n\n<p>GetCommitteeInfo retrieves information about the current committee.</p>\n\n<h4>GetCommitteeInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetCommitteeInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">committee_size</td>\n    <td> int32</td>\n    <td>\n  The number of validators in the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_power</td>\n    <td> int64</td>\n    <td>\n  The power of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_power</td>\n    <td> int64</td>\n    <td>\n  The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators</td>\n    <td>repeated ValidatorInfo</td>\n    <td>\n  List of committee validators.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].number</td>\n    <td> int32</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].stake</td>\n    <td> int64</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].last_bonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].last_sortition_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].unbonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].availability_score</td>\n    <td> double</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].protocol_version</td>\n    <td> int32</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].is_delegated</td>\n    <td> bool</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">protocol_versions</td>\n    <td> map&lt;int32, double&gt;</td>\n    <td>\n  Map of protocol versions and their percentages in the committee.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetConsensusInfo <span id=\"pactus.Blockchain.GetConsensusInfo\" class=\"rpc-badge\"></span>\n\n<p>GetConsensusInfo retrieves information about the consensus instances.</p>\n\n<h4>GetConsensusInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetConsensusInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">proposal</td>\n    <td> ProposalInfo</td>\n    <td>\n  The proposal of the consensus info.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.height</td>\n    <td> uint32</td>\n    <td>\n  The height of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.round</td>\n    <td> int32</td>\n    <td>\n  The round of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.block_data</td>\n    <td> string</td>\n    <td>\n  The block data of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.signature</td>\n    <td> string</td>\n    <td>\n  The signature of the proposal, signed by the proposer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances</td>\n    <td>repeated ConsensusInfo</td>\n    <td>\n  List of consensus instances.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].address</td>\n    <td> string</td>\n    <td>\n  The address of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].active</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the consensus instance is active and part of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].height</td>\n    <td> uint32</td>\n    <td>\n  The height of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].round</td>\n    <td> int32</td>\n    <td>\n  The round of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].votes</td>\n    <td>repeated VoteInfo</td>\n    <td>\n  List of votes in the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].votes[].type</td>\n    <td> VoteType</td>\n    <td>\n  (Enum)The type of the vote.\n      <br>Available values:<ul>\n      <li>VOTE_TYPE_UNSPECIFIED = 0 (Unspecified vote type.)</li>\n      <li>VOTE_TYPE_PREPARE = 1 (Prepare vote type.)</li>\n      <li>VOTE_TYPE_PRECOMMIT = 2 (Precommit vote type.)</li>\n      <li>VOTE_TYPE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>\n      <li>VOTE_TYPE_CP_MAIN_VOTE = 4 (Change-proposer:main-vote vote type.)</li>\n      <li>VOTE_TYPE_CP_DECIDED = 5 (Change-proposer:decided vote type.)</li>\n      </ul>\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].voter</td>\n    <td> string</td>\n    <td>\n  The address of the voter.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block being voted on.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].round</td>\n    <td> int32</td>\n    <td>\n  The consensus round of the vote.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].cp_round</td>\n    <td> int32</td>\n    <td>\n  The change-proposer round of the vote.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].cp_value</td>\n    <td> int32</td>\n    <td>\n  The change-proposer value of the vote.\n    </td>\n  </tr></tbody>\n</table>\n\n#### GetAccount <span id=\"pactus.Blockchain.GetAccount\" class=\"rpc-badge\"></span>\n\n<p>GetAccount retrieves information about an account based on the provided address.</p>\n\n<h4>GetAccountRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address of the account to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetAccountResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">account</td>\n    <td> AccountInfo</td>\n    <td>\n  Detailed information about the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.number</td>\n    <td> int32</td>\n    <td>\n  The unique number assigned to the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.balance</td>\n    <td> int64</td>\n    <td>\n  The balance of the account in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.address</td>\n    <td> string</td>\n    <td>\n  The address of the account.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetValidator <span id=\"pactus.Blockchain.GetValidator\" class=\"rpc-badge\"></span>\n\n<p>GetValidator retrieves information about a validator based on the provided address.</p>\n\n<h4>GetValidatorRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetValidatorResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">validator</td>\n    <td> ValidatorInfo</td>\n    <td>\n  Detailed information about the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.number</td>\n    <td> int32</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.stake</td>\n    <td> int64</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_bonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_sortition_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.unbonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.availability_score</td>\n    <td> double</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.protocol_version</td>\n    <td> int32</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetValidatorByNumber <span id=\"pactus.Blockchain.GetValidatorByNumber\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorByNumber retrieves information about a validator based on the provided number.</p>\n\n<h4>GetValidatorByNumberRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">number</td>\n    <td> int32</td>\n    <td>\n  The unique number of the validator to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetValidatorResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">validator</td>\n    <td> ValidatorInfo</td>\n    <td>\n  Detailed information about the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.number</td>\n    <td> int32</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.stake</td>\n    <td> int64</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_bonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_sortition_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.unbonding_height</td>\n    <td> uint32</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.availability_score</td>\n    <td> double</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.protocol_version</td>\n    <td> int32</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetValidatorAddresses <span id=\"pactus.Blockchain.GetValidatorAddresses\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorAddresses retrieves a list of all validator addresses.</p>\n\n<h4>GetValidatorAddressesRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetValidatorAddressesResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">addresses</td>\n    <td>repeated string</td>\n    <td>\n  List of validator addresses.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetPublicKey <span id=\"pactus.Blockchain.GetPublicKey\" class=\"rpc-badge\"></span>\n\n<p>GetPublicKey retrieves the public key of an account based on the provided address.</p>\n\n<h4>GetPublicKeyRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address for which to retrieve the public key.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetPublicKeyResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the provided address.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetTxPoolContent <span id=\"pactus.Blockchain.GetTxPoolContent\" class=\"rpc-badge\"></span>\n\n<p>GetTxPoolContent retrieves current transactions in the transaction pool.</p>\n\n<h4>GetTxPoolContentRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transactions to retrieve from the transaction pool. 0 means all types.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetTxPoolContentResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated TransactionInfo</td>\n    <td>\n  List of transactions currently in the pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].version</td>\n    <td> int32</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].lock_time</td>\n    <td> uint32</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].value</td>\n    <td> int64</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> int64</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer</td>\n    <td> PayloadTransfer</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.amount</td>\n    <td> int64</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond</td>\n    <td> PayloadBond</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.stake</td>\n    <td> int64</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.is_delegated</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_share</td>\n    <td> int64</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_expiry</td>\n    <td> uint32</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition</td>\n    <td> PayloadSortition</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond</td>\n    <td> PayloadUnbond</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw</td>\n    <td> PayloadWithdraw</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.amount</td>\n    <td> int64</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer</td>\n    <td> PayloadBatchTransfer</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.recipients</td>\n    <td>repeated Recipient</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> uint32</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmed</td>\n    <td> bool</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmations</td>\n    <td> int32</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Network Service\n\n<p>Network service provides RPCs for retrieving information about the network.</p>\n\n#### GetNetworkInfo <span id=\"pactus.Network.GetNetworkInfo\" class=\"rpc-badge\"></span>\n\n<p>GetNetworkInfo retrieves information about the overall network.</p>\n\n<h4>GetNetworkInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetNetworkInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">network_name</td>\n    <td> string</td>\n    <td>\n  Name of the P2P network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connected_peers_count</td>\n    <td> uint32</td>\n    <td>\n  Number of connected peers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info</td>\n    <td> MetricInfo</td>\n    <td>\n  Metrics related to node activity.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_invalid</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of invalid bundles.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_invalid.bytes</td>\n    <td> uint64</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_invalid.bundles</td>\n    <td> uint64</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_sent</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of bundles sent.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_sent.bytes</td>\n    <td> uint64</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_sent.bundles</td>\n    <td> uint64</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_received</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of bundles received.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_received.bytes</td>\n    <td> uint64</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_received.bundles</td>\n    <td> uint64</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.message_sent</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of sent bundles categorized by message type.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.message_received</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of received bundles categorized by message type.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### ListPeers <span id=\"pactus.Network.ListPeers\" class=\"rpc-badge\"></span>\n\n<p>ListPeers lists all peers in the network.</p>\n\n<h4>ListPeersRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">include_disconnected</td>\n    <td> bool</td>\n    <td>\n  If true, includes disconnected peers (default: connected peers only).\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>ListPeersResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">peers</td>\n    <td>repeated PeerInfo</td>\n    <td>\n  List of peers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].status</td>\n    <td> int32</td>\n    <td>\n  Current status of the peer (e.g., connected, disconnected).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].moniker</td>\n    <td> string</td>\n    <td>\n  Moniker or Human-Readable name of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].agent</td>\n    <td> string</td>\n    <td>\n  Version and agent details of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].peer_id</td>\n    <td> string</td>\n    <td>\n  Peer ID of the peer in P2P network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].consensus_keys</td>\n    <td>repeated string</td>\n    <td>\n  List of consensus keys used by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].consensus_addresses</td>\n    <td>repeated string</td>\n    <td>\n  List of consensus addresses used by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].services</td>\n    <td> uint32</td>\n    <td>\n  Bitfield representing the services provided by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_block_hash</td>\n    <td> string</td>\n    <td>\n  Hash of the last block the peer knows.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].height</td>\n    <td> uint32</td>\n    <td>\n  Blockchain height of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_sent</td>\n    <td> int64</td>\n    <td>\n  Unix timestamp of the last bundle sent to the peer (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_received</td>\n    <td> int64</td>\n    <td>\n  Unix timestamp of the last bundle received from the peer (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].address</td>\n    <td> string</td>\n    <td>\n  Network address of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].direction</td>\n    <td> Direction</td>\n    <td>\n  (Enum)Connection direction (e.g., inbound, outbound).\n      <br>Available values:<ul>\n      <li>DIRECTION_UNKNOWN = 0 (Unknown direction (default value).)</li>\n      <li>DIRECTION_INBOUND = 1 (Inbound connection - peer connected to us.)</li>\n      <li>DIRECTION_OUTBOUND = 2 (Outbound connection - we connected to peer.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].protocols</td>\n    <td>repeated string</td>\n    <td>\n  List of protocols supported by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].total_sessions</td>\n    <td> int32</td>\n    <td>\n  Total download sessions with the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].completed_sessions</td>\n    <td> int32</td>\n    <td>\n  Completed download sessions with the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].metric_info</td>\n    <td> MetricInfo</td>\n    <td>\n  Metrics related to peer activity.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_invalid</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of invalid bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_sent</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of bundles sent.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_received</td>\n    <td> CounterInfo</td>\n    <td>\n  Total number of bundles received.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.message_sent</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of sent bundles categorized by message type.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.message_received</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of received bundles categorized by message type.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].outbound_hello_sent</td>\n    <td> bool</td>\n    <td>\n  Whether the hello message was sent from the outbound connection.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetNodeInfo <span id=\"pactus.Network.GetNodeInfo\" class=\"rpc-badge\"></span>\n\n<p>GetNodeInfo retrieves information about a specific node in the network.</p>\n\n<h4>GetNodeInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>GetNodeInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">moniker</td>\n    <td> string</td>\n    <td>\n  Moniker or Human-readable name identifying this node in the network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">agent</td>\n    <td> string</td>\n    <td>\n  Version and agent details of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peer_id</td>\n    <td> string</td>\n    <td>\n  Peer ID of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">started_at</td>\n    <td> uint64</td>\n    <td>\n  Unix timestamp when the node was started (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">reachability</td>\n    <td> string</td>\n    <td>\n  Reachability status of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">services</td>\n    <td> int32</td>\n    <td>\n  Bitfield representing the services provided by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">services_names</td>\n    <td> string</td>\n    <td>\n  Names of services provided by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">local_addrs</td>\n    <td>repeated string</td>\n    <td>\n  List of addresses associated with the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">protocols</td>\n    <td>repeated string</td>\n    <td>\n  List of protocols supported by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">clock_offset</td>\n    <td> double</td>\n    <td>\n  Offset between the node's clock and the network's clock (in seconds).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info</td>\n    <td> ConnectionInfo</td>\n    <td>\n  Information about the node's connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.connections</td>\n    <td> uint64</td>\n    <td>\n  Total number of connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.inbound_connections</td>\n    <td> uint64</td>\n    <td>\n  Number of inbound connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.outbound_connections</td>\n    <td> uint64</td>\n    <td>\n  Number of outbound connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers</td>\n    <td>repeated ZMQPublisherInfo</td>\n    <td>\n  List of active ZeroMQ publishers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].topic</td>\n    <td> string</td>\n    <td>\n  The topic associated with the publisher.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].address</td>\n    <td> string</td>\n    <td>\n  The address of the publisher.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].hwm</td>\n    <td> int32</td>\n    <td>\n  The high-water mark (HWM) for the publisher, indicating the\nmaximum number of messages to queue before dropping older ones.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">current_time</td>\n    <td> uint64</td>\n    <td>\n  Current Unix timestamp of the node (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">network_name</td>\n    <td> string</td>\n    <td>\n  Name of the P2P network.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### Ping <span id=\"pactus.Network.Ping\" class=\"rpc-badge\"></span>\n\n<p>Ping provides a simple connectivity test and latency measurement.</p>\n\n<h4>PingRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>PingResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\nResponse Message has no fields.\n\n### Utils Service\n\n<p>Utils service defines RPC methods for utility functions such as message\nsigning, verification, and other cryptographic operations.</p>\n\n#### SignMessageWithPrivateKey <span id=\"pactus.Utils.SignMessageWithPrivateKey\" class=\"rpc-badge\"></span>\n\n<p>SignMessageWithPrivateKey signs a message with the provided private key.</p>\n\n<h4>SignMessageWithPrivateKeyRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">private_key</td>\n    <td> string</td>\n    <td>\n  The private key to sign the message.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The message content to be signed.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SignMessageWithPrivateKeyResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The resulting signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### VerifyMessage <span id=\"pactus.Utils.VerifyMessage\" class=\"rpc-badge\"></span>\n\n<p>VerifyMessage verifies a signature against the public key and message.</p>\n\n<h4>VerifyMessageRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The original message content that was signed.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The signature to verify in hexadecimal format.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the signer.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>VerifyMessageResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">is_valid</td>\n    <td> bool</td>\n    <td>\n  Boolean indicating whether the signature is valid for the given message and public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### PublicKeyAggregation <span id=\"pactus.Utils.PublicKeyAggregation\" class=\"rpc-badge\"></span>\n\n<p>PublicKeyAggregation aggregates multiple BLS public keys into a single key.</p>\n\n<h4>PublicKeyAggregationRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_keys</td>\n    <td>repeated string</td>\n    <td>\n  List of BLS public keys to be aggregated.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>PublicKeyAggregationResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The aggregated BLS public key.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The blockchain address derived from the aggregated public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### SignatureAggregation <span id=\"pactus.Utils.SignatureAggregation\" class=\"rpc-badge\"></span>\n\n<p>SignatureAggregation aggregates multiple BLS signatures into a single signature.</p>\n\n<h4>SignatureAggregationRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signatures</td>\n    <td>repeated string</td>\n    <td>\n  List of BLS signatures to be aggregated.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SignatureAggregationResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The aggregated BLS signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Wallet Service\n\n<p>Wallet service provides RPC methods for wallet management operations.</p>\n\n#### CreateWallet <span id=\"pactus.Wallet.CreateWallet\" class=\"rpc-badge\"></span>\n\n<p>CreateWallet creates a new wallet with the specified parameters.</p>\n\n<h4>CreateWalletRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the new wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password to secure the new wallet.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>CreateWalletResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the new wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase) for wallet recovery.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### RestoreWallet <span id=\"pactus.Wallet.RestoreWallet\" class=\"rpc-badge\"></span>\n\n<p>RestoreWallet restores an existing wallet with the given mnemonic.</p>\n\n<h4>RestoreWalletRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the restored wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase) for wallet recovery.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password to secure the restored wallet.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>RestoreWalletResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the restored wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### LoadWallet <span id=\"pactus.Wallet.LoadWallet\" class=\"rpc-badge\"></span>\n\n<p>LoadWallet loads an existing wallet with the given name.\ndeprecated: It will be removed in a future version.</p>\n\n<h4>LoadWalletRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to load.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>LoadWalletResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the loaded wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### UnloadWallet <span id=\"pactus.Wallet.UnloadWallet\" class=\"rpc-badge\"></span>\n\n<p>UnloadWallet unloads a currently loaded wallet with the specified name.\ndeprecated: It will be removed in a future version.</p>\n\n<h4>UnloadWalletRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to unload.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>UnloadWalletResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the unloaded wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### ListWallets <span id=\"pactus.Wallet.ListWallets\" class=\"rpc-badge\"></span>\n\n<p>ListWallets returns a list of all available wallets.</p>\n\n<h4>ListWalletsRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\nRequest Message has no fields.\n\n<h4>ListWalletsResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallets</td>\n    <td>repeated string</td>\n    <td>\n  Array of wallet names.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetWalletInfo <span id=\"pactus.Wallet.GetWalletInfo\" class=\"rpc-badge\"></span>\n\n<p>GetWalletInfo returns detailed information about a specific wallet.</p>\n\n<h4>GetWalletInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to query.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetWalletInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">version</td>\n    <td> int32</td>\n    <td>\n  The wallet format version.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">network</td>\n    <td> string</td>\n    <td>\n  The network the wallet is connected to (e.g., mainnet, testnet).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">encrypted</td>\n    <td> bool</td>\n    <td>\n  Indicates if the wallet is encrypted.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">uuid</td>\n    <td> string</td>\n    <td>\n  A unique identifier of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">created_at</td>\n    <td> int64</td>\n    <td>\n  Unix timestamp of wallet creation.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">default_fee</td>\n    <td> int64</td>\n    <td>\n  The default fee of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">driver</td>\n    <td> string</td>\n    <td>\n  The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">path</td>\n    <td> string</td>\n    <td>\n  Path to the wallet file or storage location.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### UpdatePassword <span id=\"pactus.Wallet.UpdatePassword\" class=\"rpc-badge\"></span>\n\n<p>UpdatePassword updates the password of an existing wallet.</p>\n\n<h4>UpdatePasswordRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet whose password will be updated.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">old_password</td>\n    <td> string</td>\n    <td>\n  The current wallet password.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">new_password</td>\n    <td> string</td>\n    <td>\n  The new wallet password.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>UpdatePasswordResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet whose password was updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetTotalBalance <span id=\"pactus.Wallet.GetTotalBalance\" class=\"rpc-badge\"></span>\n\n<p>GetTotalBalance returns the total available balance of the wallet.</p>\n\n<h4>GetTotalBalanceRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the total balance.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetTotalBalanceResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_balance</td>\n    <td> int64</td>\n    <td>\n  The total balance of the wallet in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetTotalStake <span id=\"pactus.Wallet.GetTotalStake\" class=\"rpc-badge\"></span>\n\n<p>GetTotalStake returns the total stake amount in the wallet.</p>\n\n<h4>GetTotalStakeRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the total stake.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetTotalStakeResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_stake</td>\n    <td> int64</td>\n    <td>\n  The total stake amount in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetValidatorAddress <span id=\"pactus.Wallet.GetValidatorAddress\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorAddress retrieves the validator address associated with a public key.\nDeprecated: Will move into utils.</p>\n\n<h4>GetValidatorAddressRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetValidatorAddressResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetAddressInfo <span id=\"pactus.Wallet.GetAddressInfo\" class=\"rpc-badge\"></span>\n\n<p>GetAddressInfo returns detailed information about a specific address.</p>\n\n<h4>GetAddressInfoRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to query.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetAddressInfoResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr</td>\n    <td> AddressInfo</td>\n    <td>\n  Detailed information about the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### SetAddressLabel <span id=\"pactus.Wallet.SetAddressLabel\" class=\"rpc-badge\"></span>\n\n<p>SetAddressLabel sets or updates the label for a given address.</p>\n\n<h4>SetAddressLabelRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for modification.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to label.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  The new label for the address.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SetAddressLabelResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where the address label was updated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address where the label was updated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  The new label for the address.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetNewAddress <span id=\"pactus.Wallet.GetNewAddress\" class=\"rpc-badge\"></span>\n\n<p>GetNewAddress generates a new address for the specified wallet.</p>\n\n<h4>GetNewAddressRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to generate a new address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address_type</td>\n    <td> AddressType</td>\n    <td>\n  (Enum)The type of address to generate.\n      <br>Available values:<ul>\n      <li>ADDRESS_TYPE_TREASURY = 0 (Treasury address type.\nShould not be used to generate new addresses.)</li>\n      <li>ADDRESS_TYPE_VALIDATOR = 1 (Validator address type used for validator nodes.)</li>\n      <li>ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)</li>\n      <li>ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  A label for the new address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password for the new address. It's required when address_type is Ed25519 type.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetNewAddressResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where address was generated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr</td>\n    <td> AddressInfo</td>\n    <td>\n  Detailed information about the new address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### ListAddresses <span id=\"pactus.Wallet.ListAddresses\" class=\"rpc-badge\"></span>\n\n<p>ListAddresses returns all addresses in the specified wallet.</p>\n\n<h4>ListAddressesRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address_types</td>\n    <td>repeated AddressType</td>\n    <td>\n  (Enum)Filter addresses by their types. If empty, all address types are included.\n      <br>Available values:<ul>\n      <li>ADDRESS_TYPE_TREASURY = 0 (Treasury address type.\nShould not be used to generate new addresses.)</li>\n      <li>ADDRESS_TYPE_VALIDATOR = 1 (Validator address type used for validator nodes.)</li>\n      <li>ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)</li>\n      <li>ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>ListAddressesResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs</td>\n    <td>repeated AddressInfo</td>\n    <td>\n  List of all addresses in the wallet with their details.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### SignMessage <span id=\"pactus.Wallet.SignMessage\" class=\"rpc-badge\"></span>\n\n<p>SignMessage signs an arbitrary message using a wallet's private key.</p>\n\n<h4>SignMessageRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to sign with.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for signing.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address whose private key should be used for signing the message.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The arbitrary message to be signed.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SignMessageResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### SignRawTransaction <span id=\"pactus.Wallet.SignRawTransaction\" class=\"rpc-badge\"></span>\n\n<p>SignRawTransaction signs a raw transaction for a specified wallet.</p>\n\n<h4>SignRawTransactionRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet used for signing.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data to be signed.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for signing.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SignRawTransactionResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">transaction_id</td>\n    <td> string</td>\n    <td>\n  The ID of the signed transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">signed_raw_transaction</td>\n    <td> string</td>\n    <td>\n  The signed raw transaction data.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### ListTransactions <span id=\"pactus.Wallet.ListTransactions\" class=\"rpc-badge\"></span>\n\n<p>ListTransactions returns a list of transactions for a wallet,\noptionally filtered by a specific address, with pagination support.</p>\n\n<h4>ListTransactionsRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to query transactions for.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  Optional: The address to filter transactions.\nIf empty or set to '*', transactions for all addresses in the wallet are included.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">direction</td>\n    <td> TxDirection</td>\n    <td>\n  (Enum)Filter transactions by direction relative to the wallet.\nDefaults to any direction if not set.\n      <br>Available values:<ul>\n      <li>TX_DIRECTION_ANY = 0 (include both incoming and outgoing transactions.)</li>\n      <li>TX_DIRECTION_INCOMING = 1 (Include only incoming transactions where the wallet receives funds.)</li>\n      <li>TX_DIRECTION_OUTGOING = 2 (Include only outgoing transactions where the wallet sends funds.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">count</td>\n    <td> int32</td>\n    <td>\n  Optional: The maximum number of transactions to return.\nDefaults to 10 if not set.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">skip</td>\n    <td> int32</td>\n    <td>\n  Optional: The number of transactions to skip (for pagination).\nDefaults to 0 if not set.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>ListTransactionsResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet queried.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated WalletTransactionInfo</td>\n    <td>\n  List of transactions for the wallet, filtered by the specified address if provided.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].no</td>\n    <td> int64</td>\n    <td>\n  A sequence number for the transaction in the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].tx_id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].direction</td>\n    <td> TxDirection</td>\n    <td>\n  (Enum)The direction of the transaction relative to the wallet.\n      <br>Available values:<ul>\n      <li>TX_DIRECTION_ANY = 0 (include both incoming and outgoing transactions.)</li>\n      <li>TX_DIRECTION_INCOMING = 1 (Include only incoming transactions where the wallet receives funds.)</li>\n      <li>TX_DIRECTION_OUTGOING = 2 (Include only outgoing transactions where the wallet sends funds.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].amount</td>\n    <td> int64</td>\n    <td>\n  The amount involved in the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> int64</td>\n    <td>\n  The transaction fee in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].status</td>\n    <td> TransactionStatus</td>\n    <td>\n  (Enum)The current status of the transaction.\n      <br>Available values:<ul>\n      <li>TRANSACTION_STATUS_PENDING = 0 (Pending status for transactions in the mempool.)</li>\n      <li>TRANSACTION_STATUS_CONFIRMED = 1 (Confirmed status for transactions included in a block.)</li>\n      <li>TRANSACTION_STATUS_FAILED = -1 (Failed status for transactions that were not successful.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> uint32</td>\n    <td>\n  The block height containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> PayloadType</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> bytes</td>\n    <td>\n  The raw transaction data.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].comment</td>\n    <td> string</td>\n    <td>\n  A comment associated with the transaction in the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].created_at</td>\n    <td> int64</td>\n    <td>\n  Unix timestamp of when the transaction was created.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].updated_at</td>\n    <td> int64</td>\n    <td>\n  Unix timestamp of when the transaction was last updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### SetDefaultFee <span id=\"pactus.Wallet.SetDefaultFee\" class=\"rpc-badge\"></span>\n\n<p>SetDefaultFee sets the default fee for the wallet.</p>\n\n<h4>SetDefaultFeeRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to set the default fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> int64</td>\n    <td>\n  The default fee amount in NanoPAC.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>SetDefaultFeeResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where the default fee was updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetMnemonic <span id=\"pactus.Wallet.GetMnemonic\" class=\"rpc-badge\"></span>\n\n<p>GetMnemonic returns the mnemonic (seed phrase) for the wallet.</p>\n\n<h4>GetMnemonicRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the mnemonic.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetMnemonicResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase).\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### GetPrivateKey <span id=\"pactus.Wallet.GetPrivateKey\" class=\"rpc-badge\"></span>\n\n<p>GetPrivateKey returns the private key for a given address.</p>\n\n<h4>GetPrivateKeyRequest <span class=\"badge text-bg-info fs-6 align-top\">Request</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to get the private key.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>GetPrivateKeyResponse <span class=\"badge text-bg-warning fs-6 align-top\">Response</span></h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">private_key</td>\n    <td> string</td>\n    <td>\n  The private key in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>## Scalar Value Types\n\n<table class=\"table table-bordered table-sm\">\n  <thead>\n    <tr><td>.proto Type</td><td>Go</td><td>C++</td><td>Rust</td><td>Java</td><td>Python</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n      <tr id=\"double\">\n        <td class=\"fw-bold\">double</td>\n        <td>float64</td>\n        <td>double</td>\n        <td>f64</td>\n        <td>double</td>\n        <td>float</td>\n      </tr>\n      <tr id=\"float\">\n        <td class=\"fw-bold\">float</td>\n        <td>float32</td>\n        <td>float</td>\n        <td>f32</td>\n        <td>float</td>\n        <td>float</td>\n      </tr>\n      <tr id=\"int32\">\n        <td class=\"fw-bold\">int32</td>\n        <td>int32</td>\n        <td>int32</td>\n        <td>i32</td>\n        <td>int</td>\n        <td>int</td>\n      </tr>\n      <tr id=\"int64\">\n        <td class=\"fw-bold\">int64</td>\n        <td>int64</td>\n        <td>int64</td>\n        <td>i64</td>\n        <td>long</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"uint32\">\n        <td class=\"fw-bold\">uint32</td>\n        <td>uint32</td>\n        <td>uint32</td>\n        <td>u32</td>\n        <td>int</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"uint64\">\n        <td class=\"fw-bold\">uint64</td>\n        <td>uint64</td>\n        <td>uint64</td>\n        <td>u64</td>\n        <td>long</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"sint32\">\n        <td class=\"fw-bold\">sint32</td>\n        <td>int32</td>\n        <td>int32</td>\n        <td>i32</td>\n        <td>int</td>\n        <td>int</td>\n      </tr>\n      <tr id=\"sint64\">\n        <td class=\"fw-bold\">sint64</td>\n        <td>int64</td>\n        <td>int64</td>\n        <td>i64</td>\n        <td>long</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"fixed32\">\n        <td class=\"fw-bold\">fixed32</td>\n        <td>uint32</td>\n        <td>uint32</td>\n        <td>u64</td>\n        <td>int</td>\n        <td>int</td>\n      </tr>\n      <tr id=\"fixed64\">\n        <td class=\"fw-bold\">fixed64</td>\n        <td>uint64</td>\n        <td>uint64</td>\n        <td>u64</td>\n        <td>long</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"sfixed32\">\n        <td class=\"fw-bold\">sfixed32</td>\n        <td>int32</td>\n        <td>int32</td>\n        <td>i32</td>\n        <td>int</td>\n        <td>int</td>\n      </tr>\n      <tr id=\"sfixed64\">\n        <td class=\"fw-bold\">sfixed64</td>\n        <td>int64</td>\n        <td>int64</td>\n        <td>i64</td>\n        <td>long</td>\n        <td>int/long</td>\n      </tr>\n      <tr id=\"bool\">\n        <td class=\"fw-bold\">bool</td>\n        <td>bool</td>\n        <td>bool</td>\n        <td>bool</td>\n        <td>boolean</td>\n        <td>boolean</td>\n      </tr>\n      <tr id=\"string\">\n        <td class=\"fw-bold\">string</td>\n        <td>string</td>\n        <td>string</td>\n        <td>String</td>\n        <td>String</td>\n        <td>str/unicode</td>\n      </tr>\n      <tr id=\"bytes\">\n        <td class=\"fw-bold\">bytes</td>\n        <td>[]byte</td>\n        <td>string</td>\n        <td>Vec&lt;u8&gt;</td>\n        <td>ByteString</td>\n        <td>str</td>\n      </tr>\n  </tbody>\n</table>\n</div>\n"
  },
  {
    "path": "www/grpc/gen/docs/json-rpc.md",
    "content": "---\ntitle: JSON-RPC API Reference\nweight: 2\n---\n\nEvery node in the Pactus network can be configured to use the\n[JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.\nHere, you can find the list of all JSON-RPC methods, params and result.\n\n## Units\n\nAll the amounts are in NanoPAC units,\nwhich are atomic and the smallest unit in the Pactus blockchain.\nEach PAC is equivalent to 1,000,000,000 or 10<sup>9</sup> NanoPACs.\n\n## Packages\n\nFor seamless integration with Pactus, you can use these client libraries:\n\n- <i class=\"fa-brands fa-js\"></i> [pactus-jsonrpc](https://www.npmjs.com/package/pactus-jsonrpc/) package for Javascript\n- <i class=\"fa-brands fa-python\"></i> [pactus-jsonrpc](https://pypi.org/project/pactus-jsonrpc/) package for Python\n- <i class=\"fa-brands fa-rust\"></i> [pactus-jsonrpc](https://crates.io/crates/pactus-jsonrpc) package for Rust\n\n## Example\n\nTo call JSON-RPC methods, you need to create the JSON-RPC request:\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"pactus.network.get_node_info\",\n  \"params\": {}\n}\n```\n\n> Make sure you always add the `params` field, even if no parameters are needed, and ensure you use curly braces.\n\nThen you use the `curl` command to send the request to the node:\n\n```bash\ncurl --location 'http://localhost:8545/' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"pactus.network.get_node_info\",\n    \"params\": {}\n}'\n```\n\n> Before sending the request, you need to enable the JSON-RPC service inside the\n> [configuration](/get-started/configuration/).\n\n### Using Basic Auth\n\nIf you have enabled the [gRPC Basic Authentication](/tutorials/grpc-sign-transactions/),\nthen you need to set the `Authorization` header.\n\n```bash\ncurl --location 'http://localhost:8545/' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Basic <BASIC-AUTH-TOKEN>' \\\n--data '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"pactus.blockchain.get_account\",\n    \"params\": {\n        \"address\": \"pc1z2r0fmu8sg2ffa0tgrr08gnefcxl2kq7wvquf8z\"\n    }\n}'\n```\n\n## JSON-RPC Methods\n\n<div id=\"toc-container\">\n  <ul class=\"\">\n    <li> Transaction Service\n      <ul>\n        <li>\n          <a href=\"#pactus.transaction.get_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.calculate_fee\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.calculate_fee</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.broadcast_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.broadcast_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.get_raw_transfer_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_raw_transfer_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.get_raw_bond_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_raw_bond_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.get_raw_unbond_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_raw_unbond_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.get_raw_withdraw_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_raw_withdraw_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.get_raw_batch_transfer_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.get_raw_batch_transfer_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.decode_raw_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.decode_raw_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.transaction.check_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.transaction.check_transaction</a>\n        </li>\n      </ul>\n    </li>\n    <li> Blockchain Service\n      <ul>\n        <li>\n          <a href=\"#pactus.blockchain.get_block\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_block</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_block_hash\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_block_hash</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_block_height\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_block_height</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_blockchain_info\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_blockchain_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_committee_info\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_committee_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_consensus_info\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_consensus_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_account\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_account</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_validator\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_validator</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_validator_by_number\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_validator_by_number</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_validator_addresses\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_validator_addresses</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_public_key\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_public_key</a>\n        </li>\n        <li>\n          <a href=\"#pactus.blockchain.get_tx_pool_content\">\n          <span class=\"rpc-badge\"></span>pactus.blockchain.get_tx_pool_content</a>\n        </li>\n      </ul>\n    </li>\n    <li> Network Service\n      <ul>\n        <li>\n          <a href=\"#pactus.network.get_network_info\">\n          <span class=\"rpc-badge\"></span>pactus.network.get_network_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.network.list_peers\">\n          <span class=\"rpc-badge\"></span>pactus.network.list_peers</a>\n        </li>\n        <li>\n          <a href=\"#pactus.network.get_node_info\">\n          <span class=\"rpc-badge\"></span>pactus.network.get_node_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.network.ping\">\n          <span class=\"rpc-badge\"></span>pactus.network.ping</a>\n        </li>\n      </ul>\n    </li>\n    <li> Utils Service\n      <ul>\n        <li>\n          <a href=\"#pactus.utils.sign_message_with_private_key\">\n          <span class=\"rpc-badge\"></span>pactus.utils.sign_message_with_private_key</a>\n        </li>\n        <li>\n          <a href=\"#pactus.utils.verify_message\">\n          <span class=\"rpc-badge\"></span>pactus.utils.verify_message</a>\n        </li>\n        <li>\n          <a href=\"#pactus.utils.public_key_aggregation\">\n          <span class=\"rpc-badge\"></span>pactus.utils.public_key_aggregation</a>\n        </li>\n        <li>\n          <a href=\"#pactus.utils.signature_aggregation\">\n          <span class=\"rpc-badge\"></span>pactus.utils.signature_aggregation</a>\n        </li>\n      </ul>\n    </li>\n    <li> Wallet Service\n      <ul>\n        <li>\n          <a href=\"#pactus.wallet.create_wallet\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.create_wallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.restore_wallet\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.restore_wallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.load_wallet\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.load_wallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.unload_wallet\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.unload_wallet</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.list_wallets\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.list_wallets</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_wallet_info\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_wallet_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.update_password\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.update_password</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_total_balance\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_total_balance</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_total_stake\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_total_stake</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_validator_address\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_validator_address</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_address_info\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_address_info</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.set_address_label\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.set_address_label</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_new_address\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_new_address</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.list_addresses\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.list_addresses</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.sign_message\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.sign_message</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.sign_raw_transaction\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.sign_raw_transaction</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.list_transactions\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.list_transactions</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.set_default_fee\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.set_default_fee</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_mnemonic\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_mnemonic</a>\n        </li>\n        <li>\n          <a href=\"#pactus.wallet.get_private_key\">\n          <span class=\"rpc-badge\"></span>pactus.wallet.get_private_key</a>\n        </li>\n      </ul>\n    </li>\n  </ul>\n</div>\n\n<div class=\"api-doc\">\n\n### Transaction Service\n\n<p>Transaction service defines various RPC methods for interacting with transactions.</p>\n\n#### pactus.transaction.get_transaction <span id=\"pactus.transaction.get_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetTransaction retrieves transaction details based on the provided request parameters.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction to retrieve.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">verbosity</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The verbosity level for transaction details.\n      <br>Available values:<ul>\n      <li>TRANSACTION_VERBOSITY_DATA = 0 (Request transaction data only.)</li>\n      <li>TRANSACTION_VERBOSITY_INFO = 1 (Request detailed transaction information.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">block_height</td>\n    <td> numeric</td>\n    <td>\n  The height of the block containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">block_time</td>\n    <td> numeric</td>\n    <td>\n  The UNIX timestamp of the block containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction</td>\n    <td> object (TransactionInfo)</td>\n    <td>\n  Detailed information about the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.version</td>\n    <td> numeric</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.value</td>\n    <td> numeric</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.fee</td>\n    <td> numeric</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer</td>\n    <td> object (PayloadTransfer)</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.amount</td>\n    <td> numeric</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond</td>\n    <td> object (PayloadBond)</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition</td>\n    <td> object (PayloadSortition)</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond</td>\n    <td> object (PayloadUnbond)</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw</td>\n    <td> object (PayloadWithdraw)</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.amount</td>\n    <td> numeric</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer</td>\n    <td> object (PayloadBatchTransfer)</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.recipients</td>\n    <td>repeated object (Recipient)</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.block_height</td>\n    <td> numeric</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmed</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmations</td>\n    <td> numeric</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.calculate_fee <span id=\"pactus.transaction.calculate_fee\" class=\"rpc-badge\"></span>\n\n<p>CalculateFee calculates the transaction fee based on the specified amount and payload type.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> numeric</td>\n    <td>\n  The amount involved in the transaction, specified in NanoPAC.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fixed_amount</td>\n    <td> boolean</td>\n    <td>\n  Indicates if the amount should be fixed and include the fee.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> numeric</td>\n    <td>\n  The calculated amount in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> numeric</td>\n    <td>\n  The calculated transaction fee in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.broadcast_transaction <span id=\"pactus.transaction.broadcast_transaction\" class=\"rpc-badge\"></span>\n\n<p>BroadcastTransaction broadcasts a signed transaction to the network.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signed_raw_transaction</td>\n    <td> string</td>\n    <td>\n  The signed raw transaction data to be broadcasted.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the broadcasted transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.get_raw_transfer_transaction <span id=\"pactus.transaction.get_raw_transfer_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawTransferTransaction retrieves raw details of a transfer transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> numeric</td>\n    <td>\n  The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> numeric</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.get_raw_bond_transaction <span id=\"pactus.transaction.get_raw_bond_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawBondTransaction retrieves raw details of a bond transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's validator address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">stake</td>\n    <td> numeric</td>\n    <td>\n  The stake amount in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\nOptional, but required when registering a new validator.;\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> numeric</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.get_raw_unbond_transaction <span id=\"pactus.transaction.get_raw_unbond_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawUnbondTransaction retrieves raw details of an unbond transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.get_raw_withdraw_transaction <span id=\"pactus.transaction.get_raw_withdraw_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> numeric</td>\n    <td>\n  The withdrawal amount in NanoPAC. Must be greater than 0.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> numeric</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.get_raw_batch_transfer_transaction <span id=\"pactus.transaction.get_raw_batch_transfer_transaction\" class=\"rpc-badge\"></span>\n\n<p>GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction. If not set, defaults to the last block height.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">sender</td>\n    <td> string</td>\n    <td>\n  The sender's account address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">recipients</td>\n    <td>repeated object (Recipient)</td>\n    <td>\n  The list of recipients with their amounts. Minimum 2 recipients required.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">fee</td>\n    <td> numeric</td>\n    <td>\n  The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.decode_raw_transaction <span id=\"pactus.transaction.decode_raw_transaction\" class=\"rpc-badge\"></span>\n\n<p>DecodeRawTransaction accepts raw transaction and returns decoded transaction.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">transaction</td>\n    <td> object (TransactionInfo)</td>\n    <td>\n  The decoded transaction information.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.version</td>\n    <td> numeric</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.value</td>\n    <td> numeric</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.fee</td>\n    <td> numeric</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer</td>\n    <td> object (PayloadTransfer)</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.transfer.amount</td>\n    <td> numeric</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond</td>\n    <td> object (PayloadBond)</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.bond.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition</td>\n    <td> object (PayloadSortition)</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond</td>\n    <td> object (PayloadUnbond)</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw</td>\n    <td> object (PayloadWithdraw)</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.withdraw.amount</td>\n    <td> numeric</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer</td>\n    <td> object (PayloadBatchTransfer)</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.batch_transfer.recipients</td>\n    <td>repeated object (Recipient)</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">transaction.memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.block_height</td>\n    <td> numeric</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmed</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">transaction.confirmations</td>\n    <td> numeric</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.transaction.check_transaction <span id=\"pactus.transaction.check_transaction\" class=\"rpc-badge\"></span>\n\n<p>CheckTransaction checks if the transaction is valid and can be included in the blockchain.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data to be checked.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">is_valid</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the transaction is valid.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">error_message</td>\n    <td> string</td>\n    <td>\n  An error message if the transaction is invalid.\nEmpty if the transaction is valid.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Blockchain Service\n\n<p>Blockchain service defines RPC methods for interacting with the blockchain.</p>\n\n#### pactus.blockchain.get_block <span id=\"pactus.blockchain.get_block\" class=\"rpc-badge\"></span>\n\n<p>GetBlock retrieves information about a block based on the provided request parameters.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> numeric</td>\n    <td>\n  The height of the block to retrieve.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">verbosity</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The verbosity level for block information.\n      <br>Available values:<ul>\n      <li>BLOCK_VERBOSITY_DATA = 0 (Request only block data.)</li>\n      <li>BLOCK_VERBOSITY_INFO = 1 (Request block information and transaction IDs.)</li>\n      <li>BLOCK_VERBOSITY_TRANSACTIONS = 2 (Request block information and detailed transaction data.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">height</td>\n    <td> numeric</td>\n    <td>\n  The height of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">data</td>\n    <td> string</td>\n    <td>\n  Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">block_time</td>\n    <td> numeric</td>\n    <td>\n  The timestamp of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header</td>\n    <td> object (BlockHeaderInfo)</td>\n    <td>\n  Header information of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.version</td>\n    <td> numeric</td>\n    <td>\n  The version of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.prev_block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the previous block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.state_root</td>\n    <td> string</td>\n    <td>\n  The state root hash of the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.sortition_seed</td>\n    <td> string</td>\n    <td>\n  The sortition seed of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">header.proposer_address</td>\n    <td> string</td>\n    <td>\n  The address of the proposer of the block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert</td>\n    <td> object (CertificateInfo)</td>\n    <td>\n  Certificate information of the previous block.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.round</td>\n    <td> numeric</td>\n    <td>\n  The round of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.committers</td>\n    <td>repeated numeric</td>\n    <td>\n  List of committers in the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.absentees</td>\n    <td>repeated numeric</td>\n    <td>\n  List of absentees in the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">prev_cert.signature</td>\n    <td> string</td>\n    <td>\n  The signature of the certificate.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated object (TransactionInfo)</td>\n    <td>\n  List of transactions in the block, available when verbosity level is set to\nBLOCK_VERBOSITY_TRANSACTIONS.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].version</td>\n    <td> numeric</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].value</td>\n    <td> numeric</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> numeric</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer</td>\n    <td> object (PayloadTransfer)</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.amount</td>\n    <td> numeric</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond</td>\n    <td> object (PayloadBond)</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition</td>\n    <td> object (PayloadSortition)</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond</td>\n    <td> object (PayloadUnbond)</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw</td>\n    <td> object (PayloadWithdraw)</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.amount</td>\n    <td> numeric</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer</td>\n    <td> object (PayloadBatchTransfer)</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.recipients</td>\n    <td>repeated object (Recipient)</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> numeric</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmed</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmations</td>\n    <td> numeric</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_block_hash <span id=\"pactus.blockchain.get_block_hash\" class=\"rpc-badge\"></span>\n\n<p>GetBlockHash retrieves the hash of a block at the specified height.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">height</td>\n    <td> numeric</td>\n    <td>\n  The height of the block to retrieve the hash for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_block_height <span id=\"pactus.blockchain.get_block_height\" class=\"rpc-badge\"></span>\n\n<p>GetBlockHeight retrieves the height of a block with the specified hash.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block to retrieve the height for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">height</td>\n    <td> numeric</td>\n    <td>\n  The height of the block.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_blockchain_info <span id=\"pactus.blockchain.get_blockchain_info\" class=\"rpc-badge\"></span>\n\n<p>GetBlockchainInfo retrieves general information about the blockchain.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">last_block_height</td>\n    <td> numeric</td>\n    <td>\n  The height of the last block in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">last_block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the last block in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">last_block_time</td>\n    <td> numeric</td>\n    <td>\n  The timestamp of the last block in Unix format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_accounts</td>\n    <td> numeric</td>\n    <td>\n  The total number of accounts in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_validators</td>\n    <td> numeric</td>\n    <td>\n  The total number of validators in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">active_validators</td>\n    <td> numeric</td>\n    <td>\n  The number of active (not unbonded) validators in the blockchain.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_power</td>\n    <td> numeric</td>\n    <td>\n  The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_power</td>\n    <td> numeric</td>\n    <td>\n  The power of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">is_pruned</td>\n    <td> boolean</td>\n    <td>\n  If the blocks are subject to pruning.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">pruning_height</td>\n    <td> numeric</td>\n    <td>\n  Lowest-height block stored (only present if pruning is enabled)\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">in_committee</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether this node participates in consensus: true if at least one\nof its running validators is a member of the current committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_size</td>\n    <td> numeric</td>\n    <td>\n  The number of validators in the current committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">average_score</td>\n    <td> numeric</td>\n    <td>\n  Average availability score of validators with stake, in percentage (0-100).\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_committee_info <span id=\"pactus.blockchain.get_committee_info\" class=\"rpc-badge\"></span>\n\n<p>GetCommitteeInfo retrieves information about the current committee.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">committee_size</td>\n    <td> numeric</td>\n    <td>\n  The number of validators in the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">committee_power</td>\n    <td> numeric</td>\n    <td>\n  The power of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_power</td>\n    <td> numeric</td>\n    <td>\n  The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators</td>\n    <td>repeated object (ValidatorInfo)</td>\n    <td>\n  List of committee validators.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].number</td>\n    <td> numeric</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].stake</td>\n    <td> numeric</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].last_bonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].last_sortition_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].unbonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].availability_score</td>\n    <td> numeric</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].protocol_version</td>\n    <td> numeric</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validators[].delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">protocol_versions</td>\n    <td> map&lt;int32, double&gt;</td>\n    <td>\n  Map of protocol versions and their percentages in the committee.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_consensus_info <span id=\"pactus.blockchain.get_consensus_info\" class=\"rpc-badge\"></span>\n\n<p>GetConsensusInfo retrieves information about the consensus instances.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">proposal</td>\n    <td> object (ProposalInfo)</td>\n    <td>\n  The proposal of the consensus info.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.height</td>\n    <td> numeric</td>\n    <td>\n  The height of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.round</td>\n    <td> numeric</td>\n    <td>\n  The round of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.block_data</td>\n    <td> string</td>\n    <td>\n  The block data of the proposal.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">proposal.signature</td>\n    <td> string</td>\n    <td>\n  The signature of the proposal, signed by the proposer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances</td>\n    <td>repeated object (ConsensusInfo)</td>\n    <td>\n  List of consensus instances.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].address</td>\n    <td> string</td>\n    <td>\n  The address of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].active</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the consensus instance is active and part of the committee.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].height</td>\n    <td> numeric</td>\n    <td>\n  The height of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].round</td>\n    <td> numeric</td>\n    <td>\n  The round of the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].votes</td>\n    <td>repeated object (VoteInfo)</td>\n    <td>\n  List of votes in the consensus instance.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">instances[].votes[].type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of the vote.\n      <br>Available values:<ul>\n      <li>VOTE_TYPE_UNSPECIFIED = 0 (Unspecified vote type.)</li>\n      <li>VOTE_TYPE_PREPARE = 1 (Prepare vote type.)</li>\n      <li>VOTE_TYPE_PRECOMMIT = 2 (Precommit vote type.)</li>\n      <li>VOTE_TYPE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>\n      <li>VOTE_TYPE_CP_MAIN_VOTE = 4 (Change-proposer:main-vote vote type.)</li>\n      <li>VOTE_TYPE_CP_DECIDED = 5 (Change-proposer:decided vote type.)</li>\n      </ul>\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].voter</td>\n    <td> string</td>\n    <td>\n  The address of the voter.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].block_hash</td>\n    <td> string</td>\n    <td>\n  The hash of the block being voted on.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].round</td>\n    <td> numeric</td>\n    <td>\n  The consensus round of the vote.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].cp_round</td>\n    <td> numeric</td>\n    <td>\n  The change-proposer round of the vote.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">instances[].votes[].cp_value</td>\n    <td> numeric</td>\n    <td>\n  The change-proposer value of the vote.\n    </td>\n  </tr></tbody>\n</table>\n\n#### pactus.blockchain.get_account <span id=\"pactus.blockchain.get_account\" class=\"rpc-badge\"></span>\n\n<p>GetAccount retrieves information about an account based on the provided address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address of the account to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">account</td>\n    <td> object (AccountInfo)</td>\n    <td>\n  Detailed information about the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.number</td>\n    <td> numeric</td>\n    <td>\n  The unique number assigned to the account.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.balance</td>\n    <td> numeric</td>\n    <td>\n  The balance of the account in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">account.address</td>\n    <td> string</td>\n    <td>\n  The address of the account.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_validator <span id=\"pactus.blockchain.get_validator\" class=\"rpc-badge\"></span>\n\n<p>GetValidator retrieves information about a validator based on the provided address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">validator</td>\n    <td> object (ValidatorInfo)</td>\n    <td>\n  Detailed information about the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.number</td>\n    <td> numeric</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_bonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_sortition_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.unbonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.availability_score</td>\n    <td> numeric</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.protocol_version</td>\n    <td> numeric</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_validator_by_number <span id=\"pactus.blockchain.get_validator_by_number\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorByNumber retrieves information about a validator based on the provided number.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">number</td>\n    <td> numeric</td>\n    <td>\n  The unique number of the validator to retrieve information for.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">validator</td>\n    <td> object (ValidatorInfo)</td>\n    <td>\n  Detailed information about the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.hash</td>\n    <td> string</td>\n    <td>\n  The hash of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.data</td>\n    <td> string</td>\n    <td>\n  The serialized data of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.number</td>\n    <td> numeric</td>\n    <td>\n  The unique number assigned to the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake of the validator in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_bonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last bonded.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.last_sortition_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator last participated in sortition.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.unbonding_height</td>\n    <td> numeric</td>\n    <td>\n  The height at which the validator will unbond.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.address</td>\n    <td> string</td>\n    <td>\n  The address of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.availability_score</td>\n    <td> numeric</td>\n    <td>\n  The availability score of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.protocol_version</td>\n    <td> numeric</td>\n    <td>\n  The protocol version of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Whether the validator is delegated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share of the stake owner of the validator.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">validator.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry of the stake owner of the validator.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_validator_addresses <span id=\"pactus.blockchain.get_validator_addresses\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorAddresses retrieves a list of all validator addresses.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">addresses</td>\n    <td>repeated string</td>\n    <td>\n  List of validator addresses.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_public_key <span id=\"pactus.blockchain.get_public_key\" class=\"rpc-badge\"></span>\n\n<p>GetPublicKey retrieves the public key of an account based on the provided address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address for which to retrieve the public key.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the provided address.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.blockchain.get_tx_pool_content <span id=\"pactus.blockchain.get_tx_pool_content\" class=\"rpc-badge\"></span>\n\n<p>GetTxPoolContent retrieves current transactions in the transaction pool.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transactions to retrieve from the transaction pool. 0 means all types.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated object (TransactionInfo)</td>\n    <td>\n  List of transactions currently in the pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data in hexadecimal format.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].version</td>\n    <td> numeric</td>\n    <td>\n  The version of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].lock_time</td>\n    <td> numeric</td>\n    <td>\n  The lock time for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].value</td>\n    <td> numeric</td>\n    <td>\n  The value of the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> numeric</td>\n    <td>\n  The fee for the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer</td>\n    <td> object (PayloadTransfer)</td>\n    <td>\n  (OneOf)Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].transfer.amount</td>\n    <td> numeric</td>\n    <td>\n  The amount to be transferred in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond</td>\n    <td> object (PayloadBond)</td>\n    <td>\n  (OneOf)Bond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].bond.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.stake</td>\n    <td> numeric</td>\n    <td>\n  The stake amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.is_delegated</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the bond transaction is a delegation.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_share</td>\n    <td> numeric</td>\n    <td>\n  The share percentage for the delegate owner.\nOptional, but required when registering a new validator with delegation.;\nMust be between 0 and 0.7 PAC in nano PAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].bond.delegate_expiry</td>\n    <td> numeric</td>\n    <td>\n  The expiry height for the delegate relationship.\nOptional, but required when registering a new validator with delegation.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition</td>\n    <td> object (PayloadSortition)</td>\n    <td>\n  (OneOf)Sortition transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sortition.address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the sortition proof.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].sortition.proof</td>\n    <td> string</td>\n    <td>\n  The proof for the sortition.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond</td>\n    <td> object (PayloadUnbond)</td>\n    <td>\n  (OneOf)Unbond transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].unbond.validator</td>\n    <td> string</td>\n    <td>\n  The address of the validator to unbond from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].unbond.delegate_owner</td>\n    <td> string</td>\n    <td>\n  The address of the delegate owner.\nOptional, but required when the validator is a delegated validator.;\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw</td>\n    <td> object (PayloadWithdraw)</td>\n    <td>\n  (OneOf)Withdraw transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].withdraw.validator_address</td>\n    <td> string</td>\n    <td>\n  The address of the validator to withdraw from.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.account_address</td>\n    <td> string</td>\n    <td>\n  The address of the account to withdraw to.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].withdraw.amount</td>\n    <td> numeric</td>\n    <td>\n  The withdrawal amount in NanoPAC.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer</td>\n    <td> object (PayloadBatchTransfer)</td>\n    <td>\n  (OneOf)Batch Transfer transaction payload.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].batch_transfer.recipients</td>\n    <td>repeated object (Recipient)</td>\n    <td>\n  The list of recipients with their amounts.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].signature</td>\n    <td> string</td>\n    <td>\n  The signature for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> numeric</td>\n    <td>\n  The block height containing the transaction.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmed</td>\n    <td> boolean</td>\n    <td>\n  Indicates whether the transaction is confirmed.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].confirmations</td>\n    <td> numeric</td>\n    <td>\n  The number of blocks that have been added to the chain after this transaction was included in a block.\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Network Service\n\n<p>Network service provides RPCs for retrieving information about the network.</p>\n\n#### pactus.network.get_network_info <span id=\"pactus.network.get_network_info\" class=\"rpc-badge\"></span>\n\n<p>GetNetworkInfo retrieves information about the overall network.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">network_name</td>\n    <td> string</td>\n    <td>\n  Name of the P2P network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connected_peers_count</td>\n    <td> numeric</td>\n    <td>\n  Number of connected peers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info</td>\n    <td> object (MetricInfo)</td>\n    <td>\n  Metrics related to node activity.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_invalid</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of invalid bundles.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_invalid.bytes</td>\n    <td> numeric</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_invalid.bundles</td>\n    <td> numeric</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_sent</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of bundles sent.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_sent.bytes</td>\n    <td> numeric</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_sent.bundles</td>\n    <td> numeric</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_received</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of bundles received.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.total_received.bytes</td>\n    <td> numeric</td>\n    <td>\n  Total number of bytes.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.total_received.bundles</td>\n    <td> numeric</td>\n    <td>\n  Total number of bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">metric_info.message_sent</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of sent bundles categorized by message type.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">metric_info.message_received</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of received bundles categorized by message type.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.network.list_peers <span id=\"pactus.network.list_peers\" class=\"rpc-badge\"></span>\n\n<p>ListPeers lists all peers in the network.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">include_disconnected</td>\n    <td> boolean</td>\n    <td>\n  If true, includes disconnected peers (default: connected peers only).\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">peers</td>\n    <td>repeated object (PeerInfo)</td>\n    <td>\n  List of peers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].status</td>\n    <td> numeric</td>\n    <td>\n  Current status of the peer (e.g., connected, disconnected).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].moniker</td>\n    <td> string</td>\n    <td>\n  Moniker or Human-Readable name of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].agent</td>\n    <td> string</td>\n    <td>\n  Version and agent details of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].peer_id</td>\n    <td> string</td>\n    <td>\n  Peer ID of the peer in P2P network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].consensus_keys</td>\n    <td>repeated string</td>\n    <td>\n  List of consensus keys used by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].consensus_addresses</td>\n    <td>repeated string</td>\n    <td>\n  List of consensus addresses used by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].services</td>\n    <td> numeric</td>\n    <td>\n  Bitfield representing the services provided by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_block_hash</td>\n    <td> string</td>\n    <td>\n  Hash of the last block the peer knows.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].height</td>\n    <td> numeric</td>\n    <td>\n  Blockchain height of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_sent</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp of the last bundle sent to the peer (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].last_received</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp of the last bundle received from the peer (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].address</td>\n    <td> string</td>\n    <td>\n  Network address of the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].direction</td>\n    <td> numeric</td>\n    <td>\n  (Enum)Connection direction (e.g., inbound, outbound).\n      <br>Available values:<ul>\n      <li>DIRECTION_UNKNOWN = 0 (Unknown direction (default value).)</li>\n      <li>DIRECTION_INBOUND = 1 (Inbound connection - peer connected to us.)</li>\n      <li>DIRECTION_OUTBOUND = 2 (Outbound connection - we connected to peer.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].protocols</td>\n    <td>repeated string</td>\n    <td>\n  List of protocols supported by the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].total_sessions</td>\n    <td> numeric</td>\n    <td>\n  Total download sessions with the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].completed_sessions</td>\n    <td> numeric</td>\n    <td>\n  Completed download sessions with the peer.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].metric_info</td>\n    <td> object (MetricInfo)</td>\n    <td>\n  Metrics related to peer activity.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_invalid</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of invalid bundles.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_sent</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of bundles sent.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.total_received</td>\n    <td> object (CounterInfo)</td>\n    <td>\n  Total number of bundles received.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.message_sent</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of sent bundles categorized by message type.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].metric_info.message_received</td>\n    <td> map&lt;int32, CounterInfo&gt;</td>\n    <td>\n  Number of received bundles categorized by message type.\n    </td>\n  </tr><tr>\n    <td class=\"fw-bold\">peers[].outbound_hello_sent</td>\n    <td> boolean</td>\n    <td>\n  Whether the hello message was sent from the outbound connection.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.network.get_node_info <span id=\"pactus.network.get_node_info\" class=\"rpc-badge\"></span>\n\n<p>GetNodeInfo retrieves information about a specific node in the network.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">moniker</td>\n    <td> string</td>\n    <td>\n  Moniker or Human-readable name identifying this node in the network.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">agent</td>\n    <td> string</td>\n    <td>\n  Version and agent details of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">peer_id</td>\n    <td> string</td>\n    <td>\n  Peer ID of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">started_at</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp when the node was started (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">reachability</td>\n    <td> string</td>\n    <td>\n  Reachability status of the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">services</td>\n    <td> numeric</td>\n    <td>\n  Bitfield representing the services provided by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">services_names</td>\n    <td> string</td>\n    <td>\n  Names of services provided by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">local_addrs</td>\n    <td>repeated string</td>\n    <td>\n  List of addresses associated with the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">protocols</td>\n    <td>repeated string</td>\n    <td>\n  List of protocols supported by the node.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">clock_offset</td>\n    <td> numeric</td>\n    <td>\n  Offset between the node's clock and the network's clock (in seconds).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info</td>\n    <td> object (ConnectionInfo)</td>\n    <td>\n  Information about the node's connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.connections</td>\n    <td> numeric</td>\n    <td>\n  Total number of connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.inbound_connections</td>\n    <td> numeric</td>\n    <td>\n  Number of inbound connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">connection_info.outbound_connections</td>\n    <td> numeric</td>\n    <td>\n  Number of outbound connections.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers</td>\n    <td>repeated object (ZMQPublisherInfo)</td>\n    <td>\n  List of active ZeroMQ publishers.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].topic</td>\n    <td> string</td>\n    <td>\n  The topic associated with the publisher.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].address</td>\n    <td> string</td>\n    <td>\n  The address of the publisher.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">zmq_publishers[].hwm</td>\n    <td> numeric</td>\n    <td>\n  The high-water mark (HWM) for the publisher, indicating the\nmaximum number of messages to queue before dropping older ones.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">current_time</td>\n    <td> numeric</td>\n    <td>\n  Current Unix timestamp of the node (UTC).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">network_name</td>\n    <td> string</td>\n    <td>\n  Name of the P2P network.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.network.ping <span id=\"pactus.network.ping\" class=\"rpc-badge\"></span>\n\n<p>Ping provides a simple connectivity test and latency measurement.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\nResult has no fields.\n\n### Utils Service\n\n<p>Utils service defines RPC methods for utility functions such as message\nsigning, verification, and other cryptographic operations.</p>\n\n#### pactus.utils.sign_message_with_private_key <span id=\"pactus.utils.sign_message_with_private_key\" class=\"rpc-badge\"></span>\n\n<p>SignMessageWithPrivateKey signs a message with the provided private key.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">private_key</td>\n    <td> string</td>\n    <td>\n  The private key to sign the message.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The message content to be signed.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The resulting signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.utils.verify_message <span id=\"pactus.utils.verify_message\" class=\"rpc-badge\"></span>\n\n<p>VerifyMessage verifies a signature against the public key and message.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The original message content that was signed.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The signature to verify in hexadecimal format.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the signer.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">is_valid</td>\n    <td> boolean</td>\n    <td>\n  Boolean indicating whether the signature is valid for the given message and public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.utils.public_key_aggregation <span id=\"pactus.utils.public_key_aggregation\" class=\"rpc-badge\"></span>\n\n<p>PublicKeyAggregation aggregates multiple BLS public keys into a single key.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_keys</td>\n    <td>repeated string</td>\n    <td>\n  List of BLS public keys to be aggregated.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The aggregated BLS public key.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The blockchain address derived from the aggregated public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.utils.signature_aggregation <span id=\"pactus.utils.signature_aggregation\" class=\"rpc-badge\"></span>\n\n<p>SignatureAggregation aggregates multiple BLS signatures into a single signature.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">signatures</td>\n    <td>repeated string</td>\n    <td>\n  List of BLS signatures to be aggregated.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The aggregated BLS signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n### Wallet Service\n\n<p>Wallet service provides RPC methods for wallet management operations.</p>\n\n#### pactus.wallet.create_wallet <span id=\"pactus.wallet.create_wallet\" class=\"rpc-badge\"></span>\n\n<p>CreateWallet creates a new wallet with the specified parameters.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the new wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password to secure the new wallet.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the new wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase) for wallet recovery.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.restore_wallet <span id=\"pactus.wallet.restore_wallet\" class=\"rpc-badge\"></span>\n\n<p>RestoreWallet restores an existing wallet with the given mnemonic.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name for the restored wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase) for wallet recovery.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password to secure the restored wallet.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the restored wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.load_wallet <span id=\"pactus.wallet.load_wallet\" class=\"rpc-badge\"></span>\n\n<p>LoadWallet loads an existing wallet with the given name.\ndeprecated: It will be removed in a future version.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to load.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the loaded wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.unload_wallet <span id=\"pactus.wallet.unload_wallet\" class=\"rpc-badge\"></span>\n\n<p>UnloadWallet unloads a currently loaded wallet with the specified name.\ndeprecated: It will be removed in a future version.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to unload.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the unloaded wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.list_wallets <span id=\"pactus.wallet.list_wallets\" class=\"rpc-badge\"></span>\n\n<p>ListWallets returns a list of all available wallets.</p>\n\n<h4>Parameters</h4>\nParameters has no fields.\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallets</td>\n    <td>repeated string</td>\n    <td>\n  Array of wallet names.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_wallet_info <span id=\"pactus.wallet.get_wallet_info\" class=\"rpc-badge\"></span>\n\n<p>GetWalletInfo returns detailed information about a specific wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to query.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">version</td>\n    <td> numeric</td>\n    <td>\n  The wallet format version.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">network</td>\n    <td> string</td>\n    <td>\n  The network the wallet is connected to (e.g., mainnet, testnet).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">encrypted</td>\n    <td> boolean</td>\n    <td>\n  Indicates if the wallet is encrypted.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">uuid</td>\n    <td> string</td>\n    <td>\n  A unique identifier of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">created_at</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp of wallet creation.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">default_fee</td>\n    <td> numeric</td>\n    <td>\n  The default fee of the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">driver</td>\n    <td> string</td>\n    <td>\n  The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">path</td>\n    <td> string</td>\n    <td>\n  Path to the wallet file or storage location.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.update_password <span id=\"pactus.wallet.update_password\" class=\"rpc-badge\"></span>\n\n<p>UpdatePassword updates the password of an existing wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet whose password will be updated.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">old_password</td>\n    <td> string</td>\n    <td>\n  The current wallet password.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">new_password</td>\n    <td> string</td>\n    <td>\n  The new wallet password.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet whose password was updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_total_balance <span id=\"pactus.wallet.get_total_balance\" class=\"rpc-badge\"></span>\n\n<p>GetTotalBalance returns the total available balance of the wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the total balance.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_balance</td>\n    <td> numeric</td>\n    <td>\n  The total balance of the wallet in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_total_stake <span id=\"pactus.wallet.get_total_stake\" class=\"rpc-badge\"></span>\n\n<p>GetTotalStake returns the total stake amount in the wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the total stake.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">total_stake</td>\n    <td> numeric</td>\n    <td>\n  The total stake amount in NanoPAC.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_validator_address <span id=\"pactus.wallet.get_validator_address\" class=\"rpc-badge\"></span>\n\n<p>GetValidatorAddress retrieves the validator address associated with a public key.\nDeprecated: Will move into utils.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">public_key</td>\n    <td> string</td>\n    <td>\n  The public key of the validator.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The validator address associated with the public key.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_address_info <span id=\"pactus.wallet.get_address_info\" class=\"rpc-badge\"></span>\n\n<p>GetAddressInfo returns detailed information about a specific address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to query.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr</td>\n    <td> object (AddressInfo)</td>\n    <td>\n  Detailed information about the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.set_address_label <span id=\"pactus.wallet.set_address_label\" class=\"rpc-badge\"></span>\n\n<p>SetAddressLabel sets or updates the label for a given address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for modification.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to label.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  The new label for the address.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where the address label was updated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address where the label was updated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  The new label for the address.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_new_address <span id=\"pactus.wallet.get_new_address\" class=\"rpc-badge\"></span>\n\n<p>GetNewAddress generates a new address for the specified wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to generate a new address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of address to generate.\n      <br>Available values:<ul>\n      <li>ADDRESS_TYPE_TREASURY = 0 (Treasury address type.\nShould not be used to generate new addresses.)</li>\n      <li>ADDRESS_TYPE_VALIDATOR = 1 (Validator address type used for validator nodes.)</li>\n      <li>ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)</li>\n      <li>ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">label</td>\n    <td> string</td>\n    <td>\n  A label for the new address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Password for the new address. It's required when address_type is Ed25519 type.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where address was generated.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr</td>\n    <td> object (AddressInfo)</td>\n    <td>\n  Detailed information about the new address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addr.path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.list_addresses <span id=\"pactus.wallet.list_addresses\" class=\"rpc-badge\"></span>\n\n<p>ListAddresses returns all addresses in the specified wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address_types</td>\n    <td>repeated numeric</td>\n    <td>\n  (Enum)Filter addresses by their types. If empty, all address types are included.\n      <br>Available values:<ul>\n      <li>ADDRESS_TYPE_TREASURY = 0 (Treasury address type.\nShould not be used to generate new addresses.)</li>\n      <li>ADDRESS_TYPE_VALIDATOR = 1 (Validator address type used for validator nodes.)</li>\n      <li>ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)</li>\n      <li>ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password.)</li>\n      </ul>\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the queried wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs</td>\n    <td>repeated object (AddressInfo)</td>\n    <td>\n  List of all addresses in the wallet with their details.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].address</td>\n    <td> string</td>\n    <td>\n  The address string.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].public_key</td>\n    <td> string</td>\n    <td>\n  The public key associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].label</td>\n    <td> string</td>\n    <td>\n  A human-readable label associated with the address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">addrs[].path</td>\n    <td> string</td>\n    <td>\n  The Hierarchical Deterministic (HD) path of the address within the wallet.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.sign_message <span id=\"pactus.wallet.sign_message\" class=\"rpc-badge\"></span>\n\n<p>SignMessage signs an arbitrary message using a wallet's private key.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to sign with.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for signing.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address whose private key should be used for signing the message.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">message</td>\n    <td> string</td>\n    <td>\n  The arbitrary message to be signed.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">signature</td>\n    <td> string</td>\n    <td>\n  The signature in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.sign_raw_transaction <span id=\"pactus.wallet.sign_raw_transaction\" class=\"rpc-badge\"></span>\n\n<p>SignRawTransaction signs a raw transaction for a specified wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet used for signing.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">raw_transaction</td>\n    <td> string</td>\n    <td>\n  The raw transaction data to be signed.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password required for signing.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">transaction_id</td>\n    <td> string</td>\n    <td>\n  The ID of the signed transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">signed_raw_transaction</td>\n    <td> string</td>\n    <td>\n  The signed raw transaction data.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.list_transactions <span id=\"pactus.wallet.list_transactions\" class=\"rpc-badge\"></span>\n\n<p>ListTransactions returns a list of transactions for a wallet,\noptionally filtered by a specific address, with pagination support.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to query transactions for.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  Optional: The address to filter transactions.\nIf empty or set to '*', transactions for all addresses in the wallet are included.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">direction</td>\n    <td> numeric</td>\n    <td>\n  (Enum)Filter transactions by direction relative to the wallet.\nDefaults to any direction if not set.\n      <br>Available values:<ul>\n      <li>TX_DIRECTION_ANY = 0 (include both incoming and outgoing transactions.)</li>\n      <li>TX_DIRECTION_INCOMING = 1 (Include only incoming transactions where the wallet receives funds.)</li>\n      <li>TX_DIRECTION_OUTGOING = 2 (Include only outgoing transactions where the wallet sends funds.)</li>\n      </ul>\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">count</td>\n    <td> numeric</td>\n    <td>\n  Optional: The maximum number of transactions to return.\nDefaults to 10 if not set.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">skip</td>\n    <td> numeric</td>\n    <td>\n  Optional: The number of transactions to skip (for pagination).\nDefaults to 0 if not set.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet queried.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs</td>\n    <td>repeated object (WalletTransactionInfo)</td>\n    <td>\n  List of transactions for the wallet, filtered by the specified address if provided.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].no</td>\n    <td> numeric</td>\n    <td>\n  A sequence number for the transaction in the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].tx_id</td>\n    <td> string</td>\n    <td>\n  The unique ID of the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].sender</td>\n    <td> string</td>\n    <td>\n  The sender's address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].receiver</td>\n    <td> string</td>\n    <td>\n  The receiver's address.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].direction</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The direction of the transaction relative to the wallet.\n      <br>Available values:<ul>\n      <li>TX_DIRECTION_ANY = 0 (include both incoming and outgoing transactions.)</li>\n      <li>TX_DIRECTION_INCOMING = 1 (Include only incoming transactions where the wallet receives funds.)</li>\n      <li>TX_DIRECTION_OUTGOING = 2 (Include only outgoing transactions where the wallet sends funds.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].amount</td>\n    <td> numeric</td>\n    <td>\n  The amount involved in the transaction in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].fee</td>\n    <td> numeric</td>\n    <td>\n  The transaction fee in NanoPAC.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].memo</td>\n    <td> string</td>\n    <td>\n  A memo string for the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].status</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The current status of the transaction.\n      <br>Available values:<ul>\n      <li>TRANSACTION_STATUS_PENDING = 0 (Pending status for transactions in the mempool.)</li>\n      <li>TRANSACTION_STATUS_CONFIRMED = 1 (Confirmed status for transactions included in a block.)</li>\n      <li>TRANSACTION_STATUS_FAILED = -1 (Failed status for transactions that were not successful.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].block_height</td>\n    <td> numeric</td>\n    <td>\n  The block height containing the transaction.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].payload_type</td>\n    <td> numeric</td>\n    <td>\n  (Enum)The type of transaction payload.\n      <br>Available values:<ul>\n      <li>PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)</li>\n      <li>PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)</li>\n      <li>PAYLOAD_TYPE_BOND = 2 (Bond payload type.)</li>\n      <li>PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)</li>\n      <li>PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)</li>\n      <li>PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)</li>\n      <li>PAYLOAD_TYPE_BATCH_TRANSFER = 6 (Batch transfer payload type.)</li>\n      </ul>\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].data</td>\n    <td> string</td>\n    <td>\n  The raw transaction data.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].comment</td>\n    <td> string</td>\n    <td>\n  A comment associated with the transaction in the wallet.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].created_at</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp of when the transaction was created.\n    </td>\n  </tr>\n   <tr>\n    <td class=\"fw-bold\">txs[].updated_at</td>\n    <td> numeric</td>\n    <td>\n  Unix timestamp of when the transaction was last updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.set_default_fee <span id=\"pactus.wallet.set_default_fee\" class=\"rpc-badge\"></span>\n\n<p>SetDefaultFee sets the default fee for the wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to set the default fee.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">amount</td>\n    <td> numeric</td>\n    <td>\n  The default fee amount in NanoPAC.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet where the default fee was updated.\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_mnemonic <span id=\"pactus.wallet.get_mnemonic\" class=\"rpc-badge\"></span>\n\n<p>GetMnemonic returns the mnemonic (seed phrase) for the wallet.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet to get the mnemonic.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">mnemonic</td>\n    <td> string</td>\n    <td>\n  The mnemonic (seed phrase).\n    </td>\n  </tr>\n   </tbody>\n</table>\n\n#### pactus.wallet.get_private_key <span id=\"pactus.wallet.get_private_key\" class=\"rpc-badge\"></span>\n\n<p>GetPrivateKey returns the private key for a given address.</p>\n\n<h4>Parameters</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n    <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\">\n  <tr>\n    <td class=\"fw-bold\">wallet_name</td>\n    <td> string</td>\n    <td>\n  The name of the wallet containing the address.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">password</td>\n    <td> string</td>\n    <td>\n  Wallet password.\n    </td>\n  </tr>\n  <tr>\n    <td class=\"fw-bold\">address</td>\n    <td> string</td>\n    <td>\n  The address to get the private key.\n    </td>\n  </tr>\n  </tbody>\n</table>\n\n<h4>Result</h4>\n<table class=\"table table-bordered table-responsive table-sm\">\n  <thead>\n  <tr><td>Field</td><td>Type</td><td>Description</td></tr>\n  </thead>\n  <tbody class=\"table-group-divider\"><tr>\n    <td class=\"fw-bold\">private_key</td>\n    <td> string</td>\n    <td>\n  The private key in hexadecimal format.\n    </td>\n  </tr>\n   </tbody>\n</table>\n</div>\n"
  },
  {
    "path": "www/grpc/gen/go/blockchain.cobra.pb.go",
    "content": "// Code generated by protoc-gen-cobra. DO NOT EDIT.\n\npackage pactus\n\nimport (\n\tclient \"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\tflag \"github.com/NathanBaulch/protoc-gen-cobra/flag\"\n\tiocodec \"github.com/NathanBaulch/protoc-gen-cobra/iocodec\"\n\tcobra \"github.com/spf13/cobra\"\n\tgrpc \"google.golang.org/grpc\"\n\tproto \"google.golang.org/protobuf/proto\"\n)\n\nfunc BlockchainClientCommand(options ...client.Option) *cobra.Command {\n\tcfg := client.NewConfig(options...)\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Blockchain\"),\n\t\tShort: \"Blockchain service client\",\n\t\tLong:  \"Blockchain service defines RPC methods for interacting with the blockchain.\",\n\t}\n\tcfg.BindFlags(cmd.PersistentFlags())\n\tcmd.AddCommand(\n\t\t_BlockchainGetBlockCommand(cfg),\n\t\t_BlockchainGetBlockHashCommand(cfg),\n\t\t_BlockchainGetBlockHeightCommand(cfg),\n\t\t_BlockchainGetBlockchainInfoCommand(cfg),\n\t\t_BlockchainGetCommitteeInfoCommand(cfg),\n\t\t_BlockchainGetConsensusInfoCommand(cfg),\n\t\t_BlockchainGetAccountCommand(cfg),\n\t\t_BlockchainGetValidatorCommand(cfg),\n\t\t_BlockchainGetValidatorByNumberCommand(cfg),\n\t\t_BlockchainGetValidatorAddressesCommand(cfg),\n\t\t_BlockchainGetPublicKeyCommand(cfg),\n\t\t_BlockchainGetTxPoolContentCommand(cfg),\n\t)\n\treturn cmd\n}\n\nfunc _BlockchainGetBlockCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetBlockRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetBlock\"),\n\t\tShort: \"GetBlock RPC client\",\n\t\tLong:  \"GetBlock retrieves information about a block based on the provided request parameters.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetBlock\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetBlockRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetBlock(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer(\"Height\"), 0, \"The height of the block to retrieve.\")\n\tflag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer(\"Verbosity\"), \"The verbosity level for block information.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetBlockHashCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetBlockHashRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetBlockHash\"),\n\t\tShort: \"GetBlockHash RPC client\",\n\t\tLong:  \"GetBlockHash retrieves the hash of a block at the specified height.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetBlockHash\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetBlockHashRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetBlockHash(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer(\"Height\"), 0, \"The height of the block to retrieve the hash for.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetBlockHeightCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetBlockHeightRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetBlockHeight\"),\n\t\tShort: \"GetBlockHeight RPC client\",\n\t\tLong:  \"GetBlockHeight retrieves the height of a block with the specified hash.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetBlockHeight\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetBlockHeightRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetBlockHeight(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Hash, cfg.FlagNamer(\"Hash\"), \"\", \"The hash of the block to retrieve the height for.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetBlockchainInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetBlockchainInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetBlockchainInfo\"),\n\t\tShort: \"GetBlockchainInfo RPC client\",\n\t\tLong:  \"GetBlockchainInfo retrieves general information about the blockchain.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetBlockchainInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetBlockchainInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetBlockchainInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _BlockchainGetCommitteeInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetCommitteeInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetCommitteeInfo\"),\n\t\tShort: \"GetCommitteeInfo RPC client\",\n\t\tLong:  \"GetCommitteeInfo retrieves information about the current committee.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetCommitteeInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetCommitteeInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetCommitteeInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _BlockchainGetConsensusInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetConsensusInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetConsensusInfo\"),\n\t\tShort: \"GetConsensusInfo RPC client\",\n\t\tLong:  \"GetConsensusInfo retrieves information about the consensus instances.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetConsensusInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetConsensusInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetConsensusInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _BlockchainGetAccountCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetAccountRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetAccount\"),\n\t\tShort: \"GetAccount RPC client\",\n\t\tLong:  \"GetAccount retrieves information about an account based on the provided address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetAccount\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetAccountRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetAccount(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address of the account to retrieve information for.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetValidatorCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetValidatorRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetValidator\"),\n\t\tShort: \"GetValidator RPC client\",\n\t\tLong:  \"GetValidator retrieves information about a validator based on the provided address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetValidator\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetValidatorRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetValidator(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address of the validator to retrieve information for.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetValidatorByNumberCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetValidatorByNumberRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetValidatorByNumber\"),\n\t\tShort: \"GetValidatorByNumber RPC client\",\n\t\tLong:  \"GetValidatorByNumber retrieves information about a validator based on the provided number.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetValidatorByNumber\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetValidatorByNumberRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetValidatorByNumber(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Int32Var(&req.Number, cfg.FlagNamer(\"Number\"), 0, \"The unique number of the validator to retrieve information for.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetValidatorAddressesCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetValidatorAddressesRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetValidatorAddresses\"),\n\t\tShort: \"GetValidatorAddresses RPC client\",\n\t\tLong:  \"GetValidatorAddresses retrieves a list of all validator addresses.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetValidatorAddresses\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetValidatorAddressesRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetValidatorAddresses(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _BlockchainGetPublicKeyCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetPublicKeyRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetPublicKey\"),\n\t\tShort: \"GetPublicKey RPC client\",\n\t\tLong:  \"GetPublicKey retrieves the public key of an account based on the provided address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetPublicKey\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetPublicKeyRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetPublicKey(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address for which to retrieve the public key.\")\n\n\treturn cmd\n}\n\nfunc _BlockchainGetTxPoolContentCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetTxPoolContentRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetTxPoolContent\"),\n\t\tShort: \"GetTxPoolContent RPC client\",\n\t\tLong:  \"GetTxPoolContent retrieves current transactions in the transaction pool.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Blockchain\", \"GetTxPoolContent\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewBlockchainClient(cc)\n\t\t\t\tv := &GetTxPoolContentRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetTxPoolContent(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tflag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer(\"PayloadType\"), \"The type of transactions to retrieve from the transaction pool. 0 means all types.\")\n\n\treturn cmd\n}\n"
  },
  {
    "path": "www/grpc/gen/go/blockchain.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.11\n// \tprotoc        (unknown)\n// source: blockchain.proto\n\npackage pactus\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Enumeration for verbosity levels when requesting block information.\ntype BlockVerbosity int32\n\nconst (\n\t// Request only block data.\n\tBlockVerbosity_BLOCK_VERBOSITY_DATA BlockVerbosity = 0\n\t// Request block information and transaction IDs.\n\tBlockVerbosity_BLOCK_VERBOSITY_INFO BlockVerbosity = 1\n\t// Request block information and detailed transaction data.\n\tBlockVerbosity_BLOCK_VERBOSITY_TRANSACTIONS BlockVerbosity = 2\n)\n\n// Enum value maps for BlockVerbosity.\nvar (\n\tBlockVerbosity_name = map[int32]string{\n\t\t0: \"BLOCK_VERBOSITY_DATA\",\n\t\t1: \"BLOCK_VERBOSITY_INFO\",\n\t\t2: \"BLOCK_VERBOSITY_TRANSACTIONS\",\n\t}\n\tBlockVerbosity_value = map[string]int32{\n\t\t\"BLOCK_VERBOSITY_DATA\":         0,\n\t\t\"BLOCK_VERBOSITY_INFO\":         1,\n\t\t\"BLOCK_VERBOSITY_TRANSACTIONS\": 2,\n\t}\n)\n\nfunc (x BlockVerbosity) Enum() *BlockVerbosity {\n\tp := new(BlockVerbosity)\n\t*p = x\n\treturn p\n}\n\nfunc (x BlockVerbosity) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (BlockVerbosity) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_blockchain_proto_enumTypes[0].Descriptor()\n}\n\nfunc (BlockVerbosity) Type() protoreflect.EnumType {\n\treturn &file_blockchain_proto_enumTypes[0]\n}\n\nfunc (x BlockVerbosity) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use BlockVerbosity.Descriptor instead.\nfunc (BlockVerbosity) EnumDescriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{0}\n}\n\n// Enumeration for types of votes.\ntype VoteType int32\n\nconst (\n\t// Unspecified vote type.\n\tVoteType_VOTE_TYPE_UNSPECIFIED VoteType = 0\n\t// Prepare vote type.\n\tVoteType_VOTE_TYPE_PREPARE VoteType = 1\n\t// Precommit vote type.\n\tVoteType_VOTE_TYPE_PRECOMMIT VoteType = 2\n\t// Change-proposer:pre-vote vote type.\n\tVoteType_VOTE_TYPE_CP_PRE_VOTE VoteType = 3\n\t// Change-proposer:main-vote vote type.\n\tVoteType_VOTE_TYPE_CP_MAIN_VOTE VoteType = 4\n\t// Change-proposer:decided vote type.\n\tVoteType_VOTE_TYPE_CP_DECIDED VoteType = 5\n)\n\n// Enum value maps for VoteType.\nvar (\n\tVoteType_name = map[int32]string{\n\t\t0: \"VOTE_TYPE_UNSPECIFIED\",\n\t\t1: \"VOTE_TYPE_PREPARE\",\n\t\t2: \"VOTE_TYPE_PRECOMMIT\",\n\t\t3: \"VOTE_TYPE_CP_PRE_VOTE\",\n\t\t4: \"VOTE_TYPE_CP_MAIN_VOTE\",\n\t\t5: \"VOTE_TYPE_CP_DECIDED\",\n\t}\n\tVoteType_value = map[string]int32{\n\t\t\"VOTE_TYPE_UNSPECIFIED\":  0,\n\t\t\"VOTE_TYPE_PREPARE\":      1,\n\t\t\"VOTE_TYPE_PRECOMMIT\":    2,\n\t\t\"VOTE_TYPE_CP_PRE_VOTE\":  3,\n\t\t\"VOTE_TYPE_CP_MAIN_VOTE\": 4,\n\t\t\"VOTE_TYPE_CP_DECIDED\":   5,\n\t}\n)\n\nfunc (x VoteType) Enum() *VoteType {\n\tp := new(VoteType)\n\t*p = x\n\treturn p\n}\n\nfunc (x VoteType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (VoteType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_blockchain_proto_enumTypes[1].Descriptor()\n}\n\nfunc (VoteType) Type() protoreflect.EnumType {\n\treturn &file_blockchain_proto_enumTypes[1]\n}\n\nfunc (x VoteType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use VoteType.Descriptor instead.\nfunc (VoteType) EnumDescriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{1}\n}\n\n// Request message for retrieving account information.\ntype GetAccountRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address of the account to retrieve information for.\n\tAddress       string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetAccountRequest) Reset() {\n\t*x = GetAccountRequest{}\n\tmi := &file_blockchain_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetAccountRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetAccountRequest) ProtoMessage() {}\n\nfunc (x *GetAccountRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.\nfunc (*GetAccountRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *GetAccountRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Response message contains account information.\ntype GetAccountResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Detailed information about the account.\n\tAccount       *AccountInfo `protobuf:\"bytes,1,opt,name=account,proto3\" json:\"account,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetAccountResponse) Reset() {\n\t*x = GetAccountResponse{}\n\tmi := &file_blockchain_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetAccountResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetAccountResponse) ProtoMessage() {}\n\nfunc (x *GetAccountResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.\nfunc (*GetAccountResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *GetAccountResponse) GetAccount() *AccountInfo {\n\tif x != nil {\n\t\treturn x.Account\n\t}\n\treturn nil\n}\n\n// Request message for retrieving validator addresses.\ntype GetValidatorAddressesRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorAddressesRequest) Reset() {\n\t*x = GetValidatorAddressesRequest{}\n\tmi := &file_blockchain_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorAddressesRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorAddressesRequest) ProtoMessage() {}\n\nfunc (x *GetValidatorAddressesRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorAddressesRequest.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorAddressesRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{2}\n}\n\n// Response message contains list of validator addresses.\ntype GetValidatorAddressesResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// List of validator addresses.\n\tAddresses     []string `protobuf:\"bytes,1,rep,name=addresses,proto3\" json:\"addresses,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorAddressesResponse) Reset() {\n\t*x = GetValidatorAddressesResponse{}\n\tmi := &file_blockchain_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorAddressesResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorAddressesResponse) ProtoMessage() {}\n\nfunc (x *GetValidatorAddressesResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorAddressesResponse.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorAddressesResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *GetValidatorAddressesResponse) GetAddresses() []string {\n\tif x != nil {\n\t\treturn x.Addresses\n\t}\n\treturn nil\n}\n\n// Request message for retrieving validator information by address.\ntype GetValidatorRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address of the validator to retrieve information for.\n\tAddress       string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorRequest) Reset() {\n\t*x = GetValidatorRequest{}\n\tmi := &file_blockchain_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorRequest) ProtoMessage() {}\n\nfunc (x *GetValidatorRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorRequest.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *GetValidatorRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving validator information by number.\ntype GetValidatorByNumberRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The unique number of the validator to retrieve information for.\n\tNumber        int32 `protobuf:\"varint,1,opt,name=number,proto3\" json:\"number,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorByNumberRequest) Reset() {\n\t*x = GetValidatorByNumberRequest{}\n\tmi := &file_blockchain_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorByNumberRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorByNumberRequest) ProtoMessage() {}\n\nfunc (x *GetValidatorByNumberRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorByNumberRequest.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorByNumberRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *GetValidatorByNumberRequest) GetNumber() int32 {\n\tif x != nil {\n\t\treturn x.Number\n\t}\n\treturn 0\n}\n\n// Response message contains validator information.\ntype GetValidatorResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Detailed information about the validator.\n\tValidator     *ValidatorInfo `protobuf:\"bytes,1,opt,name=validator,proto3\" json:\"validator,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorResponse) Reset() {\n\t*x = GetValidatorResponse{}\n\tmi := &file_blockchain_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorResponse) ProtoMessage() {}\n\nfunc (x *GetValidatorResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorResponse.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *GetValidatorResponse) GetValidator() *ValidatorInfo {\n\tif x != nil {\n\t\treturn x.Validator\n\t}\n\treturn nil\n}\n\n// Request message for retrieving public key by address.\ntype GetPublicKeyRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address for which to retrieve the public key.\n\tAddress       string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetPublicKeyRequest) Reset() {\n\t*x = GetPublicKeyRequest{}\n\tmi := &file_blockchain_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetPublicKeyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetPublicKeyRequest) ProtoMessage() {}\n\nfunc (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetPublicKeyRequest.ProtoReflect.Descriptor instead.\nfunc (*GetPublicKeyRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *GetPublicKeyRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Response message contains public key information.\ntype GetPublicKeyResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The public key associated with the provided address.\n\tPublicKey     string `protobuf:\"bytes,1,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetPublicKeyResponse) Reset() {\n\t*x = GetPublicKeyResponse{}\n\tmi := &file_blockchain_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetPublicKeyResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetPublicKeyResponse) ProtoMessage() {}\n\nfunc (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetPublicKeyResponse.ProtoReflect.Descriptor instead.\nfunc (*GetPublicKeyResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *GetPublicKeyResponse) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving block information based on height and verbosity level.\ntype GetBlockRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the block to retrieve.\n\tHeight uint32 `protobuf:\"varint,1,opt,name=height,proto3\" json:\"height,omitempty\"`\n\t// The verbosity level for block information.\n\tVerbosity     BlockVerbosity `protobuf:\"varint,2,opt,name=verbosity,proto3,enum=pactus.BlockVerbosity\" json:\"verbosity,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockRequest) Reset() {\n\t*x = GetBlockRequest{}\n\tmi := &file_blockchain_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockRequest) ProtoMessage() {}\n\nfunc (x *GetBlockRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead.\nfunc (*GetBlockRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *GetBlockRequest) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockRequest) GetVerbosity() BlockVerbosity {\n\tif x != nil {\n\t\treturn x.Verbosity\n\t}\n\treturn BlockVerbosity_BLOCK_VERBOSITY_DATA\n}\n\n// Response message contains block information.\ntype GetBlockResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the block.\n\tHeight uint32 `protobuf:\"varint,1,opt,name=height,proto3\" json:\"height,omitempty\"`\n\t// The hash of the block.\n\tHash string `protobuf:\"bytes,2,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\t// Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n\tData string `protobuf:\"bytes,3,opt,name=data,proto3\" json:\"data,omitempty\"`\n\t// The timestamp of the block.\n\tBlockTime uint32 `protobuf:\"varint,4,opt,name=block_time,json=blockTime,proto3\" json:\"block_time,omitempty\"`\n\t// Header information of the block.\n\tHeader *BlockHeaderInfo `protobuf:\"bytes,5,opt,name=header,proto3\" json:\"header,omitempty\"`\n\t// Certificate information of the previous block.\n\tPrevCert *CertificateInfo `protobuf:\"bytes,6,opt,name=prev_cert,json=prevCert,proto3\" json:\"prev_cert,omitempty\"`\n\t// List of transactions in the block, available when verbosity level is set to\n\t// BLOCK_VERBOSITY_TRANSACTIONS.\n\tTxs           []*TransactionInfo `protobuf:\"bytes,7,rep,name=txs,proto3\" json:\"txs,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockResponse) Reset() {\n\t*x = GetBlockResponse{}\n\tmi := &file_blockchain_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockResponse) ProtoMessage() {}\n\nfunc (x *GetBlockResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockResponse.ProtoReflect.Descriptor instead.\nfunc (*GetBlockResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *GetBlockResponse) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockResponse) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetBlockResponse) GetData() string {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetBlockResponse) GetBlockTime() uint32 {\n\tif x != nil {\n\t\treturn x.BlockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockResponse) GetHeader() *BlockHeaderInfo {\n\tif x != nil {\n\t\treturn x.Header\n\t}\n\treturn nil\n}\n\nfunc (x *GetBlockResponse) GetPrevCert() *CertificateInfo {\n\tif x != nil {\n\t\treturn x.PrevCert\n\t}\n\treturn nil\n}\n\nfunc (x *GetBlockResponse) GetTxs() []*TransactionInfo {\n\tif x != nil {\n\t\treturn x.Txs\n\t}\n\treturn nil\n}\n\n// Request message for retrieving block hash by height.\ntype GetBlockHashRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the block to retrieve the hash for.\n\tHeight        uint32 `protobuf:\"varint,1,opt,name=height,proto3\" json:\"height,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockHashRequest) Reset() {\n\t*x = GetBlockHashRequest{}\n\tmi := &file_blockchain_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockHashRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockHashRequest) ProtoMessage() {}\n\nfunc (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockHashRequest.ProtoReflect.Descriptor instead.\nfunc (*GetBlockHashRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *GetBlockHashRequest) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\n// Response message contains block hash.\ntype GetBlockHashResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The hash of the block.\n\tHash          string `protobuf:\"bytes,1,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockHashResponse) Reset() {\n\t*x = GetBlockHashResponse{}\n\tmi := &file_blockchain_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockHashResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockHashResponse) ProtoMessage() {}\n\nfunc (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockHashResponse.ProtoReflect.Descriptor instead.\nfunc (*GetBlockHashResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *GetBlockHashResponse) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving block height by hash.\ntype GetBlockHeightRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The hash of the block to retrieve the height for.\n\tHash          string `protobuf:\"bytes,1,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockHeightRequest) Reset() {\n\t*x = GetBlockHeightRequest{}\n\tmi := &file_blockchain_proto_msgTypes[13]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockHeightRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockHeightRequest) ProtoMessage() {}\n\nfunc (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[13]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockHeightRequest.ProtoReflect.Descriptor instead.\nfunc (*GetBlockHeightRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *GetBlockHeightRequest) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\n// Response message contains block height.\ntype GetBlockHeightResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the block.\n\tHeight        uint32 `protobuf:\"varint,1,opt,name=height,proto3\" json:\"height,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockHeightResponse) Reset() {\n\t*x = GetBlockHeightResponse{}\n\tmi := &file_blockchain_proto_msgTypes[14]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockHeightResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockHeightResponse) ProtoMessage() {}\n\nfunc (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[14]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockHeightResponse.ProtoReflect.Descriptor instead.\nfunc (*GetBlockHeightResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *GetBlockHeightResponse) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\n// Request message for retrieving blockchain information.\ntype GetBlockchainInfoRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockchainInfoRequest) Reset() {\n\t*x = GetBlockchainInfoRequest{}\n\tmi := &file_blockchain_proto_msgTypes[15]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockchainInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockchainInfoRequest) ProtoMessage() {}\n\nfunc (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[15]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockchainInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetBlockchainInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{15}\n}\n\n// Response message contains general blockchain information.\ntype GetBlockchainInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the last block in the blockchain.\n\tLastBlockHeight uint32 `protobuf:\"varint,1,opt,name=last_block_height,json=lastBlockHeight,proto3\" json:\"last_block_height,omitempty\"`\n\t// The hash of the last block in the blockchain.\n\tLastBlockHash string `protobuf:\"bytes,2,opt,name=last_block_hash,json=lastBlockHash,proto3\" json:\"last_block_hash,omitempty\"`\n\t// The timestamp of the last block in Unix format.\n\tLastBlockTime int64 `protobuf:\"varint,10,opt,name=last_block_time,json=lastBlockTime,proto3\" json:\"last_block_time,omitempty\"`\n\t// The total number of accounts in the blockchain.\n\tTotalAccounts int32 `protobuf:\"varint,3,opt,name=total_accounts,json=totalAccounts,proto3\" json:\"total_accounts,omitempty\"`\n\t// The total number of validators in the blockchain.\n\tTotalValidators int32 `protobuf:\"varint,4,opt,name=total_validators,json=totalValidators,proto3\" json:\"total_validators,omitempty\"`\n\t// The number of active (not unbonded) validators in the blockchain.\n\tActiveValidators int32 `protobuf:\"varint,12,opt,name=active_validators,json=activeValidators,proto3\" json:\"active_validators,omitempty\"`\n\t// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n\tTotalPower int64 `protobuf:\"varint,5,opt,name=total_power,json=totalPower,proto3\" json:\"total_power,omitempty\"`\n\t// The power of the committee.\n\tCommitteePower int64 `protobuf:\"varint,6,opt,name=committee_power,json=committeePower,proto3\" json:\"committee_power,omitempty\"`\n\t// If the blocks are subject to pruning.\n\tIsPruned bool `protobuf:\"varint,8,opt,name=is_pruned,json=isPruned,proto3\" json:\"is_pruned,omitempty\"`\n\t// Lowest-height block stored (only present if pruning is enabled)\n\tPruningHeight uint32 `protobuf:\"varint,9,opt,name=pruning_height,json=pruningHeight,proto3\" json:\"pruning_height,omitempty\"`\n\t// Indicates whether this node participates in consensus: true if at least one\n\t// of its running validators is a member of the current committee.\n\tInCommittee bool `protobuf:\"varint,13,opt,name=in_committee,json=inCommittee,proto3\" json:\"in_committee,omitempty\"`\n\t// The number of validators in the current committee.\n\tCommitteeSize int32 `protobuf:\"varint,14,opt,name=committee_size,json=committeeSize,proto3\" json:\"committee_size,omitempty\"`\n\t// Average availability score of validators with stake, in percentage (0-100).\n\tAverageScore  float64 `protobuf:\"fixed64,15,opt,name=average_score,json=averageScore,proto3\" json:\"average_score,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetBlockchainInfoResponse) Reset() {\n\t*x = GetBlockchainInfoResponse{}\n\tmi := &file_blockchain_proto_msgTypes[16]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetBlockchainInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetBlockchainInfoResponse) ProtoMessage() {}\n\nfunc (x *GetBlockchainInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[16]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetBlockchainInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetBlockchainInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *GetBlockchainInfoResponse) GetLastBlockHeight() uint32 {\n\tif x != nil {\n\t\treturn x.LastBlockHeight\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetLastBlockHash() string {\n\tif x != nil {\n\t\treturn x.LastBlockHash\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetBlockchainInfoResponse) GetLastBlockTime() int64 {\n\tif x != nil {\n\t\treturn x.LastBlockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetTotalAccounts() int32 {\n\tif x != nil {\n\t\treturn x.TotalAccounts\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetTotalValidators() int32 {\n\tif x != nil {\n\t\treturn x.TotalValidators\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetActiveValidators() int32 {\n\tif x != nil {\n\t\treturn x.ActiveValidators\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetTotalPower() int64 {\n\tif x != nil {\n\t\treturn x.TotalPower\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetCommitteePower() int64 {\n\tif x != nil {\n\t\treturn x.CommitteePower\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetIsPruned() bool {\n\tif x != nil {\n\t\treturn x.IsPruned\n\t}\n\treturn false\n}\n\nfunc (x *GetBlockchainInfoResponse) GetPruningHeight() uint32 {\n\tif x != nil {\n\t\treturn x.PruningHeight\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetInCommittee() bool {\n\tif x != nil {\n\t\treturn x.InCommittee\n\t}\n\treturn false\n}\n\nfunc (x *GetBlockchainInfoResponse) GetCommitteeSize() int32 {\n\tif x != nil {\n\t\treturn x.CommitteeSize\n\t}\n\treturn 0\n}\n\nfunc (x *GetBlockchainInfoResponse) GetAverageScore() float64 {\n\tif x != nil {\n\t\treturn x.AverageScore\n\t}\n\treturn 0\n}\n\n// Request message for retrieving committee information.\ntype GetCommitteeInfoRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetCommitteeInfoRequest) Reset() {\n\t*x = GetCommitteeInfoRequest{}\n\tmi := &file_blockchain_proto_msgTypes[17]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetCommitteeInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetCommitteeInfoRequest) ProtoMessage() {}\n\nfunc (x *GetCommitteeInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[17]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetCommitteeInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetCommitteeInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{17}\n}\n\n// Response message contains committee information.\ntype GetCommitteeInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The number of validators in the committee.\n\tCommitteeSize int32 `protobuf:\"varint,1,opt,name=committee_size,json=committeeSize,proto3\" json:\"committee_size,omitempty\"`\n\t// The power of the committee.\n\tCommitteePower int64 `protobuf:\"varint,2,opt,name=committee_power,json=committeePower,proto3\" json:\"committee_power,omitempty\"`\n\t// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n\tTotalPower int64 `protobuf:\"varint,3,opt,name=total_power,json=totalPower,proto3\" json:\"total_power,omitempty\"`\n\t// List of committee validators.\n\tValidators []*ValidatorInfo `protobuf:\"bytes,4,rep,name=validators,proto3\" json:\"validators,omitempty\"`\n\t// Map of protocol versions and their percentages in the committee.\n\tProtocolVersions map[int32]float64 `protobuf:\"bytes,5,rep,name=protocol_versions,json=protocolVersions,proto3\" json:\"protocol_versions,omitempty\" protobuf_key:\"varint,1,opt,name=key\" protobuf_val:\"fixed64,2,opt,name=value\"`\n\tunknownFields    protoimpl.UnknownFields\n\tsizeCache        protoimpl.SizeCache\n}\n\nfunc (x *GetCommitteeInfoResponse) Reset() {\n\t*x = GetCommitteeInfoResponse{}\n\tmi := &file_blockchain_proto_msgTypes[18]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetCommitteeInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetCommitteeInfoResponse) ProtoMessage() {}\n\nfunc (x *GetCommitteeInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[18]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetCommitteeInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetCommitteeInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *GetCommitteeInfoResponse) GetCommitteeSize() int32 {\n\tif x != nil {\n\t\treturn x.CommitteeSize\n\t}\n\treturn 0\n}\n\nfunc (x *GetCommitteeInfoResponse) GetCommitteePower() int64 {\n\tif x != nil {\n\t\treturn x.CommitteePower\n\t}\n\treturn 0\n}\n\nfunc (x *GetCommitteeInfoResponse) GetTotalPower() int64 {\n\tif x != nil {\n\t\treturn x.TotalPower\n\t}\n\treturn 0\n}\n\nfunc (x *GetCommitteeInfoResponse) GetValidators() []*ValidatorInfo {\n\tif x != nil {\n\t\treturn x.Validators\n\t}\n\treturn nil\n}\n\nfunc (x *GetCommitteeInfoResponse) GetProtocolVersions() map[int32]float64 {\n\tif x != nil {\n\t\treturn x.ProtocolVersions\n\t}\n\treturn nil\n}\n\n// Request message for retrieving consensus information.\ntype GetConsensusInfoRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetConsensusInfoRequest) Reset() {\n\t*x = GetConsensusInfoRequest{}\n\tmi := &file_blockchain_proto_msgTypes[19]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetConsensusInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetConsensusInfoRequest) ProtoMessage() {}\n\nfunc (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[19]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetConsensusInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetConsensusInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{19}\n}\n\n// Response message contains consensus information.\ntype GetConsensusInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The proposal of the consensus info.\n\tProposal *ProposalInfo `protobuf:\"bytes,1,opt,name=proposal,proto3\" json:\"proposal,omitempty\"`\n\t// List of consensus instances.\n\tInstances     []*ConsensusInfo `protobuf:\"bytes,2,rep,name=instances,proto3\" json:\"instances,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetConsensusInfoResponse) Reset() {\n\t*x = GetConsensusInfoResponse{}\n\tmi := &file_blockchain_proto_msgTypes[20]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetConsensusInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetConsensusInfoResponse) ProtoMessage() {}\n\nfunc (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[20]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetConsensusInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetConsensusInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{20}\n}\n\nfunc (x *GetConsensusInfoResponse) GetProposal() *ProposalInfo {\n\tif x != nil {\n\t\treturn x.Proposal\n\t}\n\treturn nil\n}\n\nfunc (x *GetConsensusInfoResponse) GetInstances() []*ConsensusInfo {\n\tif x != nil {\n\t\treturn x.Instances\n\t}\n\treturn nil\n}\n\n// Request message for retrieving transactions in the transaction pool.\ntype GetTxPoolContentRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The type of transactions to retrieve from the transaction pool. 0 means all types.\n\tPayloadType   PayloadType `protobuf:\"varint,1,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType\" json:\"payload_type,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTxPoolContentRequest) Reset() {\n\t*x = GetTxPoolContentRequest{}\n\tmi := &file_blockchain_proto_msgTypes[21]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTxPoolContentRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTxPoolContentRequest) ProtoMessage() {}\n\nfunc (x *GetTxPoolContentRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[21]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTxPoolContentRequest.ProtoReflect.Descriptor instead.\nfunc (*GetTxPoolContentRequest) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{21}\n}\n\nfunc (x *GetTxPoolContentRequest) GetPayloadType() PayloadType {\n\tif x != nil {\n\t\treturn x.PayloadType\n\t}\n\treturn PayloadType_PAYLOAD_TYPE_UNSPECIFIED\n}\n\n// Response message contains transactions in the transaction pool.\ntype GetTxPoolContentResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// List of transactions currently in the pool.\n\tTxs           []*TransactionInfo `protobuf:\"bytes,1,rep,name=txs,proto3\" json:\"txs,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTxPoolContentResponse) Reset() {\n\t*x = GetTxPoolContentResponse{}\n\tmi := &file_blockchain_proto_msgTypes[22]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTxPoolContentResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTxPoolContentResponse) ProtoMessage() {}\n\nfunc (x *GetTxPoolContentResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[22]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTxPoolContentResponse.ProtoReflect.Descriptor instead.\nfunc (*GetTxPoolContentResponse) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{22}\n}\n\nfunc (x *GetTxPoolContentResponse) GetTxs() []*TransactionInfo {\n\tif x != nil {\n\t\treturn x.Txs\n\t}\n\treturn nil\n}\n\n// Message contains information about a validator.\ntype ValidatorInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The hash of the validator.\n\tHash string `protobuf:\"bytes,1,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\t// The serialized data of the validator.\n\tData string `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n\t// The public key of the validator.\n\tPublicKey string `protobuf:\"bytes,3,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// The unique number assigned to the validator.\n\tNumber int32 `protobuf:\"varint,4,opt,name=number,proto3\" json:\"number,omitempty\"`\n\t// The stake of the validator in NanoPAC.\n\tStake int64 `protobuf:\"varint,5,opt,name=stake,proto3\" json:\"stake,omitempty\"`\n\t// The height at which the validator last bonded.\n\tLastBondingHeight uint32 `protobuf:\"varint,6,opt,name=last_bonding_height,json=lastBondingHeight,proto3\" json:\"last_bonding_height,omitempty\"`\n\t// The height at which the validator last participated in sortition.\n\tLastSortitionHeight uint32 `protobuf:\"varint,7,opt,name=last_sortition_height,json=lastSortitionHeight,proto3\" json:\"last_sortition_height,omitempty\"`\n\t// The height at which the validator will unbond.\n\tUnbondingHeight uint32 `protobuf:\"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3\" json:\"unbonding_height,omitempty\"`\n\t// The address of the validator.\n\tAddress string `protobuf:\"bytes,9,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The availability score of the validator.\n\tAvailabilityScore float64 `protobuf:\"fixed64,10,opt,name=availability_score,json=availabilityScore,proto3\" json:\"availability_score,omitempty\"`\n\t// The protocol version of the validator.\n\tProtocolVersion int32 `protobuf:\"varint,11,opt,name=protocol_version,json=protocolVersion,proto3\" json:\"protocol_version,omitempty\"`\n\t// Whether the validator is delegated.\n\tIsDelegated bool `protobuf:\"varint,12,opt,name=is_delegated,json=isDelegated,proto3\" json:\"is_delegated,omitempty\"`\n\t// The address of the stake owner of the validator.\n\tDelegateOwner string `protobuf:\"bytes,13,opt,name=delegate_owner,json=delegateOwner,proto3\" json:\"delegate_owner,omitempty\"`\n\t// The share of the stake owner of the validator.\n\tDelegateShare int64 `protobuf:\"varint,14,opt,name=delegate_share,json=delegateShare,proto3\" json:\"delegate_share,omitempty\"`\n\t// The expiry of the stake owner of the validator.\n\tDelegateExpiry uint32 `protobuf:\"varint,15,opt,name=delegate_expiry,json=delegateExpiry,proto3\" json:\"delegate_expiry,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *ValidatorInfo) Reset() {\n\t*x = ValidatorInfo{}\n\tmi := &file_blockchain_proto_msgTypes[23]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ValidatorInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ValidatorInfo) ProtoMessage() {}\n\nfunc (x *ValidatorInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[23]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead.\nfunc (*ValidatorInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{23}\n}\n\nfunc (x *ValidatorInfo) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\nfunc (x *ValidatorInfo) GetData() string {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn \"\"\n}\n\nfunc (x *ValidatorInfo) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ValidatorInfo) GetNumber() int32 {\n\tif x != nil {\n\t\treturn x.Number\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetStake() int64 {\n\tif x != nil {\n\t\treturn x.Stake\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetLastBondingHeight() uint32 {\n\tif x != nil {\n\t\treturn x.LastBondingHeight\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetLastSortitionHeight() uint32 {\n\tif x != nil {\n\t\treturn x.LastSortitionHeight\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetUnbondingHeight() uint32 {\n\tif x != nil {\n\t\treturn x.UnbondingHeight\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *ValidatorInfo) GetAvailabilityScore() float64 {\n\tif x != nil {\n\t\treturn x.AvailabilityScore\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetProtocolVersion() int32 {\n\tif x != nil {\n\t\treturn x.ProtocolVersion\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetIsDelegated() bool {\n\tif x != nil {\n\t\treturn x.IsDelegated\n\t}\n\treturn false\n}\n\nfunc (x *ValidatorInfo) GetDelegateOwner() string {\n\tif x != nil {\n\t\treturn x.DelegateOwner\n\t}\n\treturn \"\"\n}\n\nfunc (x *ValidatorInfo) GetDelegateShare() int64 {\n\tif x != nil {\n\t\treturn x.DelegateShare\n\t}\n\treturn 0\n}\n\nfunc (x *ValidatorInfo) GetDelegateExpiry() uint32 {\n\tif x != nil {\n\t\treturn x.DelegateExpiry\n\t}\n\treturn 0\n}\n\n// Message contains information about an account.\ntype AccountInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The hash of the account.\n\tHash string `protobuf:\"bytes,1,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\t// The serialized data of the account.\n\tData string `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n\t// The unique number assigned to the account.\n\tNumber int32 `protobuf:\"varint,3,opt,name=number,proto3\" json:\"number,omitempty\"`\n\t// The balance of the account in NanoPAC.\n\tBalance int64 `protobuf:\"varint,4,opt,name=balance,proto3\" json:\"balance,omitempty\"`\n\t// The address of the account.\n\tAddress       string `protobuf:\"bytes,5,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *AccountInfo) Reset() {\n\t*x = AccountInfo{}\n\tmi := &file_blockchain_proto_msgTypes[24]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *AccountInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*AccountInfo) ProtoMessage() {}\n\nfunc (x *AccountInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[24]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead.\nfunc (*AccountInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{24}\n}\n\nfunc (x *AccountInfo) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\nfunc (x *AccountInfo) GetData() string {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn \"\"\n}\n\nfunc (x *AccountInfo) GetNumber() int32 {\n\tif x != nil {\n\t\treturn x.Number\n\t}\n\treturn 0\n}\n\nfunc (x *AccountInfo) GetBalance() int64 {\n\tif x != nil {\n\t\treturn x.Balance\n\t}\n\treturn 0\n}\n\nfunc (x *AccountInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Message contains information about the header of a block.\ntype BlockHeaderInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The version of the block.\n\tVersion int32 `protobuf:\"varint,1,opt,name=version,proto3\" json:\"version,omitempty\"`\n\t// The hash of the previous block.\n\tPrevBlockHash string `protobuf:\"bytes,2,opt,name=prev_block_hash,json=prevBlockHash,proto3\" json:\"prev_block_hash,omitempty\"`\n\t// The state root hash of the blockchain.\n\tStateRoot string `protobuf:\"bytes,3,opt,name=state_root,json=stateRoot,proto3\" json:\"state_root,omitempty\"`\n\t// The sortition seed of the block.\n\tSortitionSeed string `protobuf:\"bytes,4,opt,name=sortition_seed,json=sortitionSeed,proto3\" json:\"sortition_seed,omitempty\"`\n\t// The address of the proposer of the block.\n\tProposerAddress string `protobuf:\"bytes,5,opt,name=proposer_address,json=proposerAddress,proto3\" json:\"proposer_address,omitempty\"`\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *BlockHeaderInfo) Reset() {\n\t*x = BlockHeaderInfo{}\n\tmi := &file_blockchain_proto_msgTypes[25]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *BlockHeaderInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*BlockHeaderInfo) ProtoMessage() {}\n\nfunc (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[25]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use BlockHeaderInfo.ProtoReflect.Descriptor instead.\nfunc (*BlockHeaderInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{25}\n}\n\nfunc (x *BlockHeaderInfo) GetVersion() int32 {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn 0\n}\n\nfunc (x *BlockHeaderInfo) GetPrevBlockHash() string {\n\tif x != nil {\n\t\treturn x.PrevBlockHash\n\t}\n\treturn \"\"\n}\n\nfunc (x *BlockHeaderInfo) GetStateRoot() string {\n\tif x != nil {\n\t\treturn x.StateRoot\n\t}\n\treturn \"\"\n}\n\nfunc (x *BlockHeaderInfo) GetSortitionSeed() string {\n\tif x != nil {\n\t\treturn x.SortitionSeed\n\t}\n\treturn \"\"\n}\n\nfunc (x *BlockHeaderInfo) GetProposerAddress() string {\n\tif x != nil {\n\t\treturn x.ProposerAddress\n\t}\n\treturn \"\"\n}\n\n// Message contains information about a certificate.\ntype CertificateInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The hash of the certificate.\n\tHash string `protobuf:\"bytes,1,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\t// The round of the certificate.\n\tRound int32 `protobuf:\"varint,2,opt,name=round,proto3\" json:\"round,omitempty\"`\n\t// List of committers in the certificate.\n\tCommitters []int32 `protobuf:\"varint,3,rep,packed,name=committers,proto3\" json:\"committers,omitempty\"`\n\t// List of absentees in the certificate.\n\tAbsentees []int32 `protobuf:\"varint,4,rep,packed,name=absentees,proto3\" json:\"absentees,omitempty\"`\n\t// The signature of the certificate.\n\tSignature     string `protobuf:\"bytes,5,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CertificateInfo) Reset() {\n\t*x = CertificateInfo{}\n\tmi := &file_blockchain_proto_msgTypes[26]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CertificateInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CertificateInfo) ProtoMessage() {}\n\nfunc (x *CertificateInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[26]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CertificateInfo.ProtoReflect.Descriptor instead.\nfunc (*CertificateInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{26}\n}\n\nfunc (x *CertificateInfo) GetHash() string {\n\tif x != nil {\n\t\treturn x.Hash\n\t}\n\treturn \"\"\n}\n\nfunc (x *CertificateInfo) GetRound() int32 {\n\tif x != nil {\n\t\treturn x.Round\n\t}\n\treturn 0\n}\n\nfunc (x *CertificateInfo) GetCommitters() []int32 {\n\tif x != nil {\n\t\treturn x.Committers\n\t}\n\treturn nil\n}\n\nfunc (x *CertificateInfo) GetAbsentees() []int32 {\n\tif x != nil {\n\t\treturn x.Absentees\n\t}\n\treturn nil\n}\n\nfunc (x *CertificateInfo) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\n// Message contains information about a vote.\ntype VoteInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The type of the vote.\n\tType VoteType `protobuf:\"varint,1,opt,name=type,proto3,enum=pactus.VoteType\" json:\"type,omitempty\"`\n\t// The address of the voter.\n\tVoter string `protobuf:\"bytes,2,opt,name=voter,proto3\" json:\"voter,omitempty\"`\n\t// The hash of the block being voted on.\n\tBlockHash string `protobuf:\"bytes,3,opt,name=block_hash,json=blockHash,proto3\" json:\"block_hash,omitempty\"`\n\t// The consensus round of the vote.\n\tRound int32 `protobuf:\"varint,4,opt,name=round,proto3\" json:\"round,omitempty\"`\n\t// The change-proposer round of the vote.\n\tCpRound int32 `protobuf:\"varint,5,opt,name=cp_round,json=cpRound,proto3\" json:\"cp_round,omitempty\"`\n\t// The change-proposer value of the vote.\n\tCpValue       int32 `protobuf:\"varint,6,opt,name=cp_value,json=cpValue,proto3\" json:\"cp_value,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *VoteInfo) Reset() {\n\t*x = VoteInfo{}\n\tmi := &file_blockchain_proto_msgTypes[27]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *VoteInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*VoteInfo) ProtoMessage() {}\n\nfunc (x *VoteInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[27]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use VoteInfo.ProtoReflect.Descriptor instead.\nfunc (*VoteInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{27}\n}\n\nfunc (x *VoteInfo) GetType() VoteType {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn VoteType_VOTE_TYPE_UNSPECIFIED\n}\n\nfunc (x *VoteInfo) GetVoter() string {\n\tif x != nil {\n\t\treturn x.Voter\n\t}\n\treturn \"\"\n}\n\nfunc (x *VoteInfo) GetBlockHash() string {\n\tif x != nil {\n\t\treturn x.BlockHash\n\t}\n\treturn \"\"\n}\n\nfunc (x *VoteInfo) GetRound() int32 {\n\tif x != nil {\n\t\treturn x.Round\n\t}\n\treturn 0\n}\n\nfunc (x *VoteInfo) GetCpRound() int32 {\n\tif x != nil {\n\t\treturn x.CpRound\n\t}\n\treturn 0\n}\n\nfunc (x *VoteInfo) GetCpValue() int32 {\n\tif x != nil {\n\t\treturn x.CpValue\n\t}\n\treturn 0\n}\n\n// Message contains information about a consensus instance.\ntype ConsensusInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address of the consensus instance.\n\tAddress string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// Indicates whether the consensus instance is active and part of the committee.\n\tActive bool `protobuf:\"varint,2,opt,name=active,proto3\" json:\"active,omitempty\"`\n\t// The height of the consensus instance.\n\tHeight uint32 `protobuf:\"varint,3,opt,name=height,proto3\" json:\"height,omitempty\"`\n\t// The round of the consensus instance.\n\tRound int32 `protobuf:\"varint,4,opt,name=round,proto3\" json:\"round,omitempty\"`\n\t// List of votes in the consensus instance.\n\tVotes         []*VoteInfo `protobuf:\"bytes,5,rep,name=votes,proto3\" json:\"votes,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ConsensusInfo) Reset() {\n\t*x = ConsensusInfo{}\n\tmi := &file_blockchain_proto_msgTypes[28]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ConsensusInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ConsensusInfo) ProtoMessage() {}\n\nfunc (x *ConsensusInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[28]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ConsensusInfo.ProtoReflect.Descriptor instead.\nfunc (*ConsensusInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{28}\n}\n\nfunc (x *ConsensusInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *ConsensusInfo) GetActive() bool {\n\tif x != nil {\n\t\treturn x.Active\n\t}\n\treturn false\n}\n\nfunc (x *ConsensusInfo) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\nfunc (x *ConsensusInfo) GetRound() int32 {\n\tif x != nil {\n\t\treturn x.Round\n\t}\n\treturn 0\n}\n\nfunc (x *ConsensusInfo) GetVotes() []*VoteInfo {\n\tif x != nil {\n\t\treturn x.Votes\n\t}\n\treturn nil\n}\n\n// Message contains information about a proposal.\ntype ProposalInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the proposal.\n\tHeight uint32 `protobuf:\"varint,1,opt,name=height,proto3\" json:\"height,omitempty\"`\n\t// The round of the proposal.\n\tRound int32 `protobuf:\"varint,2,opt,name=round,proto3\" json:\"round,omitempty\"`\n\t// The block data of the proposal.\n\tBlockData string `protobuf:\"bytes,3,opt,name=block_data,json=blockData,proto3\" json:\"block_data,omitempty\"`\n\t// The signature of the proposal, signed by the proposer.\n\tSignature     string `protobuf:\"bytes,4,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ProposalInfo) Reset() {\n\t*x = ProposalInfo{}\n\tmi := &file_blockchain_proto_msgTypes[29]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ProposalInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ProposalInfo) ProtoMessage() {}\n\nfunc (x *ProposalInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_blockchain_proto_msgTypes[29]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ProposalInfo.ProtoReflect.Descriptor instead.\nfunc (*ProposalInfo) Descriptor() ([]byte, []int) {\n\treturn file_blockchain_proto_rawDescGZIP(), []int{29}\n}\n\nfunc (x *ProposalInfo) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\nfunc (x *ProposalInfo) GetRound() int32 {\n\tif x != nil {\n\t\treturn x.Round\n\t}\n\treturn 0\n}\n\nfunc (x *ProposalInfo) GetBlockData() string {\n\tif x != nil {\n\t\treturn x.BlockData\n\t}\n\treturn \"\"\n}\n\nfunc (x *ProposalInfo) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\nvar File_blockchain_proto protoreflect.FileDescriptor\n\nconst file_blockchain_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x10blockchain.proto\\x12\\x06pactus\\x1a\\x11transaction.proto\\\"-\\n\" +\n\t\"\\x11GetAccountRequest\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\\"C\\n\" +\n\t\"\\x12GetAccountResponse\\x12-\\n\" +\n\t\"\\aaccount\\x18\\x01 \\x01(\\v2\\x13.pactus.AccountInfoR\\aaccount\\\"\\x1e\\n\" +\n\t\"\\x1cGetValidatorAddressesRequest\\\"=\\n\" +\n\t\"\\x1dGetValidatorAddressesResponse\\x12\\x1c\\n\" +\n\t\"\\taddresses\\x18\\x01 \\x03(\\tR\\taddresses\\\"/\\n\" +\n\t\"\\x13GetValidatorRequest\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\\"5\\n\" +\n\t\"\\x1bGetValidatorByNumberRequest\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x01 \\x01(\\x05R\\x06number\\\"K\\n\" +\n\t\"\\x14GetValidatorResponse\\x123\\n\" +\n\t\"\\tvalidator\\x18\\x01 \\x01(\\v2\\x15.pactus.ValidatorInfoR\\tvalidator\\\"/\\n\" +\n\t\"\\x13GetPublicKeyRequest\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\\"5\\n\" +\n\t\"\\x14GetPublicKeyResponse\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\\"_\\n\" +\n\t\"\\x0fGetBlockRequest\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x124\\n\" +\n\t\"\\tverbosity\\x18\\x02 \\x01(\\x0e2\\x16.pactus.BlockVerbosityR\\tverbosity\\\"\\x83\\x02\\n\" +\n\t\"\\x10GetBlockResponse\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x02 \\x01(\\tR\\x04hash\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\x03 \\x01(\\tR\\x04data\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"block_time\\x18\\x04 \\x01(\\rR\\tblockTime\\x12/\\n\" +\n\t\"\\x06header\\x18\\x05 \\x01(\\v2\\x17.pactus.BlockHeaderInfoR\\x06header\\x124\\n\" +\n\t\"\\tprev_cert\\x18\\x06 \\x01(\\v2\\x17.pactus.CertificateInfoR\\bprevCert\\x12)\\n\" +\n\t\"\\x03txs\\x18\\a \\x03(\\v2\\x17.pactus.TransactionInfoR\\x03txs\\\"-\\n\" +\n\t\"\\x13GetBlockHashRequest\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\\"*\\n\" +\n\t\"\\x14GetBlockHashResponse\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\\"+\\n\" +\n\t\"\\x15GetBlockHeightRequest\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\\"0\\n\" +\n\t\"\\x16GetBlockHeightResponse\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\\"\\x1a\\n\" +\n\t\"\\x18GetBlockchainInfoRequest\\\"\\x93\\x04\\n\" +\n\t\"\\x19GetBlockchainInfoResponse\\x12*\\n\" +\n\t\"\\x11last_block_height\\x18\\x01 \\x01(\\rR\\x0flastBlockHeight\\x12&\\n\" +\n\t\"\\x0flast_block_hash\\x18\\x02 \\x01(\\tR\\rlastBlockHash\\x12&\\n\" +\n\t\"\\x0flast_block_time\\x18\\n\" +\n\t\" \\x01(\\x03R\\rlastBlockTime\\x12%\\n\" +\n\t\"\\x0etotal_accounts\\x18\\x03 \\x01(\\x05R\\rtotalAccounts\\x12)\\n\" +\n\t\"\\x10total_validators\\x18\\x04 \\x01(\\x05R\\x0ftotalValidators\\x12+\\n\" +\n\t\"\\x11active_validators\\x18\\f \\x01(\\x05R\\x10activeValidators\\x12\\x1f\\n\" +\n\t\"\\vtotal_power\\x18\\x05 \\x01(\\x03R\\n\" +\n\t\"totalPower\\x12'\\n\" +\n\t\"\\x0fcommittee_power\\x18\\x06 \\x01(\\x03R\\x0ecommitteePower\\x12\\x1b\\n\" +\n\t\"\\tis_pruned\\x18\\b \\x01(\\bR\\bisPruned\\x12%\\n\" +\n\t\"\\x0epruning_height\\x18\\t \\x01(\\rR\\rpruningHeight\\x12!\\n\" +\n\t\"\\fin_committee\\x18\\r \\x01(\\bR\\vinCommittee\\x12%\\n\" +\n\t\"\\x0ecommittee_size\\x18\\x0e \\x01(\\x05R\\rcommitteeSize\\x12#\\n\" +\n\t\"\\raverage_score\\x18\\x0f \\x01(\\x01R\\faverageScore\\\"\\x19\\n\" +\n\t\"\\x17GetCommitteeInfoRequest\\\"\\xec\\x02\\n\" +\n\t\"\\x18GetCommitteeInfoResponse\\x12%\\n\" +\n\t\"\\x0ecommittee_size\\x18\\x01 \\x01(\\x05R\\rcommitteeSize\\x12'\\n\" +\n\t\"\\x0fcommittee_power\\x18\\x02 \\x01(\\x03R\\x0ecommitteePower\\x12\\x1f\\n\" +\n\t\"\\vtotal_power\\x18\\x03 \\x01(\\x03R\\n\" +\n\t\"totalPower\\x125\\n\" +\n\t\"\\n\" +\n\t\"validators\\x18\\x04 \\x03(\\v2\\x15.pactus.ValidatorInfoR\\n\" +\n\t\"validators\\x12c\\n\" +\n\t\"\\x11protocol_versions\\x18\\x05 \\x03(\\v26.pactus.GetCommitteeInfoResponse.ProtocolVersionsEntryR\\x10protocolVersions\\x1aC\\n\" +\n\t\"\\x15ProtocolVersionsEntry\\x12\\x10\\n\" +\n\t\"\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12\\x14\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\x01R\\x05value:\\x028\\x01\\\"\\x19\\n\" +\n\t\"\\x17GetConsensusInfoRequest\\\"\\x81\\x01\\n\" +\n\t\"\\x18GetConsensusInfoResponse\\x120\\n\" +\n\t\"\\bproposal\\x18\\x01 \\x01(\\v2\\x14.pactus.ProposalInfoR\\bproposal\\x123\\n\" +\n\t\"\\tinstances\\x18\\x02 \\x03(\\v2\\x15.pactus.ConsensusInfoR\\tinstances\\\"Q\\n\" +\n\t\"\\x17GetTxPoolContentRequest\\x126\\n\" +\n\t\"\\fpayload_type\\x18\\x01 \\x01(\\x0e2\\x13.pactus.PayloadTypeR\\vpayloadType\\\"E\\n\" +\n\t\"\\x18GetTxPoolContentResponse\\x12)\\n\" +\n\t\"\\x03txs\\x18\\x01 \\x03(\\v2\\x17.pactus.TransactionInfoR\\x03txs\\\"\\xa1\\x04\\n\" +\n\t\"\\rValidatorInfo\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\x02 \\x01(\\tR\\x04data\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x03 \\x01(\\tR\\tpublicKey\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x04 \\x01(\\x05R\\x06number\\x12\\x14\\n\" +\n\t\"\\x05stake\\x18\\x05 \\x01(\\x03R\\x05stake\\x12.\\n\" +\n\t\"\\x13last_bonding_height\\x18\\x06 \\x01(\\rR\\x11lastBondingHeight\\x122\\n\" +\n\t\"\\x15last_sortition_height\\x18\\a \\x01(\\rR\\x13lastSortitionHeight\\x12)\\n\" +\n\t\"\\x10unbonding_height\\x18\\b \\x01(\\rR\\x0funbondingHeight\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\t \\x01(\\tR\\aaddress\\x12-\\n\" +\n\t\"\\x12availability_score\\x18\\n\" +\n\t\" \\x01(\\x01R\\x11availabilityScore\\x12)\\n\" +\n\t\"\\x10protocol_version\\x18\\v \\x01(\\x05R\\x0fprotocolVersion\\x12!\\n\" +\n\t\"\\fis_delegated\\x18\\f \\x01(\\bR\\visDelegated\\x12%\\n\" +\n\t\"\\x0edelegate_owner\\x18\\r \\x01(\\tR\\rdelegateOwner\\x12%\\n\" +\n\t\"\\x0edelegate_share\\x18\\x0e \\x01(\\x03R\\rdelegateShare\\x12'\\n\" +\n\t\"\\x0fdelegate_expiry\\x18\\x0f \\x01(\\rR\\x0edelegateExpiry\\\"\\x81\\x01\\n\" +\n\t\"\\vAccountInfo\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\x02 \\x01(\\tR\\x04data\\x12\\x16\\n\" +\n\t\"\\x06number\\x18\\x03 \\x01(\\x05R\\x06number\\x12\\x18\\n\" +\n\t\"\\abalance\\x18\\x04 \\x01(\\x03R\\abalance\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x05 \\x01(\\tR\\aaddress\\\"\\xc4\\x01\\n\" +\n\t\"\\x0fBlockHeaderInfo\\x12\\x18\\n\" +\n\t\"\\aversion\\x18\\x01 \\x01(\\x05R\\aversion\\x12&\\n\" +\n\t\"\\x0fprev_block_hash\\x18\\x02 \\x01(\\tR\\rprevBlockHash\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"state_root\\x18\\x03 \\x01(\\tR\\tstateRoot\\x12%\\n\" +\n\t\"\\x0esortition_seed\\x18\\x04 \\x01(\\tR\\rsortitionSeed\\x12)\\n\" +\n\t\"\\x10proposer_address\\x18\\x05 \\x01(\\tR\\x0fproposerAddress\\\"\\x97\\x01\\n\" +\n\t\"\\x0fCertificateInfo\\x12\\x12\\n\" +\n\t\"\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x14\\n\" +\n\t\"\\x05round\\x18\\x02 \\x01(\\x05R\\x05round\\x12\\x1e\\n\" +\n\t\"\\n\" +\n\t\"committers\\x18\\x03 \\x03(\\x05R\\n\" +\n\t\"committers\\x12\\x1c\\n\" +\n\t\"\\tabsentees\\x18\\x04 \\x03(\\x05R\\tabsentees\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x05 \\x01(\\tR\\tsignature\\\"\\xb1\\x01\\n\" +\n\t\"\\bVoteInfo\\x12$\\n\" +\n\t\"\\x04type\\x18\\x01 \\x01(\\x0e2\\x10.pactus.VoteTypeR\\x04type\\x12\\x14\\n\" +\n\t\"\\x05voter\\x18\\x02 \\x01(\\tR\\x05voter\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"block_hash\\x18\\x03 \\x01(\\tR\\tblockHash\\x12\\x14\\n\" +\n\t\"\\x05round\\x18\\x04 \\x01(\\x05R\\x05round\\x12\\x19\\n\" +\n\t\"\\bcp_round\\x18\\x05 \\x01(\\x05R\\acpRound\\x12\\x19\\n\" +\n\t\"\\bcp_value\\x18\\x06 \\x01(\\x05R\\acpValue\\\"\\x97\\x01\\n\" +\n\t\"\\rConsensusInfo\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\x12\\x16\\n\" +\n\t\"\\x06active\\x18\\x02 \\x01(\\bR\\x06active\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x03 \\x01(\\rR\\x06height\\x12\\x14\\n\" +\n\t\"\\x05round\\x18\\x04 \\x01(\\x05R\\x05round\\x12&\\n\" +\n\t\"\\x05votes\\x18\\x05 \\x03(\\v2\\x10.pactus.VoteInfoR\\x05votes\\\"y\\n\" +\n\t\"\\fProposalInfo\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x12\\x14\\n\" +\n\t\"\\x05round\\x18\\x02 \\x01(\\x05R\\x05round\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"block_data\\x18\\x03 \\x01(\\tR\\tblockData\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x04 \\x01(\\tR\\tsignature*f\\n\" +\n\t\"\\x0eBlockVerbosity\\x12\\x18\\n\" +\n\t\"\\x14BLOCK_VERBOSITY_DATA\\x10\\x00\\x12\\x18\\n\" +\n\t\"\\x14BLOCK_VERBOSITY_INFO\\x10\\x01\\x12 \\n\" +\n\t\"\\x1cBLOCK_VERBOSITY_TRANSACTIONS\\x10\\x02*\\xa6\\x01\\n\" +\n\t\"\\bVoteType\\x12\\x19\\n\" +\n\t\"\\x15VOTE_TYPE_UNSPECIFIED\\x10\\x00\\x12\\x15\\n\" +\n\t\"\\x11VOTE_TYPE_PREPARE\\x10\\x01\\x12\\x17\\n\" +\n\t\"\\x13VOTE_TYPE_PRECOMMIT\\x10\\x02\\x12\\x19\\n\" +\n\t\"\\x15VOTE_TYPE_CP_PRE_VOTE\\x10\\x03\\x12\\x1a\\n\" +\n\t\"\\x16VOTE_TYPE_CP_MAIN_VOTE\\x10\\x04\\x12\\x18\\n\" +\n\t\"\\x14VOTE_TYPE_CP_DECIDED\\x10\\x052\\xe2\\a\\n\" +\n\t\"\\n\" +\n\t\"Blockchain\\x12=\\n\" +\n\t\"\\bGetBlock\\x12\\x17.pactus.GetBlockRequest\\x1a\\x18.pactus.GetBlockResponse\\x12I\\n\" +\n\t\"\\fGetBlockHash\\x12\\x1b.pactus.GetBlockHashRequest\\x1a\\x1c.pactus.GetBlockHashResponse\\x12O\\n\" +\n\t\"\\x0eGetBlockHeight\\x12\\x1d.pactus.GetBlockHeightRequest\\x1a\\x1e.pactus.GetBlockHeightResponse\\x12X\\n\" +\n\t\"\\x11GetBlockchainInfo\\x12 .pactus.GetBlockchainInfoRequest\\x1a!.pactus.GetBlockchainInfoResponse\\x12U\\n\" +\n\t\"\\x10GetCommitteeInfo\\x12\\x1f.pactus.GetCommitteeInfoRequest\\x1a .pactus.GetCommitteeInfoResponse\\x12U\\n\" +\n\t\"\\x10GetConsensusInfo\\x12\\x1f.pactus.GetConsensusInfoRequest\\x1a .pactus.GetConsensusInfoResponse\\x12C\\n\" +\n\t\"\\n\" +\n\t\"GetAccount\\x12\\x19.pactus.GetAccountRequest\\x1a\\x1a.pactus.GetAccountResponse\\x12I\\n\" +\n\t\"\\fGetValidator\\x12\\x1b.pactus.GetValidatorRequest\\x1a\\x1c.pactus.GetValidatorResponse\\x12Y\\n\" +\n\t\"\\x14GetValidatorByNumber\\x12#.pactus.GetValidatorByNumberRequest\\x1a\\x1c.pactus.GetValidatorResponse\\x12d\\n\" +\n\t\"\\x15GetValidatorAddresses\\x12$.pactus.GetValidatorAddressesRequest\\x1a%.pactus.GetValidatorAddressesResponse\\x12I\\n\" +\n\t\"\\fGetPublicKey\\x12\\x1b.pactus.GetPublicKeyRequest\\x1a\\x1c.pactus.GetPublicKeyResponse\\x12U\\n\" +\n\t\"\\x10GetTxPoolContent\\x12\\x1f.pactus.GetTxPoolContentRequest\\x1a .pactus.GetTxPoolContentResponseB:\\n\" +\n\t\"\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3\"\n\nvar (\n\tfile_blockchain_proto_rawDescOnce sync.Once\n\tfile_blockchain_proto_rawDescData []byte\n)\n\nfunc file_blockchain_proto_rawDescGZIP() []byte {\n\tfile_blockchain_proto_rawDescOnce.Do(func() {\n\t\tfile_blockchain_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blockchain_proto_rawDesc), len(file_blockchain_proto_rawDesc)))\n\t})\n\treturn file_blockchain_proto_rawDescData\n}\n\nvar file_blockchain_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 31)\nvar file_blockchain_proto_goTypes = []any{\n\t(BlockVerbosity)(0),                   // 0: pactus.BlockVerbosity\n\t(VoteType)(0),                         // 1: pactus.VoteType\n\t(*GetAccountRequest)(nil),             // 2: pactus.GetAccountRequest\n\t(*GetAccountResponse)(nil),            // 3: pactus.GetAccountResponse\n\t(*GetValidatorAddressesRequest)(nil),  // 4: pactus.GetValidatorAddressesRequest\n\t(*GetValidatorAddressesResponse)(nil), // 5: pactus.GetValidatorAddressesResponse\n\t(*GetValidatorRequest)(nil),           // 6: pactus.GetValidatorRequest\n\t(*GetValidatorByNumberRequest)(nil),   // 7: pactus.GetValidatorByNumberRequest\n\t(*GetValidatorResponse)(nil),          // 8: pactus.GetValidatorResponse\n\t(*GetPublicKeyRequest)(nil),           // 9: pactus.GetPublicKeyRequest\n\t(*GetPublicKeyResponse)(nil),          // 10: pactus.GetPublicKeyResponse\n\t(*GetBlockRequest)(nil),               // 11: pactus.GetBlockRequest\n\t(*GetBlockResponse)(nil),              // 12: pactus.GetBlockResponse\n\t(*GetBlockHashRequest)(nil),           // 13: pactus.GetBlockHashRequest\n\t(*GetBlockHashResponse)(nil),          // 14: pactus.GetBlockHashResponse\n\t(*GetBlockHeightRequest)(nil),         // 15: pactus.GetBlockHeightRequest\n\t(*GetBlockHeightResponse)(nil),        // 16: pactus.GetBlockHeightResponse\n\t(*GetBlockchainInfoRequest)(nil),      // 17: pactus.GetBlockchainInfoRequest\n\t(*GetBlockchainInfoResponse)(nil),     // 18: pactus.GetBlockchainInfoResponse\n\t(*GetCommitteeInfoRequest)(nil),       // 19: pactus.GetCommitteeInfoRequest\n\t(*GetCommitteeInfoResponse)(nil),      // 20: pactus.GetCommitteeInfoResponse\n\t(*GetConsensusInfoRequest)(nil),       // 21: pactus.GetConsensusInfoRequest\n\t(*GetConsensusInfoResponse)(nil),      // 22: pactus.GetConsensusInfoResponse\n\t(*GetTxPoolContentRequest)(nil),       // 23: pactus.GetTxPoolContentRequest\n\t(*GetTxPoolContentResponse)(nil),      // 24: pactus.GetTxPoolContentResponse\n\t(*ValidatorInfo)(nil),                 // 25: pactus.ValidatorInfo\n\t(*AccountInfo)(nil),                   // 26: pactus.AccountInfo\n\t(*BlockHeaderInfo)(nil),               // 27: pactus.BlockHeaderInfo\n\t(*CertificateInfo)(nil),               // 28: pactus.CertificateInfo\n\t(*VoteInfo)(nil),                      // 29: pactus.VoteInfo\n\t(*ConsensusInfo)(nil),                 // 30: pactus.ConsensusInfo\n\t(*ProposalInfo)(nil),                  // 31: pactus.ProposalInfo\n\tnil,                                   // 32: pactus.GetCommitteeInfoResponse.ProtocolVersionsEntry\n\t(*TransactionInfo)(nil),               // 33: pactus.TransactionInfo\n\t(PayloadType)(0),                      // 34: pactus.PayloadType\n}\nvar file_blockchain_proto_depIdxs = []int32{\n\t26, // 0: pactus.GetAccountResponse.account:type_name -> pactus.AccountInfo\n\t25, // 1: pactus.GetValidatorResponse.validator:type_name -> pactus.ValidatorInfo\n\t0,  // 2: pactus.GetBlockRequest.verbosity:type_name -> pactus.BlockVerbosity\n\t27, // 3: pactus.GetBlockResponse.header:type_name -> pactus.BlockHeaderInfo\n\t28, // 4: pactus.GetBlockResponse.prev_cert:type_name -> pactus.CertificateInfo\n\t33, // 5: pactus.GetBlockResponse.txs:type_name -> pactus.TransactionInfo\n\t25, // 6: pactus.GetCommitteeInfoResponse.validators:type_name -> pactus.ValidatorInfo\n\t32, // 7: pactus.GetCommitteeInfoResponse.protocol_versions:type_name -> pactus.GetCommitteeInfoResponse.ProtocolVersionsEntry\n\t31, // 8: pactus.GetConsensusInfoResponse.proposal:type_name -> pactus.ProposalInfo\n\t30, // 9: pactus.GetConsensusInfoResponse.instances:type_name -> pactus.ConsensusInfo\n\t34, // 10: pactus.GetTxPoolContentRequest.payload_type:type_name -> pactus.PayloadType\n\t33, // 11: pactus.GetTxPoolContentResponse.txs:type_name -> pactus.TransactionInfo\n\t1,  // 12: pactus.VoteInfo.type:type_name -> pactus.VoteType\n\t29, // 13: pactus.ConsensusInfo.votes:type_name -> pactus.VoteInfo\n\t11, // 14: pactus.Blockchain.GetBlock:input_type -> pactus.GetBlockRequest\n\t13, // 15: pactus.Blockchain.GetBlockHash:input_type -> pactus.GetBlockHashRequest\n\t15, // 16: pactus.Blockchain.GetBlockHeight:input_type -> pactus.GetBlockHeightRequest\n\t17, // 17: pactus.Blockchain.GetBlockchainInfo:input_type -> pactus.GetBlockchainInfoRequest\n\t19, // 18: pactus.Blockchain.GetCommitteeInfo:input_type -> pactus.GetCommitteeInfoRequest\n\t21, // 19: pactus.Blockchain.GetConsensusInfo:input_type -> pactus.GetConsensusInfoRequest\n\t2,  // 20: pactus.Blockchain.GetAccount:input_type -> pactus.GetAccountRequest\n\t6,  // 21: pactus.Blockchain.GetValidator:input_type -> pactus.GetValidatorRequest\n\t7,  // 22: pactus.Blockchain.GetValidatorByNumber:input_type -> pactus.GetValidatorByNumberRequest\n\t4,  // 23: pactus.Blockchain.GetValidatorAddresses:input_type -> pactus.GetValidatorAddressesRequest\n\t9,  // 24: pactus.Blockchain.GetPublicKey:input_type -> pactus.GetPublicKeyRequest\n\t23, // 25: pactus.Blockchain.GetTxPoolContent:input_type -> pactus.GetTxPoolContentRequest\n\t12, // 26: pactus.Blockchain.GetBlock:output_type -> pactus.GetBlockResponse\n\t14, // 27: pactus.Blockchain.GetBlockHash:output_type -> pactus.GetBlockHashResponse\n\t16, // 28: pactus.Blockchain.GetBlockHeight:output_type -> pactus.GetBlockHeightResponse\n\t18, // 29: pactus.Blockchain.GetBlockchainInfo:output_type -> pactus.GetBlockchainInfoResponse\n\t20, // 30: pactus.Blockchain.GetCommitteeInfo:output_type -> pactus.GetCommitteeInfoResponse\n\t22, // 31: pactus.Blockchain.GetConsensusInfo:output_type -> pactus.GetConsensusInfoResponse\n\t3,  // 32: pactus.Blockchain.GetAccount:output_type -> pactus.GetAccountResponse\n\t8,  // 33: pactus.Blockchain.GetValidator:output_type -> pactus.GetValidatorResponse\n\t8,  // 34: pactus.Blockchain.GetValidatorByNumber:output_type -> pactus.GetValidatorResponse\n\t5,  // 35: pactus.Blockchain.GetValidatorAddresses:output_type -> pactus.GetValidatorAddressesResponse\n\t10, // 36: pactus.Blockchain.GetPublicKey:output_type -> pactus.GetPublicKeyResponse\n\t24, // 37: pactus.Blockchain.GetTxPoolContent:output_type -> pactus.GetTxPoolContentResponse\n\t26, // [26:38] is the sub-list for method output_type\n\t14, // [14:26] is the sub-list for method input_type\n\t14, // [14:14] is the sub-list for extension type_name\n\t14, // [14:14] is the sub-list for extension extendee\n\t0,  // [0:14] is the sub-list for field type_name\n}\n\nfunc init() { file_blockchain_proto_init() }\nfunc file_blockchain_proto_init() {\n\tif File_blockchain_proto != nil {\n\t\treturn\n\t}\n\tfile_transaction_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_blockchain_proto_rawDesc), len(file_blockchain_proto_rawDesc)),\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   31,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_blockchain_proto_goTypes,\n\t\tDependencyIndexes: file_blockchain_proto_depIdxs,\n\t\tEnumInfos:         file_blockchain_proto_enumTypes,\n\t\tMessageInfos:      file_blockchain_proto_msgTypes,\n\t}.Build()\n\tFile_blockchain_proto = out.File\n\tfile_blockchain_proto_goTypes = nil\n\tfile_blockchain_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "www/grpc/gen/go/blockchain.pb.gw.go",
    "content": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: blockchain.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into RESTful JSON APIs.\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/utilities\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// Suppress \"imported and not used\" errors\nvar (\n\t_ codes.Code\n\t_ io.Reader\n\t_ status.Status\n\t_ = errors.New\n\t_ = runtime.String\n\t_ = utilities.NewDoubleArray\n\t_ = metadata.Join\n)\n\nvar filter_Blockchain_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetBlock(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetBlockHash_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockHashRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetBlockHash(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockHashRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetBlockHash(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetBlockHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockHeightRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetBlockHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockHeightRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetBlockHeight(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockchainInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetBlockchainInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetBlockchainInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetBlockchainInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Blockchain_GetCommitteeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetCommitteeInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetCommitteeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetCommitteeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetCommitteeInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetCommitteeInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetConsensusInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetConsensusInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetConsensusInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetConsensusInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetAccountRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetAccountRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetAccount(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetValidator_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetValidator(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetValidatorByNumber_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorByNumberRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetValidatorByNumber(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorByNumberRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetValidatorByNumber(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Blockchain_GetValidatorAddresses_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorAddressesRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetValidatorAddresses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetValidatorAddresses_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorAddressesRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetValidatorAddresses(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetPublicKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetPublicKeyRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetPublicKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetPublicKeyRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetPublicKey(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Blockchain_GetTxPoolContent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTxPoolContentRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetTxPoolContent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTxPoolContentRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetTxPoolContent(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\n// RegisterBlockchainHandlerServer registers the http handlers for service Blockchain to \"mux\".\n// UnaryRPC     :call BlockchainServer directly.\n// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.\n// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead.\n// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the \"runtime.WithMiddlewares\" option in the \"runtime.NewServeMux\" call.\nfunc RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error {\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetBlock\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockHash\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block_hash\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockHeight\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block_height\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockchainInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_blockchain_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetCommitteeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetCommitteeInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_committee_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetCommitteeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetCommitteeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetConsensusInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_consensus_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetAccount\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_account\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetValidator\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetValidatorByNumber\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator_by_number\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidatorAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetValidatorAddresses\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator_addresses\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetValidatorAddresses_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidatorAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetPublicKey\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_public_key\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Blockchain/GetTxPoolContent\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_txpool_content\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\n\treturn nil\n}\n\n// RegisterBlockchainHandlerFromEndpoint is same as RegisterBlockchainHandler but\n// automatically dials to \"endpoint\" and closes the connection when \"ctx\" gets done.\nfunc RegisterBlockchainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {\n\tconn, err := grpc.NewClient(endpoint, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tgo func() {\n\t\t\t<-ctx.Done()\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t}()\n\t}()\n\treturn RegisterBlockchainHandler(ctx, mux, conn)\n}\n\n// RegisterBlockchainHandler registers the http handlers for service Blockchain to \"mux\".\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {\n\treturn RegisterBlockchainHandlerClient(ctx, mux, NewBlockchainClient(conn))\n}\n\n// RegisterBlockchainHandlerClient registers the http handlers for service Blockchain\n// to \"mux\". The handlers forward requests to the grpc endpoint over the given implementation of \"BlockchainClient\".\n// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in \"BlockchainClient\"\n// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in\n// \"BlockchainClient\" to call the correct interceptors. This client ignores the HTTP middlewares.\nfunc RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error {\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetBlock\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockHash\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block_hash\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockHeight\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_block_height\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetBlockchainInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_blockchain_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetCommitteeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetCommitteeInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_committee_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetCommitteeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetCommitteeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetConsensusInfo\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_consensus_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetAccount\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_account\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetValidator\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetValidatorByNumber\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator_by_number\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetValidatorAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetValidatorAddresses\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_validator_addresses\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetValidatorAddresses_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetValidatorAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetPublicKey\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_public_key\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Blockchain/GetTxPoolContent\", runtime.WithHTTPPathPattern(\"/pactus/blockchain/get_txpool_content\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\treturn nil\n}\n\nvar (\n\tpattern_Blockchain_GetBlock_0              = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_block\"}, \"\"))\n\tpattern_Blockchain_GetBlockHash_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_block_hash\"}, \"\"))\n\tpattern_Blockchain_GetBlockHeight_0        = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_block_height\"}, \"\"))\n\tpattern_Blockchain_GetBlockchainInfo_0     = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_blockchain_info\"}, \"\"))\n\tpattern_Blockchain_GetCommitteeInfo_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_committee_info\"}, \"\"))\n\tpattern_Blockchain_GetConsensusInfo_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_consensus_info\"}, \"\"))\n\tpattern_Blockchain_GetAccount_0            = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_account\"}, \"\"))\n\tpattern_Blockchain_GetValidator_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_validator\"}, \"\"))\n\tpattern_Blockchain_GetValidatorByNumber_0  = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_validator_by_number\"}, \"\"))\n\tpattern_Blockchain_GetValidatorAddresses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_validator_addresses\"}, \"\"))\n\tpattern_Blockchain_GetPublicKey_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_public_key\"}, \"\"))\n\tpattern_Blockchain_GetTxPoolContent_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"blockchain\", \"get_txpool_content\"}, \"\"))\n)\n\nvar (\n\tforward_Blockchain_GetBlock_0              = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetBlockHash_0          = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetBlockHeight_0        = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetBlockchainInfo_0     = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetCommitteeInfo_0      = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetConsensusInfo_0      = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetAccount_0            = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetValidator_0          = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetValidatorByNumber_0  = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetValidatorAddresses_0 = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetPublicKey_0          = runtime.ForwardResponseMessage\n\tforward_Blockchain_GetTxPoolContent_0      = runtime.ForwardResponseMessage\n)\n"
  },
  {
    "path": "www/grpc/gen/go/blockchain_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.6.0\n// - protoc             (unknown)\n// source: blockchain.proto\n\npackage pactus\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.64.0 or later.\nconst _ = grpc.SupportPackageIsVersion9\n\nconst (\n\tBlockchain_GetBlock_FullMethodName              = \"/pactus.Blockchain/GetBlock\"\n\tBlockchain_GetBlockHash_FullMethodName          = \"/pactus.Blockchain/GetBlockHash\"\n\tBlockchain_GetBlockHeight_FullMethodName        = \"/pactus.Blockchain/GetBlockHeight\"\n\tBlockchain_GetBlockchainInfo_FullMethodName     = \"/pactus.Blockchain/GetBlockchainInfo\"\n\tBlockchain_GetCommitteeInfo_FullMethodName      = \"/pactus.Blockchain/GetCommitteeInfo\"\n\tBlockchain_GetConsensusInfo_FullMethodName      = \"/pactus.Blockchain/GetConsensusInfo\"\n\tBlockchain_GetAccount_FullMethodName            = \"/pactus.Blockchain/GetAccount\"\n\tBlockchain_GetValidator_FullMethodName          = \"/pactus.Blockchain/GetValidator\"\n\tBlockchain_GetValidatorByNumber_FullMethodName  = \"/pactus.Blockchain/GetValidatorByNumber\"\n\tBlockchain_GetValidatorAddresses_FullMethodName = \"/pactus.Blockchain/GetValidatorAddresses\"\n\tBlockchain_GetPublicKey_FullMethodName          = \"/pactus.Blockchain/GetPublicKey\"\n\tBlockchain_GetTxPoolContent_FullMethodName      = \"/pactus.Blockchain/GetTxPoolContent\"\n)\n\n// BlockchainClient is the client API for Blockchain service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\n//\n// Blockchain service defines RPC methods for interacting with the blockchain.\ntype BlockchainClient interface {\n\t// GetBlock retrieves information about a block based on the provided request parameters.\n\tGetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)\n\t// GetBlockHash retrieves the hash of a block at the specified height.\n\tGetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error)\n\t// GetBlockHeight retrieves the height of a block with the specified hash.\n\tGetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error)\n\t// GetBlockchainInfo retrieves general information about the blockchain.\n\tGetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error)\n\t// GetCommitteeInfo retrieves information about the current committee.\n\tGetCommitteeInfo(ctx context.Context, in *GetCommitteeInfoRequest, opts ...grpc.CallOption) (*GetCommitteeInfoResponse, error)\n\t// GetConsensusInfo retrieves information about the consensus instances.\n\tGetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error)\n\t// GetAccount retrieves information about an account based on the provided address.\n\tGetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)\n\t// GetValidator retrieves information about a validator based on the provided address.\n\tGetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error)\n\t// GetValidatorByNumber retrieves information about a validator based on the provided number.\n\tGetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error)\n\t// GetValidatorAddresses retrieves a list of all validator addresses.\n\tGetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error)\n\t// GetPublicKey retrieves the public key of an account based on the provided address.\n\tGetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error)\n\t// GetTxPoolContent retrieves current transactions in the transaction pool.\n\tGetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error)\n}\n\ntype blockchainClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewBlockchainClient(cc grpc.ClientConnInterface) BlockchainClient {\n\treturn &blockchainClient{cc}\n}\n\nfunc (c *blockchainClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetBlockResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetBlock_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetBlockHashResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetBlockHash_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetBlockHeightResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetBlockHeight_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetBlockchainInfoResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetBlockchainInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetCommitteeInfo(ctx context.Context, in *GetCommitteeInfoRequest, opts ...grpc.CallOption) (*GetCommitteeInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetCommitteeInfoResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetCommitteeInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetConsensusInfoResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetConsensusInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetAccountResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetAccount_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetValidatorResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetValidator_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetValidatorResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetValidatorByNumber_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetValidatorAddressesResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetValidatorAddresses_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetPublicKeyResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetPublicKey_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetTxPoolContentResponse)\n\terr := c.cc.Invoke(ctx, Blockchain_GetTxPoolContent_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// BlockchainServer is the server API for Blockchain service.\n// All implementations should embed UnimplementedBlockchainServer\n// for forward compatibility.\n//\n// Blockchain service defines RPC methods for interacting with the blockchain.\ntype BlockchainServer interface {\n\t// GetBlock retrieves information about a block based on the provided request parameters.\n\tGetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error)\n\t// GetBlockHash retrieves the hash of a block at the specified height.\n\tGetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error)\n\t// GetBlockHeight retrieves the height of a block with the specified hash.\n\tGetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error)\n\t// GetBlockchainInfo retrieves general information about the blockchain.\n\tGetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error)\n\t// GetCommitteeInfo retrieves information about the current committee.\n\tGetCommitteeInfo(context.Context, *GetCommitteeInfoRequest) (*GetCommitteeInfoResponse, error)\n\t// GetConsensusInfo retrieves information about the consensus instances.\n\tGetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error)\n\t// GetAccount retrieves information about an account based on the provided address.\n\tGetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)\n\t// GetValidator retrieves information about a validator based on the provided address.\n\tGetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error)\n\t// GetValidatorByNumber retrieves information about a validator based on the provided number.\n\tGetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error)\n\t// GetValidatorAddresses retrieves a list of all validator addresses.\n\tGetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error)\n\t// GetPublicKey retrieves the public key of an account based on the provided address.\n\tGetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error)\n\t// GetTxPoolContent retrieves current transactions in the transaction pool.\n\tGetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error)\n}\n\n// UnimplementedBlockchainServer should be embedded to have\n// forward compatible implementations.\n//\n// NOTE: this should be embedded by value instead of pointer to avoid a nil\n// pointer dereference when methods are called.\ntype UnimplementedBlockchainServer struct{}\n\nfunc (UnimplementedBlockchainServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetBlock not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetBlockHash not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetBlockHeight not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetBlockchainInfo not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetCommitteeInfo(context.Context, *GetCommitteeInfoRequest) (*GetCommitteeInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetCommitteeInfo not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetConsensusInfo not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetAccount not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetValidator not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetValidatorByNumber not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetValidatorAddresses not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetPublicKey not implemented\")\n}\nfunc (UnimplementedBlockchainServer) GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetTxPoolContent not implemented\")\n}\nfunc (UnimplementedBlockchainServer) testEmbeddedByValue() {}\n\n// UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to BlockchainServer will\n// result in compilation errors.\ntype UnsafeBlockchainServer interface {\n\tmustEmbedUnimplementedBlockchainServer()\n}\n\nfunc RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer) {\n\t// If the following call panics, it indicates UnimplementedBlockchainServer was\n\t// embedded by pointer and is nil.  This will cause panics if an\n\t// unimplemented method is ever invoked, so we test this at initialization\n\t// time to prevent it from happening at runtime later due to I/O.\n\tif t, ok := srv.(interface{ testEmbeddedByValue() }); ok {\n\t\tt.testEmbeddedByValue()\n\t}\n\ts.RegisterService(&Blockchain_ServiceDesc, srv)\n}\n\nfunc _Blockchain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetBlockRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetBlock(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetBlock_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetBlock(ctx, req.(*GetBlockRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetBlockHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetBlockHashRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetBlockHash(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetBlockHash_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetBlockHash(ctx, req.(*GetBlockHashRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetBlockHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetBlockHeightRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetBlockHeight(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetBlockHeight_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetBlockHeight(ctx, req.(*GetBlockHeightRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetBlockchainInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetBlockchainInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetBlockchainInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetBlockchainInfo(ctx, req.(*GetBlockchainInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetCommitteeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetCommitteeInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetCommitteeInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetCommitteeInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetCommitteeInfo(ctx, req.(*GetCommitteeInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetConsensusInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetConsensusInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetConsensusInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetConsensusInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetConsensusInfo(ctx, req.(*GetConsensusInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetAccountRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetAccount(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetAccount_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetAccount(ctx, req.(*GetAccountRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetValidatorRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetValidator(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetValidator_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetValidator(ctx, req.(*GetValidatorRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetValidatorByNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetValidatorByNumberRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetValidatorByNumber(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetValidatorByNumber_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetValidatorByNumber(ctx, req.(*GetValidatorByNumberRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetValidatorAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetValidatorAddressesRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetValidatorAddresses(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetValidatorAddresses_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetValidatorAddresses(ctx, req.(*GetValidatorAddressesRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetPublicKeyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetPublicKey(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetPublicKey_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetPublicKey(ctx, req.(*GetPublicKeyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Blockchain_GetTxPoolContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetTxPoolContentRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(BlockchainServer).GetTxPoolContent(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Blockchain_GetTxPoolContent_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(BlockchainServer).GetTxPoolContent(ctx, req.(*GetTxPoolContentRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// Blockchain_ServiceDesc is the grpc.ServiceDesc for Blockchain service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar Blockchain_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"pactus.Blockchain\",\n\tHandlerType: (*BlockchainServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"GetBlock\",\n\t\t\tHandler:    _Blockchain_GetBlock_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetBlockHash\",\n\t\t\tHandler:    _Blockchain_GetBlockHash_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetBlockHeight\",\n\t\t\tHandler:    _Blockchain_GetBlockHeight_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetBlockchainInfo\",\n\t\t\tHandler:    _Blockchain_GetBlockchainInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetCommitteeInfo\",\n\t\t\tHandler:    _Blockchain_GetCommitteeInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetConsensusInfo\",\n\t\t\tHandler:    _Blockchain_GetConsensusInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetAccount\",\n\t\t\tHandler:    _Blockchain_GetAccount_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetValidator\",\n\t\t\tHandler:    _Blockchain_GetValidator_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetValidatorByNumber\",\n\t\t\tHandler:    _Blockchain_GetValidatorByNumber_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetValidatorAddresses\",\n\t\t\tHandler:    _Blockchain_GetValidatorAddresses_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetPublicKey\",\n\t\t\tHandler:    _Blockchain_GetPublicKey_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetTxPoolContent\",\n\t\t\tHandler:    _Blockchain_GetTxPoolContent_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"blockchain.proto\",\n}\n"
  },
  {
    "path": "www/grpc/gen/go/blockchain_jgw.pb.go",
    "content": "// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT.\n// source: blockchain.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into JSON-RPC 2.0\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\ntype BlockchainJsonRPC struct {\n\tclient BlockchainClient\n}\n\ntype paramsAndHeadersBlockchain struct {\n\tHeaders metadata.MD     `json:\"headers,omitempty\"`\n\tParams  json.RawMessage `json:\"params\"`\n}\n\n// RegisterBlockchainJsonRPC register the grpc client Blockchain for json-rpc.\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterBlockchainJsonRPC(conn *grpc.ClientConn) *BlockchainJsonRPC {\n\treturn &BlockchainJsonRPC{\n\t\tclient: NewBlockchainClient(conn),\n\t}\n}\n\nfunc (s *BlockchainJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) {\n\treturn map[string]func(ctx context.Context, params json.RawMessage) (any, error){\n\n\t\t\"pactus.blockchain.get_block\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetBlockRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetBlock(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_block_hash\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetBlockHashRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetBlockHash(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_block_height\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetBlockHeightRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetBlockHeight(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_blockchain_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetBlockchainInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetBlockchainInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_committee_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetCommitteeInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetCommitteeInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_consensus_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetConsensusInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetConsensusInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_account\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetAccountRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetAccount(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_validator\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetValidatorRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetValidator(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_validator_by_number\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetValidatorByNumberRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetValidatorByNumber(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_validator_addresses\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetValidatorAddressesRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetValidatorAddresses(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_public_key\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetPublicKeyRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetPublicKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.blockchain.get_tx_pool_content\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetTxPoolContentRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersBlockchain\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetTxPoolContent(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "www/grpc/gen/go/network.cobra.pb.go",
    "content": "// Code generated by protoc-gen-cobra. DO NOT EDIT.\n\npackage pactus\n\nimport (\n\tclient \"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\tflag \"github.com/NathanBaulch/protoc-gen-cobra/flag\"\n\tiocodec \"github.com/NathanBaulch/protoc-gen-cobra/iocodec\"\n\tcobra \"github.com/spf13/cobra\"\n\tgrpc \"google.golang.org/grpc\"\n\tproto \"google.golang.org/protobuf/proto\"\n)\n\nfunc NetworkClientCommand(options ...client.Option) *cobra.Command {\n\tcfg := client.NewConfig(options...)\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Network\"),\n\t\tShort: \"Network service client\",\n\t\tLong:  \"Network service provides RPCs for retrieving information about the network.\",\n\t}\n\tcfg.BindFlags(cmd.PersistentFlags())\n\tcmd.AddCommand(\n\t\t_NetworkGetNetworkInfoCommand(cfg),\n\t\t_NetworkListPeersCommand(cfg),\n\t\t_NetworkGetNodeInfoCommand(cfg),\n\t\t_NetworkPingCommand(cfg),\n\t)\n\treturn cmd\n}\n\nfunc _NetworkGetNetworkInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetNetworkInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetNetworkInfo\"),\n\t\tShort: \"GetNetworkInfo RPC client\",\n\t\tLong:  \"GetNetworkInfo retrieves information about the overall network.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\", \"GetNetworkInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewNetworkClient(cc)\n\t\t\t\tv := &GetNetworkInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetNetworkInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _NetworkListPeersCommand(cfg *client.Config) *cobra.Command {\n\treq := &ListPeersRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"ListPeers\"),\n\t\tShort: \"ListPeers RPC client\",\n\t\tLong:  \"ListPeers lists all peers in the network.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\", \"ListPeers\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewNetworkClient(cc)\n\t\t\t\tv := &ListPeersRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.ListPeers(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().BoolVar(&req.IncludeDisconnected, cfg.FlagNamer(\"IncludeDisconnected\"), false, \"If true, includes disconnected peers (default: connected peers only).\")\n\n\treturn cmd\n}\n\nfunc _NetworkGetNodeInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetNodeInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetNodeInfo\"),\n\t\tShort: \"GetNodeInfo RPC client\",\n\t\tLong:  \"GetNodeInfo retrieves information about a specific node in the network.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\", \"GetNodeInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewNetworkClient(cc)\n\t\t\t\tv := &GetNodeInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetNodeInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _NetworkPingCommand(cfg *client.Config) *cobra.Command {\n\treq := &PingRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Ping\"),\n\t\tShort: \"Ping RPC client\",\n\t\tLong:  \"Ping provides a simple connectivity test and latency measurement.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Network\", \"Ping\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewNetworkClient(cc)\n\t\t\t\tv := &PingRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.Ping(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n"
  },
  {
    "path": "www/grpc/gen/go/network.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.11\n// \tprotoc        (unknown)\n// source: network.proto\n\npackage pactus\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Direction represents the connection direction between peers.\ntype Direction int32\n\nconst (\n\t// Unknown direction (default value).\n\tDirection_DIRECTION_UNKNOWN Direction = 0\n\t// Inbound connection - peer connected to us.\n\tDirection_DIRECTION_INBOUND Direction = 1\n\t// Outbound connection - we connected to peer.\n\tDirection_DIRECTION_OUTBOUND Direction = 2\n)\n\n// Enum value maps for Direction.\nvar (\n\tDirection_name = map[int32]string{\n\t\t0: \"DIRECTION_UNKNOWN\",\n\t\t1: \"DIRECTION_INBOUND\",\n\t\t2: \"DIRECTION_OUTBOUND\",\n\t}\n\tDirection_value = map[string]int32{\n\t\t\"DIRECTION_UNKNOWN\":  0,\n\t\t\"DIRECTION_INBOUND\":  1,\n\t\t\"DIRECTION_OUTBOUND\": 2,\n\t}\n)\n\nfunc (x Direction) Enum() *Direction {\n\tp := new(Direction)\n\t*p = x\n\treturn p\n}\n\nfunc (x Direction) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (Direction) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_network_proto_enumTypes[0].Descriptor()\n}\n\nfunc (Direction) Type() protoreflect.EnumType {\n\treturn &file_network_proto_enumTypes[0]\n}\n\nfunc (x Direction) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use Direction.Descriptor instead.\nfunc (Direction) EnumDescriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{0}\n}\n\n// Request message for retrieving overall network information.\ntype GetNetworkInfoRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNetworkInfoRequest) Reset() {\n\t*x = GetNetworkInfoRequest{}\n\tmi := &file_network_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNetworkInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNetworkInfoRequest) ProtoMessage() {}\n\nfunc (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNetworkInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetNetworkInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{0}\n}\n\n// Response message contains information about the overall network.\ntype GetNetworkInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Name of the P2P network.\n\tNetworkName string `protobuf:\"bytes,1,opt,name=network_name,json=networkName,proto3\" json:\"network_name,omitempty\"`\n\t// Number of connected peers.\n\tConnectedPeersCount uint32 `protobuf:\"varint,2,opt,name=connected_peers_count,json=connectedPeersCount,proto3\" json:\"connected_peers_count,omitempty\"`\n\t// Metrics related to node activity.\n\tMetricInfo    *MetricInfo `protobuf:\"bytes,4,opt,name=metric_info,json=metricInfo,proto3\" json:\"metric_info,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNetworkInfoResponse) Reset() {\n\t*x = GetNetworkInfoResponse{}\n\tmi := &file_network_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNetworkInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNetworkInfoResponse) ProtoMessage() {}\n\nfunc (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNetworkInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetNetworkInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *GetNetworkInfoResponse) GetNetworkName() string {\n\tif x != nil {\n\t\treturn x.NetworkName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNetworkInfoResponse) GetConnectedPeersCount() uint32 {\n\tif x != nil {\n\t\treturn x.ConnectedPeersCount\n\t}\n\treturn 0\n}\n\nfunc (x *GetNetworkInfoResponse) GetMetricInfo() *MetricInfo {\n\tif x != nil {\n\t\treturn x.MetricInfo\n\t}\n\treturn nil\n}\n\n// Request message for listing peers.\ntype ListPeersRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// If true, includes disconnected peers (default: connected peers only).\n\tIncludeDisconnected bool `protobuf:\"varint,1,opt,name=include_disconnected,json=includeDisconnected,proto3\" json:\"include_disconnected,omitempty\"`\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\nfunc (x *ListPeersRequest) Reset() {\n\t*x = ListPeersRequest{}\n\tmi := &file_network_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListPeersRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListPeersRequest) ProtoMessage() {}\n\nfunc (x *ListPeersRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListPeersRequest.ProtoReflect.Descriptor instead.\nfunc (*ListPeersRequest) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *ListPeersRequest) GetIncludeDisconnected() bool {\n\tif x != nil {\n\t\treturn x.IncludeDisconnected\n\t}\n\treturn false\n}\n\n// Response message for listing peers.\ntype ListPeersResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// List of peers.\n\tPeers         []*PeerInfo `protobuf:\"bytes,1,rep,name=peers,proto3\" json:\"peers,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListPeersResponse) Reset() {\n\t*x = ListPeersResponse{}\n\tmi := &file_network_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListPeersResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListPeersResponse) ProtoMessage() {}\n\nfunc (x *ListPeersResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListPeersResponse.ProtoReflect.Descriptor instead.\nfunc (*ListPeersResponse) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *ListPeersResponse) GetPeers() []*PeerInfo {\n\tif x != nil {\n\t\treturn x.Peers\n\t}\n\treturn nil\n}\n\n// Request message for retrieving information of the node.\ntype GetNodeInfoRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNodeInfoRequest) Reset() {\n\t*x = GetNodeInfoRequest{}\n\tmi := &file_network_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNodeInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNodeInfoRequest) ProtoMessage() {}\n\nfunc (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetNodeInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{4}\n}\n\n// Response message contains information about a specific node in the network.\ntype GetNodeInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Moniker or Human-readable name identifying this node in the network.\n\tMoniker string `protobuf:\"bytes,1,opt,name=moniker,proto3\" json:\"moniker,omitempty\"`\n\t// Version and agent details of the node.\n\tAgent string `protobuf:\"bytes,2,opt,name=agent,proto3\" json:\"agent,omitempty\"`\n\t// Peer ID of the node.\n\tPeerId string `protobuf:\"bytes,3,opt,name=peer_id,json=peerId,proto3\" json:\"peer_id,omitempty\"`\n\t// Unix timestamp when the node was started (UTC).\n\tStartedAt uint64 `protobuf:\"varint,4,opt,name=started_at,json=startedAt,proto3\" json:\"started_at,omitempty\"`\n\t// Reachability status of the node.\n\tReachability string `protobuf:\"bytes,5,opt,name=reachability,proto3\" json:\"reachability,omitempty\"`\n\t// Bitfield representing the services provided by the node.\n\tServices int32 `protobuf:\"varint,6,opt,name=services,proto3\" json:\"services,omitempty\"`\n\t// Names of services provided by the node.\n\tServicesNames string `protobuf:\"bytes,7,opt,name=services_names,json=servicesNames,proto3\" json:\"services_names,omitempty\"`\n\t// List of addresses associated with the node.\n\tLocalAddrs []string `protobuf:\"bytes,8,rep,name=local_addrs,json=localAddrs,proto3\" json:\"local_addrs,omitempty\"`\n\t// List of protocols supported by the node.\n\tProtocols []string `protobuf:\"bytes,9,rep,name=protocols,proto3\" json:\"protocols,omitempty\"`\n\t// Offset between the node's clock and the network's clock (in seconds).\n\tClockOffset float64 `protobuf:\"fixed64,13,opt,name=clock_offset,json=clockOffset,proto3\" json:\"clock_offset,omitempty\"`\n\t// Information about the node's connections.\n\tConnectionInfo *ConnectionInfo `protobuf:\"bytes,14,opt,name=connection_info,json=connectionInfo,proto3\" json:\"connection_info,omitempty\"`\n\t// List of active ZeroMQ publishers.\n\tZmqPublishers []*ZMQPublisherInfo `protobuf:\"bytes,15,rep,name=zmq_publishers,json=zmqPublishers,proto3\" json:\"zmq_publishers,omitempty\"`\n\t// Current Unix timestamp of the node (UTC).\n\tCurrentTime uint64 `protobuf:\"varint,16,opt,name=current_time,json=currentTime,proto3\" json:\"current_time,omitempty\"`\n\t// Name of the P2P network.\n\tNetworkName   string `protobuf:\"bytes,17,opt,name=network_name,json=networkName,proto3\" json:\"network_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNodeInfoResponse) Reset() {\n\t*x = GetNodeInfoResponse{}\n\tmi := &file_network_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNodeInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNodeInfoResponse) ProtoMessage() {}\n\nfunc (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetNodeInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *GetNodeInfoResponse) GetMoniker() string {\n\tif x != nil {\n\t\treturn x.Moniker\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNodeInfoResponse) GetAgent() string {\n\tif x != nil {\n\t\treturn x.Agent\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNodeInfoResponse) GetPeerId() string {\n\tif x != nil {\n\t\treturn x.PeerId\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNodeInfoResponse) GetStartedAt() uint64 {\n\tif x != nil {\n\t\treturn x.StartedAt\n\t}\n\treturn 0\n}\n\nfunc (x *GetNodeInfoResponse) GetReachability() string {\n\tif x != nil {\n\t\treturn x.Reachability\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNodeInfoResponse) GetServices() int32 {\n\tif x != nil {\n\t\treturn x.Services\n\t}\n\treturn 0\n}\n\nfunc (x *GetNodeInfoResponse) GetServicesNames() string {\n\tif x != nil {\n\t\treturn x.ServicesNames\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNodeInfoResponse) GetLocalAddrs() []string {\n\tif x != nil {\n\t\treturn x.LocalAddrs\n\t}\n\treturn nil\n}\n\nfunc (x *GetNodeInfoResponse) GetProtocols() []string {\n\tif x != nil {\n\t\treturn x.Protocols\n\t}\n\treturn nil\n}\n\nfunc (x *GetNodeInfoResponse) GetClockOffset() float64 {\n\tif x != nil {\n\t\treturn x.ClockOffset\n\t}\n\treturn 0\n}\n\nfunc (x *GetNodeInfoResponse) GetConnectionInfo() *ConnectionInfo {\n\tif x != nil {\n\t\treturn x.ConnectionInfo\n\t}\n\treturn nil\n}\n\nfunc (x *GetNodeInfoResponse) GetZmqPublishers() []*ZMQPublisherInfo {\n\tif x != nil {\n\t\treturn x.ZmqPublishers\n\t}\n\treturn nil\n}\n\nfunc (x *GetNodeInfoResponse) GetCurrentTime() uint64 {\n\tif x != nil {\n\t\treturn x.CurrentTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetNodeInfoResponse) GetNetworkName() string {\n\tif x != nil {\n\t\treturn x.NetworkName\n\t}\n\treturn \"\"\n}\n\n// ZMQPublisherInfo contains information about a ZeroMQ publisher.\ntype ZMQPublisherInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The topic associated with the publisher.\n\tTopic string `protobuf:\"bytes,1,opt,name=topic,proto3\" json:\"topic,omitempty\"`\n\t// The address of the publisher.\n\tAddress string `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The high-water mark (HWM) for the publisher, indicating the\n\t// maximum number of messages to queue before dropping older ones.\n\tHwm           int32 `protobuf:\"varint,3,opt,name=hwm,proto3\" json:\"hwm,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ZMQPublisherInfo) Reset() {\n\t*x = ZMQPublisherInfo{}\n\tmi := &file_network_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ZMQPublisherInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ZMQPublisherInfo) ProtoMessage() {}\n\nfunc (x *ZMQPublisherInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ZMQPublisherInfo.ProtoReflect.Descriptor instead.\nfunc (*ZMQPublisherInfo) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ZMQPublisherInfo) GetTopic() string {\n\tif x != nil {\n\t\treturn x.Topic\n\t}\n\treturn \"\"\n}\n\nfunc (x *ZMQPublisherInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *ZMQPublisherInfo) GetHwm() int32 {\n\tif x != nil {\n\t\treturn x.Hwm\n\t}\n\treturn 0\n}\n\n// PeerInfo contains information about a peer in the network.\ntype PeerInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Current status of the peer (e.g., connected, disconnected).\n\tStatus int32 `protobuf:\"varint,1,opt,name=status,proto3\" json:\"status,omitempty\"`\n\t// Moniker or Human-Readable name of the peer.\n\tMoniker string `protobuf:\"bytes,2,opt,name=moniker,proto3\" json:\"moniker,omitempty\"`\n\t// Version and agent details of the peer.\n\tAgent string `protobuf:\"bytes,3,opt,name=agent,proto3\" json:\"agent,omitempty\"`\n\t// Peer ID of the peer in P2P network.\n\tPeerId string `protobuf:\"bytes,4,opt,name=peer_id,json=peerId,proto3\" json:\"peer_id,omitempty\"`\n\t// List of consensus keys used by the peer.\n\tConsensusKeys []string `protobuf:\"bytes,5,rep,name=consensus_keys,json=consensusKeys,proto3\" json:\"consensus_keys,omitempty\"`\n\t// List of consensus addresses used by the peer.\n\tConsensusAddresses []string `protobuf:\"bytes,6,rep,name=consensus_addresses,json=consensusAddresses,proto3\" json:\"consensus_addresses,omitempty\"`\n\t// Bitfield representing the services provided by the peer.\n\tServices uint32 `protobuf:\"varint,7,opt,name=services,proto3\" json:\"services,omitempty\"`\n\t// Hash of the last block the peer knows.\n\tLastBlockHash string `protobuf:\"bytes,8,opt,name=last_block_hash,json=lastBlockHash,proto3\" json:\"last_block_hash,omitempty\"`\n\t// Blockchain height of the peer.\n\tHeight uint32 `protobuf:\"varint,9,opt,name=height,proto3\" json:\"height,omitempty\"`\n\t// Unix timestamp of the last bundle sent to the peer (UTC).\n\tLastSent int64 `protobuf:\"varint,10,opt,name=last_sent,json=lastSent,proto3\" json:\"last_sent,omitempty\"`\n\t// Unix timestamp of the last bundle received from the peer (UTC).\n\tLastReceived int64 `protobuf:\"varint,11,opt,name=last_received,json=lastReceived,proto3\" json:\"last_received,omitempty\"`\n\t// Network address of the peer.\n\tAddress string `protobuf:\"bytes,12,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// Connection direction (e.g., inbound, outbound).\n\tDirection Direction `protobuf:\"varint,13,opt,name=direction,proto3,enum=pactus.Direction\" json:\"direction,omitempty\"`\n\t// List of protocols supported by the peer.\n\tProtocols []string `protobuf:\"bytes,14,rep,name=protocols,proto3\" json:\"protocols,omitempty\"`\n\t// Total download sessions with the peer.\n\tTotalSessions int32 `protobuf:\"varint,15,opt,name=total_sessions,json=totalSessions,proto3\" json:\"total_sessions,omitempty\"`\n\t// Completed download sessions with the peer.\n\tCompletedSessions int32 `protobuf:\"varint,16,opt,name=completed_sessions,json=completedSessions,proto3\" json:\"completed_sessions,omitempty\"`\n\t// Metrics related to peer activity.\n\tMetricInfo *MetricInfo `protobuf:\"bytes,17,opt,name=metric_info,json=metricInfo,proto3\" json:\"metric_info,omitempty\"`\n\t// Whether the hello message was sent from the outbound connection.\n\tOutboundHelloSent bool `protobuf:\"varint,18,opt,name=outbound_hello_sent,json=outboundHelloSent,proto3\" json:\"outbound_hello_sent,omitempty\"`\n\tunknownFields     protoimpl.UnknownFields\n\tsizeCache         protoimpl.SizeCache\n}\n\nfunc (x *PeerInfo) Reset() {\n\t*x = PeerInfo{}\n\tmi := &file_network_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PeerInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PeerInfo) ProtoMessage() {}\n\nfunc (x *PeerInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.\nfunc (*PeerInfo) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *PeerInfo) GetStatus() int32 {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetMoniker() string {\n\tif x != nil {\n\t\treturn x.Moniker\n\t}\n\treturn \"\"\n}\n\nfunc (x *PeerInfo) GetAgent() string {\n\tif x != nil {\n\t\treturn x.Agent\n\t}\n\treturn \"\"\n}\n\nfunc (x *PeerInfo) GetPeerId() string {\n\tif x != nil {\n\t\treturn x.PeerId\n\t}\n\treturn \"\"\n}\n\nfunc (x *PeerInfo) GetConsensusKeys() []string {\n\tif x != nil {\n\t\treturn x.ConsensusKeys\n\t}\n\treturn nil\n}\n\nfunc (x *PeerInfo) GetConsensusAddresses() []string {\n\tif x != nil {\n\t\treturn x.ConsensusAddresses\n\t}\n\treturn nil\n}\n\nfunc (x *PeerInfo) GetServices() uint32 {\n\tif x != nil {\n\t\treturn x.Services\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetLastBlockHash() string {\n\tif x != nil {\n\t\treturn x.LastBlockHash\n\t}\n\treturn \"\"\n}\n\nfunc (x *PeerInfo) GetHeight() uint32 {\n\tif x != nil {\n\t\treturn x.Height\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetLastSent() int64 {\n\tif x != nil {\n\t\treturn x.LastSent\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetLastReceived() int64 {\n\tif x != nil {\n\t\treturn x.LastReceived\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *PeerInfo) GetDirection() Direction {\n\tif x != nil {\n\t\treturn x.Direction\n\t}\n\treturn Direction_DIRECTION_UNKNOWN\n}\n\nfunc (x *PeerInfo) GetProtocols() []string {\n\tif x != nil {\n\t\treturn x.Protocols\n\t}\n\treturn nil\n}\n\nfunc (x *PeerInfo) GetTotalSessions() int32 {\n\tif x != nil {\n\t\treturn x.TotalSessions\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetCompletedSessions() int32 {\n\tif x != nil {\n\t\treturn x.CompletedSessions\n\t}\n\treturn 0\n}\n\nfunc (x *PeerInfo) GetMetricInfo() *MetricInfo {\n\tif x != nil {\n\t\treturn x.MetricInfo\n\t}\n\treturn nil\n}\n\nfunc (x *PeerInfo) GetOutboundHelloSent() bool {\n\tif x != nil {\n\t\treturn x.OutboundHelloSent\n\t}\n\treturn false\n}\n\n// ConnectionInfo contains information about the node's connections.\ntype ConnectionInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Total number of connections.\n\tConnections uint64 `protobuf:\"varint,1,opt,name=connections,proto3\" json:\"connections,omitempty\"`\n\t// Number of inbound connections.\n\tInboundConnections uint64 `protobuf:\"varint,2,opt,name=inbound_connections,json=inboundConnections,proto3\" json:\"inbound_connections,omitempty\"`\n\t// Number of outbound connections.\n\tOutboundConnections uint64 `protobuf:\"varint,3,opt,name=outbound_connections,json=outboundConnections,proto3\" json:\"outbound_connections,omitempty\"`\n\tunknownFields       protoimpl.UnknownFields\n\tsizeCache           protoimpl.SizeCache\n}\n\nfunc (x *ConnectionInfo) Reset() {\n\t*x = ConnectionInfo{}\n\tmi := &file_network_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ConnectionInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ConnectionInfo) ProtoMessage() {}\n\nfunc (x *ConnectionInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ConnectionInfo.ProtoReflect.Descriptor instead.\nfunc (*ConnectionInfo) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *ConnectionInfo) GetConnections() uint64 {\n\tif x != nil {\n\t\treturn x.Connections\n\t}\n\treturn 0\n}\n\nfunc (x *ConnectionInfo) GetInboundConnections() uint64 {\n\tif x != nil {\n\t\treturn x.InboundConnections\n\t}\n\treturn 0\n}\n\nfunc (x *ConnectionInfo) GetOutboundConnections() uint64 {\n\tif x != nil {\n\t\treturn x.OutboundConnections\n\t}\n\treturn 0\n}\n\n// MetricInfo contains metrics data regarding network activity.\ntype MetricInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Total number of invalid bundles.\n\tTotalInvalid *CounterInfo `protobuf:\"bytes,1,opt,name=total_invalid,json=totalInvalid,proto3\" json:\"total_invalid,omitempty\"`\n\t// Total number of bundles sent.\n\tTotalSent *CounterInfo `protobuf:\"bytes,2,opt,name=total_sent,json=totalSent,proto3\" json:\"total_sent,omitempty\"`\n\t// Total number of bundles received.\n\tTotalReceived *CounterInfo `protobuf:\"bytes,3,opt,name=total_received,json=totalReceived,proto3\" json:\"total_received,omitempty\"`\n\t// Number of sent bundles categorized by message type.\n\tMessageSent map[int32]*CounterInfo `protobuf:\"bytes,4,rep,name=message_sent,json=messageSent,proto3\" json:\"message_sent,omitempty\" protobuf_key:\"varint,1,opt,name=key\" protobuf_val:\"bytes,2,opt,name=value\"`\n\t// Number of received bundles categorized by message type.\n\tMessageReceived map[int32]*CounterInfo `protobuf:\"bytes,5,rep,name=message_received,json=messageReceived,proto3\" json:\"message_received,omitempty\" protobuf_key:\"varint,1,opt,name=key\" protobuf_val:\"bytes,2,opt,name=value\"`\n\tunknownFields   protoimpl.UnknownFields\n\tsizeCache       protoimpl.SizeCache\n}\n\nfunc (x *MetricInfo) Reset() {\n\t*x = MetricInfo{}\n\tmi := &file_network_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *MetricInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MetricInfo) ProtoMessage() {}\n\nfunc (x *MetricInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MetricInfo.ProtoReflect.Descriptor instead.\nfunc (*MetricInfo) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *MetricInfo) GetTotalInvalid() *CounterInfo {\n\tif x != nil {\n\t\treturn x.TotalInvalid\n\t}\n\treturn nil\n}\n\nfunc (x *MetricInfo) GetTotalSent() *CounterInfo {\n\tif x != nil {\n\t\treturn x.TotalSent\n\t}\n\treturn nil\n}\n\nfunc (x *MetricInfo) GetTotalReceived() *CounterInfo {\n\tif x != nil {\n\t\treturn x.TotalReceived\n\t}\n\treturn nil\n}\n\nfunc (x *MetricInfo) GetMessageSent() map[int32]*CounterInfo {\n\tif x != nil {\n\t\treturn x.MessageSent\n\t}\n\treturn nil\n}\n\nfunc (x *MetricInfo) GetMessageReceived() map[int32]*CounterInfo {\n\tif x != nil {\n\t\treturn x.MessageReceived\n\t}\n\treturn nil\n}\n\n// CounterInfo holds counter data regarding byte and bundle counts.\ntype CounterInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Total number of bytes.\n\tBytes uint64 `protobuf:\"varint,1,opt,name=bytes,proto3\" json:\"bytes,omitempty\"`\n\t// Total number of bundles.\n\tBundles       uint64 `protobuf:\"varint,2,opt,name=bundles,proto3\" json:\"bundles,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CounterInfo) Reset() {\n\t*x = CounterInfo{}\n\tmi := &file_network_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CounterInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CounterInfo) ProtoMessage() {}\n\nfunc (x *CounterInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CounterInfo.ProtoReflect.Descriptor instead.\nfunc (*CounterInfo) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *CounterInfo) GetBytes() uint64 {\n\tif x != nil {\n\t\treturn x.Bytes\n\t}\n\treturn 0\n}\n\nfunc (x *CounterInfo) GetBundles() uint64 {\n\tif x != nil {\n\t\treturn x.Bundles\n\t}\n\treturn 0\n}\n\n// Request message for ping - intentionally empty for measuring round-trip time.\ntype PingRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PingRequest) Reset() {\n\t*x = PingRequest{}\n\tmi := &file_network_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PingRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PingRequest) ProtoMessage() {}\n\nfunc (x *PingRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.\nfunc (*PingRequest) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{11}\n}\n\n// Response message for ping - intentionally empty for measuring round-trip time.\ntype PingResponse struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PingResponse) Reset() {\n\t*x = PingResponse{}\n\tmi := &file_network_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PingResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PingResponse) ProtoMessage() {}\n\nfunc (x *PingResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_network_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.\nfunc (*PingResponse) Descriptor() ([]byte, []int) {\n\treturn file_network_proto_rawDescGZIP(), []int{12}\n}\n\nvar File_network_proto protoreflect.FileDescriptor\n\nconst file_network_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\rnetwork.proto\\x12\\x06pactus\\\"\\x17\\n\" +\n\t\"\\x15GetNetworkInfoRequest\\\"\\xa4\\x01\\n\" +\n\t\"\\x16GetNetworkInfoResponse\\x12!\\n\" +\n\t\"\\fnetwork_name\\x18\\x01 \\x01(\\tR\\vnetworkName\\x122\\n\" +\n\t\"\\x15connected_peers_count\\x18\\x02 \\x01(\\rR\\x13connectedPeersCount\\x123\\n\" +\n\t\"\\vmetric_info\\x18\\x04 \\x01(\\v2\\x12.pactus.MetricInfoR\\n\" +\n\t\"metricInfo\\\"E\\n\" +\n\t\"\\x10ListPeersRequest\\x121\\n\" +\n\t\"\\x14include_disconnected\\x18\\x01 \\x01(\\bR\\x13includeDisconnected\\\";\\n\" +\n\t\"\\x11ListPeersResponse\\x12&\\n\" +\n\t\"\\x05peers\\x18\\x01 \\x03(\\v2\\x10.pactus.PeerInfoR\\x05peers\\\"\\x14\\n\" +\n\t\"\\x12GetNodeInfoRequest\\\"\\x8e\\x04\\n\" +\n\t\"\\x13GetNodeInfoResponse\\x12\\x18\\n\" +\n\t\"\\amoniker\\x18\\x01 \\x01(\\tR\\amoniker\\x12\\x14\\n\" +\n\t\"\\x05agent\\x18\\x02 \\x01(\\tR\\x05agent\\x12\\x17\\n\" +\n\t\"\\apeer_id\\x18\\x03 \\x01(\\tR\\x06peerId\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"started_at\\x18\\x04 \\x01(\\x04R\\tstartedAt\\x12\\\"\\n\" +\n\t\"\\freachability\\x18\\x05 \\x01(\\tR\\freachability\\x12\\x1a\\n\" +\n\t\"\\bservices\\x18\\x06 \\x01(\\x05R\\bservices\\x12%\\n\" +\n\t\"\\x0eservices_names\\x18\\a \\x01(\\tR\\rservicesNames\\x12\\x1f\\n\" +\n\t\"\\vlocal_addrs\\x18\\b \\x03(\\tR\\n\" +\n\t\"localAddrs\\x12\\x1c\\n\" +\n\t\"\\tprotocols\\x18\\t \\x03(\\tR\\tprotocols\\x12!\\n\" +\n\t\"\\fclock_offset\\x18\\r \\x01(\\x01R\\vclockOffset\\x12?\\n\" +\n\t\"\\x0fconnection_info\\x18\\x0e \\x01(\\v2\\x16.pactus.ConnectionInfoR\\x0econnectionInfo\\x12?\\n\" +\n\t\"\\x0ezmq_publishers\\x18\\x0f \\x03(\\v2\\x18.pactus.ZMQPublisherInfoR\\rzmqPublishers\\x12!\\n\" +\n\t\"\\fcurrent_time\\x18\\x10 \\x01(\\x04R\\vcurrentTime\\x12!\\n\" +\n\t\"\\fnetwork_name\\x18\\x11 \\x01(\\tR\\vnetworkName\\\"T\\n\" +\n\t\"\\x10ZMQPublisherInfo\\x12\\x14\\n\" +\n\t\"\\x05topic\\x18\\x01 \\x01(\\tR\\x05topic\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\x12\\x10\\n\" +\n\t\"\\x03hwm\\x18\\x03 \\x01(\\x05R\\x03hwm\\\"\\x85\\x05\\n\" +\n\t\"\\bPeerInfo\\x12\\x16\\n\" +\n\t\"\\x06status\\x18\\x01 \\x01(\\x05R\\x06status\\x12\\x18\\n\" +\n\t\"\\amoniker\\x18\\x02 \\x01(\\tR\\amoniker\\x12\\x14\\n\" +\n\t\"\\x05agent\\x18\\x03 \\x01(\\tR\\x05agent\\x12\\x17\\n\" +\n\t\"\\apeer_id\\x18\\x04 \\x01(\\tR\\x06peerId\\x12%\\n\" +\n\t\"\\x0econsensus_keys\\x18\\x05 \\x03(\\tR\\rconsensusKeys\\x12/\\n\" +\n\t\"\\x13consensus_addresses\\x18\\x06 \\x03(\\tR\\x12consensusAddresses\\x12\\x1a\\n\" +\n\t\"\\bservices\\x18\\a \\x01(\\rR\\bservices\\x12&\\n\" +\n\t\"\\x0flast_block_hash\\x18\\b \\x01(\\tR\\rlastBlockHash\\x12\\x16\\n\" +\n\t\"\\x06height\\x18\\t \\x01(\\rR\\x06height\\x12\\x1b\\n\" +\n\t\"\\tlast_sent\\x18\\n\" +\n\t\" \\x01(\\x03R\\blastSent\\x12#\\n\" +\n\t\"\\rlast_received\\x18\\v \\x01(\\x03R\\flastReceived\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\f \\x01(\\tR\\aaddress\\x12/\\n\" +\n\t\"\\tdirection\\x18\\r \\x01(\\x0e2\\x11.pactus.DirectionR\\tdirection\\x12\\x1c\\n\" +\n\t\"\\tprotocols\\x18\\x0e \\x03(\\tR\\tprotocols\\x12%\\n\" +\n\t\"\\x0etotal_sessions\\x18\\x0f \\x01(\\x05R\\rtotalSessions\\x12-\\n\" +\n\t\"\\x12completed_sessions\\x18\\x10 \\x01(\\x05R\\x11completedSessions\\x123\\n\" +\n\t\"\\vmetric_info\\x18\\x11 \\x01(\\v2\\x12.pactus.MetricInfoR\\n\" +\n\t\"metricInfo\\x12.\\n\" +\n\t\"\\x13outbound_hello_sent\\x18\\x12 \\x01(\\bR\\x11outboundHelloSent\\\"\\x96\\x01\\n\" +\n\t\"\\x0eConnectionInfo\\x12 \\n\" +\n\t\"\\vconnections\\x18\\x01 \\x01(\\x04R\\vconnections\\x12/\\n\" +\n\t\"\\x13inbound_connections\\x18\\x02 \\x01(\\x04R\\x12inboundConnections\\x121\\n\" +\n\t\"\\x14outbound_connections\\x18\\x03 \\x01(\\x04R\\x13outboundConnections\\\"\\x80\\x04\\n\" +\n\t\"\\n\" +\n\t\"MetricInfo\\x128\\n\" +\n\t\"\\rtotal_invalid\\x18\\x01 \\x01(\\v2\\x13.pactus.CounterInfoR\\ftotalInvalid\\x122\\n\" +\n\t\"\\n\" +\n\t\"total_sent\\x18\\x02 \\x01(\\v2\\x13.pactus.CounterInfoR\\ttotalSent\\x12:\\n\" +\n\t\"\\x0etotal_received\\x18\\x03 \\x01(\\v2\\x13.pactus.CounterInfoR\\rtotalReceived\\x12F\\n\" +\n\t\"\\fmessage_sent\\x18\\x04 \\x03(\\v2#.pactus.MetricInfo.MessageSentEntryR\\vmessageSent\\x12R\\n\" +\n\t\"\\x10message_received\\x18\\x05 \\x03(\\v2'.pactus.MetricInfo.MessageReceivedEntryR\\x0fmessageReceived\\x1aS\\n\" +\n\t\"\\x10MessageSentEntry\\x12\\x10\\n\" +\n\t\"\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12)\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\v2\\x13.pactus.CounterInfoR\\x05value:\\x028\\x01\\x1aW\\n\" +\n\t\"\\x14MessageReceivedEntry\\x12\\x10\\n\" +\n\t\"\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12)\\n\" +\n\t\"\\x05value\\x18\\x02 \\x01(\\v2\\x13.pactus.CounterInfoR\\x05value:\\x028\\x01\\\"=\\n\" +\n\t\"\\vCounterInfo\\x12\\x14\\n\" +\n\t\"\\x05bytes\\x18\\x01 \\x01(\\x04R\\x05bytes\\x12\\x18\\n\" +\n\t\"\\abundles\\x18\\x02 \\x01(\\x04R\\abundles\\\"\\r\\n\" +\n\t\"\\vPingRequest\\\"\\x0e\\n\" +\n\t\"\\fPingResponse*Q\\n\" +\n\t\"\\tDirection\\x12\\x15\\n\" +\n\t\"\\x11DIRECTION_UNKNOWN\\x10\\x00\\x12\\x15\\n\" +\n\t\"\\x11DIRECTION_INBOUND\\x10\\x01\\x12\\x16\\n\" +\n\t\"\\x12DIRECTION_OUTBOUND\\x10\\x022\\x97\\x02\\n\" +\n\t\"\\aNetwork\\x12O\\n\" +\n\t\"\\x0eGetNetworkInfo\\x12\\x1d.pactus.GetNetworkInfoRequest\\x1a\\x1e.pactus.GetNetworkInfoResponse\\x12@\\n\" +\n\t\"\\tListPeers\\x12\\x18.pactus.ListPeersRequest\\x1a\\x19.pactus.ListPeersResponse\\x12F\\n\" +\n\t\"\\vGetNodeInfo\\x12\\x1a.pactus.GetNodeInfoRequest\\x1a\\x1b.pactus.GetNodeInfoResponse\\x121\\n\" +\n\t\"\\x04Ping\\x12\\x13.pactus.PingRequest\\x1a\\x14.pactus.PingResponseB:\\n\" +\n\t\"\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3\"\n\nvar (\n\tfile_network_proto_rawDescOnce sync.Once\n\tfile_network_proto_rawDescData []byte\n)\n\nfunc file_network_proto_rawDescGZIP() []byte {\n\tfile_network_proto_rawDescOnce.Do(func() {\n\t\tfile_network_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_network_proto_rawDesc), len(file_network_proto_rawDesc)))\n\t})\n\treturn file_network_proto_rawDescData\n}\n\nvar file_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 15)\nvar file_network_proto_goTypes = []any{\n\t(Direction)(0),                 // 0: pactus.Direction\n\t(*GetNetworkInfoRequest)(nil),  // 1: pactus.GetNetworkInfoRequest\n\t(*GetNetworkInfoResponse)(nil), // 2: pactus.GetNetworkInfoResponse\n\t(*ListPeersRequest)(nil),       // 3: pactus.ListPeersRequest\n\t(*ListPeersResponse)(nil),      // 4: pactus.ListPeersResponse\n\t(*GetNodeInfoRequest)(nil),     // 5: pactus.GetNodeInfoRequest\n\t(*GetNodeInfoResponse)(nil),    // 6: pactus.GetNodeInfoResponse\n\t(*ZMQPublisherInfo)(nil),       // 7: pactus.ZMQPublisherInfo\n\t(*PeerInfo)(nil),               // 8: pactus.PeerInfo\n\t(*ConnectionInfo)(nil),         // 9: pactus.ConnectionInfo\n\t(*MetricInfo)(nil),             // 10: pactus.MetricInfo\n\t(*CounterInfo)(nil),            // 11: pactus.CounterInfo\n\t(*PingRequest)(nil),            // 12: pactus.PingRequest\n\t(*PingResponse)(nil),           // 13: pactus.PingResponse\n\tnil,                            // 14: pactus.MetricInfo.MessageSentEntry\n\tnil,                            // 15: pactus.MetricInfo.MessageReceivedEntry\n}\nvar file_network_proto_depIdxs = []int32{\n\t10, // 0: pactus.GetNetworkInfoResponse.metric_info:type_name -> pactus.MetricInfo\n\t8,  // 1: pactus.ListPeersResponse.peers:type_name -> pactus.PeerInfo\n\t9,  // 2: pactus.GetNodeInfoResponse.connection_info:type_name -> pactus.ConnectionInfo\n\t7,  // 3: pactus.GetNodeInfoResponse.zmq_publishers:type_name -> pactus.ZMQPublisherInfo\n\t0,  // 4: pactus.PeerInfo.direction:type_name -> pactus.Direction\n\t10, // 5: pactus.PeerInfo.metric_info:type_name -> pactus.MetricInfo\n\t11, // 6: pactus.MetricInfo.total_invalid:type_name -> pactus.CounterInfo\n\t11, // 7: pactus.MetricInfo.total_sent:type_name -> pactus.CounterInfo\n\t11, // 8: pactus.MetricInfo.total_received:type_name -> pactus.CounterInfo\n\t14, // 9: pactus.MetricInfo.message_sent:type_name -> pactus.MetricInfo.MessageSentEntry\n\t15, // 10: pactus.MetricInfo.message_received:type_name -> pactus.MetricInfo.MessageReceivedEntry\n\t11, // 11: pactus.MetricInfo.MessageSentEntry.value:type_name -> pactus.CounterInfo\n\t11, // 12: pactus.MetricInfo.MessageReceivedEntry.value:type_name -> pactus.CounterInfo\n\t1,  // 13: pactus.Network.GetNetworkInfo:input_type -> pactus.GetNetworkInfoRequest\n\t3,  // 14: pactus.Network.ListPeers:input_type -> pactus.ListPeersRequest\n\t5,  // 15: pactus.Network.GetNodeInfo:input_type -> pactus.GetNodeInfoRequest\n\t12, // 16: pactus.Network.Ping:input_type -> pactus.PingRequest\n\t2,  // 17: pactus.Network.GetNetworkInfo:output_type -> pactus.GetNetworkInfoResponse\n\t4,  // 18: pactus.Network.ListPeers:output_type -> pactus.ListPeersResponse\n\t6,  // 19: pactus.Network.GetNodeInfo:output_type -> pactus.GetNodeInfoResponse\n\t13, // 20: pactus.Network.Ping:output_type -> pactus.PingResponse\n\t17, // [17:21] is the sub-list for method output_type\n\t13, // [13:17] is the sub-list for method input_type\n\t13, // [13:13] is the sub-list for extension type_name\n\t13, // [13:13] is the sub-list for extension extendee\n\t0,  // [0:13] is the sub-list for field type_name\n}\n\nfunc init() { file_network_proto_init() }\nfunc file_network_proto_init() {\n\tif File_network_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_network_proto_rawDesc), len(file_network_proto_rawDesc)),\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   15,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_network_proto_goTypes,\n\t\tDependencyIndexes: file_network_proto_depIdxs,\n\t\tEnumInfos:         file_network_proto_enumTypes,\n\t\tMessageInfos:      file_network_proto_msgTypes,\n\t}.Build()\n\tFile_network_proto = out.File\n\tfile_network_proto_goTypes = nil\n\tfile_network_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "www/grpc/gen/go/network.pb.gw.go",
    "content": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: network.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into RESTful JSON APIs.\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/utilities\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// Suppress \"imported and not used\" errors\nvar (\n\t_ codes.Code\n\t_ io.Reader\n\t_ status.Status\n\t_ = errors.New\n\t_ = runtime.String\n\t_ = utilities.NewDoubleArray\n\t_ = metadata.Join\n)\n\nfunc request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNetworkInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetNetworkInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNetworkInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetNetworkInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNodeInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetNodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNodeInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.GetNodeInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Network_Ping_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq PingRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.Ping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Network_Ping_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq PingRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.Ping(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\n// RegisterNetworkHandlerServer registers the http handlers for service Network to \"mux\".\n// UnaryRPC     :call NetworkServer directly.\n// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.\n// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead.\n// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the \"runtime.WithMiddlewares\" option in the \"runtime.NewServeMux\" call.\nfunc RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error {\n\tmux.Handle(http.MethodGet, pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Network/GetNetworkInfo\", runtime.WithHTTPPathPattern(\"/pactus/network/get_network_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Network/GetNodeInfo\", runtime.WithHTTPPathPattern(\"/pactus/network/get_node_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Network_Ping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Network/Ping\", runtime.WithHTTPPathPattern(\"/pactus/network/ping\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Network_Ping_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\n\treturn nil\n}\n\n// RegisterNetworkHandlerFromEndpoint is same as RegisterNetworkHandler but\n// automatically dials to \"endpoint\" and closes the connection when \"ctx\" gets done.\nfunc RegisterNetworkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {\n\tconn, err := grpc.NewClient(endpoint, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tgo func() {\n\t\t\t<-ctx.Done()\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t}()\n\t}()\n\treturn RegisterNetworkHandler(ctx, mux, conn)\n}\n\n// RegisterNetworkHandler registers the http handlers for service Network to \"mux\".\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {\n\treturn RegisterNetworkHandlerClient(ctx, mux, NewNetworkClient(conn))\n}\n\n// RegisterNetworkHandlerClient registers the http handlers for service Network\n// to \"mux\". The handlers forward requests to the grpc endpoint over the given implementation of \"NetworkClient\".\n// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in \"NetworkClient\"\n// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in\n// \"NetworkClient\" to call the correct interceptors. This client ignores the HTTP middlewares.\nfunc RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error {\n\tmux.Handle(http.MethodGet, pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Network/GetNetworkInfo\", runtime.WithHTTPPathPattern(\"/pactus/network/get_network_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Network/GetNodeInfo\", runtime.WithHTTPPathPattern(\"/pactus/network/get_node_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Network_Ping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Network/Ping\", runtime.WithHTTPPathPattern(\"/pactus/network/ping\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Network_Ping_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Network_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\treturn nil\n}\n\nvar (\n\tpattern_Network_GetNetworkInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"network\", \"get_network_info\"}, \"\"))\n\tpattern_Network_GetNodeInfo_0    = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"network\", \"get_node_info\"}, \"\"))\n\tpattern_Network_Ping_0           = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"network\", \"ping\"}, \"\"))\n)\n\nvar (\n\tforward_Network_GetNetworkInfo_0 = runtime.ForwardResponseMessage\n\tforward_Network_GetNodeInfo_0    = runtime.ForwardResponseMessage\n\tforward_Network_Ping_0           = runtime.ForwardResponseMessage\n)\n"
  },
  {
    "path": "www/grpc/gen/go/network_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.6.0\n// - protoc             (unknown)\n// source: network.proto\n\npackage pactus\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.64.0 or later.\nconst _ = grpc.SupportPackageIsVersion9\n\nconst (\n\tNetwork_GetNetworkInfo_FullMethodName = \"/pactus.Network/GetNetworkInfo\"\n\tNetwork_ListPeers_FullMethodName      = \"/pactus.Network/ListPeers\"\n\tNetwork_GetNodeInfo_FullMethodName    = \"/pactus.Network/GetNodeInfo\"\n\tNetwork_Ping_FullMethodName           = \"/pactus.Network/Ping\"\n)\n\n// NetworkClient is the client API for Network service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\n//\n// Network service provides RPCs for retrieving information about the network.\ntype NetworkClient interface {\n\t// GetNetworkInfo retrieves information about the overall network.\n\tGetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error)\n\t// ListPeers lists all peers in the network.\n\tListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error)\n\t// GetNodeInfo retrieves information about a specific node in the network.\n\tGetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error)\n\t// Ping provides a simple connectivity test and latency measurement.\n\tPing(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)\n}\n\ntype networkClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient {\n\treturn &networkClient{cc}\n}\n\nfunc (c *networkClient) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetNetworkInfoResponse)\n\terr := c.cc.Invoke(ctx, Network_GetNetworkInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *networkClient) ListPeers(ctx context.Context, in *ListPeersRequest, opts ...grpc.CallOption) (*ListPeersResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(ListPeersResponse)\n\terr := c.cc.Invoke(ctx, Network_ListPeers_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetNodeInfoResponse)\n\terr := c.cc.Invoke(ctx, Network_GetNodeInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *networkClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(PingResponse)\n\terr := c.cc.Invoke(ctx, Network_Ping_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// NetworkServer is the server API for Network service.\n// All implementations should embed UnimplementedNetworkServer\n// for forward compatibility.\n//\n// Network service provides RPCs for retrieving information about the network.\ntype NetworkServer interface {\n\t// GetNetworkInfo retrieves information about the overall network.\n\tGetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error)\n\t// ListPeers lists all peers in the network.\n\tListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error)\n\t// GetNodeInfo retrieves information about a specific node in the network.\n\tGetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error)\n\t// Ping provides a simple connectivity test and latency measurement.\n\tPing(context.Context, *PingRequest) (*PingResponse, error)\n}\n\n// UnimplementedNetworkServer should be embedded to have\n// forward compatible implementations.\n//\n// NOTE: this should be embedded by value instead of pointer to avoid a nil\n// pointer dereference when methods are called.\ntype UnimplementedNetworkServer struct{}\n\nfunc (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetNetworkInfo not implemented\")\n}\nfunc (UnimplementedNetworkServer) ListPeers(context.Context, *ListPeersRequest) (*ListPeersResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method ListPeers not implemented\")\n}\nfunc (UnimplementedNetworkServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetNodeInfo not implemented\")\n}\nfunc (UnimplementedNetworkServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method Ping not implemented\")\n}\nfunc (UnimplementedNetworkServer) testEmbeddedByValue() {}\n\n// UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to NetworkServer will\n// result in compilation errors.\ntype UnsafeNetworkServer interface {\n\tmustEmbedUnimplementedNetworkServer()\n}\n\nfunc RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer) {\n\t// If the following call panics, it indicates UnimplementedNetworkServer was\n\t// embedded by pointer and is nil.  This will cause panics if an\n\t// unimplemented method is ever invoked, so we test this at initialization\n\t// time to prevent it from happening at runtime later due to I/O.\n\tif t, ok := srv.(interface{ testEmbeddedByValue() }); ok {\n\t\tt.testEmbeddedByValue()\n\t}\n\ts.RegisterService(&Network_ServiceDesc, srv)\n}\n\nfunc _Network_GetNetworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetNetworkInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NetworkServer).GetNetworkInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Network_GetNetworkInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NetworkServer).GetNetworkInfo(ctx, req.(*GetNetworkInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Network_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListPeersRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NetworkServer).ListPeers(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Network_ListPeers_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NetworkServer).ListPeers(ctx, req.(*ListPeersRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Network_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetNodeInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NetworkServer).GetNodeInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Network_GetNodeInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NetworkServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Network_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PingRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NetworkServer).Ping(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Network_Ping_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NetworkServer).Ping(ctx, req.(*PingRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// Network_ServiceDesc is the grpc.ServiceDesc for Network service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar Network_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"pactus.Network\",\n\tHandlerType: (*NetworkServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"GetNetworkInfo\",\n\t\t\tHandler:    _Network_GetNetworkInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListPeers\",\n\t\t\tHandler:    _Network_ListPeers_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetNodeInfo\",\n\t\t\tHandler:    _Network_GetNodeInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Ping\",\n\t\t\tHandler:    _Network_Ping_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"network.proto\",\n}\n"
  },
  {
    "path": "www/grpc/gen/go/network_jgw.pb.go",
    "content": "// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT.\n// source: network.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into JSON-RPC 2.0\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\ntype NetworkJsonRPC struct {\n\tclient NetworkClient\n}\n\ntype paramsAndHeadersNetwork struct {\n\tHeaders metadata.MD     `json:\"headers,omitempty\"`\n\tParams  json.RawMessage `json:\"params\"`\n}\n\n// RegisterNetworkJsonRPC register the grpc client Network for json-rpc.\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterNetworkJsonRPC(conn *grpc.ClientConn) *NetworkJsonRPC {\n\treturn &NetworkJsonRPC{\n\t\tclient: NewNetworkClient(conn),\n\t}\n}\n\nfunc (s *NetworkJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) {\n\treturn map[string]func(ctx context.Context, params json.RawMessage) (any, error){\n\n\t\t\"pactus.network.get_network_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetNetworkInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersNetwork\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetNetworkInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.network.list_peers\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(ListPeersRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersNetwork\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.ListPeers(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.network.get_node_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetNodeInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersNetwork\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetNodeInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.network.ping\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(PingRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersNetwork\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.Ping(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "www/grpc/gen/go/transaction.cobra.pb.go",
    "content": "// Code generated by protoc-gen-cobra. DO NOT EDIT.\n\npackage pactus\n\nimport (\n\tclient \"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\tflag \"github.com/NathanBaulch/protoc-gen-cobra/flag\"\n\tiocodec \"github.com/NathanBaulch/protoc-gen-cobra/iocodec\"\n\tcobra \"github.com/spf13/cobra\"\n\tgrpc \"google.golang.org/grpc\"\n\tproto \"google.golang.org/protobuf/proto\"\n)\n\nfunc TransactionClientCommand(options ...client.Option) *cobra.Command {\n\tcfg := client.NewConfig(options...)\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Transaction\"),\n\t\tShort: \"Transaction service client\",\n\t\tLong:  \"Transaction service defines various RPC methods for interacting with transactions.\",\n\t}\n\tcfg.BindFlags(cmd.PersistentFlags())\n\tcmd.AddCommand(\n\t\t_TransactionGetTransactionCommand(cfg),\n\t\t_TransactionCalculateFeeCommand(cfg),\n\t\t_TransactionBroadcastTransactionCommand(cfg),\n\t\t_TransactionGetRawTransferTransactionCommand(cfg),\n\t\t_TransactionGetRawBondTransactionCommand(cfg),\n\t\t_TransactionGetRawUnbondTransactionCommand(cfg),\n\t\t_TransactionGetRawWithdrawTransactionCommand(cfg),\n\t\t_TransactionGetRawBatchTransferTransactionCommand(cfg),\n\t\t_TransactionDecodeRawTransactionCommand(cfg),\n\t\t_TransactionCheckTransactionCommand(cfg),\n\t)\n\treturn cmd\n}\n\nfunc _TransactionGetTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetTransaction\"),\n\t\tShort: \"GetTransaction RPC client\",\n\t\tLong:  \"GetTransaction retrieves transaction details based on the provided request parameters.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Id, cfg.FlagNamer(\"Id\"), \"\", \"The unique ID of the transaction to retrieve.\")\n\tflag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer(\"Verbosity\"), \"The verbosity level for transaction details.\")\n\n\treturn cmd\n}\n\nfunc _TransactionCalculateFeeCommand(cfg *client.Config) *cobra.Command {\n\treq := &CalculateFeeRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"CalculateFee\"),\n\t\tShort: \"CalculateFee RPC client\",\n\t\tLong:  \"CalculateFee calculates the transaction fee based on the specified amount and payload type.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"CalculateFee\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &CalculateFeeRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.CalculateFee(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer(\"Amount\"), 0, \"The amount involved in the transaction, specified in NanoPAC.\")\n\tflag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer(\"PayloadType\"), \"The type of transaction payload.\")\n\tcmd.PersistentFlags().BoolVar(&req.FixedAmount, cfg.FlagNamer(\"FixedAmount\"), false, \"Indicates if the amount should be fixed and include the fee.\")\n\n\treturn cmd\n}\n\nfunc _TransactionBroadcastTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &BroadcastTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"BroadcastTransaction\"),\n\t\tShort: \"BroadcastTransaction RPC client\",\n\t\tLong:  \"BroadcastTransaction broadcasts a signed transaction to the network.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"BroadcastTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &BroadcastTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.BroadcastTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.SignedRawTransaction, cfg.FlagNamer(\"SignedRawTransaction\"), \"\", \"The signed raw transaction data to be broadcasted.\")\n\n\treturn cmd\n}\n\nfunc _TransactionGetRawTransferTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetRawTransferTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetRawTransferTransaction\"),\n\t\tShort: \"GetRawTransferTransaction RPC client\",\n\t\tLong:  \"GetRawTransferTransaction retrieves raw details of a transfer transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetRawTransferTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetRawTransferTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetRawTransferTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer(\"LockTime\"), 0, \"The lock time for the transaction. If not set, defaults to the last block height.\")\n\tcmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer(\"Sender\"), \"\", \"The sender's account address.\")\n\tcmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer(\"Receiver\"), \"\", \"The receiver's account address.\")\n\tcmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer(\"Amount\"), 0, \"The amount to be transferred, specified in NanoPAC. Must be greater than 0.\")\n\tcmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer(\"Fee\"), 0, \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\")\n\tcmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer(\"Memo\"), \"\", \"A memo string for the transaction.\")\n\n\treturn cmd\n}\n\nfunc _TransactionGetRawBondTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetRawBondTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetRawBondTransaction\"),\n\t\tShort: \"GetRawBondTransaction RPC client\",\n\t\tLong:  \"GetRawBondTransaction retrieves raw details of a bond transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetRawBondTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetRawBondTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetRawBondTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer(\"LockTime\"), 0, \"The lock time for the transaction. If not set, defaults to the last block height.\")\n\tcmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer(\"Sender\"), \"\", \"The sender's account address.\")\n\tcmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer(\"Receiver\"), \"\", \"The receiver's validator address.\")\n\tcmd.PersistentFlags().Int64Var(&req.Stake, cfg.FlagNamer(\"Stake\"), 0, \"The stake amount in NanoPAC. Must be greater than 0.\")\n\tcmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer(\"PublicKey\"), \"\", \"The public key of the validator.\\n Optional, but required when registering a new validator.;\")\n\tcmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer(\"Fee\"), 0, \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\")\n\tcmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer(\"Memo\"), \"\", \"A memo string for the transaction.\")\n\tcmd.PersistentFlags().StringVar(&req.DelegateOwner, cfg.FlagNamer(\"DelegateOwner\"), \"\", \"The address of the delegate owner.\\n Optional, but required when registering a new validator with delegation.;\")\n\tcmd.PersistentFlags().Int64Var(&req.DelegateShare, cfg.FlagNamer(\"DelegateShare\"), 0, \"The share percentage for the delegate owner.\\n Optional, but required when registering a new validator with delegation.;\\n Must be between 0 and 0.7 PAC in nano PAC.\")\n\tcmd.PersistentFlags().Uint32Var(&req.DelegateExpiry, cfg.FlagNamer(\"DelegateExpiry\"), 0, \"The expiry height for the delegate relationship.\\n Optional, but required when registering a new validator with delegation.;\")\n\n\treturn cmd\n}\n\nfunc _TransactionGetRawUnbondTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetRawUnbondTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetRawUnbondTransaction\"),\n\t\tShort: \"GetRawUnbondTransaction RPC client\",\n\t\tLong:  \"GetRawUnbondTransaction retrieves raw details of an unbond transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetRawUnbondTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetRawUnbondTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetRawUnbondTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer(\"LockTime\"), 0, \"The lock time for the transaction. If not set, defaults to the last block height.\")\n\tcmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer(\"ValidatorAddress\"), \"\", \"The address of the validator to unbond from.\")\n\tcmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer(\"Memo\"), \"\", \"A memo string for the transaction.\")\n\tcmd.PersistentFlags().StringVar(&req.DelegateOwner, cfg.FlagNamer(\"DelegateOwner\"), \"\", \"The address of the delegate owner.\\n Optional, but required when the validator is a delegated validator.;\")\n\n\treturn cmd\n}\n\nfunc _TransactionGetRawWithdrawTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetRawWithdrawTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetRawWithdrawTransaction\"),\n\t\tShort: \"GetRawWithdrawTransaction RPC client\",\n\t\tLong:  \"GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetRawWithdrawTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetRawWithdrawTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetRawWithdrawTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer(\"LockTime\"), 0, \"The lock time for the transaction. If not set, defaults to the last block height.\")\n\tcmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer(\"ValidatorAddress\"), \"\", \"The address of the validator to withdraw from.\")\n\tcmd.PersistentFlags().StringVar(&req.AccountAddress, cfg.FlagNamer(\"AccountAddress\"), \"\", \"The address of the account to withdraw to.\")\n\tcmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer(\"Amount\"), 0, \"The withdrawal amount in NanoPAC. Must be greater than 0.\")\n\tcmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer(\"Fee\"), 0, \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\")\n\tcmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer(\"Memo\"), \"\", \"A memo string for the transaction.\")\n\n\treturn cmd\n}\n\nfunc _TransactionGetRawBatchTransferTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetRawBatchTransferTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetRawBatchTransferTransaction\"),\n\t\tShort: \"GetRawBatchTransferTransaction RPC client\",\n\t\tLong:  \"GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"GetRawBatchTransferTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &GetRawBatchTransferTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetRawBatchTransferTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer(\"LockTime\"), 0, \"The lock time for the transaction. If not set, defaults to the last block height.\")\n\tcmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer(\"Sender\"), \"\", \"The sender's account address.\")\n\tflag.SliceVar(cmd.PersistentFlags(), flag.ParseMessageE[*Recipient], &req.Recipients, cfg.FlagNamer(\"Recipients\"), \"The list of recipients with their amounts. Minimum 2 recipients required.\")\n\tcmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer(\"Fee\"), 0, \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\")\n\tcmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer(\"Memo\"), \"\", \"A memo string for the transaction.\")\n\n\treturn cmd\n}\n\nfunc _TransactionDecodeRawTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &DecodeRawTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"DecodeRawTransaction\"),\n\t\tShort: \"DecodeRawTransaction RPC client\",\n\t\tLong:  \"DecodeRawTransaction accepts raw transaction and returns decoded transaction.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"DecodeRawTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &DecodeRawTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.DecodeRawTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.RawTransaction, cfg.FlagNamer(\"RawTransaction\"), \"\", \"The raw transaction data in hexadecimal format.\")\n\n\treturn cmd\n}\n\nfunc _TransactionCheckTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &CheckTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"CheckTransaction\"),\n\t\tShort: \"CheckTransaction RPC client\",\n\t\tLong:  \"CheckTransaction checks if the transaction is valid and can be included in the blockchain.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Transaction\", \"CheckTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewTransactionClient(cc)\n\t\t\t\tv := &CheckTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.CheckTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.RawTransaction, cfg.FlagNamer(\"RawTransaction\"), \"\", \"The raw transaction data to be checked.\")\n\n\treturn cmd\n}\n"
  },
  {
    "path": "www/grpc/gen/go/transaction.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.11\n// \tprotoc        (unknown)\n// source: transaction.proto\n\npackage pactus\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Enumeration for different types of transaction payloads.\ntype PayloadType int32\n\nconst (\n\t// Unspecified payload type.\n\tPayloadType_PAYLOAD_TYPE_UNSPECIFIED PayloadType = 0\n\t// Transfer payload type.\n\tPayloadType_PAYLOAD_TYPE_TRANSFER PayloadType = 1\n\t// Bond payload type.\n\tPayloadType_PAYLOAD_TYPE_BOND PayloadType = 2\n\t// Sortition payload type.\n\tPayloadType_PAYLOAD_TYPE_SORTITION PayloadType = 3\n\t// Unbond payload type.\n\tPayloadType_PAYLOAD_TYPE_UNBOND PayloadType = 4\n\t// Withdraw payload type.\n\tPayloadType_PAYLOAD_TYPE_WITHDRAW PayloadType = 5\n\t// Batch transfer payload type.\n\tPayloadType_PAYLOAD_TYPE_BATCH_TRANSFER PayloadType = 6\n)\n\n// Enum value maps for PayloadType.\nvar (\n\tPayloadType_name = map[int32]string{\n\t\t0: \"PAYLOAD_TYPE_UNSPECIFIED\",\n\t\t1: \"PAYLOAD_TYPE_TRANSFER\",\n\t\t2: \"PAYLOAD_TYPE_BOND\",\n\t\t3: \"PAYLOAD_TYPE_SORTITION\",\n\t\t4: \"PAYLOAD_TYPE_UNBOND\",\n\t\t5: \"PAYLOAD_TYPE_WITHDRAW\",\n\t\t6: \"PAYLOAD_TYPE_BATCH_TRANSFER\",\n\t}\n\tPayloadType_value = map[string]int32{\n\t\t\"PAYLOAD_TYPE_UNSPECIFIED\":    0,\n\t\t\"PAYLOAD_TYPE_TRANSFER\":       1,\n\t\t\"PAYLOAD_TYPE_BOND\":           2,\n\t\t\"PAYLOAD_TYPE_SORTITION\":      3,\n\t\t\"PAYLOAD_TYPE_UNBOND\":         4,\n\t\t\"PAYLOAD_TYPE_WITHDRAW\":       5,\n\t\t\"PAYLOAD_TYPE_BATCH_TRANSFER\": 6,\n\t}\n)\n\nfunc (x PayloadType) Enum() *PayloadType {\n\tp := new(PayloadType)\n\t*p = x\n\treturn p\n}\n\nfunc (x PayloadType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (PayloadType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_transaction_proto_enumTypes[0].Descriptor()\n}\n\nfunc (PayloadType) Type() protoreflect.EnumType {\n\treturn &file_transaction_proto_enumTypes[0]\n}\n\nfunc (x PayloadType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use PayloadType.Descriptor instead.\nfunc (PayloadType) EnumDescriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{0}\n}\n\n// Enumeration for verbosity levels when requesting transaction details.\ntype TransactionVerbosity int32\n\nconst (\n\t// Request transaction data only.\n\tTransactionVerbosity_TRANSACTION_VERBOSITY_DATA TransactionVerbosity = 0\n\t// Request detailed transaction information.\n\tTransactionVerbosity_TRANSACTION_VERBOSITY_INFO TransactionVerbosity = 1\n)\n\n// Enum value maps for TransactionVerbosity.\nvar (\n\tTransactionVerbosity_name = map[int32]string{\n\t\t0: \"TRANSACTION_VERBOSITY_DATA\",\n\t\t1: \"TRANSACTION_VERBOSITY_INFO\",\n\t}\n\tTransactionVerbosity_value = map[string]int32{\n\t\t\"TRANSACTION_VERBOSITY_DATA\": 0,\n\t\t\"TRANSACTION_VERBOSITY_INFO\": 1,\n\t}\n)\n\nfunc (x TransactionVerbosity) Enum() *TransactionVerbosity {\n\tp := new(TransactionVerbosity)\n\t*p = x\n\treturn p\n}\n\nfunc (x TransactionVerbosity) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (TransactionVerbosity) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_transaction_proto_enumTypes[1].Descriptor()\n}\n\nfunc (TransactionVerbosity) Type() protoreflect.EnumType {\n\treturn &file_transaction_proto_enumTypes[1]\n}\n\nfunc (x TransactionVerbosity) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use TransactionVerbosity.Descriptor instead.\nfunc (TransactionVerbosity) EnumDescriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{1}\n}\n\n// Request message for retrieving transaction details.\ntype GetTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The unique ID of the transaction to retrieve.\n\tId string `protobuf:\"bytes,1,opt,name=id,proto3\" json:\"id,omitempty\"`\n\t// The verbosity level for transaction details.\n\tVerbosity     TransactionVerbosity `protobuf:\"varint,2,opt,name=verbosity,proto3,enum=pactus.TransactionVerbosity\" json:\"verbosity,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTransactionRequest) Reset() {\n\t*x = GetTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *GetTransactionRequest) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetTransactionRequest) GetVerbosity() TransactionVerbosity {\n\tif x != nil {\n\t\treturn x.Verbosity\n\t}\n\treturn TransactionVerbosity_TRANSACTION_VERBOSITY_DATA\n}\n\n// Response message contains details of a transaction.\ntype GetTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The height of the block containing the transaction.\n\tBlockHeight uint32 `protobuf:\"varint,1,opt,name=block_height,json=blockHeight,proto3\" json:\"block_height,omitempty\"`\n\t// The UNIX timestamp of the block containing the transaction.\n\tBlockTime uint32 `protobuf:\"varint,2,opt,name=block_time,json=blockTime,proto3\" json:\"block_time,omitempty\"`\n\t// Detailed information about the transaction.\n\tTransaction   *TransactionInfo `protobuf:\"bytes,3,opt,name=transaction,proto3\" json:\"transaction,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTransactionResponse) Reset() {\n\t*x = GetTransactionResponse{}\n\tmi := &file_transaction_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTransactionResponse) ProtoMessage() {}\n\nfunc (x *GetTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*GetTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *GetTransactionResponse) GetBlockHeight() uint32 {\n\tif x != nil {\n\t\treturn x.BlockHeight\n\t}\n\treturn 0\n}\n\nfunc (x *GetTransactionResponse) GetBlockTime() uint32 {\n\tif x != nil {\n\t\treturn x.BlockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetTransactionResponse) GetTransaction() *TransactionInfo {\n\tif x != nil {\n\t\treturn x.Transaction\n\t}\n\treturn nil\n}\n\n// Request message for calculating transaction fee.\ntype CalculateFeeRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The amount involved in the transaction, specified in NanoPAC.\n\tAmount int64 `protobuf:\"varint,1,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\t// The type of transaction payload.\n\tPayloadType PayloadType `protobuf:\"varint,2,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType\" json:\"payload_type,omitempty\"`\n\t// Indicates if the amount should be fixed and include the fee.\n\tFixedAmount   bool `protobuf:\"varint,3,opt,name=fixed_amount,json=fixedAmount,proto3\" json:\"fixed_amount,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CalculateFeeRequest) Reset() {\n\t*x = CalculateFeeRequest{}\n\tmi := &file_transaction_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CalculateFeeRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CalculateFeeRequest) ProtoMessage() {}\n\nfunc (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CalculateFeeRequest.ProtoReflect.Descriptor instead.\nfunc (*CalculateFeeRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *CalculateFeeRequest) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\nfunc (x *CalculateFeeRequest) GetPayloadType() PayloadType {\n\tif x != nil {\n\t\treturn x.PayloadType\n\t}\n\treturn PayloadType_PAYLOAD_TYPE_UNSPECIFIED\n}\n\nfunc (x *CalculateFeeRequest) GetFixedAmount() bool {\n\tif x != nil {\n\t\treturn x.FixedAmount\n\t}\n\treturn false\n}\n\n// Response message contains the calculated transaction fee.\ntype CalculateFeeResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The calculated amount in NanoPAC.\n\tAmount int64 `protobuf:\"varint,1,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\t// The calculated transaction fee in NanoPAC.\n\tFee           int64 `protobuf:\"varint,2,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CalculateFeeResponse) Reset() {\n\t*x = CalculateFeeResponse{}\n\tmi := &file_transaction_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CalculateFeeResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CalculateFeeResponse) ProtoMessage() {}\n\nfunc (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CalculateFeeResponse.ProtoReflect.Descriptor instead.\nfunc (*CalculateFeeResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *CalculateFeeResponse) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\nfunc (x *CalculateFeeResponse) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\n// Request message for broadcasting a signed transaction to the network.\ntype BroadcastTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The signed raw transaction data to be broadcasted.\n\tSignedRawTransaction string `protobuf:\"bytes,1,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3\" json:\"signed_raw_transaction,omitempty\"`\n\tunknownFields        protoimpl.UnknownFields\n\tsizeCache            protoimpl.SizeCache\n}\n\nfunc (x *BroadcastTransactionRequest) Reset() {\n\t*x = BroadcastTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *BroadcastTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*BroadcastTransactionRequest) ProtoMessage() {}\n\nfunc (x *BroadcastTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use BroadcastTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*BroadcastTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *BroadcastTransactionRequest) GetSignedRawTransaction() string {\n\tif x != nil {\n\t\treturn x.SignedRawTransaction\n\t}\n\treturn \"\"\n}\n\n// Response message contains the ID of the broadcasted transaction.\ntype BroadcastTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The unique ID of the broadcasted transaction.\n\tId            string `protobuf:\"bytes,1,opt,name=id,proto3\" json:\"id,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *BroadcastTransactionResponse) Reset() {\n\t*x = BroadcastTransactionResponse{}\n\tmi := &file_transaction_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *BroadcastTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*BroadcastTransactionResponse) ProtoMessage() {}\n\nfunc (x *BroadcastTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use BroadcastTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*BroadcastTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *BroadcastTransactionResponse) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving raw details of a transfer transaction.\ntype GetRawTransferTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The lock time for the transaction. If not set, defaults to the last block height.\n\tLockTime uint32 `protobuf:\"varint,1,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The sender's account address.\n\tSender string `protobuf:\"bytes,2,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The receiver's account address.\n\tReceiver string `protobuf:\"bytes,3,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n\tAmount int64 `protobuf:\"varint,4,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\t// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n\tFee int64 `protobuf:\"varint,5,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo          string `protobuf:\"bytes,6,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetRawTransferTransactionRequest) Reset() {\n\t*x = GetRawTransferTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawTransferTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawTransferTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawTransferTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawTransferTransactionRequest) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving raw details of a bond transaction.\ntype GetRawBondTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The lock time for the transaction. If not set, defaults to the last block height.\n\tLockTime uint32 `protobuf:\"varint,1,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The sender's account address.\n\tSender string `protobuf:\"bytes,2,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The receiver's validator address.\n\tReceiver string `protobuf:\"bytes,3,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The stake amount in NanoPAC. Must be greater than 0.\n\tStake int64 `protobuf:\"varint,4,opt,name=stake,proto3\" json:\"stake,omitempty\"`\n\t// The public key of the validator.\n\t// Optional, but required when registering a new validator.;\n\tPublicKey string `protobuf:\"bytes,5,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n\tFee int64 `protobuf:\"varint,6,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo string `protobuf:\"bytes,7,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\t// The address of the delegate owner.\n\t// Optional, but required when registering a new validator with delegation.;\n\tDelegateOwner string `protobuf:\"bytes,8,opt,name=delegate_owner,json=delegateOwner,proto3\" json:\"delegate_owner,omitempty\"`\n\t// The share percentage for the delegate owner.\n\t// Optional, but required when registering a new validator with delegation.;\n\t// Must be between 0 and 0.7 PAC in nano PAC.\n\tDelegateShare int64 `protobuf:\"varint,9,opt,name=delegate_share,json=delegateShare,proto3\" json:\"delegate_share,omitempty\"`\n\t// The expiry height for the delegate relationship.\n\t// Optional, but required when registering a new validator with delegation.;\n\tDelegateExpiry uint32 `protobuf:\"varint,10,opt,name=delegate_expiry,json=delegateExpiry,proto3\" json:\"delegate_expiry,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *GetRawBondTransactionRequest) Reset() {\n\t*x = GetRawBondTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawBondTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawBondTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawBondTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *GetRawBondTransactionRequest) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBondTransactionRequest) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBondTransactionRequest) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBondTransactionRequest) GetStake() int64 {\n\tif x != nil {\n\t\treturn x.Stake\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBondTransactionRequest) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBondTransactionRequest) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBondTransactionRequest) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBondTransactionRequest) GetDelegateOwner() string {\n\tif x != nil {\n\t\treturn x.DelegateOwner\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBondTransactionRequest) GetDelegateShare() int64 {\n\tif x != nil {\n\t\treturn x.DelegateShare\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBondTransactionRequest) GetDelegateExpiry() uint32 {\n\tif x != nil {\n\t\treturn x.DelegateExpiry\n\t}\n\treturn 0\n}\n\n// Request message for retrieving raw details of an unbond transaction.\ntype GetRawUnbondTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The lock time for the transaction. If not set, defaults to the last block height.\n\tLockTime uint32 `protobuf:\"varint,1,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The address of the validator to unbond from.\n\tValidatorAddress string `protobuf:\"bytes,2,opt,name=validator_address,json=validatorAddress,proto3\" json:\"validator_address,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo string `protobuf:\"bytes,3,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\t// The address of the delegate owner.\n\t// Optional, but required when the validator is a delegated validator.;\n\tDelegateOwner string `protobuf:\"bytes,4,opt,name=delegate_owner,json=delegateOwner,proto3\" json:\"delegate_owner,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetRawUnbondTransactionRequest) Reset() {\n\t*x = GetRawUnbondTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawUnbondTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawUnbondTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawUnbondTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *GetRawUnbondTransactionRequest) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string {\n\tif x != nil {\n\t\treturn x.ValidatorAddress\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawUnbondTransactionRequest) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawUnbondTransactionRequest) GetDelegateOwner() string {\n\tif x != nil {\n\t\treturn x.DelegateOwner\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving raw details of a withdraw transaction.\ntype GetRawWithdrawTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The lock time for the transaction. If not set, defaults to the last block height.\n\tLockTime uint32 `protobuf:\"varint,1,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The address of the validator to withdraw from.\n\tValidatorAddress string `protobuf:\"bytes,2,opt,name=validator_address,json=validatorAddress,proto3\" json:\"validator_address,omitempty\"`\n\t// The address of the account to withdraw to.\n\tAccountAddress string `protobuf:\"bytes,3,opt,name=account_address,json=accountAddress,proto3\" json:\"account_address,omitempty\"`\n\t// The withdrawal amount in NanoPAC. Must be greater than 0.\n\tAmount int64 `protobuf:\"varint,4,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\t// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n\tFee int64 `protobuf:\"varint,5,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo          string `protobuf:\"bytes,6,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) Reset() {\n\t*x = GetRawWithdrawTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawWithdrawTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawWithdrawTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetValidatorAddress() string {\n\tif x != nil {\n\t\treturn x.ValidatorAddress\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetAccountAddress() string {\n\tif x != nil {\n\t\treturn x.AccountAddress\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawWithdrawTransactionRequest) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\n// Request message for retrieving raw details of a batch transfer transaction.\ntype GetRawBatchTransferTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The lock time for the transaction. If not set, defaults to the last block height.\n\tLockTime uint32 `protobuf:\"varint,1,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The sender's account address.\n\tSender string `protobuf:\"bytes,2,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The list of recipients with their amounts. Minimum 2 recipients required.\n\tRecipients []*Recipient `protobuf:\"bytes,3,rep,name=recipients,proto3\" json:\"recipients,omitempty\"`\n\t// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n\tFee int64 `protobuf:\"varint,4,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo          string `protobuf:\"bytes,5,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) Reset() {\n\t*x = GetRawBatchTransferTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawBatchTransferTransactionRequest) ProtoMessage() {}\n\nfunc (x *GetRawBatchTransferTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawBatchTransferTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*GetRawBatchTransferTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) GetRecipients() []*Recipient {\n\tif x != nil {\n\t\treturn x.Recipients\n\t}\n\treturn nil\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *GetRawBatchTransferTransactionRequest) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\n// Response message contains raw transaction data.\ntype GetRawTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The raw transaction data in hexadecimal format.\n\tRawTransaction string `protobuf:\"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3\" json:\"raw_transaction,omitempty\"`\n\t// The unique ID of the transaction.\n\tId            string `protobuf:\"bytes,2,opt,name=id,proto3\" json:\"id,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetRawTransactionResponse) Reset() {\n\t*x = GetRawTransactionResponse{}\n\tmi := &file_transaction_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetRawTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetRawTransactionResponse) ProtoMessage() {}\n\nfunc (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetRawTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*GetRawTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *GetRawTransactionResponse) GetRawTransaction() string {\n\tif x != nil {\n\t\treturn x.RawTransaction\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetRawTransactionResponse) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\n// Payload for a transfer transaction.\ntype PayloadTransfer struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The sender's address.\n\tSender string `protobuf:\"bytes,1,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The receiver's address.\n\tReceiver string `protobuf:\"bytes,2,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The amount to be transferred in NanoPAC.\n\tAmount        int64 `protobuf:\"varint,3,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PayloadTransfer) Reset() {\n\t*x = PayloadTransfer{}\n\tmi := &file_transaction_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadTransfer) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadTransfer) ProtoMessage() {}\n\nfunc (x *PayloadTransfer) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadTransfer.ProtoReflect.Descriptor instead.\nfunc (*PayloadTransfer) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *PayloadTransfer) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadTransfer) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadTransfer) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\n// Payload for a bond transaction.\ntype PayloadBond struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The sender's address.\n\tSender string `protobuf:\"bytes,1,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The receiver's address.\n\tReceiver string `protobuf:\"bytes,2,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The stake amount in NanoPAC.\n\tStake int64 `protobuf:\"varint,3,opt,name=stake,proto3\" json:\"stake,omitempty\"`\n\t// The public key of the validator.\n\tPublicKey string `protobuf:\"bytes,4,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// Indicates whether the bond transaction is a delegation.\n\tIsDelegated bool `protobuf:\"varint,5,opt,name=is_delegated,json=isDelegated,proto3\" json:\"is_delegated,omitempty\"`\n\t// The address of the delegate owner.\n\t// Optional, but required when registering a new validator with delegation.;\n\tDelegateOwner string `protobuf:\"bytes,6,opt,name=delegate_owner,json=delegateOwner,proto3\" json:\"delegate_owner,omitempty\"`\n\t// The share percentage for the delegate owner.\n\t// Optional, but required when registering a new validator with delegation.;\n\t// Must be between 0 and 0.7 PAC in nano PAC.\n\tDelegateShare int64 `protobuf:\"varint,7,opt,name=delegate_share,json=delegateShare,proto3\" json:\"delegate_share,omitempty\"`\n\t// The expiry height for the delegate relationship.\n\t// Optional, but required when registering a new validator with delegation.;\n\tDelegateExpiry uint32 `protobuf:\"varint,8,opt,name=delegate_expiry,json=delegateExpiry,proto3\" json:\"delegate_expiry,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *PayloadBond) Reset() {\n\t*x = PayloadBond{}\n\tmi := &file_transaction_proto_msgTypes[13]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadBond) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadBond) ProtoMessage() {}\n\nfunc (x *PayloadBond) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[13]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadBond.ProtoReflect.Descriptor instead.\nfunc (*PayloadBond) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *PayloadBond) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadBond) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadBond) GetStake() int64 {\n\tif x != nil {\n\t\treturn x.Stake\n\t}\n\treturn 0\n}\n\nfunc (x *PayloadBond) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadBond) GetIsDelegated() bool {\n\tif x != nil {\n\t\treturn x.IsDelegated\n\t}\n\treturn false\n}\n\nfunc (x *PayloadBond) GetDelegateOwner() string {\n\tif x != nil {\n\t\treturn x.DelegateOwner\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadBond) GetDelegateShare() int64 {\n\tif x != nil {\n\t\treturn x.DelegateShare\n\t}\n\treturn 0\n}\n\nfunc (x *PayloadBond) GetDelegateExpiry() uint32 {\n\tif x != nil {\n\t\treturn x.DelegateExpiry\n\t}\n\treturn 0\n}\n\n// Payload for a sortition transaction.\ntype PayloadSortition struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The validator address associated with the sortition proof.\n\tAddress string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The proof for the sortition.\n\tProof         string `protobuf:\"bytes,2,opt,name=proof,proto3\" json:\"proof,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PayloadSortition) Reset() {\n\t*x = PayloadSortition{}\n\tmi := &file_transaction_proto_msgTypes[14]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadSortition) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadSortition) ProtoMessage() {}\n\nfunc (x *PayloadSortition) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[14]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadSortition.ProtoReflect.Descriptor instead.\nfunc (*PayloadSortition) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *PayloadSortition) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadSortition) GetProof() string {\n\tif x != nil {\n\t\treturn x.Proof\n\t}\n\treturn \"\"\n}\n\n// Payload for an unbond transaction.\ntype PayloadUnbond struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address of the validator to unbond from.\n\tValidator string `protobuf:\"bytes,1,opt,name=validator,proto3\" json:\"validator,omitempty\"`\n\t// The address of the delegate owner.\n\t// Optional, but required when the validator is a delegated validator.;\n\tDelegateOwner string `protobuf:\"bytes,2,opt,name=delegate_owner,json=delegateOwner,proto3\" json:\"delegate_owner,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PayloadUnbond) Reset() {\n\t*x = PayloadUnbond{}\n\tmi := &file_transaction_proto_msgTypes[15]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadUnbond) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadUnbond) ProtoMessage() {}\n\nfunc (x *PayloadUnbond) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[15]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadUnbond.ProtoReflect.Descriptor instead.\nfunc (*PayloadUnbond) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (x *PayloadUnbond) GetValidator() string {\n\tif x != nil {\n\t\treturn x.Validator\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadUnbond) GetDelegateOwner() string {\n\tif x != nil {\n\t\treturn x.DelegateOwner\n\t}\n\treturn \"\"\n}\n\n// Payload for a withdraw transaction.\ntype PayloadWithdraw struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address of the validator to withdraw from.\n\tValidatorAddress string `protobuf:\"bytes,1,opt,name=validator_address,json=validatorAddress,proto3\" json:\"validator_address,omitempty\"`\n\t// The address of the account to withdraw to.\n\tAccountAddress string `protobuf:\"bytes,2,opt,name=account_address,json=accountAddress,proto3\" json:\"account_address,omitempty\"`\n\t// The withdrawal amount in NanoPAC.\n\tAmount        int64 `protobuf:\"varint,3,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PayloadWithdraw) Reset() {\n\t*x = PayloadWithdraw{}\n\tmi := &file_transaction_proto_msgTypes[16]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadWithdraw) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadWithdraw) ProtoMessage() {}\n\nfunc (x *PayloadWithdraw) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[16]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadWithdraw.ProtoReflect.Descriptor instead.\nfunc (*PayloadWithdraw) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *PayloadWithdraw) GetValidatorAddress() string {\n\tif x != nil {\n\t\treturn x.ValidatorAddress\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadWithdraw) GetAccountAddress() string {\n\tif x != nil {\n\t\treturn x.AccountAddress\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadWithdraw) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\n// Payload for a batch transfer transaction.\ntype PayloadBatchTransfer struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The sender's address.\n\tSender string `protobuf:\"bytes,1,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The list of recipients with their amounts.\n\tRecipients    []*Recipient `protobuf:\"bytes,2,rep,name=recipients,proto3\" json:\"recipients,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PayloadBatchTransfer) Reset() {\n\t*x = PayloadBatchTransfer{}\n\tmi := &file_transaction_proto_msgTypes[17]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PayloadBatchTransfer) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PayloadBatchTransfer) ProtoMessage() {}\n\nfunc (x *PayloadBatchTransfer) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[17]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PayloadBatchTransfer.ProtoReflect.Descriptor instead.\nfunc (*PayloadBatchTransfer) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{17}\n}\n\nfunc (x *PayloadBatchTransfer) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *PayloadBatchTransfer) GetRecipients() []*Recipient {\n\tif x != nil {\n\t\treturn x.Recipients\n\t}\n\treturn nil\n}\n\n// Recipient is receiver with amount.\ntype Recipient struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The receiver's address.\n\tReceiver string `protobuf:\"bytes,1,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The amount in NanoPAC.\n\tAmount        int64 `protobuf:\"varint,2,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *Recipient) Reset() {\n\t*x = Recipient{}\n\tmi := &file_transaction_proto_msgTypes[18]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *Recipient) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Recipient) ProtoMessage() {}\n\nfunc (x *Recipient) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[18]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Recipient.ProtoReflect.Descriptor instead.\nfunc (*Recipient) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *Recipient) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *Recipient) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\n// Information about a transaction.\ntype TransactionInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The unique ID of the transaction.\n\tId string `protobuf:\"bytes,1,opt,name=id,proto3\" json:\"id,omitempty\"`\n\t// The raw transaction data in hexadecimal format.\n\tData string `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n\t// The version of the transaction.\n\tVersion int32 `protobuf:\"varint,3,opt,name=version,proto3\" json:\"version,omitempty\"`\n\t// The lock time for the transaction.\n\tLockTime uint32 `protobuf:\"varint,4,opt,name=lock_time,json=lockTime,proto3\" json:\"lock_time,omitempty\"`\n\t// The value of the transaction in NanoPAC.\n\tValue int64 `protobuf:\"varint,5,opt,name=value,proto3\" json:\"value,omitempty\"`\n\t// The fee for the transaction in NanoPAC.\n\tFee int64 `protobuf:\"varint,6,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// The type of transaction payload.\n\tPayloadType PayloadType `protobuf:\"varint,7,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType\" json:\"payload_type,omitempty\"`\n\t// Transaction payload.\n\t//\n\t// Types that are valid to be assigned to Payload:\n\t//\n\t//\t*TransactionInfo_Transfer\n\t//\t*TransactionInfo_Bond\n\t//\t*TransactionInfo_Sortition\n\t//\t*TransactionInfo_Unbond\n\t//\t*TransactionInfo_Withdraw\n\t//\t*TransactionInfo_BatchTransfer\n\tPayload isTransactionInfo_Payload `protobuf_oneof:\"payload\"`\n\t// A memo string for the transaction.\n\tMemo string `protobuf:\"bytes,8,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\t// The public key associated with the transaction.\n\tPublicKey string `protobuf:\"bytes,9,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// The signature for the transaction.\n\tSignature string `protobuf:\"bytes,10,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\t// The block height containing the transaction.\n\t// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n\tBlockHeight uint32 `protobuf:\"varint,11,opt,name=block_height,json=blockHeight,proto3\" json:\"block_height,omitempty\"`\n\t// Indicates whether the transaction is confirmed.\n\tConfirmed bool `protobuf:\"varint,12,opt,name=confirmed,proto3\" json:\"confirmed,omitempty\"`\n\t// The number of blocks that have been added to the chain after this transaction was included in a block.\n\t// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n\tConfirmations int32 `protobuf:\"varint,13,opt,name=confirmations,proto3\" json:\"confirmations,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *TransactionInfo) Reset() {\n\t*x = TransactionInfo{}\n\tmi := &file_transaction_proto_msgTypes[19]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *TransactionInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*TransactionInfo) ProtoMessage() {}\n\nfunc (x *TransactionInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[19]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead.\nfunc (*TransactionInfo) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{19}\n}\n\nfunc (x *TransactionInfo) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\nfunc (x *TransactionInfo) GetData() string {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn \"\"\n}\n\nfunc (x *TransactionInfo) GetVersion() int32 {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn 0\n}\n\nfunc (x *TransactionInfo) GetLockTime() uint32 {\n\tif x != nil {\n\t\treturn x.LockTime\n\t}\n\treturn 0\n}\n\nfunc (x *TransactionInfo) GetValue() int64 {\n\tif x != nil {\n\t\treturn x.Value\n\t}\n\treturn 0\n}\n\nfunc (x *TransactionInfo) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *TransactionInfo) GetPayloadType() PayloadType {\n\tif x != nil {\n\t\treturn x.PayloadType\n\t}\n\treturn PayloadType_PAYLOAD_TYPE_UNSPECIFIED\n}\n\nfunc (x *TransactionInfo) GetPayload() isTransactionInfo_Payload {\n\tif x != nil {\n\t\treturn x.Payload\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetTransfer() *PayloadTransfer {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_Transfer); ok {\n\t\t\treturn x.Transfer\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetBond() *PayloadBond {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_Bond); ok {\n\t\t\treturn x.Bond\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetSortition() *PayloadSortition {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_Sortition); ok {\n\t\t\treturn x.Sortition\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetUnbond() *PayloadUnbond {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_Unbond); ok {\n\t\t\treturn x.Unbond\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetWithdraw() *PayloadWithdraw {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_Withdraw); ok {\n\t\t\treturn x.Withdraw\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetBatchTransfer() *PayloadBatchTransfer {\n\tif x != nil {\n\t\tif x, ok := x.Payload.(*TransactionInfo_BatchTransfer); ok {\n\t\t\treturn x.BatchTransfer\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (x *TransactionInfo) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\nfunc (x *TransactionInfo) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *TransactionInfo) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\nfunc (x *TransactionInfo) GetBlockHeight() uint32 {\n\tif x != nil {\n\t\treturn x.BlockHeight\n\t}\n\treturn 0\n}\n\nfunc (x *TransactionInfo) GetConfirmed() bool {\n\tif x != nil {\n\t\treturn x.Confirmed\n\t}\n\treturn false\n}\n\nfunc (x *TransactionInfo) GetConfirmations() int32 {\n\tif x != nil {\n\t\treturn x.Confirmations\n\t}\n\treturn 0\n}\n\ntype isTransactionInfo_Payload interface {\n\tisTransactionInfo_Payload()\n}\n\ntype TransactionInfo_Transfer struct {\n\t// Transfer transaction payload.\n\tTransfer *PayloadTransfer `protobuf:\"bytes,30,opt,name=transfer,proto3,oneof\"`\n}\n\ntype TransactionInfo_Bond struct {\n\t// Bond transaction payload.\n\tBond *PayloadBond `protobuf:\"bytes,31,opt,name=bond,proto3,oneof\"`\n}\n\ntype TransactionInfo_Sortition struct {\n\t// Sortition transaction payload.\n\tSortition *PayloadSortition `protobuf:\"bytes,32,opt,name=sortition,proto3,oneof\"`\n}\n\ntype TransactionInfo_Unbond struct {\n\t// Unbond transaction payload.\n\tUnbond *PayloadUnbond `protobuf:\"bytes,33,opt,name=unbond,proto3,oneof\"`\n}\n\ntype TransactionInfo_Withdraw struct {\n\t// Withdraw transaction payload.\n\tWithdraw *PayloadWithdraw `protobuf:\"bytes,34,opt,name=withdraw,proto3,oneof\"`\n}\n\ntype TransactionInfo_BatchTransfer struct {\n\t// Batch Transfer transaction payload.\n\tBatchTransfer *PayloadBatchTransfer `protobuf:\"bytes,35,opt,name=batch_transfer,json=batchTransfer,proto3,oneof\"`\n}\n\nfunc (*TransactionInfo_Transfer) isTransactionInfo_Payload() {}\n\nfunc (*TransactionInfo_Bond) isTransactionInfo_Payload() {}\n\nfunc (*TransactionInfo_Sortition) isTransactionInfo_Payload() {}\n\nfunc (*TransactionInfo_Unbond) isTransactionInfo_Payload() {}\n\nfunc (*TransactionInfo_Withdraw) isTransactionInfo_Payload() {}\n\nfunc (*TransactionInfo_BatchTransfer) isTransactionInfo_Payload() {}\n\n// Request message for decoding a raw transaction.\ntype DecodeRawTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The raw transaction data in hexadecimal format.\n\tRawTransaction string `protobuf:\"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3\" json:\"raw_transaction,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *DecodeRawTransactionRequest) Reset() {\n\t*x = DecodeRawTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[20]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DecodeRawTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DecodeRawTransactionRequest) ProtoMessage() {}\n\nfunc (x *DecodeRawTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[20]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DecodeRawTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*DecodeRawTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{20}\n}\n\nfunc (x *DecodeRawTransactionRequest) GetRawTransaction() string {\n\tif x != nil {\n\t\treturn x.RawTransaction\n\t}\n\treturn \"\"\n}\n\n// Response message contains the decoded transaction.\ntype DecodeRawTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The decoded transaction information.\n\tTransaction   *TransactionInfo `protobuf:\"bytes,1,opt,name=transaction,proto3\" json:\"transaction,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *DecodeRawTransactionResponse) Reset() {\n\t*x = DecodeRawTransactionResponse{}\n\tmi := &file_transaction_proto_msgTypes[21]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *DecodeRawTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DecodeRawTransactionResponse) ProtoMessage() {}\n\nfunc (x *DecodeRawTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[21]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DecodeRawTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*DecodeRawTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{21}\n}\n\nfunc (x *DecodeRawTransactionResponse) GetTransaction() *TransactionInfo {\n\tif x != nil {\n\t\treturn x.Transaction\n\t}\n\treturn nil\n}\n\n// Request message for checking a transaction.\ntype CheckTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The raw transaction data to be checked.\n\tRawTransaction string `protobuf:\"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3\" json:\"raw_transaction,omitempty\"`\n\tunknownFields  protoimpl.UnknownFields\n\tsizeCache      protoimpl.SizeCache\n}\n\nfunc (x *CheckTransactionRequest) Reset() {\n\t*x = CheckTransactionRequest{}\n\tmi := &file_transaction_proto_msgTypes[22]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CheckTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CheckTransactionRequest) ProtoMessage() {}\n\nfunc (x *CheckTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[22]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CheckTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*CheckTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{22}\n}\n\nfunc (x *CheckTransactionRequest) GetRawTransaction() string {\n\tif x != nil {\n\t\treturn x.RawTransaction\n\t}\n\treturn \"\"\n}\n\n// Response message contains the result of the transaction check.\ntype CheckTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Indicates whether the transaction is valid.\n\tIsValid bool `protobuf:\"varint,1,opt,name=is_valid,json=isValid,proto3\" json:\"is_valid,omitempty\"`\n\t// An error message if the transaction is invalid.\n\t// Empty if the transaction is valid.\n\tErrorMessage  string `protobuf:\"bytes,2,opt,name=error_message,json=errorMessage,proto3\" json:\"error_message,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CheckTransactionResponse) Reset() {\n\t*x = CheckTransactionResponse{}\n\tmi := &file_transaction_proto_msgTypes[23]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CheckTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CheckTransactionResponse) ProtoMessage() {}\n\nfunc (x *CheckTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_transaction_proto_msgTypes[23]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CheckTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*CheckTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_transaction_proto_rawDescGZIP(), []int{23}\n}\n\nfunc (x *CheckTransactionResponse) GetIsValid() bool {\n\tif x != nil {\n\t\treturn x.IsValid\n\t}\n\treturn false\n}\n\nfunc (x *CheckTransactionResponse) GetErrorMessage() string {\n\tif x != nil {\n\t\treturn x.ErrorMessage\n\t}\n\treturn \"\"\n}\n\nvar File_transaction_proto protoreflect.FileDescriptor\n\nconst file_transaction_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\x11transaction.proto\\x12\\x06pactus\\\"c\\n\" +\n\t\"\\x15GetTransactionRequest\\x12\\x0e\\n\" +\n\t\"\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\x12:\\n\" +\n\t\"\\tverbosity\\x18\\x02 \\x01(\\x0e2\\x1c.pactus.TransactionVerbosityR\\tverbosity\\\"\\x95\\x01\\n\" +\n\t\"\\x16GetTransactionResponse\\x12!\\n\" +\n\t\"\\fblock_height\\x18\\x01 \\x01(\\rR\\vblockHeight\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"block_time\\x18\\x02 \\x01(\\rR\\tblockTime\\x129\\n\" +\n\t\"\\vtransaction\\x18\\x03 \\x01(\\v2\\x17.pactus.TransactionInfoR\\vtransaction\\\"\\x88\\x01\\n\" +\n\t\"\\x13CalculateFeeRequest\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x01 \\x01(\\x03R\\x06amount\\x126\\n\" +\n\t\"\\fpayload_type\\x18\\x02 \\x01(\\x0e2\\x13.pactus.PayloadTypeR\\vpayloadType\\x12!\\n\" +\n\t\"\\ffixed_amount\\x18\\x03 \\x01(\\bR\\vfixedAmount\\\"@\\n\" +\n\t\"\\x14CalculateFeeResponse\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x01 \\x01(\\x03R\\x06amount\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x02 \\x01(\\x03R\\x03fee\\\"S\\n\" +\n\t\"\\x1bBroadcastTransactionRequest\\x124\\n\" +\n\t\"\\x16signed_raw_transaction\\x18\\x01 \\x01(\\tR\\x14signedRawTransaction\\\".\\n\" +\n\t\"\\x1cBroadcastTransactionResponse\\x12\\x0e\\n\" +\n\t\"\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\\"\\xb1\\x01\\n\" +\n\t\" GetRawTransferTransactionRequest\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x01 \\x01(\\rR\\blockTime\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x03 \\x01(\\tR\\breceiver\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x04 \\x01(\\x03R\\x06amount\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x05 \\x01(\\x03R\\x03fee\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\x06 \\x01(\\tR\\x04memo\\\"\\xc1\\x02\\n\" +\n\t\"\\x1cGetRawBondTransactionRequest\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x01 \\x01(\\rR\\blockTime\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x03 \\x01(\\tR\\breceiver\\x12\\x14\\n\" +\n\t\"\\x05stake\\x18\\x04 \\x01(\\x03R\\x05stake\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x05 \\x01(\\tR\\tpublicKey\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x06 \\x01(\\x03R\\x03fee\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\a \\x01(\\tR\\x04memo\\x12%\\n\" +\n\t\"\\x0edelegate_owner\\x18\\b \\x01(\\tR\\rdelegateOwner\\x12%\\n\" +\n\t\"\\x0edelegate_share\\x18\\t \\x01(\\x03R\\rdelegateShare\\x12'\\n\" +\n\t\"\\x0fdelegate_expiry\\x18\\n\" +\n\t\" \\x01(\\rR\\x0edelegateExpiry\\\"\\xa5\\x01\\n\" +\n\t\"\\x1eGetRawUnbondTransactionRequest\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x01 \\x01(\\rR\\blockTime\\x12+\\n\" +\n\t\"\\x11validator_address\\x18\\x02 \\x01(\\tR\\x10validatorAddress\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\x03 \\x01(\\tR\\x04memo\\x12%\\n\" +\n\t\"\\x0edelegate_owner\\x18\\x04 \\x01(\\tR\\rdelegateOwner\\\"\\xd3\\x01\\n\" +\n\t\" GetRawWithdrawTransactionRequest\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x01 \\x01(\\rR\\blockTime\\x12+\\n\" +\n\t\"\\x11validator_address\\x18\\x02 \\x01(\\tR\\x10validatorAddress\\x12'\\n\" +\n\t\"\\x0faccount_address\\x18\\x03 \\x01(\\tR\\x0eaccountAddress\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x04 \\x01(\\x03R\\x06amount\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x05 \\x01(\\x03R\\x03fee\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\x06 \\x01(\\tR\\x04memo\\\"\\xb5\\x01\\n\" +\n\t\"%GetRawBatchTransferTransactionRequest\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x01 \\x01(\\rR\\blockTime\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x121\\n\" +\n\t\"\\n\" +\n\t\"recipients\\x18\\x03 \\x03(\\v2\\x11.pactus.RecipientR\\n\" +\n\t\"recipients\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x04 \\x01(\\x03R\\x03fee\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\x05 \\x01(\\tR\\x04memo\\\"T\\n\" +\n\t\"\\x19GetRawTransactionResponse\\x12'\\n\" +\n\t\"\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\x12\\x0e\\n\" +\n\t\"\\x02id\\x18\\x02 \\x01(\\tR\\x02id\\\"]\\n\" +\n\t\"\\x0fPayloadTransfer\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x02 \\x01(\\tR\\breceiver\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x03 \\x01(\\x03R\\x06amount\\\"\\x90\\x02\\n\" +\n\t\"\\vPayloadBond\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x02 \\x01(\\tR\\breceiver\\x12\\x14\\n\" +\n\t\"\\x05stake\\x18\\x03 \\x01(\\x03R\\x05stake\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x04 \\x01(\\tR\\tpublicKey\\x12!\\n\" +\n\t\"\\fis_delegated\\x18\\x05 \\x01(\\bR\\visDelegated\\x12%\\n\" +\n\t\"\\x0edelegate_owner\\x18\\x06 \\x01(\\tR\\rdelegateOwner\\x12%\\n\" +\n\t\"\\x0edelegate_share\\x18\\a \\x01(\\x03R\\rdelegateShare\\x12'\\n\" +\n\t\"\\x0fdelegate_expiry\\x18\\b \\x01(\\rR\\x0edelegateExpiry\\\"B\\n\" +\n\t\"\\x10PayloadSortition\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\x12\\x14\\n\" +\n\t\"\\x05proof\\x18\\x02 \\x01(\\tR\\x05proof\\\"T\\n\" +\n\t\"\\rPayloadUnbond\\x12\\x1c\\n\" +\n\t\"\\tvalidator\\x18\\x01 \\x01(\\tR\\tvalidator\\x12%\\n\" +\n\t\"\\x0edelegate_owner\\x18\\x02 \\x01(\\tR\\rdelegateOwner\\\"\\x7f\\n\" +\n\t\"\\x0fPayloadWithdraw\\x12+\\n\" +\n\t\"\\x11validator_address\\x18\\x01 \\x01(\\tR\\x10validatorAddress\\x12'\\n\" +\n\t\"\\x0faccount_address\\x18\\x02 \\x01(\\tR\\x0eaccountAddress\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x03 \\x01(\\x03R\\x06amount\\\"a\\n\" +\n\t\"\\x14PayloadBatchTransfer\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x121\\n\" +\n\t\"\\n\" +\n\t\"recipients\\x18\\x02 \\x03(\\v2\\x11.pactus.RecipientR\\n\" +\n\t\"recipients\\\"?\\n\" +\n\t\"\\tRecipient\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x01 \\x01(\\tR\\breceiver\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x02 \\x01(\\x03R\\x06amount\\\"\\xda\\x05\\n\" +\n\t\"\\x0fTransactionInfo\\x12\\x0e\\n\" +\n\t\"\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\x02 \\x01(\\tR\\x04data\\x12\\x18\\n\" +\n\t\"\\aversion\\x18\\x03 \\x01(\\x05R\\aversion\\x12\\x1b\\n\" +\n\t\"\\tlock_time\\x18\\x04 \\x01(\\rR\\blockTime\\x12\\x14\\n\" +\n\t\"\\x05value\\x18\\x05 \\x01(\\x03R\\x05value\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\x06 \\x01(\\x03R\\x03fee\\x126\\n\" +\n\t\"\\fpayload_type\\x18\\a \\x01(\\x0e2\\x13.pactus.PayloadTypeR\\vpayloadType\\x125\\n\" +\n\t\"\\btransfer\\x18\\x1e \\x01(\\v2\\x17.pactus.PayloadTransferH\\x00R\\btransfer\\x12)\\n\" +\n\t\"\\x04bond\\x18\\x1f \\x01(\\v2\\x13.pactus.PayloadBondH\\x00R\\x04bond\\x128\\n\" +\n\t\"\\tsortition\\x18  \\x01(\\v2\\x18.pactus.PayloadSortitionH\\x00R\\tsortition\\x12/\\n\" +\n\t\"\\x06unbond\\x18! \\x01(\\v2\\x15.pactus.PayloadUnbondH\\x00R\\x06unbond\\x125\\n\" +\n\t\"\\bwithdraw\\x18\\\" \\x01(\\v2\\x17.pactus.PayloadWithdrawH\\x00R\\bwithdraw\\x12E\\n\" +\n\t\"\\x0ebatch_transfer\\x18# \\x01(\\v2\\x1c.pactus.PayloadBatchTransferH\\x00R\\rbatchTransfer\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\b \\x01(\\tR\\x04memo\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\t \\x01(\\tR\\tpublicKey\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\n\" +\n\t\" \\x01(\\tR\\tsignature\\x12!\\n\" +\n\t\"\\fblock_height\\x18\\v \\x01(\\rR\\vblockHeight\\x12\\x1c\\n\" +\n\t\"\\tconfirmed\\x18\\f \\x01(\\bR\\tconfirmed\\x12$\\n\" +\n\t\"\\rconfirmations\\x18\\r \\x01(\\x05R\\rconfirmationsB\\t\\n\" +\n\t\"\\apayload\\\"F\\n\" +\n\t\"\\x1bDecodeRawTransactionRequest\\x12'\\n\" +\n\t\"\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\\"Y\\n\" +\n\t\"\\x1cDecodeRawTransactionResponse\\x129\\n\" +\n\t\"\\vtransaction\\x18\\x01 \\x01(\\v2\\x17.pactus.TransactionInfoR\\vtransaction\\\"B\\n\" +\n\t\"\\x17CheckTransactionRequest\\x12'\\n\" +\n\t\"\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\\"Z\\n\" +\n\t\"\\x18CheckTransactionResponse\\x12\\x19\\n\" +\n\t\"\\bis_valid\\x18\\x01 \\x01(\\bR\\aisValid\\x12#\\n\" +\n\t\"\\rerror_message\\x18\\x02 \\x01(\\tR\\ferrorMessage*\\xce\\x01\\n\" +\n\t\"\\vPayloadType\\x12\\x1c\\n\" +\n\t\"\\x18PAYLOAD_TYPE_UNSPECIFIED\\x10\\x00\\x12\\x19\\n\" +\n\t\"\\x15PAYLOAD_TYPE_TRANSFER\\x10\\x01\\x12\\x15\\n\" +\n\t\"\\x11PAYLOAD_TYPE_BOND\\x10\\x02\\x12\\x1a\\n\" +\n\t\"\\x16PAYLOAD_TYPE_SORTITION\\x10\\x03\\x12\\x17\\n\" +\n\t\"\\x13PAYLOAD_TYPE_UNBOND\\x10\\x04\\x12\\x19\\n\" +\n\t\"\\x15PAYLOAD_TYPE_WITHDRAW\\x10\\x05\\x12\\x1f\\n\" +\n\t\"\\x1bPAYLOAD_TYPE_BATCH_TRANSFER\\x10\\x06*V\\n\" +\n\t\"\\x14TransactionVerbosity\\x12\\x1e\\n\" +\n\t\"\\x1aTRANSACTION_VERBOSITY_DATA\\x10\\x00\\x12\\x1e\\n\" +\n\t\"\\x1aTRANSACTION_VERBOSITY_INFO\\x10\\x012\\xd6\\a\\n\" +\n\t\"\\vTransaction\\x12O\\n\" +\n\t\"\\x0eGetTransaction\\x12\\x1d.pactus.GetTransactionRequest\\x1a\\x1e.pactus.GetTransactionResponse\\x12I\\n\" +\n\t\"\\fCalculateFee\\x12\\x1b.pactus.CalculateFeeRequest\\x1a\\x1c.pactus.CalculateFeeResponse\\x12a\\n\" +\n\t\"\\x14BroadcastTransaction\\x12#.pactus.BroadcastTransactionRequest\\x1a$.pactus.BroadcastTransactionResponse\\x12h\\n\" +\n\t\"\\x19GetRawTransferTransaction\\x12(.pactus.GetRawTransferTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12`\\n\" +\n\t\"\\x15GetRawBondTransaction\\x12$.pactus.GetRawBondTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12d\\n\" +\n\t\"\\x17GetRawUnbondTransaction\\x12&.pactus.GetRawUnbondTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12h\\n\" +\n\t\"\\x19GetRawWithdrawTransaction\\x12(.pactus.GetRawWithdrawTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12r\\n\" +\n\t\"\\x1eGetRawBatchTransferTransaction\\x12-.pactus.GetRawBatchTransferTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12a\\n\" +\n\t\"\\x14DecodeRawTransaction\\x12#.pactus.DecodeRawTransactionRequest\\x1a$.pactus.DecodeRawTransactionResponse\\x12U\\n\" +\n\t\"\\x10CheckTransaction\\x12\\x1f.pactus.CheckTransactionRequest\\x1a .pactus.CheckTransactionResponseB:\\n\" +\n\t\"\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3\"\n\nvar (\n\tfile_transaction_proto_rawDescOnce sync.Once\n\tfile_transaction_proto_rawDescData []byte\n)\n\nfunc file_transaction_proto_rawDescGZIP() []byte {\n\tfile_transaction_proto_rawDescOnce.Do(func() {\n\t\tfile_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_transaction_proto_rawDesc), len(file_transaction_proto_rawDesc)))\n\t})\n\treturn file_transaction_proto_rawDescData\n}\n\nvar file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2)\nvar file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 24)\nvar file_transaction_proto_goTypes = []any{\n\t(PayloadType)(0),                              // 0: pactus.PayloadType\n\t(TransactionVerbosity)(0),                     // 1: pactus.TransactionVerbosity\n\t(*GetTransactionRequest)(nil),                 // 2: pactus.GetTransactionRequest\n\t(*GetTransactionResponse)(nil),                // 3: pactus.GetTransactionResponse\n\t(*CalculateFeeRequest)(nil),                   // 4: pactus.CalculateFeeRequest\n\t(*CalculateFeeResponse)(nil),                  // 5: pactus.CalculateFeeResponse\n\t(*BroadcastTransactionRequest)(nil),           // 6: pactus.BroadcastTransactionRequest\n\t(*BroadcastTransactionResponse)(nil),          // 7: pactus.BroadcastTransactionResponse\n\t(*GetRawTransferTransactionRequest)(nil),      // 8: pactus.GetRawTransferTransactionRequest\n\t(*GetRawBondTransactionRequest)(nil),          // 9: pactus.GetRawBondTransactionRequest\n\t(*GetRawUnbondTransactionRequest)(nil),        // 10: pactus.GetRawUnbondTransactionRequest\n\t(*GetRawWithdrawTransactionRequest)(nil),      // 11: pactus.GetRawWithdrawTransactionRequest\n\t(*GetRawBatchTransferTransactionRequest)(nil), // 12: pactus.GetRawBatchTransferTransactionRequest\n\t(*GetRawTransactionResponse)(nil),             // 13: pactus.GetRawTransactionResponse\n\t(*PayloadTransfer)(nil),                       // 14: pactus.PayloadTransfer\n\t(*PayloadBond)(nil),                           // 15: pactus.PayloadBond\n\t(*PayloadSortition)(nil),                      // 16: pactus.PayloadSortition\n\t(*PayloadUnbond)(nil),                         // 17: pactus.PayloadUnbond\n\t(*PayloadWithdraw)(nil),                       // 18: pactus.PayloadWithdraw\n\t(*PayloadBatchTransfer)(nil),                  // 19: pactus.PayloadBatchTransfer\n\t(*Recipient)(nil),                             // 20: pactus.Recipient\n\t(*TransactionInfo)(nil),                       // 21: pactus.TransactionInfo\n\t(*DecodeRawTransactionRequest)(nil),           // 22: pactus.DecodeRawTransactionRequest\n\t(*DecodeRawTransactionResponse)(nil),          // 23: pactus.DecodeRawTransactionResponse\n\t(*CheckTransactionRequest)(nil),               // 24: pactus.CheckTransactionRequest\n\t(*CheckTransactionResponse)(nil),              // 25: pactus.CheckTransactionResponse\n}\nvar file_transaction_proto_depIdxs = []int32{\n\t1,  // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity\n\t21, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo\n\t0,  // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType\n\t20, // 3: pactus.GetRawBatchTransferTransactionRequest.recipients:type_name -> pactus.Recipient\n\t20, // 4: pactus.PayloadBatchTransfer.recipients:type_name -> pactus.Recipient\n\t0,  // 5: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType\n\t14, // 6: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer\n\t15, // 7: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond\n\t16, // 8: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition\n\t17, // 9: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond\n\t18, // 10: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw\n\t19, // 11: pactus.TransactionInfo.batch_transfer:type_name -> pactus.PayloadBatchTransfer\n\t21, // 12: pactus.DecodeRawTransactionResponse.transaction:type_name -> pactus.TransactionInfo\n\t2,  // 13: pactus.Transaction.GetTransaction:input_type -> pactus.GetTransactionRequest\n\t4,  // 14: pactus.Transaction.CalculateFee:input_type -> pactus.CalculateFeeRequest\n\t6,  // 15: pactus.Transaction.BroadcastTransaction:input_type -> pactus.BroadcastTransactionRequest\n\t8,  // 16: pactus.Transaction.GetRawTransferTransaction:input_type -> pactus.GetRawTransferTransactionRequest\n\t9,  // 17: pactus.Transaction.GetRawBondTransaction:input_type -> pactus.GetRawBondTransactionRequest\n\t10, // 18: pactus.Transaction.GetRawUnbondTransaction:input_type -> pactus.GetRawUnbondTransactionRequest\n\t11, // 19: pactus.Transaction.GetRawWithdrawTransaction:input_type -> pactus.GetRawWithdrawTransactionRequest\n\t12, // 20: pactus.Transaction.GetRawBatchTransferTransaction:input_type -> pactus.GetRawBatchTransferTransactionRequest\n\t22, // 21: pactus.Transaction.DecodeRawTransaction:input_type -> pactus.DecodeRawTransactionRequest\n\t24, // 22: pactus.Transaction.CheckTransaction:input_type -> pactus.CheckTransactionRequest\n\t3,  // 23: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse\n\t5,  // 24: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse\n\t7,  // 25: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse\n\t13, // 26: pactus.Transaction.GetRawTransferTransaction:output_type -> pactus.GetRawTransactionResponse\n\t13, // 27: pactus.Transaction.GetRawBondTransaction:output_type -> pactus.GetRawTransactionResponse\n\t13, // 28: pactus.Transaction.GetRawUnbondTransaction:output_type -> pactus.GetRawTransactionResponse\n\t13, // 29: pactus.Transaction.GetRawWithdrawTransaction:output_type -> pactus.GetRawTransactionResponse\n\t13, // 30: pactus.Transaction.GetRawBatchTransferTransaction:output_type -> pactus.GetRawTransactionResponse\n\t23, // 31: pactus.Transaction.DecodeRawTransaction:output_type -> pactus.DecodeRawTransactionResponse\n\t25, // 32: pactus.Transaction.CheckTransaction:output_type -> pactus.CheckTransactionResponse\n\t23, // [23:33] is the sub-list for method output_type\n\t13, // [13:23] is the sub-list for method input_type\n\t13, // [13:13] is the sub-list for extension type_name\n\t13, // [13:13] is the sub-list for extension extendee\n\t0,  // [0:13] is the sub-list for field type_name\n}\n\nfunc init() { file_transaction_proto_init() }\nfunc file_transaction_proto_init() {\n\tif File_transaction_proto != nil {\n\t\treturn\n\t}\n\tfile_transaction_proto_msgTypes[19].OneofWrappers = []any{\n\t\t(*TransactionInfo_Transfer)(nil),\n\t\t(*TransactionInfo_Bond)(nil),\n\t\t(*TransactionInfo_Sortition)(nil),\n\t\t(*TransactionInfo_Unbond)(nil),\n\t\t(*TransactionInfo_Withdraw)(nil),\n\t\t(*TransactionInfo_BatchTransfer)(nil),\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_transaction_proto_rawDesc), len(file_transaction_proto_rawDesc)),\n\t\t\tNumEnums:      2,\n\t\t\tNumMessages:   24,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_transaction_proto_goTypes,\n\t\tDependencyIndexes: file_transaction_proto_depIdxs,\n\t\tEnumInfos:         file_transaction_proto_enumTypes,\n\t\tMessageInfos:      file_transaction_proto_msgTypes,\n\t}.Build()\n\tFile_transaction_proto = out.File\n\tfile_transaction_proto_goTypes = nil\n\tfile_transaction_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "www/grpc/gen/go/transaction.pb.gw.go",
    "content": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: transaction.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into RESTful JSON APIs.\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/utilities\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// Suppress \"imported and not used\" errors\nvar (\n\t_ codes.Code\n\t_ io.Reader\n\t_ status.Status\n\t_ = errors.New\n\t_ = runtime.String\n\t_ = utilities.NewDoubleArray\n\t_ = metadata.Join\n)\n\nvar filter_Transaction_GetTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq CalculateFeeRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.CalculateFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq CalculateFeeRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.CalculateFee(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq BroadcastTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.BroadcastTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq BroadcastTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.BroadcastTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawTransferTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetRawTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawTransferTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetRawTransferTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawBondTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetRawBondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawBondTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetRawBondTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawUnbondTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetRawUnbondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawUnbondTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetRawUnbondTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawWithdrawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetRawWithdrawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawWithdrawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetRawWithdrawTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_GetRawBatchTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawBatchTransferTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetRawBatchTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_GetRawBatchTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetRawBatchTransferTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetRawBatchTransferTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Transaction_DecodeRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq DecodeRawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.DecodeRawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Transaction_DecodeRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq DecodeRawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.DecodeRawTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\n// RegisterTransactionHandlerServer registers the http handlers for service Transaction to \"mux\".\n// UnaryRPC     :call TransactionServer directly.\n// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.\n// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead.\n// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the \"runtime.WithMiddlewares\" option in the \"runtime.NewServeMux\" call.\nfunc RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error {\n\tmux.Handle(http.MethodGet, pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/CalculateFee\", runtime.WithHTTPPathPattern(\"/pactus/transaction/calculate_fee\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/BroadcastTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/broadcast_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetRawTransferTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_transfer_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetRawBondTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_bond_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetRawUnbondTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_unbond_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetRawWithdrawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_withdraw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawBatchTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/GetRawBatchTransferTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_batch_transfer_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_GetRawBatchTransferTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawBatchTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_DecodeRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Transaction/DecodeRawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/decode_raw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Transaction_DecodeRawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_DecodeRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\n\treturn nil\n}\n\n// RegisterTransactionHandlerFromEndpoint is same as RegisterTransactionHandler but\n// automatically dials to \"endpoint\" and closes the connection when \"ctx\" gets done.\nfunc RegisterTransactionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {\n\tconn, err := grpc.NewClient(endpoint, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tgo func() {\n\t\t\t<-ctx.Done()\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t}()\n\t}()\n\treturn RegisterTransactionHandler(ctx, mux, conn)\n}\n\n// RegisterTransactionHandler registers the http handlers for service Transaction to \"mux\".\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {\n\treturn RegisterTransactionHandlerClient(ctx, mux, NewTransactionClient(conn))\n}\n\n// RegisterTransactionHandlerClient registers the http handlers for service Transaction\n// to \"mux\". The handlers forward requests to the grpc endpoint over the given implementation of \"TransactionClient\".\n// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in \"TransactionClient\"\n// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in\n// \"TransactionClient\" to call the correct interceptors. This client ignores the HTTP middlewares.\nfunc RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error {\n\tmux.Handle(http.MethodGet, pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/CalculateFee\", runtime.WithHTTPPathPattern(\"/pactus/transaction/calculate_fee\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/BroadcastTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/broadcast_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetRawTransferTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_transfer_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetRawBondTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_bond_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetRawUnbondTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_unbond_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetRawWithdrawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_withdraw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_GetRawBatchTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/GetRawBatchTransferTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/get_raw_batch_transfer_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_GetRawBatchTransferTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_GetRawBatchTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Transaction_DecodeRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Transaction/DecodeRawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/transaction/decode_raw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Transaction_DecodeRawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Transaction_DecodeRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\treturn nil\n}\n\nvar (\n\tpattern_Transaction_GetTransaction_0                 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_transaction\"}, \"\"))\n\tpattern_Transaction_CalculateFee_0                   = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"calculate_fee\"}, \"\"))\n\tpattern_Transaction_BroadcastTransaction_0           = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"broadcast_transaction\"}, \"\"))\n\tpattern_Transaction_GetRawTransferTransaction_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_raw_transfer_transaction\"}, \"\"))\n\tpattern_Transaction_GetRawBondTransaction_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_raw_bond_transaction\"}, \"\"))\n\tpattern_Transaction_GetRawUnbondTransaction_0        = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_raw_unbond_transaction\"}, \"\"))\n\tpattern_Transaction_GetRawWithdrawTransaction_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_raw_withdraw_transaction\"}, \"\"))\n\tpattern_Transaction_GetRawBatchTransferTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"get_raw_batch_transfer_transaction\"}, \"\"))\n\tpattern_Transaction_DecodeRawTransaction_0           = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"transaction\", \"decode_raw_transaction\"}, \"\"))\n)\n\nvar (\n\tforward_Transaction_GetTransaction_0                 = runtime.ForwardResponseMessage\n\tforward_Transaction_CalculateFee_0                   = runtime.ForwardResponseMessage\n\tforward_Transaction_BroadcastTransaction_0           = runtime.ForwardResponseMessage\n\tforward_Transaction_GetRawTransferTransaction_0      = runtime.ForwardResponseMessage\n\tforward_Transaction_GetRawBondTransaction_0          = runtime.ForwardResponseMessage\n\tforward_Transaction_GetRawUnbondTransaction_0        = runtime.ForwardResponseMessage\n\tforward_Transaction_GetRawWithdrawTransaction_0      = runtime.ForwardResponseMessage\n\tforward_Transaction_GetRawBatchTransferTransaction_0 = runtime.ForwardResponseMessage\n\tforward_Transaction_DecodeRawTransaction_0           = runtime.ForwardResponseMessage\n)\n"
  },
  {
    "path": "www/grpc/gen/go/transaction_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.6.0\n// - protoc             (unknown)\n// source: transaction.proto\n\npackage pactus\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.64.0 or later.\nconst _ = grpc.SupportPackageIsVersion9\n\nconst (\n\tTransaction_GetTransaction_FullMethodName                 = \"/pactus.Transaction/GetTransaction\"\n\tTransaction_CalculateFee_FullMethodName                   = \"/pactus.Transaction/CalculateFee\"\n\tTransaction_BroadcastTransaction_FullMethodName           = \"/pactus.Transaction/BroadcastTransaction\"\n\tTransaction_GetRawTransferTransaction_FullMethodName      = \"/pactus.Transaction/GetRawTransferTransaction\"\n\tTransaction_GetRawBondTransaction_FullMethodName          = \"/pactus.Transaction/GetRawBondTransaction\"\n\tTransaction_GetRawUnbondTransaction_FullMethodName        = \"/pactus.Transaction/GetRawUnbondTransaction\"\n\tTransaction_GetRawWithdrawTransaction_FullMethodName      = \"/pactus.Transaction/GetRawWithdrawTransaction\"\n\tTransaction_GetRawBatchTransferTransaction_FullMethodName = \"/pactus.Transaction/GetRawBatchTransferTransaction\"\n\tTransaction_DecodeRawTransaction_FullMethodName           = \"/pactus.Transaction/DecodeRawTransaction\"\n\tTransaction_CheckTransaction_FullMethodName               = \"/pactus.Transaction/CheckTransaction\"\n)\n\n// TransactionClient is the client API for Transaction service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\n//\n// Transaction service defines various RPC methods for interacting with transactions.\ntype TransactionClient interface {\n\t// GetTransaction retrieves transaction details based on the provided request parameters.\n\tGetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error)\n\t// CalculateFee calculates the transaction fee based on the specified amount and payload type.\n\tCalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error)\n\t// BroadcastTransaction broadcasts a signed transaction to the network.\n\tBroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error)\n\t// GetRawTransferTransaction retrieves raw details of a transfer transaction.\n\tGetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)\n\t// GetRawBondTransaction retrieves raw details of a bond transaction.\n\tGetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)\n\t// GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n\tGetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)\n\t// GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n\tGetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)\n\t// GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n\tGetRawBatchTransferTransaction(ctx context.Context, in *GetRawBatchTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error)\n\t// DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n\tDecodeRawTransaction(ctx context.Context, in *DecodeRawTransactionRequest, opts ...grpc.CallOption) (*DecodeRawTransactionResponse, error)\n\t// CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n\tCheckTransaction(ctx context.Context, in *CheckTransactionRequest, opts ...grpc.CallOption) (*CheckTransactionResponse, error)\n}\n\ntype transactionClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewTransactionClient(cc grpc.ClientConnInterface) TransactionClient {\n\treturn &transactionClient{cc}\n}\n\nfunc (c *transactionClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(CalculateFeeResponse)\n\terr := c.cc.Invoke(ctx, Transaction_CalculateFee_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(BroadcastTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_BroadcastTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetRawTransferTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetRawBondTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetRawUnbondTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetRawWithdrawTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) GetRawBatchTransferTransaction(ctx context.Context, in *GetRawBatchTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_GetRawBatchTransferTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) DecodeRawTransaction(ctx context.Context, in *DecodeRawTransactionRequest, opts ...grpc.CallOption) (*DecodeRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(DecodeRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_DecodeRawTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *transactionClient) CheckTransaction(ctx context.Context, in *CheckTransactionRequest, opts ...grpc.CallOption) (*CheckTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(CheckTransactionResponse)\n\terr := c.cc.Invoke(ctx, Transaction_CheckTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// TransactionServer is the server API for Transaction service.\n// All implementations should embed UnimplementedTransactionServer\n// for forward compatibility.\n//\n// Transaction service defines various RPC methods for interacting with transactions.\ntype TransactionServer interface {\n\t// GetTransaction retrieves transaction details based on the provided request parameters.\n\tGetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)\n\t// CalculateFee calculates the transaction fee based on the specified amount and payload type.\n\tCalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error)\n\t// BroadcastTransaction broadcasts a signed transaction to the network.\n\tBroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error)\n\t// GetRawTransferTransaction retrieves raw details of a transfer transaction.\n\tGetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error)\n\t// GetRawBondTransaction retrieves raw details of a bond transaction.\n\tGetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error)\n\t// GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n\tGetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error)\n\t// GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n\tGetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error)\n\t// GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n\tGetRawBatchTransferTransaction(context.Context, *GetRawBatchTransferTransactionRequest) (*GetRawTransactionResponse, error)\n\t// DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n\tDecodeRawTransaction(context.Context, *DecodeRawTransactionRequest) (*DecodeRawTransactionResponse, error)\n\t// CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n\tCheckTransaction(context.Context, *CheckTransactionRequest) (*CheckTransactionResponse, error)\n}\n\n// UnimplementedTransactionServer should be embedded to have\n// forward compatible implementations.\n//\n// NOTE: this should be embedded by value instead of pointer to avoid a nil\n// pointer dereference when methods are called.\ntype UnimplementedTransactionServer struct{}\n\nfunc (UnimplementedTransactionServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method CalculateFee not implemented\")\n}\nfunc (UnimplementedTransactionServer) BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method BroadcastTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetRawTransferTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetRawBondTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetRawUnbondTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetRawWithdrawTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) GetRawBatchTransferTransaction(context.Context, *GetRawBatchTransferTransactionRequest) (*GetRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetRawBatchTransferTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) DecodeRawTransaction(context.Context, *DecodeRawTransactionRequest) (*DecodeRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method DecodeRawTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) CheckTransaction(context.Context, *CheckTransactionRequest) (*CheckTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method CheckTransaction not implemented\")\n}\nfunc (UnimplementedTransactionServer) testEmbeddedByValue() {}\n\n// UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to TransactionServer will\n// result in compilation errors.\ntype UnsafeTransactionServer interface {\n\tmustEmbedUnimplementedTransactionServer()\n}\n\nfunc RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer) {\n\t// If the following call panics, it indicates UnimplementedTransactionServer was\n\t// embedded by pointer and is nil.  This will cause panics if an\n\t// unimplemented method is ever invoked, so we test this at initialization\n\t// time to prevent it from happening at runtime later due to I/O.\n\tif t, ok := srv.(interface{ testEmbeddedByValue() }); ok {\n\t\tt.testEmbeddedByValue()\n\t}\n\ts.RegisterService(&Transaction_ServiceDesc, srv)\n}\n\nfunc _Transaction_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetTransaction(ctx, req.(*GetTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_CalculateFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CalculateFeeRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).CalculateFee(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_CalculateFee_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).CalculateFee(ctx, req.(*CalculateFeeRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_BroadcastTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(BroadcastTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).BroadcastTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_BroadcastTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).BroadcastTransaction(ctx, req.(*BroadcastTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_GetRawTransferTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRawTransferTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetRawTransferTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetRawTransferTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetRawTransferTransaction(ctx, req.(*GetRawTransferTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_GetRawBondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRawBondTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetRawBondTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetRawBondTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetRawBondTransaction(ctx, req.(*GetRawBondTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_GetRawUnbondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRawUnbondTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetRawUnbondTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetRawUnbondTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetRawUnbondTransaction(ctx, req.(*GetRawUnbondTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_GetRawWithdrawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRawWithdrawTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetRawWithdrawTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetRawWithdrawTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetRawWithdrawTransaction(ctx, req.(*GetRawWithdrawTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_GetRawBatchTransferTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetRawBatchTransferTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).GetRawBatchTransferTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_GetRawBatchTransferTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).GetRawBatchTransferTransaction(ctx, req.(*GetRawBatchTransferTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_DecodeRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DecodeRawTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).DecodeRawTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_DecodeRawTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).DecodeRawTransaction(ctx, req.(*DecodeRawTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Transaction_CheckTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CheckTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TransactionServer).CheckTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Transaction_CheckTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TransactionServer).CheckTransaction(ctx, req.(*CheckTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar Transaction_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"pactus.Transaction\",\n\tHandlerType: (*TransactionServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"GetTransaction\",\n\t\t\tHandler:    _Transaction_GetTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"CalculateFee\",\n\t\t\tHandler:    _Transaction_CalculateFee_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"BroadcastTransaction\",\n\t\t\tHandler:    _Transaction_BroadcastTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRawTransferTransaction\",\n\t\t\tHandler:    _Transaction_GetRawTransferTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRawBondTransaction\",\n\t\t\tHandler:    _Transaction_GetRawBondTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRawUnbondTransaction\",\n\t\t\tHandler:    _Transaction_GetRawUnbondTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRawWithdrawTransaction\",\n\t\t\tHandler:    _Transaction_GetRawWithdrawTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetRawBatchTransferTransaction\",\n\t\t\tHandler:    _Transaction_GetRawBatchTransferTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DecodeRawTransaction\",\n\t\t\tHandler:    _Transaction_DecodeRawTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"CheckTransaction\",\n\t\t\tHandler:    _Transaction_CheckTransaction_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"transaction.proto\",\n}\n"
  },
  {
    "path": "www/grpc/gen/go/transaction_jgw.pb.go",
    "content": "// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT.\n// source: transaction.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into JSON-RPC 2.0\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\ntype TransactionJsonRPC struct {\n\tclient TransactionClient\n}\n\ntype paramsAndHeadersTransaction struct {\n\tHeaders metadata.MD     `json:\"headers,omitempty\"`\n\tParams  json.RawMessage `json:\"params\"`\n}\n\n// RegisterTransactionJsonRPC register the grpc client Transaction for json-rpc.\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterTransactionJsonRPC(conn *grpc.ClientConn) *TransactionJsonRPC {\n\treturn &TransactionJsonRPC{\n\t\tclient: NewTransactionClient(conn),\n\t}\n}\n\nfunc (s *TransactionJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) {\n\treturn map[string]func(ctx context.Context, params json.RawMessage) (any, error){\n\n\t\t\"pactus.transaction.get_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.calculate_fee\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(CalculateFeeRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.CalculateFee(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.broadcast_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(BroadcastTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.BroadcastTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.get_raw_transfer_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetRawTransferTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetRawTransferTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.get_raw_bond_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetRawBondTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetRawBondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.get_raw_unbond_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetRawUnbondTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetRawUnbondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.get_raw_withdraw_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetRawWithdrawTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetRawWithdrawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.get_raw_batch_transfer_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetRawBatchTransferTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetRawBatchTransferTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.decode_raw_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(DecodeRawTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.DecodeRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.transaction.check_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(CheckTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersTransaction\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.CheckTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "www/grpc/gen/go/utils.cobra.pb.go",
    "content": "// Code generated by protoc-gen-cobra. DO NOT EDIT.\n\npackage pactus\n\nimport (\n\tclient \"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\tflag \"github.com/NathanBaulch/protoc-gen-cobra/flag\"\n\tiocodec \"github.com/NathanBaulch/protoc-gen-cobra/iocodec\"\n\tcobra \"github.com/spf13/cobra\"\n\tgrpc \"google.golang.org/grpc\"\n\tproto \"google.golang.org/protobuf/proto\"\n)\n\nfunc UtilsClientCommand(options ...client.Option) *cobra.Command {\n\tcfg := client.NewConfig(options...)\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Utils\"),\n\t\tShort: \"Utils service client\",\n\t\tLong:  \"Utils service defines RPC methods for utility functions such as message\\n signing, verification, and other cryptographic operations.\",\n\t}\n\tcfg.BindFlags(cmd.PersistentFlags())\n\tcmd.AddCommand(\n\t\t_UtilsSignMessageWithPrivateKeyCommand(cfg),\n\t\t_UtilsVerifyMessageCommand(cfg),\n\t\t_UtilsPublicKeyAggregationCommand(cfg),\n\t\t_UtilsSignatureAggregationCommand(cfg),\n\t)\n\treturn cmd\n}\n\nfunc _UtilsSignMessageWithPrivateKeyCommand(cfg *client.Config) *cobra.Command {\n\treq := &SignMessageWithPrivateKeyRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SignMessageWithPrivateKey\"),\n\t\tShort: \"SignMessageWithPrivateKey RPC client\",\n\t\tLong:  \"SignMessageWithPrivateKey signs a message with the provided private key.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\", \"SignMessageWithPrivateKey\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewUtilsClient(cc)\n\t\t\t\tv := &SignMessageWithPrivateKeyRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SignMessageWithPrivateKey(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.PrivateKey, cfg.FlagNamer(\"PrivateKey\"), \"\", \"The private key to sign the message.\")\n\tcmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer(\"Message\"), \"\", \"The message content to be signed.\")\n\n\treturn cmd\n}\n\nfunc _UtilsVerifyMessageCommand(cfg *client.Config) *cobra.Command {\n\treq := &VerifyMessageRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"VerifyMessage\"),\n\t\tShort: \"VerifyMessage RPC client\",\n\t\tLong:  \"VerifyMessage verifies a signature against the public key and message.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\", \"VerifyMessage\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewUtilsClient(cc)\n\t\t\t\tv := &VerifyMessageRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.VerifyMessage(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer(\"Message\"), \"\", \"The original message content that was signed.\")\n\tcmd.PersistentFlags().StringVar(&req.Signature, cfg.FlagNamer(\"Signature\"), \"\", \"The signature to verify in hexadecimal format.\")\n\tcmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer(\"PublicKey\"), \"\", \"The public key of the signer.\")\n\n\treturn cmd\n}\n\nfunc _UtilsPublicKeyAggregationCommand(cfg *client.Config) *cobra.Command {\n\treq := &PublicKeyAggregationRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"PublicKeyAggregation\"),\n\t\tShort: \"PublicKeyAggregation RPC client\",\n\t\tLong:  \"PublicKeyAggregation aggregates multiple BLS public keys into a single key.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\", \"PublicKeyAggregation\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewUtilsClient(cc)\n\t\t\t\tv := &PublicKeyAggregationRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.PublicKeyAggregation(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringSliceVar(&req.PublicKeys, cfg.FlagNamer(\"PublicKeys\"), nil, \"List of BLS public keys to be aggregated.\")\n\n\treturn cmd\n}\n\nfunc _UtilsSignatureAggregationCommand(cfg *client.Config) *cobra.Command {\n\treq := &SignatureAggregationRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SignatureAggregation\"),\n\t\tShort: \"SignatureAggregation RPC client\",\n\t\tLong:  \"SignatureAggregation aggregates multiple BLS signatures into a single signature.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Utils\", \"SignatureAggregation\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewUtilsClient(cc)\n\t\t\t\tv := &SignatureAggregationRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SignatureAggregation(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringSliceVar(&req.Signatures, cfg.FlagNamer(\"Signatures\"), nil, \"List of BLS signatures to be aggregated.\")\n\n\treturn cmd\n}\n"
  },
  {
    "path": "www/grpc/gen/go/utils.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.11\n// \tprotoc        (unknown)\n// source: utils.proto\n\npackage pactus\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// Request message for signing a message with a private key.\ntype SignMessageWithPrivateKeyRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The private key to sign the message.\n\tPrivateKey string `protobuf:\"bytes,1,opt,name=private_key,json=privateKey,proto3\" json:\"private_key,omitempty\"`\n\t// The message content to be signed.\n\tMessage       string `protobuf:\"bytes,2,opt,name=message,proto3\" json:\"message,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignMessageWithPrivateKeyRequest) Reset() {\n\t*x = SignMessageWithPrivateKeyRequest{}\n\tmi := &file_utils_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignMessageWithPrivateKeyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignMessageWithPrivateKeyRequest) ProtoMessage() {}\n\nfunc (x *SignMessageWithPrivateKeyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignMessageWithPrivateKeyRequest.ProtoReflect.Descriptor instead.\nfunc (*SignMessageWithPrivateKeyRequest) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *SignMessageWithPrivateKeyRequest) GetPrivateKey() string {\n\tif x != nil {\n\t\treturn x.PrivateKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignMessageWithPrivateKeyRequest) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\n// Response message contains the signature generated from the message.\ntype SignMessageWithPrivateKeyResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The resulting signature in hexadecimal format.\n\tSignature     string `protobuf:\"bytes,1,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignMessageWithPrivateKeyResponse) Reset() {\n\t*x = SignMessageWithPrivateKeyResponse{}\n\tmi := &file_utils_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignMessageWithPrivateKeyResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignMessageWithPrivateKeyResponse) ProtoMessage() {}\n\nfunc (x *SignMessageWithPrivateKeyResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignMessageWithPrivateKeyResponse.ProtoReflect.Descriptor instead.\nfunc (*SignMessageWithPrivateKeyResponse) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *SignMessageWithPrivateKeyResponse) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\n// Request message for verifying a message signature.\ntype VerifyMessageRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The original message content that was signed.\n\tMessage string `protobuf:\"bytes,1,opt,name=message,proto3\" json:\"message,omitempty\"`\n\t// The signature to verify in hexadecimal format.\n\tSignature string `protobuf:\"bytes,2,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\t// The public key of the signer.\n\tPublicKey     string `protobuf:\"bytes,3,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *VerifyMessageRequest) Reset() {\n\t*x = VerifyMessageRequest{}\n\tmi := &file_utils_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *VerifyMessageRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*VerifyMessageRequest) ProtoMessage() {}\n\nfunc (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use VerifyMessageRequest.ProtoReflect.Descriptor instead.\nfunc (*VerifyMessageRequest) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *VerifyMessageRequest) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\nfunc (x *VerifyMessageRequest) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\nfunc (x *VerifyMessageRequest) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\n// Response message contains the verification result.\ntype VerifyMessageResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Boolean indicating whether the signature is valid for the given message and public key.\n\tIsValid       bool `protobuf:\"varint,1,opt,name=is_valid,json=isValid,proto3\" json:\"is_valid,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *VerifyMessageResponse) Reset() {\n\t*x = VerifyMessageResponse{}\n\tmi := &file_utils_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *VerifyMessageResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*VerifyMessageResponse) ProtoMessage() {}\n\nfunc (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use VerifyMessageResponse.ProtoReflect.Descriptor instead.\nfunc (*VerifyMessageResponse) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *VerifyMessageResponse) GetIsValid() bool {\n\tif x != nil {\n\t\treturn x.IsValid\n\t}\n\treturn false\n}\n\n// Request message for aggregating multiple BLS public keys.\ntype PublicKeyAggregationRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// List of BLS public keys to be aggregated.\n\tPublicKeys    []string `protobuf:\"bytes,1,rep,name=public_keys,json=publicKeys,proto3\" json:\"public_keys,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PublicKeyAggregationRequest) Reset() {\n\t*x = PublicKeyAggregationRequest{}\n\tmi := &file_utils_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PublicKeyAggregationRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PublicKeyAggregationRequest) ProtoMessage() {}\n\nfunc (x *PublicKeyAggregationRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PublicKeyAggregationRequest.ProtoReflect.Descriptor instead.\nfunc (*PublicKeyAggregationRequest) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *PublicKeyAggregationRequest) GetPublicKeys() []string {\n\tif x != nil {\n\t\treturn x.PublicKeys\n\t}\n\treturn nil\n}\n\n// Response message contains the aggregated BLS public key result.\ntype PublicKeyAggregationResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The aggregated BLS public key.\n\tPublicKey string `protobuf:\"bytes,1,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// The blockchain address derived from the aggregated public key.\n\tAddress       string `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *PublicKeyAggregationResponse) Reset() {\n\t*x = PublicKeyAggregationResponse{}\n\tmi := &file_utils_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *PublicKeyAggregationResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PublicKeyAggregationResponse) ProtoMessage() {}\n\nfunc (x *PublicKeyAggregationResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PublicKeyAggregationResponse.ProtoReflect.Descriptor instead.\nfunc (*PublicKeyAggregationResponse) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *PublicKeyAggregationResponse) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *PublicKeyAggregationResponse) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Request message for aggregating multiple BLS signatures.\ntype SignatureAggregationRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// List of BLS signatures to be aggregated.\n\tSignatures    []string `protobuf:\"bytes,1,rep,name=signatures,proto3\" json:\"signatures,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignatureAggregationRequest) Reset() {\n\t*x = SignatureAggregationRequest{}\n\tmi := &file_utils_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignatureAggregationRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignatureAggregationRequest) ProtoMessage() {}\n\nfunc (x *SignatureAggregationRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignatureAggregationRequest.ProtoReflect.Descriptor instead.\nfunc (*SignatureAggregationRequest) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *SignatureAggregationRequest) GetSignatures() []string {\n\tif x != nil {\n\t\treturn x.Signatures\n\t}\n\treturn nil\n}\n\n// Response message contains the aggregated BLS signature.\ntype SignatureAggregationResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The aggregated BLS signature in hexadecimal format.\n\tSignature     string `protobuf:\"bytes,1,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignatureAggregationResponse) Reset() {\n\t*x = SignatureAggregationResponse{}\n\tmi := &file_utils_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignatureAggregationResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignatureAggregationResponse) ProtoMessage() {}\n\nfunc (x *SignatureAggregationResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_utils_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignatureAggregationResponse.ProtoReflect.Descriptor instead.\nfunc (*SignatureAggregationResponse) Descriptor() ([]byte, []int) {\n\treturn file_utils_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *SignatureAggregationResponse) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\nvar File_utils_proto protoreflect.FileDescriptor\n\nconst file_utils_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\vutils.proto\\x12\\x06pactus\\\"]\\n\" +\n\t\" SignMessageWithPrivateKeyRequest\\x12\\x1f\\n\" +\n\t\"\\vprivate_key\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"privateKey\\x12\\x18\\n\" +\n\t\"\\amessage\\x18\\x02 \\x01(\\tR\\amessage\\\"A\\n\" +\n\t\"!SignMessageWithPrivateKeyResponse\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature\\\"m\\n\" +\n\t\"\\x14VerifyMessageRequest\\x12\\x18\\n\" +\n\t\"\\amessage\\x18\\x01 \\x01(\\tR\\amessage\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x02 \\x01(\\tR\\tsignature\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x03 \\x01(\\tR\\tpublicKey\\\"2\\n\" +\n\t\"\\x15VerifyMessageResponse\\x12\\x19\\n\" +\n\t\"\\bis_valid\\x18\\x01 \\x01(\\bR\\aisValid\\\">\\n\" +\n\t\"\\x1bPublicKeyAggregationRequest\\x12\\x1f\\n\" +\n\t\"\\vpublic_keys\\x18\\x01 \\x03(\\tR\\n\" +\n\t\"publicKeys\\\"W\\n\" +\n\t\"\\x1cPublicKeyAggregationResponse\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\\"=\\n\" +\n\t\"\\x1bSignatureAggregationRequest\\x12\\x1e\\n\" +\n\t\"\\n\" +\n\t\"signatures\\x18\\x01 \\x03(\\tR\\n\" +\n\t\"signatures\\\"<\\n\" +\n\t\"\\x1cSignatureAggregationResponse\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature2\\x8d\\x03\\n\" +\n\t\"\\x05Utils\\x12p\\n\" +\n\t\"\\x19SignMessageWithPrivateKey\\x12(.pactus.SignMessageWithPrivateKeyRequest\\x1a).pactus.SignMessageWithPrivateKeyResponse\\x12L\\n\" +\n\t\"\\rVerifyMessage\\x12\\x1c.pactus.VerifyMessageRequest\\x1a\\x1d.pactus.VerifyMessageResponse\\x12a\\n\" +\n\t\"\\x14PublicKeyAggregation\\x12#.pactus.PublicKeyAggregationRequest\\x1a$.pactus.PublicKeyAggregationResponse\\x12a\\n\" +\n\t\"\\x14SignatureAggregation\\x12#.pactus.SignatureAggregationRequest\\x1a$.pactus.SignatureAggregationResponseB:\\n\" +\n\t\"\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3\"\n\nvar (\n\tfile_utils_proto_rawDescOnce sync.Once\n\tfile_utils_proto_rawDescData []byte\n)\n\nfunc file_utils_proto_rawDescGZIP() []byte {\n\tfile_utils_proto_rawDescOnce.Do(func() {\n\t\tfile_utils_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_utils_proto_rawDesc), len(file_utils_proto_rawDesc)))\n\t})\n\treturn file_utils_proto_rawDescData\n}\n\nvar file_utils_proto_msgTypes = make([]protoimpl.MessageInfo, 8)\nvar file_utils_proto_goTypes = []any{\n\t(*SignMessageWithPrivateKeyRequest)(nil),  // 0: pactus.SignMessageWithPrivateKeyRequest\n\t(*SignMessageWithPrivateKeyResponse)(nil), // 1: pactus.SignMessageWithPrivateKeyResponse\n\t(*VerifyMessageRequest)(nil),              // 2: pactus.VerifyMessageRequest\n\t(*VerifyMessageResponse)(nil),             // 3: pactus.VerifyMessageResponse\n\t(*PublicKeyAggregationRequest)(nil),       // 4: pactus.PublicKeyAggregationRequest\n\t(*PublicKeyAggregationResponse)(nil),      // 5: pactus.PublicKeyAggregationResponse\n\t(*SignatureAggregationRequest)(nil),       // 6: pactus.SignatureAggregationRequest\n\t(*SignatureAggregationResponse)(nil),      // 7: pactus.SignatureAggregationResponse\n}\nvar file_utils_proto_depIdxs = []int32{\n\t0, // 0: pactus.Utils.SignMessageWithPrivateKey:input_type -> pactus.SignMessageWithPrivateKeyRequest\n\t2, // 1: pactus.Utils.VerifyMessage:input_type -> pactus.VerifyMessageRequest\n\t4, // 2: pactus.Utils.PublicKeyAggregation:input_type -> pactus.PublicKeyAggregationRequest\n\t6, // 3: pactus.Utils.SignatureAggregation:input_type -> pactus.SignatureAggregationRequest\n\t1, // 4: pactus.Utils.SignMessageWithPrivateKey:output_type -> pactus.SignMessageWithPrivateKeyResponse\n\t3, // 5: pactus.Utils.VerifyMessage:output_type -> pactus.VerifyMessageResponse\n\t5, // 6: pactus.Utils.PublicKeyAggregation:output_type -> pactus.PublicKeyAggregationResponse\n\t7, // 7: pactus.Utils.SignatureAggregation:output_type -> pactus.SignatureAggregationResponse\n\t4, // [4:8] is the sub-list for method output_type\n\t0, // [0:4] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_utils_proto_init() }\nfunc file_utils_proto_init() {\n\tif File_utils_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_utils_proto_rawDesc), len(file_utils_proto_rawDesc)),\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   8,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_utils_proto_goTypes,\n\t\tDependencyIndexes: file_utils_proto_depIdxs,\n\t\tMessageInfos:      file_utils_proto_msgTypes,\n\t}.Build()\n\tFile_utils_proto = out.File\n\tfile_utils_proto_goTypes = nil\n\tfile_utils_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "www/grpc/gen/go/utils.pb.gw.go",
    "content": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: utils.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into RESTful JSON APIs.\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/utilities\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// Suppress \"imported and not used\" errors\nvar (\n\t_ codes.Code\n\t_ io.Reader\n\t_ status.Status\n\t_ = errors.New\n\t_ = runtime.String\n\t_ = utilities.NewDoubleArray\n\t_ = metadata.Join\n)\n\nfunc request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignMessageWithPrivateKeyRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.SignMessageWithPrivateKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignMessageWithPrivateKeyRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.SignMessageWithPrivateKey(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq VerifyMessageRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.VerifyMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq VerifyMessageRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.VerifyMessage(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Utils_PublicKeyAggregation_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq PublicKeyAggregationRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.PublicKeyAggregation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Utils_PublicKeyAggregation_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq PublicKeyAggregationRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.PublicKeyAggregation(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Utils_SignatureAggregation_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignatureAggregationRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.SignatureAggregation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Utils_SignatureAggregation_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignatureAggregationRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.SignatureAggregation(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\n// RegisterUtilsHandlerServer registers the http handlers for service Utils to \"mux\".\n// UnaryRPC     :call UtilsServer directly.\n// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.\n// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUtilsHandlerFromEndpoint instead.\n// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the \"runtime.WithMiddlewares\" option in the \"runtime.NewServeMux\" call.\nfunc RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UtilsServer) error {\n\tmux.Handle(http.MethodPost, pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Utils/SignMessageWithPrivateKey\", runtime.WithHTTPPathPattern(\"/pactus/Utils/sign_message_with_private_key\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Utils/VerifyMessage\", runtime.WithHTTPPathPattern(\"/pactus/Utils/verify_message\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_PublicKeyAggregation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Utils/PublicKeyAggregation\", runtime.WithHTTPPathPattern(\"/pactus/Utils/public_key_aggregation\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Utils_PublicKeyAggregation_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_PublicKeyAggregation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_SignatureAggregation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Utils/SignatureAggregation\", runtime.WithHTTPPathPattern(\"/pactus/Utils/signature_aggregation\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Utils_SignatureAggregation_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_SignatureAggregation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\n\treturn nil\n}\n\n// RegisterUtilsHandlerFromEndpoint is same as RegisterUtilsHandler but\n// automatically dials to \"endpoint\" and closes the connection when \"ctx\" gets done.\nfunc RegisterUtilsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {\n\tconn, err := grpc.NewClient(endpoint, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tgo func() {\n\t\t\t<-ctx.Done()\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t}()\n\t}()\n\treturn RegisterUtilsHandler(ctx, mux, conn)\n}\n\n// RegisterUtilsHandler registers the http handlers for service Utils to \"mux\".\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterUtilsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {\n\treturn RegisterUtilsHandlerClient(ctx, mux, NewUtilsClient(conn))\n}\n\n// RegisterUtilsHandlerClient registers the http handlers for service Utils\n// to \"mux\". The handlers forward requests to the grpc endpoint over the given implementation of \"UtilsClient\".\n// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in \"UtilsClient\"\n// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in\n// \"UtilsClient\" to call the correct interceptors. This client ignores the HTTP middlewares.\nfunc RegisterUtilsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UtilsClient) error {\n\tmux.Handle(http.MethodPost, pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Utils/SignMessageWithPrivateKey\", runtime.WithHTTPPathPattern(\"/pactus/Utils/sign_message_with_private_key\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Utils/VerifyMessage\", runtime.WithHTTPPathPattern(\"/pactus/Utils/verify_message\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_PublicKeyAggregation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Utils/PublicKeyAggregation\", runtime.WithHTTPPathPattern(\"/pactus/Utils/public_key_aggregation\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Utils_PublicKeyAggregation_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_PublicKeyAggregation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Utils_SignatureAggregation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Utils/SignatureAggregation\", runtime.WithHTTPPathPattern(\"/pactus/Utils/signature_aggregation\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Utils_SignatureAggregation_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Utils_SignatureAggregation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\treturn nil\n}\n\nvar (\n\tpattern_Utils_SignMessageWithPrivateKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"Utils\", \"sign_message_with_private_key\"}, \"\"))\n\tpattern_Utils_VerifyMessage_0             = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"Utils\", \"verify_message\"}, \"\"))\n\tpattern_Utils_PublicKeyAggregation_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"Utils\", \"public_key_aggregation\"}, \"\"))\n\tpattern_Utils_SignatureAggregation_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"Utils\", \"signature_aggregation\"}, \"\"))\n)\n\nvar (\n\tforward_Utils_SignMessageWithPrivateKey_0 = runtime.ForwardResponseMessage\n\tforward_Utils_VerifyMessage_0             = runtime.ForwardResponseMessage\n\tforward_Utils_PublicKeyAggregation_0      = runtime.ForwardResponseMessage\n\tforward_Utils_SignatureAggregation_0      = runtime.ForwardResponseMessage\n)\n"
  },
  {
    "path": "www/grpc/gen/go/utils_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.6.0\n// - protoc             (unknown)\n// source: utils.proto\n\npackage pactus\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.64.0 or later.\nconst _ = grpc.SupportPackageIsVersion9\n\nconst (\n\tUtils_SignMessageWithPrivateKey_FullMethodName = \"/pactus.Utils/SignMessageWithPrivateKey\"\n\tUtils_VerifyMessage_FullMethodName             = \"/pactus.Utils/VerifyMessage\"\n\tUtils_PublicKeyAggregation_FullMethodName      = \"/pactus.Utils/PublicKeyAggregation\"\n\tUtils_SignatureAggregation_FullMethodName      = \"/pactus.Utils/SignatureAggregation\"\n)\n\n// UtilsClient is the client API for Utils service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\n//\n// Utils service defines RPC methods for utility functions such as message\n// signing, verification, and other cryptographic operations.\ntype UtilsClient interface {\n\t// SignMessageWithPrivateKey signs a message with the provided private key.\n\tSignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error)\n\t// VerifyMessage verifies a signature against the public key and message.\n\tVerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error)\n\t// PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n\tPublicKeyAggregation(ctx context.Context, in *PublicKeyAggregationRequest, opts ...grpc.CallOption) (*PublicKeyAggregationResponse, error)\n\t// SignatureAggregation aggregates multiple BLS signatures into a single signature.\n\tSignatureAggregation(ctx context.Context, in *SignatureAggregationRequest, opts ...grpc.CallOption) (*SignatureAggregationResponse, error)\n}\n\ntype utilsClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewUtilsClient(cc grpc.ClientConnInterface) UtilsClient {\n\treturn &utilsClient{cc}\n}\n\nfunc (c *utilsClient) SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SignMessageWithPrivateKeyResponse)\n\terr := c.cc.Invoke(ctx, Utils_SignMessageWithPrivateKey_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *utilsClient) VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(VerifyMessageResponse)\n\terr := c.cc.Invoke(ctx, Utils_VerifyMessage_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *utilsClient) PublicKeyAggregation(ctx context.Context, in *PublicKeyAggregationRequest, opts ...grpc.CallOption) (*PublicKeyAggregationResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(PublicKeyAggregationResponse)\n\terr := c.cc.Invoke(ctx, Utils_PublicKeyAggregation_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *utilsClient) SignatureAggregation(ctx context.Context, in *SignatureAggregationRequest, opts ...grpc.CallOption) (*SignatureAggregationResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SignatureAggregationResponse)\n\terr := c.cc.Invoke(ctx, Utils_SignatureAggregation_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// UtilsServer is the server API for Utils service.\n// All implementations should embed UnimplementedUtilsServer\n// for forward compatibility.\n//\n// Utils service defines RPC methods for utility functions such as message\n// signing, verification, and other cryptographic operations.\ntype UtilsServer interface {\n\t// SignMessageWithPrivateKey signs a message with the provided private key.\n\tSignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error)\n\t// VerifyMessage verifies a signature against the public key and message.\n\tVerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error)\n\t// PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n\tPublicKeyAggregation(context.Context, *PublicKeyAggregationRequest) (*PublicKeyAggregationResponse, error)\n\t// SignatureAggregation aggregates multiple BLS signatures into a single signature.\n\tSignatureAggregation(context.Context, *SignatureAggregationRequest) (*SignatureAggregationResponse, error)\n}\n\n// UnimplementedUtilsServer should be embedded to have\n// forward compatible implementations.\n//\n// NOTE: this should be embedded by value instead of pointer to avoid a nil\n// pointer dereference when methods are called.\ntype UnimplementedUtilsServer struct{}\n\nfunc (UnimplementedUtilsServer) SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SignMessageWithPrivateKey not implemented\")\n}\nfunc (UnimplementedUtilsServer) VerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method VerifyMessage not implemented\")\n}\nfunc (UnimplementedUtilsServer) PublicKeyAggregation(context.Context, *PublicKeyAggregationRequest) (*PublicKeyAggregationResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method PublicKeyAggregation not implemented\")\n}\nfunc (UnimplementedUtilsServer) SignatureAggregation(context.Context, *SignatureAggregationRequest) (*SignatureAggregationResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SignatureAggregation not implemented\")\n}\nfunc (UnimplementedUtilsServer) testEmbeddedByValue() {}\n\n// UnsafeUtilsServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to UtilsServer will\n// result in compilation errors.\ntype UnsafeUtilsServer interface {\n\tmustEmbedUnimplementedUtilsServer()\n}\n\nfunc RegisterUtilsServer(s grpc.ServiceRegistrar, srv UtilsServer) {\n\t// If the following call panics, it indicates UnimplementedUtilsServer was\n\t// embedded by pointer and is nil.  This will cause panics if an\n\t// unimplemented method is ever invoked, so we test this at initialization\n\t// time to prevent it from happening at runtime later due to I/O.\n\tif t, ok := srv.(interface{ testEmbeddedByValue() }); ok {\n\t\tt.testEmbeddedByValue()\n\t}\n\ts.RegisterService(&Utils_ServiceDesc, srv)\n}\n\nfunc _Utils_SignMessageWithPrivateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SignMessageWithPrivateKeyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(UtilsServer).SignMessageWithPrivateKey(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Utils_SignMessageWithPrivateKey_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(UtilsServer).SignMessageWithPrivateKey(ctx, req.(*SignMessageWithPrivateKeyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Utils_VerifyMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(VerifyMessageRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(UtilsServer).VerifyMessage(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Utils_VerifyMessage_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(UtilsServer).VerifyMessage(ctx, req.(*VerifyMessageRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Utils_PublicKeyAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PublicKeyAggregationRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(UtilsServer).PublicKeyAggregation(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Utils_PublicKeyAggregation_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(UtilsServer).PublicKeyAggregation(ctx, req.(*PublicKeyAggregationRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Utils_SignatureAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SignatureAggregationRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(UtilsServer).SignatureAggregation(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Utils_SignatureAggregation_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(UtilsServer).SignatureAggregation(ctx, req.(*SignatureAggregationRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// Utils_ServiceDesc is the grpc.ServiceDesc for Utils service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar Utils_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"pactus.Utils\",\n\tHandlerType: (*UtilsServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"SignMessageWithPrivateKey\",\n\t\t\tHandler:    _Utils_SignMessageWithPrivateKey_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"VerifyMessage\",\n\t\t\tHandler:    _Utils_VerifyMessage_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"PublicKeyAggregation\",\n\t\t\tHandler:    _Utils_PublicKeyAggregation_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SignatureAggregation\",\n\t\t\tHandler:    _Utils_SignatureAggregation_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"utils.proto\",\n}\n"
  },
  {
    "path": "www/grpc/gen/go/utils_jgw.pb.go",
    "content": "// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT.\n// source: utils.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into JSON-RPC 2.0\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\ntype UtilsJsonRPC struct {\n\tclient UtilsClient\n}\n\ntype paramsAndHeadersUtils struct {\n\tHeaders metadata.MD     `json:\"headers,omitempty\"`\n\tParams  json.RawMessage `json:\"params\"`\n}\n\n// RegisterUtilsJsonRPC register the grpc client Utils for json-rpc.\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterUtilsJsonRPC(conn *grpc.ClientConn) *UtilsJsonRPC {\n\treturn &UtilsJsonRPC{\n\t\tclient: NewUtilsClient(conn),\n\t}\n}\n\nfunc (s *UtilsJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) {\n\treturn map[string]func(ctx context.Context, params json.RawMessage) (any, error){\n\n\t\t\"pactus.utils.sign_message_with_private_key\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SignMessageWithPrivateKeyRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersUtils\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SignMessageWithPrivateKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.utils.verify_message\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(VerifyMessageRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersUtils\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.VerifyMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.utils.public_key_aggregation\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(PublicKeyAggregationRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersUtils\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.PublicKeyAggregation(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.utils.signature_aggregation\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SignatureAggregationRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersUtils\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SignatureAggregation(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "www/grpc/gen/go/wallet.cobra.pb.go",
    "content": "// Code generated by protoc-gen-cobra. DO NOT EDIT.\n\npackage pactus\n\nimport (\n\tclient \"github.com/NathanBaulch/protoc-gen-cobra/client\"\n\tflag \"github.com/NathanBaulch/protoc-gen-cobra/flag\"\n\tiocodec \"github.com/NathanBaulch/protoc-gen-cobra/iocodec\"\n\tcobra \"github.com/spf13/cobra\"\n\tgrpc \"google.golang.org/grpc\"\n\tproto \"google.golang.org/protobuf/proto\"\n)\n\nfunc WalletClientCommand(options ...client.Option) *cobra.Command {\n\tcfg := client.NewConfig(options...)\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"Wallet\"),\n\t\tShort: \"Wallet service client\",\n\t\tLong:  \"Wallet service provides RPC methods for wallet management operations.\",\n\t}\n\tcfg.BindFlags(cmd.PersistentFlags())\n\tcmd.AddCommand(\n\t\t_WalletCreateWalletCommand(cfg),\n\t\t_WalletRestoreWalletCommand(cfg),\n\t\t_WalletLoadWalletCommand(cfg),\n\t\t_WalletUnloadWalletCommand(cfg),\n\t\t_WalletListWalletsCommand(cfg),\n\t\t_WalletGetWalletInfoCommand(cfg),\n\t\t_WalletUpdatePasswordCommand(cfg),\n\t\t_WalletGetTotalBalanceCommand(cfg),\n\t\t_WalletGetTotalStakeCommand(cfg),\n\t\t_WalletGetValidatorAddressCommand(cfg),\n\t\t_WalletGetAddressInfoCommand(cfg),\n\t\t_WalletSetAddressLabelCommand(cfg),\n\t\t_WalletGetNewAddressCommand(cfg),\n\t\t_WalletListAddressesCommand(cfg),\n\t\t_WalletSignMessageCommand(cfg),\n\t\t_WalletSignRawTransactionCommand(cfg),\n\t\t_WalletListTransactionsCommand(cfg),\n\t\t_WalletSetDefaultFeeCommand(cfg),\n\t\t_WalletGetMnemonicCommand(cfg),\n\t\t_WalletGetPrivateKeyCommand(cfg),\n\t)\n\treturn cmd\n}\n\nfunc _WalletCreateWalletCommand(cfg *client.Config) *cobra.Command {\n\treq := &CreateWalletRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"CreateWallet\"),\n\t\tShort: \"CreateWallet RPC client\",\n\t\tLong:  \"CreateWallet creates a new wallet with the specified parameters.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"CreateWallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &CreateWalletRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.CreateWallet(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name for the new wallet.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Password to secure the new wallet.\")\n\n\treturn cmd\n}\n\nfunc _WalletRestoreWalletCommand(cfg *client.Config) *cobra.Command {\n\treq := &RestoreWalletRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"RestoreWallet\"),\n\t\tShort: \"RestoreWallet RPC client\",\n\t\tLong:  \"RestoreWallet restores an existing wallet with the given mnemonic.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"RestoreWallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &RestoreWalletRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.RestoreWallet(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name for the restored wallet.\")\n\tcmd.PersistentFlags().StringVar(&req.Mnemonic, cfg.FlagNamer(\"Mnemonic\"), \"\", \"The mnemonic (seed phrase) for wallet recovery.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Password to secure the restored wallet.\")\n\n\treturn cmd\n}\n\nfunc _WalletLoadWalletCommand(cfg *client.Config) *cobra.Command {\n\treq := &LoadWalletRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"LoadWallet\"),\n\t\tShort: \"LoadWallet RPC client\",\n\t\tLong:  \"LoadWallet loads an existing wallet with the given name.\\n deprecated: It will be removed in a future version.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"LoadWallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &LoadWalletRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.LoadWallet(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to load.\")\n\n\treturn cmd\n}\n\nfunc _WalletUnloadWalletCommand(cfg *client.Config) *cobra.Command {\n\treq := &UnloadWalletRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"UnloadWallet\"),\n\t\tShort: \"UnloadWallet RPC client\",\n\t\tLong:  \"UnloadWallet unloads a currently loaded wallet with the specified name.\\n deprecated: It will be removed in a future version.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"UnloadWallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &UnloadWalletRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.UnloadWallet(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to unload.\")\n\n\treturn cmd\n}\n\nfunc _WalletListWalletsCommand(cfg *client.Config) *cobra.Command {\n\treq := &ListWalletsRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"ListWallets\"),\n\t\tShort: \"ListWallets RPC client\",\n\t\tLong:  \"ListWallets returns a list of all available wallets.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"ListWallets\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &ListWalletsRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.ListWallets(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc _WalletGetWalletInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetWalletInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetWalletInfo\"),\n\t\tShort: \"GetWalletInfo RPC client\",\n\t\tLong:  \"GetWalletInfo returns detailed information about a specific wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetWalletInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetWalletInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetWalletInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to query.\")\n\n\treturn cmd\n}\n\nfunc _WalletUpdatePasswordCommand(cfg *client.Config) *cobra.Command {\n\treq := &UpdatePasswordRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"UpdatePassword\"),\n\t\tShort: \"UpdatePassword RPC client\",\n\t\tLong:  \"UpdatePassword updates the password of an existing wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"UpdatePassword\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &UpdatePasswordRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.UpdatePassword(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet whose password will be updated.\")\n\tcmd.PersistentFlags().StringVar(&req.OldPassword, cfg.FlagNamer(\"OldPassword\"), \"\", \"The current wallet password.\")\n\tcmd.PersistentFlags().StringVar(&req.NewPassword, cfg.FlagNamer(\"NewPassword\"), \"\", \"The new wallet password.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetTotalBalanceCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetTotalBalanceRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetTotalBalance\"),\n\t\tShort: \"GetTotalBalance RPC client\",\n\t\tLong:  \"GetTotalBalance returns the total available balance of the wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetTotalBalance\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetTotalBalanceRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetTotalBalance(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to get the total balance.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetTotalStakeCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetTotalStakeRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetTotalStake\"),\n\t\tShort: \"GetTotalStake RPC client\",\n\t\tLong:  \"GetTotalStake returns the total stake amount in the wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetTotalStake\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetTotalStakeRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetTotalStake(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to get the total stake.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetValidatorAddressCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetValidatorAddressRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetValidatorAddress\"),\n\t\tShort: \"GetValidatorAddress RPC client\",\n\t\tLong:  \"GetValidatorAddress retrieves the validator address associated with a public key.\\n Deprecated: Will move into utils.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetValidatorAddress\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetValidatorAddressRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetValidatorAddress(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer(\"PublicKey\"), \"\", \"The public key of the validator.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetAddressInfoCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetAddressInfoRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetAddressInfo\"),\n\t\tShort: \"GetAddressInfo RPC client\",\n\t\tLong:  \"GetAddressInfo returns detailed information about a specific address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetAddressInfo\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetAddressInfoRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetAddressInfo(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet containing the address.\")\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address to query.\")\n\n\treturn cmd\n}\n\nfunc _WalletSetAddressLabelCommand(cfg *client.Config) *cobra.Command {\n\treq := &SetAddressLabelRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SetAddressLabel\"),\n\t\tShort: \"SetAddressLabel RPC client\",\n\t\tLong:  \"SetAddressLabel sets or updates the label for a given address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"SetAddressLabel\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &SetAddressLabelRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SetAddressLabel(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet containing the address.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Wallet password required for modification.\")\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address to label.\")\n\tcmd.PersistentFlags().StringVar(&req.Label, cfg.FlagNamer(\"Label\"), \"\", \"The new label for the address.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetNewAddressCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetNewAddressRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetNewAddress\"),\n\t\tShort: \"GetNewAddress RPC client\",\n\t\tLong:  \"GetNewAddress generates a new address for the specified wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetNewAddress\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetNewAddressRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetNewAddress(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to generate a new address.\")\n\tflag.EnumVar(cmd.PersistentFlags(), &req.AddressType, cfg.FlagNamer(\"AddressType\"), \"The type of address to generate.\")\n\tcmd.PersistentFlags().StringVar(&req.Label, cfg.FlagNamer(\"Label\"), \"\", \"A label for the new address.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Password for the new address. It's required when address_type is Ed25519 type.\")\n\n\treturn cmd\n}\n\nfunc _WalletListAddressesCommand(cfg *client.Config) *cobra.Command {\n\treq := &ListAddressesRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"ListAddresses\"),\n\t\tShort: \"ListAddresses RPC client\",\n\t\tLong:  \"ListAddresses returns all addresses in the specified wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"ListAddresses\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &ListAddressesRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.ListAddresses(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the queried wallet.\")\n\tflag.EnumSliceVar(cmd.PersistentFlags(), &req.AddressTypes, cfg.FlagNamer(\"AddressTypes\"), \"Filter addresses by their types. If empty, all address types are included.\")\n\n\treturn cmd\n}\n\nfunc _WalletSignMessageCommand(cfg *client.Config) *cobra.Command {\n\treq := &SignMessageRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SignMessage\"),\n\t\tShort: \"SignMessage RPC client\",\n\t\tLong:  \"SignMessage signs an arbitrary message using a wallet's private key.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"SignMessage\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &SignMessageRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SignMessage(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to sign with.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Wallet password required for signing.\")\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address whose private key should be used for signing the message.\")\n\tcmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer(\"Message\"), \"\", \"The arbitrary message to be signed.\")\n\n\treturn cmd\n}\n\nfunc _WalletSignRawTransactionCommand(cfg *client.Config) *cobra.Command {\n\treq := &SignRawTransactionRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SignRawTransaction\"),\n\t\tShort: \"SignRawTransaction RPC client\",\n\t\tLong:  \"SignRawTransaction signs a raw transaction for a specified wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"SignRawTransaction\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &SignRawTransactionRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SignRawTransaction(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet used for signing.\")\n\tcmd.PersistentFlags().StringVar(&req.RawTransaction, cfg.FlagNamer(\"RawTransaction\"), \"\", \"The raw transaction data to be signed.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Wallet password required for signing.\")\n\n\treturn cmd\n}\n\nfunc _WalletListTransactionsCommand(cfg *client.Config) *cobra.Command {\n\treq := &ListTransactionsRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"ListTransactions\"),\n\t\tShort: \"ListTransactions RPC client\",\n\t\tLong:  \"ListTransactions returns a list of transactions for a wallet,\\n optionally filtered by a specific address, with pagination support.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"ListTransactions\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &ListTransactionsRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.ListTransactions(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to query transactions for.\")\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"Optional: The address to filter transactions.\\n If empty or set to '*', transactions for all addresses in the wallet are included.\")\n\tflag.EnumVar(cmd.PersistentFlags(), &req.Direction, cfg.FlagNamer(\"Direction\"), \"Filter transactions by direction relative to the wallet.\\n Defaults to any direction if not set.\")\n\tcmd.PersistentFlags().Int32Var(&req.Count, cfg.FlagNamer(\"Count\"), 0, \"Optional: The maximum number of transactions to return.\\n Defaults to 10 if not set.\")\n\tcmd.PersistentFlags().Int32Var(&req.Skip, cfg.FlagNamer(\"Skip\"), 0, \"Optional: The number of transactions to skip (for pagination).\\n Defaults to 0 if not set.\")\n\n\treturn cmd\n}\n\nfunc _WalletSetDefaultFeeCommand(cfg *client.Config) *cobra.Command {\n\treq := &SetDefaultFeeRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"SetDefaultFee\"),\n\t\tShort: \"SetDefaultFee RPC client\",\n\t\tLong:  \"SetDefaultFee sets the default fee for the wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"SetDefaultFee\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &SetDefaultFeeRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.SetDefaultFee(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to set the default fee.\")\n\tcmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer(\"Amount\"), 0, \"The default fee amount in NanoPAC.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetMnemonicCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetMnemonicRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetMnemonic\"),\n\t\tShort: \"GetMnemonic RPC client\",\n\t\tLong:  \"GetMnemonic returns the mnemonic (seed phrase) for the wallet.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetMnemonic\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetMnemonicRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetMnemonic(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet to get the mnemonic.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Wallet password.\")\n\n\treturn cmd\n}\n\nfunc _WalletGetPrivateKeyCommand(cfg *client.Config) *cobra.Command {\n\treq := &GetPrivateKeyRequest{}\n\n\tcmd := &cobra.Command{\n\t\tUse:   cfg.CommandNamer(\"GetPrivateKey\"),\n\t\tShort: \"GetPrivateKey RPC client\",\n\t\tLong:  \"GetPrivateKey returns the private key for a given address.\",\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif cfg.UseEnvVars {\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tif err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, \"Wallet\", \"GetPrivateKey\"); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error {\n\t\t\t\tcli := NewWalletClient(cc)\n\t\t\t\tv := &GetPrivateKeyRequest{}\n\n\t\t\t\tif err := in(v); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tproto.Merge(v, req)\n\n\t\t\t\tres, err := cli.GetPrivateKey(cmd.Context(), v)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\treturn out(res)\n\n\t\t\t})\n\t\t},\n\t}\n\n\tcmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer(\"WalletName\"), \"\", \"The name of the wallet containing the address.\")\n\tcmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer(\"Password\"), \"\", \"Wallet password.\")\n\tcmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer(\"Address\"), \"\", \"The address to get the private key.\")\n\n\treturn cmd\n}\n"
  },
  {
    "path": "www/grpc/gen/go/wallet.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.36.11\n// \tprotoc        (unknown)\n// source: wallet.proto\n\npackage pactus\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n\tunsafe \"unsafe\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\n// AddressType defines different types of blockchain addresses.\ntype AddressType int32\n\nconst (\n\t// Treasury address type.\n\t// Should not be used to generate new addresses.\n\tAddressType_ADDRESS_TYPE_TREASURY AddressType = 0\n\t// Validator address type used for validator nodes.\n\tAddressType_ADDRESS_TYPE_VALIDATOR AddressType = 1\n\t// Account address type with BLS signature scheme.\n\tAddressType_ADDRESS_TYPE_BLS_ACCOUNT AddressType = 2\n\t// Account address type with Ed25519 signature scheme.\n\t// Note: Generating a new Ed25519 address requires the wallet password.\n\tAddressType_ADDRESS_TYPE_ED25519_ACCOUNT AddressType = 3\n)\n\n// Enum value maps for AddressType.\nvar (\n\tAddressType_name = map[int32]string{\n\t\t0: \"ADDRESS_TYPE_TREASURY\",\n\t\t1: \"ADDRESS_TYPE_VALIDATOR\",\n\t\t2: \"ADDRESS_TYPE_BLS_ACCOUNT\",\n\t\t3: \"ADDRESS_TYPE_ED25519_ACCOUNT\",\n\t}\n\tAddressType_value = map[string]int32{\n\t\t\"ADDRESS_TYPE_TREASURY\":        0,\n\t\t\"ADDRESS_TYPE_VALIDATOR\":       1,\n\t\t\"ADDRESS_TYPE_BLS_ACCOUNT\":     2,\n\t\t\"ADDRESS_TYPE_ED25519_ACCOUNT\": 3,\n\t}\n)\n\nfunc (x AddressType) Enum() *AddressType {\n\tp := new(AddressType)\n\t*p = x\n\treturn p\n}\n\nfunc (x AddressType) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (AddressType) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_wallet_proto_enumTypes[0].Descriptor()\n}\n\nfunc (AddressType) Type() protoreflect.EnumType {\n\treturn &file_wallet_proto_enumTypes[0]\n}\n\nfunc (x AddressType) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use AddressType.Descriptor instead.\nfunc (AddressType) EnumDescriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{0}\n}\n\n// TxDirection indicates the direction of a transaction relative to the wallet.\ntype TxDirection int32\n\nconst (\n\t// include both incoming and outgoing transactions.\n\tTxDirection_TX_DIRECTION_ANY TxDirection = 0\n\t// Include only incoming transactions where the wallet receives funds.\n\tTxDirection_TX_DIRECTION_INCOMING TxDirection = 1\n\t// Include only outgoing transactions where the wallet sends funds.\n\tTxDirection_TX_DIRECTION_OUTGOING TxDirection = 2\n)\n\n// Enum value maps for TxDirection.\nvar (\n\tTxDirection_name = map[int32]string{\n\t\t0: \"TX_DIRECTION_ANY\",\n\t\t1: \"TX_DIRECTION_INCOMING\",\n\t\t2: \"TX_DIRECTION_OUTGOING\",\n\t}\n\tTxDirection_value = map[string]int32{\n\t\t\"TX_DIRECTION_ANY\":      0,\n\t\t\"TX_DIRECTION_INCOMING\": 1,\n\t\t\"TX_DIRECTION_OUTGOING\": 2,\n\t}\n)\n\nfunc (x TxDirection) Enum() *TxDirection {\n\tp := new(TxDirection)\n\t*p = x\n\treturn p\n}\n\nfunc (x TxDirection) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (TxDirection) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_wallet_proto_enumTypes[1].Descriptor()\n}\n\nfunc (TxDirection) Type() protoreflect.EnumType {\n\treturn &file_wallet_proto_enumTypes[1]\n}\n\nfunc (x TxDirection) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use TxDirection.Descriptor instead.\nfunc (TxDirection) EnumDescriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{1}\n}\n\n// TransactionStatus defines the status of a transaction.\ntype TransactionStatus int32\n\nconst (\n\t// Pending status for transactions in the mempool.\n\tTransactionStatus_TRANSACTION_STATUS_PENDING TransactionStatus = 0\n\t// Confirmed status for transactions included in a block.\n\tTransactionStatus_TRANSACTION_STATUS_CONFIRMED TransactionStatus = 1\n\t// Failed status for transactions that were not successful.\n\tTransactionStatus_TRANSACTION_STATUS_FAILED TransactionStatus = -1\n)\n\n// Enum value maps for TransactionStatus.\nvar (\n\tTransactionStatus_name = map[int32]string{\n\t\t0:  \"TRANSACTION_STATUS_PENDING\",\n\t\t1:  \"TRANSACTION_STATUS_CONFIRMED\",\n\t\t-1: \"TRANSACTION_STATUS_FAILED\",\n\t}\n\tTransactionStatus_value = map[string]int32{\n\t\t\"TRANSACTION_STATUS_PENDING\":   0,\n\t\t\"TRANSACTION_STATUS_CONFIRMED\": 1,\n\t\t\"TRANSACTION_STATUS_FAILED\":    -1,\n\t}\n)\n\nfunc (x TransactionStatus) Enum() *TransactionStatus {\n\tp := new(TransactionStatus)\n\t*p = x\n\treturn p\n}\n\nfunc (x TransactionStatus) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (TransactionStatus) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_wallet_proto_enumTypes[2].Descriptor()\n}\n\nfunc (TransactionStatus) Type() protoreflect.EnumType {\n\treturn &file_wallet_proto_enumTypes[2]\n}\n\nfunc (x TransactionStatus) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use TransactionStatus.Descriptor instead.\nfunc (TransactionStatus) EnumDescriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{2}\n}\n\n// AddressInfo contains detailed information about a wallet address.\ntype AddressInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The address string.\n\tAddress string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The public key associated with the address.\n\tPublicKey string `protobuf:\"bytes,2,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\t// A human-readable label associated with the address.\n\tLabel string `protobuf:\"bytes,3,opt,name=label,proto3\" json:\"label,omitempty\"`\n\t// The Hierarchical Deterministic (HD) path of the address within the wallet.\n\tPath          string `protobuf:\"bytes,4,opt,name=path,proto3\" json:\"path,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *AddressInfo) Reset() {\n\t*x = AddressInfo{}\n\tmi := &file_wallet_proto_msgTypes[0]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *AddressInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*AddressInfo) ProtoMessage() {}\n\nfunc (x *AddressInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[0]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use AddressInfo.ProtoReflect.Descriptor instead.\nfunc (*AddressInfo) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *AddressInfo) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *AddressInfo) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *AddressInfo) GetLabel() string {\n\tif x != nil {\n\t\treturn x.Label\n\t}\n\treturn \"\"\n}\n\nfunc (x *AddressInfo) GetPath() string {\n\tif x != nil {\n\t\treturn x.Path\n\t}\n\treturn \"\"\n}\n\n// Request message for generating a new wallet address.\ntype GetNewAddressRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to generate a new address.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The type of address to generate.\n\tAddressType AddressType `protobuf:\"varint,2,opt,name=address_type,json=addressType,proto3,enum=pactus.AddressType\" json:\"address_type,omitempty\"`\n\t// A label for the new address.\n\tLabel string `protobuf:\"bytes,3,opt,name=label,proto3\" json:\"label,omitempty\"`\n\t// Password for the new address. It's required when address_type is Ed25519 type.\n\tPassword      string `protobuf:\"bytes,4,opt,name=password,proto3\" json:\"password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNewAddressRequest) Reset() {\n\t*x = GetNewAddressRequest{}\n\tmi := &file_wallet_proto_msgTypes[1]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNewAddressRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNewAddressRequest) ProtoMessage() {}\n\nfunc (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[1]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNewAddressRequest.ProtoReflect.Descriptor instead.\nfunc (*GetNewAddressRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *GetNewAddressRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNewAddressRequest) GetAddressType() AddressType {\n\tif x != nil {\n\t\treturn x.AddressType\n\t}\n\treturn AddressType_ADDRESS_TYPE_TREASURY\n}\n\nfunc (x *GetNewAddressRequest) GetLabel() string {\n\tif x != nil {\n\t\treturn x.Label\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNewAddressRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\n// Response message contains newly generated address information.\ntype GetNewAddressResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet where address was generated.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Detailed information about the new address.\n\tAddr          *AddressInfo `protobuf:\"bytes,2,opt,name=addr,proto3\" json:\"addr,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetNewAddressResponse) Reset() {\n\t*x = GetNewAddressResponse{}\n\tmi := &file_wallet_proto_msgTypes[2]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetNewAddressResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetNewAddressResponse) ProtoMessage() {}\n\nfunc (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[2]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetNewAddressResponse.ProtoReflect.Descriptor instead.\nfunc (*GetNewAddressResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *GetNewAddressResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetNewAddressResponse) GetAddr() *AddressInfo {\n\tif x != nil {\n\t\treturn x.Addr\n\t}\n\treturn nil\n}\n\n// Request message for restoring a wallet from mnemonic (seed phrase).\ntype RestoreWalletRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name for the restored wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The mnemonic (seed phrase) for wallet recovery.\n\tMnemonic string `protobuf:\"bytes,2,opt,name=mnemonic,proto3\" json:\"mnemonic,omitempty\"`\n\t// Password to secure the restored wallet.\n\tPassword      string `protobuf:\"bytes,3,opt,name=password,proto3\" json:\"password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *RestoreWalletRequest) Reset() {\n\t*x = RestoreWalletRequest{}\n\tmi := &file_wallet_proto_msgTypes[3]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *RestoreWalletRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RestoreWalletRequest) ProtoMessage() {}\n\nfunc (x *RestoreWalletRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[3]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RestoreWalletRequest.ProtoReflect.Descriptor instead.\nfunc (*RestoreWalletRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *RestoreWalletRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *RestoreWalletRequest) GetMnemonic() string {\n\tif x != nil {\n\t\treturn x.Mnemonic\n\t}\n\treturn \"\"\n}\n\nfunc (x *RestoreWalletRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\n// Response message confirming wallet restoration.\ntype RestoreWalletResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the restored wallet.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *RestoreWalletResponse) Reset() {\n\t*x = RestoreWalletResponse{}\n\tmi := &file_wallet_proto_msgTypes[4]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *RestoreWalletResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*RestoreWalletResponse) ProtoMessage() {}\n\nfunc (x *RestoreWalletResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[4]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use RestoreWalletResponse.ProtoReflect.Descriptor instead.\nfunc (*RestoreWalletResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *RestoreWalletResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Request message for creating a new wallet.\ntype CreateWalletRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name for the new wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Password to secure the new wallet.\n\tPassword      string `protobuf:\"bytes,2,opt,name=password,proto3\" json:\"password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CreateWalletRequest) Reset() {\n\t*x = CreateWalletRequest{}\n\tmi := &file_wallet_proto_msgTypes[5]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CreateWalletRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateWalletRequest) ProtoMessage() {}\n\nfunc (x *CreateWalletRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[5]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateWalletRequest.ProtoReflect.Descriptor instead.\nfunc (*CreateWalletRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *CreateWalletRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *CreateWalletRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\n// Response message contains wallet recovery mnemonic (seed phrase).\ntype CreateWalletResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name for the new wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The mnemonic (seed phrase) for wallet recovery.\n\tMnemonic      string `protobuf:\"bytes,2,opt,name=mnemonic,proto3\" json:\"mnemonic,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *CreateWalletResponse) Reset() {\n\t*x = CreateWalletResponse{}\n\tmi := &file_wallet_proto_msgTypes[6]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *CreateWalletResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*CreateWalletResponse) ProtoMessage() {}\n\nfunc (x *CreateWalletResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[6]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use CreateWalletResponse.ProtoReflect.Descriptor instead.\nfunc (*CreateWalletResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *CreateWalletResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *CreateWalletResponse) GetMnemonic() string {\n\tif x != nil {\n\t\treturn x.Mnemonic\n\t}\n\treturn \"\"\n}\n\n// Request message for loading an existing wallet.\n// Deprecated: It will be removed in a future version.\ntype LoadWalletRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to load.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *LoadWalletRequest) Reset() {\n\t*x = LoadWalletRequest{}\n\tmi := &file_wallet_proto_msgTypes[7]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *LoadWalletRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*LoadWalletRequest) ProtoMessage() {}\n\nfunc (x *LoadWalletRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[7]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use LoadWalletRequest.ProtoReflect.Descriptor instead.\nfunc (*LoadWalletRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *LoadWalletRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Response message confirming wallet loaded.\n// Deprecated: It will be removed in a future version.\ntype LoadWalletResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the loaded wallet.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *LoadWalletResponse) Reset() {\n\t*x = LoadWalletResponse{}\n\tmi := &file_wallet_proto_msgTypes[8]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *LoadWalletResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*LoadWalletResponse) ProtoMessage() {}\n\nfunc (x *LoadWalletResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[8]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use LoadWalletResponse.ProtoReflect.Descriptor instead.\nfunc (*LoadWalletResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *LoadWalletResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Request message for unloading a wallet.\n// Deprecated: It will be removed in a future version.\ntype UnloadWalletRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to unload.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *UnloadWalletRequest) Reset() {\n\t*x = UnloadWalletRequest{}\n\tmi := &file_wallet_proto_msgTypes[9]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UnloadWalletRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UnloadWalletRequest) ProtoMessage() {}\n\nfunc (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[9]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UnloadWalletRequest.ProtoReflect.Descriptor instead.\nfunc (*UnloadWalletRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *UnloadWalletRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Response message confirming wallet unloading.\n// Deprecated: It will be removed in a future version.\ntype UnloadWalletResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the unloaded wallet.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *UnloadWalletResponse) Reset() {\n\t*x = UnloadWalletResponse{}\n\tmi := &file_wallet_proto_msgTypes[10]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UnloadWalletResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UnloadWalletResponse) ProtoMessage() {}\n\nfunc (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[10]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UnloadWalletResponse.ProtoReflect.Descriptor instead.\nfunc (*UnloadWalletResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *UnloadWalletResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Request message for obtaining the validator address associated with a public key.\ntype GetValidatorAddressRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The public key of the validator.\n\tPublicKey     string `protobuf:\"bytes,1,opt,name=public_key,json=publicKey,proto3\" json:\"public_key,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorAddressRequest) Reset() {\n\t*x = GetValidatorAddressRequest{}\n\tmi := &file_wallet_proto_msgTypes[11]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorAddressRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorAddressRequest) ProtoMessage() {}\n\nfunc (x *GetValidatorAddressRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[11]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorAddressRequest.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorAddressRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *GetValidatorAddressRequest) GetPublicKey() string {\n\tif x != nil {\n\t\treturn x.PublicKey\n\t}\n\treturn \"\"\n}\n\n// Response message containing the validator address corresponding to a public key.\ntype GetValidatorAddressResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The validator address associated with the public key.\n\tAddress       string `protobuf:\"bytes,1,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetValidatorAddressResponse) Reset() {\n\t*x = GetValidatorAddressResponse{}\n\tmi := &file_wallet_proto_msgTypes[12]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetValidatorAddressResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetValidatorAddressResponse) ProtoMessage() {}\n\nfunc (x *GetValidatorAddressResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[12]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetValidatorAddressResponse.ProtoReflect.Descriptor instead.\nfunc (*GetValidatorAddressResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *GetValidatorAddressResponse) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Request message for signing a raw transaction.\ntype SignRawTransactionRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet used for signing.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The raw transaction data to be signed.\n\tRawTransaction string `protobuf:\"bytes,2,opt,name=raw_transaction,json=rawTransaction,proto3\" json:\"raw_transaction,omitempty\"`\n\t// Wallet password required for signing.\n\tPassword      string `protobuf:\"bytes,3,opt,name=password,proto3\" json:\"password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignRawTransactionRequest) Reset() {\n\t*x = SignRawTransactionRequest{}\n\tmi := &file_wallet_proto_msgTypes[13]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignRawTransactionRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignRawTransactionRequest) ProtoMessage() {}\n\nfunc (x *SignRawTransactionRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[13]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignRawTransactionRequest.ProtoReflect.Descriptor instead.\nfunc (*SignRawTransactionRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *SignRawTransactionRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignRawTransactionRequest) GetRawTransaction() string {\n\tif x != nil {\n\t\treturn x.RawTransaction\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignRawTransactionRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\n// Response message contains the transaction ID and signed raw transaction.\ntype SignRawTransactionResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The ID of the signed transaction.\n\tTransactionId string `protobuf:\"bytes,1,opt,name=transaction_id,json=transactionId,proto3\" json:\"transaction_id,omitempty\"`\n\t// The signed raw transaction data.\n\tSignedRawTransaction string `protobuf:\"bytes,2,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3\" json:\"signed_raw_transaction,omitempty\"`\n\tunknownFields        protoimpl.UnknownFields\n\tsizeCache            protoimpl.SizeCache\n}\n\nfunc (x *SignRawTransactionResponse) Reset() {\n\t*x = SignRawTransactionResponse{}\n\tmi := &file_wallet_proto_msgTypes[14]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignRawTransactionResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignRawTransactionResponse) ProtoMessage() {}\n\nfunc (x *SignRawTransactionResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[14]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignRawTransactionResponse.ProtoReflect.Descriptor instead.\nfunc (*SignRawTransactionResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{14}\n}\n\nfunc (x *SignRawTransactionResponse) GetTransactionId() string {\n\tif x != nil {\n\t\treturn x.TransactionId\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignRawTransactionResponse) GetSignedRawTransaction() string {\n\tif x != nil {\n\t\treturn x.SignedRawTransaction\n\t}\n\treturn \"\"\n}\n\n// Request message for obtaining the total available balance of a wallet.\ntype GetTotalBalanceRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to get the total balance.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTotalBalanceRequest) Reset() {\n\t*x = GetTotalBalanceRequest{}\n\tmi := &file_wallet_proto_msgTypes[15]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTotalBalanceRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTotalBalanceRequest) ProtoMessage() {}\n\nfunc (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[15]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTotalBalanceRequest.ProtoReflect.Descriptor instead.\nfunc (*GetTotalBalanceRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{15}\n}\n\nfunc (x *GetTotalBalanceRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Response message contains the total available balance of the wallet.\ntype GetTotalBalanceResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the queried wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The total balance of the wallet in NanoPAC.\n\tTotalBalance  int64 `protobuf:\"varint,2,opt,name=total_balance,json=totalBalance,proto3\" json:\"total_balance,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTotalBalanceResponse) Reset() {\n\t*x = GetTotalBalanceResponse{}\n\tmi := &file_wallet_proto_msgTypes[16]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTotalBalanceResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTotalBalanceResponse) ProtoMessage() {}\n\nfunc (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[16]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTotalBalanceResponse.ProtoReflect.Descriptor instead.\nfunc (*GetTotalBalanceResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{16}\n}\n\nfunc (x *GetTotalBalanceResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetTotalBalanceResponse) GetTotalBalance() int64 {\n\tif x != nil {\n\t\treturn x.TotalBalance\n\t}\n\treturn 0\n}\n\n// Request message to sign an arbitrary message.\ntype SignMessageRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to sign with.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Wallet password required for signing.\n\tPassword string `protobuf:\"bytes,2,opt,name=password,proto3\" json:\"password,omitempty\"`\n\t// The address whose private key should be used for signing the message.\n\tAddress string `protobuf:\"bytes,3,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The arbitrary message to be signed.\n\tMessage       string `protobuf:\"bytes,4,opt,name=message,proto3\" json:\"message,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignMessageRequest) Reset() {\n\t*x = SignMessageRequest{}\n\tmi := &file_wallet_proto_msgTypes[17]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignMessageRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignMessageRequest) ProtoMessage() {}\n\nfunc (x *SignMessageRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[17]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignMessageRequest.ProtoReflect.Descriptor instead.\nfunc (*SignMessageRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{17}\n}\n\nfunc (x *SignMessageRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignMessageRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignMessageRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *SignMessageRequest) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\n// Response message contains message signature.\ntype SignMessageResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The signature in hexadecimal format.\n\tSignature     string `protobuf:\"bytes,1,opt,name=signature,proto3\" json:\"signature,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SignMessageResponse) Reset() {\n\t*x = SignMessageResponse{}\n\tmi := &file_wallet_proto_msgTypes[18]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SignMessageResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SignMessageResponse) ProtoMessage() {}\n\nfunc (x *SignMessageResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[18]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SignMessageResponse.ProtoReflect.Descriptor instead.\nfunc (*SignMessageResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{18}\n}\n\nfunc (x *SignMessageResponse) GetSignature() string {\n\tif x != nil {\n\t\treturn x.Signature\n\t}\n\treturn \"\"\n}\n\n// Request message for obtaining the total stake of a wallet.\ntype GetTotalStakeRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to get the total stake.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTotalStakeRequest) Reset() {\n\t*x = GetTotalStakeRequest{}\n\tmi := &file_wallet_proto_msgTypes[19]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTotalStakeRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTotalStakeRequest) ProtoMessage() {}\n\nfunc (x *GetTotalStakeRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[19]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTotalStakeRequest.ProtoReflect.Descriptor instead.\nfunc (*GetTotalStakeRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{19}\n}\n\nfunc (x *GetTotalStakeRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Response message contains the total stake of the wallet.\ntype GetTotalStakeResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the queried wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The total stake amount in NanoPAC.\n\tTotalStake    int64 `protobuf:\"varint,2,opt,name=total_stake,json=totalStake,proto3\" json:\"total_stake,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetTotalStakeResponse) Reset() {\n\t*x = GetTotalStakeResponse{}\n\tmi := &file_wallet_proto_msgTypes[20]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetTotalStakeResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetTotalStakeResponse) ProtoMessage() {}\n\nfunc (x *GetTotalStakeResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[20]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetTotalStakeResponse.ProtoReflect.Descriptor instead.\nfunc (*GetTotalStakeResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{20}\n}\n\nfunc (x *GetTotalStakeResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetTotalStakeResponse) GetTotalStake() int64 {\n\tif x != nil {\n\t\treturn x.TotalStake\n\t}\n\treturn 0\n}\n\n// Request message for getting address information.\ntype GetAddressInfoRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet containing the address.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The address to query.\n\tAddress       string `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetAddressInfoRequest) Reset() {\n\t*x = GetAddressInfoRequest{}\n\tmi := &file_wallet_proto_msgTypes[21]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetAddressInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetAddressInfoRequest) ProtoMessage() {}\n\nfunc (x *GetAddressInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[21]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetAddressInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetAddressInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{21}\n}\n\nfunc (x *GetAddressInfoRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetAddressInfoRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Response message contains address details.\ntype GetAddressInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet containing the address.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Detailed information about the address.\n\tAddr          *AddressInfo `protobuf:\"bytes,2,opt,name=addr,proto3\" json:\"addr,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetAddressInfoResponse) Reset() {\n\t*x = GetAddressInfoResponse{}\n\tmi := &file_wallet_proto_msgTypes[22]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetAddressInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetAddressInfoResponse) ProtoMessage() {}\n\nfunc (x *GetAddressInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[22]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetAddressInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetAddressInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{22}\n}\n\nfunc (x *GetAddressInfoResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetAddressInfoResponse) GetAddr() *AddressInfo {\n\tif x != nil {\n\t\treturn x.Addr\n\t}\n\treturn nil\n}\n\n// Request message for setting address label.\ntype SetAddressLabelRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet containing the address.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Wallet password required for modification.\n\tPassword string `protobuf:\"bytes,2,opt,name=password,proto3\" json:\"password,omitempty\"`\n\t// The address to label.\n\tAddress string `protobuf:\"bytes,3,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The new label for the address.\n\tLabel         string `protobuf:\"bytes,4,opt,name=label,proto3\" json:\"label,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SetAddressLabelRequest) Reset() {\n\t*x = SetAddressLabelRequest{}\n\tmi := &file_wallet_proto_msgTypes[23]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SetAddressLabelRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SetAddressLabelRequest) ProtoMessage() {}\n\nfunc (x *SetAddressLabelRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[23]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SetAddressLabelRequest.ProtoReflect.Descriptor instead.\nfunc (*SetAddressLabelRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{23}\n}\n\nfunc (x *SetAddressLabelRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetAddressLabelRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetAddressLabelRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetAddressLabelRequest) GetLabel() string {\n\tif x != nil {\n\t\treturn x.Label\n\t}\n\treturn \"\"\n}\n\n// Response message for updated address label.\ntype SetAddressLabelResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet where the address label was updated.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The address where the label was updated.\n\tAddress string `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// The new label for the address.\n\tLabel         string `protobuf:\"bytes,3,opt,name=label,proto3\" json:\"label,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SetAddressLabelResponse) Reset() {\n\t*x = SetAddressLabelResponse{}\n\tmi := &file_wallet_proto_msgTypes[24]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SetAddressLabelResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SetAddressLabelResponse) ProtoMessage() {}\n\nfunc (x *SetAddressLabelResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[24]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SetAddressLabelResponse.ProtoReflect.Descriptor instead.\nfunc (*SetAddressLabelResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{24}\n}\n\nfunc (x *SetAddressLabelResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetAddressLabelResponse) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetAddressLabelResponse) GetLabel() string {\n\tif x != nil {\n\t\treturn x.Label\n\t}\n\treturn \"\"\n}\n\n// Request message for listing wallets.\ntype ListWalletsRequest struct {\n\tstate         protoimpl.MessageState `protogen:\"open.v1\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListWalletsRequest) Reset() {\n\t*x = ListWalletsRequest{}\n\tmi := &file_wallet_proto_msgTypes[25]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListWalletsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListWalletsRequest) ProtoMessage() {}\n\nfunc (x *ListWalletsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[25]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListWalletsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListWalletsRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{25}\n}\n\n// Response message contains wallet names.\ntype ListWalletsResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// Array of wallet names.\n\tWallets       []string `protobuf:\"bytes,1,rep,name=wallets,proto3\" json:\"wallets,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListWalletsResponse) Reset() {\n\t*x = ListWalletsResponse{}\n\tmi := &file_wallet_proto_msgTypes[26]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListWalletsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListWalletsResponse) ProtoMessage() {}\n\nfunc (x *ListWalletsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[26]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListWalletsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListWalletsResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{26}\n}\n\nfunc (x *ListWalletsResponse) GetWallets() []string {\n\tif x != nil {\n\t\treturn x.Wallets\n\t}\n\treturn nil\n}\n\n// Request message for getting wallet information.\ntype GetWalletInfoRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to query.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetWalletInfoRequest) Reset() {\n\t*x = GetWalletInfoRequest{}\n\tmi := &file_wallet_proto_msgTypes[27]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetWalletInfoRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetWalletInfoRequest) ProtoMessage() {}\n\nfunc (x *GetWalletInfoRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[27]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetWalletInfoRequest.ProtoReflect.Descriptor instead.\nfunc (*GetWalletInfoRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{27}\n}\n\nfunc (x *GetWalletInfoRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Response message contains wallet details.\ntype GetWalletInfoResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The wallet format version.\n\tVersion int32 `protobuf:\"varint,2,opt,name=version,proto3\" json:\"version,omitempty\"`\n\t// The network the wallet is connected to (e.g., mainnet, testnet).\n\tNetwork string `protobuf:\"bytes,3,opt,name=network,proto3\" json:\"network,omitempty\"`\n\t// Indicates if the wallet is encrypted.\n\tEncrypted bool `protobuf:\"varint,4,opt,name=encrypted,proto3\" json:\"encrypted,omitempty\"`\n\t// A unique identifier of the wallet.\n\tUuid string `protobuf:\"bytes,5,opt,name=uuid,proto3\" json:\"uuid,omitempty\"`\n\t// Unix timestamp of wallet creation.\n\tCreatedAt int64 `protobuf:\"varint,6,opt,name=created_at,json=createdAt,proto3\" json:\"created_at,omitempty\"`\n\t// The default fee of the wallet.\n\tDefaultFee int64 `protobuf:\"varint,7,opt,name=default_fee,json=defaultFee,proto3\" json:\"default_fee,omitempty\"`\n\t// The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n\tDriver string `protobuf:\"bytes,8,opt,name=driver,proto3\" json:\"driver,omitempty\"`\n\t// Path to the wallet file or storage location.\n\tPath          string `protobuf:\"bytes,9,opt,name=path,proto3\" json:\"path,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetWalletInfoResponse) Reset() {\n\t*x = GetWalletInfoResponse{}\n\tmi := &file_wallet_proto_msgTypes[28]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetWalletInfoResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetWalletInfoResponse) ProtoMessage() {}\n\nfunc (x *GetWalletInfoResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[28]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetWalletInfoResponse.ProtoReflect.Descriptor instead.\nfunc (*GetWalletInfoResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{28}\n}\n\nfunc (x *GetWalletInfoResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetWalletInfoResponse) GetVersion() int32 {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn 0\n}\n\nfunc (x *GetWalletInfoResponse) GetNetwork() string {\n\tif x != nil {\n\t\treturn x.Network\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetWalletInfoResponse) GetEncrypted() bool {\n\tif x != nil {\n\t\treturn x.Encrypted\n\t}\n\treturn false\n}\n\nfunc (x *GetWalletInfoResponse) GetUuid() string {\n\tif x != nil {\n\t\treturn x.Uuid\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetWalletInfoResponse) GetCreatedAt() int64 {\n\tif x != nil {\n\t\treturn x.CreatedAt\n\t}\n\treturn 0\n}\n\nfunc (x *GetWalletInfoResponse) GetDefaultFee() int64 {\n\tif x != nil {\n\t\treturn x.DefaultFee\n\t}\n\treturn 0\n}\n\nfunc (x *GetWalletInfoResponse) GetDriver() string {\n\tif x != nil {\n\t\treturn x.Driver\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetWalletInfoResponse) GetPath() string {\n\tif x != nil {\n\t\treturn x.Path\n\t}\n\treturn \"\"\n}\n\n// Request message for listing wallet addresses.\ntype ListAddressesRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the queried wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Filter addresses by their types. If empty, all address types are included.\n\tAddressTypes  []AddressType `protobuf:\"varint,2,rep,packed,name=address_types,json=addressTypes,proto3,enum=pactus.AddressType\" json:\"address_types,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListAddressesRequest) Reset() {\n\t*x = ListAddressesRequest{}\n\tmi := &file_wallet_proto_msgTypes[29]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListAddressesRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListAddressesRequest) ProtoMessage() {}\n\nfunc (x *ListAddressesRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[29]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListAddressesRequest.ProtoReflect.Descriptor instead.\nfunc (*ListAddressesRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{29}\n}\n\nfunc (x *ListAddressesRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListAddressesRequest) GetAddressTypes() []AddressType {\n\tif x != nil {\n\t\treturn x.AddressTypes\n\t}\n\treturn nil\n}\n\n// Response message contains wallet addresses.\ntype ListAddressesResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the queried wallet.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// List of all addresses in the wallet with their details.\n\tAddrs         []*AddressInfo `protobuf:\"bytes,2,rep,name=addrs,proto3\" json:\"addrs,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListAddressesResponse) Reset() {\n\t*x = ListAddressesResponse{}\n\tmi := &file_wallet_proto_msgTypes[30]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListAddressesResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListAddressesResponse) ProtoMessage() {}\n\nfunc (x *ListAddressesResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[30]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListAddressesResponse.ProtoReflect.Descriptor instead.\nfunc (*ListAddressesResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{30}\n}\n\nfunc (x *ListAddressesResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListAddressesResponse) GetAddrs() []*AddressInfo {\n\tif x != nil {\n\t\treturn x.Addrs\n\t}\n\treturn nil\n}\n\n// Request message for updating wallet password.\ntype UpdatePasswordRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet whose password will be updated.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The current wallet password.\n\tOldPassword string `protobuf:\"bytes,2,opt,name=old_password,json=oldPassword,proto3\" json:\"old_password,omitempty\"`\n\t// The new wallet password.\n\tNewPassword   string `protobuf:\"bytes,3,opt,name=new_password,json=newPassword,proto3\" json:\"new_password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *UpdatePasswordRequest) Reset() {\n\t*x = UpdatePasswordRequest{}\n\tmi := &file_wallet_proto_msgTypes[31]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UpdatePasswordRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UpdatePasswordRequest) ProtoMessage() {}\n\nfunc (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[31]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UpdatePasswordRequest.ProtoReflect.Descriptor instead.\nfunc (*UpdatePasswordRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{31}\n}\n\nfunc (x *UpdatePasswordRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *UpdatePasswordRequest) GetOldPassword() string {\n\tif x != nil {\n\t\treturn x.OldPassword\n\t}\n\treturn \"\"\n}\n\nfunc (x *UpdatePasswordRequest) GetNewPassword() string {\n\tif x != nil {\n\t\treturn x.NewPassword\n\t}\n\treturn \"\"\n}\n\n// Response message confirming wallet password update.\ntype UpdatePasswordResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet whose password was updated.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *UpdatePasswordResponse) Reset() {\n\t*x = UpdatePasswordResponse{}\n\tmi := &file_wallet_proto_msgTypes[32]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *UpdatePasswordResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*UpdatePasswordResponse) ProtoMessage() {}\n\nfunc (x *UpdatePasswordResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[32]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use UpdatePasswordResponse.ProtoReflect.Descriptor instead.\nfunc (*UpdatePasswordResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{32}\n}\n\nfunc (x *UpdatePasswordResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// WalletTransactionInfo contains information about a transaction in a wallet.\ntype WalletTransactionInfo struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// A sequence number for the transaction in the wallet.\n\tNo int64 `protobuf:\"varint,1,opt,name=no,proto3\" json:\"no,omitempty\"`\n\t// The unique ID of the transaction.\n\tTxId string `protobuf:\"bytes,2,opt,name=tx_id,json=txId,proto3\" json:\"tx_id,omitempty\"`\n\t// The sender's address.\n\tSender string `protobuf:\"bytes,3,opt,name=sender,proto3\" json:\"sender,omitempty\"`\n\t// The receiver's address.\n\tReceiver string `protobuf:\"bytes,4,opt,name=receiver,proto3\" json:\"receiver,omitempty\"`\n\t// The direction of the transaction relative to the wallet.\n\tDirection TxDirection `protobuf:\"varint,5,opt,name=direction,proto3,enum=pactus.TxDirection\" json:\"direction,omitempty\"`\n\t// The amount involved in the transaction in NanoPAC.\n\tAmount int64 `protobuf:\"varint,6,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\t// The transaction fee in NanoPAC.\n\tFee int64 `protobuf:\"varint,7,opt,name=fee,proto3\" json:\"fee,omitempty\"`\n\t// A memo string for the transaction.\n\tMemo string `protobuf:\"bytes,8,opt,name=memo,proto3\" json:\"memo,omitempty\"`\n\t// The current status of the transaction.\n\tStatus TransactionStatus `protobuf:\"varint,9,opt,name=status,proto3,enum=pactus.TransactionStatus\" json:\"status,omitempty\"`\n\t// The block height containing the transaction.\n\tBlockHeight uint32 `protobuf:\"varint,10,opt,name=block_height,json=blockHeight,proto3\" json:\"block_height,omitempty\"`\n\t// The type of transaction payload.\n\tPayloadType PayloadType `protobuf:\"varint,11,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType\" json:\"payload_type,omitempty\"`\n\t// The raw transaction data.\n\tData []byte `protobuf:\"bytes,12,opt,name=data,proto3\" json:\"data,omitempty\"`\n\t// A comment associated with the transaction in the wallet.\n\tComment string `protobuf:\"bytes,13,opt,name=comment,proto3\" json:\"comment,omitempty\"`\n\t// Unix timestamp of when the transaction was created.\n\tCreatedAt int64 `protobuf:\"varint,14,opt,name=created_at,json=createdAt,proto3\" json:\"created_at,omitempty\"`\n\t// Unix timestamp of when the transaction was last updated.\n\tUpdatedAt     int64 `protobuf:\"varint,15,opt,name=updated_at,json=updatedAt,proto3\" json:\"updated_at,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *WalletTransactionInfo) Reset() {\n\t*x = WalletTransactionInfo{}\n\tmi := &file_wallet_proto_msgTypes[33]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *WalletTransactionInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*WalletTransactionInfo) ProtoMessage() {}\n\nfunc (x *WalletTransactionInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[33]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use WalletTransactionInfo.ProtoReflect.Descriptor instead.\nfunc (*WalletTransactionInfo) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{33}\n}\n\nfunc (x *WalletTransactionInfo) GetNo() int64 {\n\tif x != nil {\n\t\treturn x.No\n\t}\n\treturn 0\n}\n\nfunc (x *WalletTransactionInfo) GetTxId() string {\n\tif x != nil {\n\t\treturn x.TxId\n\t}\n\treturn \"\"\n}\n\nfunc (x *WalletTransactionInfo) GetSender() string {\n\tif x != nil {\n\t\treturn x.Sender\n\t}\n\treturn \"\"\n}\n\nfunc (x *WalletTransactionInfo) GetReceiver() string {\n\tif x != nil {\n\t\treturn x.Receiver\n\t}\n\treturn \"\"\n}\n\nfunc (x *WalletTransactionInfo) GetDirection() TxDirection {\n\tif x != nil {\n\t\treturn x.Direction\n\t}\n\treturn TxDirection_TX_DIRECTION_ANY\n}\n\nfunc (x *WalletTransactionInfo) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\nfunc (x *WalletTransactionInfo) GetFee() int64 {\n\tif x != nil {\n\t\treturn x.Fee\n\t}\n\treturn 0\n}\n\nfunc (x *WalletTransactionInfo) GetMemo() string {\n\tif x != nil {\n\t\treturn x.Memo\n\t}\n\treturn \"\"\n}\n\nfunc (x *WalletTransactionInfo) GetStatus() TransactionStatus {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn TransactionStatus_TRANSACTION_STATUS_PENDING\n}\n\nfunc (x *WalletTransactionInfo) GetBlockHeight() uint32 {\n\tif x != nil {\n\t\treturn x.BlockHeight\n\t}\n\treturn 0\n}\n\nfunc (x *WalletTransactionInfo) GetPayloadType() PayloadType {\n\tif x != nil {\n\t\treturn x.PayloadType\n\t}\n\treturn PayloadType_PAYLOAD_TYPE_UNSPECIFIED\n}\n\nfunc (x *WalletTransactionInfo) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\nfunc (x *WalletTransactionInfo) GetComment() string {\n\tif x != nil {\n\t\treturn x.Comment\n\t}\n\treturn \"\"\n}\n\nfunc (x *WalletTransactionInfo) GetCreatedAt() int64 {\n\tif x != nil {\n\t\treturn x.CreatedAt\n\t}\n\treturn 0\n}\n\nfunc (x *WalletTransactionInfo) GetUpdatedAt() int64 {\n\tif x != nil {\n\t\treturn x.UpdatedAt\n\t}\n\treturn 0\n}\n\n// Request message for listing transactions of a wallet, optionally filtered by a specific address.\ntype ListTransactionsRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to query transactions for.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Optional: The address to filter transactions.\n\t// If empty or set to '*', transactions for all addresses in the wallet are included.\n\tAddress string `protobuf:\"bytes,2,opt,name=address,proto3\" json:\"address,omitempty\"`\n\t// Filter transactions by direction relative to the wallet.\n\t// Defaults to any direction if not set.\n\tDirection TxDirection `protobuf:\"varint,3,opt,name=direction,proto3,enum=pactus.TxDirection\" json:\"direction,omitempty\"`\n\t// Optional: The maximum number of transactions to return.\n\t// Defaults to 10 if not set.\n\tCount int32 `protobuf:\"varint,4,opt,name=count,proto3\" json:\"count,omitempty\"`\n\t// Optional: The number of transactions to skip (for pagination).\n\t// Defaults to 0 if not set.\n\tSkip          int32 `protobuf:\"varint,5,opt,name=skip,proto3\" json:\"skip,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListTransactionsRequest) Reset() {\n\t*x = ListTransactionsRequest{}\n\tmi := &file_wallet_proto_msgTypes[34]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListTransactionsRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListTransactionsRequest) ProtoMessage() {}\n\nfunc (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[34]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListTransactionsRequest.ProtoReflect.Descriptor instead.\nfunc (*ListTransactionsRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{34}\n}\n\nfunc (x *ListTransactionsRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListTransactionsRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListTransactionsRequest) GetDirection() TxDirection {\n\tif x != nil {\n\t\treturn x.Direction\n\t}\n\treturn TxDirection_TX_DIRECTION_ANY\n}\n\nfunc (x *ListTransactionsRequest) GetCount() int32 {\n\tif x != nil {\n\t\treturn x.Count\n\t}\n\treturn 0\n}\n\nfunc (x *ListTransactionsRequest) GetSkip() int32 {\n\tif x != nil {\n\t\treturn x.Skip\n\t}\n\treturn 0\n}\n\n// Response message containing a list of transactions.\ntype ListTransactionsResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet queried.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// List of transactions for the wallet, filtered by the specified address if provided.\n\tTxs           []*WalletTransactionInfo `protobuf:\"bytes,2,rep,name=txs,proto3\" json:\"txs,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *ListTransactionsResponse) Reset() {\n\t*x = ListTransactionsResponse{}\n\tmi := &file_wallet_proto_msgTypes[35]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *ListTransactionsResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ListTransactionsResponse) ProtoMessage() {}\n\nfunc (x *ListTransactionsResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[35]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ListTransactionsResponse.ProtoReflect.Descriptor instead.\nfunc (*ListTransactionsResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{35}\n}\n\nfunc (x *ListTransactionsResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *ListTransactionsResponse) GetTxs() []*WalletTransactionInfo {\n\tif x != nil {\n\t\treturn x.Txs\n\t}\n\treturn nil\n}\n\n// Request message for setting default fee.\ntype SetDefaultFeeRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to set the default fee.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// The default fee amount in NanoPAC.\n\tAmount        int64 `protobuf:\"varint,2,opt,name=amount,proto3\" json:\"amount,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SetDefaultFeeRequest) Reset() {\n\t*x = SetDefaultFeeRequest{}\n\tmi := &file_wallet_proto_msgTypes[36]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SetDefaultFeeRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SetDefaultFeeRequest) ProtoMessage() {}\n\nfunc (x *SetDefaultFeeRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[36]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SetDefaultFeeRequest.ProtoReflect.Descriptor instead.\nfunc (*SetDefaultFeeRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{36}\n}\n\nfunc (x *SetDefaultFeeRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *SetDefaultFeeRequest) GetAmount() int64 {\n\tif x != nil {\n\t\treturn x.Amount\n\t}\n\treturn 0\n}\n\n// Response message for updated default fee.\ntype SetDefaultFeeResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet where the default fee was updated.\n\tWalletName    string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *SetDefaultFeeResponse) Reset() {\n\t*x = SetDefaultFeeResponse{}\n\tmi := &file_wallet_proto_msgTypes[37]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *SetDefaultFeeResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*SetDefaultFeeResponse) ProtoMessage() {}\n\nfunc (x *SetDefaultFeeResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[37]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use SetDefaultFeeResponse.ProtoReflect.Descriptor instead.\nfunc (*SetDefaultFeeResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{37}\n}\n\nfunc (x *SetDefaultFeeResponse) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\n// Request message for getting mnemonic.\ntype GetMnemonicRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet to get the mnemonic.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Wallet password.\n\tPassword      string `protobuf:\"bytes,2,opt,name=password,proto3\" json:\"password,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetMnemonicRequest) Reset() {\n\t*x = GetMnemonicRequest{}\n\tmi := &file_wallet_proto_msgTypes[38]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetMnemonicRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetMnemonicRequest) ProtoMessage() {}\n\nfunc (x *GetMnemonicRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[38]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetMnemonicRequest.ProtoReflect.Descriptor instead.\nfunc (*GetMnemonicRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{38}\n}\n\nfunc (x *GetMnemonicRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetMnemonicRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\n// Response message contains mnemonic.\ntype GetMnemonicResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The mnemonic (seed phrase).\n\tMnemonic      string `protobuf:\"bytes,1,opt,name=mnemonic,proto3\" json:\"mnemonic,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetMnemonicResponse) Reset() {\n\t*x = GetMnemonicResponse{}\n\tmi := &file_wallet_proto_msgTypes[39]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetMnemonicResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetMnemonicResponse) ProtoMessage() {}\n\nfunc (x *GetMnemonicResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[39]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetMnemonicResponse.ProtoReflect.Descriptor instead.\nfunc (*GetMnemonicResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{39}\n}\n\nfunc (x *GetMnemonicResponse) GetMnemonic() string {\n\tif x != nil {\n\t\treturn x.Mnemonic\n\t}\n\treturn \"\"\n}\n\n// Request message for getting private key.\ntype GetPrivateKeyRequest struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The name of the wallet containing the address.\n\tWalletName string `protobuf:\"bytes,1,opt,name=wallet_name,json=walletName,proto3\" json:\"wallet_name,omitempty\"`\n\t// Wallet password.\n\tPassword string `protobuf:\"bytes,2,opt,name=password,proto3\" json:\"password,omitempty\"`\n\t// The address to get the private key.\n\tAddress       string `protobuf:\"bytes,3,opt,name=address,proto3\" json:\"address,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetPrivateKeyRequest) Reset() {\n\t*x = GetPrivateKeyRequest{}\n\tmi := &file_wallet_proto_msgTypes[40]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetPrivateKeyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetPrivateKeyRequest) ProtoMessage() {}\n\nfunc (x *GetPrivateKeyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[40]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetPrivateKeyRequest.ProtoReflect.Descriptor instead.\nfunc (*GetPrivateKeyRequest) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{40}\n}\n\nfunc (x *GetPrivateKeyRequest) GetWalletName() string {\n\tif x != nil {\n\t\treturn x.WalletName\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetPrivateKeyRequest) GetPassword() string {\n\tif x != nil {\n\t\treturn x.Password\n\t}\n\treturn \"\"\n}\n\nfunc (x *GetPrivateKeyRequest) GetAddress() string {\n\tif x != nil {\n\t\treturn x.Address\n\t}\n\treturn \"\"\n}\n\n// Response message contains private key.\ntype GetPrivateKeyResponse struct {\n\tstate protoimpl.MessageState `protogen:\"open.v1\"`\n\t// The private key in hexadecimal format.\n\tPrivateKey    string `protobuf:\"bytes,1,opt,name=private_key,json=privateKey,proto3\" json:\"private_key,omitempty\"`\n\tunknownFields protoimpl.UnknownFields\n\tsizeCache     protoimpl.SizeCache\n}\n\nfunc (x *GetPrivateKeyResponse) Reset() {\n\t*x = GetPrivateKeyResponse{}\n\tmi := &file_wallet_proto_msgTypes[41]\n\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\tms.StoreMessageInfo(mi)\n}\n\nfunc (x *GetPrivateKeyResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*GetPrivateKeyResponse) ProtoMessage() {}\n\nfunc (x *GetPrivateKeyResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_wallet_proto_msgTypes[41]\n\tif x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use GetPrivateKeyResponse.ProtoReflect.Descriptor instead.\nfunc (*GetPrivateKeyResponse) Descriptor() ([]byte, []int) {\n\treturn file_wallet_proto_rawDescGZIP(), []int{41}\n}\n\nfunc (x *GetPrivateKeyResponse) GetPrivateKey() string {\n\tif x != nil {\n\t\treturn x.PrivateKey\n\t}\n\treturn \"\"\n}\n\nvar File_wallet_proto protoreflect.FileDescriptor\n\nconst file_wallet_proto_rawDesc = \"\" +\n\t\"\\n\" +\n\t\"\\fwallet.proto\\x12\\x06pactus\\x1a\\x11transaction.proto\\\"p\\n\" +\n\t\"\\vAddressInfo\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x02 \\x01(\\tR\\tpublicKey\\x12\\x14\\n\" +\n\t\"\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\x12\\x12\\n\" +\n\t\"\\x04path\\x18\\x04 \\x01(\\tR\\x04path\\\"\\xa1\\x01\\n\" +\n\t\"\\x14GetNewAddressRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x126\\n\" +\n\t\"\\faddress_type\\x18\\x02 \\x01(\\x0e2\\x13.pactus.AddressTypeR\\vaddressType\\x12\\x14\\n\" +\n\t\"\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x04 \\x01(\\tR\\bpassword\\\"a\\n\" +\n\t\"\\x15GetNewAddressResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12'\\n\" +\n\t\"\\x04addr\\x18\\x02 \\x01(\\v2\\x13.pactus.AddressInfoR\\x04addr\\\"o\\n\" +\n\t\"\\x14RestoreWalletRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bmnemonic\\x18\\x02 \\x01(\\tR\\bmnemonic\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x03 \\x01(\\tR\\bpassword\\\"8\\n\" +\n\t\"\\x15RestoreWalletResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"R\\n\" +\n\t\"\\x13CreateWalletRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x02 \\x01(\\tR\\bpassword\\\"S\\n\" +\n\t\"\\x14CreateWalletResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bmnemonic\\x18\\x02 \\x01(\\tR\\bmnemonic\\\"4\\n\" +\n\t\"\\x11LoadWalletRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"5\\n\" +\n\t\"\\x12LoadWalletResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"6\\n\" +\n\t\"\\x13UnloadWalletRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"7\\n\" +\n\t\"\\x14UnloadWalletResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\";\\n\" +\n\t\"\\x1aGetValidatorAddressRequest\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"public_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\\"7\\n\" +\n\t\"\\x1bGetValidatorAddressResponse\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x01 \\x01(\\tR\\aaddress\\\"\\x81\\x01\\n\" +\n\t\"\\x19SignRawTransactionRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12'\\n\" +\n\t\"\\x0fraw_transaction\\x18\\x02 \\x01(\\tR\\x0erawTransaction\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x03 \\x01(\\tR\\bpassword\\\"y\\n\" +\n\t\"\\x1aSignRawTransactionResponse\\x12%\\n\" +\n\t\"\\x0etransaction_id\\x18\\x01 \\x01(\\tR\\rtransactionId\\x124\\n\" +\n\t\"\\x16signed_raw_transaction\\x18\\x02 \\x01(\\tR\\x14signedRawTransaction\\\"9\\n\" +\n\t\"\\x16GetTotalBalanceRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"_\\n\" +\n\t\"\\x17GetTotalBalanceResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12#\\n\" +\n\t\"\\rtotal_balance\\x18\\x02 \\x01(\\x03R\\ftotalBalance\\\"\\x85\\x01\\n\" +\n\t\"\\x12SignMessageRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x02 \\x01(\\tR\\bpassword\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x03 \\x01(\\tR\\aaddress\\x12\\x18\\n\" +\n\t\"\\amessage\\x18\\x04 \\x01(\\tR\\amessage\\\"3\\n\" +\n\t\"\\x13SignMessageResponse\\x12\\x1c\\n\" +\n\t\"\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature\\\"7\\n\" +\n\t\"\\x14GetTotalStakeRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"Y\\n\" +\n\t\"\\x15GetTotalStakeResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1f\\n\" +\n\t\"\\vtotal_stake\\x18\\x02 \\x01(\\x03R\\n\" +\n\t\"totalStake\\\"R\\n\" +\n\t\"\\x15GetAddressInfoRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\\"b\\n\" +\n\t\"\\x16GetAddressInfoResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12'\\n\" +\n\t\"\\x04addr\\x18\\x02 \\x01(\\v2\\x13.pactus.AddressInfoR\\x04addr\\\"\\x85\\x01\\n\" +\n\t\"\\x16SetAddressLabelRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x02 \\x01(\\tR\\bpassword\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x03 \\x01(\\tR\\aaddress\\x12\\x14\\n\" +\n\t\"\\x05label\\x18\\x04 \\x01(\\tR\\x05label\\\"j\\n\" +\n\t\"\\x17SetAddressLabelResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\x12\\x14\\n\" +\n\t\"\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\\"\\x14\\n\" +\n\t\"\\x12ListWalletsRequest\\\"/\\n\" +\n\t\"\\x13ListWalletsResponse\\x12\\x18\\n\" +\n\t\"\\awallets\\x18\\x01 \\x03(\\tR\\awallets\\\"7\\n\" +\n\t\"\\x14GetWalletInfoRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"\\x8a\\x02\\n\" +\n\t\"\\x15GetWalletInfoResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x18\\n\" +\n\t\"\\aversion\\x18\\x02 \\x01(\\x05R\\aversion\\x12\\x18\\n\" +\n\t\"\\anetwork\\x18\\x03 \\x01(\\tR\\anetwork\\x12\\x1c\\n\" +\n\t\"\\tencrypted\\x18\\x04 \\x01(\\bR\\tencrypted\\x12\\x12\\n\" +\n\t\"\\x04uuid\\x18\\x05 \\x01(\\tR\\x04uuid\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"created_at\\x18\\x06 \\x01(\\x03R\\tcreatedAt\\x12\\x1f\\n\" +\n\t\"\\vdefault_fee\\x18\\a \\x01(\\x03R\\n\" +\n\t\"defaultFee\\x12\\x16\\n\" +\n\t\"\\x06driver\\x18\\b \\x01(\\tR\\x06driver\\x12\\x12\\n\" +\n\t\"\\x04path\\x18\\t \\x01(\\tR\\x04path\\\"q\\n\" +\n\t\"\\x14ListAddressesRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x128\\n\" +\n\t\"\\raddress_types\\x18\\x02 \\x03(\\x0e2\\x13.pactus.AddressTypeR\\faddressTypes\\\"c\\n\" +\n\t\"\\x15ListAddressesResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12)\\n\" +\n\t\"\\x05addrs\\x18\\x02 \\x03(\\v2\\x13.pactus.AddressInfoR\\x05addrs\\\"~\\n\" +\n\t\"\\x15UpdatePasswordRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12!\\n\" +\n\t\"\\fold_password\\x18\\x02 \\x01(\\tR\\voldPassword\\x12!\\n\" +\n\t\"\\fnew_password\\x18\\x03 \\x01(\\tR\\vnewPassword\\\"9\\n\" +\n\t\"\\x16UpdatePasswordResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"\\xdb\\x03\\n\" +\n\t\"\\x15WalletTransactionInfo\\x12\\x0e\\n\" +\n\t\"\\x02no\\x18\\x01 \\x01(\\x03R\\x02no\\x12\\x13\\n\" +\n\t\"\\x05tx_id\\x18\\x02 \\x01(\\tR\\x04txId\\x12\\x16\\n\" +\n\t\"\\x06sender\\x18\\x03 \\x01(\\tR\\x06sender\\x12\\x1a\\n\" +\n\t\"\\breceiver\\x18\\x04 \\x01(\\tR\\breceiver\\x121\\n\" +\n\t\"\\tdirection\\x18\\x05 \\x01(\\x0e2\\x13.pactus.TxDirectionR\\tdirection\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x06 \\x01(\\x03R\\x06amount\\x12\\x10\\n\" +\n\t\"\\x03fee\\x18\\a \\x01(\\x03R\\x03fee\\x12\\x12\\n\" +\n\t\"\\x04memo\\x18\\b \\x01(\\tR\\x04memo\\x121\\n\" +\n\t\"\\x06status\\x18\\t \\x01(\\x0e2\\x19.pactus.TransactionStatusR\\x06status\\x12!\\n\" +\n\t\"\\fblock_height\\x18\\n\" +\n\t\" \\x01(\\rR\\vblockHeight\\x126\\n\" +\n\t\"\\fpayload_type\\x18\\v \\x01(\\x0e2\\x13.pactus.PayloadTypeR\\vpayloadType\\x12\\x12\\n\" +\n\t\"\\x04data\\x18\\f \\x01(\\fR\\x04data\\x12\\x18\\n\" +\n\t\"\\acomment\\x18\\r \\x01(\\tR\\acomment\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"created_at\\x18\\x0e \\x01(\\x03R\\tcreatedAt\\x12\\x1d\\n\" +\n\t\"\\n\" +\n\t\"updated_at\\x18\\x0f \\x01(\\x03R\\tupdatedAt\\\"\\xb1\\x01\\n\" +\n\t\"\\x17ListTransactionsRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x02 \\x01(\\tR\\aaddress\\x121\\n\" +\n\t\"\\tdirection\\x18\\x03 \\x01(\\x0e2\\x13.pactus.TxDirectionR\\tdirection\\x12\\x14\\n\" +\n\t\"\\x05count\\x18\\x04 \\x01(\\x05R\\x05count\\x12\\x12\\n\" +\n\t\"\\x04skip\\x18\\x05 \\x01(\\x05R\\x04skip\\\"l\\n\" +\n\t\"\\x18ListTransactionsResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12/\\n\" +\n\t\"\\x03txs\\x18\\x02 \\x03(\\v2\\x1d.pactus.WalletTransactionInfoR\\x03txs\\\"O\\n\" +\n\t\"\\x14SetDefaultFeeRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x16\\n\" +\n\t\"\\x06amount\\x18\\x02 \\x01(\\x03R\\x06amount\\\"8\\n\" +\n\t\"\\x15SetDefaultFeeResponse\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\\"Q\\n\" +\n\t\"\\x12GetMnemonicRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x02 \\x01(\\tR\\bpassword\\\"1\\n\" +\n\t\"\\x13GetMnemonicResponse\\x12\\x1a\\n\" +\n\t\"\\bmnemonic\\x18\\x01 \\x01(\\tR\\bmnemonic\\\"m\\n\" +\n\t\"\\x14GetPrivateKeyRequest\\x12\\x1f\\n\" +\n\t\"\\vwallet_name\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"walletName\\x12\\x1a\\n\" +\n\t\"\\bpassword\\x18\\x02 \\x01(\\tR\\bpassword\\x12\\x18\\n\" +\n\t\"\\aaddress\\x18\\x03 \\x01(\\tR\\aaddress\\\"8\\n\" +\n\t\"\\x15GetPrivateKeyResponse\\x12\\x1f\\n\" +\n\t\"\\vprivate_key\\x18\\x01 \\x01(\\tR\\n\" +\n\t\"privateKey*\\x84\\x01\\n\" +\n\t\"\\vAddressType\\x12\\x19\\n\" +\n\t\"\\x15ADDRESS_TYPE_TREASURY\\x10\\x00\\x12\\x1a\\n\" +\n\t\"\\x16ADDRESS_TYPE_VALIDATOR\\x10\\x01\\x12\\x1c\\n\" +\n\t\"\\x18ADDRESS_TYPE_BLS_ACCOUNT\\x10\\x02\\x12 \\n\" +\n\t\"\\x1cADDRESS_TYPE_ED25519_ACCOUNT\\x10\\x03*Y\\n\" +\n\t\"\\vTxDirection\\x12\\x14\\n\" +\n\t\"\\x10TX_DIRECTION_ANY\\x10\\x00\\x12\\x19\\n\" +\n\t\"\\x15TX_DIRECTION_INCOMING\\x10\\x01\\x12\\x19\\n\" +\n\t\"\\x15TX_DIRECTION_OUTGOING\\x10\\x02*}\\n\" +\n\t\"\\x11TransactionStatus\\x12\\x1e\\n\" +\n\t\"\\x1aTRANSACTION_STATUS_PENDING\\x10\\x00\\x12 \\n\" +\n\t\"\\x1cTRANSACTION_STATUS_CONFIRMED\\x10\\x01\\x12&\\n\" +\n\t\"\\x19TRANSACTION_STATUS_FAILED\\x10\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x012\\xbb\\f\\n\" +\n\t\"\\x06Wallet\\x12I\\n\" +\n\t\"\\fCreateWallet\\x12\\x1b.pactus.CreateWalletRequest\\x1a\\x1c.pactus.CreateWalletResponse\\x12L\\n\" +\n\t\"\\rRestoreWallet\\x12\\x1c.pactus.RestoreWalletRequest\\x1a\\x1d.pactus.RestoreWalletResponse\\x12C\\n\" +\n\t\"\\n\" +\n\t\"LoadWallet\\x12\\x19.pactus.LoadWalletRequest\\x1a\\x1a.pactus.LoadWalletResponse\\x12I\\n\" +\n\t\"\\fUnloadWallet\\x12\\x1b.pactus.UnloadWalletRequest\\x1a\\x1c.pactus.UnloadWalletResponse\\x12F\\n\" +\n\t\"\\vListWallets\\x12\\x1a.pactus.ListWalletsRequest\\x1a\\x1b.pactus.ListWalletsResponse\\x12L\\n\" +\n\t\"\\rGetWalletInfo\\x12\\x1c.pactus.GetWalletInfoRequest\\x1a\\x1d.pactus.GetWalletInfoResponse\\x12O\\n\" +\n\t\"\\x0eUpdatePassword\\x12\\x1d.pactus.UpdatePasswordRequest\\x1a\\x1e.pactus.UpdatePasswordResponse\\x12R\\n\" +\n\t\"\\x0fGetTotalBalance\\x12\\x1e.pactus.GetTotalBalanceRequest\\x1a\\x1f.pactus.GetTotalBalanceResponse\\x12L\\n\" +\n\t\"\\rGetTotalStake\\x12\\x1c.pactus.GetTotalStakeRequest\\x1a\\x1d.pactus.GetTotalStakeResponse\\x12^\\n\" +\n\t\"\\x13GetValidatorAddress\\x12\\\".pactus.GetValidatorAddressRequest\\x1a#.pactus.GetValidatorAddressResponse\\x12O\\n\" +\n\t\"\\x0eGetAddressInfo\\x12\\x1d.pactus.GetAddressInfoRequest\\x1a\\x1e.pactus.GetAddressInfoResponse\\x12R\\n\" +\n\t\"\\x0fSetAddressLabel\\x12\\x1e.pactus.SetAddressLabelRequest\\x1a\\x1f.pactus.SetAddressLabelResponse\\x12L\\n\" +\n\t\"\\rGetNewAddress\\x12\\x1c.pactus.GetNewAddressRequest\\x1a\\x1d.pactus.GetNewAddressResponse\\x12L\\n\" +\n\t\"\\rListAddresses\\x12\\x1c.pactus.ListAddressesRequest\\x1a\\x1d.pactus.ListAddressesResponse\\x12F\\n\" +\n\t\"\\vSignMessage\\x12\\x1a.pactus.SignMessageRequest\\x1a\\x1b.pactus.SignMessageResponse\\x12[\\n\" +\n\t\"\\x12SignRawTransaction\\x12!.pactus.SignRawTransactionRequest\\x1a\\\".pactus.SignRawTransactionResponse\\x12U\\n\" +\n\t\"\\x10ListTransactions\\x12\\x1f.pactus.ListTransactionsRequest\\x1a .pactus.ListTransactionsResponse\\x12L\\n\" +\n\t\"\\rSetDefaultFee\\x12\\x1c.pactus.SetDefaultFeeRequest\\x1a\\x1d.pactus.SetDefaultFeeResponse\\x12F\\n\" +\n\t\"\\vGetMnemonic\\x12\\x1a.pactus.GetMnemonicRequest\\x1a\\x1b.pactus.GetMnemonicResponse\\x12L\\n\" +\n\t\"\\rGetPrivateKey\\x12\\x1c.pactus.GetPrivateKeyRequest\\x1a\\x1d.pactus.GetPrivateKeyResponseB:\\n\" +\n\t\"\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3\"\n\nvar (\n\tfile_wallet_proto_rawDescOnce sync.Once\n\tfile_wallet_proto_rawDescData []byte\n)\n\nfunc file_wallet_proto_rawDescGZIP() []byte {\n\tfile_wallet_proto_rawDescOnce.Do(func() {\n\t\tfile_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc)))\n\t})\n\treturn file_wallet_proto_rawDescData\n}\n\nvar file_wallet_proto_enumTypes = make([]protoimpl.EnumInfo, 3)\nvar file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 42)\nvar file_wallet_proto_goTypes = []any{\n\t(AddressType)(0),                    // 0: pactus.AddressType\n\t(TxDirection)(0),                    // 1: pactus.TxDirection\n\t(TransactionStatus)(0),              // 2: pactus.TransactionStatus\n\t(*AddressInfo)(nil),                 // 3: pactus.AddressInfo\n\t(*GetNewAddressRequest)(nil),        // 4: pactus.GetNewAddressRequest\n\t(*GetNewAddressResponse)(nil),       // 5: pactus.GetNewAddressResponse\n\t(*RestoreWalletRequest)(nil),        // 6: pactus.RestoreWalletRequest\n\t(*RestoreWalletResponse)(nil),       // 7: pactus.RestoreWalletResponse\n\t(*CreateWalletRequest)(nil),         // 8: pactus.CreateWalletRequest\n\t(*CreateWalletResponse)(nil),        // 9: pactus.CreateWalletResponse\n\t(*LoadWalletRequest)(nil),           // 10: pactus.LoadWalletRequest\n\t(*LoadWalletResponse)(nil),          // 11: pactus.LoadWalletResponse\n\t(*UnloadWalletRequest)(nil),         // 12: pactus.UnloadWalletRequest\n\t(*UnloadWalletResponse)(nil),        // 13: pactus.UnloadWalletResponse\n\t(*GetValidatorAddressRequest)(nil),  // 14: pactus.GetValidatorAddressRequest\n\t(*GetValidatorAddressResponse)(nil), // 15: pactus.GetValidatorAddressResponse\n\t(*SignRawTransactionRequest)(nil),   // 16: pactus.SignRawTransactionRequest\n\t(*SignRawTransactionResponse)(nil),  // 17: pactus.SignRawTransactionResponse\n\t(*GetTotalBalanceRequest)(nil),      // 18: pactus.GetTotalBalanceRequest\n\t(*GetTotalBalanceResponse)(nil),     // 19: pactus.GetTotalBalanceResponse\n\t(*SignMessageRequest)(nil),          // 20: pactus.SignMessageRequest\n\t(*SignMessageResponse)(nil),         // 21: pactus.SignMessageResponse\n\t(*GetTotalStakeRequest)(nil),        // 22: pactus.GetTotalStakeRequest\n\t(*GetTotalStakeResponse)(nil),       // 23: pactus.GetTotalStakeResponse\n\t(*GetAddressInfoRequest)(nil),       // 24: pactus.GetAddressInfoRequest\n\t(*GetAddressInfoResponse)(nil),      // 25: pactus.GetAddressInfoResponse\n\t(*SetAddressLabelRequest)(nil),      // 26: pactus.SetAddressLabelRequest\n\t(*SetAddressLabelResponse)(nil),     // 27: pactus.SetAddressLabelResponse\n\t(*ListWalletsRequest)(nil),          // 28: pactus.ListWalletsRequest\n\t(*ListWalletsResponse)(nil),         // 29: pactus.ListWalletsResponse\n\t(*GetWalletInfoRequest)(nil),        // 30: pactus.GetWalletInfoRequest\n\t(*GetWalletInfoResponse)(nil),       // 31: pactus.GetWalletInfoResponse\n\t(*ListAddressesRequest)(nil),        // 32: pactus.ListAddressesRequest\n\t(*ListAddressesResponse)(nil),       // 33: pactus.ListAddressesResponse\n\t(*UpdatePasswordRequest)(nil),       // 34: pactus.UpdatePasswordRequest\n\t(*UpdatePasswordResponse)(nil),      // 35: pactus.UpdatePasswordResponse\n\t(*WalletTransactionInfo)(nil),       // 36: pactus.WalletTransactionInfo\n\t(*ListTransactionsRequest)(nil),     // 37: pactus.ListTransactionsRequest\n\t(*ListTransactionsResponse)(nil),    // 38: pactus.ListTransactionsResponse\n\t(*SetDefaultFeeRequest)(nil),        // 39: pactus.SetDefaultFeeRequest\n\t(*SetDefaultFeeResponse)(nil),       // 40: pactus.SetDefaultFeeResponse\n\t(*GetMnemonicRequest)(nil),          // 41: pactus.GetMnemonicRequest\n\t(*GetMnemonicResponse)(nil),         // 42: pactus.GetMnemonicResponse\n\t(*GetPrivateKeyRequest)(nil),        // 43: pactus.GetPrivateKeyRequest\n\t(*GetPrivateKeyResponse)(nil),       // 44: pactus.GetPrivateKeyResponse\n\t(PayloadType)(0),                    // 45: pactus.PayloadType\n}\nvar file_wallet_proto_depIdxs = []int32{\n\t0,  // 0: pactus.GetNewAddressRequest.address_type:type_name -> pactus.AddressType\n\t3,  // 1: pactus.GetNewAddressResponse.addr:type_name -> pactus.AddressInfo\n\t3,  // 2: pactus.GetAddressInfoResponse.addr:type_name -> pactus.AddressInfo\n\t0,  // 3: pactus.ListAddressesRequest.address_types:type_name -> pactus.AddressType\n\t3,  // 4: pactus.ListAddressesResponse.addrs:type_name -> pactus.AddressInfo\n\t1,  // 5: pactus.WalletTransactionInfo.direction:type_name -> pactus.TxDirection\n\t2,  // 6: pactus.WalletTransactionInfo.status:type_name -> pactus.TransactionStatus\n\t45, // 7: pactus.WalletTransactionInfo.payload_type:type_name -> pactus.PayloadType\n\t1,  // 8: pactus.ListTransactionsRequest.direction:type_name -> pactus.TxDirection\n\t36, // 9: pactus.ListTransactionsResponse.txs:type_name -> pactus.WalletTransactionInfo\n\t8,  // 10: pactus.Wallet.CreateWallet:input_type -> pactus.CreateWalletRequest\n\t6,  // 11: pactus.Wallet.RestoreWallet:input_type -> pactus.RestoreWalletRequest\n\t10, // 12: pactus.Wallet.LoadWallet:input_type -> pactus.LoadWalletRequest\n\t12, // 13: pactus.Wallet.UnloadWallet:input_type -> pactus.UnloadWalletRequest\n\t28, // 14: pactus.Wallet.ListWallets:input_type -> pactus.ListWalletsRequest\n\t30, // 15: pactus.Wallet.GetWalletInfo:input_type -> pactus.GetWalletInfoRequest\n\t34, // 16: pactus.Wallet.UpdatePassword:input_type -> pactus.UpdatePasswordRequest\n\t18, // 17: pactus.Wallet.GetTotalBalance:input_type -> pactus.GetTotalBalanceRequest\n\t22, // 18: pactus.Wallet.GetTotalStake:input_type -> pactus.GetTotalStakeRequest\n\t14, // 19: pactus.Wallet.GetValidatorAddress:input_type -> pactus.GetValidatorAddressRequest\n\t24, // 20: pactus.Wallet.GetAddressInfo:input_type -> pactus.GetAddressInfoRequest\n\t26, // 21: pactus.Wallet.SetAddressLabel:input_type -> pactus.SetAddressLabelRequest\n\t4,  // 22: pactus.Wallet.GetNewAddress:input_type -> pactus.GetNewAddressRequest\n\t32, // 23: pactus.Wallet.ListAddresses:input_type -> pactus.ListAddressesRequest\n\t20, // 24: pactus.Wallet.SignMessage:input_type -> pactus.SignMessageRequest\n\t16, // 25: pactus.Wallet.SignRawTransaction:input_type -> pactus.SignRawTransactionRequest\n\t37, // 26: pactus.Wallet.ListTransactions:input_type -> pactus.ListTransactionsRequest\n\t39, // 27: pactus.Wallet.SetDefaultFee:input_type -> pactus.SetDefaultFeeRequest\n\t41, // 28: pactus.Wallet.GetMnemonic:input_type -> pactus.GetMnemonicRequest\n\t43, // 29: pactus.Wallet.GetPrivateKey:input_type -> pactus.GetPrivateKeyRequest\n\t9,  // 30: pactus.Wallet.CreateWallet:output_type -> pactus.CreateWalletResponse\n\t7,  // 31: pactus.Wallet.RestoreWallet:output_type -> pactus.RestoreWalletResponse\n\t11, // 32: pactus.Wallet.LoadWallet:output_type -> pactus.LoadWalletResponse\n\t13, // 33: pactus.Wallet.UnloadWallet:output_type -> pactus.UnloadWalletResponse\n\t29, // 34: pactus.Wallet.ListWallets:output_type -> pactus.ListWalletsResponse\n\t31, // 35: pactus.Wallet.GetWalletInfo:output_type -> pactus.GetWalletInfoResponse\n\t35, // 36: pactus.Wallet.UpdatePassword:output_type -> pactus.UpdatePasswordResponse\n\t19, // 37: pactus.Wallet.GetTotalBalance:output_type -> pactus.GetTotalBalanceResponse\n\t23, // 38: pactus.Wallet.GetTotalStake:output_type -> pactus.GetTotalStakeResponse\n\t15, // 39: pactus.Wallet.GetValidatorAddress:output_type -> pactus.GetValidatorAddressResponse\n\t25, // 40: pactus.Wallet.GetAddressInfo:output_type -> pactus.GetAddressInfoResponse\n\t27, // 41: pactus.Wallet.SetAddressLabel:output_type -> pactus.SetAddressLabelResponse\n\t5,  // 42: pactus.Wallet.GetNewAddress:output_type -> pactus.GetNewAddressResponse\n\t33, // 43: pactus.Wallet.ListAddresses:output_type -> pactus.ListAddressesResponse\n\t21, // 44: pactus.Wallet.SignMessage:output_type -> pactus.SignMessageResponse\n\t17, // 45: pactus.Wallet.SignRawTransaction:output_type -> pactus.SignRawTransactionResponse\n\t38, // 46: pactus.Wallet.ListTransactions:output_type -> pactus.ListTransactionsResponse\n\t40, // 47: pactus.Wallet.SetDefaultFee:output_type -> pactus.SetDefaultFeeResponse\n\t42, // 48: pactus.Wallet.GetMnemonic:output_type -> pactus.GetMnemonicResponse\n\t44, // 49: pactus.Wallet.GetPrivateKey:output_type -> pactus.GetPrivateKeyResponse\n\t30, // [30:50] is the sub-list for method output_type\n\t10, // [10:30] is the sub-list for method input_type\n\t10, // [10:10] is the sub-list for extension type_name\n\t10, // [10:10] is the sub-list for extension extendee\n\t0,  // [0:10] is the sub-list for field type_name\n}\n\nfunc init() { file_wallet_proto_init() }\nfunc file_wallet_proto_init() {\n\tif File_wallet_proto != nil {\n\t\treturn\n\t}\n\tfile_transaction_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc)),\n\t\t\tNumEnums:      3,\n\t\t\tNumMessages:   42,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_wallet_proto_goTypes,\n\t\tDependencyIndexes: file_wallet_proto_depIdxs,\n\t\tEnumInfos:         file_wallet_proto_enumTypes,\n\t\tMessageInfos:      file_wallet_proto_msgTypes,\n\t}.Build()\n\tFile_wallet_proto = out.File\n\tfile_wallet_proto_goTypes = nil\n\tfile_wallet_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "www/grpc/gen/go/wallet.pb.gw.go",
    "content": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: wallet.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into RESTful JSON APIs.\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/utilities\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/grpclog\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// Suppress \"imported and not used\" errors\nvar (\n\t_ codes.Code\n\t_ io.Reader\n\t_ status.Status\n\t_ = errors.New\n\t_ = runtime.String\n\t_ = utilities.NewDoubleArray\n\t_ = metadata.Join\n)\n\nfunc request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq CreateWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.CreateWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq CreateWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.CreateWallet(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq RestoreWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.RestoreWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq RestoreWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.RestoreWallet(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq LoadWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.LoadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq LoadWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.LoadWallet(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq UnloadWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.UnloadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq UnloadWalletRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.UnloadWallet(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_ListWallets_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListWalletsRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.ListWallets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_ListWallets_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListWalletsRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tmsg, err := server.ListWallets(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_GetWalletInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_GetWalletInfo_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetWalletInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetWalletInfo_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetWalletInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetWalletInfo_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetWalletInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetWalletInfo_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetWalletInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_UpdatePassword_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq UpdatePasswordRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.UpdatePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_UpdatePassword_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq UpdatePasswordRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.UpdatePassword(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_GetTotalBalance_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTotalBalanceRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetTotalBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTotalBalanceRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetTotalBalance(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_GetTotalStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_GetTotalStake_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTotalStakeRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalStake_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetTotalStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetTotalStake_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetTotalStakeRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalStake_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetTotalStake(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_GetValidatorAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorAddressRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetValidatorAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetValidatorAddressRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetValidatorAddress(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_GetAddressInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_GetAddressInfo_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetAddressInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetAddressInfo_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.GetAddressInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetAddressInfo_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetAddressInfoRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetAddressInfo_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetAddressInfo(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_SetAddressLabel_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_SetAddressLabel_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SetAddressLabelRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SetAddressLabel_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.SetAddressLabel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_SetAddressLabel_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SetAddressLabelRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SetAddressLabel_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.SetAddressLabel(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNewAddressRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.GetNewAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq GetNewAddressRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.GetNewAddress(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_ListAddresses_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_ListAddresses_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListAddressesRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_ListAddresses_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.ListAddresses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_ListAddresses_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListAddressesRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_ListAddresses_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.ListAddresses(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignMessageRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.SignMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignMessageRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.SignMessage(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nfunc request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignRawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tmsg, err := client.SignRawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq SignRawTransactionRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.SignRawTransaction(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\nvar filter_Wallet_ListTransactions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}\n\nfunc request_Wallet_ListTransactions_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListTransactionsRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif req.Body != nil {\n\t\t_, _ = io.Copy(io.Discard, req.Body)\n\t}\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_ListTransactions_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := client.ListTransactions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))\n\treturn msg, metadata, err\n}\n\nfunc local_request_Wallet_ListTransactions_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {\n\tvar (\n\t\tprotoReq ListTransactionsRequest\n\t\tmetadata runtime.ServerMetadata\n\t)\n\tif err := req.ParseForm(); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tif err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_ListTransactions_0); err != nil {\n\t\treturn nil, metadata, status.Errorf(codes.InvalidArgument, \"%v\", err)\n\t}\n\tmsg, err := server.ListTransactions(ctx, &protoReq)\n\treturn msg, metadata, err\n}\n\n// RegisterWalletHandlerServer registers the http handlers for service Wallet to \"mux\".\n// UnaryRPC     :call WalletServer directly.\n// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.\n// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead.\n// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the \"runtime.WithMiddlewares\" option in the \"runtime.NewServeMux\" call.\nfunc RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error {\n\tmux.Handle(http.MethodPost, pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/CreateWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/create_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/RestoreWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/restore_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/LoadWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/load_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/UnloadWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/unload_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListWallets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/ListWallets\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_wallets\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_ListWallets_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListWallets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetWalletInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetWalletInfo\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_wallet_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetWalletInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetWalletInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_UpdatePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/UpdatePassword\", runtime.WithHTTPPathPattern(\"/pactus/wallet/update_password\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_UpdatePassword_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_UpdatePassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetTotalBalance\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_total_balance\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetTotalStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetTotalStake\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_total_stake\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetTotalStake_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetTotalStake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetValidatorAddress\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_validator_address\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetAddressInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetAddressInfo\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_address_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetAddressInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetAddressInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPatch, pattern_Wallet_SetAddressLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/SetAddressLabel\", runtime.WithHTTPPathPattern(\"/pactus/wallet/set_address_label\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_SetAddressLabel_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SetAddressLabel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/GetNewAddress\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_new_address\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/ListAddresses\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_addresses\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_ListAddresses_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/SignMessage\", runtime.WithHTTPPathPattern(\"/pactus/wallet/sign_message\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/SignRawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/wallet/sign_raw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, \"/pactus.Wallet/ListTransactions\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_transactions\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_Wallet_ListTransactions_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListTransactions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\n\treturn nil\n}\n\n// RegisterWalletHandlerFromEndpoint is same as RegisterWalletHandler but\n// automatically dials to \"endpoint\" and closes the connection when \"ctx\" gets done.\nfunc RegisterWalletHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {\n\tconn, err := grpc.NewClient(endpoint, opts...)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t\tgo func() {\n\t\t\t<-ctx.Done()\n\t\t\tif cerr := conn.Close(); cerr != nil {\n\t\t\t\tgrpclog.Errorf(\"Failed to close conn to %s: %v\", endpoint, cerr)\n\t\t\t}\n\t\t}()\n\t}()\n\treturn RegisterWalletHandler(ctx, mux, conn)\n}\n\n// RegisterWalletHandler registers the http handlers for service Wallet to \"mux\".\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {\n\treturn RegisterWalletHandlerClient(ctx, mux, NewWalletClient(conn))\n}\n\n// RegisterWalletHandlerClient registers the http handlers for service Wallet\n// to \"mux\". The handlers forward requests to the grpc endpoint over the given implementation of \"WalletClient\".\n// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in \"WalletClient\"\n// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in\n// \"WalletClient\" to call the correct interceptors. This client ignores the HTTP middlewares.\nfunc RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error {\n\tmux.Handle(http.MethodPost, pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/CreateWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/create_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/RestoreWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/restore_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/LoadWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/load_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/UnloadWallet\", runtime.WithHTTPPathPattern(\"/pactus/wallet/unload_wallet\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListWallets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/ListWallets\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_wallets\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_ListWallets_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListWallets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetWalletInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetWalletInfo\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_wallet_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetWalletInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetWalletInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_UpdatePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/UpdatePassword\", runtime.WithHTTPPathPattern(\"/pactus/wallet/update_password\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_UpdatePassword_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_UpdatePassword_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetTotalBalance\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_total_balance\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetTotalStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetTotalStake\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_total_stake\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetTotalStake_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetTotalStake_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetValidatorAddress\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_validator_address\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_GetAddressInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetAddressInfo\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_address_info\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetAddressInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetAddressInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPatch, pattern_Wallet_SetAddressLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/SetAddressLabel\", runtime.WithHTTPPathPattern(\"/pactus/wallet/set_address_label\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_SetAddressLabel_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SetAddressLabel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/GetNewAddress\", runtime.WithHTTPPathPattern(\"/pactus/wallet/get_new_address\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListAddresses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/ListAddresses\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_addresses\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_ListAddresses_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListAddresses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/SignMessage\", runtime.WithHTTPPathPattern(\"/pactus/wallet/sign_message\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodPost, pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/SignRawTransaction\", runtime.WithHTTPPathPattern(\"/pactus/wallet/sign_raw_transaction\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\tmux.Handle(http.MethodGet, pattern_Wallet_ListTransactions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tannotatedContext, err := runtime.AnnotateContext(ctx, mux, req, \"/pactus.Wallet/ListTransactions\", runtime.WithHTTPPathPattern(\"/pactus/wallet/list_transactions\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := request_Wallet_ListTransactions_0(annotatedContext, inboundMarshaler, client, req, pathParams)\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tforward_Wallet_ListTransactions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\t})\n\treturn nil\n}\n\nvar (\n\tpattern_Wallet_CreateWallet_0        = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"create_wallet\"}, \"\"))\n\tpattern_Wallet_RestoreWallet_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"restore_wallet\"}, \"\"))\n\tpattern_Wallet_LoadWallet_0          = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"load_wallet\"}, \"\"))\n\tpattern_Wallet_UnloadWallet_0        = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"unload_wallet\"}, \"\"))\n\tpattern_Wallet_ListWallets_0         = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"list_wallets\"}, \"\"))\n\tpattern_Wallet_GetWalletInfo_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_wallet_info\"}, \"\"))\n\tpattern_Wallet_UpdatePassword_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"update_password\"}, \"\"))\n\tpattern_Wallet_GetTotalBalance_0     = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_total_balance\"}, \"\"))\n\tpattern_Wallet_GetTotalStake_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_total_stake\"}, \"\"))\n\tpattern_Wallet_GetValidatorAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_validator_address\"}, \"\"))\n\tpattern_Wallet_GetAddressInfo_0      = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_address_info\"}, \"\"))\n\tpattern_Wallet_SetAddressLabel_0     = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"set_address_label\"}, \"\"))\n\tpattern_Wallet_GetNewAddress_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"get_new_address\"}, \"\"))\n\tpattern_Wallet_ListAddresses_0       = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"list_addresses\"}, \"\"))\n\tpattern_Wallet_SignMessage_0         = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"sign_message\"}, \"\"))\n\tpattern_Wallet_SignRawTransaction_0  = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"sign_raw_transaction\"}, \"\"))\n\tpattern_Wallet_ListTransactions_0    = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{\"pactus\", \"wallet\", \"list_transactions\"}, \"\"))\n)\n\nvar (\n\tforward_Wallet_CreateWallet_0        = runtime.ForwardResponseMessage\n\tforward_Wallet_RestoreWallet_0       = runtime.ForwardResponseMessage\n\tforward_Wallet_LoadWallet_0          = runtime.ForwardResponseMessage\n\tforward_Wallet_UnloadWallet_0        = runtime.ForwardResponseMessage\n\tforward_Wallet_ListWallets_0         = runtime.ForwardResponseMessage\n\tforward_Wallet_GetWalletInfo_0       = runtime.ForwardResponseMessage\n\tforward_Wallet_UpdatePassword_0      = runtime.ForwardResponseMessage\n\tforward_Wallet_GetTotalBalance_0     = runtime.ForwardResponseMessage\n\tforward_Wallet_GetTotalStake_0       = runtime.ForwardResponseMessage\n\tforward_Wallet_GetValidatorAddress_0 = runtime.ForwardResponseMessage\n\tforward_Wallet_GetAddressInfo_0      = runtime.ForwardResponseMessage\n\tforward_Wallet_SetAddressLabel_0     = runtime.ForwardResponseMessage\n\tforward_Wallet_GetNewAddress_0       = runtime.ForwardResponseMessage\n\tforward_Wallet_ListAddresses_0       = runtime.ForwardResponseMessage\n\tforward_Wallet_SignMessage_0         = runtime.ForwardResponseMessage\n\tforward_Wallet_SignRawTransaction_0  = runtime.ForwardResponseMessage\n\tforward_Wallet_ListTransactions_0    = runtime.ForwardResponseMessage\n)\n"
  },
  {
    "path": "www/grpc/gen/go/wallet_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.6.0\n// - protoc             (unknown)\n// source: wallet.proto\n\npackage pactus\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.64.0 or later.\nconst _ = grpc.SupportPackageIsVersion9\n\nconst (\n\tWallet_CreateWallet_FullMethodName        = \"/pactus.Wallet/CreateWallet\"\n\tWallet_RestoreWallet_FullMethodName       = \"/pactus.Wallet/RestoreWallet\"\n\tWallet_LoadWallet_FullMethodName          = \"/pactus.Wallet/LoadWallet\"\n\tWallet_UnloadWallet_FullMethodName        = \"/pactus.Wallet/UnloadWallet\"\n\tWallet_ListWallets_FullMethodName         = \"/pactus.Wallet/ListWallets\"\n\tWallet_GetWalletInfo_FullMethodName       = \"/pactus.Wallet/GetWalletInfo\"\n\tWallet_UpdatePassword_FullMethodName      = \"/pactus.Wallet/UpdatePassword\"\n\tWallet_GetTotalBalance_FullMethodName     = \"/pactus.Wallet/GetTotalBalance\"\n\tWallet_GetTotalStake_FullMethodName       = \"/pactus.Wallet/GetTotalStake\"\n\tWallet_GetValidatorAddress_FullMethodName = \"/pactus.Wallet/GetValidatorAddress\"\n\tWallet_GetAddressInfo_FullMethodName      = \"/pactus.Wallet/GetAddressInfo\"\n\tWallet_SetAddressLabel_FullMethodName     = \"/pactus.Wallet/SetAddressLabel\"\n\tWallet_GetNewAddress_FullMethodName       = \"/pactus.Wallet/GetNewAddress\"\n\tWallet_ListAddresses_FullMethodName       = \"/pactus.Wallet/ListAddresses\"\n\tWallet_SignMessage_FullMethodName         = \"/pactus.Wallet/SignMessage\"\n\tWallet_SignRawTransaction_FullMethodName  = \"/pactus.Wallet/SignRawTransaction\"\n\tWallet_ListTransactions_FullMethodName    = \"/pactus.Wallet/ListTransactions\"\n\tWallet_SetDefaultFee_FullMethodName       = \"/pactus.Wallet/SetDefaultFee\"\n\tWallet_GetMnemonic_FullMethodName         = \"/pactus.Wallet/GetMnemonic\"\n\tWallet_GetPrivateKey_FullMethodName       = \"/pactus.Wallet/GetPrivateKey\"\n)\n\n// WalletClient is the client API for Wallet service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\n//\n// Wallet service provides RPC methods for wallet management operations.\ntype WalletClient interface {\n\t// CreateWallet creates a new wallet with the specified parameters.\n\tCreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error)\n\t// RestoreWallet restores an existing wallet with the given mnemonic.\n\tRestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error)\n\t// LoadWallet loads an existing wallet with the given name.\n\t// deprecated: It will be removed in a future version.\n\tLoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error)\n\t// UnloadWallet unloads a currently loaded wallet with the specified name.\n\t// deprecated: It will be removed in a future version.\n\tUnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error)\n\t// ListWallets returns a list of all available wallets.\n\tListWallets(ctx context.Context, in *ListWalletsRequest, opts ...grpc.CallOption) (*ListWalletsResponse, error)\n\t// GetWalletInfo returns detailed information about a specific wallet.\n\tGetWalletInfo(ctx context.Context, in *GetWalletInfoRequest, opts ...grpc.CallOption) (*GetWalletInfoResponse, error)\n\t// UpdatePassword updates the password of an existing wallet.\n\tUpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error)\n\t// GetTotalBalance returns the total available balance of the wallet.\n\tGetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error)\n\t// GetTotalStake returns the total stake amount in the wallet.\n\tGetTotalStake(ctx context.Context, in *GetTotalStakeRequest, opts ...grpc.CallOption) (*GetTotalStakeResponse, error)\n\t// GetValidatorAddress retrieves the validator address associated with a public key.\n\t// Deprecated: Will move into utils.\n\tGetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error)\n\t// GetAddressInfo returns detailed information about a specific address.\n\tGetAddressInfo(ctx context.Context, in *GetAddressInfoRequest, opts ...grpc.CallOption) (*GetAddressInfoResponse, error)\n\t// SetAddressLabel sets or updates the label for a given address.\n\tSetAddressLabel(ctx context.Context, in *SetAddressLabelRequest, opts ...grpc.CallOption) (*SetAddressLabelResponse, error)\n\t// GetNewAddress generates a new address for the specified wallet.\n\tGetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error)\n\t// ListAddresses returns all addresses in the specified wallet.\n\tListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error)\n\t// SignMessage signs an arbitrary message using a wallet's private key.\n\tSignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error)\n\t// SignRawTransaction signs a raw transaction for a specified wallet.\n\tSignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error)\n\t// ListTransactions returns a list of transactions for a wallet,\n\t// optionally filtered by a specific address, with pagination support.\n\tListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error)\n\t// SetDefaultFee sets the default fee for the wallet.\n\tSetDefaultFee(ctx context.Context, in *SetDefaultFeeRequest, opts ...grpc.CallOption) (*SetDefaultFeeResponse, error)\n\t// GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n\tGetMnemonic(ctx context.Context, in *GetMnemonicRequest, opts ...grpc.CallOption) (*GetMnemonicResponse, error)\n\t// GetPrivateKey returns the private key for a given address.\n\tGetPrivateKey(ctx context.Context, in *GetPrivateKeyRequest, opts ...grpc.CallOption) (*GetPrivateKeyResponse, error)\n}\n\ntype walletClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewWalletClient(cc grpc.ClientConnInterface) WalletClient {\n\treturn &walletClient{cc}\n}\n\nfunc (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(CreateWalletResponse)\n\terr := c.cc.Invoke(ctx, Wallet_CreateWallet_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(RestoreWalletResponse)\n\terr := c.cc.Invoke(ctx, Wallet_RestoreWallet_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(LoadWalletResponse)\n\terr := c.cc.Invoke(ctx, Wallet_LoadWallet_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(UnloadWalletResponse)\n\terr := c.cc.Invoke(ctx, Wallet_UnloadWallet_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) ListWallets(ctx context.Context, in *ListWalletsRequest, opts ...grpc.CallOption) (*ListWalletsResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(ListWalletsResponse)\n\terr := c.cc.Invoke(ctx, Wallet_ListWallets_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetWalletInfo(ctx context.Context, in *GetWalletInfoRequest, opts ...grpc.CallOption) (*GetWalletInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetWalletInfoResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetWalletInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(UpdatePasswordResponse)\n\terr := c.cc.Invoke(ctx, Wallet_UpdatePassword_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetTotalBalanceResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetTotalBalance_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetTotalStake(ctx context.Context, in *GetTotalStakeRequest, opts ...grpc.CallOption) (*GetTotalStakeResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetTotalStakeResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetTotalStake_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetValidatorAddressResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetValidatorAddress_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetAddressInfo(ctx context.Context, in *GetAddressInfoRequest, opts ...grpc.CallOption) (*GetAddressInfoResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetAddressInfoResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetAddressInfo_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) SetAddressLabel(ctx context.Context, in *SetAddressLabelRequest, opts ...grpc.CallOption) (*SetAddressLabelResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SetAddressLabelResponse)\n\terr := c.cc.Invoke(ctx, Wallet_SetAddressLabel_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetNewAddressResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetNewAddress_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) ListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(ListAddressesResponse)\n\terr := c.cc.Invoke(ctx, Wallet_ListAddresses_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SignMessageResponse)\n\terr := c.cc.Invoke(ctx, Wallet_SignMessage_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SignRawTransactionResponse)\n\terr := c.cc.Invoke(ctx, Wallet_SignRawTransaction_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(ListTransactionsResponse)\n\terr := c.cc.Invoke(ctx, Wallet_ListTransactions_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) SetDefaultFee(ctx context.Context, in *SetDefaultFeeRequest, opts ...grpc.CallOption) (*SetDefaultFeeResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(SetDefaultFeeResponse)\n\terr := c.cc.Invoke(ctx, Wallet_SetDefaultFee_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetMnemonic(ctx context.Context, in *GetMnemonicRequest, opts ...grpc.CallOption) (*GetMnemonicResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetMnemonicResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetMnemonic_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *walletClient) GetPrivateKey(ctx context.Context, in *GetPrivateKeyRequest, opts ...grpc.CallOption) (*GetPrivateKeyResponse, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(GetPrivateKeyResponse)\n\terr := c.cc.Invoke(ctx, Wallet_GetPrivateKey_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// WalletServer is the server API for Wallet service.\n// All implementations should embed UnimplementedWalletServer\n// for forward compatibility.\n//\n// Wallet service provides RPC methods for wallet management operations.\ntype WalletServer interface {\n\t// CreateWallet creates a new wallet with the specified parameters.\n\tCreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error)\n\t// RestoreWallet restores an existing wallet with the given mnemonic.\n\tRestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error)\n\t// LoadWallet loads an existing wallet with the given name.\n\t// deprecated: It will be removed in a future version.\n\tLoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error)\n\t// UnloadWallet unloads a currently loaded wallet with the specified name.\n\t// deprecated: It will be removed in a future version.\n\tUnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error)\n\t// ListWallets returns a list of all available wallets.\n\tListWallets(context.Context, *ListWalletsRequest) (*ListWalletsResponse, error)\n\t// GetWalletInfo returns detailed information about a specific wallet.\n\tGetWalletInfo(context.Context, *GetWalletInfoRequest) (*GetWalletInfoResponse, error)\n\t// UpdatePassword updates the password of an existing wallet.\n\tUpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)\n\t// GetTotalBalance returns the total available balance of the wallet.\n\tGetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error)\n\t// GetTotalStake returns the total stake amount in the wallet.\n\tGetTotalStake(context.Context, *GetTotalStakeRequest) (*GetTotalStakeResponse, error)\n\t// GetValidatorAddress retrieves the validator address associated with a public key.\n\t// Deprecated: Will move into utils.\n\tGetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error)\n\t// GetAddressInfo returns detailed information about a specific address.\n\tGetAddressInfo(context.Context, *GetAddressInfoRequest) (*GetAddressInfoResponse, error)\n\t// SetAddressLabel sets or updates the label for a given address.\n\tSetAddressLabel(context.Context, *SetAddressLabelRequest) (*SetAddressLabelResponse, error)\n\t// GetNewAddress generates a new address for the specified wallet.\n\tGetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error)\n\t// ListAddresses returns all addresses in the specified wallet.\n\tListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error)\n\t// SignMessage signs an arbitrary message using a wallet's private key.\n\tSignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error)\n\t// SignRawTransaction signs a raw transaction for a specified wallet.\n\tSignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error)\n\t// ListTransactions returns a list of transactions for a wallet,\n\t// optionally filtered by a specific address, with pagination support.\n\tListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error)\n\t// SetDefaultFee sets the default fee for the wallet.\n\tSetDefaultFee(context.Context, *SetDefaultFeeRequest) (*SetDefaultFeeResponse, error)\n\t// GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n\tGetMnemonic(context.Context, *GetMnemonicRequest) (*GetMnemonicResponse, error)\n\t// GetPrivateKey returns the private key for a given address.\n\tGetPrivateKey(context.Context, *GetPrivateKeyRequest) (*GetPrivateKeyResponse, error)\n}\n\n// UnimplementedWalletServer should be embedded to have\n// forward compatible implementations.\n//\n// NOTE: this should be embedded by value instead of pointer to avoid a nil\n// pointer dereference when methods are called.\ntype UnimplementedWalletServer struct{}\n\nfunc (UnimplementedWalletServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method CreateWallet not implemented\")\n}\nfunc (UnimplementedWalletServer) RestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method RestoreWallet not implemented\")\n}\nfunc (UnimplementedWalletServer) LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method LoadWallet not implemented\")\n}\nfunc (UnimplementedWalletServer) UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method UnloadWallet not implemented\")\n}\nfunc (UnimplementedWalletServer) ListWallets(context.Context, *ListWalletsRequest) (*ListWalletsResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method ListWallets not implemented\")\n}\nfunc (UnimplementedWalletServer) GetWalletInfo(context.Context, *GetWalletInfoRequest) (*GetWalletInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetWalletInfo not implemented\")\n}\nfunc (UnimplementedWalletServer) UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method UpdatePassword not implemented\")\n}\nfunc (UnimplementedWalletServer) GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetTotalBalance not implemented\")\n}\nfunc (UnimplementedWalletServer) GetTotalStake(context.Context, *GetTotalStakeRequest) (*GetTotalStakeResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetTotalStake not implemented\")\n}\nfunc (UnimplementedWalletServer) GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetValidatorAddress not implemented\")\n}\nfunc (UnimplementedWalletServer) GetAddressInfo(context.Context, *GetAddressInfoRequest) (*GetAddressInfoResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetAddressInfo not implemented\")\n}\nfunc (UnimplementedWalletServer) SetAddressLabel(context.Context, *SetAddressLabelRequest) (*SetAddressLabelResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SetAddressLabel not implemented\")\n}\nfunc (UnimplementedWalletServer) GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetNewAddress not implemented\")\n}\nfunc (UnimplementedWalletServer) ListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method ListAddresses not implemented\")\n}\nfunc (UnimplementedWalletServer) SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SignMessage not implemented\")\n}\nfunc (UnimplementedWalletServer) SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SignRawTransaction not implemented\")\n}\nfunc (UnimplementedWalletServer) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method ListTransactions not implemented\")\n}\nfunc (UnimplementedWalletServer) SetDefaultFee(context.Context, *SetDefaultFeeRequest) (*SetDefaultFeeResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method SetDefaultFee not implemented\")\n}\nfunc (UnimplementedWalletServer) GetMnemonic(context.Context, *GetMnemonicRequest) (*GetMnemonicResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetMnemonic not implemented\")\n}\nfunc (UnimplementedWalletServer) GetPrivateKey(context.Context, *GetPrivateKeyRequest) (*GetPrivateKeyResponse, error) {\n\treturn nil, status.Error(codes.Unimplemented, \"method GetPrivateKey not implemented\")\n}\nfunc (UnimplementedWalletServer) testEmbeddedByValue() {}\n\n// UnsafeWalletServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to WalletServer will\n// result in compilation errors.\ntype UnsafeWalletServer interface {\n\tmustEmbedUnimplementedWalletServer()\n}\n\nfunc RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer) {\n\t// If the following call panics, it indicates UnimplementedWalletServer was\n\t// embedded by pointer and is nil.  This will cause panics if an\n\t// unimplemented method is ever invoked, so we test this at initialization\n\t// time to prevent it from happening at runtime later due to I/O.\n\tif t, ok := srv.(interface{ testEmbeddedByValue() }); ok {\n\t\tt.testEmbeddedByValue()\n\t}\n\ts.RegisterService(&Wallet_ServiceDesc, srv)\n}\n\nfunc _Wallet_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(CreateWalletRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).CreateWallet(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_CreateWallet_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).CreateWallet(ctx, req.(*CreateWalletRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_RestoreWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(RestoreWalletRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).RestoreWallet(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_RestoreWallet_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).RestoreWallet(ctx, req.(*RestoreWalletRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_LoadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(LoadWalletRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).LoadWallet(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_LoadWallet_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).LoadWallet(ctx, req.(*LoadWalletRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_UnloadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(UnloadWalletRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).UnloadWallet(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_UnloadWallet_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).UnloadWallet(ctx, req.(*UnloadWalletRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_ListWallets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListWalletsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).ListWallets(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_ListWallets_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).ListWallets(ctx, req.(*ListWalletsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetWalletInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetWalletInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetWalletInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetWalletInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetWalletInfo(ctx, req.(*GetWalletInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(UpdatePasswordRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).UpdatePassword(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_UpdatePassword_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).UpdatePassword(ctx, req.(*UpdatePasswordRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetTotalBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetTotalBalanceRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetTotalBalance(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetTotalBalance_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetTotalBalance(ctx, req.(*GetTotalBalanceRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetTotalStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetTotalStakeRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetTotalStake(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetTotalStake_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetTotalStake(ctx, req.(*GetTotalStakeRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetValidatorAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetValidatorAddressRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetValidatorAddress(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetValidatorAddress_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetValidatorAddress(ctx, req.(*GetValidatorAddressRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetAddressInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetAddressInfoRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetAddressInfo(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetAddressInfo_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetAddressInfo(ctx, req.(*GetAddressInfoRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_SetAddressLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SetAddressLabelRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).SetAddressLabel(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_SetAddressLabel_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).SetAddressLabel(ctx, req.(*SetAddressLabelRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetNewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetNewAddressRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetNewAddress(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetNewAddress_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetNewAddress(ctx, req.(*GetNewAddressRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_ListAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListAddressesRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).ListAddresses(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_ListAddresses_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).ListAddresses(ctx, req.(*ListAddressesRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_SignMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SignMessageRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).SignMessage(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_SignMessage_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).SignMessage(ctx, req.(*SignMessageRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_SignRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SignRawTransactionRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).SignRawTransaction(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_SignRawTransaction_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).SignRawTransaction(ctx, req.(*SignRawTransactionRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_ListTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ListTransactionsRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).ListTransactions(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_ListTransactions_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).ListTransactions(ctx, req.(*ListTransactionsRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_SetDefaultFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(SetDefaultFeeRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).SetDefaultFee(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_SetDefaultFee_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).SetDefaultFee(ctx, req.(*SetDefaultFeeRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetMnemonic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetMnemonicRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetMnemonic(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetMnemonic_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetMnemonic(ctx, req.(*GetMnemonicRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _Wallet_GetPrivateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(GetPrivateKeyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(WalletServer).GetPrivateKey(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: Wallet_GetPrivateKey_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(WalletServer).GetPrivateKey(ctx, req.(*GetPrivateKeyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar Wallet_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"pactus.Wallet\",\n\tHandlerType: (*WalletServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"CreateWallet\",\n\t\t\tHandler:    _Wallet_CreateWallet_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"RestoreWallet\",\n\t\t\tHandler:    _Wallet_RestoreWallet_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"LoadWallet\",\n\t\t\tHandler:    _Wallet_LoadWallet_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UnloadWallet\",\n\t\t\tHandler:    _Wallet_UnloadWallet_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListWallets\",\n\t\t\tHandler:    _Wallet_ListWallets_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetWalletInfo\",\n\t\t\tHandler:    _Wallet_GetWalletInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdatePassword\",\n\t\t\tHandler:    _Wallet_UpdatePassword_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetTotalBalance\",\n\t\t\tHandler:    _Wallet_GetTotalBalance_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetTotalStake\",\n\t\t\tHandler:    _Wallet_GetTotalStake_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetValidatorAddress\",\n\t\t\tHandler:    _Wallet_GetValidatorAddress_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetAddressInfo\",\n\t\t\tHandler:    _Wallet_GetAddressInfo_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SetAddressLabel\",\n\t\t\tHandler:    _Wallet_SetAddressLabel_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetNewAddress\",\n\t\t\tHandler:    _Wallet_GetNewAddress_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListAddresses\",\n\t\t\tHandler:    _Wallet_ListAddresses_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SignMessage\",\n\t\t\tHandler:    _Wallet_SignMessage_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SignRawTransaction\",\n\t\t\tHandler:    _Wallet_SignRawTransaction_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ListTransactions\",\n\t\t\tHandler:    _Wallet_ListTransactions_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SetDefaultFee\",\n\t\t\tHandler:    _Wallet_SetDefaultFee_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetMnemonic\",\n\t\t\tHandler:    _Wallet_GetMnemonic_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetPrivateKey\",\n\t\t\tHandler:    _Wallet_GetPrivateKey_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"wallet.proto\",\n}\n"
  },
  {
    "path": "www/grpc/gen/go/wallet_jgw.pb.go",
    "content": "// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT.\n// source: wallet.proto\n\n/*\nPackage pactus is a reverse proxy.\n\nIt translates gRPC into JSON-RPC 2.0\n*/\npackage pactus\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/protobuf/encoding/protojson\"\n)\n\ntype WalletJsonRPC struct {\n\tclient WalletClient\n}\n\ntype paramsAndHeadersWallet struct {\n\tHeaders metadata.MD     `json:\"headers,omitempty\"`\n\tParams  json.RawMessage `json:\"params\"`\n}\n\n// RegisterWalletJsonRPC register the grpc client Wallet for json-rpc.\n// The handlers forward requests to the grpc endpoint over \"conn\".\nfunc RegisterWalletJsonRPC(conn *grpc.ClientConn) *WalletJsonRPC {\n\treturn &WalletJsonRPC{\n\t\tclient: NewWalletClient(conn),\n\t}\n}\n\nfunc (s *WalletJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) {\n\treturn map[string]func(ctx context.Context, params json.RawMessage) (any, error){\n\n\t\t\"pactus.wallet.create_wallet\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(CreateWalletRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.CreateWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.restore_wallet\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(RestoreWalletRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.RestoreWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.load_wallet\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(LoadWalletRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.LoadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.unload_wallet\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(UnloadWalletRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.UnloadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.list_wallets\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(ListWalletsRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.ListWallets(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_wallet_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetWalletInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetWalletInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.update_password\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(UpdatePasswordRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.UpdatePassword(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_total_balance\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetTotalBalanceRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetTotalBalance(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_total_stake\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetTotalStakeRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetTotalStake(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_validator_address\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetValidatorAddressRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetValidatorAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_address_info\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetAddressInfoRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetAddressInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.set_address_label\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SetAddressLabelRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SetAddressLabel(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_new_address\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetNewAddressRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetNewAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.list_addresses\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(ListAddressesRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.ListAddresses(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.sign_message\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SignMessageRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SignMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.sign_raw_transaction\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SignRawTransactionRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SignRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.list_transactions\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(ListTransactionsRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.ListTransactions(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.set_default_fee\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(SetDefaultFeeRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.SetDefaultFee(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_mnemonic\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetMnemonicRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetMnemonic(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\n\t\t\"pactus.wallet.get_private_key\": func(ctx context.Context, data json.RawMessage) (any, error) {\n\t\t\treq := new(GetPrivateKeyRequest)\n\n\t\t\tvar jrpcData paramsAndHeadersWallet\n\n\t\t\tif err := json.Unmarshal(data, &jrpcData); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\terr := protojson.Unmarshal(jrpcData.Params, req)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn s.client.GetPrivateKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req)\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/BlockchainGrpc.java",
    "content": "package pactus;\n\nimport static io.grpc.MethodDescriptor.generateFullMethodName;\n\n/**\n * <pre>\n * Blockchain service defines RPC methods for interacting with the blockchain.\n * </pre>\n */\n@io.grpc.stub.annotations.GrpcGenerated\npublic final class BlockchainGrpc {\n\n  private BlockchainGrpc() {}\n\n  public static final java.lang.String SERVICE_NAME = \"pactus.Blockchain\";\n\n  // Static method descriptors that strictly reflect the proto.\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockRequest,\n      pactus.BlockchainOuterClass.GetBlockResponse> getGetBlockMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetBlock\",\n      requestType = pactus.BlockchainOuterClass.GetBlockRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetBlockResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockRequest,\n      pactus.BlockchainOuterClass.GetBlockResponse> getGetBlockMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockRequest, pactus.BlockchainOuterClass.GetBlockResponse> getGetBlockMethod;\n    if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) {\n          BlockchainGrpc.getGetBlockMethod = getGetBlockMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetBlockRequest, pactus.BlockchainOuterClass.GetBlockResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetBlock\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetBlock\"))\n              .build();\n        }\n      }\n    }\n    return getGetBlockMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHashRequest,\n      pactus.BlockchainOuterClass.GetBlockHashResponse> getGetBlockHashMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetBlockHash\",\n      requestType = pactus.BlockchainOuterClass.GetBlockHashRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetBlockHashResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHashRequest,\n      pactus.BlockchainOuterClass.GetBlockHashResponse> getGetBlockHashMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHashRequest, pactus.BlockchainOuterClass.GetBlockHashResponse> getGetBlockHashMethod;\n    if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) {\n          BlockchainGrpc.getGetBlockHashMethod = getGetBlockHashMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetBlockHashRequest, pactus.BlockchainOuterClass.GetBlockHashResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetBlockHash\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetBlockHash\"))\n              .build();\n        }\n      }\n    }\n    return getGetBlockHashMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHeightRequest,\n      pactus.BlockchainOuterClass.GetBlockHeightResponse> getGetBlockHeightMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetBlockHeight\",\n      requestType = pactus.BlockchainOuterClass.GetBlockHeightRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetBlockHeightResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHeightRequest,\n      pactus.BlockchainOuterClass.GetBlockHeightResponse> getGetBlockHeightMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockHeightRequest, pactus.BlockchainOuterClass.GetBlockHeightResponse> getGetBlockHeightMethod;\n    if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) {\n          BlockchainGrpc.getGetBlockHeightMethod = getGetBlockHeightMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetBlockHeightRequest, pactus.BlockchainOuterClass.GetBlockHeightResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetBlockHeight\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetBlockHeight\"))\n              .build();\n        }\n      }\n    }\n    return getGetBlockHeightMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockchainInfoRequest,\n      pactus.BlockchainOuterClass.GetBlockchainInfoResponse> getGetBlockchainInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetBlockchainInfo\",\n      requestType = pactus.BlockchainOuterClass.GetBlockchainInfoRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetBlockchainInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockchainInfoRequest,\n      pactus.BlockchainOuterClass.GetBlockchainInfoResponse> getGetBlockchainInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetBlockchainInfoRequest, pactus.BlockchainOuterClass.GetBlockchainInfoResponse> getGetBlockchainInfoMethod;\n    if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) {\n          BlockchainGrpc.getGetBlockchainInfoMethod = getGetBlockchainInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetBlockchainInfoRequest, pactus.BlockchainOuterClass.GetBlockchainInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetBlockchainInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetBlockchainInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetBlockchainInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetCommitteeInfoRequest,\n      pactus.BlockchainOuterClass.GetCommitteeInfoResponse> getGetCommitteeInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetCommitteeInfo\",\n      requestType = pactus.BlockchainOuterClass.GetCommitteeInfoRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetCommitteeInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetCommitteeInfoRequest,\n      pactus.BlockchainOuterClass.GetCommitteeInfoResponse> getGetCommitteeInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetCommitteeInfoRequest, pactus.BlockchainOuterClass.GetCommitteeInfoResponse> getGetCommitteeInfoMethod;\n    if ((getGetCommitteeInfoMethod = BlockchainGrpc.getGetCommitteeInfoMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetCommitteeInfoMethod = BlockchainGrpc.getGetCommitteeInfoMethod) == null) {\n          BlockchainGrpc.getGetCommitteeInfoMethod = getGetCommitteeInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetCommitteeInfoRequest, pactus.BlockchainOuterClass.GetCommitteeInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetCommitteeInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetCommitteeInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetCommitteeInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetCommitteeInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetCommitteeInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetConsensusInfoRequest,\n      pactus.BlockchainOuterClass.GetConsensusInfoResponse> getGetConsensusInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetConsensusInfo\",\n      requestType = pactus.BlockchainOuterClass.GetConsensusInfoRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetConsensusInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetConsensusInfoRequest,\n      pactus.BlockchainOuterClass.GetConsensusInfoResponse> getGetConsensusInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetConsensusInfoRequest, pactus.BlockchainOuterClass.GetConsensusInfoResponse> getGetConsensusInfoMethod;\n    if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) {\n          BlockchainGrpc.getGetConsensusInfoMethod = getGetConsensusInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetConsensusInfoRequest, pactus.BlockchainOuterClass.GetConsensusInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetConsensusInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetConsensusInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetConsensusInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetAccountRequest,\n      pactus.BlockchainOuterClass.GetAccountResponse> getGetAccountMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetAccount\",\n      requestType = pactus.BlockchainOuterClass.GetAccountRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetAccountResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetAccountRequest,\n      pactus.BlockchainOuterClass.GetAccountResponse> getGetAccountMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetAccountRequest, pactus.BlockchainOuterClass.GetAccountResponse> getGetAccountMethod;\n    if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) {\n          BlockchainGrpc.getGetAccountMethod = getGetAccountMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetAccountRequest, pactus.BlockchainOuterClass.GetAccountResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetAccount\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetAccountRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetAccountResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetAccount\"))\n              .build();\n        }\n      }\n    }\n    return getGetAccountMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorRequest,\n      pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetValidator\",\n      requestType = pactus.BlockchainOuterClass.GetValidatorRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetValidatorResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorRequest,\n      pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorRequest, pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorMethod;\n    if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) {\n          BlockchainGrpc.getGetValidatorMethod = getGetValidatorMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetValidatorRequest, pactus.BlockchainOuterClass.GetValidatorResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetValidator\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetValidator\"))\n              .build();\n        }\n      }\n    }\n    return getGetValidatorMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorByNumberRequest,\n      pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorByNumberMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetValidatorByNumber\",\n      requestType = pactus.BlockchainOuterClass.GetValidatorByNumberRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetValidatorResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorByNumberRequest,\n      pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorByNumberMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorByNumberRequest, pactus.BlockchainOuterClass.GetValidatorResponse> getGetValidatorByNumberMethod;\n    if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) {\n          BlockchainGrpc.getGetValidatorByNumberMethod = getGetValidatorByNumberMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetValidatorByNumberRequest, pactus.BlockchainOuterClass.GetValidatorResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetValidatorByNumber\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetValidatorByNumber\"))\n              .build();\n        }\n      }\n    }\n    return getGetValidatorByNumberMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorAddressesRequest,\n      pactus.BlockchainOuterClass.GetValidatorAddressesResponse> getGetValidatorAddressesMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetValidatorAddresses\",\n      requestType = pactus.BlockchainOuterClass.GetValidatorAddressesRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetValidatorAddressesResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorAddressesRequest,\n      pactus.BlockchainOuterClass.GetValidatorAddressesResponse> getGetValidatorAddressesMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetValidatorAddressesRequest, pactus.BlockchainOuterClass.GetValidatorAddressesResponse> getGetValidatorAddressesMethod;\n    if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) {\n          BlockchainGrpc.getGetValidatorAddressesMethod = getGetValidatorAddressesMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetValidatorAddressesRequest, pactus.BlockchainOuterClass.GetValidatorAddressesResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetValidatorAddresses\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetValidatorAddresses\"))\n              .build();\n        }\n      }\n    }\n    return getGetValidatorAddressesMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetPublicKeyRequest,\n      pactus.BlockchainOuterClass.GetPublicKeyResponse> getGetPublicKeyMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetPublicKey\",\n      requestType = pactus.BlockchainOuterClass.GetPublicKeyRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetPublicKeyResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetPublicKeyRequest,\n      pactus.BlockchainOuterClass.GetPublicKeyResponse> getGetPublicKeyMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetPublicKeyRequest, pactus.BlockchainOuterClass.GetPublicKeyResponse> getGetPublicKeyMethod;\n    if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) {\n          BlockchainGrpc.getGetPublicKeyMethod = getGetPublicKeyMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetPublicKeyRequest, pactus.BlockchainOuterClass.GetPublicKeyResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetPublicKey\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetPublicKey\"))\n              .build();\n        }\n      }\n    }\n    return getGetPublicKeyMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetTxPoolContentRequest,\n      pactus.BlockchainOuterClass.GetTxPoolContentResponse> getGetTxPoolContentMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetTxPoolContent\",\n      requestType = pactus.BlockchainOuterClass.GetTxPoolContentRequest.class,\n      responseType = pactus.BlockchainOuterClass.GetTxPoolContentResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetTxPoolContentRequest,\n      pactus.BlockchainOuterClass.GetTxPoolContentResponse> getGetTxPoolContentMethod() {\n    io.grpc.MethodDescriptor<pactus.BlockchainOuterClass.GetTxPoolContentRequest, pactus.BlockchainOuterClass.GetTxPoolContentResponse> getGetTxPoolContentMethod;\n    if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) {\n      synchronized (BlockchainGrpc.class) {\n        if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) {\n          BlockchainGrpc.getGetTxPoolContentMethod = getGetTxPoolContentMethod =\n              io.grpc.MethodDescriptor.<pactus.BlockchainOuterClass.GetTxPoolContentRequest, pactus.BlockchainOuterClass.GetTxPoolContentResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetTxPoolContent\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier(\"GetTxPoolContent\"))\n              .build();\n        }\n      }\n    }\n    return getGetTxPoolContentMethod;\n  }\n\n  /**\n   * Creates a new async stub that supports all call types for the service\n   */\n  public static BlockchainStub newStub(io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<BlockchainStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<BlockchainStub>() {\n        @java.lang.Override\n        public BlockchainStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new BlockchainStub(channel, callOptions);\n        }\n      };\n    return BlockchainStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports all types of calls on the service\n   */\n  public static BlockchainBlockingV2Stub newBlockingV2Stub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<BlockchainBlockingV2Stub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<BlockchainBlockingV2Stub>() {\n        @java.lang.Override\n        public BlockchainBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new BlockchainBlockingV2Stub(channel, callOptions);\n        }\n      };\n    return BlockchainBlockingV2Stub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports unary and streaming output calls on the service\n   */\n  public static BlockchainBlockingStub newBlockingStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<BlockchainBlockingStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<BlockchainBlockingStub>() {\n        @java.lang.Override\n        public BlockchainBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new BlockchainBlockingStub(channel, callOptions);\n        }\n      };\n    return BlockchainBlockingStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new ListenableFuture-style stub that supports unary calls on the service\n   */\n  public static BlockchainFutureStub newFutureStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<BlockchainFutureStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<BlockchainFutureStub>() {\n        @java.lang.Override\n        public BlockchainFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new BlockchainFutureStub(channel, callOptions);\n        }\n      };\n    return BlockchainFutureStub.newStub(factory, channel);\n  }\n\n  /**\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public interface AsyncService {\n\n    /**\n     * <pre>\n     * GetBlock retrieves information about a block based on the provided request parameters.\n     * </pre>\n     */\n    default void getBlock(pactus.BlockchainOuterClass.GetBlockRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHash retrieves the hash of a block at the specified height.\n     * </pre>\n     */\n    default void getBlockHash(pactus.BlockchainOuterClass.GetBlockHashRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHashResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHashMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHeight retrieves the height of a block with the specified hash.\n     * </pre>\n     */\n    default void getBlockHeight(pactus.BlockchainOuterClass.GetBlockHeightRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHeightResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHeightMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockchainInfo retrieves general information about the blockchain.\n     * </pre>\n     */\n    default void getBlockchainInfo(pactus.BlockchainOuterClass.GetBlockchainInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockchainInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockchainInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetCommitteeInfo retrieves information about the current committee.\n     * </pre>\n     */\n    default void getCommitteeInfo(pactus.BlockchainOuterClass.GetCommitteeInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetCommitteeInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCommitteeInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetConsensusInfo retrieves information about the consensus instances.\n     * </pre>\n     */\n    default void getConsensusInfo(pactus.BlockchainOuterClass.GetConsensusInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetConsensusInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConsensusInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetAccount retrieves information about an account based on the provided address.\n     * </pre>\n     */\n    default void getAccount(pactus.BlockchainOuterClass.GetAccountRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetAccountResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidator retrieves information about a validator based on the provided address.\n     * </pre>\n     */\n    default void getValidator(pactus.BlockchainOuterClass.GetValidatorRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorByNumber retrieves information about a validator based on the provided number.\n     * </pre>\n     */\n    default void getValidatorByNumber(pactus.BlockchainOuterClass.GetValidatorByNumberRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorByNumberMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddresses retrieves a list of all validator addresses.\n     * </pre>\n     */\n    default void getValidatorAddresses(pactus.BlockchainOuterClass.GetValidatorAddressesRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorAddressesResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressesMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetPublicKey retrieves the public key of an account based on the provided address.\n     * </pre>\n     */\n    default void getPublicKey(pactus.BlockchainOuterClass.GetPublicKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetPublicKeyResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPublicKeyMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTxPoolContent retrieves current transactions in the transaction pool.\n     * </pre>\n     */\n    default void getTxPoolContent(pactus.BlockchainOuterClass.GetTxPoolContentRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetTxPoolContentResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTxPoolContentMethod(), responseObserver);\n    }\n  }\n\n  /**\n   * Base class for the server implementation of the service Blockchain.\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public static abstract class BlockchainImplBase\n      implements io.grpc.BindableService, AsyncService {\n\n    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {\n      return BlockchainGrpc.bindService(this);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do asynchronous rpc calls to service Blockchain.\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public static final class BlockchainStub\n      extends io.grpc.stub.AbstractAsyncStub<BlockchainStub> {\n    private BlockchainStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected BlockchainStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new BlockchainStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetBlock retrieves information about a block based on the provided request parameters.\n     * </pre>\n     */\n    public void getBlock(pactus.BlockchainOuterClass.GetBlockRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetBlockMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHash retrieves the hash of a block at the specified height.\n     * </pre>\n     */\n    public void getBlockHash(pactus.BlockchainOuterClass.GetBlockHashRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHashResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHeight retrieves the height of a block with the specified hash.\n     * </pre>\n     */\n    public void getBlockHeight(pactus.BlockchainOuterClass.GetBlockHeightRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHeightResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetBlockchainInfo retrieves general information about the blockchain.\n     * </pre>\n     */\n    public void getBlockchainInfo(pactus.BlockchainOuterClass.GetBlockchainInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockchainInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetCommitteeInfo retrieves information about the current committee.\n     * </pre>\n     */\n    public void getCommitteeInfo(pactus.BlockchainOuterClass.GetCommitteeInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetCommitteeInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetCommitteeInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetConsensusInfo retrieves information about the consensus instances.\n     * </pre>\n     */\n    public void getConsensusInfo(pactus.BlockchainOuterClass.GetConsensusInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetConsensusInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetAccount retrieves information about an account based on the provided address.\n     * </pre>\n     */\n    public void getAccount(pactus.BlockchainOuterClass.GetAccountRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetAccountResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidator retrieves information about a validator based on the provided address.\n     * </pre>\n     */\n    public void getValidator(pactus.BlockchainOuterClass.GetValidatorRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorByNumber retrieves information about a validator based on the provided number.\n     * </pre>\n     */\n    public void getValidatorByNumber(pactus.BlockchainOuterClass.GetValidatorByNumberRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddresses retrieves a list of all validator addresses.\n     * </pre>\n     */\n    public void getValidatorAddresses(pactus.BlockchainOuterClass.GetValidatorAddressesRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorAddressesResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetPublicKey retrieves the public key of an account based on the provided address.\n     * </pre>\n     */\n    public void getPublicKey(pactus.BlockchainOuterClass.GetPublicKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetPublicKeyResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTxPoolContent retrieves current transactions in the transaction pool.\n     * </pre>\n     */\n    public void getTxPoolContent(pactus.BlockchainOuterClass.GetTxPoolContentRequest request,\n        io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetTxPoolContentResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request, responseObserver);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do synchronous rpc calls to service Blockchain.\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public static final class BlockchainBlockingV2Stub\n      extends io.grpc.stub.AbstractBlockingStub<BlockchainBlockingV2Stub> {\n    private BlockchainBlockingV2Stub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected BlockchainBlockingV2Stub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new BlockchainBlockingV2Stub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetBlock retrieves information about a block based on the provided request parameters.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockResponse getBlock(pactus.BlockchainOuterClass.GetBlockRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetBlockMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHash retrieves the hash of a block at the specified height.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockHashResponse getBlockHash(pactus.BlockchainOuterClass.GetBlockHashRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetBlockHashMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHeight retrieves the height of a block with the specified hash.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockHeightResponse getBlockHeight(pactus.BlockchainOuterClass.GetBlockHeightRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetBlockHeightMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockchainInfo retrieves general information about the blockchain.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockchainInfoResponse getBlockchainInfo(pactus.BlockchainOuterClass.GetBlockchainInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetBlockchainInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetCommitteeInfo retrieves information about the current committee.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetCommitteeInfoResponse getCommitteeInfo(pactus.BlockchainOuterClass.GetCommitteeInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetCommitteeInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetConsensusInfo retrieves information about the consensus instances.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetConsensusInfoResponse getConsensusInfo(pactus.BlockchainOuterClass.GetConsensusInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetConsensusInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetAccount retrieves information about an account based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetAccountResponse getAccount(pactus.BlockchainOuterClass.GetAccountRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetAccountMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidator retrieves information about a validator based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorResponse getValidator(pactus.BlockchainOuterClass.GetValidatorRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetValidatorMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorByNumber retrieves information about a validator based on the provided number.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorResponse getValidatorByNumber(pactus.BlockchainOuterClass.GetValidatorByNumberRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetValidatorByNumberMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddresses retrieves a list of all validator addresses.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorAddressesResponse getValidatorAddresses(pactus.BlockchainOuterClass.GetValidatorAddressesRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetValidatorAddressesMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetPublicKey retrieves the public key of an account based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetPublicKeyResponse getPublicKey(pactus.BlockchainOuterClass.GetPublicKeyRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetPublicKeyMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTxPoolContent retrieves current transactions in the transaction pool.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetTxPoolContentResponse getTxPoolContent(pactus.BlockchainOuterClass.GetTxPoolContentRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetTxPoolContentMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do limited synchronous rpc calls to service Blockchain.\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public static final class BlockchainBlockingStub\n      extends io.grpc.stub.AbstractBlockingStub<BlockchainBlockingStub> {\n    private BlockchainBlockingStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected BlockchainBlockingStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new BlockchainBlockingStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetBlock retrieves information about a block based on the provided request parameters.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockResponse getBlock(pactus.BlockchainOuterClass.GetBlockRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetBlockMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHash retrieves the hash of a block at the specified height.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockHashResponse getBlockHash(pactus.BlockchainOuterClass.GetBlockHashRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetBlockHashMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHeight retrieves the height of a block with the specified hash.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockHeightResponse getBlockHeight(pactus.BlockchainOuterClass.GetBlockHeightRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetBlockHeightMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockchainInfo retrieves general information about the blockchain.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetBlockchainInfoResponse getBlockchainInfo(pactus.BlockchainOuterClass.GetBlockchainInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetBlockchainInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetCommitteeInfo retrieves information about the current committee.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetCommitteeInfoResponse getCommitteeInfo(pactus.BlockchainOuterClass.GetCommitteeInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetCommitteeInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetConsensusInfo retrieves information about the consensus instances.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetConsensusInfoResponse getConsensusInfo(pactus.BlockchainOuterClass.GetConsensusInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetConsensusInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetAccount retrieves information about an account based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetAccountResponse getAccount(pactus.BlockchainOuterClass.GetAccountRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetAccountMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidator retrieves information about a validator based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorResponse getValidator(pactus.BlockchainOuterClass.GetValidatorRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetValidatorMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorByNumber retrieves information about a validator based on the provided number.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorResponse getValidatorByNumber(pactus.BlockchainOuterClass.GetValidatorByNumberRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetValidatorByNumberMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddresses retrieves a list of all validator addresses.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetValidatorAddressesResponse getValidatorAddresses(pactus.BlockchainOuterClass.GetValidatorAddressesRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetValidatorAddressesMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetPublicKey retrieves the public key of an account based on the provided address.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetPublicKeyResponse getPublicKey(pactus.BlockchainOuterClass.GetPublicKeyRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetPublicKeyMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTxPoolContent retrieves current transactions in the transaction pool.\n     * </pre>\n     */\n    public pactus.BlockchainOuterClass.GetTxPoolContentResponse getTxPoolContent(pactus.BlockchainOuterClass.GetTxPoolContentRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetTxPoolContentMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do ListenableFuture-style rpc calls to service Blockchain.\n   * <pre>\n   * Blockchain service defines RPC methods for interacting with the blockchain.\n   * </pre>\n   */\n  public static final class BlockchainFutureStub\n      extends io.grpc.stub.AbstractFutureStub<BlockchainFutureStub> {\n    private BlockchainFutureStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected BlockchainFutureStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new BlockchainFutureStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetBlock retrieves information about a block based on the provided request parameters.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetBlockResponse> getBlock(\n        pactus.BlockchainOuterClass.GetBlockRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetBlockMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHash retrieves the hash of a block at the specified height.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetBlockHashResponse> getBlockHash(\n        pactus.BlockchainOuterClass.GetBlockHashRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockHeight retrieves the height of a block with the specified hash.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetBlockHeightResponse> getBlockHeight(\n        pactus.BlockchainOuterClass.GetBlockHeightRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetBlockchainInfo retrieves general information about the blockchain.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetBlockchainInfoResponse> getBlockchainInfo(\n        pactus.BlockchainOuterClass.GetBlockchainInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetCommitteeInfo retrieves information about the current committee.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetCommitteeInfoResponse> getCommitteeInfo(\n        pactus.BlockchainOuterClass.GetCommitteeInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetCommitteeInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetConsensusInfo retrieves information about the consensus instances.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetConsensusInfoResponse> getConsensusInfo(\n        pactus.BlockchainOuterClass.GetConsensusInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetAccount retrieves information about an account based on the provided address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetAccountResponse> getAccount(\n        pactus.BlockchainOuterClass.GetAccountRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetAccountMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidator retrieves information about a validator based on the provided address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetValidatorResponse> getValidator(\n        pactus.BlockchainOuterClass.GetValidatorRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorByNumber retrieves information about a validator based on the provided number.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetValidatorResponse> getValidatorByNumber(\n        pactus.BlockchainOuterClass.GetValidatorByNumberRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddresses retrieves a list of all validator addresses.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetValidatorAddressesResponse> getValidatorAddresses(\n        pactus.BlockchainOuterClass.GetValidatorAddressesRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetPublicKey retrieves the public key of an account based on the provided address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetPublicKeyResponse> getPublicKey(\n        pactus.BlockchainOuterClass.GetPublicKeyRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetTxPoolContent retrieves current transactions in the transaction pool.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.BlockchainOuterClass.GetTxPoolContentResponse> getTxPoolContent(\n        pactus.BlockchainOuterClass.GetTxPoolContentRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request);\n    }\n  }\n\n  private static final int METHODID_GET_BLOCK = 0;\n  private static final int METHODID_GET_BLOCK_HASH = 1;\n  private static final int METHODID_GET_BLOCK_HEIGHT = 2;\n  private static final int METHODID_GET_BLOCKCHAIN_INFO = 3;\n  private static final int METHODID_GET_COMMITTEE_INFO = 4;\n  private static final int METHODID_GET_CONSENSUS_INFO = 5;\n  private static final int METHODID_GET_ACCOUNT = 6;\n  private static final int METHODID_GET_VALIDATOR = 7;\n  private static final int METHODID_GET_VALIDATOR_BY_NUMBER = 8;\n  private static final int METHODID_GET_VALIDATOR_ADDRESSES = 9;\n  private static final int METHODID_GET_PUBLIC_KEY = 10;\n  private static final int METHODID_GET_TX_POOL_CONTENT = 11;\n\n  private static final class MethodHandlers<Req, Resp> implements\n      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {\n    private final AsyncService serviceImpl;\n    private final int methodId;\n\n    MethodHandlers(AsyncService serviceImpl, int methodId) {\n      this.serviceImpl = serviceImpl;\n      this.methodId = methodId;\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        case METHODID_GET_BLOCK:\n          serviceImpl.getBlock((pactus.BlockchainOuterClass.GetBlockRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockResponse>) responseObserver);\n          break;\n        case METHODID_GET_BLOCK_HASH:\n          serviceImpl.getBlockHash((pactus.BlockchainOuterClass.GetBlockHashRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHashResponse>) responseObserver);\n          break;\n        case METHODID_GET_BLOCK_HEIGHT:\n          serviceImpl.getBlockHeight((pactus.BlockchainOuterClass.GetBlockHeightRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockHeightResponse>) responseObserver);\n          break;\n        case METHODID_GET_BLOCKCHAIN_INFO:\n          serviceImpl.getBlockchainInfo((pactus.BlockchainOuterClass.GetBlockchainInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetBlockchainInfoResponse>) responseObserver);\n          break;\n        case METHODID_GET_COMMITTEE_INFO:\n          serviceImpl.getCommitteeInfo((pactus.BlockchainOuterClass.GetCommitteeInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetCommitteeInfoResponse>) responseObserver);\n          break;\n        case METHODID_GET_CONSENSUS_INFO:\n          serviceImpl.getConsensusInfo((pactus.BlockchainOuterClass.GetConsensusInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetConsensusInfoResponse>) responseObserver);\n          break;\n        case METHODID_GET_ACCOUNT:\n          serviceImpl.getAccount((pactus.BlockchainOuterClass.GetAccountRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetAccountResponse>) responseObserver);\n          break;\n        case METHODID_GET_VALIDATOR:\n          serviceImpl.getValidator((pactus.BlockchainOuterClass.GetValidatorRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse>) responseObserver);\n          break;\n        case METHODID_GET_VALIDATOR_BY_NUMBER:\n          serviceImpl.getValidatorByNumber((pactus.BlockchainOuterClass.GetValidatorByNumberRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorResponse>) responseObserver);\n          break;\n        case METHODID_GET_VALIDATOR_ADDRESSES:\n          serviceImpl.getValidatorAddresses((pactus.BlockchainOuterClass.GetValidatorAddressesRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetValidatorAddressesResponse>) responseObserver);\n          break;\n        case METHODID_GET_PUBLIC_KEY:\n          serviceImpl.getPublicKey((pactus.BlockchainOuterClass.GetPublicKeyRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetPublicKeyResponse>) responseObserver);\n          break;\n        case METHODID_GET_TX_POOL_CONTENT:\n          serviceImpl.getTxPoolContent((pactus.BlockchainOuterClass.GetTxPoolContentRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.BlockchainOuterClass.GetTxPoolContentResponse>) responseObserver);\n          break;\n        default:\n          throw new AssertionError();\n      }\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public io.grpc.stub.StreamObserver<Req> invoke(\n        io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        default:\n          throw new AssertionError();\n      }\n    }\n  }\n\n  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {\n    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())\n        .addMethod(\n          getGetBlockMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetBlockRequest,\n              pactus.BlockchainOuterClass.GetBlockResponse>(\n                service, METHODID_GET_BLOCK)))\n        .addMethod(\n          getGetBlockHashMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetBlockHashRequest,\n              pactus.BlockchainOuterClass.GetBlockHashResponse>(\n                service, METHODID_GET_BLOCK_HASH)))\n        .addMethod(\n          getGetBlockHeightMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetBlockHeightRequest,\n              pactus.BlockchainOuterClass.GetBlockHeightResponse>(\n                service, METHODID_GET_BLOCK_HEIGHT)))\n        .addMethod(\n          getGetBlockchainInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetBlockchainInfoRequest,\n              pactus.BlockchainOuterClass.GetBlockchainInfoResponse>(\n                service, METHODID_GET_BLOCKCHAIN_INFO)))\n        .addMethod(\n          getGetCommitteeInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetCommitteeInfoRequest,\n              pactus.BlockchainOuterClass.GetCommitteeInfoResponse>(\n                service, METHODID_GET_COMMITTEE_INFO)))\n        .addMethod(\n          getGetConsensusInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetConsensusInfoRequest,\n              pactus.BlockchainOuterClass.GetConsensusInfoResponse>(\n                service, METHODID_GET_CONSENSUS_INFO)))\n        .addMethod(\n          getGetAccountMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetAccountRequest,\n              pactus.BlockchainOuterClass.GetAccountResponse>(\n                service, METHODID_GET_ACCOUNT)))\n        .addMethod(\n          getGetValidatorMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetValidatorRequest,\n              pactus.BlockchainOuterClass.GetValidatorResponse>(\n                service, METHODID_GET_VALIDATOR)))\n        .addMethod(\n          getGetValidatorByNumberMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetValidatorByNumberRequest,\n              pactus.BlockchainOuterClass.GetValidatorResponse>(\n                service, METHODID_GET_VALIDATOR_BY_NUMBER)))\n        .addMethod(\n          getGetValidatorAddressesMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetValidatorAddressesRequest,\n              pactus.BlockchainOuterClass.GetValidatorAddressesResponse>(\n                service, METHODID_GET_VALIDATOR_ADDRESSES)))\n        .addMethod(\n          getGetPublicKeyMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetPublicKeyRequest,\n              pactus.BlockchainOuterClass.GetPublicKeyResponse>(\n                service, METHODID_GET_PUBLIC_KEY)))\n        .addMethod(\n          getGetTxPoolContentMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.BlockchainOuterClass.GetTxPoolContentRequest,\n              pactus.BlockchainOuterClass.GetTxPoolContentResponse>(\n                service, METHODID_GET_TX_POOL_CONTENT)))\n        .build();\n  }\n\n  private static abstract class BlockchainBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {\n    BlockchainBaseDescriptorSupplier() {}\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n      return pactus.BlockchainOuterClass.getDescriptor();\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n      return getFileDescriptor().findServiceByName(\"Blockchain\");\n    }\n  }\n\n  private static final class BlockchainFileDescriptorSupplier\n      extends BlockchainBaseDescriptorSupplier {\n    BlockchainFileDescriptorSupplier() {}\n  }\n\n  private static final class BlockchainMethodDescriptorSupplier\n      extends BlockchainBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {\n    private final java.lang.String methodName;\n\n    BlockchainMethodDescriptorSupplier(java.lang.String methodName) {\n      this.methodName = methodName;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n      return getServiceDescriptor().findMethodByName(methodName);\n    }\n  }\n\n  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;\n\n  public static io.grpc.ServiceDescriptor getServiceDescriptor() {\n    io.grpc.ServiceDescriptor result = serviceDescriptor;\n    if (result == null) {\n      synchronized (BlockchainGrpc.class) {\n        result = serviceDescriptor;\n        if (result == null) {\n          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)\n              .setSchemaDescriptor(new BlockchainFileDescriptorSupplier())\n              .addMethod(getGetBlockMethod())\n              .addMethod(getGetBlockHashMethod())\n              .addMethod(getGetBlockHeightMethod())\n              .addMethod(getGetBlockchainInfoMethod())\n              .addMethod(getGetCommitteeInfoMethod())\n              .addMethod(getGetConsensusInfoMethod())\n              .addMethod(getGetAccountMethod())\n              .addMethod(getGetValidatorMethod())\n              .addMethod(getGetValidatorByNumberMethod())\n              .addMethod(getGetValidatorAddressesMethod())\n              .addMethod(getGetPublicKeyMethod())\n              .addMethod(getGetTxPoolContentMethod())\n              .build();\n        }\n      }\n    }\n    return result;\n  }\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/BlockchainOuterClass.java",
    "content": "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n// NO CHECKED-IN PROTOBUF GENCODE\n// source: blockchain.proto\n// Protobuf Java Version: 4.33.2\n\npackage pactus;\n\n@com.google.protobuf.Generated\npublic final class BlockchainOuterClass extends com.google.protobuf.GeneratedFile {\n  private BlockchainOuterClass() {}\n  static {\n    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n      /* major= */ 4,\n      /* minor= */ 33,\n      /* patch= */ 2,\n      /* suffix= */ \"\",\n      \"BlockchainOuterClass\");\n  }\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistryLite registry) {\n  }\n\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistry registry) {\n    registerAllExtensions(\n        (com.google.protobuf.ExtensionRegistryLite) registry);\n  }\n  /**\n   * <pre>\n   * Enumeration for verbosity levels when requesting block information.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.BlockVerbosity}\n   */\n  public enum BlockVerbosity\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Request only block data.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_DATA = 0;</code>\n     */\n    BLOCK_VERBOSITY_DATA(0),\n    /**\n     * <pre>\n     * Request block information and transaction IDs.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_INFO = 1;</code>\n     */\n    BLOCK_VERBOSITY_INFO(1),\n    /**\n     * <pre>\n     * Request block information and detailed transaction data.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_TRANSACTIONS = 2;</code>\n     */\n    BLOCK_VERBOSITY_TRANSACTIONS(2),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"BlockVerbosity\");\n    }\n    /**\n     * <pre>\n     * Request only block data.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_DATA = 0;</code>\n     */\n    public static final int BLOCK_VERBOSITY_DATA_VALUE = 0;\n    /**\n     * <pre>\n     * Request block information and transaction IDs.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_INFO = 1;</code>\n     */\n    public static final int BLOCK_VERBOSITY_INFO_VALUE = 1;\n    /**\n     * <pre>\n     * Request block information and detailed transaction data.\n     * </pre>\n     *\n     * <code>BLOCK_VERBOSITY_TRANSACTIONS = 2;</code>\n     */\n    public static final int BLOCK_VERBOSITY_TRANSACTIONS_VALUE = 2;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static BlockVerbosity valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static BlockVerbosity forNumber(int value) {\n      switch (value) {\n        case 0: return BLOCK_VERBOSITY_DATA;\n        case 1: return BLOCK_VERBOSITY_INFO;\n        case 2: return BLOCK_VERBOSITY_TRANSACTIONS;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<BlockVerbosity>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        BlockVerbosity> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<BlockVerbosity>() {\n            public BlockVerbosity findValueByNumber(int number) {\n              return BlockVerbosity.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.getDescriptor().getEnumTypes().get(0);\n    }\n\n    private static final BlockVerbosity[] VALUES = values();\n\n    public static BlockVerbosity valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private BlockVerbosity(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.BlockVerbosity)\n  }\n\n  /**\n   * <pre>\n   * Enumeration for types of votes.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.VoteType}\n   */\n  public enum VoteType\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Unspecified vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_UNSPECIFIED = 0;</code>\n     */\n    VOTE_TYPE_UNSPECIFIED(0),\n    /**\n     * <pre>\n     * Prepare vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_PREPARE = 1;</code>\n     */\n    VOTE_TYPE_PREPARE(1),\n    /**\n     * <pre>\n     * Precommit vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_PRECOMMIT = 2;</code>\n     */\n    VOTE_TYPE_PRECOMMIT(2),\n    /**\n     * <pre>\n     * Change-proposer:pre-vote vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_PRE_VOTE = 3;</code>\n     */\n    VOTE_TYPE_CP_PRE_VOTE(3),\n    /**\n     * <pre>\n     * Change-proposer:main-vote vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_MAIN_VOTE = 4;</code>\n     */\n    VOTE_TYPE_CP_MAIN_VOTE(4),\n    /**\n     * <pre>\n     * Change-proposer:decided vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_DECIDED = 5;</code>\n     */\n    VOTE_TYPE_CP_DECIDED(5),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"VoteType\");\n    }\n    /**\n     * <pre>\n     * Unspecified vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_UNSPECIFIED = 0;</code>\n     */\n    public static final int VOTE_TYPE_UNSPECIFIED_VALUE = 0;\n    /**\n     * <pre>\n     * Prepare vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_PREPARE = 1;</code>\n     */\n    public static final int VOTE_TYPE_PREPARE_VALUE = 1;\n    /**\n     * <pre>\n     * Precommit vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_PRECOMMIT = 2;</code>\n     */\n    public static final int VOTE_TYPE_PRECOMMIT_VALUE = 2;\n    /**\n     * <pre>\n     * Change-proposer:pre-vote vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_PRE_VOTE = 3;</code>\n     */\n    public static final int VOTE_TYPE_CP_PRE_VOTE_VALUE = 3;\n    /**\n     * <pre>\n     * Change-proposer:main-vote vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_MAIN_VOTE = 4;</code>\n     */\n    public static final int VOTE_TYPE_CP_MAIN_VOTE_VALUE = 4;\n    /**\n     * <pre>\n     * Change-proposer:decided vote type.\n     * </pre>\n     *\n     * <code>VOTE_TYPE_CP_DECIDED = 5;</code>\n     */\n    public static final int VOTE_TYPE_CP_DECIDED_VALUE = 5;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static VoteType valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static VoteType forNumber(int value) {\n      switch (value) {\n        case 0: return VOTE_TYPE_UNSPECIFIED;\n        case 1: return VOTE_TYPE_PREPARE;\n        case 2: return VOTE_TYPE_PRECOMMIT;\n        case 3: return VOTE_TYPE_CP_PRE_VOTE;\n        case 4: return VOTE_TYPE_CP_MAIN_VOTE;\n        case 5: return VOTE_TYPE_CP_DECIDED;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<VoteType>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        VoteType> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<VoteType>() {\n            public VoteType findValueByNumber(int number) {\n              return VoteType.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.getDescriptor().getEnumTypes().get(1);\n    }\n\n    private static final VoteType[] VALUES = values();\n\n    public static VoteType valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private VoteType(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.VoteType)\n  }\n\n  public interface GetAccountRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetAccountRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address of the account to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the account to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving account information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetAccountRequest}\n   */\n  public static final class GetAccountRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetAccountRequest)\n      GetAccountRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetAccountRequest\");\n    }\n    // Use GetAccountRequest.newBuilder() to construct.\n    private GetAccountRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetAccountRequest() {\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetAccountRequest.class, pactus.BlockchainOuterClass.GetAccountRequest.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the account to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the account to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetAccountRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetAccountRequest other = (pactus.BlockchainOuterClass.GetAccountRequest) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetAccountRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving account information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetAccountRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetAccountRequest)\n        pactus.BlockchainOuterClass.GetAccountRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetAccountRequest.class, pactus.BlockchainOuterClass.GetAccountRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetAccountRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetAccountRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountRequest build() {\n        pactus.BlockchainOuterClass.GetAccountRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetAccountRequest result = new pactus.BlockchainOuterClass.GetAccountRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetAccountRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetAccountRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetAccountRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetAccountRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetAccountRequest.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the account to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetAccountRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetAccountRequest)\n    private static final pactus.BlockchainOuterClass.GetAccountRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetAccountRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetAccountRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetAccountRequest>() {\n      @java.lang.Override\n      public GetAccountRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetAccountRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetAccountRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetAccountResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetAccountResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     * @return Whether the account field is set.\n     */\n    boolean hasAccount();\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     * @return The account.\n     */\n    pactus.BlockchainOuterClass.AccountInfo getAccount();\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     */\n    pactus.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains account information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetAccountResponse}\n   */\n  public static final class GetAccountResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetAccountResponse)\n      GetAccountResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetAccountResponse\");\n    }\n    // Use GetAccountResponse.newBuilder() to construct.\n    private GetAccountResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetAccountResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetAccountResponse.class, pactus.BlockchainOuterClass.GetAccountResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int ACCOUNT_FIELD_NUMBER = 1;\n    private pactus.BlockchainOuterClass.AccountInfo account_;\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     * @return Whether the account field is set.\n     */\n    @java.lang.Override\n    public boolean hasAccount() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     * @return The account.\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.AccountInfo getAccount() {\n      return account_ == null ? pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_;\n    }\n    /**\n     * <pre>\n     * Detailed information about the account.\n     * </pre>\n     *\n     * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() {\n      return account_ == null ? pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(1, getAccount());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, getAccount());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetAccountResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetAccountResponse other = (pactus.BlockchainOuterClass.GetAccountResponse) obj;\n\n      if (hasAccount() != other.hasAccount()) return false;\n      if (hasAccount()) {\n        if (!getAccount()\n            .equals(other.getAccount())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (hasAccount()) {\n        hash = (37 * hash) + ACCOUNT_FIELD_NUMBER;\n        hash = (53 * hash) + getAccount().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetAccountResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetAccountResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains account information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetAccountResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetAccountResponse)\n        pactus.BlockchainOuterClass.GetAccountResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetAccountResponse.class, pactus.BlockchainOuterClass.GetAccountResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetAccountResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetAccountFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        account_ = null;\n        if (accountBuilder_ != null) {\n          accountBuilder_.dispose();\n          accountBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetAccountResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountResponse build() {\n        pactus.BlockchainOuterClass.GetAccountResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetAccountResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetAccountResponse result = new pactus.BlockchainOuterClass.GetAccountResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetAccountResponse result) {\n        int from_bitField0_ = bitField0_;\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.account_ = accountBuilder_ == null\n              ? account_\n              : accountBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetAccountResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetAccountResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetAccountResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetAccountResponse.getDefaultInstance()) return this;\n        if (other.hasAccount()) {\n          mergeAccount(other.getAccount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                input.readMessage(\n                    internalGetAccountFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private pactus.BlockchainOuterClass.AccountInfo account_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.AccountInfo, pactus.BlockchainOuterClass.AccountInfo.Builder, pactus.BlockchainOuterClass.AccountInfoOrBuilder> accountBuilder_;\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       * @return Whether the account field is set.\n       */\n      public boolean hasAccount() {\n        return ((bitField0_ & 0x00000001) != 0);\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       * @return The account.\n       */\n      public pactus.BlockchainOuterClass.AccountInfo getAccount() {\n        if (accountBuilder_ == null) {\n          return account_ == null ? pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_;\n        } else {\n          return accountBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public Builder setAccount(pactus.BlockchainOuterClass.AccountInfo value) {\n        if (accountBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          account_ = value;\n        } else {\n          accountBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public Builder setAccount(\n          pactus.BlockchainOuterClass.AccountInfo.Builder builderForValue) {\n        if (accountBuilder_ == null) {\n          account_ = builderForValue.build();\n        } else {\n          accountBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public Builder mergeAccount(pactus.BlockchainOuterClass.AccountInfo value) {\n        if (accountBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0) &&\n            account_ != null &&\n            account_ != pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance()) {\n            getAccountBuilder().mergeFrom(value);\n          } else {\n            account_ = value;\n          }\n        } else {\n          accountBuilder_.mergeFrom(value);\n        }\n        if (account_ != null) {\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public Builder clearAccount() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        account_ = null;\n        if (accountBuilder_ != null) {\n          accountBuilder_.dispose();\n          accountBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public pactus.BlockchainOuterClass.AccountInfo.Builder getAccountBuilder() {\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return internalGetAccountFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      public pactus.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() {\n        if (accountBuilder_ != null) {\n          return accountBuilder_.getMessageOrBuilder();\n        } else {\n          return account_ == null ?\n              pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_;\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the account.\n       * </pre>\n       *\n       * <code>.pactus.AccountInfo account = 1 [json_name = \"account\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.AccountInfo, pactus.BlockchainOuterClass.AccountInfo.Builder, pactus.BlockchainOuterClass.AccountInfoOrBuilder> \n          internalGetAccountFieldBuilder() {\n        if (accountBuilder_ == null) {\n          accountBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.BlockchainOuterClass.AccountInfo, pactus.BlockchainOuterClass.AccountInfo.Builder, pactus.BlockchainOuterClass.AccountInfoOrBuilder>(\n                  getAccount(),\n                  getParentForChildren(),\n                  isClean());\n          account_ = null;\n        }\n        return accountBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetAccountResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetAccountResponse)\n    private static final pactus.BlockchainOuterClass.GetAccountResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetAccountResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetAccountResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetAccountResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetAccountResponse>() {\n      @java.lang.Override\n      public GetAccountResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetAccountResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetAccountResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorAddressesRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving validator addresses.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorAddressesRequest}\n   */\n  public static final class GetValidatorAddressesRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesRequest)\n      GetValidatorAddressesRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorAddressesRequest\");\n    }\n    // Use GetValidatorAddressesRequest.newBuilder() to construct.\n    private GetValidatorAddressesRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorAddressesRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetValidatorAddressesRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetValidatorAddressesRequest other = (pactus.BlockchainOuterClass.GetValidatorAddressesRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetValidatorAddressesRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving validator addresses.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorAddressesRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesRequest)\n        pactus.BlockchainOuterClass.GetValidatorAddressesRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetValidatorAddressesRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesRequest build() {\n        pactus.BlockchainOuterClass.GetValidatorAddressesRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetValidatorAddressesRequest result = new pactus.BlockchainOuterClass.GetValidatorAddressesRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetValidatorAddressesRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetValidatorAddressesRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetValidatorAddressesRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesRequest)\n    private static final pactus.BlockchainOuterClass.GetValidatorAddressesRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetValidatorAddressesRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorAddressesRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorAddressesRequest>() {\n      @java.lang.Override\n      public GetValidatorAddressesRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorAddressesRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorAddressesRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorAddressesResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @return A list containing the addresses.\n     */\n    java.util.List<java.lang.String>\n        getAddressesList();\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @return The count of addresses.\n     */\n    int getAddressesCount();\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @param index The index of the element to return.\n     * @return The addresses at the given index.\n     */\n    java.lang.String getAddresses(int index);\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the addresses at the given index.\n     */\n    com.google.protobuf.ByteString\n        getAddressesBytes(int index);\n  }\n  /**\n   * <pre>\n   * Response message contains list of validator addresses.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorAddressesResponse}\n   */\n  public static final class GetValidatorAddressesResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesResponse)\n      GetValidatorAddressesResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorAddressesResponse\");\n    }\n    // Use GetValidatorAddressesResponse.newBuilder() to construct.\n    private GetValidatorAddressesResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorAddressesResponse() {\n      addresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class);\n    }\n\n    public static final int ADDRESSES_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList addresses_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @return A list containing the addresses.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getAddressesList() {\n      return addresses_;\n    }\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @return The count of addresses.\n     */\n    public int getAddressesCount() {\n      return addresses_.size();\n    }\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @param index The index of the element to return.\n     * @return The addresses at the given index.\n     */\n    public java.lang.String getAddresses(int index) {\n      return addresses_.get(index);\n    }\n    /**\n     * <pre>\n     * List of validator addresses.\n     * </pre>\n     *\n     * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the addresses at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getAddressesBytes(int index) {\n      return addresses_.getByteString(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < addresses_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, addresses_.getRaw(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      {\n        int dataSize = 0;\n        for (int i = 0; i < addresses_.size(); i++) {\n          dataSize += computeStringSizeNoTag(addresses_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getAddressesList().size();\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetValidatorAddressesResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetValidatorAddressesResponse other = (pactus.BlockchainOuterClass.GetValidatorAddressesResponse) obj;\n\n      if (!getAddressesList()\n          .equals(other.getAddressesList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getAddressesCount() > 0) {\n        hash = (37 * hash) + ADDRESSES_FIELD_NUMBER;\n        hash = (53 * hash) + getAddressesList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetValidatorAddressesResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains list of validator addresses.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorAddressesResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesResponse)\n        pactus.BlockchainOuterClass.GetValidatorAddressesResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetValidatorAddressesResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        addresses_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesResponse build() {\n        pactus.BlockchainOuterClass.GetValidatorAddressesResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorAddressesResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetValidatorAddressesResponse result = new pactus.BlockchainOuterClass.GetValidatorAddressesResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetValidatorAddressesResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          addresses_.makeImmutable();\n          result.addresses_ = addresses_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetValidatorAddressesResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetValidatorAddressesResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetValidatorAddressesResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance()) return this;\n        if (!other.addresses_.isEmpty()) {\n          if (addresses_.isEmpty()) {\n            addresses_ = other.addresses_;\n            bitField0_ |= 0x00000001;\n          } else {\n            ensureAddressesIsMutable();\n            addresses_.addAll(other.addresses_);\n          }\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureAddressesIsMutable();\n                addresses_.add(s);\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private com.google.protobuf.LazyStringArrayList addresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureAddressesIsMutable() {\n        if (!addresses_.isModifiable()) {\n          addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_);\n        }\n        bitField0_ |= 0x00000001;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @return A list containing the addresses.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getAddressesList() {\n        addresses_.makeImmutable();\n        return addresses_;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @return The count of addresses.\n       */\n      public int getAddressesCount() {\n        return addresses_.size();\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param index The index of the element to return.\n       * @return The addresses at the given index.\n       */\n      public java.lang.String getAddresses(int index) {\n        return addresses_.get(index);\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the addresses at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getAddressesBytes(int index) {\n        return addresses_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param index The index to set the value at.\n       * @param value The addresses to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddresses(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureAddressesIsMutable();\n        addresses_.set(index, value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param value The addresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAddresses(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureAddressesIsMutable();\n        addresses_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param values The addresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllAddresses(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureAddressesIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, addresses_);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddresses() {\n        addresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000001);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of validator addresses.\n       * </pre>\n       *\n       * <code>repeated string addresses = 1 [json_name = \"addresses\"];</code>\n       * @param value The bytes of the addresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAddressesBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureAddressesIsMutable();\n        addresses_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesResponse)\n    private static final pactus.BlockchainOuterClass.GetValidatorAddressesResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetValidatorAddressesResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorAddressesResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorAddressesResponse>() {\n      @java.lang.Override\n      public GetValidatorAddressesResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorAddressesResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorAddressesResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving validator information by address.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorRequest}\n   */\n  public static final class GetValidatorRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorRequest)\n      GetValidatorRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorRequest\");\n    }\n    // Use GetValidatorRequest.newBuilder() to construct.\n    private GetValidatorRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorRequest() {\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetValidatorRequest.class, pactus.BlockchainOuterClass.GetValidatorRequest.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetValidatorRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetValidatorRequest other = (pactus.BlockchainOuterClass.GetValidatorRequest) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetValidatorRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving validator information by address.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorRequest)\n        pactus.BlockchainOuterClass.GetValidatorRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetValidatorRequest.class, pactus.BlockchainOuterClass.GetValidatorRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetValidatorRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorRequest build() {\n        pactus.BlockchainOuterClass.GetValidatorRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetValidatorRequest result = new pactus.BlockchainOuterClass.GetValidatorRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetValidatorRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetValidatorRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetValidatorRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetValidatorRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorRequest)\n    private static final pactus.BlockchainOuterClass.GetValidatorRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetValidatorRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorRequest>() {\n      @java.lang.Override\n      public GetValidatorRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorByNumberRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorByNumberRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The unique number of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>int32 number = 1 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    int getNumber();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving validator information by number.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorByNumberRequest}\n   */\n  public static final class GetValidatorByNumberRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorByNumberRequest)\n      GetValidatorByNumberRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorByNumberRequest\");\n    }\n    // Use GetValidatorByNumberRequest.newBuilder() to construct.\n    private GetValidatorByNumberRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorByNumberRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class);\n    }\n\n    public static final int NUMBER_FIELD_NUMBER = 1;\n    private int number_ = 0;\n    /**\n     * <pre>\n     * The unique number of the validator to retrieve information for.\n     * </pre>\n     *\n     * <code>int32 number = 1 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    @java.lang.Override\n    public int getNumber() {\n      return number_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (number_ != 0) {\n        output.writeInt32(1, number_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (number_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(1, number_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetValidatorByNumberRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetValidatorByNumberRequest other = (pactus.BlockchainOuterClass.GetValidatorByNumberRequest) obj;\n\n      if (getNumber()\n          != other.getNumber()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + NUMBER_FIELD_NUMBER;\n      hash = (53 * hash) + getNumber();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetValidatorByNumberRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving validator information by number.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorByNumberRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorByNumberRequest)\n        pactus.BlockchainOuterClass.GetValidatorByNumberRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetValidatorByNumberRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        number_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorByNumberRequest build() {\n        pactus.BlockchainOuterClass.GetValidatorByNumberRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorByNumberRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetValidatorByNumberRequest result = new pactus.BlockchainOuterClass.GetValidatorByNumberRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetValidatorByNumberRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.number_ = number_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetValidatorByNumberRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetValidatorByNumberRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetValidatorByNumberRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance()) return this;\n        if (other.getNumber() != 0) {\n          setNumber(other.getNumber());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                number_ = input.readInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int number_ ;\n      /**\n       * <pre>\n       * The unique number of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>int32 number = 1 [json_name = \"number\"];</code>\n       * @return The number.\n       */\n      @java.lang.Override\n      public int getNumber() {\n        return number_;\n      }\n      /**\n       * <pre>\n       * The unique number of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>int32 number = 1 [json_name = \"number\"];</code>\n       * @param value The number to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNumber(int value) {\n\n        number_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique number of the validator to retrieve information for.\n       * </pre>\n       *\n       * <code>int32 number = 1 [json_name = \"number\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNumber() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        number_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorByNumberRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorByNumberRequest)\n    private static final pactus.BlockchainOuterClass.GetValidatorByNumberRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetValidatorByNumberRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorByNumberRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorByNumberRequest>() {\n      @java.lang.Override\n      public GetValidatorByNumberRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorByNumberRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorByNumberRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     * @return Whether the validator field is set.\n     */\n    boolean hasValidator();\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     * @return The validator.\n     */\n    pactus.BlockchainOuterClass.ValidatorInfo getValidator();\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     */\n    pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains validator information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorResponse}\n   */\n  public static final class GetValidatorResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorResponse)\n      GetValidatorResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorResponse\");\n    }\n    // Use GetValidatorResponse.newBuilder() to construct.\n    private GetValidatorResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetValidatorResponse.class, pactus.BlockchainOuterClass.GetValidatorResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int VALIDATOR_FIELD_NUMBER = 1;\n    private pactus.BlockchainOuterClass.ValidatorInfo validator_;\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     * @return Whether the validator field is set.\n     */\n    @java.lang.Override\n    public boolean hasValidator() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     * @return The validator.\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ValidatorInfo getValidator() {\n      return validator_ == null ? pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_;\n    }\n    /**\n     * <pre>\n     * Detailed information about the validator.\n     * </pre>\n     *\n     * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() {\n      return validator_ == null ? pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(1, getValidator());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, getValidator());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetValidatorResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetValidatorResponse other = (pactus.BlockchainOuterClass.GetValidatorResponse) obj;\n\n      if (hasValidator() != other.hasValidator()) return false;\n      if (hasValidator()) {\n        if (!getValidator()\n            .equals(other.getValidator())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (hasValidator()) {\n        hash = (37 * hash) + VALIDATOR_FIELD_NUMBER;\n        hash = (53 * hash) + getValidator().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetValidatorResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetValidatorResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains validator information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorResponse)\n        pactus.BlockchainOuterClass.GetValidatorResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetValidatorResponse.class, pactus.BlockchainOuterClass.GetValidatorResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetValidatorResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetValidatorFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        validator_ = null;\n        if (validatorBuilder_ != null) {\n          validatorBuilder_.dispose();\n          validatorBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorResponse build() {\n        pactus.BlockchainOuterClass.GetValidatorResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetValidatorResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetValidatorResponse result = new pactus.BlockchainOuterClass.GetValidatorResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetValidatorResponse result) {\n        int from_bitField0_ = bitField0_;\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.validator_ = validatorBuilder_ == null\n              ? validator_\n              : validatorBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetValidatorResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetValidatorResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetValidatorResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance()) return this;\n        if (other.hasValidator()) {\n          mergeValidator(other.getValidator());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                input.readMessage(\n                    internalGetValidatorFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private pactus.BlockchainOuterClass.ValidatorInfo validator_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> validatorBuilder_;\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       * @return Whether the validator field is set.\n       */\n      public boolean hasValidator() {\n        return ((bitField0_ & 0x00000001) != 0);\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       * @return The validator.\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo getValidator() {\n        if (validatorBuilder_ == null) {\n          return validator_ == null ? pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_;\n        } else {\n          return validatorBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public Builder setValidator(pactus.BlockchainOuterClass.ValidatorInfo value) {\n        if (validatorBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          validator_ = value;\n        } else {\n          validatorBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public Builder setValidator(\n          pactus.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) {\n        if (validatorBuilder_ == null) {\n          validator_ = builderForValue.build();\n        } else {\n          validatorBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public Builder mergeValidator(pactus.BlockchainOuterClass.ValidatorInfo value) {\n        if (validatorBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0) &&\n            validator_ != null &&\n            validator_ != pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()) {\n            getValidatorBuilder().mergeFrom(value);\n          } else {\n            validator_ = value;\n          }\n        } else {\n          validatorBuilder_.mergeFrom(value);\n        }\n        if (validator_ != null) {\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public Builder clearValidator() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        validator_ = null;\n        if (validatorBuilder_ != null) {\n          validatorBuilder_.dispose();\n          validatorBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo.Builder getValidatorBuilder() {\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return internalGetValidatorFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() {\n        if (validatorBuilder_ != null) {\n          return validatorBuilder_.getMessageOrBuilder();\n        } else {\n          return validator_ == null ?\n              pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_;\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the validator.\n       * </pre>\n       *\n       * <code>.pactus.ValidatorInfo validator = 1 [json_name = \"validator\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> \n          internalGetValidatorFieldBuilder() {\n        if (validatorBuilder_ == null) {\n          validatorBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder>(\n                  getValidator(),\n                  getParentForChildren(),\n                  isClean());\n          validator_ = null;\n        }\n        return validatorBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorResponse)\n    private static final pactus.BlockchainOuterClass.GetValidatorResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetValidatorResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetValidatorResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorResponse>() {\n      @java.lang.Override\n      public GetValidatorResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetPublicKeyRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address for which to retrieve the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address for which to retrieve the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving public key by address.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetPublicKeyRequest}\n   */\n  public static final class GetPublicKeyRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyRequest)\n      GetPublicKeyRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetPublicKeyRequest\");\n    }\n    // Use GetPublicKeyRequest.newBuilder() to construct.\n    private GetPublicKeyRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetPublicKeyRequest() {\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.BlockchainOuterClass.GetPublicKeyRequest.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address for which to retrieve the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address for which to retrieve the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetPublicKeyRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetPublicKeyRequest other = (pactus.BlockchainOuterClass.GetPublicKeyRequest) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetPublicKeyRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving public key by address.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetPublicKeyRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyRequest)\n        pactus.BlockchainOuterClass.GetPublicKeyRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.BlockchainOuterClass.GetPublicKeyRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetPublicKeyRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyRequest build() {\n        pactus.BlockchainOuterClass.GetPublicKeyRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetPublicKeyRequest result = new pactus.BlockchainOuterClass.GetPublicKeyRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetPublicKeyRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetPublicKeyRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetPublicKeyRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetPublicKeyRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address for which to retrieve the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address for which to retrieve the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address for which to retrieve the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address for which to retrieve the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address for which to retrieve the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyRequest)\n    private static final pactus.BlockchainOuterClass.GetPublicKeyRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetPublicKeyRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetPublicKeyRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetPublicKeyRequest>() {\n      @java.lang.Override\n      public GetPublicKeyRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetPublicKeyRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetPublicKeyRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetPublicKeyResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The public key associated with the provided address.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key associated with the provided address.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains public key information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetPublicKeyResponse}\n   */\n  public static final class GetPublicKeyResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyResponse)\n      GetPublicKeyResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetPublicKeyResponse\");\n    }\n    // Use GetPublicKeyResponse.newBuilder() to construct.\n    private GetPublicKeyResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetPublicKeyResponse() {\n      publicKey_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.BlockchainOuterClass.GetPublicKeyResponse.Builder.class);\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key associated with the provided address.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key associated with the provided address.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, publicKey_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, publicKey_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetPublicKeyResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetPublicKeyResponse other = (pactus.BlockchainOuterClass.GetPublicKeyResponse) obj;\n\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetPublicKeyResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains public key information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetPublicKeyResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyResponse)\n        pactus.BlockchainOuterClass.GetPublicKeyResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.BlockchainOuterClass.GetPublicKeyResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetPublicKeyResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        publicKey_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyResponse build() {\n        pactus.BlockchainOuterClass.GetPublicKeyResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetPublicKeyResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetPublicKeyResponse result = new pactus.BlockchainOuterClass.GetPublicKeyResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetPublicKeyResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetPublicKeyResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetPublicKeyResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetPublicKeyResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance()) return this;\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key associated with the provided address.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the provided address.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the provided address.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the provided address.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the provided address.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyResponse)\n    private static final pactus.BlockchainOuterClass.GetPublicKeyResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetPublicKeyResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetPublicKeyResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetPublicKeyResponse>() {\n      @java.lang.Override\n      public GetPublicKeyResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetPublicKeyResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetPublicKeyResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the block to retrieve.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n\n    /**\n     * <pre>\n     * The verbosity level for block information.\n     * </pre>\n     *\n     * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The enum numeric value on the wire for verbosity.\n     */\n    int getVerbosityValue();\n    /**\n     * <pre>\n     * The verbosity level for block information.\n     * </pre>\n     *\n     * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The verbosity.\n     */\n    pactus.BlockchainOuterClass.BlockVerbosity getVerbosity();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving block information based on height and verbosity level.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockRequest}\n   */\n  public static final class GetBlockRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockRequest)\n      GetBlockRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockRequest\");\n    }\n    // Use GetBlockRequest.newBuilder() to construct.\n    private GetBlockRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockRequest() {\n      verbosity_ = 0;\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockRequest.class, pactus.BlockchainOuterClass.GetBlockRequest.Builder.class);\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 1;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the block to retrieve.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    public static final int VERBOSITY_FIELD_NUMBER = 2;\n    private int verbosity_ = 0;\n    /**\n     * <pre>\n     * The verbosity level for block information.\n     * </pre>\n     *\n     * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The enum numeric value on the wire for verbosity.\n     */\n    @java.lang.Override public int getVerbosityValue() {\n      return verbosity_;\n    }\n    /**\n     * <pre>\n     * The verbosity level for block information.\n     * </pre>\n     *\n     * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The verbosity.\n     */\n    @java.lang.Override public pactus.BlockchainOuterClass.BlockVerbosity getVerbosity() {\n      pactus.BlockchainOuterClass.BlockVerbosity result = pactus.BlockchainOuterClass.BlockVerbosity.forNumber(verbosity_);\n      return result == null ? pactus.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (height_ != 0) {\n        output.writeUInt32(1, height_);\n      }\n      if (verbosity_ != pactus.BlockchainOuterClass.BlockVerbosity.BLOCK_VERBOSITY_DATA.getNumber()) {\n        output.writeEnum(2, verbosity_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, height_);\n      }\n      if (verbosity_ != pactus.BlockchainOuterClass.BlockVerbosity.BLOCK_VERBOSITY_DATA.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(2, verbosity_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockRequest other = (pactus.BlockchainOuterClass.GetBlockRequest) obj;\n\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (verbosity_ != other.verbosity_) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (37 * hash) + VERBOSITY_FIELD_NUMBER;\n      hash = (53 * hash) + verbosity_;\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving block information based on height and verbosity level.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockRequest)\n        pactus.BlockchainOuterClass.GetBlockRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockRequest.class, pactus.BlockchainOuterClass.GetBlockRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        height_ = 0;\n        verbosity_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockRequest build() {\n        pactus.BlockchainOuterClass.GetBlockRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockRequest result = new pactus.BlockchainOuterClass.GetBlockRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.height_ = height_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.verbosity_ = verbosity_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockRequest.getDefaultInstance()) return this;\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        if (other.verbosity_ != 0) {\n          setVerbosityValue(other.getVerbosityValue());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                verbosity_ = input.readEnum();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the block to retrieve.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the block to retrieve.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the block to retrieve.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int verbosity_ = 0;\n      /**\n       * <pre>\n       * The verbosity level for block information.\n       * </pre>\n       *\n       * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return The enum numeric value on the wire for verbosity.\n       */\n      @java.lang.Override public int getVerbosityValue() {\n        return verbosity_;\n      }\n      /**\n       * <pre>\n       * The verbosity level for block information.\n       * </pre>\n       *\n       * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @param value The enum numeric value on the wire for verbosity to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVerbosityValue(int value) {\n        verbosity_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The verbosity level for block information.\n       * </pre>\n       *\n       * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return The verbosity.\n       */\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.BlockVerbosity getVerbosity() {\n        pactus.BlockchainOuterClass.BlockVerbosity result = pactus.BlockchainOuterClass.BlockVerbosity.forNumber(verbosity_);\n        return result == null ? pactus.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The verbosity level for block information.\n       * </pre>\n       *\n       * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @param value The verbosity to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVerbosity(pactus.BlockchainOuterClass.BlockVerbosity value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000002;\n        verbosity_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The verbosity level for block information.\n       * </pre>\n       *\n       * <code>.pactus.BlockVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVerbosity() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        verbosity_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockRequest)\n    private static final pactus.BlockchainOuterClass.GetBlockRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockRequest>() {\n      @java.lang.Override\n      public GetBlockRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the block.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 2 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 2 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n\n    /**\n     * <pre>\n     * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n     * </pre>\n     *\n     * <code>string data = 3 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    java.lang.String getData();\n    /**\n     * <pre>\n     * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n     * </pre>\n     *\n     * <code>string data = 3 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    com.google.protobuf.ByteString\n        getDataBytes();\n\n    /**\n     * <pre>\n     * The timestamp of the block.\n     * </pre>\n     *\n     * <code>uint32 block_time = 4 [json_name = \"blockTime\"];</code>\n     * @return The blockTime.\n     */\n    int getBlockTime();\n\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     * @return Whether the header field is set.\n     */\n    boolean hasHeader();\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     * @return The header.\n     */\n    pactus.BlockchainOuterClass.BlockHeaderInfo getHeader();\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     */\n    pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder();\n\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     * @return Whether the prevCert field is set.\n     */\n    boolean hasPrevCert();\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     * @return The prevCert.\n     */\n    pactus.BlockchainOuterClass.CertificateInfo getPrevCert();\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     */\n    pactus.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder();\n\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    java.util.List<pactus.TransactionOuterClass.TransactionInfo> \n        getTxsList();\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfo getTxs(int index);\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    int getTxsCount();\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n        getTxsOrBuilderList();\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message contains block information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockResponse}\n   */\n  public static final class GetBlockResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockResponse)\n      GetBlockResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockResponse\");\n    }\n    // Use GetBlockResponse.newBuilder() to construct.\n    private GetBlockResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockResponse() {\n      hash_ = \"\";\n      data_ = \"\";\n      txs_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockResponse.class, pactus.BlockchainOuterClass.GetBlockResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int HEIGHT_FIELD_NUMBER = 1;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the block.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    public static final int HASH_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 2 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 2 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DATA_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object data_ = \"\";\n    /**\n     * <pre>\n     * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n     * </pre>\n     *\n     * <code>string data = 3 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    @java.lang.Override\n    public java.lang.String getData() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        data_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n     * </pre>\n     *\n     * <code>string data = 3 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDataBytes() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        data_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int BLOCK_TIME_FIELD_NUMBER = 4;\n    private int blockTime_ = 0;\n    /**\n     * <pre>\n     * The timestamp of the block.\n     * </pre>\n     *\n     * <code>uint32 block_time = 4 [json_name = \"blockTime\"];</code>\n     * @return The blockTime.\n     */\n    @java.lang.Override\n    public int getBlockTime() {\n      return blockTime_;\n    }\n\n    public static final int HEADER_FIELD_NUMBER = 5;\n    private pactus.BlockchainOuterClass.BlockHeaderInfo header_;\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     * @return Whether the header field is set.\n     */\n    @java.lang.Override\n    public boolean hasHeader() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     * @return The header.\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.BlockHeaderInfo getHeader() {\n      return header_ == null ? pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_;\n    }\n    /**\n     * <pre>\n     * Header information of the block.\n     * </pre>\n     *\n     * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() {\n      return header_ == null ? pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_;\n    }\n\n    public static final int PREV_CERT_FIELD_NUMBER = 6;\n    private pactus.BlockchainOuterClass.CertificateInfo prevCert_;\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     * @return Whether the prevCert field is set.\n     */\n    @java.lang.Override\n    public boolean hasPrevCert() {\n      return ((bitField0_ & 0x00000002) != 0);\n    }\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     * @return The prevCert.\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.CertificateInfo getPrevCert() {\n      return prevCert_ == null ? pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_;\n    }\n    /**\n     * <pre>\n     * Certificate information of the previous block.\n     * </pre>\n     *\n     * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() {\n      return prevCert_ == null ? pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_;\n    }\n\n    public static final int TXS_FIELD_NUMBER = 7;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.TransactionOuterClass.TransactionInfo> txs_;\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.TransactionOuterClass.TransactionInfo> getTxsList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n        getTxsOrBuilderList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public int getTxsCount() {\n      return txs_.size();\n    }\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfo getTxs(int index) {\n      return txs_.get(index);\n    }\n    /**\n     * <pre>\n     * List of transactions in the block, available when verbosity level is set to\n     * BLOCK_VERBOSITY_TRANSACTIONS.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n        int index) {\n      return txs_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (height_ != 0) {\n        output.writeUInt32(1, height_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, data_);\n      }\n      if (blockTime_ != 0) {\n        output.writeUInt32(4, blockTime_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(5, getHeader());\n      }\n      if (((bitField0_ & 0x00000002) != 0)) {\n        output.writeMessage(6, getPrevCert());\n      }\n      for (int i = 0; i < txs_.size(); i++) {\n        output.writeMessage(7, txs_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, height_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, data_);\n      }\n      if (blockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(4, blockTime_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(5, getHeader());\n      }\n      if (((bitField0_ & 0x00000002) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(6, getPrevCert());\n      }\n      for (int i = 0; i < txs_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(7, txs_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockResponse other = (pactus.BlockchainOuterClass.GetBlockResponse) obj;\n\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (!getData()\n          .equals(other.getData())) return false;\n      if (getBlockTime()\n          != other.getBlockTime()) return false;\n      if (hasHeader() != other.hasHeader()) return false;\n      if (hasHeader()) {\n        if (!getHeader()\n            .equals(other.getHeader())) return false;\n      }\n      if (hasPrevCert() != other.hasPrevCert()) return false;\n      if (hasPrevCert()) {\n        if (!getPrevCert()\n            .equals(other.getPrevCert())) return false;\n      }\n      if (!getTxsList()\n          .equals(other.getTxsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (37 * hash) + DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getData().hashCode();\n      hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockTime();\n      if (hasHeader()) {\n        hash = (37 * hash) + HEADER_FIELD_NUMBER;\n        hash = (53 * hash) + getHeader().hashCode();\n      }\n      if (hasPrevCert()) {\n        hash = (37 * hash) + PREV_CERT_FIELD_NUMBER;\n        hash = (53 * hash) + getPrevCert().hashCode();\n      }\n      if (getTxsCount() > 0) {\n        hash = (37 * hash) + TXS_FIELD_NUMBER;\n        hash = (53 * hash) + getTxsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains block information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockResponse)\n        pactus.BlockchainOuterClass.GetBlockResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockResponse.class, pactus.BlockchainOuterClass.GetBlockResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetHeaderFieldBuilder();\n          internalGetPrevCertFieldBuilder();\n          internalGetTxsFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        height_ = 0;\n        hash_ = \"\";\n        data_ = \"\";\n        blockTime_ = 0;\n        header_ = null;\n        if (headerBuilder_ != null) {\n          headerBuilder_.dispose();\n          headerBuilder_ = null;\n        }\n        prevCert_ = null;\n        if (prevCertBuilder_ != null) {\n          prevCertBuilder_.dispose();\n          prevCertBuilder_ = null;\n        }\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n        } else {\n          txs_ = null;\n          txsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000040);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockResponse build() {\n        pactus.BlockchainOuterClass.GetBlockResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockResponse result = new pactus.BlockchainOuterClass.GetBlockResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.BlockchainOuterClass.GetBlockResponse result) {\n        if (txsBuilder_ == null) {\n          if (((bitField0_ & 0x00000040) != 0)) {\n            txs_ = java.util.Collections.unmodifiableList(txs_);\n            bitField0_ = (bitField0_ & ~0x00000040);\n          }\n          result.txs_ = txs_;\n        } else {\n          result.txs_ = txsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.height_ = height_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.hash_ = hash_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.data_ = data_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.blockTime_ = blockTime_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.header_ = headerBuilder_ == null\n              ? header_\n              : headerBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.prevCert_ = prevCertBuilder_ == null\n              ? prevCert_\n              : prevCertBuilder_.build();\n          to_bitField0_ |= 0x00000002;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockResponse.getDefaultInstance()) return this;\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getData().isEmpty()) {\n          data_ = other.data_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getBlockTime() != 0) {\n          setBlockTime(other.getBlockTime());\n        }\n        if (other.hasHeader()) {\n          mergeHeader(other.getHeader());\n        }\n        if (other.hasPrevCert()) {\n          mergePrevCert(other.getPrevCert());\n        }\n        if (txsBuilder_ == null) {\n          if (!other.txs_.isEmpty()) {\n            if (txs_.isEmpty()) {\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000040);\n            } else {\n              ensureTxsIsMutable();\n              txs_.addAll(other.txs_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.txs_.isEmpty()) {\n            if (txsBuilder_.isEmpty()) {\n              txsBuilder_.dispose();\n              txsBuilder_ = null;\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000040);\n              txsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetTxsFieldBuilder() : null;\n            } else {\n              txsBuilder_.addAllMessages(other.txs_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                data_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                blockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                input.readMessage(\n                    internalGetHeaderFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              case 50: {\n                input.readMessage(\n                    internalGetPrevCertFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 50\n              case 58: {\n                pactus.TransactionOuterClass.TransactionInfo m =\n                    input.readMessage(\n                        pactus.TransactionOuterClass.TransactionInfo.parser(),\n                        extensionRegistry);\n                if (txsBuilder_ == null) {\n                  ensureTxsIsMutable();\n                  txs_.add(m);\n                } else {\n                  txsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 58\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 2 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 2 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 2 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 2 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 2 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object data_ = \"\";\n      /**\n       * <pre>\n       * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n       * </pre>\n       *\n       * <code>string data = 3 [json_name = \"data\"];</code>\n       * @return The data.\n       */\n      public java.lang.String getData() {\n        java.lang.Object ref = data_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          data_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n       * </pre>\n       *\n       * <code>string data = 3 [json_name = \"data\"];</code>\n       * @return The bytes for data.\n       */\n      public com.google.protobuf.ByteString\n          getDataBytes() {\n        java.lang.Object ref = data_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          data_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n       * </pre>\n       *\n       * <code>string data = 3 [json_name = \"data\"];</code>\n       * @param value The data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setData(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        data_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n       * </pre>\n       *\n       * <code>string data = 3 [json_name = \"data\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearData() {\n        data_ = getDefaultInstance().getData();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n       * </pre>\n       *\n       * <code>string data = 3 [json_name = \"data\"];</code>\n       * @param value The bytes for data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDataBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        data_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private int blockTime_ ;\n      /**\n       * <pre>\n       * The timestamp of the block.\n       * </pre>\n       *\n       * <code>uint32 block_time = 4 [json_name = \"blockTime\"];</code>\n       * @return The blockTime.\n       */\n      @java.lang.Override\n      public int getBlockTime() {\n        return blockTime_;\n      }\n      /**\n       * <pre>\n       * The timestamp of the block.\n       * </pre>\n       *\n       * <code>uint32 block_time = 4 [json_name = \"blockTime\"];</code>\n       * @param value The blockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockTime(int value) {\n\n        blockTime_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The timestamp of the block.\n       * </pre>\n       *\n       * <code>uint32 block_time = 4 [json_name = \"blockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockTime() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        blockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private pactus.BlockchainOuterClass.BlockHeaderInfo header_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.BlockHeaderInfo, pactus.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder> headerBuilder_;\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       * @return Whether the header field is set.\n       */\n      public boolean hasHeader() {\n        return ((bitField0_ & 0x00000010) != 0);\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       * @return The header.\n       */\n      public pactus.BlockchainOuterClass.BlockHeaderInfo getHeader() {\n        if (headerBuilder_ == null) {\n          return header_ == null ? pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_;\n        } else {\n          return headerBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public Builder setHeader(pactus.BlockchainOuterClass.BlockHeaderInfo value) {\n        if (headerBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          header_ = value;\n        } else {\n          headerBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public Builder setHeader(\n          pactus.BlockchainOuterClass.BlockHeaderInfo.Builder builderForValue) {\n        if (headerBuilder_ == null) {\n          header_ = builderForValue.build();\n        } else {\n          headerBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public Builder mergeHeader(pactus.BlockchainOuterClass.BlockHeaderInfo value) {\n        if (headerBuilder_ == null) {\n          if (((bitField0_ & 0x00000010) != 0) &&\n            header_ != null &&\n            header_ != pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance()) {\n            getHeaderBuilder().mergeFrom(value);\n          } else {\n            header_ = value;\n          }\n        } else {\n          headerBuilder_.mergeFrom(value);\n        }\n        if (header_ != null) {\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public Builder clearHeader() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        header_ = null;\n        if (headerBuilder_ != null) {\n          headerBuilder_.dispose();\n          headerBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public pactus.BlockchainOuterClass.BlockHeaderInfo.Builder getHeaderBuilder() {\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return internalGetHeaderFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      public pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() {\n        if (headerBuilder_ != null) {\n          return headerBuilder_.getMessageOrBuilder();\n        } else {\n          return header_ == null ?\n              pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_;\n        }\n      }\n      /**\n       * <pre>\n       * Header information of the block.\n       * </pre>\n       *\n       * <code>.pactus.BlockHeaderInfo header = 5 [json_name = \"header\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.BlockHeaderInfo, pactus.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder> \n          internalGetHeaderFieldBuilder() {\n        if (headerBuilder_ == null) {\n          headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.BlockchainOuterClass.BlockHeaderInfo, pactus.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder>(\n                  getHeader(),\n                  getParentForChildren(),\n                  isClean());\n          header_ = null;\n        }\n        return headerBuilder_;\n      }\n\n      private pactus.BlockchainOuterClass.CertificateInfo prevCert_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.CertificateInfo, pactus.BlockchainOuterClass.CertificateInfo.Builder, pactus.BlockchainOuterClass.CertificateInfoOrBuilder> prevCertBuilder_;\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       * @return Whether the prevCert field is set.\n       */\n      public boolean hasPrevCert() {\n        return ((bitField0_ & 0x00000020) != 0);\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       * @return The prevCert.\n       */\n      public pactus.BlockchainOuterClass.CertificateInfo getPrevCert() {\n        if (prevCertBuilder_ == null) {\n          return prevCert_ == null ? pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_;\n        } else {\n          return prevCertBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public Builder setPrevCert(pactus.BlockchainOuterClass.CertificateInfo value) {\n        if (prevCertBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          prevCert_ = value;\n        } else {\n          prevCertBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public Builder setPrevCert(\n          pactus.BlockchainOuterClass.CertificateInfo.Builder builderForValue) {\n        if (prevCertBuilder_ == null) {\n          prevCert_ = builderForValue.build();\n        } else {\n          prevCertBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public Builder mergePrevCert(pactus.BlockchainOuterClass.CertificateInfo value) {\n        if (prevCertBuilder_ == null) {\n          if (((bitField0_ & 0x00000020) != 0) &&\n            prevCert_ != null &&\n            prevCert_ != pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance()) {\n            getPrevCertBuilder().mergeFrom(value);\n          } else {\n            prevCert_ = value;\n          }\n        } else {\n          prevCertBuilder_.mergeFrom(value);\n        }\n        if (prevCert_ != null) {\n          bitField0_ |= 0x00000020;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public Builder clearPrevCert() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        prevCert_ = null;\n        if (prevCertBuilder_ != null) {\n          prevCertBuilder_.dispose();\n          prevCertBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public pactus.BlockchainOuterClass.CertificateInfo.Builder getPrevCertBuilder() {\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return internalGetPrevCertFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      public pactus.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() {\n        if (prevCertBuilder_ != null) {\n          return prevCertBuilder_.getMessageOrBuilder();\n        } else {\n          return prevCert_ == null ?\n              pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_;\n        }\n      }\n      /**\n       * <pre>\n       * Certificate information of the previous block.\n       * </pre>\n       *\n       * <code>.pactus.CertificateInfo prev_cert = 6 [json_name = \"prevCert\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.CertificateInfo, pactus.BlockchainOuterClass.CertificateInfo.Builder, pactus.BlockchainOuterClass.CertificateInfoOrBuilder> \n          internalGetPrevCertFieldBuilder() {\n        if (prevCertBuilder_ == null) {\n          prevCertBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.BlockchainOuterClass.CertificateInfo, pactus.BlockchainOuterClass.CertificateInfo.Builder, pactus.BlockchainOuterClass.CertificateInfoOrBuilder>(\n                  getPrevCert(),\n                  getParentForChildren(),\n                  isClean());\n          prevCert_ = null;\n        }\n        return prevCertBuilder_;\n      }\n\n      private java.util.List<pactus.TransactionOuterClass.TransactionInfo> txs_ =\n        java.util.Collections.emptyList();\n      private void ensureTxsIsMutable() {\n        if (!((bitField0_ & 0x00000040) != 0)) {\n          txs_ = new java.util.ArrayList<pactus.TransactionOuterClass.TransactionInfo>(txs_);\n          bitField0_ |= 0x00000040;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_;\n\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.TransactionInfo> getTxsList() {\n        if (txsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(txs_);\n        } else {\n          return txsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public int getTxsCount() {\n        if (txsBuilder_ == null) {\n          return txs_.size();\n        } else {\n          return txsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo getTxs(int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);\n        } else {\n          return txsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.set(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder addAllTxs(\n          java.lang.Iterable<? extends pactus.TransactionOuterClass.TransactionInfo> values) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, txs_);\n          onChanged();\n        } else {\n          txsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder clearTxs() {\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000040);\n          onChanged();\n        } else {\n          txsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public Builder removeTxs(int index) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.remove(index);\n          onChanged();\n        } else {\n          txsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n          int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);  } else {\n          return txsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n           getTxsOrBuilderList() {\n        if (txsBuilder_ != null) {\n          return txsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(txs_);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() {\n        return internalGetTxsFieldBuilder().addBuilder(\n            pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().addBuilder(\n            index, pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions in the block, available when verbosity level is set to\n       * BLOCK_VERBOSITY_TRANSACTIONS.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 7 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.TransactionInfo.Builder> \n           getTxsBuilderList() {\n        return internalGetTxsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n          internalGetTxsFieldBuilder() {\n        if (txsBuilder_ == null) {\n          txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder>(\n                  txs_,\n                  ((bitField0_ & 0x00000040) != 0),\n                  getParentForChildren(),\n                  isClean());\n          txs_ = null;\n        }\n        return txsBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockResponse)\n    private static final pactus.BlockchainOuterClass.GetBlockResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockResponse>() {\n      @java.lang.Override\n      public GetBlockResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockHashRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the block to retrieve the hash for.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving block hash by height.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockHashRequest}\n   */\n  public static final class GetBlockHashRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockHashRequest)\n      GetBlockHashRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockHashRequest\");\n    }\n    // Use GetBlockHashRequest.newBuilder() to construct.\n    private GetBlockHashRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockHashRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockHashRequest.class, pactus.BlockchainOuterClass.GetBlockHashRequest.Builder.class);\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 1;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the block to retrieve the hash for.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (height_ != 0) {\n        output.writeUInt32(1, height_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, height_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockHashRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockHashRequest other = (pactus.BlockchainOuterClass.GetBlockHashRequest) obj;\n\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockHashRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving block hash by height.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockHashRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashRequest)\n        pactus.BlockchainOuterClass.GetBlockHashRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockHashRequest.class, pactus.BlockchainOuterClass.GetBlockHashRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockHashRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        height_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashRequest build() {\n        pactus.BlockchainOuterClass.GetBlockHashRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockHashRequest result = new pactus.BlockchainOuterClass.GetBlockHashRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockHashRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.height_ = height_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockHashRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockHashRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockHashRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance()) return this;\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the block to retrieve the hash for.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the block to retrieve the hash for.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the block to retrieve the hash for.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockHashRequest)\n    private static final pactus.BlockchainOuterClass.GetBlockHashRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockHashRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockHashRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockHashRequest>() {\n      @java.lang.Override\n      public GetBlockHashRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockHashRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockHashRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockHashResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains block hash.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockHashResponse}\n   */\n  public static final class GetBlockHashResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockHashResponse)\n      GetBlockHashResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockHashResponse\");\n    }\n    // Use GetBlockHashResponse.newBuilder() to construct.\n    private GetBlockHashResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockHashResponse() {\n      hash_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockHashResponse.class, pactus.BlockchainOuterClass.GetBlockHashResponse.Builder.class);\n    }\n\n    public static final int HASH_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the block.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, hash_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hash_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockHashResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockHashResponse other = (pactus.BlockchainOuterClass.GetBlockHashResponse) obj;\n\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockHashResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains block hash.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockHashResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashResponse)\n        pactus.BlockchainOuterClass.GetBlockHashResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockHashResponse.class, pactus.BlockchainOuterClass.GetBlockHashResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockHashResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        hash_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashResponse build() {\n        pactus.BlockchainOuterClass.GetBlockHashResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHashResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockHashResponse result = new pactus.BlockchainOuterClass.GetBlockHashResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockHashResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.hash_ = hash_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockHashResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockHashResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockHashResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance()) return this;\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockHashResponse)\n    private static final pactus.BlockchainOuterClass.GetBlockHashResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockHashResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHashResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockHashResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockHashResponse>() {\n      @java.lang.Override\n      public GetBlockHashResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockHashResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockHashResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockHeightRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The hash of the block to retrieve the height for.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the block to retrieve the height for.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving block height by hash.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockHeightRequest}\n   */\n  public static final class GetBlockHeightRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightRequest)\n      GetBlockHeightRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockHeightRequest\");\n    }\n    // Use GetBlockHeightRequest.newBuilder() to construct.\n    private GetBlockHeightRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockHeightRequest() {\n      hash_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.BlockchainOuterClass.GetBlockHeightRequest.Builder.class);\n    }\n\n    public static final int HASH_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the block to retrieve the height for.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the block to retrieve the height for.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, hash_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hash_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockHeightRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockHeightRequest other = (pactus.BlockchainOuterClass.GetBlockHeightRequest) obj;\n\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockHeightRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving block height by hash.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockHeightRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightRequest)\n        pactus.BlockchainOuterClass.GetBlockHeightRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.BlockchainOuterClass.GetBlockHeightRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockHeightRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        hash_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightRequest build() {\n        pactus.BlockchainOuterClass.GetBlockHeightRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockHeightRequest result = new pactus.BlockchainOuterClass.GetBlockHeightRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockHeightRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.hash_ = hash_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockHeightRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockHeightRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockHeightRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance()) return this;\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the block to retrieve the height for.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block to retrieve the height for.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block to retrieve the height for.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block to retrieve the height for.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block to retrieve the height for.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightRequest)\n    private static final pactus.BlockchainOuterClass.GetBlockHeightRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockHeightRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockHeightRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockHeightRequest>() {\n      @java.lang.Override\n      public GetBlockHeightRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockHeightRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockHeightRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockHeightResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the block.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n  }\n  /**\n   * <pre>\n   * Response message contains block height.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockHeightResponse}\n   */\n  public static final class GetBlockHeightResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightResponse)\n      GetBlockHeightResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockHeightResponse\");\n    }\n    // Use GetBlockHeightResponse.newBuilder() to construct.\n    private GetBlockHeightResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockHeightResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.BlockchainOuterClass.GetBlockHeightResponse.Builder.class);\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 1;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the block.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (height_ != 0) {\n        output.writeUInt32(1, height_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, height_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockHeightResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockHeightResponse other = (pactus.BlockchainOuterClass.GetBlockHeightResponse) obj;\n\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockHeightResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains block height.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockHeightResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightResponse)\n        pactus.BlockchainOuterClass.GetBlockHeightResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.BlockchainOuterClass.GetBlockHeightResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockHeightResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        height_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightResponse build() {\n        pactus.BlockchainOuterClass.GetBlockHeightResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockHeightResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockHeightResponse result = new pactus.BlockchainOuterClass.GetBlockHeightResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockHeightResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.height_ = height_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockHeightResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockHeightResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockHeightResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance()) return this;\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the block.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightResponse)\n    private static final pactus.BlockchainOuterClass.GetBlockHeightResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockHeightResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockHeightResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockHeightResponse>() {\n      @java.lang.Override\n      public GetBlockHeightResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockHeightResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockHeightResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockchainInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving blockchain information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockchainInfoRequest}\n   */\n  public static final class GetBlockchainInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoRequest)\n      GetBlockchainInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockchainInfoRequest\");\n    }\n    // Use GetBlockchainInfoRequest.newBuilder() to construct.\n    private GetBlockchainInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockchainInfoRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockchainInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockchainInfoRequest other = (pactus.BlockchainOuterClass.GetBlockchainInfoRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockchainInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving blockchain information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockchainInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoRequest)\n        pactus.BlockchainOuterClass.GetBlockchainInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockchainInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoRequest build() {\n        pactus.BlockchainOuterClass.GetBlockchainInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockchainInfoRequest result = new pactus.BlockchainOuterClass.GetBlockchainInfoRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockchainInfoRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockchainInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockchainInfoRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoRequest)\n    private static final pactus.BlockchainOuterClass.GetBlockchainInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockchainInfoRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockchainInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockchainInfoRequest>() {\n      @java.lang.Override\n      public GetBlockchainInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockchainInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockchainInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetBlockchainInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>uint32 last_block_height = 1 [json_name = \"lastBlockHeight\"];</code>\n     * @return The lastBlockHeight.\n     */\n    int getLastBlockHeight();\n\n    /**\n     * <pre>\n     * The hash of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n     * @return The lastBlockHash.\n     */\n    java.lang.String getLastBlockHash();\n    /**\n     * <pre>\n     * The hash of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n     * @return The bytes for lastBlockHash.\n     */\n    com.google.protobuf.ByteString\n        getLastBlockHashBytes();\n\n    /**\n     * <pre>\n     * The timestamp of the last block in Unix format.\n     * </pre>\n     *\n     * <code>int64 last_block_time = 10 [json_name = \"lastBlockTime\"];</code>\n     * @return The lastBlockTime.\n     */\n    long getLastBlockTime();\n\n    /**\n     * <pre>\n     * The total number of accounts in the blockchain.\n     * </pre>\n     *\n     * <code>int32 total_accounts = 3 [json_name = \"totalAccounts\"];</code>\n     * @return The totalAccounts.\n     */\n    int getTotalAccounts();\n\n    /**\n     * <pre>\n     * The total number of validators in the blockchain.\n     * </pre>\n     *\n     * <code>int32 total_validators = 4 [json_name = \"totalValidators\"];</code>\n     * @return The totalValidators.\n     */\n    int getTotalValidators();\n\n    /**\n     * <pre>\n     * The number of active (not unbonded) validators in the blockchain.\n     * </pre>\n     *\n     * <code>int32 active_validators = 12 [json_name = \"activeValidators\"];</code>\n     * @return The activeValidators.\n     */\n    int getActiveValidators();\n\n    /**\n     * <pre>\n     * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_power = 5 [json_name = \"totalPower\"];</code>\n     * @return The totalPower.\n     */\n    long getTotalPower();\n\n    /**\n     * <pre>\n     * The power of the committee.\n     * </pre>\n     *\n     * <code>int64 committee_power = 6 [json_name = \"committeePower\"];</code>\n     * @return The committeePower.\n     */\n    long getCommitteePower();\n\n    /**\n     * <pre>\n     * If the blocks are subject to pruning.\n     * </pre>\n     *\n     * <code>bool is_pruned = 8 [json_name = \"isPruned\"];</code>\n     * @return The isPruned.\n     */\n    boolean getIsPruned();\n\n    /**\n     * <pre>\n     * Lowest-height block stored (only present if pruning is enabled)\n     * </pre>\n     *\n     * <code>uint32 pruning_height = 9 [json_name = \"pruningHeight\"];</code>\n     * @return The pruningHeight.\n     */\n    int getPruningHeight();\n\n    /**\n     * <pre>\n     * Indicates whether this node participates in consensus: true if at least one\n     * of its running validators is a member of the current committee.\n     * </pre>\n     *\n     * <code>bool in_committee = 13 [json_name = \"inCommittee\"];</code>\n     * @return The inCommittee.\n     */\n    boolean getInCommittee();\n\n    /**\n     * <pre>\n     * The number of validators in the current committee.\n     * </pre>\n     *\n     * <code>int32 committee_size = 14 [json_name = \"committeeSize\"];</code>\n     * @return The committeeSize.\n     */\n    int getCommitteeSize();\n\n    /**\n     * <pre>\n     * Average availability score of validators with stake, in percentage (0-100).\n     * </pre>\n     *\n     * <code>double average_score = 15 [json_name = \"averageScore\"];</code>\n     * @return The averageScore.\n     */\n    double getAverageScore();\n  }\n  /**\n   * <pre>\n   * Response message contains general blockchain information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetBlockchainInfoResponse}\n   */\n  public static final class GetBlockchainInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoResponse)\n      GetBlockchainInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetBlockchainInfoResponse\");\n    }\n    // Use GetBlockchainInfoResponse.newBuilder() to construct.\n    private GetBlockchainInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetBlockchainInfoResponse() {\n      lastBlockHash_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class);\n    }\n\n    public static final int LAST_BLOCK_HEIGHT_FIELD_NUMBER = 1;\n    private int lastBlockHeight_ = 0;\n    /**\n     * <pre>\n     * The height of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>uint32 last_block_height = 1 [json_name = \"lastBlockHeight\"];</code>\n     * @return The lastBlockHeight.\n     */\n    @java.lang.Override\n    public int getLastBlockHeight() {\n      return lastBlockHeight_;\n    }\n\n    public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object lastBlockHash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n     * @return The lastBlockHash.\n     */\n    @java.lang.Override\n    public java.lang.String getLastBlockHash() {\n      java.lang.Object ref = lastBlockHash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        lastBlockHash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the last block in the blockchain.\n     * </pre>\n     *\n     * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n     * @return The bytes for lastBlockHash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLastBlockHashBytes() {\n      java.lang.Object ref = lastBlockHash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        lastBlockHash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int LAST_BLOCK_TIME_FIELD_NUMBER = 10;\n    private long lastBlockTime_ = 0L;\n    /**\n     * <pre>\n     * The timestamp of the last block in Unix format.\n     * </pre>\n     *\n     * <code>int64 last_block_time = 10 [json_name = \"lastBlockTime\"];</code>\n     * @return The lastBlockTime.\n     */\n    @java.lang.Override\n    public long getLastBlockTime() {\n      return lastBlockTime_;\n    }\n\n    public static final int TOTAL_ACCOUNTS_FIELD_NUMBER = 3;\n    private int totalAccounts_ = 0;\n    /**\n     * <pre>\n     * The total number of accounts in the blockchain.\n     * </pre>\n     *\n     * <code>int32 total_accounts = 3 [json_name = \"totalAccounts\"];</code>\n     * @return The totalAccounts.\n     */\n    @java.lang.Override\n    public int getTotalAccounts() {\n      return totalAccounts_;\n    }\n\n    public static final int TOTAL_VALIDATORS_FIELD_NUMBER = 4;\n    private int totalValidators_ = 0;\n    /**\n     * <pre>\n     * The total number of validators in the blockchain.\n     * </pre>\n     *\n     * <code>int32 total_validators = 4 [json_name = \"totalValidators\"];</code>\n     * @return The totalValidators.\n     */\n    @java.lang.Override\n    public int getTotalValidators() {\n      return totalValidators_;\n    }\n\n    public static final int ACTIVE_VALIDATORS_FIELD_NUMBER = 12;\n    private int activeValidators_ = 0;\n    /**\n     * <pre>\n     * The number of active (not unbonded) validators in the blockchain.\n     * </pre>\n     *\n     * <code>int32 active_validators = 12 [json_name = \"activeValidators\"];</code>\n     * @return The activeValidators.\n     */\n    @java.lang.Override\n    public int getActiveValidators() {\n      return activeValidators_;\n    }\n\n    public static final int TOTAL_POWER_FIELD_NUMBER = 5;\n    private long totalPower_ = 0L;\n    /**\n     * <pre>\n     * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_power = 5 [json_name = \"totalPower\"];</code>\n     * @return The totalPower.\n     */\n    @java.lang.Override\n    public long getTotalPower() {\n      return totalPower_;\n    }\n\n    public static final int COMMITTEE_POWER_FIELD_NUMBER = 6;\n    private long committeePower_ = 0L;\n    /**\n     * <pre>\n     * The power of the committee.\n     * </pre>\n     *\n     * <code>int64 committee_power = 6 [json_name = \"committeePower\"];</code>\n     * @return The committeePower.\n     */\n    @java.lang.Override\n    public long getCommitteePower() {\n      return committeePower_;\n    }\n\n    public static final int IS_PRUNED_FIELD_NUMBER = 8;\n    private boolean isPruned_ = false;\n    /**\n     * <pre>\n     * If the blocks are subject to pruning.\n     * </pre>\n     *\n     * <code>bool is_pruned = 8 [json_name = \"isPruned\"];</code>\n     * @return The isPruned.\n     */\n    @java.lang.Override\n    public boolean getIsPruned() {\n      return isPruned_;\n    }\n\n    public static final int PRUNING_HEIGHT_FIELD_NUMBER = 9;\n    private int pruningHeight_ = 0;\n    /**\n     * <pre>\n     * Lowest-height block stored (only present if pruning is enabled)\n     * </pre>\n     *\n     * <code>uint32 pruning_height = 9 [json_name = \"pruningHeight\"];</code>\n     * @return The pruningHeight.\n     */\n    @java.lang.Override\n    public int getPruningHeight() {\n      return pruningHeight_;\n    }\n\n    public static final int IN_COMMITTEE_FIELD_NUMBER = 13;\n    private boolean inCommittee_ = false;\n    /**\n     * <pre>\n     * Indicates whether this node participates in consensus: true if at least one\n     * of its running validators is a member of the current committee.\n     * </pre>\n     *\n     * <code>bool in_committee = 13 [json_name = \"inCommittee\"];</code>\n     * @return The inCommittee.\n     */\n    @java.lang.Override\n    public boolean getInCommittee() {\n      return inCommittee_;\n    }\n\n    public static final int COMMITTEE_SIZE_FIELD_NUMBER = 14;\n    private int committeeSize_ = 0;\n    /**\n     * <pre>\n     * The number of validators in the current committee.\n     * </pre>\n     *\n     * <code>int32 committee_size = 14 [json_name = \"committeeSize\"];</code>\n     * @return The committeeSize.\n     */\n    @java.lang.Override\n    public int getCommitteeSize() {\n      return committeeSize_;\n    }\n\n    public static final int AVERAGE_SCORE_FIELD_NUMBER = 15;\n    private double averageScore_ = 0D;\n    /**\n     * <pre>\n     * Average availability score of validators with stake, in percentage (0-100).\n     * </pre>\n     *\n     * <code>double average_score = 15 [json_name = \"averageScore\"];</code>\n     * @return The averageScore.\n     */\n    @java.lang.Override\n    public double getAverageScore() {\n      return averageScore_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lastBlockHeight_ != 0) {\n        output.writeUInt32(1, lastBlockHeight_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastBlockHash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, lastBlockHash_);\n      }\n      if (totalAccounts_ != 0) {\n        output.writeInt32(3, totalAccounts_);\n      }\n      if (totalValidators_ != 0) {\n        output.writeInt32(4, totalValidators_);\n      }\n      if (totalPower_ != 0L) {\n        output.writeInt64(5, totalPower_);\n      }\n      if (committeePower_ != 0L) {\n        output.writeInt64(6, committeePower_);\n      }\n      if (isPruned_ != false) {\n        output.writeBool(8, isPruned_);\n      }\n      if (pruningHeight_ != 0) {\n        output.writeUInt32(9, pruningHeight_);\n      }\n      if (lastBlockTime_ != 0L) {\n        output.writeInt64(10, lastBlockTime_);\n      }\n      if (activeValidators_ != 0) {\n        output.writeInt32(12, activeValidators_);\n      }\n      if (inCommittee_ != false) {\n        output.writeBool(13, inCommittee_);\n      }\n      if (committeeSize_ != 0) {\n        output.writeInt32(14, committeeSize_);\n      }\n      if (java.lang.Double.doubleToRawLongBits(averageScore_) != 0) {\n        output.writeDouble(15, averageScore_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lastBlockHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lastBlockHeight_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastBlockHash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, lastBlockHash_);\n      }\n      if (totalAccounts_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(3, totalAccounts_);\n      }\n      if (totalValidators_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(4, totalValidators_);\n      }\n      if (totalPower_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(5, totalPower_);\n      }\n      if (committeePower_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(6, committeePower_);\n      }\n      if (isPruned_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(8, isPruned_);\n      }\n      if (pruningHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(9, pruningHeight_);\n      }\n      if (lastBlockTime_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(10, lastBlockTime_);\n      }\n      if (activeValidators_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(12, activeValidators_);\n      }\n      if (inCommittee_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(13, inCommittee_);\n      }\n      if (committeeSize_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(14, committeeSize_);\n      }\n      if (java.lang.Double.doubleToRawLongBits(averageScore_) != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeDoubleSize(15, averageScore_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetBlockchainInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetBlockchainInfoResponse other = (pactus.BlockchainOuterClass.GetBlockchainInfoResponse) obj;\n\n      if (getLastBlockHeight()\n          != other.getLastBlockHeight()) return false;\n      if (!getLastBlockHash()\n          .equals(other.getLastBlockHash())) return false;\n      if (getLastBlockTime()\n          != other.getLastBlockTime()) return false;\n      if (getTotalAccounts()\n          != other.getTotalAccounts()) return false;\n      if (getTotalValidators()\n          != other.getTotalValidators()) return false;\n      if (getActiveValidators()\n          != other.getActiveValidators()) return false;\n      if (getTotalPower()\n          != other.getTotalPower()) return false;\n      if (getCommitteePower()\n          != other.getCommitteePower()) return false;\n      if (getIsPruned()\n          != other.getIsPruned()) return false;\n      if (getPruningHeight()\n          != other.getPruningHeight()) return false;\n      if (getInCommittee()\n          != other.getInCommittee()) return false;\n      if (getCommitteeSize()\n          != other.getCommitteeSize()) return false;\n      if (java.lang.Double.doubleToLongBits(getAverageScore())\n          != java.lang.Double.doubleToLongBits(\n              other.getAverageScore())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LAST_BLOCK_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getLastBlockHeight();\n      hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getLastBlockHash().hashCode();\n      hash = (37 * hash) + LAST_BLOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getLastBlockTime());\n      hash = (37 * hash) + TOTAL_ACCOUNTS_FIELD_NUMBER;\n      hash = (53 * hash) + getTotalAccounts();\n      hash = (37 * hash) + TOTAL_VALIDATORS_FIELD_NUMBER;\n      hash = (53 * hash) + getTotalValidators();\n      hash = (37 * hash) + ACTIVE_VALIDATORS_FIELD_NUMBER;\n      hash = (53 * hash) + getActiveValidators();\n      hash = (37 * hash) + TOTAL_POWER_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getTotalPower());\n      hash = (37 * hash) + COMMITTEE_POWER_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getCommitteePower());\n      hash = (37 * hash) + IS_PRUNED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIsPruned());\n      hash = (37 * hash) + PRUNING_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getPruningHeight();\n      hash = (37 * hash) + IN_COMMITTEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getInCommittee());\n      hash = (37 * hash) + COMMITTEE_SIZE_FIELD_NUMBER;\n      hash = (53 * hash) + getCommitteeSize();\n      hash = (37 * hash) + AVERAGE_SCORE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          java.lang.Double.doubleToLongBits(getAverageScore()));\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetBlockchainInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains general blockchain information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetBlockchainInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoResponse)\n        pactus.BlockchainOuterClass.GetBlockchainInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetBlockchainInfoResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lastBlockHeight_ = 0;\n        lastBlockHash_ = \"\";\n        lastBlockTime_ = 0L;\n        totalAccounts_ = 0;\n        totalValidators_ = 0;\n        activeValidators_ = 0;\n        totalPower_ = 0L;\n        committeePower_ = 0L;\n        isPruned_ = false;\n        pruningHeight_ = 0;\n        inCommittee_ = false;\n        committeeSize_ = 0;\n        averageScore_ = 0D;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoResponse build() {\n        pactus.BlockchainOuterClass.GetBlockchainInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetBlockchainInfoResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetBlockchainInfoResponse result = new pactus.BlockchainOuterClass.GetBlockchainInfoResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetBlockchainInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lastBlockHeight_ = lastBlockHeight_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.lastBlockHash_ = lastBlockHash_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.lastBlockTime_ = lastBlockTime_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.totalAccounts_ = totalAccounts_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.totalValidators_ = totalValidators_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.activeValidators_ = activeValidators_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.totalPower_ = totalPower_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.committeePower_ = committeePower_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.isPruned_ = isPruned_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.pruningHeight_ = pruningHeight_;\n        }\n        if (((from_bitField0_ & 0x00000400) != 0)) {\n          result.inCommittee_ = inCommittee_;\n        }\n        if (((from_bitField0_ & 0x00000800) != 0)) {\n          result.committeeSize_ = committeeSize_;\n        }\n        if (((from_bitField0_ & 0x00001000) != 0)) {\n          result.averageScore_ = averageScore_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetBlockchainInfoResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetBlockchainInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetBlockchainInfoResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance()) return this;\n        if (other.getLastBlockHeight() != 0) {\n          setLastBlockHeight(other.getLastBlockHeight());\n        }\n        if (!other.getLastBlockHash().isEmpty()) {\n          lastBlockHash_ = other.lastBlockHash_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getLastBlockTime() != 0L) {\n          setLastBlockTime(other.getLastBlockTime());\n        }\n        if (other.getTotalAccounts() != 0) {\n          setTotalAccounts(other.getTotalAccounts());\n        }\n        if (other.getTotalValidators() != 0) {\n          setTotalValidators(other.getTotalValidators());\n        }\n        if (other.getActiveValidators() != 0) {\n          setActiveValidators(other.getActiveValidators());\n        }\n        if (other.getTotalPower() != 0L) {\n          setTotalPower(other.getTotalPower());\n        }\n        if (other.getCommitteePower() != 0L) {\n          setCommitteePower(other.getCommitteePower());\n        }\n        if (other.getIsPruned() != false) {\n          setIsPruned(other.getIsPruned());\n        }\n        if (other.getPruningHeight() != 0) {\n          setPruningHeight(other.getPruningHeight());\n        }\n        if (other.getInCommittee() != false) {\n          setInCommittee(other.getInCommittee());\n        }\n        if (other.getCommitteeSize() != 0) {\n          setCommitteeSize(other.getCommitteeSize());\n        }\n        if (java.lang.Double.doubleToRawLongBits(other.getAverageScore()) != 0) {\n          setAverageScore(other.getAverageScore());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lastBlockHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                lastBlockHash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                totalAccounts_ = input.readInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 24\n              case 32: {\n                totalValidators_ = input.readInt32();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 32\n              case 40: {\n                totalPower_ = input.readInt64();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 40\n              case 48: {\n                committeePower_ = input.readInt64();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 48\n              case 64: {\n                isPruned_ = input.readBool();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 64\n              case 72: {\n                pruningHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 72\n              case 80: {\n                lastBlockTime_ = input.readInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 80\n              case 96: {\n                activeValidators_ = input.readInt32();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 96\n              case 104: {\n                inCommittee_ = input.readBool();\n                bitField0_ |= 0x00000400;\n                break;\n              } // case 104\n              case 112: {\n                committeeSize_ = input.readInt32();\n                bitField0_ |= 0x00000800;\n                break;\n              } // case 112\n              case 121: {\n                averageScore_ = input.readDouble();\n                bitField0_ |= 0x00001000;\n                break;\n              } // case 121\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lastBlockHeight_ ;\n      /**\n       * <pre>\n       * The height of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>uint32 last_block_height = 1 [json_name = \"lastBlockHeight\"];</code>\n       * @return The lastBlockHeight.\n       */\n      @java.lang.Override\n      public int getLastBlockHeight() {\n        return lastBlockHeight_;\n      }\n      /**\n       * <pre>\n       * The height of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>uint32 last_block_height = 1 [json_name = \"lastBlockHeight\"];</code>\n       * @param value The lastBlockHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockHeight(int value) {\n\n        lastBlockHeight_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>uint32 last_block_height = 1 [json_name = \"lastBlockHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastBlockHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lastBlockHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object lastBlockHash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n       * @return The lastBlockHash.\n       */\n      public java.lang.String getLastBlockHash() {\n        java.lang.Object ref = lastBlockHash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          lastBlockHash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n       * @return The bytes for lastBlockHash.\n       */\n      public com.google.protobuf.ByteString\n          getLastBlockHashBytes() {\n        java.lang.Object ref = lastBlockHash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          lastBlockHash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n       * @param value The lastBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        lastBlockHash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastBlockHash() {\n        lastBlockHash_ = getDefaultInstance().getLastBlockHash();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the last block in the blockchain.\n       * </pre>\n       *\n       * <code>string last_block_hash = 2 [json_name = \"lastBlockHash\"];</code>\n       * @param value The bytes for lastBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        lastBlockHash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private long lastBlockTime_ ;\n      /**\n       * <pre>\n       * The timestamp of the last block in Unix format.\n       * </pre>\n       *\n       * <code>int64 last_block_time = 10 [json_name = \"lastBlockTime\"];</code>\n       * @return The lastBlockTime.\n       */\n      @java.lang.Override\n      public long getLastBlockTime() {\n        return lastBlockTime_;\n      }\n      /**\n       * <pre>\n       * The timestamp of the last block in Unix format.\n       * </pre>\n       *\n       * <code>int64 last_block_time = 10 [json_name = \"lastBlockTime\"];</code>\n       * @param value The lastBlockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockTime(long value) {\n\n        lastBlockTime_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The timestamp of the last block in Unix format.\n       * </pre>\n       *\n       * <code>int64 last_block_time = 10 [json_name = \"lastBlockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastBlockTime() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        lastBlockTime_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int totalAccounts_ ;\n      /**\n       * <pre>\n       * The total number of accounts in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_accounts = 3 [json_name = \"totalAccounts\"];</code>\n       * @return The totalAccounts.\n       */\n      @java.lang.Override\n      public int getTotalAccounts() {\n        return totalAccounts_;\n      }\n      /**\n       * <pre>\n       * The total number of accounts in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_accounts = 3 [json_name = \"totalAccounts\"];</code>\n       * @param value The totalAccounts to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalAccounts(int value) {\n\n        totalAccounts_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total number of accounts in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_accounts = 3 [json_name = \"totalAccounts\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalAccounts() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        totalAccounts_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int totalValidators_ ;\n      /**\n       * <pre>\n       * The total number of validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_validators = 4 [json_name = \"totalValidators\"];</code>\n       * @return The totalValidators.\n       */\n      @java.lang.Override\n      public int getTotalValidators() {\n        return totalValidators_;\n      }\n      /**\n       * <pre>\n       * The total number of validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_validators = 4 [json_name = \"totalValidators\"];</code>\n       * @param value The totalValidators to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalValidators(int value) {\n\n        totalValidators_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total number of validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 total_validators = 4 [json_name = \"totalValidators\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalValidators() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        totalValidators_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int activeValidators_ ;\n      /**\n       * <pre>\n       * The number of active (not unbonded) validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 active_validators = 12 [json_name = \"activeValidators\"];</code>\n       * @return The activeValidators.\n       */\n      @java.lang.Override\n      public int getActiveValidators() {\n        return activeValidators_;\n      }\n      /**\n       * <pre>\n       * The number of active (not unbonded) validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 active_validators = 12 [json_name = \"activeValidators\"];</code>\n       * @param value The activeValidators to set.\n       * @return This builder for chaining.\n       */\n      public Builder setActiveValidators(int value) {\n\n        activeValidators_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The number of active (not unbonded) validators in the blockchain.\n       * </pre>\n       *\n       * <code>int32 active_validators = 12 [json_name = \"activeValidators\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearActiveValidators() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        activeValidators_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long totalPower_ ;\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 5 [json_name = \"totalPower\"];</code>\n       * @return The totalPower.\n       */\n      @java.lang.Override\n      public long getTotalPower() {\n        return totalPower_;\n      }\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 5 [json_name = \"totalPower\"];</code>\n       * @param value The totalPower to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalPower(long value) {\n\n        totalPower_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 5 [json_name = \"totalPower\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalPower() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        totalPower_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long committeePower_ ;\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 6 [json_name = \"committeePower\"];</code>\n       * @return The committeePower.\n       */\n      @java.lang.Override\n      public long getCommitteePower() {\n        return committeePower_;\n      }\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 6 [json_name = \"committeePower\"];</code>\n       * @param value The committeePower to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommitteePower(long value) {\n\n        committeePower_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 6 [json_name = \"committeePower\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCommitteePower() {\n        bitField0_ = (bitField0_ & ~0x00000080);\n        committeePower_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private boolean isPruned_ ;\n      /**\n       * <pre>\n       * If the blocks are subject to pruning.\n       * </pre>\n       *\n       * <code>bool is_pruned = 8 [json_name = \"isPruned\"];</code>\n       * @return The isPruned.\n       */\n      @java.lang.Override\n      public boolean getIsPruned() {\n        return isPruned_;\n      }\n      /**\n       * <pre>\n       * If the blocks are subject to pruning.\n       * </pre>\n       *\n       * <code>bool is_pruned = 8 [json_name = \"isPruned\"];</code>\n       * @param value The isPruned to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIsPruned(boolean value) {\n\n        isPruned_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * If the blocks are subject to pruning.\n       * </pre>\n       *\n       * <code>bool is_pruned = 8 [json_name = \"isPruned\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIsPruned() {\n        bitField0_ = (bitField0_ & ~0x00000100);\n        isPruned_ = false;\n        onChanged();\n        return this;\n      }\n\n      private int pruningHeight_ ;\n      /**\n       * <pre>\n       * Lowest-height block stored (only present if pruning is enabled)\n       * </pre>\n       *\n       * <code>uint32 pruning_height = 9 [json_name = \"pruningHeight\"];</code>\n       * @return The pruningHeight.\n       */\n      @java.lang.Override\n      public int getPruningHeight() {\n        return pruningHeight_;\n      }\n      /**\n       * <pre>\n       * Lowest-height block stored (only present if pruning is enabled)\n       * </pre>\n       *\n       * <code>uint32 pruning_height = 9 [json_name = \"pruningHeight\"];</code>\n       * @param value The pruningHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPruningHeight(int value) {\n\n        pruningHeight_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Lowest-height block stored (only present if pruning is enabled)\n       * </pre>\n       *\n       * <code>uint32 pruning_height = 9 [json_name = \"pruningHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPruningHeight() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        pruningHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private boolean inCommittee_ ;\n      /**\n       * <pre>\n       * Indicates whether this node participates in consensus: true if at least one\n       * of its running validators is a member of the current committee.\n       * </pre>\n       *\n       * <code>bool in_committee = 13 [json_name = \"inCommittee\"];</code>\n       * @return The inCommittee.\n       */\n      @java.lang.Override\n      public boolean getInCommittee() {\n        return inCommittee_;\n      }\n      /**\n       * <pre>\n       * Indicates whether this node participates in consensus: true if at least one\n       * of its running validators is a member of the current committee.\n       * </pre>\n       *\n       * <code>bool in_committee = 13 [json_name = \"inCommittee\"];</code>\n       * @param value The inCommittee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setInCommittee(boolean value) {\n\n        inCommittee_ = value;\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates whether this node participates in consensus: true if at least one\n       * of its running validators is a member of the current committee.\n       * </pre>\n       *\n       * <code>bool in_committee = 13 [json_name = \"inCommittee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearInCommittee() {\n        bitField0_ = (bitField0_ & ~0x00000400);\n        inCommittee_ = false;\n        onChanged();\n        return this;\n      }\n\n      private int committeeSize_ ;\n      /**\n       * <pre>\n       * The number of validators in the current committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 14 [json_name = \"committeeSize\"];</code>\n       * @return The committeeSize.\n       */\n      @java.lang.Override\n      public int getCommitteeSize() {\n        return committeeSize_;\n      }\n      /**\n       * <pre>\n       * The number of validators in the current committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 14 [json_name = \"committeeSize\"];</code>\n       * @param value The committeeSize to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommitteeSize(int value) {\n\n        committeeSize_ = value;\n        bitField0_ |= 0x00000800;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The number of validators in the current committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 14 [json_name = \"committeeSize\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCommitteeSize() {\n        bitField0_ = (bitField0_ & ~0x00000800);\n        committeeSize_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private double averageScore_ ;\n      /**\n       * <pre>\n       * Average availability score of validators with stake, in percentage (0-100).\n       * </pre>\n       *\n       * <code>double average_score = 15 [json_name = \"averageScore\"];</code>\n       * @return The averageScore.\n       */\n      @java.lang.Override\n      public double getAverageScore() {\n        return averageScore_;\n      }\n      /**\n       * <pre>\n       * Average availability score of validators with stake, in percentage (0-100).\n       * </pre>\n       *\n       * <code>double average_score = 15 [json_name = \"averageScore\"];</code>\n       * @param value The averageScore to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAverageScore(double value) {\n\n        averageScore_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Average availability score of validators with stake, in percentage (0-100).\n       * </pre>\n       *\n       * <code>double average_score = 15 [json_name = \"averageScore\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAverageScore() {\n        bitField0_ = (bitField0_ & ~0x00001000);\n        averageScore_ = 0D;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoResponse)\n    private static final pactus.BlockchainOuterClass.GetBlockchainInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetBlockchainInfoResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetBlockchainInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetBlockchainInfoResponse>() {\n      @java.lang.Override\n      public GetBlockchainInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetBlockchainInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetBlockchainInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetCommitteeInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetCommitteeInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving committee information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetCommitteeInfoRequest}\n   */\n  public static final class GetCommitteeInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetCommitteeInfoRequest)\n      GetCommitteeInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetCommitteeInfoRequest\");\n    }\n    // Use GetCommitteeInfoRequest.newBuilder() to construct.\n    private GetCommitteeInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetCommitteeInfoRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetCommitteeInfoRequest.class, pactus.BlockchainOuterClass.GetCommitteeInfoRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetCommitteeInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetCommitteeInfoRequest other = (pactus.BlockchainOuterClass.GetCommitteeInfoRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetCommitteeInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving committee information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetCommitteeInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetCommitteeInfoRequest)\n        pactus.BlockchainOuterClass.GetCommitteeInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetCommitteeInfoRequest.class, pactus.BlockchainOuterClass.GetCommitteeInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetCommitteeInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetCommitteeInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoRequest build() {\n        pactus.BlockchainOuterClass.GetCommitteeInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetCommitteeInfoRequest result = new pactus.BlockchainOuterClass.GetCommitteeInfoRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetCommitteeInfoRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetCommitteeInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetCommitteeInfoRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetCommitteeInfoRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetCommitteeInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetCommitteeInfoRequest)\n    private static final pactus.BlockchainOuterClass.GetCommitteeInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetCommitteeInfoRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetCommitteeInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetCommitteeInfoRequest>() {\n      @java.lang.Override\n      public GetCommitteeInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetCommitteeInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetCommitteeInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetCommitteeInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetCommitteeInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetCommitteeInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The number of validators in the committee.\n     * </pre>\n     *\n     * <code>int32 committee_size = 1 [json_name = \"committeeSize\"];</code>\n     * @return The committeeSize.\n     */\n    int getCommitteeSize();\n\n    /**\n     * <pre>\n     * The power of the committee.\n     * </pre>\n     *\n     * <code>int64 committee_power = 2 [json_name = \"committeePower\"];</code>\n     * @return The committeePower.\n     */\n    long getCommitteePower();\n\n    /**\n     * <pre>\n     * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_power = 3 [json_name = \"totalPower\"];</code>\n     * @return The totalPower.\n     */\n    long getTotalPower();\n\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    java.util.List<pactus.BlockchainOuterClass.ValidatorInfo> \n        getValidatorsList();\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    pactus.BlockchainOuterClass.ValidatorInfo getValidators(int index);\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    int getValidatorsCount();\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    java.util.List<? extends pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> \n        getValidatorsOrBuilderList();\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorsOrBuilder(\n        int index);\n\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    int getProtocolVersionsCount();\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    boolean containsProtocolVersions(\n        int key);\n    /**\n     * Use {@link #getProtocolVersionsMap()} instead.\n     */\n    @java.lang.Deprecated\n    java.util.Map<java.lang.Integer, java.lang.Double>\n    getProtocolVersions();\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    java.util.Map<java.lang.Integer, java.lang.Double>\n    getProtocolVersionsMap();\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    double getProtocolVersionsOrDefault(\n        int key,\n        double defaultValue);\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    double getProtocolVersionsOrThrow(\n        int key);\n  }\n  /**\n   * <pre>\n   * Response message contains committee information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetCommitteeInfoResponse}\n   */\n  public static final class GetCommitteeInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetCommitteeInfoResponse)\n      GetCommitteeInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetCommitteeInfoResponse\");\n    }\n    // Use GetCommitteeInfoResponse.newBuilder() to construct.\n    private GetCommitteeInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetCommitteeInfoResponse() {\n      validators_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_descriptor;\n    }\n\n    @SuppressWarnings({\"rawtypes\"})\n    @java.lang.Override\n    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(\n        int number) {\n      switch (number) {\n        case 5:\n          return internalGetProtocolVersions();\n        default:\n          throw new RuntimeException(\n              \"Invalid map field number: \" + number);\n      }\n    }\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetCommitteeInfoResponse.class, pactus.BlockchainOuterClass.GetCommitteeInfoResponse.Builder.class);\n    }\n\n    public static final int COMMITTEE_SIZE_FIELD_NUMBER = 1;\n    private int committeeSize_ = 0;\n    /**\n     * <pre>\n     * The number of validators in the committee.\n     * </pre>\n     *\n     * <code>int32 committee_size = 1 [json_name = \"committeeSize\"];</code>\n     * @return The committeeSize.\n     */\n    @java.lang.Override\n    public int getCommitteeSize() {\n      return committeeSize_;\n    }\n\n    public static final int COMMITTEE_POWER_FIELD_NUMBER = 2;\n    private long committeePower_ = 0L;\n    /**\n     * <pre>\n     * The power of the committee.\n     * </pre>\n     *\n     * <code>int64 committee_power = 2 [json_name = \"committeePower\"];</code>\n     * @return The committeePower.\n     */\n    @java.lang.Override\n    public long getCommitteePower() {\n      return committeePower_;\n    }\n\n    public static final int TOTAL_POWER_FIELD_NUMBER = 3;\n    private long totalPower_ = 0L;\n    /**\n     * <pre>\n     * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_power = 3 [json_name = \"totalPower\"];</code>\n     * @return The totalPower.\n     */\n    @java.lang.Override\n    public long getTotalPower() {\n      return totalPower_;\n    }\n\n    public static final int VALIDATORS_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.BlockchainOuterClass.ValidatorInfo> validators_;\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.BlockchainOuterClass.ValidatorInfo> getValidatorsList() {\n      return validators_;\n    }\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> \n        getValidatorsOrBuilderList() {\n      return validators_;\n    }\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    @java.lang.Override\n    public int getValidatorsCount() {\n      return validators_.size();\n    }\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ValidatorInfo getValidators(int index) {\n      return validators_.get(index);\n    }\n    /**\n     * <pre>\n     * List of committee validators.\n     * </pre>\n     *\n     * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorsOrBuilder(\n        int index) {\n      return validators_.get(index);\n    }\n\n    public static final int PROTOCOL_VERSIONS_FIELD_NUMBER = 5;\n    private static final class ProtocolVersionsDefaultEntryHolder {\n      static final com.google.protobuf.MapEntry<\n          java.lang.Integer, java.lang.Double> defaultEntry =\n              com.google.protobuf.MapEntry\n              .<java.lang.Integer, java.lang.Double>newDefaultInstance(\n                  pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_descriptor, \n                  com.google.protobuf.WireFormat.FieldType.INT32,\n                  0,\n                  com.google.protobuf.WireFormat.FieldType.DOUBLE,\n                  0D);\n    }\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.MapField<\n        java.lang.Integer, java.lang.Double> protocolVersions_;\n    private com.google.protobuf.MapField<java.lang.Integer, java.lang.Double>\n    internalGetProtocolVersions() {\n      if (protocolVersions_ == null) {\n        return com.google.protobuf.MapField.emptyMapField(\n            ProtocolVersionsDefaultEntryHolder.defaultEntry);\n      }\n      return protocolVersions_;\n    }\n    public int getProtocolVersionsCount() {\n      return internalGetProtocolVersions().getMap().size();\n    }\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    @java.lang.Override\n    public boolean containsProtocolVersions(\n        int key) {\n\n      return internalGetProtocolVersions().getMap().containsKey(key);\n    }\n    /**\n     * Use {@link #getProtocolVersionsMap()} instead.\n     */\n    @java.lang.Override\n    @java.lang.Deprecated\n    public java.util.Map<java.lang.Integer, java.lang.Double> getProtocolVersions() {\n      return getProtocolVersionsMap();\n    }\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    @java.lang.Override\n    public java.util.Map<java.lang.Integer, java.lang.Double> getProtocolVersionsMap() {\n      return internalGetProtocolVersions().getMap();\n    }\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    @java.lang.Override\n    public double getProtocolVersionsOrDefault(\n        int key,\n        double defaultValue) {\n\n      java.util.Map<java.lang.Integer, java.lang.Double> map =\n          internalGetProtocolVersions().getMap();\n      return map.containsKey(key) ? map.get(key) : defaultValue;\n    }\n    /**\n     * <pre>\n     * Map of protocol versions and their percentages in the committee.\n     * </pre>\n     *\n     * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n     */\n    @java.lang.Override\n    public double getProtocolVersionsOrThrow(\n        int key) {\n\n      java.util.Map<java.lang.Integer, java.lang.Double> map =\n          internalGetProtocolVersions().getMap();\n      if (!map.containsKey(key)) {\n        throw new java.lang.IllegalArgumentException();\n      }\n      return map.get(key);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (committeeSize_ != 0) {\n        output.writeInt32(1, committeeSize_);\n      }\n      if (committeePower_ != 0L) {\n        output.writeInt64(2, committeePower_);\n      }\n      if (totalPower_ != 0L) {\n        output.writeInt64(3, totalPower_);\n      }\n      for (int i = 0; i < validators_.size(); i++) {\n        output.writeMessage(4, validators_.get(i));\n      }\n      com.google.protobuf.GeneratedMessage\n        .serializeIntegerMapTo(\n          output,\n          internalGetProtocolVersions(),\n          ProtocolVersionsDefaultEntryHolder.defaultEntry,\n          5);\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (committeeSize_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(1, committeeSize_);\n      }\n      if (committeePower_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, committeePower_);\n      }\n      if (totalPower_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(3, totalPower_);\n      }\n      for (int i = 0; i < validators_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(4, validators_.get(i));\n      }\n      for (java.util.Map.Entry<java.lang.Integer, java.lang.Double> entry\n           : internalGetProtocolVersions().getMap().entrySet()) {\n        com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Double>\n        protocolVersions__ = ProtocolVersionsDefaultEntryHolder.defaultEntry.newBuilderForType()\n            .setKey(entry.getKey())\n            .setValue(entry.getValue())\n            .build();\n        size += com.google.protobuf.CodedOutputStream\n            .computeMessageSize(5, protocolVersions__);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetCommitteeInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetCommitteeInfoResponse other = (pactus.BlockchainOuterClass.GetCommitteeInfoResponse) obj;\n\n      if (getCommitteeSize()\n          != other.getCommitteeSize()) return false;\n      if (getCommitteePower()\n          != other.getCommitteePower()) return false;\n      if (getTotalPower()\n          != other.getTotalPower()) return false;\n      if (!getValidatorsList()\n          .equals(other.getValidatorsList())) return false;\n      if (!internalGetProtocolVersions().equals(\n          other.internalGetProtocolVersions())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + COMMITTEE_SIZE_FIELD_NUMBER;\n      hash = (53 * hash) + getCommitteeSize();\n      hash = (37 * hash) + COMMITTEE_POWER_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getCommitteePower());\n      hash = (37 * hash) + TOTAL_POWER_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getTotalPower());\n      if (getValidatorsCount() > 0) {\n        hash = (37 * hash) + VALIDATORS_FIELD_NUMBER;\n        hash = (53 * hash) + getValidatorsList().hashCode();\n      }\n      if (!internalGetProtocolVersions().getMap().isEmpty()) {\n        hash = (37 * hash) + PROTOCOL_VERSIONS_FIELD_NUMBER;\n        hash = (53 * hash) + internalGetProtocolVersions().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetCommitteeInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains committee information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetCommitteeInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetCommitteeInfoResponse)\n        pactus.BlockchainOuterClass.GetCommitteeInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_descriptor;\n      }\n\n      @SuppressWarnings({\"rawtypes\"})\n      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(\n          int number) {\n        switch (number) {\n          case 5:\n            return internalGetProtocolVersions();\n          default:\n            throw new RuntimeException(\n                \"Invalid map field number: \" + number);\n        }\n      }\n      @SuppressWarnings({\"rawtypes\"})\n      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(\n          int number) {\n        switch (number) {\n          case 5:\n            return internalGetMutableProtocolVersions();\n          default:\n            throw new RuntimeException(\n                \"Invalid map field number: \" + number);\n        }\n      }\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetCommitteeInfoResponse.class, pactus.BlockchainOuterClass.GetCommitteeInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetCommitteeInfoResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        committeeSize_ = 0;\n        committeePower_ = 0L;\n        totalPower_ = 0L;\n        if (validatorsBuilder_ == null) {\n          validators_ = java.util.Collections.emptyList();\n        } else {\n          validators_ = null;\n          validatorsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000008);\n        internalGetMutableProtocolVersions().clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetCommitteeInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetCommitteeInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoResponse build() {\n        pactus.BlockchainOuterClass.GetCommitteeInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetCommitteeInfoResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetCommitteeInfoResponse result = new pactus.BlockchainOuterClass.GetCommitteeInfoResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.BlockchainOuterClass.GetCommitteeInfoResponse result) {\n        if (validatorsBuilder_ == null) {\n          if (((bitField0_ & 0x00000008) != 0)) {\n            validators_ = java.util.Collections.unmodifiableList(validators_);\n            bitField0_ = (bitField0_ & ~0x00000008);\n          }\n          result.validators_ = validators_;\n        } else {\n          result.validators_ = validatorsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetCommitteeInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.committeeSize_ = committeeSize_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.committeePower_ = committeePower_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.totalPower_ = totalPower_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.protocolVersions_ = internalGetProtocolVersions();\n          result.protocolVersions_.makeImmutable();\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetCommitteeInfoResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetCommitteeInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetCommitteeInfoResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetCommitteeInfoResponse.getDefaultInstance()) return this;\n        if (other.getCommitteeSize() != 0) {\n          setCommitteeSize(other.getCommitteeSize());\n        }\n        if (other.getCommitteePower() != 0L) {\n          setCommitteePower(other.getCommitteePower());\n        }\n        if (other.getTotalPower() != 0L) {\n          setTotalPower(other.getTotalPower());\n        }\n        if (validatorsBuilder_ == null) {\n          if (!other.validators_.isEmpty()) {\n            if (validators_.isEmpty()) {\n              validators_ = other.validators_;\n              bitField0_ = (bitField0_ & ~0x00000008);\n            } else {\n              ensureValidatorsIsMutable();\n              validators_.addAll(other.validators_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.validators_.isEmpty()) {\n            if (validatorsBuilder_.isEmpty()) {\n              validatorsBuilder_.dispose();\n              validatorsBuilder_ = null;\n              validators_ = other.validators_;\n              bitField0_ = (bitField0_ & ~0x00000008);\n              validatorsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetValidatorsFieldBuilder() : null;\n            } else {\n              validatorsBuilder_.addAllMessages(other.validators_);\n            }\n          }\n        }\n        internalGetMutableProtocolVersions().mergeFrom(\n            other.internalGetProtocolVersions());\n        bitField0_ |= 0x00000010;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                committeeSize_ = input.readInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                committeePower_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 24: {\n                totalPower_ = input.readInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 34: {\n                pactus.BlockchainOuterClass.ValidatorInfo m =\n                    input.readMessage(\n                        pactus.BlockchainOuterClass.ValidatorInfo.parser(),\n                        extensionRegistry);\n                if (validatorsBuilder_ == null) {\n                  ensureValidatorsIsMutable();\n                  validators_.add(m);\n                } else {\n                  validatorsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 34\n              case 42: {\n                com.google.protobuf.MapEntry<java.lang.Integer, java.lang.Double>\n                protocolVersions__ = input.readMessage(\n                    ProtocolVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);\n                internalGetMutableProtocolVersions().getMutableMap().put(\n                    protocolVersions__.getKey(), protocolVersions__.getValue());\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int committeeSize_ ;\n      /**\n       * <pre>\n       * The number of validators in the committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 1 [json_name = \"committeeSize\"];</code>\n       * @return The committeeSize.\n       */\n      @java.lang.Override\n      public int getCommitteeSize() {\n        return committeeSize_;\n      }\n      /**\n       * <pre>\n       * The number of validators in the committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 1 [json_name = \"committeeSize\"];</code>\n       * @param value The committeeSize to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommitteeSize(int value) {\n\n        committeeSize_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The number of validators in the committee.\n       * </pre>\n       *\n       * <code>int32 committee_size = 1 [json_name = \"committeeSize\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCommitteeSize() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        committeeSize_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long committeePower_ ;\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 2 [json_name = \"committeePower\"];</code>\n       * @return The committeePower.\n       */\n      @java.lang.Override\n      public long getCommitteePower() {\n        return committeePower_;\n      }\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 2 [json_name = \"committeePower\"];</code>\n       * @param value The committeePower to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommitteePower(long value) {\n\n        committeePower_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The power of the committee.\n       * </pre>\n       *\n       * <code>int64 committee_power = 2 [json_name = \"committeePower\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCommitteePower() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        committeePower_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long totalPower_ ;\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 3 [json_name = \"totalPower\"];</code>\n       * @return The totalPower.\n       */\n      @java.lang.Override\n      public long getTotalPower() {\n        return totalPower_;\n      }\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 3 [json_name = \"totalPower\"];</code>\n       * @param value The totalPower to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalPower(long value) {\n\n        totalPower_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_power = 3 [json_name = \"totalPower\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalPower() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        totalPower_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.BlockchainOuterClass.ValidatorInfo> validators_ =\n        java.util.Collections.emptyList();\n      private void ensureValidatorsIsMutable() {\n        if (!((bitField0_ & 0x00000008) != 0)) {\n          validators_ = new java.util.ArrayList<pactus.BlockchainOuterClass.ValidatorInfo>(validators_);\n          bitField0_ |= 0x00000008;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> validatorsBuilder_;\n\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.ValidatorInfo> getValidatorsList() {\n        if (validatorsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(validators_);\n        } else {\n          return validatorsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public int getValidatorsCount() {\n        if (validatorsBuilder_ == null) {\n          return validators_.size();\n        } else {\n          return validatorsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo getValidators(int index) {\n        if (validatorsBuilder_ == null) {\n          return validators_.get(index);\n        } else {\n          return validatorsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder setValidators(\n          int index, pactus.BlockchainOuterClass.ValidatorInfo value) {\n        if (validatorsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureValidatorsIsMutable();\n          validators_.set(index, value);\n          onChanged();\n        } else {\n          validatorsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder setValidators(\n          int index, pactus.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) {\n        if (validatorsBuilder_ == null) {\n          ensureValidatorsIsMutable();\n          validators_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          validatorsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder addValidators(pactus.BlockchainOuterClass.ValidatorInfo value) {\n        if (validatorsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureValidatorsIsMutable();\n          validators_.add(value);\n          onChanged();\n        } else {\n          validatorsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder addValidators(\n          int index, pactus.BlockchainOuterClass.ValidatorInfo value) {\n        if (validatorsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureValidatorsIsMutable();\n          validators_.add(index, value);\n          onChanged();\n        } else {\n          validatorsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder addValidators(\n          pactus.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) {\n        if (validatorsBuilder_ == null) {\n          ensureValidatorsIsMutable();\n          validators_.add(builderForValue.build());\n          onChanged();\n        } else {\n          validatorsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder addValidators(\n          int index, pactus.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) {\n        if (validatorsBuilder_ == null) {\n          ensureValidatorsIsMutable();\n          validators_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          validatorsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder addAllValidators(\n          java.lang.Iterable<? extends pactus.BlockchainOuterClass.ValidatorInfo> values) {\n        if (validatorsBuilder_ == null) {\n          ensureValidatorsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, validators_);\n          onChanged();\n        } else {\n          validatorsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder clearValidators() {\n        if (validatorsBuilder_ == null) {\n          validators_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000008);\n          onChanged();\n        } else {\n          validatorsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public Builder removeValidators(int index) {\n        if (validatorsBuilder_ == null) {\n          ensureValidatorsIsMutable();\n          validators_.remove(index);\n          onChanged();\n        } else {\n          validatorsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo.Builder getValidatorsBuilder(\n          int index) {\n        return internalGetValidatorsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorsOrBuilder(\n          int index) {\n        if (validatorsBuilder_ == null) {\n          return validators_.get(index);  } else {\n          return validatorsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public java.util.List<? extends pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> \n           getValidatorsOrBuilderList() {\n        if (validatorsBuilder_ != null) {\n          return validatorsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(validators_);\n        }\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo.Builder addValidatorsBuilder() {\n        return internalGetValidatorsFieldBuilder().addBuilder(\n            pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ValidatorInfo.Builder addValidatorsBuilder(\n          int index) {\n        return internalGetValidatorsFieldBuilder().addBuilder(\n            index, pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of committee validators.\n       * </pre>\n       *\n       * <code>repeated .pactus.ValidatorInfo validators = 4 [json_name = \"validators\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.ValidatorInfo.Builder> \n           getValidatorsBuilderList() {\n        return internalGetValidatorsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder> \n          internalGetValidatorsFieldBuilder() {\n        if (validatorsBuilder_ == null) {\n          validatorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.BlockchainOuterClass.ValidatorInfo, pactus.BlockchainOuterClass.ValidatorInfo.Builder, pactus.BlockchainOuterClass.ValidatorInfoOrBuilder>(\n                  validators_,\n                  ((bitField0_ & 0x00000008) != 0),\n                  getParentForChildren(),\n                  isClean());\n          validators_ = null;\n        }\n        return validatorsBuilder_;\n      }\n\n      private com.google.protobuf.MapField<\n          java.lang.Integer, java.lang.Double> protocolVersions_;\n      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Double>\n          internalGetProtocolVersions() {\n        if (protocolVersions_ == null) {\n          return com.google.protobuf.MapField.emptyMapField(\n              ProtocolVersionsDefaultEntryHolder.defaultEntry);\n        }\n        return protocolVersions_;\n      }\n      private com.google.protobuf.MapField<java.lang.Integer, java.lang.Double>\n          internalGetMutableProtocolVersions() {\n        if (protocolVersions_ == null) {\n          protocolVersions_ = com.google.protobuf.MapField.newMapField(\n              ProtocolVersionsDefaultEntryHolder.defaultEntry);\n        }\n        if (!protocolVersions_.isMutable()) {\n          protocolVersions_ = protocolVersions_.copy();\n        }\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return protocolVersions_;\n      }\n      public int getProtocolVersionsCount() {\n        return internalGetProtocolVersions().getMap().size();\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      @java.lang.Override\n      public boolean containsProtocolVersions(\n          int key) {\n\n        return internalGetProtocolVersions().getMap().containsKey(key);\n      }\n      /**\n       * Use {@link #getProtocolVersionsMap()} instead.\n       */\n      @java.lang.Override\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, java.lang.Double> getProtocolVersions() {\n        return getProtocolVersionsMap();\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      @java.lang.Override\n      public java.util.Map<java.lang.Integer, java.lang.Double> getProtocolVersionsMap() {\n        return internalGetProtocolVersions().getMap();\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      @java.lang.Override\n      public double getProtocolVersionsOrDefault(\n          int key,\n          double defaultValue) {\n\n        java.util.Map<java.lang.Integer, java.lang.Double> map =\n            internalGetProtocolVersions().getMap();\n        return map.containsKey(key) ? map.get(key) : defaultValue;\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      @java.lang.Override\n      public double getProtocolVersionsOrThrow(\n          int key) {\n\n        java.util.Map<java.lang.Integer, java.lang.Double> map =\n            internalGetProtocolVersions().getMap();\n        if (!map.containsKey(key)) {\n          throw new java.lang.IllegalArgumentException();\n        }\n        return map.get(key);\n      }\n      public Builder clearProtocolVersions() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        internalGetMutableProtocolVersions().getMutableMap()\n            .clear();\n        return this;\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      public Builder removeProtocolVersions(\n          int key) {\n\n        internalGetMutableProtocolVersions().getMutableMap()\n            .remove(key);\n        return this;\n      }\n      /**\n       * Use alternate mutation accessors instead.\n       */\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, java.lang.Double>\n          getMutableProtocolVersions() {\n        bitField0_ |= 0x00000010;\n        return internalGetMutableProtocolVersions().getMutableMap();\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      public Builder putProtocolVersions(\n          int key,\n          double value) {\n\n\n        internalGetMutableProtocolVersions().getMutableMap()\n            .put(key, value);\n        bitField0_ |= 0x00000010;\n        return this;\n      }\n      /**\n       * <pre>\n       * Map of protocol versions and their percentages in the committee.\n       * </pre>\n       *\n       * <code>map&lt;int32, double&gt; protocol_versions = 5 [json_name = \"protocolVersions\"];</code>\n       */\n      public Builder putAllProtocolVersions(\n          java.util.Map<java.lang.Integer, java.lang.Double> values) {\n        internalGetMutableProtocolVersions().getMutableMap()\n            .putAll(values);\n        bitField0_ |= 0x00000010;\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetCommitteeInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetCommitteeInfoResponse)\n    private static final pactus.BlockchainOuterClass.GetCommitteeInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetCommitteeInfoResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetCommitteeInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetCommitteeInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetCommitteeInfoResponse>() {\n      @java.lang.Override\n      public GetCommitteeInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetCommitteeInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetCommitteeInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetCommitteeInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetConsensusInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving consensus information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetConsensusInfoRequest}\n   */\n  public static final class GetConsensusInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoRequest)\n      GetConsensusInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetConsensusInfoRequest\");\n    }\n    // Use GetConsensusInfoRequest.newBuilder() to construct.\n    private GetConsensusInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetConsensusInfoRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetConsensusInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetConsensusInfoRequest other = (pactus.BlockchainOuterClass.GetConsensusInfoRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetConsensusInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving consensus information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetConsensusInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoRequest)\n        pactus.BlockchainOuterClass.GetConsensusInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetConsensusInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoRequest build() {\n        pactus.BlockchainOuterClass.GetConsensusInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetConsensusInfoRequest result = new pactus.BlockchainOuterClass.GetConsensusInfoRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetConsensusInfoRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetConsensusInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetConsensusInfoRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoRequest)\n    private static final pactus.BlockchainOuterClass.GetConsensusInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetConsensusInfoRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetConsensusInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetConsensusInfoRequest>() {\n      @java.lang.Override\n      public GetConsensusInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetConsensusInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetConsensusInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetConsensusInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     * @return Whether the proposal field is set.\n     */\n    boolean hasProposal();\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     * @return The proposal.\n     */\n    pactus.BlockchainOuterClass.ProposalInfo getProposal();\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     */\n    pactus.BlockchainOuterClass.ProposalInfoOrBuilder getProposalOrBuilder();\n\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    java.util.List<pactus.BlockchainOuterClass.ConsensusInfo> \n        getInstancesList();\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    pactus.BlockchainOuterClass.ConsensusInfo getInstances(int index);\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    int getInstancesCount();\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    java.util.List<? extends pactus.BlockchainOuterClass.ConsensusInfoOrBuilder> \n        getInstancesOrBuilderList();\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    pactus.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message contains consensus information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetConsensusInfoResponse}\n   */\n  public static final class GetConsensusInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoResponse)\n      GetConsensusInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetConsensusInfoResponse\");\n    }\n    // Use GetConsensusInfoResponse.newBuilder() to construct.\n    private GetConsensusInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetConsensusInfoResponse() {\n      instances_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int PROPOSAL_FIELD_NUMBER = 1;\n    private pactus.BlockchainOuterClass.ProposalInfo proposal_;\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     * @return Whether the proposal field is set.\n     */\n    @java.lang.Override\n    public boolean hasProposal() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     * @return The proposal.\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ProposalInfo getProposal() {\n      return proposal_ == null ? pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance() : proposal_;\n    }\n    /**\n     * <pre>\n     * The proposal of the consensus info.\n     * </pre>\n     *\n     * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ProposalInfoOrBuilder getProposalOrBuilder() {\n      return proposal_ == null ? pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance() : proposal_;\n    }\n\n    public static final int INSTANCES_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.BlockchainOuterClass.ConsensusInfo> instances_;\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.BlockchainOuterClass.ConsensusInfo> getInstancesList() {\n      return instances_;\n    }\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.BlockchainOuterClass.ConsensusInfoOrBuilder> \n        getInstancesOrBuilderList() {\n      return instances_;\n    }\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    @java.lang.Override\n    public int getInstancesCount() {\n      return instances_.size();\n    }\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ConsensusInfo getInstances(int index) {\n      return instances_.get(index);\n    }\n    /**\n     * <pre>\n     * List of consensus instances.\n     * </pre>\n     *\n     * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(\n        int index) {\n      return instances_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(1, getProposal());\n      }\n      for (int i = 0; i < instances_.size(); i++) {\n        output.writeMessage(2, instances_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, getProposal());\n      }\n      for (int i = 0; i < instances_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, instances_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetConsensusInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetConsensusInfoResponse other = (pactus.BlockchainOuterClass.GetConsensusInfoResponse) obj;\n\n      if (hasProposal() != other.hasProposal()) return false;\n      if (hasProposal()) {\n        if (!getProposal()\n            .equals(other.getProposal())) return false;\n      }\n      if (!getInstancesList()\n          .equals(other.getInstancesList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (hasProposal()) {\n        hash = (37 * hash) + PROPOSAL_FIELD_NUMBER;\n        hash = (53 * hash) + getProposal().hashCode();\n      }\n      if (getInstancesCount() > 0) {\n        hash = (37 * hash) + INSTANCES_FIELD_NUMBER;\n        hash = (53 * hash) + getInstancesList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetConsensusInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains consensus information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetConsensusInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoResponse)\n        pactus.BlockchainOuterClass.GetConsensusInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetConsensusInfoResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetProposalFieldBuilder();\n          internalGetInstancesFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        proposal_ = null;\n        if (proposalBuilder_ != null) {\n          proposalBuilder_.dispose();\n          proposalBuilder_ = null;\n        }\n        if (instancesBuilder_ == null) {\n          instances_ = java.util.Collections.emptyList();\n        } else {\n          instances_ = null;\n          instancesBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000002);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoResponse build() {\n        pactus.BlockchainOuterClass.GetConsensusInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetConsensusInfoResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetConsensusInfoResponse result = new pactus.BlockchainOuterClass.GetConsensusInfoResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.BlockchainOuterClass.GetConsensusInfoResponse result) {\n        if (instancesBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0)) {\n            instances_ = java.util.Collections.unmodifiableList(instances_);\n            bitField0_ = (bitField0_ & ~0x00000002);\n          }\n          result.instances_ = instances_;\n        } else {\n          result.instances_ = instancesBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetConsensusInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.proposal_ = proposalBuilder_ == null\n              ? proposal_\n              : proposalBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetConsensusInfoResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetConsensusInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetConsensusInfoResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance()) return this;\n        if (other.hasProposal()) {\n          mergeProposal(other.getProposal());\n        }\n        if (instancesBuilder_ == null) {\n          if (!other.instances_.isEmpty()) {\n            if (instances_.isEmpty()) {\n              instances_ = other.instances_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n            } else {\n              ensureInstancesIsMutable();\n              instances_.addAll(other.instances_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.instances_.isEmpty()) {\n            if (instancesBuilder_.isEmpty()) {\n              instancesBuilder_.dispose();\n              instancesBuilder_ = null;\n              instances_ = other.instances_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n              instancesBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetInstancesFieldBuilder() : null;\n            } else {\n              instancesBuilder_.addAllMessages(other.instances_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                input.readMessage(\n                    internalGetProposalFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                pactus.BlockchainOuterClass.ConsensusInfo m =\n                    input.readMessage(\n                        pactus.BlockchainOuterClass.ConsensusInfo.parser(),\n                        extensionRegistry);\n                if (instancesBuilder_ == null) {\n                  ensureInstancesIsMutable();\n                  instances_.add(m);\n                } else {\n                  instancesBuilder_.addMessage(m);\n                }\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private pactus.BlockchainOuterClass.ProposalInfo proposal_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.ProposalInfo, pactus.BlockchainOuterClass.ProposalInfo.Builder, pactus.BlockchainOuterClass.ProposalInfoOrBuilder> proposalBuilder_;\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       * @return Whether the proposal field is set.\n       */\n      public boolean hasProposal() {\n        return ((bitField0_ & 0x00000001) != 0);\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       * @return The proposal.\n       */\n      public pactus.BlockchainOuterClass.ProposalInfo getProposal() {\n        if (proposalBuilder_ == null) {\n          return proposal_ == null ? pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance() : proposal_;\n        } else {\n          return proposalBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public Builder setProposal(pactus.BlockchainOuterClass.ProposalInfo value) {\n        if (proposalBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          proposal_ = value;\n        } else {\n          proposalBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public Builder setProposal(\n          pactus.BlockchainOuterClass.ProposalInfo.Builder builderForValue) {\n        if (proposalBuilder_ == null) {\n          proposal_ = builderForValue.build();\n        } else {\n          proposalBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public Builder mergeProposal(pactus.BlockchainOuterClass.ProposalInfo value) {\n        if (proposalBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0) &&\n            proposal_ != null &&\n            proposal_ != pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance()) {\n            getProposalBuilder().mergeFrom(value);\n          } else {\n            proposal_ = value;\n          }\n        } else {\n          proposalBuilder_.mergeFrom(value);\n        }\n        if (proposal_ != null) {\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public Builder clearProposal() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        proposal_ = null;\n        if (proposalBuilder_ != null) {\n          proposalBuilder_.dispose();\n          proposalBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ProposalInfo.Builder getProposalBuilder() {\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return internalGetProposalFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ProposalInfoOrBuilder getProposalOrBuilder() {\n        if (proposalBuilder_ != null) {\n          return proposalBuilder_.getMessageOrBuilder();\n        } else {\n          return proposal_ == null ?\n              pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance() : proposal_;\n        }\n      }\n      /**\n       * <pre>\n       * The proposal of the consensus info.\n       * </pre>\n       *\n       * <code>.pactus.ProposalInfo proposal = 1 [json_name = \"proposal\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.BlockchainOuterClass.ProposalInfo, pactus.BlockchainOuterClass.ProposalInfo.Builder, pactus.BlockchainOuterClass.ProposalInfoOrBuilder> \n          internalGetProposalFieldBuilder() {\n        if (proposalBuilder_ == null) {\n          proposalBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.BlockchainOuterClass.ProposalInfo, pactus.BlockchainOuterClass.ProposalInfo.Builder, pactus.BlockchainOuterClass.ProposalInfoOrBuilder>(\n                  getProposal(),\n                  getParentForChildren(),\n                  isClean());\n          proposal_ = null;\n        }\n        return proposalBuilder_;\n      }\n\n      private java.util.List<pactus.BlockchainOuterClass.ConsensusInfo> instances_ =\n        java.util.Collections.emptyList();\n      private void ensureInstancesIsMutable() {\n        if (!((bitField0_ & 0x00000002) != 0)) {\n          instances_ = new java.util.ArrayList<pactus.BlockchainOuterClass.ConsensusInfo>(instances_);\n          bitField0_ |= 0x00000002;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.ConsensusInfo, pactus.BlockchainOuterClass.ConsensusInfo.Builder, pactus.BlockchainOuterClass.ConsensusInfoOrBuilder> instancesBuilder_;\n\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.ConsensusInfo> getInstancesList() {\n        if (instancesBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(instances_);\n        } else {\n          return instancesBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public int getInstancesCount() {\n        if (instancesBuilder_ == null) {\n          return instances_.size();\n        } else {\n          return instancesBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ConsensusInfo getInstances(int index) {\n        if (instancesBuilder_ == null) {\n          return instances_.get(index);\n        } else {\n          return instancesBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder setInstances(\n          int index, pactus.BlockchainOuterClass.ConsensusInfo value) {\n        if (instancesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureInstancesIsMutable();\n          instances_.set(index, value);\n          onChanged();\n        } else {\n          instancesBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder setInstances(\n          int index, pactus.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {\n        if (instancesBuilder_ == null) {\n          ensureInstancesIsMutable();\n          instances_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          instancesBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder addInstances(pactus.BlockchainOuterClass.ConsensusInfo value) {\n        if (instancesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureInstancesIsMutable();\n          instances_.add(value);\n          onChanged();\n        } else {\n          instancesBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder addInstances(\n          int index, pactus.BlockchainOuterClass.ConsensusInfo value) {\n        if (instancesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureInstancesIsMutable();\n          instances_.add(index, value);\n          onChanged();\n        } else {\n          instancesBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder addInstances(\n          pactus.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {\n        if (instancesBuilder_ == null) {\n          ensureInstancesIsMutable();\n          instances_.add(builderForValue.build());\n          onChanged();\n        } else {\n          instancesBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder addInstances(\n          int index, pactus.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {\n        if (instancesBuilder_ == null) {\n          ensureInstancesIsMutable();\n          instances_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          instancesBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder addAllInstances(\n          java.lang.Iterable<? extends pactus.BlockchainOuterClass.ConsensusInfo> values) {\n        if (instancesBuilder_ == null) {\n          ensureInstancesIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, instances_);\n          onChanged();\n        } else {\n          instancesBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder clearInstances() {\n        if (instancesBuilder_ == null) {\n          instances_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000002);\n          onChanged();\n        } else {\n          instancesBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public Builder removeInstances(int index) {\n        if (instancesBuilder_ == null) {\n          ensureInstancesIsMutable();\n          instances_.remove(index);\n          onChanged();\n        } else {\n          instancesBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ConsensusInfo.Builder getInstancesBuilder(\n          int index) {\n        return internalGetInstancesFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(\n          int index) {\n        if (instancesBuilder_ == null) {\n          return instances_.get(index);  } else {\n          return instancesBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public java.util.List<? extends pactus.BlockchainOuterClass.ConsensusInfoOrBuilder> \n           getInstancesOrBuilderList() {\n        if (instancesBuilder_ != null) {\n          return instancesBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(instances_);\n        }\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder() {\n        return internalGetInstancesFieldBuilder().addBuilder(\n            pactus.BlockchainOuterClass.ConsensusInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public pactus.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder(\n          int index) {\n        return internalGetInstancesFieldBuilder().addBuilder(\n            index, pactus.BlockchainOuterClass.ConsensusInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of consensus instances.\n       * </pre>\n       *\n       * <code>repeated .pactus.ConsensusInfo instances = 2 [json_name = \"instances\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.ConsensusInfo.Builder> \n           getInstancesBuilderList() {\n        return internalGetInstancesFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.ConsensusInfo, pactus.BlockchainOuterClass.ConsensusInfo.Builder, pactus.BlockchainOuterClass.ConsensusInfoOrBuilder> \n          internalGetInstancesFieldBuilder() {\n        if (instancesBuilder_ == null) {\n          instancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.BlockchainOuterClass.ConsensusInfo, pactus.BlockchainOuterClass.ConsensusInfo.Builder, pactus.BlockchainOuterClass.ConsensusInfoOrBuilder>(\n                  instances_,\n                  ((bitField0_ & 0x00000002) != 0),\n                  getParentForChildren(),\n                  isClean());\n          instances_ = null;\n        }\n        return instancesBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoResponse)\n    private static final pactus.BlockchainOuterClass.GetConsensusInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetConsensusInfoResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetConsensusInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetConsensusInfoResponse>() {\n      @java.lang.Override\n      public GetConsensusInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetConsensusInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetConsensusInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTxPoolContentRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The type of transactions to retrieve from the transaction pool. 0 means all types.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    int getPayloadTypeValue();\n    /**\n     * <pre>\n     * The type of transactions to retrieve from the transaction pool. 0 means all types.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    pactus.TransactionOuterClass.PayloadType getPayloadType();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving transactions in the transaction pool.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTxPoolContentRequest}\n   */\n  public static final class GetTxPoolContentRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentRequest)\n      GetTxPoolContentRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTxPoolContentRequest\");\n    }\n    // Use GetTxPoolContentRequest.newBuilder() to construct.\n    private GetTxPoolContentRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTxPoolContentRequest() {\n      payloadType_ = 0;\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class);\n    }\n\n    public static final int PAYLOAD_TYPE_FIELD_NUMBER = 1;\n    private int payloadType_ = 0;\n    /**\n     * <pre>\n     * The type of transactions to retrieve from the transaction pool. 0 means all types.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    @java.lang.Override public int getPayloadTypeValue() {\n      return payloadType_;\n    }\n    /**\n     * <pre>\n     * The type of transactions to retrieve from the transaction pool. 0 means all types.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    @java.lang.Override public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n      pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n      return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        output.writeEnum(1, payloadType_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(1, payloadType_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetTxPoolContentRequest)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetTxPoolContentRequest other = (pactus.BlockchainOuterClass.GetTxPoolContentRequest) obj;\n\n      if (payloadType_ != other.payloadType_) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + payloadType_;\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetTxPoolContentRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving transactions in the transaction pool.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTxPoolContentRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentRequest)\n        pactus.BlockchainOuterClass.GetTxPoolContentRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetTxPoolContentRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        payloadType_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentRequest build() {\n        pactus.BlockchainOuterClass.GetTxPoolContentRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentRequest buildPartial() {\n        pactus.BlockchainOuterClass.GetTxPoolContentRequest result = new pactus.BlockchainOuterClass.GetTxPoolContentRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetTxPoolContentRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.payloadType_ = payloadType_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetTxPoolContentRequest) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetTxPoolContentRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetTxPoolContentRequest other) {\n        if (other == pactus.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance()) return this;\n        if (other.payloadType_ != 0) {\n          setPayloadTypeValue(other.getPayloadTypeValue());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                payloadType_ = input.readEnum();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int payloadType_ = 0;\n      /**\n       * <pre>\n       * The type of transactions to retrieve from the transaction pool. 0 means all types.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n       * @return The enum numeric value on the wire for payloadType.\n       */\n      @java.lang.Override public int getPayloadTypeValue() {\n        return payloadType_;\n      }\n      /**\n       * <pre>\n       * The type of transactions to retrieve from the transaction pool. 0 means all types.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n       * @param value The enum numeric value on the wire for payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadTypeValue(int value) {\n        payloadType_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transactions to retrieve from the transaction pool. 0 means all types.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n       * @return The payloadType.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n        pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n        return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of transactions to retrieve from the transaction pool. 0 means all types.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n       * @param value The payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadType(pactus.TransactionOuterClass.PayloadType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000001;\n        payloadType_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transactions to retrieve from the transaction pool. 0 means all types.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 1 [json_name = \"payloadType\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPayloadType() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        payloadType_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentRequest)\n    private static final pactus.BlockchainOuterClass.GetTxPoolContentRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetTxPoolContentRequest();\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTxPoolContentRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetTxPoolContentRequest>() {\n      @java.lang.Override\n      public GetTxPoolContentRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTxPoolContentRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTxPoolContentRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTxPoolContentResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    java.util.List<pactus.TransactionOuterClass.TransactionInfo> \n        getTxsList();\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfo getTxs(int index);\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    int getTxsCount();\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n        getTxsOrBuilderList();\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message contains transactions in the transaction pool.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTxPoolContentResponse}\n   */\n  public static final class GetTxPoolContentResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentResponse)\n      GetTxPoolContentResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTxPoolContentResponse\");\n    }\n    // Use GetTxPoolContentResponse.newBuilder() to construct.\n    private GetTxPoolContentResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTxPoolContentResponse() {\n      txs_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class);\n    }\n\n    public static final int TXS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.TransactionOuterClass.TransactionInfo> txs_;\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.TransactionOuterClass.TransactionInfo> getTxsList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n        getTxsOrBuilderList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public int getTxsCount() {\n      return txs_.size();\n    }\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfo getTxs(int index) {\n      return txs_.get(index);\n    }\n    /**\n     * <pre>\n     * List of transactions currently in the pool.\n     * </pre>\n     *\n     * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n        int index) {\n      return txs_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < txs_.size(); i++) {\n        output.writeMessage(1, txs_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      for (int i = 0; i < txs_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, txs_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.GetTxPoolContentResponse)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.GetTxPoolContentResponse other = (pactus.BlockchainOuterClass.GetTxPoolContentResponse) obj;\n\n      if (!getTxsList()\n          .equals(other.getTxsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getTxsCount() > 0) {\n        hash = (37 * hash) + TXS_FIELD_NUMBER;\n        hash = (53 * hash) + getTxsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.GetTxPoolContentResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains transactions in the transaction pool.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTxPoolContentResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentResponse)\n        pactus.BlockchainOuterClass.GetTxPoolContentResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.GetTxPoolContentResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n        } else {\n          txs_ = null;\n          txsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000001);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentResponse build() {\n        pactus.BlockchainOuterClass.GetTxPoolContentResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.GetTxPoolContentResponse buildPartial() {\n        pactus.BlockchainOuterClass.GetTxPoolContentResponse result = new pactus.BlockchainOuterClass.GetTxPoolContentResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.BlockchainOuterClass.GetTxPoolContentResponse result) {\n        if (txsBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0)) {\n            txs_ = java.util.Collections.unmodifiableList(txs_);\n            bitField0_ = (bitField0_ & ~0x00000001);\n          }\n          result.txs_ = txs_;\n        } else {\n          result.txs_ = txsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.GetTxPoolContentResponse result) {\n        int from_bitField0_ = bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.GetTxPoolContentResponse) {\n          return mergeFrom((pactus.BlockchainOuterClass.GetTxPoolContentResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.GetTxPoolContentResponse other) {\n        if (other == pactus.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance()) return this;\n        if (txsBuilder_ == null) {\n          if (!other.txs_.isEmpty()) {\n            if (txs_.isEmpty()) {\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000001);\n            } else {\n              ensureTxsIsMutable();\n              txs_.addAll(other.txs_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.txs_.isEmpty()) {\n            if (txsBuilder_.isEmpty()) {\n              txsBuilder_.dispose();\n              txsBuilder_ = null;\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000001);\n              txsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetTxsFieldBuilder() : null;\n            } else {\n              txsBuilder_.addAllMessages(other.txs_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                pactus.TransactionOuterClass.TransactionInfo m =\n                    input.readMessage(\n                        pactus.TransactionOuterClass.TransactionInfo.parser(),\n                        extensionRegistry);\n                if (txsBuilder_ == null) {\n                  ensureTxsIsMutable();\n                  txs_.add(m);\n                } else {\n                  txsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.util.List<pactus.TransactionOuterClass.TransactionInfo> txs_ =\n        java.util.Collections.emptyList();\n      private void ensureTxsIsMutable() {\n        if (!((bitField0_ & 0x00000001) != 0)) {\n          txs_ = new java.util.ArrayList<pactus.TransactionOuterClass.TransactionInfo>(txs_);\n          bitField0_ |= 0x00000001;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_;\n\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.TransactionInfo> getTxsList() {\n        if (txsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(txs_);\n        } else {\n          return txsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public int getTxsCount() {\n        if (txsBuilder_ == null) {\n          return txs_.size();\n        } else {\n          return txsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo getTxs(int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);\n        } else {\n          return txsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.set(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder addAllTxs(\n          java.lang.Iterable<? extends pactus.TransactionOuterClass.TransactionInfo> values) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, txs_);\n          onChanged();\n        } else {\n          txsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder clearTxs() {\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000001);\n          onChanged();\n        } else {\n          txsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public Builder removeTxs(int index) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.remove(index);\n          onChanged();\n        } else {\n          txsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder(\n          int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);  } else {\n          return txsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<? extends pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n           getTxsOrBuilderList() {\n        if (txsBuilder_ != null) {\n          return txsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(txs_);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() {\n        return internalGetTxsFieldBuilder().addBuilder(\n            pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().addBuilder(\n            index, pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions currently in the pool.\n       * </pre>\n       *\n       * <code>repeated .pactus.TransactionInfo txs = 1 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.TransactionInfo.Builder> \n           getTxsBuilderList() {\n        return internalGetTxsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n          internalGetTxsFieldBuilder() {\n        if (txsBuilder_ == null) {\n          txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder>(\n                  txs_,\n                  ((bitField0_ & 0x00000001) != 0),\n                  getParentForChildren(),\n                  isClean());\n          txs_ = null;\n        }\n        return txsBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentResponse)\n    private static final pactus.BlockchainOuterClass.GetTxPoolContentResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.GetTxPoolContentResponse();\n    }\n\n    public static pactus.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTxPoolContentResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetTxPoolContentResponse>() {\n      @java.lang.Override\n      public GetTxPoolContentResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTxPoolContentResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTxPoolContentResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ValidatorInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ValidatorInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The hash of the validator.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the validator.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n\n    /**\n     * <pre>\n     * The serialized data of the validator.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    java.lang.String getData();\n    /**\n     * <pre>\n     * The serialized data of the validator.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    com.google.protobuf.ByteString\n        getDataBytes();\n\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * The unique number assigned to the validator.\n     * </pre>\n     *\n     * <code>int32 number = 4 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    int getNumber();\n\n    /**\n     * <pre>\n     * The stake of the validator in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 stake = 5 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    long getStake();\n\n    /**\n     * <pre>\n     * The height at which the validator last bonded.\n     * </pre>\n     *\n     * <code>uint32 last_bonding_height = 6 [json_name = \"lastBondingHeight\"];</code>\n     * @return The lastBondingHeight.\n     */\n    int getLastBondingHeight();\n\n    /**\n     * <pre>\n     * The height at which the validator last participated in sortition.\n     * </pre>\n     *\n     * <code>uint32 last_sortition_height = 7 [json_name = \"lastSortitionHeight\"];</code>\n     * @return The lastSortitionHeight.\n     */\n    int getLastSortitionHeight();\n\n    /**\n     * <pre>\n     * The height at which the validator will unbond.\n     * </pre>\n     *\n     * <code>uint32 unbonding_height = 8 [json_name = \"unbondingHeight\"];</code>\n     * @return The unbondingHeight.\n     */\n    int getUnbondingHeight();\n\n    /**\n     * <pre>\n     * The address of the validator.\n     * </pre>\n     *\n     * <code>string address = 9 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the validator.\n     * </pre>\n     *\n     * <code>string address = 9 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The availability score of the validator.\n     * </pre>\n     *\n     * <code>double availability_score = 10 [json_name = \"availabilityScore\"];</code>\n     * @return The availabilityScore.\n     */\n    double getAvailabilityScore();\n\n    /**\n     * <pre>\n     * The protocol version of the validator.\n     * </pre>\n     *\n     * <code>int32 protocol_version = 11 [json_name = \"protocolVersion\"];</code>\n     * @return The protocolVersion.\n     */\n    int getProtocolVersion();\n\n    /**\n     * <pre>\n     * Whether the validator is delegated.\n     * </pre>\n     *\n     * <code>bool is_delegated = 12 [json_name = \"isDelegated\"];</code>\n     * @return The isDelegated.\n     */\n    boolean getIsDelegated();\n\n    /**\n     * <pre>\n     * The address of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    java.lang.String getDelegateOwner();\n    /**\n     * <pre>\n     * The address of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    com.google.protobuf.ByteString\n        getDelegateOwnerBytes();\n\n    /**\n     * <pre>\n     * The share of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 14 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    long getDelegateShare();\n\n    /**\n     * <pre>\n     * The expiry of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 15 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    int getDelegateExpiry();\n  }\n  /**\n   * <pre>\n   * Message contains information about a validator.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ValidatorInfo}\n   */\n  public static final class ValidatorInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ValidatorInfo)\n      ValidatorInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ValidatorInfo\");\n    }\n    // Use ValidatorInfo.newBuilder() to construct.\n    private ValidatorInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ValidatorInfo() {\n      hash_ = \"\";\n      data_ = \"\";\n      publicKey_ = \"\";\n      address_ = \"\";\n      delegateOwner_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.ValidatorInfo.class, pactus.BlockchainOuterClass.ValidatorInfo.Builder.class);\n    }\n\n    public static final int HASH_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the validator.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the validator.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DATA_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object data_ = \"\";\n    /**\n     * <pre>\n     * The serialized data of the validator.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    @java.lang.Override\n    public java.lang.String getData() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        data_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The serialized data of the validator.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDataBytes() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        data_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int NUMBER_FIELD_NUMBER = 4;\n    private int number_ = 0;\n    /**\n     * <pre>\n     * The unique number assigned to the validator.\n     * </pre>\n     *\n     * <code>int32 number = 4 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    @java.lang.Override\n    public int getNumber() {\n      return number_;\n    }\n\n    public static final int STAKE_FIELD_NUMBER = 5;\n    private long stake_ = 0L;\n    /**\n     * <pre>\n     * The stake of the validator in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 stake = 5 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    @java.lang.Override\n    public long getStake() {\n      return stake_;\n    }\n\n    public static final int LAST_BONDING_HEIGHT_FIELD_NUMBER = 6;\n    private int lastBondingHeight_ = 0;\n    /**\n     * <pre>\n     * The height at which the validator last bonded.\n     * </pre>\n     *\n     * <code>uint32 last_bonding_height = 6 [json_name = \"lastBondingHeight\"];</code>\n     * @return The lastBondingHeight.\n     */\n    @java.lang.Override\n    public int getLastBondingHeight() {\n      return lastBondingHeight_;\n    }\n\n    public static final int LAST_SORTITION_HEIGHT_FIELD_NUMBER = 7;\n    private int lastSortitionHeight_ = 0;\n    /**\n     * <pre>\n     * The height at which the validator last participated in sortition.\n     * </pre>\n     *\n     * <code>uint32 last_sortition_height = 7 [json_name = \"lastSortitionHeight\"];</code>\n     * @return The lastSortitionHeight.\n     */\n    @java.lang.Override\n    public int getLastSortitionHeight() {\n      return lastSortitionHeight_;\n    }\n\n    public static final int UNBONDING_HEIGHT_FIELD_NUMBER = 8;\n    private int unbondingHeight_ = 0;\n    /**\n     * <pre>\n     * The height at which the validator will unbond.\n     * </pre>\n     *\n     * <code>uint32 unbonding_height = 8 [json_name = \"unbondingHeight\"];</code>\n     * @return The unbondingHeight.\n     */\n    @java.lang.Override\n    public int getUnbondingHeight() {\n      return unbondingHeight_;\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 9;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator.\n     * </pre>\n     *\n     * <code>string address = 9 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator.\n     * </pre>\n     *\n     * <code>string address = 9 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AVAILABILITY_SCORE_FIELD_NUMBER = 10;\n    private double availabilityScore_ = 0D;\n    /**\n     * <pre>\n     * The availability score of the validator.\n     * </pre>\n     *\n     * <code>double availability_score = 10 [json_name = \"availabilityScore\"];</code>\n     * @return The availabilityScore.\n     */\n    @java.lang.Override\n    public double getAvailabilityScore() {\n      return availabilityScore_;\n    }\n\n    public static final int PROTOCOL_VERSION_FIELD_NUMBER = 11;\n    private int protocolVersion_ = 0;\n    /**\n     * <pre>\n     * The protocol version of the validator.\n     * </pre>\n     *\n     * <code>int32 protocol_version = 11 [json_name = \"protocolVersion\"];</code>\n     * @return The protocolVersion.\n     */\n    @java.lang.Override\n    public int getProtocolVersion() {\n      return protocolVersion_;\n    }\n\n    public static final int IS_DELEGATED_FIELD_NUMBER = 12;\n    private boolean isDelegated_ = false;\n    /**\n     * <pre>\n     * Whether the validator is delegated.\n     * </pre>\n     *\n     * <code>bool is_delegated = 12 [json_name = \"isDelegated\"];</code>\n     * @return The isDelegated.\n     */\n    @java.lang.Override\n    public boolean getIsDelegated() {\n      return isDelegated_;\n    }\n\n    public static final int DELEGATE_OWNER_FIELD_NUMBER = 13;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object delegateOwner_ = \"\";\n    /**\n     * <pre>\n     * The address of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    @java.lang.Override\n    public java.lang.String getDelegateOwner() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        delegateOwner_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDelegateOwnerBytes() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        delegateOwner_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_SHARE_FIELD_NUMBER = 14;\n    private long delegateShare_ = 0L;\n    /**\n     * <pre>\n     * The share of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 14 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    @java.lang.Override\n    public long getDelegateShare() {\n      return delegateShare_;\n    }\n\n    public static final int DELEGATE_EXPIRY_FIELD_NUMBER = 15;\n    private int delegateExpiry_ = 0;\n    /**\n     * <pre>\n     * The expiry of the stake owner of the validator.\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 15 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    @java.lang.Override\n    public int getDelegateExpiry() {\n      return delegateExpiry_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, data_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, publicKey_);\n      }\n      if (number_ != 0) {\n        output.writeInt32(4, number_);\n      }\n      if (stake_ != 0L) {\n        output.writeInt64(5, stake_);\n      }\n      if (lastBondingHeight_ != 0) {\n        output.writeUInt32(6, lastBondingHeight_);\n      }\n      if (lastSortitionHeight_ != 0) {\n        output.writeUInt32(7, lastSortitionHeight_);\n      }\n      if (unbondingHeight_ != 0) {\n        output.writeUInt32(8, unbondingHeight_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 9, address_);\n      }\n      if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) {\n        output.writeDouble(10, availabilityScore_);\n      }\n      if (protocolVersion_ != 0) {\n        output.writeInt32(11, protocolVersion_);\n      }\n      if (isDelegated_ != false) {\n        output.writeBool(12, isDelegated_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 13, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        output.writeInt64(14, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        output.writeUInt32(15, delegateExpiry_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, data_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, publicKey_);\n      }\n      if (number_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(4, number_);\n      }\n      if (stake_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(5, stake_);\n      }\n      if (lastBondingHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(6, lastBondingHeight_);\n      }\n      if (lastSortitionHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(7, lastSortitionHeight_);\n      }\n      if (unbondingHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(8, unbondingHeight_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(9, address_);\n      }\n      if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeDoubleSize(10, availabilityScore_);\n      }\n      if (protocolVersion_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(11, protocolVersion_);\n      }\n      if (isDelegated_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(12, isDelegated_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(13, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(14, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(15, delegateExpiry_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.ValidatorInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.ValidatorInfo other = (pactus.BlockchainOuterClass.ValidatorInfo) obj;\n\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (!getData()\n          .equals(other.getData())) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (getNumber()\n          != other.getNumber()) return false;\n      if (getStake()\n          != other.getStake()) return false;\n      if (getLastBondingHeight()\n          != other.getLastBondingHeight()) return false;\n      if (getLastSortitionHeight()\n          != other.getLastSortitionHeight()) return false;\n      if (getUnbondingHeight()\n          != other.getUnbondingHeight()) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (java.lang.Double.doubleToLongBits(getAvailabilityScore())\n          != java.lang.Double.doubleToLongBits(\n              other.getAvailabilityScore())) return false;\n      if (getProtocolVersion()\n          != other.getProtocolVersion()) return false;\n      if (getIsDelegated()\n          != other.getIsDelegated()) return false;\n      if (!getDelegateOwner()\n          .equals(other.getDelegateOwner())) return false;\n      if (getDelegateShare()\n          != other.getDelegateShare()) return false;\n      if (getDelegateExpiry()\n          != other.getDelegateExpiry()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (37 * hash) + DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getData().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + NUMBER_FIELD_NUMBER;\n      hash = (53 * hash) + getNumber();\n      hash = (37 * hash) + STAKE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getStake());\n      hash = (37 * hash) + LAST_BONDING_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getLastBondingHeight();\n      hash = (37 * hash) + LAST_SORTITION_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getLastSortitionHeight();\n      hash = (37 * hash) + UNBONDING_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getUnbondingHeight();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + AVAILABILITY_SCORE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          java.lang.Double.doubleToLongBits(getAvailabilityScore()));\n      hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER;\n      hash = (53 * hash) + getProtocolVersion();\n      hash = (37 * hash) + IS_DELEGATED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIsDelegated());\n      hash = (37 * hash) + DELEGATE_OWNER_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateOwner().hashCode();\n      hash = (37 * hash) + DELEGATE_SHARE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getDelegateShare());\n      hash = (37 * hash) + DELEGATE_EXPIRY_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateExpiry();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ValidatorInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.ValidatorInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about a validator.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ValidatorInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ValidatorInfo)\n        pactus.BlockchainOuterClass.ValidatorInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.ValidatorInfo.class, pactus.BlockchainOuterClass.ValidatorInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.ValidatorInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        hash_ = \"\";\n        data_ = \"\";\n        publicKey_ = \"\";\n        number_ = 0;\n        stake_ = 0L;\n        lastBondingHeight_ = 0;\n        lastSortitionHeight_ = 0;\n        unbondingHeight_ = 0;\n        address_ = \"\";\n        availabilityScore_ = 0D;\n        protocolVersion_ = 0;\n        isDelegated_ = false;\n        delegateOwner_ = \"\";\n        delegateShare_ = 0L;\n        delegateExpiry_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ValidatorInfo build() {\n        pactus.BlockchainOuterClass.ValidatorInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ValidatorInfo buildPartial() {\n        pactus.BlockchainOuterClass.ValidatorInfo result = new pactus.BlockchainOuterClass.ValidatorInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.ValidatorInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.hash_ = hash_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.data_ = data_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.number_ = number_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.stake_ = stake_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.lastBondingHeight_ = lastBondingHeight_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.lastSortitionHeight_ = lastSortitionHeight_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.unbondingHeight_ = unbondingHeight_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.availabilityScore_ = availabilityScore_;\n        }\n        if (((from_bitField0_ & 0x00000400) != 0)) {\n          result.protocolVersion_ = protocolVersion_;\n        }\n        if (((from_bitField0_ & 0x00000800) != 0)) {\n          result.isDelegated_ = isDelegated_;\n        }\n        if (((from_bitField0_ & 0x00001000) != 0)) {\n          result.delegateOwner_ = delegateOwner_;\n        }\n        if (((from_bitField0_ & 0x00002000) != 0)) {\n          result.delegateShare_ = delegateShare_;\n        }\n        if (((from_bitField0_ & 0x00004000) != 0)) {\n          result.delegateExpiry_ = delegateExpiry_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.ValidatorInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.ValidatorInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.ValidatorInfo other) {\n        if (other == pactus.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()) return this;\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getData().isEmpty()) {\n          data_ = other.data_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getNumber() != 0) {\n          setNumber(other.getNumber());\n        }\n        if (other.getStake() != 0L) {\n          setStake(other.getStake());\n        }\n        if (other.getLastBondingHeight() != 0) {\n          setLastBondingHeight(other.getLastBondingHeight());\n        }\n        if (other.getLastSortitionHeight() != 0) {\n          setLastSortitionHeight(other.getLastSortitionHeight());\n        }\n        if (other.getUnbondingHeight() != 0) {\n          setUnbondingHeight(other.getUnbondingHeight());\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000100;\n          onChanged();\n        }\n        if (java.lang.Double.doubleToRawLongBits(other.getAvailabilityScore()) != 0) {\n          setAvailabilityScore(other.getAvailabilityScore());\n        }\n        if (other.getProtocolVersion() != 0) {\n          setProtocolVersion(other.getProtocolVersion());\n        }\n        if (other.getIsDelegated() != false) {\n          setIsDelegated(other.getIsDelegated());\n        }\n        if (!other.getDelegateOwner().isEmpty()) {\n          delegateOwner_ = other.delegateOwner_;\n          bitField0_ |= 0x00001000;\n          onChanged();\n        }\n        if (other.getDelegateShare() != 0L) {\n          setDelegateShare(other.getDelegateShare());\n        }\n        if (other.getDelegateExpiry() != 0) {\n          setDelegateExpiry(other.getDelegateExpiry());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                data_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                number_ = input.readInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                stake_ = input.readInt64();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 48: {\n                lastBondingHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 56: {\n                lastSortitionHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 64: {\n                unbondingHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 64\n              case 74: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 74\n              case 81: {\n                availabilityScore_ = input.readDouble();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 81\n              case 88: {\n                protocolVersion_ = input.readInt32();\n                bitField0_ |= 0x00000400;\n                break;\n              } // case 88\n              case 96: {\n                isDelegated_ = input.readBool();\n                bitField0_ |= 0x00000800;\n                break;\n              } // case 96\n              case 106: {\n                delegateOwner_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00001000;\n                break;\n              } // case 106\n              case 112: {\n                delegateShare_ = input.readInt64();\n                bitField0_ |= 0x00002000;\n                break;\n              } // case 112\n              case 120: {\n                delegateExpiry_ = input.readUInt32();\n                bitField0_ |= 0x00004000;\n                break;\n              } // case 120\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the validator.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the validator.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the validator.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the validator.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the validator.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object data_ = \"\";\n      /**\n       * <pre>\n       * The serialized data of the validator.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The data.\n       */\n      public java.lang.String getData() {\n        java.lang.Object ref = data_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          data_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The serialized data of the validator.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The bytes for data.\n       */\n      public com.google.protobuf.ByteString\n          getDataBytes() {\n        java.lang.Object ref = data_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          data_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The serialized data of the validator.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setData(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The serialized data of the validator.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearData() {\n        data_ = getDefaultInstance().getData();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The serialized data of the validator.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The bytes for data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDataBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private int number_ ;\n      /**\n       * <pre>\n       * The unique number assigned to the validator.\n       * </pre>\n       *\n       * <code>int32 number = 4 [json_name = \"number\"];</code>\n       * @return The number.\n       */\n      @java.lang.Override\n      public int getNumber() {\n        return number_;\n      }\n      /**\n       * <pre>\n       * The unique number assigned to the validator.\n       * </pre>\n       *\n       * <code>int32 number = 4 [json_name = \"number\"];</code>\n       * @param value The number to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNumber(int value) {\n\n        number_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique number assigned to the validator.\n       * </pre>\n       *\n       * <code>int32 number = 4 [json_name = \"number\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNumber() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        number_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long stake_ ;\n      /**\n       * <pre>\n       * The stake of the validator in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 5 [json_name = \"stake\"];</code>\n       * @return The stake.\n       */\n      @java.lang.Override\n      public long getStake() {\n        return stake_;\n      }\n      /**\n       * <pre>\n       * The stake of the validator in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 5 [json_name = \"stake\"];</code>\n       * @param value The stake to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStake(long value) {\n\n        stake_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The stake of the validator in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 5 [json_name = \"stake\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStake() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        stake_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int lastBondingHeight_ ;\n      /**\n       * <pre>\n       * The height at which the validator last bonded.\n       * </pre>\n       *\n       * <code>uint32 last_bonding_height = 6 [json_name = \"lastBondingHeight\"];</code>\n       * @return The lastBondingHeight.\n       */\n      @java.lang.Override\n      public int getLastBondingHeight() {\n        return lastBondingHeight_;\n      }\n      /**\n       * <pre>\n       * The height at which the validator last bonded.\n       * </pre>\n       *\n       * <code>uint32 last_bonding_height = 6 [json_name = \"lastBondingHeight\"];</code>\n       * @param value The lastBondingHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBondingHeight(int value) {\n\n        lastBondingHeight_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height at which the validator last bonded.\n       * </pre>\n       *\n       * <code>uint32 last_bonding_height = 6 [json_name = \"lastBondingHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastBondingHeight() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        lastBondingHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int lastSortitionHeight_ ;\n      /**\n       * <pre>\n       * The height at which the validator last participated in sortition.\n       * </pre>\n       *\n       * <code>uint32 last_sortition_height = 7 [json_name = \"lastSortitionHeight\"];</code>\n       * @return The lastSortitionHeight.\n       */\n      @java.lang.Override\n      public int getLastSortitionHeight() {\n        return lastSortitionHeight_;\n      }\n      /**\n       * <pre>\n       * The height at which the validator last participated in sortition.\n       * </pre>\n       *\n       * <code>uint32 last_sortition_height = 7 [json_name = \"lastSortitionHeight\"];</code>\n       * @param value The lastSortitionHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastSortitionHeight(int value) {\n\n        lastSortitionHeight_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height at which the validator last participated in sortition.\n       * </pre>\n       *\n       * <code>uint32 last_sortition_height = 7 [json_name = \"lastSortitionHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastSortitionHeight() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        lastSortitionHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int unbondingHeight_ ;\n      /**\n       * <pre>\n       * The height at which the validator will unbond.\n       * </pre>\n       *\n       * <code>uint32 unbonding_height = 8 [json_name = \"unbondingHeight\"];</code>\n       * @return The unbondingHeight.\n       */\n      @java.lang.Override\n      public int getUnbondingHeight() {\n        return unbondingHeight_;\n      }\n      /**\n       * <pre>\n       * The height at which the validator will unbond.\n       * </pre>\n       *\n       * <code>uint32 unbonding_height = 8 [json_name = \"unbondingHeight\"];</code>\n       * @param value The unbondingHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setUnbondingHeight(int value) {\n\n        unbondingHeight_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height at which the validator will unbond.\n       * </pre>\n       *\n       * <code>uint32 unbonding_height = 8 [json_name = \"unbondingHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearUnbondingHeight() {\n        bitField0_ = (bitField0_ & ~0x00000080);\n        unbondingHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator.\n       * </pre>\n       *\n       * <code>string address = 9 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator.\n       * </pre>\n       *\n       * <code>string address = 9 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator.\n       * </pre>\n       *\n       * <code>string address = 9 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator.\n       * </pre>\n       *\n       * <code>string address = 9 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000100);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator.\n       * </pre>\n       *\n       * <code>string address = 9 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n\n      private double availabilityScore_ ;\n      /**\n       * <pre>\n       * The availability score of the validator.\n       * </pre>\n       *\n       * <code>double availability_score = 10 [json_name = \"availabilityScore\"];</code>\n       * @return The availabilityScore.\n       */\n      @java.lang.Override\n      public double getAvailabilityScore() {\n        return availabilityScore_;\n      }\n      /**\n       * <pre>\n       * The availability score of the validator.\n       * </pre>\n       *\n       * <code>double availability_score = 10 [json_name = \"availabilityScore\"];</code>\n       * @param value The availabilityScore to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAvailabilityScore(double value) {\n\n        availabilityScore_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The availability score of the validator.\n       * </pre>\n       *\n       * <code>double availability_score = 10 [json_name = \"availabilityScore\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAvailabilityScore() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        availabilityScore_ = 0D;\n        onChanged();\n        return this;\n      }\n\n      private int protocolVersion_ ;\n      /**\n       * <pre>\n       * The protocol version of the validator.\n       * </pre>\n       *\n       * <code>int32 protocol_version = 11 [json_name = \"protocolVersion\"];</code>\n       * @return The protocolVersion.\n       */\n      @java.lang.Override\n      public int getProtocolVersion() {\n        return protocolVersion_;\n      }\n      /**\n       * <pre>\n       * The protocol version of the validator.\n       * </pre>\n       *\n       * <code>int32 protocol_version = 11 [json_name = \"protocolVersion\"];</code>\n       * @param value The protocolVersion to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProtocolVersion(int value) {\n\n        protocolVersion_ = value;\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The protocol version of the validator.\n       * </pre>\n       *\n       * <code>int32 protocol_version = 11 [json_name = \"protocolVersion\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearProtocolVersion() {\n        bitField0_ = (bitField0_ & ~0x00000400);\n        protocolVersion_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private boolean isDelegated_ ;\n      /**\n       * <pre>\n       * Whether the validator is delegated.\n       * </pre>\n       *\n       * <code>bool is_delegated = 12 [json_name = \"isDelegated\"];</code>\n       * @return The isDelegated.\n       */\n      @java.lang.Override\n      public boolean getIsDelegated() {\n        return isDelegated_;\n      }\n      /**\n       * <pre>\n       * Whether the validator is delegated.\n       * </pre>\n       *\n       * <code>bool is_delegated = 12 [json_name = \"isDelegated\"];</code>\n       * @param value The isDelegated to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIsDelegated(boolean value) {\n\n        isDelegated_ = value;\n        bitField0_ |= 0x00000800;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Whether the validator is delegated.\n       * </pre>\n       *\n       * <code>bool is_delegated = 12 [json_name = \"isDelegated\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIsDelegated() {\n        bitField0_ = (bitField0_ & ~0x00000800);\n        isDelegated_ = false;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object delegateOwner_ = \"\";\n      /**\n       * <pre>\n       * The address of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n       * @return The delegateOwner.\n       */\n      public java.lang.String getDelegateOwner() {\n        java.lang.Object ref = delegateOwner_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          delegateOwner_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n       * @return The bytes for delegateOwner.\n       */\n      public com.google.protobuf.ByteString\n          getDelegateOwnerBytes() {\n        java.lang.Object ref = delegateOwner_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          delegateOwner_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n       * @param value The delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwner(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        delegateOwner_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateOwner() {\n        delegateOwner_ = getDefaultInstance().getDelegateOwner();\n        bitField0_ = (bitField0_ & ~0x00001000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>string delegate_owner = 13 [json_name = \"delegateOwner\"];</code>\n       * @param value The bytes for delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwnerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        delegateOwner_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n\n      private long delegateShare_ ;\n      /**\n       * <pre>\n       * The share of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 14 [json_name = \"delegateShare\"];</code>\n       * @return The delegateShare.\n       */\n      @java.lang.Override\n      public long getDelegateShare() {\n        return delegateShare_;\n      }\n      /**\n       * <pre>\n       * The share of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 14 [json_name = \"delegateShare\"];</code>\n       * @param value The delegateShare to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateShare(long value) {\n\n        delegateShare_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The share of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 14 [json_name = \"delegateShare\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateShare() {\n        bitField0_ = (bitField0_ & ~0x00002000);\n        delegateShare_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int delegateExpiry_ ;\n      /**\n       * <pre>\n       * The expiry of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 15 [json_name = \"delegateExpiry\"];</code>\n       * @return The delegateExpiry.\n       */\n      @java.lang.Override\n      public int getDelegateExpiry() {\n        return delegateExpiry_;\n      }\n      /**\n       * <pre>\n       * The expiry of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 15 [json_name = \"delegateExpiry\"];</code>\n       * @param value The delegateExpiry to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateExpiry(int value) {\n\n        delegateExpiry_ = value;\n        bitField0_ |= 0x00004000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The expiry of the stake owner of the validator.\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 15 [json_name = \"delegateExpiry\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateExpiry() {\n        bitField0_ = (bitField0_ & ~0x00004000);\n        delegateExpiry_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ValidatorInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ValidatorInfo)\n    private static final pactus.BlockchainOuterClass.ValidatorInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.ValidatorInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.ValidatorInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ValidatorInfo>\n        PARSER = new com.google.protobuf.AbstractParser<ValidatorInfo>() {\n      @java.lang.Override\n      public ValidatorInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ValidatorInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ValidatorInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface AccountInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.AccountInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The hash of the account.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the account.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n\n    /**\n     * <pre>\n     * The serialized data of the account.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    java.lang.String getData();\n    /**\n     * <pre>\n     * The serialized data of the account.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    com.google.protobuf.ByteString\n        getDataBytes();\n\n    /**\n     * <pre>\n     * The unique number assigned to the account.\n     * </pre>\n     *\n     * <code>int32 number = 3 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    int getNumber();\n\n    /**\n     * <pre>\n     * The balance of the account in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 balance = 4 [json_name = \"balance\"];</code>\n     * @return The balance.\n     */\n    long getBalance();\n\n    /**\n     * <pre>\n     * The address of the account.\n     * </pre>\n     *\n     * <code>string address = 5 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the account.\n     * </pre>\n     *\n     * <code>string address = 5 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Message contains information about an account.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.AccountInfo}\n   */\n  public static final class AccountInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.AccountInfo)\n      AccountInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"AccountInfo\");\n    }\n    // Use AccountInfo.newBuilder() to construct.\n    private AccountInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private AccountInfo() {\n      hash_ = \"\";\n      data_ = \"\";\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.AccountInfo.class, pactus.BlockchainOuterClass.AccountInfo.Builder.class);\n    }\n\n    public static final int HASH_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the account.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the account.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DATA_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object data_ = \"\";\n    /**\n     * <pre>\n     * The serialized data of the account.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    @java.lang.Override\n    public java.lang.String getData() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        data_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The serialized data of the account.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDataBytes() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        data_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int NUMBER_FIELD_NUMBER = 3;\n    private int number_ = 0;\n    /**\n     * <pre>\n     * The unique number assigned to the account.\n     * </pre>\n     *\n     * <code>int32 number = 3 [json_name = \"number\"];</code>\n     * @return The number.\n     */\n    @java.lang.Override\n    public int getNumber() {\n      return number_;\n    }\n\n    public static final int BALANCE_FIELD_NUMBER = 4;\n    private long balance_ = 0L;\n    /**\n     * <pre>\n     * The balance of the account in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 balance = 4 [json_name = \"balance\"];</code>\n     * @return The balance.\n     */\n    @java.lang.Override\n    public long getBalance() {\n      return balance_;\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the account.\n     * </pre>\n     *\n     * <code>string address = 5 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the account.\n     * </pre>\n     *\n     * <code>string address = 5 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, data_);\n      }\n      if (number_ != 0) {\n        output.writeInt32(3, number_);\n      }\n      if (balance_ != 0L) {\n        output.writeInt64(4, balance_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, data_);\n      }\n      if (number_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(3, number_);\n      }\n      if (balance_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(4, balance_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.AccountInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.AccountInfo other = (pactus.BlockchainOuterClass.AccountInfo) obj;\n\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (!getData()\n          .equals(other.getData())) return false;\n      if (getNumber()\n          != other.getNumber()) return false;\n      if (getBalance()\n          != other.getBalance()) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (37 * hash) + DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getData().hashCode();\n      hash = (37 * hash) + NUMBER_FIELD_NUMBER;\n      hash = (53 * hash) + getNumber();\n      hash = (37 * hash) + BALANCE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getBalance());\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.AccountInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.AccountInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.AccountInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.AccountInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about an account.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.AccountInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.AccountInfo)\n        pactus.BlockchainOuterClass.AccountInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.AccountInfo.class, pactus.BlockchainOuterClass.AccountInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.AccountInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        hash_ = \"\";\n        data_ = \"\";\n        number_ = 0;\n        balance_ = 0L;\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.AccountInfo build() {\n        pactus.BlockchainOuterClass.AccountInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.AccountInfo buildPartial() {\n        pactus.BlockchainOuterClass.AccountInfo result = new pactus.BlockchainOuterClass.AccountInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.AccountInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.hash_ = hash_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.data_ = data_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.number_ = number_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.balance_ = balance_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.AccountInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.AccountInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.AccountInfo other) {\n        if (other == pactus.BlockchainOuterClass.AccountInfo.getDefaultInstance()) return this;\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getData().isEmpty()) {\n          data_ = other.data_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getNumber() != 0) {\n          setNumber(other.getNumber());\n        }\n        if (other.getBalance() != 0L) {\n          setBalance(other.getBalance());\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                data_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                number_ = input.readInt32();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 32: {\n                balance_ = input.readInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the account.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the account.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the account.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the account.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the account.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object data_ = \"\";\n      /**\n       * <pre>\n       * The serialized data of the account.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The data.\n       */\n      public java.lang.String getData() {\n        java.lang.Object ref = data_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          data_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The serialized data of the account.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The bytes for data.\n       */\n      public com.google.protobuf.ByteString\n          getDataBytes() {\n        java.lang.Object ref = data_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          data_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The serialized data of the account.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setData(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The serialized data of the account.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearData() {\n        data_ = getDefaultInstance().getData();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The serialized data of the account.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The bytes for data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDataBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private int number_ ;\n      /**\n       * <pre>\n       * The unique number assigned to the account.\n       * </pre>\n       *\n       * <code>int32 number = 3 [json_name = \"number\"];</code>\n       * @return The number.\n       */\n      @java.lang.Override\n      public int getNumber() {\n        return number_;\n      }\n      /**\n       * <pre>\n       * The unique number assigned to the account.\n       * </pre>\n       *\n       * <code>int32 number = 3 [json_name = \"number\"];</code>\n       * @param value The number to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNumber(int value) {\n\n        number_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique number assigned to the account.\n       * </pre>\n       *\n       * <code>int32 number = 3 [json_name = \"number\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNumber() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        number_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long balance_ ;\n      /**\n       * <pre>\n       * The balance of the account in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 balance = 4 [json_name = \"balance\"];</code>\n       * @return The balance.\n       */\n      @java.lang.Override\n      public long getBalance() {\n        return balance_;\n      }\n      /**\n       * <pre>\n       * The balance of the account in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 balance = 4 [json_name = \"balance\"];</code>\n       * @param value The balance to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBalance(long value) {\n\n        balance_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The balance of the account in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 balance = 4 [json_name = \"balance\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBalance() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        balance_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the account.\n       * </pre>\n       *\n       * <code>string address = 5 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account.\n       * </pre>\n       *\n       * <code>string address = 5 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account.\n       * </pre>\n       *\n       * <code>string address = 5 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account.\n       * </pre>\n       *\n       * <code>string address = 5 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account.\n       * </pre>\n       *\n       * <code>string address = 5 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.AccountInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.AccountInfo)\n    private static final pactus.BlockchainOuterClass.AccountInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.AccountInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.AccountInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<AccountInfo>\n        PARSER = new com.google.protobuf.AbstractParser<AccountInfo>() {\n      @java.lang.Override\n      public AccountInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<AccountInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<AccountInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface BlockHeaderInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.BlockHeaderInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The version of the block.\n     * </pre>\n     *\n     * <code>int32 version = 1 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    int getVersion();\n\n    /**\n     * <pre>\n     * The hash of the previous block.\n     * </pre>\n     *\n     * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n     * @return The prevBlockHash.\n     */\n    java.lang.String getPrevBlockHash();\n    /**\n     * <pre>\n     * The hash of the previous block.\n     * </pre>\n     *\n     * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n     * @return The bytes for prevBlockHash.\n     */\n    com.google.protobuf.ByteString\n        getPrevBlockHashBytes();\n\n    /**\n     * <pre>\n     * The state root hash of the blockchain.\n     * </pre>\n     *\n     * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n     * @return The stateRoot.\n     */\n    java.lang.String getStateRoot();\n    /**\n     * <pre>\n     * The state root hash of the blockchain.\n     * </pre>\n     *\n     * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n     * @return The bytes for stateRoot.\n     */\n    com.google.protobuf.ByteString\n        getStateRootBytes();\n\n    /**\n     * <pre>\n     * The sortition seed of the block.\n     * </pre>\n     *\n     * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n     * @return The sortitionSeed.\n     */\n    java.lang.String getSortitionSeed();\n    /**\n     * <pre>\n     * The sortition seed of the block.\n     * </pre>\n     *\n     * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n     * @return The bytes for sortitionSeed.\n     */\n    com.google.protobuf.ByteString\n        getSortitionSeedBytes();\n\n    /**\n     * <pre>\n     * The address of the proposer of the block.\n     * </pre>\n     *\n     * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n     * @return The proposerAddress.\n     */\n    java.lang.String getProposerAddress();\n    /**\n     * <pre>\n     * The address of the proposer of the block.\n     * </pre>\n     *\n     * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n     * @return The bytes for proposerAddress.\n     */\n    com.google.protobuf.ByteString\n        getProposerAddressBytes();\n  }\n  /**\n   * <pre>\n   * Message contains information about the header of a block.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.BlockHeaderInfo}\n   */\n  public static final class BlockHeaderInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.BlockHeaderInfo)\n      BlockHeaderInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"BlockHeaderInfo\");\n    }\n    // Use BlockHeaderInfo.newBuilder() to construct.\n    private BlockHeaderInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private BlockHeaderInfo() {\n      prevBlockHash_ = \"\";\n      stateRoot_ = \"\";\n      sortitionSeed_ = \"\";\n      proposerAddress_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.BlockHeaderInfo.class, pactus.BlockchainOuterClass.BlockHeaderInfo.Builder.class);\n    }\n\n    public static final int VERSION_FIELD_NUMBER = 1;\n    private int version_ = 0;\n    /**\n     * <pre>\n     * The version of the block.\n     * </pre>\n     *\n     * <code>int32 version = 1 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    @java.lang.Override\n    public int getVersion() {\n      return version_;\n    }\n\n    public static final int PREV_BLOCK_HASH_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object prevBlockHash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the previous block.\n     * </pre>\n     *\n     * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n     * @return The prevBlockHash.\n     */\n    @java.lang.Override\n    public java.lang.String getPrevBlockHash() {\n      java.lang.Object ref = prevBlockHash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        prevBlockHash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the previous block.\n     * </pre>\n     *\n     * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n     * @return The bytes for prevBlockHash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPrevBlockHashBytes() {\n      java.lang.Object ref = prevBlockHash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        prevBlockHash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int STATE_ROOT_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object stateRoot_ = \"\";\n    /**\n     * <pre>\n     * The state root hash of the blockchain.\n     * </pre>\n     *\n     * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n     * @return The stateRoot.\n     */\n    @java.lang.Override\n    public java.lang.String getStateRoot() {\n      java.lang.Object ref = stateRoot_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        stateRoot_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The state root hash of the blockchain.\n     * </pre>\n     *\n     * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n     * @return The bytes for stateRoot.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getStateRootBytes() {\n      java.lang.Object ref = stateRoot_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        stateRoot_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SORTITION_SEED_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sortitionSeed_ = \"\";\n    /**\n     * <pre>\n     * The sortition seed of the block.\n     * </pre>\n     *\n     * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n     * @return The sortitionSeed.\n     */\n    @java.lang.Override\n    public java.lang.String getSortitionSeed() {\n      java.lang.Object ref = sortitionSeed_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sortitionSeed_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sortition seed of the block.\n     * </pre>\n     *\n     * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n     * @return The bytes for sortitionSeed.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSortitionSeedBytes() {\n      java.lang.Object ref = sortitionSeed_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sortitionSeed_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PROPOSER_ADDRESS_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object proposerAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the proposer of the block.\n     * </pre>\n     *\n     * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n     * @return The proposerAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getProposerAddress() {\n      java.lang.Object ref = proposerAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        proposerAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the proposer of the block.\n     * </pre>\n     *\n     * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n     * @return The bytes for proposerAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getProposerAddressBytes() {\n      java.lang.Object ref = proposerAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        proposerAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (version_ != 0) {\n        output.writeInt32(1, version_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevBlockHash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, prevBlockHash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(stateRoot_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, stateRoot_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sortitionSeed_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, sortitionSeed_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(proposerAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, proposerAddress_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (version_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(1, version_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevBlockHash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, prevBlockHash_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(stateRoot_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, stateRoot_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sortitionSeed_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, sortitionSeed_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(proposerAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, proposerAddress_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.BlockHeaderInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.BlockHeaderInfo other = (pactus.BlockchainOuterClass.BlockHeaderInfo) obj;\n\n      if (getVersion()\n          != other.getVersion()) return false;\n      if (!getPrevBlockHash()\n          .equals(other.getPrevBlockHash())) return false;\n      if (!getStateRoot()\n          .equals(other.getStateRoot())) return false;\n      if (!getSortitionSeed()\n          .equals(other.getSortitionSeed())) return false;\n      if (!getProposerAddress()\n          .equals(other.getProposerAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + VERSION_FIELD_NUMBER;\n      hash = (53 * hash) + getVersion();\n      hash = (37 * hash) + PREV_BLOCK_HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getPrevBlockHash().hashCode();\n      hash = (37 * hash) + STATE_ROOT_FIELD_NUMBER;\n      hash = (53 * hash) + getStateRoot().hashCode();\n      hash = (37 * hash) + SORTITION_SEED_FIELD_NUMBER;\n      hash = (53 * hash) + getSortitionSeed().hashCode();\n      hash = (37 * hash) + PROPOSER_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getProposerAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.BlockHeaderInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about the header of a block.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.BlockHeaderInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.BlockHeaderInfo)\n        pactus.BlockchainOuterClass.BlockHeaderInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.BlockHeaderInfo.class, pactus.BlockchainOuterClass.BlockHeaderInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.BlockHeaderInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        version_ = 0;\n        prevBlockHash_ = \"\";\n        stateRoot_ = \"\";\n        sortitionSeed_ = \"\";\n        proposerAddress_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.BlockHeaderInfo build() {\n        pactus.BlockchainOuterClass.BlockHeaderInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.BlockHeaderInfo buildPartial() {\n        pactus.BlockchainOuterClass.BlockHeaderInfo result = new pactus.BlockchainOuterClass.BlockHeaderInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.BlockHeaderInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.version_ = version_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.prevBlockHash_ = prevBlockHash_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.stateRoot_ = stateRoot_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.sortitionSeed_ = sortitionSeed_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.proposerAddress_ = proposerAddress_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.BlockHeaderInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.BlockHeaderInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.BlockHeaderInfo other) {\n        if (other == pactus.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance()) return this;\n        if (other.getVersion() != 0) {\n          setVersion(other.getVersion());\n        }\n        if (!other.getPrevBlockHash().isEmpty()) {\n          prevBlockHash_ = other.prevBlockHash_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getStateRoot().isEmpty()) {\n          stateRoot_ = other.stateRoot_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getSortitionSeed().isEmpty()) {\n          sortitionSeed_ = other.sortitionSeed_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        if (!other.getProposerAddress().isEmpty()) {\n          proposerAddress_ = other.proposerAddress_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                version_ = input.readInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                prevBlockHash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                stateRoot_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                sortitionSeed_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              case 42: {\n                proposerAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int version_ ;\n      /**\n       * <pre>\n       * The version of the block.\n       * </pre>\n       *\n       * <code>int32 version = 1 [json_name = \"version\"];</code>\n       * @return The version.\n       */\n      @java.lang.Override\n      public int getVersion() {\n        return version_;\n      }\n      /**\n       * <pre>\n       * The version of the block.\n       * </pre>\n       *\n       * <code>int32 version = 1 [json_name = \"version\"];</code>\n       * @param value The version to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVersion(int value) {\n\n        version_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The version of the block.\n       * </pre>\n       *\n       * <code>int32 version = 1 [json_name = \"version\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVersion() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        version_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object prevBlockHash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the previous block.\n       * </pre>\n       *\n       * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n       * @return The prevBlockHash.\n       */\n      public java.lang.String getPrevBlockHash() {\n        java.lang.Object ref = prevBlockHash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          prevBlockHash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the previous block.\n       * </pre>\n       *\n       * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n       * @return The bytes for prevBlockHash.\n       */\n      public com.google.protobuf.ByteString\n          getPrevBlockHashBytes() {\n        java.lang.Object ref = prevBlockHash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          prevBlockHash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the previous block.\n       * </pre>\n       *\n       * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n       * @param value The prevBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrevBlockHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        prevBlockHash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the previous block.\n       * </pre>\n       *\n       * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPrevBlockHash() {\n        prevBlockHash_ = getDefaultInstance().getPrevBlockHash();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the previous block.\n       * </pre>\n       *\n       * <code>string prev_block_hash = 2 [json_name = \"prevBlockHash\"];</code>\n       * @param value The bytes for prevBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrevBlockHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        prevBlockHash_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object stateRoot_ = \"\";\n      /**\n       * <pre>\n       * The state root hash of the blockchain.\n       * </pre>\n       *\n       * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n       * @return The stateRoot.\n       */\n      public java.lang.String getStateRoot() {\n        java.lang.Object ref = stateRoot_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          stateRoot_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The state root hash of the blockchain.\n       * </pre>\n       *\n       * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n       * @return The bytes for stateRoot.\n       */\n      public com.google.protobuf.ByteString\n          getStateRootBytes() {\n        java.lang.Object ref = stateRoot_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          stateRoot_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The state root hash of the blockchain.\n       * </pre>\n       *\n       * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n       * @param value The stateRoot to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStateRoot(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        stateRoot_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The state root hash of the blockchain.\n       * </pre>\n       *\n       * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStateRoot() {\n        stateRoot_ = getDefaultInstance().getStateRoot();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The state root hash of the blockchain.\n       * </pre>\n       *\n       * <code>string state_root = 3 [json_name = \"stateRoot\"];</code>\n       * @param value The bytes for stateRoot to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStateRootBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        stateRoot_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object sortitionSeed_ = \"\";\n      /**\n       * <pre>\n       * The sortition seed of the block.\n       * </pre>\n       *\n       * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n       * @return The sortitionSeed.\n       */\n      public java.lang.String getSortitionSeed() {\n        java.lang.Object ref = sortitionSeed_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sortitionSeed_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sortition seed of the block.\n       * </pre>\n       *\n       * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n       * @return The bytes for sortitionSeed.\n       */\n      public com.google.protobuf.ByteString\n          getSortitionSeedBytes() {\n        java.lang.Object ref = sortitionSeed_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sortitionSeed_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sortition seed of the block.\n       * </pre>\n       *\n       * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n       * @param value The sortitionSeed to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSortitionSeed(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sortitionSeed_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sortition seed of the block.\n       * </pre>\n       *\n       * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSortitionSeed() {\n        sortitionSeed_ = getDefaultInstance().getSortitionSeed();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sortition seed of the block.\n       * </pre>\n       *\n       * <code>string sortition_seed = 4 [json_name = \"sortitionSeed\"];</code>\n       * @param value The bytes for sortitionSeed to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSortitionSeedBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sortitionSeed_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object proposerAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the proposer of the block.\n       * </pre>\n       *\n       * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n       * @return The proposerAddress.\n       */\n      public java.lang.String getProposerAddress() {\n        java.lang.Object ref = proposerAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          proposerAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the proposer of the block.\n       * </pre>\n       *\n       * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n       * @return The bytes for proposerAddress.\n       */\n      public com.google.protobuf.ByteString\n          getProposerAddressBytes() {\n        java.lang.Object ref = proposerAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          proposerAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the proposer of the block.\n       * </pre>\n       *\n       * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n       * @param value The proposerAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProposerAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        proposerAddress_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the proposer of the block.\n       * </pre>\n       *\n       * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearProposerAddress() {\n        proposerAddress_ = getDefaultInstance().getProposerAddress();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the proposer of the block.\n       * </pre>\n       *\n       * <code>string proposer_address = 5 [json_name = \"proposerAddress\"];</code>\n       * @param value The bytes for proposerAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProposerAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        proposerAddress_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.BlockHeaderInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.BlockHeaderInfo)\n    private static final pactus.BlockchainOuterClass.BlockHeaderInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.BlockHeaderInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.BlockHeaderInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<BlockHeaderInfo>\n        PARSER = new com.google.protobuf.AbstractParser<BlockHeaderInfo>() {\n      @java.lang.Override\n      public BlockHeaderInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<BlockHeaderInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<BlockHeaderInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CertificateInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CertificateInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The hash of the certificate.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    java.lang.String getHash();\n    /**\n     * <pre>\n     * The hash of the certificate.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    com.google.protobuf.ByteString\n        getHashBytes();\n\n    /**\n     * <pre>\n     * The round of the certificate.\n     * </pre>\n     *\n     * <code>int32 round = 2 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    int getRound();\n\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @return A list containing the committers.\n     */\n    java.util.List<java.lang.Integer> getCommittersList();\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @return The count of committers.\n     */\n    int getCommittersCount();\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @param index The index of the element to return.\n     * @return The committers at the given index.\n     */\n    int getCommitters(int index);\n\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @return A list containing the absentees.\n     */\n    java.util.List<java.lang.Integer> getAbsenteesList();\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @return The count of absentees.\n     */\n    int getAbsenteesCount();\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @param index The index of the element to return.\n     * @return The absentees at the given index.\n     */\n    int getAbsentees(int index);\n\n    /**\n     * <pre>\n     * The signature of the certificate.\n     * </pre>\n     *\n     * <code>string signature = 5 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The signature of the certificate.\n     * </pre>\n     *\n     * <code>string signature = 5 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n  }\n  /**\n   * <pre>\n   * Message contains information about a certificate.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CertificateInfo}\n   */\n  public static final class CertificateInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CertificateInfo)\n      CertificateInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CertificateInfo\");\n    }\n    // Use CertificateInfo.newBuilder() to construct.\n    private CertificateInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CertificateInfo() {\n      hash_ = \"\";\n      committers_ = emptyIntList();\n      absentees_ = emptyIntList();\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.CertificateInfo.class, pactus.BlockchainOuterClass.CertificateInfo.Builder.class);\n    }\n\n    public static final int HASH_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object hash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the certificate.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The hash.\n     */\n    @java.lang.Override\n    public java.lang.String getHash() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        hash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the certificate.\n     * </pre>\n     *\n     * <code>string hash = 1 [json_name = \"hash\"];</code>\n     * @return The bytes for hash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getHashBytes() {\n      java.lang.Object ref = hash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        hash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ROUND_FIELD_NUMBER = 2;\n    private int round_ = 0;\n    /**\n     * <pre>\n     * The round of the certificate.\n     * </pre>\n     *\n     * <code>int32 round = 2 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    @java.lang.Override\n    public int getRound() {\n      return round_;\n    }\n\n    public static final int COMMITTERS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.Internal.IntList committers_ =\n        emptyIntList();\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @return A list containing the committers.\n     */\n    @java.lang.Override\n    public java.util.List<java.lang.Integer>\n        getCommittersList() {\n      return committers_;\n    }\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @return The count of committers.\n     */\n    public int getCommittersCount() {\n      return committers_.size();\n    }\n    /**\n     * <pre>\n     * List of committers in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n     * @param index The index of the element to return.\n     * @return The committers at the given index.\n     */\n    public int getCommitters(int index) {\n      return committers_.getInt(index);\n    }\n    private int committersMemoizedSerializedSize = -1;\n\n    public static final int ABSENTEES_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.Internal.IntList absentees_ =\n        emptyIntList();\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @return A list containing the absentees.\n     */\n    @java.lang.Override\n    public java.util.List<java.lang.Integer>\n        getAbsenteesList() {\n      return absentees_;\n    }\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @return The count of absentees.\n     */\n    public int getAbsenteesCount() {\n      return absentees_.size();\n    }\n    /**\n     * <pre>\n     * List of absentees in the certificate.\n     * </pre>\n     *\n     * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n     * @param index The index of the element to return.\n     * @return The absentees at the given index.\n     */\n    public int getAbsentees(int index) {\n      return absentees_.getInt(index);\n    }\n    private int absenteesMemoizedSerializedSize = -1;\n\n    public static final int SIGNATURE_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The signature of the certificate.\n     * </pre>\n     *\n     * <code>string signature = 5 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signature of the certificate.\n     * </pre>\n     *\n     * <code>string signature = 5 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getSerializedSize();\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, hash_);\n      }\n      if (round_ != 0) {\n        output.writeInt32(2, round_);\n      }\n      if (getCommittersList().size() > 0) {\n        output.writeUInt32NoTag(26);\n        output.writeUInt32NoTag(committersMemoizedSerializedSize);\n      }\n      for (int i = 0; i < committers_.size(); i++) {\n        output.writeInt32NoTag(committers_.getInt(i));\n      }\n      if (getAbsenteesList().size() > 0) {\n        output.writeUInt32NoTag(34);\n        output.writeUInt32NoTag(absenteesMemoizedSerializedSize);\n      }\n      for (int i = 0; i < absentees_.size(); i++) {\n        output.writeInt32NoTag(absentees_.getInt(i));\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, signature_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hash_);\n      }\n      if (round_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(2, round_);\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < committers_.size(); i++) {\n          dataSize += com.google.protobuf.CodedOutputStream\n            .computeInt32SizeNoTag(committers_.getInt(i));\n        }\n        size += dataSize;\n        if (!getCommittersList().isEmpty()) {\n          size += 1;\n          size += com.google.protobuf.CodedOutputStream\n              .computeInt32SizeNoTag(dataSize);\n        }\n        committersMemoizedSerializedSize = dataSize;\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < absentees_.size(); i++) {\n          dataSize += com.google.protobuf.CodedOutputStream\n            .computeInt32SizeNoTag(absentees_.getInt(i));\n        }\n        size += dataSize;\n        if (!getAbsenteesList().isEmpty()) {\n          size += 1;\n          size += com.google.protobuf.CodedOutputStream\n              .computeInt32SizeNoTag(dataSize);\n        }\n        absenteesMemoizedSerializedSize = dataSize;\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, signature_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.CertificateInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.CertificateInfo other = (pactus.BlockchainOuterClass.CertificateInfo) obj;\n\n      if (!getHash()\n          .equals(other.getHash())) return false;\n      if (getRound()\n          != other.getRound()) return false;\n      if (!getCommittersList()\n          .equals(other.getCommittersList())) return false;\n      if (!getAbsenteesList()\n          .equals(other.getAbsenteesList())) return false;\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getHash().hashCode();\n      hash = (37 * hash) + ROUND_FIELD_NUMBER;\n      hash = (53 * hash) + getRound();\n      if (getCommittersCount() > 0) {\n        hash = (37 * hash) + COMMITTERS_FIELD_NUMBER;\n        hash = (53 * hash) + getCommittersList().hashCode();\n      }\n      if (getAbsenteesCount() > 0) {\n        hash = (37 * hash) + ABSENTEES_FIELD_NUMBER;\n        hash = (53 * hash) + getAbsenteesList().hashCode();\n      }\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.CertificateInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.CertificateInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.CertificateInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.CertificateInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about a certificate.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CertificateInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CertificateInfo)\n        pactus.BlockchainOuterClass.CertificateInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.CertificateInfo.class, pactus.BlockchainOuterClass.CertificateInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.CertificateInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        hash_ = \"\";\n        round_ = 0;\n        committers_ = emptyIntList();\n        absentees_ = emptyIntList();\n        signature_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.CertificateInfo build() {\n        pactus.BlockchainOuterClass.CertificateInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.CertificateInfo buildPartial() {\n        pactus.BlockchainOuterClass.CertificateInfo result = new pactus.BlockchainOuterClass.CertificateInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.CertificateInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.hash_ = hash_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.round_ = round_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          committers_.makeImmutable();\n          result.committers_ = committers_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          absentees_.makeImmutable();\n          result.absentees_ = absentees_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.signature_ = signature_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.CertificateInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.CertificateInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.CertificateInfo other) {\n        if (other == pactus.BlockchainOuterClass.CertificateInfo.getDefaultInstance()) return this;\n        if (!other.getHash().isEmpty()) {\n          hash_ = other.hash_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getRound() != 0) {\n          setRound(other.getRound());\n        }\n        if (!other.committers_.isEmpty()) {\n          if (committers_.isEmpty()) {\n            committers_ = other.committers_;\n            committers_.makeImmutable();\n            bitField0_ |= 0x00000004;\n          } else {\n            ensureCommittersIsMutable();\n            committers_.addAll(other.committers_);\n          }\n          onChanged();\n        }\n        if (!other.absentees_.isEmpty()) {\n          if (absentees_.isEmpty()) {\n            absentees_ = other.absentees_;\n            absentees_.makeImmutable();\n            bitField0_ |= 0x00000008;\n          } else {\n            ensureAbsenteesIsMutable();\n            absentees_.addAll(other.absentees_);\n          }\n          onChanged();\n        }\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                hash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                round_ = input.readInt32();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 24: {\n                int v = input.readInt32();\n                ensureCommittersIsMutable();\n                committers_.addInt(v);\n                break;\n              } // case 24\n              case 26: {\n                int length = input.readRawVarint32();\n                int limit = input.pushLimit(length);\n                ensureCommittersIsMutable();\n                while (input.getBytesUntilLimit() > 0) {\n                  committers_.addInt(input.readInt32());\n                }\n                input.popLimit(limit);\n                break;\n              } // case 26\n              case 32: {\n                int v = input.readInt32();\n                ensureAbsenteesIsMutable();\n                absentees_.addInt(v);\n                break;\n              } // case 32\n              case 34: {\n                int length = input.readRawVarint32();\n                int limit = input.pushLimit(length);\n                ensureAbsenteesIsMutable();\n                while (input.getBytesUntilLimit() > 0) {\n                  absentees_.addInt(input.readInt32());\n                }\n                input.popLimit(limit);\n                break;\n              } // case 34\n              case 42: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object hash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the certificate.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The hash.\n       */\n      public java.lang.String getHash() {\n        java.lang.Object ref = hash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          hash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the certificate.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return The bytes for hash.\n       */\n      public com.google.protobuf.ByteString\n          getHashBytes() {\n        java.lang.Object ref = hash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          hash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the certificate.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the certificate.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHash() {\n        hash_ = getDefaultInstance().getHash();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the certificate.\n       * </pre>\n       *\n       * <code>string hash = 1 [json_name = \"hash\"];</code>\n       * @param value The bytes for hash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        hash_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private int round_ ;\n      /**\n       * <pre>\n       * The round of the certificate.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @return The round.\n       */\n      @java.lang.Override\n      public int getRound() {\n        return round_;\n      }\n      /**\n       * <pre>\n       * The round of the certificate.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @param value The round to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRound(int value) {\n\n        round_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The round of the certificate.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRound() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        round_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.Internal.IntList committers_ = emptyIntList();\n      private void ensureCommittersIsMutable() {\n        if (!committers_.isModifiable()) {\n          committers_ = makeMutableCopy(committers_);\n        }\n        bitField0_ |= 0x00000004;\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @return A list containing the committers.\n       */\n      public java.util.List<java.lang.Integer>\n          getCommittersList() {\n        committers_.makeImmutable();\n        return committers_;\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @return The count of committers.\n       */\n      public int getCommittersCount() {\n        return committers_.size();\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @param index The index of the element to return.\n       * @return The committers at the given index.\n       */\n      public int getCommitters(int index) {\n        return committers_.getInt(index);\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @param index The index to set the value at.\n       * @param value The committers to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommitters(\n          int index, int value) {\n\n        ensureCommittersIsMutable();\n        committers_.setInt(index, value);\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @param value The committers to add.\n       * @return This builder for chaining.\n       */\n      public Builder addCommitters(int value) {\n\n        ensureCommittersIsMutable();\n        committers_.addInt(value);\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @param values The committers to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllCommitters(\n          java.lang.Iterable<? extends java.lang.Integer> values) {\n        ensureCommittersIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, committers_);\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of committers in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 committers = 3 [json_name = \"committers\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCommitters() {\n        committers_ = emptyIntList();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.Internal.IntList absentees_ = emptyIntList();\n      private void ensureAbsenteesIsMutable() {\n        if (!absentees_.isModifiable()) {\n          absentees_ = makeMutableCopy(absentees_);\n        }\n        bitField0_ |= 0x00000008;\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @return A list containing the absentees.\n       */\n      public java.util.List<java.lang.Integer>\n          getAbsenteesList() {\n        absentees_.makeImmutable();\n        return absentees_;\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @return The count of absentees.\n       */\n      public int getAbsenteesCount() {\n        return absentees_.size();\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @param index The index of the element to return.\n       * @return The absentees at the given index.\n       */\n      public int getAbsentees(int index) {\n        return absentees_.getInt(index);\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @param index The index to set the value at.\n       * @param value The absentees to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAbsentees(\n          int index, int value) {\n\n        ensureAbsenteesIsMutable();\n        absentees_.setInt(index, value);\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @param value The absentees to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAbsentees(int value) {\n\n        ensureAbsenteesIsMutable();\n        absentees_.addInt(value);\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @param values The absentees to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllAbsentees(\n          java.lang.Iterable<? extends java.lang.Integer> values) {\n        ensureAbsenteesIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, absentees_);\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of absentees in the certificate.\n       * </pre>\n       *\n       * <code>repeated int32 absentees = 4 [json_name = \"absentees\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAbsentees() {\n        absentees_ = emptyIntList();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The signature of the certificate.\n       * </pre>\n       *\n       * <code>string signature = 5 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature of the certificate.\n       * </pre>\n       *\n       * <code>string signature = 5 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature of the certificate.\n       * </pre>\n       *\n       * <code>string signature = 5 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature of the certificate.\n       * </pre>\n       *\n       * <code>string signature = 5 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature of the certificate.\n       * </pre>\n       *\n       * <code>string signature = 5 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CertificateInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CertificateInfo)\n    private static final pactus.BlockchainOuterClass.CertificateInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.CertificateInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.CertificateInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CertificateInfo>\n        PARSER = new com.google.protobuf.AbstractParser<CertificateInfo>() {\n      @java.lang.Override\n      public CertificateInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CertificateInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CertificateInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface VoteInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.VoteInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The type of the vote.\n     * </pre>\n     *\n     * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n     * @return The enum numeric value on the wire for type.\n     */\n    int getTypeValue();\n    /**\n     * <pre>\n     * The type of the vote.\n     * </pre>\n     *\n     * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n     * @return The type.\n     */\n    pactus.BlockchainOuterClass.VoteType getType();\n\n    /**\n     * <pre>\n     * The address of the voter.\n     * </pre>\n     *\n     * <code>string voter = 2 [json_name = \"voter\"];</code>\n     * @return The voter.\n     */\n    java.lang.String getVoter();\n    /**\n     * <pre>\n     * The address of the voter.\n     * </pre>\n     *\n     * <code>string voter = 2 [json_name = \"voter\"];</code>\n     * @return The bytes for voter.\n     */\n    com.google.protobuf.ByteString\n        getVoterBytes();\n\n    /**\n     * <pre>\n     * The hash of the block being voted on.\n     * </pre>\n     *\n     * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n     * @return The blockHash.\n     */\n    java.lang.String getBlockHash();\n    /**\n     * <pre>\n     * The hash of the block being voted on.\n     * </pre>\n     *\n     * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n     * @return The bytes for blockHash.\n     */\n    com.google.protobuf.ByteString\n        getBlockHashBytes();\n\n    /**\n     * <pre>\n     * The consensus round of the vote.\n     * </pre>\n     *\n     * <code>int32 round = 4 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    int getRound();\n\n    /**\n     * <pre>\n     * The change-proposer round of the vote.\n     * </pre>\n     *\n     * <code>int32 cp_round = 5 [json_name = \"cpRound\"];</code>\n     * @return The cpRound.\n     */\n    int getCpRound();\n\n    /**\n     * <pre>\n     * The change-proposer value of the vote.\n     * </pre>\n     *\n     * <code>int32 cp_value = 6 [json_name = \"cpValue\"];</code>\n     * @return The cpValue.\n     */\n    int getCpValue();\n  }\n  /**\n   * <pre>\n   * Message contains information about a vote.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.VoteInfo}\n   */\n  public static final class VoteInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.VoteInfo)\n      VoteInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"VoteInfo\");\n    }\n    // Use VoteInfo.newBuilder() to construct.\n    private VoteInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private VoteInfo() {\n      type_ = 0;\n      voter_ = \"\";\n      blockHash_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.VoteInfo.class, pactus.BlockchainOuterClass.VoteInfo.Builder.class);\n    }\n\n    public static final int TYPE_FIELD_NUMBER = 1;\n    private int type_ = 0;\n    /**\n     * <pre>\n     * The type of the vote.\n     * </pre>\n     *\n     * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n     * @return The enum numeric value on the wire for type.\n     */\n    @java.lang.Override public int getTypeValue() {\n      return type_;\n    }\n    /**\n     * <pre>\n     * The type of the vote.\n     * </pre>\n     *\n     * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n     * @return The type.\n     */\n    @java.lang.Override public pactus.BlockchainOuterClass.VoteType getType() {\n      pactus.BlockchainOuterClass.VoteType result = pactus.BlockchainOuterClass.VoteType.forNumber(type_);\n      return result == null ? pactus.BlockchainOuterClass.VoteType.UNRECOGNIZED : result;\n    }\n\n    public static final int VOTER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object voter_ = \"\";\n    /**\n     * <pre>\n     * The address of the voter.\n     * </pre>\n     *\n     * <code>string voter = 2 [json_name = \"voter\"];</code>\n     * @return The voter.\n     */\n    @java.lang.Override\n    public java.lang.String getVoter() {\n      java.lang.Object ref = voter_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        voter_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the voter.\n     * </pre>\n     *\n     * <code>string voter = 2 [json_name = \"voter\"];</code>\n     * @return The bytes for voter.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getVoterBytes() {\n      java.lang.Object ref = voter_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        voter_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int BLOCK_HASH_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object blockHash_ = \"\";\n    /**\n     * <pre>\n     * The hash of the block being voted on.\n     * </pre>\n     *\n     * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n     * @return The blockHash.\n     */\n    @java.lang.Override\n    public java.lang.String getBlockHash() {\n      java.lang.Object ref = blockHash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        blockHash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The hash of the block being voted on.\n     * </pre>\n     *\n     * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n     * @return The bytes for blockHash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getBlockHashBytes() {\n      java.lang.Object ref = blockHash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        blockHash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ROUND_FIELD_NUMBER = 4;\n    private int round_ = 0;\n    /**\n     * <pre>\n     * The consensus round of the vote.\n     * </pre>\n     *\n     * <code>int32 round = 4 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    @java.lang.Override\n    public int getRound() {\n      return round_;\n    }\n\n    public static final int CP_ROUND_FIELD_NUMBER = 5;\n    private int cpRound_ = 0;\n    /**\n     * <pre>\n     * The change-proposer round of the vote.\n     * </pre>\n     *\n     * <code>int32 cp_round = 5 [json_name = \"cpRound\"];</code>\n     * @return The cpRound.\n     */\n    @java.lang.Override\n    public int getCpRound() {\n      return cpRound_;\n    }\n\n    public static final int CP_VALUE_FIELD_NUMBER = 6;\n    private int cpValue_ = 0;\n    /**\n     * <pre>\n     * The change-proposer value of the vote.\n     * </pre>\n     *\n     * <code>int32 cp_value = 6 [json_name = \"cpValue\"];</code>\n     * @return The cpValue.\n     */\n    @java.lang.Override\n    public int getCpValue() {\n      return cpValue_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (type_ != pactus.BlockchainOuterClass.VoteType.VOTE_TYPE_UNSPECIFIED.getNumber()) {\n        output.writeEnum(1, type_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(voter_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, voter_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockHash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, blockHash_);\n      }\n      if (round_ != 0) {\n        output.writeInt32(4, round_);\n      }\n      if (cpRound_ != 0) {\n        output.writeInt32(5, cpRound_);\n      }\n      if (cpValue_ != 0) {\n        output.writeInt32(6, cpValue_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (type_ != pactus.BlockchainOuterClass.VoteType.VOTE_TYPE_UNSPECIFIED.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(1, type_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(voter_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, voter_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockHash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, blockHash_);\n      }\n      if (round_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(4, round_);\n      }\n      if (cpRound_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(5, cpRound_);\n      }\n      if (cpValue_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(6, cpValue_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.VoteInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.VoteInfo other = (pactus.BlockchainOuterClass.VoteInfo) obj;\n\n      if (type_ != other.type_) return false;\n      if (!getVoter()\n          .equals(other.getVoter())) return false;\n      if (!getBlockHash()\n          .equals(other.getBlockHash())) return false;\n      if (getRound()\n          != other.getRound()) return false;\n      if (getCpRound()\n          != other.getCpRound()) return false;\n      if (getCpValue()\n          != other.getCpValue()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + type_;\n      hash = (37 * hash) + VOTER_FIELD_NUMBER;\n      hash = (53 * hash) + getVoter().hashCode();\n      hash = (37 * hash) + BLOCK_HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockHash().hashCode();\n      hash = (37 * hash) + ROUND_FIELD_NUMBER;\n      hash = (53 * hash) + getRound();\n      hash = (37 * hash) + CP_ROUND_FIELD_NUMBER;\n      hash = (53 * hash) + getCpRound();\n      hash = (37 * hash) + CP_VALUE_FIELD_NUMBER;\n      hash = (53 * hash) + getCpValue();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.VoteInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.VoteInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.VoteInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.VoteInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about a vote.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.VoteInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.VoteInfo)\n        pactus.BlockchainOuterClass.VoteInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.VoteInfo.class, pactus.BlockchainOuterClass.VoteInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.VoteInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        type_ = 0;\n        voter_ = \"\";\n        blockHash_ = \"\";\n        round_ = 0;\n        cpRound_ = 0;\n        cpValue_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.VoteInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.VoteInfo build() {\n        pactus.BlockchainOuterClass.VoteInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.VoteInfo buildPartial() {\n        pactus.BlockchainOuterClass.VoteInfo result = new pactus.BlockchainOuterClass.VoteInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.VoteInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.type_ = type_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.voter_ = voter_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.blockHash_ = blockHash_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.round_ = round_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.cpRound_ = cpRound_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.cpValue_ = cpValue_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.VoteInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.VoteInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.VoteInfo other) {\n        if (other == pactus.BlockchainOuterClass.VoteInfo.getDefaultInstance()) return this;\n        if (other.type_ != 0) {\n          setTypeValue(other.getTypeValue());\n        }\n        if (!other.getVoter().isEmpty()) {\n          voter_ = other.voter_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getBlockHash().isEmpty()) {\n          blockHash_ = other.blockHash_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getRound() != 0) {\n          setRound(other.getRound());\n        }\n        if (other.getCpRound() != 0) {\n          setCpRound(other.getCpRound());\n        }\n        if (other.getCpValue() != 0) {\n          setCpValue(other.getCpValue());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                type_ = input.readEnum();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                voter_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                blockHash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                round_ = input.readInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                cpRound_ = input.readInt32();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 48: {\n                cpValue_ = input.readInt32();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int type_ = 0;\n      /**\n       * <pre>\n       * The type of the vote.\n       * </pre>\n       *\n       * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n       * @return The enum numeric value on the wire for type.\n       */\n      @java.lang.Override public int getTypeValue() {\n        return type_;\n      }\n      /**\n       * <pre>\n       * The type of the vote.\n       * </pre>\n       *\n       * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n       * @param value The enum numeric value on the wire for type to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTypeValue(int value) {\n        type_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of the vote.\n       * </pre>\n       *\n       * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n       * @return The type.\n       */\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.VoteType getType() {\n        pactus.BlockchainOuterClass.VoteType result = pactus.BlockchainOuterClass.VoteType.forNumber(type_);\n        return result == null ? pactus.BlockchainOuterClass.VoteType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of the vote.\n       * </pre>\n       *\n       * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n       * @param value The type to set.\n       * @return This builder for chaining.\n       */\n      public Builder setType(pactus.BlockchainOuterClass.VoteType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000001;\n        type_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of the vote.\n       * </pre>\n       *\n       * <code>.pactus.VoteType type = 1 [json_name = \"type\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearType() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        type_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object voter_ = \"\";\n      /**\n       * <pre>\n       * The address of the voter.\n       * </pre>\n       *\n       * <code>string voter = 2 [json_name = \"voter\"];</code>\n       * @return The voter.\n       */\n      public java.lang.String getVoter() {\n        java.lang.Object ref = voter_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          voter_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the voter.\n       * </pre>\n       *\n       * <code>string voter = 2 [json_name = \"voter\"];</code>\n       * @return The bytes for voter.\n       */\n      public com.google.protobuf.ByteString\n          getVoterBytes() {\n        java.lang.Object ref = voter_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          voter_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the voter.\n       * </pre>\n       *\n       * <code>string voter = 2 [json_name = \"voter\"];</code>\n       * @param value The voter to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVoter(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        voter_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the voter.\n       * </pre>\n       *\n       * <code>string voter = 2 [json_name = \"voter\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVoter() {\n        voter_ = getDefaultInstance().getVoter();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the voter.\n       * </pre>\n       *\n       * <code>string voter = 2 [json_name = \"voter\"];</code>\n       * @param value The bytes for voter to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVoterBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        voter_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object blockHash_ = \"\";\n      /**\n       * <pre>\n       * The hash of the block being voted on.\n       * </pre>\n       *\n       * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n       * @return The blockHash.\n       */\n      public java.lang.String getBlockHash() {\n        java.lang.Object ref = blockHash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          blockHash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block being voted on.\n       * </pre>\n       *\n       * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n       * @return The bytes for blockHash.\n       */\n      public com.google.protobuf.ByteString\n          getBlockHashBytes() {\n        java.lang.Object ref = blockHash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          blockHash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The hash of the block being voted on.\n       * </pre>\n       *\n       * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n       * @param value The blockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        blockHash_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block being voted on.\n       * </pre>\n       *\n       * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockHash() {\n        blockHash_ = getDefaultInstance().getBlockHash();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The hash of the block being voted on.\n       * </pre>\n       *\n       * <code>string block_hash = 3 [json_name = \"blockHash\"];</code>\n       * @param value The bytes for blockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        blockHash_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private int round_ ;\n      /**\n       * <pre>\n       * The consensus round of the vote.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @return The round.\n       */\n      @java.lang.Override\n      public int getRound() {\n        return round_;\n      }\n      /**\n       * <pre>\n       * The consensus round of the vote.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @param value The round to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRound(int value) {\n\n        round_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The consensus round of the vote.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRound() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        round_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int cpRound_ ;\n      /**\n       * <pre>\n       * The change-proposer round of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_round = 5 [json_name = \"cpRound\"];</code>\n       * @return The cpRound.\n       */\n      @java.lang.Override\n      public int getCpRound() {\n        return cpRound_;\n      }\n      /**\n       * <pre>\n       * The change-proposer round of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_round = 5 [json_name = \"cpRound\"];</code>\n       * @param value The cpRound to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCpRound(int value) {\n\n        cpRound_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The change-proposer round of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_round = 5 [json_name = \"cpRound\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCpRound() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        cpRound_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int cpValue_ ;\n      /**\n       * <pre>\n       * The change-proposer value of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_value = 6 [json_name = \"cpValue\"];</code>\n       * @return The cpValue.\n       */\n      @java.lang.Override\n      public int getCpValue() {\n        return cpValue_;\n      }\n      /**\n       * <pre>\n       * The change-proposer value of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_value = 6 [json_name = \"cpValue\"];</code>\n       * @param value The cpValue to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCpValue(int value) {\n\n        cpValue_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The change-proposer value of the vote.\n       * </pre>\n       *\n       * <code>int32 cp_value = 6 [json_name = \"cpValue\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCpValue() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        cpValue_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.VoteInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.VoteInfo)\n    private static final pactus.BlockchainOuterClass.VoteInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.VoteInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.VoteInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<VoteInfo>\n        PARSER = new com.google.protobuf.AbstractParser<VoteInfo>() {\n      @java.lang.Override\n      public VoteInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<VoteInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<VoteInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ConsensusInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ConsensusInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address of the consensus instance.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the consensus instance.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * Indicates whether the consensus instance is active and part of the committee.\n     * </pre>\n     *\n     * <code>bool active = 2 [json_name = \"active\"];</code>\n     * @return The active.\n     */\n    boolean getActive();\n\n    /**\n     * <pre>\n     * The height of the consensus instance.\n     * </pre>\n     *\n     * <code>uint32 height = 3 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n\n    /**\n     * <pre>\n     * The round of the consensus instance.\n     * </pre>\n     *\n     * <code>int32 round = 4 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    int getRound();\n\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    java.util.List<pactus.BlockchainOuterClass.VoteInfo> \n        getVotesList();\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    pactus.BlockchainOuterClass.VoteInfo getVotes(int index);\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    int getVotesCount();\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    java.util.List<? extends pactus.BlockchainOuterClass.VoteInfoOrBuilder> \n        getVotesOrBuilderList();\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    pactus.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Message contains information about a consensus instance.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ConsensusInfo}\n   */\n  public static final class ConsensusInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ConsensusInfo)\n      ConsensusInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ConsensusInfo\");\n    }\n    // Use ConsensusInfo.newBuilder() to construct.\n    private ConsensusInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ConsensusInfo() {\n      address_ = \"\";\n      votes_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.ConsensusInfo.class, pactus.BlockchainOuterClass.ConsensusInfo.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the consensus instance.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the consensus instance.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ACTIVE_FIELD_NUMBER = 2;\n    private boolean active_ = false;\n    /**\n     * <pre>\n     * Indicates whether the consensus instance is active and part of the committee.\n     * </pre>\n     *\n     * <code>bool active = 2 [json_name = \"active\"];</code>\n     * @return The active.\n     */\n    @java.lang.Override\n    public boolean getActive() {\n      return active_;\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 3;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the consensus instance.\n     * </pre>\n     *\n     * <code>uint32 height = 3 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    public static final int ROUND_FIELD_NUMBER = 4;\n    private int round_ = 0;\n    /**\n     * <pre>\n     * The round of the consensus instance.\n     * </pre>\n     *\n     * <code>int32 round = 4 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    @java.lang.Override\n    public int getRound() {\n      return round_;\n    }\n\n    public static final int VOTES_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.BlockchainOuterClass.VoteInfo> votes_;\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.BlockchainOuterClass.VoteInfo> getVotesList() {\n      return votes_;\n    }\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.BlockchainOuterClass.VoteInfoOrBuilder> \n        getVotesOrBuilderList() {\n      return votes_;\n    }\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    @java.lang.Override\n    public int getVotesCount() {\n      return votes_.size();\n    }\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.VoteInfo getVotes(int index) {\n      return votes_.get(index);\n    }\n    /**\n     * <pre>\n     * List of votes in the consensus instance.\n     * </pre>\n     *\n     * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n     */\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder(\n        int index) {\n      return votes_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      if (active_ != false) {\n        output.writeBool(2, active_);\n      }\n      if (height_ != 0) {\n        output.writeUInt32(3, height_);\n      }\n      if (round_ != 0) {\n        output.writeInt32(4, round_);\n      }\n      for (int i = 0; i < votes_.size(); i++) {\n        output.writeMessage(5, votes_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      if (active_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(2, active_);\n      }\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(3, height_);\n      }\n      if (round_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(4, round_);\n      }\n      for (int i = 0; i < votes_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(5, votes_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.ConsensusInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.ConsensusInfo other = (pactus.BlockchainOuterClass.ConsensusInfo) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (getActive()\n          != other.getActive()) return false;\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (getRound()\n          != other.getRound()) return false;\n      if (!getVotesList()\n          .equals(other.getVotesList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + ACTIVE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getActive());\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (37 * hash) + ROUND_FIELD_NUMBER;\n      hash = (53 * hash) + getRound();\n      if (getVotesCount() > 0) {\n        hash = (37 * hash) + VOTES_FIELD_NUMBER;\n        hash = (53 * hash) + getVotesList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ConsensusInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.ConsensusInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about a consensus instance.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ConsensusInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ConsensusInfo)\n        pactus.BlockchainOuterClass.ConsensusInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.ConsensusInfo.class, pactus.BlockchainOuterClass.ConsensusInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.ConsensusInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        active_ = false;\n        height_ = 0;\n        round_ = 0;\n        if (votesBuilder_ == null) {\n          votes_ = java.util.Collections.emptyList();\n        } else {\n          votes_ = null;\n          votesBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000010);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.ConsensusInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ConsensusInfo build() {\n        pactus.BlockchainOuterClass.ConsensusInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ConsensusInfo buildPartial() {\n        pactus.BlockchainOuterClass.ConsensusInfo result = new pactus.BlockchainOuterClass.ConsensusInfo(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.BlockchainOuterClass.ConsensusInfo result) {\n        if (votesBuilder_ == null) {\n          if (((bitField0_ & 0x00000010) != 0)) {\n            votes_ = java.util.Collections.unmodifiableList(votes_);\n            bitField0_ = (bitField0_ & ~0x00000010);\n          }\n          result.votes_ = votes_;\n        } else {\n          result.votes_ = votesBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.ConsensusInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.active_ = active_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.height_ = height_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.round_ = round_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.ConsensusInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.ConsensusInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.ConsensusInfo other) {\n        if (other == pactus.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getActive() != false) {\n          setActive(other.getActive());\n        }\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        if (other.getRound() != 0) {\n          setRound(other.getRound());\n        }\n        if (votesBuilder_ == null) {\n          if (!other.votes_.isEmpty()) {\n            if (votes_.isEmpty()) {\n              votes_ = other.votes_;\n              bitField0_ = (bitField0_ & ~0x00000010);\n            } else {\n              ensureVotesIsMutable();\n              votes_.addAll(other.votes_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.votes_.isEmpty()) {\n            if (votesBuilder_.isEmpty()) {\n              votesBuilder_.dispose();\n              votesBuilder_ = null;\n              votes_ = other.votes_;\n              bitField0_ = (bitField0_ & ~0x00000010);\n              votesBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetVotesFieldBuilder() : null;\n            } else {\n              votesBuilder_.addAllMessages(other.votes_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                active_ = input.readBool();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 24: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 32: {\n                round_ = input.readInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                pactus.BlockchainOuterClass.VoteInfo m =\n                    input.readMessage(\n                        pactus.BlockchainOuterClass.VoteInfo.parser(),\n                        extensionRegistry);\n                if (votesBuilder_ == null) {\n                  ensureVotesIsMutable();\n                  votes_.add(m);\n                } else {\n                  votesBuilder_.addMessage(m);\n                }\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the consensus instance.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the consensus instance.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the consensus instance.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the consensus instance.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the consensus instance.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private boolean active_ ;\n      /**\n       * <pre>\n       * Indicates whether the consensus instance is active and part of the committee.\n       * </pre>\n       *\n       * <code>bool active = 2 [json_name = \"active\"];</code>\n       * @return The active.\n       */\n      @java.lang.Override\n      public boolean getActive() {\n        return active_;\n      }\n      /**\n       * <pre>\n       * Indicates whether the consensus instance is active and part of the committee.\n       * </pre>\n       *\n       * <code>bool active = 2 [json_name = \"active\"];</code>\n       * @param value The active to set.\n       * @return This builder for chaining.\n       */\n      public Builder setActive(boolean value) {\n\n        active_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates whether the consensus instance is active and part of the committee.\n       * </pre>\n       *\n       * <code>bool active = 2 [json_name = \"active\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearActive() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        active_ = false;\n        onChanged();\n        return this;\n      }\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the consensus instance.\n       * </pre>\n       *\n       * <code>uint32 height = 3 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the consensus instance.\n       * </pre>\n       *\n       * <code>uint32 height = 3 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the consensus instance.\n       * </pre>\n       *\n       * <code>uint32 height = 3 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int round_ ;\n      /**\n       * <pre>\n       * The round of the consensus instance.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @return The round.\n       */\n      @java.lang.Override\n      public int getRound() {\n        return round_;\n      }\n      /**\n       * <pre>\n       * The round of the consensus instance.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @param value The round to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRound(int value) {\n\n        round_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The round of the consensus instance.\n       * </pre>\n       *\n       * <code>int32 round = 4 [json_name = \"round\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRound() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        round_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.BlockchainOuterClass.VoteInfo> votes_ =\n        java.util.Collections.emptyList();\n      private void ensureVotesIsMutable() {\n        if (!((bitField0_ & 0x00000010) != 0)) {\n          votes_ = new java.util.ArrayList<pactus.BlockchainOuterClass.VoteInfo>(votes_);\n          bitField0_ |= 0x00000010;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.VoteInfo, pactus.BlockchainOuterClass.VoteInfo.Builder, pactus.BlockchainOuterClass.VoteInfoOrBuilder> votesBuilder_;\n\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.VoteInfo> getVotesList() {\n        if (votesBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(votes_);\n        } else {\n          return votesBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public int getVotesCount() {\n        if (votesBuilder_ == null) {\n          return votes_.size();\n        } else {\n          return votesBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public pactus.BlockchainOuterClass.VoteInfo getVotes(int index) {\n        if (votesBuilder_ == null) {\n          return votes_.get(index);\n        } else {\n          return votesBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder setVotes(\n          int index, pactus.BlockchainOuterClass.VoteInfo value) {\n        if (votesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureVotesIsMutable();\n          votes_.set(index, value);\n          onChanged();\n        } else {\n          votesBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder setVotes(\n          int index, pactus.BlockchainOuterClass.VoteInfo.Builder builderForValue) {\n        if (votesBuilder_ == null) {\n          ensureVotesIsMutable();\n          votes_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          votesBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder addVotes(pactus.BlockchainOuterClass.VoteInfo value) {\n        if (votesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureVotesIsMutable();\n          votes_.add(value);\n          onChanged();\n        } else {\n          votesBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder addVotes(\n          int index, pactus.BlockchainOuterClass.VoteInfo value) {\n        if (votesBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureVotesIsMutable();\n          votes_.add(index, value);\n          onChanged();\n        } else {\n          votesBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder addVotes(\n          pactus.BlockchainOuterClass.VoteInfo.Builder builderForValue) {\n        if (votesBuilder_ == null) {\n          ensureVotesIsMutable();\n          votes_.add(builderForValue.build());\n          onChanged();\n        } else {\n          votesBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder addVotes(\n          int index, pactus.BlockchainOuterClass.VoteInfo.Builder builderForValue) {\n        if (votesBuilder_ == null) {\n          ensureVotesIsMutable();\n          votes_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          votesBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder addAllVotes(\n          java.lang.Iterable<? extends pactus.BlockchainOuterClass.VoteInfo> values) {\n        if (votesBuilder_ == null) {\n          ensureVotesIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, votes_);\n          onChanged();\n        } else {\n          votesBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder clearVotes() {\n        if (votesBuilder_ == null) {\n          votes_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000010);\n          onChanged();\n        } else {\n          votesBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public Builder removeVotes(int index) {\n        if (votesBuilder_ == null) {\n          ensureVotesIsMutable();\n          votes_.remove(index);\n          onChanged();\n        } else {\n          votesBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public pactus.BlockchainOuterClass.VoteInfo.Builder getVotesBuilder(\n          int index) {\n        return internalGetVotesFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public pactus.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder(\n          int index) {\n        if (votesBuilder_ == null) {\n          return votes_.get(index);  } else {\n          return votesBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public java.util.List<? extends pactus.BlockchainOuterClass.VoteInfoOrBuilder> \n           getVotesOrBuilderList() {\n        if (votesBuilder_ != null) {\n          return votesBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(votes_);\n        }\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public pactus.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder() {\n        return internalGetVotesFieldBuilder().addBuilder(\n            pactus.BlockchainOuterClass.VoteInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public pactus.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder(\n          int index) {\n        return internalGetVotesFieldBuilder().addBuilder(\n            index, pactus.BlockchainOuterClass.VoteInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of votes in the consensus instance.\n       * </pre>\n       *\n       * <code>repeated .pactus.VoteInfo votes = 5 [json_name = \"votes\"];</code>\n       */\n      public java.util.List<pactus.BlockchainOuterClass.VoteInfo.Builder> \n           getVotesBuilderList() {\n        return internalGetVotesFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.BlockchainOuterClass.VoteInfo, pactus.BlockchainOuterClass.VoteInfo.Builder, pactus.BlockchainOuterClass.VoteInfoOrBuilder> \n          internalGetVotesFieldBuilder() {\n        if (votesBuilder_ == null) {\n          votesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.BlockchainOuterClass.VoteInfo, pactus.BlockchainOuterClass.VoteInfo.Builder, pactus.BlockchainOuterClass.VoteInfoOrBuilder>(\n                  votes_,\n                  ((bitField0_ & 0x00000010) != 0),\n                  getParentForChildren(),\n                  isClean());\n          votes_ = null;\n        }\n        return votesBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ConsensusInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ConsensusInfo)\n    private static final pactus.BlockchainOuterClass.ConsensusInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.ConsensusInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.ConsensusInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ConsensusInfo>\n        PARSER = new com.google.protobuf.AbstractParser<ConsensusInfo>() {\n      @java.lang.Override\n      public ConsensusInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ConsensusInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ConsensusInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ProposalInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ProposalInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the proposal.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n\n    /**\n     * <pre>\n     * The round of the proposal.\n     * </pre>\n     *\n     * <code>int32 round = 2 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    int getRound();\n\n    /**\n     * <pre>\n     * The block data of the proposal.\n     * </pre>\n     *\n     * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n     * @return The blockData.\n     */\n    java.lang.String getBlockData();\n    /**\n     * <pre>\n     * The block data of the proposal.\n     * </pre>\n     *\n     * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n     * @return The bytes for blockData.\n     */\n    com.google.protobuf.ByteString\n        getBlockDataBytes();\n\n    /**\n     * <pre>\n     * The signature of the proposal, signed by the proposer.\n     * </pre>\n     *\n     * <code>string signature = 4 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The signature of the proposal, signed by the proposer.\n     * </pre>\n     *\n     * <code>string signature = 4 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n  }\n  /**\n   * <pre>\n   * Message contains information about a proposal.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ProposalInfo}\n   */\n  public static final class ProposalInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ProposalInfo)\n      ProposalInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ProposalInfo\");\n    }\n    // Use ProposalInfo.newBuilder() to construct.\n    private ProposalInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ProposalInfo() {\n      blockData_ = \"\";\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ProposalInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.BlockchainOuterClass.internal_static_pactus_ProposalInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.BlockchainOuterClass.ProposalInfo.class, pactus.BlockchainOuterClass.ProposalInfo.Builder.class);\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 1;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * The height of the proposal.\n     * </pre>\n     *\n     * <code>uint32 height = 1 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    public static final int ROUND_FIELD_NUMBER = 2;\n    private int round_ = 0;\n    /**\n     * <pre>\n     * The round of the proposal.\n     * </pre>\n     *\n     * <code>int32 round = 2 [json_name = \"round\"];</code>\n     * @return The round.\n     */\n    @java.lang.Override\n    public int getRound() {\n      return round_;\n    }\n\n    public static final int BLOCK_DATA_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object blockData_ = \"\";\n    /**\n     * <pre>\n     * The block data of the proposal.\n     * </pre>\n     *\n     * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n     * @return The blockData.\n     */\n    @java.lang.Override\n    public java.lang.String getBlockData() {\n      java.lang.Object ref = blockData_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        blockData_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The block data of the proposal.\n     * </pre>\n     *\n     * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n     * @return The bytes for blockData.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getBlockDataBytes() {\n      java.lang.Object ref = blockData_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        blockData_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The signature of the proposal, signed by the proposer.\n     * </pre>\n     *\n     * <code>string signature = 4 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signature of the proposal, signed by the proposer.\n     * </pre>\n     *\n     * <code>string signature = 4 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (height_ != 0) {\n        output.writeUInt32(1, height_);\n      }\n      if (round_ != 0) {\n        output.writeInt32(2, round_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockData_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, blockData_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, signature_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, height_);\n      }\n      if (round_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(2, round_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockData_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, blockData_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, signature_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.BlockchainOuterClass.ProposalInfo)) {\n        return super.equals(obj);\n      }\n      pactus.BlockchainOuterClass.ProposalInfo other = (pactus.BlockchainOuterClass.ProposalInfo) obj;\n\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (getRound()\n          != other.getRound()) return false;\n      if (!getBlockData()\n          .equals(other.getBlockData())) return false;\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (37 * hash) + ROUND_FIELD_NUMBER;\n      hash = (53 * hash) + getRound();\n      hash = (37 * hash) + BLOCK_DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockData().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.BlockchainOuterClass.ProposalInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.BlockchainOuterClass.ProposalInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.BlockchainOuterClass.ProposalInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.BlockchainOuterClass.ProposalInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Message contains information about a proposal.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ProposalInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ProposalInfo)\n        pactus.BlockchainOuterClass.ProposalInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ProposalInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ProposalInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.BlockchainOuterClass.ProposalInfo.class, pactus.BlockchainOuterClass.ProposalInfo.Builder.class);\n      }\n\n      // Construct using pactus.BlockchainOuterClass.ProposalInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        height_ = 0;\n        round_ = 0;\n        blockData_ = \"\";\n        signature_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.BlockchainOuterClass.internal_static_pactus_ProposalInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ProposalInfo getDefaultInstanceForType() {\n        return pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ProposalInfo build() {\n        pactus.BlockchainOuterClass.ProposalInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.BlockchainOuterClass.ProposalInfo buildPartial() {\n        pactus.BlockchainOuterClass.ProposalInfo result = new pactus.BlockchainOuterClass.ProposalInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.BlockchainOuterClass.ProposalInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.height_ = height_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.round_ = round_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.blockData_ = blockData_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.signature_ = signature_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.BlockchainOuterClass.ProposalInfo) {\n          return mergeFrom((pactus.BlockchainOuterClass.ProposalInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.BlockchainOuterClass.ProposalInfo other) {\n        if (other == pactus.BlockchainOuterClass.ProposalInfo.getDefaultInstance()) return this;\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        if (other.getRound() != 0) {\n          setRound(other.getRound());\n        }\n        if (!other.getBlockData().isEmpty()) {\n          blockData_ = other.blockData_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                round_ = input.readInt32();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 26: {\n                blockData_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int height_ ;\n      /**\n       * <pre>\n       * The height of the proposal.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * The height of the proposal.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the proposal.\n       * </pre>\n       *\n       * <code>uint32 height = 1 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int round_ ;\n      /**\n       * <pre>\n       * The round of the proposal.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @return The round.\n       */\n      @java.lang.Override\n      public int getRound() {\n        return round_;\n      }\n      /**\n       * <pre>\n       * The round of the proposal.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @param value The round to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRound(int value) {\n\n        round_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The round of the proposal.\n       * </pre>\n       *\n       * <code>int32 round = 2 [json_name = \"round\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRound() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        round_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object blockData_ = \"\";\n      /**\n       * <pre>\n       * The block data of the proposal.\n       * </pre>\n       *\n       * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n       * @return The blockData.\n       */\n      public java.lang.String getBlockData() {\n        java.lang.Object ref = blockData_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          blockData_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The block data of the proposal.\n       * </pre>\n       *\n       * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n       * @return The bytes for blockData.\n       */\n      public com.google.protobuf.ByteString\n          getBlockDataBytes() {\n        java.lang.Object ref = blockData_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          blockData_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The block data of the proposal.\n       * </pre>\n       *\n       * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n       * @param value The blockData to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockData(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        blockData_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The block data of the proposal.\n       * </pre>\n       *\n       * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockData() {\n        blockData_ = getDefaultInstance().getBlockData();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The block data of the proposal.\n       * </pre>\n       *\n       * <code>string block_data = 3 [json_name = \"blockData\"];</code>\n       * @param value The bytes for blockData to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockDataBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        blockData_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The signature of the proposal, signed by the proposer.\n       * </pre>\n       *\n       * <code>string signature = 4 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature of the proposal, signed by the proposer.\n       * </pre>\n       *\n       * <code>string signature = 4 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature of the proposal, signed by the proposer.\n       * </pre>\n       *\n       * <code>string signature = 4 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature of the proposal, signed by the proposer.\n       * </pre>\n       *\n       * <code>string signature = 4 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature of the proposal, signed by the proposer.\n       * </pre>\n       *\n       * <code>string signature = 4 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ProposalInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ProposalInfo)\n    private static final pactus.BlockchainOuterClass.ProposalInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.BlockchainOuterClass.ProposalInfo();\n    }\n\n    public static pactus.BlockchainOuterClass.ProposalInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ProposalInfo>\n        PARSER = new com.google.protobuf.AbstractParser<ProposalInfo>() {\n      @java.lang.Override\n      public ProposalInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ProposalInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ProposalInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.BlockchainOuterClass.ProposalInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetAccountRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetAccountRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetAccountResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetAccountResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorAddressesRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorAddressesResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorByNumberRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetPublicKeyRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetPublicKeyResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockHashRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockHashRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockHashResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockHashResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockHeightRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockHeightResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockchainInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetBlockchainInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetCommitteeInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetCommitteeInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetCommitteeInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetCommitteeInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetConsensusInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetConsensusInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTxPoolContentRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTxPoolContentResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ValidatorInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ValidatorInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_AccountInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_AccountInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_BlockHeaderInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_BlockHeaderInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CertificateInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CertificateInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_VoteInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_VoteInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ConsensusInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ConsensusInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ProposalInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ProposalInfo_fieldAccessorTable;\n\n  public static com.google.protobuf.Descriptors.FileDescriptor\n      getDescriptor() {\n    return descriptor;\n  }\n  private static  com.google.protobuf.Descriptors.FileDescriptor\n      descriptor;\n  static {\n    java.lang.String[] descriptorData = {\n      \"\\n\\020blockchain.proto\\022\\006pactus\\032\\021transaction.\" +\n      \"proto\\\"-\\n\\021GetAccountRequest\\022\\030\\n\\007address\\030\\001 \" +\n      \"\\001(\\tR\\007address\\\"C\\n\\022GetAccountResponse\\022-\\n\\007ac\" +\n      \"count\\030\\001 \\001(\\0132\\023.pactus.AccountInfoR\\007accoun\" +\n      \"t\\\"\\036\\n\\034GetValidatorAddressesRequest\\\"=\\n\\035Get\" +\n      \"ValidatorAddressesResponse\\022\\034\\n\\taddresses\\030\" +\n      \"\\001 \\003(\\tR\\taddresses\\\"/\\n\\023GetValidatorRequest\\022\" +\n      \"\\030\\n\\007address\\030\\001 \\001(\\tR\\007address\\\"5\\n\\033GetValidato\" +\n      \"rByNumberRequest\\022\\026\\n\\006number\\030\\001 \\001(\\005R\\006number\" +\n      \"\\\"K\\n\\024GetValidatorResponse\\0223\\n\\tvalidator\\030\\001 \" +\n      \"\\001(\\0132\\025.pactus.ValidatorInfoR\\tvalidator\\\"/\\n\" +\n      \"\\023GetPublicKeyRequest\\022\\030\\n\\007address\\030\\001 \\001(\\tR\\007a\" +\n      \"ddress\\\"5\\n\\024GetPublicKeyResponse\\022\\035\\n\\npublic\" +\n      \"_key\\030\\001 \\001(\\tR\\tpublicKey\\\"_\\n\\017GetBlockRequest\" +\n      \"\\022\\026\\n\\006height\\030\\001 \\001(\\rR\\006height\\0224\\n\\tverbosity\\030\\002 \" +\n      \"\\001(\\0162\\026.pactus.BlockVerbosityR\\tverbosity\\\"\\203\" +\n      \"\\002\\n\\020GetBlockResponse\\022\\026\\n\\006height\\030\\001 \\001(\\rR\\006hei\" +\n      \"ght\\022\\022\\n\\004hash\\030\\002 \\001(\\tR\\004hash\\022\\022\\n\\004data\\030\\003 \\001(\\tR\\004d\" +\n      \"ata\\022\\035\\n\\nblock_time\\030\\004 \\001(\\rR\\tblockTime\\022/\\n\\006he\" +\n      \"ader\\030\\005 \\001(\\0132\\027.pactus.BlockHeaderInfoR\\006hea\" +\n      \"der\\0224\\n\\tprev_cert\\030\\006 \\001(\\0132\\027.pactus.Certific\" +\n      \"ateInfoR\\010prevCert\\022)\\n\\003txs\\030\\007 \\003(\\0132\\027.pactus.\" +\n      \"TransactionInfoR\\003txs\\\"-\\n\\023GetBlockHashRequ\" +\n      \"est\\022\\026\\n\\006height\\030\\001 \\001(\\rR\\006height\\\"*\\n\\024GetBlockH\" +\n      \"ashResponse\\022\\022\\n\\004hash\\030\\001 \\001(\\tR\\004hash\\\"+\\n\\025GetBl\" +\n      \"ockHeightRequest\\022\\022\\n\\004hash\\030\\001 \\001(\\tR\\004hash\\\"0\\n\\026\" +\n      \"GetBlockHeightResponse\\022\\026\\n\\006height\\030\\001 \\001(\\rR\\006\" +\n      \"height\\\"\\032\\n\\030GetBlockchainInfoRequest\\\"\\223\\004\\n\\031G\" +\n      \"etBlockchainInfoResponse\\022*\\n\\021last_block_h\" +\n      \"eight\\030\\001 \\001(\\rR\\017lastBlockHeight\\022&\\n\\017last_blo\" +\n      \"ck_hash\\030\\002 \\001(\\tR\\rlastBlockHash\\022&\\n\\017last_blo\" +\n      \"ck_time\\030\\n \\001(\\003R\\rlastBlockTime\\022%\\n\\016total_ac\" +\n      \"counts\\030\\003 \\001(\\005R\\rtotalAccounts\\022)\\n\\020total_val\" +\n      \"idators\\030\\004 \\001(\\005R\\017totalValidators\\022+\\n\\021active\" +\n      \"_validators\\030\\014 \\001(\\005R\\020activeValidators\\022\\037\\n\\013t\" +\n      \"otal_power\\030\\005 \\001(\\003R\\ntotalPower\\022\\'\\n\\017committe\" +\n      \"e_power\\030\\006 \\001(\\003R\\016committeePower\\022\\033\\n\\tis_prun\" +\n      \"ed\\030\\010 \\001(\\010R\\010isPruned\\022%\\n\\016pruning_height\\030\\t \\001\" +\n      \"(\\rR\\rpruningHeight\\022!\\n\\014in_committee\\030\\r \\001(\\010R\" +\n      \"\\013inCommittee\\022%\\n\\016committee_size\\030\\016 \\001(\\005R\\rco\" +\n      \"mmitteeSize\\022#\\n\\raverage_score\\030\\017 \\001(\\001R\\014aver\" +\n      \"ageScore\\\"\\031\\n\\027GetCommitteeInfoRequest\\\"\\354\\002\\n\\030\" +\n      \"GetCommitteeInfoResponse\\022%\\n\\016committee_si\" +\n      \"ze\\030\\001 \\001(\\005R\\rcommitteeSize\\022\\'\\n\\017committee_pow\" +\n      \"er\\030\\002 \\001(\\003R\\016committeePower\\022\\037\\n\\013total_power\\030\" +\n      \"\\003 \\001(\\003R\\ntotalPower\\0225\\n\\nvalidators\\030\\004 \\003(\\0132\\025.\" +\n      \"pactus.ValidatorInfoR\\nvalidators\\022c\\n\\021prot\" +\n      \"ocol_versions\\030\\005 \\003(\\01326.pactus.GetCommitte\" +\n      \"eInfoResponse.ProtocolVersionsEntryR\\020pro\" +\n      \"tocolVersions\\032C\\n\\025ProtocolVersionsEntry\\022\\020\" +\n      \"\\n\\003key\\030\\001 \\001(\\005R\\003key\\022\\024\\n\\005value\\030\\002 \\001(\\001R\\005value:\\002\" +\n      \"8\\001\\\"\\031\\n\\027GetConsensusInfoRequest\\\"\\201\\001\\n\\030GetCon\" +\n      \"sensusInfoResponse\\0220\\n\\010proposal\\030\\001 \\001(\\0132\\024.p\" +\n      \"actus.ProposalInfoR\\010proposal\\0223\\n\\tinstance\" +\n      \"s\\030\\002 \\003(\\0132\\025.pactus.ConsensusInfoR\\tinstance\" +\n      \"s\\\"Q\\n\\027GetTxPoolContentRequest\\0226\\n\\014payload_\" +\n      \"type\\030\\001 \\001(\\0162\\023.pactus.PayloadTypeR\\013payload\" +\n      \"Type\\\"E\\n\\030GetTxPoolContentResponse\\022)\\n\\003txs\\030\" +\n      \"\\001 \\003(\\0132\\027.pactus.TransactionInfoR\\003txs\\\"\\241\\004\\n\\r\" +\n      \"ValidatorInfo\\022\\022\\n\\004hash\\030\\001 \\001(\\tR\\004hash\\022\\022\\n\\004dat\" +\n      \"a\\030\\002 \\001(\\tR\\004data\\022\\035\\n\\npublic_key\\030\\003 \\001(\\tR\\tpubli\" +\n      \"cKey\\022\\026\\n\\006number\\030\\004 \\001(\\005R\\006number\\022\\024\\n\\005stake\\030\\005 \" +\n      \"\\001(\\003R\\005stake\\022.\\n\\023last_bonding_height\\030\\006 \\001(\\rR\" +\n      \"\\021lastBondingHeight\\0222\\n\\025last_sortition_hei\" +\n      \"ght\\030\\007 \\001(\\rR\\023lastSortitionHeight\\022)\\n\\020unbond\" +\n      \"ing_height\\030\\010 \\001(\\rR\\017unbondingHeight\\022\\030\\n\\007add\" +\n      \"ress\\030\\t \\001(\\tR\\007address\\022-\\n\\022availability_scor\" +\n      \"e\\030\\n \\001(\\001R\\021availabilityScore\\022)\\n\\020protocol_v\" +\n      \"ersion\\030\\013 \\001(\\005R\\017protocolVersion\\022!\\n\\014is_dele\" +\n      \"gated\\030\\014 \\001(\\010R\\013isDelegated\\022%\\n\\016delegate_own\" +\n      \"er\\030\\r \\001(\\tR\\rdelegateOwner\\022%\\n\\016delegate_shar\" +\n      \"e\\030\\016 \\001(\\003R\\rdelegateShare\\022\\'\\n\\017delegate_expir\" +\n      \"y\\030\\017 \\001(\\rR\\016delegateExpiry\\\"\\201\\001\\n\\013AccountInfo\\022\" +\n      \"\\022\\n\\004hash\\030\\001 \\001(\\tR\\004hash\\022\\022\\n\\004data\\030\\002 \\001(\\tR\\004data\\022\" +\n      \"\\026\\n\\006number\\030\\003 \\001(\\005R\\006number\\022\\030\\n\\007balance\\030\\004 \\001(\\003\" +\n      \"R\\007balance\\022\\030\\n\\007address\\030\\005 \\001(\\tR\\007address\\\"\\304\\001\\n\\017\" +\n      \"BlockHeaderInfo\\022\\030\\n\\007version\\030\\001 \\001(\\005R\\007versio\" +\n      \"n\\022&\\n\\017prev_block_hash\\030\\002 \\001(\\tR\\rprevBlockHas\" +\n      \"h\\022\\035\\n\\nstate_root\\030\\003 \\001(\\tR\\tstateRoot\\022%\\n\\016sort\" +\n      \"ition_seed\\030\\004 \\001(\\tR\\rsortitionSeed\\022)\\n\\020propo\" +\n      \"ser_address\\030\\005 \\001(\\tR\\017proposerAddress\\\"\\227\\001\\n\\017C\" +\n      \"ertificateInfo\\022\\022\\n\\004hash\\030\\001 \\001(\\tR\\004hash\\022\\024\\n\\005ro\" +\n      \"und\\030\\002 \\001(\\005R\\005round\\022\\036\\n\\ncommitters\\030\\003 \\003(\\005R\\nco\" +\n      \"mmitters\\022\\034\\n\\tabsentees\\030\\004 \\003(\\005R\\tabsentees\\022\\034\" +\n      \"\\n\\tsignature\\030\\005 \\001(\\tR\\tsignature\\\"\\261\\001\\n\\010VoteInf\" +\n      \"o\\022$\\n\\004type\\030\\001 \\001(\\0162\\020.pactus.VoteTypeR\\004type\\022\" +\n      \"\\024\\n\\005voter\\030\\002 \\001(\\tR\\005voter\\022\\035\\n\\nblock_hash\\030\\003 \\001(\" +\n      \"\\tR\\tblockHash\\022\\024\\n\\005round\\030\\004 \\001(\\005R\\005round\\022\\031\\n\\010cp\" +\n      \"_round\\030\\005 \\001(\\005R\\007cpRound\\022\\031\\n\\010cp_value\\030\\006 \\001(\\005R\" +\n      \"\\007cpValue\\\"\\227\\001\\n\\rConsensusInfo\\022\\030\\n\\007address\\030\\001 \" +\n      \"\\001(\\tR\\007address\\022\\026\\n\\006active\\030\\002 \\001(\\010R\\006active\\022\\026\\n\\006\" +\n      \"height\\030\\003 \\001(\\rR\\006height\\022\\024\\n\\005round\\030\\004 \\001(\\005R\\005rou\" +\n      \"nd\\022&\\n\\005votes\\030\\005 \\003(\\0132\\020.pactus.VoteInfoR\\005vot\" +\n      \"es\\\"y\\n\\014ProposalInfo\\022\\026\\n\\006height\\030\\001 \\001(\\rR\\006heig\" +\n      \"ht\\022\\024\\n\\005round\\030\\002 \\001(\\005R\\005round\\022\\035\\n\\nblock_data\\030\\003\" +\n      \" \\001(\\tR\\tblockData\\022\\034\\n\\tsignature\\030\\004 \\001(\\tR\\tsign\" +\n      \"ature*f\\n\\016BlockVerbosity\\022\\030\\n\\024BLOCK_VERBOSI\" +\n      \"TY_DATA\\020\\000\\022\\030\\n\\024BLOCK_VERBOSITY_INFO\\020\\001\\022 \\n\\034B\" +\n      \"LOCK_VERBOSITY_TRANSACTIONS\\020\\002*\\246\\001\\n\\010VoteTy\" +\n      \"pe\\022\\031\\n\\025VOTE_TYPE_UNSPECIFIED\\020\\000\\022\\025\\n\\021VOTE_TY\" +\n      \"PE_PREPARE\\020\\001\\022\\027\\n\\023VOTE_TYPE_PRECOMMIT\\020\\002\\022\\031\\n\" +\n      \"\\025VOTE_TYPE_CP_PRE_VOTE\\020\\003\\022\\032\\n\\026VOTE_TYPE_CP\" +\n      \"_MAIN_VOTE\\020\\004\\022\\030\\n\\024VOTE_TYPE_CP_DECIDED\\020\\0052\\342\" +\n      \"\\007\\n\\nBlockchain\\022=\\n\\010GetBlock\\022\\027.pactus.GetBl\" +\n      \"ockRequest\\032\\030.pactus.GetBlockResponse\\022I\\n\\014\" +\n      \"GetBlockHash\\022\\033.pactus.GetBlockHashReques\" +\n      \"t\\032\\034.pactus.GetBlockHashResponse\\022O\\n\\016GetBl\" +\n      \"ockHeight\\022\\035.pactus.GetBlockHeightRequest\" +\n      \"\\032\\036.pactus.GetBlockHeightResponse\\022X\\n\\021GetB\" +\n      \"lockchainInfo\\022 .pactus.GetBlockchainInfo\" +\n      \"Request\\032!.pactus.GetBlockchainInfoRespon\" +\n      \"se\\022U\\n\\020GetCommitteeInfo\\022\\037.pactus.GetCommi\" +\n      \"tteeInfoRequest\\032 .pactus.GetCommitteeInf\" +\n      \"oResponse\\022U\\n\\020GetConsensusInfo\\022\\037.pactus.G\" +\n      \"etConsensusInfoRequest\\032 .pactus.GetConse\" +\n      \"nsusInfoResponse\\022C\\n\\nGetAccount\\022\\031.pactus.\" +\n      \"GetAccountRequest\\032\\032.pactus.GetAccountRes\" +\n      \"ponse\\022I\\n\\014GetValidator\\022\\033.pactus.GetValida\" +\n      \"torRequest\\032\\034.pactus.GetValidatorResponse\" +\n      \"\\022Y\\n\\024GetValidatorByNumber\\022#.pactus.GetVal\" +\n      \"idatorByNumberRequest\\032\\034.pactus.GetValida\" +\n      \"torResponse\\022d\\n\\025GetValidatorAddresses\\022$.p\" +\n      \"actus.GetValidatorAddressesRequest\\032%.pac\" +\n      \"tus.GetValidatorAddressesResponse\\022I\\n\\014Get\" +\n      \"PublicKey\\022\\033.pactus.GetPublicKeyRequest\\032\\034\" +\n      \".pactus.GetPublicKeyResponse\\022U\\n\\020GetTxPoo\" +\n      \"lContent\\022\\037.pactus.GetTxPoolContentReques\" +\n      \"t\\032 .pactus.GetTxPoolContentResponseB:\\n\\006p\" +\n      \"actusZ0github.com/pactus-project/pactus/\" +\n      \"www/grpc/pactusb\\006proto3\"\n    };\n    descriptor = com.google.protobuf.Descriptors.FileDescriptor\n      .internalBuildGeneratedFileFrom(descriptorData,\n        new com.google.protobuf.Descriptors.FileDescriptor[] {\n          pactus.TransactionOuterClass.getDescriptor(),\n        });\n    internal_static_pactus_GetAccountRequest_descriptor =\n      getDescriptor().getMessageType(0);\n    internal_static_pactus_GetAccountRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetAccountRequest_descriptor,\n        new java.lang.String[] { \"Address\", });\n    internal_static_pactus_GetAccountResponse_descriptor =\n      getDescriptor().getMessageType(1);\n    internal_static_pactus_GetAccountResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetAccountResponse_descriptor,\n        new java.lang.String[] { \"Account\", });\n    internal_static_pactus_GetValidatorAddressesRequest_descriptor =\n      getDescriptor().getMessageType(2);\n    internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorAddressesRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetValidatorAddressesResponse_descriptor =\n      getDescriptor().getMessageType(3);\n    internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorAddressesResponse_descriptor,\n        new java.lang.String[] { \"Addresses\", });\n    internal_static_pactus_GetValidatorRequest_descriptor =\n      getDescriptor().getMessageType(4);\n    internal_static_pactus_GetValidatorRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorRequest_descriptor,\n        new java.lang.String[] { \"Address\", });\n    internal_static_pactus_GetValidatorByNumberRequest_descriptor =\n      getDescriptor().getMessageType(5);\n    internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorByNumberRequest_descriptor,\n        new java.lang.String[] { \"Number\", });\n    internal_static_pactus_GetValidatorResponse_descriptor =\n      getDescriptor().getMessageType(6);\n    internal_static_pactus_GetValidatorResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorResponse_descriptor,\n        new java.lang.String[] { \"Validator\", });\n    internal_static_pactus_GetPublicKeyRequest_descriptor =\n      getDescriptor().getMessageType(7);\n    internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetPublicKeyRequest_descriptor,\n        new java.lang.String[] { \"Address\", });\n    internal_static_pactus_GetPublicKeyResponse_descriptor =\n      getDescriptor().getMessageType(8);\n    internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetPublicKeyResponse_descriptor,\n        new java.lang.String[] { \"PublicKey\", });\n    internal_static_pactus_GetBlockRequest_descriptor =\n      getDescriptor().getMessageType(9);\n    internal_static_pactus_GetBlockRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockRequest_descriptor,\n        new java.lang.String[] { \"Height\", \"Verbosity\", });\n    internal_static_pactus_GetBlockResponse_descriptor =\n      getDescriptor().getMessageType(10);\n    internal_static_pactus_GetBlockResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockResponse_descriptor,\n        new java.lang.String[] { \"Height\", \"Hash\", \"Data\", \"BlockTime\", \"Header\", \"PrevCert\", \"Txs\", });\n    internal_static_pactus_GetBlockHashRequest_descriptor =\n      getDescriptor().getMessageType(11);\n    internal_static_pactus_GetBlockHashRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockHashRequest_descriptor,\n        new java.lang.String[] { \"Height\", });\n    internal_static_pactus_GetBlockHashResponse_descriptor =\n      getDescriptor().getMessageType(12);\n    internal_static_pactus_GetBlockHashResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockHashResponse_descriptor,\n        new java.lang.String[] { \"Hash\", });\n    internal_static_pactus_GetBlockHeightRequest_descriptor =\n      getDescriptor().getMessageType(13);\n    internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockHeightRequest_descriptor,\n        new java.lang.String[] { \"Hash\", });\n    internal_static_pactus_GetBlockHeightResponse_descriptor =\n      getDescriptor().getMessageType(14);\n    internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockHeightResponse_descriptor,\n        new java.lang.String[] { \"Height\", });\n    internal_static_pactus_GetBlockchainInfoRequest_descriptor =\n      getDescriptor().getMessageType(15);\n    internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockchainInfoRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetBlockchainInfoResponse_descriptor =\n      getDescriptor().getMessageType(16);\n    internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetBlockchainInfoResponse_descriptor,\n        new java.lang.String[] { \"LastBlockHeight\", \"LastBlockHash\", \"LastBlockTime\", \"TotalAccounts\", \"TotalValidators\", \"ActiveValidators\", \"TotalPower\", \"CommitteePower\", \"IsPruned\", \"PruningHeight\", \"InCommittee\", \"CommitteeSize\", \"AverageScore\", });\n    internal_static_pactus_GetCommitteeInfoRequest_descriptor =\n      getDescriptor().getMessageType(17);\n    internal_static_pactus_GetCommitteeInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetCommitteeInfoRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetCommitteeInfoResponse_descriptor =\n      getDescriptor().getMessageType(18);\n    internal_static_pactus_GetCommitteeInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetCommitteeInfoResponse_descriptor,\n        new java.lang.String[] { \"CommitteeSize\", \"CommitteePower\", \"TotalPower\", \"Validators\", \"ProtocolVersions\", });\n    internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_descriptor =\n      internal_static_pactus_GetCommitteeInfoResponse_descriptor.getNestedType(0);\n    internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetCommitteeInfoResponse_ProtocolVersionsEntry_descriptor,\n        new java.lang.String[] { \"Key\", \"Value\", });\n    internal_static_pactus_GetConsensusInfoRequest_descriptor =\n      getDescriptor().getMessageType(19);\n    internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetConsensusInfoRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetConsensusInfoResponse_descriptor =\n      getDescriptor().getMessageType(20);\n    internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetConsensusInfoResponse_descriptor,\n        new java.lang.String[] { \"Proposal\", \"Instances\", });\n    internal_static_pactus_GetTxPoolContentRequest_descriptor =\n      getDescriptor().getMessageType(21);\n    internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTxPoolContentRequest_descriptor,\n        new java.lang.String[] { \"PayloadType\", });\n    internal_static_pactus_GetTxPoolContentResponse_descriptor =\n      getDescriptor().getMessageType(22);\n    internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTxPoolContentResponse_descriptor,\n        new java.lang.String[] { \"Txs\", });\n    internal_static_pactus_ValidatorInfo_descriptor =\n      getDescriptor().getMessageType(23);\n    internal_static_pactus_ValidatorInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ValidatorInfo_descriptor,\n        new java.lang.String[] { \"Hash\", \"Data\", \"PublicKey\", \"Number\", \"Stake\", \"LastBondingHeight\", \"LastSortitionHeight\", \"UnbondingHeight\", \"Address\", \"AvailabilityScore\", \"ProtocolVersion\", \"IsDelegated\", \"DelegateOwner\", \"DelegateShare\", \"DelegateExpiry\", });\n    internal_static_pactus_AccountInfo_descriptor =\n      getDescriptor().getMessageType(24);\n    internal_static_pactus_AccountInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_AccountInfo_descriptor,\n        new java.lang.String[] { \"Hash\", \"Data\", \"Number\", \"Balance\", \"Address\", });\n    internal_static_pactus_BlockHeaderInfo_descriptor =\n      getDescriptor().getMessageType(25);\n    internal_static_pactus_BlockHeaderInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_BlockHeaderInfo_descriptor,\n        new java.lang.String[] { \"Version\", \"PrevBlockHash\", \"StateRoot\", \"SortitionSeed\", \"ProposerAddress\", });\n    internal_static_pactus_CertificateInfo_descriptor =\n      getDescriptor().getMessageType(26);\n    internal_static_pactus_CertificateInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CertificateInfo_descriptor,\n        new java.lang.String[] { \"Hash\", \"Round\", \"Committers\", \"Absentees\", \"Signature\", });\n    internal_static_pactus_VoteInfo_descriptor =\n      getDescriptor().getMessageType(27);\n    internal_static_pactus_VoteInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_VoteInfo_descriptor,\n        new java.lang.String[] { \"Type\", \"Voter\", \"BlockHash\", \"Round\", \"CpRound\", \"CpValue\", });\n    internal_static_pactus_ConsensusInfo_descriptor =\n      getDescriptor().getMessageType(28);\n    internal_static_pactus_ConsensusInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ConsensusInfo_descriptor,\n        new java.lang.String[] { \"Address\", \"Active\", \"Height\", \"Round\", \"Votes\", });\n    internal_static_pactus_ProposalInfo_descriptor =\n      getDescriptor().getMessageType(29);\n    internal_static_pactus_ProposalInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ProposalInfo_descriptor,\n        new java.lang.String[] { \"Height\", \"Round\", \"BlockData\", \"Signature\", });\n    descriptor.resolveAllFeaturesImmutable();\n    pactus.TransactionOuterClass.getDescriptor();\n  }\n\n  // @@protoc_insertion_point(outer_class_scope)\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/NetworkGrpc.java",
    "content": "package pactus;\n\nimport static io.grpc.MethodDescriptor.generateFullMethodName;\n\n/**\n * <pre>\n * Network service provides RPCs for retrieving information about the network.\n * </pre>\n */\n@io.grpc.stub.annotations.GrpcGenerated\npublic final class NetworkGrpc {\n\n  private NetworkGrpc() {}\n\n  public static final java.lang.String SERVICE_NAME = \"pactus.Network\";\n\n  // Static method descriptors that strictly reflect the proto.\n  private static volatile io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNetworkInfoRequest,\n      pactus.NetworkOuterClass.GetNetworkInfoResponse> getGetNetworkInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetNetworkInfo\",\n      requestType = pactus.NetworkOuterClass.GetNetworkInfoRequest.class,\n      responseType = pactus.NetworkOuterClass.GetNetworkInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNetworkInfoRequest,\n      pactus.NetworkOuterClass.GetNetworkInfoResponse> getGetNetworkInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNetworkInfoRequest, pactus.NetworkOuterClass.GetNetworkInfoResponse> getGetNetworkInfoMethod;\n    if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) {\n      synchronized (NetworkGrpc.class) {\n        if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) {\n          NetworkGrpc.getGetNetworkInfoMethod = getGetNetworkInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.NetworkOuterClass.GetNetworkInfoRequest, pactus.NetworkOuterClass.GetNetworkInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetNetworkInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new NetworkMethodDescriptorSupplier(\"GetNetworkInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetNetworkInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.NetworkOuterClass.ListPeersRequest,\n      pactus.NetworkOuterClass.ListPeersResponse> getListPeersMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"ListPeers\",\n      requestType = pactus.NetworkOuterClass.ListPeersRequest.class,\n      responseType = pactus.NetworkOuterClass.ListPeersResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.NetworkOuterClass.ListPeersRequest,\n      pactus.NetworkOuterClass.ListPeersResponse> getListPeersMethod() {\n    io.grpc.MethodDescriptor<pactus.NetworkOuterClass.ListPeersRequest, pactus.NetworkOuterClass.ListPeersResponse> getListPeersMethod;\n    if ((getListPeersMethod = NetworkGrpc.getListPeersMethod) == null) {\n      synchronized (NetworkGrpc.class) {\n        if ((getListPeersMethod = NetworkGrpc.getListPeersMethod) == null) {\n          NetworkGrpc.getListPeersMethod = getListPeersMethod =\n              io.grpc.MethodDescriptor.<pactus.NetworkOuterClass.ListPeersRequest, pactus.NetworkOuterClass.ListPeersResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"ListPeers\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.ListPeersRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.ListPeersResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new NetworkMethodDescriptorSupplier(\"ListPeers\"))\n              .build();\n        }\n      }\n    }\n    return getListPeersMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNodeInfoRequest,\n      pactus.NetworkOuterClass.GetNodeInfoResponse> getGetNodeInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetNodeInfo\",\n      requestType = pactus.NetworkOuterClass.GetNodeInfoRequest.class,\n      responseType = pactus.NetworkOuterClass.GetNodeInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNodeInfoRequest,\n      pactus.NetworkOuterClass.GetNodeInfoResponse> getGetNodeInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.NetworkOuterClass.GetNodeInfoRequest, pactus.NetworkOuterClass.GetNodeInfoResponse> getGetNodeInfoMethod;\n    if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) {\n      synchronized (NetworkGrpc.class) {\n        if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) {\n          NetworkGrpc.getGetNodeInfoMethod = getGetNodeInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.NetworkOuterClass.GetNodeInfoRequest, pactus.NetworkOuterClass.GetNodeInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetNodeInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new NetworkMethodDescriptorSupplier(\"GetNodeInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetNodeInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.NetworkOuterClass.PingRequest,\n      pactus.NetworkOuterClass.PingResponse> getPingMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"Ping\",\n      requestType = pactus.NetworkOuterClass.PingRequest.class,\n      responseType = pactus.NetworkOuterClass.PingResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.NetworkOuterClass.PingRequest,\n      pactus.NetworkOuterClass.PingResponse> getPingMethod() {\n    io.grpc.MethodDescriptor<pactus.NetworkOuterClass.PingRequest, pactus.NetworkOuterClass.PingResponse> getPingMethod;\n    if ((getPingMethod = NetworkGrpc.getPingMethod) == null) {\n      synchronized (NetworkGrpc.class) {\n        if ((getPingMethod = NetworkGrpc.getPingMethod) == null) {\n          NetworkGrpc.getPingMethod = getPingMethod =\n              io.grpc.MethodDescriptor.<pactus.NetworkOuterClass.PingRequest, pactus.NetworkOuterClass.PingResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"Ping\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.PingRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.NetworkOuterClass.PingResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new NetworkMethodDescriptorSupplier(\"Ping\"))\n              .build();\n        }\n      }\n    }\n    return getPingMethod;\n  }\n\n  /**\n   * Creates a new async stub that supports all call types for the service\n   */\n  public static NetworkStub newStub(io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<NetworkStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<NetworkStub>() {\n        @java.lang.Override\n        public NetworkStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new NetworkStub(channel, callOptions);\n        }\n      };\n    return NetworkStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports all types of calls on the service\n   */\n  public static NetworkBlockingV2Stub newBlockingV2Stub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<NetworkBlockingV2Stub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<NetworkBlockingV2Stub>() {\n        @java.lang.Override\n        public NetworkBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new NetworkBlockingV2Stub(channel, callOptions);\n        }\n      };\n    return NetworkBlockingV2Stub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports unary and streaming output calls on the service\n   */\n  public static NetworkBlockingStub newBlockingStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<NetworkBlockingStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<NetworkBlockingStub>() {\n        @java.lang.Override\n        public NetworkBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new NetworkBlockingStub(channel, callOptions);\n        }\n      };\n    return NetworkBlockingStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new ListenableFuture-style stub that supports unary calls on the service\n   */\n  public static NetworkFutureStub newFutureStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<NetworkFutureStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<NetworkFutureStub>() {\n        @java.lang.Override\n        public NetworkFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new NetworkFutureStub(channel, callOptions);\n        }\n      };\n    return NetworkFutureStub.newStub(factory, channel);\n  }\n\n  /**\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public interface AsyncService {\n\n    /**\n     * <pre>\n     * GetNetworkInfo retrieves information about the overall network.\n     * </pre>\n     */\n    default void getNetworkInfo(pactus.NetworkOuterClass.GetNetworkInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNetworkInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListPeers lists all peers in the network.\n     * </pre>\n     */\n    default void listPeers(pactus.NetworkOuterClass.ListPeersRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.ListPeersResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPeersMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetNodeInfo retrieves information about a specific node in the network.\n     * </pre>\n     */\n    default void getNodeInfo(pactus.NetworkOuterClass.GetNodeInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNodeInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * Ping provides a simple connectivity test and latency measurement.\n     * </pre>\n     */\n    default void ping(pactus.NetworkOuterClass.PingRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.PingResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPingMethod(), responseObserver);\n    }\n  }\n\n  /**\n   * Base class for the server implementation of the service Network.\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public static abstract class NetworkImplBase\n      implements io.grpc.BindableService, AsyncService {\n\n    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {\n      return NetworkGrpc.bindService(this);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do asynchronous rpc calls to service Network.\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public static final class NetworkStub\n      extends io.grpc.stub.AbstractAsyncStub<NetworkStub> {\n    private NetworkStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected NetworkStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new NetworkStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetNetworkInfo retrieves information about the overall network.\n     * </pre>\n     */\n    public void getNetworkInfo(pactus.NetworkOuterClass.GetNetworkInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNetworkInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListPeers lists all peers in the network.\n     * </pre>\n     */\n    public void listPeers(pactus.NetworkOuterClass.ListPeersRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.ListPeersResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getListPeersMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetNodeInfo retrieves information about a specific node in the network.\n     * </pre>\n     */\n    public void getNodeInfo(pactus.NetworkOuterClass.GetNodeInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNodeInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * Ping provides a simple connectivity test and latency measurement.\n     * </pre>\n     */\n    public void ping(pactus.NetworkOuterClass.PingRequest request,\n        io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.PingResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getPingMethod(), getCallOptions()), request, responseObserver);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do synchronous rpc calls to service Network.\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public static final class NetworkBlockingV2Stub\n      extends io.grpc.stub.AbstractBlockingStub<NetworkBlockingV2Stub> {\n    private NetworkBlockingV2Stub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected NetworkBlockingV2Stub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new NetworkBlockingV2Stub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetNetworkInfo retrieves information about the overall network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.GetNetworkInfoResponse getNetworkInfo(pactus.NetworkOuterClass.GetNetworkInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetNetworkInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListPeers lists all peers in the network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.ListPeersResponse listPeers(pactus.NetworkOuterClass.ListPeersRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getListPeersMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetNodeInfo retrieves information about a specific node in the network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.GetNodeInfoResponse getNodeInfo(pactus.NetworkOuterClass.GetNodeInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetNodeInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * Ping provides a simple connectivity test and latency measurement.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.PingResponse ping(pactus.NetworkOuterClass.PingRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getPingMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do limited synchronous rpc calls to service Network.\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public static final class NetworkBlockingStub\n      extends io.grpc.stub.AbstractBlockingStub<NetworkBlockingStub> {\n    private NetworkBlockingStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected NetworkBlockingStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new NetworkBlockingStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetNetworkInfo retrieves information about the overall network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.GetNetworkInfoResponse getNetworkInfo(pactus.NetworkOuterClass.GetNetworkInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetNetworkInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListPeers lists all peers in the network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.ListPeersResponse listPeers(pactus.NetworkOuterClass.ListPeersRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getListPeersMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetNodeInfo retrieves information about a specific node in the network.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.GetNodeInfoResponse getNodeInfo(pactus.NetworkOuterClass.GetNodeInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetNodeInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * Ping provides a simple connectivity test and latency measurement.\n     * </pre>\n     */\n    public pactus.NetworkOuterClass.PingResponse ping(pactus.NetworkOuterClass.PingRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getPingMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do ListenableFuture-style rpc calls to service Network.\n   * <pre>\n   * Network service provides RPCs for retrieving information about the network.\n   * </pre>\n   */\n  public static final class NetworkFutureStub\n      extends io.grpc.stub.AbstractFutureStub<NetworkFutureStub> {\n    private NetworkFutureStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected NetworkFutureStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new NetworkFutureStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetNetworkInfo retrieves information about the overall network.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.NetworkOuterClass.GetNetworkInfoResponse> getNetworkInfo(\n        pactus.NetworkOuterClass.GetNetworkInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * ListPeers lists all peers in the network.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.NetworkOuterClass.ListPeersResponse> listPeers(\n        pactus.NetworkOuterClass.ListPeersRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getListPeersMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetNodeInfo retrieves information about a specific node in the network.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.NetworkOuterClass.GetNodeInfoResponse> getNodeInfo(\n        pactus.NetworkOuterClass.GetNodeInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * Ping provides a simple connectivity test and latency measurement.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.NetworkOuterClass.PingResponse> ping(\n        pactus.NetworkOuterClass.PingRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getPingMethod(), getCallOptions()), request);\n    }\n  }\n\n  private static final int METHODID_GET_NETWORK_INFO = 0;\n  private static final int METHODID_LIST_PEERS = 1;\n  private static final int METHODID_GET_NODE_INFO = 2;\n  private static final int METHODID_PING = 3;\n\n  private static final class MethodHandlers<Req, Resp> implements\n      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {\n    private final AsyncService serviceImpl;\n    private final int methodId;\n\n    MethodHandlers(AsyncService serviceImpl, int methodId) {\n      this.serviceImpl = serviceImpl;\n      this.methodId = methodId;\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        case METHODID_GET_NETWORK_INFO:\n          serviceImpl.getNetworkInfo((pactus.NetworkOuterClass.GetNetworkInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNetworkInfoResponse>) responseObserver);\n          break;\n        case METHODID_LIST_PEERS:\n          serviceImpl.listPeers((pactus.NetworkOuterClass.ListPeersRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.ListPeersResponse>) responseObserver);\n          break;\n        case METHODID_GET_NODE_INFO:\n          serviceImpl.getNodeInfo((pactus.NetworkOuterClass.GetNodeInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.GetNodeInfoResponse>) responseObserver);\n          break;\n        case METHODID_PING:\n          serviceImpl.ping((pactus.NetworkOuterClass.PingRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.NetworkOuterClass.PingResponse>) responseObserver);\n          break;\n        default:\n          throw new AssertionError();\n      }\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public io.grpc.stub.StreamObserver<Req> invoke(\n        io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        default:\n          throw new AssertionError();\n      }\n    }\n  }\n\n  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {\n    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())\n        .addMethod(\n          getGetNetworkInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.NetworkOuterClass.GetNetworkInfoRequest,\n              pactus.NetworkOuterClass.GetNetworkInfoResponse>(\n                service, METHODID_GET_NETWORK_INFO)))\n        .addMethod(\n          getListPeersMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.NetworkOuterClass.ListPeersRequest,\n              pactus.NetworkOuterClass.ListPeersResponse>(\n                service, METHODID_LIST_PEERS)))\n        .addMethod(\n          getGetNodeInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.NetworkOuterClass.GetNodeInfoRequest,\n              pactus.NetworkOuterClass.GetNodeInfoResponse>(\n                service, METHODID_GET_NODE_INFO)))\n        .addMethod(\n          getPingMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.NetworkOuterClass.PingRequest,\n              pactus.NetworkOuterClass.PingResponse>(\n                service, METHODID_PING)))\n        .build();\n  }\n\n  private static abstract class NetworkBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {\n    NetworkBaseDescriptorSupplier() {}\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n      return pactus.NetworkOuterClass.getDescriptor();\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n      return getFileDescriptor().findServiceByName(\"Network\");\n    }\n  }\n\n  private static final class NetworkFileDescriptorSupplier\n      extends NetworkBaseDescriptorSupplier {\n    NetworkFileDescriptorSupplier() {}\n  }\n\n  private static final class NetworkMethodDescriptorSupplier\n      extends NetworkBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {\n    private final java.lang.String methodName;\n\n    NetworkMethodDescriptorSupplier(java.lang.String methodName) {\n      this.methodName = methodName;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n      return getServiceDescriptor().findMethodByName(methodName);\n    }\n  }\n\n  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;\n\n  public static io.grpc.ServiceDescriptor getServiceDescriptor() {\n    io.grpc.ServiceDescriptor result = serviceDescriptor;\n    if (result == null) {\n      synchronized (NetworkGrpc.class) {\n        result = serviceDescriptor;\n        if (result == null) {\n          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)\n              .setSchemaDescriptor(new NetworkFileDescriptorSupplier())\n              .addMethod(getGetNetworkInfoMethod())\n              .addMethod(getListPeersMethod())\n              .addMethod(getGetNodeInfoMethod())\n              .addMethod(getPingMethod())\n              .build();\n        }\n      }\n    }\n    return result;\n  }\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/NetworkOuterClass.java",
    "content": "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n// NO CHECKED-IN PROTOBUF GENCODE\n// source: network.proto\n// Protobuf Java Version: 4.33.2\n\npackage pactus;\n\n@com.google.protobuf.Generated\npublic final class NetworkOuterClass extends com.google.protobuf.GeneratedFile {\n  private NetworkOuterClass() {}\n  static {\n    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n      /* major= */ 4,\n      /* minor= */ 33,\n      /* patch= */ 2,\n      /* suffix= */ \"\",\n      \"NetworkOuterClass\");\n  }\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistryLite registry) {\n  }\n\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistry registry) {\n    registerAllExtensions(\n        (com.google.protobuf.ExtensionRegistryLite) registry);\n  }\n  /**\n   * <pre>\n   * Direction represents the connection direction between peers.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.Direction}\n   */\n  public enum Direction\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Unknown direction (default value).\n     * </pre>\n     *\n     * <code>DIRECTION_UNKNOWN = 0;</code>\n     */\n    DIRECTION_UNKNOWN(0),\n    /**\n     * <pre>\n     * Inbound connection - peer connected to us.\n     * </pre>\n     *\n     * <code>DIRECTION_INBOUND = 1;</code>\n     */\n    DIRECTION_INBOUND(1),\n    /**\n     * <pre>\n     * Outbound connection - we connected to peer.\n     * </pre>\n     *\n     * <code>DIRECTION_OUTBOUND = 2;</code>\n     */\n    DIRECTION_OUTBOUND(2),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"Direction\");\n    }\n    /**\n     * <pre>\n     * Unknown direction (default value).\n     * </pre>\n     *\n     * <code>DIRECTION_UNKNOWN = 0;</code>\n     */\n    public static final int DIRECTION_UNKNOWN_VALUE = 0;\n    /**\n     * <pre>\n     * Inbound connection - peer connected to us.\n     * </pre>\n     *\n     * <code>DIRECTION_INBOUND = 1;</code>\n     */\n    public static final int DIRECTION_INBOUND_VALUE = 1;\n    /**\n     * <pre>\n     * Outbound connection - we connected to peer.\n     * </pre>\n     *\n     * <code>DIRECTION_OUTBOUND = 2;</code>\n     */\n    public static final int DIRECTION_OUTBOUND_VALUE = 2;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static Direction valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static Direction forNumber(int value) {\n      switch (value) {\n        case 0: return DIRECTION_UNKNOWN;\n        case 1: return DIRECTION_INBOUND;\n        case 2: return DIRECTION_OUTBOUND;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<Direction>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        Direction> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<Direction>() {\n            public Direction findValueByNumber(int number) {\n              return Direction.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.getDescriptor().getEnumTypes().get(0);\n    }\n\n    private static final Direction[] VALUES = values();\n\n    public static Direction valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private Direction(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.Direction)\n  }\n\n  public interface GetNetworkInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving overall network information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNetworkInfoRequest}\n   */\n  public static final class GetNetworkInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoRequest)\n      GetNetworkInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNetworkInfoRequest\");\n    }\n    // Use GetNetworkInfoRequest.newBuilder() to construct.\n    private GetNetworkInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNetworkInfoRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.NetworkOuterClass.GetNetworkInfoRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.GetNetworkInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.GetNetworkInfoRequest other = (pactus.NetworkOuterClass.GetNetworkInfoRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.GetNetworkInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving overall network information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNetworkInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoRequest)\n        pactus.NetworkOuterClass.GetNetworkInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.NetworkOuterClass.GetNetworkInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.GetNetworkInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoRequest build() {\n        pactus.NetworkOuterClass.GetNetworkInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoRequest buildPartial() {\n        pactus.NetworkOuterClass.GetNetworkInfoRequest result = new pactus.NetworkOuterClass.GetNetworkInfoRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.GetNetworkInfoRequest) {\n          return mergeFrom((pactus.NetworkOuterClass.GetNetworkInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.GetNetworkInfoRequest other) {\n        if (other == pactus.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoRequest)\n    private static final pactus.NetworkOuterClass.GetNetworkInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.GetNetworkInfoRequest();\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNetworkInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetNetworkInfoRequest>() {\n      @java.lang.Override\n      public GetNetworkInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNetworkInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNetworkInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetNetworkInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n     * @return The networkName.\n     */\n    java.lang.String getNetworkName();\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n     * @return The bytes for networkName.\n     */\n    com.google.protobuf.ByteString\n        getNetworkNameBytes();\n\n    /**\n     * <pre>\n     * Number of connected peers.\n     * </pre>\n     *\n     * <code>uint32 connected_peers_count = 2 [json_name = \"connectedPeersCount\"];</code>\n     * @return The connectedPeersCount.\n     */\n    int getConnectedPeersCount();\n\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     * @return Whether the metricInfo field is set.\n     */\n    boolean hasMetricInfo();\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     * @return The metricInfo.\n     */\n    pactus.NetworkOuterClass.MetricInfo getMetricInfo();\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     */\n    pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains information about the overall network.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNetworkInfoResponse}\n   */\n  public static final class GetNetworkInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoResponse)\n      GetNetworkInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNetworkInfoResponse\");\n    }\n    // Use GetNetworkInfoResponse.newBuilder() to construct.\n    private GetNetworkInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNetworkInfoResponse() {\n      networkName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.NetworkOuterClass.GetNetworkInfoResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int NETWORK_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object networkName_ = \"\";\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n     * @return The networkName.\n     */\n    @java.lang.Override\n    public java.lang.String getNetworkName() {\n      java.lang.Object ref = networkName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        networkName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n     * @return The bytes for networkName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getNetworkNameBytes() {\n      java.lang.Object ref = networkName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        networkName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int CONNECTED_PEERS_COUNT_FIELD_NUMBER = 2;\n    private int connectedPeersCount_ = 0;\n    /**\n     * <pre>\n     * Number of connected peers.\n     * </pre>\n     *\n     * <code>uint32 connected_peers_count = 2 [json_name = \"connectedPeersCount\"];</code>\n     * @return The connectedPeersCount.\n     */\n    @java.lang.Override\n    public int getConnectedPeersCount() {\n      return connectedPeersCount_;\n    }\n\n    public static final int METRIC_INFO_FIELD_NUMBER = 4;\n    private pactus.NetworkOuterClass.MetricInfo metricInfo_;\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     * @return Whether the metricInfo field is set.\n     */\n    @java.lang.Override\n    public boolean hasMetricInfo() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     * @return The metricInfo.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.MetricInfo getMetricInfo() {\n      return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n    }\n    /**\n     * <pre>\n     * Metrics related to node activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder() {\n      return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(networkName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, networkName_);\n      }\n      if (connectedPeersCount_ != 0) {\n        output.writeUInt32(2, connectedPeersCount_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(4, getMetricInfo());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(networkName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, networkName_);\n      }\n      if (connectedPeersCount_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(2, connectedPeersCount_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(4, getMetricInfo());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.GetNetworkInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.GetNetworkInfoResponse other = (pactus.NetworkOuterClass.GetNetworkInfoResponse) obj;\n\n      if (!getNetworkName()\n          .equals(other.getNetworkName())) return false;\n      if (getConnectedPeersCount()\n          != other.getConnectedPeersCount()) return false;\n      if (hasMetricInfo() != other.hasMetricInfo()) return false;\n      if (hasMetricInfo()) {\n        if (!getMetricInfo()\n            .equals(other.getMetricInfo())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + NETWORK_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getNetworkName().hashCode();\n      hash = (37 * hash) + CONNECTED_PEERS_COUNT_FIELD_NUMBER;\n      hash = (53 * hash) + getConnectedPeersCount();\n      if (hasMetricInfo()) {\n        hash = (37 * hash) + METRIC_INFO_FIELD_NUMBER;\n        hash = (53 * hash) + getMetricInfo().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.GetNetworkInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains information about the overall network.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNetworkInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoResponse)\n        pactus.NetworkOuterClass.GetNetworkInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.NetworkOuterClass.GetNetworkInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.GetNetworkInfoResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetMetricInfoFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        networkName_ = \"\";\n        connectedPeersCount_ = 0;\n        metricInfo_ = null;\n        if (metricInfoBuilder_ != null) {\n          metricInfoBuilder_.dispose();\n          metricInfoBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoResponse build() {\n        pactus.NetworkOuterClass.GetNetworkInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNetworkInfoResponse buildPartial() {\n        pactus.NetworkOuterClass.GetNetworkInfoResponse result = new pactus.NetworkOuterClass.GetNetworkInfoResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.GetNetworkInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.networkName_ = networkName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.connectedPeersCount_ = connectedPeersCount_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.metricInfo_ = metricInfoBuilder_ == null\n              ? metricInfo_\n              : metricInfoBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.GetNetworkInfoResponse) {\n          return mergeFrom((pactus.NetworkOuterClass.GetNetworkInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.GetNetworkInfoResponse other) {\n        if (other == pactus.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance()) return this;\n        if (!other.getNetworkName().isEmpty()) {\n          networkName_ = other.networkName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getConnectedPeersCount() != 0) {\n          setConnectedPeersCount(other.getConnectedPeersCount());\n        }\n        if (other.hasMetricInfo()) {\n          mergeMetricInfo(other.getMetricInfo());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                networkName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                connectedPeersCount_ = input.readUInt32();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 34: {\n                input.readMessage(\n                    internalGetMetricInfoFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object networkName_ = \"\";\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n       * @return The networkName.\n       */\n      public java.lang.String getNetworkName() {\n        java.lang.Object ref = networkName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          networkName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n       * @return The bytes for networkName.\n       */\n      public com.google.protobuf.ByteString\n          getNetworkNameBytes() {\n        java.lang.Object ref = networkName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          networkName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n       * @param value The networkName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetworkName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        networkName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNetworkName() {\n        networkName_ = getDefaultInstance().getNetworkName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 1 [json_name = \"networkName\"];</code>\n       * @param value The bytes for networkName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetworkNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        networkName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private int connectedPeersCount_ ;\n      /**\n       * <pre>\n       * Number of connected peers.\n       * </pre>\n       *\n       * <code>uint32 connected_peers_count = 2 [json_name = \"connectedPeersCount\"];</code>\n       * @return The connectedPeersCount.\n       */\n      @java.lang.Override\n      public int getConnectedPeersCount() {\n        return connectedPeersCount_;\n      }\n      /**\n       * <pre>\n       * Number of connected peers.\n       * </pre>\n       *\n       * <code>uint32 connected_peers_count = 2 [json_name = \"connectedPeersCount\"];</code>\n       * @param value The connectedPeersCount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConnectedPeersCount(int value) {\n\n        connectedPeersCount_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of connected peers.\n       * </pre>\n       *\n       * <code>uint32 connected_peers_count = 2 [json_name = \"connectedPeersCount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConnectedPeersCount() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        connectedPeersCount_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private pactus.NetworkOuterClass.MetricInfo metricInfo_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder> metricInfoBuilder_;\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       * @return Whether the metricInfo field is set.\n       */\n      public boolean hasMetricInfo() {\n        return ((bitField0_ & 0x00000004) != 0);\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       * @return The metricInfo.\n       */\n      public pactus.NetworkOuterClass.MetricInfo getMetricInfo() {\n        if (metricInfoBuilder_ == null) {\n          return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n        } else {\n          return metricInfoBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder setMetricInfo(pactus.NetworkOuterClass.MetricInfo value) {\n        if (metricInfoBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          metricInfo_ = value;\n        } else {\n          metricInfoBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder setMetricInfo(\n          pactus.NetworkOuterClass.MetricInfo.Builder builderForValue) {\n        if (metricInfoBuilder_ == null) {\n          metricInfo_ = builderForValue.build();\n        } else {\n          metricInfoBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder mergeMetricInfo(pactus.NetworkOuterClass.MetricInfo value) {\n        if (metricInfoBuilder_ == null) {\n          if (((bitField0_ & 0x00000004) != 0) &&\n            metricInfo_ != null &&\n            metricInfo_ != pactus.NetworkOuterClass.MetricInfo.getDefaultInstance()) {\n            getMetricInfoBuilder().mergeFrom(value);\n          } else {\n            metricInfo_ = value;\n          }\n        } else {\n          metricInfoBuilder_.mergeFrom(value);\n        }\n        if (metricInfo_ != null) {\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder clearMetricInfo() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        metricInfo_ = null;\n        if (metricInfoBuilder_ != null) {\n          metricInfoBuilder_.dispose();\n          metricInfoBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.MetricInfo.Builder getMetricInfoBuilder() {\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return internalGetMetricInfoFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder() {\n        if (metricInfoBuilder_ != null) {\n          return metricInfoBuilder_.getMessageOrBuilder();\n        } else {\n          return metricInfo_ == null ?\n              pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n        }\n      }\n      /**\n       * <pre>\n       * Metrics related to node activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 4 [json_name = \"metricInfo\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder> \n          internalGetMetricInfoFieldBuilder() {\n        if (metricInfoBuilder_ == null) {\n          metricInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder>(\n                  getMetricInfo(),\n                  getParentForChildren(),\n                  isClean());\n          metricInfo_ = null;\n        }\n        return metricInfoBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoResponse)\n    private static final pactus.NetworkOuterClass.GetNetworkInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.GetNetworkInfoResponse();\n    }\n\n    public static pactus.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNetworkInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetNetworkInfoResponse>() {\n      @java.lang.Override\n      public GetNetworkInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNetworkInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNetworkInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListPeersRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListPeersRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * If true, includes disconnected peers (default: connected peers only).\n     * </pre>\n     *\n     * <code>bool include_disconnected = 1 [json_name = \"includeDisconnected\"];</code>\n     * @return The includeDisconnected.\n     */\n    boolean getIncludeDisconnected();\n  }\n  /**\n   * <pre>\n   * Request message for listing peers.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListPeersRequest}\n   */\n  public static final class ListPeersRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListPeersRequest)\n      ListPeersRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListPeersRequest\");\n    }\n    // Use ListPeersRequest.newBuilder() to construct.\n    private ListPeersRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListPeersRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ListPeersRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ListPeersRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.ListPeersRequest.class, pactus.NetworkOuterClass.ListPeersRequest.Builder.class);\n    }\n\n    public static final int INCLUDE_DISCONNECTED_FIELD_NUMBER = 1;\n    private boolean includeDisconnected_ = false;\n    /**\n     * <pre>\n     * If true, includes disconnected peers (default: connected peers only).\n     * </pre>\n     *\n     * <code>bool include_disconnected = 1 [json_name = \"includeDisconnected\"];</code>\n     * @return The includeDisconnected.\n     */\n    @java.lang.Override\n    public boolean getIncludeDisconnected() {\n      return includeDisconnected_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (includeDisconnected_ != false) {\n        output.writeBool(1, includeDisconnected_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (includeDisconnected_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(1, includeDisconnected_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.ListPeersRequest)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.ListPeersRequest other = (pactus.NetworkOuterClass.ListPeersRequest) obj;\n\n      if (getIncludeDisconnected()\n          != other.getIncludeDisconnected()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + INCLUDE_DISCONNECTED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIncludeDisconnected());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ListPeersRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.ListPeersRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for listing peers.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListPeersRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListPeersRequest)\n        pactus.NetworkOuterClass.ListPeersRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.ListPeersRequest.class, pactus.NetworkOuterClass.ListPeersRequest.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.ListPeersRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        includeDisconnected_ = false;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersRequest getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.ListPeersRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersRequest build() {\n        pactus.NetworkOuterClass.ListPeersRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersRequest buildPartial() {\n        pactus.NetworkOuterClass.ListPeersRequest result = new pactus.NetworkOuterClass.ListPeersRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.ListPeersRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.includeDisconnected_ = includeDisconnected_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.ListPeersRequest) {\n          return mergeFrom((pactus.NetworkOuterClass.ListPeersRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.ListPeersRequest other) {\n        if (other == pactus.NetworkOuterClass.ListPeersRequest.getDefaultInstance()) return this;\n        if (other.getIncludeDisconnected() != false) {\n          setIncludeDisconnected(other.getIncludeDisconnected());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                includeDisconnected_ = input.readBool();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private boolean includeDisconnected_ ;\n      /**\n       * <pre>\n       * If true, includes disconnected peers (default: connected peers only).\n       * </pre>\n       *\n       * <code>bool include_disconnected = 1 [json_name = \"includeDisconnected\"];</code>\n       * @return The includeDisconnected.\n       */\n      @java.lang.Override\n      public boolean getIncludeDisconnected() {\n        return includeDisconnected_;\n      }\n      /**\n       * <pre>\n       * If true, includes disconnected peers (default: connected peers only).\n       * </pre>\n       *\n       * <code>bool include_disconnected = 1 [json_name = \"includeDisconnected\"];</code>\n       * @param value The includeDisconnected to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIncludeDisconnected(boolean value) {\n\n        includeDisconnected_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * If true, includes disconnected peers (default: connected peers only).\n       * </pre>\n       *\n       * <code>bool include_disconnected = 1 [json_name = \"includeDisconnected\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIncludeDisconnected() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        includeDisconnected_ = false;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListPeersRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListPeersRequest)\n    private static final pactus.NetworkOuterClass.ListPeersRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.ListPeersRequest();\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListPeersRequest>\n        PARSER = new com.google.protobuf.AbstractParser<ListPeersRequest>() {\n      @java.lang.Override\n      public ListPeersRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListPeersRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListPeersRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ListPeersRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListPeersResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListPeersResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    java.util.List<pactus.NetworkOuterClass.PeerInfo> \n        getPeersList();\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    pactus.NetworkOuterClass.PeerInfo getPeers(int index);\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    int getPeersCount();\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    java.util.List<? extends pactus.NetworkOuterClass.PeerInfoOrBuilder> \n        getPeersOrBuilderList();\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    pactus.NetworkOuterClass.PeerInfoOrBuilder getPeersOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message for listing peers.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListPeersResponse}\n   */\n  public static final class ListPeersResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListPeersResponse)\n      ListPeersResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListPeersResponse\");\n    }\n    // Use ListPeersResponse.newBuilder() to construct.\n    private ListPeersResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListPeersResponse() {\n      peers_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ListPeersResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ListPeersResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.ListPeersResponse.class, pactus.NetworkOuterClass.ListPeersResponse.Builder.class);\n    }\n\n    public static final int PEERS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.NetworkOuterClass.PeerInfo> peers_;\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.NetworkOuterClass.PeerInfo> getPeersList() {\n      return peers_;\n    }\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.NetworkOuterClass.PeerInfoOrBuilder> \n        getPeersOrBuilderList() {\n      return peers_;\n    }\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    @java.lang.Override\n    public int getPeersCount() {\n      return peers_.size();\n    }\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.PeerInfo getPeers(int index) {\n      return peers_.get(index);\n    }\n    /**\n     * <pre>\n     * List of peers.\n     * </pre>\n     *\n     * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.PeerInfoOrBuilder getPeersOrBuilder(\n        int index) {\n      return peers_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < peers_.size(); i++) {\n        output.writeMessage(1, peers_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      for (int i = 0; i < peers_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, peers_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.ListPeersResponse)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.ListPeersResponse other = (pactus.NetworkOuterClass.ListPeersResponse) obj;\n\n      if (!getPeersList()\n          .equals(other.getPeersList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getPeersCount() > 0) {\n        hash = (37 * hash) + PEERS_FIELD_NUMBER;\n        hash = (53 * hash) + getPeersList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ListPeersResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.ListPeersResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message for listing peers.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListPeersResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListPeersResponse)\n        pactus.NetworkOuterClass.ListPeersResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.ListPeersResponse.class, pactus.NetworkOuterClass.ListPeersResponse.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.ListPeersResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        if (peersBuilder_ == null) {\n          peers_ = java.util.Collections.emptyList();\n        } else {\n          peers_ = null;\n          peersBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000001);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ListPeersResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersResponse getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.ListPeersResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersResponse build() {\n        pactus.NetworkOuterClass.ListPeersResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ListPeersResponse buildPartial() {\n        pactus.NetworkOuterClass.ListPeersResponse result = new pactus.NetworkOuterClass.ListPeersResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.NetworkOuterClass.ListPeersResponse result) {\n        if (peersBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0)) {\n            peers_ = java.util.Collections.unmodifiableList(peers_);\n            bitField0_ = (bitField0_ & ~0x00000001);\n          }\n          result.peers_ = peers_;\n        } else {\n          result.peers_ = peersBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.ListPeersResponse result) {\n        int from_bitField0_ = bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.ListPeersResponse) {\n          return mergeFrom((pactus.NetworkOuterClass.ListPeersResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.ListPeersResponse other) {\n        if (other == pactus.NetworkOuterClass.ListPeersResponse.getDefaultInstance()) return this;\n        if (peersBuilder_ == null) {\n          if (!other.peers_.isEmpty()) {\n            if (peers_.isEmpty()) {\n              peers_ = other.peers_;\n              bitField0_ = (bitField0_ & ~0x00000001);\n            } else {\n              ensurePeersIsMutable();\n              peers_.addAll(other.peers_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.peers_.isEmpty()) {\n            if (peersBuilder_.isEmpty()) {\n              peersBuilder_.dispose();\n              peersBuilder_ = null;\n              peers_ = other.peers_;\n              bitField0_ = (bitField0_ & ~0x00000001);\n              peersBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetPeersFieldBuilder() : null;\n            } else {\n              peersBuilder_.addAllMessages(other.peers_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                pactus.NetworkOuterClass.PeerInfo m =\n                    input.readMessage(\n                        pactus.NetworkOuterClass.PeerInfo.parser(),\n                        extensionRegistry);\n                if (peersBuilder_ == null) {\n                  ensurePeersIsMutable();\n                  peers_.add(m);\n                } else {\n                  peersBuilder_.addMessage(m);\n                }\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.util.List<pactus.NetworkOuterClass.PeerInfo> peers_ =\n        java.util.Collections.emptyList();\n      private void ensurePeersIsMutable() {\n        if (!((bitField0_ & 0x00000001) != 0)) {\n          peers_ = new java.util.ArrayList<pactus.NetworkOuterClass.PeerInfo>(peers_);\n          bitField0_ |= 0x00000001;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.NetworkOuterClass.PeerInfo, pactus.NetworkOuterClass.PeerInfo.Builder, pactus.NetworkOuterClass.PeerInfoOrBuilder> peersBuilder_;\n\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public java.util.List<pactus.NetworkOuterClass.PeerInfo> getPeersList() {\n        if (peersBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(peers_);\n        } else {\n          return peersBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public int getPeersCount() {\n        if (peersBuilder_ == null) {\n          return peers_.size();\n        } else {\n          return peersBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public pactus.NetworkOuterClass.PeerInfo getPeers(int index) {\n        if (peersBuilder_ == null) {\n          return peers_.get(index);\n        } else {\n          return peersBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder setPeers(\n          int index, pactus.NetworkOuterClass.PeerInfo value) {\n        if (peersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensurePeersIsMutable();\n          peers_.set(index, value);\n          onChanged();\n        } else {\n          peersBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder setPeers(\n          int index, pactus.NetworkOuterClass.PeerInfo.Builder builderForValue) {\n        if (peersBuilder_ == null) {\n          ensurePeersIsMutable();\n          peers_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          peersBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder addPeers(pactus.NetworkOuterClass.PeerInfo value) {\n        if (peersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensurePeersIsMutable();\n          peers_.add(value);\n          onChanged();\n        } else {\n          peersBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder addPeers(\n          int index, pactus.NetworkOuterClass.PeerInfo value) {\n        if (peersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensurePeersIsMutable();\n          peers_.add(index, value);\n          onChanged();\n        } else {\n          peersBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder addPeers(\n          pactus.NetworkOuterClass.PeerInfo.Builder builderForValue) {\n        if (peersBuilder_ == null) {\n          ensurePeersIsMutable();\n          peers_.add(builderForValue.build());\n          onChanged();\n        } else {\n          peersBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder addPeers(\n          int index, pactus.NetworkOuterClass.PeerInfo.Builder builderForValue) {\n        if (peersBuilder_ == null) {\n          ensurePeersIsMutable();\n          peers_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          peersBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder addAllPeers(\n          java.lang.Iterable<? extends pactus.NetworkOuterClass.PeerInfo> values) {\n        if (peersBuilder_ == null) {\n          ensurePeersIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, peers_);\n          onChanged();\n        } else {\n          peersBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder clearPeers() {\n        if (peersBuilder_ == null) {\n          peers_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000001);\n          onChanged();\n        } else {\n          peersBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public Builder removePeers(int index) {\n        if (peersBuilder_ == null) {\n          ensurePeersIsMutable();\n          peers_.remove(index);\n          onChanged();\n        } else {\n          peersBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public pactus.NetworkOuterClass.PeerInfo.Builder getPeersBuilder(\n          int index) {\n        return internalGetPeersFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public pactus.NetworkOuterClass.PeerInfoOrBuilder getPeersOrBuilder(\n          int index) {\n        if (peersBuilder_ == null) {\n          return peers_.get(index);  } else {\n          return peersBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public java.util.List<? extends pactus.NetworkOuterClass.PeerInfoOrBuilder> \n           getPeersOrBuilderList() {\n        if (peersBuilder_ != null) {\n          return peersBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(peers_);\n        }\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public pactus.NetworkOuterClass.PeerInfo.Builder addPeersBuilder() {\n        return internalGetPeersFieldBuilder().addBuilder(\n            pactus.NetworkOuterClass.PeerInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public pactus.NetworkOuterClass.PeerInfo.Builder addPeersBuilder(\n          int index) {\n        return internalGetPeersFieldBuilder().addBuilder(\n            index, pactus.NetworkOuterClass.PeerInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of peers.\n       * </pre>\n       *\n       * <code>repeated .pactus.PeerInfo peers = 1 [json_name = \"peers\"];</code>\n       */\n      public java.util.List<pactus.NetworkOuterClass.PeerInfo.Builder> \n           getPeersBuilderList() {\n        return internalGetPeersFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.NetworkOuterClass.PeerInfo, pactus.NetworkOuterClass.PeerInfo.Builder, pactus.NetworkOuterClass.PeerInfoOrBuilder> \n          internalGetPeersFieldBuilder() {\n        if (peersBuilder_ == null) {\n          peersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.NetworkOuterClass.PeerInfo, pactus.NetworkOuterClass.PeerInfo.Builder, pactus.NetworkOuterClass.PeerInfoOrBuilder>(\n                  peers_,\n                  ((bitField0_ & 0x00000001) != 0),\n                  getParentForChildren(),\n                  isClean());\n          peers_ = null;\n        }\n        return peersBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListPeersResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListPeersResponse)\n    private static final pactus.NetworkOuterClass.ListPeersResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.ListPeersResponse();\n    }\n\n    public static pactus.NetworkOuterClass.ListPeersResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListPeersResponse>\n        PARSER = new com.google.protobuf.AbstractParser<ListPeersResponse>() {\n      @java.lang.Override\n      public ListPeersResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListPeersResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListPeersResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ListPeersResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetNodeInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for retrieving information of the node.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNodeInfoRequest}\n   */\n  public static final class GetNodeInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoRequest)\n      GetNodeInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNodeInfoRequest\");\n    }\n    // Use GetNodeInfoRequest.newBuilder() to construct.\n    private GetNodeInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNodeInfoRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.GetNodeInfoRequest.class, pactus.NetworkOuterClass.GetNodeInfoRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.GetNodeInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.GetNodeInfoRequest other = (pactus.NetworkOuterClass.GetNodeInfoRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.GetNodeInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving information of the node.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNodeInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoRequest)\n        pactus.NetworkOuterClass.GetNodeInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.GetNodeInfoRequest.class, pactus.NetworkOuterClass.GetNodeInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.GetNodeInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoRequest build() {\n        pactus.NetworkOuterClass.GetNodeInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoRequest buildPartial() {\n        pactus.NetworkOuterClass.GetNodeInfoRequest result = new pactus.NetworkOuterClass.GetNodeInfoRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.GetNodeInfoRequest) {\n          return mergeFrom((pactus.NetworkOuterClass.GetNodeInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.GetNodeInfoRequest other) {\n        if (other == pactus.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoRequest)\n    private static final pactus.NetworkOuterClass.GetNodeInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.GetNodeInfoRequest();\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNodeInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetNodeInfoRequest>() {\n      @java.lang.Override\n      public GetNodeInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNodeInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNodeInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetNodeInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Moniker or Human-readable name identifying this node in the network.\n     * </pre>\n     *\n     * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n     * @return The moniker.\n     */\n    java.lang.String getMoniker();\n    /**\n     * <pre>\n     * Moniker or Human-readable name identifying this node in the network.\n     * </pre>\n     *\n     * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n     * @return The bytes for moniker.\n     */\n    com.google.protobuf.ByteString\n        getMonikerBytes();\n\n    /**\n     * <pre>\n     * Version and agent details of the node.\n     * </pre>\n     *\n     * <code>string agent = 2 [json_name = \"agent\"];</code>\n     * @return The agent.\n     */\n    java.lang.String getAgent();\n    /**\n     * <pre>\n     * Version and agent details of the node.\n     * </pre>\n     *\n     * <code>string agent = 2 [json_name = \"agent\"];</code>\n     * @return The bytes for agent.\n     */\n    com.google.protobuf.ByteString\n        getAgentBytes();\n\n    /**\n     * <pre>\n     * Peer ID of the node.\n     * </pre>\n     *\n     * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n     * @return The peerId.\n     */\n    java.lang.String getPeerId();\n    /**\n     * <pre>\n     * Peer ID of the node.\n     * </pre>\n     *\n     * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n     * @return The bytes for peerId.\n     */\n    com.google.protobuf.ByteString\n        getPeerIdBytes();\n\n    /**\n     * <pre>\n     * Unix timestamp when the node was started (UTC).\n     * </pre>\n     *\n     * <code>uint64 started_at = 4 [json_name = \"startedAt\"];</code>\n     * @return The startedAt.\n     */\n    long getStartedAt();\n\n    /**\n     * <pre>\n     * Reachability status of the node.\n     * </pre>\n     *\n     * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n     * @return The reachability.\n     */\n    java.lang.String getReachability();\n    /**\n     * <pre>\n     * Reachability status of the node.\n     * </pre>\n     *\n     * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n     * @return The bytes for reachability.\n     */\n    com.google.protobuf.ByteString\n        getReachabilityBytes();\n\n    /**\n     * <pre>\n     * Bitfield representing the services provided by the node.\n     * </pre>\n     *\n     * <code>int32 services = 6 [json_name = \"services\"];</code>\n     * @return The services.\n     */\n    int getServices();\n\n    /**\n     * <pre>\n     * Names of services provided by the node.\n     * </pre>\n     *\n     * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n     * @return The servicesNames.\n     */\n    java.lang.String getServicesNames();\n    /**\n     * <pre>\n     * Names of services provided by the node.\n     * </pre>\n     *\n     * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n     * @return The bytes for servicesNames.\n     */\n    com.google.protobuf.ByteString\n        getServicesNamesBytes();\n\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @return A list containing the localAddrs.\n     */\n    java.util.List<java.lang.String>\n        getLocalAddrsList();\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @return The count of localAddrs.\n     */\n    int getLocalAddrsCount();\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @param index The index of the element to return.\n     * @return The localAddrs at the given index.\n     */\n    java.lang.String getLocalAddrs(int index);\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the localAddrs at the given index.\n     */\n    com.google.protobuf.ByteString\n        getLocalAddrsBytes(int index);\n\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @return A list containing the protocols.\n     */\n    java.util.List<java.lang.String>\n        getProtocolsList();\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @return The count of protocols.\n     */\n    int getProtocolsCount();\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @param index The index of the element to return.\n     * @return The protocols at the given index.\n     */\n    java.lang.String getProtocols(int index);\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the protocols at the given index.\n     */\n    com.google.protobuf.ByteString\n        getProtocolsBytes(int index);\n\n    /**\n     * <pre>\n     * Offset between the node's clock and the network's clock (in seconds).\n     * </pre>\n     *\n     * <code>double clock_offset = 13 [json_name = \"clockOffset\"];</code>\n     * @return The clockOffset.\n     */\n    double getClockOffset();\n\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     * @return Whether the connectionInfo field is set.\n     */\n    boolean hasConnectionInfo();\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     * @return The connectionInfo.\n     */\n    pactus.NetworkOuterClass.ConnectionInfo getConnectionInfo();\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     */\n    pactus.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder();\n\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo> \n        getZmqPublishersList();\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    pactus.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index);\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    int getZmqPublishersCount();\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    java.util.List<? extends pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder> \n        getZmqPublishersOrBuilderList();\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder(\n        int index);\n\n    /**\n     * <pre>\n     * Current Unix timestamp of the node (UTC).\n     * </pre>\n     *\n     * <code>uint64 current_time = 16 [json_name = \"currentTime\"];</code>\n     * @return The currentTime.\n     */\n    long getCurrentTime();\n\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n     * @return The networkName.\n     */\n    java.lang.String getNetworkName();\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n     * @return The bytes for networkName.\n     */\n    com.google.protobuf.ByteString\n        getNetworkNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains information about a specific node in the network.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNodeInfoResponse}\n   */\n  public static final class GetNodeInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoResponse)\n      GetNodeInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNodeInfoResponse\");\n    }\n    // Use GetNodeInfoResponse.newBuilder() to construct.\n    private GetNodeInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNodeInfoResponse() {\n      moniker_ = \"\";\n      agent_ = \"\";\n      peerId_ = \"\";\n      reachability_ = \"\";\n      servicesNames_ = \"\";\n      localAddrs_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      zmqPublishers_ = java.util.Collections.emptyList();\n      networkName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.GetNodeInfoResponse.class, pactus.NetworkOuterClass.GetNodeInfoResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int MONIKER_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object moniker_ = \"\";\n    /**\n     * <pre>\n     * Moniker or Human-readable name identifying this node in the network.\n     * </pre>\n     *\n     * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n     * @return The moniker.\n     */\n    @java.lang.Override\n    public java.lang.String getMoniker() {\n      java.lang.Object ref = moniker_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        moniker_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Moniker or Human-readable name identifying this node in the network.\n     * </pre>\n     *\n     * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n     * @return The bytes for moniker.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMonikerBytes() {\n      java.lang.Object ref = moniker_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        moniker_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AGENT_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object agent_ = \"\";\n    /**\n     * <pre>\n     * Version and agent details of the node.\n     * </pre>\n     *\n     * <code>string agent = 2 [json_name = \"agent\"];</code>\n     * @return The agent.\n     */\n    @java.lang.Override\n    public java.lang.String getAgent() {\n      java.lang.Object ref = agent_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        agent_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Version and agent details of the node.\n     * </pre>\n     *\n     * <code>string agent = 2 [json_name = \"agent\"];</code>\n     * @return The bytes for agent.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAgentBytes() {\n      java.lang.Object ref = agent_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        agent_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PEER_ID_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object peerId_ = \"\";\n    /**\n     * <pre>\n     * Peer ID of the node.\n     * </pre>\n     *\n     * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n     * @return The peerId.\n     */\n    @java.lang.Override\n    public java.lang.String getPeerId() {\n      java.lang.Object ref = peerId_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        peerId_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Peer ID of the node.\n     * </pre>\n     *\n     * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n     * @return The bytes for peerId.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPeerIdBytes() {\n      java.lang.Object ref = peerId_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        peerId_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int STARTED_AT_FIELD_NUMBER = 4;\n    private long startedAt_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp when the node was started (UTC).\n     * </pre>\n     *\n     * <code>uint64 started_at = 4 [json_name = \"startedAt\"];</code>\n     * @return The startedAt.\n     */\n    @java.lang.Override\n    public long getStartedAt() {\n      return startedAt_;\n    }\n\n    public static final int REACHABILITY_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object reachability_ = \"\";\n    /**\n     * <pre>\n     * Reachability status of the node.\n     * </pre>\n     *\n     * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n     * @return The reachability.\n     */\n    @java.lang.Override\n    public java.lang.String getReachability() {\n      java.lang.Object ref = reachability_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        reachability_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Reachability status of the node.\n     * </pre>\n     *\n     * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n     * @return The bytes for reachability.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReachabilityBytes() {\n      java.lang.Object ref = reachability_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        reachability_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SERVICES_FIELD_NUMBER = 6;\n    private int services_ = 0;\n    /**\n     * <pre>\n     * Bitfield representing the services provided by the node.\n     * </pre>\n     *\n     * <code>int32 services = 6 [json_name = \"services\"];</code>\n     * @return The services.\n     */\n    @java.lang.Override\n    public int getServices() {\n      return services_;\n    }\n\n    public static final int SERVICES_NAMES_FIELD_NUMBER = 7;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object servicesNames_ = \"\";\n    /**\n     * <pre>\n     * Names of services provided by the node.\n     * </pre>\n     *\n     * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n     * @return The servicesNames.\n     */\n    @java.lang.Override\n    public java.lang.String getServicesNames() {\n      java.lang.Object ref = servicesNames_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        servicesNames_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Names of services provided by the node.\n     * </pre>\n     *\n     * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n     * @return The bytes for servicesNames.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getServicesNamesBytes() {\n      java.lang.Object ref = servicesNames_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        servicesNames_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int LOCAL_ADDRS_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList localAddrs_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @return A list containing the localAddrs.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getLocalAddrsList() {\n      return localAddrs_;\n    }\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @return The count of localAddrs.\n     */\n    public int getLocalAddrsCount() {\n      return localAddrs_.size();\n    }\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @param index The index of the element to return.\n     * @return The localAddrs at the given index.\n     */\n    public java.lang.String getLocalAddrs(int index) {\n      return localAddrs_.get(index);\n    }\n    /**\n     * <pre>\n     * List of addresses associated with the node.\n     * </pre>\n     *\n     * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the localAddrs at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getLocalAddrsBytes(int index) {\n      return localAddrs_.getByteString(index);\n    }\n\n    public static final int PROTOCOLS_FIELD_NUMBER = 9;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList protocols_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @return A list containing the protocols.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getProtocolsList() {\n      return protocols_;\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @return The count of protocols.\n     */\n    public int getProtocolsCount() {\n      return protocols_.size();\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @param index The index of the element to return.\n     * @return The protocols at the given index.\n     */\n    public java.lang.String getProtocols(int index) {\n      return protocols_.get(index);\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the node.\n     * </pre>\n     *\n     * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the protocols at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getProtocolsBytes(int index) {\n      return protocols_.getByteString(index);\n    }\n\n    public static final int CLOCK_OFFSET_FIELD_NUMBER = 13;\n    private double clockOffset_ = 0D;\n    /**\n     * <pre>\n     * Offset between the node's clock and the network's clock (in seconds).\n     * </pre>\n     *\n     * <code>double clock_offset = 13 [json_name = \"clockOffset\"];</code>\n     * @return The clockOffset.\n     */\n    @java.lang.Override\n    public double getClockOffset() {\n      return clockOffset_;\n    }\n\n    public static final int CONNECTION_INFO_FIELD_NUMBER = 14;\n    private pactus.NetworkOuterClass.ConnectionInfo connectionInfo_;\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     * @return Whether the connectionInfo field is set.\n     */\n    @java.lang.Override\n    public boolean hasConnectionInfo() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     * @return The connectionInfo.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ConnectionInfo getConnectionInfo() {\n      return connectionInfo_ == null ? pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_;\n    }\n    /**\n     * <pre>\n     * Information about the node's connections.\n     * </pre>\n     *\n     * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() {\n      return connectionInfo_ == null ? pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_;\n    }\n\n    public static final int ZMQ_PUBLISHERS_FIELD_NUMBER = 15;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo> zmqPublishers_;\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo> getZmqPublishersList() {\n      return zmqPublishers_;\n    }\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder> \n        getZmqPublishersOrBuilderList() {\n      return zmqPublishers_;\n    }\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    @java.lang.Override\n    public int getZmqPublishersCount() {\n      return zmqPublishers_.size();\n    }\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index) {\n      return zmqPublishers_.get(index);\n    }\n    /**\n     * <pre>\n     * List of active ZeroMQ publishers.\n     * </pre>\n     *\n     * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder(\n        int index) {\n      return zmqPublishers_.get(index);\n    }\n\n    public static final int CURRENT_TIME_FIELD_NUMBER = 16;\n    private long currentTime_ = 0L;\n    /**\n     * <pre>\n     * Current Unix timestamp of the node (UTC).\n     * </pre>\n     *\n     * <code>uint64 current_time = 16 [json_name = \"currentTime\"];</code>\n     * @return The currentTime.\n     */\n    @java.lang.Override\n    public long getCurrentTime() {\n      return currentTime_;\n    }\n\n    public static final int NETWORK_NAME_FIELD_NUMBER = 17;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object networkName_ = \"\";\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n     * @return The networkName.\n     */\n    @java.lang.Override\n    public java.lang.String getNetworkName() {\n      java.lang.Object ref = networkName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        networkName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Name of the P2P network.\n     * </pre>\n     *\n     * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n     * @return The bytes for networkName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getNetworkNameBytes() {\n      java.lang.Object ref = networkName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        networkName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(moniker_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, moniker_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, agent_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peerId_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, peerId_);\n      }\n      if (startedAt_ != 0L) {\n        output.writeUInt64(4, startedAt_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(reachability_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, reachability_);\n      }\n      if (services_ != 0) {\n        output.writeInt32(6, services_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servicesNames_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 7, servicesNames_);\n      }\n      for (int i = 0; i < localAddrs_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, localAddrs_.getRaw(i));\n      }\n      for (int i = 0; i < protocols_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 9, protocols_.getRaw(i));\n      }\n      if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) {\n        output.writeDouble(13, clockOffset_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(14, getConnectionInfo());\n      }\n      for (int i = 0; i < zmqPublishers_.size(); i++) {\n        output.writeMessage(15, zmqPublishers_.get(i));\n      }\n      if (currentTime_ != 0L) {\n        output.writeUInt64(16, currentTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(networkName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 17, networkName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(moniker_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, moniker_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, agent_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peerId_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, peerId_);\n      }\n      if (startedAt_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(4, startedAt_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(reachability_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, reachability_);\n      }\n      if (services_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(6, services_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servicesNames_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(7, servicesNames_);\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < localAddrs_.size(); i++) {\n          dataSize += computeStringSizeNoTag(localAddrs_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getLocalAddrsList().size();\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < protocols_.size(); i++) {\n          dataSize += computeStringSizeNoTag(protocols_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getProtocolsList().size();\n      }\n      if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeDoubleSize(13, clockOffset_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(14, getConnectionInfo());\n      }\n      for (int i = 0; i < zmqPublishers_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(15, zmqPublishers_.get(i));\n      }\n      if (currentTime_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(16, currentTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(networkName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(17, networkName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.GetNodeInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.GetNodeInfoResponse other = (pactus.NetworkOuterClass.GetNodeInfoResponse) obj;\n\n      if (!getMoniker()\n          .equals(other.getMoniker())) return false;\n      if (!getAgent()\n          .equals(other.getAgent())) return false;\n      if (!getPeerId()\n          .equals(other.getPeerId())) return false;\n      if (getStartedAt()\n          != other.getStartedAt()) return false;\n      if (!getReachability()\n          .equals(other.getReachability())) return false;\n      if (getServices()\n          != other.getServices()) return false;\n      if (!getServicesNames()\n          .equals(other.getServicesNames())) return false;\n      if (!getLocalAddrsList()\n          .equals(other.getLocalAddrsList())) return false;\n      if (!getProtocolsList()\n          .equals(other.getProtocolsList())) return false;\n      if (java.lang.Double.doubleToLongBits(getClockOffset())\n          != java.lang.Double.doubleToLongBits(\n              other.getClockOffset())) return false;\n      if (hasConnectionInfo() != other.hasConnectionInfo()) return false;\n      if (hasConnectionInfo()) {\n        if (!getConnectionInfo()\n            .equals(other.getConnectionInfo())) return false;\n      }\n      if (!getZmqPublishersList()\n          .equals(other.getZmqPublishersList())) return false;\n      if (getCurrentTime()\n          != other.getCurrentTime()) return false;\n      if (!getNetworkName()\n          .equals(other.getNetworkName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + MONIKER_FIELD_NUMBER;\n      hash = (53 * hash) + getMoniker().hashCode();\n      hash = (37 * hash) + AGENT_FIELD_NUMBER;\n      hash = (53 * hash) + getAgent().hashCode();\n      hash = (37 * hash) + PEER_ID_FIELD_NUMBER;\n      hash = (53 * hash) + getPeerId().hashCode();\n      hash = (37 * hash) + STARTED_AT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getStartedAt());\n      hash = (37 * hash) + REACHABILITY_FIELD_NUMBER;\n      hash = (53 * hash) + getReachability().hashCode();\n      hash = (37 * hash) + SERVICES_FIELD_NUMBER;\n      hash = (53 * hash) + getServices();\n      hash = (37 * hash) + SERVICES_NAMES_FIELD_NUMBER;\n      hash = (53 * hash) + getServicesNames().hashCode();\n      if (getLocalAddrsCount() > 0) {\n        hash = (37 * hash) + LOCAL_ADDRS_FIELD_NUMBER;\n        hash = (53 * hash) + getLocalAddrsList().hashCode();\n      }\n      if (getProtocolsCount() > 0) {\n        hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER;\n        hash = (53 * hash) + getProtocolsList().hashCode();\n      }\n      hash = (37 * hash) + CLOCK_OFFSET_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          java.lang.Double.doubleToLongBits(getClockOffset()));\n      if (hasConnectionInfo()) {\n        hash = (37 * hash) + CONNECTION_INFO_FIELD_NUMBER;\n        hash = (53 * hash) + getConnectionInfo().hashCode();\n      }\n      if (getZmqPublishersCount() > 0) {\n        hash = (37 * hash) + ZMQ_PUBLISHERS_FIELD_NUMBER;\n        hash = (53 * hash) + getZmqPublishersList().hashCode();\n      }\n      hash = (37 * hash) + CURRENT_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getCurrentTime());\n      hash = (37 * hash) + NETWORK_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getNetworkName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.GetNodeInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains information about a specific node in the network.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNodeInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoResponse)\n        pactus.NetworkOuterClass.GetNodeInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.GetNodeInfoResponse.class, pactus.NetworkOuterClass.GetNodeInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.GetNodeInfoResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetConnectionInfoFieldBuilder();\n          internalGetZmqPublishersFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        moniker_ = \"\";\n        agent_ = \"\";\n        peerId_ = \"\";\n        startedAt_ = 0L;\n        reachability_ = \"\";\n        services_ = 0;\n        servicesNames_ = \"\";\n        localAddrs_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        protocols_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        clockOffset_ = 0D;\n        connectionInfo_ = null;\n        if (connectionInfoBuilder_ != null) {\n          connectionInfoBuilder_.dispose();\n          connectionInfoBuilder_ = null;\n        }\n        if (zmqPublishersBuilder_ == null) {\n          zmqPublishers_ = java.util.Collections.emptyList();\n        } else {\n          zmqPublishers_ = null;\n          zmqPublishersBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000800);\n        currentTime_ = 0L;\n        networkName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoResponse build() {\n        pactus.NetworkOuterClass.GetNodeInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.GetNodeInfoResponse buildPartial() {\n        pactus.NetworkOuterClass.GetNodeInfoResponse result = new pactus.NetworkOuterClass.GetNodeInfoResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.NetworkOuterClass.GetNodeInfoResponse result) {\n        if (zmqPublishersBuilder_ == null) {\n          if (((bitField0_ & 0x00000800) != 0)) {\n            zmqPublishers_ = java.util.Collections.unmodifiableList(zmqPublishers_);\n            bitField0_ = (bitField0_ & ~0x00000800);\n          }\n          result.zmqPublishers_ = zmqPublishers_;\n        } else {\n          result.zmqPublishers_ = zmqPublishersBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.GetNodeInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.moniker_ = moniker_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.agent_ = agent_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.peerId_ = peerId_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.startedAt_ = startedAt_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.reachability_ = reachability_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.services_ = services_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.servicesNames_ = servicesNames_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          localAddrs_.makeImmutable();\n          result.localAddrs_ = localAddrs_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          protocols_.makeImmutable();\n          result.protocols_ = protocols_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.clockOffset_ = clockOffset_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000400) != 0)) {\n          result.connectionInfo_ = connectionInfoBuilder_ == null\n              ? connectionInfo_\n              : connectionInfoBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        if (((from_bitField0_ & 0x00001000) != 0)) {\n          result.currentTime_ = currentTime_;\n        }\n        if (((from_bitField0_ & 0x00002000) != 0)) {\n          result.networkName_ = networkName_;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.GetNodeInfoResponse) {\n          return mergeFrom((pactus.NetworkOuterClass.GetNodeInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.GetNodeInfoResponse other) {\n        if (other == pactus.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance()) return this;\n        if (!other.getMoniker().isEmpty()) {\n          moniker_ = other.moniker_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAgent().isEmpty()) {\n          agent_ = other.agent_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getPeerId().isEmpty()) {\n          peerId_ = other.peerId_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getStartedAt() != 0L) {\n          setStartedAt(other.getStartedAt());\n        }\n        if (!other.getReachability().isEmpty()) {\n          reachability_ = other.reachability_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        if (other.getServices() != 0) {\n          setServices(other.getServices());\n        }\n        if (!other.getServicesNames().isEmpty()) {\n          servicesNames_ = other.servicesNames_;\n          bitField0_ |= 0x00000040;\n          onChanged();\n        }\n        if (!other.localAddrs_.isEmpty()) {\n          if (localAddrs_.isEmpty()) {\n            localAddrs_ = other.localAddrs_;\n            bitField0_ |= 0x00000080;\n          } else {\n            ensureLocalAddrsIsMutable();\n            localAddrs_.addAll(other.localAddrs_);\n          }\n          onChanged();\n        }\n        if (!other.protocols_.isEmpty()) {\n          if (protocols_.isEmpty()) {\n            protocols_ = other.protocols_;\n            bitField0_ |= 0x00000100;\n          } else {\n            ensureProtocolsIsMutable();\n            protocols_.addAll(other.protocols_);\n          }\n          onChanged();\n        }\n        if (java.lang.Double.doubleToRawLongBits(other.getClockOffset()) != 0) {\n          setClockOffset(other.getClockOffset());\n        }\n        if (other.hasConnectionInfo()) {\n          mergeConnectionInfo(other.getConnectionInfo());\n        }\n        if (zmqPublishersBuilder_ == null) {\n          if (!other.zmqPublishers_.isEmpty()) {\n            if (zmqPublishers_.isEmpty()) {\n              zmqPublishers_ = other.zmqPublishers_;\n              bitField0_ = (bitField0_ & ~0x00000800);\n            } else {\n              ensureZmqPublishersIsMutable();\n              zmqPublishers_.addAll(other.zmqPublishers_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.zmqPublishers_.isEmpty()) {\n            if (zmqPublishersBuilder_.isEmpty()) {\n              zmqPublishersBuilder_.dispose();\n              zmqPublishersBuilder_ = null;\n              zmqPublishers_ = other.zmqPublishers_;\n              bitField0_ = (bitField0_ & ~0x00000800);\n              zmqPublishersBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetZmqPublishersFieldBuilder() : null;\n            } else {\n              zmqPublishersBuilder_.addAllMessages(other.zmqPublishers_);\n            }\n          }\n        }\n        if (other.getCurrentTime() != 0L) {\n          setCurrentTime(other.getCurrentTime());\n        }\n        if (!other.getNetworkName().isEmpty()) {\n          networkName_ = other.networkName_;\n          bitField0_ |= 0x00002000;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                moniker_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                agent_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                peerId_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                startedAt_ = input.readUInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                reachability_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              case 48: {\n                services_ = input.readInt32();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 58: {\n                servicesNames_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 58\n              case 66: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureLocalAddrsIsMutable();\n                localAddrs_.add(s);\n                break;\n              } // case 66\n              case 74: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureProtocolsIsMutable();\n                protocols_.add(s);\n                break;\n              } // case 74\n              case 105: {\n                clockOffset_ = input.readDouble();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 105\n              case 114: {\n                input.readMessage(\n                    internalGetConnectionInfoFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000400;\n                break;\n              } // case 114\n              case 122: {\n                pactus.NetworkOuterClass.ZMQPublisherInfo m =\n                    input.readMessage(\n                        pactus.NetworkOuterClass.ZMQPublisherInfo.parser(),\n                        extensionRegistry);\n                if (zmqPublishersBuilder_ == null) {\n                  ensureZmqPublishersIsMutable();\n                  zmqPublishers_.add(m);\n                } else {\n                  zmqPublishersBuilder_.addMessage(m);\n                }\n                break;\n              } // case 122\n              case 128: {\n                currentTime_ = input.readUInt64();\n                bitField0_ |= 0x00001000;\n                break;\n              } // case 128\n              case 138: {\n                networkName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00002000;\n                break;\n              } // case 138\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object moniker_ = \"\";\n      /**\n       * <pre>\n       * Moniker or Human-readable name identifying this node in the network.\n       * </pre>\n       *\n       * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n       * @return The moniker.\n       */\n      public java.lang.String getMoniker() {\n        java.lang.Object ref = moniker_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          moniker_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Moniker or Human-readable name identifying this node in the network.\n       * </pre>\n       *\n       * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n       * @return The bytes for moniker.\n       */\n      public com.google.protobuf.ByteString\n          getMonikerBytes() {\n        java.lang.Object ref = moniker_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          moniker_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Moniker or Human-readable name identifying this node in the network.\n       * </pre>\n       *\n       * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n       * @param value The moniker to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMoniker(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        moniker_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Moniker or Human-readable name identifying this node in the network.\n       * </pre>\n       *\n       * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMoniker() {\n        moniker_ = getDefaultInstance().getMoniker();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Moniker or Human-readable name identifying this node in the network.\n       * </pre>\n       *\n       * <code>string moniker = 1 [json_name = \"moniker\"];</code>\n       * @param value The bytes for moniker to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMonikerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        moniker_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object agent_ = \"\";\n      /**\n       * <pre>\n       * Version and agent details of the node.\n       * </pre>\n       *\n       * <code>string agent = 2 [json_name = \"agent\"];</code>\n       * @return The agent.\n       */\n      public java.lang.String getAgent() {\n        java.lang.Object ref = agent_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          agent_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Version and agent details of the node.\n       * </pre>\n       *\n       * <code>string agent = 2 [json_name = \"agent\"];</code>\n       * @return The bytes for agent.\n       */\n      public com.google.protobuf.ByteString\n          getAgentBytes() {\n        java.lang.Object ref = agent_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          agent_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Version and agent details of the node.\n       * </pre>\n       *\n       * <code>string agent = 2 [json_name = \"agent\"];</code>\n       * @param value The agent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAgent(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        agent_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Version and agent details of the node.\n       * </pre>\n       *\n       * <code>string agent = 2 [json_name = \"agent\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAgent() {\n        agent_ = getDefaultInstance().getAgent();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Version and agent details of the node.\n       * </pre>\n       *\n       * <code>string agent = 2 [json_name = \"agent\"];</code>\n       * @param value The bytes for agent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAgentBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        agent_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object peerId_ = \"\";\n      /**\n       * <pre>\n       * Peer ID of the node.\n       * </pre>\n       *\n       * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n       * @return The peerId.\n       */\n      public java.lang.String getPeerId() {\n        java.lang.Object ref = peerId_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          peerId_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Peer ID of the node.\n       * </pre>\n       *\n       * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n       * @return The bytes for peerId.\n       */\n      public com.google.protobuf.ByteString\n          getPeerIdBytes() {\n        java.lang.Object ref = peerId_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          peerId_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Peer ID of the node.\n       * </pre>\n       *\n       * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n       * @param value The peerId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPeerId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        peerId_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Peer ID of the node.\n       * </pre>\n       *\n       * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPeerId() {\n        peerId_ = getDefaultInstance().getPeerId();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Peer ID of the node.\n       * </pre>\n       *\n       * <code>string peer_id = 3 [json_name = \"peerId\"];</code>\n       * @param value The bytes for peerId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPeerIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        peerId_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private long startedAt_ ;\n      /**\n       * <pre>\n       * Unix timestamp when the node was started (UTC).\n       * </pre>\n       *\n       * <code>uint64 started_at = 4 [json_name = \"startedAt\"];</code>\n       * @return The startedAt.\n       */\n      @java.lang.Override\n      public long getStartedAt() {\n        return startedAt_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp when the node was started (UTC).\n       * </pre>\n       *\n       * <code>uint64 started_at = 4 [json_name = \"startedAt\"];</code>\n       * @param value The startedAt to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStartedAt(long value) {\n\n        startedAt_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp when the node was started (UTC).\n       * </pre>\n       *\n       * <code>uint64 started_at = 4 [json_name = \"startedAt\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStartedAt() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        startedAt_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object reachability_ = \"\";\n      /**\n       * <pre>\n       * Reachability status of the node.\n       * </pre>\n       *\n       * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n       * @return The reachability.\n       */\n      public java.lang.String getReachability() {\n        java.lang.Object ref = reachability_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          reachability_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Reachability status of the node.\n       * </pre>\n       *\n       * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n       * @return The bytes for reachability.\n       */\n      public com.google.protobuf.ByteString\n          getReachabilityBytes() {\n        java.lang.Object ref = reachability_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          reachability_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Reachability status of the node.\n       * </pre>\n       *\n       * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n       * @param value The reachability to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReachability(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        reachability_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Reachability status of the node.\n       * </pre>\n       *\n       * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReachability() {\n        reachability_ = getDefaultInstance().getReachability();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Reachability status of the node.\n       * </pre>\n       *\n       * <code>string reachability = 5 [json_name = \"reachability\"];</code>\n       * @param value The bytes for reachability to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReachabilityBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        reachability_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      private int services_ ;\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the node.\n       * </pre>\n       *\n       * <code>int32 services = 6 [json_name = \"services\"];</code>\n       * @return The services.\n       */\n      @java.lang.Override\n      public int getServices() {\n        return services_;\n      }\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the node.\n       * </pre>\n       *\n       * <code>int32 services = 6 [json_name = \"services\"];</code>\n       * @param value The services to set.\n       * @return This builder for chaining.\n       */\n      public Builder setServices(int value) {\n\n        services_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the node.\n       * </pre>\n       *\n       * <code>int32 services = 6 [json_name = \"services\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearServices() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        services_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object servicesNames_ = \"\";\n      /**\n       * <pre>\n       * Names of services provided by the node.\n       * </pre>\n       *\n       * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n       * @return The servicesNames.\n       */\n      public java.lang.String getServicesNames() {\n        java.lang.Object ref = servicesNames_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          servicesNames_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Names of services provided by the node.\n       * </pre>\n       *\n       * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n       * @return The bytes for servicesNames.\n       */\n      public com.google.protobuf.ByteString\n          getServicesNamesBytes() {\n        java.lang.Object ref = servicesNames_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          servicesNames_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Names of services provided by the node.\n       * </pre>\n       *\n       * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n       * @param value The servicesNames to set.\n       * @return This builder for chaining.\n       */\n      public Builder setServicesNames(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        servicesNames_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Names of services provided by the node.\n       * </pre>\n       *\n       * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearServicesNames() {\n        servicesNames_ = getDefaultInstance().getServicesNames();\n        bitField0_ = (bitField0_ & ~0x00000040);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Names of services provided by the node.\n       * </pre>\n       *\n       * <code>string services_names = 7 [json_name = \"servicesNames\"];</code>\n       * @param value The bytes for servicesNames to set.\n       * @return This builder for chaining.\n       */\n      public Builder setServicesNamesBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        servicesNames_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.LazyStringArrayList localAddrs_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureLocalAddrsIsMutable() {\n        if (!localAddrs_.isModifiable()) {\n          localAddrs_ = new com.google.protobuf.LazyStringArrayList(localAddrs_);\n        }\n        bitField0_ |= 0x00000080;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @return A list containing the localAddrs.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getLocalAddrsList() {\n        localAddrs_.makeImmutable();\n        return localAddrs_;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @return The count of localAddrs.\n       */\n      public int getLocalAddrsCount() {\n        return localAddrs_.size();\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param index The index of the element to return.\n       * @return The localAddrs at the given index.\n       */\n      public java.lang.String getLocalAddrs(int index) {\n        return localAddrs_.get(index);\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the localAddrs at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getLocalAddrsBytes(int index) {\n        return localAddrs_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param index The index to set the value at.\n       * @param value The localAddrs to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLocalAddrs(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureLocalAddrsIsMutable();\n        localAddrs_.set(index, value);\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param value The localAddrs to add.\n       * @return This builder for chaining.\n       */\n      public Builder addLocalAddrs(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureLocalAddrsIsMutable();\n        localAddrs_.add(value);\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param values The localAddrs to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllLocalAddrs(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureLocalAddrsIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, localAddrs_);\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLocalAddrs() {\n        localAddrs_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000080);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of addresses associated with the node.\n       * </pre>\n       *\n       * <code>repeated string local_addrs = 8 [json_name = \"localAddrs\"];</code>\n       * @param value The bytes of the localAddrs to add.\n       * @return This builder for chaining.\n       */\n      public Builder addLocalAddrsBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureLocalAddrsIsMutable();\n        localAddrs_.add(value);\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.LazyStringArrayList protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureProtocolsIsMutable() {\n        if (!protocols_.isModifiable()) {\n          protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_);\n        }\n        bitField0_ |= 0x00000100;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @return A list containing the protocols.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getProtocolsList() {\n        protocols_.makeImmutable();\n        return protocols_;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @return The count of protocols.\n       */\n      public int getProtocolsCount() {\n        return protocols_.size();\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param index The index of the element to return.\n       * @return The protocols at the given index.\n       */\n      public java.lang.String getProtocols(int index) {\n        return protocols_.get(index);\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the protocols at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getProtocolsBytes(int index) {\n        return protocols_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param index The index to set the value at.\n       * @param value The protocols to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProtocols(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureProtocolsIsMutable();\n        protocols_.set(index, value);\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param value The protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addProtocols(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureProtocolsIsMutable();\n        protocols_.add(value);\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param values The protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllProtocols(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureProtocolsIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, protocols_);\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearProtocols() {\n        protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000100);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the node.\n       * </pre>\n       *\n       * <code>repeated string protocols = 9 [json_name = \"protocols\"];</code>\n       * @param value The bytes of the protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addProtocolsBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureProtocolsIsMutable();\n        protocols_.add(value);\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n\n      private double clockOffset_ ;\n      /**\n       * <pre>\n       * Offset between the node's clock and the network's clock (in seconds).\n       * </pre>\n       *\n       * <code>double clock_offset = 13 [json_name = \"clockOffset\"];</code>\n       * @return The clockOffset.\n       */\n      @java.lang.Override\n      public double getClockOffset() {\n        return clockOffset_;\n      }\n      /**\n       * <pre>\n       * Offset between the node's clock and the network's clock (in seconds).\n       * </pre>\n       *\n       * <code>double clock_offset = 13 [json_name = \"clockOffset\"];</code>\n       * @param value The clockOffset to set.\n       * @return This builder for chaining.\n       */\n      public Builder setClockOffset(double value) {\n\n        clockOffset_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Offset between the node's clock and the network's clock (in seconds).\n       * </pre>\n       *\n       * <code>double clock_offset = 13 [json_name = \"clockOffset\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearClockOffset() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        clockOffset_ = 0D;\n        onChanged();\n        return this;\n      }\n\n      private pactus.NetworkOuterClass.ConnectionInfo connectionInfo_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.ConnectionInfo, pactus.NetworkOuterClass.ConnectionInfo.Builder, pactus.NetworkOuterClass.ConnectionInfoOrBuilder> connectionInfoBuilder_;\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       * @return Whether the connectionInfo field is set.\n       */\n      public boolean hasConnectionInfo() {\n        return ((bitField0_ & 0x00000400) != 0);\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       * @return The connectionInfo.\n       */\n      public pactus.NetworkOuterClass.ConnectionInfo getConnectionInfo() {\n        if (connectionInfoBuilder_ == null) {\n          return connectionInfo_ == null ? pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_;\n        } else {\n          return connectionInfoBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public Builder setConnectionInfo(pactus.NetworkOuterClass.ConnectionInfo value) {\n        if (connectionInfoBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          connectionInfo_ = value;\n        } else {\n          connectionInfoBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public Builder setConnectionInfo(\n          pactus.NetworkOuterClass.ConnectionInfo.Builder builderForValue) {\n        if (connectionInfoBuilder_ == null) {\n          connectionInfo_ = builderForValue.build();\n        } else {\n          connectionInfoBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public Builder mergeConnectionInfo(pactus.NetworkOuterClass.ConnectionInfo value) {\n        if (connectionInfoBuilder_ == null) {\n          if (((bitField0_ & 0x00000400) != 0) &&\n            connectionInfo_ != null &&\n            connectionInfo_ != pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance()) {\n            getConnectionInfoBuilder().mergeFrom(value);\n          } else {\n            connectionInfo_ = value;\n          }\n        } else {\n          connectionInfoBuilder_.mergeFrom(value);\n        }\n        if (connectionInfo_ != null) {\n          bitField0_ |= 0x00000400;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public Builder clearConnectionInfo() {\n        bitField0_ = (bitField0_ & ~0x00000400);\n        connectionInfo_ = null;\n        if (connectionInfoBuilder_ != null) {\n          connectionInfoBuilder_.dispose();\n          connectionInfoBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.ConnectionInfo.Builder getConnectionInfoBuilder() {\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return internalGetConnectionInfoFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() {\n        if (connectionInfoBuilder_ != null) {\n          return connectionInfoBuilder_.getMessageOrBuilder();\n        } else {\n          return connectionInfo_ == null ?\n              pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_;\n        }\n      }\n      /**\n       * <pre>\n       * Information about the node's connections.\n       * </pre>\n       *\n       * <code>.pactus.ConnectionInfo connection_info = 14 [json_name = \"connectionInfo\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.ConnectionInfo, pactus.NetworkOuterClass.ConnectionInfo.Builder, pactus.NetworkOuterClass.ConnectionInfoOrBuilder> \n          internalGetConnectionInfoFieldBuilder() {\n        if (connectionInfoBuilder_ == null) {\n          connectionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.ConnectionInfo, pactus.NetworkOuterClass.ConnectionInfo.Builder, pactus.NetworkOuterClass.ConnectionInfoOrBuilder>(\n                  getConnectionInfo(),\n                  getParentForChildren(),\n                  isClean());\n          connectionInfo_ = null;\n        }\n        return connectionInfoBuilder_;\n      }\n\n      private java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo> zmqPublishers_ =\n        java.util.Collections.emptyList();\n      private void ensureZmqPublishersIsMutable() {\n        if (!((bitField0_ & 0x00000800) != 0)) {\n          zmqPublishers_ = new java.util.ArrayList<pactus.NetworkOuterClass.ZMQPublisherInfo>(zmqPublishers_);\n          bitField0_ |= 0x00000800;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.NetworkOuterClass.ZMQPublisherInfo, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder> zmqPublishersBuilder_;\n\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo> getZmqPublishersList() {\n        if (zmqPublishersBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(zmqPublishers_);\n        } else {\n          return zmqPublishersBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public int getZmqPublishersCount() {\n        if (zmqPublishersBuilder_ == null) {\n          return zmqPublishers_.size();\n        } else {\n          return zmqPublishersBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public pactus.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index) {\n        if (zmqPublishersBuilder_ == null) {\n          return zmqPublishers_.get(index);\n        } else {\n          return zmqPublishersBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder setZmqPublishers(\n          int index, pactus.NetworkOuterClass.ZMQPublisherInfo value) {\n        if (zmqPublishersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.set(index, value);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder setZmqPublishers(\n          int index, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) {\n        if (zmqPublishersBuilder_ == null) {\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder addZmqPublishers(pactus.NetworkOuterClass.ZMQPublisherInfo value) {\n        if (zmqPublishersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.add(value);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder addZmqPublishers(\n          int index, pactus.NetworkOuterClass.ZMQPublisherInfo value) {\n        if (zmqPublishersBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.add(index, value);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder addZmqPublishers(\n          pactus.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) {\n        if (zmqPublishersBuilder_ == null) {\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.add(builderForValue.build());\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder addZmqPublishers(\n          int index, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) {\n        if (zmqPublishersBuilder_ == null) {\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder addAllZmqPublishers(\n          java.lang.Iterable<? extends pactus.NetworkOuterClass.ZMQPublisherInfo> values) {\n        if (zmqPublishersBuilder_ == null) {\n          ensureZmqPublishersIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, zmqPublishers_);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder clearZmqPublishers() {\n        if (zmqPublishersBuilder_ == null) {\n          zmqPublishers_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000800);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public Builder removeZmqPublishers(int index) {\n        if (zmqPublishersBuilder_ == null) {\n          ensureZmqPublishersIsMutable();\n          zmqPublishers_.remove(index);\n          onChanged();\n        } else {\n          zmqPublishersBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public pactus.NetworkOuterClass.ZMQPublisherInfo.Builder getZmqPublishersBuilder(\n          int index) {\n        return internalGetZmqPublishersFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder(\n          int index) {\n        if (zmqPublishersBuilder_ == null) {\n          return zmqPublishers_.get(index);  } else {\n          return zmqPublishersBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public java.util.List<? extends pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder> \n           getZmqPublishersOrBuilderList() {\n        if (zmqPublishersBuilder_ != null) {\n          return zmqPublishersBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(zmqPublishers_);\n        }\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public pactus.NetworkOuterClass.ZMQPublisherInfo.Builder addZmqPublishersBuilder() {\n        return internalGetZmqPublishersFieldBuilder().addBuilder(\n            pactus.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public pactus.NetworkOuterClass.ZMQPublisherInfo.Builder addZmqPublishersBuilder(\n          int index) {\n        return internalGetZmqPublishersFieldBuilder().addBuilder(\n            index, pactus.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of active ZeroMQ publishers.\n       * </pre>\n       *\n       * <code>repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = \"zmqPublishers\"];</code>\n       */\n      public java.util.List<pactus.NetworkOuterClass.ZMQPublisherInfo.Builder> \n           getZmqPublishersBuilderList() {\n        return internalGetZmqPublishersFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.NetworkOuterClass.ZMQPublisherInfo, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder> \n          internalGetZmqPublishersFieldBuilder() {\n        if (zmqPublishersBuilder_ == null) {\n          zmqPublishersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.NetworkOuterClass.ZMQPublisherInfo, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder>(\n                  zmqPublishers_,\n                  ((bitField0_ & 0x00000800) != 0),\n                  getParentForChildren(),\n                  isClean());\n          zmqPublishers_ = null;\n        }\n        return zmqPublishersBuilder_;\n      }\n\n      private long currentTime_ ;\n      /**\n       * <pre>\n       * Current Unix timestamp of the node (UTC).\n       * </pre>\n       *\n       * <code>uint64 current_time = 16 [json_name = \"currentTime\"];</code>\n       * @return The currentTime.\n       */\n      @java.lang.Override\n      public long getCurrentTime() {\n        return currentTime_;\n      }\n      /**\n       * <pre>\n       * Current Unix timestamp of the node (UTC).\n       * </pre>\n       *\n       * <code>uint64 current_time = 16 [json_name = \"currentTime\"];</code>\n       * @param value The currentTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCurrentTime(long value) {\n\n        currentTime_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Current Unix timestamp of the node (UTC).\n       * </pre>\n       *\n       * <code>uint64 current_time = 16 [json_name = \"currentTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCurrentTime() {\n        bitField0_ = (bitField0_ & ~0x00001000);\n        currentTime_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object networkName_ = \"\";\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n       * @return The networkName.\n       */\n      public java.lang.String getNetworkName() {\n        java.lang.Object ref = networkName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          networkName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n       * @return The bytes for networkName.\n       */\n      public com.google.protobuf.ByteString\n          getNetworkNameBytes() {\n        java.lang.Object ref = networkName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          networkName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n       * @param value The networkName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetworkName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        networkName_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNetworkName() {\n        networkName_ = getDefaultInstance().getNetworkName();\n        bitField0_ = (bitField0_ & ~0x00002000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Name of the P2P network.\n       * </pre>\n       *\n       * <code>string network_name = 17 [json_name = \"networkName\"];</code>\n       * @param value The bytes for networkName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetworkNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        networkName_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoResponse)\n    private static final pactus.NetworkOuterClass.GetNodeInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.GetNodeInfoResponse();\n    }\n\n    public static pactus.NetworkOuterClass.GetNodeInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNodeInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetNodeInfoResponse>() {\n      @java.lang.Override\n      public GetNodeInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNodeInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNodeInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ZMQPublisherInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ZMQPublisherInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The topic associated with the publisher.\n     * </pre>\n     *\n     * <code>string topic = 1 [json_name = \"topic\"];</code>\n     * @return The topic.\n     */\n    java.lang.String getTopic();\n    /**\n     * <pre>\n     * The topic associated with the publisher.\n     * </pre>\n     *\n     * <code>string topic = 1 [json_name = \"topic\"];</code>\n     * @return The bytes for topic.\n     */\n    com.google.protobuf.ByteString\n        getTopicBytes();\n\n    /**\n     * <pre>\n     * The address of the publisher.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address of the publisher.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The high-water mark (HWM) for the publisher, indicating the\n     * maximum number of messages to queue before dropping older ones.\n     * </pre>\n     *\n     * <code>int32 hwm = 3 [json_name = \"hwm\"];</code>\n     * @return The hwm.\n     */\n    int getHwm();\n  }\n  /**\n   * <pre>\n   * ZMQPublisherInfo contains information about a ZeroMQ publisher.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ZMQPublisherInfo}\n   */\n  public static final class ZMQPublisherInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ZMQPublisherInfo)\n      ZMQPublisherInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ZMQPublisherInfo\");\n    }\n    // Use ZMQPublisherInfo.newBuilder() to construct.\n    private ZMQPublisherInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ZMQPublisherInfo() {\n      topic_ = \"\";\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.ZMQPublisherInfo.class, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder.class);\n    }\n\n    public static final int TOPIC_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object topic_ = \"\";\n    /**\n     * <pre>\n     * The topic associated with the publisher.\n     * </pre>\n     *\n     * <code>string topic = 1 [json_name = \"topic\"];</code>\n     * @return The topic.\n     */\n    @java.lang.Override\n    public java.lang.String getTopic() {\n      java.lang.Object ref = topic_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        topic_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The topic associated with the publisher.\n     * </pre>\n     *\n     * <code>string topic = 1 [json_name = \"topic\"];</code>\n     * @return The bytes for topic.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getTopicBytes() {\n      java.lang.Object ref = topic_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        topic_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address of the publisher.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the publisher.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int HWM_FIELD_NUMBER = 3;\n    private int hwm_ = 0;\n    /**\n     * <pre>\n     * The high-water mark (HWM) for the publisher, indicating the\n     * maximum number of messages to queue before dropping older ones.\n     * </pre>\n     *\n     * <code>int32 hwm = 3 [json_name = \"hwm\"];</code>\n     * @return The hwm.\n     */\n    @java.lang.Override\n    public int getHwm() {\n      return hwm_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, address_);\n      }\n      if (hwm_ != 0) {\n        output.writeInt32(3, hwm_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(topic_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, address_);\n      }\n      if (hwm_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(3, hwm_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.ZMQPublisherInfo)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.ZMQPublisherInfo other = (pactus.NetworkOuterClass.ZMQPublisherInfo) obj;\n\n      if (!getTopic()\n          .equals(other.getTopic())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (getHwm()\n          != other.getHwm()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + TOPIC_FIELD_NUMBER;\n      hash = (53 * hash) + getTopic().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + HWM_FIELD_NUMBER;\n      hash = (53 * hash) + getHwm();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.ZMQPublisherInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * ZMQPublisherInfo contains information about a ZeroMQ publisher.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ZMQPublisherInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ZMQPublisherInfo)\n        pactus.NetworkOuterClass.ZMQPublisherInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.ZMQPublisherInfo.class, pactus.NetworkOuterClass.ZMQPublisherInfo.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.ZMQPublisherInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        topic_ = \"\";\n        address_ = \"\";\n        hwm_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ZMQPublisherInfo getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ZMQPublisherInfo build() {\n        pactus.NetworkOuterClass.ZMQPublisherInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ZMQPublisherInfo buildPartial() {\n        pactus.NetworkOuterClass.ZMQPublisherInfo result = new pactus.NetworkOuterClass.ZMQPublisherInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.ZMQPublisherInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.topic_ = topic_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.hwm_ = hwm_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.ZMQPublisherInfo) {\n          return mergeFrom((pactus.NetworkOuterClass.ZMQPublisherInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.ZMQPublisherInfo other) {\n        if (other == pactus.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance()) return this;\n        if (!other.getTopic().isEmpty()) {\n          topic_ = other.topic_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getHwm() != 0) {\n          setHwm(other.getHwm());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                topic_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                hwm_ = input.readInt32();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object topic_ = \"\";\n      /**\n       * <pre>\n       * The topic associated with the publisher.\n       * </pre>\n       *\n       * <code>string topic = 1 [json_name = \"topic\"];</code>\n       * @return The topic.\n       */\n      public java.lang.String getTopic() {\n        java.lang.Object ref = topic_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          topic_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The topic associated with the publisher.\n       * </pre>\n       *\n       * <code>string topic = 1 [json_name = \"topic\"];</code>\n       * @return The bytes for topic.\n       */\n      public com.google.protobuf.ByteString\n          getTopicBytes() {\n        java.lang.Object ref = topic_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          topic_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The topic associated with the publisher.\n       * </pre>\n       *\n       * <code>string topic = 1 [json_name = \"topic\"];</code>\n       * @param value The topic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTopic(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        topic_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The topic associated with the publisher.\n       * </pre>\n       *\n       * <code>string topic = 1 [json_name = \"topic\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTopic() {\n        topic_ = getDefaultInstance().getTopic();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The topic associated with the publisher.\n       * </pre>\n       *\n       * <code>string topic = 1 [json_name = \"topic\"];</code>\n       * @param value The bytes for topic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTopicBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        topic_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address of the publisher.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the publisher.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the publisher.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the publisher.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the publisher.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private int hwm_ ;\n      /**\n       * <pre>\n       * The high-water mark (HWM) for the publisher, indicating the\n       * maximum number of messages to queue before dropping older ones.\n       * </pre>\n       *\n       * <code>int32 hwm = 3 [json_name = \"hwm\"];</code>\n       * @return The hwm.\n       */\n      @java.lang.Override\n      public int getHwm() {\n        return hwm_;\n      }\n      /**\n       * <pre>\n       * The high-water mark (HWM) for the publisher, indicating the\n       * maximum number of messages to queue before dropping older ones.\n       * </pre>\n       *\n       * <code>int32 hwm = 3 [json_name = \"hwm\"];</code>\n       * @param value The hwm to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHwm(int value) {\n\n        hwm_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The high-water mark (HWM) for the publisher, indicating the\n       * maximum number of messages to queue before dropping older ones.\n       * </pre>\n       *\n       * <code>int32 hwm = 3 [json_name = \"hwm\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHwm() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        hwm_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ZMQPublisherInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ZMQPublisherInfo)\n    private static final pactus.NetworkOuterClass.ZMQPublisherInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.ZMQPublisherInfo();\n    }\n\n    public static pactus.NetworkOuterClass.ZMQPublisherInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ZMQPublisherInfo>\n        PARSER = new com.google.protobuf.AbstractParser<ZMQPublisherInfo>() {\n      @java.lang.Override\n      public ZMQPublisherInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ZMQPublisherInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ZMQPublisherInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ZMQPublisherInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PeerInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PeerInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Current status of the peer (e.g., connected, disconnected).\n     * </pre>\n     *\n     * <code>int32 status = 1 [json_name = \"status\"];</code>\n     * @return The status.\n     */\n    int getStatus();\n\n    /**\n     * <pre>\n     * Moniker or Human-Readable name of the peer.\n     * </pre>\n     *\n     * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n     * @return The moniker.\n     */\n    java.lang.String getMoniker();\n    /**\n     * <pre>\n     * Moniker or Human-Readable name of the peer.\n     * </pre>\n     *\n     * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n     * @return The bytes for moniker.\n     */\n    com.google.protobuf.ByteString\n        getMonikerBytes();\n\n    /**\n     * <pre>\n     * Version and agent details of the peer.\n     * </pre>\n     *\n     * <code>string agent = 3 [json_name = \"agent\"];</code>\n     * @return The agent.\n     */\n    java.lang.String getAgent();\n    /**\n     * <pre>\n     * Version and agent details of the peer.\n     * </pre>\n     *\n     * <code>string agent = 3 [json_name = \"agent\"];</code>\n     * @return The bytes for agent.\n     */\n    com.google.protobuf.ByteString\n        getAgentBytes();\n\n    /**\n     * <pre>\n     * Peer ID of the peer in P2P network.\n     * </pre>\n     *\n     * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n     * @return The peerId.\n     */\n    java.lang.String getPeerId();\n    /**\n     * <pre>\n     * Peer ID of the peer in P2P network.\n     * </pre>\n     *\n     * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n     * @return The bytes for peerId.\n     */\n    com.google.protobuf.ByteString\n        getPeerIdBytes();\n\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @return A list containing the consensusKeys.\n     */\n    java.util.List<java.lang.String>\n        getConsensusKeysList();\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @return The count of consensusKeys.\n     */\n    int getConsensusKeysCount();\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @param index The index of the element to return.\n     * @return The consensusKeys at the given index.\n     */\n    java.lang.String getConsensusKeys(int index);\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the consensusKeys at the given index.\n     */\n    com.google.protobuf.ByteString\n        getConsensusKeysBytes(int index);\n\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @return A list containing the consensusAddresses.\n     */\n    java.util.List<java.lang.String>\n        getConsensusAddressesList();\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @return The count of consensusAddresses.\n     */\n    int getConsensusAddressesCount();\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @param index The index of the element to return.\n     * @return The consensusAddresses at the given index.\n     */\n    java.lang.String getConsensusAddresses(int index);\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the consensusAddresses at the given index.\n     */\n    com.google.protobuf.ByteString\n        getConsensusAddressesBytes(int index);\n\n    /**\n     * <pre>\n     * Bitfield representing the services provided by the peer.\n     * </pre>\n     *\n     * <code>uint32 services = 7 [json_name = \"services\"];</code>\n     * @return The services.\n     */\n    int getServices();\n\n    /**\n     * <pre>\n     * Hash of the last block the peer knows.\n     * </pre>\n     *\n     * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n     * @return The lastBlockHash.\n     */\n    java.lang.String getLastBlockHash();\n    /**\n     * <pre>\n     * Hash of the last block the peer knows.\n     * </pre>\n     *\n     * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n     * @return The bytes for lastBlockHash.\n     */\n    com.google.protobuf.ByteString\n        getLastBlockHashBytes();\n\n    /**\n     * <pre>\n     * Blockchain height of the peer.\n     * </pre>\n     *\n     * <code>uint32 height = 9 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    int getHeight();\n\n    /**\n     * <pre>\n     * Unix timestamp of the last bundle sent to the peer (UTC).\n     * </pre>\n     *\n     * <code>int64 last_sent = 10 [json_name = \"lastSent\"];</code>\n     * @return The lastSent.\n     */\n    long getLastSent();\n\n    /**\n     * <pre>\n     * Unix timestamp of the last bundle received from the peer (UTC).\n     * </pre>\n     *\n     * <code>int64 last_received = 11 [json_name = \"lastReceived\"];</code>\n     * @return The lastReceived.\n     */\n    long getLastReceived();\n\n    /**\n     * <pre>\n     * Network address of the peer.\n     * </pre>\n     *\n     * <code>string address = 12 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * Network address of the peer.\n     * </pre>\n     *\n     * <code>string address = 12 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * Connection direction (e.g., inbound, outbound).\n     * </pre>\n     *\n     * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    int getDirectionValue();\n    /**\n     * <pre>\n     * Connection direction (e.g., inbound, outbound).\n     * </pre>\n     *\n     * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    pactus.NetworkOuterClass.Direction getDirection();\n\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @return A list containing the protocols.\n     */\n    java.util.List<java.lang.String>\n        getProtocolsList();\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @return The count of protocols.\n     */\n    int getProtocolsCount();\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @param index The index of the element to return.\n     * @return The protocols at the given index.\n     */\n    java.lang.String getProtocols(int index);\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the protocols at the given index.\n     */\n    com.google.protobuf.ByteString\n        getProtocolsBytes(int index);\n\n    /**\n     * <pre>\n     * Total download sessions with the peer.\n     * </pre>\n     *\n     * <code>int32 total_sessions = 15 [json_name = \"totalSessions\"];</code>\n     * @return The totalSessions.\n     */\n    int getTotalSessions();\n\n    /**\n     * <pre>\n     * Completed download sessions with the peer.\n     * </pre>\n     *\n     * <code>int32 completed_sessions = 16 [json_name = \"completedSessions\"];</code>\n     * @return The completedSessions.\n     */\n    int getCompletedSessions();\n\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     * @return Whether the metricInfo field is set.\n     */\n    boolean hasMetricInfo();\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     * @return The metricInfo.\n     */\n    pactus.NetworkOuterClass.MetricInfo getMetricInfo();\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     */\n    pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder();\n\n    /**\n     * <pre>\n     * Whether the hello message was sent from the outbound connection.\n     * </pre>\n     *\n     * <code>bool outbound_hello_sent = 18 [json_name = \"outboundHelloSent\"];</code>\n     * @return The outboundHelloSent.\n     */\n    boolean getOutboundHelloSent();\n  }\n  /**\n   * <pre>\n   * PeerInfo contains information about a peer in the network.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PeerInfo}\n   */\n  public static final class PeerInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PeerInfo)\n      PeerInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PeerInfo\");\n    }\n    // Use PeerInfo.newBuilder() to construct.\n    private PeerInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PeerInfo() {\n      moniker_ = \"\";\n      agent_ = \"\";\n      peerId_ = \"\";\n      consensusKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      consensusAddresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      lastBlockHash_ = \"\";\n      address_ = \"\";\n      direction_ = 0;\n      protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.PeerInfo.class, pactus.NetworkOuterClass.PeerInfo.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int STATUS_FIELD_NUMBER = 1;\n    private int status_ = 0;\n    /**\n     * <pre>\n     * Current status of the peer (e.g., connected, disconnected).\n     * </pre>\n     *\n     * <code>int32 status = 1 [json_name = \"status\"];</code>\n     * @return The status.\n     */\n    @java.lang.Override\n    public int getStatus() {\n      return status_;\n    }\n\n    public static final int MONIKER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object moniker_ = \"\";\n    /**\n     * <pre>\n     * Moniker or Human-Readable name of the peer.\n     * </pre>\n     *\n     * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n     * @return The moniker.\n     */\n    @java.lang.Override\n    public java.lang.String getMoniker() {\n      java.lang.Object ref = moniker_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        moniker_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Moniker or Human-Readable name of the peer.\n     * </pre>\n     *\n     * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n     * @return The bytes for moniker.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMonikerBytes() {\n      java.lang.Object ref = moniker_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        moniker_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AGENT_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object agent_ = \"\";\n    /**\n     * <pre>\n     * Version and agent details of the peer.\n     * </pre>\n     *\n     * <code>string agent = 3 [json_name = \"agent\"];</code>\n     * @return The agent.\n     */\n    @java.lang.Override\n    public java.lang.String getAgent() {\n      java.lang.Object ref = agent_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        agent_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Version and agent details of the peer.\n     * </pre>\n     *\n     * <code>string agent = 3 [json_name = \"agent\"];</code>\n     * @return The bytes for agent.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAgentBytes() {\n      java.lang.Object ref = agent_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        agent_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PEER_ID_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object peerId_ = \"\";\n    /**\n     * <pre>\n     * Peer ID of the peer in P2P network.\n     * </pre>\n     *\n     * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n     * @return The peerId.\n     */\n    @java.lang.Override\n    public java.lang.String getPeerId() {\n      java.lang.Object ref = peerId_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        peerId_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Peer ID of the peer in P2P network.\n     * </pre>\n     *\n     * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n     * @return The bytes for peerId.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPeerIdBytes() {\n      java.lang.Object ref = peerId_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        peerId_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int CONSENSUS_KEYS_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList consensusKeys_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @return A list containing the consensusKeys.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getConsensusKeysList() {\n      return consensusKeys_;\n    }\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @return The count of consensusKeys.\n     */\n    public int getConsensusKeysCount() {\n      return consensusKeys_.size();\n    }\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @param index The index of the element to return.\n     * @return The consensusKeys at the given index.\n     */\n    public java.lang.String getConsensusKeys(int index) {\n      return consensusKeys_.get(index);\n    }\n    /**\n     * <pre>\n     * List of consensus keys used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the consensusKeys at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getConsensusKeysBytes(int index) {\n      return consensusKeys_.getByteString(index);\n    }\n\n    public static final int CONSENSUS_ADDRESSES_FIELD_NUMBER = 6;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList consensusAddresses_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @return A list containing the consensusAddresses.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getConsensusAddressesList() {\n      return consensusAddresses_;\n    }\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @return The count of consensusAddresses.\n     */\n    public int getConsensusAddressesCount() {\n      return consensusAddresses_.size();\n    }\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @param index The index of the element to return.\n     * @return The consensusAddresses at the given index.\n     */\n    public java.lang.String getConsensusAddresses(int index) {\n      return consensusAddresses_.get(index);\n    }\n    /**\n     * <pre>\n     * List of consensus addresses used by the peer.\n     * </pre>\n     *\n     * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the consensusAddresses at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getConsensusAddressesBytes(int index) {\n      return consensusAddresses_.getByteString(index);\n    }\n\n    public static final int SERVICES_FIELD_NUMBER = 7;\n    private int services_ = 0;\n    /**\n     * <pre>\n     * Bitfield representing the services provided by the peer.\n     * </pre>\n     *\n     * <code>uint32 services = 7 [json_name = \"services\"];</code>\n     * @return The services.\n     */\n    @java.lang.Override\n    public int getServices() {\n      return services_;\n    }\n\n    public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object lastBlockHash_ = \"\";\n    /**\n     * <pre>\n     * Hash of the last block the peer knows.\n     * </pre>\n     *\n     * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n     * @return The lastBlockHash.\n     */\n    @java.lang.Override\n    public java.lang.String getLastBlockHash() {\n      java.lang.Object ref = lastBlockHash_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        lastBlockHash_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Hash of the last block the peer knows.\n     * </pre>\n     *\n     * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n     * @return The bytes for lastBlockHash.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLastBlockHashBytes() {\n      java.lang.Object ref = lastBlockHash_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        lastBlockHash_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int HEIGHT_FIELD_NUMBER = 9;\n    private int height_ = 0;\n    /**\n     * <pre>\n     * Blockchain height of the peer.\n     * </pre>\n     *\n     * <code>uint32 height = 9 [json_name = \"height\"];</code>\n     * @return The height.\n     */\n    @java.lang.Override\n    public int getHeight() {\n      return height_;\n    }\n\n    public static final int LAST_SENT_FIELD_NUMBER = 10;\n    private long lastSent_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp of the last bundle sent to the peer (UTC).\n     * </pre>\n     *\n     * <code>int64 last_sent = 10 [json_name = \"lastSent\"];</code>\n     * @return The lastSent.\n     */\n    @java.lang.Override\n    public long getLastSent() {\n      return lastSent_;\n    }\n\n    public static final int LAST_RECEIVED_FIELD_NUMBER = 11;\n    private long lastReceived_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp of the last bundle received from the peer (UTC).\n     * </pre>\n     *\n     * <code>int64 last_received = 11 [json_name = \"lastReceived\"];</code>\n     * @return The lastReceived.\n     */\n    @java.lang.Override\n    public long getLastReceived() {\n      return lastReceived_;\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 12;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * Network address of the peer.\n     * </pre>\n     *\n     * <code>string address = 12 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Network address of the peer.\n     * </pre>\n     *\n     * <code>string address = 12 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DIRECTION_FIELD_NUMBER = 13;\n    private int direction_ = 0;\n    /**\n     * <pre>\n     * Connection direction (e.g., inbound, outbound).\n     * </pre>\n     *\n     * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    @java.lang.Override public int getDirectionValue() {\n      return direction_;\n    }\n    /**\n     * <pre>\n     * Connection direction (e.g., inbound, outbound).\n     * </pre>\n     *\n     * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    @java.lang.Override public pactus.NetworkOuterClass.Direction getDirection() {\n      pactus.NetworkOuterClass.Direction result = pactus.NetworkOuterClass.Direction.forNumber(direction_);\n      return result == null ? pactus.NetworkOuterClass.Direction.UNRECOGNIZED : result;\n    }\n\n    public static final int PROTOCOLS_FIELD_NUMBER = 14;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList protocols_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @return A list containing the protocols.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getProtocolsList() {\n      return protocols_;\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @return The count of protocols.\n     */\n    public int getProtocolsCount() {\n      return protocols_.size();\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @param index The index of the element to return.\n     * @return The protocols at the given index.\n     */\n    public java.lang.String getProtocols(int index) {\n      return protocols_.get(index);\n    }\n    /**\n     * <pre>\n     * List of protocols supported by the peer.\n     * </pre>\n     *\n     * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the protocols at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getProtocolsBytes(int index) {\n      return protocols_.getByteString(index);\n    }\n\n    public static final int TOTAL_SESSIONS_FIELD_NUMBER = 15;\n    private int totalSessions_ = 0;\n    /**\n     * <pre>\n     * Total download sessions with the peer.\n     * </pre>\n     *\n     * <code>int32 total_sessions = 15 [json_name = \"totalSessions\"];</code>\n     * @return The totalSessions.\n     */\n    @java.lang.Override\n    public int getTotalSessions() {\n      return totalSessions_;\n    }\n\n    public static final int COMPLETED_SESSIONS_FIELD_NUMBER = 16;\n    private int completedSessions_ = 0;\n    /**\n     * <pre>\n     * Completed download sessions with the peer.\n     * </pre>\n     *\n     * <code>int32 completed_sessions = 16 [json_name = \"completedSessions\"];</code>\n     * @return The completedSessions.\n     */\n    @java.lang.Override\n    public int getCompletedSessions() {\n      return completedSessions_;\n    }\n\n    public static final int METRIC_INFO_FIELD_NUMBER = 17;\n    private pactus.NetworkOuterClass.MetricInfo metricInfo_;\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     * @return Whether the metricInfo field is set.\n     */\n    @java.lang.Override\n    public boolean hasMetricInfo() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     * @return The metricInfo.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.MetricInfo getMetricInfo() {\n      return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n    }\n    /**\n     * <pre>\n     * Metrics related to peer activity.\n     * </pre>\n     *\n     * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder() {\n      return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n    }\n\n    public static final int OUTBOUND_HELLO_SENT_FIELD_NUMBER = 18;\n    private boolean outboundHelloSent_ = false;\n    /**\n     * <pre>\n     * Whether the hello message was sent from the outbound connection.\n     * </pre>\n     *\n     * <code>bool outbound_hello_sent = 18 [json_name = \"outboundHelloSent\"];</code>\n     * @return The outboundHelloSent.\n     */\n    @java.lang.Override\n    public boolean getOutboundHelloSent() {\n      return outboundHelloSent_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (status_ != 0) {\n        output.writeInt32(1, status_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(moniker_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, moniker_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, agent_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peerId_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, peerId_);\n      }\n      for (int i = 0; i < consensusKeys_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, consensusKeys_.getRaw(i));\n      }\n      for (int i = 0; i < consensusAddresses_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 6, consensusAddresses_.getRaw(i));\n      }\n      if (services_ != 0) {\n        output.writeUInt32(7, services_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastBlockHash_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, lastBlockHash_);\n      }\n      if (height_ != 0) {\n        output.writeUInt32(9, height_);\n      }\n      if (lastSent_ != 0L) {\n        output.writeInt64(10, lastSent_);\n      }\n      if (lastReceived_ != 0L) {\n        output.writeInt64(11, lastReceived_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 12, address_);\n      }\n      if (direction_ != pactus.NetworkOuterClass.Direction.DIRECTION_UNKNOWN.getNumber()) {\n        output.writeEnum(13, direction_);\n      }\n      for (int i = 0; i < protocols_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 14, protocols_.getRaw(i));\n      }\n      if (totalSessions_ != 0) {\n        output.writeInt32(15, totalSessions_);\n      }\n      if (completedSessions_ != 0) {\n        output.writeInt32(16, completedSessions_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(17, getMetricInfo());\n      }\n      if (outboundHelloSent_ != false) {\n        output.writeBool(18, outboundHelloSent_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (status_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(1, status_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(moniker_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, moniker_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(agent_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, agent_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peerId_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, peerId_);\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < consensusKeys_.size(); i++) {\n          dataSize += computeStringSizeNoTag(consensusKeys_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getConsensusKeysList().size();\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < consensusAddresses_.size(); i++) {\n          dataSize += computeStringSizeNoTag(consensusAddresses_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getConsensusAddressesList().size();\n      }\n      if (services_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(7, services_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lastBlockHash_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, lastBlockHash_);\n      }\n      if (height_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(9, height_);\n      }\n      if (lastSent_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(10, lastSent_);\n      }\n      if (lastReceived_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(11, lastReceived_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(12, address_);\n      }\n      if (direction_ != pactus.NetworkOuterClass.Direction.DIRECTION_UNKNOWN.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(13, direction_);\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < protocols_.size(); i++) {\n          dataSize += computeStringSizeNoTag(protocols_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getProtocolsList().size();\n      }\n      if (totalSessions_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(15, totalSessions_);\n      }\n      if (completedSessions_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(16, completedSessions_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(17, getMetricInfo());\n      }\n      if (outboundHelloSent_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(18, outboundHelloSent_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.PeerInfo)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.PeerInfo other = (pactus.NetworkOuterClass.PeerInfo) obj;\n\n      if (getStatus()\n          != other.getStatus()) return false;\n      if (!getMoniker()\n          .equals(other.getMoniker())) return false;\n      if (!getAgent()\n          .equals(other.getAgent())) return false;\n      if (!getPeerId()\n          .equals(other.getPeerId())) return false;\n      if (!getConsensusKeysList()\n          .equals(other.getConsensusKeysList())) return false;\n      if (!getConsensusAddressesList()\n          .equals(other.getConsensusAddressesList())) return false;\n      if (getServices()\n          != other.getServices()) return false;\n      if (!getLastBlockHash()\n          .equals(other.getLastBlockHash())) return false;\n      if (getHeight()\n          != other.getHeight()) return false;\n      if (getLastSent()\n          != other.getLastSent()) return false;\n      if (getLastReceived()\n          != other.getLastReceived()) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (direction_ != other.direction_) return false;\n      if (!getProtocolsList()\n          .equals(other.getProtocolsList())) return false;\n      if (getTotalSessions()\n          != other.getTotalSessions()) return false;\n      if (getCompletedSessions()\n          != other.getCompletedSessions()) return false;\n      if (hasMetricInfo() != other.hasMetricInfo()) return false;\n      if (hasMetricInfo()) {\n        if (!getMetricInfo()\n            .equals(other.getMetricInfo())) return false;\n      }\n      if (getOutboundHelloSent()\n          != other.getOutboundHelloSent()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + STATUS_FIELD_NUMBER;\n      hash = (53 * hash) + getStatus();\n      hash = (37 * hash) + MONIKER_FIELD_NUMBER;\n      hash = (53 * hash) + getMoniker().hashCode();\n      hash = (37 * hash) + AGENT_FIELD_NUMBER;\n      hash = (53 * hash) + getAgent().hashCode();\n      hash = (37 * hash) + PEER_ID_FIELD_NUMBER;\n      hash = (53 * hash) + getPeerId().hashCode();\n      if (getConsensusKeysCount() > 0) {\n        hash = (37 * hash) + CONSENSUS_KEYS_FIELD_NUMBER;\n        hash = (53 * hash) + getConsensusKeysList().hashCode();\n      }\n      if (getConsensusAddressesCount() > 0) {\n        hash = (37 * hash) + CONSENSUS_ADDRESSES_FIELD_NUMBER;\n        hash = (53 * hash) + getConsensusAddressesList().hashCode();\n      }\n      hash = (37 * hash) + SERVICES_FIELD_NUMBER;\n      hash = (53 * hash) + getServices();\n      hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER;\n      hash = (53 * hash) + getLastBlockHash().hashCode();\n      hash = (37 * hash) + HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getHeight();\n      hash = (37 * hash) + LAST_SENT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getLastSent());\n      hash = (37 * hash) + LAST_RECEIVED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getLastReceived());\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + DIRECTION_FIELD_NUMBER;\n      hash = (53 * hash) + direction_;\n      if (getProtocolsCount() > 0) {\n        hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER;\n        hash = (53 * hash) + getProtocolsList().hashCode();\n      }\n      hash = (37 * hash) + TOTAL_SESSIONS_FIELD_NUMBER;\n      hash = (53 * hash) + getTotalSessions();\n      hash = (37 * hash) + COMPLETED_SESSIONS_FIELD_NUMBER;\n      hash = (53 * hash) + getCompletedSessions();\n      if (hasMetricInfo()) {\n        hash = (37 * hash) + METRIC_INFO_FIELD_NUMBER;\n        hash = (53 * hash) + getMetricInfo().hashCode();\n      }\n      hash = (37 * hash) + OUTBOUND_HELLO_SENT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getOutboundHelloSent());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.PeerInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.PeerInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PeerInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.PeerInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * PeerInfo contains information about a peer in the network.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PeerInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PeerInfo)\n        pactus.NetworkOuterClass.PeerInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.PeerInfo.class, pactus.NetworkOuterClass.PeerInfo.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.PeerInfo.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetMetricInfoFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        status_ = 0;\n        moniker_ = \"\";\n        agent_ = \"\";\n        peerId_ = \"\";\n        consensusKeys_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        consensusAddresses_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        services_ = 0;\n        lastBlockHash_ = \"\";\n        height_ = 0;\n        lastSent_ = 0L;\n        lastReceived_ = 0L;\n        address_ = \"\";\n        direction_ = 0;\n        protocols_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        totalSessions_ = 0;\n        completedSessions_ = 0;\n        metricInfo_ = null;\n        if (metricInfoBuilder_ != null) {\n          metricInfoBuilder_.dispose();\n          metricInfoBuilder_ = null;\n        }\n        outboundHelloSent_ = false;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PeerInfo getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.PeerInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PeerInfo build() {\n        pactus.NetworkOuterClass.PeerInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PeerInfo buildPartial() {\n        pactus.NetworkOuterClass.PeerInfo result = new pactus.NetworkOuterClass.PeerInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.PeerInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.status_ = status_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.moniker_ = moniker_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.agent_ = agent_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.peerId_ = peerId_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          consensusKeys_.makeImmutable();\n          result.consensusKeys_ = consensusKeys_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          consensusAddresses_.makeImmutable();\n          result.consensusAddresses_ = consensusAddresses_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.services_ = services_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.lastBlockHash_ = lastBlockHash_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.height_ = height_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.lastSent_ = lastSent_;\n        }\n        if (((from_bitField0_ & 0x00000400) != 0)) {\n          result.lastReceived_ = lastReceived_;\n        }\n        if (((from_bitField0_ & 0x00000800) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00001000) != 0)) {\n          result.direction_ = direction_;\n        }\n        if (((from_bitField0_ & 0x00002000) != 0)) {\n          protocols_.makeImmutable();\n          result.protocols_ = protocols_;\n        }\n        if (((from_bitField0_ & 0x00004000) != 0)) {\n          result.totalSessions_ = totalSessions_;\n        }\n        if (((from_bitField0_ & 0x00008000) != 0)) {\n          result.completedSessions_ = completedSessions_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00010000) != 0)) {\n          result.metricInfo_ = metricInfoBuilder_ == null\n              ? metricInfo_\n              : metricInfoBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        if (((from_bitField0_ & 0x00020000) != 0)) {\n          result.outboundHelloSent_ = outboundHelloSent_;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.PeerInfo) {\n          return mergeFrom((pactus.NetworkOuterClass.PeerInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.PeerInfo other) {\n        if (other == pactus.NetworkOuterClass.PeerInfo.getDefaultInstance()) return this;\n        if (other.getStatus() != 0) {\n          setStatus(other.getStatus());\n        }\n        if (!other.getMoniker().isEmpty()) {\n          moniker_ = other.moniker_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getAgent().isEmpty()) {\n          agent_ = other.agent_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getPeerId().isEmpty()) {\n          peerId_ = other.peerId_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        if (!other.consensusKeys_.isEmpty()) {\n          if (consensusKeys_.isEmpty()) {\n            consensusKeys_ = other.consensusKeys_;\n            bitField0_ |= 0x00000010;\n          } else {\n            ensureConsensusKeysIsMutable();\n            consensusKeys_.addAll(other.consensusKeys_);\n          }\n          onChanged();\n        }\n        if (!other.consensusAddresses_.isEmpty()) {\n          if (consensusAddresses_.isEmpty()) {\n            consensusAddresses_ = other.consensusAddresses_;\n            bitField0_ |= 0x00000020;\n          } else {\n            ensureConsensusAddressesIsMutable();\n            consensusAddresses_.addAll(other.consensusAddresses_);\n          }\n          onChanged();\n        }\n        if (other.getServices() != 0) {\n          setServices(other.getServices());\n        }\n        if (!other.getLastBlockHash().isEmpty()) {\n          lastBlockHash_ = other.lastBlockHash_;\n          bitField0_ |= 0x00000080;\n          onChanged();\n        }\n        if (other.getHeight() != 0) {\n          setHeight(other.getHeight());\n        }\n        if (other.getLastSent() != 0L) {\n          setLastSent(other.getLastSent());\n        }\n        if (other.getLastReceived() != 0L) {\n          setLastReceived(other.getLastReceived());\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000800;\n          onChanged();\n        }\n        if (other.direction_ != 0) {\n          setDirectionValue(other.getDirectionValue());\n        }\n        if (!other.protocols_.isEmpty()) {\n          if (protocols_.isEmpty()) {\n            protocols_ = other.protocols_;\n            bitField0_ |= 0x00002000;\n          } else {\n            ensureProtocolsIsMutable();\n            protocols_.addAll(other.protocols_);\n          }\n          onChanged();\n        }\n        if (other.getTotalSessions() != 0) {\n          setTotalSessions(other.getTotalSessions());\n        }\n        if (other.getCompletedSessions() != 0) {\n          setCompletedSessions(other.getCompletedSessions());\n        }\n        if (other.hasMetricInfo()) {\n          mergeMetricInfo(other.getMetricInfo());\n        }\n        if (other.getOutboundHelloSent() != false) {\n          setOutboundHelloSent(other.getOutboundHelloSent());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                status_ = input.readInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                moniker_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                agent_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                peerId_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              case 42: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureConsensusKeysIsMutable();\n                consensusKeys_.add(s);\n                break;\n              } // case 42\n              case 50: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureConsensusAddressesIsMutable();\n                consensusAddresses_.add(s);\n                break;\n              } // case 50\n              case 56: {\n                services_ = input.readUInt32();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 66: {\n                lastBlockHash_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 66\n              case 72: {\n                height_ = input.readUInt32();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 72\n              case 80: {\n                lastSent_ = input.readInt64();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 80\n              case 88: {\n                lastReceived_ = input.readInt64();\n                bitField0_ |= 0x00000400;\n                break;\n              } // case 88\n              case 98: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000800;\n                break;\n              } // case 98\n              case 104: {\n                direction_ = input.readEnum();\n                bitField0_ |= 0x00001000;\n                break;\n              } // case 104\n              case 114: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureProtocolsIsMutable();\n                protocols_.add(s);\n                break;\n              } // case 114\n              case 120: {\n                totalSessions_ = input.readInt32();\n                bitField0_ |= 0x00004000;\n                break;\n              } // case 120\n              case 128: {\n                completedSessions_ = input.readInt32();\n                bitField0_ |= 0x00008000;\n                break;\n              } // case 128\n              case 138: {\n                input.readMessage(\n                    internalGetMetricInfoFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00010000;\n                break;\n              } // case 138\n              case 144: {\n                outboundHelloSent_ = input.readBool();\n                bitField0_ |= 0x00020000;\n                break;\n              } // case 144\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int status_ ;\n      /**\n       * <pre>\n       * Current status of the peer (e.g., connected, disconnected).\n       * </pre>\n       *\n       * <code>int32 status = 1 [json_name = \"status\"];</code>\n       * @return The status.\n       */\n      @java.lang.Override\n      public int getStatus() {\n        return status_;\n      }\n      /**\n       * <pre>\n       * Current status of the peer (e.g., connected, disconnected).\n       * </pre>\n       *\n       * <code>int32 status = 1 [json_name = \"status\"];</code>\n       * @param value The status to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStatus(int value) {\n\n        status_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Current status of the peer (e.g., connected, disconnected).\n       * </pre>\n       *\n       * <code>int32 status = 1 [json_name = \"status\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStatus() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        status_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object moniker_ = \"\";\n      /**\n       * <pre>\n       * Moniker or Human-Readable name of the peer.\n       * </pre>\n       *\n       * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n       * @return The moniker.\n       */\n      public java.lang.String getMoniker() {\n        java.lang.Object ref = moniker_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          moniker_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Moniker or Human-Readable name of the peer.\n       * </pre>\n       *\n       * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n       * @return The bytes for moniker.\n       */\n      public com.google.protobuf.ByteString\n          getMonikerBytes() {\n        java.lang.Object ref = moniker_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          moniker_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Moniker or Human-Readable name of the peer.\n       * </pre>\n       *\n       * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n       * @param value The moniker to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMoniker(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        moniker_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Moniker or Human-Readable name of the peer.\n       * </pre>\n       *\n       * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMoniker() {\n        moniker_ = getDefaultInstance().getMoniker();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Moniker or Human-Readable name of the peer.\n       * </pre>\n       *\n       * <code>string moniker = 2 [json_name = \"moniker\"];</code>\n       * @param value The bytes for moniker to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMonikerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        moniker_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object agent_ = \"\";\n      /**\n       * <pre>\n       * Version and agent details of the peer.\n       * </pre>\n       *\n       * <code>string agent = 3 [json_name = \"agent\"];</code>\n       * @return The agent.\n       */\n      public java.lang.String getAgent() {\n        java.lang.Object ref = agent_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          agent_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Version and agent details of the peer.\n       * </pre>\n       *\n       * <code>string agent = 3 [json_name = \"agent\"];</code>\n       * @return The bytes for agent.\n       */\n      public com.google.protobuf.ByteString\n          getAgentBytes() {\n        java.lang.Object ref = agent_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          agent_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Version and agent details of the peer.\n       * </pre>\n       *\n       * <code>string agent = 3 [json_name = \"agent\"];</code>\n       * @param value The agent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAgent(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        agent_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Version and agent details of the peer.\n       * </pre>\n       *\n       * <code>string agent = 3 [json_name = \"agent\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAgent() {\n        agent_ = getDefaultInstance().getAgent();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Version and agent details of the peer.\n       * </pre>\n       *\n       * <code>string agent = 3 [json_name = \"agent\"];</code>\n       * @param value The bytes for agent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAgentBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        agent_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object peerId_ = \"\";\n      /**\n       * <pre>\n       * Peer ID of the peer in P2P network.\n       * </pre>\n       *\n       * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n       * @return The peerId.\n       */\n      public java.lang.String getPeerId() {\n        java.lang.Object ref = peerId_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          peerId_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Peer ID of the peer in P2P network.\n       * </pre>\n       *\n       * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n       * @return The bytes for peerId.\n       */\n      public com.google.protobuf.ByteString\n          getPeerIdBytes() {\n        java.lang.Object ref = peerId_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          peerId_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Peer ID of the peer in P2P network.\n       * </pre>\n       *\n       * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n       * @param value The peerId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPeerId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        peerId_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Peer ID of the peer in P2P network.\n       * </pre>\n       *\n       * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPeerId() {\n        peerId_ = getDefaultInstance().getPeerId();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Peer ID of the peer in P2P network.\n       * </pre>\n       *\n       * <code>string peer_id = 4 [json_name = \"peerId\"];</code>\n       * @param value The bytes for peerId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPeerIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        peerId_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.LazyStringArrayList consensusKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureConsensusKeysIsMutable() {\n        if (!consensusKeys_.isModifiable()) {\n          consensusKeys_ = new com.google.protobuf.LazyStringArrayList(consensusKeys_);\n        }\n        bitField0_ |= 0x00000010;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @return A list containing the consensusKeys.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getConsensusKeysList() {\n        consensusKeys_.makeImmutable();\n        return consensusKeys_;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @return The count of consensusKeys.\n       */\n      public int getConsensusKeysCount() {\n        return consensusKeys_.size();\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param index The index of the element to return.\n       * @return The consensusKeys at the given index.\n       */\n      public java.lang.String getConsensusKeys(int index) {\n        return consensusKeys_.get(index);\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the consensusKeys at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getConsensusKeysBytes(int index) {\n        return consensusKeys_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param index The index to set the value at.\n       * @param value The consensusKeys to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConsensusKeys(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureConsensusKeysIsMutable();\n        consensusKeys_.set(index, value);\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param value The consensusKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addConsensusKeys(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureConsensusKeysIsMutable();\n        consensusKeys_.add(value);\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param values The consensusKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllConsensusKeys(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureConsensusKeysIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, consensusKeys_);\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConsensusKeys() {\n        consensusKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000010);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus keys used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_keys = 5 [json_name = \"consensusKeys\"];</code>\n       * @param value The bytes of the consensusKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addConsensusKeysBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureConsensusKeysIsMutable();\n        consensusKeys_.add(value);\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.LazyStringArrayList consensusAddresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureConsensusAddressesIsMutable() {\n        if (!consensusAddresses_.isModifiable()) {\n          consensusAddresses_ = new com.google.protobuf.LazyStringArrayList(consensusAddresses_);\n        }\n        bitField0_ |= 0x00000020;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @return A list containing the consensusAddresses.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getConsensusAddressesList() {\n        consensusAddresses_.makeImmutable();\n        return consensusAddresses_;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @return The count of consensusAddresses.\n       */\n      public int getConsensusAddressesCount() {\n        return consensusAddresses_.size();\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param index The index of the element to return.\n       * @return The consensusAddresses at the given index.\n       */\n      public java.lang.String getConsensusAddresses(int index) {\n        return consensusAddresses_.get(index);\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the consensusAddresses at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getConsensusAddressesBytes(int index) {\n        return consensusAddresses_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param index The index to set the value at.\n       * @param value The consensusAddresses to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConsensusAddresses(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureConsensusAddressesIsMutable();\n        consensusAddresses_.set(index, value);\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param value The consensusAddresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addConsensusAddresses(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureConsensusAddressesIsMutable();\n        consensusAddresses_.add(value);\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param values The consensusAddresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllConsensusAddresses(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureConsensusAddressesIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, consensusAddresses_);\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConsensusAddresses() {\n        consensusAddresses_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000020);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of consensus addresses used by the peer.\n       * </pre>\n       *\n       * <code>repeated string consensus_addresses = 6 [json_name = \"consensusAddresses\"];</code>\n       * @param value The bytes of the consensusAddresses to add.\n       * @return This builder for chaining.\n       */\n      public Builder addConsensusAddressesBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureConsensusAddressesIsMutable();\n        consensusAddresses_.add(value);\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n\n      private int services_ ;\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the peer.\n       * </pre>\n       *\n       * <code>uint32 services = 7 [json_name = \"services\"];</code>\n       * @return The services.\n       */\n      @java.lang.Override\n      public int getServices() {\n        return services_;\n      }\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the peer.\n       * </pre>\n       *\n       * <code>uint32 services = 7 [json_name = \"services\"];</code>\n       * @param value The services to set.\n       * @return This builder for chaining.\n       */\n      public Builder setServices(int value) {\n\n        services_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Bitfield representing the services provided by the peer.\n       * </pre>\n       *\n       * <code>uint32 services = 7 [json_name = \"services\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearServices() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        services_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object lastBlockHash_ = \"\";\n      /**\n       * <pre>\n       * Hash of the last block the peer knows.\n       * </pre>\n       *\n       * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n       * @return The lastBlockHash.\n       */\n      public java.lang.String getLastBlockHash() {\n        java.lang.Object ref = lastBlockHash_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          lastBlockHash_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Hash of the last block the peer knows.\n       * </pre>\n       *\n       * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n       * @return The bytes for lastBlockHash.\n       */\n      public com.google.protobuf.ByteString\n          getLastBlockHashBytes() {\n        java.lang.Object ref = lastBlockHash_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          lastBlockHash_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Hash of the last block the peer knows.\n       * </pre>\n       *\n       * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n       * @param value The lastBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockHash(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        lastBlockHash_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Hash of the last block the peer knows.\n       * </pre>\n       *\n       * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastBlockHash() {\n        lastBlockHash_ = getDefaultInstance().getLastBlockHash();\n        bitField0_ = (bitField0_ & ~0x00000080);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Hash of the last block the peer knows.\n       * </pre>\n       *\n       * <code>string last_block_hash = 8 [json_name = \"lastBlockHash\"];</code>\n       * @param value The bytes for lastBlockHash to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastBlockHashBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        lastBlockHash_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n\n      private int height_ ;\n      /**\n       * <pre>\n       * Blockchain height of the peer.\n       * </pre>\n       *\n       * <code>uint32 height = 9 [json_name = \"height\"];</code>\n       * @return The height.\n       */\n      @java.lang.Override\n      public int getHeight() {\n        return height_;\n      }\n      /**\n       * <pre>\n       * Blockchain height of the peer.\n       * </pre>\n       *\n       * <code>uint32 height = 9 [json_name = \"height\"];</code>\n       * @param value The height to set.\n       * @return This builder for chaining.\n       */\n      public Builder setHeight(int value) {\n\n        height_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Blockchain height of the peer.\n       * </pre>\n       *\n       * <code>uint32 height = 9 [json_name = \"height\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearHeight() {\n        bitField0_ = (bitField0_ & ~0x00000100);\n        height_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long lastSent_ ;\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle sent to the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_sent = 10 [json_name = \"lastSent\"];</code>\n       * @return The lastSent.\n       */\n      @java.lang.Override\n      public long getLastSent() {\n        return lastSent_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle sent to the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_sent = 10 [json_name = \"lastSent\"];</code>\n       * @param value The lastSent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastSent(long value) {\n\n        lastSent_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle sent to the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_sent = 10 [json_name = \"lastSent\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastSent() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        lastSent_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long lastReceived_ ;\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle received from the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_received = 11 [json_name = \"lastReceived\"];</code>\n       * @return The lastReceived.\n       */\n      @java.lang.Override\n      public long getLastReceived() {\n        return lastReceived_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle received from the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_received = 11 [json_name = \"lastReceived\"];</code>\n       * @param value The lastReceived to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLastReceived(long value) {\n\n        lastReceived_ = value;\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of the last bundle received from the peer (UTC).\n       * </pre>\n       *\n       * <code>int64 last_received = 11 [json_name = \"lastReceived\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLastReceived() {\n        bitField0_ = (bitField0_ & ~0x00000400);\n        lastReceived_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * Network address of the peer.\n       * </pre>\n       *\n       * <code>string address = 12 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Network address of the peer.\n       * </pre>\n       *\n       * <code>string address = 12 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Network address of the peer.\n       * </pre>\n       *\n       * <code>string address = 12 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000800;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Network address of the peer.\n       * </pre>\n       *\n       * <code>string address = 12 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000800);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Network address of the peer.\n       * </pre>\n       *\n       * <code>string address = 12 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000800;\n        onChanged();\n        return this;\n      }\n\n      private int direction_ = 0;\n      /**\n       * <pre>\n       * Connection direction (e.g., inbound, outbound).\n       * </pre>\n       *\n       * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n       * @return The enum numeric value on the wire for direction.\n       */\n      @java.lang.Override public int getDirectionValue() {\n        return direction_;\n      }\n      /**\n       * <pre>\n       * Connection direction (e.g., inbound, outbound).\n       * </pre>\n       *\n       * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n       * @param value The enum numeric value on the wire for direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirectionValue(int value) {\n        direction_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Connection direction (e.g., inbound, outbound).\n       * </pre>\n       *\n       * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n       * @return The direction.\n       */\n      @java.lang.Override\n      public pactus.NetworkOuterClass.Direction getDirection() {\n        pactus.NetworkOuterClass.Direction result = pactus.NetworkOuterClass.Direction.forNumber(direction_);\n        return result == null ? pactus.NetworkOuterClass.Direction.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * Connection direction (e.g., inbound, outbound).\n       * </pre>\n       *\n       * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n       * @param value The direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirection(pactus.NetworkOuterClass.Direction value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00001000;\n        direction_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Connection direction (e.g., inbound, outbound).\n       * </pre>\n       *\n       * <code>.pactus.Direction direction = 13 [json_name = \"direction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDirection() {\n        bitField0_ = (bitField0_ & ~0x00001000);\n        direction_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.LazyStringArrayList protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureProtocolsIsMutable() {\n        if (!protocols_.isModifiable()) {\n          protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_);\n        }\n        bitField0_ |= 0x00002000;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @return A list containing the protocols.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getProtocolsList() {\n        protocols_.makeImmutable();\n        return protocols_;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @return The count of protocols.\n       */\n      public int getProtocolsCount() {\n        return protocols_.size();\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param index The index of the element to return.\n       * @return The protocols at the given index.\n       */\n      public java.lang.String getProtocols(int index) {\n        return protocols_.get(index);\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the protocols at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getProtocolsBytes(int index) {\n        return protocols_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param index The index to set the value at.\n       * @param value The protocols to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProtocols(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureProtocolsIsMutable();\n        protocols_.set(index, value);\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param value The protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addProtocols(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureProtocolsIsMutable();\n        protocols_.add(value);\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param values The protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllProtocols(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureProtocolsIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, protocols_);\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearProtocols() {\n        protocols_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00002000);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of protocols supported by the peer.\n       * </pre>\n       *\n       * <code>repeated string protocols = 14 [json_name = \"protocols\"];</code>\n       * @param value The bytes of the protocols to add.\n       * @return This builder for chaining.\n       */\n      public Builder addProtocolsBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureProtocolsIsMutable();\n        protocols_.add(value);\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n\n      private int totalSessions_ ;\n      /**\n       * <pre>\n       * Total download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 total_sessions = 15 [json_name = \"totalSessions\"];</code>\n       * @return The totalSessions.\n       */\n      @java.lang.Override\n      public int getTotalSessions() {\n        return totalSessions_;\n      }\n      /**\n       * <pre>\n       * Total download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 total_sessions = 15 [json_name = \"totalSessions\"];</code>\n       * @param value The totalSessions to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalSessions(int value) {\n\n        totalSessions_ = value;\n        bitField0_ |= 0x00004000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 total_sessions = 15 [json_name = \"totalSessions\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalSessions() {\n        bitField0_ = (bitField0_ & ~0x00004000);\n        totalSessions_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int completedSessions_ ;\n      /**\n       * <pre>\n       * Completed download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 completed_sessions = 16 [json_name = \"completedSessions\"];</code>\n       * @return The completedSessions.\n       */\n      @java.lang.Override\n      public int getCompletedSessions() {\n        return completedSessions_;\n      }\n      /**\n       * <pre>\n       * Completed download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 completed_sessions = 16 [json_name = \"completedSessions\"];</code>\n       * @param value The completedSessions to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCompletedSessions(int value) {\n\n        completedSessions_ = value;\n        bitField0_ |= 0x00008000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Completed download sessions with the peer.\n       * </pre>\n       *\n       * <code>int32 completed_sessions = 16 [json_name = \"completedSessions\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCompletedSessions() {\n        bitField0_ = (bitField0_ & ~0x00008000);\n        completedSessions_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private pactus.NetworkOuterClass.MetricInfo metricInfo_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder> metricInfoBuilder_;\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       * @return Whether the metricInfo field is set.\n       */\n      public boolean hasMetricInfo() {\n        return ((bitField0_ & 0x00010000) != 0);\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       * @return The metricInfo.\n       */\n      public pactus.NetworkOuterClass.MetricInfo getMetricInfo() {\n        if (metricInfoBuilder_ == null) {\n          return metricInfo_ == null ? pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n        } else {\n          return metricInfoBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder setMetricInfo(pactus.NetworkOuterClass.MetricInfo value) {\n        if (metricInfoBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          metricInfo_ = value;\n        } else {\n          metricInfoBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00010000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder setMetricInfo(\n          pactus.NetworkOuterClass.MetricInfo.Builder builderForValue) {\n        if (metricInfoBuilder_ == null) {\n          metricInfo_ = builderForValue.build();\n        } else {\n          metricInfoBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00010000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder mergeMetricInfo(pactus.NetworkOuterClass.MetricInfo value) {\n        if (metricInfoBuilder_ == null) {\n          if (((bitField0_ & 0x00010000) != 0) &&\n            metricInfo_ != null &&\n            metricInfo_ != pactus.NetworkOuterClass.MetricInfo.getDefaultInstance()) {\n            getMetricInfoBuilder().mergeFrom(value);\n          } else {\n            metricInfo_ = value;\n          }\n        } else {\n          metricInfoBuilder_.mergeFrom(value);\n        }\n        if (metricInfo_ != null) {\n          bitField0_ |= 0x00010000;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public Builder clearMetricInfo() {\n        bitField0_ = (bitField0_ & ~0x00010000);\n        metricInfo_ = null;\n        if (metricInfoBuilder_ != null) {\n          metricInfoBuilder_.dispose();\n          metricInfoBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.MetricInfo.Builder getMetricInfoBuilder() {\n        bitField0_ |= 0x00010000;\n        onChanged();\n        return internalGetMetricInfoFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      public pactus.NetworkOuterClass.MetricInfoOrBuilder getMetricInfoOrBuilder() {\n        if (metricInfoBuilder_ != null) {\n          return metricInfoBuilder_.getMessageOrBuilder();\n        } else {\n          return metricInfo_ == null ?\n              pactus.NetworkOuterClass.MetricInfo.getDefaultInstance() : metricInfo_;\n        }\n      }\n      /**\n       * <pre>\n       * Metrics related to peer activity.\n       * </pre>\n       *\n       * <code>.pactus.MetricInfo metric_info = 17 [json_name = \"metricInfo\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder> \n          internalGetMetricInfoFieldBuilder() {\n        if (metricInfoBuilder_ == null) {\n          metricInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.MetricInfo, pactus.NetworkOuterClass.MetricInfo.Builder, pactus.NetworkOuterClass.MetricInfoOrBuilder>(\n                  getMetricInfo(),\n                  getParentForChildren(),\n                  isClean());\n          metricInfo_ = null;\n        }\n        return metricInfoBuilder_;\n      }\n\n      private boolean outboundHelloSent_ ;\n      /**\n       * <pre>\n       * Whether the hello message was sent from the outbound connection.\n       * </pre>\n       *\n       * <code>bool outbound_hello_sent = 18 [json_name = \"outboundHelloSent\"];</code>\n       * @return The outboundHelloSent.\n       */\n      @java.lang.Override\n      public boolean getOutboundHelloSent() {\n        return outboundHelloSent_;\n      }\n      /**\n       * <pre>\n       * Whether the hello message was sent from the outbound connection.\n       * </pre>\n       *\n       * <code>bool outbound_hello_sent = 18 [json_name = \"outboundHelloSent\"];</code>\n       * @param value The outboundHelloSent to set.\n       * @return This builder for chaining.\n       */\n      public Builder setOutboundHelloSent(boolean value) {\n\n        outboundHelloSent_ = value;\n        bitField0_ |= 0x00020000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Whether the hello message was sent from the outbound connection.\n       * </pre>\n       *\n       * <code>bool outbound_hello_sent = 18 [json_name = \"outboundHelloSent\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearOutboundHelloSent() {\n        bitField0_ = (bitField0_ & ~0x00020000);\n        outboundHelloSent_ = false;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PeerInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PeerInfo)\n    private static final pactus.NetworkOuterClass.PeerInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.PeerInfo();\n    }\n\n    public static pactus.NetworkOuterClass.PeerInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PeerInfo>\n        PARSER = new com.google.protobuf.AbstractParser<PeerInfo>() {\n      @java.lang.Override\n      public PeerInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PeerInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PeerInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.PeerInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ConnectionInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ConnectionInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Total number of connections.\n     * </pre>\n     *\n     * <code>uint64 connections = 1 [json_name = \"connections\"];</code>\n     * @return The connections.\n     */\n    long getConnections();\n\n    /**\n     * <pre>\n     * Number of inbound connections.\n     * </pre>\n     *\n     * <code>uint64 inbound_connections = 2 [json_name = \"inboundConnections\"];</code>\n     * @return The inboundConnections.\n     */\n    long getInboundConnections();\n\n    /**\n     * <pre>\n     * Number of outbound connections.\n     * </pre>\n     *\n     * <code>uint64 outbound_connections = 3 [json_name = \"outboundConnections\"];</code>\n     * @return The outboundConnections.\n     */\n    long getOutboundConnections();\n  }\n  /**\n   * <pre>\n   * ConnectionInfo contains information about the node's connections.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ConnectionInfo}\n   */\n  public static final class ConnectionInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ConnectionInfo)\n      ConnectionInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ConnectionInfo\");\n    }\n    // Use ConnectionInfo.newBuilder() to construct.\n    private ConnectionInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ConnectionInfo() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.ConnectionInfo.class, pactus.NetworkOuterClass.ConnectionInfo.Builder.class);\n    }\n\n    public static final int CONNECTIONS_FIELD_NUMBER = 1;\n    private long connections_ = 0L;\n    /**\n     * <pre>\n     * Total number of connections.\n     * </pre>\n     *\n     * <code>uint64 connections = 1 [json_name = \"connections\"];</code>\n     * @return The connections.\n     */\n    @java.lang.Override\n    public long getConnections() {\n      return connections_;\n    }\n\n    public static final int INBOUND_CONNECTIONS_FIELD_NUMBER = 2;\n    private long inboundConnections_ = 0L;\n    /**\n     * <pre>\n     * Number of inbound connections.\n     * </pre>\n     *\n     * <code>uint64 inbound_connections = 2 [json_name = \"inboundConnections\"];</code>\n     * @return The inboundConnections.\n     */\n    @java.lang.Override\n    public long getInboundConnections() {\n      return inboundConnections_;\n    }\n\n    public static final int OUTBOUND_CONNECTIONS_FIELD_NUMBER = 3;\n    private long outboundConnections_ = 0L;\n    /**\n     * <pre>\n     * Number of outbound connections.\n     * </pre>\n     *\n     * <code>uint64 outbound_connections = 3 [json_name = \"outboundConnections\"];</code>\n     * @return The outboundConnections.\n     */\n    @java.lang.Override\n    public long getOutboundConnections() {\n      return outboundConnections_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (connections_ != 0L) {\n        output.writeUInt64(1, connections_);\n      }\n      if (inboundConnections_ != 0L) {\n        output.writeUInt64(2, inboundConnections_);\n      }\n      if (outboundConnections_ != 0L) {\n        output.writeUInt64(3, outboundConnections_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (connections_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(1, connections_);\n      }\n      if (inboundConnections_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(2, inboundConnections_);\n      }\n      if (outboundConnections_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(3, outboundConnections_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.ConnectionInfo)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.ConnectionInfo other = (pactus.NetworkOuterClass.ConnectionInfo) obj;\n\n      if (getConnections()\n          != other.getConnections()) return false;\n      if (getInboundConnections()\n          != other.getInboundConnections()) return false;\n      if (getOutboundConnections()\n          != other.getOutboundConnections()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getConnections());\n      hash = (37 * hash) + INBOUND_CONNECTIONS_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getInboundConnections());\n      hash = (37 * hash) + OUTBOUND_CONNECTIONS_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getOutboundConnections());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.ConnectionInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.ConnectionInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.ConnectionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.ConnectionInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * ConnectionInfo contains information about the node's connections.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ConnectionInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ConnectionInfo)\n        pactus.NetworkOuterClass.ConnectionInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.ConnectionInfo.class, pactus.NetworkOuterClass.ConnectionInfo.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.ConnectionInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        connections_ = 0L;\n        inboundConnections_ = 0L;\n        outboundConnections_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ConnectionInfo build() {\n        pactus.NetworkOuterClass.ConnectionInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.ConnectionInfo buildPartial() {\n        pactus.NetworkOuterClass.ConnectionInfo result = new pactus.NetworkOuterClass.ConnectionInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.ConnectionInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.connections_ = connections_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.inboundConnections_ = inboundConnections_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.outboundConnections_ = outboundConnections_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.ConnectionInfo) {\n          return mergeFrom((pactus.NetworkOuterClass.ConnectionInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.ConnectionInfo other) {\n        if (other == pactus.NetworkOuterClass.ConnectionInfo.getDefaultInstance()) return this;\n        if (other.getConnections() != 0L) {\n          setConnections(other.getConnections());\n        }\n        if (other.getInboundConnections() != 0L) {\n          setInboundConnections(other.getInboundConnections());\n        }\n        if (other.getOutboundConnections() != 0L) {\n          setOutboundConnections(other.getOutboundConnections());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                connections_ = input.readUInt64();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                inboundConnections_ = input.readUInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 24: {\n                outboundConnections_ = input.readUInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private long connections_ ;\n      /**\n       * <pre>\n       * Total number of connections.\n       * </pre>\n       *\n       * <code>uint64 connections = 1 [json_name = \"connections\"];</code>\n       * @return The connections.\n       */\n      @java.lang.Override\n      public long getConnections() {\n        return connections_;\n      }\n      /**\n       * <pre>\n       * Total number of connections.\n       * </pre>\n       *\n       * <code>uint64 connections = 1 [json_name = \"connections\"];</code>\n       * @param value The connections to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConnections(long value) {\n\n        connections_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of connections.\n       * </pre>\n       *\n       * <code>uint64 connections = 1 [json_name = \"connections\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConnections() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        connections_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long inboundConnections_ ;\n      /**\n       * <pre>\n       * Number of inbound connections.\n       * </pre>\n       *\n       * <code>uint64 inbound_connections = 2 [json_name = \"inboundConnections\"];</code>\n       * @return The inboundConnections.\n       */\n      @java.lang.Override\n      public long getInboundConnections() {\n        return inboundConnections_;\n      }\n      /**\n       * <pre>\n       * Number of inbound connections.\n       * </pre>\n       *\n       * <code>uint64 inbound_connections = 2 [json_name = \"inboundConnections\"];</code>\n       * @param value The inboundConnections to set.\n       * @return This builder for chaining.\n       */\n      public Builder setInboundConnections(long value) {\n\n        inboundConnections_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of inbound connections.\n       * </pre>\n       *\n       * <code>uint64 inbound_connections = 2 [json_name = \"inboundConnections\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearInboundConnections() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        inboundConnections_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long outboundConnections_ ;\n      /**\n       * <pre>\n       * Number of outbound connections.\n       * </pre>\n       *\n       * <code>uint64 outbound_connections = 3 [json_name = \"outboundConnections\"];</code>\n       * @return The outboundConnections.\n       */\n      @java.lang.Override\n      public long getOutboundConnections() {\n        return outboundConnections_;\n      }\n      /**\n       * <pre>\n       * Number of outbound connections.\n       * </pre>\n       *\n       * <code>uint64 outbound_connections = 3 [json_name = \"outboundConnections\"];</code>\n       * @param value The outboundConnections to set.\n       * @return This builder for chaining.\n       */\n      public Builder setOutboundConnections(long value) {\n\n        outboundConnections_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of outbound connections.\n       * </pre>\n       *\n       * <code>uint64 outbound_connections = 3 [json_name = \"outboundConnections\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearOutboundConnections() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        outboundConnections_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ConnectionInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ConnectionInfo)\n    private static final pactus.NetworkOuterClass.ConnectionInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.ConnectionInfo();\n    }\n\n    public static pactus.NetworkOuterClass.ConnectionInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ConnectionInfo>\n        PARSER = new com.google.protobuf.AbstractParser<ConnectionInfo>() {\n      @java.lang.Override\n      public ConnectionInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ConnectionInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ConnectionInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface MetricInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.MetricInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     * @return Whether the totalInvalid field is set.\n     */\n    boolean hasTotalInvalid();\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     * @return The totalInvalid.\n     */\n    pactus.NetworkOuterClass.CounterInfo getTotalInvalid();\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     */\n    pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalInvalidOrBuilder();\n\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     * @return Whether the totalSent field is set.\n     */\n    boolean hasTotalSent();\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     * @return The totalSent.\n     */\n    pactus.NetworkOuterClass.CounterInfo getTotalSent();\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     */\n    pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalSentOrBuilder();\n\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     * @return Whether the totalReceived field is set.\n     */\n    boolean hasTotalReceived();\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     * @return The totalReceived.\n     */\n    pactus.NetworkOuterClass.CounterInfo getTotalReceived();\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     */\n    pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalReceivedOrBuilder();\n\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    int getMessageSentCount();\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    boolean containsMessageSent(\n        int key);\n    /**\n     * Use {@link #getMessageSentMap()} instead.\n     */\n    @java.lang.Deprecated\n    java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    getMessageSent();\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    getMessageSentMap();\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageSentOrDefault(\n        int key,\n        /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue);\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    pactus.NetworkOuterClass.CounterInfo getMessageSentOrThrow(\n        int key);\n\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    int getMessageReceivedCount();\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    boolean containsMessageReceived(\n        int key);\n    /**\n     * Use {@link #getMessageReceivedMap()} instead.\n     */\n    @java.lang.Deprecated\n    java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    getMessageReceived();\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    getMessageReceivedMap();\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageReceivedOrDefault(\n        int key,\n        /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue);\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    pactus.NetworkOuterClass.CounterInfo getMessageReceivedOrThrow(\n        int key);\n  }\n  /**\n   * <pre>\n   * MetricInfo contains metrics data regarding network activity.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.MetricInfo}\n   */\n  public static final class MetricInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.MetricInfo)\n      MetricInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"MetricInfo\");\n    }\n    // Use MetricInfo.newBuilder() to construct.\n    private MetricInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private MetricInfo() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_descriptor;\n    }\n\n    @SuppressWarnings({\"rawtypes\"})\n    @java.lang.Override\n    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(\n        int number) {\n      switch (number) {\n        case 4:\n          return internalGetMessageSent();\n        case 5:\n          return internalGetMessageReceived();\n        default:\n          throw new RuntimeException(\n              \"Invalid map field number: \" + number);\n      }\n    }\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.MetricInfo.class, pactus.NetworkOuterClass.MetricInfo.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int TOTAL_INVALID_FIELD_NUMBER = 1;\n    private pactus.NetworkOuterClass.CounterInfo totalInvalid_;\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     * @return Whether the totalInvalid field is set.\n     */\n    @java.lang.Override\n    public boolean hasTotalInvalid() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     * @return The totalInvalid.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getTotalInvalid() {\n      return totalInvalid_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalInvalid_;\n    }\n    /**\n     * <pre>\n     * Total number of invalid bundles.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalInvalidOrBuilder() {\n      return totalInvalid_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalInvalid_;\n    }\n\n    public static final int TOTAL_SENT_FIELD_NUMBER = 2;\n    private pactus.NetworkOuterClass.CounterInfo totalSent_;\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     * @return Whether the totalSent field is set.\n     */\n    @java.lang.Override\n    public boolean hasTotalSent() {\n      return ((bitField0_ & 0x00000002) != 0);\n    }\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     * @return The totalSent.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getTotalSent() {\n      return totalSent_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalSent_;\n    }\n    /**\n     * <pre>\n     * Total number of bundles sent.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalSentOrBuilder() {\n      return totalSent_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalSent_;\n    }\n\n    public static final int TOTAL_RECEIVED_FIELD_NUMBER = 3;\n    private pactus.NetworkOuterClass.CounterInfo totalReceived_;\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     * @return Whether the totalReceived field is set.\n     */\n    @java.lang.Override\n    public boolean hasTotalReceived() {\n      return ((bitField0_ & 0x00000004) != 0);\n    }\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     * @return The totalReceived.\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getTotalReceived() {\n      return totalReceived_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalReceived_;\n    }\n    /**\n     * <pre>\n     * Total number of bundles received.\n     * </pre>\n     *\n     * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalReceivedOrBuilder() {\n      return totalReceived_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalReceived_;\n    }\n\n    public static final int MESSAGE_SENT_FIELD_NUMBER = 4;\n    private static final class MessageSentDefaultEntryHolder {\n      static final com.google.protobuf.MapEntry<\n          java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> defaultEntry =\n              com.google.protobuf.MapEntry\n              .<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>newDefaultInstance(\n                  pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_MessageSentEntry_descriptor, \n                  com.google.protobuf.WireFormat.FieldType.INT32,\n                  0,\n                  com.google.protobuf.WireFormat.FieldType.MESSAGE,\n                  pactus.NetworkOuterClass.CounterInfo.getDefaultInstance());\n    }\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.MapField<\n        java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> messageSent_;\n    private com.google.protobuf.MapField<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    internalGetMessageSent() {\n      if (messageSent_ == null) {\n        return com.google.protobuf.MapField.emptyMapField(\n            MessageSentDefaultEntryHolder.defaultEntry);\n      }\n      return messageSent_;\n    }\n    public int getMessageSentCount() {\n      return internalGetMessageSent().getMap().size();\n    }\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    @java.lang.Override\n    public boolean containsMessageSent(\n        int key) {\n\n      return internalGetMessageSent().getMap().containsKey(key);\n    }\n    /**\n     * Use {@link #getMessageSentMap()} instead.\n     */\n    @java.lang.Override\n    @java.lang.Deprecated\n    public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageSent() {\n      return getMessageSentMap();\n    }\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    @java.lang.Override\n    public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageSentMap() {\n      return internalGetMessageSent().getMap();\n    }\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    @java.lang.Override\n    public /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageSentOrDefault(\n        int key,\n        /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue) {\n\n      java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> map =\n          internalGetMessageSent().getMap();\n      return map.containsKey(key) ? map.get(key) : defaultValue;\n    }\n    /**\n     * <pre>\n     * Number of sent bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getMessageSentOrThrow(\n        int key) {\n\n      java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> map =\n          internalGetMessageSent().getMap();\n      if (!map.containsKey(key)) {\n        throw new java.lang.IllegalArgumentException();\n      }\n      return map.get(key);\n    }\n\n    public static final int MESSAGE_RECEIVED_FIELD_NUMBER = 5;\n    private static final class MessageReceivedDefaultEntryHolder {\n      static final com.google.protobuf.MapEntry<\n          java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> defaultEntry =\n              com.google.protobuf.MapEntry\n              .<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>newDefaultInstance(\n                  pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_MessageReceivedEntry_descriptor, \n                  com.google.protobuf.WireFormat.FieldType.INT32,\n                  0,\n                  com.google.protobuf.WireFormat.FieldType.MESSAGE,\n                  pactus.NetworkOuterClass.CounterInfo.getDefaultInstance());\n    }\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.MapField<\n        java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> messageReceived_;\n    private com.google.protobuf.MapField<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n    internalGetMessageReceived() {\n      if (messageReceived_ == null) {\n        return com.google.protobuf.MapField.emptyMapField(\n            MessageReceivedDefaultEntryHolder.defaultEntry);\n      }\n      return messageReceived_;\n    }\n    public int getMessageReceivedCount() {\n      return internalGetMessageReceived().getMap().size();\n    }\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    @java.lang.Override\n    public boolean containsMessageReceived(\n        int key) {\n\n      return internalGetMessageReceived().getMap().containsKey(key);\n    }\n    /**\n     * Use {@link #getMessageReceivedMap()} instead.\n     */\n    @java.lang.Override\n    @java.lang.Deprecated\n    public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageReceived() {\n      return getMessageReceivedMap();\n    }\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    @java.lang.Override\n    public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageReceivedMap() {\n      return internalGetMessageReceived().getMap();\n    }\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    @java.lang.Override\n    public /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageReceivedOrDefault(\n        int key,\n        /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue) {\n\n      java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> map =\n          internalGetMessageReceived().getMap();\n      return map.containsKey(key) ? map.get(key) : defaultValue;\n    }\n    /**\n     * <pre>\n     * Number of received bundles categorized by message type.\n     * </pre>\n     *\n     * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n     */\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getMessageReceivedOrThrow(\n        int key) {\n\n      java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> map =\n          internalGetMessageReceived().getMap();\n      if (!map.containsKey(key)) {\n        throw new java.lang.IllegalArgumentException();\n      }\n      return map.get(key);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(1, getTotalInvalid());\n      }\n      if (((bitField0_ & 0x00000002) != 0)) {\n        output.writeMessage(2, getTotalSent());\n      }\n      if (((bitField0_ & 0x00000004) != 0)) {\n        output.writeMessage(3, getTotalReceived());\n      }\n      com.google.protobuf.GeneratedMessage\n        .serializeIntegerMapTo(\n          output,\n          internalGetMessageSent(),\n          MessageSentDefaultEntryHolder.defaultEntry,\n          4);\n      com.google.protobuf.GeneratedMessage\n        .serializeIntegerMapTo(\n          output,\n          internalGetMessageReceived(),\n          MessageReceivedDefaultEntryHolder.defaultEntry,\n          5);\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, getTotalInvalid());\n      }\n      if (((bitField0_ & 0x00000002) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, getTotalSent());\n      }\n      if (((bitField0_ & 0x00000004) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(3, getTotalReceived());\n      }\n      for (java.util.Map.Entry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> entry\n           : internalGetMessageSent().getMap().entrySet()) {\n        com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n        messageSent__ = MessageSentDefaultEntryHolder.defaultEntry.newBuilderForType()\n            .setKey(entry.getKey())\n            .setValue(entry.getValue())\n            .build();\n        size += com.google.protobuf.CodedOutputStream\n            .computeMessageSize(4, messageSent__);\n      }\n      for (java.util.Map.Entry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> entry\n           : internalGetMessageReceived().getMap().entrySet()) {\n        com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n        messageReceived__ = MessageReceivedDefaultEntryHolder.defaultEntry.newBuilderForType()\n            .setKey(entry.getKey())\n            .setValue(entry.getValue())\n            .build();\n        size += com.google.protobuf.CodedOutputStream\n            .computeMessageSize(5, messageReceived__);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.MetricInfo)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.MetricInfo other = (pactus.NetworkOuterClass.MetricInfo) obj;\n\n      if (hasTotalInvalid() != other.hasTotalInvalid()) return false;\n      if (hasTotalInvalid()) {\n        if (!getTotalInvalid()\n            .equals(other.getTotalInvalid())) return false;\n      }\n      if (hasTotalSent() != other.hasTotalSent()) return false;\n      if (hasTotalSent()) {\n        if (!getTotalSent()\n            .equals(other.getTotalSent())) return false;\n      }\n      if (hasTotalReceived() != other.hasTotalReceived()) return false;\n      if (hasTotalReceived()) {\n        if (!getTotalReceived()\n            .equals(other.getTotalReceived())) return false;\n      }\n      if (!internalGetMessageSent().equals(\n          other.internalGetMessageSent())) return false;\n      if (!internalGetMessageReceived().equals(\n          other.internalGetMessageReceived())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (hasTotalInvalid()) {\n        hash = (37 * hash) + TOTAL_INVALID_FIELD_NUMBER;\n        hash = (53 * hash) + getTotalInvalid().hashCode();\n      }\n      if (hasTotalSent()) {\n        hash = (37 * hash) + TOTAL_SENT_FIELD_NUMBER;\n        hash = (53 * hash) + getTotalSent().hashCode();\n      }\n      if (hasTotalReceived()) {\n        hash = (37 * hash) + TOTAL_RECEIVED_FIELD_NUMBER;\n        hash = (53 * hash) + getTotalReceived().hashCode();\n      }\n      if (!internalGetMessageSent().getMap().isEmpty()) {\n        hash = (37 * hash) + MESSAGE_SENT_FIELD_NUMBER;\n        hash = (53 * hash) + internalGetMessageSent().hashCode();\n      }\n      if (!internalGetMessageReceived().getMap().isEmpty()) {\n        hash = (37 * hash) + MESSAGE_RECEIVED_FIELD_NUMBER;\n        hash = (53 * hash) + internalGetMessageReceived().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.MetricInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.MetricInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.MetricInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.MetricInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * MetricInfo contains metrics data regarding network activity.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.MetricInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.MetricInfo)\n        pactus.NetworkOuterClass.MetricInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_descriptor;\n      }\n\n      @SuppressWarnings({\"rawtypes\"})\n      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(\n          int number) {\n        switch (number) {\n          case 4:\n            return internalGetMessageSent();\n          case 5:\n            return internalGetMessageReceived();\n          default:\n            throw new RuntimeException(\n                \"Invalid map field number: \" + number);\n        }\n      }\n      @SuppressWarnings({\"rawtypes\"})\n      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(\n          int number) {\n        switch (number) {\n          case 4:\n            return internalGetMutableMessageSent();\n          case 5:\n            return internalGetMutableMessageReceived();\n          default:\n            throw new RuntimeException(\n                \"Invalid map field number: \" + number);\n        }\n      }\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.MetricInfo.class, pactus.NetworkOuterClass.MetricInfo.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.MetricInfo.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetTotalInvalidFieldBuilder();\n          internalGetTotalSentFieldBuilder();\n          internalGetTotalReceivedFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        totalInvalid_ = null;\n        if (totalInvalidBuilder_ != null) {\n          totalInvalidBuilder_.dispose();\n          totalInvalidBuilder_ = null;\n        }\n        totalSent_ = null;\n        if (totalSentBuilder_ != null) {\n          totalSentBuilder_.dispose();\n          totalSentBuilder_ = null;\n        }\n        totalReceived_ = null;\n        if (totalReceivedBuilder_ != null) {\n          totalReceivedBuilder_.dispose();\n          totalReceivedBuilder_ = null;\n        }\n        internalGetMutableMessageSent().clear();\n        internalGetMutableMessageReceived().clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_MetricInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.MetricInfo getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.MetricInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.MetricInfo build() {\n        pactus.NetworkOuterClass.MetricInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.MetricInfo buildPartial() {\n        pactus.NetworkOuterClass.MetricInfo result = new pactus.NetworkOuterClass.MetricInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.MetricInfo result) {\n        int from_bitField0_ = bitField0_;\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.totalInvalid_ = totalInvalidBuilder_ == null\n              ? totalInvalid_\n              : totalInvalidBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.totalSent_ = totalSentBuilder_ == null\n              ? totalSent_\n              : totalSentBuilder_.build();\n          to_bitField0_ |= 0x00000002;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.totalReceived_ = totalReceivedBuilder_ == null\n              ? totalReceived_\n              : totalReceivedBuilder_.build();\n          to_bitField0_ |= 0x00000004;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.messageSent_ = internalGetMessageSent().build(MessageSentDefaultEntryHolder.defaultEntry);\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.messageReceived_ = internalGetMessageReceived().build(MessageReceivedDefaultEntryHolder.defaultEntry);\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.MetricInfo) {\n          return mergeFrom((pactus.NetworkOuterClass.MetricInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.MetricInfo other) {\n        if (other == pactus.NetworkOuterClass.MetricInfo.getDefaultInstance()) return this;\n        if (other.hasTotalInvalid()) {\n          mergeTotalInvalid(other.getTotalInvalid());\n        }\n        if (other.hasTotalSent()) {\n          mergeTotalSent(other.getTotalSent());\n        }\n        if (other.hasTotalReceived()) {\n          mergeTotalReceived(other.getTotalReceived());\n        }\n        internalGetMutableMessageSent().mergeFrom(\n            other.internalGetMessageSent());\n        bitField0_ |= 0x00000008;\n        internalGetMutableMessageReceived().mergeFrom(\n            other.internalGetMessageReceived());\n        bitField0_ |= 0x00000010;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                input.readMessage(\n                    internalGetTotalInvalidFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                input.readMessage(\n                    internalGetTotalSentFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                input.readMessage(\n                    internalGetTotalReceivedFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n                messageSent__ = input.readMessage(\n                    MessageSentDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);\n                internalGetMutableMessageSent().ensureBuilderMap().put(\n                    messageSent__.getKey(), messageSent__.getValue());\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              case 42: {\n                com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n                messageReceived__ = input.readMessage(\n                    MessageReceivedDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);\n                internalGetMutableMessageReceived().ensureBuilderMap().put(\n                    messageReceived__.getKey(), messageReceived__.getValue());\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private pactus.NetworkOuterClass.CounterInfo totalInvalid_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> totalInvalidBuilder_;\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       * @return Whether the totalInvalid field is set.\n       */\n      public boolean hasTotalInvalid() {\n        return ((bitField0_ & 0x00000001) != 0);\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       * @return The totalInvalid.\n       */\n      public pactus.NetworkOuterClass.CounterInfo getTotalInvalid() {\n        if (totalInvalidBuilder_ == null) {\n          return totalInvalid_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalInvalid_;\n        } else {\n          return totalInvalidBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public Builder setTotalInvalid(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalInvalidBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          totalInvalid_ = value;\n        } else {\n          totalInvalidBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public Builder setTotalInvalid(\n          pactus.NetworkOuterClass.CounterInfo.Builder builderForValue) {\n        if (totalInvalidBuilder_ == null) {\n          totalInvalid_ = builderForValue.build();\n        } else {\n          totalInvalidBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public Builder mergeTotalInvalid(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalInvalidBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0) &&\n            totalInvalid_ != null &&\n            totalInvalid_ != pactus.NetworkOuterClass.CounterInfo.getDefaultInstance()) {\n            getTotalInvalidBuilder().mergeFrom(value);\n          } else {\n            totalInvalid_ = value;\n          }\n        } else {\n          totalInvalidBuilder_.mergeFrom(value);\n        }\n        if (totalInvalid_ != null) {\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public Builder clearTotalInvalid() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        totalInvalid_ = null;\n        if (totalInvalidBuilder_ != null) {\n          totalInvalidBuilder_.dispose();\n          totalInvalidBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfo.Builder getTotalInvalidBuilder() {\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return internalGetTotalInvalidFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalInvalidOrBuilder() {\n        if (totalInvalidBuilder_ != null) {\n          return totalInvalidBuilder_.getMessageOrBuilder();\n        } else {\n          return totalInvalid_ == null ?\n              pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalInvalid_;\n        }\n      }\n      /**\n       * <pre>\n       * Total number of invalid bundles.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_invalid = 1 [json_name = \"totalInvalid\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> \n          internalGetTotalInvalidFieldBuilder() {\n        if (totalInvalidBuilder_ == null) {\n          totalInvalidBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder>(\n                  getTotalInvalid(),\n                  getParentForChildren(),\n                  isClean());\n          totalInvalid_ = null;\n        }\n        return totalInvalidBuilder_;\n      }\n\n      private pactus.NetworkOuterClass.CounterInfo totalSent_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> totalSentBuilder_;\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       * @return Whether the totalSent field is set.\n       */\n      public boolean hasTotalSent() {\n        return ((bitField0_ & 0x00000002) != 0);\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       * @return The totalSent.\n       */\n      public pactus.NetworkOuterClass.CounterInfo getTotalSent() {\n        if (totalSentBuilder_ == null) {\n          return totalSent_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalSent_;\n        } else {\n          return totalSentBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public Builder setTotalSent(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalSentBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          totalSent_ = value;\n        } else {\n          totalSentBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public Builder setTotalSent(\n          pactus.NetworkOuterClass.CounterInfo.Builder builderForValue) {\n        if (totalSentBuilder_ == null) {\n          totalSent_ = builderForValue.build();\n        } else {\n          totalSentBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public Builder mergeTotalSent(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalSentBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0) &&\n            totalSent_ != null &&\n            totalSent_ != pactus.NetworkOuterClass.CounterInfo.getDefaultInstance()) {\n            getTotalSentBuilder().mergeFrom(value);\n          } else {\n            totalSent_ = value;\n          }\n        } else {\n          totalSentBuilder_.mergeFrom(value);\n        }\n        if (totalSent_ != null) {\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public Builder clearTotalSent() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        totalSent_ = null;\n        if (totalSentBuilder_ != null) {\n          totalSentBuilder_.dispose();\n          totalSentBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfo.Builder getTotalSentBuilder() {\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return internalGetTotalSentFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalSentOrBuilder() {\n        if (totalSentBuilder_ != null) {\n          return totalSentBuilder_.getMessageOrBuilder();\n        } else {\n          return totalSent_ == null ?\n              pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalSent_;\n        }\n      }\n      /**\n       * <pre>\n       * Total number of bundles sent.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_sent = 2 [json_name = \"totalSent\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> \n          internalGetTotalSentFieldBuilder() {\n        if (totalSentBuilder_ == null) {\n          totalSentBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder>(\n                  getTotalSent(),\n                  getParentForChildren(),\n                  isClean());\n          totalSent_ = null;\n        }\n        return totalSentBuilder_;\n      }\n\n      private pactus.NetworkOuterClass.CounterInfo totalReceived_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> totalReceivedBuilder_;\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       * @return Whether the totalReceived field is set.\n       */\n      public boolean hasTotalReceived() {\n        return ((bitField0_ & 0x00000004) != 0);\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       * @return The totalReceived.\n       */\n      public pactus.NetworkOuterClass.CounterInfo getTotalReceived() {\n        if (totalReceivedBuilder_ == null) {\n          return totalReceived_ == null ? pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalReceived_;\n        } else {\n          return totalReceivedBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public Builder setTotalReceived(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalReceivedBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          totalReceived_ = value;\n        } else {\n          totalReceivedBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public Builder setTotalReceived(\n          pactus.NetworkOuterClass.CounterInfo.Builder builderForValue) {\n        if (totalReceivedBuilder_ == null) {\n          totalReceived_ = builderForValue.build();\n        } else {\n          totalReceivedBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public Builder mergeTotalReceived(pactus.NetworkOuterClass.CounterInfo value) {\n        if (totalReceivedBuilder_ == null) {\n          if (((bitField0_ & 0x00000004) != 0) &&\n            totalReceived_ != null &&\n            totalReceived_ != pactus.NetworkOuterClass.CounterInfo.getDefaultInstance()) {\n            getTotalReceivedBuilder().mergeFrom(value);\n          } else {\n            totalReceived_ = value;\n          }\n        } else {\n          totalReceivedBuilder_.mergeFrom(value);\n        }\n        if (totalReceived_ != null) {\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public Builder clearTotalReceived() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        totalReceived_ = null;\n        if (totalReceivedBuilder_ != null) {\n          totalReceivedBuilder_.dispose();\n          totalReceivedBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfo.Builder getTotalReceivedBuilder() {\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return internalGetTotalReceivedFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfoOrBuilder getTotalReceivedOrBuilder() {\n        if (totalReceivedBuilder_ != null) {\n          return totalReceivedBuilder_.getMessageOrBuilder();\n        } else {\n          return totalReceived_ == null ?\n              pactus.NetworkOuterClass.CounterInfo.getDefaultInstance() : totalReceived_;\n        }\n      }\n      /**\n       * <pre>\n       * Total number of bundles received.\n       * </pre>\n       *\n       * <code>.pactus.CounterInfo total_received = 3 [json_name = \"totalReceived\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder> \n          internalGetTotalReceivedFieldBuilder() {\n        if (totalReceivedBuilder_ == null) {\n          totalReceivedBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder, pactus.NetworkOuterClass.CounterInfoOrBuilder>(\n                  getTotalReceived(),\n                  getParentForChildren(),\n                  isClean());\n          totalReceived_ = null;\n        }\n        return totalReceivedBuilder_;\n      }\n\n      private static final class MessageSentConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo> {\n        @java.lang.Override\n        public pactus.NetworkOuterClass.CounterInfo build(pactus.NetworkOuterClass.CounterInfoOrBuilder val) {\n          if (val instanceof pactus.NetworkOuterClass.CounterInfo) { return (pactus.NetworkOuterClass.CounterInfo) val; }\n          return ((pactus.NetworkOuterClass.CounterInfo.Builder) val).build();\n        }\n\n        @java.lang.Override\n        public com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> defaultEntry() {\n          return MessageSentDefaultEntryHolder.defaultEntry;\n        }\n      };\n      private static final MessageSentConverter messageSentConverter = new MessageSentConverter();\n\n      private com.google.protobuf.MapFieldBuilder<\n          java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder> messageSent_;\n      private com.google.protobuf.MapFieldBuilder<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder>\n          internalGetMessageSent() {\n        if (messageSent_ == null) {\n          return new com.google.protobuf.MapFieldBuilder<>(messageSentConverter);\n        }\n        return messageSent_;\n      }\n      private com.google.protobuf.MapFieldBuilder<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder>\n          internalGetMutableMessageSent() {\n        if (messageSent_ == null) {\n          messageSent_ = new com.google.protobuf.MapFieldBuilder<>(messageSentConverter);\n        }\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return messageSent_;\n      }\n      public int getMessageSentCount() {\n        return internalGetMessageSent().ensureBuilderMap().size();\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      @java.lang.Override\n      public boolean containsMessageSent(\n          int key) {\n\n        return internalGetMessageSent().ensureBuilderMap().containsKey(key);\n      }\n      /**\n       * Use {@link #getMessageSentMap()} instead.\n       */\n      @java.lang.Override\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageSent() {\n        return getMessageSentMap();\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      @java.lang.Override\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageSentMap() {\n        return internalGetMessageSent().getImmutableMap();\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      @java.lang.Override\n      public /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageSentOrDefault(\n          int key,\n          /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue) {\n\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> map = internalGetMutableMessageSent().ensureBuilderMap();\n        return map.containsKey(key) ? messageSentConverter.build(map.get(key)) : defaultValue;\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      @java.lang.Override\n      public pactus.NetworkOuterClass.CounterInfo getMessageSentOrThrow(\n          int key) {\n\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> map = internalGetMutableMessageSent().ensureBuilderMap();\n        if (!map.containsKey(key)) {\n          throw new java.lang.IllegalArgumentException();\n        }\n        return messageSentConverter.build(map.get(key));\n      }\n      public Builder clearMessageSent() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        internalGetMutableMessageSent().clear();\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      public Builder removeMessageSent(\n          int key) {\n\n        internalGetMutableMessageSent().ensureBuilderMap()\n            .remove(key);\n        return this;\n      }\n      /**\n       * Use alternate mutation accessors instead.\n       */\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n          getMutableMessageSent() {\n        bitField0_ |= 0x00000008;\n        return internalGetMutableMessageSent().ensureMessageMap();\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      public Builder putMessageSent(\n          int key,\n          pactus.NetworkOuterClass.CounterInfo value) {\n\n        if (value == null) { throw new NullPointerException(\"map value\"); }\n        internalGetMutableMessageSent().ensureBuilderMap()\n            .put(key, value);\n        bitField0_ |= 0x00000008;\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      public Builder putAllMessageSent(\n          java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> values) {\n        for (java.util.Map.Entry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> e : values.entrySet()) {\n          if (e.getKey() == null || e.getValue() == null) {\n            throw new NullPointerException();\n          }\n        }\n        internalGetMutableMessageSent().ensureBuilderMap()\n            .putAll(values);\n        bitField0_ |= 0x00000008;\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of sent bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_sent = 4 [json_name = \"messageSent\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfo.Builder putMessageSentBuilderIfAbsent(\n          int key) {\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> builderMap = internalGetMutableMessageSent().ensureBuilderMap();\n        pactus.NetworkOuterClass.CounterInfoOrBuilder entry = builderMap.get(key);\n        if (entry == null) {\n          entry = pactus.NetworkOuterClass.CounterInfo.newBuilder();\n          builderMap.put(key, entry);\n        }\n        if (entry instanceof pactus.NetworkOuterClass.CounterInfo) {\n          entry = ((pactus.NetworkOuterClass.CounterInfo) entry).toBuilder();\n          builderMap.put(key, entry);\n        }\n        return (pactus.NetworkOuterClass.CounterInfo.Builder) entry;\n      }\n\n      private static final class MessageReceivedConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo> {\n        @java.lang.Override\n        public pactus.NetworkOuterClass.CounterInfo build(pactus.NetworkOuterClass.CounterInfoOrBuilder val) {\n          if (val instanceof pactus.NetworkOuterClass.CounterInfo) { return (pactus.NetworkOuterClass.CounterInfo) val; }\n          return ((pactus.NetworkOuterClass.CounterInfo.Builder) val).build();\n        }\n\n        @java.lang.Override\n        public com.google.protobuf.MapEntry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> defaultEntry() {\n          return MessageReceivedDefaultEntryHolder.defaultEntry;\n        }\n      };\n      private static final MessageReceivedConverter messageReceivedConverter = new MessageReceivedConverter();\n\n      private com.google.protobuf.MapFieldBuilder<\n          java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder> messageReceived_;\n      private com.google.protobuf.MapFieldBuilder<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder>\n          internalGetMessageReceived() {\n        if (messageReceived_ == null) {\n          return new com.google.protobuf.MapFieldBuilder<>(messageReceivedConverter);\n        }\n        return messageReceived_;\n      }\n      private com.google.protobuf.MapFieldBuilder<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder, pactus.NetworkOuterClass.CounterInfo, pactus.NetworkOuterClass.CounterInfo.Builder>\n          internalGetMutableMessageReceived() {\n        if (messageReceived_ == null) {\n          messageReceived_ = new com.google.protobuf.MapFieldBuilder<>(messageReceivedConverter);\n        }\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return messageReceived_;\n      }\n      public int getMessageReceivedCount() {\n        return internalGetMessageReceived().ensureBuilderMap().size();\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      @java.lang.Override\n      public boolean containsMessageReceived(\n          int key) {\n\n        return internalGetMessageReceived().ensureBuilderMap().containsKey(key);\n      }\n      /**\n       * Use {@link #getMessageReceivedMap()} instead.\n       */\n      @java.lang.Override\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageReceived() {\n        return getMessageReceivedMap();\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      @java.lang.Override\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> getMessageReceivedMap() {\n        return internalGetMessageReceived().getImmutableMap();\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      @java.lang.Override\n      public /* nullable */\npactus.NetworkOuterClass.CounterInfo getMessageReceivedOrDefault(\n          int key,\n          /* nullable */\npactus.NetworkOuterClass.CounterInfo defaultValue) {\n\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> map = internalGetMutableMessageReceived().ensureBuilderMap();\n        return map.containsKey(key) ? messageReceivedConverter.build(map.get(key)) : defaultValue;\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      @java.lang.Override\n      public pactus.NetworkOuterClass.CounterInfo getMessageReceivedOrThrow(\n          int key) {\n\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> map = internalGetMutableMessageReceived().ensureBuilderMap();\n        if (!map.containsKey(key)) {\n          throw new java.lang.IllegalArgumentException();\n        }\n        return messageReceivedConverter.build(map.get(key));\n      }\n      public Builder clearMessageReceived() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        internalGetMutableMessageReceived().clear();\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      public Builder removeMessageReceived(\n          int key) {\n\n        internalGetMutableMessageReceived().ensureBuilderMap()\n            .remove(key);\n        return this;\n      }\n      /**\n       * Use alternate mutation accessors instead.\n       */\n      @java.lang.Deprecated\n      public java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo>\n          getMutableMessageReceived() {\n        bitField0_ |= 0x00000010;\n        return internalGetMutableMessageReceived().ensureMessageMap();\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      public Builder putMessageReceived(\n          int key,\n          pactus.NetworkOuterClass.CounterInfo value) {\n\n        if (value == null) { throw new NullPointerException(\"map value\"); }\n        internalGetMutableMessageReceived().ensureBuilderMap()\n            .put(key, value);\n        bitField0_ |= 0x00000010;\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      public Builder putAllMessageReceived(\n          java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> values) {\n        for (java.util.Map.Entry<java.lang.Integer, pactus.NetworkOuterClass.CounterInfo> e : values.entrySet()) {\n          if (e.getKey() == null || e.getValue() == null) {\n            throw new NullPointerException();\n          }\n        }\n        internalGetMutableMessageReceived().ensureBuilderMap()\n            .putAll(values);\n        bitField0_ |= 0x00000010;\n        return this;\n      }\n      /**\n       * <pre>\n       * Number of received bundles categorized by message type.\n       * </pre>\n       *\n       * <code>map&lt;int32, .pactus.CounterInfo&gt; message_received = 5 [json_name = \"messageReceived\"];</code>\n       */\n      public pactus.NetworkOuterClass.CounterInfo.Builder putMessageReceivedBuilderIfAbsent(\n          int key) {\n        java.util.Map<java.lang.Integer, pactus.NetworkOuterClass.CounterInfoOrBuilder> builderMap = internalGetMutableMessageReceived().ensureBuilderMap();\n        pactus.NetworkOuterClass.CounterInfoOrBuilder entry = builderMap.get(key);\n        if (entry == null) {\n          entry = pactus.NetworkOuterClass.CounterInfo.newBuilder();\n          builderMap.put(key, entry);\n        }\n        if (entry instanceof pactus.NetworkOuterClass.CounterInfo) {\n          entry = ((pactus.NetworkOuterClass.CounterInfo) entry).toBuilder();\n          builderMap.put(key, entry);\n        }\n        return (pactus.NetworkOuterClass.CounterInfo.Builder) entry;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.MetricInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.MetricInfo)\n    private static final pactus.NetworkOuterClass.MetricInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.MetricInfo();\n    }\n\n    public static pactus.NetworkOuterClass.MetricInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<MetricInfo>\n        PARSER = new com.google.protobuf.AbstractParser<MetricInfo>() {\n      @java.lang.Override\n      public MetricInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<MetricInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<MetricInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.MetricInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CounterInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CounterInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Total number of bytes.\n     * </pre>\n     *\n     * <code>uint64 bytes = 1 [json_name = \"bytes\"];</code>\n     * @return The bytes.\n     */\n    long getBytes();\n\n    /**\n     * <pre>\n     * Total number of bundles.\n     * </pre>\n     *\n     * <code>uint64 bundles = 2 [json_name = \"bundles\"];</code>\n     * @return The bundles.\n     */\n    long getBundles();\n  }\n  /**\n   * <pre>\n   * CounterInfo holds counter data regarding byte and bundle counts.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CounterInfo}\n   */\n  public static final class CounterInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CounterInfo)\n      CounterInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CounterInfo\");\n    }\n    // Use CounterInfo.newBuilder() to construct.\n    private CounterInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CounterInfo() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_CounterInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_CounterInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.CounterInfo.class, pactus.NetworkOuterClass.CounterInfo.Builder.class);\n    }\n\n    public static final int BYTES_FIELD_NUMBER = 1;\n    private long bytes_ = 0L;\n    /**\n     * <pre>\n     * Total number of bytes.\n     * </pre>\n     *\n     * <code>uint64 bytes = 1 [json_name = \"bytes\"];</code>\n     * @return The bytes.\n     */\n    @java.lang.Override\n    public long getBytes() {\n      return bytes_;\n    }\n\n    public static final int BUNDLES_FIELD_NUMBER = 2;\n    private long bundles_ = 0L;\n    /**\n     * <pre>\n     * Total number of bundles.\n     * </pre>\n     *\n     * <code>uint64 bundles = 2 [json_name = \"bundles\"];</code>\n     * @return The bundles.\n     */\n    @java.lang.Override\n    public long getBundles() {\n      return bundles_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (bytes_ != 0L) {\n        output.writeUInt64(1, bytes_);\n      }\n      if (bundles_ != 0L) {\n        output.writeUInt64(2, bundles_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (bytes_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(1, bytes_);\n      }\n      if (bundles_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt64Size(2, bundles_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.CounterInfo)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.CounterInfo other = (pactus.NetworkOuterClass.CounterInfo) obj;\n\n      if (getBytes()\n          != other.getBytes()) return false;\n      if (getBundles()\n          != other.getBundles()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + BYTES_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getBytes());\n      hash = (37 * hash) + BUNDLES_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getBundles());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.CounterInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.CounterInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.CounterInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.CounterInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * CounterInfo holds counter data regarding byte and bundle counts.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CounterInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CounterInfo)\n        pactus.NetworkOuterClass.CounterInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_CounterInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_CounterInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.CounterInfo.class, pactus.NetworkOuterClass.CounterInfo.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.CounterInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        bytes_ = 0L;\n        bundles_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_CounterInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.CounterInfo getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.CounterInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.CounterInfo build() {\n        pactus.NetworkOuterClass.CounterInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.CounterInfo buildPartial() {\n        pactus.NetworkOuterClass.CounterInfo result = new pactus.NetworkOuterClass.CounterInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.NetworkOuterClass.CounterInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.bytes_ = bytes_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.bundles_ = bundles_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.CounterInfo) {\n          return mergeFrom((pactus.NetworkOuterClass.CounterInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.CounterInfo other) {\n        if (other == pactus.NetworkOuterClass.CounterInfo.getDefaultInstance()) return this;\n        if (other.getBytes() != 0L) {\n          setBytes(other.getBytes());\n        }\n        if (other.getBundles() != 0L) {\n          setBundles(other.getBundles());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                bytes_ = input.readUInt64();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                bundles_ = input.readUInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private long bytes_ ;\n      /**\n       * <pre>\n       * Total number of bytes.\n       * </pre>\n       *\n       * <code>uint64 bytes = 1 [json_name = \"bytes\"];</code>\n       * @return The bytes.\n       */\n      @java.lang.Override\n      public long getBytes() {\n        return bytes_;\n      }\n      /**\n       * <pre>\n       * Total number of bytes.\n       * </pre>\n       *\n       * <code>uint64 bytes = 1 [json_name = \"bytes\"];</code>\n       * @param value The bytes to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBytes(long value) {\n\n        bytes_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bytes.\n       * </pre>\n       *\n       * <code>uint64 bytes = 1 [json_name = \"bytes\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBytes() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        bytes_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long bundles_ ;\n      /**\n       * <pre>\n       * Total number of bundles.\n       * </pre>\n       *\n       * <code>uint64 bundles = 2 [json_name = \"bundles\"];</code>\n       * @return The bundles.\n       */\n      @java.lang.Override\n      public long getBundles() {\n        return bundles_;\n      }\n      /**\n       * <pre>\n       * Total number of bundles.\n       * </pre>\n       *\n       * <code>uint64 bundles = 2 [json_name = \"bundles\"];</code>\n       * @param value The bundles to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBundles(long value) {\n\n        bundles_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Total number of bundles.\n       * </pre>\n       *\n       * <code>uint64 bundles = 2 [json_name = \"bundles\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBundles() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        bundles_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CounterInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CounterInfo)\n    private static final pactus.NetworkOuterClass.CounterInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.CounterInfo();\n    }\n\n    public static pactus.NetworkOuterClass.CounterInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CounterInfo>\n        PARSER = new com.google.protobuf.AbstractParser<CounterInfo>() {\n      @java.lang.Override\n      public CounterInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CounterInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CounterInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.CounterInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PingRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PingRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for ping - intentionally empty for measuring round-trip time.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PingRequest}\n   */\n  public static final class PingRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PingRequest)\n      PingRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PingRequest\");\n    }\n    // Use PingRequest.newBuilder() to construct.\n    private PingRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PingRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PingRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PingRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.PingRequest.class, pactus.NetworkOuterClass.PingRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.PingRequest)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.PingRequest other = (pactus.NetworkOuterClass.PingRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.PingRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.PingRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PingRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.PingRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for ping - intentionally empty for measuring round-trip time.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PingRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PingRequest)\n        pactus.NetworkOuterClass.PingRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.PingRequest.class, pactus.NetworkOuterClass.PingRequest.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.PingRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingRequest getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.PingRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingRequest build() {\n        pactus.NetworkOuterClass.PingRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingRequest buildPartial() {\n        pactus.NetworkOuterClass.PingRequest result = new pactus.NetworkOuterClass.PingRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.PingRequest) {\n          return mergeFrom((pactus.NetworkOuterClass.PingRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.PingRequest other) {\n        if (other == pactus.NetworkOuterClass.PingRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PingRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PingRequest)\n    private static final pactus.NetworkOuterClass.PingRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.PingRequest();\n    }\n\n    public static pactus.NetworkOuterClass.PingRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PingRequest>\n        PARSER = new com.google.protobuf.AbstractParser<PingRequest>() {\n      @java.lang.Override\n      public PingRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PingRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PingRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.PingRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PingResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PingResponse)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Response message for ping - intentionally empty for measuring round-trip time.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PingResponse}\n   */\n  public static final class PingResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PingResponse)\n      PingResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PingResponse\");\n    }\n    // Use PingResponse.newBuilder() to construct.\n    private PingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PingResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PingResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.NetworkOuterClass.internal_static_pactus_PingResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.NetworkOuterClass.PingResponse.class, pactus.NetworkOuterClass.PingResponse.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.NetworkOuterClass.PingResponse)) {\n        return super.equals(obj);\n      }\n      pactus.NetworkOuterClass.PingResponse other = (pactus.NetworkOuterClass.PingResponse) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.NetworkOuterClass.PingResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.NetworkOuterClass.PingResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.NetworkOuterClass.PingResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.NetworkOuterClass.PingResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message for ping - intentionally empty for measuring round-trip time.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PingResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PingResponse)\n        pactus.NetworkOuterClass.PingResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.NetworkOuterClass.PingResponse.class, pactus.NetworkOuterClass.PingResponse.Builder.class);\n      }\n\n      // Construct using pactus.NetworkOuterClass.PingResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.NetworkOuterClass.internal_static_pactus_PingResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingResponse getDefaultInstanceForType() {\n        return pactus.NetworkOuterClass.PingResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingResponse build() {\n        pactus.NetworkOuterClass.PingResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.NetworkOuterClass.PingResponse buildPartial() {\n        pactus.NetworkOuterClass.PingResponse result = new pactus.NetworkOuterClass.PingResponse(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.NetworkOuterClass.PingResponse) {\n          return mergeFrom((pactus.NetworkOuterClass.PingResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.NetworkOuterClass.PingResponse other) {\n        if (other == pactus.NetworkOuterClass.PingResponse.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PingResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PingResponse)\n    private static final pactus.NetworkOuterClass.PingResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.NetworkOuterClass.PingResponse();\n    }\n\n    public static pactus.NetworkOuterClass.PingResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PingResponse>\n        PARSER = new com.google.protobuf.AbstractParser<PingResponse>() {\n      @java.lang.Override\n      public PingResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PingResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PingResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.NetworkOuterClass.PingResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNetworkInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNetworkInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListPeersRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListPeersRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListPeersResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListPeersResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNodeInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNodeInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ZMQPublisherInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PeerInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PeerInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ConnectionInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ConnectionInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_MetricInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_MetricInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_MetricInfo_MessageSentEntry_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_MetricInfo_MessageSentEntry_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_MetricInfo_MessageReceivedEntry_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_MetricInfo_MessageReceivedEntry_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CounterInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CounterInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PingRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PingRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PingResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PingResponse_fieldAccessorTable;\n\n  public static com.google.protobuf.Descriptors.FileDescriptor\n      getDescriptor() {\n    return descriptor;\n  }\n  private static  com.google.protobuf.Descriptors.FileDescriptor\n      descriptor;\n  static {\n    java.lang.String[] descriptorData = {\n      \"\\n\\rnetwork.proto\\022\\006pactus\\\"\\027\\n\\025GetNetworkInf\" +\n      \"oRequest\\\"\\244\\001\\n\\026GetNetworkInfoResponse\\022!\\n\\014n\" +\n      \"etwork_name\\030\\001 \\001(\\tR\\013networkName\\0222\\n\\025connec\" +\n      \"ted_peers_count\\030\\002 \\001(\\rR\\023connectedPeersCou\" +\n      \"nt\\0223\\n\\013metric_info\\030\\004 \\001(\\0132\\022.pactus.MetricI\" +\n      \"nfoR\\nmetricInfo\\\"E\\n\\020ListPeersRequest\\0221\\n\\024i\" +\n      \"nclude_disconnected\\030\\001 \\001(\\010R\\023includeDiscon\" +\n      \"nected\\\";\\n\\021ListPeersResponse\\022&\\n\\005peers\\030\\001 \\003\" +\n      \"(\\0132\\020.pactus.PeerInfoR\\005peers\\\"\\024\\n\\022GetNodeIn\" +\n      \"foRequest\\\"\\216\\004\\n\\023GetNodeInfoResponse\\022\\030\\n\\007mon\" +\n      \"iker\\030\\001 \\001(\\tR\\007moniker\\022\\024\\n\\005agent\\030\\002 \\001(\\tR\\005agen\" +\n      \"t\\022\\027\\n\\007peer_id\\030\\003 \\001(\\tR\\006peerId\\022\\035\\n\\nstarted_at\" +\n      \"\\030\\004 \\001(\\004R\\tstartedAt\\022\\\"\\n\\014reachability\\030\\005 \\001(\\tR\" +\n      \"\\014reachability\\022\\032\\n\\010services\\030\\006 \\001(\\005R\\010service\" +\n      \"s\\022%\\n\\016services_names\\030\\007 \\001(\\tR\\rservicesNames\" +\n      \"\\022\\037\\n\\013local_addrs\\030\\010 \\003(\\tR\\nlocalAddrs\\022\\034\\n\\tpro\" +\n      \"tocols\\030\\t \\003(\\tR\\tprotocols\\022!\\n\\014clock_offset\\030\" +\n      \"\\r \\001(\\001R\\013clockOffset\\022?\\n\\017connection_info\\030\\016 \" +\n      \"\\001(\\0132\\026.pactus.ConnectionInfoR\\016connectionI\" +\n      \"nfo\\022?\\n\\016zmq_publishers\\030\\017 \\003(\\0132\\030.pactus.ZMQ\" +\n      \"PublisherInfoR\\rzmqPublishers\\022!\\n\\014current_\" +\n      \"time\\030\\020 \\001(\\004R\\013currentTime\\022!\\n\\014network_name\\030\" +\n      \"\\021 \\001(\\tR\\013networkName\\\"T\\n\\020ZMQPublisherInfo\\022\\024\" +\n      \"\\n\\005topic\\030\\001 \\001(\\tR\\005topic\\022\\030\\n\\007address\\030\\002 \\001(\\tR\\007a\" +\n      \"ddress\\022\\020\\n\\003hwm\\030\\003 \\001(\\005R\\003hwm\\\"\\205\\005\\n\\010PeerInfo\\022\\026\\n\" +\n      \"\\006status\\030\\001 \\001(\\005R\\006status\\022\\030\\n\\007moniker\\030\\002 \\001(\\tR\\007\" +\n      \"moniker\\022\\024\\n\\005agent\\030\\003 \\001(\\tR\\005agent\\022\\027\\n\\007peer_id\" +\n      \"\\030\\004 \\001(\\tR\\006peerId\\022%\\n\\016consensus_keys\\030\\005 \\003(\\tR\\r\" +\n      \"consensusKeys\\022/\\n\\023consensus_addresses\\030\\006 \\003\" +\n      \"(\\tR\\022consensusAddresses\\022\\032\\n\\010services\\030\\007 \\001(\\r\" +\n      \"R\\010services\\022&\\n\\017last_block_hash\\030\\010 \\001(\\tR\\rlas\" +\n      \"tBlockHash\\022\\026\\n\\006height\\030\\t \\001(\\rR\\006height\\022\\033\\n\\tla\" +\n      \"st_sent\\030\\n \\001(\\003R\\010lastSent\\022#\\n\\rlast_received\" +\n      \"\\030\\013 \\001(\\003R\\014lastReceived\\022\\030\\n\\007address\\030\\014 \\001(\\tR\\007a\" +\n      \"ddress\\022/\\n\\tdirection\\030\\r \\001(\\0162\\021.pactus.Direc\" +\n      \"tionR\\tdirection\\022\\034\\n\\tprotocols\\030\\016 \\003(\\tR\\tprot\" +\n      \"ocols\\022%\\n\\016total_sessions\\030\\017 \\001(\\005R\\rtotalSess\" +\n      \"ions\\022-\\n\\022completed_sessions\\030\\020 \\001(\\005R\\021comple\" +\n      \"tedSessions\\0223\\n\\013metric_info\\030\\021 \\001(\\0132\\022.pactu\" +\n      \"s.MetricInfoR\\nmetricInfo\\022.\\n\\023outbound_hel\" +\n      \"lo_sent\\030\\022 \\001(\\010R\\021outboundHelloSent\\\"\\226\\001\\n\\016Con\" +\n      \"nectionInfo\\022 \\n\\013connections\\030\\001 \\001(\\004R\\013connec\" +\n      \"tions\\022/\\n\\023inbound_connections\\030\\002 \\001(\\004R\\022inbo\" +\n      \"undConnections\\0221\\n\\024outbound_connections\\030\\003\" +\n      \" \\001(\\004R\\023outboundConnections\\\"\\200\\004\\n\\nMetricInfo\" +\n      \"\\0228\\n\\rtotal_invalid\\030\\001 \\001(\\0132\\023.pactus.Counter\" +\n      \"InfoR\\014totalInvalid\\0222\\n\\ntotal_sent\\030\\002 \\001(\\0132\\023\" +\n      \".pactus.CounterInfoR\\ttotalSent\\022:\\n\\016total_\" +\n      \"received\\030\\003 \\001(\\0132\\023.pactus.CounterInfoR\\rtot\" +\n      \"alReceived\\022F\\n\\014message_sent\\030\\004 \\003(\\0132#.pactu\" +\n      \"s.MetricInfo.MessageSentEntryR\\013messageSe\" +\n      \"nt\\022R\\n\\020message_received\\030\\005 \\003(\\0132\\'.pactus.Me\" +\n      \"tricInfo.MessageReceivedEntryR\\017messageRe\" +\n      \"ceived\\032S\\n\\020MessageSentEntry\\022\\020\\n\\003key\\030\\001 \\001(\\005R\" +\n      \"\\003key\\022)\\n\\005value\\030\\002 \\001(\\0132\\023.pactus.CounterInfo\" +\n      \"R\\005value:\\0028\\001\\032W\\n\\024MessageReceivedEntry\\022\\020\\n\\003k\" +\n      \"ey\\030\\001 \\001(\\005R\\003key\\022)\\n\\005value\\030\\002 \\001(\\0132\\023.pactus.Co\" +\n      \"unterInfoR\\005value:\\0028\\001\\\"=\\n\\013CounterInfo\\022\\024\\n\\005b\" +\n      \"ytes\\030\\001 \\001(\\004R\\005bytes\\022\\030\\n\\007bundles\\030\\002 \\001(\\004R\\007bund\" +\n      \"les\\\"\\r\\n\\013PingRequest\\\"\\016\\n\\014PingResponse*Q\\n\\tDi\" +\n      \"rection\\022\\025\\n\\021DIRECTION_UNKNOWN\\020\\000\\022\\025\\n\\021DIRECT\" +\n      \"ION_INBOUND\\020\\001\\022\\026\\n\\022DIRECTION_OUTBOUND\\020\\0022\\227\\002\" +\n      \"\\n\\007Network\\022O\\n\\016GetNetworkInfo\\022\\035.pactus.Get\" +\n      \"NetworkInfoRequest\\032\\036.pactus.GetNetworkIn\" +\n      \"foResponse\\022@\\n\\tListPeers\\022\\030.pactus.ListPee\" +\n      \"rsRequest\\032\\031.pactus.ListPeersResponse\\022F\\n\\013\" +\n      \"GetNodeInfo\\022\\032.pactus.GetNodeInfoRequest\\032\" +\n      \"\\033.pactus.GetNodeInfoResponse\\0221\\n\\004Ping\\022\\023.p\" +\n      \"actus.PingRequest\\032\\024.pactus.PingResponseB\" +\n      \":\\n\\006pactusZ0github.com/pactus-project/pac\" +\n      \"tus/www/grpc/pactusb\\006proto3\"\n    };\n    descriptor = com.google.protobuf.Descriptors.FileDescriptor\n      .internalBuildGeneratedFileFrom(descriptorData,\n        new com.google.protobuf.Descriptors.FileDescriptor[] {\n        });\n    internal_static_pactus_GetNetworkInfoRequest_descriptor =\n      getDescriptor().getMessageType(0);\n    internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNetworkInfoRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetNetworkInfoResponse_descriptor =\n      getDescriptor().getMessageType(1);\n    internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNetworkInfoResponse_descriptor,\n        new java.lang.String[] { \"NetworkName\", \"ConnectedPeersCount\", \"MetricInfo\", });\n    internal_static_pactus_ListPeersRequest_descriptor =\n      getDescriptor().getMessageType(2);\n    internal_static_pactus_ListPeersRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListPeersRequest_descriptor,\n        new java.lang.String[] { \"IncludeDisconnected\", });\n    internal_static_pactus_ListPeersResponse_descriptor =\n      getDescriptor().getMessageType(3);\n    internal_static_pactus_ListPeersResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListPeersResponse_descriptor,\n        new java.lang.String[] { \"Peers\", });\n    internal_static_pactus_GetNodeInfoRequest_descriptor =\n      getDescriptor().getMessageType(4);\n    internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNodeInfoRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_GetNodeInfoResponse_descriptor =\n      getDescriptor().getMessageType(5);\n    internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNodeInfoResponse_descriptor,\n        new java.lang.String[] { \"Moniker\", \"Agent\", \"PeerId\", \"StartedAt\", \"Reachability\", \"Services\", \"ServicesNames\", \"LocalAddrs\", \"Protocols\", \"ClockOffset\", \"ConnectionInfo\", \"ZmqPublishers\", \"CurrentTime\", \"NetworkName\", });\n    internal_static_pactus_ZMQPublisherInfo_descriptor =\n      getDescriptor().getMessageType(6);\n    internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ZMQPublisherInfo_descriptor,\n        new java.lang.String[] { \"Topic\", \"Address\", \"Hwm\", });\n    internal_static_pactus_PeerInfo_descriptor =\n      getDescriptor().getMessageType(7);\n    internal_static_pactus_PeerInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PeerInfo_descriptor,\n        new java.lang.String[] { \"Status\", \"Moniker\", \"Agent\", \"PeerId\", \"ConsensusKeys\", \"ConsensusAddresses\", \"Services\", \"LastBlockHash\", \"Height\", \"LastSent\", \"LastReceived\", \"Address\", \"Direction\", \"Protocols\", \"TotalSessions\", \"CompletedSessions\", \"MetricInfo\", \"OutboundHelloSent\", });\n    internal_static_pactus_ConnectionInfo_descriptor =\n      getDescriptor().getMessageType(8);\n    internal_static_pactus_ConnectionInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ConnectionInfo_descriptor,\n        new java.lang.String[] { \"Connections\", \"InboundConnections\", \"OutboundConnections\", });\n    internal_static_pactus_MetricInfo_descriptor =\n      getDescriptor().getMessageType(9);\n    internal_static_pactus_MetricInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_MetricInfo_descriptor,\n        new java.lang.String[] { \"TotalInvalid\", \"TotalSent\", \"TotalReceived\", \"MessageSent\", \"MessageReceived\", });\n    internal_static_pactus_MetricInfo_MessageSentEntry_descriptor =\n      internal_static_pactus_MetricInfo_descriptor.getNestedType(0);\n    internal_static_pactus_MetricInfo_MessageSentEntry_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_MetricInfo_MessageSentEntry_descriptor,\n        new java.lang.String[] { \"Key\", \"Value\", });\n    internal_static_pactus_MetricInfo_MessageReceivedEntry_descriptor =\n      internal_static_pactus_MetricInfo_descriptor.getNestedType(1);\n    internal_static_pactus_MetricInfo_MessageReceivedEntry_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_MetricInfo_MessageReceivedEntry_descriptor,\n        new java.lang.String[] { \"Key\", \"Value\", });\n    internal_static_pactus_CounterInfo_descriptor =\n      getDescriptor().getMessageType(10);\n    internal_static_pactus_CounterInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CounterInfo_descriptor,\n        new java.lang.String[] { \"Bytes\", \"Bundles\", });\n    internal_static_pactus_PingRequest_descriptor =\n      getDescriptor().getMessageType(11);\n    internal_static_pactus_PingRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PingRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_PingResponse_descriptor =\n      getDescriptor().getMessageType(12);\n    internal_static_pactus_PingResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PingResponse_descriptor,\n        new java.lang.String[] { });\n    descriptor.resolveAllFeaturesImmutable();\n  }\n\n  // @@protoc_insertion_point(outer_class_scope)\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/TransactionGrpc.java",
    "content": "package pactus;\n\nimport static io.grpc.MethodDescriptor.generateFullMethodName;\n\n/**\n * <pre>\n * Transaction service defines various RPC methods for interacting with transactions.\n * </pre>\n */\n@io.grpc.stub.annotations.GrpcGenerated\npublic final class TransactionGrpc {\n\n  private TransactionGrpc() {}\n\n  public static final java.lang.String SERVICE_NAME = \"pactus.Transaction\";\n\n  // Static method descriptors that strictly reflect the proto.\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetTransactionRequest,\n      pactus.TransactionOuterClass.GetTransactionResponse> getGetTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetTransaction\",\n      requestType = pactus.TransactionOuterClass.GetTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetTransactionRequest,\n      pactus.TransactionOuterClass.GetTransactionResponse> getGetTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetTransactionRequest, pactus.TransactionOuterClass.GetTransactionResponse> getGetTransactionMethod;\n    if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) {\n          TransactionGrpc.getGetTransactionMethod = getGetTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetTransactionRequest, pactus.TransactionOuterClass.GetTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CalculateFeeRequest,\n      pactus.TransactionOuterClass.CalculateFeeResponse> getCalculateFeeMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"CalculateFee\",\n      requestType = pactus.TransactionOuterClass.CalculateFeeRequest.class,\n      responseType = pactus.TransactionOuterClass.CalculateFeeResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CalculateFeeRequest,\n      pactus.TransactionOuterClass.CalculateFeeResponse> getCalculateFeeMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CalculateFeeRequest, pactus.TransactionOuterClass.CalculateFeeResponse> getCalculateFeeMethod;\n    if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) {\n          TransactionGrpc.getCalculateFeeMethod = getCalculateFeeMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.CalculateFeeRequest, pactus.TransactionOuterClass.CalculateFeeResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"CalculateFee\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"CalculateFee\"))\n              .build();\n        }\n      }\n    }\n    return getCalculateFeeMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.BroadcastTransactionRequest,\n      pactus.TransactionOuterClass.BroadcastTransactionResponse> getBroadcastTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"BroadcastTransaction\",\n      requestType = pactus.TransactionOuterClass.BroadcastTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.BroadcastTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.BroadcastTransactionRequest,\n      pactus.TransactionOuterClass.BroadcastTransactionResponse> getBroadcastTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.BroadcastTransactionRequest, pactus.TransactionOuterClass.BroadcastTransactionResponse> getBroadcastTransactionMethod;\n    if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) {\n          TransactionGrpc.getBroadcastTransactionMethod = getBroadcastTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.BroadcastTransactionRequest, pactus.TransactionOuterClass.BroadcastTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"BroadcastTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"BroadcastTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getBroadcastTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawTransferTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawTransferTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetRawTransferTransaction\",\n      requestType = pactus.TransactionOuterClass.GetRawTransferTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawTransferTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawTransferTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawTransferTransactionMethod;\n    if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) {\n          TransactionGrpc.getGetRawTransferTransactionMethod = getGetRawTransferTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetRawTransferTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetRawTransferTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetRawTransferTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBondTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBondTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetRawBondTransaction\",\n      requestType = pactus.TransactionOuterClass.GetRawBondTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBondTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBondTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBondTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBondTransactionMethod;\n    if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) {\n          TransactionGrpc.getGetRawBondTransactionMethod = getGetRawBondTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetRawBondTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetRawBondTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetRawBondTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetRawBondTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawUnbondTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawUnbondTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetRawUnbondTransaction\",\n      requestType = pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawUnbondTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawUnbondTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawUnbondTransactionMethod;\n    if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) {\n          TransactionGrpc.getGetRawUnbondTransactionMethod = getGetRawUnbondTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetRawUnbondTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetRawUnbondTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetRawUnbondTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawWithdrawTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetRawWithdrawTransaction\",\n      requestType = pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawWithdrawTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawWithdrawTransactionMethod;\n    if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) {\n          TransactionGrpc.getGetRawWithdrawTransactionMethod = getGetRawWithdrawTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetRawWithdrawTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetRawWithdrawTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetRawWithdrawTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBatchTransferTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetRawBatchTransferTransaction\",\n      requestType = pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.GetRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest,\n      pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBatchTransferTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse> getGetRawBatchTransferTransactionMethod;\n    if ((getGetRawBatchTransferTransactionMethod = TransactionGrpc.getGetRawBatchTransferTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getGetRawBatchTransferTransactionMethod = TransactionGrpc.getGetRawBatchTransferTransactionMethod) == null) {\n          TransactionGrpc.getGetRawBatchTransferTransactionMethod = getGetRawBatchTransferTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest, pactus.TransactionOuterClass.GetRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetRawBatchTransferTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"GetRawBatchTransferTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getGetRawBatchTransferTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.DecodeRawTransactionRequest,\n      pactus.TransactionOuterClass.DecodeRawTransactionResponse> getDecodeRawTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"DecodeRawTransaction\",\n      requestType = pactus.TransactionOuterClass.DecodeRawTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.DecodeRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.DecodeRawTransactionRequest,\n      pactus.TransactionOuterClass.DecodeRawTransactionResponse> getDecodeRawTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.DecodeRawTransactionRequest, pactus.TransactionOuterClass.DecodeRawTransactionResponse> getDecodeRawTransactionMethod;\n    if ((getDecodeRawTransactionMethod = TransactionGrpc.getDecodeRawTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getDecodeRawTransactionMethod = TransactionGrpc.getDecodeRawTransactionMethod) == null) {\n          TransactionGrpc.getDecodeRawTransactionMethod = getDecodeRawTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.DecodeRawTransactionRequest, pactus.TransactionOuterClass.DecodeRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"DecodeRawTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.DecodeRawTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.DecodeRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"DecodeRawTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getDecodeRawTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CheckTransactionRequest,\n      pactus.TransactionOuterClass.CheckTransactionResponse> getCheckTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"CheckTransaction\",\n      requestType = pactus.TransactionOuterClass.CheckTransactionRequest.class,\n      responseType = pactus.TransactionOuterClass.CheckTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CheckTransactionRequest,\n      pactus.TransactionOuterClass.CheckTransactionResponse> getCheckTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.TransactionOuterClass.CheckTransactionRequest, pactus.TransactionOuterClass.CheckTransactionResponse> getCheckTransactionMethod;\n    if ((getCheckTransactionMethod = TransactionGrpc.getCheckTransactionMethod) == null) {\n      synchronized (TransactionGrpc.class) {\n        if ((getCheckTransactionMethod = TransactionGrpc.getCheckTransactionMethod) == null) {\n          TransactionGrpc.getCheckTransactionMethod = getCheckTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.TransactionOuterClass.CheckTransactionRequest, pactus.TransactionOuterClass.CheckTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"CheckTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.CheckTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.TransactionOuterClass.CheckTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new TransactionMethodDescriptorSupplier(\"CheckTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getCheckTransactionMethod;\n  }\n\n  /**\n   * Creates a new async stub that supports all call types for the service\n   */\n  public static TransactionStub newStub(io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<TransactionStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<TransactionStub>() {\n        @java.lang.Override\n        public TransactionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new TransactionStub(channel, callOptions);\n        }\n      };\n    return TransactionStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports all types of calls on the service\n   */\n  public static TransactionBlockingV2Stub newBlockingV2Stub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<TransactionBlockingV2Stub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<TransactionBlockingV2Stub>() {\n        @java.lang.Override\n        public TransactionBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new TransactionBlockingV2Stub(channel, callOptions);\n        }\n      };\n    return TransactionBlockingV2Stub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports unary and streaming output calls on the service\n   */\n  public static TransactionBlockingStub newBlockingStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<TransactionBlockingStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<TransactionBlockingStub>() {\n        @java.lang.Override\n        public TransactionBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new TransactionBlockingStub(channel, callOptions);\n        }\n      };\n    return TransactionBlockingStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new ListenableFuture-style stub that supports unary calls on the service\n   */\n  public static TransactionFutureStub newFutureStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<TransactionFutureStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<TransactionFutureStub>() {\n        @java.lang.Override\n        public TransactionFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new TransactionFutureStub(channel, callOptions);\n        }\n      };\n    return TransactionFutureStub.newStub(factory, channel);\n  }\n\n  /**\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public interface AsyncService {\n\n    /**\n     * <pre>\n     * GetTransaction retrieves transaction details based on the provided request parameters.\n     * </pre>\n     */\n    default void getTransaction(pactus.TransactionOuterClass.GetTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * CalculateFee calculates the transaction fee based on the specified amount and payload type.\n     * </pre>\n     */\n    default void calculateFee(pactus.TransactionOuterClass.CalculateFeeRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CalculateFeeResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCalculateFeeMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * BroadcastTransaction broadcasts a signed transaction to the network.\n     * </pre>\n     */\n    default void broadcastTransaction(pactus.TransactionOuterClass.BroadcastTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.BroadcastTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBroadcastTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawTransferTransaction retrieves raw details of a transfer transaction.\n     * </pre>\n     */\n    default void getRawTransferTransaction(pactus.TransactionOuterClass.GetRawTransferTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawTransferTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawBondTransaction retrieves raw details of a bond transaction.\n     * </pre>\n     */\n    default void getRawBondTransaction(pactus.TransactionOuterClass.GetRawBondTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawBondTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n     * </pre>\n     */\n    default void getRawUnbondTransaction(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawUnbondTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n     * </pre>\n     */\n    default void getRawWithdrawTransaction(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawWithdrawTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n     * </pre>\n     */\n    default void getRawBatchTransferTransaction(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawBatchTransferTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n     * </pre>\n     */\n    default void decodeRawTransaction(pactus.TransactionOuterClass.DecodeRawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.DecodeRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDecodeRawTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n     * </pre>\n     */\n    default void checkTransaction(pactus.TransactionOuterClass.CheckTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CheckTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCheckTransactionMethod(), responseObserver);\n    }\n  }\n\n  /**\n   * Base class for the server implementation of the service Transaction.\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public static abstract class TransactionImplBase\n      implements io.grpc.BindableService, AsyncService {\n\n    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {\n      return TransactionGrpc.bindService(this);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do asynchronous rpc calls to service Transaction.\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public static final class TransactionStub\n      extends io.grpc.stub.AbstractAsyncStub<TransactionStub> {\n    private TransactionStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected TransactionStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new TransactionStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetTransaction retrieves transaction details based on the provided request parameters.\n     * </pre>\n     */\n    public void getTransaction(pactus.TransactionOuterClass.GetTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * CalculateFee calculates the transaction fee based on the specified amount and payload type.\n     * </pre>\n     */\n    public void calculateFee(pactus.TransactionOuterClass.CalculateFeeRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CalculateFeeResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * BroadcastTransaction broadcasts a signed transaction to the network.\n     * </pre>\n     */\n    public void broadcastTransaction(pactus.TransactionOuterClass.BroadcastTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.BroadcastTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawTransferTransaction retrieves raw details of a transfer transaction.\n     * </pre>\n     */\n    public void getRawTransferTransaction(pactus.TransactionOuterClass.GetRawTransferTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawBondTransaction retrieves raw details of a bond transaction.\n     * </pre>\n     */\n    public void getRawBondTransaction(pactus.TransactionOuterClass.GetRawBondTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n     * </pre>\n     */\n    public void getRawUnbondTransaction(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n     * </pre>\n     */\n    public void getRawWithdrawTransaction(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n     * </pre>\n     */\n    public void getRawBatchTransferTransaction(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetRawBatchTransferTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n     * </pre>\n     */\n    public void decodeRawTransaction(pactus.TransactionOuterClass.DecodeRawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.DecodeRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getDecodeRawTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n     * </pre>\n     */\n    public void checkTransaction(pactus.TransactionOuterClass.CheckTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CheckTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getCheckTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do synchronous rpc calls to service Transaction.\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public static final class TransactionBlockingV2Stub\n      extends io.grpc.stub.AbstractBlockingStub<TransactionBlockingV2Stub> {\n    private TransactionBlockingV2Stub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected TransactionBlockingV2Stub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new TransactionBlockingV2Stub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetTransaction retrieves transaction details based on the provided request parameters.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetTransactionResponse getTransaction(pactus.TransactionOuterClass.GetTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * CalculateFee calculates the transaction fee based on the specified amount and payload type.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.CalculateFeeResponse calculateFee(pactus.TransactionOuterClass.CalculateFeeRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getCalculateFeeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * BroadcastTransaction broadcasts a signed transaction to the network.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.BroadcastTransactionResponse broadcastTransaction(pactus.TransactionOuterClass.BroadcastTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getBroadcastTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawTransferTransaction retrieves raw details of a transfer transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.TransactionOuterClass.GetRawTransferTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetRawTransferTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBondTransaction retrieves raw details of a bond transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.TransactionOuterClass.GetRawBondTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetRawBondTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetRawUnbondTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetRawWithdrawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawBatchTransferTransaction(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetRawBatchTransferTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.DecodeRawTransactionResponse decodeRawTransaction(pactus.TransactionOuterClass.DecodeRawTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getDecodeRawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.CheckTransactionResponse checkTransaction(pactus.TransactionOuterClass.CheckTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getCheckTransactionMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do limited synchronous rpc calls to service Transaction.\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public static final class TransactionBlockingStub\n      extends io.grpc.stub.AbstractBlockingStub<TransactionBlockingStub> {\n    private TransactionBlockingStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected TransactionBlockingStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new TransactionBlockingStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetTransaction retrieves transaction details based on the provided request parameters.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetTransactionResponse getTransaction(pactus.TransactionOuterClass.GetTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * CalculateFee calculates the transaction fee based on the specified amount and payload type.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.CalculateFeeResponse calculateFee(pactus.TransactionOuterClass.CalculateFeeRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getCalculateFeeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * BroadcastTransaction broadcasts a signed transaction to the network.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.BroadcastTransactionResponse broadcastTransaction(pactus.TransactionOuterClass.BroadcastTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getBroadcastTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawTransferTransaction retrieves raw details of a transfer transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.TransactionOuterClass.GetRawTransferTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetRawTransferTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBondTransaction retrieves raw details of a bond transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.TransactionOuterClass.GetRawBondTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetRawBondTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetRawUnbondTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetRawWithdrawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getRawBatchTransferTransaction(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetRawBatchTransferTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.DecodeRawTransactionResponse decodeRawTransaction(pactus.TransactionOuterClass.DecodeRawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getDecodeRawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n     * </pre>\n     */\n    public pactus.TransactionOuterClass.CheckTransactionResponse checkTransaction(pactus.TransactionOuterClass.CheckTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getCheckTransactionMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do ListenableFuture-style rpc calls to service Transaction.\n   * <pre>\n   * Transaction service defines various RPC methods for interacting with transactions.\n   * </pre>\n   */\n  public static final class TransactionFutureStub\n      extends io.grpc.stub.AbstractFutureStub<TransactionFutureStub> {\n    private TransactionFutureStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected TransactionFutureStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new TransactionFutureStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * GetTransaction retrieves transaction details based on the provided request parameters.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetTransactionResponse> getTransaction(\n        pactus.TransactionOuterClass.GetTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * CalculateFee calculates the transaction fee based on the specified amount and payload type.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.CalculateFeeResponse> calculateFee(\n        pactus.TransactionOuterClass.CalculateFeeRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * BroadcastTransaction broadcasts a signed transaction to the network.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.BroadcastTransactionResponse> broadcastTransaction(\n        pactus.TransactionOuterClass.BroadcastTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawTransferTransaction retrieves raw details of a transfer transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetRawTransactionResponse> getRawTransferTransaction(\n        pactus.TransactionOuterClass.GetRawTransferTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBondTransaction retrieves raw details of a bond transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetRawTransactionResponse> getRawBondTransaction(\n        pactus.TransactionOuterClass.GetRawBondTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetRawTransactionResponse> getRawUnbondTransaction(\n        pactus.TransactionOuterClass.GetRawUnbondTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetRawTransactionResponse> getRawWithdrawTransaction(\n        pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.GetRawTransactionResponse> getRawBatchTransferTransaction(\n        pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetRawBatchTransferTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.DecodeRawTransactionResponse> decodeRawTransaction(\n        pactus.TransactionOuterClass.DecodeRawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getDecodeRawTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.TransactionOuterClass.CheckTransactionResponse> checkTransaction(\n        pactus.TransactionOuterClass.CheckTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getCheckTransactionMethod(), getCallOptions()), request);\n    }\n  }\n\n  private static final int METHODID_GET_TRANSACTION = 0;\n  private static final int METHODID_CALCULATE_FEE = 1;\n  private static final int METHODID_BROADCAST_TRANSACTION = 2;\n  private static final int METHODID_GET_RAW_TRANSFER_TRANSACTION = 3;\n  private static final int METHODID_GET_RAW_BOND_TRANSACTION = 4;\n  private static final int METHODID_GET_RAW_UNBOND_TRANSACTION = 5;\n  private static final int METHODID_GET_RAW_WITHDRAW_TRANSACTION = 6;\n  private static final int METHODID_GET_RAW_BATCH_TRANSFER_TRANSACTION = 7;\n  private static final int METHODID_DECODE_RAW_TRANSACTION = 8;\n  private static final int METHODID_CHECK_TRANSACTION = 9;\n\n  private static final class MethodHandlers<Req, Resp> implements\n      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {\n    private final AsyncService serviceImpl;\n    private final int methodId;\n\n    MethodHandlers(AsyncService serviceImpl, int methodId) {\n      this.serviceImpl = serviceImpl;\n      this.methodId = methodId;\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        case METHODID_GET_TRANSACTION:\n          serviceImpl.getTransaction((pactus.TransactionOuterClass.GetTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetTransactionResponse>) responseObserver);\n          break;\n        case METHODID_CALCULATE_FEE:\n          serviceImpl.calculateFee((pactus.TransactionOuterClass.CalculateFeeRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CalculateFeeResponse>) responseObserver);\n          break;\n        case METHODID_BROADCAST_TRANSACTION:\n          serviceImpl.broadcastTransaction((pactus.TransactionOuterClass.BroadcastTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.BroadcastTransactionResponse>) responseObserver);\n          break;\n        case METHODID_GET_RAW_TRANSFER_TRANSACTION:\n          serviceImpl.getRawTransferTransaction((pactus.TransactionOuterClass.GetRawTransferTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_GET_RAW_BOND_TRANSACTION:\n          serviceImpl.getRawBondTransaction((pactus.TransactionOuterClass.GetRawBondTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_GET_RAW_UNBOND_TRANSACTION:\n          serviceImpl.getRawUnbondTransaction((pactus.TransactionOuterClass.GetRawUnbondTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_GET_RAW_WITHDRAW_TRANSACTION:\n          serviceImpl.getRawWithdrawTransaction((pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_GET_RAW_BATCH_TRANSFER_TRANSACTION:\n          serviceImpl.getRawBatchTransferTransaction((pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.GetRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_DECODE_RAW_TRANSACTION:\n          serviceImpl.decodeRawTransaction((pactus.TransactionOuterClass.DecodeRawTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.DecodeRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_CHECK_TRANSACTION:\n          serviceImpl.checkTransaction((pactus.TransactionOuterClass.CheckTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.TransactionOuterClass.CheckTransactionResponse>) responseObserver);\n          break;\n        default:\n          throw new AssertionError();\n      }\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public io.grpc.stub.StreamObserver<Req> invoke(\n        io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        default:\n          throw new AssertionError();\n      }\n    }\n  }\n\n  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {\n    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())\n        .addMethod(\n          getGetTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetTransactionRequest,\n              pactus.TransactionOuterClass.GetTransactionResponse>(\n                service, METHODID_GET_TRANSACTION)))\n        .addMethod(\n          getCalculateFeeMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.CalculateFeeRequest,\n              pactus.TransactionOuterClass.CalculateFeeResponse>(\n                service, METHODID_CALCULATE_FEE)))\n        .addMethod(\n          getBroadcastTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.BroadcastTransactionRequest,\n              pactus.TransactionOuterClass.BroadcastTransactionResponse>(\n                service, METHODID_BROADCAST_TRANSACTION)))\n        .addMethod(\n          getGetRawTransferTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetRawTransferTransactionRequest,\n              pactus.TransactionOuterClass.GetRawTransactionResponse>(\n                service, METHODID_GET_RAW_TRANSFER_TRANSACTION)))\n        .addMethod(\n          getGetRawBondTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetRawBondTransactionRequest,\n              pactus.TransactionOuterClass.GetRawTransactionResponse>(\n                service, METHODID_GET_RAW_BOND_TRANSACTION)))\n        .addMethod(\n          getGetRawUnbondTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetRawUnbondTransactionRequest,\n              pactus.TransactionOuterClass.GetRawTransactionResponse>(\n                service, METHODID_GET_RAW_UNBOND_TRANSACTION)))\n        .addMethod(\n          getGetRawWithdrawTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest,\n              pactus.TransactionOuterClass.GetRawTransactionResponse>(\n                service, METHODID_GET_RAW_WITHDRAW_TRANSACTION)))\n        .addMethod(\n          getGetRawBatchTransferTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest,\n              pactus.TransactionOuterClass.GetRawTransactionResponse>(\n                service, METHODID_GET_RAW_BATCH_TRANSFER_TRANSACTION)))\n        .addMethod(\n          getDecodeRawTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.DecodeRawTransactionRequest,\n              pactus.TransactionOuterClass.DecodeRawTransactionResponse>(\n                service, METHODID_DECODE_RAW_TRANSACTION)))\n        .addMethod(\n          getCheckTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.TransactionOuterClass.CheckTransactionRequest,\n              pactus.TransactionOuterClass.CheckTransactionResponse>(\n                service, METHODID_CHECK_TRANSACTION)))\n        .build();\n  }\n\n  private static abstract class TransactionBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {\n    TransactionBaseDescriptorSupplier() {}\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n      return pactus.TransactionOuterClass.getDescriptor();\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n      return getFileDescriptor().findServiceByName(\"Transaction\");\n    }\n  }\n\n  private static final class TransactionFileDescriptorSupplier\n      extends TransactionBaseDescriptorSupplier {\n    TransactionFileDescriptorSupplier() {}\n  }\n\n  private static final class TransactionMethodDescriptorSupplier\n      extends TransactionBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {\n    private final java.lang.String methodName;\n\n    TransactionMethodDescriptorSupplier(java.lang.String methodName) {\n      this.methodName = methodName;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n      return getServiceDescriptor().findMethodByName(methodName);\n    }\n  }\n\n  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;\n\n  public static io.grpc.ServiceDescriptor getServiceDescriptor() {\n    io.grpc.ServiceDescriptor result = serviceDescriptor;\n    if (result == null) {\n      synchronized (TransactionGrpc.class) {\n        result = serviceDescriptor;\n        if (result == null) {\n          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)\n              .setSchemaDescriptor(new TransactionFileDescriptorSupplier())\n              .addMethod(getGetTransactionMethod())\n              .addMethod(getCalculateFeeMethod())\n              .addMethod(getBroadcastTransactionMethod())\n              .addMethod(getGetRawTransferTransactionMethod())\n              .addMethod(getGetRawBondTransactionMethod())\n              .addMethod(getGetRawUnbondTransactionMethod())\n              .addMethod(getGetRawWithdrawTransactionMethod())\n              .addMethod(getGetRawBatchTransferTransactionMethod())\n              .addMethod(getDecodeRawTransactionMethod())\n              .addMethod(getCheckTransactionMethod())\n              .build();\n        }\n      }\n    }\n    return result;\n  }\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/TransactionOuterClass.java",
    "content": "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n// NO CHECKED-IN PROTOBUF GENCODE\n// source: transaction.proto\n// Protobuf Java Version: 4.33.2\n\npackage pactus;\n\n@com.google.protobuf.Generated\npublic final class TransactionOuterClass extends com.google.protobuf.GeneratedFile {\n  private TransactionOuterClass() {}\n  static {\n    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n      /* major= */ 4,\n      /* minor= */ 33,\n      /* patch= */ 2,\n      /* suffix= */ \"\",\n      \"TransactionOuterClass\");\n  }\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistryLite registry) {\n  }\n\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistry registry) {\n    registerAllExtensions(\n        (com.google.protobuf.ExtensionRegistryLite) registry);\n  }\n  /**\n   * <pre>\n   * Enumeration for different types of transaction payloads.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.PayloadType}\n   */\n  public enum PayloadType\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Unspecified payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_UNSPECIFIED = 0;</code>\n     */\n    PAYLOAD_TYPE_UNSPECIFIED(0),\n    /**\n     * <pre>\n     * Transfer payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_TRANSFER = 1;</code>\n     */\n    PAYLOAD_TYPE_TRANSFER(1),\n    /**\n     * <pre>\n     * Bond payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_BOND = 2;</code>\n     */\n    PAYLOAD_TYPE_BOND(2),\n    /**\n     * <pre>\n     * Sortition payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_SORTITION = 3;</code>\n     */\n    PAYLOAD_TYPE_SORTITION(3),\n    /**\n     * <pre>\n     * Unbond payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_UNBOND = 4;</code>\n     */\n    PAYLOAD_TYPE_UNBOND(4),\n    /**\n     * <pre>\n     * Withdraw payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_WITHDRAW = 5;</code>\n     */\n    PAYLOAD_TYPE_WITHDRAW(5),\n    /**\n     * <pre>\n     * Batch transfer payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_BATCH_TRANSFER = 6;</code>\n     */\n    PAYLOAD_TYPE_BATCH_TRANSFER(6),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadType\");\n    }\n    /**\n     * <pre>\n     * Unspecified payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_UNSPECIFIED = 0;</code>\n     */\n    public static final int PAYLOAD_TYPE_UNSPECIFIED_VALUE = 0;\n    /**\n     * <pre>\n     * Transfer payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_TRANSFER = 1;</code>\n     */\n    public static final int PAYLOAD_TYPE_TRANSFER_VALUE = 1;\n    /**\n     * <pre>\n     * Bond payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_BOND = 2;</code>\n     */\n    public static final int PAYLOAD_TYPE_BOND_VALUE = 2;\n    /**\n     * <pre>\n     * Sortition payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_SORTITION = 3;</code>\n     */\n    public static final int PAYLOAD_TYPE_SORTITION_VALUE = 3;\n    /**\n     * <pre>\n     * Unbond payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_UNBOND = 4;</code>\n     */\n    public static final int PAYLOAD_TYPE_UNBOND_VALUE = 4;\n    /**\n     * <pre>\n     * Withdraw payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_WITHDRAW = 5;</code>\n     */\n    public static final int PAYLOAD_TYPE_WITHDRAW_VALUE = 5;\n    /**\n     * <pre>\n     * Batch transfer payload type.\n     * </pre>\n     *\n     * <code>PAYLOAD_TYPE_BATCH_TRANSFER = 6;</code>\n     */\n    public static final int PAYLOAD_TYPE_BATCH_TRANSFER_VALUE = 6;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static PayloadType valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static PayloadType forNumber(int value) {\n      switch (value) {\n        case 0: return PAYLOAD_TYPE_UNSPECIFIED;\n        case 1: return PAYLOAD_TYPE_TRANSFER;\n        case 2: return PAYLOAD_TYPE_BOND;\n        case 3: return PAYLOAD_TYPE_SORTITION;\n        case 4: return PAYLOAD_TYPE_UNBOND;\n        case 5: return PAYLOAD_TYPE_WITHDRAW;\n        case 6: return PAYLOAD_TYPE_BATCH_TRANSFER;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<PayloadType>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        PayloadType> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<PayloadType>() {\n            public PayloadType findValueByNumber(int number) {\n              return PayloadType.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.getDescriptor().getEnumTypes().get(0);\n    }\n\n    private static final PayloadType[] VALUES = values();\n\n    public static PayloadType valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private PayloadType(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.PayloadType)\n  }\n\n  /**\n   * <pre>\n   * Enumeration for verbosity levels when requesting transaction details.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.TransactionVerbosity}\n   */\n  public enum TransactionVerbosity\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Request transaction data only.\n     * </pre>\n     *\n     * <code>TRANSACTION_VERBOSITY_DATA = 0;</code>\n     */\n    TRANSACTION_VERBOSITY_DATA(0),\n    /**\n     * <pre>\n     * Request detailed transaction information.\n     * </pre>\n     *\n     * <code>TRANSACTION_VERBOSITY_INFO = 1;</code>\n     */\n    TRANSACTION_VERBOSITY_INFO(1),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"TransactionVerbosity\");\n    }\n    /**\n     * <pre>\n     * Request transaction data only.\n     * </pre>\n     *\n     * <code>TRANSACTION_VERBOSITY_DATA = 0;</code>\n     */\n    public static final int TRANSACTION_VERBOSITY_DATA_VALUE = 0;\n    /**\n     * <pre>\n     * Request detailed transaction information.\n     * </pre>\n     *\n     * <code>TRANSACTION_VERBOSITY_INFO = 1;</code>\n     */\n    public static final int TRANSACTION_VERBOSITY_INFO_VALUE = 1;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static TransactionVerbosity valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static TransactionVerbosity forNumber(int value) {\n      switch (value) {\n        case 0: return TRANSACTION_VERBOSITY_DATA;\n        case 1: return TRANSACTION_VERBOSITY_INFO;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<TransactionVerbosity>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        TransactionVerbosity> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<TransactionVerbosity>() {\n            public TransactionVerbosity findValueByNumber(int number) {\n              return TransactionVerbosity.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.getDescriptor().getEnumTypes().get(1);\n    }\n\n    private static final TransactionVerbosity[] VALUES = values();\n\n    public static TransactionVerbosity valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private TransactionVerbosity(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.TransactionVerbosity)\n  }\n\n  public interface GetTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The unique ID of the transaction to retrieve.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    java.lang.String getId();\n    /**\n     * <pre>\n     * The unique ID of the transaction to retrieve.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    com.google.protobuf.ByteString\n        getIdBytes();\n\n    /**\n     * <pre>\n     * The verbosity level for transaction details.\n     * </pre>\n     *\n     * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The enum numeric value on the wire for verbosity.\n     */\n    int getVerbosityValue();\n    /**\n     * <pre>\n     * The verbosity level for transaction details.\n     * </pre>\n     *\n     * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The verbosity.\n     */\n    pactus.TransactionOuterClass.TransactionVerbosity getVerbosity();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving transaction details.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTransactionRequest}\n   */\n  public static final class GetTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTransactionRequest)\n      GetTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTransactionRequest\");\n    }\n    // Use GetTransactionRequest.newBuilder() to construct.\n    private GetTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTransactionRequest() {\n      id_ = \"\";\n      verbosity_ = 0;\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetTransactionRequest.class, pactus.TransactionOuterClass.GetTransactionRequest.Builder.class);\n    }\n\n    public static final int ID_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object id_ = \"\";\n    /**\n     * <pre>\n     * The unique ID of the transaction to retrieve.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    @java.lang.Override\n    public java.lang.String getId() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        id_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The unique ID of the transaction to retrieve.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getIdBytes() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        id_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int VERBOSITY_FIELD_NUMBER = 2;\n    private int verbosity_ = 0;\n    /**\n     * <pre>\n     * The verbosity level for transaction details.\n     * </pre>\n     *\n     * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The enum numeric value on the wire for verbosity.\n     */\n    @java.lang.Override public int getVerbosityValue() {\n      return verbosity_;\n    }\n    /**\n     * <pre>\n     * The verbosity level for transaction details.\n     * </pre>\n     *\n     * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n     * @return The verbosity.\n     */\n    @java.lang.Override public pactus.TransactionOuterClass.TransactionVerbosity getVerbosity() {\n      pactus.TransactionOuterClass.TransactionVerbosity result = pactus.TransactionOuterClass.TransactionVerbosity.forNumber(verbosity_);\n      return result == null ? pactus.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);\n      }\n      if (verbosity_ != pactus.TransactionOuterClass.TransactionVerbosity.TRANSACTION_VERBOSITY_DATA.getNumber()) {\n        output.writeEnum(2, verbosity_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);\n      }\n      if (verbosity_ != pactus.TransactionOuterClass.TransactionVerbosity.TRANSACTION_VERBOSITY_DATA.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(2, verbosity_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetTransactionRequest other = (pactus.TransactionOuterClass.GetTransactionRequest) obj;\n\n      if (!getId()\n          .equals(other.getId())) return false;\n      if (verbosity_ != other.verbosity_) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ID_FIELD_NUMBER;\n      hash = (53 * hash) + getId().hashCode();\n      hash = (37 * hash) + VERBOSITY_FIELD_NUMBER;\n      hash = (53 * hash) + verbosity_;\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving transaction details.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTransactionRequest)\n        pactus.TransactionOuterClass.GetTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetTransactionRequest.class, pactus.TransactionOuterClass.GetTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        id_ = \"\";\n        verbosity_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionRequest build() {\n        pactus.TransactionOuterClass.GetTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetTransactionRequest result = new pactus.TransactionOuterClass.GetTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.id_ = id_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.verbosity_ = verbosity_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetTransactionRequest.getDefaultInstance()) return this;\n        if (!other.getId().isEmpty()) {\n          id_ = other.id_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.verbosity_ != 0) {\n          setVerbosityValue(other.getVerbosityValue());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                id_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                verbosity_ = input.readEnum();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object id_ = \"\";\n      /**\n       * <pre>\n       * The unique ID of the transaction to retrieve.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The id.\n       */\n      public java.lang.String getId() {\n        java.lang.Object ref = id_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          id_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction to retrieve.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The bytes for id.\n       */\n      public com.google.protobuf.ByteString\n          getIdBytes() {\n        java.lang.Object ref = id_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          id_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction to retrieve.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction to retrieve.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearId() {\n        id_ = getDefaultInstance().getId();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction to retrieve.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The bytes for id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private int verbosity_ = 0;\n      /**\n       * <pre>\n       * The verbosity level for transaction details.\n       * </pre>\n       *\n       * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return The enum numeric value on the wire for verbosity.\n       */\n      @java.lang.Override public int getVerbosityValue() {\n        return verbosity_;\n      }\n      /**\n       * <pre>\n       * The verbosity level for transaction details.\n       * </pre>\n       *\n       * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @param value The enum numeric value on the wire for verbosity to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVerbosityValue(int value) {\n        verbosity_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The verbosity level for transaction details.\n       * </pre>\n       *\n       * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return The verbosity.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.TransactionVerbosity getVerbosity() {\n        pactus.TransactionOuterClass.TransactionVerbosity result = pactus.TransactionOuterClass.TransactionVerbosity.forNumber(verbosity_);\n        return result == null ? pactus.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The verbosity level for transaction details.\n       * </pre>\n       *\n       * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @param value The verbosity to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVerbosity(pactus.TransactionOuterClass.TransactionVerbosity value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000002;\n        verbosity_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The verbosity level for transaction details.\n       * </pre>\n       *\n       * <code>.pactus.TransactionVerbosity verbosity = 2 [json_name = \"verbosity\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVerbosity() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        verbosity_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetTransactionRequest>() {\n      @java.lang.Override\n      public GetTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The height of the block containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_height = 1 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    int getBlockHeight();\n\n    /**\n     * <pre>\n     * The UNIX timestamp of the block containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_time = 2 [json_name = \"blockTime\"];</code>\n     * @return The blockTime.\n     */\n    int getBlockTime();\n\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     * @return Whether the transaction field is set.\n     */\n    boolean hasTransaction();\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     * @return The transaction.\n     */\n    pactus.TransactionOuterClass.TransactionInfo getTransaction();\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains details of a transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTransactionResponse}\n   */\n  public static final class GetTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTransactionResponse)\n      GetTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTransactionResponse\");\n    }\n    // Use GetTransactionResponse.newBuilder() to construct.\n    private GetTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTransactionResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetTransactionResponse.class, pactus.TransactionOuterClass.GetTransactionResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int BLOCK_HEIGHT_FIELD_NUMBER = 1;\n    private int blockHeight_ = 0;\n    /**\n     * <pre>\n     * The height of the block containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_height = 1 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    @java.lang.Override\n    public int getBlockHeight() {\n      return blockHeight_;\n    }\n\n    public static final int BLOCK_TIME_FIELD_NUMBER = 2;\n    private int blockTime_ = 0;\n    /**\n     * <pre>\n     * The UNIX timestamp of the block containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_time = 2 [json_name = \"blockTime\"];</code>\n     * @return The blockTime.\n     */\n    @java.lang.Override\n    public int getBlockTime() {\n      return blockTime_;\n    }\n\n    public static final int TRANSACTION_FIELD_NUMBER = 3;\n    private pactus.TransactionOuterClass.TransactionInfo transaction_;\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     * @return Whether the transaction field is set.\n     */\n    @java.lang.Override\n    public boolean hasTransaction() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     * @return The transaction.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfo getTransaction() {\n      return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n    }\n    /**\n     * <pre>\n     * Detailed information about the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() {\n      return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (blockHeight_ != 0) {\n        output.writeUInt32(1, blockHeight_);\n      }\n      if (blockTime_ != 0) {\n        output.writeUInt32(2, blockTime_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(3, getTransaction());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (blockHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, blockHeight_);\n      }\n      if (blockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(2, blockTime_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(3, getTransaction());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetTransactionResponse other = (pactus.TransactionOuterClass.GetTransactionResponse) obj;\n\n      if (getBlockHeight()\n          != other.getBlockHeight()) return false;\n      if (getBlockTime()\n          != other.getBlockTime()) return false;\n      if (hasTransaction() != other.hasTransaction()) return false;\n      if (hasTransaction()) {\n        if (!getTransaction()\n            .equals(other.getTransaction())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + BLOCK_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockHeight();\n      hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockTime();\n      if (hasTransaction()) {\n        hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;\n        hash = (53 * hash) + getTransaction().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains details of a transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTransactionResponse)\n        pactus.TransactionOuterClass.GetTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetTransactionResponse.class, pactus.TransactionOuterClass.GetTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetTransactionResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetTransactionFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        blockHeight_ = 0;\n        blockTime_ = 0;\n        transaction_ = null;\n        if (transactionBuilder_ != null) {\n          transactionBuilder_.dispose();\n          transactionBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionResponse build() {\n        pactus.TransactionOuterClass.GetTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetTransactionResponse buildPartial() {\n        pactus.TransactionOuterClass.GetTransactionResponse result = new pactus.TransactionOuterClass.GetTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.blockHeight_ = blockHeight_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.blockTime_ = blockTime_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.transaction_ = transactionBuilder_ == null\n              ? transaction_\n              : transactionBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetTransactionResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.GetTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetTransactionResponse other) {\n        if (other == pactus.TransactionOuterClass.GetTransactionResponse.getDefaultInstance()) return this;\n        if (other.getBlockHeight() != 0) {\n          setBlockHeight(other.getBlockHeight());\n        }\n        if (other.getBlockTime() != 0) {\n          setBlockTime(other.getBlockTime());\n        }\n        if (other.hasTransaction()) {\n          mergeTransaction(other.getTransaction());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                blockHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                blockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 26: {\n                input.readMessage(\n                    internalGetTransactionFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int blockHeight_ ;\n      /**\n       * <pre>\n       * The height of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 1 [json_name = \"blockHeight\"];</code>\n       * @return The blockHeight.\n       */\n      @java.lang.Override\n      public int getBlockHeight() {\n        return blockHeight_;\n      }\n      /**\n       * <pre>\n       * The height of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 1 [json_name = \"blockHeight\"];</code>\n       * @param value The blockHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockHeight(int value) {\n\n        blockHeight_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The height of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 1 [json_name = \"blockHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockHeight() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        blockHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int blockTime_ ;\n      /**\n       * <pre>\n       * The UNIX timestamp of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_time = 2 [json_name = \"blockTime\"];</code>\n       * @return The blockTime.\n       */\n      @java.lang.Override\n      public int getBlockTime() {\n        return blockTime_;\n      }\n      /**\n       * <pre>\n       * The UNIX timestamp of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_time = 2 [json_name = \"blockTime\"];</code>\n       * @param value The blockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockTime(int value) {\n\n        blockTime_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The UNIX timestamp of the block containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_time = 2 [json_name = \"blockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockTime() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        blockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private pactus.TransactionOuterClass.TransactionInfo transaction_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> transactionBuilder_;\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       * @return Whether the transaction field is set.\n       */\n      public boolean hasTransaction() {\n        return ((bitField0_ & 0x00000004) != 0);\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       * @return The transaction.\n       */\n      public pactus.TransactionOuterClass.TransactionInfo getTransaction() {\n        if (transactionBuilder_ == null) {\n          return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n        } else {\n          return transactionBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public Builder setTransaction(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (transactionBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          transaction_ = value;\n        } else {\n          transactionBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public Builder setTransaction(\n          pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (transactionBuilder_ == null) {\n          transaction_ = builderForValue.build();\n        } else {\n          transactionBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public Builder mergeTransaction(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (transactionBuilder_ == null) {\n          if (((bitField0_ & 0x00000004) != 0) &&\n            transaction_ != null &&\n            transaction_ != pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance()) {\n            getTransactionBuilder().mergeFrom(value);\n          } else {\n            transaction_ = value;\n          }\n        } else {\n          transactionBuilder_.mergeFrom(value);\n        }\n        if (transaction_ != null) {\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public Builder clearTransaction() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        transaction_ = null;\n        if (transactionBuilder_ != null) {\n          transactionBuilder_.dispose();\n          transactionBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder getTransactionBuilder() {\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return internalGetTransactionFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() {\n        if (transactionBuilder_ != null) {\n          return transactionBuilder_.getMessageOrBuilder();\n        } else {\n          return transaction_ == null ?\n              pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 3 [json_name = \"transaction\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n          internalGetTransactionFieldBuilder() {\n        if (transactionBuilder_ == null) {\n          transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder>(\n                  getTransaction(),\n                  getParentForChildren(),\n                  isClean());\n          transaction_ = null;\n        }\n        return transactionBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTransactionResponse)\n    private static final pactus.TransactionOuterClass.GetTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetTransactionResponse();\n    }\n\n    public static pactus.TransactionOuterClass.GetTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetTransactionResponse>() {\n      @java.lang.Override\n      public GetTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CalculateFeeRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The amount involved in the transaction, specified in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    int getPayloadTypeValue();\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    pactus.TransactionOuterClass.PayloadType getPayloadType();\n\n    /**\n     * <pre>\n     * Indicates if the amount should be fixed and include the fee.\n     * </pre>\n     *\n     * <code>bool fixed_amount = 3 [json_name = \"fixedAmount\"];</code>\n     * @return The fixedAmount.\n     */\n    boolean getFixedAmount();\n  }\n  /**\n   * <pre>\n   * Request message for calculating transaction fee.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CalculateFeeRequest}\n   */\n  public static final class CalculateFeeRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CalculateFeeRequest)\n      CalculateFeeRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CalculateFeeRequest\");\n    }\n    // Use CalculateFeeRequest.newBuilder() to construct.\n    private CalculateFeeRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CalculateFeeRequest() {\n      payloadType_ = 0;\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.CalculateFeeRequest.class, pactus.TransactionOuterClass.CalculateFeeRequest.Builder.class);\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 1;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The amount involved in the transaction, specified in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2;\n    private int payloadType_ = 0;\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    @java.lang.Override public int getPayloadTypeValue() {\n      return payloadType_;\n    }\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    @java.lang.Override public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n      pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n      return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n    }\n\n    public static final int FIXED_AMOUNT_FIELD_NUMBER = 3;\n    private boolean fixedAmount_ = false;\n    /**\n     * <pre>\n     * Indicates if the amount should be fixed and include the fee.\n     * </pre>\n     *\n     * <code>bool fixed_amount = 3 [json_name = \"fixedAmount\"];</code>\n     * @return The fixedAmount.\n     */\n    @java.lang.Override\n    public boolean getFixedAmount() {\n      return fixedAmount_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (amount_ != 0L) {\n        output.writeInt64(1, amount_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        output.writeEnum(2, payloadType_);\n      }\n      if (fixedAmount_ != false) {\n        output.writeBool(3, fixedAmount_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(1, amount_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(2, payloadType_);\n      }\n      if (fixedAmount_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(3, fixedAmount_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.CalculateFeeRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.CalculateFeeRequest other = (pactus.TransactionOuterClass.CalculateFeeRequest) obj;\n\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (payloadType_ != other.payloadType_) return false;\n      if (getFixedAmount()\n          != other.getFixedAmount()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + payloadType_;\n      hash = (37 * hash) + FIXED_AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getFixedAmount());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.CalculateFeeRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for calculating transaction fee.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CalculateFeeRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeRequest)\n        pactus.TransactionOuterClass.CalculateFeeRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.CalculateFeeRequest.class, pactus.TransactionOuterClass.CalculateFeeRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.CalculateFeeRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        amount_ = 0L;\n        payloadType_ = 0;\n        fixedAmount_ = false;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeRequest build() {\n        pactus.TransactionOuterClass.CalculateFeeRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeRequest buildPartial() {\n        pactus.TransactionOuterClass.CalculateFeeRequest result = new pactus.TransactionOuterClass.CalculateFeeRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.CalculateFeeRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.amount_ = amount_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.payloadType_ = payloadType_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.fixedAmount_ = fixedAmount_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.CalculateFeeRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.CalculateFeeRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.CalculateFeeRequest other) {\n        if (other == pactus.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance()) return this;\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        if (other.payloadType_ != 0) {\n          setPayloadTypeValue(other.getPayloadTypeValue());\n        }\n        if (other.getFixedAmount() != false) {\n          setFixedAmount(other.getFixedAmount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                payloadType_ = input.readEnum();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 24: {\n                fixedAmount_ = input.readBool();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The amount involved in the transaction, specified in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The amount involved in the transaction, specified in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The amount involved in the transaction, specified in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int payloadType_ = 0;\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n       * @return The enum numeric value on the wire for payloadType.\n       */\n      @java.lang.Override public int getPayloadTypeValue() {\n        return payloadType_;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n       * @param value The enum numeric value on the wire for payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadTypeValue(int value) {\n        payloadType_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n       * @return The payloadType.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n        pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n        return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n       * @param value The payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadType(pactus.TransactionOuterClass.PayloadType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000002;\n        payloadType_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 2 [json_name = \"payloadType\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPayloadType() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        payloadType_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private boolean fixedAmount_ ;\n      /**\n       * <pre>\n       * Indicates if the amount should be fixed and include the fee.\n       * </pre>\n       *\n       * <code>bool fixed_amount = 3 [json_name = \"fixedAmount\"];</code>\n       * @return The fixedAmount.\n       */\n      @java.lang.Override\n      public boolean getFixedAmount() {\n        return fixedAmount_;\n      }\n      /**\n       * <pre>\n       * Indicates if the amount should be fixed and include the fee.\n       * </pre>\n       *\n       * <code>bool fixed_amount = 3 [json_name = \"fixedAmount\"];</code>\n       * @param value The fixedAmount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFixedAmount(boolean value) {\n\n        fixedAmount_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates if the amount should be fixed and include the fee.\n       * </pre>\n       *\n       * <code>bool fixed_amount = 3 [json_name = \"fixedAmount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFixedAmount() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        fixedAmount_ = false;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CalculateFeeRequest)\n    private static final pactus.TransactionOuterClass.CalculateFeeRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.CalculateFeeRequest();\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CalculateFeeRequest>\n        PARSER = new com.google.protobuf.AbstractParser<CalculateFeeRequest>() {\n      @java.lang.Override\n      public CalculateFeeRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CalculateFeeRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CalculateFeeRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CalculateFeeResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The calculated amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n\n    /**\n     * <pre>\n     * The calculated transaction fee in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 2 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n  }\n  /**\n   * <pre>\n   * Response message contains the calculated transaction fee.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CalculateFeeResponse}\n   */\n  public static final class CalculateFeeResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CalculateFeeResponse)\n      CalculateFeeResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CalculateFeeResponse\");\n    }\n    // Use CalculateFeeResponse.newBuilder() to construct.\n    private CalculateFeeResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CalculateFeeResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.CalculateFeeResponse.class, pactus.TransactionOuterClass.CalculateFeeResponse.Builder.class);\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 1;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The calculated amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    public static final int FEE_FIELD_NUMBER = 2;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The calculated transaction fee in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 2 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (amount_ != 0L) {\n        output.writeInt64(1, amount_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(2, fee_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(1, amount_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, fee_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.CalculateFeeResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.CalculateFeeResponse other = (pactus.TransactionOuterClass.CalculateFeeResponse) obj;\n\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CalculateFeeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.CalculateFeeResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the calculated transaction fee.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CalculateFeeResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeResponse)\n        pactus.TransactionOuterClass.CalculateFeeResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.CalculateFeeResponse.class, pactus.TransactionOuterClass.CalculateFeeResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.CalculateFeeResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        amount_ = 0L;\n        fee_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeResponse build() {\n        pactus.TransactionOuterClass.CalculateFeeResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CalculateFeeResponse buildPartial() {\n        pactus.TransactionOuterClass.CalculateFeeResponse result = new pactus.TransactionOuterClass.CalculateFeeResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.CalculateFeeResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.amount_ = amount_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.fee_ = fee_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.CalculateFeeResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.CalculateFeeResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.CalculateFeeResponse other) {\n        if (other == pactus.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance()) return this;\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 16: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The calculated amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The calculated amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The calculated amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 1 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The calculated transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 2 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The calculated transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 2 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The calculated transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 2 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CalculateFeeResponse)\n    private static final pactus.TransactionOuterClass.CalculateFeeResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.CalculateFeeResponse();\n    }\n\n    public static pactus.TransactionOuterClass.CalculateFeeResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CalculateFeeResponse>\n        PARSER = new com.google.protobuf.AbstractParser<CalculateFeeResponse>() {\n      @java.lang.Override\n      public CalculateFeeResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CalculateFeeResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CalculateFeeResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface BroadcastTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The signed raw transaction data to be broadcasted.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n     * @return The signedRawTransaction.\n     */\n    java.lang.String getSignedRawTransaction();\n    /**\n     * <pre>\n     * The signed raw transaction data to be broadcasted.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n     * @return The bytes for signedRawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getSignedRawTransactionBytes();\n  }\n  /**\n   * <pre>\n   * Request message for broadcasting a signed transaction to the network.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.BroadcastTransactionRequest}\n   */\n  public static final class BroadcastTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionRequest)\n      BroadcastTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"BroadcastTransactionRequest\");\n    }\n    // Use BroadcastTransactionRequest.newBuilder() to construct.\n    private BroadcastTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private BroadcastTransactionRequest() {\n      signedRawTransaction_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.TransactionOuterClass.BroadcastTransactionRequest.Builder.class);\n    }\n\n    public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signedRawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The signed raw transaction data to be broadcasted.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n     * @return The signedRawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getSignedRawTransaction() {\n      java.lang.Object ref = signedRawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signedRawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signed raw transaction data to be broadcasted.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n     * @return The bytes for signedRawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignedRawTransactionBytes() {\n      java.lang.Object ref = signedRawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signedRawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, signedRawTransaction_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signedRawTransaction_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.BroadcastTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.BroadcastTransactionRequest other = (pactus.TransactionOuterClass.BroadcastTransactionRequest) obj;\n\n      if (!getSignedRawTransaction()\n          .equals(other.getSignedRawTransaction())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getSignedRawTransaction().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.BroadcastTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for broadcasting a signed transaction to the network.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.BroadcastTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionRequest)\n        pactus.TransactionOuterClass.BroadcastTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.TransactionOuterClass.BroadcastTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.BroadcastTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        signedRawTransaction_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionRequest build() {\n        pactus.TransactionOuterClass.BroadcastTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.BroadcastTransactionRequest result = new pactus.TransactionOuterClass.BroadcastTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.BroadcastTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.signedRawTransaction_ = signedRawTransaction_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.BroadcastTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.BroadcastTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.BroadcastTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance()) return this;\n        if (!other.getSignedRawTransaction().isEmpty()) {\n          signedRawTransaction_ = other.signedRawTransaction_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                signedRawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object signedRawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The signed raw transaction data to be broadcasted.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n       * @return The signedRawTransaction.\n       */\n      public java.lang.String getSignedRawTransaction() {\n        java.lang.Object ref = signedRawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signedRawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data to be broadcasted.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n       * @return The bytes for signedRawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getSignedRawTransactionBytes() {\n        java.lang.Object ref = signedRawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signedRawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data to be broadcasted.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n       * @param value The signedRawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignedRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signedRawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data to be broadcasted.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignedRawTransaction() {\n        signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data to be broadcasted.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 1 [json_name = \"signedRawTransaction\"];</code>\n       * @param value The bytes for signedRawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignedRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signedRawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionRequest)\n    private static final pactus.TransactionOuterClass.BroadcastTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.BroadcastTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<BroadcastTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<BroadcastTransactionRequest>() {\n      @java.lang.Override\n      public BroadcastTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<BroadcastTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<BroadcastTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface BroadcastTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The unique ID of the broadcasted transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    java.lang.String getId();\n    /**\n     * <pre>\n     * The unique ID of the broadcasted transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    com.google.protobuf.ByteString\n        getIdBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the ID of the broadcasted transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.BroadcastTransactionResponse}\n   */\n  public static final class BroadcastTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionResponse)\n      BroadcastTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"BroadcastTransactionResponse\");\n    }\n    // Use BroadcastTransactionResponse.newBuilder() to construct.\n    private BroadcastTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private BroadcastTransactionResponse() {\n      id_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.TransactionOuterClass.BroadcastTransactionResponse.Builder.class);\n    }\n\n    public static final int ID_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object id_ = \"\";\n    /**\n     * <pre>\n     * The unique ID of the broadcasted transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    @java.lang.Override\n    public java.lang.String getId() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        id_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The unique ID of the broadcasted transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getIdBytes() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        id_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.BroadcastTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.BroadcastTransactionResponse other = (pactus.TransactionOuterClass.BroadcastTransactionResponse) obj;\n\n      if (!getId()\n          .equals(other.getId())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ID_FIELD_NUMBER;\n      hash = (53 * hash) + getId().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.BroadcastTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the ID of the broadcasted transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.BroadcastTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionResponse)\n        pactus.TransactionOuterClass.BroadcastTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.TransactionOuterClass.BroadcastTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.BroadcastTransactionResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        id_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionResponse build() {\n        pactus.TransactionOuterClass.BroadcastTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.BroadcastTransactionResponse buildPartial() {\n        pactus.TransactionOuterClass.BroadcastTransactionResponse result = new pactus.TransactionOuterClass.BroadcastTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.BroadcastTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.id_ = id_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.BroadcastTransactionResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.BroadcastTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.BroadcastTransactionResponse other) {\n        if (other == pactus.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance()) return this;\n        if (!other.getId().isEmpty()) {\n          id_ = other.id_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                id_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object id_ = \"\";\n      /**\n       * <pre>\n       * The unique ID of the broadcasted transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The id.\n       */\n      public java.lang.String getId() {\n        java.lang.Object ref = id_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          id_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the broadcasted transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The bytes for id.\n       */\n      public com.google.protobuf.ByteString\n          getIdBytes() {\n        java.lang.Object ref = id_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          id_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the broadcasted transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the broadcasted transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearId() {\n        id_ = getDefaultInstance().getId();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the broadcasted transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The bytes for id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionResponse)\n    private static final pactus.TransactionOuterClass.BroadcastTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.BroadcastTransactionResponse();\n    }\n\n    public static pactus.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<BroadcastTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<BroadcastTransactionResponse>() {\n      @java.lang.Override\n      public BroadcastTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<BroadcastTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<BroadcastTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawTransferTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawTransferTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The receiver's account address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's account address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving raw details of a transfer transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawTransferTransactionRequest}\n   */\n  public static final class GetRawTransferTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawTransferTransactionRequest)\n      GetRawTransferTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawTransferTransactionRequest\");\n    }\n    // Use GetRawTransferTransactionRequest.newBuilder() to construct.\n    private GetRawTransferTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawTransferTransactionRequest() {\n      sender_ = \"\";\n      receiver_ = \"\";\n      memo_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class);\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 1;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's account address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's account address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 4;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    public static final int FEE_FIELD_NUMBER = 5;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 6;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lockTime_ != 0) {\n        output.writeUInt32(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, receiver_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(4, amount_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(5, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 6, memo_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, receiver_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(4, amount_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(5, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, memo_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawTransferTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawTransferTransactionRequest other = (pactus.TransactionOuterClass.GetRawTransferTransactionRequest) obj;\n\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawTransferTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving raw details of a transfer transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawTransferTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawTransferTransactionRequest)\n        pactus.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lockTime_ = 0;\n        sender_ = \"\";\n        receiver_ = \"\";\n        amount_ = 0L;\n        fee_ = 0L;\n        memo_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransferTransactionRequest build() {\n        pactus.TransactionOuterClass.GetRawTransferTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransferTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetRawTransferTransactionRequest result = new pactus.TransactionOuterClass.GetRawTransferTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawTransferTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.amount_ = amount_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.memo_ = memo_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawTransferTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawTransferTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawTransferTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) return this;\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000020;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 50: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 50\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's account address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's account address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's account address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's account address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's account address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000020);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawTransferTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawTransferTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetRawTransferTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawTransferTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawTransferTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawTransferTransactionRequest>() {\n      @java.lang.Override\n      public GetRawTransferTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawTransferTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawTransferTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawBondTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawBondTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The receiver's validator address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's validator address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The stake amount in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 stake = 4 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    long getStake();\n\n    /**\n     * <pre>\n     * The public key of the validator.\n     * Optional, but required when registering a new validator.;\n     * </pre>\n     *\n     * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key of the validator.\n     * Optional, but required when registering a new validator.;\n     * </pre>\n     *\n     * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 7 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 7 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    java.lang.String getDelegateOwner();\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    com.google.protobuf.ByteString\n        getDelegateOwnerBytes();\n\n    /**\n     * <pre>\n     * The share percentage for the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * Must be between 0 and 0.7 PAC in nano PAC.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 9 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    long getDelegateShare();\n\n    /**\n     * <pre>\n     * The expiry height for the delegate relationship.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 10 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    int getDelegateExpiry();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving raw details of a bond transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawBondTransactionRequest}\n   */\n  public static final class GetRawBondTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawBondTransactionRequest)\n      GetRawBondTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawBondTransactionRequest\");\n    }\n    // Use GetRawBondTransactionRequest.newBuilder() to construct.\n    private GetRawBondTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawBondTransactionRequest() {\n      sender_ = \"\";\n      receiver_ = \"\";\n      publicKey_ = \"\";\n      memo_ = \"\";\n      delegateOwner_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class);\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 1;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's validator address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's validator address.\n     * </pre>\n     *\n     * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int STAKE_FIELD_NUMBER = 4;\n    private long stake_ = 0L;\n    /**\n     * <pre>\n     * The stake amount in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 stake = 4 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    @java.lang.Override\n    public long getStake() {\n      return stake_;\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key of the validator.\n     * Optional, but required when registering a new validator.;\n     * </pre>\n     *\n     * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key of the validator.\n     * Optional, but required when registering a new validator.;\n     * </pre>\n     *\n     * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int FEE_FIELD_NUMBER = 6;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 7;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 7 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 7 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_OWNER_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object delegateOwner_ = \"\";\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    @java.lang.Override\n    public java.lang.String getDelegateOwner() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        delegateOwner_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDelegateOwnerBytes() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        delegateOwner_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_SHARE_FIELD_NUMBER = 9;\n    private long delegateShare_ = 0L;\n    /**\n     * <pre>\n     * The share percentage for the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * Must be between 0 and 0.7 PAC in nano PAC.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 9 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    @java.lang.Override\n    public long getDelegateShare() {\n      return delegateShare_;\n    }\n\n    public static final int DELEGATE_EXPIRY_FIELD_NUMBER = 10;\n    private int delegateExpiry_ = 0;\n    /**\n     * <pre>\n     * The expiry height for the delegate relationship.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 10 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    @java.lang.Override\n    public int getDelegateExpiry() {\n      return delegateExpiry_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lockTime_ != 0) {\n        output.writeUInt32(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, receiver_);\n      }\n      if (stake_ != 0L) {\n        output.writeInt64(4, stake_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, publicKey_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(6, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 7, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        output.writeInt64(9, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        output.writeUInt32(10, delegateExpiry_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, receiver_);\n      }\n      if (stake_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(4, stake_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, publicKey_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(6, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(7, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(9, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(10, delegateExpiry_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawBondTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawBondTransactionRequest other = (pactus.TransactionOuterClass.GetRawBondTransactionRequest) obj;\n\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (getStake()\n          != other.getStake()) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getDelegateOwner()\n          .equals(other.getDelegateOwner())) return false;\n      if (getDelegateShare()\n          != other.getDelegateShare()) return false;\n      if (getDelegateExpiry()\n          != other.getDelegateExpiry()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + STAKE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getStake());\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (37 * hash) + DELEGATE_OWNER_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateOwner().hashCode();\n      hash = (37 * hash) + DELEGATE_SHARE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getDelegateShare());\n      hash = (37 * hash) + DELEGATE_EXPIRY_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateExpiry();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawBondTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving raw details of a bond transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawBondTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawBondTransactionRequest)\n        pactus.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lockTime_ = 0;\n        sender_ = \"\";\n        receiver_ = \"\";\n        stake_ = 0L;\n        publicKey_ = \"\";\n        fee_ = 0L;\n        memo_ = \"\";\n        delegateOwner_ = \"\";\n        delegateShare_ = 0L;\n        delegateExpiry_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBondTransactionRequest build() {\n        pactus.TransactionOuterClass.GetRawBondTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBondTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetRawBondTransactionRequest result = new pactus.TransactionOuterClass.GetRawBondTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawBondTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.stake_ = stake_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.memo_ = memo_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.delegateOwner_ = delegateOwner_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.delegateShare_ = delegateShare_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.delegateExpiry_ = delegateExpiry_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawBondTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawBondTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawBondTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) return this;\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getStake() != 0L) {\n          setStake(other.getStake());\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000040;\n          onChanged();\n        }\n        if (!other.getDelegateOwner().isEmpty()) {\n          delegateOwner_ = other.delegateOwner_;\n          bitField0_ |= 0x00000080;\n          onChanged();\n        }\n        if (other.getDelegateShare() != 0L) {\n          setDelegateShare(other.getDelegateShare());\n        }\n        if (other.getDelegateExpiry() != 0) {\n          setDelegateExpiry(other.getDelegateExpiry());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                stake_ = input.readInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              case 48: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 58: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 58\n              case 66: {\n                delegateOwner_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 66\n              case 72: {\n                delegateShare_ = input.readInt64();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 72\n              case 80: {\n                delegateExpiry_ = input.readUInt32();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 80\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's validator address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's validator address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's validator address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's validator address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's validator address.\n       * </pre>\n       *\n       * <code>string receiver = 3 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private long stake_ ;\n      /**\n       * <pre>\n       * The stake amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 stake = 4 [json_name = \"stake\"];</code>\n       * @return The stake.\n       */\n      @java.lang.Override\n      public long getStake() {\n        return stake_;\n      }\n      /**\n       * <pre>\n       * The stake amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 stake = 4 [json_name = \"stake\"];</code>\n       * @param value The stake to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStake(long value) {\n\n        stake_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The stake amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 stake = 4 [json_name = \"stake\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStake() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        stake_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key of the validator.\n       * Optional, but required when registering a new validator.;\n       * </pre>\n       *\n       * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * Optional, but required when registering a new validator.;\n       * </pre>\n       *\n       * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * Optional, but required when registering a new validator.;\n       * </pre>\n       *\n       * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * Optional, but required when registering a new validator.;\n       * </pre>\n       *\n       * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * Optional, but required when registering a new validator.;\n       * </pre>\n       *\n       * <code>string public_key = 5 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 7 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 7 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 7 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 7 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000040);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 7 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object delegateOwner_ = \"\";\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n       * @return The delegateOwner.\n       */\n      public java.lang.String getDelegateOwner() {\n        java.lang.Object ref = delegateOwner_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          delegateOwner_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n       * @return The bytes for delegateOwner.\n       */\n      public com.google.protobuf.ByteString\n          getDelegateOwnerBytes() {\n        java.lang.Object ref = delegateOwner_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          delegateOwner_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n       * @param value The delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwner(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateOwner() {\n        delegateOwner_ = getDefaultInstance().getDelegateOwner();\n        bitField0_ = (bitField0_ & ~0x00000080);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 8 [json_name = \"delegateOwner\"];</code>\n       * @param value The bytes for delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwnerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n\n      private long delegateShare_ ;\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 9 [json_name = \"delegateShare\"];</code>\n       * @return The delegateShare.\n       */\n      @java.lang.Override\n      public long getDelegateShare() {\n        return delegateShare_;\n      }\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 9 [json_name = \"delegateShare\"];</code>\n       * @param value The delegateShare to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateShare(long value) {\n\n        delegateShare_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 9 [json_name = \"delegateShare\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateShare() {\n        bitField0_ = (bitField0_ & ~0x00000100);\n        delegateShare_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int delegateExpiry_ ;\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 10 [json_name = \"delegateExpiry\"];</code>\n       * @return The delegateExpiry.\n       */\n      @java.lang.Override\n      public int getDelegateExpiry() {\n        return delegateExpiry_;\n      }\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 10 [json_name = \"delegateExpiry\"];</code>\n       * @param value The delegateExpiry to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateExpiry(int value) {\n\n        delegateExpiry_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 10 [json_name = \"delegateExpiry\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateExpiry() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        delegateExpiry_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawBondTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawBondTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetRawBondTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawBondTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawBondTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawBondTransactionRequest>() {\n      @java.lang.Override\n      public GetRawBondTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawBondTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawBondTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawUnbondTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawUnbondTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    java.lang.String getValidatorAddress();\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    com.google.protobuf.ByteString\n        getValidatorAddressBytes();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 3 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 3 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    java.lang.String getDelegateOwner();\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    com.google.protobuf.ByteString\n        getDelegateOwnerBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving raw details of an unbond transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawUnbondTransactionRequest}\n   */\n  public static final class GetRawUnbondTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawUnbondTransactionRequest)\n      GetRawUnbondTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawUnbondTransactionRequest\");\n    }\n    // Use GetRawUnbondTransactionRequest.newBuilder() to construct.\n    private GetRawUnbondTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawUnbondTransactionRequest() {\n      validatorAddress_ = \"\";\n      memo_ = \"\";\n      delegateOwner_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class);\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 1;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object validatorAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getValidatorAddress() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        validatorAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getValidatorAddressBytes() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        validatorAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 3 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 3 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_OWNER_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object delegateOwner_ = \"\";\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    @java.lang.Override\n    public java.lang.String getDelegateOwner() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        delegateOwner_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDelegateOwnerBytes() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        delegateOwner_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lockTime_ != 0) {\n        output.writeUInt32(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, delegateOwner_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, delegateOwner_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawUnbondTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawUnbondTransactionRequest other = (pactus.TransactionOuterClass.GetRawUnbondTransactionRequest) obj;\n\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (!getValidatorAddress()\n          .equals(other.getValidatorAddress())) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getDelegateOwner()\n          .equals(other.getDelegateOwner())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getValidatorAddress().hashCode();\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (37 * hash) + DELEGATE_OWNER_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateOwner().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving raw details of an unbond transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawUnbondTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawUnbondTransactionRequest)\n        pactus.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lockTime_ = 0;\n        validatorAddress_ = \"\";\n        memo_ = \"\";\n        delegateOwner_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawUnbondTransactionRequest build() {\n        pactus.TransactionOuterClass.GetRawUnbondTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawUnbondTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetRawUnbondTransactionRequest result = new pactus.TransactionOuterClass.GetRawUnbondTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.validatorAddress_ = validatorAddress_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.memo_ = memo_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.delegateOwner_ = delegateOwner_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawUnbondTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawUnbondTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawUnbondTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) return this;\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (!other.getValidatorAddress().isEmpty()) {\n          validatorAddress_ = other.validatorAddress_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getDelegateOwner().isEmpty()) {\n          delegateOwner_ = other.delegateOwner_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                validatorAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                delegateOwner_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object validatorAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return The validatorAddress.\n       */\n      public java.lang.String getValidatorAddress() {\n        java.lang.Object ref = validatorAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          validatorAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return The bytes for validatorAddress.\n       */\n      public com.google.protobuf.ByteString\n          getValidatorAddressBytes() {\n        java.lang.Object ref = validatorAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          validatorAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @param value The validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearValidatorAddress() {\n        validatorAddress_ = getDefaultInstance().getValidatorAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @param value The bytes for validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 3 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 3 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 3 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 3 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 3 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object delegateOwner_ = \"\";\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n       * @return The delegateOwner.\n       */\n      public java.lang.String getDelegateOwner() {\n        java.lang.Object ref = delegateOwner_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          delegateOwner_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n       * @return The bytes for delegateOwner.\n       */\n      public com.google.protobuf.ByteString\n          getDelegateOwnerBytes() {\n        java.lang.Object ref = delegateOwner_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          delegateOwner_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n       * @param value The delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwner(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateOwner() {\n        delegateOwner_ = getDefaultInstance().getDelegateOwner();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 4 [json_name = \"delegateOwner\"];</code>\n       * @param value The bytes for delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwnerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawUnbondTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawUnbondTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetRawUnbondTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawUnbondTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawUnbondTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawUnbondTransactionRequest>() {\n      @java.lang.Override\n      public GetRawUnbondTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawUnbondTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawUnbondTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawWithdrawTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawWithdrawTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    java.lang.String getValidatorAddress();\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    com.google.protobuf.ByteString\n        getValidatorAddressBytes();\n\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n     * @return The accountAddress.\n     */\n    java.lang.String getAccountAddress();\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n     * @return The bytes for accountAddress.\n     */\n    com.google.protobuf.ByteString\n        getAccountAddressBytes();\n\n    /**\n     * <pre>\n     * The withdrawal amount in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving raw details of a withdraw transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest}\n   */\n  public static final class GetRawWithdrawTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawWithdrawTransactionRequest)\n      GetRawWithdrawTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawWithdrawTransactionRequest\");\n    }\n    // Use GetRawWithdrawTransactionRequest.newBuilder() to construct.\n    private GetRawWithdrawTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawWithdrawTransactionRequest() {\n      validatorAddress_ = \"\";\n      accountAddress_ = \"\";\n      memo_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class);\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 1;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object validatorAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getValidatorAddress() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        validatorAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getValidatorAddressBytes() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        validatorAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object accountAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n     * @return The accountAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getAccountAddress() {\n      java.lang.Object ref = accountAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        accountAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n     * @return The bytes for accountAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAccountAddressBytes() {\n      java.lang.Object ref = accountAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        accountAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 4;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The withdrawal amount in NanoPAC. Must be greater than 0.\n     * </pre>\n     *\n     * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    public static final int FEE_FIELD_NUMBER = 5;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 6;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 6 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lockTime_ != 0) {\n        output.writeUInt32(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, accountAddress_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(4, amount_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(5, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 6, memo_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, accountAddress_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(4, amount_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(5, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, memo_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest other = (pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest) obj;\n\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (!getValidatorAddress()\n          .equals(other.getValidatorAddress())) return false;\n      if (!getAccountAddress()\n          .equals(other.getAccountAddress())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getValidatorAddress().hashCode();\n      hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAccountAddress().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving raw details of a withdraw transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawWithdrawTransactionRequest)\n        pactus.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lockTime_ = 0;\n        validatorAddress_ = \"\";\n        accountAddress_ = \"\";\n        amount_ = 0L;\n        fee_ = 0L;\n        memo_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest build() {\n        pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest result = new pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.validatorAddress_ = validatorAddress_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.accountAddress_ = accountAddress_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.amount_ = amount_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.memo_ = memo_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) return this;\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (!other.getValidatorAddress().isEmpty()) {\n          validatorAddress_ = other.validatorAddress_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getAccountAddress().isEmpty()) {\n          accountAddress_ = other.accountAddress_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000020;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                validatorAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                accountAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 50: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 50\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object validatorAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return The validatorAddress.\n       */\n      public java.lang.String getValidatorAddress() {\n        java.lang.Object ref = validatorAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          validatorAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return The bytes for validatorAddress.\n       */\n      public com.google.protobuf.ByteString\n          getValidatorAddressBytes() {\n        java.lang.Object ref = validatorAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          validatorAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @param value The validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearValidatorAddress() {\n        validatorAddress_ = getDefaultInstance().getValidatorAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 2 [json_name = \"validatorAddress\"];</code>\n       * @param value The bytes for validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object accountAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n       * @return The accountAddress.\n       */\n      public java.lang.String getAccountAddress() {\n        java.lang.Object ref = accountAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          accountAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n       * @return The bytes for accountAddress.\n       */\n      public com.google.protobuf.ByteString\n          getAccountAddressBytes() {\n        java.lang.Object ref = accountAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          accountAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n       * @param value The accountAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAccountAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        accountAddress_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAccountAddress() {\n        accountAddress_ = getDefaultInstance().getAccountAddress();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 3 [json_name = \"accountAddress\"];</code>\n       * @param value The bytes for accountAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAccountAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        accountAddress_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC. Must be greater than 0.\n       * </pre>\n       *\n       * <code>int64 amount = 4 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 5 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000020);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 6 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawWithdrawTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawWithdrawTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawWithdrawTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawWithdrawTransactionRequest>() {\n      @java.lang.Override\n      public GetRawWithdrawTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawWithdrawTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawWithdrawTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawBatchTransferTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawBatchTransferTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    java.util.List<pactus.TransactionOuterClass.Recipient> \n        getRecipientsList();\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    pactus.TransactionOuterClass.Recipient getRecipients(int index);\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    int getRecipientsCount();\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n        getRecipientsOrBuilderList();\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n        int index);\n\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 4 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 5 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 5 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n  }\n  /**\n   * <pre>\n   * Request message for retrieving raw details of a batch transfer transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawBatchTransferTransactionRequest}\n   */\n  public static final class GetRawBatchTransferTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawBatchTransferTransactionRequest)\n      GetRawBatchTransferTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawBatchTransferTransactionRequest\");\n    }\n    // Use GetRawBatchTransferTransactionRequest.newBuilder() to construct.\n    private GetRawBatchTransferTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawBatchTransferTransactionRequest() {\n      sender_ = \"\";\n      recipients_ = java.util.Collections.emptyList();\n      memo_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawBatchTransferTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.class, pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.Builder.class);\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 1;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction. If not set, defaults to the last block height.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's account address.\n     * </pre>\n     *\n     * <code>string sender = 2 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECIPIENTS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.TransactionOuterClass.Recipient> recipients_;\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.TransactionOuterClass.Recipient> getRecipientsList() {\n      return recipients_;\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n        getRecipientsOrBuilderList() {\n      return recipients_;\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public int getRecipientsCount() {\n      return recipients_.size();\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.Recipient getRecipients(int index) {\n      return recipients_.get(index);\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts. Minimum 2 recipients required.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n        int index) {\n      return recipients_.get(index);\n    }\n\n    public static final int FEE_FIELD_NUMBER = 4;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n     * </pre>\n     *\n     * <code>int64 fee = 4 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 5 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 5 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (lockTime_ != 0) {\n        output.writeUInt32(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, sender_);\n      }\n      for (int i = 0; i < recipients_.size(); i++) {\n        output.writeMessage(3, recipients_.get(i));\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(4, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, memo_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(1, lockTime_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sender_);\n      }\n      for (int i = 0; i < recipients_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(3, recipients_.get(i));\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(4, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, memo_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest other = (pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest) obj;\n\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getRecipientsList()\n          .equals(other.getRecipientsList())) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      if (getRecipientsCount() > 0) {\n        hash = (37 * hash) + RECIPIENTS_FIELD_NUMBER;\n        hash = (53 * hash) + getRecipientsList().hashCode();\n      }\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for retrieving raw details of a batch transfer transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawBatchTransferTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawBatchTransferTransactionRequest)\n        pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBatchTransferTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.class, pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        lockTime_ = 0;\n        sender_ = \"\";\n        if (recipientsBuilder_ == null) {\n          recipients_ = java.util.Collections.emptyList();\n        } else {\n          recipients_ = null;\n          recipientsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000004);\n        fee_ = 0L;\n        memo_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest build() {\n        pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest result = new pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest result) {\n        if (recipientsBuilder_ == null) {\n          if (((bitField0_ & 0x00000004) != 0)) {\n            recipients_ = java.util.Collections.unmodifiableList(recipients_);\n            bitField0_ = (bitField0_ & ~0x00000004);\n          }\n          result.recipients_ = recipients_;\n        } else {\n          result.recipients_ = recipientsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.memo_ = memo_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest.getDefaultInstance()) return this;\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (recipientsBuilder_ == null) {\n          if (!other.recipients_.isEmpty()) {\n            if (recipients_.isEmpty()) {\n              recipients_ = other.recipients_;\n              bitField0_ = (bitField0_ & ~0x00000004);\n            } else {\n              ensureRecipientsIsMutable();\n              recipients_.addAll(other.recipients_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.recipients_.isEmpty()) {\n            if (recipientsBuilder_.isEmpty()) {\n              recipientsBuilder_.dispose();\n              recipientsBuilder_ = null;\n              recipients_ = other.recipients_;\n              bitField0_ = (bitField0_ & ~0x00000004);\n              recipientsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetRecipientsFieldBuilder() : null;\n            } else {\n              recipientsBuilder_.addAllMessages(other.recipients_);\n            }\n          }\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                pactus.TransactionOuterClass.Recipient m =\n                    input.readMessage(\n                        pactus.TransactionOuterClass.Recipient.parser(),\n                        extensionRegistry);\n                if (recipientsBuilder_ == null) {\n                  ensureRecipientsIsMutable();\n                  recipients_.add(m);\n                } else {\n                  recipientsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 26\n              case 32: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction. If not set, defaults to the last block height.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 1 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's account address.\n       * </pre>\n       *\n       * <code>string sender = 2 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.TransactionOuterClass.Recipient> recipients_ =\n        java.util.Collections.emptyList();\n      private void ensureRecipientsIsMutable() {\n        if (!((bitField0_ & 0x00000004) != 0)) {\n          recipients_ = new java.util.ArrayList<pactus.TransactionOuterClass.Recipient>(recipients_);\n          bitField0_ |= 0x00000004;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder> recipientsBuilder_;\n\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.Recipient> getRecipientsList() {\n        if (recipientsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(recipients_);\n        } else {\n          return recipientsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public int getRecipientsCount() {\n        if (recipientsBuilder_ == null) {\n          return recipients_.size();\n        } else {\n          return recipientsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient getRecipients(int index) {\n        if (recipientsBuilder_ == null) {\n          return recipients_.get(index);\n        } else {\n          return recipientsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder setRecipients(\n          int index, pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.set(index, value);\n          onChanged();\n        } else {\n          recipientsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder setRecipients(\n          int index, pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.add(value);\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          int index, pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.add(index, value);\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.add(builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          int index, pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder addAllRecipients(\n          java.lang.Iterable<? extends pactus.TransactionOuterClass.Recipient> values) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, recipients_);\n          onChanged();\n        } else {\n          recipientsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder clearRecipients() {\n        if (recipientsBuilder_ == null) {\n          recipients_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000004);\n          onChanged();\n        } else {\n          recipientsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public Builder removeRecipients(int index) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.remove(index);\n          onChanged();\n        } else {\n          recipientsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder getRecipientsBuilder(\n          int index) {\n        return internalGetRecipientsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n          int index) {\n        if (recipientsBuilder_ == null) {\n          return recipients_.get(index);  } else {\n          return recipientsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n           getRecipientsOrBuilderList() {\n        if (recipientsBuilder_ != null) {\n          return recipientsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(recipients_);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder addRecipientsBuilder() {\n        return internalGetRecipientsFieldBuilder().addBuilder(\n            pactus.TransactionOuterClass.Recipient.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder addRecipientsBuilder(\n          int index) {\n        return internalGetRecipientsFieldBuilder().addBuilder(\n            index, pactus.TransactionOuterClass.Recipient.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts. Minimum 2 recipients required.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 3 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.Recipient.Builder> \n           getRecipientsBuilderList() {\n        return internalGetRecipientsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder> \n          internalGetRecipientsFieldBuilder() {\n        if (recipientsBuilder_ == null) {\n          recipientsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder>(\n                  recipients_,\n                  ((bitField0_ & 0x00000004) != 0),\n                  getParentForChildren(),\n                  isClean());\n          recipients_ = null;\n        }\n        return recipientsBuilder_;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 4 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 4 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n       * </pre>\n       *\n       * <code>int64 fee = 4 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 5 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 5 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 5 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 5 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 5 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawBatchTransferTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawBatchTransferTransactionRequest)\n    private static final pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawBatchTransferTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawBatchTransferTransactionRequest>() {\n      @java.lang.Override\n      public GetRawBatchTransferTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawBatchTransferTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawBatchTransferTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawBatchTransferTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetRawTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    java.lang.String getRawTransaction();\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getRawTransactionBytes();\n\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 2 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    java.lang.String getId();\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 2 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    com.google.protobuf.ByteString\n        getIdBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains raw transaction data.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetRawTransactionResponse}\n   */\n  public static final class GetRawTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionResponse)\n      GetRawTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetRawTransactionResponse\");\n    }\n    // Use GetRawTransactionResponse.newBuilder() to construct.\n    private GetRawTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetRawTransactionResponse() {\n      rawTransaction_ = \"\";\n      id_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.GetRawTransactionResponse.class, pactus.TransactionOuterClass.GetRawTransactionResponse.Builder.class);\n    }\n\n    public static final int RAW_TRANSACTION_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object rawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getRawTransaction() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        rawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getRawTransactionBytes() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        rawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ID_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object id_ = \"\";\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 2 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    @java.lang.Override\n    public java.lang.String getId() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        id_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 2 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getIdBytes() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        id_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, rawTransaction_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, id_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, rawTransaction_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.GetRawTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.GetRawTransactionResponse other = (pactus.TransactionOuterClass.GetRawTransactionResponse) obj;\n\n      if (!getRawTransaction()\n          .equals(other.getRawTransaction())) return false;\n      if (!getId()\n          .equals(other.getId())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getRawTransaction().hashCode();\n      hash = (37 * hash) + ID_FIELD_NUMBER;\n      hash = (53 * hash) + getId().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.GetRawTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains raw transaction data.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetRawTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetRawTransactionResponse)\n        pactus.TransactionOuterClass.GetRawTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.GetRawTransactionResponse.class, pactus.TransactionOuterClass.GetRawTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.GetRawTransactionResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        rawTransaction_ = \"\";\n        id_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransactionResponse build() {\n        pactus.TransactionOuterClass.GetRawTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.GetRawTransactionResponse buildPartial() {\n        pactus.TransactionOuterClass.GetRawTransactionResponse result = new pactus.TransactionOuterClass.GetRawTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.GetRawTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.rawTransaction_ = rawTransaction_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.id_ = id_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.GetRawTransactionResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.GetRawTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.GetRawTransactionResponse other) {\n        if (other == pactus.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()) return this;\n        if (!other.getRawTransaction().isEmpty()) {\n          rawTransaction_ = other.rawTransaction_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getId().isEmpty()) {\n          id_ = other.id_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                rawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                id_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object rawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The rawTransaction.\n       */\n      public java.lang.String getRawTransaction() {\n        java.lang.Object ref = rawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          rawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The bytes for rawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getRawTransactionBytes() {\n        java.lang.Object ref = rawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          rawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRawTransaction() {\n        rawTransaction_ = getDefaultInstance().getRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The bytes for rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object id_ = \"\";\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 2 [json_name = \"id\"];</code>\n       * @return The id.\n       */\n      public java.lang.String getId() {\n        java.lang.Object ref = id_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          id_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 2 [json_name = \"id\"];</code>\n       * @return The bytes for id.\n       */\n      public com.google.protobuf.ByteString\n          getIdBytes() {\n        java.lang.Object ref = id_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          id_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 2 [json_name = \"id\"];</code>\n       * @param value The id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        id_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 2 [json_name = \"id\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearId() {\n        id_ = getDefaultInstance().getId();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 2 [json_name = \"id\"];</code>\n       * @param value The bytes for id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        id_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetRawTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetRawTransactionResponse)\n    private static final pactus.TransactionOuterClass.GetRawTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.GetRawTransactionResponse();\n    }\n\n    public static pactus.TransactionOuterClass.GetRawTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetRawTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetRawTransactionResponse>() {\n      @java.lang.Override\n      public GetRawTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetRawTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetRawTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadTransferOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadTransfer)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The amount to be transferred in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n  }\n  /**\n   * <pre>\n   * Payload for a transfer transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadTransfer}\n   */\n  public static final class PayloadTransfer extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadTransfer)\n      PayloadTransferOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadTransfer\");\n    }\n    // Use PayloadTransfer.newBuilder() to construct.\n    private PayloadTransfer(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadTransfer() {\n      sender_ = \"\";\n      receiver_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadTransfer.class, pactus.TransactionOuterClass.PayloadTransfer.Builder.class);\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 3;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The amount to be transferred in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, receiver_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(3, amount_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, receiver_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(3, amount_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadTransfer)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadTransfer other = (pactus.TransactionOuterClass.PayloadTransfer) obj;\n\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadTransfer parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadTransfer parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadTransfer parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadTransfer prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for a transfer transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadTransfer}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadTransfer)\n        pactus.TransactionOuterClass.PayloadTransferOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadTransfer.class, pactus.TransactionOuterClass.PayloadTransfer.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadTransfer.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        sender_ = \"\";\n        receiver_ = \"\";\n        amount_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadTransfer build() {\n        pactus.TransactionOuterClass.PayloadTransfer result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadTransfer buildPartial() {\n        pactus.TransactionOuterClass.PayloadTransfer result = new pactus.TransactionOuterClass.PayloadTransfer(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadTransfer result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.amount_ = amount_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadTransfer) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadTransfer)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadTransfer other) {\n        if (other == pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) return this;\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The amount to be transferred in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The amount to be transferred in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The amount to be transferred in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadTransfer)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadTransfer)\n    private static final pactus.TransactionOuterClass.PayloadTransfer DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadTransfer();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadTransfer getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadTransfer>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadTransfer>() {\n      @java.lang.Override\n      public PayloadTransfer parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadTransfer> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadTransfer> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadBondOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadBond)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The stake amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 stake = 3 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    long getStake();\n\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * Indicates whether the bond transaction is a delegation.\n     * </pre>\n     *\n     * <code>bool is_delegated = 5 [json_name = \"isDelegated\"];</code>\n     * @return The isDelegated.\n     */\n    boolean getIsDelegated();\n\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    java.lang.String getDelegateOwner();\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    com.google.protobuf.ByteString\n        getDelegateOwnerBytes();\n\n    /**\n     * <pre>\n     * The share percentage for the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * Must be between 0 and 0.7 PAC in nano PAC.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 7 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    long getDelegateShare();\n\n    /**\n     * <pre>\n     * The expiry height for the delegate relationship.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 8 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    int getDelegateExpiry();\n  }\n  /**\n   * <pre>\n   * Payload for a bond transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadBond}\n   */\n  public static final class PayloadBond extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadBond)\n      PayloadBondOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadBond\");\n    }\n    // Use PayloadBond.newBuilder() to construct.\n    private PayloadBond(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadBond() {\n      sender_ = \"\";\n      receiver_ = \"\";\n      publicKey_ = \"\";\n      delegateOwner_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadBond.class, pactus.TransactionOuterClass.PayloadBond.Builder.class);\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int STAKE_FIELD_NUMBER = 3;\n    private long stake_ = 0L;\n    /**\n     * <pre>\n     * The stake amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 stake = 3 [json_name = \"stake\"];</code>\n     * @return The stake.\n     */\n    @java.lang.Override\n    public long getStake() {\n      return stake_;\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int IS_DELEGATED_FIELD_NUMBER = 5;\n    private boolean isDelegated_ = false;\n    /**\n     * <pre>\n     * Indicates whether the bond transaction is a delegation.\n     * </pre>\n     *\n     * <code>bool is_delegated = 5 [json_name = \"isDelegated\"];</code>\n     * @return The isDelegated.\n     */\n    @java.lang.Override\n    public boolean getIsDelegated() {\n      return isDelegated_;\n    }\n\n    public static final int DELEGATE_OWNER_FIELD_NUMBER = 6;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object delegateOwner_ = \"\";\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    @java.lang.Override\n    public java.lang.String getDelegateOwner() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        delegateOwner_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDelegateOwnerBytes() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        delegateOwner_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_SHARE_FIELD_NUMBER = 7;\n    private long delegateShare_ = 0L;\n    /**\n     * <pre>\n     * The share percentage for the delegate owner.\n     * Optional, but required when registering a new validator with delegation.;\n     * Must be between 0 and 0.7 PAC in nano PAC.\n     * </pre>\n     *\n     * <code>int64 delegate_share = 7 [json_name = \"delegateShare\"];</code>\n     * @return The delegateShare.\n     */\n    @java.lang.Override\n    public long getDelegateShare() {\n      return delegateShare_;\n    }\n\n    public static final int DELEGATE_EXPIRY_FIELD_NUMBER = 8;\n    private int delegateExpiry_ = 0;\n    /**\n     * <pre>\n     * The expiry height for the delegate relationship.\n     * Optional, but required when registering a new validator with delegation.;\n     * </pre>\n     *\n     * <code>uint32 delegate_expiry = 8 [json_name = \"delegateExpiry\"];</code>\n     * @return The delegateExpiry.\n     */\n    @java.lang.Override\n    public int getDelegateExpiry() {\n      return delegateExpiry_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, receiver_);\n      }\n      if (stake_ != 0L) {\n        output.writeInt64(3, stake_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, publicKey_);\n      }\n      if (isDelegated_ != false) {\n        output.writeBool(5, isDelegated_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 6, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        output.writeInt64(7, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        output.writeUInt32(8, delegateExpiry_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, receiver_);\n      }\n      if (stake_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(3, stake_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, publicKey_);\n      }\n      if (isDelegated_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(5, isDelegated_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, delegateOwner_);\n      }\n      if (delegateShare_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(7, delegateShare_);\n      }\n      if (delegateExpiry_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(8, delegateExpiry_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadBond)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadBond other = (pactus.TransactionOuterClass.PayloadBond) obj;\n\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (getStake()\n          != other.getStake()) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (getIsDelegated()\n          != other.getIsDelegated()) return false;\n      if (!getDelegateOwner()\n          .equals(other.getDelegateOwner())) return false;\n      if (getDelegateShare()\n          != other.getDelegateShare()) return false;\n      if (getDelegateExpiry()\n          != other.getDelegateExpiry()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + STAKE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getStake());\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + IS_DELEGATED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIsDelegated());\n      hash = (37 * hash) + DELEGATE_OWNER_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateOwner().hashCode();\n      hash = (37 * hash) + DELEGATE_SHARE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getDelegateShare());\n      hash = (37 * hash) + DELEGATE_EXPIRY_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateExpiry();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBond parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBond parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadBond parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadBond prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for a bond transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadBond}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadBond)\n        pactus.TransactionOuterClass.PayloadBondOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadBond.class, pactus.TransactionOuterClass.PayloadBond.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadBond.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        sender_ = \"\";\n        receiver_ = \"\";\n        stake_ = 0L;\n        publicKey_ = \"\";\n        isDelegated_ = false;\n        delegateOwner_ = \"\";\n        delegateShare_ = 0L;\n        delegateExpiry_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBond getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBond build() {\n        pactus.TransactionOuterClass.PayloadBond result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBond buildPartial() {\n        pactus.TransactionOuterClass.PayloadBond result = new pactus.TransactionOuterClass.PayloadBond(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadBond result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.stake_ = stake_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.isDelegated_ = isDelegated_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.delegateOwner_ = delegateOwner_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.delegateShare_ = delegateShare_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.delegateExpiry_ = delegateExpiry_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadBond) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadBond)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadBond other) {\n        if (other == pactus.TransactionOuterClass.PayloadBond.getDefaultInstance()) return this;\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getStake() != 0L) {\n          setStake(other.getStake());\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        if (other.getIsDelegated() != false) {\n          setIsDelegated(other.getIsDelegated());\n        }\n        if (!other.getDelegateOwner().isEmpty()) {\n          delegateOwner_ = other.delegateOwner_;\n          bitField0_ |= 0x00000020;\n          onChanged();\n        }\n        if (other.getDelegateShare() != 0L) {\n          setDelegateShare(other.getDelegateShare());\n        }\n        if (other.getDelegateExpiry() != 0) {\n          setDelegateExpiry(other.getDelegateExpiry());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                stake_ = input.readInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 34: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              case 40: {\n                isDelegated_ = input.readBool();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 50: {\n                delegateOwner_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 50\n              case 56: {\n                delegateShare_ = input.readInt64();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 64: {\n                delegateExpiry_ = input.readUInt32();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 64\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 2 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private long stake_ ;\n      /**\n       * <pre>\n       * The stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 3 [json_name = \"stake\"];</code>\n       * @return The stake.\n       */\n      @java.lang.Override\n      public long getStake() {\n        return stake_;\n      }\n      /**\n       * <pre>\n       * The stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 3 [json_name = \"stake\"];</code>\n       * @param value The stake to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStake(long value) {\n\n        stake_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 stake = 3 [json_name = \"stake\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStake() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        stake_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 4 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      private boolean isDelegated_ ;\n      /**\n       * <pre>\n       * Indicates whether the bond transaction is a delegation.\n       * </pre>\n       *\n       * <code>bool is_delegated = 5 [json_name = \"isDelegated\"];</code>\n       * @return The isDelegated.\n       */\n      @java.lang.Override\n      public boolean getIsDelegated() {\n        return isDelegated_;\n      }\n      /**\n       * <pre>\n       * Indicates whether the bond transaction is a delegation.\n       * </pre>\n       *\n       * <code>bool is_delegated = 5 [json_name = \"isDelegated\"];</code>\n       * @param value The isDelegated to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIsDelegated(boolean value) {\n\n        isDelegated_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates whether the bond transaction is a delegation.\n       * </pre>\n       *\n       * <code>bool is_delegated = 5 [json_name = \"isDelegated\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIsDelegated() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        isDelegated_ = false;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object delegateOwner_ = \"\";\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n       * @return The delegateOwner.\n       */\n      public java.lang.String getDelegateOwner() {\n        java.lang.Object ref = delegateOwner_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          delegateOwner_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n       * @return The bytes for delegateOwner.\n       */\n      public com.google.protobuf.ByteString\n          getDelegateOwnerBytes() {\n        java.lang.Object ref = delegateOwner_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          delegateOwner_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n       * @param value The delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwner(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateOwner() {\n        delegateOwner_ = getDefaultInstance().getDelegateOwner();\n        bitField0_ = (bitField0_ & ~0x00000020);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 6 [json_name = \"delegateOwner\"];</code>\n       * @param value The bytes for delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwnerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n\n      private long delegateShare_ ;\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 7 [json_name = \"delegateShare\"];</code>\n       * @return The delegateShare.\n       */\n      @java.lang.Override\n      public long getDelegateShare() {\n        return delegateShare_;\n      }\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 7 [json_name = \"delegateShare\"];</code>\n       * @param value The delegateShare to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateShare(long value) {\n\n        delegateShare_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The share percentage for the delegate owner.\n       * Optional, but required when registering a new validator with delegation.;\n       * Must be between 0 and 0.7 PAC in nano PAC.\n       * </pre>\n       *\n       * <code>int64 delegate_share = 7 [json_name = \"delegateShare\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateShare() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        delegateShare_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int delegateExpiry_ ;\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 8 [json_name = \"delegateExpiry\"];</code>\n       * @return The delegateExpiry.\n       */\n      @java.lang.Override\n      public int getDelegateExpiry() {\n        return delegateExpiry_;\n      }\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 8 [json_name = \"delegateExpiry\"];</code>\n       * @param value The delegateExpiry to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateExpiry(int value) {\n\n        delegateExpiry_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The expiry height for the delegate relationship.\n       * Optional, but required when registering a new validator with delegation.;\n       * </pre>\n       *\n       * <code>uint32 delegate_expiry = 8 [json_name = \"delegateExpiry\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateExpiry() {\n        bitField0_ = (bitField0_ & ~0x00000080);\n        delegateExpiry_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadBond)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadBond)\n    private static final pactus.TransactionOuterClass.PayloadBond DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadBond();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBond getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadBond>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadBond>() {\n      @java.lang.Override\n      public PayloadBond parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadBond> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadBond> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBond getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadSortitionOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadSortition)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The validator address associated with the sortition proof.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The validator address associated with the sortition proof.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The proof for the sortition.\n     * </pre>\n     *\n     * <code>string proof = 2 [json_name = \"proof\"];</code>\n     * @return The proof.\n     */\n    java.lang.String getProof();\n    /**\n     * <pre>\n     * The proof for the sortition.\n     * </pre>\n     *\n     * <code>string proof = 2 [json_name = \"proof\"];</code>\n     * @return The bytes for proof.\n     */\n    com.google.protobuf.ByteString\n        getProofBytes();\n  }\n  /**\n   * <pre>\n   * Payload for a sortition transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadSortition}\n   */\n  public static final class PayloadSortition extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadSortition)\n      PayloadSortitionOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadSortition\");\n    }\n    // Use PayloadSortition.newBuilder() to construct.\n    private PayloadSortition(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadSortition() {\n      address_ = \"\";\n      proof_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadSortition.class, pactus.TransactionOuterClass.PayloadSortition.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The validator address associated with the sortition proof.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The validator address associated with the sortition proof.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PROOF_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object proof_ = \"\";\n    /**\n     * <pre>\n     * The proof for the sortition.\n     * </pre>\n     *\n     * <code>string proof = 2 [json_name = \"proof\"];</code>\n     * @return The proof.\n     */\n    @java.lang.Override\n    public java.lang.String getProof() {\n      java.lang.Object ref = proof_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        proof_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The proof for the sortition.\n     * </pre>\n     *\n     * <code>string proof = 2 [json_name = \"proof\"];</code>\n     * @return The bytes for proof.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getProofBytes() {\n      java.lang.Object ref = proof_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        proof_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(proof_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, proof_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(proof_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, proof_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadSortition)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadSortition other = (pactus.TransactionOuterClass.PayloadSortition) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getProof()\n          .equals(other.getProof())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + PROOF_FIELD_NUMBER;\n      hash = (53 * hash) + getProof().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadSortition parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadSortition parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadSortition parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadSortition prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for a sortition transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadSortition}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadSortition)\n        pactus.TransactionOuterClass.PayloadSortitionOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadSortition.class, pactus.TransactionOuterClass.PayloadSortition.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadSortition.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        proof_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadSortition build() {\n        pactus.TransactionOuterClass.PayloadSortition result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadSortition buildPartial() {\n        pactus.TransactionOuterClass.PayloadSortition result = new pactus.TransactionOuterClass.PayloadSortition(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadSortition result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.proof_ = proof_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadSortition) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadSortition)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadSortition other) {\n        if (other == pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getProof().isEmpty()) {\n          proof_ = other.proof_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                proof_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The validator address associated with the sortition proof.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The validator address associated with the sortition proof.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The validator address associated with the sortition proof.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The validator address associated with the sortition proof.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The validator address associated with the sortition proof.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object proof_ = \"\";\n      /**\n       * <pre>\n       * The proof for the sortition.\n       * </pre>\n       *\n       * <code>string proof = 2 [json_name = \"proof\"];</code>\n       * @return The proof.\n       */\n      public java.lang.String getProof() {\n        java.lang.Object ref = proof_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          proof_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The proof for the sortition.\n       * </pre>\n       *\n       * <code>string proof = 2 [json_name = \"proof\"];</code>\n       * @return The bytes for proof.\n       */\n      public com.google.protobuf.ByteString\n          getProofBytes() {\n        java.lang.Object ref = proof_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          proof_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The proof for the sortition.\n       * </pre>\n       *\n       * <code>string proof = 2 [json_name = \"proof\"];</code>\n       * @param value The proof to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProof(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        proof_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The proof for the sortition.\n       * </pre>\n       *\n       * <code>string proof = 2 [json_name = \"proof\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearProof() {\n        proof_ = getDefaultInstance().getProof();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The proof for the sortition.\n       * </pre>\n       *\n       * <code>string proof = 2 [json_name = \"proof\"];</code>\n       * @param value The bytes for proof to set.\n       * @return This builder for chaining.\n       */\n      public Builder setProofBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        proof_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadSortition)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadSortition)\n    private static final pactus.TransactionOuterClass.PayloadSortition DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadSortition();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadSortition getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadSortition>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadSortition>() {\n      @java.lang.Override\n      public PayloadSortition parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadSortition> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadSortition> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadUnbondOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadUnbond)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator = 1 [json_name = \"validator\"];</code>\n     * @return The validator.\n     */\n    java.lang.String getValidator();\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator = 1 [json_name = \"validator\"];</code>\n     * @return The bytes for validator.\n     */\n    com.google.protobuf.ByteString\n        getValidatorBytes();\n\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    java.lang.String getDelegateOwner();\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    com.google.protobuf.ByteString\n        getDelegateOwnerBytes();\n  }\n  /**\n   * <pre>\n   * Payload for an unbond transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadUnbond}\n   */\n  public static final class PayloadUnbond extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadUnbond)\n      PayloadUnbondOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadUnbond\");\n    }\n    // Use PayloadUnbond.newBuilder() to construct.\n    private PayloadUnbond(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadUnbond() {\n      validator_ = \"\";\n      delegateOwner_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadUnbond.class, pactus.TransactionOuterClass.PayloadUnbond.Builder.class);\n    }\n\n    public static final int VALIDATOR_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object validator_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator = 1 [json_name = \"validator\"];</code>\n     * @return The validator.\n     */\n    @java.lang.Override\n    public java.lang.String getValidator() {\n      java.lang.Object ref = validator_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        validator_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator to unbond from.\n     * </pre>\n     *\n     * <code>string validator = 1 [json_name = \"validator\"];</code>\n     * @return The bytes for validator.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getValidatorBytes() {\n      java.lang.Object ref = validator_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        validator_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DELEGATE_OWNER_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object delegateOwner_ = \"\";\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n     * @return The delegateOwner.\n     */\n    @java.lang.Override\n    public java.lang.String getDelegateOwner() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        delegateOwner_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the delegate owner.\n     * Optional, but required when the validator is a delegated validator.;\n     * </pre>\n     *\n     * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n     * @return The bytes for delegateOwner.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDelegateOwnerBytes() {\n      java.lang.Object ref = delegateOwner_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        delegateOwner_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validator_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, validator_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, delegateOwner_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validator_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, validator_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(delegateOwner_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, delegateOwner_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadUnbond)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadUnbond other = (pactus.TransactionOuterClass.PayloadUnbond) obj;\n\n      if (!getValidator()\n          .equals(other.getValidator())) return false;\n      if (!getDelegateOwner()\n          .equals(other.getDelegateOwner())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + VALIDATOR_FIELD_NUMBER;\n      hash = (53 * hash) + getValidator().hashCode();\n      hash = (37 * hash) + DELEGATE_OWNER_FIELD_NUMBER;\n      hash = (53 * hash) + getDelegateOwner().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadUnbond parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadUnbond parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadUnbond parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadUnbond prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for an unbond transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadUnbond}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadUnbond)\n        pactus.TransactionOuterClass.PayloadUnbondOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadUnbond.class, pactus.TransactionOuterClass.PayloadUnbond.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadUnbond.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        validator_ = \"\";\n        delegateOwner_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadUnbond build() {\n        pactus.TransactionOuterClass.PayloadUnbond result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadUnbond buildPartial() {\n        pactus.TransactionOuterClass.PayloadUnbond result = new pactus.TransactionOuterClass.PayloadUnbond(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadUnbond result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.validator_ = validator_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.delegateOwner_ = delegateOwner_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadUnbond) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadUnbond)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadUnbond other) {\n        if (other == pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) return this;\n        if (!other.getValidator().isEmpty()) {\n          validator_ = other.validator_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getDelegateOwner().isEmpty()) {\n          delegateOwner_ = other.delegateOwner_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                validator_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                delegateOwner_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object validator_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator = 1 [json_name = \"validator\"];</code>\n       * @return The validator.\n       */\n      public java.lang.String getValidator() {\n        java.lang.Object ref = validator_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          validator_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator = 1 [json_name = \"validator\"];</code>\n       * @return The bytes for validator.\n       */\n      public com.google.protobuf.ByteString\n          getValidatorBytes() {\n        java.lang.Object ref = validator_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          validator_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator = 1 [json_name = \"validator\"];</code>\n       * @param value The validator to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidator(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        validator_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator = 1 [json_name = \"validator\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearValidator() {\n        validator_ = getDefaultInstance().getValidator();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to unbond from.\n       * </pre>\n       *\n       * <code>string validator = 1 [json_name = \"validator\"];</code>\n       * @param value The bytes for validator to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        validator_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object delegateOwner_ = \"\";\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n       * @return The delegateOwner.\n       */\n      public java.lang.String getDelegateOwner() {\n        java.lang.Object ref = delegateOwner_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          delegateOwner_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n       * @return The bytes for delegateOwner.\n       */\n      public com.google.protobuf.ByteString\n          getDelegateOwnerBytes() {\n        java.lang.Object ref = delegateOwner_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          delegateOwner_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n       * @param value The delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwner(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDelegateOwner() {\n        delegateOwner_ = getDefaultInstance().getDelegateOwner();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the delegate owner.\n       * Optional, but required when the validator is a delegated validator.;\n       * </pre>\n       *\n       * <code>string delegate_owner = 2 [json_name = \"delegateOwner\"];</code>\n       * @param value The bytes for delegateOwner to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDelegateOwnerBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        delegateOwner_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadUnbond)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadUnbond)\n    private static final pactus.TransactionOuterClass.PayloadUnbond DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadUnbond();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadUnbond getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadUnbond>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadUnbond>() {\n      @java.lang.Override\n      public PayloadUnbond parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadUnbond> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadUnbond> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadWithdrawOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadWithdraw)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    java.lang.String getValidatorAddress();\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    com.google.protobuf.ByteString\n        getValidatorAddressBytes();\n\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n     * @return The accountAddress.\n     */\n    java.lang.String getAccountAddress();\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n     * @return The bytes for accountAddress.\n     */\n    com.google.protobuf.ByteString\n        getAccountAddressBytes();\n\n    /**\n     * <pre>\n     * The withdrawal amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n  }\n  /**\n   * <pre>\n   * Payload for a withdraw transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadWithdraw}\n   */\n  public static final class PayloadWithdraw extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadWithdraw)\n      PayloadWithdrawOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadWithdraw\");\n    }\n    // Use PayloadWithdraw.newBuilder() to construct.\n    private PayloadWithdraw(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadWithdraw() {\n      validatorAddress_ = \"\";\n      accountAddress_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadWithdraw.class, pactus.TransactionOuterClass.PayloadWithdraw.Builder.class);\n    }\n\n    public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object validatorAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n     * @return The validatorAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getValidatorAddress() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        validatorAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the validator to withdraw from.\n     * </pre>\n     *\n     * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n     * @return The bytes for validatorAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getValidatorAddressBytes() {\n      java.lang.Object ref = validatorAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        validatorAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object accountAddress_ = \"\";\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n     * @return The accountAddress.\n     */\n    @java.lang.Override\n    public java.lang.String getAccountAddress() {\n      java.lang.Object ref = accountAddress_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        accountAddress_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address of the account to withdraw to.\n     * </pre>\n     *\n     * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n     * @return The bytes for accountAddress.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAccountAddressBytes() {\n      java.lang.Object ref = accountAddress_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        accountAddress_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 3;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The withdrawal amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountAddress_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, accountAddress_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(3, amount_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(validatorAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, validatorAddress_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountAddress_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, accountAddress_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(3, amount_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadWithdraw)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadWithdraw other = (pactus.TransactionOuterClass.PayloadWithdraw) obj;\n\n      if (!getValidatorAddress()\n          .equals(other.getValidatorAddress())) return false;\n      if (!getAccountAddress()\n          .equals(other.getAccountAddress())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getValidatorAddress().hashCode();\n      hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAccountAddress().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadWithdraw parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadWithdraw prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for a withdraw transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadWithdraw}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadWithdraw)\n        pactus.TransactionOuterClass.PayloadWithdrawOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadWithdraw.class, pactus.TransactionOuterClass.PayloadWithdraw.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadWithdraw.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        validatorAddress_ = \"\";\n        accountAddress_ = \"\";\n        amount_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadWithdraw build() {\n        pactus.TransactionOuterClass.PayloadWithdraw result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadWithdraw buildPartial() {\n        pactus.TransactionOuterClass.PayloadWithdraw result = new pactus.TransactionOuterClass.PayloadWithdraw(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadWithdraw result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.validatorAddress_ = validatorAddress_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.accountAddress_ = accountAddress_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.amount_ = amount_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadWithdraw) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadWithdraw)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadWithdraw other) {\n        if (other == pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) return this;\n        if (!other.getValidatorAddress().isEmpty()) {\n          validatorAddress_ = other.validatorAddress_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAccountAddress().isEmpty()) {\n          accountAddress_ = other.accountAddress_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                validatorAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                accountAddress_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object validatorAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n       * @return The validatorAddress.\n       */\n      public java.lang.String getValidatorAddress() {\n        java.lang.Object ref = validatorAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          validatorAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n       * @return The bytes for validatorAddress.\n       */\n      public com.google.protobuf.ByteString\n          getValidatorAddressBytes() {\n        java.lang.Object ref = validatorAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          validatorAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n       * @param value The validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearValidatorAddress() {\n        validatorAddress_ = getDefaultInstance().getValidatorAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the validator to withdraw from.\n       * </pre>\n       *\n       * <code>string validator_address = 1 [json_name = \"validatorAddress\"];</code>\n       * @param value The bytes for validatorAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValidatorAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        validatorAddress_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object accountAddress_ = \"\";\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n       * @return The accountAddress.\n       */\n      public java.lang.String getAccountAddress() {\n        java.lang.Object ref = accountAddress_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          accountAddress_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n       * @return The bytes for accountAddress.\n       */\n      public com.google.protobuf.ByteString\n          getAccountAddressBytes() {\n        java.lang.Object ref = accountAddress_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          accountAddress_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n       * @param value The accountAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAccountAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        accountAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAccountAddress() {\n        accountAddress_ = getDefaultInstance().getAccountAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address of the account to withdraw to.\n       * </pre>\n       *\n       * <code>string account_address = 2 [json_name = \"accountAddress\"];</code>\n       * @param value The bytes for accountAddress to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAccountAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        accountAddress_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The withdrawal amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 3 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadWithdraw)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadWithdraw)\n    private static final pactus.TransactionOuterClass.PayloadWithdraw DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadWithdraw();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadWithdraw getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadWithdraw>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadWithdraw>() {\n      @java.lang.Override\n      public PayloadWithdraw parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadWithdraw> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadWithdraw> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PayloadBatchTransferOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PayloadBatchTransfer)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    java.util.List<pactus.TransactionOuterClass.Recipient> \n        getRecipientsList();\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    pactus.TransactionOuterClass.Recipient getRecipients(int index);\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    int getRecipientsCount();\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n        getRecipientsOrBuilderList();\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Payload for a batch transfer transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PayloadBatchTransfer}\n   */\n  public static final class PayloadBatchTransfer extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PayloadBatchTransfer)\n      PayloadBatchTransferOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PayloadBatchTransfer\");\n    }\n    // Use PayloadBatchTransfer.newBuilder() to construct.\n    private PayloadBatchTransfer(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PayloadBatchTransfer() {\n      sender_ = \"\";\n      recipients_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadBatchTransfer_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_PayloadBatchTransfer_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.PayloadBatchTransfer.class, pactus.TransactionOuterClass.PayloadBatchTransfer.Builder.class);\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 1 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECIPIENTS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.TransactionOuterClass.Recipient> recipients_;\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.TransactionOuterClass.Recipient> getRecipientsList() {\n      return recipients_;\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n        getRecipientsOrBuilderList() {\n      return recipients_;\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public int getRecipientsCount() {\n      return recipients_.size();\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.Recipient getRecipients(int index) {\n      return recipients_.get(index);\n    }\n    /**\n     * <pre>\n     * The list of recipients with their amounts.\n     * </pre>\n     *\n     * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n        int index) {\n      return recipients_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, sender_);\n      }\n      for (int i = 0; i < recipients_.size(); i++) {\n        output.writeMessage(2, recipients_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sender_);\n      }\n      for (int i = 0; i < recipients_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, recipients_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.PayloadBatchTransfer)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.PayloadBatchTransfer other = (pactus.TransactionOuterClass.PayloadBatchTransfer) obj;\n\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getRecipientsList()\n          .equals(other.getRecipientsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      if (getRecipientsCount() > 0) {\n        hash = (37 * hash) + RECIPIENTS_FIELD_NUMBER;\n        hash = (53 * hash) + getRecipientsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.PayloadBatchTransfer prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Payload for a batch transfer transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PayloadBatchTransfer}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PayloadBatchTransfer)\n        pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBatchTransfer_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBatchTransfer_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.PayloadBatchTransfer.class, pactus.TransactionOuterClass.PayloadBatchTransfer.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.PayloadBatchTransfer.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        sender_ = \"\";\n        if (recipientsBuilder_ == null) {\n          recipients_ = java.util.Collections.emptyList();\n        } else {\n          recipients_ = null;\n          recipientsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000002);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_PayloadBatchTransfer_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBatchTransfer getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBatchTransfer build() {\n        pactus.TransactionOuterClass.PayloadBatchTransfer result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBatchTransfer buildPartial() {\n        pactus.TransactionOuterClass.PayloadBatchTransfer result = new pactus.TransactionOuterClass.PayloadBatchTransfer(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.TransactionOuterClass.PayloadBatchTransfer result) {\n        if (recipientsBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0)) {\n            recipients_ = java.util.Collections.unmodifiableList(recipients_);\n            bitField0_ = (bitField0_ & ~0x00000002);\n          }\n          result.recipients_ = recipients_;\n        } else {\n          result.recipients_ = recipientsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.PayloadBatchTransfer result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.sender_ = sender_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.PayloadBatchTransfer) {\n          return mergeFrom((pactus.TransactionOuterClass.PayloadBatchTransfer)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.PayloadBatchTransfer other) {\n        if (other == pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance()) return this;\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (recipientsBuilder_ == null) {\n          if (!other.recipients_.isEmpty()) {\n            if (recipients_.isEmpty()) {\n              recipients_ = other.recipients_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n            } else {\n              ensureRecipientsIsMutable();\n              recipients_.addAll(other.recipients_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.recipients_.isEmpty()) {\n            if (recipientsBuilder_.isEmpty()) {\n              recipientsBuilder_.dispose();\n              recipientsBuilder_ = null;\n              recipients_ = other.recipients_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n              recipientsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetRecipientsFieldBuilder() : null;\n            } else {\n              recipientsBuilder_.addAllMessages(other.recipients_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                pactus.TransactionOuterClass.Recipient m =\n                    input.readMessage(\n                        pactus.TransactionOuterClass.Recipient.parser(),\n                        extensionRegistry);\n                if (recipientsBuilder_ == null) {\n                  ensureRecipientsIsMutable();\n                  recipients_.add(m);\n                } else {\n                  recipientsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 1 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.TransactionOuterClass.Recipient> recipients_ =\n        java.util.Collections.emptyList();\n      private void ensureRecipientsIsMutable() {\n        if (!((bitField0_ & 0x00000002) != 0)) {\n          recipients_ = new java.util.ArrayList<pactus.TransactionOuterClass.Recipient>(recipients_);\n          bitField0_ |= 0x00000002;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder> recipientsBuilder_;\n\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.Recipient> getRecipientsList() {\n        if (recipientsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(recipients_);\n        } else {\n          return recipientsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public int getRecipientsCount() {\n        if (recipientsBuilder_ == null) {\n          return recipients_.size();\n        } else {\n          return recipientsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient getRecipients(int index) {\n        if (recipientsBuilder_ == null) {\n          return recipients_.get(index);\n        } else {\n          return recipientsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder setRecipients(\n          int index, pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.set(index, value);\n          onChanged();\n        } else {\n          recipientsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder setRecipients(\n          int index, pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.add(value);\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          int index, pactus.TransactionOuterClass.Recipient value) {\n        if (recipientsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureRecipientsIsMutable();\n          recipients_.add(index, value);\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.add(builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder addRecipients(\n          int index, pactus.TransactionOuterClass.Recipient.Builder builderForValue) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          recipientsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder addAllRecipients(\n          java.lang.Iterable<? extends pactus.TransactionOuterClass.Recipient> values) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, recipients_);\n          onChanged();\n        } else {\n          recipientsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder clearRecipients() {\n        if (recipientsBuilder_ == null) {\n          recipients_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000002);\n          onChanged();\n        } else {\n          recipientsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public Builder removeRecipients(int index) {\n        if (recipientsBuilder_ == null) {\n          ensureRecipientsIsMutable();\n          recipients_.remove(index);\n          onChanged();\n        } else {\n          recipientsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder getRecipientsBuilder(\n          int index) {\n        return internalGetRecipientsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.RecipientOrBuilder getRecipientsOrBuilder(\n          int index) {\n        if (recipientsBuilder_ == null) {\n          return recipients_.get(index);  } else {\n          return recipientsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<? extends pactus.TransactionOuterClass.RecipientOrBuilder> \n           getRecipientsOrBuilderList() {\n        if (recipientsBuilder_ != null) {\n          return recipientsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(recipients_);\n        }\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder addRecipientsBuilder() {\n        return internalGetRecipientsFieldBuilder().addBuilder(\n            pactus.TransactionOuterClass.Recipient.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public pactus.TransactionOuterClass.Recipient.Builder addRecipientsBuilder(\n          int index) {\n        return internalGetRecipientsFieldBuilder().addBuilder(\n            index, pactus.TransactionOuterClass.Recipient.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * The list of recipients with their amounts.\n       * </pre>\n       *\n       * <code>repeated .pactus.Recipient recipients = 2 [json_name = \"recipients\"];</code>\n       */\n      public java.util.List<pactus.TransactionOuterClass.Recipient.Builder> \n           getRecipientsBuilderList() {\n        return internalGetRecipientsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder> \n          internalGetRecipientsFieldBuilder() {\n        if (recipientsBuilder_ == null) {\n          recipientsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.TransactionOuterClass.Recipient, pactus.TransactionOuterClass.Recipient.Builder, pactus.TransactionOuterClass.RecipientOrBuilder>(\n                  recipients_,\n                  ((bitField0_ & 0x00000002) != 0),\n                  getParentForChildren(),\n                  isClean());\n          recipients_ = null;\n        }\n        return recipientsBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PayloadBatchTransfer)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PayloadBatchTransfer)\n    private static final pactus.TransactionOuterClass.PayloadBatchTransfer DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.PayloadBatchTransfer();\n    }\n\n    public static pactus.TransactionOuterClass.PayloadBatchTransfer getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PayloadBatchTransfer>\n        PARSER = new com.google.protobuf.AbstractParser<PayloadBatchTransfer>() {\n      @java.lang.Override\n      public PayloadBatchTransfer parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PayloadBatchTransfer> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PayloadBatchTransfer> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBatchTransfer getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface RecipientOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.Recipient)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n  }\n  /**\n   * <pre>\n   * Recipient is receiver with amount.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.Recipient}\n   */\n  public static final class Recipient extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.Recipient)\n      RecipientOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"Recipient\");\n    }\n    // Use Recipient.newBuilder() to construct.\n    private Recipient(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private Recipient() {\n      receiver_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_Recipient_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_Recipient_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.Recipient.class, pactus.TransactionOuterClass.Recipient.Builder.class);\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 2;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, receiver_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(2, amount_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, receiver_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, amount_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.Recipient)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.Recipient other = (pactus.TransactionOuterClass.Recipient) obj;\n\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.Recipient parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.Recipient parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.Recipient parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.Recipient prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Recipient is receiver with amount.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.Recipient}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.Recipient)\n        pactus.TransactionOuterClass.RecipientOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_Recipient_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_Recipient_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.Recipient.class, pactus.TransactionOuterClass.Recipient.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.Recipient.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        receiver_ = \"\";\n        amount_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_Recipient_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.Recipient getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.Recipient.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.Recipient build() {\n        pactus.TransactionOuterClass.Recipient result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.Recipient buildPartial() {\n        pactus.TransactionOuterClass.Recipient result = new pactus.TransactionOuterClass.Recipient(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.Recipient result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.amount_ = amount_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.Recipient) {\n          return mergeFrom((pactus.TransactionOuterClass.Recipient)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.Recipient other) {\n        if (other == pactus.TransactionOuterClass.Recipient.getDefaultInstance()) return this;\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 1 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.Recipient)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.Recipient)\n    private static final pactus.TransactionOuterClass.Recipient DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.Recipient();\n    }\n\n    public static pactus.TransactionOuterClass.Recipient getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<Recipient>\n        PARSER = new com.google.protobuf.AbstractParser<Recipient>() {\n      @java.lang.Override\n      public Recipient parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<Recipient> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<Recipient> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.Recipient getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface TransactionInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.TransactionInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    java.lang.String getId();\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    com.google.protobuf.ByteString\n        getIdBytes();\n\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    java.lang.String getData();\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    com.google.protobuf.ByteString\n        getDataBytes();\n\n    /**\n     * <pre>\n     * The version of the transaction.\n     * </pre>\n     *\n     * <code>int32 version = 3 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    int getVersion();\n\n    /**\n     * <pre>\n     * The lock time for the transaction.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 4 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    int getLockTime();\n\n    /**\n     * <pre>\n     * The value of the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 value = 5 [json_name = \"value\"];</code>\n     * @return The value.\n     */\n    long getValue();\n\n    /**\n     * <pre>\n     * The fee for the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    int getPayloadTypeValue();\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    pactus.TransactionOuterClass.PayloadType getPayloadType();\n\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     * @return Whether the transfer field is set.\n     */\n    boolean hasTransfer();\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     * @return The transfer.\n     */\n    pactus.TransactionOuterClass.PayloadTransfer getTransfer();\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder();\n\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     * @return Whether the bond field is set.\n     */\n    boolean hasBond();\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     * @return The bond.\n     */\n    pactus.TransactionOuterClass.PayloadBond getBond();\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder();\n\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     * @return Whether the sortition field is set.\n     */\n    boolean hasSortition();\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     * @return The sortition.\n     */\n    pactus.TransactionOuterClass.PayloadSortition getSortition();\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder();\n\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     * @return Whether the unbond field is set.\n     */\n    boolean hasUnbond();\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     * @return The unbond.\n     */\n    pactus.TransactionOuterClass.PayloadUnbond getUnbond();\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder();\n\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     * @return Whether the withdraw field is set.\n     */\n    boolean hasWithdraw();\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     * @return The withdraw.\n     */\n    pactus.TransactionOuterClass.PayloadWithdraw getWithdraw();\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder();\n\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     * @return Whether the batchTransfer field is set.\n     */\n    boolean hasBatchTransfer();\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     * @return The batchTransfer.\n     */\n    pactus.TransactionOuterClass.PayloadBatchTransfer getBatchTransfer();\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     */\n    pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder getBatchTransferOrBuilder();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n\n    /**\n     * <pre>\n     * The public key associated with the transaction.\n     * </pre>\n     *\n     * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key associated with the transaction.\n     * </pre>\n     *\n     * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * The signature for the transaction.\n     * </pre>\n     *\n     * <code>string signature = 10 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The signature for the transaction.\n     * </pre>\n     *\n     * <code>string signature = 10 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n\n    /**\n     * <pre>\n     * The block height containing the transaction.\n     * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n     * </pre>\n     *\n     * <code>uint32 block_height = 11 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    int getBlockHeight();\n\n    /**\n     * <pre>\n     * Indicates whether the transaction is confirmed.\n     * </pre>\n     *\n     * <code>bool confirmed = 12 [json_name = \"confirmed\"];</code>\n     * @return The confirmed.\n     */\n    boolean getConfirmed();\n\n    /**\n     * <pre>\n     * The number of blocks that have been added to the chain after this transaction was included in a block.\n     * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n     * </pre>\n     *\n     * <code>int32 confirmations = 13 [json_name = \"confirmations\"];</code>\n     * @return The confirmations.\n     */\n    int getConfirmations();\n\n    pactus.TransactionOuterClass.TransactionInfo.PayloadCase getPayloadCase();\n  }\n  /**\n   * <pre>\n   * Information about a transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.TransactionInfo}\n   */\n  public static final class TransactionInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.TransactionInfo)\n      TransactionInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"TransactionInfo\");\n    }\n    // Use TransactionInfo.newBuilder() to construct.\n    private TransactionInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private TransactionInfo() {\n      id_ = \"\";\n      data_ = \"\";\n      payloadType_ = 0;\n      memo_ = \"\";\n      publicKey_ = \"\";\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.TransactionInfo.class, pactus.TransactionOuterClass.TransactionInfo.Builder.class);\n    }\n\n    private int payloadCase_ = 0;\n    @SuppressWarnings(\"serial\")\n    private java.lang.Object payload_;\n    public enum PayloadCase\n        implements com.google.protobuf.Internal.EnumLite,\n            com.google.protobuf.AbstractMessage.InternalOneOfEnum {\n      TRANSFER(30),\n      BOND(31),\n      SORTITION(32),\n      UNBOND(33),\n      WITHDRAW(34),\n      BATCH_TRANSFER(35),\n      PAYLOAD_NOT_SET(0);\n      private final int value;\n      private PayloadCase(int value) {\n        this.value = value;\n      }\n      /**\n       * @param value The number of the enum to look for.\n       * @return The enum associated with the given number.\n       * @deprecated Use {@link #forNumber(int)} instead.\n       */\n      @java.lang.Deprecated\n      public static PayloadCase valueOf(int value) {\n        return forNumber(value);\n      }\n\n      public static PayloadCase forNumber(int value) {\n        switch (value) {\n          case 30: return TRANSFER;\n          case 31: return BOND;\n          case 32: return SORTITION;\n          case 33: return UNBOND;\n          case 34: return WITHDRAW;\n          case 35: return BATCH_TRANSFER;\n          case 0: return PAYLOAD_NOT_SET;\n          default: return null;\n        }\n      }\n      public int getNumber() {\n        return this.value;\n      }\n    };\n\n    public PayloadCase\n    getPayloadCase() {\n      return PayloadCase.forNumber(\n          payloadCase_);\n    }\n\n    public static final int ID_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object id_ = \"\";\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The id.\n     */\n    @java.lang.Override\n    public java.lang.String getId() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        id_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string id = 1 [json_name = \"id\"];</code>\n     * @return The bytes for id.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getIdBytes() {\n      java.lang.Object ref = id_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        id_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DATA_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object data_ = \"\";\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    @java.lang.Override\n    public java.lang.String getData() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        data_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string data = 2 [json_name = \"data\"];</code>\n     * @return The bytes for data.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDataBytes() {\n      java.lang.Object ref = data_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        data_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int VERSION_FIELD_NUMBER = 3;\n    private int version_ = 0;\n    /**\n     * <pre>\n     * The version of the transaction.\n     * </pre>\n     *\n     * <code>int32 version = 3 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    @java.lang.Override\n    public int getVersion() {\n      return version_;\n    }\n\n    public static final int LOCK_TIME_FIELD_NUMBER = 4;\n    private int lockTime_ = 0;\n    /**\n     * <pre>\n     * The lock time for the transaction.\n     * </pre>\n     *\n     * <code>uint32 lock_time = 4 [json_name = \"lockTime\"];</code>\n     * @return The lockTime.\n     */\n    @java.lang.Override\n    public int getLockTime() {\n      return lockTime_;\n    }\n\n    public static final int VALUE_FIELD_NUMBER = 5;\n    private long value_ = 0L;\n    /**\n     * <pre>\n     * The value of the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 value = 5 [json_name = \"value\"];</code>\n     * @return The value.\n     */\n    @java.lang.Override\n    public long getValue() {\n      return value_;\n    }\n\n    public static final int FEE_FIELD_NUMBER = 6;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The fee for the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7;\n    private int payloadType_ = 0;\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    @java.lang.Override public int getPayloadTypeValue() {\n      return payloadType_;\n    }\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    @java.lang.Override public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n      pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n      return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n    }\n\n    public static final int TRANSFER_FIELD_NUMBER = 30;\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     * @return Whether the transfer field is set.\n     */\n    @java.lang.Override\n    public boolean hasTransfer() {\n      return payloadCase_ == 30;\n    }\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     * @return The transfer.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadTransfer getTransfer() {\n      if (payloadCase_ == 30) {\n         return (pactus.TransactionOuterClass.PayloadTransfer) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() {\n      if (payloadCase_ == 30) {\n         return (pactus.TransactionOuterClass.PayloadTransfer) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n    }\n\n    public static final int BOND_FIELD_NUMBER = 31;\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     * @return Whether the bond field is set.\n     */\n    @java.lang.Override\n    public boolean hasBond() {\n      return payloadCase_ == 31;\n    }\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     * @return The bond.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBond getBond() {\n      if (payloadCase_ == 31) {\n         return (pactus.TransactionOuterClass.PayloadBond) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Bond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() {\n      if (payloadCase_ == 31) {\n         return (pactus.TransactionOuterClass.PayloadBond) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n    }\n\n    public static final int SORTITION_FIELD_NUMBER = 32;\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     * @return Whether the sortition field is set.\n     */\n    @java.lang.Override\n    public boolean hasSortition() {\n      return payloadCase_ == 32;\n    }\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     * @return The sortition.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadSortition getSortition() {\n      if (payloadCase_ == 32) {\n         return (pactus.TransactionOuterClass.PayloadSortition) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Sortition transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() {\n      if (payloadCase_ == 32) {\n         return (pactus.TransactionOuterClass.PayloadSortition) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n    }\n\n    public static final int UNBOND_FIELD_NUMBER = 33;\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     * @return Whether the unbond field is set.\n     */\n    @java.lang.Override\n    public boolean hasUnbond() {\n      return payloadCase_ == 33;\n    }\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     * @return The unbond.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadUnbond getUnbond() {\n      if (payloadCase_ == 33) {\n         return (pactus.TransactionOuterClass.PayloadUnbond) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Unbond transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() {\n      if (payloadCase_ == 33) {\n         return (pactus.TransactionOuterClass.PayloadUnbond) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n    }\n\n    public static final int WITHDRAW_FIELD_NUMBER = 34;\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     * @return Whether the withdraw field is set.\n     */\n    @java.lang.Override\n    public boolean hasWithdraw() {\n      return payloadCase_ == 34;\n    }\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     * @return The withdraw.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadWithdraw getWithdraw() {\n      if (payloadCase_ == 34) {\n         return (pactus.TransactionOuterClass.PayloadWithdraw) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Withdraw transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() {\n      if (payloadCase_ == 34) {\n         return (pactus.TransactionOuterClass.PayloadWithdraw) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n    }\n\n    public static final int BATCH_TRANSFER_FIELD_NUMBER = 35;\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     * @return Whether the batchTransfer field is set.\n     */\n    @java.lang.Override\n    public boolean hasBatchTransfer() {\n      return payloadCase_ == 35;\n    }\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     * @return The batchTransfer.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBatchTransfer getBatchTransfer() {\n      if (payloadCase_ == 35) {\n         return (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n    }\n    /**\n     * <pre>\n     * Batch Transfer transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder getBatchTransferOrBuilder() {\n      if (payloadCase_ == 35) {\n         return (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_;\n      }\n      return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 9;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key associated with the transaction.\n     * </pre>\n     *\n     * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key associated with the transaction.\n     * </pre>\n     *\n     * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 10;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The signature for the transaction.\n     * </pre>\n     *\n     * <code>string signature = 10 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signature for the transaction.\n     * </pre>\n     *\n     * <code>string signature = 10 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int BLOCK_HEIGHT_FIELD_NUMBER = 11;\n    private int blockHeight_ = 0;\n    /**\n     * <pre>\n     * The block height containing the transaction.\n     * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n     * </pre>\n     *\n     * <code>uint32 block_height = 11 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    @java.lang.Override\n    public int getBlockHeight() {\n      return blockHeight_;\n    }\n\n    public static final int CONFIRMED_FIELD_NUMBER = 12;\n    private boolean confirmed_ = false;\n    /**\n     * <pre>\n     * Indicates whether the transaction is confirmed.\n     * </pre>\n     *\n     * <code>bool confirmed = 12 [json_name = \"confirmed\"];</code>\n     * @return The confirmed.\n     */\n    @java.lang.Override\n    public boolean getConfirmed() {\n      return confirmed_;\n    }\n\n    public static final int CONFIRMATIONS_FIELD_NUMBER = 13;\n    private int confirmations_ = 0;\n    /**\n     * <pre>\n     * The number of blocks that have been added to the chain after this transaction was included in a block.\n     * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n     * </pre>\n     *\n     * <code>int32 confirmations = 13 [json_name = \"confirmations\"];</code>\n     * @return The confirmations.\n     */\n    @java.lang.Override\n    public int getConfirmations() {\n      return confirmations_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, data_);\n      }\n      if (version_ != 0) {\n        output.writeInt32(3, version_);\n      }\n      if (lockTime_ != 0) {\n        output.writeUInt32(4, lockTime_);\n      }\n      if (value_ != 0L) {\n        output.writeInt64(5, value_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(6, fee_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        output.writeEnum(7, payloadType_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 9, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 10, signature_);\n      }\n      if (blockHeight_ != 0) {\n        output.writeUInt32(11, blockHeight_);\n      }\n      if (confirmed_ != false) {\n        output.writeBool(12, confirmed_);\n      }\n      if (confirmations_ != 0) {\n        output.writeInt32(13, confirmations_);\n      }\n      if (payloadCase_ == 30) {\n        output.writeMessage(30, (pactus.TransactionOuterClass.PayloadTransfer) payload_);\n      }\n      if (payloadCase_ == 31) {\n        output.writeMessage(31, (pactus.TransactionOuterClass.PayloadBond) payload_);\n      }\n      if (payloadCase_ == 32) {\n        output.writeMessage(32, (pactus.TransactionOuterClass.PayloadSortition) payload_);\n      }\n      if (payloadCase_ == 33) {\n        output.writeMessage(33, (pactus.TransactionOuterClass.PayloadUnbond) payload_);\n      }\n      if (payloadCase_ == 34) {\n        output.writeMessage(34, (pactus.TransactionOuterClass.PayloadWithdraw) payload_);\n      }\n      if (payloadCase_ == 35) {\n        output.writeMessage(35, (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, data_);\n      }\n      if (version_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(3, version_);\n      }\n      if (lockTime_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(4, lockTime_);\n      }\n      if (value_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(5, value_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(6, fee_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(7, payloadType_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, memo_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(9, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(10, signature_);\n      }\n      if (blockHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(11, blockHeight_);\n      }\n      if (confirmed_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(12, confirmed_);\n      }\n      if (confirmations_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(13, confirmations_);\n      }\n      if (payloadCase_ == 30) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(30, (pactus.TransactionOuterClass.PayloadTransfer) payload_);\n      }\n      if (payloadCase_ == 31) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(31, (pactus.TransactionOuterClass.PayloadBond) payload_);\n      }\n      if (payloadCase_ == 32) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(32, (pactus.TransactionOuterClass.PayloadSortition) payload_);\n      }\n      if (payloadCase_ == 33) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(33, (pactus.TransactionOuterClass.PayloadUnbond) payload_);\n      }\n      if (payloadCase_ == 34) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(34, (pactus.TransactionOuterClass.PayloadWithdraw) payload_);\n      }\n      if (payloadCase_ == 35) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(35, (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.TransactionInfo)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.TransactionInfo other = (pactus.TransactionOuterClass.TransactionInfo) obj;\n\n      if (!getId()\n          .equals(other.getId())) return false;\n      if (!getData()\n          .equals(other.getData())) return false;\n      if (getVersion()\n          != other.getVersion()) return false;\n      if (getLockTime()\n          != other.getLockTime()) return false;\n      if (getValue()\n          != other.getValue()) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (payloadType_ != other.payloadType_) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (getBlockHeight()\n          != other.getBlockHeight()) return false;\n      if (getConfirmed()\n          != other.getConfirmed()) return false;\n      if (getConfirmations()\n          != other.getConfirmations()) return false;\n      if (!getPayloadCase().equals(other.getPayloadCase())) return false;\n      switch (payloadCase_) {\n        case 30:\n          if (!getTransfer()\n              .equals(other.getTransfer())) return false;\n          break;\n        case 31:\n          if (!getBond()\n              .equals(other.getBond())) return false;\n          break;\n        case 32:\n          if (!getSortition()\n              .equals(other.getSortition())) return false;\n          break;\n        case 33:\n          if (!getUnbond()\n              .equals(other.getUnbond())) return false;\n          break;\n        case 34:\n          if (!getWithdraw()\n              .equals(other.getWithdraw())) return false;\n          break;\n        case 35:\n          if (!getBatchTransfer()\n              .equals(other.getBatchTransfer())) return false;\n          break;\n        case 0:\n        default:\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ID_FIELD_NUMBER;\n      hash = (53 * hash) + getId().hashCode();\n      hash = (37 * hash) + DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getData().hashCode();\n      hash = (37 * hash) + VERSION_FIELD_NUMBER;\n      hash = (53 * hash) + getVersion();\n      hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER;\n      hash = (53 * hash) + getLockTime();\n      hash = (37 * hash) + VALUE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getValue());\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + payloadType_;\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (37 * hash) + BLOCK_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockHeight();\n      hash = (37 * hash) + CONFIRMED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getConfirmed());\n      hash = (37 * hash) + CONFIRMATIONS_FIELD_NUMBER;\n      hash = (53 * hash) + getConfirmations();\n      switch (payloadCase_) {\n        case 30:\n          hash = (37 * hash) + TRANSFER_FIELD_NUMBER;\n          hash = (53 * hash) + getTransfer().hashCode();\n          break;\n        case 31:\n          hash = (37 * hash) + BOND_FIELD_NUMBER;\n          hash = (53 * hash) + getBond().hashCode();\n          break;\n        case 32:\n          hash = (37 * hash) + SORTITION_FIELD_NUMBER;\n          hash = (53 * hash) + getSortition().hashCode();\n          break;\n        case 33:\n          hash = (37 * hash) + UNBOND_FIELD_NUMBER;\n          hash = (53 * hash) + getUnbond().hashCode();\n          break;\n        case 34:\n          hash = (37 * hash) + WITHDRAW_FIELD_NUMBER;\n          hash = (53 * hash) + getWithdraw().hashCode();\n          break;\n        case 35:\n          hash = (37 * hash) + BATCH_TRANSFER_FIELD_NUMBER;\n          hash = (53 * hash) + getBatchTransfer().hashCode();\n          break;\n        case 0:\n        default:\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.TransactionInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.TransactionInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.TransactionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.TransactionInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Information about a transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.TransactionInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.TransactionInfo)\n        pactus.TransactionOuterClass.TransactionInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.TransactionInfo.class, pactus.TransactionOuterClass.TransactionInfo.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.TransactionInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        id_ = \"\";\n        data_ = \"\";\n        version_ = 0;\n        lockTime_ = 0;\n        value_ = 0L;\n        fee_ = 0L;\n        payloadType_ = 0;\n        if (transferBuilder_ != null) {\n          transferBuilder_.clear();\n        }\n        if (bondBuilder_ != null) {\n          bondBuilder_.clear();\n        }\n        if (sortitionBuilder_ != null) {\n          sortitionBuilder_.clear();\n        }\n        if (unbondBuilder_ != null) {\n          unbondBuilder_.clear();\n        }\n        if (withdrawBuilder_ != null) {\n          withdrawBuilder_.clear();\n        }\n        if (batchTransferBuilder_ != null) {\n          batchTransferBuilder_.clear();\n        }\n        memo_ = \"\";\n        publicKey_ = \"\";\n        signature_ = \"\";\n        blockHeight_ = 0;\n        confirmed_ = false;\n        confirmations_ = 0;\n        payloadCase_ = 0;\n        payload_ = null;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.TransactionInfo build() {\n        pactus.TransactionOuterClass.TransactionInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.TransactionInfo buildPartial() {\n        pactus.TransactionOuterClass.TransactionInfo result = new pactus.TransactionOuterClass.TransactionInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        buildPartialOneofs(result);\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.TransactionInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.id_ = id_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.data_ = data_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.version_ = version_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.lockTime_ = lockTime_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.value_ = value_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.payloadType_ = payloadType_;\n        }\n        if (((from_bitField0_ & 0x00002000) != 0)) {\n          result.memo_ = memo_;\n        }\n        if (((from_bitField0_ & 0x00004000) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00008000) != 0)) {\n          result.signature_ = signature_;\n        }\n        if (((from_bitField0_ & 0x00010000) != 0)) {\n          result.blockHeight_ = blockHeight_;\n        }\n        if (((from_bitField0_ & 0x00020000) != 0)) {\n          result.confirmed_ = confirmed_;\n        }\n        if (((from_bitField0_ & 0x00040000) != 0)) {\n          result.confirmations_ = confirmations_;\n        }\n      }\n\n      private void buildPartialOneofs(pactus.TransactionOuterClass.TransactionInfo result) {\n        result.payloadCase_ = payloadCase_;\n        result.payload_ = this.payload_;\n        if (payloadCase_ == 30 &&\n            transferBuilder_ != null) {\n          result.payload_ = transferBuilder_.build();\n        }\n        if (payloadCase_ == 31 &&\n            bondBuilder_ != null) {\n          result.payload_ = bondBuilder_.build();\n        }\n        if (payloadCase_ == 32 &&\n            sortitionBuilder_ != null) {\n          result.payload_ = sortitionBuilder_.build();\n        }\n        if (payloadCase_ == 33 &&\n            unbondBuilder_ != null) {\n          result.payload_ = unbondBuilder_.build();\n        }\n        if (payloadCase_ == 34 &&\n            withdrawBuilder_ != null) {\n          result.payload_ = withdrawBuilder_.build();\n        }\n        if (payloadCase_ == 35 &&\n            batchTransferBuilder_ != null) {\n          result.payload_ = batchTransferBuilder_.build();\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.TransactionInfo) {\n          return mergeFrom((pactus.TransactionOuterClass.TransactionInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.TransactionInfo other) {\n        if (other == pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance()) return this;\n        if (!other.getId().isEmpty()) {\n          id_ = other.id_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getData().isEmpty()) {\n          data_ = other.data_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.getVersion() != 0) {\n          setVersion(other.getVersion());\n        }\n        if (other.getLockTime() != 0) {\n          setLockTime(other.getLockTime());\n        }\n        if (other.getValue() != 0L) {\n          setValue(other.getValue());\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (other.payloadType_ != 0) {\n          setPayloadTypeValue(other.getPayloadTypeValue());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00002000;\n          onChanged();\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00004000;\n          onChanged();\n        }\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00008000;\n          onChanged();\n        }\n        if (other.getBlockHeight() != 0) {\n          setBlockHeight(other.getBlockHeight());\n        }\n        if (other.getConfirmed() != false) {\n          setConfirmed(other.getConfirmed());\n        }\n        if (other.getConfirmations() != 0) {\n          setConfirmations(other.getConfirmations());\n        }\n        switch (other.getPayloadCase()) {\n          case TRANSFER: {\n            mergeTransfer(other.getTransfer());\n            break;\n          }\n          case BOND: {\n            mergeBond(other.getBond());\n            break;\n          }\n          case SORTITION: {\n            mergeSortition(other.getSortition());\n            break;\n          }\n          case UNBOND: {\n            mergeUnbond(other.getUnbond());\n            break;\n          }\n          case WITHDRAW: {\n            mergeWithdraw(other.getWithdraw());\n            break;\n          }\n          case BATCH_TRANSFER: {\n            mergeBatchTransfer(other.getBatchTransfer());\n            break;\n          }\n          case PAYLOAD_NOT_SET: {\n            break;\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                id_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                data_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                version_ = input.readInt32();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 32: {\n                lockTime_ = input.readUInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                value_ = input.readInt64();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 48: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 56: {\n                payloadType_ = input.readEnum();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 66: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00002000;\n                break;\n              } // case 66\n              case 74: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00004000;\n                break;\n              } // case 74\n              case 82: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00008000;\n                break;\n              } // case 82\n              case 88: {\n                blockHeight_ = input.readUInt32();\n                bitField0_ |= 0x00010000;\n                break;\n              } // case 88\n              case 96: {\n                confirmed_ = input.readBool();\n                bitField0_ |= 0x00020000;\n                break;\n              } // case 96\n              case 104: {\n                confirmations_ = input.readInt32();\n                bitField0_ |= 0x00040000;\n                break;\n              } // case 104\n              case 242: {\n                input.readMessage(\n                    internalGetTransferFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 30;\n                break;\n              } // case 242\n              case 250: {\n                input.readMessage(\n                    internalGetBondFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 31;\n                break;\n              } // case 250\n              case 258: {\n                input.readMessage(\n                    internalGetSortitionFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 32;\n                break;\n              } // case 258\n              case 266: {\n                input.readMessage(\n                    internalGetUnbondFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 33;\n                break;\n              } // case 266\n              case 274: {\n                input.readMessage(\n                    internalGetWithdrawFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 34;\n                break;\n              } // case 274\n              case 282: {\n                input.readMessage(\n                    internalGetBatchTransferFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                payloadCase_ = 35;\n                break;\n              } // case 282\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int payloadCase_ = 0;\n      private java.lang.Object payload_;\n      public PayloadCase\n          getPayloadCase() {\n        return PayloadCase.forNumber(\n            payloadCase_);\n      }\n\n      public Builder clearPayload() {\n        payloadCase_ = 0;\n        payload_ = null;\n        onChanged();\n        return this;\n      }\n\n      private int bitField0_;\n\n      private java.lang.Object id_ = \"\";\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The id.\n       */\n      public java.lang.String getId() {\n        java.lang.Object ref = id_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          id_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return The bytes for id.\n       */\n      public com.google.protobuf.ByteString\n          getIdBytes() {\n        java.lang.Object ref = id_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          id_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearId() {\n        id_ = getDefaultInstance().getId();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string id = 1 [json_name = \"id\"];</code>\n       * @param value The bytes for id to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        id_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object data_ = \"\";\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The data.\n       */\n      public java.lang.String getData() {\n        java.lang.Object ref = data_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          data_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return The bytes for data.\n       */\n      public com.google.protobuf.ByteString\n          getDataBytes() {\n        java.lang.Object ref = data_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          data_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setData(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearData() {\n        data_ = getDefaultInstance().getData();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string data = 2 [json_name = \"data\"];</code>\n       * @param value The bytes for data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDataBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        data_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private int version_ ;\n      /**\n       * <pre>\n       * The version of the transaction.\n       * </pre>\n       *\n       * <code>int32 version = 3 [json_name = \"version\"];</code>\n       * @return The version.\n       */\n      @java.lang.Override\n      public int getVersion() {\n        return version_;\n      }\n      /**\n       * <pre>\n       * The version of the transaction.\n       * </pre>\n       *\n       * <code>int32 version = 3 [json_name = \"version\"];</code>\n       * @param value The version to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVersion(int value) {\n\n        version_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The version of the transaction.\n       * </pre>\n       *\n       * <code>int32 version = 3 [json_name = \"version\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVersion() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        version_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int lockTime_ ;\n      /**\n       * <pre>\n       * The lock time for the transaction.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 4 [json_name = \"lockTime\"];</code>\n       * @return The lockTime.\n       */\n      @java.lang.Override\n      public int getLockTime() {\n        return lockTime_;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 4 [json_name = \"lockTime\"];</code>\n       * @param value The lockTime to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLockTime(int value) {\n\n        lockTime_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The lock time for the transaction.\n       * </pre>\n       *\n       * <code>uint32 lock_time = 4 [json_name = \"lockTime\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLockTime() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        lockTime_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long value_ ;\n      /**\n       * <pre>\n       * The value of the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 value = 5 [json_name = \"value\"];</code>\n       * @return The value.\n       */\n      @java.lang.Override\n      public long getValue() {\n        return value_;\n      }\n      /**\n       * <pre>\n       * The value of the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 value = 5 [json_name = \"value\"];</code>\n       * @param value The value to set.\n       * @return This builder for chaining.\n       */\n      public Builder setValue(long value) {\n\n        value_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The value of the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 value = 5 [json_name = \"value\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearValue() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        value_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The fee for the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The fee for the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The fee for the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 6 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private int payloadType_ = 0;\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n       * @return The enum numeric value on the wire for payloadType.\n       */\n      @java.lang.Override public int getPayloadTypeValue() {\n        return payloadType_;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n       * @param value The enum numeric value on the wire for payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadTypeValue(int value) {\n        payloadType_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n       * @return The payloadType.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n        pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n        return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n       * @param value The payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadType(pactus.TransactionOuterClass.PayloadType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000040;\n        payloadType_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 7 [json_name = \"payloadType\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPayloadType() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        payloadType_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadTransfer, pactus.TransactionOuterClass.PayloadTransfer.Builder, pactus.TransactionOuterClass.PayloadTransferOrBuilder> transferBuilder_;\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       * @return Whether the transfer field is set.\n       */\n      @java.lang.Override\n      public boolean hasTransfer() {\n        return payloadCase_ == 30;\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       * @return The transfer.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadTransfer getTransfer() {\n        if (transferBuilder_ == null) {\n          if (payloadCase_ == 30) {\n            return (pactus.TransactionOuterClass.PayloadTransfer) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 30) {\n            return transferBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      public Builder setTransfer(pactus.TransactionOuterClass.PayloadTransfer value) {\n        if (transferBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          transferBuilder_.setMessage(value);\n        }\n        payloadCase_ = 30;\n        return this;\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      public Builder setTransfer(\n          pactus.TransactionOuterClass.PayloadTransfer.Builder builderForValue) {\n        if (transferBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          transferBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 30;\n        return this;\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      public Builder mergeTransfer(pactus.TransactionOuterClass.PayloadTransfer value) {\n        if (transferBuilder_ == null) {\n          if (payloadCase_ == 30 &&\n              payload_ != pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadTransfer.newBuilder((pactus.TransactionOuterClass.PayloadTransfer) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 30) {\n            transferBuilder_.mergeFrom(value);\n          } else {\n            transferBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 30;\n        return this;\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      public Builder clearTransfer() {\n        if (transferBuilder_ == null) {\n          if (payloadCase_ == 30) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 30) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          transferBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() {\n        return internalGetTransferFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() {\n        if ((payloadCase_ == 30) && (transferBuilder_ != null)) {\n          return transferBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 30) {\n            return (pactus.TransactionOuterClass.PayloadTransfer) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadTransfer transfer = 30 [json_name = \"transfer\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadTransfer, pactus.TransactionOuterClass.PayloadTransfer.Builder, pactus.TransactionOuterClass.PayloadTransferOrBuilder> \n          internalGetTransferFieldBuilder() {\n        if (transferBuilder_ == null) {\n          if (!(payloadCase_ == 30)) {\n            payload_ = pactus.TransactionOuterClass.PayloadTransfer.getDefaultInstance();\n          }\n          transferBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadTransfer, pactus.TransactionOuterClass.PayloadTransfer.Builder, pactus.TransactionOuterClass.PayloadTransferOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadTransfer) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 30;\n        onChanged();\n        return transferBuilder_;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadBond, pactus.TransactionOuterClass.PayloadBond.Builder, pactus.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_;\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       * @return Whether the bond field is set.\n       */\n      @java.lang.Override\n      public boolean hasBond() {\n        return payloadCase_ == 31;\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       * @return The bond.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBond getBond() {\n        if (bondBuilder_ == null) {\n          if (payloadCase_ == 31) {\n            return (pactus.TransactionOuterClass.PayloadBond) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 31) {\n            return bondBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      public Builder setBond(pactus.TransactionOuterClass.PayloadBond value) {\n        if (bondBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          bondBuilder_.setMessage(value);\n        }\n        payloadCase_ = 31;\n        return this;\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      public Builder setBond(\n          pactus.TransactionOuterClass.PayloadBond.Builder builderForValue) {\n        if (bondBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          bondBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 31;\n        return this;\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      public Builder mergeBond(pactus.TransactionOuterClass.PayloadBond value) {\n        if (bondBuilder_ == null) {\n          if (payloadCase_ == 31 &&\n              payload_ != pactus.TransactionOuterClass.PayloadBond.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadBond.newBuilder((pactus.TransactionOuterClass.PayloadBond) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 31) {\n            bondBuilder_.mergeFrom(value);\n          } else {\n            bondBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 31;\n        return this;\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      public Builder clearBond() {\n        if (bondBuilder_ == null) {\n          if (payloadCase_ == 31) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 31) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          bondBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadBond.Builder getBondBuilder() {\n        return internalGetBondFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() {\n        if ((payloadCase_ == 31) && (bondBuilder_ != null)) {\n          return bondBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 31) {\n            return (pactus.TransactionOuterClass.PayloadBond) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Bond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBond bond = 31 [json_name = \"bond\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadBond, pactus.TransactionOuterClass.PayloadBond.Builder, pactus.TransactionOuterClass.PayloadBondOrBuilder> \n          internalGetBondFieldBuilder() {\n        if (bondBuilder_ == null) {\n          if (!(payloadCase_ == 31)) {\n            payload_ = pactus.TransactionOuterClass.PayloadBond.getDefaultInstance();\n          }\n          bondBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadBond, pactus.TransactionOuterClass.PayloadBond.Builder, pactus.TransactionOuterClass.PayloadBondOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadBond) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 31;\n        onChanged();\n        return bondBuilder_;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadSortition, pactus.TransactionOuterClass.PayloadSortition.Builder, pactus.TransactionOuterClass.PayloadSortitionOrBuilder> sortitionBuilder_;\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       * @return Whether the sortition field is set.\n       */\n      @java.lang.Override\n      public boolean hasSortition() {\n        return payloadCase_ == 32;\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       * @return The sortition.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadSortition getSortition() {\n        if (sortitionBuilder_ == null) {\n          if (payloadCase_ == 32) {\n            return (pactus.TransactionOuterClass.PayloadSortition) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 32) {\n            return sortitionBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      public Builder setSortition(pactus.TransactionOuterClass.PayloadSortition value) {\n        if (sortitionBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          sortitionBuilder_.setMessage(value);\n        }\n        payloadCase_ = 32;\n        return this;\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      public Builder setSortition(\n          pactus.TransactionOuterClass.PayloadSortition.Builder builderForValue) {\n        if (sortitionBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          sortitionBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 32;\n        return this;\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      public Builder mergeSortition(pactus.TransactionOuterClass.PayloadSortition value) {\n        if (sortitionBuilder_ == null) {\n          if (payloadCase_ == 32 &&\n              payload_ != pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadSortition.newBuilder((pactus.TransactionOuterClass.PayloadSortition) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 32) {\n            sortitionBuilder_.mergeFrom(value);\n          } else {\n            sortitionBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 32;\n        return this;\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      public Builder clearSortition() {\n        if (sortitionBuilder_ == null) {\n          if (payloadCase_ == 32) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 32) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          sortitionBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadSortition.Builder getSortitionBuilder() {\n        return internalGetSortitionFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() {\n        if ((payloadCase_ == 32) && (sortitionBuilder_ != null)) {\n          return sortitionBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 32) {\n            return (pactus.TransactionOuterClass.PayloadSortition) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Sortition transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadSortition sortition = 32 [json_name = \"sortition\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadSortition, pactus.TransactionOuterClass.PayloadSortition.Builder, pactus.TransactionOuterClass.PayloadSortitionOrBuilder> \n          internalGetSortitionFieldBuilder() {\n        if (sortitionBuilder_ == null) {\n          if (!(payloadCase_ == 32)) {\n            payload_ = pactus.TransactionOuterClass.PayloadSortition.getDefaultInstance();\n          }\n          sortitionBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadSortition, pactus.TransactionOuterClass.PayloadSortition.Builder, pactus.TransactionOuterClass.PayloadSortitionOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadSortition) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 32;\n        onChanged();\n        return sortitionBuilder_;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadUnbond, pactus.TransactionOuterClass.PayloadUnbond.Builder, pactus.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_;\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       * @return Whether the unbond field is set.\n       */\n      @java.lang.Override\n      public boolean hasUnbond() {\n        return payloadCase_ == 33;\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       * @return The unbond.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadUnbond getUnbond() {\n        if (unbondBuilder_ == null) {\n          if (payloadCase_ == 33) {\n            return (pactus.TransactionOuterClass.PayloadUnbond) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 33) {\n            return unbondBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      public Builder setUnbond(pactus.TransactionOuterClass.PayloadUnbond value) {\n        if (unbondBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          unbondBuilder_.setMessage(value);\n        }\n        payloadCase_ = 33;\n        return this;\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      public Builder setUnbond(\n          pactus.TransactionOuterClass.PayloadUnbond.Builder builderForValue) {\n        if (unbondBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          unbondBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 33;\n        return this;\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      public Builder mergeUnbond(pactus.TransactionOuterClass.PayloadUnbond value) {\n        if (unbondBuilder_ == null) {\n          if (payloadCase_ == 33 &&\n              payload_ != pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadUnbond.newBuilder((pactus.TransactionOuterClass.PayloadUnbond) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 33) {\n            unbondBuilder_.mergeFrom(value);\n          } else {\n            unbondBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 33;\n        return this;\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      public Builder clearUnbond() {\n        if (unbondBuilder_ == null) {\n          if (payloadCase_ == 33) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 33) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          unbondBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() {\n        return internalGetUnbondFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() {\n        if ((payloadCase_ == 33) && (unbondBuilder_ != null)) {\n          return unbondBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 33) {\n            return (pactus.TransactionOuterClass.PayloadUnbond) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Unbond transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadUnbond unbond = 33 [json_name = \"unbond\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadUnbond, pactus.TransactionOuterClass.PayloadUnbond.Builder, pactus.TransactionOuterClass.PayloadUnbondOrBuilder> \n          internalGetUnbondFieldBuilder() {\n        if (unbondBuilder_ == null) {\n          if (!(payloadCase_ == 33)) {\n            payload_ = pactus.TransactionOuterClass.PayloadUnbond.getDefaultInstance();\n          }\n          unbondBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadUnbond, pactus.TransactionOuterClass.PayloadUnbond.Builder, pactus.TransactionOuterClass.PayloadUnbondOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadUnbond) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 33;\n        onChanged();\n        return unbondBuilder_;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadWithdraw, pactus.TransactionOuterClass.PayloadWithdraw.Builder, pactus.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_;\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       * @return Whether the withdraw field is set.\n       */\n      @java.lang.Override\n      public boolean hasWithdraw() {\n        return payloadCase_ == 34;\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       * @return The withdraw.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadWithdraw getWithdraw() {\n        if (withdrawBuilder_ == null) {\n          if (payloadCase_ == 34) {\n            return (pactus.TransactionOuterClass.PayloadWithdraw) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 34) {\n            return withdrawBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      public Builder setWithdraw(pactus.TransactionOuterClass.PayloadWithdraw value) {\n        if (withdrawBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          withdrawBuilder_.setMessage(value);\n        }\n        payloadCase_ = 34;\n        return this;\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      public Builder setWithdraw(\n          pactus.TransactionOuterClass.PayloadWithdraw.Builder builderForValue) {\n        if (withdrawBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          withdrawBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 34;\n        return this;\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      public Builder mergeWithdraw(pactus.TransactionOuterClass.PayloadWithdraw value) {\n        if (withdrawBuilder_ == null) {\n          if (payloadCase_ == 34 &&\n              payload_ != pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadWithdraw.newBuilder((pactus.TransactionOuterClass.PayloadWithdraw) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 34) {\n            withdrawBuilder_.mergeFrom(value);\n          } else {\n            withdrawBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 34;\n        return this;\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      public Builder clearWithdraw() {\n        if (withdrawBuilder_ == null) {\n          if (payloadCase_ == 34) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 34) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          withdrawBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() {\n        return internalGetWithdrawFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() {\n        if ((payloadCase_ == 34) && (withdrawBuilder_ != null)) {\n          return withdrawBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 34) {\n            return (pactus.TransactionOuterClass.PayloadWithdraw) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Withdraw transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadWithdraw withdraw = 34 [json_name = \"withdraw\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadWithdraw, pactus.TransactionOuterClass.PayloadWithdraw.Builder, pactus.TransactionOuterClass.PayloadWithdrawOrBuilder> \n          internalGetWithdrawFieldBuilder() {\n        if (withdrawBuilder_ == null) {\n          if (!(payloadCase_ == 34)) {\n            payload_ = pactus.TransactionOuterClass.PayloadWithdraw.getDefaultInstance();\n          }\n          withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadWithdraw, pactus.TransactionOuterClass.PayloadWithdraw.Builder, pactus.TransactionOuterClass.PayloadWithdrawOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadWithdraw) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 34;\n        onChanged();\n        return withdrawBuilder_;\n      }\n\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadBatchTransfer, pactus.TransactionOuterClass.PayloadBatchTransfer.Builder, pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder> batchTransferBuilder_;\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       * @return Whether the batchTransfer field is set.\n       */\n      @java.lang.Override\n      public boolean hasBatchTransfer() {\n        return payloadCase_ == 35;\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       * @return The batchTransfer.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBatchTransfer getBatchTransfer() {\n        if (batchTransferBuilder_ == null) {\n          if (payloadCase_ == 35) {\n            return (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n        } else {\n          if (payloadCase_ == 35) {\n            return batchTransferBuilder_.getMessage();\n          }\n          return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      public Builder setBatchTransfer(pactus.TransactionOuterClass.PayloadBatchTransfer value) {\n        if (batchTransferBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          payload_ = value;\n          onChanged();\n        } else {\n          batchTransferBuilder_.setMessage(value);\n        }\n        payloadCase_ = 35;\n        return this;\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      public Builder setBatchTransfer(\n          pactus.TransactionOuterClass.PayloadBatchTransfer.Builder builderForValue) {\n        if (batchTransferBuilder_ == null) {\n          payload_ = builderForValue.build();\n          onChanged();\n        } else {\n          batchTransferBuilder_.setMessage(builderForValue.build());\n        }\n        payloadCase_ = 35;\n        return this;\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      public Builder mergeBatchTransfer(pactus.TransactionOuterClass.PayloadBatchTransfer value) {\n        if (batchTransferBuilder_ == null) {\n          if (payloadCase_ == 35 &&\n              payload_ != pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance()) {\n            payload_ = pactus.TransactionOuterClass.PayloadBatchTransfer.newBuilder((pactus.TransactionOuterClass.PayloadBatchTransfer) payload_)\n                .mergeFrom(value).buildPartial();\n          } else {\n            payload_ = value;\n          }\n          onChanged();\n        } else {\n          if (payloadCase_ == 35) {\n            batchTransferBuilder_.mergeFrom(value);\n          } else {\n            batchTransferBuilder_.setMessage(value);\n          }\n        }\n        payloadCase_ = 35;\n        return this;\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      public Builder clearBatchTransfer() {\n        if (batchTransferBuilder_ == null) {\n          if (payloadCase_ == 35) {\n            payloadCase_ = 0;\n            payload_ = null;\n            onChanged();\n          }\n        } else {\n          if (payloadCase_ == 35) {\n            payloadCase_ = 0;\n            payload_ = null;\n          }\n          batchTransferBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      public pactus.TransactionOuterClass.PayloadBatchTransfer.Builder getBatchTransferBuilder() {\n        return internalGetBatchTransferFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder getBatchTransferOrBuilder() {\n        if ((payloadCase_ == 35) && (batchTransferBuilder_ != null)) {\n          return batchTransferBuilder_.getMessageOrBuilder();\n        } else {\n          if (payloadCase_ == 35) {\n            return (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_;\n          }\n          return pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n        }\n      }\n      /**\n       * <pre>\n       * Batch Transfer transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadBatchTransfer batch_transfer = 35 [json_name = \"batchTransfer\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.PayloadBatchTransfer, pactus.TransactionOuterClass.PayloadBatchTransfer.Builder, pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder> \n          internalGetBatchTransferFieldBuilder() {\n        if (batchTransferBuilder_ == null) {\n          if (!(payloadCase_ == 35)) {\n            payload_ = pactus.TransactionOuterClass.PayloadBatchTransfer.getDefaultInstance();\n          }\n          batchTransferBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.PayloadBatchTransfer, pactus.TransactionOuterClass.PayloadBatchTransfer.Builder, pactus.TransactionOuterClass.PayloadBatchTransferOrBuilder>(\n                  (pactus.TransactionOuterClass.PayloadBatchTransfer) payload_,\n                  getParentForChildren(),\n                  isClean());\n          payload_ = null;\n        }\n        payloadCase_ = 35;\n        onChanged();\n        return batchTransferBuilder_;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00002000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key associated with the transaction.\n       * </pre>\n       *\n       * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the transaction.\n       * </pre>\n       *\n       * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the transaction.\n       * </pre>\n       *\n       * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00004000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the transaction.\n       * </pre>\n       *\n       * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00004000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the transaction.\n       * </pre>\n       *\n       * <code>string public_key = 9 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00004000;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The signature for the transaction.\n       * </pre>\n       *\n       * <code>string signature = 10 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature for the transaction.\n       * </pre>\n       *\n       * <code>string signature = 10 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature for the transaction.\n       * </pre>\n       *\n       * <code>string signature = 10 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00008000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature for the transaction.\n       * </pre>\n       *\n       * <code>string signature = 10 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00008000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature for the transaction.\n       * </pre>\n       *\n       * <code>string signature = 10 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00008000;\n        onChanged();\n        return this;\n      }\n\n      private int blockHeight_ ;\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>uint32 block_height = 11 [json_name = \"blockHeight\"];</code>\n       * @return The blockHeight.\n       */\n      @java.lang.Override\n      public int getBlockHeight() {\n        return blockHeight_;\n      }\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>uint32 block_height = 11 [json_name = \"blockHeight\"];</code>\n       * @param value The blockHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockHeight(int value) {\n\n        blockHeight_ = value;\n        bitField0_ |= 0x00010000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>uint32 block_height = 11 [json_name = \"blockHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockHeight() {\n        bitField0_ = (bitField0_ & ~0x00010000);\n        blockHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private boolean confirmed_ ;\n      /**\n       * <pre>\n       * Indicates whether the transaction is confirmed.\n       * </pre>\n       *\n       * <code>bool confirmed = 12 [json_name = \"confirmed\"];</code>\n       * @return The confirmed.\n       */\n      @java.lang.Override\n      public boolean getConfirmed() {\n        return confirmed_;\n      }\n      /**\n       * <pre>\n       * Indicates whether the transaction is confirmed.\n       * </pre>\n       *\n       * <code>bool confirmed = 12 [json_name = \"confirmed\"];</code>\n       * @param value The confirmed to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConfirmed(boolean value) {\n\n        confirmed_ = value;\n        bitField0_ |= 0x00020000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates whether the transaction is confirmed.\n       * </pre>\n       *\n       * <code>bool confirmed = 12 [json_name = \"confirmed\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConfirmed() {\n        bitField0_ = (bitField0_ & ~0x00020000);\n        confirmed_ = false;\n        onChanged();\n        return this;\n      }\n\n      private int confirmations_ ;\n      /**\n       * <pre>\n       * The number of blocks that have been added to the chain after this transaction was included in a block.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>int32 confirmations = 13 [json_name = \"confirmations\"];</code>\n       * @return The confirmations.\n       */\n      @java.lang.Override\n      public int getConfirmations() {\n        return confirmations_;\n      }\n      /**\n       * <pre>\n       * The number of blocks that have been added to the chain after this transaction was included in a block.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>int32 confirmations = 13 [json_name = \"confirmations\"];</code>\n       * @param value The confirmations to set.\n       * @return This builder for chaining.\n       */\n      public Builder setConfirmations(int value) {\n\n        confirmations_ = value;\n        bitField0_ |= 0x00040000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The number of blocks that have been added to the chain after this transaction was included in a block.\n       * A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n       * </pre>\n       *\n       * <code>int32 confirmations = 13 [json_name = \"confirmations\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearConfirmations() {\n        bitField0_ = (bitField0_ & ~0x00040000);\n        confirmations_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.TransactionInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.TransactionInfo)\n    private static final pactus.TransactionOuterClass.TransactionInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.TransactionInfo();\n    }\n\n    public static pactus.TransactionOuterClass.TransactionInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<TransactionInfo>\n        PARSER = new com.google.protobuf.AbstractParser<TransactionInfo>() {\n      @java.lang.Override\n      public TransactionInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<TransactionInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<TransactionInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface DecodeRawTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.DecodeRawTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    java.lang.String getRawTransaction();\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getRawTransactionBytes();\n  }\n  /**\n   * <pre>\n   * Request message for decoding a raw transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.DecodeRawTransactionRequest}\n   */\n  public static final class DecodeRawTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.DecodeRawTransactionRequest)\n      DecodeRawTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"DecodeRawTransactionRequest\");\n    }\n    // Use DecodeRawTransactionRequest.newBuilder() to construct.\n    private DecodeRawTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private DecodeRawTransactionRequest() {\n      rawTransaction_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.DecodeRawTransactionRequest.class, pactus.TransactionOuterClass.DecodeRawTransactionRequest.Builder.class);\n    }\n\n    public static final int RAW_TRANSACTION_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object rawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getRawTransaction() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        rawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The raw transaction data in hexadecimal format.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getRawTransactionBytes() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        rawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, rawTransaction_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, rawTransaction_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.DecodeRawTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.DecodeRawTransactionRequest other = (pactus.TransactionOuterClass.DecodeRawTransactionRequest) obj;\n\n      if (!getRawTransaction()\n          .equals(other.getRawTransaction())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getRawTransaction().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.DecodeRawTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for decoding a raw transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.DecodeRawTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.DecodeRawTransactionRequest)\n        pactus.TransactionOuterClass.DecodeRawTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.DecodeRawTransactionRequest.class, pactus.TransactionOuterClass.DecodeRawTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.DecodeRawTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        rawTransaction_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.DecodeRawTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionRequest build() {\n        pactus.TransactionOuterClass.DecodeRawTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.DecodeRawTransactionRequest result = new pactus.TransactionOuterClass.DecodeRawTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.DecodeRawTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.rawTransaction_ = rawTransaction_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.DecodeRawTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.DecodeRawTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.DecodeRawTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.DecodeRawTransactionRequest.getDefaultInstance()) return this;\n        if (!other.getRawTransaction().isEmpty()) {\n          rawTransaction_ = other.rawTransaction_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                rawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object rawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The rawTransaction.\n       */\n      public java.lang.String getRawTransaction() {\n        java.lang.Object ref = rawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          rawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The bytes for rawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getRawTransactionBytes() {\n        java.lang.Object ref = rawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          rawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRawTransaction() {\n        rawTransaction_ = getDefaultInstance().getRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data in hexadecimal format.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The bytes for rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.DecodeRawTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.DecodeRawTransactionRequest)\n    private static final pactus.TransactionOuterClass.DecodeRawTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.DecodeRawTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<DecodeRawTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<DecodeRawTransactionRequest>() {\n      @java.lang.Override\n      public DecodeRawTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<DecodeRawTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<DecodeRawTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.DecodeRawTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface DecodeRawTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.DecodeRawTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     * @return Whether the transaction field is set.\n     */\n    boolean hasTransaction();\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     * @return The transaction.\n     */\n    pactus.TransactionOuterClass.TransactionInfo getTransaction();\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     */\n    pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains the decoded transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.DecodeRawTransactionResponse}\n   */\n  public static final class DecodeRawTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.DecodeRawTransactionResponse)\n      DecodeRawTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"DecodeRawTransactionResponse\");\n    }\n    // Use DecodeRawTransactionResponse.newBuilder() to construct.\n    private DecodeRawTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private DecodeRawTransactionResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.DecodeRawTransactionResponse.class, pactus.TransactionOuterClass.DecodeRawTransactionResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int TRANSACTION_FIELD_NUMBER = 1;\n    private pactus.TransactionOuterClass.TransactionInfo transaction_;\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     * @return Whether the transaction field is set.\n     */\n    @java.lang.Override\n    public boolean hasTransaction() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     * @return The transaction.\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfo getTransaction() {\n      return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n    }\n    /**\n     * <pre>\n     * The decoded transaction information.\n     * </pre>\n     *\n     * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n     */\n    @java.lang.Override\n    public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() {\n      return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(1, getTransaction());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(1, getTransaction());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.DecodeRawTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.DecodeRawTransactionResponse other = (pactus.TransactionOuterClass.DecodeRawTransactionResponse) obj;\n\n      if (hasTransaction() != other.hasTransaction()) return false;\n      if (hasTransaction()) {\n        if (!getTransaction()\n            .equals(other.getTransaction())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (hasTransaction()) {\n        hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;\n        hash = (53 * hash) + getTransaction().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.DecodeRawTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the decoded transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.DecodeRawTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.DecodeRawTransactionResponse)\n        pactus.TransactionOuterClass.DecodeRawTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.DecodeRawTransactionResponse.class, pactus.TransactionOuterClass.DecodeRawTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.DecodeRawTransactionResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetTransactionFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        transaction_ = null;\n        if (transactionBuilder_ != null) {\n          transactionBuilder_.dispose();\n          transactionBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_DecodeRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.DecodeRawTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionResponse build() {\n        pactus.TransactionOuterClass.DecodeRawTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.DecodeRawTransactionResponse buildPartial() {\n        pactus.TransactionOuterClass.DecodeRawTransactionResponse result = new pactus.TransactionOuterClass.DecodeRawTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.DecodeRawTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.transaction_ = transactionBuilder_ == null\n              ? transaction_\n              : transactionBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.DecodeRawTransactionResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.DecodeRawTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.DecodeRawTransactionResponse other) {\n        if (other == pactus.TransactionOuterClass.DecodeRawTransactionResponse.getDefaultInstance()) return this;\n        if (other.hasTransaction()) {\n          mergeTransaction(other.getTransaction());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                input.readMessage(\n                    internalGetTransactionFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private pactus.TransactionOuterClass.TransactionInfo transaction_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> transactionBuilder_;\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       * @return Whether the transaction field is set.\n       */\n      public boolean hasTransaction() {\n        return ((bitField0_ & 0x00000001) != 0);\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       * @return The transaction.\n       */\n      public pactus.TransactionOuterClass.TransactionInfo getTransaction() {\n        if (transactionBuilder_ == null) {\n          return transaction_ == null ? pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n        } else {\n          return transactionBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public Builder setTransaction(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (transactionBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          transaction_ = value;\n        } else {\n          transactionBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public Builder setTransaction(\n          pactus.TransactionOuterClass.TransactionInfo.Builder builderForValue) {\n        if (transactionBuilder_ == null) {\n          transaction_ = builderForValue.build();\n        } else {\n          transactionBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public Builder mergeTransaction(pactus.TransactionOuterClass.TransactionInfo value) {\n        if (transactionBuilder_ == null) {\n          if (((bitField0_ & 0x00000001) != 0) &&\n            transaction_ != null &&\n            transaction_ != pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance()) {\n            getTransactionBuilder().mergeFrom(value);\n          } else {\n            transaction_ = value;\n          }\n        } else {\n          transactionBuilder_.mergeFrom(value);\n        }\n        if (transaction_ != null) {\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public Builder clearTransaction() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        transaction_ = null;\n        if (transactionBuilder_ != null) {\n          transactionBuilder_.dispose();\n          transactionBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfo.Builder getTransactionBuilder() {\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return internalGetTransactionFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      public pactus.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() {\n        if (transactionBuilder_ != null) {\n          return transactionBuilder_.getMessageOrBuilder();\n        } else {\n          return transaction_ == null ?\n              pactus.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_;\n        }\n      }\n      /**\n       * <pre>\n       * The decoded transaction information.\n       * </pre>\n       *\n       * <code>.pactus.TransactionInfo transaction = 1 [json_name = \"transaction\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder> \n          internalGetTransactionFieldBuilder() {\n        if (transactionBuilder_ == null) {\n          transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.TransactionOuterClass.TransactionInfo, pactus.TransactionOuterClass.TransactionInfo.Builder, pactus.TransactionOuterClass.TransactionInfoOrBuilder>(\n                  getTransaction(),\n                  getParentForChildren(),\n                  isClean());\n          transaction_ = null;\n        }\n        return transactionBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.DecodeRawTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.DecodeRawTransactionResponse)\n    private static final pactus.TransactionOuterClass.DecodeRawTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.DecodeRawTransactionResponse();\n    }\n\n    public static pactus.TransactionOuterClass.DecodeRawTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<DecodeRawTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<DecodeRawTransactionResponse>() {\n      @java.lang.Override\n      public DecodeRawTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<DecodeRawTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<DecodeRawTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.DecodeRawTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CheckTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CheckTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The raw transaction data to be checked.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    java.lang.String getRawTransaction();\n    /**\n     * <pre>\n     * The raw transaction data to be checked.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getRawTransactionBytes();\n  }\n  /**\n   * <pre>\n   * Request message for checking a transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CheckTransactionRequest}\n   */\n  public static final class CheckTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CheckTransactionRequest)\n      CheckTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CheckTransactionRequest\");\n    }\n    // Use CheckTransactionRequest.newBuilder() to construct.\n    private CheckTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CheckTransactionRequest() {\n      rawTransaction_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.CheckTransactionRequest.class, pactus.TransactionOuterClass.CheckTransactionRequest.Builder.class);\n    }\n\n    public static final int RAW_TRANSACTION_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object rawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The raw transaction data to be checked.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getRawTransaction() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        rawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The raw transaction data to be checked.\n     * </pre>\n     *\n     * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getRawTransactionBytes() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        rawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, rawTransaction_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, rawTransaction_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.CheckTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.CheckTransactionRequest other = (pactus.TransactionOuterClass.CheckTransactionRequest) obj;\n\n      if (!getRawTransaction()\n          .equals(other.getRawTransaction())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getRawTransaction().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.CheckTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for checking a transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CheckTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CheckTransactionRequest)\n        pactus.TransactionOuterClass.CheckTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.CheckTransactionRequest.class, pactus.TransactionOuterClass.CheckTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.CheckTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        rawTransaction_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionRequest getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.CheckTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionRequest build() {\n        pactus.TransactionOuterClass.CheckTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionRequest buildPartial() {\n        pactus.TransactionOuterClass.CheckTransactionRequest result = new pactus.TransactionOuterClass.CheckTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.CheckTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.rawTransaction_ = rawTransaction_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.CheckTransactionRequest) {\n          return mergeFrom((pactus.TransactionOuterClass.CheckTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.CheckTransactionRequest other) {\n        if (other == pactus.TransactionOuterClass.CheckTransactionRequest.getDefaultInstance()) return this;\n        if (!other.getRawTransaction().isEmpty()) {\n          rawTransaction_ = other.rawTransaction_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                rawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object rawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The raw transaction data to be checked.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The rawTransaction.\n       */\n      public java.lang.String getRawTransaction() {\n        java.lang.Object ref = rawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          rawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be checked.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return The bytes for rawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getRawTransactionBytes() {\n        java.lang.Object ref = rawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          rawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be checked.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be checked.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRawTransaction() {\n        rawTransaction_ = getDefaultInstance().getRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be checked.\n       * </pre>\n       *\n       * <code>string raw_transaction = 1 [json_name = \"rawTransaction\"];</code>\n       * @param value The bytes for rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CheckTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CheckTransactionRequest)\n    private static final pactus.TransactionOuterClass.CheckTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.CheckTransactionRequest();\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CheckTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<CheckTransactionRequest>() {\n      @java.lang.Override\n      public CheckTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CheckTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CheckTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.CheckTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CheckTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CheckTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Indicates whether the transaction is valid.\n     * </pre>\n     *\n     * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n     * @return The isValid.\n     */\n    boolean getIsValid();\n\n    /**\n     * <pre>\n     * An error message if the transaction is invalid.\n     * Empty if the transaction is valid.\n     * </pre>\n     *\n     * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n     * @return The errorMessage.\n     */\n    java.lang.String getErrorMessage();\n    /**\n     * <pre>\n     * An error message if the transaction is invalid.\n     * Empty if the transaction is valid.\n     * </pre>\n     *\n     * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n     * @return The bytes for errorMessage.\n     */\n    com.google.protobuf.ByteString\n        getErrorMessageBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the result of the transaction check.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CheckTransactionResponse}\n   */\n  public static final class CheckTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CheckTransactionResponse)\n      CheckTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CheckTransactionResponse\");\n    }\n    // Use CheckTransactionResponse.newBuilder() to construct.\n    private CheckTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CheckTransactionResponse() {\n      errorMessage_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.TransactionOuterClass.CheckTransactionResponse.class, pactus.TransactionOuterClass.CheckTransactionResponse.Builder.class);\n    }\n\n    public static final int IS_VALID_FIELD_NUMBER = 1;\n    private boolean isValid_ = false;\n    /**\n     * <pre>\n     * Indicates whether the transaction is valid.\n     * </pre>\n     *\n     * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n     * @return The isValid.\n     */\n    @java.lang.Override\n    public boolean getIsValid() {\n      return isValid_;\n    }\n\n    public static final int ERROR_MESSAGE_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object errorMessage_ = \"\";\n    /**\n     * <pre>\n     * An error message if the transaction is invalid.\n     * Empty if the transaction is valid.\n     * </pre>\n     *\n     * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n     * @return The errorMessage.\n     */\n    @java.lang.Override\n    public java.lang.String getErrorMessage() {\n      java.lang.Object ref = errorMessage_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        errorMessage_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * An error message if the transaction is invalid.\n     * Empty if the transaction is valid.\n     * </pre>\n     *\n     * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n     * @return The bytes for errorMessage.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getErrorMessageBytes() {\n      java.lang.Object ref = errorMessage_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        errorMessage_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (isValid_ != false) {\n        output.writeBool(1, isValid_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (isValid_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(1, isValid_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.TransactionOuterClass.CheckTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.TransactionOuterClass.CheckTransactionResponse other = (pactus.TransactionOuterClass.CheckTransactionResponse) obj;\n\n      if (getIsValid()\n          != other.getIsValid()) return false;\n      if (!getErrorMessage()\n          .equals(other.getErrorMessage())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + IS_VALID_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIsValid());\n      hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;\n      hash = (53 * hash) + getErrorMessage().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.TransactionOuterClass.CheckTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.TransactionOuterClass.CheckTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the result of the transaction check.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CheckTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CheckTransactionResponse)\n        pactus.TransactionOuterClass.CheckTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.TransactionOuterClass.CheckTransactionResponse.class, pactus.TransactionOuterClass.CheckTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.TransactionOuterClass.CheckTransactionResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        isValid_ = false;\n        errorMessage_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.TransactionOuterClass.internal_static_pactus_CheckTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionResponse getDefaultInstanceForType() {\n        return pactus.TransactionOuterClass.CheckTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionResponse build() {\n        pactus.TransactionOuterClass.CheckTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.TransactionOuterClass.CheckTransactionResponse buildPartial() {\n        pactus.TransactionOuterClass.CheckTransactionResponse result = new pactus.TransactionOuterClass.CheckTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.TransactionOuterClass.CheckTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.isValid_ = isValid_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.errorMessage_ = errorMessage_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.TransactionOuterClass.CheckTransactionResponse) {\n          return mergeFrom((pactus.TransactionOuterClass.CheckTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.TransactionOuterClass.CheckTransactionResponse other) {\n        if (other == pactus.TransactionOuterClass.CheckTransactionResponse.getDefaultInstance()) return this;\n        if (other.getIsValid() != false) {\n          setIsValid(other.getIsValid());\n        }\n        if (!other.getErrorMessage().isEmpty()) {\n          errorMessage_ = other.errorMessage_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                isValid_ = input.readBool();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                errorMessage_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private boolean isValid_ ;\n      /**\n       * <pre>\n       * Indicates whether the transaction is valid.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @return The isValid.\n       */\n      @java.lang.Override\n      public boolean getIsValid() {\n        return isValid_;\n      }\n      /**\n       * <pre>\n       * Indicates whether the transaction is valid.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @param value The isValid to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIsValid(boolean value) {\n\n        isValid_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates whether the transaction is valid.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIsValid() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        isValid_ = false;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object errorMessage_ = \"\";\n      /**\n       * <pre>\n       * An error message if the transaction is invalid.\n       * Empty if the transaction is valid.\n       * </pre>\n       *\n       * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n       * @return The errorMessage.\n       */\n      public java.lang.String getErrorMessage() {\n        java.lang.Object ref = errorMessage_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          errorMessage_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * An error message if the transaction is invalid.\n       * Empty if the transaction is valid.\n       * </pre>\n       *\n       * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n       * @return The bytes for errorMessage.\n       */\n      public com.google.protobuf.ByteString\n          getErrorMessageBytes() {\n        java.lang.Object ref = errorMessage_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          errorMessage_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * An error message if the transaction is invalid.\n       * Empty if the transaction is valid.\n       * </pre>\n       *\n       * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n       * @param value The errorMessage to set.\n       * @return This builder for chaining.\n       */\n      public Builder setErrorMessage(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        errorMessage_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * An error message if the transaction is invalid.\n       * Empty if the transaction is valid.\n       * </pre>\n       *\n       * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearErrorMessage() {\n        errorMessage_ = getDefaultInstance().getErrorMessage();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * An error message if the transaction is invalid.\n       * Empty if the transaction is valid.\n       * </pre>\n       *\n       * <code>string error_message = 2 [json_name = \"errorMessage\"];</code>\n       * @param value The bytes for errorMessage to set.\n       * @return This builder for chaining.\n       */\n      public Builder setErrorMessageBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        errorMessage_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CheckTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CheckTransactionResponse)\n    private static final pactus.TransactionOuterClass.CheckTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.TransactionOuterClass.CheckTransactionResponse();\n    }\n\n    public static pactus.TransactionOuterClass.CheckTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CheckTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<CheckTransactionResponse>() {\n      @java.lang.Override\n      public CheckTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CheckTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CheckTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.TransactionOuterClass.CheckTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTransactionResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CalculateFeeRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CalculateFeeRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CalculateFeeResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CalculateFeeResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_BroadcastTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_BroadcastTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawTransferTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawBondTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawUnbondTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawBatchTransferTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetRawTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadTransfer_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadTransfer_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadBond_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadBond_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadSortition_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadSortition_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadUnbond_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadUnbond_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadWithdraw_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadWithdraw_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PayloadBatchTransfer_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PayloadBatchTransfer_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_Recipient_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_Recipient_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_TransactionInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_TransactionInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_DecodeRawTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_DecodeRawTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_DecodeRawTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_DecodeRawTransactionResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CheckTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CheckTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CheckTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CheckTransactionResponse_fieldAccessorTable;\n\n  public static com.google.protobuf.Descriptors.FileDescriptor\n      getDescriptor() {\n    return descriptor;\n  }\n  private static  com.google.protobuf.Descriptors.FileDescriptor\n      descriptor;\n  static {\n    java.lang.String[] descriptorData = {\n      \"\\n\\021transaction.proto\\022\\006pactus\\\"c\\n\\025GetTransa\" +\n      \"ctionRequest\\022\\016\\n\\002id\\030\\001 \\001(\\tR\\002id\\022:\\n\\tverbosit\" +\n      \"y\\030\\002 \\001(\\0162\\034.pactus.TransactionVerbosityR\\tv\" +\n      \"erbosity\\\"\\225\\001\\n\\026GetTransactionResponse\\022!\\n\\014b\" +\n      \"lock_height\\030\\001 \\001(\\rR\\013blockHeight\\022\\035\\n\\nblock_\" +\n      \"time\\030\\002 \\001(\\rR\\tblockTime\\0229\\n\\013transaction\\030\\003 \\001\" +\n      \"(\\0132\\027.pactus.TransactionInfoR\\013transaction\" +\n      \"\\\"\\210\\001\\n\\023CalculateFeeRequest\\022\\026\\n\\006amount\\030\\001 \\001(\\003\" +\n      \"R\\006amount\\0226\\n\\014payload_type\\030\\002 \\001(\\0162\\023.pactus.\" +\n      \"PayloadTypeR\\013payloadType\\022!\\n\\014fixed_amount\" +\n      \"\\030\\003 \\001(\\010R\\013fixedAmount\\\"@\\n\\024CalculateFeeRespo\" +\n      \"nse\\022\\026\\n\\006amount\\030\\001 \\001(\\003R\\006amount\\022\\020\\n\\003fee\\030\\002 \\001(\\003\" +\n      \"R\\003fee\\\"S\\n\\033BroadcastTransactionRequest\\0224\\n\\026\" +\n      \"signed_raw_transaction\\030\\001 \\001(\\tR\\024signedRawT\" +\n      \"ransaction\\\".\\n\\034BroadcastTransactionRespon\" +\n      \"se\\022\\016\\n\\002id\\030\\001 \\001(\\tR\\002id\\\"\\261\\001\\n GetRawTransferTra\" +\n      \"nsactionRequest\\022\\033\\n\\tlock_time\\030\\001 \\001(\\rR\\010lock\" +\n      \"Time\\022\\026\\n\\006sender\\030\\002 \\001(\\tR\\006sender\\022\\032\\n\\010receiver\" +\n      \"\\030\\003 \\001(\\tR\\010receiver\\022\\026\\n\\006amount\\030\\004 \\001(\\003R\\006amount\" +\n      \"\\022\\020\\n\\003fee\\030\\005 \\001(\\003R\\003fee\\022\\022\\n\\004memo\\030\\006 \\001(\\tR\\004memo\\\"\\301\" +\n      \"\\002\\n\\034GetRawBondTransactionRequest\\022\\033\\n\\tlock_\" +\n      \"time\\030\\001 \\001(\\rR\\010lockTime\\022\\026\\n\\006sender\\030\\002 \\001(\\tR\\006se\" +\n      \"nder\\022\\032\\n\\010receiver\\030\\003 \\001(\\tR\\010receiver\\022\\024\\n\\005stak\" +\n      \"e\\030\\004 \\001(\\003R\\005stake\\022\\035\\n\\npublic_key\\030\\005 \\001(\\tR\\tpubl\" +\n      \"icKey\\022\\020\\n\\003fee\\030\\006 \\001(\\003R\\003fee\\022\\022\\n\\004memo\\030\\007 \\001(\\tR\\004m\" +\n      \"emo\\022%\\n\\016delegate_owner\\030\\010 \\001(\\tR\\rdelegateOwn\" +\n      \"er\\022%\\n\\016delegate_share\\030\\t \\001(\\003R\\rdelegateShar\" +\n      \"e\\022\\'\\n\\017delegate_expiry\\030\\n \\001(\\rR\\016delegateExpi\" +\n      \"ry\\\"\\245\\001\\n\\036GetRawUnbondTransactionRequest\\022\\033\\n\" +\n      \"\\tlock_time\\030\\001 \\001(\\rR\\010lockTime\\022+\\n\\021validator_\" +\n      \"address\\030\\002 \\001(\\tR\\020validatorAddress\\022\\022\\n\\004memo\\030\" +\n      \"\\003 \\001(\\tR\\004memo\\022%\\n\\016delegate_owner\\030\\004 \\001(\\tR\\rdel\" +\n      \"egateOwner\\\"\\323\\001\\n GetRawWithdrawTransaction\" +\n      \"Request\\022\\033\\n\\tlock_time\\030\\001 \\001(\\rR\\010lockTime\\022+\\n\\021\" +\n      \"validator_address\\030\\002 \\001(\\tR\\020validatorAddres\" +\n      \"s\\022\\'\\n\\017account_address\\030\\003 \\001(\\tR\\016accountAddre\" +\n      \"ss\\022\\026\\n\\006amount\\030\\004 \\001(\\003R\\006amount\\022\\020\\n\\003fee\\030\\005 \\001(\\003R\" +\n      \"\\003fee\\022\\022\\n\\004memo\\030\\006 \\001(\\tR\\004memo\\\"\\265\\001\\n%GetRawBatch\" +\n      \"TransferTransactionRequest\\022\\033\\n\\tlock_time\\030\" +\n      \"\\001 \\001(\\rR\\010lockTime\\022\\026\\n\\006sender\\030\\002 \\001(\\tR\\006sender\\022\" +\n      \"1\\n\\nrecipients\\030\\003 \\003(\\0132\\021.pactus.RecipientR\\n\" +\n      \"recipients\\022\\020\\n\\003fee\\030\\004 \\001(\\003R\\003fee\\022\\022\\n\\004memo\\030\\005 \\001\" +\n      \"(\\tR\\004memo\\\"T\\n\\031GetRawTransactionResponse\\022\\'\\n\" +\n      \"\\017raw_transaction\\030\\001 \\001(\\tR\\016rawTransaction\\022\\016\" +\n      \"\\n\\002id\\030\\002 \\001(\\tR\\002id\\\"]\\n\\017PayloadTransfer\\022\\026\\n\\006sen\" +\n      \"der\\030\\001 \\001(\\tR\\006sender\\022\\032\\n\\010receiver\\030\\002 \\001(\\tR\\010rec\" +\n      \"eiver\\022\\026\\n\\006amount\\030\\003 \\001(\\003R\\006amount\\\"\\220\\002\\n\\013Payloa\" +\n      \"dBond\\022\\026\\n\\006sender\\030\\001 \\001(\\tR\\006sender\\022\\032\\n\\010receive\" +\n      \"r\\030\\002 \\001(\\tR\\010receiver\\022\\024\\n\\005stake\\030\\003 \\001(\\003R\\005stake\\022\" +\n      \"\\035\\n\\npublic_key\\030\\004 \\001(\\tR\\tpublicKey\\022!\\n\\014is_del\" +\n      \"egated\\030\\005 \\001(\\010R\\013isDelegated\\022%\\n\\016delegate_ow\" +\n      \"ner\\030\\006 \\001(\\tR\\rdelegateOwner\\022%\\n\\016delegate_sha\" +\n      \"re\\030\\007 \\001(\\003R\\rdelegateShare\\022\\'\\n\\017delegate_expi\" +\n      \"ry\\030\\010 \\001(\\rR\\016delegateExpiry\\\"B\\n\\020PayloadSorti\" +\n      \"tion\\022\\030\\n\\007address\\030\\001 \\001(\\tR\\007address\\022\\024\\n\\005proof\\030\" +\n      \"\\002 \\001(\\tR\\005proof\\\"T\\n\\rPayloadUnbond\\022\\034\\n\\tvalidat\" +\n      \"or\\030\\001 \\001(\\tR\\tvalidator\\022%\\n\\016delegate_owner\\030\\002 \" +\n      \"\\001(\\tR\\rdelegateOwner\\\"\\177\\n\\017PayloadWithdraw\\022+\\n\" +\n      \"\\021validator_address\\030\\001 \\001(\\tR\\020validatorAddre\" +\n      \"ss\\022\\'\\n\\017account_address\\030\\002 \\001(\\tR\\016accountAddr\" +\n      \"ess\\022\\026\\n\\006amount\\030\\003 \\001(\\003R\\006amount\\\"a\\n\\024PayloadBa\" +\n      \"tchTransfer\\022\\026\\n\\006sender\\030\\001 \\001(\\tR\\006sender\\0221\\n\\nr\" +\n      \"ecipients\\030\\002 \\003(\\0132\\021.pactus.RecipientR\\nreci\" +\n      \"pients\\\"?\\n\\tRecipient\\022\\032\\n\\010receiver\\030\\001 \\001(\\tR\\010r\" +\n      \"eceiver\\022\\026\\n\\006amount\\030\\002 \\001(\\003R\\006amount\\\"\\332\\005\\n\\017Tran\" +\n      \"sactionInfo\\022\\016\\n\\002id\\030\\001 \\001(\\tR\\002id\\022\\022\\n\\004data\\030\\002 \\001(\" +\n      \"\\tR\\004data\\022\\030\\n\\007version\\030\\003 \\001(\\005R\\007version\\022\\033\\n\\tloc\" +\n      \"k_time\\030\\004 \\001(\\rR\\010lockTime\\022\\024\\n\\005value\\030\\005 \\001(\\003R\\005v\" +\n      \"alue\\022\\020\\n\\003fee\\030\\006 \\001(\\003R\\003fee\\0226\\n\\014payload_type\\030\\007\" +\n      \" \\001(\\0162\\023.pactus.PayloadTypeR\\013payloadType\\0225\" +\n      \"\\n\\010transfer\\030\\036 \\001(\\0132\\027.pactus.PayloadTransfe\" +\n      \"rH\\000R\\010transfer\\022)\\n\\004bond\\030\\037 \\001(\\0132\\023.pactus.Pay\" +\n      \"loadBondH\\000R\\004bond\\0228\\n\\tsortition\\030  \\001(\\0132\\030.pa\" +\n      \"ctus.PayloadSortitionH\\000R\\tsortition\\022/\\n\\006un\" +\n      \"bond\\030! \\001(\\0132\\025.pactus.PayloadUnbondH\\000R\\006unb\" +\n      \"ond\\0225\\n\\010withdraw\\030\\\" \\001(\\0132\\027.pactus.PayloadWi\" +\n      \"thdrawH\\000R\\010withdraw\\022E\\n\\016batch_transfer\\030# \\001\" +\n      \"(\\0132\\034.pactus.PayloadBatchTransferH\\000R\\rbatc\" +\n      \"hTransfer\\022\\022\\n\\004memo\\030\\010 \\001(\\tR\\004memo\\022\\035\\n\\npublic_\" +\n      \"key\\030\\t \\001(\\tR\\tpublicKey\\022\\034\\n\\tsignature\\030\\n \\001(\\tR\" +\n      \"\\tsignature\\022!\\n\\014block_height\\030\\013 \\001(\\rR\\013blockH\" +\n      \"eight\\022\\034\\n\\tconfirmed\\030\\014 \\001(\\010R\\tconfirmed\\022$\\n\\rc\" +\n      \"onfirmations\\030\\r \\001(\\005R\\rconfirmationsB\\t\\n\\007pay\" +\n      \"load\\\"F\\n\\033DecodeRawTransactionRequest\\022\\'\\n\\017r\" +\n      \"aw_transaction\\030\\001 \\001(\\tR\\016rawTransaction\\\"Y\\n\\034\" +\n      \"DecodeRawTransactionResponse\\0229\\n\\013transact\" +\n      \"ion\\030\\001 \\001(\\0132\\027.pactus.TransactionInfoR\\013tran\" +\n      \"saction\\\"B\\n\\027CheckTransactionRequest\\022\\'\\n\\017ra\" +\n      \"w_transaction\\030\\001 \\001(\\tR\\016rawTransaction\\\"Z\\n\\030C\" +\n      \"heckTransactionResponse\\022\\031\\n\\010is_valid\\030\\001 \\001(\" +\n      \"\\010R\\007isValid\\022#\\n\\rerror_message\\030\\002 \\001(\\tR\\014error\" +\n      \"Message*\\316\\001\\n\\013PayloadType\\022\\034\\n\\030PAYLOAD_TYPE_\" +\n      \"UNSPECIFIED\\020\\000\\022\\031\\n\\025PAYLOAD_TYPE_TRANSFER\\020\\001\" +\n      \"\\022\\025\\n\\021PAYLOAD_TYPE_BOND\\020\\002\\022\\032\\n\\026PAYLOAD_TYPE_\" +\n      \"SORTITION\\020\\003\\022\\027\\n\\023PAYLOAD_TYPE_UNBOND\\020\\004\\022\\031\\n\\025\" +\n      \"PAYLOAD_TYPE_WITHDRAW\\020\\005\\022\\037\\n\\033PAYLOAD_TYPE_\" +\n      \"BATCH_TRANSFER\\020\\006*V\\n\\024TransactionVerbosity\" +\n      \"\\022\\036\\n\\032TRANSACTION_VERBOSITY_DATA\\020\\000\\022\\036\\n\\032TRAN\" +\n      \"SACTION_VERBOSITY_INFO\\020\\0012\\326\\007\\n\\013Transaction\" +\n      \"\\022O\\n\\016GetTransaction\\022\\035.pactus.GetTransacti\" +\n      \"onRequest\\032\\036.pactus.GetTransactionRespons\" +\n      \"e\\022I\\n\\014CalculateFee\\022\\033.pactus.CalculateFeeR\" +\n      \"equest\\032\\034.pactus.CalculateFeeResponse\\022a\\n\\024\" +\n      \"BroadcastTransaction\\022#.pactus.BroadcastT\" +\n      \"ransactionRequest\\032$.pactus.BroadcastTran\" +\n      \"sactionResponse\\022h\\n\\031GetRawTransferTransac\" +\n      \"tion\\022(.pactus.GetRawTransferTransactionR\" +\n      \"equest\\032!.pactus.GetRawTransactionRespons\" +\n      \"e\\022`\\n\\025GetRawBondTransaction\\022$.pactus.GetR\" +\n      \"awBondTransactionRequest\\032!.pactus.GetRaw\" +\n      \"TransactionResponse\\022d\\n\\027GetRawUnbondTrans\" +\n      \"action\\022&.pactus.GetRawUnbondTransactionR\" +\n      \"equest\\032!.pactus.GetRawTransactionRespons\" +\n      \"e\\022h\\n\\031GetRawWithdrawTransaction\\022(.pactus.\" +\n      \"GetRawWithdrawTransactionRequest\\032!.pactu\" +\n      \"s.GetRawTransactionResponse\\022r\\n\\036GetRawBat\" +\n      \"chTransferTransaction\\022-.pactus.GetRawBat\" +\n      \"chTransferTransactionRequest\\032!.pactus.Ge\" +\n      \"tRawTransactionResponse\\022a\\n\\024DecodeRawTran\" +\n      \"saction\\022#.pactus.DecodeRawTransactionReq\" +\n      \"uest\\032$.pactus.DecodeRawTransactionRespon\" +\n      \"se\\022U\\n\\020CheckTransaction\\022\\037.pactus.CheckTra\" +\n      \"nsactionRequest\\032 .pactus.CheckTransactio\" +\n      \"nResponseB:\\n\\006pactusZ0github.com/pactus-p\" +\n      \"roject/pactus/www/grpc/pactusb\\006proto3\"\n    };\n    descriptor = com.google.protobuf.Descriptors.FileDescriptor\n      .internalBuildGeneratedFileFrom(descriptorData,\n        new com.google.protobuf.Descriptors.FileDescriptor[] {\n        });\n    internal_static_pactus_GetTransactionRequest_descriptor =\n      getDescriptor().getMessageType(0);\n    internal_static_pactus_GetTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTransactionRequest_descriptor,\n        new java.lang.String[] { \"Id\", \"Verbosity\", });\n    internal_static_pactus_GetTransactionResponse_descriptor =\n      getDescriptor().getMessageType(1);\n    internal_static_pactus_GetTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTransactionResponse_descriptor,\n        new java.lang.String[] { \"BlockHeight\", \"BlockTime\", \"Transaction\", });\n    internal_static_pactus_CalculateFeeRequest_descriptor =\n      getDescriptor().getMessageType(2);\n    internal_static_pactus_CalculateFeeRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CalculateFeeRequest_descriptor,\n        new java.lang.String[] { \"Amount\", \"PayloadType\", \"FixedAmount\", });\n    internal_static_pactus_CalculateFeeResponse_descriptor =\n      getDescriptor().getMessageType(3);\n    internal_static_pactus_CalculateFeeResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CalculateFeeResponse_descriptor,\n        new java.lang.String[] { \"Amount\", \"Fee\", });\n    internal_static_pactus_BroadcastTransactionRequest_descriptor =\n      getDescriptor().getMessageType(4);\n    internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_BroadcastTransactionRequest_descriptor,\n        new java.lang.String[] { \"SignedRawTransaction\", });\n    internal_static_pactus_BroadcastTransactionResponse_descriptor =\n      getDescriptor().getMessageType(5);\n    internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_BroadcastTransactionResponse_descriptor,\n        new java.lang.String[] { \"Id\", });\n    internal_static_pactus_GetRawTransferTransactionRequest_descriptor =\n      getDescriptor().getMessageType(6);\n    internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawTransferTransactionRequest_descriptor,\n        new java.lang.String[] { \"LockTime\", \"Sender\", \"Receiver\", \"Amount\", \"Fee\", \"Memo\", });\n    internal_static_pactus_GetRawBondTransactionRequest_descriptor =\n      getDescriptor().getMessageType(7);\n    internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawBondTransactionRequest_descriptor,\n        new java.lang.String[] { \"LockTime\", \"Sender\", \"Receiver\", \"Stake\", \"PublicKey\", \"Fee\", \"Memo\", \"DelegateOwner\", \"DelegateShare\", \"DelegateExpiry\", });\n    internal_static_pactus_GetRawUnbondTransactionRequest_descriptor =\n      getDescriptor().getMessageType(8);\n    internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawUnbondTransactionRequest_descriptor,\n        new java.lang.String[] { \"LockTime\", \"ValidatorAddress\", \"Memo\", \"DelegateOwner\", });\n    internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor =\n      getDescriptor().getMessageType(9);\n    internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor,\n        new java.lang.String[] { \"LockTime\", \"ValidatorAddress\", \"AccountAddress\", \"Amount\", \"Fee\", \"Memo\", });\n    internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor =\n      getDescriptor().getMessageType(10);\n    internal_static_pactus_GetRawBatchTransferTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawBatchTransferTransactionRequest_descriptor,\n        new java.lang.String[] { \"LockTime\", \"Sender\", \"Recipients\", \"Fee\", \"Memo\", });\n    internal_static_pactus_GetRawTransactionResponse_descriptor =\n      getDescriptor().getMessageType(11);\n    internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetRawTransactionResponse_descriptor,\n        new java.lang.String[] { \"RawTransaction\", \"Id\", });\n    internal_static_pactus_PayloadTransfer_descriptor =\n      getDescriptor().getMessageType(12);\n    internal_static_pactus_PayloadTransfer_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadTransfer_descriptor,\n        new java.lang.String[] { \"Sender\", \"Receiver\", \"Amount\", });\n    internal_static_pactus_PayloadBond_descriptor =\n      getDescriptor().getMessageType(13);\n    internal_static_pactus_PayloadBond_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadBond_descriptor,\n        new java.lang.String[] { \"Sender\", \"Receiver\", \"Stake\", \"PublicKey\", \"IsDelegated\", \"DelegateOwner\", \"DelegateShare\", \"DelegateExpiry\", });\n    internal_static_pactus_PayloadSortition_descriptor =\n      getDescriptor().getMessageType(14);\n    internal_static_pactus_PayloadSortition_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadSortition_descriptor,\n        new java.lang.String[] { \"Address\", \"Proof\", });\n    internal_static_pactus_PayloadUnbond_descriptor =\n      getDescriptor().getMessageType(15);\n    internal_static_pactus_PayloadUnbond_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadUnbond_descriptor,\n        new java.lang.String[] { \"Validator\", \"DelegateOwner\", });\n    internal_static_pactus_PayloadWithdraw_descriptor =\n      getDescriptor().getMessageType(16);\n    internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadWithdraw_descriptor,\n        new java.lang.String[] { \"ValidatorAddress\", \"AccountAddress\", \"Amount\", });\n    internal_static_pactus_PayloadBatchTransfer_descriptor =\n      getDescriptor().getMessageType(17);\n    internal_static_pactus_PayloadBatchTransfer_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PayloadBatchTransfer_descriptor,\n        new java.lang.String[] { \"Sender\", \"Recipients\", });\n    internal_static_pactus_Recipient_descriptor =\n      getDescriptor().getMessageType(18);\n    internal_static_pactus_Recipient_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_Recipient_descriptor,\n        new java.lang.String[] { \"Receiver\", \"Amount\", });\n    internal_static_pactus_TransactionInfo_descriptor =\n      getDescriptor().getMessageType(19);\n    internal_static_pactus_TransactionInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_TransactionInfo_descriptor,\n        new java.lang.String[] { \"Id\", \"Data\", \"Version\", \"LockTime\", \"Value\", \"Fee\", \"PayloadType\", \"Transfer\", \"Bond\", \"Sortition\", \"Unbond\", \"Withdraw\", \"BatchTransfer\", \"Memo\", \"PublicKey\", \"Signature\", \"BlockHeight\", \"Confirmed\", \"Confirmations\", \"Payload\", });\n    internal_static_pactus_DecodeRawTransactionRequest_descriptor =\n      getDescriptor().getMessageType(20);\n    internal_static_pactus_DecodeRawTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_DecodeRawTransactionRequest_descriptor,\n        new java.lang.String[] { \"RawTransaction\", });\n    internal_static_pactus_DecodeRawTransactionResponse_descriptor =\n      getDescriptor().getMessageType(21);\n    internal_static_pactus_DecodeRawTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_DecodeRawTransactionResponse_descriptor,\n        new java.lang.String[] { \"Transaction\", });\n    internal_static_pactus_CheckTransactionRequest_descriptor =\n      getDescriptor().getMessageType(22);\n    internal_static_pactus_CheckTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CheckTransactionRequest_descriptor,\n        new java.lang.String[] { \"RawTransaction\", });\n    internal_static_pactus_CheckTransactionResponse_descriptor =\n      getDescriptor().getMessageType(23);\n    internal_static_pactus_CheckTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CheckTransactionResponse_descriptor,\n        new java.lang.String[] { \"IsValid\", \"ErrorMessage\", });\n    descriptor.resolveAllFeaturesImmutable();\n  }\n\n  // @@protoc_insertion_point(outer_class_scope)\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/UtilsGrpc.java",
    "content": "package pactus;\n\nimport static io.grpc.MethodDescriptor.generateFullMethodName;\n\n/**\n * <pre>\n * Utils service defines RPC methods for utility functions such as message\n * signing, verification, and other cryptographic operations.\n * </pre>\n */\n@io.grpc.stub.annotations.GrpcGenerated\npublic final class UtilsGrpc {\n\n  private UtilsGrpc() {}\n\n  public static final java.lang.String SERVICE_NAME = \"pactus.Utils\";\n\n  // Static method descriptors that strictly reflect the proto.\n  private static volatile io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest,\n      pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> getSignMessageWithPrivateKeyMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SignMessageWithPrivateKey\",\n      requestType = pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class,\n      responseType = pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest,\n      pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> getSignMessageWithPrivateKeyMethod() {\n    io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest, pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> getSignMessageWithPrivateKeyMethod;\n    if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) {\n      synchronized (UtilsGrpc.class) {\n        if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) {\n          UtilsGrpc.getSignMessageWithPrivateKeyMethod = getSignMessageWithPrivateKeyMethod =\n              io.grpc.MethodDescriptor.<pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest, pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SignMessageWithPrivateKey\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new UtilsMethodDescriptorSupplier(\"SignMessageWithPrivateKey\"))\n              .build();\n        }\n      }\n    }\n    return getSignMessageWithPrivateKeyMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.UtilsOuterClass.VerifyMessageRequest,\n      pactus.UtilsOuterClass.VerifyMessageResponse> getVerifyMessageMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"VerifyMessage\",\n      requestType = pactus.UtilsOuterClass.VerifyMessageRequest.class,\n      responseType = pactus.UtilsOuterClass.VerifyMessageResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.UtilsOuterClass.VerifyMessageRequest,\n      pactus.UtilsOuterClass.VerifyMessageResponse> getVerifyMessageMethod() {\n    io.grpc.MethodDescriptor<pactus.UtilsOuterClass.VerifyMessageRequest, pactus.UtilsOuterClass.VerifyMessageResponse> getVerifyMessageMethod;\n    if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) {\n      synchronized (UtilsGrpc.class) {\n        if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) {\n          UtilsGrpc.getVerifyMessageMethod = getVerifyMessageMethod =\n              io.grpc.MethodDescriptor.<pactus.UtilsOuterClass.VerifyMessageRequest, pactus.UtilsOuterClass.VerifyMessageResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"VerifyMessage\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new UtilsMethodDescriptorSupplier(\"VerifyMessage\"))\n              .build();\n        }\n      }\n    }\n    return getVerifyMessageMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.UtilsOuterClass.PublicKeyAggregationRequest,\n      pactus.UtilsOuterClass.PublicKeyAggregationResponse> getPublicKeyAggregationMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"PublicKeyAggregation\",\n      requestType = pactus.UtilsOuterClass.PublicKeyAggregationRequest.class,\n      responseType = pactus.UtilsOuterClass.PublicKeyAggregationResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.UtilsOuterClass.PublicKeyAggregationRequest,\n      pactus.UtilsOuterClass.PublicKeyAggregationResponse> getPublicKeyAggregationMethod() {\n    io.grpc.MethodDescriptor<pactus.UtilsOuterClass.PublicKeyAggregationRequest, pactus.UtilsOuterClass.PublicKeyAggregationResponse> getPublicKeyAggregationMethod;\n    if ((getPublicKeyAggregationMethod = UtilsGrpc.getPublicKeyAggregationMethod) == null) {\n      synchronized (UtilsGrpc.class) {\n        if ((getPublicKeyAggregationMethod = UtilsGrpc.getPublicKeyAggregationMethod) == null) {\n          UtilsGrpc.getPublicKeyAggregationMethod = getPublicKeyAggregationMethod =\n              io.grpc.MethodDescriptor.<pactus.UtilsOuterClass.PublicKeyAggregationRequest, pactus.UtilsOuterClass.PublicKeyAggregationResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"PublicKeyAggregation\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.PublicKeyAggregationRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.PublicKeyAggregationResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new UtilsMethodDescriptorSupplier(\"PublicKeyAggregation\"))\n              .build();\n        }\n      }\n    }\n    return getPublicKeyAggregationMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignatureAggregationRequest,\n      pactus.UtilsOuterClass.SignatureAggregationResponse> getSignatureAggregationMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SignatureAggregation\",\n      requestType = pactus.UtilsOuterClass.SignatureAggregationRequest.class,\n      responseType = pactus.UtilsOuterClass.SignatureAggregationResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignatureAggregationRequest,\n      pactus.UtilsOuterClass.SignatureAggregationResponse> getSignatureAggregationMethod() {\n    io.grpc.MethodDescriptor<pactus.UtilsOuterClass.SignatureAggregationRequest, pactus.UtilsOuterClass.SignatureAggregationResponse> getSignatureAggregationMethod;\n    if ((getSignatureAggregationMethod = UtilsGrpc.getSignatureAggregationMethod) == null) {\n      synchronized (UtilsGrpc.class) {\n        if ((getSignatureAggregationMethod = UtilsGrpc.getSignatureAggregationMethod) == null) {\n          UtilsGrpc.getSignatureAggregationMethod = getSignatureAggregationMethod =\n              io.grpc.MethodDescriptor.<pactus.UtilsOuterClass.SignatureAggregationRequest, pactus.UtilsOuterClass.SignatureAggregationResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SignatureAggregation\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.SignatureAggregationRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.UtilsOuterClass.SignatureAggregationResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new UtilsMethodDescriptorSupplier(\"SignatureAggregation\"))\n              .build();\n        }\n      }\n    }\n    return getSignatureAggregationMethod;\n  }\n\n  /**\n   * Creates a new async stub that supports all call types for the service\n   */\n  public static UtilsStub newStub(io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<UtilsStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<UtilsStub>() {\n        @java.lang.Override\n        public UtilsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new UtilsStub(channel, callOptions);\n        }\n      };\n    return UtilsStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports all types of calls on the service\n   */\n  public static UtilsBlockingV2Stub newBlockingV2Stub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<UtilsBlockingV2Stub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<UtilsBlockingV2Stub>() {\n        @java.lang.Override\n        public UtilsBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new UtilsBlockingV2Stub(channel, callOptions);\n        }\n      };\n    return UtilsBlockingV2Stub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports unary and streaming output calls on the service\n   */\n  public static UtilsBlockingStub newBlockingStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<UtilsBlockingStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<UtilsBlockingStub>() {\n        @java.lang.Override\n        public UtilsBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new UtilsBlockingStub(channel, callOptions);\n        }\n      };\n    return UtilsBlockingStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new ListenableFuture-style stub that supports unary calls on the service\n   */\n  public static UtilsFutureStub newFutureStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<UtilsFutureStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<UtilsFutureStub>() {\n        @java.lang.Override\n        public UtilsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new UtilsFutureStub(channel, callOptions);\n        }\n      };\n    return UtilsFutureStub.newStub(factory, channel);\n  }\n\n  /**\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public interface AsyncService {\n\n    /**\n     * <pre>\n     * SignMessageWithPrivateKey signs a message with the provided private key.\n     * </pre>\n     */\n    default void signMessageWithPrivateKey(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageWithPrivateKeyMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * VerifyMessage verifies a signature against the public key and message.\n     * </pre>\n     */\n    default void verifyMessage(pactus.UtilsOuterClass.VerifyMessageRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.VerifyMessageResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getVerifyMessageMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n     * </pre>\n     */\n    default void publicKeyAggregation(pactus.UtilsOuterClass.PublicKeyAggregationRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.PublicKeyAggregationResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublicKeyAggregationMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignatureAggregation aggregates multiple BLS signatures into a single signature.\n     * </pre>\n     */\n    default void signatureAggregation(pactus.UtilsOuterClass.SignatureAggregationRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignatureAggregationResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignatureAggregationMethod(), responseObserver);\n    }\n  }\n\n  /**\n   * Base class for the server implementation of the service Utils.\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public static abstract class UtilsImplBase\n      implements io.grpc.BindableService, AsyncService {\n\n    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {\n      return UtilsGrpc.bindService(this);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do asynchronous rpc calls to service Utils.\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public static final class UtilsStub\n      extends io.grpc.stub.AbstractAsyncStub<UtilsStub> {\n    private UtilsStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected UtilsStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new UtilsStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * SignMessageWithPrivateKey signs a message with the provided private key.\n     * </pre>\n     */\n    public void signMessageWithPrivateKey(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * VerifyMessage verifies a signature against the public key and message.\n     * </pre>\n     */\n    public void verifyMessage(pactus.UtilsOuterClass.VerifyMessageRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.VerifyMessageResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n     * </pre>\n     */\n    public void publicKeyAggregation(pactus.UtilsOuterClass.PublicKeyAggregationRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.PublicKeyAggregationResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getPublicKeyAggregationMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignatureAggregation aggregates multiple BLS signatures into a single signature.\n     * </pre>\n     */\n    public void signatureAggregation(pactus.UtilsOuterClass.SignatureAggregationRequest request,\n        io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignatureAggregationResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSignatureAggregationMethod(), getCallOptions()), request, responseObserver);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do synchronous rpc calls to service Utils.\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public static final class UtilsBlockingV2Stub\n      extends io.grpc.stub.AbstractBlockingStub<UtilsBlockingV2Stub> {\n    private UtilsBlockingV2Stub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected UtilsBlockingV2Stub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new UtilsBlockingV2Stub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * SignMessageWithPrivateKey signs a message with the provided private key.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse signMessageWithPrivateKey(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSignMessageWithPrivateKeyMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * VerifyMessage verifies a signature against the public key and message.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.VerifyMessageResponse verifyMessage(pactus.UtilsOuterClass.VerifyMessageRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getVerifyMessageMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.PublicKeyAggregationResponse publicKeyAggregation(pactus.UtilsOuterClass.PublicKeyAggregationRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getPublicKeyAggregationMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignatureAggregation aggregates multiple BLS signatures into a single signature.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.SignatureAggregationResponse signatureAggregation(pactus.UtilsOuterClass.SignatureAggregationRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSignatureAggregationMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do limited synchronous rpc calls to service Utils.\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public static final class UtilsBlockingStub\n      extends io.grpc.stub.AbstractBlockingStub<UtilsBlockingStub> {\n    private UtilsBlockingStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected UtilsBlockingStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new UtilsBlockingStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * SignMessageWithPrivateKey signs a message with the provided private key.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse signMessageWithPrivateKey(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSignMessageWithPrivateKeyMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * VerifyMessage verifies a signature against the public key and message.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.VerifyMessageResponse verifyMessage(pactus.UtilsOuterClass.VerifyMessageRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getVerifyMessageMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.PublicKeyAggregationResponse publicKeyAggregation(pactus.UtilsOuterClass.PublicKeyAggregationRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getPublicKeyAggregationMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignatureAggregation aggregates multiple BLS signatures into a single signature.\n     * </pre>\n     */\n    public pactus.UtilsOuterClass.SignatureAggregationResponse signatureAggregation(pactus.UtilsOuterClass.SignatureAggregationRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSignatureAggregationMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do ListenableFuture-style rpc calls to service Utils.\n   * <pre>\n   * Utils service defines RPC methods for utility functions such as message\n   * signing, verification, and other cryptographic operations.\n   * </pre>\n   */\n  public static final class UtilsFutureStub\n      extends io.grpc.stub.AbstractFutureStub<UtilsFutureStub> {\n    private UtilsFutureStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected UtilsFutureStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new UtilsFutureStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * SignMessageWithPrivateKey signs a message with the provided private key.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey(\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * VerifyMessage verifies a signature against the public key and message.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.UtilsOuterClass.VerifyMessageResponse> verifyMessage(\n        pactus.UtilsOuterClass.VerifyMessageRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.UtilsOuterClass.PublicKeyAggregationResponse> publicKeyAggregation(\n        pactus.UtilsOuterClass.PublicKeyAggregationRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getPublicKeyAggregationMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * SignatureAggregation aggregates multiple BLS signatures into a single signature.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.UtilsOuterClass.SignatureAggregationResponse> signatureAggregation(\n        pactus.UtilsOuterClass.SignatureAggregationRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSignatureAggregationMethod(), getCallOptions()), request);\n    }\n  }\n\n  private static final int METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY = 0;\n  private static final int METHODID_VERIFY_MESSAGE = 1;\n  private static final int METHODID_PUBLIC_KEY_AGGREGATION = 2;\n  private static final int METHODID_SIGNATURE_AGGREGATION = 3;\n\n  private static final class MethodHandlers<Req, Resp> implements\n      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {\n    private final AsyncService serviceImpl;\n    private final int methodId;\n\n    MethodHandlers(AsyncService serviceImpl, int methodId) {\n      this.serviceImpl = serviceImpl;\n      this.methodId = methodId;\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        case METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY:\n          serviceImpl.signMessageWithPrivateKey((pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse>) responseObserver);\n          break;\n        case METHODID_VERIFY_MESSAGE:\n          serviceImpl.verifyMessage((pactus.UtilsOuterClass.VerifyMessageRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.VerifyMessageResponse>) responseObserver);\n          break;\n        case METHODID_PUBLIC_KEY_AGGREGATION:\n          serviceImpl.publicKeyAggregation((pactus.UtilsOuterClass.PublicKeyAggregationRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.PublicKeyAggregationResponse>) responseObserver);\n          break;\n        case METHODID_SIGNATURE_AGGREGATION:\n          serviceImpl.signatureAggregation((pactus.UtilsOuterClass.SignatureAggregationRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.UtilsOuterClass.SignatureAggregationResponse>) responseObserver);\n          break;\n        default:\n          throw new AssertionError();\n      }\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public io.grpc.stub.StreamObserver<Req> invoke(\n        io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        default:\n          throw new AssertionError();\n      }\n    }\n  }\n\n  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {\n    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())\n        .addMethod(\n          getSignMessageWithPrivateKeyMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest,\n              pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse>(\n                service, METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY)))\n        .addMethod(\n          getVerifyMessageMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.UtilsOuterClass.VerifyMessageRequest,\n              pactus.UtilsOuterClass.VerifyMessageResponse>(\n                service, METHODID_VERIFY_MESSAGE)))\n        .addMethod(\n          getPublicKeyAggregationMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.UtilsOuterClass.PublicKeyAggregationRequest,\n              pactus.UtilsOuterClass.PublicKeyAggregationResponse>(\n                service, METHODID_PUBLIC_KEY_AGGREGATION)))\n        .addMethod(\n          getSignatureAggregationMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.UtilsOuterClass.SignatureAggregationRequest,\n              pactus.UtilsOuterClass.SignatureAggregationResponse>(\n                service, METHODID_SIGNATURE_AGGREGATION)))\n        .build();\n  }\n\n  private static abstract class UtilsBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {\n    UtilsBaseDescriptorSupplier() {}\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n      return pactus.UtilsOuterClass.getDescriptor();\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n      return getFileDescriptor().findServiceByName(\"Utils\");\n    }\n  }\n\n  private static final class UtilsFileDescriptorSupplier\n      extends UtilsBaseDescriptorSupplier {\n    UtilsFileDescriptorSupplier() {}\n  }\n\n  private static final class UtilsMethodDescriptorSupplier\n      extends UtilsBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {\n    private final java.lang.String methodName;\n\n    UtilsMethodDescriptorSupplier(java.lang.String methodName) {\n      this.methodName = methodName;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n      return getServiceDescriptor().findMethodByName(methodName);\n    }\n  }\n\n  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;\n\n  public static io.grpc.ServiceDescriptor getServiceDescriptor() {\n    io.grpc.ServiceDescriptor result = serviceDescriptor;\n    if (result == null) {\n      synchronized (UtilsGrpc.class) {\n        result = serviceDescriptor;\n        if (result == null) {\n          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)\n              .setSchemaDescriptor(new UtilsFileDescriptorSupplier())\n              .addMethod(getSignMessageWithPrivateKeyMethod())\n              .addMethod(getVerifyMessageMethod())\n              .addMethod(getPublicKeyAggregationMethod())\n              .addMethod(getSignatureAggregationMethod())\n              .build();\n        }\n      }\n    }\n    return result;\n  }\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/UtilsOuterClass.java",
    "content": "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n// NO CHECKED-IN PROTOBUF GENCODE\n// source: utils.proto\n// Protobuf Java Version: 4.33.2\n\npackage pactus;\n\n@com.google.protobuf.Generated\npublic final class UtilsOuterClass extends com.google.protobuf.GeneratedFile {\n  private UtilsOuterClass() {}\n  static {\n    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n      /* major= */ 4,\n      /* minor= */ 33,\n      /* patch= */ 2,\n      /* suffix= */ \"\",\n      \"UtilsOuterClass\");\n  }\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistryLite registry) {\n  }\n\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistry registry) {\n    registerAllExtensions(\n        (com.google.protobuf.ExtensionRegistryLite) registry);\n  }\n  public interface SignMessageWithPrivateKeyRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The private key to sign the message.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The privateKey.\n     */\n    java.lang.String getPrivateKey();\n    /**\n     * <pre>\n     * The private key to sign the message.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The bytes for privateKey.\n     */\n    com.google.protobuf.ByteString\n        getPrivateKeyBytes();\n\n    /**\n     * <pre>\n     * The message content to be signed.\n     * </pre>\n     *\n     * <code>string message = 2 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    java.lang.String getMessage();\n    /**\n     * <pre>\n     * The message content to be signed.\n     * </pre>\n     *\n     * <code>string message = 2 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    com.google.protobuf.ByteString\n        getMessageBytes();\n  }\n  /**\n   * <pre>\n   * Request message for signing a message with a private key.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest}\n   */\n  public static final class SignMessageWithPrivateKeyRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyRequest)\n      SignMessageWithPrivateKeyRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignMessageWithPrivateKeyRequest\");\n    }\n    // Use SignMessageWithPrivateKeyRequest.newBuilder() to construct.\n    private SignMessageWithPrivateKeyRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignMessageWithPrivateKeyRequest() {\n      privateKey_ = \"\";\n      message_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class);\n    }\n\n    public static final int PRIVATE_KEY_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object privateKey_ = \"\";\n    /**\n     * <pre>\n     * The private key to sign the message.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The privateKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPrivateKey() {\n      java.lang.Object ref = privateKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        privateKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The private key to sign the message.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The bytes for privateKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPrivateKeyBytes() {\n      java.lang.Object ref = privateKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        privateKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int MESSAGE_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object message_ = \"\";\n    /**\n     * <pre>\n     * The message content to be signed.\n     * </pre>\n     *\n     * <code>string message = 2 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    @java.lang.Override\n    public java.lang.String getMessage() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        message_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The message content to be signed.\n     * </pre>\n     *\n     * <code>string message = 2 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMessageBytes() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        message_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(privateKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, privateKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, message_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(privateKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, privateKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest other = (pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest) obj;\n\n      if (!getPrivateKey()\n          .equals(other.getPrivateKey())) return false;\n      if (!getMessage()\n          .equals(other.getMessage())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPrivateKey().hashCode();\n      hash = (37 * hash) + MESSAGE_FIELD_NUMBER;\n      hash = (53 * hash) + getMessage().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for signing a message with a private key.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyRequest)\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        privateKey_ = \"\";\n        message_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest build() {\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest buildPartial() {\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = new pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.privateKey_ = privateKey_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.message_ = message_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest) {\n          return mergeFrom((pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest other) {\n        if (other == pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance()) return this;\n        if (!other.getPrivateKey().isEmpty()) {\n          privateKey_ = other.privateKey_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getMessage().isEmpty()) {\n          message_ = other.message_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                privateKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                message_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object privateKey_ = \"\";\n      /**\n       * <pre>\n       * The private key to sign the message.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return The privateKey.\n       */\n      public java.lang.String getPrivateKey() {\n        java.lang.Object ref = privateKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          privateKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The private key to sign the message.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return The bytes for privateKey.\n       */\n      public com.google.protobuf.ByteString\n          getPrivateKeyBytes() {\n        java.lang.Object ref = privateKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          privateKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The private key to sign the message.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @param value The privateKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrivateKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        privateKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The private key to sign the message.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPrivateKey() {\n        privateKey_ = getDefaultInstance().getPrivateKey();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The private key to sign the message.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @param value The bytes for privateKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrivateKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        privateKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object message_ = \"\";\n      /**\n       * <pre>\n       * The message content to be signed.\n       * </pre>\n       *\n       * <code>string message = 2 [json_name = \"message\"];</code>\n       * @return The message.\n       */\n      public java.lang.String getMessage() {\n        java.lang.Object ref = message_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          message_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The message content to be signed.\n       * </pre>\n       *\n       * <code>string message = 2 [json_name = \"message\"];</code>\n       * @return The bytes for message.\n       */\n      public com.google.protobuf.ByteString\n          getMessageBytes() {\n        java.lang.Object ref = message_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          message_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The message content to be signed.\n       * </pre>\n       *\n       * <code>string message = 2 [json_name = \"message\"];</code>\n       * @param value The message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessage(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        message_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The message content to be signed.\n       * </pre>\n       *\n       * <code>string message = 2 [json_name = \"message\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMessage() {\n        message_ = getDefaultInstance().getMessage();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The message content to be signed.\n       * </pre>\n       *\n       * <code>string message = 2 [json_name = \"message\"];</code>\n       * @param value The bytes for message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessageBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        message_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyRequest)\n    private static final pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest();\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignMessageWithPrivateKeyRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SignMessageWithPrivateKeyRequest>() {\n      @java.lang.Override\n      public SignMessageWithPrivateKeyRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignMessageWithPrivateKeyRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignMessageWithPrivateKeyRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignMessageWithPrivateKeyResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The resulting signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The resulting signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the signature generated from the message.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse}\n   */\n  public static final class SignMessageWithPrivateKeyResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyResponse)\n      SignMessageWithPrivateKeyResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignMessageWithPrivateKeyResponse\");\n    }\n    // Use SignMessageWithPrivateKeyResponse.newBuilder() to construct.\n    private SignMessageWithPrivateKeyResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignMessageWithPrivateKeyResponse() {\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class);\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The resulting signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The resulting signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, signature_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signature_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse other = (pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse) obj;\n\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the signature generated from the message.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyResponse)\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        signature_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse build() {\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse buildPartial() {\n        pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = new pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.signature_ = signature_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse) {\n          return mergeFrom((pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse other) {\n        if (other == pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance()) return this;\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The resulting signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The resulting signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The resulting signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The resulting signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The resulting signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyResponse)\n    private static final pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse();\n    }\n\n    public static pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignMessageWithPrivateKeyResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SignMessageWithPrivateKeyResponse>() {\n      @java.lang.Override\n      public SignMessageWithPrivateKeyResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignMessageWithPrivateKeyResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignMessageWithPrivateKeyResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface VerifyMessageRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The original message content that was signed.\n     * </pre>\n     *\n     * <code>string message = 1 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    java.lang.String getMessage();\n    /**\n     * <pre>\n     * The original message content that was signed.\n     * </pre>\n     *\n     * <code>string message = 1 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    com.google.protobuf.ByteString\n        getMessageBytes();\n\n    /**\n     * <pre>\n     * The signature to verify in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 2 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The signature to verify in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 2 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n\n    /**\n     * <pre>\n     * The public key of the signer.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key of the signer.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n  }\n  /**\n   * <pre>\n   * Request message for verifying a message signature.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.VerifyMessageRequest}\n   */\n  public static final class VerifyMessageRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.VerifyMessageRequest)\n      VerifyMessageRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"VerifyMessageRequest\");\n    }\n    // Use VerifyMessageRequest.newBuilder() to construct.\n    private VerifyMessageRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private VerifyMessageRequest() {\n      message_ = \"\";\n      signature_ = \"\";\n      publicKey_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.VerifyMessageRequest.class, pactus.UtilsOuterClass.VerifyMessageRequest.Builder.class);\n    }\n\n    public static final int MESSAGE_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object message_ = \"\";\n    /**\n     * <pre>\n     * The original message content that was signed.\n     * </pre>\n     *\n     * <code>string message = 1 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    @java.lang.Override\n    public java.lang.String getMessage() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        message_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The original message content that was signed.\n     * </pre>\n     *\n     * <code>string message = 1 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMessageBytes() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        message_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The signature to verify in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 2 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signature to verify in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 2 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key of the signer.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key of the signer.\n     * </pre>\n     *\n     * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, message_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, signature_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, publicKey_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, message_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, signature_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, publicKey_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.VerifyMessageRequest)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.VerifyMessageRequest other = (pactus.UtilsOuterClass.VerifyMessageRequest) obj;\n\n      if (!getMessage()\n          .equals(other.getMessage())) return false;\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + MESSAGE_FIELD_NUMBER;\n      hash = (53 * hash) + getMessage().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.VerifyMessageRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for verifying a message signature.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.VerifyMessageRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageRequest)\n        pactus.UtilsOuterClass.VerifyMessageRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.VerifyMessageRequest.class, pactus.UtilsOuterClass.VerifyMessageRequest.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.VerifyMessageRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        message_ = \"\";\n        signature_ = \"\";\n        publicKey_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageRequest build() {\n        pactus.UtilsOuterClass.VerifyMessageRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageRequest buildPartial() {\n        pactus.UtilsOuterClass.VerifyMessageRequest result = new pactus.UtilsOuterClass.VerifyMessageRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.VerifyMessageRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.message_ = message_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.signature_ = signature_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.VerifyMessageRequest) {\n          return mergeFrom((pactus.UtilsOuterClass.VerifyMessageRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.VerifyMessageRequest other) {\n        if (other == pactus.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance()) return this;\n        if (!other.getMessage().isEmpty()) {\n          message_ = other.message_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                message_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object message_ = \"\";\n      /**\n       * <pre>\n       * The original message content that was signed.\n       * </pre>\n       *\n       * <code>string message = 1 [json_name = \"message\"];</code>\n       * @return The message.\n       */\n      public java.lang.String getMessage() {\n        java.lang.Object ref = message_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          message_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The original message content that was signed.\n       * </pre>\n       *\n       * <code>string message = 1 [json_name = \"message\"];</code>\n       * @return The bytes for message.\n       */\n      public com.google.protobuf.ByteString\n          getMessageBytes() {\n        java.lang.Object ref = message_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          message_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The original message content that was signed.\n       * </pre>\n       *\n       * <code>string message = 1 [json_name = \"message\"];</code>\n       * @param value The message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessage(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        message_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The original message content that was signed.\n       * </pre>\n       *\n       * <code>string message = 1 [json_name = \"message\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMessage() {\n        message_ = getDefaultInstance().getMessage();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The original message content that was signed.\n       * </pre>\n       *\n       * <code>string message = 1 [json_name = \"message\"];</code>\n       * @param value The bytes for message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessageBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        message_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The signature to verify in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 2 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature to verify in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 2 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature to verify in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 2 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature to verify in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 2 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature to verify in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 2 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key of the signer.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the signer.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the signer.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the signer.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the signer.\n       * </pre>\n       *\n       * <code>string public_key = 3 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.VerifyMessageRequest)\n    private static final pactus.UtilsOuterClass.VerifyMessageRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.VerifyMessageRequest();\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<VerifyMessageRequest>\n        PARSER = new com.google.protobuf.AbstractParser<VerifyMessageRequest>() {\n      @java.lang.Override\n      public VerifyMessageRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<VerifyMessageRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<VerifyMessageRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface VerifyMessageResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Boolean indicating whether the signature is valid for the given message and public key.\n     * </pre>\n     *\n     * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n     * @return The isValid.\n     */\n    boolean getIsValid();\n  }\n  /**\n   * <pre>\n   * Response message contains the verification result.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.VerifyMessageResponse}\n   */\n  public static final class VerifyMessageResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.VerifyMessageResponse)\n      VerifyMessageResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"VerifyMessageResponse\");\n    }\n    // Use VerifyMessageResponse.newBuilder() to construct.\n    private VerifyMessageResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private VerifyMessageResponse() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.VerifyMessageResponse.class, pactus.UtilsOuterClass.VerifyMessageResponse.Builder.class);\n    }\n\n    public static final int IS_VALID_FIELD_NUMBER = 1;\n    private boolean isValid_ = false;\n    /**\n     * <pre>\n     * Boolean indicating whether the signature is valid for the given message and public key.\n     * </pre>\n     *\n     * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n     * @return The isValid.\n     */\n    @java.lang.Override\n    public boolean getIsValid() {\n      return isValid_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (isValid_ != false) {\n        output.writeBool(1, isValid_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (isValid_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(1, isValid_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.VerifyMessageResponse)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.VerifyMessageResponse other = (pactus.UtilsOuterClass.VerifyMessageResponse) obj;\n\n      if (getIsValid()\n          != other.getIsValid()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + IS_VALID_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getIsValid());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.VerifyMessageResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.VerifyMessageResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the verification result.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.VerifyMessageResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageResponse)\n        pactus.UtilsOuterClass.VerifyMessageResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.VerifyMessageResponse.class, pactus.UtilsOuterClass.VerifyMessageResponse.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.VerifyMessageResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        isValid_ = false;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageResponse build() {\n        pactus.UtilsOuterClass.VerifyMessageResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.VerifyMessageResponse buildPartial() {\n        pactus.UtilsOuterClass.VerifyMessageResponse result = new pactus.UtilsOuterClass.VerifyMessageResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.VerifyMessageResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.isValid_ = isValid_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.VerifyMessageResponse) {\n          return mergeFrom((pactus.UtilsOuterClass.VerifyMessageResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.VerifyMessageResponse other) {\n        if (other == pactus.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance()) return this;\n        if (other.getIsValid() != false) {\n          setIsValid(other.getIsValid());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                isValid_ = input.readBool();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private boolean isValid_ ;\n      /**\n       * <pre>\n       * Boolean indicating whether the signature is valid for the given message and public key.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @return The isValid.\n       */\n      @java.lang.Override\n      public boolean getIsValid() {\n        return isValid_;\n      }\n      /**\n       * <pre>\n       * Boolean indicating whether the signature is valid for the given message and public key.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @param value The isValid to set.\n       * @return This builder for chaining.\n       */\n      public Builder setIsValid(boolean value) {\n\n        isValid_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Boolean indicating whether the signature is valid for the given message and public key.\n       * </pre>\n       *\n       * <code>bool is_valid = 1 [json_name = \"isValid\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearIsValid() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        isValid_ = false;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.VerifyMessageResponse)\n    private static final pactus.UtilsOuterClass.VerifyMessageResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.VerifyMessageResponse();\n    }\n\n    public static pactus.UtilsOuterClass.VerifyMessageResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<VerifyMessageResponse>\n        PARSER = new com.google.protobuf.AbstractParser<VerifyMessageResponse>() {\n      @java.lang.Override\n      public VerifyMessageResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<VerifyMessageResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<VerifyMessageResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PublicKeyAggregationRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PublicKeyAggregationRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @return A list containing the publicKeys.\n     */\n    java.util.List<java.lang.String>\n        getPublicKeysList();\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @return The count of publicKeys.\n     */\n    int getPublicKeysCount();\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @param index The index of the element to return.\n     * @return The publicKeys at the given index.\n     */\n    java.lang.String getPublicKeys(int index);\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the publicKeys at the given index.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeysBytes(int index);\n  }\n  /**\n   * <pre>\n   * Request message for aggregating multiple BLS public keys.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PublicKeyAggregationRequest}\n   */\n  public static final class PublicKeyAggregationRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PublicKeyAggregationRequest)\n      PublicKeyAggregationRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PublicKeyAggregationRequest\");\n    }\n    // Use PublicKeyAggregationRequest.newBuilder() to construct.\n    private PublicKeyAggregationRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PublicKeyAggregationRequest() {\n      publicKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.PublicKeyAggregationRequest.class, pactus.UtilsOuterClass.PublicKeyAggregationRequest.Builder.class);\n    }\n\n    public static final int PUBLIC_KEYS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList publicKeys_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @return A list containing the publicKeys.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getPublicKeysList() {\n      return publicKeys_;\n    }\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @return The count of publicKeys.\n     */\n    public int getPublicKeysCount() {\n      return publicKeys_.size();\n    }\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @param index The index of the element to return.\n     * @return The publicKeys at the given index.\n     */\n    public java.lang.String getPublicKeys(int index) {\n      return publicKeys_.get(index);\n    }\n    /**\n     * <pre>\n     * List of BLS public keys to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the publicKeys at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getPublicKeysBytes(int index) {\n      return publicKeys_.getByteString(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < publicKeys_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, publicKeys_.getRaw(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      {\n        int dataSize = 0;\n        for (int i = 0; i < publicKeys_.size(); i++) {\n          dataSize += computeStringSizeNoTag(publicKeys_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getPublicKeysList().size();\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.PublicKeyAggregationRequest)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.PublicKeyAggregationRequest other = (pactus.UtilsOuterClass.PublicKeyAggregationRequest) obj;\n\n      if (!getPublicKeysList()\n          .equals(other.getPublicKeysList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getPublicKeysCount() > 0) {\n        hash = (37 * hash) + PUBLIC_KEYS_FIELD_NUMBER;\n        hash = (53 * hash) + getPublicKeysList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.PublicKeyAggregationRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for aggregating multiple BLS public keys.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PublicKeyAggregationRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PublicKeyAggregationRequest)\n        pactus.UtilsOuterClass.PublicKeyAggregationRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.PublicKeyAggregationRequest.class, pactus.UtilsOuterClass.PublicKeyAggregationRequest.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.PublicKeyAggregationRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        publicKeys_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationRequest getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.PublicKeyAggregationRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationRequest build() {\n        pactus.UtilsOuterClass.PublicKeyAggregationRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationRequest buildPartial() {\n        pactus.UtilsOuterClass.PublicKeyAggregationRequest result = new pactus.UtilsOuterClass.PublicKeyAggregationRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.PublicKeyAggregationRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          publicKeys_.makeImmutable();\n          result.publicKeys_ = publicKeys_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.PublicKeyAggregationRequest) {\n          return mergeFrom((pactus.UtilsOuterClass.PublicKeyAggregationRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.PublicKeyAggregationRequest other) {\n        if (other == pactus.UtilsOuterClass.PublicKeyAggregationRequest.getDefaultInstance()) return this;\n        if (!other.publicKeys_.isEmpty()) {\n          if (publicKeys_.isEmpty()) {\n            publicKeys_ = other.publicKeys_;\n            bitField0_ |= 0x00000001;\n          } else {\n            ensurePublicKeysIsMutable();\n            publicKeys_.addAll(other.publicKeys_);\n          }\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensurePublicKeysIsMutable();\n                publicKeys_.add(s);\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private com.google.protobuf.LazyStringArrayList publicKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensurePublicKeysIsMutable() {\n        if (!publicKeys_.isModifiable()) {\n          publicKeys_ = new com.google.protobuf.LazyStringArrayList(publicKeys_);\n        }\n        bitField0_ |= 0x00000001;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @return A list containing the publicKeys.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getPublicKeysList() {\n        publicKeys_.makeImmutable();\n        return publicKeys_;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @return The count of publicKeys.\n       */\n      public int getPublicKeysCount() {\n        return publicKeys_.size();\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param index The index of the element to return.\n       * @return The publicKeys at the given index.\n       */\n      public java.lang.String getPublicKeys(int index) {\n        return publicKeys_.get(index);\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the publicKeys at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeysBytes(int index) {\n        return publicKeys_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param index The index to set the value at.\n       * @param value The publicKeys to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeys(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensurePublicKeysIsMutable();\n        publicKeys_.set(index, value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param value The publicKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addPublicKeys(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensurePublicKeysIsMutable();\n        publicKeys_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param values The publicKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllPublicKeys(\n          java.lang.Iterable<java.lang.String> values) {\n        ensurePublicKeysIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, publicKeys_);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKeys() {\n        publicKeys_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000001);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS public keys to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string public_keys = 1 [json_name = \"publicKeys\"];</code>\n       * @param value The bytes of the publicKeys to add.\n       * @return This builder for chaining.\n       */\n      public Builder addPublicKeysBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensurePublicKeysIsMutable();\n        publicKeys_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PublicKeyAggregationRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PublicKeyAggregationRequest)\n    private static final pactus.UtilsOuterClass.PublicKeyAggregationRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.PublicKeyAggregationRequest();\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PublicKeyAggregationRequest>\n        PARSER = new com.google.protobuf.AbstractParser<PublicKeyAggregationRequest>() {\n      @java.lang.Override\n      public PublicKeyAggregationRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PublicKeyAggregationRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PublicKeyAggregationRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.PublicKeyAggregationRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface PublicKeyAggregationResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.PublicKeyAggregationResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The aggregated BLS public key.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The aggregated BLS public key.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * The blockchain address derived from the aggregated public key.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The blockchain address derived from the aggregated public key.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the aggregated BLS public key result.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.PublicKeyAggregationResponse}\n   */\n  public static final class PublicKeyAggregationResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.PublicKeyAggregationResponse)\n      PublicKeyAggregationResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"PublicKeyAggregationResponse\");\n    }\n    // Use PublicKeyAggregationResponse.newBuilder() to construct.\n    private PublicKeyAggregationResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private PublicKeyAggregationResponse() {\n      publicKey_ = \"\";\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.PublicKeyAggregationResponse.class, pactus.UtilsOuterClass.PublicKeyAggregationResponse.Builder.class);\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The aggregated BLS public key.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The aggregated BLS public key.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The blockchain address derived from the aggregated public key.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The blockchain address derived from the aggregated public key.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.PublicKeyAggregationResponse)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.PublicKeyAggregationResponse other = (pactus.UtilsOuterClass.PublicKeyAggregationResponse) obj;\n\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.PublicKeyAggregationResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the aggregated BLS public key result.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.PublicKeyAggregationResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.PublicKeyAggregationResponse)\n        pactus.UtilsOuterClass.PublicKeyAggregationResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.PublicKeyAggregationResponse.class, pactus.UtilsOuterClass.PublicKeyAggregationResponse.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.PublicKeyAggregationResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        publicKey_ = \"\";\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_PublicKeyAggregationResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationResponse getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.PublicKeyAggregationResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationResponse build() {\n        pactus.UtilsOuterClass.PublicKeyAggregationResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.PublicKeyAggregationResponse buildPartial() {\n        pactus.UtilsOuterClass.PublicKeyAggregationResponse result = new pactus.UtilsOuterClass.PublicKeyAggregationResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.PublicKeyAggregationResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.PublicKeyAggregationResponse) {\n          return mergeFrom((pactus.UtilsOuterClass.PublicKeyAggregationResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.PublicKeyAggregationResponse other) {\n        if (other == pactus.UtilsOuterClass.PublicKeyAggregationResponse.getDefaultInstance()) return this;\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The aggregated BLS public key.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The aggregated BLS public key.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The aggregated BLS public key.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The aggregated BLS public key.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The aggregated BLS public key.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The blockchain address derived from the aggregated public key.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The blockchain address derived from the aggregated public key.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The blockchain address derived from the aggregated public key.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The blockchain address derived from the aggregated public key.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The blockchain address derived from the aggregated public key.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.PublicKeyAggregationResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.PublicKeyAggregationResponse)\n    private static final pactus.UtilsOuterClass.PublicKeyAggregationResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.PublicKeyAggregationResponse();\n    }\n\n    public static pactus.UtilsOuterClass.PublicKeyAggregationResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<PublicKeyAggregationResponse>\n        PARSER = new com.google.protobuf.AbstractParser<PublicKeyAggregationResponse>() {\n      @java.lang.Override\n      public PublicKeyAggregationResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<PublicKeyAggregationResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<PublicKeyAggregationResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.PublicKeyAggregationResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignatureAggregationRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignatureAggregationRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @return A list containing the signatures.\n     */\n    java.util.List<java.lang.String>\n        getSignaturesList();\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @return The count of signatures.\n     */\n    int getSignaturesCount();\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @param index The index of the element to return.\n     * @return The signatures at the given index.\n     */\n    java.lang.String getSignatures(int index);\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the signatures at the given index.\n     */\n    com.google.protobuf.ByteString\n        getSignaturesBytes(int index);\n  }\n  /**\n   * <pre>\n   * Request message for aggregating multiple BLS signatures.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignatureAggregationRequest}\n   */\n  public static final class SignatureAggregationRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignatureAggregationRequest)\n      SignatureAggregationRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignatureAggregationRequest\");\n    }\n    // Use SignatureAggregationRequest.newBuilder() to construct.\n    private SignatureAggregationRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignatureAggregationRequest() {\n      signatures_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.SignatureAggregationRequest.class, pactus.UtilsOuterClass.SignatureAggregationRequest.Builder.class);\n    }\n\n    public static final int SIGNATURES_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList signatures_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @return A list containing the signatures.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getSignaturesList() {\n      return signatures_;\n    }\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @return The count of signatures.\n     */\n    public int getSignaturesCount() {\n      return signatures_.size();\n    }\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @param index The index of the element to return.\n     * @return The signatures at the given index.\n     */\n    public java.lang.String getSignatures(int index) {\n      return signatures_.get(index);\n    }\n    /**\n     * <pre>\n     * List of BLS signatures to be aggregated.\n     * </pre>\n     *\n     * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the signatures at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getSignaturesBytes(int index) {\n      return signatures_.getByteString(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < signatures_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, signatures_.getRaw(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      {\n        int dataSize = 0;\n        for (int i = 0; i < signatures_.size(); i++) {\n          dataSize += computeStringSizeNoTag(signatures_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getSignaturesList().size();\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.SignatureAggregationRequest)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.SignatureAggregationRequest other = (pactus.UtilsOuterClass.SignatureAggregationRequest) obj;\n\n      if (!getSignaturesList()\n          .equals(other.getSignaturesList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getSignaturesCount() > 0) {\n        hash = (37 * hash) + SIGNATURES_FIELD_NUMBER;\n        hash = (53 * hash) + getSignaturesList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.SignatureAggregationRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for aggregating multiple BLS signatures.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignatureAggregationRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignatureAggregationRequest)\n        pactus.UtilsOuterClass.SignatureAggregationRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.SignatureAggregationRequest.class, pactus.UtilsOuterClass.SignatureAggregationRequest.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.SignatureAggregationRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        signatures_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationRequest getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.SignatureAggregationRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationRequest build() {\n        pactus.UtilsOuterClass.SignatureAggregationRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationRequest buildPartial() {\n        pactus.UtilsOuterClass.SignatureAggregationRequest result = new pactus.UtilsOuterClass.SignatureAggregationRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.SignatureAggregationRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          signatures_.makeImmutable();\n          result.signatures_ = signatures_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.SignatureAggregationRequest) {\n          return mergeFrom((pactus.UtilsOuterClass.SignatureAggregationRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.SignatureAggregationRequest other) {\n        if (other == pactus.UtilsOuterClass.SignatureAggregationRequest.getDefaultInstance()) return this;\n        if (!other.signatures_.isEmpty()) {\n          if (signatures_.isEmpty()) {\n            signatures_ = other.signatures_;\n            bitField0_ |= 0x00000001;\n          } else {\n            ensureSignaturesIsMutable();\n            signatures_.addAll(other.signatures_);\n          }\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureSignaturesIsMutable();\n                signatures_.add(s);\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private com.google.protobuf.LazyStringArrayList signatures_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureSignaturesIsMutable() {\n        if (!signatures_.isModifiable()) {\n          signatures_ = new com.google.protobuf.LazyStringArrayList(signatures_);\n        }\n        bitField0_ |= 0x00000001;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @return A list containing the signatures.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getSignaturesList() {\n        signatures_.makeImmutable();\n        return signatures_;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @return The count of signatures.\n       */\n      public int getSignaturesCount() {\n        return signatures_.size();\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param index The index of the element to return.\n       * @return The signatures at the given index.\n       */\n      public java.lang.String getSignatures(int index) {\n        return signatures_.get(index);\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the signatures at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getSignaturesBytes(int index) {\n        return signatures_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param index The index to set the value at.\n       * @param value The signatures to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatures(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureSignaturesIsMutable();\n        signatures_.set(index, value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param value The signatures to add.\n       * @return This builder for chaining.\n       */\n      public Builder addSignatures(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureSignaturesIsMutable();\n        signatures_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param values The signatures to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllSignatures(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureSignaturesIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, signatures_);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignatures() {\n        signatures_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000001);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * List of BLS signatures to be aggregated.\n       * </pre>\n       *\n       * <code>repeated string signatures = 1 [json_name = \"signatures\"];</code>\n       * @param value The bytes of the signatures to add.\n       * @return This builder for chaining.\n       */\n      public Builder addSignaturesBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureSignaturesIsMutable();\n        signatures_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignatureAggregationRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignatureAggregationRequest)\n    private static final pactus.UtilsOuterClass.SignatureAggregationRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.SignatureAggregationRequest();\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignatureAggregationRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SignatureAggregationRequest>() {\n      @java.lang.Override\n      public SignatureAggregationRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignatureAggregationRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignatureAggregationRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.SignatureAggregationRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignatureAggregationResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignatureAggregationResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The aggregated BLS signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The aggregated BLS signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the aggregated BLS signature.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignatureAggregationResponse}\n   */\n  public static final class SignatureAggregationResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignatureAggregationResponse)\n      SignatureAggregationResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignatureAggregationResponse\");\n    }\n    // Use SignatureAggregationResponse.newBuilder() to construct.\n    private SignatureAggregationResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignatureAggregationResponse() {\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.UtilsOuterClass.SignatureAggregationResponse.class, pactus.UtilsOuterClass.SignatureAggregationResponse.Builder.class);\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The aggregated BLS signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The aggregated BLS signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, signature_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signature_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.UtilsOuterClass.SignatureAggregationResponse)) {\n        return super.equals(obj);\n      }\n      pactus.UtilsOuterClass.SignatureAggregationResponse other = (pactus.UtilsOuterClass.SignatureAggregationResponse) obj;\n\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.UtilsOuterClass.SignatureAggregationResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the aggregated BLS signature.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignatureAggregationResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignatureAggregationResponse)\n        pactus.UtilsOuterClass.SignatureAggregationResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.UtilsOuterClass.SignatureAggregationResponse.class, pactus.UtilsOuterClass.SignatureAggregationResponse.Builder.class);\n      }\n\n      // Construct using pactus.UtilsOuterClass.SignatureAggregationResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        signature_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.UtilsOuterClass.internal_static_pactus_SignatureAggregationResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationResponse getDefaultInstanceForType() {\n        return pactus.UtilsOuterClass.SignatureAggregationResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationResponse build() {\n        pactus.UtilsOuterClass.SignatureAggregationResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.UtilsOuterClass.SignatureAggregationResponse buildPartial() {\n        pactus.UtilsOuterClass.SignatureAggregationResponse result = new pactus.UtilsOuterClass.SignatureAggregationResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.UtilsOuterClass.SignatureAggregationResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.signature_ = signature_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.UtilsOuterClass.SignatureAggregationResponse) {\n          return mergeFrom((pactus.UtilsOuterClass.SignatureAggregationResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.UtilsOuterClass.SignatureAggregationResponse other) {\n        if (other == pactus.UtilsOuterClass.SignatureAggregationResponse.getDefaultInstance()) return this;\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The aggregated BLS signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The aggregated BLS signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The aggregated BLS signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The aggregated BLS signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The aggregated BLS signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignatureAggregationResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignatureAggregationResponse)\n    private static final pactus.UtilsOuterClass.SignatureAggregationResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.UtilsOuterClass.SignatureAggregationResponse();\n    }\n\n    public static pactus.UtilsOuterClass.SignatureAggregationResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignatureAggregationResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SignatureAggregationResponse>() {\n      @java.lang.Override\n      public SignatureAggregationResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignatureAggregationResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignatureAggregationResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.UtilsOuterClass.SignatureAggregationResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_VerifyMessageRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_VerifyMessageRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_VerifyMessageResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_VerifyMessageResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PublicKeyAggregationRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PublicKeyAggregationRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_PublicKeyAggregationResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_PublicKeyAggregationResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignatureAggregationRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignatureAggregationRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignatureAggregationResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignatureAggregationResponse_fieldAccessorTable;\n\n  public static com.google.protobuf.Descriptors.FileDescriptor\n      getDescriptor() {\n    return descriptor;\n  }\n  private static  com.google.protobuf.Descriptors.FileDescriptor\n      descriptor;\n  static {\n    java.lang.String[] descriptorData = {\n      \"\\n\\013utils.proto\\022\\006pactus\\\"]\\n SignMessageWith\" +\n      \"PrivateKeyRequest\\022\\037\\n\\013private_key\\030\\001 \\001(\\tR\\n\" +\n      \"privateKey\\022\\030\\n\\007message\\030\\002 \\001(\\tR\\007message\\\"A\\n!\" +\n      \"SignMessageWithPrivateKeyResponse\\022\\034\\n\\tsig\" +\n      \"nature\\030\\001 \\001(\\tR\\tsignature\\\"m\\n\\024VerifyMessage\" +\n      \"Request\\022\\030\\n\\007message\\030\\001 \\001(\\tR\\007message\\022\\034\\n\\tsig\" +\n      \"nature\\030\\002 \\001(\\tR\\tsignature\\022\\035\\n\\npublic_key\\030\\003 \" +\n      \"\\001(\\tR\\tpublicKey\\\"2\\n\\025VerifyMessageResponse\\022\" +\n      \"\\031\\n\\010is_valid\\030\\001 \\001(\\010R\\007isValid\\\">\\n\\033PublicKeyA\" +\n      \"ggregationRequest\\022\\037\\n\\013public_keys\\030\\001 \\003(\\tR\\n\" +\n      \"publicKeys\\\"W\\n\\034PublicKeyAggregationRespon\" +\n      \"se\\022\\035\\n\\npublic_key\\030\\001 \\001(\\tR\\tpublicKey\\022\\030\\n\\007add\" +\n      \"ress\\030\\002 \\001(\\tR\\007address\\\"=\\n\\033SignatureAggregat\" +\n      \"ionRequest\\022\\036\\n\\nsignatures\\030\\001 \\003(\\tR\\nsignatur\" +\n      \"es\\\"<\\n\\034SignatureAggregationResponse\\022\\034\\n\\tsi\" +\n      \"gnature\\030\\001 \\001(\\tR\\tsignature2\\215\\003\\n\\005Utils\\022p\\n\\031Si\" +\n      \"gnMessageWithPrivateKey\\022(.pactus.SignMes\" +\n      \"sageWithPrivateKeyRequest\\032).pactus.SignM\" +\n      \"essageWithPrivateKeyResponse\\022L\\n\\rVerifyMe\" +\n      \"ssage\\022\\034.pactus.VerifyMessageRequest\\032\\035.pa\" +\n      \"ctus.VerifyMessageResponse\\022a\\n\\024PublicKeyA\" +\n      \"ggregation\\022#.pactus.PublicKeyAggregation\" +\n      \"Request\\032$.pactus.PublicKeyAggregationRes\" +\n      \"ponse\\022a\\n\\024SignatureAggregation\\022#.pactus.S\" +\n      \"ignatureAggregationRequest\\032$.pactus.Sign\" +\n      \"atureAggregationResponseB:\\n\\006pactusZ0gith\" +\n      \"ub.com/pactus-project/pactus/www/grpc/pa\" +\n      \"ctusb\\006proto3\"\n    };\n    descriptor = com.google.protobuf.Descriptors.FileDescriptor\n      .internalBuildGeneratedFileFrom(descriptorData,\n        new com.google.protobuf.Descriptors.FileDescriptor[] {\n        });\n    internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor =\n      getDescriptor().getMessageType(0);\n    internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor,\n        new java.lang.String[] { \"PrivateKey\", \"Message\", });\n    internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor =\n      getDescriptor().getMessageType(1);\n    internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor,\n        new java.lang.String[] { \"Signature\", });\n    internal_static_pactus_VerifyMessageRequest_descriptor =\n      getDescriptor().getMessageType(2);\n    internal_static_pactus_VerifyMessageRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_VerifyMessageRequest_descriptor,\n        new java.lang.String[] { \"Message\", \"Signature\", \"PublicKey\", });\n    internal_static_pactus_VerifyMessageResponse_descriptor =\n      getDescriptor().getMessageType(3);\n    internal_static_pactus_VerifyMessageResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_VerifyMessageResponse_descriptor,\n        new java.lang.String[] { \"IsValid\", });\n    internal_static_pactus_PublicKeyAggregationRequest_descriptor =\n      getDescriptor().getMessageType(4);\n    internal_static_pactus_PublicKeyAggregationRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PublicKeyAggregationRequest_descriptor,\n        new java.lang.String[] { \"PublicKeys\", });\n    internal_static_pactus_PublicKeyAggregationResponse_descriptor =\n      getDescriptor().getMessageType(5);\n    internal_static_pactus_PublicKeyAggregationResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_PublicKeyAggregationResponse_descriptor,\n        new java.lang.String[] { \"PublicKey\", \"Address\", });\n    internal_static_pactus_SignatureAggregationRequest_descriptor =\n      getDescriptor().getMessageType(6);\n    internal_static_pactus_SignatureAggregationRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignatureAggregationRequest_descriptor,\n        new java.lang.String[] { \"Signatures\", });\n    internal_static_pactus_SignatureAggregationResponse_descriptor =\n      getDescriptor().getMessageType(7);\n    internal_static_pactus_SignatureAggregationResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignatureAggregationResponse_descriptor,\n        new java.lang.String[] { \"Signature\", });\n    descriptor.resolveAllFeaturesImmutable();\n  }\n\n  // @@protoc_insertion_point(outer_class_scope)\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/WalletGrpc.java",
    "content": "package pactus;\n\nimport static io.grpc.MethodDescriptor.generateFullMethodName;\n\n/**\n * <pre>\n * Wallet service provides RPC methods for wallet management operations.\n * </pre>\n */\n@io.grpc.stub.annotations.GrpcGenerated\npublic final class WalletGrpc {\n\n  private WalletGrpc() {}\n\n  public static final java.lang.String SERVICE_NAME = \"pactus.Wallet\";\n\n  // Static method descriptors that strictly reflect the proto.\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.CreateWalletRequest,\n      pactus.WalletOuterClass.CreateWalletResponse> getCreateWalletMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"CreateWallet\",\n      requestType = pactus.WalletOuterClass.CreateWalletRequest.class,\n      responseType = pactus.WalletOuterClass.CreateWalletResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.CreateWalletRequest,\n      pactus.WalletOuterClass.CreateWalletResponse> getCreateWalletMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.CreateWalletRequest, pactus.WalletOuterClass.CreateWalletResponse> getCreateWalletMethod;\n    if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) {\n          WalletGrpc.getCreateWalletMethod = getCreateWalletMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.CreateWalletRequest, pactus.WalletOuterClass.CreateWalletResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"CreateWallet\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.CreateWalletRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.CreateWalletResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"CreateWallet\"))\n              .build();\n        }\n      }\n    }\n    return getCreateWalletMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.RestoreWalletRequest,\n      pactus.WalletOuterClass.RestoreWalletResponse> getRestoreWalletMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"RestoreWallet\",\n      requestType = pactus.WalletOuterClass.RestoreWalletRequest.class,\n      responseType = pactus.WalletOuterClass.RestoreWalletResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.RestoreWalletRequest,\n      pactus.WalletOuterClass.RestoreWalletResponse> getRestoreWalletMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.RestoreWalletRequest, pactus.WalletOuterClass.RestoreWalletResponse> getRestoreWalletMethod;\n    if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) {\n          WalletGrpc.getRestoreWalletMethod = getRestoreWalletMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.RestoreWalletRequest, pactus.WalletOuterClass.RestoreWalletResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"RestoreWallet\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.RestoreWalletRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.RestoreWalletResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"RestoreWallet\"))\n              .build();\n        }\n      }\n    }\n    return getRestoreWalletMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.LoadWalletRequest,\n      pactus.WalletOuterClass.LoadWalletResponse> getLoadWalletMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"LoadWallet\",\n      requestType = pactus.WalletOuterClass.LoadWalletRequest.class,\n      responseType = pactus.WalletOuterClass.LoadWalletResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.LoadWalletRequest,\n      pactus.WalletOuterClass.LoadWalletResponse> getLoadWalletMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.LoadWalletRequest, pactus.WalletOuterClass.LoadWalletResponse> getLoadWalletMethod;\n    if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) {\n          WalletGrpc.getLoadWalletMethod = getLoadWalletMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.LoadWalletRequest, pactus.WalletOuterClass.LoadWalletResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"LoadWallet\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.LoadWalletRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.LoadWalletResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"LoadWallet\"))\n              .build();\n        }\n      }\n    }\n    return getLoadWalletMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.UnloadWalletRequest,\n      pactus.WalletOuterClass.UnloadWalletResponse> getUnloadWalletMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"UnloadWallet\",\n      requestType = pactus.WalletOuterClass.UnloadWalletRequest.class,\n      responseType = pactus.WalletOuterClass.UnloadWalletResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.UnloadWalletRequest,\n      pactus.WalletOuterClass.UnloadWalletResponse> getUnloadWalletMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.UnloadWalletRequest, pactus.WalletOuterClass.UnloadWalletResponse> getUnloadWalletMethod;\n    if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) {\n          WalletGrpc.getUnloadWalletMethod = getUnloadWalletMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.UnloadWalletRequest, pactus.WalletOuterClass.UnloadWalletResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"UnloadWallet\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.UnloadWalletRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.UnloadWalletResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"UnloadWallet\"))\n              .build();\n        }\n      }\n    }\n    return getUnloadWalletMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListWalletsRequest,\n      pactus.WalletOuterClass.ListWalletsResponse> getListWalletsMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"ListWallets\",\n      requestType = pactus.WalletOuterClass.ListWalletsRequest.class,\n      responseType = pactus.WalletOuterClass.ListWalletsResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListWalletsRequest,\n      pactus.WalletOuterClass.ListWalletsResponse> getListWalletsMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListWalletsRequest, pactus.WalletOuterClass.ListWalletsResponse> getListWalletsMethod;\n    if ((getListWalletsMethod = WalletGrpc.getListWalletsMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getListWalletsMethod = WalletGrpc.getListWalletsMethod) == null) {\n          WalletGrpc.getListWalletsMethod = getListWalletsMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.ListWalletsRequest, pactus.WalletOuterClass.ListWalletsResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"ListWallets\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListWalletsRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListWalletsResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"ListWallets\"))\n              .build();\n        }\n      }\n    }\n    return getListWalletsMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetWalletInfoRequest,\n      pactus.WalletOuterClass.GetWalletInfoResponse> getGetWalletInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetWalletInfo\",\n      requestType = pactus.WalletOuterClass.GetWalletInfoRequest.class,\n      responseType = pactus.WalletOuterClass.GetWalletInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetWalletInfoRequest,\n      pactus.WalletOuterClass.GetWalletInfoResponse> getGetWalletInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetWalletInfoRequest, pactus.WalletOuterClass.GetWalletInfoResponse> getGetWalletInfoMethod;\n    if ((getGetWalletInfoMethod = WalletGrpc.getGetWalletInfoMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetWalletInfoMethod = WalletGrpc.getGetWalletInfoMethod) == null) {\n          WalletGrpc.getGetWalletInfoMethod = getGetWalletInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetWalletInfoRequest, pactus.WalletOuterClass.GetWalletInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetWalletInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetWalletInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetWalletInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetWalletInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetWalletInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.UpdatePasswordRequest,\n      pactus.WalletOuterClass.UpdatePasswordResponse> getUpdatePasswordMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"UpdatePassword\",\n      requestType = pactus.WalletOuterClass.UpdatePasswordRequest.class,\n      responseType = pactus.WalletOuterClass.UpdatePasswordResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.UpdatePasswordRequest,\n      pactus.WalletOuterClass.UpdatePasswordResponse> getUpdatePasswordMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.UpdatePasswordRequest, pactus.WalletOuterClass.UpdatePasswordResponse> getUpdatePasswordMethod;\n    if ((getUpdatePasswordMethod = WalletGrpc.getUpdatePasswordMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getUpdatePasswordMethod = WalletGrpc.getUpdatePasswordMethod) == null) {\n          WalletGrpc.getUpdatePasswordMethod = getUpdatePasswordMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.UpdatePasswordRequest, pactus.WalletOuterClass.UpdatePasswordResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"UpdatePassword\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.UpdatePasswordRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.UpdatePasswordResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"UpdatePassword\"))\n              .build();\n        }\n      }\n    }\n    return getUpdatePasswordMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalBalanceRequest,\n      pactus.WalletOuterClass.GetTotalBalanceResponse> getGetTotalBalanceMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetTotalBalance\",\n      requestType = pactus.WalletOuterClass.GetTotalBalanceRequest.class,\n      responseType = pactus.WalletOuterClass.GetTotalBalanceResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalBalanceRequest,\n      pactus.WalletOuterClass.GetTotalBalanceResponse> getGetTotalBalanceMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalBalanceRequest, pactus.WalletOuterClass.GetTotalBalanceResponse> getGetTotalBalanceMethod;\n    if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) {\n          WalletGrpc.getGetTotalBalanceMethod = getGetTotalBalanceMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetTotalBalanceRequest, pactus.WalletOuterClass.GetTotalBalanceResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetTotalBalance\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetTotalBalance\"))\n              .build();\n        }\n      }\n    }\n    return getGetTotalBalanceMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalStakeRequest,\n      pactus.WalletOuterClass.GetTotalStakeResponse> getGetTotalStakeMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetTotalStake\",\n      requestType = pactus.WalletOuterClass.GetTotalStakeRequest.class,\n      responseType = pactus.WalletOuterClass.GetTotalStakeResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalStakeRequest,\n      pactus.WalletOuterClass.GetTotalStakeResponse> getGetTotalStakeMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetTotalStakeRequest, pactus.WalletOuterClass.GetTotalStakeResponse> getGetTotalStakeMethod;\n    if ((getGetTotalStakeMethod = WalletGrpc.getGetTotalStakeMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetTotalStakeMethod = WalletGrpc.getGetTotalStakeMethod) == null) {\n          WalletGrpc.getGetTotalStakeMethod = getGetTotalStakeMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetTotalStakeRequest, pactus.WalletOuterClass.GetTotalStakeResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetTotalStake\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetTotalStakeRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetTotalStakeResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetTotalStake\"))\n              .build();\n        }\n      }\n    }\n    return getGetTotalStakeMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetValidatorAddressRequest,\n      pactus.WalletOuterClass.GetValidatorAddressResponse> getGetValidatorAddressMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetValidatorAddress\",\n      requestType = pactus.WalletOuterClass.GetValidatorAddressRequest.class,\n      responseType = pactus.WalletOuterClass.GetValidatorAddressResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetValidatorAddressRequest,\n      pactus.WalletOuterClass.GetValidatorAddressResponse> getGetValidatorAddressMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetValidatorAddressRequest, pactus.WalletOuterClass.GetValidatorAddressResponse> getGetValidatorAddressMethod;\n    if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) {\n          WalletGrpc.getGetValidatorAddressMethod = getGetValidatorAddressMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetValidatorAddressRequest, pactus.WalletOuterClass.GetValidatorAddressResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetValidatorAddress\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetValidatorAddress\"))\n              .build();\n        }\n      }\n    }\n    return getGetValidatorAddressMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetAddressInfoRequest,\n      pactus.WalletOuterClass.GetAddressInfoResponse> getGetAddressInfoMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetAddressInfo\",\n      requestType = pactus.WalletOuterClass.GetAddressInfoRequest.class,\n      responseType = pactus.WalletOuterClass.GetAddressInfoResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetAddressInfoRequest,\n      pactus.WalletOuterClass.GetAddressInfoResponse> getGetAddressInfoMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetAddressInfoRequest, pactus.WalletOuterClass.GetAddressInfoResponse> getGetAddressInfoMethod;\n    if ((getGetAddressInfoMethod = WalletGrpc.getGetAddressInfoMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetAddressInfoMethod = WalletGrpc.getGetAddressInfoMethod) == null) {\n          WalletGrpc.getGetAddressInfoMethod = getGetAddressInfoMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetAddressInfoRequest, pactus.WalletOuterClass.GetAddressInfoResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetAddressInfo\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetAddressInfoRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetAddressInfoResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetAddressInfo\"))\n              .build();\n        }\n      }\n    }\n    return getGetAddressInfoMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetAddressLabelRequest,\n      pactus.WalletOuterClass.SetAddressLabelResponse> getSetAddressLabelMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SetAddressLabel\",\n      requestType = pactus.WalletOuterClass.SetAddressLabelRequest.class,\n      responseType = pactus.WalletOuterClass.SetAddressLabelResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetAddressLabelRequest,\n      pactus.WalletOuterClass.SetAddressLabelResponse> getSetAddressLabelMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetAddressLabelRequest, pactus.WalletOuterClass.SetAddressLabelResponse> getSetAddressLabelMethod;\n    if ((getSetAddressLabelMethod = WalletGrpc.getSetAddressLabelMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getSetAddressLabelMethod = WalletGrpc.getSetAddressLabelMethod) == null) {\n          WalletGrpc.getSetAddressLabelMethod = getSetAddressLabelMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.SetAddressLabelRequest, pactus.WalletOuterClass.SetAddressLabelResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SetAddressLabel\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SetAddressLabelRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SetAddressLabelResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"SetAddressLabel\"))\n              .build();\n        }\n      }\n    }\n    return getSetAddressLabelMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetNewAddressRequest,\n      pactus.WalletOuterClass.GetNewAddressResponse> getGetNewAddressMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetNewAddress\",\n      requestType = pactus.WalletOuterClass.GetNewAddressRequest.class,\n      responseType = pactus.WalletOuterClass.GetNewAddressResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetNewAddressRequest,\n      pactus.WalletOuterClass.GetNewAddressResponse> getGetNewAddressMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetNewAddressRequest, pactus.WalletOuterClass.GetNewAddressResponse> getGetNewAddressMethod;\n    if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) {\n          WalletGrpc.getGetNewAddressMethod = getGetNewAddressMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetNewAddressRequest, pactus.WalletOuterClass.GetNewAddressResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetNewAddress\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetNewAddressRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetNewAddressResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetNewAddress\"))\n              .build();\n        }\n      }\n    }\n    return getGetNewAddressMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListAddressesRequest,\n      pactus.WalletOuterClass.ListAddressesResponse> getListAddressesMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"ListAddresses\",\n      requestType = pactus.WalletOuterClass.ListAddressesRequest.class,\n      responseType = pactus.WalletOuterClass.ListAddressesResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListAddressesRequest,\n      pactus.WalletOuterClass.ListAddressesResponse> getListAddressesMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListAddressesRequest, pactus.WalletOuterClass.ListAddressesResponse> getListAddressesMethod;\n    if ((getListAddressesMethod = WalletGrpc.getListAddressesMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getListAddressesMethod = WalletGrpc.getListAddressesMethod) == null) {\n          WalletGrpc.getListAddressesMethod = getListAddressesMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.ListAddressesRequest, pactus.WalletOuterClass.ListAddressesResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"ListAddresses\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListAddressesRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListAddressesResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"ListAddresses\"))\n              .build();\n        }\n      }\n    }\n    return getListAddressesMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignMessageRequest,\n      pactus.WalletOuterClass.SignMessageResponse> getSignMessageMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SignMessage\",\n      requestType = pactus.WalletOuterClass.SignMessageRequest.class,\n      responseType = pactus.WalletOuterClass.SignMessageResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignMessageRequest,\n      pactus.WalletOuterClass.SignMessageResponse> getSignMessageMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignMessageRequest, pactus.WalletOuterClass.SignMessageResponse> getSignMessageMethod;\n    if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) {\n          WalletGrpc.getSignMessageMethod = getSignMessageMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.SignMessageRequest, pactus.WalletOuterClass.SignMessageResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SignMessage\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SignMessageRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SignMessageResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"SignMessage\"))\n              .build();\n        }\n      }\n    }\n    return getSignMessageMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignRawTransactionRequest,\n      pactus.WalletOuterClass.SignRawTransactionResponse> getSignRawTransactionMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SignRawTransaction\",\n      requestType = pactus.WalletOuterClass.SignRawTransactionRequest.class,\n      responseType = pactus.WalletOuterClass.SignRawTransactionResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignRawTransactionRequest,\n      pactus.WalletOuterClass.SignRawTransactionResponse> getSignRawTransactionMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.SignRawTransactionRequest, pactus.WalletOuterClass.SignRawTransactionResponse> getSignRawTransactionMethod;\n    if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) {\n          WalletGrpc.getSignRawTransactionMethod = getSignRawTransactionMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.SignRawTransactionRequest, pactus.WalletOuterClass.SignRawTransactionResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SignRawTransaction\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"SignRawTransaction\"))\n              .build();\n        }\n      }\n    }\n    return getSignRawTransactionMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListTransactionsRequest,\n      pactus.WalletOuterClass.ListTransactionsResponse> getListTransactionsMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"ListTransactions\",\n      requestType = pactus.WalletOuterClass.ListTransactionsRequest.class,\n      responseType = pactus.WalletOuterClass.ListTransactionsResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListTransactionsRequest,\n      pactus.WalletOuterClass.ListTransactionsResponse> getListTransactionsMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.ListTransactionsRequest, pactus.WalletOuterClass.ListTransactionsResponse> getListTransactionsMethod;\n    if ((getListTransactionsMethod = WalletGrpc.getListTransactionsMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getListTransactionsMethod = WalletGrpc.getListTransactionsMethod) == null) {\n          WalletGrpc.getListTransactionsMethod = getListTransactionsMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.ListTransactionsRequest, pactus.WalletOuterClass.ListTransactionsResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"ListTransactions\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListTransactionsRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.ListTransactionsResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"ListTransactions\"))\n              .build();\n        }\n      }\n    }\n    return getListTransactionsMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetDefaultFeeRequest,\n      pactus.WalletOuterClass.SetDefaultFeeResponse> getSetDefaultFeeMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"SetDefaultFee\",\n      requestType = pactus.WalletOuterClass.SetDefaultFeeRequest.class,\n      responseType = pactus.WalletOuterClass.SetDefaultFeeResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetDefaultFeeRequest,\n      pactus.WalletOuterClass.SetDefaultFeeResponse> getSetDefaultFeeMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.SetDefaultFeeRequest, pactus.WalletOuterClass.SetDefaultFeeResponse> getSetDefaultFeeMethod;\n    if ((getSetDefaultFeeMethod = WalletGrpc.getSetDefaultFeeMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getSetDefaultFeeMethod = WalletGrpc.getSetDefaultFeeMethod) == null) {\n          WalletGrpc.getSetDefaultFeeMethod = getSetDefaultFeeMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.SetDefaultFeeRequest, pactus.WalletOuterClass.SetDefaultFeeResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"SetDefaultFee\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SetDefaultFeeRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.SetDefaultFeeResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"SetDefaultFee\"))\n              .build();\n        }\n      }\n    }\n    return getSetDefaultFeeMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetMnemonicRequest,\n      pactus.WalletOuterClass.GetMnemonicResponse> getGetMnemonicMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetMnemonic\",\n      requestType = pactus.WalletOuterClass.GetMnemonicRequest.class,\n      responseType = pactus.WalletOuterClass.GetMnemonicResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetMnemonicRequest,\n      pactus.WalletOuterClass.GetMnemonicResponse> getGetMnemonicMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetMnemonicRequest, pactus.WalletOuterClass.GetMnemonicResponse> getGetMnemonicMethod;\n    if ((getGetMnemonicMethod = WalletGrpc.getGetMnemonicMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetMnemonicMethod = WalletGrpc.getGetMnemonicMethod) == null) {\n          WalletGrpc.getGetMnemonicMethod = getGetMnemonicMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetMnemonicRequest, pactus.WalletOuterClass.GetMnemonicResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetMnemonic\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetMnemonicRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetMnemonicResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetMnemonic\"))\n              .build();\n        }\n      }\n    }\n    return getGetMnemonicMethod;\n  }\n\n  private static volatile io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetPrivateKeyRequest,\n      pactus.WalletOuterClass.GetPrivateKeyResponse> getGetPrivateKeyMethod;\n\n  @io.grpc.stub.annotations.RpcMethod(\n      fullMethodName = SERVICE_NAME + '/' + \"GetPrivateKey\",\n      requestType = pactus.WalletOuterClass.GetPrivateKeyRequest.class,\n      responseType = pactus.WalletOuterClass.GetPrivateKeyResponse.class,\n      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)\n  public static io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetPrivateKeyRequest,\n      pactus.WalletOuterClass.GetPrivateKeyResponse> getGetPrivateKeyMethod() {\n    io.grpc.MethodDescriptor<pactus.WalletOuterClass.GetPrivateKeyRequest, pactus.WalletOuterClass.GetPrivateKeyResponse> getGetPrivateKeyMethod;\n    if ((getGetPrivateKeyMethod = WalletGrpc.getGetPrivateKeyMethod) == null) {\n      synchronized (WalletGrpc.class) {\n        if ((getGetPrivateKeyMethod = WalletGrpc.getGetPrivateKeyMethod) == null) {\n          WalletGrpc.getGetPrivateKeyMethod = getGetPrivateKeyMethod =\n              io.grpc.MethodDescriptor.<pactus.WalletOuterClass.GetPrivateKeyRequest, pactus.WalletOuterClass.GetPrivateKeyResponse>newBuilder()\n              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)\n              .setFullMethodName(generateFullMethodName(SERVICE_NAME, \"GetPrivateKey\"))\n              .setSampledToLocalTracing(true)\n              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetPrivateKeyRequest.getDefaultInstance()))\n              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(\n                  pactus.WalletOuterClass.GetPrivateKeyResponse.getDefaultInstance()))\n              .setSchemaDescriptor(new WalletMethodDescriptorSupplier(\"GetPrivateKey\"))\n              .build();\n        }\n      }\n    }\n    return getGetPrivateKeyMethod;\n  }\n\n  /**\n   * Creates a new async stub that supports all call types for the service\n   */\n  public static WalletStub newStub(io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<WalletStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<WalletStub>() {\n        @java.lang.Override\n        public WalletStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new WalletStub(channel, callOptions);\n        }\n      };\n    return WalletStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports all types of calls on the service\n   */\n  public static WalletBlockingV2Stub newBlockingV2Stub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<WalletBlockingV2Stub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<WalletBlockingV2Stub>() {\n        @java.lang.Override\n        public WalletBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new WalletBlockingV2Stub(channel, callOptions);\n        }\n      };\n    return WalletBlockingV2Stub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new blocking-style stub that supports unary and streaming output calls on the service\n   */\n  public static WalletBlockingStub newBlockingStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<WalletBlockingStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<WalletBlockingStub>() {\n        @java.lang.Override\n        public WalletBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new WalletBlockingStub(channel, callOptions);\n        }\n      };\n    return WalletBlockingStub.newStub(factory, channel);\n  }\n\n  /**\n   * Creates a new ListenableFuture-style stub that supports unary calls on the service\n   */\n  public static WalletFutureStub newFutureStub(\n      io.grpc.Channel channel) {\n    io.grpc.stub.AbstractStub.StubFactory<WalletFutureStub> factory =\n      new io.grpc.stub.AbstractStub.StubFactory<WalletFutureStub>() {\n        @java.lang.Override\n        public WalletFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n          return new WalletFutureStub(channel, callOptions);\n        }\n      };\n    return WalletFutureStub.newStub(factory, channel);\n  }\n\n  /**\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public interface AsyncService {\n\n    /**\n     * <pre>\n     * CreateWallet creates a new wallet with the specified parameters.\n     * </pre>\n     */\n    default void createWallet(pactus.WalletOuterClass.CreateWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.CreateWalletResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateWalletMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * RestoreWallet restores an existing wallet with the given mnemonic.\n     * </pre>\n     */\n    default void restoreWallet(pactus.WalletOuterClass.RestoreWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.RestoreWalletResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreWalletMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * LoadWallet loads an existing wallet with the given name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    default void loadWallet(pactus.WalletOuterClass.LoadWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.LoadWalletResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLoadWalletMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * UnloadWallet unloads a currently loaded wallet with the specified name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    default void unloadWallet(pactus.WalletOuterClass.UnloadWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UnloadWalletResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnloadWalletMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListWallets returns a list of all available wallets.\n     * </pre>\n     */\n    default void listWallets(pactus.WalletOuterClass.ListWalletsRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListWalletsResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListWalletsMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetWalletInfo returns detailed information about a specific wallet.\n     * </pre>\n     */\n    default void getWalletInfo(pactus.WalletOuterClass.GetWalletInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetWalletInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetWalletInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * UpdatePassword updates the password of an existing wallet.\n     * </pre>\n     */\n    default void updatePassword(pactus.WalletOuterClass.UpdatePasswordRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UpdatePasswordResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdatePasswordMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTotalBalance returns the total available balance of the wallet.\n     * </pre>\n     */\n    default void getTotalBalance(pactus.WalletOuterClass.GetTotalBalanceRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalBalanceResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTotalBalanceMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTotalStake returns the total stake amount in the wallet.\n     * </pre>\n     */\n    default void getTotalStake(pactus.WalletOuterClass.GetTotalStakeRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalStakeResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTotalStakeMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddress retrieves the validator address associated with a public key.\n     * Deprecated: Will move into utils.\n     * </pre>\n     */\n    default void getValidatorAddress(pactus.WalletOuterClass.GetValidatorAddressRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetValidatorAddressResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetAddressInfo returns detailed information about a specific address.\n     * </pre>\n     */\n    default void getAddressInfo(pactus.WalletOuterClass.GetAddressInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetAddressInfoResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAddressInfoMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SetAddressLabel sets or updates the label for a given address.\n     * </pre>\n     */\n    default void setAddressLabel(pactus.WalletOuterClass.SetAddressLabelRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetAddressLabelResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetAddressLabelMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetNewAddress generates a new address for the specified wallet.\n     * </pre>\n     */\n    default void getNewAddress(pactus.WalletOuterClass.GetNewAddressRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetNewAddressResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNewAddressMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListAddresses returns all addresses in the specified wallet.\n     * </pre>\n     */\n    default void listAddresses(pactus.WalletOuterClass.ListAddressesRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListAddressesResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAddressesMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignMessage signs an arbitrary message using a wallet's private key.\n     * </pre>\n     */\n    default void signMessage(pactus.WalletOuterClass.SignMessageRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignMessageResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignRawTransaction signs a raw transaction for a specified wallet.\n     * </pre>\n     */\n    default void signRawTransaction(pactus.WalletOuterClass.SignRawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignRawTransactionMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListTransactions returns a list of transactions for a wallet,\n     * optionally filtered by a specific address, with pagination support.\n     * </pre>\n     */\n    default void listTransactions(pactus.WalletOuterClass.ListTransactionsRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListTransactionsResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTransactionsMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SetDefaultFee sets the default fee for the wallet.\n     * </pre>\n     */\n    default void setDefaultFee(pactus.WalletOuterClass.SetDefaultFeeRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetDefaultFeeResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDefaultFeeMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n     * </pre>\n     */\n    default void getMnemonic(pactus.WalletOuterClass.GetMnemonicRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetMnemonicResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMnemonicMethod(), responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetPrivateKey returns the private key for a given address.\n     * </pre>\n     */\n    default void getPrivateKey(pactus.WalletOuterClass.GetPrivateKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetPrivateKeyResponse> responseObserver) {\n      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPrivateKeyMethod(), responseObserver);\n    }\n  }\n\n  /**\n   * Base class for the server implementation of the service Wallet.\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public static abstract class WalletImplBase\n      implements io.grpc.BindableService, AsyncService {\n\n    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {\n      return WalletGrpc.bindService(this);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do asynchronous rpc calls to service Wallet.\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public static final class WalletStub\n      extends io.grpc.stub.AbstractAsyncStub<WalletStub> {\n    private WalletStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected WalletStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new WalletStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * CreateWallet creates a new wallet with the specified parameters.\n     * </pre>\n     */\n    public void createWallet(pactus.WalletOuterClass.CreateWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.CreateWalletResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * RestoreWallet restores an existing wallet with the given mnemonic.\n     * </pre>\n     */\n    public void restoreWallet(pactus.WalletOuterClass.RestoreWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.RestoreWalletResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * LoadWallet loads an existing wallet with the given name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public void loadWallet(pactus.WalletOuterClass.LoadWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.LoadWalletResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * UnloadWallet unloads a currently loaded wallet with the specified name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public void unloadWallet(pactus.WalletOuterClass.UnloadWalletRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UnloadWalletResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListWallets returns a list of all available wallets.\n     * </pre>\n     */\n    public void listWallets(pactus.WalletOuterClass.ListWalletsRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListWalletsResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getListWalletsMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetWalletInfo returns detailed information about a specific wallet.\n     * </pre>\n     */\n    public void getWalletInfo(pactus.WalletOuterClass.GetWalletInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetWalletInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetWalletInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * UpdatePassword updates the password of an existing wallet.\n     * </pre>\n     */\n    public void updatePassword(pactus.WalletOuterClass.UpdatePasswordRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UpdatePasswordResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getUpdatePasswordMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTotalBalance returns the total available balance of the wallet.\n     * </pre>\n     */\n    public void getTotalBalance(pactus.WalletOuterClass.GetTotalBalanceRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalBalanceResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetTotalStake returns the total stake amount in the wallet.\n     * </pre>\n     */\n    public void getTotalStake(pactus.WalletOuterClass.GetTotalStakeRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalStakeResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetTotalStakeMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddress retrieves the validator address associated with a public key.\n     * Deprecated: Will move into utils.\n     * </pre>\n     */\n    public void getValidatorAddress(pactus.WalletOuterClass.GetValidatorAddressRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetValidatorAddressResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetAddressInfo returns detailed information about a specific address.\n     * </pre>\n     */\n    public void getAddressInfo(pactus.WalletOuterClass.GetAddressInfoRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetAddressInfoResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetAddressInfoMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SetAddressLabel sets or updates the label for a given address.\n     * </pre>\n     */\n    public void setAddressLabel(pactus.WalletOuterClass.SetAddressLabelRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetAddressLabelResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSetAddressLabelMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetNewAddress generates a new address for the specified wallet.\n     * </pre>\n     */\n    public void getNewAddress(pactus.WalletOuterClass.GetNewAddressRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetNewAddressResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListAddresses returns all addresses in the specified wallet.\n     * </pre>\n     */\n    public void listAddresses(pactus.WalletOuterClass.ListAddressesRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListAddressesResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getListAddressesMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignMessage signs an arbitrary message using a wallet's private key.\n     * </pre>\n     */\n    public void signMessage(pactus.WalletOuterClass.SignMessageRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignMessageResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSignMessageMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SignRawTransaction signs a raw transaction for a specified wallet.\n     * </pre>\n     */\n    public void signRawTransaction(pactus.WalletOuterClass.SignRawTransactionRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignRawTransactionResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * ListTransactions returns a list of transactions for a wallet,\n     * optionally filtered by a specific address, with pagination support.\n     * </pre>\n     */\n    public void listTransactions(pactus.WalletOuterClass.ListTransactionsRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListTransactionsResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getListTransactionsMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * SetDefaultFee sets the default fee for the wallet.\n     * </pre>\n     */\n    public void setDefaultFee(pactus.WalletOuterClass.SetDefaultFeeRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetDefaultFeeResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getSetDefaultFeeMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n     * </pre>\n     */\n    public void getMnemonic(pactus.WalletOuterClass.GetMnemonicRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetMnemonicResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetMnemonicMethod(), getCallOptions()), request, responseObserver);\n    }\n\n    /**\n     * <pre>\n     * GetPrivateKey returns the private key for a given address.\n     * </pre>\n     */\n    public void getPrivateKey(pactus.WalletOuterClass.GetPrivateKeyRequest request,\n        io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetPrivateKeyResponse> responseObserver) {\n      io.grpc.stub.ClientCalls.asyncUnaryCall(\n          getChannel().newCall(getGetPrivateKeyMethod(), getCallOptions()), request, responseObserver);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do synchronous rpc calls to service Wallet.\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public static final class WalletBlockingV2Stub\n      extends io.grpc.stub.AbstractBlockingStub<WalletBlockingV2Stub> {\n    private WalletBlockingV2Stub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected WalletBlockingV2Stub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new WalletBlockingV2Stub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * CreateWallet creates a new wallet with the specified parameters.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.CreateWalletResponse createWallet(pactus.WalletOuterClass.CreateWalletRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getCreateWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * RestoreWallet restores an existing wallet with the given mnemonic.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.RestoreWalletResponse restoreWallet(pactus.WalletOuterClass.RestoreWalletRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getRestoreWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * LoadWallet loads an existing wallet with the given name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.LoadWalletResponse loadWallet(pactus.WalletOuterClass.LoadWalletRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getLoadWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * UnloadWallet unloads a currently loaded wallet with the specified name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.UnloadWalletResponse unloadWallet(pactus.WalletOuterClass.UnloadWalletRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getUnloadWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListWallets returns a list of all available wallets.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListWalletsResponse listWallets(pactus.WalletOuterClass.ListWalletsRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getListWalletsMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetWalletInfo returns detailed information about a specific wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetWalletInfoResponse getWalletInfo(pactus.WalletOuterClass.GetWalletInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetWalletInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * UpdatePassword updates the password of an existing wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.UpdatePasswordResponse updatePassword(pactus.WalletOuterClass.UpdatePasswordRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getUpdatePasswordMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalBalance returns the total available balance of the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetTotalBalanceResponse getTotalBalance(pactus.WalletOuterClass.GetTotalBalanceRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetTotalBalanceMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalStake returns the total stake amount in the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetTotalStakeResponse getTotalStake(pactus.WalletOuterClass.GetTotalStakeRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetTotalStakeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddress retrieves the validator address associated with a public key.\n     * Deprecated: Will move into utils.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetValidatorAddressResponse getValidatorAddress(pactus.WalletOuterClass.GetValidatorAddressRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetValidatorAddressMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetAddressInfo returns detailed information about a specific address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetAddressInfoResponse getAddressInfo(pactus.WalletOuterClass.GetAddressInfoRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetAddressInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SetAddressLabel sets or updates the label for a given address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SetAddressLabelResponse setAddressLabel(pactus.WalletOuterClass.SetAddressLabelRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSetAddressLabelMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetNewAddress generates a new address for the specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetNewAddressResponse getNewAddress(pactus.WalletOuterClass.GetNewAddressRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetNewAddressMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListAddresses returns all addresses in the specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListAddressesResponse listAddresses(pactus.WalletOuterClass.ListAddressesRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getListAddressesMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignMessage signs an arbitrary message using a wallet's private key.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SignMessageResponse signMessage(pactus.WalletOuterClass.SignMessageRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSignMessageMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignRawTransaction signs a raw transaction for a specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SignRawTransactionResponse signRawTransaction(pactus.WalletOuterClass.SignRawTransactionRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSignRawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListTransactions returns a list of transactions for a wallet,\n     * optionally filtered by a specific address, with pagination support.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListTransactionsResponse listTransactions(pactus.WalletOuterClass.ListTransactionsRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getListTransactionsMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SetDefaultFee sets the default fee for the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SetDefaultFeeResponse setDefaultFee(pactus.WalletOuterClass.SetDefaultFeeRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getSetDefaultFeeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetMnemonicResponse getMnemonic(pactus.WalletOuterClass.GetMnemonicRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetMnemonicMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetPrivateKey returns the private key for a given address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetPrivateKeyResponse getPrivateKey(pactus.WalletOuterClass.GetPrivateKeyRequest request) throws io.grpc.StatusException {\n      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(\n          getChannel(), getGetPrivateKeyMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do limited synchronous rpc calls to service Wallet.\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public static final class WalletBlockingStub\n      extends io.grpc.stub.AbstractBlockingStub<WalletBlockingStub> {\n    private WalletBlockingStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected WalletBlockingStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new WalletBlockingStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * CreateWallet creates a new wallet with the specified parameters.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.CreateWalletResponse createWallet(pactus.WalletOuterClass.CreateWalletRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getCreateWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * RestoreWallet restores an existing wallet with the given mnemonic.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.RestoreWalletResponse restoreWallet(pactus.WalletOuterClass.RestoreWalletRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getRestoreWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * LoadWallet loads an existing wallet with the given name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.LoadWalletResponse loadWallet(pactus.WalletOuterClass.LoadWalletRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getLoadWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * UnloadWallet unloads a currently loaded wallet with the specified name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.UnloadWalletResponse unloadWallet(pactus.WalletOuterClass.UnloadWalletRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getUnloadWalletMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListWallets returns a list of all available wallets.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListWalletsResponse listWallets(pactus.WalletOuterClass.ListWalletsRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getListWalletsMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetWalletInfo returns detailed information about a specific wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetWalletInfoResponse getWalletInfo(pactus.WalletOuterClass.GetWalletInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetWalletInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * UpdatePassword updates the password of an existing wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.UpdatePasswordResponse updatePassword(pactus.WalletOuterClass.UpdatePasswordRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getUpdatePasswordMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalBalance returns the total available balance of the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetTotalBalanceResponse getTotalBalance(pactus.WalletOuterClass.GetTotalBalanceRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetTotalBalanceMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalStake returns the total stake amount in the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetTotalStakeResponse getTotalStake(pactus.WalletOuterClass.GetTotalStakeRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetTotalStakeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddress retrieves the validator address associated with a public key.\n     * Deprecated: Will move into utils.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetValidatorAddressResponse getValidatorAddress(pactus.WalletOuterClass.GetValidatorAddressRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetValidatorAddressMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetAddressInfo returns detailed information about a specific address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetAddressInfoResponse getAddressInfo(pactus.WalletOuterClass.GetAddressInfoRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetAddressInfoMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SetAddressLabel sets or updates the label for a given address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SetAddressLabelResponse setAddressLabel(pactus.WalletOuterClass.SetAddressLabelRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSetAddressLabelMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetNewAddress generates a new address for the specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetNewAddressResponse getNewAddress(pactus.WalletOuterClass.GetNewAddressRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetNewAddressMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListAddresses returns all addresses in the specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListAddressesResponse listAddresses(pactus.WalletOuterClass.ListAddressesRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getListAddressesMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignMessage signs an arbitrary message using a wallet's private key.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SignMessageResponse signMessage(pactus.WalletOuterClass.SignMessageRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSignMessageMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SignRawTransaction signs a raw transaction for a specified wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SignRawTransactionResponse signRawTransaction(pactus.WalletOuterClass.SignRawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSignRawTransactionMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * ListTransactions returns a list of transactions for a wallet,\n     * optionally filtered by a specific address, with pagination support.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.ListTransactionsResponse listTransactions(pactus.WalletOuterClass.ListTransactionsRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getListTransactionsMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * SetDefaultFee sets the default fee for the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.SetDefaultFeeResponse setDefaultFee(pactus.WalletOuterClass.SetDefaultFeeRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getSetDefaultFeeMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetMnemonicResponse getMnemonic(pactus.WalletOuterClass.GetMnemonicRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetMnemonicMethod(), getCallOptions(), request);\n    }\n\n    /**\n     * <pre>\n     * GetPrivateKey returns the private key for a given address.\n     * </pre>\n     */\n    public pactus.WalletOuterClass.GetPrivateKeyResponse getPrivateKey(pactus.WalletOuterClass.GetPrivateKeyRequest request) {\n      return io.grpc.stub.ClientCalls.blockingUnaryCall(\n          getChannel(), getGetPrivateKeyMethod(), getCallOptions(), request);\n    }\n  }\n\n  /**\n   * A stub to allow clients to do ListenableFuture-style rpc calls to service Wallet.\n   * <pre>\n   * Wallet service provides RPC methods for wallet management operations.\n   * </pre>\n   */\n  public static final class WalletFutureStub\n      extends io.grpc.stub.AbstractFutureStub<WalletFutureStub> {\n    private WalletFutureStub(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      super(channel, callOptions);\n    }\n\n    @java.lang.Override\n    protected WalletFutureStub build(\n        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n      return new WalletFutureStub(channel, callOptions);\n    }\n\n    /**\n     * <pre>\n     * CreateWallet creates a new wallet with the specified parameters.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.CreateWalletResponse> createWallet(\n        pactus.WalletOuterClass.CreateWalletRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * RestoreWallet restores an existing wallet with the given mnemonic.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.RestoreWalletResponse> restoreWallet(\n        pactus.WalletOuterClass.RestoreWalletRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * LoadWallet loads an existing wallet with the given name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.LoadWalletResponse> loadWallet(\n        pactus.WalletOuterClass.LoadWalletRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * UnloadWallet unloads a currently loaded wallet with the specified name.\n     * deprecated: It will be removed in a future version.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.UnloadWalletResponse> unloadWallet(\n        pactus.WalletOuterClass.UnloadWalletRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * ListWallets returns a list of all available wallets.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.ListWalletsResponse> listWallets(\n        pactus.WalletOuterClass.ListWalletsRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getListWalletsMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetWalletInfo returns detailed information about a specific wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetWalletInfoResponse> getWalletInfo(\n        pactus.WalletOuterClass.GetWalletInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetWalletInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * UpdatePassword updates the password of an existing wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.UpdatePasswordResponse> updatePassword(\n        pactus.WalletOuterClass.UpdatePasswordRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getUpdatePasswordMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalBalance returns the total available balance of the wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetTotalBalanceResponse> getTotalBalance(\n        pactus.WalletOuterClass.GetTotalBalanceRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetTotalStake returns the total stake amount in the wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetTotalStakeResponse> getTotalStake(\n        pactus.WalletOuterClass.GetTotalStakeRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetTotalStakeMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetValidatorAddress retrieves the validator address associated with a public key.\n     * Deprecated: Will move into utils.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetValidatorAddressResponse> getValidatorAddress(\n        pactus.WalletOuterClass.GetValidatorAddressRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetAddressInfo returns detailed information about a specific address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetAddressInfoResponse> getAddressInfo(\n        pactus.WalletOuterClass.GetAddressInfoRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetAddressInfoMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * SetAddressLabel sets or updates the label for a given address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.SetAddressLabelResponse> setAddressLabel(\n        pactus.WalletOuterClass.SetAddressLabelRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSetAddressLabelMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetNewAddress generates a new address for the specified wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetNewAddressResponse> getNewAddress(\n        pactus.WalletOuterClass.GetNewAddressRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * ListAddresses returns all addresses in the specified wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.ListAddressesResponse> listAddresses(\n        pactus.WalletOuterClass.ListAddressesRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getListAddressesMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * SignMessage signs an arbitrary message using a wallet's private key.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.SignMessageResponse> signMessage(\n        pactus.WalletOuterClass.SignMessageRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSignMessageMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * SignRawTransaction signs a raw transaction for a specified wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.SignRawTransactionResponse> signRawTransaction(\n        pactus.WalletOuterClass.SignRawTransactionRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * ListTransactions returns a list of transactions for a wallet,\n     * optionally filtered by a specific address, with pagination support.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.ListTransactionsResponse> listTransactions(\n        pactus.WalletOuterClass.ListTransactionsRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getListTransactionsMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * SetDefaultFee sets the default fee for the wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.SetDefaultFeeResponse> setDefaultFee(\n        pactus.WalletOuterClass.SetDefaultFeeRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getSetDefaultFeeMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetMnemonicResponse> getMnemonic(\n        pactus.WalletOuterClass.GetMnemonicRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetMnemonicMethod(), getCallOptions()), request);\n    }\n\n    /**\n     * <pre>\n     * GetPrivateKey returns the private key for a given address.\n     * </pre>\n     */\n    public com.google.common.util.concurrent.ListenableFuture<pactus.WalletOuterClass.GetPrivateKeyResponse> getPrivateKey(\n        pactus.WalletOuterClass.GetPrivateKeyRequest request) {\n      return io.grpc.stub.ClientCalls.futureUnaryCall(\n          getChannel().newCall(getGetPrivateKeyMethod(), getCallOptions()), request);\n    }\n  }\n\n  private static final int METHODID_CREATE_WALLET = 0;\n  private static final int METHODID_RESTORE_WALLET = 1;\n  private static final int METHODID_LOAD_WALLET = 2;\n  private static final int METHODID_UNLOAD_WALLET = 3;\n  private static final int METHODID_LIST_WALLETS = 4;\n  private static final int METHODID_GET_WALLET_INFO = 5;\n  private static final int METHODID_UPDATE_PASSWORD = 6;\n  private static final int METHODID_GET_TOTAL_BALANCE = 7;\n  private static final int METHODID_GET_TOTAL_STAKE = 8;\n  private static final int METHODID_GET_VALIDATOR_ADDRESS = 9;\n  private static final int METHODID_GET_ADDRESS_INFO = 10;\n  private static final int METHODID_SET_ADDRESS_LABEL = 11;\n  private static final int METHODID_GET_NEW_ADDRESS = 12;\n  private static final int METHODID_LIST_ADDRESSES = 13;\n  private static final int METHODID_SIGN_MESSAGE = 14;\n  private static final int METHODID_SIGN_RAW_TRANSACTION = 15;\n  private static final int METHODID_LIST_TRANSACTIONS = 16;\n  private static final int METHODID_SET_DEFAULT_FEE = 17;\n  private static final int METHODID_GET_MNEMONIC = 18;\n  private static final int METHODID_GET_PRIVATE_KEY = 19;\n\n  private static final class MethodHandlers<Req, Resp> implements\n      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,\n      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {\n    private final AsyncService serviceImpl;\n    private final int methodId;\n\n    MethodHandlers(AsyncService serviceImpl, int methodId) {\n      this.serviceImpl = serviceImpl;\n      this.methodId = methodId;\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        case METHODID_CREATE_WALLET:\n          serviceImpl.createWallet((pactus.WalletOuterClass.CreateWalletRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.CreateWalletResponse>) responseObserver);\n          break;\n        case METHODID_RESTORE_WALLET:\n          serviceImpl.restoreWallet((pactus.WalletOuterClass.RestoreWalletRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.RestoreWalletResponse>) responseObserver);\n          break;\n        case METHODID_LOAD_WALLET:\n          serviceImpl.loadWallet((pactus.WalletOuterClass.LoadWalletRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.LoadWalletResponse>) responseObserver);\n          break;\n        case METHODID_UNLOAD_WALLET:\n          serviceImpl.unloadWallet((pactus.WalletOuterClass.UnloadWalletRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UnloadWalletResponse>) responseObserver);\n          break;\n        case METHODID_LIST_WALLETS:\n          serviceImpl.listWallets((pactus.WalletOuterClass.ListWalletsRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListWalletsResponse>) responseObserver);\n          break;\n        case METHODID_GET_WALLET_INFO:\n          serviceImpl.getWalletInfo((pactus.WalletOuterClass.GetWalletInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetWalletInfoResponse>) responseObserver);\n          break;\n        case METHODID_UPDATE_PASSWORD:\n          serviceImpl.updatePassword((pactus.WalletOuterClass.UpdatePasswordRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.UpdatePasswordResponse>) responseObserver);\n          break;\n        case METHODID_GET_TOTAL_BALANCE:\n          serviceImpl.getTotalBalance((pactus.WalletOuterClass.GetTotalBalanceRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalBalanceResponse>) responseObserver);\n          break;\n        case METHODID_GET_TOTAL_STAKE:\n          serviceImpl.getTotalStake((pactus.WalletOuterClass.GetTotalStakeRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetTotalStakeResponse>) responseObserver);\n          break;\n        case METHODID_GET_VALIDATOR_ADDRESS:\n          serviceImpl.getValidatorAddress((pactus.WalletOuterClass.GetValidatorAddressRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetValidatorAddressResponse>) responseObserver);\n          break;\n        case METHODID_GET_ADDRESS_INFO:\n          serviceImpl.getAddressInfo((pactus.WalletOuterClass.GetAddressInfoRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetAddressInfoResponse>) responseObserver);\n          break;\n        case METHODID_SET_ADDRESS_LABEL:\n          serviceImpl.setAddressLabel((pactus.WalletOuterClass.SetAddressLabelRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetAddressLabelResponse>) responseObserver);\n          break;\n        case METHODID_GET_NEW_ADDRESS:\n          serviceImpl.getNewAddress((pactus.WalletOuterClass.GetNewAddressRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetNewAddressResponse>) responseObserver);\n          break;\n        case METHODID_LIST_ADDRESSES:\n          serviceImpl.listAddresses((pactus.WalletOuterClass.ListAddressesRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListAddressesResponse>) responseObserver);\n          break;\n        case METHODID_SIGN_MESSAGE:\n          serviceImpl.signMessage((pactus.WalletOuterClass.SignMessageRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignMessageResponse>) responseObserver);\n          break;\n        case METHODID_SIGN_RAW_TRANSACTION:\n          serviceImpl.signRawTransaction((pactus.WalletOuterClass.SignRawTransactionRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SignRawTransactionResponse>) responseObserver);\n          break;\n        case METHODID_LIST_TRANSACTIONS:\n          serviceImpl.listTransactions((pactus.WalletOuterClass.ListTransactionsRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.ListTransactionsResponse>) responseObserver);\n          break;\n        case METHODID_SET_DEFAULT_FEE:\n          serviceImpl.setDefaultFee((pactus.WalletOuterClass.SetDefaultFeeRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.SetDefaultFeeResponse>) responseObserver);\n          break;\n        case METHODID_GET_MNEMONIC:\n          serviceImpl.getMnemonic((pactus.WalletOuterClass.GetMnemonicRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetMnemonicResponse>) responseObserver);\n          break;\n        case METHODID_GET_PRIVATE_KEY:\n          serviceImpl.getPrivateKey((pactus.WalletOuterClass.GetPrivateKeyRequest) request,\n              (io.grpc.stub.StreamObserver<pactus.WalletOuterClass.GetPrivateKeyResponse>) responseObserver);\n          break;\n        default:\n          throw new AssertionError();\n      }\n    }\n\n    @java.lang.Override\n    @java.lang.SuppressWarnings(\"unchecked\")\n    public io.grpc.stub.StreamObserver<Req> invoke(\n        io.grpc.stub.StreamObserver<Resp> responseObserver) {\n      switch (methodId) {\n        default:\n          throw new AssertionError();\n      }\n    }\n  }\n\n  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {\n    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())\n        .addMethod(\n          getCreateWalletMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.CreateWalletRequest,\n              pactus.WalletOuterClass.CreateWalletResponse>(\n                service, METHODID_CREATE_WALLET)))\n        .addMethod(\n          getRestoreWalletMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.RestoreWalletRequest,\n              pactus.WalletOuterClass.RestoreWalletResponse>(\n                service, METHODID_RESTORE_WALLET)))\n        .addMethod(\n          getLoadWalletMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.LoadWalletRequest,\n              pactus.WalletOuterClass.LoadWalletResponse>(\n                service, METHODID_LOAD_WALLET)))\n        .addMethod(\n          getUnloadWalletMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.UnloadWalletRequest,\n              pactus.WalletOuterClass.UnloadWalletResponse>(\n                service, METHODID_UNLOAD_WALLET)))\n        .addMethod(\n          getListWalletsMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.ListWalletsRequest,\n              pactus.WalletOuterClass.ListWalletsResponse>(\n                service, METHODID_LIST_WALLETS)))\n        .addMethod(\n          getGetWalletInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetWalletInfoRequest,\n              pactus.WalletOuterClass.GetWalletInfoResponse>(\n                service, METHODID_GET_WALLET_INFO)))\n        .addMethod(\n          getUpdatePasswordMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.UpdatePasswordRequest,\n              pactus.WalletOuterClass.UpdatePasswordResponse>(\n                service, METHODID_UPDATE_PASSWORD)))\n        .addMethod(\n          getGetTotalBalanceMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetTotalBalanceRequest,\n              pactus.WalletOuterClass.GetTotalBalanceResponse>(\n                service, METHODID_GET_TOTAL_BALANCE)))\n        .addMethod(\n          getGetTotalStakeMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetTotalStakeRequest,\n              pactus.WalletOuterClass.GetTotalStakeResponse>(\n                service, METHODID_GET_TOTAL_STAKE)))\n        .addMethod(\n          getGetValidatorAddressMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetValidatorAddressRequest,\n              pactus.WalletOuterClass.GetValidatorAddressResponse>(\n                service, METHODID_GET_VALIDATOR_ADDRESS)))\n        .addMethod(\n          getGetAddressInfoMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetAddressInfoRequest,\n              pactus.WalletOuterClass.GetAddressInfoResponse>(\n                service, METHODID_GET_ADDRESS_INFO)))\n        .addMethod(\n          getSetAddressLabelMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.SetAddressLabelRequest,\n              pactus.WalletOuterClass.SetAddressLabelResponse>(\n                service, METHODID_SET_ADDRESS_LABEL)))\n        .addMethod(\n          getGetNewAddressMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetNewAddressRequest,\n              pactus.WalletOuterClass.GetNewAddressResponse>(\n                service, METHODID_GET_NEW_ADDRESS)))\n        .addMethod(\n          getListAddressesMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.ListAddressesRequest,\n              pactus.WalletOuterClass.ListAddressesResponse>(\n                service, METHODID_LIST_ADDRESSES)))\n        .addMethod(\n          getSignMessageMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.SignMessageRequest,\n              pactus.WalletOuterClass.SignMessageResponse>(\n                service, METHODID_SIGN_MESSAGE)))\n        .addMethod(\n          getSignRawTransactionMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.SignRawTransactionRequest,\n              pactus.WalletOuterClass.SignRawTransactionResponse>(\n                service, METHODID_SIGN_RAW_TRANSACTION)))\n        .addMethod(\n          getListTransactionsMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.ListTransactionsRequest,\n              pactus.WalletOuterClass.ListTransactionsResponse>(\n                service, METHODID_LIST_TRANSACTIONS)))\n        .addMethod(\n          getSetDefaultFeeMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.SetDefaultFeeRequest,\n              pactus.WalletOuterClass.SetDefaultFeeResponse>(\n                service, METHODID_SET_DEFAULT_FEE)))\n        .addMethod(\n          getGetMnemonicMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetMnemonicRequest,\n              pactus.WalletOuterClass.GetMnemonicResponse>(\n                service, METHODID_GET_MNEMONIC)))\n        .addMethod(\n          getGetPrivateKeyMethod(),\n          io.grpc.stub.ServerCalls.asyncUnaryCall(\n            new MethodHandlers<\n              pactus.WalletOuterClass.GetPrivateKeyRequest,\n              pactus.WalletOuterClass.GetPrivateKeyResponse>(\n                service, METHODID_GET_PRIVATE_KEY)))\n        .build();\n  }\n\n  private static abstract class WalletBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {\n    WalletBaseDescriptorSupplier() {}\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {\n      return pactus.WalletOuterClass.getDescriptor();\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {\n      return getFileDescriptor().findServiceByName(\"Wallet\");\n    }\n  }\n\n  private static final class WalletFileDescriptorSupplier\n      extends WalletBaseDescriptorSupplier {\n    WalletFileDescriptorSupplier() {}\n  }\n\n  private static final class WalletMethodDescriptorSupplier\n      extends WalletBaseDescriptorSupplier\n      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {\n    private final java.lang.String methodName;\n\n    WalletMethodDescriptorSupplier(java.lang.String methodName) {\n      this.methodName = methodName;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {\n      return getServiceDescriptor().findMethodByName(methodName);\n    }\n  }\n\n  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;\n\n  public static io.grpc.ServiceDescriptor getServiceDescriptor() {\n    io.grpc.ServiceDescriptor result = serviceDescriptor;\n    if (result == null) {\n      synchronized (WalletGrpc.class) {\n        result = serviceDescriptor;\n        if (result == null) {\n          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)\n              .setSchemaDescriptor(new WalletFileDescriptorSupplier())\n              .addMethod(getCreateWalletMethod())\n              .addMethod(getRestoreWalletMethod())\n              .addMethod(getLoadWalletMethod())\n              .addMethod(getUnloadWalletMethod())\n              .addMethod(getListWalletsMethod())\n              .addMethod(getGetWalletInfoMethod())\n              .addMethod(getUpdatePasswordMethod())\n              .addMethod(getGetTotalBalanceMethod())\n              .addMethod(getGetTotalStakeMethod())\n              .addMethod(getGetValidatorAddressMethod())\n              .addMethod(getGetAddressInfoMethod())\n              .addMethod(getSetAddressLabelMethod())\n              .addMethod(getGetNewAddressMethod())\n              .addMethod(getListAddressesMethod())\n              .addMethod(getSignMessageMethod())\n              .addMethod(getSignRawTransactionMethod())\n              .addMethod(getListTransactionsMethod())\n              .addMethod(getSetDefaultFeeMethod())\n              .addMethod(getGetMnemonicMethod())\n              .addMethod(getGetPrivateKeyMethod())\n              .build();\n        }\n      }\n    }\n    return result;\n  }\n}\n"
  },
  {
    "path": "www/grpc/gen/java/pactus/WalletOuterClass.java",
    "content": "// Generated by the protocol buffer compiler.  DO NOT EDIT!\n// NO CHECKED-IN PROTOBUF GENCODE\n// source: wallet.proto\n// Protobuf Java Version: 4.33.2\n\npackage pactus;\n\n@com.google.protobuf.Generated\npublic final class WalletOuterClass extends com.google.protobuf.GeneratedFile {\n  private WalletOuterClass() {}\n  static {\n    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n      /* major= */ 4,\n      /* minor= */ 33,\n      /* patch= */ 2,\n      /* suffix= */ \"\",\n      \"WalletOuterClass\");\n  }\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistryLite registry) {\n  }\n\n  public static void registerAllExtensions(\n      com.google.protobuf.ExtensionRegistry registry) {\n    registerAllExtensions(\n        (com.google.protobuf.ExtensionRegistryLite) registry);\n  }\n  /**\n   * <pre>\n   * AddressType defines different types of blockchain addresses.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.AddressType}\n   */\n  public enum AddressType\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Treasury address type.\n     * Should not be used to generate new addresses.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_TREASURY = 0;</code>\n     */\n    ADDRESS_TYPE_TREASURY(0),\n    /**\n     * <pre>\n     * Validator address type used for validator nodes.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_VALIDATOR = 1;</code>\n     */\n    ADDRESS_TYPE_VALIDATOR(1),\n    /**\n     * <pre>\n     * Account address type with BLS signature scheme.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_BLS_ACCOUNT = 2;</code>\n     */\n    ADDRESS_TYPE_BLS_ACCOUNT(2),\n    /**\n     * <pre>\n     * Account address type with Ed25519 signature scheme.\n     * Note: Generating a new Ed25519 address requires the wallet password.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_ED25519_ACCOUNT = 3;</code>\n     */\n    ADDRESS_TYPE_ED25519_ACCOUNT(3),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"AddressType\");\n    }\n    /**\n     * <pre>\n     * Treasury address type.\n     * Should not be used to generate new addresses.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_TREASURY = 0;</code>\n     */\n    public static final int ADDRESS_TYPE_TREASURY_VALUE = 0;\n    /**\n     * <pre>\n     * Validator address type used for validator nodes.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_VALIDATOR = 1;</code>\n     */\n    public static final int ADDRESS_TYPE_VALIDATOR_VALUE = 1;\n    /**\n     * <pre>\n     * Account address type with BLS signature scheme.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_BLS_ACCOUNT = 2;</code>\n     */\n    public static final int ADDRESS_TYPE_BLS_ACCOUNT_VALUE = 2;\n    /**\n     * <pre>\n     * Account address type with Ed25519 signature scheme.\n     * Note: Generating a new Ed25519 address requires the wallet password.\n     * </pre>\n     *\n     * <code>ADDRESS_TYPE_ED25519_ACCOUNT = 3;</code>\n     */\n    public static final int ADDRESS_TYPE_ED25519_ACCOUNT_VALUE = 3;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static AddressType valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static AddressType forNumber(int value) {\n      switch (value) {\n        case 0: return ADDRESS_TYPE_TREASURY;\n        case 1: return ADDRESS_TYPE_VALIDATOR;\n        case 2: return ADDRESS_TYPE_BLS_ACCOUNT;\n        case 3: return ADDRESS_TYPE_ED25519_ACCOUNT;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<AddressType>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        AddressType> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<AddressType>() {\n            public AddressType findValueByNumber(int number) {\n              return AddressType.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.getDescriptor().getEnumTypes().get(0);\n    }\n\n    private static final AddressType[] VALUES = values();\n\n    public static AddressType valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private AddressType(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.AddressType)\n  }\n\n  /**\n   * <pre>\n   * TxDirection indicates the direction of a transaction relative to the wallet.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.TxDirection}\n   */\n  public enum TxDirection\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * include both incoming and outgoing transactions.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_ANY = 0;</code>\n     */\n    TX_DIRECTION_ANY(0),\n    /**\n     * <pre>\n     * Include only incoming transactions where the wallet receives funds.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_INCOMING = 1;</code>\n     */\n    TX_DIRECTION_INCOMING(1),\n    /**\n     * <pre>\n     * Include only outgoing transactions where the wallet sends funds.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_OUTGOING = 2;</code>\n     */\n    TX_DIRECTION_OUTGOING(2),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"TxDirection\");\n    }\n    /**\n     * <pre>\n     * include both incoming and outgoing transactions.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_ANY = 0;</code>\n     */\n    public static final int TX_DIRECTION_ANY_VALUE = 0;\n    /**\n     * <pre>\n     * Include only incoming transactions where the wallet receives funds.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_INCOMING = 1;</code>\n     */\n    public static final int TX_DIRECTION_INCOMING_VALUE = 1;\n    /**\n     * <pre>\n     * Include only outgoing transactions where the wallet sends funds.\n     * </pre>\n     *\n     * <code>TX_DIRECTION_OUTGOING = 2;</code>\n     */\n    public static final int TX_DIRECTION_OUTGOING_VALUE = 2;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static TxDirection valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static TxDirection forNumber(int value) {\n      switch (value) {\n        case 0: return TX_DIRECTION_ANY;\n        case 1: return TX_DIRECTION_INCOMING;\n        case 2: return TX_DIRECTION_OUTGOING;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<TxDirection>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        TxDirection> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<TxDirection>() {\n            public TxDirection findValueByNumber(int number) {\n              return TxDirection.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.getDescriptor().getEnumTypes().get(1);\n    }\n\n    private static final TxDirection[] VALUES = values();\n\n    public static TxDirection valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private TxDirection(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.TxDirection)\n  }\n\n  /**\n   * <pre>\n   * TransactionStatus defines the status of a transaction.\n   * </pre>\n   *\n   * Protobuf enum {@code pactus.TransactionStatus}\n   */\n  public enum TransactionStatus\n      implements com.google.protobuf.ProtocolMessageEnum {\n    /**\n     * <pre>\n     * Pending status for transactions in the mempool.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_PENDING = 0;</code>\n     */\n    TRANSACTION_STATUS_PENDING(0),\n    /**\n     * <pre>\n     * Confirmed status for transactions included in a block.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_CONFIRMED = 1;</code>\n     */\n    TRANSACTION_STATUS_CONFIRMED(1),\n    /**\n     * <pre>\n     * Failed status for transactions that were not successful.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_FAILED = -1;</code>\n     */\n    TRANSACTION_STATUS_FAILED(-1),\n    UNRECOGNIZED(-1),\n    ;\n\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"TransactionStatus\");\n    }\n    /**\n     * <pre>\n     * Pending status for transactions in the mempool.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_PENDING = 0;</code>\n     */\n    public static final int TRANSACTION_STATUS_PENDING_VALUE = 0;\n    /**\n     * <pre>\n     * Confirmed status for transactions included in a block.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_CONFIRMED = 1;</code>\n     */\n    public static final int TRANSACTION_STATUS_CONFIRMED_VALUE = 1;\n    /**\n     * <pre>\n     * Failed status for transactions that were not successful.\n     * </pre>\n     *\n     * <code>TRANSACTION_STATUS_FAILED = -1;</code>\n     */\n    public static final int TRANSACTION_STATUS_FAILED_VALUE = -1;\n\n\n    public final int getNumber() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalArgumentException(\n            \"Can't get the number of an unknown enum value.\");\n      }\n      return value;\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     * @deprecated Use {@link #forNumber(int)} instead.\n     */\n    @java.lang.Deprecated\n    public static TransactionStatus valueOf(int value) {\n      return forNumber(value);\n    }\n\n    /**\n     * @param value The numeric wire value of the corresponding enum entry.\n     * @return The enum associated with the given numeric wire value.\n     */\n    public static TransactionStatus forNumber(int value) {\n      switch (value) {\n        case 0: return TRANSACTION_STATUS_PENDING;\n        case 1: return TRANSACTION_STATUS_CONFIRMED;\n        case -1: return TRANSACTION_STATUS_FAILED;\n        default: return null;\n      }\n    }\n\n    public static com.google.protobuf.Internal.EnumLiteMap<TransactionStatus>\n        internalGetValueMap() {\n      return internalValueMap;\n    }\n    private static final com.google.protobuf.Internal.EnumLiteMap<\n        TransactionStatus> internalValueMap =\n          new com.google.protobuf.Internal.EnumLiteMap<TransactionStatus>() {\n            public TransactionStatus findValueByNumber(int number) {\n              return TransactionStatus.forNumber(number);\n            }\n          };\n\n    public final com.google.protobuf.Descriptors.EnumValueDescriptor\n        getValueDescriptor() {\n      if (this == UNRECOGNIZED) {\n        throw new java.lang.IllegalStateException(\n            \"Can't get the descriptor of an unrecognized enum value.\");\n      }\n      return getDescriptor().getValues().get(ordinal());\n    }\n    public final com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptorForType() {\n      return getDescriptor();\n    }\n    public static com.google.protobuf.Descriptors.EnumDescriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.getDescriptor().getEnumTypes().get(2);\n    }\n\n    private static final TransactionStatus[] VALUES = values();\n\n    public static TransactionStatus valueOf(\n        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n      if (desc.getType() != getDescriptor()) {\n        throw new java.lang.IllegalArgumentException(\n          \"EnumValueDescriptor is not for this type.\");\n      }\n      if (desc.getIndex() == -1) {\n        return UNRECOGNIZED;\n      }\n      return VALUES[desc.getIndex()];\n    }\n\n    private final int value;\n\n    private TransactionStatus(int value) {\n      this.value = value;\n    }\n\n    // @@protoc_insertion_point(enum_scope:pactus.TransactionStatus)\n  }\n\n  public interface AddressInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.AddressInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The address string.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address string.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The public key associated with the address.\n     * </pre>\n     *\n     * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key associated with the address.\n     * </pre>\n     *\n     * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n\n    /**\n     * <pre>\n     * A human-readable label associated with the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    java.lang.String getLabel();\n    /**\n     * <pre>\n     * A human-readable label associated with the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    com.google.protobuf.ByteString\n        getLabelBytes();\n\n    /**\n     * <pre>\n     * The Hierarchical Deterministic (HD) path of the address within the wallet.\n     * </pre>\n     *\n     * <code>string path = 4 [json_name = \"path\"];</code>\n     * @return The path.\n     */\n    java.lang.String getPath();\n    /**\n     * <pre>\n     * The Hierarchical Deterministic (HD) path of the address within the wallet.\n     * </pre>\n     *\n     * <code>string path = 4 [json_name = \"path\"];</code>\n     * @return The bytes for path.\n     */\n    com.google.protobuf.ByteString\n        getPathBytes();\n  }\n  /**\n   * <pre>\n   * AddressInfo contains detailed information about a wallet address.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.AddressInfo}\n   */\n  public static final class AddressInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.AddressInfo)\n      AddressInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"AddressInfo\");\n    }\n    // Use AddressInfo.newBuilder() to construct.\n    private AddressInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private AddressInfo() {\n      address_ = \"\";\n      publicKey_ = \"\";\n      label_ = \"\";\n      path_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.AddressInfo.class, pactus.WalletOuterClass.AddressInfo.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address string.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address string.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key associated with the address.\n     * </pre>\n     *\n     * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key associated with the address.\n     * </pre>\n     *\n     * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int LABEL_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object label_ = \"\";\n    /**\n     * <pre>\n     * A human-readable label associated with the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    @java.lang.Override\n    public java.lang.String getLabel() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        label_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A human-readable label associated with the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLabelBytes() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        label_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PATH_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object path_ = \"\";\n    /**\n     * <pre>\n     * The Hierarchical Deterministic (HD) path of the address within the wallet.\n     * </pre>\n     *\n     * <code>string path = 4 [json_name = \"path\"];</code>\n     * @return The path.\n     */\n    @java.lang.Override\n    public java.lang.String getPath() {\n      java.lang.Object ref = path_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        path_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The Hierarchical Deterministic (HD) path of the address within the wallet.\n     * </pre>\n     *\n     * <code>string path = 4 [json_name = \"path\"];</code>\n     * @return The bytes for path.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPathBytes() {\n      java.lang.Object ref = path_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        path_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, label_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, path_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, publicKey_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, label_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, path_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.AddressInfo)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.AddressInfo other = (pactus.WalletOuterClass.AddressInfo) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getLabel()\n          .equals(other.getLabel())) return false;\n      if (!getPath()\n          .equals(other.getPath())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (37 * hash) + LABEL_FIELD_NUMBER;\n      hash = (53 * hash) + getLabel().hashCode();\n      hash = (37 * hash) + PATH_FIELD_NUMBER;\n      hash = (53 * hash) + getPath().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.AddressInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.AddressInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.AddressInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.AddressInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * AddressInfo contains detailed information about a wallet address.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.AddressInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.AddressInfo)\n        pactus.WalletOuterClass.AddressInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.AddressInfo.class, pactus.WalletOuterClass.AddressInfo.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.AddressInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        publicKey_ = \"\";\n        label_ = \"\";\n        path_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.AddressInfo getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.AddressInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.AddressInfo build() {\n        pactus.WalletOuterClass.AddressInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.AddressInfo buildPartial() {\n        pactus.WalletOuterClass.AddressInfo result = new pactus.WalletOuterClass.AddressInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.AddressInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.label_ = label_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.path_ = path_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.AddressInfo) {\n          return mergeFrom((pactus.WalletOuterClass.AddressInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.AddressInfo other) {\n        if (other == pactus.WalletOuterClass.AddressInfo.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getLabel().isEmpty()) {\n          label_ = other.label_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getPath().isEmpty()) {\n          path_ = other.path_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                label_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                path_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address string.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address string.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address string.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address string.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address string.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key associated with the address.\n       * </pre>\n       *\n       * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the address.\n       * </pre>\n       *\n       * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key associated with the address.\n       * </pre>\n       *\n       * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the address.\n       * </pre>\n       *\n       * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key associated with the address.\n       * </pre>\n       *\n       * <code>string public_key = 2 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object label_ = \"\";\n      /**\n       * <pre>\n       * A human-readable label associated with the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The label.\n       */\n      public java.lang.String getLabel() {\n        java.lang.Object ref = label_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          label_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A human-readable label associated with the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The bytes for label.\n       */\n      public com.google.protobuf.ByteString\n          getLabelBytes() {\n        java.lang.Object ref = label_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          label_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A human-readable label associated with the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabel(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A human-readable label associated with the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLabel() {\n        label_ = getDefaultInstance().getLabel();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A human-readable label associated with the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The bytes for label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabelBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object path_ = \"\";\n      /**\n       * <pre>\n       * The Hierarchical Deterministic (HD) path of the address within the wallet.\n       * </pre>\n       *\n       * <code>string path = 4 [json_name = \"path\"];</code>\n       * @return The path.\n       */\n      public java.lang.String getPath() {\n        java.lang.Object ref = path_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          path_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The Hierarchical Deterministic (HD) path of the address within the wallet.\n       * </pre>\n       *\n       * <code>string path = 4 [json_name = \"path\"];</code>\n       * @return The bytes for path.\n       */\n      public com.google.protobuf.ByteString\n          getPathBytes() {\n        java.lang.Object ref = path_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          path_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The Hierarchical Deterministic (HD) path of the address within the wallet.\n       * </pre>\n       *\n       * <code>string path = 4 [json_name = \"path\"];</code>\n       * @param value The path to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPath(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        path_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The Hierarchical Deterministic (HD) path of the address within the wallet.\n       * </pre>\n       *\n       * <code>string path = 4 [json_name = \"path\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPath() {\n        path_ = getDefaultInstance().getPath();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The Hierarchical Deterministic (HD) path of the address within the wallet.\n       * </pre>\n       *\n       * <code>string path = 4 [json_name = \"path\"];</code>\n       * @param value The bytes for path to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPathBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        path_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.AddressInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.AddressInfo)\n    private static final pactus.WalletOuterClass.AddressInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.AddressInfo();\n    }\n\n    public static pactus.WalletOuterClass.AddressInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<AddressInfo>\n        PARSER = new com.google.protobuf.AbstractParser<AddressInfo>() {\n      @java.lang.Override\n      public AddressInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<AddressInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<AddressInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetNewAddressRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to generate a new address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to generate a new address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The type of address to generate.\n     * </pre>\n     *\n     * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n     * @return The enum numeric value on the wire for addressType.\n     */\n    int getAddressTypeValue();\n    /**\n     * <pre>\n     * The type of address to generate.\n     * </pre>\n     *\n     * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n     * @return The addressType.\n     */\n    pactus.WalletOuterClass.AddressType getAddressType();\n\n    /**\n     * <pre>\n     * A label for the new address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    java.lang.String getLabel();\n    /**\n     * <pre>\n     * A label for the new address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    com.google.protobuf.ByteString\n        getLabelBytes();\n\n    /**\n     * <pre>\n     * Password for the new address. It's required when address_type is Ed25519 type.\n     * </pre>\n     *\n     * <code>string password = 4 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Password for the new address. It's required when address_type is Ed25519 type.\n     * </pre>\n     *\n     * <code>string password = 4 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for generating a new wallet address.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNewAddressRequest}\n   */\n  public static final class GetNewAddressRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNewAddressRequest)\n      GetNewAddressRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNewAddressRequest\");\n    }\n    // Use GetNewAddressRequest.newBuilder() to construct.\n    private GetNewAddressRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNewAddressRequest() {\n      walletName_ = \"\";\n      addressType_ = 0;\n      label_ = \"\";\n      password_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetNewAddressRequest.class, pactus.WalletOuterClass.GetNewAddressRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to generate a new address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to generate a new address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_TYPE_FIELD_NUMBER = 2;\n    private int addressType_ = 0;\n    /**\n     * <pre>\n     * The type of address to generate.\n     * </pre>\n     *\n     * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n     * @return The enum numeric value on the wire for addressType.\n     */\n    @java.lang.Override public int getAddressTypeValue() {\n      return addressType_;\n    }\n    /**\n     * <pre>\n     * The type of address to generate.\n     * </pre>\n     *\n     * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n     * @return The addressType.\n     */\n    @java.lang.Override public pactus.WalletOuterClass.AddressType getAddressType() {\n      pactus.WalletOuterClass.AddressType result = pactus.WalletOuterClass.AddressType.forNumber(addressType_);\n      return result == null ? pactus.WalletOuterClass.AddressType.UNRECOGNIZED : result;\n    }\n\n    public static final int LABEL_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object label_ = \"\";\n    /**\n     * <pre>\n     * A label for the new address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    @java.lang.Override\n    public java.lang.String getLabel() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        label_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A label for the new address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLabelBytes() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        label_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Password for the new address. It's required when address_type is Ed25519 type.\n     * </pre>\n     *\n     * <code>string password = 4 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Password for the new address. It's required when address_type is Ed25519 type.\n     * </pre>\n     *\n     * <code>string password = 4 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (addressType_ != pactus.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) {\n        output.writeEnum(2, addressType_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, label_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, password_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (addressType_ != pactus.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(2, addressType_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, label_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, password_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetNewAddressRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetNewAddressRequest other = (pactus.WalletOuterClass.GetNewAddressRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (addressType_ != other.addressType_) return false;\n      if (!getLabel()\n          .equals(other.getLabel())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + ADDRESS_TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + addressType_;\n      hash = (37 * hash) + LABEL_FIELD_NUMBER;\n      hash = (53 * hash) + getLabel().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetNewAddressRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for generating a new wallet address.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNewAddressRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressRequest)\n        pactus.WalletOuterClass.GetNewAddressRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetNewAddressRequest.class, pactus.WalletOuterClass.GetNewAddressRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetNewAddressRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        addressType_ = 0;\n        label_ = \"\";\n        password_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetNewAddressRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressRequest build() {\n        pactus.WalletOuterClass.GetNewAddressRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressRequest buildPartial() {\n        pactus.WalletOuterClass.GetNewAddressRequest result = new pactus.WalletOuterClass.GetNewAddressRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetNewAddressRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.addressType_ = addressType_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.label_ = label_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.password_ = password_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetNewAddressRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetNewAddressRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetNewAddressRequest other) {\n        if (other == pactus.WalletOuterClass.GetNewAddressRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.addressType_ != 0) {\n          setAddressTypeValue(other.getAddressTypeValue());\n        }\n        if (!other.getLabel().isEmpty()) {\n          label_ = other.label_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                addressType_ = input.readEnum();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 26: {\n                label_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to generate a new address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to generate a new address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to generate a new address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to generate a new address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to generate a new address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private int addressType_ = 0;\n      /**\n       * <pre>\n       * The type of address to generate.\n       * </pre>\n       *\n       * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n       * @return The enum numeric value on the wire for addressType.\n       */\n      @java.lang.Override public int getAddressTypeValue() {\n        return addressType_;\n      }\n      /**\n       * <pre>\n       * The type of address to generate.\n       * </pre>\n       *\n       * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n       * @param value The enum numeric value on the wire for addressType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressTypeValue(int value) {\n        addressType_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of address to generate.\n       * </pre>\n       *\n       * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n       * @return The addressType.\n       */\n      @java.lang.Override\n      public pactus.WalletOuterClass.AddressType getAddressType() {\n        pactus.WalletOuterClass.AddressType result = pactus.WalletOuterClass.AddressType.forNumber(addressType_);\n        return result == null ? pactus.WalletOuterClass.AddressType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of address to generate.\n       * </pre>\n       *\n       * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n       * @param value The addressType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressType(pactus.WalletOuterClass.AddressType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000002;\n        addressType_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of address to generate.\n       * </pre>\n       *\n       * <code>.pactus.AddressType address_type = 2 [json_name = \"addressType\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddressType() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        addressType_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object label_ = \"\";\n      /**\n       * <pre>\n       * A label for the new address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The label.\n       */\n      public java.lang.String getLabel() {\n        java.lang.Object ref = label_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          label_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A label for the new address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The bytes for label.\n       */\n      public com.google.protobuf.ByteString\n          getLabelBytes() {\n        java.lang.Object ref = label_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          label_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A label for the new address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabel(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A label for the new address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLabel() {\n        label_ = getDefaultInstance().getLabel();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A label for the new address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The bytes for label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabelBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Password for the new address. It's required when address_type is Ed25519 type.\n       * </pre>\n       *\n       * <code>string password = 4 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password for the new address. It's required when address_type is Ed25519 type.\n       * </pre>\n       *\n       * <code>string password = 4 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password for the new address. It's required when address_type is Ed25519 type.\n       * </pre>\n       *\n       * <code>string password = 4 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password for the new address. It's required when address_type is Ed25519 type.\n       * </pre>\n       *\n       * <code>string password = 4 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password for the new address. It's required when address_type is Ed25519 type.\n       * </pre>\n       *\n       * <code>string password = 4 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNewAddressRequest)\n    private static final pactus.WalletOuterClass.GetNewAddressRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetNewAddressRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNewAddressRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetNewAddressRequest>() {\n      @java.lang.Override\n      public GetNewAddressRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNewAddressRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNewAddressRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetNewAddressResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet where address was generated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet where address was generated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return Whether the addr field is set.\n     */\n    boolean hasAddr();\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return The addr.\n     */\n    pactus.WalletOuterClass.AddressInfo getAddr();\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     */\n    pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains newly generated address information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetNewAddressResponse}\n   */\n  public static final class GetNewAddressResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetNewAddressResponse)\n      GetNewAddressResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetNewAddressResponse\");\n    }\n    // Use GetNewAddressResponse.newBuilder() to construct.\n    private GetNewAddressResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetNewAddressResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetNewAddressResponse.class, pactus.WalletOuterClass.GetNewAddressResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet where address was generated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet where address was generated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDR_FIELD_NUMBER = 2;\n    private pactus.WalletOuterClass.AddressInfo addr_;\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return Whether the addr field is set.\n     */\n    @java.lang.Override\n    public boolean hasAddr() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return The addr.\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfo getAddr() {\n      return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n    }\n    /**\n     * <pre>\n     * Detailed information about the new address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder() {\n      return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(2, getAddr());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, getAddr());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetNewAddressResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetNewAddressResponse other = (pactus.WalletOuterClass.GetNewAddressResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (hasAddr() != other.hasAddr()) return false;\n      if (hasAddr()) {\n        if (!getAddr()\n            .equals(other.getAddr())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      if (hasAddr()) {\n        hash = (37 * hash) + ADDR_FIELD_NUMBER;\n        hash = (53 * hash) + getAddr().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetNewAddressResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetNewAddressResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains newly generated address information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetNewAddressResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressResponse)\n        pactus.WalletOuterClass.GetNewAddressResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetNewAddressResponse.class, pactus.WalletOuterClass.GetNewAddressResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetNewAddressResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetAddrFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        addr_ = null;\n        if (addrBuilder_ != null) {\n          addrBuilder_.dispose();\n          addrBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetNewAddressResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressResponse build() {\n        pactus.WalletOuterClass.GetNewAddressResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetNewAddressResponse buildPartial() {\n        pactus.WalletOuterClass.GetNewAddressResponse result = new pactus.WalletOuterClass.GetNewAddressResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetNewAddressResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.addr_ = addrBuilder_ == null\n              ? addr_\n              : addrBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetNewAddressResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetNewAddressResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetNewAddressResponse other) {\n        if (other == pactus.WalletOuterClass.GetNewAddressResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.hasAddr()) {\n          mergeAddr(other.getAddr());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                input.readMessage(\n                    internalGetAddrFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet where address was generated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where address was generated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where address was generated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where address was generated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where address was generated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private pactus.WalletOuterClass.AddressInfo addr_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> addrBuilder_;\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       * @return Whether the addr field is set.\n       */\n      public boolean hasAddr() {\n        return ((bitField0_ & 0x00000002) != 0);\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       * @return The addr.\n       */\n      public pactus.WalletOuterClass.AddressInfo getAddr() {\n        if (addrBuilder_ == null) {\n          return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n        } else {\n          return addrBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder setAddr(pactus.WalletOuterClass.AddressInfo value) {\n        if (addrBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          addr_ = value;\n        } else {\n          addrBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder setAddr(\n          pactus.WalletOuterClass.AddressInfo.Builder builderForValue) {\n        if (addrBuilder_ == null) {\n          addr_ = builderForValue.build();\n        } else {\n          addrBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder mergeAddr(pactus.WalletOuterClass.AddressInfo value) {\n        if (addrBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0) &&\n            addr_ != null &&\n            addr_ != pactus.WalletOuterClass.AddressInfo.getDefaultInstance()) {\n            getAddrBuilder().mergeFrom(value);\n          } else {\n            addr_ = value;\n          }\n        } else {\n          addrBuilder_.mergeFrom(value);\n        }\n        if (addr_ != null) {\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder clearAddr() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        addr_ = null;\n        if (addrBuilder_ != null) {\n          addrBuilder_.dispose();\n          addrBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo.Builder getAddrBuilder() {\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return internalGetAddrFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder() {\n        if (addrBuilder_ != null) {\n          return addrBuilder_.getMessageOrBuilder();\n        } else {\n          return addr_ == null ?\n              pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the new address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> \n          internalGetAddrFieldBuilder() {\n        if (addrBuilder_ == null) {\n          addrBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder>(\n                  getAddr(),\n                  getParentForChildren(),\n                  isClean());\n          addr_ = null;\n        }\n        return addrBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetNewAddressResponse)\n    private static final pactus.WalletOuterClass.GetNewAddressResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetNewAddressResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetNewAddressResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetNewAddressResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetNewAddressResponse>() {\n      @java.lang.Override\n      public GetNewAddressResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetNewAddressResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetNewAddressResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface RestoreWalletRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name for the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name for the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    java.lang.String getMnemonic();\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    com.google.protobuf.ByteString\n        getMnemonicBytes();\n\n    /**\n     * <pre>\n     * Password to secure the restored wallet.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Password to secure the restored wallet.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for restoring a wallet from mnemonic (seed phrase).\n   * </pre>\n   *\n   * Protobuf type {@code pactus.RestoreWalletRequest}\n   */\n  public static final class RestoreWalletRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.RestoreWalletRequest)\n      RestoreWalletRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"RestoreWalletRequest\");\n    }\n    // Use RestoreWalletRequest.newBuilder() to construct.\n    private RestoreWalletRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private RestoreWalletRequest() {\n      walletName_ = \"\";\n      mnemonic_ = \"\";\n      password_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.RestoreWalletRequest.class, pactus.WalletOuterClass.RestoreWalletRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name for the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name for the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int MNEMONIC_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object mnemonic_ = \"\";\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    @java.lang.Override\n    public java.lang.String getMnemonic() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        mnemonic_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMnemonicBytes() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        mnemonic_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Password to secure the restored wallet.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Password to secure the restored wallet.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, mnemonic_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, password_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, mnemonic_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, password_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.RestoreWalletRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.RestoreWalletRequest other = (pactus.WalletOuterClass.RestoreWalletRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getMnemonic()\n          .equals(other.getMnemonic())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + MNEMONIC_FIELD_NUMBER;\n      hash = (53 * hash) + getMnemonic().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.RestoreWalletRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for restoring a wallet from mnemonic (seed phrase).\n     * </pre>\n     *\n     * Protobuf type {@code pactus.RestoreWalletRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletRequest)\n        pactus.WalletOuterClass.RestoreWalletRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.RestoreWalletRequest.class, pactus.WalletOuterClass.RestoreWalletRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.RestoreWalletRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        mnemonic_ = \"\";\n        password_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.RestoreWalletRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletRequest build() {\n        pactus.WalletOuterClass.RestoreWalletRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletRequest buildPartial() {\n        pactus.WalletOuterClass.RestoreWalletRequest result = new pactus.WalletOuterClass.RestoreWalletRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.RestoreWalletRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.mnemonic_ = mnemonic_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.password_ = password_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.RestoreWalletRequest) {\n          return mergeFrom((pactus.WalletOuterClass.RestoreWalletRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.RestoreWalletRequest other) {\n        if (other == pactus.WalletOuterClass.RestoreWalletRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getMnemonic().isEmpty()) {\n          mnemonic_ = other.mnemonic_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                mnemonic_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name for the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object mnemonic_ = \"\";\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return The mnemonic.\n       */\n      public java.lang.String getMnemonic() {\n        java.lang.Object ref = mnemonic_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          mnemonic_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return The bytes for mnemonic.\n       */\n      public com.google.protobuf.ByteString\n          getMnemonicBytes() {\n        java.lang.Object ref = mnemonic_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          mnemonic_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @param value The mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonic(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        mnemonic_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMnemonic() {\n        mnemonic_ = getDefaultInstance().getMnemonic();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @param value The bytes for mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonicBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        mnemonic_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Password to secure the restored wallet.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password to secure the restored wallet.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password to secure the restored wallet.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password to secure the restored wallet.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password to secure the restored wallet.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.RestoreWalletRequest)\n    private static final pactus.WalletOuterClass.RestoreWalletRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.RestoreWalletRequest();\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<RestoreWalletRequest>\n        PARSER = new com.google.protobuf.AbstractParser<RestoreWalletRequest>() {\n      @java.lang.Override\n      public RestoreWalletRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<RestoreWalletRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<RestoreWalletRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface RestoreWalletResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message confirming wallet restoration.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.RestoreWalletResponse}\n   */\n  public static final class RestoreWalletResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.RestoreWalletResponse)\n      RestoreWalletResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"RestoreWalletResponse\");\n    }\n    // Use RestoreWalletResponse.newBuilder() to construct.\n    private RestoreWalletResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private RestoreWalletResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.RestoreWalletResponse.class, pactus.WalletOuterClass.RestoreWalletResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the restored wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.RestoreWalletResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.RestoreWalletResponse other = (pactus.WalletOuterClass.RestoreWalletResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.RestoreWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.RestoreWalletResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message confirming wallet restoration.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.RestoreWalletResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletResponse)\n        pactus.WalletOuterClass.RestoreWalletResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.RestoreWalletResponse.class, pactus.WalletOuterClass.RestoreWalletResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.RestoreWalletResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.RestoreWalletResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletResponse build() {\n        pactus.WalletOuterClass.RestoreWalletResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.RestoreWalletResponse buildPartial() {\n        pactus.WalletOuterClass.RestoreWalletResponse result = new pactus.WalletOuterClass.RestoreWalletResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.RestoreWalletResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.RestoreWalletResponse) {\n          return mergeFrom((pactus.WalletOuterClass.RestoreWalletResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.RestoreWalletResponse other) {\n        if (other == pactus.WalletOuterClass.RestoreWalletResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the restored wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.RestoreWalletResponse)\n    private static final pactus.WalletOuterClass.RestoreWalletResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.RestoreWalletResponse();\n    }\n\n    public static pactus.WalletOuterClass.RestoreWalletResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<RestoreWalletResponse>\n        PARSER = new com.google.protobuf.AbstractParser<RestoreWalletResponse>() {\n      @java.lang.Override\n      public RestoreWalletResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<RestoreWalletResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<RestoreWalletResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CreateWalletRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CreateWalletRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Password to secure the new wallet.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Password to secure the new wallet.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for creating a new wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CreateWalletRequest}\n   */\n  public static final class CreateWalletRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CreateWalletRequest)\n      CreateWalletRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CreateWalletRequest\");\n    }\n    // Use CreateWalletRequest.newBuilder() to construct.\n    private CreateWalletRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CreateWalletRequest() {\n      walletName_ = \"\";\n      password_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.CreateWalletRequest.class, pactus.WalletOuterClass.CreateWalletRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Password to secure the new wallet.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Password to secure the new wallet.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, password_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.CreateWalletRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.CreateWalletRequest other = (pactus.WalletOuterClass.CreateWalletRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.CreateWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.CreateWalletRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for creating a new wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CreateWalletRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CreateWalletRequest)\n        pactus.WalletOuterClass.CreateWalletRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.CreateWalletRequest.class, pactus.WalletOuterClass.CreateWalletRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.CreateWalletRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        password_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.CreateWalletRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletRequest build() {\n        pactus.WalletOuterClass.CreateWalletRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletRequest buildPartial() {\n        pactus.WalletOuterClass.CreateWalletRequest result = new pactus.WalletOuterClass.CreateWalletRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.CreateWalletRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.password_ = password_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.CreateWalletRequest) {\n          return mergeFrom((pactus.WalletOuterClass.CreateWalletRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.CreateWalletRequest other) {\n        if (other == pactus.WalletOuterClass.CreateWalletRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Password to secure the new wallet.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password to secure the new wallet.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Password to secure the new wallet.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password to secure the new wallet.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Password to secure the new wallet.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CreateWalletRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CreateWalletRequest)\n    private static final pactus.WalletOuterClass.CreateWalletRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.CreateWalletRequest();\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CreateWalletRequest>\n        PARSER = new com.google.protobuf.AbstractParser<CreateWalletRequest>() {\n      @java.lang.Override\n      public CreateWalletRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CreateWalletRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CreateWalletRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface CreateWalletResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.CreateWalletResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    java.lang.String getMnemonic();\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    com.google.protobuf.ByteString\n        getMnemonicBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains wallet recovery mnemonic (seed phrase).\n   * </pre>\n   *\n   * Protobuf type {@code pactus.CreateWalletResponse}\n   */\n  public static final class CreateWalletResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.CreateWalletResponse)\n      CreateWalletResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"CreateWalletResponse\");\n    }\n    // Use CreateWalletResponse.newBuilder() to construct.\n    private CreateWalletResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private CreateWalletResponse() {\n      walletName_ = \"\";\n      mnemonic_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.CreateWalletResponse.class, pactus.WalletOuterClass.CreateWalletResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name for the new wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int MNEMONIC_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object mnemonic_ = \"\";\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    @java.lang.Override\n    public java.lang.String getMnemonic() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        mnemonic_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The mnemonic (seed phrase) for wallet recovery.\n     * </pre>\n     *\n     * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMnemonicBytes() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        mnemonic_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, mnemonic_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, mnemonic_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.CreateWalletResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.CreateWalletResponse other = (pactus.WalletOuterClass.CreateWalletResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getMnemonic()\n          .equals(other.getMnemonic())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + MNEMONIC_FIELD_NUMBER;\n      hash = (53 * hash) + getMnemonic().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.CreateWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.CreateWalletResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains wallet recovery mnemonic (seed phrase).\n     * </pre>\n     *\n     * Protobuf type {@code pactus.CreateWalletResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.CreateWalletResponse)\n        pactus.WalletOuterClass.CreateWalletResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.CreateWalletResponse.class, pactus.WalletOuterClass.CreateWalletResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.CreateWalletResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        mnemonic_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.CreateWalletResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletResponse build() {\n        pactus.WalletOuterClass.CreateWalletResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.CreateWalletResponse buildPartial() {\n        pactus.WalletOuterClass.CreateWalletResponse result = new pactus.WalletOuterClass.CreateWalletResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.CreateWalletResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.mnemonic_ = mnemonic_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.CreateWalletResponse) {\n          return mergeFrom((pactus.WalletOuterClass.CreateWalletResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.CreateWalletResponse other) {\n        if (other == pactus.WalletOuterClass.CreateWalletResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getMnemonic().isEmpty()) {\n          mnemonic_ = other.mnemonic_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                mnemonic_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name for the new wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object mnemonic_ = \"\";\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return The mnemonic.\n       */\n      public java.lang.String getMnemonic() {\n        java.lang.Object ref = mnemonic_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          mnemonic_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return The bytes for mnemonic.\n       */\n      public com.google.protobuf.ByteString\n          getMnemonicBytes() {\n        java.lang.Object ref = mnemonic_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          mnemonic_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @param value The mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonic(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        mnemonic_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMnemonic() {\n        mnemonic_ = getDefaultInstance().getMnemonic();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase) for wallet recovery.\n       * </pre>\n       *\n       * <code>string mnemonic = 2 [json_name = \"mnemonic\"];</code>\n       * @param value The bytes for mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonicBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        mnemonic_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.CreateWalletResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.CreateWalletResponse)\n    private static final pactus.WalletOuterClass.CreateWalletResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.CreateWalletResponse();\n    }\n\n    public static pactus.WalletOuterClass.CreateWalletResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<CreateWalletResponse>\n        PARSER = new com.google.protobuf.AbstractParser<CreateWalletResponse>() {\n      @java.lang.Override\n      public CreateWalletResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<CreateWalletResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<CreateWalletResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface LoadWalletRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.LoadWalletRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to load.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to load.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Request message for loading an existing wallet.\n   * Deprecated: It will be removed in a future version.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.LoadWalletRequest}\n   */\n  public static final class LoadWalletRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.LoadWalletRequest)\n      LoadWalletRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"LoadWalletRequest\");\n    }\n    // Use LoadWalletRequest.newBuilder() to construct.\n    private LoadWalletRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private LoadWalletRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.LoadWalletRequest.class, pactus.WalletOuterClass.LoadWalletRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to load.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to load.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.LoadWalletRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.LoadWalletRequest other = (pactus.WalletOuterClass.LoadWalletRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.LoadWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.LoadWalletRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for loading an existing wallet.\n     * Deprecated: It will be removed in a future version.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.LoadWalletRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.LoadWalletRequest)\n        pactus.WalletOuterClass.LoadWalletRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.LoadWalletRequest.class, pactus.WalletOuterClass.LoadWalletRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.LoadWalletRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.LoadWalletRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletRequest build() {\n        pactus.WalletOuterClass.LoadWalletRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletRequest buildPartial() {\n        pactus.WalletOuterClass.LoadWalletRequest result = new pactus.WalletOuterClass.LoadWalletRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.LoadWalletRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.LoadWalletRequest) {\n          return mergeFrom((pactus.WalletOuterClass.LoadWalletRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.LoadWalletRequest other) {\n        if (other == pactus.WalletOuterClass.LoadWalletRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to load.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to load.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to load.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to load.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to load.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.LoadWalletRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.LoadWalletRequest)\n    private static final pactus.WalletOuterClass.LoadWalletRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.LoadWalletRequest();\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<LoadWalletRequest>\n        PARSER = new com.google.protobuf.AbstractParser<LoadWalletRequest>() {\n      @java.lang.Override\n      public LoadWalletRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<LoadWalletRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<LoadWalletRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface LoadWalletResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.LoadWalletResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the loaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the loaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message confirming wallet loaded.\n   * Deprecated: It will be removed in a future version.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.LoadWalletResponse}\n   */\n  public static final class LoadWalletResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.LoadWalletResponse)\n      LoadWalletResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"LoadWalletResponse\");\n    }\n    // Use LoadWalletResponse.newBuilder() to construct.\n    private LoadWalletResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private LoadWalletResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.LoadWalletResponse.class, pactus.WalletOuterClass.LoadWalletResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the loaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the loaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.LoadWalletResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.LoadWalletResponse other = (pactus.WalletOuterClass.LoadWalletResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.LoadWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.LoadWalletResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message confirming wallet loaded.\n     * Deprecated: It will be removed in a future version.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.LoadWalletResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.LoadWalletResponse)\n        pactus.WalletOuterClass.LoadWalletResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.LoadWalletResponse.class, pactus.WalletOuterClass.LoadWalletResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.LoadWalletResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.LoadWalletResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletResponse build() {\n        pactus.WalletOuterClass.LoadWalletResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.LoadWalletResponse buildPartial() {\n        pactus.WalletOuterClass.LoadWalletResponse result = new pactus.WalletOuterClass.LoadWalletResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.LoadWalletResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.LoadWalletResponse) {\n          return mergeFrom((pactus.WalletOuterClass.LoadWalletResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.LoadWalletResponse other) {\n        if (other == pactus.WalletOuterClass.LoadWalletResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the loaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the loaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the loaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the loaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the loaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.LoadWalletResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.LoadWalletResponse)\n    private static final pactus.WalletOuterClass.LoadWalletResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.LoadWalletResponse();\n    }\n\n    public static pactus.WalletOuterClass.LoadWalletResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<LoadWalletResponse>\n        PARSER = new com.google.protobuf.AbstractParser<LoadWalletResponse>() {\n      @java.lang.Override\n      public LoadWalletResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<LoadWalletResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<LoadWalletResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface UnloadWalletRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to unload.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to unload.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Request message for unloading a wallet.\n   * Deprecated: It will be removed in a future version.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.UnloadWalletRequest}\n   */\n  public static final class UnloadWalletRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.UnloadWalletRequest)\n      UnloadWalletRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"UnloadWalletRequest\");\n    }\n    // Use UnloadWalletRequest.newBuilder() to construct.\n    private UnloadWalletRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private UnloadWalletRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.UnloadWalletRequest.class, pactus.WalletOuterClass.UnloadWalletRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to unload.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to unload.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.UnloadWalletRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.UnloadWalletRequest other = (pactus.WalletOuterClass.UnloadWalletRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.UnloadWalletRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for unloading a wallet.\n     * Deprecated: It will be removed in a future version.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.UnloadWalletRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletRequest)\n        pactus.WalletOuterClass.UnloadWalletRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.UnloadWalletRequest.class, pactus.WalletOuterClass.UnloadWalletRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.UnloadWalletRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.UnloadWalletRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletRequest build() {\n        pactus.WalletOuterClass.UnloadWalletRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletRequest buildPartial() {\n        pactus.WalletOuterClass.UnloadWalletRequest result = new pactus.WalletOuterClass.UnloadWalletRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.UnloadWalletRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.UnloadWalletRequest) {\n          return mergeFrom((pactus.WalletOuterClass.UnloadWalletRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.UnloadWalletRequest other) {\n        if (other == pactus.WalletOuterClass.UnloadWalletRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to unload.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to unload.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to unload.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to unload.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to unload.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.UnloadWalletRequest)\n    private static final pactus.WalletOuterClass.UnloadWalletRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.UnloadWalletRequest();\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<UnloadWalletRequest>\n        PARSER = new com.google.protobuf.AbstractParser<UnloadWalletRequest>() {\n      @java.lang.Override\n      public UnloadWalletRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<UnloadWalletRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<UnloadWalletRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface UnloadWalletResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the unloaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the unloaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message confirming wallet unloading.\n   * Deprecated: It will be removed in a future version.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.UnloadWalletResponse}\n   */\n  public static final class UnloadWalletResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.UnloadWalletResponse)\n      UnloadWalletResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"UnloadWalletResponse\");\n    }\n    // Use UnloadWalletResponse.newBuilder() to construct.\n    private UnloadWalletResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private UnloadWalletResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.UnloadWalletResponse.class, pactus.WalletOuterClass.UnloadWalletResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the unloaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the unloaded wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.UnloadWalletResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.UnloadWalletResponse other = (pactus.WalletOuterClass.UnloadWalletResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UnloadWalletResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.UnloadWalletResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message confirming wallet unloading.\n     * Deprecated: It will be removed in a future version.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.UnloadWalletResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletResponse)\n        pactus.WalletOuterClass.UnloadWalletResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.UnloadWalletResponse.class, pactus.WalletOuterClass.UnloadWalletResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.UnloadWalletResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.UnloadWalletResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletResponse build() {\n        pactus.WalletOuterClass.UnloadWalletResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UnloadWalletResponse buildPartial() {\n        pactus.WalletOuterClass.UnloadWalletResponse result = new pactus.WalletOuterClass.UnloadWalletResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.UnloadWalletResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.UnloadWalletResponse) {\n          return mergeFrom((pactus.WalletOuterClass.UnloadWalletResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.UnloadWalletResponse other) {\n        if (other == pactus.WalletOuterClass.UnloadWalletResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the unloaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the unloaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the unloaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the unloaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the unloaded wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.UnloadWalletResponse)\n    private static final pactus.WalletOuterClass.UnloadWalletResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.UnloadWalletResponse();\n    }\n\n    public static pactus.WalletOuterClass.UnloadWalletResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<UnloadWalletResponse>\n        PARSER = new com.google.protobuf.AbstractParser<UnloadWalletResponse>() {\n      @java.lang.Override\n      public UnloadWalletResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<UnloadWalletResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<UnloadWalletResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorAddressRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    java.lang.String getPublicKey();\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    com.google.protobuf.ByteString\n        getPublicKeyBytes();\n  }\n  /**\n   * <pre>\n   * Request message for obtaining the validator address associated with a public key.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorAddressRequest}\n   */\n  public static final class GetValidatorAddressRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressRequest)\n      GetValidatorAddressRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorAddressRequest\");\n    }\n    // Use GetValidatorAddressRequest.newBuilder() to construct.\n    private GetValidatorAddressRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorAddressRequest() {\n      publicKey_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetValidatorAddressRequest.class, pactus.WalletOuterClass.GetValidatorAddressRequest.Builder.class);\n    }\n\n    public static final int PUBLIC_KEY_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object publicKey_ = \"\";\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The publicKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPublicKey() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        publicKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The public key of the validator.\n     * </pre>\n     *\n     * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n     * @return The bytes for publicKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPublicKeyBytes() {\n      java.lang.Object ref = publicKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        publicKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, publicKey_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, publicKey_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetValidatorAddressRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetValidatorAddressRequest other = (pactus.WalletOuterClass.GetValidatorAddressRequest) obj;\n\n      if (!getPublicKey()\n          .equals(other.getPublicKey())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPublicKey().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetValidatorAddressRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for obtaining the validator address associated with a public key.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorAddressRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressRequest)\n        pactus.WalletOuterClass.GetValidatorAddressRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetValidatorAddressRequest.class, pactus.WalletOuterClass.GetValidatorAddressRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetValidatorAddressRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        publicKey_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressRequest build() {\n        pactus.WalletOuterClass.GetValidatorAddressRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressRequest buildPartial() {\n        pactus.WalletOuterClass.GetValidatorAddressRequest result = new pactus.WalletOuterClass.GetValidatorAddressRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetValidatorAddressRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.publicKey_ = publicKey_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetValidatorAddressRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetValidatorAddressRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetValidatorAddressRequest other) {\n        if (other == pactus.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance()) return this;\n        if (!other.getPublicKey().isEmpty()) {\n          publicKey_ = other.publicKey_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                publicKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object publicKey_ = \"\";\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The publicKey.\n       */\n      public java.lang.String getPublicKey() {\n        java.lang.Object ref = publicKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          publicKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return The bytes for publicKey.\n       */\n      public com.google.protobuf.ByteString\n          getPublicKeyBytes() {\n        java.lang.Object ref = publicKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          publicKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPublicKey() {\n        publicKey_ = getDefaultInstance().getPublicKey();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The public key of the validator.\n       * </pre>\n       *\n       * <code>string public_key = 1 [json_name = \"publicKey\"];</code>\n       * @param value The bytes for publicKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPublicKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        publicKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressRequest)\n    private static final pactus.WalletOuterClass.GetValidatorAddressRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetValidatorAddressRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorAddressRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorAddressRequest>() {\n      @java.lang.Override\n      public GetValidatorAddressRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorAddressRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorAddressRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetValidatorAddressResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The validator address associated with the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The validator address associated with the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Response message containing the validator address corresponding to a public key.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetValidatorAddressResponse}\n   */\n  public static final class GetValidatorAddressResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressResponse)\n      GetValidatorAddressResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetValidatorAddressResponse\");\n    }\n    // Use GetValidatorAddressResponse.newBuilder() to construct.\n    private GetValidatorAddressResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetValidatorAddressResponse() {\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetValidatorAddressResponse.class, pactus.WalletOuterClass.GetValidatorAddressResponse.Builder.class);\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The validator address associated with the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The validator address associated with the public key.\n     * </pre>\n     *\n     * <code>string address = 1 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetValidatorAddressResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetValidatorAddressResponse other = (pactus.WalletOuterClass.GetValidatorAddressResponse) obj;\n\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetValidatorAddressResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message containing the validator address corresponding to a public key.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetValidatorAddressResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressResponse)\n        pactus.WalletOuterClass.GetValidatorAddressResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetValidatorAddressResponse.class, pactus.WalletOuterClass.GetValidatorAddressResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetValidatorAddressResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressResponse build() {\n        pactus.WalletOuterClass.GetValidatorAddressResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetValidatorAddressResponse buildPartial() {\n        pactus.WalletOuterClass.GetValidatorAddressResponse result = new pactus.WalletOuterClass.GetValidatorAddressResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetValidatorAddressResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetValidatorAddressResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetValidatorAddressResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetValidatorAddressResponse other) {\n        if (other == pactus.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance()) return this;\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The validator address associated with the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The validator address associated with the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The validator address associated with the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The validator address associated with the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The validator address associated with the public key.\n       * </pre>\n       *\n       * <code>string address = 1 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressResponse)\n    private static final pactus.WalletOuterClass.GetValidatorAddressResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetValidatorAddressResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetValidatorAddressResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetValidatorAddressResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetValidatorAddressResponse>() {\n      @java.lang.Override\n      public GetValidatorAddressResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetValidatorAddressResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetValidatorAddressResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignRawTransactionRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet used for signing.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet used for signing.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The raw transaction data to be signed.\n     * </pre>\n     *\n     * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    java.lang.String getRawTransaction();\n    /**\n     * <pre>\n     * The raw transaction data to be signed.\n     * </pre>\n     *\n     * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getRawTransactionBytes();\n\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for signing a raw transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignRawTransactionRequest}\n   */\n  public static final class SignRawTransactionRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionRequest)\n      SignRawTransactionRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignRawTransactionRequest\");\n    }\n    // Use SignRawTransactionRequest.newBuilder() to construct.\n    private SignRawTransactionRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignRawTransactionRequest() {\n      walletName_ = \"\";\n      rawTransaction_ = \"\";\n      password_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SignRawTransactionRequest.class, pactus.WalletOuterClass.SignRawTransactionRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet used for signing.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet used for signing.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RAW_TRANSACTION_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object rawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The raw transaction data to be signed.\n     * </pre>\n     *\n     * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n     * @return The rawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getRawTransaction() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        rawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The raw transaction data to be signed.\n     * </pre>\n     *\n     * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n     * @return The bytes for rawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getRawTransactionBytes() {\n      java.lang.Object ref = rawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        rawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 3 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, rawTransaction_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, password_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, rawTransaction_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, password_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SignRawTransactionRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SignRawTransactionRequest other = (pactus.WalletOuterClass.SignRawTransactionRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getRawTransaction()\n          .equals(other.getRawTransaction())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getRawTransaction().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SignRawTransactionRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for signing a raw transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignRawTransactionRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionRequest)\n        pactus.WalletOuterClass.SignRawTransactionRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SignRawTransactionRequest.class, pactus.WalletOuterClass.SignRawTransactionRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SignRawTransactionRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        rawTransaction_ = \"\";\n        password_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionRequest build() {\n        pactus.WalletOuterClass.SignRawTransactionRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionRequest buildPartial() {\n        pactus.WalletOuterClass.SignRawTransactionRequest result = new pactus.WalletOuterClass.SignRawTransactionRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SignRawTransactionRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.rawTransaction_ = rawTransaction_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.password_ = password_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SignRawTransactionRequest) {\n          return mergeFrom((pactus.WalletOuterClass.SignRawTransactionRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SignRawTransactionRequest other) {\n        if (other == pactus.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getRawTransaction().isEmpty()) {\n          rawTransaction_ = other.rawTransaction_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                rawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet used for signing.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet used for signing.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet used for signing.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet used for signing.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet used for signing.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object rawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The raw transaction data to be signed.\n       * </pre>\n       *\n       * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n       * @return The rawTransaction.\n       */\n      public java.lang.String getRawTransaction() {\n        java.lang.Object ref = rawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          rawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be signed.\n       * </pre>\n       *\n       * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n       * @return The bytes for rawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getRawTransactionBytes() {\n        java.lang.Object ref = rawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          rawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be signed.\n       * </pre>\n       *\n       * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n       * @param value The rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be signed.\n       * </pre>\n       *\n       * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearRawTransaction() {\n        rawTransaction_ = getDefaultInstance().getRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data to be signed.\n       * </pre>\n       *\n       * <code>string raw_transaction = 2 [json_name = \"rawTransaction\"];</code>\n       * @param value The bytes for rawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        rawTransaction_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 3 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionRequest)\n    private static final pactus.WalletOuterClass.SignRawTransactionRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SignRawTransactionRequest();\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignRawTransactionRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SignRawTransactionRequest>() {\n      @java.lang.Override\n      public SignRawTransactionRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignRawTransactionRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignRawTransactionRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignRawTransactionResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The ID of the signed transaction.\n     * </pre>\n     *\n     * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n     * @return The transactionId.\n     */\n    java.lang.String getTransactionId();\n    /**\n     * <pre>\n     * The ID of the signed transaction.\n     * </pre>\n     *\n     * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n     * @return The bytes for transactionId.\n     */\n    com.google.protobuf.ByteString\n        getTransactionIdBytes();\n\n    /**\n     * <pre>\n     * The signed raw transaction data.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n     * @return The signedRawTransaction.\n     */\n    java.lang.String getSignedRawTransaction();\n    /**\n     * <pre>\n     * The signed raw transaction data.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n     * @return The bytes for signedRawTransaction.\n     */\n    com.google.protobuf.ByteString\n        getSignedRawTransactionBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains the transaction ID and signed raw transaction.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignRawTransactionResponse}\n   */\n  public static final class SignRawTransactionResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionResponse)\n      SignRawTransactionResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignRawTransactionResponse\");\n    }\n    // Use SignRawTransactionResponse.newBuilder() to construct.\n    private SignRawTransactionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignRawTransactionResponse() {\n      transactionId_ = \"\";\n      signedRawTransaction_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SignRawTransactionResponse.class, pactus.WalletOuterClass.SignRawTransactionResponse.Builder.class);\n    }\n\n    public static final int TRANSACTION_ID_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object transactionId_ = \"\";\n    /**\n     * <pre>\n     * The ID of the signed transaction.\n     * </pre>\n     *\n     * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n     * @return The transactionId.\n     */\n    @java.lang.Override\n    public java.lang.String getTransactionId() {\n      java.lang.Object ref = transactionId_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        transactionId_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The ID of the signed transaction.\n     * </pre>\n     *\n     * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n     * @return The bytes for transactionId.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getTransactionIdBytes() {\n      java.lang.Object ref = transactionId_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        transactionId_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signedRawTransaction_ = \"\";\n    /**\n     * <pre>\n     * The signed raw transaction data.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n     * @return The signedRawTransaction.\n     */\n    @java.lang.Override\n    public java.lang.String getSignedRawTransaction() {\n      java.lang.Object ref = signedRawTransaction_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signedRawTransaction_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signed raw transaction data.\n     * </pre>\n     *\n     * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n     * @return The bytes for signedRawTransaction.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignedRawTransactionBytes() {\n      java.lang.Object ref = signedRawTransaction_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signedRawTransaction_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, transactionId_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRawTransaction_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, signedRawTransaction_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, transactionId_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRawTransaction_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, signedRawTransaction_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SignRawTransactionResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SignRawTransactionResponse other = (pactus.WalletOuterClass.SignRawTransactionResponse) obj;\n\n      if (!getTransactionId()\n          .equals(other.getTransactionId())) return false;\n      if (!getSignedRawTransaction()\n          .equals(other.getSignedRawTransaction())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER;\n      hash = (53 * hash) + getTransactionId().hashCode();\n      hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER;\n      hash = (53 * hash) + getSignedRawTransaction().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignRawTransactionResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SignRawTransactionResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the transaction ID and signed raw transaction.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignRawTransactionResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionResponse)\n        pactus.WalletOuterClass.SignRawTransactionResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SignRawTransactionResponse.class, pactus.WalletOuterClass.SignRawTransactionResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SignRawTransactionResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        transactionId_ = \"\";\n        signedRawTransaction_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionResponse build() {\n        pactus.WalletOuterClass.SignRawTransactionResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignRawTransactionResponse buildPartial() {\n        pactus.WalletOuterClass.SignRawTransactionResponse result = new pactus.WalletOuterClass.SignRawTransactionResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SignRawTransactionResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.transactionId_ = transactionId_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.signedRawTransaction_ = signedRawTransaction_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SignRawTransactionResponse) {\n          return mergeFrom((pactus.WalletOuterClass.SignRawTransactionResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SignRawTransactionResponse other) {\n        if (other == pactus.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance()) return this;\n        if (!other.getTransactionId().isEmpty()) {\n          transactionId_ = other.transactionId_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getSignedRawTransaction().isEmpty()) {\n          signedRawTransaction_ = other.signedRawTransaction_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                transactionId_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                signedRawTransaction_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object transactionId_ = \"\";\n      /**\n       * <pre>\n       * The ID of the signed transaction.\n       * </pre>\n       *\n       * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n       * @return The transactionId.\n       */\n      public java.lang.String getTransactionId() {\n        java.lang.Object ref = transactionId_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          transactionId_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The ID of the signed transaction.\n       * </pre>\n       *\n       * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n       * @return The bytes for transactionId.\n       */\n      public com.google.protobuf.ByteString\n          getTransactionIdBytes() {\n        java.lang.Object ref = transactionId_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          transactionId_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The ID of the signed transaction.\n       * </pre>\n       *\n       * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n       * @param value The transactionId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTransactionId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        transactionId_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The ID of the signed transaction.\n       * </pre>\n       *\n       * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTransactionId() {\n        transactionId_ = getDefaultInstance().getTransactionId();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The ID of the signed transaction.\n       * </pre>\n       *\n       * <code>string transaction_id = 1 [json_name = \"transactionId\"];</code>\n       * @param value The bytes for transactionId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTransactionIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        transactionId_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object signedRawTransaction_ = \"\";\n      /**\n       * <pre>\n       * The signed raw transaction data.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n       * @return The signedRawTransaction.\n       */\n      public java.lang.String getSignedRawTransaction() {\n        java.lang.Object ref = signedRawTransaction_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signedRawTransaction_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n       * @return The bytes for signedRawTransaction.\n       */\n      public com.google.protobuf.ByteString\n          getSignedRawTransactionBytes() {\n        java.lang.Object ref = signedRawTransaction_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signedRawTransaction_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n       * @param value The signedRawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignedRawTransaction(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signedRawTransaction_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignedRawTransaction() {\n        signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signed raw transaction data.\n       * </pre>\n       *\n       * <code>string signed_raw_transaction = 2 [json_name = \"signedRawTransaction\"];</code>\n       * @param value The bytes for signedRawTransaction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignedRawTransactionBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signedRawTransaction_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionResponse)\n    private static final pactus.WalletOuterClass.SignRawTransactionResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SignRawTransactionResponse();\n    }\n\n    public static pactus.WalletOuterClass.SignRawTransactionResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignRawTransactionResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SignRawTransactionResponse>() {\n      @java.lang.Override\n      public SignRawTransactionResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignRawTransactionResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignRawTransactionResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTotalBalanceRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to get the total balance.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to get the total balance.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Request message for obtaining the total available balance of a wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTotalBalanceRequest}\n   */\n  public static final class GetTotalBalanceRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceRequest)\n      GetTotalBalanceRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTotalBalanceRequest\");\n    }\n    // Use GetTotalBalanceRequest.newBuilder() to construct.\n    private GetTotalBalanceRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTotalBalanceRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetTotalBalanceRequest.class, pactus.WalletOuterClass.GetTotalBalanceRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to get the total balance.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to get the total balance.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetTotalBalanceRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetTotalBalanceRequest other = (pactus.WalletOuterClass.GetTotalBalanceRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetTotalBalanceRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for obtaining the total available balance of a wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTotalBalanceRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceRequest)\n        pactus.WalletOuterClass.GetTotalBalanceRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetTotalBalanceRequest.class, pactus.WalletOuterClass.GetTotalBalanceRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetTotalBalanceRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceRequest build() {\n        pactus.WalletOuterClass.GetTotalBalanceRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceRequest buildPartial() {\n        pactus.WalletOuterClass.GetTotalBalanceRequest result = new pactus.WalletOuterClass.GetTotalBalanceRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetTotalBalanceRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetTotalBalanceRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetTotalBalanceRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetTotalBalanceRequest other) {\n        if (other == pactus.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to get the total balance.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total balance.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total balance.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total balance.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total balance.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceRequest)\n    private static final pactus.WalletOuterClass.GetTotalBalanceRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetTotalBalanceRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTotalBalanceRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetTotalBalanceRequest>() {\n      @java.lang.Override\n      public GetTotalBalanceRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTotalBalanceRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTotalBalanceRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTotalBalanceResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The total balance of the wallet in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_balance = 2 [json_name = \"totalBalance\"];</code>\n     * @return The totalBalance.\n     */\n    long getTotalBalance();\n  }\n  /**\n   * <pre>\n   * Response message contains the total available balance of the wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTotalBalanceResponse}\n   */\n  public static final class GetTotalBalanceResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceResponse)\n      GetTotalBalanceResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTotalBalanceResponse\");\n    }\n    // Use GetTotalBalanceResponse.newBuilder() to construct.\n    private GetTotalBalanceResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTotalBalanceResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetTotalBalanceResponse.class, pactus.WalletOuterClass.GetTotalBalanceResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int TOTAL_BALANCE_FIELD_NUMBER = 2;\n    private long totalBalance_ = 0L;\n    /**\n     * <pre>\n     * The total balance of the wallet in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_balance = 2 [json_name = \"totalBalance\"];</code>\n     * @return The totalBalance.\n     */\n    @java.lang.Override\n    public long getTotalBalance() {\n      return totalBalance_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (totalBalance_ != 0L) {\n        output.writeInt64(2, totalBalance_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (totalBalance_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, totalBalance_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetTotalBalanceResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetTotalBalanceResponse other = (pactus.WalletOuterClass.GetTotalBalanceResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (getTotalBalance()\n          != other.getTotalBalance()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + TOTAL_BALANCE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getTotalBalance());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetTotalBalanceResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the total available balance of the wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTotalBalanceResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceResponse)\n        pactus.WalletOuterClass.GetTotalBalanceResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetTotalBalanceResponse.class, pactus.WalletOuterClass.GetTotalBalanceResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetTotalBalanceResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        totalBalance_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceResponse build() {\n        pactus.WalletOuterClass.GetTotalBalanceResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalBalanceResponse buildPartial() {\n        pactus.WalletOuterClass.GetTotalBalanceResponse result = new pactus.WalletOuterClass.GetTotalBalanceResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetTotalBalanceResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.totalBalance_ = totalBalance_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetTotalBalanceResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetTotalBalanceResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetTotalBalanceResponse other) {\n        if (other == pactus.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getTotalBalance() != 0L) {\n          setTotalBalance(other.getTotalBalance());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                totalBalance_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private long totalBalance_ ;\n      /**\n       * <pre>\n       * The total balance of the wallet in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_balance = 2 [json_name = \"totalBalance\"];</code>\n       * @return The totalBalance.\n       */\n      @java.lang.Override\n      public long getTotalBalance() {\n        return totalBalance_;\n      }\n      /**\n       * <pre>\n       * The total balance of the wallet in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_balance = 2 [json_name = \"totalBalance\"];</code>\n       * @param value The totalBalance to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalBalance(long value) {\n\n        totalBalance_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total balance of the wallet in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_balance = 2 [json_name = \"totalBalance\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalBalance() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        totalBalance_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceResponse)\n    private static final pactus.WalletOuterClass.GetTotalBalanceResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetTotalBalanceResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetTotalBalanceResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTotalBalanceResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetTotalBalanceResponse>() {\n      @java.lang.Override\n      public GetTotalBalanceResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTotalBalanceResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTotalBalanceResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignMessageRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignMessageRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to sign with.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to sign with.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n\n    /**\n     * <pre>\n     * The address whose private key should be used for signing the message.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address whose private key should be used for signing the message.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The arbitrary message to be signed.\n     * </pre>\n     *\n     * <code>string message = 4 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    java.lang.String getMessage();\n    /**\n     * <pre>\n     * The arbitrary message to be signed.\n     * </pre>\n     *\n     * <code>string message = 4 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    com.google.protobuf.ByteString\n        getMessageBytes();\n  }\n  /**\n   * <pre>\n   * Request message to sign an arbitrary message.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignMessageRequest}\n   */\n  public static final class SignMessageRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignMessageRequest)\n      SignMessageRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignMessageRequest\");\n    }\n    // Use SignMessageRequest.newBuilder() to construct.\n    private SignMessageRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignMessageRequest() {\n      walletName_ = \"\";\n      password_ = \"\";\n      address_ = \"\";\n      message_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SignMessageRequest.class, pactus.WalletOuterClass.SignMessageRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to sign with.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to sign with.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Wallet password required for signing.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address whose private key should be used for signing the message.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address whose private key should be used for signing the message.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int MESSAGE_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object message_ = \"\";\n    /**\n     * <pre>\n     * The arbitrary message to be signed.\n     * </pre>\n     *\n     * <code>string message = 4 [json_name = \"message\"];</code>\n     * @return The message.\n     */\n    @java.lang.Override\n    public java.lang.String getMessage() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        message_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The arbitrary message to be signed.\n     * </pre>\n     *\n     * <code>string message = 4 [json_name = \"message\"];</code>\n     * @return The bytes for message.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMessageBytes() {\n      java.lang.Object ref = message_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        message_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, message_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, message_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SignMessageRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SignMessageRequest other = (pactus.WalletOuterClass.SignMessageRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getMessage()\n          .equals(other.getMessage())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + MESSAGE_FIELD_NUMBER;\n      hash = (53 * hash) + getMessage().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SignMessageRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SignMessageRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignMessageRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SignMessageRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message to sign an arbitrary message.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignMessageRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignMessageRequest)\n        pactus.WalletOuterClass.SignMessageRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SignMessageRequest.class, pactus.WalletOuterClass.SignMessageRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SignMessageRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        password_ = \"\";\n        address_ = \"\";\n        message_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SignMessageRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageRequest build() {\n        pactus.WalletOuterClass.SignMessageRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageRequest buildPartial() {\n        pactus.WalletOuterClass.SignMessageRequest result = new pactus.WalletOuterClass.SignMessageRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SignMessageRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.password_ = password_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.message_ = message_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SignMessageRequest) {\n          return mergeFrom((pactus.WalletOuterClass.SignMessageRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SignMessageRequest other) {\n        if (other == pactus.WalletOuterClass.SignMessageRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getMessage().isEmpty()) {\n          message_ = other.message_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                message_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to sign with.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to sign with.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to sign with.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to sign with.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to sign with.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for signing.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address whose private key should be used for signing the message.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address whose private key should be used for signing the message.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address whose private key should be used for signing the message.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address whose private key should be used for signing the message.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address whose private key should be used for signing the message.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object message_ = \"\";\n      /**\n       * <pre>\n       * The arbitrary message to be signed.\n       * </pre>\n       *\n       * <code>string message = 4 [json_name = \"message\"];</code>\n       * @return The message.\n       */\n      public java.lang.String getMessage() {\n        java.lang.Object ref = message_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          message_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The arbitrary message to be signed.\n       * </pre>\n       *\n       * <code>string message = 4 [json_name = \"message\"];</code>\n       * @return The bytes for message.\n       */\n      public com.google.protobuf.ByteString\n          getMessageBytes() {\n        java.lang.Object ref = message_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          message_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The arbitrary message to be signed.\n       * </pre>\n       *\n       * <code>string message = 4 [json_name = \"message\"];</code>\n       * @param value The message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessage(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        message_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The arbitrary message to be signed.\n       * </pre>\n       *\n       * <code>string message = 4 [json_name = \"message\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMessage() {\n        message_ = getDefaultInstance().getMessage();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The arbitrary message to be signed.\n       * </pre>\n       *\n       * <code>string message = 4 [json_name = \"message\"];</code>\n       * @param value The bytes for message to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMessageBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        message_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignMessageRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignMessageRequest)\n    private static final pactus.WalletOuterClass.SignMessageRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SignMessageRequest();\n    }\n\n    public static pactus.WalletOuterClass.SignMessageRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignMessageRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SignMessageRequest>() {\n      @java.lang.Override\n      public SignMessageRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignMessageRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignMessageRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SignMessageResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SignMessageResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    java.lang.String getSignature();\n    /**\n     * <pre>\n     * The signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    com.google.protobuf.ByteString\n        getSignatureBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains message signature.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SignMessageResponse}\n   */\n  public static final class SignMessageResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SignMessageResponse)\n      SignMessageResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SignMessageResponse\");\n    }\n    // Use SignMessageResponse.newBuilder() to construct.\n    private SignMessageResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SignMessageResponse() {\n      signature_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SignMessageResponse.class, pactus.WalletOuterClass.SignMessageResponse.Builder.class);\n    }\n\n    public static final int SIGNATURE_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object signature_ = \"\";\n    /**\n     * <pre>\n     * The signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The signature.\n     */\n    @java.lang.Override\n    public java.lang.String getSignature() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        signature_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The signature in hexadecimal format.\n     * </pre>\n     *\n     * <code>string signature = 1 [json_name = \"signature\"];</code>\n     * @return The bytes for signature.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSignatureBytes() {\n      java.lang.Object ref = signature_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        signature_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, signature_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signature_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SignMessageResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SignMessageResponse other = (pactus.WalletOuterClass.SignMessageResponse) obj;\n\n      if (!getSignature()\n          .equals(other.getSignature())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;\n      hash = (53 * hash) + getSignature().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SignMessageResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SignMessageResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SignMessageResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SignMessageResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains message signature.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SignMessageResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SignMessageResponse)\n        pactus.WalletOuterClass.SignMessageResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SignMessageResponse.class, pactus.WalletOuterClass.SignMessageResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SignMessageResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        signature_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SignMessageResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageResponse build() {\n        pactus.WalletOuterClass.SignMessageResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SignMessageResponse buildPartial() {\n        pactus.WalletOuterClass.SignMessageResponse result = new pactus.WalletOuterClass.SignMessageResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SignMessageResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.signature_ = signature_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SignMessageResponse) {\n          return mergeFrom((pactus.WalletOuterClass.SignMessageResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SignMessageResponse other) {\n        if (other == pactus.WalletOuterClass.SignMessageResponse.getDefaultInstance()) return this;\n        if (!other.getSignature().isEmpty()) {\n          signature_ = other.signature_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                signature_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object signature_ = \"\";\n      /**\n       * <pre>\n       * The signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The signature.\n       */\n      public java.lang.String getSignature() {\n        java.lang.Object ref = signature_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          signature_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return The bytes for signature.\n       */\n      public com.google.protobuf.ByteString\n          getSignatureBytes() {\n        java.lang.Object ref = signature_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          signature_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignature(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSignature() {\n        signature_ = getDefaultInstance().getSignature();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The signature in hexadecimal format.\n       * </pre>\n       *\n       * <code>string signature = 1 [json_name = \"signature\"];</code>\n       * @param value The bytes for signature to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSignatureBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        signature_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SignMessageResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SignMessageResponse)\n    private static final pactus.WalletOuterClass.SignMessageResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SignMessageResponse();\n    }\n\n    public static pactus.WalletOuterClass.SignMessageResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SignMessageResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SignMessageResponse>() {\n      @java.lang.Override\n      public SignMessageResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SignMessageResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SignMessageResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTotalStakeRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTotalStakeRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to get the total stake.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to get the total stake.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Request message for obtaining the total stake of a wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTotalStakeRequest}\n   */\n  public static final class GetTotalStakeRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTotalStakeRequest)\n      GetTotalStakeRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTotalStakeRequest\");\n    }\n    // Use GetTotalStakeRequest.newBuilder() to construct.\n    private GetTotalStakeRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTotalStakeRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetTotalStakeRequest.class, pactus.WalletOuterClass.GetTotalStakeRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to get the total stake.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to get the total stake.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetTotalStakeRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetTotalStakeRequest other = (pactus.WalletOuterClass.GetTotalStakeRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetTotalStakeRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for obtaining the total stake of a wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTotalStakeRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTotalStakeRequest)\n        pactus.WalletOuterClass.GetTotalStakeRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetTotalStakeRequest.class, pactus.WalletOuterClass.GetTotalStakeRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetTotalStakeRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetTotalStakeRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeRequest build() {\n        pactus.WalletOuterClass.GetTotalStakeRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeRequest buildPartial() {\n        pactus.WalletOuterClass.GetTotalStakeRequest result = new pactus.WalletOuterClass.GetTotalStakeRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetTotalStakeRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetTotalStakeRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetTotalStakeRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetTotalStakeRequest other) {\n        if (other == pactus.WalletOuterClass.GetTotalStakeRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to get the total stake.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total stake.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total stake.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total stake.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the total stake.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTotalStakeRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTotalStakeRequest)\n    private static final pactus.WalletOuterClass.GetTotalStakeRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetTotalStakeRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTotalStakeRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetTotalStakeRequest>() {\n      @java.lang.Override\n      public GetTotalStakeRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTotalStakeRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTotalStakeRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetTotalStakeRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetTotalStakeResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetTotalStakeResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The total stake amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_stake = 2 [json_name = \"totalStake\"];</code>\n     * @return The totalStake.\n     */\n    long getTotalStake();\n  }\n  /**\n   * <pre>\n   * Response message contains the total stake of the wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetTotalStakeResponse}\n   */\n  public static final class GetTotalStakeResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetTotalStakeResponse)\n      GetTotalStakeResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetTotalStakeResponse\");\n    }\n    // Use GetTotalStakeResponse.newBuilder() to construct.\n    private GetTotalStakeResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetTotalStakeResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetTotalStakeResponse.class, pactus.WalletOuterClass.GetTotalStakeResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int TOTAL_STAKE_FIELD_NUMBER = 2;\n    private long totalStake_ = 0L;\n    /**\n     * <pre>\n     * The total stake amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 total_stake = 2 [json_name = \"totalStake\"];</code>\n     * @return The totalStake.\n     */\n    @java.lang.Override\n    public long getTotalStake() {\n      return totalStake_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (totalStake_ != 0L) {\n        output.writeInt64(2, totalStake_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (totalStake_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, totalStake_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetTotalStakeResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetTotalStakeResponse other = (pactus.WalletOuterClass.GetTotalStakeResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (getTotalStake()\n          != other.getTotalStake()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + TOTAL_STAKE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getTotalStake());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetTotalStakeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetTotalStakeResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains the total stake of the wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetTotalStakeResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetTotalStakeResponse)\n        pactus.WalletOuterClass.GetTotalStakeResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetTotalStakeResponse.class, pactus.WalletOuterClass.GetTotalStakeResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetTotalStakeResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        totalStake_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetTotalStakeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetTotalStakeResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeResponse build() {\n        pactus.WalletOuterClass.GetTotalStakeResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetTotalStakeResponse buildPartial() {\n        pactus.WalletOuterClass.GetTotalStakeResponse result = new pactus.WalletOuterClass.GetTotalStakeResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetTotalStakeResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.totalStake_ = totalStake_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetTotalStakeResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetTotalStakeResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetTotalStakeResponse other) {\n        if (other == pactus.WalletOuterClass.GetTotalStakeResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getTotalStake() != 0L) {\n          setTotalStake(other.getTotalStake());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                totalStake_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private long totalStake_ ;\n      /**\n       * <pre>\n       * The total stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_stake = 2 [json_name = \"totalStake\"];</code>\n       * @return The totalStake.\n       */\n      @java.lang.Override\n      public long getTotalStake() {\n        return totalStake_;\n      }\n      /**\n       * <pre>\n       * The total stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_stake = 2 [json_name = \"totalStake\"];</code>\n       * @param value The totalStake to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTotalStake(long value) {\n\n        totalStake_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The total stake amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 total_stake = 2 [json_name = \"totalStake\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTotalStake() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        totalStake_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetTotalStakeResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetTotalStakeResponse)\n    private static final pactus.WalletOuterClass.GetTotalStakeResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetTotalStakeResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetTotalStakeResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetTotalStakeResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetTotalStakeResponse>() {\n      @java.lang.Override\n      public GetTotalStakeResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetTotalStakeResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetTotalStakeResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetTotalStakeResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetAddressInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetAddressInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The address to query.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address to query.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Request message for getting address information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetAddressInfoRequest}\n   */\n  public static final class GetAddressInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetAddressInfoRequest)\n      GetAddressInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetAddressInfoRequest\");\n    }\n    // Use GetAddressInfoRequest.newBuilder() to construct.\n    private GetAddressInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetAddressInfoRequest() {\n      walletName_ = \"\";\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetAddressInfoRequest.class, pactus.WalletOuterClass.GetAddressInfoRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address to query.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address to query.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetAddressInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetAddressInfoRequest other = (pactus.WalletOuterClass.GetAddressInfoRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetAddressInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for getting address information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetAddressInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetAddressInfoRequest)\n        pactus.WalletOuterClass.GetAddressInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetAddressInfoRequest.class, pactus.WalletOuterClass.GetAddressInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetAddressInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetAddressInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoRequest build() {\n        pactus.WalletOuterClass.GetAddressInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoRequest buildPartial() {\n        pactus.WalletOuterClass.GetAddressInfoRequest result = new pactus.WalletOuterClass.GetAddressInfoRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetAddressInfoRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetAddressInfoRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetAddressInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetAddressInfoRequest other) {\n        if (other == pactus.WalletOuterClass.GetAddressInfoRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address to query.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to query.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to query.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to query.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to query.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetAddressInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetAddressInfoRequest)\n    private static final pactus.WalletOuterClass.GetAddressInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetAddressInfoRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetAddressInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetAddressInfoRequest>() {\n      @java.lang.Override\n      public GetAddressInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetAddressInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetAddressInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetAddressInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetAddressInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetAddressInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return Whether the addr field is set.\n     */\n    boolean hasAddr();\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return The addr.\n     */\n    pactus.WalletOuterClass.AddressInfo getAddr();\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     */\n    pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder();\n  }\n  /**\n   * <pre>\n   * Response message contains address details.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetAddressInfoResponse}\n   */\n  public static final class GetAddressInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetAddressInfoResponse)\n      GetAddressInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetAddressInfoResponse\");\n    }\n    // Use GetAddressInfoResponse.newBuilder() to construct.\n    private GetAddressInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetAddressInfoResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetAddressInfoResponse.class, pactus.WalletOuterClass.GetAddressInfoResponse.Builder.class);\n    }\n\n    private int bitField0_;\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDR_FIELD_NUMBER = 2;\n    private pactus.WalletOuterClass.AddressInfo addr_;\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return Whether the addr field is set.\n     */\n    @java.lang.Override\n    public boolean hasAddr() {\n      return ((bitField0_ & 0x00000001) != 0);\n    }\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     * @return The addr.\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfo getAddr() {\n      return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n    }\n    /**\n     * <pre>\n     * Detailed information about the address.\n     * </pre>\n     *\n     * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder() {\n      return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        output.writeMessage(2, getAddr());\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (((bitField0_ & 0x00000001) != 0)) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, getAddr());\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetAddressInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetAddressInfoResponse other = (pactus.WalletOuterClass.GetAddressInfoResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (hasAddr() != other.hasAddr()) return false;\n      if (hasAddr()) {\n        if (!getAddr()\n            .equals(other.getAddr())) return false;\n      }\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      if (hasAddr()) {\n        hash = (37 * hash) + ADDR_FIELD_NUMBER;\n        hash = (53 * hash) + getAddr().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetAddressInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetAddressInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains address details.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetAddressInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetAddressInfoResponse)\n        pactus.WalletOuterClass.GetAddressInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetAddressInfoResponse.class, pactus.WalletOuterClass.GetAddressInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetAddressInfoResponse.newBuilder()\n      private Builder() {\n        maybeForceBuilderInitialization();\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n        maybeForceBuilderInitialization();\n      }\n      private void maybeForceBuilderInitialization() {\n        if (com.google.protobuf.GeneratedMessage\n                .alwaysUseFieldBuilders) {\n          internalGetAddrFieldBuilder();\n        }\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        addr_ = null;\n        if (addrBuilder_ != null) {\n          addrBuilder_.dispose();\n          addrBuilder_ = null;\n        }\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetAddressInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetAddressInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoResponse build() {\n        pactus.WalletOuterClass.GetAddressInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetAddressInfoResponse buildPartial() {\n        pactus.WalletOuterClass.GetAddressInfoResponse result = new pactus.WalletOuterClass.GetAddressInfoResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetAddressInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        int to_bitField0_ = 0;\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.addr_ = addrBuilder_ == null\n              ? addr_\n              : addrBuilder_.build();\n          to_bitField0_ |= 0x00000001;\n        }\n        result.bitField0_ |= to_bitField0_;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetAddressInfoResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetAddressInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetAddressInfoResponse other) {\n        if (other == pactus.WalletOuterClass.GetAddressInfoResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.hasAddr()) {\n          mergeAddr(other.getAddr());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                input.readMessage(\n                    internalGetAddrFieldBuilder().getBuilder(),\n                    extensionRegistry);\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private pactus.WalletOuterClass.AddressInfo addr_;\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> addrBuilder_;\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       * @return Whether the addr field is set.\n       */\n      public boolean hasAddr() {\n        return ((bitField0_ & 0x00000002) != 0);\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       * @return The addr.\n       */\n      public pactus.WalletOuterClass.AddressInfo getAddr() {\n        if (addrBuilder_ == null) {\n          return addr_ == null ? pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n        } else {\n          return addrBuilder_.getMessage();\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder setAddr(pactus.WalletOuterClass.AddressInfo value) {\n        if (addrBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          addr_ = value;\n        } else {\n          addrBuilder_.setMessage(value);\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder setAddr(\n          pactus.WalletOuterClass.AddressInfo.Builder builderForValue) {\n        if (addrBuilder_ == null) {\n          addr_ = builderForValue.build();\n        } else {\n          addrBuilder_.setMessage(builderForValue.build());\n        }\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder mergeAddr(pactus.WalletOuterClass.AddressInfo value) {\n        if (addrBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0) &&\n            addr_ != null &&\n            addr_ != pactus.WalletOuterClass.AddressInfo.getDefaultInstance()) {\n            getAddrBuilder().mergeFrom(value);\n          } else {\n            addr_ = value;\n          }\n        } else {\n          addrBuilder_.mergeFrom(value);\n        }\n        if (addr_ != null) {\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public Builder clearAddr() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        addr_ = null;\n        if (addrBuilder_ != null) {\n          addrBuilder_.dispose();\n          addrBuilder_ = null;\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo.Builder getAddrBuilder() {\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return internalGetAddrFieldBuilder().getBuilder();\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrOrBuilder() {\n        if (addrBuilder_ != null) {\n          return addrBuilder_.getMessageOrBuilder();\n        } else {\n          return addr_ == null ?\n              pactus.WalletOuterClass.AddressInfo.getDefaultInstance() : addr_;\n        }\n      }\n      /**\n       * <pre>\n       * Detailed information about the address.\n       * </pre>\n       *\n       * <code>.pactus.AddressInfo addr = 2 [json_name = \"addr\"];</code>\n       */\n      private com.google.protobuf.SingleFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> \n          internalGetAddrFieldBuilder() {\n        if (addrBuilder_ == null) {\n          addrBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n              pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder>(\n                  getAddr(),\n                  getParentForChildren(),\n                  isClean());\n          addr_ = null;\n        }\n        return addrBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetAddressInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetAddressInfoResponse)\n    private static final pactus.WalletOuterClass.GetAddressInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetAddressInfoResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetAddressInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetAddressInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetAddressInfoResponse>() {\n      @java.lang.Override\n      public GetAddressInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetAddressInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetAddressInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetAddressInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SetAddressLabelRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SetAddressLabelRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Wallet password required for modification.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Wallet password required for modification.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n\n    /**\n     * <pre>\n     * The address to label.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address to label.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 4 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    java.lang.String getLabel();\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 4 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    com.google.protobuf.ByteString\n        getLabelBytes();\n  }\n  /**\n   * <pre>\n   * Request message for setting address label.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SetAddressLabelRequest}\n   */\n  public static final class SetAddressLabelRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SetAddressLabelRequest)\n      SetAddressLabelRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SetAddressLabelRequest\");\n    }\n    // Use SetAddressLabelRequest.newBuilder() to construct.\n    private SetAddressLabelRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SetAddressLabelRequest() {\n      walletName_ = \"\";\n      password_ = \"\";\n      address_ = \"\";\n      label_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SetAddressLabelRequest.class, pactus.WalletOuterClass.SetAddressLabelRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Wallet password required for modification.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Wallet password required for modification.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address to label.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address to label.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int LABEL_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object label_ = \"\";\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 4 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    @java.lang.Override\n    public java.lang.String getLabel() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        label_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 4 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLabelBytes() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        label_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, label_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, label_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SetAddressLabelRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SetAddressLabelRequest other = (pactus.WalletOuterClass.SetAddressLabelRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getLabel()\n          .equals(other.getLabel())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + LABEL_FIELD_NUMBER;\n      hash = (53 * hash) + getLabel().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SetAddressLabelRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for setting address label.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SetAddressLabelRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SetAddressLabelRequest)\n        pactus.WalletOuterClass.SetAddressLabelRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SetAddressLabelRequest.class, pactus.WalletOuterClass.SetAddressLabelRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SetAddressLabelRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        password_ = \"\";\n        address_ = \"\";\n        label_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SetAddressLabelRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelRequest build() {\n        pactus.WalletOuterClass.SetAddressLabelRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelRequest buildPartial() {\n        pactus.WalletOuterClass.SetAddressLabelRequest result = new pactus.WalletOuterClass.SetAddressLabelRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SetAddressLabelRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.password_ = password_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.label_ = label_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SetAddressLabelRequest) {\n          return mergeFrom((pactus.WalletOuterClass.SetAddressLabelRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SetAddressLabelRequest other) {\n        if (other == pactus.WalletOuterClass.SetAddressLabelRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getLabel().isEmpty()) {\n          label_ = other.label_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                label_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Wallet password required for modification.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for modification.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password required for modification.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for modification.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password required for modification.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address to label.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to label.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to label.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to label.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to label.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object label_ = \"\";\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 4 [json_name = \"label\"];</code>\n       * @return The label.\n       */\n      public java.lang.String getLabel() {\n        java.lang.Object ref = label_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          label_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 4 [json_name = \"label\"];</code>\n       * @return The bytes for label.\n       */\n      public com.google.protobuf.ByteString\n          getLabelBytes() {\n        java.lang.Object ref = label_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          label_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 4 [json_name = \"label\"];</code>\n       * @param value The label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabel(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        label_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 4 [json_name = \"label\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLabel() {\n        label_ = getDefaultInstance().getLabel();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 4 [json_name = \"label\"];</code>\n       * @param value The bytes for label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabelBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        label_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SetAddressLabelRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SetAddressLabelRequest)\n    private static final pactus.WalletOuterClass.SetAddressLabelRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SetAddressLabelRequest();\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SetAddressLabelRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SetAddressLabelRequest>() {\n      @java.lang.Override\n      public SetAddressLabelRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SetAddressLabelRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SetAddressLabelRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SetAddressLabelRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SetAddressLabelResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SetAddressLabelResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet where the address label was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet where the address label was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The address where the label was updated.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address where the label was updated.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    java.lang.String getLabel();\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    com.google.protobuf.ByteString\n        getLabelBytes();\n  }\n  /**\n   * <pre>\n   * Response message for updated address label.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SetAddressLabelResponse}\n   */\n  public static final class SetAddressLabelResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SetAddressLabelResponse)\n      SetAddressLabelResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SetAddressLabelResponse\");\n    }\n    // Use SetAddressLabelResponse.newBuilder() to construct.\n    private SetAddressLabelResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SetAddressLabelResponse() {\n      walletName_ = \"\";\n      address_ = \"\";\n      label_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SetAddressLabelResponse.class, pactus.WalletOuterClass.SetAddressLabelResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet where the address label was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet where the address label was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address where the label was updated.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address where the label was updated.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int LABEL_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object label_ = \"\";\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The label.\n     */\n    @java.lang.Override\n    public java.lang.String getLabel() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        label_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The new label for the address.\n     * </pre>\n     *\n     * <code>string label = 3 [json_name = \"label\"];</code>\n     * @return The bytes for label.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getLabelBytes() {\n      java.lang.Object ref = label_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        label_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, label_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, address_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, label_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SetAddressLabelResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SetAddressLabelResponse other = (pactus.WalletOuterClass.SetAddressLabelResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getLabel()\n          .equals(other.getLabel())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + LABEL_FIELD_NUMBER;\n      hash = (53 * hash) + getLabel().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetAddressLabelResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SetAddressLabelResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message for updated address label.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SetAddressLabelResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SetAddressLabelResponse)\n        pactus.WalletOuterClass.SetAddressLabelResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SetAddressLabelResponse.class, pactus.WalletOuterClass.SetAddressLabelResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SetAddressLabelResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        address_ = \"\";\n        label_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetAddressLabelResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SetAddressLabelResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelResponse build() {\n        pactus.WalletOuterClass.SetAddressLabelResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetAddressLabelResponse buildPartial() {\n        pactus.WalletOuterClass.SetAddressLabelResponse result = new pactus.WalletOuterClass.SetAddressLabelResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SetAddressLabelResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.label_ = label_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SetAddressLabelResponse) {\n          return mergeFrom((pactus.WalletOuterClass.SetAddressLabelResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SetAddressLabelResponse other) {\n        if (other == pactus.WalletOuterClass.SetAddressLabelResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getLabel().isEmpty()) {\n          label_ = other.label_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                label_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet where the address label was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the address label was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the address label was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the address label was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the address label was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address where the label was updated.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address where the label was updated.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address where the label was updated.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address where the label was updated.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address where the label was updated.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object label_ = \"\";\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The label.\n       */\n      public java.lang.String getLabel() {\n        java.lang.Object ref = label_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          label_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return The bytes for label.\n       */\n      public com.google.protobuf.ByteString\n          getLabelBytes() {\n        java.lang.Object ref = label_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          label_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabel(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearLabel() {\n        label_ = getDefaultInstance().getLabel();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new label for the address.\n       * </pre>\n       *\n       * <code>string label = 3 [json_name = \"label\"];</code>\n       * @param value The bytes for label to set.\n       * @return This builder for chaining.\n       */\n      public Builder setLabelBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        label_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SetAddressLabelResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SetAddressLabelResponse)\n    private static final pactus.WalletOuterClass.SetAddressLabelResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SetAddressLabelResponse();\n    }\n\n    public static pactus.WalletOuterClass.SetAddressLabelResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SetAddressLabelResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SetAddressLabelResponse>() {\n      @java.lang.Override\n      public SetAddressLabelResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SetAddressLabelResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SetAddressLabelResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SetAddressLabelResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListWalletsRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListWalletsRequest)\n      com.google.protobuf.MessageOrBuilder {\n  }\n  /**\n   * <pre>\n   * Request message for listing wallets.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListWalletsRequest}\n   */\n  public static final class ListWalletsRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListWalletsRequest)\n      ListWalletsRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListWalletsRequest\");\n    }\n    // Use ListWalletsRequest.newBuilder() to construct.\n    private ListWalletsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListWalletsRequest() {\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListWalletsRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListWalletsRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListWalletsRequest.class, pactus.WalletOuterClass.ListWalletsRequest.Builder.class);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListWalletsRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListWalletsRequest other = (pactus.WalletOuterClass.ListWalletsRequest) obj;\n\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListWalletsRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListWalletsRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for listing wallets.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListWalletsRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListWalletsRequest)\n        pactus.WalletOuterClass.ListWalletsRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListWalletsRequest.class, pactus.WalletOuterClass.ListWalletsRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListWalletsRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListWalletsRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsRequest build() {\n        pactus.WalletOuterClass.ListWalletsRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsRequest buildPartial() {\n        pactus.WalletOuterClass.ListWalletsRequest result = new pactus.WalletOuterClass.ListWalletsRequest(this);\n        onBuilt();\n        return result;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListWalletsRequest) {\n          return mergeFrom((pactus.WalletOuterClass.ListWalletsRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListWalletsRequest other) {\n        if (other == pactus.WalletOuterClass.ListWalletsRequest.getDefaultInstance()) return this;\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListWalletsRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListWalletsRequest)\n    private static final pactus.WalletOuterClass.ListWalletsRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListWalletsRequest();\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListWalletsRequest>\n        PARSER = new com.google.protobuf.AbstractParser<ListWalletsRequest>() {\n      @java.lang.Override\n      public ListWalletsRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListWalletsRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListWalletsRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListWalletsRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListWalletsResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListWalletsResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @return A list containing the wallets.\n     */\n    java.util.List<java.lang.String>\n        getWalletsList();\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @return The count of wallets.\n     */\n    int getWalletsCount();\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @param index The index of the element to return.\n     * @return The wallets at the given index.\n     */\n    java.lang.String getWallets(int index);\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the wallets at the given index.\n     */\n    com.google.protobuf.ByteString\n        getWalletsBytes(int index);\n  }\n  /**\n   * <pre>\n   * Response message contains wallet names.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListWalletsResponse}\n   */\n  public static final class ListWalletsResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListWalletsResponse)\n      ListWalletsResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListWalletsResponse\");\n    }\n    // Use ListWalletsResponse.newBuilder() to construct.\n    private ListWalletsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListWalletsResponse() {\n      wallets_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListWalletsResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListWalletsResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListWalletsResponse.class, pactus.WalletOuterClass.ListWalletsResponse.Builder.class);\n    }\n\n    public static final int WALLETS_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.LazyStringArrayList wallets_ =\n        com.google.protobuf.LazyStringArrayList.emptyList();\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @return A list containing the wallets.\n     */\n    public com.google.protobuf.ProtocolStringList\n        getWalletsList() {\n      return wallets_;\n    }\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @return The count of wallets.\n     */\n    public int getWalletsCount() {\n      return wallets_.size();\n    }\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @param index The index of the element to return.\n     * @return The wallets at the given index.\n     */\n    public java.lang.String getWallets(int index) {\n      return wallets_.get(index);\n    }\n    /**\n     * <pre>\n     * Array of wallet names.\n     * </pre>\n     *\n     * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n     * @param index The index of the value to return.\n     * @return The bytes of the wallets at the given index.\n     */\n    public com.google.protobuf.ByteString\n        getWalletsBytes(int index) {\n      return wallets_.getByteString(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      for (int i = 0; i < wallets_.size(); i++) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, wallets_.getRaw(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      {\n        int dataSize = 0;\n        for (int i = 0; i < wallets_.size(); i++) {\n          dataSize += computeStringSizeNoTag(wallets_.getRaw(i));\n        }\n        size += dataSize;\n        size += 1 * getWalletsList().size();\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListWalletsResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListWalletsResponse other = (pactus.WalletOuterClass.ListWalletsResponse) obj;\n\n      if (!getWalletsList()\n          .equals(other.getWalletsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      if (getWalletsCount() > 0) {\n        hash = (37 * hash) + WALLETS_FIELD_NUMBER;\n        hash = (53 * hash) + getWalletsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListWalletsResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListWalletsResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains wallet names.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListWalletsResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListWalletsResponse)\n        pactus.WalletOuterClass.ListWalletsResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListWalletsResponse.class, pactus.WalletOuterClass.ListWalletsResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListWalletsResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        wallets_ =\n            com.google.protobuf.LazyStringArrayList.emptyList();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListWalletsResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListWalletsResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsResponse build() {\n        pactus.WalletOuterClass.ListWalletsResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListWalletsResponse buildPartial() {\n        pactus.WalletOuterClass.ListWalletsResponse result = new pactus.WalletOuterClass.ListWalletsResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.ListWalletsResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          wallets_.makeImmutable();\n          result.wallets_ = wallets_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListWalletsResponse) {\n          return mergeFrom((pactus.WalletOuterClass.ListWalletsResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListWalletsResponse other) {\n        if (other == pactus.WalletOuterClass.ListWalletsResponse.getDefaultInstance()) return this;\n        if (!other.wallets_.isEmpty()) {\n          if (wallets_.isEmpty()) {\n            wallets_ = other.wallets_;\n            bitField0_ |= 0x00000001;\n          } else {\n            ensureWalletsIsMutable();\n            wallets_.addAll(other.wallets_);\n          }\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                java.lang.String s = input.readStringRequireUtf8();\n                ensureWalletsIsMutable();\n                wallets_.add(s);\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private com.google.protobuf.LazyStringArrayList wallets_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n      private void ensureWalletsIsMutable() {\n        if (!wallets_.isModifiable()) {\n          wallets_ = new com.google.protobuf.LazyStringArrayList(wallets_);\n        }\n        bitField0_ |= 0x00000001;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @return A list containing the wallets.\n       */\n      public com.google.protobuf.ProtocolStringList\n          getWalletsList() {\n        wallets_.makeImmutable();\n        return wallets_;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @return The count of wallets.\n       */\n      public int getWalletsCount() {\n        return wallets_.size();\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param index The index of the element to return.\n       * @return The wallets at the given index.\n       */\n      public java.lang.String getWallets(int index) {\n        return wallets_.get(index);\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param index The index of the value to return.\n       * @return The bytes of the wallets at the given index.\n       */\n      public com.google.protobuf.ByteString\n          getWalletsBytes(int index) {\n        return wallets_.getByteString(index);\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param index The index to set the value at.\n       * @param value The wallets to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWallets(\n          int index, java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureWalletsIsMutable();\n        wallets_.set(index, value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param value The wallets to add.\n       * @return This builder for chaining.\n       */\n      public Builder addWallets(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureWalletsIsMutable();\n        wallets_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param values The wallets to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllWallets(\n          java.lang.Iterable<java.lang.String> values) {\n        ensureWalletsIsMutable();\n        com.google.protobuf.AbstractMessageLite.Builder.addAll(\n            values, wallets_);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWallets() {\n        wallets_ =\n          com.google.protobuf.LazyStringArrayList.emptyList();\n        bitField0_ = (bitField0_ & ~0x00000001);;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Array of wallet names.\n       * </pre>\n       *\n       * <code>repeated string wallets = 1 [json_name = \"wallets\"];</code>\n       * @param value The bytes of the wallets to add.\n       * @return This builder for chaining.\n       */\n      public Builder addWalletsBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        ensureWalletsIsMutable();\n        wallets_.add(value);\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListWalletsResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListWalletsResponse)\n    private static final pactus.WalletOuterClass.ListWalletsResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListWalletsResponse();\n    }\n\n    public static pactus.WalletOuterClass.ListWalletsResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListWalletsResponse>\n        PARSER = new com.google.protobuf.AbstractParser<ListWalletsResponse>() {\n      @java.lang.Override\n      public ListWalletsResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListWalletsResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListWalletsResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListWalletsResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetWalletInfoRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetWalletInfoRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to query.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to query.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Request message for getting wallet information.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetWalletInfoRequest}\n   */\n  public static final class GetWalletInfoRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetWalletInfoRequest)\n      GetWalletInfoRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetWalletInfoRequest\");\n    }\n    // Use GetWalletInfoRequest.newBuilder() to construct.\n    private GetWalletInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetWalletInfoRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetWalletInfoRequest.class, pactus.WalletOuterClass.GetWalletInfoRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to query.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to query.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetWalletInfoRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetWalletInfoRequest other = (pactus.WalletOuterClass.GetWalletInfoRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetWalletInfoRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for getting wallet information.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetWalletInfoRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetWalletInfoRequest)\n        pactus.WalletOuterClass.GetWalletInfoRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetWalletInfoRequest.class, pactus.WalletOuterClass.GetWalletInfoRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetWalletInfoRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetWalletInfoRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoRequest build() {\n        pactus.WalletOuterClass.GetWalletInfoRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoRequest buildPartial() {\n        pactus.WalletOuterClass.GetWalletInfoRequest result = new pactus.WalletOuterClass.GetWalletInfoRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetWalletInfoRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetWalletInfoRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetWalletInfoRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetWalletInfoRequest other) {\n        if (other == pactus.WalletOuterClass.GetWalletInfoRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to query.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetWalletInfoRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetWalletInfoRequest)\n    private static final pactus.WalletOuterClass.GetWalletInfoRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetWalletInfoRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetWalletInfoRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetWalletInfoRequest>() {\n      @java.lang.Override\n      public GetWalletInfoRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetWalletInfoRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetWalletInfoRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetWalletInfoRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetWalletInfoResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetWalletInfoResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The wallet format version.\n     * </pre>\n     *\n     * <code>int32 version = 2 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    int getVersion();\n\n    /**\n     * <pre>\n     * The network the wallet is connected to (e.g., mainnet, testnet).\n     * </pre>\n     *\n     * <code>string network = 3 [json_name = \"network\"];</code>\n     * @return The network.\n     */\n    java.lang.String getNetwork();\n    /**\n     * <pre>\n     * The network the wallet is connected to (e.g., mainnet, testnet).\n     * </pre>\n     *\n     * <code>string network = 3 [json_name = \"network\"];</code>\n     * @return The bytes for network.\n     */\n    com.google.protobuf.ByteString\n        getNetworkBytes();\n\n    /**\n     * <pre>\n     * Indicates if the wallet is encrypted.\n     * </pre>\n     *\n     * <code>bool encrypted = 4 [json_name = \"encrypted\"];</code>\n     * @return The encrypted.\n     */\n    boolean getEncrypted();\n\n    /**\n     * <pre>\n     * A unique identifier of the wallet.\n     * </pre>\n     *\n     * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n     * @return The uuid.\n     */\n    java.lang.String getUuid();\n    /**\n     * <pre>\n     * A unique identifier of the wallet.\n     * </pre>\n     *\n     * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n     * @return The bytes for uuid.\n     */\n    com.google.protobuf.ByteString\n        getUuidBytes();\n\n    /**\n     * <pre>\n     * Unix timestamp of wallet creation.\n     * </pre>\n     *\n     * <code>int64 created_at = 6 [json_name = \"createdAt\"];</code>\n     * @return The createdAt.\n     */\n    long getCreatedAt();\n\n    /**\n     * <pre>\n     * The default fee of the wallet.\n     * </pre>\n     *\n     * <code>int64 default_fee = 7 [json_name = \"defaultFee\"];</code>\n     * @return The defaultFee.\n     */\n    long getDefaultFee();\n\n    /**\n     * <pre>\n     * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n     * </pre>\n     *\n     * <code>string driver = 8 [json_name = \"driver\"];</code>\n     * @return The driver.\n     */\n    java.lang.String getDriver();\n    /**\n     * <pre>\n     * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n     * </pre>\n     *\n     * <code>string driver = 8 [json_name = \"driver\"];</code>\n     * @return The bytes for driver.\n     */\n    com.google.protobuf.ByteString\n        getDriverBytes();\n\n    /**\n     * <pre>\n     * Path to the wallet file or storage location.\n     * </pre>\n     *\n     * <code>string path = 9 [json_name = \"path\"];</code>\n     * @return The path.\n     */\n    java.lang.String getPath();\n    /**\n     * <pre>\n     * Path to the wallet file or storage location.\n     * </pre>\n     *\n     * <code>string path = 9 [json_name = \"path\"];</code>\n     * @return The bytes for path.\n     */\n    com.google.protobuf.ByteString\n        getPathBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains wallet details.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetWalletInfoResponse}\n   */\n  public static final class GetWalletInfoResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetWalletInfoResponse)\n      GetWalletInfoResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetWalletInfoResponse\");\n    }\n    // Use GetWalletInfoResponse.newBuilder() to construct.\n    private GetWalletInfoResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetWalletInfoResponse() {\n      walletName_ = \"\";\n      network_ = \"\";\n      uuid_ = \"\";\n      driver_ = \"\";\n      path_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetWalletInfoResponse.class, pactus.WalletOuterClass.GetWalletInfoResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int VERSION_FIELD_NUMBER = 2;\n    private int version_ = 0;\n    /**\n     * <pre>\n     * The wallet format version.\n     * </pre>\n     *\n     * <code>int32 version = 2 [json_name = \"version\"];</code>\n     * @return The version.\n     */\n    @java.lang.Override\n    public int getVersion() {\n      return version_;\n    }\n\n    public static final int NETWORK_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object network_ = \"\";\n    /**\n     * <pre>\n     * The network the wallet is connected to (e.g., mainnet, testnet).\n     * </pre>\n     *\n     * <code>string network = 3 [json_name = \"network\"];</code>\n     * @return The network.\n     */\n    @java.lang.Override\n    public java.lang.String getNetwork() {\n      java.lang.Object ref = network_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        network_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The network the wallet is connected to (e.g., mainnet, testnet).\n     * </pre>\n     *\n     * <code>string network = 3 [json_name = \"network\"];</code>\n     * @return The bytes for network.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getNetworkBytes() {\n      java.lang.Object ref = network_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        network_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ENCRYPTED_FIELD_NUMBER = 4;\n    private boolean encrypted_ = false;\n    /**\n     * <pre>\n     * Indicates if the wallet is encrypted.\n     * </pre>\n     *\n     * <code>bool encrypted = 4 [json_name = \"encrypted\"];</code>\n     * @return The encrypted.\n     */\n    @java.lang.Override\n    public boolean getEncrypted() {\n      return encrypted_;\n    }\n\n    public static final int UUID_FIELD_NUMBER = 5;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object uuid_ = \"\";\n    /**\n     * <pre>\n     * A unique identifier of the wallet.\n     * </pre>\n     *\n     * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n     * @return The uuid.\n     */\n    @java.lang.Override\n    public java.lang.String getUuid() {\n      java.lang.Object ref = uuid_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        uuid_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A unique identifier of the wallet.\n     * </pre>\n     *\n     * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n     * @return The bytes for uuid.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getUuidBytes() {\n      java.lang.Object ref = uuid_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        uuid_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int CREATED_AT_FIELD_NUMBER = 6;\n    private long createdAt_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp of wallet creation.\n     * </pre>\n     *\n     * <code>int64 created_at = 6 [json_name = \"createdAt\"];</code>\n     * @return The createdAt.\n     */\n    @java.lang.Override\n    public long getCreatedAt() {\n      return createdAt_;\n    }\n\n    public static final int DEFAULT_FEE_FIELD_NUMBER = 7;\n    private long defaultFee_ = 0L;\n    /**\n     * <pre>\n     * The default fee of the wallet.\n     * </pre>\n     *\n     * <code>int64 default_fee = 7 [json_name = \"defaultFee\"];</code>\n     * @return The defaultFee.\n     */\n    @java.lang.Override\n    public long getDefaultFee() {\n      return defaultFee_;\n    }\n\n    public static final int DRIVER_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object driver_ = \"\";\n    /**\n     * <pre>\n     * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n     * </pre>\n     *\n     * <code>string driver = 8 [json_name = \"driver\"];</code>\n     * @return The driver.\n     */\n    @java.lang.Override\n    public java.lang.String getDriver() {\n      java.lang.Object ref = driver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        driver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n     * </pre>\n     *\n     * <code>string driver = 8 [json_name = \"driver\"];</code>\n     * @return The bytes for driver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getDriverBytes() {\n      java.lang.Object ref = driver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        driver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PATH_FIELD_NUMBER = 9;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object path_ = \"\";\n    /**\n     * <pre>\n     * Path to the wallet file or storage location.\n     * </pre>\n     *\n     * <code>string path = 9 [json_name = \"path\"];</code>\n     * @return The path.\n     */\n    @java.lang.Override\n    public java.lang.String getPath() {\n      java.lang.Object ref = path_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        path_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Path to the wallet file or storage location.\n     * </pre>\n     *\n     * <code>string path = 9 [json_name = \"path\"];</code>\n     * @return The bytes for path.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPathBytes() {\n      java.lang.Object ref = path_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        path_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (version_ != 0) {\n        output.writeInt32(2, version_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, network_);\n      }\n      if (encrypted_ != false) {\n        output.writeBool(4, encrypted_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 5, uuid_);\n      }\n      if (createdAt_ != 0L) {\n        output.writeInt64(6, createdAt_);\n      }\n      if (defaultFee_ != 0L) {\n        output.writeInt64(7, defaultFee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(driver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, driver_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 9, path_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (version_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(2, version_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, network_);\n      }\n      if (encrypted_ != false) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBoolSize(4, encrypted_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, uuid_);\n      }\n      if (createdAt_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(6, createdAt_);\n      }\n      if (defaultFee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(7, defaultFee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(driver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, driver_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(9, path_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetWalletInfoResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetWalletInfoResponse other = (pactus.WalletOuterClass.GetWalletInfoResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (getVersion()\n          != other.getVersion()) return false;\n      if (!getNetwork()\n          .equals(other.getNetwork())) return false;\n      if (getEncrypted()\n          != other.getEncrypted()) return false;\n      if (!getUuid()\n          .equals(other.getUuid())) return false;\n      if (getCreatedAt()\n          != other.getCreatedAt()) return false;\n      if (getDefaultFee()\n          != other.getDefaultFee()) return false;\n      if (!getDriver()\n          .equals(other.getDriver())) return false;\n      if (!getPath()\n          .equals(other.getPath())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + VERSION_FIELD_NUMBER;\n      hash = (53 * hash) + getVersion();\n      hash = (37 * hash) + NETWORK_FIELD_NUMBER;\n      hash = (53 * hash) + getNetwork().hashCode();\n      hash = (37 * hash) + ENCRYPTED_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(\n          getEncrypted());\n      hash = (37 * hash) + UUID_FIELD_NUMBER;\n      hash = (53 * hash) + getUuid().hashCode();\n      hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getCreatedAt());\n      hash = (37 * hash) + DEFAULT_FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getDefaultFee());\n      hash = (37 * hash) + DRIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getDriver().hashCode();\n      hash = (37 * hash) + PATH_FIELD_NUMBER;\n      hash = (53 * hash) + getPath().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetWalletInfoResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetWalletInfoResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains wallet details.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetWalletInfoResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetWalletInfoResponse)\n        pactus.WalletOuterClass.GetWalletInfoResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetWalletInfoResponse.class, pactus.WalletOuterClass.GetWalletInfoResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetWalletInfoResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        version_ = 0;\n        network_ = \"\";\n        encrypted_ = false;\n        uuid_ = \"\";\n        createdAt_ = 0L;\n        defaultFee_ = 0L;\n        driver_ = \"\";\n        path_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetWalletInfoResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetWalletInfoResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoResponse build() {\n        pactus.WalletOuterClass.GetWalletInfoResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetWalletInfoResponse buildPartial() {\n        pactus.WalletOuterClass.GetWalletInfoResponse result = new pactus.WalletOuterClass.GetWalletInfoResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetWalletInfoResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.version_ = version_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.network_ = network_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.encrypted_ = encrypted_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.uuid_ = uuid_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.createdAt_ = createdAt_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.defaultFee_ = defaultFee_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.driver_ = driver_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.path_ = path_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetWalletInfoResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetWalletInfoResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetWalletInfoResponse other) {\n        if (other == pactus.WalletOuterClass.GetWalletInfoResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getVersion() != 0) {\n          setVersion(other.getVersion());\n        }\n        if (!other.getNetwork().isEmpty()) {\n          network_ = other.network_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (other.getEncrypted() != false) {\n          setEncrypted(other.getEncrypted());\n        }\n        if (!other.getUuid().isEmpty()) {\n          uuid_ = other.uuid_;\n          bitField0_ |= 0x00000010;\n          onChanged();\n        }\n        if (other.getCreatedAt() != 0L) {\n          setCreatedAt(other.getCreatedAt());\n        }\n        if (other.getDefaultFee() != 0L) {\n          setDefaultFee(other.getDefaultFee());\n        }\n        if (!other.getDriver().isEmpty()) {\n          driver_ = other.driver_;\n          bitField0_ |= 0x00000080;\n          onChanged();\n        }\n        if (!other.getPath().isEmpty()) {\n          path_ = other.path_;\n          bitField0_ |= 0x00000100;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                version_ = input.readInt32();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              case 26: {\n                network_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 32: {\n                encrypted_ = input.readBool();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 42: {\n                uuid_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 42\n              case 48: {\n                createdAt_ = input.readInt64();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 56: {\n                defaultFee_ = input.readInt64();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 66: {\n                driver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 66\n              case 74: {\n                path_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 74\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private int version_ ;\n      /**\n       * <pre>\n       * The wallet format version.\n       * </pre>\n       *\n       * <code>int32 version = 2 [json_name = \"version\"];</code>\n       * @return The version.\n       */\n      @java.lang.Override\n      public int getVersion() {\n        return version_;\n      }\n      /**\n       * <pre>\n       * The wallet format version.\n       * </pre>\n       *\n       * <code>int32 version = 2 [json_name = \"version\"];</code>\n       * @param value The version to set.\n       * @return This builder for chaining.\n       */\n      public Builder setVersion(int value) {\n\n        version_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The wallet format version.\n       * </pre>\n       *\n       * <code>int32 version = 2 [json_name = \"version\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearVersion() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        version_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object network_ = \"\";\n      /**\n       * <pre>\n       * The network the wallet is connected to (e.g., mainnet, testnet).\n       * </pre>\n       *\n       * <code>string network = 3 [json_name = \"network\"];</code>\n       * @return The network.\n       */\n      public java.lang.String getNetwork() {\n        java.lang.Object ref = network_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          network_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The network the wallet is connected to (e.g., mainnet, testnet).\n       * </pre>\n       *\n       * <code>string network = 3 [json_name = \"network\"];</code>\n       * @return The bytes for network.\n       */\n      public com.google.protobuf.ByteString\n          getNetworkBytes() {\n        java.lang.Object ref = network_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          network_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The network the wallet is connected to (e.g., mainnet, testnet).\n       * </pre>\n       *\n       * <code>string network = 3 [json_name = \"network\"];</code>\n       * @param value The network to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetwork(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        network_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The network the wallet is connected to (e.g., mainnet, testnet).\n       * </pre>\n       *\n       * <code>string network = 3 [json_name = \"network\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNetwork() {\n        network_ = getDefaultInstance().getNetwork();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The network the wallet is connected to (e.g., mainnet, testnet).\n       * </pre>\n       *\n       * <code>string network = 3 [json_name = \"network\"];</code>\n       * @param value The bytes for network to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNetworkBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        network_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private boolean encrypted_ ;\n      /**\n       * <pre>\n       * Indicates if the wallet is encrypted.\n       * </pre>\n       *\n       * <code>bool encrypted = 4 [json_name = \"encrypted\"];</code>\n       * @return The encrypted.\n       */\n      @java.lang.Override\n      public boolean getEncrypted() {\n        return encrypted_;\n      }\n      /**\n       * <pre>\n       * Indicates if the wallet is encrypted.\n       * </pre>\n       *\n       * <code>bool encrypted = 4 [json_name = \"encrypted\"];</code>\n       * @param value The encrypted to set.\n       * @return This builder for chaining.\n       */\n      public Builder setEncrypted(boolean value) {\n\n        encrypted_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Indicates if the wallet is encrypted.\n       * </pre>\n       *\n       * <code>bool encrypted = 4 [json_name = \"encrypted\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearEncrypted() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        encrypted_ = false;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object uuid_ = \"\";\n      /**\n       * <pre>\n       * A unique identifier of the wallet.\n       * </pre>\n       *\n       * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n       * @return The uuid.\n       */\n      public java.lang.String getUuid() {\n        java.lang.Object ref = uuid_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          uuid_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A unique identifier of the wallet.\n       * </pre>\n       *\n       * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n       * @return The bytes for uuid.\n       */\n      public com.google.protobuf.ByteString\n          getUuidBytes() {\n        java.lang.Object ref = uuid_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          uuid_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A unique identifier of the wallet.\n       * </pre>\n       *\n       * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n       * @param value The uuid to set.\n       * @return This builder for chaining.\n       */\n      public Builder setUuid(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        uuid_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A unique identifier of the wallet.\n       * </pre>\n       *\n       * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearUuid() {\n        uuid_ = getDefaultInstance().getUuid();\n        bitField0_ = (bitField0_ & ~0x00000010);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A unique identifier of the wallet.\n       * </pre>\n       *\n       * <code>string uuid = 5 [json_name = \"uuid\"];</code>\n       * @param value The bytes for uuid to set.\n       * @return This builder for chaining.\n       */\n      public Builder setUuidBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        uuid_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n\n      private long createdAt_ ;\n      /**\n       * <pre>\n       * Unix timestamp of wallet creation.\n       * </pre>\n       *\n       * <code>int64 created_at = 6 [json_name = \"createdAt\"];</code>\n       * @return The createdAt.\n       */\n      @java.lang.Override\n      public long getCreatedAt() {\n        return createdAt_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of wallet creation.\n       * </pre>\n       *\n       * <code>int64 created_at = 6 [json_name = \"createdAt\"];</code>\n       * @param value The createdAt to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCreatedAt(long value) {\n\n        createdAt_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of wallet creation.\n       * </pre>\n       *\n       * <code>int64 created_at = 6 [json_name = \"createdAt\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCreatedAt() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        createdAt_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long defaultFee_ ;\n      /**\n       * <pre>\n       * The default fee of the wallet.\n       * </pre>\n       *\n       * <code>int64 default_fee = 7 [json_name = \"defaultFee\"];</code>\n       * @return The defaultFee.\n       */\n      @java.lang.Override\n      public long getDefaultFee() {\n        return defaultFee_;\n      }\n      /**\n       * <pre>\n       * The default fee of the wallet.\n       * </pre>\n       *\n       * <code>int64 default_fee = 7 [json_name = \"defaultFee\"];</code>\n       * @param value The defaultFee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDefaultFee(long value) {\n\n        defaultFee_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The default fee of the wallet.\n       * </pre>\n       *\n       * <code>int64 default_fee = 7 [json_name = \"defaultFee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDefaultFee() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        defaultFee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object driver_ = \"\";\n      /**\n       * <pre>\n       * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n       * </pre>\n       *\n       * <code>string driver = 8 [json_name = \"driver\"];</code>\n       * @return The driver.\n       */\n      public java.lang.String getDriver() {\n        java.lang.Object ref = driver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          driver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n       * </pre>\n       *\n       * <code>string driver = 8 [json_name = \"driver\"];</code>\n       * @return The bytes for driver.\n       */\n      public com.google.protobuf.ByteString\n          getDriverBytes() {\n        java.lang.Object ref = driver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          driver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n       * </pre>\n       *\n       * <code>string driver = 8 [json_name = \"driver\"];</code>\n       * @param value The driver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDriver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        driver_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n       * </pre>\n       *\n       * <code>string driver = 8 [json_name = \"driver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDriver() {\n        driver_ = getDefaultInstance().getDriver();\n        bitField0_ = (bitField0_ & ~0x00000080);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n       * </pre>\n       *\n       * <code>string driver = 8 [json_name = \"driver\"];</code>\n       * @param value The bytes for driver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDriverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        driver_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object path_ = \"\";\n      /**\n       * <pre>\n       * Path to the wallet file or storage location.\n       * </pre>\n       *\n       * <code>string path = 9 [json_name = \"path\"];</code>\n       * @return The path.\n       */\n      public java.lang.String getPath() {\n        java.lang.Object ref = path_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          path_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Path to the wallet file or storage location.\n       * </pre>\n       *\n       * <code>string path = 9 [json_name = \"path\"];</code>\n       * @return The bytes for path.\n       */\n      public com.google.protobuf.ByteString\n          getPathBytes() {\n        java.lang.Object ref = path_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          path_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Path to the wallet file or storage location.\n       * </pre>\n       *\n       * <code>string path = 9 [json_name = \"path\"];</code>\n       * @param value The path to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPath(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        path_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Path to the wallet file or storage location.\n       * </pre>\n       *\n       * <code>string path = 9 [json_name = \"path\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPath() {\n        path_ = getDefaultInstance().getPath();\n        bitField0_ = (bitField0_ & ~0x00000100);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Path to the wallet file or storage location.\n       * </pre>\n       *\n       * <code>string path = 9 [json_name = \"path\"];</code>\n       * @param value The bytes for path to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPathBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        path_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetWalletInfoResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetWalletInfoResponse)\n    private static final pactus.WalletOuterClass.GetWalletInfoResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetWalletInfoResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetWalletInfoResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetWalletInfoResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetWalletInfoResponse>() {\n      @java.lang.Override\n      public GetWalletInfoResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetWalletInfoResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetWalletInfoResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetWalletInfoResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListAddressesRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListAddressesRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return A list containing the addressTypes.\n     */\n    java.util.List<pactus.WalletOuterClass.AddressType> getAddressTypesList();\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return The count of addressTypes.\n     */\n    int getAddressTypesCount();\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @param index The index of the element to return.\n     * @return The addressTypes at the given index.\n     */\n    pactus.WalletOuterClass.AddressType getAddressTypes(int index);\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return A list containing the enum numeric values on the wire for addressTypes.\n     */\n    java.util.List<java.lang.Integer>\n    getAddressTypesValueList();\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @param index The index of the value to return.\n     * @return The enum numeric value on the wire of addressTypes at the given index.\n     */\n    int getAddressTypesValue(int index);\n  }\n  /**\n   * <pre>\n   * Request message for listing wallet addresses.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListAddressesRequest}\n   */\n  public static final class ListAddressesRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListAddressesRequest)\n      ListAddressesRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListAddressesRequest\");\n    }\n    // Use ListAddressesRequest.newBuilder() to construct.\n    private ListAddressesRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListAddressesRequest() {\n      walletName_ = \"\";\n      addressTypes_ = emptyIntList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListAddressesRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListAddressesRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListAddressesRequest.class, pactus.WalletOuterClass.ListAddressesRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_TYPES_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private com.google.protobuf.Internal.IntList addressTypes_ =\n        emptyIntList();\n    private static final     com.google.protobuf.Internal.IntListAdapter.IntConverter<\n        pactus.WalletOuterClass.AddressType> addressTypes_converter_ =\n            new com.google.protobuf.Internal.IntListAdapter.IntConverter<\n                pactus.WalletOuterClass.AddressType>() {\n              public pactus.WalletOuterClass.AddressType convert(int from) {\n                pactus.WalletOuterClass.AddressType result = pactus.WalletOuterClass.AddressType.forNumber(from);\n                return result == null ? pactus.WalletOuterClass.AddressType.UNRECOGNIZED : result;\n              }\n            };\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return A list containing the addressTypes.\n     */\n    @java.lang.Override\n    public java.util.List<pactus.WalletOuterClass.AddressType> getAddressTypesList() {\n      return new com.google.protobuf.Internal.IntListAdapter<\n          pactus.WalletOuterClass.AddressType>(addressTypes_, addressTypes_converter_);\n    }\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return The count of addressTypes.\n     */\n    @java.lang.Override\n    public int getAddressTypesCount() {\n      return addressTypes_.size();\n    }\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @param index The index of the element to return.\n     * @return The addressTypes at the given index.\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressType getAddressTypes(int index) {\n      return addressTypes_converter_.convert(addressTypes_.getInt(index));\n    }\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @return A list containing the enum numeric values on the wire for addressTypes.\n     */\n    @java.lang.Override\n    public java.util.List<java.lang.Integer>\n    getAddressTypesValueList() {\n      return addressTypes_;\n    }\n    /**\n     * <pre>\n     * Filter addresses by their types. If empty, all address types are included.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n     * @param index The index of the value to return.\n     * @return The enum numeric value on the wire of addressTypes at the given index.\n     */\n    @java.lang.Override\n    public int getAddressTypesValue(int index) {\n      return addressTypes_.getInt(index);\n    }\n    private int addressTypesMemoizedSerializedSize;\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      getSerializedSize();\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (getAddressTypesList().size() > 0) {\n        output.writeUInt32NoTag(18);\n        output.writeUInt32NoTag(addressTypesMemoizedSerializedSize);\n      }\n      for (int i = 0; i < addressTypes_.size(); i++) {\n        output.writeEnumNoTag(addressTypes_.getInt(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      {\n        int dataSize = 0;\n        for (int i = 0; i < addressTypes_.size(); i++) {\n          dataSize += com.google.protobuf.CodedOutputStream\n            .computeEnumSizeNoTag(addressTypes_.getInt(i));\n        }\n        size += dataSize;\n        if (!getAddressTypesList().isEmpty()) {  size += 1;\n          size += com.google.protobuf.CodedOutputStream\n            .computeUInt32SizeNoTag(dataSize);\n        }addressTypesMemoizedSerializedSize = dataSize;\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListAddressesRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListAddressesRequest other = (pactus.WalletOuterClass.ListAddressesRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!addressTypes_.equals(other.addressTypes_)) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      if (getAddressTypesCount() > 0) {\n        hash = (37 * hash) + ADDRESS_TYPES_FIELD_NUMBER;\n        hash = (53 * hash) + addressTypes_.hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListAddressesRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListAddressesRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for listing wallet addresses.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListAddressesRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListAddressesRequest)\n        pactus.WalletOuterClass.ListAddressesRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListAddressesRequest.class, pactus.WalletOuterClass.ListAddressesRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListAddressesRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        addressTypes_ = emptyIntList();\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListAddressesRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesRequest build() {\n        pactus.WalletOuterClass.ListAddressesRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesRequest buildPartial() {\n        pactus.WalletOuterClass.ListAddressesRequest result = new pactus.WalletOuterClass.ListAddressesRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.ListAddressesRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          addressTypes_.makeImmutable();\n          result.addressTypes_ = addressTypes_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListAddressesRequest) {\n          return mergeFrom((pactus.WalletOuterClass.ListAddressesRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListAddressesRequest other) {\n        if (other == pactus.WalletOuterClass.ListAddressesRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.addressTypes_.isEmpty()) {\n          if (addressTypes_.isEmpty()) {\n            addressTypes_ = other.addressTypes_;\n            addressTypes_.makeImmutable();\n            bitField0_ |= 0x00000002;\n          } else {\n            ensureAddressTypesIsMutable();\n            addressTypes_.addAll(other.addressTypes_);\n          }\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                int tmpRaw = input.readEnum();\n                ensureAddressTypesIsMutable();\n                addressTypes_.addInt(tmpRaw);\n                break;\n              } // case 16\n              case 18: {\n                int length = input.readRawVarint32();\n                int limit = input.pushLimit(length);\n                ensureAddressTypesIsMutable();\n                while (input.getBytesUntilLimit() > 0) {\n                  addressTypes_.addInt(input.readEnum());\n                }\n                input.popLimit(limit);\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.Internal.IntList addressTypes_ = emptyIntList();\n      private void ensureAddressTypesIsMutable() {\n        if (!addressTypes_.isModifiable()) {\n          addressTypes_ = makeMutableCopy(addressTypes_);\n        }\n        bitField0_ |= 0x00000002;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @return A list containing the addressTypes.\n       */\n      public java.util.List<pactus.WalletOuterClass.AddressType> getAddressTypesList() {\n        return new com.google.protobuf.Internal.IntListAdapter<\n            pactus.WalletOuterClass.AddressType>(addressTypes_, addressTypes_converter_);\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @return The count of addressTypes.\n       */\n      public int getAddressTypesCount() {\n        return addressTypes_.size();\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param index The index of the element to return.\n       * @return The addressTypes at the given index.\n       */\n      public pactus.WalletOuterClass.AddressType getAddressTypes(int index) {\n        return addressTypes_converter_.convert(addressTypes_.getInt(index));\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param index The index to set the value at.\n       * @param value The addressTypes to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressTypes(\n          int index, pactus.WalletOuterClass.AddressType value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureAddressTypesIsMutable();\n        addressTypes_.setInt(index, value.getNumber());\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param value The addressTypes to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAddressTypes(pactus.WalletOuterClass.AddressType value) {\n        if (value == null) { throw new NullPointerException(); }\n        ensureAddressTypesIsMutable();\n        addressTypes_.addInt(value.getNumber());\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param values The addressTypes to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllAddressTypes(\n          java.lang.Iterable<? extends pactus.WalletOuterClass.AddressType> values) {\n        ensureAddressTypesIsMutable();\n        for (pactus.WalletOuterClass.AddressType value : values) {\n          addressTypes_.addInt(value.getNumber());\n        }\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddressTypes() {\n        addressTypes_ = emptyIntList();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @return A list containing the enum numeric values on the wire for addressTypes.\n       */\n      public java.util.List<java.lang.Integer>\n      getAddressTypesValueList() {\n        addressTypes_.makeImmutable();\n        return addressTypes_;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param index The index of the value to return.\n       * @return The enum numeric value on the wire of addressTypes at the given index.\n       */\n      public int getAddressTypesValue(int index) {\n        return addressTypes_.getInt(index);\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param index The index to set the value at.\n       * @param value The enum numeric value on the wire for addressTypes to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressTypesValue(\n          int index, int value) {\n        ensureAddressTypesIsMutable();\n        addressTypes_.setInt(index, value);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param value The enum numeric value on the wire for addressTypes to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAddressTypesValue(int value) {\n        ensureAddressTypesIsMutable();\n        addressTypes_.addInt(value);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter addresses by their types. If empty, all address types are included.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressType address_types = 2 [json_name = \"addressTypes\"];</code>\n       * @param values The enum numeric values on the wire for addressTypes to add.\n       * @return This builder for chaining.\n       */\n      public Builder addAllAddressTypesValue(\n          java.lang.Iterable<java.lang.Integer> values) {\n        ensureAddressTypesIsMutable();\n        for (int value : values) {\n          addressTypes_.addInt(value);\n        }\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListAddressesRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListAddressesRequest)\n    private static final pactus.WalletOuterClass.ListAddressesRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListAddressesRequest();\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListAddressesRequest>\n        PARSER = new com.google.protobuf.AbstractParser<ListAddressesRequest>() {\n      @java.lang.Override\n      public ListAddressesRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListAddressesRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListAddressesRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListAddressesRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListAddressesResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListAddressesResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    java.util.List<pactus.WalletOuterClass.AddressInfo> \n        getAddrsList();\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    pactus.WalletOuterClass.AddressInfo getAddrs(int index);\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    int getAddrsCount();\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    java.util.List<? extends pactus.WalletOuterClass.AddressInfoOrBuilder> \n        getAddrsOrBuilderList();\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    pactus.WalletOuterClass.AddressInfoOrBuilder getAddrsOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message contains wallet addresses.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListAddressesResponse}\n   */\n  public static final class ListAddressesResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListAddressesResponse)\n      ListAddressesResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListAddressesResponse\");\n    }\n    // Use ListAddressesResponse.newBuilder() to construct.\n    private ListAddressesResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListAddressesResponse() {\n      walletName_ = \"\";\n      addrs_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListAddressesResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListAddressesResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListAddressesResponse.class, pactus.WalletOuterClass.ListAddressesResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the queried wallet.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.WalletOuterClass.AddressInfo> addrs_;\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.WalletOuterClass.AddressInfo> getAddrsList() {\n      return addrs_;\n    }\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.WalletOuterClass.AddressInfoOrBuilder> \n        getAddrsOrBuilderList() {\n      return addrs_;\n    }\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    @java.lang.Override\n    public int getAddrsCount() {\n      return addrs_.size();\n    }\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfo getAddrs(int index) {\n      return addrs_.get(index);\n    }\n    /**\n     * <pre>\n     * List of all addresses in the wallet with their details.\n     * </pre>\n     *\n     * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrsOrBuilder(\n        int index) {\n      return addrs_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      for (int i = 0; i < addrs_.size(); i++) {\n        output.writeMessage(2, addrs_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      for (int i = 0; i < addrs_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, addrs_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListAddressesResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListAddressesResponse other = (pactus.WalletOuterClass.ListAddressesResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getAddrsList()\n          .equals(other.getAddrsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      if (getAddrsCount() > 0) {\n        hash = (37 * hash) + ADDRS_FIELD_NUMBER;\n        hash = (53 * hash) + getAddrsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListAddressesResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListAddressesResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains wallet addresses.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListAddressesResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListAddressesResponse)\n        pactus.WalletOuterClass.ListAddressesResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListAddressesResponse.class, pactus.WalletOuterClass.ListAddressesResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListAddressesResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        if (addrsBuilder_ == null) {\n          addrs_ = java.util.Collections.emptyList();\n        } else {\n          addrs_ = null;\n          addrsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000002);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListAddressesResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListAddressesResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesResponse build() {\n        pactus.WalletOuterClass.ListAddressesResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListAddressesResponse buildPartial() {\n        pactus.WalletOuterClass.ListAddressesResponse result = new pactus.WalletOuterClass.ListAddressesResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.WalletOuterClass.ListAddressesResponse result) {\n        if (addrsBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0)) {\n            addrs_ = java.util.Collections.unmodifiableList(addrs_);\n            bitField0_ = (bitField0_ & ~0x00000002);\n          }\n          result.addrs_ = addrs_;\n        } else {\n          result.addrs_ = addrsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.ListAddressesResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListAddressesResponse) {\n          return mergeFrom((pactus.WalletOuterClass.ListAddressesResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListAddressesResponse other) {\n        if (other == pactus.WalletOuterClass.ListAddressesResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (addrsBuilder_ == null) {\n          if (!other.addrs_.isEmpty()) {\n            if (addrs_.isEmpty()) {\n              addrs_ = other.addrs_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n            } else {\n              ensureAddrsIsMutable();\n              addrs_.addAll(other.addrs_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.addrs_.isEmpty()) {\n            if (addrsBuilder_.isEmpty()) {\n              addrsBuilder_.dispose();\n              addrsBuilder_ = null;\n              addrs_ = other.addrs_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n              addrsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetAddrsFieldBuilder() : null;\n            } else {\n              addrsBuilder_.addAllMessages(other.addrs_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                pactus.WalletOuterClass.AddressInfo m =\n                    input.readMessage(\n                        pactus.WalletOuterClass.AddressInfo.parser(),\n                        extensionRegistry);\n                if (addrsBuilder_ == null) {\n                  ensureAddrsIsMutable();\n                  addrs_.add(m);\n                } else {\n                  addrsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the queried wallet.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.WalletOuterClass.AddressInfo> addrs_ =\n        java.util.Collections.emptyList();\n      private void ensureAddrsIsMutable() {\n        if (!((bitField0_ & 0x00000002) != 0)) {\n          addrs_ = new java.util.ArrayList<pactus.WalletOuterClass.AddressInfo>(addrs_);\n          bitField0_ |= 0x00000002;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> addrsBuilder_;\n\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public java.util.List<pactus.WalletOuterClass.AddressInfo> getAddrsList() {\n        if (addrsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(addrs_);\n        } else {\n          return addrsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public int getAddrsCount() {\n        if (addrsBuilder_ == null) {\n          return addrs_.size();\n        } else {\n          return addrsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo getAddrs(int index) {\n        if (addrsBuilder_ == null) {\n          return addrs_.get(index);\n        } else {\n          return addrsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder setAddrs(\n          int index, pactus.WalletOuterClass.AddressInfo value) {\n        if (addrsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureAddrsIsMutable();\n          addrs_.set(index, value);\n          onChanged();\n        } else {\n          addrsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder setAddrs(\n          int index, pactus.WalletOuterClass.AddressInfo.Builder builderForValue) {\n        if (addrsBuilder_ == null) {\n          ensureAddrsIsMutable();\n          addrs_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          addrsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder addAddrs(pactus.WalletOuterClass.AddressInfo value) {\n        if (addrsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureAddrsIsMutable();\n          addrs_.add(value);\n          onChanged();\n        } else {\n          addrsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder addAddrs(\n          int index, pactus.WalletOuterClass.AddressInfo value) {\n        if (addrsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureAddrsIsMutable();\n          addrs_.add(index, value);\n          onChanged();\n        } else {\n          addrsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder addAddrs(\n          pactus.WalletOuterClass.AddressInfo.Builder builderForValue) {\n        if (addrsBuilder_ == null) {\n          ensureAddrsIsMutable();\n          addrs_.add(builderForValue.build());\n          onChanged();\n        } else {\n          addrsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder addAddrs(\n          int index, pactus.WalletOuterClass.AddressInfo.Builder builderForValue) {\n        if (addrsBuilder_ == null) {\n          ensureAddrsIsMutable();\n          addrs_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          addrsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder addAllAddrs(\n          java.lang.Iterable<? extends pactus.WalletOuterClass.AddressInfo> values) {\n        if (addrsBuilder_ == null) {\n          ensureAddrsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, addrs_);\n          onChanged();\n        } else {\n          addrsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder clearAddrs() {\n        if (addrsBuilder_ == null) {\n          addrs_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000002);\n          onChanged();\n        } else {\n          addrsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public Builder removeAddrs(int index) {\n        if (addrsBuilder_ == null) {\n          ensureAddrsIsMutable();\n          addrs_.remove(index);\n          onChanged();\n        } else {\n          addrsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo.Builder getAddrsBuilder(\n          int index) {\n        return internalGetAddrsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfoOrBuilder getAddrsOrBuilder(\n          int index) {\n        if (addrsBuilder_ == null) {\n          return addrs_.get(index);  } else {\n          return addrsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public java.util.List<? extends pactus.WalletOuterClass.AddressInfoOrBuilder> \n           getAddrsOrBuilderList() {\n        if (addrsBuilder_ != null) {\n          return addrsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(addrs_);\n        }\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo.Builder addAddrsBuilder() {\n        return internalGetAddrsFieldBuilder().addBuilder(\n            pactus.WalletOuterClass.AddressInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public pactus.WalletOuterClass.AddressInfo.Builder addAddrsBuilder(\n          int index) {\n        return internalGetAddrsFieldBuilder().addBuilder(\n            index, pactus.WalletOuterClass.AddressInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of all addresses in the wallet with their details.\n       * </pre>\n       *\n       * <code>repeated .pactus.AddressInfo addrs = 2 [json_name = \"addrs\"];</code>\n       */\n      public java.util.List<pactus.WalletOuterClass.AddressInfo.Builder> \n           getAddrsBuilderList() {\n        return internalGetAddrsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder> \n          internalGetAddrsFieldBuilder() {\n        if (addrsBuilder_ == null) {\n          addrsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.WalletOuterClass.AddressInfo, pactus.WalletOuterClass.AddressInfo.Builder, pactus.WalletOuterClass.AddressInfoOrBuilder>(\n                  addrs_,\n                  ((bitField0_ & 0x00000002) != 0),\n                  getParentForChildren(),\n                  isClean());\n          addrs_ = null;\n        }\n        return addrsBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListAddressesResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListAddressesResponse)\n    private static final pactus.WalletOuterClass.ListAddressesResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListAddressesResponse();\n    }\n\n    public static pactus.WalletOuterClass.ListAddressesResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListAddressesResponse>\n        PARSER = new com.google.protobuf.AbstractParser<ListAddressesResponse>() {\n      @java.lang.Override\n      public ListAddressesResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListAddressesResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListAddressesResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListAddressesResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface UpdatePasswordRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.UpdatePasswordRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet whose password will be updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet whose password will be updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The current wallet password.\n     * </pre>\n     *\n     * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n     * @return The oldPassword.\n     */\n    java.lang.String getOldPassword();\n    /**\n     * <pre>\n     * The current wallet password.\n     * </pre>\n     *\n     * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n     * @return The bytes for oldPassword.\n     */\n    com.google.protobuf.ByteString\n        getOldPasswordBytes();\n\n    /**\n     * <pre>\n     * The new wallet password.\n     * </pre>\n     *\n     * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n     * @return The newPassword.\n     */\n    java.lang.String getNewPassword();\n    /**\n     * <pre>\n     * The new wallet password.\n     * </pre>\n     *\n     * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n     * @return The bytes for newPassword.\n     */\n    com.google.protobuf.ByteString\n        getNewPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for updating wallet password.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.UpdatePasswordRequest}\n   */\n  public static final class UpdatePasswordRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.UpdatePasswordRequest)\n      UpdatePasswordRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"UpdatePasswordRequest\");\n    }\n    // Use UpdatePasswordRequest.newBuilder() to construct.\n    private UpdatePasswordRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private UpdatePasswordRequest() {\n      walletName_ = \"\";\n      oldPassword_ = \"\";\n      newPassword_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.UpdatePasswordRequest.class, pactus.WalletOuterClass.UpdatePasswordRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet whose password will be updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet whose password will be updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int OLD_PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object oldPassword_ = \"\";\n    /**\n     * <pre>\n     * The current wallet password.\n     * </pre>\n     *\n     * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n     * @return The oldPassword.\n     */\n    @java.lang.Override\n    public java.lang.String getOldPassword() {\n      java.lang.Object ref = oldPassword_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        oldPassword_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The current wallet password.\n     * </pre>\n     *\n     * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n     * @return The bytes for oldPassword.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getOldPasswordBytes() {\n      java.lang.Object ref = oldPassword_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        oldPassword_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int NEW_PASSWORD_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object newPassword_ = \"\";\n    /**\n     * <pre>\n     * The new wallet password.\n     * </pre>\n     *\n     * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n     * @return The newPassword.\n     */\n    @java.lang.Override\n    public java.lang.String getNewPassword() {\n      java.lang.Object ref = newPassword_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        newPassword_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The new wallet password.\n     * </pre>\n     *\n     * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n     * @return The bytes for newPassword.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getNewPasswordBytes() {\n      java.lang.Object ref = newPassword_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        newPassword_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oldPassword_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, oldPassword_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(newPassword_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, newPassword_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oldPassword_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, oldPassword_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(newPassword_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, newPassword_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.UpdatePasswordRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.UpdatePasswordRequest other = (pactus.WalletOuterClass.UpdatePasswordRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getOldPassword()\n          .equals(other.getOldPassword())) return false;\n      if (!getNewPassword()\n          .equals(other.getNewPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + OLD_PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getOldPassword().hashCode();\n      hash = (37 * hash) + NEW_PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getNewPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.UpdatePasswordRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for updating wallet password.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.UpdatePasswordRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.UpdatePasswordRequest)\n        pactus.WalletOuterClass.UpdatePasswordRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.UpdatePasswordRequest.class, pactus.WalletOuterClass.UpdatePasswordRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.UpdatePasswordRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        oldPassword_ = \"\";\n        newPassword_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.UpdatePasswordRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordRequest build() {\n        pactus.WalletOuterClass.UpdatePasswordRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordRequest buildPartial() {\n        pactus.WalletOuterClass.UpdatePasswordRequest result = new pactus.WalletOuterClass.UpdatePasswordRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.UpdatePasswordRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.oldPassword_ = oldPassword_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.newPassword_ = newPassword_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.UpdatePasswordRequest) {\n          return mergeFrom((pactus.WalletOuterClass.UpdatePasswordRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.UpdatePasswordRequest other) {\n        if (other == pactus.WalletOuterClass.UpdatePasswordRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getOldPassword().isEmpty()) {\n          oldPassword_ = other.oldPassword_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getNewPassword().isEmpty()) {\n          newPassword_ = other.newPassword_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                oldPassword_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                newPassword_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet whose password will be updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password will be updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password will be updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password will be updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password will be updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object oldPassword_ = \"\";\n      /**\n       * <pre>\n       * The current wallet password.\n       * </pre>\n       *\n       * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n       * @return The oldPassword.\n       */\n      public java.lang.String getOldPassword() {\n        java.lang.Object ref = oldPassword_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          oldPassword_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The current wallet password.\n       * </pre>\n       *\n       * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n       * @return The bytes for oldPassword.\n       */\n      public com.google.protobuf.ByteString\n          getOldPasswordBytes() {\n        java.lang.Object ref = oldPassword_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          oldPassword_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The current wallet password.\n       * </pre>\n       *\n       * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n       * @param value The oldPassword to set.\n       * @return This builder for chaining.\n       */\n      public Builder setOldPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        oldPassword_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The current wallet password.\n       * </pre>\n       *\n       * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearOldPassword() {\n        oldPassword_ = getDefaultInstance().getOldPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The current wallet password.\n       * </pre>\n       *\n       * <code>string old_password = 2 [json_name = \"oldPassword\"];</code>\n       * @param value The bytes for oldPassword to set.\n       * @return This builder for chaining.\n       */\n      public Builder setOldPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        oldPassword_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object newPassword_ = \"\";\n      /**\n       * <pre>\n       * The new wallet password.\n       * </pre>\n       *\n       * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n       * @return The newPassword.\n       */\n      public java.lang.String getNewPassword() {\n        java.lang.Object ref = newPassword_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          newPassword_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new wallet password.\n       * </pre>\n       *\n       * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n       * @return The bytes for newPassword.\n       */\n      public com.google.protobuf.ByteString\n          getNewPasswordBytes() {\n        java.lang.Object ref = newPassword_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          newPassword_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The new wallet password.\n       * </pre>\n       *\n       * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n       * @param value The newPassword to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNewPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        newPassword_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new wallet password.\n       * </pre>\n       *\n       * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNewPassword() {\n        newPassword_ = getDefaultInstance().getNewPassword();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The new wallet password.\n       * </pre>\n       *\n       * <code>string new_password = 3 [json_name = \"newPassword\"];</code>\n       * @param value The bytes for newPassword to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNewPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        newPassword_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.UpdatePasswordRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.UpdatePasswordRequest)\n    private static final pactus.WalletOuterClass.UpdatePasswordRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.UpdatePasswordRequest();\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<UpdatePasswordRequest>\n        PARSER = new com.google.protobuf.AbstractParser<UpdatePasswordRequest>() {\n      @java.lang.Override\n      public UpdatePasswordRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<UpdatePasswordRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<UpdatePasswordRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.UpdatePasswordRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface UpdatePasswordResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.UpdatePasswordResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet whose password was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet whose password was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message confirming wallet password update.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.UpdatePasswordResponse}\n   */\n  public static final class UpdatePasswordResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.UpdatePasswordResponse)\n      UpdatePasswordResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"UpdatePasswordResponse\");\n    }\n    // Use UpdatePasswordResponse.newBuilder() to construct.\n    private UpdatePasswordResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private UpdatePasswordResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.UpdatePasswordResponse.class, pactus.WalletOuterClass.UpdatePasswordResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet whose password was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet whose password was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.UpdatePasswordResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.UpdatePasswordResponse other = (pactus.WalletOuterClass.UpdatePasswordResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.UpdatePasswordResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.UpdatePasswordResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message confirming wallet password update.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.UpdatePasswordResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.UpdatePasswordResponse)\n        pactus.WalletOuterClass.UpdatePasswordResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.UpdatePasswordResponse.class, pactus.WalletOuterClass.UpdatePasswordResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.UpdatePasswordResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_UpdatePasswordResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.UpdatePasswordResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordResponse build() {\n        pactus.WalletOuterClass.UpdatePasswordResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.UpdatePasswordResponse buildPartial() {\n        pactus.WalletOuterClass.UpdatePasswordResponse result = new pactus.WalletOuterClass.UpdatePasswordResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.UpdatePasswordResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.UpdatePasswordResponse) {\n          return mergeFrom((pactus.WalletOuterClass.UpdatePasswordResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.UpdatePasswordResponse other) {\n        if (other == pactus.WalletOuterClass.UpdatePasswordResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet whose password was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet whose password was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.UpdatePasswordResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.UpdatePasswordResponse)\n    private static final pactus.WalletOuterClass.UpdatePasswordResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.UpdatePasswordResponse();\n    }\n\n    public static pactus.WalletOuterClass.UpdatePasswordResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<UpdatePasswordResponse>\n        PARSER = new com.google.protobuf.AbstractParser<UpdatePasswordResponse>() {\n      @java.lang.Override\n      public UpdatePasswordResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<UpdatePasswordResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<UpdatePasswordResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.UpdatePasswordResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface WalletTransactionInfoOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.WalletTransactionInfo)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * A sequence number for the transaction in the wallet.\n     * </pre>\n     *\n     * <code>int64 no = 1 [json_name = \"no\"];</code>\n     * @return The no.\n     */\n    long getNo();\n\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n     * @return The txId.\n     */\n    java.lang.String getTxId();\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n     * @return The bytes for txId.\n     */\n    com.google.protobuf.ByteString\n        getTxIdBytes();\n\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 3 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    java.lang.String getSender();\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 3 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    com.google.protobuf.ByteString\n        getSenderBytes();\n\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    java.lang.String getReceiver();\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    com.google.protobuf.ByteString\n        getReceiverBytes();\n\n    /**\n     * <pre>\n     * The direction of the transaction relative to the wallet.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    int getDirectionValue();\n    /**\n     * <pre>\n     * The direction of the transaction relative to the wallet.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    pactus.WalletOuterClass.TxDirection getDirection();\n\n    /**\n     * <pre>\n     * The amount involved in the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 6 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 7 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    long getFee();\n\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    java.lang.String getMemo();\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    com.google.protobuf.ByteString\n        getMemoBytes();\n\n    /**\n     * <pre>\n     * The current status of the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n     * @return The enum numeric value on the wire for status.\n     */\n    int getStatusValue();\n    /**\n     * <pre>\n     * The current status of the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n     * @return The status.\n     */\n    pactus.WalletOuterClass.TransactionStatus getStatus();\n\n    /**\n     * <pre>\n     * The block height containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_height = 10 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    int getBlockHeight();\n\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    int getPayloadTypeValue();\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    pactus.TransactionOuterClass.PayloadType getPayloadType();\n\n    /**\n     * <pre>\n     * The raw transaction data.\n     * </pre>\n     *\n     * <code>bytes data = 12 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    com.google.protobuf.ByteString getData();\n\n    /**\n     * <pre>\n     * A comment associated with the transaction in the wallet.\n     * </pre>\n     *\n     * <code>string comment = 13 [json_name = \"comment\"];</code>\n     * @return The comment.\n     */\n    java.lang.String getComment();\n    /**\n     * <pre>\n     * A comment associated with the transaction in the wallet.\n     * </pre>\n     *\n     * <code>string comment = 13 [json_name = \"comment\"];</code>\n     * @return The bytes for comment.\n     */\n    com.google.protobuf.ByteString\n        getCommentBytes();\n\n    /**\n     * <pre>\n     * Unix timestamp of when the transaction was created.\n     * </pre>\n     *\n     * <code>int64 created_at = 14 [json_name = \"createdAt\"];</code>\n     * @return The createdAt.\n     */\n    long getCreatedAt();\n\n    /**\n     * <pre>\n     * Unix timestamp of when the transaction was last updated.\n     * </pre>\n     *\n     * <code>int64 updated_at = 15 [json_name = \"updatedAt\"];</code>\n     * @return The updatedAt.\n     */\n    long getUpdatedAt();\n  }\n  /**\n   * <pre>\n   * WalletTransactionInfo contains information about a transaction in a wallet.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.WalletTransactionInfo}\n   */\n  public static final class WalletTransactionInfo extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.WalletTransactionInfo)\n      WalletTransactionInfoOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"WalletTransactionInfo\");\n    }\n    // Use WalletTransactionInfo.newBuilder() to construct.\n    private WalletTransactionInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private WalletTransactionInfo() {\n      txId_ = \"\";\n      sender_ = \"\";\n      receiver_ = \"\";\n      direction_ = 0;\n      memo_ = \"\";\n      status_ = 0;\n      payloadType_ = 0;\n      data_ = com.google.protobuf.ByteString.EMPTY;\n      comment_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_WalletTransactionInfo_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_WalletTransactionInfo_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.WalletTransactionInfo.class, pactus.WalletOuterClass.WalletTransactionInfo.Builder.class);\n    }\n\n    public static final int NO_FIELD_NUMBER = 1;\n    private long no_ = 0L;\n    /**\n     * <pre>\n     * A sequence number for the transaction in the wallet.\n     * </pre>\n     *\n     * <code>int64 no = 1 [json_name = \"no\"];</code>\n     * @return The no.\n     */\n    @java.lang.Override\n    public long getNo() {\n      return no_;\n    }\n\n    public static final int TX_ID_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object txId_ = \"\";\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n     * @return The txId.\n     */\n    @java.lang.Override\n    public java.lang.String getTxId() {\n      java.lang.Object ref = txId_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        txId_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The unique ID of the transaction.\n     * </pre>\n     *\n     * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n     * @return The bytes for txId.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getTxIdBytes() {\n      java.lang.Object ref = txId_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        txId_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int SENDER_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object sender_ = \"\";\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 3 [json_name = \"sender\"];</code>\n     * @return The sender.\n     */\n    @java.lang.Override\n    public java.lang.String getSender() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        sender_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The sender's address.\n     * </pre>\n     *\n     * <code>string sender = 3 [json_name = \"sender\"];</code>\n     * @return The bytes for sender.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getSenderBytes() {\n      java.lang.Object ref = sender_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        sender_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int RECEIVER_FIELD_NUMBER = 4;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object receiver_ = \"\";\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n     * @return The receiver.\n     */\n    @java.lang.Override\n    public java.lang.String getReceiver() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        receiver_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The receiver's address.\n     * </pre>\n     *\n     * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n     * @return The bytes for receiver.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getReceiverBytes() {\n      java.lang.Object ref = receiver_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        receiver_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DIRECTION_FIELD_NUMBER = 5;\n    private int direction_ = 0;\n    /**\n     * <pre>\n     * The direction of the transaction relative to the wallet.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    @java.lang.Override public int getDirectionValue() {\n      return direction_;\n    }\n    /**\n     * <pre>\n     * The direction of the transaction relative to the wallet.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    @java.lang.Override public pactus.WalletOuterClass.TxDirection getDirection() {\n      pactus.WalletOuterClass.TxDirection result = pactus.WalletOuterClass.TxDirection.forNumber(direction_);\n      return result == null ? pactus.WalletOuterClass.TxDirection.UNRECOGNIZED : result;\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 6;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The amount involved in the transaction in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 6 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    public static final int FEE_FIELD_NUMBER = 7;\n    private long fee_ = 0L;\n    /**\n     * <pre>\n     * The transaction fee in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 fee = 7 [json_name = \"fee\"];</code>\n     * @return The fee.\n     */\n    @java.lang.Override\n    public long getFee() {\n      return fee_;\n    }\n\n    public static final int MEMO_FIELD_NUMBER = 8;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object memo_ = \"\";\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The memo.\n     */\n    @java.lang.Override\n    public java.lang.String getMemo() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        memo_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A memo string for the transaction.\n     * </pre>\n     *\n     * <code>string memo = 8 [json_name = \"memo\"];</code>\n     * @return The bytes for memo.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMemoBytes() {\n      java.lang.Object ref = memo_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        memo_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int STATUS_FIELD_NUMBER = 9;\n    private int status_ = 0;\n    /**\n     * <pre>\n     * The current status of the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n     * @return The enum numeric value on the wire for status.\n     */\n    @java.lang.Override public int getStatusValue() {\n      return status_;\n    }\n    /**\n     * <pre>\n     * The current status of the transaction.\n     * </pre>\n     *\n     * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n     * @return The status.\n     */\n    @java.lang.Override public pactus.WalletOuterClass.TransactionStatus getStatus() {\n      pactus.WalletOuterClass.TransactionStatus result = pactus.WalletOuterClass.TransactionStatus.forNumber(status_);\n      return result == null ? pactus.WalletOuterClass.TransactionStatus.UNRECOGNIZED : result;\n    }\n\n    public static final int BLOCK_HEIGHT_FIELD_NUMBER = 10;\n    private int blockHeight_ = 0;\n    /**\n     * <pre>\n     * The block height containing the transaction.\n     * </pre>\n     *\n     * <code>uint32 block_height = 10 [json_name = \"blockHeight\"];</code>\n     * @return The blockHeight.\n     */\n    @java.lang.Override\n    public int getBlockHeight() {\n      return blockHeight_;\n    }\n\n    public static final int PAYLOAD_TYPE_FIELD_NUMBER = 11;\n    private int payloadType_ = 0;\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n     * @return The enum numeric value on the wire for payloadType.\n     */\n    @java.lang.Override public int getPayloadTypeValue() {\n      return payloadType_;\n    }\n    /**\n     * <pre>\n     * The type of transaction payload.\n     * </pre>\n     *\n     * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n     * @return The payloadType.\n     */\n    @java.lang.Override public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n      pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n      return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n    }\n\n    public static final int DATA_FIELD_NUMBER = 12;\n    private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;\n    /**\n     * <pre>\n     * The raw transaction data.\n     * </pre>\n     *\n     * <code>bytes data = 12 [json_name = \"data\"];</code>\n     * @return The data.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString getData() {\n      return data_;\n    }\n\n    public static final int COMMENT_FIELD_NUMBER = 13;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object comment_ = \"\";\n    /**\n     * <pre>\n     * A comment associated with the transaction in the wallet.\n     * </pre>\n     *\n     * <code>string comment = 13 [json_name = \"comment\"];</code>\n     * @return The comment.\n     */\n    @java.lang.Override\n    public java.lang.String getComment() {\n      java.lang.Object ref = comment_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        comment_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * A comment associated with the transaction in the wallet.\n     * </pre>\n     *\n     * <code>string comment = 13 [json_name = \"comment\"];</code>\n     * @return The bytes for comment.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getCommentBytes() {\n      java.lang.Object ref = comment_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        comment_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int CREATED_AT_FIELD_NUMBER = 14;\n    private long createdAt_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp of when the transaction was created.\n     * </pre>\n     *\n     * <code>int64 created_at = 14 [json_name = \"createdAt\"];</code>\n     * @return The createdAt.\n     */\n    @java.lang.Override\n    public long getCreatedAt() {\n      return createdAt_;\n    }\n\n    public static final int UPDATED_AT_FIELD_NUMBER = 15;\n    private long updatedAt_ = 0L;\n    /**\n     * <pre>\n     * Unix timestamp of when the transaction was last updated.\n     * </pre>\n     *\n     * <code>int64 updated_at = 15 [json_name = \"updatedAt\"];</code>\n     * @return The updatedAt.\n     */\n    @java.lang.Override\n    public long getUpdatedAt() {\n      return updatedAt_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (no_ != 0L) {\n        output.writeInt64(1, no_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(txId_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, txId_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 4, receiver_);\n      }\n      if (direction_ != pactus.WalletOuterClass.TxDirection.TX_DIRECTION_ANY.getNumber()) {\n        output.writeEnum(5, direction_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(6, amount_);\n      }\n      if (fee_ != 0L) {\n        output.writeInt64(7, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 8, memo_);\n      }\n      if (status_ != pactus.WalletOuterClass.TransactionStatus.TRANSACTION_STATUS_PENDING.getNumber()) {\n        output.writeEnum(9, status_);\n      }\n      if (blockHeight_ != 0) {\n        output.writeUInt32(10, blockHeight_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        output.writeEnum(11, payloadType_);\n      }\n      if (!data_.isEmpty()) {\n        output.writeBytes(12, data_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(comment_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 13, comment_);\n      }\n      if (createdAt_ != 0L) {\n        output.writeInt64(14, createdAt_);\n      }\n      if (updatedAt_ != 0L) {\n        output.writeInt64(15, updatedAt_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (no_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(1, no_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(txId_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, txId_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sender_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receiver_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, receiver_);\n      }\n      if (direction_ != pactus.WalletOuterClass.TxDirection.TX_DIRECTION_ANY.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(5, direction_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(6, amount_);\n      }\n      if (fee_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(7, fee_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memo_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, memo_);\n      }\n      if (status_ != pactus.WalletOuterClass.TransactionStatus.TRANSACTION_STATUS_PENDING.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(9, status_);\n      }\n      if (blockHeight_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeUInt32Size(10, blockHeight_);\n      }\n      if (payloadType_ != pactus.TransactionOuterClass.PayloadType.PAYLOAD_TYPE_UNSPECIFIED.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(11, payloadType_);\n      }\n      if (!data_.isEmpty()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeBytesSize(12, data_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(comment_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(13, comment_);\n      }\n      if (createdAt_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(14, createdAt_);\n      }\n      if (updatedAt_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(15, updatedAt_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.WalletTransactionInfo)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.WalletTransactionInfo other = (pactus.WalletOuterClass.WalletTransactionInfo) obj;\n\n      if (getNo()\n          != other.getNo()) return false;\n      if (!getTxId()\n          .equals(other.getTxId())) return false;\n      if (!getSender()\n          .equals(other.getSender())) return false;\n      if (!getReceiver()\n          .equals(other.getReceiver())) return false;\n      if (direction_ != other.direction_) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (getFee()\n          != other.getFee()) return false;\n      if (!getMemo()\n          .equals(other.getMemo())) return false;\n      if (status_ != other.status_) return false;\n      if (getBlockHeight()\n          != other.getBlockHeight()) return false;\n      if (payloadType_ != other.payloadType_) return false;\n      if (!getData()\n          .equals(other.getData())) return false;\n      if (!getComment()\n          .equals(other.getComment())) return false;\n      if (getCreatedAt()\n          != other.getCreatedAt()) return false;\n      if (getUpdatedAt()\n          != other.getUpdatedAt()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + NO_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getNo());\n      hash = (37 * hash) + TX_ID_FIELD_NUMBER;\n      hash = (53 * hash) + getTxId().hashCode();\n      hash = (37 * hash) + SENDER_FIELD_NUMBER;\n      hash = (53 * hash) + getSender().hashCode();\n      hash = (37 * hash) + RECEIVER_FIELD_NUMBER;\n      hash = (53 * hash) + getReceiver().hashCode();\n      hash = (37 * hash) + DIRECTION_FIELD_NUMBER;\n      hash = (53 * hash) + direction_;\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (37 * hash) + FEE_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getFee());\n      hash = (37 * hash) + MEMO_FIELD_NUMBER;\n      hash = (53 * hash) + getMemo().hashCode();\n      hash = (37 * hash) + STATUS_FIELD_NUMBER;\n      hash = (53 * hash) + status_;\n      hash = (37 * hash) + BLOCK_HEIGHT_FIELD_NUMBER;\n      hash = (53 * hash) + getBlockHeight();\n      hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER;\n      hash = (53 * hash) + payloadType_;\n      hash = (37 * hash) + DATA_FIELD_NUMBER;\n      hash = (53 * hash) + getData().hashCode();\n      hash = (37 * hash) + COMMENT_FIELD_NUMBER;\n      hash = (53 * hash) + getComment().hashCode();\n      hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getCreatedAt());\n      hash = (37 * hash) + UPDATED_AT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getUpdatedAt());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.WalletTransactionInfo parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.WalletTransactionInfo prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * WalletTransactionInfo contains information about a transaction in a wallet.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.WalletTransactionInfo}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.WalletTransactionInfo)\n        pactus.WalletOuterClass.WalletTransactionInfoOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_WalletTransactionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_WalletTransactionInfo_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.WalletTransactionInfo.class, pactus.WalletOuterClass.WalletTransactionInfo.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.WalletTransactionInfo.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        no_ = 0L;\n        txId_ = \"\";\n        sender_ = \"\";\n        receiver_ = \"\";\n        direction_ = 0;\n        amount_ = 0L;\n        fee_ = 0L;\n        memo_ = \"\";\n        status_ = 0;\n        blockHeight_ = 0;\n        payloadType_ = 0;\n        data_ = com.google.protobuf.ByteString.EMPTY;\n        comment_ = \"\";\n        createdAt_ = 0L;\n        updatedAt_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_WalletTransactionInfo_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.WalletTransactionInfo getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.WalletTransactionInfo.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.WalletTransactionInfo build() {\n        pactus.WalletOuterClass.WalletTransactionInfo result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.WalletTransactionInfo buildPartial() {\n        pactus.WalletOuterClass.WalletTransactionInfo result = new pactus.WalletOuterClass.WalletTransactionInfo(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.WalletTransactionInfo result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.no_ = no_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.txId_ = txId_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.sender_ = sender_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.receiver_ = receiver_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.direction_ = direction_;\n        }\n        if (((from_bitField0_ & 0x00000020) != 0)) {\n          result.amount_ = amount_;\n        }\n        if (((from_bitField0_ & 0x00000040) != 0)) {\n          result.fee_ = fee_;\n        }\n        if (((from_bitField0_ & 0x00000080) != 0)) {\n          result.memo_ = memo_;\n        }\n        if (((from_bitField0_ & 0x00000100) != 0)) {\n          result.status_ = status_;\n        }\n        if (((from_bitField0_ & 0x00000200) != 0)) {\n          result.blockHeight_ = blockHeight_;\n        }\n        if (((from_bitField0_ & 0x00000400) != 0)) {\n          result.payloadType_ = payloadType_;\n        }\n        if (((from_bitField0_ & 0x00000800) != 0)) {\n          result.data_ = data_;\n        }\n        if (((from_bitField0_ & 0x00001000) != 0)) {\n          result.comment_ = comment_;\n        }\n        if (((from_bitField0_ & 0x00002000) != 0)) {\n          result.createdAt_ = createdAt_;\n        }\n        if (((from_bitField0_ & 0x00004000) != 0)) {\n          result.updatedAt_ = updatedAt_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.WalletTransactionInfo) {\n          return mergeFrom((pactus.WalletOuterClass.WalletTransactionInfo)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.WalletTransactionInfo other) {\n        if (other == pactus.WalletOuterClass.WalletTransactionInfo.getDefaultInstance()) return this;\n        if (other.getNo() != 0L) {\n          setNo(other.getNo());\n        }\n        if (!other.getTxId().isEmpty()) {\n          txId_ = other.txId_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getSender().isEmpty()) {\n          sender_ = other.sender_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        if (!other.getReceiver().isEmpty()) {\n          receiver_ = other.receiver_;\n          bitField0_ |= 0x00000008;\n          onChanged();\n        }\n        if (other.direction_ != 0) {\n          setDirectionValue(other.getDirectionValue());\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        if (other.getFee() != 0L) {\n          setFee(other.getFee());\n        }\n        if (!other.getMemo().isEmpty()) {\n          memo_ = other.memo_;\n          bitField0_ |= 0x00000080;\n          onChanged();\n        }\n        if (other.status_ != 0) {\n          setStatusValue(other.getStatusValue());\n        }\n        if (other.getBlockHeight() != 0) {\n          setBlockHeight(other.getBlockHeight());\n        }\n        if (other.payloadType_ != 0) {\n          setPayloadTypeValue(other.getPayloadTypeValue());\n        }\n        if (!other.getData().isEmpty()) {\n          setData(other.getData());\n        }\n        if (!other.getComment().isEmpty()) {\n          comment_ = other.comment_;\n          bitField0_ |= 0x00001000;\n          onChanged();\n        }\n        if (other.getCreatedAt() != 0L) {\n          setCreatedAt(other.getCreatedAt());\n        }\n        if (other.getUpdatedAt() != 0L) {\n          setUpdatedAt(other.getUpdatedAt());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 8: {\n                no_ = input.readInt64();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 8\n              case 18: {\n                txId_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                sender_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              case 34: {\n                receiver_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 34\n              case 40: {\n                direction_ = input.readEnum();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              case 48: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000020;\n                break;\n              } // case 48\n              case 56: {\n                fee_ = input.readInt64();\n                bitField0_ |= 0x00000040;\n                break;\n              } // case 56\n              case 66: {\n                memo_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000080;\n                break;\n              } // case 66\n              case 72: {\n                status_ = input.readEnum();\n                bitField0_ |= 0x00000100;\n                break;\n              } // case 72\n              case 80: {\n                blockHeight_ = input.readUInt32();\n                bitField0_ |= 0x00000200;\n                break;\n              } // case 80\n              case 88: {\n                payloadType_ = input.readEnum();\n                bitField0_ |= 0x00000400;\n                break;\n              } // case 88\n              case 98: {\n                data_ = input.readBytes();\n                bitField0_ |= 0x00000800;\n                break;\n              } // case 98\n              case 106: {\n                comment_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00001000;\n                break;\n              } // case 106\n              case 112: {\n                createdAt_ = input.readInt64();\n                bitField0_ |= 0x00002000;\n                break;\n              } // case 112\n              case 120: {\n                updatedAt_ = input.readInt64();\n                bitField0_ |= 0x00004000;\n                break;\n              } // case 120\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private long no_ ;\n      /**\n       * <pre>\n       * A sequence number for the transaction in the wallet.\n       * </pre>\n       *\n       * <code>int64 no = 1 [json_name = \"no\"];</code>\n       * @return The no.\n       */\n      @java.lang.Override\n      public long getNo() {\n        return no_;\n      }\n      /**\n       * <pre>\n       * A sequence number for the transaction in the wallet.\n       * </pre>\n       *\n       * <code>int64 no = 1 [json_name = \"no\"];</code>\n       * @param value The no to set.\n       * @return This builder for chaining.\n       */\n      public Builder setNo(long value) {\n\n        no_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A sequence number for the transaction in the wallet.\n       * </pre>\n       *\n       * <code>int64 no = 1 [json_name = \"no\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearNo() {\n        bitField0_ = (bitField0_ & ~0x00000001);\n        no_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object txId_ = \"\";\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n       * @return The txId.\n       */\n      public java.lang.String getTxId() {\n        java.lang.Object ref = txId_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          txId_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n       * @return The bytes for txId.\n       */\n      public com.google.protobuf.ByteString\n          getTxIdBytes() {\n        java.lang.Object ref = txId_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          txId_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n       * @param value The txId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTxId(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        txId_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearTxId() {\n        txId_ = getDefaultInstance().getTxId();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The unique ID of the transaction.\n       * </pre>\n       *\n       * <code>string tx_id = 2 [json_name = \"txId\"];</code>\n       * @param value The bytes for txId to set.\n       * @return This builder for chaining.\n       */\n      public Builder setTxIdBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        txId_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object sender_ = \"\";\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 3 [json_name = \"sender\"];</code>\n       * @return The sender.\n       */\n      public java.lang.String getSender() {\n        java.lang.Object ref = sender_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          sender_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 3 [json_name = \"sender\"];</code>\n       * @return The bytes for sender.\n       */\n      public com.google.protobuf.ByteString\n          getSenderBytes() {\n        java.lang.Object ref = sender_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          sender_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 3 [json_name = \"sender\"];</code>\n       * @param value The sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSender(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        sender_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 3 [json_name = \"sender\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSender() {\n        sender_ = getDefaultInstance().getSender();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The sender's address.\n       * </pre>\n       *\n       * <code>string sender = 3 [json_name = \"sender\"];</code>\n       * @param value The bytes for sender to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSenderBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        sender_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object receiver_ = \"\";\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n       * @return The receiver.\n       */\n      public java.lang.String getReceiver() {\n        java.lang.Object ref = receiver_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          receiver_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n       * @return The bytes for receiver.\n       */\n      public com.google.protobuf.ByteString\n          getReceiverBytes() {\n        java.lang.Object ref = receiver_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          receiver_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n       * @param value The receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiver(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        receiver_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearReceiver() {\n        receiver_ = getDefaultInstance().getReceiver();\n        bitField0_ = (bitField0_ & ~0x00000008);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The receiver's address.\n       * </pre>\n       *\n       * <code>string receiver = 4 [json_name = \"receiver\"];</code>\n       * @param value The bytes for receiver to set.\n       * @return This builder for chaining.\n       */\n      public Builder setReceiverBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        receiver_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n\n      private int direction_ = 0;\n      /**\n       * <pre>\n       * The direction of the transaction relative to the wallet.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n       * @return The enum numeric value on the wire for direction.\n       */\n      @java.lang.Override public int getDirectionValue() {\n        return direction_;\n      }\n      /**\n       * <pre>\n       * The direction of the transaction relative to the wallet.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n       * @param value The enum numeric value on the wire for direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirectionValue(int value) {\n        direction_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The direction of the transaction relative to the wallet.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n       * @return The direction.\n       */\n      @java.lang.Override\n      public pactus.WalletOuterClass.TxDirection getDirection() {\n        pactus.WalletOuterClass.TxDirection result = pactus.WalletOuterClass.TxDirection.forNumber(direction_);\n        return result == null ? pactus.WalletOuterClass.TxDirection.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The direction of the transaction relative to the wallet.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n       * @param value The direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirection(pactus.WalletOuterClass.TxDirection value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000010;\n        direction_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The direction of the transaction relative to the wallet.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 5 [json_name = \"direction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDirection() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        direction_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The amount involved in the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 6 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The amount involved in the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 6 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000020;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The amount involved in the transaction in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 6 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000020);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long fee_ ;\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 7 [json_name = \"fee\"];</code>\n       * @return The fee.\n       */\n      @java.lang.Override\n      public long getFee() {\n        return fee_;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 7 [json_name = \"fee\"];</code>\n       * @param value The fee to set.\n       * @return This builder for chaining.\n       */\n      public Builder setFee(long value) {\n\n        fee_ = value;\n        bitField0_ |= 0x00000040;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The transaction fee in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 fee = 7 [json_name = \"fee\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearFee() {\n        bitField0_ = (bitField0_ & ~0x00000040);\n        fee_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object memo_ = \"\";\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return The memo.\n       */\n      public java.lang.String getMemo() {\n        java.lang.Object ref = memo_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          memo_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return The bytes for memo.\n       */\n      public com.google.protobuf.ByteString\n          getMemoBytes() {\n        java.lang.Object ref = memo_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          memo_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @param value The memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemo(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        memo_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMemo() {\n        memo_ = getDefaultInstance().getMemo();\n        bitField0_ = (bitField0_ & ~0x00000080);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A memo string for the transaction.\n       * </pre>\n       *\n       * <code>string memo = 8 [json_name = \"memo\"];</code>\n       * @param value The bytes for memo to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMemoBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        memo_ = value;\n        bitField0_ |= 0x00000080;\n        onChanged();\n        return this;\n      }\n\n      private int status_ = 0;\n      /**\n       * <pre>\n       * The current status of the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n       * @return The enum numeric value on the wire for status.\n       */\n      @java.lang.Override public int getStatusValue() {\n        return status_;\n      }\n      /**\n       * <pre>\n       * The current status of the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n       * @param value The enum numeric value on the wire for status to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStatusValue(int value) {\n        status_ = value;\n        bitField0_ |= 0x00000100;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The current status of the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n       * @return The status.\n       */\n      @java.lang.Override\n      public pactus.WalletOuterClass.TransactionStatus getStatus() {\n        pactus.WalletOuterClass.TransactionStatus result = pactus.WalletOuterClass.TransactionStatus.forNumber(status_);\n        return result == null ? pactus.WalletOuterClass.TransactionStatus.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The current status of the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n       * @param value The status to set.\n       * @return This builder for chaining.\n       */\n      public Builder setStatus(pactus.WalletOuterClass.TransactionStatus value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000100;\n        status_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The current status of the transaction.\n       * </pre>\n       *\n       * <code>.pactus.TransactionStatus status = 9 [json_name = \"status\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearStatus() {\n        bitField0_ = (bitField0_ & ~0x00000100);\n        status_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int blockHeight_ ;\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 10 [json_name = \"blockHeight\"];</code>\n       * @return The blockHeight.\n       */\n      @java.lang.Override\n      public int getBlockHeight() {\n        return blockHeight_;\n      }\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 10 [json_name = \"blockHeight\"];</code>\n       * @param value The blockHeight to set.\n       * @return This builder for chaining.\n       */\n      public Builder setBlockHeight(int value) {\n\n        blockHeight_ = value;\n        bitField0_ |= 0x00000200;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The block height containing the transaction.\n       * </pre>\n       *\n       * <code>uint32 block_height = 10 [json_name = \"blockHeight\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearBlockHeight() {\n        bitField0_ = (bitField0_ & ~0x00000200);\n        blockHeight_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int payloadType_ = 0;\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n       * @return The enum numeric value on the wire for payloadType.\n       */\n      @java.lang.Override public int getPayloadTypeValue() {\n        return payloadType_;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n       * @param value The enum numeric value on the wire for payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadTypeValue(int value) {\n        payloadType_ = value;\n        bitField0_ |= 0x00000400;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n       * @return The payloadType.\n       */\n      @java.lang.Override\n      public pactus.TransactionOuterClass.PayloadType getPayloadType() {\n        pactus.TransactionOuterClass.PayloadType result = pactus.TransactionOuterClass.PayloadType.forNumber(payloadType_);\n        return result == null ? pactus.TransactionOuterClass.PayloadType.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n       * @param value The payloadType to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPayloadType(pactus.TransactionOuterClass.PayloadType value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000400;\n        payloadType_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The type of transaction payload.\n       * </pre>\n       *\n       * <code>.pactus.PayloadType payload_type = 11 [json_name = \"payloadType\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPayloadType() {\n        bitField0_ = (bitField0_ & ~0x00000400);\n        payloadType_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;\n      /**\n       * <pre>\n       * The raw transaction data.\n       * </pre>\n       *\n       * <code>bytes data = 12 [json_name = \"data\"];</code>\n       * @return The data.\n       */\n      @java.lang.Override\n      public com.google.protobuf.ByteString getData() {\n        return data_;\n      }\n      /**\n       * <pre>\n       * The raw transaction data.\n       * </pre>\n       *\n       * <code>bytes data = 12 [json_name = \"data\"];</code>\n       * @param value The data to set.\n       * @return This builder for chaining.\n       */\n      public Builder setData(com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        data_ = value;\n        bitField0_ |= 0x00000800;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The raw transaction data.\n       * </pre>\n       *\n       * <code>bytes data = 12 [json_name = \"data\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearData() {\n        bitField0_ = (bitField0_ & ~0x00000800);\n        data_ = getDefaultInstance().getData();\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object comment_ = \"\";\n      /**\n       * <pre>\n       * A comment associated with the transaction in the wallet.\n       * </pre>\n       *\n       * <code>string comment = 13 [json_name = \"comment\"];</code>\n       * @return The comment.\n       */\n      public java.lang.String getComment() {\n        java.lang.Object ref = comment_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          comment_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A comment associated with the transaction in the wallet.\n       * </pre>\n       *\n       * <code>string comment = 13 [json_name = \"comment\"];</code>\n       * @return The bytes for comment.\n       */\n      public com.google.protobuf.ByteString\n          getCommentBytes() {\n        java.lang.Object ref = comment_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          comment_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * A comment associated with the transaction in the wallet.\n       * </pre>\n       *\n       * <code>string comment = 13 [json_name = \"comment\"];</code>\n       * @param value The comment to set.\n       * @return This builder for chaining.\n       */\n      public Builder setComment(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        comment_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A comment associated with the transaction in the wallet.\n       * </pre>\n       *\n       * <code>string comment = 13 [json_name = \"comment\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearComment() {\n        comment_ = getDefaultInstance().getComment();\n        bitField0_ = (bitField0_ & ~0x00001000);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * A comment associated with the transaction in the wallet.\n       * </pre>\n       *\n       * <code>string comment = 13 [json_name = \"comment\"];</code>\n       * @param value The bytes for comment to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCommentBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        comment_ = value;\n        bitField0_ |= 0x00001000;\n        onChanged();\n        return this;\n      }\n\n      private long createdAt_ ;\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was created.\n       * </pre>\n       *\n       * <code>int64 created_at = 14 [json_name = \"createdAt\"];</code>\n       * @return The createdAt.\n       */\n      @java.lang.Override\n      public long getCreatedAt() {\n        return createdAt_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was created.\n       * </pre>\n       *\n       * <code>int64 created_at = 14 [json_name = \"createdAt\"];</code>\n       * @param value The createdAt to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCreatedAt(long value) {\n\n        createdAt_ = value;\n        bitField0_ |= 0x00002000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was created.\n       * </pre>\n       *\n       * <code>int64 created_at = 14 [json_name = \"createdAt\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCreatedAt() {\n        bitField0_ = (bitField0_ & ~0x00002000);\n        createdAt_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      private long updatedAt_ ;\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was last updated.\n       * </pre>\n       *\n       * <code>int64 updated_at = 15 [json_name = \"updatedAt\"];</code>\n       * @return The updatedAt.\n       */\n      @java.lang.Override\n      public long getUpdatedAt() {\n        return updatedAt_;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was last updated.\n       * </pre>\n       *\n       * <code>int64 updated_at = 15 [json_name = \"updatedAt\"];</code>\n       * @param value The updatedAt to set.\n       * @return This builder for chaining.\n       */\n      public Builder setUpdatedAt(long value) {\n\n        updatedAt_ = value;\n        bitField0_ |= 0x00004000;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Unix timestamp of when the transaction was last updated.\n       * </pre>\n       *\n       * <code>int64 updated_at = 15 [json_name = \"updatedAt\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearUpdatedAt() {\n        bitField0_ = (bitField0_ & ~0x00004000);\n        updatedAt_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.WalletTransactionInfo)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.WalletTransactionInfo)\n    private static final pactus.WalletOuterClass.WalletTransactionInfo DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.WalletTransactionInfo();\n    }\n\n    public static pactus.WalletOuterClass.WalletTransactionInfo getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<WalletTransactionInfo>\n        PARSER = new com.google.protobuf.AbstractParser<WalletTransactionInfo>() {\n      @java.lang.Override\n      public WalletTransactionInfo parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<WalletTransactionInfo> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<WalletTransactionInfo> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.WalletTransactionInfo getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListTransactionsRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListTransactionsRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to query transactions for.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to query transactions for.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Optional: The address to filter transactions.\n     * If empty or set to '*', transactions for all addresses in the wallet are included.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * Optional: The address to filter transactions.\n     * If empty or set to '*', transactions for all addresses in the wallet are included.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n\n    /**\n     * <pre>\n     * Filter transactions by direction relative to the wallet.\n     * Defaults to any direction if not set.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    int getDirectionValue();\n    /**\n     * <pre>\n     * Filter transactions by direction relative to the wallet.\n     * Defaults to any direction if not set.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    pactus.WalletOuterClass.TxDirection getDirection();\n\n    /**\n     * <pre>\n     * Optional: The maximum number of transactions to return.\n     * Defaults to 10 if not set.\n     * </pre>\n     *\n     * <code>int32 count = 4 [json_name = \"count\"];</code>\n     * @return The count.\n     */\n    int getCount();\n\n    /**\n     * <pre>\n     * Optional: The number of transactions to skip (for pagination).\n     * Defaults to 0 if not set.\n     * </pre>\n     *\n     * <code>int32 skip = 5 [json_name = \"skip\"];</code>\n     * @return The skip.\n     */\n    int getSkip();\n  }\n  /**\n   * <pre>\n   * Request message for listing transactions of a wallet, optionally filtered by a specific address.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListTransactionsRequest}\n   */\n  public static final class ListTransactionsRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListTransactionsRequest)\n      ListTransactionsRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListTransactionsRequest\");\n    }\n    // Use ListTransactionsRequest.newBuilder() to construct.\n    private ListTransactionsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListTransactionsRequest() {\n      walletName_ = \"\";\n      address_ = \"\";\n      direction_ = 0;\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListTransactionsRequest.class, pactus.WalletOuterClass.ListTransactionsRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to query transactions for.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to query transactions for.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * Optional: The address to filter transactions.\n     * If empty or set to '*', transactions for all addresses in the wallet are included.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Optional: The address to filter transactions.\n     * If empty or set to '*', transactions for all addresses in the wallet are included.\n     * </pre>\n     *\n     * <code>string address = 2 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int DIRECTION_FIELD_NUMBER = 3;\n    private int direction_ = 0;\n    /**\n     * <pre>\n     * Filter transactions by direction relative to the wallet.\n     * Defaults to any direction if not set.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n     * @return The enum numeric value on the wire for direction.\n     */\n    @java.lang.Override public int getDirectionValue() {\n      return direction_;\n    }\n    /**\n     * <pre>\n     * Filter transactions by direction relative to the wallet.\n     * Defaults to any direction if not set.\n     * </pre>\n     *\n     * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n     * @return The direction.\n     */\n    @java.lang.Override public pactus.WalletOuterClass.TxDirection getDirection() {\n      pactus.WalletOuterClass.TxDirection result = pactus.WalletOuterClass.TxDirection.forNumber(direction_);\n      return result == null ? pactus.WalletOuterClass.TxDirection.UNRECOGNIZED : result;\n    }\n\n    public static final int COUNT_FIELD_NUMBER = 4;\n    private int count_ = 0;\n    /**\n     * <pre>\n     * Optional: The maximum number of transactions to return.\n     * Defaults to 10 if not set.\n     * </pre>\n     *\n     * <code>int32 count = 4 [json_name = \"count\"];</code>\n     * @return The count.\n     */\n    @java.lang.Override\n    public int getCount() {\n      return count_;\n    }\n\n    public static final int SKIP_FIELD_NUMBER = 5;\n    private int skip_ = 0;\n    /**\n     * <pre>\n     * Optional: The number of transactions to skip (for pagination).\n     * Defaults to 0 if not set.\n     * </pre>\n     *\n     * <code>int32 skip = 5 [json_name = \"skip\"];</code>\n     * @return The skip.\n     */\n    @java.lang.Override\n    public int getSkip() {\n      return skip_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, address_);\n      }\n      if (direction_ != pactus.WalletOuterClass.TxDirection.TX_DIRECTION_ANY.getNumber()) {\n        output.writeEnum(3, direction_);\n      }\n      if (count_ != 0) {\n        output.writeInt32(4, count_);\n      }\n      if (skip_ != 0) {\n        output.writeInt32(5, skip_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, address_);\n      }\n      if (direction_ != pactus.WalletOuterClass.TxDirection.TX_DIRECTION_ANY.getNumber()) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeEnumSize(3, direction_);\n      }\n      if (count_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(4, count_);\n      }\n      if (skip_ != 0) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt32Size(5, skip_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListTransactionsRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListTransactionsRequest other = (pactus.WalletOuterClass.ListTransactionsRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (direction_ != other.direction_) return false;\n      if (getCount()\n          != other.getCount()) return false;\n      if (getSkip()\n          != other.getSkip()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (37 * hash) + DIRECTION_FIELD_NUMBER;\n      hash = (53 * hash) + direction_;\n      hash = (37 * hash) + COUNT_FIELD_NUMBER;\n      hash = (53 * hash) + getCount();\n      hash = (37 * hash) + SKIP_FIELD_NUMBER;\n      hash = (53 * hash) + getSkip();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListTransactionsRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for listing transactions of a wallet, optionally filtered by a specific address.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListTransactionsRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListTransactionsRequest)\n        pactus.WalletOuterClass.ListTransactionsRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListTransactionsRequest.class, pactus.WalletOuterClass.ListTransactionsRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListTransactionsRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        address_ = \"\";\n        direction_ = 0;\n        count_ = 0;\n        skip_ = 0;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListTransactionsRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsRequest build() {\n        pactus.WalletOuterClass.ListTransactionsRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsRequest buildPartial() {\n        pactus.WalletOuterClass.ListTransactionsRequest result = new pactus.WalletOuterClass.ListTransactionsRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.ListTransactionsRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.address_ = address_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.direction_ = direction_;\n        }\n        if (((from_bitField0_ & 0x00000008) != 0)) {\n          result.count_ = count_;\n        }\n        if (((from_bitField0_ & 0x00000010) != 0)) {\n          result.skip_ = skip_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListTransactionsRequest) {\n          return mergeFrom((pactus.WalletOuterClass.ListTransactionsRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListTransactionsRequest other) {\n        if (other == pactus.WalletOuterClass.ListTransactionsRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (other.direction_ != 0) {\n          setDirectionValue(other.getDirectionValue());\n        }\n        if (other.getCount() != 0) {\n          setCount(other.getCount());\n        }\n        if (other.getSkip() != 0) {\n          setSkip(other.getSkip());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 24: {\n                direction_ = input.readEnum();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 24\n              case 32: {\n                count_ = input.readInt32();\n                bitField0_ |= 0x00000008;\n                break;\n              } // case 32\n              case 40: {\n                skip_ = input.readInt32();\n                bitField0_ |= 0x00000010;\n                break;\n              } // case 40\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to query transactions for.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query transactions for.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query transactions for.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query transactions for.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to query transactions for.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * Optional: The address to filter transactions.\n       * If empty or set to '*', transactions for all addresses in the wallet are included.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Optional: The address to filter transactions.\n       * If empty or set to '*', transactions for all addresses in the wallet are included.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Optional: The address to filter transactions.\n       * If empty or set to '*', transactions for all addresses in the wallet are included.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Optional: The address to filter transactions.\n       * If empty or set to '*', transactions for all addresses in the wallet are included.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Optional: The address to filter transactions.\n       * If empty or set to '*', transactions for all addresses in the wallet are included.\n       * </pre>\n       *\n       * <code>string address = 2 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private int direction_ = 0;\n      /**\n       * <pre>\n       * Filter transactions by direction relative to the wallet.\n       * Defaults to any direction if not set.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n       * @return The enum numeric value on the wire for direction.\n       */\n      @java.lang.Override public int getDirectionValue() {\n        return direction_;\n      }\n      /**\n       * <pre>\n       * Filter transactions by direction relative to the wallet.\n       * Defaults to any direction if not set.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n       * @param value The enum numeric value on the wire for direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirectionValue(int value) {\n        direction_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter transactions by direction relative to the wallet.\n       * Defaults to any direction if not set.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n       * @return The direction.\n       */\n      @java.lang.Override\n      public pactus.WalletOuterClass.TxDirection getDirection() {\n        pactus.WalletOuterClass.TxDirection result = pactus.WalletOuterClass.TxDirection.forNumber(direction_);\n        return result == null ? pactus.WalletOuterClass.TxDirection.UNRECOGNIZED : result;\n      }\n      /**\n       * <pre>\n       * Filter transactions by direction relative to the wallet.\n       * Defaults to any direction if not set.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n       * @param value The direction to set.\n       * @return This builder for chaining.\n       */\n      public Builder setDirection(pactus.WalletOuterClass.TxDirection value) {\n        if (value == null) { throw new NullPointerException(); }\n        bitField0_ |= 0x00000004;\n        direction_ = value.getNumber();\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Filter transactions by direction relative to the wallet.\n       * Defaults to any direction if not set.\n       * </pre>\n       *\n       * <code>.pactus.TxDirection direction = 3 [json_name = \"direction\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearDirection() {\n        bitField0_ = (bitField0_ & ~0x00000004);\n        direction_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int count_ ;\n      /**\n       * <pre>\n       * Optional: The maximum number of transactions to return.\n       * Defaults to 10 if not set.\n       * </pre>\n       *\n       * <code>int32 count = 4 [json_name = \"count\"];</code>\n       * @return The count.\n       */\n      @java.lang.Override\n      public int getCount() {\n        return count_;\n      }\n      /**\n       * <pre>\n       * Optional: The maximum number of transactions to return.\n       * Defaults to 10 if not set.\n       * </pre>\n       *\n       * <code>int32 count = 4 [json_name = \"count\"];</code>\n       * @param value The count to set.\n       * @return This builder for chaining.\n       */\n      public Builder setCount(int value) {\n\n        count_ = value;\n        bitField0_ |= 0x00000008;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Optional: The maximum number of transactions to return.\n       * Defaults to 10 if not set.\n       * </pre>\n       *\n       * <code>int32 count = 4 [json_name = \"count\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearCount() {\n        bitField0_ = (bitField0_ & ~0x00000008);\n        count_ = 0;\n        onChanged();\n        return this;\n      }\n\n      private int skip_ ;\n      /**\n       * <pre>\n       * Optional: The number of transactions to skip (for pagination).\n       * Defaults to 0 if not set.\n       * </pre>\n       *\n       * <code>int32 skip = 5 [json_name = \"skip\"];</code>\n       * @return The skip.\n       */\n      @java.lang.Override\n      public int getSkip() {\n        return skip_;\n      }\n      /**\n       * <pre>\n       * Optional: The number of transactions to skip (for pagination).\n       * Defaults to 0 if not set.\n       * </pre>\n       *\n       * <code>int32 skip = 5 [json_name = \"skip\"];</code>\n       * @param value The skip to set.\n       * @return This builder for chaining.\n       */\n      public Builder setSkip(int value) {\n\n        skip_ = value;\n        bitField0_ |= 0x00000010;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Optional: The number of transactions to skip (for pagination).\n       * Defaults to 0 if not set.\n       * </pre>\n       *\n       * <code>int32 skip = 5 [json_name = \"skip\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearSkip() {\n        bitField0_ = (bitField0_ & ~0x00000010);\n        skip_ = 0;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListTransactionsRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListTransactionsRequest)\n    private static final pactus.WalletOuterClass.ListTransactionsRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListTransactionsRequest();\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListTransactionsRequest>\n        PARSER = new com.google.protobuf.AbstractParser<ListTransactionsRequest>() {\n      @java.lang.Override\n      public ListTransactionsRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListTransactionsRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListTransactionsRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListTransactionsRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface ListTransactionsResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.ListTransactionsResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet queried.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet queried.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    java.util.List<pactus.WalletOuterClass.WalletTransactionInfo> \n        getTxsList();\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    pactus.WalletOuterClass.WalletTransactionInfo getTxs(int index);\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    int getTxsCount();\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    java.util.List<? extends pactus.WalletOuterClass.WalletTransactionInfoOrBuilder> \n        getTxsOrBuilderList();\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    pactus.WalletOuterClass.WalletTransactionInfoOrBuilder getTxsOrBuilder(\n        int index);\n  }\n  /**\n   * <pre>\n   * Response message containing a list of transactions.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.ListTransactionsResponse}\n   */\n  public static final class ListTransactionsResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.ListTransactionsResponse)\n      ListTransactionsResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"ListTransactionsResponse\");\n    }\n    // Use ListTransactionsResponse.newBuilder() to construct.\n    private ListTransactionsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private ListTransactionsResponse() {\n      walletName_ = \"\";\n      txs_ = java.util.Collections.emptyList();\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.ListTransactionsResponse.class, pactus.WalletOuterClass.ListTransactionsResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet queried.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet queried.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int TXS_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private java.util.List<pactus.WalletOuterClass.WalletTransactionInfo> txs_;\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<pactus.WalletOuterClass.WalletTransactionInfo> getTxsList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public java.util.List<? extends pactus.WalletOuterClass.WalletTransactionInfoOrBuilder> \n        getTxsOrBuilderList() {\n      return txs_;\n    }\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public int getTxsCount() {\n      return txs_.size();\n    }\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.WalletTransactionInfo getTxs(int index) {\n      return txs_.get(index);\n    }\n    /**\n     * <pre>\n     * List of transactions for the wallet, filtered by the specified address if provided.\n     * </pre>\n     *\n     * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n     */\n    @java.lang.Override\n    public pactus.WalletOuterClass.WalletTransactionInfoOrBuilder getTxsOrBuilder(\n        int index) {\n      return txs_.get(index);\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      for (int i = 0; i < txs_.size(); i++) {\n        output.writeMessage(2, txs_.get(i));\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      for (int i = 0; i < txs_.size(); i++) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeMessageSize(2, txs_.get(i));\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.ListTransactionsResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.ListTransactionsResponse other = (pactus.WalletOuterClass.ListTransactionsResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getTxsList()\n          .equals(other.getTxsList())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      if (getTxsCount() > 0) {\n        hash = (37 * hash) + TXS_FIELD_NUMBER;\n        hash = (53 * hash) + getTxsList().hashCode();\n      }\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.ListTransactionsResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.ListTransactionsResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message containing a list of transactions.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.ListTransactionsResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.ListTransactionsResponse)\n        pactus.WalletOuterClass.ListTransactionsResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.ListTransactionsResponse.class, pactus.WalletOuterClass.ListTransactionsResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.ListTransactionsResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n        } else {\n          txs_ = null;\n          txsBuilder_.clear();\n        }\n        bitField0_ = (bitField0_ & ~0x00000002);\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_ListTransactionsResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.ListTransactionsResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsResponse build() {\n        pactus.WalletOuterClass.ListTransactionsResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.ListTransactionsResponse buildPartial() {\n        pactus.WalletOuterClass.ListTransactionsResponse result = new pactus.WalletOuterClass.ListTransactionsResponse(this);\n        buildPartialRepeatedFields(result);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartialRepeatedFields(pactus.WalletOuterClass.ListTransactionsResponse result) {\n        if (txsBuilder_ == null) {\n          if (((bitField0_ & 0x00000002) != 0)) {\n            txs_ = java.util.Collections.unmodifiableList(txs_);\n            bitField0_ = (bitField0_ & ~0x00000002);\n          }\n          result.txs_ = txs_;\n        } else {\n          result.txs_ = txsBuilder_.build();\n        }\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.ListTransactionsResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.ListTransactionsResponse) {\n          return mergeFrom((pactus.WalletOuterClass.ListTransactionsResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.ListTransactionsResponse other) {\n        if (other == pactus.WalletOuterClass.ListTransactionsResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (txsBuilder_ == null) {\n          if (!other.txs_.isEmpty()) {\n            if (txs_.isEmpty()) {\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n            } else {\n              ensureTxsIsMutable();\n              txs_.addAll(other.txs_);\n            }\n            onChanged();\n          }\n        } else {\n          if (!other.txs_.isEmpty()) {\n            if (txsBuilder_.isEmpty()) {\n              txsBuilder_.dispose();\n              txsBuilder_ = null;\n              txs_ = other.txs_;\n              bitField0_ = (bitField0_ & ~0x00000002);\n              txsBuilder_ = \n                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n                   internalGetTxsFieldBuilder() : null;\n            } else {\n              txsBuilder_.addAllMessages(other.txs_);\n            }\n          }\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                pactus.WalletOuterClass.WalletTransactionInfo m =\n                    input.readMessage(\n                        pactus.WalletOuterClass.WalletTransactionInfo.parser(),\n                        extensionRegistry);\n                if (txsBuilder_ == null) {\n                  ensureTxsIsMutable();\n                  txs_.add(m);\n                } else {\n                  txsBuilder_.addMessage(m);\n                }\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet queried.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet queried.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet queried.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet queried.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet queried.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.util.List<pactus.WalletOuterClass.WalletTransactionInfo> txs_ =\n        java.util.Collections.emptyList();\n      private void ensureTxsIsMutable() {\n        if (!((bitField0_ & 0x00000002) != 0)) {\n          txs_ = new java.util.ArrayList<pactus.WalletOuterClass.WalletTransactionInfo>(txs_);\n          bitField0_ |= 0x00000002;\n         }\n      }\n\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.WalletOuterClass.WalletTransactionInfo, pactus.WalletOuterClass.WalletTransactionInfo.Builder, pactus.WalletOuterClass.WalletTransactionInfoOrBuilder> txsBuilder_;\n\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.WalletOuterClass.WalletTransactionInfo> getTxsList() {\n        if (txsBuilder_ == null) {\n          return java.util.Collections.unmodifiableList(txs_);\n        } else {\n          return txsBuilder_.getMessageList();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public int getTxsCount() {\n        if (txsBuilder_ == null) {\n          return txs_.size();\n        } else {\n          return txsBuilder_.getCount();\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public pactus.WalletOuterClass.WalletTransactionInfo getTxs(int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);\n        } else {\n          return txsBuilder_.getMessage(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.WalletOuterClass.WalletTransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.set(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder setTxs(\n          int index, pactus.WalletOuterClass.WalletTransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.set(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.setMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(pactus.WalletOuterClass.WalletTransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.WalletOuterClass.WalletTransactionInfo value) {\n        if (txsBuilder_ == null) {\n          if (value == null) {\n            throw new NullPointerException();\n          }\n          ensureTxsIsMutable();\n          txs_.add(index, value);\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, value);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          pactus.WalletOuterClass.WalletTransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder addTxs(\n          int index, pactus.WalletOuterClass.WalletTransactionInfo.Builder builderForValue) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.add(index, builderForValue.build());\n          onChanged();\n        } else {\n          txsBuilder_.addMessage(index, builderForValue.build());\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder addAllTxs(\n          java.lang.Iterable<? extends pactus.WalletOuterClass.WalletTransactionInfo> values) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          com.google.protobuf.AbstractMessageLite.Builder.addAll(\n              values, txs_);\n          onChanged();\n        } else {\n          txsBuilder_.addAllMessages(values);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder clearTxs() {\n        if (txsBuilder_ == null) {\n          txs_ = java.util.Collections.emptyList();\n          bitField0_ = (bitField0_ & ~0x00000002);\n          onChanged();\n        } else {\n          txsBuilder_.clear();\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public Builder removeTxs(int index) {\n        if (txsBuilder_ == null) {\n          ensureTxsIsMutable();\n          txs_.remove(index);\n          onChanged();\n        } else {\n          txsBuilder_.remove(index);\n        }\n        return this;\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public pactus.WalletOuterClass.WalletTransactionInfo.Builder getTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().getBuilder(index);\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public pactus.WalletOuterClass.WalletTransactionInfoOrBuilder getTxsOrBuilder(\n          int index) {\n        if (txsBuilder_ == null) {\n          return txs_.get(index);  } else {\n          return txsBuilder_.getMessageOrBuilder(index);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<? extends pactus.WalletOuterClass.WalletTransactionInfoOrBuilder> \n           getTxsOrBuilderList() {\n        if (txsBuilder_ != null) {\n          return txsBuilder_.getMessageOrBuilderList();\n        } else {\n          return java.util.Collections.unmodifiableList(txs_);\n        }\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public pactus.WalletOuterClass.WalletTransactionInfo.Builder addTxsBuilder() {\n        return internalGetTxsFieldBuilder().addBuilder(\n            pactus.WalletOuterClass.WalletTransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public pactus.WalletOuterClass.WalletTransactionInfo.Builder addTxsBuilder(\n          int index) {\n        return internalGetTxsFieldBuilder().addBuilder(\n            index, pactus.WalletOuterClass.WalletTransactionInfo.getDefaultInstance());\n      }\n      /**\n       * <pre>\n       * List of transactions for the wallet, filtered by the specified address if provided.\n       * </pre>\n       *\n       * <code>repeated .pactus.WalletTransactionInfo txs = 2 [json_name = \"txs\"];</code>\n       */\n      public java.util.List<pactus.WalletOuterClass.WalletTransactionInfo.Builder> \n           getTxsBuilderList() {\n        return internalGetTxsFieldBuilder().getBuilderList();\n      }\n      private com.google.protobuf.RepeatedFieldBuilder<\n          pactus.WalletOuterClass.WalletTransactionInfo, pactus.WalletOuterClass.WalletTransactionInfo.Builder, pactus.WalletOuterClass.WalletTransactionInfoOrBuilder> \n          internalGetTxsFieldBuilder() {\n        if (txsBuilder_ == null) {\n          txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<\n              pactus.WalletOuterClass.WalletTransactionInfo, pactus.WalletOuterClass.WalletTransactionInfo.Builder, pactus.WalletOuterClass.WalletTransactionInfoOrBuilder>(\n                  txs_,\n                  ((bitField0_ & 0x00000002) != 0),\n                  getParentForChildren(),\n                  isClean());\n          txs_ = null;\n        }\n        return txsBuilder_;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.ListTransactionsResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.ListTransactionsResponse)\n    private static final pactus.WalletOuterClass.ListTransactionsResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.ListTransactionsResponse();\n    }\n\n    public static pactus.WalletOuterClass.ListTransactionsResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<ListTransactionsResponse>\n        PARSER = new com.google.protobuf.AbstractParser<ListTransactionsResponse>() {\n      @java.lang.Override\n      public ListTransactionsResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<ListTransactionsResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<ListTransactionsResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.ListTransactionsResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SetDefaultFeeRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SetDefaultFeeRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to set the default fee.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to set the default fee.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * The default fee amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    long getAmount();\n  }\n  /**\n   * <pre>\n   * Request message for setting default fee.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SetDefaultFeeRequest}\n   */\n  public static final class SetDefaultFeeRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SetDefaultFeeRequest)\n      SetDefaultFeeRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SetDefaultFeeRequest\");\n    }\n    // Use SetDefaultFeeRequest.newBuilder() to construct.\n    private SetDefaultFeeRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SetDefaultFeeRequest() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SetDefaultFeeRequest.class, pactus.WalletOuterClass.SetDefaultFeeRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to set the default fee.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to set the default fee.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int AMOUNT_FIELD_NUMBER = 2;\n    private long amount_ = 0L;\n    /**\n     * <pre>\n     * The default fee amount in NanoPAC.\n     * </pre>\n     *\n     * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n     * @return The amount.\n     */\n    @java.lang.Override\n    public long getAmount() {\n      return amount_;\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (amount_ != 0L) {\n        output.writeInt64(2, amount_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (amount_ != 0L) {\n        size += com.google.protobuf.CodedOutputStream\n          .computeInt64Size(2, amount_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SetDefaultFeeRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SetDefaultFeeRequest other = (pactus.WalletOuterClass.SetDefaultFeeRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (getAmount()\n          != other.getAmount()) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + AMOUNT_FIELD_NUMBER;\n      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(\n          getAmount());\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SetDefaultFeeRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for setting default fee.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SetDefaultFeeRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SetDefaultFeeRequest)\n        pactus.WalletOuterClass.SetDefaultFeeRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SetDefaultFeeRequest.class, pactus.WalletOuterClass.SetDefaultFeeRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SetDefaultFeeRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        amount_ = 0L;\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SetDefaultFeeRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeRequest build() {\n        pactus.WalletOuterClass.SetDefaultFeeRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeRequest buildPartial() {\n        pactus.WalletOuterClass.SetDefaultFeeRequest result = new pactus.WalletOuterClass.SetDefaultFeeRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SetDefaultFeeRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.amount_ = amount_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SetDefaultFeeRequest) {\n          return mergeFrom((pactus.WalletOuterClass.SetDefaultFeeRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SetDefaultFeeRequest other) {\n        if (other == pactus.WalletOuterClass.SetDefaultFeeRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (other.getAmount() != 0L) {\n          setAmount(other.getAmount());\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 16: {\n                amount_ = input.readInt64();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 16\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to set the default fee.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to set the default fee.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to set the default fee.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to set the default fee.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to set the default fee.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private long amount_ ;\n      /**\n       * <pre>\n       * The default fee amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @return The amount.\n       */\n      @java.lang.Override\n      public long getAmount() {\n        return amount_;\n      }\n      /**\n       * <pre>\n       * The default fee amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @param value The amount to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAmount(long value) {\n\n        amount_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The default fee amount in NanoPAC.\n       * </pre>\n       *\n       * <code>int64 amount = 2 [json_name = \"amount\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAmount() {\n        bitField0_ = (bitField0_ & ~0x00000002);\n        amount_ = 0L;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SetDefaultFeeRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SetDefaultFeeRequest)\n    private static final pactus.WalletOuterClass.SetDefaultFeeRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SetDefaultFeeRequest();\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SetDefaultFeeRequest>\n        PARSER = new com.google.protobuf.AbstractParser<SetDefaultFeeRequest>() {\n      @java.lang.Override\n      public SetDefaultFeeRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SetDefaultFeeRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SetDefaultFeeRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SetDefaultFeeRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface SetDefaultFeeResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.SetDefaultFeeResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet where the default fee was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet where the default fee was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n  }\n  /**\n   * <pre>\n   * Response message for updated default fee.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.SetDefaultFeeResponse}\n   */\n  public static final class SetDefaultFeeResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.SetDefaultFeeResponse)\n      SetDefaultFeeResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"SetDefaultFeeResponse\");\n    }\n    // Use SetDefaultFeeResponse.newBuilder() to construct.\n    private SetDefaultFeeResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private SetDefaultFeeResponse() {\n      walletName_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.SetDefaultFeeResponse.class, pactus.WalletOuterClass.SetDefaultFeeResponse.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet where the default fee was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet where the default fee was updated.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.SetDefaultFeeResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.SetDefaultFeeResponse other = (pactus.WalletOuterClass.SetDefaultFeeResponse) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.SetDefaultFeeResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message for updated default fee.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.SetDefaultFeeResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.SetDefaultFeeResponse)\n        pactus.WalletOuterClass.SetDefaultFeeResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.SetDefaultFeeResponse.class, pactus.WalletOuterClass.SetDefaultFeeResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.SetDefaultFeeResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_SetDefaultFeeResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.SetDefaultFeeResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeResponse build() {\n        pactus.WalletOuterClass.SetDefaultFeeResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.SetDefaultFeeResponse buildPartial() {\n        pactus.WalletOuterClass.SetDefaultFeeResponse result = new pactus.WalletOuterClass.SetDefaultFeeResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.SetDefaultFeeResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.SetDefaultFeeResponse) {\n          return mergeFrom((pactus.WalletOuterClass.SetDefaultFeeResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.SetDefaultFeeResponse other) {\n        if (other == pactus.WalletOuterClass.SetDefaultFeeResponse.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet where the default fee was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the default fee was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the default fee was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the default fee was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet where the default fee was updated.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.SetDefaultFeeResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.SetDefaultFeeResponse)\n    private static final pactus.WalletOuterClass.SetDefaultFeeResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.SetDefaultFeeResponse();\n    }\n\n    public static pactus.WalletOuterClass.SetDefaultFeeResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<SetDefaultFeeResponse>\n        PARSER = new com.google.protobuf.AbstractParser<SetDefaultFeeResponse>() {\n      @java.lang.Override\n      public SetDefaultFeeResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<SetDefaultFeeResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<SetDefaultFeeResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.SetDefaultFeeResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetMnemonicRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetMnemonicRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet to get the mnemonic.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet to get the mnemonic.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n  }\n  /**\n   * <pre>\n   * Request message for getting mnemonic.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetMnemonicRequest}\n   */\n  public static final class GetMnemonicRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetMnemonicRequest)\n      GetMnemonicRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetMnemonicRequest\");\n    }\n    // Use GetMnemonicRequest.newBuilder() to construct.\n    private GetMnemonicRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetMnemonicRequest() {\n      walletName_ = \"\";\n      password_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetMnemonicRequest.class, pactus.WalletOuterClass.GetMnemonicRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet to get the mnemonic.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet to get the mnemonic.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, password_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetMnemonicRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetMnemonicRequest other = (pactus.WalletOuterClass.GetMnemonicRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetMnemonicRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for getting mnemonic.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetMnemonicRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetMnemonicRequest)\n        pactus.WalletOuterClass.GetMnemonicRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetMnemonicRequest.class, pactus.WalletOuterClass.GetMnemonicRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetMnemonicRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        password_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetMnemonicRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicRequest build() {\n        pactus.WalletOuterClass.GetMnemonicRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicRequest buildPartial() {\n        pactus.WalletOuterClass.GetMnemonicRequest result = new pactus.WalletOuterClass.GetMnemonicRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetMnemonicRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.password_ = password_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetMnemonicRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetMnemonicRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetMnemonicRequest other) {\n        if (other == pactus.WalletOuterClass.GetMnemonicRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet to get the mnemonic.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the mnemonic.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the mnemonic.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the mnemonic.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet to get the mnemonic.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetMnemonicRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetMnemonicRequest)\n    private static final pactus.WalletOuterClass.GetMnemonicRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetMnemonicRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetMnemonicRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetMnemonicRequest>() {\n      @java.lang.Override\n      public GetMnemonicRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetMnemonicRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetMnemonicRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetMnemonicRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetMnemonicResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetMnemonicResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The mnemonic (seed phrase).\n     * </pre>\n     *\n     * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    java.lang.String getMnemonic();\n    /**\n     * <pre>\n     * The mnemonic (seed phrase).\n     * </pre>\n     *\n     * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    com.google.protobuf.ByteString\n        getMnemonicBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains mnemonic.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetMnemonicResponse}\n   */\n  public static final class GetMnemonicResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetMnemonicResponse)\n      GetMnemonicResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetMnemonicResponse\");\n    }\n    // Use GetMnemonicResponse.newBuilder() to construct.\n    private GetMnemonicResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetMnemonicResponse() {\n      mnemonic_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetMnemonicResponse.class, pactus.WalletOuterClass.GetMnemonicResponse.Builder.class);\n    }\n\n    public static final int MNEMONIC_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object mnemonic_ = \"\";\n    /**\n     * <pre>\n     * The mnemonic (seed phrase).\n     * </pre>\n     *\n     * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n     * @return The mnemonic.\n     */\n    @java.lang.Override\n    public java.lang.String getMnemonic() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        mnemonic_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The mnemonic (seed phrase).\n     * </pre>\n     *\n     * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n     * @return The bytes for mnemonic.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getMnemonicBytes() {\n      java.lang.Object ref = mnemonic_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        mnemonic_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, mnemonic_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mnemonic_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mnemonic_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetMnemonicResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetMnemonicResponse other = (pactus.WalletOuterClass.GetMnemonicResponse) obj;\n\n      if (!getMnemonic()\n          .equals(other.getMnemonic())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + MNEMONIC_FIELD_NUMBER;\n      hash = (53 * hash) + getMnemonic().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetMnemonicResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetMnemonicResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains mnemonic.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetMnemonicResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetMnemonicResponse)\n        pactus.WalletOuterClass.GetMnemonicResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetMnemonicResponse.class, pactus.WalletOuterClass.GetMnemonicResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetMnemonicResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        mnemonic_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetMnemonicResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetMnemonicResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicResponse build() {\n        pactus.WalletOuterClass.GetMnemonicResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetMnemonicResponse buildPartial() {\n        pactus.WalletOuterClass.GetMnemonicResponse result = new pactus.WalletOuterClass.GetMnemonicResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetMnemonicResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.mnemonic_ = mnemonic_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetMnemonicResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetMnemonicResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetMnemonicResponse other) {\n        if (other == pactus.WalletOuterClass.GetMnemonicResponse.getDefaultInstance()) return this;\n        if (!other.getMnemonic().isEmpty()) {\n          mnemonic_ = other.mnemonic_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                mnemonic_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object mnemonic_ = \"\";\n      /**\n       * <pre>\n       * The mnemonic (seed phrase).\n       * </pre>\n       *\n       * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n       * @return The mnemonic.\n       */\n      public java.lang.String getMnemonic() {\n        java.lang.Object ref = mnemonic_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          mnemonic_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase).\n       * </pre>\n       *\n       * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n       * @return The bytes for mnemonic.\n       */\n      public com.google.protobuf.ByteString\n          getMnemonicBytes() {\n        java.lang.Object ref = mnemonic_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          mnemonic_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase).\n       * </pre>\n       *\n       * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n       * @param value The mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonic(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        mnemonic_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase).\n       * </pre>\n       *\n       * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearMnemonic() {\n        mnemonic_ = getDefaultInstance().getMnemonic();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The mnemonic (seed phrase).\n       * </pre>\n       *\n       * <code>string mnemonic = 1 [json_name = \"mnemonic\"];</code>\n       * @param value The bytes for mnemonic to set.\n       * @return This builder for chaining.\n       */\n      public Builder setMnemonicBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        mnemonic_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetMnemonicResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetMnemonicResponse)\n    private static final pactus.WalletOuterClass.GetMnemonicResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetMnemonicResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetMnemonicResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetMnemonicResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetMnemonicResponse>() {\n      @java.lang.Override\n      public GetMnemonicResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetMnemonicResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetMnemonicResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetMnemonicResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetPrivateKeyRequestOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetPrivateKeyRequest)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    java.lang.String getWalletName();\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    com.google.protobuf.ByteString\n        getWalletNameBytes();\n\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    java.lang.String getPassword();\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    com.google.protobuf.ByteString\n        getPasswordBytes();\n\n    /**\n     * <pre>\n     * The address to get the private key.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    java.lang.String getAddress();\n    /**\n     * <pre>\n     * The address to get the private key.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    com.google.protobuf.ByteString\n        getAddressBytes();\n  }\n  /**\n   * <pre>\n   * Request message for getting private key.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetPrivateKeyRequest}\n   */\n  public static final class GetPrivateKeyRequest extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetPrivateKeyRequest)\n      GetPrivateKeyRequestOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetPrivateKeyRequest\");\n    }\n    // Use GetPrivateKeyRequest.newBuilder() to construct.\n    private GetPrivateKeyRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetPrivateKeyRequest() {\n      walletName_ = \"\";\n      password_ = \"\";\n      address_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyRequest_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyRequest_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetPrivateKeyRequest.class, pactus.WalletOuterClass.GetPrivateKeyRequest.Builder.class);\n    }\n\n    public static final int WALLET_NAME_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object walletName_ = \"\";\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The walletName.\n     */\n    @java.lang.Override\n    public java.lang.String getWalletName() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        walletName_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The name of the wallet containing the address.\n     * </pre>\n     *\n     * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n     * @return The bytes for walletName.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getWalletNameBytes() {\n      java.lang.Object ref = walletName_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        walletName_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int PASSWORD_FIELD_NUMBER = 2;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object password_ = \"\";\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The password.\n     */\n    @java.lang.Override\n    public java.lang.String getPassword() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        password_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * Wallet password.\n     * </pre>\n     *\n     * <code>string password = 2 [json_name = \"password\"];</code>\n     * @return The bytes for password.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPasswordBytes() {\n      java.lang.Object ref = password_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        password_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    public static final int ADDRESS_FIELD_NUMBER = 3;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object address_ = \"\";\n    /**\n     * <pre>\n     * The address to get the private key.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The address.\n     */\n    @java.lang.Override\n    public java.lang.String getAddress() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        address_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The address to get the private key.\n     * </pre>\n     *\n     * <code>string address = 3 [json_name = \"address\"];</code>\n     * @return The bytes for address.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getAddressBytes() {\n      java.lang.Object ref = address_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        address_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 3, address_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(walletName_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, walletName_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_);\n      }\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(address_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, address_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetPrivateKeyRequest)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetPrivateKeyRequest other = (pactus.WalletOuterClass.GetPrivateKeyRequest) obj;\n\n      if (!getWalletName()\n          .equals(other.getWalletName())) return false;\n      if (!getPassword()\n          .equals(other.getPassword())) return false;\n      if (!getAddress()\n          .equals(other.getAddress())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER;\n      hash = (53 * hash) + getWalletName().hashCode();\n      hash = (37 * hash) + PASSWORD_FIELD_NUMBER;\n      hash = (53 * hash) + getPassword().hashCode();\n      hash = (37 * hash) + ADDRESS_FIELD_NUMBER;\n      hash = (53 * hash) + getAddress().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetPrivateKeyRequest prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Request message for getting private key.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetPrivateKeyRequest}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetPrivateKeyRequest)\n        pactus.WalletOuterClass.GetPrivateKeyRequestOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyRequest_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetPrivateKeyRequest.class, pactus.WalletOuterClass.GetPrivateKeyRequest.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetPrivateKeyRequest.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        walletName_ = \"\";\n        password_ = \"\";\n        address_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyRequest_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyRequest getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetPrivateKeyRequest.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyRequest build() {\n        pactus.WalletOuterClass.GetPrivateKeyRequest result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyRequest buildPartial() {\n        pactus.WalletOuterClass.GetPrivateKeyRequest result = new pactus.WalletOuterClass.GetPrivateKeyRequest(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetPrivateKeyRequest result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.walletName_ = walletName_;\n        }\n        if (((from_bitField0_ & 0x00000002) != 0)) {\n          result.password_ = password_;\n        }\n        if (((from_bitField0_ & 0x00000004) != 0)) {\n          result.address_ = address_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetPrivateKeyRequest) {\n          return mergeFrom((pactus.WalletOuterClass.GetPrivateKeyRequest)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetPrivateKeyRequest other) {\n        if (other == pactus.WalletOuterClass.GetPrivateKeyRequest.getDefaultInstance()) return this;\n        if (!other.getWalletName().isEmpty()) {\n          walletName_ = other.walletName_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        if (!other.getPassword().isEmpty()) {\n          password_ = other.password_;\n          bitField0_ |= 0x00000002;\n          onChanged();\n        }\n        if (!other.getAddress().isEmpty()) {\n          address_ = other.address_;\n          bitField0_ |= 0x00000004;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                walletName_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              case 18: {\n                password_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000002;\n                break;\n              } // case 18\n              case 26: {\n                address_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000004;\n                break;\n              } // case 26\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object walletName_ = \"\";\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The walletName.\n       */\n      public java.lang.String getWalletName() {\n        java.lang.Object ref = walletName_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          walletName_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return The bytes for walletName.\n       */\n      public com.google.protobuf.ByteString\n          getWalletNameBytes() {\n        java.lang.Object ref = walletName_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          walletName_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletName(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearWalletName() {\n        walletName_ = getDefaultInstance().getWalletName();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The name of the wallet containing the address.\n       * </pre>\n       *\n       * <code>string wallet_name = 1 [json_name = \"walletName\"];</code>\n       * @param value The bytes for walletName to set.\n       * @return This builder for chaining.\n       */\n      public Builder setWalletNameBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        walletName_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object password_ = \"\";\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The password.\n       */\n      public java.lang.String getPassword() {\n        java.lang.Object ref = password_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          password_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return The bytes for password.\n       */\n      public com.google.protobuf.ByteString\n          getPasswordBytes() {\n        java.lang.Object ref = password_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          password_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPassword(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPassword() {\n        password_ = getDefaultInstance().getPassword();\n        bitField0_ = (bitField0_ & ~0x00000002);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * Wallet password.\n       * </pre>\n       *\n       * <code>string password = 2 [json_name = \"password\"];</code>\n       * @param value The bytes for password to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPasswordBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        password_ = value;\n        bitField0_ |= 0x00000002;\n        onChanged();\n        return this;\n      }\n\n      private java.lang.Object address_ = \"\";\n      /**\n       * <pre>\n       * The address to get the private key.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The address.\n       */\n      public java.lang.String getAddress() {\n        java.lang.Object ref = address_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          address_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to get the private key.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return The bytes for address.\n       */\n      public com.google.protobuf.ByteString\n          getAddressBytes() {\n        java.lang.Object ref = address_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          address_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The address to get the private key.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddress(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to get the private key.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearAddress() {\n        address_ = getDefaultInstance().getAddress();\n        bitField0_ = (bitField0_ & ~0x00000004);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The address to get the private key.\n       * </pre>\n       *\n       * <code>string address = 3 [json_name = \"address\"];</code>\n       * @param value The bytes for address to set.\n       * @return This builder for chaining.\n       */\n      public Builder setAddressBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        address_ = value;\n        bitField0_ |= 0x00000004;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetPrivateKeyRequest)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetPrivateKeyRequest)\n    private static final pactus.WalletOuterClass.GetPrivateKeyRequest DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetPrivateKeyRequest();\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyRequest getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetPrivateKeyRequest>\n        PARSER = new com.google.protobuf.AbstractParser<GetPrivateKeyRequest>() {\n      @java.lang.Override\n      public GetPrivateKeyRequest parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetPrivateKeyRequest> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetPrivateKeyRequest> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetPrivateKeyRequest getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  public interface GetPrivateKeyResponseOrBuilder extends\n      // @@protoc_insertion_point(interface_extends:pactus.GetPrivateKeyResponse)\n      com.google.protobuf.MessageOrBuilder {\n\n    /**\n     * <pre>\n     * The private key in hexadecimal format.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The privateKey.\n     */\n    java.lang.String getPrivateKey();\n    /**\n     * <pre>\n     * The private key in hexadecimal format.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The bytes for privateKey.\n     */\n    com.google.protobuf.ByteString\n        getPrivateKeyBytes();\n  }\n  /**\n   * <pre>\n   * Response message contains private key.\n   * </pre>\n   *\n   * Protobuf type {@code pactus.GetPrivateKeyResponse}\n   */\n  public static final class GetPrivateKeyResponse extends\n      com.google.protobuf.GeneratedMessage implements\n      // @@protoc_insertion_point(message_implements:pactus.GetPrivateKeyResponse)\n      GetPrivateKeyResponseOrBuilder {\n  private static final long serialVersionUID = 0L;\n    static {\n      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(\n        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,\n        /* major= */ 4,\n        /* minor= */ 33,\n        /* patch= */ 2,\n        /* suffix= */ \"\",\n        \"GetPrivateKeyResponse\");\n    }\n    // Use GetPrivateKeyResponse.newBuilder() to construct.\n    private GetPrivateKeyResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n      super(builder);\n    }\n    private GetPrivateKeyResponse() {\n      privateKey_ = \"\";\n    }\n\n    public static final com.google.protobuf.Descriptors.Descriptor\n        getDescriptor() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyResponse_descriptor;\n    }\n\n    @java.lang.Override\n    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n        internalGetFieldAccessorTable() {\n      return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyResponse_fieldAccessorTable\n          .ensureFieldAccessorsInitialized(\n              pactus.WalletOuterClass.GetPrivateKeyResponse.class, pactus.WalletOuterClass.GetPrivateKeyResponse.Builder.class);\n    }\n\n    public static final int PRIVATE_KEY_FIELD_NUMBER = 1;\n    @SuppressWarnings(\"serial\")\n    private volatile java.lang.Object privateKey_ = \"\";\n    /**\n     * <pre>\n     * The private key in hexadecimal format.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The privateKey.\n     */\n    @java.lang.Override\n    public java.lang.String getPrivateKey() {\n      java.lang.Object ref = privateKey_;\n      if (ref instanceof java.lang.String) {\n        return (java.lang.String) ref;\n      } else {\n        com.google.protobuf.ByteString bs = \n            (com.google.protobuf.ByteString) ref;\n        java.lang.String s = bs.toStringUtf8();\n        privateKey_ = s;\n        return s;\n      }\n    }\n    /**\n     * <pre>\n     * The private key in hexadecimal format.\n     * </pre>\n     *\n     * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n     * @return The bytes for privateKey.\n     */\n    @java.lang.Override\n    public com.google.protobuf.ByteString\n        getPrivateKeyBytes() {\n      java.lang.Object ref = privateKey_;\n      if (ref instanceof java.lang.String) {\n        com.google.protobuf.ByteString b = \n            com.google.protobuf.ByteString.copyFromUtf8(\n                (java.lang.String) ref);\n        privateKey_ = b;\n        return b;\n      } else {\n        return (com.google.protobuf.ByteString) ref;\n      }\n    }\n\n    private byte memoizedIsInitialized = -1;\n    @java.lang.Override\n    public final boolean isInitialized() {\n      byte isInitialized = memoizedIsInitialized;\n      if (isInitialized == 1) return true;\n      if (isInitialized == 0) return false;\n\n      memoizedIsInitialized = 1;\n      return true;\n    }\n\n    @java.lang.Override\n    public void writeTo(com.google.protobuf.CodedOutputStream output)\n                        throws java.io.IOException {\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(privateKey_)) {\n        com.google.protobuf.GeneratedMessage.writeString(output, 1, privateKey_);\n      }\n      getUnknownFields().writeTo(output);\n    }\n\n    @java.lang.Override\n    public int getSerializedSize() {\n      int size = memoizedSize;\n      if (size != -1) return size;\n\n      size = 0;\n      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(privateKey_)) {\n        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, privateKey_);\n      }\n      size += getUnknownFields().getSerializedSize();\n      memoizedSize = size;\n      return size;\n    }\n\n    @java.lang.Override\n    public boolean equals(final java.lang.Object obj) {\n      if (obj == this) {\n       return true;\n      }\n      if (!(obj instanceof pactus.WalletOuterClass.GetPrivateKeyResponse)) {\n        return super.equals(obj);\n      }\n      pactus.WalletOuterClass.GetPrivateKeyResponse other = (pactus.WalletOuterClass.GetPrivateKeyResponse) obj;\n\n      if (!getPrivateKey()\n          .equals(other.getPrivateKey())) return false;\n      if (!getUnknownFields().equals(other.getUnknownFields())) return false;\n      return true;\n    }\n\n    @java.lang.Override\n    public int hashCode() {\n      if (memoizedHashCode != 0) {\n        return memoizedHashCode;\n      }\n      int hash = 41;\n      hash = (19 * hash) + getDescriptor().hashCode();\n      hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER;\n      hash = (53 * hash) + getPrivateKey().hashCode();\n      hash = (29 * hash) + getUnknownFields().hashCode();\n      memoizedHashCode = hash;\n      return hash;\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        java.nio.ByteBuffer data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        java.nio.ByteBuffer data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        com.google.protobuf.ByteString data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        com.google.protobuf.ByteString data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(byte[] data)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        byte[] data,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws com.google.protobuf.InvalidProtocolBufferException {\n      return PARSER.parseFrom(data, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseDelimitedFrom(java.io.InputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input);\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseDelimitedFrom(\n        java.io.InputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input);\n    }\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse parseFrom(\n        com.google.protobuf.CodedInputStream input,\n        com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n        throws java.io.IOException {\n      return com.google.protobuf.GeneratedMessage\n          .parseWithIOException(PARSER, input, extensionRegistry);\n    }\n\n    @java.lang.Override\n    public Builder newBuilderForType() { return newBuilder(); }\n    public static Builder newBuilder() {\n      return DEFAULT_INSTANCE.toBuilder();\n    }\n    public static Builder newBuilder(pactus.WalletOuterClass.GetPrivateKeyResponse prototype) {\n      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);\n    }\n    @java.lang.Override\n    public Builder toBuilder() {\n      return this == DEFAULT_INSTANCE\n          ? new Builder() : new Builder().mergeFrom(this);\n    }\n\n    @java.lang.Override\n    protected Builder newBuilderForType(\n        com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n      Builder builder = new Builder(parent);\n      return builder;\n    }\n    /**\n     * <pre>\n     * Response message contains private key.\n     * </pre>\n     *\n     * Protobuf type {@code pactus.GetPrivateKeyResponse}\n     */\n    public static final class Builder extends\n        com.google.protobuf.GeneratedMessage.Builder<Builder> implements\n        // @@protoc_insertion_point(builder_implements:pactus.GetPrivateKeyResponse)\n        pactus.WalletOuterClass.GetPrivateKeyResponseOrBuilder {\n      public static final com.google.protobuf.Descriptors.Descriptor\n          getDescriptor() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n          internalGetFieldAccessorTable() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyResponse_fieldAccessorTable\n            .ensureFieldAccessorsInitialized(\n                pactus.WalletOuterClass.GetPrivateKeyResponse.class, pactus.WalletOuterClass.GetPrivateKeyResponse.Builder.class);\n      }\n\n      // Construct using pactus.WalletOuterClass.GetPrivateKeyResponse.newBuilder()\n      private Builder() {\n\n      }\n\n      private Builder(\n          com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n        super(parent);\n\n      }\n      @java.lang.Override\n      public Builder clear() {\n        super.clear();\n        bitField0_ = 0;\n        privateKey_ = \"\";\n        return this;\n      }\n\n      @java.lang.Override\n      public com.google.protobuf.Descriptors.Descriptor\n          getDescriptorForType() {\n        return pactus.WalletOuterClass.internal_static_pactus_GetPrivateKeyResponse_descriptor;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyResponse getDefaultInstanceForType() {\n        return pactus.WalletOuterClass.GetPrivateKeyResponse.getDefaultInstance();\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyResponse build() {\n        pactus.WalletOuterClass.GetPrivateKeyResponse result = buildPartial();\n        if (!result.isInitialized()) {\n          throw newUninitializedMessageException(result);\n        }\n        return result;\n      }\n\n      @java.lang.Override\n      public pactus.WalletOuterClass.GetPrivateKeyResponse buildPartial() {\n        pactus.WalletOuterClass.GetPrivateKeyResponse result = new pactus.WalletOuterClass.GetPrivateKeyResponse(this);\n        if (bitField0_ != 0) { buildPartial0(result); }\n        onBuilt();\n        return result;\n      }\n\n      private void buildPartial0(pactus.WalletOuterClass.GetPrivateKeyResponse result) {\n        int from_bitField0_ = bitField0_;\n        if (((from_bitField0_ & 0x00000001) != 0)) {\n          result.privateKey_ = privateKey_;\n        }\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(com.google.protobuf.Message other) {\n        if (other instanceof pactus.WalletOuterClass.GetPrivateKeyResponse) {\n          return mergeFrom((pactus.WalletOuterClass.GetPrivateKeyResponse)other);\n        } else {\n          super.mergeFrom(other);\n          return this;\n        }\n      }\n\n      public Builder mergeFrom(pactus.WalletOuterClass.GetPrivateKeyResponse other) {\n        if (other == pactus.WalletOuterClass.GetPrivateKeyResponse.getDefaultInstance()) return this;\n        if (!other.getPrivateKey().isEmpty()) {\n          privateKey_ = other.privateKey_;\n          bitField0_ |= 0x00000001;\n          onChanged();\n        }\n        this.mergeUnknownFields(other.getUnknownFields());\n        onChanged();\n        return this;\n      }\n\n      @java.lang.Override\n      public final boolean isInitialized() {\n        return true;\n      }\n\n      @java.lang.Override\n      public Builder mergeFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws java.io.IOException {\n        if (extensionRegistry == null) {\n          throw new java.lang.NullPointerException();\n        }\n        try {\n          boolean done = false;\n          while (!done) {\n            int tag = input.readTag();\n            switch (tag) {\n              case 0:\n                done = true;\n                break;\n              case 10: {\n                privateKey_ = input.readStringRequireUtf8();\n                bitField0_ |= 0x00000001;\n                break;\n              } // case 10\n              default: {\n                if (!super.parseUnknownField(input, extensionRegistry, tag)) {\n                  done = true; // was an endgroup tag\n                }\n                break;\n              } // default:\n            } // switch (tag)\n          } // while (!done)\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.unwrapIOException();\n        } finally {\n          onChanged();\n        } // finally\n        return this;\n      }\n      private int bitField0_;\n\n      private java.lang.Object privateKey_ = \"\";\n      /**\n       * <pre>\n       * The private key in hexadecimal format.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return The privateKey.\n       */\n      public java.lang.String getPrivateKey() {\n        java.lang.Object ref = privateKey_;\n        if (!(ref instanceof java.lang.String)) {\n          com.google.protobuf.ByteString bs =\n              (com.google.protobuf.ByteString) ref;\n          java.lang.String s = bs.toStringUtf8();\n          privateKey_ = s;\n          return s;\n        } else {\n          return (java.lang.String) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The private key in hexadecimal format.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return The bytes for privateKey.\n       */\n      public com.google.protobuf.ByteString\n          getPrivateKeyBytes() {\n        java.lang.Object ref = privateKey_;\n        if (ref instanceof String) {\n          com.google.protobuf.ByteString b = \n              com.google.protobuf.ByteString.copyFromUtf8(\n                  (java.lang.String) ref);\n          privateKey_ = b;\n          return b;\n        } else {\n          return (com.google.protobuf.ByteString) ref;\n        }\n      }\n      /**\n       * <pre>\n       * The private key in hexadecimal format.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @param value The privateKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrivateKey(\n          java.lang.String value) {\n        if (value == null) { throw new NullPointerException(); }\n        privateKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The private key in hexadecimal format.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @return This builder for chaining.\n       */\n      public Builder clearPrivateKey() {\n        privateKey_ = getDefaultInstance().getPrivateKey();\n        bitField0_ = (bitField0_ & ~0x00000001);\n        onChanged();\n        return this;\n      }\n      /**\n       * <pre>\n       * The private key in hexadecimal format.\n       * </pre>\n       *\n       * <code>string private_key = 1 [json_name = \"privateKey\"];</code>\n       * @param value The bytes for privateKey to set.\n       * @return This builder for chaining.\n       */\n      public Builder setPrivateKeyBytes(\n          com.google.protobuf.ByteString value) {\n        if (value == null) { throw new NullPointerException(); }\n        checkByteStringIsUtf8(value);\n        privateKey_ = value;\n        bitField0_ |= 0x00000001;\n        onChanged();\n        return this;\n      }\n\n      // @@protoc_insertion_point(builder_scope:pactus.GetPrivateKeyResponse)\n    }\n\n    // @@protoc_insertion_point(class_scope:pactus.GetPrivateKeyResponse)\n    private static final pactus.WalletOuterClass.GetPrivateKeyResponse DEFAULT_INSTANCE;\n    static {\n      DEFAULT_INSTANCE = new pactus.WalletOuterClass.GetPrivateKeyResponse();\n    }\n\n    public static pactus.WalletOuterClass.GetPrivateKeyResponse getDefaultInstance() {\n      return DEFAULT_INSTANCE;\n    }\n\n    private static final com.google.protobuf.Parser<GetPrivateKeyResponse>\n        PARSER = new com.google.protobuf.AbstractParser<GetPrivateKeyResponse>() {\n      @java.lang.Override\n      public GetPrivateKeyResponse parsePartialFrom(\n          com.google.protobuf.CodedInputStream input,\n          com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n          throws com.google.protobuf.InvalidProtocolBufferException {\n        Builder builder = newBuilder();\n        try {\n          builder.mergeFrom(input, extensionRegistry);\n        } catch (com.google.protobuf.InvalidProtocolBufferException e) {\n          throw e.setUnfinishedMessage(builder.buildPartial());\n        } catch (com.google.protobuf.UninitializedMessageException e) {\n          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());\n        } catch (java.io.IOException e) {\n          throw new com.google.protobuf.InvalidProtocolBufferException(e)\n              .setUnfinishedMessage(builder.buildPartial());\n        }\n        return builder.buildPartial();\n      }\n    };\n\n    public static com.google.protobuf.Parser<GetPrivateKeyResponse> parser() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public com.google.protobuf.Parser<GetPrivateKeyResponse> getParserForType() {\n      return PARSER;\n    }\n\n    @java.lang.Override\n    public pactus.WalletOuterClass.GetPrivateKeyResponse getDefaultInstanceForType() {\n      return DEFAULT_INSTANCE;\n    }\n\n  }\n\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_AddressInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_AddressInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNewAddressRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNewAddressRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetNewAddressResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetNewAddressResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_RestoreWalletRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_RestoreWalletRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_RestoreWalletResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_RestoreWalletResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CreateWalletRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CreateWalletRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_CreateWalletResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_CreateWalletResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_LoadWalletRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_LoadWalletRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_LoadWalletResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_LoadWalletResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_UnloadWalletRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_UnloadWalletRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_UnloadWalletResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_UnloadWalletResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorAddressRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetValidatorAddressResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignRawTransactionRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignRawTransactionResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTotalBalanceRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTotalBalanceResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignMessageRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignMessageRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SignMessageResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SignMessageResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTotalStakeRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTotalStakeRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetTotalStakeResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetTotalStakeResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetAddressInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetAddressInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetAddressInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetAddressInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SetAddressLabelRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SetAddressLabelRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SetAddressLabelResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SetAddressLabelResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListWalletsRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListWalletsRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListWalletsResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListWalletsResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetWalletInfoRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetWalletInfoRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetWalletInfoResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetWalletInfoResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListAddressesRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListAddressesRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListAddressesResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListAddressesResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_UpdatePasswordRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_UpdatePasswordRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_UpdatePasswordResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_UpdatePasswordResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_WalletTransactionInfo_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_WalletTransactionInfo_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListTransactionsRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListTransactionsRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_ListTransactionsResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_ListTransactionsResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SetDefaultFeeRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SetDefaultFeeRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_SetDefaultFeeResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_SetDefaultFeeResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetMnemonicRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetMnemonicRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetMnemonicResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetMnemonicResponse_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetPrivateKeyRequest_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetPrivateKeyRequest_fieldAccessorTable;\n  private static final com.google.protobuf.Descriptors.Descriptor\n    internal_static_pactus_GetPrivateKeyResponse_descriptor;\n  private static final \n    com.google.protobuf.GeneratedMessage.FieldAccessorTable\n      internal_static_pactus_GetPrivateKeyResponse_fieldAccessorTable;\n\n  public static com.google.protobuf.Descriptors.FileDescriptor\n      getDescriptor() {\n    return descriptor;\n  }\n  private static  com.google.protobuf.Descriptors.FileDescriptor\n      descriptor;\n  static {\n    java.lang.String[] descriptorData = {\n      \"\\n\\014wallet.proto\\022\\006pactus\\032\\021transaction.prot\" +\n      \"o\\\"p\\n\\013AddressInfo\\022\\030\\n\\007address\\030\\001 \\001(\\tR\\007addre\" +\n      \"ss\\022\\035\\n\\npublic_key\\030\\002 \\001(\\tR\\tpublicKey\\022\\024\\n\\005lab\" +\n      \"el\\030\\003 \\001(\\tR\\005label\\022\\022\\n\\004path\\030\\004 \\001(\\tR\\004path\\\"\\241\\001\\n\\024\" +\n      \"GetNewAddressRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\" +\n      \"\\tR\\nwalletName\\0226\\n\\014address_type\\030\\002 \\001(\\0162\\023.pa\" +\n      \"ctus.AddressTypeR\\013addressType\\022\\024\\n\\005label\\030\\003\" +\n      \" \\001(\\tR\\005label\\022\\032\\n\\010password\\030\\004 \\001(\\tR\\010password\\\"\" +\n      \"a\\n\\025GetNewAddressResponse\\022\\037\\n\\013wallet_name\\030\" +\n      \"\\001 \\001(\\tR\\nwalletName\\022\\'\\n\\004addr\\030\\002 \\001(\\0132\\023.pactus\" +\n      \".AddressInfoR\\004addr\\\"o\\n\\024RestoreWalletReque\" +\n      \"st\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\022\\032\\n\\010m\" +\n      \"nemonic\\030\\002 \\001(\\tR\\010mnemonic\\022\\032\\n\\010password\\030\\003 \\001(\" +\n      \"\\tR\\010password\\\"8\\n\\025RestoreWalletResponse\\022\\037\\n\\013\" +\n      \"wallet_name\\030\\001 \\001(\\tR\\nwalletName\\\"R\\n\\023CreateW\" +\n      \"alletRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalle\" +\n      \"tName\\022\\032\\n\\010password\\030\\002 \\001(\\tR\\010password\\\"S\\n\\024Cre\" +\n      \"ateWalletResponse\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\n\" +\n      \"walletName\\022\\032\\n\\010mnemonic\\030\\002 \\001(\\tR\\010mnemonic\\\"4\" +\n      \"\\n\\021LoadWalletRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\t\" +\n      \"R\\nwalletName\\\"5\\n\\022LoadWalletResponse\\022\\037\\n\\013wa\" +\n      \"llet_name\\030\\001 \\001(\\tR\\nwalletName\\\"6\\n\\023UnloadWal\" +\n      \"letRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletN\" +\n      \"ame\\\"7\\n\\024UnloadWalletResponse\\022\\037\\n\\013wallet_na\" +\n      \"me\\030\\001 \\001(\\tR\\nwalletName\\\";\\n\\032GetValidatorAddr\" +\n      \"essRequest\\022\\035\\n\\npublic_key\\030\\001 \\001(\\tR\\tpublicKe\" +\n      \"y\\\"7\\n\\033GetValidatorAddressResponse\\022\\030\\n\\007addr\" +\n      \"ess\\030\\001 \\001(\\tR\\007address\\\"\\201\\001\\n\\031SignRawTransactio\" +\n      \"nRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletNam\" +\n      \"e\\022\\'\\n\\017raw_transaction\\030\\002 \\001(\\tR\\016rawTransacti\" +\n      \"on\\022\\032\\n\\010password\\030\\003 \\001(\\tR\\010password\\\"y\\n\\032SignRa\" +\n      \"wTransactionResponse\\022%\\n\\016transaction_id\\030\\001\" +\n      \" \\001(\\tR\\rtransactionId\\0224\\n\\026signed_raw_transa\" +\n      \"ction\\030\\002 \\001(\\tR\\024signedRawTransaction\\\"9\\n\\026Get\" +\n      \"TotalBalanceRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\t\" +\n      \"R\\nwalletName\\\"_\\n\\027GetTotalBalanceResponse\\022\" +\n      \"\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\022#\\n\\rtota\" +\n      \"l_balance\\030\\002 \\001(\\003R\\014totalBalance\\\"\\205\\001\\n\\022SignMe\" +\n      \"ssageRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalle\" +\n      \"tName\\022\\032\\n\\010password\\030\\002 \\001(\\tR\\010password\\022\\030\\n\\007add\" +\n      \"ress\\030\\003 \\001(\\tR\\007address\\022\\030\\n\\007message\\030\\004 \\001(\\tR\\007me\" +\n      \"ssage\\\"3\\n\\023SignMessageResponse\\022\\034\\n\\tsignatur\" +\n      \"e\\030\\001 \\001(\\tR\\tsignature\\\"7\\n\\024GetTotalStakeReque\" +\n      \"st\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\\"Y\\n\\025G\" +\n      \"etTotalStakeResponse\\022\\037\\n\\013wallet_name\\030\\001 \\001(\" +\n      \"\\tR\\nwalletName\\022\\037\\n\\013total_stake\\030\\002 \\001(\\003R\\ntota\" +\n      \"lStake\\\"R\\n\\025GetAddressInfoRequest\\022\\037\\n\\013walle\" +\n      \"t_name\\030\\001 \\001(\\tR\\nwalletName\\022\\030\\n\\007address\\030\\002 \\001(\" +\n      \"\\tR\\007address\\\"b\\n\\026GetAddressInfoResponse\\022\\037\\n\\013\" +\n      \"wallet_name\\030\\001 \\001(\\tR\\nwalletName\\022\\'\\n\\004addr\\030\\002 \" +\n      \"\\001(\\0132\\023.pactus.AddressInfoR\\004addr\\\"\\205\\001\\n\\026SetAd\" +\n      \"dressLabelRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\n\" +\n      \"walletName\\022\\032\\n\\010password\\030\\002 \\001(\\tR\\010password\\022\\030\" +\n      \"\\n\\007address\\030\\003 \\001(\\tR\\007address\\022\\024\\n\\005label\\030\\004 \\001(\\tR\" +\n      \"\\005label\\\"j\\n\\027SetAddressLabelResponse\\022\\037\\n\\013wal\" +\n      \"let_name\\030\\001 \\001(\\tR\\nwalletName\\022\\030\\n\\007address\\030\\002 \" +\n      \"\\001(\\tR\\007address\\022\\024\\n\\005label\\030\\003 \\001(\\tR\\005label\\\"\\024\\n\\022Li\" +\n      \"stWalletsRequest\\\"/\\n\\023ListWalletsResponse\\022\" +\n      \"\\030\\n\\007wallets\\030\\001 \\003(\\tR\\007wallets\\\"7\\n\\024GetWalletIn\" +\n      \"foRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletNa\" +\n      \"me\\\"\\212\\002\\n\\025GetWalletInfoResponse\\022\\037\\n\\013wallet_n\" +\n      \"ame\\030\\001 \\001(\\tR\\nwalletName\\022\\030\\n\\007version\\030\\002 \\001(\\005R\\007\" +\n      \"version\\022\\030\\n\\007network\\030\\003 \\001(\\tR\\007network\\022\\034\\n\\tenc\" +\n      \"rypted\\030\\004 \\001(\\010R\\tencrypted\\022\\022\\n\\004uuid\\030\\005 \\001(\\tR\\004u\" +\n      \"uid\\022\\035\\n\\ncreated_at\\030\\006 \\001(\\003R\\tcreatedAt\\022\\037\\n\\013de\" +\n      \"fault_fee\\030\\007 \\001(\\003R\\ndefaultFee\\022\\026\\n\\006driver\\030\\010 \" +\n      \"\\001(\\tR\\006driver\\022\\022\\n\\004path\\030\\t \\001(\\tR\\004path\\\"q\\n\\024ListA\" +\n      \"ddressesRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwa\" +\n      \"lletName\\0228\\n\\raddress_types\\030\\002 \\003(\\0162\\023.pactus\" +\n      \".AddressTypeR\\014addressTypes\\\"c\\n\\025ListAddres\" +\n      \"sesResponse\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwallet\" +\n      \"Name\\022)\\n\\005addrs\\030\\002 \\003(\\0132\\023.pactus.AddressInfo\" +\n      \"R\\005addrs\\\"~\\n\\025UpdatePasswordRequest\\022\\037\\n\\013wall\" +\n      \"et_name\\030\\001 \\001(\\tR\\nwalletName\\022!\\n\\014old_passwor\" +\n      \"d\\030\\002 \\001(\\tR\\013oldPassword\\022!\\n\\014new_password\\030\\003 \\001\" +\n      \"(\\tR\\013newPassword\\\"9\\n\\026UpdatePasswordRespons\" +\n      \"e\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\\"\\333\\003\\n\\025W\" +\n      \"alletTransactionInfo\\022\\016\\n\\002no\\030\\001 \\001(\\003R\\002no\\022\\023\\n\\005\" +\n      \"tx_id\\030\\002 \\001(\\tR\\004txId\\022\\026\\n\\006sender\\030\\003 \\001(\\tR\\006sende\" +\n      \"r\\022\\032\\n\\010receiver\\030\\004 \\001(\\tR\\010receiver\\0221\\n\\tdirecti\" +\n      \"on\\030\\005 \\001(\\0162\\023.pactus.TxDirectionR\\tdirection\" +\n      \"\\022\\026\\n\\006amount\\030\\006 \\001(\\003R\\006amount\\022\\020\\n\\003fee\\030\\007 \\001(\\003R\\003f\" +\n      \"ee\\022\\022\\n\\004memo\\030\\010 \\001(\\tR\\004memo\\0221\\n\\006status\\030\\t \\001(\\0162\\031\" +\n      \".pactus.TransactionStatusR\\006status\\022!\\n\\014blo\" +\n      \"ck_height\\030\\n \\001(\\rR\\013blockHeight\\0226\\n\\014payload_\" +\n      \"type\\030\\013 \\001(\\0162\\023.pactus.PayloadTypeR\\013payload\" +\n      \"Type\\022\\022\\n\\004data\\030\\014 \\001(\\014R\\004data\\022\\030\\n\\007comment\\030\\r \\001(\" +\n      \"\\tR\\007comment\\022\\035\\n\\ncreated_at\\030\\016 \\001(\\003R\\tcreatedA\" +\n      \"t\\022\\035\\n\\nupdated_at\\030\\017 \\001(\\003R\\tupdatedAt\\\"\\261\\001\\n\\027Lis\" +\n      \"tTransactionsRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\" +\n      \"\\tR\\nwalletName\\022\\030\\n\\007address\\030\\002 \\001(\\tR\\007address\\022\" +\n      \"1\\n\\tdirection\\030\\003 \\001(\\0162\\023.pactus.TxDirectionR\" +\n      \"\\tdirection\\022\\024\\n\\005count\\030\\004 \\001(\\005R\\005count\\022\\022\\n\\004skip\" +\n      \"\\030\\005 \\001(\\005R\\004skip\\\"l\\n\\030ListTransactionsResponse\" +\n      \"\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\022/\\n\\003txs\" +\n      \"\\030\\002 \\003(\\0132\\035.pactus.WalletTransactionInfoR\\003t\" +\n      \"xs\\\"O\\n\\024SetDefaultFeeRequest\\022\\037\\n\\013wallet_nam\" +\n      \"e\\030\\001 \\001(\\tR\\nwalletName\\022\\026\\n\\006amount\\030\\002 \\001(\\003R\\006amo\" +\n      \"unt\\\"8\\n\\025SetDefaultFeeResponse\\022\\037\\n\\013wallet_n\" +\n      \"ame\\030\\001 \\001(\\tR\\nwalletName\\\"Q\\n\\022GetMnemonicRequ\" +\n      \"est\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\tR\\nwalletName\\022\\032\\n\\010\" +\n      \"password\\030\\002 \\001(\\tR\\010password\\\"1\\n\\023GetMnemonicR\" +\n      \"esponse\\022\\032\\n\\010mnemonic\\030\\001 \\001(\\tR\\010mnemonic\\\"m\\n\\024G\" +\n      \"etPrivateKeyRequest\\022\\037\\n\\013wallet_name\\030\\001 \\001(\\t\" +\n      \"R\\nwalletName\\022\\032\\n\\010password\\030\\002 \\001(\\tR\\010password\" +\n      \"\\022\\030\\n\\007address\\030\\003 \\001(\\tR\\007address\\\"8\\n\\025GetPrivate\" +\n      \"KeyResponse\\022\\037\\n\\013private_key\\030\\001 \\001(\\tR\\nprivat\" +\n      \"eKey*\\204\\001\\n\\013AddressType\\022\\031\\n\\025ADDRESS_TYPE_TRE\" +\n      \"ASURY\\020\\000\\022\\032\\n\\026ADDRESS_TYPE_VALIDATOR\\020\\001\\022\\034\\n\\030A\" +\n      \"DDRESS_TYPE_BLS_ACCOUNT\\020\\002\\022 \\n\\034ADDRESS_TYP\" +\n      \"E_ED25519_ACCOUNT\\020\\003*Y\\n\\013TxDirection\\022\\024\\n\\020TX\" +\n      \"_DIRECTION_ANY\\020\\000\\022\\031\\n\\025TX_DIRECTION_INCOMIN\" +\n      \"G\\020\\001\\022\\031\\n\\025TX_DIRECTION_OUTGOING\\020\\002*}\\n\\021Transa\" +\n      \"ctionStatus\\022\\036\\n\\032TRANSACTION_STATUS_PENDIN\" +\n      \"G\\020\\000\\022 \\n\\034TRANSACTION_STATUS_CONFIRMED\\020\\001\\022&\\n\" +\n      \"\\031TRANSACTION_STATUS_FAILED\\020\\377\\377\\377\\377\\377\\377\\377\\377\\377\\0012\\273\\014\" +\n      \"\\n\\006Wallet\\022I\\n\\014CreateWallet\\022\\033.pactus.Create\" +\n      \"WalletRequest\\032\\034.pactus.CreateWalletRespo\" +\n      \"nse\\022L\\n\\rRestoreWallet\\022\\034.pactus.RestoreWal\" +\n      \"letRequest\\032\\035.pactus.RestoreWalletRespons\" +\n      \"e\\022C\\n\\nLoadWallet\\022\\031.pactus.LoadWalletReque\" +\n      \"st\\032\\032.pactus.LoadWalletResponse\\022I\\n\\014Unload\" +\n      \"Wallet\\022\\033.pactus.UnloadWalletRequest\\032\\034.pa\" +\n      \"ctus.UnloadWalletResponse\\022F\\n\\013ListWallets\" +\n      \"\\022\\032.pactus.ListWalletsRequest\\032\\033.pactus.Li\" +\n      \"stWalletsResponse\\022L\\n\\rGetWalletInfo\\022\\034.pac\" +\n      \"tus.GetWalletInfoRequest\\032\\035.pactus.GetWal\" +\n      \"letInfoResponse\\022O\\n\\016UpdatePassword\\022\\035.pact\" +\n      \"us.UpdatePasswordRequest\\032\\036.pactus.Update\" +\n      \"PasswordResponse\\022R\\n\\017GetTotalBalance\\022\\036.pa\" +\n      \"ctus.GetTotalBalanceRequest\\032\\037.pactus.Get\" +\n      \"TotalBalanceResponse\\022L\\n\\rGetTotalStake\\022\\034.\" +\n      \"pactus.GetTotalStakeRequest\\032\\035.pactus.Get\" +\n      \"TotalStakeResponse\\022^\\n\\023GetValidatorAddres\" +\n      \"s\\022\\\".pactus.GetValidatorAddressRequest\\032#.\" +\n      \"pactus.GetValidatorAddressResponse\\022O\\n\\016Ge\" +\n      \"tAddressInfo\\022\\035.pactus.GetAddressInfoRequ\" +\n      \"est\\032\\036.pactus.GetAddressInfoResponse\\022R\\n\\017S\" +\n      \"etAddressLabel\\022\\036.pactus.SetAddressLabelR\" +\n      \"equest\\032\\037.pactus.SetAddressLabelResponse\\022\" +\n      \"L\\n\\rGetNewAddress\\022\\034.pactus.GetNewAddressR\" +\n      \"equest\\032\\035.pactus.GetNewAddressResponse\\022L\\n\" +\n      \"\\rListAddresses\\022\\034.pactus.ListAddressesReq\" +\n      \"uest\\032\\035.pactus.ListAddressesResponse\\022F\\n\\013S\" +\n      \"ignMessage\\022\\032.pactus.SignMessageRequest\\032\\033\" +\n      \".pactus.SignMessageResponse\\022[\\n\\022SignRawTr\" +\n      \"ansaction\\022!.pactus.SignRawTransactionReq\" +\n      \"uest\\032\\\".pactus.SignRawTransactionResponse\" +\n      \"\\022U\\n\\020ListTransactions\\022\\037.pactus.ListTransa\" +\n      \"ctionsRequest\\032 .pactus.ListTransactionsR\" +\n      \"esponse\\022L\\n\\rSetDefaultFee\\022\\034.pactus.SetDef\" +\n      \"aultFeeRequest\\032\\035.pactus.SetDefaultFeeRes\" +\n      \"ponse\\022F\\n\\013GetMnemonic\\022\\032.pactus.GetMnemoni\" +\n      \"cRequest\\032\\033.pactus.GetMnemonicResponse\\022L\\n\" +\n      \"\\rGetPrivateKey\\022\\034.pactus.GetPrivateKeyReq\" +\n      \"uest\\032\\035.pactus.GetPrivateKeyResponseB:\\n\\006p\" +\n      \"actusZ0github.com/pactus-project/pactus/\" +\n      \"www/grpc/pactusb\\006proto3\"\n    };\n    descriptor = com.google.protobuf.Descriptors.FileDescriptor\n      .internalBuildGeneratedFileFrom(descriptorData,\n        new com.google.protobuf.Descriptors.FileDescriptor[] {\n          pactus.TransactionOuterClass.getDescriptor(),\n        });\n    internal_static_pactus_AddressInfo_descriptor =\n      getDescriptor().getMessageType(0);\n    internal_static_pactus_AddressInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_AddressInfo_descriptor,\n        new java.lang.String[] { \"Address\", \"PublicKey\", \"Label\", \"Path\", });\n    internal_static_pactus_GetNewAddressRequest_descriptor =\n      getDescriptor().getMessageType(1);\n    internal_static_pactus_GetNewAddressRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNewAddressRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"AddressType\", \"Label\", \"Password\", });\n    internal_static_pactus_GetNewAddressResponse_descriptor =\n      getDescriptor().getMessageType(2);\n    internal_static_pactus_GetNewAddressResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetNewAddressResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Addr\", });\n    internal_static_pactus_RestoreWalletRequest_descriptor =\n      getDescriptor().getMessageType(3);\n    internal_static_pactus_RestoreWalletRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_RestoreWalletRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Mnemonic\", \"Password\", });\n    internal_static_pactus_RestoreWalletResponse_descriptor =\n      getDescriptor().getMessageType(4);\n    internal_static_pactus_RestoreWalletResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_RestoreWalletResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_CreateWalletRequest_descriptor =\n      getDescriptor().getMessageType(5);\n    internal_static_pactus_CreateWalletRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CreateWalletRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Password\", });\n    internal_static_pactus_CreateWalletResponse_descriptor =\n      getDescriptor().getMessageType(6);\n    internal_static_pactus_CreateWalletResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_CreateWalletResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Mnemonic\", });\n    internal_static_pactus_LoadWalletRequest_descriptor =\n      getDescriptor().getMessageType(7);\n    internal_static_pactus_LoadWalletRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_LoadWalletRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_LoadWalletResponse_descriptor =\n      getDescriptor().getMessageType(8);\n    internal_static_pactus_LoadWalletResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_LoadWalletResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_UnloadWalletRequest_descriptor =\n      getDescriptor().getMessageType(9);\n    internal_static_pactus_UnloadWalletRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_UnloadWalletRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_UnloadWalletResponse_descriptor =\n      getDescriptor().getMessageType(10);\n    internal_static_pactus_UnloadWalletResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_UnloadWalletResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_GetValidatorAddressRequest_descriptor =\n      getDescriptor().getMessageType(11);\n    internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorAddressRequest_descriptor,\n        new java.lang.String[] { \"PublicKey\", });\n    internal_static_pactus_GetValidatorAddressResponse_descriptor =\n      getDescriptor().getMessageType(12);\n    internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetValidatorAddressResponse_descriptor,\n        new java.lang.String[] { \"Address\", });\n    internal_static_pactus_SignRawTransactionRequest_descriptor =\n      getDescriptor().getMessageType(13);\n    internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignRawTransactionRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"RawTransaction\", \"Password\", });\n    internal_static_pactus_SignRawTransactionResponse_descriptor =\n      getDescriptor().getMessageType(14);\n    internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignRawTransactionResponse_descriptor,\n        new java.lang.String[] { \"TransactionId\", \"SignedRawTransaction\", });\n    internal_static_pactus_GetTotalBalanceRequest_descriptor =\n      getDescriptor().getMessageType(15);\n    internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTotalBalanceRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_GetTotalBalanceResponse_descriptor =\n      getDescriptor().getMessageType(16);\n    internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTotalBalanceResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"TotalBalance\", });\n    internal_static_pactus_SignMessageRequest_descriptor =\n      getDescriptor().getMessageType(17);\n    internal_static_pactus_SignMessageRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignMessageRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Password\", \"Address\", \"Message\", });\n    internal_static_pactus_SignMessageResponse_descriptor =\n      getDescriptor().getMessageType(18);\n    internal_static_pactus_SignMessageResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SignMessageResponse_descriptor,\n        new java.lang.String[] { \"Signature\", });\n    internal_static_pactus_GetTotalStakeRequest_descriptor =\n      getDescriptor().getMessageType(19);\n    internal_static_pactus_GetTotalStakeRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTotalStakeRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_GetTotalStakeResponse_descriptor =\n      getDescriptor().getMessageType(20);\n    internal_static_pactus_GetTotalStakeResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetTotalStakeResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"TotalStake\", });\n    internal_static_pactus_GetAddressInfoRequest_descriptor =\n      getDescriptor().getMessageType(21);\n    internal_static_pactus_GetAddressInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetAddressInfoRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Address\", });\n    internal_static_pactus_GetAddressInfoResponse_descriptor =\n      getDescriptor().getMessageType(22);\n    internal_static_pactus_GetAddressInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetAddressInfoResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Addr\", });\n    internal_static_pactus_SetAddressLabelRequest_descriptor =\n      getDescriptor().getMessageType(23);\n    internal_static_pactus_SetAddressLabelRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SetAddressLabelRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Password\", \"Address\", \"Label\", });\n    internal_static_pactus_SetAddressLabelResponse_descriptor =\n      getDescriptor().getMessageType(24);\n    internal_static_pactus_SetAddressLabelResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SetAddressLabelResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Address\", \"Label\", });\n    internal_static_pactus_ListWalletsRequest_descriptor =\n      getDescriptor().getMessageType(25);\n    internal_static_pactus_ListWalletsRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListWalletsRequest_descriptor,\n        new java.lang.String[] { });\n    internal_static_pactus_ListWalletsResponse_descriptor =\n      getDescriptor().getMessageType(26);\n    internal_static_pactus_ListWalletsResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListWalletsResponse_descriptor,\n        new java.lang.String[] { \"Wallets\", });\n    internal_static_pactus_GetWalletInfoRequest_descriptor =\n      getDescriptor().getMessageType(27);\n    internal_static_pactus_GetWalletInfoRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetWalletInfoRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_GetWalletInfoResponse_descriptor =\n      getDescriptor().getMessageType(28);\n    internal_static_pactus_GetWalletInfoResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetWalletInfoResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Version\", \"Network\", \"Encrypted\", \"Uuid\", \"CreatedAt\", \"DefaultFee\", \"Driver\", \"Path\", });\n    internal_static_pactus_ListAddressesRequest_descriptor =\n      getDescriptor().getMessageType(29);\n    internal_static_pactus_ListAddressesRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListAddressesRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"AddressTypes\", });\n    internal_static_pactus_ListAddressesResponse_descriptor =\n      getDescriptor().getMessageType(30);\n    internal_static_pactus_ListAddressesResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListAddressesResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Addrs\", });\n    internal_static_pactus_UpdatePasswordRequest_descriptor =\n      getDescriptor().getMessageType(31);\n    internal_static_pactus_UpdatePasswordRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_UpdatePasswordRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"OldPassword\", \"NewPassword\", });\n    internal_static_pactus_UpdatePasswordResponse_descriptor =\n      getDescriptor().getMessageType(32);\n    internal_static_pactus_UpdatePasswordResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_UpdatePasswordResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_WalletTransactionInfo_descriptor =\n      getDescriptor().getMessageType(33);\n    internal_static_pactus_WalletTransactionInfo_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_WalletTransactionInfo_descriptor,\n        new java.lang.String[] { \"No\", \"TxId\", \"Sender\", \"Receiver\", \"Direction\", \"Amount\", \"Fee\", \"Memo\", \"Status\", \"BlockHeight\", \"PayloadType\", \"Data\", \"Comment\", \"CreatedAt\", \"UpdatedAt\", });\n    internal_static_pactus_ListTransactionsRequest_descriptor =\n      getDescriptor().getMessageType(34);\n    internal_static_pactus_ListTransactionsRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListTransactionsRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Address\", \"Direction\", \"Count\", \"Skip\", });\n    internal_static_pactus_ListTransactionsResponse_descriptor =\n      getDescriptor().getMessageType(35);\n    internal_static_pactus_ListTransactionsResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_ListTransactionsResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Txs\", });\n    internal_static_pactus_SetDefaultFeeRequest_descriptor =\n      getDescriptor().getMessageType(36);\n    internal_static_pactus_SetDefaultFeeRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SetDefaultFeeRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Amount\", });\n    internal_static_pactus_SetDefaultFeeResponse_descriptor =\n      getDescriptor().getMessageType(37);\n    internal_static_pactus_SetDefaultFeeResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_SetDefaultFeeResponse_descriptor,\n        new java.lang.String[] { \"WalletName\", });\n    internal_static_pactus_GetMnemonicRequest_descriptor =\n      getDescriptor().getMessageType(38);\n    internal_static_pactus_GetMnemonicRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetMnemonicRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Password\", });\n    internal_static_pactus_GetMnemonicResponse_descriptor =\n      getDescriptor().getMessageType(39);\n    internal_static_pactus_GetMnemonicResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetMnemonicResponse_descriptor,\n        new java.lang.String[] { \"Mnemonic\", });\n    internal_static_pactus_GetPrivateKeyRequest_descriptor =\n      getDescriptor().getMessageType(40);\n    internal_static_pactus_GetPrivateKeyRequest_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetPrivateKeyRequest_descriptor,\n        new java.lang.String[] { \"WalletName\", \"Password\", \"Address\", });\n    internal_static_pactus_GetPrivateKeyResponse_descriptor =\n      getDescriptor().getMessageType(41);\n    internal_static_pactus_GetPrivateKeyResponse_fieldAccessorTable = new\n      com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n        internal_static_pactus_GetPrivateKeyResponse_descriptor,\n        new java.lang.String[] { \"PrivateKey\", });\n    descriptor.resolveAllFeaturesImmutable();\n    pactus.TransactionOuterClass.getDescriptor();\n  }\n\n  // @@protoc_insertion_point(outer_class_scope)\n}\n"
  },
  {
    "path": "www/grpc/gen/js/blockchain_grpc_pb.js",
    "content": "// GENERATED CODE -- DO NOT EDIT!\n\n'use strict';\nvar grpc = require('@grpc/grpc-js');\nvar blockchain_pb = require('./blockchain_pb.js');\nvar transaction_pb = require('./transaction_pb.js');\n\nfunction serialize_pactus_GetAccountRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetAccountRequest)) {\n    throw new Error('Expected argument of type pactus.GetAccountRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetAccountRequest(buffer_arg) {\n  return blockchain_pb.GetAccountRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetAccountResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetAccountResponse)) {\n    throw new Error('Expected argument of type pactus.GetAccountResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetAccountResponse(buffer_arg) {\n  return blockchain_pb.GetAccountResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockHashRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockHashRequest)) {\n    throw new Error('Expected argument of type pactus.GetBlockHashRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockHashRequest(buffer_arg) {\n  return blockchain_pb.GetBlockHashRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockHashResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockHashResponse)) {\n    throw new Error('Expected argument of type pactus.GetBlockHashResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockHashResponse(buffer_arg) {\n  return blockchain_pb.GetBlockHashResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockHeightRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockHeightRequest)) {\n    throw new Error('Expected argument of type pactus.GetBlockHeightRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockHeightRequest(buffer_arg) {\n  return blockchain_pb.GetBlockHeightRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockHeightResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockHeightResponse)) {\n    throw new Error('Expected argument of type pactus.GetBlockHeightResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockHeightResponse(buffer_arg) {\n  return blockchain_pb.GetBlockHeightResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockRequest)) {\n    throw new Error('Expected argument of type pactus.GetBlockRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockRequest(buffer_arg) {\n  return blockchain_pb.GetBlockRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockResponse)) {\n    throw new Error('Expected argument of type pactus.GetBlockResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockResponse(buffer_arg) {\n  return blockchain_pb.GetBlockResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockchainInfoRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockchainInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetBlockchainInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockchainInfoRequest(buffer_arg) {\n  return blockchain_pb.GetBlockchainInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetBlockchainInfoResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetBlockchainInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetBlockchainInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetBlockchainInfoResponse(buffer_arg) {\n  return blockchain_pb.GetBlockchainInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetCommitteeInfoRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetCommitteeInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetCommitteeInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetCommitteeInfoRequest(buffer_arg) {\n  return blockchain_pb.GetCommitteeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetCommitteeInfoResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetCommitteeInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetCommitteeInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetCommitteeInfoResponse(buffer_arg) {\n  return blockchain_pb.GetCommitteeInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetConsensusInfoRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetConsensusInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetConsensusInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetConsensusInfoRequest(buffer_arg) {\n  return blockchain_pb.GetConsensusInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetConsensusInfoResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetConsensusInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetConsensusInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetConsensusInfoResponse(buffer_arg) {\n  return blockchain_pb.GetConsensusInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetPublicKeyRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetPublicKeyRequest)) {\n    throw new Error('Expected argument of type pactus.GetPublicKeyRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetPublicKeyRequest(buffer_arg) {\n  return blockchain_pb.GetPublicKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetPublicKeyResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetPublicKeyResponse)) {\n    throw new Error('Expected argument of type pactus.GetPublicKeyResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetPublicKeyResponse(buffer_arg) {\n  return blockchain_pb.GetPublicKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTxPoolContentRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetTxPoolContentRequest)) {\n    throw new Error('Expected argument of type pactus.GetTxPoolContentRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTxPoolContentRequest(buffer_arg) {\n  return blockchain_pb.GetTxPoolContentRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTxPoolContentResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetTxPoolContentResponse)) {\n    throw new Error('Expected argument of type pactus.GetTxPoolContentResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTxPoolContentResponse(buffer_arg) {\n  return blockchain_pb.GetTxPoolContentResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorAddressesRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetValidatorAddressesRequest)) {\n    throw new Error('Expected argument of type pactus.GetValidatorAddressesRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorAddressesRequest(buffer_arg) {\n  return blockchain_pb.GetValidatorAddressesRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorAddressesResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetValidatorAddressesResponse)) {\n    throw new Error('Expected argument of type pactus.GetValidatorAddressesResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorAddressesResponse(buffer_arg) {\n  return blockchain_pb.GetValidatorAddressesResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorByNumberRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetValidatorByNumberRequest)) {\n    throw new Error('Expected argument of type pactus.GetValidatorByNumberRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorByNumberRequest(buffer_arg) {\n  return blockchain_pb.GetValidatorByNumberRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorRequest(arg) {\n  if (!(arg instanceof blockchain_pb.GetValidatorRequest)) {\n    throw new Error('Expected argument of type pactus.GetValidatorRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorRequest(buffer_arg) {\n  return blockchain_pb.GetValidatorRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorResponse(arg) {\n  if (!(arg instanceof blockchain_pb.GetValidatorResponse)) {\n    throw new Error('Expected argument of type pactus.GetValidatorResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorResponse(buffer_arg) {\n  return blockchain_pb.GetValidatorResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\n\n// Blockchain service defines RPC methods for interacting with the blockchain.\nvar BlockchainService = exports.BlockchainService = {\n  // GetBlock retrieves information about a block based on the provided request parameters.\ngetBlock: {\n    path: '/pactus.Blockchain/GetBlock',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetBlockRequest,\n    responseType: blockchain_pb.GetBlockResponse,\n    requestSerialize: serialize_pactus_GetBlockRequest,\n    requestDeserialize: deserialize_pactus_GetBlockRequest,\n    responseSerialize: serialize_pactus_GetBlockResponse,\n    responseDeserialize: deserialize_pactus_GetBlockResponse,\n  },\n  // GetBlockHash retrieves the hash of a block at the specified height.\ngetBlockHash: {\n    path: '/pactus.Blockchain/GetBlockHash',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetBlockHashRequest,\n    responseType: blockchain_pb.GetBlockHashResponse,\n    requestSerialize: serialize_pactus_GetBlockHashRequest,\n    requestDeserialize: deserialize_pactus_GetBlockHashRequest,\n    responseSerialize: serialize_pactus_GetBlockHashResponse,\n    responseDeserialize: deserialize_pactus_GetBlockHashResponse,\n  },\n  // GetBlockHeight retrieves the height of a block with the specified hash.\ngetBlockHeight: {\n    path: '/pactus.Blockchain/GetBlockHeight',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetBlockHeightRequest,\n    responseType: blockchain_pb.GetBlockHeightResponse,\n    requestSerialize: serialize_pactus_GetBlockHeightRequest,\n    requestDeserialize: deserialize_pactus_GetBlockHeightRequest,\n    responseSerialize: serialize_pactus_GetBlockHeightResponse,\n    responseDeserialize: deserialize_pactus_GetBlockHeightResponse,\n  },\n  // GetBlockchainInfo retrieves general information about the blockchain.\ngetBlockchainInfo: {\n    path: '/pactus.Blockchain/GetBlockchainInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetBlockchainInfoRequest,\n    responseType: blockchain_pb.GetBlockchainInfoResponse,\n    requestSerialize: serialize_pactus_GetBlockchainInfoRequest,\n    requestDeserialize: deserialize_pactus_GetBlockchainInfoRequest,\n    responseSerialize: serialize_pactus_GetBlockchainInfoResponse,\n    responseDeserialize: deserialize_pactus_GetBlockchainInfoResponse,\n  },\n  // GetCommitteeInfo retrieves information about the current committee.\ngetCommitteeInfo: {\n    path: '/pactus.Blockchain/GetCommitteeInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetCommitteeInfoRequest,\n    responseType: blockchain_pb.GetCommitteeInfoResponse,\n    requestSerialize: serialize_pactus_GetCommitteeInfoRequest,\n    requestDeserialize: deserialize_pactus_GetCommitteeInfoRequest,\n    responseSerialize: serialize_pactus_GetCommitteeInfoResponse,\n    responseDeserialize: deserialize_pactus_GetCommitteeInfoResponse,\n  },\n  // GetConsensusInfo retrieves information about the consensus instances.\ngetConsensusInfo: {\n    path: '/pactus.Blockchain/GetConsensusInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetConsensusInfoRequest,\n    responseType: blockchain_pb.GetConsensusInfoResponse,\n    requestSerialize: serialize_pactus_GetConsensusInfoRequest,\n    requestDeserialize: deserialize_pactus_GetConsensusInfoRequest,\n    responseSerialize: serialize_pactus_GetConsensusInfoResponse,\n    responseDeserialize: deserialize_pactus_GetConsensusInfoResponse,\n  },\n  // GetAccount retrieves information about an account based on the provided address.\ngetAccount: {\n    path: '/pactus.Blockchain/GetAccount',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetAccountRequest,\n    responseType: blockchain_pb.GetAccountResponse,\n    requestSerialize: serialize_pactus_GetAccountRequest,\n    requestDeserialize: deserialize_pactus_GetAccountRequest,\n    responseSerialize: serialize_pactus_GetAccountResponse,\n    responseDeserialize: deserialize_pactus_GetAccountResponse,\n  },\n  // GetValidator retrieves information about a validator based on the provided address.\ngetValidator: {\n    path: '/pactus.Blockchain/GetValidator',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetValidatorRequest,\n    responseType: blockchain_pb.GetValidatorResponse,\n    requestSerialize: serialize_pactus_GetValidatorRequest,\n    requestDeserialize: deserialize_pactus_GetValidatorRequest,\n    responseSerialize: serialize_pactus_GetValidatorResponse,\n    responseDeserialize: deserialize_pactus_GetValidatorResponse,\n  },\n  // GetValidatorByNumber retrieves information about a validator based on the provided number.\ngetValidatorByNumber: {\n    path: '/pactus.Blockchain/GetValidatorByNumber',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetValidatorByNumberRequest,\n    responseType: blockchain_pb.GetValidatorResponse,\n    requestSerialize: serialize_pactus_GetValidatorByNumberRequest,\n    requestDeserialize: deserialize_pactus_GetValidatorByNumberRequest,\n    responseSerialize: serialize_pactus_GetValidatorResponse,\n    responseDeserialize: deserialize_pactus_GetValidatorResponse,\n  },\n  // GetValidatorAddresses retrieves a list of all validator addresses.\ngetValidatorAddresses: {\n    path: '/pactus.Blockchain/GetValidatorAddresses',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetValidatorAddressesRequest,\n    responseType: blockchain_pb.GetValidatorAddressesResponse,\n    requestSerialize: serialize_pactus_GetValidatorAddressesRequest,\n    requestDeserialize: deserialize_pactus_GetValidatorAddressesRequest,\n    responseSerialize: serialize_pactus_GetValidatorAddressesResponse,\n    responseDeserialize: deserialize_pactus_GetValidatorAddressesResponse,\n  },\n  // GetPublicKey retrieves the public key of an account based on the provided address.\ngetPublicKey: {\n    path: '/pactus.Blockchain/GetPublicKey',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetPublicKeyRequest,\n    responseType: blockchain_pb.GetPublicKeyResponse,\n    requestSerialize: serialize_pactus_GetPublicKeyRequest,\n    requestDeserialize: deserialize_pactus_GetPublicKeyRequest,\n    responseSerialize: serialize_pactus_GetPublicKeyResponse,\n    responseDeserialize: deserialize_pactus_GetPublicKeyResponse,\n  },\n  // GetTxPoolContent retrieves current transactions in the transaction pool.\ngetTxPoolContent: {\n    path: '/pactus.Blockchain/GetTxPoolContent',\n    requestStream: false,\n    responseStream: false,\n    requestType: blockchain_pb.GetTxPoolContentRequest,\n    responseType: blockchain_pb.GetTxPoolContentResponse,\n    requestSerialize: serialize_pactus_GetTxPoolContentRequest,\n    requestDeserialize: deserialize_pactus_GetTxPoolContentRequest,\n    responseSerialize: serialize_pactus_GetTxPoolContentResponse,\n    responseDeserialize: deserialize_pactus_GetTxPoolContentResponse,\n  },\n};\n\nexports.BlockchainClient = grpc.makeGenericClientConstructor(BlockchainService, 'Blockchain');\n"
  },
  {
    "path": "www/grpc/gen/js/blockchain_grpc_web_pb.js",
    "content": "/**\n * @fileoverview gRPC-Web generated client stub for pactus\n * @enhanceable\n * @public\n */\n\n// Code generated by protoc-gen-grpc-web. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-grpc-web v2.0.2\n// \tprotoc              v0.0.0\n// source: blockchain.proto\n\n\n/* eslint-disable */\n// @ts-nocheck\n\n\n\nconst grpc = {};\ngrpc.web = require('grpc-web');\n\n\nvar transaction_pb = require('./transaction_pb.js')\nconst proto = {};\nproto.pactus = require('./blockchain_pb.js');\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.BlockchainClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.BlockchainPromiseClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetBlockRequest,\n *   !proto.pactus.GetBlockResponse>}\n */\nconst methodDescriptor_Blockchain_GetBlock = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetBlock',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetBlockRequest,\n  proto.pactus.GetBlockResponse,\n  /**\n   * @param {!proto.pactus.GetBlockRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetBlockResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetBlockRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetBlockResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetBlockResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getBlock =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlock',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlock,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetBlockRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetBlockResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getBlock =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlock',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlock);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetBlockHashRequest,\n *   !proto.pactus.GetBlockHashResponse>}\n */\nconst methodDescriptor_Blockchain_GetBlockHash = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetBlockHash',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetBlockHashRequest,\n  proto.pactus.GetBlockHashResponse,\n  /**\n   * @param {!proto.pactus.GetBlockHashRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetBlockHashResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetBlockHashRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetBlockHashResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetBlockHashResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getBlockHash =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockHash',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockHash,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetBlockHashRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetBlockHashResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getBlockHash =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockHash',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockHash);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetBlockHeightRequest,\n *   !proto.pactus.GetBlockHeightResponse>}\n */\nconst methodDescriptor_Blockchain_GetBlockHeight = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetBlockHeight',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetBlockHeightRequest,\n  proto.pactus.GetBlockHeightResponse,\n  /**\n   * @param {!proto.pactus.GetBlockHeightRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetBlockHeightResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetBlockHeightRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetBlockHeightResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetBlockHeightResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getBlockHeight =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockHeight',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockHeight,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetBlockHeightRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetBlockHeightResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getBlockHeight =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockHeight',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockHeight);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetBlockchainInfoRequest,\n *   !proto.pactus.GetBlockchainInfoResponse>}\n */\nconst methodDescriptor_Blockchain_GetBlockchainInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetBlockchainInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetBlockchainInfoRequest,\n  proto.pactus.GetBlockchainInfoResponse,\n  /**\n   * @param {!proto.pactus.GetBlockchainInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetBlockchainInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetBlockchainInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetBlockchainInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetBlockchainInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getBlockchainInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockchainInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockchainInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetBlockchainInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetBlockchainInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getBlockchainInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetBlockchainInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetBlockchainInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetCommitteeInfoRequest,\n *   !proto.pactus.GetCommitteeInfoResponse>}\n */\nconst methodDescriptor_Blockchain_GetCommitteeInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetCommitteeInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetCommitteeInfoRequest,\n  proto.pactus.GetCommitteeInfoResponse,\n  /**\n   * @param {!proto.pactus.GetCommitteeInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetCommitteeInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetCommitteeInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetCommitteeInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetCommitteeInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getCommitteeInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetCommitteeInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetCommitteeInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetCommitteeInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetCommitteeInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getCommitteeInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetCommitteeInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetCommitteeInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetConsensusInfoRequest,\n *   !proto.pactus.GetConsensusInfoResponse>}\n */\nconst methodDescriptor_Blockchain_GetConsensusInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetConsensusInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetConsensusInfoRequest,\n  proto.pactus.GetConsensusInfoResponse,\n  /**\n   * @param {!proto.pactus.GetConsensusInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetConsensusInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetConsensusInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetConsensusInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetConsensusInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getConsensusInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetConsensusInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetConsensusInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetConsensusInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetConsensusInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getConsensusInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetConsensusInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetConsensusInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetAccountRequest,\n *   !proto.pactus.GetAccountResponse>}\n */\nconst methodDescriptor_Blockchain_GetAccount = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetAccount',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetAccountRequest,\n  proto.pactus.GetAccountResponse,\n  /**\n   * @param {!proto.pactus.GetAccountRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetAccountResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetAccountRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetAccountResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetAccountResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getAccount =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetAccount',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetAccount,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetAccountRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetAccountResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getAccount =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetAccount',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetAccount);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetValidatorRequest,\n *   !proto.pactus.GetValidatorResponse>}\n */\nconst methodDescriptor_Blockchain_GetValidator = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetValidator',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetValidatorRequest,\n  proto.pactus.GetValidatorResponse,\n  /**\n   * @param {!proto.pactus.GetValidatorRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetValidatorResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetValidatorRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetValidatorResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetValidatorResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getValidator =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidator',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidator,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetValidatorRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetValidatorResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getValidator =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidator',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidator);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetValidatorByNumberRequest,\n *   !proto.pactus.GetValidatorResponse>}\n */\nconst methodDescriptor_Blockchain_GetValidatorByNumber = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetValidatorByNumber',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetValidatorByNumberRequest,\n  proto.pactus.GetValidatorResponse,\n  /**\n   * @param {!proto.pactus.GetValidatorByNumberRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetValidatorResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetValidatorByNumberRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetValidatorResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetValidatorResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getValidatorByNumber =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidatorByNumber',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidatorByNumber,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetValidatorByNumberRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetValidatorResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getValidatorByNumber =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidatorByNumber',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidatorByNumber);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetValidatorAddressesRequest,\n *   !proto.pactus.GetValidatorAddressesResponse>}\n */\nconst methodDescriptor_Blockchain_GetValidatorAddresses = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetValidatorAddresses',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetValidatorAddressesRequest,\n  proto.pactus.GetValidatorAddressesResponse,\n  /**\n   * @param {!proto.pactus.GetValidatorAddressesRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetValidatorAddressesResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetValidatorAddressesRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetValidatorAddressesResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetValidatorAddressesResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getValidatorAddresses =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidatorAddresses',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidatorAddresses,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetValidatorAddressesRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetValidatorAddressesResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getValidatorAddresses =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetValidatorAddresses',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetValidatorAddresses);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetPublicKeyRequest,\n *   !proto.pactus.GetPublicKeyResponse>}\n */\nconst methodDescriptor_Blockchain_GetPublicKey = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetPublicKey',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetPublicKeyRequest,\n  proto.pactus.GetPublicKeyResponse,\n  /**\n   * @param {!proto.pactus.GetPublicKeyRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetPublicKeyResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetPublicKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetPublicKeyResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetPublicKeyResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getPublicKey =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetPublicKey',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetPublicKey,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetPublicKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetPublicKeyResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getPublicKey =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetPublicKey',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetPublicKey);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetTxPoolContentRequest,\n *   !proto.pactus.GetTxPoolContentResponse>}\n */\nconst methodDescriptor_Blockchain_GetTxPoolContent = new grpc.web.MethodDescriptor(\n  '/pactus.Blockchain/GetTxPoolContent',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetTxPoolContentRequest,\n  proto.pactus.GetTxPoolContentResponse,\n  /**\n   * @param {!proto.pactus.GetTxPoolContentRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetTxPoolContentResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetTxPoolContentRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetTxPoolContentResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetTxPoolContentResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.BlockchainClient.prototype.getTxPoolContent =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Blockchain/GetTxPoolContent',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetTxPoolContent,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetTxPoolContentRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetTxPoolContentResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.BlockchainPromiseClient.prototype.getTxPoolContent =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Blockchain/GetTxPoolContent',\n      request,\n      metadata || {},\n      methodDescriptor_Blockchain_GetTxPoolContent);\n};\n\n\nmodule.exports = proto.pactus;\n\n"
  },
  {
    "path": "www/grpc/gen/js/blockchain_pb.js",
    "content": "// source: blockchain.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = globalThis;\n\nvar transaction_pb = require('./transaction_pb.js');\ngoog.object.extend(proto, transaction_pb);\ngoog.exportSymbol('proto.pactus.AccountInfo', null, global);\ngoog.exportSymbol('proto.pactus.BlockHeaderInfo', null, global);\ngoog.exportSymbol('proto.pactus.BlockVerbosity', null, global);\ngoog.exportSymbol('proto.pactus.CertificateInfo', null, global);\ngoog.exportSymbol('proto.pactus.ConsensusInfo', null, global);\ngoog.exportSymbol('proto.pactus.GetAccountRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetAccountResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockHashRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockHashResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockHeightRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockHeightResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockchainInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetBlockchainInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetCommitteeInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetCommitteeInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetConsensusInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetConsensusInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetPublicKeyRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetPublicKeyResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetTxPoolContentRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetTxPoolContentResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorAddressesRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorAddressesResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorByNumberRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorResponse', null, global);\ngoog.exportSymbol('proto.pactus.ProposalInfo', null, global);\ngoog.exportSymbol('proto.pactus.ValidatorInfo', null, global);\ngoog.exportSymbol('proto.pactus.VoteInfo', null, global);\ngoog.exportSymbol('proto.pactus.VoteType', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetAccountRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetAccountRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetAccountRequest.displayName = 'proto.pactus.GetAccountRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetAccountResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetAccountResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetAccountResponse.displayName = 'proto.pactus.GetAccountResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorAddressesRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorAddressesRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorAddressesRequest.displayName = 'proto.pactus.GetValidatorAddressesRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorAddressesResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetValidatorAddressesResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetValidatorAddressesResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorAddressesResponse.displayName = 'proto.pactus.GetValidatorAddressesResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorRequest.displayName = 'proto.pactus.GetValidatorRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorByNumberRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorByNumberRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorByNumberRequest.displayName = 'proto.pactus.GetValidatorByNumberRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorResponse.displayName = 'proto.pactus.GetValidatorResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetPublicKeyRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetPublicKeyRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetPublicKeyRequest.displayName = 'proto.pactus.GetPublicKeyRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetPublicKeyResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetPublicKeyResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetPublicKeyResponse.displayName = 'proto.pactus.GetPublicKeyResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockRequest.displayName = 'proto.pactus.GetBlockRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetBlockResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetBlockResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockResponse.displayName = 'proto.pactus.GetBlockResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockHashRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockHashRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockHashRequest.displayName = 'proto.pactus.GetBlockHashRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockHashResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockHashResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockHashResponse.displayName = 'proto.pactus.GetBlockHashResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockHeightRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockHeightRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockHeightRequest.displayName = 'proto.pactus.GetBlockHeightRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockHeightResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockHeightResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockHeightResponse.displayName = 'proto.pactus.GetBlockHeightResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockchainInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockchainInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockchainInfoRequest.displayName = 'proto.pactus.GetBlockchainInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetBlockchainInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetBlockchainInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetBlockchainInfoResponse.displayName = 'proto.pactus.GetBlockchainInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetCommitteeInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetCommitteeInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetCommitteeInfoRequest.displayName = 'proto.pactus.GetCommitteeInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetCommitteeInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetCommitteeInfoResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetCommitteeInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetCommitteeInfoResponse.displayName = 'proto.pactus.GetCommitteeInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetConsensusInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetConsensusInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetConsensusInfoRequest.displayName = 'proto.pactus.GetConsensusInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetConsensusInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetConsensusInfoResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetConsensusInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetConsensusInfoResponse.displayName = 'proto.pactus.GetConsensusInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTxPoolContentRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTxPoolContentRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTxPoolContentRequest.displayName = 'proto.pactus.GetTxPoolContentRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTxPoolContentResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetTxPoolContentResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetTxPoolContentResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTxPoolContentResponse.displayName = 'proto.pactus.GetTxPoolContentResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ValidatorInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ValidatorInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ValidatorInfo.displayName = 'proto.pactus.ValidatorInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.AccountInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.AccountInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.AccountInfo.displayName = 'proto.pactus.AccountInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.BlockHeaderInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.BlockHeaderInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.BlockHeaderInfo.displayName = 'proto.pactus.BlockHeaderInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CertificateInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.CertificateInfo.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.CertificateInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CertificateInfo.displayName = 'proto.pactus.CertificateInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.VoteInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.VoteInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.VoteInfo.displayName = 'proto.pactus.VoteInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ConsensusInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ConsensusInfo.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ConsensusInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ConsensusInfo.displayName = 'proto.pactus.ConsensusInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ProposalInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ProposalInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ProposalInfo.displayName = 'proto.pactus.ProposalInfo';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetAccountRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetAccountRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetAccountRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAccountRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetAccountRequest}\n */\nproto.pactus.GetAccountRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetAccountRequest;\n  return proto.pactus.GetAccountRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetAccountRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetAccountRequest}\n */\nproto.pactus.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetAccountRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetAccountRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetAccountRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAccountRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.GetAccountRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetAccountRequest} returns this\n */\nproto.pactus.GetAccountRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetAccountResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetAccountResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetAccountResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAccountResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\naccount: (f = msg.getAccount()) && proto.pactus.AccountInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetAccountResponse}\n */\nproto.pactus.GetAccountResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetAccountResponse;\n  return proto.pactus.GetAccountResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetAccountResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetAccountResponse}\n */\nproto.pactus.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.AccountInfo;\n      reader.readMessage(value,proto.pactus.AccountInfo.deserializeBinaryFromReader);\n      msg.setAccount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetAccountResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetAccountResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetAccountResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAccountResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAccount();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.pactus.AccountInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional AccountInfo account = 1;\n * @return {?proto.pactus.AccountInfo}\n */\nproto.pactus.GetAccountResponse.prototype.getAccount = function() {\n  return /** @type{?proto.pactus.AccountInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.AccountInfo, 1));\n};\n\n\n/**\n * @param {?proto.pactus.AccountInfo|undefined} value\n * @return {!proto.pactus.GetAccountResponse} returns this\n*/\nproto.pactus.GetAccountResponse.prototype.setAccount = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetAccountResponse} returns this\n */\nproto.pactus.GetAccountResponse.prototype.clearAccount = function() {\n  return this.setAccount(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetAccountResponse.prototype.hasAccount = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorAddressesRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorAddressesRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorAddressesRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressesRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorAddressesRequest}\n */\nproto.pactus.GetValidatorAddressesRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorAddressesRequest;\n  return proto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorAddressesRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorAddressesRequest}\n */\nproto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorAddressesRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorAddressesRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetValidatorAddressesResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorAddressesResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorAddressesResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressesResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorAddressesResponse}\n */\nproto.pactus.GetValidatorAddressesResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorAddressesResponse;\n  return proto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorAddressesResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorAddressesResponse}\n */\nproto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addAddresses(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorAddressesResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddressesList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated string addresses = 1;\n * @return {!Array<string>}\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.getAddressesList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.GetValidatorAddressesResponse} returns this\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.setAddressesList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.GetValidatorAddressesResponse} returns this\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.addAddresses = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetValidatorAddressesResponse} returns this\n */\nproto.pactus.GetValidatorAddressesResponse.prototype.clearAddressesList = function() {\n  return this.setAddressesList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorRequest}\n */\nproto.pactus.GetValidatorRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorRequest;\n  return proto.pactus.GetValidatorRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorRequest}\n */\nproto.pactus.GetValidatorRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.GetValidatorRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetValidatorRequest} returns this\n */\nproto.pactus.GetValidatorRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorByNumberRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorByNumberRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorByNumberRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorByNumberRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nnumber: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorByNumberRequest}\n */\nproto.pactus.GetValidatorByNumberRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorByNumberRequest;\n  return proto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorByNumberRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorByNumberRequest}\n */\nproto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setNumber(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorByNumberRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorByNumberRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getNumber();\n  if (f !== 0) {\n    writer.writeInt32(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int32 number = 1;\n * @return {number}\n */\nproto.pactus.GetValidatorByNumberRequest.prototype.getNumber = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetValidatorByNumberRequest} returns this\n */\nproto.pactus.GetValidatorByNumberRequest.prototype.setNumber = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nvalidator: (f = msg.getValidator()) && proto.pactus.ValidatorInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorResponse}\n */\nproto.pactus.GetValidatorResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorResponse;\n  return proto.pactus.GetValidatorResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorResponse}\n */\nproto.pactus.GetValidatorResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.ValidatorInfo;\n      reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader);\n      msg.setValidator(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValidator();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.pactus.ValidatorInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional ValidatorInfo validator = 1;\n * @return {?proto.pactus.ValidatorInfo}\n */\nproto.pactus.GetValidatorResponse.prototype.getValidator = function() {\n  return /** @type{?proto.pactus.ValidatorInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.ValidatorInfo, 1));\n};\n\n\n/**\n * @param {?proto.pactus.ValidatorInfo|undefined} value\n * @return {!proto.pactus.GetValidatorResponse} returns this\n*/\nproto.pactus.GetValidatorResponse.prototype.setValidator = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetValidatorResponse} returns this\n */\nproto.pactus.GetValidatorResponse.prototype.clearValidator = function() {\n  return this.setValidator(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetValidatorResponse.prototype.hasValidator = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetPublicKeyRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetPublicKeyRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetPublicKeyRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPublicKeyRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetPublicKeyRequest}\n */\nproto.pactus.GetPublicKeyRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetPublicKeyRequest;\n  return proto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetPublicKeyRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetPublicKeyRequest}\n */\nproto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetPublicKeyRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetPublicKeyRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetPublicKeyRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPublicKeyRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.GetPublicKeyRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPublicKeyRequest} returns this\n */\nproto.pactus.GetPublicKeyRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetPublicKeyResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetPublicKeyResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetPublicKeyResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPublicKeyResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\npublicKey: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetPublicKeyResponse}\n */\nproto.pactus.GetPublicKeyResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetPublicKeyResponse;\n  return proto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetPublicKeyResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetPublicKeyResponse}\n */\nproto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetPublicKeyResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetPublicKeyResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetPublicKeyResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPublicKeyResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string public_key = 1;\n * @return {string}\n */\nproto.pactus.GetPublicKeyResponse.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPublicKeyResponse} returns this\n */\nproto.pactus.GetPublicKeyResponse.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nheight: jspb.Message.getFieldWithDefault(msg, 1, 0),\nverbosity: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockRequest}\n */\nproto.pactus.GetBlockRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockRequest;\n  return proto.pactus.GetBlockRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockRequest}\n */\nproto.pactus.GetBlockRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.pactus.BlockVerbosity} */ (reader.readEnum());\n      msg.setVerbosity(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getVerbosity();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 height = 1;\n * @return {number}\n */\nproto.pactus.GetBlockRequest.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockRequest} returns this\n */\nproto.pactus.GetBlockRequest.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional BlockVerbosity verbosity = 2;\n * @return {!proto.pactus.BlockVerbosity}\n */\nproto.pactus.GetBlockRequest.prototype.getVerbosity = function() {\n  return /** @type {!proto.pactus.BlockVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.pactus.BlockVerbosity} value\n * @return {!proto.pactus.GetBlockRequest} returns this\n */\nproto.pactus.GetBlockRequest.prototype.setVerbosity = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetBlockResponse.repeatedFields_ = [7];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nheight: jspb.Message.getFieldWithDefault(msg, 1, 0),\nhash: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\ndata: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nblockTime: jspb.Message.getFieldWithDefault(msg, 4, 0),\nheader: (f = msg.getHeader()) && proto.pactus.BlockHeaderInfo.toObject(includeInstance, f),\nprevCert: (f = msg.getPrevCert()) && proto.pactus.CertificateInfo.toObject(includeInstance, f),\ntxsList: jspb.Message.toObjectList(msg.getTxsList(),\n    transaction_pb.TransactionInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockResponse}\n */\nproto.pactus.GetBlockResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockResponse;\n  return proto.pactus.GetBlockResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockResponse}\n */\nproto.pactus.GetBlockResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setData(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setBlockTime(value);\n      break;\n    case 5:\n      var value = new proto.pactus.BlockHeaderInfo;\n      reader.readMessage(value,proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader);\n      msg.setHeader(value);\n      break;\n    case 6:\n      var value = new proto.pactus.CertificateInfo;\n      reader.readMessage(value,proto.pactus.CertificateInfo.deserializeBinaryFromReader);\n      msg.setPrevCert(value);\n      break;\n    case 7:\n      var value = new transaction_pb.TransactionInfo;\n      reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader);\n      msg.addTxs(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getData();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getBlockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      4,\n      f\n    );\n  }\n  f = message.getHeader();\n  if (f != null) {\n    writer.writeMessage(\n      5,\n      f,\n      proto.pactus.BlockHeaderInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getPrevCert();\n  if (f != null) {\n    writer.writeMessage(\n      6,\n      f,\n      proto.pactus.CertificateInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getTxsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      7,\n      f,\n      transaction_pb.TransactionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional uint32 height = 1;\n * @return {number}\n */\nproto.pactus.GetBlockResponse.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string hash = 2;\n * @return {string}\n */\nproto.pactus.GetBlockResponse.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string data = 3;\n * @return {string}\n */\nproto.pactus.GetBlockResponse.prototype.getData = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.setData = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional uint32 block_time = 4;\n * @return {number}\n */\nproto.pactus.GetBlockResponse.prototype.getBlockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.setBlockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional BlockHeaderInfo header = 5;\n * @return {?proto.pactus.BlockHeaderInfo}\n */\nproto.pactus.GetBlockResponse.prototype.getHeader = function() {\n  return /** @type{?proto.pactus.BlockHeaderInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.BlockHeaderInfo, 5));\n};\n\n\n/**\n * @param {?proto.pactus.BlockHeaderInfo|undefined} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n*/\nproto.pactus.GetBlockResponse.prototype.setHeader = function(value) {\n  return jspb.Message.setWrapperField(this, 5, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.clearHeader = function() {\n  return this.setHeader(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetBlockResponse.prototype.hasHeader = function() {\n  return jspb.Message.getField(this, 5) != null;\n};\n\n\n/**\n * optional CertificateInfo prev_cert = 6;\n * @return {?proto.pactus.CertificateInfo}\n */\nproto.pactus.GetBlockResponse.prototype.getPrevCert = function() {\n  return /** @type{?proto.pactus.CertificateInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.CertificateInfo, 6));\n};\n\n\n/**\n * @param {?proto.pactus.CertificateInfo|undefined} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n*/\nproto.pactus.GetBlockResponse.prototype.setPrevCert = function(value) {\n  return jspb.Message.setWrapperField(this, 6, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.clearPrevCert = function() {\n  return this.setPrevCert(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetBlockResponse.prototype.hasPrevCert = function() {\n  return jspb.Message.getField(this, 6) != null;\n};\n\n\n/**\n * repeated TransactionInfo txs = 7;\n * @return {!Array<!proto.pactus.TransactionInfo>}\n */\nproto.pactus.GetBlockResponse.prototype.getTxsList = function() {\n  return /** @type{!Array<!proto.pactus.TransactionInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 7));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.TransactionInfo>} value\n * @return {!proto.pactus.GetBlockResponse} returns this\n*/\nproto.pactus.GetBlockResponse.prototype.setTxsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 7, value);\n};\n\n\n/**\n * @param {!proto.pactus.TransactionInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.TransactionInfo}\n */\nproto.pactus.GetBlockResponse.prototype.addTxs = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pactus.TransactionInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetBlockResponse} returns this\n */\nproto.pactus.GetBlockResponse.prototype.clearTxsList = function() {\n  return this.setTxsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockHashRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockHashRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockHashRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHashRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nheight: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockHashRequest}\n */\nproto.pactus.GetBlockHashRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockHashRequest;\n  return proto.pactus.GetBlockHashRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockHashRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockHashRequest}\n */\nproto.pactus.GetBlockHashRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockHashRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockHashRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockHashRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHashRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 height = 1;\n * @return {number}\n */\nproto.pactus.GetBlockHashRequest.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockHashRequest} returns this\n */\nproto.pactus.GetBlockHashRequest.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockHashResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockHashResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockHashResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHashResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nhash: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockHashResponse}\n */\nproto.pactus.GetBlockHashResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockHashResponse;\n  return proto.pactus.GetBlockHashResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockHashResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockHashResponse}\n */\nproto.pactus.GetBlockHashResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockHashResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockHashResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockHashResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHashResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string hash = 1;\n * @return {string}\n */\nproto.pactus.GetBlockHashResponse.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetBlockHashResponse} returns this\n */\nproto.pactus.GetBlockHashResponse.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockHeightRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockHeightRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockHeightRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHeightRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nhash: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockHeightRequest}\n */\nproto.pactus.GetBlockHeightRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockHeightRequest;\n  return proto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockHeightRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockHeightRequest}\n */\nproto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockHeightRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockHeightRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockHeightRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHeightRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string hash = 1;\n * @return {string}\n */\nproto.pactus.GetBlockHeightRequest.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetBlockHeightRequest} returns this\n */\nproto.pactus.GetBlockHeightRequest.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockHeightResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockHeightResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockHeightResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHeightResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nheight: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockHeightResponse}\n */\nproto.pactus.GetBlockHeightResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockHeightResponse;\n  return proto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockHeightResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockHeightResponse}\n */\nproto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockHeightResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockHeightResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockHeightResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockHeightResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 height = 1;\n * @return {number}\n */\nproto.pactus.GetBlockHeightResponse.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockHeightResponse} returns this\n */\nproto.pactus.GetBlockHeightResponse.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockchainInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockchainInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockchainInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockchainInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockchainInfoRequest}\n */\nproto.pactus.GetBlockchainInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockchainInfoRequest;\n  return proto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockchainInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockchainInfoRequest}\n */\nproto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockchainInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockchainInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetBlockchainInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetBlockchainInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockchainInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlastBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\nlastBlockHash: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nlastBlockTime: jspb.Message.getFieldWithDefault(msg, 10, 0),\ntotalAccounts: jspb.Message.getFieldWithDefault(msg, 3, 0),\ntotalValidators: jspb.Message.getFieldWithDefault(msg, 4, 0),\nactiveValidators: jspb.Message.getFieldWithDefault(msg, 12, 0),\ntotalPower: jspb.Message.getFieldWithDefault(msg, 5, 0),\ncommitteePower: jspb.Message.getFieldWithDefault(msg, 6, 0),\nisPruned: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),\npruningHeight: jspb.Message.getFieldWithDefault(msg, 9, 0),\ninCommittee: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),\ncommitteeSize: jspb.Message.getFieldWithDefault(msg, 14, 0),\naverageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 15, 0.0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetBlockchainInfoResponse}\n */\nproto.pactus.GetBlockchainInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetBlockchainInfoResponse;\n  return proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetBlockchainInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetBlockchainInfoResponse}\n */\nproto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLastBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLastBlockHash(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setLastBlockTime(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setTotalAccounts(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setTotalValidators(value);\n      break;\n    case 12:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setActiveValidators(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setTotalPower(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setCommitteePower(value);\n      break;\n    case 8:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsPruned(value);\n      break;\n    case 9:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setPruningHeight(value);\n      break;\n    case 13:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setInCommittee(value);\n      break;\n    case 14:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCommitteeSize(value);\n      break;\n    case 15:\n      var value = /** @type {number} */ (reader.readDouble());\n      msg.setAverageScore(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetBlockchainInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLastBlockHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getLastBlockHash();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getLastBlockTime();\n  if (f !== 0) {\n    writer.writeInt64(\n      10,\n      f\n    );\n  }\n  f = message.getTotalAccounts();\n  if (f !== 0) {\n    writer.writeInt32(\n      3,\n      f\n    );\n  }\n  f = message.getTotalValidators();\n  if (f !== 0) {\n    writer.writeInt32(\n      4,\n      f\n    );\n  }\n  f = message.getActiveValidators();\n  if (f !== 0) {\n    writer.writeInt32(\n      12,\n      f\n    );\n  }\n  f = message.getTotalPower();\n  if (f !== 0) {\n    writer.writeInt64(\n      5,\n      f\n    );\n  }\n  f = message.getCommitteePower();\n  if (f !== 0) {\n    writer.writeInt64(\n      6,\n      f\n    );\n  }\n  f = message.getIsPruned();\n  if (f) {\n    writer.writeBool(\n      8,\n      f\n    );\n  }\n  f = message.getPruningHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      9,\n      f\n    );\n  }\n  f = message.getInCommittee();\n  if (f) {\n    writer.writeBool(\n      13,\n      f\n    );\n  }\n  f = message.getCommitteeSize();\n  if (f !== 0) {\n    writer.writeInt32(\n      14,\n      f\n    );\n  }\n  f = message.getAverageScore();\n  if (f !== 0.0) {\n    writer.writeDouble(\n      15,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 last_block_height = 1;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string last_block_hash = 2;\n * @return {string}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int64 last_block_time = 10;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 10, value);\n};\n\n\n/**\n * optional int32 total_accounts = 3;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getTotalAccounts = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setTotalAccounts = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional int32 total_validators = 4;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getTotalValidators = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setTotalValidators = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int32 active_validators = 12;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getActiveValidators = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setActiveValidators = function(value) {\n  return jspb.Message.setProto3IntField(this, 12, value);\n};\n\n\n/**\n * optional int64 total_power = 5;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getTotalPower = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setTotalPower = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional int64 committee_power = 6;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getCommitteePower = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setCommitteePower = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional bool is_pruned = 8;\n * @return {boolean}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getIsPruned = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setIsPruned = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 8, value);\n};\n\n\n/**\n * optional uint32 pruning_height = 9;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getPruningHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setPruningHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 9, value);\n};\n\n\n/**\n * optional bool in_committee = 13;\n * @return {boolean}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getInCommittee = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setInCommittee = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 13, value);\n};\n\n\n/**\n * optional int32 committee_size = 14;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getCommitteeSize = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setCommitteeSize = function(value) {\n  return jspb.Message.setProto3IntField(this, 14, value);\n};\n\n\n/**\n * optional double average_score = 15;\n * @return {number}\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.getAverageScore = function() {\n  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 15, 0.0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetBlockchainInfoResponse} returns this\n */\nproto.pactus.GetBlockchainInfoResponse.prototype.setAverageScore = function(value) {\n  return jspb.Message.setProto3FloatField(this, 15, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetCommitteeInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetCommitteeInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetCommitteeInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetCommitteeInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetCommitteeInfoRequest}\n */\nproto.pactus.GetCommitteeInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetCommitteeInfoRequest;\n  return proto.pactus.GetCommitteeInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetCommitteeInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetCommitteeInfoRequest}\n */\nproto.pactus.GetCommitteeInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetCommitteeInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetCommitteeInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetCommitteeInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetCommitteeInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetCommitteeInfoResponse.repeatedFields_ = [4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetCommitteeInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetCommitteeInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetCommitteeInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\ncommitteeSize: jspb.Message.getFieldWithDefault(msg, 1, 0),\ncommitteePower: jspb.Message.getFieldWithDefault(msg, 2, 0),\ntotalPower: jspb.Message.getFieldWithDefault(msg, 3, 0),\nvalidatorsList: jspb.Message.toObjectList(msg.getValidatorsList(),\n    proto.pactus.ValidatorInfo.toObject, includeInstance),\nprotocolVersionsMap: (f = msg.getProtocolVersionsMap()) ? f.toObject(includeInstance, undefined) : []\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetCommitteeInfoResponse}\n */\nproto.pactus.GetCommitteeInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetCommitteeInfoResponse;\n  return proto.pactus.GetCommitteeInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetCommitteeInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetCommitteeInfoResponse}\n */\nproto.pactus.GetCommitteeInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCommitteeSize(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setCommitteePower(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setTotalPower(value);\n      break;\n    case 4:\n      var value = new proto.pactus.ValidatorInfo;\n      reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader);\n      msg.addValidators(value);\n      break;\n    case 5:\n      var value = msg.getProtocolVersionsMap();\n      reader.readMessage(value, function(message, reader) {\n        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readDouble, null, 0, 0.0);\n         });\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetCommitteeInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetCommitteeInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetCommitteeInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getCommitteeSize();\n  if (f !== 0) {\n    writer.writeInt32(\n      1,\n      f\n    );\n  }\n  f = message.getCommitteePower();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n  f = message.getTotalPower();\n  if (f !== 0) {\n    writer.writeInt64(\n      3,\n      f\n    );\n  }\n  f = message.getValidatorsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      4,\n      f,\n      proto.pactus.ValidatorInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getProtocolVersionsMap(true);\n  if (f && f.getLength() > 0) {\njspb.internal.public_for_gencode.serializeMapToBinary(\n    message.getProtocolVersionsMap(true),\n    5,\n    writer,\n    jspb.BinaryWriter.prototype.writeInt32,\n    jspb.BinaryWriter.prototype.writeDouble);\n  }\n};\n\n\n/**\n * optional int32 committee_size = 1;\n * @return {number}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.getCommitteeSize = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.setCommitteeSize = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional int64 committee_power = 2;\n * @return {number}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.getCommitteePower = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.setCommitteePower = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional int64 total_power = 3;\n * @return {number}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.getTotalPower = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.setTotalPower = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * repeated ValidatorInfo validators = 4;\n * @return {!Array<!proto.pactus.ValidatorInfo>}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.getValidatorsList = function() {\n  return /** @type{!Array<!proto.pactus.ValidatorInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.ValidatorInfo, 4));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.ValidatorInfo>} value\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n*/\nproto.pactus.GetCommitteeInfoResponse.prototype.setValidatorsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 4, value);\n};\n\n\n/**\n * @param {!proto.pactus.ValidatorInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.ValidatorInfo}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.addValidators = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.pactus.ValidatorInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.clearValidatorsList = function() {\n  return this.setValidatorsList([]);\n};\n\n\n/**\n * map<int32, double> protocol_versions = 5;\n * @param {boolean=} opt_noLazyCreate Do not create the map if\n * empty, instead returning `undefined`\n * @return {!jspb.Map<number,number>}\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.getProtocolVersionsMap = function(opt_noLazyCreate) {\n  return /** @type {!jspb.Map<number,number>} */ (\n      jspb.Message.getMapField(this, 5, opt_noLazyCreate,\n      null));\n};\n\n\n/**\n * Clears values from the map. The map will be non-null.\n * @return {!proto.pactus.GetCommitteeInfoResponse} returns this\n */\nproto.pactus.GetCommitteeInfoResponse.prototype.clearProtocolVersionsMap = function() {\n  this.getProtocolVersionsMap().clear();\n  return this;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetConsensusInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetConsensusInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetConsensusInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetConsensusInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetConsensusInfoRequest}\n */\nproto.pactus.GetConsensusInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetConsensusInfoRequest;\n  return proto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetConsensusInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetConsensusInfoRequest}\n */\nproto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetConsensusInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetConsensusInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetConsensusInfoResponse.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetConsensusInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetConsensusInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetConsensusInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nproposal: (f = msg.getProposal()) && proto.pactus.ProposalInfo.toObject(includeInstance, f),\ninstancesList: jspb.Message.toObjectList(msg.getInstancesList(),\n    proto.pactus.ConsensusInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetConsensusInfoResponse}\n */\nproto.pactus.GetConsensusInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetConsensusInfoResponse;\n  return proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetConsensusInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetConsensusInfoResponse}\n */\nproto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.ProposalInfo;\n      reader.readMessage(value,proto.pactus.ProposalInfo.deserializeBinaryFromReader);\n      msg.setProposal(value);\n      break;\n    case 2:\n      var value = new proto.pactus.ConsensusInfo;\n      reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader);\n      msg.addInstances(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetConsensusInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getProposal();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.pactus.ProposalInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getInstancesList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      proto.pactus.ConsensusInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional ProposalInfo proposal = 1;\n * @return {?proto.pactus.ProposalInfo}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() {\n  return /** @type{?proto.pactus.ProposalInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.ProposalInfo, 1));\n};\n\n\n/**\n * @param {?proto.pactus.ProposalInfo|undefined} value\n * @return {!proto.pactus.GetConsensusInfoResponse} returns this\n*/\nproto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetConsensusInfoResponse} returns this\n */\nproto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() {\n  return this.setProposal(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * repeated ConsensusInfo instances = 2;\n * @return {!Array<!proto.pactus.ConsensusInfo>}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.getInstancesList = function() {\n  return /** @type{!Array<!proto.pactus.ConsensusInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.ConsensusInfo, 2));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.ConsensusInfo>} value\n * @return {!proto.pactus.GetConsensusInfoResponse} returns this\n*/\nproto.pactus.GetConsensusInfoResponse.prototype.setInstancesList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.pactus.ConsensusInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.ConsensusInfo}\n */\nproto.pactus.GetConsensusInfoResponse.prototype.addInstances = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.ConsensusInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetConsensusInfoResponse} returns this\n */\nproto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() {\n  return this.setInstancesList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTxPoolContentRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTxPoolContentRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTxPoolContentRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTxPoolContentRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\npayloadType: jspb.Message.getFieldWithDefault(msg, 1, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTxPoolContentRequest}\n */\nproto.pactus.GetTxPoolContentRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTxPoolContentRequest;\n  return proto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTxPoolContentRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTxPoolContentRequest}\n */\nproto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum());\n      msg.setPayloadType(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTxPoolContentRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTxPoolContentRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPayloadType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional PayloadType payload_type = 1;\n * @return {!proto.pactus.PayloadType}\n */\nproto.pactus.GetTxPoolContentRequest.prototype.getPayloadType = function() {\n  return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.pactus.PayloadType} value\n * @return {!proto.pactus.GetTxPoolContentRequest} returns this\n */\nproto.pactus.GetTxPoolContentRequest.prototype.setPayloadType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetTxPoolContentResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTxPoolContentResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTxPoolContentResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTxPoolContentResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTxPoolContentResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntxsList: jspb.Message.toObjectList(msg.getTxsList(),\n    transaction_pb.TransactionInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTxPoolContentResponse}\n */\nproto.pactus.GetTxPoolContentResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTxPoolContentResponse;\n  return proto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTxPoolContentResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTxPoolContentResponse}\n */\nproto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new transaction_pb.TransactionInfo;\n      reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader);\n      msg.addTxs(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTxPoolContentResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTxPoolContentResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTxsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      transaction_pb.TransactionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * repeated TransactionInfo txs = 1;\n * @return {!Array<!proto.pactus.TransactionInfo>}\n */\nproto.pactus.GetTxPoolContentResponse.prototype.getTxsList = function() {\n  return /** @type{!Array<!proto.pactus.TransactionInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 1));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.TransactionInfo>} value\n * @return {!proto.pactus.GetTxPoolContentResponse} returns this\n*/\nproto.pactus.GetTxPoolContentResponse.prototype.setTxsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.pactus.TransactionInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.TransactionInfo}\n */\nproto.pactus.GetTxPoolContentResponse.prototype.addTxs = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.TransactionInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetTxPoolContentResponse} returns this\n */\nproto.pactus.GetTxPoolContentResponse.prototype.clearTxsList = function() {\n  return this.setTxsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ValidatorInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ValidatorInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ValidatorInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ValidatorInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nhash: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ndata: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\npublicKey: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nnumber: jspb.Message.getFieldWithDefault(msg, 4, 0),\nstake: jspb.Message.getFieldWithDefault(msg, 5, 0),\nlastBondingHeight: jspb.Message.getFieldWithDefault(msg, 6, 0),\nlastSortitionHeight: jspb.Message.getFieldWithDefault(msg, 7, 0),\nunbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0),\naddress: jspb.Message.getFieldWithDefault(msg, 9, \"\"),\navailabilityScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0),\nprotocolVersion: jspb.Message.getFieldWithDefault(msg, 11, 0),\nisDelegated: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),\ndelegateOwner: jspb.Message.getFieldWithDefault(msg, 13, \"\"),\ndelegateShare: jspb.Message.getFieldWithDefault(msg, 14, 0),\ndelegateExpiry: jspb.Message.getFieldWithDefault(msg, 15, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ValidatorInfo}\n */\nproto.pactus.ValidatorInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ValidatorInfo;\n  return proto.pactus.ValidatorInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ValidatorInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ValidatorInfo}\n */\nproto.pactus.ValidatorInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setData(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setNumber(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setStake(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLastBondingHeight(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLastSortitionHeight(value);\n      break;\n    case 8:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setUnbondingHeight(value);\n      break;\n    case 9:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readDouble());\n      msg.setAvailabilityScore(value);\n      break;\n    case 11:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setProtocolVersion(value);\n      break;\n    case 12:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsDelegated(value);\n      break;\n    case 13:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDelegateOwner(value);\n      break;\n    case 14:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setDelegateShare(value);\n      break;\n    case 15:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setDelegateExpiry(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ValidatorInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ValidatorInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ValidatorInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ValidatorInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getData();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getNumber();\n  if (f !== 0) {\n    writer.writeInt32(\n      4,\n      f\n    );\n  }\n  f = message.getStake();\n  if (f !== 0) {\n    writer.writeInt64(\n      5,\n      f\n    );\n  }\n  f = message.getLastBondingHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      6,\n      f\n    );\n  }\n  f = message.getLastSortitionHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      7,\n      f\n    );\n  }\n  f = message.getUnbondingHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      8,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      9,\n      f\n    );\n  }\n  f = message.getAvailabilityScore();\n  if (f !== 0.0) {\n    writer.writeDouble(\n      10,\n      f\n    );\n  }\n  f = message.getProtocolVersion();\n  if (f !== 0) {\n    writer.writeInt32(\n      11,\n      f\n    );\n  }\n  f = message.getIsDelegated();\n  if (f) {\n    writer.writeBool(\n      12,\n      f\n    );\n  }\n  f = message.getDelegateOwner();\n  if (f.length > 0) {\n    writer.writeString(\n      13,\n      f\n    );\n  }\n  f = message.getDelegateShare();\n  if (f !== 0) {\n    writer.writeInt64(\n      14,\n      f\n    );\n  }\n  f = message.getDelegateExpiry();\n  if (f !== 0) {\n    writer.writeUint32(\n      15,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string hash = 1;\n * @return {string}\n */\nproto.pactus.ValidatorInfo.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string data = 2;\n * @return {string}\n */\nproto.pactus.ValidatorInfo.prototype.getData = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setData = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string public_key = 3;\n * @return {string}\n */\nproto.pactus.ValidatorInfo.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional int32 number = 4;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getNumber = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setNumber = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int64 stake = 5;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getStake = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setStake = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional uint32 last_bonding_height = 6;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getLastBondingHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setLastBondingHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional uint32 last_sortition_height = 7;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getLastSortitionHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setLastSortitionHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional uint32 unbonding_height = 8;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getUnbondingHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setUnbondingHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 8, value);\n};\n\n\n/**\n * optional string address = 9;\n * @return {string}\n */\nproto.pactus.ValidatorInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 9, value);\n};\n\n\n/**\n * optional double availability_score = 10;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getAvailabilityScore = function() {\n  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setAvailabilityScore = function(value) {\n  return jspb.Message.setProto3FloatField(this, 10, value);\n};\n\n\n/**\n * optional int32 protocol_version = 11;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getProtocolVersion = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setProtocolVersion = function(value) {\n  return jspb.Message.setProto3IntField(this, 11, value);\n};\n\n\n/**\n * optional bool is_delegated = 12;\n * @return {boolean}\n */\nproto.pactus.ValidatorInfo.prototype.getIsDelegated = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setIsDelegated = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 12, value);\n};\n\n\n/**\n * optional string delegate_owner = 13;\n * @return {string}\n */\nproto.pactus.ValidatorInfo.prototype.getDelegateOwner = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setDelegateOwner = function(value) {\n  return jspb.Message.setProto3StringField(this, 13, value);\n};\n\n\n/**\n * optional int64 delegate_share = 14;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getDelegateShare = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setDelegateShare = function(value) {\n  return jspb.Message.setProto3IntField(this, 14, value);\n};\n\n\n/**\n * optional uint32 delegate_expiry = 15;\n * @return {number}\n */\nproto.pactus.ValidatorInfo.prototype.getDelegateExpiry = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ValidatorInfo} returns this\n */\nproto.pactus.ValidatorInfo.prototype.setDelegateExpiry = function(value) {\n  return jspb.Message.setProto3IntField(this, 15, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.AccountInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.AccountInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.AccountInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.AccountInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nhash: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ndata: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nnumber: jspb.Message.getFieldWithDefault(msg, 3, 0),\nbalance: jspb.Message.getFieldWithDefault(msg, 4, 0),\naddress: jspb.Message.getFieldWithDefault(msg, 5, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.AccountInfo}\n */\nproto.pactus.AccountInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.AccountInfo;\n  return proto.pactus.AccountInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.AccountInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.AccountInfo}\n */\nproto.pactus.AccountInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setData(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setNumber(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setBalance(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.AccountInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.AccountInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.AccountInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.AccountInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getData();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getNumber();\n  if (f !== 0) {\n    writer.writeInt32(\n      3,\n      f\n    );\n  }\n  f = message.getBalance();\n  if (f !== 0) {\n    writer.writeInt64(\n      4,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string hash = 1;\n * @return {string}\n */\nproto.pactus.AccountInfo.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AccountInfo} returns this\n */\nproto.pactus.AccountInfo.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string data = 2;\n * @return {string}\n */\nproto.pactus.AccountInfo.prototype.getData = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AccountInfo} returns this\n */\nproto.pactus.AccountInfo.prototype.setData = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int32 number = 3;\n * @return {number}\n */\nproto.pactus.AccountInfo.prototype.getNumber = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.AccountInfo} returns this\n */\nproto.pactus.AccountInfo.prototype.setNumber = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional int64 balance = 4;\n * @return {number}\n */\nproto.pactus.AccountInfo.prototype.getBalance = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.AccountInfo} returns this\n */\nproto.pactus.AccountInfo.prototype.setBalance = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional string address = 5;\n * @return {string}\n */\nproto.pactus.AccountInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AccountInfo} returns this\n */\nproto.pactus.AccountInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.BlockHeaderInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.BlockHeaderInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.BlockHeaderInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BlockHeaderInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nversion: jspb.Message.getFieldWithDefault(msg, 1, 0),\nprevBlockHash: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nstateRoot: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nsortitionSeed: jspb.Message.getFieldWithDefault(msg, 4, \"\"),\nproposerAddress: jspb.Message.getFieldWithDefault(msg, 5, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.BlockHeaderInfo}\n */\nproto.pactus.BlockHeaderInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.BlockHeaderInfo;\n  return proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.BlockHeaderInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.BlockHeaderInfo}\n */\nproto.pactus.BlockHeaderInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setVersion(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPrevBlockHash(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setStateRoot(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSortitionSeed(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setProposerAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.BlockHeaderInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.BlockHeaderInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.BlockHeaderInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BlockHeaderInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getVersion();\n  if (f !== 0) {\n    writer.writeInt32(\n      1,\n      f\n    );\n  }\n  f = message.getPrevBlockHash();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getStateRoot();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getSortitionSeed();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n  f = message.getProposerAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int32 version = 1;\n * @return {number}\n */\nproto.pactus.BlockHeaderInfo.prototype.getVersion = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.BlockHeaderInfo} returns this\n */\nproto.pactus.BlockHeaderInfo.prototype.setVersion = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string prev_block_hash = 2;\n * @return {string}\n */\nproto.pactus.BlockHeaderInfo.prototype.getPrevBlockHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BlockHeaderInfo} returns this\n */\nproto.pactus.BlockHeaderInfo.prototype.setPrevBlockHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string state_root = 3;\n * @return {string}\n */\nproto.pactus.BlockHeaderInfo.prototype.getStateRoot = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BlockHeaderInfo} returns this\n */\nproto.pactus.BlockHeaderInfo.prototype.setStateRoot = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string sortition_seed = 4;\n * @return {string}\n */\nproto.pactus.BlockHeaderInfo.prototype.getSortitionSeed = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BlockHeaderInfo} returns this\n */\nproto.pactus.BlockHeaderInfo.prototype.setSortitionSeed = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n/**\n * optional string proposer_address = 5;\n * @return {string}\n */\nproto.pactus.BlockHeaderInfo.prototype.getProposerAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BlockHeaderInfo} returns this\n */\nproto.pactus.BlockHeaderInfo.prototype.setProposerAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.CertificateInfo.repeatedFields_ = [3,4];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CertificateInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CertificateInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CertificateInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CertificateInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nhash: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nround: jspb.Message.getFieldWithDefault(msg, 2, 0),\ncommittersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,\nabsenteesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,\nsignature: jspb.Message.getFieldWithDefault(msg, 5, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CertificateInfo}\n */\nproto.pactus.CertificateInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CertificateInfo;\n  return proto.pactus.CertificateInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CertificateInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CertificateInfo}\n */\nproto.pactus.CertificateInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setHash(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setRound(value);\n      break;\n    case 3:\n      reader.readPackableInt32Into(msg.getCommittersList());\n      break;\n    case 4:\n      reader.readPackableInt32Into(msg.getAbsenteesList());\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CertificateInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CertificateInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CertificateInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CertificateInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHash();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getRound();\n  if (f !== 0) {\n    writer.writeInt32(\n      2,\n      f\n    );\n  }\n  f = message.getCommittersList();\n  if (f.length > 0) {\n    writer.writePackedInt32(\n      3,\n      f\n    );\n  }\n  f = message.getAbsenteesList();\n  if (f.length > 0) {\n    writer.writePackedInt32(\n      4,\n      f\n    );\n  }\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string hash = 1;\n * @return {string}\n */\nproto.pactus.CertificateInfo.prototype.getHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.setHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int32 round = 2;\n * @return {number}\n */\nproto.pactus.CertificateInfo.prototype.getRound = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.setRound = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * repeated int32 committers = 3;\n * @return {!Array<number>}\n */\nproto.pactus.CertificateInfo.prototype.getCommittersList = function() {\n  return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 3));\n};\n\n\n/**\n * @param {!Array<number>} value\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.setCommittersList = function(value) {\n  return jspb.Message.setField(this, 3, value || []);\n};\n\n\n/**\n * @param {number} value\n * @param {number=} opt_index\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.addCommitters = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 3, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.clearCommittersList = function() {\n  return this.setCommittersList([]);\n};\n\n\n/**\n * repeated int32 absentees = 4;\n * @return {!Array<number>}\n */\nproto.pactus.CertificateInfo.prototype.getAbsenteesList = function() {\n  return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 4));\n};\n\n\n/**\n * @param {!Array<number>} value\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.setAbsenteesList = function(value) {\n  return jspb.Message.setField(this, 4, value || []);\n};\n\n\n/**\n * @param {number} value\n * @param {number=} opt_index\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.addAbsentees = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 4, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.clearAbsenteesList = function() {\n  return this.setAbsenteesList([]);\n};\n\n\n/**\n * optional string signature = 5;\n * @return {string}\n */\nproto.pactus.CertificateInfo.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CertificateInfo} returns this\n */\nproto.pactus.CertificateInfo.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.VoteInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.VoteInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.VoteInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VoteInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntype: jspb.Message.getFieldWithDefault(msg, 1, 0),\nvoter: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nblockHash: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nround: jspb.Message.getFieldWithDefault(msg, 4, 0),\ncpRound: jspb.Message.getFieldWithDefault(msg, 5, 0),\ncpValue: jspb.Message.getFieldWithDefault(msg, 6, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.VoteInfo}\n */\nproto.pactus.VoteInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.VoteInfo;\n  return proto.pactus.VoteInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.VoteInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.VoteInfo}\n */\nproto.pactus.VoteInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {!proto.pactus.VoteType} */ (reader.readEnum());\n      msg.setType(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setVoter(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setBlockHash(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setRound(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCpRound(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCpValue(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.VoteInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.VoteInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.VoteInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VoteInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      1,\n      f\n    );\n  }\n  f = message.getVoter();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getBlockHash();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getRound();\n  if (f !== 0) {\n    writer.writeInt32(\n      4,\n      f\n    );\n  }\n  f = message.getCpRound();\n  if (f !== 0) {\n    writer.writeInt32(\n      5,\n      f\n    );\n  }\n  f = message.getCpValue();\n  if (f !== 0) {\n    writer.writeInt32(\n      6,\n      f\n    );\n  }\n};\n\n\n/**\n * optional VoteType type = 1;\n * @return {!proto.pactus.VoteType}\n */\nproto.pactus.VoteInfo.prototype.getType = function() {\n  return /** @type {!proto.pactus.VoteType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {!proto.pactus.VoteType} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 1, value);\n};\n\n\n/**\n * optional string voter = 2;\n * @return {string}\n */\nproto.pactus.VoteInfo.prototype.getVoter = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setVoter = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string block_hash = 3;\n * @return {string}\n */\nproto.pactus.VoteInfo.prototype.getBlockHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setBlockHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional int32 round = 4;\n * @return {number}\n */\nproto.pactus.VoteInfo.prototype.getRound = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setRound = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int32 cp_round = 5;\n * @return {number}\n */\nproto.pactus.VoteInfo.prototype.getCpRound = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setCpRound = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional int32 cp_value = 6;\n * @return {number}\n */\nproto.pactus.VoteInfo.prototype.getCpValue = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.VoteInfo} returns this\n */\nproto.pactus.VoteInfo.prototype.setCpValue = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ConsensusInfo.repeatedFields_ = [5];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ConsensusInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ConsensusInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ConsensusInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ConsensusInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nactive: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),\nheight: jspb.Message.getFieldWithDefault(msg, 3, 0),\nround: jspb.Message.getFieldWithDefault(msg, 4, 0),\nvotesList: jspb.Message.toObjectList(msg.getVotesList(),\n    proto.pactus.VoteInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ConsensusInfo}\n */\nproto.pactus.ConsensusInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ConsensusInfo;\n  return proto.pactus.ConsensusInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ConsensusInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ConsensusInfo}\n */\nproto.pactus.ConsensusInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setActive(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setRound(value);\n      break;\n    case 5:\n      var value = new proto.pactus.VoteInfo;\n      reader.readMessage(value,proto.pactus.VoteInfo.deserializeBinaryFromReader);\n      msg.addVotes(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ConsensusInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ConsensusInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ConsensusInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ConsensusInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getActive();\n  if (f) {\n    writer.writeBool(\n      2,\n      f\n    );\n  }\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      3,\n      f\n    );\n  }\n  f = message.getRound();\n  if (f !== 0) {\n    writer.writeInt32(\n      4,\n      f\n    );\n  }\n  f = message.getVotesList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      5,\n      f,\n      proto.pactus.VoteInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.ConsensusInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ConsensusInfo} returns this\n */\nproto.pactus.ConsensusInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional bool active = 2;\n * @return {boolean}\n */\nproto.pactus.ConsensusInfo.prototype.getActive = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.ConsensusInfo} returns this\n */\nproto.pactus.ConsensusInfo.prototype.setActive = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 2, value);\n};\n\n\n/**\n * optional uint32 height = 3;\n * @return {number}\n */\nproto.pactus.ConsensusInfo.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ConsensusInfo} returns this\n */\nproto.pactus.ConsensusInfo.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional int32 round = 4;\n * @return {number}\n */\nproto.pactus.ConsensusInfo.prototype.getRound = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ConsensusInfo} returns this\n */\nproto.pactus.ConsensusInfo.prototype.setRound = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * repeated VoteInfo votes = 5;\n * @return {!Array<!proto.pactus.VoteInfo>}\n */\nproto.pactus.ConsensusInfo.prototype.getVotesList = function() {\n  return /** @type{!Array<!proto.pactus.VoteInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.VoteInfo, 5));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.VoteInfo>} value\n * @return {!proto.pactus.ConsensusInfo} returns this\n*/\nproto.pactus.ConsensusInfo.prototype.setVotesList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 5, value);\n};\n\n\n/**\n * @param {!proto.pactus.VoteInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.VoteInfo}\n */\nproto.pactus.ConsensusInfo.prototype.addVotes = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pactus.VoteInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ConsensusInfo} returns this\n */\nproto.pactus.ConsensusInfo.prototype.clearVotesList = function() {\n  return this.setVotesList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ProposalInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ProposalInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ProposalInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ProposalInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nheight: jspb.Message.getFieldWithDefault(msg, 1, 0),\nround: jspb.Message.getFieldWithDefault(msg, 2, 0),\nblockData: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nsignature: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ProposalInfo}\n */\nproto.pactus.ProposalInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ProposalInfo;\n  return proto.pactus.ProposalInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ProposalInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ProposalInfo}\n */\nproto.pactus.ProposalInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setRound(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setBlockData(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ProposalInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ProposalInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ProposalInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ProposalInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getRound();\n  if (f !== 0) {\n    writer.writeInt32(\n      2,\n      f\n    );\n  }\n  f = message.getBlockData();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 height = 1;\n * @return {number}\n */\nproto.pactus.ProposalInfo.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ProposalInfo} returns this\n */\nproto.pactus.ProposalInfo.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional int32 round = 2;\n * @return {number}\n */\nproto.pactus.ProposalInfo.prototype.getRound = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ProposalInfo} returns this\n */\nproto.pactus.ProposalInfo.prototype.setRound = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional string block_data = 3;\n * @return {string}\n */\nproto.pactus.ProposalInfo.prototype.getBlockData = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ProposalInfo} returns this\n */\nproto.pactus.ProposalInfo.prototype.setBlockData = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string signature = 4;\n * @return {string}\n */\nproto.pactus.ProposalInfo.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ProposalInfo} returns this\n */\nproto.pactus.ProposalInfo.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n/**\n * @enum {number}\n */\nproto.pactus.BlockVerbosity = {\n  BLOCK_VERBOSITY_DATA: 0,\n  BLOCK_VERBOSITY_INFO: 1,\n  BLOCK_VERBOSITY_TRANSACTIONS: 2\n};\n\n/**\n * @enum {number}\n */\nproto.pactus.VoteType = {\n  VOTE_TYPE_UNSPECIFIED: 0,\n  VOTE_TYPE_PREPARE: 1,\n  VOTE_TYPE_PRECOMMIT: 2,\n  VOTE_TYPE_CP_PRE_VOTE: 3,\n  VOTE_TYPE_CP_MAIN_VOTE: 4,\n  VOTE_TYPE_CP_DECIDED: 5\n};\n\ngoog.object.extend(exports, proto.pactus);\n"
  },
  {
    "path": "www/grpc/gen/js/network_grpc_pb.js",
    "content": "// GENERATED CODE -- DO NOT EDIT!\n\n'use strict';\nvar grpc = require('@grpc/grpc-js');\nvar network_pb = require('./network_pb.js');\n\nfunction serialize_pactus_GetNetworkInfoRequest(arg) {\n  if (!(arg instanceof network_pb.GetNetworkInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetNetworkInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNetworkInfoRequest(buffer_arg) {\n  return network_pb.GetNetworkInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetNetworkInfoResponse(arg) {\n  if (!(arg instanceof network_pb.GetNetworkInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetNetworkInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNetworkInfoResponse(buffer_arg) {\n  return network_pb.GetNetworkInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetNodeInfoRequest(arg) {\n  if (!(arg instanceof network_pb.GetNodeInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetNodeInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNodeInfoRequest(buffer_arg) {\n  return network_pb.GetNodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetNodeInfoResponse(arg) {\n  if (!(arg instanceof network_pb.GetNodeInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetNodeInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNodeInfoResponse(buffer_arg) {\n  return network_pb.GetNodeInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListPeersRequest(arg) {\n  if (!(arg instanceof network_pb.ListPeersRequest)) {\n    throw new Error('Expected argument of type pactus.ListPeersRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListPeersRequest(buffer_arg) {\n  return network_pb.ListPeersRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListPeersResponse(arg) {\n  if (!(arg instanceof network_pb.ListPeersResponse)) {\n    throw new Error('Expected argument of type pactus.ListPeersResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListPeersResponse(buffer_arg) {\n  return network_pb.ListPeersResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_PingRequest(arg) {\n  if (!(arg instanceof network_pb.PingRequest)) {\n    throw new Error('Expected argument of type pactus.PingRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_PingRequest(buffer_arg) {\n  return network_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_PingResponse(arg) {\n  if (!(arg instanceof network_pb.PingResponse)) {\n    throw new Error('Expected argument of type pactus.PingResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_PingResponse(buffer_arg) {\n  return network_pb.PingResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\n\n// Network service provides RPCs for retrieving information about the network.\nvar NetworkService = exports.NetworkService = {\n  // GetNetworkInfo retrieves information about the overall network.\ngetNetworkInfo: {\n    path: '/pactus.Network/GetNetworkInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: network_pb.GetNetworkInfoRequest,\n    responseType: network_pb.GetNetworkInfoResponse,\n    requestSerialize: serialize_pactus_GetNetworkInfoRequest,\n    requestDeserialize: deserialize_pactus_GetNetworkInfoRequest,\n    responseSerialize: serialize_pactus_GetNetworkInfoResponse,\n    responseDeserialize: deserialize_pactus_GetNetworkInfoResponse,\n  },\n  // ListPeers lists all peers in the network.\nlistPeers: {\n    path: '/pactus.Network/ListPeers',\n    requestStream: false,\n    responseStream: false,\n    requestType: network_pb.ListPeersRequest,\n    responseType: network_pb.ListPeersResponse,\n    requestSerialize: serialize_pactus_ListPeersRequest,\n    requestDeserialize: deserialize_pactus_ListPeersRequest,\n    responseSerialize: serialize_pactus_ListPeersResponse,\n    responseDeserialize: deserialize_pactus_ListPeersResponse,\n  },\n  // GetNodeInfo retrieves information about a specific node in the network.\ngetNodeInfo: {\n    path: '/pactus.Network/GetNodeInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: network_pb.GetNodeInfoRequest,\n    responseType: network_pb.GetNodeInfoResponse,\n    requestSerialize: serialize_pactus_GetNodeInfoRequest,\n    requestDeserialize: deserialize_pactus_GetNodeInfoRequest,\n    responseSerialize: serialize_pactus_GetNodeInfoResponse,\n    responseDeserialize: deserialize_pactus_GetNodeInfoResponse,\n  },\n  // Ping provides a simple connectivity test and latency measurement.\nping: {\n    path: '/pactus.Network/Ping',\n    requestStream: false,\n    responseStream: false,\n    requestType: network_pb.PingRequest,\n    responseType: network_pb.PingResponse,\n    requestSerialize: serialize_pactus_PingRequest,\n    requestDeserialize: deserialize_pactus_PingRequest,\n    responseSerialize: serialize_pactus_PingResponse,\n    responseDeserialize: deserialize_pactus_PingResponse,\n  },\n};\n\nexports.NetworkClient = grpc.makeGenericClientConstructor(NetworkService, 'Network');\n"
  },
  {
    "path": "www/grpc/gen/js/network_grpc_web_pb.js",
    "content": "/**\n * @fileoverview gRPC-Web generated client stub for pactus\n * @enhanceable\n * @public\n */\n\n// Code generated by protoc-gen-grpc-web. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-grpc-web v2.0.2\n// \tprotoc              v0.0.0\n// source: network.proto\n\n\n/* eslint-disable */\n// @ts-nocheck\n\n\n\nconst grpc = {};\ngrpc.web = require('grpc-web');\n\nconst proto = {};\nproto.pactus = require('./network_pb.js');\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.NetworkClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.NetworkPromiseClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetNetworkInfoRequest,\n *   !proto.pactus.GetNetworkInfoResponse>}\n */\nconst methodDescriptor_Network_GetNetworkInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Network/GetNetworkInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetNetworkInfoRequest,\n  proto.pactus.GetNetworkInfoResponse,\n  /**\n   * @param {!proto.pactus.GetNetworkInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetNetworkInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetNetworkInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetNetworkInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetNetworkInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.NetworkClient.prototype.getNetworkInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Network/GetNetworkInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Network_GetNetworkInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetNetworkInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetNetworkInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.NetworkPromiseClient.prototype.getNetworkInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Network/GetNetworkInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Network_GetNetworkInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.ListPeersRequest,\n *   !proto.pactus.ListPeersResponse>}\n */\nconst methodDescriptor_Network_ListPeers = new grpc.web.MethodDescriptor(\n  '/pactus.Network/ListPeers',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.ListPeersRequest,\n  proto.pactus.ListPeersResponse,\n  /**\n   * @param {!proto.pactus.ListPeersRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.ListPeersResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.ListPeersRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.ListPeersResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.ListPeersResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.NetworkClient.prototype.listPeers =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Network/ListPeers',\n      request,\n      metadata || {},\n      methodDescriptor_Network_ListPeers,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.ListPeersRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.ListPeersResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.NetworkPromiseClient.prototype.listPeers =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Network/ListPeers',\n      request,\n      metadata || {},\n      methodDescriptor_Network_ListPeers);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetNodeInfoRequest,\n *   !proto.pactus.GetNodeInfoResponse>}\n */\nconst methodDescriptor_Network_GetNodeInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Network/GetNodeInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetNodeInfoRequest,\n  proto.pactus.GetNodeInfoResponse,\n  /**\n   * @param {!proto.pactus.GetNodeInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetNodeInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetNodeInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetNodeInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetNodeInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.NetworkClient.prototype.getNodeInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Network/GetNodeInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Network_GetNodeInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetNodeInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetNodeInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.NetworkPromiseClient.prototype.getNodeInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Network/GetNodeInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Network_GetNodeInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.PingRequest,\n *   !proto.pactus.PingResponse>}\n */\nconst methodDescriptor_Network_Ping = new grpc.web.MethodDescriptor(\n  '/pactus.Network/Ping',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.PingRequest,\n  proto.pactus.PingResponse,\n  /**\n   * @param {!proto.pactus.PingRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.PingResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.PingRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.PingResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.PingResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.NetworkClient.prototype.ping =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Network/Ping',\n      request,\n      metadata || {},\n      methodDescriptor_Network_Ping,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.PingRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.PingResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.NetworkPromiseClient.prototype.ping =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Network/Ping',\n      request,\n      metadata || {},\n      methodDescriptor_Network_Ping);\n};\n\n\nmodule.exports = proto.pactus;\n\n"
  },
  {
    "path": "www/grpc/gen/js/network_pb.js",
    "content": "// source: network.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = globalThis;\n\ngoog.exportSymbol('proto.pactus.ConnectionInfo', null, global);\ngoog.exportSymbol('proto.pactus.CounterInfo', null, global);\ngoog.exportSymbol('proto.pactus.Direction', null, global);\ngoog.exportSymbol('proto.pactus.GetNetworkInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetNetworkInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetNodeInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetNodeInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.ListPeersRequest', null, global);\ngoog.exportSymbol('proto.pactus.ListPeersResponse', null, global);\ngoog.exportSymbol('proto.pactus.MetricInfo', null, global);\ngoog.exportSymbol('proto.pactus.PeerInfo', null, global);\ngoog.exportSymbol('proto.pactus.PingRequest', null, global);\ngoog.exportSymbol('proto.pactus.PingResponse', null, global);\ngoog.exportSymbol('proto.pactus.ZMQPublisherInfo', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNetworkInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetNetworkInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNetworkInfoRequest.displayName = 'proto.pactus.GetNetworkInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNetworkInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetNetworkInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNetworkInfoResponse.displayName = 'proto.pactus.GetNetworkInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListPeersRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ListPeersRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListPeersRequest.displayName = 'proto.pactus.ListPeersRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListPeersResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ListPeersResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ListPeersResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListPeersResponse.displayName = 'proto.pactus.ListPeersResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNodeInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetNodeInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNodeInfoRequest.displayName = 'proto.pactus.GetNodeInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNodeInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetNodeInfoResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetNodeInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNodeInfoResponse.displayName = 'proto.pactus.GetNodeInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ZMQPublisherInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ZMQPublisherInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ZMQPublisherInfo.displayName = 'proto.pactus.ZMQPublisherInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PeerInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.PeerInfo.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.PeerInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PeerInfo.displayName = 'proto.pactus.PeerInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ConnectionInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ConnectionInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ConnectionInfo.displayName = 'proto.pactus.ConnectionInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.MetricInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.MetricInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.MetricInfo.displayName = 'proto.pactus.MetricInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CounterInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CounterInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CounterInfo.displayName = 'proto.pactus.CounterInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PingRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PingRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PingRequest.displayName = 'proto.pactus.PingRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PingResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PingResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PingResponse.displayName = 'proto.pactus.PingResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNetworkInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNetworkInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNetworkInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNetworkInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNetworkInfoRequest}\n */\nproto.pactus.GetNetworkInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNetworkInfoRequest;\n  return proto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNetworkInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNetworkInfoRequest}\n */\nproto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNetworkInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNetworkInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNetworkInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNetworkInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNetworkInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nnetworkName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nconnectedPeersCount: jspb.Message.getFieldWithDefault(msg, 2, 0),\nmetricInfo: (f = msg.getMetricInfo()) && proto.pactus.MetricInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNetworkInfoResponse}\n */\nproto.pactus.GetNetworkInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNetworkInfoResponse;\n  return proto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNetworkInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNetworkInfoResponse}\n */\nproto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setNetworkName(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setConnectedPeersCount(value);\n      break;\n    case 4:\n      var value = new proto.pactus.MetricInfo;\n      reader.readMessage(value,proto.pactus.MetricInfo.deserializeBinaryFromReader);\n      msg.setMetricInfo(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNetworkInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getNetworkName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getConnectedPeersCount();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getMetricInfo();\n  if (f != null) {\n    writer.writeMessage(\n      4,\n      f,\n      proto.pactus.MetricInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string network_name = 1;\n * @return {string}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.getNetworkName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNetworkInfoResponse} returns this\n */\nproto.pactus.GetNetworkInfoResponse.prototype.setNetworkName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional uint32 connected_peers_count = 2;\n * @return {number}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.getConnectedPeersCount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetNetworkInfoResponse} returns this\n */\nproto.pactus.GetNetworkInfoResponse.prototype.setConnectedPeersCount = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional MetricInfo metric_info = 4;\n * @return {?proto.pactus.MetricInfo}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.getMetricInfo = function() {\n  return /** @type{?proto.pactus.MetricInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.MetricInfo, 4));\n};\n\n\n/**\n * @param {?proto.pactus.MetricInfo|undefined} value\n * @return {!proto.pactus.GetNetworkInfoResponse} returns this\n*/\nproto.pactus.GetNetworkInfoResponse.prototype.setMetricInfo = function(value) {\n  return jspb.Message.setWrapperField(this, 4, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetNetworkInfoResponse} returns this\n */\nproto.pactus.GetNetworkInfoResponse.prototype.clearMetricInfo = function() {\n  return this.setMetricInfo(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetNetworkInfoResponse.prototype.hasMetricInfo = function() {\n  return jspb.Message.getField(this, 4) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListPeersRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListPeersRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListPeersRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListPeersRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nincludeDisconnected: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListPeersRequest}\n */\nproto.pactus.ListPeersRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListPeersRequest;\n  return proto.pactus.ListPeersRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListPeersRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListPeersRequest}\n */\nproto.pactus.ListPeersRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIncludeDisconnected(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListPeersRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListPeersRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListPeersRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListPeersRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIncludeDisconnected();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool include_disconnected = 1;\n * @return {boolean}\n */\nproto.pactus.ListPeersRequest.prototype.getIncludeDisconnected = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.ListPeersRequest} returns this\n */\nproto.pactus.ListPeersRequest.prototype.setIncludeDisconnected = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ListPeersResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListPeersResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListPeersResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListPeersResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListPeersResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\npeersList: jspb.Message.toObjectList(msg.getPeersList(),\n    proto.pactus.PeerInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListPeersResponse}\n */\nproto.pactus.ListPeersResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListPeersResponse;\n  return proto.pactus.ListPeersResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListPeersResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListPeersResponse}\n */\nproto.pactus.ListPeersResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.PeerInfo;\n      reader.readMessage(value,proto.pactus.PeerInfo.deserializeBinaryFromReader);\n      msg.addPeers(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListPeersResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListPeersResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListPeersResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListPeersResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPeersList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      1,\n      f,\n      proto.pactus.PeerInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * repeated PeerInfo peers = 1;\n * @return {!Array<!proto.pactus.PeerInfo>}\n */\nproto.pactus.ListPeersResponse.prototype.getPeersList = function() {\n  return /** @type{!Array<!proto.pactus.PeerInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.PeerInfo, 1));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.PeerInfo>} value\n * @return {!proto.pactus.ListPeersResponse} returns this\n*/\nproto.pactus.ListPeersResponse.prototype.setPeersList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 1, value);\n};\n\n\n/**\n * @param {!proto.pactus.PeerInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.PeerInfo}\n */\nproto.pactus.ListPeersResponse.prototype.addPeers = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.PeerInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ListPeersResponse} returns this\n */\nproto.pactus.ListPeersResponse.prototype.clearPeersList = function() {\n  return this.setPeersList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNodeInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNodeInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNodeInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNodeInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNodeInfoRequest}\n */\nproto.pactus.GetNodeInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNodeInfoRequest;\n  return proto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNodeInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNodeInfoRequest}\n */\nproto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNodeInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNodeInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNodeInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetNodeInfoResponse.repeatedFields_ = [8,9,15];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNodeInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNodeInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNodeInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNodeInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nmoniker: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nagent: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\npeerId: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nstartedAt: jspb.Message.getFieldWithDefault(msg, 4, 0),\nreachability: jspb.Message.getFieldWithDefault(msg, 5, \"\"),\nservices: jspb.Message.getFieldWithDefault(msg, 6, 0),\nservicesNames: jspb.Message.getFieldWithDefault(msg, 7, \"\"),\nlocalAddrsList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f,\nprotocolsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f,\nclockOffset: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0),\nconnectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f),\nzmqPublishersList: jspb.Message.toObjectList(msg.getZmqPublishersList(),\n    proto.pactus.ZMQPublisherInfo.toObject, includeInstance),\ncurrentTime: jspb.Message.getFieldWithDefault(msg, 16, 0),\nnetworkName: jspb.Message.getFieldWithDefault(msg, 17, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNodeInfoResponse}\n */\nproto.pactus.GetNodeInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNodeInfoResponse;\n  return proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNodeInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNodeInfoResponse}\n */\nproto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMoniker(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAgent(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPeerId(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setStartedAt(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReachability(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setServices(value);\n      break;\n    case 7:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setServicesNames(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addLocalAddrs(value);\n      break;\n    case 9:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addProtocols(value);\n      break;\n    case 13:\n      var value = /** @type {number} */ (reader.readDouble());\n      msg.setClockOffset(value);\n      break;\n    case 14:\n      var value = new proto.pactus.ConnectionInfo;\n      reader.readMessage(value,proto.pactus.ConnectionInfo.deserializeBinaryFromReader);\n      msg.setConnectionInfo(value);\n      break;\n    case 15:\n      var value = new proto.pactus.ZMQPublisherInfo;\n      reader.readMessage(value,proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader);\n      msg.addZmqPublishers(value);\n      break;\n    case 16:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setCurrentTime(value);\n      break;\n    case 17:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setNetworkName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNodeInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNodeInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNodeInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getMoniker();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAgent();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getPeerId();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getStartedAt();\n  if (f !== 0) {\n    writer.writeUint64(\n      4,\n      f\n    );\n  }\n  f = message.getReachability();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n  f = message.getServices();\n  if (f !== 0) {\n    writer.writeInt32(\n      6,\n      f\n    );\n  }\n  f = message.getServicesNames();\n  if (f.length > 0) {\n    writer.writeString(\n      7,\n      f\n    );\n  }\n  f = message.getLocalAddrsList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      8,\n      f\n    );\n  }\n  f = message.getProtocolsList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      9,\n      f\n    );\n  }\n  f = message.getClockOffset();\n  if (f !== 0.0) {\n    writer.writeDouble(\n      13,\n      f\n    );\n  }\n  f = message.getConnectionInfo();\n  if (f != null) {\n    writer.writeMessage(\n      14,\n      f,\n      proto.pactus.ConnectionInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getZmqPublishersList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      15,\n      f,\n      proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getCurrentTime();\n  if (f !== 0) {\n    writer.writeUint64(\n      16,\n      f\n    );\n  }\n  f = message.getNetworkName();\n  if (f.length > 0) {\n    writer.writeString(\n      17,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string moniker = 1;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getMoniker = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setMoniker = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string agent = 2;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getAgent = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setAgent = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string peer_id = 3;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getPeerId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setPeerId = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional uint64 started_at = 4;\n * @return {number}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getStartedAt = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setStartedAt = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional string reachability = 5;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getReachability = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setReachability = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n/**\n * optional int32 services = 6;\n * @return {number}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getServices = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setServices = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional string services_names = 7;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getServicesNames = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setServicesNames = function(value) {\n  return jspb.Message.setProto3StringField(this, 7, value);\n};\n\n\n/**\n * repeated string local_addrs = 8;\n * @return {!Array<string>}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getLocalAddrsList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 8));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setLocalAddrsList = function(value) {\n  return jspb.Message.setField(this, 8, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.addLocalAddrs = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 8, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.clearLocalAddrsList = function() {\n  return this.setLocalAddrsList([]);\n};\n\n\n/**\n * repeated string protocols = 9;\n * @return {!Array<string>}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getProtocolsList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 9));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setProtocolsList = function(value) {\n  return jspb.Message.setField(this, 9, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.addProtocols = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 9, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.clearProtocolsList = function() {\n  return this.setProtocolsList([]);\n};\n\n\n/**\n * optional double clock_offset = 13;\n * @return {number}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getClockOffset = function() {\n  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setClockOffset = function(value) {\n  return jspb.Message.setProto3FloatField(this, 13, value);\n};\n\n\n/**\n * optional ConnectionInfo connection_info = 14;\n * @return {?proto.pactus.ConnectionInfo}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getConnectionInfo = function() {\n  return /** @type{?proto.pactus.ConnectionInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.ConnectionInfo, 14));\n};\n\n\n/**\n * @param {?proto.pactus.ConnectionInfo|undefined} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n*/\nproto.pactus.GetNodeInfoResponse.prototype.setConnectionInfo = function(value) {\n  return jspb.Message.setWrapperField(this, 14, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.clearConnectionInfo = function() {\n  return this.setConnectionInfo(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetNodeInfoResponse.prototype.hasConnectionInfo = function() {\n  return jspb.Message.getField(this, 14) != null;\n};\n\n\n/**\n * repeated ZMQPublisherInfo zmq_publishers = 15;\n * @return {!Array<!proto.pactus.ZMQPublisherInfo>}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getZmqPublishersList = function() {\n  return /** @type{!Array<!proto.pactus.ZMQPublisherInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.ZMQPublisherInfo, 15));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.ZMQPublisherInfo>} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n*/\nproto.pactus.GetNodeInfoResponse.prototype.setZmqPublishersList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 15, value);\n};\n\n\n/**\n * @param {!proto.pactus.ZMQPublisherInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.ZMQPublisherInfo}\n */\nproto.pactus.GetNodeInfoResponse.prototype.addZmqPublishers = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.pactus.ZMQPublisherInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.clearZmqPublishersList = function() {\n  return this.setZmqPublishersList([]);\n};\n\n\n/**\n * optional uint64 current_time = 16;\n * @return {number}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getCurrentTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setCurrentTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 16, value);\n};\n\n\n/**\n * optional string network_name = 17;\n * @return {string}\n */\nproto.pactus.GetNodeInfoResponse.prototype.getNetworkName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNodeInfoResponse} returns this\n */\nproto.pactus.GetNodeInfoResponse.prototype.setNetworkName = function(value) {\n  return jspb.Message.setProto3StringField(this, 17, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ZMQPublisherInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ZMQPublisherInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ZMQPublisherInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ZMQPublisherInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntopic: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nhwm: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ZMQPublisherInfo}\n */\nproto.pactus.ZMQPublisherInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ZMQPublisherInfo;\n  return proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ZMQPublisherInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ZMQPublisherInfo}\n */\nproto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setTopic(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setHwm(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ZMQPublisherInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ZMQPublisherInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ZMQPublisherInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTopic();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getHwm();\n  if (f !== 0) {\n    writer.writeInt32(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string topic = 1;\n * @return {string}\n */\nproto.pactus.ZMQPublisherInfo.prototype.getTopic = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ZMQPublisherInfo} returns this\n */\nproto.pactus.ZMQPublisherInfo.prototype.setTopic = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string address = 2;\n * @return {string}\n */\nproto.pactus.ZMQPublisherInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ZMQPublisherInfo} returns this\n */\nproto.pactus.ZMQPublisherInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int32 hwm = 3;\n * @return {number}\n */\nproto.pactus.ZMQPublisherInfo.prototype.getHwm = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ZMQPublisherInfo} returns this\n */\nproto.pactus.ZMQPublisherInfo.prototype.setHwm = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.PeerInfo.repeatedFields_ = [5,6,14];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PeerInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PeerInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PeerInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PeerInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nstatus: jspb.Message.getFieldWithDefault(msg, 1, 0),\nmoniker: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nagent: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\npeerId: jspb.Message.getFieldWithDefault(msg, 4, \"\"),\nconsensusKeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,\nconsensusAddressesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f,\nservices: jspb.Message.getFieldWithDefault(msg, 7, 0),\nlastBlockHash: jspb.Message.getFieldWithDefault(msg, 8, \"\"),\nheight: jspb.Message.getFieldWithDefault(msg, 9, 0),\nlastSent: jspb.Message.getFieldWithDefault(msg, 10, 0),\nlastReceived: jspb.Message.getFieldWithDefault(msg, 11, 0),\naddress: jspb.Message.getFieldWithDefault(msg, 12, \"\"),\ndirection: jspb.Message.getFieldWithDefault(msg, 13, 0),\nprotocolsList: (f = jspb.Message.getRepeatedField(msg, 14)) == null ? undefined : f,\ntotalSessions: jspb.Message.getFieldWithDefault(msg, 15, 0),\ncompletedSessions: jspb.Message.getFieldWithDefault(msg, 16, 0),\nmetricInfo: (f = msg.getMetricInfo()) && proto.pactus.MetricInfo.toObject(includeInstance, f),\noutboundHelloSent: jspb.Message.getBooleanFieldWithDefault(msg, 18, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PeerInfo}\n */\nproto.pactus.PeerInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PeerInfo;\n  return proto.pactus.PeerInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PeerInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PeerInfo}\n */\nproto.pactus.PeerInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setStatus(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMoniker(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAgent(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPeerId(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addConsensusKeys(value);\n      break;\n    case 6:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addConsensusAddresses(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setServices(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLastBlockHash(value);\n      break;\n    case 9:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setHeight(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setLastSent(value);\n      break;\n    case 11:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setLastReceived(value);\n      break;\n    case 12:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 13:\n      var value = /** @type {!proto.pactus.Direction} */ (reader.readEnum());\n      msg.setDirection(value);\n      break;\n    case 14:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addProtocols(value);\n      break;\n    case 15:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setTotalSessions(value);\n      break;\n    case 16:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCompletedSessions(value);\n      break;\n    case 17:\n      var value = new proto.pactus.MetricInfo;\n      reader.readMessage(value,proto.pactus.MetricInfo.deserializeBinaryFromReader);\n      msg.setMetricInfo(value);\n      break;\n    case 18:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setOutboundHelloSent(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PeerInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PeerInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PeerInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PeerInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getStatus();\n  if (f !== 0) {\n    writer.writeInt32(\n      1,\n      f\n    );\n  }\n  f = message.getMoniker();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAgent();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getPeerId();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n  f = message.getConsensusKeysList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      5,\n      f\n    );\n  }\n  f = message.getConsensusAddressesList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      6,\n      f\n    );\n  }\n  f = message.getServices();\n  if (f !== 0) {\n    writer.writeUint32(\n      7,\n      f\n    );\n  }\n  f = message.getLastBlockHash();\n  if (f.length > 0) {\n    writer.writeString(\n      8,\n      f\n    );\n  }\n  f = message.getHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      9,\n      f\n    );\n  }\n  f = message.getLastSent();\n  if (f !== 0) {\n    writer.writeInt64(\n      10,\n      f\n    );\n  }\n  f = message.getLastReceived();\n  if (f !== 0) {\n    writer.writeInt64(\n      11,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      12,\n      f\n    );\n  }\n  f = message.getDirection();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      13,\n      f\n    );\n  }\n  f = message.getProtocolsList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      14,\n      f\n    );\n  }\n  f = message.getTotalSessions();\n  if (f !== 0) {\n    writer.writeInt32(\n      15,\n      f\n    );\n  }\n  f = message.getCompletedSessions();\n  if (f !== 0) {\n    writer.writeInt32(\n      16,\n      f\n    );\n  }\n  f = message.getMetricInfo();\n  if (f != null) {\n    writer.writeMessage(\n      17,\n      f,\n      proto.pactus.MetricInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getOutboundHelloSent();\n  if (f) {\n    writer.writeBool(\n      18,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int32 status = 1;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getStatus = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setStatus = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string moniker = 2;\n * @return {string}\n */\nproto.pactus.PeerInfo.prototype.getMoniker = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setMoniker = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string agent = 3;\n * @return {string}\n */\nproto.pactus.PeerInfo.prototype.getAgent = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setAgent = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string peer_id = 4;\n * @return {string}\n */\nproto.pactus.PeerInfo.prototype.getPeerId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setPeerId = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n/**\n * repeated string consensus_keys = 5;\n * @return {!Array<string>}\n */\nproto.pactus.PeerInfo.prototype.getConsensusKeysList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setConsensusKeysList = function(value) {\n  return jspb.Message.setField(this, 5, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.addConsensusKeys = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 5, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.clearConsensusKeysList = function() {\n  return this.setConsensusKeysList([]);\n};\n\n\n/**\n * repeated string consensus_addresses = 6;\n * @return {!Array<string>}\n */\nproto.pactus.PeerInfo.prototype.getConsensusAddressesList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setConsensusAddressesList = function(value) {\n  return jspb.Message.setField(this, 6, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.addConsensusAddresses = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 6, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.clearConsensusAddressesList = function() {\n  return this.setConsensusAddressesList([]);\n};\n\n\n/**\n * optional uint32 services = 7;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getServices = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setServices = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional string last_block_hash = 8;\n * @return {string}\n */\nproto.pactus.PeerInfo.prototype.getLastBlockHash = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setLastBlockHash = function(value) {\n  return jspb.Message.setProto3StringField(this, 8, value);\n};\n\n\n/**\n * optional uint32 height = 9;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 9, value);\n};\n\n\n/**\n * optional int64 last_sent = 10;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getLastSent = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setLastSent = function(value) {\n  return jspb.Message.setProto3IntField(this, 10, value);\n};\n\n\n/**\n * optional int64 last_received = 11;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getLastReceived = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setLastReceived = function(value) {\n  return jspb.Message.setProto3IntField(this, 11, value);\n};\n\n\n/**\n * optional string address = 12;\n * @return {string}\n */\nproto.pactus.PeerInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 12, value);\n};\n\n\n/**\n * optional Direction direction = 13;\n * @return {!proto.pactus.Direction}\n */\nproto.pactus.PeerInfo.prototype.getDirection = function() {\n  return /** @type {!proto.pactus.Direction} */ (jspb.Message.getFieldWithDefault(this, 13, 0));\n};\n\n\n/**\n * @param {!proto.pactus.Direction} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setDirection = function(value) {\n  return jspb.Message.setProto3EnumField(this, 13, value);\n};\n\n\n/**\n * repeated string protocols = 14;\n * @return {!Array<string>}\n */\nproto.pactus.PeerInfo.prototype.getProtocolsList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 14));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setProtocolsList = function(value) {\n  return jspb.Message.setField(this, 14, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.addProtocols = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 14, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.clearProtocolsList = function() {\n  return this.setProtocolsList([]);\n};\n\n\n/**\n * optional int32 total_sessions = 15;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getTotalSessions = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setTotalSessions = function(value) {\n  return jspb.Message.setProto3IntField(this, 15, value);\n};\n\n\n/**\n * optional int32 completed_sessions = 16;\n * @return {number}\n */\nproto.pactus.PeerInfo.prototype.getCompletedSessions = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setCompletedSessions = function(value) {\n  return jspb.Message.setProto3IntField(this, 16, value);\n};\n\n\n/**\n * optional MetricInfo metric_info = 17;\n * @return {?proto.pactus.MetricInfo}\n */\nproto.pactus.PeerInfo.prototype.getMetricInfo = function() {\n  return /** @type{?proto.pactus.MetricInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.MetricInfo, 17));\n};\n\n\n/**\n * @param {?proto.pactus.MetricInfo|undefined} value\n * @return {!proto.pactus.PeerInfo} returns this\n*/\nproto.pactus.PeerInfo.prototype.setMetricInfo = function(value) {\n  return jspb.Message.setWrapperField(this, 17, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.clearMetricInfo = function() {\n  return this.setMetricInfo(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.PeerInfo.prototype.hasMetricInfo = function() {\n  return jspb.Message.getField(this, 17) != null;\n};\n\n\n/**\n * optional bool outbound_hello_sent = 18;\n * @return {boolean}\n */\nproto.pactus.PeerInfo.prototype.getOutboundHelloSent = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.PeerInfo} returns this\n */\nproto.pactus.PeerInfo.prototype.setOutboundHelloSent = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 18, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ConnectionInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ConnectionInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ConnectionInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ConnectionInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nconnections: jspb.Message.getFieldWithDefault(msg, 1, 0),\ninboundConnections: jspb.Message.getFieldWithDefault(msg, 2, 0),\noutboundConnections: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ConnectionInfo}\n */\nproto.pactus.ConnectionInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ConnectionInfo;\n  return proto.pactus.ConnectionInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ConnectionInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ConnectionInfo}\n */\nproto.pactus.ConnectionInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setConnections(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setInboundConnections(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setOutboundConnections(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ConnectionInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ConnectionInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ConnectionInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ConnectionInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getConnections();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getInboundConnections();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n  f = message.getOutboundConnections();\n  if (f !== 0) {\n    writer.writeUint64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 connections = 1;\n * @return {number}\n */\nproto.pactus.ConnectionInfo.prototype.getConnections = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ConnectionInfo} returns this\n */\nproto.pactus.ConnectionInfo.prototype.setConnections = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional uint64 inbound_connections = 2;\n * @return {number}\n */\nproto.pactus.ConnectionInfo.prototype.getInboundConnections = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ConnectionInfo} returns this\n */\nproto.pactus.ConnectionInfo.prototype.setInboundConnections = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional uint64 outbound_connections = 3;\n * @return {number}\n */\nproto.pactus.ConnectionInfo.prototype.getOutboundConnections = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ConnectionInfo} returns this\n */\nproto.pactus.ConnectionInfo.prototype.setOutboundConnections = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.MetricInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.MetricInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.MetricInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.MetricInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntotalInvalid: (f = msg.getTotalInvalid()) && proto.pactus.CounterInfo.toObject(includeInstance, f),\ntotalSent: (f = msg.getTotalSent()) && proto.pactus.CounterInfo.toObject(includeInstance, f),\ntotalReceived: (f = msg.getTotalReceived()) && proto.pactus.CounterInfo.toObject(includeInstance, f),\nmessageSentMap: (f = msg.getMessageSentMap()) ? f.toObject(includeInstance, proto.pactus.CounterInfo.toObject) : [],\nmessageReceivedMap: (f = msg.getMessageReceivedMap()) ? f.toObject(includeInstance, proto.pactus.CounterInfo.toObject) : []\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.MetricInfo}\n */\nproto.pactus.MetricInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.MetricInfo;\n  return proto.pactus.MetricInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.MetricInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.MetricInfo}\n */\nproto.pactus.MetricInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.CounterInfo;\n      reader.readMessage(value,proto.pactus.CounterInfo.deserializeBinaryFromReader);\n      msg.setTotalInvalid(value);\n      break;\n    case 2:\n      var value = new proto.pactus.CounterInfo;\n      reader.readMessage(value,proto.pactus.CounterInfo.deserializeBinaryFromReader);\n      msg.setTotalSent(value);\n      break;\n    case 3:\n      var value = new proto.pactus.CounterInfo;\n      reader.readMessage(value,proto.pactus.CounterInfo.deserializeBinaryFromReader);\n      msg.setTotalReceived(value);\n      break;\n    case 4:\n      var value = msg.getMessageSentMap();\n      reader.readMessage(value, function(message, reader) {\n        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readMessage, proto.pactus.CounterInfo.deserializeBinaryFromReader, 0, new proto.pactus.CounterInfo());\n         });\n      break;\n    case 5:\n      var value = msg.getMessageReceivedMap();\n      reader.readMessage(value, function(message, reader) {\n        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readMessage, proto.pactus.CounterInfo.deserializeBinaryFromReader, 0, new proto.pactus.CounterInfo());\n         });\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.MetricInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.MetricInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.MetricInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.MetricInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTotalInvalid();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.pactus.CounterInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getTotalSent();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      proto.pactus.CounterInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getTotalReceived();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      proto.pactus.CounterInfo.serializeBinaryToWriter\n    );\n  }\n  f = message.getMessageSentMap(true);\n  if (f && f.getLength() > 0) {\njspb.internal.public_for_gencode.serializeMapToBinary(\n    message.getMessageSentMap(true),\n    4,\n    writer,\n    jspb.BinaryWriter.prototype.writeInt32,\n    jspb.BinaryWriter.prototype.writeMessage,\n    proto.pactus.CounterInfo.serializeBinaryToWriter);\n  }\n  f = message.getMessageReceivedMap(true);\n  if (f && f.getLength() > 0) {\njspb.internal.public_for_gencode.serializeMapToBinary(\n    message.getMessageReceivedMap(true),\n    5,\n    writer,\n    jspb.BinaryWriter.prototype.writeInt32,\n    jspb.BinaryWriter.prototype.writeMessage,\n    proto.pactus.CounterInfo.serializeBinaryToWriter);\n  }\n};\n\n\n/**\n * optional CounterInfo total_invalid = 1;\n * @return {?proto.pactus.CounterInfo}\n */\nproto.pactus.MetricInfo.prototype.getTotalInvalid = function() {\n  return /** @type{?proto.pactus.CounterInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.CounterInfo, 1));\n};\n\n\n/**\n * @param {?proto.pactus.CounterInfo|undefined} value\n * @return {!proto.pactus.MetricInfo} returns this\n*/\nproto.pactus.MetricInfo.prototype.setTotalInvalid = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.MetricInfo} returns this\n */\nproto.pactus.MetricInfo.prototype.clearTotalInvalid = function() {\n  return this.setTotalInvalid(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.MetricInfo.prototype.hasTotalInvalid = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n/**\n * optional CounterInfo total_sent = 2;\n * @return {?proto.pactus.CounterInfo}\n */\nproto.pactus.MetricInfo.prototype.getTotalSent = function() {\n  return /** @type{?proto.pactus.CounterInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.CounterInfo, 2));\n};\n\n\n/**\n * @param {?proto.pactus.CounterInfo|undefined} value\n * @return {!proto.pactus.MetricInfo} returns this\n*/\nproto.pactus.MetricInfo.prototype.setTotalSent = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.MetricInfo} returns this\n */\nproto.pactus.MetricInfo.prototype.clearTotalSent = function() {\n  return this.setTotalSent(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.MetricInfo.prototype.hasTotalSent = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n/**\n * optional CounterInfo total_received = 3;\n * @return {?proto.pactus.CounterInfo}\n */\nproto.pactus.MetricInfo.prototype.getTotalReceived = function() {\n  return /** @type{?proto.pactus.CounterInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.CounterInfo, 3));\n};\n\n\n/**\n * @param {?proto.pactus.CounterInfo|undefined} value\n * @return {!proto.pactus.MetricInfo} returns this\n*/\nproto.pactus.MetricInfo.prototype.setTotalReceived = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.MetricInfo} returns this\n */\nproto.pactus.MetricInfo.prototype.clearTotalReceived = function() {\n  return this.setTotalReceived(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.MetricInfo.prototype.hasTotalReceived = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n/**\n * map<int32, CounterInfo> message_sent = 4;\n * @param {boolean=} opt_noLazyCreate Do not create the map if\n * empty, instead returning `undefined`\n * @return {!jspb.Map<number,!proto.pactus.CounterInfo>}\n */\nproto.pactus.MetricInfo.prototype.getMessageSentMap = function(opt_noLazyCreate) {\n  return /** @type {!jspb.Map<number,!proto.pactus.CounterInfo>} */ (\n      jspb.Message.getMapField(this, 4, opt_noLazyCreate,\n      proto.pactus.CounterInfo));\n};\n\n\n/**\n * Clears values from the map. The map will be non-null.\n * @return {!proto.pactus.MetricInfo} returns this\n */\nproto.pactus.MetricInfo.prototype.clearMessageSentMap = function() {\n  this.getMessageSentMap().clear();\n  return this;\n};\n\n\n/**\n * map<int32, CounterInfo> message_received = 5;\n * @param {boolean=} opt_noLazyCreate Do not create the map if\n * empty, instead returning `undefined`\n * @return {!jspb.Map<number,!proto.pactus.CounterInfo>}\n */\nproto.pactus.MetricInfo.prototype.getMessageReceivedMap = function(opt_noLazyCreate) {\n  return /** @type {!jspb.Map<number,!proto.pactus.CounterInfo>} */ (\n      jspb.Message.getMapField(this, 5, opt_noLazyCreate,\n      proto.pactus.CounterInfo));\n};\n\n\n/**\n * Clears values from the map. The map will be non-null.\n * @return {!proto.pactus.MetricInfo} returns this\n */\nproto.pactus.MetricInfo.prototype.clearMessageReceivedMap = function() {\n  this.getMessageReceivedMap().clear();\n  return this;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CounterInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CounterInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CounterInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CounterInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nbytes: jspb.Message.getFieldWithDefault(msg, 1, 0),\nbundles: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CounterInfo}\n */\nproto.pactus.CounterInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CounterInfo;\n  return proto.pactus.CounterInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CounterInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CounterInfo}\n */\nproto.pactus.CounterInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBytes(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint64());\n      msg.setBundles(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CounterInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CounterInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CounterInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CounterInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBytes();\n  if (f !== 0) {\n    writer.writeUint64(\n      1,\n      f\n    );\n  }\n  f = message.getBundles();\n  if (f !== 0) {\n    writer.writeUint64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint64 bytes = 1;\n * @return {number}\n */\nproto.pactus.CounterInfo.prototype.getBytes = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CounterInfo} returns this\n */\nproto.pactus.CounterInfo.prototype.setBytes = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional uint64 bundles = 2;\n * @return {number}\n */\nproto.pactus.CounterInfo.prototype.getBundles = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CounterInfo} returns this\n */\nproto.pactus.CounterInfo.prototype.setBundles = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PingRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PingRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PingRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PingRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PingRequest}\n */\nproto.pactus.PingRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PingRequest;\n  return proto.pactus.PingRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PingRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PingRequest}\n */\nproto.pactus.PingRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PingRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PingRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PingRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PingRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PingResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PingResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PingResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PingResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PingResponse}\n */\nproto.pactus.PingResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PingResponse;\n  return proto.pactus.PingResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PingResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PingResponse}\n */\nproto.pactus.PingResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PingResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PingResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PingResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PingResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n/**\n * @enum {number}\n */\nproto.pactus.Direction = {\n  DIRECTION_UNKNOWN: 0,\n  DIRECTION_INBOUND: 1,\n  DIRECTION_OUTBOUND: 2\n};\n\ngoog.object.extend(exports, proto.pactus);\n"
  },
  {
    "path": "www/grpc/gen/js/transaction_grpc_pb.js",
    "content": "// GENERATED CODE -- DO NOT EDIT!\n\n'use strict';\nvar grpc = require('@grpc/grpc-js');\nvar transaction_pb = require('./transaction_pb.js');\n\nfunction serialize_pactus_BroadcastTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.BroadcastTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.BroadcastTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_BroadcastTransactionRequest(buffer_arg) {\n  return transaction_pb.BroadcastTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_BroadcastTransactionResponse(arg) {\n  if (!(arg instanceof transaction_pb.BroadcastTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.BroadcastTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_BroadcastTransactionResponse(buffer_arg) {\n  return transaction_pb.BroadcastTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_CalculateFeeRequest(arg) {\n  if (!(arg instanceof transaction_pb.CalculateFeeRequest)) {\n    throw new Error('Expected argument of type pactus.CalculateFeeRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CalculateFeeRequest(buffer_arg) {\n  return transaction_pb.CalculateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_CalculateFeeResponse(arg) {\n  if (!(arg instanceof transaction_pb.CalculateFeeResponse)) {\n    throw new Error('Expected argument of type pactus.CalculateFeeResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CalculateFeeResponse(buffer_arg) {\n  return transaction_pb.CalculateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_CheckTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.CheckTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.CheckTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CheckTransactionRequest(buffer_arg) {\n  return transaction_pb.CheckTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_CheckTransactionResponse(arg) {\n  if (!(arg instanceof transaction_pb.CheckTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.CheckTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CheckTransactionResponse(buffer_arg) {\n  return transaction_pb.CheckTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_DecodeRawTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.DecodeRawTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.DecodeRawTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_DecodeRawTransactionRequest(buffer_arg) {\n  return transaction_pb.DecodeRawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_DecodeRawTransactionResponse(arg) {\n  if (!(arg instanceof transaction_pb.DecodeRawTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.DecodeRawTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_DecodeRawTransactionResponse(buffer_arg) {\n  return transaction_pb.DecodeRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawBatchTransferTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetRawBatchTransferTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetRawBatchTransferTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawBatchTransferTransactionRequest(buffer_arg) {\n  return transaction_pb.GetRawBatchTransferTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawBondTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetRawBondTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetRawBondTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawBondTransactionRequest(buffer_arg) {\n  return transaction_pb.GetRawBondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawTransactionResponse(arg) {\n  if (!(arg instanceof transaction_pb.GetRawTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.GetRawTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawTransactionResponse(buffer_arg) {\n  return transaction_pb.GetRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawTransferTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetRawTransferTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetRawTransferTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawTransferTransactionRequest(buffer_arg) {\n  return transaction_pb.GetRawTransferTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawUnbondTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetRawUnbondTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetRawUnbondTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawUnbondTransactionRequest(buffer_arg) {\n  return transaction_pb.GetRawUnbondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetRawWithdrawTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetRawWithdrawTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetRawWithdrawTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetRawWithdrawTransactionRequest(buffer_arg) {\n  return transaction_pb.GetRawWithdrawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTransactionRequest(arg) {\n  if (!(arg instanceof transaction_pb.GetTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.GetTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTransactionRequest(buffer_arg) {\n  return transaction_pb.GetTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTransactionResponse(arg) {\n  if (!(arg instanceof transaction_pb.GetTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.GetTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTransactionResponse(buffer_arg) {\n  return transaction_pb.GetTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\n\n// Transaction service defines various RPC methods for interacting with transactions.\nvar TransactionService = exports.TransactionService = {\n  // GetTransaction retrieves transaction details based on the provided request parameters.\ngetTransaction: {\n    path: '/pactus.Transaction/GetTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetTransactionRequest,\n    responseType: transaction_pb.GetTransactionResponse,\n    requestSerialize: serialize_pactus_GetTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetTransactionRequest,\n    responseSerialize: serialize_pactus_GetTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetTransactionResponse,\n  },\n  // CalculateFee calculates the transaction fee based on the specified amount and payload type.\ncalculateFee: {\n    path: '/pactus.Transaction/CalculateFee',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.CalculateFeeRequest,\n    responseType: transaction_pb.CalculateFeeResponse,\n    requestSerialize: serialize_pactus_CalculateFeeRequest,\n    requestDeserialize: deserialize_pactus_CalculateFeeRequest,\n    responseSerialize: serialize_pactus_CalculateFeeResponse,\n    responseDeserialize: deserialize_pactus_CalculateFeeResponse,\n  },\n  // BroadcastTransaction broadcasts a signed transaction to the network.\nbroadcastTransaction: {\n    path: '/pactus.Transaction/BroadcastTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.BroadcastTransactionRequest,\n    responseType: transaction_pb.BroadcastTransactionResponse,\n    requestSerialize: serialize_pactus_BroadcastTransactionRequest,\n    requestDeserialize: deserialize_pactus_BroadcastTransactionRequest,\n    responseSerialize: serialize_pactus_BroadcastTransactionResponse,\n    responseDeserialize: deserialize_pactus_BroadcastTransactionResponse,\n  },\n  // GetRawTransferTransaction retrieves raw details of a transfer transaction.\ngetRawTransferTransaction: {\n    path: '/pactus.Transaction/GetRawTransferTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetRawTransferTransactionRequest,\n    responseType: transaction_pb.GetRawTransactionResponse,\n    requestSerialize: serialize_pactus_GetRawTransferTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetRawTransferTransactionRequest,\n    responseSerialize: serialize_pactus_GetRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetRawTransactionResponse,\n  },\n  // GetRawBondTransaction retrieves raw details of a bond transaction.\ngetRawBondTransaction: {\n    path: '/pactus.Transaction/GetRawBondTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetRawBondTransactionRequest,\n    responseType: transaction_pb.GetRawTransactionResponse,\n    requestSerialize: serialize_pactus_GetRawBondTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetRawBondTransactionRequest,\n    responseSerialize: serialize_pactus_GetRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetRawTransactionResponse,\n  },\n  // GetRawUnbondTransaction retrieves raw details of an unbond transaction.\ngetRawUnbondTransaction: {\n    path: '/pactus.Transaction/GetRawUnbondTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetRawUnbondTransactionRequest,\n    responseType: transaction_pb.GetRawTransactionResponse,\n    requestSerialize: serialize_pactus_GetRawUnbondTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetRawUnbondTransactionRequest,\n    responseSerialize: serialize_pactus_GetRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetRawTransactionResponse,\n  },\n  // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\ngetRawWithdrawTransaction: {\n    path: '/pactus.Transaction/GetRawWithdrawTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetRawWithdrawTransactionRequest,\n    responseType: transaction_pb.GetRawTransactionResponse,\n    requestSerialize: serialize_pactus_GetRawWithdrawTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetRawWithdrawTransactionRequest,\n    responseSerialize: serialize_pactus_GetRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetRawTransactionResponse,\n  },\n  // GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\ngetRawBatchTransferTransaction: {\n    path: '/pactus.Transaction/GetRawBatchTransferTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.GetRawBatchTransferTransactionRequest,\n    responseType: transaction_pb.GetRawTransactionResponse,\n    requestSerialize: serialize_pactus_GetRawBatchTransferTransactionRequest,\n    requestDeserialize: deserialize_pactus_GetRawBatchTransferTransactionRequest,\n    responseSerialize: serialize_pactus_GetRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_GetRawTransactionResponse,\n  },\n  // DecodeRawTransaction accepts raw transaction and returns decoded transaction.\ndecodeRawTransaction: {\n    path: '/pactus.Transaction/DecodeRawTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.DecodeRawTransactionRequest,\n    responseType: transaction_pb.DecodeRawTransactionResponse,\n    requestSerialize: serialize_pactus_DecodeRawTransactionRequest,\n    requestDeserialize: deserialize_pactus_DecodeRawTransactionRequest,\n    responseSerialize: serialize_pactus_DecodeRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_DecodeRawTransactionResponse,\n  },\n  // CheckTransaction checks if the transaction is valid and can be included in the blockchain.\ncheckTransaction: {\n    path: '/pactus.Transaction/CheckTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: transaction_pb.CheckTransactionRequest,\n    responseType: transaction_pb.CheckTransactionResponse,\n    requestSerialize: serialize_pactus_CheckTransactionRequest,\n    requestDeserialize: deserialize_pactus_CheckTransactionRequest,\n    responseSerialize: serialize_pactus_CheckTransactionResponse,\n    responseDeserialize: deserialize_pactus_CheckTransactionResponse,\n  },\n};\n\nexports.TransactionClient = grpc.makeGenericClientConstructor(TransactionService, 'Transaction');\n"
  },
  {
    "path": "www/grpc/gen/js/transaction_grpc_web_pb.js",
    "content": "/**\n * @fileoverview gRPC-Web generated client stub for pactus\n * @enhanceable\n * @public\n */\n\n// Code generated by protoc-gen-grpc-web. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-grpc-web v2.0.2\n// \tprotoc              v0.0.0\n// source: transaction.proto\n\n\n/* eslint-disable */\n// @ts-nocheck\n\n\n\nconst grpc = {};\ngrpc.web = require('grpc-web');\n\nconst proto = {};\nproto.pactus = require('./transaction_pb.js');\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.TransactionClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.TransactionPromiseClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetTransactionRequest,\n *   !proto.pactus.GetTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetTransactionRequest,\n  proto.pactus.GetTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.CalculateFeeRequest,\n *   !proto.pactus.CalculateFeeResponse>}\n */\nconst methodDescriptor_Transaction_CalculateFee = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/CalculateFee',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.CalculateFeeRequest,\n  proto.pactus.CalculateFeeResponse,\n  /**\n   * @param {!proto.pactus.CalculateFeeRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.CalculateFeeResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.CalculateFeeRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.CalculateFeeResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.CalculateFeeResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.calculateFee =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/CalculateFee',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_CalculateFee,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.CalculateFeeRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.CalculateFeeResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.calculateFee =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/CalculateFee',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_CalculateFee);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.BroadcastTransactionRequest,\n *   !proto.pactus.BroadcastTransactionResponse>}\n */\nconst methodDescriptor_Transaction_BroadcastTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/BroadcastTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.BroadcastTransactionRequest,\n  proto.pactus.BroadcastTransactionResponse,\n  /**\n   * @param {!proto.pactus.BroadcastTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.BroadcastTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.BroadcastTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.BroadcastTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.BroadcastTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.broadcastTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/BroadcastTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_BroadcastTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.BroadcastTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.BroadcastTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.broadcastTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/BroadcastTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_BroadcastTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetRawTransferTransactionRequest,\n *   !proto.pactus.GetRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetRawTransferTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetRawTransferTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetRawTransferTransactionRequest,\n  proto.pactus.GetRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetRawTransferTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetRawTransferTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getRawTransferTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetRawTransferTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawTransferTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetRawTransferTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getRawTransferTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetRawTransferTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawTransferTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetRawBondTransactionRequest,\n *   !proto.pactus.GetRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetRawBondTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetRawBondTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetRawBondTransactionRequest,\n  proto.pactus.GetRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetRawBondTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetRawBondTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getRawBondTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetRawBondTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawBondTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetRawBondTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getRawBondTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetRawBondTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawBondTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetRawUnbondTransactionRequest,\n *   !proto.pactus.GetRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetRawUnbondTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetRawUnbondTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetRawUnbondTransactionRequest,\n  proto.pactus.GetRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetRawUnbondTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetRawUnbondTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getRawUnbondTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetRawUnbondTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawUnbondTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetRawUnbondTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getRawUnbondTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetRawUnbondTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawUnbondTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetRawWithdrawTransactionRequest,\n *   !proto.pactus.GetRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetRawWithdrawTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetRawWithdrawTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetRawWithdrawTransactionRequest,\n  proto.pactus.GetRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetRawWithdrawTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetRawWithdrawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getRawWithdrawTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetRawWithdrawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawWithdrawTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetRawWithdrawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getRawWithdrawTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetRawWithdrawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawWithdrawTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetRawBatchTransferTransactionRequest,\n *   !proto.pactus.GetRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_GetRawBatchTransferTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/GetRawBatchTransferTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetRawBatchTransferTransactionRequest,\n  proto.pactus.GetRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.getRawBatchTransferTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/GetRawBatchTransferTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawBatchTransferTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.getRawBatchTransferTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/GetRawBatchTransferTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_GetRawBatchTransferTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.DecodeRawTransactionRequest,\n *   !proto.pactus.DecodeRawTransactionResponse>}\n */\nconst methodDescriptor_Transaction_DecodeRawTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/DecodeRawTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.DecodeRawTransactionRequest,\n  proto.pactus.DecodeRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.DecodeRawTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.DecodeRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.DecodeRawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.DecodeRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.DecodeRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.decodeRawTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/DecodeRawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_DecodeRawTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.DecodeRawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.DecodeRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.decodeRawTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/DecodeRawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_DecodeRawTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.CheckTransactionRequest,\n *   !proto.pactus.CheckTransactionResponse>}\n */\nconst methodDescriptor_Transaction_CheckTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Transaction/CheckTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.CheckTransactionRequest,\n  proto.pactus.CheckTransactionResponse,\n  /**\n   * @param {!proto.pactus.CheckTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.CheckTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.CheckTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.CheckTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.CheckTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.TransactionClient.prototype.checkTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Transaction/CheckTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_CheckTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.CheckTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.CheckTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.TransactionPromiseClient.prototype.checkTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Transaction/CheckTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Transaction_CheckTransaction);\n};\n\n\nmodule.exports = proto.pactus;\n\n"
  },
  {
    "path": "www/grpc/gen/js/transaction_pb.js",
    "content": "// source: transaction.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = globalThis;\n\ngoog.exportSymbol('proto.pactus.BroadcastTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.BroadcastTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.CalculateFeeRequest', null, global);\ngoog.exportSymbol('proto.pactus.CalculateFeeResponse', null, global);\ngoog.exportSymbol('proto.pactus.CheckTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.CheckTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.DecodeRawTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.DecodeRawTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetRawBatchTransferTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetRawBondTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetRawTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetRawTransferTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetRawUnbondTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetRawWithdrawTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.PayloadBatchTransfer', null, global);\ngoog.exportSymbol('proto.pactus.PayloadBond', null, global);\ngoog.exportSymbol('proto.pactus.PayloadSortition', null, global);\ngoog.exportSymbol('proto.pactus.PayloadTransfer', null, global);\ngoog.exportSymbol('proto.pactus.PayloadType', null, global);\ngoog.exportSymbol('proto.pactus.PayloadUnbond', null, global);\ngoog.exportSymbol('proto.pactus.PayloadWithdraw', null, global);\ngoog.exportSymbol('proto.pactus.Recipient', null, global);\ngoog.exportSymbol('proto.pactus.TransactionInfo', null, global);\ngoog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global);\ngoog.exportSymbol('proto.pactus.TransactionVerbosity', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTransactionRequest.displayName = 'proto.pactus.GetTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTransactionResponse.displayName = 'proto.pactus.GetTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CalculateFeeRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CalculateFeeRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CalculateFeeRequest.displayName = 'proto.pactus.CalculateFeeRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CalculateFeeResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CalculateFeeResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CalculateFeeResponse.displayName = 'proto.pactus.CalculateFeeResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.BroadcastTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.BroadcastTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.BroadcastTransactionRequest.displayName = 'proto.pactus.BroadcastTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.BroadcastTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.BroadcastTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.BroadcastTransactionResponse.displayName = 'proto.pactus.BroadcastTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawTransferTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetRawTransferTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawTransferTransactionRequest.displayName = 'proto.pactus.GetRawTransferTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawBondTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetRawBondTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawBondTransactionRequest.displayName = 'proto.pactus.GetRawBondTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawUnbondTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetRawUnbondTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawUnbondTransactionRequest.displayName = 'proto.pactus.GetRawUnbondTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawWithdrawTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetRawWithdrawTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawWithdrawTransactionRequest.displayName = 'proto.pactus.GetRawWithdrawTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawBatchTransferTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetRawBatchTransferTransactionRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.GetRawBatchTransferTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawBatchTransferTransactionRequest.displayName = 'proto.pactus.GetRawBatchTransferTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetRawTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetRawTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetRawTransactionResponse.displayName = 'proto.pactus.GetRawTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadTransfer = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PayloadTransfer, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadTransfer.displayName = 'proto.pactus.PayloadTransfer';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadBond = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PayloadBond, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadBond.displayName = 'proto.pactus.PayloadBond';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadSortition = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PayloadSortition, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadSortition.displayName = 'proto.pactus.PayloadSortition';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadUnbond = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PayloadUnbond, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadUnbond.displayName = 'proto.pactus.PayloadUnbond';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadWithdraw = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PayloadWithdraw, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadWithdraw.displayName = 'proto.pactus.PayloadWithdraw';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PayloadBatchTransfer = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.PayloadBatchTransfer.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.PayloadBatchTransfer, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PayloadBatchTransfer.displayName = 'proto.pactus.PayloadBatchTransfer';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.Recipient = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.Recipient, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.Recipient.displayName = 'proto.pactus.Recipient';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.TransactionInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.pactus.TransactionInfo.oneofGroups_);\n};\ngoog.inherits(proto.pactus.TransactionInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.TransactionInfo.displayName = 'proto.pactus.TransactionInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.DecodeRawTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.DecodeRawTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.DecodeRawTransactionRequest.displayName = 'proto.pactus.DecodeRawTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.DecodeRawTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.DecodeRawTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.DecodeRawTransactionResponse.displayName = 'proto.pactus.DecodeRawTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CheckTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CheckTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CheckTransactionRequest.displayName = 'proto.pactus.CheckTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CheckTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CheckTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CheckTransactionResponse.displayName = 'proto.pactus.CheckTransactionResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nid: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nverbosity: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTransactionRequest}\n */\nproto.pactus.GetTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTransactionRequest;\n  return proto.pactus.GetTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTransactionRequest}\n */\nproto.pactus.GetTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.pactus.TransactionVerbosity} */ (reader.readEnum());\n      msg.setVerbosity(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getVerbosity();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string id = 1;\n * @return {string}\n */\nproto.pactus.GetTransactionRequest.prototype.getId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetTransactionRequest} returns this\n */\nproto.pactus.GetTransactionRequest.prototype.setId = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional TransactionVerbosity verbosity = 2;\n * @return {!proto.pactus.TransactionVerbosity}\n */\nproto.pactus.GetTransactionRequest.prototype.getVerbosity = function() {\n  return /** @type {!proto.pactus.TransactionVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.pactus.TransactionVerbosity} value\n * @return {!proto.pactus.GetTransactionRequest} returns this\n */\nproto.pactus.GetTransactionRequest.prototype.setVerbosity = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nblockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),\nblockTime: jspb.Message.getFieldWithDefault(msg, 2, 0),\ntransaction: (f = msg.getTransaction()) && proto.pactus.TransactionInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTransactionResponse}\n */\nproto.pactus.GetTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTransactionResponse;\n  return proto.pactus.GetTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTransactionResponse}\n */\nproto.pactus.GetTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setBlockHeight(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setBlockTime(value);\n      break;\n    case 3:\n      var value = new proto.pactus.TransactionInfo;\n      reader.readMessage(value,proto.pactus.TransactionInfo.deserializeBinaryFromReader);\n      msg.setTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getBlockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      2,\n      f\n    );\n  }\n  f = message.getTransaction();\n  if (f != null) {\n    writer.writeMessage(\n      3,\n      f,\n      proto.pactus.TransactionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional uint32 block_height = 1;\n * @return {number}\n */\nproto.pactus.GetTransactionResponse.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetTransactionResponse} returns this\n */\nproto.pactus.GetTransactionResponse.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional uint32 block_time = 2;\n * @return {number}\n */\nproto.pactus.GetTransactionResponse.prototype.getBlockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetTransactionResponse} returns this\n */\nproto.pactus.GetTransactionResponse.prototype.setBlockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional TransactionInfo transaction = 3;\n * @return {?proto.pactus.TransactionInfo}\n */\nproto.pactus.GetTransactionResponse.prototype.getTransaction = function() {\n  return /** @type{?proto.pactus.TransactionInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.TransactionInfo, 3));\n};\n\n\n/**\n * @param {?proto.pactus.TransactionInfo|undefined} value\n * @return {!proto.pactus.GetTransactionResponse} returns this\n*/\nproto.pactus.GetTransactionResponse.prototype.setTransaction = function(value) {\n  return jspb.Message.setWrapperField(this, 3, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetTransactionResponse} returns this\n */\nproto.pactus.GetTransactionResponse.prototype.clearTransaction = function() {\n  return this.setTransaction(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetTransactionResponse.prototype.hasTransaction = function() {\n  return jspb.Message.getField(this, 3) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CalculateFeeRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CalculateFeeRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CalculateFeeRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CalculateFeeRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\namount: jspb.Message.getFieldWithDefault(msg, 1, 0),\npayloadType: jspb.Message.getFieldWithDefault(msg, 2, 0),\nfixedAmount: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CalculateFeeRequest}\n */\nproto.pactus.CalculateFeeRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CalculateFeeRequest;\n  return proto.pactus.CalculateFeeRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CalculateFeeRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CalculateFeeRequest}\n */\nproto.pactus.CalculateFeeRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum());\n      msg.setPayloadType(value);\n      break;\n    case 3:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setFixedAmount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CalculateFeeRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CalculateFeeRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CalculateFeeRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CalculateFeeRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      1,\n      f\n    );\n  }\n  f = message.getPayloadType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getFixedAmount();\n  if (f) {\n    writer.writeBool(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int64 amount = 1;\n * @return {number}\n */\nproto.pactus.CalculateFeeRequest.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CalculateFeeRequest} returns this\n */\nproto.pactus.CalculateFeeRequest.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional PayloadType payload_type = 2;\n * @return {!proto.pactus.PayloadType}\n */\nproto.pactus.CalculateFeeRequest.prototype.getPayloadType = function() {\n  return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.pactus.PayloadType} value\n * @return {!proto.pactus.CalculateFeeRequest} returns this\n */\nproto.pactus.CalculateFeeRequest.prototype.setPayloadType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional bool fixed_amount = 3;\n * @return {boolean}\n */\nproto.pactus.CalculateFeeRequest.prototype.getFixedAmount = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.CalculateFeeRequest} returns this\n */\nproto.pactus.CalculateFeeRequest.prototype.setFixedAmount = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CalculateFeeResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CalculateFeeResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CalculateFeeResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CalculateFeeResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\namount: jspb.Message.getFieldWithDefault(msg, 1, 0),\nfee: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CalculateFeeResponse}\n */\nproto.pactus.CalculateFeeResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CalculateFeeResponse;\n  return proto.pactus.CalculateFeeResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CalculateFeeResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CalculateFeeResponse}\n */\nproto.pactus.CalculateFeeResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CalculateFeeResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CalculateFeeResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CalculateFeeResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CalculateFeeResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      1,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int64 amount = 1;\n * @return {number}\n */\nproto.pactus.CalculateFeeResponse.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CalculateFeeResponse} returns this\n */\nproto.pactus.CalculateFeeResponse.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional int64 fee = 2;\n * @return {number}\n */\nproto.pactus.CalculateFeeResponse.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.CalculateFeeResponse} returns this\n */\nproto.pactus.CalculateFeeResponse.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.BroadcastTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.BroadcastTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.BroadcastTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BroadcastTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsignedRawTransaction: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.BroadcastTransactionRequest}\n */\nproto.pactus.BroadcastTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.BroadcastTransactionRequest;\n  return proto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.BroadcastTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.BroadcastTransactionRequest}\n */\nproto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignedRawTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.BroadcastTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.BroadcastTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSignedRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string signed_raw_transaction = 1;\n * @return {string}\n */\nproto.pactus.BroadcastTransactionRequest.prototype.getSignedRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BroadcastTransactionRequest} returns this\n */\nproto.pactus.BroadcastTransactionRequest.prototype.setSignedRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.BroadcastTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.BroadcastTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.BroadcastTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BroadcastTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nid: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.BroadcastTransactionResponse}\n */\nproto.pactus.BroadcastTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.BroadcastTransactionResponse;\n  return proto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.BroadcastTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.BroadcastTransactionResponse}\n */\nproto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.BroadcastTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.BroadcastTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string id = 1;\n * @return {string}\n */\nproto.pactus.BroadcastTransactionResponse.prototype.getId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.BroadcastTransactionResponse} returns this\n */\nproto.pactus.BroadcastTransactionResponse.prototype.setId = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawTransferTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawTransferTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlockTime: jspb.Message.getFieldWithDefault(msg, 1, 0),\nsender: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nreceiver: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 4, 0),\nfee: jspb.Message.getFieldWithDefault(msg, 5, 0),\nmemo: jspb.Message.getFieldWithDefault(msg, 6, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawTransferTransactionRequest}\n */\nproto.pactus.GetRawTransferTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawTransferTransactionRequest;\n  return proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawTransferTransactionRequest}\n */\nproto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 6:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawTransferTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      4,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      5,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      6,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 lock_time = 1;\n * @return {number}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string sender = 2;\n * @return {string}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string receiver = 3;\n * @return {string}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional int64 amount = 4;\n * @return {number}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int64 fee = 5;\n * @return {number}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional string memo = 6;\n * @return {string}\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawTransferTransactionRequest.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 6, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawBondTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawBondTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawBondTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlockTime: jspb.Message.getFieldWithDefault(msg, 1, 0),\nsender: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nreceiver: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nstake: jspb.Message.getFieldWithDefault(msg, 4, 0),\npublicKey: jspb.Message.getFieldWithDefault(msg, 5, \"\"),\nfee: jspb.Message.getFieldWithDefault(msg, 6, 0),\nmemo: jspb.Message.getFieldWithDefault(msg, 7, \"\"),\ndelegateOwner: jspb.Message.getFieldWithDefault(msg, 8, \"\"),\ndelegateShare: jspb.Message.getFieldWithDefault(msg, 9, 0),\ndelegateExpiry: jspb.Message.getFieldWithDefault(msg, 10, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawBondTransactionRequest}\n */\nproto.pactus.GetRawBondTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawBondTransactionRequest;\n  return proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawBondTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawBondTransactionRequest}\n */\nproto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setStake(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 7:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDelegateOwner(value);\n      break;\n    case 9:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setDelegateShare(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setDelegateExpiry(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawBondTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getStake();\n  if (f !== 0) {\n    writer.writeInt64(\n      4,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      6,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      7,\n      f\n    );\n  }\n  f = message.getDelegateOwner();\n  if (f.length > 0) {\n    writer.writeString(\n      8,\n      f\n    );\n  }\n  f = message.getDelegateShare();\n  if (f !== 0) {\n    writer.writeInt64(\n      9,\n      f\n    );\n  }\n  f = message.getDelegateExpiry();\n  if (f !== 0) {\n    writer.writeUint32(\n      10,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 lock_time = 1;\n * @return {number}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string sender = 2;\n * @return {string}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string receiver = 3;\n * @return {string}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional int64 stake = 4;\n * @return {number}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getStake = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setStake = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional string public_key = 5;\n * @return {string}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n/**\n * optional int64 fee = 6;\n * @return {number}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional string memo = 7;\n * @return {string}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 7, value);\n};\n\n\n/**\n * optional string delegate_owner = 8;\n * @return {string}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getDelegateOwner = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setDelegateOwner = function(value) {\n  return jspb.Message.setProto3StringField(this, 8, value);\n};\n\n\n/**\n * optional int64 delegate_share = 9;\n * @return {number}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getDelegateShare = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setDelegateShare = function(value) {\n  return jspb.Message.setProto3IntField(this, 9, value);\n};\n\n\n/**\n * optional uint32 delegate_expiry = 10;\n * @return {number}\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.getDelegateExpiry = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBondTransactionRequest} returns this\n */\nproto.pactus.GetRawBondTransactionRequest.prototype.setDelegateExpiry = function(value) {\n  return jspb.Message.setProto3IntField(this, 10, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawUnbondTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawUnbondTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlockTime: jspb.Message.getFieldWithDefault(msg, 1, 0),\nvalidatorAddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nmemo: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\ndelegateOwner: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawUnbondTransactionRequest}\n */\nproto.pactus.GetRawUnbondTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawUnbondTransactionRequest;\n  return proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawUnbondTransactionRequest}\n */\nproto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setValidatorAddress(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDelegateOwner(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawUnbondTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getValidatorAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getDelegateOwner();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 lock_time = 1;\n * @return {number}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string validator_address = 2;\n * @return {string}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.getValidatorAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.setValidatorAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string memo = 3;\n * @return {string}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string delegate_owner = 4;\n * @return {string}\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.getDelegateOwner = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this\n */\nproto.pactus.GetRawUnbondTransactionRequest.prototype.setDelegateOwner = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawWithdrawTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawWithdrawTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlockTime: jspb.Message.getFieldWithDefault(msg, 1, 0),\nvalidatorAddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\naccountAddress: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 4, 0),\nfee: jspb.Message.getFieldWithDefault(msg, 5, 0),\nmemo: jspb.Message.getFieldWithDefault(msg, 6, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawWithdrawTransactionRequest;\n  return proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setValidatorAddress(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAccountAddress(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 6:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawWithdrawTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getValidatorAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAccountAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      4,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      5,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      6,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 lock_time = 1;\n * @return {number}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string validator_address = 2;\n * @return {string}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getValidatorAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setValidatorAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string account_address = 3;\n * @return {string}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getAccountAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setAccountAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional int64 amount = 4;\n * @return {number}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int64 fee = 5;\n * @return {number}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional string memo = 6;\n * @return {string}\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this\n */\nproto.pactus.GetRawWithdrawTransactionRequest.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 6, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.repeatedFields_ = [3];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawBatchTransferTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nlockTime: jspb.Message.getFieldWithDefault(msg, 1, 0),\nsender: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nrecipientsList: jspb.Message.toObjectList(msg.getRecipientsList(),\n    proto.pactus.Recipient.toObject, includeInstance),\nfee: jspb.Message.getFieldWithDefault(msg, 4, 0),\nmemo: jspb.Message.getFieldWithDefault(msg, 5, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawBatchTransferTransactionRequest;\n  return proto.pactus.GetRawBatchTransferTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 3:\n      var value = new proto.pactus.Recipient;\n      reader.readMessage(value,proto.pactus.Recipient.deserializeBinaryFromReader);\n      msg.addRecipients(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawBatchTransferTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawBatchTransferTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      1,\n      f\n    );\n  }\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getRecipientsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      3,\n      f,\n      proto.pactus.Recipient.serializeBinaryToWriter\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      4,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional uint32 lock_time = 1;\n * @return {number}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string sender = 2;\n * @return {string}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * repeated Recipient recipients = 3;\n * @return {!Array<!proto.pactus.Recipient>}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.getRecipientsList = function() {\n  return /** @type{!Array<!proto.pactus.Recipient>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.Recipient, 3));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.Recipient>} value\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n*/\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.setRecipientsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 3, value);\n};\n\n\n/**\n * @param {!proto.pactus.Recipient=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.Recipient}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.addRecipients = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.pactus.Recipient, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.clearRecipientsList = function() {\n  return this.setRecipientsList([]);\n};\n\n\n/**\n * optional int64 fee = 4;\n * @return {number}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional string memo = 5;\n * @return {string}\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawBatchTransferTransactionRequest} returns this\n */\nproto.pactus.GetRawBatchTransferTransactionRequest.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetRawTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetRawTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nrawTransaction: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nid: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetRawTransactionResponse}\n */\nproto.pactus.GetRawTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetRawTransactionResponse;\n  return proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetRawTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetRawTransactionResponse}\n */\nproto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setRawTransaction(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setId(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetRawTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetRawTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getId();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string raw_transaction = 1;\n * @return {string}\n */\nproto.pactus.GetRawTransactionResponse.prototype.getRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawTransactionResponse} returns this\n */\nproto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string id = 2;\n * @return {string}\n */\nproto.pactus.GetRawTransactionResponse.prototype.getId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetRawTransactionResponse} returns this\n */\nproto.pactus.GetRawTransactionResponse.prototype.setId = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadTransfer.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadTransfer.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadTransfer} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsender: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nreceiver: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadTransfer}\n */\nproto.pactus.PayloadTransfer.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadTransfer;\n  return proto.pactus.PayloadTransfer.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadTransfer} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadTransfer}\n */\nproto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadTransfer.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadTransfer.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadTransfer} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string sender = 1;\n * @return {string}\n */\nproto.pactus.PayloadTransfer.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadTransfer} returns this\n */\nproto.pactus.PayloadTransfer.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string receiver = 2;\n * @return {string}\n */\nproto.pactus.PayloadTransfer.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadTransfer} returns this\n */\nproto.pactus.PayloadTransfer.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int64 amount = 3;\n * @return {number}\n */\nproto.pactus.PayloadTransfer.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PayloadTransfer} returns this\n */\nproto.pactus.PayloadTransfer.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadBond.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadBond.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadBond} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadBond.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsender: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nreceiver: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nstake: jspb.Message.getFieldWithDefault(msg, 3, 0),\npublicKey: jspb.Message.getFieldWithDefault(msg, 4, \"\"),\nisDelegated: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),\ndelegateOwner: jspb.Message.getFieldWithDefault(msg, 6, \"\"),\ndelegateShare: jspb.Message.getFieldWithDefault(msg, 7, 0),\ndelegateExpiry: jspb.Message.getFieldWithDefault(msg, 8, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadBond}\n */\nproto.pactus.PayloadBond.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadBond;\n  return proto.pactus.PayloadBond.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadBond} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadBond}\n */\nproto.pactus.PayloadBond.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setStake(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 5:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsDelegated(value);\n      break;\n    case 6:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDelegateOwner(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setDelegateShare(value);\n      break;\n    case 8:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setDelegateExpiry(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadBond.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadBond.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadBond} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getStake();\n  if (f !== 0) {\n    writer.writeInt64(\n      3,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n  f = message.getIsDelegated();\n  if (f) {\n    writer.writeBool(\n      5,\n      f\n    );\n  }\n  f = message.getDelegateOwner();\n  if (f.length > 0) {\n    writer.writeString(\n      6,\n      f\n    );\n  }\n  f = message.getDelegateShare();\n  if (f !== 0) {\n    writer.writeInt64(\n      7,\n      f\n    );\n  }\n  f = message.getDelegateExpiry();\n  if (f !== 0) {\n    writer.writeUint32(\n      8,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string sender = 1;\n * @return {string}\n */\nproto.pactus.PayloadBond.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string receiver = 2;\n * @return {string}\n */\nproto.pactus.PayloadBond.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int64 stake = 3;\n * @return {number}\n */\nproto.pactus.PayloadBond.prototype.getStake = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setStake = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional string public_key = 4;\n * @return {string}\n */\nproto.pactus.PayloadBond.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n/**\n * optional bool is_delegated = 5;\n * @return {boolean}\n */\nproto.pactus.PayloadBond.prototype.getIsDelegated = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setIsDelegated = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 5, value);\n};\n\n\n/**\n * optional string delegate_owner = 6;\n * @return {string}\n */\nproto.pactus.PayloadBond.prototype.getDelegateOwner = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setDelegateOwner = function(value) {\n  return jspb.Message.setProto3StringField(this, 6, value);\n};\n\n\n/**\n * optional int64 delegate_share = 7;\n * @return {number}\n */\nproto.pactus.PayloadBond.prototype.getDelegateShare = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setDelegateShare = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional uint32 delegate_expiry = 8;\n * @return {number}\n */\nproto.pactus.PayloadBond.prototype.getDelegateExpiry = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PayloadBond} returns this\n */\nproto.pactus.PayloadBond.prototype.setDelegateExpiry = function(value) {\n  return jspb.Message.setProto3IntField(this, 8, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadSortition.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadSortition.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadSortition} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadSortition.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nproof: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadSortition}\n */\nproto.pactus.PayloadSortition.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadSortition;\n  return proto.pactus.PayloadSortition.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadSortition} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadSortition}\n */\nproto.pactus.PayloadSortition.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setProof(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadSortition.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadSortition.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadSortition} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadSortition.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getProof();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.PayloadSortition.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadSortition} returns this\n */\nproto.pactus.PayloadSortition.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string proof = 2;\n * @return {string}\n */\nproto.pactus.PayloadSortition.prototype.getProof = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadSortition} returns this\n */\nproto.pactus.PayloadSortition.prototype.setProof = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadUnbond.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadUnbond.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadUnbond} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadUnbond.toObject = function(includeInstance, msg) {\n  var f, obj = {\nvalidator: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ndelegateOwner: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadUnbond}\n */\nproto.pactus.PayloadUnbond.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadUnbond;\n  return proto.pactus.PayloadUnbond.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadUnbond} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadUnbond}\n */\nproto.pactus.PayloadUnbond.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setValidator(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDelegateOwner(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadUnbond.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadUnbond.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadUnbond} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadUnbond.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValidator();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getDelegateOwner();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string validator = 1;\n * @return {string}\n */\nproto.pactus.PayloadUnbond.prototype.getValidator = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadUnbond} returns this\n */\nproto.pactus.PayloadUnbond.prototype.setValidator = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string delegate_owner = 2;\n * @return {string}\n */\nproto.pactus.PayloadUnbond.prototype.getDelegateOwner = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadUnbond} returns this\n */\nproto.pactus.PayloadUnbond.prototype.setDelegateOwner = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadWithdraw.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadWithdraw.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadWithdraw} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadWithdraw.toObject = function(includeInstance, msg) {\n  var f, obj = {\nvalidatorAddress: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naccountAddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 3, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadWithdraw}\n */\nproto.pactus.PayloadWithdraw.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadWithdraw;\n  return proto.pactus.PayloadWithdraw.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadWithdraw} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadWithdraw}\n */\nproto.pactus.PayloadWithdraw.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setValidatorAddress(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAccountAddress(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadWithdraw.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadWithdraw.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadWithdraw} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getValidatorAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAccountAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string validator_address = 1;\n * @return {string}\n */\nproto.pactus.PayloadWithdraw.prototype.getValidatorAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadWithdraw} returns this\n */\nproto.pactus.PayloadWithdraw.prototype.setValidatorAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string account_address = 2;\n * @return {string}\n */\nproto.pactus.PayloadWithdraw.prototype.getAccountAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadWithdraw} returns this\n */\nproto.pactus.PayloadWithdraw.prototype.setAccountAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int64 amount = 3;\n * @return {number}\n */\nproto.pactus.PayloadWithdraw.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.PayloadWithdraw} returns this\n */\nproto.pactus.PayloadWithdraw.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.PayloadBatchTransfer.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PayloadBatchTransfer.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PayloadBatchTransfer.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PayloadBatchTransfer} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadBatchTransfer.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsender: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nrecipientsList: jspb.Message.toObjectList(msg.getRecipientsList(),\n    proto.pactus.Recipient.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PayloadBatchTransfer}\n */\nproto.pactus.PayloadBatchTransfer.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PayloadBatchTransfer;\n  return proto.pactus.PayloadBatchTransfer.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PayloadBatchTransfer} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PayloadBatchTransfer}\n */\nproto.pactus.PayloadBatchTransfer.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 2:\n      var value = new proto.pactus.Recipient;\n      reader.readMessage(value,proto.pactus.Recipient.deserializeBinaryFromReader);\n      msg.addRecipients(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PayloadBatchTransfer.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PayloadBatchTransfer.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PayloadBatchTransfer} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PayloadBatchTransfer.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getRecipientsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      proto.pactus.Recipient.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string sender = 1;\n * @return {string}\n */\nproto.pactus.PayloadBatchTransfer.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PayloadBatchTransfer} returns this\n */\nproto.pactus.PayloadBatchTransfer.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated Recipient recipients = 2;\n * @return {!Array<!proto.pactus.Recipient>}\n */\nproto.pactus.PayloadBatchTransfer.prototype.getRecipientsList = function() {\n  return /** @type{!Array<!proto.pactus.Recipient>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.Recipient, 2));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.Recipient>} value\n * @return {!proto.pactus.PayloadBatchTransfer} returns this\n*/\nproto.pactus.PayloadBatchTransfer.prototype.setRecipientsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.pactus.Recipient=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.Recipient}\n */\nproto.pactus.PayloadBatchTransfer.prototype.addRecipients = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.Recipient, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.PayloadBatchTransfer} returns this\n */\nproto.pactus.PayloadBatchTransfer.prototype.clearRecipientsList = function() {\n  return this.setRecipientsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.Recipient.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.Recipient.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.Recipient} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.Recipient.toObject = function(includeInstance, msg) {\n  var f, obj = {\nreceiver: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.Recipient}\n */\nproto.pactus.Recipient.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.Recipient;\n  return proto.pactus.Recipient.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.Recipient} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.Recipient}\n */\nproto.pactus.Recipient.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.Recipient.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.Recipient.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.Recipient} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.Recipient.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string receiver = 1;\n * @return {string}\n */\nproto.pactus.Recipient.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.Recipient} returns this\n */\nproto.pactus.Recipient.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int64 amount = 2;\n * @return {number}\n */\nproto.pactus.Recipient.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.Recipient} returns this\n */\nproto.pactus.Recipient.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n/**\n * Oneof group definitions for this message. Each group defines the field\n * numbers belonging to that group. When of these fields' value is set, all\n * other fields in the group are cleared. During deserialization, if multiple\n * fields are encountered for a group, only the last value seen will be kept.\n * @private {!Array<!Array<number>>}\n * @const\n */\nproto.pactus.TransactionInfo.oneofGroups_ = [[30,31,32,33,34,35]];\n\n/**\n * @enum {number}\n */\nproto.pactus.TransactionInfo.PayloadCase = {\n  PAYLOAD_NOT_SET: 0,\n  TRANSFER: 30,\n  BOND: 31,\n  SORTITION: 32,\n  UNBOND: 33,\n  WITHDRAW: 34,\n  BATCH_TRANSFER: 35\n};\n\n/**\n * @return {proto.pactus.TransactionInfo.PayloadCase}\n */\nproto.pactus.TransactionInfo.prototype.getPayloadCase = function() {\n  return /** @type {proto.pactus.TransactionInfo.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.pactus.TransactionInfo.oneofGroups_[0]));\n};\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.TransactionInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.TransactionInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.TransactionInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.TransactionInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nid: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ndata: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nversion: jspb.Message.getFieldWithDefault(msg, 3, 0),\nlockTime: jspb.Message.getFieldWithDefault(msg, 4, 0),\nvalue: jspb.Message.getFieldWithDefault(msg, 5, 0),\nfee: jspb.Message.getFieldWithDefault(msg, 6, 0),\npayloadType: jspb.Message.getFieldWithDefault(msg, 7, 0),\ntransfer: (f = msg.getTransfer()) && proto.pactus.PayloadTransfer.toObject(includeInstance, f),\nbond: (f = msg.getBond()) && proto.pactus.PayloadBond.toObject(includeInstance, f),\nsortition: (f = msg.getSortition()) && proto.pactus.PayloadSortition.toObject(includeInstance, f),\nunbond: (f = msg.getUnbond()) && proto.pactus.PayloadUnbond.toObject(includeInstance, f),\nwithdraw: (f = msg.getWithdraw()) && proto.pactus.PayloadWithdraw.toObject(includeInstance, f),\nbatchTransfer: (f = msg.getBatchTransfer()) && proto.pactus.PayloadBatchTransfer.toObject(includeInstance, f),\nmemo: jspb.Message.getFieldWithDefault(msg, 8, \"\"),\npublicKey: jspb.Message.getFieldWithDefault(msg, 9, \"\"),\nsignature: jspb.Message.getFieldWithDefault(msg, 10, \"\"),\nblockHeight: jspb.Message.getFieldWithDefault(msg, 11, 0),\nconfirmed: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),\nconfirmations: jspb.Message.getFieldWithDefault(msg, 13, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.TransactionInfo}\n */\nproto.pactus.TransactionInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.TransactionInfo;\n  return proto.pactus.TransactionInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.TransactionInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.TransactionInfo}\n */\nproto.pactus.TransactionInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setId(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setData(value);\n      break;\n    case 3:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setVersion(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setLockTime(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setValue(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 7:\n      var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum());\n      msg.setPayloadType(value);\n      break;\n    case 30:\n      var value = new proto.pactus.PayloadTransfer;\n      reader.readMessage(value,proto.pactus.PayloadTransfer.deserializeBinaryFromReader);\n      msg.setTransfer(value);\n      break;\n    case 31:\n      var value = new proto.pactus.PayloadBond;\n      reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader);\n      msg.setBond(value);\n      break;\n    case 32:\n      var value = new proto.pactus.PayloadSortition;\n      reader.readMessage(value,proto.pactus.PayloadSortition.deserializeBinaryFromReader);\n      msg.setSortition(value);\n      break;\n    case 33:\n      var value = new proto.pactus.PayloadUnbond;\n      reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader);\n      msg.setUnbond(value);\n      break;\n    case 34:\n      var value = new proto.pactus.PayloadWithdraw;\n      reader.readMessage(value,proto.pactus.PayloadWithdraw.deserializeBinaryFromReader);\n      msg.setWithdraw(value);\n      break;\n    case 35:\n      var value = new proto.pactus.PayloadBatchTransfer;\n      reader.readMessage(value,proto.pactus.PayloadBatchTransfer.deserializeBinaryFromReader);\n      msg.setBatchTransfer(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    case 9:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 10:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    case 11:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setBlockHeight(value);\n      break;\n    case 12:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setConfirmed(value);\n      break;\n    case 13:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setConfirmations(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.TransactionInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.TransactionInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.TransactionInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.TransactionInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getId();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getData();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getVersion();\n  if (f !== 0) {\n    writer.writeInt32(\n      3,\n      f\n    );\n  }\n  f = message.getLockTime();\n  if (f !== 0) {\n    writer.writeUint32(\n      4,\n      f\n    );\n  }\n  f = message.getValue();\n  if (f !== 0) {\n    writer.writeInt64(\n      5,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      6,\n      f\n    );\n  }\n  f = message.getPayloadType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      7,\n      f\n    );\n  }\n  f = message.getTransfer();\n  if (f != null) {\n    writer.writeMessage(\n      30,\n      f,\n      proto.pactus.PayloadTransfer.serializeBinaryToWriter\n    );\n  }\n  f = message.getBond();\n  if (f != null) {\n    writer.writeMessage(\n      31,\n      f,\n      proto.pactus.PayloadBond.serializeBinaryToWriter\n    );\n  }\n  f = message.getSortition();\n  if (f != null) {\n    writer.writeMessage(\n      32,\n      f,\n      proto.pactus.PayloadSortition.serializeBinaryToWriter\n    );\n  }\n  f = message.getUnbond();\n  if (f != null) {\n    writer.writeMessage(\n      33,\n      f,\n      proto.pactus.PayloadUnbond.serializeBinaryToWriter\n    );\n  }\n  f = message.getWithdraw();\n  if (f != null) {\n    writer.writeMessage(\n      34,\n      f,\n      proto.pactus.PayloadWithdraw.serializeBinaryToWriter\n    );\n  }\n  f = message.getBatchTransfer();\n  if (f != null) {\n    writer.writeMessage(\n      35,\n      f,\n      proto.pactus.PayloadBatchTransfer.serializeBinaryToWriter\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      8,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      9,\n      f\n    );\n  }\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      10,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      11,\n      f\n    );\n  }\n  f = message.getConfirmed();\n  if (f) {\n    writer.writeBool(\n      12,\n      f\n    );\n  }\n  f = message.getConfirmations();\n  if (f !== 0) {\n    writer.writeInt32(\n      13,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string id = 1;\n * @return {string}\n */\nproto.pactus.TransactionInfo.prototype.getId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setId = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string data = 2;\n * @return {string}\n */\nproto.pactus.TransactionInfo.prototype.getData = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setData = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional int32 version = 3;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getVersion = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setVersion = function(value) {\n  return jspb.Message.setProto3IntField(this, 3, value);\n};\n\n\n/**\n * optional uint32 lock_time = 4;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getLockTime = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setLockTime = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int64 value = 5;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getValue = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setValue = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n/**\n * optional int64 fee = 6;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional PayloadType payload_type = 7;\n * @return {!proto.pactus.PayloadType}\n */\nproto.pactus.TransactionInfo.prototype.getPayloadType = function() {\n  return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {!proto.pactus.PayloadType} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setPayloadType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 7, value);\n};\n\n\n/**\n * optional PayloadTransfer transfer = 30;\n * @return {?proto.pactus.PayloadTransfer}\n */\nproto.pactus.TransactionInfo.prototype.getTransfer = function() {\n  return /** @type{?proto.pactus.PayloadTransfer} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 30));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadTransfer|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setTransfer = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 30, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearTransfer = function() {\n  return this.setTransfer(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasTransfer = function() {\n  return jspb.Message.getField(this, 30) != null;\n};\n\n\n/**\n * optional PayloadBond bond = 31;\n * @return {?proto.pactus.PayloadBond}\n */\nproto.pactus.TransactionInfo.prototype.getBond = function() {\n  return /** @type{?proto.pactus.PayloadBond} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 31));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadBond|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setBond = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 31, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearBond = function() {\n  return this.setBond(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasBond = function() {\n  return jspb.Message.getField(this, 31) != null;\n};\n\n\n/**\n * optional PayloadSortition sortition = 32;\n * @return {?proto.pactus.PayloadSortition}\n */\nproto.pactus.TransactionInfo.prototype.getSortition = function() {\n  return /** @type{?proto.pactus.PayloadSortition} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadSortition, 32));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadSortition|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setSortition = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 32, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearSortition = function() {\n  return this.setSortition(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasSortition = function() {\n  return jspb.Message.getField(this, 32) != null;\n};\n\n\n/**\n * optional PayloadUnbond unbond = 33;\n * @return {?proto.pactus.PayloadUnbond}\n */\nproto.pactus.TransactionInfo.prototype.getUnbond = function() {\n  return /** @type{?proto.pactus.PayloadUnbond} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 33));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadUnbond|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setUnbond = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 33, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearUnbond = function() {\n  return this.setUnbond(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasUnbond = function() {\n  return jspb.Message.getField(this, 33) != null;\n};\n\n\n/**\n * optional PayloadWithdraw withdraw = 34;\n * @return {?proto.pactus.PayloadWithdraw}\n */\nproto.pactus.TransactionInfo.prototype.getWithdraw = function() {\n  return /** @type{?proto.pactus.PayloadWithdraw} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 34));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadWithdraw|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setWithdraw = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 34, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearWithdraw = function() {\n  return this.setWithdraw(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasWithdraw = function() {\n  return jspb.Message.getField(this, 34) != null;\n};\n\n\n/**\n * optional PayloadBatchTransfer batch_transfer = 35;\n * @return {?proto.pactus.PayloadBatchTransfer}\n */\nproto.pactus.TransactionInfo.prototype.getBatchTransfer = function() {\n  return /** @type{?proto.pactus.PayloadBatchTransfer} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.PayloadBatchTransfer, 35));\n};\n\n\n/**\n * @param {?proto.pactus.PayloadBatchTransfer|undefined} value\n * @return {!proto.pactus.TransactionInfo} returns this\n*/\nproto.pactus.TransactionInfo.prototype.setBatchTransfer = function(value) {\n  return jspb.Message.setOneofWrapperField(this, 35, proto.pactus.TransactionInfo.oneofGroups_[0], value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.clearBatchTransfer = function() {\n  return this.setBatchTransfer(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.hasBatchTransfer = function() {\n  return jspb.Message.getField(this, 35) != null;\n};\n\n\n/**\n * optional string memo = 8;\n * @return {string}\n */\nproto.pactus.TransactionInfo.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 8, value);\n};\n\n\n/**\n * optional string public_key = 9;\n * @return {string}\n */\nproto.pactus.TransactionInfo.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 9, value);\n};\n\n\n/**\n * optional string signature = 10;\n * @return {string}\n */\nproto.pactus.TransactionInfo.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 10, value);\n};\n\n\n/**\n * optional uint32 block_height = 11;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 11, value);\n};\n\n\n/**\n * optional bool confirmed = 12;\n * @return {boolean}\n */\nproto.pactus.TransactionInfo.prototype.getConfirmed = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setConfirmed = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 12, value);\n};\n\n\n/**\n * optional int32 confirmations = 13;\n * @return {number}\n */\nproto.pactus.TransactionInfo.prototype.getConfirmations = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.TransactionInfo} returns this\n */\nproto.pactus.TransactionInfo.prototype.setConfirmations = function(value) {\n  return jspb.Message.setProto3IntField(this, 13, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.DecodeRawTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.DecodeRawTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.DecodeRawTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.DecodeRawTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nrawTransaction: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.DecodeRawTransactionRequest}\n */\nproto.pactus.DecodeRawTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.DecodeRawTransactionRequest;\n  return proto.pactus.DecodeRawTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.DecodeRawTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.DecodeRawTransactionRequest}\n */\nproto.pactus.DecodeRawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setRawTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.DecodeRawTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.DecodeRawTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.DecodeRawTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.DecodeRawTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string raw_transaction = 1;\n * @return {string}\n */\nproto.pactus.DecodeRawTransactionRequest.prototype.getRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.DecodeRawTransactionRequest} returns this\n */\nproto.pactus.DecodeRawTransactionRequest.prototype.setRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.DecodeRawTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.DecodeRawTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.DecodeRawTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.DecodeRawTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntransaction: (f = msg.getTransaction()) && proto.pactus.TransactionInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.DecodeRawTransactionResponse}\n */\nproto.pactus.DecodeRawTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.DecodeRawTransactionResponse;\n  return proto.pactus.DecodeRawTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.DecodeRawTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.DecodeRawTransactionResponse}\n */\nproto.pactus.DecodeRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = new proto.pactus.TransactionInfo;\n      reader.readMessage(value,proto.pactus.TransactionInfo.deserializeBinaryFromReader);\n      msg.setTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.DecodeRawTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.DecodeRawTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.DecodeRawTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.DecodeRawTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransaction();\n  if (f != null) {\n    writer.writeMessage(\n      1,\n      f,\n      proto.pactus.TransactionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional TransactionInfo transaction = 1;\n * @return {?proto.pactus.TransactionInfo}\n */\nproto.pactus.DecodeRawTransactionResponse.prototype.getTransaction = function() {\n  return /** @type{?proto.pactus.TransactionInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.TransactionInfo, 1));\n};\n\n\n/**\n * @param {?proto.pactus.TransactionInfo|undefined} value\n * @return {!proto.pactus.DecodeRawTransactionResponse} returns this\n*/\nproto.pactus.DecodeRawTransactionResponse.prototype.setTransaction = function(value) {\n  return jspb.Message.setWrapperField(this, 1, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.DecodeRawTransactionResponse} returns this\n */\nproto.pactus.DecodeRawTransactionResponse.prototype.clearTransaction = function() {\n  return this.setTransaction(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.DecodeRawTransactionResponse.prototype.hasTransaction = function() {\n  return jspb.Message.getField(this, 1) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CheckTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CheckTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CheckTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CheckTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nrawTransaction: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CheckTransactionRequest}\n */\nproto.pactus.CheckTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CheckTransactionRequest;\n  return proto.pactus.CheckTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CheckTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CheckTransactionRequest}\n */\nproto.pactus.CheckTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setRawTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CheckTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CheckTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CheckTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CheckTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string raw_transaction = 1;\n * @return {string}\n */\nproto.pactus.CheckTransactionRequest.prototype.getRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CheckTransactionRequest} returns this\n */\nproto.pactus.CheckTransactionRequest.prototype.setRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CheckTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CheckTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CheckTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CheckTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nisValid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),\nerrorMessage: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CheckTransactionResponse}\n */\nproto.pactus.CheckTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CheckTransactionResponse;\n  return proto.pactus.CheckTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CheckTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CheckTransactionResponse}\n */\nproto.pactus.CheckTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsValid(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setErrorMessage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CheckTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CheckTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CheckTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CheckTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIsValid();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n  f = message.getErrorMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool is_valid = 1;\n * @return {boolean}\n */\nproto.pactus.CheckTransactionResponse.prototype.getIsValid = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.CheckTransactionResponse} returns this\n */\nproto.pactus.CheckTransactionResponse.prototype.setIsValid = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n/**\n * optional string error_message = 2;\n * @return {string}\n */\nproto.pactus.CheckTransactionResponse.prototype.getErrorMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CheckTransactionResponse} returns this\n */\nproto.pactus.CheckTransactionResponse.prototype.setErrorMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * @enum {number}\n */\nproto.pactus.PayloadType = {\n  PAYLOAD_TYPE_UNSPECIFIED: 0,\n  PAYLOAD_TYPE_TRANSFER: 1,\n  PAYLOAD_TYPE_BOND: 2,\n  PAYLOAD_TYPE_SORTITION: 3,\n  PAYLOAD_TYPE_UNBOND: 4,\n  PAYLOAD_TYPE_WITHDRAW: 5,\n  PAYLOAD_TYPE_BATCH_TRANSFER: 6\n};\n\n/**\n * @enum {number}\n */\nproto.pactus.TransactionVerbosity = {\n  TRANSACTION_VERBOSITY_DATA: 0,\n  TRANSACTION_VERBOSITY_INFO: 1\n};\n\ngoog.object.extend(exports, proto.pactus);\n"
  },
  {
    "path": "www/grpc/gen/js/utils_grpc_pb.js",
    "content": "// GENERATED CODE -- DO NOT EDIT!\n\n'use strict';\nvar grpc = require('@grpc/grpc-js');\nvar utils_pb = require('./utils_pb.js');\n\nfunction serialize_pactus_PublicKeyAggregationRequest(arg) {\n  if (!(arg instanceof utils_pb.PublicKeyAggregationRequest)) {\n    throw new Error('Expected argument of type pactus.PublicKeyAggregationRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_PublicKeyAggregationRequest(buffer_arg) {\n  return utils_pb.PublicKeyAggregationRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_PublicKeyAggregationResponse(arg) {\n  if (!(arg instanceof utils_pb.PublicKeyAggregationResponse)) {\n    throw new Error('Expected argument of type pactus.PublicKeyAggregationResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_PublicKeyAggregationResponse(buffer_arg) {\n  return utils_pb.PublicKeyAggregationResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignMessageWithPrivateKeyRequest(arg) {\n  if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyRequest)) {\n    throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignMessageWithPrivateKeyRequest(buffer_arg) {\n  return utils_pb.SignMessageWithPrivateKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignMessageWithPrivateKeyResponse(arg) {\n  if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyResponse)) {\n    throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignMessageWithPrivateKeyResponse(buffer_arg) {\n  return utils_pb.SignMessageWithPrivateKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignatureAggregationRequest(arg) {\n  if (!(arg instanceof utils_pb.SignatureAggregationRequest)) {\n    throw new Error('Expected argument of type pactus.SignatureAggregationRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignatureAggregationRequest(buffer_arg) {\n  return utils_pb.SignatureAggregationRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignatureAggregationResponse(arg) {\n  if (!(arg instanceof utils_pb.SignatureAggregationResponse)) {\n    throw new Error('Expected argument of type pactus.SignatureAggregationResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignatureAggregationResponse(buffer_arg) {\n  return utils_pb.SignatureAggregationResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_VerifyMessageRequest(arg) {\n  if (!(arg instanceof utils_pb.VerifyMessageRequest)) {\n    throw new Error('Expected argument of type pactus.VerifyMessageRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_VerifyMessageRequest(buffer_arg) {\n  return utils_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_VerifyMessageResponse(arg) {\n  if (!(arg instanceof utils_pb.VerifyMessageResponse)) {\n    throw new Error('Expected argument of type pactus.VerifyMessageResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_VerifyMessageResponse(buffer_arg) {\n  return utils_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\n\n// Utils service defines RPC methods for utility functions such as message\n// signing, verification, and other cryptographic operations.\nvar UtilsService = exports.UtilsService = {\n  // SignMessageWithPrivateKey signs a message with the provided private key.\nsignMessageWithPrivateKey: {\n    path: '/pactus.Utils/SignMessageWithPrivateKey',\n    requestStream: false,\n    responseStream: false,\n    requestType: utils_pb.SignMessageWithPrivateKeyRequest,\n    responseType: utils_pb.SignMessageWithPrivateKeyResponse,\n    requestSerialize: serialize_pactus_SignMessageWithPrivateKeyRequest,\n    requestDeserialize: deserialize_pactus_SignMessageWithPrivateKeyRequest,\n    responseSerialize: serialize_pactus_SignMessageWithPrivateKeyResponse,\n    responseDeserialize: deserialize_pactus_SignMessageWithPrivateKeyResponse,\n  },\n  // VerifyMessage verifies a signature against the public key and message.\nverifyMessage: {\n    path: '/pactus.Utils/VerifyMessage',\n    requestStream: false,\n    responseStream: false,\n    requestType: utils_pb.VerifyMessageRequest,\n    responseType: utils_pb.VerifyMessageResponse,\n    requestSerialize: serialize_pactus_VerifyMessageRequest,\n    requestDeserialize: deserialize_pactus_VerifyMessageRequest,\n    responseSerialize: serialize_pactus_VerifyMessageResponse,\n    responseDeserialize: deserialize_pactus_VerifyMessageResponse,\n  },\n  // PublicKeyAggregation aggregates multiple BLS public keys into a single key.\npublicKeyAggregation: {\n    path: '/pactus.Utils/PublicKeyAggregation',\n    requestStream: false,\n    responseStream: false,\n    requestType: utils_pb.PublicKeyAggregationRequest,\n    responseType: utils_pb.PublicKeyAggregationResponse,\n    requestSerialize: serialize_pactus_PublicKeyAggregationRequest,\n    requestDeserialize: deserialize_pactus_PublicKeyAggregationRequest,\n    responseSerialize: serialize_pactus_PublicKeyAggregationResponse,\n    responseDeserialize: deserialize_pactus_PublicKeyAggregationResponse,\n  },\n  // SignatureAggregation aggregates multiple BLS signatures into a single signature.\nsignatureAggregation: {\n    path: '/pactus.Utils/SignatureAggregation',\n    requestStream: false,\n    responseStream: false,\n    requestType: utils_pb.SignatureAggregationRequest,\n    responseType: utils_pb.SignatureAggregationResponse,\n    requestSerialize: serialize_pactus_SignatureAggregationRequest,\n    requestDeserialize: deserialize_pactus_SignatureAggregationRequest,\n    responseSerialize: serialize_pactus_SignatureAggregationResponse,\n    responseDeserialize: deserialize_pactus_SignatureAggregationResponse,\n  },\n};\n\nexports.UtilsClient = grpc.makeGenericClientConstructor(UtilsService, 'Utils');\n"
  },
  {
    "path": "www/grpc/gen/js/utils_grpc_web_pb.js",
    "content": "/**\n * @fileoverview gRPC-Web generated client stub for pactus\n * @enhanceable\n * @public\n */\n\n// Code generated by protoc-gen-grpc-web. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-grpc-web v2.0.2\n// \tprotoc              v0.0.0\n// source: utils.proto\n\n\n/* eslint-disable */\n// @ts-nocheck\n\n\n\nconst grpc = {};\ngrpc.web = require('grpc-web');\n\nconst proto = {};\nproto.pactus = require('./utils_pb.js');\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.UtilsClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.UtilsPromiseClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SignMessageWithPrivateKeyRequest,\n *   !proto.pactus.SignMessageWithPrivateKeyResponse>}\n */\nconst methodDescriptor_Utils_SignMessageWithPrivateKey = new grpc.web.MethodDescriptor(\n  '/pactus.Utils/SignMessageWithPrivateKey',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SignMessageWithPrivateKeyRequest,\n  proto.pactus.SignMessageWithPrivateKeyResponse,\n  /**\n   * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SignMessageWithPrivateKeyResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SignMessageWithPrivateKeyResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.UtilsClient.prototype.signMessageWithPrivateKey =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Utils/SignMessageWithPrivateKey',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_SignMessageWithPrivateKey,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SignMessageWithPrivateKeyResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.UtilsPromiseClient.prototype.signMessageWithPrivateKey =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Utils/SignMessageWithPrivateKey',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_SignMessageWithPrivateKey);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.VerifyMessageRequest,\n *   !proto.pactus.VerifyMessageResponse>}\n */\nconst methodDescriptor_Utils_VerifyMessage = new grpc.web.MethodDescriptor(\n  '/pactus.Utils/VerifyMessage',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.VerifyMessageRequest,\n  proto.pactus.VerifyMessageResponse,\n  /**\n   * @param {!proto.pactus.VerifyMessageRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.VerifyMessageResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.VerifyMessageRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.VerifyMessageResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.VerifyMessageResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.UtilsClient.prototype.verifyMessage =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Utils/VerifyMessage',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_VerifyMessage,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.VerifyMessageRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.VerifyMessageResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.UtilsPromiseClient.prototype.verifyMessage =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Utils/VerifyMessage',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_VerifyMessage);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.PublicKeyAggregationRequest,\n *   !proto.pactus.PublicKeyAggregationResponse>}\n */\nconst methodDescriptor_Utils_PublicKeyAggregation = new grpc.web.MethodDescriptor(\n  '/pactus.Utils/PublicKeyAggregation',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.PublicKeyAggregationRequest,\n  proto.pactus.PublicKeyAggregationResponse,\n  /**\n   * @param {!proto.pactus.PublicKeyAggregationRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.PublicKeyAggregationResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.PublicKeyAggregationRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.PublicKeyAggregationResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.PublicKeyAggregationResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.UtilsClient.prototype.publicKeyAggregation =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Utils/PublicKeyAggregation',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_PublicKeyAggregation,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.PublicKeyAggregationRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.PublicKeyAggregationResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.UtilsPromiseClient.prototype.publicKeyAggregation =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Utils/PublicKeyAggregation',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_PublicKeyAggregation);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SignatureAggregationRequest,\n *   !proto.pactus.SignatureAggregationResponse>}\n */\nconst methodDescriptor_Utils_SignatureAggregation = new grpc.web.MethodDescriptor(\n  '/pactus.Utils/SignatureAggregation',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SignatureAggregationRequest,\n  proto.pactus.SignatureAggregationResponse,\n  /**\n   * @param {!proto.pactus.SignatureAggregationRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SignatureAggregationResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SignatureAggregationRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SignatureAggregationResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SignatureAggregationResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.UtilsClient.prototype.signatureAggregation =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Utils/SignatureAggregation',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_SignatureAggregation,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SignatureAggregationRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SignatureAggregationResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.UtilsPromiseClient.prototype.signatureAggregation =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Utils/SignatureAggregation',\n      request,\n      metadata || {},\n      methodDescriptor_Utils_SignatureAggregation);\n};\n\n\nmodule.exports = proto.pactus;\n\n"
  },
  {
    "path": "www/grpc/gen/js/utils_pb.js",
    "content": "// source: utils.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = globalThis;\n\ngoog.exportSymbol('proto.pactus.PublicKeyAggregationRequest', null, global);\ngoog.exportSymbol('proto.pactus.PublicKeyAggregationResponse', null, global);\ngoog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyRequest', null, global);\ngoog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyResponse', null, global);\ngoog.exportSymbol('proto.pactus.SignatureAggregationRequest', null, global);\ngoog.exportSymbol('proto.pactus.SignatureAggregationResponse', null, global);\ngoog.exportSymbol('proto.pactus.VerifyMessageRequest', null, global);\ngoog.exportSymbol('proto.pactus.VerifyMessageResponse', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignMessageWithPrivateKeyRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignMessageWithPrivateKeyRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignMessageWithPrivateKeyRequest.displayName = 'proto.pactus.SignMessageWithPrivateKeyRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignMessageWithPrivateKeyResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignMessageWithPrivateKeyResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignMessageWithPrivateKeyResponse.displayName = 'proto.pactus.SignMessageWithPrivateKeyResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.VerifyMessageRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.VerifyMessageRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.VerifyMessageRequest.displayName = 'proto.pactus.VerifyMessageRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.VerifyMessageResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.VerifyMessageResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.VerifyMessageResponse.displayName = 'proto.pactus.VerifyMessageResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PublicKeyAggregationRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.PublicKeyAggregationRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.PublicKeyAggregationRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PublicKeyAggregationRequest.displayName = 'proto.pactus.PublicKeyAggregationRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.PublicKeyAggregationResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.PublicKeyAggregationResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.PublicKeyAggregationResponse.displayName = 'proto.pactus.PublicKeyAggregationResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignatureAggregationRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.SignatureAggregationRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.SignatureAggregationRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignatureAggregationRequest.displayName = 'proto.pactus.SignatureAggregationRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignatureAggregationResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignatureAggregationResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignatureAggregationResponse.displayName = 'proto.pactus.SignatureAggregationResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignMessageWithPrivateKeyRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nprivateKey: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nmessage: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignMessageWithPrivateKeyRequest}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignMessageWithPrivateKeyRequest;\n  return proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignMessageWithPrivateKeyRequest}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPrivateKey(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMessage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPrivateKey();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string private_key = 1;\n * @return {string}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.getPrivateKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.setPrivateKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string message = 2;\n * @return {string}\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.getMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this\n */\nproto.pactus.SignMessageWithPrivateKeyRequest.prototype.setMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignMessageWithPrivateKeyResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsignature: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignMessageWithPrivateKeyResponse}\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignMessageWithPrivateKeyResponse;\n  return proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignMessageWithPrivateKeyResponse}\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string signature = 1;\n * @return {string}\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} returns this\n */\nproto.pactus.SignMessageWithPrivateKeyResponse.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.VerifyMessageRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.VerifyMessageRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VerifyMessageRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nmessage: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nsignature: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\npublicKey: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.VerifyMessageRequest}\n */\nproto.pactus.VerifyMessageRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.VerifyMessageRequest;\n  return proto.pactus.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.VerifyMessageRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.VerifyMessageRequest}\n */\nproto.pactus.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMessage(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.VerifyMessageRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.VerifyMessageRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.VerifyMessageRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string message = 1;\n * @return {string}\n */\nproto.pactus.VerifyMessageRequest.prototype.getMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.VerifyMessageRequest} returns this\n */\nproto.pactus.VerifyMessageRequest.prototype.setMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string signature = 2;\n * @return {string}\n */\nproto.pactus.VerifyMessageRequest.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.VerifyMessageRequest} returns this\n */\nproto.pactus.VerifyMessageRequest.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string public_key = 3;\n * @return {string}\n */\nproto.pactus.VerifyMessageRequest.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.VerifyMessageRequest} returns this\n */\nproto.pactus.VerifyMessageRequest.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.VerifyMessageResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.VerifyMessageResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VerifyMessageResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nisValid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.VerifyMessageResponse}\n */\nproto.pactus.VerifyMessageResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.VerifyMessageResponse;\n  return proto.pactus.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.VerifyMessageResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.VerifyMessageResponse}\n */\nproto.pactus.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setIsValid(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.VerifyMessageResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.VerifyMessageResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.VerifyMessageResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getIsValid();\n  if (f) {\n    writer.writeBool(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional bool is_valid = 1;\n * @return {boolean}\n */\nproto.pactus.VerifyMessageResponse.prototype.getIsValid = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.VerifyMessageResponse} returns this\n */\nproto.pactus.VerifyMessageResponse.prototype.setIsValid = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 1, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.PublicKeyAggregationRequest.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PublicKeyAggregationRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PublicKeyAggregationRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PublicKeyAggregationRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\npublicKeysList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PublicKeyAggregationRequest}\n */\nproto.pactus.PublicKeyAggregationRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PublicKeyAggregationRequest;\n  return proto.pactus.PublicKeyAggregationRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PublicKeyAggregationRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PublicKeyAggregationRequest}\n */\nproto.pactus.PublicKeyAggregationRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addPublicKeys(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PublicKeyAggregationRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PublicKeyAggregationRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PublicKeyAggregationRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPublicKeysList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated string public_keys = 1;\n * @return {!Array<string>}\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.getPublicKeysList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.PublicKeyAggregationRequest} returns this\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.setPublicKeysList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.PublicKeyAggregationRequest} returns this\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.addPublicKeys = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.PublicKeyAggregationRequest} returns this\n */\nproto.pactus.PublicKeyAggregationRequest.prototype.clearPublicKeysList = function() {\n  return this.setPublicKeysList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.PublicKeyAggregationResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.PublicKeyAggregationResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PublicKeyAggregationResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\npublicKey: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.PublicKeyAggregationResponse}\n */\nproto.pactus.PublicKeyAggregationResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.PublicKeyAggregationResponse;\n  return proto.pactus.PublicKeyAggregationResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.PublicKeyAggregationResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.PublicKeyAggregationResponse}\n */\nproto.pactus.PublicKeyAggregationResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.PublicKeyAggregationResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.PublicKeyAggregationResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.PublicKeyAggregationResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string public_key = 1;\n * @return {string}\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PublicKeyAggregationResponse} returns this\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string address = 2;\n * @return {string}\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.PublicKeyAggregationResponse} returns this\n */\nproto.pactus.PublicKeyAggregationResponse.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.SignatureAggregationRequest.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignatureAggregationRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignatureAggregationRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignatureAggregationRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignatureAggregationRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsignaturesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignatureAggregationRequest}\n */\nproto.pactus.SignatureAggregationRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignatureAggregationRequest;\n  return proto.pactus.SignatureAggregationRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignatureAggregationRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignatureAggregationRequest}\n */\nproto.pactus.SignatureAggregationRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addSignatures(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignatureAggregationRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignatureAggregationRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignatureAggregationRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignatureAggregationRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSignaturesList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated string signatures = 1;\n * @return {!Array<string>}\n */\nproto.pactus.SignatureAggregationRequest.prototype.getSignaturesList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.SignatureAggregationRequest} returns this\n */\nproto.pactus.SignatureAggregationRequest.prototype.setSignaturesList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.SignatureAggregationRequest} returns this\n */\nproto.pactus.SignatureAggregationRequest.prototype.addSignatures = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.SignatureAggregationRequest} returns this\n */\nproto.pactus.SignatureAggregationRequest.prototype.clearSignaturesList = function() {\n  return this.setSignaturesList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignatureAggregationResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignatureAggregationResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignatureAggregationResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignatureAggregationResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsignature: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignatureAggregationResponse}\n */\nproto.pactus.SignatureAggregationResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignatureAggregationResponse;\n  return proto.pactus.SignatureAggregationResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignatureAggregationResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignatureAggregationResponse}\n */\nproto.pactus.SignatureAggregationResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignatureAggregationResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignatureAggregationResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignatureAggregationResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignatureAggregationResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string signature = 1;\n * @return {string}\n */\nproto.pactus.SignatureAggregationResponse.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignatureAggregationResponse} returns this\n */\nproto.pactus.SignatureAggregationResponse.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\ngoog.object.extend(exports, proto.pactus);\n"
  },
  {
    "path": "www/grpc/gen/js/wallet_grpc_pb.js",
    "content": "// GENERATED CODE -- DO NOT EDIT!\n\n'use strict';\nvar grpc = require('@grpc/grpc-js');\nvar wallet_pb = require('./wallet_pb.js');\nvar transaction_pb = require('./transaction_pb.js');\n\nfunction serialize_pactus_CreateWalletRequest(arg) {\n  if (!(arg instanceof wallet_pb.CreateWalletRequest)) {\n    throw new Error('Expected argument of type pactus.CreateWalletRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CreateWalletRequest(buffer_arg) {\n  return wallet_pb.CreateWalletRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_CreateWalletResponse(arg) {\n  if (!(arg instanceof wallet_pb.CreateWalletResponse)) {\n    throw new Error('Expected argument of type pactus.CreateWalletResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_CreateWalletResponse(buffer_arg) {\n  return wallet_pb.CreateWalletResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetAddressInfoRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetAddressInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetAddressInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetAddressInfoRequest(buffer_arg) {\n  return wallet_pb.GetAddressInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetAddressInfoResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetAddressInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetAddressInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetAddressInfoResponse(buffer_arg) {\n  return wallet_pb.GetAddressInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetMnemonicRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetMnemonicRequest)) {\n    throw new Error('Expected argument of type pactus.GetMnemonicRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetMnemonicRequest(buffer_arg) {\n  return wallet_pb.GetMnemonicRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetMnemonicResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetMnemonicResponse)) {\n    throw new Error('Expected argument of type pactus.GetMnemonicResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetMnemonicResponse(buffer_arg) {\n  return wallet_pb.GetMnemonicResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetNewAddressRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetNewAddressRequest)) {\n    throw new Error('Expected argument of type pactus.GetNewAddressRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNewAddressRequest(buffer_arg) {\n  return wallet_pb.GetNewAddressRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetNewAddressResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetNewAddressResponse)) {\n    throw new Error('Expected argument of type pactus.GetNewAddressResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetNewAddressResponse(buffer_arg) {\n  return wallet_pb.GetNewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetPrivateKeyRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetPrivateKeyRequest)) {\n    throw new Error('Expected argument of type pactus.GetPrivateKeyRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetPrivateKeyRequest(buffer_arg) {\n  return wallet_pb.GetPrivateKeyRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetPrivateKeyResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetPrivateKeyResponse)) {\n    throw new Error('Expected argument of type pactus.GetPrivateKeyResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetPrivateKeyResponse(buffer_arg) {\n  return wallet_pb.GetPrivateKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTotalBalanceRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetTotalBalanceRequest)) {\n    throw new Error('Expected argument of type pactus.GetTotalBalanceRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTotalBalanceRequest(buffer_arg) {\n  return wallet_pb.GetTotalBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTotalBalanceResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetTotalBalanceResponse)) {\n    throw new Error('Expected argument of type pactus.GetTotalBalanceResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTotalBalanceResponse(buffer_arg) {\n  return wallet_pb.GetTotalBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTotalStakeRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetTotalStakeRequest)) {\n    throw new Error('Expected argument of type pactus.GetTotalStakeRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTotalStakeRequest(buffer_arg) {\n  return wallet_pb.GetTotalStakeRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetTotalStakeResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetTotalStakeResponse)) {\n    throw new Error('Expected argument of type pactus.GetTotalStakeResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetTotalStakeResponse(buffer_arg) {\n  return wallet_pb.GetTotalStakeResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorAddressRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetValidatorAddressRequest)) {\n    throw new Error('Expected argument of type pactus.GetValidatorAddressRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorAddressRequest(buffer_arg) {\n  return wallet_pb.GetValidatorAddressRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetValidatorAddressResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetValidatorAddressResponse)) {\n    throw new Error('Expected argument of type pactus.GetValidatorAddressResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetValidatorAddressResponse(buffer_arg) {\n  return wallet_pb.GetValidatorAddressResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetWalletInfoRequest(arg) {\n  if (!(arg instanceof wallet_pb.GetWalletInfoRequest)) {\n    throw new Error('Expected argument of type pactus.GetWalletInfoRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetWalletInfoRequest(buffer_arg) {\n  return wallet_pb.GetWalletInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_GetWalletInfoResponse(arg) {\n  if (!(arg instanceof wallet_pb.GetWalletInfoResponse)) {\n    throw new Error('Expected argument of type pactus.GetWalletInfoResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_GetWalletInfoResponse(buffer_arg) {\n  return wallet_pb.GetWalletInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListAddressesRequest(arg) {\n  if (!(arg instanceof wallet_pb.ListAddressesRequest)) {\n    throw new Error('Expected argument of type pactus.ListAddressesRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListAddressesRequest(buffer_arg) {\n  return wallet_pb.ListAddressesRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListAddressesResponse(arg) {\n  if (!(arg instanceof wallet_pb.ListAddressesResponse)) {\n    throw new Error('Expected argument of type pactus.ListAddressesResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListAddressesResponse(buffer_arg) {\n  return wallet_pb.ListAddressesResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListTransactionsRequest(arg) {\n  if (!(arg instanceof wallet_pb.ListTransactionsRequest)) {\n    throw new Error('Expected argument of type pactus.ListTransactionsRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListTransactionsRequest(buffer_arg) {\n  return wallet_pb.ListTransactionsRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListTransactionsResponse(arg) {\n  if (!(arg instanceof wallet_pb.ListTransactionsResponse)) {\n    throw new Error('Expected argument of type pactus.ListTransactionsResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListTransactionsResponse(buffer_arg) {\n  return wallet_pb.ListTransactionsResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListWalletsRequest(arg) {\n  if (!(arg instanceof wallet_pb.ListWalletsRequest)) {\n    throw new Error('Expected argument of type pactus.ListWalletsRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListWalletsRequest(buffer_arg) {\n  return wallet_pb.ListWalletsRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_ListWalletsResponse(arg) {\n  if (!(arg instanceof wallet_pb.ListWalletsResponse)) {\n    throw new Error('Expected argument of type pactus.ListWalletsResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_ListWalletsResponse(buffer_arg) {\n  return wallet_pb.ListWalletsResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_LoadWalletRequest(arg) {\n  if (!(arg instanceof wallet_pb.LoadWalletRequest)) {\n    throw new Error('Expected argument of type pactus.LoadWalletRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_LoadWalletRequest(buffer_arg) {\n  return wallet_pb.LoadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_LoadWalletResponse(arg) {\n  if (!(arg instanceof wallet_pb.LoadWalletResponse)) {\n    throw new Error('Expected argument of type pactus.LoadWalletResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_LoadWalletResponse(buffer_arg) {\n  return wallet_pb.LoadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_RestoreWalletRequest(arg) {\n  if (!(arg instanceof wallet_pb.RestoreWalletRequest)) {\n    throw new Error('Expected argument of type pactus.RestoreWalletRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_RestoreWalletRequest(buffer_arg) {\n  return wallet_pb.RestoreWalletRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_RestoreWalletResponse(arg) {\n  if (!(arg instanceof wallet_pb.RestoreWalletResponse)) {\n    throw new Error('Expected argument of type pactus.RestoreWalletResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_RestoreWalletResponse(buffer_arg) {\n  return wallet_pb.RestoreWalletResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SetAddressLabelRequest(arg) {\n  if (!(arg instanceof wallet_pb.SetAddressLabelRequest)) {\n    throw new Error('Expected argument of type pactus.SetAddressLabelRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SetAddressLabelRequest(buffer_arg) {\n  return wallet_pb.SetAddressLabelRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SetAddressLabelResponse(arg) {\n  if (!(arg instanceof wallet_pb.SetAddressLabelResponse)) {\n    throw new Error('Expected argument of type pactus.SetAddressLabelResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SetAddressLabelResponse(buffer_arg) {\n  return wallet_pb.SetAddressLabelResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SetDefaultFeeRequest(arg) {\n  if (!(arg instanceof wallet_pb.SetDefaultFeeRequest)) {\n    throw new Error('Expected argument of type pactus.SetDefaultFeeRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SetDefaultFeeRequest(buffer_arg) {\n  return wallet_pb.SetDefaultFeeRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SetDefaultFeeResponse(arg) {\n  if (!(arg instanceof wallet_pb.SetDefaultFeeResponse)) {\n    throw new Error('Expected argument of type pactus.SetDefaultFeeResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SetDefaultFeeResponse(buffer_arg) {\n  return wallet_pb.SetDefaultFeeResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignMessageRequest(arg) {\n  if (!(arg instanceof wallet_pb.SignMessageRequest)) {\n    throw new Error('Expected argument of type pactus.SignMessageRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignMessageRequest(buffer_arg) {\n  return wallet_pb.SignMessageRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignMessageResponse(arg) {\n  if (!(arg instanceof wallet_pb.SignMessageResponse)) {\n    throw new Error('Expected argument of type pactus.SignMessageResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignMessageResponse(buffer_arg) {\n  return wallet_pb.SignMessageResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignRawTransactionRequest(arg) {\n  if (!(arg instanceof wallet_pb.SignRawTransactionRequest)) {\n    throw new Error('Expected argument of type pactus.SignRawTransactionRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignRawTransactionRequest(buffer_arg) {\n  return wallet_pb.SignRawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_SignRawTransactionResponse(arg) {\n  if (!(arg instanceof wallet_pb.SignRawTransactionResponse)) {\n    throw new Error('Expected argument of type pactus.SignRawTransactionResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_SignRawTransactionResponse(buffer_arg) {\n  return wallet_pb.SignRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_UnloadWalletRequest(arg) {\n  if (!(arg instanceof wallet_pb.UnloadWalletRequest)) {\n    throw new Error('Expected argument of type pactus.UnloadWalletRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_UnloadWalletRequest(buffer_arg) {\n  return wallet_pb.UnloadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_UnloadWalletResponse(arg) {\n  if (!(arg instanceof wallet_pb.UnloadWalletResponse)) {\n    throw new Error('Expected argument of type pactus.UnloadWalletResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_UnloadWalletResponse(buffer_arg) {\n  return wallet_pb.UnloadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_UpdatePasswordRequest(arg) {\n  if (!(arg instanceof wallet_pb.UpdatePasswordRequest)) {\n    throw new Error('Expected argument of type pactus.UpdatePasswordRequest');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_UpdatePasswordRequest(buffer_arg) {\n  return wallet_pb.UpdatePasswordRequest.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\nfunction serialize_pactus_UpdatePasswordResponse(arg) {\n  if (!(arg instanceof wallet_pb.UpdatePasswordResponse)) {\n    throw new Error('Expected argument of type pactus.UpdatePasswordResponse');\n  }\n  return Buffer.from(arg.serializeBinary());\n}\n\nfunction deserialize_pactus_UpdatePasswordResponse(buffer_arg) {\n  return wallet_pb.UpdatePasswordResponse.deserializeBinary(new Uint8Array(buffer_arg));\n}\n\n\n// Wallet service provides RPC methods for wallet management operations.\nvar WalletService = exports.WalletService = {\n  // CreateWallet creates a new wallet with the specified parameters.\ncreateWallet: {\n    path: '/pactus.Wallet/CreateWallet',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.CreateWalletRequest,\n    responseType: wallet_pb.CreateWalletResponse,\n    requestSerialize: serialize_pactus_CreateWalletRequest,\n    requestDeserialize: deserialize_pactus_CreateWalletRequest,\n    responseSerialize: serialize_pactus_CreateWalletResponse,\n    responseDeserialize: deserialize_pactus_CreateWalletResponse,\n  },\n  // RestoreWallet restores an existing wallet with the given mnemonic.\nrestoreWallet: {\n    path: '/pactus.Wallet/RestoreWallet',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.RestoreWalletRequest,\n    responseType: wallet_pb.RestoreWalletResponse,\n    requestSerialize: serialize_pactus_RestoreWalletRequest,\n    requestDeserialize: deserialize_pactus_RestoreWalletRequest,\n    responseSerialize: serialize_pactus_RestoreWalletResponse,\n    responseDeserialize: deserialize_pactus_RestoreWalletResponse,\n  },\n  // LoadWallet loads an existing wallet with the given name.\n// deprecated: It will be removed in a future version.\nloadWallet: {\n    path: '/pactus.Wallet/LoadWallet',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.LoadWalletRequest,\n    responseType: wallet_pb.LoadWalletResponse,\n    requestSerialize: serialize_pactus_LoadWalletRequest,\n    requestDeserialize: deserialize_pactus_LoadWalletRequest,\n    responseSerialize: serialize_pactus_LoadWalletResponse,\n    responseDeserialize: deserialize_pactus_LoadWalletResponse,\n  },\n  // UnloadWallet unloads a currently loaded wallet with the specified name.\n// deprecated: It will be removed in a future version.\nunloadWallet: {\n    path: '/pactus.Wallet/UnloadWallet',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.UnloadWalletRequest,\n    responseType: wallet_pb.UnloadWalletResponse,\n    requestSerialize: serialize_pactus_UnloadWalletRequest,\n    requestDeserialize: deserialize_pactus_UnloadWalletRequest,\n    responseSerialize: serialize_pactus_UnloadWalletResponse,\n    responseDeserialize: deserialize_pactus_UnloadWalletResponse,\n  },\n  // ListWallets returns a list of all available wallets.\nlistWallets: {\n    path: '/pactus.Wallet/ListWallets',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.ListWalletsRequest,\n    responseType: wallet_pb.ListWalletsResponse,\n    requestSerialize: serialize_pactus_ListWalletsRequest,\n    requestDeserialize: deserialize_pactus_ListWalletsRequest,\n    responseSerialize: serialize_pactus_ListWalletsResponse,\n    responseDeserialize: deserialize_pactus_ListWalletsResponse,\n  },\n  // GetWalletInfo returns detailed information about a specific wallet.\ngetWalletInfo: {\n    path: '/pactus.Wallet/GetWalletInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetWalletInfoRequest,\n    responseType: wallet_pb.GetWalletInfoResponse,\n    requestSerialize: serialize_pactus_GetWalletInfoRequest,\n    requestDeserialize: deserialize_pactus_GetWalletInfoRequest,\n    responseSerialize: serialize_pactus_GetWalletInfoResponse,\n    responseDeserialize: deserialize_pactus_GetWalletInfoResponse,\n  },\n  // UpdatePassword updates the password of an existing wallet.\nupdatePassword: {\n    path: '/pactus.Wallet/UpdatePassword',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.UpdatePasswordRequest,\n    responseType: wallet_pb.UpdatePasswordResponse,\n    requestSerialize: serialize_pactus_UpdatePasswordRequest,\n    requestDeserialize: deserialize_pactus_UpdatePasswordRequest,\n    responseSerialize: serialize_pactus_UpdatePasswordResponse,\n    responseDeserialize: deserialize_pactus_UpdatePasswordResponse,\n  },\n  // GetTotalBalance returns the total available balance of the wallet.\ngetTotalBalance: {\n    path: '/pactus.Wallet/GetTotalBalance',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetTotalBalanceRequest,\n    responseType: wallet_pb.GetTotalBalanceResponse,\n    requestSerialize: serialize_pactus_GetTotalBalanceRequest,\n    requestDeserialize: deserialize_pactus_GetTotalBalanceRequest,\n    responseSerialize: serialize_pactus_GetTotalBalanceResponse,\n    responseDeserialize: deserialize_pactus_GetTotalBalanceResponse,\n  },\n  // GetTotalStake returns the total stake amount in the wallet.\ngetTotalStake: {\n    path: '/pactus.Wallet/GetTotalStake',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetTotalStakeRequest,\n    responseType: wallet_pb.GetTotalStakeResponse,\n    requestSerialize: serialize_pactus_GetTotalStakeRequest,\n    requestDeserialize: deserialize_pactus_GetTotalStakeRequest,\n    responseSerialize: serialize_pactus_GetTotalStakeResponse,\n    responseDeserialize: deserialize_pactus_GetTotalStakeResponse,\n  },\n  // GetValidatorAddress retrieves the validator address associated with a public key.\n// Deprecated: Will move into utils.\ngetValidatorAddress: {\n    path: '/pactus.Wallet/GetValidatorAddress',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetValidatorAddressRequest,\n    responseType: wallet_pb.GetValidatorAddressResponse,\n    requestSerialize: serialize_pactus_GetValidatorAddressRequest,\n    requestDeserialize: deserialize_pactus_GetValidatorAddressRequest,\n    responseSerialize: serialize_pactus_GetValidatorAddressResponse,\n    responseDeserialize: deserialize_pactus_GetValidatorAddressResponse,\n  },\n  // GetAddressInfo returns detailed information about a specific address.\ngetAddressInfo: {\n    path: '/pactus.Wallet/GetAddressInfo',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetAddressInfoRequest,\n    responseType: wallet_pb.GetAddressInfoResponse,\n    requestSerialize: serialize_pactus_GetAddressInfoRequest,\n    requestDeserialize: deserialize_pactus_GetAddressInfoRequest,\n    responseSerialize: serialize_pactus_GetAddressInfoResponse,\n    responseDeserialize: deserialize_pactus_GetAddressInfoResponse,\n  },\n  // SetAddressLabel sets or updates the label for a given address.\nsetAddressLabel: {\n    path: '/pactus.Wallet/SetAddressLabel',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.SetAddressLabelRequest,\n    responseType: wallet_pb.SetAddressLabelResponse,\n    requestSerialize: serialize_pactus_SetAddressLabelRequest,\n    requestDeserialize: deserialize_pactus_SetAddressLabelRequest,\n    responseSerialize: serialize_pactus_SetAddressLabelResponse,\n    responseDeserialize: deserialize_pactus_SetAddressLabelResponse,\n  },\n  // GetNewAddress generates a new address for the specified wallet.\ngetNewAddress: {\n    path: '/pactus.Wallet/GetNewAddress',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetNewAddressRequest,\n    responseType: wallet_pb.GetNewAddressResponse,\n    requestSerialize: serialize_pactus_GetNewAddressRequest,\n    requestDeserialize: deserialize_pactus_GetNewAddressRequest,\n    responseSerialize: serialize_pactus_GetNewAddressResponse,\n    responseDeserialize: deserialize_pactus_GetNewAddressResponse,\n  },\n  // ListAddresses returns all addresses in the specified wallet.\nlistAddresses: {\n    path: '/pactus.Wallet/ListAddresses',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.ListAddressesRequest,\n    responseType: wallet_pb.ListAddressesResponse,\n    requestSerialize: serialize_pactus_ListAddressesRequest,\n    requestDeserialize: deserialize_pactus_ListAddressesRequest,\n    responseSerialize: serialize_pactus_ListAddressesResponse,\n    responseDeserialize: deserialize_pactus_ListAddressesResponse,\n  },\n  // SignMessage signs an arbitrary message using a wallet's private key.\nsignMessage: {\n    path: '/pactus.Wallet/SignMessage',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.SignMessageRequest,\n    responseType: wallet_pb.SignMessageResponse,\n    requestSerialize: serialize_pactus_SignMessageRequest,\n    requestDeserialize: deserialize_pactus_SignMessageRequest,\n    responseSerialize: serialize_pactus_SignMessageResponse,\n    responseDeserialize: deserialize_pactus_SignMessageResponse,\n  },\n  // SignRawTransaction signs a raw transaction for a specified wallet.\nsignRawTransaction: {\n    path: '/pactus.Wallet/SignRawTransaction',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.SignRawTransactionRequest,\n    responseType: wallet_pb.SignRawTransactionResponse,\n    requestSerialize: serialize_pactus_SignRawTransactionRequest,\n    requestDeserialize: deserialize_pactus_SignRawTransactionRequest,\n    responseSerialize: serialize_pactus_SignRawTransactionResponse,\n    responseDeserialize: deserialize_pactus_SignRawTransactionResponse,\n  },\n  // ListTransactions returns a list of transactions for a wallet,\n// optionally filtered by a specific address, with pagination support.\nlistTransactions: {\n    path: '/pactus.Wallet/ListTransactions',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.ListTransactionsRequest,\n    responseType: wallet_pb.ListTransactionsResponse,\n    requestSerialize: serialize_pactus_ListTransactionsRequest,\n    requestDeserialize: deserialize_pactus_ListTransactionsRequest,\n    responseSerialize: serialize_pactus_ListTransactionsResponse,\n    responseDeserialize: deserialize_pactus_ListTransactionsResponse,\n  },\n  // SetDefaultFee sets the default fee for the wallet.\nsetDefaultFee: {\n    path: '/pactus.Wallet/SetDefaultFee',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.SetDefaultFeeRequest,\n    responseType: wallet_pb.SetDefaultFeeResponse,\n    requestSerialize: serialize_pactus_SetDefaultFeeRequest,\n    requestDeserialize: deserialize_pactus_SetDefaultFeeRequest,\n    responseSerialize: serialize_pactus_SetDefaultFeeResponse,\n    responseDeserialize: deserialize_pactus_SetDefaultFeeResponse,\n  },\n  // GetMnemonic returns the mnemonic (seed phrase) for the wallet.\ngetMnemonic: {\n    path: '/pactus.Wallet/GetMnemonic',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetMnemonicRequest,\n    responseType: wallet_pb.GetMnemonicResponse,\n    requestSerialize: serialize_pactus_GetMnemonicRequest,\n    requestDeserialize: deserialize_pactus_GetMnemonicRequest,\n    responseSerialize: serialize_pactus_GetMnemonicResponse,\n    responseDeserialize: deserialize_pactus_GetMnemonicResponse,\n  },\n  // GetPrivateKey returns the private key for a given address.\ngetPrivateKey: {\n    path: '/pactus.Wallet/GetPrivateKey',\n    requestStream: false,\n    responseStream: false,\n    requestType: wallet_pb.GetPrivateKeyRequest,\n    responseType: wallet_pb.GetPrivateKeyResponse,\n    requestSerialize: serialize_pactus_GetPrivateKeyRequest,\n    requestDeserialize: deserialize_pactus_GetPrivateKeyRequest,\n    responseSerialize: serialize_pactus_GetPrivateKeyResponse,\n    responseDeserialize: deserialize_pactus_GetPrivateKeyResponse,\n  },\n};\n\nexports.WalletClient = grpc.makeGenericClientConstructor(WalletService, 'Wallet');\n"
  },
  {
    "path": "www/grpc/gen/js/wallet_grpc_web_pb.js",
    "content": "/**\n * @fileoverview gRPC-Web generated client stub for pactus\n * @enhanceable\n * @public\n */\n\n// Code generated by protoc-gen-grpc-web. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-grpc-web v2.0.2\n// \tprotoc              v0.0.0\n// source: wallet.proto\n\n\n/* eslint-disable */\n// @ts-nocheck\n\n\n\nconst grpc = {};\ngrpc.web = require('grpc-web');\n\n\nvar transaction_pb = require('./transaction_pb.js')\nconst proto = {};\nproto.pactus = require('./wallet_pb.js');\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.WalletClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @param {string} hostname\n * @param {?Object} credentials\n * @param {?grpc.web.ClientOptions} options\n * @constructor\n * @struct\n * @final\n */\nproto.pactus.WalletPromiseClient =\n    function(hostname, credentials, options) {\n  if (!options) options = {};\n  options.format = 'binary';\n\n  /**\n   * @private @const {!grpc.web.GrpcWebClientBase} The client\n   */\n  this.client_ = new grpc.web.GrpcWebClientBase(options);\n\n  /**\n   * @private @const {string} The hostname\n   */\n  this.hostname_ = hostname.replace(/\\/+$/, '');\n\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.CreateWalletRequest,\n *   !proto.pactus.CreateWalletResponse>}\n */\nconst methodDescriptor_Wallet_CreateWallet = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/CreateWallet',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.CreateWalletRequest,\n  proto.pactus.CreateWalletResponse,\n  /**\n   * @param {!proto.pactus.CreateWalletRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.CreateWalletResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.CreateWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.CreateWalletResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.CreateWalletResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.createWallet =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/CreateWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_CreateWallet,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.CreateWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.CreateWalletResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.createWallet =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/CreateWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_CreateWallet);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.RestoreWalletRequest,\n *   !proto.pactus.RestoreWalletResponse>}\n */\nconst methodDescriptor_Wallet_RestoreWallet = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/RestoreWallet',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.RestoreWalletRequest,\n  proto.pactus.RestoreWalletResponse,\n  /**\n   * @param {!proto.pactus.RestoreWalletRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.RestoreWalletResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.RestoreWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.RestoreWalletResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.RestoreWalletResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.restoreWallet =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/RestoreWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_RestoreWallet,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.RestoreWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.RestoreWalletResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.restoreWallet =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/RestoreWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_RestoreWallet);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.LoadWalletRequest,\n *   !proto.pactus.LoadWalletResponse>}\n */\nconst methodDescriptor_Wallet_LoadWallet = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/LoadWallet',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.LoadWalletRequest,\n  proto.pactus.LoadWalletResponse,\n  /**\n   * @param {!proto.pactus.LoadWalletRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.LoadWalletResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.LoadWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.LoadWalletResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.LoadWalletResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.loadWallet =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/LoadWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_LoadWallet,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.LoadWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.LoadWalletResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.loadWallet =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/LoadWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_LoadWallet);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.UnloadWalletRequest,\n *   !proto.pactus.UnloadWalletResponse>}\n */\nconst methodDescriptor_Wallet_UnloadWallet = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/UnloadWallet',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.UnloadWalletRequest,\n  proto.pactus.UnloadWalletResponse,\n  /**\n   * @param {!proto.pactus.UnloadWalletRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.UnloadWalletResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.UnloadWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.UnloadWalletResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.UnloadWalletResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.unloadWallet =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/UnloadWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_UnloadWallet,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.UnloadWalletRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.UnloadWalletResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.unloadWallet =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/UnloadWallet',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_UnloadWallet);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.ListWalletsRequest,\n *   !proto.pactus.ListWalletsResponse>}\n */\nconst methodDescriptor_Wallet_ListWallets = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/ListWallets',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.ListWalletsRequest,\n  proto.pactus.ListWalletsResponse,\n  /**\n   * @param {!proto.pactus.ListWalletsRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.ListWalletsResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.ListWalletsRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.ListWalletsResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.ListWalletsResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.listWallets =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/ListWallets',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListWallets,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.ListWalletsRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.ListWalletsResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.listWallets =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/ListWallets',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListWallets);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetWalletInfoRequest,\n *   !proto.pactus.GetWalletInfoResponse>}\n */\nconst methodDescriptor_Wallet_GetWalletInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetWalletInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetWalletInfoRequest,\n  proto.pactus.GetWalletInfoResponse,\n  /**\n   * @param {!proto.pactus.GetWalletInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetWalletInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetWalletInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetWalletInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetWalletInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getWalletInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetWalletInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetWalletInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetWalletInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetWalletInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getWalletInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetWalletInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetWalletInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.UpdatePasswordRequest,\n *   !proto.pactus.UpdatePasswordResponse>}\n */\nconst methodDescriptor_Wallet_UpdatePassword = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/UpdatePassword',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.UpdatePasswordRequest,\n  proto.pactus.UpdatePasswordResponse,\n  /**\n   * @param {!proto.pactus.UpdatePasswordRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.UpdatePasswordResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.UpdatePasswordRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.UpdatePasswordResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.UpdatePasswordResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.updatePassword =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/UpdatePassword',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_UpdatePassword,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.UpdatePasswordRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.UpdatePasswordResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.updatePassword =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/UpdatePassword',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_UpdatePassword);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetTotalBalanceRequest,\n *   !proto.pactus.GetTotalBalanceResponse>}\n */\nconst methodDescriptor_Wallet_GetTotalBalance = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetTotalBalance',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetTotalBalanceRequest,\n  proto.pactus.GetTotalBalanceResponse,\n  /**\n   * @param {!proto.pactus.GetTotalBalanceRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetTotalBalanceResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetTotalBalanceRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetTotalBalanceResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetTotalBalanceResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getTotalBalance =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetTotalBalance',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetTotalBalance,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetTotalBalanceRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetTotalBalanceResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getTotalBalance =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetTotalBalance',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetTotalBalance);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetTotalStakeRequest,\n *   !proto.pactus.GetTotalStakeResponse>}\n */\nconst methodDescriptor_Wallet_GetTotalStake = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetTotalStake',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetTotalStakeRequest,\n  proto.pactus.GetTotalStakeResponse,\n  /**\n   * @param {!proto.pactus.GetTotalStakeRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetTotalStakeResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetTotalStakeRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetTotalStakeResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetTotalStakeResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getTotalStake =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetTotalStake',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetTotalStake,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetTotalStakeRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetTotalStakeResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getTotalStake =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetTotalStake',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetTotalStake);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetValidatorAddressRequest,\n *   !proto.pactus.GetValidatorAddressResponse>}\n */\nconst methodDescriptor_Wallet_GetValidatorAddress = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetValidatorAddress',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetValidatorAddressRequest,\n  proto.pactus.GetValidatorAddressResponse,\n  /**\n   * @param {!proto.pactus.GetValidatorAddressRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetValidatorAddressResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetValidatorAddressRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetValidatorAddressResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetValidatorAddressResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getValidatorAddress =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetValidatorAddress',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetValidatorAddress,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetValidatorAddressRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetValidatorAddressResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getValidatorAddress =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetValidatorAddress',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetValidatorAddress);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetAddressInfoRequest,\n *   !proto.pactus.GetAddressInfoResponse>}\n */\nconst methodDescriptor_Wallet_GetAddressInfo = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetAddressInfo',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetAddressInfoRequest,\n  proto.pactus.GetAddressInfoResponse,\n  /**\n   * @param {!proto.pactus.GetAddressInfoRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetAddressInfoResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetAddressInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetAddressInfoResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetAddressInfoResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getAddressInfo =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetAddressInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetAddressInfo,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetAddressInfoRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetAddressInfoResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getAddressInfo =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetAddressInfo',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetAddressInfo);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SetAddressLabelRequest,\n *   !proto.pactus.SetAddressLabelResponse>}\n */\nconst methodDescriptor_Wallet_SetAddressLabel = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/SetAddressLabel',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SetAddressLabelRequest,\n  proto.pactus.SetAddressLabelResponse,\n  /**\n   * @param {!proto.pactus.SetAddressLabelRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SetAddressLabelResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SetAddressLabelRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SetAddressLabelResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SetAddressLabelResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.setAddressLabel =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/SetAddressLabel',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SetAddressLabel,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SetAddressLabelRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SetAddressLabelResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.setAddressLabel =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/SetAddressLabel',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SetAddressLabel);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetNewAddressRequest,\n *   !proto.pactus.GetNewAddressResponse>}\n */\nconst methodDescriptor_Wallet_GetNewAddress = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetNewAddress',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetNewAddressRequest,\n  proto.pactus.GetNewAddressResponse,\n  /**\n   * @param {!proto.pactus.GetNewAddressRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetNewAddressResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetNewAddressRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetNewAddressResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetNewAddressResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getNewAddress =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetNewAddress',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetNewAddress,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetNewAddressRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetNewAddressResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getNewAddress =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetNewAddress',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetNewAddress);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.ListAddressesRequest,\n *   !proto.pactus.ListAddressesResponse>}\n */\nconst methodDescriptor_Wallet_ListAddresses = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/ListAddresses',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.ListAddressesRequest,\n  proto.pactus.ListAddressesResponse,\n  /**\n   * @param {!proto.pactus.ListAddressesRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.ListAddressesResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.ListAddressesRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.ListAddressesResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.ListAddressesResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.listAddresses =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/ListAddresses',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListAddresses,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.ListAddressesRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.ListAddressesResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.listAddresses =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/ListAddresses',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListAddresses);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SignMessageRequest,\n *   !proto.pactus.SignMessageResponse>}\n */\nconst methodDescriptor_Wallet_SignMessage = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/SignMessage',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SignMessageRequest,\n  proto.pactus.SignMessageResponse,\n  /**\n   * @param {!proto.pactus.SignMessageRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SignMessageResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SignMessageRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SignMessageResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SignMessageResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.signMessage =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/SignMessage',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SignMessage,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SignMessageRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SignMessageResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.signMessage =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/SignMessage',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SignMessage);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SignRawTransactionRequest,\n *   !proto.pactus.SignRawTransactionResponse>}\n */\nconst methodDescriptor_Wallet_SignRawTransaction = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/SignRawTransaction',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SignRawTransactionRequest,\n  proto.pactus.SignRawTransactionResponse,\n  /**\n   * @param {!proto.pactus.SignRawTransactionRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SignRawTransactionResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SignRawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SignRawTransactionResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SignRawTransactionResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.signRawTransaction =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/SignRawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SignRawTransaction,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SignRawTransactionRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SignRawTransactionResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.signRawTransaction =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/SignRawTransaction',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SignRawTransaction);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.ListTransactionsRequest,\n *   !proto.pactus.ListTransactionsResponse>}\n */\nconst methodDescriptor_Wallet_ListTransactions = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/ListTransactions',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.ListTransactionsRequest,\n  proto.pactus.ListTransactionsResponse,\n  /**\n   * @param {!proto.pactus.ListTransactionsRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.ListTransactionsResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.ListTransactionsRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.ListTransactionsResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.ListTransactionsResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.listTransactions =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/ListTransactions',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListTransactions,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.ListTransactionsRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.ListTransactionsResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.listTransactions =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/ListTransactions',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_ListTransactions);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.SetDefaultFeeRequest,\n *   !proto.pactus.SetDefaultFeeResponse>}\n */\nconst methodDescriptor_Wallet_SetDefaultFee = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/SetDefaultFee',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.SetDefaultFeeRequest,\n  proto.pactus.SetDefaultFeeResponse,\n  /**\n   * @param {!proto.pactus.SetDefaultFeeRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.SetDefaultFeeResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.SetDefaultFeeRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.SetDefaultFeeResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.SetDefaultFeeResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.setDefaultFee =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/SetDefaultFee',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SetDefaultFee,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.SetDefaultFeeRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.SetDefaultFeeResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.setDefaultFee =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/SetDefaultFee',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_SetDefaultFee);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetMnemonicRequest,\n *   !proto.pactus.GetMnemonicResponse>}\n */\nconst methodDescriptor_Wallet_GetMnemonic = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetMnemonic',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetMnemonicRequest,\n  proto.pactus.GetMnemonicResponse,\n  /**\n   * @param {!proto.pactus.GetMnemonicRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetMnemonicResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetMnemonicRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetMnemonicResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetMnemonicResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getMnemonic =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetMnemonic',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetMnemonic,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetMnemonicRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetMnemonicResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getMnemonic =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetMnemonic',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetMnemonic);\n};\n\n\n/**\n * @const\n * @type {!grpc.web.MethodDescriptor<\n *   !proto.pactus.GetPrivateKeyRequest,\n *   !proto.pactus.GetPrivateKeyResponse>}\n */\nconst methodDescriptor_Wallet_GetPrivateKey = new grpc.web.MethodDescriptor(\n  '/pactus.Wallet/GetPrivateKey',\n  grpc.web.MethodType.UNARY,\n  proto.pactus.GetPrivateKeyRequest,\n  proto.pactus.GetPrivateKeyResponse,\n  /**\n   * @param {!proto.pactus.GetPrivateKeyRequest} request\n   * @return {!Uint8Array}\n   */\n  function(request) {\n    return request.serializeBinary();\n  },\n  proto.pactus.GetPrivateKeyResponse.deserializeBinary\n);\n\n\n/**\n * @param {!proto.pactus.GetPrivateKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>} metadata User defined\n *     call metadata\n * @param {function(?grpc.web.RpcError, ?proto.pactus.GetPrivateKeyResponse)}\n *     callback The callback function(error, response)\n * @return {!grpc.web.ClientReadableStream<!proto.pactus.GetPrivateKeyResponse>|undefined}\n *     The XHR Node Readable Stream\n */\nproto.pactus.WalletClient.prototype.getPrivateKey =\n    function(request, metadata, callback) {\n  return this.client_.rpcCall(this.hostname_ +\n      '/pactus.Wallet/GetPrivateKey',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetPrivateKey,\n      callback);\n};\n\n\n/**\n * @param {!proto.pactus.GetPrivateKeyRequest} request The\n *     request proto\n * @param {?Object<string, string>=} metadata User defined\n *     call metadata\n * @return {!Promise<!proto.pactus.GetPrivateKeyResponse>}\n *     Promise that resolves to the response\n */\nproto.pactus.WalletPromiseClient.prototype.getPrivateKey =\n    function(request, metadata) {\n  return this.client_.unaryCall(this.hostname_ +\n      '/pactus.Wallet/GetPrivateKey',\n      request,\n      metadata || {},\n      methodDescriptor_Wallet_GetPrivateKey);\n};\n\n\nmodule.exports = proto.pactus;\n\n"
  },
  {
    "path": "www/grpc/gen/js/wallet_pb.js",
    "content": "// source: wallet.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n *     field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = globalThis;\n\nvar transaction_pb = require('./transaction_pb.js');\ngoog.object.extend(proto, transaction_pb);\ngoog.exportSymbol('proto.pactus.AddressInfo', null, global);\ngoog.exportSymbol('proto.pactus.AddressType', null, global);\ngoog.exportSymbol('proto.pactus.CreateWalletRequest', null, global);\ngoog.exportSymbol('proto.pactus.CreateWalletResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetAddressInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetAddressInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetMnemonicRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetMnemonicResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetNewAddressRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetNewAddressResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetPrivateKeyRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetPrivateKeyResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetTotalBalanceRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetTotalBalanceResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetTotalStakeRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetTotalStakeResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorAddressRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetValidatorAddressResponse', null, global);\ngoog.exportSymbol('proto.pactus.GetWalletInfoRequest', null, global);\ngoog.exportSymbol('proto.pactus.GetWalletInfoResponse', null, global);\ngoog.exportSymbol('proto.pactus.ListAddressesRequest', null, global);\ngoog.exportSymbol('proto.pactus.ListAddressesResponse', null, global);\ngoog.exportSymbol('proto.pactus.ListTransactionsRequest', null, global);\ngoog.exportSymbol('proto.pactus.ListTransactionsResponse', null, global);\ngoog.exportSymbol('proto.pactus.ListWalletsRequest', null, global);\ngoog.exportSymbol('proto.pactus.ListWalletsResponse', null, global);\ngoog.exportSymbol('proto.pactus.LoadWalletRequest', null, global);\ngoog.exportSymbol('proto.pactus.LoadWalletResponse', null, global);\ngoog.exportSymbol('proto.pactus.RestoreWalletRequest', null, global);\ngoog.exportSymbol('proto.pactus.RestoreWalletResponse', null, global);\ngoog.exportSymbol('proto.pactus.SetAddressLabelRequest', null, global);\ngoog.exportSymbol('proto.pactus.SetAddressLabelResponse', null, global);\ngoog.exportSymbol('proto.pactus.SetDefaultFeeRequest', null, global);\ngoog.exportSymbol('proto.pactus.SetDefaultFeeResponse', null, global);\ngoog.exportSymbol('proto.pactus.SignMessageRequest', null, global);\ngoog.exportSymbol('proto.pactus.SignMessageResponse', null, global);\ngoog.exportSymbol('proto.pactus.SignRawTransactionRequest', null, global);\ngoog.exportSymbol('proto.pactus.SignRawTransactionResponse', null, global);\ngoog.exportSymbol('proto.pactus.TransactionStatus', null, global);\ngoog.exportSymbol('proto.pactus.TxDirection', null, global);\ngoog.exportSymbol('proto.pactus.UnloadWalletRequest', null, global);\ngoog.exportSymbol('proto.pactus.UnloadWalletResponse', null, global);\ngoog.exportSymbol('proto.pactus.UpdatePasswordRequest', null, global);\ngoog.exportSymbol('proto.pactus.UpdatePasswordResponse', null, global);\ngoog.exportSymbol('proto.pactus.WalletTransactionInfo', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.AddressInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.AddressInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.AddressInfo.displayName = 'proto.pactus.AddressInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNewAddressRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetNewAddressRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNewAddressRequest.displayName = 'proto.pactus.GetNewAddressRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetNewAddressResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetNewAddressResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetNewAddressResponse.displayName = 'proto.pactus.GetNewAddressResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.RestoreWalletRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.RestoreWalletRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.RestoreWalletRequest.displayName = 'proto.pactus.RestoreWalletRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.RestoreWalletResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.RestoreWalletResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.RestoreWalletResponse.displayName = 'proto.pactus.RestoreWalletResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CreateWalletRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CreateWalletRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CreateWalletRequest.displayName = 'proto.pactus.CreateWalletRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.CreateWalletResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.CreateWalletResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.CreateWalletResponse.displayName = 'proto.pactus.CreateWalletResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.LoadWalletRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.LoadWalletRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.LoadWalletRequest.displayName = 'proto.pactus.LoadWalletRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.LoadWalletResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.LoadWalletResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.LoadWalletResponse.displayName = 'proto.pactus.LoadWalletResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.UnloadWalletRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.UnloadWalletRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.UnloadWalletRequest.displayName = 'proto.pactus.UnloadWalletRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.UnloadWalletResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.UnloadWalletResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.UnloadWalletResponse.displayName = 'proto.pactus.UnloadWalletResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorAddressRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorAddressRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorAddressRequest.displayName = 'proto.pactus.GetValidatorAddressRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetValidatorAddressResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetValidatorAddressResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetValidatorAddressResponse.displayName = 'proto.pactus.GetValidatorAddressResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignRawTransactionRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignRawTransactionRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignRawTransactionRequest.displayName = 'proto.pactus.SignRawTransactionRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignRawTransactionResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignRawTransactionResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignRawTransactionResponse.displayName = 'proto.pactus.SignRawTransactionResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTotalBalanceRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTotalBalanceRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTotalBalanceRequest.displayName = 'proto.pactus.GetTotalBalanceRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTotalBalanceResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTotalBalanceResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTotalBalanceResponse.displayName = 'proto.pactus.GetTotalBalanceResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignMessageRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignMessageRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignMessageRequest.displayName = 'proto.pactus.SignMessageRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SignMessageResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SignMessageResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SignMessageResponse.displayName = 'proto.pactus.SignMessageResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTotalStakeRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTotalStakeRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTotalStakeRequest.displayName = 'proto.pactus.GetTotalStakeRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetTotalStakeResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetTotalStakeResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetTotalStakeResponse.displayName = 'proto.pactus.GetTotalStakeResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetAddressInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetAddressInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetAddressInfoRequest.displayName = 'proto.pactus.GetAddressInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetAddressInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetAddressInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetAddressInfoResponse.displayName = 'proto.pactus.GetAddressInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SetAddressLabelRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SetAddressLabelRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SetAddressLabelRequest.displayName = 'proto.pactus.SetAddressLabelRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SetAddressLabelResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SetAddressLabelResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SetAddressLabelResponse.displayName = 'proto.pactus.SetAddressLabelResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListWalletsRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ListWalletsRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListWalletsRequest.displayName = 'proto.pactus.ListWalletsRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListWalletsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ListWalletsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ListWalletsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListWalletsResponse.displayName = 'proto.pactus.ListWalletsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetWalletInfoRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetWalletInfoRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetWalletInfoRequest.displayName = 'proto.pactus.GetWalletInfoRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetWalletInfoResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetWalletInfoResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetWalletInfoResponse.displayName = 'proto.pactus.GetWalletInfoResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListAddressesRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ListAddressesRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ListAddressesRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListAddressesRequest.displayName = 'proto.pactus.ListAddressesRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListAddressesResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ListAddressesResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ListAddressesResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListAddressesResponse.displayName = 'proto.pactus.ListAddressesResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.UpdatePasswordRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.UpdatePasswordRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.UpdatePasswordRequest.displayName = 'proto.pactus.UpdatePasswordRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.UpdatePasswordResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.UpdatePasswordResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.UpdatePasswordResponse.displayName = 'proto.pactus.UpdatePasswordResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.WalletTransactionInfo = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.WalletTransactionInfo, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.WalletTransactionInfo.displayName = 'proto.pactus.WalletTransactionInfo';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListTransactionsRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.ListTransactionsRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListTransactionsRequest.displayName = 'proto.pactus.ListTransactionsRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.ListTransactionsResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ListTransactionsResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.pactus.ListTransactionsResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.ListTransactionsResponse.displayName = 'proto.pactus.ListTransactionsResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SetDefaultFeeRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SetDefaultFeeRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SetDefaultFeeRequest.displayName = 'proto.pactus.SetDefaultFeeRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.SetDefaultFeeResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.SetDefaultFeeResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.SetDefaultFeeResponse.displayName = 'proto.pactus.SetDefaultFeeResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetMnemonicRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetMnemonicRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetMnemonicRequest.displayName = 'proto.pactus.GetMnemonicRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetMnemonicResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetMnemonicResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetMnemonicResponse.displayName = 'proto.pactus.GetMnemonicResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetPrivateKeyRequest = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetPrivateKeyRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetPrivateKeyRequest.displayName = 'proto.pactus.GetPrivateKeyRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.pactus.GetPrivateKeyResponse = function(opt_data) {\n  jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.pactus.GetPrivateKeyResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n  /**\n   * @public\n   * @override\n   */\n  proto.pactus.GetPrivateKeyResponse.displayName = 'proto.pactus.GetPrivateKeyResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.AddressInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.AddressInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.AddressInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.AddressInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npublicKey: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nlabel: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\npath: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.AddressInfo}\n */\nproto.pactus.AddressInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.AddressInfo;\n  return proto.pactus.AddressInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.AddressInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.AddressInfo}\n */\nproto.pactus.AddressInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLabel(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPath(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.AddressInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.AddressInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.AddressInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.AddressInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getLabel();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getPath();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.AddressInfo.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AddressInfo} returns this\n */\nproto.pactus.AddressInfo.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string public_key = 2;\n * @return {string}\n */\nproto.pactus.AddressInfo.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AddressInfo} returns this\n */\nproto.pactus.AddressInfo.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string label = 3;\n * @return {string}\n */\nproto.pactus.AddressInfo.prototype.getLabel = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AddressInfo} returns this\n */\nproto.pactus.AddressInfo.prototype.setLabel = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string path = 4;\n * @return {string}\n */\nproto.pactus.AddressInfo.prototype.getPath = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.AddressInfo} returns this\n */\nproto.pactus.AddressInfo.prototype.setPath = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNewAddressRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNewAddressRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNewAddressRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNewAddressRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddressType: jspb.Message.getFieldWithDefault(msg, 2, 0),\nlabel: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNewAddressRequest}\n */\nproto.pactus.GetNewAddressRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNewAddressRequest;\n  return proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNewAddressRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNewAddressRequest}\n */\nproto.pactus.GetNewAddressRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {!proto.pactus.AddressType} */ (reader.readEnum());\n      msg.setAddressType(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLabel(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNewAddressRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNewAddressRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNewAddressRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNewAddressRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddressType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      2,\n      f\n    );\n  }\n  f = message.getLabel();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetNewAddressRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNewAddressRequest} returns this\n */\nproto.pactus.GetNewAddressRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional AddressType address_type = 2;\n * @return {!proto.pactus.AddressType}\n */\nproto.pactus.GetNewAddressRequest.prototype.getAddressType = function() {\n  return /** @type {!proto.pactus.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {!proto.pactus.AddressType} value\n * @return {!proto.pactus.GetNewAddressRequest} returns this\n */\nproto.pactus.GetNewAddressRequest.prototype.setAddressType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 2, value);\n};\n\n\n/**\n * optional string label = 3;\n * @return {string}\n */\nproto.pactus.GetNewAddressRequest.prototype.getLabel = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNewAddressRequest} returns this\n */\nproto.pactus.GetNewAddressRequest.prototype.setLabel = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string password = 4;\n * @return {string}\n */\nproto.pactus.GetNewAddressRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNewAddressRequest} returns this\n */\nproto.pactus.GetNewAddressRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetNewAddressResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetNewAddressResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetNewAddressResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNewAddressResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddr: (f = msg.getAddr()) && proto.pactus.AddressInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetNewAddressResponse}\n */\nproto.pactus.GetNewAddressResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetNewAddressResponse;\n  return proto.pactus.GetNewAddressResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetNewAddressResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetNewAddressResponse}\n */\nproto.pactus.GetNewAddressResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = new proto.pactus.AddressInfo;\n      reader.readMessage(value,proto.pactus.AddressInfo.deserializeBinaryFromReader);\n      msg.setAddr(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetNewAddressResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetNewAddressResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetNewAddressResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetNewAddressResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddr();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      proto.pactus.AddressInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetNewAddressResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetNewAddressResponse} returns this\n */\nproto.pactus.GetNewAddressResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional AddressInfo addr = 2;\n * @return {?proto.pactus.AddressInfo}\n */\nproto.pactus.GetNewAddressResponse.prototype.getAddr = function() {\n  return /** @type{?proto.pactus.AddressInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.AddressInfo, 2));\n};\n\n\n/**\n * @param {?proto.pactus.AddressInfo|undefined} value\n * @return {!proto.pactus.GetNewAddressResponse} returns this\n*/\nproto.pactus.GetNewAddressResponse.prototype.setAddr = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetNewAddressResponse} returns this\n */\nproto.pactus.GetNewAddressResponse.prototype.clearAddr = function() {\n  return this.setAddr(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetNewAddressResponse.prototype.hasAddr = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.RestoreWalletRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.RestoreWalletRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.RestoreWalletRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.RestoreWalletRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nmnemonic: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.RestoreWalletRequest}\n */\nproto.pactus.RestoreWalletRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.RestoreWalletRequest;\n  return proto.pactus.RestoreWalletRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.RestoreWalletRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.RestoreWalletRequest}\n */\nproto.pactus.RestoreWalletRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMnemonic(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.RestoreWalletRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.RestoreWalletRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.RestoreWalletRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.RestoreWalletRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getMnemonic();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.RestoreWalletRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.RestoreWalletRequest} returns this\n */\nproto.pactus.RestoreWalletRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string mnemonic = 2;\n * @return {string}\n */\nproto.pactus.RestoreWalletRequest.prototype.getMnemonic = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.RestoreWalletRequest} returns this\n */\nproto.pactus.RestoreWalletRequest.prototype.setMnemonic = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string password = 3;\n * @return {string}\n */\nproto.pactus.RestoreWalletRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.RestoreWalletRequest} returns this\n */\nproto.pactus.RestoreWalletRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.RestoreWalletResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.RestoreWalletResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.RestoreWalletResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.RestoreWalletResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.RestoreWalletResponse}\n */\nproto.pactus.RestoreWalletResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.RestoreWalletResponse;\n  return proto.pactus.RestoreWalletResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.RestoreWalletResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.RestoreWalletResponse}\n */\nproto.pactus.RestoreWalletResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.RestoreWalletResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.RestoreWalletResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.RestoreWalletResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.RestoreWalletResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.RestoreWalletResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.RestoreWalletResponse} returns this\n */\nproto.pactus.RestoreWalletResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CreateWalletRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CreateWalletRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CreateWalletRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CreateWalletRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CreateWalletRequest}\n */\nproto.pactus.CreateWalletRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CreateWalletRequest;\n  return proto.pactus.CreateWalletRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CreateWalletRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CreateWalletRequest}\n */\nproto.pactus.CreateWalletRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CreateWalletRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CreateWalletRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CreateWalletRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CreateWalletRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.CreateWalletRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CreateWalletRequest} returns this\n */\nproto.pactus.CreateWalletRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string password = 2;\n * @return {string}\n */\nproto.pactus.CreateWalletRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CreateWalletRequest} returns this\n */\nproto.pactus.CreateWalletRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.CreateWalletResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.CreateWalletResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.CreateWalletResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CreateWalletResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nmnemonic: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.CreateWalletResponse}\n */\nproto.pactus.CreateWalletResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.CreateWalletResponse;\n  return proto.pactus.CreateWalletResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.CreateWalletResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.CreateWalletResponse}\n */\nproto.pactus.CreateWalletResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMnemonic(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.CreateWalletResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.CreateWalletResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.CreateWalletResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.CreateWalletResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getMnemonic();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.CreateWalletResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CreateWalletResponse} returns this\n */\nproto.pactus.CreateWalletResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string mnemonic = 2;\n * @return {string}\n */\nproto.pactus.CreateWalletResponse.prototype.getMnemonic = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.CreateWalletResponse} returns this\n */\nproto.pactus.CreateWalletResponse.prototype.setMnemonic = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.LoadWalletRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.LoadWalletRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.LoadWalletRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.LoadWalletRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.LoadWalletRequest}\n */\nproto.pactus.LoadWalletRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.LoadWalletRequest;\n  return proto.pactus.LoadWalletRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.LoadWalletRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.LoadWalletRequest}\n */\nproto.pactus.LoadWalletRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.LoadWalletRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.LoadWalletRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.LoadWalletRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.LoadWalletRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.LoadWalletRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.LoadWalletRequest} returns this\n */\nproto.pactus.LoadWalletRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.LoadWalletResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.LoadWalletResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.LoadWalletResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.LoadWalletResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.LoadWalletResponse}\n */\nproto.pactus.LoadWalletResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.LoadWalletResponse;\n  return proto.pactus.LoadWalletResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.LoadWalletResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.LoadWalletResponse}\n */\nproto.pactus.LoadWalletResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.LoadWalletResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.LoadWalletResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.LoadWalletResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.LoadWalletResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.LoadWalletResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.LoadWalletResponse} returns this\n */\nproto.pactus.LoadWalletResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.UnloadWalletRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.UnloadWalletRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.UnloadWalletRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UnloadWalletRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.UnloadWalletRequest}\n */\nproto.pactus.UnloadWalletRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.UnloadWalletRequest;\n  return proto.pactus.UnloadWalletRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.UnloadWalletRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.UnloadWalletRequest}\n */\nproto.pactus.UnloadWalletRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.UnloadWalletRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.UnloadWalletRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.UnloadWalletRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UnloadWalletRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.UnloadWalletRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UnloadWalletRequest} returns this\n */\nproto.pactus.UnloadWalletRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.UnloadWalletResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.UnloadWalletResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.UnloadWalletResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UnloadWalletResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.UnloadWalletResponse}\n */\nproto.pactus.UnloadWalletResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.UnloadWalletResponse;\n  return proto.pactus.UnloadWalletResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.UnloadWalletResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.UnloadWalletResponse}\n */\nproto.pactus.UnloadWalletResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.UnloadWalletResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.UnloadWalletResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.UnloadWalletResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UnloadWalletResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.UnloadWalletResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UnloadWalletResponse} returns this\n */\nproto.pactus.UnloadWalletResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorAddressRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorAddressRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorAddressRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\npublicKey: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorAddressRequest}\n */\nproto.pactus.GetValidatorAddressRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorAddressRequest;\n  return proto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorAddressRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorAddressRequest}\n */\nproto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPublicKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorAddressRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorAddressRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPublicKey();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string public_key = 1;\n * @return {string}\n */\nproto.pactus.GetValidatorAddressRequest.prototype.getPublicKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetValidatorAddressRequest} returns this\n */\nproto.pactus.GetValidatorAddressRequest.prototype.setPublicKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetValidatorAddressResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetValidatorAddressResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetValidatorAddressResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\naddress: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetValidatorAddressResponse}\n */\nproto.pactus.GetValidatorAddressResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetValidatorAddressResponse;\n  return proto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetValidatorAddressResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetValidatorAddressResponse}\n */\nproto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetValidatorAddressResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetValidatorAddressResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string address = 1;\n * @return {string}\n */\nproto.pactus.GetValidatorAddressResponse.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetValidatorAddressResponse} returns this\n */\nproto.pactus.GetValidatorAddressResponse.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignRawTransactionRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignRawTransactionRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignRawTransactionRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignRawTransactionRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nrawTransaction: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignRawTransactionRequest}\n */\nproto.pactus.SignRawTransactionRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignRawTransactionRequest;\n  return proto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignRawTransactionRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignRawTransactionRequest}\n */\nproto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setRawTransaction(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignRawTransactionRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignRawTransactionRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignRawTransactionRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignRawTransactionRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SignRawTransactionRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignRawTransactionRequest} returns this\n */\nproto.pactus.SignRawTransactionRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string raw_transaction = 2;\n * @return {string}\n */\nproto.pactus.SignRawTransactionRequest.prototype.getRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignRawTransactionRequest} returns this\n */\nproto.pactus.SignRawTransactionRequest.prototype.setRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string password = 3;\n * @return {string}\n */\nproto.pactus.SignRawTransactionRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignRawTransactionRequest} returns this\n */\nproto.pactus.SignRawTransactionRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignRawTransactionResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignRawTransactionResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignRawTransactionResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignRawTransactionResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\ntransactionId: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nsignedRawTransaction: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignRawTransactionResponse}\n */\nproto.pactus.SignRawTransactionResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignRawTransactionResponse;\n  return proto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignRawTransactionResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignRawTransactionResponse}\n */\nproto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setTransactionId(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignedRawTransaction(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignRawTransactionResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignRawTransactionResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignRawTransactionResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignRawTransactionResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getTransactionId();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getSignedRawTransaction();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string transaction_id = 1;\n * @return {string}\n */\nproto.pactus.SignRawTransactionResponse.prototype.getTransactionId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignRawTransactionResponse} returns this\n */\nproto.pactus.SignRawTransactionResponse.prototype.setTransactionId = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string signed_raw_transaction = 2;\n * @return {string}\n */\nproto.pactus.SignRawTransactionResponse.prototype.getSignedRawTransaction = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignRawTransactionResponse} returns this\n */\nproto.pactus.SignRawTransactionResponse.prototype.setSignedRawTransaction = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTotalBalanceRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTotalBalanceRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTotalBalanceRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalBalanceRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTotalBalanceRequest}\n */\nproto.pactus.GetTotalBalanceRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTotalBalanceRequest;\n  return proto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTotalBalanceRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTotalBalanceRequest}\n */\nproto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTotalBalanceRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTotalBalanceRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetTotalBalanceRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetTotalBalanceRequest} returns this\n */\nproto.pactus.GetTotalBalanceRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTotalBalanceResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTotalBalanceResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTotalBalanceResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalBalanceResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ntotalBalance: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTotalBalanceResponse}\n */\nproto.pactus.GetTotalBalanceResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTotalBalanceResponse;\n  return proto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTotalBalanceResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTotalBalanceResponse}\n */\nproto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setTotalBalance(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTotalBalanceResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTotalBalanceResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getTotalBalance();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetTotalBalanceResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetTotalBalanceResponse} returns this\n */\nproto.pactus.GetTotalBalanceResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int64 total_balance = 2;\n * @return {number}\n */\nproto.pactus.GetTotalBalanceResponse.prototype.getTotalBalance = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetTotalBalanceResponse} returns this\n */\nproto.pactus.GetTotalBalanceResponse.prototype.setTotalBalance = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignMessageRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignMessageRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignMessageRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nmessage: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignMessageRequest}\n */\nproto.pactus.SignMessageRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignMessageRequest;\n  return proto.pactus.SignMessageRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignMessageRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignMessageRequest}\n */\nproto.pactus.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMessage(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignMessageRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignMessageRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignMessageRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getMessage();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SignMessageRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageRequest} returns this\n */\nproto.pactus.SignMessageRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string password = 2;\n * @return {string}\n */\nproto.pactus.SignMessageRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageRequest} returns this\n */\nproto.pactus.SignMessageRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string address = 3;\n * @return {string}\n */\nproto.pactus.SignMessageRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageRequest} returns this\n */\nproto.pactus.SignMessageRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string message = 4;\n * @return {string}\n */\nproto.pactus.SignMessageRequest.prototype.getMessage = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageRequest} returns this\n */\nproto.pactus.SignMessageRequest.prototype.setMessage = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SignMessageResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SignMessageResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SignMessageResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nsignature: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SignMessageResponse}\n */\nproto.pactus.SignMessageResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SignMessageResponse;\n  return proto.pactus.SignMessageResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SignMessageResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SignMessageResponse}\n */\nproto.pactus.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSignature(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SignMessageResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SignMessageResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SignMessageResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SignMessageResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getSignature();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string signature = 1;\n * @return {string}\n */\nproto.pactus.SignMessageResponse.prototype.getSignature = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SignMessageResponse} returns this\n */\nproto.pactus.SignMessageResponse.prototype.setSignature = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTotalStakeRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTotalStakeRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTotalStakeRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalStakeRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTotalStakeRequest}\n */\nproto.pactus.GetTotalStakeRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTotalStakeRequest;\n  return proto.pactus.GetTotalStakeRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTotalStakeRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTotalStakeRequest}\n */\nproto.pactus.GetTotalStakeRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTotalStakeRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTotalStakeRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTotalStakeRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalStakeRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetTotalStakeRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetTotalStakeRequest} returns this\n */\nproto.pactus.GetTotalStakeRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetTotalStakeResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetTotalStakeResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetTotalStakeResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalStakeResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ntotalStake: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetTotalStakeResponse}\n */\nproto.pactus.GetTotalStakeResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetTotalStakeResponse;\n  return proto.pactus.GetTotalStakeResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetTotalStakeResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetTotalStakeResponse}\n */\nproto.pactus.GetTotalStakeResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setTotalStake(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetTotalStakeResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetTotalStakeResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetTotalStakeResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetTotalStakeResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getTotalStake();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetTotalStakeResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetTotalStakeResponse} returns this\n */\nproto.pactus.GetTotalStakeResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int64 total_stake = 2;\n * @return {number}\n */\nproto.pactus.GetTotalStakeResponse.prototype.getTotalStake = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetTotalStakeResponse} returns this\n */\nproto.pactus.GetTotalStakeResponse.prototype.setTotalStake = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetAddressInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetAddressInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetAddressInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAddressInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetAddressInfoRequest}\n */\nproto.pactus.GetAddressInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetAddressInfoRequest;\n  return proto.pactus.GetAddressInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetAddressInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetAddressInfoRequest}\n */\nproto.pactus.GetAddressInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetAddressInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetAddressInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetAddressInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAddressInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetAddressInfoRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetAddressInfoRequest} returns this\n */\nproto.pactus.GetAddressInfoRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string address = 2;\n * @return {string}\n */\nproto.pactus.GetAddressInfoRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetAddressInfoRequest} returns this\n */\nproto.pactus.GetAddressInfoRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetAddressInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetAddressInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetAddressInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAddressInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddr: (f = msg.getAddr()) && proto.pactus.AddressInfo.toObject(includeInstance, f)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetAddressInfoResponse}\n */\nproto.pactus.GetAddressInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetAddressInfoResponse;\n  return proto.pactus.GetAddressInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetAddressInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetAddressInfoResponse}\n */\nproto.pactus.GetAddressInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = new proto.pactus.AddressInfo;\n      reader.readMessage(value,proto.pactus.AddressInfo.deserializeBinaryFromReader);\n      msg.setAddr(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetAddressInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetAddressInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetAddressInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetAddressInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddr();\n  if (f != null) {\n    writer.writeMessage(\n      2,\n      f,\n      proto.pactus.AddressInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetAddressInfoResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetAddressInfoResponse} returns this\n */\nproto.pactus.GetAddressInfoResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional AddressInfo addr = 2;\n * @return {?proto.pactus.AddressInfo}\n */\nproto.pactus.GetAddressInfoResponse.prototype.getAddr = function() {\n  return /** @type{?proto.pactus.AddressInfo} */ (\n    jspb.Message.getWrapperField(this, proto.pactus.AddressInfo, 2));\n};\n\n\n/**\n * @param {?proto.pactus.AddressInfo|undefined} value\n * @return {!proto.pactus.GetAddressInfoResponse} returns this\n*/\nproto.pactus.GetAddressInfoResponse.prototype.setAddr = function(value) {\n  return jspb.Message.setWrapperField(this, 2, value);\n};\n\n\n/**\n * Clears the message field making it undefined.\n * @return {!proto.pactus.GetAddressInfoResponse} returns this\n */\nproto.pactus.GetAddressInfoResponse.prototype.clearAddr = function() {\n  return this.setAddr(undefined);\n};\n\n\n/**\n * Returns whether this field is set.\n * @return {boolean}\n */\nproto.pactus.GetAddressInfoResponse.prototype.hasAddr = function() {\n  return jspb.Message.getField(this, 2) != null;\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SetAddressLabelRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SetAddressLabelRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SetAddressLabelRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetAddressLabelRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nlabel: jspb.Message.getFieldWithDefault(msg, 4, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SetAddressLabelRequest}\n */\nproto.pactus.SetAddressLabelRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SetAddressLabelRequest;\n  return proto.pactus.SetAddressLabelRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SetAddressLabelRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SetAddressLabelRequest}\n */\nproto.pactus.SetAddressLabelRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLabel(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SetAddressLabelRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SetAddressLabelRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SetAddressLabelRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetAddressLabelRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getLabel();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SetAddressLabelRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelRequest} returns this\n */\nproto.pactus.SetAddressLabelRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string password = 2;\n * @return {string}\n */\nproto.pactus.SetAddressLabelRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelRequest} returns this\n */\nproto.pactus.SetAddressLabelRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string address = 3;\n * @return {string}\n */\nproto.pactus.SetAddressLabelRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelRequest} returns this\n */\nproto.pactus.SetAddressLabelRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string label = 4;\n * @return {string}\n */\nproto.pactus.SetAddressLabelRequest.prototype.getLabel = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelRequest} returns this\n */\nproto.pactus.SetAddressLabelRequest.prototype.setLabel = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SetAddressLabelResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SetAddressLabelResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SetAddressLabelResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetAddressLabelResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nlabel: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SetAddressLabelResponse}\n */\nproto.pactus.SetAddressLabelResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SetAddressLabelResponse;\n  return proto.pactus.SetAddressLabelResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SetAddressLabelResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SetAddressLabelResponse}\n */\nproto.pactus.SetAddressLabelResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setLabel(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SetAddressLabelResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SetAddressLabelResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SetAddressLabelResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetAddressLabelResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getLabel();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SetAddressLabelResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelResponse} returns this\n */\nproto.pactus.SetAddressLabelResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string address = 2;\n * @return {string}\n */\nproto.pactus.SetAddressLabelResponse.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelResponse} returns this\n */\nproto.pactus.SetAddressLabelResponse.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string label = 3;\n * @return {string}\n */\nproto.pactus.SetAddressLabelResponse.prototype.getLabel = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetAddressLabelResponse} returns this\n */\nproto.pactus.SetAddressLabelResponse.prototype.setLabel = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListWalletsRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListWalletsRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListWalletsRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListWalletsRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\n\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListWalletsRequest}\n */\nproto.pactus.ListWalletsRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListWalletsRequest;\n  return proto.pactus.ListWalletsRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListWalletsRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListWalletsRequest}\n */\nproto.pactus.ListWalletsRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListWalletsRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListWalletsRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListWalletsRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListWalletsRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ListWalletsResponse.repeatedFields_ = [1];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListWalletsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListWalletsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListWalletsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListWalletsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListWalletsResponse}\n */\nproto.pactus.ListWalletsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListWalletsResponse;\n  return proto.pactus.ListWalletsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListWalletsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListWalletsResponse}\n */\nproto.pactus.ListWalletsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.addWallets(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListWalletsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListWalletsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListWalletsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListWalletsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletsList();\n  if (f.length > 0) {\n    writer.writeRepeatedString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * repeated string wallets = 1;\n * @return {!Array<string>}\n */\nproto.pactus.ListWalletsResponse.prototype.getWalletsList = function() {\n  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));\n};\n\n\n/**\n * @param {!Array<string>} value\n * @return {!proto.pactus.ListWalletsResponse} returns this\n */\nproto.pactus.ListWalletsResponse.prototype.setWalletsList = function(value) {\n  return jspb.Message.setField(this, 1, value || []);\n};\n\n\n/**\n * @param {string} value\n * @param {number=} opt_index\n * @return {!proto.pactus.ListWalletsResponse} returns this\n */\nproto.pactus.ListWalletsResponse.prototype.addWallets = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 1, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ListWalletsResponse} returns this\n */\nproto.pactus.ListWalletsResponse.prototype.clearWalletsList = function() {\n  return this.setWalletsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetWalletInfoRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetWalletInfoRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetWalletInfoRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetWalletInfoRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetWalletInfoRequest}\n */\nproto.pactus.GetWalletInfoRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetWalletInfoRequest;\n  return proto.pactus.GetWalletInfoRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetWalletInfoRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetWalletInfoRequest}\n */\nproto.pactus.GetWalletInfoRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetWalletInfoRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetWalletInfoRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetWalletInfoRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetWalletInfoRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetWalletInfoRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoRequest} returns this\n */\nproto.pactus.GetWalletInfoRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetWalletInfoResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetWalletInfoResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetWalletInfoResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetWalletInfoResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\nversion: jspb.Message.getFieldWithDefault(msg, 2, 0),\nnetwork: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nencrypted: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),\nuuid: jspb.Message.getFieldWithDefault(msg, 5, \"\"),\ncreatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0),\ndefaultFee: jspb.Message.getFieldWithDefault(msg, 7, 0),\ndriver: jspb.Message.getFieldWithDefault(msg, 8, \"\"),\npath: jspb.Message.getFieldWithDefault(msg, 9, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetWalletInfoResponse}\n */\nproto.pactus.GetWalletInfoResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetWalletInfoResponse;\n  return proto.pactus.GetWalletInfoResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetWalletInfoResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetWalletInfoResponse}\n */\nproto.pactus.GetWalletInfoResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setVersion(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setNetwork(value);\n      break;\n    case 4:\n      var value = /** @type {boolean} */ (reader.readBool());\n      msg.setEncrypted(value);\n      break;\n    case 5:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setUuid(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setCreatedAt(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setDefaultFee(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setDriver(value);\n      break;\n    case 9:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPath(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetWalletInfoResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetWalletInfoResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetWalletInfoResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetWalletInfoResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getVersion();\n  if (f !== 0) {\n    writer.writeInt32(\n      2,\n      f\n    );\n  }\n  f = message.getNetwork();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getEncrypted();\n  if (f) {\n    writer.writeBool(\n      4,\n      f\n    );\n  }\n  f = message.getUuid();\n  if (f.length > 0) {\n    writer.writeString(\n      5,\n      f\n    );\n  }\n  f = message.getCreatedAt();\n  if (f !== 0) {\n    writer.writeInt64(\n      6,\n      f\n    );\n  }\n  f = message.getDefaultFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      7,\n      f\n    );\n  }\n  f = message.getDriver();\n  if (f.length > 0) {\n    writer.writeString(\n      8,\n      f\n    );\n  }\n  f = message.getPath();\n  if (f.length > 0) {\n    writer.writeString(\n      9,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int32 version = 2;\n * @return {number}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getVersion = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setVersion = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n/**\n * optional string network = 3;\n * @return {string}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getNetwork = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setNetwork = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional bool encrypted = 4;\n * @return {boolean}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getEncrypted = function() {\n  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));\n};\n\n\n/**\n * @param {boolean} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setEncrypted = function(value) {\n  return jspb.Message.setProto3BooleanField(this, 4, value);\n};\n\n\n/**\n * optional string uuid = 5;\n * @return {string}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getUuid = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setUuid = function(value) {\n  return jspb.Message.setProto3StringField(this, 5, value);\n};\n\n\n/**\n * optional int64 created_at = 6;\n * @return {number}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getCreatedAt = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setCreatedAt = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional int64 default_fee = 7;\n * @return {number}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getDefaultFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setDefaultFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional string driver = 8;\n * @return {string}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getDriver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setDriver = function(value) {\n  return jspb.Message.setProto3StringField(this, 8, value);\n};\n\n\n/**\n * optional string path = 9;\n * @return {string}\n */\nproto.pactus.GetWalletInfoResponse.prototype.getPath = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetWalletInfoResponse} returns this\n */\nproto.pactus.GetWalletInfoResponse.prototype.setPath = function(value) {\n  return jspb.Message.setProto3StringField(this, 9, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ListAddressesRequest.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListAddressesRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListAddressesRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListAddressesRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListAddressesRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddressTypesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListAddressesRequest}\n */\nproto.pactus.ListAddressesRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListAddressesRequest;\n  return proto.pactus.ListAddressesRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListAddressesRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListAddressesRequest}\n */\nproto.pactus.ListAddressesRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      reader.readPackableEnumInto(msg.getAddressTypesList());\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListAddressesRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListAddressesRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListAddressesRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListAddressesRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddressTypesList();\n  if (f.length > 0) {\n    writer.writePackedEnum(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.ListAddressesRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ListAddressesRequest} returns this\n */\nproto.pactus.ListAddressesRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated AddressType address_types = 2;\n * @return {!Array<!proto.pactus.AddressType>}\n */\nproto.pactus.ListAddressesRequest.prototype.getAddressTypesList = function() {\n  return /** @type {!Array<!proto.pactus.AddressType>} */ (jspb.Message.getRepeatedField(this, 2));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.AddressType>} value\n * @return {!proto.pactus.ListAddressesRequest} returns this\n */\nproto.pactus.ListAddressesRequest.prototype.setAddressTypesList = function(value) {\n  return jspb.Message.setField(this, 2, value || []);\n};\n\n\n/**\n * @param {!proto.pactus.AddressType} value\n * @param {number=} opt_index\n * @return {!proto.pactus.ListAddressesRequest} returns this\n */\nproto.pactus.ListAddressesRequest.prototype.addAddressTypes = function(value, opt_index) {\n  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ListAddressesRequest} returns this\n */\nproto.pactus.ListAddressesRequest.prototype.clearAddressTypesList = function() {\n  return this.setAddressTypesList([]);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ListAddressesResponse.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListAddressesResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListAddressesResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListAddressesResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListAddressesResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddrsList: jspb.Message.toObjectList(msg.getAddrsList(),\n    proto.pactus.AddressInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListAddressesResponse}\n */\nproto.pactus.ListAddressesResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListAddressesResponse;\n  return proto.pactus.ListAddressesResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListAddressesResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListAddressesResponse}\n */\nproto.pactus.ListAddressesResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = new proto.pactus.AddressInfo;\n      reader.readMessage(value,proto.pactus.AddressInfo.deserializeBinaryFromReader);\n      msg.addAddrs(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListAddressesResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListAddressesResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListAddressesResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListAddressesResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddrsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      proto.pactus.AddressInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.ListAddressesResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ListAddressesResponse} returns this\n */\nproto.pactus.ListAddressesResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated AddressInfo addrs = 2;\n * @return {!Array<!proto.pactus.AddressInfo>}\n */\nproto.pactus.ListAddressesResponse.prototype.getAddrsList = function() {\n  return /** @type{!Array<!proto.pactus.AddressInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.AddressInfo, 2));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.AddressInfo>} value\n * @return {!proto.pactus.ListAddressesResponse} returns this\n*/\nproto.pactus.ListAddressesResponse.prototype.setAddrsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.pactus.AddressInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.AddressInfo}\n */\nproto.pactus.ListAddressesResponse.prototype.addAddrs = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.AddressInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ListAddressesResponse} returns this\n */\nproto.pactus.ListAddressesResponse.prototype.clearAddrsList = function() {\n  return this.setAddrsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.UpdatePasswordRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.UpdatePasswordRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.UpdatePasswordRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UpdatePasswordRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\noldPassword: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nnewPassword: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.UpdatePasswordRequest}\n */\nproto.pactus.UpdatePasswordRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.UpdatePasswordRequest;\n  return proto.pactus.UpdatePasswordRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.UpdatePasswordRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.UpdatePasswordRequest}\n */\nproto.pactus.UpdatePasswordRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setOldPassword(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setNewPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.UpdatePasswordRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.UpdatePasswordRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.UpdatePasswordRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UpdatePasswordRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getOldPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getNewPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.UpdatePasswordRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UpdatePasswordRequest} returns this\n */\nproto.pactus.UpdatePasswordRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string old_password = 2;\n * @return {string}\n */\nproto.pactus.UpdatePasswordRequest.prototype.getOldPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UpdatePasswordRequest} returns this\n */\nproto.pactus.UpdatePasswordRequest.prototype.setOldPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string new_password = 3;\n * @return {string}\n */\nproto.pactus.UpdatePasswordRequest.prototype.getNewPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UpdatePasswordRequest} returns this\n */\nproto.pactus.UpdatePasswordRequest.prototype.setNewPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.UpdatePasswordResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.UpdatePasswordResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.UpdatePasswordResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UpdatePasswordResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.UpdatePasswordResponse}\n */\nproto.pactus.UpdatePasswordResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.UpdatePasswordResponse;\n  return proto.pactus.UpdatePasswordResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.UpdatePasswordResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.UpdatePasswordResponse}\n */\nproto.pactus.UpdatePasswordResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.UpdatePasswordResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.UpdatePasswordResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.UpdatePasswordResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.UpdatePasswordResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.UpdatePasswordResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.UpdatePasswordResponse} returns this\n */\nproto.pactus.UpdatePasswordResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.WalletTransactionInfo.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.WalletTransactionInfo.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.WalletTransactionInfo} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.WalletTransactionInfo.toObject = function(includeInstance, msg) {\n  var f, obj = {\nno: jspb.Message.getFieldWithDefault(msg, 1, 0),\ntxId: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\nsender: jspb.Message.getFieldWithDefault(msg, 3, \"\"),\nreceiver: jspb.Message.getFieldWithDefault(msg, 4, \"\"),\ndirection: jspb.Message.getFieldWithDefault(msg, 5, 0),\namount: jspb.Message.getFieldWithDefault(msg, 6, 0),\nfee: jspb.Message.getFieldWithDefault(msg, 7, 0),\nmemo: jspb.Message.getFieldWithDefault(msg, 8, \"\"),\nstatus: jspb.Message.getFieldWithDefault(msg, 9, 0),\nblockHeight: jspb.Message.getFieldWithDefault(msg, 10, 0),\npayloadType: jspb.Message.getFieldWithDefault(msg, 11, 0),\ndata: msg.getData_asB64(),\ncomment: jspb.Message.getFieldWithDefault(msg, 13, \"\"),\ncreatedAt: jspb.Message.getFieldWithDefault(msg, 14, 0),\nupdatedAt: jspb.Message.getFieldWithDefault(msg, 15, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.WalletTransactionInfo}\n */\nproto.pactus.WalletTransactionInfo.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.WalletTransactionInfo;\n  return proto.pactus.WalletTransactionInfo.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.WalletTransactionInfo} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.WalletTransactionInfo}\n */\nproto.pactus.WalletTransactionInfo.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setNo(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setTxId(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setSender(value);\n      break;\n    case 4:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setReceiver(value);\n      break;\n    case 5:\n      var value = /** @type {!proto.pactus.TxDirection} */ (reader.readEnum());\n      msg.setDirection(value);\n      break;\n    case 6:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    case 7:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setFee(value);\n      break;\n    case 8:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMemo(value);\n      break;\n    case 9:\n      var value = /** @type {!proto.pactus.TransactionStatus} */ (reader.readEnum());\n      msg.setStatus(value);\n      break;\n    case 10:\n      var value = /** @type {number} */ (reader.readUint32());\n      msg.setBlockHeight(value);\n      break;\n    case 11:\n      var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum());\n      msg.setPayloadType(value);\n      break;\n    case 12:\n      var value = /** @type {!Uint8Array} */ (reader.readBytes());\n      msg.setData(value);\n      break;\n    case 13:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setComment(value);\n      break;\n    case 14:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setCreatedAt(value);\n      break;\n    case 15:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setUpdatedAt(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.WalletTransactionInfo.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.WalletTransactionInfo.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.WalletTransactionInfo} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.WalletTransactionInfo.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getNo();\n  if (f !== 0) {\n    writer.writeInt64(\n      1,\n      f\n    );\n  }\n  f = message.getTxId();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getSender();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n  f = message.getReceiver();\n  if (f.length > 0) {\n    writer.writeString(\n      4,\n      f\n    );\n  }\n  f = message.getDirection();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      5,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      6,\n      f\n    );\n  }\n  f = message.getFee();\n  if (f !== 0) {\n    writer.writeInt64(\n      7,\n      f\n    );\n  }\n  f = message.getMemo();\n  if (f.length > 0) {\n    writer.writeString(\n      8,\n      f\n    );\n  }\n  f = message.getStatus();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      9,\n      f\n    );\n  }\n  f = message.getBlockHeight();\n  if (f !== 0) {\n    writer.writeUint32(\n      10,\n      f\n    );\n  }\n  f = message.getPayloadType();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      11,\n      f\n    );\n  }\n  f = message.getData_asU8();\n  if (f.length > 0) {\n    writer.writeBytes(\n      12,\n      f\n    );\n  }\n  f = message.getComment();\n  if (f.length > 0) {\n    writer.writeString(\n      13,\n      f\n    );\n  }\n  f = message.getCreatedAt();\n  if (f !== 0) {\n    writer.writeInt64(\n      14,\n      f\n    );\n  }\n  f = message.getUpdatedAt();\n  if (f !== 0) {\n    writer.writeInt64(\n      15,\n      f\n    );\n  }\n};\n\n\n/**\n * optional int64 no = 1;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getNo = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setNo = function(value) {\n  return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional string tx_id = 2;\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getTxId = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setTxId = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string sender = 3;\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getSender = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setSender = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n/**\n * optional string receiver = 4;\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getReceiver = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setReceiver = function(value) {\n  return jspb.Message.setProto3StringField(this, 4, value);\n};\n\n\n/**\n * optional TxDirection direction = 5;\n * @return {!proto.pactus.TxDirection}\n */\nproto.pactus.WalletTransactionInfo.prototype.getDirection = function() {\n  return /** @type {!proto.pactus.TxDirection} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {!proto.pactus.TxDirection} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setDirection = function(value) {\n  return jspb.Message.setProto3EnumField(this, 5, value);\n};\n\n\n/**\n * optional int64 amount = 6;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 6, value);\n};\n\n\n/**\n * optional int64 fee = 7;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getFee = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setFee = function(value) {\n  return jspb.Message.setProto3IntField(this, 7, value);\n};\n\n\n/**\n * optional string memo = 8;\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getMemo = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setMemo = function(value) {\n  return jspb.Message.setProto3StringField(this, 8, value);\n};\n\n\n/**\n * optional TransactionStatus status = 9;\n * @return {!proto.pactus.TransactionStatus}\n */\nproto.pactus.WalletTransactionInfo.prototype.getStatus = function() {\n  return /** @type {!proto.pactus.TransactionStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0));\n};\n\n\n/**\n * @param {!proto.pactus.TransactionStatus} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setStatus = function(value) {\n  return jspb.Message.setProto3EnumField(this, 9, value);\n};\n\n\n/**\n * optional uint32 block_height = 10;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getBlockHeight = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setBlockHeight = function(value) {\n  return jspb.Message.setProto3IntField(this, 10, value);\n};\n\n\n/**\n * optional PayloadType payload_type = 11;\n * @return {!proto.pactus.PayloadType}\n */\nproto.pactus.WalletTransactionInfo.prototype.getPayloadType = function() {\n  return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 11, 0));\n};\n\n\n/**\n * @param {!proto.pactus.PayloadType} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setPayloadType = function(value) {\n  return jspb.Message.setProto3EnumField(this, 11, value);\n};\n\n\n/**\n * optional bytes data = 12;\n * @return {!(string|Uint8Array)}\n */\nproto.pactus.WalletTransactionInfo.prototype.getData = function() {\n  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, \"\"));\n};\n\n\n/**\n * optional bytes data = 12;\n * This is a type-conversion wrapper around `getData()`\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getData_asB64 = function() {\n  return /** @type {string} */ (jspb.Message.bytesAsB64(\n      this.getData()));\n};\n\n\n/**\n * optional bytes data = 12;\n * Note that Uint8Array is not supported on all browsers.\n * @see http://caniuse.com/Uint8Array\n * This is a type-conversion wrapper around `getData()`\n * @return {!Uint8Array}\n */\nproto.pactus.WalletTransactionInfo.prototype.getData_asU8 = function() {\n  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(\n      this.getData()));\n};\n\n\n/**\n * @param {!(string|Uint8Array)} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setData = function(value) {\n  return jspb.Message.setProto3BytesField(this, 12, value);\n};\n\n\n/**\n * optional string comment = 13;\n * @return {string}\n */\nproto.pactus.WalletTransactionInfo.prototype.getComment = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setComment = function(value) {\n  return jspb.Message.setProto3StringField(this, 13, value);\n};\n\n\n/**\n * optional int64 created_at = 14;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getCreatedAt = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setCreatedAt = function(value) {\n  return jspb.Message.setProto3IntField(this, 14, value);\n};\n\n\n/**\n * optional int64 updated_at = 15;\n * @return {number}\n */\nproto.pactus.WalletTransactionInfo.prototype.getUpdatedAt = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.WalletTransactionInfo} returns this\n */\nproto.pactus.WalletTransactionInfo.prototype.setUpdatedAt = function(value) {\n  return jspb.Message.setProto3IntField(this, 15, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListTransactionsRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListTransactionsRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListTransactionsRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListTransactionsRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\ndirection: jspb.Message.getFieldWithDefault(msg, 3, 0),\ncount: jspb.Message.getFieldWithDefault(msg, 4, 0),\nskip: jspb.Message.getFieldWithDefault(msg, 5, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListTransactionsRequest}\n */\nproto.pactus.ListTransactionsRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListTransactionsRequest;\n  return proto.pactus.ListTransactionsRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListTransactionsRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListTransactionsRequest}\n */\nproto.pactus.ListTransactionsRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    case 3:\n      var value = /** @type {!proto.pactus.TxDirection} */ (reader.readEnum());\n      msg.setDirection(value);\n      break;\n    case 4:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setCount(value);\n      break;\n    case 5:\n      var value = /** @type {number} */ (reader.readInt32());\n      msg.setSkip(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListTransactionsRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListTransactionsRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListTransactionsRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListTransactionsRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getDirection();\n  if (f !== 0.0) {\n    writer.writeEnum(\n      3,\n      f\n    );\n  }\n  f = message.getCount();\n  if (f !== 0) {\n    writer.writeInt32(\n      4,\n      f\n    );\n  }\n  f = message.getSkip();\n  if (f !== 0) {\n    writer.writeInt32(\n      5,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.ListTransactionsRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ListTransactionsRequest} returns this\n */\nproto.pactus.ListTransactionsRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string address = 2;\n * @return {string}\n */\nproto.pactus.ListTransactionsRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ListTransactionsRequest} returns this\n */\nproto.pactus.ListTransactionsRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional TxDirection direction = 3;\n * @return {!proto.pactus.TxDirection}\n */\nproto.pactus.ListTransactionsRequest.prototype.getDirection = function() {\n  return /** @type {!proto.pactus.TxDirection} */ (jspb.Message.getFieldWithDefault(this, 3, 0));\n};\n\n\n/**\n * @param {!proto.pactus.TxDirection} value\n * @return {!proto.pactus.ListTransactionsRequest} returns this\n */\nproto.pactus.ListTransactionsRequest.prototype.setDirection = function(value) {\n  return jspb.Message.setProto3EnumField(this, 3, value);\n};\n\n\n/**\n * optional int32 count = 4;\n * @return {number}\n */\nproto.pactus.ListTransactionsRequest.prototype.getCount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ListTransactionsRequest} returns this\n */\nproto.pactus.ListTransactionsRequest.prototype.setCount = function(value) {\n  return jspb.Message.setProto3IntField(this, 4, value);\n};\n\n\n/**\n * optional int32 skip = 5;\n * @return {number}\n */\nproto.pactus.ListTransactionsRequest.prototype.getSkip = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.ListTransactionsRequest} returns this\n */\nproto.pactus.ListTransactionsRequest.prototype.setSkip = function(value) {\n  return jspb.Message.setProto3IntField(this, 5, value);\n};\n\n\n\n/**\n * List of repeated fields within this message type.\n * @private {!Array<number>}\n * @const\n */\nproto.pactus.ListTransactionsResponse.repeatedFields_ = [2];\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.ListTransactionsResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.ListTransactionsResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.ListTransactionsResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListTransactionsResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\ntxsList: jspb.Message.toObjectList(msg.getTxsList(),\n    proto.pactus.WalletTransactionInfo.toObject, includeInstance)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.ListTransactionsResponse}\n */\nproto.pactus.ListTransactionsResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.ListTransactionsResponse;\n  return proto.pactus.ListTransactionsResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.ListTransactionsResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.ListTransactionsResponse}\n */\nproto.pactus.ListTransactionsResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = new proto.pactus.WalletTransactionInfo;\n      reader.readMessage(value,proto.pactus.WalletTransactionInfo.deserializeBinaryFromReader);\n      msg.addTxs(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.ListTransactionsResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.ListTransactionsResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.ListTransactionsResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.ListTransactionsResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getTxsList();\n  if (f.length > 0) {\n    writer.writeRepeatedMessage(\n      2,\n      f,\n      proto.pactus.WalletTransactionInfo.serializeBinaryToWriter\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.ListTransactionsResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.ListTransactionsResponse} returns this\n */\nproto.pactus.ListTransactionsResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * repeated WalletTransactionInfo txs = 2;\n * @return {!Array<!proto.pactus.WalletTransactionInfo>}\n */\nproto.pactus.ListTransactionsResponse.prototype.getTxsList = function() {\n  return /** @type{!Array<!proto.pactus.WalletTransactionInfo>} */ (\n    jspb.Message.getRepeatedWrapperField(this, proto.pactus.WalletTransactionInfo, 2));\n};\n\n\n/**\n * @param {!Array<!proto.pactus.WalletTransactionInfo>} value\n * @return {!proto.pactus.ListTransactionsResponse} returns this\n*/\nproto.pactus.ListTransactionsResponse.prototype.setTxsList = function(value) {\n  return jspb.Message.setRepeatedWrapperField(this, 2, value);\n};\n\n\n/**\n * @param {!proto.pactus.WalletTransactionInfo=} opt_value\n * @param {number=} opt_index\n * @return {!proto.pactus.WalletTransactionInfo}\n */\nproto.pactus.ListTransactionsResponse.prototype.addTxs = function(opt_value, opt_index) {\n  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.WalletTransactionInfo, opt_index);\n};\n\n\n/**\n * Clears the list making it empty but non-null.\n * @return {!proto.pactus.ListTransactionsResponse} returns this\n */\nproto.pactus.ListTransactionsResponse.prototype.clearTxsList = function() {\n  return this.setTxsList([]);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SetDefaultFeeRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SetDefaultFeeRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SetDefaultFeeRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetDefaultFeeRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\namount: jspb.Message.getFieldWithDefault(msg, 2, 0)\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SetDefaultFeeRequest}\n */\nproto.pactus.SetDefaultFeeRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SetDefaultFeeRequest;\n  return proto.pactus.SetDefaultFeeRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SetDefaultFeeRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SetDefaultFeeRequest}\n */\nproto.pactus.SetDefaultFeeRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {number} */ (reader.readInt64());\n      msg.setAmount(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SetDefaultFeeRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SetDefaultFeeRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SetDefaultFeeRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetDefaultFeeRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getAmount();\n  if (f !== 0) {\n    writer.writeInt64(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SetDefaultFeeRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetDefaultFeeRequest} returns this\n */\nproto.pactus.SetDefaultFeeRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional int64 amount = 2;\n * @return {number}\n */\nproto.pactus.SetDefaultFeeRequest.prototype.getAmount = function() {\n  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.pactus.SetDefaultFeeRequest} returns this\n */\nproto.pactus.SetDefaultFeeRequest.prototype.setAmount = function(value) {\n  return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.SetDefaultFeeResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.SetDefaultFeeResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.SetDefaultFeeResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetDefaultFeeResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.SetDefaultFeeResponse}\n */\nproto.pactus.SetDefaultFeeResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.SetDefaultFeeResponse;\n  return proto.pactus.SetDefaultFeeResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.SetDefaultFeeResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.SetDefaultFeeResponse}\n */\nproto.pactus.SetDefaultFeeResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.SetDefaultFeeResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.SetDefaultFeeResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.SetDefaultFeeResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.SetDefaultFeeResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.SetDefaultFeeResponse.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.SetDefaultFeeResponse} returns this\n */\nproto.pactus.SetDefaultFeeResponse.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetMnemonicRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetMnemonicRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetMnemonicRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetMnemonicRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 2, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetMnemonicRequest}\n */\nproto.pactus.GetMnemonicRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetMnemonicRequest;\n  return proto.pactus.GetMnemonicRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetMnemonicRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetMnemonicRequest}\n */\nproto.pactus.GetMnemonicRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetMnemonicRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetMnemonicRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetMnemonicRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetMnemonicRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetMnemonicRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetMnemonicRequest} returns this\n */\nproto.pactus.GetMnemonicRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string password = 2;\n * @return {string}\n */\nproto.pactus.GetMnemonicRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetMnemonicRequest} returns this\n */\nproto.pactus.GetMnemonicRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetMnemonicResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetMnemonicResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetMnemonicResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetMnemonicResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nmnemonic: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetMnemonicResponse}\n */\nproto.pactus.GetMnemonicResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetMnemonicResponse;\n  return proto.pactus.GetMnemonicResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetMnemonicResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetMnemonicResponse}\n */\nproto.pactus.GetMnemonicResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setMnemonic(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetMnemonicResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetMnemonicResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetMnemonicResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetMnemonicResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getMnemonic();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string mnemonic = 1;\n * @return {string}\n */\nproto.pactus.GetMnemonicResponse.prototype.getMnemonic = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetMnemonicResponse} returns this\n */\nproto.pactus.GetMnemonicResponse.prototype.setMnemonic = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetPrivateKeyRequest.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetPrivateKeyRequest.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetPrivateKeyRequest} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPrivateKeyRequest.toObject = function(includeInstance, msg) {\n  var f, obj = {\nwalletName: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\npassword: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\naddress: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetPrivateKeyRequest}\n */\nproto.pactus.GetPrivateKeyRequest.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetPrivateKeyRequest;\n  return proto.pactus.GetPrivateKeyRequest.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetPrivateKeyRequest} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetPrivateKeyRequest}\n */\nproto.pactus.GetPrivateKeyRequest.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setWalletName(value);\n      break;\n    case 2:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPassword(value);\n      break;\n    case 3:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setAddress(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetPrivateKeyRequest.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetPrivateKeyRequest.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetPrivateKeyRequest} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPrivateKeyRequest.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getWalletName();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n  f = message.getPassword();\n  if (f.length > 0) {\n    writer.writeString(\n      2,\n      f\n    );\n  }\n  f = message.getAddress();\n  if (f.length > 0) {\n    writer.writeString(\n      3,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string wallet_name = 1;\n * @return {string}\n */\nproto.pactus.GetPrivateKeyRequest.prototype.getWalletName = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPrivateKeyRequest} returns this\n */\nproto.pactus.GetPrivateKeyRequest.prototype.setWalletName = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string password = 2;\n * @return {string}\n */\nproto.pactus.GetPrivateKeyRequest.prototype.getPassword = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPrivateKeyRequest} returns this\n */\nproto.pactus.GetPrivateKeyRequest.prototype.setPassword = function(value) {\n  return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string address = 3;\n * @return {string}\n */\nproto.pactus.GetPrivateKeyRequest.prototype.getAddress = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPrivateKeyRequest} returns this\n */\nproto.pactus.GetPrivateKeyRequest.prototype.setAddress = function(value) {\n  return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n *     net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n *     JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.pactus.GetPrivateKeyResponse.prototype.toObject = function(opt_includeInstance) {\n  return proto.pactus.GetPrivateKeyResponse.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n *     the JSPB instance for transitional soy proto support:\n *     http://goto/soy-param-migration\n * @param {!proto.pactus.GetPrivateKeyResponse} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPrivateKeyResponse.toObject = function(includeInstance, msg) {\n  var f, obj = {\nprivateKey: jspb.Message.getFieldWithDefault(msg, 1, \"\")\n  };\n\n  if (includeInstance) {\n    obj.$jspbMessageInstance = msg;\n  }\n  return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.pactus.GetPrivateKeyResponse}\n */\nproto.pactus.GetPrivateKeyResponse.deserializeBinary = function(bytes) {\n  var reader = new jspb.BinaryReader(bytes);\n  var msg = new proto.pactus.GetPrivateKeyResponse;\n  return proto.pactus.GetPrivateKeyResponse.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.pactus.GetPrivateKeyResponse} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.pactus.GetPrivateKeyResponse}\n */\nproto.pactus.GetPrivateKeyResponse.deserializeBinaryFromReader = function(msg, reader) {\n  while (reader.nextField()) {\n    if (reader.isEndGroup()) {\n      break;\n    }\n    var field = reader.getFieldNumber();\n    switch (field) {\n    case 1:\n      var value = /** @type {string} */ (reader.readStringRequireUtf8());\n      msg.setPrivateKey(value);\n      break;\n    default:\n      reader.skipField();\n      break;\n    }\n  }\n  return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.pactus.GetPrivateKeyResponse.prototype.serializeBinary = function() {\n  var writer = new jspb.BinaryWriter();\n  proto.pactus.GetPrivateKeyResponse.serializeBinaryToWriter(this, writer);\n  return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.pactus.GetPrivateKeyResponse} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.pactus.GetPrivateKeyResponse.serializeBinaryToWriter = function(message, writer) {\n  var f = undefined;\n  f = message.getPrivateKey();\n  if (f.length > 0) {\n    writer.writeString(\n      1,\n      f\n    );\n  }\n};\n\n\n/**\n * optional string private_key = 1;\n * @return {string}\n */\nproto.pactus.GetPrivateKeyResponse.prototype.getPrivateKey = function() {\n  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.pactus.GetPrivateKeyResponse} returns this\n */\nproto.pactus.GetPrivateKeyResponse.prototype.setPrivateKey = function(value) {\n  return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * @enum {number}\n */\nproto.pactus.AddressType = {\n  ADDRESS_TYPE_TREASURY: 0,\n  ADDRESS_TYPE_VALIDATOR: 1,\n  ADDRESS_TYPE_BLS_ACCOUNT: 2,\n  ADDRESS_TYPE_ED25519_ACCOUNT: 3\n};\n\n/**\n * @enum {number}\n */\nproto.pactus.TxDirection = {\n  TX_DIRECTION_ANY: 0,\n  TX_DIRECTION_INCOMING: 1,\n  TX_DIRECTION_OUTGOING: 2\n};\n\n/**\n * @enum {number}\n */\nproto.pactus.TransactionStatus = {\n  TRANSACTION_STATUS_PENDING: 0,\n  TRANSACTION_STATUS_CONFIRMED: 1,\n  TRANSACTION_STATUS_FAILED: -1\n};\n\ngoog.object.extend(exports, proto.pactus);\n"
  },
  {
    "path": "www/grpc/gen/open-rpc/pactus-openrpc.json",
    "content": "{\n  \"openrpc\": \"1.2.1\",\n  \"info\": {\n    \"title\": \"Pactus OpenRPC\",\n    \"version\": \"1.2.1\"\n  },\n  \"methods\": [{\n      \"name\": \"pactus.transaction.get_transaction\",\n      \"description\": \"GetTransaction retrieves transaction details based on the provided request parameters.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"id\",\n          \"description\": \"The unique ID of the transaction to retrieve.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"verbosity\",\n          \"description\": \"The verbosity level for transaction details.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"block_height\",\"block_time\",\"transaction\"],\n          \"properties\": {\"block_height\": { \"type\": \"integer\" },\"block_time\": { \"type\": \"integer\" },\"transaction\": {\n  \"type\": \"object\",\"required\": [\"id\",\"data\",\"version\",\"lock_time\",\"value\",\"fee\",\"payload_type\",\"transfer\",\"bond\",\"sortition\",\"unbond\",\"withdraw\",\"batch_transfer\",\"memo\",\"public_key\",\"signature\",\"block_height\",\"confirmed\",\"confirmations\"],\n  \"properties\": {\"id\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"version\": { \"type\": \"integer\" },\"lock_time\": { \"type\": \"integer\" },\"value\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" },\"payload_type\": { \"type\": \"integer\" },\"transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"amount\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"bond\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"stake\",\"public_key\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"stake\": { \"type\": \"integer\" },\"public_key\": { \"type\": \"string\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n},\"sortition\": {\n  \"type\": \"object\",\"required\": [\"address\",\"proof\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"proof\": { \"type\": \"string\" }}\n},\"unbond\": {\n  \"type\": \"object\",\"required\": [\"validator\",\"delegate_owner\"],\n  \"properties\": {\"validator\": { \"type\": \"string\" },\"delegate_owner\": { \"type\": \"string\" }}\n},\"withdraw\": {\n  \"type\": \"object\",\"required\": [\"validator_address\",\"account_address\",\"amount\"],\n  \"properties\": {\"validator_address\": { \"type\": \"string\" },\"account_address\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"batch_transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"recipients\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"recipients\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"receiver\",\"amount\"],\n  \"properties\": {\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n}\n}}\n},\"memo\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"signature\": { \"type\": \"string\" },\"block_height\": { \"type\": \"integer\" },\"confirmed\": { \"type\": \"boolean\" },\"confirmations\": { \"type\": \"integer\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.calculate_fee\",\n      \"description\": \"CalculateFee calculates the transaction fee based on the specified amount and payload type.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"amount\",\n          \"description\": \"The amount involved in the transaction, specified in NanoPAC.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"payload_type\",\n          \"description\": \"The type of transaction payload.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"fixed_amount\",\n          \"description\": \"Indicates if the amount should be fixed and include the fee.\",\n          \"schema\": { \"type\": \"boolean\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"amount\",\"fee\"],\n          \"properties\": {\"amount\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.broadcast_transaction\",\n      \"description\": \"BroadcastTransaction broadcasts a signed transaction to the network.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"signed_raw_transaction\",\n          \"description\": \"The signed raw transaction data to be broadcasted.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"id\"],\n          \"properties\": {\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.get_raw_transfer_transaction\",\n      \"description\": \"GetRawTransferTransaction retrieves raw details of a transfer transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"lock_time\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"sender\",\n          \"description\": \"The sender's account address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"receiver\",\n          \"description\": \"The receiver's account address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"amount\",\n          \"description\": \"The amount to be transferred, specified in NanoPAC. Must be greater than 0.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"fee\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"memo\",\n          \"description\": \"A memo string for the transaction.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"raw_transaction\",\"id\"],\n          \"properties\": {\"raw_transaction\": { \"type\": \"string\" },\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.get_raw_bond_transaction\",\n      \"description\": \"GetRawBondTransaction retrieves raw details of a bond transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"lock_time\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"sender\",\n          \"description\": \"The sender's account address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"receiver\",\n          \"description\": \"The receiver's validator address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"stake\",\n          \"description\": \"The stake amount in NanoPAC. Must be greater than 0.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"public_key\",\n          \"description\": \"The public key of the validator. Optional, but required when registering a new validator.;\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"fee\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"memo\",\n          \"description\": \"A memo string for the transaction.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"delegate_owner\",\n          \"description\": \"The address of the delegate owner. Optional, but required when registering a new validator with delegation.;\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"delegate_share\",\n          \"description\": \"The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"delegate_expiry\",\n          \"description\": \"The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.;\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"raw_transaction\",\"id\"],\n          \"properties\": {\"raw_transaction\": { \"type\": \"string\" },\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.get_raw_unbond_transaction\",\n      \"description\": \"GetRawUnbondTransaction retrieves raw details of an unbond transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"lock_time\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"validator_address\",\n          \"description\": \"The address of the validator to unbond from.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"memo\",\n          \"description\": \"A memo string for the transaction.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"delegate_owner\",\n          \"description\": \"The address of the delegate owner. Optional, but required when the validator is a delegated validator.;\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"raw_transaction\",\"id\"],\n          \"properties\": {\"raw_transaction\": { \"type\": \"string\" },\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.get_raw_withdraw_transaction\",\n      \"description\": \"GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"lock_time\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"validator_address\",\n          \"description\": \"The address of the validator to withdraw from.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"account_address\",\n          \"description\": \"The address of the account to withdraw to.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"amount\",\n          \"description\": \"The withdrawal amount in NanoPAC. Must be greater than 0.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"fee\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"memo\",\n          \"description\": \"A memo string for the transaction.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"raw_transaction\",\"id\"],\n          \"properties\": {\"raw_transaction\": { \"type\": \"string\" },\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.get_raw_batch_transfer_transaction\",\n      \"description\": \"GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"lock_time\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"sender\",\n          \"description\": \"The sender's account address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"recipients\",\n          \"description\": \"The list of recipients with their amounts. Minimum 2 recipients required.\",\n          \"schema\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"receiver\",\"amount\"],\n  \"properties\": {\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n}\n}\n        },{\n          \"name\": \"fee\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"memo\",\n          \"description\": \"A memo string for the transaction.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"raw_transaction\",\"id\"],\n          \"properties\": {\"raw_transaction\": { \"type\": \"string\" },\"id\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.decode_raw_transaction\",\n      \"description\": \"DecodeRawTransaction accepts raw transaction and returns decoded transaction.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"raw_transaction\",\n          \"description\": \"The raw transaction data in hexadecimal format.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"transaction\"],\n          \"properties\": {\"transaction\": {\n  \"type\": \"object\",\"required\": [\"id\",\"data\",\"version\",\"lock_time\",\"value\",\"fee\",\"payload_type\",\"transfer\",\"bond\",\"sortition\",\"unbond\",\"withdraw\",\"batch_transfer\",\"memo\",\"public_key\",\"signature\",\"block_height\",\"confirmed\",\"confirmations\"],\n  \"properties\": {\"id\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"version\": { \"type\": \"integer\" },\"lock_time\": { \"type\": \"integer\" },\"value\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" },\"payload_type\": { \"type\": \"integer\" },\"transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"amount\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"bond\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"stake\",\"public_key\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"stake\": { \"type\": \"integer\" },\"public_key\": { \"type\": \"string\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n},\"sortition\": {\n  \"type\": \"object\",\"required\": [\"address\",\"proof\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"proof\": { \"type\": \"string\" }}\n},\"unbond\": {\n  \"type\": \"object\",\"required\": [\"validator\",\"delegate_owner\"],\n  \"properties\": {\"validator\": { \"type\": \"string\" },\"delegate_owner\": { \"type\": \"string\" }}\n},\"withdraw\": {\n  \"type\": \"object\",\"required\": [\"validator_address\",\"account_address\",\"amount\"],\n  \"properties\": {\"validator_address\": { \"type\": \"string\" },\"account_address\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"batch_transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"recipients\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"recipients\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"receiver\",\"amount\"],\n  \"properties\": {\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n}\n}}\n},\"memo\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"signature\": { \"type\": \"string\" },\"block_height\": { \"type\": \"integer\" },\"confirmed\": { \"type\": \"boolean\" },\"confirmations\": { \"type\": \"integer\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.transaction.check_transaction\",\n      \"description\": \"CheckTransaction checks if the transaction is valid and can be included in the blockchain.\",\n      \"tags\": [{ \"name\": \"transaction\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"raw_transaction\",\n          \"description\": \"The raw transaction data to be checked.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"is_valid\",\"error_message\"],\n          \"properties\": {\"is_valid\": { \"type\": \"boolean\" },\"error_message\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_block\",\n      \"description\": \"GetBlock retrieves information about a block based on the provided request parameters.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"height\",\n          \"description\": \"The height of the block to retrieve.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"verbosity\",\n          \"description\": \"The verbosity level for block information.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"height\",\"hash\",\"data\",\"block_time\",\"header\",\"prev_cert\",\"txs\"],\n          \"properties\": {\"height\": { \"type\": \"integer\" },\"hash\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"block_time\": { \"type\": \"integer\" },\"header\": {\n  \"type\": \"object\",\"required\": [\"version\",\"prev_block_hash\",\"state_root\",\"sortition_seed\",\"proposer_address\"],\n  \"properties\": {\"version\": { \"type\": \"integer\" },\"prev_block_hash\": { \"type\": \"string\" },\"state_root\": { \"type\": \"string\" },\"sortition_seed\": { \"type\": \"string\" },\"proposer_address\": { \"type\": \"string\" }}\n},\"prev_cert\": {\n  \"type\": \"object\",\"required\": [\"hash\",\"round\",\"committers\",\"absentees\",\"signature\"],\n  \"properties\": {\"hash\": { \"type\": \"string\" },\"round\": { \"type\": \"integer\" },\"committers\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"integer\" }\n},\"absentees\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"integer\" }\n},\"signature\": { \"type\": \"string\" }}\n},\"txs\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"id\",\"data\",\"version\",\"lock_time\",\"value\",\"fee\",\"payload_type\",\"transfer\",\"bond\",\"sortition\",\"unbond\",\"withdraw\",\"batch_transfer\",\"memo\",\"public_key\",\"signature\",\"block_height\",\"confirmed\",\"confirmations\"],\n  \"properties\": {\"id\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"version\": { \"type\": \"integer\" },\"lock_time\": { \"type\": \"integer\" },\"value\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" },\"payload_type\": { \"type\": \"integer\" },\"transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"amount\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"bond\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"stake\",\"public_key\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"stake\": { \"type\": \"integer\" },\"public_key\": { \"type\": \"string\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n},\"sortition\": {\n  \"type\": \"object\",\"required\": [\"address\",\"proof\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"proof\": { \"type\": \"string\" }}\n},\"unbond\": {\n  \"type\": \"object\",\"required\": [\"validator\",\"delegate_owner\"],\n  \"properties\": {\"validator\": { \"type\": \"string\" },\"delegate_owner\": { \"type\": \"string\" }}\n},\"withdraw\": {\n  \"type\": \"object\",\"required\": [\"validator_address\",\"account_address\",\"amount\"],\n  \"properties\": {\"validator_address\": { \"type\": \"string\" },\"account_address\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"batch_transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"recipients\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"recipients\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"receiver\",\"amount\"],\n  \"properties\": {\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n}\n}}\n},\"memo\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"signature\": { \"type\": \"string\" },\"block_height\": { \"type\": \"integer\" },\"confirmed\": { \"type\": \"boolean\" },\"confirmations\": { \"type\": \"integer\" }}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_block_hash\",\n      \"description\": \"GetBlockHash retrieves the hash of a block at the specified height.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"height\",\n          \"description\": \"The height of the block to retrieve the hash for.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"hash\"],\n          \"properties\": {\"hash\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_block_height\",\n      \"description\": \"GetBlockHeight retrieves the height of a block with the specified hash.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"hash\",\n          \"description\": \"The hash of the block to retrieve the height for.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"height\"],\n          \"properties\": {\"height\": { \"type\": \"integer\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_blockchain_info\",\n      \"description\": \"GetBlockchainInfo retrieves general information about the blockchain.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"last_block_height\",\"last_block_hash\",\"last_block_time\",\"total_accounts\",\"total_validators\",\"active_validators\",\"total_power\",\"committee_power\",\"is_pruned\",\"pruning_height\",\"in_committee\",\"committee_size\",\"average_score\"],\n          \"properties\": {\"last_block_height\": { \"type\": \"integer\" },\"last_block_hash\": { \"type\": \"string\" },\"last_block_time\": { \"type\": \"integer\" },\"total_accounts\": { \"type\": \"integer\" },\"total_validators\": { \"type\": \"integer\" },\"active_validators\": { \"type\": \"integer\" },\"total_power\": { \"type\": \"integer\" },\"committee_power\": { \"type\": \"integer\" },\"is_pruned\": { \"type\": \"boolean\" },\"pruning_height\": { \"type\": \"integer\" },\"in_committee\": { \"type\": \"boolean\" },\"committee_size\": { \"type\": \"integer\" },\"average_score\": { \"type\": \"number\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_committee_info\",\n      \"description\": \"GetCommitteeInfo retrieves information about the current committee.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"committee_size\",\"committee_power\",\"total_power\",\"validators\",\"protocol_versions\"],\n          \"properties\": {\"committee_size\": { \"type\": \"integer\" },\"committee_power\": { \"type\": \"integer\" },\"total_power\": { \"type\": \"integer\" },\"validators\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"hash\",\"data\",\"public_key\",\"number\",\"stake\",\"last_bonding_height\",\"last_sortition_height\",\"unbonding_height\",\"address\",\"availability_score\",\"protocol_version\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"hash\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"number\": { \"type\": \"integer\" },\"stake\": { \"type\": \"integer\" },\"last_bonding_height\": { \"type\": \"integer\" },\"last_sortition_height\": { \"type\": \"integer\" },\"unbonding_height\": { \"type\": \"integer\" },\"address\": { \"type\": \"string\" },\"availability_score\": { \"type\": \"number\" },\"protocol_version\": { \"type\": \"integer\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n}\n},\"protocol_versions\": {\n  \"type\": \"object\"\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_consensus_info\",\n      \"description\": \"GetConsensusInfo retrieves information about the consensus instances.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"proposal\",\"instances\"],\n          \"properties\": {\"proposal\": {\n  \"type\": \"object\",\"required\": [\"height\",\"round\",\"block_data\",\"signature\"],\n  \"properties\": {\"height\": { \"type\": \"integer\" },\"round\": { \"type\": \"integer\" },\"block_data\": { \"type\": \"string\" },\"signature\": { \"type\": \"string\" }}\n},\"instances\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"address\",\"active\",\"height\",\"round\",\"votes\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"active\": { \"type\": \"boolean\" },\"height\": { \"type\": \"integer\" },\"round\": { \"type\": \"integer\" },\"votes\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"type\",\"voter\",\"block_hash\",\"round\",\"cp_round\",\"cp_value\"],\n  \"properties\": {\"type\": { \"type\": \"integer\" },\"voter\": { \"type\": \"string\" },\"block_hash\": { \"type\": \"string\" },\"round\": { \"type\": \"integer\" },\"cp_round\": { \"type\": \"integer\" },\"cp_value\": { \"type\": \"integer\" }}\n}\n}}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_account\",\n      \"description\": \"GetAccount retrieves information about an account based on the provided address.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"address\",\n          \"description\": \"The address of the account to retrieve information for.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"account\"],\n          \"properties\": {\"account\": {\n  \"type\": \"object\",\"required\": [\"hash\",\"data\",\"number\",\"balance\",\"address\"],\n  \"properties\": {\"hash\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"number\": { \"type\": \"integer\" },\"balance\": { \"type\": \"integer\" },\"address\": { \"type\": \"string\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_validator\",\n      \"description\": \"GetValidator retrieves information about a validator based on the provided address.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"address\",\n          \"description\": \"The address of the validator to retrieve information for.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"validator\"],\n          \"properties\": {\"validator\": {\n  \"type\": \"object\",\"required\": [\"hash\",\"data\",\"public_key\",\"number\",\"stake\",\"last_bonding_height\",\"last_sortition_height\",\"unbonding_height\",\"address\",\"availability_score\",\"protocol_version\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"hash\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"number\": { \"type\": \"integer\" },\"stake\": { \"type\": \"integer\" },\"last_bonding_height\": { \"type\": \"integer\" },\"last_sortition_height\": { \"type\": \"integer\" },\"unbonding_height\": { \"type\": \"integer\" },\"address\": { \"type\": \"string\" },\"availability_score\": { \"type\": \"number\" },\"protocol_version\": { \"type\": \"integer\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_validator_by_number\",\n      \"description\": \"GetValidatorByNumber retrieves information about a validator based on the provided number.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"number\",\n          \"description\": \"The unique number of the validator to retrieve information for.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"validator\"],\n          \"properties\": {\"validator\": {\n  \"type\": \"object\",\"required\": [\"hash\",\"data\",\"public_key\",\"number\",\"stake\",\"last_bonding_height\",\"last_sortition_height\",\"unbonding_height\",\"address\",\"availability_score\",\"protocol_version\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"hash\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"number\": { \"type\": \"integer\" },\"stake\": { \"type\": \"integer\" },\"last_bonding_height\": { \"type\": \"integer\" },\"last_sortition_height\": { \"type\": \"integer\" },\"unbonding_height\": { \"type\": \"integer\" },\"address\": { \"type\": \"string\" },\"availability_score\": { \"type\": \"number\" },\"protocol_version\": { \"type\": \"integer\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_validator_addresses\",\n      \"description\": \"GetValidatorAddresses retrieves a list of all validator addresses.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"addresses\"],\n          \"properties\": {\"addresses\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_public_key\",\n      \"description\": \"GetPublicKey retrieves the public key of an account based on the provided address.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"address\",\n          \"description\": \"The address for which to retrieve the public key.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"public_key\"],\n          \"properties\": {\"public_key\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.blockchain.get_tx_pool_content\",\n      \"description\": \"GetTxPoolContent retrieves current transactions in the transaction pool.\",\n      \"tags\": [{ \"name\": \"blockchain\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"payload_type\",\n          \"description\": \"The type of transactions to retrieve from the transaction pool. 0 means all types.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"txs\"],\n          \"properties\": {\"txs\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"id\",\"data\",\"version\",\"lock_time\",\"value\",\"fee\",\"payload_type\",\"transfer\",\"bond\",\"sortition\",\"unbond\",\"withdraw\",\"batch_transfer\",\"memo\",\"public_key\",\"signature\",\"block_height\",\"confirmed\",\"confirmations\"],\n  \"properties\": {\"id\": { \"type\": \"string\" },\"data\": { \"type\": \"string\" },\"version\": { \"type\": \"integer\" },\"lock_time\": { \"type\": \"integer\" },\"value\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" },\"payload_type\": { \"type\": \"integer\" },\"transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"amount\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"bond\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"receiver\",\"stake\",\"public_key\",\"is_delegated\",\"delegate_owner\",\"delegate_share\",\"delegate_expiry\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"stake\": { \"type\": \"integer\" },\"public_key\": { \"type\": \"string\" },\"is_delegated\": { \"type\": \"boolean\" },\"delegate_owner\": { \"type\": \"string\" },\"delegate_share\": { \"type\": \"integer\" },\"delegate_expiry\": { \"type\": \"integer\" }}\n},\"sortition\": {\n  \"type\": \"object\",\"required\": [\"address\",\"proof\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"proof\": { \"type\": \"string\" }}\n},\"unbond\": {\n  \"type\": \"object\",\"required\": [\"validator\",\"delegate_owner\"],\n  \"properties\": {\"validator\": { \"type\": \"string\" },\"delegate_owner\": { \"type\": \"string\" }}\n},\"withdraw\": {\n  \"type\": \"object\",\"required\": [\"validator_address\",\"account_address\",\"amount\"],\n  \"properties\": {\"validator_address\": { \"type\": \"string\" },\"account_address\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n},\"batch_transfer\": {\n  \"type\": \"object\",\"required\": [\"sender\",\"recipients\"],\n  \"properties\": {\"sender\": { \"type\": \"string\" },\"recipients\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"receiver\",\"amount\"],\n  \"properties\": {\"receiver\": { \"type\": \"string\" },\"amount\": { \"type\": \"integer\" }}\n}\n}}\n},\"memo\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"signature\": { \"type\": \"string\" },\"block_height\": { \"type\": \"integer\" },\"confirmed\": { \"type\": \"boolean\" },\"confirmations\": { \"type\": \"integer\" }}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.network.get_network_info\",\n      \"description\": \"GetNetworkInfo retrieves information about the overall network.\",\n      \"tags\": [{ \"name\": \"network\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"network_name\",\"connected_peers_count\",\"metric_info\"],\n          \"properties\": {\"network_name\": { \"type\": \"string\" },\"connected_peers_count\": { \"type\": \"integer\" },\"metric_info\": {\n  \"type\": \"object\",\"required\": [\"total_invalid\",\"total_sent\",\"total_received\",\"message_sent\",\"message_received\"],\n  \"properties\": {\"total_invalid\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"total_sent\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"total_received\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"message_sent\": {\n  \"type\": \"object\"\n},\"message_received\": {\n  \"type\": \"object\"\n}}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.network.list_peers\",\n      \"description\": \"ListPeers lists all peers in the network.\",\n      \"tags\": [{ \"name\": \"network\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"include_disconnected\",\n          \"description\": \"If true, includes disconnected peers (default: connected peers only).\",\n          \"schema\": { \"type\": \"boolean\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"peers\"],\n          \"properties\": {\"peers\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"status\",\"moniker\",\"agent\",\"peer_id\",\"consensus_keys\",\"consensus_addresses\",\"services\",\"last_block_hash\",\"height\",\"last_sent\",\"last_received\",\"address\",\"direction\",\"protocols\",\"total_sessions\",\"completed_sessions\",\"metric_info\",\"outbound_hello_sent\"],\n  \"properties\": {\"status\": { \"type\": \"integer\" },\"moniker\": { \"type\": \"string\" },\"agent\": { \"type\": \"string\" },\"peer_id\": { \"type\": \"string\" },\"consensus_keys\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n},\"consensus_addresses\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n},\"services\": { \"type\": \"integer\" },\"last_block_hash\": { \"type\": \"string\" },\"height\": { \"type\": \"integer\" },\"last_sent\": { \"type\": \"integer\" },\"last_received\": { \"type\": \"integer\" },\"address\": { \"type\": \"string\" },\"direction\": { \"type\": \"integer\" },\"protocols\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n},\"total_sessions\": { \"type\": \"integer\" },\"completed_sessions\": { \"type\": \"integer\" },\"metric_info\": {\n  \"type\": \"object\",\"required\": [\"total_invalid\",\"total_sent\",\"total_received\",\"message_sent\",\"message_received\"],\n  \"properties\": {\"total_invalid\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"total_sent\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"total_received\": {\n  \"type\": \"object\",\"required\": [\"bytes\",\"bundles\"],\n  \"properties\": {\"bytes\": { \"type\": \"integer\" },\"bundles\": { \"type\": \"integer\" }}\n},\"message_sent\": {\n  \"type\": \"object\"\n},\"message_received\": {\n  \"type\": \"object\"\n}}\n},\"outbound_hello_sent\": { \"type\": \"boolean\" }}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.network.get_node_info\",\n      \"description\": \"GetNodeInfo retrieves information about a specific node in the network.\",\n      \"tags\": [{ \"name\": \"network\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"moniker\",\"agent\",\"peer_id\",\"started_at\",\"reachability\",\"services\",\"services_names\",\"local_addrs\",\"protocols\",\"clock_offset\",\"connection_info\",\"zmq_publishers\",\"current_time\",\"network_name\"],\n          \"properties\": {\"moniker\": { \"type\": \"string\" },\"agent\": { \"type\": \"string\" },\"peer_id\": { \"type\": \"string\" },\"started_at\": { \"type\": \"integer\" },\"reachability\": { \"type\": \"string\" },\"services\": { \"type\": \"integer\" },\"services_names\": { \"type\": \"string\" },\"local_addrs\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n},\"protocols\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n},\"clock_offset\": { \"type\": \"number\" },\"connection_info\": {\n  \"type\": \"object\",\"required\": [\"connections\",\"inbound_connections\",\"outbound_connections\"],\n  \"properties\": {\"connections\": { \"type\": \"integer\" },\"inbound_connections\": { \"type\": \"integer\" },\"outbound_connections\": { \"type\": \"integer\" }}\n},\"zmq_publishers\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"topic\",\"address\",\"hwm\"],\n  \"properties\": {\"topic\": { \"type\": \"string\" },\"address\": { \"type\": \"string\" },\"hwm\": { \"type\": \"integer\" }}\n}\n},\"current_time\": { \"type\": \"integer\" },\"network_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.network.ping\",\n      \"description\": \"Ping provides a simple connectivity test and latency measurement.\",\n      \"tags\": [{ \"name\": \"network\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [],\n          \"properties\": {}\n          }\n        }\n      },{\n      \"name\": \"pactus.utils.sign_message_with_private_key\",\n      \"description\": \"SignMessageWithPrivateKey signs a message with the provided private key.\",\n      \"tags\": [{ \"name\": \"utils\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"private_key\",\n          \"description\": \"The private key to sign the message.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"message\",\n          \"description\": \"The message content to be signed.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"signature\"],\n          \"properties\": {\"signature\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.utils.verify_message\",\n      \"description\": \"VerifyMessage verifies a signature against the public key and message.\",\n      \"tags\": [{ \"name\": \"utils\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"message\",\n          \"description\": \"The original message content that was signed.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"signature\",\n          \"description\": \"The signature to verify in hexadecimal format.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"public_key\",\n          \"description\": \"The public key of the signer.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"is_valid\"],\n          \"properties\": {\"is_valid\": { \"type\": \"boolean\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.utils.public_key_aggregation\",\n      \"description\": \"PublicKeyAggregation aggregates multiple BLS public keys into a single key.\",\n      \"tags\": [{ \"name\": \"utils\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"public_keys\",\n          \"description\": \"List of BLS public keys to be aggregated.\",\n          \"schema\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n}\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"public_key\",\"address\"],\n          \"properties\": {\"public_key\": { \"type\": \"string\" },\"address\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.utils.signature_aggregation\",\n      \"description\": \"SignatureAggregation aggregates multiple BLS signatures into a single signature.\",\n      \"tags\": [{ \"name\": \"utils\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"signatures\",\n          \"description\": \"List of BLS signatures to be aggregated.\",\n          \"schema\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n}\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"signature\"],\n          \"properties\": {\"signature\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.create_wallet\",\n      \"description\": \"CreateWallet creates a new wallet with the specified parameters.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name for the new wallet.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Password to secure the new wallet.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"mnemonic\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"mnemonic\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.restore_wallet\",\n      \"description\": \"RestoreWallet restores an existing wallet with the given mnemonic.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name for the restored wallet.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"mnemonic\",\n          \"description\": \"The mnemonic (seed phrase) for wallet recovery.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Password to secure the restored wallet.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.load_wallet\",\n      \"description\": \"LoadWallet loads an existing wallet with the given name. deprecated: It will be removed in a future version.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to load.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.unload_wallet\",\n      \"description\": \"UnloadWallet unloads a currently loaded wallet with the specified name. deprecated: It will be removed in a future version.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to unload.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.list_wallets\",\n      \"description\": \"ListWallets returns a list of all available wallets.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallets\"],\n          \"properties\": {\"wallets\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"string\" }\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_wallet_info\",\n      \"description\": \"GetWalletInfo returns detailed information about a specific wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to query.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"version\",\"network\",\"encrypted\",\"uuid\",\"created_at\",\"default_fee\",\"driver\",\"path\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"version\": { \"type\": \"integer\" },\"network\": { \"type\": \"string\" },\"encrypted\": { \"type\": \"boolean\" },\"uuid\": { \"type\": \"string\" },\"created_at\": { \"type\": \"integer\" },\"default_fee\": { \"type\": \"integer\" },\"driver\": { \"type\": \"string\" },\"path\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.update_password\",\n      \"description\": \"UpdatePassword updates the password of an existing wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet whose password will be updated.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"old_password\",\n          \"description\": \"The current wallet password.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"new_password\",\n          \"description\": \"The new wallet password.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_total_balance\",\n      \"description\": \"GetTotalBalance returns the total available balance of the wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to get the total balance.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"total_balance\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"total_balance\": { \"type\": \"integer\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_total_stake\",\n      \"description\": \"GetTotalStake returns the total stake amount in the wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to get the total stake.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"total_stake\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"total_stake\": { \"type\": \"integer\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_validator_address\",\n      \"description\": \"GetValidatorAddress retrieves the validator address associated with a public key. Deprecated: Will move into utils.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"public_key\",\n          \"description\": \"The public key of the validator.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"address\"],\n          \"properties\": {\"address\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_address_info\",\n      \"description\": \"GetAddressInfo returns detailed information about a specific address.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet containing the address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address\",\n          \"description\": \"The address to query.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"addr\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"addr\": {\n  \"type\": \"object\",\"required\": [\"address\",\"public_key\",\"label\",\"path\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"label\": { \"type\": \"string\" },\"path\": { \"type\": \"string\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.set_address_label\",\n      \"description\": \"SetAddressLabel sets or updates the label for a given address.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet containing the address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Wallet password required for modification.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address\",\n          \"description\": \"The address to label.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"label\",\n          \"description\": \"The new label for the address.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"address\",\"label\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"address\": { \"type\": \"string\" },\"label\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_new_address\",\n      \"description\": \"GetNewAddress generates a new address for the specified wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to generate a new address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address_type\",\n          \"description\": \"The type of address to generate.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"label\",\n          \"description\": \"A label for the new address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Password for the new address. It's required when address_type is Ed25519 type.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"addr\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"addr\": {\n  \"type\": \"object\",\"required\": [\"address\",\"public_key\",\"label\",\"path\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"label\": { \"type\": \"string\" },\"path\": { \"type\": \"string\" }}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.list_addresses\",\n      \"description\": \"ListAddresses returns all addresses in the specified wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the queried wallet.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address_types\",\n          \"description\": \"Filter addresses by their types. If empty, all address types are included.\",\n          \"schema\": {\n  \"type\": \"array\",\n  \"items\": { \"type\": \"integer\" }\n}\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"addrs\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"addrs\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"address\",\"public_key\",\"label\",\"path\"],\n  \"properties\": {\"address\": { \"type\": \"string\" },\"public_key\": { \"type\": \"string\" },\"label\": { \"type\": \"string\" },\"path\": { \"type\": \"string\" }}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.sign_message\",\n      \"description\": \"SignMessage signs an arbitrary message using a wallet's private key.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to sign with.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Wallet password required for signing.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address\",\n          \"description\": \"The address whose private key should be used for signing the message.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"message\",\n          \"description\": \"The arbitrary message to be signed.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"signature\"],\n          \"properties\": {\"signature\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.sign_raw_transaction\",\n      \"description\": \"SignRawTransaction signs a raw transaction for a specified wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet used for signing.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"raw_transaction\",\n          \"description\": \"The raw transaction data to be signed.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Wallet password required for signing.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"transaction_id\",\"signed_raw_transaction\"],\n          \"properties\": {\"transaction_id\": { \"type\": \"string\" },\"signed_raw_transaction\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.list_transactions\",\n      \"description\": \"ListTransactions returns a list of transactions for a wallet, optionally filtered by a specific address, with pagination support.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to query transactions for.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address\",\n          \"description\": \"Optional: The address to filter transactions. If empty or set to '*', transactions for all addresses in the wallet are included.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"direction\",\n          \"description\": \"Filter transactions by direction relative to the wallet. Defaults to any direction if not set.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"count\",\n          \"description\": \"Optional: The maximum number of transactions to return. Defaults to 10 if not set.\",\n          \"schema\": { \"type\": \"integer\" }\n        },{\n          \"name\": \"skip\",\n          \"description\": \"Optional: The number of transactions to skip (for pagination). Defaults to 0 if not set.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\",\"txs\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" },\"txs\": {\n  \"type\": \"array\",\n  \"items\": {\n  \"type\": \"object\",\"required\": [\"no\",\"tx_id\",\"sender\",\"receiver\",\"direction\",\"amount\",\"fee\",\"memo\",\"status\",\"block_height\",\"payload_type\",\"data\",\"comment\",\"created_at\",\"updated_at\"],\n  \"properties\": {\"no\": { \"type\": \"integer\" },\"tx_id\": { \"type\": \"string\" },\"sender\": { \"type\": \"string\" },\"receiver\": { \"type\": \"string\" },\"direction\": { \"type\": \"integer\" },\"amount\": { \"type\": \"integer\" },\"fee\": { \"type\": \"integer\" },\"memo\": { \"type\": \"string\" },\"status\": { \"type\": \"integer\" },\"block_height\": { \"type\": \"integer\" },\"payload_type\": { \"type\": \"integer\" },\"data\": { \"type\": \"string\" },\"comment\": { \"type\": \"string\" },\"created_at\": { \"type\": \"integer\" },\"updated_at\": { \"type\": \"integer\" }}\n}\n}}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.set_default_fee\",\n      \"description\": \"SetDefaultFee sets the default fee for the wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to set the default fee.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"amount\",\n          \"description\": \"The default fee amount in NanoPAC.\",\n          \"schema\": { \"type\": \"integer\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"wallet_name\"],\n          \"properties\": {\"wallet_name\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_mnemonic\",\n      \"description\": \"GetMnemonic returns the mnemonic (seed phrase) for the wallet.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet to get the mnemonic.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Wallet password.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"mnemonic\"],\n          \"properties\": {\"mnemonic\": { \"type\": \"string\" }}\n          }\n        }\n      },{\n      \"name\": \"pactus.wallet.get_private_key\",\n      \"description\": \"GetPrivateKey returns the private key for a given address.\",\n      \"tags\": [{ \"name\": \"wallet\"}],\n      \"paramStructure\": \"by-name\",\n      \"params\": [{\n          \"name\": \"wallet_name\",\n          \"description\": \"The name of the wallet containing the address.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"password\",\n          \"description\": \"Wallet password.\",\n          \"schema\": { \"type\": \"string\" }\n        },{\n          \"name\": \"address\",\n          \"description\": \"The address to get the private key.\",\n          \"schema\": { \"type\": \"string\" }\n        }],\n      \"result\": {\n        \"name\": \"fields\",\n        \"schema\": {\n          \"type\": \"object\",\"required\": [\"private_key\"],\n          \"properties\": {\"private_key\": { \"type\": \"string\" }}\n          }\n        }\n      }]\n}\n\n\n\n"
  },
  {
    "path": "www/grpc/gen/python/blockchain_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# NO CHECKED-IN PROTOBUF GENCODE\n# source: blockchain.proto\n# Protobuf Python Version: 6.33.2\n\"\"\"Generated protocol buffer code.\"\"\"\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import descriptor_pool as _descriptor_pool\nfrom google.protobuf import runtime_version as _runtime_version\nfrom google.protobuf import symbol_database as _symbol_database\nfrom google.protobuf.internal import builder as _builder\n_runtime_version.ValidateProtobufRuntimeVersion(\n    _runtime_version.Domain.PUBLIC,\n    6,\n    33,\n    2,\n    '',\n    'blockchain.proto'\n)\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\nimport transaction_pb2 as transaction__pb2\n\n\nDESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\\n\\x10\\x62lockchain.proto\\x12\\x06pactus\\x1a\\x11transaction.proto\\\"-\\n\\x11GetAccountRequest\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"C\\n\\x12GetAccountResponse\\x12-\\n\\x07\\x61\\x63\\x63ount\\x18\\x01 \\x01(\\x0b\\x32\\x13.pactus.AccountInfoR\\x07\\x61\\x63\\x63ount\\\"\\x1e\\n\\x1cGetValidatorAddressesRequest\\\"=\\n\\x1dGetValidatorAddressesResponse\\x12\\x1c\\n\\taddresses\\x18\\x01 \\x03(\\tR\\taddresses\\\"/\\n\\x13GetValidatorRequest\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"5\\n\\x1bGetValidatorByNumberRequest\\x12\\x16\\n\\x06number\\x18\\x01 \\x01(\\x05R\\x06number\\\"K\\n\\x14GetValidatorResponse\\x12\\x33\\n\\tvalidator\\x18\\x01 \\x01(\\x0b\\x32\\x15.pactus.ValidatorInfoR\\tvalidator\\\"/\\n\\x13GetPublicKeyRequest\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"5\\n\\x14GetPublicKeyResponse\\x12\\x1d\\n\\npublic_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\\"_\\n\\x0fGetBlockRequest\\x12\\x16\\n\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x12\\x34\\n\\tverbosity\\x18\\x02 \\x01(\\x0e\\x32\\x16.pactus.BlockVerbosityR\\tverbosity\\\"\\x83\\x02\\n\\x10GetBlockResponse\\x12\\x16\\n\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x12\\x12\\n\\x04hash\\x18\\x02 \\x01(\\tR\\x04hash\\x12\\x12\\n\\x04\\x64\\x61ta\\x18\\x03 \\x01(\\tR\\x04\\x64\\x61ta\\x12\\x1d\\n\\nblock_time\\x18\\x04 \\x01(\\rR\\tblockTime\\x12/\\n\\x06header\\x18\\x05 \\x01(\\x0b\\x32\\x17.pactus.BlockHeaderInfoR\\x06header\\x12\\x34\\n\\tprev_cert\\x18\\x06 \\x01(\\x0b\\x32\\x17.pactus.CertificateInfoR\\x08prevCert\\x12)\\n\\x03txs\\x18\\x07 \\x03(\\x0b\\x32\\x17.pactus.TransactionInfoR\\x03txs\\\"-\\n\\x13GetBlockHashRequest\\x12\\x16\\n\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\\"*\\n\\x14GetBlockHashResponse\\x12\\x12\\n\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\\"+\\n\\x15GetBlockHeightRequest\\x12\\x12\\n\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\\"0\\n\\x16GetBlockHeightResponse\\x12\\x16\\n\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\\"\\x1a\\n\\x18GetBlockchainInfoRequest\\\"\\x93\\x04\\n\\x19GetBlockchainInfoResponse\\x12*\\n\\x11last_block_height\\x18\\x01 \\x01(\\rR\\x0flastBlockHeight\\x12&\\n\\x0flast_block_hash\\x18\\x02 \\x01(\\tR\\rlastBlockHash\\x12&\\n\\x0flast_block_time\\x18\\n \\x01(\\x03R\\rlastBlockTime\\x12%\\n\\x0etotal_accounts\\x18\\x03 \\x01(\\x05R\\rtotalAccounts\\x12)\\n\\x10total_validators\\x18\\x04 \\x01(\\x05R\\x0ftotalValidators\\x12+\\n\\x11\\x61\\x63tive_validators\\x18\\x0c \\x01(\\x05R\\x10\\x61\\x63tiveValidators\\x12\\x1f\\n\\x0btotal_power\\x18\\x05 \\x01(\\x03R\\ntotalPower\\x12\\'\\n\\x0f\\x63ommittee_power\\x18\\x06 \\x01(\\x03R\\x0e\\x63ommitteePower\\x12\\x1b\\n\\tis_pruned\\x18\\x08 \\x01(\\x08R\\x08isPruned\\x12%\\n\\x0epruning_height\\x18\\t \\x01(\\rR\\rpruningHeight\\x12!\\n\\x0cin_committee\\x18\\r \\x01(\\x08R\\x0binCommittee\\x12%\\n\\x0e\\x63ommittee_size\\x18\\x0e \\x01(\\x05R\\rcommitteeSize\\x12#\\n\\raverage_score\\x18\\x0f \\x01(\\x01R\\x0c\\x61verageScore\\\"\\x19\\n\\x17GetCommitteeInfoRequest\\\"\\xec\\x02\\n\\x18GetCommitteeInfoResponse\\x12%\\n\\x0e\\x63ommittee_size\\x18\\x01 \\x01(\\x05R\\rcommitteeSize\\x12\\'\\n\\x0f\\x63ommittee_power\\x18\\x02 \\x01(\\x03R\\x0e\\x63ommitteePower\\x12\\x1f\\n\\x0btotal_power\\x18\\x03 \\x01(\\x03R\\ntotalPower\\x12\\x35\\n\\nvalidators\\x18\\x04 \\x03(\\x0b\\x32\\x15.pactus.ValidatorInfoR\\nvalidators\\x12\\x63\\n\\x11protocol_versions\\x18\\x05 \\x03(\\x0b\\x32\\x36.pactus.GetCommitteeInfoResponse.ProtocolVersionsEntryR\\x10protocolVersions\\x1a\\x43\\n\\x15ProtocolVersionsEntry\\x12\\x10\\n\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12\\x14\\n\\x05value\\x18\\x02 \\x01(\\x01R\\x05value:\\x02\\x38\\x01\\\"\\x19\\n\\x17GetConsensusInfoRequest\\\"\\x81\\x01\\n\\x18GetConsensusInfoResponse\\x12\\x30\\n\\x08proposal\\x18\\x01 \\x01(\\x0b\\x32\\x14.pactus.ProposalInfoR\\x08proposal\\x12\\x33\\n\\tinstances\\x18\\x02 \\x03(\\x0b\\x32\\x15.pactus.ConsensusInfoR\\tinstances\\\"Q\\n\\x17GetTxPoolContentRequest\\x12\\x36\\n\\x0cpayload_type\\x18\\x01 \\x01(\\x0e\\x32\\x13.pactus.PayloadTypeR\\x0bpayloadType\\\"E\\n\\x18GetTxPoolContentResponse\\x12)\\n\\x03txs\\x18\\x01 \\x03(\\x0b\\x32\\x17.pactus.TransactionInfoR\\x03txs\\\"\\xa1\\x04\\n\\rValidatorInfo\\x12\\x12\\n\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x12\\n\\x04\\x64\\x61ta\\x18\\x02 \\x01(\\tR\\x04\\x64\\x61ta\\x12\\x1d\\n\\npublic_key\\x18\\x03 \\x01(\\tR\\tpublicKey\\x12\\x16\\n\\x06number\\x18\\x04 \\x01(\\x05R\\x06number\\x12\\x14\\n\\x05stake\\x18\\x05 \\x01(\\x03R\\x05stake\\x12.\\n\\x13last_bonding_height\\x18\\x06 \\x01(\\rR\\x11lastBondingHeight\\x12\\x32\\n\\x15last_sortition_height\\x18\\x07 \\x01(\\rR\\x13lastSortitionHeight\\x12)\\n\\x10unbonding_height\\x18\\x08 \\x01(\\rR\\x0funbondingHeight\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\t \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12-\\n\\x12\\x61vailability_score\\x18\\n \\x01(\\x01R\\x11\\x61vailabilityScore\\x12)\\n\\x10protocol_version\\x18\\x0b \\x01(\\x05R\\x0fprotocolVersion\\x12!\\n\\x0cis_delegated\\x18\\x0c \\x01(\\x08R\\x0bisDelegated\\x12%\\n\\x0e\\x64\\x65legate_owner\\x18\\r \\x01(\\tR\\rdelegateOwner\\x12%\\n\\x0e\\x64\\x65legate_share\\x18\\x0e \\x01(\\x03R\\rdelegateShare\\x12\\'\\n\\x0f\\x64\\x65legate_expiry\\x18\\x0f \\x01(\\rR\\x0e\\x64\\x65legateExpiry\\\"\\x81\\x01\\n\\x0b\\x41\\x63\\x63ountInfo\\x12\\x12\\n\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x12\\n\\x04\\x64\\x61ta\\x18\\x02 \\x01(\\tR\\x04\\x64\\x61ta\\x12\\x16\\n\\x06number\\x18\\x03 \\x01(\\x05R\\x06number\\x12\\x18\\n\\x07\\x62\\x61lance\\x18\\x04 \\x01(\\x03R\\x07\\x62\\x61lance\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x05 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"\\xc4\\x01\\n\\x0f\\x42lockHeaderInfo\\x12\\x18\\n\\x07version\\x18\\x01 \\x01(\\x05R\\x07version\\x12&\\n\\x0fprev_block_hash\\x18\\x02 \\x01(\\tR\\rprevBlockHash\\x12\\x1d\\n\\nstate_root\\x18\\x03 \\x01(\\tR\\tstateRoot\\x12%\\n\\x0esortition_seed\\x18\\x04 \\x01(\\tR\\rsortitionSeed\\x12)\\n\\x10proposer_address\\x18\\x05 \\x01(\\tR\\x0fproposerAddress\\\"\\x97\\x01\\n\\x0f\\x43\\x65rtificateInfo\\x12\\x12\\n\\x04hash\\x18\\x01 \\x01(\\tR\\x04hash\\x12\\x14\\n\\x05round\\x18\\x02 \\x01(\\x05R\\x05round\\x12\\x1e\\n\\ncommitters\\x18\\x03 \\x03(\\x05R\\ncommitters\\x12\\x1c\\n\\tabsentees\\x18\\x04 \\x03(\\x05R\\tabsentees\\x12\\x1c\\n\\tsignature\\x18\\x05 \\x01(\\tR\\tsignature\\\"\\xb1\\x01\\n\\x08VoteInfo\\x12$\\n\\x04type\\x18\\x01 \\x01(\\x0e\\x32\\x10.pactus.VoteTypeR\\x04type\\x12\\x14\\n\\x05voter\\x18\\x02 \\x01(\\tR\\x05voter\\x12\\x1d\\n\\nblock_hash\\x18\\x03 \\x01(\\tR\\tblockHash\\x12\\x14\\n\\x05round\\x18\\x04 \\x01(\\x05R\\x05round\\x12\\x19\\n\\x08\\x63p_round\\x18\\x05 \\x01(\\x05R\\x07\\x63pRound\\x12\\x19\\n\\x08\\x63p_value\\x18\\x06 \\x01(\\x05R\\x07\\x63pValue\\\"\\x97\\x01\\n\\rConsensusInfo\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x16\\n\\x06\\x61\\x63tive\\x18\\x02 \\x01(\\x08R\\x06\\x61\\x63tive\\x12\\x16\\n\\x06height\\x18\\x03 \\x01(\\rR\\x06height\\x12\\x14\\n\\x05round\\x18\\x04 \\x01(\\x05R\\x05round\\x12&\\n\\x05votes\\x18\\x05 \\x03(\\x0b\\x32\\x10.pactus.VoteInfoR\\x05votes\\\"y\\n\\x0cProposalInfo\\x12\\x16\\n\\x06height\\x18\\x01 \\x01(\\rR\\x06height\\x12\\x14\\n\\x05round\\x18\\x02 \\x01(\\x05R\\x05round\\x12\\x1d\\n\\nblock_data\\x18\\x03 \\x01(\\tR\\tblockData\\x12\\x1c\\n\\tsignature\\x18\\x04 \\x01(\\tR\\tsignature*f\\n\\x0e\\x42lockVerbosity\\x12\\x18\\n\\x14\\x42LOCK_VERBOSITY_DATA\\x10\\x00\\x12\\x18\\n\\x14\\x42LOCK_VERBOSITY_INFO\\x10\\x01\\x12 \\n\\x1c\\x42LOCK_VERBOSITY_TRANSACTIONS\\x10\\x02*\\xa6\\x01\\n\\x08VoteType\\x12\\x19\\n\\x15VOTE_TYPE_UNSPECIFIED\\x10\\x00\\x12\\x15\\n\\x11VOTE_TYPE_PREPARE\\x10\\x01\\x12\\x17\\n\\x13VOTE_TYPE_PRECOMMIT\\x10\\x02\\x12\\x19\\n\\x15VOTE_TYPE_CP_PRE_VOTE\\x10\\x03\\x12\\x1a\\n\\x16VOTE_TYPE_CP_MAIN_VOTE\\x10\\x04\\x12\\x18\\n\\x14VOTE_TYPE_CP_DECIDED\\x10\\x05\\x32\\xe2\\x07\\n\\nBlockchain\\x12=\\n\\x08GetBlock\\x12\\x17.pactus.GetBlockRequest\\x1a\\x18.pactus.GetBlockResponse\\x12I\\n\\x0cGetBlockHash\\x12\\x1b.pactus.GetBlockHashRequest\\x1a\\x1c.pactus.GetBlockHashResponse\\x12O\\n\\x0eGetBlockHeight\\x12\\x1d.pactus.GetBlockHeightRequest\\x1a\\x1e.pactus.GetBlockHeightResponse\\x12X\\n\\x11GetBlockchainInfo\\x12 .pactus.GetBlockchainInfoRequest\\x1a!.pactus.GetBlockchainInfoResponse\\x12U\\n\\x10GetCommitteeInfo\\x12\\x1f.pactus.GetCommitteeInfoRequest\\x1a .pactus.GetCommitteeInfoResponse\\x12U\\n\\x10GetConsensusInfo\\x12\\x1f.pactus.GetConsensusInfoRequest\\x1a .pactus.GetConsensusInfoResponse\\x12\\x43\\n\\nGetAccount\\x12\\x19.pactus.GetAccountRequest\\x1a\\x1a.pactus.GetAccountResponse\\x12I\\n\\x0cGetValidator\\x12\\x1b.pactus.GetValidatorRequest\\x1a\\x1c.pactus.GetValidatorResponse\\x12Y\\n\\x14GetValidatorByNumber\\x12#.pactus.GetValidatorByNumberRequest\\x1a\\x1c.pactus.GetValidatorResponse\\x12\\x64\\n\\x15GetValidatorAddresses\\x12$.pactus.GetValidatorAddressesRequest\\x1a%.pactus.GetValidatorAddressesResponse\\x12I\\n\\x0cGetPublicKey\\x12\\x1b.pactus.GetPublicKeyRequest\\x1a\\x1c.pactus.GetPublicKeyResponse\\x12U\\n\\x10GetTxPoolContent\\x12\\x1f.pactus.GetTxPoolContentRequest\\x1a .pactus.GetTxPoolContentResponseB:\\n\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3')\n\n_globals = globals()\n_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)\n_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'blockchain_pb2', _globals)\nif not _descriptor._USE_C_DESCRIPTORS:\n  _globals['DESCRIPTOR']._loaded_options = None\n  _globals['DESCRIPTOR']._serialized_options = b'\\n\\006pactusZ0github.com/pactus-project/pactus/www/grpc/pactus'\n  _globals['_GETCOMMITTEEINFORESPONSE_PROTOCOLVERSIONSENTRY']._loaded_options = None\n  _globals['_GETCOMMITTEEINFORESPONSE_PROTOCOLVERSIONSENTRY']._serialized_options = b'8\\001'\n  _globals['_BLOCKVERBOSITY']._serialized_start=3847\n  _globals['_BLOCKVERBOSITY']._serialized_end=3949\n  _globals['_VOTETYPE']._serialized_start=3952\n  _globals['_VOTETYPE']._serialized_end=4118\n  _globals['_GETACCOUNTREQUEST']._serialized_start=47\n  _globals['_GETACCOUNTREQUEST']._serialized_end=92\n  _globals['_GETACCOUNTRESPONSE']._serialized_start=94\n  _globals['_GETACCOUNTRESPONSE']._serialized_end=161\n  _globals['_GETVALIDATORADDRESSESREQUEST']._serialized_start=163\n  _globals['_GETVALIDATORADDRESSESREQUEST']._serialized_end=193\n  _globals['_GETVALIDATORADDRESSESRESPONSE']._serialized_start=195\n  _globals['_GETVALIDATORADDRESSESRESPONSE']._serialized_end=256\n  _globals['_GETVALIDATORREQUEST']._serialized_start=258\n  _globals['_GETVALIDATORREQUEST']._serialized_end=305\n  _globals['_GETVALIDATORBYNUMBERREQUEST']._serialized_start=307\n  _globals['_GETVALIDATORBYNUMBERREQUEST']._serialized_end=360\n  _globals['_GETVALIDATORRESPONSE']._serialized_start=362\n  _globals['_GETVALIDATORRESPONSE']._serialized_end=437\n  _globals['_GETPUBLICKEYREQUEST']._serialized_start=439\n  _globals['_GETPUBLICKEYREQUEST']._serialized_end=486\n  _globals['_GETPUBLICKEYRESPONSE']._serialized_start=488\n  _globals['_GETPUBLICKEYRESPONSE']._serialized_end=541\n  _globals['_GETBLOCKREQUEST']._serialized_start=543\n  _globals['_GETBLOCKREQUEST']._serialized_end=638\n  _globals['_GETBLOCKRESPONSE']._serialized_start=641\n  _globals['_GETBLOCKRESPONSE']._serialized_end=900\n  _globals['_GETBLOCKHASHREQUEST']._serialized_start=902\n  _globals['_GETBLOCKHASHREQUEST']._serialized_end=947\n  _globals['_GETBLOCKHASHRESPONSE']._serialized_start=949\n  _globals['_GETBLOCKHASHRESPONSE']._serialized_end=991\n  _globals['_GETBLOCKHEIGHTREQUEST']._serialized_start=993\n  _globals['_GETBLOCKHEIGHTREQUEST']._serialized_end=1036\n  _globals['_GETBLOCKHEIGHTRESPONSE']._serialized_start=1038\n  _globals['_GETBLOCKHEIGHTRESPONSE']._serialized_end=1086\n  _globals['_GETBLOCKCHAININFOREQUEST']._serialized_start=1088\n  _globals['_GETBLOCKCHAININFOREQUEST']._serialized_end=1114\n  _globals['_GETBLOCKCHAININFORESPONSE']._serialized_start=1117\n  _globals['_GETBLOCKCHAININFORESPONSE']._serialized_end=1648\n  _globals['_GETCOMMITTEEINFOREQUEST']._serialized_start=1650\n  _globals['_GETCOMMITTEEINFOREQUEST']._serialized_end=1675\n  _globals['_GETCOMMITTEEINFORESPONSE']._serialized_start=1678\n  _globals['_GETCOMMITTEEINFORESPONSE']._serialized_end=2042\n  _globals['_GETCOMMITTEEINFORESPONSE_PROTOCOLVERSIONSENTRY']._serialized_start=1975\n  _globals['_GETCOMMITTEEINFORESPONSE_PROTOCOLVERSIONSENTRY']._serialized_end=2042\n  _globals['_GETCONSENSUSINFOREQUEST']._serialized_start=2044\n  _globals['_GETCONSENSUSINFOREQUEST']._serialized_end=2069\n  _globals['_GETCONSENSUSINFORESPONSE']._serialized_start=2072\n  _globals['_GETCONSENSUSINFORESPONSE']._serialized_end=2201\n  _globals['_GETTXPOOLCONTENTREQUEST']._serialized_start=2203\n  _globals['_GETTXPOOLCONTENTREQUEST']._serialized_end=2284\n  _globals['_GETTXPOOLCONTENTRESPONSE']._serialized_start=2286\n  _globals['_GETTXPOOLCONTENTRESPONSE']._serialized_end=2355\n  _globals['_VALIDATORINFO']._serialized_start=2358\n  _globals['_VALIDATORINFO']._serialized_end=2903\n  _globals['_ACCOUNTINFO']._serialized_start=2906\n  _globals['_ACCOUNTINFO']._serialized_end=3035\n  _globals['_BLOCKHEADERINFO']._serialized_start=3038\n  _globals['_BLOCKHEADERINFO']._serialized_end=3234\n  _globals['_CERTIFICATEINFO']._serialized_start=3237\n  _globals['_CERTIFICATEINFO']._serialized_end=3388\n  _globals['_VOTEINFO']._serialized_start=3391\n  _globals['_VOTEINFO']._serialized_end=3568\n  _globals['_CONSENSUSINFO']._serialized_start=3571\n  _globals['_CONSENSUSINFO']._serialized_end=3722\n  _globals['_PROPOSALINFO']._serialized_start=3724\n  _globals['_PROPOSALINFO']._serialized_end=3845\n  _globals['_BLOCKCHAIN']._serialized_start=4121\n  _globals['_BLOCKCHAIN']._serialized_end=5115\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "www/grpc/gen/python/blockchain_pb2.pyi",
    "content": "import transaction_pb2 as _transaction_pb2\nfrom google.protobuf.internal import containers as _containers\nfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom collections.abc import Iterable as _Iterable, Mapping as _Mapping\nfrom typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union\n\nDESCRIPTOR: _descriptor.FileDescriptor\n\nclass BlockVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    BLOCK_VERBOSITY_DATA: _ClassVar[BlockVerbosity]\n    BLOCK_VERBOSITY_INFO: _ClassVar[BlockVerbosity]\n    BLOCK_VERBOSITY_TRANSACTIONS: _ClassVar[BlockVerbosity]\n\nclass VoteType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    VOTE_TYPE_UNSPECIFIED: _ClassVar[VoteType]\n    VOTE_TYPE_PREPARE: _ClassVar[VoteType]\n    VOTE_TYPE_PRECOMMIT: _ClassVar[VoteType]\n    VOTE_TYPE_CP_PRE_VOTE: _ClassVar[VoteType]\n    VOTE_TYPE_CP_MAIN_VOTE: _ClassVar[VoteType]\n    VOTE_TYPE_CP_DECIDED: _ClassVar[VoteType]\nBLOCK_VERBOSITY_DATA: BlockVerbosity\nBLOCK_VERBOSITY_INFO: BlockVerbosity\nBLOCK_VERBOSITY_TRANSACTIONS: BlockVerbosity\nVOTE_TYPE_UNSPECIFIED: VoteType\nVOTE_TYPE_PREPARE: VoteType\nVOTE_TYPE_PRECOMMIT: VoteType\nVOTE_TYPE_CP_PRE_VOTE: VoteType\nVOTE_TYPE_CP_MAIN_VOTE: VoteType\nVOTE_TYPE_CP_DECIDED: VoteType\n\nclass GetAccountRequest(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    def __init__(self, address: _Optional[str] = ...) -> None: ...\n\nclass GetAccountResponse(_message.Message):\n    __slots__ = ()\n    ACCOUNT_FIELD_NUMBER: _ClassVar[int]\n    account: AccountInfo\n    def __init__(self, account: _Optional[_Union[AccountInfo, _Mapping]] = ...) -> None: ...\n\nclass GetValidatorAddressesRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetValidatorAddressesResponse(_message.Message):\n    __slots__ = ()\n    ADDRESSES_FIELD_NUMBER: _ClassVar[int]\n    addresses: _containers.RepeatedScalarFieldContainer[str]\n    def __init__(self, addresses: _Optional[_Iterable[str]] = ...) -> None: ...\n\nclass GetValidatorRequest(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    def __init__(self, address: _Optional[str] = ...) -> None: ...\n\nclass GetValidatorByNumberRequest(_message.Message):\n    __slots__ = ()\n    NUMBER_FIELD_NUMBER: _ClassVar[int]\n    number: int\n    def __init__(self, number: _Optional[int] = ...) -> None: ...\n\nclass GetValidatorResponse(_message.Message):\n    __slots__ = ()\n    VALIDATOR_FIELD_NUMBER: _ClassVar[int]\n    validator: ValidatorInfo\n    def __init__(self, validator: _Optional[_Union[ValidatorInfo, _Mapping]] = ...) -> None: ...\n\nclass GetPublicKeyRequest(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    def __init__(self, address: _Optional[str] = ...) -> None: ...\n\nclass GetPublicKeyResponse(_message.Message):\n    __slots__ = ()\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    public_key: str\n    def __init__(self, public_key: _Optional[str] = ...) -> None: ...\n\nclass GetBlockRequest(_message.Message):\n    __slots__ = ()\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    VERBOSITY_FIELD_NUMBER: _ClassVar[int]\n    height: int\n    verbosity: BlockVerbosity\n    def __init__(self, height: _Optional[int] = ..., verbosity: _Optional[_Union[BlockVerbosity, str]] = ...) -> None: ...\n\nclass GetBlockResponse(_message.Message):\n    __slots__ = ()\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    DATA_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    HEADER_FIELD_NUMBER: _ClassVar[int]\n    PREV_CERT_FIELD_NUMBER: _ClassVar[int]\n    TXS_FIELD_NUMBER: _ClassVar[int]\n    height: int\n    hash: str\n    data: str\n    block_time: int\n    header: BlockHeaderInfo\n    prev_cert: CertificateInfo\n    txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo]\n    def __init__(self, height: _Optional[int] = ..., hash: _Optional[str] = ..., data: _Optional[str] = ..., block_time: _Optional[int] = ..., header: _Optional[_Union[BlockHeaderInfo, _Mapping]] = ..., prev_cert: _Optional[_Union[CertificateInfo, _Mapping]] = ..., txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ...\n\nclass GetBlockHashRequest(_message.Message):\n    __slots__ = ()\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    height: int\n    def __init__(self, height: _Optional[int] = ...) -> None: ...\n\nclass GetBlockHashResponse(_message.Message):\n    __slots__ = ()\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    hash: str\n    def __init__(self, hash: _Optional[str] = ...) -> None: ...\n\nclass GetBlockHeightRequest(_message.Message):\n    __slots__ = ()\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    hash: str\n    def __init__(self, hash: _Optional[str] = ...) -> None: ...\n\nclass GetBlockHeightResponse(_message.Message):\n    __slots__ = ()\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    height: int\n    def __init__(self, height: _Optional[int] = ...) -> None: ...\n\nclass GetBlockchainInfoRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetBlockchainInfoResponse(_message.Message):\n    __slots__ = ()\n    LAST_BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]\n    LAST_BLOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_ACCOUNTS_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_VALIDATORS_FIELD_NUMBER: _ClassVar[int]\n    ACTIVE_VALIDATORS_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_POWER_FIELD_NUMBER: _ClassVar[int]\n    COMMITTEE_POWER_FIELD_NUMBER: _ClassVar[int]\n    IS_PRUNED_FIELD_NUMBER: _ClassVar[int]\n    PRUNING_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    IN_COMMITTEE_FIELD_NUMBER: _ClassVar[int]\n    COMMITTEE_SIZE_FIELD_NUMBER: _ClassVar[int]\n    AVERAGE_SCORE_FIELD_NUMBER: _ClassVar[int]\n    last_block_height: int\n    last_block_hash: str\n    last_block_time: int\n    total_accounts: int\n    total_validators: int\n    active_validators: int\n    total_power: int\n    committee_power: int\n    is_pruned: bool\n    pruning_height: int\n    in_committee: bool\n    committee_size: int\n    average_score: float\n    def __init__(self, last_block_height: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., last_block_time: _Optional[int] = ..., total_accounts: _Optional[int] = ..., total_validators: _Optional[int] = ..., active_validators: _Optional[int] = ..., total_power: _Optional[int] = ..., committee_power: _Optional[int] = ..., is_pruned: _Optional[bool] = ..., pruning_height: _Optional[int] = ..., in_committee: _Optional[bool] = ..., committee_size: _Optional[int] = ..., average_score: _Optional[float] = ...) -> None: ...\n\nclass GetCommitteeInfoRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetCommitteeInfoResponse(_message.Message):\n    __slots__ = ()\n    class ProtocolVersionsEntry(_message.Message):\n        __slots__ = ()\n        KEY_FIELD_NUMBER: _ClassVar[int]\n        VALUE_FIELD_NUMBER: _ClassVar[int]\n        key: int\n        value: float\n        def __init__(self, key: _Optional[int] = ..., value: _Optional[float] = ...) -> None: ...\n    COMMITTEE_SIZE_FIELD_NUMBER: _ClassVar[int]\n    COMMITTEE_POWER_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_POWER_FIELD_NUMBER: _ClassVar[int]\n    VALIDATORS_FIELD_NUMBER: _ClassVar[int]\n    PROTOCOL_VERSIONS_FIELD_NUMBER: _ClassVar[int]\n    committee_size: int\n    committee_power: int\n    total_power: int\n    validators: _containers.RepeatedCompositeFieldContainer[ValidatorInfo]\n    protocol_versions: _containers.ScalarMap[int, float]\n    def __init__(self, committee_size: _Optional[int] = ..., committee_power: _Optional[int] = ..., total_power: _Optional[int] = ..., validators: _Optional[_Iterable[_Union[ValidatorInfo, _Mapping]]] = ..., protocol_versions: _Optional[_Mapping[int, float]] = ...) -> None: ...\n\nclass GetConsensusInfoRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetConsensusInfoResponse(_message.Message):\n    __slots__ = ()\n    PROPOSAL_FIELD_NUMBER: _ClassVar[int]\n    INSTANCES_FIELD_NUMBER: _ClassVar[int]\n    proposal: ProposalInfo\n    instances: _containers.RepeatedCompositeFieldContainer[ConsensusInfo]\n    def __init__(self, proposal: _Optional[_Union[ProposalInfo, _Mapping]] = ..., instances: _Optional[_Iterable[_Union[ConsensusInfo, _Mapping]]] = ...) -> None: ...\n\nclass GetTxPoolContentRequest(_message.Message):\n    __slots__ = ()\n    PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int]\n    payload_type: _transaction_pb2.PayloadType\n    def __init__(self, payload_type: _Optional[_Union[_transaction_pb2.PayloadType, str]] = ...) -> None: ...\n\nclass GetTxPoolContentResponse(_message.Message):\n    __slots__ = ()\n    TXS_FIELD_NUMBER: _ClassVar[int]\n    txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo]\n    def __init__(self, txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ...\n\nclass ValidatorInfo(_message.Message):\n    __slots__ = ()\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    DATA_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    NUMBER_FIELD_NUMBER: _ClassVar[int]\n    STAKE_FIELD_NUMBER: _ClassVar[int]\n    LAST_BONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    LAST_SORTITION_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    UNBONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    AVAILABILITY_SCORE_FIELD_NUMBER: _ClassVar[int]\n    PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]\n    IS_DELEGATED_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_OWNER_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_SHARE_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_EXPIRY_FIELD_NUMBER: _ClassVar[int]\n    hash: str\n    data: str\n    public_key: str\n    number: int\n    stake: int\n    last_bonding_height: int\n    last_sortition_height: int\n    unbonding_height: int\n    address: str\n    availability_score: float\n    protocol_version: int\n    is_delegated: bool\n    delegate_owner: str\n    delegate_share: int\n    delegate_expiry: int\n    def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., public_key: _Optional[str] = ..., number: _Optional[int] = ..., stake: _Optional[int] = ..., last_bonding_height: _Optional[int] = ..., last_sortition_height: _Optional[int] = ..., unbonding_height: _Optional[int] = ..., address: _Optional[str] = ..., availability_score: _Optional[float] = ..., protocol_version: _Optional[int] = ..., is_delegated: _Optional[bool] = ..., delegate_owner: _Optional[str] = ..., delegate_share: _Optional[int] = ..., delegate_expiry: _Optional[int] = ...) -> None: ...\n\nclass AccountInfo(_message.Message):\n    __slots__ = ()\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    DATA_FIELD_NUMBER: _ClassVar[int]\n    NUMBER_FIELD_NUMBER: _ClassVar[int]\n    BALANCE_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    hash: str\n    data: str\n    number: int\n    balance: int\n    address: str\n    def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., number: _Optional[int] = ..., balance: _Optional[int] = ..., address: _Optional[str] = ...) -> None: ...\n\nclass BlockHeaderInfo(_message.Message):\n    __slots__ = ()\n    VERSION_FIELD_NUMBER: _ClassVar[int]\n    PREV_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]\n    STATE_ROOT_FIELD_NUMBER: _ClassVar[int]\n    SORTITION_SEED_FIELD_NUMBER: _ClassVar[int]\n    PROPOSER_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    version: int\n    prev_block_hash: str\n    state_root: str\n    sortition_seed: str\n    proposer_address: str\n    def __init__(self, version: _Optional[int] = ..., prev_block_hash: _Optional[str] = ..., state_root: _Optional[str] = ..., sortition_seed: _Optional[str] = ..., proposer_address: _Optional[str] = ...) -> None: ...\n\nclass CertificateInfo(_message.Message):\n    __slots__ = ()\n    HASH_FIELD_NUMBER: _ClassVar[int]\n    ROUND_FIELD_NUMBER: _ClassVar[int]\n    COMMITTERS_FIELD_NUMBER: _ClassVar[int]\n    ABSENTEES_FIELD_NUMBER: _ClassVar[int]\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    hash: str\n    round: int\n    committers: _containers.RepeatedScalarFieldContainer[int]\n    absentees: _containers.RepeatedScalarFieldContainer[int]\n    signature: str\n    def __init__(self, hash: _Optional[str] = ..., round: _Optional[int] = ..., committers: _Optional[_Iterable[int]] = ..., absentees: _Optional[_Iterable[int]] = ..., signature: _Optional[str] = ...) -> None: ...\n\nclass VoteInfo(_message.Message):\n    __slots__ = ()\n    TYPE_FIELD_NUMBER: _ClassVar[int]\n    VOTER_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]\n    ROUND_FIELD_NUMBER: _ClassVar[int]\n    CP_ROUND_FIELD_NUMBER: _ClassVar[int]\n    CP_VALUE_FIELD_NUMBER: _ClassVar[int]\n    type: VoteType\n    voter: str\n    block_hash: str\n    round: int\n    cp_round: int\n    cp_value: int\n    def __init__(self, type: _Optional[_Union[VoteType, str]] = ..., voter: _Optional[str] = ..., block_hash: _Optional[str] = ..., round: _Optional[int] = ..., cp_round: _Optional[int] = ..., cp_value: _Optional[int] = ...) -> None: ...\n\nclass ConsensusInfo(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    ACTIVE_FIELD_NUMBER: _ClassVar[int]\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    ROUND_FIELD_NUMBER: _ClassVar[int]\n    VOTES_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    active: bool\n    height: int\n    round: int\n    votes: _containers.RepeatedCompositeFieldContainer[VoteInfo]\n    def __init__(self, address: _Optional[str] = ..., active: _Optional[bool] = ..., height: _Optional[int] = ..., round: _Optional[int] = ..., votes: _Optional[_Iterable[_Union[VoteInfo, _Mapping]]] = ...) -> None: ...\n\nclass ProposalInfo(_message.Message):\n    __slots__ = ()\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    ROUND_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_DATA_FIELD_NUMBER: _ClassVar[int]\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    height: int\n    round: int\n    block_data: str\n    signature: str\n    def __init__(self, height: _Optional[int] = ..., round: _Optional[int] = ..., block_data: _Optional[str] = ..., signature: _Optional[str] = ...) -> None: ...\n"
  },
  {
    "path": "www/grpc/gen/python/blockchain_pb2_grpc.py",
    "content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nimport blockchain_pb2 as blockchain__pb2\n\n\nclass BlockchainStub(object):\n    \"\"\"Blockchain service defines RPC methods for interacting with the blockchain.\n    \"\"\"\n\n    def __init__(self, channel):\n        \"\"\"Constructor.\n\n        Args:\n            channel: A grpc.Channel.\n        \"\"\"\n        self.GetBlock = channel.unary_unary(\n                '/pactus.Blockchain/GetBlock',\n                request_serializer=blockchain__pb2.GetBlockRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetBlockResponse.FromString,\n                _registered_method=True)\n        self.GetBlockHash = channel.unary_unary(\n                '/pactus.Blockchain/GetBlockHash',\n                request_serializer=blockchain__pb2.GetBlockHashRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetBlockHashResponse.FromString,\n                _registered_method=True)\n        self.GetBlockHeight = channel.unary_unary(\n                '/pactus.Blockchain/GetBlockHeight',\n                request_serializer=blockchain__pb2.GetBlockHeightRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetBlockHeightResponse.FromString,\n                _registered_method=True)\n        self.GetBlockchainInfo = channel.unary_unary(\n                '/pactus.Blockchain/GetBlockchainInfo',\n                request_serializer=blockchain__pb2.GetBlockchainInfoRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetBlockchainInfoResponse.FromString,\n                _registered_method=True)\n        self.GetCommitteeInfo = channel.unary_unary(\n                '/pactus.Blockchain/GetCommitteeInfo',\n                request_serializer=blockchain__pb2.GetCommitteeInfoRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetCommitteeInfoResponse.FromString,\n                _registered_method=True)\n        self.GetConsensusInfo = channel.unary_unary(\n                '/pactus.Blockchain/GetConsensusInfo',\n                request_serializer=blockchain__pb2.GetConsensusInfoRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetConsensusInfoResponse.FromString,\n                _registered_method=True)\n        self.GetAccount = channel.unary_unary(\n                '/pactus.Blockchain/GetAccount',\n                request_serializer=blockchain__pb2.GetAccountRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetAccountResponse.FromString,\n                _registered_method=True)\n        self.GetValidator = channel.unary_unary(\n                '/pactus.Blockchain/GetValidator',\n                request_serializer=blockchain__pb2.GetValidatorRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetValidatorResponse.FromString,\n                _registered_method=True)\n        self.GetValidatorByNumber = channel.unary_unary(\n                '/pactus.Blockchain/GetValidatorByNumber',\n                request_serializer=blockchain__pb2.GetValidatorByNumberRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetValidatorResponse.FromString,\n                _registered_method=True)\n        self.GetValidatorAddresses = channel.unary_unary(\n                '/pactus.Blockchain/GetValidatorAddresses',\n                request_serializer=blockchain__pb2.GetValidatorAddressesRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetValidatorAddressesResponse.FromString,\n                _registered_method=True)\n        self.GetPublicKey = channel.unary_unary(\n                '/pactus.Blockchain/GetPublicKey',\n                request_serializer=blockchain__pb2.GetPublicKeyRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetPublicKeyResponse.FromString,\n                _registered_method=True)\n        self.GetTxPoolContent = channel.unary_unary(\n                '/pactus.Blockchain/GetTxPoolContent',\n                request_serializer=blockchain__pb2.GetTxPoolContentRequest.SerializeToString,\n                response_deserializer=blockchain__pb2.GetTxPoolContentResponse.FromString,\n                _registered_method=True)\n\n\nclass BlockchainServicer(object):\n    \"\"\"Blockchain service defines RPC methods for interacting with the blockchain.\n    \"\"\"\n\n    def GetBlock(self, request, context):\n        \"\"\"GetBlock retrieves information about a block based on the provided request parameters.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetBlockHash(self, request, context):\n        \"\"\"GetBlockHash retrieves the hash of a block at the specified height.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetBlockHeight(self, request, context):\n        \"\"\"GetBlockHeight retrieves the height of a block with the specified hash.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetBlockchainInfo(self, request, context):\n        \"\"\"GetBlockchainInfo retrieves general information about the blockchain.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetCommitteeInfo(self, request, context):\n        \"\"\"GetCommitteeInfo retrieves information about the current committee.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetConsensusInfo(self, request, context):\n        \"\"\"GetConsensusInfo retrieves information about the consensus instances.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetAccount(self, request, context):\n        \"\"\"GetAccount retrieves information about an account based on the provided address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetValidator(self, request, context):\n        \"\"\"GetValidator retrieves information about a validator based on the provided address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetValidatorByNumber(self, request, context):\n        \"\"\"GetValidatorByNumber retrieves information about a validator based on the provided number.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetValidatorAddresses(self, request, context):\n        \"\"\"GetValidatorAddresses retrieves a list of all validator addresses.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetPublicKey(self, request, context):\n        \"\"\"GetPublicKey retrieves the public key of an account based on the provided address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetTxPoolContent(self, request, context):\n        \"\"\"GetTxPoolContent retrieves current transactions in the transaction pool.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n\ndef add_BlockchainServicer_to_server(servicer, server):\n    rpc_method_handlers = {\n            'GetBlock': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetBlock,\n                    request_deserializer=blockchain__pb2.GetBlockRequest.FromString,\n                    response_serializer=blockchain__pb2.GetBlockResponse.SerializeToString,\n            ),\n            'GetBlockHash': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetBlockHash,\n                    request_deserializer=blockchain__pb2.GetBlockHashRequest.FromString,\n                    response_serializer=blockchain__pb2.GetBlockHashResponse.SerializeToString,\n            ),\n            'GetBlockHeight': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetBlockHeight,\n                    request_deserializer=blockchain__pb2.GetBlockHeightRequest.FromString,\n                    response_serializer=blockchain__pb2.GetBlockHeightResponse.SerializeToString,\n            ),\n            'GetBlockchainInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetBlockchainInfo,\n                    request_deserializer=blockchain__pb2.GetBlockchainInfoRequest.FromString,\n                    response_serializer=blockchain__pb2.GetBlockchainInfoResponse.SerializeToString,\n            ),\n            'GetCommitteeInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetCommitteeInfo,\n                    request_deserializer=blockchain__pb2.GetCommitteeInfoRequest.FromString,\n                    response_serializer=blockchain__pb2.GetCommitteeInfoResponse.SerializeToString,\n            ),\n            'GetConsensusInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetConsensusInfo,\n                    request_deserializer=blockchain__pb2.GetConsensusInfoRequest.FromString,\n                    response_serializer=blockchain__pb2.GetConsensusInfoResponse.SerializeToString,\n            ),\n            'GetAccount': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetAccount,\n                    request_deserializer=blockchain__pb2.GetAccountRequest.FromString,\n                    response_serializer=blockchain__pb2.GetAccountResponse.SerializeToString,\n            ),\n            'GetValidator': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetValidator,\n                    request_deserializer=blockchain__pb2.GetValidatorRequest.FromString,\n                    response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString,\n            ),\n            'GetValidatorByNumber': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetValidatorByNumber,\n                    request_deserializer=blockchain__pb2.GetValidatorByNumberRequest.FromString,\n                    response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString,\n            ),\n            'GetValidatorAddresses': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetValidatorAddresses,\n                    request_deserializer=blockchain__pb2.GetValidatorAddressesRequest.FromString,\n                    response_serializer=blockchain__pb2.GetValidatorAddressesResponse.SerializeToString,\n            ),\n            'GetPublicKey': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetPublicKey,\n                    request_deserializer=blockchain__pb2.GetPublicKeyRequest.FromString,\n                    response_serializer=blockchain__pb2.GetPublicKeyResponse.SerializeToString,\n            ),\n            'GetTxPoolContent': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetTxPoolContent,\n                    request_deserializer=blockchain__pb2.GetTxPoolContentRequest.FromString,\n                    response_serializer=blockchain__pb2.GetTxPoolContentResponse.SerializeToString,\n            ),\n    }\n    generic_handler = grpc.method_handlers_generic_handler(\n            'pactus.Blockchain', rpc_method_handlers)\n    server.add_generic_rpc_handlers((generic_handler,))\n    server.add_registered_method_handlers('pactus.Blockchain', rpc_method_handlers)\n\n\n # This class is part of an EXPERIMENTAL API.\nclass Blockchain(object):\n    \"\"\"Blockchain service defines RPC methods for interacting with the blockchain.\n    \"\"\"\n\n    @staticmethod\n    def GetBlock(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetBlock',\n            blockchain__pb2.GetBlockRequest.SerializeToString,\n            blockchain__pb2.GetBlockResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetBlockHash(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetBlockHash',\n            blockchain__pb2.GetBlockHashRequest.SerializeToString,\n            blockchain__pb2.GetBlockHashResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetBlockHeight(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetBlockHeight',\n            blockchain__pb2.GetBlockHeightRequest.SerializeToString,\n            blockchain__pb2.GetBlockHeightResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetBlockchainInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetBlockchainInfo',\n            blockchain__pb2.GetBlockchainInfoRequest.SerializeToString,\n            blockchain__pb2.GetBlockchainInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetCommitteeInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetCommitteeInfo',\n            blockchain__pb2.GetCommitteeInfoRequest.SerializeToString,\n            blockchain__pb2.GetCommitteeInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetConsensusInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetConsensusInfo',\n            blockchain__pb2.GetConsensusInfoRequest.SerializeToString,\n            blockchain__pb2.GetConsensusInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetAccount(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetAccount',\n            blockchain__pb2.GetAccountRequest.SerializeToString,\n            blockchain__pb2.GetAccountResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetValidator(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetValidator',\n            blockchain__pb2.GetValidatorRequest.SerializeToString,\n            blockchain__pb2.GetValidatorResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetValidatorByNumber(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetValidatorByNumber',\n            blockchain__pb2.GetValidatorByNumberRequest.SerializeToString,\n            blockchain__pb2.GetValidatorResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetValidatorAddresses(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetValidatorAddresses',\n            blockchain__pb2.GetValidatorAddressesRequest.SerializeToString,\n            blockchain__pb2.GetValidatorAddressesResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetPublicKey(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetPublicKey',\n            blockchain__pb2.GetPublicKeyRequest.SerializeToString,\n            blockchain__pb2.GetPublicKeyResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetTxPoolContent(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Blockchain/GetTxPoolContent',\n            blockchain__pb2.GetTxPoolContentRequest.SerializeToString,\n            blockchain__pb2.GetTxPoolContentResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n"
  },
  {
    "path": "www/grpc/gen/python/network_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# NO CHECKED-IN PROTOBUF GENCODE\n# source: network.proto\n# Protobuf Python Version: 6.33.2\n\"\"\"Generated protocol buffer code.\"\"\"\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import descriptor_pool as _descriptor_pool\nfrom google.protobuf import runtime_version as _runtime_version\nfrom google.protobuf import symbol_database as _symbol_database\nfrom google.protobuf.internal import builder as _builder\n_runtime_version.ValidateProtobufRuntimeVersion(\n    _runtime_version.Domain.PUBLIC,\n    6,\n    33,\n    2,\n    '',\n    'network.proto'\n)\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\\n\\rnetwork.proto\\x12\\x06pactus\\\"\\x17\\n\\x15GetNetworkInfoRequest\\\"\\xa4\\x01\\n\\x16GetNetworkInfoResponse\\x12!\\n\\x0cnetwork_name\\x18\\x01 \\x01(\\tR\\x0bnetworkName\\x12\\x32\\n\\x15\\x63onnected_peers_count\\x18\\x02 \\x01(\\rR\\x13\\x63onnectedPeersCount\\x12\\x33\\n\\x0bmetric_info\\x18\\x04 \\x01(\\x0b\\x32\\x12.pactus.MetricInfoR\\nmetricInfo\\\"E\\n\\x10ListPeersRequest\\x12\\x31\\n\\x14include_disconnected\\x18\\x01 \\x01(\\x08R\\x13includeDisconnected\\\";\\n\\x11ListPeersResponse\\x12&\\n\\x05peers\\x18\\x01 \\x03(\\x0b\\x32\\x10.pactus.PeerInfoR\\x05peers\\\"\\x14\\n\\x12GetNodeInfoRequest\\\"\\x8e\\x04\\n\\x13GetNodeInfoResponse\\x12\\x18\\n\\x07moniker\\x18\\x01 \\x01(\\tR\\x07moniker\\x12\\x14\\n\\x05\\x61gent\\x18\\x02 \\x01(\\tR\\x05\\x61gent\\x12\\x17\\n\\x07peer_id\\x18\\x03 \\x01(\\tR\\x06peerId\\x12\\x1d\\n\\nstarted_at\\x18\\x04 \\x01(\\x04R\\tstartedAt\\x12\\\"\\n\\x0creachability\\x18\\x05 \\x01(\\tR\\x0creachability\\x12\\x1a\\n\\x08services\\x18\\x06 \\x01(\\x05R\\x08services\\x12%\\n\\x0eservices_names\\x18\\x07 \\x01(\\tR\\rservicesNames\\x12\\x1f\\n\\x0blocal_addrs\\x18\\x08 \\x03(\\tR\\nlocalAddrs\\x12\\x1c\\n\\tprotocols\\x18\\t \\x03(\\tR\\tprotocols\\x12!\\n\\x0c\\x63lock_offset\\x18\\r \\x01(\\x01R\\x0b\\x63lockOffset\\x12?\\n\\x0f\\x63onnection_info\\x18\\x0e \\x01(\\x0b\\x32\\x16.pactus.ConnectionInfoR\\x0e\\x63onnectionInfo\\x12?\\n\\x0ezmq_publishers\\x18\\x0f \\x03(\\x0b\\x32\\x18.pactus.ZMQPublisherInfoR\\rzmqPublishers\\x12!\\n\\x0c\\x63urrent_time\\x18\\x10 \\x01(\\x04R\\x0b\\x63urrentTime\\x12!\\n\\x0cnetwork_name\\x18\\x11 \\x01(\\tR\\x0bnetworkName\\\"T\\n\\x10ZMQPublisherInfo\\x12\\x14\\n\\x05topic\\x18\\x01 \\x01(\\tR\\x05topic\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x02 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x10\\n\\x03hwm\\x18\\x03 \\x01(\\x05R\\x03hwm\\\"\\x85\\x05\\n\\x08PeerInfo\\x12\\x16\\n\\x06status\\x18\\x01 \\x01(\\x05R\\x06status\\x12\\x18\\n\\x07moniker\\x18\\x02 \\x01(\\tR\\x07moniker\\x12\\x14\\n\\x05\\x61gent\\x18\\x03 \\x01(\\tR\\x05\\x61gent\\x12\\x17\\n\\x07peer_id\\x18\\x04 \\x01(\\tR\\x06peerId\\x12%\\n\\x0e\\x63onsensus_keys\\x18\\x05 \\x03(\\tR\\rconsensusKeys\\x12/\\n\\x13\\x63onsensus_addresses\\x18\\x06 \\x03(\\tR\\x12\\x63onsensusAddresses\\x12\\x1a\\n\\x08services\\x18\\x07 \\x01(\\rR\\x08services\\x12&\\n\\x0flast_block_hash\\x18\\x08 \\x01(\\tR\\rlastBlockHash\\x12\\x16\\n\\x06height\\x18\\t \\x01(\\rR\\x06height\\x12\\x1b\\n\\tlast_sent\\x18\\n \\x01(\\x03R\\x08lastSent\\x12#\\n\\rlast_received\\x18\\x0b \\x01(\\x03R\\x0clastReceived\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x0c \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12/\\n\\tdirection\\x18\\r \\x01(\\x0e\\x32\\x11.pactus.DirectionR\\tdirection\\x12\\x1c\\n\\tprotocols\\x18\\x0e \\x03(\\tR\\tprotocols\\x12%\\n\\x0etotal_sessions\\x18\\x0f \\x01(\\x05R\\rtotalSessions\\x12-\\n\\x12\\x63ompleted_sessions\\x18\\x10 \\x01(\\x05R\\x11\\x63ompletedSessions\\x12\\x33\\n\\x0bmetric_info\\x18\\x11 \\x01(\\x0b\\x32\\x12.pactus.MetricInfoR\\nmetricInfo\\x12.\\n\\x13outbound_hello_sent\\x18\\x12 \\x01(\\x08R\\x11outboundHelloSent\\\"\\x96\\x01\\n\\x0e\\x43onnectionInfo\\x12 \\n\\x0b\\x63onnections\\x18\\x01 \\x01(\\x04R\\x0b\\x63onnections\\x12/\\n\\x13inbound_connections\\x18\\x02 \\x01(\\x04R\\x12inboundConnections\\x12\\x31\\n\\x14outbound_connections\\x18\\x03 \\x01(\\x04R\\x13outboundConnections\\\"\\x80\\x04\\n\\nMetricInfo\\x12\\x38\\n\\rtotal_invalid\\x18\\x01 \\x01(\\x0b\\x32\\x13.pactus.CounterInfoR\\x0ctotalInvalid\\x12\\x32\\n\\ntotal_sent\\x18\\x02 \\x01(\\x0b\\x32\\x13.pactus.CounterInfoR\\ttotalSent\\x12:\\n\\x0etotal_received\\x18\\x03 \\x01(\\x0b\\x32\\x13.pactus.CounterInfoR\\rtotalReceived\\x12\\x46\\n\\x0cmessage_sent\\x18\\x04 \\x03(\\x0b\\x32#.pactus.MetricInfo.MessageSentEntryR\\x0bmessageSent\\x12R\\n\\x10message_received\\x18\\x05 \\x03(\\x0b\\x32\\'.pactus.MetricInfo.MessageReceivedEntryR\\x0fmessageReceived\\x1aS\\n\\x10MessageSentEntry\\x12\\x10\\n\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12)\\n\\x05value\\x18\\x02 \\x01(\\x0b\\x32\\x13.pactus.CounterInfoR\\x05value:\\x02\\x38\\x01\\x1aW\\n\\x14MessageReceivedEntry\\x12\\x10\\n\\x03key\\x18\\x01 \\x01(\\x05R\\x03key\\x12)\\n\\x05value\\x18\\x02 \\x01(\\x0b\\x32\\x13.pactus.CounterInfoR\\x05value:\\x02\\x38\\x01\\\"=\\n\\x0b\\x43ounterInfo\\x12\\x14\\n\\x05\\x62ytes\\x18\\x01 \\x01(\\x04R\\x05\\x62ytes\\x12\\x18\\n\\x07\\x62undles\\x18\\x02 \\x01(\\x04R\\x07\\x62undles\\\"\\r\\n\\x0bPingRequest\\\"\\x0e\\n\\x0cPingResponse*Q\\n\\tDirection\\x12\\x15\\n\\x11\\x44IRECTION_UNKNOWN\\x10\\x00\\x12\\x15\\n\\x11\\x44IRECTION_INBOUND\\x10\\x01\\x12\\x16\\n\\x12\\x44IRECTION_OUTBOUND\\x10\\x02\\x32\\x97\\x02\\n\\x07Network\\x12O\\n\\x0eGetNetworkInfo\\x12\\x1d.pactus.GetNetworkInfoRequest\\x1a\\x1e.pactus.GetNetworkInfoResponse\\x12@\\n\\tListPeers\\x12\\x18.pactus.ListPeersRequest\\x1a\\x19.pactus.ListPeersResponse\\x12\\x46\\n\\x0bGetNodeInfo\\x12\\x1a.pactus.GetNodeInfoRequest\\x1a\\x1b.pactus.GetNodeInfoResponse\\x12\\x31\\n\\x04Ping\\x12\\x13.pactus.PingRequest\\x1a\\x14.pactus.PingResponseB:\\n\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3')\n\n_globals = globals()\n_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)\n_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'network_pb2', _globals)\nif not _descriptor._USE_C_DESCRIPTORS:\n  _globals['DESCRIPTOR']._loaded_options = None\n  _globals['DESCRIPTOR']._serialized_options = b'\\n\\006pactusZ0github.com/pactus-project/pactus/www/grpc/pactus'\n  _globals['_METRICINFO_MESSAGESENTENTRY']._loaded_options = None\n  _globals['_METRICINFO_MESSAGESENTENTRY']._serialized_options = b'8\\001'\n  _globals['_METRICINFO_MESSAGERECEIVEDENTRY']._loaded_options = None\n  _globals['_METRICINFO_MESSAGERECEIVEDENTRY']._serialized_options = b'8\\001'\n  _globals['_DIRECTION']._serialized_start=2396\n  _globals['_DIRECTION']._serialized_end=2477\n  _globals['_GETNETWORKINFOREQUEST']._serialized_start=25\n  _globals['_GETNETWORKINFOREQUEST']._serialized_end=48\n  _globals['_GETNETWORKINFORESPONSE']._serialized_start=51\n  _globals['_GETNETWORKINFORESPONSE']._serialized_end=215\n  _globals['_LISTPEERSREQUEST']._serialized_start=217\n  _globals['_LISTPEERSREQUEST']._serialized_end=286\n  _globals['_LISTPEERSRESPONSE']._serialized_start=288\n  _globals['_LISTPEERSRESPONSE']._serialized_end=347\n  _globals['_GETNODEINFOREQUEST']._serialized_start=349\n  _globals['_GETNODEINFOREQUEST']._serialized_end=369\n  _globals['_GETNODEINFORESPONSE']._serialized_start=372\n  _globals['_GETNODEINFORESPONSE']._serialized_end=898\n  _globals['_ZMQPUBLISHERINFO']._serialized_start=900\n  _globals['_ZMQPUBLISHERINFO']._serialized_end=984\n  _globals['_PEERINFO']._serialized_start=987\n  _globals['_PEERINFO']._serialized_end=1632\n  _globals['_CONNECTIONINFO']._serialized_start=1635\n  _globals['_CONNECTIONINFO']._serialized_end=1785\n  _globals['_METRICINFO']._serialized_start=1788\n  _globals['_METRICINFO']._serialized_end=2300\n  _globals['_METRICINFO_MESSAGESENTENTRY']._serialized_start=2128\n  _globals['_METRICINFO_MESSAGESENTENTRY']._serialized_end=2211\n  _globals['_METRICINFO_MESSAGERECEIVEDENTRY']._serialized_start=2213\n  _globals['_METRICINFO_MESSAGERECEIVEDENTRY']._serialized_end=2300\n  _globals['_COUNTERINFO']._serialized_start=2302\n  _globals['_COUNTERINFO']._serialized_end=2363\n  _globals['_PINGREQUEST']._serialized_start=2365\n  _globals['_PINGREQUEST']._serialized_end=2378\n  _globals['_PINGRESPONSE']._serialized_start=2380\n  _globals['_PINGRESPONSE']._serialized_end=2394\n  _globals['_NETWORK']._serialized_start=2480\n  _globals['_NETWORK']._serialized_end=2759\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "www/grpc/gen/python/network_pb2.pyi",
    "content": "from google.protobuf.internal import containers as _containers\nfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom collections.abc import Iterable as _Iterable, Mapping as _Mapping\nfrom typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union\n\nDESCRIPTOR: _descriptor.FileDescriptor\n\nclass Direction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    DIRECTION_UNKNOWN: _ClassVar[Direction]\n    DIRECTION_INBOUND: _ClassVar[Direction]\n    DIRECTION_OUTBOUND: _ClassVar[Direction]\nDIRECTION_UNKNOWN: Direction\nDIRECTION_INBOUND: Direction\nDIRECTION_OUTBOUND: Direction\n\nclass GetNetworkInfoRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetNetworkInfoResponse(_message.Message):\n    __slots__ = ()\n    NETWORK_NAME_FIELD_NUMBER: _ClassVar[int]\n    CONNECTED_PEERS_COUNT_FIELD_NUMBER: _ClassVar[int]\n    METRIC_INFO_FIELD_NUMBER: _ClassVar[int]\n    network_name: str\n    connected_peers_count: int\n    metric_info: MetricInfo\n    def __init__(self, network_name: _Optional[str] = ..., connected_peers_count: _Optional[int] = ..., metric_info: _Optional[_Union[MetricInfo, _Mapping]] = ...) -> None: ...\n\nclass ListPeersRequest(_message.Message):\n    __slots__ = ()\n    INCLUDE_DISCONNECTED_FIELD_NUMBER: _ClassVar[int]\n    include_disconnected: bool\n    def __init__(self, include_disconnected: _Optional[bool] = ...) -> None: ...\n\nclass ListPeersResponse(_message.Message):\n    __slots__ = ()\n    PEERS_FIELD_NUMBER: _ClassVar[int]\n    peers: _containers.RepeatedCompositeFieldContainer[PeerInfo]\n    def __init__(self, peers: _Optional[_Iterable[_Union[PeerInfo, _Mapping]]] = ...) -> None: ...\n\nclass GetNodeInfoRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass GetNodeInfoResponse(_message.Message):\n    __slots__ = ()\n    MONIKER_FIELD_NUMBER: _ClassVar[int]\n    AGENT_FIELD_NUMBER: _ClassVar[int]\n    PEER_ID_FIELD_NUMBER: _ClassVar[int]\n    STARTED_AT_FIELD_NUMBER: _ClassVar[int]\n    REACHABILITY_FIELD_NUMBER: _ClassVar[int]\n    SERVICES_FIELD_NUMBER: _ClassVar[int]\n    SERVICES_NAMES_FIELD_NUMBER: _ClassVar[int]\n    LOCAL_ADDRS_FIELD_NUMBER: _ClassVar[int]\n    PROTOCOLS_FIELD_NUMBER: _ClassVar[int]\n    CLOCK_OFFSET_FIELD_NUMBER: _ClassVar[int]\n    CONNECTION_INFO_FIELD_NUMBER: _ClassVar[int]\n    ZMQ_PUBLISHERS_FIELD_NUMBER: _ClassVar[int]\n    CURRENT_TIME_FIELD_NUMBER: _ClassVar[int]\n    NETWORK_NAME_FIELD_NUMBER: _ClassVar[int]\n    moniker: str\n    agent: str\n    peer_id: str\n    started_at: int\n    reachability: str\n    services: int\n    services_names: str\n    local_addrs: _containers.RepeatedScalarFieldContainer[str]\n    protocols: _containers.RepeatedScalarFieldContainer[str]\n    clock_offset: float\n    connection_info: ConnectionInfo\n    zmq_publishers: _containers.RepeatedCompositeFieldContainer[ZMQPublisherInfo]\n    current_time: int\n    network_name: str\n    def __init__(self, moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., started_at: _Optional[int] = ..., reachability: _Optional[str] = ..., services: _Optional[int] = ..., services_names: _Optional[str] = ..., local_addrs: _Optional[_Iterable[str]] = ..., protocols: _Optional[_Iterable[str]] = ..., clock_offset: _Optional[float] = ..., connection_info: _Optional[_Union[ConnectionInfo, _Mapping]] = ..., zmq_publishers: _Optional[_Iterable[_Union[ZMQPublisherInfo, _Mapping]]] = ..., current_time: _Optional[int] = ..., network_name: _Optional[str] = ...) -> None: ...\n\nclass ZMQPublisherInfo(_message.Message):\n    __slots__ = ()\n    TOPIC_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    HWM_FIELD_NUMBER: _ClassVar[int]\n    topic: str\n    address: str\n    hwm: int\n    def __init__(self, topic: _Optional[str] = ..., address: _Optional[str] = ..., hwm: _Optional[int] = ...) -> None: ...\n\nclass PeerInfo(_message.Message):\n    __slots__ = ()\n    STATUS_FIELD_NUMBER: _ClassVar[int]\n    MONIKER_FIELD_NUMBER: _ClassVar[int]\n    AGENT_FIELD_NUMBER: _ClassVar[int]\n    PEER_ID_FIELD_NUMBER: _ClassVar[int]\n    CONSENSUS_KEYS_FIELD_NUMBER: _ClassVar[int]\n    CONSENSUS_ADDRESSES_FIELD_NUMBER: _ClassVar[int]\n    SERVICES_FIELD_NUMBER: _ClassVar[int]\n    LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int]\n    HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    LAST_SENT_FIELD_NUMBER: _ClassVar[int]\n    LAST_RECEIVED_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    DIRECTION_FIELD_NUMBER: _ClassVar[int]\n    PROTOCOLS_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_SESSIONS_FIELD_NUMBER: _ClassVar[int]\n    COMPLETED_SESSIONS_FIELD_NUMBER: _ClassVar[int]\n    METRIC_INFO_FIELD_NUMBER: _ClassVar[int]\n    OUTBOUND_HELLO_SENT_FIELD_NUMBER: _ClassVar[int]\n    status: int\n    moniker: str\n    agent: str\n    peer_id: str\n    consensus_keys: _containers.RepeatedScalarFieldContainer[str]\n    consensus_addresses: _containers.RepeatedScalarFieldContainer[str]\n    services: int\n    last_block_hash: str\n    height: int\n    last_sent: int\n    last_received: int\n    address: str\n    direction: Direction\n    protocols: _containers.RepeatedScalarFieldContainer[str]\n    total_sessions: int\n    completed_sessions: int\n    metric_info: MetricInfo\n    outbound_hello_sent: bool\n    def __init__(self, status: _Optional[int] = ..., moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., consensus_keys: _Optional[_Iterable[str]] = ..., consensus_addresses: _Optional[_Iterable[str]] = ..., services: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., height: _Optional[int] = ..., last_sent: _Optional[int] = ..., last_received: _Optional[int] = ..., address: _Optional[str] = ..., direction: _Optional[_Union[Direction, str]] = ..., protocols: _Optional[_Iterable[str]] = ..., total_sessions: _Optional[int] = ..., completed_sessions: _Optional[int] = ..., metric_info: _Optional[_Union[MetricInfo, _Mapping]] = ..., outbound_hello_sent: _Optional[bool] = ...) -> None: ...\n\nclass ConnectionInfo(_message.Message):\n    __slots__ = ()\n    CONNECTIONS_FIELD_NUMBER: _ClassVar[int]\n    INBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int]\n    OUTBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int]\n    connections: int\n    inbound_connections: int\n    outbound_connections: int\n    def __init__(self, connections: _Optional[int] = ..., inbound_connections: _Optional[int] = ..., outbound_connections: _Optional[int] = ...) -> None: ...\n\nclass MetricInfo(_message.Message):\n    __slots__ = ()\n    class MessageSentEntry(_message.Message):\n        __slots__ = ()\n        KEY_FIELD_NUMBER: _ClassVar[int]\n        VALUE_FIELD_NUMBER: _ClassVar[int]\n        key: int\n        value: CounterInfo\n        def __init__(self, key: _Optional[int] = ..., value: _Optional[_Union[CounterInfo, _Mapping]] = ...) -> None: ...\n    class MessageReceivedEntry(_message.Message):\n        __slots__ = ()\n        KEY_FIELD_NUMBER: _ClassVar[int]\n        VALUE_FIELD_NUMBER: _ClassVar[int]\n        key: int\n        value: CounterInfo\n        def __init__(self, key: _Optional[int] = ..., value: _Optional[_Union[CounterInfo, _Mapping]] = ...) -> None: ...\n    TOTAL_INVALID_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_SENT_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_RECEIVED_FIELD_NUMBER: _ClassVar[int]\n    MESSAGE_SENT_FIELD_NUMBER: _ClassVar[int]\n    MESSAGE_RECEIVED_FIELD_NUMBER: _ClassVar[int]\n    total_invalid: CounterInfo\n    total_sent: CounterInfo\n    total_received: CounterInfo\n    message_sent: _containers.MessageMap[int, CounterInfo]\n    message_received: _containers.MessageMap[int, CounterInfo]\n    def __init__(self, total_invalid: _Optional[_Union[CounterInfo, _Mapping]] = ..., total_sent: _Optional[_Union[CounterInfo, _Mapping]] = ..., total_received: _Optional[_Union[CounterInfo, _Mapping]] = ..., message_sent: _Optional[_Mapping[int, CounterInfo]] = ..., message_received: _Optional[_Mapping[int, CounterInfo]] = ...) -> None: ...\n\nclass CounterInfo(_message.Message):\n    __slots__ = ()\n    BYTES_FIELD_NUMBER: _ClassVar[int]\n    BUNDLES_FIELD_NUMBER: _ClassVar[int]\n    bytes: int\n    bundles: int\n    def __init__(self, bytes: _Optional[int] = ..., bundles: _Optional[int] = ...) -> None: ...\n\nclass PingRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass PingResponse(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n"
  },
  {
    "path": "www/grpc/gen/python/network_pb2_grpc.py",
    "content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nimport network_pb2 as network__pb2\n\n\nclass NetworkStub(object):\n    \"\"\"Network service provides RPCs for retrieving information about the network.\n    \"\"\"\n\n    def __init__(self, channel):\n        \"\"\"Constructor.\n\n        Args:\n            channel: A grpc.Channel.\n        \"\"\"\n        self.GetNetworkInfo = channel.unary_unary(\n                '/pactus.Network/GetNetworkInfo',\n                request_serializer=network__pb2.GetNetworkInfoRequest.SerializeToString,\n                response_deserializer=network__pb2.GetNetworkInfoResponse.FromString,\n                _registered_method=True)\n        self.ListPeers = channel.unary_unary(\n                '/pactus.Network/ListPeers',\n                request_serializer=network__pb2.ListPeersRequest.SerializeToString,\n                response_deserializer=network__pb2.ListPeersResponse.FromString,\n                _registered_method=True)\n        self.GetNodeInfo = channel.unary_unary(\n                '/pactus.Network/GetNodeInfo',\n                request_serializer=network__pb2.GetNodeInfoRequest.SerializeToString,\n                response_deserializer=network__pb2.GetNodeInfoResponse.FromString,\n                _registered_method=True)\n        self.Ping = channel.unary_unary(\n                '/pactus.Network/Ping',\n                request_serializer=network__pb2.PingRequest.SerializeToString,\n                response_deserializer=network__pb2.PingResponse.FromString,\n                _registered_method=True)\n\n\nclass NetworkServicer(object):\n    \"\"\"Network service provides RPCs for retrieving information about the network.\n    \"\"\"\n\n    def GetNetworkInfo(self, request, context):\n        \"\"\"GetNetworkInfo retrieves information about the overall network.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def ListPeers(self, request, context):\n        \"\"\"ListPeers lists all peers in the network.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetNodeInfo(self, request, context):\n        \"\"\"GetNodeInfo retrieves information about a specific node in the network.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def Ping(self, request, context):\n        \"\"\"Ping provides a simple connectivity test and latency measurement.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n\ndef add_NetworkServicer_to_server(servicer, server):\n    rpc_method_handlers = {\n            'GetNetworkInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetNetworkInfo,\n                    request_deserializer=network__pb2.GetNetworkInfoRequest.FromString,\n                    response_serializer=network__pb2.GetNetworkInfoResponse.SerializeToString,\n            ),\n            'ListPeers': grpc.unary_unary_rpc_method_handler(\n                    servicer.ListPeers,\n                    request_deserializer=network__pb2.ListPeersRequest.FromString,\n                    response_serializer=network__pb2.ListPeersResponse.SerializeToString,\n            ),\n            'GetNodeInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetNodeInfo,\n                    request_deserializer=network__pb2.GetNodeInfoRequest.FromString,\n                    response_serializer=network__pb2.GetNodeInfoResponse.SerializeToString,\n            ),\n            'Ping': grpc.unary_unary_rpc_method_handler(\n                    servicer.Ping,\n                    request_deserializer=network__pb2.PingRequest.FromString,\n                    response_serializer=network__pb2.PingResponse.SerializeToString,\n            ),\n    }\n    generic_handler = grpc.method_handlers_generic_handler(\n            'pactus.Network', rpc_method_handlers)\n    server.add_generic_rpc_handlers((generic_handler,))\n    server.add_registered_method_handlers('pactus.Network', rpc_method_handlers)\n\n\n # This class is part of an EXPERIMENTAL API.\nclass Network(object):\n    \"\"\"Network service provides RPCs for retrieving information about the network.\n    \"\"\"\n\n    @staticmethod\n    def GetNetworkInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Network/GetNetworkInfo',\n            network__pb2.GetNetworkInfoRequest.SerializeToString,\n            network__pb2.GetNetworkInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def ListPeers(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Network/ListPeers',\n            network__pb2.ListPeersRequest.SerializeToString,\n            network__pb2.ListPeersResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetNodeInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Network/GetNodeInfo',\n            network__pb2.GetNodeInfoRequest.SerializeToString,\n            network__pb2.GetNodeInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def Ping(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Network/Ping',\n            network__pb2.PingRequest.SerializeToString,\n            network__pb2.PingResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n"
  },
  {
    "path": "www/grpc/gen/python/transaction_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# NO CHECKED-IN PROTOBUF GENCODE\n# source: transaction.proto\n# Protobuf Python Version: 6.33.2\n\"\"\"Generated protocol buffer code.\"\"\"\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import descriptor_pool as _descriptor_pool\nfrom google.protobuf import runtime_version as _runtime_version\nfrom google.protobuf import symbol_database as _symbol_database\nfrom google.protobuf.internal import builder as _builder\n_runtime_version.ValidateProtobufRuntimeVersion(\n    _runtime_version.Domain.PUBLIC,\n    6,\n    33,\n    2,\n    '',\n    'transaction.proto'\n)\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\\n\\x11transaction.proto\\x12\\x06pactus\\\"c\\n\\x15GetTransactionRequest\\x12\\x0e\\n\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\x12:\\n\\tverbosity\\x18\\x02 \\x01(\\x0e\\x32\\x1c.pactus.TransactionVerbosityR\\tverbosity\\\"\\x95\\x01\\n\\x16GetTransactionResponse\\x12!\\n\\x0c\\x62lock_height\\x18\\x01 \\x01(\\rR\\x0b\\x62lockHeight\\x12\\x1d\\n\\nblock_time\\x18\\x02 \\x01(\\rR\\tblockTime\\x12\\x39\\n\\x0btransaction\\x18\\x03 \\x01(\\x0b\\x32\\x17.pactus.TransactionInfoR\\x0btransaction\\\"\\x88\\x01\\n\\x13\\x43\\x61lculateFeeRequest\\x12\\x16\\n\\x06\\x61mount\\x18\\x01 \\x01(\\x03R\\x06\\x61mount\\x12\\x36\\n\\x0cpayload_type\\x18\\x02 \\x01(\\x0e\\x32\\x13.pactus.PayloadTypeR\\x0bpayloadType\\x12!\\n\\x0c\\x66ixed_amount\\x18\\x03 \\x01(\\x08R\\x0b\\x66ixedAmount\\\"@\\n\\x14\\x43\\x61lculateFeeResponse\\x12\\x16\\n\\x06\\x61mount\\x18\\x01 \\x01(\\x03R\\x06\\x61mount\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x02 \\x01(\\x03R\\x03\\x66\\x65\\x65\\\"S\\n\\x1b\\x42roadcastTransactionRequest\\x12\\x34\\n\\x16signed_raw_transaction\\x18\\x01 \\x01(\\tR\\x14signedRawTransaction\\\".\\n\\x1c\\x42roadcastTransactionResponse\\x12\\x0e\\n\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\\"\\xb1\\x01\\n GetRawTransferTransactionRequest\\x12\\x1b\\n\\tlock_time\\x18\\x01 \\x01(\\rR\\x08lockTime\\x12\\x16\\n\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x12\\x1a\\n\\x08receiver\\x18\\x03 \\x01(\\tR\\x08receiver\\x12\\x16\\n\\x06\\x61mount\\x18\\x04 \\x01(\\x03R\\x06\\x61mount\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x05 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x12\\n\\x04memo\\x18\\x06 \\x01(\\tR\\x04memo\\\"\\xc1\\x02\\n\\x1cGetRawBondTransactionRequest\\x12\\x1b\\n\\tlock_time\\x18\\x01 \\x01(\\rR\\x08lockTime\\x12\\x16\\n\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x12\\x1a\\n\\x08receiver\\x18\\x03 \\x01(\\tR\\x08receiver\\x12\\x14\\n\\x05stake\\x18\\x04 \\x01(\\x03R\\x05stake\\x12\\x1d\\n\\npublic_key\\x18\\x05 \\x01(\\tR\\tpublicKey\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x06 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x12\\n\\x04memo\\x18\\x07 \\x01(\\tR\\x04memo\\x12%\\n\\x0e\\x64\\x65legate_owner\\x18\\x08 \\x01(\\tR\\rdelegateOwner\\x12%\\n\\x0e\\x64\\x65legate_share\\x18\\t \\x01(\\x03R\\rdelegateShare\\x12\\'\\n\\x0f\\x64\\x65legate_expiry\\x18\\n \\x01(\\rR\\x0e\\x64\\x65legateExpiry\\\"\\xa5\\x01\\n\\x1eGetRawUnbondTransactionRequest\\x12\\x1b\\n\\tlock_time\\x18\\x01 \\x01(\\rR\\x08lockTime\\x12+\\n\\x11validator_address\\x18\\x02 \\x01(\\tR\\x10validatorAddress\\x12\\x12\\n\\x04memo\\x18\\x03 \\x01(\\tR\\x04memo\\x12%\\n\\x0e\\x64\\x65legate_owner\\x18\\x04 \\x01(\\tR\\rdelegateOwner\\\"\\xd3\\x01\\n GetRawWithdrawTransactionRequest\\x12\\x1b\\n\\tlock_time\\x18\\x01 \\x01(\\rR\\x08lockTime\\x12+\\n\\x11validator_address\\x18\\x02 \\x01(\\tR\\x10validatorAddress\\x12\\'\\n\\x0f\\x61\\x63\\x63ount_address\\x18\\x03 \\x01(\\tR\\x0e\\x61\\x63\\x63ountAddress\\x12\\x16\\n\\x06\\x61mount\\x18\\x04 \\x01(\\x03R\\x06\\x61mount\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x05 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x12\\n\\x04memo\\x18\\x06 \\x01(\\tR\\x04memo\\\"\\xb5\\x01\\n%GetRawBatchTransferTransactionRequest\\x12\\x1b\\n\\tlock_time\\x18\\x01 \\x01(\\rR\\x08lockTime\\x12\\x16\\n\\x06sender\\x18\\x02 \\x01(\\tR\\x06sender\\x12\\x31\\n\\nrecipients\\x18\\x03 \\x03(\\x0b\\x32\\x11.pactus.RecipientR\\nrecipients\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x04 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x12\\n\\x04memo\\x18\\x05 \\x01(\\tR\\x04memo\\\"T\\n\\x19GetRawTransactionResponse\\x12\\'\\n\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\x12\\x0e\\n\\x02id\\x18\\x02 \\x01(\\tR\\x02id\\\"]\\n\\x0fPayloadTransfer\\x12\\x16\\n\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x12\\x1a\\n\\x08receiver\\x18\\x02 \\x01(\\tR\\x08receiver\\x12\\x16\\n\\x06\\x61mount\\x18\\x03 \\x01(\\x03R\\x06\\x61mount\\\"\\x90\\x02\\n\\x0bPayloadBond\\x12\\x16\\n\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x12\\x1a\\n\\x08receiver\\x18\\x02 \\x01(\\tR\\x08receiver\\x12\\x14\\n\\x05stake\\x18\\x03 \\x01(\\x03R\\x05stake\\x12\\x1d\\n\\npublic_key\\x18\\x04 \\x01(\\tR\\tpublicKey\\x12!\\n\\x0cis_delegated\\x18\\x05 \\x01(\\x08R\\x0bisDelegated\\x12%\\n\\x0e\\x64\\x65legate_owner\\x18\\x06 \\x01(\\tR\\rdelegateOwner\\x12%\\n\\x0e\\x64\\x65legate_share\\x18\\x07 \\x01(\\x03R\\rdelegateShare\\x12\\'\\n\\x0f\\x64\\x65legate_expiry\\x18\\x08 \\x01(\\rR\\x0e\\x64\\x65legateExpiry\\\"B\\n\\x10PayloadSortition\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x14\\n\\x05proof\\x18\\x02 \\x01(\\tR\\x05proof\\\"T\\n\\rPayloadUnbond\\x12\\x1c\\n\\tvalidator\\x18\\x01 \\x01(\\tR\\tvalidator\\x12%\\n\\x0e\\x64\\x65legate_owner\\x18\\x02 \\x01(\\tR\\rdelegateOwner\\\"\\x7f\\n\\x0fPayloadWithdraw\\x12+\\n\\x11validator_address\\x18\\x01 \\x01(\\tR\\x10validatorAddress\\x12\\'\\n\\x0f\\x61\\x63\\x63ount_address\\x18\\x02 \\x01(\\tR\\x0e\\x61\\x63\\x63ountAddress\\x12\\x16\\n\\x06\\x61mount\\x18\\x03 \\x01(\\x03R\\x06\\x61mount\\\"a\\n\\x14PayloadBatchTransfer\\x12\\x16\\n\\x06sender\\x18\\x01 \\x01(\\tR\\x06sender\\x12\\x31\\n\\nrecipients\\x18\\x02 \\x03(\\x0b\\x32\\x11.pactus.RecipientR\\nrecipients\\\"?\\n\\tRecipient\\x12\\x1a\\n\\x08receiver\\x18\\x01 \\x01(\\tR\\x08receiver\\x12\\x16\\n\\x06\\x61mount\\x18\\x02 \\x01(\\x03R\\x06\\x61mount\\\"\\xda\\x05\\n\\x0fTransactionInfo\\x12\\x0e\\n\\x02id\\x18\\x01 \\x01(\\tR\\x02id\\x12\\x12\\n\\x04\\x64\\x61ta\\x18\\x02 \\x01(\\tR\\x04\\x64\\x61ta\\x12\\x18\\n\\x07version\\x18\\x03 \\x01(\\x05R\\x07version\\x12\\x1b\\n\\tlock_time\\x18\\x04 \\x01(\\rR\\x08lockTime\\x12\\x14\\n\\x05value\\x18\\x05 \\x01(\\x03R\\x05value\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x06 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x36\\n\\x0cpayload_type\\x18\\x07 \\x01(\\x0e\\x32\\x13.pactus.PayloadTypeR\\x0bpayloadType\\x12\\x35\\n\\x08transfer\\x18\\x1e \\x01(\\x0b\\x32\\x17.pactus.PayloadTransferH\\x00R\\x08transfer\\x12)\\n\\x04\\x62ond\\x18\\x1f \\x01(\\x0b\\x32\\x13.pactus.PayloadBondH\\x00R\\x04\\x62ond\\x12\\x38\\n\\tsortition\\x18  \\x01(\\x0b\\x32\\x18.pactus.PayloadSortitionH\\x00R\\tsortition\\x12/\\n\\x06unbond\\x18! \\x01(\\x0b\\x32\\x15.pactus.PayloadUnbondH\\x00R\\x06unbond\\x12\\x35\\n\\x08withdraw\\x18\\\" \\x01(\\x0b\\x32\\x17.pactus.PayloadWithdrawH\\x00R\\x08withdraw\\x12\\x45\\n\\x0e\\x62\\x61tch_transfer\\x18# \\x01(\\x0b\\x32\\x1c.pactus.PayloadBatchTransferH\\x00R\\rbatchTransfer\\x12\\x12\\n\\x04memo\\x18\\x08 \\x01(\\tR\\x04memo\\x12\\x1d\\n\\npublic_key\\x18\\t \\x01(\\tR\\tpublicKey\\x12\\x1c\\n\\tsignature\\x18\\n \\x01(\\tR\\tsignature\\x12!\\n\\x0c\\x62lock_height\\x18\\x0b \\x01(\\rR\\x0b\\x62lockHeight\\x12\\x1c\\n\\tconfirmed\\x18\\x0c \\x01(\\x08R\\tconfirmed\\x12$\\n\\rconfirmations\\x18\\r \\x01(\\x05R\\rconfirmationsB\\t\\n\\x07payload\\\"F\\n\\x1b\\x44\\x65\\x63odeRawTransactionRequest\\x12\\'\\n\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\\"Y\\n\\x1c\\x44\\x65\\x63odeRawTransactionResponse\\x12\\x39\\n\\x0btransaction\\x18\\x01 \\x01(\\x0b\\x32\\x17.pactus.TransactionInfoR\\x0btransaction\\\"B\\n\\x17\\x43heckTransactionRequest\\x12\\'\\n\\x0fraw_transaction\\x18\\x01 \\x01(\\tR\\x0erawTransaction\\\"Z\\n\\x18\\x43heckTransactionResponse\\x12\\x19\\n\\x08is_valid\\x18\\x01 \\x01(\\x08R\\x07isValid\\x12#\\n\\rerror_message\\x18\\x02 \\x01(\\tR\\x0c\\x65rrorMessage*\\xce\\x01\\n\\x0bPayloadType\\x12\\x1c\\n\\x18PAYLOAD_TYPE_UNSPECIFIED\\x10\\x00\\x12\\x19\\n\\x15PAYLOAD_TYPE_TRANSFER\\x10\\x01\\x12\\x15\\n\\x11PAYLOAD_TYPE_BOND\\x10\\x02\\x12\\x1a\\n\\x16PAYLOAD_TYPE_SORTITION\\x10\\x03\\x12\\x17\\n\\x13PAYLOAD_TYPE_UNBOND\\x10\\x04\\x12\\x19\\n\\x15PAYLOAD_TYPE_WITHDRAW\\x10\\x05\\x12\\x1f\\n\\x1bPAYLOAD_TYPE_BATCH_TRANSFER\\x10\\x06*V\\n\\x14TransactionVerbosity\\x12\\x1e\\n\\x1aTRANSACTION_VERBOSITY_DATA\\x10\\x00\\x12\\x1e\\n\\x1aTRANSACTION_VERBOSITY_INFO\\x10\\x01\\x32\\xd6\\x07\\n\\x0bTransaction\\x12O\\n\\x0eGetTransaction\\x12\\x1d.pactus.GetTransactionRequest\\x1a\\x1e.pactus.GetTransactionResponse\\x12I\\n\\x0c\\x43\\x61lculateFee\\x12\\x1b.pactus.CalculateFeeRequest\\x1a\\x1c.pactus.CalculateFeeResponse\\x12\\x61\\n\\x14\\x42roadcastTransaction\\x12#.pactus.BroadcastTransactionRequest\\x1a$.pactus.BroadcastTransactionResponse\\x12h\\n\\x19GetRawTransferTransaction\\x12(.pactus.GetRawTransferTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12`\\n\\x15GetRawBondTransaction\\x12$.pactus.GetRawBondTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12\\x64\\n\\x17GetRawUnbondTransaction\\x12&.pactus.GetRawUnbondTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12h\\n\\x19GetRawWithdrawTransaction\\x12(.pactus.GetRawWithdrawTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12r\\n\\x1eGetRawBatchTransferTransaction\\x12-.pactus.GetRawBatchTransferTransactionRequest\\x1a!.pactus.GetRawTransactionResponse\\x12\\x61\\n\\x14\\x44\\x65\\x63odeRawTransaction\\x12#.pactus.DecodeRawTransactionRequest\\x1a$.pactus.DecodeRawTransactionResponse\\x12U\\n\\x10\\x43heckTransaction\\x12\\x1f.pactus.CheckTransactionRequest\\x1a .pactus.CheckTransactionResponseB:\\n\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3')\n\n_globals = globals()\n_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)\n_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', _globals)\nif not _descriptor._USE_C_DESCRIPTORS:\n  _globals['DESCRIPTOR']._loaded_options = None\n  _globals['DESCRIPTOR']._serialized_options = b'\\n\\006pactusZ0github.com/pactus-project/pactus/www/grpc/pactus'\n  _globals['_PAYLOADTYPE']._serialized_start=3650\n  _globals['_PAYLOADTYPE']._serialized_end=3856\n  _globals['_TRANSACTIONVERBOSITY']._serialized_start=3858\n  _globals['_TRANSACTIONVERBOSITY']._serialized_end=3944\n  _globals['_GETTRANSACTIONREQUEST']._serialized_start=29\n  _globals['_GETTRANSACTIONREQUEST']._serialized_end=128\n  _globals['_GETTRANSACTIONRESPONSE']._serialized_start=131\n  _globals['_GETTRANSACTIONRESPONSE']._serialized_end=280\n  _globals['_CALCULATEFEEREQUEST']._serialized_start=283\n  _globals['_CALCULATEFEEREQUEST']._serialized_end=419\n  _globals['_CALCULATEFEERESPONSE']._serialized_start=421\n  _globals['_CALCULATEFEERESPONSE']._serialized_end=485\n  _globals['_BROADCASTTRANSACTIONREQUEST']._serialized_start=487\n  _globals['_BROADCASTTRANSACTIONREQUEST']._serialized_end=570\n  _globals['_BROADCASTTRANSACTIONRESPONSE']._serialized_start=572\n  _globals['_BROADCASTTRANSACTIONRESPONSE']._serialized_end=618\n  _globals['_GETRAWTRANSFERTRANSACTIONREQUEST']._serialized_start=621\n  _globals['_GETRAWTRANSFERTRANSACTIONREQUEST']._serialized_end=798\n  _globals['_GETRAWBONDTRANSACTIONREQUEST']._serialized_start=801\n  _globals['_GETRAWBONDTRANSACTIONREQUEST']._serialized_end=1122\n  _globals['_GETRAWUNBONDTRANSACTIONREQUEST']._serialized_start=1125\n  _globals['_GETRAWUNBONDTRANSACTIONREQUEST']._serialized_end=1290\n  _globals['_GETRAWWITHDRAWTRANSACTIONREQUEST']._serialized_start=1293\n  _globals['_GETRAWWITHDRAWTRANSACTIONREQUEST']._serialized_end=1504\n  _globals['_GETRAWBATCHTRANSFERTRANSACTIONREQUEST']._serialized_start=1507\n  _globals['_GETRAWBATCHTRANSFERTRANSACTIONREQUEST']._serialized_end=1688\n  _globals['_GETRAWTRANSACTIONRESPONSE']._serialized_start=1690\n  _globals['_GETRAWTRANSACTIONRESPONSE']._serialized_end=1774\n  _globals['_PAYLOADTRANSFER']._serialized_start=1776\n  _globals['_PAYLOADTRANSFER']._serialized_end=1869\n  _globals['_PAYLOADBOND']._serialized_start=1872\n  _globals['_PAYLOADBOND']._serialized_end=2144\n  _globals['_PAYLOADSORTITION']._serialized_start=2146\n  _globals['_PAYLOADSORTITION']._serialized_end=2212\n  _globals['_PAYLOADUNBOND']._serialized_start=2214\n  _globals['_PAYLOADUNBOND']._serialized_end=2298\n  _globals['_PAYLOADWITHDRAW']._serialized_start=2300\n  _globals['_PAYLOADWITHDRAW']._serialized_end=2427\n  _globals['_PAYLOADBATCHTRANSFER']._serialized_start=2429\n  _globals['_PAYLOADBATCHTRANSFER']._serialized_end=2526\n  _globals['_RECIPIENT']._serialized_start=2528\n  _globals['_RECIPIENT']._serialized_end=2591\n  _globals['_TRANSACTIONINFO']._serialized_start=2594\n  _globals['_TRANSACTIONINFO']._serialized_end=3324\n  _globals['_DECODERAWTRANSACTIONREQUEST']._serialized_start=3326\n  _globals['_DECODERAWTRANSACTIONREQUEST']._serialized_end=3396\n  _globals['_DECODERAWTRANSACTIONRESPONSE']._serialized_start=3398\n  _globals['_DECODERAWTRANSACTIONRESPONSE']._serialized_end=3487\n  _globals['_CHECKTRANSACTIONREQUEST']._serialized_start=3489\n  _globals['_CHECKTRANSACTIONREQUEST']._serialized_end=3555\n  _globals['_CHECKTRANSACTIONRESPONSE']._serialized_start=3557\n  _globals['_CHECKTRANSACTIONRESPONSE']._serialized_end=3647\n  _globals['_TRANSACTION']._serialized_start=3947\n  _globals['_TRANSACTION']._serialized_end=4929\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "www/grpc/gen/python/transaction_pb2.pyi",
    "content": "from google.protobuf.internal import containers as _containers\nfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom collections.abc import Iterable as _Iterable, Mapping as _Mapping\nfrom typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union\n\nDESCRIPTOR: _descriptor.FileDescriptor\n\nclass PayloadType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    PAYLOAD_TYPE_UNSPECIFIED: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_TRANSFER: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_BOND: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_SORTITION: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_UNBOND: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_WITHDRAW: _ClassVar[PayloadType]\n    PAYLOAD_TYPE_BATCH_TRANSFER: _ClassVar[PayloadType]\n\nclass TransactionVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    TRANSACTION_VERBOSITY_DATA: _ClassVar[TransactionVerbosity]\n    TRANSACTION_VERBOSITY_INFO: _ClassVar[TransactionVerbosity]\nPAYLOAD_TYPE_UNSPECIFIED: PayloadType\nPAYLOAD_TYPE_TRANSFER: PayloadType\nPAYLOAD_TYPE_BOND: PayloadType\nPAYLOAD_TYPE_SORTITION: PayloadType\nPAYLOAD_TYPE_UNBOND: PayloadType\nPAYLOAD_TYPE_WITHDRAW: PayloadType\nPAYLOAD_TYPE_BATCH_TRANSFER: PayloadType\nTRANSACTION_VERBOSITY_DATA: TransactionVerbosity\nTRANSACTION_VERBOSITY_INFO: TransactionVerbosity\n\nclass GetTransactionRequest(_message.Message):\n    __slots__ = ()\n    ID_FIELD_NUMBER: _ClassVar[int]\n    VERBOSITY_FIELD_NUMBER: _ClassVar[int]\n    id: str\n    verbosity: TransactionVerbosity\n    def __init__(self, id: _Optional[str] = ..., verbosity: _Optional[_Union[TransactionVerbosity, str]] = ...) -> None: ...\n\nclass GetTransactionResponse(_message.Message):\n    __slots__ = ()\n    BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    block_height: int\n    block_time: int\n    transaction: TransactionInfo\n    def __init__(self, block_height: _Optional[int] = ..., block_time: _Optional[int] = ..., transaction: _Optional[_Union[TransactionInfo, _Mapping]] = ...) -> None: ...\n\nclass CalculateFeeRequest(_message.Message):\n    __slots__ = ()\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int]\n    FIXED_AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    amount: int\n    payload_type: PayloadType\n    fixed_amount: bool\n    def __init__(self, amount: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., fixed_amount: _Optional[bool] = ...) -> None: ...\n\nclass CalculateFeeResponse(_message.Message):\n    __slots__ = ()\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    amount: int\n    fee: int\n    def __init__(self, amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ...\n\nclass BroadcastTransactionRequest(_message.Message):\n    __slots__ = ()\n    SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    signed_raw_transaction: str\n    def __init__(self, signed_raw_transaction: _Optional[str] = ...) -> None: ...\n\nclass BroadcastTransactionResponse(_message.Message):\n    __slots__ = ()\n    ID_FIELD_NUMBER: _ClassVar[int]\n    id: str\n    def __init__(self, id: _Optional[str] = ...) -> None: ...\n\nclass GetRawTransferTransactionRequest(_message.Message):\n    __slots__ = ()\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    lock_time: int\n    sender: str\n    receiver: str\n    amount: int\n    fee: int\n    memo: str\n    def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ...\n\nclass GetRawBondTransactionRequest(_message.Message):\n    __slots__ = ()\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    STAKE_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_OWNER_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_SHARE_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_EXPIRY_FIELD_NUMBER: _ClassVar[int]\n    lock_time: int\n    sender: str\n    receiver: str\n    stake: int\n    public_key: str\n    fee: int\n    memo: str\n    delegate_owner: str\n    delegate_share: int\n    delegate_expiry: int\n    def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ..., delegate_owner: _Optional[str] = ..., delegate_share: _Optional[int] = ..., delegate_expiry: _Optional[int] = ...) -> None: ...\n\nclass GetRawUnbondTransactionRequest(_message.Message):\n    __slots__ = ()\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_OWNER_FIELD_NUMBER: _ClassVar[int]\n    lock_time: int\n    validator_address: str\n    memo: str\n    delegate_owner: str\n    def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., memo: _Optional[str] = ..., delegate_owner: _Optional[str] = ...) -> None: ...\n\nclass GetRawWithdrawTransactionRequest(_message.Message):\n    __slots__ = ()\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    lock_time: int\n    validator_address: str\n    account_address: str\n    amount: int\n    fee: int\n    memo: str\n    def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ...\n\nclass GetRawBatchTransferTransactionRequest(_message.Message):\n    __slots__ = ()\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECIPIENTS_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    lock_time: int\n    sender: str\n    recipients: _containers.RepeatedCompositeFieldContainer[Recipient]\n    fee: int\n    memo: str\n    def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., recipients: _Optional[_Iterable[_Union[Recipient, _Mapping]]] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ...\n\nclass GetRawTransactionResponse(_message.Message):\n    __slots__ = ()\n    RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    ID_FIELD_NUMBER: _ClassVar[int]\n    raw_transaction: str\n    id: str\n    def __init__(self, raw_transaction: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ...\n\nclass PayloadTransfer(_message.Message):\n    __slots__ = ()\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    sender: str\n    receiver: str\n    amount: int\n    def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ...\n\nclass PayloadBond(_message.Message):\n    __slots__ = ()\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    STAKE_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    IS_DELEGATED_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_OWNER_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_SHARE_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_EXPIRY_FIELD_NUMBER: _ClassVar[int]\n    sender: str\n    receiver: str\n    stake: int\n    public_key: str\n    is_delegated: bool\n    delegate_owner: str\n    delegate_share: int\n    delegate_expiry: int\n    def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., is_delegated: _Optional[bool] = ..., delegate_owner: _Optional[str] = ..., delegate_share: _Optional[int] = ..., delegate_expiry: _Optional[int] = ...) -> None: ...\n\nclass PayloadSortition(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    PROOF_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    proof: str\n    def __init__(self, address: _Optional[str] = ..., proof: _Optional[str] = ...) -> None: ...\n\nclass PayloadUnbond(_message.Message):\n    __slots__ = ()\n    VALIDATOR_FIELD_NUMBER: _ClassVar[int]\n    DELEGATE_OWNER_FIELD_NUMBER: _ClassVar[int]\n    validator: str\n    delegate_owner: str\n    def __init__(self, validator: _Optional[str] = ..., delegate_owner: _Optional[str] = ...) -> None: ...\n\nclass PayloadWithdraw(_message.Message):\n    __slots__ = ()\n    VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    validator_address: str\n    account_address: str\n    amount: int\n    def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ...\n\nclass PayloadBatchTransfer(_message.Message):\n    __slots__ = ()\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECIPIENTS_FIELD_NUMBER: _ClassVar[int]\n    sender: str\n    recipients: _containers.RepeatedCompositeFieldContainer[Recipient]\n    def __init__(self, sender: _Optional[str] = ..., recipients: _Optional[_Iterable[_Union[Recipient, _Mapping]]] = ...) -> None: ...\n\nclass Recipient(_message.Message):\n    __slots__ = ()\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    receiver: str\n    amount: int\n    def __init__(self, receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ...\n\nclass TransactionInfo(_message.Message):\n    __slots__ = ()\n    ID_FIELD_NUMBER: _ClassVar[int]\n    DATA_FIELD_NUMBER: _ClassVar[int]\n    VERSION_FIELD_NUMBER: _ClassVar[int]\n    LOCK_TIME_FIELD_NUMBER: _ClassVar[int]\n    VALUE_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int]\n    TRANSFER_FIELD_NUMBER: _ClassVar[int]\n    BOND_FIELD_NUMBER: _ClassVar[int]\n    SORTITION_FIELD_NUMBER: _ClassVar[int]\n    UNBOND_FIELD_NUMBER: _ClassVar[int]\n    WITHDRAW_FIELD_NUMBER: _ClassVar[int]\n    BATCH_TRANSFER_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    CONFIRMED_FIELD_NUMBER: _ClassVar[int]\n    CONFIRMATIONS_FIELD_NUMBER: _ClassVar[int]\n    id: str\n    data: str\n    version: int\n    lock_time: int\n    value: int\n    fee: int\n    payload_type: PayloadType\n    transfer: PayloadTransfer\n    bond: PayloadBond\n    sortition: PayloadSortition\n    unbond: PayloadUnbond\n    withdraw: PayloadWithdraw\n    batch_transfer: PayloadBatchTransfer\n    memo: str\n    public_key: str\n    signature: str\n    block_height: int\n    confirmed: bool\n    confirmations: int\n    def __init__(self, id: _Optional[str] = ..., data: _Optional[str] = ..., version: _Optional[int] = ..., lock_time: _Optional[int] = ..., value: _Optional[int] = ..., fee: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., sortition: _Optional[_Union[PayloadSortition, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ..., batch_transfer: _Optional[_Union[PayloadBatchTransfer, _Mapping]] = ..., memo: _Optional[str] = ..., public_key: _Optional[str] = ..., signature: _Optional[str] = ..., block_height: _Optional[int] = ..., confirmed: _Optional[bool] = ..., confirmations: _Optional[int] = ...) -> None: ...\n\nclass DecodeRawTransactionRequest(_message.Message):\n    __slots__ = ()\n    RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    raw_transaction: str\n    def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ...\n\nclass DecodeRawTransactionResponse(_message.Message):\n    __slots__ = ()\n    TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    transaction: TransactionInfo\n    def __init__(self, transaction: _Optional[_Union[TransactionInfo, _Mapping]] = ...) -> None: ...\n\nclass CheckTransactionRequest(_message.Message):\n    __slots__ = ()\n    RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    raw_transaction: str\n    def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ...\n\nclass CheckTransactionResponse(_message.Message):\n    __slots__ = ()\n    IS_VALID_FIELD_NUMBER: _ClassVar[int]\n    ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int]\n    is_valid: bool\n    error_message: str\n    def __init__(self, is_valid: _Optional[bool] = ..., error_message: _Optional[str] = ...) -> None: ...\n"
  },
  {
    "path": "www/grpc/gen/python/transaction_pb2_grpc.py",
    "content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nimport transaction_pb2 as transaction__pb2\n\n\nclass TransactionStub(object):\n    \"\"\"Transaction service defines various RPC methods for interacting with transactions.\n    \"\"\"\n\n    def __init__(self, channel):\n        \"\"\"Constructor.\n\n        Args:\n            channel: A grpc.Channel.\n        \"\"\"\n        self.GetTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetTransaction',\n                request_serializer=transaction__pb2.GetTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetTransactionResponse.FromString,\n                _registered_method=True)\n        self.CalculateFee = channel.unary_unary(\n                '/pactus.Transaction/CalculateFee',\n                request_serializer=transaction__pb2.CalculateFeeRequest.SerializeToString,\n                response_deserializer=transaction__pb2.CalculateFeeResponse.FromString,\n                _registered_method=True)\n        self.BroadcastTransaction = channel.unary_unary(\n                '/pactus.Transaction/BroadcastTransaction',\n                request_serializer=transaction__pb2.BroadcastTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.BroadcastTransactionResponse.FromString,\n                _registered_method=True)\n        self.GetRawTransferTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetRawTransferTransaction',\n                request_serializer=transaction__pb2.GetRawTransferTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.GetRawBondTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetRawBondTransaction',\n                request_serializer=transaction__pb2.GetRawBondTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.GetRawUnbondTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetRawUnbondTransaction',\n                request_serializer=transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.GetRawWithdrawTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetRawWithdrawTransaction',\n                request_serializer=transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.GetRawBatchTransferTransaction = channel.unary_unary(\n                '/pactus.Transaction/GetRawBatchTransferTransaction',\n                request_serializer=transaction__pb2.GetRawBatchTransferTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.DecodeRawTransaction = channel.unary_unary(\n                '/pactus.Transaction/DecodeRawTransaction',\n                request_serializer=transaction__pb2.DecodeRawTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.DecodeRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.CheckTransaction = channel.unary_unary(\n                '/pactus.Transaction/CheckTransaction',\n                request_serializer=transaction__pb2.CheckTransactionRequest.SerializeToString,\n                response_deserializer=transaction__pb2.CheckTransactionResponse.FromString,\n                _registered_method=True)\n\n\nclass TransactionServicer(object):\n    \"\"\"Transaction service defines various RPC methods for interacting with transactions.\n    \"\"\"\n\n    def GetTransaction(self, request, context):\n        \"\"\"GetTransaction retrieves transaction details based on the provided request parameters.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def CalculateFee(self, request, context):\n        \"\"\"CalculateFee calculates the transaction fee based on the specified amount and payload type.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def BroadcastTransaction(self, request, context):\n        \"\"\"BroadcastTransaction broadcasts a signed transaction to the network.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetRawTransferTransaction(self, request, context):\n        \"\"\"GetRawTransferTransaction retrieves raw details of a transfer transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetRawBondTransaction(self, request, context):\n        \"\"\"GetRawBondTransaction retrieves raw details of a bond transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetRawUnbondTransaction(self, request, context):\n        \"\"\"GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetRawWithdrawTransaction(self, request, context):\n        \"\"\"GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetRawBatchTransferTransaction(self, request, context):\n        \"\"\"GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def DecodeRawTransaction(self, request, context):\n        \"\"\"DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def CheckTransaction(self, request, context):\n        \"\"\"CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n\ndef add_TransactionServicer_to_server(servicer, server):\n    rpc_method_handlers = {\n            'GetTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetTransaction,\n                    request_deserializer=transaction__pb2.GetTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetTransactionResponse.SerializeToString,\n            ),\n            'CalculateFee': grpc.unary_unary_rpc_method_handler(\n                    servicer.CalculateFee,\n                    request_deserializer=transaction__pb2.CalculateFeeRequest.FromString,\n                    response_serializer=transaction__pb2.CalculateFeeResponse.SerializeToString,\n            ),\n            'BroadcastTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.BroadcastTransaction,\n                    request_deserializer=transaction__pb2.BroadcastTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.BroadcastTransactionResponse.SerializeToString,\n            ),\n            'GetRawTransferTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetRawTransferTransaction,\n                    request_deserializer=transaction__pb2.GetRawTransferTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString,\n            ),\n            'GetRawBondTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetRawBondTransaction,\n                    request_deserializer=transaction__pb2.GetRawBondTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString,\n            ),\n            'GetRawUnbondTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetRawUnbondTransaction,\n                    request_deserializer=transaction__pb2.GetRawUnbondTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString,\n            ),\n            'GetRawWithdrawTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetRawWithdrawTransaction,\n                    request_deserializer=transaction__pb2.GetRawWithdrawTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString,\n            ),\n            'GetRawBatchTransferTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetRawBatchTransferTransaction,\n                    request_deserializer=transaction__pb2.GetRawBatchTransferTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString,\n            ),\n            'DecodeRawTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.DecodeRawTransaction,\n                    request_deserializer=transaction__pb2.DecodeRawTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.DecodeRawTransactionResponse.SerializeToString,\n            ),\n            'CheckTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.CheckTransaction,\n                    request_deserializer=transaction__pb2.CheckTransactionRequest.FromString,\n                    response_serializer=transaction__pb2.CheckTransactionResponse.SerializeToString,\n            ),\n    }\n    generic_handler = grpc.method_handlers_generic_handler(\n            'pactus.Transaction', rpc_method_handlers)\n    server.add_generic_rpc_handlers((generic_handler,))\n    server.add_registered_method_handlers('pactus.Transaction', rpc_method_handlers)\n\n\n # This class is part of an EXPERIMENTAL API.\nclass Transaction(object):\n    \"\"\"Transaction service defines various RPC methods for interacting with transactions.\n    \"\"\"\n\n    @staticmethod\n    def GetTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetTransaction',\n            transaction__pb2.GetTransactionRequest.SerializeToString,\n            transaction__pb2.GetTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def CalculateFee(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/CalculateFee',\n            transaction__pb2.CalculateFeeRequest.SerializeToString,\n            transaction__pb2.CalculateFeeResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def BroadcastTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/BroadcastTransaction',\n            transaction__pb2.BroadcastTransactionRequest.SerializeToString,\n            transaction__pb2.BroadcastTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetRawTransferTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetRawTransferTransaction',\n            transaction__pb2.GetRawTransferTransactionRequest.SerializeToString,\n            transaction__pb2.GetRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetRawBondTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetRawBondTransaction',\n            transaction__pb2.GetRawBondTransactionRequest.SerializeToString,\n            transaction__pb2.GetRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetRawUnbondTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetRawUnbondTransaction',\n            transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString,\n            transaction__pb2.GetRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetRawWithdrawTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetRawWithdrawTransaction',\n            transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString,\n            transaction__pb2.GetRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetRawBatchTransferTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/GetRawBatchTransferTransaction',\n            transaction__pb2.GetRawBatchTransferTransactionRequest.SerializeToString,\n            transaction__pb2.GetRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def DecodeRawTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/DecodeRawTransaction',\n            transaction__pb2.DecodeRawTransactionRequest.SerializeToString,\n            transaction__pb2.DecodeRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def CheckTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Transaction/CheckTransaction',\n            transaction__pb2.CheckTransactionRequest.SerializeToString,\n            transaction__pb2.CheckTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n"
  },
  {
    "path": "www/grpc/gen/python/utils_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# NO CHECKED-IN PROTOBUF GENCODE\n# source: utils.proto\n# Protobuf Python Version: 6.33.2\n\"\"\"Generated protocol buffer code.\"\"\"\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import descriptor_pool as _descriptor_pool\nfrom google.protobuf import runtime_version as _runtime_version\nfrom google.protobuf import symbol_database as _symbol_database\nfrom google.protobuf.internal import builder as _builder\n_runtime_version.ValidateProtobufRuntimeVersion(\n    _runtime_version.Domain.PUBLIC,\n    6,\n    33,\n    2,\n    '',\n    'utils.proto'\n)\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\\n\\x0butils.proto\\x12\\x06pactus\\\"]\\n SignMessageWithPrivateKeyRequest\\x12\\x1f\\n\\x0bprivate_key\\x18\\x01 \\x01(\\tR\\nprivateKey\\x12\\x18\\n\\x07message\\x18\\x02 \\x01(\\tR\\x07message\\\"A\\n!SignMessageWithPrivateKeyResponse\\x12\\x1c\\n\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature\\\"m\\n\\x14VerifyMessageRequest\\x12\\x18\\n\\x07message\\x18\\x01 \\x01(\\tR\\x07message\\x12\\x1c\\n\\tsignature\\x18\\x02 \\x01(\\tR\\tsignature\\x12\\x1d\\n\\npublic_key\\x18\\x03 \\x01(\\tR\\tpublicKey\\\"2\\n\\x15VerifyMessageResponse\\x12\\x19\\n\\x08is_valid\\x18\\x01 \\x01(\\x08R\\x07isValid\\\">\\n\\x1bPublicKeyAggregationRequest\\x12\\x1f\\n\\x0bpublic_keys\\x18\\x01 \\x03(\\tR\\npublicKeys\\\"W\\n\\x1cPublicKeyAggregationResponse\\x12\\x1d\\n\\npublic_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x02 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"=\\n\\x1bSignatureAggregationRequest\\x12\\x1e\\n\\nsignatures\\x18\\x01 \\x03(\\tR\\nsignatures\\\"<\\n\\x1cSignatureAggregationResponse\\x12\\x1c\\n\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature2\\x8d\\x03\\n\\x05Utils\\x12p\\n\\x19SignMessageWithPrivateKey\\x12(.pactus.SignMessageWithPrivateKeyRequest\\x1a).pactus.SignMessageWithPrivateKeyResponse\\x12L\\n\\rVerifyMessage\\x12\\x1c.pactus.VerifyMessageRequest\\x1a\\x1d.pactus.VerifyMessageResponse\\x12\\x61\\n\\x14PublicKeyAggregation\\x12#.pactus.PublicKeyAggregationRequest\\x1a$.pactus.PublicKeyAggregationResponse\\x12\\x61\\n\\x14SignatureAggregation\\x12#.pactus.SignatureAggregationRequest\\x1a$.pactus.SignatureAggregationResponseB:\\n\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3')\n\n_globals = globals()\n_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)\n_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'utils_pb2', _globals)\nif not _descriptor._USE_C_DESCRIPTORS:\n  _globals['DESCRIPTOR']._loaded_options = None\n  _globals['DESCRIPTOR']._serialized_options = b'\\n\\006pactusZ0github.com/pactus-project/pactus/www/grpc/pactus'\n  _globals['_SIGNMESSAGEWITHPRIVATEKEYREQUEST']._serialized_start=23\n  _globals['_SIGNMESSAGEWITHPRIVATEKEYREQUEST']._serialized_end=116\n  _globals['_SIGNMESSAGEWITHPRIVATEKEYRESPONSE']._serialized_start=118\n  _globals['_SIGNMESSAGEWITHPRIVATEKEYRESPONSE']._serialized_end=183\n  _globals['_VERIFYMESSAGEREQUEST']._serialized_start=185\n  _globals['_VERIFYMESSAGEREQUEST']._serialized_end=294\n  _globals['_VERIFYMESSAGERESPONSE']._serialized_start=296\n  _globals['_VERIFYMESSAGERESPONSE']._serialized_end=346\n  _globals['_PUBLICKEYAGGREGATIONREQUEST']._serialized_start=348\n  _globals['_PUBLICKEYAGGREGATIONREQUEST']._serialized_end=410\n  _globals['_PUBLICKEYAGGREGATIONRESPONSE']._serialized_start=412\n  _globals['_PUBLICKEYAGGREGATIONRESPONSE']._serialized_end=499\n  _globals['_SIGNATUREAGGREGATIONREQUEST']._serialized_start=501\n  _globals['_SIGNATUREAGGREGATIONREQUEST']._serialized_end=562\n  _globals['_SIGNATUREAGGREGATIONRESPONSE']._serialized_start=564\n  _globals['_SIGNATUREAGGREGATIONRESPONSE']._serialized_end=624\n  _globals['_UTILS']._serialized_start=627\n  _globals['_UTILS']._serialized_end=1024\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "www/grpc/gen/python/utils_pb2.pyi",
    "content": "from google.protobuf.internal import containers as _containers\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom collections.abc import Iterable as _Iterable\nfrom typing import ClassVar as _ClassVar, Optional as _Optional\n\nDESCRIPTOR: _descriptor.FileDescriptor\n\nclass SignMessageWithPrivateKeyRequest(_message.Message):\n    __slots__ = ()\n    PRIVATE_KEY_FIELD_NUMBER: _ClassVar[int]\n    MESSAGE_FIELD_NUMBER: _ClassVar[int]\n    private_key: str\n    message: str\n    def __init__(self, private_key: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ...\n\nclass SignMessageWithPrivateKeyResponse(_message.Message):\n    __slots__ = ()\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    signature: str\n    def __init__(self, signature: _Optional[str] = ...) -> None: ...\n\nclass VerifyMessageRequest(_message.Message):\n    __slots__ = ()\n    MESSAGE_FIELD_NUMBER: _ClassVar[int]\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    message: str\n    signature: str\n    public_key: str\n    def __init__(self, message: _Optional[str] = ..., signature: _Optional[str] = ..., public_key: _Optional[str] = ...) -> None: ...\n\nclass VerifyMessageResponse(_message.Message):\n    __slots__ = ()\n    IS_VALID_FIELD_NUMBER: _ClassVar[int]\n    is_valid: bool\n    def __init__(self, is_valid: _Optional[bool] = ...) -> None: ...\n\nclass PublicKeyAggregationRequest(_message.Message):\n    __slots__ = ()\n    PUBLIC_KEYS_FIELD_NUMBER: _ClassVar[int]\n    public_keys: _containers.RepeatedScalarFieldContainer[str]\n    def __init__(self, public_keys: _Optional[_Iterable[str]] = ...) -> None: ...\n\nclass PublicKeyAggregationResponse(_message.Message):\n    __slots__ = ()\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    public_key: str\n    address: str\n    def __init__(self, public_key: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ...\n\nclass SignatureAggregationRequest(_message.Message):\n    __slots__ = ()\n    SIGNATURES_FIELD_NUMBER: _ClassVar[int]\n    signatures: _containers.RepeatedScalarFieldContainer[str]\n    def __init__(self, signatures: _Optional[_Iterable[str]] = ...) -> None: ...\n\nclass SignatureAggregationResponse(_message.Message):\n    __slots__ = ()\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    signature: str\n    def __init__(self, signature: _Optional[str] = ...) -> None: ...\n"
  },
  {
    "path": "www/grpc/gen/python/utils_pb2_grpc.py",
    "content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nimport utils_pb2 as utils__pb2\n\n\nclass UtilsStub(object):\n    \"\"\"Utils service defines RPC methods for utility functions such as message\n    signing, verification, and other cryptographic operations.\n    \"\"\"\n\n    def __init__(self, channel):\n        \"\"\"Constructor.\n\n        Args:\n            channel: A grpc.Channel.\n        \"\"\"\n        self.SignMessageWithPrivateKey = channel.unary_unary(\n                '/pactus.Utils/SignMessageWithPrivateKey',\n                request_serializer=utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString,\n                response_deserializer=utils__pb2.SignMessageWithPrivateKeyResponse.FromString,\n                _registered_method=True)\n        self.VerifyMessage = channel.unary_unary(\n                '/pactus.Utils/VerifyMessage',\n                request_serializer=utils__pb2.VerifyMessageRequest.SerializeToString,\n                response_deserializer=utils__pb2.VerifyMessageResponse.FromString,\n                _registered_method=True)\n        self.PublicKeyAggregation = channel.unary_unary(\n                '/pactus.Utils/PublicKeyAggregation',\n                request_serializer=utils__pb2.PublicKeyAggregationRequest.SerializeToString,\n                response_deserializer=utils__pb2.PublicKeyAggregationResponse.FromString,\n                _registered_method=True)\n        self.SignatureAggregation = channel.unary_unary(\n                '/pactus.Utils/SignatureAggregation',\n                request_serializer=utils__pb2.SignatureAggregationRequest.SerializeToString,\n                response_deserializer=utils__pb2.SignatureAggregationResponse.FromString,\n                _registered_method=True)\n\n\nclass UtilsServicer(object):\n    \"\"\"Utils service defines RPC methods for utility functions such as message\n    signing, verification, and other cryptographic operations.\n    \"\"\"\n\n    def SignMessageWithPrivateKey(self, request, context):\n        \"\"\"SignMessageWithPrivateKey signs a message with the provided private key.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def VerifyMessage(self, request, context):\n        \"\"\"VerifyMessage verifies a signature against the public key and message.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def PublicKeyAggregation(self, request, context):\n        \"\"\"PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def SignatureAggregation(self, request, context):\n        \"\"\"SignatureAggregation aggregates multiple BLS signatures into a single signature.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n\ndef add_UtilsServicer_to_server(servicer, server):\n    rpc_method_handlers = {\n            'SignMessageWithPrivateKey': grpc.unary_unary_rpc_method_handler(\n                    servicer.SignMessageWithPrivateKey,\n                    request_deserializer=utils__pb2.SignMessageWithPrivateKeyRequest.FromString,\n                    response_serializer=utils__pb2.SignMessageWithPrivateKeyResponse.SerializeToString,\n            ),\n            'VerifyMessage': grpc.unary_unary_rpc_method_handler(\n                    servicer.VerifyMessage,\n                    request_deserializer=utils__pb2.VerifyMessageRequest.FromString,\n                    response_serializer=utils__pb2.VerifyMessageResponse.SerializeToString,\n            ),\n            'PublicKeyAggregation': grpc.unary_unary_rpc_method_handler(\n                    servicer.PublicKeyAggregation,\n                    request_deserializer=utils__pb2.PublicKeyAggregationRequest.FromString,\n                    response_serializer=utils__pb2.PublicKeyAggregationResponse.SerializeToString,\n            ),\n            'SignatureAggregation': grpc.unary_unary_rpc_method_handler(\n                    servicer.SignatureAggregation,\n                    request_deserializer=utils__pb2.SignatureAggregationRequest.FromString,\n                    response_serializer=utils__pb2.SignatureAggregationResponse.SerializeToString,\n            ),\n    }\n    generic_handler = grpc.method_handlers_generic_handler(\n            'pactus.Utils', rpc_method_handlers)\n    server.add_generic_rpc_handlers((generic_handler,))\n    server.add_registered_method_handlers('pactus.Utils', rpc_method_handlers)\n\n\n # This class is part of an EXPERIMENTAL API.\nclass Utils(object):\n    \"\"\"Utils service defines RPC methods for utility functions such as message\n    signing, verification, and other cryptographic operations.\n    \"\"\"\n\n    @staticmethod\n    def SignMessageWithPrivateKey(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Utils/SignMessageWithPrivateKey',\n            utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString,\n            utils__pb2.SignMessageWithPrivateKeyResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def VerifyMessage(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Utils/VerifyMessage',\n            utils__pb2.VerifyMessageRequest.SerializeToString,\n            utils__pb2.VerifyMessageResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def PublicKeyAggregation(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Utils/PublicKeyAggregation',\n            utils__pb2.PublicKeyAggregationRequest.SerializeToString,\n            utils__pb2.PublicKeyAggregationResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def SignatureAggregation(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Utils/SignatureAggregation',\n            utils__pb2.SignatureAggregationRequest.SerializeToString,\n            utils__pb2.SignatureAggregationResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n"
  },
  {
    "path": "www/grpc/gen/python/wallet_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# NO CHECKED-IN PROTOBUF GENCODE\n# source: wallet.proto\n# Protobuf Python Version: 6.33.2\n\"\"\"Generated protocol buffer code.\"\"\"\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import descriptor_pool as _descriptor_pool\nfrom google.protobuf import runtime_version as _runtime_version\nfrom google.protobuf import symbol_database as _symbol_database\nfrom google.protobuf.internal import builder as _builder\n_runtime_version.ValidateProtobufRuntimeVersion(\n    _runtime_version.Domain.PUBLIC,\n    6,\n    33,\n    2,\n    '',\n    'wallet.proto'\n)\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\nimport transaction_pb2 as transaction__pb2\n\n\nDESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\\n\\x0cwallet.proto\\x12\\x06pactus\\x1a\\x11transaction.proto\\\"p\\n\\x0b\\x41\\x64\\x64ressInfo\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x1d\\n\\npublic_key\\x18\\x02 \\x01(\\tR\\tpublicKey\\x12\\x14\\n\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\x12\\x12\\n\\x04path\\x18\\x04 \\x01(\\tR\\x04path\\\"\\xa1\\x01\\n\\x14GetNewAddressRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x36\\n\\x0c\\x61\\x64\\x64ress_type\\x18\\x02 \\x01(\\x0e\\x32\\x13.pactus.AddressTypeR\\x0b\\x61\\x64\\x64ressType\\x12\\x14\\n\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\x12\\x1a\\n\\x08password\\x18\\x04 \\x01(\\tR\\x08password\\\"a\\n\\x15GetNewAddressResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\'\\n\\x04\\x61\\x64\\x64r\\x18\\x02 \\x01(\\x0b\\x32\\x13.pactus.AddressInfoR\\x04\\x61\\x64\\x64r\\\"o\\n\\x14RestoreWalletRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08mnemonic\\x18\\x02 \\x01(\\tR\\x08mnemonic\\x12\\x1a\\n\\x08password\\x18\\x03 \\x01(\\tR\\x08password\\\"8\\n\\x15RestoreWalletResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"R\\n\\x13\\x43reateWalletRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08password\\x18\\x02 \\x01(\\tR\\x08password\\\"S\\n\\x14\\x43reateWalletResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08mnemonic\\x18\\x02 \\x01(\\tR\\x08mnemonic\\\"4\\n\\x11LoadWalletRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"5\\n\\x12LoadWalletResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"6\\n\\x13UnloadWalletRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"7\\n\\x14UnloadWalletResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\";\\n\\x1aGetValidatorAddressRequest\\x12\\x1d\\n\\npublic_key\\x18\\x01 \\x01(\\tR\\tpublicKey\\\"7\\n\\x1bGetValidatorAddressResponse\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x01 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"\\x81\\x01\\n\\x19SignRawTransactionRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\'\\n\\x0fraw_transaction\\x18\\x02 \\x01(\\tR\\x0erawTransaction\\x12\\x1a\\n\\x08password\\x18\\x03 \\x01(\\tR\\x08password\\\"y\\n\\x1aSignRawTransactionResponse\\x12%\\n\\x0etransaction_id\\x18\\x01 \\x01(\\tR\\rtransactionId\\x12\\x34\\n\\x16signed_raw_transaction\\x18\\x02 \\x01(\\tR\\x14signedRawTransaction\\\"9\\n\\x16GetTotalBalanceRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"_\\n\\x17GetTotalBalanceResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12#\\n\\rtotal_balance\\x18\\x02 \\x01(\\x03R\\x0ctotalBalance\\\"\\x85\\x01\\n\\x12SignMessageRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08password\\x18\\x02 \\x01(\\tR\\x08password\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x03 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x18\\n\\x07message\\x18\\x04 \\x01(\\tR\\x07message\\\"3\\n\\x13SignMessageResponse\\x12\\x1c\\n\\tsignature\\x18\\x01 \\x01(\\tR\\tsignature\\\"7\\n\\x14GetTotalStakeRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"Y\\n\\x15GetTotalStakeResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1f\\n\\x0btotal_stake\\x18\\x02 \\x01(\\x03R\\ntotalStake\\\"R\\n\\x15GetAddressInfoRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x02 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"b\\n\\x16GetAddressInfoResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\'\\n\\x04\\x61\\x64\\x64r\\x18\\x02 \\x01(\\x0b\\x32\\x13.pactus.AddressInfoR\\x04\\x61\\x64\\x64r\\\"\\x85\\x01\\n\\x16SetAddressLabelRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08password\\x18\\x02 \\x01(\\tR\\x08password\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x03 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x14\\n\\x05label\\x18\\x04 \\x01(\\tR\\x05label\\\"j\\n\\x17SetAddressLabelResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x02 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x14\\n\\x05label\\x18\\x03 \\x01(\\tR\\x05label\\\"\\x14\\n\\x12ListWalletsRequest\\\"/\\n\\x13ListWalletsResponse\\x12\\x18\\n\\x07wallets\\x18\\x01 \\x03(\\tR\\x07wallets\\\"7\\n\\x14GetWalletInfoRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"\\x8a\\x02\\n\\x15GetWalletInfoResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x18\\n\\x07version\\x18\\x02 \\x01(\\x05R\\x07version\\x12\\x18\\n\\x07network\\x18\\x03 \\x01(\\tR\\x07network\\x12\\x1c\\n\\tencrypted\\x18\\x04 \\x01(\\x08R\\tencrypted\\x12\\x12\\n\\x04uuid\\x18\\x05 \\x01(\\tR\\x04uuid\\x12\\x1d\\n\\ncreated_at\\x18\\x06 \\x01(\\x03R\\tcreatedAt\\x12\\x1f\\n\\x0b\\x64\\x65\\x66\\x61ult_fee\\x18\\x07 \\x01(\\x03R\\ndefaultFee\\x12\\x16\\n\\x06\\x64river\\x18\\x08 \\x01(\\tR\\x06\\x64river\\x12\\x12\\n\\x04path\\x18\\t \\x01(\\tR\\x04path\\\"q\\n\\x14ListAddressesRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x38\\n\\raddress_types\\x18\\x02 \\x03(\\x0e\\x32\\x13.pactus.AddressTypeR\\x0c\\x61\\x64\\x64ressTypes\\\"c\\n\\x15ListAddressesResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12)\\n\\x05\\x61\\x64\\x64rs\\x18\\x02 \\x03(\\x0b\\x32\\x13.pactus.AddressInfoR\\x05\\x61\\x64\\x64rs\\\"~\\n\\x15UpdatePasswordRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12!\\n\\x0cold_password\\x18\\x02 \\x01(\\tR\\x0boldPassword\\x12!\\n\\x0cnew_password\\x18\\x03 \\x01(\\tR\\x0bnewPassword\\\"9\\n\\x16UpdatePasswordResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"\\xdb\\x03\\n\\x15WalletTransactionInfo\\x12\\x0e\\n\\x02no\\x18\\x01 \\x01(\\x03R\\x02no\\x12\\x13\\n\\x05tx_id\\x18\\x02 \\x01(\\tR\\x04txId\\x12\\x16\\n\\x06sender\\x18\\x03 \\x01(\\tR\\x06sender\\x12\\x1a\\n\\x08receiver\\x18\\x04 \\x01(\\tR\\x08receiver\\x12\\x31\\n\\tdirection\\x18\\x05 \\x01(\\x0e\\x32\\x13.pactus.TxDirectionR\\tdirection\\x12\\x16\\n\\x06\\x61mount\\x18\\x06 \\x01(\\x03R\\x06\\x61mount\\x12\\x10\\n\\x03\\x66\\x65\\x65\\x18\\x07 \\x01(\\x03R\\x03\\x66\\x65\\x65\\x12\\x12\\n\\x04memo\\x18\\x08 \\x01(\\tR\\x04memo\\x12\\x31\\n\\x06status\\x18\\t \\x01(\\x0e\\x32\\x19.pactus.TransactionStatusR\\x06status\\x12!\\n\\x0c\\x62lock_height\\x18\\n \\x01(\\rR\\x0b\\x62lockHeight\\x12\\x36\\n\\x0cpayload_type\\x18\\x0b \\x01(\\x0e\\x32\\x13.pactus.PayloadTypeR\\x0bpayloadType\\x12\\x12\\n\\x04\\x64\\x61ta\\x18\\x0c \\x01(\\x0cR\\x04\\x64\\x61ta\\x12\\x18\\n\\x07\\x63omment\\x18\\r \\x01(\\tR\\x07\\x63omment\\x12\\x1d\\n\\ncreated_at\\x18\\x0e \\x01(\\x03R\\tcreatedAt\\x12\\x1d\\n\\nupdated_at\\x18\\x0f \\x01(\\x03R\\tupdatedAt\\\"\\xb1\\x01\\n\\x17ListTransactionsRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x02 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\x12\\x31\\n\\tdirection\\x18\\x03 \\x01(\\x0e\\x32\\x13.pactus.TxDirectionR\\tdirection\\x12\\x14\\n\\x05\\x63ount\\x18\\x04 \\x01(\\x05R\\x05\\x63ount\\x12\\x12\\n\\x04skip\\x18\\x05 \\x01(\\x05R\\x04skip\\\"l\\n\\x18ListTransactionsResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12/\\n\\x03txs\\x18\\x02 \\x03(\\x0b\\x32\\x1d.pactus.WalletTransactionInfoR\\x03txs\\\"O\\n\\x14SetDefaultFeeRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x16\\n\\x06\\x61mount\\x18\\x02 \\x01(\\x03R\\x06\\x61mount\\\"8\\n\\x15SetDefaultFeeResponse\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\\"Q\\n\\x12GetMnemonicRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08password\\x18\\x02 \\x01(\\tR\\x08password\\\"1\\n\\x13GetMnemonicResponse\\x12\\x1a\\n\\x08mnemonic\\x18\\x01 \\x01(\\tR\\x08mnemonic\\\"m\\n\\x14GetPrivateKeyRequest\\x12\\x1f\\n\\x0bwallet_name\\x18\\x01 \\x01(\\tR\\nwalletName\\x12\\x1a\\n\\x08password\\x18\\x02 \\x01(\\tR\\x08password\\x12\\x18\\n\\x07\\x61\\x64\\x64ress\\x18\\x03 \\x01(\\tR\\x07\\x61\\x64\\x64ress\\\"8\\n\\x15GetPrivateKeyResponse\\x12\\x1f\\n\\x0bprivate_key\\x18\\x01 \\x01(\\tR\\nprivateKey*\\x84\\x01\\n\\x0b\\x41\\x64\\x64ressType\\x12\\x19\\n\\x15\\x41\\x44\\x44RESS_TYPE_TREASURY\\x10\\x00\\x12\\x1a\\n\\x16\\x41\\x44\\x44RESS_TYPE_VALIDATOR\\x10\\x01\\x12\\x1c\\n\\x18\\x41\\x44\\x44RESS_TYPE_BLS_ACCOUNT\\x10\\x02\\x12 \\n\\x1c\\x41\\x44\\x44RESS_TYPE_ED25519_ACCOUNT\\x10\\x03*Y\\n\\x0bTxDirection\\x12\\x14\\n\\x10TX_DIRECTION_ANY\\x10\\x00\\x12\\x19\\n\\x15TX_DIRECTION_INCOMING\\x10\\x01\\x12\\x19\\n\\x15TX_DIRECTION_OUTGOING\\x10\\x02*}\\n\\x11TransactionStatus\\x12\\x1e\\n\\x1aTRANSACTION_STATUS_PENDING\\x10\\x00\\x12 \\n\\x1cTRANSACTION_STATUS_CONFIRMED\\x10\\x01\\x12&\\n\\x19TRANSACTION_STATUS_FAILED\\x10\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x01\\x32\\xbb\\x0c\\n\\x06Wallet\\x12I\\n\\x0c\\x43reateWallet\\x12\\x1b.pactus.CreateWalletRequest\\x1a\\x1c.pactus.CreateWalletResponse\\x12L\\n\\rRestoreWallet\\x12\\x1c.pactus.RestoreWalletRequest\\x1a\\x1d.pactus.RestoreWalletResponse\\x12\\x43\\n\\nLoadWallet\\x12\\x19.pactus.LoadWalletRequest\\x1a\\x1a.pactus.LoadWalletResponse\\x12I\\n\\x0cUnloadWallet\\x12\\x1b.pactus.UnloadWalletRequest\\x1a\\x1c.pactus.UnloadWalletResponse\\x12\\x46\\n\\x0bListWallets\\x12\\x1a.pactus.ListWalletsRequest\\x1a\\x1b.pactus.ListWalletsResponse\\x12L\\n\\rGetWalletInfo\\x12\\x1c.pactus.GetWalletInfoRequest\\x1a\\x1d.pactus.GetWalletInfoResponse\\x12O\\n\\x0eUpdatePassword\\x12\\x1d.pactus.UpdatePasswordRequest\\x1a\\x1e.pactus.UpdatePasswordResponse\\x12R\\n\\x0fGetTotalBalance\\x12\\x1e.pactus.GetTotalBalanceRequest\\x1a\\x1f.pactus.GetTotalBalanceResponse\\x12L\\n\\rGetTotalStake\\x12\\x1c.pactus.GetTotalStakeRequest\\x1a\\x1d.pactus.GetTotalStakeResponse\\x12^\\n\\x13GetValidatorAddress\\x12\\\".pactus.GetValidatorAddressRequest\\x1a#.pactus.GetValidatorAddressResponse\\x12O\\n\\x0eGetAddressInfo\\x12\\x1d.pactus.GetAddressInfoRequest\\x1a\\x1e.pactus.GetAddressInfoResponse\\x12R\\n\\x0fSetAddressLabel\\x12\\x1e.pactus.SetAddressLabelRequest\\x1a\\x1f.pactus.SetAddressLabelResponse\\x12L\\n\\rGetNewAddress\\x12\\x1c.pactus.GetNewAddressRequest\\x1a\\x1d.pactus.GetNewAddressResponse\\x12L\\n\\rListAddresses\\x12\\x1c.pactus.ListAddressesRequest\\x1a\\x1d.pactus.ListAddressesResponse\\x12\\x46\\n\\x0bSignMessage\\x12\\x1a.pactus.SignMessageRequest\\x1a\\x1b.pactus.SignMessageResponse\\x12[\\n\\x12SignRawTransaction\\x12!.pactus.SignRawTransactionRequest\\x1a\\\".pactus.SignRawTransactionResponse\\x12U\\n\\x10ListTransactions\\x12\\x1f.pactus.ListTransactionsRequest\\x1a .pactus.ListTransactionsResponse\\x12L\\n\\rSetDefaultFee\\x12\\x1c.pactus.SetDefaultFeeRequest\\x1a\\x1d.pactus.SetDefaultFeeResponse\\x12\\x46\\n\\x0bGetMnemonic\\x12\\x1a.pactus.GetMnemonicRequest\\x1a\\x1b.pactus.GetMnemonicResponse\\x12L\\n\\rGetPrivateKey\\x12\\x1c.pactus.GetPrivateKeyRequest\\x1a\\x1d.pactus.GetPrivateKeyResponseB:\\n\\x06pactusZ0github.com/pactus-project/pactus/www/grpc/pactusb\\x06proto3')\n\n_globals = globals()\n_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)\n_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wallet_pb2', _globals)\nif not _descriptor._USE_C_DESCRIPTORS:\n  _globals['DESCRIPTOR']._loaded_options = None\n  _globals['DESCRIPTOR']._serialized_options = b'\\n\\006pactusZ0github.com/pactus-project/pactus/www/grpc/pactus'\n  _globals['_ADDRESSTYPE']._serialized_start=4287\n  _globals['_ADDRESSTYPE']._serialized_end=4419\n  _globals['_TXDIRECTION']._serialized_start=4421\n  _globals['_TXDIRECTION']._serialized_end=4510\n  _globals['_TRANSACTIONSTATUS']._serialized_start=4512\n  _globals['_TRANSACTIONSTATUS']._serialized_end=4637\n  _globals['_ADDRESSINFO']._serialized_start=43\n  _globals['_ADDRESSINFO']._serialized_end=155\n  _globals['_GETNEWADDRESSREQUEST']._serialized_start=158\n  _globals['_GETNEWADDRESSREQUEST']._serialized_end=319\n  _globals['_GETNEWADDRESSRESPONSE']._serialized_start=321\n  _globals['_GETNEWADDRESSRESPONSE']._serialized_end=418\n  _globals['_RESTOREWALLETREQUEST']._serialized_start=420\n  _globals['_RESTOREWALLETREQUEST']._serialized_end=531\n  _globals['_RESTOREWALLETRESPONSE']._serialized_start=533\n  _globals['_RESTOREWALLETRESPONSE']._serialized_end=589\n  _globals['_CREATEWALLETREQUEST']._serialized_start=591\n  _globals['_CREATEWALLETREQUEST']._serialized_end=673\n  _globals['_CREATEWALLETRESPONSE']._serialized_start=675\n  _globals['_CREATEWALLETRESPONSE']._serialized_end=758\n  _globals['_LOADWALLETREQUEST']._serialized_start=760\n  _globals['_LOADWALLETREQUEST']._serialized_end=812\n  _globals['_LOADWALLETRESPONSE']._serialized_start=814\n  _globals['_LOADWALLETRESPONSE']._serialized_end=867\n  _globals['_UNLOADWALLETREQUEST']._serialized_start=869\n  _globals['_UNLOADWALLETREQUEST']._serialized_end=923\n  _globals['_UNLOADWALLETRESPONSE']._serialized_start=925\n  _globals['_UNLOADWALLETRESPONSE']._serialized_end=980\n  _globals['_GETVALIDATORADDRESSREQUEST']._serialized_start=982\n  _globals['_GETVALIDATORADDRESSREQUEST']._serialized_end=1041\n  _globals['_GETVALIDATORADDRESSRESPONSE']._serialized_start=1043\n  _globals['_GETVALIDATORADDRESSRESPONSE']._serialized_end=1098\n  _globals['_SIGNRAWTRANSACTIONREQUEST']._serialized_start=1101\n  _globals['_SIGNRAWTRANSACTIONREQUEST']._serialized_end=1230\n  _globals['_SIGNRAWTRANSACTIONRESPONSE']._serialized_start=1232\n  _globals['_SIGNRAWTRANSACTIONRESPONSE']._serialized_end=1353\n  _globals['_GETTOTALBALANCEREQUEST']._serialized_start=1355\n  _globals['_GETTOTALBALANCEREQUEST']._serialized_end=1412\n  _globals['_GETTOTALBALANCERESPONSE']._serialized_start=1414\n  _globals['_GETTOTALBALANCERESPONSE']._serialized_end=1509\n  _globals['_SIGNMESSAGEREQUEST']._serialized_start=1512\n  _globals['_SIGNMESSAGEREQUEST']._serialized_end=1645\n  _globals['_SIGNMESSAGERESPONSE']._serialized_start=1647\n  _globals['_SIGNMESSAGERESPONSE']._serialized_end=1698\n  _globals['_GETTOTALSTAKEREQUEST']._serialized_start=1700\n  _globals['_GETTOTALSTAKEREQUEST']._serialized_end=1755\n  _globals['_GETTOTALSTAKERESPONSE']._serialized_start=1757\n  _globals['_GETTOTALSTAKERESPONSE']._serialized_end=1846\n  _globals['_GETADDRESSINFOREQUEST']._serialized_start=1848\n  _globals['_GETADDRESSINFOREQUEST']._serialized_end=1930\n  _globals['_GETADDRESSINFORESPONSE']._serialized_start=1932\n  _globals['_GETADDRESSINFORESPONSE']._serialized_end=2030\n  _globals['_SETADDRESSLABELREQUEST']._serialized_start=2033\n  _globals['_SETADDRESSLABELREQUEST']._serialized_end=2166\n  _globals['_SETADDRESSLABELRESPONSE']._serialized_start=2168\n  _globals['_SETADDRESSLABELRESPONSE']._serialized_end=2274\n  _globals['_LISTWALLETSREQUEST']._serialized_start=2276\n  _globals['_LISTWALLETSREQUEST']._serialized_end=2296\n  _globals['_LISTWALLETSRESPONSE']._serialized_start=2298\n  _globals['_LISTWALLETSRESPONSE']._serialized_end=2345\n  _globals['_GETWALLETINFOREQUEST']._serialized_start=2347\n  _globals['_GETWALLETINFOREQUEST']._serialized_end=2402\n  _globals['_GETWALLETINFORESPONSE']._serialized_start=2405\n  _globals['_GETWALLETINFORESPONSE']._serialized_end=2671\n  _globals['_LISTADDRESSESREQUEST']._serialized_start=2673\n  _globals['_LISTADDRESSESREQUEST']._serialized_end=2786\n  _globals['_LISTADDRESSESRESPONSE']._serialized_start=2788\n  _globals['_LISTADDRESSESRESPONSE']._serialized_end=2887\n  _globals['_UPDATEPASSWORDREQUEST']._serialized_start=2889\n  _globals['_UPDATEPASSWORDREQUEST']._serialized_end=3015\n  _globals['_UPDATEPASSWORDRESPONSE']._serialized_start=3017\n  _globals['_UPDATEPASSWORDRESPONSE']._serialized_end=3074\n  _globals['_WALLETTRANSACTIONINFO']._serialized_start=3077\n  _globals['_WALLETTRANSACTIONINFO']._serialized_end=3552\n  _globals['_LISTTRANSACTIONSREQUEST']._serialized_start=3555\n  _globals['_LISTTRANSACTIONSREQUEST']._serialized_end=3732\n  _globals['_LISTTRANSACTIONSRESPONSE']._serialized_start=3734\n  _globals['_LISTTRANSACTIONSRESPONSE']._serialized_end=3842\n  _globals['_SETDEFAULTFEEREQUEST']._serialized_start=3844\n  _globals['_SETDEFAULTFEEREQUEST']._serialized_end=3923\n  _globals['_SETDEFAULTFEERESPONSE']._serialized_start=3925\n  _globals['_SETDEFAULTFEERESPONSE']._serialized_end=3981\n  _globals['_GETMNEMONICREQUEST']._serialized_start=3983\n  _globals['_GETMNEMONICREQUEST']._serialized_end=4064\n  _globals['_GETMNEMONICRESPONSE']._serialized_start=4066\n  _globals['_GETMNEMONICRESPONSE']._serialized_end=4115\n  _globals['_GETPRIVATEKEYREQUEST']._serialized_start=4117\n  _globals['_GETPRIVATEKEYREQUEST']._serialized_end=4226\n  _globals['_GETPRIVATEKEYRESPONSE']._serialized_start=4228\n  _globals['_GETPRIVATEKEYRESPONSE']._serialized_end=4284\n  _globals['_WALLET']._serialized_start=4640\n  _globals['_WALLET']._serialized_end=6235\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "www/grpc/gen/python/wallet_pb2.pyi",
    "content": "import transaction_pb2 as _transaction_pb2\nfrom google.protobuf.internal import containers as _containers\nfrom google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom collections.abc import Iterable as _Iterable, Mapping as _Mapping\nfrom typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union\n\nDESCRIPTOR: _descriptor.FileDescriptor\n\nclass AddressType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    ADDRESS_TYPE_TREASURY: _ClassVar[AddressType]\n    ADDRESS_TYPE_VALIDATOR: _ClassVar[AddressType]\n    ADDRESS_TYPE_BLS_ACCOUNT: _ClassVar[AddressType]\n    ADDRESS_TYPE_ED25519_ACCOUNT: _ClassVar[AddressType]\n\nclass TxDirection(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    TX_DIRECTION_ANY: _ClassVar[TxDirection]\n    TX_DIRECTION_INCOMING: _ClassVar[TxDirection]\n    TX_DIRECTION_OUTGOING: _ClassVar[TxDirection]\n\nclass TransactionStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):\n    __slots__ = ()\n    TRANSACTION_STATUS_PENDING: _ClassVar[TransactionStatus]\n    TRANSACTION_STATUS_CONFIRMED: _ClassVar[TransactionStatus]\n    TRANSACTION_STATUS_FAILED: _ClassVar[TransactionStatus]\nADDRESS_TYPE_TREASURY: AddressType\nADDRESS_TYPE_VALIDATOR: AddressType\nADDRESS_TYPE_BLS_ACCOUNT: AddressType\nADDRESS_TYPE_ED25519_ACCOUNT: AddressType\nTX_DIRECTION_ANY: TxDirection\nTX_DIRECTION_INCOMING: TxDirection\nTX_DIRECTION_OUTGOING: TxDirection\nTRANSACTION_STATUS_PENDING: TransactionStatus\nTRANSACTION_STATUS_CONFIRMED: TransactionStatus\nTRANSACTION_STATUS_FAILED: TransactionStatus\n\nclass AddressInfo(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    LABEL_FIELD_NUMBER: _ClassVar[int]\n    PATH_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    public_key: str\n    label: str\n    path: str\n    def __init__(self, address: _Optional[str] = ..., public_key: _Optional[str] = ..., label: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ...\n\nclass GetNewAddressRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_TYPE_FIELD_NUMBER: _ClassVar[int]\n    LABEL_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    address_type: AddressType\n    label: str\n    password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., address_type: _Optional[_Union[AddressType, str]] = ..., label: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...\n\nclass GetNewAddressResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDR_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    addr: AddressInfo\n    def __init__(self, wallet_name: _Optional[str] = ..., addr: _Optional[_Union[AddressInfo, _Mapping]] = ...) -> None: ...\n\nclass RestoreWalletRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    MNEMONIC_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    mnemonic: str\n    password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., mnemonic: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...\n\nclass RestoreWalletResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass CreateWalletRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...\n\nclass CreateWalletResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    MNEMONIC_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    mnemonic: str\n    def __init__(self, wallet_name: _Optional[str] = ..., mnemonic: _Optional[str] = ...) -> None: ...\n\nclass LoadWalletRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass LoadWalletResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass UnloadWalletRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass UnloadWalletResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass GetValidatorAddressRequest(_message.Message):\n    __slots__ = ()\n    PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]\n    public_key: str\n    def __init__(self, public_key: _Optional[str] = ...) -> None: ...\n\nclass GetValidatorAddressResponse(_message.Message):\n    __slots__ = ()\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    address: str\n    def __init__(self, address: _Optional[str] = ...) -> None: ...\n\nclass SignRawTransactionRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    raw_transaction: str\n    password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., raw_transaction: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...\n\nclass SignRawTransactionResponse(_message.Message):\n    __slots__ = ()\n    TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int]\n    SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int]\n    transaction_id: str\n    signed_raw_transaction: str\n    def __init__(self, transaction_id: _Optional[str] = ..., signed_raw_transaction: _Optional[str] = ...) -> None: ...\n\nclass GetTotalBalanceRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass GetTotalBalanceResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_BALANCE_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    total_balance: int\n    def __init__(self, wallet_name: _Optional[str] = ..., total_balance: _Optional[int] = ...) -> None: ...\n\nclass SignMessageRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    MESSAGE_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    password: str\n    address: str\n    message: str\n    def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ..., address: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ...\n\nclass SignMessageResponse(_message.Message):\n    __slots__ = ()\n    SIGNATURE_FIELD_NUMBER: _ClassVar[int]\n    signature: str\n    def __init__(self, signature: _Optional[str] = ...) -> None: ...\n\nclass GetTotalStakeRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass GetTotalStakeResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    TOTAL_STAKE_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    total_stake: int\n    def __init__(self, wallet_name: _Optional[str] = ..., total_stake: _Optional[int] = ...) -> None: ...\n\nclass GetAddressInfoRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    address: str\n    def __init__(self, wallet_name: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ...\n\nclass GetAddressInfoResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDR_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    addr: AddressInfo\n    def __init__(self, wallet_name: _Optional[str] = ..., addr: _Optional[_Union[AddressInfo, _Mapping]] = ...) -> None: ...\n\nclass SetAddressLabelRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    LABEL_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    password: str\n    address: str\n    label: str\n    def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ..., address: _Optional[str] = ..., label: _Optional[str] = ...) -> None: ...\n\nclass SetAddressLabelResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    LABEL_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    address: str\n    label: str\n    def __init__(self, wallet_name: _Optional[str] = ..., address: _Optional[str] = ..., label: _Optional[str] = ...) -> None: ...\n\nclass ListWalletsRequest(_message.Message):\n    __slots__ = ()\n    def __init__(self) -> None: ...\n\nclass ListWalletsResponse(_message.Message):\n    __slots__ = ()\n    WALLETS_FIELD_NUMBER: _ClassVar[int]\n    wallets: _containers.RepeatedScalarFieldContainer[str]\n    def __init__(self, wallets: _Optional[_Iterable[str]] = ...) -> None: ...\n\nclass GetWalletInfoRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass GetWalletInfoResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    VERSION_FIELD_NUMBER: _ClassVar[int]\n    NETWORK_FIELD_NUMBER: _ClassVar[int]\n    ENCRYPTED_FIELD_NUMBER: _ClassVar[int]\n    UUID_FIELD_NUMBER: _ClassVar[int]\n    CREATED_AT_FIELD_NUMBER: _ClassVar[int]\n    DEFAULT_FEE_FIELD_NUMBER: _ClassVar[int]\n    DRIVER_FIELD_NUMBER: _ClassVar[int]\n    PATH_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    version: int\n    network: str\n    encrypted: bool\n    uuid: str\n    created_at: int\n    default_fee: int\n    driver: str\n    path: str\n    def __init__(self, wallet_name: _Optional[str] = ..., version: _Optional[int] = ..., network: _Optional[str] = ..., encrypted: _Optional[bool] = ..., uuid: _Optional[str] = ..., created_at: _Optional[int] = ..., default_fee: _Optional[int] = ..., driver: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ...\n\nclass ListAddressesRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_TYPES_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    address_types: _containers.RepeatedScalarFieldContainer[AddressType]\n    def __init__(self, wallet_name: _Optional[str] = ..., address_types: _Optional[_Iterable[_Union[AddressType, str]]] = ...) -> None: ...\n\nclass ListAddressesResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRS_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    addrs: _containers.RepeatedCompositeFieldContainer[AddressInfo]\n    def __init__(self, wallet_name: _Optional[str] = ..., addrs: _Optional[_Iterable[_Union[AddressInfo, _Mapping]]] = ...) -> None: ...\n\nclass UpdatePasswordRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    OLD_PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    NEW_PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    old_password: str\n    new_password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., old_password: _Optional[str] = ..., new_password: _Optional[str] = ...) -> None: ...\n\nclass UpdatePasswordResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass WalletTransactionInfo(_message.Message):\n    __slots__ = ()\n    NO_FIELD_NUMBER: _ClassVar[int]\n    TX_ID_FIELD_NUMBER: _ClassVar[int]\n    SENDER_FIELD_NUMBER: _ClassVar[int]\n    RECEIVER_FIELD_NUMBER: _ClassVar[int]\n    DIRECTION_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    FEE_FIELD_NUMBER: _ClassVar[int]\n    MEMO_FIELD_NUMBER: _ClassVar[int]\n    STATUS_FIELD_NUMBER: _ClassVar[int]\n    BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int]\n    PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int]\n    DATA_FIELD_NUMBER: _ClassVar[int]\n    COMMENT_FIELD_NUMBER: _ClassVar[int]\n    CREATED_AT_FIELD_NUMBER: _ClassVar[int]\n    UPDATED_AT_FIELD_NUMBER: _ClassVar[int]\n    no: int\n    tx_id: str\n    sender: str\n    receiver: str\n    direction: TxDirection\n    amount: int\n    fee: int\n    memo: str\n    status: TransactionStatus\n    block_height: int\n    payload_type: _transaction_pb2.PayloadType\n    data: bytes\n    comment: str\n    created_at: int\n    updated_at: int\n    def __init__(self, no: _Optional[int] = ..., tx_id: _Optional[str] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., direction: _Optional[_Union[TxDirection, str]] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ..., status: _Optional[_Union[TransactionStatus, str]] = ..., block_height: _Optional[int] = ..., payload_type: _Optional[_Union[_transaction_pb2.PayloadType, str]] = ..., data: _Optional[bytes] = ..., comment: _Optional[str] = ..., created_at: _Optional[int] = ..., updated_at: _Optional[int] = ...) -> None: ...\n\nclass ListTransactionsRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    DIRECTION_FIELD_NUMBER: _ClassVar[int]\n    COUNT_FIELD_NUMBER: _ClassVar[int]\n    SKIP_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    address: str\n    direction: TxDirection\n    count: int\n    skip: int\n    def __init__(self, wallet_name: _Optional[str] = ..., address: _Optional[str] = ..., direction: _Optional[_Union[TxDirection, str]] = ..., count: _Optional[int] = ..., skip: _Optional[int] = ...) -> None: ...\n\nclass ListTransactionsResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    TXS_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    txs: _containers.RepeatedCompositeFieldContainer[WalletTransactionInfo]\n    def __init__(self, wallet_name: _Optional[str] = ..., txs: _Optional[_Iterable[_Union[WalletTransactionInfo, _Mapping]]] = ...) -> None: ...\n\nclass SetDefaultFeeRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    AMOUNT_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    amount: int\n    def __init__(self, wallet_name: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ...\n\nclass SetDefaultFeeResponse(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    def __init__(self, wallet_name: _Optional[str] = ...) -> None: ...\n\nclass GetMnemonicRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    password: str\n    def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...\n\nclass GetMnemonicResponse(_message.Message):\n    __slots__ = ()\n    MNEMONIC_FIELD_NUMBER: _ClassVar[int]\n    mnemonic: str\n    def __init__(self, mnemonic: _Optional[str] = ...) -> None: ...\n\nclass GetPrivateKeyRequest(_message.Message):\n    __slots__ = ()\n    WALLET_NAME_FIELD_NUMBER: _ClassVar[int]\n    PASSWORD_FIELD_NUMBER: _ClassVar[int]\n    ADDRESS_FIELD_NUMBER: _ClassVar[int]\n    wallet_name: str\n    password: str\n    address: str\n    def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ...\n\nclass GetPrivateKeyResponse(_message.Message):\n    __slots__ = ()\n    PRIVATE_KEY_FIELD_NUMBER: _ClassVar[int]\n    private_key: str\n    def __init__(self, private_key: _Optional[str] = ...) -> None: ...\n"
  },
  {
    "path": "www/grpc/gen/python/wallet_pb2_grpc.py",
    "content": "# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\n\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\nimport grpc\n\nimport wallet_pb2 as wallet__pb2\n\n\nclass WalletStub(object):\n    \"\"\"Wallet service provides RPC methods for wallet management operations.\n    \"\"\"\n\n    def __init__(self, channel):\n        \"\"\"Constructor.\n\n        Args:\n            channel: A grpc.Channel.\n        \"\"\"\n        self.CreateWallet = channel.unary_unary(\n                '/pactus.Wallet/CreateWallet',\n                request_serializer=wallet__pb2.CreateWalletRequest.SerializeToString,\n                response_deserializer=wallet__pb2.CreateWalletResponse.FromString,\n                _registered_method=True)\n        self.RestoreWallet = channel.unary_unary(\n                '/pactus.Wallet/RestoreWallet',\n                request_serializer=wallet__pb2.RestoreWalletRequest.SerializeToString,\n                response_deserializer=wallet__pb2.RestoreWalletResponse.FromString,\n                _registered_method=True)\n        self.LoadWallet = channel.unary_unary(\n                '/pactus.Wallet/LoadWallet',\n                request_serializer=wallet__pb2.LoadWalletRequest.SerializeToString,\n                response_deserializer=wallet__pb2.LoadWalletResponse.FromString,\n                _registered_method=True)\n        self.UnloadWallet = channel.unary_unary(\n                '/pactus.Wallet/UnloadWallet',\n                request_serializer=wallet__pb2.UnloadWalletRequest.SerializeToString,\n                response_deserializer=wallet__pb2.UnloadWalletResponse.FromString,\n                _registered_method=True)\n        self.ListWallets = channel.unary_unary(\n                '/pactus.Wallet/ListWallets',\n                request_serializer=wallet__pb2.ListWalletsRequest.SerializeToString,\n                response_deserializer=wallet__pb2.ListWalletsResponse.FromString,\n                _registered_method=True)\n        self.GetWalletInfo = channel.unary_unary(\n                '/pactus.Wallet/GetWalletInfo',\n                request_serializer=wallet__pb2.GetWalletInfoRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetWalletInfoResponse.FromString,\n                _registered_method=True)\n        self.UpdatePassword = channel.unary_unary(\n                '/pactus.Wallet/UpdatePassword',\n                request_serializer=wallet__pb2.UpdatePasswordRequest.SerializeToString,\n                response_deserializer=wallet__pb2.UpdatePasswordResponse.FromString,\n                _registered_method=True)\n        self.GetTotalBalance = channel.unary_unary(\n                '/pactus.Wallet/GetTotalBalance',\n                request_serializer=wallet__pb2.GetTotalBalanceRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetTotalBalanceResponse.FromString,\n                _registered_method=True)\n        self.GetTotalStake = channel.unary_unary(\n                '/pactus.Wallet/GetTotalStake',\n                request_serializer=wallet__pb2.GetTotalStakeRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetTotalStakeResponse.FromString,\n                _registered_method=True)\n        self.GetValidatorAddress = channel.unary_unary(\n                '/pactus.Wallet/GetValidatorAddress',\n                request_serializer=wallet__pb2.GetValidatorAddressRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetValidatorAddressResponse.FromString,\n                _registered_method=True)\n        self.GetAddressInfo = channel.unary_unary(\n                '/pactus.Wallet/GetAddressInfo',\n                request_serializer=wallet__pb2.GetAddressInfoRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetAddressInfoResponse.FromString,\n                _registered_method=True)\n        self.SetAddressLabel = channel.unary_unary(\n                '/pactus.Wallet/SetAddressLabel',\n                request_serializer=wallet__pb2.SetAddressLabelRequest.SerializeToString,\n                response_deserializer=wallet__pb2.SetAddressLabelResponse.FromString,\n                _registered_method=True)\n        self.GetNewAddress = channel.unary_unary(\n                '/pactus.Wallet/GetNewAddress',\n                request_serializer=wallet__pb2.GetNewAddressRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetNewAddressResponse.FromString,\n                _registered_method=True)\n        self.ListAddresses = channel.unary_unary(\n                '/pactus.Wallet/ListAddresses',\n                request_serializer=wallet__pb2.ListAddressesRequest.SerializeToString,\n                response_deserializer=wallet__pb2.ListAddressesResponse.FromString,\n                _registered_method=True)\n        self.SignMessage = channel.unary_unary(\n                '/pactus.Wallet/SignMessage',\n                request_serializer=wallet__pb2.SignMessageRequest.SerializeToString,\n                response_deserializer=wallet__pb2.SignMessageResponse.FromString,\n                _registered_method=True)\n        self.SignRawTransaction = channel.unary_unary(\n                '/pactus.Wallet/SignRawTransaction',\n                request_serializer=wallet__pb2.SignRawTransactionRequest.SerializeToString,\n                response_deserializer=wallet__pb2.SignRawTransactionResponse.FromString,\n                _registered_method=True)\n        self.ListTransactions = channel.unary_unary(\n                '/pactus.Wallet/ListTransactions',\n                request_serializer=wallet__pb2.ListTransactionsRequest.SerializeToString,\n                response_deserializer=wallet__pb2.ListTransactionsResponse.FromString,\n                _registered_method=True)\n        self.SetDefaultFee = channel.unary_unary(\n                '/pactus.Wallet/SetDefaultFee',\n                request_serializer=wallet__pb2.SetDefaultFeeRequest.SerializeToString,\n                response_deserializer=wallet__pb2.SetDefaultFeeResponse.FromString,\n                _registered_method=True)\n        self.GetMnemonic = channel.unary_unary(\n                '/pactus.Wallet/GetMnemonic',\n                request_serializer=wallet__pb2.GetMnemonicRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetMnemonicResponse.FromString,\n                _registered_method=True)\n        self.GetPrivateKey = channel.unary_unary(\n                '/pactus.Wallet/GetPrivateKey',\n                request_serializer=wallet__pb2.GetPrivateKeyRequest.SerializeToString,\n                response_deserializer=wallet__pb2.GetPrivateKeyResponse.FromString,\n                _registered_method=True)\n\n\nclass WalletServicer(object):\n    \"\"\"Wallet service provides RPC methods for wallet management operations.\n    \"\"\"\n\n    def CreateWallet(self, request, context):\n        \"\"\"CreateWallet creates a new wallet with the specified parameters.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def RestoreWallet(self, request, context):\n        \"\"\"RestoreWallet restores an existing wallet with the given mnemonic.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def LoadWallet(self, request, context):\n        \"\"\"LoadWallet loads an existing wallet with the given name.\n        deprecated: It will be removed in a future version.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def UnloadWallet(self, request, context):\n        \"\"\"UnloadWallet unloads a currently loaded wallet with the specified name.\n        deprecated: It will be removed in a future version.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def ListWallets(self, request, context):\n        \"\"\"ListWallets returns a list of all available wallets.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetWalletInfo(self, request, context):\n        \"\"\"GetWalletInfo returns detailed information about a specific wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def UpdatePassword(self, request, context):\n        \"\"\"UpdatePassword updates the password of an existing wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetTotalBalance(self, request, context):\n        \"\"\"GetTotalBalance returns the total available balance of the wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetTotalStake(self, request, context):\n        \"\"\"GetTotalStake returns the total stake amount in the wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetValidatorAddress(self, request, context):\n        \"\"\"GetValidatorAddress retrieves the validator address associated with a public key.\n        Deprecated: Will move into utils.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetAddressInfo(self, request, context):\n        \"\"\"GetAddressInfo returns detailed information about a specific address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def SetAddressLabel(self, request, context):\n        \"\"\"SetAddressLabel sets or updates the label for a given address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetNewAddress(self, request, context):\n        \"\"\"GetNewAddress generates a new address for the specified wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def ListAddresses(self, request, context):\n        \"\"\"ListAddresses returns all addresses in the specified wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def SignMessage(self, request, context):\n        \"\"\"SignMessage signs an arbitrary message using a wallet's private key.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def SignRawTransaction(self, request, context):\n        \"\"\"SignRawTransaction signs a raw transaction for a specified wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def ListTransactions(self, request, context):\n        \"\"\"ListTransactions returns a list of transactions for a wallet,\n        optionally filtered by a specific address, with pagination support.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def SetDefaultFee(self, request, context):\n        \"\"\"SetDefaultFee sets the default fee for the wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetMnemonic(self, request, context):\n        \"\"\"GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n    def GetPrivateKey(self, request, context):\n        \"\"\"GetPrivateKey returns the private key for a given address.\n        \"\"\"\n        context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n        context.set_details('Method not implemented!')\n        raise NotImplementedError('Method not implemented!')\n\n\ndef add_WalletServicer_to_server(servicer, server):\n    rpc_method_handlers = {\n            'CreateWallet': grpc.unary_unary_rpc_method_handler(\n                    servicer.CreateWallet,\n                    request_deserializer=wallet__pb2.CreateWalletRequest.FromString,\n                    response_serializer=wallet__pb2.CreateWalletResponse.SerializeToString,\n            ),\n            'RestoreWallet': grpc.unary_unary_rpc_method_handler(\n                    servicer.RestoreWallet,\n                    request_deserializer=wallet__pb2.RestoreWalletRequest.FromString,\n                    response_serializer=wallet__pb2.RestoreWalletResponse.SerializeToString,\n            ),\n            'LoadWallet': grpc.unary_unary_rpc_method_handler(\n                    servicer.LoadWallet,\n                    request_deserializer=wallet__pb2.LoadWalletRequest.FromString,\n                    response_serializer=wallet__pb2.LoadWalletResponse.SerializeToString,\n            ),\n            'UnloadWallet': grpc.unary_unary_rpc_method_handler(\n                    servicer.UnloadWallet,\n                    request_deserializer=wallet__pb2.UnloadWalletRequest.FromString,\n                    response_serializer=wallet__pb2.UnloadWalletResponse.SerializeToString,\n            ),\n            'ListWallets': grpc.unary_unary_rpc_method_handler(\n                    servicer.ListWallets,\n                    request_deserializer=wallet__pb2.ListWalletsRequest.FromString,\n                    response_serializer=wallet__pb2.ListWalletsResponse.SerializeToString,\n            ),\n            'GetWalletInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetWalletInfo,\n                    request_deserializer=wallet__pb2.GetWalletInfoRequest.FromString,\n                    response_serializer=wallet__pb2.GetWalletInfoResponse.SerializeToString,\n            ),\n            'UpdatePassword': grpc.unary_unary_rpc_method_handler(\n                    servicer.UpdatePassword,\n                    request_deserializer=wallet__pb2.UpdatePasswordRequest.FromString,\n                    response_serializer=wallet__pb2.UpdatePasswordResponse.SerializeToString,\n            ),\n            'GetTotalBalance': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetTotalBalance,\n                    request_deserializer=wallet__pb2.GetTotalBalanceRequest.FromString,\n                    response_serializer=wallet__pb2.GetTotalBalanceResponse.SerializeToString,\n            ),\n            'GetTotalStake': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetTotalStake,\n                    request_deserializer=wallet__pb2.GetTotalStakeRequest.FromString,\n                    response_serializer=wallet__pb2.GetTotalStakeResponse.SerializeToString,\n            ),\n            'GetValidatorAddress': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetValidatorAddress,\n                    request_deserializer=wallet__pb2.GetValidatorAddressRequest.FromString,\n                    response_serializer=wallet__pb2.GetValidatorAddressResponse.SerializeToString,\n            ),\n            'GetAddressInfo': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetAddressInfo,\n                    request_deserializer=wallet__pb2.GetAddressInfoRequest.FromString,\n                    response_serializer=wallet__pb2.GetAddressInfoResponse.SerializeToString,\n            ),\n            'SetAddressLabel': grpc.unary_unary_rpc_method_handler(\n                    servicer.SetAddressLabel,\n                    request_deserializer=wallet__pb2.SetAddressLabelRequest.FromString,\n                    response_serializer=wallet__pb2.SetAddressLabelResponse.SerializeToString,\n            ),\n            'GetNewAddress': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetNewAddress,\n                    request_deserializer=wallet__pb2.GetNewAddressRequest.FromString,\n                    response_serializer=wallet__pb2.GetNewAddressResponse.SerializeToString,\n            ),\n            'ListAddresses': grpc.unary_unary_rpc_method_handler(\n                    servicer.ListAddresses,\n                    request_deserializer=wallet__pb2.ListAddressesRequest.FromString,\n                    response_serializer=wallet__pb2.ListAddressesResponse.SerializeToString,\n            ),\n            'SignMessage': grpc.unary_unary_rpc_method_handler(\n                    servicer.SignMessage,\n                    request_deserializer=wallet__pb2.SignMessageRequest.FromString,\n                    response_serializer=wallet__pb2.SignMessageResponse.SerializeToString,\n            ),\n            'SignRawTransaction': grpc.unary_unary_rpc_method_handler(\n                    servicer.SignRawTransaction,\n                    request_deserializer=wallet__pb2.SignRawTransactionRequest.FromString,\n                    response_serializer=wallet__pb2.SignRawTransactionResponse.SerializeToString,\n            ),\n            'ListTransactions': grpc.unary_unary_rpc_method_handler(\n                    servicer.ListTransactions,\n                    request_deserializer=wallet__pb2.ListTransactionsRequest.FromString,\n                    response_serializer=wallet__pb2.ListTransactionsResponse.SerializeToString,\n            ),\n            'SetDefaultFee': grpc.unary_unary_rpc_method_handler(\n                    servicer.SetDefaultFee,\n                    request_deserializer=wallet__pb2.SetDefaultFeeRequest.FromString,\n                    response_serializer=wallet__pb2.SetDefaultFeeResponse.SerializeToString,\n            ),\n            'GetMnemonic': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetMnemonic,\n                    request_deserializer=wallet__pb2.GetMnemonicRequest.FromString,\n                    response_serializer=wallet__pb2.GetMnemonicResponse.SerializeToString,\n            ),\n            'GetPrivateKey': grpc.unary_unary_rpc_method_handler(\n                    servicer.GetPrivateKey,\n                    request_deserializer=wallet__pb2.GetPrivateKeyRequest.FromString,\n                    response_serializer=wallet__pb2.GetPrivateKeyResponse.SerializeToString,\n            ),\n    }\n    generic_handler = grpc.method_handlers_generic_handler(\n            'pactus.Wallet', rpc_method_handlers)\n    server.add_generic_rpc_handlers((generic_handler,))\n    server.add_registered_method_handlers('pactus.Wallet', rpc_method_handlers)\n\n\n # This class is part of an EXPERIMENTAL API.\nclass Wallet(object):\n    \"\"\"Wallet service provides RPC methods for wallet management operations.\n    \"\"\"\n\n    @staticmethod\n    def CreateWallet(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/CreateWallet',\n            wallet__pb2.CreateWalletRequest.SerializeToString,\n            wallet__pb2.CreateWalletResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def RestoreWallet(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/RestoreWallet',\n            wallet__pb2.RestoreWalletRequest.SerializeToString,\n            wallet__pb2.RestoreWalletResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def LoadWallet(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/LoadWallet',\n            wallet__pb2.LoadWalletRequest.SerializeToString,\n            wallet__pb2.LoadWalletResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def UnloadWallet(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/UnloadWallet',\n            wallet__pb2.UnloadWalletRequest.SerializeToString,\n            wallet__pb2.UnloadWalletResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def ListWallets(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/ListWallets',\n            wallet__pb2.ListWalletsRequest.SerializeToString,\n            wallet__pb2.ListWalletsResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetWalletInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetWalletInfo',\n            wallet__pb2.GetWalletInfoRequest.SerializeToString,\n            wallet__pb2.GetWalletInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def UpdatePassword(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/UpdatePassword',\n            wallet__pb2.UpdatePasswordRequest.SerializeToString,\n            wallet__pb2.UpdatePasswordResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetTotalBalance(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetTotalBalance',\n            wallet__pb2.GetTotalBalanceRequest.SerializeToString,\n            wallet__pb2.GetTotalBalanceResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetTotalStake(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetTotalStake',\n            wallet__pb2.GetTotalStakeRequest.SerializeToString,\n            wallet__pb2.GetTotalStakeResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetValidatorAddress(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetValidatorAddress',\n            wallet__pb2.GetValidatorAddressRequest.SerializeToString,\n            wallet__pb2.GetValidatorAddressResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetAddressInfo(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetAddressInfo',\n            wallet__pb2.GetAddressInfoRequest.SerializeToString,\n            wallet__pb2.GetAddressInfoResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def SetAddressLabel(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/SetAddressLabel',\n            wallet__pb2.SetAddressLabelRequest.SerializeToString,\n            wallet__pb2.SetAddressLabelResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetNewAddress(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetNewAddress',\n            wallet__pb2.GetNewAddressRequest.SerializeToString,\n            wallet__pb2.GetNewAddressResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def ListAddresses(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/ListAddresses',\n            wallet__pb2.ListAddressesRequest.SerializeToString,\n            wallet__pb2.ListAddressesResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def SignMessage(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/SignMessage',\n            wallet__pb2.SignMessageRequest.SerializeToString,\n            wallet__pb2.SignMessageResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def SignRawTransaction(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/SignRawTransaction',\n            wallet__pb2.SignRawTransactionRequest.SerializeToString,\n            wallet__pb2.SignRawTransactionResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def ListTransactions(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/ListTransactions',\n            wallet__pb2.ListTransactionsRequest.SerializeToString,\n            wallet__pb2.ListTransactionsResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def SetDefaultFee(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/SetDefaultFee',\n            wallet__pb2.SetDefaultFeeRequest.SerializeToString,\n            wallet__pb2.SetDefaultFeeResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetMnemonic(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetMnemonic',\n            wallet__pb2.GetMnemonicRequest.SerializeToString,\n            wallet__pb2.GetMnemonicResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n\n    @staticmethod\n    def GetPrivateKey(request,\n            target,\n            options=(),\n            channel_credentials=None,\n            call_credentials=None,\n            insecure=False,\n            compression=None,\n            wait_for_ready=None,\n            timeout=None,\n            metadata=None):\n        return grpc.experimental.unary_unary(\n            request,\n            target,\n            '/pactus.Wallet/GetPrivateKey',\n            wallet__pb2.GetPrivateKeyRequest.SerializeToString,\n            wallet__pb2.GetPrivateKeyResponse.FromString,\n            options,\n            channel_credentials,\n            insecure,\n            call_credentials,\n            compression,\n            wait_for_ready,\n            timeout,\n            metadata,\n            _registered_method=True)\n"
  },
  {
    "path": "www/grpc/gen/rust/pactus.rs",
    "content": "// @generated\n// This file is @generated by prost-build.\n/// Request message for retrieving transaction details.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTransactionRequest {\n    /// The unique ID of the transaction to retrieve.\n    #[prost(string, tag=\"1\")]\n    pub id: ::prost::alloc::string::String,\n    /// The verbosity level for transaction details.\n    #[prost(enumeration=\"TransactionVerbosity\", tag=\"2\")]\n    pub verbosity: i32,\n}\n/// Response message contains details of a transaction.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetTransactionResponse {\n    /// The height of the block containing the transaction.\n    #[prost(uint32, tag=\"1\")]\n    pub block_height: u32,\n    /// The UNIX timestamp of the block containing the transaction.\n    #[prost(uint32, tag=\"2\")]\n    pub block_time: u32,\n    /// Detailed information about the transaction.\n    #[prost(message, optional, tag=\"3\")]\n    pub transaction: ::core::option::Option<TransactionInfo>,\n}\n/// Request message for calculating transaction fee.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CalculateFeeRequest {\n    /// The amount involved in the transaction, specified in NanoPAC.\n    #[prost(int64, tag=\"1\")]\n    pub amount: i64,\n    /// The type of transaction payload.\n    #[prost(enumeration=\"PayloadType\", tag=\"2\")]\n    pub payload_type: i32,\n    /// Indicates if the amount should be fixed and include the fee.\n    #[prost(bool, tag=\"3\")]\n    pub fixed_amount: bool,\n}\n/// Response message contains the calculated transaction fee.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CalculateFeeResponse {\n    /// The calculated amount in NanoPAC.\n    #[prost(int64, tag=\"1\")]\n    pub amount: i64,\n    /// The calculated transaction fee in NanoPAC.\n    #[prost(int64, tag=\"2\")]\n    pub fee: i64,\n}\n/// Request message for broadcasting a signed transaction to the network.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct BroadcastTransactionRequest {\n    /// The signed raw transaction data to be broadcasted.\n    #[prost(string, tag=\"1\")]\n    pub signed_raw_transaction: ::prost::alloc::string::String,\n}\n/// Response message contains the ID of the broadcasted transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct BroadcastTransactionResponse {\n    /// The unique ID of the broadcasted transaction.\n    #[prost(string, tag=\"1\")]\n    pub id: ::prost::alloc::string::String,\n}\n/// Request message for retrieving raw details of a transfer transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetRawTransferTransactionRequest {\n    /// The lock time for the transaction. If not set, defaults to the last block height.\n    #[prost(uint32, tag=\"1\")]\n    pub lock_time: u32,\n    /// The sender's account address.\n    #[prost(string, tag=\"2\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The receiver's account address.\n    #[prost(string, tag=\"3\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n    #[prost(int64, tag=\"4\")]\n    pub amount: i64,\n    /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    #[prost(int64, tag=\"5\")]\n    pub fee: i64,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"6\")]\n    pub memo: ::prost::alloc::string::String,\n}\n/// Request message for retrieving raw details of a bond transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetRawBondTransactionRequest {\n    /// The lock time for the transaction. If not set, defaults to the last block height.\n    #[prost(uint32, tag=\"1\")]\n    pub lock_time: u32,\n    /// The sender's account address.\n    #[prost(string, tag=\"2\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The receiver's validator address.\n    #[prost(string, tag=\"3\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The stake amount in NanoPAC. Must be greater than 0.\n    #[prost(int64, tag=\"4\")]\n    pub stake: i64,\n    /// The public key of the validator.\n    /// Optional, but required when registering a new validator.;\n    #[prost(string, tag=\"5\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    #[prost(int64, tag=\"6\")]\n    pub fee: i64,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"7\")]\n    pub memo: ::prost::alloc::string::String,\n    /// The address of the delegate owner.\n    /// Optional, but required when registering a new validator with delegation.;\n    #[prost(string, tag=\"8\")]\n    pub delegate_owner: ::prost::alloc::string::String,\n    /// The share percentage for the delegate owner.\n    /// Optional, but required when registering a new validator with delegation.;\n    /// Must be between 0 and 0.7 PAC in nano PAC.\n    #[prost(int64, tag=\"9\")]\n    pub delegate_share: i64,\n    /// The expiry height for the delegate relationship.\n    /// Optional, but required when registering a new validator with delegation.;\n    #[prost(uint32, tag=\"10\")]\n    pub delegate_expiry: u32,\n}\n/// Request message for retrieving raw details of an unbond transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetRawUnbondTransactionRequest {\n    /// The lock time for the transaction. If not set, defaults to the last block height.\n    #[prost(uint32, tag=\"1\")]\n    pub lock_time: u32,\n    /// The address of the validator to unbond from.\n    #[prost(string, tag=\"2\")]\n    pub validator_address: ::prost::alloc::string::String,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"3\")]\n    pub memo: ::prost::alloc::string::String,\n    /// The address of the delegate owner.\n    /// Optional, but required when the validator is a delegated validator.;\n    #[prost(string, tag=\"4\")]\n    pub delegate_owner: ::prost::alloc::string::String,\n}\n/// Request message for retrieving raw details of a withdraw transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetRawWithdrawTransactionRequest {\n    /// The lock time for the transaction. If not set, defaults to the last block height.\n    #[prost(uint32, tag=\"1\")]\n    pub lock_time: u32,\n    /// The address of the validator to withdraw from.\n    #[prost(string, tag=\"2\")]\n    pub validator_address: ::prost::alloc::string::String,\n    /// The address of the account to withdraw to.\n    #[prost(string, tag=\"3\")]\n    pub account_address: ::prost::alloc::string::String,\n    /// The withdrawal amount in NanoPAC. Must be greater than 0.\n    #[prost(int64, tag=\"4\")]\n    pub amount: i64,\n    /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    #[prost(int64, tag=\"5\")]\n    pub fee: i64,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"6\")]\n    pub memo: ::prost::alloc::string::String,\n}\n/// Request message for retrieving raw details of a batch transfer transaction.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetRawBatchTransferTransactionRequest {\n    /// The lock time for the transaction. If not set, defaults to the last block height.\n    #[prost(uint32, tag=\"1\")]\n    pub lock_time: u32,\n    /// The sender's account address.\n    #[prost(string, tag=\"2\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The list of recipients with their amounts. Minimum 2 recipients required.\n    #[prost(message, repeated, tag=\"3\")]\n    pub recipients: ::prost::alloc::vec::Vec<Recipient>,\n    /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n    #[prost(int64, tag=\"4\")]\n    pub fee: i64,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"5\")]\n    pub memo: ::prost::alloc::string::String,\n}\n/// Response message contains raw transaction data.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetRawTransactionResponse {\n    /// The raw transaction data in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub raw_transaction: ::prost::alloc::string::String,\n    /// The unique ID of the transaction.\n    #[prost(string, tag=\"2\")]\n    pub id: ::prost::alloc::string::String,\n}\n/// Payload for a transfer transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PayloadTransfer {\n    /// The sender's address.\n    #[prost(string, tag=\"1\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The receiver's address.\n    #[prost(string, tag=\"2\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The amount to be transferred in NanoPAC.\n    #[prost(int64, tag=\"3\")]\n    pub amount: i64,\n}\n/// Payload for a bond transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PayloadBond {\n    /// The sender's address.\n    #[prost(string, tag=\"1\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The receiver's address.\n    #[prost(string, tag=\"2\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The stake amount in NanoPAC.\n    #[prost(int64, tag=\"3\")]\n    pub stake: i64,\n    /// The public key of the validator.\n    #[prost(string, tag=\"4\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// Indicates whether the bond transaction is a delegation.\n    #[prost(bool, tag=\"5\")]\n    pub is_delegated: bool,\n    /// The address of the delegate owner.\n    /// Optional, but required when registering a new validator with delegation.;\n    #[prost(string, tag=\"6\")]\n    pub delegate_owner: ::prost::alloc::string::String,\n    /// The share percentage for the delegate owner.\n    /// Optional, but required when registering a new validator with delegation.;\n    /// Must be between 0 and 0.7 PAC in nano PAC.\n    #[prost(int64, tag=\"7\")]\n    pub delegate_share: i64,\n    /// The expiry height for the delegate relationship.\n    /// Optional, but required when registering a new validator with delegation.;\n    #[prost(uint32, tag=\"8\")]\n    pub delegate_expiry: u32,\n}\n/// Payload for a sortition transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PayloadSortition {\n    /// The validator address associated with the sortition proof.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n    /// The proof for the sortition.\n    #[prost(string, tag=\"2\")]\n    pub proof: ::prost::alloc::string::String,\n}\n/// Payload for an unbond transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PayloadUnbond {\n    /// The address of the validator to unbond from.\n    #[prost(string, tag=\"1\")]\n    pub validator: ::prost::alloc::string::String,\n    /// The address of the delegate owner.\n    /// Optional, but required when the validator is a delegated validator.;\n    #[prost(string, tag=\"2\")]\n    pub delegate_owner: ::prost::alloc::string::String,\n}\n/// Payload for a withdraw transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PayloadWithdraw {\n    /// The address of the validator to withdraw from.\n    #[prost(string, tag=\"1\")]\n    pub validator_address: ::prost::alloc::string::String,\n    /// The address of the account to withdraw to.\n    #[prost(string, tag=\"2\")]\n    pub account_address: ::prost::alloc::string::String,\n    /// The withdrawal amount in NanoPAC.\n    #[prost(int64, tag=\"3\")]\n    pub amount: i64,\n}\n/// Payload for a batch transfer transaction.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct PayloadBatchTransfer {\n    /// The sender's address.\n    #[prost(string, tag=\"1\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The list of recipients with their amounts.\n    #[prost(message, repeated, tag=\"2\")]\n    pub recipients: ::prost::alloc::vec::Vec<Recipient>,\n}\n/// Recipient is receiver with amount.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct Recipient {\n    /// The receiver's address.\n    #[prost(string, tag=\"1\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The amount in NanoPAC.\n    #[prost(int64, tag=\"2\")]\n    pub amount: i64,\n}\n/// Information about a transaction.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct TransactionInfo {\n    /// The unique ID of the transaction.\n    #[prost(string, tag=\"1\")]\n    pub id: ::prost::alloc::string::String,\n    /// The raw transaction data in hexadecimal format.\n    #[prost(string, tag=\"2\")]\n    pub data: ::prost::alloc::string::String,\n    /// The version of the transaction.\n    #[prost(int32, tag=\"3\")]\n    pub version: i32,\n    /// The lock time for the transaction.\n    #[prost(uint32, tag=\"4\")]\n    pub lock_time: u32,\n    /// The value of the transaction in NanoPAC.\n    #[prost(int64, tag=\"5\")]\n    pub value: i64,\n    /// The fee for the transaction in NanoPAC.\n    #[prost(int64, tag=\"6\")]\n    pub fee: i64,\n    /// The type of transaction payload.\n    #[prost(enumeration=\"PayloadType\", tag=\"7\")]\n    pub payload_type: i32,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"8\")]\n    pub memo: ::prost::alloc::string::String,\n    /// The public key associated with the transaction.\n    #[prost(string, tag=\"9\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// The signature for the transaction.\n    #[prost(string, tag=\"10\")]\n    pub signature: ::prost::alloc::string::String,\n    /// The block height containing the transaction.\n    /// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    #[prost(uint32, tag=\"11\")]\n    pub block_height: u32,\n    /// Indicates whether the transaction is confirmed.\n    #[prost(bool, tag=\"12\")]\n    pub confirmed: bool,\n    /// The number of blocks that have been added to the chain after this transaction was included in a block.\n    /// A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n    #[prost(int32, tag=\"13\")]\n    pub confirmations: i32,\n    /// Transaction payload.\n    #[prost(oneof=\"transaction_info::Payload\", tags=\"30, 31, 32, 33, 34, 35\")]\n    pub payload: ::core::option::Option<transaction_info::Payload>,\n}\n/// Nested message and enum types in `TransactionInfo`.\npub mod transaction_info {\n    /// Transaction payload.\n    #[derive(Clone, PartialEq, ::prost::Oneof)]\n    pub enum Payload {\n        /// Transfer transaction payload.\n        #[prost(message, tag=\"30\")]\n        Transfer(super::PayloadTransfer),\n        /// Bond transaction payload.\n        #[prost(message, tag=\"31\")]\n        Bond(super::PayloadBond),\n        /// Sortition transaction payload.\n        #[prost(message, tag=\"32\")]\n        Sortition(super::PayloadSortition),\n        /// Unbond transaction payload.\n        #[prost(message, tag=\"33\")]\n        Unbond(super::PayloadUnbond),\n        /// Withdraw transaction payload.\n        #[prost(message, tag=\"34\")]\n        Withdraw(super::PayloadWithdraw),\n        /// Batch Transfer transaction payload.\n        #[prost(message, tag=\"35\")]\n        BatchTransfer(super::PayloadBatchTransfer),\n    }\n}\n/// Request message for decoding a raw transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct DecodeRawTransactionRequest {\n    /// The raw transaction data in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub raw_transaction: ::prost::alloc::string::String,\n}\n/// Response message contains the decoded transaction.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct DecodeRawTransactionResponse {\n    /// The decoded transaction information.\n    #[prost(message, optional, tag=\"1\")]\n    pub transaction: ::core::option::Option<TransactionInfo>,\n}\n/// Request message for checking a transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CheckTransactionRequest {\n    /// The raw transaction data to be checked.\n    #[prost(string, tag=\"1\")]\n    pub raw_transaction: ::prost::alloc::string::String,\n}\n/// Response message contains the result of the transaction check.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CheckTransactionResponse {\n    /// Indicates whether the transaction is valid.\n    #[prost(bool, tag=\"1\")]\n    pub is_valid: bool,\n    /// An error message if the transaction is invalid.\n    /// Empty if the transaction is valid.\n    #[prost(string, tag=\"2\")]\n    pub error_message: ::prost::alloc::string::String,\n}\n/// Enumeration for different types of transaction payloads.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum PayloadType {\n    /// Unspecified payload type.\n    Unspecified = 0,\n    /// Transfer payload type.\n    Transfer = 1,\n    /// Bond payload type.\n    Bond = 2,\n    /// Sortition payload type.\n    Sortition = 3,\n    /// Unbond payload type.\n    Unbond = 4,\n    /// Withdraw payload type.\n    Withdraw = 5,\n    /// Batch transfer payload type.\n    BatchTransfer = 6,\n}\nimpl PayloadType {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Unspecified => \"PAYLOAD_TYPE_UNSPECIFIED\",\n            Self::Transfer => \"PAYLOAD_TYPE_TRANSFER\",\n            Self::Bond => \"PAYLOAD_TYPE_BOND\",\n            Self::Sortition => \"PAYLOAD_TYPE_SORTITION\",\n            Self::Unbond => \"PAYLOAD_TYPE_UNBOND\",\n            Self::Withdraw => \"PAYLOAD_TYPE_WITHDRAW\",\n            Self::BatchTransfer => \"PAYLOAD_TYPE_BATCH_TRANSFER\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"PAYLOAD_TYPE_UNSPECIFIED\" => Some(Self::Unspecified),\n            \"PAYLOAD_TYPE_TRANSFER\" => Some(Self::Transfer),\n            \"PAYLOAD_TYPE_BOND\" => Some(Self::Bond),\n            \"PAYLOAD_TYPE_SORTITION\" => Some(Self::Sortition),\n            \"PAYLOAD_TYPE_UNBOND\" => Some(Self::Unbond),\n            \"PAYLOAD_TYPE_WITHDRAW\" => Some(Self::Withdraw),\n            \"PAYLOAD_TYPE_BATCH_TRANSFER\" => Some(Self::BatchTransfer),\n            _ => None,\n        }\n    }\n}\n/// Enumeration for verbosity levels when requesting transaction details.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum TransactionVerbosity {\n    /// Request transaction data only.\n    Data = 0,\n    /// Request detailed transaction information.\n    Info = 1,\n}\nimpl TransactionVerbosity {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Data => \"TRANSACTION_VERBOSITY_DATA\",\n            Self::Info => \"TRANSACTION_VERBOSITY_INFO\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"TRANSACTION_VERBOSITY_DATA\" => Some(Self::Data),\n            \"TRANSACTION_VERBOSITY_INFO\" => Some(Self::Info),\n            _ => None,\n        }\n    }\n}\n/// Request message for retrieving account information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetAccountRequest {\n    /// The address of the account to retrieve information for.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Response message contains account information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetAccountResponse {\n    /// Detailed information about the account.\n    #[prost(message, optional, tag=\"1\")]\n    pub account: ::core::option::Option<AccountInfo>,\n}\n/// Request message for retrieving validator addresses.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorAddressesRequest {\n}\n/// Response message contains list of validator addresses.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorAddressesResponse {\n    /// List of validator addresses.\n    #[prost(string, repeated, tag=\"1\")]\n    pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n}\n/// Request message for retrieving validator information by address.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorRequest {\n    /// The address of the validator to retrieve information for.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Request message for retrieving validator information by number.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorByNumberRequest {\n    /// The unique number of the validator to retrieve information for.\n    #[prost(int32, tag=\"1\")]\n    pub number: i32,\n}\n/// Response message contains validator information.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetValidatorResponse {\n    /// Detailed information about the validator.\n    #[prost(message, optional, tag=\"1\")]\n    pub validator: ::core::option::Option<ValidatorInfo>,\n}\n/// Request message for retrieving public key by address.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetPublicKeyRequest {\n    /// The address for which to retrieve the public key.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Response message contains public key information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetPublicKeyResponse {\n    /// The public key associated with the provided address.\n    #[prost(string, tag=\"1\")]\n    pub public_key: ::prost::alloc::string::String,\n}\n/// Request message for retrieving block information based on height and verbosity level.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockRequest {\n    /// The height of the block to retrieve.\n    #[prost(uint32, tag=\"1\")]\n    pub height: u32,\n    /// The verbosity level for block information.\n    #[prost(enumeration=\"BlockVerbosity\", tag=\"2\")]\n    pub verbosity: i32,\n}\n/// Response message contains block information.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetBlockResponse {\n    /// The height of the block.\n    #[prost(uint32, tag=\"1\")]\n    pub height: u32,\n    /// The hash of the block.\n    #[prost(string, tag=\"2\")]\n    pub hash: ::prost::alloc::string::String,\n    /// Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n    #[prost(string, tag=\"3\")]\n    pub data: ::prost::alloc::string::String,\n    /// The timestamp of the block.\n    #[prost(uint32, tag=\"4\")]\n    pub block_time: u32,\n    /// Header information of the block.\n    #[prost(message, optional, tag=\"5\")]\n    pub header: ::core::option::Option<BlockHeaderInfo>,\n    /// Certificate information of the previous block.\n    #[prost(message, optional, tag=\"6\")]\n    pub prev_cert: ::core::option::Option<CertificateInfo>,\n    /// List of transactions in the block, available when verbosity level is set to\n    /// BLOCK_VERBOSITY_TRANSACTIONS.\n    #[prost(message, repeated, tag=\"7\")]\n    pub txs: ::prost::alloc::vec::Vec<TransactionInfo>,\n}\n/// Request message for retrieving block hash by height.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockHashRequest {\n    /// The height of the block to retrieve the hash for.\n    #[prost(uint32, tag=\"1\")]\n    pub height: u32,\n}\n/// Response message contains block hash.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockHashResponse {\n    /// The hash of the block.\n    #[prost(string, tag=\"1\")]\n    pub hash: ::prost::alloc::string::String,\n}\n/// Request message for retrieving block height by hash.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockHeightRequest {\n    /// The hash of the block to retrieve the height for.\n    #[prost(string, tag=\"1\")]\n    pub hash: ::prost::alloc::string::String,\n}\n/// Response message contains block height.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockHeightResponse {\n    /// The height of the block.\n    #[prost(uint32, tag=\"1\")]\n    pub height: u32,\n}\n/// Request message for retrieving blockchain information.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetBlockchainInfoRequest {\n}\n/// Response message contains general blockchain information.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetBlockchainInfoResponse {\n    /// The height of the last block in the blockchain.\n    #[prost(uint32, tag=\"1\")]\n    pub last_block_height: u32,\n    /// The hash of the last block in the blockchain.\n    #[prost(string, tag=\"2\")]\n    pub last_block_hash: ::prost::alloc::string::String,\n    /// The timestamp of the last block in Unix format.\n    #[prost(int64, tag=\"10\")]\n    pub last_block_time: i64,\n    /// The total number of accounts in the blockchain.\n    #[prost(int32, tag=\"3\")]\n    pub total_accounts: i32,\n    /// The total number of validators in the blockchain.\n    #[prost(int32, tag=\"4\")]\n    pub total_validators: i32,\n    /// The number of active (not unbonded) validators in the blockchain.\n    #[prost(int32, tag=\"12\")]\n    pub active_validators: i32,\n    /// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    #[prost(int64, tag=\"5\")]\n    pub total_power: i64,\n    /// The power of the committee.\n    #[prost(int64, tag=\"6\")]\n    pub committee_power: i64,\n    /// If the blocks are subject to pruning.\n    #[prost(bool, tag=\"8\")]\n    pub is_pruned: bool,\n    /// Lowest-height block stored (only present if pruning is enabled)\n    #[prost(uint32, tag=\"9\")]\n    pub pruning_height: u32,\n    /// Indicates whether this node participates in consensus: true if at least one\n    /// of its running validators is a member of the current committee.\n    #[prost(bool, tag=\"13\")]\n    pub in_committee: bool,\n    /// The number of validators in the current committee.\n    #[prost(int32, tag=\"14\")]\n    pub committee_size: i32,\n    /// Average availability score of validators with stake, in percentage (0-100).\n    #[prost(double, tag=\"15\")]\n    pub average_score: f64,\n}\n/// Request message for retrieving committee information.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetCommitteeInfoRequest {\n}\n/// Response message contains committee information.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetCommitteeInfoResponse {\n    /// The number of validators in the committee.\n    #[prost(int32, tag=\"1\")]\n    pub committee_size: i32,\n    /// The power of the committee.\n    #[prost(int64, tag=\"2\")]\n    pub committee_power: i64,\n    /// The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n    #[prost(int64, tag=\"3\")]\n    pub total_power: i64,\n    /// List of committee validators.\n    #[prost(message, repeated, tag=\"4\")]\n    pub validators: ::prost::alloc::vec::Vec<ValidatorInfo>,\n    /// Map of protocol versions and their percentages in the committee.\n    #[prost(map=\"int32, double\", tag=\"5\")]\n    pub protocol_versions: ::std::collections::HashMap<i32, f64>,\n}\n/// Request message for retrieving consensus information.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetConsensusInfoRequest {\n}\n/// Response message contains consensus information.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetConsensusInfoResponse {\n    /// The proposal of the consensus info.\n    #[prost(message, optional, tag=\"1\")]\n    pub proposal: ::core::option::Option<ProposalInfo>,\n    /// List of consensus instances.\n    #[prost(message, repeated, tag=\"2\")]\n    pub instances: ::prost::alloc::vec::Vec<ConsensusInfo>,\n}\n/// Request message for retrieving transactions in the transaction pool.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTxPoolContentRequest {\n    /// The type of transactions to retrieve from the transaction pool. 0 means all types.\n    #[prost(enumeration=\"PayloadType\", tag=\"1\")]\n    pub payload_type: i32,\n}\n/// Response message contains transactions in the transaction pool.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetTxPoolContentResponse {\n    /// List of transactions currently in the pool.\n    #[prost(message, repeated, tag=\"1\")]\n    pub txs: ::prost::alloc::vec::Vec<TransactionInfo>,\n}\n/// Message contains information about a validator.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct ValidatorInfo {\n    /// The hash of the validator.\n    #[prost(string, tag=\"1\")]\n    pub hash: ::prost::alloc::string::String,\n    /// The serialized data of the validator.\n    #[prost(string, tag=\"2\")]\n    pub data: ::prost::alloc::string::String,\n    /// The public key of the validator.\n    #[prost(string, tag=\"3\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// The unique number assigned to the validator.\n    #[prost(int32, tag=\"4\")]\n    pub number: i32,\n    /// The stake of the validator in NanoPAC.\n    #[prost(int64, tag=\"5\")]\n    pub stake: i64,\n    /// The height at which the validator last bonded.\n    #[prost(uint32, tag=\"6\")]\n    pub last_bonding_height: u32,\n    /// The height at which the validator last participated in sortition.\n    #[prost(uint32, tag=\"7\")]\n    pub last_sortition_height: u32,\n    /// The height at which the validator will unbond.\n    #[prost(uint32, tag=\"8\")]\n    pub unbonding_height: u32,\n    /// The address of the validator.\n    #[prost(string, tag=\"9\")]\n    pub address: ::prost::alloc::string::String,\n    /// The availability score of the validator.\n    #[prost(double, tag=\"10\")]\n    pub availability_score: f64,\n    /// The protocol version of the validator.\n    #[prost(int32, tag=\"11\")]\n    pub protocol_version: i32,\n    /// Whether the validator is delegated.\n    #[prost(bool, tag=\"12\")]\n    pub is_delegated: bool,\n    /// The address of the stake owner of the validator.\n    #[prost(string, tag=\"13\")]\n    pub delegate_owner: ::prost::alloc::string::String,\n    /// The share of the stake owner of the validator.\n    #[prost(int64, tag=\"14\")]\n    pub delegate_share: i64,\n    /// The expiry of the stake owner of the validator.\n    #[prost(uint32, tag=\"15\")]\n    pub delegate_expiry: u32,\n}\n/// Message contains information about an account.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct AccountInfo {\n    /// The hash of the account.\n    #[prost(string, tag=\"1\")]\n    pub hash: ::prost::alloc::string::String,\n    /// The serialized data of the account.\n    #[prost(string, tag=\"2\")]\n    pub data: ::prost::alloc::string::String,\n    /// The unique number assigned to the account.\n    #[prost(int32, tag=\"3\")]\n    pub number: i32,\n    /// The balance of the account in NanoPAC.\n    #[prost(int64, tag=\"4\")]\n    pub balance: i64,\n    /// The address of the account.\n    #[prost(string, tag=\"5\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Message contains information about the header of a block.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct BlockHeaderInfo {\n    /// The version of the block.\n    #[prost(int32, tag=\"1\")]\n    pub version: i32,\n    /// The hash of the previous block.\n    #[prost(string, tag=\"2\")]\n    pub prev_block_hash: ::prost::alloc::string::String,\n    /// The state root hash of the blockchain.\n    #[prost(string, tag=\"3\")]\n    pub state_root: ::prost::alloc::string::String,\n    /// The sortition seed of the block.\n    #[prost(string, tag=\"4\")]\n    pub sortition_seed: ::prost::alloc::string::String,\n    /// The address of the proposer of the block.\n    #[prost(string, tag=\"5\")]\n    pub proposer_address: ::prost::alloc::string::String,\n}\n/// Message contains information about a certificate.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CertificateInfo {\n    /// The hash of the certificate.\n    #[prost(string, tag=\"1\")]\n    pub hash: ::prost::alloc::string::String,\n    /// The round of the certificate.\n    #[prost(int32, tag=\"2\")]\n    pub round: i32,\n    /// List of committers in the certificate.\n    #[prost(int32, repeated, tag=\"3\")]\n    pub committers: ::prost::alloc::vec::Vec<i32>,\n    /// List of absentees in the certificate.\n    #[prost(int32, repeated, tag=\"4\")]\n    pub absentees: ::prost::alloc::vec::Vec<i32>,\n    /// The signature of the certificate.\n    #[prost(string, tag=\"5\")]\n    pub signature: ::prost::alloc::string::String,\n}\n/// Message contains information about a vote.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct VoteInfo {\n    /// The type of the vote.\n    #[prost(enumeration=\"VoteType\", tag=\"1\")]\n    pub r#type: i32,\n    /// The address of the voter.\n    #[prost(string, tag=\"2\")]\n    pub voter: ::prost::alloc::string::String,\n    /// The hash of the block being voted on.\n    #[prost(string, tag=\"3\")]\n    pub block_hash: ::prost::alloc::string::String,\n    /// The consensus round of the vote.\n    #[prost(int32, tag=\"4\")]\n    pub round: i32,\n    /// The change-proposer round of the vote.\n    #[prost(int32, tag=\"5\")]\n    pub cp_round: i32,\n    /// The change-proposer value of the vote.\n    #[prost(int32, tag=\"6\")]\n    pub cp_value: i32,\n}\n/// Message contains information about a consensus instance.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct ConsensusInfo {\n    /// The address of the consensus instance.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n    /// Indicates whether the consensus instance is active and part of the committee.\n    #[prost(bool, tag=\"2\")]\n    pub active: bool,\n    /// The height of the consensus instance.\n    #[prost(uint32, tag=\"3\")]\n    pub height: u32,\n    /// The round of the consensus instance.\n    #[prost(int32, tag=\"4\")]\n    pub round: i32,\n    /// List of votes in the consensus instance.\n    #[prost(message, repeated, tag=\"5\")]\n    pub votes: ::prost::alloc::vec::Vec<VoteInfo>,\n}\n/// Message contains information about a proposal.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ProposalInfo {\n    /// The height of the proposal.\n    #[prost(uint32, tag=\"1\")]\n    pub height: u32,\n    /// The round of the proposal.\n    #[prost(int32, tag=\"2\")]\n    pub round: i32,\n    /// The block data of the proposal.\n    #[prost(string, tag=\"3\")]\n    pub block_data: ::prost::alloc::string::String,\n    /// The signature of the proposal, signed by the proposer.\n    #[prost(string, tag=\"4\")]\n    pub signature: ::prost::alloc::string::String,\n}\n/// Enumeration for verbosity levels when requesting block information.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum BlockVerbosity {\n    /// Request only block data.\n    Data = 0,\n    /// Request block information and transaction IDs.\n    Info = 1,\n    /// Request block information and detailed transaction data.\n    Transactions = 2,\n}\nimpl BlockVerbosity {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Data => \"BLOCK_VERBOSITY_DATA\",\n            Self::Info => \"BLOCK_VERBOSITY_INFO\",\n            Self::Transactions => \"BLOCK_VERBOSITY_TRANSACTIONS\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"BLOCK_VERBOSITY_DATA\" => Some(Self::Data),\n            \"BLOCK_VERBOSITY_INFO\" => Some(Self::Info),\n            \"BLOCK_VERBOSITY_TRANSACTIONS\" => Some(Self::Transactions),\n            _ => None,\n        }\n    }\n}\n/// Enumeration for types of votes.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum VoteType {\n    /// Unspecified vote type.\n    Unspecified = 0,\n    /// Prepare vote type.\n    Prepare = 1,\n    /// Precommit vote type.\n    Precommit = 2,\n    /// Change-proposer:pre-vote vote type.\n    CpPreVote = 3,\n    /// Change-proposer:main-vote vote type.\n    CpMainVote = 4,\n    /// Change-proposer:decided vote type.\n    CpDecided = 5,\n}\nimpl VoteType {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Unspecified => \"VOTE_TYPE_UNSPECIFIED\",\n            Self::Prepare => \"VOTE_TYPE_PREPARE\",\n            Self::Precommit => \"VOTE_TYPE_PRECOMMIT\",\n            Self::CpPreVote => \"VOTE_TYPE_CP_PRE_VOTE\",\n            Self::CpMainVote => \"VOTE_TYPE_CP_MAIN_VOTE\",\n            Self::CpDecided => \"VOTE_TYPE_CP_DECIDED\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"VOTE_TYPE_UNSPECIFIED\" => Some(Self::Unspecified),\n            \"VOTE_TYPE_PREPARE\" => Some(Self::Prepare),\n            \"VOTE_TYPE_PRECOMMIT\" => Some(Self::Precommit),\n            \"VOTE_TYPE_CP_PRE_VOTE\" => Some(Self::CpPreVote),\n            \"VOTE_TYPE_CP_MAIN_VOTE\" => Some(Self::CpMainVote),\n            \"VOTE_TYPE_CP_DECIDED\" => Some(Self::CpDecided),\n            _ => None,\n        }\n    }\n}\n/// Request message for retrieving overall network information.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetNetworkInfoRequest {\n}\n/// Response message contains information about the overall network.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetNetworkInfoResponse {\n    /// Name of the P2P network.\n    #[prost(string, tag=\"1\")]\n    pub network_name: ::prost::alloc::string::String,\n    /// Number of connected peers.\n    #[prost(uint32, tag=\"2\")]\n    pub connected_peers_count: u32,\n    /// Metrics related to node activity.\n    #[prost(message, optional, tag=\"4\")]\n    pub metric_info: ::core::option::Option<MetricInfo>,\n}\n/// Request message for listing peers.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ListPeersRequest {\n    /// If true, includes disconnected peers (default: connected peers only).\n    #[prost(bool, tag=\"1\")]\n    pub include_disconnected: bool,\n}\n/// Response message for listing peers.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct ListPeersResponse {\n    /// List of peers.\n    #[prost(message, repeated, tag=\"1\")]\n    pub peers: ::prost::alloc::vec::Vec<PeerInfo>,\n}\n/// Request message for retrieving information of the node.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetNodeInfoRequest {\n}\n/// Response message contains information about a specific node in the network.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct GetNodeInfoResponse {\n    /// Moniker or Human-readable name identifying this node in the network.\n    #[prost(string, tag=\"1\")]\n    pub moniker: ::prost::alloc::string::String,\n    /// Version and agent details of the node.\n    #[prost(string, tag=\"2\")]\n    pub agent: ::prost::alloc::string::String,\n    /// Peer ID of the node.\n    #[prost(string, tag=\"3\")]\n    pub peer_id: ::prost::alloc::string::String,\n    /// Unix timestamp when the node was started (UTC).\n    #[prost(uint64, tag=\"4\")]\n    pub started_at: u64,\n    /// Reachability status of the node.\n    #[prost(string, tag=\"5\")]\n    pub reachability: ::prost::alloc::string::String,\n    /// Bitfield representing the services provided by the node.\n    #[prost(int32, tag=\"6\")]\n    pub services: i32,\n    /// Names of services provided by the node.\n    #[prost(string, tag=\"7\")]\n    pub services_names: ::prost::alloc::string::String,\n    /// List of addresses associated with the node.\n    #[prost(string, repeated, tag=\"8\")]\n    pub local_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n    /// List of protocols supported by the node.\n    #[prost(string, repeated, tag=\"9\")]\n    pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n    /// Offset between the node's clock and the network's clock (in seconds).\n    #[prost(double, tag=\"13\")]\n    pub clock_offset: f64,\n    /// Information about the node's connections.\n    #[prost(message, optional, tag=\"14\")]\n    pub connection_info: ::core::option::Option<ConnectionInfo>,\n    /// List of active ZeroMQ publishers.\n    #[prost(message, repeated, tag=\"15\")]\n    pub zmq_publishers: ::prost::alloc::vec::Vec<ZmqPublisherInfo>,\n    /// Current Unix timestamp of the node (UTC).\n    #[prost(uint64, tag=\"16\")]\n    pub current_time: u64,\n    /// Name of the P2P network.\n    #[prost(string, tag=\"17\")]\n    pub network_name: ::prost::alloc::string::String,\n}\n/// ZMQPublisherInfo contains information about a ZeroMQ publisher.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ZmqPublisherInfo {\n    /// The topic associated with the publisher.\n    #[prost(string, tag=\"1\")]\n    pub topic: ::prost::alloc::string::String,\n    /// The address of the publisher.\n    #[prost(string, tag=\"2\")]\n    pub address: ::prost::alloc::string::String,\n    /// The high-water mark (HWM) for the publisher, indicating the\n    /// maximum number of messages to queue before dropping older ones.\n    #[prost(int32, tag=\"3\")]\n    pub hwm: i32,\n}\n/// PeerInfo contains information about a peer in the network.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct PeerInfo {\n    /// Current status of the peer (e.g., connected, disconnected).\n    #[prost(int32, tag=\"1\")]\n    pub status: i32,\n    /// Moniker or Human-Readable name of the peer.\n    #[prost(string, tag=\"2\")]\n    pub moniker: ::prost::alloc::string::String,\n    /// Version and agent details of the peer.\n    #[prost(string, tag=\"3\")]\n    pub agent: ::prost::alloc::string::String,\n    /// Peer ID of the peer in P2P network.\n    #[prost(string, tag=\"4\")]\n    pub peer_id: ::prost::alloc::string::String,\n    /// List of consensus keys used by the peer.\n    #[prost(string, repeated, tag=\"5\")]\n    pub consensus_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n    /// List of consensus addresses used by the peer.\n    #[prost(string, repeated, tag=\"6\")]\n    pub consensus_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n    /// Bitfield representing the services provided by the peer.\n    #[prost(uint32, tag=\"7\")]\n    pub services: u32,\n    /// Hash of the last block the peer knows.\n    #[prost(string, tag=\"8\")]\n    pub last_block_hash: ::prost::alloc::string::String,\n    /// Blockchain height of the peer.\n    #[prost(uint32, tag=\"9\")]\n    pub height: u32,\n    /// Unix timestamp of the last bundle sent to the peer (UTC).\n    #[prost(int64, tag=\"10\")]\n    pub last_sent: i64,\n    /// Unix timestamp of the last bundle received from the peer (UTC).\n    #[prost(int64, tag=\"11\")]\n    pub last_received: i64,\n    /// Network address of the peer.\n    #[prost(string, tag=\"12\")]\n    pub address: ::prost::alloc::string::String,\n    /// Connection direction (e.g., inbound, outbound).\n    #[prost(enumeration=\"Direction\", tag=\"13\")]\n    pub direction: i32,\n    /// List of protocols supported by the peer.\n    #[prost(string, repeated, tag=\"14\")]\n    pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n    /// Total download sessions with the peer.\n    #[prost(int32, tag=\"15\")]\n    pub total_sessions: i32,\n    /// Completed download sessions with the peer.\n    #[prost(int32, tag=\"16\")]\n    pub completed_sessions: i32,\n    /// Metrics related to peer activity.\n    #[prost(message, optional, tag=\"17\")]\n    pub metric_info: ::core::option::Option<MetricInfo>,\n    /// Whether the hello message was sent from the outbound connection.\n    #[prost(bool, tag=\"18\")]\n    pub outbound_hello_sent: bool,\n}\n/// ConnectionInfo contains information about the node's connections.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ConnectionInfo {\n    /// Total number of connections.\n    #[prost(uint64, tag=\"1\")]\n    pub connections: u64,\n    /// Number of inbound connections.\n    #[prost(uint64, tag=\"2\")]\n    pub inbound_connections: u64,\n    /// Number of outbound connections.\n    #[prost(uint64, tag=\"3\")]\n    pub outbound_connections: u64,\n}\n/// MetricInfo contains metrics data regarding network activity.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct MetricInfo {\n    /// Total number of invalid bundles.\n    #[prost(message, optional, tag=\"1\")]\n    pub total_invalid: ::core::option::Option<CounterInfo>,\n    /// Total number of bundles sent.\n    #[prost(message, optional, tag=\"2\")]\n    pub total_sent: ::core::option::Option<CounterInfo>,\n    /// Total number of bundles received.\n    #[prost(message, optional, tag=\"3\")]\n    pub total_received: ::core::option::Option<CounterInfo>,\n    /// Number of sent bundles categorized by message type.\n    #[prost(map=\"int32, message\", tag=\"4\")]\n    pub message_sent: ::std::collections::HashMap<i32, CounterInfo>,\n    /// Number of received bundles categorized by message type.\n    #[prost(map=\"int32, message\", tag=\"5\")]\n    pub message_received: ::std::collections::HashMap<i32, CounterInfo>,\n}\n/// CounterInfo holds counter data regarding byte and bundle counts.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CounterInfo {\n    /// Total number of bytes.\n    #[prost(uint64, tag=\"1\")]\n    pub bytes: u64,\n    /// Total number of bundles.\n    #[prost(uint64, tag=\"2\")]\n    pub bundles: u64,\n}\n/// Request message for ping - intentionally empty for measuring round-trip time.\n///\n/// Empty request payload for measuring round-trip time\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PingRequest {\n}\n/// Response message for ping - intentionally empty for measuring round-trip time.\n///\n/// Empty response payload for measuring round-trip time\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PingResponse {\n}\n/// Direction represents the connection direction between peers.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum Direction {\n    /// Unknown direction (default value).\n    Unknown = 0,\n    /// Inbound connection - peer connected to us.\n    Inbound = 1,\n    /// Outbound connection - we connected to peer.\n    Outbound = 2,\n}\nimpl Direction {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Unknown => \"DIRECTION_UNKNOWN\",\n            Self::Inbound => \"DIRECTION_INBOUND\",\n            Self::Outbound => \"DIRECTION_OUTBOUND\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"DIRECTION_UNKNOWN\" => Some(Self::Unknown),\n            \"DIRECTION_INBOUND\" => Some(Self::Inbound),\n            \"DIRECTION_OUTBOUND\" => Some(Self::Outbound),\n            _ => None,\n        }\n    }\n}\n/// Request message for signing a message with a private key.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignMessageWithPrivateKeyRequest {\n    /// The private key to sign the message.\n    #[prost(string, tag=\"1\")]\n    pub private_key: ::prost::alloc::string::String,\n    /// The message content to be signed.\n    #[prost(string, tag=\"2\")]\n    pub message: ::prost::alloc::string::String,\n}\n/// Response message contains the signature generated from the message.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignMessageWithPrivateKeyResponse {\n    /// The resulting signature in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub signature: ::prost::alloc::string::String,\n}\n/// Request message for verifying a message signature.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct VerifyMessageRequest {\n    /// The original message content that was signed.\n    #[prost(string, tag=\"1\")]\n    pub message: ::prost::alloc::string::String,\n    /// The signature to verify in hexadecimal format.\n    #[prost(string, tag=\"2\")]\n    pub signature: ::prost::alloc::string::String,\n    /// The public key of the signer.\n    #[prost(string, tag=\"3\")]\n    pub public_key: ::prost::alloc::string::String,\n}\n/// Response message contains the verification result.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct VerifyMessageResponse {\n    /// Boolean indicating whether the signature is valid for the given message and public key.\n    #[prost(bool, tag=\"1\")]\n    pub is_valid: bool,\n}\n/// Request message for aggregating multiple BLS public keys.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PublicKeyAggregationRequest {\n    /// List of BLS public keys to be aggregated.\n    #[prost(string, repeated, tag=\"1\")]\n    pub public_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n}\n/// Response message contains the aggregated BLS public key result.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct PublicKeyAggregationResponse {\n    /// The aggregated BLS public key.\n    #[prost(string, tag=\"1\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// The blockchain address derived from the aggregated public key.\n    #[prost(string, tag=\"2\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Request message for aggregating multiple BLS signatures.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignatureAggregationRequest {\n    /// List of BLS signatures to be aggregated.\n    #[prost(string, repeated, tag=\"1\")]\n    pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n}\n/// Response message contains the aggregated BLS signature.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignatureAggregationResponse {\n    /// The aggregated BLS signature in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub signature: ::prost::alloc::string::String,\n}\n/// AddressInfo contains detailed information about a wallet address.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct AddressInfo {\n    /// The address string.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n    /// The public key associated with the address.\n    #[prost(string, tag=\"2\")]\n    pub public_key: ::prost::alloc::string::String,\n    /// A human-readable label associated with the address.\n    #[prost(string, tag=\"3\")]\n    pub label: ::prost::alloc::string::String,\n    /// The Hierarchical Deterministic (HD) path of the address within the wallet.\n    #[prost(string, tag=\"4\")]\n    pub path: ::prost::alloc::string::String,\n}\n/// Request message for generating a new wallet address.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetNewAddressRequest {\n    /// The name of the wallet to generate a new address.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The type of address to generate.\n    #[prost(enumeration=\"AddressType\", tag=\"2\")]\n    pub address_type: i32,\n    /// A label for the new address.\n    #[prost(string, tag=\"3\")]\n    pub label: ::prost::alloc::string::String,\n    /// Password for the new address. It's required when address_type is Ed25519 type.\n    #[prost(string, tag=\"4\")]\n    pub password: ::prost::alloc::string::String,\n}\n/// Response message contains newly generated address information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetNewAddressResponse {\n    /// The name of the wallet where address was generated.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Detailed information about the new address.\n    #[prost(message, optional, tag=\"2\")]\n    pub addr: ::core::option::Option<AddressInfo>,\n}\n/// Request message for restoring a wallet from mnemonic (seed phrase).\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct RestoreWalletRequest {\n    /// The name for the restored wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The mnemonic (seed phrase) for wallet recovery.\n    #[prost(string, tag=\"2\")]\n    pub mnemonic: ::prost::alloc::string::String,\n    /// Password to secure the restored wallet.\n    #[prost(string, tag=\"3\")]\n    pub password: ::prost::alloc::string::String,\n}\n/// Response message confirming wallet restoration.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct RestoreWalletResponse {\n    /// The name of the restored wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Request message for creating a new wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CreateWalletRequest {\n    /// The name for the new wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Password to secure the new wallet.\n    #[prost(string, tag=\"2\")]\n    pub password: ::prost::alloc::string::String,\n}\n/// Response message contains wallet recovery mnemonic (seed phrase).\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct CreateWalletResponse {\n    /// The name for the new wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The mnemonic (seed phrase) for wallet recovery.\n    #[prost(string, tag=\"2\")]\n    pub mnemonic: ::prost::alloc::string::String,\n}\n/// Request message for loading an existing wallet.\n/// Deprecated: It will be removed in a future version.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct LoadWalletRequest {\n    /// The name of the wallet to load.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Response message confirming wallet loaded.\n/// Deprecated: It will be removed in a future version.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct LoadWalletResponse {\n    /// The name of the loaded wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Request message for unloading a wallet.\n/// Deprecated: It will be removed in a future version.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct UnloadWalletRequest {\n    /// The name of the wallet to unload.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Response message confirming wallet unloading.\n/// Deprecated: It will be removed in a future version.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct UnloadWalletResponse {\n    /// The name of the unloaded wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Request message for obtaining the validator address associated with a public key.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorAddressRequest {\n    /// The public key of the validator.\n    #[prost(string, tag=\"1\")]\n    pub public_key: ::prost::alloc::string::String,\n}\n/// Response message containing the validator address corresponding to a public key.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetValidatorAddressResponse {\n    /// The validator address associated with the public key.\n    #[prost(string, tag=\"1\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Request message for signing a raw transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignRawTransactionRequest {\n    /// The name of the wallet used for signing.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The raw transaction data to be signed.\n    #[prost(string, tag=\"2\")]\n    pub raw_transaction: ::prost::alloc::string::String,\n    /// Wallet password required for signing.\n    #[prost(string, tag=\"3\")]\n    pub password: ::prost::alloc::string::String,\n}\n/// Response message contains the transaction ID and signed raw transaction.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignRawTransactionResponse {\n    /// The ID of the signed transaction.\n    #[prost(string, tag=\"1\")]\n    pub transaction_id: ::prost::alloc::string::String,\n    /// The signed raw transaction data.\n    #[prost(string, tag=\"2\")]\n    pub signed_raw_transaction: ::prost::alloc::string::String,\n}\n/// Request message for obtaining the total available balance of a wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTotalBalanceRequest {\n    /// The name of the wallet to get the total balance.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Response message contains the total available balance of the wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTotalBalanceResponse {\n    /// The name of the queried wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The total balance of the wallet in NanoPAC.\n    #[prost(int64, tag=\"2\")]\n    pub total_balance: i64,\n}\n/// Request message to sign an arbitrary message.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignMessageRequest {\n    /// The name of the wallet to sign with.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Wallet password required for signing.\n    #[prost(string, tag=\"2\")]\n    pub password: ::prost::alloc::string::String,\n    /// The address whose private key should be used for signing the message.\n    #[prost(string, tag=\"3\")]\n    pub address: ::prost::alloc::string::String,\n    /// The arbitrary message to be signed.\n    #[prost(string, tag=\"4\")]\n    pub message: ::prost::alloc::string::String,\n}\n/// Response message contains message signature.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SignMessageResponse {\n    /// The signature in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub signature: ::prost::alloc::string::String,\n}\n/// Request message for obtaining the total stake of a wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTotalStakeRequest {\n    /// The name of the wallet to get the total stake.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Response message contains the total stake of the wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetTotalStakeResponse {\n    /// The name of the queried wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The total stake amount in NanoPAC.\n    #[prost(int64, tag=\"2\")]\n    pub total_stake: i64,\n}\n/// Request message for getting address information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetAddressInfoRequest {\n    /// The name of the wallet containing the address.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The address to query.\n    #[prost(string, tag=\"2\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Response message contains address details.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetAddressInfoResponse {\n    /// The name of the wallet containing the address.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Detailed information about the address.\n    #[prost(message, optional, tag=\"2\")]\n    pub addr: ::core::option::Option<AddressInfo>,\n}\n/// Request message for setting address label.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SetAddressLabelRequest {\n    /// The name of the wallet containing the address.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Wallet password required for modification.\n    #[prost(string, tag=\"2\")]\n    pub password: ::prost::alloc::string::String,\n    /// The address to label.\n    #[prost(string, tag=\"3\")]\n    pub address: ::prost::alloc::string::String,\n    /// The new label for the address.\n    #[prost(string, tag=\"4\")]\n    pub label: ::prost::alloc::string::String,\n}\n/// Response message for updated address label.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SetAddressLabelResponse {\n    /// The name of the wallet where the address label was updated.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The address where the label was updated.\n    #[prost(string, tag=\"2\")]\n    pub address: ::prost::alloc::string::String,\n    /// The new label for the address.\n    #[prost(string, tag=\"3\")]\n    pub label: ::prost::alloc::string::String,\n}\n/// Request message for listing wallets.\n#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ListWalletsRequest {\n}\n/// Response message contains wallet names.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ListWalletsResponse {\n    /// Array of wallet names.\n    #[prost(string, repeated, tag=\"1\")]\n    pub wallets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,\n}\n/// Request message for getting wallet information.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetWalletInfoRequest {\n    /// The name of the wallet to query.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Response message contains wallet details.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetWalletInfoResponse {\n    /// The name of the wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The wallet format version.\n    #[prost(int32, tag=\"2\")]\n    pub version: i32,\n    /// The network the wallet is connected to (e.g., mainnet, testnet).\n    #[prost(string, tag=\"3\")]\n    pub network: ::prost::alloc::string::String,\n    /// Indicates if the wallet is encrypted.\n    #[prost(bool, tag=\"4\")]\n    pub encrypted: bool,\n    /// A unique identifier of the wallet.\n    #[prost(string, tag=\"5\")]\n    pub uuid: ::prost::alloc::string::String,\n    /// Unix timestamp of wallet creation.\n    #[prost(int64, tag=\"6\")]\n    pub created_at: i64,\n    /// The default fee of the wallet.\n    #[prost(int64, tag=\"7\")]\n    pub default_fee: i64,\n    /// The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n    #[prost(string, tag=\"8\")]\n    pub driver: ::prost::alloc::string::String,\n    /// Path to the wallet file or storage location.\n    #[prost(string, tag=\"9\")]\n    pub path: ::prost::alloc::string::String,\n}\n/// Request message for listing wallet addresses.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ListAddressesRequest {\n    /// The name of the queried wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Filter addresses by their types. If empty, all address types are included.\n    #[prost(enumeration=\"AddressType\", repeated, tag=\"2\")]\n    pub address_types: ::prost::alloc::vec::Vec<i32>,\n}\n/// Response message contains wallet addresses.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct ListAddressesResponse {\n    /// The name of the queried wallet.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// List of all addresses in the wallet with their details.\n    #[prost(message, repeated, tag=\"2\")]\n    pub addrs: ::prost::alloc::vec::Vec<AddressInfo>,\n}\n/// Request message for updating wallet password.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct UpdatePasswordRequest {\n    /// The name of the wallet whose password will be updated.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The current wallet password.\n    #[prost(string, tag=\"2\")]\n    pub old_password: ::prost::alloc::string::String,\n    /// The new wallet password.\n    #[prost(string, tag=\"3\")]\n    pub new_password: ::prost::alloc::string::String,\n}\n/// Response message confirming wallet password update.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct UpdatePasswordResponse {\n    /// The name of the wallet whose password was updated.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// WalletTransactionInfo contains information about a transaction in a wallet.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct WalletTransactionInfo {\n    /// A sequence number for the transaction in the wallet.\n    #[prost(int64, tag=\"1\")]\n    pub no: i64,\n    /// The unique ID of the transaction.\n    #[prost(string, tag=\"2\")]\n    pub tx_id: ::prost::alloc::string::String,\n    /// The sender's address.\n    #[prost(string, tag=\"3\")]\n    pub sender: ::prost::alloc::string::String,\n    /// The receiver's address.\n    #[prost(string, tag=\"4\")]\n    pub receiver: ::prost::alloc::string::String,\n    /// The direction of the transaction relative to the wallet.\n    #[prost(enumeration=\"TxDirection\", tag=\"5\")]\n    pub direction: i32,\n    /// The amount involved in the transaction in NanoPAC.\n    #[prost(int64, tag=\"6\")]\n    pub amount: i64,\n    /// The transaction fee in NanoPAC.\n    #[prost(int64, tag=\"7\")]\n    pub fee: i64,\n    /// A memo string for the transaction.\n    #[prost(string, tag=\"8\")]\n    pub memo: ::prost::alloc::string::String,\n    /// The current status of the transaction.\n    #[prost(enumeration=\"TransactionStatus\", tag=\"9\")]\n    pub status: i32,\n    /// The block height containing the transaction.\n    #[prost(uint32, tag=\"10\")]\n    pub block_height: u32,\n    /// The type of transaction payload.\n    #[prost(enumeration=\"PayloadType\", tag=\"11\")]\n    pub payload_type: i32,\n    /// The raw transaction data.\n    #[prost(bytes=\"vec\", tag=\"12\")]\n    pub data: ::prost::alloc::vec::Vec<u8>,\n    /// A comment associated with the transaction in the wallet.\n    #[prost(string, tag=\"13\")]\n    pub comment: ::prost::alloc::string::String,\n    /// Unix timestamp of when the transaction was created.\n    #[prost(int64, tag=\"14\")]\n    pub created_at: i64,\n    /// Unix timestamp of when the transaction was last updated.\n    #[prost(int64, tag=\"15\")]\n    pub updated_at: i64,\n}\n/// Request message for listing transactions of a wallet, optionally filtered by a specific address.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct ListTransactionsRequest {\n    /// The name of the wallet to query transactions for.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Optional: The address to filter transactions.\n    /// If empty or set to '*', transactions for all addresses in the wallet are included.\n    #[prost(string, tag=\"2\")]\n    pub address: ::prost::alloc::string::String,\n    /// Filter transactions by direction relative to the wallet.\n    /// Defaults to any direction if not set.\n    #[prost(enumeration=\"TxDirection\", tag=\"3\")]\n    pub direction: i32,\n    /// Optional: The maximum number of transactions to return.\n    /// Defaults to 10 if not set.\n    #[prost(int32, tag=\"4\")]\n    pub count: i32,\n    /// Optional: The number of transactions to skip (for pagination).\n    /// Defaults to 0 if not set.\n    #[prost(int32, tag=\"5\")]\n    pub skip: i32,\n}\n/// Response message containing a list of transactions.\n#[derive(Clone, PartialEq, ::prost::Message)]\npub struct ListTransactionsResponse {\n    /// The name of the wallet queried.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// List of transactions for the wallet, filtered by the specified address if provided.\n    #[prost(message, repeated, tag=\"2\")]\n    pub txs: ::prost::alloc::vec::Vec<WalletTransactionInfo>,\n}\n/// Request message for setting default fee.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SetDefaultFeeRequest {\n    /// The name of the wallet to set the default fee.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// The default fee amount in NanoPAC.\n    #[prost(int64, tag=\"2\")]\n    pub amount: i64,\n}\n/// Response message for updated default fee.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct SetDefaultFeeResponse {\n    /// The name of the wallet where the default fee was updated.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n}\n/// Request message for getting mnemonic.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetMnemonicRequest {\n    /// The name of the wallet to get the mnemonic.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Wallet password.\n    #[prost(string, tag=\"2\")]\n    pub password: ::prost::alloc::string::String,\n}\n/// Response message contains mnemonic.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetMnemonicResponse {\n    /// The mnemonic (seed phrase).\n    #[prost(string, tag=\"1\")]\n    pub mnemonic: ::prost::alloc::string::String,\n}\n/// Request message for getting private key.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetPrivateKeyRequest {\n    /// The name of the wallet containing the address.\n    #[prost(string, tag=\"1\")]\n    pub wallet_name: ::prost::alloc::string::String,\n    /// Wallet password.\n    #[prost(string, tag=\"2\")]\n    pub password: ::prost::alloc::string::String,\n    /// The address to get the private key.\n    #[prost(string, tag=\"3\")]\n    pub address: ::prost::alloc::string::String,\n}\n/// Response message contains private key.\n#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]\npub struct GetPrivateKeyResponse {\n    /// The private key in hexadecimal format.\n    #[prost(string, tag=\"1\")]\n    pub private_key: ::prost::alloc::string::String,\n}\n/// AddressType defines different types of blockchain addresses.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum AddressType {\n    /// Treasury address type.\n    /// Should not be used to generate new addresses.\n    Treasury = 0,\n    /// Validator address type used for validator nodes.\n    Validator = 1,\n    /// Account address type with BLS signature scheme.\n    BlsAccount = 2,\n    /// Account address type with Ed25519 signature scheme.\n    /// Note: Generating a new Ed25519 address requires the wallet password.\n    Ed25519Account = 3,\n}\nimpl AddressType {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Treasury => \"ADDRESS_TYPE_TREASURY\",\n            Self::Validator => \"ADDRESS_TYPE_VALIDATOR\",\n            Self::BlsAccount => \"ADDRESS_TYPE_BLS_ACCOUNT\",\n            Self::Ed25519Account => \"ADDRESS_TYPE_ED25519_ACCOUNT\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"ADDRESS_TYPE_TREASURY\" => Some(Self::Treasury),\n            \"ADDRESS_TYPE_VALIDATOR\" => Some(Self::Validator),\n            \"ADDRESS_TYPE_BLS_ACCOUNT\" => Some(Self::BlsAccount),\n            \"ADDRESS_TYPE_ED25519_ACCOUNT\" => Some(Self::Ed25519Account),\n            _ => None,\n        }\n    }\n}\n/// TxDirection indicates the direction of a transaction relative to the wallet.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum TxDirection {\n    /// include both incoming and outgoing transactions.\n    Any = 0,\n    /// Include only incoming transactions where the wallet receives funds.\n    Incoming = 1,\n    /// Include only outgoing transactions where the wallet sends funds.\n    Outgoing = 2,\n}\nimpl TxDirection {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Any => \"TX_DIRECTION_ANY\",\n            Self::Incoming => \"TX_DIRECTION_INCOMING\",\n            Self::Outgoing => \"TX_DIRECTION_OUTGOING\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"TX_DIRECTION_ANY\" => Some(Self::Any),\n            \"TX_DIRECTION_INCOMING\" => Some(Self::Incoming),\n            \"TX_DIRECTION_OUTGOING\" => Some(Self::Outgoing),\n            _ => None,\n        }\n    }\n}\n/// TransactionStatus defines the status of a transaction.\n#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]\n#[repr(i32)]\npub enum TransactionStatus {\n    /// Pending status for transactions in the mempool.\n    Pending = 0,\n    /// Confirmed status for transactions included in a block.\n    Confirmed = 1,\n    /// Failed status for transactions that were not successful.\n    Failed = -1,\n}\nimpl TransactionStatus {\n    /// String value of the enum field names used in the ProtoBuf definition.\n    ///\n    /// The values are not transformed in any way and thus are considered stable\n    /// (if the ProtoBuf definition does not change) and safe for programmatic use.\n    pub fn as_str_name(&self) -> &'static str {\n        match self {\n            Self::Pending => \"TRANSACTION_STATUS_PENDING\",\n            Self::Confirmed => \"TRANSACTION_STATUS_CONFIRMED\",\n            Self::Failed => \"TRANSACTION_STATUS_FAILED\",\n        }\n    }\n    /// Creates an enum from field names used in the ProtoBuf definition.\n    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {\n        match value {\n            \"TRANSACTION_STATUS_PENDING\" => Some(Self::Pending),\n            \"TRANSACTION_STATUS_CONFIRMED\" => Some(Self::Confirmed),\n            \"TRANSACTION_STATUS_FAILED\" => Some(Self::Failed),\n            _ => None,\n        }\n    }\n}\ninclude!(\"pactus.serde.rs\");\ninclude!(\"pactus.tonic.rs\");\n// @@protoc_insertion_point(module)"
  },
  {
    "path": "www/grpc/gen/rust/pactus.serde.rs",
    "content": "// @generated\nimpl serde::Serialize for AccountInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        if !self.data.is_empty() {\n            len += 1;\n        }\n        if self.number != 0 {\n            len += 1;\n        }\n        if self.balance != 0 {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.AccountInfo\", len)?;\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        if !self.data.is_empty() {\n            struct_ser.serialize_field(\"data\", &self.data)?;\n        }\n        if self.number != 0 {\n            struct_ser.serialize_field(\"number\", &self.number)?;\n        }\n        if self.balance != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"balance\", ToString::to_string(&self.balance).as_str())?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for AccountInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"hash\",\n            \"data\",\n            \"number\",\n            \"balance\",\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Hash,\n            Data,\n            Number,\n            Balance,\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            \"data\" => Ok(GeneratedField::Data),\n                            \"number\" => Ok(GeneratedField::Number),\n                            \"balance\" => Ok(GeneratedField::Balance),\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = AccountInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.AccountInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<AccountInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut hash__ = None;\n                let mut data__ = None;\n                let mut number__ = None;\n                let mut balance__ = None;\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Data => {\n                            if data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"data\"));\n                            }\n                            data__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Number => {\n                            if number__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"number\"));\n                            }\n                            number__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Balance => {\n                            if balance__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"balance\"));\n                            }\n                            balance__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(AccountInfo {\n                    hash: hash__.unwrap_or_default(),\n                    data: data__.unwrap_or_default(),\n                    number: number__.unwrap_or_default(),\n                    balance: balance__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.AccountInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for AddressInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if !self.label.is_empty() {\n            len += 1;\n        }\n        if !self.path.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.AddressInfo\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if !self.label.is_empty() {\n            struct_ser.serialize_field(\"label\", &self.label)?;\n        }\n        if !self.path.is_empty() {\n            struct_ser.serialize_field(\"path\", &self.path)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for AddressInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n            \"public_key\",\n            \"publicKey\",\n            \"label\",\n            \"path\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n            PublicKey,\n            Label,\n            Path,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"label\" => Ok(GeneratedField::Label),\n                            \"path\" => Ok(GeneratedField::Path),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = AddressInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.AddressInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<AddressInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                let mut public_key__ = None;\n                let mut label__ = None;\n                let mut path__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Label => {\n                            if label__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"label\"));\n                            }\n                            label__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Path => {\n                            if path__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"path\"));\n                            }\n                            path__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(AddressInfo {\n                    address: address__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                    label: label__.unwrap_or_default(),\n                    path: path__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.AddressInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for AddressType {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Treasury => \"ADDRESS_TYPE_TREASURY\",\n            Self::Validator => \"ADDRESS_TYPE_VALIDATOR\",\n            Self::BlsAccount => \"ADDRESS_TYPE_BLS_ACCOUNT\",\n            Self::Ed25519Account => \"ADDRESS_TYPE_ED25519_ACCOUNT\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for AddressType {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"ADDRESS_TYPE_TREASURY\",\n            \"ADDRESS_TYPE_VALIDATOR\",\n            \"ADDRESS_TYPE_BLS_ACCOUNT\",\n            \"ADDRESS_TYPE_ED25519_ACCOUNT\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = AddressType;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"ADDRESS_TYPE_TREASURY\" => Ok(AddressType::Treasury),\n                    \"ADDRESS_TYPE_VALIDATOR\" => Ok(AddressType::Validator),\n                    \"ADDRESS_TYPE_BLS_ACCOUNT\" => Ok(AddressType::BlsAccount),\n                    \"ADDRESS_TYPE_ED25519_ACCOUNT\" => Ok(AddressType::Ed25519Account),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for BlockHeaderInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.version != 0 {\n            len += 1;\n        }\n        if !self.prev_block_hash.is_empty() {\n            len += 1;\n        }\n        if !self.state_root.is_empty() {\n            len += 1;\n        }\n        if !self.sortition_seed.is_empty() {\n            len += 1;\n        }\n        if !self.proposer_address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.BlockHeaderInfo\", len)?;\n        if self.version != 0 {\n            struct_ser.serialize_field(\"version\", &self.version)?;\n        }\n        if !self.prev_block_hash.is_empty() {\n            struct_ser.serialize_field(\"prevBlockHash\", &self.prev_block_hash)?;\n        }\n        if !self.state_root.is_empty() {\n            struct_ser.serialize_field(\"stateRoot\", &self.state_root)?;\n        }\n        if !self.sortition_seed.is_empty() {\n            struct_ser.serialize_field(\"sortitionSeed\", &self.sortition_seed)?;\n        }\n        if !self.proposer_address.is_empty() {\n            struct_ser.serialize_field(\"proposerAddress\", &self.proposer_address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for BlockHeaderInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"version\",\n            \"prev_block_hash\",\n            \"prevBlockHash\",\n            \"state_root\",\n            \"stateRoot\",\n            \"sortition_seed\",\n            \"sortitionSeed\",\n            \"proposer_address\",\n            \"proposerAddress\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Version,\n            PrevBlockHash,\n            StateRoot,\n            SortitionSeed,\n            ProposerAddress,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"version\" => Ok(GeneratedField::Version),\n                            \"prevBlockHash\" | \"prev_block_hash\" => Ok(GeneratedField::PrevBlockHash),\n                            \"stateRoot\" | \"state_root\" => Ok(GeneratedField::StateRoot),\n                            \"sortitionSeed\" | \"sortition_seed\" => Ok(GeneratedField::SortitionSeed),\n                            \"proposerAddress\" | \"proposer_address\" => Ok(GeneratedField::ProposerAddress),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = BlockHeaderInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.BlockHeaderInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BlockHeaderInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut version__ = None;\n                let mut prev_block_hash__ = None;\n                let mut state_root__ = None;\n                let mut sortition_seed__ = None;\n                let mut proposer_address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Version => {\n                            if version__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"version\"));\n                            }\n                            version__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PrevBlockHash => {\n                            if prev_block_hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"prevBlockHash\"));\n                            }\n                            prev_block_hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::StateRoot => {\n                            if state_root__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"stateRoot\"));\n                            }\n                            state_root__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::SortitionSeed => {\n                            if sortition_seed__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sortitionSeed\"));\n                            }\n                            sortition_seed__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ProposerAddress => {\n                            if proposer_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"proposerAddress\"));\n                            }\n                            proposer_address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(BlockHeaderInfo {\n                    version: version__.unwrap_or_default(),\n                    prev_block_hash: prev_block_hash__.unwrap_or_default(),\n                    state_root: state_root__.unwrap_or_default(),\n                    sortition_seed: sortition_seed__.unwrap_or_default(),\n                    proposer_address: proposer_address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.BlockHeaderInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for BlockVerbosity {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Data => \"BLOCK_VERBOSITY_DATA\",\n            Self::Info => \"BLOCK_VERBOSITY_INFO\",\n            Self::Transactions => \"BLOCK_VERBOSITY_TRANSACTIONS\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for BlockVerbosity {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"BLOCK_VERBOSITY_DATA\",\n            \"BLOCK_VERBOSITY_INFO\",\n            \"BLOCK_VERBOSITY_TRANSACTIONS\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = BlockVerbosity;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"BLOCK_VERBOSITY_DATA\" => Ok(BlockVerbosity::Data),\n                    \"BLOCK_VERBOSITY_INFO\" => Ok(BlockVerbosity::Info),\n                    \"BLOCK_VERBOSITY_TRANSACTIONS\" => Ok(BlockVerbosity::Transactions),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for BroadcastTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.signed_raw_transaction.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.BroadcastTransactionRequest\", len)?;\n        if !self.signed_raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"signedRawTransaction\", &self.signed_raw_transaction)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for BroadcastTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"signed_raw_transaction\",\n            \"signedRawTransaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            SignedRawTransaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"signedRawTransaction\" | \"signed_raw_transaction\" => Ok(GeneratedField::SignedRawTransaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = BroadcastTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.BroadcastTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BroadcastTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut signed_raw_transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::SignedRawTransaction => {\n                            if signed_raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signedRawTransaction\"));\n                            }\n                            signed_raw_transaction__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(BroadcastTransactionRequest {\n                    signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.BroadcastTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for BroadcastTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.id.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.BroadcastTransactionResponse\", len)?;\n        if !self.id.is_empty() {\n            struct_ser.serialize_field(\"id\", &self.id)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for BroadcastTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"id\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Id,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"id\" => Ok(GeneratedField::Id),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = BroadcastTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.BroadcastTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<BroadcastTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut id__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Id => {\n                            if id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"id\"));\n                            }\n                            id__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(BroadcastTransactionResponse {\n                    id: id__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.BroadcastTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CalculateFeeRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.amount != 0 {\n            len += 1;\n        }\n        if self.payload_type != 0 {\n            len += 1;\n        }\n        if self.fixed_amount {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CalculateFeeRequest\", len)?;\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        if self.payload_type != 0 {\n            let v = PayloadType::try_from(self.payload_type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.payload_type)))?;\n            struct_ser.serialize_field(\"payloadType\", &v)?;\n        }\n        if self.fixed_amount {\n            struct_ser.serialize_field(\"fixedAmount\", &self.fixed_amount)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CalculateFeeRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"amount\",\n            \"payload_type\",\n            \"payloadType\",\n            \"fixed_amount\",\n            \"fixedAmount\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Amount,\n            PayloadType,\n            FixedAmount,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            \"payloadType\" | \"payload_type\" => Ok(GeneratedField::PayloadType),\n                            \"fixedAmount\" | \"fixed_amount\" => Ok(GeneratedField::FixedAmount),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CalculateFeeRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CalculateFeeRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CalculateFeeRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut amount__ = None;\n                let mut payload_type__ = None;\n                let mut fixed_amount__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PayloadType => {\n                            if payload_type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"payloadType\"));\n                            }\n                            payload_type__ = Some(map_.next_value::<PayloadType>()? as i32);\n                        }\n                        GeneratedField::FixedAmount => {\n                            if fixed_amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fixedAmount\"));\n                            }\n                            fixed_amount__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CalculateFeeRequest {\n                    amount: amount__.unwrap_or_default(),\n                    payload_type: payload_type__.unwrap_or_default(),\n                    fixed_amount: fixed_amount__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CalculateFeeRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CalculateFeeResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.amount != 0 {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CalculateFeeResponse\", len)?;\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CalculateFeeResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"amount\",\n            \"fee\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Amount,\n            Fee,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CalculateFeeResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CalculateFeeResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CalculateFeeResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut amount__ = None;\n                let mut fee__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(CalculateFeeResponse {\n                    amount: amount__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CalculateFeeResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CertificateInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        if self.round != 0 {\n            len += 1;\n        }\n        if !self.committers.is_empty() {\n            len += 1;\n        }\n        if !self.absentees.is_empty() {\n            len += 1;\n        }\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CertificateInfo\", len)?;\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        if self.round != 0 {\n            struct_ser.serialize_field(\"round\", &self.round)?;\n        }\n        if !self.committers.is_empty() {\n            struct_ser.serialize_field(\"committers\", &self.committers)?;\n        }\n        if !self.absentees.is_empty() {\n            struct_ser.serialize_field(\"absentees\", &self.absentees)?;\n        }\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CertificateInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"hash\",\n            \"round\",\n            \"committers\",\n            \"absentees\",\n            \"signature\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Hash,\n            Round,\n            Committers,\n            Absentees,\n            Signature,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            \"round\" => Ok(GeneratedField::Round),\n                            \"committers\" => Ok(GeneratedField::Committers),\n                            \"absentees\" => Ok(GeneratedField::Absentees),\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CertificateInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CertificateInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CertificateInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut hash__ = None;\n                let mut round__ = None;\n                let mut committers__ = None;\n                let mut absentees__ = None;\n                let mut signature__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Round => {\n                            if round__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"round\"));\n                            }\n                            round__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Committers => {\n                            if committers__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"committers\"));\n                            }\n                            committers__ = \n                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?\n                                    .into_iter().map(|x| x.0).collect())\n                            ;\n                        }\n                        GeneratedField::Absentees => {\n                            if absentees__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"absentees\"));\n                            }\n                            absentees__ = \n                                Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?\n                                    .into_iter().map(|x| x.0).collect())\n                            ;\n                        }\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CertificateInfo {\n                    hash: hash__.unwrap_or_default(),\n                    round: round__.unwrap_or_default(),\n                    committers: committers__.unwrap_or_default(),\n                    absentees: absentees__.unwrap_or_default(),\n                    signature: signature__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CertificateInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CheckTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.raw_transaction.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CheckTransactionRequest\", len)?;\n        if !self.raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"rawTransaction\", &self.raw_transaction)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CheckTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"raw_transaction\",\n            \"rawTransaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            RawTransaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"rawTransaction\" | \"raw_transaction\" => Ok(GeneratedField::RawTransaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CheckTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CheckTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CheckTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut raw_transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::RawTransaction => {\n                            if raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"rawTransaction\"));\n                            }\n                            raw_transaction__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CheckTransactionRequest {\n                    raw_transaction: raw_transaction__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CheckTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CheckTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.is_valid {\n            len += 1;\n        }\n        if !self.error_message.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CheckTransactionResponse\", len)?;\n        if self.is_valid {\n            struct_ser.serialize_field(\"isValid\", &self.is_valid)?;\n        }\n        if !self.error_message.is_empty() {\n            struct_ser.serialize_field(\"errorMessage\", &self.error_message)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CheckTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"is_valid\",\n            \"isValid\",\n            \"error_message\",\n            \"errorMessage\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            IsValid,\n            ErrorMessage,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"isValid\" | \"is_valid\" => Ok(GeneratedField::IsValid),\n                            \"errorMessage\" | \"error_message\" => Ok(GeneratedField::ErrorMessage),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CheckTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CheckTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CheckTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut is_valid__ = None;\n                let mut error_message__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::IsValid => {\n                            if is_valid__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"isValid\"));\n                            }\n                            is_valid__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ErrorMessage => {\n                            if error_message__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"errorMessage\"));\n                            }\n                            error_message__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CheckTransactionResponse {\n                    is_valid: is_valid__.unwrap_or_default(),\n                    error_message: error_message__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CheckTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ConnectionInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.connections != 0 {\n            len += 1;\n        }\n        if self.inbound_connections != 0 {\n            len += 1;\n        }\n        if self.outbound_connections != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ConnectionInfo\", len)?;\n        if self.connections != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"connections\", ToString::to_string(&self.connections).as_str())?;\n        }\n        if self.inbound_connections != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"inboundConnections\", ToString::to_string(&self.inbound_connections).as_str())?;\n        }\n        if self.outbound_connections != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"outboundConnections\", ToString::to_string(&self.outbound_connections).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ConnectionInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"connections\",\n            \"inbound_connections\",\n            \"inboundConnections\",\n            \"outbound_connections\",\n            \"outboundConnections\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Connections,\n            InboundConnections,\n            OutboundConnections,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"connections\" => Ok(GeneratedField::Connections),\n                            \"inboundConnections\" | \"inbound_connections\" => Ok(GeneratedField::InboundConnections),\n                            \"outboundConnections\" | \"outbound_connections\" => Ok(GeneratedField::OutboundConnections),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ConnectionInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ConnectionInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ConnectionInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut connections__ = None;\n                let mut inbound_connections__ = None;\n                let mut outbound_connections__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Connections => {\n                            if connections__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"connections\"));\n                            }\n                            connections__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::InboundConnections => {\n                            if inbound_connections__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"inboundConnections\"));\n                            }\n                            inbound_connections__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::OutboundConnections => {\n                            if outbound_connections__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"outboundConnections\"));\n                            }\n                            outbound_connections__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(ConnectionInfo {\n                    connections: connections__.unwrap_or_default(),\n                    inbound_connections: inbound_connections__.unwrap_or_default(),\n                    outbound_connections: outbound_connections__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ConnectionInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ConsensusInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if self.active {\n            len += 1;\n        }\n        if self.height != 0 {\n            len += 1;\n        }\n        if self.round != 0 {\n            len += 1;\n        }\n        if !self.votes.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ConsensusInfo\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if self.active {\n            struct_ser.serialize_field(\"active\", &self.active)?;\n        }\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        if self.round != 0 {\n            struct_ser.serialize_field(\"round\", &self.round)?;\n        }\n        if !self.votes.is_empty() {\n            struct_ser.serialize_field(\"votes\", &self.votes)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ConsensusInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n            \"active\",\n            \"height\",\n            \"round\",\n            \"votes\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n            Active,\n            Height,\n            Round,\n            Votes,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"active\" => Ok(GeneratedField::Active),\n                            \"height\" => Ok(GeneratedField::Height),\n                            \"round\" => Ok(GeneratedField::Round),\n                            \"votes\" => Ok(GeneratedField::Votes),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ConsensusInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ConsensusInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ConsensusInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                let mut active__ = None;\n                let mut height__ = None;\n                let mut round__ = None;\n                let mut votes__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Active => {\n                            if active__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"active\"));\n                            }\n                            active__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Round => {\n                            if round__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"round\"));\n                            }\n                            round__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Votes => {\n                            if votes__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"votes\"));\n                            }\n                            votes__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ConsensusInfo {\n                    address: address__.unwrap_or_default(),\n                    active: active__.unwrap_or_default(),\n                    height: height__.unwrap_or_default(),\n                    round: round__.unwrap_or_default(),\n                    votes: votes__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ConsensusInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CounterInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.bytes != 0 {\n            len += 1;\n        }\n        if self.bundles != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CounterInfo\", len)?;\n        if self.bytes != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"bytes\", ToString::to_string(&self.bytes).as_str())?;\n        }\n        if self.bundles != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"bundles\", ToString::to_string(&self.bundles).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CounterInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"bytes\",\n            \"bundles\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Bytes,\n            Bundles,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"bytes\" => Ok(GeneratedField::Bytes),\n                            \"bundles\" => Ok(GeneratedField::Bundles),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CounterInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CounterInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CounterInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut bytes__ = None;\n                let mut bundles__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Bytes => {\n                            if bytes__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"bytes\"));\n                            }\n                            bytes__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Bundles => {\n                            if bundles__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"bundles\"));\n                            }\n                            bundles__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(CounterInfo {\n                    bytes: bytes__.unwrap_or_default(),\n                    bundles: bundles__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CounterInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CreateWalletRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CreateWalletRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CreateWalletRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"password\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Password,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"password\" => Ok(GeneratedField::Password),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CreateWalletRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CreateWalletRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CreateWalletRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CreateWalletRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CreateWalletRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for CreateWalletResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.mnemonic.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.CreateWalletResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.mnemonic.is_empty() {\n            struct_ser.serialize_field(\"mnemonic\", &self.mnemonic)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for CreateWalletResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"mnemonic\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Mnemonic,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"mnemonic\" => Ok(GeneratedField::Mnemonic),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = CreateWalletResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.CreateWalletResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<CreateWalletResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut mnemonic__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Mnemonic => {\n                            if mnemonic__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"mnemonic\"));\n                            }\n                            mnemonic__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(CreateWalletResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    mnemonic: mnemonic__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.CreateWalletResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for DecodeRawTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.raw_transaction.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.DecodeRawTransactionRequest\", len)?;\n        if !self.raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"rawTransaction\", &self.raw_transaction)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for DecodeRawTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"raw_transaction\",\n            \"rawTransaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            RawTransaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"rawTransaction\" | \"raw_transaction\" => Ok(GeneratedField::RawTransaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = DecodeRawTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.DecodeRawTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DecodeRawTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut raw_transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::RawTransaction => {\n                            if raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"rawTransaction\"));\n                            }\n                            raw_transaction__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(DecodeRawTransactionRequest {\n                    raw_transaction: raw_transaction__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.DecodeRawTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for DecodeRawTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.transaction.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.DecodeRawTransactionResponse\", len)?;\n        if let Some(v) = self.transaction.as_ref() {\n            struct_ser.serialize_field(\"transaction\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for DecodeRawTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"transaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Transaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"transaction\" => Ok(GeneratedField::Transaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = DecodeRawTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.DecodeRawTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DecodeRawTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Transaction => {\n                            if transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"transaction\"));\n                            }\n                            transaction__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(DecodeRawTransactionResponse {\n                    transaction: transaction__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.DecodeRawTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for Direction {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Unknown => \"DIRECTION_UNKNOWN\",\n            Self::Inbound => \"DIRECTION_INBOUND\",\n            Self::Outbound => \"DIRECTION_OUTBOUND\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for Direction {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"DIRECTION_UNKNOWN\",\n            \"DIRECTION_INBOUND\",\n            \"DIRECTION_OUTBOUND\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = Direction;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"DIRECTION_UNKNOWN\" => Ok(Direction::Unknown),\n                    \"DIRECTION_INBOUND\" => Ok(Direction::Inbound),\n                    \"DIRECTION_OUTBOUND\" => Ok(Direction::Outbound),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetAccountRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetAccountRequest\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetAccountRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetAccountRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetAccountRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAccountRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetAccountRequest {\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetAccountRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetAccountResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.account.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetAccountResponse\", len)?;\n        if let Some(v) = self.account.as_ref() {\n            struct_ser.serialize_field(\"account\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetAccountResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"account\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Account,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"account\" => Ok(GeneratedField::Account),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetAccountResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetAccountResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAccountResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut account__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Account => {\n                            if account__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"account\"));\n                            }\n                            account__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetAccountResponse {\n                    account: account__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetAccountResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetAddressInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetAddressInfoRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetAddressInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetAddressInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetAddressInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAddressInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetAddressInfoRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetAddressInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetAddressInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.addr.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetAddressInfoResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if let Some(v) = self.addr.as_ref() {\n            struct_ser.serialize_field(\"addr\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetAddressInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"addr\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Addr,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"addr\" => Ok(GeneratedField::Addr),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetAddressInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetAddressInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAddressInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut addr__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Addr => {\n                            if addr__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addr\"));\n                            }\n                            addr__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetAddressInfoResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    addr: addr__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetAddressInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockHashRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.height != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockHashRequest\", len)?;\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockHashRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"height\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Height,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"height\" => Ok(GeneratedField::Height),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockHashRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockHashRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockHashRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut height__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetBlockHashRequest {\n                    height: height__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockHashRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockHashResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockHashResponse\", len)?;\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockHashResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"hash\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Hash,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockHashResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockHashResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockHashResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut hash__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetBlockHashResponse {\n                    hash: hash__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockHashResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockHeightRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockHeightRequest\", len)?;\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockHeightRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"hash\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Hash,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockHeightRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockHeightRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockHeightRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut hash__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetBlockHeightRequest {\n                    hash: hash__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockHeightRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockHeightResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.height != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockHeightResponse\", len)?;\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockHeightResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"height\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Height,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"height\" => Ok(GeneratedField::Height),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockHeightResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockHeightResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockHeightResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut height__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetBlockHeightResponse {\n                    height: height__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockHeightResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.height != 0 {\n            len += 1;\n        }\n        if self.verbosity != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockRequest\", len)?;\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        if self.verbosity != 0 {\n            let v = BlockVerbosity::try_from(self.verbosity)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.verbosity)))?;\n            struct_ser.serialize_field(\"verbosity\", &v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"height\",\n            \"verbosity\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Height,\n            Verbosity,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"height\" => Ok(GeneratedField::Height),\n                            \"verbosity\" => Ok(GeneratedField::Verbosity),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut height__ = None;\n                let mut verbosity__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Verbosity => {\n                            if verbosity__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"verbosity\"));\n                            }\n                            verbosity__ = Some(map_.next_value::<BlockVerbosity>()? as i32);\n                        }\n                    }\n                }\n                Ok(GetBlockRequest {\n                    height: height__.unwrap_or_default(),\n                    verbosity: verbosity__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.height != 0 {\n            len += 1;\n        }\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        if !self.data.is_empty() {\n            len += 1;\n        }\n        if self.block_time != 0 {\n            len += 1;\n        }\n        if self.header.is_some() {\n            len += 1;\n        }\n        if self.prev_cert.is_some() {\n            len += 1;\n        }\n        if !self.txs.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockResponse\", len)?;\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        if !self.data.is_empty() {\n            struct_ser.serialize_field(\"data\", &self.data)?;\n        }\n        if self.block_time != 0 {\n            struct_ser.serialize_field(\"blockTime\", &self.block_time)?;\n        }\n        if let Some(v) = self.header.as_ref() {\n            struct_ser.serialize_field(\"header\", v)?;\n        }\n        if let Some(v) = self.prev_cert.as_ref() {\n            struct_ser.serialize_field(\"prevCert\", v)?;\n        }\n        if !self.txs.is_empty() {\n            struct_ser.serialize_field(\"txs\", &self.txs)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"height\",\n            \"hash\",\n            \"data\",\n            \"block_time\",\n            \"blockTime\",\n            \"header\",\n            \"prev_cert\",\n            \"prevCert\",\n            \"txs\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Height,\n            Hash,\n            Data,\n            BlockTime,\n            Header,\n            PrevCert,\n            Txs,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"height\" => Ok(GeneratedField::Height),\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            \"data\" => Ok(GeneratedField::Data),\n                            \"blockTime\" | \"block_time\" => Ok(GeneratedField::BlockTime),\n                            \"header\" => Ok(GeneratedField::Header),\n                            \"prevCert\" | \"prev_cert\" => Ok(GeneratedField::PrevCert),\n                            \"txs\" => Ok(GeneratedField::Txs),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut height__ = None;\n                let mut hash__ = None;\n                let mut data__ = None;\n                let mut block_time__ = None;\n                let mut header__ = None;\n                let mut prev_cert__ = None;\n                let mut txs__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Data => {\n                            if data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"data\"));\n                            }\n                            data__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::BlockTime => {\n                            if block_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockTime\"));\n                            }\n                            block_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Header => {\n                            if header__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"header\"));\n                            }\n                            header__ = map_.next_value()?;\n                        }\n                        GeneratedField::PrevCert => {\n                            if prev_cert__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"prevCert\"));\n                            }\n                            prev_cert__ = map_.next_value()?;\n                        }\n                        GeneratedField::Txs => {\n                            if txs__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"txs\"));\n                            }\n                            txs__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetBlockResponse {\n                    height: height__.unwrap_or_default(),\n                    hash: hash__.unwrap_or_default(),\n                    data: data__.unwrap_or_default(),\n                    block_time: block_time__.unwrap_or_default(),\n                    header: header__,\n                    prev_cert: prev_cert__,\n                    txs: txs__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockchainInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetBlockchainInfoRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockchainInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockchainInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockchainInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockchainInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetBlockchainInfoRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockchainInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetBlockchainInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.last_block_height != 0 {\n            len += 1;\n        }\n        if !self.last_block_hash.is_empty() {\n            len += 1;\n        }\n        if self.last_block_time != 0 {\n            len += 1;\n        }\n        if self.total_accounts != 0 {\n            len += 1;\n        }\n        if self.total_validators != 0 {\n            len += 1;\n        }\n        if self.active_validators != 0 {\n            len += 1;\n        }\n        if self.total_power != 0 {\n            len += 1;\n        }\n        if self.committee_power != 0 {\n            len += 1;\n        }\n        if self.is_pruned {\n            len += 1;\n        }\n        if self.pruning_height != 0 {\n            len += 1;\n        }\n        if self.in_committee {\n            len += 1;\n        }\n        if self.committee_size != 0 {\n            len += 1;\n        }\n        if self.average_score != 0. {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetBlockchainInfoResponse\", len)?;\n        if self.last_block_height != 0 {\n            struct_ser.serialize_field(\"lastBlockHeight\", &self.last_block_height)?;\n        }\n        if !self.last_block_hash.is_empty() {\n            struct_ser.serialize_field(\"lastBlockHash\", &self.last_block_hash)?;\n        }\n        if self.last_block_time != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"lastBlockTime\", ToString::to_string(&self.last_block_time).as_str())?;\n        }\n        if self.total_accounts != 0 {\n            struct_ser.serialize_field(\"totalAccounts\", &self.total_accounts)?;\n        }\n        if self.total_validators != 0 {\n            struct_ser.serialize_field(\"totalValidators\", &self.total_validators)?;\n        }\n        if self.active_validators != 0 {\n            struct_ser.serialize_field(\"activeValidators\", &self.active_validators)?;\n        }\n        if self.total_power != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"totalPower\", ToString::to_string(&self.total_power).as_str())?;\n        }\n        if self.committee_power != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"committeePower\", ToString::to_string(&self.committee_power).as_str())?;\n        }\n        if self.is_pruned {\n            struct_ser.serialize_field(\"isPruned\", &self.is_pruned)?;\n        }\n        if self.pruning_height != 0 {\n            struct_ser.serialize_field(\"pruningHeight\", &self.pruning_height)?;\n        }\n        if self.in_committee {\n            struct_ser.serialize_field(\"inCommittee\", &self.in_committee)?;\n        }\n        if self.committee_size != 0 {\n            struct_ser.serialize_field(\"committeeSize\", &self.committee_size)?;\n        }\n        if self.average_score != 0. {\n            struct_ser.serialize_field(\"averageScore\", &self.average_score)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetBlockchainInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"last_block_height\",\n            \"lastBlockHeight\",\n            \"last_block_hash\",\n            \"lastBlockHash\",\n            \"last_block_time\",\n            \"lastBlockTime\",\n            \"total_accounts\",\n            \"totalAccounts\",\n            \"total_validators\",\n            \"totalValidators\",\n            \"active_validators\",\n            \"activeValidators\",\n            \"total_power\",\n            \"totalPower\",\n            \"committee_power\",\n            \"committeePower\",\n            \"is_pruned\",\n            \"isPruned\",\n            \"pruning_height\",\n            \"pruningHeight\",\n            \"in_committee\",\n            \"inCommittee\",\n            \"committee_size\",\n            \"committeeSize\",\n            \"average_score\",\n            \"averageScore\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LastBlockHeight,\n            LastBlockHash,\n            LastBlockTime,\n            TotalAccounts,\n            TotalValidators,\n            ActiveValidators,\n            TotalPower,\n            CommitteePower,\n            IsPruned,\n            PruningHeight,\n            InCommittee,\n            CommitteeSize,\n            AverageScore,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lastBlockHeight\" | \"last_block_height\" => Ok(GeneratedField::LastBlockHeight),\n                            \"lastBlockHash\" | \"last_block_hash\" => Ok(GeneratedField::LastBlockHash),\n                            \"lastBlockTime\" | \"last_block_time\" => Ok(GeneratedField::LastBlockTime),\n                            \"totalAccounts\" | \"total_accounts\" => Ok(GeneratedField::TotalAccounts),\n                            \"totalValidators\" | \"total_validators\" => Ok(GeneratedField::TotalValidators),\n                            \"activeValidators\" | \"active_validators\" => Ok(GeneratedField::ActiveValidators),\n                            \"totalPower\" | \"total_power\" => Ok(GeneratedField::TotalPower),\n                            \"committeePower\" | \"committee_power\" => Ok(GeneratedField::CommitteePower),\n                            \"isPruned\" | \"is_pruned\" => Ok(GeneratedField::IsPruned),\n                            \"pruningHeight\" | \"pruning_height\" => Ok(GeneratedField::PruningHeight),\n                            \"inCommittee\" | \"in_committee\" => Ok(GeneratedField::InCommittee),\n                            \"committeeSize\" | \"committee_size\" => Ok(GeneratedField::CommitteeSize),\n                            \"averageScore\" | \"average_score\" => Ok(GeneratedField::AverageScore),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetBlockchainInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetBlockchainInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBlockchainInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut last_block_height__ = None;\n                let mut last_block_hash__ = None;\n                let mut last_block_time__ = None;\n                let mut total_accounts__ = None;\n                let mut total_validators__ = None;\n                let mut active_validators__ = None;\n                let mut total_power__ = None;\n                let mut committee_power__ = None;\n                let mut is_pruned__ = None;\n                let mut pruning_height__ = None;\n                let mut in_committee__ = None;\n                let mut committee_size__ = None;\n                let mut average_score__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LastBlockHeight => {\n                            if last_block_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastBlockHeight\"));\n                            }\n                            last_block_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastBlockHash => {\n                            if last_block_hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastBlockHash\"));\n                            }\n                            last_block_hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::LastBlockTime => {\n                            if last_block_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastBlockTime\"));\n                            }\n                            last_block_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::TotalAccounts => {\n                            if total_accounts__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalAccounts\"));\n                            }\n                            total_accounts__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::TotalValidators => {\n                            if total_validators__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalValidators\"));\n                            }\n                            total_validators__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ActiveValidators => {\n                            if active_validators__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"activeValidators\"));\n                            }\n                            active_validators__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::TotalPower => {\n                            if total_power__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalPower\"));\n                            }\n                            total_power__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::CommitteePower => {\n                            if committee_power__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"committeePower\"));\n                            }\n                            committee_power__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::IsPruned => {\n                            if is_pruned__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"isPruned\"));\n                            }\n                            is_pruned__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PruningHeight => {\n                            if pruning_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"pruningHeight\"));\n                            }\n                            pruning_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::InCommittee => {\n                            if in_committee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"inCommittee\"));\n                            }\n                            in_committee__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::CommitteeSize => {\n                            if committee_size__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"committeeSize\"));\n                            }\n                            committee_size__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::AverageScore => {\n                            if average_score__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"averageScore\"));\n                            }\n                            average_score__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetBlockchainInfoResponse {\n                    last_block_height: last_block_height__.unwrap_or_default(),\n                    last_block_hash: last_block_hash__.unwrap_or_default(),\n                    last_block_time: last_block_time__.unwrap_or_default(),\n                    total_accounts: total_accounts__.unwrap_or_default(),\n                    total_validators: total_validators__.unwrap_or_default(),\n                    active_validators: active_validators__.unwrap_or_default(),\n                    total_power: total_power__.unwrap_or_default(),\n                    committee_power: committee_power__.unwrap_or_default(),\n                    is_pruned: is_pruned__.unwrap_or_default(),\n                    pruning_height: pruning_height__.unwrap_or_default(),\n                    in_committee: in_committee__.unwrap_or_default(),\n                    committee_size: committee_size__.unwrap_or_default(),\n                    average_score: average_score__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetBlockchainInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetCommitteeInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetCommitteeInfoRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetCommitteeInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetCommitteeInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetCommitteeInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCommitteeInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetCommitteeInfoRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetCommitteeInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetCommitteeInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.committee_size != 0 {\n            len += 1;\n        }\n        if self.committee_power != 0 {\n            len += 1;\n        }\n        if self.total_power != 0 {\n            len += 1;\n        }\n        if !self.validators.is_empty() {\n            len += 1;\n        }\n        if !self.protocol_versions.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetCommitteeInfoResponse\", len)?;\n        if self.committee_size != 0 {\n            struct_ser.serialize_field(\"committeeSize\", &self.committee_size)?;\n        }\n        if self.committee_power != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"committeePower\", ToString::to_string(&self.committee_power).as_str())?;\n        }\n        if self.total_power != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"totalPower\", ToString::to_string(&self.total_power).as_str())?;\n        }\n        if !self.validators.is_empty() {\n            struct_ser.serialize_field(\"validators\", &self.validators)?;\n        }\n        if !self.protocol_versions.is_empty() {\n            struct_ser.serialize_field(\"protocolVersions\", &self.protocol_versions)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetCommitteeInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"committee_size\",\n            \"committeeSize\",\n            \"committee_power\",\n            \"committeePower\",\n            \"total_power\",\n            \"totalPower\",\n            \"validators\",\n            \"protocol_versions\",\n            \"protocolVersions\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            CommitteeSize,\n            CommitteePower,\n            TotalPower,\n            Validators,\n            ProtocolVersions,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"committeeSize\" | \"committee_size\" => Ok(GeneratedField::CommitteeSize),\n                            \"committeePower\" | \"committee_power\" => Ok(GeneratedField::CommitteePower),\n                            \"totalPower\" | \"total_power\" => Ok(GeneratedField::TotalPower),\n                            \"validators\" => Ok(GeneratedField::Validators),\n                            \"protocolVersions\" | \"protocol_versions\" => Ok(GeneratedField::ProtocolVersions),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetCommitteeInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetCommitteeInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCommitteeInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut committee_size__ = None;\n                let mut committee_power__ = None;\n                let mut total_power__ = None;\n                let mut validators__ = None;\n                let mut protocol_versions__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::CommitteeSize => {\n                            if committee_size__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"committeeSize\"));\n                            }\n                            committee_size__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::CommitteePower => {\n                            if committee_power__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"committeePower\"));\n                            }\n                            committee_power__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::TotalPower => {\n                            if total_power__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalPower\"));\n                            }\n                            total_power__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Validators => {\n                            if validators__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validators\"));\n                            }\n                            validators__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ProtocolVersions => {\n                            if protocol_versions__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"protocolVersions\"));\n                            }\n                            protocol_versions__ = Some(\n                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<i32>, ::pbjson::private::NumberDeserialize<f64>>>()?\n                                    .into_iter().map(|(k,v)| (k.0, v.0)).collect()\n                            );\n                        }\n                    }\n                }\n                Ok(GetCommitteeInfoResponse {\n                    committee_size: committee_size__.unwrap_or_default(),\n                    committee_power: committee_power__.unwrap_or_default(),\n                    total_power: total_power__.unwrap_or_default(),\n                    validators: validators__.unwrap_or_default(),\n                    protocol_versions: protocol_versions__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetCommitteeInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetConsensusInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetConsensusInfoRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetConsensusInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetConsensusInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetConsensusInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetConsensusInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetConsensusInfoRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetConsensusInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetConsensusInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.proposal.is_some() {\n            len += 1;\n        }\n        if !self.instances.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetConsensusInfoResponse\", len)?;\n        if let Some(v) = self.proposal.as_ref() {\n            struct_ser.serialize_field(\"proposal\", v)?;\n        }\n        if !self.instances.is_empty() {\n            struct_ser.serialize_field(\"instances\", &self.instances)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"proposal\",\n            \"instances\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Proposal,\n            Instances,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"proposal\" => Ok(GeneratedField::Proposal),\n                            \"instances\" => Ok(GeneratedField::Instances),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetConsensusInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetConsensusInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetConsensusInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut proposal__ = None;\n                let mut instances__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Proposal => {\n                            if proposal__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"proposal\"));\n                            }\n                            proposal__ = map_.next_value()?;\n                        }\n                        GeneratedField::Instances => {\n                            if instances__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"instances\"));\n                            }\n                            instances__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetConsensusInfoResponse {\n                    proposal: proposal__,\n                    instances: instances__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetConsensusInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetMnemonicRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetMnemonicRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetMnemonicRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"password\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Password,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"password\" => Ok(GeneratedField::Password),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetMnemonicRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetMnemonicRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetMnemonicRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetMnemonicRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetMnemonicRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetMnemonicResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.mnemonic.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetMnemonicResponse\", len)?;\n        if !self.mnemonic.is_empty() {\n            struct_ser.serialize_field(\"mnemonic\", &self.mnemonic)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetMnemonicResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"mnemonic\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Mnemonic,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"mnemonic\" => Ok(GeneratedField::Mnemonic),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetMnemonicResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetMnemonicResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetMnemonicResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut mnemonic__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Mnemonic => {\n                            if mnemonic__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"mnemonic\"));\n                            }\n                            mnemonic__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetMnemonicResponse {\n                    mnemonic: mnemonic__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetMnemonicResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNetworkInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetNetworkInfoRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNetworkInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNetworkInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNetworkInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNetworkInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetNetworkInfoRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNetworkInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNetworkInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.network_name.is_empty() {\n            len += 1;\n        }\n        if self.connected_peers_count != 0 {\n            len += 1;\n        }\n        if self.metric_info.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetNetworkInfoResponse\", len)?;\n        if !self.network_name.is_empty() {\n            struct_ser.serialize_field(\"networkName\", &self.network_name)?;\n        }\n        if self.connected_peers_count != 0 {\n            struct_ser.serialize_field(\"connectedPeersCount\", &self.connected_peers_count)?;\n        }\n        if let Some(v) = self.metric_info.as_ref() {\n            struct_ser.serialize_field(\"metricInfo\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNetworkInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"network_name\",\n            \"networkName\",\n            \"connected_peers_count\",\n            \"connectedPeersCount\",\n            \"metric_info\",\n            \"metricInfo\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            NetworkName,\n            ConnectedPeersCount,\n            MetricInfo,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"networkName\" | \"network_name\" => Ok(GeneratedField::NetworkName),\n                            \"connectedPeersCount\" | \"connected_peers_count\" => Ok(GeneratedField::ConnectedPeersCount),\n                            \"metricInfo\" | \"metric_info\" => Ok(GeneratedField::MetricInfo),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNetworkInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNetworkInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNetworkInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut network_name__ = None;\n                let mut connected_peers_count__ = None;\n                let mut metric_info__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::NetworkName => {\n                            if network_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"networkName\"));\n                            }\n                            network_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ConnectedPeersCount => {\n                            if connected_peers_count__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"connectedPeersCount\"));\n                            }\n                            connected_peers_count__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::MetricInfo => {\n                            if metric_info__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"metricInfo\"));\n                            }\n                            metric_info__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetNetworkInfoResponse {\n                    network_name: network_name__.unwrap_or_default(),\n                    connected_peers_count: connected_peers_count__.unwrap_or_default(),\n                    metric_info: metric_info__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNetworkInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNewAddressRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.address_type != 0 {\n            len += 1;\n        }\n        if !self.label.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetNewAddressRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if self.address_type != 0 {\n            let v = AddressType::try_from(self.address_type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.address_type)))?;\n            struct_ser.serialize_field(\"addressType\", &v)?;\n        }\n        if !self.label.is_empty() {\n            struct_ser.serialize_field(\"label\", &self.label)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNewAddressRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"address_type\",\n            \"addressType\",\n            \"label\",\n            \"password\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            AddressType,\n            Label,\n            Password,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"addressType\" | \"address_type\" => Ok(GeneratedField::AddressType),\n                            \"label\" => Ok(GeneratedField::Label),\n                            \"password\" => Ok(GeneratedField::Password),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNewAddressRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNewAddressRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNewAddressRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut address_type__ = None;\n                let mut label__ = None;\n                let mut password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::AddressType => {\n                            if address_type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addressType\"));\n                            }\n                            address_type__ = Some(map_.next_value::<AddressType>()? as i32);\n                        }\n                        GeneratedField::Label => {\n                            if label__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"label\"));\n                            }\n                            label__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetNewAddressRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    address_type: address_type__.unwrap_or_default(),\n                    label: label__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNewAddressRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNewAddressResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.addr.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetNewAddressResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if let Some(v) = self.addr.as_ref() {\n            struct_ser.serialize_field(\"addr\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNewAddressResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"addr\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Addr,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"addr\" => Ok(GeneratedField::Addr),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNewAddressResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNewAddressResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNewAddressResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut addr__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Addr => {\n                            if addr__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addr\"));\n                            }\n                            addr__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetNewAddressResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    addr: addr__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNewAddressResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNodeInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetNodeInfoRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNodeInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNodeInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNodeInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNodeInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetNodeInfoRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNodeInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetNodeInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.moniker.is_empty() {\n            len += 1;\n        }\n        if !self.agent.is_empty() {\n            len += 1;\n        }\n        if !self.peer_id.is_empty() {\n            len += 1;\n        }\n        if self.started_at != 0 {\n            len += 1;\n        }\n        if !self.reachability.is_empty() {\n            len += 1;\n        }\n        if self.services != 0 {\n            len += 1;\n        }\n        if !self.services_names.is_empty() {\n            len += 1;\n        }\n        if !self.local_addrs.is_empty() {\n            len += 1;\n        }\n        if !self.protocols.is_empty() {\n            len += 1;\n        }\n        if self.clock_offset != 0. {\n            len += 1;\n        }\n        if self.connection_info.is_some() {\n            len += 1;\n        }\n        if !self.zmq_publishers.is_empty() {\n            len += 1;\n        }\n        if self.current_time != 0 {\n            len += 1;\n        }\n        if !self.network_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetNodeInfoResponse\", len)?;\n        if !self.moniker.is_empty() {\n            struct_ser.serialize_field(\"moniker\", &self.moniker)?;\n        }\n        if !self.agent.is_empty() {\n            struct_ser.serialize_field(\"agent\", &self.agent)?;\n        }\n        if !self.peer_id.is_empty() {\n            struct_ser.serialize_field(\"peerId\", &self.peer_id)?;\n        }\n        if self.started_at != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"startedAt\", ToString::to_string(&self.started_at).as_str())?;\n        }\n        if !self.reachability.is_empty() {\n            struct_ser.serialize_field(\"reachability\", &self.reachability)?;\n        }\n        if self.services != 0 {\n            struct_ser.serialize_field(\"services\", &self.services)?;\n        }\n        if !self.services_names.is_empty() {\n            struct_ser.serialize_field(\"servicesNames\", &self.services_names)?;\n        }\n        if !self.local_addrs.is_empty() {\n            struct_ser.serialize_field(\"localAddrs\", &self.local_addrs)?;\n        }\n        if !self.protocols.is_empty() {\n            struct_ser.serialize_field(\"protocols\", &self.protocols)?;\n        }\n        if self.clock_offset != 0. {\n            struct_ser.serialize_field(\"clockOffset\", &self.clock_offset)?;\n        }\n        if let Some(v) = self.connection_info.as_ref() {\n            struct_ser.serialize_field(\"connectionInfo\", v)?;\n        }\n        if !self.zmq_publishers.is_empty() {\n            struct_ser.serialize_field(\"zmqPublishers\", &self.zmq_publishers)?;\n        }\n        if self.current_time != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"currentTime\", ToString::to_string(&self.current_time).as_str())?;\n        }\n        if !self.network_name.is_empty() {\n            struct_ser.serialize_field(\"networkName\", &self.network_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetNodeInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"moniker\",\n            \"agent\",\n            \"peer_id\",\n            \"peerId\",\n            \"started_at\",\n            \"startedAt\",\n            \"reachability\",\n            \"services\",\n            \"services_names\",\n            \"servicesNames\",\n            \"local_addrs\",\n            \"localAddrs\",\n            \"protocols\",\n            \"clock_offset\",\n            \"clockOffset\",\n            \"connection_info\",\n            \"connectionInfo\",\n            \"zmq_publishers\",\n            \"zmqPublishers\",\n            \"current_time\",\n            \"currentTime\",\n            \"network_name\",\n            \"networkName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Moniker,\n            Agent,\n            PeerId,\n            StartedAt,\n            Reachability,\n            Services,\n            ServicesNames,\n            LocalAddrs,\n            Protocols,\n            ClockOffset,\n            ConnectionInfo,\n            ZmqPublishers,\n            CurrentTime,\n            NetworkName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"moniker\" => Ok(GeneratedField::Moniker),\n                            \"agent\" => Ok(GeneratedField::Agent),\n                            \"peerId\" | \"peer_id\" => Ok(GeneratedField::PeerId),\n                            \"startedAt\" | \"started_at\" => Ok(GeneratedField::StartedAt),\n                            \"reachability\" => Ok(GeneratedField::Reachability),\n                            \"services\" => Ok(GeneratedField::Services),\n                            \"servicesNames\" | \"services_names\" => Ok(GeneratedField::ServicesNames),\n                            \"localAddrs\" | \"local_addrs\" => Ok(GeneratedField::LocalAddrs),\n                            \"protocols\" => Ok(GeneratedField::Protocols),\n                            \"clockOffset\" | \"clock_offset\" => Ok(GeneratedField::ClockOffset),\n                            \"connectionInfo\" | \"connection_info\" => Ok(GeneratedField::ConnectionInfo),\n                            \"zmqPublishers\" | \"zmq_publishers\" => Ok(GeneratedField::ZmqPublishers),\n                            \"currentTime\" | \"current_time\" => Ok(GeneratedField::CurrentTime),\n                            \"networkName\" | \"network_name\" => Ok(GeneratedField::NetworkName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetNodeInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetNodeInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetNodeInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut moniker__ = None;\n                let mut agent__ = None;\n                let mut peer_id__ = None;\n                let mut started_at__ = None;\n                let mut reachability__ = None;\n                let mut services__ = None;\n                let mut services_names__ = None;\n                let mut local_addrs__ = None;\n                let mut protocols__ = None;\n                let mut clock_offset__ = None;\n                let mut connection_info__ = None;\n                let mut zmq_publishers__ = None;\n                let mut current_time__ = None;\n                let mut network_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Moniker => {\n                            if moniker__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"moniker\"));\n                            }\n                            moniker__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Agent => {\n                            if agent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"agent\"));\n                            }\n                            agent__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PeerId => {\n                            if peer_id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"peerId\"));\n                            }\n                            peer_id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::StartedAt => {\n                            if started_at__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"startedAt\"));\n                            }\n                            started_at__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Reachability => {\n                            if reachability__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"reachability\"));\n                            }\n                            reachability__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Services => {\n                            if services__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"services\"));\n                            }\n                            services__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ServicesNames => {\n                            if services_names__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"servicesNames\"));\n                            }\n                            services_names__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::LocalAddrs => {\n                            if local_addrs__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"localAddrs\"));\n                            }\n                            local_addrs__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Protocols => {\n                            if protocols__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"protocols\"));\n                            }\n                            protocols__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ClockOffset => {\n                            if clock_offset__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"clockOffset\"));\n                            }\n                            clock_offset__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ConnectionInfo => {\n                            if connection_info__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"connectionInfo\"));\n                            }\n                            connection_info__ = map_.next_value()?;\n                        }\n                        GeneratedField::ZmqPublishers => {\n                            if zmq_publishers__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"zmqPublishers\"));\n                            }\n                            zmq_publishers__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::CurrentTime => {\n                            if current_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"currentTime\"));\n                            }\n                            current_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::NetworkName => {\n                            if network_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"networkName\"));\n                            }\n                            network_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetNodeInfoResponse {\n                    moniker: moniker__.unwrap_or_default(),\n                    agent: agent__.unwrap_or_default(),\n                    peer_id: peer_id__.unwrap_or_default(),\n                    started_at: started_at__.unwrap_or_default(),\n                    reachability: reachability__.unwrap_or_default(),\n                    services: services__.unwrap_or_default(),\n                    services_names: services_names__.unwrap_or_default(),\n                    local_addrs: local_addrs__.unwrap_or_default(),\n                    protocols: protocols__.unwrap_or_default(),\n                    clock_offset: clock_offset__.unwrap_or_default(),\n                    connection_info: connection_info__,\n                    zmq_publishers: zmq_publishers__.unwrap_or_default(),\n                    current_time: current_time__.unwrap_or_default(),\n                    network_name: network_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetNodeInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetPrivateKeyRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetPrivateKeyRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetPrivateKeyRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"password\",\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Password,\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"password\" => Ok(GeneratedField::Password),\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetPrivateKeyRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetPrivateKeyRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetPrivateKeyRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut password__ = None;\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetPrivateKeyRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetPrivateKeyRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetPrivateKeyResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.private_key.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetPrivateKeyResponse\", len)?;\n        if !self.private_key.is_empty() {\n            struct_ser.serialize_field(\"privateKey\", &self.private_key)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetPrivateKeyResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"private_key\",\n            \"privateKey\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PrivateKey,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"privateKey\" | \"private_key\" => Ok(GeneratedField::PrivateKey),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetPrivateKeyResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetPrivateKeyResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetPrivateKeyResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut private_key__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PrivateKey => {\n                            if private_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"privateKey\"));\n                            }\n                            private_key__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetPrivateKeyResponse {\n                    private_key: private_key__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetPrivateKeyResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetPublicKeyRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetPublicKeyRequest\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetPublicKeyRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetPublicKeyRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetPublicKeyRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetPublicKeyRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetPublicKeyRequest {\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetPublicKeyRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetPublicKeyResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetPublicKeyResponse\", len)?;\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetPublicKeyResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"public_key\",\n            \"publicKey\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PublicKey,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetPublicKeyResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetPublicKeyResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetPublicKeyResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut public_key__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetPublicKeyResponse {\n                    public_key: public_key__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetPublicKeyResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawBatchTransferTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.recipients.is_empty() {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawBatchTransferTransactionRequest\", len)?;\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.recipients.is_empty() {\n            struct_ser.serialize_field(\"recipients\", &self.recipients)?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawBatchTransferTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"lock_time\",\n            \"lockTime\",\n            \"sender\",\n            \"recipients\",\n            \"fee\",\n            \"memo\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LockTime,\n            Sender,\n            Recipients,\n            Fee,\n            Memo,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"recipients\" => Ok(GeneratedField::Recipients),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawBatchTransferTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawBatchTransferTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawBatchTransferTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut lock_time__ = None;\n                let mut sender__ = None;\n                let mut recipients__ = None;\n                let mut fee__ = None;\n                let mut memo__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Recipients => {\n                            if recipients__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"recipients\"));\n                            }\n                            recipients__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetRawBatchTransferTransactionRequest {\n                    lock_time: lock_time__.unwrap_or_default(),\n                    sender: sender__.unwrap_or_default(),\n                    recipients: recipients__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawBatchTransferTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawBondTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.stake != 0 {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        if !self.delegate_owner.is_empty() {\n            len += 1;\n        }\n        if self.delegate_share != 0 {\n            len += 1;\n        }\n        if self.delegate_expiry != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawBondTransactionRequest\", len)?;\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.stake != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"stake\", ToString::to_string(&self.stake).as_str())?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        if !self.delegate_owner.is_empty() {\n            struct_ser.serialize_field(\"delegateOwner\", &self.delegate_owner)?;\n        }\n        if self.delegate_share != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"delegateShare\", ToString::to_string(&self.delegate_share).as_str())?;\n        }\n        if self.delegate_expiry != 0 {\n            struct_ser.serialize_field(\"delegateExpiry\", &self.delegate_expiry)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"lock_time\",\n            \"lockTime\",\n            \"sender\",\n            \"receiver\",\n            \"stake\",\n            \"public_key\",\n            \"publicKey\",\n            \"fee\",\n            \"memo\",\n            \"delegate_owner\",\n            \"delegateOwner\",\n            \"delegate_share\",\n            \"delegateShare\",\n            \"delegate_expiry\",\n            \"delegateExpiry\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LockTime,\n            Sender,\n            Receiver,\n            Stake,\n            PublicKey,\n            Fee,\n            Memo,\n            DelegateOwner,\n            DelegateShare,\n            DelegateExpiry,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"stake\" => Ok(GeneratedField::Stake),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            \"delegateOwner\" | \"delegate_owner\" => Ok(GeneratedField::DelegateOwner),\n                            \"delegateShare\" | \"delegate_share\" => Ok(GeneratedField::DelegateShare),\n                            \"delegateExpiry\" | \"delegate_expiry\" => Ok(GeneratedField::DelegateExpiry),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawBondTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawBondTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawBondTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut lock_time__ = None;\n                let mut sender__ = None;\n                let mut receiver__ = None;\n                let mut stake__ = None;\n                let mut public_key__ = None;\n                let mut fee__ = None;\n                let mut memo__ = None;\n                let mut delegate_owner__ = None;\n                let mut delegate_share__ = None;\n                let mut delegate_expiry__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Stake => {\n                            if stake__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"stake\"));\n                            }\n                            stake__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateOwner => {\n                            if delegate_owner__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateOwner\"));\n                            }\n                            delegate_owner__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateShare => {\n                            if delegate_share__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateShare\"));\n                            }\n                            delegate_share__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::DelegateExpiry => {\n                            if delegate_expiry__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateExpiry\"));\n                            }\n                            delegate_expiry__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetRawBondTransactionRequest {\n                    lock_time: lock_time__.unwrap_or_default(),\n                    sender: sender__.unwrap_or_default(),\n                    receiver: receiver__.unwrap_or_default(),\n                    stake: stake__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                    delegate_owner: delegate_owner__.unwrap_or_default(),\n                    delegate_share: delegate_share__.unwrap_or_default(),\n                    delegate_expiry: delegate_expiry__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawBondTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.raw_transaction.is_empty() {\n            len += 1;\n        }\n        if !self.id.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawTransactionResponse\", len)?;\n        if !self.raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"rawTransaction\", &self.raw_transaction)?;\n        }\n        if !self.id.is_empty() {\n            struct_ser.serialize_field(\"id\", &self.id)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"raw_transaction\",\n            \"rawTransaction\",\n            \"id\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            RawTransaction,\n            Id,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"rawTransaction\" | \"raw_transaction\" => Ok(GeneratedField::RawTransaction),\n                            \"id\" => Ok(GeneratedField::Id),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut raw_transaction__ = None;\n                let mut id__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::RawTransaction => {\n                            if raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"rawTransaction\"));\n                            }\n                            raw_transaction__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Id => {\n                            if id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"id\"));\n                            }\n                            id__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetRawTransactionResponse {\n                    raw_transaction: raw_transaction__.unwrap_or_default(),\n                    id: id__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawTransferTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawTransferTransactionRequest\", len)?;\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"lock_time\",\n            \"lockTime\",\n            \"sender\",\n            \"receiver\",\n            \"amount\",\n            \"fee\",\n            \"memo\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LockTime,\n            Sender,\n            Receiver,\n            Amount,\n            Fee,\n            Memo,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawTransferTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawTransferTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawTransferTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut lock_time__ = None;\n                let mut sender__ = None;\n                let mut receiver__ = None;\n                let mut amount__ = None;\n                let mut fee__ = None;\n                let mut memo__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetRawTransferTransactionRequest {\n                    lock_time: lock_time__.unwrap_or_default(),\n                    sender: sender__.unwrap_or_default(),\n                    receiver: receiver__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawTransferTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawUnbondTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if !self.validator_address.is_empty() {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        if !self.delegate_owner.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawUnbondTransactionRequest\", len)?;\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if !self.validator_address.is_empty() {\n            struct_ser.serialize_field(\"validatorAddress\", &self.validator_address)?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        if !self.delegate_owner.is_empty() {\n            struct_ser.serialize_field(\"delegateOwner\", &self.delegate_owner)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"lock_time\",\n            \"lockTime\",\n            \"validator_address\",\n            \"validatorAddress\",\n            \"memo\",\n            \"delegate_owner\",\n            \"delegateOwner\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LockTime,\n            ValidatorAddress,\n            Memo,\n            DelegateOwner,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"validatorAddress\" | \"validator_address\" => Ok(GeneratedField::ValidatorAddress),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            \"delegateOwner\" | \"delegate_owner\" => Ok(GeneratedField::DelegateOwner),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawUnbondTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawUnbondTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawUnbondTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut lock_time__ = None;\n                let mut validator_address__ = None;\n                let mut memo__ = None;\n                let mut delegate_owner__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ValidatorAddress => {\n                            if validator_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validatorAddress\"));\n                            }\n                            validator_address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateOwner => {\n                            if delegate_owner__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateOwner\"));\n                            }\n                            delegate_owner__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetRawUnbondTransactionRequest {\n                    lock_time: lock_time__.unwrap_or_default(),\n                    validator_address: validator_address__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                    delegate_owner: delegate_owner__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawUnbondTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetRawWithdrawTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if !self.validator_address.is_empty() {\n            len += 1;\n        }\n        if !self.account_address.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetRawWithdrawTransactionRequest\", len)?;\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if !self.validator_address.is_empty() {\n            struct_ser.serialize_field(\"validatorAddress\", &self.validator_address)?;\n        }\n        if !self.account_address.is_empty() {\n            struct_ser.serialize_field(\"accountAddress\", &self.account_address)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"lock_time\",\n            \"lockTime\",\n            \"validator_address\",\n            \"validatorAddress\",\n            \"account_address\",\n            \"accountAddress\",\n            \"amount\",\n            \"fee\",\n            \"memo\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            LockTime,\n            ValidatorAddress,\n            AccountAddress,\n            Amount,\n            Fee,\n            Memo,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"validatorAddress\" | \"validator_address\" => Ok(GeneratedField::ValidatorAddress),\n                            \"accountAddress\" | \"account_address\" => Ok(GeneratedField::AccountAddress),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetRawWithdrawTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetRawWithdrawTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetRawWithdrawTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut lock_time__ = None;\n                let mut validator_address__ = None;\n                let mut account_address__ = None;\n                let mut amount__ = None;\n                let mut fee__ = None;\n                let mut memo__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ValidatorAddress => {\n                            if validator_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validatorAddress\"));\n                            }\n                            validator_address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::AccountAddress => {\n                            if account_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"accountAddress\"));\n                            }\n                            account_address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetRawWithdrawTransactionRequest {\n                    lock_time: lock_time__.unwrap_or_default(),\n                    validator_address: validator_address__.unwrap_or_default(),\n                    account_address: account_address__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetRawWithdrawTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTotalBalanceRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTotalBalanceRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTotalBalanceRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTotalBalanceRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTotalBalanceRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTotalBalanceRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetTotalBalanceRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTotalBalanceRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTotalBalanceResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.total_balance != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTotalBalanceResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if self.total_balance != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"totalBalance\", ToString::to_string(&self.total_balance).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTotalBalanceResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"total_balance\",\n            \"totalBalance\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            TotalBalance,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"totalBalance\" | \"total_balance\" => Ok(GeneratedField::TotalBalance),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTotalBalanceResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTotalBalanceResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTotalBalanceResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut total_balance__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::TotalBalance => {\n                            if total_balance__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalBalance\"));\n                            }\n                            total_balance__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetTotalBalanceResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    total_balance: total_balance__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTotalBalanceResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTotalStakeRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTotalStakeRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTotalStakeRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTotalStakeRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTotalStakeRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTotalStakeRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetTotalStakeRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTotalStakeRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTotalStakeResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.total_stake != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTotalStakeResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if self.total_stake != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"totalStake\", ToString::to_string(&self.total_stake).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTotalStakeResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"total_stake\",\n            \"totalStake\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            TotalStake,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"totalStake\" | \"total_stake\" => Ok(GeneratedField::TotalStake),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTotalStakeResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTotalStakeResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTotalStakeResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut total_stake__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::TotalStake => {\n                            if total_stake__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalStake\"));\n                            }\n                            total_stake__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetTotalStakeResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    total_stake: total_stake__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTotalStakeResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.id.is_empty() {\n            len += 1;\n        }\n        if self.verbosity != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTransactionRequest\", len)?;\n        if !self.id.is_empty() {\n            struct_ser.serialize_field(\"id\", &self.id)?;\n        }\n        if self.verbosity != 0 {\n            let v = TransactionVerbosity::try_from(self.verbosity)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.verbosity)))?;\n            struct_ser.serialize_field(\"verbosity\", &v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"id\",\n            \"verbosity\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Id,\n            Verbosity,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"id\" => Ok(GeneratedField::Id),\n                            \"verbosity\" => Ok(GeneratedField::Verbosity),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut id__ = None;\n                let mut verbosity__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Id => {\n                            if id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"id\"));\n                            }\n                            id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Verbosity => {\n                            if verbosity__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"verbosity\"));\n                            }\n                            verbosity__ = Some(map_.next_value::<TransactionVerbosity>()? as i32);\n                        }\n                    }\n                }\n                Ok(GetTransactionRequest {\n                    id: id__.unwrap_or_default(),\n                    verbosity: verbosity__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.block_height != 0 {\n            len += 1;\n        }\n        if self.block_time != 0 {\n            len += 1;\n        }\n        if self.transaction.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTransactionResponse\", len)?;\n        if self.block_height != 0 {\n            struct_ser.serialize_field(\"blockHeight\", &self.block_height)?;\n        }\n        if self.block_time != 0 {\n            struct_ser.serialize_field(\"blockTime\", &self.block_time)?;\n        }\n        if let Some(v) = self.transaction.as_ref() {\n            struct_ser.serialize_field(\"transaction\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"block_height\",\n            \"blockHeight\",\n            \"block_time\",\n            \"blockTime\",\n            \"transaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            BlockHeight,\n            BlockTime,\n            Transaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"blockHeight\" | \"block_height\" => Ok(GeneratedField::BlockHeight),\n                            \"blockTime\" | \"block_time\" => Ok(GeneratedField::BlockTime),\n                            \"transaction\" => Ok(GeneratedField::Transaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut block_height__ = None;\n                let mut block_time__ = None;\n                let mut transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::BlockHeight => {\n                            if block_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockHeight\"));\n                            }\n                            block_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::BlockTime => {\n                            if block_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockTime\"));\n                            }\n                            block_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Transaction => {\n                            if transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"transaction\"));\n                            }\n                            transaction__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetTransactionResponse {\n                    block_height: block_height__.unwrap_or_default(),\n                    block_time: block_time__.unwrap_or_default(),\n                    transaction: transaction__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTxPoolContentRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.payload_type != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTxPoolContentRequest\", len)?;\n        if self.payload_type != 0 {\n            let v = PayloadType::try_from(self.payload_type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.payload_type)))?;\n            struct_ser.serialize_field(\"payloadType\", &v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTxPoolContentRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"payload_type\",\n            \"payloadType\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PayloadType,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"payloadType\" | \"payload_type\" => Ok(GeneratedField::PayloadType),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTxPoolContentRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTxPoolContentRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTxPoolContentRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut payload_type__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PayloadType => {\n                            if payload_type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"payloadType\"));\n                            }\n                            payload_type__ = Some(map_.next_value::<PayloadType>()? as i32);\n                        }\n                    }\n                }\n                Ok(GetTxPoolContentRequest {\n                    payload_type: payload_type__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTxPoolContentRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetTxPoolContentResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.txs.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetTxPoolContentResponse\", len)?;\n        if !self.txs.is_empty() {\n            struct_ser.serialize_field(\"txs\", &self.txs)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetTxPoolContentResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"txs\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Txs,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"txs\" => Ok(GeneratedField::Txs),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetTxPoolContentResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetTxPoolContentResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetTxPoolContentResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut txs__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Txs => {\n                            if txs__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"txs\"));\n                            }\n                            txs__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetTxPoolContentResponse {\n                    txs: txs__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetTxPoolContentResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorAddressRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorAddressRequest\", len)?;\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorAddressRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"public_key\",\n            \"publicKey\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PublicKey,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorAddressRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorAddressRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorAddressRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut public_key__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetValidatorAddressRequest {\n                    public_key: public_key__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorAddressRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorAddressResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorAddressResponse\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorAddressResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorAddressResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorAddressResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorAddressResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetValidatorAddressResponse {\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorAddressResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorAddressesRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.GetValidatorAddressesRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorAddressesRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorAddressesRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorAddressesRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorAddressesRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(GetValidatorAddressesRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorAddressesRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorAddressesResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.addresses.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorAddressesResponse\", len)?;\n        if !self.addresses.is_empty() {\n            struct_ser.serialize_field(\"addresses\", &self.addresses)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorAddressesResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"addresses\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Addresses,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"addresses\" => Ok(GeneratedField::Addresses),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorAddressesResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorAddressesResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorAddressesResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut addresses__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Addresses => {\n                            if addresses__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addresses\"));\n                            }\n                            addresses__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetValidatorAddressesResponse {\n                    addresses: addresses__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorAddressesResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorByNumberRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.number != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorByNumberRequest\", len)?;\n        if self.number != 0 {\n            struct_ser.serialize_field(\"number\", &self.number)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorByNumberRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"number\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Number,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"number\" => Ok(GeneratedField::Number),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorByNumberRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorByNumberRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorByNumberRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut number__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Number => {\n                            if number__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"number\"));\n                            }\n                            number__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(GetValidatorByNumberRequest {\n                    number: number__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorByNumberRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorRequest\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetValidatorRequest {\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetValidatorResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.validator.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetValidatorResponse\", len)?;\n        if let Some(v) = self.validator.as_ref() {\n            struct_ser.serialize_field(\"validator\", v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetValidatorResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"validator\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Validator,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"validator\" => Ok(GeneratedField::Validator),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetValidatorResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetValidatorResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut validator__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Validator => {\n                            if validator__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validator\"));\n                            }\n                            validator__ = map_.next_value()?;\n                        }\n                    }\n                }\n                Ok(GetValidatorResponse {\n                    validator: validator__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetValidatorResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetWalletInfoRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetWalletInfoRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetWalletInfoRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetWalletInfoRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetWalletInfoRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetWalletInfoRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetWalletInfoRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetWalletInfoRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for GetWalletInfoResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.version != 0 {\n            len += 1;\n        }\n        if !self.network.is_empty() {\n            len += 1;\n        }\n        if self.encrypted {\n            len += 1;\n        }\n        if !self.uuid.is_empty() {\n            len += 1;\n        }\n        if self.created_at != 0 {\n            len += 1;\n        }\n        if self.default_fee != 0 {\n            len += 1;\n        }\n        if !self.driver.is_empty() {\n            len += 1;\n        }\n        if !self.path.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.GetWalletInfoResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if self.version != 0 {\n            struct_ser.serialize_field(\"version\", &self.version)?;\n        }\n        if !self.network.is_empty() {\n            struct_ser.serialize_field(\"network\", &self.network)?;\n        }\n        if self.encrypted {\n            struct_ser.serialize_field(\"encrypted\", &self.encrypted)?;\n        }\n        if !self.uuid.is_empty() {\n            struct_ser.serialize_field(\"uuid\", &self.uuid)?;\n        }\n        if self.created_at != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"createdAt\", ToString::to_string(&self.created_at).as_str())?;\n        }\n        if self.default_fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"defaultFee\", ToString::to_string(&self.default_fee).as_str())?;\n        }\n        if !self.driver.is_empty() {\n            struct_ser.serialize_field(\"driver\", &self.driver)?;\n        }\n        if !self.path.is_empty() {\n            struct_ser.serialize_field(\"path\", &self.path)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for GetWalletInfoResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"version\",\n            \"network\",\n            \"encrypted\",\n            \"uuid\",\n            \"created_at\",\n            \"createdAt\",\n            \"default_fee\",\n            \"defaultFee\",\n            \"driver\",\n            \"path\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Version,\n            Network,\n            Encrypted,\n            Uuid,\n            CreatedAt,\n            DefaultFee,\n            Driver,\n            Path,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"version\" => Ok(GeneratedField::Version),\n                            \"network\" => Ok(GeneratedField::Network),\n                            \"encrypted\" => Ok(GeneratedField::Encrypted),\n                            \"uuid\" => Ok(GeneratedField::Uuid),\n                            \"createdAt\" | \"created_at\" => Ok(GeneratedField::CreatedAt),\n                            \"defaultFee\" | \"default_fee\" => Ok(GeneratedField::DefaultFee),\n                            \"driver\" => Ok(GeneratedField::Driver),\n                            \"path\" => Ok(GeneratedField::Path),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = GetWalletInfoResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.GetWalletInfoResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetWalletInfoResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut version__ = None;\n                let mut network__ = None;\n                let mut encrypted__ = None;\n                let mut uuid__ = None;\n                let mut created_at__ = None;\n                let mut default_fee__ = None;\n                let mut driver__ = None;\n                let mut path__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Version => {\n                            if version__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"version\"));\n                            }\n                            version__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Network => {\n                            if network__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"network\"));\n                            }\n                            network__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Encrypted => {\n                            if encrypted__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"encrypted\"));\n                            }\n                            encrypted__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Uuid => {\n                            if uuid__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"uuid\"));\n                            }\n                            uuid__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::CreatedAt => {\n                            if created_at__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"createdAt\"));\n                            }\n                            created_at__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::DefaultFee => {\n                            if default_fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"defaultFee\"));\n                            }\n                            default_fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Driver => {\n                            if driver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"driver\"));\n                            }\n                            driver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Path => {\n                            if path__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"path\"));\n                            }\n                            path__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(GetWalletInfoResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    version: version__.unwrap_or_default(),\n                    network: network__.unwrap_or_default(),\n                    encrypted: encrypted__.unwrap_or_default(),\n                    uuid: uuid__.unwrap_or_default(),\n                    created_at: created_at__.unwrap_or_default(),\n                    default_fee: default_fee__.unwrap_or_default(),\n                    driver: driver__.unwrap_or_default(),\n                    path: path__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.GetWalletInfoResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListAddressesRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.address_types.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListAddressesRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.address_types.is_empty() {\n            let v = self.address_types.iter().cloned().map(|v| {\n                AddressType::try_from(v)\n                    .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", v)))\n                }).collect::<std::result::Result<Vec<_>, _>>()?;\n            struct_ser.serialize_field(\"addressTypes\", &v)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListAddressesRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"address_types\",\n            \"addressTypes\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            AddressTypes,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"addressTypes\" | \"address_types\" => Ok(GeneratedField::AddressTypes),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListAddressesRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListAddressesRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListAddressesRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut address_types__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::AddressTypes => {\n                            if address_types__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addressTypes\"));\n                            }\n                            address_types__ = Some(map_.next_value::<Vec<AddressType>>()?.into_iter().map(|x| x as i32).collect());\n                        }\n                    }\n                }\n                Ok(ListAddressesRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    address_types: address_types__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListAddressesRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListAddressesResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.addrs.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListAddressesResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.addrs.is_empty() {\n            struct_ser.serialize_field(\"addrs\", &self.addrs)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListAddressesResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"addrs\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Addrs,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"addrs\" => Ok(GeneratedField::Addrs),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListAddressesResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListAddressesResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListAddressesResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut addrs__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Addrs => {\n                            if addrs__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"addrs\"));\n                            }\n                            addrs__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ListAddressesResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    addrs: addrs__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListAddressesResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListPeersRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.include_disconnected {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListPeersRequest\", len)?;\n        if self.include_disconnected {\n            struct_ser.serialize_field(\"includeDisconnected\", &self.include_disconnected)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListPeersRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"include_disconnected\",\n            \"includeDisconnected\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            IncludeDisconnected,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"includeDisconnected\" | \"include_disconnected\" => Ok(GeneratedField::IncludeDisconnected),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListPeersRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListPeersRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListPeersRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut include_disconnected__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::IncludeDisconnected => {\n                            if include_disconnected__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"includeDisconnected\"));\n                            }\n                            include_disconnected__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ListPeersRequest {\n                    include_disconnected: include_disconnected__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListPeersRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListPeersResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.peers.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListPeersResponse\", len)?;\n        if !self.peers.is_empty() {\n            struct_ser.serialize_field(\"peers\", &self.peers)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListPeersResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"peers\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Peers,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"peers\" => Ok(GeneratedField::Peers),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListPeersResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListPeersResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListPeersResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut peers__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Peers => {\n                            if peers__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"peers\"));\n                            }\n                            peers__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ListPeersResponse {\n                    peers: peers__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListPeersResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListTransactionsRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if self.direction != 0 {\n            len += 1;\n        }\n        if self.count != 0 {\n            len += 1;\n        }\n        if self.skip != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListTransactionsRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if self.direction != 0 {\n            let v = TxDirection::try_from(self.direction)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.direction)))?;\n            struct_ser.serialize_field(\"direction\", &v)?;\n        }\n        if self.count != 0 {\n            struct_ser.serialize_field(\"count\", &self.count)?;\n        }\n        if self.skip != 0 {\n            struct_ser.serialize_field(\"skip\", &self.skip)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListTransactionsRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"address\",\n            \"direction\",\n            \"count\",\n            \"skip\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Address,\n            Direction,\n            Count,\n            Skip,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"direction\" => Ok(GeneratedField::Direction),\n                            \"count\" => Ok(GeneratedField::Count),\n                            \"skip\" => Ok(GeneratedField::Skip),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListTransactionsRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListTransactionsRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListTransactionsRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut address__ = None;\n                let mut direction__ = None;\n                let mut count__ = None;\n                let mut skip__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Direction => {\n                            if direction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"direction\"));\n                            }\n                            direction__ = Some(map_.next_value::<TxDirection>()? as i32);\n                        }\n                        GeneratedField::Count => {\n                            if count__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"count\"));\n                            }\n                            count__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Skip => {\n                            if skip__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"skip\"));\n                            }\n                            skip__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(ListTransactionsRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    direction: direction__.unwrap_or_default(),\n                    count: count__.unwrap_or_default(),\n                    skip: skip__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListTransactionsRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListTransactionsResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.txs.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListTransactionsResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.txs.is_empty() {\n            struct_ser.serialize_field(\"txs\", &self.txs)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListTransactionsResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"txs\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Txs,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"txs\" => Ok(GeneratedField::Txs),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListTransactionsResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListTransactionsResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListTransactionsResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut txs__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Txs => {\n                            if txs__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"txs\"));\n                            }\n                            txs__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ListTransactionsResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    txs: txs__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListTransactionsResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListWalletsRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.ListWalletsRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListWalletsRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListWalletsRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListWalletsRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListWalletsRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(ListWalletsRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListWalletsRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ListWalletsResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallets.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ListWalletsResponse\", len)?;\n        if !self.wallets.is_empty() {\n            struct_ser.serialize_field(\"wallets\", &self.wallets)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ListWalletsResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallets\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Wallets,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"wallets\" => Ok(GeneratedField::Wallets),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ListWalletsResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ListWalletsResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListWalletsResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallets__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Wallets => {\n                            if wallets__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"wallets\"));\n                            }\n                            wallets__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ListWalletsResponse {\n                    wallets: wallets__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ListWalletsResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for LoadWalletRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.LoadWalletRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for LoadWalletRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = LoadWalletRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.LoadWalletRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LoadWalletRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(LoadWalletRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.LoadWalletRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for LoadWalletResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.LoadWalletResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for LoadWalletResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = LoadWalletResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.LoadWalletResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LoadWalletResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(LoadWalletResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.LoadWalletResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for MetricInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.total_invalid.is_some() {\n            len += 1;\n        }\n        if self.total_sent.is_some() {\n            len += 1;\n        }\n        if self.total_received.is_some() {\n            len += 1;\n        }\n        if !self.message_sent.is_empty() {\n            len += 1;\n        }\n        if !self.message_received.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.MetricInfo\", len)?;\n        if let Some(v) = self.total_invalid.as_ref() {\n            struct_ser.serialize_field(\"totalInvalid\", v)?;\n        }\n        if let Some(v) = self.total_sent.as_ref() {\n            struct_ser.serialize_field(\"totalSent\", v)?;\n        }\n        if let Some(v) = self.total_received.as_ref() {\n            struct_ser.serialize_field(\"totalReceived\", v)?;\n        }\n        if !self.message_sent.is_empty() {\n            struct_ser.serialize_field(\"messageSent\", &self.message_sent)?;\n        }\n        if !self.message_received.is_empty() {\n            struct_ser.serialize_field(\"messageReceived\", &self.message_received)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for MetricInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"total_invalid\",\n            \"totalInvalid\",\n            \"total_sent\",\n            \"totalSent\",\n            \"total_received\",\n            \"totalReceived\",\n            \"message_sent\",\n            \"messageSent\",\n            \"message_received\",\n            \"messageReceived\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            TotalInvalid,\n            TotalSent,\n            TotalReceived,\n            MessageSent,\n            MessageReceived,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"totalInvalid\" | \"total_invalid\" => Ok(GeneratedField::TotalInvalid),\n                            \"totalSent\" | \"total_sent\" => Ok(GeneratedField::TotalSent),\n                            \"totalReceived\" | \"total_received\" => Ok(GeneratedField::TotalReceived),\n                            \"messageSent\" | \"message_sent\" => Ok(GeneratedField::MessageSent),\n                            \"messageReceived\" | \"message_received\" => Ok(GeneratedField::MessageReceived),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = MetricInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.MetricInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<MetricInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut total_invalid__ = None;\n                let mut total_sent__ = None;\n                let mut total_received__ = None;\n                let mut message_sent__ = None;\n                let mut message_received__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::TotalInvalid => {\n                            if total_invalid__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalInvalid\"));\n                            }\n                            total_invalid__ = map_.next_value()?;\n                        }\n                        GeneratedField::TotalSent => {\n                            if total_sent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalSent\"));\n                            }\n                            total_sent__ = map_.next_value()?;\n                        }\n                        GeneratedField::TotalReceived => {\n                            if total_received__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalReceived\"));\n                            }\n                            total_received__ = map_.next_value()?;\n                        }\n                        GeneratedField::MessageSent => {\n                            if message_sent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"messageSent\"));\n                            }\n                            message_sent__ = Some(\n                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<i32>, _>>()?\n                                    .into_iter().map(|(k,v)| (k.0, v)).collect()\n                            );\n                        }\n                        GeneratedField::MessageReceived => {\n                            if message_received__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"messageReceived\"));\n                            }\n                            message_received__ = Some(\n                                map_.next_value::<std::collections::HashMap<::pbjson::private::NumberDeserialize<i32>, _>>()?\n                                    .into_iter().map(|(k,v)| (k.0, v)).collect()\n                            );\n                        }\n                    }\n                }\n                Ok(MetricInfo {\n                    total_invalid: total_invalid__,\n                    total_sent: total_sent__,\n                    total_received: total_received__,\n                    message_sent: message_sent__.unwrap_or_default(),\n                    message_received: message_received__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.MetricInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadBatchTransfer {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.recipients.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadBatchTransfer\", len)?;\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.recipients.is_empty() {\n            struct_ser.serialize_field(\"recipients\", &self.recipients)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadBatchTransfer {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"sender\",\n            \"recipients\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Sender,\n            Recipients,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"recipients\" => Ok(GeneratedField::Recipients),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadBatchTransfer;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadBatchTransfer\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadBatchTransfer, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut sender__ = None;\n                let mut recipients__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Recipients => {\n                            if recipients__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"recipients\"));\n                            }\n                            recipients__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PayloadBatchTransfer {\n                    sender: sender__.unwrap_or_default(),\n                    recipients: recipients__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadBatchTransfer\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadBond {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.stake != 0 {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if self.is_delegated {\n            len += 1;\n        }\n        if !self.delegate_owner.is_empty() {\n            len += 1;\n        }\n        if self.delegate_share != 0 {\n            len += 1;\n        }\n        if self.delegate_expiry != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadBond\", len)?;\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.stake != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"stake\", ToString::to_string(&self.stake).as_str())?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if self.is_delegated {\n            struct_ser.serialize_field(\"isDelegated\", &self.is_delegated)?;\n        }\n        if !self.delegate_owner.is_empty() {\n            struct_ser.serialize_field(\"delegateOwner\", &self.delegate_owner)?;\n        }\n        if self.delegate_share != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"delegateShare\", ToString::to_string(&self.delegate_share).as_str())?;\n        }\n        if self.delegate_expiry != 0 {\n            struct_ser.serialize_field(\"delegateExpiry\", &self.delegate_expiry)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadBond {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"sender\",\n            \"receiver\",\n            \"stake\",\n            \"public_key\",\n            \"publicKey\",\n            \"is_delegated\",\n            \"isDelegated\",\n            \"delegate_owner\",\n            \"delegateOwner\",\n            \"delegate_share\",\n            \"delegateShare\",\n            \"delegate_expiry\",\n            \"delegateExpiry\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Sender,\n            Receiver,\n            Stake,\n            PublicKey,\n            IsDelegated,\n            DelegateOwner,\n            DelegateShare,\n            DelegateExpiry,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"stake\" => Ok(GeneratedField::Stake),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"isDelegated\" | \"is_delegated\" => Ok(GeneratedField::IsDelegated),\n                            \"delegateOwner\" | \"delegate_owner\" => Ok(GeneratedField::DelegateOwner),\n                            \"delegateShare\" | \"delegate_share\" => Ok(GeneratedField::DelegateShare),\n                            \"delegateExpiry\" | \"delegate_expiry\" => Ok(GeneratedField::DelegateExpiry),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadBond;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadBond\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadBond, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut sender__ = None;\n                let mut receiver__ = None;\n                let mut stake__ = None;\n                let mut public_key__ = None;\n                let mut is_delegated__ = None;\n                let mut delegate_owner__ = None;\n                let mut delegate_share__ = None;\n                let mut delegate_expiry__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Stake => {\n                            if stake__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"stake\"));\n                            }\n                            stake__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::IsDelegated => {\n                            if is_delegated__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"isDelegated\"));\n                            }\n                            is_delegated__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateOwner => {\n                            if delegate_owner__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateOwner\"));\n                            }\n                            delegate_owner__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateShare => {\n                            if delegate_share__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateShare\"));\n                            }\n                            delegate_share__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::DelegateExpiry => {\n                            if delegate_expiry__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateExpiry\"));\n                            }\n                            delegate_expiry__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(PayloadBond {\n                    sender: sender__.unwrap_or_default(),\n                    receiver: receiver__.unwrap_or_default(),\n                    stake: stake__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                    is_delegated: is_delegated__.unwrap_or_default(),\n                    delegate_owner: delegate_owner__.unwrap_or_default(),\n                    delegate_share: delegate_share__.unwrap_or_default(),\n                    delegate_expiry: delegate_expiry__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadBond\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadSortition {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if !self.proof.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadSortition\", len)?;\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if !self.proof.is_empty() {\n            struct_ser.serialize_field(\"proof\", &self.proof)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadSortition {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"address\",\n            \"proof\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Address,\n            Proof,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"proof\" => Ok(GeneratedField::Proof),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadSortition;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadSortition\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadSortition, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut address__ = None;\n                let mut proof__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Proof => {\n                            if proof__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"proof\"));\n                            }\n                            proof__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PayloadSortition {\n                    address: address__.unwrap_or_default(),\n                    proof: proof__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadSortition\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadTransfer {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadTransfer\", len)?;\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadTransfer {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"sender\",\n            \"receiver\",\n            \"amount\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Sender,\n            Receiver,\n            Amount,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadTransfer;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadTransfer\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadTransfer, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut sender__ = None;\n                let mut receiver__ = None;\n                let mut amount__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(PayloadTransfer {\n                    sender: sender__.unwrap_or_default(),\n                    receiver: receiver__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadTransfer\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadType {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Unspecified => \"PAYLOAD_TYPE_UNSPECIFIED\",\n            Self::Transfer => \"PAYLOAD_TYPE_TRANSFER\",\n            Self::Bond => \"PAYLOAD_TYPE_BOND\",\n            Self::Sortition => \"PAYLOAD_TYPE_SORTITION\",\n            Self::Unbond => \"PAYLOAD_TYPE_UNBOND\",\n            Self::Withdraw => \"PAYLOAD_TYPE_WITHDRAW\",\n            Self::BatchTransfer => \"PAYLOAD_TYPE_BATCH_TRANSFER\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadType {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"PAYLOAD_TYPE_UNSPECIFIED\",\n            \"PAYLOAD_TYPE_TRANSFER\",\n            \"PAYLOAD_TYPE_BOND\",\n            \"PAYLOAD_TYPE_SORTITION\",\n            \"PAYLOAD_TYPE_UNBOND\",\n            \"PAYLOAD_TYPE_WITHDRAW\",\n            \"PAYLOAD_TYPE_BATCH_TRANSFER\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadType;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"PAYLOAD_TYPE_UNSPECIFIED\" => Ok(PayloadType::Unspecified),\n                    \"PAYLOAD_TYPE_TRANSFER\" => Ok(PayloadType::Transfer),\n                    \"PAYLOAD_TYPE_BOND\" => Ok(PayloadType::Bond),\n                    \"PAYLOAD_TYPE_SORTITION\" => Ok(PayloadType::Sortition),\n                    \"PAYLOAD_TYPE_UNBOND\" => Ok(PayloadType::Unbond),\n                    \"PAYLOAD_TYPE_WITHDRAW\" => Ok(PayloadType::Withdraw),\n                    \"PAYLOAD_TYPE_BATCH_TRANSFER\" => Ok(PayloadType::BatchTransfer),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadUnbond {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.validator.is_empty() {\n            len += 1;\n        }\n        if !self.delegate_owner.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadUnbond\", len)?;\n        if !self.validator.is_empty() {\n            struct_ser.serialize_field(\"validator\", &self.validator)?;\n        }\n        if !self.delegate_owner.is_empty() {\n            struct_ser.serialize_field(\"delegateOwner\", &self.delegate_owner)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadUnbond {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"validator\",\n            \"delegate_owner\",\n            \"delegateOwner\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Validator,\n            DelegateOwner,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"validator\" => Ok(GeneratedField::Validator),\n                            \"delegateOwner\" | \"delegate_owner\" => Ok(GeneratedField::DelegateOwner),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadUnbond;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadUnbond\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadUnbond, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut validator__ = None;\n                let mut delegate_owner__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Validator => {\n                            if validator__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validator\"));\n                            }\n                            validator__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateOwner => {\n                            if delegate_owner__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateOwner\"));\n                            }\n                            delegate_owner__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PayloadUnbond {\n                    validator: validator__.unwrap_or_default(),\n                    delegate_owner: delegate_owner__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadUnbond\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PayloadWithdraw {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.validator_address.is_empty() {\n            len += 1;\n        }\n        if !self.account_address.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PayloadWithdraw\", len)?;\n        if !self.validator_address.is_empty() {\n            struct_ser.serialize_field(\"validatorAddress\", &self.validator_address)?;\n        }\n        if !self.account_address.is_empty() {\n            struct_ser.serialize_field(\"accountAddress\", &self.account_address)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PayloadWithdraw {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"validator_address\",\n            \"validatorAddress\",\n            \"account_address\",\n            \"accountAddress\",\n            \"amount\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            ValidatorAddress,\n            AccountAddress,\n            Amount,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"validatorAddress\" | \"validator_address\" => Ok(GeneratedField::ValidatorAddress),\n                            \"accountAddress\" | \"account_address\" => Ok(GeneratedField::AccountAddress),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PayloadWithdraw;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PayloadWithdraw\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PayloadWithdraw, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut validator_address__ = None;\n                let mut account_address__ = None;\n                let mut amount__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::ValidatorAddress => {\n                            if validator_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"validatorAddress\"));\n                            }\n                            validator_address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::AccountAddress => {\n                            if account_address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"accountAddress\"));\n                            }\n                            account_address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(PayloadWithdraw {\n                    validator_address: validator_address__.unwrap_or_default(),\n                    account_address: account_address__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PayloadWithdraw\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PeerInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.status != 0 {\n            len += 1;\n        }\n        if !self.moniker.is_empty() {\n            len += 1;\n        }\n        if !self.agent.is_empty() {\n            len += 1;\n        }\n        if !self.peer_id.is_empty() {\n            len += 1;\n        }\n        if !self.consensus_keys.is_empty() {\n            len += 1;\n        }\n        if !self.consensus_addresses.is_empty() {\n            len += 1;\n        }\n        if self.services != 0 {\n            len += 1;\n        }\n        if !self.last_block_hash.is_empty() {\n            len += 1;\n        }\n        if self.height != 0 {\n            len += 1;\n        }\n        if self.last_sent != 0 {\n            len += 1;\n        }\n        if self.last_received != 0 {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if self.direction != 0 {\n            len += 1;\n        }\n        if !self.protocols.is_empty() {\n            len += 1;\n        }\n        if self.total_sessions != 0 {\n            len += 1;\n        }\n        if self.completed_sessions != 0 {\n            len += 1;\n        }\n        if self.metric_info.is_some() {\n            len += 1;\n        }\n        if self.outbound_hello_sent {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PeerInfo\", len)?;\n        if self.status != 0 {\n            struct_ser.serialize_field(\"status\", &self.status)?;\n        }\n        if !self.moniker.is_empty() {\n            struct_ser.serialize_field(\"moniker\", &self.moniker)?;\n        }\n        if !self.agent.is_empty() {\n            struct_ser.serialize_field(\"agent\", &self.agent)?;\n        }\n        if !self.peer_id.is_empty() {\n            struct_ser.serialize_field(\"peerId\", &self.peer_id)?;\n        }\n        if !self.consensus_keys.is_empty() {\n            struct_ser.serialize_field(\"consensusKeys\", &self.consensus_keys)?;\n        }\n        if !self.consensus_addresses.is_empty() {\n            struct_ser.serialize_field(\"consensusAddresses\", &self.consensus_addresses)?;\n        }\n        if self.services != 0 {\n            struct_ser.serialize_field(\"services\", &self.services)?;\n        }\n        if !self.last_block_hash.is_empty() {\n            struct_ser.serialize_field(\"lastBlockHash\", &self.last_block_hash)?;\n        }\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        if self.last_sent != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"lastSent\", ToString::to_string(&self.last_sent).as_str())?;\n        }\n        if self.last_received != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"lastReceived\", ToString::to_string(&self.last_received).as_str())?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if self.direction != 0 {\n            let v = Direction::try_from(self.direction)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.direction)))?;\n            struct_ser.serialize_field(\"direction\", &v)?;\n        }\n        if !self.protocols.is_empty() {\n            struct_ser.serialize_field(\"protocols\", &self.protocols)?;\n        }\n        if self.total_sessions != 0 {\n            struct_ser.serialize_field(\"totalSessions\", &self.total_sessions)?;\n        }\n        if self.completed_sessions != 0 {\n            struct_ser.serialize_field(\"completedSessions\", &self.completed_sessions)?;\n        }\n        if let Some(v) = self.metric_info.as_ref() {\n            struct_ser.serialize_field(\"metricInfo\", v)?;\n        }\n        if self.outbound_hello_sent {\n            struct_ser.serialize_field(\"outboundHelloSent\", &self.outbound_hello_sent)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PeerInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"status\",\n            \"moniker\",\n            \"agent\",\n            \"peer_id\",\n            \"peerId\",\n            \"consensus_keys\",\n            \"consensusKeys\",\n            \"consensus_addresses\",\n            \"consensusAddresses\",\n            \"services\",\n            \"last_block_hash\",\n            \"lastBlockHash\",\n            \"height\",\n            \"last_sent\",\n            \"lastSent\",\n            \"last_received\",\n            \"lastReceived\",\n            \"address\",\n            \"direction\",\n            \"protocols\",\n            \"total_sessions\",\n            \"totalSessions\",\n            \"completed_sessions\",\n            \"completedSessions\",\n            \"metric_info\",\n            \"metricInfo\",\n            \"outbound_hello_sent\",\n            \"outboundHelloSent\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Status,\n            Moniker,\n            Agent,\n            PeerId,\n            ConsensusKeys,\n            ConsensusAddresses,\n            Services,\n            LastBlockHash,\n            Height,\n            LastSent,\n            LastReceived,\n            Address,\n            Direction,\n            Protocols,\n            TotalSessions,\n            CompletedSessions,\n            MetricInfo,\n            OutboundHelloSent,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"status\" => Ok(GeneratedField::Status),\n                            \"moniker\" => Ok(GeneratedField::Moniker),\n                            \"agent\" => Ok(GeneratedField::Agent),\n                            \"peerId\" | \"peer_id\" => Ok(GeneratedField::PeerId),\n                            \"consensusKeys\" | \"consensus_keys\" => Ok(GeneratedField::ConsensusKeys),\n                            \"consensusAddresses\" | \"consensus_addresses\" => Ok(GeneratedField::ConsensusAddresses),\n                            \"services\" => Ok(GeneratedField::Services),\n                            \"lastBlockHash\" | \"last_block_hash\" => Ok(GeneratedField::LastBlockHash),\n                            \"height\" => Ok(GeneratedField::Height),\n                            \"lastSent\" | \"last_sent\" => Ok(GeneratedField::LastSent),\n                            \"lastReceived\" | \"last_received\" => Ok(GeneratedField::LastReceived),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"direction\" => Ok(GeneratedField::Direction),\n                            \"protocols\" => Ok(GeneratedField::Protocols),\n                            \"totalSessions\" | \"total_sessions\" => Ok(GeneratedField::TotalSessions),\n                            \"completedSessions\" | \"completed_sessions\" => Ok(GeneratedField::CompletedSessions),\n                            \"metricInfo\" | \"metric_info\" => Ok(GeneratedField::MetricInfo),\n                            \"outboundHelloSent\" | \"outbound_hello_sent\" => Ok(GeneratedField::OutboundHelloSent),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PeerInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PeerInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PeerInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut status__ = None;\n                let mut moniker__ = None;\n                let mut agent__ = None;\n                let mut peer_id__ = None;\n                let mut consensus_keys__ = None;\n                let mut consensus_addresses__ = None;\n                let mut services__ = None;\n                let mut last_block_hash__ = None;\n                let mut height__ = None;\n                let mut last_sent__ = None;\n                let mut last_received__ = None;\n                let mut address__ = None;\n                let mut direction__ = None;\n                let mut protocols__ = None;\n                let mut total_sessions__ = None;\n                let mut completed_sessions__ = None;\n                let mut metric_info__ = None;\n                let mut outbound_hello_sent__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Status => {\n                            if status__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"status\"));\n                            }\n                            status__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Moniker => {\n                            if moniker__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"moniker\"));\n                            }\n                            moniker__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Agent => {\n                            if agent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"agent\"));\n                            }\n                            agent__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PeerId => {\n                            if peer_id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"peerId\"));\n                            }\n                            peer_id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ConsensusKeys => {\n                            if consensus_keys__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"consensusKeys\"));\n                            }\n                            consensus_keys__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::ConsensusAddresses => {\n                            if consensus_addresses__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"consensusAddresses\"));\n                            }\n                            consensus_addresses__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Services => {\n                            if services__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"services\"));\n                            }\n                            services__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastBlockHash => {\n                            if last_block_hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastBlockHash\"));\n                            }\n                            last_block_hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastSent => {\n                            if last_sent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastSent\"));\n                            }\n                            last_sent__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastReceived => {\n                            if last_received__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastReceived\"));\n                            }\n                            last_received__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Direction => {\n                            if direction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"direction\"));\n                            }\n                            direction__ = Some(map_.next_value::<Direction>()? as i32);\n                        }\n                        GeneratedField::Protocols => {\n                            if protocols__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"protocols\"));\n                            }\n                            protocols__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::TotalSessions => {\n                            if total_sessions__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"totalSessions\"));\n                            }\n                            total_sessions__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::CompletedSessions => {\n                            if completed_sessions__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"completedSessions\"));\n                            }\n                            completed_sessions__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::MetricInfo => {\n                            if metric_info__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"metricInfo\"));\n                            }\n                            metric_info__ = map_.next_value()?;\n                        }\n                        GeneratedField::OutboundHelloSent => {\n                            if outbound_hello_sent__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"outboundHelloSent\"));\n                            }\n                            outbound_hello_sent__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PeerInfo {\n                    status: status__.unwrap_or_default(),\n                    moniker: moniker__.unwrap_or_default(),\n                    agent: agent__.unwrap_or_default(),\n                    peer_id: peer_id__.unwrap_or_default(),\n                    consensus_keys: consensus_keys__.unwrap_or_default(),\n                    consensus_addresses: consensus_addresses__.unwrap_or_default(),\n                    services: services__.unwrap_or_default(),\n                    last_block_hash: last_block_hash__.unwrap_or_default(),\n                    height: height__.unwrap_or_default(),\n                    last_sent: last_sent__.unwrap_or_default(),\n                    last_received: last_received__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    direction: direction__.unwrap_or_default(),\n                    protocols: protocols__.unwrap_or_default(),\n                    total_sessions: total_sessions__.unwrap_or_default(),\n                    completed_sessions: completed_sessions__.unwrap_or_default(),\n                    metric_info: metric_info__,\n                    outbound_hello_sent: outbound_hello_sent__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PeerInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PingRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.PingRequest\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PingRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PingRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PingRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PingRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(PingRequest {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PingRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PingResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let len = 0;\n        let struct_ser = serializer.serialize_struct(\"pactus.PingResponse\", len)?;\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PingResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                            Err(serde::de::Error::unknown_field(value, FIELDS))\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PingResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PingResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PingResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                while map_.next_key::<GeneratedField>()?.is_some() {\n                    let _ = map_.next_value::<serde::de::IgnoredAny>()?;\n                }\n                Ok(PingResponse {\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PingResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ProposalInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.height != 0 {\n            len += 1;\n        }\n        if self.round != 0 {\n            len += 1;\n        }\n        if !self.block_data.is_empty() {\n            len += 1;\n        }\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ProposalInfo\", len)?;\n        if self.height != 0 {\n            struct_ser.serialize_field(\"height\", &self.height)?;\n        }\n        if self.round != 0 {\n            struct_ser.serialize_field(\"round\", &self.round)?;\n        }\n        if !self.block_data.is_empty() {\n            struct_ser.serialize_field(\"blockData\", &self.block_data)?;\n        }\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ProposalInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"height\",\n            \"round\",\n            \"block_data\",\n            \"blockData\",\n            \"signature\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Height,\n            Round,\n            BlockData,\n            Signature,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"height\" => Ok(GeneratedField::Height),\n                            \"round\" => Ok(GeneratedField::Round),\n                            \"blockData\" | \"block_data\" => Ok(GeneratedField::BlockData),\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ProposalInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ProposalInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProposalInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut height__ = None;\n                let mut round__ = None;\n                let mut block_data__ = None;\n                let mut signature__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Height => {\n                            if height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"height\"));\n                            }\n                            height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Round => {\n                            if round__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"round\"));\n                            }\n                            round__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::BlockData => {\n                            if block_data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockData\"));\n                            }\n                            block_data__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(ProposalInfo {\n                    height: height__.unwrap_or_default(),\n                    round: round__.unwrap_or_default(),\n                    block_data: block_data__.unwrap_or_default(),\n                    signature: signature__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ProposalInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PublicKeyAggregationRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.public_keys.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PublicKeyAggregationRequest\", len)?;\n        if !self.public_keys.is_empty() {\n            struct_ser.serialize_field(\"publicKeys\", &self.public_keys)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PublicKeyAggregationRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"public_keys\",\n            \"publicKeys\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PublicKeys,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"publicKeys\" | \"public_keys\" => Ok(GeneratedField::PublicKeys),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PublicKeyAggregationRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PublicKeyAggregationRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PublicKeyAggregationRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut public_keys__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PublicKeys => {\n                            if public_keys__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKeys\"));\n                            }\n                            public_keys__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PublicKeyAggregationRequest {\n                    public_keys: public_keys__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PublicKeyAggregationRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for PublicKeyAggregationResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.PublicKeyAggregationResponse\", len)?;\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for PublicKeyAggregationResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"public_key\",\n            \"publicKey\",\n            \"address\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PublicKey,\n            Address,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"address\" => Ok(GeneratedField::Address),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = PublicKeyAggregationResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.PublicKeyAggregationResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PublicKeyAggregationResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut public_key__ = None;\n                let mut address__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(PublicKeyAggregationResponse {\n                    public_key: public_key__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.PublicKeyAggregationResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for Recipient {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.Recipient\", len)?;\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for Recipient {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"receiver\",\n            \"amount\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Receiver,\n            Amount,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = Recipient;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.Recipient\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Recipient, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut receiver__ = None;\n                let mut amount__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(Recipient {\n                    receiver: receiver__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.Recipient\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for RestoreWalletRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.mnemonic.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.RestoreWalletRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.mnemonic.is_empty() {\n            struct_ser.serialize_field(\"mnemonic\", &self.mnemonic)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for RestoreWalletRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"mnemonic\",\n            \"password\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Mnemonic,\n            Password,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"mnemonic\" => Ok(GeneratedField::Mnemonic),\n                            \"password\" => Ok(GeneratedField::Password),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = RestoreWalletRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.RestoreWalletRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RestoreWalletRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut mnemonic__ = None;\n                let mut password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Mnemonic => {\n                            if mnemonic__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"mnemonic\"));\n                            }\n                            mnemonic__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(RestoreWalletRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    mnemonic: mnemonic__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.RestoreWalletRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for RestoreWalletResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.RestoreWalletResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for RestoreWalletResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = RestoreWalletResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.RestoreWalletResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<RestoreWalletResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(RestoreWalletResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.RestoreWalletResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SetAddressLabelRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if !self.label.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SetAddressLabelRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if !self.label.is_empty() {\n            struct_ser.serialize_field(\"label\", &self.label)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SetAddressLabelRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"password\",\n            \"address\",\n            \"label\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Password,\n            Address,\n            Label,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"password\" => Ok(GeneratedField::Password),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"label\" => Ok(GeneratedField::Label),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SetAddressLabelRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SetAddressLabelRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SetAddressLabelRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut password__ = None;\n                let mut address__ = None;\n                let mut label__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Label => {\n                            if label__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"label\"));\n                            }\n                            label__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SetAddressLabelRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    label: label__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SetAddressLabelRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SetAddressLabelResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if !self.label.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SetAddressLabelResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if !self.label.is_empty() {\n            struct_ser.serialize_field(\"label\", &self.label)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SetAddressLabelResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"address\",\n            \"label\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Address,\n            Label,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"label\" => Ok(GeneratedField::Label),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SetAddressLabelResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SetAddressLabelResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SetAddressLabelResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut address__ = None;\n                let mut label__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Label => {\n                            if label__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"label\"));\n                            }\n                            label__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SetAddressLabelResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    label: label__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SetAddressLabelResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SetDefaultFeeRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SetDefaultFeeRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SetDefaultFeeRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"amount\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Amount,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SetDefaultFeeRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SetDefaultFeeRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SetDefaultFeeRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut amount__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(SetDefaultFeeRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SetDefaultFeeRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SetDefaultFeeResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SetDefaultFeeResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SetDefaultFeeResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SetDefaultFeeResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SetDefaultFeeResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SetDefaultFeeResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SetDefaultFeeResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SetDefaultFeeResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignMessageRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if !self.message.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignMessageRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if !self.message.is_empty() {\n            struct_ser.serialize_field(\"message\", &self.message)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignMessageRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"password\",\n            \"address\",\n            \"message\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            Password,\n            Address,\n            Message,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"password\" => Ok(GeneratedField::Password),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"message\" => Ok(GeneratedField::Message),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignMessageRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignMessageRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut password__ = None;\n                let mut address__ = None;\n                let mut message__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Message => {\n                            if message__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"message\"));\n                            }\n                            message__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignMessageRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    message: message__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignMessageRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignMessageResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignMessageResponse\", len)?;\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignMessageResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"signature\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Signature,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignMessageResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignMessageResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut signature__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignMessageResponse {\n                    signature: signature__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignMessageResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignMessageWithPrivateKeyRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.private_key.is_empty() {\n            len += 1;\n        }\n        if !self.message.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignMessageWithPrivateKeyRequest\", len)?;\n        if !self.private_key.is_empty() {\n            struct_ser.serialize_field(\"privateKey\", &self.private_key)?;\n        }\n        if !self.message.is_empty() {\n            struct_ser.serialize_field(\"message\", &self.message)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"private_key\",\n            \"privateKey\",\n            \"message\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            PrivateKey,\n            Message,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"privateKey\" | \"private_key\" => Ok(GeneratedField::PrivateKey),\n                            \"message\" => Ok(GeneratedField::Message),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignMessageWithPrivateKeyRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignMessageWithPrivateKeyRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageWithPrivateKeyRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut private_key__ = None;\n                let mut message__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::PrivateKey => {\n                            if private_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"privateKey\"));\n                            }\n                            private_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Message => {\n                            if message__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"message\"));\n                            }\n                            message__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignMessageWithPrivateKeyRequest {\n                    private_key: private_key__.unwrap_or_default(),\n                    message: message__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignMessageWithPrivateKeyRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignMessageWithPrivateKeyResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignMessageWithPrivateKeyResponse\", len)?;\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"signature\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Signature,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignMessageWithPrivateKeyResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignMessageWithPrivateKeyResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageWithPrivateKeyResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut signature__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignMessageWithPrivateKeyResponse {\n                    signature: signature__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignMessageWithPrivateKeyResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignRawTransactionRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.raw_transaction.is_empty() {\n            len += 1;\n        }\n        if !self.password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignRawTransactionRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"rawTransaction\", &self.raw_transaction)?;\n        }\n        if !self.password.is_empty() {\n            struct_ser.serialize_field(\"password\", &self.password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignRawTransactionRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"raw_transaction\",\n            \"rawTransaction\",\n            \"password\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            RawTransaction,\n            Password,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"rawTransaction\" | \"raw_transaction\" => Ok(GeneratedField::RawTransaction),\n                            \"password\" => Ok(GeneratedField::Password),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignRawTransactionRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignRawTransactionRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignRawTransactionRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut raw_transaction__ = None;\n                let mut password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::RawTransaction => {\n                            if raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"rawTransaction\"));\n                            }\n                            raw_transaction__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Password => {\n                            if password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"password\"));\n                            }\n                            password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignRawTransactionRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    raw_transaction: raw_transaction__.unwrap_or_default(),\n                    password: password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignRawTransactionRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignRawTransactionResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.transaction_id.is_empty() {\n            len += 1;\n        }\n        if !self.signed_raw_transaction.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignRawTransactionResponse\", len)?;\n        if !self.transaction_id.is_empty() {\n            struct_ser.serialize_field(\"transactionId\", &self.transaction_id)?;\n        }\n        if !self.signed_raw_transaction.is_empty() {\n            struct_ser.serialize_field(\"signedRawTransaction\", &self.signed_raw_transaction)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignRawTransactionResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"transaction_id\",\n            \"transactionId\",\n            \"signed_raw_transaction\",\n            \"signedRawTransaction\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            TransactionId,\n            SignedRawTransaction,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"transactionId\" | \"transaction_id\" => Ok(GeneratedField::TransactionId),\n                            \"signedRawTransaction\" | \"signed_raw_transaction\" => Ok(GeneratedField::SignedRawTransaction),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignRawTransactionResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignRawTransactionResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignRawTransactionResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut transaction_id__ = None;\n                let mut signed_raw_transaction__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::TransactionId => {\n                            if transaction_id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"transactionId\"));\n                            }\n                            transaction_id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::SignedRawTransaction => {\n                            if signed_raw_transaction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signedRawTransaction\"));\n                            }\n                            signed_raw_transaction__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignRawTransactionResponse {\n                    transaction_id: transaction_id__.unwrap_or_default(),\n                    signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignRawTransactionResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignatureAggregationRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.signatures.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignatureAggregationRequest\", len)?;\n        if !self.signatures.is_empty() {\n            struct_ser.serialize_field(\"signatures\", &self.signatures)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignatureAggregationRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"signatures\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Signatures,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"signatures\" => Ok(GeneratedField::Signatures),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignatureAggregationRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignatureAggregationRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignatureAggregationRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut signatures__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Signatures => {\n                            if signatures__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signatures\"));\n                            }\n                            signatures__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignatureAggregationRequest {\n                    signatures: signatures__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignatureAggregationRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for SignatureAggregationResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.SignatureAggregationResponse\", len)?;\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for SignatureAggregationResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"signature\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Signature,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = SignatureAggregationResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.SignatureAggregationResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignatureAggregationResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut signature__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(SignatureAggregationResponse {\n                    signature: signature__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.SignatureAggregationResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for TransactionInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.id.is_empty() {\n            len += 1;\n        }\n        if !self.data.is_empty() {\n            len += 1;\n        }\n        if self.version != 0 {\n            len += 1;\n        }\n        if self.lock_time != 0 {\n            len += 1;\n        }\n        if self.value != 0 {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if self.payload_type != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        if self.block_height != 0 {\n            len += 1;\n        }\n        if self.confirmed {\n            len += 1;\n        }\n        if self.confirmations != 0 {\n            len += 1;\n        }\n        if self.payload.is_some() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.TransactionInfo\", len)?;\n        if !self.id.is_empty() {\n            struct_ser.serialize_field(\"id\", &self.id)?;\n        }\n        if !self.data.is_empty() {\n            struct_ser.serialize_field(\"data\", &self.data)?;\n        }\n        if self.version != 0 {\n            struct_ser.serialize_field(\"version\", &self.version)?;\n        }\n        if self.lock_time != 0 {\n            struct_ser.serialize_field(\"lockTime\", &self.lock_time)?;\n        }\n        if self.value != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"value\", ToString::to_string(&self.value).as_str())?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if self.payload_type != 0 {\n            let v = PayloadType::try_from(self.payload_type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.payload_type)))?;\n            struct_ser.serialize_field(\"payloadType\", &v)?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        if self.block_height != 0 {\n            struct_ser.serialize_field(\"blockHeight\", &self.block_height)?;\n        }\n        if self.confirmed {\n            struct_ser.serialize_field(\"confirmed\", &self.confirmed)?;\n        }\n        if self.confirmations != 0 {\n            struct_ser.serialize_field(\"confirmations\", &self.confirmations)?;\n        }\n        if let Some(v) = self.payload.as_ref() {\n            match v {\n                transaction_info::Payload::Transfer(v) => {\n                    struct_ser.serialize_field(\"transfer\", v)?;\n                }\n                transaction_info::Payload::Bond(v) => {\n                    struct_ser.serialize_field(\"bond\", v)?;\n                }\n                transaction_info::Payload::Sortition(v) => {\n                    struct_ser.serialize_field(\"sortition\", v)?;\n                }\n                transaction_info::Payload::Unbond(v) => {\n                    struct_ser.serialize_field(\"unbond\", v)?;\n                }\n                transaction_info::Payload::Withdraw(v) => {\n                    struct_ser.serialize_field(\"withdraw\", v)?;\n                }\n                transaction_info::Payload::BatchTransfer(v) => {\n                    struct_ser.serialize_field(\"batchTransfer\", v)?;\n                }\n            }\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for TransactionInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"id\",\n            \"data\",\n            \"version\",\n            \"lock_time\",\n            \"lockTime\",\n            \"value\",\n            \"fee\",\n            \"payload_type\",\n            \"payloadType\",\n            \"memo\",\n            \"public_key\",\n            \"publicKey\",\n            \"signature\",\n            \"block_height\",\n            \"blockHeight\",\n            \"confirmed\",\n            \"confirmations\",\n            \"transfer\",\n            \"bond\",\n            \"sortition\",\n            \"unbond\",\n            \"withdraw\",\n            \"batch_transfer\",\n            \"batchTransfer\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Id,\n            Data,\n            Version,\n            LockTime,\n            Value,\n            Fee,\n            PayloadType,\n            Memo,\n            PublicKey,\n            Signature,\n            BlockHeight,\n            Confirmed,\n            Confirmations,\n            Transfer,\n            Bond,\n            Sortition,\n            Unbond,\n            Withdraw,\n            BatchTransfer,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"id\" => Ok(GeneratedField::Id),\n                            \"data\" => Ok(GeneratedField::Data),\n                            \"version\" => Ok(GeneratedField::Version),\n                            \"lockTime\" | \"lock_time\" => Ok(GeneratedField::LockTime),\n                            \"value\" => Ok(GeneratedField::Value),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"payloadType\" | \"payload_type\" => Ok(GeneratedField::PayloadType),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            \"blockHeight\" | \"block_height\" => Ok(GeneratedField::BlockHeight),\n                            \"confirmed\" => Ok(GeneratedField::Confirmed),\n                            \"confirmations\" => Ok(GeneratedField::Confirmations),\n                            \"transfer\" => Ok(GeneratedField::Transfer),\n                            \"bond\" => Ok(GeneratedField::Bond),\n                            \"sortition\" => Ok(GeneratedField::Sortition),\n                            \"unbond\" => Ok(GeneratedField::Unbond),\n                            \"withdraw\" => Ok(GeneratedField::Withdraw),\n                            \"batchTransfer\" | \"batch_transfer\" => Ok(GeneratedField::BatchTransfer),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = TransactionInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.TransactionInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<TransactionInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut id__ = None;\n                let mut data__ = None;\n                let mut version__ = None;\n                let mut lock_time__ = None;\n                let mut value__ = None;\n                let mut fee__ = None;\n                let mut payload_type__ = None;\n                let mut memo__ = None;\n                let mut public_key__ = None;\n                let mut signature__ = None;\n                let mut block_height__ = None;\n                let mut confirmed__ = None;\n                let mut confirmations__ = None;\n                let mut payload__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Id => {\n                            if id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"id\"));\n                            }\n                            id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Data => {\n                            if data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"data\"));\n                            }\n                            data__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Version => {\n                            if version__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"version\"));\n                            }\n                            version__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LockTime => {\n                            if lock_time__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lockTime\"));\n                            }\n                            lock_time__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Value => {\n                            if value__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"value\"));\n                            }\n                            value__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PayloadType => {\n                            if payload_type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"payloadType\"));\n                            }\n                            payload_type__ = Some(map_.next_value::<PayloadType>()? as i32);\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::BlockHeight => {\n                            if block_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockHeight\"));\n                            }\n                            block_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Confirmed => {\n                            if confirmed__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"confirmed\"));\n                            }\n                            confirmed__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Confirmations => {\n                            if confirmations__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"confirmations\"));\n                            }\n                            confirmations__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Transfer => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"transfer\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Transfer)\n;\n                        }\n                        GeneratedField::Bond => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"bond\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Bond)\n;\n                        }\n                        GeneratedField::Sortition => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sortition\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Sortition)\n;\n                        }\n                        GeneratedField::Unbond => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"unbond\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Unbond)\n;\n                        }\n                        GeneratedField::Withdraw => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"withdraw\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Withdraw)\n;\n                        }\n                        GeneratedField::BatchTransfer => {\n                            if payload__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"batchTransfer\"));\n                            }\n                            payload__ = map_.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::BatchTransfer)\n;\n                        }\n                    }\n                }\n                Ok(TransactionInfo {\n                    id: id__.unwrap_or_default(),\n                    data: data__.unwrap_or_default(),\n                    version: version__.unwrap_or_default(),\n                    lock_time: lock_time__.unwrap_or_default(),\n                    value: value__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    payload_type: payload_type__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                    signature: signature__.unwrap_or_default(),\n                    block_height: block_height__.unwrap_or_default(),\n                    confirmed: confirmed__.unwrap_or_default(),\n                    confirmations: confirmations__.unwrap_or_default(),\n                    payload: payload__,\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.TransactionInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for TransactionStatus {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Pending => \"TRANSACTION_STATUS_PENDING\",\n            Self::Confirmed => \"TRANSACTION_STATUS_CONFIRMED\",\n            Self::Failed => \"TRANSACTION_STATUS_FAILED\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for TransactionStatus {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"TRANSACTION_STATUS_PENDING\",\n            \"TRANSACTION_STATUS_CONFIRMED\",\n            \"TRANSACTION_STATUS_FAILED\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = TransactionStatus;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"TRANSACTION_STATUS_PENDING\" => Ok(TransactionStatus::Pending),\n                    \"TRANSACTION_STATUS_CONFIRMED\" => Ok(TransactionStatus::Confirmed),\n                    \"TRANSACTION_STATUS_FAILED\" => Ok(TransactionStatus::Failed),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for TransactionVerbosity {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Data => \"TRANSACTION_VERBOSITY_DATA\",\n            Self::Info => \"TRANSACTION_VERBOSITY_INFO\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for TransactionVerbosity {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"TRANSACTION_VERBOSITY_DATA\",\n            \"TRANSACTION_VERBOSITY_INFO\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = TransactionVerbosity;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"TRANSACTION_VERBOSITY_DATA\" => Ok(TransactionVerbosity::Data),\n                    \"TRANSACTION_VERBOSITY_INFO\" => Ok(TransactionVerbosity::Info),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for TxDirection {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Any => \"TX_DIRECTION_ANY\",\n            Self::Incoming => \"TX_DIRECTION_INCOMING\",\n            Self::Outgoing => \"TX_DIRECTION_OUTGOING\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for TxDirection {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"TX_DIRECTION_ANY\",\n            \"TX_DIRECTION_INCOMING\",\n            \"TX_DIRECTION_OUTGOING\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = TxDirection;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"TX_DIRECTION_ANY\" => Ok(TxDirection::Any),\n                    \"TX_DIRECTION_INCOMING\" => Ok(TxDirection::Incoming),\n                    \"TX_DIRECTION_OUTGOING\" => Ok(TxDirection::Outgoing),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for UnloadWalletRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.UnloadWalletRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for UnloadWalletRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = UnloadWalletRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.UnloadWalletRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnloadWalletRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(UnloadWalletRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.UnloadWalletRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for UnloadWalletResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.UnloadWalletResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for UnloadWalletResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = UnloadWalletResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.UnloadWalletResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnloadWalletResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(UnloadWalletResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.UnloadWalletResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for UpdatePasswordRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        if !self.old_password.is_empty() {\n            len += 1;\n        }\n        if !self.new_password.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.UpdatePasswordRequest\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        if !self.old_password.is_empty() {\n            struct_ser.serialize_field(\"oldPassword\", &self.old_password)?;\n        }\n        if !self.new_password.is_empty() {\n            struct_ser.serialize_field(\"newPassword\", &self.new_password)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for UpdatePasswordRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n            \"old_password\",\n            \"oldPassword\",\n            \"new_password\",\n            \"newPassword\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n            OldPassword,\n            NewPassword,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            \"oldPassword\" | \"old_password\" => Ok(GeneratedField::OldPassword),\n                            \"newPassword\" | \"new_password\" => Ok(GeneratedField::NewPassword),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = UpdatePasswordRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.UpdatePasswordRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UpdatePasswordRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                let mut old_password__ = None;\n                let mut new_password__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::OldPassword => {\n                            if old_password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"oldPassword\"));\n                            }\n                            old_password__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::NewPassword => {\n                            if new_password__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"newPassword\"));\n                            }\n                            new_password__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(UpdatePasswordRequest {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                    old_password: old_password__.unwrap_or_default(),\n                    new_password: new_password__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.UpdatePasswordRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for UpdatePasswordResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.wallet_name.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.UpdatePasswordResponse\", len)?;\n        if !self.wallet_name.is_empty() {\n            struct_ser.serialize_field(\"walletName\", &self.wallet_name)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for UpdatePasswordResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"wallet_name\",\n            \"walletName\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            WalletName,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"walletName\" | \"wallet_name\" => Ok(GeneratedField::WalletName),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = UpdatePasswordResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.UpdatePasswordResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<UpdatePasswordResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut wallet_name__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::WalletName => {\n                            if wallet_name__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"walletName\"));\n                            }\n                            wallet_name__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(UpdatePasswordResponse {\n                    wallet_name: wallet_name__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.UpdatePasswordResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ValidatorInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.hash.is_empty() {\n            len += 1;\n        }\n        if !self.data.is_empty() {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        if self.number != 0 {\n            len += 1;\n        }\n        if self.stake != 0 {\n            len += 1;\n        }\n        if self.last_bonding_height != 0 {\n            len += 1;\n        }\n        if self.last_sortition_height != 0 {\n            len += 1;\n        }\n        if self.unbonding_height != 0 {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if self.availability_score != 0. {\n            len += 1;\n        }\n        if self.protocol_version != 0 {\n            len += 1;\n        }\n        if self.is_delegated {\n            len += 1;\n        }\n        if !self.delegate_owner.is_empty() {\n            len += 1;\n        }\n        if self.delegate_share != 0 {\n            len += 1;\n        }\n        if self.delegate_expiry != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ValidatorInfo\", len)?;\n        if !self.hash.is_empty() {\n            struct_ser.serialize_field(\"hash\", &self.hash)?;\n        }\n        if !self.data.is_empty() {\n            struct_ser.serialize_field(\"data\", &self.data)?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        if self.number != 0 {\n            struct_ser.serialize_field(\"number\", &self.number)?;\n        }\n        if self.stake != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"stake\", ToString::to_string(&self.stake).as_str())?;\n        }\n        if self.last_bonding_height != 0 {\n            struct_ser.serialize_field(\"lastBondingHeight\", &self.last_bonding_height)?;\n        }\n        if self.last_sortition_height != 0 {\n            struct_ser.serialize_field(\"lastSortitionHeight\", &self.last_sortition_height)?;\n        }\n        if self.unbonding_height != 0 {\n            struct_ser.serialize_field(\"unbondingHeight\", &self.unbonding_height)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if self.availability_score != 0. {\n            struct_ser.serialize_field(\"availabilityScore\", &self.availability_score)?;\n        }\n        if self.protocol_version != 0 {\n            struct_ser.serialize_field(\"protocolVersion\", &self.protocol_version)?;\n        }\n        if self.is_delegated {\n            struct_ser.serialize_field(\"isDelegated\", &self.is_delegated)?;\n        }\n        if !self.delegate_owner.is_empty() {\n            struct_ser.serialize_field(\"delegateOwner\", &self.delegate_owner)?;\n        }\n        if self.delegate_share != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"delegateShare\", ToString::to_string(&self.delegate_share).as_str())?;\n        }\n        if self.delegate_expiry != 0 {\n            struct_ser.serialize_field(\"delegateExpiry\", &self.delegate_expiry)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ValidatorInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"hash\",\n            \"data\",\n            \"public_key\",\n            \"publicKey\",\n            \"number\",\n            \"stake\",\n            \"last_bonding_height\",\n            \"lastBondingHeight\",\n            \"last_sortition_height\",\n            \"lastSortitionHeight\",\n            \"unbonding_height\",\n            \"unbondingHeight\",\n            \"address\",\n            \"availability_score\",\n            \"availabilityScore\",\n            \"protocol_version\",\n            \"protocolVersion\",\n            \"is_delegated\",\n            \"isDelegated\",\n            \"delegate_owner\",\n            \"delegateOwner\",\n            \"delegate_share\",\n            \"delegateShare\",\n            \"delegate_expiry\",\n            \"delegateExpiry\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Hash,\n            Data,\n            PublicKey,\n            Number,\n            Stake,\n            LastBondingHeight,\n            LastSortitionHeight,\n            UnbondingHeight,\n            Address,\n            AvailabilityScore,\n            ProtocolVersion,\n            IsDelegated,\n            DelegateOwner,\n            DelegateShare,\n            DelegateExpiry,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"hash\" => Ok(GeneratedField::Hash),\n                            \"data\" => Ok(GeneratedField::Data),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            \"number\" => Ok(GeneratedField::Number),\n                            \"stake\" => Ok(GeneratedField::Stake),\n                            \"lastBondingHeight\" | \"last_bonding_height\" => Ok(GeneratedField::LastBondingHeight),\n                            \"lastSortitionHeight\" | \"last_sortition_height\" => Ok(GeneratedField::LastSortitionHeight),\n                            \"unbondingHeight\" | \"unbonding_height\" => Ok(GeneratedField::UnbondingHeight),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"availabilityScore\" | \"availability_score\" => Ok(GeneratedField::AvailabilityScore),\n                            \"protocolVersion\" | \"protocol_version\" => Ok(GeneratedField::ProtocolVersion),\n                            \"isDelegated\" | \"is_delegated\" => Ok(GeneratedField::IsDelegated),\n                            \"delegateOwner\" | \"delegate_owner\" => Ok(GeneratedField::DelegateOwner),\n                            \"delegateShare\" | \"delegate_share\" => Ok(GeneratedField::DelegateShare),\n                            \"delegateExpiry\" | \"delegate_expiry\" => Ok(GeneratedField::DelegateExpiry),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ValidatorInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ValidatorInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValidatorInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut hash__ = None;\n                let mut data__ = None;\n                let mut public_key__ = None;\n                let mut number__ = None;\n                let mut stake__ = None;\n                let mut last_bonding_height__ = None;\n                let mut last_sortition_height__ = None;\n                let mut unbonding_height__ = None;\n                let mut address__ = None;\n                let mut availability_score__ = None;\n                let mut protocol_version__ = None;\n                let mut is_delegated__ = None;\n                let mut delegate_owner__ = None;\n                let mut delegate_share__ = None;\n                let mut delegate_expiry__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Hash => {\n                            if hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hash\"));\n                            }\n                            hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Data => {\n                            if data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"data\"));\n                            }\n                            data__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Number => {\n                            if number__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"number\"));\n                            }\n                            number__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Stake => {\n                            if stake__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"stake\"));\n                            }\n                            stake__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastBondingHeight => {\n                            if last_bonding_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastBondingHeight\"));\n                            }\n                            last_bonding_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::LastSortitionHeight => {\n                            if last_sortition_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"lastSortitionHeight\"));\n                            }\n                            last_sortition_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::UnbondingHeight => {\n                            if unbonding_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"unbondingHeight\"));\n                            }\n                            unbonding_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::AvailabilityScore => {\n                            if availability_score__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"availabilityScore\"));\n                            }\n                            availability_score__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::ProtocolVersion => {\n                            if protocol_version__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"protocolVersion\"));\n                            }\n                            protocol_version__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::IsDelegated => {\n                            if is_delegated__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"isDelegated\"));\n                            }\n                            is_delegated__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateOwner => {\n                            if delegate_owner__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateOwner\"));\n                            }\n                            delegate_owner__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::DelegateShare => {\n                            if delegate_share__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateShare\"));\n                            }\n                            delegate_share__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::DelegateExpiry => {\n                            if delegate_expiry__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"delegateExpiry\"));\n                            }\n                            delegate_expiry__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(ValidatorInfo {\n                    hash: hash__.unwrap_or_default(),\n                    data: data__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                    number: number__.unwrap_or_default(),\n                    stake: stake__.unwrap_or_default(),\n                    last_bonding_height: last_bonding_height__.unwrap_or_default(),\n                    last_sortition_height: last_sortition_height__.unwrap_or_default(),\n                    unbonding_height: unbonding_height__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    availability_score: availability_score__.unwrap_or_default(),\n                    protocol_version: protocol_version__.unwrap_or_default(),\n                    is_delegated: is_delegated__.unwrap_or_default(),\n                    delegate_owner: delegate_owner__.unwrap_or_default(),\n                    delegate_share: delegate_share__.unwrap_or_default(),\n                    delegate_expiry: delegate_expiry__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ValidatorInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for VerifyMessageRequest {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.message.is_empty() {\n            len += 1;\n        }\n        if !self.signature.is_empty() {\n            len += 1;\n        }\n        if !self.public_key.is_empty() {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.VerifyMessageRequest\", len)?;\n        if !self.message.is_empty() {\n            struct_ser.serialize_field(\"message\", &self.message)?;\n        }\n        if !self.signature.is_empty() {\n            struct_ser.serialize_field(\"signature\", &self.signature)?;\n        }\n        if !self.public_key.is_empty() {\n            struct_ser.serialize_field(\"publicKey\", &self.public_key)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for VerifyMessageRequest {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"message\",\n            \"signature\",\n            \"public_key\",\n            \"publicKey\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Message,\n            Signature,\n            PublicKey,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"message\" => Ok(GeneratedField::Message),\n                            \"signature\" => Ok(GeneratedField::Signature),\n                            \"publicKey\" | \"public_key\" => Ok(GeneratedField::PublicKey),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = VerifyMessageRequest;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.VerifyMessageRequest\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VerifyMessageRequest, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut message__ = None;\n                let mut signature__ = None;\n                let mut public_key__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Message => {\n                            if message__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"message\"));\n                            }\n                            message__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Signature => {\n                            if signature__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"signature\"));\n                            }\n                            signature__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::PublicKey => {\n                            if public_key__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"publicKey\"));\n                            }\n                            public_key__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(VerifyMessageRequest {\n                    message: message__.unwrap_or_default(),\n                    signature: signature__.unwrap_or_default(),\n                    public_key: public_key__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.VerifyMessageRequest\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for VerifyMessageResponse {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.is_valid {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.VerifyMessageResponse\", len)?;\n        if self.is_valid {\n            struct_ser.serialize_field(\"isValid\", &self.is_valid)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for VerifyMessageResponse {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"is_valid\",\n            \"isValid\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            IsValid,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"isValid\" | \"is_valid\" => Ok(GeneratedField::IsValid),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = VerifyMessageResponse;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.VerifyMessageResponse\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VerifyMessageResponse, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut is_valid__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::IsValid => {\n                            if is_valid__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"isValid\"));\n                            }\n                            is_valid__ = Some(map_.next_value()?);\n                        }\n                    }\n                }\n                Ok(VerifyMessageResponse {\n                    is_valid: is_valid__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.VerifyMessageResponse\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for VoteInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.r#type != 0 {\n            len += 1;\n        }\n        if !self.voter.is_empty() {\n            len += 1;\n        }\n        if !self.block_hash.is_empty() {\n            len += 1;\n        }\n        if self.round != 0 {\n            len += 1;\n        }\n        if self.cp_round != 0 {\n            len += 1;\n        }\n        if self.cp_value != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.VoteInfo\", len)?;\n        if self.r#type != 0 {\n            let v = VoteType::try_from(self.r#type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.r#type)))?;\n            struct_ser.serialize_field(\"type\", &v)?;\n        }\n        if !self.voter.is_empty() {\n            struct_ser.serialize_field(\"voter\", &self.voter)?;\n        }\n        if !self.block_hash.is_empty() {\n            struct_ser.serialize_field(\"blockHash\", &self.block_hash)?;\n        }\n        if self.round != 0 {\n            struct_ser.serialize_field(\"round\", &self.round)?;\n        }\n        if self.cp_round != 0 {\n            struct_ser.serialize_field(\"cpRound\", &self.cp_round)?;\n        }\n        if self.cp_value != 0 {\n            struct_ser.serialize_field(\"cpValue\", &self.cp_value)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for VoteInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"type\",\n            \"voter\",\n            \"block_hash\",\n            \"blockHash\",\n            \"round\",\n            \"cp_round\",\n            \"cpRound\",\n            \"cp_value\",\n            \"cpValue\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Type,\n            Voter,\n            BlockHash,\n            Round,\n            CpRound,\n            CpValue,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"type\" => Ok(GeneratedField::Type),\n                            \"voter\" => Ok(GeneratedField::Voter),\n                            \"blockHash\" | \"block_hash\" => Ok(GeneratedField::BlockHash),\n                            \"round\" => Ok(GeneratedField::Round),\n                            \"cpRound\" | \"cp_round\" => Ok(GeneratedField::CpRound),\n                            \"cpValue\" | \"cp_value\" => Ok(GeneratedField::CpValue),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = VoteInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.VoteInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<VoteInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut r#type__ = None;\n                let mut voter__ = None;\n                let mut block_hash__ = None;\n                let mut round__ = None;\n                let mut cp_round__ = None;\n                let mut cp_value__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Type => {\n                            if r#type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"type\"));\n                            }\n                            r#type__ = Some(map_.next_value::<VoteType>()? as i32);\n                        }\n                        GeneratedField::Voter => {\n                            if voter__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"voter\"));\n                            }\n                            voter__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::BlockHash => {\n                            if block_hash__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockHash\"));\n                            }\n                            block_hash__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Round => {\n                            if round__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"round\"));\n                            }\n                            round__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::CpRound => {\n                            if cp_round__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"cpRound\"));\n                            }\n                            cp_round__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::CpValue => {\n                            if cp_value__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"cpValue\"));\n                            }\n                            cp_value__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(VoteInfo {\n                    r#type: r#type__.unwrap_or_default(),\n                    voter: voter__.unwrap_or_default(),\n                    block_hash: block_hash__.unwrap_or_default(),\n                    round: round__.unwrap_or_default(),\n                    cp_round: cp_round__.unwrap_or_default(),\n                    cp_value: cp_value__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.VoteInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for VoteType {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let variant = match self {\n            Self::Unspecified => \"VOTE_TYPE_UNSPECIFIED\",\n            Self::Prepare => \"VOTE_TYPE_PREPARE\",\n            Self::Precommit => \"VOTE_TYPE_PRECOMMIT\",\n            Self::CpPreVote => \"VOTE_TYPE_CP_PRE_VOTE\",\n            Self::CpMainVote => \"VOTE_TYPE_CP_MAIN_VOTE\",\n            Self::CpDecided => \"VOTE_TYPE_CP_DECIDED\",\n        };\n        serializer.serialize_str(variant)\n    }\n}\nimpl<'de> serde::Deserialize<'de> for VoteType {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"VOTE_TYPE_UNSPECIFIED\",\n            \"VOTE_TYPE_PREPARE\",\n            \"VOTE_TYPE_PRECOMMIT\",\n            \"VOTE_TYPE_CP_PRE_VOTE\",\n            \"VOTE_TYPE_CP_MAIN_VOTE\",\n            \"VOTE_TYPE_CP_DECIDED\",\n        ];\n\n        struct GeneratedVisitor;\n\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = VoteType;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                write!(formatter, \"expected one of: {:?}\", &FIELDS)\n            }\n\n            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)\n                    })\n            }\n\n            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                i32::try_from(v)\n                    .ok()\n                    .and_then(|x| x.try_into().ok())\n                    .ok_or_else(|| {\n                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)\n                    })\n            }\n\n            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>\n            where\n                E: serde::de::Error,\n            {\n                match value {\n                    \"VOTE_TYPE_UNSPECIFIED\" => Ok(VoteType::Unspecified),\n                    \"VOTE_TYPE_PREPARE\" => Ok(VoteType::Prepare),\n                    \"VOTE_TYPE_PRECOMMIT\" => Ok(VoteType::Precommit),\n                    \"VOTE_TYPE_CP_PRE_VOTE\" => Ok(VoteType::CpPreVote),\n                    \"VOTE_TYPE_CP_MAIN_VOTE\" => Ok(VoteType::CpMainVote),\n                    \"VOTE_TYPE_CP_DECIDED\" => Ok(VoteType::CpDecided),\n                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),\n                }\n            }\n        }\n        deserializer.deserialize_any(GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for WalletTransactionInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if self.no != 0 {\n            len += 1;\n        }\n        if !self.tx_id.is_empty() {\n            len += 1;\n        }\n        if !self.sender.is_empty() {\n            len += 1;\n        }\n        if !self.receiver.is_empty() {\n            len += 1;\n        }\n        if self.direction != 0 {\n            len += 1;\n        }\n        if self.amount != 0 {\n            len += 1;\n        }\n        if self.fee != 0 {\n            len += 1;\n        }\n        if !self.memo.is_empty() {\n            len += 1;\n        }\n        if self.status != 0 {\n            len += 1;\n        }\n        if self.block_height != 0 {\n            len += 1;\n        }\n        if self.payload_type != 0 {\n            len += 1;\n        }\n        if !self.data.is_empty() {\n            len += 1;\n        }\n        if !self.comment.is_empty() {\n            len += 1;\n        }\n        if self.created_at != 0 {\n            len += 1;\n        }\n        if self.updated_at != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.WalletTransactionInfo\", len)?;\n        if self.no != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"no\", ToString::to_string(&self.no).as_str())?;\n        }\n        if !self.tx_id.is_empty() {\n            struct_ser.serialize_field(\"txId\", &self.tx_id)?;\n        }\n        if !self.sender.is_empty() {\n            struct_ser.serialize_field(\"sender\", &self.sender)?;\n        }\n        if !self.receiver.is_empty() {\n            struct_ser.serialize_field(\"receiver\", &self.receiver)?;\n        }\n        if self.direction != 0 {\n            let v = TxDirection::try_from(self.direction)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.direction)))?;\n            struct_ser.serialize_field(\"direction\", &v)?;\n        }\n        if self.amount != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"amount\", ToString::to_string(&self.amount).as_str())?;\n        }\n        if self.fee != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"fee\", ToString::to_string(&self.fee).as_str())?;\n        }\n        if !self.memo.is_empty() {\n            struct_ser.serialize_field(\"memo\", &self.memo)?;\n        }\n        if self.status != 0 {\n            let v = TransactionStatus::try_from(self.status)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.status)))?;\n            struct_ser.serialize_field(\"status\", &v)?;\n        }\n        if self.block_height != 0 {\n            struct_ser.serialize_field(\"blockHeight\", &self.block_height)?;\n        }\n        if self.payload_type != 0 {\n            let v = PayloadType::try_from(self.payload_type)\n                .map_err(|_| serde::ser::Error::custom(format!(\"Invalid variant {}\", self.payload_type)))?;\n            struct_ser.serialize_field(\"payloadType\", &v)?;\n        }\n        if !self.data.is_empty() {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"data\", pbjson::private::base64::encode(&self.data).as_str())?;\n        }\n        if !self.comment.is_empty() {\n            struct_ser.serialize_field(\"comment\", &self.comment)?;\n        }\n        if self.created_at != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"createdAt\", ToString::to_string(&self.created_at).as_str())?;\n        }\n        if self.updated_at != 0 {\n            #[allow(clippy::needless_borrow)]\n            #[allow(clippy::needless_borrows_for_generic_args)]\n            struct_ser.serialize_field(\"updatedAt\", ToString::to_string(&self.updated_at).as_str())?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for WalletTransactionInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"no\",\n            \"tx_id\",\n            \"txId\",\n            \"sender\",\n            \"receiver\",\n            \"direction\",\n            \"amount\",\n            \"fee\",\n            \"memo\",\n            \"status\",\n            \"block_height\",\n            \"blockHeight\",\n            \"payload_type\",\n            \"payloadType\",\n            \"data\",\n            \"comment\",\n            \"created_at\",\n            \"createdAt\",\n            \"updated_at\",\n            \"updatedAt\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            No,\n            TxId,\n            Sender,\n            Receiver,\n            Direction,\n            Amount,\n            Fee,\n            Memo,\n            Status,\n            BlockHeight,\n            PayloadType,\n            Data,\n            Comment,\n            CreatedAt,\n            UpdatedAt,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"no\" => Ok(GeneratedField::No),\n                            \"txId\" | \"tx_id\" => Ok(GeneratedField::TxId),\n                            \"sender\" => Ok(GeneratedField::Sender),\n                            \"receiver\" => Ok(GeneratedField::Receiver),\n                            \"direction\" => Ok(GeneratedField::Direction),\n                            \"amount\" => Ok(GeneratedField::Amount),\n                            \"fee\" => Ok(GeneratedField::Fee),\n                            \"memo\" => Ok(GeneratedField::Memo),\n                            \"status\" => Ok(GeneratedField::Status),\n                            \"blockHeight\" | \"block_height\" => Ok(GeneratedField::BlockHeight),\n                            \"payloadType\" | \"payload_type\" => Ok(GeneratedField::PayloadType),\n                            \"data\" => Ok(GeneratedField::Data),\n                            \"comment\" => Ok(GeneratedField::Comment),\n                            \"createdAt\" | \"created_at\" => Ok(GeneratedField::CreatedAt),\n                            \"updatedAt\" | \"updated_at\" => Ok(GeneratedField::UpdatedAt),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = WalletTransactionInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.WalletTransactionInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<WalletTransactionInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut no__ = None;\n                let mut tx_id__ = None;\n                let mut sender__ = None;\n                let mut receiver__ = None;\n                let mut direction__ = None;\n                let mut amount__ = None;\n                let mut fee__ = None;\n                let mut memo__ = None;\n                let mut status__ = None;\n                let mut block_height__ = None;\n                let mut payload_type__ = None;\n                let mut data__ = None;\n                let mut comment__ = None;\n                let mut created_at__ = None;\n                let mut updated_at__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::No => {\n                            if no__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"no\"));\n                            }\n                            no__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::TxId => {\n                            if tx_id__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"txId\"));\n                            }\n                            tx_id__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Sender => {\n                            if sender__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"sender\"));\n                            }\n                            sender__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Receiver => {\n                            if receiver__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"receiver\"));\n                            }\n                            receiver__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Direction => {\n                            if direction__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"direction\"));\n                            }\n                            direction__ = Some(map_.next_value::<TxDirection>()? as i32);\n                        }\n                        GeneratedField::Amount => {\n                            if amount__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"amount\"));\n                            }\n                            amount__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Fee => {\n                            if fee__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"fee\"));\n                            }\n                            fee__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Memo => {\n                            if memo__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"memo\"));\n                            }\n                            memo__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Status => {\n                            if status__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"status\"));\n                            }\n                            status__ = Some(map_.next_value::<TransactionStatus>()? as i32);\n                        }\n                        GeneratedField::BlockHeight => {\n                            if block_height__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"blockHeight\"));\n                            }\n                            block_height__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::PayloadType => {\n                            if payload_type__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"payloadType\"));\n                            }\n                            payload_type__ = Some(map_.next_value::<PayloadType>()? as i32);\n                        }\n                        GeneratedField::Data => {\n                            if data__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"data\"));\n                            }\n                            data__ = \n                                Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::Comment => {\n                            if comment__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"comment\"));\n                            }\n                            comment__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::CreatedAt => {\n                            if created_at__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"createdAt\"));\n                            }\n                            created_at__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                        GeneratedField::UpdatedAt => {\n                            if updated_at__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"updatedAt\"));\n                            }\n                            updated_at__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(WalletTransactionInfo {\n                    no: no__.unwrap_or_default(),\n                    tx_id: tx_id__.unwrap_or_default(),\n                    sender: sender__.unwrap_or_default(),\n                    receiver: receiver__.unwrap_or_default(),\n                    direction: direction__.unwrap_or_default(),\n                    amount: amount__.unwrap_or_default(),\n                    fee: fee__.unwrap_or_default(),\n                    memo: memo__.unwrap_or_default(),\n                    status: status__.unwrap_or_default(),\n                    block_height: block_height__.unwrap_or_default(),\n                    payload_type: payload_type__.unwrap_or_default(),\n                    data: data__.unwrap_or_default(),\n                    comment: comment__.unwrap_or_default(),\n                    created_at: created_at__.unwrap_or_default(),\n                    updated_at: updated_at__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.WalletTransactionInfo\", FIELDS, GeneratedVisitor)\n    }\n}\nimpl serde::Serialize for ZmqPublisherInfo {\n    #[allow(deprecated)]\n    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        use serde::ser::SerializeStruct;\n        let mut len = 0;\n        if !self.topic.is_empty() {\n            len += 1;\n        }\n        if !self.address.is_empty() {\n            len += 1;\n        }\n        if self.hwm != 0 {\n            len += 1;\n        }\n        let mut struct_ser = serializer.serialize_struct(\"pactus.ZMQPublisherInfo\", len)?;\n        if !self.topic.is_empty() {\n            struct_ser.serialize_field(\"topic\", &self.topic)?;\n        }\n        if !self.address.is_empty() {\n            struct_ser.serialize_field(\"address\", &self.address)?;\n        }\n        if self.hwm != 0 {\n            struct_ser.serialize_field(\"hwm\", &self.hwm)?;\n        }\n        struct_ser.end()\n    }\n}\nimpl<'de> serde::Deserialize<'de> for ZmqPublisherInfo {\n    #[allow(deprecated)]\n    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>\n    where\n        D: serde::Deserializer<'de>,\n    {\n        const FIELDS: &[&str] = &[\n            \"topic\",\n            \"address\",\n            \"hwm\",\n        ];\n\n        #[allow(clippy::enum_variant_names)]\n        enum GeneratedField {\n            Topic,\n            Address,\n            Hwm,\n        }\n        impl<'de> serde::Deserialize<'de> for GeneratedField {\n            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>\n            where\n                D: serde::Deserializer<'de>,\n            {\n                struct GeneratedVisitor;\n\n                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n                    type Value = GeneratedField;\n\n                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                        write!(formatter, \"expected one of: {:?}\", &FIELDS)\n                    }\n\n                    #[allow(unused_variables)]\n                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>\n                    where\n                        E: serde::de::Error,\n                    {\n                        match value {\n                            \"topic\" => Ok(GeneratedField::Topic),\n                            \"address\" => Ok(GeneratedField::Address),\n                            \"hwm\" => Ok(GeneratedField::Hwm),\n                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),\n                        }\n                    }\n                }\n                deserializer.deserialize_identifier(GeneratedVisitor)\n            }\n        }\n        struct GeneratedVisitor;\n        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {\n            type Value = ZmqPublisherInfo;\n\n            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n                formatter.write_str(\"struct pactus.ZMQPublisherInfo\")\n            }\n\n            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ZmqPublisherInfo, V::Error>\n                where\n                    V: serde::de::MapAccess<'de>,\n            {\n                let mut topic__ = None;\n                let mut address__ = None;\n                let mut hwm__ = None;\n                while let Some(k) = map_.next_key()? {\n                    match k {\n                        GeneratedField::Topic => {\n                            if topic__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"topic\"));\n                            }\n                            topic__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Address => {\n                            if address__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"address\"));\n                            }\n                            address__ = Some(map_.next_value()?);\n                        }\n                        GeneratedField::Hwm => {\n                            if hwm__.is_some() {\n                                return Err(serde::de::Error::duplicate_field(\"hwm\"));\n                            }\n                            hwm__ = \n                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)\n                            ;\n                        }\n                    }\n                }\n                Ok(ZmqPublisherInfo {\n                    topic: topic__.unwrap_or_default(),\n                    address: address__.unwrap_or_default(),\n                    hwm: hwm__.unwrap_or_default(),\n                })\n            }\n        }\n        deserializer.deserialize_struct(\"pactus.ZMQPublisherInfo\", FIELDS, GeneratedVisitor)\n    }\n}\n"
  },
  {
    "path": "www/grpc/gen/rust/pactus.tonic.rs",
    "content": "// @generated\n/// Generated client implementations.\npub mod transaction_client {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    use tonic::codegen::http::Uri;\n    #[derive(Debug, Clone)]\n    pub struct TransactionClient<T> {\n        inner: tonic::client::Grpc<T>,\n    }\n    impl TransactionClient<tonic::transport::Channel> {\n        /// Attempt to create a new client by connecting to a given endpoint.\n        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>\n        where\n            D: TryInto<tonic::transport::Endpoint>,\n            D::Error: Into<StdError>,\n        {\n            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;\n            Ok(Self::new(conn))\n        }\n    }\n    impl<T> TransactionClient<T>\n    where\n        T: tonic::client::GrpcService<tonic::body::Body>,\n        T::Error: Into<StdError>,\n        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,\n        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,\n    {\n        pub fn new(inner: T) -> Self {\n            let inner = tonic::client::Grpc::new(inner);\n            Self { inner }\n        }\n        pub fn with_origin(inner: T, origin: Uri) -> Self {\n            let inner = tonic::client::Grpc::with_origin(inner, origin);\n            Self { inner }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> TransactionClient<InterceptedService<T, F>>\n        where\n            F: tonic::service::Interceptor,\n            T::ResponseBody: Default,\n            T: tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n                Response = http::Response<\n                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,\n                >,\n            >,\n            <T as tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,\n        {\n            TransactionClient::new(InterceptedService::new(inner, interceptor))\n        }\n        /// Compress requests with the given encoding.\n        ///\n        /// This requires the server to support it otherwise it might respond with an\n        /// error.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.send_compressed(encoding);\n            self\n        }\n        /// Enable decompressing responses.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.accept_compressed(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_decoding_message_size(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_encoding_message_size(limit);\n            self\n        }\n        pub async fn get_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"GetTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn calculate_fee(\n            &mut self,\n            request: impl tonic::IntoRequest<super::CalculateFeeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CalculateFeeResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/CalculateFee\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"CalculateFee\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn broadcast_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::BroadcastTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::BroadcastTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/BroadcastTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"BroadcastTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_raw_transfer_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetRawTransferTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetRawTransferTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(\n                    GrpcMethod::new(\"pactus.Transaction\", \"GetRawTransferTransaction\"),\n                );\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_raw_bond_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetRawBondTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetRawBondTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"GetRawBondTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_raw_unbond_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetRawUnbondTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetRawUnbondTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(\n                    GrpcMethod::new(\"pactus.Transaction\", \"GetRawUnbondTransaction\"),\n                );\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_raw_withdraw_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetRawWithdrawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetRawWithdrawTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(\n                    GrpcMethod::new(\"pactus.Transaction\", \"GetRawWithdrawTransaction\"),\n                );\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_raw_batch_transfer_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<\n                super::GetRawBatchTransferTransactionRequest,\n            >,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/GetRawBatchTransferTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(\n                    GrpcMethod::new(\n                        \"pactus.Transaction\",\n                        \"GetRawBatchTransferTransaction\",\n                    ),\n                );\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn decode_raw_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::DecodeRawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::DecodeRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/DecodeRawTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"DecodeRawTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn check_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::CheckTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CheckTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Transaction/CheckTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Transaction\", \"CheckTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n    }\n}\n/// Generated server implementations.\npub mod transaction_server {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    /// Generated trait containing gRPC methods that should be implemented for use with TransactionServer.\n    #[async_trait]\n    pub trait Transaction: std::marker::Send + std::marker::Sync + 'static {\n        async fn get_transaction(\n            &self,\n            request: tonic::Request<super::GetTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn calculate_fee(\n            &self,\n            request: tonic::Request<super::CalculateFeeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CalculateFeeResponse>,\n            tonic::Status,\n        >;\n        async fn broadcast_transaction(\n            &self,\n            request: tonic::Request<super::BroadcastTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::BroadcastTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn get_raw_transfer_transaction(\n            &self,\n            request: tonic::Request<super::GetRawTransferTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn get_raw_bond_transaction(\n            &self,\n            request: tonic::Request<super::GetRawBondTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn get_raw_unbond_transaction(\n            &self,\n            request: tonic::Request<super::GetRawUnbondTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn get_raw_withdraw_transaction(\n            &self,\n            request: tonic::Request<super::GetRawWithdrawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn get_raw_batch_transfer_transaction(\n            &self,\n            request: tonic::Request<super::GetRawBatchTransferTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn decode_raw_transaction(\n            &self,\n            request: tonic::Request<super::DecodeRawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::DecodeRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn check_transaction(\n            &self,\n            request: tonic::Request<super::CheckTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CheckTransactionResponse>,\n            tonic::Status,\n        >;\n    }\n    #[derive(Debug)]\n    pub struct TransactionServer<T> {\n        inner: Arc<T>,\n        accept_compression_encodings: EnabledCompressionEncodings,\n        send_compression_encodings: EnabledCompressionEncodings,\n        max_decoding_message_size: Option<usize>,\n        max_encoding_message_size: Option<usize>,\n    }\n    impl<T> TransactionServer<T> {\n        pub fn new(inner: T) -> Self {\n            Self::from_arc(Arc::new(inner))\n        }\n        pub fn from_arc(inner: Arc<T>) -> Self {\n            Self {\n                inner,\n                accept_compression_encodings: Default::default(),\n                send_compression_encodings: Default::default(),\n                max_decoding_message_size: None,\n                max_encoding_message_size: None,\n            }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> InterceptedService<Self, F>\n        where\n            F: tonic::service::Interceptor,\n        {\n            InterceptedService::new(Self::new(inner), interceptor)\n        }\n        /// Enable decompressing requests with the given encoding.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.accept_compression_encodings.enable(encoding);\n            self\n        }\n        /// Compress responses with the given encoding, if the client supports it.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.send_compression_encodings.enable(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.max_decoding_message_size = Some(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.max_encoding_message_size = Some(limit);\n            self\n        }\n    }\n    impl<T, B> tonic::codegen::Service<http::Request<B>> for TransactionServer<T>\n    where\n        T: Transaction,\n        B: Body + std::marker::Send + 'static,\n        B::Error: Into<StdError> + std::marker::Send + 'static,\n    {\n        type Response = http::Response<tonic::body::Body>;\n        type Error = std::convert::Infallible;\n        type Future = BoxFuture<Self::Response, Self::Error>;\n        fn poll_ready(\n            &mut self,\n            _cx: &mut Context<'_>,\n        ) -> Poll<std::result::Result<(), Self::Error>> {\n            Poll::Ready(Ok(()))\n        }\n        fn call(&mut self, req: http::Request<B>) -> Self::Future {\n            match req.uri().path() {\n                \"/pactus.Transaction/GetTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::GetTransactionRequest>\n                    for GetTransactionSvc<T> {\n                        type Response = super::GetTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_transaction(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/CalculateFee\" => {\n                    #[allow(non_camel_case_types)]\n                    struct CalculateFeeSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::CalculateFeeRequest>\n                    for CalculateFeeSvc<T> {\n                        type Response = super::CalculateFeeResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::CalculateFeeRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::calculate_fee(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = CalculateFeeSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/BroadcastTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct BroadcastTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::BroadcastTransactionRequest>\n                    for BroadcastTransactionSvc<T> {\n                        type Response = super::BroadcastTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::BroadcastTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::broadcast_transaction(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = BroadcastTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/GetRawTransferTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetRawTransferTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<\n                        super::GetRawTransferTransactionRequest,\n                    > for GetRawTransferTransactionSvc<T> {\n                        type Response = super::GetRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<\n                                super::GetRawTransferTransactionRequest,\n                            >,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_raw_transfer_transaction(\n                                        &inner,\n                                        request,\n                                    )\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetRawTransferTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/GetRawBondTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetRawBondTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::GetRawBondTransactionRequest>\n                    for GetRawBondTransactionSvc<T> {\n                        type Response = super::GetRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetRawBondTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_raw_bond_transaction(\n                                        &inner,\n                                        request,\n                                    )\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetRawBondTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/GetRawUnbondTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetRawUnbondTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::GetRawUnbondTransactionRequest>\n                    for GetRawUnbondTransactionSvc<T> {\n                        type Response = super::GetRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<\n                                super::GetRawUnbondTransactionRequest,\n                            >,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_raw_unbond_transaction(\n                                        &inner,\n                                        request,\n                                    )\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetRawUnbondTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/GetRawWithdrawTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetRawWithdrawTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<\n                        super::GetRawWithdrawTransactionRequest,\n                    > for GetRawWithdrawTransactionSvc<T> {\n                        type Response = super::GetRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<\n                                super::GetRawWithdrawTransactionRequest,\n                            >,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_raw_withdraw_transaction(\n                                        &inner,\n                                        request,\n                                    )\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetRawWithdrawTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/GetRawBatchTransferTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetRawBatchTransferTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<\n                        super::GetRawBatchTransferTransactionRequest,\n                    > for GetRawBatchTransferTransactionSvc<T> {\n                        type Response = super::GetRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<\n                                super::GetRawBatchTransferTransactionRequest,\n                            >,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::get_raw_batch_transfer_transaction(\n                                        &inner,\n                                        request,\n                                    )\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetRawBatchTransferTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/DecodeRawTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct DecodeRawTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::DecodeRawTransactionRequest>\n                    for DecodeRawTransactionSvc<T> {\n                        type Response = super::DecodeRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::DecodeRawTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::decode_raw_transaction(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = DecodeRawTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Transaction/CheckTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct CheckTransactionSvc<T: Transaction>(pub Arc<T>);\n                    impl<\n                        T: Transaction,\n                    > tonic::server::UnaryService<super::CheckTransactionRequest>\n                    for CheckTransactionSvc<T> {\n                        type Response = super::CheckTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::CheckTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Transaction>::check_transaction(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = CheckTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                _ => {\n                    Box::pin(async move {\n                        let mut response = http::Response::new(\n                            tonic::body::Body::default(),\n                        );\n                        let headers = response.headers_mut();\n                        headers\n                            .insert(\n                                tonic::Status::GRPC_STATUS,\n                                (tonic::Code::Unimplemented as i32).into(),\n                            );\n                        headers\n                            .insert(\n                                http::header::CONTENT_TYPE,\n                                tonic::metadata::GRPC_CONTENT_TYPE,\n                            );\n                        Ok(response)\n                    })\n                }\n            }\n        }\n    }\n    impl<T> Clone for TransactionServer<T> {\n        fn clone(&self) -> Self {\n            let inner = self.inner.clone();\n            Self {\n                inner,\n                accept_compression_encodings: self.accept_compression_encodings,\n                send_compression_encodings: self.send_compression_encodings,\n                max_decoding_message_size: self.max_decoding_message_size,\n                max_encoding_message_size: self.max_encoding_message_size,\n            }\n        }\n    }\n    /// Generated gRPC service name\n    pub const SERVICE_NAME: &str = \"pactus.Transaction\";\n    impl<T> tonic::server::NamedService for TransactionServer<T> {\n        const NAME: &'static str = SERVICE_NAME;\n    }\n}\n/// Generated client implementations.\npub mod blockchain_client {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    use tonic::codegen::http::Uri;\n    #[derive(Debug, Clone)]\n    pub struct BlockchainClient<T> {\n        inner: tonic::client::Grpc<T>,\n    }\n    impl BlockchainClient<tonic::transport::Channel> {\n        /// Attempt to create a new client by connecting to a given endpoint.\n        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>\n        where\n            D: TryInto<tonic::transport::Endpoint>,\n            D::Error: Into<StdError>,\n        {\n            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;\n            Ok(Self::new(conn))\n        }\n    }\n    impl<T> BlockchainClient<T>\n    where\n        T: tonic::client::GrpcService<tonic::body::Body>,\n        T::Error: Into<StdError>,\n        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,\n        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,\n    {\n        pub fn new(inner: T) -> Self {\n            let inner = tonic::client::Grpc::new(inner);\n            Self { inner }\n        }\n        pub fn with_origin(inner: T, origin: Uri) -> Self {\n            let inner = tonic::client::Grpc::with_origin(inner, origin);\n            Self { inner }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> BlockchainClient<InterceptedService<T, F>>\n        where\n            F: tonic::service::Interceptor,\n            T::ResponseBody: Default,\n            T: tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n                Response = http::Response<\n                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,\n                >,\n            >,\n            <T as tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,\n        {\n            BlockchainClient::new(InterceptedService::new(inner, interceptor))\n        }\n        /// Compress requests with the given encoding.\n        ///\n        /// This requires the server to support it otherwise it might respond with an\n        /// error.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.send_compressed(encoding);\n            self\n        }\n        /// Enable decompressing responses.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.accept_compressed(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_decoding_message_size(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_encoding_message_size(limit);\n            self\n        }\n        pub async fn get_block(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetBlockRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetBlock\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetBlock\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_block_hash(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetBlockHashRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockHashResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetBlockHash\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetBlockHash\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_block_height(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetBlockHeightRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockHeightResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetBlockHeight\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetBlockHeight\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_blockchain_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetBlockchainInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockchainInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetBlockchainInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetBlockchainInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_committee_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetCommitteeInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetCommitteeInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetCommitteeInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetCommitteeInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_consensus_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetConsensusInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetConsensusInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetConsensusInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetConsensusInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_account(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetAccountRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetAccountResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetAccount\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetAccount\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_validator(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetValidatorRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetValidator\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetValidator\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_validator_by_number(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetValidatorByNumberRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetValidatorByNumber\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetValidatorByNumber\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_validator_addresses(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetValidatorAddressesRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorAddressesResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetValidatorAddresses\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetValidatorAddresses\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_public_key(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetPublicKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetPublicKeyResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetPublicKey\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetPublicKey\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_tx_pool_content(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetTxPoolContentRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTxPoolContentResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Blockchain/GetTxPoolContent\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Blockchain\", \"GetTxPoolContent\"));\n            self.inner.unary(req, path, codec).await\n        }\n    }\n}\n/// Generated server implementations.\npub mod blockchain_server {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    /// Generated trait containing gRPC methods that should be implemented for use with BlockchainServer.\n    #[async_trait]\n    pub trait Blockchain: std::marker::Send + std::marker::Sync + 'static {\n        async fn get_block(\n            &self,\n            request: tonic::Request<super::GetBlockRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockResponse>,\n            tonic::Status,\n        >;\n        async fn get_block_hash(\n            &self,\n            request: tonic::Request<super::GetBlockHashRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockHashResponse>,\n            tonic::Status,\n        >;\n        async fn get_block_height(\n            &self,\n            request: tonic::Request<super::GetBlockHeightRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockHeightResponse>,\n            tonic::Status,\n        >;\n        async fn get_blockchain_info(\n            &self,\n            request: tonic::Request<super::GetBlockchainInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetBlockchainInfoResponse>,\n            tonic::Status,\n        >;\n        async fn get_committee_info(\n            &self,\n            request: tonic::Request<super::GetCommitteeInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetCommitteeInfoResponse>,\n            tonic::Status,\n        >;\n        async fn get_consensus_info(\n            &self,\n            request: tonic::Request<super::GetConsensusInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetConsensusInfoResponse>,\n            tonic::Status,\n        >;\n        async fn get_account(\n            &self,\n            request: tonic::Request<super::GetAccountRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetAccountResponse>,\n            tonic::Status,\n        >;\n        async fn get_validator(\n            &self,\n            request: tonic::Request<super::GetValidatorRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorResponse>,\n            tonic::Status,\n        >;\n        async fn get_validator_by_number(\n            &self,\n            request: tonic::Request<super::GetValidatorByNumberRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorResponse>,\n            tonic::Status,\n        >;\n        async fn get_validator_addresses(\n            &self,\n            request: tonic::Request<super::GetValidatorAddressesRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorAddressesResponse>,\n            tonic::Status,\n        >;\n        async fn get_public_key(\n            &self,\n            request: tonic::Request<super::GetPublicKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetPublicKeyResponse>,\n            tonic::Status,\n        >;\n        async fn get_tx_pool_content(\n            &self,\n            request: tonic::Request<super::GetTxPoolContentRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTxPoolContentResponse>,\n            tonic::Status,\n        >;\n    }\n    #[derive(Debug)]\n    pub struct BlockchainServer<T> {\n        inner: Arc<T>,\n        accept_compression_encodings: EnabledCompressionEncodings,\n        send_compression_encodings: EnabledCompressionEncodings,\n        max_decoding_message_size: Option<usize>,\n        max_encoding_message_size: Option<usize>,\n    }\n    impl<T> BlockchainServer<T> {\n        pub fn new(inner: T) -> Self {\n            Self::from_arc(Arc::new(inner))\n        }\n        pub fn from_arc(inner: Arc<T>) -> Self {\n            Self {\n                inner,\n                accept_compression_encodings: Default::default(),\n                send_compression_encodings: Default::default(),\n                max_decoding_message_size: None,\n                max_encoding_message_size: None,\n            }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> InterceptedService<Self, F>\n        where\n            F: tonic::service::Interceptor,\n        {\n            InterceptedService::new(Self::new(inner), interceptor)\n        }\n        /// Enable decompressing requests with the given encoding.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.accept_compression_encodings.enable(encoding);\n            self\n        }\n        /// Compress responses with the given encoding, if the client supports it.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.send_compression_encodings.enable(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.max_decoding_message_size = Some(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.max_encoding_message_size = Some(limit);\n            self\n        }\n    }\n    impl<T, B> tonic::codegen::Service<http::Request<B>> for BlockchainServer<T>\n    where\n        T: Blockchain,\n        B: Body + std::marker::Send + 'static,\n        B::Error: Into<StdError> + std::marker::Send + 'static,\n    {\n        type Response = http::Response<tonic::body::Body>;\n        type Error = std::convert::Infallible;\n        type Future = BoxFuture<Self::Response, Self::Error>;\n        fn poll_ready(\n            &mut self,\n            _cx: &mut Context<'_>,\n        ) -> Poll<std::result::Result<(), Self::Error>> {\n            Poll::Ready(Ok(()))\n        }\n        fn call(&mut self, req: http::Request<B>) -> Self::Future {\n            match req.uri().path() {\n                \"/pactus.Blockchain/GetBlock\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetBlockSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetBlockRequest>\n                    for GetBlockSvc<T> {\n                        type Response = super::GetBlockResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetBlockRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_block(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetBlockSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetBlockHash\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetBlockHashSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetBlockHashRequest>\n                    for GetBlockHashSvc<T> {\n                        type Response = super::GetBlockHashResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetBlockHashRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_block_hash(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetBlockHashSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetBlockHeight\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetBlockHeightSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetBlockHeightRequest>\n                    for GetBlockHeightSvc<T> {\n                        type Response = super::GetBlockHeightResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetBlockHeightRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_block_height(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetBlockHeightSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetBlockchainInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetBlockchainInfoSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetBlockchainInfoRequest>\n                    for GetBlockchainInfoSvc<T> {\n                        type Response = super::GetBlockchainInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetBlockchainInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_blockchain_info(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetBlockchainInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetCommitteeInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetCommitteeInfoSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetCommitteeInfoRequest>\n                    for GetCommitteeInfoSvc<T> {\n                        type Response = super::GetCommitteeInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetCommitteeInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_committee_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetCommitteeInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetConsensusInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetConsensusInfoSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetConsensusInfoRequest>\n                    for GetConsensusInfoSvc<T> {\n                        type Response = super::GetConsensusInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetConsensusInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_consensus_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetConsensusInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetAccount\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetAccountSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetAccountRequest>\n                    for GetAccountSvc<T> {\n                        type Response = super::GetAccountResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetAccountRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_account(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetAccountSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetValidator\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetValidatorSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetValidatorRequest>\n                    for GetValidatorSvc<T> {\n                        type Response = super::GetValidatorResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetValidatorRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_validator(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetValidatorSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetValidatorByNumber\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetValidatorByNumberSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetValidatorByNumberRequest>\n                    for GetValidatorByNumberSvc<T> {\n                        type Response = super::GetValidatorResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetValidatorByNumberRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_validator_by_number(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetValidatorByNumberSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetValidatorAddresses\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetValidatorAddressesSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetValidatorAddressesRequest>\n                    for GetValidatorAddressesSvc<T> {\n                        type Response = super::GetValidatorAddressesResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetValidatorAddressesRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_validator_addresses(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetValidatorAddressesSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetPublicKey\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetPublicKeySvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetPublicKeyRequest>\n                    for GetPublicKeySvc<T> {\n                        type Response = super::GetPublicKeyResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetPublicKeyRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_public_key(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetPublicKeySvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Blockchain/GetTxPoolContent\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetTxPoolContentSvc<T: Blockchain>(pub Arc<T>);\n                    impl<\n                        T: Blockchain,\n                    > tonic::server::UnaryService<super::GetTxPoolContentRequest>\n                    for GetTxPoolContentSvc<T> {\n                        type Response = super::GetTxPoolContentResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetTxPoolContentRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Blockchain>::get_tx_pool_content(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetTxPoolContentSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                _ => {\n                    Box::pin(async move {\n                        let mut response = http::Response::new(\n                            tonic::body::Body::default(),\n                        );\n                        let headers = response.headers_mut();\n                        headers\n                            .insert(\n                                tonic::Status::GRPC_STATUS,\n                                (tonic::Code::Unimplemented as i32).into(),\n                            );\n                        headers\n                            .insert(\n                                http::header::CONTENT_TYPE,\n                                tonic::metadata::GRPC_CONTENT_TYPE,\n                            );\n                        Ok(response)\n                    })\n                }\n            }\n        }\n    }\n    impl<T> Clone for BlockchainServer<T> {\n        fn clone(&self) -> Self {\n            let inner = self.inner.clone();\n            Self {\n                inner,\n                accept_compression_encodings: self.accept_compression_encodings,\n                send_compression_encodings: self.send_compression_encodings,\n                max_decoding_message_size: self.max_decoding_message_size,\n                max_encoding_message_size: self.max_encoding_message_size,\n            }\n        }\n    }\n    /// Generated gRPC service name\n    pub const SERVICE_NAME: &str = \"pactus.Blockchain\";\n    impl<T> tonic::server::NamedService for BlockchainServer<T> {\n        const NAME: &'static str = SERVICE_NAME;\n    }\n}\n/// Generated client implementations.\npub mod network_client {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    use tonic::codegen::http::Uri;\n    #[derive(Debug, Clone)]\n    pub struct NetworkClient<T> {\n        inner: tonic::client::Grpc<T>,\n    }\n    impl NetworkClient<tonic::transport::Channel> {\n        /// Attempt to create a new client by connecting to a given endpoint.\n        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>\n        where\n            D: TryInto<tonic::transport::Endpoint>,\n            D::Error: Into<StdError>,\n        {\n            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;\n            Ok(Self::new(conn))\n        }\n    }\n    impl<T> NetworkClient<T>\n    where\n        T: tonic::client::GrpcService<tonic::body::Body>,\n        T::Error: Into<StdError>,\n        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,\n        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,\n    {\n        pub fn new(inner: T) -> Self {\n            let inner = tonic::client::Grpc::new(inner);\n            Self { inner }\n        }\n        pub fn with_origin(inner: T, origin: Uri) -> Self {\n            let inner = tonic::client::Grpc::with_origin(inner, origin);\n            Self { inner }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> NetworkClient<InterceptedService<T, F>>\n        where\n            F: tonic::service::Interceptor,\n            T::ResponseBody: Default,\n            T: tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n                Response = http::Response<\n                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,\n                >,\n            >,\n            <T as tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,\n        {\n            NetworkClient::new(InterceptedService::new(inner, interceptor))\n        }\n        /// Compress requests with the given encoding.\n        ///\n        /// This requires the server to support it otherwise it might respond with an\n        /// error.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.send_compressed(encoding);\n            self\n        }\n        /// Enable decompressing responses.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.accept_compressed(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_decoding_message_size(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_encoding_message_size(limit);\n            self\n        }\n        pub async fn get_network_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetNetworkInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNetworkInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Network/GetNetworkInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Network\", \"GetNetworkInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn list_peers(\n            &mut self,\n            request: impl tonic::IntoRequest<super::ListPeersRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListPeersResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\"/pactus.Network/ListPeers\");\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Network\", \"ListPeers\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_node_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetNodeInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNodeInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Network/GetNodeInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Network\", \"GetNodeInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn ping(\n            &mut self,\n            request: impl tonic::IntoRequest<super::PingRequest>,\n        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\"/pactus.Network/Ping\");\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Network\", \"Ping\"));\n            self.inner.unary(req, path, codec).await\n        }\n    }\n}\n/// Generated server implementations.\npub mod network_server {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    /// Generated trait containing gRPC methods that should be implemented for use with NetworkServer.\n    #[async_trait]\n    pub trait Network: std::marker::Send + std::marker::Sync + 'static {\n        async fn get_network_info(\n            &self,\n            request: tonic::Request<super::GetNetworkInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNetworkInfoResponse>,\n            tonic::Status,\n        >;\n        async fn list_peers(\n            &self,\n            request: tonic::Request<super::ListPeersRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListPeersResponse>,\n            tonic::Status,\n        >;\n        async fn get_node_info(\n            &self,\n            request: tonic::Request<super::GetNodeInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNodeInfoResponse>,\n            tonic::Status,\n        >;\n        async fn ping(\n            &self,\n            request: tonic::Request<super::PingRequest>,\n        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;\n    }\n    #[derive(Debug)]\n    pub struct NetworkServer<T> {\n        inner: Arc<T>,\n        accept_compression_encodings: EnabledCompressionEncodings,\n        send_compression_encodings: EnabledCompressionEncodings,\n        max_decoding_message_size: Option<usize>,\n        max_encoding_message_size: Option<usize>,\n    }\n    impl<T> NetworkServer<T> {\n        pub fn new(inner: T) -> Self {\n            Self::from_arc(Arc::new(inner))\n        }\n        pub fn from_arc(inner: Arc<T>) -> Self {\n            Self {\n                inner,\n                accept_compression_encodings: Default::default(),\n                send_compression_encodings: Default::default(),\n                max_decoding_message_size: None,\n                max_encoding_message_size: None,\n            }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> InterceptedService<Self, F>\n        where\n            F: tonic::service::Interceptor,\n        {\n            InterceptedService::new(Self::new(inner), interceptor)\n        }\n        /// Enable decompressing requests with the given encoding.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.accept_compression_encodings.enable(encoding);\n            self\n        }\n        /// Compress responses with the given encoding, if the client supports it.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.send_compression_encodings.enable(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.max_decoding_message_size = Some(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.max_encoding_message_size = Some(limit);\n            self\n        }\n    }\n    impl<T, B> tonic::codegen::Service<http::Request<B>> for NetworkServer<T>\n    where\n        T: Network,\n        B: Body + std::marker::Send + 'static,\n        B::Error: Into<StdError> + std::marker::Send + 'static,\n    {\n        type Response = http::Response<tonic::body::Body>;\n        type Error = std::convert::Infallible;\n        type Future = BoxFuture<Self::Response, Self::Error>;\n        fn poll_ready(\n            &mut self,\n            _cx: &mut Context<'_>,\n        ) -> Poll<std::result::Result<(), Self::Error>> {\n            Poll::Ready(Ok(()))\n        }\n        fn call(&mut self, req: http::Request<B>) -> Self::Future {\n            match req.uri().path() {\n                \"/pactus.Network/GetNetworkInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetNetworkInfoSvc<T: Network>(pub Arc<T>);\n                    impl<\n                        T: Network,\n                    > tonic::server::UnaryService<super::GetNetworkInfoRequest>\n                    for GetNetworkInfoSvc<T> {\n                        type Response = super::GetNetworkInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetNetworkInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Network>::get_network_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetNetworkInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Network/ListPeers\" => {\n                    #[allow(non_camel_case_types)]\n                    struct ListPeersSvc<T: Network>(pub Arc<T>);\n                    impl<T: Network> tonic::server::UnaryService<super::ListPeersRequest>\n                    for ListPeersSvc<T> {\n                        type Response = super::ListPeersResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::ListPeersRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Network>::list_peers(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = ListPeersSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Network/GetNodeInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetNodeInfoSvc<T: Network>(pub Arc<T>);\n                    impl<\n                        T: Network,\n                    > tonic::server::UnaryService<super::GetNodeInfoRequest>\n                    for GetNodeInfoSvc<T> {\n                        type Response = super::GetNodeInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetNodeInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Network>::get_node_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetNodeInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Network/Ping\" => {\n                    #[allow(non_camel_case_types)]\n                    struct PingSvc<T: Network>(pub Arc<T>);\n                    impl<T: Network> tonic::server::UnaryService<super::PingRequest>\n                    for PingSvc<T> {\n                        type Response = super::PingResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::PingRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Network>::ping(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = PingSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                _ => {\n                    Box::pin(async move {\n                        let mut response = http::Response::new(\n                            tonic::body::Body::default(),\n                        );\n                        let headers = response.headers_mut();\n                        headers\n                            .insert(\n                                tonic::Status::GRPC_STATUS,\n                                (tonic::Code::Unimplemented as i32).into(),\n                            );\n                        headers\n                            .insert(\n                                http::header::CONTENT_TYPE,\n                                tonic::metadata::GRPC_CONTENT_TYPE,\n                            );\n                        Ok(response)\n                    })\n                }\n            }\n        }\n    }\n    impl<T> Clone for NetworkServer<T> {\n        fn clone(&self) -> Self {\n            let inner = self.inner.clone();\n            Self {\n                inner,\n                accept_compression_encodings: self.accept_compression_encodings,\n                send_compression_encodings: self.send_compression_encodings,\n                max_decoding_message_size: self.max_decoding_message_size,\n                max_encoding_message_size: self.max_encoding_message_size,\n            }\n        }\n    }\n    /// Generated gRPC service name\n    pub const SERVICE_NAME: &str = \"pactus.Network\";\n    impl<T> tonic::server::NamedService for NetworkServer<T> {\n        const NAME: &'static str = SERVICE_NAME;\n    }\n}\n/// Generated client implementations.\npub mod utils_client {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    use tonic::codegen::http::Uri;\n    #[derive(Debug, Clone)]\n    pub struct UtilsClient<T> {\n        inner: tonic::client::Grpc<T>,\n    }\n    impl UtilsClient<tonic::transport::Channel> {\n        /// Attempt to create a new client by connecting to a given endpoint.\n        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>\n        where\n            D: TryInto<tonic::transport::Endpoint>,\n            D::Error: Into<StdError>,\n        {\n            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;\n            Ok(Self::new(conn))\n        }\n    }\n    impl<T> UtilsClient<T>\n    where\n        T: tonic::client::GrpcService<tonic::body::Body>,\n        T::Error: Into<StdError>,\n        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,\n        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,\n    {\n        pub fn new(inner: T) -> Self {\n            let inner = tonic::client::Grpc::new(inner);\n            Self { inner }\n        }\n        pub fn with_origin(inner: T, origin: Uri) -> Self {\n            let inner = tonic::client::Grpc::with_origin(inner, origin);\n            Self { inner }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> UtilsClient<InterceptedService<T, F>>\n        where\n            F: tonic::service::Interceptor,\n            T::ResponseBody: Default,\n            T: tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n                Response = http::Response<\n                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,\n                >,\n            >,\n            <T as tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,\n        {\n            UtilsClient::new(InterceptedService::new(inner, interceptor))\n        }\n        /// Compress requests with the given encoding.\n        ///\n        /// This requires the server to support it otherwise it might respond with an\n        /// error.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.send_compressed(encoding);\n            self\n        }\n        /// Enable decompressing responses.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.accept_compressed(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_decoding_message_size(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_encoding_message_size(limit);\n            self\n        }\n        pub async fn sign_message_with_private_key(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SignMessageWithPrivateKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignMessageWithPrivateKeyResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Utils/SignMessageWithPrivateKey\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Utils\", \"SignMessageWithPrivateKey\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn verify_message(\n            &mut self,\n            request: impl tonic::IntoRequest<super::VerifyMessageRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::VerifyMessageResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Utils/VerifyMessage\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Utils\", \"VerifyMessage\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn public_key_aggregation(\n            &mut self,\n            request: impl tonic::IntoRequest<super::PublicKeyAggregationRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::PublicKeyAggregationResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Utils/PublicKeyAggregation\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Utils\", \"PublicKeyAggregation\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn signature_aggregation(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SignatureAggregationRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignatureAggregationResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Utils/SignatureAggregation\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Utils\", \"SignatureAggregation\"));\n            self.inner.unary(req, path, codec).await\n        }\n    }\n}\n/// Generated server implementations.\npub mod utils_server {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    /// Generated trait containing gRPC methods that should be implemented for use with UtilsServer.\n    #[async_trait]\n    pub trait Utils: std::marker::Send + std::marker::Sync + 'static {\n        async fn sign_message_with_private_key(\n            &self,\n            request: tonic::Request<super::SignMessageWithPrivateKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignMessageWithPrivateKeyResponse>,\n            tonic::Status,\n        >;\n        async fn verify_message(\n            &self,\n            request: tonic::Request<super::VerifyMessageRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::VerifyMessageResponse>,\n            tonic::Status,\n        >;\n        async fn public_key_aggregation(\n            &self,\n            request: tonic::Request<super::PublicKeyAggregationRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::PublicKeyAggregationResponse>,\n            tonic::Status,\n        >;\n        async fn signature_aggregation(\n            &self,\n            request: tonic::Request<super::SignatureAggregationRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignatureAggregationResponse>,\n            tonic::Status,\n        >;\n    }\n    #[derive(Debug)]\n    pub struct UtilsServer<T> {\n        inner: Arc<T>,\n        accept_compression_encodings: EnabledCompressionEncodings,\n        send_compression_encodings: EnabledCompressionEncodings,\n        max_decoding_message_size: Option<usize>,\n        max_encoding_message_size: Option<usize>,\n    }\n    impl<T> UtilsServer<T> {\n        pub fn new(inner: T) -> Self {\n            Self::from_arc(Arc::new(inner))\n        }\n        pub fn from_arc(inner: Arc<T>) -> Self {\n            Self {\n                inner,\n                accept_compression_encodings: Default::default(),\n                send_compression_encodings: Default::default(),\n                max_decoding_message_size: None,\n                max_encoding_message_size: None,\n            }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> InterceptedService<Self, F>\n        where\n            F: tonic::service::Interceptor,\n        {\n            InterceptedService::new(Self::new(inner), interceptor)\n        }\n        /// Enable decompressing requests with the given encoding.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.accept_compression_encodings.enable(encoding);\n            self\n        }\n        /// Compress responses with the given encoding, if the client supports it.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.send_compression_encodings.enable(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.max_decoding_message_size = Some(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.max_encoding_message_size = Some(limit);\n            self\n        }\n    }\n    impl<T, B> tonic::codegen::Service<http::Request<B>> for UtilsServer<T>\n    where\n        T: Utils,\n        B: Body + std::marker::Send + 'static,\n        B::Error: Into<StdError> + std::marker::Send + 'static,\n    {\n        type Response = http::Response<tonic::body::Body>;\n        type Error = std::convert::Infallible;\n        type Future = BoxFuture<Self::Response, Self::Error>;\n        fn poll_ready(\n            &mut self,\n            _cx: &mut Context<'_>,\n        ) -> Poll<std::result::Result<(), Self::Error>> {\n            Poll::Ready(Ok(()))\n        }\n        fn call(&mut self, req: http::Request<B>) -> Self::Future {\n            match req.uri().path() {\n                \"/pactus.Utils/SignMessageWithPrivateKey\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SignMessageWithPrivateKeySvc<T: Utils>(pub Arc<T>);\n                    impl<\n                        T: Utils,\n                    > tonic::server::UnaryService<\n                        super::SignMessageWithPrivateKeyRequest,\n                    > for SignMessageWithPrivateKeySvc<T> {\n                        type Response = super::SignMessageWithPrivateKeyResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<\n                                super::SignMessageWithPrivateKeyRequest,\n                            >,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Utils>::sign_message_with_private_key(&inner, request)\n                                    .await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SignMessageWithPrivateKeySvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Utils/VerifyMessage\" => {\n                    #[allow(non_camel_case_types)]\n                    struct VerifyMessageSvc<T: Utils>(pub Arc<T>);\n                    impl<\n                        T: Utils,\n                    > tonic::server::UnaryService<super::VerifyMessageRequest>\n                    for VerifyMessageSvc<T> {\n                        type Response = super::VerifyMessageResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::VerifyMessageRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Utils>::verify_message(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = VerifyMessageSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Utils/PublicKeyAggregation\" => {\n                    #[allow(non_camel_case_types)]\n                    struct PublicKeyAggregationSvc<T: Utils>(pub Arc<T>);\n                    impl<\n                        T: Utils,\n                    > tonic::server::UnaryService<super::PublicKeyAggregationRequest>\n                    for PublicKeyAggregationSvc<T> {\n                        type Response = super::PublicKeyAggregationResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::PublicKeyAggregationRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Utils>::public_key_aggregation(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = PublicKeyAggregationSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Utils/SignatureAggregation\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SignatureAggregationSvc<T: Utils>(pub Arc<T>);\n                    impl<\n                        T: Utils,\n                    > tonic::server::UnaryService<super::SignatureAggregationRequest>\n                    for SignatureAggregationSvc<T> {\n                        type Response = super::SignatureAggregationResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::SignatureAggregationRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Utils>::signature_aggregation(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SignatureAggregationSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                _ => {\n                    Box::pin(async move {\n                        let mut response = http::Response::new(\n                            tonic::body::Body::default(),\n                        );\n                        let headers = response.headers_mut();\n                        headers\n                            .insert(\n                                tonic::Status::GRPC_STATUS,\n                                (tonic::Code::Unimplemented as i32).into(),\n                            );\n                        headers\n                            .insert(\n                                http::header::CONTENT_TYPE,\n                                tonic::metadata::GRPC_CONTENT_TYPE,\n                            );\n                        Ok(response)\n                    })\n                }\n            }\n        }\n    }\n    impl<T> Clone for UtilsServer<T> {\n        fn clone(&self) -> Self {\n            let inner = self.inner.clone();\n            Self {\n                inner,\n                accept_compression_encodings: self.accept_compression_encodings,\n                send_compression_encodings: self.send_compression_encodings,\n                max_decoding_message_size: self.max_decoding_message_size,\n                max_encoding_message_size: self.max_encoding_message_size,\n            }\n        }\n    }\n    /// Generated gRPC service name\n    pub const SERVICE_NAME: &str = \"pactus.Utils\";\n    impl<T> tonic::server::NamedService for UtilsServer<T> {\n        const NAME: &'static str = SERVICE_NAME;\n    }\n}\n/// Generated client implementations.\npub mod wallet_client {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    use tonic::codegen::http::Uri;\n    #[derive(Debug, Clone)]\n    pub struct WalletClient<T> {\n        inner: tonic::client::Grpc<T>,\n    }\n    impl WalletClient<tonic::transport::Channel> {\n        /// Attempt to create a new client by connecting to a given endpoint.\n        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>\n        where\n            D: TryInto<tonic::transport::Endpoint>,\n            D::Error: Into<StdError>,\n        {\n            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;\n            Ok(Self::new(conn))\n        }\n    }\n    impl<T> WalletClient<T>\n    where\n        T: tonic::client::GrpcService<tonic::body::Body>,\n        T::Error: Into<StdError>,\n        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,\n        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,\n    {\n        pub fn new(inner: T) -> Self {\n            let inner = tonic::client::Grpc::new(inner);\n            Self { inner }\n        }\n        pub fn with_origin(inner: T, origin: Uri) -> Self {\n            let inner = tonic::client::Grpc::with_origin(inner, origin);\n            Self { inner }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> WalletClient<InterceptedService<T, F>>\n        where\n            F: tonic::service::Interceptor,\n            T::ResponseBody: Default,\n            T: tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n                Response = http::Response<\n                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,\n                >,\n            >,\n            <T as tonic::codegen::Service<\n                http::Request<tonic::body::Body>,\n            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,\n        {\n            WalletClient::new(InterceptedService::new(inner, interceptor))\n        }\n        /// Compress requests with the given encoding.\n        ///\n        /// This requires the server to support it otherwise it might respond with an\n        /// error.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.send_compressed(encoding);\n            self\n        }\n        /// Enable decompressing responses.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.inner = self.inner.accept_compressed(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_decoding_message_size(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.inner = self.inner.max_encoding_message_size(limit);\n            self\n        }\n        pub async fn create_wallet(\n            &mut self,\n            request: impl tonic::IntoRequest<super::CreateWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CreateWalletResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/CreateWallet\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"CreateWallet\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn restore_wallet(\n            &mut self,\n            request: impl tonic::IntoRequest<super::RestoreWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::RestoreWalletResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/RestoreWallet\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"RestoreWallet\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn load_wallet(\n            &mut self,\n            request: impl tonic::IntoRequest<super::LoadWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::LoadWalletResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\"/pactus.Wallet/LoadWallet\");\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Wallet\", \"LoadWallet\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn unload_wallet(\n            &mut self,\n            request: impl tonic::IntoRequest<super::UnloadWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::UnloadWalletResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/UnloadWallet\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"UnloadWallet\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn list_wallets(\n            &mut self,\n            request: impl tonic::IntoRequest<super::ListWalletsRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListWalletsResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/ListWallets\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Wallet\", \"ListWallets\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_wallet_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetWalletInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetWalletInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetWalletInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetWalletInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn update_password(\n            &mut self,\n            request: impl tonic::IntoRequest<super::UpdatePasswordRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::UpdatePasswordResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/UpdatePassword\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"UpdatePassword\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_total_balance(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetTotalBalanceRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTotalBalanceResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetTotalBalance\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetTotalBalance\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_total_stake(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetTotalStakeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTotalStakeResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetTotalStake\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetTotalStake\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_validator_address(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetValidatorAddressRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorAddressResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetValidatorAddress\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetValidatorAddress\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_address_info(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetAddressInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetAddressInfoResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetAddressInfo\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetAddressInfo\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn set_address_label(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SetAddressLabelRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SetAddressLabelResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/SetAddressLabel\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"SetAddressLabel\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_new_address(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetNewAddressRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNewAddressResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetNewAddress\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetNewAddress\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn list_addresses(\n            &mut self,\n            request: impl tonic::IntoRequest<super::ListAddressesRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListAddressesResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/ListAddresses\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"ListAddresses\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn sign_message(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SignMessageRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignMessageResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/SignMessage\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Wallet\", \"SignMessage\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn sign_raw_transaction(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SignRawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignRawTransactionResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/SignRawTransaction\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"SignRawTransaction\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn list_transactions(\n            &mut self,\n            request: impl tonic::IntoRequest<super::ListTransactionsRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListTransactionsResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/ListTransactions\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"ListTransactions\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn set_default_fee(\n            &mut self,\n            request: impl tonic::IntoRequest<super::SetDefaultFeeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SetDefaultFeeResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/SetDefaultFee\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"SetDefaultFee\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_mnemonic(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetMnemonicRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetMnemonicResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetMnemonic\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut().insert(GrpcMethod::new(\"pactus.Wallet\", \"GetMnemonic\"));\n            self.inner.unary(req, path, codec).await\n        }\n        pub async fn get_private_key(\n            &mut self,\n            request: impl tonic::IntoRequest<super::GetPrivateKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetPrivateKeyResponse>,\n            tonic::Status,\n        > {\n            self.inner\n                .ready()\n                .await\n                .map_err(|e| {\n                    tonic::Status::unknown(\n                        format!(\"Service was not ready: {}\", e.into()),\n                    )\n                })?;\n            let codec = tonic_prost::ProstCodec::default();\n            let path = http::uri::PathAndQuery::from_static(\n                \"/pactus.Wallet/GetPrivateKey\",\n            );\n            let mut req = request.into_request();\n            req.extensions_mut()\n                .insert(GrpcMethod::new(\"pactus.Wallet\", \"GetPrivateKey\"));\n            self.inner.unary(req, path, codec).await\n        }\n    }\n}\n/// Generated server implementations.\npub mod wallet_server {\n    #![allow(\n        unused_variables,\n        dead_code,\n        missing_docs,\n        clippy::wildcard_imports,\n        clippy::let_unit_value,\n    )]\n    use tonic::codegen::*;\n    /// Generated trait containing gRPC methods that should be implemented for use with WalletServer.\n    #[async_trait]\n    pub trait Wallet: std::marker::Send + std::marker::Sync + 'static {\n        async fn create_wallet(\n            &self,\n            request: tonic::Request<super::CreateWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::CreateWalletResponse>,\n            tonic::Status,\n        >;\n        async fn restore_wallet(\n            &self,\n            request: tonic::Request<super::RestoreWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::RestoreWalletResponse>,\n            tonic::Status,\n        >;\n        async fn load_wallet(\n            &self,\n            request: tonic::Request<super::LoadWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::LoadWalletResponse>,\n            tonic::Status,\n        >;\n        async fn unload_wallet(\n            &self,\n            request: tonic::Request<super::UnloadWalletRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::UnloadWalletResponse>,\n            tonic::Status,\n        >;\n        async fn list_wallets(\n            &self,\n            request: tonic::Request<super::ListWalletsRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListWalletsResponse>,\n            tonic::Status,\n        >;\n        async fn get_wallet_info(\n            &self,\n            request: tonic::Request<super::GetWalletInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetWalletInfoResponse>,\n            tonic::Status,\n        >;\n        async fn update_password(\n            &self,\n            request: tonic::Request<super::UpdatePasswordRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::UpdatePasswordResponse>,\n            tonic::Status,\n        >;\n        async fn get_total_balance(\n            &self,\n            request: tonic::Request<super::GetTotalBalanceRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTotalBalanceResponse>,\n            tonic::Status,\n        >;\n        async fn get_total_stake(\n            &self,\n            request: tonic::Request<super::GetTotalStakeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetTotalStakeResponse>,\n            tonic::Status,\n        >;\n        async fn get_validator_address(\n            &self,\n            request: tonic::Request<super::GetValidatorAddressRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetValidatorAddressResponse>,\n            tonic::Status,\n        >;\n        async fn get_address_info(\n            &self,\n            request: tonic::Request<super::GetAddressInfoRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetAddressInfoResponse>,\n            tonic::Status,\n        >;\n        async fn set_address_label(\n            &self,\n            request: tonic::Request<super::SetAddressLabelRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SetAddressLabelResponse>,\n            tonic::Status,\n        >;\n        async fn get_new_address(\n            &self,\n            request: tonic::Request<super::GetNewAddressRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetNewAddressResponse>,\n            tonic::Status,\n        >;\n        async fn list_addresses(\n            &self,\n            request: tonic::Request<super::ListAddressesRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListAddressesResponse>,\n            tonic::Status,\n        >;\n        async fn sign_message(\n            &self,\n            request: tonic::Request<super::SignMessageRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignMessageResponse>,\n            tonic::Status,\n        >;\n        async fn sign_raw_transaction(\n            &self,\n            request: tonic::Request<super::SignRawTransactionRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SignRawTransactionResponse>,\n            tonic::Status,\n        >;\n        async fn list_transactions(\n            &self,\n            request: tonic::Request<super::ListTransactionsRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::ListTransactionsResponse>,\n            tonic::Status,\n        >;\n        async fn set_default_fee(\n            &self,\n            request: tonic::Request<super::SetDefaultFeeRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::SetDefaultFeeResponse>,\n            tonic::Status,\n        >;\n        async fn get_mnemonic(\n            &self,\n            request: tonic::Request<super::GetMnemonicRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetMnemonicResponse>,\n            tonic::Status,\n        >;\n        async fn get_private_key(\n            &self,\n            request: tonic::Request<super::GetPrivateKeyRequest>,\n        ) -> std::result::Result<\n            tonic::Response<super::GetPrivateKeyResponse>,\n            tonic::Status,\n        >;\n    }\n    #[derive(Debug)]\n    pub struct WalletServer<T> {\n        inner: Arc<T>,\n        accept_compression_encodings: EnabledCompressionEncodings,\n        send_compression_encodings: EnabledCompressionEncodings,\n        max_decoding_message_size: Option<usize>,\n        max_encoding_message_size: Option<usize>,\n    }\n    impl<T> WalletServer<T> {\n        pub fn new(inner: T) -> Self {\n            Self::from_arc(Arc::new(inner))\n        }\n        pub fn from_arc(inner: Arc<T>) -> Self {\n            Self {\n                inner,\n                accept_compression_encodings: Default::default(),\n                send_compression_encodings: Default::default(),\n                max_decoding_message_size: None,\n                max_encoding_message_size: None,\n            }\n        }\n        pub fn with_interceptor<F>(\n            inner: T,\n            interceptor: F,\n        ) -> InterceptedService<Self, F>\n        where\n            F: tonic::service::Interceptor,\n        {\n            InterceptedService::new(Self::new(inner), interceptor)\n        }\n        /// Enable decompressing requests with the given encoding.\n        #[must_use]\n        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.accept_compression_encodings.enable(encoding);\n            self\n        }\n        /// Compress responses with the given encoding, if the client supports it.\n        #[must_use]\n        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {\n            self.send_compression_encodings.enable(encoding);\n            self\n        }\n        /// Limits the maximum size of a decoded message.\n        ///\n        /// Default: `4MB`\n        #[must_use]\n        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {\n            self.max_decoding_message_size = Some(limit);\n            self\n        }\n        /// Limits the maximum size of an encoded message.\n        ///\n        /// Default: `usize::MAX`\n        #[must_use]\n        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {\n            self.max_encoding_message_size = Some(limit);\n            self\n        }\n    }\n    impl<T, B> tonic::codegen::Service<http::Request<B>> for WalletServer<T>\n    where\n        T: Wallet,\n        B: Body + std::marker::Send + 'static,\n        B::Error: Into<StdError> + std::marker::Send + 'static,\n    {\n        type Response = http::Response<tonic::body::Body>;\n        type Error = std::convert::Infallible;\n        type Future = BoxFuture<Self::Response, Self::Error>;\n        fn poll_ready(\n            &mut self,\n            _cx: &mut Context<'_>,\n        ) -> Poll<std::result::Result<(), Self::Error>> {\n            Poll::Ready(Ok(()))\n        }\n        fn call(&mut self, req: http::Request<B>) -> Self::Future {\n            match req.uri().path() {\n                \"/pactus.Wallet/CreateWallet\" => {\n                    #[allow(non_camel_case_types)]\n                    struct CreateWalletSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::CreateWalletRequest>\n                    for CreateWalletSvc<T> {\n                        type Response = super::CreateWalletResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::CreateWalletRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::create_wallet(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = CreateWalletSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/RestoreWallet\" => {\n                    #[allow(non_camel_case_types)]\n                    struct RestoreWalletSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::RestoreWalletRequest>\n                    for RestoreWalletSvc<T> {\n                        type Response = super::RestoreWalletResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::RestoreWalletRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::restore_wallet(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = RestoreWalletSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/LoadWallet\" => {\n                    #[allow(non_camel_case_types)]\n                    struct LoadWalletSvc<T: Wallet>(pub Arc<T>);\n                    impl<T: Wallet> tonic::server::UnaryService<super::LoadWalletRequest>\n                    for LoadWalletSvc<T> {\n                        type Response = super::LoadWalletResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::LoadWalletRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::load_wallet(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = LoadWalletSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/UnloadWallet\" => {\n                    #[allow(non_camel_case_types)]\n                    struct UnloadWalletSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::UnloadWalletRequest>\n                    for UnloadWalletSvc<T> {\n                        type Response = super::UnloadWalletResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::UnloadWalletRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::unload_wallet(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = UnloadWalletSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/ListWallets\" => {\n                    #[allow(non_camel_case_types)]\n                    struct ListWalletsSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::ListWalletsRequest>\n                    for ListWalletsSvc<T> {\n                        type Response = super::ListWalletsResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::ListWalletsRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::list_wallets(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = ListWalletsSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetWalletInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetWalletInfoSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetWalletInfoRequest>\n                    for GetWalletInfoSvc<T> {\n                        type Response = super::GetWalletInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetWalletInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_wallet_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetWalletInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/UpdatePassword\" => {\n                    #[allow(non_camel_case_types)]\n                    struct UpdatePasswordSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::UpdatePasswordRequest>\n                    for UpdatePasswordSvc<T> {\n                        type Response = super::UpdatePasswordResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::UpdatePasswordRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::update_password(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = UpdatePasswordSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetTotalBalance\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetTotalBalanceSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetTotalBalanceRequest>\n                    for GetTotalBalanceSvc<T> {\n                        type Response = super::GetTotalBalanceResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetTotalBalanceRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_total_balance(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetTotalBalanceSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetTotalStake\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetTotalStakeSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetTotalStakeRequest>\n                    for GetTotalStakeSvc<T> {\n                        type Response = super::GetTotalStakeResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetTotalStakeRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_total_stake(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetTotalStakeSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetValidatorAddress\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetValidatorAddressSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetValidatorAddressRequest>\n                    for GetValidatorAddressSvc<T> {\n                        type Response = super::GetValidatorAddressResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetValidatorAddressRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_validator_address(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetValidatorAddressSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetAddressInfo\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetAddressInfoSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetAddressInfoRequest>\n                    for GetAddressInfoSvc<T> {\n                        type Response = super::GetAddressInfoResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetAddressInfoRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_address_info(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetAddressInfoSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/SetAddressLabel\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SetAddressLabelSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::SetAddressLabelRequest>\n                    for SetAddressLabelSvc<T> {\n                        type Response = super::SetAddressLabelResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::SetAddressLabelRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::set_address_label(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SetAddressLabelSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetNewAddress\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetNewAddressSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetNewAddressRequest>\n                    for GetNewAddressSvc<T> {\n                        type Response = super::GetNewAddressResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetNewAddressRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_new_address(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetNewAddressSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/ListAddresses\" => {\n                    #[allow(non_camel_case_types)]\n                    struct ListAddressesSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::ListAddressesRequest>\n                    for ListAddressesSvc<T> {\n                        type Response = super::ListAddressesResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::ListAddressesRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::list_addresses(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = ListAddressesSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/SignMessage\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SignMessageSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::SignMessageRequest>\n                    for SignMessageSvc<T> {\n                        type Response = super::SignMessageResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::SignMessageRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::sign_message(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SignMessageSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/SignRawTransaction\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SignRawTransactionSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::SignRawTransactionRequest>\n                    for SignRawTransactionSvc<T> {\n                        type Response = super::SignRawTransactionResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::SignRawTransactionRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::sign_raw_transaction(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SignRawTransactionSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/ListTransactions\" => {\n                    #[allow(non_camel_case_types)]\n                    struct ListTransactionsSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::ListTransactionsRequest>\n                    for ListTransactionsSvc<T> {\n                        type Response = super::ListTransactionsResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::ListTransactionsRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::list_transactions(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = ListTransactionsSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/SetDefaultFee\" => {\n                    #[allow(non_camel_case_types)]\n                    struct SetDefaultFeeSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::SetDefaultFeeRequest>\n                    for SetDefaultFeeSvc<T> {\n                        type Response = super::SetDefaultFeeResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::SetDefaultFeeRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::set_default_fee(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = SetDefaultFeeSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetMnemonic\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetMnemonicSvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetMnemonicRequest>\n                    for GetMnemonicSvc<T> {\n                        type Response = super::GetMnemonicResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetMnemonicRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_mnemonic(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetMnemonicSvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                \"/pactus.Wallet/GetPrivateKey\" => {\n                    #[allow(non_camel_case_types)]\n                    struct GetPrivateKeySvc<T: Wallet>(pub Arc<T>);\n                    impl<\n                        T: Wallet,\n                    > tonic::server::UnaryService<super::GetPrivateKeyRequest>\n                    for GetPrivateKeySvc<T> {\n                        type Response = super::GetPrivateKeyResponse;\n                        type Future = BoxFuture<\n                            tonic::Response<Self::Response>,\n                            tonic::Status,\n                        >;\n                        fn call(\n                            &mut self,\n                            request: tonic::Request<super::GetPrivateKeyRequest>,\n                        ) -> Self::Future {\n                            let inner = Arc::clone(&self.0);\n                            let fut = async move {\n                                <T as Wallet>::get_private_key(&inner, request).await\n                            };\n                            Box::pin(fut)\n                        }\n                    }\n                    let accept_compression_encodings = self.accept_compression_encodings;\n                    let send_compression_encodings = self.send_compression_encodings;\n                    let max_decoding_message_size = self.max_decoding_message_size;\n                    let max_encoding_message_size = self.max_encoding_message_size;\n                    let inner = self.inner.clone();\n                    let fut = async move {\n                        let method = GetPrivateKeySvc(inner);\n                        let codec = tonic_prost::ProstCodec::default();\n                        let mut grpc = tonic::server::Grpc::new(codec)\n                            .apply_compression_config(\n                                accept_compression_encodings,\n                                send_compression_encodings,\n                            )\n                            .apply_max_message_size_config(\n                                max_decoding_message_size,\n                                max_encoding_message_size,\n                            );\n                        let res = grpc.unary(method, req).await;\n                        Ok(res)\n                    };\n                    Box::pin(fut)\n                }\n                _ => {\n                    Box::pin(async move {\n                        let mut response = http::Response::new(\n                            tonic::body::Body::default(),\n                        );\n                        let headers = response.headers_mut();\n                        headers\n                            .insert(\n                                tonic::Status::GRPC_STATUS,\n                                (tonic::Code::Unimplemented as i32).into(),\n                            );\n                        headers\n                            .insert(\n                                http::header::CONTENT_TYPE,\n                                tonic::metadata::GRPC_CONTENT_TYPE,\n                            );\n                        Ok(response)\n                    })\n                }\n            }\n        }\n    }\n    impl<T> Clone for WalletServer<T> {\n        fn clone(&self) -> Self {\n            let inner = self.inner.clone();\n            Self {\n                inner,\n                accept_compression_encodings: self.accept_compression_encodings,\n                send_compression_encodings: self.send_compression_encodings,\n                max_decoding_message_size: self.max_decoding_message_size,\n                max_encoding_message_size: self.max_encoding_message_size,\n            }\n        }\n    }\n    /// Generated gRPC service name\n    pub const SERVICE_NAME: &str = \"pactus.Wallet\";\n    impl<T> tonic::server::NamedService for WalletServer<T> {\n        const NAME: &'static str = SERVICE_NAME;\n    }\n}\n"
  },
  {
    "path": "www/grpc/middleware.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"runtime/debug\"\n\n\trec \"github.com/grpc-ecosystem/go-grpc-middleware/recovery\"\n\t\"github.com/pactus-project/pactus/util/htpasswd\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\nfunc BasicAuth(storedCredential string) grpc.UnaryServerInterceptor {\n\treturn func(ctx context.Context, req any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (\n\t\tany, error,\n\t) {\n\t\tuser, password, err := htpasswd.ExtractBasicAuthFromContext(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, status.Error(codes.Unauthenticated, \"failed to extract basic auth from header\")\n\t\t}\n\n\t\tif err := htpasswd.CompareBasicAuth(storedCredential, user, password); err != nil {\n\t\t\treturn nil, status.Error(codes.Unauthenticated, \"username or password is invalid\")\n\t\t}\n\n\t\treturn handler(ctx, req)\n\t}\n}\n\nfunc (s *Server) Recovery() grpc.UnaryServerInterceptor {\n\trecovery := func(p any) (err error) {\n\t\terr = status.Errorf(codes.Unknown, \"%v\", p)\n\t\tstackTrace := debug.Stack()\n\t\ts.logger.Error(\n\t\t\t\"recovery panic triggered in grpc server\",\n\t\t\t\"error\", err,\n\t\t\t\"stacktrace\", string(stackTrace),\n\t\t)\n\n\t\treturn err\n\t}\n\topts := []rec.Option{\n\t\trec.WithRecoveryHandler(recovery),\n\t}\n\n\treturn rec.UnaryServerInterceptor(opts...)\n}\n"
  },
  {
    "path": "www/grpc/middleware_test.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/metadata\"\n\t\"google.golang.org/grpc/status\"\n)\n\n// mockUnaryHandler simulates a gRPC method handler.\nfunc mockUnaryHandler(_ context.Context, _ any) (any, error) {\n\treturn \"response\", nil\n}\n\nfunc mockUnaryPanicHandler(_ context.Context, _ any) (any, error) {\n\tpanic(\"panic happen!!!\")\n}\n\nfunc TestBasicAuth(t *testing.T) {\n\tauth := \"Basic \" + base64.StdEncoding.EncodeToString([]byte(\"user:password\"))\n\tinvalidAuth := \"Basic \" + base64.StdEncoding.EncodeToString([]byte(\"invalid:invalid\"))\n\tmalformedAuth := \"Malformed\"\n\n\ttests := []struct {\n\t\tname          string\n\t\tauthHeader    string\n\t\texpectedError codes.Code\n\t}{\n\t\t{\n\t\t\tname:          \"ValidCredentials\",\n\t\t\tauthHeader:    auth,\n\t\t\texpectedError: codes.OK,\n\t\t},\n\t\t{\n\t\t\tname:          \"InvalidCredentials\",\n\t\t\tauthHeader:    invalidAuth,\n\t\t\texpectedError: codes.Unauthenticated,\n\t\t},\n\t\t{\n\t\t\tname:          \"NoMetadata\",\n\t\t\tauthHeader:    \"\",\n\t\t\texpectedError: codes.Unauthenticated,\n\t\t},\n\t\t{\n\t\t\tname:          \"MalformedAuthHeader\",\n\t\t\tauthHeader:    malformedAuth,\n\t\t\texpectedError: codes.Unauthenticated,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tctx := t.Context()\n\t\t\tif tt.authHeader != \"\" {\n\t\t\t\tmd := metadata.New(map[string]string{\"authorization\": tt.authHeader})\n\t\t\t\tctx = metadata.NewIncomingContext(ctx, md)\n\t\t\t}\n\n\t\t\tinterceptor := BasicAuth(\"user:$2y$10$5Kjd955BDWLouqckHzBjKuCF6hFOUD61lhm8QpjDVHTUwMIrYUdq2\")\n\n\t\t\t_, err := interceptor(ctx, nil, &grpc.UnaryServerInfo{}, mockUnaryHandler)\n\n\t\t\tgot, want := status.Code(err), tt.expectedError\n\t\t\tassert.Equal(t, want, got)\n\t\t})\n\t}\n}\n\nfunc TestGrpcRecovery(t *testing.T) {\n\ts := setup(t, nil)\n\n\tinterceptor := s.server.Recovery()\n\n\t_, err := interceptor(t.Context(), nil, &grpc.UnaryServerInfo{}, mockUnaryPanicHandler)\n\tassert.Equal(t, codes.Unknown, status.Code(err))\n}\n"
  },
  {
    "path": "www/grpc/network.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\t\"github.com/fxamacker/cbor/v2\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/metric\"\n\t\"github.com/pactus-project/pactus/version\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\ntype networkServer struct {\n\t*Server\n}\n\nfunc newNetworkServer(server *Server) *networkServer {\n\treturn &networkServer{\n\t\tServer: server,\n\t}\n}\n\nfunc (s *networkServer) GetNodeInfo(_ context.Context,\n\t_ *pactus.GetNodeInfoRequest,\n) (*pactus.GetNodeInfoResponse, error) {\n\tpeerSet := s.sync.PeerSet()\n\n\tclockOffset, err := s.sync.ClockOffset()\n\tif err != nil {\n\t\ts.logger.Warn(\"failed to get clock offset\", \"err\", err)\n\t}\n\n\tresp := &pactus.GetNodeInfoResponse{\n\t\tNetworkName:   s.net.Name(),\n\t\tMoniker:       s.sync.Moniker(),\n\t\tAgent:         version.NodeAgent.String(),\n\t\tPeerId:        s.sync.SelfID().String(),\n\t\tReachability:  s.net.ReachabilityStatus(),\n\t\tLocalAddrs:    s.net.HostAddrs(),\n\t\tStartedAt:     uint64(peerSet.StartedAt().Unix()),\n\t\tCurrentTime:   uint64(time.Now().Unix()),\n\t\tProtocols:     s.net.Protocols(),\n\t\tServices:      int32(s.sync.Services()),\n\t\tServicesNames: s.sync.Services().String(),\n\t\tClockOffset:   clockOffset.Seconds(),\n\t\tConnectionInfo: &pactus.ConnectionInfo{\n\t\t\tConnections:         uint64(s.net.NumConnectedPeers()),\n\t\t\tInboundConnections:  uint64(s.net.NumInbound()),\n\t\t\tOutboundConnections: uint64(s.net.NumOutbound()),\n\t\t},\n\t\tZmqPublishers: make([]*pactus.ZMQPublisherInfo, 0),\n\t}\n\n\tfor _, publisher := range s.zmqPublishers {\n\t\tresp.ZmqPublishers = append(resp.ZmqPublishers, &pactus.ZMQPublisherInfo{\n\t\t\tTopic:   publisher.TopicName(),\n\t\t\tAddress: publisher.Address(),\n\t\t\tHwm:     int32(publisher.HWM()),\n\t\t})\n\t}\n\n\treturn resp, nil\n}\n\nfunc (s *networkServer) GetNetworkInfo(_ context.Context,\n\t_ *pactus.GetNetworkInfoRequest,\n) (*pactus.GetNetworkInfoResponse, error) {\n\tpeerSet := s.sync.PeerSet()\n\tvar count uint32\n\n\tpeerSet.IteratePeers(func(p *peer.Peer) bool {\n\t\tif p.Status.IsConnectedOrKnown() {\n\t\t\tcount++\n\t\t}\n\n\t\treturn false\n\t})\n\n\treturn &pactus.GetNetworkInfoResponse{\n\t\tNetworkName:         s.net.Name(),\n\t\tConnectedPeersCount: count,\n\t\tMetricInfo:          metricToProto(peerSet.Metric()),\n\t}, nil\n}\n\nfunc (s *networkServer) ListPeers(_ context.Context,\n\treq *pactus.ListPeersRequest,\n) (*pactus.ListPeersResponse, error) {\n\tpeerSet := s.sync.PeerSet()\n\tpeerInfos := make([]*pactus.PeerInfo, 0, peerSet.Len())\n\n\tpeerSet.IteratePeers(func(peer *peer.Peer) bool {\n\t\tif !req.IncludeDisconnected && !peer.Status.IsConnectedOrKnown() {\n\t\t\treturn false\n\t\t}\n\n\t\tpeerInfo := new(pactus.PeerInfo)\n\t\tpeerInfos = append(peerInfos, peerInfo)\n\n\t\tdata, err := cbor.Marshal(peer.Agent)\n\t\tif err != nil {\n\t\t\ts.logger.Error(\"couldn't marshal agent\", \"error\", err)\n\n\t\t\treturn false\n\t\t}\n\t\tpeerInfo.Agent = string(data)\n\n\t\tpeerInfo.PeerId = peer.PeerID.String()\n\t\tpeerInfo.Moniker = peer.Moniker\n\t\tpeerInfo.Agent = peer.Agent\n\t\tpeerInfo.Address = peer.Address\n\t\tpeerInfo.Direction = pactus.Direction(peer.Direction)\n\t\tpeerInfo.Services = uint32(peer.Services)\n\t\tpeerInfo.Height = uint32(peer.Height)\n\t\tpeerInfo.Protocols = peer.Protocols\n\t\tpeerInfo.Status = int32(peer.Status)\n\t\tpeerInfo.LastSent = peer.LastSent.Unix()\n\t\tpeerInfo.LastReceived = peer.LastReceived.Unix()\n\t\tpeerInfo.LastBlockHash = peer.LastBlockHash.String()\n\t\tpeerInfo.TotalSessions = int32(peer.TotalSessions)\n\t\tpeerInfo.CompletedSessions = int32(peer.CompletedSessions)\n\t\tpeerInfo.OutboundHelloSent = peer.OutboundHelloSent\n\t\tpeerInfo.MetricInfo = metricToProto(peer.Metric)\n\n\t\tfor _, key := range peer.ConsensusKeys {\n\t\t\tpeerInfo.ConsensusKeys = append(peerInfo.ConsensusKeys, key.String())\n\t\t\tpeerInfo.ConsensusAddresses = append(peerInfo.ConsensusAddresses, key.ValidatorAddress().String())\n\t\t}\n\n\t\treturn false\n\t})\n\n\treturn &pactus.ListPeersResponse{Peers: peerInfos}, nil\n}\n\nfunc metricToProto(metric metric.Metric) *pactus.MetricInfo {\n\tmetricInfo := &pactus.MetricInfo{\n\t\tTotalInvalid: &pactus.CounterInfo{\n\t\t\tBytes:   uint64(metric.TotalInvalid.Bytes),\n\t\t\tBundles: uint64(metric.TotalInvalid.Bundles),\n\t\t},\n\n\t\tTotalSent: &pactus.CounterInfo{\n\t\t\tBytes:   uint64(metric.TotalSent.Bytes),\n\t\t\tBundles: uint64(metric.TotalSent.Bundles),\n\t\t},\n\n\t\tTotalReceived: &pactus.CounterInfo{\n\t\t\tBytes:   uint64(metric.TotalReceived.Bytes),\n\t\t\tBundles: uint64(metric.TotalReceived.Bundles),\n\t\t},\n\t}\n\n\tmetricInfo.MessageSent = make(map[int32]*pactus.CounterInfo)\n\tfor msgType, counter := range metric.MessageSent {\n\t\tmetricInfo.MessageSent[int32(msgType)] = &pactus.CounterInfo{\n\t\t\tBytes:   uint64(counter.Bytes),\n\t\t\tBundles: uint64(counter.Bundles),\n\t\t}\n\t}\n\n\tmetricInfo.MessageReceived = make(map[int32]*pactus.CounterInfo)\n\tfor msgType, counter := range metric.MessageReceived {\n\t\tmetricInfo.MessageReceived[int32(msgType)] = &pactus.CounterInfo{\n\t\t\tBytes:   uint64(counter.Bytes),\n\t\t\tBundles: uint64(counter.Bundles),\n\t\t}\n\t}\n\n\treturn metricInfo\n}\n\nfunc (*networkServer) Ping(_ context.Context,\n\t_ *pactus.PingRequest,\n) (*pactus.PingResponse, error) {\n\t// Simply return an empty response for latency measurement\n\treturn &pactus.PingResponse{}, nil\n}\n"
  },
  {
    "path": "www/grpc/network_test.go",
    "content": "package grpc\n\nimport (\n\t\"testing\"\n\n\tlp2ppeer \"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/version\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestGetNetworkInfo(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.networkClient(t)\n\n\tres, err := client.GetNetworkInfo(t.Context(),\n\t\t&pactus.GetNetworkInfoRequest{})\n\trequire.NoError(t, err)\n\tassert.NotNil(t, res)\n\tassert.NotEmpty(t, res.NetworkName)\n}\n\nfunc TestListPeers(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.networkClient(t)\n\n\tres, err := client.ListPeers(t.Context(),\n\t\t&pactus.ListPeersRequest{IncludeDisconnected: true})\n\trequire.NoError(t, err)\n\tassert.Len(t, res.Peers, 2)\n\tfor _, peer := range res.Peers {\n\t\tassert.NotEmpty(t, peer.PeerId)\n\t\trequire.NoError(t, err)\n\t\tpid, _ := lp2ppeer.Decode(peer.PeerId)\n\t\tpp := td.mockSync.PeerSet().GetPeer(pid)\n\t\tassert.Equal(t, peer.Agent, pp.Agent)\n\t\tassert.Equal(t, peer.Moniker, pp.Moniker)\n\t\tassert.Equal(t, types.Height(peer.Height), pp.Height)\n\t\tassert.NotEmpty(t, pp.ConsensusKeys)\n\t\tfor _, key := range pp.ConsensusKeys {\n\t\t\tassert.Contains(t, peer.ConsensusKeys, key.String())\n\t\t}\n\t}\n}\n\nfunc TestGetNodeInfo(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.networkClient(t)\n\n\tres, err := client.GetNodeInfo(t.Context(),\n\t\t&pactus.GetNodeInfoRequest{})\n\trequire.NoError(t, err)\n\tassert.Equal(t, version.NodeAgent.String(), res.Agent)\n\tassert.Equal(t, td.mockSync.SelfID().String(), res.PeerId)\n\tassert.Equal(t, \"test-moniker\", res.Moniker)\n\tassert.Equal(t, \"zmq_address\", res.ZmqPublishers[0].Address)\n\tassert.Equal(t, \"zmq_topic\", res.ZmqPublishers[0].Topic)\n\tassert.Equal(t, int32(100), res.ZmqPublishers[0].Hwm)\n}\n\nfunc TestPing(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.networkClient(t)\n\n\tt.Run(\"Should return empty response for ping\", func(t *testing.T) {\n\t\tres, err := client.Ping(t.Context(), &pactus.PingRequest{})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.IsType(t, &pactus.PingResponse{}, res)\n\t})\n\n\tt.Run(\"Should handle multiple ping requests\", func(t *testing.T) {\n\t\t// Test multiple consecutive pings to ensure consistency\n\t\tfor i := 0; i < 5; i++ {\n\t\t\tres, err := client.Ping(t.Context(), &pactus.PingRequest{})\n\t\t\trequire.NoError(t, err)\n\t\t\tassert.NotNil(t, res)\n\t\t}\n\t})\n}\n"
  },
  {
    "path": "www/grpc/proto/.clang-format",
    "content": "BasedOnStyle: Google\nColumnLimit: 120\n"
  },
  {
    "path": "www/grpc/proto/blockchain.proto",
    "content": "syntax = \"proto3\";\npackage pactus;\n\nimport \"transaction.proto\";\n\noption go_package = \"github.com/pactus-project/pactus/www/grpc/pactus\";\noption java_package = \"pactus\";\n\n// Blockchain service defines RPC methods for interacting with the blockchain.\nservice Blockchain {\n  // GetBlock retrieves information about a block based on the provided request parameters.\n  rpc GetBlock(GetBlockRequest) returns (GetBlockResponse);\n\n  // GetBlockHash retrieves the hash of a block at the specified height.\n  rpc GetBlockHash(GetBlockHashRequest) returns (GetBlockHashResponse);\n\n  // GetBlockHeight retrieves the height of a block with the specified hash.\n  rpc GetBlockHeight(GetBlockHeightRequest) returns (GetBlockHeightResponse);\n\n  // GetBlockchainInfo retrieves general information about the blockchain.\n  rpc GetBlockchainInfo(GetBlockchainInfoRequest) returns (GetBlockchainInfoResponse);\n\n  // GetCommitteeInfo retrieves information about the current committee.\n  rpc GetCommitteeInfo(GetCommitteeInfoRequest) returns (GetCommitteeInfoResponse);\n\n  // GetConsensusInfo retrieves information about the consensus instances.\n  rpc GetConsensusInfo(GetConsensusInfoRequest) returns (GetConsensusInfoResponse);\n\n  // GetAccount retrieves information about an account based on the provided address.\n  rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);\n\n  // GetValidator retrieves information about a validator based on the provided address.\n  rpc GetValidator(GetValidatorRequest) returns (GetValidatorResponse);\n\n  // GetValidatorByNumber retrieves information about a validator based on the provided number.\n  rpc GetValidatorByNumber(GetValidatorByNumberRequest) returns (GetValidatorResponse);\n\n  // GetValidatorAddresses retrieves a list of all validator addresses.\n  rpc GetValidatorAddresses(GetValidatorAddressesRequest) returns (GetValidatorAddressesResponse);\n\n  // GetPublicKey retrieves the public key of an account based on the provided address.\n  rpc GetPublicKey(GetPublicKeyRequest) returns (GetPublicKeyResponse);\n\n  // GetTxPoolContent retrieves current transactions in the transaction pool.\n  rpc GetTxPoolContent(GetTxPoolContentRequest) returns (GetTxPoolContentResponse);\n}\n\n// Request message for retrieving account information.\nmessage GetAccountRequest {\n  // The address of the account to retrieve information for.\n  string address = 1;\n}\n\n// Response message contains account information.\nmessage GetAccountResponse {\n  // Detailed information about the account.\n  AccountInfo account = 1;\n}\n\n// Request message for retrieving validator addresses.\nmessage GetValidatorAddressesRequest {\n}\n\n// Response message contains list of validator addresses.\nmessage GetValidatorAddressesResponse {\n  // List of validator addresses.\n  repeated string addresses = 1;\n}\n\n// Request message for retrieving validator information by address.\nmessage GetValidatorRequest {\n  // The address of the validator to retrieve information for.\n  string address = 1;\n}\n\n// Request message for retrieving validator information by number.\nmessage GetValidatorByNumberRequest {\n  // The unique number of the validator to retrieve information for.\n  int32 number = 1;\n}\n\n// Response message contains validator information.\nmessage GetValidatorResponse {\n  // Detailed information about the validator.\n  ValidatorInfo validator = 1;\n}\n\n// Request message for retrieving public key by address.\nmessage GetPublicKeyRequest {\n  // The address for which to retrieve the public key.\n  string address = 1;\n}\n\n// Response message contains public key information.\nmessage GetPublicKeyResponse {\n  // The public key associated with the provided address.\n  string public_key = 1;\n}\n\n// Request message for retrieving block information based on height and verbosity level.\nmessage GetBlockRequest {\n  // The height of the block to retrieve.\n  uint32 height = 1;\n  // The verbosity level for block information.\n  BlockVerbosity verbosity = 2;\n}\n\n// Response message contains block information.\nmessage GetBlockResponse {\n  // The height of the block.\n  uint32 height = 1;\n  // The hash of the block.\n  string hash = 2;\n  // Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\n  string data = 3;\n  // The timestamp of the block.\n  uint32 block_time = 4;\n  // Header information of the block.\n  BlockHeaderInfo header = 5;\n  // Certificate information of the previous block.\n  CertificateInfo prev_cert = 6;\n  // List of transactions in the block, available when verbosity level is set to\n  // BLOCK_VERBOSITY_TRANSACTIONS.\n  repeated TransactionInfo txs = 7;\n}\n\n// Request message for retrieving block hash by height.\nmessage GetBlockHashRequest {\n  // The height of the block to retrieve the hash for.\n  uint32 height = 1;\n}\n\n// Response message contains block hash.\nmessage GetBlockHashResponse {\n  // The hash of the block.\n  string hash = 1;\n}\n\n// Request message for retrieving block height by hash.\nmessage GetBlockHeightRequest {\n  // The hash of the block to retrieve the height for.\n  string hash = 1;\n}\n\n// Response message contains block height.\nmessage GetBlockHeightResponse {\n  // The height of the block.\n  uint32 height = 1;\n}\n\n// Request message for retrieving blockchain information.\nmessage GetBlockchainInfoRequest {\n}\n\n// Response message contains general blockchain information.\nmessage GetBlockchainInfoResponse {\n  // The height of the last block in the blockchain.\n  uint32 last_block_height = 1;\n  // The hash of the last block in the blockchain.\n  string last_block_hash = 2;\n  // The timestamp of the last block in Unix format.\n  int64 last_block_time = 10;\n  // The total number of accounts in the blockchain.\n  int32 total_accounts = 3;\n  // The total number of validators in the blockchain.\n  int32 total_validators = 4;\n  // The number of active (not unbonded) validators in the blockchain.\n  int32 active_validators = 12;\n  // The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n  int64 total_power = 5;\n  // The power of the committee.\n  int64 committee_power = 6;\n  // If the blocks are subject to pruning.\n  bool is_pruned = 8;\n  // Lowest-height block stored (only present if pruning is enabled)\n  uint32 pruning_height = 9;\n  // Indicates whether this node participates in consensus: true if at least one\n  // of its running validators is a member of the current committee.\n  bool in_committee = 13;\n  // The number of validators in the current committee.\n  int32 committee_size = 14;\n  // Average availability score of validators with stake, in percentage (0-100).\n  double average_score = 15;\n}\n\n// Request message for retrieving committee information.\nmessage GetCommitteeInfoRequest {\n}\n\n// Response message contains committee information.\nmessage GetCommitteeInfoResponse {\n  // The number of validators in the committee.\n  int32 committee_size = 1;\n  // The power of the committee.\n  int64 committee_power = 2;\n  // The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\n  int64 total_power = 3;\n  // List of committee validators.\n  repeated ValidatorInfo validators = 4;\n  // Map of protocol versions and their percentages in the committee.\n  map<int32, double> protocol_versions = 5;\n}\n\n// Request message for retrieving consensus information.\nmessage GetConsensusInfoRequest {\n}\n\n// Response message contains consensus information.\nmessage GetConsensusInfoResponse {\n  // The proposal of the consensus info.\n  ProposalInfo proposal = 1;\n  // List of consensus instances.\n  repeated ConsensusInfo instances = 2;\n}\n\n// Request message for retrieving transactions in the transaction pool.\nmessage GetTxPoolContentRequest {\n  // The type of transactions to retrieve from the transaction pool. 0 means all types.\n  PayloadType payload_type = 1;\n}\n\n// Response message contains transactions in the transaction pool.\nmessage GetTxPoolContentResponse {\n  // List of transactions currently in the pool.\n  repeated TransactionInfo txs = 1;\n}\n\n// Message contains information about a validator.\nmessage ValidatorInfo {\n  // The hash of the validator.\n  string hash = 1;\n  // The serialized data of the validator.\n  string data = 2;\n  // The public key of the validator.\n  string public_key = 3;\n  // The unique number assigned to the validator.\n  int32 number = 4;\n  // The stake of the validator in NanoPAC.\n  int64 stake = 5;\n  // The height at which the validator last bonded.\n  uint32 last_bonding_height = 6;\n  // The height at which the validator last participated in sortition.\n  uint32 last_sortition_height = 7;\n  // The height at which the validator will unbond.\n  uint32 unbonding_height = 8;\n  // The address of the validator.\n  string address = 9;\n  // The availability score of the validator.\n  double availability_score = 10;\n  // The protocol version of the validator.\n  int32 protocol_version = 11;\n  // Whether the validator is delegated.\n  bool is_delegated = 12;\n  // The address of the stake owner of the validator.\n  string delegate_owner = 13;\n  // The share of the stake owner of the validator.\n  int64 delegate_share = 14;\n  // The expiry of the stake owner of the validator.\n  uint32 delegate_expiry = 15;\n}\n\n// Message contains information about an account.\nmessage AccountInfo {\n  // The hash of the account.\n  string hash = 1;\n  // The serialized data of the account.\n  string data = 2;\n  // The unique number assigned to the account.\n  int32 number = 3;\n  // The balance of the account in NanoPAC.\n  int64 balance = 4;\n  // The address of the account.\n  string address = 5;\n}\n\n// Message contains information about the header of a block.\nmessage BlockHeaderInfo {\n  // The version of the block.\n  int32 version = 1;\n  // The hash of the previous block.\n  string prev_block_hash = 2;\n  // The state root hash of the blockchain.\n  string state_root = 3;\n  // The sortition seed of the block.\n  string sortition_seed = 4;\n  // The address of the proposer of the block.\n  string proposer_address = 5;\n}\n\n// Message contains information about a certificate.\nmessage CertificateInfo {\n  // The hash of the certificate.\n  string hash = 1;\n  // The round of the certificate.\n  int32 round = 2;\n  // List of committers in the certificate.\n  repeated int32 committers = 3;\n  // List of absentees in the certificate.\n  repeated int32 absentees = 4;\n  // The signature of the certificate.\n  string signature = 5;\n}\n\n// Message contains information about a vote.\nmessage VoteInfo {\n  // The type of the vote.\n  VoteType type = 1;\n  // The address of the voter.\n  string voter = 2;\n  // The hash of the block being voted on.\n  string block_hash = 3;\n  // The consensus round of the vote.\n  int32 round = 4;\n  // The change-proposer round of the vote.\n  int32 cp_round = 5;\n  // The change-proposer value of the vote.\n  int32 cp_value = 6;\n}\n\n// Message contains information about a consensus instance.\nmessage ConsensusInfo {\n  // The address of the consensus instance.\n  string address = 1;\n  // Indicates whether the consensus instance is active and part of the committee.\n  bool active = 2;\n  // The height of the consensus instance.\n  uint32 height = 3;\n  // The round of the consensus instance.\n  int32 round = 4;\n  // List of votes in the consensus instance.\n  repeated VoteInfo votes = 5;\n}\n\n// Message contains information about a proposal.\nmessage ProposalInfo {\n  // The height of the proposal.\n  uint32 height = 1;\n  // The round of the proposal.\n  int32 round = 2;\n  // The block data of the proposal.\n  string block_data = 3;\n  // The signature of the proposal, signed by the proposer.\n  string signature = 4;\n}\n\n// Enumeration for verbosity levels when requesting block information.\nenum BlockVerbosity {\n  // Request only block data.\n  BLOCK_VERBOSITY_DATA = 0;\n  // Request block information and transaction IDs.\n  BLOCK_VERBOSITY_INFO = 1;\n  // Request block information and detailed transaction data.\n  BLOCK_VERBOSITY_TRANSACTIONS = 2;\n}\n\n// Enumeration for types of votes.\nenum VoteType {\n  // Unspecified vote type.\n  VOTE_TYPE_UNSPECIFIED = 0;\n  // Prepare vote type.\n  VOTE_TYPE_PREPARE = 1;\n  // Precommit vote type.\n  VOTE_TYPE_PRECOMMIT = 2;\n  // Change-proposer:pre-vote vote type.\n  VOTE_TYPE_CP_PRE_VOTE = 3;\n  // Change-proposer:main-vote vote type.\n  VOTE_TYPE_CP_MAIN_VOTE = 4;\n  // Change-proposer:decided vote type.\n  VOTE_TYPE_CP_DECIDED = 5;\n}\n"
  },
  {
    "path": "www/grpc/proto/network.proto",
    "content": "syntax = \"proto3\";\npackage pactus;\n\noption go_package = \"github.com/pactus-project/pactus/www/grpc/pactus\";\noption java_package = \"pactus\";\n\n// Direction represents the connection direction between peers.\nenum Direction {\n  // Unknown direction (default value).\n  DIRECTION_UNKNOWN = 0;\n  // Inbound connection - peer connected to us.\n  DIRECTION_INBOUND = 1;\n  // Outbound connection - we connected to peer.\n  DIRECTION_OUTBOUND = 2;\n}\n\n// Network service provides RPCs for retrieving information about the network.\nservice Network {\n  // GetNetworkInfo retrieves information about the overall network.\n  rpc GetNetworkInfo(GetNetworkInfoRequest) returns (GetNetworkInfoResponse);\n\n  // ListPeers lists all peers in the network.\n  rpc ListPeers(ListPeersRequest) returns (ListPeersResponse);\n\n  // GetNodeInfo retrieves information about a specific node in the network.\n  rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse);\n\n  // Ping provides a simple connectivity test and latency measurement.\n  rpc Ping(PingRequest) returns (PingResponse);\n}\n\n// Request message for retrieving overall network information.\nmessage GetNetworkInfoRequest {\n\n}\n\n// Response message contains information about the overall network.\nmessage GetNetworkInfoResponse {\n  // Name of the P2P network.\n  string network_name = 1;\n  // Number of connected peers.\n  uint32 connected_peers_count = 2;\n  // Metrics related to node activity.\n  MetricInfo metric_info = 4;\n}\n\n// Request message for listing peers.\nmessage ListPeersRequest {\n  // If true, includes disconnected peers (default: connected peers only).\n  bool include_disconnected = 1;\n}\n\n// Response message for listing peers.\nmessage ListPeersResponse {\n  // List of peers.\n  repeated PeerInfo peers = 1;\n}\n\n// Request message for retrieving information of the node.\nmessage GetNodeInfoRequest {\n}\n\n// Response message contains information about a specific node in the network.\nmessage GetNodeInfoResponse {\n  // Moniker or Human-readable name identifying this node in the network.\n  string moniker = 1;\n  // Version and agent details of the node.\n  string agent = 2;\n  // Peer ID of the node.\n  string peer_id = 3;\n  // Unix timestamp when the node was started (UTC).\n  uint64 started_at = 4;\n  // Reachability status of the node.\n  string reachability = 5;\n  // Bitfield representing the services provided by the node.\n  int32 services = 6;\n  // Names of services provided by the node.\n  string services_names = 7;\n  // List of addresses associated with the node.\n  repeated string local_addrs = 8;\n  // List of protocols supported by the node.\n  repeated string protocols = 9;\n  // Offset between the node's clock and the network's clock (in seconds).\n  double clock_offset = 13;\n  // Information about the node's connections.\n  ConnectionInfo connection_info = 14;\n  // List of active ZeroMQ publishers.\n  repeated ZMQPublisherInfo zmq_publishers = 15;\n  // Current Unix timestamp of the node (UTC).\n  uint64 current_time = 16;\n  // Name of the P2P network.\n  string network_name = 17;\n}\n\n// ZMQPublisherInfo contains information about a ZeroMQ publisher.\nmessage ZMQPublisherInfo {\n  // The topic associated with the publisher.\n  string topic = 1;\n  // The address of the publisher.\n  string address = 2;\n  // The high-water mark (HWM) for the publisher, indicating the\n  // maximum number of messages to queue before dropping older ones.\n  int32 hwm = 3;\n}\n\n// PeerInfo contains information about a peer in the network.\nmessage PeerInfo {\n  // Current status of the peer (e.g., connected, disconnected).\n  int32 status = 1;\n  // Moniker or Human-Readable name of the peer.\n  string moniker = 2;\n  // Version and agent details of the peer.\n  string agent = 3;\n  // Peer ID of the peer in P2P network.\n  string peer_id = 4;\n  // List of consensus keys used by the peer.\n  repeated string consensus_keys = 5;\n  // List of consensus addresses used by the peer.\n  repeated string consensus_addresses = 6;\n  // Bitfield representing the services provided by the peer.\n  uint32 services = 7;\n  // Hash of the last block the peer knows.\n  string last_block_hash = 8;\n  // Blockchain height of the peer.\n  uint32 height = 9;\n  // Unix timestamp of the last bundle sent to the peer (UTC).\n  int64 last_sent = 10;\n  // Unix timestamp of the last bundle received from the peer (UTC).\n  int64 last_received = 11;\n  // Network address of the peer.\n  string address = 12;\n  // Connection direction (e.g., inbound, outbound).\n  Direction direction = 13;\n  // List of protocols supported by the peer.\n  repeated string protocols = 14;\n  // Total download sessions with the peer.\n  int32 total_sessions = 15;\n  // Completed download sessions with the peer.\n  int32 completed_sessions = 16;\n  // Metrics related to peer activity.\n  MetricInfo metric_info = 17;\n  // Whether the hello message was sent from the outbound connection.\n  bool outbound_hello_sent = 18;\n}\n\n// ConnectionInfo contains information about the node's connections.\nmessage ConnectionInfo {\n  // Total number of connections.\n  uint64 connections = 1;\n  // Number of inbound connections.\n  uint64 inbound_connections = 2;\n  // Number of outbound connections.\n  uint64 outbound_connections = 3;\n}\n\n// MetricInfo contains metrics data regarding network activity.\nmessage MetricInfo {\n  // Total number of invalid bundles.\n  CounterInfo total_invalid = 1;\n  // Total number of bundles sent.\n  CounterInfo total_sent = 2;\n  // Total number of bundles received.\n  CounterInfo total_received = 3;\n  // Number of sent bundles categorized by message type.\n  map<int32, CounterInfo> message_sent = 4;\n  // Number of received bundles categorized by message type.\n  map<int32, CounterInfo> message_received = 5;\n}\n\n// CounterInfo holds counter data regarding byte and bundle counts.\nmessage CounterInfo {\n  // Total number of bytes.\n  uint64 bytes = 1;\n  // Total number of bundles.\n  uint64 bundles = 2;\n}\n\n// Request message for ping - intentionally empty for measuring round-trip time.\nmessage PingRequest {\n  // Empty request payload for measuring round-trip time\n}\n\n// Response message for ping - intentionally empty for measuring round-trip time.\nmessage PingResponse {\n  // Empty response payload for measuring round-trip time\n}\n"
  },
  {
    "path": "www/grpc/proto/transaction.proto",
    "content": "syntax = \"proto3\";\npackage pactus;\n\noption go_package = \"github.com/pactus-project/pactus/www/grpc/pactus\";\noption java_package = \"pactus\";\n\n// Transaction service defines various RPC methods for interacting with transactions.\nservice Transaction {\n  // GetTransaction retrieves transaction details based on the provided request parameters.\n  rpc GetTransaction(GetTransactionRequest) returns (GetTransactionResponse);\n\n  // CalculateFee calculates the transaction fee based on the specified amount and payload type.\n  rpc CalculateFee(CalculateFeeRequest) returns (CalculateFeeResponse);\n\n  // BroadcastTransaction broadcasts a signed transaction to the network.\n  rpc BroadcastTransaction(BroadcastTransactionRequest) returns (BroadcastTransactionResponse);\n\n  // GetRawTransferTransaction retrieves raw details of a transfer transaction.\n  rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) returns (GetRawTransactionResponse);\n\n  // GetRawBondTransaction retrieves raw details of a bond transaction.\n  rpc GetRawBondTransaction(GetRawBondTransactionRequest) returns (GetRawTransactionResponse);\n\n  // GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n  rpc GetRawUnbondTransaction(GetRawUnbondTransactionRequest) returns (GetRawTransactionResponse);\n\n  // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n  rpc GetRawWithdrawTransaction(GetRawWithdrawTransactionRequest) returns (GetRawTransactionResponse);\n\n  // GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\n  rpc GetRawBatchTransferTransaction(GetRawBatchTransferTransactionRequest) returns (GetRawTransactionResponse);\n\n  // DecodeRawTransaction accepts raw transaction and returns decoded transaction.\n  rpc DecodeRawTransaction(DecodeRawTransactionRequest) returns (DecodeRawTransactionResponse);\n\n  // CheckTransaction checks if the transaction is valid and can be included in the blockchain.\n  rpc CheckTransaction(CheckTransactionRequest) returns (CheckTransactionResponse);\n}\n\n// Request message for retrieving transaction details.\nmessage GetTransactionRequest {\n  // The unique ID of the transaction to retrieve.\n  string id = 1;\n  // The verbosity level for transaction details.\n  TransactionVerbosity verbosity = 2;\n}\n\n// Response message contains details of a transaction.\nmessage GetTransactionResponse {\n  // The height of the block containing the transaction.\n  uint32 block_height = 1;\n  // The UNIX timestamp of the block containing the transaction.\n  uint32 block_time = 2;\n  // Detailed information about the transaction.\n  TransactionInfo transaction = 3;\n}\n\n// Request message for calculating transaction fee.\nmessage CalculateFeeRequest {\n  // The amount involved in the transaction, specified in NanoPAC.\n  int64 amount = 1;\n  // The type of transaction payload.\n  PayloadType payload_type = 2;\n  // Indicates if the amount should be fixed and include the fee.\n  bool fixed_amount = 3;\n}\n\n// Response message contains the calculated transaction fee.\nmessage CalculateFeeResponse {\n  // The calculated amount in NanoPAC.\n  int64 amount = 1;\n  // The calculated transaction fee in NanoPAC.\n  int64 fee = 2;\n}\n\n// Request message for broadcasting a signed transaction to the network.\nmessage BroadcastTransactionRequest {\n  // The signed raw transaction data to be broadcasted.\n  string signed_raw_transaction = 1;\n}\n\n// Response message contains the ID of the broadcasted transaction.\nmessage BroadcastTransactionResponse {\n  // The unique ID of the broadcasted transaction.\n  string id = 1;\n}\n\n// Request message for retrieving raw details of a transfer transaction.\nmessage GetRawTransferTransactionRequest {\n  // The lock time for the transaction. If not set, defaults to the last block height.\n  uint32 lock_time = 1;\n  // The sender's account address.\n  string sender = 2;\n  // The receiver's account address.\n  string receiver = 3;\n  // The amount to be transferred, specified in NanoPAC. Must be greater than 0.\n  int64 amount = 4;\n  // The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  int64 fee = 5;\n  // A memo string for the transaction.\n  string memo = 6;\n}\n\n// Request message for retrieving raw details of a bond transaction.\nmessage GetRawBondTransactionRequest {\n  // The lock time for the transaction. If not set, defaults to the last block height.\n  uint32 lock_time = 1;\n  // The sender's account address.\n  string sender = 2;\n  // The receiver's validator address.\n  string receiver = 3;\n  // The stake amount in NanoPAC. Must be greater than 0.\n  int64 stake = 4;\n  // The public key of the validator.\n  // Optional, but required when registering a new validator.;\n  string public_key = 5;\n  // The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  int64 fee = 6;\n  // A memo string for the transaction.\n  string memo = 7;\n  // The address of the delegate owner.\n  // Optional, but required when registering a new validator with delegation.;\n  string delegate_owner = 8;\n  // The share percentage for the delegate owner.\n  // Optional, but required when registering a new validator with delegation.;\n  // Must be between 0 and 0.7 PAC in nano PAC.\n  int64 delegate_share = 9;\n  // The expiry height for the delegate relationship.\n  // Optional, but required when registering a new validator with delegation.;\n  uint32 delegate_expiry = 10;\n}\n\n// Request message for retrieving raw details of an unbond transaction.\nmessage GetRawUnbondTransactionRequest {\n  // The lock time for the transaction. If not set, defaults to the last block height.\n  uint32 lock_time = 1;\n  // The address of the validator to unbond from.\n  string validator_address = 2;\n  // A memo string for the transaction.\n  string memo = 3;\n  // The address of the delegate owner.\n  // Optional, but required when the validator is a delegated validator.;\n  string delegate_owner = 4;\n}\n\n// Request message for retrieving raw details of a withdraw transaction.\nmessage GetRawWithdrawTransactionRequest {\n  // The lock time for the transaction. If not set, defaults to the last block height.\n  uint32 lock_time = 1;\n  // The address of the validator to withdraw from.\n  string validator_address = 2;\n  // The address of the account to withdraw to.\n  string account_address = 3;\n  // The withdrawal amount in NanoPAC. Must be greater than 0.\n  int64 amount = 4;\n  // The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  int64 fee = 5;\n  // A memo string for the transaction.\n  string memo = 6;\n}\n\n// Request message for retrieving raw details of a batch transfer transaction.\nmessage GetRawBatchTransferTransactionRequest {\n  // The lock time for the transaction. If not set, defaults to the last block height.\n  uint32 lock_time = 1;\n  // The sender's account address.\n  string sender = 2;\n  // The list of recipients with their amounts. Minimum 2 recipients required.\n  repeated Recipient recipients = 3;\n  // The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\n  int64 fee = 4;\n  // A memo string for the transaction.\n  string memo = 5;\n}\n\n// Response message contains raw transaction data.\nmessage GetRawTransactionResponse {\n  // The raw transaction data in hexadecimal format.\n  string raw_transaction = 1;\n  // The unique ID of the transaction.\n  string id = 2;\n}\n\n// Payload for a transfer transaction.\nmessage PayloadTransfer {\n  // The sender's address.\n  string sender = 1;\n  // The receiver's address.\n  string receiver = 2;\n  // The amount to be transferred in NanoPAC.\n  int64 amount = 3;\n}\n\n// Payload for a bond transaction.\nmessage PayloadBond {\n  // The sender's address.\n  string sender = 1;\n  // The receiver's address.\n  string receiver = 2;\n  // The stake amount in NanoPAC.\n  int64 stake = 3;\n  // The public key of the validator.\n  string public_key = 4;\n\n  // Indicates whether the bond transaction is a delegation.\n  bool is_delegated = 5;\n  // The address of the delegate owner.\n  // Optional, but required when registering a new validator with delegation.;\n  string delegate_owner = 6;\n  // The share percentage for the delegate owner.\n  // Optional, but required when registering a new validator with delegation.;\n  // Must be between 0 and 0.7 PAC in nano PAC.\n  int64 delegate_share = 7;\n  // The expiry height for the delegate relationship.\n  // Optional, but required when registering a new validator with delegation.;\n  uint32 delegate_expiry = 8;\n}\n\n// Payload for a sortition transaction.\nmessage PayloadSortition {\n  // The validator address associated with the sortition proof.\n  string address = 1;\n  // The proof for the sortition.\n  string proof = 2;\n}\n\n// Payload for an unbond transaction.\nmessage PayloadUnbond {\n  // The address of the validator to unbond from.\n  string validator = 1;\n  // The address of the delegate owner.\n  // Optional, but required when the validator is a delegated validator.;\n  string delegate_owner = 2;\n}\n\n// Payload for a withdraw transaction.\nmessage PayloadWithdraw {\n  // The address of the validator to withdraw from.\n  string validator_address = 1;\n  // The address of the account to withdraw to.\n  string account_address = 2;\n  // The withdrawal amount in NanoPAC.\n  int64 amount = 3;\n}\n\n// Payload for a batch transfer transaction.\nmessage PayloadBatchTransfer {\n  // The sender's address.\n  string sender = 1;\n  // The list of recipients with their amounts.\n  repeated Recipient recipients = 2;\n}\n\n// Recipient is receiver with amount.\nmessage Recipient {\n  // The receiver's address.\n  string receiver = 1;\n  // The amount in NanoPAC.\n  int64 amount = 2;\n}\n\n// Information about a transaction.\nmessage TransactionInfo {\n  // The unique ID of the transaction.\n  string id = 1;\n  // The raw transaction data in hexadecimal format.\n  string data = 2;\n  // The version of the transaction.\n  int32 version = 3;\n  // The lock time for the transaction.\n  uint32 lock_time = 4;\n  // The value of the transaction in NanoPAC.\n  int64 value = 5;\n  // The fee for the transaction in NanoPAC.\n  int64 fee = 6;\n  // The type of transaction payload.\n  PayloadType payload_type = 7;\n  // Transaction payload.\n  oneof payload {\n    // Transfer transaction payload.\n    PayloadTransfer transfer = 30;\n    // Bond transaction payload.\n    PayloadBond bond = 31;\n    // Sortition transaction payload.\n    PayloadSortition sortition = 32;\n    // Unbond transaction payload.\n    PayloadUnbond unbond = 33;\n    // Withdraw transaction payload.\n    PayloadWithdraw withdraw = 34;\n    // Batch Transfer transaction payload.\n    PayloadBatchTransfer batch_transfer = 35;\n  }\n  // A memo string for the transaction.\n  string memo = 8;\n  // The public key associated with the transaction.\n  string public_key = 9;\n  // The signature for the transaction.\n  string signature = 10;\n\n  // The block height containing the transaction.\n  // A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n  uint32 block_height = 11;\n\n  // Indicates whether the transaction is confirmed.\n  bool confirmed = 12;\n\n  // The number of blocks that have been added to the chain after this transaction was included in a block.\n  // A value of zero means the transaction is unconfirmed and may still in the transaction pool.\n  int32 confirmations = 13;\n}\n\n// Enumeration for different types of transaction payloads.\nenum PayloadType {\n  // Unspecified payload type.\n  PAYLOAD_TYPE_UNSPECIFIED = 0;\n  // Transfer payload type.\n  PAYLOAD_TYPE_TRANSFER = 1;\n  // Bond payload type.\n  PAYLOAD_TYPE_BOND = 2;\n  // Sortition payload type.\n  PAYLOAD_TYPE_SORTITION = 3;\n  // Unbond payload type.\n  PAYLOAD_TYPE_UNBOND = 4;\n  // Withdraw payload type.\n  PAYLOAD_TYPE_WITHDRAW = 5;\n  // Batch transfer payload type.\n  PAYLOAD_TYPE_BATCH_TRANSFER = 6;\n}\n\n// Enumeration for verbosity levels when requesting transaction details.\nenum TransactionVerbosity {\n  // Request transaction data only.\n  TRANSACTION_VERBOSITY_DATA = 0;\n  // Request detailed transaction information.\n  TRANSACTION_VERBOSITY_INFO = 1;\n}\n\n// Request message for decoding a raw transaction.\nmessage DecodeRawTransactionRequest {\n  // The raw transaction data in hexadecimal format.\n  string raw_transaction = 1;\n}\n\n// Response message contains the decoded transaction.\nmessage DecodeRawTransactionResponse {\n  // The decoded transaction information.\n  TransactionInfo transaction = 1;\n}\n\n\n// Request message for checking a transaction.\nmessage CheckTransactionRequest {\n  // The raw transaction data to be checked.\n  string raw_transaction = 1;\n}\n\n// Response message contains the result of the transaction check.\nmessage CheckTransactionResponse {\n  // Indicates whether the transaction is valid.\n  bool is_valid = 1;\n  // An error message if the transaction is invalid.\n  // Empty if the transaction is valid.\n  string error_message = 2;\n}\n"
  },
  {
    "path": "www/grpc/proto/utils.proto",
    "content": "syntax = \"proto3\";\npackage pactus;\n\noption go_package = \"github.com/pactus-project/pactus/www/grpc/pactus\";\noption java_package = \"pactus\";\n\n// Utils service defines RPC methods for utility functions such as message\n// signing, verification, and other cryptographic operations.\nservice Utils {\n  // SignMessageWithPrivateKey signs a message with the provided private key.\n  rpc SignMessageWithPrivateKey(SignMessageWithPrivateKeyRequest) returns (SignMessageWithPrivateKeyResponse);\n\n  // VerifyMessage verifies a signature against the public key and message.\n  rpc VerifyMessage(VerifyMessageRequest) returns (VerifyMessageResponse);\n\n  // PublicKeyAggregation aggregates multiple BLS public keys into a single key.\n  rpc PublicKeyAggregation(PublicKeyAggregationRequest) returns (PublicKeyAggregationResponse);\n\n  // SignatureAggregation aggregates multiple BLS signatures into a single signature.\n  rpc SignatureAggregation(SignatureAggregationRequest) returns (SignatureAggregationResponse);\n\n}\n\n// Request message for signing a message with a private key.\nmessage SignMessageWithPrivateKeyRequest {\n  // The private key to sign the message.\n  string private_key = 1;\n  // The message content to be signed.\n  string message = 2;\n}\n\n// Response message contains the signature generated from the message.\nmessage SignMessageWithPrivateKeyResponse {\n  // The resulting signature in hexadecimal format.\n  string signature = 1;\n}\n\n// Request message for verifying a message signature.\nmessage VerifyMessageRequest {\n  // The original message content that was signed.\n  string message = 1;\n  // The signature to verify in hexadecimal format.\n  string signature = 2;\n  // The public key of the signer.\n  string public_key = 3;\n}\n\n// Response message contains the verification result.\nmessage VerifyMessageResponse {\n  // Boolean indicating whether the signature is valid for the given message and public key.\n  bool is_valid = 1;\n}\n\n// Request message for aggregating multiple BLS public keys.\nmessage PublicKeyAggregationRequest {\n  // List of BLS public keys to be aggregated.\n  repeated string public_keys = 1;\n}\n\n// Response message contains the aggregated BLS public key result.\nmessage PublicKeyAggregationResponse {\n  // The aggregated BLS public key.\n  string public_key = 1;\n  // The blockchain address derived from the aggregated public key.\n  string address = 2;\n}\n\n// Request message for aggregating multiple BLS signatures.\nmessage SignatureAggregationRequest {\n  // List of BLS signatures to be aggregated.\n  repeated string signatures = 1;\n}\n\n// Response message contains the aggregated BLS signature.\nmessage SignatureAggregationResponse {\n  // The aggregated BLS signature in hexadecimal format.\n  string signature = 1;\n}\n"
  },
  {
    "path": "www/grpc/proto/wallet.proto",
    "content": "syntax = \"proto3\";\npackage pactus;\n\nimport \"transaction.proto\";\n\noption go_package = \"github.com/pactus-project/pactus/www/grpc/pactus\";\noption java_package = \"pactus\";\n\n// Wallet service provides RPC methods for wallet management operations.\nservice Wallet {\n  // CreateWallet creates a new wallet with the specified parameters.\n  rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse);\n\n  // RestoreWallet restores an existing wallet with the given mnemonic.\n  rpc RestoreWallet(RestoreWalletRequest) returns (RestoreWalletResponse);\n\n  // LoadWallet loads an existing wallet with the given name.\n  // deprecated: It will be removed in a future version.\n  rpc LoadWallet(LoadWalletRequest) returns (LoadWalletResponse);\n\n  // UnloadWallet unloads a currently loaded wallet with the specified name.\n  // deprecated: It will be removed in a future version.\n  rpc UnloadWallet(UnloadWalletRequest) returns (UnloadWalletResponse);\n\n  // ListWallets returns a list of all available wallets.\n  rpc ListWallets(ListWalletsRequest) returns (ListWalletsResponse);\n\n  // GetWalletInfo returns detailed information about a specific wallet.\n  rpc GetWalletInfo(GetWalletInfoRequest) returns (GetWalletInfoResponse);\n\n  // UpdatePassword updates the password of an existing wallet.\n  rpc UpdatePassword(UpdatePasswordRequest) returns (UpdatePasswordResponse);\n\n  // GetTotalBalance returns the total available balance of the wallet.\n  rpc GetTotalBalance(GetTotalBalanceRequest) returns (GetTotalBalanceResponse);\n\n  // GetTotalStake returns the total stake amount in the wallet.\n  rpc GetTotalStake(GetTotalStakeRequest) returns (GetTotalStakeResponse);\n\n  // GetValidatorAddress retrieves the validator address associated with a public key.\n  // Deprecated: Will move into utils.\n  rpc GetValidatorAddress(GetValidatorAddressRequest) returns (GetValidatorAddressResponse);\n\n  // GetAddressInfo returns detailed information about a specific address.\n  rpc GetAddressInfo(GetAddressInfoRequest) returns (GetAddressInfoResponse);\n\n  // SetAddressLabel sets or updates the label for a given address.\n  rpc SetAddressLabel(SetAddressLabelRequest) returns (SetAddressLabelResponse);\n\n  // GetNewAddress generates a new address for the specified wallet.\n  rpc GetNewAddress(GetNewAddressRequest) returns (GetNewAddressResponse);\n\n  // ListAddresses returns all addresses in the specified wallet.\n  rpc ListAddresses(ListAddressesRequest) returns (ListAddressesResponse);\n\n  // SignMessage signs an arbitrary message using a wallet's private key.\n  rpc SignMessage(SignMessageRequest) returns (SignMessageResponse);\n\n  // SignRawTransaction signs a raw transaction for a specified wallet.\n  rpc SignRawTransaction(SignRawTransactionRequest) returns (SignRawTransactionResponse);\n\n  // ListTransactions returns a list of transactions for a wallet,\n  // optionally filtered by a specific address, with pagination support.\n  rpc ListTransactions(ListTransactionsRequest) returns (ListTransactionsResponse);\n\n  // SetDefaultFee sets the default fee for the wallet.\n  rpc SetDefaultFee(SetDefaultFeeRequest) returns (SetDefaultFeeResponse);\n\n  // GetMnemonic returns the mnemonic (seed phrase) for the wallet.\n  rpc GetMnemonic(GetMnemonicRequest) returns (GetMnemonicResponse);\n\n  // GetPrivateKey returns the private key for a given address.\n  rpc GetPrivateKey(GetPrivateKeyRequest) returns (GetPrivateKeyResponse);\n}\n\n// AddressType defines different types of blockchain addresses.\nenum AddressType {\n  // Treasury address type.\n  // Should not be used to generate new addresses.\n  ADDRESS_TYPE_TREASURY = 0;\n  // Validator address type used for validator nodes.\n  ADDRESS_TYPE_VALIDATOR = 1;\n  // Account address type with BLS signature scheme.\n  ADDRESS_TYPE_BLS_ACCOUNT = 2;\n  // Account address type with Ed25519 signature scheme.\n  // Note: Generating a new Ed25519 address requires the wallet password.\n  ADDRESS_TYPE_ED25519_ACCOUNT = 3;\n}\n\n// AddressInfo contains detailed information about a wallet address.\nmessage AddressInfo {\n  // The address string.\n  string address = 1;\n  // The public key associated with the address.\n  string public_key = 2;\n  // A human-readable label associated with the address.\n  string label = 3;\n  // The Hierarchical Deterministic (HD) path of the address within the wallet.\n  string path = 4;\n}\n\n// Request message for generating a new wallet address.\nmessage GetNewAddressRequest {\n  // The name of the wallet to generate a new address.\n  string wallet_name = 1;\n  // The type of address to generate.\n  AddressType address_type = 2;\n  // A label for the new address.\n  string label = 3;\n  // Password for the new address. It's required when address_type is Ed25519 type.\n  string password = 4;\n}\n\n// Response message contains newly generated address information.\nmessage GetNewAddressResponse {\n  // The name of the wallet where address was generated.\n  string wallet_name = 1;\n  // Detailed information about the new address.\n  AddressInfo addr = 2;\n}\n\n// Request message for restoring a wallet from mnemonic (seed phrase).\nmessage RestoreWalletRequest {\n  // The name for the restored wallet.\n  string wallet_name = 1;\n  // The mnemonic (seed phrase) for wallet recovery.\n  string mnemonic = 2;\n  // Password to secure the restored wallet.\n  string password = 3;\n}\n\n// Response message confirming wallet restoration.\nmessage RestoreWalletResponse {\n  // The name of the restored wallet.\n  string wallet_name = 1;\n}\n\n// Request message for creating a new wallet.\nmessage CreateWalletRequest {\n  // The name for the new wallet.\n  string wallet_name = 1;\n  // Password to secure the new wallet.\n  string password = 2;\n}\n\n// Response message contains wallet recovery mnemonic (seed phrase).\nmessage CreateWalletResponse {\n  // The name for the new wallet.\n  string wallet_name = 1;\n  // The mnemonic (seed phrase) for wallet recovery.\n  string mnemonic = 2;\n}\n\n// Request message for loading an existing wallet.\n// Deprecated: It will be removed in a future version.\nmessage LoadWalletRequest {\n  // The name of the wallet to load.\n  string wallet_name = 1;\n}\n\n// Response message confirming wallet loaded.\n// Deprecated: It will be removed in a future version.\nmessage LoadWalletResponse {\n  // The name of the loaded wallet.\n  string wallet_name = 1;\n}\n\n// Request message for unloading a wallet.\n// Deprecated: It will be removed in a future version.\nmessage UnloadWalletRequest {\n  // The name of the wallet to unload.\n  string wallet_name = 1;\n}\n\n// Response message confirming wallet unloading.\n// Deprecated: It will be removed in a future version.\nmessage UnloadWalletResponse {\n  // The name of the unloaded wallet.\n  string wallet_name = 1;\n}\n\n// Request message for obtaining the validator address associated with a public key.\nmessage GetValidatorAddressRequest {\n  // The public key of the validator.\n  string public_key = 1;\n}\n\n// Response message containing the validator address corresponding to a public key.\nmessage GetValidatorAddressResponse {\n  // The validator address associated with the public key.\n  string address = 1;\n}\n\n// Request message for signing a raw transaction.\nmessage SignRawTransactionRequest {\n  // The name of the wallet used for signing.\n  string wallet_name = 1;\n  // The raw transaction data to be signed.\n  string raw_transaction = 2;\n  // Wallet password required for signing.\n  string password = 3;\n}\n\n// Response message contains the transaction ID and signed raw transaction.\nmessage SignRawTransactionResponse {\n  // The ID of the signed transaction.\n  string transaction_id = 1;\n  // The signed raw transaction data.\n  string signed_raw_transaction = 2;\n}\n\n// Request message for obtaining the total available balance of a wallet.\nmessage GetTotalBalanceRequest {\n  // The name of the wallet to get the total balance.\n  string wallet_name = 1;\n}\n\n// Response message contains the total available balance of the wallet.\nmessage GetTotalBalanceResponse {\n  // The name of the queried wallet.\n  string wallet_name = 1;\n  // The total balance of the wallet in NanoPAC.\n  int64 total_balance = 2;\n}\n\n// Request message to sign an arbitrary message.\nmessage SignMessageRequest {\n  // The name of the wallet to sign with.\n  string wallet_name = 1;\n  // Wallet password required for signing.\n  string password = 2;\n  // The address whose private key should be used for signing the message.\n  string address = 3;\n  // The arbitrary message to be signed.\n  string message = 4;\n}\n\n// Response message contains message signature.\nmessage SignMessageResponse {\n  // The signature in hexadecimal format.\n  string signature = 1;\n}\n\n// Request message for obtaining the total stake of a wallet.\nmessage GetTotalStakeRequest {\n  // The name of the wallet to get the total stake.\n  string wallet_name = 1;\n}\n\n// Response message contains the total stake of the wallet.\nmessage GetTotalStakeResponse {\n  // The name of the queried wallet.\n  string wallet_name = 1;\n  // The total stake amount in NanoPAC.\n  int64 total_stake = 2;\n}\n\n// Request message for getting address information.\nmessage GetAddressInfoRequest {\n  // The name of the wallet containing the address.\n  string wallet_name = 1;\n  // The address to query.\n  string address = 2;\n}\n\n// Response message contains address details.\nmessage GetAddressInfoResponse {\n  // The name of the wallet containing the address.\n  string wallet_name = 1;\n  // Detailed information about the address.\n  AddressInfo addr = 2;\n}\n\n// Request message for setting address label.\nmessage SetAddressLabelRequest {\n  // The name of the wallet containing the address.\n  string wallet_name = 1;\n  // Wallet password required for modification.\n  string password = 2;\n  // The address to label.\n  string address = 3;\n  // The new label for the address.\n  string label = 4;\n}\n\n// Response message for updated address label.\nmessage SetAddressLabelResponse {\n  // The name of the wallet where the address label was updated.\n  string wallet_name = 1;\n  // The address where the label was updated.\n  string address = 2;\n  // The new label for the address.\n  string label = 3;\n}\n\n// Request message for listing wallets.\nmessage ListWalletsRequest {\n}\n\n// Response message contains wallet names.\nmessage ListWalletsResponse {\n  // Array of wallet names.\n  repeated string wallets = 1;\n}\n\n// Request message for getting wallet information.\nmessage GetWalletInfoRequest {\n  // The name of the wallet to query.\n  string wallet_name = 1;\n}\n\n// Response message contains wallet details.\nmessage GetWalletInfoResponse {\n  // The name of the wallet.\n  string wallet_name = 1;\n\n  // The wallet format version.\n  int32 version = 2;\n\n  // The network the wallet is connected to (e.g., mainnet, testnet).\n  string network = 3;\n\n  // Indicates if the wallet is encrypted.\n  bool encrypted = 4;\n\n  // A unique identifier of the wallet.\n  string uuid = 5;\n\n  // Unix timestamp of wallet creation.\n  int64 created_at = 6;\n\n  // The default fee of the wallet.\n  int64 default_fee = 7;\n\n  // The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\n  string driver = 8;\n\n  // Path to the wallet file or storage location.\n  string path = 9;\n}\n\n// Request message for listing wallet addresses.\nmessage ListAddressesRequest {\n  // The name of the queried wallet.\n  string wallet_name = 1;\n\n  // Filter addresses by their types. If empty, all address types are included.\n  repeated AddressType address_types = 2;\n}\n\n// Response message contains wallet addresses.\nmessage ListAddressesResponse {\n  // The name of the queried wallet.\n  string wallet_name = 1;\n\n  // List of all addresses in the wallet with their details.\n  repeated AddressInfo addrs = 2;\n}\n\n// Request message for updating wallet password.\nmessage UpdatePasswordRequest {\n  // The name of the wallet whose password will be updated.\n  string wallet_name = 1;\n  // The current wallet password.\n  string old_password = 2;\n  // The new wallet password.\n  string new_password = 3;\n}\n\n// Response message confirming wallet password update.\nmessage UpdatePasswordResponse {\n  // The name of the wallet whose password was updated.\n  string wallet_name = 1;\n}\n\n// TxDirection indicates the direction of a transaction relative to the wallet.\nenum TxDirection {\n  // include both incoming and outgoing transactions.\n  TX_DIRECTION_ANY = 0;\n\n  // Include only incoming transactions where the wallet receives funds.\n  TX_DIRECTION_INCOMING = 1;\n\n  // Include only outgoing transactions where the wallet sends funds.\n  TX_DIRECTION_OUTGOING = 2;\n}\n\n// TransactionStatus defines the status of a transaction.\nenum TransactionStatus {\n  // Pending status for transactions in the mempool.\n  TRANSACTION_STATUS_PENDING = 0;\n  // Confirmed status for transactions included in a block.\n  TRANSACTION_STATUS_CONFIRMED = 1;\n  // Failed status for transactions that were not successful.\n  TRANSACTION_STATUS_FAILED = -1;\n}\n\n// WalletTransactionInfo contains information about a transaction in a wallet.\nmessage WalletTransactionInfo {\n  // A sequence number for the transaction in the wallet.\n  int64 no = 1;\n  // The unique ID of the transaction.\n  string tx_id = 2;\n  // The sender's address.\n  string sender = 3;\n  // The receiver's address.\n  string receiver = 4;\n  // The direction of the transaction relative to the wallet.\n  TxDirection direction = 5;\n  // The amount involved in the transaction in NanoPAC.\n  int64 amount = 6;\n  // The transaction fee in NanoPAC.\n  int64 fee = 7;\n  // A memo string for the transaction.\n  string memo = 8;\n  // The current status of the transaction.\n  TransactionStatus status = 9;\n  // The block height containing the transaction.\n  uint32 block_height = 10;\n  // The type of transaction payload.\n  PayloadType payload_type = 11;\n  // The raw transaction data.\n  bytes data = 12;\n  // A comment associated with the transaction in the wallet.\n  string comment = 13;\n  // Unix timestamp of when the transaction was created.\n  int64 created_at = 14;\n  // Unix timestamp of when the transaction was last updated.\n  int64 updated_at = 15;\n}\n\n// Request message for listing transactions of a wallet, optionally filtered by a specific address.\nmessage ListTransactionsRequest {\n  // The name of the wallet to query transactions for.\n  string wallet_name = 1;\n\n  // Optional: The address to filter transactions.\n  // If empty or set to '*', transactions for all addresses in the wallet are included.\n  string address = 2;\n\n  // Filter transactions by direction relative to the wallet.\n  // Defaults to any direction if not set.\n  TxDirection direction = 3;\n\n  // Optional: The maximum number of transactions to return.\n  // Defaults to 10 if not set.\n  int32 count = 4;\n\n  // Optional: The number of transactions to skip (for pagination).\n  // Defaults to 0 if not set.\n  int32 skip = 5;\n}\n\n// Response message containing a list of transactions.\nmessage ListTransactionsResponse {\n  // The name of the wallet queried.\n  string wallet_name = 1;\n\n  // List of transactions for the wallet, filtered by the specified address if provided.\n  repeated WalletTransactionInfo txs = 2;\n}\n\n// Request message for setting default fee.\nmessage SetDefaultFeeRequest {\n  // The name of the wallet to set the default fee.\n  string wallet_name = 1;\n  // The default fee amount in NanoPAC.\n  int64 amount = 2;\n}\n\n// Response message for updated default fee.\nmessage SetDefaultFeeResponse {\n  // The name of the wallet where the default fee was updated.\n  string wallet_name = 1;\n}\n\n// Request message for getting mnemonic.\nmessage GetMnemonicRequest {\n  // The name of the wallet to get the mnemonic.\n  string wallet_name = 1;\n  // Wallet password.\n  string password = 2;\n}\n\n// Response message contains mnemonic.\nmessage GetMnemonicResponse {\n  // The mnemonic (seed phrase).\n  string mnemonic = 1;\n}\n\n// Request message for getting private key.\nmessage GetPrivateKeyRequest {\n  // The name of the wallet containing the address.\n  string wallet_name = 1;\n  // Wallet password.\n  string password = 2;\n  // The address to get the private key.\n  string address = 3;\n}\n\n// Response message contains private key.\nmessage GetPrivateKeyResponse {\n  // The private key in hexadecimal format.\n  string private_key = 1;\n}\n"
  },
  {
    "path": "www/grpc/server.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"net\"\n\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/pactus-project/pactus/www/zmq\"\n\t\"google.golang.org/grpc\"\n)\n\ntype Server struct {\n\tctx           context.Context\n\tconfig        *Config\n\tlistener      net.Listener\n\tserver        *grpc.Server\n\taddress       string\n\tstate         state.Facade\n\tnet           network.Network\n\tsync          sync.Synchronizer\n\tconsMgr       consmgr.ManagerReader\n\twalletMgr     wltmgr.IManager\n\tzmqPublishers []zmq.Publisher\n\tlogger        *logger.SubLogger\n}\n\nfunc NewServer(ctx context.Context, conf *Config, state state.Facade, sync sync.Synchronizer,\n\tnetwork network.Network, consMgr consmgr.ManagerReader,\n\twalletMgr wltmgr.IManager,\n\tzmqPublishers []zmq.Publisher,\n) *Server {\n\treturn &Server{\n\t\tctx:           ctx,\n\t\tconfig:        conf,\n\t\tstate:         state,\n\t\tsync:          sync,\n\t\tnet:           network,\n\t\tconsMgr:       consMgr,\n\t\twalletMgr:     walletMgr,\n\t\tzmqPublishers: zmqPublishers,\n\t\tlogger:        logger.NewSubLogger(\"_grpc\", nil),\n\t}\n}\n\nfunc (s *Server) Address() string {\n\treturn s.address\n}\n\nfunc (s *Server) StartServer() error {\n\tif !s.config.Enable {\n\t\treturn nil\n\t}\n\n\tlistener, err := util.NetworkListen(s.ctx, \"tcp\", s.config.Listen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn s.startListening(listener)\n}\n\nfunc (s *Server) startListening(listener net.Listener) error {\n\topts := make([]grpc.UnaryServerInterceptor, 0)\n\n\tif s.config.BasicAuth != \"\" {\n\t\topts = append(opts, BasicAuth(s.config.BasicAuth))\n\t}\n\n\topts = append(opts, s.Recovery())\n\n\tgrpcServer := grpc.NewServer(grpc.ChainUnaryInterceptor(opts...))\n\n\tblockchainServer := newBlockchainServer(s)\n\ttransactionServer := newTransactionServer(s)\n\tnetworkServer := newNetworkServer(s)\n\tutilServer := newUtilsServer(s)\n\n\tpactus.RegisterBlockchainServer(grpcServer, blockchainServer)\n\tpactus.RegisterTransactionServer(grpcServer, transactionServer)\n\tpactus.RegisterNetworkServer(grpcServer, networkServer)\n\tpactus.RegisterUtilsServer(grpcServer, utilServer)\n\n\tif s.config.EnableWallet {\n\t\twalletServer := newWalletServer(s, s.walletMgr)\n\n\t\tpactus.RegisterWalletServer(grpcServer, walletServer)\n\t}\n\n\ts.listener = listener\n\ts.address = listener.Addr().String()\n\ts.server = grpcServer\n\n\tgo func() {\n\t\ts.logger.Info(\"gRPC server start listening\", \"address\", listener.Addr())\n\t\tif err := s.server.Serve(listener); err != nil {\n\t\t\ts.logger.Debug(\"error on gRPC server\", \"error\", err)\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (s *Server) StopServer() {\n\tif s.server != nil {\n\t\ts.server.Stop()\n\t\t_ = s.listener.Close()\n\t}\n}\n"
  },
  {
    "path": "www/grpc/server_test.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/consensus\"\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/pactus-project/pactus/www/zmq\"\n\t\"github.com/stretchr/testify/require\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\t\"google.golang.org/grpc/test/bufconn\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tmockState     *state.MockState\n\tmockSync      *sync.MockSync\n\tconsMocks     []*consensus.MockConsensus\n\tmockConsMgr   consmgr.Manager\n\tmockWalletMgr *wltmgr.MockIManager\n\tlistener      *bufconn.Listener\n\tserver        *Server\n}\n\nfunc testConfig() *Config {\n\tconf := DefaultConfig()\n\n\treturn conf\n}\n\nfunc setup(t *testing.T, conf *Config) *testData {\n\tt.Helper()\n\n\tif conf == nil {\n\t\tconf = testConfig()\n\t}\n\n\tts := testsuite.NewTestSuite(t)\n\n\t// for saving test wallets in temp directory\n\tt.Chdir(util.TempDirPath())\n\n\tconst bufSize = 1024 * 1024\n\n\tlistener := bufconn.Listen(bufSize)\n\tvalKeys := []*bls.ValidatorKey{ts.RandValKey(), ts.RandValKey()}\n\tmockState := state.MockingState(ts)\n\tmockNet := network.MockingNetwork(ts, ts.RandPeerID())\n\tmockSync := sync.MockingSync(ts)\n\tmockConsMgr, consMocks := consmgr.MockingManager(ts, mockState, valKeys)\n\n\tmockState.CommitTestBlocks(10)\n\tmockWalletMgr := wltmgr.NewMockIManager(ts.MockingController())\n\n\tzmqPublishers := []zmq.Publisher{\n\t\tzmq.MockingPublisher(\"zmq_address\", \"zmq_topic\", 100),\n\t}\n\n\tserver := NewServer(t.Context(), conf,\n\t\tmockState, mockSync, mockNet, mockConsMgr,\n\t\tmockWalletMgr, zmqPublishers,\n\t)\n\terr := server.startListening(listener)\n\trequire.NoError(t, err)\n\n\treturn &testData{\n\t\tTestSuite:     ts,\n\t\tmockState:     mockState,\n\t\tmockSync:      mockSync,\n\t\tconsMocks:     consMocks,\n\t\tmockConsMgr:   mockConsMgr,\n\t\tmockWalletMgr: mockWalletMgr,\n\t\tserver:        server,\n\t\tlistener:      listener,\n\t}\n}\n\nfunc (td *testData) StopServer() {\n\ttd.server.StopServer()\n\t_ = td.listener.Close()\n}\n\nfunc (td *testData) bufDialer(context.Context, string) (net.Conn, error) {\n\treturn td.listener.Dial()\n}\n\nfunc (td *testData) newClient(t *testing.T) *grpc.ClientConn {\n\tt.Helper()\n\n\tconn, err := grpc.NewClient(\"passthrough://bufnet\",\n\t\tgrpc.WithContextDialer(td.bufDialer),\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.NoError(t, err)\n\n\tt.Cleanup(func() {\n\t\trequire.NoError(t, conn.Close())\n\t\ttd.StopServer()\n\t})\n\n\treturn conn\n}\n\nfunc (td *testData) blockchainClient(t *testing.T) pactus.BlockchainClient {\n\tt.Helper()\n\n\treturn pactus.NewBlockchainClient(td.newClient(t))\n}\n\nfunc (td *testData) networkClient(t *testing.T) pactus.NetworkClient {\n\tt.Helper()\n\n\treturn pactus.NewNetworkClient(td.newClient(t))\n}\n\nfunc (td *testData) transactionClient(t *testing.T) pactus.TransactionClient {\n\tt.Helper()\n\n\treturn pactus.NewTransactionClient(td.newClient(t))\n}\n\nfunc (td *testData) walletClient(t *testing.T) pactus.WalletClient {\n\tt.Helper()\n\n\treturn pactus.NewWalletClient(td.newClient(t))\n}\n\nfunc (td *testData) utilClient(t *testing.T) pactus.UtilsClient {\n\tt.Helper()\n\n\treturn pactus.NewUtilsClient(td.newClient(t))\n}\n"
  },
  {
    "path": "www/grpc/transaction.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\ntype transactionServer struct {\n\t*Server\n}\n\nfunc newTransactionServer(server *Server) *transactionServer {\n\treturn &transactionServer{\n\t\tServer: server,\n\t}\n}\n\nfunc (s *transactionServer) GetTransaction(_ context.Context,\n\treq *pactus.GetTransactionRequest,\n) (*pactus.GetTransactionResponse, error) {\n\tid, err := hash.FromString(req.Id)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"invalid transaction ID: %v\", err.Error())\n\t}\n\n\tcommittedTx, err := s.state.CommittedTx(id)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"transaction not found\")\n\t}\n\n\tres := &pactus.GetTransactionResponse{\n\t\tBlockHeight: uint32(committedTx.Height),\n\t\tBlockTime:   committedTx.BlockTime,\n\t}\n\n\tswitch req.Verbosity {\n\tcase pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_DATA:\n\t\tres.Transaction = &pactus.TransactionInfo{\n\t\t\tId:   committedTx.TxID.String(),\n\t\t\tData: hex.EncodeToString(committedTx.Data),\n\t\t}\n\n\tcase pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_INFO:\n\t\ttrx, err := committedTx.ToTx()\n\t\tif err != nil {\n\t\t\treturn nil, status.Errorf(codes.Internal, \"%s\", err.Error())\n\t\t}\n\t\tlastBlockHeight := s.state.LastBlockHeight()\n\t\tconfirmations := int(lastBlockHeight) - int(committedTx.Height)\n\t\tres.Transaction = transactionToProto(trx, committedTx.Height, confirmations)\n\t}\n\n\treturn res, nil\n}\n\nfunc (s *transactionServer) BroadcastTransaction(_ context.Context,\n\treq *pactus.BroadcastTransactionRequest,\n) (*pactus.BroadcastTransactionResponse, error) {\n\ttrx, err := tx.FromString(req.SignedRawTransaction)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"couldn't decode transaction: %v\", err.Error())\n\t}\n\n\tif err := s.state.AddPendingTxAndBroadcast(trx); err != nil {\n\t\treturn nil, status.Errorf(codes.Canceled, \"couldn't add to transaction pool: %v\", err.Error())\n\t}\n\n\treturn &pactus.BroadcastTransactionResponse{\n\t\tId: trx.ID().String(),\n\t}, nil\n}\n\nfunc (s *transactionServer) CalculateFee(_ context.Context,\n\treq *pactus.CalculateFeeRequest,\n) (*pactus.CalculateFeeResponse, error) {\n\tamt := amount.Amount(req.Amount)\n\tfee := s.state.CalculateFee(amt, payload.Type(req.PayloadType))\n\n\tif req.FixedAmount {\n\t\tamt -= fee\n\t}\n\n\treturn &pactus.CalculateFeeResponse{\n\t\tAmount: amt.ToNanoPAC(),\n\t\tFee:    fee.ToNanoPAC(),\n\t}, nil\n}\n\nfunc (s *transactionServer) GetRawTransferTransaction(_ context.Context,\n\treq *pactus.GetRawTransferTransactionRequest,\n) (*pactus.GetRawTransactionResponse, error) {\n\tsender, err := crypto.AddressFromString(req.Sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treceiver, err := crypto.AddressFromString(req.Receiver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tamt := amount.Amount(req.Amount)\n\tfee := s.getFee(req.Fee, amt)\n\tlockTime := s.getLockTime(req.LockTime)\n\n\ttransferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(req.Memo))\n\trawTx, err := transferTx.Bytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetRawTransactionResponse{\n\t\tRawTransaction: hex.EncodeToString(rawTx),\n\t}, nil\n}\n\nfunc (s *transactionServer) GetRawBondTransaction(_ context.Context,\n\treq *pactus.GetRawBondTransactionRequest,\n) (*pactus.GetRawTransactionResponse, error) {\n\tsender, err := crypto.AddressFromString(req.Sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treceiver, err := crypto.AddressFromString(req.Receiver)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar publicKey *bls.PublicKey\n\tif req.PublicKey != \"\" {\n\t\tpublicKey, err = bls.PublicKeyFromString(req.PublicKey)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tpublicKey = nil\n\t}\n\n\tamt := amount.Amount(req.Stake)\n\tfee := s.getFee(req.Fee, amt)\n\tlockTime := s.getLockTime(req.LockTime)\n\n\tbondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(req.Memo))\n\tif req.DelegateOwner != \"\" {\n\t\tdelegateOwner, err := crypto.AddressFromString(req.DelegateOwner)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tbondPld := bondTx.Payload().(*payload.BondPayload)\n\t\tbondPld.DelegateOwner = delegateOwner\n\t\tbondPld.DelegateShare = amount.Amount(req.DelegateShare)\n\t\tbondPld.DelegateExpiry = types.Height(req.DelegateExpiry)\n\t}\n\trawTx, err := bondTx.Bytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetRawTransactionResponse{\n\t\tRawTransaction: hex.EncodeToString(rawTx),\n\t}, nil\n}\n\nfunc (s *transactionServer) GetRawUnbondTransaction(_ context.Context,\n\treq *pactus.GetRawUnbondTransactionRequest,\n) (*pactus.GetRawTransactionResponse, error) {\n\tvalidatorAddr, err := crypto.AddressFromString(req.ValidatorAddress)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlockTime := s.getLockTime(req.LockTime)\n\n\tunbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(req.Memo))\n\tif req.DelegateOwner != \"\" {\n\t\tdelegateOwner, err := crypto.AddressFromString(req.DelegateOwner)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tunbondPld := unbondTx.Payload().(*payload.UnbondPayload)\n\t\tunbondPld.DelegateOwner = delegateOwner\n\t}\n\n\trawTx, err := unbondTx.Bytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetRawTransactionResponse{\n\t\tRawTransaction: hex.EncodeToString(rawTx),\n\t}, nil\n}\n\nfunc (s *transactionServer) GetRawWithdrawTransaction(_ context.Context,\n\treq *pactus.GetRawWithdrawTransactionRequest,\n) (*pactus.GetRawTransactionResponse, error) {\n\tvalidatorAddr, err := crypto.AddressFromString(req.ValidatorAddress)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taccountAddr, err := crypto.AddressFromString(req.AccountAddress)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tamt := amount.Amount(req.Amount)\n\tfee := s.getFee(req.Fee, amt)\n\tlockTime := s.getLockTime(req.LockTime)\n\n\twithdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(req.Memo))\n\trawTx, err := withdrawTx.Bytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetRawTransactionResponse{\n\t\tRawTransaction: hex.EncodeToString(rawTx),\n\t}, nil\n}\n\nfunc (s *transactionServer) GetRawBatchTransferTransaction(_ context.Context,\n\treq *pactus.GetRawBatchTransferTransactionRequest,\n) (*pactus.GetRawTransactionResponse, error) {\n\tsender, err := crypto.AddressFromString(req.Sender)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttotalAmount := amount.Amount(0)\n\n\trecipients := make([]payload.BatchRecipient, 0, len(req.Recipients))\n\tfor _, recipient := range req.Recipients {\n\t\treceiver, err := crypto.AddressFromString(recipient.Receiver)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tamt := amount.Amount(recipient.Amount)\n\n\t\trecipients = append(recipients, payload.BatchRecipient{\n\t\t\tTo:     receiver,\n\t\t\tAmount: amt,\n\t\t})\n\n\t\ttotalAmount += amt\n\t}\n\n\tfee := s.getFee(req.Fee, totalAmount)\n\tlockTime := s.getLockTime(req.LockTime)\n\n\tbatchTransferTx := tx.NewBatchTransferTx(lockTime, sender, recipients, fee, tx.WithMemo(req.Memo))\n\trawTx, err := batchTransferTx.Bytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetRawTransactionResponse{\n\t\tRawTransaction: hex.EncodeToString(rawTx),\n\t}, nil\n}\n\nfunc (s *transactionServer) getFee(f int64, amt amount.Amount) amount.Amount {\n\tfee := amount.Amount(f)\n\tif fee == 0 {\n\t\tfee = s.state.CalculateFee(amt, payload.TypeTransfer)\n\t}\n\n\treturn fee\n}\n\nfunc (s *transactionServer) getLockTime(lockTime uint32) types.Height {\n\tif lockTime == 0 {\n\t\treturn s.state.LastBlockHeight()\n\t}\n\n\treturn types.Height(lockTime)\n}\n\nfunc transactionToProto(trx *tx.Tx, blockHeight types.Height, confirmations int) *pactus.TransactionInfo {\n\ttrxInfo := &pactus.TransactionInfo{\n\t\tId:            trx.ID().String(),\n\t\tVersion:       int32(trx.Version()),\n\t\tLockTime:      uint32(trx.LockTime()),\n\t\tFee:           trx.Fee().ToNanoPAC(),\n\t\tValue:         trx.Payload().Value().ToNanoPAC(),\n\t\tPayloadType:   pactus.PayloadType(trx.Payload().Type()),\n\t\tMemo:          trx.Memo(),\n\t\tBlockHeight:   uint32(blockHeight),\n\t\tConfirmed:     confirmations > 0,\n\t\tConfirmations: int32(confirmations),\n\t}\n\n\tif trx.PublicKey() != nil {\n\t\ttrxInfo.PublicKey = trx.PublicKey().String()\n\t}\n\n\tif trx.Signature() != nil {\n\t\ttrxInfo.Signature = trx.Signature().String()\n\t}\n\n\tswitch trx.Payload().Type() {\n\tcase payload.TypeTransfer:\n\t\tpld := trx.Payload().(*payload.TransferPayload)\n\t\ttrxInfo.Payload = &pactus.TransactionInfo_Transfer{\n\t\t\tTransfer: &pactus.PayloadTransfer{\n\t\t\t\tSender:   pld.From.String(),\n\t\t\t\tReceiver: pld.To.String(),\n\t\t\t\tAmount:   pld.Amount.ToNanoPAC(),\n\t\t\t},\n\t\t}\n\tcase payload.TypeBond:\n\t\tpld := trx.Payload().(*payload.BondPayload)\n\n\t\tpublicKeyStr := \"\"\n\t\tif pld.PublicKey != nil {\n\t\t\tpublicKeyStr = pld.PublicKey.String()\n\t\t}\n\n\t\tpayload := &pactus.TransactionInfo_Bond{\n\t\t\tBond: &pactus.PayloadBond{\n\t\t\t\tSender:    pld.From.String(),\n\t\t\t\tReceiver:  pld.To.String(),\n\t\t\t\tStake:     pld.Stake.ToNanoPAC(),\n\t\t\t\tPublicKey: publicKeyStr,\n\t\t\t},\n\t\t}\n\n\t\t// TODO: Cover me with tests\n\t\tif pld.IsDelegated() {\n\t\t\tpayload.Bond.IsDelegated = true\n\t\t\tpayload.Bond.DelegateOwner = pld.DelegateOwner.String()\n\t\t\tpayload.Bond.DelegateShare = pld.DelegateShare.ToNanoPAC()\n\t\t\tpayload.Bond.DelegateExpiry = uint32(pld.DelegateExpiry)\n\t\t}\n\n\t\ttrxInfo.Payload = payload\n\n\tcase payload.TypeSortition:\n\t\tpld := trx.Payload().(*payload.SortitionPayload)\n\t\ttrxInfo.Payload = &pactus.TransactionInfo_Sortition{\n\t\t\tSortition: &pactus.PayloadSortition{\n\t\t\t\tAddress: pld.Validator.String(),\n\t\t\t\tProof:   hex.EncodeToString(pld.Proof[:]),\n\t\t\t},\n\t\t}\n\tcase payload.TypeUnbond:\n\t\tpld := trx.Payload().(*payload.UnbondPayload)\n\t\tpayload := &pactus.TransactionInfo_Unbond{\n\t\t\tUnbond: &pactus.PayloadUnbond{\n\t\t\t\tValidator: pld.Validator.String(),\n\t\t\t},\n\t\t}\n\n\t\t// TODO: Cover me with tests\n\t\tif pld.IsDelegated() {\n\t\t\tpayload.Unbond.DelegateOwner = pld.DelegateOwner.String()\n\t\t}\n\n\t\ttrxInfo.Payload = payload\n\n\tcase payload.TypeWithdraw:\n\t\tpld := trx.Payload().(*payload.WithdrawPayload)\n\t\ttrxInfo.Payload = &pactus.TransactionInfo_Withdraw{\n\t\t\tWithdraw: &pactus.PayloadWithdraw{\n\t\t\t\tValidatorAddress: pld.From.String(),\n\t\t\t\tAccountAddress:   pld.To.String(),\n\t\t\t\tAmount:           pld.Amount.ToNanoPAC(),\n\t\t\t},\n\t\t}\n\n\tcase payload.TypeBatchTransfer:\n\t\tpld := trx.Payload().(*payload.BatchTransferPayload)\n\t\trecipients := make([]*pactus.Recipient, 0, len(pld.Recipients))\n\t\tfor _, recipient := range pld.Recipients {\n\t\t\trecipients = append(recipients, &pactus.Recipient{\n\t\t\t\tReceiver: recipient.To.String(),\n\t\t\t\tAmount:   recipient.Amount.ToNanoPAC(),\n\t\t\t})\n\t\t}\n\n\t\ttrxInfo.Payload = &pactus.TransactionInfo_BatchTransfer{\n\t\t\tBatchTransfer: &pactus.PayloadBatchTransfer{\n\t\t\t\tSender:     pld.From.String(),\n\t\t\t\tRecipients: recipients,\n\t\t\t},\n\t\t}\n\tdefault:\n\t\tlogger.Error(\"payload type not defined\", \"type\", trx.Payload().Type())\n\t}\n\n\treturn trxInfo\n}\n\nfunc (*transactionServer) DecodeRawTransaction(_ context.Context,\n\treq *pactus.DecodeRawTransactionRequest,\n) (*pactus.DecodeRawTransactionResponse, error) {\n\ttrx, err := tx.FromString(req.RawTransaction)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"couldn't decode transaction: %v\", err.Error())\n\t}\n\n\treturn &pactus.DecodeRawTransactionResponse{\n\t\tTransaction: transactionToProto(trx, 0, 0),\n\t}, nil\n}\n\nfunc (s *transactionServer) CheckTransaction(_ context.Context,\n\treq *pactus.CheckTransactionRequest,\n) (*pactus.CheckTransactionResponse, error) {\n\ttrx, err := tx.FromString(req.RawTransaction)\n\tif err != nil {\n\t\treturn nil, status.Errorf(codes.InvalidArgument, \"couldn't decode transaction: %v\", err.Error())\n\t}\n\n\terr = s.state.CheckTransaction(trx)\n\tif err != nil {\n\t\treturn &pactus.CheckTransactionResponse{\n\t\t\tIsValid:      false,\n\t\t\tErrorMessage: err.Error(),\n\t\t}, status.Errorf(codes.InvalidArgument, \"couldn't decode transaction: %v\", err.Error())\n\t}\n\n\treturn &pactus.CheckTransactionResponse{\n\t\tIsValid: true,\n\t}, nil\n}\n"
  },
  {
    "path": "www/grpc/transaction_test.go",
    "content": "package grpc\n\nimport (\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/types/tx/payload\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n)\n\nfunc TestGetTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.transactionClient(t)\n\n\tblockHeight := td.RandHeight()\n\tvalPubKey, _ := td.RandBLSKeyPair()\n\ttextTrx := td.GenerateTestBondTx(\n\t\ttestsuite.TransactionWithValidatorPublicKey(valPubKey))\n\ttestBlock, testCert := td.GenerateTestBlock(blockHeight,\n\t\ttestsuite.BlockWithTransactions([]*tx.Tx{textTrx}))\n\ttd.mockState.TestStore.SaveBlock(testBlock, testCert)\n\n\tt.Run(\"Should return transaction (verbosity: 0)\", func(t *testing.T) {\n\t\tres, err := client.GetTransaction(t.Context(),\n\t\t\t&pactus.GetTransactionRequest{\n\t\t\t\tId:        textTrx.ID().String(),\n\t\t\t\tVerbosity: pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_DATA,\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.NotEmpty(t, res.Transaction)\n\t\tassert.Equal(t, uint32(blockHeight), res.BlockHeight)\n\t\tassert.Equal(t, textTrx.ID().String(), res.Transaction.Id)\n\n\t\tb, err := textTrx.Bytes()\n\t\trequire.NoError(t, err)\n\n\t\tassert.Equal(t, hex.EncodeToString(b), res.Transaction.Data)\n\t\tassert.Nil(t, res.Transaction.Payload)\n\t})\n\n\tt.Run(\"Should return transaction (verbosity: 1)\", func(t *testing.T) {\n\t\tres, err := client.GetTransaction(t.Context(),\n\t\t\t&pactus.GetTransactionRequest{\n\t\t\t\tId:        textTrx.ID().String(),\n\t\t\t\tVerbosity: pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_INFO,\n\t\t\t})\n\t\tpld := res.Transaction.Payload.(*pactus.TransactionInfo_Bond)\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.NotEmpty(t, res.Transaction)\n\t\tassert.Empty(t, res.Transaction.Data)\n\t\tassert.Equal(t, uint32(blockHeight), res.BlockHeight)\n\t\tassert.Equal(t, testBlock.Header().UnixTime(), res.BlockTime)\n\t\tassert.Equal(t, textTrx.ID().String(), res.Transaction.Id)\n\t\tassert.Equal(t, textTrx.Fee().ToNanoPAC(), res.Transaction.Fee)\n\t\tassert.Equal(t, textTrx.Memo(), res.Transaction.Memo)\n\t\tassert.Equal(t, textTrx.Payload().Type(), payload.Type(res.Transaction.PayloadType))\n\t\tassert.Equal(t, uint32(textTrx.LockTime()), res.Transaction.LockTime)\n\t\tassert.Equal(t, textTrx.Signature().String(), res.Transaction.Signature)\n\t\tassert.Equal(t, textTrx.PublicKey().String(), res.Transaction.PublicKey)\n\t\tassert.Equal(t, textTrx.Payload().(*payload.BondPayload).Stake.ToNanoPAC(), pld.Bond.Stake)\n\t\tassert.Equal(t, textTrx.Payload().(*payload.BondPayload).From.String(), pld.Bond.Sender)\n\t\tassert.Equal(t, textTrx.Payload().(*payload.BondPayload).To.String(), pld.Bond.Receiver)\n\t\tassert.Equal(t, textTrx.Payload().(*payload.BondPayload).PublicKey.String(), pld.Bond.PublicKey)\n\t})\n\n\tt.Run(\"Should return nil value because transaction id is invalid\", func(t *testing.T) {\n\t\tres, err := client.GetTransaction(t.Context(),\n\t\t\t&pactus.GetTransactionRequest{Id: \"invalid_id\"})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Should return nil value because transaction doesn't exist\", func(t *testing.T) {\n\t\tid := td.RandHash()\n\t\tres, err := client.GetTransaction(t.Context(),\n\t\t\t&pactus.GetTransactionRequest{Id: id.String()})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n}\n\nfunc TestSendRawTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.transactionClient(t)\n\n\tt.Run(\"Should fail, invalid cbor\", func(t *testing.T) {\n\t\tres, err := client.BroadcastTransaction(t.Context(),\n\t\t\t&pactus.BroadcastTransactionRequest{SignedRawTransaction: \"00000000\"})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\ttrx := td.GenerateTestTransferTx()\n\tdata, _ := trx.Bytes()\n\tt.Run(\"Should pass\", func(t *testing.T) {\n\t\ttd.mockState.MockTxPool.EXPECT().AppendTxAndBroadcast(gomock.Any()).Return(nil).Times(1)\n\n\t\tres, err := client.BroadcastTransaction(t.Context(),\n\t\t\t&pactus.BroadcastTransactionRequest{SignedRawTransaction: hex.EncodeToString(data)})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t})\n\n\tt.Run(\"Should fail and not broadcast\", func(t *testing.T) {\n\t\ttd.mockState.MockTxPool.EXPECT().AppendTxAndBroadcast(gomock.Any()).Return(errors.New(\"some error\")).Times(1)\n\n\t\tres, err := client.BroadcastTransaction(t.Context(),\n\t\t\t&pactus.BroadcastTransactionRequest{SignedRawTransaction: hex.EncodeToString(data)})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n}\n\nfunc TestGetRawTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.transactionClient(t)\n\n\ttd.mockState.MockTxPool.EXPECT().EstimatedFee(gomock.Any(), gomock.Any()).Return(td.RandFee()).AnyTimes()\n\n\tt.Run(\"Transfer\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\t\tres, err := client.GetRawTransferTransaction(t.Context(),\n\t\t\t&pactus.GetRawTransferTransactionRequest{\n\t\t\t\tSender:   td.RandAccAddress().String(),\n\t\t\t\tReceiver: td.RandAccAddress().String(),\n\t\t\t\tAmount:   amt.ToNanoPAC(),\n\t\t\t\tMemo:     td.RandString(32),\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\t\texpectedFee := td.mockState.CalculateFee(amt, payload.TypeTransfer)\n\n\t\tassert.Equal(t, amt, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Equal(t, expectedFee, decodedTrx.Fee())\n\t})\n\n\tt.Run(\"Batch Transfer\", func(t *testing.T) {\n\t\tamt1 := td.RandAmount()\n\t\tamt2 := td.RandAmount()\n\t\ttotalAmt := amt1 + amt2\n\n\t\tres, err := client.GetRawBatchTransferTransaction(t.Context(),\n\t\t\t&pactus.GetRawBatchTransferTransactionRequest{\n\t\t\t\tSender: td.RandAccAddress().String(),\n\t\t\t\tRecipients: []*pactus.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tReceiver: td.RandAccAddress().String(),\n\t\t\t\t\t\tAmount:   amt1.ToNanoPAC(),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tReceiver: td.RandAccAddress().String(),\n\t\t\t\t\t\tAmount:   amt2.ToNanoPAC(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tMemo: td.RandString(32),\n\t\t\t},\n\t\t)\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\t\texpectedFee := td.mockState.CalculateFee(totalAmt, payload.TypeBatchTransfer)\n\n\t\tassert.Equal(t, totalAmt, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Equal(t, expectedFee, decodedTrx.Fee())\n\t})\n\n\tt.Run(\"Bond with the Public Key\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\t\tpub, _ := td.RandBLSKeyPair()\n\n\t\tres, err := client.GetRawBondTransaction(t.Context(),\n\t\t\t&pactus.GetRawBondTransactionRequest{\n\t\t\t\tSender:    td.RandAccAddress().String(),\n\t\t\t\tReceiver:  td.RandValAddress().String(),\n\t\t\t\tStake:     amt.ToNanoPAC(),\n\t\t\t\tPublicKey: pub.String(),\n\t\t\t\tMemo:      td.RandString(32),\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\t\texpectedFee := td.mockState.CalculateFee(amt, payload.TypeBond)\n\n\t\tassert.Equal(t, amt, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Equal(t, expectedFee, decodedTrx.Fee())\n\t})\n\n\tt.Run(\"Bond without the Public Key\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\n\t\tres, err := client.GetRawBondTransaction(t.Context(),\n\t\t\t&pactus.GetRawBondTransactionRequest{\n\t\t\t\tSender:   td.RandAccAddress().String(),\n\t\t\t\tReceiver: td.RandValAddress().String(),\n\t\t\t\tStake:    amt.ToNanoPAC(),\n\t\t\t\tMemo:     td.RandString(32),\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\t\texpectedFee := td.mockState.CalculateFee(amt, payload.TypeBond)\n\n\t\tassert.Equal(t, amt, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Equal(t, expectedFee, decodedTrx.Fee())\n\t})\n\n\tt.Run(\"Unbond\", func(t *testing.T) {\n\t\tres, err := client.GetRawUnbondTransaction(t.Context(),\n\t\t\t&pactus.GetRawUnbondTransactionRequest{\n\t\t\t\tValidatorAddress: td.RandValAddress().String(),\n\t\t\t\tMemo:             td.RandString(32),\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\n\t\tassert.Zero(t, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Zero(t, decodedTrx.Fee())\n\t})\n\n\tt.Run(\"Withdraw\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\t\tres, err := client.GetRawWithdrawTransaction(t.Context(),\n\t\t\t&pactus.GetRawWithdrawTransactionRequest{\n\t\t\t\tValidatorAddress: td.RandValAddress().String(),\n\t\t\t\tAccountAddress:   td.RandAccAddress().String(),\n\t\t\t\tAmount:           amt.ToNanoPAC(),\n\t\t\t\tMemo:             td.RandString(32),\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.NotEmpty(t, res.RawTransaction)\n\n\t\tdecodedTrx, err := tx.FromString(res.RawTransaction)\n\t\trequire.NoError(t, err)\n\t\texpectedLockTime := td.mockState.LastBlockHeight()\n\t\texpectedFee := td.mockState.CalculateFee(amt, payload.TypeWithdraw)\n\n\t\tassert.Equal(t, amt, decodedTrx.Payload().Value())\n\t\tassert.Equal(t, expectedLockTime, decodedTrx.LockTime())\n\t\tassert.Equal(t, expectedFee, decodedTrx.Fee())\n\t})\n}\n\nfunc TestCalculateFee(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.transactionClient(t)\n\n\texpectedFee := td.RandFee()\n\ttd.mockState.MockTxPool.EXPECT().EstimatedFee(gomock.Any(), gomock.Any()).Return(expectedFee).AnyTimes()\n\n\tt.Run(\"Not fixed amount\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\t\tres, err := client.CalculateFee(t.Context(),\n\t\t\t&pactus.CalculateFeeRequest{\n\t\t\t\tAmount:      amt.ToNanoPAC(),\n\t\t\t\tPayloadType: pactus.PayloadType_PAYLOAD_TYPE_TRANSFER,\n\t\t\t\tFixedAmount: false,\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, amt.ToNanoPAC(), res.Amount)\n\t\tassert.Equal(t, expectedFee.ToNanoPAC(), res.Fee)\n\t})\n\n\tt.Run(\"Fixed amount\", func(t *testing.T) {\n\t\tamt := td.RandAmount()\n\t\tres, err := client.CalculateFee(t.Context(),\n\t\t\t&pactus.CalculateFeeRequest{\n\t\t\t\tAmount:      amt.ToNanoPAC(),\n\t\t\t\tPayloadType: pactus.PayloadType_PAYLOAD_TYPE_TRANSFER,\n\t\t\t\tFixedAmount: true,\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, (amt - expectedFee).ToNanoPAC(), res.Amount)\n\t\tassert.Equal(t, expectedFee.ToNanoPAC(), res.Fee)\n\t})\n\n\tt.Run(\"Insufficient amount to pay fee\", func(t *testing.T) {\n\t\tamt := amount.Amount(0)\n\t\tres, err := client.CalculateFee(t.Context(),\n\t\t\t&pactus.CalculateFeeRequest{\n\t\t\t\tAmount:      amt.ToNanoPAC(),\n\t\t\t\tPayloadType: pactus.PayloadType_PAYLOAD_TYPE_TRANSFER,\n\t\t\t\tFixedAmount: true,\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.Negative(t, res.Amount)\n\t\tassert.Equal(t, expectedFee.ToNanoPAC(), res.Fee)\n\t})\n}\n\nfunc TestDecodeRawTransaction(t *testing.T) {\n\ttd := setup(t, nil)\n\tclient := td.transactionClient(t)\n\n\tt.Run(\"Should decode valid raw transaction\", func(t *testing.T) {\n\t\ttrx := td.GenerateTestTransferTx()\n\t\tdata, _ := trx.Bytes()\n\t\tres, err := client.DecodeRawTransaction(t.Context(),\n\t\t\t&pactus.DecodeRawTransactionRequest{RawTransaction: hex.EncodeToString(data)})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, trx.ID().String(), res.Transaction.Id)\n\t\tassert.Equal(t, trx.Fee().ToNanoPAC(), res.Transaction.Fee)\n\t\tassert.Equal(t, trx.Memo(), res.Transaction.Memo)\n\t\tassert.Equal(t, trx.Payload().Type(), payload.Type(res.Transaction.PayloadType))\n\t\tassert.Equal(t, uint32(trx.LockTime()), res.Transaction.LockTime)\n\t\tassert.Equal(t, trx.Signature().String(), res.Transaction.Signature)\n\t\tassert.Equal(t, trx.PublicKey().String(), res.Transaction.PublicKey)\n\t})\n\n\tt.Run(\"Should fail to decode invalid raw transaction\", func(t *testing.T) {\n\t\tres, err := client.DecodeRawTransaction(t.Context(),\n\t\t\t&pactus.DecodeRawTransactionRequest{RawTransaction: \"invalid_raw_transaction\"})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n}\n"
  },
  {
    "path": "www/grpc/utils.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/crypto/ed25519\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\ntype utilServer struct {\n\t*Server\n}\n\nfunc newUtilsServer(server *Server) *utilServer {\n\treturn &utilServer{\n\t\tServer: server,\n\t}\n}\n\nfunc (u *utilServer) SignMessageWithPrivateKey(_ context.Context,\n\treq *pactus.SignMessageWithPrivateKeyRequest,\n) (*pactus.SignMessageWithPrivateKeyResponse, error) {\n\tprvKey, err := u.privateKeyFromString(req.PrivateKey)\n\tif err != nil {\n\t\treturn nil, status.Error(codes.InvalidArgument, err.Error())\n\t}\n\tsig := prvKey.Sign([]byte(req.Message)).String()\n\n\treturn &pactus.SignMessageWithPrivateKeyResponse{\n\t\tSignature: sig,\n\t}, nil\n}\n\nfunc (u *utilServer) VerifyMessage(_ context.Context,\n\treq *pactus.VerifyMessageRequest,\n) (*pactus.VerifyMessageResponse, error) {\n\tpubKey, sig, err := u.publicKeyAndSigFromString(req.PublicKey, req.Signature)\n\tif err != nil {\n\t\treturn nil, status.Error(codes.InvalidArgument, err.Error())\n\t}\n\tif err = pubKey.Verify([]byte(req.Message), sig); err == nil {\n\t\treturn &pactus.VerifyMessageResponse{\n\t\t\tIsValid: true,\n\t\t}, nil\n\t}\n\n\treturn &pactus.VerifyMessageResponse{\n\t\tIsValid: false,\n\t}, nil\n}\n\nfunc (*utilServer) PublicKeyAggregation(_ context.Context,\n\treq *pactus.PublicKeyAggregationRequest,\n) (*pactus.PublicKeyAggregationResponse, error) {\n\tpubs := make([]*bls.PublicKey, len(req.PublicKeys))\n\tfor i, pubKey := range req.PublicKeys {\n\t\tp, err := bls.PublicKeyFromString(pubKey)\n\t\tif err != nil {\n\t\t\treturn nil, status.Error(codes.InvalidArgument, fmt.Sprintf(\"invalid public key %s\", pubKey))\n\t\t}\n\t\tpubs[i] = p\n\t}\n\n\taggPub, err := bls.PublicKeyAggregate(pubs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.PublicKeyAggregationResponse{\n\t\tPublicKey: aggPub.String(),\n\t\tAddress:   aggPub.AccountAddress().String(),\n\t}, nil\n}\n\nfunc (*utilServer) SignatureAggregation(_ context.Context,\n\treq *pactus.SignatureAggregationRequest,\n) (*pactus.SignatureAggregationResponse, error) {\n\tsigs := make([]*bls.Signature, len(req.Signatures))\n\tfor i, sig := range req.Signatures {\n\t\ts, err := bls.SignatureFromString(sig)\n\t\tif err != nil {\n\t\t\treturn nil, status.Error(codes.InvalidArgument, fmt.Sprintf(\"invalid signature %s\", sig))\n\t\t}\n\t\tsigs[i] = s\n\t}\n\n\taggSig, err := bls.SignatureAggregate(sigs...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.SignatureAggregationResponse{\n\t\tSignature: aggSig.String(),\n\t}, nil\n}\n\nfunc (*utilServer) privateKeyFromString(prvStr string) (crypto.PrivateKey, error) {\n\tblsPrv, err := bls.PrivateKeyFromString(prvStr)\n\tif err == nil {\n\t\treturn blsPrv, nil\n\t}\n\n\ted25519Prv, err := ed25519.PrivateKeyFromString(prvStr)\n\tif err == nil {\n\t\treturn ed25519Prv, nil\n\t}\n\n\treturn nil, errors.New(\"invalid Private Key\")\n}\n\nfunc (*utilServer) publicKeyAndSigFromString(pubStr, sigStr string) (crypto.PublicKey, crypto.Signature, error) {\n\tblsPub, err := bls.PublicKeyFromString(pubStr)\n\tif err == nil {\n\t\tblsSig, err := bls.SignatureFromString(sigStr)\n\t\tif err != nil {\n\t\t\treturn nil, nil, errors.New(\"invalid BLS signature\")\n\t\t}\n\n\t\treturn blsPub, blsSig, nil\n\t}\n\n\ted25519Pub, err := ed25519.PublicKeyFromString(pubStr)\n\tif err == nil {\n\t\ted25519Sig, err := ed25519.SignatureFromString(sigStr)\n\t\tif err != nil {\n\t\t\treturn nil, nil, errors.New(\"invalid Ed25519 signature\")\n\t\t}\n\n\t\treturn ed25519Pub, ed25519Sig, nil\n\t}\n\n\treturn nil, nil, errors.New(\"invalid Public Key\")\n}\n"
  },
  {
    "path": "www/grpc/utils_test.go",
    "content": "package grpc\n\nimport (\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSignMessageWithPrivateKey(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tmsg := \"pactus\"\n\tprvStr := \"SECRET1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQQJVK67\"\n\tinvalidPrvStr := \"INVSECRET1PDRWTLP5PX0FAHDX39GXZJP7FKZFALML0D5U9TT9KVQHDUC99CMGQQJVK67\"\n\texpectedSig := \"923d67a8624cbb7972b29328e15ec76cc846076ccf00a9e94d991c677846f334ae4ba4551396fbcd6d1cab7593baf3b7\"\n\n\tt.Run(\"\", func(t *testing.T) {\n\t\tres, err := client.SignMessageWithPrivateKey(t.Context(),\n\t\t\t&pactus.SignMessageWithPrivateKeyRequest{\n\t\t\t\tMessage:    msg,\n\t\t\t\tPrivateKey: prvStr,\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, expectedSig, res.Signature)\n\t})\n\n\tt.Run(\"\", func(t *testing.T) {\n\t\tres, err := client.SignMessageWithPrivateKey(t.Context(),\n\t\t\t&pactus.SignMessageWithPrivateKeyRequest{\n\t\t\t\tMessage:    msg,\n\t\t\t\tPrivateKey: invalidPrvStr,\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n}\n\nfunc TestSignMessageWithED25519PrivateKey(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tmsg := \"pactus\"\n\tprvStr := \"SECRET1RYY62A96X25ZAL4DPL5Z63G83GCSFCCQ7K0CMQD3MFNLYK3A6R26QUUK3Y0\"\n\tinvalidPrvStr := \"INVSECRET1RYY62A96X25ZAL4DPL5Z63G83GCSFCCQ7K0CMQD3MFNLYK3A6R26QUUK3Y0\"\n\texpectedSig := \"361aaa09c408bfcf7e79dd90c583eeeaefe7c732ca5643cfb2ea7a6d22105b874a412080\" +\n\t\t\"525a855bbd5df94110a7d0083d6e386e016ecf8b7f522c339f79d305\"\n\n\tt.Run(\"\", func(t *testing.T) {\n\t\tres, err := client.SignMessageWithPrivateKey(t.Context(),\n\t\t\t&pactus.SignMessageWithPrivateKeyRequest{\n\t\t\t\tMessage:    msg,\n\t\t\t\tPrivateKey: prvStr,\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, expectedSig, res.Signature)\n\t})\n\n\tt.Run(\"\", func(t *testing.T) {\n\t\tres, err := client.SignMessageWithPrivateKey(t.Context(),\n\t\t\t&pactus.SignMessageWithPrivateKeyRequest{\n\t\t\t\tMessage:    msg,\n\t\t\t\tPrivateKey: invalidPrvStr,\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n}\n\nfunc TestVerifyMessage(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tmsg := \"pactus\"\n\tpubStr := \"public1p4u8hfytl2pj6l9rj0t54gxcdmna4hq52ncqkkqjf3arha5mlk3x4mzpyjkhmdl20jae7f65aamjr\" +\n\t\t\"vqcvf4sudcapz52ctcwc8r9wz3z2gwxs38880cgvfy49ta5ssyjut05myd4zgmjqstggmetyuyg7v5jhx47a\"\n\tsigStr := \"923d67a8624cbb7972b29328e15ec76cc846076ccf00a9e94d991c677846f334ae4ba4551396fbcd6d1cab7593baf3b7\"\n\tinvalidSigStr := \"113d67a8624cbb7972b29328e15ec76cc846076ccf00a9e94d991c677846f334ae4ba4551396fbcd6d1cab7593baf3c9\"\n\n\tt.Run(\"valid message\", func(t *testing.T) {\n\t\tres, err := client.VerifyMessage(t.Context(),\n\t\t\t&pactus.VerifyMessageRequest{\n\t\t\t\tMessage:   msg,\n\t\t\t\tSignature: sigStr,\n\t\t\t\tPublicKey: pubStr,\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.True(t, res.IsValid)\n\t})\n\n\tt.Run(\"invalid message\", func(t *testing.T) {\n\t\tres, err := client.VerifyMessage(t.Context(),\n\t\t\t&pactus.VerifyMessageRequest{\n\t\t\t\tMessage:   msg,\n\t\t\t\tSignature: invalidSigStr,\n\t\t\t\tPublicKey: pubStr,\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.False(t, res.IsValid)\n\t})\n}\n\nfunc TestVerifyED25519Message(t *testing.T) {\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tmsg := \"pactus\"\n\tpubStr := \"public1rvqxnpfph8tnc3ck55z85w285t5jetylmmktr9wlzs0zvx7kx500szxfudh\"\n\tsigStr := \"361aaa09c408bfcf7e79dd90c583eeeaefe7c732ca5643cfb2ea7a6d22105b874a41\" +\n\t\t\"2080525a855bbd5df94110a7d0083d6e386e016ecf8b7f522c339f79d305\"\n\tinvalidSigStr := \"001aaa09c408bfcf7e79dd90c583eeeaefe7c732ca5643cfb2ea7a6d22105b\" +\n\t\t\"874a412080525a855bbd5df94110a7d0083d6e386e016ecf8b7f522c339f79d305\"\n\n\tt.Run(\"valid message\", func(t *testing.T) {\n\t\tres, err := client.VerifyMessage(t.Context(),\n\t\t\t&pactus.VerifyMessageRequest{\n\t\t\t\tMessage:   msg,\n\t\t\t\tSignature: sigStr,\n\t\t\t\tPublicKey: pubStr,\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.True(t, res.IsValid)\n\t})\n\n\tt.Run(\"invalid message\", func(t *testing.T) {\n\t\tres, err := client.VerifyMessage(t.Context(),\n\t\t\t&pactus.VerifyMessageRequest{\n\t\t\t\tMessage:   msg,\n\t\t\t\tSignature: invalidSigStr,\n\t\t\t\tPublicKey: pubStr,\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.False(t, res.IsValid)\n\t})\n}\n\nfunc TestPublicKeyAggregation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tpub1, _ := ts.RandBLSKeyPair()\n\tpub2, _ := ts.RandBLSKeyPair()\n\tpub3, _ := ts.RandBLSKeyPair()\n\taggPub, _ := bls.PublicKeyAggregate(pub1, pub2, pub3)\n\tinvalidPub := \"invalidpub\"\n\n\tt.Run(\"no public keys\", func(t *testing.T) {\n\t\tres, err := client.PublicKeyAggregation(t.Context(),\n\t\t\t&pactus.PublicKeyAggregationRequest{\n\t\t\t\tPublicKeys: []string{},\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"only one public key\", func(t *testing.T) {\n\t\tres, err := client.PublicKeyAggregation(t.Context(),\n\t\t\t&pactus.PublicKeyAggregationRequest{\n\t\t\t\tPublicKeys: []string{pub1.String()},\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, pub1.String(), res.PublicKey)\n\t})\n\n\tt.Run(\"invalid public key\", func(t *testing.T) {\n\t\tres, err := client.PublicKeyAggregation(t.Context(),\n\t\t\t&pactus.PublicKeyAggregationRequest{\n\t\t\t\tPublicKeys: []string{pub1.String(), pub2.String(), invalidPub, pub3.String()},\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"valid public keys\", func(t *testing.T) {\n\t\tres, err := client.PublicKeyAggregation(t.Context(),\n\t\t\t&pactus.PublicKeyAggregationRequest{\n\t\t\t\tPublicKeys: []string{pub1.String(), pub2.String(), pub3.String()},\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, aggPub.String(), res.PublicKey)\n\t})\n}\n\nfunc TestSignatureAggregation(t *testing.T) {\n\tts := testsuite.NewTestSuite(t)\n\tconf := testConfig()\n\ttd := setup(t, conf)\n\tclient := td.utilClient(t)\n\n\tsig1 := ts.RandBLSSignature()\n\tsig2 := ts.RandBLSSignature()\n\tsig3 := ts.RandBLSSignature()\n\taggSig, _ := bls.SignatureAggregate(sig1, sig2, sig3)\n\tinvalidSig := \"invalidsig\"\n\n\tt.Run(\"no signatures\", func(t *testing.T) {\n\t\tres, err := client.SignatureAggregation(t.Context(),\n\t\t\t&pactus.SignatureAggregationRequest{\n\t\t\t\tSignatures: []string{},\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"only one signature\", func(t *testing.T) {\n\t\tres, err := client.SignatureAggregation(t.Context(),\n\t\t\t&pactus.SignatureAggregationRequest{\n\t\t\t\tSignatures: []string{sig1.String()},\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, sig1.String(), res.Signature)\n\t})\n\n\tt.Run(\"invalid signature\", func(t *testing.T) {\n\t\tres, err := client.SignatureAggregation(t.Context(),\n\t\t\t&pactus.SignatureAggregationRequest{\n\t\t\t\tSignatures: []string{sig1.String(), sig2.String(), invalidSig, sig3.String()},\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"valid signatures\", func(t *testing.T) {\n\t\tres, err := client.SignatureAggregation(t.Context(),\n\t\t\t&pactus.SignatureAggregationRequest{\n\t\t\t\tSignatures: []string{sig1.String(), sig2.String(), sig3.String()},\n\t\t\t})\n\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, aggSig.String(), res.Signature)\n\t})\n}\n"
  },
  {
    "path": "www/grpc/wallet.go",
    "content": "package grpc\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"errors\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\ntype walletServer struct {\n\t*Server\n\twalletManager wltmgr.IManager\n}\n\nfunc newWalletServer(server *Server, manager wltmgr.IManager) *walletServer {\n\treturn &walletServer{\n\t\tServer:        server,\n\t\twalletManager: manager,\n\t}\n}\n\nfunc (*walletServer) addressInfoToProto(ai *types.AddressInfo) *pactus.AddressInfo {\n\treturn &pactus.AddressInfo{\n\t\tAddress:   ai.Address,\n\t\tLabel:     ai.Label,\n\t\tPublicKey: ai.PublicKey,\n\t\tPath:      ai.Path,\n\t}\n}\n\nfunc (s *walletServer) GetValidatorAddress(_ context.Context,\n\treq *pactus.GetValidatorAddressRequest,\n) (*pactus.GetValidatorAddressResponse, error) {\n\tadr, err := s.walletManager.GetValidatorAddress(req.PublicKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetValidatorAddressResponse{\n\t\tAddress: adr,\n\t}, nil\n}\n\nfunc (s *walletServer) CreateWallet(_ context.Context,\n\treq *pactus.CreateWalletRequest,\n) (*pactus.CreateWalletResponse, error) {\n\tif req.WalletName == \"\" {\n\t\treturn nil, errors.New(\"wallet name is required\")\n\t}\n\n\tmnemonic, err := s.walletManager.CreateWallet(\n\t\treq.WalletName, req.Password,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.CreateWalletResponse{\n\t\tWalletName: req.WalletName,\n\t\tMnemonic:   mnemonic,\n\t}, nil\n}\n\nfunc (s *walletServer) RestoreWallet(_ context.Context,\n\treq *pactus.RestoreWalletRequest,\n) (*pactus.RestoreWalletResponse, error) {\n\tif req.WalletName == \"\" {\n\t\treturn nil, errors.New(\"wallet name is required\")\n\t}\n\tif req.Mnemonic == \"\" {\n\t\treturn nil, errors.New(\"mnemonic is required\")\n\t}\n\n\tif err := s.walletManager.RestoreWallet(\n\t\treq.WalletName, req.Mnemonic, req.Password,\n\t); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.RestoreWalletResponse{\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (*walletServer) LoadWallet(_ context.Context,\n\treq *pactus.LoadWalletRequest,\n) (*pactus.LoadWalletResponse, error) {\n\treturn &pactus.LoadWalletResponse{\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (*walletServer) UnloadWallet(_ context.Context,\n\treq *pactus.UnloadWalletRequest,\n) (*pactus.UnloadWalletResponse, error) {\n\treturn &pactus.UnloadWalletResponse{\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (s *walletServer) ListWallets(_ context.Context,\n\t_ *pactus.ListWalletsRequest,\n) (*pactus.ListWalletsResponse, error) {\n\twallets, err := s.walletManager.ListWallets()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.ListWalletsResponse{\n\t\tWallets: wallets,\n\t}, nil\n}\n\nfunc (s *walletServer) GetTotalBalance(_ context.Context,\n\treq *pactus.GetTotalBalanceRequest,\n) (*pactus.GetTotalBalanceResponse, error) {\n\tbalance, err := s.walletManager.TotalBalance(req.WalletName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetTotalBalanceResponse{\n\t\tWalletName:   req.WalletName,\n\t\tTotalBalance: balance.ToNanoPAC(),\n\t}, nil\n}\n\nfunc (s *walletServer) GetTotalStake(_ context.Context,\n\treq *pactus.GetTotalStakeRequest,\n) (*pactus.GetTotalStakeResponse, error) {\n\tstake, err := s.walletManager.TotalStake(req.WalletName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetTotalStakeResponse{\n\t\tTotalStake: stake.ToNanoPAC(),\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (s *walletServer) SignRawTransaction(_ context.Context,\n\treq *pactus.SignRawTransactionRequest,\n) (*pactus.SignRawTransactionResponse, error) {\n\trawBytes, err := hex.DecodeString(req.RawTransaction)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttxID, data, err := s.walletManager.SignRawTransaction(\n\t\treq.WalletName, req.Password, rawBytes,\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.SignRawTransactionResponse{\n\t\tTransactionId:        hex.EncodeToString(txID),\n\t\tSignedRawTransaction: hex.EncodeToString(data),\n\t}, nil\n}\n\nfunc (s *walletServer) SignMessage(_ context.Context,\n\treq *pactus.SignMessageRequest,\n) (*pactus.SignMessageResponse, error) {\n\tsig, err := s.walletManager.SignMessage(req.WalletName, req.Password, req.Address, req.Message)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.SignMessageResponse{\n\t\tSignature: sig,\n\t}, nil\n}\n\nfunc (s *walletServer) GetNewAddress(_ context.Context,\n\treq *pactus.GetNewAddressRequest,\n) (*pactus.GetNewAddressResponse, error) {\n\tinfo, err := s.walletManager.NewAddress(\n\t\treq.WalletName,\n\t\tcrypto.AddressType(req.AddressType),\n\t\treq.Label,\n\t\twallet.WithPassword(req.Password),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetNewAddressResponse{\n\t\tWalletName: req.WalletName,\n\t\tAddr:       s.addressInfoToProto(info),\n\t}, nil\n}\n\nfunc (s *walletServer) GetAddressInfo(_ context.Context,\n\treq *pactus.GetAddressInfoRequest,\n) (*pactus.GetAddressInfoResponse, error) {\n\tinfo, err := s.walletManager.AddressInfo(req.WalletName, req.Address)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetAddressInfoResponse{\n\t\tWalletName: req.WalletName,\n\t\tAddr:       s.addressInfoToProto(info),\n\t}, nil\n}\n\nfunc (s *walletServer) SetAddressLabel(_ context.Context,\n\treq *pactus.SetAddressLabelRequest,\n) (*pactus.SetAddressLabelResponse, error) {\n\terr := s.walletManager.SetAddressLabel(req.WalletName, req.Address, req.Label)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.SetAddressLabelResponse{\n\t\tWalletName: req.WalletName,\n\t\tAddress:    req.Address,\n\t\tLabel:      req.Label,\n\t}, nil\n}\n\nfunc (s *walletServer) GetWalletInfo(_ context.Context,\n\treq *pactus.GetWalletInfoRequest,\n) (*pactus.GetWalletInfoResponse, error) {\n\tinfo, err := s.walletManager.WalletInfo(req.WalletName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetWalletInfoResponse{\n\t\tWalletName: req.WalletName,\n\t\tVersion:    int32(info.Version),\n\t\tNetwork:    info.Network.String(),\n\t\tEncrypted:  info.Encrypted,\n\t\tUuid:       info.UUID,\n\t\tCreatedAt:  info.CreatedAt.Unix(),\n\t\tDefaultFee: info.DefaultFee.ToNanoPAC(),\n\t\tDriver:     info.Driver,\n\t\tPath:       info.Path,\n\t}, nil\n}\n\nfunc (s *walletServer) ListAddresses(_ context.Context,\n\treq *pactus.ListAddressesRequest,\n) (*pactus.ListAddressesResponse, error) {\n\taddressTypes := make([]crypto.AddressType, 0, len(req.AddressTypes))\n\tfor _, addrType := range req.AddressTypes {\n\t\taddressTypes = append(addressTypes, crypto.AddressType(addrType))\n\t}\n\n\taddrs, err := s.walletManager.ListAddresses(req.WalletName, wallet.WithAddressTypes(addressTypes))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddrsPB := make([]*pactus.AddressInfo, 0, len(addrs))\n\tfor _, info := range addrs {\n\t\taddrsPB = append(addrsPB, s.addressInfoToProto(&info))\n\t}\n\n\treturn &pactus.ListAddressesResponse{\n\t\tWalletName: req.WalletName,\n\t\tAddrs:      addrsPB,\n\t}, nil\n}\n\nfunc (s *walletServer) ListTransactions(_ context.Context,\n\treq *pactus.ListTransactionsRequest,\n) (*pactus.ListTransactionsResponse, error) {\n\tinfos, err := s.walletManager.ListTransactions(req.WalletName,\n\t\twallet.WithDirection(types.TxDirection(req.Direction)),\n\t\twallet.WithAddress(req.Address),\n\t\twallet.WithCount(int(req.Count)),\n\t\twallet.WithSkip(int(req.Skip)))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttrxs := make([]*pactus.WalletTransactionInfo, 0, len(infos))\n\tfor _, info := range infos {\n\t\ttrxs = append(trxs, &pactus.WalletTransactionInfo{\n\t\t\tNo:          info.No,\n\t\t\tTxId:        info.TxID,\n\t\t\tSender:      info.Sender,\n\t\t\tReceiver:    info.Receiver,\n\t\t\tDirection:   pactus.TxDirection(info.Direction),\n\t\t\tAmount:      info.Amount.ToNanoPAC(),\n\t\t\tFee:         info.Fee.ToNanoPAC(),\n\t\t\tMemo:        info.Memo,\n\t\t\tStatus:      pactus.TransactionStatus(info.Status),\n\t\t\tBlockHeight: uint32(info.BlockHeight),\n\t\t\tPayloadType: pactus.PayloadType(info.PayloadType),\n\t\t\tData:        info.Data,\n\t\t\tComment:     info.Comment,\n\t\t\tCreatedAt:   info.CreatedAt.Unix(),\n\t\t\tUpdatedAt:   info.UpdatedAt.Unix(),\n\t\t})\n\t}\n\n\treturn &pactus.ListTransactionsResponse{\n\t\tWalletName: req.WalletName,\n\t\tTxs:        trxs,\n\t}, nil\n}\n\nfunc (s *walletServer) UpdatePassword(_ context.Context,\n\treq *pactus.UpdatePasswordRequest,\n) (*pactus.UpdatePasswordResponse, error) {\n\terr := s.walletManager.UpdatePassword(req.WalletName, req.OldPassword, req.NewPassword)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.UpdatePasswordResponse{\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (s *walletServer) SetDefaultFee(_ context.Context,\n\treq *pactus.SetDefaultFeeRequest,\n) (*pactus.SetDefaultFeeResponse, error) {\n\terr := s.walletManager.SetDefaultFee(req.WalletName, amount.Amount(req.Amount))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.SetDefaultFeeResponse{\n\t\tWalletName: req.WalletName,\n\t}, nil\n}\n\nfunc (s *walletServer) GetMnemonic(_ context.Context,\n\treq *pactus.GetMnemonicRequest,\n) (*pactus.GetMnemonicResponse, error) {\n\tmnemonic, err := s.walletManager.Mnemonic(req.WalletName, req.Password)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetMnemonicResponse{\n\t\tMnemonic: mnemonic,\n\t}, nil\n}\n\nfunc (s *walletServer) GetPrivateKey(_ context.Context,\n\treq *pactus.GetPrivateKeyRequest,\n) (*pactus.GetPrivateKeyResponse, error) {\n\tprv, err := s.walletManager.PrivateKey(req.WalletName, req.Password, req.Address)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pactus.GetPrivateKeyResponse{\n\t\tPrivateKey: prv.String(),\n\t}, nil\n}\n"
  },
  {
    "path": "www/grpc/wallet_test.go",
    "content": "package grpc\n\nimport (\n\t\"errors\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/genesis\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/wallet\"\n\t\"github.com/pactus-project/pactus/wallet/types\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.uber.org/mock/gomock\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\nfunc TestWalletServiceIsDisabled(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = false\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tres, err := client.CreateWallet(t.Context(),\n\t\t&pactus.CreateWalletRequest{\n\t\t\tWalletName: \"TestWallet\",\n\t\t})\n\trequire.ErrorIs(t, err, status.Error(codes.Unimplemented, \"unknown service pactus.Wallet\"))\n\tassert.Nil(t, res)\n}\n\nfunc TestCreateWallet(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"No wallet name, should return an error\", func(t *testing.T) {\n\t\tres, err := client.CreateWallet(t.Context(),\n\t\t\t&pactus.CreateWalletRequest{\n\t\t\t\tWalletName: \"\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Create wallet failed\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tCreateWallet(\"test\", \"password\").\n\t\t\tReturn(\"\", errors.New(\"error on creating wallet\"))\n\n\t\tres, err := client.CreateWallet(t.Context(),\n\t\t\t&pactus.CreateWalletRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Create wallet successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tCreateWallet(\"test\", \"password\").\n\t\t\tReturn(\"mnemonic\", nil)\n\n\t\tres, err := client.CreateWallet(t.Context(),\n\t\t\t&pactus.CreateWalletRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, \"mnemonic\", res.Mnemonic)\n\t})\n}\n\nfunc TestRestoreWallet(t *testing.T) {\n\tconfig := testConfig()\n\tconfig.EnableWallet = true\n\n\ttd := setup(t, config)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"No wallet name, should return an error\", func(t *testing.T) {\n\t\tres, err := client.RestoreWallet(t.Context(),\n\t\t\t&pactus.RestoreWalletRequest{})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"No mnemonic, should return an error\", func(t *testing.T) {\n\t\tres, err := client.RestoreWallet(t.Context(),\n\t\t\t&pactus.RestoreWalletRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Restore wallet failed\", func(t *testing.T) {\n\t\tmnemonic, err := wallet.GenerateMnemonic(128)\n\t\trequire.NoError(t, err)\n\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tRestoreWallet(\"test\", mnemonic, \"password\").\n\t\t\tReturn(errors.New(\"error on restoring wallet\"))\n\n\t\tres, err := client.RestoreWallet(t.Context(),\n\t\t\t&pactus.RestoreWalletRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tMnemonic:   mnemonic,\n\t\t\t\tPassword:   \"password\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Restore wallet successfully\", func(t *testing.T) {\n\t\tmnemonic, err := wallet.GenerateMnemonic(128)\n\t\trequire.NoError(t, err)\n\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tRestoreWallet(\"test\", mnemonic, \"password\").\n\t\t\tReturn(nil)\n\n\t\tres, err := client.RestoreWallet(t.Context(),\n\t\t\t&pactus.RestoreWalletRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tMnemonic:   mnemonic,\n\t\t\t\tPassword:   \"password\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t})\n}\n\nfunc TestGetTotalBalance(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting total balance\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tTotalBalance(\"test\").\n\t\t\tReturn(amount.Amount(0), errors.New(\"error on getting total balance\"))\n\n\t\tres, err := client.GetTotalBalance(t.Context(),\n\t\t\t&pactus.GetTotalBalanceRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get total balance successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tTotalBalance(\"test\").\n\t\t\tReturn(amount.Amount(123), nil)\n\n\t\tres, err := client.GetTotalBalance(t.Context(),\n\t\t\t&pactus.GetTotalBalanceRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, int64(123), res.TotalBalance)\n\t})\n}\n\nfunc TestGetTotalStake(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting total stake\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tTotalStake(\"test\").\n\t\t\tReturn(amount.Amount(0), errors.New(\"error on getting total stake\"))\n\n\t\tres, err := client.GetTotalStake(t.Context(),\n\t\t\t&pactus.GetTotalStakeRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get total stake successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tTotalStake(\"test\").\n\t\t\tReturn(amount.Amount(123), nil)\n\n\t\tres, err := client.GetTotalStake(t.Context(),\n\t\t\t&pactus.GetTotalStakeRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, int64(123), res.TotalStake)\n\t})\n}\n\nfunc TestSignRawTransaction(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Bad traansaction data\", func(t *testing.T) {\n\t\tres, err := client.SignRawTransaction(t.Context(),\n\t\t\t&pactus.SignRawTransactionRequest{\n\t\t\t\tWalletName:     \"test\",\n\t\t\t\tRawTransaction: \"invalid-hex\",\n\t\t\t})\n\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Error on signing raw transaction\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSignRawTransaction(\"test\", \"\", gomock.Any()).\n\t\t\tReturn(nil, nil, errors.New(\"error on signing raw transaction\"))\n\n\t\tres, err := client.SignRawTransaction(t.Context(),\n\t\t\t&pactus.SignRawTransactionRequest{\n\t\t\t\tWalletName:     \"test\",\n\t\t\t\tRawTransaction: \"1a2b3c4d\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Sign raw transaction successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSignRawTransaction(\"test\", \"\", gomock.Any()).\n\t\t\tReturn(nil, nil, nil)\n\n\t\tres, err := client.SignRawTransaction(t.Context(),\n\t\t\t&pactus.SignRawTransactionRequest{\n\t\t\t\tWalletName:     \"test\",\n\t\t\t\tRawTransaction: \"1a2b3c4d\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\tassert.NotNil(t, res)\n\t})\n}\n\nfunc TestGetValidatorAddress(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting validator address\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tGetValidatorAddress(\"pubKey\").\n\t\t\tReturn(\"\", errors.New(\"error on getting validator address\"))\n\n\t\tres, err := client.GetValidatorAddress(t.Context(),\n\t\t\t&pactus.GetValidatorAddressRequest{\n\t\t\t\tPublicKey: \"pubKey\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get validator address successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tGetValidatorAddress(\"pubKey\").\n\t\t\tReturn(\"valAddr\", nil)\n\n\t\tres, err := client.GetValidatorAddress(t.Context(),\n\t\t\t&pactus.GetValidatorAddressRequest{\n\t\t\t\tPublicKey: \"pubKey\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"valAddr\", res.Address)\n\t})\n}\n\nfunc TestSignMessage(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on signing message\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSignMessage(\"test\", \"password\", \"addr\", \"hello\").\n\t\t\tReturn(\"\", errors.New(\"error on signing message\"))\n\n\t\tres, err := client.SignMessage(t.Context(),\n\t\t\t&pactus.SignMessageRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t\tMessage:    \"hello\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Sign message successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSignMessage(\"test\", \"password\", \"addr\", \"hello\").\n\t\t\tReturn(\"signature\", nil)\n\n\t\tres, err := client.SignMessage(t.Context(),\n\t\t\t&pactus.SignMessageRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t\tMessage:    \"hello\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"signature\", res.Signature)\n\t})\n}\n\nfunc TestNewAddress(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting new address\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tNewAddress(\"test\", crypto.AddressTypeBLSAccount, \"label\", gomock.Any()).\n\t\t\tReturn(nil, errors.New(\"error on getting new address\"))\n\n\t\tres, err := client.GetNewAddress(t.Context(),\n\t\t\t&pactus.GetNewAddressRequest{\n\t\t\t\tWalletName:  \"test\",\n\t\t\t\tAddressType: pactus.AddressType_ADDRESS_TYPE_BLS_ACCOUNT,\n\t\t\t\tLabel:       \"label\",\n\t\t\t\tPassword:    \"password\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get new address successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tNewAddress(\"test\", crypto.AddressTypeBLSAccount, \"label\", gomock.Any()).\n\t\t\tReturn(&types.AddressInfo{\n\t\t\t\tAddress:   \"addr\",\n\t\t\t\tLabel:     \"label\",\n\t\t\t\tPublicKey: \"pub\",\n\t\t\t\tPath:      \"m/44'/0'/0'/0/0\",\n\t\t\t}, nil)\n\n\t\tres, err := client.GetNewAddress(t.Context(),\n\t\t\t&pactus.GetNewAddressRequest{\n\t\t\t\tWalletName:  \"test\",\n\t\t\t\tAddressType: pactus.AddressType_ADDRESS_TYPE_BLS_ACCOUNT,\n\t\t\t\tLabel:       \"label\",\n\t\t\t\tPassword:    \"password\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\trequire.NotNil(t, res.Addr)\n\t\tassert.Equal(t, \"addr\", res.Addr.Address)\n\t\tassert.Equal(t, \"label\", res.Addr.Label)\n\t\tassert.Equal(t, \"pub\", res.Addr.PublicKey)\n\t\tassert.Equal(t, \"m/44'/0'/0'/0/0\", res.Addr.Path)\n\t})\n}\n\nfunc TestAddressInfo(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting address info\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tAddressInfo(\"test\", \"addr\").\n\t\t\tReturn(nil, errors.New(\"error on getting address info\"))\n\n\t\tres, err := client.GetAddressInfo(t.Context(),\n\t\t\t&pactus.GetAddressInfoRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get address info successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tAddressInfo(\"test\", \"addr\").\n\t\t\tReturn(&types.AddressInfo{\n\t\t\t\tAddress:   \"addr\",\n\t\t\t\tLabel:     \"label\",\n\t\t\t\tPublicKey: \"pub\",\n\t\t\t\tPath:      \"path\",\n\t\t\t}, nil)\n\n\t\tres, err := client.GetAddressInfo(t.Context(),\n\t\t\t&pactus.GetAddressInfoRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, \"addr\", res.Addr.Address)\n\t\tassert.Equal(t, \"label\", res.Addr.Label)\n\t\tassert.Equal(t, \"pub\", res.Addr.PublicKey)\n\t\tassert.Equal(t, \"path\", res.Addr.Path)\n\t})\n}\n\nfunc TestSetAddressLabel(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on setting address label\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSetAddressLabel(\"test\", \"addr\", \"label\").\n\t\t\tReturn(errors.New(\"error on setting address label\"))\n\n\t\tres, err := client.SetAddressLabel(t.Context(),\n\t\t\t&pactus.SetAddressLabelRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t\tLabel:      \"label\",\n\t\t\t})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Set address label successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tSetAddressLabel(\"test\", \"addr\", \"label\").\n\t\t\tReturn(nil)\n\n\t\tres, err := client.SetAddressLabel(t.Context(),\n\t\t\t&pactus.SetAddressLabelRequest{\n\t\t\t\tWalletName: \"test\",\n\t\t\t\tPassword:   \"password\",\n\t\t\t\tAddress:    \"addr\",\n\t\t\t\tLabel:      \"label\",\n\t\t\t})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, \"addr\", res.Address)\n\t\tassert.Equal(t, \"label\", res.Label)\n\t})\n}\n\nfunc TestListWallet(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on listing wallets\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tListWallets().\n\t\t\tReturn(nil, errors.New(\"error on listing wallets\"))\n\n\t\tres, err := client.ListWallets(t.Context(), &pactus.ListWalletsRequest{})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"List wallets successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tListWallets().\n\t\t\tReturn([]string{\"w1\", \"w2\"}, nil)\n\n\t\tres, err := client.ListWallets(t.Context(), &pactus.ListWalletsRequest{})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, []string{\"w1\", \"w2\"}, res.Wallets)\n\t})\n}\n\nfunc TestGetWalletInfo(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on getting wallet info\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tWalletInfo(\"test\").\n\t\t\tReturn(nil, errors.New(\"error on getting wallet info\"))\n\n\t\tres, err := client.GetWalletInfo(t.Context(),\n\t\t\t&pactus.GetWalletInfoRequest{WalletName: \"test\"})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"Get wallet info successfully\", func(t *testing.T) {\n\t\tcreatedAt := time.Unix(123, 0).UTC()\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tWalletInfo(\"test\").\n\t\t\tReturn(&types.WalletInfo{\n\t\t\t\tVersion:    7,\n\t\t\t\tNetwork:    genesis.Mainnet,\n\t\t\t\tEncrypted:  true,\n\t\t\t\tUUID:       \"uuid\",\n\t\t\t\tCreatedAt:  createdAt,\n\t\t\t\tDefaultFee: amount.Amount(456),\n\t\t\t}, nil)\n\n\t\tres, err := client.GetWalletInfo(t.Context(),\n\t\t\t&pactus.GetWalletInfoRequest{WalletName: \"test\"})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\tassert.Equal(t, int32(7), res.Version)\n\t\tassert.Equal(t, \"Mainnet\", res.Network)\n\t\tassert.True(t, res.Encrypted)\n\t\tassert.Equal(t, \"uuid\", res.Uuid)\n\t\tassert.Equal(t, createdAt.Unix(), res.CreatedAt)\n\t\tassert.Equal(t, int64(456), res.DefaultFee)\n\t})\n}\n\nfunc TestListAddress(t *testing.T) {\n\tconf := testConfig()\n\tconf.EnableWallet = true\n\n\ttd := setup(t, conf)\n\tclient := td.walletClient(t)\n\n\tt.Run(\"Error on listing addresses\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tListAddresses(\"test\", gomock.Any()).\n\t\t\tReturn(nil, errors.New(\"error on listing addresses\"))\n\n\t\tres, err := client.ListAddresses(t.Context(),\n\t\t\t&pactus.ListAddressesRequest{WalletName: \"test\"})\n\t\trequire.Error(t, err)\n\t\tassert.Nil(t, res)\n\t})\n\n\tt.Run(\"List addresses successfully\", func(t *testing.T) {\n\t\ttd.mockWalletMgr.EXPECT().\n\t\t\tListAddresses(\"test\", gomock.Any()).\n\t\t\tReturn([]types.AddressInfo{\n\t\t\t\t{\n\t\t\t\t\tAddress:   \"addr1\",\n\t\t\t\t\tLabel:     \"label1\",\n\t\t\t\t\tPublicKey: \"pub1\",\n\t\t\t\t\tPath:      \"path1\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tAddress:   \"addr2\",\n\t\t\t\t\tLabel:     \"label2\",\n\t\t\t\t\tPublicKey: \"pub2\",\n\t\t\t\t\tPath:      \"path2\",\n\t\t\t\t},\n\t\t\t}, nil)\n\n\t\tres, err := client.ListAddresses(t.Context(),\n\t\t\t&pactus.ListAddressesRequest{WalletName: \"test\"})\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, res)\n\t\tassert.Equal(t, \"test\", res.WalletName)\n\t\trequire.Len(t, res.Addrs, 2)\n\t\tassert.Equal(t, \"addr1\", res.Addrs[0].Address)\n\t\tassert.Equal(t, \"label1\", res.Addrs[0].Label)\n\t\tassert.Equal(t, \"pub1\", res.Addrs[0].PublicKey)\n\t\tassert.Equal(t, \"path1\", res.Addrs[0].Path)\n\t})\n}\n"
  },
  {
    "path": "www/html/README.md",
    "content": "# HTTP\n\nThis directory contains required files for HTTP service.\nHTTP modules has no direct connection with Pactus blockchain.\nIt gets information through [GRPC](../grpc) APIs.\n\nNote:\nIt's recommended to disable HTTP service in production.\n"
  },
  {
    "path": "www/html/blockchain.go",
    "content": "package html\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/types/vote\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\nfunc (s *Server) BlockchainHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tres, err := s.blockchain.GetBlockchainInfo(ctx,\n\t\t&pactus.GetBlockchainInfoRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowBlockHash(\"Last Block Hash\", res.LastBlockHash)\n\ttmk.addRowInt(\"Last Block Height\", int(res.LastBlockHeight))\n\ttmk.addRowString(\"Last Block Time\", time.Unix(res.LastBlockTime, 0).String())\n\ttmk.addRowInt(\"Total Accounts\", int(res.TotalAccounts))\n\ttmk.addRowInt(\"Total Validators\", int(res.TotalValidators))\n\ttmk.addRowInt(\"Active Validators\", int(res.ActiveValidators))\n\ttmk.addRowString(\"Average Score\", fmt.Sprintf(\"%.2f\", res.AverageScore))\n\ttmk.addRowPower(\"Total Power\", res.TotalPower)\n\ttmk.addRowPower(\"Committee Power\", res.CommitteePower)\n\ttmk.addRowInt(\"Committee Size\", int(res.CommitteeSize))\n\ttmk.addRowBool(\"Is Pruned\", res.IsPruned)\n\ttmk.addRowInt(\"Pruning Height\", int(res.PruningHeight))\n\ttmk.addRowBool(\"In Committee\", res.InCommittee)\n\n\ts.writeHTML(w, tmk.html())\n}\n\nfunc (s *Server) CommitteeHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tres, err := s.blockchain.GetCommitteeInfo(ctx,\n\t\t&pactus.GetCommitteeInfoRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowPower(\"Committee Power\", res.CommitteePower)\n\ttmk.addRowPower(\"Total Power\", res.TotalPower)\n\ttmk.addRowInt(\"Committee Size\", int(res.CommitteeSize))\n\ttmk.addRowInt(\"Validators\", len(res.Validators))\n\ttmk.addRowString(\"--- Protocol Versions\", \"---\")\n\tfor ver, percentage := range res.ProtocolVersions {\n\t\ttmk.addRowDouble(fmt.Sprintf(\"Version %d\", ver), percentage)\n\t}\n\ttmk.addRowString(\"--- Validators\", \"---\")\n\tfor i, val := range res.Validators {\n\t\ttmk.addRowInt(\"--- Validator\", i+1)\n\t\ttmVal := s.writeValidatorTable(val)\n\t\ttmk.addRowString(\"\", tmVal.html())\n\t}\n\n\ts.writeHTML(w, tmk.html())\n}\n\nfunc (s *Server) GetBlockByHeightHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\theight, err := strconv.ParseInt(vars[\"height\"], 10, 32)\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\ts.blockByHeight(ctx, w, uint32(height))\n}\n\nfunc (s *Server) GetBlockByHashHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\tblockHash, err := hash.FromString(vars[\"hash\"])\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\tres, err := s.blockchain.GetBlockHeight(ctx,\n\t\t&pactus.GetBlockHeightRequest{Hash: blockHash.String()})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ts.blockByHeight(ctx, w, res.Height)\n}\n\nfunc (s *Server) blockByHeight(ctx context.Context, w http.ResponseWriter, blockHeight uint32) {\n\tres, err := s.blockchain.GetBlock(ctx,\n\t\t&pactus.GetBlockRequest{\n\t\t\tHeight:    blockHeight,\n\t\t\tVerbosity: pactus.BlockVerbosity_BLOCK_VERBOSITY_TRANSACTIONS,\n\t\t},\n\t)\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowString(\"Time\", time.Unix(int64(res.BlockTime), 0).String())\n\ttmk.addRowInt(\"Height\", int(res.Height))\n\ttmk.addRowString(\"Hash\", res.Hash)\n\ttmk.addRowString(\"Data\", res.Data)\n\tif res.Header != nil {\n\t\ttmk.addRowString(\"--- Header\", \"---\")\n\t\ttmk.addRowInt(\"Version\", int(res.Header.Version))\n\t\ttmk.addRowInt(\"UnixTime\", int(res.BlockTime))\n\t\ttmk.addRowBlockHash(\"PrevBlockHash\", res.Header.PrevBlockHash)\n\t\ttmk.addRowString(\"StateRoot\", res.Header.StateRoot)\n\t\ttmk.addRowString(\"SortitionSeed\", res.Header.SortitionSeed)\n\t\ttmk.addRowValAddress(\"ProposerAddress\", res.Header.ProposerAddress)\n\t}\n\tif res.PrevCert != nil {\n\t\ttmk.addRowString(\"--- PrevCertificate\", \"---\")\n\t\ttmk.addRowString(\"Hash\", res.PrevCert.Hash)\n\t\ttmk.addRowInt(\"Round\", int(res.PrevCert.Round))\n\t\ttmk.addRowInts(\"Committers\", res.PrevCert.Committers)\n\t\ttmk.addRowInts(\"Absentees\", res.PrevCert.Absentees)\n\t\ttmk.addRowString(\"Signature\", res.PrevCert.Signature)\n\t}\n\ttmk.addRowString(\"--- Transactions\", \"---\")\n\tfor i, trx := range res.Txs {\n\t\ttmk.addRowInt(\"Transaction #\", i+1)\n\t\ttxToTable(tmk, trx)\n\t}\n\n\ts.writeHTML(w, tmk.html())\n}\n\n// GetAccountHandler returns a handler to get account by address.\nfunc (s *Server) GetAccountHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\tres, err := s.blockchain.GetAccount(ctx,\n\t\t&pactus.GetAccountRequest{Address: vars[\"address\"]})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\tacc := res.Account\n\ttmk := newTableMaker()\n\ttmk.addRowAccAddress(\"Address\", acc.Address)\n\ttmk.addRowInt(\"Number\", int(acc.Number))\n\ttmk.addRowAmount(\"Balance\", amount.Amount(acc.Balance))\n\ttmk.addRowString(\"Hash\", acc.Hash)\n\n\ts.writeHTML(w, tmk.html())\n}\n\n// GetValidatorHandler returns a handler to get validator by address.\nfunc (s *Server) GetValidatorHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\tres, err := s.blockchain.GetValidator(ctx,\n\t\t&pactus.GetValidatorRequest{Address: vars[\"address\"]})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttm := s.writeValidatorTable(res.Validator)\n\ts.writeHTML(w, tm.html())\n}\n\n// GetValidatorByNumberHandler returns a handler to get validator by number.\nfunc (s *Server) GetValidatorByNumberHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\n\tnum, err := strconv.ParseInt(vars[\"number\"], 10, 32)\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\tres, err := s.blockchain.GetValidatorByNumber(ctx,\n\t\t&pactus.GetValidatorByNumberRequest{\n\t\t\tNumber: int32(num),\n\t\t})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttm := s.writeValidatorTable(res.Validator)\n\ts.writeHTML(w, tm.html())\n}\n\nfunc (s *Server) GetTxPoolHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tres, err := s.blockchain.GetTxPoolContent(ctx, &pactus.GetTxPoolContentRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttm := newTableMaker()\n\tfor i, trx := range res.Txs {\n\t\ttm.addRowString(\"\\n-------------- \", fmt.Sprintf(\"%d --------------\\n\", i))\n\t\ttxToTable(tm, trx)\n\t}\n\ts.writeHTML(w, tm.html())\n}\n\nfunc (*Server) writeValidatorTable(val *pactus.ValidatorInfo) *tableMaker {\n\ttmk := newTableMaker()\n\ttmk.addRowString(\"Public Key\", val.PublicKey)\n\ttmk.addRowValAddress(\"Address\", val.Address)\n\ttmk.addRowInt(\"Number\", int(val.Number))\n\ttmk.addRowAmount(\"Stake\", amount.Amount(val.Stake))\n\ttmk.addRowInt(\"LastBondingHeight\", int(val.LastBondingHeight))\n\ttmk.addRowInt(\"LastSortitionHeight\", int(val.LastSortitionHeight))\n\ttmk.addRowInt(\"UnbondingHeight\", int(val.UnbondingHeight))\n\ttmk.addRowDouble(\"AvailabilityScore\", val.AvailabilityScore)\n\ttmk.addRowInt(\"ProtocolVersion\", int(val.ProtocolVersion))\n\n\ttmk.addRowBool(\"IsDelegated\", val.IsDelegated)\n\tif val.IsDelegated {\n\t\ttmk.addRowAccAddress(\"DelegateOwner\", val.DelegateOwner)\n\t\ttmk.addRowAmount(\"DelegateShare\", amount.Amount(val.DelegateShare))\n\t\ttmk.addRowInt(\"DelegateExpiry\", int(val.DelegateExpiry))\n\t}\n\n\ttmk.addRowString(\"Hash\", val.Hash)\n\n\treturn tmk\n}\n\nfunc (s *Server) ConsensusHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tres, err := s.blockchain.GetConsensusInfo(ctx,\n\t\t&pactus.GetConsensusInfoRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\n\ttmk.addRowString(\"== Proposal\", \"\")\n\tif res.Proposal != nil {\n\t\ttmk.addRowInt(\"Height\", int(res.Proposal.Height))\n\t\ttmk.addRowInt(\"Round\", int(res.Proposal.Round))\n\t\ttmk.addRowString(\"BlockData\", res.Proposal.BlockData)\n\t\ttmk.addRowString(\"Signature\", res.Proposal.Signature)\n\t}\n\n\tfor i, cons := range res.Instances {\n\t\ttmk.addRowInt(\"== Validator\", i+1)\n\t\ttmk.addRowValAddress(\"Address\", cons.Address)\n\t\ttmk.addRowBool(\"Active\", cons.Active)\n\t\ttmk.addRowInt(\"Height\", int(cons.Height))\n\t\ttmk.addRowInt(\"Round\", int(cons.Round))\n\t\ttmk.addRowString(\"Votes\", \"---\")\n\t\tfor index, vte := range cons.Votes {\n\t\t\ttmk.addRowInt(\"-- Vote #\", index+1)\n\t\t\ttmk.addRowBlockHash(\"BlockHash\", vte.BlockHash)\n\t\t\ttmk.addRowString(\"Type\", vote.Type(vte.Type).String())\n\t\t\ttmk.addRowString(\"Voter\", vte.Voter)\n\t\t\ttmk.addRowInt(\"Round\", int(vte.Round))\n\t\t\ttmk.addRowInt(\"CPRound\", int(vte.CpRound))\n\t\t\ttmk.addRowInt(\"CPValue\", int(vte.CpValue))\n\t\t}\n\t}\n\n\ts.writeHTML(w, tmk.html())\n}\n"
  },
  {
    "path": "www/html/blockchain_test.go",
    "content": "package html\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strconv\"\n\t\"testing\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestBlockchainInfo(t *testing.T) {\n\ttd := setup(t)\n\n\ttd.mockState.CommitTestBlocks(10)\n\n\tw := httptest.NewRecorder()\n\tr := new(http.Request)\n\n\ttd.httpServer.BlockchainHandler(w, r)\n\n\tassert.Equal(t, 200, w.Code)\n\tassert.Contains(t, w.Body.String(), \"10\")\n\n\ttd.StopServers()\n}\n\nfunc TestBlock(t *testing.T) {\n\ttd := setup(t)\n\n\theight := td.RandHeight()\n\tblk := td.mockState.TestStore.AddTestBlock(height)\n\n\tt.Run(\"Shall return a block\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"hash\": blk.Hash().String()})\n\t\ttd.httpServer.GetBlockByHashHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t\tassert.Contains(t, w.Body.String(), blk.Hash().String())\n\t})\n\n\tt.Run(\"Shall return a block\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"height\": fmt.Sprintf(\"%d\", height)})\n\t\ttd.httpServer.GetBlockByHeightHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, invalid height\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"height\": \"x\"})\n\t\ttd.httpServer.GetBlockByHeightHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, non exists\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"hash\": td.RandHash().String()})\n\t\ttd.httpServer.GetBlockByHashHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, invalid hash\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"hash\": \"abc\"})\n\t\ttd.httpServer.GetBlockByHashHandler(w, r)\n\t\tfmt.Println(w.Body)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, empty hash\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"hash\": \"\"})\n\t\ttd.httpServer.GetBlockByHashHandler(w, r)\n\t\tfmt.Println(w.Body)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, no hash\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\ttd.httpServer.GetBlockByHashHandler(w, r)\n\t\tfmt.Println(w.Body)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\ttd.StopServers()\n}\n\nfunc TestAccount(t *testing.T) {\n\ttd := setup(t)\n\n\taddr, acc := td.mockState.TestStore.AddTestAccount()\n\n\tt.Run(\"Shall return an account\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": addr.String()})\n\t\ttd.httpServer.GetAccountHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t\tassert.Contains(t, w.Body.String(), acc.Balance().String())\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return nil, non exist\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": td.RandAccAddress().String()})\n\t\ttd.httpServer.GetAccountHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, invalid address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": \"invalid-address\"})\n\t\ttd.httpServer.GetAccountHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, empty address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": \"\"})\n\t\ttd.httpServer.GetAccountHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, no address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\ttd.httpServer.GetAccountHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\ttd.StopServers()\n}\n\nfunc TestValidator(t *testing.T) {\n\ttd := setup(t)\n\n\tval := td.mockState.TestStore.AddTestValidator()\n\n\tt.Run(\"Shall return an error, non exist\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": td.RandAccAddress().String()})\n\t\ttd.httpServer.GetValidatorHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t})\n\n\tt.Run(\"Shall return an error, invalid address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": \"invalid-address\"})\n\t\ttd.httpServer.GetValidatorHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, empty address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": \"\"})\n\t\ttd.httpServer.GetValidatorHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, no address\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\ttd.httpServer.GetValidatorHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return a validator\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"address\": val.Address().String()})\n\n\t\ttd.httpServer.GetValidatorHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t\tassert.Contains(t, w.Body.String(), \"0.987\")\n\t\tfmt.Println(w.Body)\n\t})\n\n\ttd.StopServers()\n}\n\nfunc TestValidatorByNumber(t *testing.T) {\n\ttd := setup(t)\n\n\tval := td.mockState.TestStore.AddTestValidator()\n\n\tt.Run(\"Shall return a validator\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tfmt.Println(val.Number())\n\t\tfmt.Println(strconv.Itoa(int(val.Number())))\n\t\tr = mux.SetURLVars(r, map[string]string{\"number\": strconv.Itoa(int(val.Number()))})\n\t\ttd.httpServer.GetValidatorByNumberHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return a error, non exist\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tfmt.Println(val.Number())\n\t\tfmt.Println(strconv.Itoa(int(val.Number())))\n\t\tr = mux.SetURLVars(r, map[string]string{\"number\": strconv.Itoa(int(val.Number() + 1))})\n\t\ttd.httpServer.GetValidatorByNumberHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, empty number\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"number\": \"\"})\n\t\ttd.httpServer.GetValidatorByNumberHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, invalid number\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"number\": \"not-a-number\"})\n\t\ttd.httpServer.GetValidatorByNumberHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error, no number\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\ttd.httpServer.GetValidatorByNumberHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\ttd.StopServers()\n}\n\nfunc TestConsensusInfo(t *testing.T) {\n\ttd := setup(t)\n\n\theight, _ := td.mockConsMgr.HeightRound()\n\tvote1, _ := td.GenerateTestPrepareVote(height, 1)\n\tvote2, _ := td.GenerateTestPrecommitVote(height, 2)\n\tprop := td.GenerateTestProposal(height, 2)\n\n\ttd.mockConsMgr.AddVote(vote1)\n\ttd.mockConsMgr.AddVote(vote2)\n\ttd.mockConsMgr.SetProposal(prop)\n\n\tw := httptest.NewRecorder()\n\tr := new(http.Request)\n\n\ttd.httpServer.ConsensusHandler(w, r)\n\n\tassert.Equal(t, 200, w.Code)\n\tassert.Contains(t, w.Body.String(), \"<td>2</td>\")\n\tassert.Contains(t, w.Body.String(), vote2.Signer().String())\n\tassert.Contains(t, w.Body.String(), prop.Signature().String())\n\n\ttd.StopServers()\n}\n"
  },
  {
    "path": "www/html/config.go",
    "content": "package html\n\n// Config defines parameters for the HTML UI server.\ntype Config struct {\n\tEnable      bool   `toml:\"enable\"`\n\tListen      string `toml:\"listen\"`\n\tEnablePprof bool   `toml:\"enable_pprof\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tEnable:      false,\n\t\tListen:      \"\",\n\t\tEnablePprof: false,\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (*Config) BasicCheck() error {\n\treturn nil\n}\n"
  },
  {
    "path": "www/html/html_test.go",
    "content": "package html\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\tconsmgr \"github.com/pactus-project/pactus/consensus/manager\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/network\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/sync\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\twltmgr \"github.com/pactus-project/pactus/wallet/manager\"\n\t\"github.com/pactus-project/pactus/www/grpc\"\n\t\"github.com/pactus-project/pactus/www/zmq\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tmockState   *state.MockState\n\tmockSync    *sync.MockSync\n\tmockConsMgr consmgr.Manager\n\tgRPCServer  *grpc.Server\n\thttpServer  *Server\n}\n\nfunc (td *testData) StopServers() {\n\ttd.httpServer.StopServer()\n\ttd.gRPCServer.StopServer()\n}\n\nfunc setup(t *testing.T) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\n\t// Resetting http handlers in golang for unit testing:\n\t// https://stackoverflow.com/questions/40786526/resetting-http-handlers-in-golang-for-unit-testing\n\t//\n\thttp.DefaultServeMux = new(http.ServeMux)\n\n\tvalKeys := []*bls.ValidatorKey{ts.RandValKey(), ts.RandValKey()}\n\tmockState := state.MockingState(ts)\n\tmockSync := sync.MockingSync(ts)\n\tmockNet := network.MockingNetwork(ts, ts.RandPeerID())\n\tmockConsMgr, _ := consmgr.MockingManager(ts, mockState, valKeys)\n\n\tmockConsMgr.MoveToNewHeight()\n\n\tgrpcConf := &grpc.Config{\n\t\tEnable: true,\n\t\tListen: \"[::]:0\",\n\t}\n\thttpConf := &Config{\n\t\tEnable: true,\n\t\tListen: \"[::]:0\",\n\t}\n\n\tmockWalletMgr := wltmgr.NewMockIManager(ts.MockingController())\n\n\tzmqPublishers := []zmq.Publisher{\n\t\tzmq.MockingPublisher(\"zmq_address\", \"zmq_topic\", 100),\n\t}\n\n\tgRPCServer := grpc.NewServer(t.Context(), grpcConf,\n\t\tmockState, mockSync, mockNet, mockConsMgr,\n\t\tmockWalletMgr, zmqPublishers,\n\t)\n\trequire.NoError(t, gRPCServer.StartServer())\n\n\thttpServer := NewServer(t.Context(), httpConf, false)\n\trequire.NoError(t, httpServer.StartServer(gRPCServer.Address()))\n\n\treturn &testData{\n\t\tTestSuite:   ts,\n\t\tmockState:   mockState,\n\t\tmockSync:    mockSync,\n\t\tmockConsMgr: mockConsMgr,\n\t\tgRPCServer:  gRPCServer,\n\t\thttpServer:  httpServer,\n\t}\n}\n\nfunc TestRootHandler(t *testing.T) {\n\ttd := setup(t)\n\n\tw := httptest.NewRecorder()\n\tr := new(http.Request)\n\ttd.httpServer.RootHandler(w, r)\n\tassert.Equal(t, 200, w.Code)\n\tfmt.Println(w.Body)\n\n\ttd.StopServers()\n}\n"
  },
  {
    "path": "www/html/middleware.go",
    "content": "package html\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/pactus-project/pactus/www/grpc/basicauth\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nfunc basicAuth(next http.Handler) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tuser, password, ok := r.BasicAuth()\n\t\tif !ok {\n\t\t\tw.Header().Set(\"WWW-Authenticate\", `Basic realm=\"restricted\", charset=\"UTF-8\"`)\n\t\t\thttp.Error(w, \"unauthorized\", http.StatusUnauthorized)\n\n\t\t\treturn\n\t\t}\n\n\t\tba := basicauth.New(user, password)\n\t\ttokens, _ := ba.GetRequestMetadata(r.Context())\n\t\tmd := metadata.New(tokens)\n\n\t\tr = r.WithContext(metadata.NewOutgoingContext(r.Context(), md))\n\n\t\tnext.ServeHTTP(w, r)\n\t})\n}\n"
  },
  {
    "path": "www/html/middleware_test.go",
    "content": "package html\n\nimport (\n\t\"encoding/base64\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nfunc TestBasicAuthMiddleware(t *testing.T) {\n\thandler := basicAuth(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {\n\t\tw.WriteHeader(http.StatusOK)\n\t\t_, err := w.Write([]byte(\"authorized\"))\n\t\tassert.NoError(t, err)\n\t}))\n\n\tt.Run(\"NoAuth\", func(t *testing.T) {\n\t\treq := httptest.NewRequestWithContext(t.Context(), http.MethodGet, \"/\", http.NoBody)\n\t\trec := httptest.NewRecorder()\n\n\t\thandler.ServeHTTP(rec, req)\n\n\t\tassert.Equal(t, http.StatusUnauthorized, rec.Code)\n\t\tassert.Equal(t, `Basic realm=\"restricted\", charset=\"UTF-8\"`, rec.Header().Get(\"WWW-Authenticate\"))\n\t})\n\n\tt.Run(\"WithAuth\", func(t *testing.T) {\n\t\treq := httptest.NewRequestWithContext(t.Context(), http.MethodGet, \"/\", http.NoBody)\n\t\treq.SetBasicAuth(\"username\", \"password\")\n\t\trec := httptest.NewRecorder()\n\n\t\thandler.ServeHTTP(rec, req)\n\n\t\tassert.Equal(t, http.StatusOK, rec.Code)\n\t\tassert.Equal(t, \"authorized\", rec.Body.String())\n\t})\n\n\tt.Run(\"CheckMetadata\", func(t *testing.T) {\n\t\treq := httptest.NewRequestWithContext(t.Context(), http.MethodGet, \"/\", http.NoBody)\n\t\treq.SetBasicAuth(\"username\", \"password\")\n\t\trec := httptest.NewRecorder()\n\n\t\tcheckMetadataHandler := basicAuth(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\tmd, ok := metadata.FromOutgoingContext(r.Context())\n\t\t\tassert.True(t, ok, \"No metadata in context\")\n\n\t\t\tauth := md[\"authorization\"][0]\n\n\t\t\tconst prefix = \"Basic \"\n\t\t\tc, err := base64.StdEncoding.DecodeString(auth[len(prefix):])\n\t\t\tassert.NoError(t, err)\n\t\t\tcs := string(c)\n\t\t\tusername, password, ok := strings.Cut(cs, \":\")\n\t\t\tassert.True(t, ok)\n\n\t\t\tassert.Equal(t, \"username\", username)\n\t\t\tassert.Equal(t, \"password\", password)\n\n\t\t\tw.WriteHeader(http.StatusOK)\n\t\t}))\n\n\t\tcheckMetadataHandler.ServeHTTP(rec, req)\n\n\t\tassert.Equal(t, http.StatusOK, rec.Code)\n\t})\n}\n"
  },
  {
    "path": "www/html/network.go",
    "content": "package html\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"slices\"\n\t\"time\"\n\n\tlp2pnetwork \"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/pactus-project/pactus/crypto/bls\"\n\t\"github.com/pactus-project/pactus/sync/bundle/message\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/service\"\n\t\"github.com/pactus-project/pactus/sync/peerset/peer/status\"\n\t\"github.com/pactus-project/pactus/util\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\nfunc (s *Server) NetworkHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tinfo, err := s.network.GetNetworkInfo(ctx,\n\t\t&pactus.GetNetworkInfoRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowString(\"Network Name\", info.NetworkName)\n\ttmk.addRowInt(\"Connected Peers Count\", int(info.ConnectedPeersCount))\n\ttmk.addRowString(\"Peers\", \"/network/peers\")\n\tmetricToTable(tmk, info.MetricInfo)\n\n\ts.writeHTML(w, tmk.html())\n}\n\nfunc (s *Server) PeerListHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tincludeDisconnected := r.URL.Query().Get(\"includeDisconnected\") == \"true\"\n\n\tres, err := s.network.ListPeers(ctx,\n\t\t&pactus.ListPeersRequest{\n\t\t\tIncludeDisconnected: includeDisconnected,\n\t\t})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowString(\"Peers\", \"---\")\n\n\tpeers := res.Peers\n\tslices.SortFunc(peers, func(a, b *pactus.PeerInfo) int {\n\t\treturn cmp.Compare(\n\t\t\tb.MetricInfo.TotalReceived.Bundles,\n\t\t\ta.MetricInfo.TotalReceived.Bundles,\n\t\t)\n\t})\n\n\tfor index, peer := range peers {\n\t\ttmk.addRowInt(\"-- Peer #\", index+1)\n\t\ttmk.addRowString(\"Status\", status.Status(peer.Status).String())\n\t\ttmk.addRowString(\"PeerID\", peer.PeerId)\n\t\ttmk.addRowString(\"Services\", service.Services(peer.Services).String())\n\t\ttmk.addRowString(\"Agent\", peer.Agent)\n\t\ttmk.addRowString(\"Moniker\", peer.Moniker)\n\t\ttmk.addRowString(\"Remote Address\", peer.Address)\n\t\ttmk.addRowString(\"Direction\", lp2pnetwork.Direction(peer.Direction).String())\n\t\ttmk.addRowBool(\"OutboundHelloSent\", peer.OutboundHelloSent)\n\t\ttmk.addRowStrings(\"Protocols\", peer.Protocols)\n\t\ttmk.addRowString(\"LastSent\", time.Unix(peer.LastSent, 0).String())\n\t\ttmk.addRowString(\"LastReceived\", time.Unix(peer.LastReceived, 0).String())\n\t\ttmk.addRowBlockHash(\"Last block Hash\", peer.LastBlockHash)\n\t\ttmk.addRowInt(\"Height\", int(peer.Height))\n\t\ttmk.addRowInt(\"TotalSessions\", int(peer.TotalSessions))\n\t\ttmk.addRowInt(\"CompletedSessions\", int(peer.CompletedSessions))\n\n\t\tmetricToTable(tmk, peer.MetricInfo)\n\n\t\tfor _, key := range peer.ConsensusKeys {\n\t\t\tpub, _ := bls.PublicKeyFromString(key)\n\t\t\ttmk.addRowString(\"-- PublicKey\", pub.String())\n\t\t\ttmk.addRowValAddress(\"-- Address\", pub.ValidatorAddress().String())\n\t\t}\n\t}\n\ts.writeHTML(w, tmk.html())\n}\n\nfunc (s *Server) NodeHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tres, err := s.network.GetNodeInfo(ctx,\n\t\t&pactus.GetNodeInfoRequest{})\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttmk := newTableMaker()\n\ttmk.addRowString(\"Peer ID\", res.PeerId)\n\ttmk.addRowString(\"Agent\", res.Agent)\n\ttmk.addRowString(\"Moniker\", res.Moniker)\n\ttmk.addRowTime(\"Started at\", int64(res.StartedAt))\n\ttmk.addRowTime(\"Current time\", int64(res.CurrentTime))\n\ttmk.addRowString(\"Reachability\", res.Reachability)\n\ttmk.addRowFloat64(\"Clock Offset\", res.ClockOffset)\n\ttmk.addRowInt(\"Services\", int(res.Services))\n\ttmk.addRowString(\"Services Names\", res.ServicesNames)\n\n\ttmk.addRowString(\"Connection Info\", \"---\")\n\ttmk.addRowInt(\"-- Total connections\", int(res.ConnectionInfo.Connections))\n\ttmk.addRowInt(\"-- Inbound connections\", int(res.ConnectionInfo.InboundConnections))\n\ttmk.addRowInt(\"-- Outbound connections\", int(res.ConnectionInfo.OutboundConnections))\n\n\ttmk.addRowString(\"Protocols\", \"---\")\n\tfor i, p := range res.Protocols {\n\t\ttmk.addRowString(fmt.Sprint(i), p)\n\t}\n\n\ttmk.addRowString(\"ZeroMQ Publishers\", \"---\")\n\tfor i, p := range res.ZmqPublishers {\n\t\ttmk.addRowString(fmt.Sprint(i), fmt.Sprintf(\"%s, %s, %d\", p.Topic, p.Address, p.Hwm))\n\t}\n\n\ttmk.addRowString(\"Local Addresses\", \"---\")\n\tfor i, la := range res.LocalAddrs {\n\t\ttmk.addRowString(fmt.Sprint(i), la)\n\t}\n\n\ts.writeHTML(w, tmk.html())\n}\n\nfunc metricToTable(tmk *tableMaker, metricInfo *pactus.MetricInfo) {\n\tprintCounter := func(tmk *tableMaker, name string, counterInfo *pactus.CounterInfo) {\n\t\ttmk.addRowString(name,\n\t\t\tfmt.Sprintf(\"[%d, %s]\", counterInfo.Bundles, util.FormatBytesToHumanReadable(counterInfo.Bytes)))\n\t}\n\n\tprintSortedMap := func(tmk *tableMaker, msgCounter map[int32]*pactus.CounterInfo) {\n\t\tkeys := make([]int32, 0, len(msgCounter))\n\t\tfor k := range msgCounter {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\n\t\tslices.SortFunc(keys, func(a, b int32) int {\n\t\t\treturn cmp.Compare(msgCounter[b].Bundles, msgCounter[a].Bundles)\n\t\t})\n\n\t\tfor _, key := range keys {\n\t\t\tprintCounter(tmk, message.Type(key).String(), msgCounter[key])\n\t\t}\n\t}\n\n\tprintCounter(tmk, \"Total Invalid\", metricInfo.TotalInvalid)\n\n\ttmk.addRowString(\"Sent Metric\", \"---\")\n\tprintCounter(tmk, \"Total Sent\", metricInfo.TotalSent)\n\tprintSortedMap(tmk, metricInfo.MessageSent)\n\n\ttmk.addRowString(\"Received Metric\", \"---\")\n\tprintCounter(tmk, \"Total Received\", metricInfo.TotalReceived)\n\tprintSortedMap(tmk, metricInfo.MessageReceived)\n}\n"
  },
  {
    "path": "www/html/network_test.go",
    "content": "package html\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/pactus-project/pactus/version\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestNodeInfo(t *testing.T) {\n\ttd := setup(t)\n\n\tw := httptest.NewRecorder()\n\tr := new(http.Request)\n\n\ttd.httpServer.NodeHandler(w, r)\n\n\tassert.Equal(t, 200, w.Code)\n\tassert.Contains(t, w.Body.String(), version.NodeAgent.String())\n\tassert.Contains(t, w.Body.String(), \"zmq_topic\")\n\n\ttd.StopServers()\n}\n\nfunc TestNetworkInfo(t *testing.T) {\n\ttd := setup(t)\n\n\tw := httptest.NewRecorder()\n\tr, err := http.NewRequestWithContext(t.Context(), http.MethodGet, \"/network/info\", http.NoBody)\n\trequire.NoError(t, err)\n\n\ttd.httpServer.NetworkHandler(w, r)\n\n\tassert.Equal(t, 200, w.Code)\n\tassert.Contains(t, w.Body.String(), \"Network Name\")\n\tassert.Contains(t, w.Body.String(), \"Connected Peers Count\")\n\tassert.Contains(t, w.Body.String(), \"/network/peers\")\n\n\ttd.StopServers()\n}\n\nfunc TestPeerList(t *testing.T) {\n\ttd := setup(t)\n\n\tw := httptest.NewRecorder()\n\tr, err := http.NewRequestWithContext(t.Context(), http.MethodGet, \"/network/peers\", http.NoBody)\n\trequire.NoError(t, err)\n\n\ttd.httpServer.PeerListHandler(w, r)\n\n\tassert.Equal(t, 200, w.Code)\n\tassert.Contains(t, w.Body.String(), \"Peers\")\n\n\ttd.StopServers()\n}\n"
  },
  {
    "path": "www/html/server.go",
    "content": "package html\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/http/pprof\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gorilla/handlers\"\n\t\"github.com/gorilla/mux\"\n\tret \"github.com/grpc-ecosystem/go-grpc-middleware/retry\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/prometheus/client_golang/prometheus/promhttp\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\ntype Server struct {\n\tctx         context.Context\n\tconfig      *Config\n\tlistener    net.Listener\n\tserver      *http.Server\n\tgrpcConn    *grpc.ClientConn\n\tblockchain  pactus.BlockchainClient\n\ttransaction pactus.TransactionClient\n\tnetwork     pactus.NetworkClient\n\trouter      *mux.Router\n\tenableAuth  bool\n\tlogger      *logger.SubLogger\n}\n\n// init disables default pprof handlers registered by importing net/http/pprof.\n// Your pprof is showing (https://mmcloughlin.com/posts/your-pprof-is-showing)\nfunc init() {\n\thttp.DefaultServeMux = http.NewServeMux()\n}\n\nfunc NewServer(ctx context.Context, conf *Config, enableAuth bool) *Server {\n\treturn &Server{\n\t\tctx:        ctx,\n\t\tconfig:     conf,\n\t\tenableAuth: enableAuth,\n\t\tlogger:     logger.NewSubLogger(\"_html\", nil),\n\t}\n}\n\nfunc (s *Server) StartServer(grpcServer string) error {\n\tif !s.config.Enable {\n\t\treturn nil\n\t}\n\n\tdialOpts := make([]grpc.DialOption, 0, 2)\n\tdialOpts = append(dialOpts,\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t\tgrpc.WithUnaryInterceptor(ret.UnaryClientInterceptor()),\n\t)\n\tgrpcConn, err := grpc.NewClient(\n\t\tgrpcServer,\n\t\tdialOpts...,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to dial server: %w\", err)\n\t}\n\n\ts.grpcConn = grpcConn\n\ts.blockchain = pactus.NewBlockchainClient(grpcConn)\n\ts.transaction = pactus.NewTransactionClient(grpcConn)\n\ts.network = pactus.NewNetworkClient(grpcConn)\n\n\ts.router = mux.NewRouter()\n\ts.router.HandleFunc(\"/\", s.RootHandler)\n\ts.router.HandleFunc(\"/blockchain/\", s.BlockchainHandler)\n\ts.router.HandleFunc(\"/committee/\", s.CommitteeHandler)\n\ts.router.HandleFunc(\"/consensus\", s.ConsensusHandler)\n\ts.router.HandleFunc(\"/network/info\", s.NetworkHandler)\n\ts.router.HandleFunc(\"/network/peers\", s.PeerListHandler)\n\ts.router.HandleFunc(\"/node\", s.NodeHandler)\n\ts.router.HandleFunc(\"/block/hash/{hash}\", s.GetBlockByHashHandler)\n\ts.router.HandleFunc(\"/block/height/{height}\", s.GetBlockByHeightHandler)\n\ts.router.HandleFunc(\"/transaction/id/{id}\", s.GetTransactionHandler)\n\ts.router.HandleFunc(\"/txpool\", s.GetTxPoolHandler)\n\ts.router.HandleFunc(\"/account/address/{address}\", s.GetAccountHandler)\n\ts.router.HandleFunc(\"/validator/address/{address}\", s.GetValidatorHandler)\n\ts.router.HandleFunc(\"/validator/number/{number}\", s.GetValidatorByNumberHandler)\n\ts.router.HandleFunc(\"/metrics/prometheus\", promhttp.Handler().ServeHTTP)\n\n\tif s.config.EnablePprof {\n\t\thttp.HandleFunc(\"/debug/pprof/\", pprof.Index)\n\t\thttp.HandleFunc(\"/debug/pprof/profile\", pprof.Profile)\n\t\thttp.HandleFunc(\"/debug/pprof/symbol\", pprof.Symbol)\n\t\thttp.HandleFunc(\"/debug/pprof/trace\", pprof.Trace)\n\t\ts.router.HandleFunc(\"/debug/pprof\", func(w http.ResponseWriter, r *http.Request) {\n\t\t\thttp.Redirect(w, r, \"/debug/pprof/\", http.StatusPermanentRedirect)\n\t\t})\n\t}\n\n\tif s.enableAuth {\n\t\thttp.Handle(\"/\", handlers.RecoveryHandler()(basicAuth(s.router)))\n\t} else {\n\t\thttp.Handle(\"/\", handlers.RecoveryHandler()(s.router))\n\t}\n\n\tlistener, err := util.NetworkListen(s.ctx, \"tcp\", s.config.Listen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.listener = listener\n\ts.server = &http.Server{\n\t\tAddr:              listener.Addr().String(),\n\t\tReadHeaderTimeout: 3 * time.Second,\n\t}\n\n\tgo func() {\n\t\ts.logger.Info(\"HTML server start listening\", \"address\", listener.Addr())\n\t\tif err := s.server.Serve(listener); err != nil {\n\t\t\ts.logger.Debug(\"error on HTML server\", \"error\", err)\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (s *Server) StopServer() {\n\tif s.server != nil {\n\t\t_ = s.server.Shutdown(s.ctx)\n\t\t_ = s.server.Close()\n\t\t_ = s.listener.Close()\n\t}\n\n\tif s.grpcConn != nil {\n\t\t_ = s.grpcConn.Close()\n\t}\n}\n\nfunc (s *Server) RootHandler(w http.ResponseWriter, r *http.Request) {\n\tif s.enableAuth {\n\t\tif _, _, ok := r.BasicAuth(); !ok {\n\t\t\tw.Header().Set(\"WWW-Authenticate\", `Basic realm=\"restricted\", charset=\"UTF-8\"`)\n\t\t\thttp.Error(w, \"unauthorized\", http.StatusUnauthorized)\n\n\t\t\treturn\n\t\t}\n\t}\n\n\tbuf := new(bytes.Buffer)\n\tbuf.WriteString(\"<html><body><br>\")\n\n\terr := s.router.Walk(func(route *mux.Route, _ *mux.Router, _ []*mux.Route) error {\n\t\tpathTemplate, err := route.GetPathTemplate()\n\t\tif err == nil {\n\t\t\tlink := pathTemplate\n\t\t\ti := strings.Index(link, \"{\")\n\t\t\tif i != -1 {\n\t\t\t\tlink = link[0:i]\n\t\t\t}\n\t\t\tfmt.Fprintf(buf, \"<a href=\\\"%s\\\">%s</a></br>\", link, pathTemplate)\n\t\t}\n\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\ts.logger.Error(\"unable to walk through methods\", \"error\", err)\n\n\t\treturn\n\t}\n\n\tbuf.WriteString(\"</body></html>\")\n\ts.writeHTML(w, buf.String())\n}\n\nfunc (s *Server) writeError(w http.ResponseWriter, err error) int {\n\ts.logger.Error(\"an error occurred\", \"error\", err)\n\n\tw.Header().Set(\"Content-Type\", \"text/plain\")\n\tw.WriteHeader(http.StatusBadRequest)\n\tn, _ := io.WriteString(w, err.Error())\n\n\treturn n\n}\n\nfunc (*Server) writeHTML(w http.ResponseWriter, html string) int {\n\tw.Header().Set(\"Content-Type\", \"text/html\")\n\tw.WriteHeader(http.StatusOK)\n\tn, _ := io.WriteString(w, html)\n\n\treturn n\n}\n\ntype tableMaker struct {\n\tw *bytes.Buffer\n}\n\nfunc newTableMaker() *tableMaker {\n\tt := &tableMaker{\n\t\tw: bytes.NewBufferString(\"<table>\"),\n\t}\n\n\treturn t\n}\n\nfunc (t *tableMaker) addRowBlockHash(key, val string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td><a href=\\\"/block/hash/%s\\\">%s</a></td></tr>\", key, val, val)\n}\n\nfunc (t *tableMaker) addRowAccAddress(key, val string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td><a href=\\\"/account/address/%s\\\">%s</a></td></tr>\", key, val, val)\n}\n\nfunc (t *tableMaker) addRowValAddress(key, val string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td><a href=\\\"/validator/address/%s\\\">%s</a></td></tr>\", key, val, val)\n}\n\nfunc (t *tableMaker) addRowTxID(key, val string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td><a href=\\\"/transaction/id/%s\\\">%s</a></td></tr>\", key, val, val)\n}\n\nfunc (t *tableMaker) addRowString(key, val string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%s</td></tr>\", key, val)\n}\n\nfunc (t *tableMaker) addRowStrings(key string, val []string) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%v</td></tr>\", key, strings.Join(val, \",\"))\n}\n\nfunc (t *tableMaker) addRowTime(key string, sec int64) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%s</td></tr>\", key, time.Unix(sec, 0).String())\n}\n\nfunc (t *tableMaker) addRowAmount(key string, amt amount.Amount) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%s</td></tr>\",\n\t\tkey, amt.String())\n}\n\nfunc (t *tableMaker) addRowPower(key string, power int64) {\n\tamt := amount.Amount(power)\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%s</td></tr>\",\n\t\tkey, amt.String())\n}\n\nfunc (t *tableMaker) addRowFloat64(key string, val float64) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%v</td></tr>\", key, val)\n}\n\nfunc (t *tableMaker) addRowInt(key string, val int) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%d</td></tr>\", key, val)\n}\n\nfunc (t *tableMaker) addRowBool(key string, val bool) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%v</td></tr>\", key, val)\n}\n\nfunc (t *tableMaker) addRowInts(key string, vals []int32) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>\", key)\n\tfor _, n := range vals {\n\t\tfmt.Fprintf(t.w, \"%d, \", n)\n\t}\n\tt.w.WriteString(\"</td></tr>\")\n}\n\nfunc (t *tableMaker) addRowDouble(key string, val float64) {\n\tfmt.Fprintf(t.w, \"<tr><td>%s</td><td>%f</td></tr>\", key, val)\n}\n\nfunc (t *tableMaker) html() string {\n\tt.w.WriteString(\"</table>\")\n\n\treturn t.w.String()\n}\n"
  },
  {
    "path": "www/html/transaction.go",
    "content": "package html\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/pactus-project/pactus/types/amount\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n)\n\nfunc (s *Server) GetTransactionHandler(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvars := mux.Vars(r)\n\n\tres, err := s.transaction.GetTransaction(ctx,\n\t\t&pactus.GetTransactionRequest{\n\t\t\tId:        vars[\"id\"],\n\t\t\tVerbosity: pactus.TransactionVerbosity_TRANSACTION_VERBOSITY_INFO,\n\t\t},\n\t)\n\tif err != nil {\n\t\ts.writeError(w, err)\n\n\t\treturn\n\t}\n\n\ttm := newTableMaker()\n\ttxToTable(tm, res.Transaction)\n\ts.writeHTML(w, tm.html())\n}\n\nfunc txToTable(tmk *tableMaker, trx *pactus.TransactionInfo) {\n\tif trx == nil {\n\t\treturn\n\t}\n\ttmk.addRowTxID(\"ID\", trx.Id)\n\ttmk.addRowInt(\"Version\", int(trx.Version))\n\ttmk.addRowInt(\"LockTime\", int(trx.LockTime))\n\ttmk.addRowInt(\"Block Height\", int(trx.BlockHeight))\n\ttmk.addRowBool(\"Confirmed\", trx.Confirmed)\n\ttmk.addRowInt(\"Confirmations\", int(trx.Confirmations))\n\ttmk.addRowAmount(\"Fee\", amount.Amount(trx.Fee))\n\ttmk.addRowString(\"Memo\", trx.Memo)\n\ttmk.addRowString(\"Payload Type\", trx.PayloadType.String())\n\n\tswitch trx.PayloadType {\n\tcase pactus.PayloadType_PAYLOAD_TYPE_TRANSFER:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_Transfer).Transfer\n\t\ttmk.addRowAccAddress(\"Sender\", pld.Sender)\n\t\ttmk.addRowAccAddress(\"Receiver\", pld.Receiver)\n\t\ttmk.addRowAmount(\"Amount\", amount.Amount(pld.Amount))\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_BOND:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_Bond).Bond\n\t\ttmk.addRowAccAddress(\"Sender\", pld.Sender)\n\t\ttmk.addRowValAddress(\"Receiver\", pld.Receiver)\n\t\ttmk.addRowAmount(\"Stake\", amount.Amount(pld.Stake))\n\t\ttmk.addRowBool(\"Is Delegated\", pld.IsDelegated)\n\t\tif pld.IsDelegated {\n\t\t\ttmk.addRowAccAddress(\"Delegate Owner\", pld.DelegateOwner)\n\t\t\ttmk.addRowAmount(\"Delegate Share\", amount.Amount(pld.DelegateShare))\n\t\t\ttmk.addRowInt(\"Delegate Expiry\", int(pld.DelegateExpiry))\n\t\t}\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_SORTITION:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_Sortition).Sortition\n\t\ttmk.addRowValAddress(\"Address\", pld.Address)\n\t\ttmk.addRowString(\"Proof\", pld.Proof)\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_UNBOND:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_Unbond).Unbond\n\t\ttmk.addRowValAddress(\"Validator\", pld.Validator)\n\t\tif pld.DelegateOwner != \"\" {\n\t\t\ttmk.addRowAccAddress(\"Delegate Owner\", pld.DelegateOwner)\n\t\t}\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_WITHDRAW:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_Withdraw).Withdraw\n\t\ttmk.addRowValAddress(\"Sender\", pld.ValidatorAddress)\n\t\ttmk.addRowAccAddress(\"Receiver\", pld.AccountAddress)\n\t\ttmk.addRowAmount(\"Amount\", amount.Amount(pld.Amount))\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_BATCH_TRANSFER:\n\t\tpld := trx.Payload.(*pactus.TransactionInfo_BatchTransfer)\n\t\ttmk.addRowAccAddress(\"Sender\", pld.BatchTransfer.Sender)\n\t\tfor i, recip := range pld.BatchTransfer.Recipients {\n\t\t\ttmk.addRowAccAddress(fmt.Sprintf(\"\\tReceiver [%d]\", i+1), recip.Receiver)\n\t\t\ttmk.addRowAmount(\"\\tAmount\", amount.Amount(recip.Amount))\n\t\t}\n\n\tcase pactus.PayloadType_PAYLOAD_TYPE_UNSPECIFIED:\n\t\ttmk.addRowValAddress(\"error\", \"unknown payload type\")\n\t}\n\tif trx.PublicKey != \"\" {\n\t\ttmk.addRowString(\"PublicKey\", trx.PublicKey)\n\t}\n\tif trx.Signature != \"\" {\n\t\ttmk.addRowString(\"Signature\", trx.Signature)\n\t}\n}\n"
  },
  {
    "path": "www/html/transaction_test.go",
    "content": "package html\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestTransaction(t *testing.T) {\n\ttd := setup(t)\n\n\ttestBlock := td.mockState.TestStore.AddTestBlock(1)\n\ttestTx := testBlock.Transactions()[1]\n\n\tt.Run(\"Shall return a transaction\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\tr = mux.SetURLVars(r, map[string]string{\"id\": testTx.ID().String()})\n\t\ttd.httpServer.GetTransactionHandler(w, r)\n\n\t\tassert.Equal(t, 200, w.Code)\n\t\tassert.Contains(t, w.Body.String(), testTx.Signature().String())\n\t\tassert.Contains(t, w.Body.String(), testTx.Signature().String())\n\t\tfmt.Println(w.Body)\n\t})\n\n\tt.Run(\"Shall return an error\", func(t *testing.T) {\n\t\tw := httptest.NewRecorder()\n\t\tr := new(http.Request)\n\t\ttd.httpServer.GetTransactionHandler(w, r)\n\n\t\tassert.Equal(t, 400, w.Code)\n\t\tfmt.Println(w.Body)\n\t})\n\n\ttd.StopServers()\n}\n"
  },
  {
    "path": "www/http/config.go",
    "content": "package http\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// Config defines parameters for the HTTP server.\ntype Config struct {\n\tEnable     bool   `toml:\"enable\"`\n\tListen     string `toml:\"listen\"`\n\tBasePath   string `toml:\"base_path\"`\n\tEnableCORS bool   `toml:\"enable_cors\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tEnable:     false,\n\t\tListen:     \"\",\n\t\tBasePath:   \"/http\",\n\t\tEnableCORS: false,\n\t}\n}\n\nfunc (*Config) BasicCheck() error {\n\treturn nil\n}\n\nfunc (c *Config) swaggerPattern() string {\n\treturn fmt.Sprintf(\"%sui/\", c.rootPattern())\n}\n\nfunc (c *Config) apiPattern() string {\n\treturn fmt.Sprintf(\"%sapi/\", c.rootPattern())\n}\n\nfunc (c *Config) rootPattern() string {\n\tpath := fmt.Sprintf(\"/%s/\", c.BasePath)\n\tpath = strings.ReplaceAll(path, \"//\", \"/\")\n\tpath = strings.ReplaceAll(path, \"//\", \"/\")\n\n\treturn path\n}\n"
  },
  {
    "path": "www/http/config_test.go",
    "content": "package http\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestHandlerPattern(t *testing.T) {\n\ttests := []struct {\n\t\tbasePath        string\n\t\texpectedRoot    string\n\t\texpectedAPI     string\n\t\texpectedSwagger string\n\t}{\n\t\t{\n\t\t\tbasePath:        \"\",\n\t\t\texpectedRoot:    \"/\",\n\t\t\texpectedAPI:     \"/api/\",\n\t\t\texpectedSwagger: \"/ui/\",\n\t\t},\n\t\t{\n\t\t\tbasePath:        \"/\",\n\t\t\texpectedRoot:    \"/\",\n\t\t\texpectedAPI:     \"/api/\",\n\t\t\texpectedSwagger: \"/ui/\",\n\t\t},\n\t\t{\n\t\t\tbasePath:        \"http\",\n\t\t\texpectedRoot:    \"/http/\",\n\t\t\texpectedAPI:     \"/http/api/\",\n\t\t\texpectedSwagger: \"/http/ui/\",\n\t\t},\n\t\t{\n\t\t\tbasePath:        \"/http\",\n\t\t\texpectedRoot:    \"/http/\",\n\t\t\texpectedAPI:     \"/http/api/\",\n\t\t\texpectedSwagger: \"/http/ui/\",\n\t\t},\n\t\t{\n\t\t\tbasePath:        \"http/\",\n\t\t\texpectedRoot:    \"/http/\",\n\t\t\texpectedAPI:     \"/http/api/\",\n\t\t\texpectedSwagger: \"/http/ui/\",\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tcfg := &Config{\n\t\t\tBasePath: tt.basePath,\n\t\t}\n\n\t\tassert.Equal(t, tt.expectedRoot, cfg.rootPattern())\n\t\tassert.Equal(t, tt.expectedAPI, cfg.apiPattern())\n\t\tassert.Equal(t, tt.expectedSwagger, cfg.swaggerPattern())\n\t}\n}\n"
  },
  {
    "path": "www/http/server.go",
    "content": "package http\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"embed\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\ntype Server struct {\n\tctx      context.Context\n\tconfig   *Config\n\tlistener net.Listener\n\tserver   *http.Server\n\tgrpcConn *grpc.ClientConn\n\tlogger   *logger.SubLogger\n}\n\n//go:embed swagger-ui\nvar swaggerFS embed.FS\n\n// getOpenAPIHandler serves an OpenAPI UI.\nfunc (s *Server) getOpenAPIHandler() (http.Handler, error) {\n\tswaggerTree, err := fs.Sub(swaggerFS, \"swagger-ui\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\thandler := http.FileServer(http.FS(swaggerTree))\n\n\t// Modify basePath in Swagger JSON file\n\torigContent, err := swaggerFS.ReadFile(\"swagger-ui/pactus.swagger.json\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmodifiedContent := bytes.Replace(\n\t\torigContent,\n\t\t[]byte(`\"basePath\": \"/http/api\"`),\n\t\t[]byte(fmt.Sprintf(`\"basePath\": %q`, s.patternToPrefix(s.config.apiPattern()))),\n\t\t1,\n\t)\n\n\thandler = s.changeBasePath(handler, modifiedContent)\n\n\treturn handler, nil\n}\n\nfunc NewServer(ctx context.Context, conf *Config) *Server {\n\treturn &Server{\n\t\tctx:    ctx,\n\t\tconfig: conf,\n\t\tlogger: logger.NewSubLogger(\"_http\", nil),\n\t}\n}\n\nfunc (s *Server) StartServer(grpcAddr string) error {\n\tif !s.config.Enable {\n\t\treturn nil\n\t}\n\n\tgrpcConn, err := grpc.NewClient(\n\t\tgrpcAddr,\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to dial server: %w\", err)\n\t}\n\n\ts.grpcConn = grpcConn\n\n\t// gRPC-Gateway multiplexer\n\tgatewayMux := runtime.NewServeMux()\n\tif err := pactus.RegisterBlockchainHandler(s.ctx, gatewayMux, grpcConn); err != nil {\n\t\treturn err\n\t}\n\tif err := pactus.RegisterTransactionHandler(s.ctx, gatewayMux, grpcConn); err != nil {\n\t\treturn err\n\t}\n\tif err := pactus.RegisterNetworkHandler(s.ctx, gatewayMux, grpcConn); err != nil {\n\t\treturn err\n\t}\n\tif err := pactus.RegisterWalletHandler(s.ctx, gatewayMux, grpcConn); err != nil {\n\t\treturn err\n\t}\n\tif err := pactus.RegisterUtilsHandler(s.ctx, gatewayMux, grpcConn); err != nil {\n\t\treturn err\n\t}\n\n\t// Swagger UI\n\tswaggerHandler, err := s.getOpenAPIHandler()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\thttpMux := http.NewServeMux()\n\n\t// Register gRPC-Gateway Handler at `/http/api`\n\thttpMux.Handle(s.config.apiPattern(),\n\t\thttp.StripPrefix(s.patternToPrefix(s.config.apiPattern()), gatewayMux))\n\n\t// Register Swagger Handler at `/http/ui`\n\thttpMux.Handle(s.config.swaggerPattern(),\n\t\thttp.StripPrefix(s.patternToPrefix(s.config.swaggerPattern()), swaggerHandler))\n\n\t// Redirect `/http` to `/http/ui`\n\thttpMux.HandleFunc(s.config.rootPattern(),\n\t\tfunc(w http.ResponseWriter, r *http.Request) {\n\t\t\thttp.Redirect(w, r, s.config.swaggerPattern(), http.StatusFound)\n\t\t})\n\n\tgwServer := &http.Server{\n\t\tAddr:              s.config.Listen,\n\t\tReadHeaderTimeout: 3 * time.Second,\n\t\tHandler:           httpMux,\n\t}\n\n\tif s.config.EnableCORS {\n\t\tgwServer.Handler = allowCORS(gwServer.Handler)\n\t}\n\n\tlistener, err := util.NetworkListen(s.ctx, \"tcp\", s.config.Listen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.server = gwServer\n\ts.listener = listener\n\n\tgo func() {\n\t\ts.logger.Info(\"HTTP-API server start listening\", \"address\", listener.Addr().String())\n\t\tif err := s.server.Serve(listener); err != nil && err != http.ErrServerClosed {\n\t\t\ts.logger.Debug(\"error on HTTP-API server\", \"error\", err)\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (*Server) changeBasePath(handler http.Handler, modifiedContent []byte) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif r.URL.Path == \"/pactus.swagger.json\" {\n\t\t\tw.Header().Set(\"Content-Type\", \"application/json\")\n\t\t\t_, err := w.Write(modifiedContent)\n\t\t\tif err != nil {\n\t\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\thandler.ServeHTTP(w, r)\n\t\t}\n\t})\n}\n\nfunc (s *Server) StopServer() {\n\tif s.server != nil {\n\t\t_ = s.server.Close()\n\t\t_ = s.listener.Close()\n\t}\n\n\tif s.grpcConn != nil {\n\t\t_ = s.grpcConn.Close()\n\t}\n}\n\n// preflightHandler adds the necessary headers in order to serve\n// CORS from any origin using the methods \"GET\", \"HEAD\", \"POST\", \"PUT\", \"DELETE\"\n// We insist, don't do this without consideration in production systems.\nfunc preflightHandler(w http.ResponseWriter) {\n\theaders := []string{\"Content-Type\", \"Accept\", \"Authorization\"}\n\tw.Header().Set(\"Access-Control-Allow-Headers\", strings.Join(headers, \",\"))\n\tmethods := []string{\"GET\", \"HEAD\", \"POST\", \"PUT\", \"DELETE\"}\n\tw.Header().Set(\"Access-Control-Allow-Methods\", strings.Join(methods, \",\"))\n}\n\n// allowCORS allows Cross Origin Resource Sharing from any origin.\n// Don't do this without consideration in production systems.\nfunc allowCORS(handler http.Handler) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif origin := r.Header.Get(\"Origin\"); origin != \"\" {\n\t\t\tw.Header().Set(\"Access-Control-Allow-Origin\", origin)\n\t\t\tif r.Method == http.MethodOptions && r.Header.Get(\"Access-Control-Request-Method\") != \"\" {\n\t\t\t\tpreflightHandler(w)\n\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\thandler.ServeHTTP(w, r)\n\t})\n}\n\n// patternToPrefix removes the trailing '/' from the given pattern.\n// Example: \"/http/ui/\" becomes \"/http/ui\".\nfunc (*Server) patternToPrefix(pattern string) string {\n\treturn pattern[:len(pattern)-1]\n}\n"
  },
  {
    "path": "www/http/server_test.go",
    "content": "package http\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\n// passThroughHandler is a minimal handler that records that it was called and\n// optionally sets a body so tests can assert whether the CORS wrapper invoked it.\nfunc passThroughHandler(t *testing.T, called *bool) http.Handler {\n\tt.Helper()\n\n\treturn http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {\n\t\tif called != nil {\n\t\t\t*called = true\n\t\t}\n\t\tw.WriteHeader(http.StatusOK)\n\t\t_, err := w.Write([]byte(\"ok\"))\n\t\tassert.NoError(t, err)\n\t})\n}\n\nfunc TestAllowCORS(t *testing.T) {\n\ttests := []struct {\n\t\tname              string\n\t\tmethod            string\n\t\torigin            string\n\t\tpreflightMethod   string\n\t\twantAllowOrigin   string\n\t\twantPreflight     bool\n\t\twantHandlerCalled bool\n\t}{\n\t\t{\n\t\t\tname:              \"SimpleGETWithOriginSetsAllowOrigin\",\n\t\t\tmethod:            http.MethodGet,\n\t\t\torigin:            \"https://example.com\",\n\t\t\twantAllowOrigin:   \"https://example.com\",\n\t\t\twantHandlerCalled: true,\n\t\t},\n\t\t{\n\t\t\tname:              \"SimplePOSTWithOriginSetsAllowOrigin\",\n\t\t\tmethod:            http.MethodPost,\n\t\t\torigin:            \"https://app.example.com\",\n\t\t\twantAllowOrigin:   \"https://app.example.com\",\n\t\t\twantHandlerCalled: true,\n\t\t},\n\t\t{\n\t\t\tname:              \"RequestWithoutOriginGetsNoCORSHeaders\",\n\t\t\tmethod:            http.MethodGet,\n\t\t\torigin:            \"\",\n\t\t\twantAllowOrigin:   \"\",\n\t\t\twantHandlerCalled: true,\n\t\t},\n\t\t{\n\t\t\tname:              \"PreflightOPTIONSSetsPreflightHeaders\",\n\t\t\tmethod:            http.MethodOptions,\n\t\t\torigin:            \"https://example.com\",\n\t\t\tpreflightMethod:   http.MethodPost,\n\t\t\twantAllowOrigin:   \"https://example.com\",\n\t\t\twantPreflight:     true,\n\t\t\twantHandlerCalled: false,\n\t\t},\n\t\t{\n\t\t\tname:              \"OPTIONSWithoutPreflightHeaderFallsThrough\",\n\t\t\tmethod:            http.MethodOptions,\n\t\t\torigin:            \"https://example.com\",\n\t\t\tpreflightMethod:   \"\",\n\t\t\twantAllowOrigin:   \"https://example.com\",\n\t\t\twantPreflight:     false,\n\t\t\twantHandlerCalled: true,\n\t\t},\n\t\t{\n\t\t\tname:              \"PreflightWithoutOriginDoesNothing\",\n\t\t\tmethod:            http.MethodOptions,\n\t\t\torigin:            \"\",\n\t\t\tpreflightMethod:   http.MethodPost,\n\t\t\twantAllowOrigin:   \"\",\n\t\t\twantPreflight:     false,\n\t\t\twantHandlerCalled: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tcalled := false\n\t\t\thandler := allowCORS(passThroughHandler(t, &called))\n\n\t\t\treq := httptest.NewRequestWithContext(\n\t\t\t\tt.Context(),\n\t\t\t\ttt.method,\n\t\t\t\t\"/http/api/blockchain/get_block_hash\",\n\t\t\t\thttp.NoBody,\n\t\t\t)\n\t\t\tif tt.origin != \"\" {\n\t\t\t\treq.Header.Set(\"Origin\", tt.origin)\n\t\t\t}\n\t\t\tif tt.preflightMethod != \"\" {\n\t\t\t\treq.Header.Set(\"Access-Control-Request-Method\", tt.preflightMethod)\n\t\t\t}\n\n\t\t\trec := httptest.NewRecorder()\n\t\t\thandler.ServeHTTP(rec, req)\n\n\t\t\tassert.Equal(t, tt.wantAllowOrigin, rec.Header().Get(\"Access-Control-Allow-Origin\"))\n\t\t\tassert.Equal(t, tt.wantHandlerCalled, called, \"handler invocation expectation mismatch\")\n\n\t\t\tif tt.wantPreflight {\n\t\t\t\tallowHeaders := rec.Header().Get(\"Access-Control-Allow-Headers\")\n\t\t\t\tallowMethods := rec.Header().Get(\"Access-Control-Allow-Methods\")\n\n\t\t\t\tassert.Contains(t, allowHeaders, \"Authorization\")\n\t\t\t\tassert.Contains(t, allowHeaders, \"Content-Type\")\n\t\t\t\tassert.Contains(t, allowHeaders, \"Accept\")\n\n\t\t\t\tfor _, m := range []string{\"GET\", \"HEAD\", \"POST\", \"PUT\", \"DELETE\"} {\n\t\t\t\t\tassert.Contains(t, allowMethods, m, \"preflight missing method %q\", m)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassert.Empty(t, rec.Header().Get(\"Access-Control-Allow-Headers\"))\n\t\t\t\tassert.Empty(t, rec.Header().Get(\"Access-Control-Allow-Methods\"))\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestPreflightHandlerSetsAllMethodsAndHeaders(t *testing.T) {\n\trec := httptest.NewRecorder()\n\tpreflightHandler(rec)\n\n\tallowHeaders := rec.Header().Get(\"Access-Control-Allow-Headers\")\n\tallowMethods := rec.Header().Get(\"Access-Control-Allow-Methods\")\n\n\t// Headers must include everything documented in the preflightHandler comment.\n\tfor _, h := range []string{\"Content-Type\", \"Accept\", \"Authorization\"} {\n\t\tassert.Containsf(t, allowHeaders, h, \"preflight Access-Control-Allow-Headers %q missing %q\", allowHeaders, h)\n\t}\n\n\t// Methods must include everything documented in the preflightHandler comment.\n\tfor _, m := range []string{\"GET\", \"HEAD\", \"POST\", \"PUT\", \"DELETE\"} {\n\t\tassert.Containsf(t, allowMethods, m, \"preflight Access-Control-Allow-Methods %q missing %q\", allowMethods, m)\n\t}\n}\n"
  },
  {
    "path": "www/http/swagger-ui/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "www/http/swagger-ui/README.md",
    "content": "# Swagger UI\n\nThis directory contains HTML, Javascript, and CSS assets\nthat dynamically generate Swagger documentation from a\n[OpenAPI Specification Version 2.0](https://swagger.io/docs/specification/2-0/basic-structure/).\nThat file is auto-generated by running `make proto` in the root\nof this repository. The static assets are copied from the\n[dist folder](https://github.com/swagger-api/swagger-ui/tree/master/dist).\nAfter copying, [`swagger-initializer.js`](./swagger-initializer.js)\nis edited to load the swagger file from the local server instead of the default petstore.\n\nSwaggerUI is licensed under Apache 2.0 license.\n"
  },
  {
    "path": "www/http/swagger-ui/index.css",
    "content": "html {\n    box-sizing: border-box;\n    overflow: -moz-scrollbars-vertical;\n    overflow-y: scroll;\n}\n\n*,\n*:before,\n*:after {\n    box-sizing: inherit;\n}\n\nbody {\n    margin: 0;\n    background: #fafafa;\n}\n"
  },
  {
    "path": "www/http/swagger-ui/index.html",
    "content": "<!-- HTML for static distribution bundle build -->\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Swagger UI</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"./swagger-ui.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"index.css\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"./favicon-32x32.png\" sizes=\"32x32\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"./favicon-16x16.png\" sizes=\"16x16\" />\n  </head>\n\n  <body>\n    <div id=\"swagger-ui\"></div>\n    <script src=\"./swagger-ui-bundle.js\" charset=\"UTF-8\"> </script>\n    <script src=\"./swagger-ui-standalone-preset.js\" charset=\"UTF-8\"> </script>\n    <script src=\"./swagger-initializer.js\" charset=\"UTF-8\"> </script>\n  </body>\n</html>\n"
  },
  {
    "path": "www/http/swagger-ui/oauth2-redirect.html",
    "content": "<!doctype html>\n<html lang=\"en-US\">\n<head>\n    <title>Swagger UI: OAuth2 Redirect</title>\n</head>\n<body>\n<script>\n    'use strict';\n    function run () {\n        var oauth2 = window.opener.swaggerUIRedirectOauth2;\n        var sentState = oauth2.state;\n        var redirectUrl = oauth2.redirectUrl;\n        var isValid, qp, arr;\n\n        if (/code|token|error/.test(window.location.hash)) {\n            qp = window.location.hash.substring(1).replace('?', '&');\n        } else {\n            qp = location.search.substring(1);\n        }\n\n        arr = qp.split(\"&\");\n        arr.forEach(function (v,i,_arr) { _arr[i] = '\"' + v.replace('=', '\":\"') + '\"';});\n        qp = qp ? JSON.parse('{' + arr.join() + '}',\n                function (key, value) {\n                    return key === \"\" ? value : decodeURIComponent(value);\n                }\n        ) : {};\n\n        isValid = qp.state === sentState;\n\n        if ((\n          oauth2.auth.schema.get(\"flow\") === \"accessCode\" ||\n          oauth2.auth.schema.get(\"flow\") === \"authorizationCode\" ||\n          oauth2.auth.schema.get(\"flow\") === \"authorization_code\"\n        ) && !oauth2.auth.code) {\n            if (!isValid) {\n                oauth2.errCb({\n                    authId: oauth2.auth.name,\n                    source: \"auth\",\n                    level: \"warning\",\n                    message: \"Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server.\"\n                });\n            }\n\n            if (qp.code) {\n                delete oauth2.state;\n                oauth2.auth.code = qp.code;\n                oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});\n            } else {\n                let oauthErrorMsg;\n                if (qp.error) {\n                    oauthErrorMsg = \"[\"+qp.error+\"]: \" +\n                        (qp.error_description ? qp.error_description+ \". \" : \"no accessCode received from the server. \") +\n                        (qp.error_uri ? \"More info: \"+qp.error_uri : \"\");\n                }\n\n                oauth2.errCb({\n                    authId: oauth2.auth.name,\n                    source: \"auth\",\n                    level: \"error\",\n                    message: oauthErrorMsg || \"[Authorization failed]: no accessCode received from the server.\"\n                });\n            }\n        } else {\n            oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});\n        }\n        window.close();\n    }\n\n    if (document.readyState !== 'loading') {\n        run();\n    } else {\n        document.addEventListener('DOMContentLoaded', function () {\n            run();\n        });\n    }\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "www/http/swagger-ui/pactus.swagger.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"Pactus APIs\",\n    \"description\": \"Every node in the Pactus network can be configured to expose HTTP-APIs for communication.\\nThese APIs follow the [OpenAPI (Swagger)](https://swagger.io/specification/) specification, and a complete list of available endpoints can be found here.\\n\\n## Units\\n\\nAll the amounts are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain.\\nEach PAC is equivalent to 1,000,000,000 or 10\\u003csup\\u003e9\\u003c/sup\\u003e NanoPACs.\\n\",\n    \"version\": \"2.0\",\n    \"contact\": {\n      \"name\": \"Pactus Blockchain\",\n      \"url\": \"https://pactus.org\"\n    },\n    \"license\": {\n      \"name\": \"MIT License\",\n      \"url\": \"https://github.com/pactus-project/pactus/blob/main/LICENSE\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"Transaction\"\n    },\n    {\n      \"name\": \"Blockchain\"\n    },\n    {\n      \"name\": \"Network\"\n    },\n    {\n      \"name\": \"Utils\"\n    },\n    {\n      \"name\": \"Wallet\"\n    }\n  ],\n  \"basePath\": \"/http/api\",\n  \"schemes\": [\n    \"http\",\n    \"https\"\n  ],\n  \"consumes\": [\n    \"application/json\"\n  ],\n  \"produces\": [\n    \"application/json\"\n  ],\n  \"paths\": {\n    \"/pactus/Utils/public_key_aggregation\": {\n      \"post\": {\n        \"summary\": \"PublicKeyAggregation aggregates multiple BLS public keys into a single key.\",\n        \"operationId\": \"Utils_PublicKeyAggregation\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusPublicKeyAggregationResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for aggregating multiple BLS public keys.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusPublicKeyAggregationRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Utils\"\n        ]\n      }\n    },\n    \"/pactus/Utils/sign_message_with_private_key\": {\n      \"post\": {\n        \"summary\": \"SignMessageWithPrivateKey signs a message with the provided private key.\",\n        \"operationId\": \"Utils_SignMessageWithPrivateKey\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignMessageWithPrivateKeyResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for signing a message with a private key.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignMessageWithPrivateKeyRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Utils\"\n        ]\n      }\n    },\n    \"/pactus/Utils/signature_aggregation\": {\n      \"post\": {\n        \"summary\": \"SignatureAggregation aggregates multiple BLS signatures into a single signature.\",\n        \"operationId\": \"Utils_SignatureAggregation\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignatureAggregationResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for aggregating multiple BLS signatures.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignatureAggregationRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Utils\"\n        ]\n      }\n    },\n    \"/pactus/Utils/verify_message\": {\n      \"post\": {\n        \"summary\": \"VerifyMessage verifies a signature against the public key and message.\",\n        \"operationId\": \"Utils_VerifyMessage\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusVerifyMessageResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for verifying a message signature.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusVerifyMessageRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Utils\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_account\": {\n      \"get\": {\n        \"summary\": \"GetAccount retrieves information about an account based on the provided address.\",\n        \"operationId\": \"Blockchain_GetAccount\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetAccountResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"address\",\n            \"description\": \"The address of the account to retrieve information for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_block\": {\n      \"get\": {\n        \"summary\": \"GetBlock retrieves information about a block based on the provided request parameters.\",\n        \"operationId\": \"Blockchain_GetBlock\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetBlockResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"height\",\n            \"description\": \"The height of the block to retrieve.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          {\n            \"name\": \"verbosity\",\n            \"description\": \"The verbosity level for block information.\\n\\n - BLOCK_VERBOSITY_DATA: Request only block data.\\n - BLOCK_VERBOSITY_INFO: Request block information and transaction IDs.\\n - BLOCK_VERBOSITY_TRANSACTIONS: Request block information and detailed transaction data.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"enum\": [\n              \"BLOCK_VERBOSITY_DATA\",\n              \"BLOCK_VERBOSITY_INFO\",\n              \"BLOCK_VERBOSITY_TRANSACTIONS\"\n            ],\n            \"default\": \"BLOCK_VERBOSITY_DATA\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_block_hash\": {\n      \"get\": {\n        \"summary\": \"GetBlockHash retrieves the hash of a block at the specified height.\",\n        \"operationId\": \"Blockchain_GetBlockHash\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetBlockHashResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"height\",\n            \"description\": \"The height of the block to retrieve the hash for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_block_height\": {\n      \"get\": {\n        \"summary\": \"GetBlockHeight retrieves the height of a block with the specified hash.\",\n        \"operationId\": \"Blockchain_GetBlockHeight\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetBlockHeightResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"hash\",\n            \"description\": \"The hash of the block to retrieve the height for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_blockchain_info\": {\n      \"get\": {\n        \"summary\": \"GetBlockchainInfo retrieves general information about the blockchain.\",\n        \"operationId\": \"Blockchain_GetBlockchainInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetBlockchainInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_committee_info\": {\n      \"get\": {\n        \"summary\": \"GetCommitteeInfo retrieves information about the current committee.\",\n        \"operationId\": \"Blockchain_GetCommitteeInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetCommitteeInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_consensus_info\": {\n      \"get\": {\n        \"summary\": \"GetConsensusInfo retrieves information about the consensus instances.\",\n        \"operationId\": \"Blockchain_GetConsensusInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetConsensusInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_public_key\": {\n      \"get\": {\n        \"summary\": \"GetPublicKey retrieves the public key of an account based on the provided address.\",\n        \"operationId\": \"Blockchain_GetPublicKey\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetPublicKeyResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"address\",\n            \"description\": \"The address for which to retrieve the public key.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_txpool_content\": {\n      \"get\": {\n        \"summary\": \"GetTxPoolContent retrieves current transactions in the transaction pool.\",\n        \"operationId\": \"Blockchain_GetTxPoolContent\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetTxPoolContentResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"payloadType\",\n            \"description\": \"The type of transactions to retrieve from the transaction pool. 0 means all types.\\n\\n - PAYLOAD_TYPE_UNSPECIFIED: Unspecified payload type.\\n - PAYLOAD_TYPE_TRANSFER: Transfer payload type.\\n - PAYLOAD_TYPE_BOND: Bond payload type.\\n - PAYLOAD_TYPE_SORTITION: Sortition payload type.\\n - PAYLOAD_TYPE_UNBOND: Unbond payload type.\\n - PAYLOAD_TYPE_WITHDRAW: Withdraw payload type.\\n - PAYLOAD_TYPE_BATCH_TRANSFER: Batch transfer payload type.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"enum\": [\n              \"PAYLOAD_TYPE_UNSPECIFIED\",\n              \"PAYLOAD_TYPE_TRANSFER\",\n              \"PAYLOAD_TYPE_BOND\",\n              \"PAYLOAD_TYPE_SORTITION\",\n              \"PAYLOAD_TYPE_UNBOND\",\n              \"PAYLOAD_TYPE_WITHDRAW\",\n              \"PAYLOAD_TYPE_BATCH_TRANSFER\"\n            ],\n            \"default\": \"PAYLOAD_TYPE_UNSPECIFIED\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_validator\": {\n      \"get\": {\n        \"summary\": \"GetValidator retrieves information about a validator based on the provided address.\",\n        \"operationId\": \"Blockchain_GetValidator\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetValidatorResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"address\",\n            \"description\": \"The address of the validator to retrieve information for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_validator_addresses\": {\n      \"get\": {\n        \"summary\": \"GetValidatorAddresses retrieves a list of all validator addresses.\",\n        \"operationId\": \"Blockchain_GetValidatorAddresses\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetValidatorAddressesResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/blockchain/get_validator_by_number\": {\n      \"get\": {\n        \"summary\": \"GetValidatorByNumber retrieves information about a validator based on the provided number.\",\n        \"operationId\": \"Blockchain_GetValidatorByNumber\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetValidatorResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"number\",\n            \"description\": \"The unique number of the validator to retrieve information for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        ],\n        \"tags\": [\n          \"Blockchain\"\n        ]\n      }\n    },\n    \"/pactus/network/get_network_info\": {\n      \"get\": {\n        \"summary\": \"GetNetworkInfo retrieves information about the overall network.\",\n        \"operationId\": \"Network_GetNetworkInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetNetworkInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Network\"\n        ]\n      }\n    },\n    \"/pactus/network/get_node_info\": {\n      \"get\": {\n        \"summary\": \"GetNodeInfo retrieves information about a specific node in the network.\",\n        \"operationId\": \"Network_GetNodeInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetNodeInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Network\"\n        ]\n      }\n    },\n    \"/pactus/network/ping\": {\n      \"get\": {\n        \"summary\": \"Ping provides a simple connectivity test and latency measurement.\",\n        \"operationId\": \"Network_Ping\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusPingResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Network\"\n        ]\n      }\n    },\n    \"/pactus/transaction/broadcast_transaction\": {\n      \"post\": {\n        \"summary\": \"BroadcastTransaction broadcasts a signed transaction to the network.\",\n        \"operationId\": \"Transaction_BroadcastTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusBroadcastTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for broadcasting a signed transaction to the network.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusBroadcastTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/calculate_fee\": {\n      \"post\": {\n        \"summary\": \"CalculateFee calculates the transaction fee based on the specified amount and payload type.\",\n        \"operationId\": \"Transaction_CalculateFee\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusCalculateFeeResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for calculating transaction fee.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusCalculateFeeRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/decode_raw_transaction\": {\n      \"post\": {\n        \"summary\": \"DecodeRawTransaction accepts raw transaction and returns decoded transaction.\",\n        \"operationId\": \"Transaction_DecodeRawTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusDecodeRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for decoding a raw transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusDecodeRawTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_raw_batch_transfer_transaction\": {\n      \"post\": {\n        \"summary\": \"GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.\",\n        \"operationId\": \"Transaction_GetRawBatchTransferTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for retrieving raw details of a batch transfer transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawBatchTransferTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_raw_bond_transaction\": {\n      \"post\": {\n        \"summary\": \"GetRawBondTransaction retrieves raw details of a bond transaction.\",\n        \"operationId\": \"Transaction_GetRawBondTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for retrieving raw details of a bond transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawBondTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_raw_transfer_transaction\": {\n      \"post\": {\n        \"summary\": \"GetRawTransferTransaction retrieves raw details of a transfer transaction.\",\n        \"operationId\": \"Transaction_GetRawTransferTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for retrieving raw details of a transfer transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransferTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_raw_unbond_transaction\": {\n      \"post\": {\n        \"summary\": \"GetRawUnbondTransaction retrieves raw details of an unbond transaction.\",\n        \"operationId\": \"Transaction_GetRawUnbondTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for retrieving raw details of an unbond transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawUnbondTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_raw_withdraw_transaction\": {\n      \"post\": {\n        \"summary\": \"GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\",\n        \"operationId\": \"Transaction_GetRawWithdrawTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for retrieving raw details of a withdraw transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetRawWithdrawTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/transaction/get_transaction\": {\n      \"get\": {\n        \"summary\": \"GetTransaction retrieves transaction details based on the provided request parameters.\",\n        \"operationId\": \"Transaction_GetTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"id\",\n            \"description\": \"The unique ID of the transaction to retrieve.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"verbosity\",\n            \"description\": \"The verbosity level for transaction details.\\n\\n - TRANSACTION_VERBOSITY_DATA: Request transaction data only.\\n - TRANSACTION_VERBOSITY_INFO: Request detailed transaction information.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"enum\": [\n              \"TRANSACTION_VERBOSITY_DATA\",\n              \"TRANSACTION_VERBOSITY_INFO\"\n            ],\n            \"default\": \"TRANSACTION_VERBOSITY_DATA\"\n          }\n        ],\n        \"tags\": [\n          \"Transaction\"\n        ]\n      }\n    },\n    \"/pactus/wallet/create_wallet\": {\n      \"post\": {\n        \"summary\": \"CreateWallet creates a new wallet with the specified parameters.\",\n        \"operationId\": \"Wallet_CreateWallet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusCreateWalletResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for creating a new wallet.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusCreateWalletRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_address_info\": {\n      \"get\": {\n        \"summary\": \"GetAddressInfo returns detailed information about a specific address.\",\n        \"operationId\": \"Wallet_GetAddressInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetAddressInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet containing the address.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"address\",\n            \"description\": \"The address to query.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_new_address\": {\n      \"post\": {\n        \"summary\": \"GetNewAddress generates a new address for the specified wallet.\",\n        \"operationId\": \"Wallet_GetNewAddress\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetNewAddressResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for generating a new wallet address.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetNewAddressRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_total_balance\": {\n      \"get\": {\n        \"summary\": \"GetTotalBalance returns the total available balance of the wallet.\",\n        \"operationId\": \"Wallet_GetTotalBalance\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetTotalBalanceResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet to get the total balance.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_total_stake\": {\n      \"get\": {\n        \"summary\": \"GetTotalStake returns the total stake amount in the wallet.\",\n        \"operationId\": \"Wallet_GetTotalStake\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetTotalStakeResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet to get the total stake.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_validator_address\": {\n      \"get\": {\n        \"summary\": \"GetValidatorAddress retrieves the validator address associated with a public key.\\nDeprecated: Will move into utils.\",\n        \"operationId\": \"Wallet_GetValidatorAddress\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetValidatorAddressResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"publicKey\",\n            \"description\": \"The public key of the validator.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/get_wallet_info\": {\n      \"get\": {\n        \"summary\": \"GetWalletInfo returns detailed information about a specific wallet.\",\n        \"operationId\": \"Wallet_GetWalletInfo\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusGetWalletInfoResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet to query.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/list_addresses\": {\n      \"get\": {\n        \"summary\": \"ListAddresses returns all addresses in the specified wallet.\",\n        \"operationId\": \"Wallet_ListAddresses\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusListAddressesResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the queried wallet.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"addressTypes\",\n            \"description\": \"Filter addresses by their types. If empty, all address types are included.\\n\\n - ADDRESS_TYPE_TREASURY: Treasury address type.\\nShould not be used to generate new addresses.\\n - ADDRESS_TYPE_VALIDATOR: Validator address type used for validator nodes.\\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme.\\n - ADDRESS_TYPE_ED25519_ACCOUNT: Account address type with Ed25519 signature scheme.\\nNote: Generating a new Ed25519 address requires the wallet password.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"ADDRESS_TYPE_TREASURY\",\n                \"ADDRESS_TYPE_VALIDATOR\",\n                \"ADDRESS_TYPE_BLS_ACCOUNT\",\n                \"ADDRESS_TYPE_ED25519_ACCOUNT\"\n              ]\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/list_transactions\": {\n      \"get\": {\n        \"summary\": \"ListTransactions returns a list of transactions for a wallet,\\noptionally filtered by a specific address, with pagination support.\",\n        \"operationId\": \"Wallet_ListTransactions\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusListTransactionsResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet to query transactions for.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"address\",\n            \"description\": \"Optional: The address to filter transactions.\\nIf empty or set to '*', transactions for all addresses in the wallet are included.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"direction\",\n            \"description\": \"Filter transactions by direction relative to the wallet.\\nDefaults to any direction if not set.\\n\\n - TX_DIRECTION_ANY: include both incoming and outgoing transactions.\\n - TX_DIRECTION_INCOMING: Include only incoming transactions where the wallet receives funds.\\n - TX_DIRECTION_OUTGOING: Include only outgoing transactions where the wallet sends funds.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\",\n            \"enum\": [\n              \"TX_DIRECTION_ANY\",\n              \"TX_DIRECTION_INCOMING\",\n              \"TX_DIRECTION_OUTGOING\"\n            ],\n            \"default\": \"TX_DIRECTION_ANY\"\n          },\n          {\n            \"name\": \"count\",\n            \"description\": \"Optional: The maximum number of transactions to return.\\nDefaults to 10 if not set.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          {\n            \"name\": \"skip\",\n            \"description\": \"Optional: The number of transactions to skip (for pagination).\\nDefaults to 0 if not set.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/list_wallets\": {\n      \"get\": {\n        \"summary\": \"ListWallets returns a list of all available wallets.\",\n        \"operationId\": \"Wallet_ListWallets\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusListWalletsResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/load_wallet\": {\n      \"post\": {\n        \"summary\": \"LoadWallet loads an existing wallet with the given name.\\ndeprecated: It will be removed in a future version.\",\n        \"operationId\": \"Wallet_LoadWallet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusLoadWalletResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for loading an existing wallet.\\nDeprecated: It will be removed in a future version.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusLoadWalletRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/restore_wallet\": {\n      \"post\": {\n        \"summary\": \"RestoreWallet restores an existing wallet with the given mnemonic.\",\n        \"operationId\": \"Wallet_RestoreWallet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusRestoreWalletResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for restoring a wallet from mnemonic (seed phrase).\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusRestoreWalletRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/set_address_label\": {\n      \"patch\": {\n        \"summary\": \"SetAddressLabel sets or updates the label for a given address.\",\n        \"operationId\": \"Wallet_SetAddressLabel\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSetAddressLabelResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"walletName\",\n            \"description\": \"The name of the wallet containing the address.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"password\",\n            \"description\": \"Wallet password required for modification.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"address\",\n            \"description\": \"The address to label.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"name\": \"label\",\n            \"description\": \"The new label for the address.\",\n            \"in\": \"query\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/sign_message\": {\n      \"post\": {\n        \"summary\": \"SignMessage signs an arbitrary message using a wallet's private key.\",\n        \"operationId\": \"Wallet_SignMessage\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignMessageResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message to sign an arbitrary message.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignMessageRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/sign_raw_transaction\": {\n      \"post\": {\n        \"summary\": \"SignRawTransaction signs a raw transaction for a specified wallet.\",\n        \"operationId\": \"Wallet_SignRawTransaction\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignRawTransactionResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for signing a raw transaction.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusSignRawTransactionRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/unload_wallet\": {\n      \"post\": {\n        \"summary\": \"UnloadWallet unloads a currently loaded wallet with the specified name.\\ndeprecated: It will be removed in a future version.\",\n        \"operationId\": \"Wallet_UnloadWallet\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusUnloadWalletResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for unloading a wallet.\\nDeprecated: It will be removed in a future version.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusUnloadWalletRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    },\n    \"/pactus/wallet/update_password\": {\n      \"post\": {\n        \"summary\": \"UpdatePassword updates the password of an existing wallet.\",\n        \"operationId\": \"Wallet_UpdatePassword\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A successful response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusUpdatePasswordResponse\"\n            }\n          },\n          \"default\": {\n            \"description\": \"An unexpected error response.\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/rpcStatus\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"name\": \"body\",\n            \"description\": \"Request message for updating wallet password.\",\n            \"in\": \"body\",\n            \"required\": true,\n            \"schema\": {\n              \"$ref\": \"#/definitions/pactusUpdatePasswordRequest\"\n            }\n          }\n        ],\n        \"tags\": [\n          \"Wallet\"\n        ]\n      }\n    }\n  },\n  \"definitions\": {\n    \"pactusAccountInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"hash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the account.\"\n        },\n        \"data\": {\n          \"type\": \"string\",\n          \"description\": \"The serialized data of the account.\"\n        },\n        \"number\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The unique number assigned to the account.\"\n        },\n        \"balance\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The balance of the account in NanoPAC.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the account.\"\n        }\n      },\n      \"description\": \"Message contains information about an account.\"\n    },\n    \"pactusAddressInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address string.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key associated with the address.\"\n        },\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"A human-readable label associated with the address.\"\n        },\n        \"path\": {\n          \"type\": \"string\",\n          \"description\": \"The Hierarchical Deterministic (HD) path of the address within the wallet.\"\n        }\n      },\n      \"description\": \"AddressInfo contains detailed information about a wallet address.\"\n    },\n    \"pactusAddressType\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"ADDRESS_TYPE_TREASURY\",\n        \"ADDRESS_TYPE_VALIDATOR\",\n        \"ADDRESS_TYPE_BLS_ACCOUNT\",\n        \"ADDRESS_TYPE_ED25519_ACCOUNT\"\n      ],\n      \"default\": \"ADDRESS_TYPE_TREASURY\",\n      \"description\": \"AddressType defines different types of blockchain addresses.\\n\\n - ADDRESS_TYPE_TREASURY: Treasury address type.\\nShould not be used to generate new addresses.\\n - ADDRESS_TYPE_VALIDATOR: Validator address type used for validator nodes.\\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme.\\n - ADDRESS_TYPE_ED25519_ACCOUNT: Account address type with Ed25519 signature scheme.\\nNote: Generating a new Ed25519 address requires the wallet password.\"\n    },\n    \"pactusBlockHeaderInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"version\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The version of the block.\"\n        },\n        \"prevBlockHash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the previous block.\"\n        },\n        \"stateRoot\": {\n          \"type\": \"string\",\n          \"description\": \"The state root hash of the blockchain.\"\n        },\n        \"sortitionSeed\": {\n          \"type\": \"string\",\n          \"description\": \"The sortition seed of the block.\"\n        },\n        \"proposerAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the proposer of the block.\"\n        }\n      },\n      \"description\": \"Message contains information about the header of a block.\"\n    },\n    \"pactusBlockVerbosity\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"BLOCK_VERBOSITY_DATA\",\n        \"BLOCK_VERBOSITY_INFO\",\n        \"BLOCK_VERBOSITY_TRANSACTIONS\"\n      ],\n      \"default\": \"BLOCK_VERBOSITY_DATA\",\n      \"description\": \"Enumeration for verbosity levels when requesting block information.\\n\\n - BLOCK_VERBOSITY_DATA: Request only block data.\\n - BLOCK_VERBOSITY_INFO: Request block information and transaction IDs.\\n - BLOCK_VERBOSITY_TRANSACTIONS: Request block information and detailed transaction data.\"\n    },\n    \"pactusBroadcastTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"signedRawTransaction\": {\n          \"type\": \"string\",\n          \"description\": \"The signed raw transaction data to be broadcasted.\"\n        }\n      },\n      \"description\": \"Request message for broadcasting a signed transaction to the network.\"\n    },\n    \"pactusBroadcastTransactionResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"string\",\n          \"description\": \"The unique ID of the broadcasted transaction.\"\n        }\n      },\n      \"description\": \"Response message contains the ID of the broadcasted transaction.\"\n    },\n    \"pactusCalculateFeeRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The amount involved in the transaction, specified in NanoPAC.\"\n        },\n        \"payloadType\": {\n          \"$ref\": \"#/definitions/pactusPayloadType\",\n          \"description\": \"The type of transaction payload.\"\n        },\n        \"fixedAmount\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates if the amount should be fixed and include the fee.\"\n        }\n      },\n      \"description\": \"Request message for calculating transaction fee.\"\n    },\n    \"pactusCalculateFeeResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The calculated amount in NanoPAC.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The calculated transaction fee in NanoPAC.\"\n        }\n      },\n      \"description\": \"Response message contains the calculated transaction fee.\"\n    },\n    \"pactusCertificateInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"hash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the certificate.\"\n        },\n        \"round\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The round of the certificate.\"\n        },\n        \"committers\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"description\": \"List of committers in the certificate.\"\n        },\n        \"absentees\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"description\": \"List of absentees in the certificate.\"\n        },\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The signature of the certificate.\"\n        }\n      },\n      \"description\": \"Message contains information about a certificate.\"\n    },\n    \"pactusConnectionInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"connections\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Total number of connections.\"\n        },\n        \"inboundConnections\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Number of inbound connections.\"\n        },\n        \"outboundConnections\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Number of outbound connections.\"\n        }\n      },\n      \"description\": \"ConnectionInfo contains information about the node's connections.\"\n    },\n    \"pactusConsensusInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the consensus instance.\"\n        },\n        \"active\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates whether the consensus instance is active and part of the committee.\"\n        },\n        \"height\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the consensus instance.\"\n        },\n        \"round\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The round of the consensus instance.\"\n        },\n        \"votes\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusVoteInfo\"\n          },\n          \"description\": \"List of votes in the consensus instance.\"\n        }\n      },\n      \"description\": \"Message contains information about a consensus instance.\"\n    },\n    \"pactusCounterInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"bytes\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Total number of bytes.\"\n        },\n        \"bundles\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Total number of bundles.\"\n        }\n      },\n      \"description\": \"CounterInfo holds counter data regarding byte and bundle counts.\"\n    },\n    \"pactusCreateWalletRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name for the new wallet.\"\n        },\n        \"password\": {\n          \"type\": \"string\",\n          \"description\": \"Password to secure the new wallet.\"\n        }\n      },\n      \"description\": \"Request message for creating a new wallet.\"\n    },\n    \"pactusCreateWalletResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name for the new wallet.\"\n        },\n        \"mnemonic\": {\n          \"type\": \"string\",\n          \"description\": \"The mnemonic (seed phrase) for wallet recovery.\"\n        }\n      },\n      \"description\": \"Response message contains wallet recovery mnemonic (seed phrase).\"\n    },\n    \"pactusDecodeRawTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"rawTransaction\": {\n          \"type\": \"string\",\n          \"description\": \"The raw transaction data in hexadecimal format.\"\n        }\n      },\n      \"description\": \"Request message for decoding a raw transaction.\"\n    },\n    \"pactusDecodeRawTransactionResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"transaction\": {\n          \"$ref\": \"#/definitions/pactusTransactionInfo\",\n          \"description\": \"The decoded transaction information.\"\n        }\n      },\n      \"description\": \"Response message contains the decoded transaction.\"\n    },\n    \"pactusGetAccountResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"account\": {\n          \"$ref\": \"#/definitions/pactusAccountInfo\",\n          \"description\": \"Detailed information about the account.\"\n        }\n      },\n      \"description\": \"Response message contains account information.\"\n    },\n    \"pactusGetAddressInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet containing the address.\"\n        },\n        \"addr\": {\n          \"$ref\": \"#/definitions/pactusAddressInfo\",\n          \"description\": \"Detailed information about the address.\"\n        }\n      },\n      \"description\": \"Response message contains address details.\"\n    },\n    \"pactusGetBlockHashResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"hash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the block.\"\n        }\n      },\n      \"description\": \"Response message contains block hash.\"\n    },\n    \"pactusGetBlockHeightResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"height\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the block.\"\n        }\n      },\n      \"description\": \"Response message contains block height.\"\n    },\n    \"pactusGetBlockResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"height\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the block.\"\n        },\n        \"hash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the block.\"\n        },\n        \"data\": {\n          \"type\": \"string\",\n          \"description\": \"Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA.\"\n        },\n        \"blockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The timestamp of the block.\"\n        },\n        \"header\": {\n          \"$ref\": \"#/definitions/pactusBlockHeaderInfo\",\n          \"description\": \"Header information of the block.\"\n        },\n        \"prevCert\": {\n          \"$ref\": \"#/definitions/pactusCertificateInfo\",\n          \"description\": \"Certificate information of the previous block.\"\n        },\n        \"txs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusTransactionInfo\"\n          },\n          \"description\": \"List of transactions in the block, available when verbosity level is set to\\nBLOCK_VERBOSITY_TRANSACTIONS.\"\n        }\n      },\n      \"description\": \"Response message contains block information.\"\n    },\n    \"pactusGetBlockchainInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lastBlockHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the last block in the blockchain.\"\n        },\n        \"lastBlockHash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the last block in the blockchain.\"\n        },\n        \"lastBlockTime\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The timestamp of the last block in Unix format.\"\n        },\n        \"totalAccounts\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The total number of accounts in the blockchain.\"\n        },\n        \"totalValidators\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The total number of validators in the blockchain.\"\n        },\n        \"activeValidators\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The number of active (not unbonded) validators in the blockchain.\"\n        },\n        \"totalPower\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\"\n        },\n        \"committeePower\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The power of the committee.\"\n        },\n        \"isPruned\": {\n          \"type\": \"boolean\",\n          \"description\": \"If the blocks are subject to pruning.\"\n        },\n        \"pruningHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"title\": \"Lowest-height block stored (only present if pruning is enabled)\"\n        },\n        \"inCommittee\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates whether this node participates in consensus: true if at least one\\nof its running validators is a member of the current committee.\"\n        },\n        \"committeeSize\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The number of validators in the current committee.\"\n        },\n        \"averageScore\": {\n          \"type\": \"number\",\n          \"format\": \"double\",\n          \"description\": \"Average availability score of validators with stake, in percentage (0-100).\"\n        }\n      },\n      \"description\": \"Response message contains general blockchain information.\"\n    },\n    \"pactusGetCommitteeInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"committeeSize\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The number of validators in the committee.\"\n        },\n        \"committeePower\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The power of the committee.\"\n        },\n        \"totalPower\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC.\"\n        },\n        \"validators\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusValidatorInfo\"\n          },\n          \"description\": \"List of committee validators.\"\n        },\n        \"protocolVersions\": {\n          \"type\": \"object\",\n          \"additionalProperties\": {\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"description\": \"Map of protocol versions and their percentages in the committee.\"\n        }\n      },\n      \"description\": \"Response message contains committee information.\"\n    },\n    \"pactusGetConsensusInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"proposal\": {\n          \"$ref\": \"#/definitions/pactusProposalInfo\",\n          \"description\": \"The proposal of the consensus info.\"\n        },\n        \"instances\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusConsensusInfo\"\n          },\n          \"description\": \"List of consensus instances.\"\n        }\n      },\n      \"description\": \"Response message contains consensus information.\"\n    },\n    \"pactusGetNetworkInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"networkName\": {\n          \"type\": \"string\",\n          \"description\": \"Name of the P2P network.\"\n        },\n        \"connectedPeersCount\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"Number of connected peers.\"\n        },\n        \"metricInfo\": {\n          \"$ref\": \"#/definitions/pactusMetricInfo\",\n          \"description\": \"Metrics related to node activity.\"\n        }\n      },\n      \"description\": \"Response message contains information about the overall network.\"\n    },\n    \"pactusGetNewAddressRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet to generate a new address.\"\n        },\n        \"addressType\": {\n          \"$ref\": \"#/definitions/pactusAddressType\",\n          \"description\": \"The type of address to generate.\"\n        },\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"A label for the new address.\"\n        },\n        \"password\": {\n          \"type\": \"string\",\n          \"description\": \"Password for the new address. It's required when address_type is Ed25519 type.\"\n        }\n      },\n      \"description\": \"Request message for generating a new wallet address.\"\n    },\n    \"pactusGetNewAddressResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet where address was generated.\"\n        },\n        \"addr\": {\n          \"$ref\": \"#/definitions/pactusAddressInfo\",\n          \"description\": \"Detailed information about the new address.\"\n        }\n      },\n      \"description\": \"Response message contains newly generated address information.\"\n    },\n    \"pactusGetNodeInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"moniker\": {\n          \"type\": \"string\",\n          \"description\": \"Moniker or Human-readable name identifying this node in the network.\"\n        },\n        \"agent\": {\n          \"type\": \"string\",\n          \"description\": \"Version and agent details of the node.\"\n        },\n        \"peerId\": {\n          \"type\": \"string\",\n          \"description\": \"Peer ID of the node.\"\n        },\n        \"startedAt\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Unix timestamp when the node was started (UTC).\"\n        },\n        \"reachability\": {\n          \"type\": \"string\",\n          \"description\": \"Reachability status of the node.\"\n        },\n        \"services\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"Bitfield representing the services provided by the node.\"\n        },\n        \"servicesNames\": {\n          \"type\": \"string\",\n          \"description\": \"Names of services provided by the node.\"\n        },\n        \"localAddrs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"List of addresses associated with the node.\"\n        },\n        \"protocols\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"List of protocols supported by the node.\"\n        },\n        \"clockOffset\": {\n          \"type\": \"number\",\n          \"format\": \"double\",\n          \"description\": \"Offset between the node's clock and the network's clock (in seconds).\"\n        },\n        \"connectionInfo\": {\n          \"$ref\": \"#/definitions/pactusConnectionInfo\",\n          \"description\": \"Information about the node's connections.\"\n        },\n        \"zmqPublishers\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusZMQPublisherInfo\"\n          },\n          \"description\": \"List of active ZeroMQ publishers.\"\n        },\n        \"currentTime\": {\n          \"type\": \"string\",\n          \"format\": \"uint64\",\n          \"description\": \"Current Unix timestamp of the node (UTC).\"\n        },\n        \"networkName\": {\n          \"type\": \"string\",\n          \"description\": \"Name of the P2P network.\"\n        }\n      },\n      \"description\": \"Response message contains information about a specific node in the network.\"\n    },\n    \"pactusGetPublicKeyResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key associated with the provided address.\"\n        }\n      },\n      \"description\": \"Response message contains public key information.\"\n    },\n    \"pactusGetRawBatchTransferTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\"\n        },\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's account address.\"\n        },\n        \"recipients\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusRecipient\"\n          },\n          \"description\": \"The list of recipients with their amounts. Minimum 2 recipients required.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        }\n      },\n      \"description\": \"Request message for retrieving raw details of a batch transfer transaction.\"\n    },\n    \"pactusGetRawBondTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\"\n        },\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's account address.\"\n        },\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's validator address.\"\n        },\n        \"stake\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The stake amount in NanoPAC. Must be greater than 0.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"title\": \"The public key of the validator.\\nOptional, but required when registering a new validator.;\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        },\n        \"delegateOwner\": {\n          \"type\": \"string\",\n          \"title\": \"The address of the delegate owner.\\nOptional, but required when registering a new validator with delegation.;\"\n        },\n        \"delegateShare\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The share percentage for the delegate owner.\\nOptional, but required when registering a new validator with delegation.;\\nMust be between 0 and 0.7 PAC in nano PAC.\"\n        },\n        \"delegateExpiry\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"title\": \"The expiry height for the delegate relationship.\\nOptional, but required when registering a new validator with delegation.;\"\n        }\n      },\n      \"description\": \"Request message for retrieving raw details of a bond transaction.\"\n    },\n    \"pactusGetRawTransactionResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"rawTransaction\": {\n          \"type\": \"string\",\n          \"description\": \"The raw transaction data in hexadecimal format.\"\n        },\n        \"id\": {\n          \"type\": \"string\",\n          \"description\": \"The unique ID of the transaction.\"\n        }\n      },\n      \"description\": \"Response message contains raw transaction data.\"\n    },\n    \"pactusGetRawTransferTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\"\n        },\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's account address.\"\n        },\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's account address.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The amount to be transferred, specified in NanoPAC. Must be greater than 0.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        }\n      },\n      \"description\": \"Request message for retrieving raw details of a transfer transaction.\"\n    },\n    \"pactusGetRawUnbondTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\"\n        },\n        \"validatorAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the validator to unbond from.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        },\n        \"delegateOwner\": {\n          \"type\": \"string\",\n          \"title\": \"The address of the delegate owner.\\nOptional, but required when the validator is a delegated validator.;\"\n        }\n      },\n      \"description\": \"Request message for retrieving raw details of an unbond transaction.\"\n    },\n    \"pactusGetRawWithdrawTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction. If not set, defaults to the last block height.\"\n        },\n        \"validatorAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the validator to withdraw from.\"\n        },\n        \"accountAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the account to withdraw to.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The withdrawal amount in NanoPAC. Must be greater than 0.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The transaction fee in NanoPAC. If not set, it is set to the estimated fee.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        }\n      },\n      \"description\": \"Request message for retrieving raw details of a withdraw transaction.\"\n    },\n    \"pactusGetTotalBalanceResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the queried wallet.\"\n        },\n        \"totalBalance\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The total balance of the wallet in NanoPAC.\"\n        }\n      },\n      \"description\": \"Response message contains the total available balance of the wallet.\"\n    },\n    \"pactusGetTotalStakeResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the queried wallet.\"\n        },\n        \"totalStake\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The total stake amount in NanoPAC.\"\n        }\n      },\n      \"description\": \"Response message contains the total stake of the wallet.\"\n    },\n    \"pactusGetTransactionResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"blockHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the block containing the transaction.\"\n        },\n        \"blockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The UNIX timestamp of the block containing the transaction.\"\n        },\n        \"transaction\": {\n          \"$ref\": \"#/definitions/pactusTransactionInfo\",\n          \"description\": \"Detailed information about the transaction.\"\n        }\n      },\n      \"description\": \"Response message contains details of a transaction.\"\n    },\n    \"pactusGetTxPoolContentResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"txs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusTransactionInfo\"\n          },\n          \"description\": \"List of transactions currently in the pool.\"\n        }\n      },\n      \"description\": \"Response message contains transactions in the transaction pool.\"\n    },\n    \"pactusGetValidatorAddressResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The validator address associated with the public key.\"\n        }\n      },\n      \"description\": \"Response message containing the validator address corresponding to a public key.\"\n    },\n    \"pactusGetValidatorAddressesResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"addresses\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"List of validator addresses.\"\n        }\n      },\n      \"description\": \"Response message contains list of validator addresses.\"\n    },\n    \"pactusGetValidatorResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"validator\": {\n          \"$ref\": \"#/definitions/pactusValidatorInfo\",\n          \"description\": \"Detailed information about the validator.\"\n        }\n      },\n      \"description\": \"Response message contains validator information.\"\n    },\n    \"pactusGetWalletInfoResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet.\"\n        },\n        \"version\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The wallet format version.\"\n        },\n        \"network\": {\n          \"type\": \"string\",\n          \"description\": \"The network the wallet is connected to (e.g., mainnet, testnet).\"\n        },\n        \"encrypted\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates if the wallet is encrypted.\"\n        },\n        \"uuid\": {\n          \"type\": \"string\",\n          \"description\": \"A unique identifier of the wallet.\"\n        },\n        \"createdAt\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"Unix timestamp of wallet creation.\"\n        },\n        \"defaultFee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The default fee of the wallet.\"\n        },\n        \"driver\": {\n          \"type\": \"string\",\n          \"description\": \"The storage driver used by the wallet (e.g., SQLite, Legacy JSON ).\"\n        },\n        \"path\": {\n          \"type\": \"string\",\n          \"description\": \"Path to the wallet file or storage location.\"\n        }\n      },\n      \"description\": \"Response message contains wallet details.\"\n    },\n    \"pactusListAddressesResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the queried wallet.\"\n        },\n        \"addrs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusAddressInfo\"\n          },\n          \"description\": \"List of all addresses in the wallet with their details.\"\n        }\n      },\n      \"description\": \"Response message contains wallet addresses.\"\n    },\n    \"pactusListTransactionsResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet queried.\"\n        },\n        \"txs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusWalletTransactionInfo\"\n          },\n          \"description\": \"List of transactions for the wallet, filtered by the specified address if provided.\"\n        }\n      },\n      \"description\": \"Response message containing a list of transactions.\"\n    },\n    \"pactusListWalletsResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"wallets\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"Array of wallet names.\"\n        }\n      },\n      \"description\": \"Response message contains wallet names.\"\n    },\n    \"pactusLoadWalletRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet to load.\"\n        }\n      },\n      \"description\": \"Request message for loading an existing wallet.\\nDeprecated: It will be removed in a future version.\"\n    },\n    \"pactusLoadWalletResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the loaded wallet.\"\n        }\n      },\n      \"description\": \"Response message confirming wallet loaded.\\nDeprecated: It will be removed in a future version.\"\n    },\n    \"pactusMetricInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"totalInvalid\": {\n          \"$ref\": \"#/definitions/pactusCounterInfo\",\n          \"description\": \"Total number of invalid bundles.\"\n        },\n        \"totalSent\": {\n          \"$ref\": \"#/definitions/pactusCounterInfo\",\n          \"description\": \"Total number of bundles sent.\"\n        },\n        \"totalReceived\": {\n          \"$ref\": \"#/definitions/pactusCounterInfo\",\n          \"description\": \"Total number of bundles received.\"\n        },\n        \"messageSent\": {\n          \"type\": \"object\",\n          \"additionalProperties\": {\n            \"$ref\": \"#/definitions/pactusCounterInfo\"\n          },\n          \"description\": \"Number of sent bundles categorized by message type.\"\n        },\n        \"messageReceived\": {\n          \"type\": \"object\",\n          \"additionalProperties\": {\n            \"$ref\": \"#/definitions/pactusCounterInfo\"\n          },\n          \"description\": \"Number of received bundles categorized by message type.\"\n        }\n      },\n      \"description\": \"MetricInfo contains metrics data regarding network activity.\"\n    },\n    \"pactusPayloadBatchTransfer\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's address.\"\n        },\n        \"recipients\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/pactusRecipient\"\n          },\n          \"description\": \"The list of recipients with their amounts.\"\n        }\n      },\n      \"description\": \"Payload for a batch transfer transaction.\"\n    },\n    \"pactusPayloadBond\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's address.\"\n        },\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's address.\"\n        },\n        \"stake\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The stake amount in NanoPAC.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key of the validator.\"\n        },\n        \"isDelegated\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates whether the bond transaction is a delegation.\"\n        },\n        \"delegateOwner\": {\n          \"type\": \"string\",\n          \"title\": \"The address of the delegate owner.\\nOptional, but required when registering a new validator with delegation.;\"\n        },\n        \"delegateShare\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The share percentage for the delegate owner.\\nOptional, but required when registering a new validator with delegation.;\\nMust be between 0 and 0.7 PAC in nano PAC.\"\n        },\n        \"delegateExpiry\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"title\": \"The expiry height for the delegate relationship.\\nOptional, but required when registering a new validator with delegation.;\"\n        }\n      },\n      \"description\": \"Payload for a bond transaction.\"\n    },\n    \"pactusPayloadSortition\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The validator address associated with the sortition proof.\"\n        },\n        \"proof\": {\n          \"type\": \"string\",\n          \"description\": \"The proof for the sortition.\"\n        }\n      },\n      \"description\": \"Payload for a sortition transaction.\"\n    },\n    \"pactusPayloadTransfer\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's address.\"\n        },\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's address.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The amount to be transferred in NanoPAC.\"\n        }\n      },\n      \"description\": \"Payload for a transfer transaction.\"\n    },\n    \"pactusPayloadType\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"PAYLOAD_TYPE_UNSPECIFIED\",\n        \"PAYLOAD_TYPE_TRANSFER\",\n        \"PAYLOAD_TYPE_BOND\",\n        \"PAYLOAD_TYPE_SORTITION\",\n        \"PAYLOAD_TYPE_UNBOND\",\n        \"PAYLOAD_TYPE_WITHDRAW\",\n        \"PAYLOAD_TYPE_BATCH_TRANSFER\"\n      ],\n      \"default\": \"PAYLOAD_TYPE_UNSPECIFIED\",\n      \"description\": \"Enumeration for different types of transaction payloads.\\n\\n - PAYLOAD_TYPE_UNSPECIFIED: Unspecified payload type.\\n - PAYLOAD_TYPE_TRANSFER: Transfer payload type.\\n - PAYLOAD_TYPE_BOND: Bond payload type.\\n - PAYLOAD_TYPE_SORTITION: Sortition payload type.\\n - PAYLOAD_TYPE_UNBOND: Unbond payload type.\\n - PAYLOAD_TYPE_WITHDRAW: Withdraw payload type.\\n - PAYLOAD_TYPE_BATCH_TRANSFER: Batch transfer payload type.\"\n    },\n    \"pactusPayloadUnbond\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"validator\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the validator to unbond from.\"\n        },\n        \"delegateOwner\": {\n          \"type\": \"string\",\n          \"title\": \"The address of the delegate owner.\\nOptional, but required when the validator is a delegated validator.;\"\n        }\n      },\n      \"description\": \"Payload for an unbond transaction.\"\n    },\n    \"pactusPayloadWithdraw\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"validatorAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the validator to withdraw from.\"\n        },\n        \"accountAddress\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the account to withdraw to.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The withdrawal amount in NanoPAC.\"\n        }\n      },\n      \"description\": \"Payload for a withdraw transaction.\"\n    },\n    \"pactusPingResponse\": {\n      \"type\": \"object\",\n      \"description\": \"Response message for ping - intentionally empty for measuring round-trip time.\\n\\nEmpty response payload for measuring round-trip time\"\n    },\n    \"pactusProposalInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"height\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height of the proposal.\"\n        },\n        \"round\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The round of the proposal.\"\n        },\n        \"blockData\": {\n          \"type\": \"string\",\n          \"description\": \"The block data of the proposal.\"\n        },\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The signature of the proposal, signed by the proposer.\"\n        }\n      },\n      \"description\": \"Message contains information about a proposal.\"\n    },\n    \"pactusPublicKeyAggregationRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"publicKeys\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"List of BLS public keys to be aggregated.\"\n        }\n      },\n      \"description\": \"Request message for aggregating multiple BLS public keys.\"\n    },\n    \"pactusPublicKeyAggregationResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The aggregated BLS public key.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The blockchain address derived from the aggregated public key.\"\n        }\n      },\n      \"description\": \"Response message contains the aggregated BLS public key result.\"\n    },\n    \"pactusRecipient\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's address.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The amount in NanoPAC.\"\n        }\n      },\n      \"description\": \"Recipient is receiver with amount.\"\n    },\n    \"pactusRestoreWalletRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name for the restored wallet.\"\n        },\n        \"mnemonic\": {\n          \"type\": \"string\",\n          \"description\": \"The mnemonic (seed phrase) for wallet recovery.\"\n        },\n        \"password\": {\n          \"type\": \"string\",\n          \"description\": \"Password to secure the restored wallet.\"\n        }\n      },\n      \"description\": \"Request message for restoring a wallet from mnemonic (seed phrase).\"\n    },\n    \"pactusRestoreWalletResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the restored wallet.\"\n        }\n      },\n      \"description\": \"Response message confirming wallet restoration.\"\n    },\n    \"pactusSetAddressLabelResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet where the address label was updated.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address where the label was updated.\"\n        },\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"The new label for the address.\"\n        }\n      },\n      \"description\": \"Response message for updated address label.\"\n    },\n    \"pactusSignMessageRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet to sign with.\"\n        },\n        \"password\": {\n          \"type\": \"string\",\n          \"description\": \"Wallet password required for signing.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address whose private key should be used for signing the message.\"\n        },\n        \"message\": {\n          \"type\": \"string\",\n          \"description\": \"The arbitrary message to be signed.\"\n        }\n      },\n      \"description\": \"Request message to sign an arbitrary message.\"\n    },\n    \"pactusSignMessageResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The signature in hexadecimal format.\"\n        }\n      },\n      \"description\": \"Response message contains message signature.\"\n    },\n    \"pactusSignMessageWithPrivateKeyRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"privateKey\": {\n          \"type\": \"string\",\n          \"description\": \"The private key to sign the message.\"\n        },\n        \"message\": {\n          \"type\": \"string\",\n          \"description\": \"The message content to be signed.\"\n        }\n      },\n      \"description\": \"Request message for signing a message with a private key.\"\n    },\n    \"pactusSignMessageWithPrivateKeyResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The resulting signature in hexadecimal format.\"\n        }\n      },\n      \"description\": \"Response message contains the signature generated from the message.\"\n    },\n    \"pactusSignRawTransactionRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet used for signing.\"\n        },\n        \"rawTransaction\": {\n          \"type\": \"string\",\n          \"description\": \"The raw transaction data to be signed.\"\n        },\n        \"password\": {\n          \"type\": \"string\",\n          \"description\": \"Wallet password required for signing.\"\n        }\n      },\n      \"description\": \"Request message for signing a raw transaction.\"\n    },\n    \"pactusSignRawTransactionResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"transactionId\": {\n          \"type\": \"string\",\n          \"description\": \"The ID of the signed transaction.\"\n        },\n        \"signedRawTransaction\": {\n          \"type\": \"string\",\n          \"description\": \"The signed raw transaction data.\"\n        }\n      },\n      \"description\": \"Response message contains the transaction ID and signed raw transaction.\"\n    },\n    \"pactusSignatureAggregationRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"signatures\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"description\": \"List of BLS signatures to be aggregated.\"\n        }\n      },\n      \"description\": \"Request message for aggregating multiple BLS signatures.\"\n    },\n    \"pactusSignatureAggregationResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The aggregated BLS signature in hexadecimal format.\"\n        }\n      },\n      \"description\": \"Response message contains the aggregated BLS signature.\"\n    },\n    \"pactusTransactionInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"id\": {\n          \"type\": \"string\",\n          \"description\": \"The unique ID of the transaction.\"\n        },\n        \"data\": {\n          \"type\": \"string\",\n          \"description\": \"The raw transaction data in hexadecimal format.\"\n        },\n        \"version\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The version of the transaction.\"\n        },\n        \"lockTime\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The lock time for the transaction.\"\n        },\n        \"value\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The value of the transaction in NanoPAC.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The fee for the transaction in NanoPAC.\"\n        },\n        \"payloadType\": {\n          \"$ref\": \"#/definitions/pactusPayloadType\",\n          \"description\": \"The type of transaction payload.\"\n        },\n        \"transfer\": {\n          \"$ref\": \"#/definitions/pactusPayloadTransfer\",\n          \"description\": \"Transfer transaction payload.\"\n        },\n        \"bond\": {\n          \"$ref\": \"#/definitions/pactusPayloadBond\",\n          \"description\": \"Bond transaction payload.\"\n        },\n        \"sortition\": {\n          \"$ref\": \"#/definitions/pactusPayloadSortition\",\n          \"description\": \"Sortition transaction payload.\"\n        },\n        \"unbond\": {\n          \"$ref\": \"#/definitions/pactusPayloadUnbond\",\n          \"description\": \"Unbond transaction payload.\"\n        },\n        \"withdraw\": {\n          \"$ref\": \"#/definitions/pactusPayloadWithdraw\",\n          \"description\": \"Withdraw transaction payload.\"\n        },\n        \"batchTransfer\": {\n          \"$ref\": \"#/definitions/pactusPayloadBatchTransfer\",\n          \"description\": \"Batch Transfer transaction payload.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key associated with the transaction.\"\n        },\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The signature for the transaction.\"\n        },\n        \"blockHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The block height containing the transaction.\\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\"\n        },\n        \"confirmed\": {\n          \"type\": \"boolean\",\n          \"description\": \"Indicates whether the transaction is confirmed.\"\n        },\n        \"confirmations\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The number of blocks that have been added to the chain after this transaction was included in a block.\\nA value of zero means the transaction is unconfirmed and may still in the transaction pool.\"\n        }\n      },\n      \"description\": \"Information about a transaction.\"\n    },\n    \"pactusTransactionStatus\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"TRANSACTION_STATUS_PENDING\",\n        \"TRANSACTION_STATUS_CONFIRMED\",\n        \"TRANSACTION_STATUS_FAILED\"\n      ],\n      \"default\": \"TRANSACTION_STATUS_PENDING\",\n      \"description\": \"TransactionStatus defines the status of a transaction.\\n\\n - TRANSACTION_STATUS_PENDING: Pending status for transactions in the mempool.\\n - TRANSACTION_STATUS_CONFIRMED: Confirmed status for transactions included in a block.\\n - TRANSACTION_STATUS_FAILED: Failed status for transactions that were not successful.\"\n    },\n    \"pactusTransactionVerbosity\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"TRANSACTION_VERBOSITY_DATA\",\n        \"TRANSACTION_VERBOSITY_INFO\"\n      ],\n      \"default\": \"TRANSACTION_VERBOSITY_DATA\",\n      \"description\": \"Enumeration for verbosity levels when requesting transaction details.\\n\\n - TRANSACTION_VERBOSITY_DATA: Request transaction data only.\\n - TRANSACTION_VERBOSITY_INFO: Request detailed transaction information.\"\n    },\n    \"pactusTxDirection\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"TX_DIRECTION_ANY\",\n        \"TX_DIRECTION_INCOMING\",\n        \"TX_DIRECTION_OUTGOING\"\n      ],\n      \"default\": \"TX_DIRECTION_ANY\",\n      \"description\": \"TxDirection indicates the direction of a transaction relative to the wallet.\\n\\n - TX_DIRECTION_ANY: include both incoming and outgoing transactions.\\n - TX_DIRECTION_INCOMING: Include only incoming transactions where the wallet receives funds.\\n - TX_DIRECTION_OUTGOING: Include only outgoing transactions where the wallet sends funds.\"\n    },\n    \"pactusUnloadWalletRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet to unload.\"\n        }\n      },\n      \"description\": \"Request message for unloading a wallet.\\nDeprecated: It will be removed in a future version.\"\n    },\n    \"pactusUnloadWalletResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the unloaded wallet.\"\n        }\n      },\n      \"description\": \"Response message confirming wallet unloading.\\nDeprecated: It will be removed in a future version.\"\n    },\n    \"pactusUpdatePasswordRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet whose password will be updated.\"\n        },\n        \"oldPassword\": {\n          \"type\": \"string\",\n          \"description\": \"The current wallet password.\"\n        },\n        \"newPassword\": {\n          \"type\": \"string\",\n          \"description\": \"The new wallet password.\"\n        }\n      },\n      \"description\": \"Request message for updating wallet password.\"\n    },\n    \"pactusUpdatePasswordResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"walletName\": {\n          \"type\": \"string\",\n          \"description\": \"The name of the wallet whose password was updated.\"\n        }\n      },\n      \"description\": \"Response message confirming wallet password update.\"\n    },\n    \"pactusValidatorInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"hash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the validator.\"\n        },\n        \"data\": {\n          \"type\": \"string\",\n          \"description\": \"The serialized data of the validator.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key of the validator.\"\n        },\n        \"number\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The unique number assigned to the validator.\"\n        },\n        \"stake\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The stake of the validator in NanoPAC.\"\n        },\n        \"lastBondingHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height at which the validator last bonded.\"\n        },\n        \"lastSortitionHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height at which the validator last participated in sortition.\"\n        },\n        \"unbondingHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The height at which the validator will unbond.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the validator.\"\n        },\n        \"availabilityScore\": {\n          \"type\": \"number\",\n          \"format\": \"double\",\n          \"description\": \"The availability score of the validator.\"\n        },\n        \"protocolVersion\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The protocol version of the validator.\"\n        },\n        \"isDelegated\": {\n          \"type\": \"boolean\",\n          \"description\": \"Whether the validator is delegated.\"\n        },\n        \"delegateOwner\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the stake owner of the validator.\"\n        },\n        \"delegateShare\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The share of the stake owner of the validator.\"\n        },\n        \"delegateExpiry\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The expiry of the stake owner of the validator.\"\n        }\n      },\n      \"description\": \"Message contains information about a validator.\"\n    },\n    \"pactusVerifyMessageRequest\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"message\": {\n          \"type\": \"string\",\n          \"description\": \"The original message content that was signed.\"\n        },\n        \"signature\": {\n          \"type\": \"string\",\n          \"description\": \"The signature to verify in hexadecimal format.\"\n        },\n        \"publicKey\": {\n          \"type\": \"string\",\n          \"description\": \"The public key of the signer.\"\n        }\n      },\n      \"description\": \"Request message for verifying a message signature.\"\n    },\n    \"pactusVerifyMessageResponse\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"isValid\": {\n          \"type\": \"boolean\",\n          \"description\": \"Boolean indicating whether the signature is valid for the given message and public key.\"\n        }\n      },\n      \"description\": \"Response message contains the verification result.\"\n    },\n    \"pactusVoteInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"type\": {\n          \"$ref\": \"#/definitions/pactusVoteType\",\n          \"description\": \"The type of the vote.\"\n        },\n        \"voter\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the voter.\"\n        },\n        \"blockHash\": {\n          \"type\": \"string\",\n          \"description\": \"The hash of the block being voted on.\"\n        },\n        \"round\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The consensus round of the vote.\"\n        },\n        \"cpRound\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The change-proposer round of the vote.\"\n        },\n        \"cpValue\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The change-proposer value of the vote.\"\n        }\n      },\n      \"description\": \"Message contains information about a vote.\"\n    },\n    \"pactusVoteType\": {\n      \"type\": \"string\",\n      \"enum\": [\n        \"VOTE_TYPE_UNSPECIFIED\",\n        \"VOTE_TYPE_PREPARE\",\n        \"VOTE_TYPE_PRECOMMIT\",\n        \"VOTE_TYPE_CP_PRE_VOTE\",\n        \"VOTE_TYPE_CP_MAIN_VOTE\",\n        \"VOTE_TYPE_CP_DECIDED\"\n      ],\n      \"default\": \"VOTE_TYPE_UNSPECIFIED\",\n      \"description\": \"Enumeration for types of votes.\\n\\n - VOTE_TYPE_UNSPECIFIED: Unspecified vote type.\\n - VOTE_TYPE_PREPARE: Prepare vote type.\\n - VOTE_TYPE_PRECOMMIT: Precommit vote type.\\n - VOTE_TYPE_CP_PRE_VOTE: Change-proposer:pre-vote vote type.\\n - VOTE_TYPE_CP_MAIN_VOTE: Change-proposer:main-vote vote type.\\n - VOTE_TYPE_CP_DECIDED: Change-proposer:decided vote type.\"\n    },\n    \"pactusWalletTransactionInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"no\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"A sequence number for the transaction in the wallet.\"\n        },\n        \"txId\": {\n          \"type\": \"string\",\n          \"description\": \"The unique ID of the transaction.\"\n        },\n        \"sender\": {\n          \"type\": \"string\",\n          \"description\": \"The sender's address.\"\n        },\n        \"receiver\": {\n          \"type\": \"string\",\n          \"description\": \"The receiver's address.\"\n        },\n        \"direction\": {\n          \"$ref\": \"#/definitions/pactusTxDirection\",\n          \"description\": \"The direction of the transaction relative to the wallet.\"\n        },\n        \"amount\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The amount involved in the transaction in NanoPAC.\"\n        },\n        \"fee\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"The transaction fee in NanoPAC.\"\n        },\n        \"memo\": {\n          \"type\": \"string\",\n          \"description\": \"A memo string for the transaction.\"\n        },\n        \"status\": {\n          \"$ref\": \"#/definitions/pactusTransactionStatus\",\n          \"description\": \"The current status of the transaction.\"\n        },\n        \"blockHeight\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\",\n          \"description\": \"The block height containing the transaction.\"\n        },\n        \"payloadType\": {\n          \"$ref\": \"#/definitions/pactusPayloadType\",\n          \"description\": \"The type of transaction payload.\"\n        },\n        \"data\": {\n          \"type\": \"string\",\n          \"format\": \"byte\",\n          \"description\": \"The raw transaction data.\"\n        },\n        \"comment\": {\n          \"type\": \"string\",\n          \"description\": \"A comment associated with the transaction in the wallet.\"\n        },\n        \"createdAt\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"Unix timestamp of when the transaction was created.\"\n        },\n        \"updatedAt\": {\n          \"type\": \"string\",\n          \"format\": \"int64\",\n          \"description\": \"Unix timestamp of when the transaction was last updated.\"\n        }\n      },\n      \"description\": \"WalletTransactionInfo contains information about a transaction in a wallet.\"\n    },\n    \"pactusZMQPublisherInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"topic\": {\n          \"type\": \"string\",\n          \"description\": \"The topic associated with the publisher.\"\n        },\n        \"address\": {\n          \"type\": \"string\",\n          \"description\": \"The address of the publisher.\"\n        },\n        \"hwm\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"The high-water mark (HWM) for the publisher, indicating the\\nmaximum number of messages to queue before dropping older ones.\"\n        }\n      },\n      \"description\": \"ZMQPublisherInfo contains information about a ZeroMQ publisher.\"\n    },\n    \"protobufAny\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"@type\": {\n          \"type\": \"string\"\n        }\n      },\n      \"additionalProperties\": {}\n    },\n    \"rpcStatus\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"code\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"message\": {\n          \"type\": \"string\"\n        },\n        \"details\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"$ref\": \"#/definitions/protobufAny\"\n          }\n        }\n      }\n    }\n  },\n  \"securityDefinitions\": {\n    \"BasicAuth\": {\n      \"type\": \"basic\"\n    }\n  },\n  \"security\": [\n    {\n      \"BasicAuth\": []\n    }\n  ]\n}\n"
  },
  {
    "path": "www/http/swagger-ui/swagger-initializer.js",
    "content": "window.onload = function() {\n  //<editor-fold desc=\"Changeable Configuration Block\">\n\n  // the following lines will be replaced by docker/configurator, when it runs in a docker-container\n  window.ui = SwaggerUIBundle({\n    url: \"pactus.swagger.json\",\n    dom_id: '#swagger-ui',\n    deepLinking: true,\n    presets: [\n      SwaggerUIBundle.presets.apis,\n      SwaggerUIStandalonePreset\n    ],\n    plugins: [\n      SwaggerUIBundle.plugins.DownloadUrl\n    ],\n    layout: \"StandaloneLayout\"\n  });\n\n  //</editor-fold>\n};\n"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui-bundle.js",
    "content": "/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */\n!function webpackUniversalModuleDefinition(s,i){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define([],i):\"object\"==typeof exports?exports.SwaggerUIBundle=i():s.SwaggerUIBundle=i()}(this,(()=>(()=>{var s,i,u={69119:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.BLANK_URL=i.relativeFirstCharacters=i.urlSchemeRegex=i.ctrlCharactersRegex=i.htmlCtrlEntityRegex=i.htmlEntitiesRegex=i.invalidProtocolRegex=void 0,i.invalidProtocolRegex=/^([^\\w]*)(javascript|data|vbscript)/im,i.htmlEntitiesRegex=/&#(\\w+)(^\\w|;)?/g,i.htmlCtrlEntityRegex=/&(newline|tab);/gi,i.ctrlCharactersRegex=/[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim,i.urlSchemeRegex=/^.+(:|&colon;)/gim,i.relativeFirstCharacters=[\".\",\"/\"],i.BLANK_URL=\"about:blank\"},16750:(s,i,u)=>{\"use strict\";i.J=void 0;var _=u(69119);i.J=function sanitizeUrl(s){if(!s)return _.BLANK_URL;var i,u,w=s;do{i=(w=(u=w,u.replace(_.ctrlCharactersRegex,\"\").replace(_.htmlEntitiesRegex,(function(s,i){return String.fromCharCode(i)}))).replace(_.htmlCtrlEntityRegex,\"\").replace(_.ctrlCharactersRegex,\"\").trim()).match(_.ctrlCharactersRegex)||w.match(_.htmlEntitiesRegex)||w.match(_.htmlCtrlEntityRegex)}while(i&&i.length>0);var x=w;if(!x)return _.BLANK_URL;if(function isRelativeUrlWithoutProtocol(s){return _.relativeFirstCharacters.indexOf(s[0])>-1}(x))return x;var j=x.match(_.urlSchemeRegex);if(!j)return x;var P=j[0];return _.invalidProtocolRegex.test(P)?_.BLANK_URL:x}},67526:(s,i)=>{\"use strict\";i.byteLength=function byteLength(s){var i=getLens(s),u=i[0],_=i[1];return 3*(u+_)/4-_},i.toByteArray=function toByteArray(s){var i,u,x=getLens(s),j=x[0],P=x[1],B=new w(function _byteLength(s,i,u){return 3*(i+u)/4-u}(0,j,P)),$=0,U=P>0?j-4:j;for(u=0;u<U;u+=4)i=_[s.charCodeAt(u)]<<18|_[s.charCodeAt(u+1)]<<12|_[s.charCodeAt(u+2)]<<6|_[s.charCodeAt(u+3)],B[$++]=i>>16&255,B[$++]=i>>8&255,B[$++]=255&i;2===P&&(i=_[s.charCodeAt(u)]<<2|_[s.charCodeAt(u+1)]>>4,B[$++]=255&i);1===P&&(i=_[s.charCodeAt(u)]<<10|_[s.charCodeAt(u+1)]<<4|_[s.charCodeAt(u+2)]>>2,B[$++]=i>>8&255,B[$++]=255&i);return B},i.fromByteArray=function fromByteArray(s){for(var i,_=s.length,w=_%3,x=[],j=16383,P=0,B=_-w;P<B;P+=j)x.push(encodeChunk(s,P,P+j>B?B:P+j));1===w?(i=s[_-1],x.push(u[i>>2]+u[i<<4&63]+\"==\")):2===w&&(i=(s[_-2]<<8)+s[_-1],x.push(u[i>>10]+u[i>>4&63]+u[i<<2&63]+\"=\"));return x.join(\"\")};for(var u=[],_=[],w=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,x=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",j=0;j<64;++j)u[j]=x[j],_[x.charCodeAt(j)]=j;function getLens(s){var i=s.length;if(i%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var u=s.indexOf(\"=\");return-1===u&&(u=i),[u,u===i?0:4-u%4]}function encodeChunk(s,i,_){for(var w,x,j=[],P=i;P<_;P+=3)w=(s[P]<<16&16711680)+(s[P+1]<<8&65280)+(255&s[P+2]),j.push(u[(x=w)>>18&63]+u[x>>12&63]+u[x>>6&63]+u[63&x]);return j.join(\"\")}_[\"-\".charCodeAt(0)]=62,_[\"_\".charCodeAt(0)]=63},48287:(s,i,u)=>{\"use strict\";const _=u(67526),w=u(251),x=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;i.Buffer=Buffer,i.SlowBuffer=function SlowBuffer(s){+s!=s&&(s=0);return Buffer.alloc(+s)},i.INSPECT_MAX_BYTES=50;const j=2147483647;function createBuffer(s){if(s>j)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"');const i=new Uint8Array(s);return Object.setPrototypeOf(i,Buffer.prototype),i}function Buffer(s,i,u){if(\"number\"==typeof s){if(\"string\"==typeof i)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(s)}return from(s,i,u)}function from(s,i,u){if(\"string\"==typeof s)return function fromString(s,i){\"string\"==typeof i&&\"\"!==i||(i=\"utf8\");if(!Buffer.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);const u=0|byteLength(s,i);let _=createBuffer(u);const w=_.write(s,i);w!==u&&(_=_.slice(0,w));return _}(s,i);if(ArrayBuffer.isView(s))return function fromArrayView(s){if(isInstance(s,Uint8Array)){const i=new Uint8Array(s);return fromArrayBuffer(i.buffer,i.byteOffset,i.byteLength)}return fromArrayLike(s)}(s);if(null==s)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s);if(isInstance(s,ArrayBuffer)||s&&isInstance(s.buffer,ArrayBuffer))return fromArrayBuffer(s,i,u);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(s,SharedArrayBuffer)||s&&isInstance(s.buffer,SharedArrayBuffer)))return fromArrayBuffer(s,i,u);if(\"number\"==typeof s)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const _=s.valueOf&&s.valueOf();if(null!=_&&_!==s)return Buffer.from(_,i,u);const w=function fromObject(s){if(Buffer.isBuffer(s)){const i=0|checked(s.length),u=createBuffer(i);return 0===u.length||s.copy(u,0,0,i),u}if(void 0!==s.length)return\"number\"!=typeof s.length||numberIsNaN(s.length)?createBuffer(0):fromArrayLike(s);if(\"Buffer\"===s.type&&Array.isArray(s.data))return fromArrayLike(s.data)}(s);if(w)return w;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof s[Symbol.toPrimitive])return Buffer.from(s[Symbol.toPrimitive](\"string\"),i,u);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s)}function assertSize(s){if(\"number\"!=typeof s)throw new TypeError('\"size\" argument must be of type number');if(s<0)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"')}function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checked(s))}function fromArrayLike(s){const i=s.length<0?0:0|checked(s.length),u=createBuffer(i);for(let _=0;_<i;_+=1)u[_]=255&s[_];return u}function fromArrayBuffer(s,i,u){if(i<0||s.byteLength<i)throw new RangeError('\"offset\" is outside of buffer bounds');if(s.byteLength<i+(u||0))throw new RangeError('\"length\" is outside of buffer bounds');let _;return _=void 0===i&&void 0===u?new Uint8Array(s):void 0===u?new Uint8Array(s,i):new Uint8Array(s,i,u),Object.setPrototypeOf(_,Buffer.prototype),_}function checked(s){if(s>=j)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+j.toString(16)+\" bytes\");return 0|s}function byteLength(s,i){if(Buffer.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||isInstance(s,ArrayBuffer))return s.byteLength;if(\"string\"!=typeof s)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);const u=s.length,_=arguments.length>2&&!0===arguments[2];if(!_&&0===u)return 0;let w=!1;for(;;)switch(i){case\"ascii\":case\"latin1\":case\"binary\":return u;case\"utf8\":case\"utf-8\":return utf8ToBytes(s).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*u;case\"hex\":return u>>>1;case\"base64\":return base64ToBytes(s).length;default:if(w)return _?-1:utf8ToBytes(s).length;i=(\"\"+i).toLowerCase(),w=!0}}function slowToString(s,i,u){let _=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return\"\";if((void 0===u||u>this.length)&&(u=this.length),u<=0)return\"\";if((u>>>=0)<=(i>>>=0))return\"\";for(s||(s=\"utf8\");;)switch(s){case\"hex\":return hexSlice(this,i,u);case\"utf8\":case\"utf-8\":return utf8Slice(this,i,u);case\"ascii\":return asciiSlice(this,i,u);case\"latin1\":case\"binary\":return latin1Slice(this,i,u);case\"base64\":return base64Slice(this,i,u);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,i,u);default:if(_)throw new TypeError(\"Unknown encoding: \"+s);s=(s+\"\").toLowerCase(),_=!0}}function swap(s,i,u){const _=s[i];s[i]=s[u],s[u]=_}function bidirectionalIndexOf(s,i,u,_,w){if(0===s.length)return-1;if(\"string\"==typeof u?(_=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),numberIsNaN(u=+u)&&(u=w?0:s.length-1),u<0&&(u=s.length+u),u>=s.length){if(w)return-1;u=s.length-1}else if(u<0){if(!w)return-1;u=0}if(\"string\"==typeof i&&(i=Buffer.from(i,_)),Buffer.isBuffer(i))return 0===i.length?-1:arrayIndexOf(s,i,u,_,w);if(\"number\"==typeof i)return i&=255,\"function\"==typeof Uint8Array.prototype.indexOf?w?Uint8Array.prototype.indexOf.call(s,i,u):Uint8Array.prototype.lastIndexOf.call(s,i,u):arrayIndexOf(s,[i],u,_,w);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(s,i,u,_,w){let x,j=1,P=s.length,B=i.length;if(void 0!==_&&(\"ucs2\"===(_=String(_).toLowerCase())||\"ucs-2\"===_||\"utf16le\"===_||\"utf-16le\"===_)){if(s.length<2||i.length<2)return-1;j=2,P/=2,B/=2,u/=2}function read(s,i){return 1===j?s[i]:s.readUInt16BE(i*j)}if(w){let _=-1;for(x=u;x<P;x++)if(read(s,x)===read(i,-1===_?0:x-_)){if(-1===_&&(_=x),x-_+1===B)return _*j}else-1!==_&&(x-=x-_),_=-1}else for(u+B>P&&(u=P-B),x=u;x>=0;x--){let u=!0;for(let _=0;_<B;_++)if(read(s,x+_)!==read(i,_)){u=!1;break}if(u)return x}return-1}function hexWrite(s,i,u,_){u=Number(u)||0;const w=s.length-u;_?(_=Number(_))>w&&(_=w):_=w;const x=i.length;let j;for(_>x/2&&(_=x/2),j=0;j<_;++j){const _=parseInt(i.substr(2*j,2),16);if(numberIsNaN(_))return j;s[u+j]=_}return j}function utf8Write(s,i,u,_){return blitBuffer(utf8ToBytes(i,s.length-u),s,u,_)}function asciiWrite(s,i,u,_){return blitBuffer(function asciiToBytes(s){const i=[];for(let u=0;u<s.length;++u)i.push(255&s.charCodeAt(u));return i}(i),s,u,_)}function base64Write(s,i,u,_){return blitBuffer(base64ToBytes(i),s,u,_)}function ucs2Write(s,i,u,_){return blitBuffer(function utf16leToBytes(s,i){let u,_,w;const x=[];for(let j=0;j<s.length&&!((i-=2)<0);++j)u=s.charCodeAt(j),_=u>>8,w=u%256,x.push(w),x.push(_);return x}(i,s.length-u),s,u,_)}function base64Slice(s,i,u){return 0===i&&u===s.length?_.fromByteArray(s):_.fromByteArray(s.slice(i,u))}function utf8Slice(s,i,u){u=Math.min(s.length,u);const _=[];let w=i;for(;w<u;){const i=s[w];let x=null,j=i>239?4:i>223?3:i>191?2:1;if(w+j<=u){let u,_,P,B;switch(j){case 1:i<128&&(x=i);break;case 2:u=s[w+1],128==(192&u)&&(B=(31&i)<<6|63&u,B>127&&(x=B));break;case 3:u=s[w+1],_=s[w+2],128==(192&u)&&128==(192&_)&&(B=(15&i)<<12|(63&u)<<6|63&_,B>2047&&(B<55296||B>57343)&&(x=B));break;case 4:u=s[w+1],_=s[w+2],P=s[w+3],128==(192&u)&&128==(192&_)&&128==(192&P)&&(B=(15&i)<<18|(63&u)<<12|(63&_)<<6|63&P,B>65535&&B<1114112&&(x=B))}}null===x?(x=65533,j=1):x>65535&&(x-=65536,_.push(x>>>10&1023|55296),x=56320|1023&x),_.push(x),w+=j}return function decodeCodePointsArray(s){const i=s.length;if(i<=P)return String.fromCharCode.apply(String,s);let u=\"\",_=0;for(;_<i;)u+=String.fromCharCode.apply(String,s.slice(_,_+=P));return u}(_)}i.kMaxLength=j,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const s=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(s,i),42===s.foo()}catch(s){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(s,i,u){return from(s,i,u)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(s,i,u){return function alloc(s,i,u){return assertSize(s),s<=0?createBuffer(s):void 0!==i?\"string\"==typeof u?createBuffer(s).fill(i,u):createBuffer(s).fill(i):createBuffer(s)}(s,i,u)},Buffer.allocUnsafe=function(s){return allocUnsafe(s)},Buffer.allocUnsafeSlow=function(s){return allocUnsafe(s)},Buffer.isBuffer=function isBuffer(s){return null!=s&&!0===s._isBuffer&&s!==Buffer.prototype},Buffer.compare=function compare(s,i){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),isInstance(i,Uint8Array)&&(i=Buffer.from(i,i.offset,i.byteLength)),!Buffer.isBuffer(s)||!Buffer.isBuffer(i))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(s===i)return 0;let u=s.length,_=i.length;for(let w=0,x=Math.min(u,_);w<x;++w)if(s[w]!==i[w]){u=s[w],_=i[w];break}return u<_?-1:_<u?1:0},Buffer.isEncoding=function isEncoding(s){switch(String(s).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!0;default:return!1}},Buffer.concat=function concat(s,i){if(!Array.isArray(s))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===s.length)return Buffer.alloc(0);let u;if(void 0===i)for(i=0,u=0;u<s.length;++u)i+=s[u].length;const _=Buffer.allocUnsafe(i);let w=0;for(u=0;u<s.length;++u){let i=s[u];if(isInstance(i,Uint8Array))w+i.length>_.length?(Buffer.isBuffer(i)||(i=Buffer.from(i)),i.copy(_,w)):Uint8Array.prototype.set.call(_,i,w);else{if(!Buffer.isBuffer(i))throw new TypeError('\"list\" argument must be an Array of Buffers');i.copy(_,w)}w+=i.length}return _},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const s=this.length;if(s%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let i=0;i<s;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function swap32(){const s=this.length;if(s%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let i=0;i<s;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function swap64(){const s=this.length;if(s%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let i=0;i<s;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(){const s=this.length;return 0===s?\"\":0===arguments.length?utf8Slice(this,0,s):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(s){if(!Buffer.isBuffer(s))throw new TypeError(\"Argument must be a Buffer\");return this===s||0===Buffer.compare(this,s)},Buffer.prototype.inspect=function inspect(){let s=\"\";const u=i.INSPECT_MAX_BYTES;return s=this.toString(\"hex\",0,u).replace(/(.{2})/g,\"$1 \").trim(),this.length>u&&(s+=\" ... \"),\"<Buffer \"+s+\">\"},x&&(Buffer.prototype[x]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(s,i,u,_,w){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),!Buffer.isBuffer(s))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(void 0===i&&(i=0),void 0===u&&(u=s?s.length:0),void 0===_&&(_=0),void 0===w&&(w=this.length),i<0||u>s.length||_<0||w>this.length)throw new RangeError(\"out of range index\");if(_>=w&&i>=u)return 0;if(_>=w)return-1;if(i>=u)return 1;if(this===s)return 0;let x=(w>>>=0)-(_>>>=0),j=(u>>>=0)-(i>>>=0);const P=Math.min(x,j),B=this.slice(_,w),$=s.slice(i,u);for(let s=0;s<P;++s)if(B[s]!==$[s]){x=B[s],j=$[s];break}return x<j?-1:j<x?1:0},Buffer.prototype.includes=function includes(s,i,u){return-1!==this.indexOf(s,i,u)},Buffer.prototype.indexOf=function indexOf(s,i,u){return bidirectionalIndexOf(this,s,i,u,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(s,i,u){return bidirectionalIndexOf(this,s,i,u,!1)},Buffer.prototype.write=function write(s,i,u,_){if(void 0===i)_=\"utf8\",u=this.length,i=0;else if(void 0===u&&\"string\"==typeof i)_=i,u=this.length,i=0;else{if(!isFinite(i))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");i>>>=0,isFinite(u)?(u>>>=0,void 0===_&&(_=\"utf8\")):(_=u,u=void 0)}const w=this.length-i;if((void 0===u||u>w)&&(u=w),s.length>0&&(u<0||i<0)||i>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");_||(_=\"utf8\");let x=!1;for(;;)switch(_){case\"hex\":return hexWrite(this,s,i,u);case\"utf8\":case\"utf-8\":return utf8Write(this,s,i,u);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,s,i,u);case\"base64\":return base64Write(this,s,i,u);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,s,i,u);default:if(x)throw new TypeError(\"Unknown encoding: \"+_);_=(\"\"+_).toLowerCase(),x=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function asciiSlice(s,i,u){let _=\"\";u=Math.min(s.length,u);for(let w=i;w<u;++w)_+=String.fromCharCode(127&s[w]);return _}function latin1Slice(s,i,u){let _=\"\";u=Math.min(s.length,u);for(let w=i;w<u;++w)_+=String.fromCharCode(s[w]);return _}function hexSlice(s,i,u){const _=s.length;(!i||i<0)&&(i=0),(!u||u<0||u>_)&&(u=_);let w=\"\";for(let _=i;_<u;++_)w+=U[s[_]];return w}function utf16leSlice(s,i,u){const _=s.slice(i,u);let w=\"\";for(let s=0;s<_.length-1;s+=2)w+=String.fromCharCode(_[s]+256*_[s+1]);return w}function checkOffset(s,i,u){if(s%1!=0||s<0)throw new RangeError(\"offset is not uint\");if(s+i>u)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(s,i,u,_,w,x){if(!Buffer.isBuffer(s))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(i>w||i<x)throw new RangeError('\"value\" argument is out of bounds');if(u+_>s.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,u}function wrtBigUInt64BE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u+7]=x,x>>=8,s[u+6]=x,x>>=8,s[u+5]=x,x>>=8,s[u+4]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u+3]=j,j>>=8,s[u+2]=j,j>>=8,s[u+1]=j,j>>=8,s[u]=j,u+8}function checkIEEE754(s,i,u,_,w,x){if(u+_>s.length)throw new RangeError(\"Index out of range\");if(u<0)throw new RangeError(\"Index out of range\")}function writeFloat(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,4),w.write(s,i,u,_,23,4),u+4}function writeDouble(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,8),w.write(s,i,u,_,52,8),u+8}Buffer.prototype.slice=function slice(s,i){const u=this.length;(s=~~s)<0?(s+=u)<0&&(s=0):s>u&&(s=u),(i=void 0===i?u:~~i)<0?(i+=u)<0&&(i=0):i>u&&(i=u),i<s&&(i=s);const _=this.subarray(s,i);return Object.setPrototypeOf(_,Buffer.prototype),_},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x<i&&(w*=256);)_+=this[s+x]*w;return _},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s+--i],w=1;for(;i>0&&(w*=256);)_+=this[s+--i]*w;return _},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),this[s]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]|this[s+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]<<8|this[s+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i+256*this[++s]+65536*this[++s]+this[++s]*2**24,w=this[++s]+256*this[++s]+65536*this[++s]+u*2**24;return BigInt(_)+(BigInt(w)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i*2**24+65536*this[++s]+256*this[++s]+this[++s],w=this[++s]*2**24+65536*this[++s]+256*this[++s]+u;return(BigInt(_)<<BigInt(32))+BigInt(w)})),Buffer.prototype.readIntLE=function readIntLE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x<i&&(w*=256);)_+=this[s+x]*w;return w*=128,_>=w&&(_-=Math.pow(2,8*i)),_},Buffer.prototype.readIntBE=function readIntBE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=i,w=1,x=this[s+--_];for(;_>0&&(w*=256);)x+=this[s+--_]*w;return w*=128,x>=w&&(x-=Math.pow(2,8*i)),x},Buffer.prototype.readInt8=function readInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},Buffer.prototype.readInt16LE=function readInt16LE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s]|this[s+1]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt16BE=function readInt16BE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s+1]|this[s]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt32LE=function readInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=this[s+4]+256*this[s+5]+65536*this[s+6]+(u<<24);return(BigInt(_)<<BigInt(32))+BigInt(i+256*this[++s]+65536*this[++s]+this[++s]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=(i<<24)+65536*this[++s]+256*this[++s]+this[++s];return(BigInt(_)<<BigInt(32))+BigInt(this[++s]*2**24+65536*this[++s]+256*this[++s]+u)})),Buffer.prototype.readFloatLE=function readFloatLE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(s,i,u,_){if(s=+s,i>>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=1,x=0;for(this[i]=255&s;++x<u&&(w*=256);)this[i+x]=s/w&255;return i+u},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(s,i,u,_){if(s=+s,i>>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=u-1,x=1;for(this[i+w]=255&s;--w>=0&&(x*=256);)this[i+w]=s/x&255;return i+u},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,255,0),this[i]=255&s,i+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i+3]=s>>>24,this[i+2]=s>>>16,this[i+1]=s>>>8,this[i]=255&s,i+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=0,x=1,j=0;for(this[i]=255&s;++w<u&&(x*=256);)s<0&&0===j&&0!==this[i+w-1]&&(j=1),this[i+w]=(s/x>>0)-j&255;return i+u},Buffer.prototype.writeIntBE=function writeIntBE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=u-1,x=1,j=0;for(this[i+w]=255&s;--w>=0&&(x*=256);)s<0&&0===j&&0!==this[i+w+1]&&(j=1),this[i+w]=(s/x>>0)-j&255;return i+u},Buffer.prototype.writeInt8=function writeInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,127,-128),s<0&&(s=255+s+1),this[i]=255&s,i+1},Buffer.prototype.writeInt16LE=function writeInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeInt16BE=function writeInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeInt32LE=function writeInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),this[i]=255&s,this[i+1]=s>>>8,this[i+2]=s>>>16,this[i+3]=s>>>24,i+4},Buffer.prototype.writeInt32BE=function writeInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(s,i,u){return writeFloat(this,s,i,!0,u)},Buffer.prototype.writeFloatBE=function writeFloatBE(s,i,u){return writeFloat(this,s,i,!1,u)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(s,i,u){return writeDouble(this,s,i,!0,u)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(s,i,u){return writeDouble(this,s,i,!1,u)},Buffer.prototype.copy=function copy(s,i,u,_){if(!Buffer.isBuffer(s))throw new TypeError(\"argument should be a Buffer\");if(u||(u=0),_||0===_||(_=this.length),i>=s.length&&(i=s.length),i||(i=0),_>0&&_<u&&(_=u),_===u)return 0;if(0===s.length||0===this.length)return 0;if(i<0)throw new RangeError(\"targetStart out of bounds\");if(u<0||u>=this.length)throw new RangeError(\"Index out of range\");if(_<0)throw new RangeError(\"sourceEnd out of bounds\");_>this.length&&(_=this.length),s.length-i<_-u&&(_=s.length-i+u);const w=_-u;return this===s&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(i,u,_):Uint8Array.prototype.set.call(s,this.subarray(u,_),i),w},Buffer.prototype.fill=function fill(s,i,u,_){if(\"string\"==typeof s){if(\"string\"==typeof i?(_=i,i=0,u=this.length):\"string\"==typeof u&&(_=u,u=this.length),void 0!==_&&\"string\"!=typeof _)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof _&&!Buffer.isEncoding(_))throw new TypeError(\"Unknown encoding: \"+_);if(1===s.length){const i=s.charCodeAt(0);(\"utf8\"===_&&i<128||\"latin1\"===_)&&(s=i)}}else\"number\"==typeof s?s&=255:\"boolean\"==typeof s&&(s=Number(s));if(i<0||this.length<i||this.length<u)throw new RangeError(\"Out of range index\");if(u<=i)return this;let w;if(i>>>=0,u=void 0===u?this.length:u>>>0,s||(s=0),\"number\"==typeof s)for(w=i;w<u;++w)this[w]=s;else{const x=Buffer.isBuffer(s)?s:Buffer.from(s,_),j=x.length;if(0===j)throw new TypeError('The value \"'+s+'\" is invalid for argument \"value\"');for(w=0;w<u-i;++w)this[w+i]=x[w%j]}return this};const B={};function E(s,i,u){B[s]=class NodeError extends u{constructor(){super(),Object.defineProperty(this,\"message\",{value:i.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${s}]`,this.stack,delete this.name}get code(){return s}set code(s){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${s}]: ${this.message}`}}}function addNumericalSeparator(s){let i=\"\",u=s.length;const _=\"-\"===s[0]?1:0;for(;u>=_+4;u-=3)i=`_${s.slice(u-3,u)}${i}`;return`${s.slice(0,u)}${i}`}function checkIntBI(s,i,u,_,w,x){if(s>u||s<i){const _=\"bigint\"==typeof i?\"n\":\"\";let w;throw w=x>3?0===i||i===BigInt(0)?`>= 0${_} and < 2${_} ** ${8*(x+1)}${_}`:`>= -(2${_} ** ${8*(x+1)-1}${_}) and < 2 ** ${8*(x+1)-1}${_}`:`>= ${i}${_} and <= ${u}${_}`,new B.ERR_OUT_OF_RANGE(\"value\",w,s)}!function checkBounds(s,i,u){validateNumber(i,\"offset\"),void 0!==s[i]&&void 0!==s[i+u]||boundsError(i,s.length-(u+1))}(_,w,x)}function validateNumber(s,i){if(\"number\"!=typeof s)throw new B.ERR_INVALID_ARG_TYPE(i,\"number\",s)}function boundsError(s,i,u){if(Math.floor(s)!==s)throw validateNumber(s,u),new B.ERR_OUT_OF_RANGE(u||\"offset\",\"an integer\",s);if(i<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(u||\"offset\",`>= ${u?1:0} and <= ${i}`,s)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(s){return s?`${s} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(s,i){return`The \"${s}\" argument must be of type number. Received type ${typeof i}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(s,i,u){let _=`The value of \"${s}\" is out of range.`,w=u;return Number.isInteger(u)&&Math.abs(u)>2**32?w=addNumericalSeparator(String(u)):\"bigint\"==typeof u&&(w=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(w=addNumericalSeparator(w)),w+=\"n\"),_+=` It must be ${i}. Received ${w}`,_}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(s,i){let u;i=i||1/0;const _=s.length;let w=null;const x=[];for(let j=0;j<_;++j){if(u=s.charCodeAt(j),u>55295&&u<57344){if(!w){if(u>56319){(i-=3)>-1&&x.push(239,191,189);continue}if(j+1===_){(i-=3)>-1&&x.push(239,191,189);continue}w=u;continue}if(u<56320){(i-=3)>-1&&x.push(239,191,189),w=u;continue}u=65536+(w-55296<<10|u-56320)}else w&&(i-=3)>-1&&x.push(239,191,189);if(w=null,u<128){if((i-=1)<0)break;x.push(u)}else if(u<2048){if((i-=2)<0)break;x.push(u>>6|192,63&u|128)}else if(u<65536){if((i-=3)<0)break;x.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(u<1114112))throw new Error(\"Invalid code point\");if((i-=4)<0)break;x.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return x}function base64ToBytes(s){return _.toByteArray(function base64clean(s){if((s=(s=s.split(\"=\")[0]).trim().replace($,\"\")).length<2)return\"\";for(;s.length%4!=0;)s+=\"=\";return s}(s))}function blitBuffer(s,i,u,_){let w;for(w=0;w<_&&!(w+u>=i.length||w>=s.length);++w)i[w+u]=s[w];return w}function isInstance(s,i){return s instanceof i||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===i.name}function numberIsNaN(s){return s!=s}const U=function(){const s=\"0123456789abcdef\",i=new Array(256);for(let u=0;u<16;++u){const _=16*u;for(let w=0;w<16;++w)i[_+w]=s[u]+s[w]}return i}();function defineBigIntMethod(s){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:s}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},38075:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(10487),x=w(_(\"String.prototype.indexOf\"));s.exports=function callBoundIntrinsic(s,i){var u=_(s,!!i);return\"function\"==typeof u&&x(s,\".prototype.\")>-1?w(u):u}},10487:(s,i,u)=>{\"use strict\";var _=u(66743),w=u(70453),x=u(96897),j=u(69675),P=w(\"%Function.prototype.apply%\"),B=w(\"%Function.prototype.call%\"),$=w(\"%Reflect.apply%\",!0)||_.call(B,P),U=u(30655),Y=w(\"%Math.max%\");s.exports=function callBind(s){if(\"function\"!=typeof s)throw new j(\"a function is required\");var i=$(_,B,arguments);return x(i,1+Y(0,s.length-(arguments.length-1)),!0)};var X=function applyBind(){return $(_,P,arguments)};U?U(s.exports,\"apply\",{value:X}):s.exports.apply=X},57427:(s,i)=>{\"use strict\";i.parse=function parse(s,i){if(\"string\"!=typeof s)throw new TypeError(\"argument str must be a string\");var u={},_=(i||{}).decode||decode,w=0;for(;w<s.length;){var x=s.indexOf(\"=\",w);if(-1===x)break;var j=s.indexOf(\";\",w);if(-1===j)j=s.length;else if(j<x){w=s.lastIndexOf(\";\",x-1)+1;continue}var P=s.slice(w,x).trim();if(void 0===u[P]){var B=s.slice(x+1,j).trim();34===B.charCodeAt(0)&&(B=B.slice(1,-1)),u[P]=tryDecode(B,_)}w=j+1}return u},i.serialize=function serialize(s,i,w){var x=w||{},j=x.encode||encode;if(\"function\"!=typeof j)throw new TypeError(\"option encode is invalid\");if(!_.test(s))throw new TypeError(\"argument name is invalid\");var P=j(i);if(P&&!_.test(P))throw new TypeError(\"argument val is invalid\");var B=s+\"=\"+P;if(null!=x.maxAge){var $=x.maxAge-0;if(isNaN($)||!isFinite($))throw new TypeError(\"option maxAge is invalid\");B+=\"; Max-Age=\"+Math.floor($)}if(x.domain){if(!_.test(x.domain))throw new TypeError(\"option domain is invalid\");B+=\"; Domain=\"+x.domain}if(x.path){if(!_.test(x.path))throw new TypeError(\"option path is invalid\");B+=\"; Path=\"+x.path}if(x.expires){var U=x.expires;if(!function isDate(s){return\"[object Date]\"===u.call(s)||s instanceof Date}(U)||isNaN(U.valueOf()))throw new TypeError(\"option expires is invalid\");B+=\"; Expires=\"+U.toUTCString()}x.httpOnly&&(B+=\"; HttpOnly\");x.secure&&(B+=\"; Secure\");x.partitioned&&(B+=\"; Partitioned\");if(x.priority){switch(\"string\"==typeof x.priority?x.priority.toLowerCase():x.priority){case\"low\":B+=\"; Priority=Low\";break;case\"medium\":B+=\"; Priority=Medium\";break;case\"high\":B+=\"; Priority=High\";break;default:throw new TypeError(\"option priority is invalid\")}}if(x.sameSite){switch(\"string\"==typeof x.sameSite?x.sameSite.toLowerCase():x.sameSite){case!0:B+=\"; SameSite=Strict\";break;case\"lax\":B+=\"; SameSite=Lax\";break;case\"strict\":B+=\"; SameSite=Strict\";break;case\"none\":B+=\"; SameSite=None\";break;default:throw new TypeError(\"option sameSite is invalid\")}}return B};var u=Object.prototype.toString,_=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function decode(s){return-1!==s.indexOf(\"%\")?decodeURIComponent(s):s}function encode(s){return encodeURIComponent(s)}function tryDecode(s,i){try{return i(s)}catch(i){return s}}},17965:(s,i,u)=>{\"use strict\";var _=u(16426),w={\"text/plain\":\"Text\",\"text/html\":\"Url\",default:\"Text\"};s.exports=function copy(s,i){var u,x,j,P,B,$,U=!1;i||(i={}),u=i.debug||!1;try{if(j=_(),P=document.createRange(),B=document.getSelection(),($=document.createElement(\"span\")).textContent=s,$.ariaHidden=\"true\",$.style.all=\"unset\",$.style.position=\"fixed\",$.style.top=0,$.style.clip=\"rect(0, 0, 0, 0)\",$.style.whiteSpace=\"pre\",$.style.webkitUserSelect=\"text\",$.style.MozUserSelect=\"text\",$.style.msUserSelect=\"text\",$.style.userSelect=\"text\",$.addEventListener(\"copy\",(function(_){if(_.stopPropagation(),i.format)if(_.preventDefault(),void 0===_.clipboardData){u&&console.warn(\"unable to use e.clipboardData\"),u&&console.warn(\"trying IE specific stuff\"),window.clipboardData.clearData();var x=w[i.format]||w.default;window.clipboardData.setData(x,s)}else _.clipboardData.clearData(),_.clipboardData.setData(i.format,s);i.onCopy&&(_.preventDefault(),i.onCopy(_.clipboardData))})),document.body.appendChild($),P.selectNodeContents($),B.addRange(P),!document.execCommand(\"copy\"))throw new Error(\"copy command was unsuccessful\");U=!0}catch(_){u&&console.error(\"unable to copy using execCommand: \",_),u&&console.warn(\"trying IE specific stuff\");try{window.clipboardData.setData(i.format||\"text\",s),i.onCopy&&i.onCopy(window.clipboardData),U=!0}catch(_){u&&console.error(\"unable to copy using clipboardData: \",_),u&&console.error(\"falling back to prompt\"),x=function format(s){var i=(/mac os x/i.test(navigator.userAgent)?\"⌘\":\"Ctrl\")+\"+C\";return s.replace(/#{\\s*key\\s*}/g,i)}(\"message\"in i?i.message:\"Copy to clipboard: #{key}, Enter\"),window.prompt(x,s)}}finally{B&&(\"function\"==typeof B.removeRange?B.removeRange(P):B.removeAllRanges()),$&&document.body.removeChild($),j()}return U}},2205:function(s,i,u){var _;_=void 0!==u.g?u.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var i,u=String(s),_=u.length,w=-1,x=\"\",j=u.charCodeAt(0);++w<_;)0!=(i=u.charCodeAt(w))?x+=i>=1&&i<=31||127==i||0==w&&i>=48&&i<=57||1==w&&i>=48&&i<=57&&45==j?\"\\\\\"+i.toString(16)+\" \":0==w&&1==_&&45==i||!(i>=128||45==i||95==i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122)?\"\\\\\"+u.charAt(w):u.charAt(w):x+=\"�\";return x};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(_)},81919:(s,i,u)=>{\"use strict\";var _=u(48287).Buffer;function isSpecificValue(s){return s instanceof _||s instanceof Date||s instanceof RegExp}function cloneSpecificValue(s){if(s instanceof _){var i=_.alloc?_.alloc(s.length):new _(s.length);return s.copy(i),i}if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error(\"Unexpected situation\")}function deepCloneArray(s){var i=[];return s.forEach((function(s,u){\"object\"==typeof s&&null!==s?Array.isArray(s)?i[u]=deepCloneArray(s):isSpecificValue(s)?i[u]=cloneSpecificValue(s):i[u]=w({},s):i[u]=s})),i}function safeGetProperty(s,i){return\"__proto__\"===i?void 0:s[i]}var w=s.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var s,i,u=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(_){\"object\"!=typeof _||null===_||Array.isArray(_)||Object.keys(_).forEach((function(x){return i=safeGetProperty(u,x),(s=safeGetProperty(_,x))===u?void 0:\"object\"!=typeof s||null===s?void(u[x]=s):Array.isArray(s)?void(u[x]=deepCloneArray(s)):isSpecificValue(s)?void(u[x]=cloneSpecificValue(s)):\"object\"!=typeof i||null===i||Array.isArray(i)?void(u[x]=w({},s)):void(u[x]=w(i,s))}))})),u}},14744:s=>{\"use strict\";var i=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&\"object\"==typeof s}(s)&&!function isSpecial(s){var i=Object.prototype.toString.call(s);return\"[object RegExp]\"===i||\"[object Date]\"===i||function isReactElement(s){return s.$$typeof===u}(s)}(s)};var u=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function cloneUnlessOtherwiseSpecified(s,i){return!1!==i.clone&&i.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,i):s}function defaultArrayMerge(s,i,u){return s.concat(i).map((function(s){return cloneUnlessOtherwiseSpecified(s,u)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(i){return Object.propertyIsEnumerable.call(s,i)})):[]}(s))}function propertyIsOnObject(s,i){try{return i in s}catch(s){return!1}}function mergeObject(s,i,u){var _={};return u.isMergeableObject(s)&&getKeys(s).forEach((function(i){_[i]=cloneUnlessOtherwiseSpecified(s[i],u)})),getKeys(i).forEach((function(w){(function propertyIsUnsafe(s,i){return propertyIsOnObject(s,i)&&!(Object.hasOwnProperty.call(s,i)&&Object.propertyIsEnumerable.call(s,i))})(s,w)||(propertyIsOnObject(s,w)&&u.isMergeableObject(i[w])?_[w]=function getMergeFunction(s,i){if(!i.customMerge)return deepmerge;var u=i.customMerge(s);return\"function\"==typeof u?u:deepmerge}(w,u)(s[w],i[w],u):_[w]=cloneUnlessOtherwiseSpecified(i[w],u))})),_}function deepmerge(s,u,_){(_=_||{}).arrayMerge=_.arrayMerge||defaultArrayMerge,_.isMergeableObject=_.isMergeableObject||i,_.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var w=Array.isArray(u);return w===Array.isArray(s)?w?_.arrayMerge(s,u,_):mergeObject(s,u,_):cloneUnlessOtherwiseSpecified(u,_)}deepmerge.all=function deepmergeAll(s,i){if(!Array.isArray(s))throw new Error(\"first argument should be an array\");return s.reduce((function(s,u){return deepmerge(s,u,i)}),{})};var _=deepmerge;s.exports=_},30041:(s,i,u)=>{\"use strict\";var _=u(30655),w=u(58068),x=u(69675),j=u(75795);s.exports=function defineDataProperty(s,i,u){if(!s||\"object\"!=typeof s&&\"function\"!=typeof s)throw new x(\"`obj` must be an object or a function`\");if(\"string\"!=typeof i&&\"symbol\"!=typeof i)throw new x(\"`property` must be a string or a symbol`\");if(arguments.length>3&&\"boolean\"!=typeof arguments[3]&&null!==arguments[3])throw new x(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&\"boolean\"!=typeof arguments[4]&&null!==arguments[4])throw new x(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&\"boolean\"!=typeof arguments[5]&&null!==arguments[5])throw new x(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&\"boolean\"!=typeof arguments[6])throw new x(\"`loose`, if provided, must be a boolean\");var P=arguments.length>3?arguments[3]:null,B=arguments.length>4?arguments[4]:null,$=arguments.length>5?arguments[5]:null,U=arguments.length>6&&arguments[6],Y=!!j&&j(s,i);if(_)_(s,i,{configurable:null===$&&Y?Y.configurable:!$,enumerable:null===P&&Y?Y.enumerable:!P,value:u,writable:null===B&&Y?Y.writable:!B});else{if(!U&&(P||B||$))throw new w(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\");s[i]=u}}},42838:function(s){s.exports=function(){\"use strict\";const{entries:s,setPrototypeOf:i,isFrozen:u,getPrototypeOf:_,getOwnPropertyDescriptor:w}=Object;let{freeze:x,seal:j,create:P}=Object,{apply:B,construct:$}=\"undefined\"!=typeof Reflect&&Reflect;x||(x=function freeze(s){return s}),j||(j=function seal(s){return s}),B||(B=function apply(s,i,u){return s.apply(i,u)}),$||($=function construct(s,i){return new s(...i)});const U=unapply(Array.prototype.forEach),Y=unapply(Array.prototype.pop),X=unapply(Array.prototype.push),Z=unapply(String.prototype.toLowerCase),ee=unapply(String.prototype.toString),ie=unapply(String.prototype.match),ae=unapply(String.prototype.replace),le=unapply(String.prototype.indexOf),ce=unapply(String.prototype.trim),pe=unapply(Object.prototype.hasOwnProperty),de=unapply(RegExp.prototype.test),fe=unconstruct(TypeError);function unapply(s){return function(i){for(var u=arguments.length,_=new Array(u>1?u-1:0),w=1;w<u;w++)_[w-1]=arguments[w];return B(s,i,_)}}function unconstruct(s){return function(){for(var i=arguments.length,u=new Array(i),_=0;_<i;_++)u[_]=arguments[_];return $(s,u)}}function addToSet(s,_){let w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z;i&&i(s,null);let x=_.length;for(;x--;){let i=_[x];if(\"string\"==typeof i){const s=w(i);s!==i&&(u(_)||(_[x]=s),i=s)}s[i]=!0}return s}function cleanArray(s){for(let i=0;i<s.length;i++)pe(s,i)||(s[i]=null);return s}function clone(i){const u=P(null);for(const[_,w]of s(i))pe(i,_)&&(Array.isArray(w)?u[_]=cleanArray(w):w&&\"object\"==typeof w&&w.constructor===Object?u[_]=clone(w):u[_]=w);return u}function lookupGetter(s,i){for(;null!==s;){const u=w(s,i);if(u){if(u.get)return unapply(u.get);if(\"function\"==typeof u.value)return unapply(u.value)}s=_(s)}function fallbackValue(){return null}return fallbackValue}const ye=x([\"a\",\"abbr\",\"acronym\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"big\",\"blink\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"content\",\"data\",\"datalist\",\"dd\",\"decorator\",\"del\",\"details\",\"dfn\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"element\",\"em\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meter\",\"nav\",\"nobr\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"select\",\"shadow\",\"small\",\"source\",\"spacer\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]),be=x([\"svg\",\"a\",\"altglyph\",\"altglyphdef\",\"altglyphitem\",\"animatecolor\",\"animatemotion\",\"animatetransform\",\"circle\",\"clippath\",\"defs\",\"desc\",\"ellipse\",\"filter\",\"font\",\"g\",\"glyph\",\"glyphref\",\"hkern\",\"image\",\"line\",\"lineargradient\",\"marker\",\"mask\",\"metadata\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialgradient\",\"rect\",\"stop\",\"style\",\"switch\",\"symbol\",\"text\",\"textpath\",\"title\",\"tref\",\"tspan\",\"view\",\"vkern\"]),_e=x([\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\"]),we=x([\"animate\",\"color-profile\",\"cursor\",\"discard\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignobject\",\"hatch\",\"hatchpath\",\"mesh\",\"meshgradient\",\"meshpatch\",\"meshrow\",\"missing-glyph\",\"script\",\"set\",\"solidcolor\",\"unknown\",\"use\"]),Se=x([\"math\",\"menclose\",\"merror\",\"mfenced\",\"mfrac\",\"mglyph\",\"mi\",\"mlabeledtr\",\"mmultiscripts\",\"mn\",\"mo\",\"mover\",\"mpadded\",\"mphantom\",\"mroot\",\"mrow\",\"ms\",\"mspace\",\"msqrt\",\"mstyle\",\"msub\",\"msup\",\"msubsup\",\"mtable\",\"mtd\",\"mtext\",\"mtr\",\"munder\",\"munderover\",\"mprescripts\"]),xe=x([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),Pe=x([\"#text\"]),Te=x([\"accept\",\"action\",\"align\",\"alt\",\"autocapitalize\",\"autocomplete\",\"autopictureinpicture\",\"autoplay\",\"background\",\"bgcolor\",\"border\",\"capture\",\"cellpadding\",\"cellspacing\",\"checked\",\"cite\",\"class\",\"clear\",\"color\",\"cols\",\"colspan\",\"controls\",\"controlslist\",\"coords\",\"crossorigin\",\"datetime\",\"decoding\",\"default\",\"dir\",\"disabled\",\"disablepictureinpicture\",\"disableremoteplayback\",\"download\",\"draggable\",\"enctype\",\"enterkeyhint\",\"face\",\"for\",\"headers\",\"height\",\"hidden\",\"high\",\"href\",\"hreflang\",\"id\",\"inputmode\",\"integrity\",\"ismap\",\"kind\",\"label\",\"lang\",\"list\",\"loading\",\"loop\",\"low\",\"max\",\"maxlength\",\"media\",\"method\",\"min\",\"minlength\",\"multiple\",\"muted\",\"name\",\"nonce\",\"noshade\",\"novalidate\",\"nowrap\",\"open\",\"optimum\",\"pattern\",\"placeholder\",\"playsinline\",\"poster\",\"preload\",\"pubdate\",\"radiogroup\",\"readonly\",\"rel\",\"required\",\"rev\",\"reversed\",\"role\",\"rows\",\"rowspan\",\"spellcheck\",\"scope\",\"selected\",\"shape\",\"size\",\"sizes\",\"span\",\"srclang\",\"start\",\"src\",\"srcset\",\"step\",\"style\",\"summary\",\"tabindex\",\"title\",\"translate\",\"type\",\"usemap\",\"valign\",\"value\",\"width\",\"xmlns\",\"slot\"]),Re=x([\"accent-height\",\"accumulate\",\"additive\",\"alignment-baseline\",\"ascent\",\"attributename\",\"attributetype\",\"azimuth\",\"basefrequency\",\"baseline-shift\",\"begin\",\"bias\",\"by\",\"class\",\"clip\",\"clippathunits\",\"clip-path\",\"clip-rule\",\"color\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"cx\",\"cy\",\"d\",\"dx\",\"dy\",\"diffuseconstant\",\"direction\",\"display\",\"divisor\",\"dur\",\"edgemode\",\"elevation\",\"end\",\"fill\",\"fill-opacity\",\"fill-rule\",\"filter\",\"filterunits\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"fx\",\"fy\",\"g1\",\"g2\",\"glyph-name\",\"glyphref\",\"gradientunits\",\"gradienttransform\",\"height\",\"href\",\"id\",\"image-rendering\",\"in\",\"in2\",\"k\",\"k1\",\"k2\",\"k3\",\"k4\",\"kerning\",\"keypoints\",\"keysplines\",\"keytimes\",\"lang\",\"lengthadjust\",\"letter-spacing\",\"kernelmatrix\",\"kernelunitlength\",\"lighting-color\",\"local\",\"marker-end\",\"marker-mid\",\"marker-start\",\"markerheight\",\"markerunits\",\"markerwidth\",\"maskcontentunits\",\"maskunits\",\"max\",\"mask\",\"media\",\"method\",\"mode\",\"min\",\"name\",\"numoctaves\",\"offset\",\"operator\",\"opacity\",\"order\",\"orient\",\"orientation\",\"origin\",\"overflow\",\"paint-order\",\"path\",\"pathlength\",\"patterncontentunits\",\"patterntransform\",\"patternunits\",\"points\",\"preservealpha\",\"preserveaspectratio\",\"primitiveunits\",\"r\",\"rx\",\"ry\",\"radius\",\"refx\",\"refy\",\"repeatcount\",\"repeatdur\",\"restart\",\"result\",\"rotate\",\"scale\",\"seed\",\"shape-rendering\",\"specularconstant\",\"specularexponent\",\"spreadmethod\",\"startoffset\",\"stddeviation\",\"stitchtiles\",\"stop-color\",\"stop-opacity\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke\",\"stroke-width\",\"style\",\"surfacescale\",\"systemlanguage\",\"tabindex\",\"targetx\",\"targety\",\"transform\",\"transform-origin\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"textlength\",\"type\",\"u1\",\"u2\",\"unicode\",\"values\",\"viewbox\",\"visibility\",\"version\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"width\",\"word-spacing\",\"wrap\",\"writing-mode\",\"xchannelselector\",\"ychannelselector\",\"x\",\"x1\",\"x2\",\"xmlns\",\"y\",\"y1\",\"y2\",\"z\",\"zoomandpan\"]),qe=x([\"accent\",\"accentunder\",\"align\",\"bevelled\",\"close\",\"columnsalign\",\"columnlines\",\"columnspan\",\"denomalign\",\"depth\",\"dir\",\"display\",\"displaystyle\",\"encoding\",\"fence\",\"frame\",\"height\",\"href\",\"id\",\"largeop\",\"length\",\"linethickness\",\"lspace\",\"lquote\",\"mathbackground\",\"mathcolor\",\"mathsize\",\"mathvariant\",\"maxsize\",\"minsize\",\"movablelimits\",\"notation\",\"numalign\",\"open\",\"rowalign\",\"rowlines\",\"rowspacing\",\"rowspan\",\"rspace\",\"rquote\",\"scriptlevel\",\"scriptminsize\",\"scriptsizemultiplier\",\"selection\",\"separator\",\"separators\",\"stretchy\",\"subscriptshift\",\"supscriptshift\",\"symmetric\",\"voffset\",\"width\",\"xmlns\"]),$e=x([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),ze=j(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),We=j(/<%[\\w\\W]*|[\\w\\W]*%>/gm),He=j(/\\${[\\w\\W]*}/gm),Ye=j(/^data-[\\-\\w.\\u00B7-\\uFFFF]/),Xe=j(/^aria-[\\-\\w]+$/),Qe=j(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),et=j(/^(?:\\w+script|data):/i),tt=j(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),rt=j(/^html$/i),nt=j(/^[a-z][.\\w]*(-[.\\w]+)+$/i);var ot=Object.freeze({__proto__:null,MUSTACHE_EXPR:ze,ERB_EXPR:We,TMPLIT_EXPR:He,DATA_ATTR:Ye,ARIA_ATTR:Xe,IS_ALLOWED_URI:Qe,IS_SCRIPT_OR_DATA:et,ATTR_WHITESPACE:tt,DOCTYPE_NAME:rt,CUSTOM_ELEMENT:nt});const st=function getGlobal(){return\"undefined\"==typeof window?null:window},it=function _createTrustedTypesPolicy(s,i){if(\"object\"!=typeof s||\"function\"!=typeof s.createPolicy)return null;let u=null;const _=\"data-tt-policy-suffix\";i&&i.hasAttribute(_)&&(u=i.getAttribute(_));const w=\"dompurify\"+(u?\"#\"+u:\"\");try{return s.createPolicy(w,{createHTML:s=>s,createScriptURL:s=>s})}catch(s){return console.warn(\"TrustedTypes policy \"+w+\" could not be created.\"),null}};function createDOMPurify(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const DOMPurify=s=>createDOMPurify(s);if(DOMPurify.version=\"3.0.11\",DOMPurify.removed=[],!i||!i.document||9!==i.document.nodeType)return DOMPurify.isSupported=!1,DOMPurify;let{document:u}=i;const _=u,w=_.currentScript,{DocumentFragment:j,HTMLTemplateElement:B,Node:$,Element:ze,NodeFilter:We,NamedNodeMap:He=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:Ye,DOMParser:Xe,trustedTypes:et}=i,tt=ze.prototype,nt=lookupGetter(tt,\"cloneNode\"),at=lookupGetter(tt,\"nextSibling\"),lt=lookupGetter(tt,\"childNodes\"),ct=lookupGetter(tt,\"parentNode\");if(\"function\"==typeof B){const s=u.createElement(\"template\");s.content&&s.content.ownerDocument&&(u=s.content.ownerDocument)}let ut,pt=\"\";const{implementation:ht,createNodeIterator:dt,createDocumentFragment:mt,getElementsByTagName:gt}=u,{importNode:yt}=_;let vt={};DOMPurify.isSupported=\"function\"==typeof s&&\"function\"==typeof ct&&ht&&void 0!==ht.createHTMLDocument;const{MUSTACHE_EXPR:bt,ERB_EXPR:_t,TMPLIT_EXPR:Et,DATA_ATTR:wt,ARIA_ATTR:St,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:Ot}=ot;let{IS_ALLOWED_URI:Ct}=ot,At=null;const jt=addToSet({},[...ye,...be,..._e,...Se,...Pe]);let Pt=null;const It=addToSet({},[...Te,...Re,...qe,...$e]);let Nt=Object.seal(P(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Mt=null,Tt=null,Rt=!0,Dt=!0,Bt=!1,Lt=!0,Ft=!1,qt=!1,$t=!1,Ut=!1,zt=!1,Vt=!1,Wt=!1,Kt=!0,Ht=!1;const Jt=\"user-content-\";let Gt=!0,Yt=!1,Xt={},Qt=null;const Zt=addToSet({},[\"annotation-xml\",\"audio\",\"colgroup\",\"desc\",\"foreignobject\",\"head\",\"iframe\",\"math\",\"mi\",\"mn\",\"mo\",\"ms\",\"mtext\",\"noembed\",\"noframes\",\"noscript\",\"plaintext\",\"script\",\"style\",\"svg\",\"template\",\"thead\",\"title\",\"video\",\"xmp\"]);let er=null;const tr=addToSet({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]);let rr=null;const nr=addToSet({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),sr=\"http://www.w3.org/1998/Math/MathML\",ir=\"http://www.w3.org/2000/svg\",ar=\"http://www.w3.org/1999/xhtml\";let lr=ar,cr=!1,ur=null;const pr=addToSet({},[sr,ir,ar],ee);let dr=null;const fr=[\"application/xhtml+xml\",\"text/html\"],mr=\"text/html\";let gr=null,yr=null;const vr=u.createElement(\"form\"),br=function isRegexOrFunction(s){return s instanceof RegExp||s instanceof Function},_r=function _parseConfig(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!yr||yr!==s){if(s&&\"object\"==typeof s||(s={}),s=clone(s),dr=-1===fr.indexOf(s.PARSER_MEDIA_TYPE)?mr:s.PARSER_MEDIA_TYPE,gr=\"application/xhtml+xml\"===dr?ee:Z,At=pe(s,\"ALLOWED_TAGS\")?addToSet({},s.ALLOWED_TAGS,gr):jt,Pt=pe(s,\"ALLOWED_ATTR\")?addToSet({},s.ALLOWED_ATTR,gr):It,ur=pe(s,\"ALLOWED_NAMESPACES\")?addToSet({},s.ALLOWED_NAMESPACES,ee):pr,rr=pe(s,\"ADD_URI_SAFE_ATTR\")?addToSet(clone(nr),s.ADD_URI_SAFE_ATTR,gr):nr,er=pe(s,\"ADD_DATA_URI_TAGS\")?addToSet(clone(tr),s.ADD_DATA_URI_TAGS,gr):tr,Qt=pe(s,\"FORBID_CONTENTS\")?addToSet({},s.FORBID_CONTENTS,gr):Zt,Mt=pe(s,\"FORBID_TAGS\")?addToSet({},s.FORBID_TAGS,gr):{},Tt=pe(s,\"FORBID_ATTR\")?addToSet({},s.FORBID_ATTR,gr):{},Xt=!!pe(s,\"USE_PROFILES\")&&s.USE_PROFILES,Rt=!1!==s.ALLOW_ARIA_ATTR,Dt=!1!==s.ALLOW_DATA_ATTR,Bt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==s.ALLOW_SELF_CLOSE_IN_ATTR,Ft=s.SAFE_FOR_TEMPLATES||!1,qt=s.WHOLE_DOCUMENT||!1,zt=s.RETURN_DOM||!1,Vt=s.RETURN_DOM_FRAGMENT||!1,Wt=s.RETURN_TRUSTED_TYPE||!1,Ut=s.FORCE_BODY||!1,Kt=!1!==s.SANITIZE_DOM,Ht=s.SANITIZE_NAMED_PROPS||!1,Gt=!1!==s.KEEP_CONTENT,Yt=s.IN_PLACE||!1,Ct=s.ALLOWED_URI_REGEXP||Qe,lr=s.NAMESPACE||ar,Nt=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&br(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Nt.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&br(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Nt.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Nt.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Dt=!1),Vt&&(zt=!0),Xt&&(At=addToSet({},Pe),Pt=[],!0===Xt.html&&(addToSet(At,ye),addToSet(Pt,Te)),!0===Xt.svg&&(addToSet(At,be),addToSet(Pt,Re),addToSet(Pt,$e)),!0===Xt.svgFilters&&(addToSet(At,_e),addToSet(Pt,Re),addToSet(Pt,$e)),!0===Xt.mathMl&&(addToSet(At,Se),addToSet(Pt,qe),addToSet(Pt,$e))),s.ADD_TAGS&&(At===jt&&(At=clone(At)),addToSet(At,s.ADD_TAGS,gr)),s.ADD_ATTR&&(Pt===It&&(Pt=clone(Pt)),addToSet(Pt,s.ADD_ATTR,gr)),s.ADD_URI_SAFE_ATTR&&addToSet(rr,s.ADD_URI_SAFE_ATTR,gr),s.FORBID_CONTENTS&&(Qt===Zt&&(Qt=clone(Qt)),addToSet(Qt,s.FORBID_CONTENTS,gr)),Gt&&(At[\"#text\"]=!0),qt&&addToSet(At,[\"html\",\"head\",\"body\"]),At.table&&(addToSet(At,[\"tbody\"]),delete Mt.tbody),s.TRUSTED_TYPES_POLICY){if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createHTML)throw fe('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createScriptURL)throw fe('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');ut=s.TRUSTED_TYPES_POLICY,pt=ut.createHTML(\"\")}else void 0===ut&&(ut=it(et,w)),null!==ut&&\"string\"==typeof pt&&(pt=ut.createHTML(\"\"));x&&x(s),yr=s}},Er=addToSet({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),wr=addToSet({},[\"foreignobject\",\"desc\",\"title\",\"annotation-xml\"]),Sr=addToSet({},[\"title\",\"style\",\"font\",\"a\",\"script\"]),xr=addToSet({},[...be,..._e,...we]),kr=addToSet({},[...Se,...xe]),Or=function _checkValidNamespace(s){let i=ct(s);i&&i.tagName||(i={namespaceURI:lr,tagName:\"template\"});const u=Z(s.tagName),_=Z(i.tagName);return!!ur[s.namespaceURI]&&(s.namespaceURI===ir?i.namespaceURI===ar?\"svg\"===u:i.namespaceURI===sr?\"svg\"===u&&(\"annotation-xml\"===_||Er[_]):Boolean(xr[u]):s.namespaceURI===sr?i.namespaceURI===ar?\"math\"===u:i.namespaceURI===ir?\"math\"===u&&wr[_]:Boolean(kr[u]):s.namespaceURI===ar?!(i.namespaceURI===ir&&!wr[_])&&!(i.namespaceURI===sr&&!Er[_])&&!kr[u]&&(Sr[u]||!xr[u]):!(\"application/xhtml+xml\"!==dr||!ur[s.namespaceURI]))},Cr=function _forceRemove(s){X(DOMPurify.removed,{element:s});try{s.parentNode.removeChild(s)}catch(i){s.remove()}},Ar=function _removeAttribute(s,i){try{X(DOMPurify.removed,{attribute:i.getAttributeNode(s),from:i})}catch(s){X(DOMPurify.removed,{attribute:null,from:i})}if(i.removeAttribute(s),\"is\"===s&&!Pt[s])if(zt||Vt)try{Cr(i)}catch(s){}else try{i.setAttribute(s,\"\")}catch(s){}},jr=function _initDocument(s){let i=null,_=null;if(Ut)s=\"<remove></remove>\"+s;else{const i=ie(s,/^[\\r\\n\\t ]+/);_=i&&i[0]}\"application/xhtml+xml\"===dr&&lr===ar&&(s='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+s+\"</body></html>\");const w=ut?ut.createHTML(s):s;if(lr===ar)try{i=(new Xe).parseFromString(w,dr)}catch(s){}if(!i||!i.documentElement){i=ht.createDocument(lr,\"template\",null);try{i.documentElement.innerHTML=cr?pt:w}catch(s){}}const x=i.body||i.documentElement;return s&&_&&x.insertBefore(u.createTextNode(_),x.childNodes[0]||null),lr===ar?gt.call(i,qt?\"html\":\"body\")[0]:qt?i.documentElement:x},Pr=function _createNodeIterator(s){return dt.call(s.ownerDocument||s,s,We.SHOW_ELEMENT|We.SHOW_COMMENT|We.SHOW_TEXT|We.SHOW_PROCESSING_INSTRUCTION|We.SHOW_CDATA_SECTION,null)},Ir=function _isClobbered(s){return s instanceof Ye&&(\"string\"!=typeof s.nodeName||\"string\"!=typeof s.textContent||\"function\"!=typeof s.removeChild||!(s.attributes instanceof He)||\"function\"!=typeof s.removeAttribute||\"function\"!=typeof s.setAttribute||\"string\"!=typeof s.namespaceURI||\"function\"!=typeof s.insertBefore||\"function\"!=typeof s.hasChildNodes)},Nr=function _isNode(s){return\"function\"==typeof $&&s instanceof $},Mr=function _executeHook(s,i,u){vt[s]&&U(vt[s],(s=>{s.call(DOMPurify,i,u,yr)}))},Tr=function _sanitizeElements(s){let i=null;if(Mr(\"beforeSanitizeElements\",s,null),Ir(s))return Cr(s),!0;const u=gr(s.nodeName);if(Mr(\"uponSanitizeElement\",s,{tagName:u,allowedTags:At}),s.hasChildNodes()&&!Nr(s.firstElementChild)&&de(/<[/\\w]/g,s.innerHTML)&&de(/<[/\\w]/g,s.textContent))return Cr(s),!0;if(7===s.nodeType)return Cr(s),!0;if(!At[u]||Mt[u]){if(!Mt[u]&&Dr(u)){if(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,u))return!1;if(Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(u))return!1}if(Gt&&!Qt[u]){const i=ct(s)||s.parentNode,u=lt(s)||s.childNodes;if(u&&i)for(let _=u.length-1;_>=0;--_)i.insertBefore(nt(u[_],!0),at(s))}return Cr(s),!0}return s instanceof ze&&!Or(s)?(Cr(s),!0):\"noscript\"!==u&&\"noembed\"!==u&&\"noframes\"!==u||!de(/<\\/no(script|embed|frames)/i,s.innerHTML)?(Ft&&3===s.nodeType&&(i=s.textContent,U([bt,_t,Et],(s=>{i=ae(i,s,\" \")})),s.textContent!==i&&(X(DOMPurify.removed,{element:s.cloneNode()}),s.textContent=i)),Mr(\"afterSanitizeElements\",s,null),!1):(Cr(s),!0)},Rr=function _isValidAttribute(s,i,_){if(Kt&&(\"id\"===i||\"name\"===i)&&(_ in u||_ in vr))return!1;if(Dt&&!Tt[i]&&de(wt,i));else if(Rt&&de(St,i));else if(!Pt[i]||Tt[i]){if(!(Dr(s)&&(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,s)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(s))&&(Nt.attributeNameCheck instanceof RegExp&&de(Nt.attributeNameCheck,i)||Nt.attributeNameCheck instanceof Function&&Nt.attributeNameCheck(i))||\"is\"===i&&Nt.allowCustomizedBuiltInElements&&(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,_)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(_))))return!1}else if(rr[i]);else if(de(Ct,ae(_,kt,\"\")));else if(\"src\"!==i&&\"xlink:href\"!==i&&\"href\"!==i||\"script\"===s||0!==le(_,\"data:\")||!er[s])if(Bt&&!de(xt,ae(_,kt,\"\")));else if(_)return!1;return!0},Dr=function _isBasicCustomElement(s){return\"annotation-xml\"!==s&&ie(s,Ot)},Br=function _sanitizeAttributes(s){Mr(\"beforeSanitizeAttributes\",s,null);const{attributes:i}=s;if(!i)return;const u={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:Pt};let _=i.length;for(;_--;){const w=i[_],{name:x,namespaceURI:j,value:P}=w,B=gr(x);let $=\"value\"===x?P:ce(P);if(u.attrName=B,u.attrValue=$,u.keepAttr=!0,u.forceKeepAttr=void 0,Mr(\"uponSanitizeAttribute\",s,u),$=u.attrValue,u.forceKeepAttr)continue;if(Ar(x,s),!u.keepAttr)continue;if(!Lt&&de(/\\/>/i,$)){Ar(x,s);continue}Ft&&U([bt,_t,Et],(s=>{$=ae($,s,\" \")}));const X=gr(s.nodeName);if(Rr(X,B,$)){if(!Ht||\"id\"!==B&&\"name\"!==B||(Ar(x,s),$=Jt+$),ut&&\"object\"==typeof et&&\"function\"==typeof et.getAttributeType)if(j);else switch(et.getAttributeType(X,B)){case\"TrustedHTML\":$=ut.createHTML($);break;case\"TrustedScriptURL\":$=ut.createScriptURL($)}try{j?s.setAttributeNS(j,x,$):s.setAttribute(x,$),Y(DOMPurify.removed)}catch(s){}}}Mr(\"afterSanitizeAttributes\",s,null)},Lr=function _sanitizeShadowDOM(s){let i=null;const u=Pr(s);for(Mr(\"beforeSanitizeShadowDOM\",s,null);i=u.nextNode();)Mr(\"uponSanitizeShadowNode\",i,null),Tr(i)||(i.content instanceof j&&_sanitizeShadowDOM(i.content),Br(i));Mr(\"afterSanitizeShadowDOM\",s,null)};return DOMPurify.sanitize=function(s){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=null,w=null,x=null,P=null;if(cr=!s,cr&&(s=\"\\x3c!--\\x3e\"),\"string\"!=typeof s&&!Nr(s)){if(\"function\"!=typeof s.toString)throw fe(\"toString is not a function\");if(\"string\"!=typeof(s=s.toString()))throw fe(\"dirty is not a string, aborting\")}if(!DOMPurify.isSupported)return s;if($t||_r(i),DOMPurify.removed=[],\"string\"==typeof s&&(Yt=!1),Yt){if(s.nodeName){const i=gr(s.nodeName);if(!At[i]||Mt[i])throw fe(\"root node is forbidden and cannot be sanitized in-place\")}}else if(s instanceof $)u=jr(\"\\x3c!----\\x3e\"),w=u.ownerDocument.importNode(s,!0),1===w.nodeType&&\"BODY\"===w.nodeName||\"HTML\"===w.nodeName?u=w:u.appendChild(w);else{if(!zt&&!Ft&&!qt&&-1===s.indexOf(\"<\"))return ut&&Wt?ut.createHTML(s):s;if(u=jr(s),!u)return zt?null:Wt?pt:\"\"}u&&Ut&&Cr(u.firstChild);const B=Pr(Yt?s:u);for(;x=B.nextNode();)Tr(x)||(x.content instanceof j&&Lr(x.content),Br(x));if(Yt)return s;if(zt){if(Vt)for(P=mt.call(u.ownerDocument);u.firstChild;)P.appendChild(u.firstChild);else P=u;return(Pt.shadowroot||Pt.shadowrootmode)&&(P=yt.call(_,P,!0)),P}let Y=qt?u.outerHTML:u.innerHTML;return qt&&At[\"!doctype\"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&de(rt,u.ownerDocument.doctype.name)&&(Y=\"<!DOCTYPE \"+u.ownerDocument.doctype.name+\">\\n\"+Y),Ft&&U([bt,_t,Et],(s=>{Y=ae(Y,s,\" \")})),ut&&Wt?ut.createHTML(Y):Y},DOMPurify.setConfig=function(){_r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),$t=!0},DOMPurify.clearConfig=function(){yr=null,$t=!1},DOMPurify.isValidAttribute=function(s,i,u){yr||_r({});const _=gr(s),w=gr(i);return Rr(_,w,u)},DOMPurify.addHook=function(s,i){\"function\"==typeof i&&(vt[s]=vt[s]||[],X(vt[s],i))},DOMPurify.removeHook=function(s){if(vt[s])return Y(vt[s])},DOMPurify.removeHooks=function(s){vt[s]&&(vt[s]=[])},DOMPurify.removeAllHooks=function(){vt={}},DOMPurify}return createDOMPurify()}()},78004:s=>{\"use strict\";class SubRange{constructor(s,i){this.low=s,this.high=i,this.length=1+i-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.low&&s.high<this.high?[new SubRange(this.low,s.low-1),new SubRange(s.high+1,this.high)]:s.low<=this.low?[new SubRange(s.high+1,this.high)]:[new SubRange(this.low,s.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+\"-\"+this.high}}class DRange{constructor(s,i){this.ranges=[],this.length=0,null!=s&&this.add(s,i)}_update_length(){this.length=this.ranges.reduce(((s,i)=>s+i.length),0)}add(s,i){var _add=s=>{for(var i=0;i<this.ranges.length&&!s.touches(this.ranges[i]);)i++;for(var u=this.ranges.slice(0,i);i<this.ranges.length&&s.touches(this.ranges[i]);)s=s.add(this.ranges[i]),i++;u.push(s),this.ranges=u.concat(this.ranges.slice(i)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_add):(null==i&&(i=s),_add(new SubRange(s,i))),this}subtract(s,i){var _subtract=s=>{for(var i=0;i<this.ranges.length&&!s.overlaps(this.ranges[i]);)i++;for(var u=this.ranges.slice(0,i);i<this.ranges.length&&s.overlaps(this.ranges[i]);)u=u.concat(this.ranges[i].subtract(s)),i++;this.ranges=u.concat(this.ranges.slice(i)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_subtract):(null==i&&(i=s),_subtract(new SubRange(s,i))),this}intersect(s,i){var u=[],_intersect=s=>{for(var i=0;i<this.ranges.length&&!s.overlaps(this.ranges[i]);)i++;for(;i<this.ranges.length&&s.overlaps(this.ranges[i]);){var _=Math.max(this.ranges[i].low,s.low),w=Math.min(this.ranges[i].high,s.high);u.push(new SubRange(_,w)),i++}};return s instanceof DRange?s.ranges.forEach(_intersect):(null==i&&(i=s),_intersect(new SubRange(s,i))),this.ranges=u,this._update_length(),this}index(s){for(var i=0;i<this.ranges.length&&this.ranges[i].length<=s;)s-=this.ranges[i].length,i++;return this.ranges[i].low+s}toString(){return\"[ \"+this.ranges.join(\", \")+\" ]\"}clone(){return new DRange(this)}numbers(){return this.ranges.reduce(((s,i)=>{for(var u=i.low;u<=i.high;)s.push(u),u++;return s}),[])}subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:1+s.high-s.low})))}}s.exports=DRange},30655:(s,i,u)=>{\"use strict\";var _=u(70453)(\"%Object.defineProperty%\",!0)||!1;if(_)try{_({},\"a\",{value:1})}catch(s){_=!1}s.exports=_},41237:s=>{\"use strict\";s.exports=EvalError},69383:s=>{\"use strict\";s.exports=Error},79290:s=>{\"use strict\";s.exports=RangeError},79538:s=>{\"use strict\";s.exports=ReferenceError},58068:s=>{\"use strict\";s.exports=SyntaxError},69675:s=>{\"use strict\";s.exports=TypeError},35345:s=>{\"use strict\";s.exports=URIError},37007:s=>{\"use strict\";var i,u=\"object\"==typeof Reflect?Reflect:null,_=u&&\"function\"==typeof u.apply?u.apply:function ReflectApply(s,i,u){return Function.prototype.apply.call(s,i,u)};i=u&&\"function\"==typeof u.ownKeys?u.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s)};var w=Number.isNaN||function NumberIsNaN(s){return s!=s};function EventEmitter(){EventEmitter.init.call(this)}s.exports=EventEmitter,s.exports.once=function once(s,i){return new Promise((function(u,_){function errorListener(u){s.removeListener(i,resolver),_(u)}function resolver(){\"function\"==typeof s.removeListener&&s.removeListener(\"error\",errorListener),u([].slice.call(arguments))}eventTargetAgnosticAddListener(s,i,resolver,{once:!0}),\"error\"!==i&&function addErrorHandlerIfEventEmitter(s,i,u){\"function\"==typeof s.on&&eventTargetAgnosticAddListener(s,\"error\",i,u)}(s,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var x=10;function checkListener(s){if(\"function\"!=typeof s)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof s)}function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitter.defaultMaxListeners:s._maxListeners}function _addListener(s,i,u,_){var w,x,j;if(checkListener(u),void 0===(x=s._events)?(x=s._events=Object.create(null),s._eventsCount=0):(void 0!==x.newListener&&(s.emit(\"newListener\",i,u.listener?u.listener:u),x=s._events),j=x[i]),void 0===j)j=x[i]=u,++s._eventsCount;else if(\"function\"==typeof j?j=x[i]=_?[u,j]:[j,u]:_?j.unshift(u):j.push(u),(w=_getMaxListeners(s))>0&&j.length>w&&!j.warned){j.warned=!0;var P=new Error(\"Possible EventEmitter memory leak detected. \"+j.length+\" \"+String(i)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");P.name=\"MaxListenersExceededWarning\",P.emitter=s,P.type=i,P.count=j.length,function ProcessEmitWarning(s){console&&console.warn&&console.warn(s)}(P)}return s}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(s,i,u){var _={fired:!1,wrapFn:void 0,target:s,type:i,listener:u},w=onceWrapper.bind(_);return w.listener=u,_.wrapFn=w,w}function _listeners(s,i,u){var _=s._events;if(void 0===_)return[];var w=_[i];return void 0===w?[]:\"function\"==typeof w?u?[w.listener||w]:[w]:u?function unwrapListeners(s){for(var i=new Array(s.length),u=0;u<i.length;++u)i[u]=s[u].listener||s[u];return i}(w):arrayClone(w,w.length)}function listenerCount(s){var i=this._events;if(void 0!==i){var u=i[s];if(\"function\"==typeof u)return 1;if(void 0!==u)return u.length}return 0}function arrayClone(s,i){for(var u=new Array(i),_=0;_<i;++_)u[_]=s[_];return u}function eventTargetAgnosticAddListener(s,i,u,_){if(\"function\"==typeof s.on)_.once?s.once(i,u):s.on(i,u);else{if(\"function\"!=typeof s.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof s);s.addEventListener(i,(function wrapListener(w){_.once&&s.removeEventListener(i,wrapListener),u(w)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return x},set:function(s){if(\"number\"!=typeof s||s<0||w(s))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+s+\".\");x=s}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(s){if(\"number\"!=typeof s||s<0||w(s))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+s+\".\");return this._maxListeners=s,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(s){for(var i=[],u=1;u<arguments.length;u++)i.push(arguments[u]);var w=\"error\"===s,x=this._events;if(void 0!==x)w=w&&void 0===x.error;else if(!w)return!1;if(w){var j;if(i.length>0&&(j=i[0]),j instanceof Error)throw j;var P=new Error(\"Unhandled error.\"+(j?\" (\"+j.message+\")\":\"\"));throw P.context=j,P}var B=x[s];if(void 0===B)return!1;if(\"function\"==typeof B)_(B,this,i);else{var $=B.length,U=arrayClone(B,$);for(u=0;u<$;++u)_(U[u],this,i)}return!0},EventEmitter.prototype.addListener=function addListener(s,i){return _addListener(this,s,i,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(s,i){return _addListener(this,s,i,!0)},EventEmitter.prototype.once=function once(s,i){return checkListener(i),this.on(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(s,i){return checkListener(i),this.prependListener(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.removeListener=function removeListener(s,i){var u,_,w,x,j;if(checkListener(i),void 0===(_=this._events))return this;if(void 0===(u=_[s]))return this;if(u===i||u.listener===i)0==--this._eventsCount?this._events=Object.create(null):(delete _[s],_.removeListener&&this.emit(\"removeListener\",s,u.listener||i));else if(\"function\"!=typeof u){for(w=-1,x=u.length-1;x>=0;x--)if(u[x]===i||u[x].listener===i){j=u[x].listener,w=x;break}if(w<0)return this;0===w?u.shift():function spliceOne(s,i){for(;i+1<s.length;i++)s[i]=s[i+1];s.pop()}(u,w),1===u.length&&(_[s]=u[0]),void 0!==_.removeListener&&this.emit(\"removeListener\",s,j||i)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(s){var i,u,_;if(void 0===(u=this._events))return this;if(void 0===u.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==u[s]&&(0==--this._eventsCount?this._events=Object.create(null):delete u[s]),this;if(0===arguments.length){var w,x=Object.keys(u);for(_=0;_<x.length;++_)\"removeListener\"!==(w=x[_])&&this.removeAllListeners(w);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(i=u[s]))this.removeListener(s,i);else if(void 0!==i)for(_=i.length-1;_>=0;_--)this.removeListener(s,i[_]);return this},EventEmitter.prototype.listeners=function listeners(s){return _listeners(this,s,!0)},EventEmitter.prototype.rawListeners=function rawListeners(s){return _listeners(this,s,!1)},EventEmitter.listenerCount=function(s,i){return\"function\"==typeof s.listenerCount?s.listenerCount(i):listenerCount.call(s,i)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?i(this._events):[]}},85587:(s,i,u)=>{\"use strict\";var _=u(26311),w=create(Error);function create(s){return FormattedError.displayName=s.displayName||s.name,FormattedError;function FormattedError(i){return i&&(i=_.apply(null,arguments)),new s(i)}}s.exports=w,w.eval=create(EvalError),w.range=create(RangeError),w.reference=create(ReferenceError),w.syntax=create(SyntaxError),w.type=create(TypeError),w.uri=create(URIError),w.create=create},26311:s=>{!function(){var i;function format(s){for(var i,u,_,w,x=1,j=[].slice.call(arguments),P=0,B=s.length,$=\"\",U=!1,Y=!1,nextArg=function(){return j[x++]},slurpNumber=function(){for(var u=\"\";/\\d/.test(s[P]);)u+=s[P++],i=s[P];return u.length>0?parseInt(u):null};P<B;++P)if(i=s[P],U)switch(U=!1,\".\"==i?(Y=!1,i=s[++P]):\"0\"==i&&\".\"==s[P+1]?(Y=!0,i=s[P+=2]):Y=!0,w=slurpNumber(),i){case\"b\":$+=parseInt(nextArg(),10).toString(2);break;case\"c\":$+=\"string\"==typeof(u=nextArg())||u instanceof String?u:String.fromCharCode(parseInt(u,10));break;case\"d\":$+=parseInt(nextArg(),10);break;case\"f\":_=String(parseFloat(nextArg()).toFixed(w||6)),$+=Y?_:_.replace(/^0/,\"\");break;case\"j\":$+=JSON.stringify(nextArg());break;case\"o\":$+=\"0\"+parseInt(nextArg(),10).toString(8);break;case\"s\":$+=nextArg();break;case\"x\":$+=\"0x\"+parseInt(nextArg(),10).toString(16);break;case\"X\":$+=\"0x\"+parseInt(nextArg(),10).toString(16).toUpperCase();break;default:$+=i}else\"%\"===i?U=!0:$+=i;return $}(i=s.exports=format).format=format,i.vsprintf=function vsprintf(s,i){return format.apply(null,[s].concat(i))},\"undefined\"!=typeof console&&\"function\"==typeof console.log&&(i.printf=function printf(){console.log(format.apply(null,arguments))})}()},89353:s=>{\"use strict\";var i=Object.prototype.toString,u=Math.max,_=function concatty(s,i){for(var u=[],_=0;_<s.length;_+=1)u[_]=s[_];for(var w=0;w<i.length;w+=1)u[w+s.length]=i[w];return u};s.exports=function bind(s){var w=this;if(\"function\"!=typeof w||\"[object Function]\"!==i.apply(w))throw new TypeError(\"Function.prototype.bind called on incompatible \"+w);for(var x,j=function slicy(s,i){for(var u=[],_=i||0,w=0;_<s.length;_+=1,w+=1)u[w]=s[_];return u}(arguments,1),P=u(0,w.length-j.length),B=[],$=0;$<P;$++)B[$]=\"$\"+$;if(x=Function(\"binder\",\"return function (\"+function(s,i){for(var u=\"\",_=0;_<s.length;_+=1)u+=s[_],_+1<s.length&&(u+=i);return u}(B,\",\")+\"){ return binder.apply(this,arguments); }\")((function(){if(this instanceof x){var i=w.apply(this,_(j,arguments));return Object(i)===i?i:this}return w.apply(s,_(j,arguments))})),w.prototype){var U=function Empty(){};U.prototype=w.prototype,x.prototype=new U,U.prototype=null}return x}},66743:(s,i,u)=>{\"use strict\";var _=u(89353);s.exports=Function.prototype.bind||_},70453:(s,i,u)=>{\"use strict\";var _,w=u(69383),x=u(41237),j=u(79290),P=u(79538),B=u(58068),$=u(69675),U=u(35345),Y=Function,getEvalledConstructor=function(s){try{return Y('\"use strict\"; return ('+s+\").constructor;\")()}catch(s){}},X=Object.getOwnPropertyDescriptor;if(X)try{X({},\"\")}catch(s){X=null}var throwTypeError=function(){throw new $},Z=X?function(){try{return throwTypeError}catch(s){try{return X(arguments,\"callee\").get}catch(s){return throwTypeError}}}():throwTypeError,ee=u(64039)(),ie=u(80024)(),ae=Object.getPrototypeOf||(ie?function(s){return s.__proto__}:null),le={},ce=\"undefined\"!=typeof Uint8Array&&ae?ae(Uint8Array):_,pe={__proto__:null,\"%AggregateError%\":\"undefined\"==typeof AggregateError?_:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?_:ArrayBuffer,\"%ArrayIteratorPrototype%\":ee&&ae?ae([][Symbol.iterator]()):_,\"%AsyncFromSyncIteratorPrototype%\":_,\"%AsyncFunction%\":le,\"%AsyncGenerator%\":le,\"%AsyncGeneratorFunction%\":le,\"%AsyncIteratorPrototype%\":le,\"%Atomics%\":\"undefined\"==typeof Atomics?_:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?_:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?_:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?_:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?_:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":w,\"%eval%\":eval,\"%EvalError%\":x,\"%Float32Array%\":\"undefined\"==typeof Float32Array?_:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?_:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?_:FinalizationRegistry,\"%Function%\":Y,\"%GeneratorFunction%\":le,\"%Int8Array%\":\"undefined\"==typeof Int8Array?_:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?_:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?_:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":ee&&ae?ae(ae([][Symbol.iterator]())):_,\"%JSON%\":\"object\"==typeof JSON?JSON:_,\"%Map%\":\"undefined\"==typeof Map?_:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&ee&&ae?ae((new Map)[Symbol.iterator]()):_,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?_:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?_:Proxy,\"%RangeError%\":j,\"%ReferenceError%\":P,\"%Reflect%\":\"undefined\"==typeof Reflect?_:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?_:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&ee&&ae?ae((new Set)[Symbol.iterator]()):_,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?_:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":ee&&ae?ae(\"\"[Symbol.iterator]()):_,\"%Symbol%\":ee?Symbol:_,\"%SyntaxError%\":B,\"%ThrowTypeError%\":Z,\"%TypedArray%\":ce,\"%TypeError%\":$,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?_:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?_:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?_:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?_:Uint32Array,\"%URIError%\":U,\"%WeakMap%\":\"undefined\"==typeof WeakMap?_:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?_:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?_:WeakSet};if(ae)try{null.error}catch(s){var de=ae(ae(s));pe[\"%Error.prototype%\"]=de}var fe=function doEval(s){var i;if(\"%AsyncFunction%\"===s)i=getEvalledConstructor(\"async function () {}\");else if(\"%GeneratorFunction%\"===s)i=getEvalledConstructor(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===s)i=getEvalledConstructor(\"async function* () {}\");else if(\"%AsyncGenerator%\"===s){var u=doEval(\"%AsyncGeneratorFunction%\");u&&(i=u.prototype)}else if(\"%AsyncIteratorPrototype%\"===s){var _=doEval(\"%AsyncGenerator%\");_&&ae&&(i=ae(_.prototype))}return pe[s]=i,i},ye={__proto__:null,\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},be=u(66743),_e=u(9957),we=be.call(Function.call,Array.prototype.concat),Se=be.call(Function.apply,Array.prototype.splice),xe=be.call(Function.call,String.prototype.replace),Pe=be.call(Function.call,String.prototype.slice),Te=be.call(Function.call,RegExp.prototype.exec),Re=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,qe=/\\\\(\\\\)?/g,$e=function getBaseIntrinsic(s,i){var u,_=s;if(_e(ye,_)&&(_=\"%\"+(u=ye[_])[0]+\"%\"),_e(pe,_)){var w=pe[_];if(w===le&&(w=fe(_)),void 0===w&&!i)throw new $(\"intrinsic \"+s+\" exists, but is not available. Please file an issue!\");return{alias:u,name:_,value:w}}throw new B(\"intrinsic \"+s+\" does not exist!\")};s.exports=function GetIntrinsic(s,i){if(\"string\"!=typeof s||0===s.length)throw new $(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof i)throw new $('\"allowMissing\" argument must be a boolean');if(null===Te(/^%?[^%]*%?$/,s))throw new B(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var u=function stringToPath(s){var i=Pe(s,0,1),u=Pe(s,-1);if(\"%\"===i&&\"%\"!==u)throw new B(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===u&&\"%\"!==i)throw new B(\"invalid intrinsic syntax, expected opening `%`\");var _=[];return xe(s,Re,(function(s,i,u,w){_[_.length]=u?xe(w,qe,\"$1\"):i||s})),_}(s),_=u.length>0?u[0]:\"\",w=$e(\"%\"+_+\"%\",i),x=w.name,j=w.value,P=!1,U=w.alias;U&&(_=U[0],Se(u,we([0,1],U)));for(var Y=1,Z=!0;Y<u.length;Y+=1){var ee=u[Y],ie=Pe(ee,0,1),ae=Pe(ee,-1);if(('\"'===ie||\"'\"===ie||\"`\"===ie||'\"'===ae||\"'\"===ae||\"`\"===ae)&&ie!==ae)throw new B(\"property names with quotes must have matching quotes\");if(\"constructor\"!==ee&&Z||(P=!0),_e(pe,x=\"%\"+(_+=\".\"+ee)+\"%\"))j=pe[x];else if(null!=j){if(!(ee in j)){if(!i)throw new $(\"base intrinsic for \"+s+\" exists, but the property is not available.\");return}if(X&&Y+1>=u.length){var le=X(j,ee);j=(Z=!!le)&&\"get\"in le&&!(\"originalValue\"in le.get)?le.get:j[ee]}else Z=_e(j,ee),j=j[ee];Z&&!P&&(pe[x]=j)}}return j}},75795:(s,i,u)=>{\"use strict\";var _=u(70453)(\"%Object.getOwnPropertyDescriptor%\",!0);if(_)try{_([],\"length\")}catch(s){_=null}s.exports=_},30592:(s,i,u)=>{\"use strict\";var _=u(30655),w=function hasPropertyDescriptors(){return!!_};w.hasArrayLengthDefineBug=function hasArrayLengthDefineBug(){if(!_)return null;try{return 1!==_([],\"length\",{value:1}).length}catch(s){return!0}},s.exports=w},80024:s=>{\"use strict\";var i={__proto__:null,foo:{}},u=Object;s.exports=function hasProto(){return{__proto__:i}.foo===i.foo&&!(i instanceof u)}},64039:(s,i,u)=>{\"use strict\";var _=\"undefined\"!=typeof Symbol&&Symbol,w=u(41333);s.exports=function hasNativeSymbols(){return\"function\"==typeof _&&(\"function\"==typeof Symbol&&(\"symbol\"==typeof _(\"foo\")&&(\"symbol\"==typeof Symbol(\"bar\")&&w())))}},41333:s=>{\"use strict\";s.exports=function hasSymbols(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var s={},i=Symbol(\"test\"),u=Object(i);if(\"string\"==typeof i)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(i))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(u))return!1;for(i in s[i]=42,s)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(s).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(s).length)return!1;var _=Object.getOwnPropertySymbols(s);if(1!==_.length||_[0]!==i)return!1;if(!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var w=Object.getOwnPropertyDescriptor(s,i);if(42!==w.value||!0!==w.enumerable)return!1}return!0}},9957:(s,i,u)=>{\"use strict\";var _=Function.prototype.call,w=Object.prototype.hasOwnProperty,x=u(66743);s.exports=x.call(_,w)},45981:s=>{function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=function(){throw new Error(\"map is read-only\")}:s instanceof Set&&(s.add=s.clear=s.delete=function(){throw new Error(\"set is read-only\")}),Object.freeze(s),Object.getOwnPropertyNames(s).forEach((function(i){var u=s[i];\"object\"!=typeof u||Object.isFrozen(u)||deepFreeze(u)})),s}var i=deepFreeze,u=deepFreeze;i.default=u;class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(s){return s.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#x27;\")}function inherit(s,...i){const u=Object.create(null);for(const i in s)u[i]=s[i];return i.forEach((function(s){for(const i in s)u[i]=s[i]})),u}const emitsWrappingTags=s=>!!s.kind;class HTMLRenderer{constructor(s,i){this.buffer=\"\",this.classPrefix=i.classPrefix,s.walk(this)}addText(s){this.buffer+=escapeHTML(s)}openNode(s){if(!emitsWrappingTags(s))return;let i=s.kind;s.sublanguage||(i=`${this.classPrefix}${i}`),this.span(i)}closeNode(s){emitsWrappingTags(s)&&(this.buffer+=\"</span>\")}value(){return this.buffer}span(s){this.buffer+=`<span class=\"${s}\">`}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(s){this.top.children.push(s)}openNode(s){const i={kind:s,children:[]};this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(s){return this.constructor._walk(s,this.rootNode)}static _walk(s,i){return\"string\"==typeof i?s.addText(i):i.children&&(s.openNode(i),i.children.forEach((i=>this._walk(s,i))),s.closeNode(i)),s}static _collapse(s){\"string\"!=typeof s&&s.children&&(s.children.every((s=>\"string\"==typeof s))?s.children=[s.children.join(\"\")]:s.children.forEach((s=>{TokenTree._collapse(s)})))}}class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.options=s}addKeyword(s,i){\"\"!==s&&(this.openNode(i),this.addText(s),this.closeNode())}addText(s){\"\"!==s&&this.add(s)}addSublanguage(s,i){const u=s.root;u.kind=i,u.sublanguage=!0,this.add(u)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(s){return s?\"string\"==typeof s?s:s.source:null}const _=/\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;const w=\"[a-zA-Z]\\\\w*\",x=\"[a-zA-Z_]\\\\w*\",j=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",P=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",B=\"\\\\b(0b[01]+)\",$={begin:\"\\\\\\\\[\\\\s\\\\S]\",relevance:0},U={className:\"string\",begin:\"'\",end:\"'\",illegal:\"\\\\n\",contains:[$]},Y={className:\"string\",begin:'\"',end:'\"',illegal:\"\\\\n\",contains:[$]},X={begin:/\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/},COMMENT=function(s,i,u={}){const _=inherit({className:\"comment\",begin:s,end:i,contains:[]},u);return _.contains.push(X),_.contains.push({className:\"doctag\",begin:\"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):\",relevance:0}),_},Z=COMMENT(\"//\",\"$\"),ee=COMMENT(\"/\\\\*\",\"\\\\*/\"),ie=COMMENT(\"#\",\"$\"),ae={className:\"number\",begin:j,relevance:0},le={className:\"number\",begin:P,relevance:0},ce={className:\"number\",begin:B,relevance:0},pe={className:\"number\",begin:j+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",relevance:0},de={begin:/(?=\\/[^/\\n]*\\/)/,contains:[{className:\"regexp\",begin:/\\//,end:/\\/[gimuy]*/,illegal:/\\n/,contains:[$,{begin:/\\[/,end:/\\]/,relevance:0,contains:[$]}]}]},fe={className:\"title\",begin:w,relevance:0},ye={className:\"title\",begin:x,relevance:0},be={begin:\"\\\\.\\\\s*\"+x,relevance:0};var _e=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\\b\\B/,IDENT_RE:w,UNDERSCORE_IDENT_RE:x,NUMBER_RE:j,C_NUMBER_RE:P,BINARY_NUMBER_RE:B,RE_STARTERS_RE:\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",SHEBANG:(s={})=>{const i=/^#![ ]*\\//;return s.binary&&(s.begin=function concat(...s){return s.map((s=>source(s))).join(\"\")}(i,/.*\\b/,s.binary,/\\b.*/)),inherit({className:\"meta\",begin:i,end:/$/,relevance:0,\"on:begin\":(s,i)=>{0!==s.index&&i.ignoreMatch()}},s)},BACKSLASH_ESCAPE:$,APOS_STRING_MODE:U,QUOTE_STRING_MODE:Y,PHRASAL_WORDS_MODE:X,COMMENT,C_LINE_COMMENT_MODE:Z,C_BLOCK_COMMENT_MODE:ee,HASH_COMMENT_MODE:ie,NUMBER_MODE:ae,C_NUMBER_MODE:le,BINARY_NUMBER_MODE:ce,CSS_NUMBER_MODE:pe,REGEXP_MODE:de,TITLE_MODE:fe,UNDERSCORE_TITLE_MODE:ye,METHOD_GUARD:be,END_SAME_AS_BEGIN:function(s){return Object.assign(s,{\"on:begin\":(s,i)=>{i.data._beginMatch=s[1]},\"on:end\":(s,i)=>{i.data._beginMatch!==s[1]&&i.ignoreMatch()}})}});function skipIfhasPrecedingDot(s,i){\".\"===s.input[s.index-1]&&i.ignoreMatch()}function beginKeywords(s,i){i&&s.beginKeywords&&(s.begin=\"\\\\b(\"+s.beginKeywords.split(\" \").join(\"|\")+\")(?!\\\\.)(?=\\\\b|\\\\s)\",s.__beforeBegin=skipIfhasPrecedingDot,s.keywords=s.keywords||s.beginKeywords,delete s.beginKeywords,void 0===s.relevance&&(s.relevance=0))}function compileIllegal(s,i){Array.isArray(s.illegal)&&(s.illegal=function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}(...s.illegal))}function compileMatch(s,i){if(s.match){if(s.begin||s.end)throw new Error(\"begin & end are not supported with match\");s.begin=s.match,delete s.match}}function compileRelevance(s,i){void 0===s.relevance&&(s.relevance=1)}const we=[\"of\",\"and\",\"for\",\"in\",\"not\",\"or\",\"if\",\"then\",\"parent\",\"list\",\"value\"],Se=\"keyword\";function compileKeywords(s,i,u=Se){const _={};return\"string\"==typeof s?compileList(u,s.split(\" \")):Array.isArray(s)?compileList(u,s):Object.keys(s).forEach((function(u){Object.assign(_,compileKeywords(s[u],i,u))})),_;function compileList(s,u){i&&(u=u.map((s=>s.toLowerCase()))),u.forEach((function(i){const u=i.split(\"|\");_[u[0]]=[s,scoreForKeyword(u[0],u[1])]}))}}function scoreForKeyword(s,i){return i?Number(i):function commonKeyword(s){return we.includes(s.toLowerCase())}(s)?0:1}function compileLanguage(s,{plugins:i}){function langRe(i,u){return new RegExp(source(i),\"m\"+(s.case_insensitive?\"i\":\"\")+(u?\"g\":\"\"))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,i){i.position=this.position++,this.matchIndexes[this.matchAt]=i,this.regexes.push([i,s]),this.matchAt+=function countMatchGroups(s){return new RegExp(s.toString()+\"|\").exec(\"\").length-1}(s)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const s=this.regexes.map((s=>s[1]));this.matcherRe=langRe(function join(s,i=\"|\"){let u=0;return s.map((s=>{u+=1;const i=u;let w=source(s),x=\"\";for(;w.length>0;){const s=_.exec(w);if(!s){x+=w;break}x+=w.substring(0,s.index),w=w.substring(s.index+s[0].length),\"\\\\\"===s[0][0]&&s[1]?x+=\"\\\\\"+String(Number(s[1])+i):(x+=s[0],\"(\"===s[0]&&u++)}return x})).map((s=>`(${s})`)).join(i)}(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const i=this.matcherRe.exec(s);if(!i)return null;const u=i.findIndex(((s,i)=>i>0&&void 0!==s)),_=this.matchIndexes[u];return i.splice(0,u),Object.assign(i,_)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const i=new MultiRegex;return this.rules.slice(s).forEach((([s,u])=>i.addRule(s,u))),i.compile(),this.multiRegexes[s]=i,i}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(s,i){this.rules.push([s,i]),\"begin\"===i.type&&this.count++}exec(s){const i=this.getMatcher(this.regexIndex);i.lastIndex=this.lastIndex;let u=i.exec(s);if(this.resumingScanAtSamePosition())if(u&&u.index===this.lastIndex);else{const i=this.getMatcher(0);i.lastIndex=this.lastIndex+1,u=i.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}if(s.compilerExtensions||(s.compilerExtensions=[]),s.contains&&s.contains.includes(\"self\"))throw new Error(\"ERR: contains `self` is not supported at the top-level of a language.  See documentation.\");return s.classNameAliases=inherit(s.classNameAliases||{}),function compileMode(i,u){const _=i;if(i.isCompiled)return _;[compileMatch].forEach((s=>s(i,u))),s.compilerExtensions.forEach((s=>s(i,u))),i.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((s=>s(i,u))),i.isCompiled=!0;let w=null;if(\"object\"==typeof i.keywords&&(w=i.keywords.$pattern,delete i.keywords.$pattern),i.keywords&&(i.keywords=compileKeywords(i.keywords,s.case_insensitive)),i.lexemes&&w)throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");return w=w||i.lexemes||/\\w+/,_.keywordPatternRe=langRe(w,!0),u&&(i.begin||(i.begin=/\\B|\\b/),_.beginRe=langRe(i.begin),i.endSameAsBegin&&(i.end=i.begin),i.end||i.endsWithParent||(i.end=/\\B|\\b/),i.end&&(_.endRe=langRe(i.end)),_.terminatorEnd=source(i.end)||\"\",i.endsWithParent&&u.terminatorEnd&&(_.terminatorEnd+=(i.end?\"|\":\"\")+u.terminatorEnd)),i.illegal&&(_.illegalRe=langRe(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(s){return function expandOrCloneMode(s){s.variants&&!s.cachedVariants&&(s.cachedVariants=s.variants.map((function(i){return inherit(s,{variants:null},i)})));if(s.cachedVariants)return s.cachedVariants;if(dependencyOnParent(s))return inherit(s,{starts:s.starts?inherit(s.starts):null});if(Object.isFrozen(s))return inherit(s);return s}(\"self\"===s?i:s)}))),i.contains.forEach((function(s){compileMode(s,_)})),i.starts&&compileMode(i.starts,u),_.matcher=function buildModeRegex(s){const i=new ResumableMultiRegex;return s.contains.forEach((s=>i.addRule(s.begin,{rule:s,type:\"begin\"}))),s.terminatorEnd&&i.addRule(s.terminatorEnd,{type:\"end\"}),s.illegal&&i.addRule(s.illegal,{type:\"illegal\"}),i}(_),_}(s)}function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyOnParent(s.starts))}function BuildVuePlugin(s){const i={props:[\"language\",\"code\",\"autodetect\"],data:function(){return{detectedLanguage:\"\",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?\"\":\"hljs \"+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!s.getLanguage(this.language))return console.warn(`The language \"${this.language}\" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let i={};return this.autoDetect?(i=s.highlightAuto(this.code),this.detectedLanguage=i.language):(i=s.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),i.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(s){return Boolean(s||\"\"===s)}(this.autodetect)},ignoreIllegals:()=>!0},render(s){return s(\"pre\",{},[s(\"code\",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:i,VuePlugin:{install(s){s.component(\"highlightjs\",i)}}}}const xe={\"after:highlightElement\":({el:s,result:i,text:u})=>{const _=nodeStream(s);if(!_.length)return;const w=document.createElement(\"div\");w.innerHTML=i.value,i.value=function mergeStreams(s,i,u){let _=0,w=\"\";const x=[];function selectStream(){return s.length&&i.length?s[0].offset!==i[0].offset?s[0].offset<i[0].offset?s:i:\"start\"===i[0].event?s:i:s.length?s:i}function open(s){function attributeString(s){return\" \"+s.nodeName+'=\"'+escapeHTML(s.value)+'\"'}w+=\"<\"+tag(s)+[].map.call(s.attributes,attributeString).join(\"\")+\">\"}function close(s){w+=\"</\"+tag(s)+\">\"}function render(s){(\"start\"===s.event?open:close)(s.node)}for(;s.length||i.length;){let i=selectStream();if(w+=escapeHTML(u.substring(_,i[0].offset)),_=i[0].offset,i===s){x.reverse().forEach(close);do{render(i.splice(0,1)[0]),i=selectStream()}while(i===s&&i.length&&i[0].offset===_);x.reverse().forEach(open)}else\"start\"===i[0].event?x.push(i[0].node):x.pop(),render(i.splice(0,1)[0])}return w+escapeHTML(u.substr(_))}(_,nodeStream(w),u)}};function tag(s){return s.nodeName.toLowerCase()}function nodeStream(s){const i=[];return function _nodeStream(s,u){for(let _=s.firstChild;_;_=_.nextSibling)3===_.nodeType?u+=_.nodeValue.length:1===_.nodeType&&(i.push({event:\"start\",offset:u,node:_}),u=_nodeStream(_,u),tag(_).match(/br|hr|img|input/)||i.push({event:\"stop\",offset:u,node:_}));return u}(s,0),i}const Pe={},error=s=>{console.error(s)},warn=(s,...i)=>{console.log(`WARN: ${s}`,...i)},deprecated=(s,i)=>{Pe[`${s}/${i}`]||(console.log(`Deprecated as of ${s}. ${i}`),Pe[`${s}/${i}`]=!0)},Te=escapeHTML,Re=inherit,qe=Symbol(\"nomatch\");var $e=function(s){const u=Object.create(null),_=Object.create(null),w=[];let x=!0;const j=/(^(<[^>]+>|\\t|)+|\\n)/gm,P=\"Could not find the language '{}', did you forget to load/include a language module?\",B={disableAutodetect:!0,name:\"Plain text\",contains:[]};let $={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\\blang(?:uage)?-([\\w-]+)\\b/i,classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(s){return $.noHighlightRe.test(s)}function highlight(s,i,u,_){let w=\"\",x=\"\";\"object\"==typeof i?(w=s,u=i.ignoreIllegals,x=i.language,_=void 0):(deprecated(\"10.7.0\",\"highlight(lang, code, ...args) has been deprecated.\"),deprecated(\"10.7.0\",\"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\"),x=s,w=i);const j={code:w,language:x};fire(\"before:highlight\",j);const P=j.result?j.result:_highlight(j.language,j.code,u,_);return P.code=j.code,fire(\"after:highlight\",P),P}function _highlight(s,i,_,j){function keywordData(s,i){const u=U.case_insensitive?i[0].toLowerCase():i[0];return Object.prototype.hasOwnProperty.call(s.keywords,u)&&s.keywords[u]}function processBuffer(){null!=Z.subLanguage?function processSubLanguage(){if(\"\"===ae)return;let s=null;if(\"string\"==typeof Z.subLanguage){if(!u[Z.subLanguage])return void ie.addText(ae);s=_highlight(Z.subLanguage,ae,!0,ee[Z.subLanguage]),ee[Z.subLanguage]=s.top}else s=highlightAuto(ae,Z.subLanguage.length?Z.subLanguage:null);Z.relevance>0&&(le+=s.relevance),ie.addSublanguage(s.emitter,s.language)}():function processKeywords(){if(!Z.keywords)return void ie.addText(ae);let s=0;Z.keywordPatternRe.lastIndex=0;let i=Z.keywordPatternRe.exec(ae),u=\"\";for(;i;){u+=ae.substring(s,i.index);const _=keywordData(Z,i);if(_){const[s,w]=_;if(ie.addText(u),u=\"\",le+=w,s.startsWith(\"_\"))u+=i[0];else{const u=U.classNameAliases[s]||s;ie.addKeyword(i[0],u)}}else u+=i[0];s=Z.keywordPatternRe.lastIndex,i=Z.keywordPatternRe.exec(ae)}u+=ae.substr(s),ie.addText(u)}(),ae=\"\"}function startNewMode(s){return s.className&&ie.openNode(U.classNameAliases[s.className]||s.className),Z=Object.create(s,{parent:{value:Z}}),Z}function endOfMode(s,i,u){let _=function startsWith(s,i){const u=s&&s.exec(i);return u&&0===u.index}(s.endRe,u);if(_){if(s[\"on:end\"]){const u=new Response(s);s[\"on:end\"](i,u),u.isMatchIgnored&&(_=!1)}if(_){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return endOfMode(s.parent,i,u)}function doIgnore(s){return 0===Z.matcher.regexIndex?(ae+=s[0],1):(de=!0,0)}function doBeginMatch(s){const i=s[0],u=s.rule,_=new Response(u),w=[u.__beforeBegin,u[\"on:begin\"]];for(const u of w)if(u&&(u(s,_),_.isMatchIgnored))return doIgnore(i);return u&&u.endSameAsBegin&&(u.endRe=function escape(s){return new RegExp(s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\"),\"m\")}(i)),u.skip?ae+=i:(u.excludeBegin&&(ae+=i),processBuffer(),u.returnBegin||u.excludeBegin||(ae=i)),startNewMode(u),u.returnBegin?0:i.length}function doEndMatch(s){const u=s[0],_=i.substr(s.index),w=endOfMode(Z,s,_);if(!w)return qe;const x=Z;x.skip?ae+=u:(x.returnEnd||x.excludeEnd||(ae+=u),processBuffer(),x.excludeEnd&&(ae=u));do{Z.className&&ie.closeNode(),Z.skip||Z.subLanguage||(le+=Z.relevance),Z=Z.parent}while(Z!==w.parent);return w.starts&&(w.endSameAsBegin&&(w.starts.endRe=w.endRe),startNewMode(w.starts)),x.returnEnd?0:u.length}let B={};function processLexeme(u,w){const j=w&&w[0];if(ae+=u,null==j)return processBuffer(),0;if(\"begin\"===B.type&&\"end\"===w.type&&B.index===w.index&&\"\"===j){if(ae+=i.slice(w.index,w.index+1),!x){const i=new Error(\"0 width match regex\");throw i.languageName=s,i.badRule=B.rule,i}return 1}if(B=w,\"begin\"===w.type)return doBeginMatch(w);if(\"illegal\"===w.type&&!_){const s=new Error('Illegal lexeme \"'+j+'\" for mode \"'+(Z.className||\"<unnamed>\")+'\"');throw s.mode=Z,s}if(\"end\"===w.type){const s=doEndMatch(w);if(s!==qe)return s}if(\"illegal\"===w.type&&\"\"===j)return 1;if(pe>1e5&&pe>3*w.index){throw new Error(\"potential infinite loop, way more iterations than matches\")}return ae+=j,j.length}const U=getLanguage(s);if(!U)throw error(P.replace(\"{}\",s)),new Error('Unknown language: \"'+s+'\"');const Y=compileLanguage(U,{plugins:w});let X=\"\",Z=j||Y;const ee={},ie=new $.__emitter($);!function processContinuations(){const s=[];for(let i=Z;i!==U;i=i.parent)i.className&&s.unshift(i.className);s.forEach((s=>ie.openNode(s)))}();let ae=\"\",le=0,ce=0,pe=0,de=!1;try{for(Z.matcher.considerAll();;){pe++,de?de=!1:Z.matcher.considerAll(),Z.matcher.lastIndex=ce;const s=Z.matcher.exec(i);if(!s)break;const u=processLexeme(i.substring(ce,s.index),s);ce=s.index+u}return processLexeme(i.substr(ce)),ie.closeAllNodes(),ie.finalize(),X=ie.toHTML(),{relevance:Math.floor(le),value:X,language:s,illegal:!1,emitter:ie,top:Z}}catch(u){if(u.message&&u.message.includes(\"Illegal\"))return{illegal:!0,illegalBy:{msg:u.message,context:i.slice(ce-100,ce+100),mode:u.mode},sofar:X,relevance:0,value:Te(i),emitter:ie};if(x)return{illegal:!1,relevance:0,value:Te(i),emitter:ie,language:s,top:Z,errorRaised:u};throw u}}function highlightAuto(s,i){i=i||$.languages||Object.keys(u);const _=function justTextHighlightResult(s){const i={relevance:0,emitter:new $.__emitter($),value:Te(s),illegal:!1,top:B};return i.emitter.addText(s),i}(s),w=i.filter(getLanguage).filter(autoDetection).map((i=>_highlight(i,s,!1)));w.unshift(_);const x=w.sort(((s,i)=>{if(s.relevance!==i.relevance)return i.relevance-s.relevance;if(s.language&&i.language){if(getLanguage(s.language).supersetOf===i.language)return 1;if(getLanguage(i.language).supersetOf===s.language)return-1}return 0})),[j,P]=x,U=j;return U.second_best=P,U}const U={\"before:highlightElement\":({el:s})=>{$.useBR&&(s.innerHTML=s.innerHTML.replace(/\\n/g,\"\").replace(/<br[ /]*>/g,\"\\n\"))},\"after:highlightElement\":({result:s})=>{$.useBR&&(s.value=s.value.replace(/\\n/g,\"<br>\"))}},Y=/^(<[^>]+>|\\t)+/gm,X={\"after:highlightElement\":({result:s})=>{$.tabReplace&&(s.value=s.value.replace(Y,(s=>s.replace(/\\t/g,$.tabReplace))))}};function highlightElement(s){let i=null;const u=function blockLanguage(s){let i=s.className+\" \";i+=s.parentNode?s.parentNode.className:\"\";const u=$.languageDetectRe.exec(i);if(u){const i=getLanguage(u[1]);return i||(warn(P.replace(\"{}\",u[1])),warn(\"Falling back to no-highlight mode for this block.\",s)),i?u[1]:\"no-highlight\"}return i.split(/\\s+/).find((s=>shouldNotHighlight(s)||getLanguage(s)))}(s);if(shouldNotHighlight(u))return;fire(\"before:highlightElement\",{el:s,language:u}),i=s;const w=i.textContent,x=u?highlight(w,{language:u,ignoreIllegals:!0}):highlightAuto(w);fire(\"after:highlightElement\",{el:s,result:x,text:w}),s.innerHTML=x.value,function updateClassName(s,i,u){const w=i?_[i]:u;s.classList.add(\"hljs\"),w&&s.classList.add(w)}(s,u,x.language),s.result={language:x.language,re:x.relevance,relavance:x.relevance},x.second_best&&(s.second_best={language:x.second_best.language,re:x.second_best.relevance,relavance:x.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated(\"10.6.0\",\"initHighlighting() is deprecated.  Use highlightAll() instead.\");document.querySelectorAll(\"pre code\").forEach(highlightElement)};let Z=!1;function highlightAll(){if(\"loading\"===document.readyState)return void(Z=!0);document.querySelectorAll(\"pre code\").forEach(highlightElement)}function getLanguage(s){return s=(s||\"\").toLowerCase(),u[s]||u[_[s]]}function registerAliases(s,{languageName:i}){\"string\"==typeof s&&(s=[s]),s.forEach((s=>{_[s.toLowerCase()]=i}))}function autoDetection(s){const i=getLanguage(s);return i&&!i.disableAutodetect}function fire(s,i){const u=s;w.forEach((function(s){s[u]&&s[u](i)}))}\"undefined\"!=typeof window&&window.addEventListener&&window.addEventListener(\"DOMContentLoaded\",(function boot(){Z&&highlightAll()}),!1),Object.assign(s,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(s){return deprecated(\"10.2.0\",\"fixMarkup will be removed entirely in v11.0\"),deprecated(\"10.2.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2534\"),function fixMarkup(s){return $.tabReplace||$.useBR?s.replace(j,(s=>\"\\n\"===s?$.useBR?\"<br>\":s:$.tabReplace?s.replace(/\\t/g,$.tabReplace):s)):s}(s)},highlightElement,highlightBlock:function deprecateHighlightBlock(s){return deprecated(\"10.7.0\",\"highlightBlock will be removed entirely in v12.0\"),deprecated(\"10.7.0\",\"Please use highlightElement now.\"),highlightElement(s)},configure:function configure(s){s.useBR&&(deprecated(\"10.3.0\",\"'useBR' will be removed entirely in v11.0\"),deprecated(\"10.3.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2559\")),$=Re($,s)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated(\"10.6.0\",\"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\"),Z=!0},registerLanguage:function registerLanguage(i,_){let w=null;try{w=_(s)}catch(s){if(error(\"Language definition for '{}' could not be registered.\".replace(\"{}\",i)),!x)throw s;error(s),w=B}w.name||(w.name=i),u[i]=w,w.rawDefinition=_.bind(null,s),w.aliases&&registerAliases(w.aliases,{languageName:i})},unregisterLanguage:function unregisterLanguage(s){delete u[s];for(const i of Object.keys(_))_[i]===s&&delete _[i]},listLanguages:function listLanguages(){return Object.keys(u)},getLanguage,registerAliases,requireLanguage:function requireLanguage(s){deprecated(\"10.4.0\",\"requireLanguage will be removed entirely in v11.\"),deprecated(\"10.4.0\",\"Please see https://github.com/highlightjs/highlight.js/pull/2844\");const i=getLanguage(s);if(i)return i;throw new Error(\"The '{}' language is required, but not loaded.\".replace(\"{}\",s))},autoDetection,inherit:Re,addPlugin:function addPlugin(s){!function upgradePluginAPI(s){s[\"before:highlightBlock\"]&&!s[\"before:highlightElement\"]&&(s[\"before:highlightElement\"]=i=>{s[\"before:highlightBlock\"](Object.assign({block:i.el},i))}),s[\"after:highlightBlock\"]&&!s[\"after:highlightElement\"]&&(s[\"after:highlightElement\"]=i=>{s[\"after:highlightBlock\"](Object.assign({block:i.el},i))})}(s),w.push(s)},vuePlugin:BuildVuePlugin(s).VuePlugin}),s.debugMode=function(){x=!1},s.safeMode=function(){x=!0},s.versionString=\"10.7.3\";for(const s in _e)\"object\"==typeof _e[s]&&i(_e[s]);return Object.assign(s,_e),s.addPlugin(U),s.addPlugin(xe),s.addPlugin(X),s}({});s.exports=$e},35344:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function bash(s){const i={},u={begin:/\\$\\{/,end:/\\}/,contains:[\"self\",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:\"variable\",variants:[{begin:concat(/\\$[\\w\\d#@][\\w\\d_]*/,\"(?![\\\\w\\\\d])(?![$])\")},u]});const _={className:\"subst\",begin:/\\$\\(/,end:/\\)/,contains:[s.BACKSLASH_ESCAPE]},w={begin:/<<-?\\s*(?=\\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\\w+)/,end:/(\\w+)/,className:\"string\"})]}},x={className:\"string\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE,i,_]};_.contains.push(x);const j={begin:/\\$\\(\\(/,end:/\\)\\)/,contains:[{begin:/\\d+#[0-9a-f]+/,className:\"number\"},s.NUMBER_MODE,i]},P=s.SHEBANG({binary:`(${[\"fish\",\"bash\",\"zsh\",\"sh\",\"csh\",\"ksh\",\"tcsh\",\"dash\",\"scsh\"].join(\"|\")})`,relevance:10}),B={className:\"function\",begin:/\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,returnBegin:!0,contains:[s.inherit(s.TITLE_MODE,{begin:/\\w[\\w\\d_]*/})],relevance:0};return{name:\"Bash\",aliases:[\"sh\",\"zsh\"],keywords:{$pattern:/\\b[a-z._-]+\\b/,keyword:\"if then else elif fi for while in do done case esac function\",literal:\"true false\",built_in:\"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp\"},contains:[P,s.SHEBANG(),B,j,s.HASH_COMMENT_MODE,w,x,{className:\"\",begin:/\\\\\"/},{className:\"string\",begin:/'/,end:/'/},i]}}},73402:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function http(s){const i=\"HTTP/(2|1\\\\.[01])\",u={className:\"attribute\",begin:concat(\"^\",/[A-Za-z][A-Za-z0-9-]*/,\"(?=\\\\:\\\\s)\"),starts:{contains:[{className:\"punctuation\",begin:/: /,relevance:0,starts:{end:\"$\",relevance:0}}]}},_=[u,{begin:\"\\\\n\\\\n\",starts:{subLanguage:[],endsWithParent:!0}}];return{name:\"HTTP\",aliases:[\"https\"],illegal:/\\S/,contains:[{begin:\"^(?=\"+i+\" \\\\d{3})\",end:/$/,contains:[{className:\"meta\",begin:i},{className:\"number\",begin:\"\\\\b\\\\d{3}\\\\b\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:_}},{begin:\"(?=^[A-Z]+ (.*?) \"+i+\"$)\",end:/$/,contains:[{className:\"string\",begin:\" \",end:\" \",excludeBegin:!0,excludeEnd:!0},{className:\"meta\",begin:i},{className:\"keyword\",begin:\"[A-Z]+\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:_}},s.inherit(u,{relevance:0})]}}},95089:s=>{const i=\"[A-Za-z$_][0-9A-Za-z$_]*\",u=[\"as\",\"in\",\"of\",\"if\",\"for\",\"while\",\"finally\",\"var\",\"new\",\"function\",\"do\",\"return\",\"void\",\"else\",\"break\",\"catch\",\"instanceof\",\"with\",\"throw\",\"case\",\"default\",\"try\",\"switch\",\"continue\",\"typeof\",\"delete\",\"let\",\"yield\",\"const\",\"class\",\"debugger\",\"async\",\"await\",\"static\",\"import\",\"from\",\"export\",\"extends\"],_=[\"true\",\"false\",\"null\",\"undefined\",\"NaN\",\"Infinity\"],w=[].concat([\"setInterval\",\"setTimeout\",\"clearInterval\",\"clearTimeout\",\"require\",\"exports\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\"],[\"arguments\",\"this\",\"super\",\"console\",\"window\",\"document\",\"localStorage\",\"module\",\"global\"],[\"Intl\",\"DataView\",\"Number\",\"Math\",\"Date\",\"String\",\"RegExp\",\"Object\",\"Function\",\"Boolean\",\"Error\",\"Symbol\",\"Set\",\"Map\",\"WeakSet\",\"WeakMap\",\"Proxy\",\"Reflect\",\"JSON\",\"Promise\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Float32Array\",\"Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"ArrayBuffer\",\"BigInt64Array\",\"BigUint64Array\",\"BigInt\"],[\"EvalError\",\"InternalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\"]);function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function javascript(s){const x=i,j=\"<>\",P=\"</>\",B={begin:/<[A-Za-z0-9\\\\._:-]+/,end:/\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,isTrulyOpeningTag:(s,i)=>{const u=s[0].length+s.index,_=s.input[u];\"<\"!==_?\">\"===_&&(((s,{after:i})=>{const u=\"</\"+s[0].slice(1);return-1!==s.input.indexOf(u,i)})(s,{after:u})||i.ignoreMatch()):i.ignoreMatch()}},$={$pattern:i,keyword:u,literal:_,built_in:w},U=\"[0-9](_?[0-9])*\",Y=`\\\\.(${U})`,X=\"0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*\",Z={className:\"number\",variants:[{begin:`(\\\\b(${X})((${Y})|\\\\.)?|(${Y}))[eE][+-]?(${U})\\\\b`},{begin:`\\\\b(${X})\\\\b((${Y})\\\\b|\\\\.)?|(${Y})\\\\b`},{begin:\"\\\\b(0|[1-9](_?[0-9])*)n\\\\b\"},{begin:\"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"},{begin:\"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"},{begin:\"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"},{begin:\"\\\\b0[0-7]+n?\\\\b\"}],relevance:0},ee={className:\"subst\",begin:\"\\\\$\\\\{\",end:\"\\\\}\",keywords:$,contains:[]},ie={begin:\"html`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,ee],subLanguage:\"xml\"}},ae={begin:\"css`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,ee],subLanguage:\"css\"}},le={className:\"string\",begin:\"`\",end:\"`\",contains:[s.BACKSLASH_ESCAPE,ee]},ce={className:\"comment\",variants:[s.COMMENT(/\\/\\*\\*(?!\\/)/,\"\\\\*/\",{relevance:0,contains:[{className:\"doctag\",begin:\"@[A-Za-z]+\",contains:[{className:\"type\",begin:\"\\\\{\",end:\"\\\\}\",relevance:0},{className:\"variable\",begin:x+\"(?=\\\\s*(-)|$)\",endsParent:!0,relevance:0},{begin:/(?=[^\\n])\\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},pe=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,ie,ae,le,Z,s.REGEXP_MODE];ee.contains=pe.concat({begin:/\\{/,end:/\\}/,keywords:$,contains:[\"self\"].concat(pe)});const de=[].concat(ce,ee.contains),fe=de.concat([{begin:/\\(/,end:/\\)/,keywords:$,contains:[\"self\"].concat(de)}]),ye={className:\"params\",begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:$,contains:fe};return{name:\"Javascript\",aliases:[\"js\",\"jsx\",\"mjs\",\"cjs\"],keywords:$,exports:{PARAMS_CONTAINS:fe},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:\"shebang\",binary:\"node\",relevance:5}),{label:\"use_strict\",className:\"meta\",relevance:10,begin:/^\\s*['\"]use (strict|asm)['\"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,ie,ae,le,ce,Z,{begin:concat(/[{,\\n]\\s*/,lookahead(concat(/(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,x+\"\\\\s*:\"))),relevance:0,contains:[{className:\"attr\",begin:x+lookahead(\"\\\\s*:\"),relevance:0}]},{begin:\"(\"+s.RE_STARTERS_RE+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",keywords:\"return throw case\",contains:[ce,s.REGEXP_MODE,{className:\"function\",begin:\"(\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)|\"+s.UNDERSCORE_IDENT_RE+\")\\\\s*=>\",returnBegin:!0,end:\"\\\\s*=>\",contains:[{className:\"params\",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\\(\\s*\\)/,skip:!0},{begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:$,contains:fe}]}]},{begin:/,/,relevance:0},{className:\"\",begin:/\\s/,end:/\\s*/,skip:!0},{variants:[{begin:j,end:P},{begin:B.begin,\"on:begin\":B.isTrulyOpeningTag,end:B.end}],subLanguage:\"xml\",contains:[{begin:B.begin,end:B.end,skip:!0,contains:[\"self\"]}]}],relevance:0},{className:\"function\",beginKeywords:\"function\",end:/[{;]/,excludeEnd:!0,keywords:$,contains:[\"self\",s.inherit(s.TITLE_MODE,{begin:x}),ye],illegal:/%/},{beginKeywords:\"while if switch catch for\"},{className:\"function\",begin:s.UNDERSCORE_IDENT_RE+\"\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)\\\\s*\\\\{\",returnBegin:!0,contains:[ye,s.inherit(s.TITLE_MODE,{begin:x})]},{variants:[{begin:\"\\\\.\"+x},{begin:\"\\\\$\"+x}],relevance:0},{className:\"class\",beginKeywords:\"class\",end:/[{;=]/,excludeEnd:!0,illegal:/[:\"[\\]]/,contains:[{beginKeywords:\"extends\"},s.UNDERSCORE_TITLE_MODE]},{begin:/\\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[s.inherit(s.TITLE_MODE,{begin:x}),\"self\",ye]},{begin:\"(get|set)\\\\s+(?=\"+x+\"\\\\()\",end:/\\{/,keywords:\"get set\",contains:[s.inherit(s.TITLE_MODE,{begin:x}),{begin:/\\(\\)/},ye]},{begin:/\\$[(.]/}]}}},65772:s=>{s.exports=function json(s){const i={literal:\"true false null\"},u=[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],_=[s.QUOTE_STRING_MODE,s.C_NUMBER_MODE],w={end:\",\",endsWithParent:!0,excludeEnd:!0,contains:_,keywords:i},x={begin:/\\{/,end:/\\}/,contains:[{className:\"attr\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE],illegal:\"\\\\n\"},s.inherit(w,{begin:/:/})].concat(u),illegal:\"\\\\S\"},j={begin:\"\\\\[\",end:\"\\\\]\",contains:[s.inherit(w)],illegal:\"\\\\S\"};return _.push(x,j),u.forEach((function(s){_.push(s)})),{name:\"JSON\",contains:_,keywords:i,illegal:\"\\\\S\"}}},26571:s=>{s.exports=function powershell(s){const i={$pattern:/-?[A-z\\.\\-]+\\b/,keyword:\"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter\",built_in:\"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write\"},u={begin:\"`[\\\\s\\\\S]\",relevance:0},_={className:\"variable\",variants:[{begin:/\\$\\B/},{className:\"keyword\",begin:/\\$this/},{begin:/\\$[\\w\\d][\\w\\d_:]*/}]},w={className:\"string\",variants:[{begin:/\"/,end:/\"/},{begin:/@\"/,end:/^\"@/}],contains:[u,_,{className:\"variable\",begin:/\\$[A-z]/,end:/[^A-z]/}]},x={className:\"string\",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},j=s.inherit(s.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:\"doctag\",variants:[{begin:/\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/}]}]}),P={className:\"built_in\",variants:[{begin:\"(\".concat(\"Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where\",\")+(-)[\\\\w\\\\d]+\")}]},B={className:\"class\",beginKeywords:\"class enum\",end:/\\s*[{]/,excludeEnd:!0,relevance:0,contains:[s.TITLE_MODE]},$={className:\"function\",begin:/function\\s+/,end:/\\s*\\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:\"function\",relevance:0,className:\"keyword\"},{className:\"title\",begin:/\\w[\\w\\d]*((-)[\\w\\d]+)*/,relevance:0},{begin:/\\(/,end:/\\)/,className:\"params\",relevance:0,contains:[_]}]},U={begin:/using\\s/,end:/$/,returnBegin:!0,contains:[w,x,{className:\"keyword\",begin:/(using|assembly|command|module|namespace|type)/}]},Y={variants:[{className:\"operator\",begin:\"(\".concat(\"-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor\",\")\\\\b\")},{className:\"literal\",begin:/(-)[\\w\\d]+/,relevance:0}]},X={className:\"function\",begin:/\\[.*\\]\\s*[\\w]+[ ]??\\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:\"keyword\",begin:\"(\".concat(i.keyword.toString().replace(/\\s/g,\"|\"),\")\\\\b\"),endsParent:!0,relevance:0},s.inherit(s.TITLE_MODE,{endsParent:!0})]},Z=[X,j,u,s.NUMBER_MODE,w,x,P,_,{className:\"literal\",begin:/\\$(null|true|false)\\b/},{className:\"selector-tag\",begin:/@\\B/,relevance:0}],ee={begin:/\\[/,end:/\\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat(\"self\",Z,{begin:\"(\"+[\"string\",\"char\",\"byte\",\"int\",\"long\",\"bool\",\"decimal\",\"single\",\"double\",\"DateTime\",\"xml\",\"array\",\"hashtable\",\"void\"].join(\"|\")+\")\",className:\"built_in\",relevance:0},{className:\"type\",begin:/[\\.\\w\\d]+/,relevance:0})};return X.contains.unshift(ee),{name:\"PowerShell\",aliases:[\"ps\",\"ps1\"],case_insensitive:!0,keywords:i,contains:Z.concat(B,$,U,Y,ee)}}},17285:s=>{function source(s){return s?\"string\"==typeof s?s:s.source:null}function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>source(s))).join(\"\")}function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}s.exports=function xml(s){const i=concat(/[A-Z_]/,function optional(s){return concat(\"(\",s,\")?\")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),u={className:\"symbol\",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},_={begin:/\\s/,contains:[{className:\"meta-keyword\",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\\n/}]},w=s.inherit(_,{begin:/\\(/,end:/\\)/}),x=s.inherit(s.APOS_STRING_MODE,{className:\"meta-string\"}),j=s.inherit(s.QUOTE_STRING_MODE,{className:\"meta-string\"}),P={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:\"attr\",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\\s*/,relevance:0,contains:[{className:\"string\",endsParent:!0,variants:[{begin:/\"/,end:/\"/,contains:[u]},{begin:/'/,end:/'/,contains:[u]},{begin:/[^\\s\"'=<>`]+/}]}]}]};return{name:\"HTML, XML\",aliases:[\"html\",\"xhtml\",\"rss\",\"atom\",\"xjb\",\"xsd\",\"xsl\",\"plist\",\"wsf\",\"svg\"],case_insensitive:!0,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,relevance:10,contains:[_,j,x,w,{begin:/\\[/,end:/\\]/,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,contains:[_,w,j,x]}]}]},s.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\\[CDATA\\[/,end:/\\]\\]>/,relevance:10},u,{className:\"meta\",begin:/<\\?xml/,end:/\\?>/,relevance:10},{className:\"tag\",begin:/<style(?=\\s|>)/,end:/>/,keywords:{name:\"style\"},contains:[P],starts:{end:/<\\/style>/,returnEnd:!0,subLanguage:[\"css\",\"xml\"]}},{className:\"tag\",begin:/<script(?=\\s|>)/,end:/>/,keywords:{name:\"script\"},contains:[P],starts:{end:/<\\/script>/,returnEnd:!0,subLanguage:[\"javascript\",\"handlebars\",\"xml\"]}},{className:\"tag\",begin:/<>|<\\/>/},{className:\"tag\",begin:concat(/</,lookahead(concat(i,either(/\\/>/,/>/,/\\s/)))),end:/\\/?>/,contains:[{className:\"name\",begin:i,relevance:0,starts:P}]},{className:\"tag\",begin:concat(/<\\//,lookahead(concat(i,/>/))),contains:[{className:\"name\",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17533:s=>{s.exports=function yaml(s){var i=\"true false yes no null\",u=\"[\\\\w#;/?:@&=+$,.~*'()[\\\\]]+\",_={className:\"string\",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/\\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:\"template-variable\",variants:[{begin:/\\{\\{/,end:/\\}\\}/},{begin:/%\\{/,end:/\\}/}]}]},w=s.inherit(_,{variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/[^\\s,{}[\\]]+/}]}),x={className:\"number\",begin:\"\\\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\\\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\\\.[0-9]*)?([ \\\\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\\\b\"},j={end:\",\",endsWithParent:!0,excludeEnd:!0,keywords:i,relevance:0},P={begin:/\\{/,end:/\\}/,contains:[j],illegal:\"\\\\n\",relevance:0},B={begin:\"\\\\[\",end:\"\\\\]\",contains:[j],illegal:\"\\\\n\",relevance:0},$=[{className:\"attr\",variants:[{begin:\"\\\\w[\\\\w :\\\\/.-]*:(?=[ \\t]|$)\"},{begin:'\"\\\\w[\\\\w :\\\\/.-]*\":(?=[ \\t]|$)'},{begin:\"'\\\\w[\\\\w :\\\\/.-]*':(?=[ \\t]|$)\"}]},{className:\"meta\",begin:\"^---\\\\s*$\",relevance:10},{className:\"string\",begin:\"[\\\\|>]([1-9]?[+-])?[ ]*\\\\n( +)[^ ][^\\\\n]*\\\\n(\\\\2[^\\\\n]+\\\\n?)*\"},{begin:\"<%[%=-]?\",end:\"[%-]?%>\",subLanguage:\"ruby\",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:\"type\",begin:\"!\\\\w+!\"+u},{className:\"type\",begin:\"!<\"+u+\">\"},{className:\"type\",begin:\"!\"+u},{className:\"type\",begin:\"!!\"+u},{className:\"meta\",begin:\"&\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"meta\",begin:\"\\\\*\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"bullet\",begin:\"-(?=[ ]|$)\",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:i,keywords:{literal:i}},x,{className:\"number\",begin:s.C_NUMBER_RE+\"\\\\b\",relevance:0},P,B,_],U=[...$];return U.pop(),U.push(w),j.contains=U,{name:\"YAML\",case_insensitive:!0,aliases:[\"yml\"],contains:$}}},251:(s,i)=>{i.read=function(s,i,u,_,w){var x,j,P=8*w-_-1,B=(1<<P)-1,$=B>>1,U=-7,Y=u?w-1:0,X=u?-1:1,Z=s[i+Y];for(Y+=X,x=Z&(1<<-U)-1,Z>>=-U,U+=P;U>0;x=256*x+s[i+Y],Y+=X,U-=8);for(j=x&(1<<-U)-1,x>>=-U,U+=_;U>0;j=256*j+s[i+Y],Y+=X,U-=8);if(0===x)x=1-$;else{if(x===B)return j?NaN:1/0*(Z?-1:1);j+=Math.pow(2,_),x-=$}return(Z?-1:1)*j*Math.pow(2,x-_)},i.write=function(s,i,u,_,w,x){var j,P,B,$=8*x-w-1,U=(1<<$)-1,Y=U>>1,X=23===w?Math.pow(2,-24)-Math.pow(2,-77):0,Z=_?0:x-1,ee=_?1:-1,ie=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(P=isNaN(i)?1:0,j=U):(j=Math.floor(Math.log(i)/Math.LN2),i*(B=Math.pow(2,-j))<1&&(j--,B*=2),(i+=j+Y>=1?X/B:X*Math.pow(2,1-Y))*B>=2&&(j++,B/=2),j+Y>=U?(P=0,j=U):j+Y>=1?(P=(i*B-1)*Math.pow(2,w),j+=Y):(P=i*Math.pow(2,Y-1)*Math.pow(2,w),j=0));w>=8;s[u+Z]=255&P,Z+=ee,P/=256,w-=8);for(j=j<<w|P,$+=w;$>0;s[u+Z]=255&j,Z+=ee,j/=256,$-=8);s[u+Z-ee]|=128*ie}},9404:function(s){s.exports=function(){\"use strict\";var s=Array.prototype.slice;function createClass(s,i){i&&(s.prototype=Object.create(i.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[i])}function isKeyed(s){return!(!s||!s[u])}function isIndexed(s){return!(!s||!s[_])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[w])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var i=\"@@__IMMUTABLE_ITERABLE__@@\",u=\"@@__IMMUTABLE_KEYED__@@\",_=\"@@__IMMUTABLE_INDEXED__@@\",w=\"@@__IMMUTABLE_ORDERED__@@\",x=\"delete\",j=5,P=1<<j,B=P-1,$={},U={value:!1},Y={value:!1};function MakeRef(s){return s.value=!1,s}function SetRef(s){s&&(s.value=!0)}function OwnerID(){}function arrCopy(s,i){i=i||0;for(var u=Math.max(0,s.length-i),_=new Array(u),w=0;w<u;w++)_[w]=s[w+i];return _}function ensureSize(s){return void 0===s.size&&(s.size=s.__iterate(returnTrue)),s.size}function wrapIndex(s,i){if(\"number\"!=typeof i){var u=i>>>0;if(\"\"+u!==i||4294967295===u)return NaN;i=u}return i<0?ensureSize(s)+i:i}function returnTrue(){return!0}function wholeSlice(s,i,u){return(0===s||void 0!==u&&s<=-u)&&(void 0===i||void 0!==u&&i>=u)}function resolveBegin(s,i){return resolveIndex(s,i,0)}function resolveEnd(s,i){return resolveIndex(s,i,i)}function resolveIndex(s,i,u){return void 0===s?u:s<0?Math.max(0,i+s):void 0===i?s:Math.min(i,s)}var X=0,Z=1,ee=2,ie=\"function\"==typeof Symbol&&Symbol.iterator,ae=\"@@iterator\",le=ie||ae;function Iterator(s){this.next=s}function iteratorValue(s,i,u,_){var w=0===s?i:1===s?u:[i,u];return _?_.value=w:_={value:w,done:!1},_}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&\"function\"==typeof s.next}function getIterator(s){var i=getIteratorFn(s);return i&&i.call(s)}function getIteratorFn(s){var i=s&&(ie&&s[ie]||s[ae]);if(\"function\"==typeof i)return i}function isArrayLike(s){return s&&\"number\"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=X,Iterator.VALUES=Z,Iterator.ENTRIES=ee,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[le]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!0)},Seq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!1)},IndexedSeq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ce,pe,de,fe=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var i=Object.keys(s);this._object=s,this._keys=i,this.size=i.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[fe])}function emptySequence(){return ce||(ce=new ArraySeq([]))}function keyedSeqFromValue(s){var i=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():\"object\"==typeof s?new ObjectSeq(s):void 0;if(!i)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+s);return i}function indexedSeqFromValue(s){var i=maybeIndexedSeqFromValue(s);if(!i)throw new TypeError(\"Expected Array or iterable object of values: \"+s);return i}function seqFromValue(s){var i=maybeIndexedSeqFromValue(s)||\"object\"==typeof s&&new ObjectSeq(s);if(!i)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+s);return i}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,i,u,_){var w=s._cache;if(w){for(var x=w.length-1,j=0;j<=x;j++){var P=w[u?x-j:j];if(!1===i(P[1],_?P[0]:j,s))return j+1}return j}return s.__iterateUncached(i,u)}function seqIterator(s,i,u,_){var w=s._cache;if(w){var x=w.length-1,j=0;return new Iterator((function(){var s=w[u?x-j:j];return j++>x?iteratorDone():iteratorValue(i,_?s[0]:j-1,s[1])}))}return s.__iteratorUncached(i,u)}function fromJS(s,i){return i?fromJSWith(i,s,\"\",{\"\":s}):fromJSDefault(s)}function fromJSWith(s,i,u,_){return Array.isArray(i)?s.call(_,u,IndexedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):isPlainObj(i)?s.call(_,u,KeyedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):i}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,i){if(s===i||s!=s&&i!=i)return!0;if(!s||!i)return!1;if(\"function\"==typeof s.valueOf&&\"function\"==typeof i.valueOf){if((s=s.valueOf())===(i=i.valueOf())||s!=s&&i!=i)return!0;if(!s||!i)return!1}return!(\"function\"!=typeof s.equals||\"function\"!=typeof i.equals||!s.equals(i))}function deepEqual(s,i){if(s===i)return!0;if(!isIterable(i)||void 0!==s.size&&void 0!==i.size&&s.size!==i.size||void 0!==s.__hash&&void 0!==i.__hash&&s.__hash!==i.__hash||isKeyed(s)!==isKeyed(i)||isIndexed(s)!==isIndexed(i)||isOrdered(s)!==isOrdered(i))return!1;if(0===s.size&&0===i.size)return!0;var u=!isAssociative(s);if(isOrdered(s)){var _=s.entries();return i.every((function(s,i){var w=_.next().value;return w&&is(w[1],s)&&(u||is(w[0],i))}))&&_.next().done}var w=!1;if(void 0===s.size)if(void 0===i.size)\"function\"==typeof s.cacheResult&&s.cacheResult();else{w=!0;var x=s;s=i,i=x}var j=!0,P=i.__iterate((function(i,_){if(u?!s.has(i):w?!is(i,s.get(_,$)):!is(s.get(_,$),i))return j=!1,!1}));return j&&s.size===P}function Repeat(s,i){if(!(this instanceof Repeat))return new Repeat(s,i);if(this._value=s,this.size=void 0===i?1/0:Math.max(0,i),0===this.size){if(pe)return pe;pe=this}}function invariant(s,i){if(!s)throw new Error(i)}function Range(s,i,u){if(!(this instanceof Range))return new Range(s,i,u);if(invariant(0!==u,\"Cannot step a Range by 0\"),s=s||0,void 0===i&&(i=1/0),u=void 0===u?1:Math.abs(u),i<s&&(u=-u),this._start=s,this._end=i,this._step=u,this.size=Math.max(0,Math.ceil((i-s)/u-1)+1),0===this.size){if(de)return de;de=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[fe]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(s,i){return this.has(s)?this._array[wrapIndex(this,s)]:i},ArraySeq.prototype.__iterate=function(s,i){for(var u=this._array,_=u.length-1,w=0;w<=_;w++)if(!1===s(u[i?_-w:w],w,this))return w+1;return w},ArraySeq.prototype.__iterator=function(s,i){var u=this._array,_=u.length-1,w=0;return new Iterator((function(){return w>_?iteratorDone():iteratorValue(s,w,u[i?_-w++:w++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,i){return void 0===i||this.has(s)?this._object[s]:i},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,i){for(var u=this._object,_=this._keys,w=_.length-1,x=0;x<=w;x++){var j=_[i?w-x:x];if(!1===s(u[j],j,this))return x+1}return x},ObjectSeq.prototype.__iterator=function(s,i){var u=this._object,_=this._keys,w=_.length-1,x=0;return new Iterator((function(){var j=_[i?w-x:x];return x++>w?iteratorDone():iteratorValue(s,j,u[j])}))},ObjectSeq.prototype[w]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);var u=getIterator(this._iterable),_=0;if(isIterator(u))for(var w;!(w=u.next()).done&&!1!==s(w.value,_++,this););return _},IterableSeq.prototype.__iteratorUncached=function(s,i){if(i)return this.cacheResult().__iterator(s,i);var u=getIterator(this._iterable);if(!isIterator(u))return new Iterator(iteratorDone);var _=0;return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,_++,i.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);for(var u,_=this._iterator,w=this._iteratorCache,x=0;x<w.length;)if(!1===s(w[x],x++,this))return x;for(;!(u=_.next()).done;){var j=u.value;if(w[x]=j,!1===s(j,x++,this))break}return x},IteratorSeq.prototype.__iteratorUncached=function(s,i){if(i)return this.cacheResult().__iterator(s,i);var u=this._iterator,_=this._iteratorCache,w=0;return new Iterator((function(){if(w>=_.length){var i=u.next();if(i.done)return i;_[w]=i.value}return iteratorValue(s,w,_[w++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(s,i){return this.has(s)?this._value:i},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,i){var u=this.size;return wholeSlice(s,i,u)?this:new Repeat(this._value,resolveEnd(i,u)-resolveBegin(s,u))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,i){for(var u=0;u<this.size;u++)if(!1===s(this._value,u,this))return u+1;return u},Repeat.prototype.__iterator=function(s,i){var u=this,_=0;return new Iterator((function(){return _<u.size?iteratorValue(s,_++,u._value):iteratorDone()}))},Repeat.prototype.equals=function(s){return s instanceof Repeat?is(this._value,s._value):deepEqual(s)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(s,i){return this.has(s)?this._start+wrapIndex(this,s)*this._step:i},Range.prototype.includes=function(s){var i=(s-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},Range.prototype.slice=function(s,i){return wholeSlice(s,i,this.size)?this:(s=resolveBegin(s,this.size),(i=resolveEnd(i,this.size))<=s?new Range(0,0):new Range(this.get(s,this._end),this.get(i,this._end),this._step))},Range.prototype.indexOf=function(s){var i=s-this._start;if(i%this._step==0){var u=i/this._step;if(u>=0&&u<this.size)return u}return-1},Range.prototype.lastIndexOf=function(s){return this.indexOf(s)},Range.prototype.__iterate=function(s,i){for(var u=this.size-1,_=this._step,w=i?this._start+u*_:this._start,x=0;x<=u;x++){if(!1===s(w,x,this))return x+1;w+=i?-_:_}return x},Range.prototype.__iterator=function(s,i){var u=this.size-1,_=this._step,w=i?this._start+u*_:this._start,x=0;return new Iterator((function(){var j=w;return w+=i?-_:_,x>u?iteratorDone():iteratorValue(s,x++,j)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var ye=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,i){var u=65535&(s|=0),_=65535&(i|=0);return u*_+((s>>>16)*_+u*(i>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if(\"function\"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var i=typeof s;if(\"number\"===i){if(s!=s||s===1/0)return 0;var u=0|s;for(u!==s&&(u^=4294967295*s);s>4294967295;)u^=s/=4294967295;return smi(u)}if(\"string\"===i)return s.length>Te?cachedHashString(s):hashString(s);if(\"function\"==typeof s.hashCode)return s.hashCode();if(\"object\"===i)return hashJSObj(s);if(\"function\"==typeof s.toString)return hashString(s.toString());throw new Error(\"Value type \"+i+\" cannot be hashed.\")}function cachedHashString(s){var i=$e[s];return void 0===i&&(i=hashString(s),qe===Re&&(qe=0,$e={}),qe++,$e[s]=i),i}function hashString(s){for(var i=0,u=0;u<s.length;u++)i=31*i+s.charCodeAt(u)|0;return smi(i)}function hashJSObj(s){var i;if(Se&&void 0!==(i=we.get(s)))return i;if(void 0!==(i=s[Pe]))return i;if(!_e){if(void 0!==(i=s.propertyIsEnumerable&&s.propertyIsEnumerable[Pe]))return i;if(void 0!==(i=getIENodeHash(s)))return i}if(i=++xe,1073741824&xe&&(xe=0),Se)we.set(s,i);else{if(void 0!==be&&!1===be(s))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(_e)Object.defineProperty(s,Pe,{enumerable:!1,configurable:!1,writable:!1,value:i});else if(void 0!==s.propertyIsEnumerable&&s.propertyIsEnumerable===s.constructor.prototype.propertyIsEnumerable)s.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},s.propertyIsEnumerable[Pe]=i;else{if(void 0===s.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");s[Pe]=i}}return i}var be=Object.isExtensible,_e=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(s){return!1}}();function getIENodeHash(s){if(s&&s.nodeType>0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var we,Se=\"function\"==typeof WeakMap;Se&&(we=new WeakMap);var xe=0,Pe=\"__immutablehash__\";\"function\"==typeof Symbol&&(Pe=Symbol(Pe));var Te=16,Re=255,qe=0,$e={};function assertNotInfinite(s){invariant(s!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(i){var u=KeyedIterable(s);assertNotInfinite(u.size),u.forEach((function(s,u){return i.set(u,s)}))}))}function isMap(s){return!(!s||!s[We])}createClass(Map,KeyedCollection),Map.of=function(){var i=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var u=0;u<i.length;u+=2){if(u+1>=i.length)throw new Error(\"Missing value for key: \"+i[u]);s.set(i[u],i[u+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(s,i){return this._root?this._root.get(0,void 0,s,i):i},Map.prototype.set=function(s,i){return updateMap(this,s,i)},Map.prototype.setIn=function(s,i){return this.updateIn(s,$,(function(){return i}))},Map.prototype.remove=function(s){return updateMap(this,s,$)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return $}))},Map.prototype.update=function(s,i,u){return 1===arguments.length?s(this):this.updateIn([s],i,u)},Map.prototype.updateIn=function(s,i,u){u||(u=i,i=void 0);var _=updateInDeepMap(this,forceIterator(s),i,u);return _===$?void 0:_},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(i){return mergeIntoMapWith(this,i,s.call(arguments,1))},Map.prototype.mergeIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return\"function\"==typeof s.merge?s.merge.apply(s,u):u[u.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(i){var u=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(i),u)},Map.prototype.mergeDeepIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return\"function\"==typeof s.mergeDeep?s.mergeDeep.apply(s,u):u[u.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,i){return OrderedMap(sortFactory(this,i,s))},Map.prototype.withMutations=function(s){var i=this.asMutable();return s(i),i.wasAltered()?i.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,i){return new MapIterator(this,s,i)},Map.prototype.__iterate=function(s,i){var u=this,_=0;return this._root&&this._root.iterate((function(i){return _++,s(i[1],i[0],u)}),i),_},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var ze,We=\"@@__IMMUTABLE_MAP__@@\",He=Map.prototype;function ArrayMapNode(s,i){this.ownerID=s,this.entries=i}function BitmapIndexedNode(s,i,u){this.ownerID=s,this.bitmap=i,this.nodes=u}function HashArrayMapNode(s,i,u){this.ownerID=s,this.count=i,this.nodes=u}function HashCollisionNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entries=u}function ValueNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entry=u}function MapIterator(s,i,u){this._type=i,this._reverse=u,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,i){return iteratorValue(s,i[0],i[1])}function mapIteratorFrame(s,i){return{node:s,index:0,__prev:i}}function makeMap(s,i,u,_){var w=Object.create(He);return w.size=s,w._root=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyMap(){return ze||(ze=makeMap(0))}function updateMap(s,i,u){var _,w;if(s._root){var x=MakeRef(U),j=MakeRef(Y);if(_=updateNode(s._root,s.__ownerID,0,void 0,i,u,x,j),!j.value)return s;w=s.size+(x.value?u===$?-1:1:0)}else{if(u===$)return s;w=1,_=new ArrayMapNode(s.__ownerID,[[i,u]])}return s.__ownerID?(s.size=w,s._root=_,s.__hash=void 0,s.__altered=!0,s):_?makeMap(w,_):emptyMap()}function updateNode(s,i,u,_,w,x,j,P){return s?s.update(i,u,_,w,x,j,P):x===$?s:(SetRef(P),SetRef(j),new ValueNode(i,_,[w,x]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,i,u,_,w){if(s.keyHash===_)return new HashCollisionNode(i,_,[s.entry,w]);var x,P=(0===u?s.keyHash:s.keyHash>>>u)&B,$=(0===u?_:_>>>u)&B;return new BitmapIndexedNode(i,1<<P|1<<$,P===$?[mergeIntoNode(s,i,u+j,_,w)]:(x=new ValueNode(i,_,w),P<$?[s,x]:[x,s]))}function createNodes(s,i,u,_){s||(s=new OwnerID);for(var w=new ValueNode(s,hash(u),[u,_]),x=0;x<i.length;x++){var j=i[x];w=w.update(s,0,void 0,j[0],j[1])}return w}function packNodes(s,i,u,_){for(var w=0,x=0,j=new Array(u),P=0,B=1,$=i.length;P<$;P++,B<<=1){var U=i[P];void 0!==U&&P!==_&&(w|=B,j[x++]=U)}return new BitmapIndexedNode(s,w,j)}function expandNodes(s,i,u,_,w){for(var x=0,j=new Array(P),B=0;0!==u;B++,u>>>=1)j[B]=1&u?i[x++]:void 0;return j[_]=w,new HashArrayMapNode(s,x+1,j)}function mergeIntoMapWith(s,i,u){for(var _=[],w=0;w<u.length;w++){var x=u[w],j=KeyedIterable(x);isIterable(x)||(j=j.map((function(s){return fromJS(s)}))),_.push(j)}return mergeIntoCollectionWith(s,i,_)}function deepMerger(s,i,u){return s&&s.mergeDeep&&isIterable(i)?s.mergeDeep(i):is(s,i)?s:i}function deepMergerWith(s){return function(i,u,_){if(i&&i.mergeDeepWith&&isIterable(u))return i.mergeDeepWith(s,u);var w=s(i,u,_);return is(i,w)?i:w}}function mergeIntoCollectionWith(s,i,u){return 0===(u=u.filter((function(s){return 0!==s.size}))).length?s:0!==s.size||s.__ownerID||1!==u.length?s.withMutations((function(s){for(var _=i?function(u,_){s.update(_,$,(function(s){return s===$?u:i(s,u,_)}))}:function(i,u){s.set(u,i)},w=0;w<u.length;w++)u[w].forEach(_)})):s.constructor(u[0])}function updateInDeepMap(s,i,u,_){var w=s===$,x=i.next();if(x.done){var j=w?u:s,P=_(j);return P===j?s:P}invariant(w||s&&s.set,\"invalid keyPath\");var B=x.value,U=w?$:s.get(B,$),Y=updateInDeepMap(U,i,u,_);return Y===U?s:Y===$?s.remove(B):(w?emptyMap():s).set(B,Y)}function popCount(s){return s=(s=(858993459&(s-=s>>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,i,u,_){var w=_?s:arrCopy(s);return w[i]=u,w}function spliceIn(s,i,u,_){var w=s.length+1;if(_&&i+1===w)return s[i]=u,s;for(var x=new Array(w),j=0,P=0;P<w;P++)P===i?(x[P]=u,j=-1):x[P]=s[P+j];return x}function spliceOut(s,i,u){var _=s.length-1;if(u&&i===_)return s.pop(),s;for(var w=new Array(_),x=0,j=0;j<_;j++)j===i&&(x=1),w[j]=s[j+x];return w}He[We]=!0,He[x]=He.remove,He.removeIn=He.deleteIn,ArrayMapNode.prototype.get=function(s,i,u,_){for(var w=this.entries,x=0,j=w.length;x<j;x++)if(is(u,w[x][0]))return w[x][1];return _},ArrayMapNode.prototype.update=function(s,i,u,_,w,x,j){for(var P=w===$,B=this.entries,U=0,Y=B.length;U<Y&&!is(_,B[U][0]);U++);var X=U<Y;if(X?B[U][1]===w:P)return this;if(SetRef(j),(P||!X)&&SetRef(x),!P||1!==B.length){if(!X&&!P&&B.length>=Ye)return createNodes(s,B,_,w);var Z=s&&s===this.ownerID,ee=Z?B:arrCopy(B);return X?P?U===Y-1?ee.pop():ee[U]=ee.pop():ee[U]=[_,w]:ee.push([_,w]),Z?(this.entries=ee,this):new ArrayMapNode(s,ee)}},BitmapIndexedNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=1<<((0===s?i:i>>>s)&B),x=this.bitmap;return 0==(x&w)?_:this.nodes[popCount(x&w-1)].get(s+j,i,u,_)},BitmapIndexedNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=1<<U,X=this.bitmap,Z=0!=(X&Y);if(!Z&&w===$)return this;var ee=popCount(X&Y-1),ie=this.nodes,ae=Z?ie[ee]:void 0,le=updateNode(ae,s,i+j,u,_,w,x,P);if(le===ae)return this;if(!Z&&le&&ie.length>=Xe)return expandNodes(s,ie,X,U,le);if(Z&&!le&&2===ie.length&&isLeafNode(ie[1^ee]))return ie[1^ee];if(Z&&le&&1===ie.length&&isLeafNode(le))return le;var ce=s&&s===this.ownerID,pe=Z?le?X:X^Y:X|Y,de=Z?le?setIn(ie,ee,le,ce):spliceOut(ie,ee,ce):spliceIn(ie,ee,le,ce);return ce?(this.bitmap=pe,this.nodes=de,this):new BitmapIndexedNode(s,pe,de)},HashArrayMapNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=(0===s?i:i>>>s)&B,x=this.nodes[w];return x?x.get(s+j,i,u,_):_},HashArrayMapNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=w===$,X=this.nodes,Z=X[U];if(Y&&!Z)return this;var ee=updateNode(Z,s,i+j,u,_,w,x,P);if(ee===Z)return this;var ie=this.count;if(Z){if(!ee&&--ie<Qe)return packNodes(s,X,ie,U)}else ie++;var ae=s&&s===this.ownerID,le=setIn(X,U,ee,ae);return ae?(this.count=ie,this.nodes=le,this):new HashArrayMapNode(s,ie,le)},HashCollisionNode.prototype.get=function(s,i,u,_){for(var w=this.entries,x=0,j=w.length;x<j;x++)if(is(u,w[x][0]))return w[x][1];return _},HashCollisionNode.prototype.update=function(s,i,u,_,w,x,j){void 0===u&&(u=hash(_));var P=w===$;if(u!==this.keyHash)return P?this:(SetRef(j),SetRef(x),mergeIntoNode(this,s,i,u,[_,w]));for(var B=this.entries,U=0,Y=B.length;U<Y&&!is(_,B[U][0]);U++);var X=U<Y;if(X?B[U][1]===w:P)return this;if(SetRef(j),(P||!X)&&SetRef(x),P&&2===Y)return new ValueNode(s,this.keyHash,B[1^U]);var Z=s&&s===this.ownerID,ee=Z?B:arrCopy(B);return X?P?U===Y-1?ee.pop():ee[U]=ee.pop():ee[U]=[_,w]:ee.push([_,w]),Z?(this.entries=ee,this):new HashCollisionNode(s,this.keyHash,ee)},ValueNode.prototype.get=function(s,i,u,_){return is(u,this.entry[0])?this.entry[1]:_},ValueNode.prototype.update=function(s,i,u,_,w,x,j){var P=w===$,B=is(_,this.entry[0]);return(B?w===this.entry[1]:P)?this:(SetRef(j),P?void SetRef(x):B?s&&s===this.ownerID?(this.entry[1]=w,this):new ValueNode(s,this.keyHash,[_,w]):(SetRef(x),mergeIntoNode(this,s,i,hash(_),[_,w])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(s,i){for(var u=this.entries,_=0,w=u.length-1;_<=w;_++)if(!1===s(u[i?w-_:_]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(s,i){for(var u=this.nodes,_=0,w=u.length-1;_<=w;_++){var x=u[i?w-_:_];if(x&&!1===x.iterate(s,i))return!1}},ValueNode.prototype.iterate=function(s,i){return s(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var s=this._type,i=this._stack;i;){var u,_=i.node,w=i.index++;if(_.entry){if(0===w)return mapIteratorValue(s,_.entry)}else if(_.entries){if(w<=(u=_.entries.length-1))return mapIteratorValue(s,_.entries[this._reverse?u-w:w])}else if(w<=(u=_.nodes.length-1)){var x=_.nodes[this._reverse?u-w:w];if(x){if(x.entry)return mapIteratorValue(s,x.entry);i=this._stack=mapIteratorFrame(x,i)}continue}i=this._stack=this._stack.__prev}return iteratorDone()};var Ye=P/4,Xe=P/2,Qe=P/4;function List(s){var i=emptyList();if(null==s)return i;if(isList(s))return s;var u=IndexedIterable(s),_=u.size;return 0===_?i:(assertNotInfinite(_),_>0&&_<P?makeList(0,_,j,null,new VNode(u.toArray())):i.withMutations((function(s){s.setSize(_),u.forEach((function(i,u){return s.set(u,i)}))})))}function isList(s){return!(!s||!s[et])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(s,i){if((s=wrapIndex(this,s))>=0&&s<this.size){var u=listNodeFor(this,s+=this._origin);return u&&u.array[s&B]}return i},List.prototype.set=function(s,i){return updateList(this,s,i)},List.prototype.remove=function(s){return this.has(s)?0===s?this.shift():s===this.size-1?this.pop():this.splice(s,1):this},List.prototype.insert=function(s,i){return this.splice(s,0,i)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=j,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var s=arguments,i=this.size;return this.withMutations((function(u){setListBounds(u,0,i+s.length);for(var _=0;_<s.length;_++)u.set(i+_,s[_])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var s=arguments;return this.withMutations((function(i){setListBounds(i,-s.length);for(var u=0;u<s.length;u++)i.set(u,s[u])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(i){return mergeIntoListWith(this,i,s.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(i){var u=s.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(i),u)},List.prototype.setSize=function(s){return setListBounds(this,0,s)},List.prototype.slice=function(s,i){var u=this.size;return wholeSlice(s,i,u)?this:setListBounds(this,resolveBegin(s,u),resolveEnd(i,u))},List.prototype.__iterator=function(s,i){var u=0,_=iterateList(this,i);return new Iterator((function(){var i=_();return i===ot?iteratorDone():iteratorValue(s,u++,i)}))},List.prototype.__iterate=function(s,i){for(var u,_=0,w=iterateList(this,i);(u=w())!==ot&&!1!==s(u,_++,this););return _},List.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeList(this._origin,this._capacity,this._level,this._root,this._tail,s,this.__hash):(this.__ownerID=s,this)},List.isList=isList;var et=\"@@__IMMUTABLE_LIST__@@\",tt=List.prototype;function VNode(s,i){this.array=s,this.ownerID=i}tt[et]=!0,tt[x]=tt.remove,tt.setIn=He.setIn,tt.deleteIn=tt.removeIn=He.removeIn,tt.update=He.update,tt.updateIn=He.updateIn,tt.mergeIn=He.mergeIn,tt.mergeDeepIn=He.mergeDeepIn,tt.withMutations=He.withMutations,tt.asMutable=He.asMutable,tt.asImmutable=He.asImmutable,tt.wasAltered=He.wasAltered,VNode.prototype.removeBefore=function(s,i,u){if(u===i?1<<i:0===this.array.length)return this;var _=u>>>i&B;if(_>=this.array.length)return new VNode([],s);var w,x=0===_;if(i>0){var P=this.array[_];if((w=P&&P.removeBefore(s,i-j,u))===P&&x)return this}if(x&&!w)return this;var $=editableVNode(this,s);if(!x)for(var U=0;U<_;U++)$.array[U]=void 0;return w&&($.array[_]=w),$},VNode.prototype.removeAfter=function(s,i,u){if(u===(i?1<<i:0)||0===this.array.length)return this;var _,w=u-1>>>i&B;if(w>=this.array.length)return this;if(i>0){var x=this.array[w];if((_=x&&x.removeAfter(s,i-j,u))===x&&w===this.array.length-1)return this}var P=editableVNode(this,s);return P.array.splice(w+1),_&&(P.array[w]=_),P};var rt,nt,ot={};function iterateList(s,i){var u=s._origin,_=s._capacity,w=getTailOffset(_),x=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,i,u){return 0===i?iterateLeaf(s,u):iterateNode(s,i,u)}function iterateLeaf(s,j){var B=j===w?x&&x.array:s&&s.array,$=j>u?0:u-j,U=_-j;return U>P&&(U=P),function(){if($===U)return ot;var s=i?--U:$++;return B&&B[s]}}function iterateNode(s,w,x){var B,$=s&&s.array,U=x>u?0:u-x>>w,Y=1+(_-x>>w);return Y>P&&(Y=P),function(){for(;;){if(B){var s=B();if(s!==ot)return s;B=null}if(U===Y)return ot;var u=i?--Y:U++;B=iterateNodeOrLeaf($&&$[u],w-j,x+(u<<w))}}}}function makeList(s,i,u,_,w,x,j){var P=Object.create(tt);return P.size=i-s,P._origin=s,P._capacity=i,P._level=u,P._root=_,P._tail=w,P.__ownerID=x,P.__hash=j,P.__altered=!1,P}function emptyList(){return rt||(rt=makeList(0,0,j))}function updateList(s,i,u){if((i=wrapIndex(s,i))!=i)return s;if(i>=s.size||i<0)return s.withMutations((function(s){i<0?setListBounds(s,i).set(0,u):setListBounds(s,0,i+1).set(i,u)}));i+=s._origin;var _=s._tail,w=s._root,x=MakeRef(Y);return i>=getTailOffset(s._capacity)?_=updateVNode(_,s.__ownerID,0,i,u,x):w=updateVNode(w,s.__ownerID,s._level,i,u,x),x.value?s.__ownerID?(s._root=w,s._tail=_,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,w,_):s}function updateVNode(s,i,u,_,w,x){var P,$=_>>>u&B,U=s&&$<s.array.length;if(!U&&void 0===w)return s;if(u>0){var Y=s&&s.array[$],X=updateVNode(Y,i,u-j,_,w,x);return X===Y?s:((P=editableVNode(s,i)).array[$]=X,P)}return U&&s.array[$]===w?s:(SetRef(x),P=editableVNode(s,i),void 0===w&&$===P.array.length-1?P.array.pop():P.array[$]=w,P)}function editableVNode(s,i){return i&&s&&i===s.ownerID?s:new VNode(s?s.array.slice():[],i)}function listNodeFor(s,i){if(i>=getTailOffset(s._capacity))return s._tail;if(i<1<<s._level+j){for(var u=s._root,_=s._level;u&&_>0;)u=u.array[i>>>_&B],_-=j;return u}}function setListBounds(s,i,u){void 0!==i&&(i|=0),void 0!==u&&(u|=0);var _=s.__ownerID||new OwnerID,w=s._origin,x=s._capacity,P=w+i,$=void 0===u?x:u<0?x+u:w+u;if(P===w&&$===x)return s;if(P>=$)return s.clear();for(var U=s._level,Y=s._root,X=0;P+X<0;)Y=new VNode(Y&&Y.array.length?[void 0,Y]:[],_),X+=1<<(U+=j);X&&(P+=X,w+=X,$+=X,x+=X);for(var Z=getTailOffset(x),ee=getTailOffset($);ee>=1<<U+j;)Y=new VNode(Y&&Y.array.length?[Y]:[],_),U+=j;var ie=s._tail,ae=ee<Z?listNodeFor(s,$-1):ee>Z?new VNode([],_):ie;if(ie&&ee>Z&&P<x&&ie.array.length){for(var le=Y=editableVNode(Y,_),ce=U;ce>j;ce-=j){var pe=Z>>>ce&B;le=le.array[pe]=editableVNode(le.array[pe],_)}le.array[Z>>>j&B]=ie}if($<x&&(ae=ae&&ae.removeAfter(_,0,$)),P>=ee)P-=ee,$-=ee,U=j,Y=null,ae=ae&&ae.removeBefore(_,0,P);else if(P>w||ee<Z){for(X=0;Y;){var de=P>>>U&B;if(de!==ee>>>U&B)break;de&&(X+=(1<<U)*de),U-=j,Y=Y.array[de]}Y&&P>w&&(Y=Y.removeBefore(_,U,P-X)),Y&&ee<Z&&(Y=Y.removeAfter(_,U,ee-X)),X&&(P-=X,$-=X)}return s.__ownerID?(s.size=$-P,s._origin=P,s._capacity=$,s._level=U,s._root=Y,s._tail=ae,s.__hash=void 0,s.__altered=!0,s):makeList(P,$,U,Y,ae)}function mergeIntoListWith(s,i,u){for(var _=[],w=0,x=0;x<u.length;x++){var j=u[x],P=IndexedIterable(j);P.size>w&&(w=P.size),isIterable(j)||(P=P.map((function(s){return fromJS(s)}))),_.push(P)}return w>s.size&&(s=s.setSize(w)),mergeIntoCollectionWith(s,i,_)}function getTailOffset(s){return s<P?0:s-1>>>j<<j}function OrderedMap(s){return null==s?emptyOrderedMap():isOrderedMap(s)?s:emptyOrderedMap().withMutations((function(i){var u=KeyedIterable(s);assertNotInfinite(u.size),u.forEach((function(s,u){return i.set(u,s)}))}))}function isOrderedMap(s){return isMap(s)&&isOrdered(s)}function makeOrderedMap(s,i,u,_){var w=Object.create(OrderedMap.prototype);return w.size=s?s.size:0,w._map=s,w._list=i,w.__ownerID=u,w.__hash=_,w}function emptyOrderedMap(){return nt||(nt=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(s,i,u){var _,w,x=s._map,j=s._list,B=x.get(i),U=void 0!==B;if(u===$){if(!U)return s;j.size>=P&&j.size>=2*x.size?(_=(w=j.filter((function(s,i){return void 0!==s&&B!==i}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(_.__ownerID=w.__ownerID=s.__ownerID)):(_=x.remove(i),w=B===j.size-1?j.pop():j.set(B,void 0))}else if(U){if(u===j.get(B)[1])return s;_=x,w=j.set(B,[i,u])}else _=x.set(i,j.size),w=j.set(j.size,[i,u]);return s.__ownerID?(s.size=_.size,s._map=_,s._list=w,s.__hash=void 0,s):makeOrderedMap(_,w)}function ToKeyedSequence(s,i){this._iter=s,this._useKeys=i,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.flip=function(){return s},i.reverse=function(){var i=s.reverse.apply(this);return i.flip=function(){return s.reverse()},i},i.has=function(i){return s.includes(i)},i.includes=function(i){return s.has(i)},i.cacheResult=cacheResultThrough,i.__iterateUncached=function(i,u){var _=this;return s.__iterate((function(s,u){return!1!==i(u,s,_)}),u)},i.__iteratorUncached=function(i,u){if(i===ee){var _=s.__iterator(i,u);return new Iterator((function(){var s=_.next();if(!s.done){var i=s.value[0];s.value[0]=s.value[1],s.value[1]=i}return s}))}return s.__iterator(i===Z?X:Z,u)},i}function mapFactory(s,i,u){var _=makeSequence(s);return _.size=s.size,_.has=function(i){return s.has(i)},_.get=function(_,w){var x=s.get(_,$);return x===$?w:i.call(u,x,_,s)},_.__iterateUncached=function(_,w){var x=this;return s.__iterate((function(s,w,j){return!1!==_(i.call(u,s,w,j),w,x)}),w)},_.__iteratorUncached=function(_,w){var x=s.__iterator(ee,w);return new Iterator((function(){var w=x.next();if(w.done)return w;var j=w.value,P=j[0];return iteratorValue(_,P,i.call(u,j[1],P,s),w)}))},_}function reverseFactory(s,i){var u=makeSequence(s);return u._iter=s,u.size=s.size,u.reverse=function(){return s},s.flip&&(u.flip=function(){var i=flipFactory(s);return i.reverse=function(){return s.flip()},i}),u.get=function(u,_){return s.get(i?u:-1-u,_)},u.has=function(u){return s.has(i?u:-1-u)},u.includes=function(i){return s.includes(i)},u.cacheResult=cacheResultThrough,u.__iterate=function(i,u){var _=this;return s.__iterate((function(s,u){return i(s,u,_)}),!u)},u.__iterator=function(i,u){return s.__iterator(i,!u)},u}function filterFactory(s,i,u,_){var w=makeSequence(s);return _&&(w.has=function(_){var w=s.get(_,$);return w!==$&&!!i.call(u,w,_,s)},w.get=function(_,w){var x=s.get(_,$);return x!==$&&i.call(u,x,_,s)?x:w}),w.__iterateUncached=function(w,x){var j=this,P=0;return s.__iterate((function(s,x,B){if(i.call(u,s,x,B))return P++,w(s,_?x:P-1,j)}),x),P},w.__iteratorUncached=function(w,x){var j=s.__iterator(ee,x),P=0;return new Iterator((function(){for(;;){var x=j.next();if(x.done)return x;var B=x.value,$=B[0],U=B[1];if(i.call(u,U,$,s))return iteratorValue(w,_?$:P++,U,x)}}))},w}function countByFactory(s,i,u){var _=Map().asMutable();return s.__iterate((function(w,x){_.update(i.call(u,w,x,s),0,(function(s){return s+1}))})),_.asImmutable()}function groupByFactory(s,i,u){var _=isKeyed(s),w=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(x,j){w.update(i.call(u,x,j,s),(function(s){return(s=s||[]).push(_?[j,x]:x),s}))}));var x=iterableClass(s);return w.map((function(i){return reify(s,x(i))}))}function sliceFactory(s,i,u,_){var w=s.size;if(void 0!==i&&(i|=0),void 0!==u&&(u===1/0?u=w:u|=0),wholeSlice(i,u,w))return s;var x=resolveBegin(i,w),j=resolveEnd(u,w);if(x!=x||j!=j)return sliceFactory(s.toSeq().cacheResult(),i,u,_);var P,B=j-x;B==B&&(P=B<0?0:B);var $=makeSequence(s);return $.size=0===P?P:s.size&&P||void 0,!_&&isSeq(s)&&P>=0&&($.get=function(i,u){return(i=wrapIndex(this,i))>=0&&i<P?s.get(i+x,u):u}),$.__iterateUncached=function(i,u){var w=this;if(0===P)return 0;if(u)return this.cacheResult().__iterate(i,u);var j=0,B=!0,$=0;return s.__iterate((function(s,u){if(!B||!(B=j++<x))return $++,!1!==i(s,_?u:$-1,w)&&$!==P})),$},$.__iteratorUncached=function(i,u){if(0!==P&&u)return this.cacheResult().__iterator(i,u);var w=0!==P&&s.__iterator(i,u),j=0,B=0;return new Iterator((function(){for(;j++<x;)w.next();if(++B>P)return iteratorDone();var s=w.next();return _||i===Z?s:iteratorValue(i,B-1,i===X?void 0:s.value[1],s)}))},$}function takeWhileFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterate(_,w);var j=0;return s.__iterate((function(s,w,P){return i.call(u,s,w,P)&&++j&&_(s,w,x)})),j},_.__iteratorUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterator(_,w);var j=s.__iterator(ee,w),P=!0;return new Iterator((function(){if(!P)return iteratorDone();var s=j.next();if(s.done)return s;var w=s.value,B=w[0],$=w[1];return i.call(u,$,B,x)?_===ee?s:iteratorValue(_,B,$,s):(P=!1,iteratorDone())}))},_}function skipWhileFactory(s,i,u,_){var w=makeSequence(s);return w.__iterateUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterate(w,x);var P=!0,B=0;return s.__iterate((function(s,x,$){if(!P||!(P=i.call(u,s,x,$)))return B++,w(s,_?x:B-1,j)})),B},w.__iteratorUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterator(w,x);var P=s.__iterator(ee,x),B=!0,$=0;return new Iterator((function(){var s,x,U;do{if((s=P.next()).done)return _||w===Z?s:iteratorValue(w,$++,w===X?void 0:s.value[1],s);var Y=s.value;x=Y[0],U=Y[1],B&&(B=i.call(u,U,x,j))}while(B);return w===ee?s:iteratorValue(w,x,U,s)}))},w}function concatFactory(s,i){var u=isKeyed(s),_=[s].concat(i).map((function(s){return isIterable(s)?u&&(s=KeyedIterable(s)):s=u?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===_.length)return s;if(1===_.length){var w=_[0];if(w===s||u&&isKeyed(w)||isIndexed(s)&&isIndexed(w))return w}var x=new ArraySeq(_);return u?x=x.toKeyedSeq():isIndexed(s)||(x=x.toSetSeq()),(x=x.flatten(!0)).size=_.reduce((function(s,i){if(void 0!==s){var u=i.size;if(void 0!==u)return s+u}}),0),x}function flattenFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=0,j=!1;function flatDeep(s,P){var B=this;s.__iterate((function(s,w){return(!i||P<i)&&isIterable(s)?flatDeep(s,P+1):!1===_(s,u?w:x++,B)&&(j=!0),!j}),w)}return flatDeep(s,0),x},_.__iteratorUncached=function(_,w){var x=s.__iterator(_,w),j=[],P=0;return new Iterator((function(){for(;x;){var s=x.next();if(!1===s.done){var B=s.value;if(_===ee&&(B=B[1]),i&&!(j.length<i)||!isIterable(B))return u?s:iteratorValue(_,P++,B,s);j.push(x),x=B.__iterator(_,w)}else x=j.pop()}return iteratorDone()}))},_}function flatMapFactory(s,i,u){var _=iterableClass(s);return s.toSeq().map((function(w,x){return _(i.call(u,w,x,s))})).flatten(!0)}function interposeFactory(s,i){var u=makeSequence(s);return u.size=s.size&&2*s.size-1,u.__iterateUncached=function(u,_){var w=this,x=0;return s.__iterate((function(s,_){return(!x||!1!==u(i,x++,w))&&!1!==u(s,x++,w)}),_),x},u.__iteratorUncached=function(u,_){var w,x=s.__iterator(Z,_),j=0;return new Iterator((function(){return(!w||j%2)&&(w=x.next()).done?w:j%2?iteratorValue(u,j++,i):iteratorValue(u,j++,w.value,w)}))},u}function sortFactory(s,i,u){i||(i=defaultComparator);var _=isKeyed(s),w=0,x=s.toSeq().map((function(i,_){return[_,i,w++,u?u(i,_,s):i]})).toArray();return x.sort((function(s,u){return i(s[3],u[3])||s[2]-u[2]})).forEach(_?function(s,i){x[i].length=2}:function(s,i){x[i]=s[1]}),_?KeyedSeq(x):isIndexed(s)?IndexedSeq(x):SetSeq(x)}function maxFactory(s,i,u){if(i||(i=defaultComparator),u){var _=s.toSeq().map((function(i,_){return[i,u(i,_,s)]})).reduce((function(s,u){return maxCompare(i,s[1],u[1])?u:s}));return _&&_[0]}return s.reduce((function(s,u){return maxCompare(i,s,u)?u:s}))}function maxCompare(s,i,u){var _=s(u,i);return 0===_&&u!==i&&(null==u||u!=u)||_>0}function zipWithFactory(s,i,u){var _=makeSequence(s);return _.size=new ArraySeq(u).map((function(s){return s.size})).min(),_.__iterate=function(s,i){for(var u,_=this.__iterator(Z,i),w=0;!(u=_.next()).done&&!1!==s(u.value,w++,this););return w},_.__iteratorUncached=function(s,_){var w=u.map((function(s){return s=Iterable(s),getIterator(_?s.reverse():s)})),x=0,j=!1;return new Iterator((function(){var u;return j||(u=w.map((function(s){return s.next()})),j=u.some((function(s){return s.done}))),j?iteratorDone():iteratorValue(s,x++,i.apply(null,u.map((function(s){return s.value}))))}))},_}function reify(s,i){return isSeq(s)?i:s.constructor(i)}function validateEntry(s){if(s!==Object(s))throw new TypeError(\"Expected [K, V] tuple: \"+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,i){return s>i?1:s<i?-1:0}function forceIterator(s){var i=getIterator(s);if(!i){if(!isArrayLike(s))throw new TypeError(\"Expected iterable or array-like: \"+s);i=getIterator(Iterable(s))}return i}function Record(s,i){var u,_=function Record(x){if(x instanceof _)return x;if(!(this instanceof _))return new _(x);if(!u){u=!0;var j=Object.keys(s);setProps(w,j),w.size=j.length,w._name=i,w._keys=j,w._defaultValues=s}this._map=Map(x)},w=_.prototype=Object.create(st);return w.constructor=_,_}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(s,i){var u=this._map.get(s);return void 0!==u?this._list.get(u)[1]:i},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(s,i){return updateOrderedMap(this,s,i)},OrderedMap.prototype.remove=function(s){return updateOrderedMap(this,s,$)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(s,i){var u=this;return this._list.__iterate((function(i){return i&&s(i[1],i[0],u)}),i)},OrderedMap.prototype.__iterator=function(s,i){return this._list.fromEntrySeq().__iterator(s,i)},OrderedMap.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map.__ensureOwner(s),u=this._list.__ensureOwner(s);return s?makeOrderedMap(i,u,s,this.__hash):(this.__ownerID=s,this._map=i,this._list=u,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[w]=!0,OrderedMap.prototype[x]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(s,i){return this._iter.get(s,i)},ToKeyedSequence.prototype.has=function(s){return this._iter.has(s)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var s=this,i=reverseFactory(this,!0);return this._useKeys||(i.valueSeq=function(){return s._iter.toSeq().reverse()}),i},ToKeyedSequence.prototype.map=function(s,i){var u=this,_=mapFactory(this,s,i);return this._useKeys||(_.valueSeq=function(){return u._iter.toSeq().map(s,i)}),_},ToKeyedSequence.prototype.__iterate=function(s,i){var u,_=this;return this._iter.__iterate(this._useKeys?function(i,u){return s(i,u,_)}:(u=i?resolveSize(this):0,function(w){return s(w,i?--u:u++,_)}),i)},ToKeyedSequence.prototype.__iterator=function(s,i){if(this._useKeys)return this._iter.__iterator(s,i);var u=this._iter.__iterator(Z,i),_=i?resolveSize(this):0;return new Iterator((function(){var w=u.next();return w.done?w:iteratorValue(s,i?--_:_++,w.value,w)}))},ToKeyedSequence.prototype[w]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(s){return this._iter.includes(s)},ToIndexedSequence.prototype.__iterate=function(s,i){var u=this,_=0;return this._iter.__iterate((function(i){return s(i,_++,u)}),i)},ToIndexedSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i),_=0;return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,_++,i.value,i)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(s){return this._iter.includes(s)},ToSetSequence.prototype.__iterate=function(s,i){var u=this;return this._iter.__iterate((function(i){return s(i,i,u)}),i)},ToSetSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i);return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,i.value,i.value,i)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(s,i){var u=this;return this._iter.__iterate((function(i){if(i){validateEntry(i);var _=isIterable(i);return s(_?i.get(1):i[1],_?i.get(0):i[0],u)}}),i)},FromEntriesSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i);return new Iterator((function(){for(;;){var i=u.next();if(i.done)return i;var _=i.value;if(_){validateEntry(_);var w=isIterable(_);return iteratorValue(s,w?_.get(0):_[0],w?_.get(1):_[1],i)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(s){return this._defaultValues.hasOwnProperty(s)},Record.prototype.get=function(s,i){if(!this.has(s))return i;var u=this._defaultValues[s];return this._map?this._map.get(s,u):u},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var s=this.constructor;return s._empty||(s._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(s,i){if(!this.has(s))throw new Error('Cannot set unknown key \"'+s+'\" on '+recordName(this));if(this._map&&!this._map.has(s)&&i===this._defaultValues[s])return this;var u=this._map&&this._map.set(s,i);return this.__ownerID||u===this._map?this:makeRecord(this,u)},Record.prototype.remove=function(s){if(!this.has(s))return this;var i=this._map&&this._map.remove(s);return this.__ownerID||i===this._map?this:makeRecord(this,i)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(s,i){var u=this;return KeyedIterable(this._defaultValues).map((function(s,i){return u.get(i)})).__iterator(s,i)},Record.prototype.__iterate=function(s,i){var u=this;return KeyedIterable(this._defaultValues).map((function(s,i){return u.get(i)})).__iterate(s,i)},Record.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map&&this._map.__ensureOwner(s);return s?makeRecord(this,i,s):(this.__ownerID=s,this._map=i,this)};var st=Record.prototype;function makeRecord(s,i,u){var _=Object.create(Object.getPrototypeOf(s));return _._map=i,_.__ownerID=u,_}function recordName(s){return s._name||s.constructor.name||\"Record\"}function setProps(s,i){try{i.forEach(setProp.bind(void 0,s))}catch(s){}}function setProp(s,i){Object.defineProperty(s,i,{get:function(){return this.get(i)},set:function(s){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(i,s)}})}function Set(s){return null==s?emptySet():isSet(s)&&!isOrdered(s)?s:emptySet().withMutations((function(i){var u=SetIterable(s);assertNotInfinite(u.size),u.forEach((function(s){return i.add(s)}))}))}function isSet(s){return!(!s||!s[at])}st[x]=st.remove,st.deleteIn=st.removeIn=He.removeIn,st.merge=He.merge,st.mergeWith=He.mergeWith,st.mergeIn=He.mergeIn,st.mergeDeep=He.mergeDeep,st.mergeDeepWith=He.mergeDeepWith,st.mergeDeepIn=He.mergeDeepIn,st.setIn=He.setIn,st.update=He.update,st.updateIn=He.updateIn,st.withMutations=He.withMutations,st.asMutable=He.asMutable,st.asImmutable=He.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(s){return this._map.has(s)},Set.prototype.add=function(s){return updateSet(this,this._map.set(s,!0))},Set.prototype.remove=function(s){return updateSet(this,this._map.remove(s))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var i=s.call(arguments,0);return 0===(i=i.filter((function(s){return 0!==s.size}))).length?this:0!==this.size||this.__ownerID||1!==i.length?this.withMutations((function(s){for(var u=0;u<i.length;u++)SetIterable(i[u]).forEach((function(i){return s.add(i)}))})):this.constructor(i[0])},Set.prototype.intersect=function(){var i=s.call(arguments,0);if(0===i.length)return this;i=i.map((function(s){return SetIterable(s)}));var u=this;return this.withMutations((function(s){u.forEach((function(u){i.every((function(s){return s.includes(u)}))||s.remove(u)}))}))},Set.prototype.subtract=function(){var i=s.call(arguments,0);if(0===i.length)return this;i=i.map((function(s){return SetIterable(s)}));var u=this;return this.withMutations((function(s){u.forEach((function(u){i.some((function(s){return s.includes(u)}))&&s.remove(u)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(i){var u=s.call(arguments,1);return this.union.apply(this,u)},Set.prototype.sort=function(s){return OrderedSet(sortFactory(this,s))},Set.prototype.sortBy=function(s,i){return OrderedSet(sortFactory(this,i,s))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(s,i){var u=this;return this._map.__iterate((function(i,_){return s(_,_,u)}),i)},Set.prototype.__iterator=function(s,i){return this._map.map((function(s,i){return i})).__iterator(s,i)},Set.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map.__ensureOwner(s);return s?this.__make(i,s):(this.__ownerID=s,this._map=i,this)},Set.isSet=isSet;var it,at=\"@@__IMMUTABLE_SET__@@\",lt=Set.prototype;function updateSet(s,i){return s.__ownerID?(s.size=i.size,s._map=i,s):i===s._map?s:0===i.size?s.__empty():s.__make(i)}function makeSet(s,i){var u=Object.create(lt);return u.size=s?s.size:0,u._map=s,u.__ownerID=i,u}function emptySet(){return it||(it=makeSet(emptyMap()))}function OrderedSet(s){return null==s?emptyOrderedSet():isOrderedSet(s)?s:emptyOrderedSet().withMutations((function(i){var u=SetIterable(s);assertNotInfinite(u.size),u.forEach((function(s){return i.add(s)}))}))}function isOrderedSet(s){return isSet(s)&&isOrdered(s)}lt[at]=!0,lt[x]=lt.remove,lt.mergeDeep=lt.merge,lt.mergeDeepWith=lt.mergeWith,lt.withMutations=He.withMutations,lt.asMutable=He.asMutable,lt.asImmutable=He.asImmutable,lt.__empty=emptySet,lt.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var ct,ut=OrderedSet.prototype;function makeOrderedSet(s,i){var u=Object.create(ut);return u.size=s?s.size:0,u._map=s,u.__ownerID=i,u}function emptyOrderedSet(){return ct||(ct=makeOrderedSet(emptyOrderedMap()))}function Stack(s){return null==s?emptyStack():isStack(s)?s:emptyStack().unshiftAll(s)}function isStack(s){return!(!s||!s[ht])}ut[w]=!0,ut.__empty=emptyOrderedSet,ut.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(s,i){var u=this._head;for(s=wrapIndex(this,s);u&&s--;)u=u.next;return u?u.value:i},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var s=this.size+arguments.length,i=this._head,u=arguments.length-1;u>=0;u--)i={value:arguments[u],next:i};return this.__ownerID?(this.size=s,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(s,i)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var i=this.size,u=this._head;return s.reverse().forEach((function(s){i++,u={value:s,next:u}})),this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(i,u)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,i){if(wholeSlice(s,i,this.size))return this;var u=resolveBegin(s,this.size);if(resolveEnd(i,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,i);for(var _=this.size-u,w=this._head;u--;)w=w.next;return this.__ownerID?(this.size=_,this._head=w,this.__hash=void 0,this.__altered=!0,this):makeStack(_,w)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,i){if(i)return this.reverse().__iterate(s);for(var u=0,_=this._head;_&&!1!==s(_.value,u++,this);)_=_.next;return u},Stack.prototype.__iterator=function(s,i){if(i)return this.reverse().__iterator(s);var u=0,_=this._head;return new Iterator((function(){if(_){var i=_.value;return _=_.next,iteratorValue(s,u++,i)}return iteratorDone()}))},Stack.isStack=isStack;var pt,ht=\"@@__IMMUTABLE_STACK__@@\",dt=Stack.prototype;function makeStack(s,i,u,_){var w=Object.create(dt);return w.size=s,w._head=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyStack(){return pt||(pt=makeStack(0))}function mixin(s,i){var keyCopier=function(u){s.prototype[u]=i[u]};return Object.keys(i).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(keyCopier),s}dt[ht]=!0,dt.withMutations=He.withMutations,dt.asMutable=He.asMutable,dt.asImmutable=He.asImmutable,dt.wasAltered=He.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(i,u){s[u]=i})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(i,u){s[u]=i})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(s,i){return 0===this.size?s+i:s+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+i},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(i){return is(i,s)}))},entries:function(){return this.__iterator(ee)},every:function(s,i){assertNotInfinite(this.size);var u=!0;return this.__iterate((function(_,w,x){if(!s.call(i,_,w,x))return u=!1,!1})),u},filter:function(s,i){return reify(this,filterFactory(this,s,i,!0))},find:function(s,i,u){var _=this.findEntry(s,i);return _?_[1]:u},forEach:function(s,i){return assertNotInfinite(this.size),this.__iterate(i?s.bind(i):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?\"\"+s:\",\";var i=\"\",u=!0;return this.__iterate((function(_){u?u=!1:i+=s,i+=null!=_?_.toString():\"\"})),i},keys:function(){return this.__iterator(X)},map:function(s,i){return reify(this,mapFactory(this,s,i))},reduce:function(s,i,u){var _,w;return assertNotInfinite(this.size),arguments.length<2?w=!0:_=i,this.__iterate((function(i,x,j){w?(w=!1,_=i):_=s.call(u,_,i,x,j)})),_},reduceRight:function(s,i,u){var _=this.toKeyedSeq().reverse();return _.reduce.apply(_,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!0))},some:function(s,i){return!this.every(not(s),i)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(Z)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,i){return ensureSize(s?this.toSeq().filter(s,i):this)},countBy:function(s,i){return countByFactory(this,s,i)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var i=s.toSeq().map(entryMapper).toIndexedSeq();return i.fromEntrySeq=function(){return s.toSeq()},i},filterNot:function(s,i){return this.filter(not(s),i)},findEntry:function(s,i,u){var _=u;return this.__iterate((function(u,w,x){if(s.call(i,u,w,x))return _=[w,u],!1})),_},findKey:function(s,i){var u=this.findEntry(s,i);return u&&u[0]},findLast:function(s,i,u){return this.toKeyedSeq().reverse().find(s,i,u)},findLastEntry:function(s,i,u){return this.toKeyedSeq().reverse().findEntry(s,i,u)},findLastKey:function(s,i){return this.toKeyedSeq().reverse().findKey(s,i)},first:function(){return this.find(returnTrue)},flatMap:function(s,i){return reify(this,flatMapFactory(this,s,i))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,i){return this.find((function(i,u){return is(u,s)}),void 0,i)},getIn:function(s,i){for(var u,_=this,w=forceIterator(s);!(u=w.next()).done;){var x=u.value;if((_=_&&_.get?_.get(x,$):$)===$)return i}return _},groupBy:function(s,i){return groupByFactory(this,s,i)},has:function(s){return this.get(s,$)!==$},hasIn:function(s){return this.getIn(s,$)!==$},isSubset:function(s){return s=\"function\"==typeof s.includes?s:Iterable(s),this.every((function(i){return s.includes(i)}))},isSuperset:function(s){return(s=\"function\"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(i){return is(i,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,i){return maxFactory(this,i,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,i){return maxFactory(this,i?neg(i):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,i){return reify(this,skipWhileFactory(this,s,i,!0))},skipUntil:function(s,i){return this.skipWhile(not(s),i)},sortBy:function(s,i){return reify(this,sortFactory(this,i,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,i){return reify(this,takeWhileFactory(this,s,i))},takeUntil:function(s,i){return this.takeWhile(not(s),i)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var mt=Iterable.prototype;mt[i]=!0,mt[le]=mt.values,mt.__toJS=mt.toArray,mt.__toStringMapper=quoteString,mt.inspect=mt.toSource=function(){return this.toString()},mt.chain=mt.flatMap,mt.contains=mt.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,i){var u=this,_=0;return reify(this,this.toSeq().map((function(w,x){return s.call(i,[x,w],_++,u)})).fromEntrySeq())},mapKeys:function(s,i){var u=this;return reify(this,this.toSeq().flip().map((function(_,w){return s.call(i,_,w,u)})).flip())}});var gt=KeyedIterable.prototype;function keyMapper(s,i){return i}function entryMapper(s,i){return[i,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return\"string\"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,i){return s<i?1:s>i?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var i=isOrdered(s),u=isKeyed(s),_=i?1:0;return murmurHashOfSize(s.__iterate(u?i?function(s,i){_=31*_+hashMerge(hash(s),hash(i))|0}:function(s,i){_=_+hashMerge(hash(s),hash(i))|0}:i?function(s){_=31*_+hash(s)|0}:function(s){_=_+hash(s)|0}),_)}function murmurHashOfSize(s,i){return i=ye(i,3432918353),i=ye(i<<15|i>>>-15,461845907),i=ye(i<<13|i>>>-13,5),i=ye((i=(i+3864292196|0)^s)^i>>>16,2246822507),i=smi((i=ye(i^i>>>13,3266489909))^i>>>16)}function hashMerge(s,i){return s^i+2654435769+(s<<6)+(s>>2)|0}return gt[u]=!0,gt[le]=mt.entries,gt.__toJS=mt.toObject,gt.__toStringMapper=function(s,i){return JSON.stringify(i)+\": \"+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,i){return reify(this,filterFactory(this,s,i,!1))},findIndex:function(s,i){var u=this.findEntry(s,i);return u?u[0]:-1},indexOf:function(s){var i=this.keyOf(s);return void 0===i?-1:i},lastIndexOf:function(s){var i=this.lastKeyOf(s);return void 0===i?-1:i},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!1))},splice:function(s,i){var u=arguments.length;if(i=Math.max(0|i,0),0===u||2===u&&!i)return this;s=resolveBegin(s,s<0?this.count():this.size);var _=this.slice(0,s);return reify(this,1===u?_:_.concat(arrCopy(arguments,2),this.slice(s+i)))},findLastIndex:function(s,i){var u=this.findLastEntry(s,i);return u?u[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,i){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?i:this.find((function(i,u){return u===s}),void 0,i)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s<this.size:-1!==this.indexOf(s))},interpose:function(s){return reify(this,interposeFactory(this,s))},interleave:function(){var s=[this].concat(arrCopy(arguments)),i=zipWithFactory(this.toSeq(),IndexedSeq.of,s),u=i.flatten(!0);return i.size&&(u.size=i.size*s.length),reify(this,u)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(s,i){return reify(this,skipWhileFactory(this,s,i,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(s){var i=arrCopy(arguments);return i[0]=this,reify(this,zipWithFactory(this,s,i))}}),IndexedIterable.prototype[_]=!0,IndexedIterable.prototype[w]=!0,mixin(SetIterable,{get:function(s,i){return this.has(s)?s:i},includes:function(s){return this.has(s)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=mt.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},56698:s=>{\"function\"==typeof Object.create?s.exports=function inherits(s,i){i&&(s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function inherits(s,i){if(i){s.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype,s.prototype=new TempCtor,s.prototype.constructor=s}}},5419:s=>{s.exports=function(s,i,u,_){var w=new Blob(void 0!==_?[_,s]:[s],{type:u||\"application/octet-stream\"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(w,i);else{var x=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(w):window.webkitURL.createObjectURL(w),j=document.createElement(\"a\");j.style.display=\"none\",j.href=x,j.setAttribute(\"download\",i),void 0===j.download&&j.setAttribute(\"target\",\"_blank\"),document.body.appendChild(j),j.click(),setTimeout((function(){document.body.removeChild(j),window.URL.revokeObjectURL(x)}),200)}}},20181:(s,i,u)=>{var _=NaN,w=\"[object Symbol]\",x=/^\\s+|\\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt,U=\"object\"==typeof u.g&&u.g&&u.g.Object===Object&&u.g,Y=\"object\"==typeof self&&self&&self.Object===Object&&self,X=U||Y||Function(\"return this\")(),Z=Object.prototype.toString,ee=Math.max,ie=Math.min,now=function(){return X.Date.now()};function isObject(s){var i=typeof s;return!!s&&(\"object\"==i||\"function\"==i)}function toNumber(s){if(\"number\"==typeof s)return s;if(function isSymbol(s){return\"symbol\"==typeof s||function isObjectLike(s){return!!s&&\"object\"==typeof s}(s)&&Z.call(s)==w}(s))return _;if(isObject(s)){var i=\"function\"==typeof s.valueOf?s.valueOf():s;s=isObject(i)?i+\"\":i}if(\"string\"!=typeof s)return 0===s?s:+s;s=s.replace(x,\"\");var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?_:+s}s.exports=function debounce(s,i,u){var _,w,x,j,P,B,$=0,U=!1,Y=!1,X=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(i){var u=_,x=w;return _=w=void 0,$=i,j=s.apply(x,u)}function shouldInvoke(s){var u=s-B;return void 0===B||u>=i||u<0||Y&&s-$>=x}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);P=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-B);return Y?ie(u,x-(s-$)):u}(s))}function trailingEdge(s){return P=void 0,X&&_?invokeFunc(s):(_=w=void 0,j)}function debounced(){var s=now(),u=shouldInvoke(s);if(_=arguments,w=this,B=s,u){if(void 0===P)return function leadingEdge(s){return $=s,P=setTimeout(timerExpired,i),U?invokeFunc(s):j}(B);if(Y)return P=setTimeout(timerExpired,i),invokeFunc(B)}return void 0===P&&(P=setTimeout(timerExpired,i)),j}return i=toNumber(i)||0,isObject(u)&&(U=!!u.leading,x=(Y=\"maxWait\"in u)?ee(toNumber(u.maxWait)||0,i):x,X=\"trailing\"in u?!!u.trailing:X),debounced.cancel=function cancel(){void 0!==P&&clearTimeout(P),$=0,_=B=w=P=void 0},debounced.flush=function flush(){return void 0===P?j:trailingEdge(now())},debounced}},55580:(s,i,u)=>{var _=u(56110)(u(9325),\"DataView\");s.exports=_},21549:(s,i,u)=>{var _=u(22032),w=u(63862),x=u(66721),j=u(12749),P=u(35749);function Hash(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}Hash.prototype.clear=_,Hash.prototype.delete=w,Hash.prototype.get=x,Hash.prototype.has=j,Hash.prototype.set=P,s.exports=Hash},30980:(s,i,u)=>{var _=u(39344),w=u(94033);function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=_(w.prototype),LazyWrapper.prototype.constructor=LazyWrapper,s.exports=LazyWrapper},80079:(s,i,u)=>{var _=u(63702),w=u(70080),x=u(24739),j=u(48655),P=u(31175);function ListCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}ListCache.prototype.clear=_,ListCache.prototype.delete=w,ListCache.prototype.get=x,ListCache.prototype.has=j,ListCache.prototype.set=P,s.exports=ListCache},56017:(s,i,u)=>{var _=u(39344),w=u(94033);function LodashWrapper(s,i){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=_(w.prototype),LodashWrapper.prototype.constructor=LodashWrapper,s.exports=LodashWrapper},68223:(s,i,u)=>{var _=u(56110)(u(9325),\"Map\");s.exports=_},53661:(s,i,u)=>{var _=u(63040),w=u(17670),x=u(90289),j=u(4509),P=u(72949);function MapCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}MapCache.prototype.clear=_,MapCache.prototype.delete=w,MapCache.prototype.get=x,MapCache.prototype.has=j,MapCache.prototype.set=P,s.exports=MapCache},32804:(s,i,u)=>{var _=u(56110)(u(9325),\"Promise\");s.exports=_},76545:(s,i,u)=>{var _=u(56110)(u(9325),\"Set\");s.exports=_},38859:(s,i,u)=>{var _=u(53661),w=u(31380),x=u(51459);function SetCache(s){var i=-1,u=null==s?0:s.length;for(this.__data__=new _;++i<u;)this.add(s[i])}SetCache.prototype.add=SetCache.prototype.push=w,SetCache.prototype.has=x,s.exports=SetCache},37217:(s,i,u)=>{var _=u(80079),w=u(51420),x=u(90938),j=u(63605),P=u(29817),B=u(80945);function Stack(s){var i=this.__data__=new _(s);this.size=i.size}Stack.prototype.clear=w,Stack.prototype.delete=x,Stack.prototype.get=j,Stack.prototype.has=P,Stack.prototype.set=B,s.exports=Stack},51873:(s,i,u)=>{var _=u(9325).Symbol;s.exports=_},37828:(s,i,u)=>{var _=u(9325).Uint8Array;s.exports=_},28303:(s,i,u)=>{var _=u(56110)(u(9325),\"WeakMap\");s.exports=_},91033:s=>{s.exports=function apply(s,i,u){switch(u.length){case 0:return s.call(i);case 1:return s.call(i,u[0]);case 2:return s.call(i,u[0],u[1]);case 3:return s.call(i,u[0],u[1],u[2])}return s.apply(i,u)}},83729:s=>{s.exports=function arrayEach(s,i){for(var u=-1,_=null==s?0:s.length;++u<_&&!1!==i(s[u],u,s););return s}},79770:s=>{s.exports=function arrayFilter(s,i){for(var u=-1,_=null==s?0:s.length,w=0,x=[];++u<_;){var j=s[u];i(j,u,s)&&(x[w++]=j)}return x}},15325:(s,i,u)=>{var _=u(96131);s.exports=function arrayIncludes(s,i){return!!(null==s?0:s.length)&&_(s,i,0)>-1}},70695:(s,i,u)=>{var _=u(78096),w=u(72428),x=u(56449),j=u(3656),P=u(30361),B=u(37167),$=Object.prototype.hasOwnProperty;s.exports=function arrayLikeKeys(s,i){var u=x(s),U=!u&&w(s),Y=!u&&!U&&j(s),X=!u&&!U&&!Y&&B(s),Z=u||U||Y||X,ee=Z?_(s.length,String):[],ie=ee.length;for(var ae in s)!i&&!$.call(s,ae)||Z&&(\"length\"==ae||Y&&(\"offset\"==ae||\"parent\"==ae)||X&&(\"buffer\"==ae||\"byteLength\"==ae||\"byteOffset\"==ae)||P(ae,ie))||ee.push(ae);return ee}},34932:s=>{s.exports=function arrayMap(s,i){for(var u=-1,_=null==s?0:s.length,w=Array(_);++u<_;)w[u]=i(s[u],u,s);return w}},14528:s=>{s.exports=function arrayPush(s,i){for(var u=-1,_=i.length,w=s.length;++u<_;)s[w+u]=i[u];return s}},40882:s=>{s.exports=function arrayReduce(s,i,u,_){var w=-1,x=null==s?0:s.length;for(_&&x&&(u=s[++w]);++w<x;)u=i(u,s[w],w,s);return u}},14248:s=>{s.exports=function arraySome(s,i){for(var u=-1,_=null==s?0:s.length;++u<_;)if(i(s[u],u,s))return!0;return!1}},61074:s=>{s.exports=function asciiToArray(s){return s.split(\"\")}},1733:s=>{var i=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;s.exports=function asciiWords(s){return s.match(i)||[]}},87805:(s,i,u)=>{var _=u(43360),w=u(75288);s.exports=function assignMergeValue(s,i,u){(void 0!==u&&!w(s[i],u)||void 0===u&&!(i in s))&&_(s,i,u)}},16547:(s,i,u)=>{var _=u(43360),w=u(75288),x=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,i,u){var j=s[i];x.call(s,i)&&w(j,u)&&(void 0!==u||i in s)||_(s,i,u)}},26025:(s,i,u)=>{var _=u(75288);s.exports=function assocIndexOf(s,i){for(var u=s.length;u--;)if(_(s[u][0],i))return u;return-1}},74733:(s,i,u)=>{var _=u(21791),w=u(95950);s.exports=function baseAssign(s,i){return s&&_(i,w(i),s)}},43838:(s,i,u)=>{var _=u(21791),w=u(37241);s.exports=function baseAssignIn(s,i){return s&&_(i,w(i),s)}},43360:(s,i,u)=>{var _=u(93243);s.exports=function baseAssignValue(s,i,u){\"__proto__\"==i&&_?_(s,i,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[i]=u}},9999:(s,i,u)=>{var _=u(37217),w=u(83729),x=u(16547),j=u(74733),P=u(43838),B=u(93290),$=u(23007),U=u(92271),Y=u(48948),X=u(50002),Z=u(83349),ee=u(5861),ie=u(76189),ae=u(77199),le=u(35529),ce=u(56449),pe=u(3656),de=u(87730),fe=u(23805),ye=u(38440),be=u(95950),_e=u(37241),we=\"[object Arguments]\",Se=\"[object Function]\",xe=\"[object Object]\",Pe={};Pe[we]=Pe[\"[object Array]\"]=Pe[\"[object ArrayBuffer]\"]=Pe[\"[object DataView]\"]=Pe[\"[object Boolean]\"]=Pe[\"[object Date]\"]=Pe[\"[object Float32Array]\"]=Pe[\"[object Float64Array]\"]=Pe[\"[object Int8Array]\"]=Pe[\"[object Int16Array]\"]=Pe[\"[object Int32Array]\"]=Pe[\"[object Map]\"]=Pe[\"[object Number]\"]=Pe[xe]=Pe[\"[object RegExp]\"]=Pe[\"[object Set]\"]=Pe[\"[object String]\"]=Pe[\"[object Symbol]\"]=Pe[\"[object Uint8Array]\"]=Pe[\"[object Uint8ClampedArray]\"]=Pe[\"[object Uint16Array]\"]=Pe[\"[object Uint32Array]\"]=!0,Pe[\"[object Error]\"]=Pe[Se]=Pe[\"[object WeakMap]\"]=!1,s.exports=function baseClone(s,i,u,Te,Re,qe){var $e,ze=1&i,We=2&i,He=4&i;if(u&&($e=Re?u(s,Te,Re,qe):u(s)),void 0!==$e)return $e;if(!fe(s))return s;var Ye=ce(s);if(Ye){if($e=ie(s),!ze)return $(s,$e)}else{var Xe=ee(s),Qe=Xe==Se||\"[object GeneratorFunction]\"==Xe;if(pe(s))return B(s,ze);if(Xe==xe||Xe==we||Qe&&!Re){if($e=We||Qe?{}:le(s),!ze)return We?Y(s,P($e,s)):U(s,j($e,s))}else{if(!Pe[Xe])return Re?s:{};$e=ae(s,Xe,ze)}}qe||(qe=new _);var et=qe.get(s);if(et)return et;qe.set(s,$e),ye(s)?s.forEach((function(_){$e.add(baseClone(_,i,u,_,s,qe))})):de(s)&&s.forEach((function(_,w){$e.set(w,baseClone(_,i,u,w,s,qe))}));var tt=Ye?void 0:(He?We?Z:X:We?_e:be)(s);return w(tt||s,(function(_,w){tt&&(_=s[w=_]),x($e,w,baseClone(_,i,u,w,s,qe))})),$e}},39344:(s,i,u)=>{var _=u(23805),w=Object.create,x=function(){function object(){}return function(s){if(!_(s))return{};if(w)return w(s);object.prototype=s;var i=new object;return object.prototype=void 0,i}}();s.exports=x},80909:(s,i,u)=>{var _=u(30641),w=u(38329)(_);s.exports=w},2523:s=>{s.exports=function baseFindIndex(s,i,u,_){for(var w=s.length,x=u+(_?1:-1);_?x--:++x<w;)if(i(s[x],x,s))return x;return-1}},83120:(s,i,u)=>{var _=u(14528),w=u(45891);s.exports=function baseFlatten(s,i,u,x,j){var P=-1,B=s.length;for(u||(u=w),j||(j=[]);++P<B;){var $=s[P];i>0&&u($)?i>1?baseFlatten($,i-1,u,x,j):_(j,$):x||(j[j.length]=$)}return j}},86649:(s,i,u)=>{var _=u(83221)();s.exports=_},30641:(s,i,u)=>{var _=u(86649),w=u(95950);s.exports=function baseForOwn(s,i){return s&&_(s,i,w)}},47422:(s,i,u)=>{var _=u(31769),w=u(77797);s.exports=function baseGet(s,i){for(var u=0,x=(i=_(i,s)).length;null!=s&&u<x;)s=s[w(i[u++])];return u&&u==x?s:void 0}},82199:(s,i,u)=>{var _=u(14528),w=u(56449);s.exports=function baseGetAllKeys(s,i,u){var x=i(s);return w(s)?x:_(x,u(s))}},72552:(s,i,u)=>{var _=u(51873),w=u(659),x=u(59350),j=_?_.toStringTag:void 0;s.exports=function baseGetTag(s){return null==s?void 0===s?\"[object Undefined]\":\"[object Null]\":j&&j in Object(s)?w(s):x(s)}},28077:s=>{s.exports=function baseHasIn(s,i){return null!=s&&i in Object(s)}},96131:(s,i,u)=>{var _=u(2523),w=u(85463),x=u(76959);s.exports=function baseIndexOf(s,i,u){return i==i?x(s,i,u):_(s,w,u)}},27534:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function baseIsArguments(s){return w(s)&&\"[object Arguments]\"==_(s)}},60270:(s,i,u)=>{var _=u(87068),w=u(40346);s.exports=function baseIsEqual(s,i,u,x,j){return s===i||(null==s||null==i||!w(s)&&!w(i)?s!=s&&i!=i:_(s,i,u,x,baseIsEqual,j))}},87068:(s,i,u)=>{var _=u(37217),w=u(25911),x=u(21986),j=u(50689),P=u(5861),B=u(56449),$=u(3656),U=u(37167),Y=\"[object Arguments]\",X=\"[object Array]\",Z=\"[object Object]\",ee=Object.prototype.hasOwnProperty;s.exports=function baseIsEqualDeep(s,i,u,ie,ae,le){var ce=B(s),pe=B(i),de=ce?X:P(s),fe=pe?X:P(i),ye=(de=de==Y?Z:de)==Z,be=(fe=fe==Y?Z:fe)==Z,_e=de==fe;if(_e&&$(s)){if(!$(i))return!1;ce=!0,ye=!1}if(_e&&!ye)return le||(le=new _),ce||U(s)?w(s,i,u,ie,ae,le):x(s,i,de,u,ie,ae,le);if(!(1&u)){var we=ye&&ee.call(s,\"__wrapped__\"),Se=be&&ee.call(i,\"__wrapped__\");if(we||Se){var xe=we?s.value():s,Pe=Se?i.value():i;return le||(le=new _),ae(xe,Pe,u,ie,le)}}return!!_e&&(le||(le=new _),j(s,i,u,ie,ae,le))}},29172:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function baseIsMap(s){return w(s)&&\"[object Map]\"==_(s)}},41799:(s,i,u)=>{var _=u(37217),w=u(60270);s.exports=function baseIsMatch(s,i,u,x){var j=u.length,P=j,B=!x;if(null==s)return!P;for(s=Object(s);j--;){var $=u[j];if(B&&$[2]?$[1]!==s[$[0]]:!($[0]in s))return!1}for(;++j<P;){var U=($=u[j])[0],Y=s[U],X=$[1];if(B&&$[2]){if(void 0===Y&&!(U in s))return!1}else{var Z=new _;if(x)var ee=x(Y,X,U,s,i,Z);if(!(void 0===ee?w(X,Y,3,x,Z):ee))return!1}}return!0}},85463:s=>{s.exports=function baseIsNaN(s){return s!=s}},45083:(s,i,u)=>{var _=u(1882),w=u(87296),x=u(23805),j=u(47473),P=/^\\[object .+?Constructor\\]$/,B=Function.prototype,$=Object.prototype,U=B.toString,Y=$.hasOwnProperty,X=RegExp(\"^\"+U.call(Y).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");s.exports=function baseIsNative(s){return!(!x(s)||w(s))&&(_(s)?X:P).test(j(s))}},16038:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function baseIsSet(s){return w(s)&&\"[object Set]\"==_(s)}},4901:(s,i,u)=>{var _=u(72552),w=u(30294),x=u(40346),j={};j[\"[object Float32Array]\"]=j[\"[object Float64Array]\"]=j[\"[object Int8Array]\"]=j[\"[object Int16Array]\"]=j[\"[object Int32Array]\"]=j[\"[object Uint8Array]\"]=j[\"[object Uint8ClampedArray]\"]=j[\"[object Uint16Array]\"]=j[\"[object Uint32Array]\"]=!0,j[\"[object Arguments]\"]=j[\"[object Array]\"]=j[\"[object ArrayBuffer]\"]=j[\"[object Boolean]\"]=j[\"[object DataView]\"]=j[\"[object Date]\"]=j[\"[object Error]\"]=j[\"[object Function]\"]=j[\"[object Map]\"]=j[\"[object Number]\"]=j[\"[object Object]\"]=j[\"[object RegExp]\"]=j[\"[object Set]\"]=j[\"[object String]\"]=j[\"[object WeakMap]\"]=!1,s.exports=function baseIsTypedArray(s){return x(s)&&w(s.length)&&!!j[_(s)]}},15389:(s,i,u)=>{var _=u(93663),w=u(87978),x=u(83488),j=u(56449),P=u(50583);s.exports=function baseIteratee(s){return\"function\"==typeof s?s:null==s?x:\"object\"==typeof s?j(s)?w(s[0],s[1]):_(s):P(s)}},88984:(s,i,u)=>{var _=u(55527),w=u(3650),x=Object.prototype.hasOwnProperty;s.exports=function baseKeys(s){if(!_(s))return w(s);var i=[];for(var u in Object(s))x.call(s,u)&&\"constructor\"!=u&&i.push(u);return i}},72903:(s,i,u)=>{var _=u(23805),w=u(55527),x=u(90181),j=Object.prototype.hasOwnProperty;s.exports=function baseKeysIn(s){if(!_(s))return x(s);var i=w(s),u=[];for(var P in s)(\"constructor\"!=P||!i&&j.call(s,P))&&u.push(P);return u}},94033:s=>{s.exports=function baseLodash(){}},93663:(s,i,u)=>{var _=u(41799),w=u(10776),x=u(67197);s.exports=function baseMatches(s){var i=w(s);return 1==i.length&&i[0][2]?x(i[0][0],i[0][1]):function(u){return u===s||_(u,s,i)}}},87978:(s,i,u)=>{var _=u(60270),w=u(58156),x=u(80631),j=u(28586),P=u(30756),B=u(67197),$=u(77797);s.exports=function baseMatchesProperty(s,i){return j(s)&&P(i)?B($(s),i):function(u){var j=w(u,s);return void 0===j&&j===i?x(u,s):_(i,j,3)}}},85250:(s,i,u)=>{var _=u(37217),w=u(87805),x=u(86649),j=u(42824),P=u(23805),B=u(37241),$=u(14974);s.exports=function baseMerge(s,i,u,U,Y){s!==i&&x(i,(function(x,B){if(Y||(Y=new _),P(x))j(s,i,B,u,baseMerge,U,Y);else{var X=U?U($(s,B),x,B+\"\",s,i,Y):void 0;void 0===X&&(X=x),w(s,B,X)}}),B)}},42824:(s,i,u)=>{var _=u(87805),w=u(93290),x=u(71961),j=u(23007),P=u(35529),B=u(72428),$=u(56449),U=u(83693),Y=u(3656),X=u(1882),Z=u(23805),ee=u(11331),ie=u(37167),ae=u(14974),le=u(69884);s.exports=function baseMergeDeep(s,i,u,ce,pe,de,fe){var ye=ae(s,u),be=ae(i,u),_e=fe.get(be);if(_e)_(s,u,_e);else{var we=de?de(ye,be,u+\"\",s,i,fe):void 0,Se=void 0===we;if(Se){var xe=$(be),Pe=!xe&&Y(be),Te=!xe&&!Pe&&ie(be);we=be,xe||Pe||Te?$(ye)?we=ye:U(ye)?we=j(ye):Pe?(Se=!1,we=w(be,!0)):Te?(Se=!1,we=x(be,!0)):we=[]:ee(be)||B(be)?(we=ye,B(ye)?we=le(ye):Z(ye)&&!X(ye)||(we=P(be))):Se=!1}Se&&(fe.set(be,we),pe(we,be,ce,de,fe),fe.delete(be)),_(s,u,we)}}},47237:s=>{s.exports=function baseProperty(s){return function(i){return null==i?void 0:i[s]}}},17255:(s,i,u)=>{var _=u(47422);s.exports=function basePropertyDeep(s){return function(i){return _(i,s)}}},54552:s=>{s.exports=function basePropertyOf(s){return function(i){return null==s?void 0:s[i]}}},85558:s=>{s.exports=function baseReduce(s,i,u,_,w){return w(s,(function(s,w,x){u=_?(_=!1,s):i(u,s,w,x)})),u}},69302:(s,i,u)=>{var _=u(83488),w=u(56757),x=u(32865);s.exports=function baseRest(s,i){return x(w(s,i,_),s+\"\")}},73170:(s,i,u)=>{var _=u(16547),w=u(31769),x=u(30361),j=u(23805),P=u(77797);s.exports=function baseSet(s,i,u,B){if(!j(s))return s;for(var $=-1,U=(i=w(i,s)).length,Y=U-1,X=s;null!=X&&++$<U;){var Z=P(i[$]),ee=u;if(\"__proto__\"===Z||\"constructor\"===Z||\"prototype\"===Z)return s;if($!=Y){var ie=X[Z];void 0===(ee=B?B(ie,Z,X):void 0)&&(ee=j(ie)?ie:x(i[$+1])?[]:{})}_(X,Z,ee),X=X[Z]}return s}},68882:(s,i,u)=>{var _=u(83488),w=u(48152),x=w?function(s,i){return w.set(s,i),s}:_;s.exports=x},19570:(s,i,u)=>{var _=u(37334),w=u(93243),x=u(83488),j=w?function(s,i){return w(s,\"toString\",{configurable:!0,enumerable:!1,value:_(i),writable:!0})}:x;s.exports=j},25160:s=>{s.exports=function baseSlice(s,i,u){var _=-1,w=s.length;i<0&&(i=-i>w?0:w+i),(u=u>w?w:u)<0&&(u+=w),w=i>u?0:u-i>>>0,i>>>=0;for(var x=Array(w);++_<w;)x[_]=s[_+i];return x}},90916:(s,i,u)=>{var _=u(80909);s.exports=function baseSome(s,i){var u;return _(s,(function(s,_,w){return!(u=i(s,_,w))})),!!u}},78096:s=>{s.exports=function baseTimes(s,i){for(var u=-1,_=Array(s);++u<s;)_[u]=i(u);return _}},77556:(s,i,u)=>{var _=u(51873),w=u(34932),x=u(56449),j=u(44394),P=_?_.prototype:void 0,B=P?P.toString:void 0;s.exports=function baseToString(s){if(\"string\"==typeof s)return s;if(x(s))return w(s,baseToString)+\"\";if(j(s))return B?B.call(s):\"\";var i=s+\"\";return\"0\"==i&&1/s==-Infinity?\"-0\":i}},54128:(s,i,u)=>{var _=u(31800),w=/^\\s+/;s.exports=function baseTrim(s){return s?s.slice(0,_(s)+1).replace(w,\"\"):s}},27301:s=>{s.exports=function baseUnary(s){return function(i){return s(i)}}},19931:(s,i,u)=>{var _=u(31769),w=u(68090),x=u(68969),j=u(77797);s.exports=function baseUnset(s,i){return i=_(i,s),null==(s=x(s,i))||delete s[j(w(i))]}},51234:s=>{s.exports=function baseZipObject(s,i,u){for(var _=-1,w=s.length,x=i.length,j={};++_<w;){var P=_<x?i[_]:void 0;u(j,s[_],P)}return j}},19219:s=>{s.exports=function cacheHas(s,i){return s.has(i)}},31769:(s,i,u)=>{var _=u(56449),w=u(28586),x=u(61802),j=u(13222);s.exports=function castPath(s,i){return _(s)?s:w(s,i)?[s]:x(j(s))}},28754:(s,i,u)=>{var _=u(25160);s.exports=function castSlice(s,i,u){var w=s.length;return u=void 0===u?w:u,!i&&u>=w?s:_(s,i,u)}},49653:(s,i,u)=>{var _=u(37828);s.exports=function cloneArrayBuffer(s){var i=new s.constructor(s.byteLength);return new _(i).set(new _(s)),i}},93290:(s,i,u)=>{s=u.nmd(s);var _=u(9325),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w?_.Buffer:void 0,P=j?j.allocUnsafe:void 0;s.exports=function cloneBuffer(s,i){if(i)return s.slice();var u=s.length,_=P?P(u):new s.constructor(u);return s.copy(_),_}},76169:(s,i,u)=>{var _=u(49653);s.exports=function cloneDataView(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}},73201:s=>{var i=/\\w*$/;s.exports=function cloneRegExp(s){var u=new s.constructor(s.source,i.exec(s));return u.lastIndex=s.lastIndex,u}},93736:(s,i,u)=>{var _=u(51873),w=_?_.prototype:void 0,x=w?w.valueOf:void 0;s.exports=function cloneSymbol(s){return x?Object(x.call(s)):{}}},71961:(s,i,u)=>{var _=u(49653);s.exports=function cloneTypedArray(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}},91596:s=>{var i=Math.max;s.exports=function composeArgs(s,u,_,w){for(var x=-1,j=s.length,P=_.length,B=-1,$=u.length,U=i(j-P,0),Y=Array($+U),X=!w;++B<$;)Y[B]=u[B];for(;++x<P;)(X||x<j)&&(Y[_[x]]=s[x]);for(;U--;)Y[B++]=s[x++];return Y}},53320:s=>{var i=Math.max;s.exports=function composeArgsRight(s,u,_,w){for(var x=-1,j=s.length,P=-1,B=_.length,$=-1,U=u.length,Y=i(j-B,0),X=Array(Y+U),Z=!w;++x<Y;)X[x]=s[x];for(var ee=x;++$<U;)X[ee+$]=u[$];for(;++P<B;)(Z||x<j)&&(X[ee+_[P]]=s[x++]);return X}},23007:s=>{s.exports=function copyArray(s,i){var u=-1,_=s.length;for(i||(i=Array(_));++u<_;)i[u]=s[u];return i}},21791:(s,i,u)=>{var _=u(16547),w=u(43360);s.exports=function copyObject(s,i,u,x){var j=!u;u||(u={});for(var P=-1,B=i.length;++P<B;){var $=i[P],U=x?x(u[$],s[$],$,u,s):void 0;void 0===U&&(U=s[$]),j?w(u,$,U):_(u,$,U)}return u}},92271:(s,i,u)=>{var _=u(21791),w=u(4664);s.exports=function copySymbols(s,i){return _(s,w(s),i)}},48948:(s,i,u)=>{var _=u(21791),w=u(86375);s.exports=function copySymbolsIn(s,i){return _(s,w(s),i)}},55481:(s,i,u)=>{var _=u(9325)[\"__core-js_shared__\"];s.exports=_},58523:s=>{s.exports=function countHolders(s,i){for(var u=s.length,_=0;u--;)s[u]===i&&++_;return _}},20999:(s,i,u)=>{var _=u(69302),w=u(36800);s.exports=function createAssigner(s){return _((function(i,u){var _=-1,x=u.length,j=x>1?u[x-1]:void 0,P=x>2?u[2]:void 0;for(j=s.length>3&&\"function\"==typeof j?(x--,j):void 0,P&&w(u[0],u[1],P)&&(j=x<3?void 0:j,x=1),i=Object(i);++_<x;){var B=u[_];B&&s(i,B,_,j)}return i}))}},38329:(s,i,u)=>{var _=u(64894);s.exports=function createBaseEach(s,i){return function(u,w){if(null==u)return u;if(!_(u))return s(u,w);for(var x=u.length,j=i?x:-1,P=Object(u);(i?j--:++j<x)&&!1!==w(P[j],j,P););return u}}},83221:s=>{s.exports=function createBaseFor(s){return function(i,u,_){for(var w=-1,x=Object(i),j=_(i),P=j.length;P--;){var B=j[s?P:++w];if(!1===u(x[B],B,x))break}return i}}},11842:(s,i,u)=>{var _=u(82819),w=u(9325);s.exports=function createBind(s,i,u){var x=1&i,j=_(s);return function wrapper(){return(this&&this!==w&&this instanceof wrapper?j:s).apply(x?u:this,arguments)}}},12507:(s,i,u)=>{var _=u(28754),w=u(49698),x=u(63912),j=u(13222);s.exports=function createCaseFirst(s){return function(i){i=j(i);var u=w(i)?x(i):void 0,P=u?u[0]:i.charAt(0),B=u?_(u,1).join(\"\"):i.slice(1);return P[s]()+B}}},45539:(s,i,u)=>{var _=u(40882),w=u(50828),x=u(66645),j=RegExp(\"['’]\",\"g\");s.exports=function createCompounder(s){return function(i){return _(x(w(i).replace(j,\"\")),s,\"\")}}},82819:(s,i,u)=>{var _=u(39344),w=u(23805);s.exports=function createCtor(s){return function(){var i=arguments;switch(i.length){case 0:return new s;case 1:return new s(i[0]);case 2:return new s(i[0],i[1]);case 3:return new s(i[0],i[1],i[2]);case 4:return new s(i[0],i[1],i[2],i[3]);case 5:return new s(i[0],i[1],i[2],i[3],i[4]);case 6:return new s(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new s(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var u=_(s.prototype),x=s.apply(u,i);return w(x)?x:u}}},77078:(s,i,u)=>{var _=u(91033),w=u(82819),x=u(37471),j=u(18073),P=u(11287),B=u(36306),$=u(9325);s.exports=function createCurry(s,i,u){var U=w(s);return function wrapper(){for(var w=arguments.length,Y=Array(w),X=w,Z=P(wrapper);X--;)Y[X]=arguments[X];var ee=w<3&&Y[0]!==Z&&Y[w-1]!==Z?[]:B(Y,Z);return(w-=ee.length)<u?j(s,i,x,wrapper.placeholder,void 0,Y,ee,void 0,void 0,u-w):_(this&&this!==$&&this instanceof wrapper?U:s,this,Y)}}},62006:(s,i,u)=>{var _=u(15389),w=u(64894),x=u(95950);s.exports=function createFind(s){return function(i,u,j){var P=Object(i);if(!w(i)){var B=_(u,3);i=x(i),u=function(s){return B(P[s],s,P)}}var $=s(i,u,j);return $>-1?P[B?i[$]:$]:void 0}}},37471:(s,i,u)=>{var _=u(91596),w=u(53320),x=u(58523),j=u(82819),P=u(18073),B=u(11287),$=u(68294),U=u(36306),Y=u(9325);s.exports=function createHybrid(s,i,u,X,Z,ee,ie,ae,le,ce){var pe=128&i,de=1&i,fe=2&i,ye=24&i,be=512&i,_e=fe?void 0:j(s);return function wrapper(){for(var we=arguments.length,Se=Array(we),xe=we;xe--;)Se[xe]=arguments[xe];if(ye)var Pe=B(wrapper),Te=x(Se,Pe);if(X&&(Se=_(Se,X,Z,ye)),ee&&(Se=w(Se,ee,ie,ye)),we-=Te,ye&&we<ce){var Re=U(Se,Pe);return P(s,i,createHybrid,wrapper.placeholder,u,Se,Re,ae,le,ce-we)}var qe=de?u:this,$e=fe?qe[s]:s;return we=Se.length,ae?Se=$(Se,ae):be&&we>1&&Se.reverse(),pe&&le<we&&(Se.length=le),this&&this!==Y&&this instanceof wrapper&&($e=_e||j($e)),$e.apply(qe,Se)}}},24168:(s,i,u)=>{var _=u(91033),w=u(82819),x=u(9325);s.exports=function createPartial(s,i,u,j){var P=1&i,B=w(s);return function wrapper(){for(var i=-1,w=arguments.length,$=-1,U=j.length,Y=Array(U+w),X=this&&this!==x&&this instanceof wrapper?B:s;++$<U;)Y[$]=j[$];for(;w--;)Y[$++]=arguments[++i];return _(X,P?u:this,Y)}}},18073:(s,i,u)=>{var _=u(85087),w=u(54641),x=u(70981);s.exports=function createRecurry(s,i,u,j,P,B,$,U,Y,X){var Z=8&i;i|=Z?32:64,4&(i&=~(Z?64:32))||(i&=-4);var ee=[s,i,P,Z?B:void 0,Z?$:void 0,Z?void 0:B,Z?void 0:$,U,Y,X],ie=u.apply(void 0,ee);return _(s)&&w(ie,ee),ie.placeholder=j,x(ie,s,i)}},66977:(s,i,u)=>{var _=u(68882),w=u(11842),x=u(77078),j=u(37471),P=u(24168),B=u(37381),$=u(3209),U=u(54641),Y=u(70981),X=u(61489),Z=Math.max;s.exports=function createWrap(s,i,u,ee,ie,ae,le,ce){var pe=2&i;if(!pe&&\"function\"!=typeof s)throw new TypeError(\"Expected a function\");var de=ee?ee.length:0;if(de||(i&=-97,ee=ie=void 0),le=void 0===le?le:Z(X(le),0),ce=void 0===ce?ce:X(ce),de-=ie?ie.length:0,64&i){var fe=ee,ye=ie;ee=ie=void 0}var be=pe?void 0:B(s),_e=[s,i,u,ee,ie,fe,ye,ae,le,ce];if(be&&$(_e,be),s=_e[0],i=_e[1],u=_e[2],ee=_e[3],ie=_e[4],!(ce=_e[9]=void 0===_e[9]?pe?0:s.length:Z(_e[9]-de,0))&&24&i&&(i&=-25),i&&1!=i)we=8==i||16==i?x(s,i,ce):32!=i&&33!=i||ie.length?j.apply(void 0,_e):P(s,i,u,ee);else var we=w(s,i,u);return Y((be?_:U)(we,_e),s,i)}},53138:(s,i,u)=>{var _=u(11331);s.exports=function customOmitClone(s){return _(s)?void 0:s}},24647:(s,i,u)=>{var _=u(54552)({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"});s.exports=_},93243:(s,i,u)=>{var _=u(56110),w=function(){try{var s=_(Object,\"defineProperty\");return s({},\"\",{}),s}catch(s){}}();s.exports=w},25911:(s,i,u)=>{var _=u(38859),w=u(14248),x=u(19219);s.exports=function equalArrays(s,i,u,j,P,B){var $=1&u,U=s.length,Y=i.length;if(U!=Y&&!($&&Y>U))return!1;var X=B.get(s),Z=B.get(i);if(X&&Z)return X==i&&Z==s;var ee=-1,ie=!0,ae=2&u?new _:void 0;for(B.set(s,i),B.set(i,s);++ee<U;){var le=s[ee],ce=i[ee];if(j)var pe=$?j(ce,le,ee,i,s,B):j(le,ce,ee,s,i,B);if(void 0!==pe){if(pe)continue;ie=!1;break}if(ae){if(!w(i,(function(s,i){if(!x(ae,i)&&(le===s||P(le,s,u,j,B)))return ae.push(i)}))){ie=!1;break}}else if(le!==ce&&!P(le,ce,u,j,B)){ie=!1;break}}return B.delete(s),B.delete(i),ie}},21986:(s,i,u)=>{var _=u(51873),w=u(37828),x=u(75288),j=u(25911),P=u(20317),B=u(84247),$=_?_.prototype:void 0,U=$?$.valueOf:void 0;s.exports=function equalByTag(s,i,u,_,$,Y,X){switch(u){case\"[object DataView]\":if(s.byteLength!=i.byteLength||s.byteOffset!=i.byteOffset)return!1;s=s.buffer,i=i.buffer;case\"[object ArrayBuffer]\":return!(s.byteLength!=i.byteLength||!Y(new w(s),new w(i)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return x(+s,+i);case\"[object Error]\":return s.name==i.name&&s.message==i.message;case\"[object RegExp]\":case\"[object String]\":return s==i+\"\";case\"[object Map]\":var Z=P;case\"[object Set]\":var ee=1&_;if(Z||(Z=B),s.size!=i.size&&!ee)return!1;var ie=X.get(s);if(ie)return ie==i;_|=2,X.set(s,i);var ae=j(Z(s),Z(i),_,$,Y,X);return X.delete(s),ae;case\"[object Symbol]\":if(U)return U.call(s)==U.call(i)}return!1}},50689:(s,i,u)=>{var _=u(50002),w=Object.prototype.hasOwnProperty;s.exports=function equalObjects(s,i,u,x,j,P){var B=1&u,$=_(s),U=$.length;if(U!=_(i).length&&!B)return!1;for(var Y=U;Y--;){var X=$[Y];if(!(B?X in i:w.call(i,X)))return!1}var Z=P.get(s),ee=P.get(i);if(Z&&ee)return Z==i&&ee==s;var ie=!0;P.set(s,i),P.set(i,s);for(var ae=B;++Y<U;){var le=s[X=$[Y]],ce=i[X];if(x)var pe=B?x(ce,le,X,i,s,P):x(le,ce,X,s,i,P);if(!(void 0===pe?le===ce||j(le,ce,u,x,P):pe)){ie=!1;break}ae||(ae=\"constructor\"==X)}if(ie&&!ae){var de=s.constructor,fe=i.constructor;de==fe||!(\"constructor\"in s)||!(\"constructor\"in i)||\"function\"==typeof de&&de instanceof de&&\"function\"==typeof fe&&fe instanceof fe||(ie=!1)}return P.delete(s),P.delete(i),ie}},38816:(s,i,u)=>{var _=u(35970),w=u(56757),x=u(32865);s.exports=function flatRest(s){return x(w(s,void 0,_),s+\"\")}},34840:(s,i,u)=>{var _=\"object\"==typeof u.g&&u.g&&u.g.Object===Object&&u.g;s.exports=_},50002:(s,i,u)=>{var _=u(82199),w=u(4664),x=u(95950);s.exports=function getAllKeys(s){return _(s,x,w)}},83349:(s,i,u)=>{var _=u(82199),w=u(86375),x=u(37241);s.exports=function getAllKeysIn(s){return _(s,x,w)}},37381:(s,i,u)=>{var _=u(48152),w=u(63950),x=_?function(s){return _.get(s)}:w;s.exports=x},62284:(s,i,u)=>{var _=u(84629),w=Object.prototype.hasOwnProperty;s.exports=function getFuncName(s){for(var i=s.name+\"\",u=_[i],x=w.call(_,i)?u.length:0;x--;){var j=u[x],P=j.func;if(null==P||P==s)return j.name}return i}},11287:s=>{s.exports=function getHolder(s){return s.placeholder}},12651:(s,i,u)=>{var _=u(74218);s.exports=function getMapData(s,i){var u=s.__data__;return _(i)?u[\"string\"==typeof i?\"string\":\"hash\"]:u.map}},10776:(s,i,u)=>{var _=u(30756),w=u(95950);s.exports=function getMatchData(s){for(var i=w(s),u=i.length;u--;){var x=i[u],j=s[x];i[u]=[x,j,_(j)]}return i}},56110:(s,i,u)=>{var _=u(45083),w=u(10392);s.exports=function getNative(s,i){var u=w(s,i);return _(u)?u:void 0}},28879:(s,i,u)=>{var _=u(74335)(Object.getPrototypeOf,Object);s.exports=_},659:(s,i,u)=>{var _=u(51873),w=Object.prototype,x=w.hasOwnProperty,j=w.toString,P=_?_.toStringTag:void 0;s.exports=function getRawTag(s){var i=x.call(s,P),u=s[P];try{s[P]=void 0;var _=!0}catch(s){}var w=j.call(s);return _&&(i?s[P]=u:delete s[P]),w}},4664:(s,i,u)=>{var _=u(79770),w=u(63345),x=Object.prototype.propertyIsEnumerable,j=Object.getOwnPropertySymbols,P=j?function(s){return null==s?[]:(s=Object(s),_(j(s),(function(i){return x.call(s,i)})))}:w;s.exports=P},86375:(s,i,u)=>{var _=u(14528),w=u(28879),x=u(4664),j=u(63345),P=Object.getOwnPropertySymbols?function(s){for(var i=[];s;)_(i,x(s)),s=w(s);return i}:j;s.exports=P},5861:(s,i,u)=>{var _=u(55580),w=u(68223),x=u(32804),j=u(76545),P=u(28303),B=u(72552),$=u(47473),U=\"[object Map]\",Y=\"[object Promise]\",X=\"[object Set]\",Z=\"[object WeakMap]\",ee=\"[object DataView]\",ie=$(_),ae=$(w),le=$(x),ce=$(j),pe=$(P),de=B;(_&&de(new _(new ArrayBuffer(1)))!=ee||w&&de(new w)!=U||x&&de(x.resolve())!=Y||j&&de(new j)!=X||P&&de(new P)!=Z)&&(de=function(s){var i=B(s),u=\"[object Object]\"==i?s.constructor:void 0,_=u?$(u):\"\";if(_)switch(_){case ie:return ee;case ae:return U;case le:return Y;case ce:return X;case pe:return Z}return i}),s.exports=de},10392:s=>{s.exports=function getValue(s,i){return null==s?void 0:s[i]}},75251:s=>{var i=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,u=/,? & /;s.exports=function getWrapDetails(s){var _=s.match(i);return _?_[1].split(u):[]}},49326:(s,i,u)=>{var _=u(31769),w=u(72428),x=u(56449),j=u(30361),P=u(30294),B=u(77797);s.exports=function hasPath(s,i,u){for(var $=-1,U=(i=_(i,s)).length,Y=!1;++$<U;){var X=B(i[$]);if(!(Y=null!=s&&u(s,X)))break;s=s[X]}return Y||++$!=U?Y:!!(U=null==s?0:s.length)&&P(U)&&j(X,U)&&(x(s)||w(s))}},49698:s=>{var i=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");s.exports=function hasUnicode(s){return i.test(s)}},45434:s=>{var i=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;s.exports=function hasUnicodeWord(s){return i.test(s)}},22032:(s,i,u)=>{var _=u(81042);s.exports=function hashClear(){this.__data__=_?_(null):{},this.size=0}},63862:s=>{s.exports=function hashDelete(s){var i=this.has(s)&&delete this.__data__[s];return this.size-=i?1:0,i}},66721:(s,i,u)=>{var _=u(81042),w=Object.prototype.hasOwnProperty;s.exports=function hashGet(s){var i=this.__data__;if(_){var u=i[s];return\"__lodash_hash_undefined__\"===u?void 0:u}return w.call(i,s)?i[s]:void 0}},12749:(s,i,u)=>{var _=u(81042),w=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var i=this.__data__;return _?void 0!==i[s]:w.call(i,s)}},35749:(s,i,u)=>{var _=u(81042);s.exports=function hashSet(s,i){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=_&&void 0===i?\"__lodash_hash_undefined__\":i,this}},76189:s=>{var i=Object.prototype.hasOwnProperty;s.exports=function initCloneArray(s){var u=s.length,_=new s.constructor(u);return u&&\"string\"==typeof s[0]&&i.call(s,\"index\")&&(_.index=s.index,_.input=s.input),_}},77199:(s,i,u)=>{var _=u(49653),w=u(76169),x=u(73201),j=u(93736),P=u(71961);s.exports=function initCloneByTag(s,i,u){var B=s.constructor;switch(i){case\"[object ArrayBuffer]\":return _(s);case\"[object Boolean]\":case\"[object Date]\":return new B(+s);case\"[object DataView]\":return w(s,u);case\"[object Float32Array]\":case\"[object Float64Array]\":case\"[object Int8Array]\":case\"[object Int16Array]\":case\"[object Int32Array]\":case\"[object Uint8Array]\":case\"[object Uint8ClampedArray]\":case\"[object Uint16Array]\":case\"[object Uint32Array]\":return P(s,u);case\"[object Map]\":case\"[object Set]\":return new B;case\"[object Number]\":case\"[object String]\":return new B(s);case\"[object RegExp]\":return x(s);case\"[object Symbol]\":return j(s)}}},35529:(s,i,u)=>{var _=u(39344),w=u(28879),x=u(55527);s.exports=function initCloneObject(s){return\"function\"!=typeof s.constructor||x(s)?{}:_(w(s))}},62060:s=>{var i=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;s.exports=function insertWrapDetails(s,u){var _=u.length;if(!_)return s;var w=_-1;return u[w]=(_>1?\"& \":\"\")+u[w],u=u.join(_>2?\", \":\" \"),s.replace(i,\"{\\n/* [wrapped with \"+u+\"] */\\n\")}},45891:(s,i,u)=>{var _=u(51873),w=u(72428),x=u(56449),j=_?_.isConcatSpreadable:void 0;s.exports=function isFlattenable(s){return x(s)||w(s)||!!(j&&s&&s[j])}},30361:s=>{var i=/^(?:0|[1-9]\\d*)$/;s.exports=function isIndex(s,u){var _=typeof s;return!!(u=null==u?9007199254740991:u)&&(\"number\"==_||\"symbol\"!=_&&i.test(s))&&s>-1&&s%1==0&&s<u}},36800:(s,i,u)=>{var _=u(75288),w=u(64894),x=u(30361),j=u(23805);s.exports=function isIterateeCall(s,i,u){if(!j(u))return!1;var P=typeof i;return!!(\"number\"==P?w(u)&&x(i,u.length):\"string\"==P&&i in u)&&_(u[i],s)}},28586:(s,i,u)=>{var _=u(56449),w=u(44394),x=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,j=/^\\w*$/;s.exports=function isKey(s,i){if(_(s))return!1;var u=typeof s;return!(\"number\"!=u&&\"symbol\"!=u&&\"boolean\"!=u&&null!=s&&!w(s))||(j.test(s)||!x.test(s)||null!=i&&s in Object(i))}},74218:s=>{s.exports=function isKeyable(s){var i=typeof s;return\"string\"==i||\"number\"==i||\"symbol\"==i||\"boolean\"==i?\"__proto__\"!==s:null===s}},85087:(s,i,u)=>{var _=u(30980),w=u(37381),x=u(62284),j=u(53758);s.exports=function isLaziable(s){var i=x(s),u=j[i];if(\"function\"!=typeof u||!(i in _.prototype))return!1;if(s===u)return!0;var P=w(u);return!!P&&s===P[0]}},87296:(s,i,u)=>{var _,w=u(55481),x=(_=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+_:\"\";s.exports=function isMasked(s){return!!x&&x in s}},55527:s=>{var i=Object.prototype;s.exports=function isPrototype(s){var u=s&&s.constructor;return s===(\"function\"==typeof u&&u.prototype||i)}},30756:(s,i,u)=>{var _=u(23805);s.exports=function isStrictComparable(s){return s==s&&!_(s)}},63702:s=>{s.exports=function listCacheClear(){this.__data__=[],this.size=0}},70080:(s,i,u)=>{var _=u(26025),w=Array.prototype.splice;s.exports=function listCacheDelete(s){var i=this.__data__,u=_(i,s);return!(u<0)&&(u==i.length-1?i.pop():w.call(i,u,1),--this.size,!0)}},24739:(s,i,u)=>{var _=u(26025);s.exports=function listCacheGet(s){var i=this.__data__,u=_(i,s);return u<0?void 0:i[u][1]}},48655:(s,i,u)=>{var _=u(26025);s.exports=function listCacheHas(s){return _(this.__data__,s)>-1}},31175:(s,i,u)=>{var _=u(26025);s.exports=function listCacheSet(s,i){var u=this.__data__,w=_(u,s);return w<0?(++this.size,u.push([s,i])):u[w][1]=i,this}},63040:(s,i,u)=>{var _=u(21549),w=u(80079),x=u(68223);s.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new _,map:new(x||w),string:new _}}},17670:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheDelete(s){var i=_(this,s).delete(s);return this.size-=i?1:0,i}},90289:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheGet(s){return _(this,s).get(s)}},4509:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheHas(s){return _(this,s).has(s)}},72949:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheSet(s,i){var u=_(this,s),w=u.size;return u.set(s,i),this.size+=u.size==w?0:1,this}},20317:s=>{s.exports=function mapToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s,_){u[++i]=[_,s]})),u}},67197:s=>{s.exports=function matchesStrictComparable(s,i){return function(u){return null!=u&&(u[s]===i&&(void 0!==i||s in Object(u)))}}},62224:(s,i,u)=>{var _=u(50104);s.exports=function memoizeCapped(s){var i=_(s,(function(s){return 500===u.size&&u.clear(),s})),u=i.cache;return i}},3209:(s,i,u)=>{var _=u(91596),w=u(53320),x=u(36306),j=\"__lodash_placeholder__\",P=128,B=Math.min;s.exports=function mergeData(s,i){var u=s[1],$=i[1],U=u|$,Y=U<131,X=$==P&&8==u||$==P&&256==u&&s[7].length<=i[8]||384==$&&i[7].length<=i[8]&&8==u;if(!Y&&!X)return s;1&$&&(s[2]=i[2],U|=1&u?0:4);var Z=i[3];if(Z){var ee=s[3];s[3]=ee?_(ee,Z,i[4]):Z,s[4]=ee?x(s[3],j):i[4]}return(Z=i[5])&&(ee=s[5],s[5]=ee?w(ee,Z,i[6]):Z,s[6]=ee?x(s[5],j):i[6]),(Z=i[7])&&(s[7]=Z),$&P&&(s[8]=null==s[8]?i[8]:B(s[8],i[8])),null==s[9]&&(s[9]=i[9]),s[0]=i[0],s[1]=U,s}},48152:(s,i,u)=>{var _=u(28303),w=_&&new _;s.exports=w},81042:(s,i,u)=>{var _=u(56110)(Object,\"create\");s.exports=_},3650:(s,i,u)=>{var _=u(74335)(Object.keys,Object);s.exports=_},90181:s=>{s.exports=function nativeKeysIn(s){var i=[];if(null!=s)for(var u in Object(s))i.push(u);return i}},86009:(s,i,u)=>{s=u.nmd(s);var _=u(34840),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w&&_.process,P=function(){try{var s=x&&x.require&&x.require(\"util\").types;return s||j&&j.binding&&j.binding(\"util\")}catch(s){}}();s.exports=P},59350:s=>{var i=Object.prototype.toString;s.exports=function objectToString(s){return i.call(s)}},74335:s=>{s.exports=function overArg(s,i){return function(u){return s(i(u))}}},56757:(s,i,u)=>{var _=u(91033),w=Math.max;s.exports=function overRest(s,i,u){return i=w(void 0===i?s.length-1:i,0),function(){for(var x=arguments,j=-1,P=w(x.length-i,0),B=Array(P);++j<P;)B[j]=x[i+j];j=-1;for(var $=Array(i+1);++j<i;)$[j]=x[j];return $[i]=u(B),_(s,this,$)}}},68969:(s,i,u)=>{var _=u(47422),w=u(25160);s.exports=function parent(s,i){return i.length<2?s:_(s,w(i,0,-1))}},84629:s=>{s.exports={}},68294:(s,i,u)=>{var _=u(23007),w=u(30361),x=Math.min;s.exports=function reorder(s,i){for(var u=s.length,j=x(i.length,u),P=_(s);j--;){var B=i[j];s[j]=w(B,u)?P[B]:void 0}return s}},36306:s=>{var i=\"__lodash_placeholder__\";s.exports=function replaceHolders(s,u){for(var _=-1,w=s.length,x=0,j=[];++_<w;){var P=s[_];P!==u&&P!==i||(s[_]=i,j[x++]=_)}return j}},9325:(s,i,u)=>{var _=u(34840),w=\"object\"==typeof self&&self&&self.Object===Object&&self,x=_||w||Function(\"return this\")();s.exports=x},14974:s=>{s.exports=function safeGet(s,i){if((\"constructor\"!==i||\"function\"!=typeof s[i])&&\"__proto__\"!=i)return s[i]}},31380:s=>{s.exports=function setCacheAdd(s){return this.__data__.set(s,\"__lodash_hash_undefined__\"),this}},51459:s=>{s.exports=function setCacheHas(s){return this.__data__.has(s)}},54641:(s,i,u)=>{var _=u(68882),w=u(51811)(_);s.exports=w},84247:s=>{s.exports=function setToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s){u[++i]=s})),u}},32865:(s,i,u)=>{var _=u(19570),w=u(51811)(_);s.exports=w},70981:(s,i,u)=>{var _=u(75251),w=u(62060),x=u(32865),j=u(75948);s.exports=function setWrapToString(s,i,u){var P=i+\"\";return x(s,w(P,j(_(P),u)))}},51811:s=>{var i=Date.now;s.exports=function shortOut(s){var u=0,_=0;return function(){var w=i(),x=16-(w-_);if(_=w,x>0){if(++u>=800)return arguments[0]}else u=0;return s.apply(void 0,arguments)}}},51420:(s,i,u)=>{var _=u(80079);s.exports=function stackClear(){this.__data__=new _,this.size=0}},90938:s=>{s.exports=function stackDelete(s){var i=this.__data__,u=i.delete(s);return this.size=i.size,u}},63605:s=>{s.exports=function stackGet(s){return this.__data__.get(s)}},29817:s=>{s.exports=function stackHas(s){return this.__data__.has(s)}},80945:(s,i,u)=>{var _=u(80079),w=u(68223),x=u(53661);s.exports=function stackSet(s,i){var u=this.__data__;if(u instanceof _){var j=u.__data__;if(!w||j.length<199)return j.push([s,i]),this.size=++u.size,this;u=this.__data__=new x(j)}return u.set(s,i),this.size=u.size,this}},76959:s=>{s.exports=function strictIndexOf(s,i,u){for(var _=u-1,w=s.length;++_<w;)if(s[_]===i)return _;return-1}},63912:(s,i,u)=>{var _=u(61074),w=u(49698),x=u(42054);s.exports=function stringToArray(s){return w(s)?x(s):_(s)}},61802:(s,i,u)=>{var _=u(62224),w=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,x=/\\\\(\\\\)?/g,j=_((function(s){var i=[];return 46===s.charCodeAt(0)&&i.push(\"\"),s.replace(w,(function(s,u,_,w){i.push(_?w.replace(x,\"$1\"):u||s)})),i}));s.exports=j},77797:(s,i,u)=>{var _=u(44394);s.exports=function toKey(s){if(\"string\"==typeof s||_(s))return s;var i=s+\"\";return\"0\"==i&&1/s==-Infinity?\"-0\":i}},47473:s=>{var i=Function.prototype.toString;s.exports=function toSource(s){if(null!=s){try{return i.call(s)}catch(s){}try{return s+\"\"}catch(s){}}return\"\"}},31800:s=>{var i=/\\s/;s.exports=function trimmedEndIndex(s){for(var u=s.length;u--&&i.test(s.charAt(u)););return u}},42054:s=>{var i=\"\\\\ud800-\\\\udfff\",u=\"[\"+i+\"]\",_=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",w=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",x=\"[^\"+i+\"]\",j=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",P=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",B=\"(?:\"+_+\"|\"+w+\")\"+\"?\",$=\"[\\\\ufe0e\\\\ufe0f]?\",U=$+B+(\"(?:\\\\u200d(?:\"+[x,j,P].join(\"|\")+\")\"+$+B+\")*\"),Y=\"(?:\"+[x+_+\"?\",_,j,P,u].join(\"|\")+\")\",X=RegExp(w+\"(?=\"+w+\")|\"+Y+U,\"g\");s.exports=function unicodeToArray(s){return s.match(X)||[]}},22225:s=>{var i=\"\\\\ud800-\\\\udfff\",u=\"\\\\u2700-\\\\u27bf\",_=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",w=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",x=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",j=\"[\"+x+\"]\",P=\"\\\\d+\",B=\"[\"+u+\"]\",$=\"[\"+_+\"]\",U=\"[^\"+i+x+P+u+_+w+\"]\",Y=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",X=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",Z=\"[\"+w+\"]\",ee=\"(?:\"+$+\"|\"+U+\")\",ie=\"(?:\"+Z+\"|\"+U+\")\",ae=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",le=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",ce=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",pe=\"[\\\\ufe0e\\\\ufe0f]?\",de=pe+ce+(\"(?:\\\\u200d(?:\"+[\"[^\"+i+\"]\",Y,X].join(\"|\")+\")\"+pe+ce+\")*\"),fe=\"(?:\"+[B,Y,X].join(\"|\")+\")\"+de,ye=RegExp([Z+\"?\"+$+\"+\"+ae+\"(?=\"+[j,Z,\"$\"].join(\"|\")+\")\",ie+\"+\"+le+\"(?=\"+[j,Z+ee,\"$\"].join(\"|\")+\")\",Z+\"?\"+ee+\"+\"+ae,Z+\"+\"+le,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",P,fe].join(\"|\"),\"g\");s.exports=function unicodeWords(s){return s.match(ye)||[]}},75948:(s,i,u)=>{var _=u(83729),w=u(15325),x=[[\"ary\",128],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",32],[\"partialRight\",64],[\"rearg\",256]];s.exports=function updateWrapDetails(s,i){return _(x,(function(u){var _=\"_.\"+u[0];i&u[1]&&!w(s,_)&&s.push(_)})),s.sort()}},80257:(s,i,u)=>{var _=u(30980),w=u(56017),x=u(23007);s.exports=function wrapperClone(s){if(s instanceof _)return s.clone();var i=new w(s.__wrapped__,s.__chain__);return i.__actions__=x(s.__actions__),i.__index__=s.__index__,i.__values__=s.__values__,i}},64626:(s,i,u)=>{var _=u(66977);s.exports=function ary(s,i,u){return i=u?void 0:i,i=s&&null==i?s.length:i,_(s,128,void 0,void 0,void 0,void 0,i)}},84058:(s,i,u)=>{var _=u(14792),w=u(45539)((function(s,i,u){return i=i.toLowerCase(),s+(u?_(i):i)}));s.exports=w},14792:(s,i,u)=>{var _=u(13222),w=u(55808);s.exports=function capitalize(s){return w(_(s).toLowerCase())}},32629:(s,i,u)=>{var _=u(9999);s.exports=function clone(s){return _(s,4)}},37334:s=>{s.exports=function constant(s){return function(){return s}}},49747:(s,i,u)=>{var _=u(66977);function curry(s,i,u){var w=_(s,8,void 0,void 0,void 0,void 0,void 0,i=u?void 0:i);return w.placeholder=curry.placeholder,w}curry.placeholder={},s.exports=curry},38221:(s,i,u)=>{var _=u(23805),w=u(10124),x=u(99374),j=Math.max,P=Math.min;s.exports=function debounce(s,i,u){var B,$,U,Y,X,Z,ee=0,ie=!1,ae=!1,le=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(i){var u=B,_=$;return B=$=void 0,ee=i,Y=s.apply(_,u)}function shouldInvoke(s){var u=s-Z;return void 0===Z||u>=i||u<0||ae&&s-ee>=U}function timerExpired(){var s=w();if(shouldInvoke(s))return trailingEdge(s);X=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-Z);return ae?P(u,U-(s-ee)):u}(s))}function trailingEdge(s){return X=void 0,le&&B?invokeFunc(s):(B=$=void 0,Y)}function debounced(){var s=w(),u=shouldInvoke(s);if(B=arguments,$=this,Z=s,u){if(void 0===X)return function leadingEdge(s){return ee=s,X=setTimeout(timerExpired,i),ie?invokeFunc(s):Y}(Z);if(ae)return clearTimeout(X),X=setTimeout(timerExpired,i),invokeFunc(Z)}return void 0===X&&(X=setTimeout(timerExpired,i)),Y}return i=x(i)||0,_(u)&&(ie=!!u.leading,U=(ae=\"maxWait\"in u)?j(x(u.maxWait)||0,i):U,le=\"trailing\"in u?!!u.trailing:le),debounced.cancel=function cancel(){void 0!==X&&clearTimeout(X),ee=0,B=Z=$=X=void 0},debounced.flush=function flush(){return void 0===X?Y:trailingEdge(w())},debounced}},50828:(s,i,u)=>{var _=u(24647),w=u(13222),x=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,j=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");s.exports=function deburr(s){return(s=w(s))&&s.replace(x,_).replace(j,\"\")}},75288:s=>{s.exports=function eq(s,i){return s===i||s!=s&&i!=i}},60680:(s,i,u)=>{var _=u(13222),w=/[\\\\^$.*+?()[\\]{}|]/g,x=RegExp(w.source);s.exports=function escapeRegExp(s){return(s=_(s))&&x.test(s)?s.replace(w,\"\\\\$&\"):s}},7309:(s,i,u)=>{var _=u(62006)(u(24713));s.exports=_},24713:(s,i,u)=>{var _=u(2523),w=u(15389),x=u(61489),j=Math.max;s.exports=function findIndex(s,i,u){var P=null==s?0:s.length;if(!P)return-1;var B=null==u?0:x(u);return B<0&&(B=j(P+B,0)),_(s,w(i,3),B)}},35970:(s,i,u)=>{var _=u(83120);s.exports=function flatten(s){return(null==s?0:s.length)?_(s,1):[]}},73424:(s,i,u)=>{var _=u(16962),w=u(2874),x=Array.prototype.push;function baseAry(s,i){return 2==i?function(i,u){return s(i,u)}:function(i){return s(i)}}function cloneArray(s){for(var i=s?s.length:0,u=Array(i);i--;)u[i]=s[i];return u}function wrapImmutable(s,i){return function(){var u=arguments.length;if(u){for(var _=Array(u);u--;)_[u]=arguments[u];var w=_[0]=i.apply(void 0,_);return s.apply(void 0,_),w}}}s.exports=function baseConvert(s,i,u,j){var P=\"function\"==typeof i,B=i===Object(i);if(B&&(j=u,u=i,i=void 0),null==u)throw new TypeError;j||(j={});var $={cap:!(\"cap\"in j)||j.cap,curry:!(\"curry\"in j)||j.curry,fixed:!(\"fixed\"in j)||j.fixed,immutable:!(\"immutable\"in j)||j.immutable,rearg:!(\"rearg\"in j)||j.rearg},U=P?u:w,Y=\"curry\"in j&&j.curry,X=\"fixed\"in j&&j.fixed,Z=\"rearg\"in j&&j.rearg,ee=P?u.runInContext():void 0,ie=P?u:{ary:s.ary,assign:s.assign,clone:s.clone,curry:s.curry,forEach:s.forEach,isArray:s.isArray,isError:s.isError,isFunction:s.isFunction,isWeakMap:s.isWeakMap,iteratee:s.iteratee,keys:s.keys,rearg:s.rearg,toInteger:s.toInteger,toPath:s.toPath},ae=ie.ary,le=ie.assign,ce=ie.clone,pe=ie.curry,de=ie.forEach,fe=ie.isArray,ye=ie.isError,be=ie.isFunction,_e=ie.isWeakMap,we=ie.keys,Se=ie.rearg,xe=ie.toInteger,Pe=ie.toPath,Te=we(_.aryMethod),Re={castArray:function(s){return function(){var i=arguments[0];return fe(i)?s(cloneArray(i)):s.apply(void 0,arguments)}},iteratee:function(s){return function(){var i=arguments[1],u=s(arguments[0],i),_=u.length;return $.cap&&\"number\"==typeof i?(i=i>2?i-2:1,_&&_<=i?u:baseAry(u,i)):u}},mixin:function(s){return function(i){var u=this;if(!be(u))return s(u,Object(i));var _=[];return de(we(i),(function(s){be(i[s])&&_.push([s,u.prototype[s]])})),s(u,Object(i)),de(_,(function(s){var i=s[1];be(i)?u.prototype[s[0]]=i:delete u.prototype[s[0]]})),u}},nthArg:function(s){return function(i){var u=i<0?1:xe(i)+1;return pe(s(i),u)}},rearg:function(s){return function(i,u){var _=u?u.length:0;return pe(s(i,u),_)}},runInContext:function(i){return function(u){return baseConvert(s,i(u),j)}}};function castCap(s,i){if($.cap){var u=_.iterateeRearg[s];if(u)return function iterateeRearg(s,i){return overArg(s,(function(s){var u=i.length;return function baseArity(s,i){return 2==i?function(i,u){return s.apply(void 0,arguments)}:function(i){return s.apply(void 0,arguments)}}(Se(baseAry(s,u),i),u)}))}(i,u);var w=!P&&_.iterateeAry[s];if(w)return function iterateeAry(s,i){return overArg(s,(function(s){return\"function\"==typeof s?baseAry(s,i):s}))}(i,w)}return i}function castFixed(s,i,u){if($.fixed&&(X||!_.skipFixed[s])){var w=_.methodSpread[s],j=w&&w.start;return void 0===j?ae(i,u):function flatSpread(s,i){return function(){for(var u=arguments.length,_=u-1,w=Array(u);u--;)w[u]=arguments[u];var j=w[i],P=w.slice(0,i);return j&&x.apply(P,j),i!=_&&x.apply(P,w.slice(i+1)),s.apply(this,P)}}(i,j)}return i}function castRearg(s,i,u){return $.rearg&&u>1&&(Z||!_.skipRearg[s])?Se(i,_.methodRearg[s]||_.aryRearg[u]):i}function cloneByPath(s,i){for(var u=-1,_=(i=Pe(i)).length,w=_-1,x=ce(Object(s)),j=x;null!=j&&++u<_;){var P=i[u],B=j[P];null==B||be(B)||ye(B)||_e(B)||(j[P]=ce(u==w?B:Object(B))),j=j[P]}return x}function createConverter(s,i){var u=_.aliasToReal[s]||s,w=_.remap[u]||u,x=j;return function(s){var _=P?ee:ie,j=P?ee[w]:i,B=le(le({},x),s);return baseConvert(_,u,j,B)}}function overArg(s,i){return function(){var u=arguments.length;if(!u)return s();for(var _=Array(u);u--;)_[u]=arguments[u];var w=$.rearg?0:u-1;return _[w]=i(_[w]),s.apply(void 0,_)}}function wrap(s,i,u){var w,x=_.aliasToReal[s]||s,j=i,P=Re[x];return P?j=P(i):$.immutable&&(_.mutate.array[x]?j=wrapImmutable(i,cloneArray):_.mutate.object[x]?j=wrapImmutable(i,function createCloner(s){return function(i){return s({},i)}}(i)):_.mutate.set[x]&&(j=wrapImmutable(i,cloneByPath))),de(Te,(function(s){return de(_.aryMethod[s],(function(i){if(x==i){var u=_.methodSpread[x],P=u&&u.afterRearg;return w=P?castFixed(x,castRearg(x,j,s),s):castRearg(x,castFixed(x,j,s),s),w=function castCurry(s,i,u){return Y||$.curry&&u>1?pe(i,u):i}(0,w=castCap(x,w),s),!1}})),!w})),w||(w=j),w==i&&(w=Y?pe(w,1):function(){return i.apply(this,arguments)}),w.convert=createConverter(x,i),w.placeholder=i.placeholder=u,w}if(!B)return wrap(i,u,U);var qe=u,$e=[];return de(Te,(function(s){de(_.aryMethod[s],(function(s){var i=qe[_.remap[s]||s];i&&$e.push([s,wrap(s,i,qe)])}))})),de(we(qe),(function(s){var i=qe[s];if(\"function\"==typeof i){for(var u=$e.length;u--;)if($e[u][0]==s)return;i.convert=createConverter(s,i),$e.push([s,i])}})),de($e,(function(s){qe[s[0]]=s[1]})),qe.convert=function convertLib(s){return qe.runInContext.convert(s)(void 0)},qe.placeholder=qe,de(we(qe),(function(s){de(_.realToAlias[s]||[],(function(i){qe[i]=qe[s]}))})),qe}},16962:(s,i)=>{i.aliasToReal={each:\"forEach\",eachRight:\"forEachRight\",entries:\"toPairs\",entriesIn:\"toPairsIn\",extend:\"assignIn\",extendAll:\"assignInAll\",extendAllWith:\"assignInAllWith\",extendWith:\"assignInWith\",first:\"head\",conforms:\"conformsTo\",matches:\"isMatch\",property:\"get\",__:\"placeholder\",F:\"stubFalse\",T:\"stubTrue\",all:\"every\",allPass:\"overEvery\",always:\"constant\",any:\"some\",anyPass:\"overSome\",apply:\"spread\",assoc:\"set\",assocPath:\"set\",complement:\"negate\",compose:\"flowRight\",contains:\"includes\",dissoc:\"unset\",dissocPath:\"unset\",dropLast:\"dropRight\",dropLastWhile:\"dropRightWhile\",equals:\"isEqual\",identical:\"eq\",indexBy:\"keyBy\",init:\"initial\",invertObj:\"invert\",juxt:\"over\",omitAll:\"omit\",nAry:\"ary\",path:\"get\",pathEq:\"matchesProperty\",pathOr:\"getOr\",paths:\"at\",pickAll:\"pick\",pipe:\"flow\",pluck:\"map\",prop:\"get\",propEq:\"matchesProperty\",propOr:\"getOr\",props:\"at\",symmetricDifference:\"xor\",symmetricDifferenceBy:\"xorBy\",symmetricDifferenceWith:\"xorWith\",takeLast:\"takeRight\",takeLastWhile:\"takeRightWhile\",unapply:\"rest\",unnest:\"flatten\",useWith:\"overArgs\",where:\"conformsTo\",whereEq:\"isMatch\",zipObj:\"zipObject\"},i.aryMethod={1:[\"assignAll\",\"assignInAll\",\"attempt\",\"castArray\",\"ceil\",\"create\",\"curry\",\"curryRight\",\"defaultsAll\",\"defaultsDeepAll\",\"floor\",\"flow\",\"flowRight\",\"fromPairs\",\"invert\",\"iteratee\",\"memoize\",\"method\",\"mergeAll\",\"methodOf\",\"mixin\",\"nthArg\",\"over\",\"overEvery\",\"overSome\",\"rest\",\"reverse\",\"round\",\"runInContext\",\"spread\",\"template\",\"trim\",\"trimEnd\",\"trimStart\",\"uniqueId\",\"words\",\"zipAll\"],2:[\"add\",\"after\",\"ary\",\"assign\",\"assignAllWith\",\"assignIn\",\"assignInAllWith\",\"at\",\"before\",\"bind\",\"bindAll\",\"bindKey\",\"chunk\",\"cloneDeepWith\",\"cloneWith\",\"concat\",\"conformsTo\",\"countBy\",\"curryN\",\"curryRightN\",\"debounce\",\"defaults\",\"defaultsDeep\",\"defaultTo\",\"delay\",\"difference\",\"divide\",\"drop\",\"dropRight\",\"dropRightWhile\",\"dropWhile\",\"endsWith\",\"eq\",\"every\",\"filter\",\"find\",\"findIndex\",\"findKey\",\"findLast\",\"findLastIndex\",\"findLastKey\",\"flatMap\",\"flatMapDeep\",\"flattenDepth\",\"forEach\",\"forEachRight\",\"forIn\",\"forInRight\",\"forOwn\",\"forOwnRight\",\"get\",\"groupBy\",\"gt\",\"gte\",\"has\",\"hasIn\",\"includes\",\"indexOf\",\"intersection\",\"invertBy\",\"invoke\",\"invokeMap\",\"isEqual\",\"isMatch\",\"join\",\"keyBy\",\"lastIndexOf\",\"lt\",\"lte\",\"map\",\"mapKeys\",\"mapValues\",\"matchesProperty\",\"maxBy\",\"meanBy\",\"merge\",\"mergeAllWith\",\"minBy\",\"multiply\",\"nth\",\"omit\",\"omitBy\",\"overArgs\",\"pad\",\"padEnd\",\"padStart\",\"parseInt\",\"partial\",\"partialRight\",\"partition\",\"pick\",\"pickBy\",\"propertyOf\",\"pull\",\"pullAll\",\"pullAt\",\"random\",\"range\",\"rangeRight\",\"rearg\",\"reject\",\"remove\",\"repeat\",\"restFrom\",\"result\",\"sampleSize\",\"some\",\"sortBy\",\"sortedIndex\",\"sortedIndexOf\",\"sortedLastIndex\",\"sortedLastIndexOf\",\"sortedUniqBy\",\"split\",\"spreadFrom\",\"startsWith\",\"subtract\",\"sumBy\",\"take\",\"takeRight\",\"takeRightWhile\",\"takeWhile\",\"tap\",\"throttle\",\"thru\",\"times\",\"trimChars\",\"trimCharsEnd\",\"trimCharsStart\",\"truncate\",\"union\",\"uniqBy\",\"uniqWith\",\"unset\",\"unzipWith\",\"without\",\"wrap\",\"xor\",\"zip\",\"zipObject\",\"zipObjectDeep\"],3:[\"assignInWith\",\"assignWith\",\"clamp\",\"differenceBy\",\"differenceWith\",\"findFrom\",\"findIndexFrom\",\"findLastFrom\",\"findLastIndexFrom\",\"getOr\",\"includesFrom\",\"indexOfFrom\",\"inRange\",\"intersectionBy\",\"intersectionWith\",\"invokeArgs\",\"invokeArgsMap\",\"isEqualWith\",\"isMatchWith\",\"flatMapDepth\",\"lastIndexOfFrom\",\"mergeWith\",\"orderBy\",\"padChars\",\"padCharsEnd\",\"padCharsStart\",\"pullAllBy\",\"pullAllWith\",\"rangeStep\",\"rangeStepRight\",\"reduce\",\"reduceRight\",\"replace\",\"set\",\"slice\",\"sortedIndexBy\",\"sortedLastIndexBy\",\"transform\",\"unionBy\",\"unionWith\",\"update\",\"xorBy\",\"xorWith\",\"zipWith\"],4:[\"fill\",\"setWith\",\"updateWith\"]},i.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},i.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},i.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},i.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},i.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},i.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},i.realToAlias=function(){var s=Object.prototype.hasOwnProperty,u=i.aliasToReal,_={};for(var w in u){var x=u[w];s.call(_,x)?_[x].push(w):_[x]=[w]}return _}(),i.remap={assignAll:\"assign\",assignAllWith:\"assignWith\",assignInAll:\"assignIn\",assignInAllWith:\"assignInWith\",curryN:\"curry\",curryRightN:\"curryRight\",defaultsAll:\"defaults\",defaultsDeepAll:\"defaultsDeep\",findFrom:\"find\",findIndexFrom:\"findIndex\",findLastFrom:\"findLast\",findLastIndexFrom:\"findLastIndex\",getOr:\"get\",includesFrom:\"includes\",indexOfFrom:\"indexOf\",invokeArgs:\"invoke\",invokeArgsMap:\"invokeMap\",lastIndexOfFrom:\"lastIndexOf\",mergeAll:\"merge\",mergeAllWith:\"mergeWith\",padChars:\"pad\",padCharsEnd:\"padEnd\",padCharsStart:\"padStart\",propertyOf:\"get\",rangeStep:\"range\",rangeStepRight:\"rangeRight\",restFrom:\"rest\",spreadFrom:\"spread\",trimChars:\"trim\",trimCharsEnd:\"trimEnd\",trimCharsStart:\"trimStart\",zipAll:\"zip\"},i.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},i.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},47934:(s,i,u)=>{s.exports={ary:u(64626),assign:u(74733),clone:u(32629),curry:u(49747),forEach:u(83729),isArray:u(56449),isError:u(23546),isFunction:u(1882),isWeakMap:u(47886),iteratee:u(33855),keys:u(88984),rearg:u(84195),toInteger:u(61489),toPath:u(42072)}},56367:(s,i,u)=>{s.exports=u(77731)},79920:(s,i,u)=>{var _=u(73424),w=u(47934);s.exports=function convert(s,i,u){return _(w,s,i,u)}},2874:s=>{s.exports={}},77731:(s,i,u)=>{var _=u(79920)(\"set\",u(63560));_.placeholder=u(2874),s.exports=_},58156:(s,i,u)=>{var _=u(47422);s.exports=function get(s,i,u){var w=null==s?void 0:_(s,i);return void 0===w?u:w}},80631:(s,i,u)=>{var _=u(28077),w=u(49326);s.exports=function hasIn(s,i){return null!=s&&w(s,i,_)}},83488:s=>{s.exports=function identity(s){return s}},72428:(s,i,u)=>{var _=u(27534),w=u(40346),x=Object.prototype,j=x.hasOwnProperty,P=x.propertyIsEnumerable,B=_(function(){return arguments}())?_:function(s){return w(s)&&j.call(s,\"callee\")&&!P.call(s,\"callee\")};s.exports=B},56449:s=>{var i=Array.isArray;s.exports=i},64894:(s,i,u)=>{var _=u(1882),w=u(30294);s.exports=function isArrayLike(s){return null!=s&&w(s.length)&&!_(s)}},83693:(s,i,u)=>{var _=u(64894),w=u(40346);s.exports=function isArrayLikeObject(s){return w(s)&&_(s)}},53812:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isBoolean(s){return!0===s||!1===s||w(s)&&\"[object Boolean]\"==_(s)}},3656:(s,i,u)=>{s=u.nmd(s);var _=u(9325),w=u(89935),x=i&&!i.nodeType&&i,j=x&&s&&!s.nodeType&&s,P=j&&j.exports===x?_.Buffer:void 0,B=(P?P.isBuffer:void 0)||w;s.exports=B},62193:(s,i,u)=>{var _=u(88984),w=u(5861),x=u(72428),j=u(56449),P=u(64894),B=u(3656),$=u(55527),U=u(37167),Y=Object.prototype.hasOwnProperty;s.exports=function isEmpty(s){if(null==s)return!0;if(P(s)&&(j(s)||\"string\"==typeof s||\"function\"==typeof s.splice||B(s)||U(s)||x(s)))return!s.length;var i=w(s);if(\"[object Map]\"==i||\"[object Set]\"==i)return!s.size;if($(s))return!_(s).length;for(var u in s)if(Y.call(s,u))return!1;return!0}},2404:(s,i,u)=>{var _=u(60270);s.exports=function isEqual(s,i){return _(s,i)}},23546:(s,i,u)=>{var _=u(72552),w=u(40346),x=u(11331);s.exports=function isError(s){if(!w(s))return!1;var i=_(s);return\"[object Error]\"==i||\"[object DOMException]\"==i||\"string\"==typeof s.message&&\"string\"==typeof s.name&&!x(s)}},1882:(s,i,u)=>{var _=u(72552),w=u(23805);s.exports=function isFunction(s){if(!w(s))return!1;var i=_(s);return\"[object Function]\"==i||\"[object GeneratorFunction]\"==i||\"[object AsyncFunction]\"==i||\"[object Proxy]\"==i}},30294:s=>{s.exports=function isLength(s){return\"number\"==typeof s&&s>-1&&s%1==0&&s<=9007199254740991}},87730:(s,i,u)=>{var _=u(29172),w=u(27301),x=u(86009),j=x&&x.isMap,P=j?w(j):_;s.exports=P},5187:s=>{s.exports=function isNull(s){return null===s}},98023:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isNumber(s){return\"number\"==typeof s||w(s)&&\"[object Number]\"==_(s)}},23805:s=>{s.exports=function isObject(s){var i=typeof s;return null!=s&&(\"object\"==i||\"function\"==i)}},40346:s=>{s.exports=function isObjectLike(s){return null!=s&&\"object\"==typeof s}},11331:(s,i,u)=>{var _=u(72552),w=u(28879),x=u(40346),j=Function.prototype,P=Object.prototype,B=j.toString,$=P.hasOwnProperty,U=B.call(Object);s.exports=function isPlainObject(s){if(!x(s)||\"[object Object]\"!=_(s))return!1;var i=w(s);if(null===i)return!0;var u=$.call(i,\"constructor\")&&i.constructor;return\"function\"==typeof u&&u instanceof u&&B.call(u)==U}},38440:(s,i,u)=>{var _=u(16038),w=u(27301),x=u(86009),j=x&&x.isSet,P=j?w(j):_;s.exports=P},85015:(s,i,u)=>{var _=u(72552),w=u(56449),x=u(40346);s.exports=function isString(s){return\"string\"==typeof s||!w(s)&&x(s)&&\"[object String]\"==_(s)}},44394:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isSymbol(s){return\"symbol\"==typeof s||w(s)&&\"[object Symbol]\"==_(s)}},37167:(s,i,u)=>{var _=u(4901),w=u(27301),x=u(86009),j=x&&x.isTypedArray,P=j?w(j):_;s.exports=P},47886:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function isWeakMap(s){return w(s)&&\"[object WeakMap]\"==_(s)}},33855:(s,i,u)=>{var _=u(9999),w=u(15389);s.exports=function iteratee(s){return w(\"function\"==typeof s?s:_(s,1))}},95950:(s,i,u)=>{var _=u(70695),w=u(88984),x=u(64894);s.exports=function keys(s){return x(s)?_(s):w(s)}},37241:(s,i,u)=>{var _=u(70695),w=u(72903),x=u(64894);s.exports=function keysIn(s){return x(s)?_(s,!0):w(s)}},68090:s=>{s.exports=function last(s){var i=null==s?0:s.length;return i?s[i-1]:void 0}},50104:(s,i,u)=>{var _=u(53661);function memoize(s,i){if(\"function\"!=typeof s||null!=i&&\"function\"!=typeof i)throw new TypeError(\"Expected a function\");var memoized=function(){var u=arguments,_=i?i.apply(this,u):u[0],w=memoized.cache;if(w.has(_))return w.get(_);var x=s.apply(this,u);return memoized.cache=w.set(_,x)||w,x};return memoized.cache=new(memoize.Cache||_),memoized}memoize.Cache=_,s.exports=memoize},55364:(s,i,u)=>{var _=u(85250),w=u(20999)((function(s,i,u){_(s,i,u)}));s.exports=w},6048:s=>{s.exports=function negate(s){if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");return function(){var i=arguments;switch(i.length){case 0:return!s.call(this);case 1:return!s.call(this,i[0]);case 2:return!s.call(this,i[0],i[1]);case 3:return!s.call(this,i[0],i[1],i[2])}return!s.apply(this,i)}}},63950:s=>{s.exports=function noop(){}},10124:(s,i,u)=>{var _=u(9325);s.exports=function(){return _.Date.now()}},90179:(s,i,u)=>{var _=u(34932),w=u(9999),x=u(19931),j=u(31769),P=u(21791),B=u(53138),$=u(38816),U=u(83349),Y=$((function(s,i){var u={};if(null==s)return u;var $=!1;i=_(i,(function(i){return i=j(i,s),$||($=i.length>1),i})),P(s,U(s),u),$&&(u=w(u,7,B));for(var Y=i.length;Y--;)x(u,i[Y]);return u}));s.exports=Y},50583:(s,i,u)=>{var _=u(47237),w=u(17255),x=u(28586),j=u(77797);s.exports=function property(s){return x(s)?_(j(s)):w(s)}},84195:(s,i,u)=>{var _=u(66977),w=u(38816),x=w((function(s,i){return _(s,256,void 0,void 0,void 0,i)}));s.exports=x},40860:(s,i,u)=>{var _=u(40882),w=u(80909),x=u(15389),j=u(85558),P=u(56449);s.exports=function reduce(s,i,u){var B=P(s)?_:j,$=arguments.length<3;return B(s,x(i,4),u,$,w)}},63560:(s,i,u)=>{var _=u(73170);s.exports=function set(s,i,u){return null==s?s:_(s,i,u)}},42426:(s,i,u)=>{var _=u(14248),w=u(15389),x=u(90916),j=u(56449),P=u(36800);s.exports=function some(s,i,u){var B=j(s)?_:x;return u&&P(s,i,u)&&(i=void 0),B(s,w(i,3))}},63345:s=>{s.exports=function stubArray(){return[]}},89935:s=>{s.exports=function stubFalse(){return!1}},17400:(s,i,u)=>{var _=u(99374),w=1/0;s.exports=function toFinite(s){return s?(s=_(s))===w||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},61489:(s,i,u)=>{var _=u(17400);s.exports=function toInteger(s){var i=_(s),u=i%1;return i==i?u?i-u:i:0}},80218:(s,i,u)=>{var _=u(13222);s.exports=function toLower(s){return _(s).toLowerCase()}},99374:(s,i,u)=>{var _=u(54128),w=u(23805),x=u(44394),j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt;s.exports=function toNumber(s){if(\"number\"==typeof s)return s;if(x(s))return NaN;if(w(s)){var i=\"function\"==typeof s.valueOf?s.valueOf():s;s=w(i)?i+\"\":i}if(\"string\"!=typeof s)return 0===s?s:+s;s=_(s);var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?NaN:+s}},42072:(s,i,u)=>{var _=u(34932),w=u(23007),x=u(56449),j=u(44394),P=u(61802),B=u(77797),$=u(13222);s.exports=function toPath(s){return x(s)?_(s,B):j(s)?[s]:w(P($(s)))}},69884:(s,i,u)=>{var _=u(21791),w=u(37241);s.exports=function toPlainObject(s){return _(s,w(s))}},13222:(s,i,u)=>{var _=u(77556);s.exports=function toString(s){return null==s?\"\":_(s)}},55808:(s,i,u)=>{var _=u(12507)(\"toUpperCase\");s.exports=_},66645:(s,i,u)=>{var _=u(1733),w=u(45434),x=u(13222),j=u(22225);s.exports=function words(s,i,u){return s=x(s),void 0===(i=u?void 0:i)?w(s)?j(s):_(s):s.match(i)||[]}},53758:(s,i,u)=>{var _=u(30980),w=u(56017),x=u(94033),j=u(56449),P=u(40346),B=u(80257),$=Object.prototype.hasOwnProperty;function lodash(s){if(P(s)&&!j(s)&&!(s instanceof _)){if(s instanceof w)return s;if($.call(s,\"__wrapped__\"))return B(s)}return new w(s)}lodash.prototype=x.prototype,lodash.prototype.constructor=lodash,s.exports=lodash},47248:(s,i,u)=>{var _=u(16547),w=u(51234);s.exports=function zipObject(s,i){return w(s||[],i||[],_)}},43768:(s,i,u)=>{\"use strict\";var _=u(45981),w=u(85587);i.highlight=highlight,i.highlightAuto=function highlightAuto(s,i){var u,j,P,B,$=i||{},U=$.subset||_.listLanguages(),Y=$.prefix,X=U.length,Z=-1;null==Y&&(Y=x);if(\"string\"!=typeof s)throw w(\"Expected `string` for value, got `%s`\",s);j={relevance:0,language:null,value:[]},u={relevance:0,language:null,value:[]};for(;++Z<X;)B=U[Z],_.getLanguage(B)&&((P=highlight(B,s,i)).language=B,P.relevance>j.relevance&&(j=P),P.relevance>u.relevance&&(j=u,u=P));j.language&&(u.secondBest=j);return u},i.registerLanguage=function registerLanguage(s,i){_.registerLanguage(s,i)},i.listLanguages=function listLanguages(){return _.listLanguages()},i.registerAlias=function registerAlias(s,i){var u,w=s;i&&((w={})[s]=i);for(u in w)_.registerAliases(w[u],{languageName:u})},Emitter.prototype.addText=function text(s){var i,u,_=this.stack;if(\"\"===s)return;i=_[_.length-1],(u=i.children[i.children.length-1])&&\"text\"===u.type?u.value+=s:i.children.push({type:\"text\",value:s})},Emitter.prototype.addKeyword=function addKeyword(s,i){this.openNode(i),this.addText(s),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(s,i){var u=this.stack,_=u[u.length-1],w=s.rootNode.children,x=i?{type:\"element\",tagName:\"span\",properties:{className:[i]},children:w}:w;_.children=_.children.concat(x)},Emitter.prototype.openNode=function open(s){var i=this.stack,u=this.options.classPrefix+s,_=i[i.length-1],w={type:\"element\",tagName:\"span\",properties:{className:[u]},children:[]};_.children.push(w),i.push(w)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return\"\"};var x=\"hljs-\";function highlight(s,i,u){var j,P=_.configure({}),B=(u||{}).prefix;if(\"string\"!=typeof s)throw w(\"Expected `string` for name, got `%s`\",s);if(!_.getLanguage(s))throw w(\"Unknown language: `%s` is not registered\",s);if(\"string\"!=typeof i)throw w(\"Expected `string` for value, got `%s`\",i);if(null==B&&(B=x),_.configure({__emitter:Emitter,classPrefix:B}),j=_.highlight(i,{language:s,ignoreIllegals:!0}),_.configure(P||{}),j.errorRaised)throw j.errorRaised;return{relevance:j.relevance,language:j.language,value:j.emitter.rootNode.children}}function Emitter(s){this.options=s,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},92340:(s,i,u)=>{const _=u(6048);function coerceElementMatchingCallback(s){return\"string\"==typeof s?i=>i.element===s:s.constructor&&s.extend?i=>i instanceof s:s}class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return this.elements.map((s=>s.toValue()))}map(s,i){return this.elements.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(s,i))}reject(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(_(s),i))}find(s,i){return s=coerceElementMatchingCallback(s),this.elements.find(s,i)}forEach(s,i){this.elements.forEach(s,i)}reduce(s,i){return this.elements.reduce(s,i)}includes(s){return this.elements.some((i=>i.equals(s)))}shift(){return this.elements.shift()}unshift(s){this.elements.unshift(this.refract(s))}push(s){return this.elements.push(this.refract(s)),this}add(s){this.push(s)}get(s){return this.elements[s]}getValue(s){const i=this.elements[s];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}\"undefined\"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),s.exports=ArraySlice},55973:s=>{class KeyValuePair{constructor(s,i){this.key=s,this.value=i}clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clone()),this.value&&(s.value=this.value.clone()),s}}s.exports=KeyValuePair},3110:(s,i,u)=>{const _=u(5187),w=u(85015),x=u(98023),j=u(53812),P=u(23805),B=u(85105),$=u(86804);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=$.Element,this.KeyValuePair=$.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register(\"null\",$.NullElement).register(\"string\",$.StringElement).register(\"number\",$.NumberElement).register(\"boolean\",$.BooleanElement).register(\"array\",$.ArrayElement).register(\"object\",$.ObjectElement).register(\"member\",$.MemberElement).register(\"ref\",$.RefElement).register(\"link\",$.LinkElement),this.detect(_,$.NullElement,!1).detect(w,$.StringElement,!1).detect(x,$.NumberElement,!1).detect(j,$.BooleanElement,!1).detect(Array.isArray,$.ArrayElement,!1).detect(P,$.ObjectElement,!1),this}register(s,i){return this._elements=void 0,this.elementMap[s]=i,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,i,u){return void 0===u||u?this.elementDetection.unshift([s,i]):this.elementDetection.push([s,i]),this}toElement(s){if(s instanceof this.Element)return s;let i;for(let u=0;u<this.elementDetection.length;u+=1){const _=this.elementDetection[u][0],w=this.elementDetection[u][1];if(_(s)){i=new w(s);break}}return i}getElementClass(s){const i=this.elementMap[s];return void 0===i?this.Element:i}fromRefract(s){return this.serialiser.deserialise(s)}toRefract(s){return this.serialiser.serialise(s)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((s=>{const i=s[0].toUpperCase()+s.substr(1);this._elements[i]=this.elementMap[s]}))),this._elements}get serialiser(){return new B(this)}}B.prototype.Namespace=Namespace,s.exports=Namespace},10866:(s,i,u)=>{const _=u(6048),w=u(92340);class ObjectSlice extends w{map(s,i){return this.elements.map((u=>s.bind(i)(u.value,u.key,u)))}filter(s,i){return new ObjectSlice(this.elements.filter((u=>s.bind(i)(u.value,u.key,u))))}reject(s,i){return this.filter(_(s.bind(i)))}forEach(s,i){return this.elements.forEach(((u,_)=>{s.bind(i)(u.value,u.key,u,_)}))}keys(){return this.map(((s,i)=>i.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},86804:(s,i,u)=>{const _=u(10316),w=u(41067),x=u(71167),j=u(40239),P=u(12242),B=u(6233),$=u(87726),U=u(61045),Y=u(86303),X=u(14540),Z=u(92340),ee=u(10866),ie=u(55973);function refract(s){if(s instanceof _)return s;if(\"string\"==typeof s)return new x(s);if(\"number\"==typeof s)return new j(s);if(\"boolean\"==typeof s)return new P(s);if(null===s)return new w;if(Array.isArray(s))return new B(s.map(refract));if(\"object\"==typeof s){return new U(s)}return s}_.prototype.ObjectElement=U,_.prototype.RefElement=X,_.prototype.MemberElement=$,_.prototype.refract=refract,Z.prototype.refract=refract,s.exports={Element:_,NullElement:w,StringElement:x,NumberElement:j,BooleanElement:P,ArrayElement:B,MemberElement:$,ObjectElement:U,LinkElement:Y,RefElement:X,refract,ArraySlice:Z,ObjectSlice:ee,KeyValuePair:ie}},86303:(s,i,u)=>{const _=u(10316);s.exports=class LinkElement extends _{constructor(s,i,u){super(s||[],i,u),this.element=\"link\"}get relation(){return this.attributes.get(\"relation\")}set relation(s){this.attributes.set(\"relation\",s)}get href(){return this.attributes.get(\"href\")}set href(s){this.attributes.set(\"href\",s)}}},14540:(s,i,u)=>{const _=u(10316);s.exports=class RefElement extends _{constructor(s,i,u){super(s||[],i,u),this.element=\"ref\",this.path||(this.path=\"element\")}get path(){return this.attributes.get(\"path\")}set path(s){this.attributes.set(\"path\",s)}}},34035:(s,i,u)=>{const _=u(3110),w=u(86804);i.g$=_,i.KeyValuePair=u(55973),i.G6=w.ArraySlice,i.ot=w.ObjectSlice,i.Hg=w.Element,i.Om=w.StringElement,i.kT=w.NumberElement,i.bd=w.BooleanElement,i.Os=w.NullElement,i.wE=w.ArrayElement,i.Sh=w.ObjectElement,i.Pr=w.MemberElement,i.sI=w.RefElement,i.Ft=w.LinkElement,i.e=w.refract,u(85105),u(75147)},6233:(s,i,u)=>{const _=u(6048),w=u(10316),x=u(92340);class ArrayElement extends w{constructor(s,i,u){super(s||[],i,u),this.element=\"array\"}primitive(){return\"array\"}get(s){return this.content[s]}getValue(s){const i=this.get(s);if(i)return i.toValue()}getIndex(s){return this.content[s]}set(s,i){return this.content[s]=this.refract(i),this}remove(s){const i=this.content.splice(s,1);return i.length?i[0]:null}map(s,i){return this.content.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return new x(this.content.filter(s,i))}reject(s,i){return this.filter(_(s),i)}reduce(s,i){let u,_;void 0!==i?(u=0,_=this.refract(i)):(u=1,_=\"object\"===this.primitive()?this.first.value:this.first);for(let i=u;i<this.length;i+=1){const u=this.content[i];_=\"object\"===this.primitive()?this.refract(s(_,u.value,u.key,u,this)):this.refract(s(_,u,i,this))}return _}forEach(s,i){this.content.forEach(((u,_)=>{s.bind(i)(u,this.refract(_))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,i){const u=i||{},_=!!u.recursive,w=void 0===u.results?[]:u.results;return this.forEach(((i,u,x)=>{_&&void 0!==i.findElements&&i.findElements(s,{results:w,recursive:_}),s(i,u,x)&&w.push(i)})),w}find(s){return new x(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((i=>i.element===s))}findByClass(s){return this.find((i=>i.classes.includes(s)))}getById(s){return this.find((i=>i.id.toValue()===s)).first}includes(s){return this.content.some((i=>i.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}\"fantasy-land/empty\"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}\"fantasy-land/concat\"(s){return this.concat(s)}\"fantasy-land/map\"(s){return new this.constructor(this.map(s))}\"fantasy-land/chain\"(s){return this.map((i=>s(i)),this).reduce(((s,i)=>s.concat(i)),this.empty())}\"fantasy-land/filter\"(s){return new this.constructor(this.content.filter(s))}\"fantasy-land/reduce\"(s,i){return this.content.reduce(s,i)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement[\"fantasy-land/empty\"]=ArrayElement.empty,\"undefined\"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},12242:(s,i,u)=>{const _=u(10316);s.exports=class BooleanElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"boolean\"}primitive(){return\"boolean\"}}},10316:(s,i,u)=>{const _=u(2404),w=u(55973),x=u(92340);class Element{constructor(s,i,u){i&&(this.meta=i),u&&(this.attributes=u),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(\"\"===this.id.toValue())throw Error(\"Cannot create reference to an element that does not contain an ID\");const i=new this.RefElement(this.id.toValue());return s&&(i.path=s),i}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error(\"Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`\");const i=s.pop();let u=new x;const append=(s,i)=>(s.push(i),s),checkElement=(s,u)=>{u.element===i&&s.push(u);const _=u.findRecursive(i);return _&&_.reduce(append,s),u.content instanceof w&&(u.content.key&&checkElement(s,u.content.key),u.content.value&&checkElement(s,u.content.value)),s};return this.content&&(this.content.element&&checkElement(u,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,u)),s.isEmpty||(u=u.filter((i=>{let u=i.parents.map((s=>s.element));for(const i in s){const _=s[i],w=u.indexOf(_);if(-1===w)return!1;u=u.splice(0,w)}return!0}))),u}set(s){return this.content=s,this}equals(s){return _(this.toValue(),s)}getMetaProperty(s,i){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(i);return s.freeze(),s}this.meta.set(s,i)}return this.meta.get(s)}setMetaProperty(s,i){this.meta.set(s,i)}get element(){return this._storedElement||\"element\"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof x)this.content=s.elements;else if(\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"null\"===s||null==s)this._content=s;else if(s instanceof w)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if(\"object\"!=typeof s)throw new Error(\"Cannot set content to given value\");this._content=Object.keys(s).map((i=>new this.MemberElement(i,s[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty(\"id\",\"\")}set id(s){this.setMetaProperty(\"id\",s)}get classes(){return this.getMetaProperty(\"classes\",[])}set classes(s){this.setMetaProperty(\"classes\",s)}get title(){return this.getMetaProperty(\"title\",\"\")}set title(s){this.setMetaProperty(\"title\",s)}get description(){return this.getMetaProperty(\"description\",\"\")}set description(s){this.setMetaProperty(\"description\",s)}get links(){return this.getMetaProperty(\"links\",[])}set links(s){this.setMetaProperty(\"links\",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const i=new x;for(;s;)i.push(s),s=s.parent;return i}get children(){if(Array.isArray(this.content))return new x(this.content);if(this.content instanceof w){const s=new x([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new x([this.content]):new x}get recursiveChildren(){const s=new x;return this.children.forEach((i=>{s.push(i),i.recursiveChildren.forEach((i=>{s.push(i)}))})),s}}s.exports=Element},87726:(s,i,u)=>{const _=u(55973),w=u(10316);s.exports=class MemberElement extends w{constructor(s,i,u,w){super(new _,u,w),this.element=\"member\",this.key=s,this.value=i}get key(){return this.content.key}set key(s){this.content.key=this.refract(s)}get value(){return this.content.value}set value(s){this.content.value=this.refract(s)}}},41067:(s,i,u)=>{const _=u(10316);s.exports=class NullElement extends _{constructor(s,i,u){super(s||null,i,u),this.element=\"null\"}primitive(){return\"null\"}set(){return new Error(\"Cannot set the value of null\")}}},40239:(s,i,u)=>{const _=u(10316);s.exports=class NumberElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"number\"}primitive(){return\"number\"}}},61045:(s,i,u)=>{const _=u(6048),w=u(23805),x=u(6233),j=u(87726),P=u(10866);s.exports=class ObjectElement extends x{constructor(s,i,u){super(s||[],i,u),this.element=\"object\"}primitive(){return\"object\"}toValue(){return this.content.reduce(((s,i)=>(s[i.key.toValue()]=i.value?i.value.toValue():void 0,s)),{})}get(s){const i=this.getMember(s);if(i)return i.value}getMember(s){if(void 0!==s)return this.content.find((i=>i.key.toValue()===s))}remove(s){let i=null;return this.content=this.content.filter((u=>u.key.toValue()!==s||(i=u,!1))),i}getKey(s){const i=this.getMember(s);if(i)return i.key}set(s,i){if(w(s))return Object.keys(s).forEach((i=>{this.set(i,s[i])})),this;const u=s,_=this.getMember(u);return _?_.value=i:this.content.push(new j(u,i)),this}keys(){return this.content.map((s=>s.key.toValue()))}values(){return this.content.map((s=>s.value.toValue()))}hasKey(s){return this.content.some((i=>i.key.equals(s)))}items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}map(s,i){return this.content.map((u=>s.bind(i)(u.value,u.key,u)))}compactMap(s,i){const u=[];return this.forEach(((_,w,x)=>{const j=s.bind(i)(_,w,x);j&&u.push(j)})),u}filter(s,i){return new P(this.content).filter(s,i)}reject(s,i){return this.filter(_(s),i)}forEach(s,i){return this.content.forEach((u=>s.bind(i)(u.value,u.key,u)))}}},71167:(s,i,u)=>{const _=u(10316);s.exports=class StringElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"string\"}primitive(){return\"string\"}get length(){return this.content.length}}},75147:(s,i,u)=>{const _=u(85105);s.exports=class JSON06Serialiser extends _{serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);let i;s._attributes&&s.attributes.get(\"variable\")&&(i=s.attributes.get(\"variable\"));const u={element:s.element};s._meta&&s._meta.length>0&&(u.meta=this.serialiseObject(s.meta));const _=\"enum\"===s.element||-1!==s.attributes.keys().indexOf(\"enumerations\");if(_){const i=this.enumSerialiseAttributes(s);i&&(u.attributes=i)}else if(s._attributes&&s._attributes.length>0){let{attributes:_}=s;_.get(\"metadata\")&&(_=_.clone(),_.set(\"meta\",_.get(\"metadata\")),_.remove(\"metadata\")),\"member\"===s.element&&i&&(_=_.clone(),_.remove(\"variable\")),_.length>0&&(u.attributes=this.serialiseObject(_))}if(_)u.content=this.enumSerialiseContent(s,u);else if(this[`${s.element}SerialiseContent`])u.content=this[`${s.element}SerialiseContent`](s,u);else if(void 0!==s.content){let _;i&&s.content.key?(_=s.content.clone(),_.key.attributes.set(\"variable\",i),_=this.serialiseContent(_)):_=this.serialiseContent(s.content),this.shouldSerialiseContent(s,_)&&(u.content=_)}else this.shouldSerialiseContent(s,s.content)&&s instanceof this.namespace.elements.Array&&(u.content=[]);return u}shouldSerialiseContent(s,i){return\"parseResult\"===s.element||\"httpRequest\"===s.element||\"httpResponse\"===s.element||\"category\"===s.element||\"link\"===s.element||void 0!==i&&(!Array.isArray(i)||0!==i.length)}refSerialiseContent(s,i){return delete i.attributes,{href:s.toValue(),path:s.path.toValue()}}sourceMapSerialiseContent(s){return s.toValue()}dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}enumSerialiseAttributes(s){const i=s.attributes.clone(),u=i.remove(\"enumerations\")||new this.namespace.elements.Array([]),_=i.get(\"default\");let w=i.get(\"samples\")||new this.namespace.elements.Array([]);if(_&&_.content&&(_.content.attributes&&_.content.attributes.remove(\"typeAttributes\"),i.set(\"default\",new this.namespace.elements.Array([_.content]))),w.forEach((s=>{s.content&&s.content.element&&s.content.attributes.remove(\"typeAttributes\")})),s.content&&0!==u.length&&w.unshift(s.content),w=w.map((s=>s instanceof this.namespace.elements.Array?[s]:new this.namespace.elements.Array([s.content]))),w.length&&i.set(\"samples\",w),i.length>0)return this.serialiseObject(i)}enumSerialiseContent(s){if(s._attributes){const i=s.attributes.get(\"enumerations\");if(i&&i.length>0)return i.content.map((s=>{const i=s.clone();return i.attributes.remove(\"typeAttributes\"),this.serialise(i)}))}if(s.content){const i=s.content.clone();return i.attributes.remove(\"typeAttributes\"),[this.serialise(i)]}return[]}deserialise(s){if(\"string\"==typeof s)return new this.namespace.elements.String(s);if(\"number\"==typeof s)return new this.namespace.elements.Number(s);if(\"boolean\"==typeof s)return new this.namespace.elements.Boolean(s);if(null===s)return new this.namespace.elements.Null;if(Array.isArray(s))return new this.namespace.elements.Array(s.map(this.deserialise,this));const i=this.namespace.getElementClass(s.element),u=new i;u.element!==s.element&&(u.element=s.element),s.meta&&this.deserialiseObject(s.meta,u.meta),s.attributes&&this.deserialiseObject(s.attributes,u.attributes);const _=this.deserialiseContent(s.content);if(void 0===_&&null!==u.content||(u.content=_),\"enum\"===u.element){u.content&&u.attributes.set(\"enumerations\",u.content);let s=u.attributes.get(\"samples\");if(u.attributes.remove(\"samples\"),s){const _=s;s=new this.namespace.elements.Array,_.forEach((_=>{_.forEach((_=>{const w=new i(_);w.element=u.element,s.push(w)}))}));const w=s.shift();u.content=w?w.content:void 0,u.attributes.set(\"samples\",s)}else u.content=void 0;let _=u.attributes.get(\"default\");if(_&&_.length>0){_=_.get(0);const s=new i(_);s.element=u.element,u.attributes.set(\"default\",s)}}else if(\"dataStructure\"===u.element&&Array.isArray(u.content))[u.content]=u.content;else if(\"category\"===u.element){const s=u.attributes.get(\"meta\");s&&(u.attributes.set(\"metadata\",s),u.attributes.remove(\"meta\"))}else\"member\"===u.element&&u.key&&u.key._attributes&&u.key._attributes.getValue(\"variable\")&&(u.attributes.set(\"variable\",u.key.attributes.get(\"variable\")),u.key.attributes.remove(\"variable\"));return u}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}return s&&s.map?s.map(this.serialise,this):s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._meta&&s.meta.keys().length)||\"enum\"!==s.element&&(s.element!==s.primitive()||\"member\"===s.element)}convertKeyToRefract(s,i){return this.shouldRefract(i)?this.serialise(i):\"enum\"===i.element?this.serialiseEnum(i):\"array\"===i.element?i.map((i=>this.shouldRefract(i)||\"default\"===s?this.serialise(i):\"array\"===i.element||\"object\"===i.element||\"enum\"===i.element?i.children.map((s=>this.serialise(s))):i.toValue())):\"object\"===i.element?(i.content||[]).map(this.serialise,this):i.toValue()}serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}serialiseObject(s){const i={};return s.forEach(((s,u)=>{if(s){const _=u.toValue();i[_]=this.convertKeyToRefract(_,s)}})),i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},85105:s=>{s.exports=class JSONSerialiser{constructor(s){this.namespace=s||new this.Namespace}serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);const i={element:s.element};s._meta&&s._meta.length>0&&(i.meta=this.serialiseObject(s.meta)),s._attributes&&s._attributes.length>0&&(i.attributes=this.serialiseObject(s.attributes));const u=this.serialiseContent(s.content);return void 0!==u&&(i.content=u),i}deserialise(s){if(!s.element)throw new Error(\"Given value is not an object containing an element name\");const i=new(this.namespace.getElementClass(s.element));i.element!==s.element&&(i.element=s.element),s.meta&&this.deserialiseObject(s.meta,i.meta),s.attributes&&this.deserialiseObject(s.attributes,i.attributes);const u=this.deserialiseContent(s.content);return void 0===u&&null!==i.content||(i.content=u),i}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}if(s&&s.map){if(0===s.length)return;return s.map(this.serialise,this)}return s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}serialiseObject(s){const i={};if(s.forEach(((s,u)=>{s&&(i[u.toValue()]=this.serialise(s))})),0!==Object.keys(i).length)return i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},58859:(s,i,u)=>{var _=\"function\"==typeof Map&&Map.prototype,w=Object.getOwnPropertyDescriptor&&_?Object.getOwnPropertyDescriptor(Map.prototype,\"size\"):null,x=_&&w&&\"function\"==typeof w.get?w.get:null,j=_&&Map.prototype.forEach,P=\"function\"==typeof Set&&Set.prototype,B=Object.getOwnPropertyDescriptor&&P?Object.getOwnPropertyDescriptor(Set.prototype,\"size\"):null,$=P&&B&&\"function\"==typeof B.get?B.get:null,U=P&&Set.prototype.forEach,Y=\"function\"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,X=\"function\"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Z=\"function\"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,ie=Object.prototype.toString,ae=Function.prototype.toString,le=String.prototype.match,ce=String.prototype.slice,pe=String.prototype.replace,de=String.prototype.toUpperCase,fe=String.prototype.toLowerCase,ye=RegExp.prototype.test,be=Array.prototype.concat,_e=Array.prototype.join,we=Array.prototype.slice,Se=Math.floor,xe=\"function\"==typeof BigInt?BigInt.prototype.valueOf:null,Pe=Object.getOwnPropertySymbols,Te=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?Symbol.prototype.toString:null,Re=\"function\"==typeof Symbol&&\"object\"==typeof Symbol.iterator,qe=\"function\"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Re||\"symbol\")?Symbol.toStringTag:null,$e=Object.prototype.propertyIsEnumerable,ze=(\"function\"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function addNumericSeparator(s,i){if(s===1/0||s===-1/0||s!=s||s&&s>-1e3&&s<1e3||ye.call(/e/,i))return i;var u=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(\"number\"==typeof s){var _=s<0?-Se(-s):Se(s);if(_!==s){var w=String(_),x=ce.call(i,w.length+1);return pe.call(w,u,\"$&_\")+\".\"+pe.call(pe.call(x,/([0-9]{3})/g,\"$&_\"),/_$/,\"\")}}return pe.call(i,u,\"$&_\")}var We=u(42634),He=We.custom,Ye=isSymbol(He)?He:null;function wrapQuotes(s,i,u){var _=\"double\"===(u.quoteStyle||i)?'\"':\"'\";return _+s+_}function quote(s){return pe.call(String(s),/\"/g,\"&quot;\")}function isArray(s){return!(\"[object Array]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}function isRegExp(s){return!(\"[object RegExp]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}function isSymbol(s){if(Re)return s&&\"object\"==typeof s&&s instanceof Symbol;if(\"symbol\"==typeof s)return!0;if(!s||\"object\"!=typeof s||!Te)return!1;try{return Te.call(s),!0}catch(s){}return!1}s.exports=function inspect_(s,i,_,w){var P=i||{};if(has(P,\"quoteStyle\")&&\"single\"!==P.quoteStyle&&\"double\"!==P.quoteStyle)throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');if(has(P,\"maxStringLength\")&&(\"number\"==typeof P.maxStringLength?P.maxStringLength<0&&P.maxStringLength!==1/0:null!==P.maxStringLength))throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');var B=!has(P,\"customInspect\")||P.customInspect;if(\"boolean\"!=typeof B&&\"symbol\"!==B)throw new TypeError(\"option \\\"customInspect\\\", if provided, must be `true`, `false`, or `'symbol'`\");if(has(P,\"indent\")&&null!==P.indent&&\"\\t\"!==P.indent&&!(parseInt(P.indent,10)===P.indent&&P.indent>0))throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');if(has(P,\"numericSeparator\")&&\"boolean\"!=typeof P.numericSeparator)throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');var ie=P.numericSeparator;if(void 0===s)return\"undefined\";if(null===s)return\"null\";if(\"boolean\"==typeof s)return s?\"true\":\"false\";if(\"string\"==typeof s)return inspectString(s,P);if(\"number\"==typeof s){if(0===s)return 1/0/s>0?\"0\":\"-0\";var de=String(s);return ie?addNumericSeparator(s,de):de}if(\"bigint\"==typeof s){var ye=String(s)+\"n\";return ie?addNumericSeparator(s,ye):ye}var Se=void 0===P.depth?5:P.depth;if(void 0===_&&(_=0),_>=Se&&Se>0&&\"object\"==typeof s)return isArray(s)?\"[Array]\":\"[Object]\";var Pe=function getIndent(s,i){var u;if(\"\\t\"===s.indent)u=\"\\t\";else{if(!(\"number\"==typeof s.indent&&s.indent>0))return null;u=_e.call(Array(s.indent+1),\" \")}return{base:u,prev:_e.call(Array(i+1),u)}}(P,_);if(void 0===w)w=[];else if(indexOf(w,s)>=0)return\"[Circular]\";function inspect(s,i,u){if(i&&(w=we.call(w)).push(i),u){var x={depth:P.depth};return has(P,\"quoteStyle\")&&(x.quoteStyle=P.quoteStyle),inspect_(s,x,_+1,w)}return inspect_(s,P,_+1,w)}if(\"function\"==typeof s&&!isRegExp(s)){var He=function nameOf(s){if(s.name)return s.name;var i=le.call(ae.call(s),/^function\\s*([\\w$]+)/);if(i)return i[1];return null}(s),Xe=arrObjKeys(s,inspect);return\"[Function\"+(He?\": \"+He:\" (anonymous)\")+\"]\"+(Xe.length>0?\" { \"+_e.call(Xe,\", \")+\" }\":\"\")}if(isSymbol(s)){var Qe=Re?pe.call(String(s),/^(Symbol\\(.*\\))_[^)]*$/,\"$1\"):Te.call(s);return\"object\"!=typeof s||Re?Qe:markBoxed(Qe)}if(function isElement(s){if(!s||\"object\"!=typeof s)return!1;if(\"undefined\"!=typeof HTMLElement&&s instanceof HTMLElement)return!0;return\"string\"==typeof s.nodeName&&\"function\"==typeof s.getAttribute}(s)){for(var et=\"<\"+fe.call(String(s.nodeName)),tt=s.attributes||[],rt=0;rt<tt.length;rt++)et+=\" \"+tt[rt].name+\"=\"+wrapQuotes(quote(tt[rt].value),\"double\",P);return et+=\">\",s.childNodes&&s.childNodes.length&&(et+=\"...\"),et+=\"</\"+fe.call(String(s.nodeName))+\">\"}if(isArray(s)){if(0===s.length)return\"[]\";var nt=arrObjKeys(s,inspect);return Pe&&!function singleLineValues(s){for(var i=0;i<s.length;i++)if(indexOf(s[i],\"\\n\")>=0)return!1;return!0}(nt)?\"[\"+indentedJoin(nt,Pe)+\"]\":\"[ \"+_e.call(nt,\", \")+\" ]\"}if(function isError(s){return!(\"[object Error]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s)){var ot=arrObjKeys(s,inspect);return\"cause\"in Error.prototype||!(\"cause\"in s)||$e.call(s,\"cause\")?0===ot.length?\"[\"+String(s)+\"]\":\"{ [\"+String(s)+\"] \"+_e.call(ot,\", \")+\" }\":\"{ [\"+String(s)+\"] \"+_e.call(be.call(\"[cause]: \"+inspect(s.cause),ot),\", \")+\" }\"}if(\"object\"==typeof s&&B){if(Ye&&\"function\"==typeof s[Ye]&&We)return We(s,{depth:Se-_});if(\"symbol\"!==B&&\"function\"==typeof s.inspect)return s.inspect()}if(function isMap(s){if(!x||!s||\"object\"!=typeof s)return!1;try{x.call(s);try{$.call(s)}catch(s){return!0}return s instanceof Map}catch(s){}return!1}(s)){var st=[];return j&&j.call(s,(function(i,u){st.push(inspect(u,s,!0)+\" => \"+inspect(i,s))})),collectionOf(\"Map\",x.call(s),st,Pe)}if(function isSet(s){if(!$||!s||\"object\"!=typeof s)return!1;try{$.call(s);try{x.call(s)}catch(s){return!0}return s instanceof Set}catch(s){}return!1}(s)){var it=[];return U&&U.call(s,(function(i){it.push(inspect(i,s))})),collectionOf(\"Set\",$.call(s),it,Pe)}if(function isWeakMap(s){if(!Y||!s||\"object\"!=typeof s)return!1;try{Y.call(s,Y);try{X.call(s,X)}catch(s){return!0}return s instanceof WeakMap}catch(s){}return!1}(s))return weakCollectionOf(\"WeakMap\");if(function isWeakSet(s){if(!X||!s||\"object\"!=typeof s)return!1;try{X.call(s,X);try{Y.call(s,Y)}catch(s){return!0}return s instanceof WeakSet}catch(s){}return!1}(s))return weakCollectionOf(\"WeakSet\");if(function isWeakRef(s){if(!Z||!s||\"object\"!=typeof s)return!1;try{return Z.call(s),!0}catch(s){}return!1}(s))return weakCollectionOf(\"WeakRef\");if(function isNumber(s){return!(\"[object Number]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(inspect(Number(s)));if(function isBigInt(s){if(!s||\"object\"!=typeof s||!xe)return!1;try{return xe.call(s),!0}catch(s){}return!1}(s))return markBoxed(inspect(xe.call(s)));if(function isBoolean(s){return!(\"[object Boolean]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(ee.call(s));if(function isString(s){return!(\"[object String]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(inspect(String(s)));if(\"undefined\"!=typeof window&&s===window)return\"{ [object Window] }\";if(s===u.g)return\"{ [object globalThis] }\";if(!function isDate(s){return!(\"[object Date]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s)&&!isRegExp(s)){var at=arrObjKeys(s,inspect),lt=ze?ze(s)===Object.prototype:s instanceof Object||s.constructor===Object,ct=s instanceof Object?\"\":\"null prototype\",ut=!lt&&qe&&Object(s)===s&&qe in s?ce.call(toStr(s),8,-1):ct?\"Object\":\"\",pt=(lt||\"function\"!=typeof s.constructor?\"\":s.constructor.name?s.constructor.name+\" \":\"\")+(ut||ct?\"[\"+_e.call(be.call([],ut||[],ct||[]),\": \")+\"] \":\"\");return 0===at.length?pt+\"{}\":Pe?pt+\"{\"+indentedJoin(at,Pe)+\"}\":pt+\"{ \"+_e.call(at,\", \")+\" }\"}return String(s)};var Xe=Object.prototype.hasOwnProperty||function(s){return s in this};function has(s,i){return Xe.call(s,i)}function toStr(s){return ie.call(s)}function indexOf(s,i){if(s.indexOf)return s.indexOf(i);for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}function inspectString(s,i){if(s.length>i.maxStringLength){var u=s.length-i.maxStringLength,_=\"... \"+u+\" more character\"+(u>1?\"s\":\"\");return inspectString(ce.call(s,0,i.maxStringLength),i)+_}return wrapQuotes(pe.call(pe.call(s,/(['\\\\])/g,\"\\\\$1\"),/[\\x00-\\x1f]/g,lowbyte),\"single\",i)}function lowbyte(s){var i=s.charCodeAt(0),u={8:\"b\",9:\"t\",10:\"n\",12:\"f\",13:\"r\"}[i];return u?\"\\\\\"+u:\"\\\\x\"+(i<16?\"0\":\"\")+de.call(i.toString(16))}function markBoxed(s){return\"Object(\"+s+\")\"}function weakCollectionOf(s){return s+\" { ? }\"}function collectionOf(s,i,u,_){return s+\" (\"+i+\") {\"+(_?indentedJoin(u,_):_e.call(u,\", \"))+\"}\"}function indentedJoin(s,i){if(0===s.length)return\"\";var u=\"\\n\"+i.prev+i.base;return u+_e.call(s,\",\"+u)+\"\\n\"+i.prev}function arrObjKeys(s,i){var u=isArray(s),_=[];if(u){_.length=s.length;for(var w=0;w<s.length;w++)_[w]=has(s,w)?i(s[w],s):\"\"}var x,j=\"function\"==typeof Pe?Pe(s):[];if(Re){x={};for(var P=0;P<j.length;P++)x[\"$\"+j[P]]=j[P]}for(var B in s)has(s,B)&&(u&&String(Number(B))===B&&B<s.length||Re&&x[\"$\"+B]instanceof Symbol||(ye.call(/[^\\w$]/,B)?_.push(i(B,s)+\": \"+i(s[B],s)):_.push(B+\": \"+i(s[B],s))));if(\"function\"==typeof Pe)for(var $=0;$<j.length;$++)$e.call(s,j[$])&&_.push(\"[\"+i(j[$])+\"]: \"+i(s[j[$]],s));return _}},65606:s=>{var i,u,_=s.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(s){if(i===setTimeout)return setTimeout(s,0);if((i===defaultSetTimout||!i)&&setTimeout)return i=setTimeout,setTimeout(s,0);try{return i(s,0)}catch(u){try{return i.call(null,s,0)}catch(u){return i.call(this,s,0)}}}!function(){try{i=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(s){i=defaultSetTimout}try{u=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(s){u=defaultClearTimeout}}();var w,x=[],j=!1,P=-1;function cleanUpNextTick(){j&&w&&(j=!1,w.length?x=w.concat(x):P=-1,x.length&&drainQueue())}function drainQueue(){if(!j){var s=runTimeout(cleanUpNextTick);j=!0;for(var i=x.length;i;){for(w=x,x=[];++P<i;)w&&w[P].run();P=-1,i=x.length}w=null,j=!1,function runClearTimeout(s){if(u===clearTimeout)return clearTimeout(s);if((u===defaultClearTimeout||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(s);try{return u(s)}catch(i){try{return u.call(null,s)}catch(i){return u.call(this,s)}}}(s)}}function Item(s,i){this.fun=s,this.array=i}function noop(){}_.nextTick=function(s){var i=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)i[u-1]=arguments[u];x.push(new Item(s,i)),1!==x.length||j||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},_.title=\"browser\",_.browser=!0,_.env={},_.argv=[],_.version=\"\",_.versions={},_.on=noop,_.addListener=noop,_.once=noop,_.off=noop,_.removeListener=noop,_.removeAllListeners=noop,_.emit=noop,_.prependListener=noop,_.prependOnceListener=noop,_.listeners=function(s){return[]},_.binding=function(s){throw new Error(\"process.binding is not supported\")},_.cwd=function(){return\"/\"},_.chdir=function(s){throw new Error(\"process.chdir is not supported\")},_.umask=function(){return 0}},2694:(s,i,u)=>{\"use strict\";var _=u(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,i,u,w,x,j){if(j!==_){var P=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw P.name=\"Invariant Violation\",P}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},5556:(s,i,u)=>{s.exports=u(2694)()},6925:s=>{\"use strict\";s.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},74765:s=>{\"use strict\";var i=String.prototype.replace,u=/%20/g,_=\"RFC1738\",w=\"RFC3986\";s.exports={default:w,formatters:{RFC1738:function(s){return i.call(s,u,\"+\")},RFC3986:function(s){return String(s)}},RFC1738:_,RFC3986:w}},55373:(s,i,u)=>{\"use strict\";var _=u(98636),w=u(62642),x=u(74765);s.exports={formats:x,parse:w,stringify:_}},62642:(s,i,u)=>{\"use strict\";var _=u(37720),w=Object.prototype.hasOwnProperty,x=Array.isArray,j={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:\"utf-8\",charsetSentinel:!1,comma:!1,decoder:_.decode,delimiter:\"&\",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(s){return s.replace(/&#(\\d+);/g,(function(s,i){return String.fromCharCode(parseInt(i,10))}))},parseArrayValue=function(s,i){return s&&\"string\"==typeof s&&i.comma&&s.indexOf(\",\")>-1?s.split(\",\"):s},P=function parseQueryStringKeys(s,i,u,_){if(s){var x=u.allowDots?s.replace(/\\.([^.[]+)/g,\"[$1]\"):s,j=/(\\[[^[\\]]*])/g,P=u.depth>0&&/(\\[[^[\\]]*])/.exec(x),B=P?x.slice(0,P.index):x,$=[];if(B){if(!u.plainObjects&&w.call(Object.prototype,B)&&!u.allowPrototypes)return;$.push(B)}for(var U=0;u.depth>0&&null!==(P=j.exec(x))&&U<u.depth;){if(U+=1,!u.plainObjects&&w.call(Object.prototype,P[1].slice(1,-1))&&!u.allowPrototypes)return;$.push(P[1])}return P&&$.push(\"[\"+x.slice(P.index)+\"]\"),function(s,i,u,_){for(var w=_?i:parseArrayValue(i,u),x=s.length-1;x>=0;--x){var j,P=s[x];if(\"[]\"===P&&u.parseArrays)j=[].concat(w);else{j=u.plainObjects?Object.create(null):{};var B=\"[\"===P.charAt(0)&&\"]\"===P.charAt(P.length-1)?P.slice(1,-1):P,$=parseInt(B,10);u.parseArrays||\"\"!==B?!isNaN($)&&P!==B&&String($)===B&&$>=0&&u.parseArrays&&$<=u.arrayLimit?(j=[])[$]=w:\"__proto__\"!==B&&(j[B]=w):j={0:w}}w=j}return w}($,i,u,_)}};s.exports=function(s,i){var u=function normalizeParseOptions(s){if(!s)return j;if(null!==s.decoder&&void 0!==s.decoder&&\"function\"!=typeof s.decoder)throw new TypeError(\"Decoder has to be a function.\");if(void 0!==s.charset&&\"utf-8\"!==s.charset&&\"iso-8859-1\"!==s.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var i=void 0===s.charset?j.charset:s.charset;return{allowDots:void 0===s.allowDots?j.allowDots:!!s.allowDots,allowPrototypes:\"boolean\"==typeof s.allowPrototypes?s.allowPrototypes:j.allowPrototypes,allowSparse:\"boolean\"==typeof s.allowSparse?s.allowSparse:j.allowSparse,arrayLimit:\"number\"==typeof s.arrayLimit?s.arrayLimit:j.arrayLimit,charset:i,charsetSentinel:\"boolean\"==typeof s.charsetSentinel?s.charsetSentinel:j.charsetSentinel,comma:\"boolean\"==typeof s.comma?s.comma:j.comma,decoder:\"function\"==typeof s.decoder?s.decoder:j.decoder,delimiter:\"string\"==typeof s.delimiter||_.isRegExp(s.delimiter)?s.delimiter:j.delimiter,depth:\"number\"==typeof s.depth||!1===s.depth?+s.depth:j.depth,ignoreQueryPrefix:!0===s.ignoreQueryPrefix,interpretNumericEntities:\"boolean\"==typeof s.interpretNumericEntities?s.interpretNumericEntities:j.interpretNumericEntities,parameterLimit:\"number\"==typeof s.parameterLimit?s.parameterLimit:j.parameterLimit,parseArrays:!1!==s.parseArrays,plainObjects:\"boolean\"==typeof s.plainObjects?s.plainObjects:j.plainObjects,strictNullHandling:\"boolean\"==typeof s.strictNullHandling?s.strictNullHandling:j.strictNullHandling}}(i);if(\"\"===s||null==s)return u.plainObjects?Object.create(null):{};for(var B=\"string\"==typeof s?function parseQueryStringValues(s,i){var u,P={},B=i.ignoreQueryPrefix?s.replace(/^\\?/,\"\"):s,$=i.parameterLimit===1/0?void 0:i.parameterLimit,U=B.split(i.delimiter,$),Y=-1,X=i.charset;if(i.charsetSentinel)for(u=0;u<U.length;++u)0===U[u].indexOf(\"utf8=\")&&(\"utf8=%E2%9C%93\"===U[u]?X=\"utf-8\":\"utf8=%26%2310003%3B\"===U[u]&&(X=\"iso-8859-1\"),Y=u,u=U.length);for(u=0;u<U.length;++u)if(u!==Y){var Z,ee,ie=U[u],ae=ie.indexOf(\"]=\"),le=-1===ae?ie.indexOf(\"=\"):ae+1;-1===le?(Z=i.decoder(ie,j.decoder,X,\"key\"),ee=i.strictNullHandling?null:\"\"):(Z=i.decoder(ie.slice(0,le),j.decoder,X,\"key\"),ee=_.maybeMap(parseArrayValue(ie.slice(le+1),i),(function(s){return i.decoder(s,j.decoder,X,\"value\")}))),ee&&i.interpretNumericEntities&&\"iso-8859-1\"===X&&(ee=interpretNumericEntities(ee)),ie.indexOf(\"[]=\")>-1&&(ee=x(ee)?[ee]:ee),w.call(P,Z)?P[Z]=_.combine(P[Z],ee):P[Z]=ee}return P}(s,u):s,$=u.plainObjects?Object.create(null):{},U=Object.keys(B),Y=0;Y<U.length;++Y){var X=U[Y],Z=P(X,B[X],u,\"string\"==typeof s);$=_.merge($,Z,u)}return!0===u.allowSparse?$:_.compact($)}},98636:(s,i,u)=>{\"use strict\";var _=u(920),w=u(37720),x=u(74765),j=Object.prototype.hasOwnProperty,P={brackets:function brackets(s){return s+\"[]\"},comma:\"comma\",indices:function indices(s,i){return s+\"[\"+i+\"]\"},repeat:function repeat(s){return s}},B=Array.isArray,$=String.prototype.split,U=Array.prototype.push,pushToArray=function(s,i){U.apply(s,B(i)?i:[i])},Y=Date.prototype.toISOString,X=x.default,Z={addQueryPrefix:!1,allowDots:!1,charset:\"utf-8\",charsetSentinel:!1,delimiter:\"&\",encode:!0,encoder:w.encode,encodeValuesOnly:!1,format:X,formatter:x.formatters[X],indices:!1,serializeDate:function serializeDate(s){return Y.call(s)},skipNulls:!1,strictNullHandling:!1},ee={},ie=function stringify(s,i,u,x,j,P,U,Y,X,ie,ae,le,ce,pe,de,fe){for(var ye=s,be=fe,_e=0,we=!1;void 0!==(be=be.get(ee))&&!we;){var Se=be.get(s);if(_e+=1,void 0!==Se){if(Se===_e)throw new RangeError(\"Cyclic object value\");we=!0}void 0===be.get(ee)&&(_e=0)}if(\"function\"==typeof Y?ye=Y(i,ye):ye instanceof Date?ye=ae(ye):\"comma\"===u&&B(ye)&&(ye=w.maybeMap(ye,(function(s){return s instanceof Date?ae(s):s}))),null===ye){if(j)return U&&!pe?U(i,Z.encoder,de,\"key\",le):i;ye=\"\"}if(function isNonNullishPrimitive(s){return\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"symbol\"==typeof s||\"bigint\"==typeof s}(ye)||w.isBuffer(ye)){if(U){var xe=pe?i:U(i,Z.encoder,de,\"key\",le);if(\"comma\"===u&&pe){for(var Pe=$.call(String(ye),\",\"),Te=\"\",Re=0;Re<Pe.length;++Re)Te+=(0===Re?\"\":\",\")+ce(U(Pe[Re],Z.encoder,de,\"value\",le));return[ce(xe)+(x&&B(ye)&&1===Pe.length?\"[]\":\"\")+\"=\"+Te]}return[ce(xe)+\"=\"+ce(U(ye,Z.encoder,de,\"value\",le))]}return[ce(i)+\"=\"+ce(String(ye))]}var qe,$e=[];if(void 0===ye)return $e;if(\"comma\"===u&&B(ye))qe=[{value:ye.length>0?ye.join(\",\")||null:void 0}];else if(B(Y))qe=Y;else{var ze=Object.keys(ye);qe=X?ze.sort(X):ze}for(var We=x&&B(ye)&&1===ye.length?i+\"[]\":i,He=0;He<qe.length;++He){var Ye=qe[He],Xe=\"object\"==typeof Ye&&void 0!==Ye.value?Ye.value:ye[Ye];if(!P||null!==Xe){var Qe=B(ye)?\"function\"==typeof u?u(We,Ye):We:We+(ie?\".\"+Ye:\"[\"+Ye+\"]\");fe.set(s,_e);var et=_();et.set(ee,fe),pushToArray($e,stringify(Xe,Qe,u,x,j,P,U,Y,X,ie,ae,le,ce,pe,de,et))}}return $e};s.exports=function(s,i){var u,w=s,$=function normalizeStringifyOptions(s){if(!s)return Z;if(null!==s.encoder&&void 0!==s.encoder&&\"function\"!=typeof s.encoder)throw new TypeError(\"Encoder has to be a function.\");var i=s.charset||Z.charset;if(void 0!==s.charset&&\"utf-8\"!==s.charset&&\"iso-8859-1\"!==s.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var u=x.default;if(void 0!==s.format){if(!j.call(x.formatters,s.format))throw new TypeError(\"Unknown format option provided.\");u=s.format}var _=x.formatters[u],w=Z.filter;return(\"function\"==typeof s.filter||B(s.filter))&&(w=s.filter),{addQueryPrefix:\"boolean\"==typeof s.addQueryPrefix?s.addQueryPrefix:Z.addQueryPrefix,allowDots:void 0===s.allowDots?Z.allowDots:!!s.allowDots,charset:i,charsetSentinel:\"boolean\"==typeof s.charsetSentinel?s.charsetSentinel:Z.charsetSentinel,delimiter:void 0===s.delimiter?Z.delimiter:s.delimiter,encode:\"boolean\"==typeof s.encode?s.encode:Z.encode,encoder:\"function\"==typeof s.encoder?s.encoder:Z.encoder,encodeValuesOnly:\"boolean\"==typeof s.encodeValuesOnly?s.encodeValuesOnly:Z.encodeValuesOnly,filter:w,format:u,formatter:_,serializeDate:\"function\"==typeof s.serializeDate?s.serializeDate:Z.serializeDate,skipNulls:\"boolean\"==typeof s.skipNulls?s.skipNulls:Z.skipNulls,sort:\"function\"==typeof s.sort?s.sort:null,strictNullHandling:\"boolean\"==typeof s.strictNullHandling?s.strictNullHandling:Z.strictNullHandling}}(i);\"function\"==typeof $.filter?w=(0,$.filter)(\"\",w):B($.filter)&&(u=$.filter);var U,Y=[];if(\"object\"!=typeof w||null===w)return\"\";U=i&&i.arrayFormat in P?i.arrayFormat:i&&\"indices\"in i?i.indices?\"indices\":\"repeat\":\"indices\";var X=P[U];if(i&&\"commaRoundTrip\"in i&&\"boolean\"!=typeof i.commaRoundTrip)throw new TypeError(\"`commaRoundTrip` must be a boolean, or absent\");var ee=\"comma\"===X&&i&&i.commaRoundTrip;u||(u=Object.keys(w)),$.sort&&u.sort($.sort);for(var ae=_(),le=0;le<u.length;++le){var ce=u[le];$.skipNulls&&null===w[ce]||pushToArray(Y,ie(w[ce],ce,X,ee,$.strictNullHandling,$.skipNulls,$.encode?$.encoder:null,$.filter,$.sort,$.allowDots,$.serializeDate,$.format,$.formatter,$.encodeValuesOnly,$.charset,ae))}var pe=Y.join($.delimiter),de=!0===$.addQueryPrefix?\"?\":\"\";return $.charsetSentinel&&(\"iso-8859-1\"===$.charset?de+=\"utf8=%26%2310003%3B&\":de+=\"utf8=%E2%9C%93&\"),pe.length>0?de+pe:\"\"}},37720:(s,i,u)=>{\"use strict\";var _=u(74765),w=Object.prototype.hasOwnProperty,x=Array.isArray,j=function(){for(var s=[],i=0;i<256;++i)s.push(\"%\"+((i<16?\"0\":\"\")+i.toString(16)).toUpperCase());return s}(),P=function arrayToObject(s,i){for(var u=i&&i.plainObjects?Object.create(null):{},_=0;_<s.length;++_)void 0!==s[_]&&(u[_]=s[_]);return u};s.exports={arrayToObject:P,assign:function assignSingleSource(s,i){return Object.keys(i).reduce((function(s,u){return s[u]=i[u],s}),s)},combine:function combine(s,i){return[].concat(s,i)},compact:function compact(s){for(var i=[{obj:{o:s},prop:\"o\"}],u=[],_=0;_<i.length;++_)for(var w=i[_],j=w.obj[w.prop],P=Object.keys(j),B=0;B<P.length;++B){var $=P[B],U=j[$];\"object\"==typeof U&&null!==U&&-1===u.indexOf(U)&&(i.push({obj:j,prop:$}),u.push(U))}return function compactQueue(s){for(;s.length>1;){var i=s.pop(),u=i.obj[i.prop];if(x(u)){for(var _=[],w=0;w<u.length;++w)void 0!==u[w]&&_.push(u[w]);i.obj[i.prop]=_}}}(i),s},decode:function(s,i,u){var _=s.replace(/\\+/g,\" \");if(\"iso-8859-1\"===u)return _.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(_)}catch(s){return _}},encode:function encode(s,i,u,w,x){if(0===s.length)return s;var P=s;if(\"symbol\"==typeof s?P=Symbol.prototype.toString.call(s):\"string\"!=typeof s&&(P=String(s)),\"iso-8859-1\"===u)return escape(P).replace(/%u[0-9a-f]{4}/gi,(function(s){return\"%26%23\"+parseInt(s.slice(2),16)+\"%3B\"}));for(var B=\"\",$=0;$<P.length;++$){var U=P.charCodeAt($);45===U||46===U||95===U||126===U||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||x===_.RFC1738&&(40===U||41===U)?B+=P.charAt($):U<128?B+=j[U]:U<2048?B+=j[192|U>>6]+j[128|63&U]:U<55296||U>=57344?B+=j[224|U>>12]+j[128|U>>6&63]+j[128|63&U]:($+=1,U=65536+((1023&U)<<10|1023&P.charCodeAt($)),B+=j[240|U>>18]+j[128|U>>12&63]+j[128|U>>6&63]+j[128|63&U])}return B},isBuffer:function isBuffer(s){return!(!s||\"object\"!=typeof s)&&!!(s.constructor&&s.constructor.isBuffer&&s.constructor.isBuffer(s))},isRegExp:function isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)},maybeMap:function maybeMap(s,i){if(x(s)){for(var u=[],_=0;_<s.length;_+=1)u.push(i(s[_]));return u}return i(s)},merge:function merge(s,i,u){if(!i)return s;if(\"object\"!=typeof i){if(x(s))s.push(i);else{if(!s||\"object\"!=typeof s)return[s,i];(u&&(u.plainObjects||u.allowPrototypes)||!w.call(Object.prototype,i))&&(s[i]=!0)}return s}if(!s||\"object\"!=typeof s)return[s].concat(i);var _=s;return x(s)&&!x(i)&&(_=P(s,u)),x(s)&&x(i)?(i.forEach((function(i,_){if(w.call(s,_)){var x=s[_];x&&\"object\"==typeof x&&i&&\"object\"==typeof i?s[_]=merge(x,i,u):s.push(i)}else s[_]=i})),s):Object.keys(i).reduce((function(s,_){var x=i[_];return w.call(s,_)?s[_]=merge(s[_],x,u):s[_]=x,s}),_)}}},73992:(s,i)=>{\"use strict\";var u=Object.prototype.hasOwnProperty;function decode(s){try{return decodeURIComponent(s.replace(/\\+/g,\" \"))}catch(s){return null}}function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}i.stringify=function querystringify(s,i){i=i||\"\";var _,w,x=[];for(w in\"string\"!=typeof i&&(i=\"?\"),s)if(u.call(s,w)){if((_=s[w])||null!=_&&!isNaN(_)||(_=\"\"),w=encode(w),_=encode(_),null===w||null===_)continue;x.push(w+\"=\"+_)}return x.length?i+x.join(\"&\"):\"\"},i.parse=function querystring(s){for(var i,u=/([^=?#&]+)=?([^&]*)/g,_={};i=u.exec(s);){var w=decode(i[1]),x=decode(i[2]);null===w||null===x||w in _||(_[w]=x)}return _}},41859:(s,i,u)=>{const _=u(27096),w=u(78004),x=_.types;s.exports=class RandExp{constructor(s,i){if(this._setDefaults(s),s instanceof RegExp)this.ignoreCase=s.ignoreCase,this.multiline=s.multiline,s=s.source;else{if(\"string\"!=typeof s)throw new Error(\"Expected a regexp or string\");this.ignoreCase=i&&-1!==i.indexOf(\"i\"),this.multiline=i&&-1!==i.indexOf(\"m\")}this.tokens=_(s)}_setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=s.defaultRange?s.defaultRange:this.defaultRange.clone(),s.randInt&&(this.randInt=s.randInt)}gen(){return this._gen(this.tokens,[])}_gen(s,i){var u,_,w,j,P;switch(s.type){case x.ROOT:case x.GROUP:if(s.followedBy||s.notFollowedBy)return\"\";for(s.remember&&void 0===s.groupNumber&&(s.groupNumber=i.push(null)-1),_=\"\",j=0,P=(u=s.options?this._randSelect(s.options):s.stack).length;j<P;j++)_+=this._gen(u[j],i);return s.remember&&(i[s.groupNumber]=_),_;case x.POSITION:return\"\";case x.SET:var B=this._expand(s);return B.length?String.fromCharCode(this._randSelect(B)):\"\";case x.REPETITION:for(w=this.randInt(s.min,s.max===1/0?s.min+this.max:s.max),_=\"\",j=0;j<w;j++)_+=this._gen(s.value,i);return _;case x.REFERENCE:return i[s.value-1]||\"\";case x.CHAR:var $=this.ignoreCase&&this._randBool()?this._toOtherCase(s.value):s.value;return String.fromCharCode($)}}_toOtherCase(s){return s+(97<=s&&s<=122?-32:65<=s&&s<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(s){return s instanceof w?s.index(this.randInt(0,s.length-1)):s[this.randInt(0,s.length-1)]}_expand(s){if(s.type===_.types.CHAR)return new w(s.value);if(s.type===_.types.RANGE)return new w(s.from,s.to);{let i=new w;for(let u=0;u<s.set.length;u++){let _=this._expand(s.set[u]);if(i.add(_),this.ignoreCase)for(let s=0;s<_.length;s++){let u=_.index(s),w=this._toOtherCase(u);u!==w&&i.add(w)}}return s.not?this.defaultRange.clone().subtract(i):this.defaultRange.clone().intersect(i)}}randInt(s,i){return s+Math.floor(Math.random()*(1+i-s))}get defaultRange(){return this._range=this._range||new w(32,126)}set defaultRange(s){this._range=s}static randexp(s,i){var u;return\"string\"==typeof s&&(s=new RegExp(s,i)),void 0===s._randexp?(u=new RandExp(s,i),s._randexp=u):(u=s._randexp)._setDefaults(s),u.gen()}static sugar(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}}}},53209:(s,i,u)=>{\"use strict\";var _=u(65606),w=65536,x=4294967295;var j=u(92861).Buffer,P=u.g.crypto||u.g.msCrypto;P&&P.getRandomValues?s.exports=function randomBytes(s,i){if(s>x)throw new RangeError(\"requested too many random bytes\");var u=j.allocUnsafe(s);if(s>0)if(s>w)for(var B=0;B<s;B+=w)P.getRandomValues(u.slice(B,B+w));else P.getRandomValues(u);if(\"function\"==typeof i)return _.nextTick((function(){i(null,u)}));return u}:s.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},25264:(s,i,u)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(i,\"__esModule\",{value:!0}),i.CopyToClipboard=void 0;var _=_interopRequireDefault(u(96540)),w=_interopRequireDefault(u(17965)),x=[\"text\",\"onCopy\",\"options\",\"children\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _createSuper(s){var i=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var u,_=_getPrototypeOf(s);if(i){var w=_getPrototypeOf(this).constructor;u=Reflect.construct(_,arguments,w)}else u=_.apply(this,arguments);return function _possibleConstructorReturn(s,i){if(i&&(\"object\"===_typeof(i)||\"function\"==typeof i))return i;if(void 0!==i)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,u)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var j=function(s){!function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),i&&_setPrototypeOf(s,i)}(CopyToClipboard,s);var i=_createSuper(CopyToClipboard);function CopyToClipboard(){var s;!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,CopyToClipboard);for(var u=arguments.length,x=new Array(u),j=0;j<u;j++)x[j]=arguments[j];return _defineProperty(_assertThisInitialized(s=i.call.apply(i,[this].concat(x))),\"onClick\",(function(i){var u=s.props,x=u.text,j=u.onCopy,P=u.children,B=u.options,$=_.default.Children.only(P),U=(0,w.default)(x,B);j&&j(x,U),$&&$.props&&\"function\"==typeof $.props.onClick&&$.props.onClick(i)})),s}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(CopyToClipboard,[{key:\"render\",value:function render(){var s=this.props,i=(s.text,s.onCopy,s.options,s.children),u=_objectWithoutProperties(s,x),w=_.default.Children.only(i);return _.default.cloneElement(w,_objectSpread(_objectSpread({},u),{},{onClick:this.onClick}))}}]),CopyToClipboard}(_.default.PureComponent);i.CopyToClipboard=j,_defineProperty(j,\"defaultProps\",{onCopy:void 0,options:void 0})},59399:(s,i,u)=>{\"use strict\";var _=u(25264).CopyToClipboard;_.CopyToClipboard=_,s.exports=_},81214:(s,i,u)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(i,\"__esModule\",{value:!0}),i.DebounceInput=void 0;var _=_interopRequireDefault(u(96540)),w=_interopRequireDefault(u(20181)),x=[\"element\",\"onChange\",\"value\",\"minLength\",\"debounceTimeout\",\"forceNotifyByEnter\",\"forceNotifyOnBlur\",\"onKeyDown\",\"onBlur\",\"inputRef\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _createSuper(s){var i=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var u,_=_getPrototypeOf(s);if(i){var w=_getPrototypeOf(this).constructor;u=Reflect.construct(_,arguments,w)}else u=_.apply(this,arguments);return function _possibleConstructorReturn(s,i){if(i&&(\"object\"===_typeof(i)||\"function\"==typeof i))return i;if(void 0!==i)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,u)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var j=function(s){!function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),i&&_setPrototypeOf(s,i)}(DebounceInput,s);var i=_createSuper(DebounceInput);function DebounceInput(s){var u;!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,DebounceInput),_defineProperty(_assertThisInitialized(u=i.call(this,s)),\"onChange\",(function(s){s.persist();var i=u.state.value,_=u.props.minLength;u.setState({value:s.target.value},(function(){var w=u.state.value;w.length>=_?u.notify(s):i.length>w.length&&u.notify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:\"\"})}))}))})),_defineProperty(_assertThisInitialized(u),\"onKeyDown\",(function(s){\"Enter\"===s.key&&u.forceNotify(s);var i=u.props.onKeyDown;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),\"onBlur\",(function(s){u.forceNotify(s);var i=u.props.onBlur;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),\"createNotifier\",(function(s){if(s<0)u.notify=function(){return null};else if(0===s)u.notify=u.doNotify;else{var i=(0,w.default)((function(s){u.isDebouncing=!1,u.doNotify(s)}),s);u.notify=function(s){u.isDebouncing=!0,i(s)},u.flush=function(){return i.flush()},u.cancel=function(){u.isDebouncing=!1,i.cancel()}}})),_defineProperty(_assertThisInitialized(u),\"doNotify\",(function(){u.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(u),\"forceNotify\",(function(s){var i=u.props.debounceTimeout;if(u.isDebouncing||!(i>0)){u.cancel&&u.cancel();var _=u.state.value,w=u.props.minLength;_.length>=w?u.doNotify(s):u.doNotify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:_})}))}})),u.isDebouncing=!1,u.state={value:void 0===s.value||null===s.value?\"\":s.value};var _=u.props.debounceTimeout;return u.createNotifier(_),u}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(DebounceInput,[{key:\"componentDidUpdate\",value:function componentDidUpdate(s){if(!this.isDebouncing){var i=this.props,u=i.value,_=i.debounceTimeout,w=s.debounceTimeout,x=s.value,j=this.state.value;void 0!==u&&x!==u&&j!==u&&this.setState({value:u}),_!==w&&this.createNotifier(_)}}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:\"render\",value:function render(){var s,i,u=this.props,w=u.element,j=(u.onChange,u.value,u.minLength,u.debounceTimeout,u.forceNotifyByEnter),P=u.forceNotifyOnBlur,B=u.onKeyDown,$=u.onBlur,U=u.inputRef,Y=_objectWithoutProperties(u,x),X=this.state.value;s=j?{onKeyDown:this.onKeyDown}:B?{onKeyDown:B}:{},i=P?{onBlur:this.onBlur}:$?{onBlur:$}:{};var Z=U?{ref:U}:{};return _.default.createElement(w,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},Y),{},{onChange:this.onChange,value:X},s),i),Z))}}]),DebounceInput}(_.default.PureComponent);i.DebounceInput=j,_defineProperty(j,\"defaultProps\",{element:\"input\",type:\"text\",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},24677:(s,i,u)=>{\"use strict\";var _=u(81214).DebounceInput;_.DebounceInput=_,s.exports=_},22551:(s,i,u)=>{\"use strict\";var _=u(96540),w=u(69982);function p(s){for(var i=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+s,u=1;u<arguments.length;u++)i+=\"&args[]=\"+encodeURIComponent(arguments[u]);return\"Minified React error #\"+s+\"; visit \"+i+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var x=new Set,j={};function fa(s,i){ha(s,i),ha(s+\"Capture\",i)}function ha(s,i){for(j[s]=i,s=0;s<i.length;s++)x.add(i[s])}var P=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),B=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,U={},Y={};function v(s,i,u,_,w,x,j){this.acceptsBooleans=2===i||3===i||4===i,this.attributeName=_,this.attributeNamespace=w,this.mustUseProperty=u,this.propertyName=s,this.type=i,this.sanitizeURL=x,this.removeEmptyString=j}var X={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(s){X[s]=new v(s,0,!1,s,null,!1,!1)})),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(s){var i=s[0];X[i]=new v(i,1,!1,s[1],null,!1,!1)})),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(s){X[s]=new v(s,2,!1,s.toLowerCase(),null,!1,!1)})),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(s){X[s]=new v(s,2,!1,s,null,!1,!1)})),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(s){X[s]=new v(s,3,!1,s.toLowerCase(),null,!1,!1)})),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(s){X[s]=new v(s,3,!0,s,null,!1,!1)})),[\"capture\",\"download\"].forEach((function(s){X[s]=new v(s,4,!1,s,null,!1,!1)})),[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(s){X[s]=new v(s,6,!1,s,null,!1,!1)})),[\"rowSpan\",\"start\"].forEach((function(s){X[s]=new v(s,5,!1,s.toLowerCase(),null,!1,!1)}));var Z=/[\\-:]([a-z])/g;function sa(s){return s[1].toUpperCase()}function ta(s,i,u,_){var w=X.hasOwnProperty(i)?X[i]:null;(null!==w?0!==w.type:_||!(2<i.length)||\"o\"!==i[0]&&\"O\"!==i[0]||\"n\"!==i[1]&&\"N\"!==i[1])&&(function qa(s,i,u,_){if(null==i||function pa(s,i,u,_){if(null!==u&&0===u.type)return!1;switch(typeof i){case\"function\":case\"symbol\":return!0;case\"boolean\":return!_&&(null!==u?!u.acceptsBooleans:\"data-\"!==(s=s.toLowerCase().slice(0,5))&&\"aria-\"!==s);default:return!1}}(s,i,u,_))return!0;if(_)return!1;if(null!==u)switch(u.type){case 3:return!i;case 4:return!1===i;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}(i,u,w,_)&&(u=null),_||null===w?function oa(s){return!!B.call(Y,s)||!B.call(U,s)&&($.test(s)?Y[s]=!0:(U[s]=!0,!1))}(i)&&(null===u?s.removeAttribute(i):s.setAttribute(i,\"\"+u)):w.mustUseProperty?s[w.propertyName]=null===u?3!==w.type&&\"\":u:(i=w.attributeName,_=w.attributeNamespace,null===u?s.removeAttribute(i):(u=3===(w=w.type)||4===w&&!0===u?\"\":\"\"+u,_?s.setAttributeNS(_,i,u):s.setAttribute(i,u))))}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,null,!1,!1)})),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,\"http://www.w3.org/1999/xlink\",!1,!1)})),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,\"http://www.w3.org/XML/1998/namespace\",!1,!1)})),[\"tabIndex\",\"crossOrigin\"].forEach((function(s){X[s]=new v(s,1,!1,s.toLowerCase(),null,!1,!1)})),X.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(s){X[s]=new v(s,1,!1,s.toLowerCase(),null,!0,!0)}));var ee=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ie=Symbol.for(\"react.element\"),ae=Symbol.for(\"react.portal\"),le=Symbol.for(\"react.fragment\"),ce=Symbol.for(\"react.strict_mode\"),pe=Symbol.for(\"react.profiler\"),de=Symbol.for(\"react.provider\"),fe=Symbol.for(\"react.context\"),ye=Symbol.for(\"react.forward_ref\"),be=Symbol.for(\"react.suspense\"),_e=Symbol.for(\"react.suspense_list\"),we=Symbol.for(\"react.memo\"),Se=Symbol.for(\"react.lazy\");Symbol.for(\"react.scope\"),Symbol.for(\"react.debug_trace_mode\");var xe=Symbol.for(\"react.offscreen\");Symbol.for(\"react.legacy_hidden\"),Symbol.for(\"react.cache\"),Symbol.for(\"react.tracing_marker\");var Pe=Symbol.iterator;function Ka(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=Pe&&s[Pe]||s[\"@@iterator\"])?s:null}var Te,Re=Object.assign;function Ma(s){if(void 0===Te)try{throw Error()}catch(s){var i=s.stack.trim().match(/\\n( *(at )?)/);Te=i&&i[1]||\"\"}return\"\\n\"+Te+s}var qe=!1;function Oa(s,i){if(!s||qe)return\"\";qe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(s){var _=s}Reflect.construct(s,[],i)}else{try{i.call()}catch(s){_=s}s.call(i.prototype)}else{try{throw Error()}catch(s){_=s}s()}}catch(i){if(i&&_&&\"string\"==typeof i.stack){for(var w=i.stack.split(\"\\n\"),x=_.stack.split(\"\\n\"),j=w.length-1,P=x.length-1;1<=j&&0<=P&&w[j]!==x[P];)P--;for(;1<=j&&0<=P;j--,P--)if(w[j]!==x[P]){if(1!==j||1!==P)do{if(j--,0>--P||w[j]!==x[P]){var B=\"\\n\"+w[j].replace(\" at new \",\" at \");return s.displayName&&B.includes(\"<anonymous>\")&&(B=B.replace(\"<anonymous>\",s.displayName)),B}}while(1<=j&&0<=P);break}}}finally{qe=!1,Error.prepareStackTrace=u}return(s=s?s.displayName||s.name:\"\")?Ma(s):\"\"}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return s=Oa(s.type,!1);case 11:return s=Oa(s.type.render,!1);case 1:return s=Oa(s.type,!0);default:return\"\"}}function Qa(s){if(null==s)return null;if(\"function\"==typeof s)return s.displayName||s.name||null;if(\"string\"==typeof s)return s;switch(s){case le:return\"Fragment\";case ae:return\"Portal\";case pe:return\"Profiler\";case ce:return\"StrictMode\";case be:return\"Suspense\";case _e:return\"SuspenseList\"}if(\"object\"==typeof s)switch(s.$$typeof){case fe:return(s.displayName||\"Context\")+\".Consumer\";case de:return(s._context.displayName||\"Context\")+\".Provider\";case ye:var i=s.render;return(s=s.displayName)||(s=\"\"!==(s=i.displayName||i.name||\"\")?\"ForwardRef(\"+s+\")\":\"ForwardRef\"),s;case we:return null!==(i=s.displayName||null)?i:Qa(s.type)||\"Memo\";case Se:i=s._payload,s=s._init;try{return Qa(s(i))}catch(s){}}return null}function Ra(s){var i=s.type;switch(s.tag){case 24:return\"Cache\";case 9:return(i.displayName||\"Context\")+\".Consumer\";case 10:return(i._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return s=(s=i.render).displayName||s.name||\"\",i.displayName||(\"\"!==s?\"ForwardRef(\"+s+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return i;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(i);case 8:return i===ce?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"==typeof i)return i.displayName||i.name||null;if(\"string\"==typeof i)return i}return null}function Sa(s){switch(typeof s){case\"boolean\":case\"number\":case\"string\":case\"undefined\":case\"object\":return s;default:return\"\"}}function Ta(s){var i=s.type;return(s=s.nodeName)&&\"input\"===s.toLowerCase()&&(\"checkbox\"===i||\"radio\"===i)}function Va(s){s._valueTracker||(s._valueTracker=function Ua(s){var i=Ta(s)?\"checked\":\"value\",u=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),_=\"\"+s[i];if(!s.hasOwnProperty(i)&&void 0!==u&&\"function\"==typeof u.get&&\"function\"==typeof u.set){var w=u.get,x=u.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return w.call(this)},set:function(s){_=\"\"+s,x.call(this,s)}}),Object.defineProperty(s,i,{enumerable:u.enumerable}),{getValue:function(){return _},setValue:function(s){_=\"\"+s},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}(s))}function Wa(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var u=i.getValue(),_=\"\";return s&&(_=Ta(s)?s.checked?\"true\":\"false\":s.value),(s=_)!==u&&(i.setValue(s),!0)}function Xa(s){if(void 0===(s=s||(\"undefined\"!=typeof document?document:void 0)))return null;try{return s.activeElement||s.body}catch(i){return s.body}}function Ya(s,i){var u=i.checked;return Re({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=u?u:s._wrapperState.initialChecked})}function Za(s,i){var u=null==i.defaultValue?\"\":i.defaultValue,_=null!=i.checked?i.checked:i.defaultChecked;u=Sa(null!=i.value?i.value:u),s._wrapperState={initialChecked:_,initialValue:u,controlled:\"checkbox\"===i.type||\"radio\"===i.type?null!=i.checked:null!=i.value}}function ab(s,i){null!=(i=i.checked)&&ta(s,\"checked\",i,!1)}function bb(s,i){ab(s,i);var u=Sa(i.value),_=i.type;if(null!=u)\"number\"===_?(0===u&&\"\"===s.value||s.value!=u)&&(s.value=\"\"+u):s.value!==\"\"+u&&(s.value=\"\"+u);else if(\"submit\"===_||\"reset\"===_)return void s.removeAttribute(\"value\");i.hasOwnProperty(\"value\")?cb(s,i.type,u):i.hasOwnProperty(\"defaultValue\")&&cb(s,i.type,Sa(i.defaultValue)),null==i.checked&&null!=i.defaultChecked&&(s.defaultChecked=!!i.defaultChecked)}function db(s,i,u){if(i.hasOwnProperty(\"value\")||i.hasOwnProperty(\"defaultValue\")){var _=i.type;if(!(\"submit\"!==_&&\"reset\"!==_||void 0!==i.value&&null!==i.value))return;i=\"\"+s._wrapperState.initialValue,u||i===s.value||(s.value=i),s.defaultValue=i}\"\"!==(u=s.name)&&(s.name=\"\"),s.defaultChecked=!!s._wrapperState.initialChecked,\"\"!==u&&(s.name=u)}function cb(s,i,u){\"number\"===i&&Xa(s.ownerDocument)===s||(null==u?s.defaultValue=\"\"+s._wrapperState.initialValue:s.defaultValue!==\"\"+u&&(s.defaultValue=\"\"+u))}var $e=Array.isArray;function fb(s,i,u,_){if(s=s.options,i){i={};for(var w=0;w<u.length;w++)i[\"$\"+u[w]]=!0;for(u=0;u<s.length;u++)w=i.hasOwnProperty(\"$\"+s[u].value),s[u].selected!==w&&(s[u].selected=w),w&&_&&(s[u].defaultSelected=!0)}else{for(u=\"\"+Sa(u),i=null,w=0;w<s.length;w++){if(s[w].value===u)return s[w].selected=!0,void(_&&(s[w].defaultSelected=!0));null!==i||s[w].disabled||(i=s[w])}null!==i&&(i.selected=!0)}}function gb(s,i){if(null!=i.dangerouslySetInnerHTML)throw Error(p(91));return Re({},i,{value:void 0,defaultValue:void 0,children:\"\"+s._wrapperState.initialValue})}function hb(s,i){var u=i.value;if(null==u){if(u=i.children,i=i.defaultValue,null!=u){if(null!=i)throw Error(p(92));if($e(u)){if(1<u.length)throw Error(p(93));u=u[0]}i=u}null==i&&(i=\"\"),u=i}s._wrapperState={initialValue:Sa(u)}}function ib(s,i){var u=Sa(i.value),_=Sa(i.defaultValue);null!=u&&((u=\"\"+u)!==s.value&&(s.value=u),null==i.defaultValue&&s.defaultValue!==u&&(s.defaultValue=u)),null!=_&&(s.defaultValue=\"\"+_)}function jb(s){var i=s.textContent;i===s._wrapperState.initialValue&&\"\"!==i&&null!==i&&(s.value=i)}function kb(s){switch(s){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function lb(s,i){return null==s||\"http://www.w3.org/1999/xhtml\"===s?kb(i):\"http://www.w3.org/2000/svg\"===s&&\"foreignObject\"===i?\"http://www.w3.org/1999/xhtml\":s}var ze,We,He=(We=function(s,i){if(\"http://www.w3.org/2000/svg\"!==s.namespaceURI||\"innerHTML\"in s)s.innerHTML=i;else{for((ze=ze||document.createElement(\"div\")).innerHTML=\"<svg>\"+i.valueOf().toString()+\"</svg>\",i=ze.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(s,i,u,_){MSApp.execUnsafeLocalFunction((function(){return We(s,i)}))}:We);function ob(s,i){if(i){var u=s.firstChild;if(u&&u===s.lastChild&&3===u.nodeType)return void(u.nodeValue=i)}s.textContent=i}var Ye={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xe=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function rb(s,i,u){return null==i||\"boolean\"==typeof i||\"\"===i?\"\":u||\"number\"!=typeof i||0===i||Ye.hasOwnProperty(s)&&Ye[s]?(\"\"+i).trim():i+\"px\"}function sb(s,i){for(var u in s=s.style,i)if(i.hasOwnProperty(u)){var _=0===u.indexOf(\"--\"),w=rb(u,i[u],_);\"float\"===u&&(u=\"cssFloat\"),_?s.setProperty(u,w):s[u]=w}}Object.keys(Ye).forEach((function(s){Xe.forEach((function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),Ye[i]=Ye[s]}))}));var Qe=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(s,i){if(i){if(Qe[s]&&(null!=i.children||null!=i.dangerouslySetInnerHTML))throw Error(p(137,s));if(null!=i.dangerouslySetInnerHTML){if(null!=i.children)throw Error(p(60));if(\"object\"!=typeof i.dangerouslySetInnerHTML||!(\"__html\"in i.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=i.style&&\"object\"!=typeof i.style)throw Error(p(62))}}function vb(s,i){if(-1===s.indexOf(\"-\"))return\"string\"==typeof i.is;switch(s){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var et=null;function xb(s){return(s=s.target||s.srcElement||window).correspondingUseElement&&(s=s.correspondingUseElement),3===s.nodeType?s.parentNode:s}var tt=null,rt=null,nt=null;function Bb(s){if(s=Cb(s)){if(\"function\"!=typeof tt)throw Error(p(280));var i=s.stateNode;i&&(i=Db(i),tt(s.stateNode,s.type,i))}}function Eb(s){rt?nt?nt.push(s):nt=[s]:rt=s}function Fb(){if(rt){var s=rt,i=nt;if(nt=rt=null,Bb(s),i)for(s=0;s<i.length;s++)Bb(i[s])}}function Gb(s,i){return s(i)}function Hb(){}var ot=!1;function Jb(s,i,u){if(ot)return s(i,u);ot=!0;try{return Gb(s,i,u)}finally{ot=!1,(null!==rt||null!==nt)&&(Hb(),Fb())}}function Kb(s,i){var u=s.stateNode;if(null===u)return null;var _=Db(u);if(null===_)return null;u=_[i];e:switch(i){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(_=!_.disabled)||(_=!(\"button\"===(s=s.type)||\"input\"===s||\"select\"===s||\"textarea\"===s)),s=!_;break e;default:s=!1}if(s)return null;if(u&&\"function\"!=typeof u)throw Error(p(231,i,typeof u));return u}var st=!1;if(P)try{var it={};Object.defineProperty(it,\"passive\",{get:function(){st=!0}}),window.addEventListener(\"test\",it,it),window.removeEventListener(\"test\",it,it)}catch(We){st=!1}function Nb(s,i,u,_,w,x,j,P,B){var $=Array.prototype.slice.call(arguments,3);try{i.apply(u,$)}catch(s){this.onError(s)}}var at=!1,lt=null,ct=!1,ut=null,pt={onError:function(s){at=!0,lt=s}};function Tb(s,i,u,_,w,x,j,P,B){at=!1,lt=null,Nb.apply(pt,arguments)}function Vb(s){var i=s,u=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do{0!=(4098&(i=s).flags)&&(u=i.return),s=i.return}while(s)}return 3===i.tag?u:null}function Wb(s){if(13===s.tag){var i=s.memoizedState;if(null===i&&(null!==(s=s.alternate)&&(i=s.memoizedState)),null!==i)return i.dehydrated}return null}function Xb(s){if(Vb(s)!==s)throw Error(p(188))}function Zb(s){return null!==(s=function Yb(s){var i=s.alternate;if(!i){if(null===(i=Vb(s)))throw Error(p(188));return i!==s?null:s}for(var u=s,_=i;;){var w=u.return;if(null===w)break;var x=w.alternate;if(null===x){if(null!==(_=w.return)){u=_;continue}break}if(w.child===x.child){for(x=w.child;x;){if(x===u)return Xb(w),s;if(x===_)return Xb(w),i;x=x.sibling}throw Error(p(188))}if(u.return!==_.return)u=w,_=x;else{for(var j=!1,P=w.child;P;){if(P===u){j=!0,u=w,_=x;break}if(P===_){j=!0,_=w,u=x;break}P=P.sibling}if(!j){for(P=x.child;P;){if(P===u){j=!0,u=x,_=w;break}if(P===_){j=!0,_=x,u=w;break}P=P.sibling}if(!j)throw Error(p(189))}}if(u.alternate!==_)throw Error(p(190))}if(3!==u.tag)throw Error(p(188));return u.stateNode.current===u?s:i}(s))?$b(s):null}function $b(s){if(5===s.tag||6===s.tag)return s;for(s=s.child;null!==s;){var i=$b(s);if(null!==i)return i;s=s.sibling}return null}var ht=w.unstable_scheduleCallback,dt=w.unstable_cancelCallback,mt=w.unstable_shouldYield,gt=w.unstable_requestPaint,yt=w.unstable_now,vt=w.unstable_getCurrentPriorityLevel,bt=w.unstable_ImmediatePriority,_t=w.unstable_UserBlockingPriority,Et=w.unstable_NormalPriority,wt=w.unstable_LowPriority,St=w.unstable_IdlePriority,xt=null,kt=null;var Ot=Math.clz32?Math.clz32:function nc(s){return s>>>=0,0===s?32:31-(Ct(s)/At|0)|0},Ct=Math.log,At=Math.LN2;var jt=64,Pt=4194304;function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&s;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&s;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,i){var u=s.pendingLanes;if(0===u)return 0;var _=0,w=s.suspendedLanes,x=s.pingedLanes,j=268435455&u;if(0!==j){var P=j&~w;0!==P?_=tc(P):0!==(x&=j)&&(_=tc(x))}else 0!==(j=u&~w)?_=tc(j):0!==x&&(_=tc(x));if(0===_)return 0;if(0!==i&&i!==_&&0==(i&w)&&((w=_&-_)>=(x=i&-i)||16===w&&0!=(4194240&x)))return i;if(0!=(4&_)&&(_|=16&u),0!==(i=s.entangledLanes))for(s=s.entanglements,i&=_;0<i;)w=1<<(u=31-Ot(i)),_|=s[u],i&=~w;return _}function vc(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;default:return-1}}function xc(s){return 0!==(s=-1073741825&s.pendingLanes)?s:1073741824&s?1073741824:0}function yc(){var s=jt;return 0==(4194240&(jt<<=1))&&(jt=64),s}function zc(s){for(var i=[],u=0;31>u;u++)i.push(s);return i}function Ac(s,i,u){s.pendingLanes|=i,536870912!==i&&(s.suspendedLanes=0,s.pingedLanes=0),(s=s.eventTimes)[i=31-Ot(i)]=u}function Cc(s,i){var u=s.entangledLanes|=i;for(s=s.entanglements;u;){var _=31-Ot(u),w=1<<_;w&i|s[_]&i&&(s[_]|=i),u&=~w}}var It=0;function Dc(s){return 1<(s&=-s)?4<s?0!=(268435455&s)?16:536870912:4:1}var Nt,Mt,Tt,Rt,Dt,Bt=!1,Lt=[],Ft=null,qt=null,$t=null,Ut=new Map,zt=new Map,Vt=[],Wt=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function Sc(s,i){switch(s){case\"focusin\":case\"focusout\":Ft=null;break;case\"dragenter\":case\"dragleave\":qt=null;break;case\"mouseover\":case\"mouseout\":$t=null;break;case\"pointerover\":case\"pointerout\":Ut.delete(i.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":zt.delete(i.pointerId)}}function Tc(s,i,u,_,w,x){return null===s||s.nativeEvent!==x?(s={blockedOn:i,domEventName:u,eventSystemFlags:_,nativeEvent:x,targetContainers:[w]},null!==i&&(null!==(i=Cb(i))&&Mt(i)),s):(s.eventSystemFlags|=_,i=s.targetContainers,null!==w&&-1===i.indexOf(w)&&i.push(w),s)}function Vc(s){var i=Wc(s.target);if(null!==i){var u=Vb(i);if(null!==u)if(13===(i=u.tag)){if(null!==(i=Wb(u)))return s.blockedOn=i,void Dt(s.priority,(function(){Tt(u)}))}else if(3===i&&u.stateNode.current.memoizedState.isDehydrated)return void(s.blockedOn=3===u.tag?u.stateNode.containerInfo:null)}s.blockedOn=null}function Xc(s){if(null!==s.blockedOn)return!1;for(var i=s.targetContainers;0<i.length;){var u=Yc(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(null!==u)return null!==(i=Cb(u))&&Mt(i),s.blockedOn=u,!1;var _=new(u=s.nativeEvent).constructor(u.type,u);et=_,u.target.dispatchEvent(_),et=null,i.shift()}return!0}function Zc(s,i,u){Xc(s)&&u.delete(i)}function $c(){Bt=!1,null!==Ft&&Xc(Ft)&&(Ft=null),null!==qt&&Xc(qt)&&(qt=null),null!==$t&&Xc($t)&&($t=null),Ut.forEach(Zc),zt.forEach(Zc)}function ad(s,i){s.blockedOn===i&&(s.blockedOn=null,Bt||(Bt=!0,w.unstable_scheduleCallback(w.unstable_NormalPriority,$c)))}function bd(s){function b(i){return ad(i,s)}if(0<Lt.length){ad(Lt[0],s);for(var i=1;i<Lt.length;i++){var u=Lt[i];u.blockedOn===s&&(u.blockedOn=null)}}for(null!==Ft&&ad(Ft,s),null!==qt&&ad(qt,s),null!==$t&&ad($t,s),Ut.forEach(b),zt.forEach(b),i=0;i<Vt.length;i++)(u=Vt[i]).blockedOn===s&&(u.blockedOn=null);for(;0<Vt.length&&null===(i=Vt[0]).blockedOn;)Vc(i),null===i.blockedOn&&Vt.shift()}var Kt=ee.ReactCurrentBatchConfig,Ht=!0;function ed(s,i,u,_){var w=It,x=Kt.transition;Kt.transition=null;try{It=1,fd(s,i,u,_)}finally{It=w,Kt.transition=x}}function gd(s,i,u,_){var w=It,x=Kt.transition;Kt.transition=null;try{It=4,fd(s,i,u,_)}finally{It=w,Kt.transition=x}}function fd(s,i,u,_){if(Ht){var w=Yc(s,i,u,_);if(null===w)hd(s,i,_,Jt,u),Sc(s,_);else if(function Uc(s,i,u,_,w){switch(i){case\"focusin\":return Ft=Tc(Ft,s,i,u,_,w),!0;case\"dragenter\":return qt=Tc(qt,s,i,u,_,w),!0;case\"mouseover\":return $t=Tc($t,s,i,u,_,w),!0;case\"pointerover\":var x=w.pointerId;return Ut.set(x,Tc(Ut.get(x)||null,s,i,u,_,w)),!0;case\"gotpointercapture\":return x=w.pointerId,zt.set(x,Tc(zt.get(x)||null,s,i,u,_,w)),!0}return!1}(w,s,i,u,_))_.stopPropagation();else if(Sc(s,_),4&i&&-1<Wt.indexOf(s)){for(;null!==w;){var x=Cb(w);if(null!==x&&Nt(x),null===(x=Yc(s,i,u,_))&&hd(s,i,_,Jt,u),x===w)break;w=x}null!==w&&_.stopPropagation()}else hd(s,i,_,null,u)}}var Jt=null;function Yc(s,i,u,_){if(Jt=null,null!==(s=Wc(s=xb(_))))if(null===(i=Vb(s)))s=null;else if(13===(u=i.tag)){if(null!==(s=Wb(i)))return s;s=null}else if(3===u){if(i.stateNode.current.memoizedState.isDehydrated)return 3===i.tag?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return Jt=s,null}function jd(s){switch(s){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(vt()){case bt:return 1;case _t:return 4;case Et:case wt:return 16;case St:return 536870912;default:return 16}default:return 16}}var Gt=null,Yt=null,Xt=null;function nd(){if(Xt)return Xt;var s,i,u=Yt,_=u.length,w=\"value\"in Gt?Gt.value:Gt.textContent,x=w.length;for(s=0;s<_&&u[s]===w[s];s++);var j=_-s;for(i=1;i<=j&&u[_-i]===w[x-i];i++);return Xt=w.slice(s,1<i?1-i:void 0)}function od(s){var i=s.keyCode;return\"charCode\"in s?0===(s=s.charCode)&&13===i&&(s=13):s=i,10===s&&(s=13),32<=s||13===s?s:0}function pd(){return!0}function qd(){return!1}function rd(s){function b(i,u,_,w,x){for(var j in this._reactName=i,this._targetInst=_,this.type=u,this.nativeEvent=w,this.target=x,this.currentTarget=null,s)s.hasOwnProperty(j)&&(i=s[j],this[j]=i?i(w):w[j]);return this.isDefaultPrevented=(null!=w.defaultPrevented?w.defaultPrevented:!1===w.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return Re(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():\"unknown\"!=typeof s.returnValue&&(s.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():\"unknown\"!=typeof s.cancelBubble&&(s.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Qt,Zt,er,tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rr=rd(tr),nr=Re({},tr,{view:0,detail:0}),sr=rd(nr),ir=Re({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(s){return void 0===s.relatedTarget?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return\"movementX\"in s?s.movementX:(s!==er&&(er&&\"mousemove\"===s.type?(Qt=s.screenX-er.screenX,Zt=s.screenY-er.screenY):Zt=Qt=0,er=s),Qt)},movementY:function(s){return\"movementY\"in s?s.movementY:Zt}}),ar=rd(ir),lr=rd(Re({},ir,{dataTransfer:0})),cr=rd(Re({},nr,{relatedTarget:0})),ur=rd(Re({},tr,{animationName:0,elapsedTime:0,pseudoElement:0})),pr=Re({},tr,{clipboardData:function(s){return\"clipboardData\"in s?s.clipboardData:window.clipboardData}}),dr=rd(pr),fr=rd(Re({},tr,{data:0})),mr={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},gr={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},yr={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):!!(s=yr[s])&&!!i[s]}function zd(){return Pd}var vr=Re({},nr,{key:function(s){if(s.key){var i=mr[s.key]||s.key;if(\"Unidentified\"!==i)return i}return\"keypress\"===s.type?13===(s=od(s))?\"Enter\":String.fromCharCode(s):\"keydown\"===s.type||\"keyup\"===s.type?gr[s.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(s){return\"keypress\"===s.type?od(s):0},keyCode:function(s){return\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0},which:function(s){return\"keypress\"===s.type?od(s):\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0}}),br=rd(vr),_r=rd(Re({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Er=rd(Re({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),wr=rd(Re({},tr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Sr=Re({},ir,{deltaX:function(s){return\"deltaX\"in s?s.deltaX:\"wheelDeltaX\"in s?-s.wheelDeltaX:0},deltaY:function(s){return\"deltaY\"in s?s.deltaY:\"wheelDeltaY\"in s?-s.wheelDeltaY:\"wheelDelta\"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),xr=rd(Sr),kr=[9,13,27,32],Or=P&&\"CompositionEvent\"in window,Cr=null;P&&\"documentMode\"in document&&(Cr=document.documentMode);var Ar=P&&\"TextEvent\"in window&&!Cr,jr=P&&(!Or||Cr&&8<Cr&&11>=Cr),Pr=String.fromCharCode(32),Ir=!1;function ge(s,i){switch(s){case\"keyup\":return-1!==kr.indexOf(i.keyCode);case\"keydown\":return 229!==i.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function he(s){return\"object\"==typeof(s=s.detail)&&\"data\"in s?s.data:null}var Nr=!1;var Mr={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return\"input\"===i?!!Mr[s.type]:\"textarea\"===i}function ne(s,i,u,_){Eb(_),0<(i=oe(i,\"onChange\")).length&&(u=new rr(\"onChange\",\"change\",null,u,_),s.push({event:u,listeners:i}))}var Tr=null,Rr=null;function re(s){se(s,0)}function te(s){if(Wa(ue(s)))return s}function ve(s,i){if(\"change\"===s)return i}var Dr=!1;if(P){var Br;if(P){var Lr=\"oninput\"in document;if(!Lr){var Fr=document.createElement(\"div\");Fr.setAttribute(\"oninput\",\"return;\"),Lr=\"function\"==typeof Fr.oninput}Br=Lr}else Br=!1;Dr=Br&&(!document.documentMode||9<document.documentMode)}function Ae(){Tr&&(Tr.detachEvent(\"onpropertychange\",Be),Rr=Tr=null)}function Be(s){if(\"value\"===s.propertyName&&te(Rr)){var i=[];ne(i,Rr,s,xb(s)),Jb(re,i)}}function Ce(s,i,u){\"focusin\"===s?(Ae(),Rr=u,(Tr=i).attachEvent(\"onpropertychange\",Be)):\"focusout\"===s&&Ae()}function De(s){if(\"selectionchange\"===s||\"keyup\"===s||\"keydown\"===s)return te(Rr)}function Ee(s,i){if(\"click\"===s)return te(i)}function Fe(s,i){if(\"input\"===s||\"change\"===s)return te(i)}var qr=\"function\"==typeof Object.is?Object.is:function Ge(s,i){return s===i&&(0!==s||1/s==1/i)||s!=s&&i!=i};function Ie(s,i){if(qr(s,i))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof i||null===i)return!1;var u=Object.keys(s),_=Object.keys(i);if(u.length!==_.length)return!1;for(_=0;_<u.length;_++){var w=u[_];if(!B.call(i,w)||!qr(s[w],i[w]))return!1}return!0}function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ke(s,i){var u,_=Je(s);for(s=0;_;){if(3===_.nodeType){if(u=s+_.textContent.length,s<=i&&u>=i)return{node:_,offset:i-s};s=u}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=Je(_)}}function Le(s,i){return!(!s||!i)&&(s===i||(!s||3!==s.nodeType)&&(i&&3===i.nodeType?Le(s,i.parentNode):\"contains\"in s?s.contains(i):!!s.compareDocumentPosition&&!!(16&s.compareDocumentPosition(i))))}function Me(){for(var s=window,i=Xa();i instanceof s.HTMLIFrameElement;){try{var u=\"string\"==typeof i.contentWindow.location.href}catch(s){u=!1}if(!u)break;i=Xa((s=i.contentWindow).document)}return i}function Ne(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(\"input\"===i&&(\"text\"===s.type||\"search\"===s.type||\"tel\"===s.type||\"url\"===s.type||\"password\"===s.type)||\"textarea\"===i||\"true\"===s.contentEditable)}function Oe(s){var i=Me(),u=s.focusedElem,_=s.selectionRange;if(i!==u&&u&&u.ownerDocument&&Le(u.ownerDocument.documentElement,u)){if(null!==_&&Ne(u))if(i=_.start,void 0===(s=_.end)&&(s=i),\"selectionStart\"in u)u.selectionStart=i,u.selectionEnd=Math.min(s,u.value.length);else if((s=(i=u.ownerDocument||document)&&i.defaultView||window).getSelection){s=s.getSelection();var w=u.textContent.length,x=Math.min(_.start,w);_=void 0===_.end?x:Math.min(_.end,w),!s.extend&&x>_&&(w=_,_=x,x=w),w=Ke(u,x);var j=Ke(u,_);w&&j&&(1!==s.rangeCount||s.anchorNode!==w.node||s.anchorOffset!==w.offset||s.focusNode!==j.node||s.focusOffset!==j.offset)&&((i=i.createRange()).setStart(w.node,w.offset),s.removeAllRanges(),x>_?(s.addRange(i),s.extend(j.node,j.offset)):(i.setEnd(j.node,j.offset),s.addRange(i)))}for(i=[],s=u;s=s.parentNode;)1===s.nodeType&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(\"function\"==typeof u.focus&&u.focus(),u=0;u<i.length;u++)(s=i[u]).element.scrollLeft=s.left,s.element.scrollTop=s.top}}var $r=P&&\"documentMode\"in document&&11>=document.documentMode,Ur=null,zr=null,Vr=null,Wr=!1;function Ue(s,i,u){var _=u.window===u?u.document:9===u.nodeType?u:u.ownerDocument;Wr||null==Ur||Ur!==Xa(_)||(\"selectionStart\"in(_=Ur)&&Ne(_)?_={start:_.selectionStart,end:_.selectionEnd}:_={anchorNode:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset},Vr&&Ie(Vr,_)||(Vr=_,0<(_=oe(zr,\"onSelect\")).length&&(i=new rr(\"onSelect\",\"select\",null,i,u),s.push({event:i,listeners:_}),i.target=Ur)))}function Ve(s,i){var u={};return u[s.toLowerCase()]=i.toLowerCase(),u[\"Webkit\"+s]=\"webkit\"+i,u[\"Moz\"+s]=\"moz\"+i,u}var Kr={animationend:Ve(\"Animation\",\"AnimationEnd\"),animationiteration:Ve(\"Animation\",\"AnimationIteration\"),animationstart:Ve(\"Animation\",\"AnimationStart\"),transitionend:Ve(\"Transition\",\"TransitionEnd\")},Hr={},Jr={};function Ze(s){if(Hr[s])return Hr[s];if(!Kr[s])return s;var i,u=Kr[s];for(i in u)if(u.hasOwnProperty(i)&&i in Jr)return Hr[s]=u[i];return s}P&&(Jr=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),\"TransitionEvent\"in window||delete Kr.transitionend.transition);var Gr=Ze(\"animationend\"),Yr=Ze(\"animationiteration\"),Xr=Ze(\"animationstart\"),Qr=Ze(\"transitionend\"),Zr=new Map,en=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");function ff(s,i){Zr.set(s,i),fa(i,[s])}for(var tn=0;tn<en.length;tn++){var rn=en[tn];ff(rn.toLowerCase(),\"on\"+(rn[0].toUpperCase()+rn.slice(1)))}ff(Gr,\"onAnimationEnd\"),ff(Yr,\"onAnimationIteration\"),ff(Xr,\"onAnimationStart\"),ff(\"dblclick\",\"onDoubleClick\"),ff(\"focusin\",\"onFocus\"),ff(\"focusout\",\"onBlur\"),ff(Qr,\"onTransitionEnd\"),ha(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),ha(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),ha(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),ha(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),fa(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),fa(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),fa(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),fa(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var nn=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),on=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(nn));function nf(s,i,u){var _=s.type||\"unknown-event\";s.currentTarget=u,function Ub(s,i,u,_,w,x,j,P,B){if(Tb.apply(this,arguments),at){if(!at)throw Error(p(198));var $=lt;at=!1,lt=null,ct||(ct=!0,ut=$)}}(_,i,void 0,s),s.currentTarget=null}function se(s,i){i=0!=(4&i);for(var u=0;u<s.length;u++){var _=s[u],w=_.event;_=_.listeners;e:{var x=void 0;if(i)for(var j=_.length-1;0<=j;j--){var P=_[j],B=P.instance,$=P.currentTarget;if(P=P.listener,B!==x&&w.isPropagationStopped())break e;nf(w,P,$),x=B}else for(j=0;j<_.length;j++){if(B=(P=_[j]).instance,$=P.currentTarget,P=P.listener,B!==x&&w.isPropagationStopped())break e;nf(w,P,$),x=B}}}if(ct)throw s=ut,ct=!1,ut=null,s}function D(s,i){var u=i[bn];void 0===u&&(u=i[bn]=new Set);var _=s+\"__bubble\";u.has(_)||(pf(i,s,2,!1),u.add(_))}function qf(s,i,u){var _=0;i&&(_|=4),pf(u,s,_,i)}var sn=\"_reactListening\"+Math.random().toString(36).slice(2);function sf(s){if(!s[sn]){s[sn]=!0,x.forEach((function(i){\"selectionchange\"!==i&&(on.has(i)||qf(i,!1,s),qf(i,!0,s))}));var i=9===s.nodeType?s:s.ownerDocument;null===i||i[sn]||(i[sn]=!0,qf(\"selectionchange\",!1,i))}}function pf(s,i,u,_){switch(jd(i)){case 1:var w=ed;break;case 4:w=gd;break;default:w=fd}u=w.bind(null,i,u,s),w=void 0,!st||\"touchstart\"!==i&&\"touchmove\"!==i&&\"wheel\"!==i||(w=!0),_?void 0!==w?s.addEventListener(i,u,{capture:!0,passive:w}):s.addEventListener(i,u,!0):void 0!==w?s.addEventListener(i,u,{passive:w}):s.addEventListener(i,u,!1)}function hd(s,i,u,_,w){var x=_;if(0==(1&i)&&0==(2&i)&&null!==_)e:for(;;){if(null===_)return;var j=_.tag;if(3===j||4===j){var P=_.stateNode.containerInfo;if(P===w||8===P.nodeType&&P.parentNode===w)break;if(4===j)for(j=_.return;null!==j;){var B=j.tag;if((3===B||4===B)&&((B=j.stateNode.containerInfo)===w||8===B.nodeType&&B.parentNode===w))return;j=j.return}for(;null!==P;){if(null===(j=Wc(P)))return;if(5===(B=j.tag)||6===B){_=x=j;continue e}P=P.parentNode}}_=_.return}Jb((function(){var _=x,w=xb(u),j=[];e:{var P=Zr.get(s);if(void 0!==P){var B=rr,$=s;switch(s){case\"keypress\":if(0===od(u))break e;case\"keydown\":case\"keyup\":B=br;break;case\"focusin\":$=\"focus\",B=cr;break;case\"focusout\":$=\"blur\",B=cr;break;case\"beforeblur\":case\"afterblur\":B=cr;break;case\"click\":if(2===u.button)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":B=ar;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":B=lr;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":B=Er;break;case Gr:case Yr:case Xr:B=ur;break;case Qr:B=wr;break;case\"scroll\":B=sr;break;case\"wheel\":B=xr;break;case\"copy\":case\"cut\":case\"paste\":B=dr;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":B=_r}var U=0!=(4&i),Y=!U&&\"scroll\"===s,X=U?null!==P?P+\"Capture\":null:P;U=[];for(var Z,ee=_;null!==ee;){var ie=(Z=ee).stateNode;if(5===Z.tag&&null!==ie&&(Z=ie,null!==X&&(null!=(ie=Kb(ee,X))&&U.push(tf(ee,ie,Z)))),Y)break;ee=ee.return}0<U.length&&(P=new B(P,$,null,u,w),j.push({event:P,listeners:U}))}}if(0==(7&i)){if(B=\"mouseout\"===s||\"pointerout\"===s,(!(P=\"mouseover\"===s||\"pointerover\"===s)||u===et||!($=u.relatedTarget||u.fromElement)||!Wc($)&&!$[vn])&&(B||P)&&(P=w.window===w?w:(P=w.ownerDocument)?P.defaultView||P.parentWindow:window,B?(B=_,null!==($=($=u.relatedTarget||u.toElement)?Wc($):null)&&($!==(Y=Vb($))||5!==$.tag&&6!==$.tag)&&($=null)):(B=null,$=_),B!==$)){if(U=ar,ie=\"onMouseLeave\",X=\"onMouseEnter\",ee=\"mouse\",\"pointerout\"!==s&&\"pointerover\"!==s||(U=_r,ie=\"onPointerLeave\",X=\"onPointerEnter\",ee=\"pointer\"),Y=null==B?P:ue(B),Z=null==$?P:ue($),(P=new U(ie,ee+\"leave\",B,u,w)).target=Y,P.relatedTarget=Z,ie=null,Wc(w)===_&&((U=new U(X,ee+\"enter\",$,u,w)).target=Z,U.relatedTarget=Y,ie=U),Y=ie,B&&$)e:{for(X=$,ee=0,Z=U=B;Z;Z=vf(Z))ee++;for(Z=0,ie=X;ie;ie=vf(ie))Z++;for(;0<ee-Z;)U=vf(U),ee--;for(;0<Z-ee;)X=vf(X),Z--;for(;ee--;){if(U===X||null!==X&&U===X.alternate)break e;U=vf(U),X=vf(X)}U=null}else U=null;null!==B&&wf(j,P,B,U,!1),null!==$&&null!==Y&&wf(j,Y,$,U,!0)}if(\"select\"===(B=(P=_?ue(_):window).nodeName&&P.nodeName.toLowerCase())||\"input\"===B&&\"file\"===P.type)var ae=ve;else if(me(P))if(Dr)ae=Fe;else{ae=De;var le=Ce}else(B=P.nodeName)&&\"input\"===B.toLowerCase()&&(\"checkbox\"===P.type||\"radio\"===P.type)&&(ae=Ee);switch(ae&&(ae=ae(s,_))?ne(j,ae,u,w):(le&&le(s,P,_),\"focusout\"===s&&(le=P._wrapperState)&&le.controlled&&\"number\"===P.type&&cb(P,\"number\",P.value)),le=_?ue(_):window,s){case\"focusin\":(me(le)||\"true\"===le.contentEditable)&&(Ur=le,zr=_,Vr=null);break;case\"focusout\":Vr=zr=Ur=null;break;case\"mousedown\":Wr=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":Wr=!1,Ue(j,u,w);break;case\"selectionchange\":if($r)break;case\"keydown\":case\"keyup\":Ue(j,u,w)}var ce;if(Or)e:{switch(s){case\"compositionstart\":var pe=\"onCompositionStart\";break e;case\"compositionend\":pe=\"onCompositionEnd\";break e;case\"compositionupdate\":pe=\"onCompositionUpdate\";break e}pe=void 0}else Nr?ge(s,u)&&(pe=\"onCompositionEnd\"):\"keydown\"===s&&229===u.keyCode&&(pe=\"onCompositionStart\");pe&&(jr&&\"ko\"!==u.locale&&(Nr||\"onCompositionStart\"!==pe?\"onCompositionEnd\"===pe&&Nr&&(ce=nd()):(Yt=\"value\"in(Gt=w)?Gt.value:Gt.textContent,Nr=!0)),0<(le=oe(_,pe)).length&&(pe=new fr(pe,s,null,u,w),j.push({event:pe,listeners:le}),ce?pe.data=ce:null!==(ce=he(u))&&(pe.data=ce))),(ce=Ar?function je(s,i){switch(s){case\"compositionend\":return he(i);case\"keypress\":return 32!==i.which?null:(Ir=!0,Pr);case\"textInput\":return(s=i.data)===Pr&&Ir?null:s;default:return null}}(s,u):function ke(s,i){if(Nr)return\"compositionend\"===s||!Or&&ge(s,i)?(s=nd(),Xt=Yt=Gt=null,Nr=!1,s):null;switch(s){case\"paste\":default:return null;case\"keypress\":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case\"compositionend\":return jr&&\"ko\"!==i.locale?null:i.data}}(s,u))&&(0<(_=oe(_,\"onBeforeInput\")).length&&(w=new fr(\"onBeforeInput\",\"beforeinput\",null,u,w),j.push({event:w,listeners:_}),w.data=ce))}se(j,i)}))}function tf(s,i,u){return{instance:s,listener:i,currentTarget:u}}function oe(s,i){for(var u=i+\"Capture\",_=[];null!==s;){var w=s,x=w.stateNode;5===w.tag&&null!==x&&(w=x,null!=(x=Kb(s,u))&&_.unshift(tf(s,x,w)),null!=(x=Kb(s,i))&&_.push(tf(s,x,w))),s=s.return}return _}function vf(s){if(null===s)return null;do{s=s.return}while(s&&5!==s.tag);return s||null}function wf(s,i,u,_,w){for(var x=i._reactName,j=[];null!==u&&u!==_;){var P=u,B=P.alternate,$=P.stateNode;if(null!==B&&B===_)break;5===P.tag&&null!==$&&(P=$,w?null!=(B=Kb(u,x))&&j.unshift(tf(u,B,P)):w||null!=(B=Kb(u,x))&&j.push(tf(u,B,P))),u=u.return}0!==j.length&&s.push({event:i,listeners:j})}var an=/\\r\\n?/g,ln=/\\u0000|\\uFFFD/g;function zf(s){return(\"string\"==typeof s?s:\"\"+s).replace(an,\"\\n\").replace(ln,\"\")}function Af(s,i,u){if(i=zf(i),zf(s)!==i&&u)throw Error(p(425))}function Bf(){}var cn=null,un=null;function Ef(s,i){return\"textarea\"===s||\"noscript\"===s||\"string\"==typeof i.children||\"number\"==typeof i.children||\"object\"==typeof i.dangerouslySetInnerHTML&&null!==i.dangerouslySetInnerHTML&&null!=i.dangerouslySetInnerHTML.__html}var pn=\"function\"==typeof setTimeout?setTimeout:void 0,hn=\"function\"==typeof clearTimeout?clearTimeout:void 0,dn=\"function\"==typeof Promise?Promise:void 0,fn=\"function\"==typeof queueMicrotask?queueMicrotask:void 0!==dn?function(s){return dn.resolve(null).then(s).catch(If)}:pn;function If(s){setTimeout((function(){throw s}))}function Kf(s,i){var u=i,_=0;do{var w=u.nextSibling;if(s.removeChild(u),w&&8===w.nodeType)if(\"/$\"===(u=w.data)){if(0===_)return s.removeChild(w),void bd(i);_--}else\"$\"!==u&&\"$?\"!==u&&\"$!\"!==u||_++;u=w}while(u);bd(i)}function Lf(s){for(;null!=s;s=s.nextSibling){var i=s.nodeType;if(1===i||3===i)break;if(8===i){if(\"$\"===(i=s.data)||\"$!\"===i||\"$?\"===i)break;if(\"/$\"===i)return null}}return s}function Mf(s){s=s.previousSibling;for(var i=0;s;){if(8===s.nodeType){var u=s.data;if(\"$\"===u||\"$!\"===u||\"$?\"===u){if(0===i)return s;i--}else\"/$\"===u&&i++}s=s.previousSibling}return null}var mn=Math.random().toString(36).slice(2),gn=\"__reactFiber$\"+mn,yn=\"__reactProps$\"+mn,vn=\"__reactContainer$\"+mn,bn=\"__reactEvents$\"+mn,_n=\"__reactListeners$\"+mn,En=\"__reactHandles$\"+mn;function Wc(s){var i=s[gn];if(i)return i;for(var u=s.parentNode;u;){if(i=u[vn]||u[gn]){if(u=i.alternate,null!==i.child||null!==u&&null!==u.child)for(s=Mf(s);null!==s;){if(u=s[gn])return u;s=Mf(s)}return i}u=(s=u).parentNode}return null}function Cb(s){return!(s=s[gn]||s[vn])||5!==s.tag&&6!==s.tag&&13!==s.tag&&3!==s.tag?null:s}function ue(s){if(5===s.tag||6===s.tag)return s.stateNode;throw Error(p(33))}function Db(s){return s[yn]||null}var wn=[],Sn=-1;function Uf(s){return{current:s}}function E(s){0>Sn||(s.current=wn[Sn],wn[Sn]=null,Sn--)}function G(s,i){Sn++,wn[Sn]=s.current,s.current=i}var xn={},kn=Uf(xn),On=Uf(!1),Cn=xn;function Yf(s,i){var u=s.type.contextTypes;if(!u)return xn;var _=s.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===i)return _.__reactInternalMemoizedMaskedChildContext;var w,x={};for(w in u)x[w]=i[w];return _&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=x),x}function Zf(s){return null!=(s=s.childContextTypes)}function $f(){E(On),E(kn)}function ag(s,i,u){if(kn.current!==xn)throw Error(p(168));G(kn,i),G(On,u)}function bg(s,i,u){var _=s.stateNode;if(i=i.childContextTypes,\"function\"!=typeof _.getChildContext)return u;for(var w in _=_.getChildContext())if(!(w in i))throw Error(p(108,Ra(s)||\"Unknown\",w));return Re({},u,_)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||xn,Cn=kn.current,G(kn,s),G(On,On.current),!0}function dg(s,i,u){var _=s.stateNode;if(!_)throw Error(p(169));u?(s=bg(s,i,Cn),_.__reactInternalMemoizedMergedChildContext=s,E(On),E(kn),G(kn,s)):E(On),G(On,u)}var An=null,jn=!1,Pn=!1;function hg(s){null===An?An=[s]:An.push(s)}function jg(){if(!Pn&&null!==An){Pn=!0;var s=0,i=It;try{var u=An;for(It=1;s<u.length;s++){var _=u[s];do{_=_(!0)}while(null!==_)}An=null,jn=!1}catch(i){throw null!==An&&(An=An.slice(s+1)),ht(bt,jg),i}finally{It=i,Pn=!1}}return null}var In=[],Nn=0,Mn=null,Tn=0,Rn=[],Dn=0,Bn=null,Ln=1,Fn=\"\";function tg(s,i){In[Nn++]=Tn,In[Nn++]=Mn,Mn=s,Tn=i}function ug(s,i,u){Rn[Dn++]=Ln,Rn[Dn++]=Fn,Rn[Dn++]=Bn,Bn=s;var _=Ln;s=Fn;var w=32-Ot(_)-1;_&=~(1<<w),u+=1;var x=32-Ot(i)+w;if(30<x){var j=w-w%5;x=(_&(1<<j)-1).toString(32),_>>=j,w-=j,Ln=1<<32-Ot(i)+w|u<<w|_,Fn=x+s}else Ln=1<<x|u<<w|_,Fn=s}function vg(s){null!==s.return&&(tg(s,1),ug(s,1,0))}function wg(s){for(;s===Mn;)Mn=In[--Nn],In[Nn]=null,Tn=In[--Nn],In[Nn]=null;for(;s===Bn;)Bn=Rn[--Dn],Rn[Dn]=null,Fn=Rn[--Dn],Rn[Dn]=null,Ln=Rn[--Dn],Rn[Dn]=null}var qn=null,$n=null,Un=!1,zn=null;function Ag(s,i){var u=Bg(5,null,null,0);u.elementType=\"DELETED\",u.stateNode=i,u.return=s,null===(i=s.deletions)?(s.deletions=[u],s.flags|=16):i.push(u)}function Cg(s,i){switch(s.tag){case 5:var u=s.type;return null!==(i=1!==i.nodeType||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i)&&(s.stateNode=i,qn=s,$n=Lf(i.firstChild),!0);case 6:return null!==(i=\"\"===s.pendingProps||3!==i.nodeType?null:i)&&(s.stateNode=i,qn=s,$n=null,!0);case 13:return null!==(i=8!==i.nodeType?null:i)&&(u=null!==Bn?{id:Ln,overflow:Fn}:null,s.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},(u=Bg(18,null,null,0)).stateNode=i,u.return=s,s.child=u,qn=s,$n=null,!0);default:return!1}}function Dg(s){return 0!=(1&s.mode)&&0==(128&s.flags)}function Eg(s){if(Un){var i=$n;if(i){var u=i;if(!Cg(s,i)){if(Dg(s))throw Error(p(418));i=Lf(u.nextSibling);var _=qn;i&&Cg(s,i)?Ag(_,u):(s.flags=-4097&s.flags|2,Un=!1,qn=s)}}else{if(Dg(s))throw Error(p(418));s.flags=-4097&s.flags|2,Un=!1,qn=s}}}function Fg(s){for(s=s.return;null!==s&&5!==s.tag&&3!==s.tag&&13!==s.tag;)s=s.return;qn=s}function Gg(s){if(s!==qn)return!1;if(!Un)return Fg(s),Un=!0,!1;var i;if((i=3!==s.tag)&&!(i=5!==s.tag)&&(i=\"head\"!==(i=s.type)&&\"body\"!==i&&!Ef(s.type,s.memoizedProps)),i&&(i=$n)){if(Dg(s))throw Hg(),Error(p(418));for(;i;)Ag(s,i),i=Lf(i.nextSibling)}if(Fg(s),13===s.tag){if(!(s=null!==(s=s.memoizedState)?s.dehydrated:null))throw Error(p(317));e:{for(s=s.nextSibling,i=0;s;){if(8===s.nodeType){var u=s.data;if(\"/$\"===u){if(0===i){$n=Lf(s.nextSibling);break e}i--}else\"$\"!==u&&\"$!\"!==u&&\"$?\"!==u||i++}s=s.nextSibling}$n=null}}else $n=qn?Lf(s.stateNode.nextSibling):null;return!0}function Hg(){for(var s=$n;s;)s=Lf(s.nextSibling)}function Ig(){$n=qn=null,Un=!1}function Jg(s){null===zn?zn=[s]:zn.push(s)}var Vn=ee.ReactCurrentBatchConfig;function Lg(s,i){if(s&&s.defaultProps){for(var u in i=Re({},i),s=s.defaultProps)void 0===i[u]&&(i[u]=s[u]);return i}return i}var Wn=Uf(null),Kn=null,Hn=null,Jn=null;function Qg(){Jn=Hn=Kn=null}function Rg(s){var i=Wn.current;E(Wn),s._currentValue=i}function Sg(s,i,u){for(;null!==s;){var _=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,null!==_&&(_.childLanes|=i)):null!==_&&(_.childLanes&i)!==i&&(_.childLanes|=i),s===u)break;s=s.return}}function Tg(s,i){Kn=s,Jn=Hn=null,null!==(s=s.dependencies)&&null!==s.firstContext&&(0!=(s.lanes&i)&&(xo=!0),s.firstContext=null)}function Vg(s){var i=s._currentValue;if(Jn!==s)if(s={context:s,memoizedValue:i,next:null},null===Hn){if(null===Kn)throw Error(p(308));Hn=s,Kn.dependencies={lanes:0,firstContext:s}}else Hn=Hn.next=s;return i}var Gn=null;function Xg(s){null===Gn?Gn=[s]:Gn.push(s)}function Yg(s,i,u,_){var w=i.interleaved;return null===w?(u.next=u,Xg(i)):(u.next=w.next,w.next=u),i.interleaved=u,Zg(s,_)}function Zg(s,i){s.lanes|=i;var u=s.alternate;for(null!==u&&(u.lanes|=i),u=s,s=s.return;null!==s;)s.childLanes|=i,null!==(u=s.alternate)&&(u.childLanes|=i),u=s,s=s.return;return 3===u.tag?u.stateNode:null}var Yn=!1;function ah(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ch(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function dh(s,i,u){var _=s.updateQueue;if(null===_)return null;if(_=_.shared,0!=(2&Uo)){var w=_.pending;return null===w?i.next=i:(i.next=w.next,w.next=i),_.pending=i,Zg(s,u)}return null===(w=_.interleaved)?(i.next=i,Xg(_)):(i.next=w.next,w.next=i),_.interleaved=i,Zg(s,u)}function eh(s,i,u){if(null!==(i=i.updateQueue)&&(i=i.shared,0!=(4194240&u))){var _=i.lanes;u|=_&=s.pendingLanes,i.lanes=u,Cc(s,u)}}function fh(s,i){var u=s.updateQueue,_=s.alternate;if(null!==_&&u===(_=_.updateQueue)){var w=null,x=null;if(null!==(u=u.firstBaseUpdate)){do{var j={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};null===x?w=x=j:x=x.next=j,u=u.next}while(null!==u);null===x?w=x=i:x=x.next=i}else w=x=i;return u={baseState:_.baseState,firstBaseUpdate:w,lastBaseUpdate:x,shared:_.shared,effects:_.effects},void(s.updateQueue=u)}null===(s=u.lastBaseUpdate)?u.firstBaseUpdate=i:s.next=i,u.lastBaseUpdate=i}function gh(s,i,u,_){var w=s.updateQueue;Yn=!1;var x=w.firstBaseUpdate,j=w.lastBaseUpdate,P=w.shared.pending;if(null!==P){w.shared.pending=null;var B=P,$=B.next;B.next=null,null===j?x=$:j.next=$,j=B;var U=s.alternate;null!==U&&((P=(U=U.updateQueue).lastBaseUpdate)!==j&&(null===P?U.firstBaseUpdate=$:P.next=$,U.lastBaseUpdate=B))}if(null!==x){var Y=w.baseState;for(j=0,U=$=B=null,P=x;;){var X=P.lane,Z=P.eventTime;if((_&X)===X){null!==U&&(U=U.next={eventTime:Z,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ee=s,ie=P;switch(X=i,Z=u,ie.tag){case 1:if(\"function\"==typeof(ee=ie.payload)){Y=ee.call(Z,Y,X);break e}Y=ee;break e;case 3:ee.flags=-65537&ee.flags|128;case 0:if(null==(X=\"function\"==typeof(ee=ie.payload)?ee.call(Z,Y,X):ee))break e;Y=Re({},Y,X);break e;case 2:Yn=!0}}null!==P.callback&&0!==P.lane&&(s.flags|=64,null===(X=w.effects)?w.effects=[P]:X.push(P))}else Z={eventTime:Z,lane:X,tag:P.tag,payload:P.payload,callback:P.callback,next:null},null===U?($=U=Z,B=Y):U=U.next=Z,j|=X;if(null===(P=P.next)){if(null===(P=w.shared.pending))break;P=(X=P).next,X.next=null,w.lastBaseUpdate=X,w.shared.pending=null}}if(null===U&&(B=Y),w.baseState=B,w.firstBaseUpdate=$,w.lastBaseUpdate=U,null!==(i=w.shared.interleaved)){w=i;do{j|=w.lane,w=w.next}while(w!==i)}else null===x&&(w.shared.lanes=0);Yo|=j,s.lanes=j,s.memoizedState=Y}}function ih(s,i,u){if(s=i.effects,i.effects=null,null!==s)for(i=0;i<s.length;i++){var _=s[i],w=_.callback;if(null!==w){if(_.callback=null,_=u,\"function\"!=typeof w)throw Error(p(191,w));w.call(_)}}}var Xn=(new _.Component).refs;function kh(s,i,u,_){u=null==(u=u(_,i=s.memoizedState))?i:Re({},i,u),s.memoizedState=u,0===s.lanes&&(s.updateQueue.baseState=u)}var Qn={isMounted:function(s){return!!(s=s._reactInternals)&&Vb(s)===s},enqueueSetState:function(s,i,u){s=s._reactInternals;var _=L(),w=lh(s),x=ch(_,w);x.payload=i,null!=u&&(x.callback=u),null!==(i=dh(s,x,w))&&(mh(i,s,w,_),eh(i,s,w))},enqueueReplaceState:function(s,i,u){s=s._reactInternals;var _=L(),w=lh(s),x=ch(_,w);x.tag=1,x.payload=i,null!=u&&(x.callback=u),null!==(i=dh(s,x,w))&&(mh(i,s,w,_),eh(i,s,w))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var u=L(),_=lh(s),w=ch(u,_);w.tag=2,null!=i&&(w.callback=i),null!==(i=dh(s,w,_))&&(mh(i,s,_,u),eh(i,s,_))}};function oh(s,i,u,_,w,x,j){return\"function\"==typeof(s=s.stateNode).shouldComponentUpdate?s.shouldComponentUpdate(_,x,j):!i.prototype||!i.prototype.isPureReactComponent||(!Ie(u,_)||!Ie(w,x))}function ph(s,i,u){var _=!1,w=xn,x=i.contextType;return\"object\"==typeof x&&null!==x?x=Vg(x):(w=Zf(i)?Cn:kn.current,x=(_=null!=(_=i.contextTypes))?Yf(s,w):xn),i=new i(u,x),s.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=Qn,s.stateNode=i,i._reactInternals=s,_&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=w,s.__reactInternalMemoizedMaskedChildContext=x),i}function qh(s,i,u,_){s=i.state,\"function\"==typeof i.componentWillReceiveProps&&i.componentWillReceiveProps(u,_),\"function\"==typeof i.UNSAFE_componentWillReceiveProps&&i.UNSAFE_componentWillReceiveProps(u,_),i.state!==s&&Qn.enqueueReplaceState(i,i.state,null)}function rh(s,i,u,_){var w=s.stateNode;w.props=u,w.state=s.memoizedState,w.refs=Xn,ah(s);var x=i.contextType;\"object\"==typeof x&&null!==x?w.context=Vg(x):(x=Zf(i)?Cn:kn.current,w.context=Yf(s,x)),w.state=s.memoizedState,\"function\"==typeof(x=i.getDerivedStateFromProps)&&(kh(s,i,x,u),w.state=s.memoizedState),\"function\"==typeof i.getDerivedStateFromProps||\"function\"==typeof w.getSnapshotBeforeUpdate||\"function\"!=typeof w.UNSAFE_componentWillMount&&\"function\"!=typeof w.componentWillMount||(i=w.state,\"function\"==typeof w.componentWillMount&&w.componentWillMount(),\"function\"==typeof w.UNSAFE_componentWillMount&&w.UNSAFE_componentWillMount(),i!==w.state&&Qn.enqueueReplaceState(w,w.state,null),gh(s,u,w,_),w.state=s.memoizedState),\"function\"==typeof w.componentDidMount&&(s.flags|=4194308)}function sh(s,i,u){if(null!==(s=u.ref)&&\"function\"!=typeof s&&\"object\"!=typeof s){if(u._owner){if(u=u._owner){if(1!==u.tag)throw Error(p(309));var _=u.stateNode}if(!_)throw Error(p(147,s));var w=_,x=\"\"+s;return null!==i&&null!==i.ref&&\"function\"==typeof i.ref&&i.ref._stringRef===x?i.ref:(i=function(s){var i=w.refs;i===Xn&&(i=w.refs={}),null===s?delete i[x]:i[x]=s},i._stringRef=x,i)}if(\"string\"!=typeof s)throw Error(p(284));if(!u._owner)throw Error(p(290,s))}return s}function th(s,i){throw s=Object.prototype.toString.call(i),Error(p(31,\"[object Object]\"===s?\"object with keys {\"+Object.keys(i).join(\", \")+\"}\":s))}function uh(s){return(0,s._init)(s._payload)}function vh(s){function b(i,u){if(s){var _=i.deletions;null===_?(i.deletions=[u],i.flags|=16):_.push(u)}}function c(i,u){if(!s)return null;for(;null!==u;)b(i,u),u=u.sibling;return null}function d(s,i){for(s=new Map;null!==i;)null!==i.key?s.set(i.key,i):s.set(i.index,i),i=i.sibling;return s}function e(s,i){return(s=wh(s,i)).index=0,s.sibling=null,s}function f(i,u,_){return i.index=_,s?null!==(_=i.alternate)?(_=_.index)<u?(i.flags|=2,u):_:(i.flags|=2,u):(i.flags|=1048576,u)}function g(i){return s&&null===i.alternate&&(i.flags|=2),i}function h(s,i,u,_){return null===i||6!==i.tag?((i=xh(u,s.mode,_)).return=s,i):((i=e(i,u)).return=s,i)}function k(s,i,u,_){var w=u.type;return w===le?m(s,i,u.props.children,_,u.key):null!==i&&(i.elementType===w||\"object\"==typeof w&&null!==w&&w.$$typeof===Se&&uh(w)===i.type)?((_=e(i,u.props)).ref=sh(s,i,u),_.return=s,_):((_=yh(u.type,u.key,u.props,null,s.mode,_)).ref=sh(s,i,u),_.return=s,_)}function l(s,i,u,_){return null===i||4!==i.tag||i.stateNode.containerInfo!==u.containerInfo||i.stateNode.implementation!==u.implementation?((i=zh(u,s.mode,_)).return=s,i):((i=e(i,u.children||[])).return=s,i)}function m(s,i,u,_,w){return null===i||7!==i.tag?((i=Ah(u,s.mode,_,w)).return=s,i):((i=e(i,u)).return=s,i)}function q(s,i,u){if(\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i)return(i=xh(\"\"+i,s.mode,u)).return=s,i;if(\"object\"==typeof i&&null!==i){switch(i.$$typeof){case ie:return(u=yh(i.type,i.key,i.props,null,s.mode,u)).ref=sh(s,null,i),u.return=s,u;case ae:return(i=zh(i,s.mode,u)).return=s,i;case Se:return q(s,(0,i._init)(i._payload),u)}if($e(i)||Ka(i))return(i=Ah(i,s.mode,u,null)).return=s,i;th(s,i)}return null}function r(s,i,u,_){var w=null!==i?i.key:null;if(\"string\"==typeof u&&\"\"!==u||\"number\"==typeof u)return null!==w?null:h(s,i,\"\"+u,_);if(\"object\"==typeof u&&null!==u){switch(u.$$typeof){case ie:return u.key===w?k(s,i,u,_):null;case ae:return u.key===w?l(s,i,u,_):null;case Se:return r(s,i,(w=u._init)(u._payload),_)}if($e(u)||Ka(u))return null!==w?null:m(s,i,u,_,null);th(s,u)}return null}function y(s,i,u,_,w){if(\"string\"==typeof _&&\"\"!==_||\"number\"==typeof _)return h(i,s=s.get(u)||null,\"\"+_,w);if(\"object\"==typeof _&&null!==_){switch(_.$$typeof){case ie:return k(i,s=s.get(null===_.key?u:_.key)||null,_,w);case ae:return l(i,s=s.get(null===_.key?u:_.key)||null,_,w);case Se:return y(s,i,u,(0,_._init)(_._payload),w)}if($e(_)||Ka(_))return m(i,s=s.get(u)||null,_,w,null);th(i,_)}return null}function n(i,u,_,w){for(var x=null,j=null,P=u,B=u=0,$=null;null!==P&&B<_.length;B++){P.index>B?($=P,P=null):$=P.sibling;var U=r(i,P,_[B],w);if(null===U){null===P&&(P=$);break}s&&P&&null===U.alternate&&b(i,P),u=f(U,u,B),null===j?x=U:j.sibling=U,j=U,P=$}if(B===_.length)return c(i,P),Un&&tg(i,B),x;if(null===P){for(;B<_.length;B++)null!==(P=q(i,_[B],w))&&(u=f(P,u,B),null===j?x=P:j.sibling=P,j=P);return Un&&tg(i,B),x}for(P=d(i,P);B<_.length;B++)null!==($=y(P,i,B,_[B],w))&&(s&&null!==$.alternate&&P.delete(null===$.key?B:$.key),u=f($,u,B),null===j?x=$:j.sibling=$,j=$);return s&&P.forEach((function(s){return b(i,s)})),Un&&tg(i,B),x}function t(i,u,_,w){var x=Ka(_);if(\"function\"!=typeof x)throw Error(p(150));if(null==(_=x.call(_)))throw Error(p(151));for(var j=x=null,P=u,B=u=0,$=null,U=_.next();null!==P&&!U.done;B++,U=_.next()){P.index>B?($=P,P=null):$=P.sibling;var Y=r(i,P,U.value,w);if(null===Y){null===P&&(P=$);break}s&&P&&null===Y.alternate&&b(i,P),u=f(Y,u,B),null===j?x=Y:j.sibling=Y,j=Y,P=$}if(U.done)return c(i,P),Un&&tg(i,B),x;if(null===P){for(;!U.done;B++,U=_.next())null!==(U=q(i,U.value,w))&&(u=f(U,u,B),null===j?x=U:j.sibling=U,j=U);return Un&&tg(i,B),x}for(P=d(i,P);!U.done;B++,U=_.next())null!==(U=y(P,i,B,U.value,w))&&(s&&null!==U.alternate&&P.delete(null===U.key?B:U.key),u=f(U,u,B),null===j?x=U:j.sibling=U,j=U);return s&&P.forEach((function(s){return b(i,s)})),Un&&tg(i,B),x}return function J(s,i,u,_){if(\"object\"==typeof u&&null!==u&&u.type===le&&null===u.key&&(u=u.props.children),\"object\"==typeof u&&null!==u){switch(u.$$typeof){case ie:e:{for(var w=u.key,x=i;null!==x;){if(x.key===w){if((w=u.type)===le){if(7===x.tag){c(s,x.sibling),(i=e(x,u.props.children)).return=s,s=i;break e}}else if(x.elementType===w||\"object\"==typeof w&&null!==w&&w.$$typeof===Se&&uh(w)===x.type){c(s,x.sibling),(i=e(x,u.props)).ref=sh(s,x,u),i.return=s,s=i;break e}c(s,x);break}b(s,x),x=x.sibling}u.type===le?((i=Ah(u.props.children,s.mode,_,u.key)).return=s,s=i):((_=yh(u.type,u.key,u.props,null,s.mode,_)).ref=sh(s,i,u),_.return=s,s=_)}return g(s);case ae:e:{for(x=u.key;null!==i;){if(i.key===x){if(4===i.tag&&i.stateNode.containerInfo===u.containerInfo&&i.stateNode.implementation===u.implementation){c(s,i.sibling),(i=e(i,u.children||[])).return=s,s=i;break e}c(s,i);break}b(s,i),i=i.sibling}(i=zh(u,s.mode,_)).return=s,s=i}return g(s);case Se:return J(s,i,(x=u._init)(u._payload),_)}if($e(u))return n(s,i,u,_);if(Ka(u))return t(s,i,u,_);th(s,u)}return\"string\"==typeof u&&\"\"!==u||\"number\"==typeof u?(u=\"\"+u,null!==i&&6===i.tag?(c(s,i.sibling),(i=e(i,u)).return=s,s=i):(c(s,i),(i=xh(u,s.mode,_)).return=s,s=i),g(s)):c(s,i)}}var Zn=vh(!0),eo=vh(!1),to={},ro=Uf(to),no=Uf(to),oo=Uf(to);function Hh(s){if(s===to)throw Error(p(174));return s}function Ih(s,i){switch(G(oo,i),G(no,s),G(ro,to),s=i.nodeType){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:lb(null,\"\");break;default:i=lb(i=(s=8===s?i.parentNode:i).namespaceURI||null,s=s.tagName)}E(ro),G(ro,i)}function Jh(){E(ro),E(no),E(oo)}function Kh(s){Hh(oo.current);var i=Hh(ro.current),u=lb(i,s.type);i!==u&&(G(no,s),G(ro,u))}function Lh(s){no.current===s&&(E(ro),E(no))}var so=Uf(0);function Mh(s){for(var i=s;null!==i;){if(13===i.tag){var u=i.memoizedState;if(null!==u&&(null===(u=u.dehydrated)||\"$?\"===u.data||\"$!\"===u.data))return i}else if(19===i.tag&&void 0!==i.memoizedProps.revealOrder){if(0!=(128&i.flags))return i}else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===s)break;for(;null===i.sibling;){if(null===i.return||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var io=[];function Oh(){for(var s=0;s<io.length;s++)io[s]._workInProgressVersionPrimary=null;io.length=0}var ao=ee.ReactCurrentDispatcher,lo=ee.ReactCurrentBatchConfig,co=0,uo=null,po=null,ho=null,fo=!1,mo=!1,go=0,yo=0;function Q(){throw Error(p(321))}function Wh(s,i){if(null===i)return!1;for(var u=0;u<i.length&&u<s.length;u++)if(!qr(s[u],i[u]))return!1;return!0}function Xh(s,i,u,_,w,x){if(co=x,uo=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ao.current=null===s||null===s.memoizedState?bo:_o,s=u(_,w),mo){x=0;do{if(mo=!1,go=0,25<=x)throw Error(p(301));x+=1,ho=po=null,i.updateQueue=null,ao.current=Eo,s=u(_,w)}while(mo)}if(ao.current=vo,i=null!==po&&null!==po.next,co=0,ho=po=uo=null,fo=!1,i)throw Error(p(300));return s}function bi(){var s=0!==go;return go=0,s}function ci(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ho?uo.memoizedState=ho=s:ho=ho.next=s,ho}function di(){if(null===po){var s=uo.alternate;s=null!==s?s.memoizedState:null}else s=po.next;var i=null===ho?uo.memoizedState:ho.next;if(null!==i)ho=i,po=s;else{if(null===s)throw Error(p(310));s={memoizedState:(po=s).memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},null===ho?uo.memoizedState=ho=s:ho=ho.next=s}return ho}function ei(s,i){return\"function\"==typeof i?i(s):i}function fi(s){var i=di(),u=i.queue;if(null===u)throw Error(p(311));u.lastRenderedReducer=s;var _=po,w=_.baseQueue,x=u.pending;if(null!==x){if(null!==w){var j=w.next;w.next=x.next,x.next=j}_.baseQueue=w=x,u.pending=null}if(null!==w){x=w.next,_=_.baseState;var P=j=null,B=null,$=x;do{var U=$.lane;if((co&U)===U)null!==B&&(B=B.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),_=$.hasEagerState?$.eagerState:s(_,$.action);else{var Y={lane:U,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};null===B?(P=B=Y,j=_):B=B.next=Y,uo.lanes|=U,Yo|=U}$=$.next}while(null!==$&&$!==x);null===B?j=_:B.next=P,qr(_,i.memoizedState)||(xo=!0),i.memoizedState=_,i.baseState=j,i.baseQueue=B,u.lastRenderedState=_}if(null!==(s=u.interleaved)){w=s;do{x=w.lane,uo.lanes|=x,Yo|=x,w=w.next}while(w!==s)}else null===w&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function gi(s){var i=di(),u=i.queue;if(null===u)throw Error(p(311));u.lastRenderedReducer=s;var _=u.dispatch,w=u.pending,x=i.memoizedState;if(null!==w){u.pending=null;var j=w=w.next;do{x=s(x,j.action),j=j.next}while(j!==w);qr(x,i.memoizedState)||(xo=!0),i.memoizedState=x,null===i.baseQueue&&(i.baseState=x),u.lastRenderedState=x}return[x,_]}function hi(){}function ii(s,i){var u=uo,_=di(),w=i(),x=!qr(_.memoizedState,w);if(x&&(_.memoizedState=w,xo=!0),_=_.queue,ji(ki.bind(null,u,_,s),[s]),_.getSnapshot!==i||x||null!==ho&&1&ho.memoizedState.tag){if(u.flags|=2048,li(9,mi.bind(null,u,_,w,i),void 0,null),null===zo)throw Error(p(349));0!=(30&co)||ni(u,i,w)}return w}function ni(s,i,u){s.flags|=16384,s={getSnapshot:i,value:u},null===(i=uo.updateQueue)?(i={lastEffect:null,stores:null},uo.updateQueue=i,i.stores=[s]):null===(u=i.stores)?i.stores=[s]:u.push(s)}function mi(s,i,u,_){i.value=u,i.getSnapshot=_,oi(i)&&pi(s)}function ki(s,i,u){return u((function(){oi(i)&&pi(s)}))}function oi(s){var i=s.getSnapshot;s=s.value;try{var u=i();return!qr(s,u)}catch(s){return!0}}function pi(s){var i=Zg(s,1);null!==i&&mh(i,s,1,-1)}function qi(s){var i=ci();return\"function\"==typeof s&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:s},i.queue=s,s=s.dispatch=ri.bind(null,uo,s),[i.memoizedState,s]}function li(s,i,u,_){return s={tag:s,create:i,destroy:u,deps:_,next:null},null===(i=uo.updateQueue)?(i={lastEffect:null,stores:null},uo.updateQueue=i,i.lastEffect=s.next=s):null===(u=i.lastEffect)?i.lastEffect=s.next=s:(_=u.next,u.next=s,s.next=_,i.lastEffect=s),s}function si(){return di().memoizedState}function ti(s,i,u,_){var w=ci();uo.flags|=s,w.memoizedState=li(1|i,u,void 0,void 0===_?null:_)}function ui(s,i,u,_){var w=di();_=void 0===_?null:_;var x=void 0;if(null!==po){var j=po.memoizedState;if(x=j.destroy,null!==_&&Wh(_,j.deps))return void(w.memoizedState=li(i,u,x,_))}uo.flags|=s,w.memoizedState=li(1|i,u,x,_)}function vi(s,i){return ti(8390656,8,s,i)}function ji(s,i){return ui(2048,8,s,i)}function wi(s,i){return ui(4,2,s,i)}function xi(s,i){return ui(4,4,s,i)}function yi(s,i){return\"function\"==typeof i?(s=s(),i(s),function(){i(null)}):null!=i?(s=s(),i.current=s,function(){i.current=null}):void 0}function zi(s,i,u){return u=null!=u?u.concat([s]):null,ui(4,4,yi.bind(null,i,s),u)}function Ai(){}function Bi(s,i){var u=di();i=void 0===i?null:i;var _=u.memoizedState;return null!==_&&null!==i&&Wh(i,_[1])?_[0]:(u.memoizedState=[s,i],s)}function Ci(s,i){var u=di();i=void 0===i?null:i;var _=u.memoizedState;return null!==_&&null!==i&&Wh(i,_[1])?_[0]:(s=s(),u.memoizedState=[s,i],s)}function Di(s,i,u){return 0==(21&co)?(s.baseState&&(s.baseState=!1,xo=!0),s.memoizedState=u):(qr(u,i)||(u=yc(),uo.lanes|=u,Yo|=u,s.baseState=!0),i)}function Ei(s,i){var u=It;It=0!==u&&4>u?u:4,s(!0);var _=lo.transition;lo.transition={};try{s(!1),i()}finally{It=u,lo.transition=_}}function Fi(){return di().memoizedState}function Gi(s,i,u){var _=lh(s);if(u={lane:_,action:u,hasEagerState:!1,eagerState:null,next:null},Hi(s))Ii(i,u);else if(null!==(u=Yg(s,i,u,_))){mh(u,s,_,L()),Ji(u,i,_)}}function ri(s,i,u){var _=lh(s),w={lane:_,action:u,hasEagerState:!1,eagerState:null,next:null};if(Hi(s))Ii(i,w);else{var x=s.alternate;if(0===s.lanes&&(null===x||0===x.lanes)&&null!==(x=i.lastRenderedReducer))try{var j=i.lastRenderedState,P=x(j,u);if(w.hasEagerState=!0,w.eagerState=P,qr(P,j)){var B=i.interleaved;return null===B?(w.next=w,Xg(i)):(w.next=B.next,B.next=w),void(i.interleaved=w)}}catch(s){}null!==(u=Yg(s,i,w,_))&&(mh(u,s,_,w=L()),Ji(u,i,_))}}function Hi(s){var i=s.alternate;return s===uo||null!==i&&i===uo}function Ii(s,i){mo=fo=!0;var u=s.pending;null===u?i.next=i:(i.next=u.next,u.next=i),s.pending=i}function Ji(s,i,u){if(0!=(4194240&u)){var _=i.lanes;u|=_&=s.pendingLanes,i.lanes=u,Cc(s,u)}}var vo={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},bo={readContext:Vg,useCallback:function(s,i){return ci().memoizedState=[s,void 0===i?null:i],s},useContext:Vg,useEffect:vi,useImperativeHandle:function(s,i,u){return u=null!=u?u.concat([s]):null,ti(4194308,4,yi.bind(null,i,s),u)},useLayoutEffect:function(s,i){return ti(4194308,4,s,i)},useInsertionEffect:function(s,i){return ti(4,2,s,i)},useMemo:function(s,i){var u=ci();return i=void 0===i?null:i,s=s(),u.memoizedState=[s,i],s},useReducer:function(s,i,u){var _=ci();return i=void 0!==u?u(i):i,_.memoizedState=_.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},_.queue=s,s=s.dispatch=Gi.bind(null,uo,s),[_.memoizedState,s]},useRef:function(s){return s={current:s},ci().memoizedState=s},useState:qi,useDebugValue:Ai,useDeferredValue:function(s){return ci().memoizedState=s},useTransition:function(){var s=qi(!1),i=s[0];return s=Ei.bind(null,s[1]),ci().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,u){var _=uo,w=ci();if(Un){if(void 0===u)throw Error(p(407));u=u()}else{if(u=i(),null===zo)throw Error(p(349));0!=(30&co)||ni(_,i,u)}w.memoizedState=u;var x={value:u,getSnapshot:i};return w.queue=x,vi(ki.bind(null,_,x,s),[s]),_.flags|=2048,li(9,mi.bind(null,_,x,u,i),void 0,null),u},useId:function(){var s=ci(),i=zo.identifierPrefix;if(Un){var u=Fn;i=\":\"+i+\"R\"+(u=(Ln&~(1<<32-Ot(Ln)-1)).toString(32)+u),0<(u=go++)&&(i+=\"H\"+u.toString(32)),i+=\":\"}else i=\":\"+i+\"r\"+(u=yo++).toString(32)+\":\";return s.memoizedState=i},unstable_isNewReconciler:!1},_o={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)},useDebugValue:Ai,useDeferredValue:function(s){return Di(di(),po.memoizedState,s)},useTransition:function(){return[fi(ei)[0],di().memoizedState]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},Eo={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(s){var i=di();return null===po?i.memoizedState=s:Di(i,po.memoizedState,s)},useTransition:function(){return[gi(ei)[0],di().memoizedState]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(s,i){try{var u=\"\",_=i;do{u+=Pa(_),_=_.return}while(_);var w=u}catch(s){w=\"\\nError generating stack: \"+s.message+\"\\n\"+s.stack}return{value:s,source:i,stack:w,digest:null}}function Li(s,i,u){return{value:s,source:null,stack:null!=u?u:null,digest:null!=i?i:null}}function Mi(s,i){try{console.error(i.value)}catch(s){setTimeout((function(){throw s}))}}var wo=\"function\"==typeof WeakMap?WeakMap:Map;function Oi(s,i,u){(u=ch(-1,u)).tag=3,u.payload={element:null};var _=i.value;return u.callback=function(){os||(os=!0,ss=_),Mi(0,i)},u}function Ri(s,i,u){(u=ch(-1,u)).tag=3;var _=s.type.getDerivedStateFromError;if(\"function\"==typeof _){var w=i.value;u.payload=function(){return _(w)},u.callback=function(){Mi(0,i)}}var x=s.stateNode;return null!==x&&\"function\"==typeof x.componentDidCatch&&(u.callback=function(){Mi(0,i),\"function\"!=typeof _&&(null===as?as=new Set([this]):as.add(this));var s=i.stack;this.componentDidCatch(i.value,{componentStack:null!==s?s:\"\"})}),u}function Ti(s,i,u){var _=s.pingCache;if(null===_){_=s.pingCache=new wo;var w=new Set;_.set(i,w)}else void 0===(w=_.get(i))&&(w=new Set,_.set(i,w));w.has(u)||(w.add(u),s=Ui.bind(null,s,i,u),i.then(s,s))}function Vi(s){do{var i;if((i=13===s.tag)&&(i=null===(i=s.memoizedState)||null!==i.dehydrated),i)return s;s=s.return}while(null!==s);return null}function Wi(s,i,u,_,w){return 0==(1&s.mode)?(s===i?s.flags|=65536:(s.flags|=128,u.flags|=131072,u.flags&=-52805,1===u.tag&&(null===u.alternate?u.tag=17:((i=ch(-1,1)).tag=2,dh(u,i,1))),u.lanes|=1),s):(s.flags|=65536,s.lanes=w,s)}var So=ee.ReactCurrentOwner,xo=!1;function Yi(s,i,u,_){i.child=null===s?eo(i,null,u,_):Zn(i,s.child,u,_)}function Zi(s,i,u,_,w){u=u.render;var x=i.ref;return Tg(i,w),_=Xh(s,i,u,_,x,w),u=bi(),null===s||xo?(Un&&u&&vg(i),i.flags|=1,Yi(s,i,_,w),i.child):(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~w,$i(s,i,w))}function aj(s,i,u,_,w){if(null===s){var x=u.type;return\"function\"!=typeof x||bj(x)||void 0!==x.defaultProps||null!==u.compare||void 0!==u.defaultProps?((s=yh(u.type,null,_,i,i.mode,w)).ref=i.ref,s.return=i,i.child=s):(i.tag=15,i.type=x,cj(s,i,x,_,w))}if(x=s.child,0==(s.lanes&w)){var j=x.memoizedProps;if((u=null!==(u=u.compare)?u:Ie)(j,_)&&s.ref===i.ref)return $i(s,i,w)}return i.flags|=1,(s=wh(x,_)).ref=i.ref,s.return=i,i.child=s}function cj(s,i,u,_,w){if(null!==s){var x=s.memoizedProps;if(Ie(x,_)&&s.ref===i.ref){if(xo=!1,i.pendingProps=_=x,0==(s.lanes&w))return i.lanes=s.lanes,$i(s,i,w);0!=(131072&s.flags)&&(xo=!0)}}return dj(s,i,u,_,w)}function ej(s,i,u){var _=i.pendingProps,w=_.children,x=null!==s?s.memoizedState:null;if(\"hidden\"===_.mode)if(0==(1&i.mode))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Ho,Ko),Ko|=u;else{if(0==(1073741824&u))return s=null!==x?x.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,G(Ho,Ko),Ko|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},_=null!==x?x.baseLanes:u,G(Ho,Ko),Ko|=_}else null!==x?(_=x.baseLanes|u,i.memoizedState=null):_=u,G(Ho,Ko),Ko|=_;return Yi(s,i,w,u),i.child}function hj(s,i){var u=i.ref;(null===s&&null!==u||null!==s&&s.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function dj(s,i,u,_,w){var x=Zf(u)?Cn:kn.current;return x=Yf(i,x),Tg(i,w),u=Xh(s,i,u,_,x,w),_=bi(),null===s||xo?(Un&&_&&vg(i),i.flags|=1,Yi(s,i,u,w),i.child):(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~w,$i(s,i,w))}function ij(s,i,u,_,w){if(Zf(u)){var x=!0;cg(i)}else x=!1;if(Tg(i,w),null===i.stateNode)jj(s,i),ph(i,u,_),rh(i,u,_,w),_=!0;else if(null===s){var j=i.stateNode,P=i.memoizedProps;j.props=P;var B=j.context,$=u.contextType;\"object\"==typeof $&&null!==$?$=Vg($):$=Yf(i,$=Zf(u)?Cn:kn.current);var U=u.getDerivedStateFromProps,Y=\"function\"==typeof U||\"function\"==typeof j.getSnapshotBeforeUpdate;Y||\"function\"!=typeof j.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof j.componentWillReceiveProps||(P!==_||B!==$)&&qh(i,j,_,$),Yn=!1;var X=i.memoizedState;j.state=X,gh(i,_,j,w),B=i.memoizedState,P!==_||X!==B||On.current||Yn?(\"function\"==typeof U&&(kh(i,u,U,_),B=i.memoizedState),(P=Yn||oh(i,u,P,_,X,B,$))?(Y||\"function\"!=typeof j.UNSAFE_componentWillMount&&\"function\"!=typeof j.componentWillMount||(\"function\"==typeof j.componentWillMount&&j.componentWillMount(),\"function\"==typeof j.UNSAFE_componentWillMount&&j.UNSAFE_componentWillMount()),\"function\"==typeof j.componentDidMount&&(i.flags|=4194308)):(\"function\"==typeof j.componentDidMount&&(i.flags|=4194308),i.memoizedProps=_,i.memoizedState=B),j.props=_,j.state=B,j.context=$,_=P):(\"function\"==typeof j.componentDidMount&&(i.flags|=4194308),_=!1)}else{j=i.stateNode,bh(s,i),P=i.memoizedProps,$=i.type===i.elementType?P:Lg(i.type,P),j.props=$,Y=i.pendingProps,X=j.context,\"object\"==typeof(B=u.contextType)&&null!==B?B=Vg(B):B=Yf(i,B=Zf(u)?Cn:kn.current);var Z=u.getDerivedStateFromProps;(U=\"function\"==typeof Z||\"function\"==typeof j.getSnapshotBeforeUpdate)||\"function\"!=typeof j.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof j.componentWillReceiveProps||(P!==Y||X!==B)&&qh(i,j,_,B),Yn=!1,X=i.memoizedState,j.state=X,gh(i,_,j,w);var ee=i.memoizedState;P!==Y||X!==ee||On.current||Yn?(\"function\"==typeof Z&&(kh(i,u,Z,_),ee=i.memoizedState),($=Yn||oh(i,u,$,_,X,ee,B)||!1)?(U||\"function\"!=typeof j.UNSAFE_componentWillUpdate&&\"function\"!=typeof j.componentWillUpdate||(\"function\"==typeof j.componentWillUpdate&&j.componentWillUpdate(_,ee,B),\"function\"==typeof j.UNSAFE_componentWillUpdate&&j.UNSAFE_componentWillUpdate(_,ee,B)),\"function\"==typeof j.componentDidUpdate&&(i.flags|=4),\"function\"==typeof j.getSnapshotBeforeUpdate&&(i.flags|=1024)):(\"function\"!=typeof j.componentDidUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=4),\"function\"!=typeof j.getSnapshotBeforeUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=1024),i.memoizedProps=_,i.memoizedState=ee),j.props=_,j.state=ee,j.context=B,_=$):(\"function\"!=typeof j.componentDidUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=4),\"function\"!=typeof j.getSnapshotBeforeUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=1024),_=!1)}return kj(s,i,u,_,x,w)}function kj(s,i,u,_,w,x){hj(s,i);var j=0!=(128&i.flags);if(!_&&!j)return w&&dg(i,u,!1),$i(s,i,x);_=i.stateNode,So.current=i;var P=j&&\"function\"!=typeof u.getDerivedStateFromError?null:_.render();return i.flags|=1,null!==s&&j?(i.child=Zn(i,s.child,null,x),i.child=Zn(i,null,P,x)):Yi(s,i,P,x),i.memoizedState=_.state,w&&dg(i,u,!0),i.child}function lj(s){var i=s.stateNode;i.pendingContext?ag(0,i.pendingContext,i.pendingContext!==i.context):i.context&&ag(0,i.context,!1),Ih(s,i.containerInfo)}function mj(s,i,u,_,w){return Ig(),Jg(w),i.flags|=256,Yi(s,i,u,_),i.child}var ko,Oo,Co,Ao,jo={dehydrated:null,treeContext:null,retryLane:0};function oj(s){return{baseLanes:s,cachePool:null,transitions:null}}function pj(s,i,u){var _,w=i.pendingProps,x=so.current,j=!1,P=0!=(128&i.flags);if((_=P)||(_=(null===s||null!==s.memoizedState)&&0!=(2&x)),_?(j=!0,i.flags&=-129):null!==s&&null===s.memoizedState||(x|=1),G(so,1&x),null===s)return Eg(i),null!==(s=i.memoizedState)&&null!==(s=s.dehydrated)?(0==(1&i.mode)?i.lanes=1:\"$!\"===s.data?i.lanes=8:i.lanes=1073741824,null):(P=w.children,s=w.fallback,j?(w=i.mode,j=i.child,P={mode:\"hidden\",children:P},0==(1&w)&&null!==j?(j.childLanes=0,j.pendingProps=P):j=qj(P,w,0,null),s=Ah(s,w,u,null),j.return=i,s.return=i,j.sibling=s,i.child=j,i.child.memoizedState=oj(u),i.memoizedState=jo,s):rj(i,P));if(null!==(x=s.memoizedState)&&null!==(_=x.dehydrated))return function sj(s,i,u,_,w,x,j){if(u)return 256&i.flags?(i.flags&=-257,tj(s,i,j,_=Li(Error(p(422))))):null!==i.memoizedState?(i.child=s.child,i.flags|=128,null):(x=_.fallback,w=i.mode,_=qj({mode:\"visible\",children:_.children},w,0,null),(x=Ah(x,w,j,null)).flags|=2,_.return=i,x.return=i,_.sibling=x,i.child=_,0!=(1&i.mode)&&Zn(i,s.child,null,j),i.child.memoizedState=oj(j),i.memoizedState=jo,x);if(0==(1&i.mode))return tj(s,i,j,null);if(\"$!\"===w.data){if(_=w.nextSibling&&w.nextSibling.dataset)var P=_.dgst;return _=P,tj(s,i,j,_=Li(x=Error(p(419)),_,void 0))}if(P=0!=(j&s.childLanes),xo||P){if(null!==(_=zo)){switch(j&-j){case 4:w=2;break;case 16:w=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:w=32;break;case 536870912:w=268435456;break;default:w=0}0!==(w=0!=(w&(_.suspendedLanes|j))?0:w)&&w!==x.retryLane&&(x.retryLane=w,Zg(s,w),mh(_,s,w,-1))}return uj(),tj(s,i,j,_=Li(Error(p(421))))}return\"$?\"===w.data?(i.flags|=128,i.child=s.child,i=vj.bind(null,s),w._reactRetry=i,null):(s=x.treeContext,$n=Lf(w.nextSibling),qn=i,Un=!0,zn=null,null!==s&&(Rn[Dn++]=Ln,Rn[Dn++]=Fn,Rn[Dn++]=Bn,Ln=s.id,Fn=s.overflow,Bn=i),i=rj(i,_.children),i.flags|=4096,i)}(s,i,P,w,_,x,u);if(j){j=w.fallback,P=i.mode,_=(x=s.child).sibling;var B={mode:\"hidden\",children:w.children};return 0==(1&P)&&i.child!==x?((w=i.child).childLanes=0,w.pendingProps=B,i.deletions=null):(w=wh(x,B)).subtreeFlags=14680064&x.subtreeFlags,null!==_?j=wh(_,j):(j=Ah(j,P,u,null)).flags|=2,j.return=i,w.return=i,w.sibling=j,i.child=w,w=j,j=i.child,P=null===(P=s.child.memoizedState)?oj(u):{baseLanes:P.baseLanes|u,cachePool:null,transitions:P.transitions},j.memoizedState=P,j.childLanes=s.childLanes&~u,i.memoizedState=jo,w}return s=(j=s.child).sibling,w=wh(j,{mode:\"visible\",children:w.children}),0==(1&i.mode)&&(w.lanes=u),w.return=i,w.sibling=null,null!==s&&(null===(u=i.deletions)?(i.deletions=[s],i.flags|=16):u.push(s)),i.child=w,i.memoizedState=null,w}function rj(s,i){return(i=qj({mode:\"visible\",children:i},s.mode,0,null)).return=s,s.child=i}function tj(s,i,u,_){return null!==_&&Jg(_),Zn(i,s.child,null,u),(s=rj(i,i.pendingProps.children)).flags|=2,i.memoizedState=null,s}function wj(s,i,u){s.lanes|=i;var _=s.alternate;null!==_&&(_.lanes|=i),Sg(s.return,i,u)}function xj(s,i,u,_,w){var x=s.memoizedState;null===x?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:_,tail:u,tailMode:w}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=_,x.tail=u,x.tailMode=w)}function yj(s,i,u){var _=i.pendingProps,w=_.revealOrder,x=_.tail;if(Yi(s,i,_.children,u),0!=(2&(_=so.current)))_=1&_|2,i.flags|=128;else{if(null!==s&&0!=(128&s.flags))e:for(s=i.child;null!==s;){if(13===s.tag)null!==s.memoizedState&&wj(s,u,i);else if(19===s.tag)wj(s,u,i);else if(null!==s.child){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;null===s.sibling;){if(null===s.return||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}_&=1}if(G(so,_),0==(1&i.mode))i.memoizedState=null;else switch(w){case\"forwards\":for(u=i.child,w=null;null!==u;)null!==(s=u.alternate)&&null===Mh(s)&&(w=u),u=u.sibling;null===(u=w)?(w=i.child,i.child=null):(w=u.sibling,u.sibling=null),xj(i,!1,w,u,x);break;case\"backwards\":for(u=null,w=i.child,i.child=null;null!==w;){if(null!==(s=w.alternate)&&null===Mh(s)){i.child=w;break}s=w.sibling,w.sibling=u,u=w,w=s}xj(i,!0,u,null,x);break;case\"together\":xj(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jj(s,i){0==(1&i.mode)&&null!==s&&(s.alternate=null,i.alternate=null,i.flags|=2)}function $i(s,i,u){if(null!==s&&(i.dependencies=s.dependencies),Yo|=i.lanes,0==(u&i.childLanes))return null;if(null!==s&&i.child!==s.child)throw Error(p(153));if(null!==i.child){for(u=wh(s=i.child,s.pendingProps),i.child=u,u.return=i;null!==s.sibling;)s=s.sibling,(u=u.sibling=wh(s,s.pendingProps)).return=i;u.sibling=null}return i.child}function Ej(s,i){if(!Un)switch(s.tailMode){case\"hidden\":i=s.tail;for(var u=null;null!==i;)null!==i.alternate&&(u=i),i=i.sibling;null===u?s.tail=null:u.sibling=null;break;case\"collapsed\":u=s.tail;for(var _=null;null!==u;)null!==u.alternate&&(_=u),u=u.sibling;null===_?i||null===s.tail?s.tail=null:s.tail.sibling=null:_.sibling=null}}function S(s){var i=null!==s.alternate&&s.alternate.child===s.child,u=0,_=0;if(i)for(var w=s.child;null!==w;)u|=w.lanes|w.childLanes,_|=14680064&w.subtreeFlags,_|=14680064&w.flags,w.return=s,w=w.sibling;else for(w=s.child;null!==w;)u|=w.lanes|w.childLanes,_|=w.subtreeFlags,_|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=_,s.childLanes=u,i}function Fj(s,i,u){var _=i.pendingProps;switch(wg(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(i),null;case 1:case 17:return Zf(i.type)&&$f(),S(i),null;case 3:return _=i.stateNode,Jh(),E(On),E(kn),Oh(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),null!==s&&null!==s.child||(Gg(i)?i.flags|=4:null===s||s.memoizedState.isDehydrated&&0==(256&i.flags)||(i.flags|=1024,null!==zn&&(Gj(zn),zn=null))),Oo(s,i),S(i),null;case 5:Lh(i);var w=Hh(oo.current);if(u=i.type,null!==s&&null!=i.stateNode)Co(s,i,u,_,w),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!_){if(null===i.stateNode)throw Error(p(166));return S(i),null}if(s=Hh(ro.current),Gg(i)){_=i.stateNode,u=i.type;var x=i.memoizedProps;switch(_[gn]=i,_[yn]=x,s=0!=(1&i.mode),u){case\"dialog\":D(\"cancel\",_),D(\"close\",_);break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",_);break;case\"video\":case\"audio\":for(w=0;w<nn.length;w++)D(nn[w],_);break;case\"source\":D(\"error\",_);break;case\"img\":case\"image\":case\"link\":D(\"error\",_),D(\"load\",_);break;case\"details\":D(\"toggle\",_);break;case\"input\":Za(_,x),D(\"invalid\",_);break;case\"select\":_._wrapperState={wasMultiple:!!x.multiple},D(\"invalid\",_);break;case\"textarea\":hb(_,x),D(\"invalid\",_)}for(var P in ub(u,x),w=null,x)if(x.hasOwnProperty(P)){var B=x[P];\"children\"===P?\"string\"==typeof B?_.textContent!==B&&(!0!==x.suppressHydrationWarning&&Af(_.textContent,B,s),w=[\"children\",B]):\"number\"==typeof B&&_.textContent!==\"\"+B&&(!0!==x.suppressHydrationWarning&&Af(_.textContent,B,s),w=[\"children\",\"\"+B]):j.hasOwnProperty(P)&&null!=B&&\"onScroll\"===P&&D(\"scroll\",_)}switch(u){case\"input\":Va(_),db(_,x,!0);break;case\"textarea\":Va(_),jb(_);break;case\"select\":case\"option\":break;default:\"function\"==typeof x.onClick&&(_.onclick=Bf)}_=w,i.updateQueue=_,null!==_&&(i.flags|=4)}else{P=9===w.nodeType?w:w.ownerDocument,\"http://www.w3.org/1999/xhtml\"===s&&(s=kb(u)),\"http://www.w3.org/1999/xhtml\"===s?\"script\"===u?((s=P.createElement(\"div\")).innerHTML=\"<script><\\/script>\",s=s.removeChild(s.firstChild)):\"string\"==typeof _.is?s=P.createElement(u,{is:_.is}):(s=P.createElement(u),\"select\"===u&&(P=s,_.multiple?P.multiple=!0:_.size&&(P.size=_.size))):s=P.createElementNS(s,u),s[gn]=i,s[yn]=_,ko(s,i,!1,!1),i.stateNode=s;e:{switch(P=vb(u,_),u){case\"dialog\":D(\"cancel\",s),D(\"close\",s),w=_;break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",s),w=_;break;case\"video\":case\"audio\":for(w=0;w<nn.length;w++)D(nn[w],s);w=_;break;case\"source\":D(\"error\",s),w=_;break;case\"img\":case\"image\":case\"link\":D(\"error\",s),D(\"load\",s),w=_;break;case\"details\":D(\"toggle\",s),w=_;break;case\"input\":Za(s,_),w=Ya(s,_),D(\"invalid\",s);break;case\"option\":default:w=_;break;case\"select\":s._wrapperState={wasMultiple:!!_.multiple},w=Re({},_,{value:void 0}),D(\"invalid\",s);break;case\"textarea\":hb(s,_),w=gb(s,_),D(\"invalid\",s)}for(x in ub(u,w),B=w)if(B.hasOwnProperty(x)){var $=B[x];\"style\"===x?sb(s,$):\"dangerouslySetInnerHTML\"===x?null!=($=$?$.__html:void 0)&&He(s,$):\"children\"===x?\"string\"==typeof $?(\"textarea\"!==u||\"\"!==$)&&ob(s,$):\"number\"==typeof $&&ob(s,\"\"+$):\"suppressContentEditableWarning\"!==x&&\"suppressHydrationWarning\"!==x&&\"autoFocus\"!==x&&(j.hasOwnProperty(x)?null!=$&&\"onScroll\"===x&&D(\"scroll\",s):null!=$&&ta(s,x,$,P))}switch(u){case\"input\":Va(s),db(s,_,!1);break;case\"textarea\":Va(s),jb(s);break;case\"option\":null!=_.value&&s.setAttribute(\"value\",\"\"+Sa(_.value));break;case\"select\":s.multiple=!!_.multiple,null!=(x=_.value)?fb(s,!!_.multiple,x,!1):null!=_.defaultValue&&fb(s,!!_.multiple,_.defaultValue,!0);break;default:\"function\"==typeof w.onClick&&(s.onclick=Bf)}switch(u){case\"button\":case\"input\":case\"select\":case\"textarea\":_=!!_.autoFocus;break e;case\"img\":_=!0;break e;default:_=!1}}_&&(i.flags|=4)}null!==i.ref&&(i.flags|=512,i.flags|=2097152)}return S(i),null;case 6:if(s&&null!=i.stateNode)Ao(s,i,s.memoizedProps,_);else{if(\"string\"!=typeof _&&null===i.stateNode)throw Error(p(166));if(u=Hh(oo.current),Hh(ro.current),Gg(i)){if(_=i.stateNode,u=i.memoizedProps,_[gn]=i,(x=_.nodeValue!==u)&&null!==(s=qn))switch(s.tag){case 3:Af(_.nodeValue,u,0!=(1&s.mode));break;case 5:!0!==s.memoizedProps.suppressHydrationWarning&&Af(_.nodeValue,u,0!=(1&s.mode))}x&&(i.flags|=4)}else(_=(9===u.nodeType?u:u.ownerDocument).createTextNode(_))[gn]=i,i.stateNode=_}return S(i),null;case 13:if(E(so),_=i.memoizedState,null===s||null!==s.memoizedState&&null!==s.memoizedState.dehydrated){if(Un&&null!==$n&&0!=(1&i.mode)&&0==(128&i.flags))Hg(),Ig(),i.flags|=98560,x=!1;else if(x=Gg(i),null!==_&&null!==_.dehydrated){if(null===s){if(!x)throw Error(p(318));if(!(x=null!==(x=i.memoizedState)?x.dehydrated:null))throw Error(p(317));x[gn]=i}else Ig(),0==(128&i.flags)&&(i.memoizedState=null),i.flags|=4;S(i),x=!1}else null!==zn&&(Gj(zn),zn=null),x=!0;if(!x)return 65536&i.flags?i:null}return 0!=(128&i.flags)?(i.lanes=u,i):((_=null!==_)!==(null!==s&&null!==s.memoizedState)&&_&&(i.child.flags|=8192,0!=(1&i.mode)&&(null===s||0!=(1&so.current)?0===Jo&&(Jo=3):uj())),null!==i.updateQueue&&(i.flags|=4),S(i),null);case 4:return Jh(),Oo(s,i),null===s&&sf(i.stateNode.containerInfo),S(i),null;case 10:return Rg(i.type._context),S(i),null;case 19:if(E(so),null===(x=i.memoizedState))return S(i),null;if(_=0!=(128&i.flags),null===(P=x.rendering))if(_)Ej(x,!1);else{if(0!==Jo||null!==s&&0!=(128&s.flags))for(s=i.child;null!==s;){if(null!==(P=Mh(s))){for(i.flags|=128,Ej(x,!1),null!==(_=P.updateQueue)&&(i.updateQueue=_,i.flags|=4),i.subtreeFlags=0,_=u,u=i.child;null!==u;)s=_,(x=u).flags&=14680066,null===(P=x.alternate)?(x.childLanes=0,x.lanes=s,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=P.childLanes,x.lanes=P.lanes,x.child=P.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=P.memoizedProps,x.memoizedState=P.memoizedState,x.updateQueue=P.updateQueue,x.type=P.type,s=P.dependencies,x.dependencies=null===s?null:{lanes:s.lanes,firstContext:s.firstContext}),u=u.sibling;return G(so,1&so.current|2),i.child}s=s.sibling}null!==x.tail&&yt()>rs&&(i.flags|=128,_=!0,Ej(x,!1),i.lanes=4194304)}else{if(!_)if(null!==(s=Mh(P))){if(i.flags|=128,_=!0,null!==(u=s.updateQueue)&&(i.updateQueue=u,i.flags|=4),Ej(x,!0),null===x.tail&&\"hidden\"===x.tailMode&&!P.alternate&&!Un)return S(i),null}else 2*yt()-x.renderingStartTime>rs&&1073741824!==u&&(i.flags|=128,_=!0,Ej(x,!1),i.lanes=4194304);x.isBackwards?(P.sibling=i.child,i.child=P):(null!==(u=x.last)?u.sibling=P:i.child=P,x.last=P)}return null!==x.tail?(i=x.tail,x.rendering=i,x.tail=i.sibling,x.renderingStartTime=yt(),i.sibling=null,u=so.current,G(so,_?1&u|2:1&u),i):(S(i),null);case 22:case 23:return Ij(),_=null!==i.memoizedState,null!==s&&null!==s.memoizedState!==_&&(i.flags|=8192),_&&0!=(1&i.mode)?0!=(1073741824&Ko)&&(S(i),6&i.subtreeFlags&&(i.flags|=8192)):S(i),null;case 24:case 25:return null}throw Error(p(156,i.tag))}function Jj(s,i){switch(wg(i),i.tag){case 1:return Zf(i.type)&&$f(),65536&(s=i.flags)?(i.flags=-65537&s|128,i):null;case 3:return Jh(),E(On),E(kn),Oh(),0!=(65536&(s=i.flags))&&0==(128&s)?(i.flags=-65537&s|128,i):null;case 5:return Lh(i),null;case 13:if(E(so),null!==(s=i.memoizedState)&&null!==s.dehydrated){if(null===i.alternate)throw Error(p(340));Ig()}return 65536&(s=i.flags)?(i.flags=-65537&s|128,i):null;case 19:return E(so),null;case 4:return Jh(),null;case 10:return Rg(i.type._context),null;case 22:case 23:return Ij(),null;default:return null}}ko=function(s,i){for(var u=i.child;null!==u;){if(5===u.tag||6===u.tag)s.appendChild(u.stateNode);else if(4!==u.tag&&null!==u.child){u.child.return=u,u=u.child;continue}if(u===i)break;for(;null===u.sibling;){if(null===u.return||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Oo=function(){},Co=function(s,i,u,_){var w=s.memoizedProps;if(w!==_){s=i.stateNode,Hh(ro.current);var x,P=null;switch(u){case\"input\":w=Ya(s,w),_=Ya(s,_),P=[];break;case\"select\":w=Re({},w,{value:void 0}),_=Re({},_,{value:void 0}),P=[];break;case\"textarea\":w=gb(s,w),_=gb(s,_),P=[];break;default:\"function\"!=typeof w.onClick&&\"function\"==typeof _.onClick&&(s.onclick=Bf)}for(U in ub(u,_),u=null,w)if(!_.hasOwnProperty(U)&&w.hasOwnProperty(U)&&null!=w[U])if(\"style\"===U){var B=w[U];for(x in B)B.hasOwnProperty(x)&&(u||(u={}),u[x]=\"\")}else\"dangerouslySetInnerHTML\"!==U&&\"children\"!==U&&\"suppressContentEditableWarning\"!==U&&\"suppressHydrationWarning\"!==U&&\"autoFocus\"!==U&&(j.hasOwnProperty(U)?P||(P=[]):(P=P||[]).push(U,null));for(U in _){var $=_[U];if(B=null!=w?w[U]:void 0,_.hasOwnProperty(U)&&$!==B&&(null!=$||null!=B))if(\"style\"===U)if(B){for(x in B)!B.hasOwnProperty(x)||$&&$.hasOwnProperty(x)||(u||(u={}),u[x]=\"\");for(x in $)$.hasOwnProperty(x)&&B[x]!==$[x]&&(u||(u={}),u[x]=$[x])}else u||(P||(P=[]),P.push(U,u)),u=$;else\"dangerouslySetInnerHTML\"===U?($=$?$.__html:void 0,B=B?B.__html:void 0,null!=$&&B!==$&&(P=P||[]).push(U,$)):\"children\"===U?\"string\"!=typeof $&&\"number\"!=typeof $||(P=P||[]).push(U,\"\"+$):\"suppressContentEditableWarning\"!==U&&\"suppressHydrationWarning\"!==U&&(j.hasOwnProperty(U)?(null!=$&&\"onScroll\"===U&&D(\"scroll\",s),P||B===$||(P=[])):(P=P||[]).push(U,$))}u&&(P=P||[]).push(\"style\",u);var U=P;(i.updateQueue=U)&&(i.flags|=4)}},Ao=function(s,i,u,_){u!==_&&(i.flags|=4)};var Po=!1,Io=!1,No=\"function\"==typeof WeakSet?WeakSet:Set,Mo=null;function Mj(s,i){var u=s.ref;if(null!==u)if(\"function\"==typeof u)try{u(null)}catch(u){W(s,i,u)}else u.current=null}function Nj(s,i,u){try{u()}catch(u){W(s,i,u)}}var To=!1;function Qj(s,i,u){var _=i.updateQueue;if(null!==(_=null!==_?_.lastEffect:null)){var w=_=_.next;do{if((w.tag&s)===s){var x=w.destroy;w.destroy=void 0,void 0!==x&&Nj(i,u,x)}w=w.next}while(w!==_)}}function Rj(s,i){if(null!==(i=null!==(i=i.updateQueue)?i.lastEffect:null)){var u=i=i.next;do{if((u.tag&s)===s){var _=u.create;u.destroy=_()}u=u.next}while(u!==i)}}function Sj(s){var i=s.ref;if(null!==i){var u=s.stateNode;s.tag,s=u,\"function\"==typeof i?i(s):i.current=s}}function Tj(s){var i=s.alternate;null!==i&&(s.alternate=null,Tj(i)),s.child=null,s.deletions=null,s.sibling=null,5===s.tag&&(null!==(i=s.stateNode)&&(delete i[gn],delete i[yn],delete i[bn],delete i[_n],delete i[En])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Uj(s){return 5===s.tag||3===s.tag||4===s.tag}function Vj(s){e:for(;;){for(;null===s.sibling;){if(null===s.return||Uj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;5!==s.tag&&6!==s.tag&&18!==s.tag;){if(2&s.flags)continue e;if(null===s.child||4===s.tag)continue e;s.child.return=s,s=s.child}if(!(2&s.flags))return s.stateNode}}function Wj(s,i,u){var _=s.tag;if(5===_||6===_)s=s.stateNode,i?8===u.nodeType?u.parentNode.insertBefore(s,i):u.insertBefore(s,i):(8===u.nodeType?(i=u.parentNode).insertBefore(s,u):(i=u).appendChild(s),null!=(u=u._reactRootContainer)||null!==i.onclick||(i.onclick=Bf));else if(4!==_&&null!==(s=s.child))for(Wj(s,i,u),s=s.sibling;null!==s;)Wj(s,i,u),s=s.sibling}function Xj(s,i,u){var _=s.tag;if(5===_||6===_)s=s.stateNode,i?u.insertBefore(s,i):u.appendChild(s);else if(4!==_&&null!==(s=s.child))for(Xj(s,i,u),s=s.sibling;null!==s;)Xj(s,i,u),s=s.sibling}var Ro=null,Do=!1;function Zj(s,i,u){for(u=u.child;null!==u;)ak(s,i,u),u=u.sibling}function ak(s,i,u){if(kt&&\"function\"==typeof kt.onCommitFiberUnmount)try{kt.onCommitFiberUnmount(xt,u)}catch(s){}switch(u.tag){case 5:Io||Mj(u,i);case 6:var _=Ro,w=Do;Ro=null,Zj(s,i,u),Do=w,null!==(Ro=_)&&(Do?(s=Ro,u=u.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):Ro.removeChild(u.stateNode));break;case 18:null!==Ro&&(Do?(s=Ro,u=u.stateNode,8===s.nodeType?Kf(s.parentNode,u):1===s.nodeType&&Kf(s,u),bd(s)):Kf(Ro,u.stateNode));break;case 4:_=Ro,w=Do,Ro=u.stateNode.containerInfo,Do=!0,Zj(s,i,u),Ro=_,Do=w;break;case 0:case 11:case 14:case 15:if(!Io&&(null!==(_=u.updateQueue)&&null!==(_=_.lastEffect))){w=_=_.next;do{var x=w,j=x.destroy;x=x.tag,void 0!==j&&(0!=(2&x)||0!=(4&x))&&Nj(u,i,j),w=w.next}while(w!==_)}Zj(s,i,u);break;case 1:if(!Io&&(Mj(u,i),\"function\"==typeof(_=u.stateNode).componentWillUnmount))try{_.props=u.memoizedProps,_.state=u.memoizedState,_.componentWillUnmount()}catch(s){W(u,i,s)}Zj(s,i,u);break;case 21:Zj(s,i,u);break;case 22:1&u.mode?(Io=(_=Io)||null!==u.memoizedState,Zj(s,i,u),Io=_):Zj(s,i,u);break;default:Zj(s,i,u)}}function bk(s){var i=s.updateQueue;if(null!==i){s.updateQueue=null;var u=s.stateNode;null===u&&(u=s.stateNode=new No),i.forEach((function(i){var _=ck.bind(null,s,i);u.has(i)||(u.add(i),i.then(_,_))}))}}function dk(s,i){var u=i.deletions;if(null!==u)for(var _=0;_<u.length;_++){var w=u[_];try{var x=s,j=i,P=j;e:for(;null!==P;){switch(P.tag){case 5:Ro=P.stateNode,Do=!1;break e;case 3:case 4:Ro=P.stateNode.containerInfo,Do=!0;break e}P=P.return}if(null===Ro)throw Error(p(160));ak(x,j,w),Ro=null,Do=!1;var B=w.alternate;null!==B&&(B.return=null),w.return=null}catch(s){W(w,i,s)}}if(12854&i.subtreeFlags)for(i=i.child;null!==i;)ek(i,s),i=i.sibling}function ek(s,i){var u=s.alternate,_=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(dk(i,s),fk(s),4&_){try{Qj(3,s,s.return),Rj(3,s)}catch(i){W(s,s.return,i)}try{Qj(5,s,s.return)}catch(i){W(s,s.return,i)}}break;case 1:dk(i,s),fk(s),512&_&&null!==u&&Mj(u,u.return);break;case 5:if(dk(i,s),fk(s),512&_&&null!==u&&Mj(u,u.return),32&s.flags){var w=s.stateNode;try{ob(w,\"\")}catch(i){W(s,s.return,i)}}if(4&_&&null!=(w=s.stateNode)){var x=s.memoizedProps,j=null!==u?u.memoizedProps:x,P=s.type,B=s.updateQueue;if(s.updateQueue=null,null!==B)try{\"input\"===P&&\"radio\"===x.type&&null!=x.name&&ab(w,x),vb(P,j);var $=vb(P,x);for(j=0;j<B.length;j+=2){var U=B[j],Y=B[j+1];\"style\"===U?sb(w,Y):\"dangerouslySetInnerHTML\"===U?He(w,Y):\"children\"===U?ob(w,Y):ta(w,U,Y,$)}switch(P){case\"input\":bb(w,x);break;case\"textarea\":ib(w,x);break;case\"select\":var X=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!x.multiple;var Z=x.value;null!=Z?fb(w,!!x.multiple,Z,!1):X!==!!x.multiple&&(null!=x.defaultValue?fb(w,!!x.multiple,x.defaultValue,!0):fb(w,!!x.multiple,x.multiple?[]:\"\",!1))}w[yn]=x}catch(i){W(s,s.return,i)}}break;case 6:if(dk(i,s),fk(s),4&_){if(null===s.stateNode)throw Error(p(162));w=s.stateNode,x=s.memoizedProps;try{w.nodeValue=x}catch(i){W(s,s.return,i)}}break;case 3:if(dk(i,s),fk(s),4&_&&null!==u&&u.memoizedState.isDehydrated)try{bd(i.containerInfo)}catch(i){W(s,s.return,i)}break;case 4:default:dk(i,s),fk(s);break;case 13:dk(i,s),fk(s),8192&(w=s.child).flags&&(x=null!==w.memoizedState,w.stateNode.isHidden=x,!x||null!==w.alternate&&null!==w.alternate.memoizedState||(ts=yt())),4&_&&bk(s);break;case 22:if(U=null!==u&&null!==u.memoizedState,1&s.mode?(Io=($=Io)||U,dk(i,s),Io=$):dk(i,s),fk(s),8192&_){if($=null!==s.memoizedState,(s.stateNode.isHidden=$)&&!U&&0!=(1&s.mode))for(Mo=s,U=s.child;null!==U;){for(Y=Mo=U;null!==Mo;){switch(Z=(X=Mo).child,X.tag){case 0:case 11:case 14:case 15:Qj(4,X,X.return);break;case 1:Mj(X,X.return);var ee=X.stateNode;if(\"function\"==typeof ee.componentWillUnmount){_=X,u=X.return;try{i=_,ee.props=i.memoizedProps,ee.state=i.memoizedState,ee.componentWillUnmount()}catch(s){W(_,u,s)}}break;case 5:Mj(X,X.return);break;case 22:if(null!==X.memoizedState){hk(Y);continue}}null!==Z?(Z.return=X,Mo=Z):hk(Y)}U=U.sibling}e:for(U=null,Y=s;;){if(5===Y.tag){if(null===U){U=Y;try{w=Y.stateNode,$?\"function\"==typeof(x=w.style).setProperty?x.setProperty(\"display\",\"none\",\"important\"):x.display=\"none\":(P=Y.stateNode,j=null!=(B=Y.memoizedProps.style)&&B.hasOwnProperty(\"display\")?B.display:null,P.style.display=rb(\"display\",j))}catch(i){W(s,s.return,i)}}}else if(6===Y.tag){if(null===U)try{Y.stateNode.nodeValue=$?\"\":Y.memoizedProps}catch(i){W(s,s.return,i)}}else if((22!==Y.tag&&23!==Y.tag||null===Y.memoizedState||Y===s)&&null!==Y.child){Y.child.return=Y,Y=Y.child;continue}if(Y===s)break e;for(;null===Y.sibling;){if(null===Y.return||Y.return===s)break e;U===Y&&(U=null),Y=Y.return}U===Y&&(U=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:dk(i,s),fk(s),4&_&&bk(s);case 21:}}function fk(s){var i=s.flags;if(2&i){try{e:{for(var u=s.return;null!==u;){if(Uj(u)){var _=u;break e}u=u.return}throw Error(p(160))}switch(_.tag){case 5:var w=_.stateNode;32&_.flags&&(ob(w,\"\"),_.flags&=-33),Xj(s,Vj(s),w);break;case 3:case 4:var x=_.stateNode.containerInfo;Wj(s,Vj(s),x);break;default:throw Error(p(161))}}catch(i){W(s,s.return,i)}s.flags&=-3}4096&i&&(s.flags&=-4097)}function ik(s,i,u){Mo=s,jk(s,i,u)}function jk(s,i,u){for(var _=0!=(1&s.mode);null!==Mo;){var w=Mo,x=w.child;if(22===w.tag&&_){var j=null!==w.memoizedState||Po;if(!j){var P=w.alternate,B=null!==P&&null!==P.memoizedState||Io;P=Po;var $=Io;if(Po=j,(Io=B)&&!$)for(Mo=w;null!==Mo;)B=(j=Mo).child,22===j.tag&&null!==j.memoizedState?kk(w):null!==B?(B.return=j,Mo=B):kk(w);for(;null!==x;)Mo=x,jk(x,i,u),x=x.sibling;Mo=w,Po=P,Io=$}lk(s)}else 0!=(8772&w.subtreeFlags)&&null!==x?(x.return=w,Mo=x):lk(s)}}function lk(s){for(;null!==Mo;){var i=Mo;if(0!=(8772&i.flags)){var u=i.alternate;try{if(0!=(8772&i.flags))switch(i.tag){case 0:case 11:case 15:Io||Rj(5,i);break;case 1:var _=i.stateNode;if(4&i.flags&&!Io)if(null===u)_.componentDidMount();else{var w=i.elementType===i.type?u.memoizedProps:Lg(i.type,u.memoizedProps);_.componentDidUpdate(w,u.memoizedState,_.__reactInternalSnapshotBeforeUpdate)}var x=i.updateQueue;null!==x&&ih(i,x,_);break;case 3:var j=i.updateQueue;if(null!==j){if(u=null,null!==i.child)switch(i.child.tag){case 5:case 1:u=i.child.stateNode}ih(i,j,u)}break;case 5:var P=i.stateNode;if(null===u&&4&i.flags){u=P;var B=i.memoizedProps;switch(i.type){case\"button\":case\"input\":case\"select\":case\"textarea\":B.autoFocus&&u.focus();break;case\"img\":B.src&&(u.src=B.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===i.memoizedState){var $=i.alternate;if(null!==$){var U=$.memoizedState;if(null!==U){var Y=U.dehydrated;null!==Y&&bd(Y)}}}break;default:throw Error(p(163))}Io||512&i.flags&&Sj(i)}catch(s){W(i,i.return,s)}}if(i===s){Mo=null;break}if(null!==(u=i.sibling)){u.return=i.return,Mo=u;break}Mo=i.return}}function hk(s){for(;null!==Mo;){var i=Mo;if(i===s){Mo=null;break}var u=i.sibling;if(null!==u){u.return=i.return,Mo=u;break}Mo=i.return}}function kk(s){for(;null!==Mo;){var i=Mo;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{Rj(4,i)}catch(s){W(i,u,s)}break;case 1:var _=i.stateNode;if(\"function\"==typeof _.componentDidMount){var w=i.return;try{_.componentDidMount()}catch(s){W(i,w,s)}}var x=i.return;try{Sj(i)}catch(s){W(i,x,s)}break;case 5:var j=i.return;try{Sj(i)}catch(s){W(i,j,s)}}}catch(s){W(i,i.return,s)}if(i===s){Mo=null;break}var P=i.sibling;if(null!==P){P.return=i.return,Mo=P;break}Mo=i.return}}var Bo,Lo=Math.ceil,Fo=ee.ReactCurrentDispatcher,qo=ee.ReactCurrentOwner,$o=ee.ReactCurrentBatchConfig,Uo=0,zo=null,Vo=null,Wo=0,Ko=0,Ho=Uf(0),Jo=0,Go=null,Yo=0,Xo=0,Qo=0,Zo=null,es=null,ts=0,rs=1/0,ns=null,os=!1,ss=null,as=null,ls=!1,cs=null,us=0,ps=0,hs=null,ds=-1,fs=0;function L(){return 0!=(6&Uo)?yt():-1!==ds?ds:ds=yt()}function lh(s){return 0==(1&s.mode)?1:0!=(2&Uo)&&0!==Wo?Wo&-Wo:null!==Vn.transition?(0===fs&&(fs=yc()),fs):0!==(s=It)?s:s=void 0===(s=window.event)?16:jd(s.type)}function mh(s,i,u,_){if(50<ps)throw ps=0,hs=null,Error(p(185));Ac(s,u,_),0!=(2&Uo)&&s===zo||(s===zo&&(0==(2&Uo)&&(Xo|=u),4===Jo&&Dk(s,Wo)),Ek(s,_),1===u&&0===Uo&&0==(1&i.mode)&&(rs=yt()+500,jn&&jg()))}function Ek(s,i){var u=s.callbackNode;!function wc(s,i){for(var u=s.suspendedLanes,_=s.pingedLanes,w=s.expirationTimes,x=s.pendingLanes;0<x;){var j=31-Ot(x),P=1<<j,B=w[j];-1===B?0!=(P&u)&&0==(P&_)||(w[j]=vc(P,i)):B<=i&&(s.expiredLanes|=P),x&=~P}}(s,i);var _=uc(s,s===zo?Wo:0);if(0===_)null!==u&&dt(u),s.callbackNode=null,s.callbackPriority=0;else if(i=_&-_,s.callbackPriority!==i){if(null!=u&&dt(u),1===i)0===s.tag?function ig(s){jn=!0,hg(s)}(Fk.bind(null,s)):hg(Fk.bind(null,s)),fn((function(){0==(6&Uo)&&jg()})),u=null;else{switch(Dc(_)){case 1:u=bt;break;case 4:u=_t;break;case 16:default:u=Et;break;case 536870912:u=St}u=Gk(u,Hk.bind(null,s))}s.callbackPriority=i,s.callbackNode=u}}function Hk(s,i){if(ds=-1,fs=0,0!=(6&Uo))throw Error(p(327));var u=s.callbackNode;if(Ik()&&s.callbackNode!==u)return null;var _=uc(s,s===zo?Wo:0);if(0===_)return null;if(0!=(30&_)||0!=(_&s.expiredLanes)||i)i=Jk(s,_);else{i=_;var w=Uo;Uo|=2;var x=Kk();for(zo===s&&Wo===i||(ns=null,rs=yt()+500,Lk(s,i));;)try{Mk();break}catch(i){Nk(s,i)}Qg(),Fo.current=x,Uo=w,null!==Vo?i=0:(zo=null,Wo=0,i=Jo)}if(0!==i){if(2===i&&(0!==(w=xc(s))&&(_=w,i=Ok(s,w))),1===i)throw u=Go,Lk(s,0),Dk(s,_),Ek(s,yt()),u;if(6===i)Dk(s,_);else{if(w=s.current.alternate,0==(30&_)&&!function Pk(s){for(var i=s;;){if(16384&i.flags){var u=i.updateQueue;if(null!==u&&null!==(u=u.stores))for(var _=0;_<u.length;_++){var w=u[_],x=w.getSnapshot;w=w.value;try{if(!qr(x(),w))return!1}catch(s){return!1}}}if(u=i.child,16384&i.subtreeFlags&&null!==u)u.return=i,i=u;else{if(i===s)break;for(;null===i.sibling;){if(null===i.return||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}(w)&&(2===(i=Jk(s,_))&&(0!==(x=xc(s))&&(_=x,i=Ok(s,x))),1===i))throw u=Go,Lk(s,0),Dk(s,_),Ek(s,yt()),u;switch(s.finishedWork=w,s.finishedLanes=_,i){case 0:case 1:throw Error(p(345));case 2:case 5:Qk(s,es,ns);break;case 3:if(Dk(s,_),(130023424&_)===_&&10<(i=ts+500-yt())){if(0!==uc(s,0))break;if(((w=s.suspendedLanes)&_)!==_){L(),s.pingedLanes|=s.suspendedLanes&w;break}s.timeoutHandle=pn(Qk.bind(null,s,es,ns),i);break}Qk(s,es,ns);break;case 4:if(Dk(s,_),(4194240&_)===_)break;for(i=s.eventTimes,w=-1;0<_;){var j=31-Ot(_);x=1<<j,(j=i[j])>w&&(w=j),_&=~x}if(_=w,10<(_=(120>(_=yt()-_)?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Lo(_/1960))-_)){s.timeoutHandle=pn(Qk.bind(null,s,es,ns),_);break}Qk(s,es,ns);break;default:throw Error(p(329))}}}return Ek(s,yt()),s.callbackNode===u?Hk.bind(null,s):null}function Ok(s,i){var u=Zo;return s.current.memoizedState.isDehydrated&&(Lk(s,i).flags|=256),2!==(s=Jk(s,i))&&(i=es,es=u,null!==i&&Gj(i)),s}function Gj(s){null===es?es=s:es.push.apply(es,s)}function Dk(s,i){for(i&=~Qo,i&=~Xo,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var u=31-Ot(i),_=1<<u;s[u]=-1,i&=~_}}function Fk(s){if(0!=(6&Uo))throw Error(p(327));Ik();var i=uc(s,0);if(0==(1&i))return Ek(s,yt()),null;var u=Jk(s,i);if(0!==s.tag&&2===u){var _=xc(s);0!==_&&(i=_,u=Ok(s,_))}if(1===u)throw u=Go,Lk(s,0),Dk(s,i),Ek(s,yt()),u;if(6===u)throw Error(p(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Qk(s,es,ns),Ek(s,yt()),null}function Rk(s,i){var u=Uo;Uo|=1;try{return s(i)}finally{0===(Uo=u)&&(rs=yt()+500,jn&&jg())}}function Sk(s){null!==cs&&0===cs.tag&&0==(6&Uo)&&Ik();var i=Uo;Uo|=1;var u=$o.transition,_=It;try{if($o.transition=null,It=1,s)return s()}finally{It=_,$o.transition=u,0==(6&(Uo=i))&&jg()}}function Ij(){Ko=Ho.current,E(Ho)}function Lk(s,i){s.finishedWork=null,s.finishedLanes=0;var u=s.timeoutHandle;if(-1!==u&&(s.timeoutHandle=-1,hn(u)),null!==Vo)for(u=Vo.return;null!==u;){var _=u;switch(wg(_),_.tag){case 1:null!=(_=_.type.childContextTypes)&&$f();break;case 3:Jh(),E(On),E(kn),Oh();break;case 5:Lh(_);break;case 4:Jh();break;case 13:case 19:E(so);break;case 10:Rg(_.type._context);break;case 22:case 23:Ij()}u=u.return}if(zo=s,Vo=s=wh(s.current,null),Wo=Ko=i,Jo=0,Go=null,Qo=Xo=Yo=0,es=Zo=null,null!==Gn){for(i=0;i<Gn.length;i++)if(null!==(_=(u=Gn[i]).interleaved)){u.interleaved=null;var w=_.next,x=u.pending;if(null!==x){var j=x.next;x.next=w,_.next=j}u.pending=_}Gn=null}return s}function Nk(s,i){for(;;){var u=Vo;try{if(Qg(),ao.current=vo,fo){for(var _=uo.memoizedState;null!==_;){var w=_.queue;null!==w&&(w.pending=null),_=_.next}fo=!1}if(co=0,ho=po=uo=null,mo=!1,go=0,qo.current=null,null===u||null===u.return){Jo=1,Go=i,Vo=null;break}e:{var x=s,j=u.return,P=u,B=i;if(i=Wo,P.flags|=32768,null!==B&&\"object\"==typeof B&&\"function\"==typeof B.then){var $=B,U=P,Y=U.tag;if(0==(1&U.mode)&&(0===Y||11===Y||15===Y)){var X=U.alternate;X?(U.updateQueue=X.updateQueue,U.memoizedState=X.memoizedState,U.lanes=X.lanes):(U.updateQueue=null,U.memoizedState=null)}var Z=Vi(j);if(null!==Z){Z.flags&=-257,Wi(Z,j,P,0,i),1&Z.mode&&Ti(x,$,i),B=$;var ee=(i=Z).updateQueue;if(null===ee){var ie=new Set;ie.add(B),i.updateQueue=ie}else ee.add(B);break e}if(0==(1&i)){Ti(x,$,i),uj();break e}B=Error(p(426))}else if(Un&&1&P.mode){var ae=Vi(j);if(null!==ae){0==(65536&ae.flags)&&(ae.flags|=256),Wi(ae,j,P,0,i),Jg(Ki(B,P));break e}}x=B=Ki(B,P),4!==Jo&&(Jo=2),null===Zo?Zo=[x]:Zo.push(x),x=j;do{switch(x.tag){case 3:x.flags|=65536,i&=-i,x.lanes|=i,fh(x,Oi(0,B,i));break e;case 1:P=B;var le=x.type,ce=x.stateNode;if(0==(128&x.flags)&&(\"function\"==typeof le.getDerivedStateFromError||null!==ce&&\"function\"==typeof ce.componentDidCatch&&(null===as||!as.has(ce)))){x.flags|=65536,i&=-i,x.lanes|=i,fh(x,Ri(x,P,i));break e}}x=x.return}while(null!==x)}Tk(u)}catch(s){i=s,Vo===u&&null!==u&&(Vo=u=u.return);continue}break}}function Kk(){var s=Fo.current;return Fo.current=vo,null===s?vo:s}function uj(){0!==Jo&&3!==Jo&&2!==Jo||(Jo=4),null===zo||0==(268435455&Yo)&&0==(268435455&Xo)||Dk(zo,Wo)}function Jk(s,i){var u=Uo;Uo|=2;var _=Kk();for(zo===s&&Wo===i||(ns=null,Lk(s,i));;)try{Uk();break}catch(i){Nk(s,i)}if(Qg(),Uo=u,Fo.current=_,null!==Vo)throw Error(p(261));return zo=null,Wo=0,Jo}function Uk(){for(;null!==Vo;)Vk(Vo)}function Mk(){for(;null!==Vo&&!mt();)Vk(Vo)}function Vk(s){var i=Bo(s.alternate,s,Ko);s.memoizedProps=s.pendingProps,null===i?Tk(s):Vo=i,qo.current=null}function Tk(s){var i=s;do{var u=i.alternate;if(s=i.return,0==(32768&i.flags)){if(null!==(u=Fj(u,i,Ko)))return void(Vo=u)}else{if(null!==(u=Jj(u,i)))return u.flags&=32767,void(Vo=u);if(null===s)return Jo=6,void(Vo=null);s.flags|=32768,s.subtreeFlags=0,s.deletions=null}if(null!==(i=i.sibling))return void(Vo=i);Vo=i=s}while(null!==i);0===Jo&&(Jo=5)}function Qk(s,i,u){var _=It,w=$o.transition;try{$o.transition=null,It=1,function Xk(s,i,u,_){do{Ik()}while(null!==cs);if(0!=(6&Uo))throw Error(p(327));u=s.finishedWork;var w=s.finishedLanes;if(null===u)return null;if(s.finishedWork=null,s.finishedLanes=0,u===s.current)throw Error(p(177));s.callbackNode=null,s.callbackPriority=0;var x=u.lanes|u.childLanes;if(function Bc(s,i){var u=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var _=s.eventTimes;for(s=s.expirationTimes;0<u;){var w=31-Ot(u),x=1<<w;i[w]=0,_[w]=-1,s[w]=-1,u&=~x}}(s,x),s===zo&&(Vo=zo=null,Wo=0),0==(2064&u.subtreeFlags)&&0==(2064&u.flags)||ls||(ls=!0,Gk(Et,(function(){return Ik(),null}))),x=0!=(15990&u.flags),0!=(15990&u.subtreeFlags)||x){x=$o.transition,$o.transition=null;var j=It;It=1;var P=Uo;Uo|=4,qo.current=null,function Pj(s,i){if(cn=Ht,Ne(s=Me())){if(\"selectionStart\"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var _=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(_&&0!==_.rangeCount){u=_.anchorNode;var w=_.anchorOffset,x=_.focusNode;_=_.focusOffset;try{u.nodeType,x.nodeType}catch(s){u=null;break e}var j=0,P=-1,B=-1,$=0,U=0,Y=s,X=null;t:for(;;){for(var Z;Y!==u||0!==w&&3!==Y.nodeType||(P=j+w),Y!==x||0!==_&&3!==Y.nodeType||(B=j+_),3===Y.nodeType&&(j+=Y.nodeValue.length),null!==(Z=Y.firstChild);)X=Y,Y=Z;for(;;){if(Y===s)break t;if(X===u&&++$===w&&(P=j),X===x&&++U===_&&(B=j),null!==(Z=Y.nextSibling))break;X=(Y=X).parentNode}Y=Z}u=-1===P||-1===B?null:{start:P,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(un={focusedElem:s,selectionRange:u},Ht=!1,Mo=i;null!==Mo;)if(s=(i=Mo).child,0!=(1028&i.subtreeFlags)&&null!==s)s.return=i,Mo=s;else for(;null!==Mo;){i=Mo;try{var ee=i.alternate;if(0!=(1024&i.flags))switch(i.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==ee){var ie=ee.memoizedProps,ae=ee.memoizedState,le=i.stateNode,ce=le.getSnapshotBeforeUpdate(i.elementType===i.type?ie:Lg(i.type,ie),ae);le.__reactInternalSnapshotBeforeUpdate=ce}break;case 3:var pe=i.stateNode.containerInfo;1===pe.nodeType?pe.textContent=\"\":9===pe.nodeType&&pe.documentElement&&pe.removeChild(pe.documentElement);break;default:throw Error(p(163))}}catch(s){W(i,i.return,s)}if(null!==(s=i.sibling)){s.return=i.return,Mo=s;break}Mo=i.return}return ee=To,To=!1,ee}(s,u),ek(u,s),Oe(un),Ht=!!cn,un=cn=null,s.current=u,ik(u,s,w),gt(),Uo=P,It=j,$o.transition=x}else s.current=u;if(ls&&(ls=!1,cs=s,us=w),x=s.pendingLanes,0===x&&(as=null),function mc(s){if(kt&&\"function\"==typeof kt.onCommitFiberRoot)try{kt.onCommitFiberRoot(xt,s,void 0,128==(128&s.current.flags))}catch(s){}}(u.stateNode),Ek(s,yt()),null!==i)for(_=s.onRecoverableError,u=0;u<i.length;u++)w=i[u],_(w.value,{componentStack:w.stack,digest:w.digest});if(os)throw os=!1,s=ss,ss=null,s;return 0!=(1&us)&&0!==s.tag&&Ik(),x=s.pendingLanes,0!=(1&x)?s===hs?ps++:(ps=0,hs=s):ps=0,jg(),null}(s,i,u,_)}finally{$o.transition=w,It=_}return null}function Ik(){if(null!==cs){var s=Dc(us),i=$o.transition,u=It;try{if($o.transition=null,It=16>s?16:s,null===cs)var _=!1;else{if(s=cs,cs=null,us=0,0!=(6&Uo))throw Error(p(331));var w=Uo;for(Uo|=4,Mo=s.current;null!==Mo;){var x=Mo,j=x.child;if(0!=(16&Mo.flags)){var P=x.deletions;if(null!==P){for(var B=0;B<P.length;B++){var $=P[B];for(Mo=$;null!==Mo;){var U=Mo;switch(U.tag){case 0:case 11:case 15:Qj(8,U,x)}var Y=U.child;if(null!==Y)Y.return=U,Mo=Y;else for(;null!==Mo;){var X=(U=Mo).sibling,Z=U.return;if(Tj(U),U===$){Mo=null;break}if(null!==X){X.return=Z,Mo=X;break}Mo=Z}}}var ee=x.alternate;if(null!==ee){var ie=ee.child;if(null!==ie){ee.child=null;do{var ae=ie.sibling;ie.sibling=null,ie=ae}while(null!==ie)}}Mo=x}}if(0!=(2064&x.subtreeFlags)&&null!==j)j.return=x,Mo=j;else e:for(;null!==Mo;){if(0!=(2048&(x=Mo).flags))switch(x.tag){case 0:case 11:case 15:Qj(9,x,x.return)}var le=x.sibling;if(null!==le){le.return=x.return,Mo=le;break e}Mo=x.return}}var ce=s.current;for(Mo=ce;null!==Mo;){var pe=(j=Mo).child;if(0!=(2064&j.subtreeFlags)&&null!==pe)pe.return=j,Mo=pe;else e:for(j=ce;null!==Mo;){if(0!=(2048&(P=Mo).flags))try{switch(P.tag){case 0:case 11:case 15:Rj(9,P)}}catch(s){W(P,P.return,s)}if(P===j){Mo=null;break e}var de=P.sibling;if(null!==de){de.return=P.return,Mo=de;break e}Mo=P.return}}if(Uo=w,jg(),kt&&\"function\"==typeof kt.onPostCommitFiberRoot)try{kt.onPostCommitFiberRoot(xt,s)}catch(s){}_=!0}return _}finally{It=u,$o.transition=i}}return!1}function Yk(s,i,u){s=dh(s,i=Oi(0,i=Ki(u,i),1),1),i=L(),null!==s&&(Ac(s,1,i),Ek(s,i))}function W(s,i,u){if(3===s.tag)Yk(s,s,u);else for(;null!==i;){if(3===i.tag){Yk(i,s,u);break}if(1===i.tag){var _=i.stateNode;if(\"function\"==typeof i.type.getDerivedStateFromError||\"function\"==typeof _.componentDidCatch&&(null===as||!as.has(_))){i=dh(i,s=Ri(i,s=Ki(u,s),1),1),s=L(),null!==i&&(Ac(i,1,s),Ek(i,s));break}}i=i.return}}function Ui(s,i,u){var _=s.pingCache;null!==_&&_.delete(i),i=L(),s.pingedLanes|=s.suspendedLanes&u,zo===s&&(Wo&u)===u&&(4===Jo||3===Jo&&(130023424&Wo)===Wo&&500>yt()-ts?Lk(s,0):Qo|=u),Ek(s,i)}function Zk(s,i){0===i&&(0==(1&s.mode)?i=1:(i=Pt,0==(130023424&(Pt<<=1))&&(Pt=4194304)));var u=L();null!==(s=Zg(s,i))&&(Ac(s,i,u),Ek(s,u))}function vj(s){var i=s.memoizedState,u=0;null!==i&&(u=i.retryLane),Zk(s,u)}function ck(s,i){var u=0;switch(s.tag){case 13:var _=s.stateNode,w=s.memoizedState;null!==w&&(u=w.retryLane);break;case 19:_=s.stateNode;break;default:throw Error(p(314))}null!==_&&_.delete(i),Zk(s,u)}function Gk(s,i){return ht(s,i)}function al(s,i,u,_){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,i,u,_){return new al(s,i,u,_)}function bj(s){return!(!(s=s.prototype)||!s.isReactComponent)}function wh(s,i){var u=s.alternate;return null===u?((u=Bg(s.tag,i,s.key,s.mode)).elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=i,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=14680064&s.flags,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,i=s.dependencies,u.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u}function yh(s,i,u,_,w,x){var j=2;if(_=s,\"function\"==typeof s)bj(s)&&(j=1);else if(\"string\"==typeof s)j=5;else e:switch(s){case le:return Ah(u.children,w,x,i);case ce:j=8,w|=8;break;case pe:return(s=Bg(12,u,i,2|w)).elementType=pe,s.lanes=x,s;case be:return(s=Bg(13,u,i,w)).elementType=be,s.lanes=x,s;case _e:return(s=Bg(19,u,i,w)).elementType=_e,s.lanes=x,s;case xe:return qj(u,w,x,i);default:if(\"object\"==typeof s&&null!==s)switch(s.$$typeof){case de:j=10;break e;case fe:j=9;break e;case ye:j=11;break e;case we:j=14;break e;case Se:j=16,_=null;break e}throw Error(p(130,null==s?s:typeof s,\"\"))}return(i=Bg(j,u,i,w)).elementType=s,i.type=_,i.lanes=x,i}function Ah(s,i,u,_){return(s=Bg(7,s,_,i)).lanes=u,s}function qj(s,i,u,_){return(s=Bg(22,s,_,i)).elementType=xe,s.lanes=u,s.stateNode={isHidden:!1},s}function xh(s,i,u){return(s=Bg(6,s,null,i)).lanes=u,s}function zh(s,i,u){return(i=Bg(4,null!==s.children?s.children:[],s.key,i)).lanes=u,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function bl(s,i,u,_,w){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=_,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function cl(s,i,u,_,w,x,j,P,B){return s=new bl(s,i,u,P,B),1===i?(i=1,!0===x&&(i|=8)):i=0,x=Bg(3,null,null,i),s.current=x,x.stateNode=s,x.memoizedState={element:_,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(x),s}function el(s){if(!s)return xn;e:{if(Vb(s=s._reactInternals)!==s||1!==s.tag)throw Error(p(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Zf(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(null!==i);throw Error(p(171))}if(1===s.tag){var u=s.type;if(Zf(u))return bg(s,u,i)}return i}function fl(s,i,u,_,w,x,j,P,B){return(s=cl(u,_,!0,s,0,x,0,P,B)).context=el(null),u=s.current,(x=ch(_=L(),w=lh(u))).callback=null!=i?i:null,dh(u,x,w),s.current.lanes=w,Ac(s,w,_),Ek(s,_),s}function gl(s,i,u,_){var w=i.current,x=L(),j=lh(w);return u=el(u),null===i.context?i.context=u:i.pendingContext=u,(i=ch(x,j)).payload={element:s},null!==(_=void 0===_?null:_)&&(i.callback=_),null!==(s=dh(w,i,j))&&(mh(s,w,j,x),eh(s,w,j)),j}function hl(s){return(s=s.current).child?(s.child.tag,s.child.stateNode):null}function il(s,i){if(null!==(s=s.memoizedState)&&null!==s.dehydrated){var u=s.retryLane;s.retryLane=0!==u&&u<i?u:i}}function jl(s,i){il(s,i),(s=s.alternate)&&il(s,i)}Bo=function(s,i,u){if(null!==s)if(s.memoizedProps!==i.pendingProps||On.current)xo=!0;else{if(0==(s.lanes&u)&&0==(128&i.flags))return xo=!1,function zj(s,i,u){switch(i.tag){case 3:lj(i),Ig();break;case 5:Kh(i);break;case 1:Zf(i.type)&&cg(i);break;case 4:Ih(i,i.stateNode.containerInfo);break;case 10:var _=i.type._context,w=i.memoizedProps.value;G(Wn,_._currentValue),_._currentValue=w;break;case 13:if(null!==(_=i.memoizedState))return null!==_.dehydrated?(G(so,1&so.current),i.flags|=128,null):0!=(u&i.child.childLanes)?pj(s,i,u):(G(so,1&so.current),null!==(s=$i(s,i,u))?s.sibling:null);G(so,1&so.current);break;case 19:if(_=0!=(u&i.childLanes),0!=(128&s.flags)){if(_)return yj(s,i,u);i.flags|=128}if(null!==(w=i.memoizedState)&&(w.rendering=null,w.tail=null,w.lastEffect=null),G(so,so.current),_)break;return null;case 22:case 23:return i.lanes=0,ej(s,i,u)}return $i(s,i,u)}(s,i,u);xo=0!=(131072&s.flags)}else xo=!1,Un&&0!=(1048576&i.flags)&&ug(i,Tn,i.index);switch(i.lanes=0,i.tag){case 2:var _=i.type;jj(s,i),s=i.pendingProps;var w=Yf(i,kn.current);Tg(i,u),w=Xh(null,i,_,s,w,u);var x=bi();return i.flags|=1,\"object\"==typeof w&&null!==w&&\"function\"==typeof w.render&&void 0===w.$$typeof?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Zf(_)?(x=!0,cg(i)):x=!1,i.memoizedState=null!==w.state&&void 0!==w.state?w.state:null,ah(i),w.updater=Qn,i.stateNode=w,w._reactInternals=i,rh(i,_,s,u),i=kj(null,i,_,!0,x,u)):(i.tag=0,Un&&x&&vg(i),Yi(null,i,w,u),i=i.child),i;case 16:_=i.elementType;e:{switch(jj(s,i),s=i.pendingProps,_=(w=_._init)(_._payload),i.type=_,w=i.tag=function $k(s){if(\"function\"==typeof s)return bj(s)?1:0;if(null!=s){if((s=s.$$typeof)===ye)return 11;if(s===we)return 14}return 2}(_),s=Lg(_,s),w){case 0:i=dj(null,i,_,s,u);break e;case 1:i=ij(null,i,_,s,u);break e;case 11:i=Zi(null,i,_,s,u);break e;case 14:i=aj(null,i,_,Lg(_.type,s),u);break e}throw Error(p(306,_,\"\"))}return i;case 0:return _=i.type,w=i.pendingProps,dj(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 1:return _=i.type,w=i.pendingProps,ij(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 3:e:{if(lj(i),null===s)throw Error(p(387));_=i.pendingProps,w=(x=i.memoizedState).element,bh(s,i),gh(i,_,null,u);var j=i.memoizedState;if(_=j.element,x.isDehydrated){if(x={element:_,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},i.updateQueue.baseState=x,i.memoizedState=x,256&i.flags){i=mj(s,i,_,u,w=Ki(Error(p(423)),i));break e}if(_!==w){i=mj(s,i,_,u,w=Ki(Error(p(424)),i));break e}for($n=Lf(i.stateNode.containerInfo.firstChild),qn=i,Un=!0,zn=null,u=eo(i,null,_,u),i.child=u;u;)u.flags=-3&u.flags|4096,u=u.sibling}else{if(Ig(),_===w){i=$i(s,i,u);break e}Yi(s,i,_,u)}i=i.child}return i;case 5:return Kh(i),null===s&&Eg(i),_=i.type,w=i.pendingProps,x=null!==s?s.memoizedProps:null,j=w.children,Ef(_,w)?j=null:null!==x&&Ef(_,x)&&(i.flags|=32),hj(s,i),Yi(s,i,j,u),i.child;case 6:return null===s&&Eg(i),null;case 13:return pj(s,i,u);case 4:return Ih(i,i.stateNode.containerInfo),_=i.pendingProps,null===s?i.child=Zn(i,null,_,u):Yi(s,i,_,u),i.child;case 11:return _=i.type,w=i.pendingProps,Zi(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 7:return Yi(s,i,i.pendingProps,u),i.child;case 8:case 12:return Yi(s,i,i.pendingProps.children,u),i.child;case 10:e:{if(_=i.type._context,w=i.pendingProps,x=i.memoizedProps,j=w.value,G(Wn,_._currentValue),_._currentValue=j,null!==x)if(qr(x.value,j)){if(x.children===w.children&&!On.current){i=$i(s,i,u);break e}}else for(null!==(x=i.child)&&(x.return=i);null!==x;){var P=x.dependencies;if(null!==P){j=x.child;for(var B=P.firstContext;null!==B;){if(B.context===_){if(1===x.tag){(B=ch(-1,u&-u)).tag=2;var $=x.updateQueue;if(null!==$){var U=($=$.shared).pending;null===U?B.next=B:(B.next=U.next,U.next=B),$.pending=B}}x.lanes|=u,null!==(B=x.alternate)&&(B.lanes|=u),Sg(x.return,u,i),P.lanes|=u;break}B=B.next}}else if(10===x.tag)j=x.type===i.type?null:x.child;else if(18===x.tag){if(null===(j=x.return))throw Error(p(341));j.lanes|=u,null!==(P=j.alternate)&&(P.lanes|=u),Sg(j,u,i),j=x.sibling}else j=x.child;if(null!==j)j.return=x;else for(j=x;null!==j;){if(j===i){j=null;break}if(null!==(x=j.sibling)){x.return=j.return,j=x;break}j=j.return}x=j}Yi(s,i,w.children,u),i=i.child}return i;case 9:return w=i.type,_=i.pendingProps.children,Tg(i,u),_=_(w=Vg(w)),i.flags|=1,Yi(s,i,_,u),i.child;case 14:return w=Lg(_=i.type,i.pendingProps),aj(s,i,_,w=Lg(_.type,w),u);case 15:return cj(s,i,i.type,i.pendingProps,u);case 17:return _=i.type,w=i.pendingProps,w=i.elementType===_?w:Lg(_,w),jj(s,i),i.tag=1,Zf(_)?(s=!0,cg(i)):s=!1,Tg(i,u),ph(i,_,w),rh(i,_,w,u),kj(null,i,_,!0,s,u);case 19:return yj(s,i,u);case 22:return ej(s,i,u)}throw Error(p(156,i.tag))};var ms=\"function\"==typeof reportError?reportError:function(s){console.error(s)};function ml(s){this._internalRoot=s}function nl(s){this._internalRoot=s}function ol(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType)}function pl(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType&&(8!==s.nodeType||\" react-mount-point-unstable \"!==s.nodeValue))}function ql(){}function sl(s,i,u,_,w){var x=u._reactRootContainer;if(x){var j=x;if(\"function\"==typeof w){var P=w;w=function(){var s=hl(j);P.call(s)}}gl(i,j,s,w)}else j=function rl(s,i,u,_,w){if(w){if(\"function\"==typeof _){var x=_;_=function(){var s=hl(j);x.call(s)}}var j=fl(i,_,s,0,null,!1,0,\"\",ql);return s._reactRootContainer=j,s[vn]=j.current,sf(8===s.nodeType?s.parentNode:s),Sk(),j}for(;w=s.lastChild;)s.removeChild(w);if(\"function\"==typeof _){var P=_;_=function(){var s=hl(B);P.call(s)}}var B=cl(s,0,!1,null,0,!1,0,\"\",ql);return s._reactRootContainer=B,s[vn]=B.current,sf(8===s.nodeType?s.parentNode:s),Sk((function(){gl(i,B,u,_)})),B}(u,i,s,w,_);return hl(j)}nl.prototype.render=ml.prototype.render=function(s){var i=this._internalRoot;if(null===i)throw Error(p(409));gl(s,i,null,null)},nl.prototype.unmount=ml.prototype.unmount=function(){var s=this._internalRoot;if(null!==s){this._internalRoot=null;var i=s.containerInfo;Sk((function(){gl(null,s,null,null)})),i[vn]=null}},nl.prototype.unstable_scheduleHydration=function(s){if(s){var i=Rt();s={blockedOn:null,target:s,priority:i};for(var u=0;u<Vt.length&&0!==i&&i<Vt[u].priority;u++);Vt.splice(u,0,s),0===u&&Vc(s)}},Nt=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var u=tc(i.pendingLanes);0!==u&&(Cc(i,1|u),Ek(i,yt()),0==(6&Uo)&&(rs=yt()+500,jg()))}break;case 13:Sk((function(){var i=Zg(s,1);if(null!==i){var u=L();mh(i,s,1,u)}})),jl(s,1)}},Mt=function(s){if(13===s.tag){var i=Zg(s,134217728);if(null!==i)mh(i,s,134217728,L());jl(s,134217728)}},Tt=function(s){if(13===s.tag){var i=lh(s),u=Zg(s,i);if(null!==u)mh(u,s,i,L());jl(s,i)}},Rt=function(){return It},Dt=function(s,i){var u=It;try{return It=s,i()}finally{It=u}},tt=function(s,i,u){switch(i){case\"input\":if(bb(s,u),i=u.name,\"radio\"===u.type&&null!=i){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+i)+'][type=\"radio\"]'),i=0;i<u.length;i++){var _=u[i];if(_!==s&&_.form===s.form){var w=Db(_);if(!w)throw Error(p(90));Wa(_),bb(_,w)}}}break;case\"textarea\":ib(s,u);break;case\"select\":null!=(i=u.value)&&fb(s,!!u.multiple,i,!1)}},Gb=Rk,Hb=Sk;var gs={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ys={findFiberByHostInstance:Wc,bundleType:0,version:\"18.2.0\",rendererPackageName:\"react-dom\"},vs={bundleType:ys.bundleType,version:ys.version,rendererPackageName:ys.rendererPackageName,rendererConfig:ys.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return null===(s=Zb(s))?null:s.stateNode},findFiberByHostInstance:ys.findFiberByHostInstance||function kl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.2.0-next-9e3b772b8-20220608\"};if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bs.isDisabled&&bs.supportsFiber)try{xt=bs.inject(vs),kt=bs}catch(We){}}i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gs,i.createPortal=function(s,i){var u=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ol(i))throw Error(p(200));return function dl(s,i,u){var _=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ae,key:null==_?null:\"\"+_,children:s,containerInfo:i,implementation:u}}(s,i,null,u)},i.createRoot=function(s,i){if(!ol(s))throw Error(p(299));var u=!1,_=\"\",w=ms;return null!=i&&(!0===i.unstable_strictMode&&(u=!0),void 0!==i.identifierPrefix&&(_=i.identifierPrefix),void 0!==i.onRecoverableError&&(w=i.onRecoverableError)),i=cl(s,1,!1,null,0,u,0,_,w),s[vn]=i.current,sf(8===s.nodeType?s.parentNode:s),new ml(i)},i.findDOMNode=function(s){if(null==s)return null;if(1===s.nodeType)return s;var i=s._reactInternals;if(void 0===i){if(\"function\"==typeof s.render)throw Error(p(188));throw s=Object.keys(s).join(\",\"),Error(p(268,s))}return s=null===(s=Zb(i))?null:s.stateNode},i.flushSync=function(s){return Sk(s)},i.hydrate=function(s,i,u){if(!pl(i))throw Error(p(200));return sl(null,s,i,!0,u)},i.hydrateRoot=function(s,i,u){if(!ol(s))throw Error(p(405));var _=null!=u&&u.hydratedSources||null,w=!1,x=\"\",j=ms;if(null!=u&&(!0===u.unstable_strictMode&&(w=!0),void 0!==u.identifierPrefix&&(x=u.identifierPrefix),void 0!==u.onRecoverableError&&(j=u.onRecoverableError)),i=fl(i,null,s,1,null!=u?u:null,w,0,x,j),s[vn]=i.current,sf(s),_)for(s=0;s<_.length;s++)w=(w=(u=_[s])._getVersion)(u._source),null==i.mutableSourceEagerHydrationData?i.mutableSourceEagerHydrationData=[u,w]:i.mutableSourceEagerHydrationData.push(u,w);return new nl(i)},i.render=function(s,i,u){if(!pl(i))throw Error(p(200));return sl(null,s,i,!1,u)},i.unmountComponentAtNode=function(s){if(!pl(s))throw Error(p(40));return!!s._reactRootContainer&&(Sk((function(){sl(null,null,s,!1,(function(){s._reactRootContainer=null,s[vn]=null}))})),!0)},i.unstable_batchedUpdates=Rk,i.unstable_renderSubtreeIntoContainer=function(s,i,u,_){if(!pl(u))throw Error(p(200));if(null==s||void 0===s._reactInternals)throw Error(p(38));return sl(s,i,u,!1,_)},i.version=\"18.2.0-next-9e3b772b8-20220608\"},40961:(s,i,u)=>{\"use strict\";!function checkDCE(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}(),s.exports=u(22551)},2209:(s,i,u)=>{\"use strict\";var _,w=u(9404),x=\"<<anonymous>>\",j=function productionTypeChecker(){invariant(!1,\"ImmutablePropTypes type checking code is stripped in production.\")};j.isRequired=j;var P=function getProductionTypeChecker(){return j};function getPropType(s){var i=typeof s;return Array.isArray(s)?\"array\":s instanceof RegExp?\"object\":s instanceof w.Iterable?\"Immutable.\"+s.toSource().split(\" \")[0]:i}function createChainableTypeChecker(s){function checkType(i,u,_,w,j,P){for(var B=arguments.length,$=Array(B>6?B-6:0),U=6;U<B;U++)$[U-6]=arguments[U];return P=P||_,w=w||x,null!=u[_]?s.apply(void 0,[u,_,w,j,P].concat($)):i?new Error(\"Required \"+j+\" `\"+P+\"` was not specified in `\"+w+\"`.\"):void 0}var i=checkType.bind(null,!1);return i.isRequired=checkType.bind(null,!0),i}function createIterableSubclassTypeChecker(s,i){return function createImmutableTypeChecker(s,i){return createChainableTypeChecker((function validate(u,_,w,x,j){var P=u[_];if(!i(P)){var B=getPropType(P);return new Error(\"Invalid \"+x+\" `\"+j+\"` of type `\"+B+\"` supplied to `\"+w+\"`, expected `\"+s+\"`.\")}return null}))}(\"Iterable.\"+s,(function(s){return w.Iterable.isIterable(s)&&i(s)}))}(_={listOf:P,mapOf:P,orderedMapOf:P,setOf:P,orderedSetOf:P,stackOf:P,iterableOf:P,recordOf:P,shape:P,contains:P,mapContains:P,orderedMapContains:P,list:j,map:j,orderedMap:j,set:j,orderedSet:j,stack:j,seq:j,record:j,iterable:j}).iterable.indexed=createIterableSubclassTypeChecker(\"Indexed\",w.Iterable.isIndexed),_.iterable.keyed=createIterableSubclassTypeChecker(\"Keyed\",w.Iterable.isKeyed),s.exports=_},15287:(s,i)=>{\"use strict\";var u=Symbol.for(\"react.element\"),_=Symbol.for(\"react.portal\"),w=Symbol.for(\"react.fragment\"),x=Symbol.for(\"react.strict_mode\"),j=Symbol.for(\"react.profiler\"),P=Symbol.for(\"react.provider\"),B=Symbol.for(\"react.context\"),$=Symbol.for(\"react.forward_ref\"),U=Symbol.for(\"react.suspense\"),Y=Symbol.for(\"react.memo\"),X=Symbol.for(\"react.lazy\"),Z=Symbol.iterator;var ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ie=Object.assign,ae={};function E(s,i,u){this.props=s,this.context=i,this.refs=ae,this.updater=u||ee}function F(){}function G(s,i,u){this.props=s,this.context=i,this.refs=ae,this.updater=u||ee}E.prototype.isReactComponent={},E.prototype.setState=function(s,i){if(\"object\"!=typeof s&&\"function\"!=typeof s&&null!=s)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,s,i,\"setState\")},E.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,\"forceUpdate\")},F.prototype=E.prototype;var le=G.prototype=new F;le.constructor=G,ie(le,E.prototype),le.isPureReactComponent=!0;var ce=Array.isArray,pe=Object.prototype.hasOwnProperty,de={current:null},fe={key:!0,ref:!0,__self:!0,__source:!0};function M(s,i,_){var w,x={},j=null,P=null;if(null!=i)for(w in void 0!==i.ref&&(P=i.ref),void 0!==i.key&&(j=\"\"+i.key),i)pe.call(i,w)&&!fe.hasOwnProperty(w)&&(x[w]=i[w]);var B=arguments.length-2;if(1===B)x.children=_;else if(1<B){for(var $=Array(B),U=0;U<B;U++)$[U]=arguments[U+2];x.children=$}if(s&&s.defaultProps)for(w in B=s.defaultProps)void 0===x[w]&&(x[w]=B[w]);return{$$typeof:u,type:s,key:j,ref:P,props:x,_owner:de.current}}function O(s){return\"object\"==typeof s&&null!==s&&s.$$typeof===u}var ye=/\\/+/g;function Q(s,i){return\"object\"==typeof s&&null!==s&&null!=s.key?function escape(s){var i={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+s.replace(/[=:]/g,(function(s){return i[s]}))}(\"\"+s.key):i.toString(36)}function R(s,i,w,x,j){var P=typeof s;\"undefined\"!==P&&\"boolean\"!==P||(s=null);var B=!1;if(null===s)B=!0;else switch(P){case\"string\":case\"number\":B=!0;break;case\"object\":switch(s.$$typeof){case u:case _:B=!0}}if(B)return j=j(B=s),s=\"\"===x?\".\"+Q(B,0):x,ce(j)?(w=\"\",null!=s&&(w=s.replace(ye,\"$&/\")+\"/\"),R(j,i,w,\"\",(function(s){return s}))):null!=j&&(O(j)&&(j=function N(s,i){return{$$typeof:u,type:s.type,key:i,ref:s.ref,props:s.props,_owner:s._owner}}(j,w+(!j.key||B&&B.key===j.key?\"\":(\"\"+j.key).replace(ye,\"$&/\")+\"/\")+s)),i.push(j)),1;if(B=0,x=\"\"===x?\".\":x+\":\",ce(s))for(var $=0;$<s.length;$++){var U=x+Q(P=s[$],$);B+=R(P,i,w,U,j)}else if(U=function A(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=Z&&s[Z]||s[\"@@iterator\"])?s:null}(s),\"function\"==typeof U)for(s=U.call(s),$=0;!(P=s.next()).done;)B+=R(P=P.value,i,w,U=x+Q(P,$++),j);else if(\"object\"===P)throw i=String(s),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===i?\"object with keys {\"+Object.keys(s).join(\", \")+\"}\":i)+\"). If you meant to render a collection of children, use an array instead.\");return B}function S(s,i,u){if(null==s)return s;var _=[],w=0;return R(s,_,\"\",\"\",(function(s){return i.call(u,s,w++)})),_}function T(s){if(-1===s._status){var i=s._result;(i=i()).then((function(i){0!==s._status&&-1!==s._status||(s._status=1,s._result=i)}),(function(i){0!==s._status&&-1!==s._status||(s._status=2,s._result=i)})),-1===s._status&&(s._status=0,s._result=i)}if(1===s._status)return s._result.default;throw s._result}var be={current:null},_e={transition:null},we={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:_e,ReactCurrentOwner:de};i.Children={map:S,forEach:function(s,i,u){S(s,(function(){i.apply(this,arguments)}),u)},count:function(s){var i=0;return S(s,(function(){i++})),i},toArray:function(s){return S(s,(function(s){return s}))||[]},only:function(s){if(!O(s))throw Error(\"React.Children.only expected to receive a single React element child.\");return s}},i.Component=E,i.Fragment=w,i.Profiler=j,i.PureComponent=G,i.StrictMode=x,i.Suspense=U,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=we,i.cloneElement=function(s,i,_){if(null==s)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+s+\".\");var w=ie({},s.props),x=s.key,j=s.ref,P=s._owner;if(null!=i){if(void 0!==i.ref&&(j=i.ref,P=de.current),void 0!==i.key&&(x=\"\"+i.key),s.type&&s.type.defaultProps)var B=s.type.defaultProps;for($ in i)pe.call(i,$)&&!fe.hasOwnProperty($)&&(w[$]=void 0===i[$]&&void 0!==B?B[$]:i[$])}var $=arguments.length-2;if(1===$)w.children=_;else if(1<$){B=Array($);for(var U=0;U<$;U++)B[U]=arguments[U+2];w.children=B}return{$$typeof:u,type:s.type,key:x,ref:j,props:w,_owner:P}},i.createContext=function(s){return(s={$$typeof:B,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:P,_context:s},s.Consumer=s},i.createElement=M,i.createFactory=function(s){var i=M.bind(null,s);return i.type=s,i},i.createRef=function(){return{current:null}},i.forwardRef=function(s){return{$$typeof:$,render:s}},i.isValidElement=O,i.lazy=function(s){return{$$typeof:X,_payload:{_status:-1,_result:s},_init:T}},i.memo=function(s,i){return{$$typeof:Y,type:s,compare:void 0===i?null:i}},i.startTransition=function(s){var i=_e.transition;_e.transition={};try{s()}finally{_e.transition=i}},i.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\")},i.useCallback=function(s,i){return be.current.useCallback(s,i)},i.useContext=function(s){return be.current.useContext(s)},i.useDebugValue=function(){},i.useDeferredValue=function(s){return be.current.useDeferredValue(s)},i.useEffect=function(s,i){return be.current.useEffect(s,i)},i.useId=function(){return be.current.useId()},i.useImperativeHandle=function(s,i,u){return be.current.useImperativeHandle(s,i,u)},i.useInsertionEffect=function(s,i){return be.current.useInsertionEffect(s,i)},i.useLayoutEffect=function(s,i){return be.current.useLayoutEffect(s,i)},i.useMemo=function(s,i){return be.current.useMemo(s,i)},i.useReducer=function(s,i,u){return be.current.useReducer(s,i,u)},i.useRef=function(s){return be.current.useRef(s)},i.useState=function(s){return be.current.useState(s)},i.useSyncExternalStore=function(s,i,u){return be.current.useSyncExternalStore(s,i,u)},i.useTransition=function(){return be.current.useTransition()},i.version=\"18.2.0\"},96540:(s,i,u)=>{\"use strict\";s.exports=u(15287)},86048:s=>{\"use strict\";var i={};function createErrorType(s,u,_){_||(_=Error);var w=function(s){function NodeError(i,_,w){return s.call(this,function getMessage(s,i,_){return\"string\"==typeof u?u:u(s,i,_)}(i,_,w))||this}return function _inheritsLoose(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.__proto__=i}(NodeError,s),NodeError}(_);w.prototype.name=_.name,w.prototype.code=s,i[s]=w}function oneOf(s,i){if(Array.isArray(s)){var u=s.length;return s=s.map((function(s){return String(s)})),u>2?\"one of \".concat(i,\" \").concat(s.slice(0,u-1).join(\", \"),\", or \")+s[u-1]:2===u?\"one of \".concat(i,\" \").concat(s[0],\" or \").concat(s[1]):\"of \".concat(i,\" \").concat(s[0])}return\"of \".concat(i,\" \").concat(String(s))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(s,i){return'The value \"'+i+'\" is invalid for option \"'+s+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(s,i,u){var _,w;if(\"string\"==typeof i&&function startsWith(s,i,u){return s.substr(!u||u<0?0:+u,i.length)===i}(i,\"not \")?(_=\"must not be\",i=i.replace(/^not /,\"\")):_=\"must be\",function endsWith(s,i,u){return(void 0===u||u>s.length)&&(u=s.length),s.substring(u-i.length,u)===i}(s,\" argument\"))w=\"The \".concat(s,\" \").concat(_,\" \").concat(oneOf(i,\"type\"));else{var x=function includes(s,i,u){return\"number\"!=typeof u&&(u=0),!(u+i.length>s.length)&&-1!==s.indexOf(i,u)}(s,\".\")?\"property\":\"argument\";w='The \"'.concat(s,'\" ').concat(x,\" \").concat(_,\" \").concat(oneOf(i,\"type\"))}return w+=\". Received type \".concat(typeof u)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(s){return\"The \"+s+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(s){return\"Cannot call \"+s+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(s){return\"Unknown encoding: \"+s}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),s.exports.F=i},25382:(s,i,u)=>{\"use strict\";var _=u(65606),w=Object.keys||function(s){var i=[];for(var u in s)i.push(u);return i};s.exports=Duplex;var x=u(45412),j=u(16708);u(56698)(Duplex,x);for(var P=w(j.prototype),B=0;B<P.length;B++){var $=P[B];Duplex.prototype[$]||(Duplex.prototype[$]=j.prototype[$])}function Duplex(s){if(!(this instanceof Duplex))return new Duplex(s);x.call(this,s),j.call(this,s),this.allowHalfOpen=!0,s&&(!1===s.readable&&(this.readable=!1),!1===s.writable&&(this.writable=!1),!1===s.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||_.nextTick(onEndNT,this)}function onEndNT(s){s.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(s){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=s,this._writableState.destroyed=s)}})},63600:(s,i,u)=>{\"use strict\";s.exports=PassThrough;var _=u(74610);function PassThrough(s){if(!(this instanceof PassThrough))return new PassThrough(s);_.call(this,s)}u(56698)(PassThrough,_),PassThrough.prototype._transform=function(s,i,u){u(null,s)}},45412:(s,i,u)=>{\"use strict\";var _,w=u(65606);s.exports=Readable,Readable.ReadableState=ReadableState;u(37007).EventEmitter;var x=function EElistenerCount(s,i){return s.listeners(i).length},j=u(40345),P=u(48287).Buffer,B=(void 0!==u.g?u.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var $,U=u(79838);$=U&&U.debuglog?U.debuglog(\"stream\"):function debug(){};var Y,X,Z,ee=u(80345),ie=u(75896),ae=u(65291).getHighWaterMark,le=u(86048).F,ce=le.ERR_INVALID_ARG_TYPE,pe=le.ERR_STREAM_PUSH_AFTER_EOF,de=le.ERR_METHOD_NOT_IMPLEMENTED,fe=le.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;u(56698)(Readable,j);var ye=ie.errorOrDestroy,be=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(s,i,w){_=_||u(25382),s=s||{},\"boolean\"!=typeof w&&(w=i instanceof _),this.objectMode=!!s.objectMode,w&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.highWaterMark=ae(this,s,\"readableHighWaterMark\",w),this.buffer=new ee,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.destroyed=!1,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(Y||(Y=u(83141).I),this.decoder=new Y(s.encoding),this.encoding=s.encoding)}function Readable(s){if(_=_||u(25382),!(this instanceof Readable))return new Readable(s);var i=this instanceof _;this._readableState=new ReadableState(s,this,i),this.readable=!0,s&&(\"function\"==typeof s.read&&(this._read=s.read),\"function\"==typeof s.destroy&&(this._destroy=s.destroy)),j.call(this)}function readableAddChunk(s,i,u,_,w){$(\"readableAddChunk\",i);var x,j=s._readableState;if(null===i)j.reading=!1,function onEofChunk(s,i){if($(\"onEofChunk\"),i.ended)return;if(i.decoder){var u=i.decoder.end();u&&u.length&&(i.buffer.push(u),i.length+=i.objectMode?1:u.length)}i.ended=!0,i.sync?emitReadable(s):(i.needReadable=!1,i.emittedReadable||(i.emittedReadable=!0,emitReadable_(s)))}(s,j);else if(w||(x=function chunkInvalid(s,i){var u;(function _isUint8Array(s){return P.isBuffer(s)||s instanceof B})(i)||\"string\"==typeof i||void 0===i||s.objectMode||(u=new ce(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],i));return u}(j,i)),x)ye(s,x);else if(j.objectMode||i&&i.length>0)if(\"string\"==typeof i||j.objectMode||Object.getPrototypeOf(i)===P.prototype||(i=function _uint8ArrayToBuffer(s){return P.from(s)}(i)),_)j.endEmitted?ye(s,new fe):addChunk(s,j,i,!0);else if(j.ended)ye(s,new pe);else{if(j.destroyed)return!1;j.reading=!1,j.decoder&&!u?(i=j.decoder.write(i),j.objectMode||0!==i.length?addChunk(s,j,i,!1):maybeReadMore(s,j)):addChunk(s,j,i,!1)}else _||(j.reading=!1,maybeReadMore(s,j));return!j.ended&&(j.length<j.highWaterMark||0===j.length)}function addChunk(s,i,u,_){i.flowing&&0===i.length&&!i.sync?(i.awaitDrain=0,s.emit(\"data\",u)):(i.length+=i.objectMode?1:u.length,_?i.buffer.unshift(u):i.buffer.push(u),i.needReadable&&emitReadable(s)),maybeReadMore(s,i)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(s){this._readableState&&(this._readableState.destroyed=s)}}),Readable.prototype.destroy=ie.destroy,Readable.prototype._undestroy=ie.undestroy,Readable.prototype._destroy=function(s,i){i(s)},Readable.prototype.push=function(s,i){var u,_=this._readableState;return _.objectMode?u=!0:\"string\"==typeof s&&((i=i||_.defaultEncoding)!==_.encoding&&(s=P.from(s,i),i=\"\"),u=!0),readableAddChunk(this,s,i,!1,u)},Readable.prototype.unshift=function(s){return readableAddChunk(this,s,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(s){Y||(Y=u(83141).I);var i=new Y(s);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,w=\"\";null!==_;)w+=i.write(_.data),_=_.next;return this._readableState.buffer.clear(),\"\"!==w&&this._readableState.buffer.push(w),this._readableState.length=w.length,this};var _e=1073741824;function howMuchToRead(s,i){return s<=0||0===i.length&&i.ended?0:i.objectMode?1:s!=s?i.flowing&&i.length?i.buffer.head.data.length:i.length:(s>i.highWaterMark&&(i.highWaterMark=function computeNewHighWaterMark(s){return s>=_e?s=_e:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}(s)),s<=i.length?s:i.ended?i.length:(i.needReadable=!0,0))}function emitReadable(s){var i=s._readableState;$(\"emitReadable\",i.needReadable,i.emittedReadable),i.needReadable=!1,i.emittedReadable||($(\"emitReadable\",i.flowing),i.emittedReadable=!0,w.nextTick(emitReadable_,s))}function emitReadable_(s){var i=s._readableState;$(\"emitReadable_\",i.destroyed,i.length,i.ended),i.destroyed||!i.length&&!i.ended||(s.emit(\"readable\"),i.emittedReadable=!1),i.needReadable=!i.flowing&&!i.ended&&i.length<=i.highWaterMark,flow(s)}function maybeReadMore(s,i){i.readingMore||(i.readingMore=!0,w.nextTick(maybeReadMore_,s,i))}function maybeReadMore_(s,i){for(;!i.reading&&!i.ended&&(i.length<i.highWaterMark||i.flowing&&0===i.length);){var u=i.length;if($(\"maybeReadMore read 0\"),s.read(0),u===i.length)break}i.readingMore=!1}function updateReadableListening(s){var i=s._readableState;i.readableListening=s.listenerCount(\"readable\")>0,i.resumeScheduled&&!i.paused?i.flowing=!0:s.listenerCount(\"data\")>0&&s.resume()}function nReadingNextTick(s){$(\"readable nexttick read 0\"),s.read(0)}function resume_(s,i){$(\"resume\",i.reading),i.reading||s.read(0),i.resumeScheduled=!1,s.emit(\"resume\"),flow(s),i.flowing&&!i.reading&&s.read(0)}function flow(s){var i=s._readableState;for($(\"flow\",i.flowing);i.flowing&&null!==s.read(););}function fromList(s,i){return 0===i.length?null:(i.objectMode?u=i.buffer.shift():!s||s>=i.length?(u=i.decoder?i.buffer.join(\"\"):1===i.buffer.length?i.buffer.first():i.buffer.concat(i.length),i.buffer.clear()):u=i.buffer.consume(s,i.decoder),u);var u}function endReadable(s){var i=s._readableState;$(\"endReadable\",i.endEmitted),i.endEmitted||(i.ended=!0,w.nextTick(endReadableNT,i,s))}function endReadableNT(s,i){if($(\"endReadableNT\",s.endEmitted,s.length),!s.endEmitted&&0===s.length&&(s.endEmitted=!0,i.readable=!1,i.emit(\"end\"),s.autoDestroy)){var u=i._writableState;(!u||u.autoDestroy&&u.finished)&&i.destroy()}}function indexOf(s,i){for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}Readable.prototype.read=function(s){$(\"read\",s),s=parseInt(s,10);var i=this._readableState,u=s;if(0!==s&&(i.emittedReadable=!1),0===s&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return $(\"read: emitReadable\",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(s=howMuchToRead(s,i))&&i.ended)return 0===i.length&&endReadable(this),null;var _,w=i.needReadable;return $(\"need readable\",w),(0===i.length||i.length-s<i.highWaterMark)&&$(\"length less than watermark\",w=!0),i.ended||i.reading?$(\"reading or ended\",w=!1):w&&($(\"do read\"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(s=howMuchToRead(u,i))),null===(_=s>0?fromList(s,i):null)?(i.needReadable=i.length<=i.highWaterMark,s=0):(i.length-=s,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),u!==s&&i.ended&&endReadable(this)),null!==_&&this.emit(\"data\",_),_},Readable.prototype._read=function(s){ye(this,new de(\"_read()\"))},Readable.prototype.pipe=function(s,i){var u=this,_=this._readableState;switch(_.pipesCount){case 0:_.pipes=s;break;case 1:_.pipes=[_.pipes,s];break;default:_.pipes.push(s)}_.pipesCount+=1,$(\"pipe count=%d opts=%j\",_.pipesCount,i);var j=(!i||!1!==i.end)&&s!==w.stdout&&s!==w.stderr?onend:unpipe;function onunpipe(i,w){$(\"onunpipe\"),i===u&&w&&!1===w.hasUnpiped&&(w.hasUnpiped=!0,function cleanup(){$(\"cleanup\"),s.removeListener(\"close\",onclose),s.removeListener(\"finish\",onfinish),s.removeListener(\"drain\",P),s.removeListener(\"error\",onerror),s.removeListener(\"unpipe\",onunpipe),u.removeListener(\"end\",onend),u.removeListener(\"end\",unpipe),u.removeListener(\"data\",ondata),B=!0,!_.awaitDrain||s._writableState&&!s._writableState.needDrain||P()}())}function onend(){$(\"onend\"),s.end()}_.endEmitted?w.nextTick(j):u.once(\"end\",j),s.on(\"unpipe\",onunpipe);var P=function pipeOnDrain(s){return function pipeOnDrainFunctionResult(){var i=s._readableState;$(\"pipeOnDrain\",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&x(s,\"data\")&&(i.flowing=!0,flow(s))}}(u);s.on(\"drain\",P);var B=!1;function ondata(i){$(\"ondata\");var w=s.write(i);$(\"dest.write\",w),!1===w&&((1===_.pipesCount&&_.pipes===s||_.pipesCount>1&&-1!==indexOf(_.pipes,s))&&!B&&($(\"false write response, pause\",_.awaitDrain),_.awaitDrain++),u.pause())}function onerror(i){$(\"onerror\",i),unpipe(),s.removeListener(\"error\",onerror),0===x(s,\"error\")&&ye(s,i)}function onclose(){s.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){$(\"onfinish\"),s.removeListener(\"close\",onclose),unpipe()}function unpipe(){$(\"unpipe\"),u.unpipe(s)}return u.on(\"data\",ondata),function prependListener(s,i,u){if(\"function\"==typeof s.prependListener)return s.prependListener(i,u);s._events&&s._events[i]?Array.isArray(s._events[i])?s._events[i].unshift(u):s._events[i]=[u,s._events[i]]:s.on(i,u)}(s,\"error\",onerror),s.once(\"close\",onclose),s.once(\"finish\",onfinish),s.emit(\"pipe\",u),_.flowing||($(\"pipe resume\"),u.resume()),s},Readable.prototype.unpipe=function(s){var i=this._readableState,u={hasUnpiped:!1};if(0===i.pipesCount)return this;if(1===i.pipesCount)return s&&s!==i.pipes||(s||(s=i.pipes),i.pipes=null,i.pipesCount=0,i.flowing=!1,s&&s.emit(\"unpipe\",this,u)),this;if(!s){var _=i.pipes,w=i.pipesCount;i.pipes=null,i.pipesCount=0,i.flowing=!1;for(var x=0;x<w;x++)_[x].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var j=indexOf(i.pipes,s);return-1===j||(i.pipes.splice(j,1),i.pipesCount-=1,1===i.pipesCount&&(i.pipes=i.pipes[0]),s.emit(\"unpipe\",this,u)),this},Readable.prototype.on=function(s,i){var u=j.prototype.on.call(this,s,i),_=this._readableState;return\"data\"===s?(_.readableListening=this.listenerCount(\"readable\")>0,!1!==_.flowing&&this.resume()):\"readable\"===s&&(_.endEmitted||_.readableListening||(_.readableListening=_.needReadable=!0,_.flowing=!1,_.emittedReadable=!1,$(\"on readable\",_.length,_.reading),_.length?emitReadable(this):_.reading||w.nextTick(nReadingNextTick,this))),u},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(s,i){var u=j.prototype.removeListener.call(this,s,i);return\"readable\"===s&&w.nextTick(updateReadableListening,this),u},Readable.prototype.removeAllListeners=function(s){var i=j.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==s&&void 0!==s||w.nextTick(updateReadableListening,this),i},Readable.prototype.resume=function(){var s=this._readableState;return s.flowing||($(\"resume\"),s.flowing=!s.readableListening,function resume(s,i){i.resumeScheduled||(i.resumeScheduled=!0,w.nextTick(resume_,s,i))}(this,s)),s.paused=!1,this},Readable.prototype.pause=function(){return $(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&($(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(s){var i=this,u=this._readableState,_=!1;for(var w in s.on(\"end\",(function(){if($(\"wrapped end\"),u.decoder&&!u.ended){var s=u.decoder.end();s&&s.length&&i.push(s)}i.push(null)})),s.on(\"data\",(function(w){($(\"wrapped data\"),u.decoder&&(w=u.decoder.write(w)),u.objectMode&&null==w)||(u.objectMode||w&&w.length)&&(i.push(w)||(_=!0,s.pause()))})),s)void 0===this[w]&&\"function\"==typeof s[w]&&(this[w]=function methodWrap(i){return function methodWrapReturnFunction(){return s[i].apply(s,arguments)}}(w));for(var x=0;x<be.length;x++)s.on(be[x],this.emit.bind(this,be[x]));return this._read=function(i){$(\"wrapped _read\",i),_&&(_=!1,s.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===X&&(X=u(2955)),X(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(s){this._readableState&&(this._readableState.flowing=s)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(s,i){return void 0===Z&&(Z=u(55157)),Z(Readable,s,i)})},74610:(s,i,u)=>{\"use strict\";s.exports=Transform;var _=u(86048).F,w=_.ERR_METHOD_NOT_IMPLEMENTED,x=_.ERR_MULTIPLE_CALLBACK,j=_.ERR_TRANSFORM_ALREADY_TRANSFORMING,P=_.ERR_TRANSFORM_WITH_LENGTH_0,B=u(25382);function afterTransform(s,i){var u=this._transformState;u.transforming=!1;var _=u.writecb;if(null===_)return this.emit(\"error\",new x);u.writechunk=null,u.writecb=null,null!=i&&this.push(i),_(s);var w=this._readableState;w.reading=!1,(w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}function Transform(s){if(!(this instanceof Transform))return new Transform(s);B.call(this,s),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(\"function\"==typeof s.transform&&(this._transform=s.transform),\"function\"==typeof s.flush&&(this._flush=s.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var s=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(i,u){done(s,i,u)}))}function done(s,i,u){if(i)return s.emit(\"error\",i);if(null!=u&&s.push(u),s._writableState.length)throw new P;if(s._transformState.transforming)throw new j;return s.push(null)}u(56698)(Transform,B),Transform.prototype.push=function(s,i){return this._transformState.needTransform=!1,B.prototype.push.call(this,s,i)},Transform.prototype._transform=function(s,i,u){u(new w(\"_transform()\"))},Transform.prototype._write=function(s,i,u){var _=this._transformState;if(_.writecb=u,_.writechunk=s,_.writeencoding=i,!_.transforming){var w=this._readableState;(_.needTransform||w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}},Transform.prototype._read=function(s){var i=this._transformState;null===i.writechunk||i.transforming?i.needTransform=!0:(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform))},Transform.prototype._destroy=function(s,i){B.prototype._destroy.call(this,s,(function(s){i(s)}))}},16708:(s,i,u)=>{\"use strict\";var _,w=u(65606);function CorkedRequest(s){var i=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(s,i,u){var _=s.entry;s.entry=null;for(;_;){var w=_.callback;i.pendingcb--,w(u),_=_.next}i.corkedRequestsFree.next=s}(i,s)}}s.exports=Writable,Writable.WritableState=WritableState;var x={deprecate:u(94643)},j=u(40345),P=u(48287).Buffer,B=(void 0!==u.g?u.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var $,U=u(75896),Y=u(65291).getHighWaterMark,X=u(86048).F,Z=X.ERR_INVALID_ARG_TYPE,ee=X.ERR_METHOD_NOT_IMPLEMENTED,ie=X.ERR_MULTIPLE_CALLBACK,ae=X.ERR_STREAM_CANNOT_PIPE,le=X.ERR_STREAM_DESTROYED,ce=X.ERR_STREAM_NULL_VALUES,pe=X.ERR_STREAM_WRITE_AFTER_END,de=X.ERR_UNKNOWN_ENCODING,fe=U.errorOrDestroy;function nop(){}function WritableState(s,i,x){_=_||u(25382),s=s||{},\"boolean\"!=typeof x&&(x=i instanceof _),this.objectMode=!!s.objectMode,x&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=Y(this,s,\"writableHighWaterMark\",x),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=!1===s.decodeStrings;this.decodeStrings=!j,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){!function onwrite(s,i){var u=s._writableState,_=u.sync,x=u.writecb;if(\"function\"!=typeof x)throw new ie;if(function onwriteStateUpdate(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}(u),i)!function onwriteError(s,i,u,_,x){--i.pendingcb,u?(w.nextTick(x,_),w.nextTick(finishMaybe,s,i),s._writableState.errorEmitted=!0,fe(s,_)):(x(_),s._writableState.errorEmitted=!0,fe(s,_),finishMaybe(s,i))}(s,u,_,i,x);else{var j=needFinish(u)||s.destroyed;j||u.corked||u.bufferProcessing||!u.bufferedRequest||clearBuffer(s,u),_?w.nextTick(afterWrite,s,u,j,x):afterWrite(s,u,j,x)}}(i,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(s){var i=this instanceof(_=_||u(25382));if(!i&&!$.call(Writable,this))return new Writable(s);this._writableState=new WritableState(s,this,i),this.writable=!0,s&&(\"function\"==typeof s.write&&(this._write=s.write),\"function\"==typeof s.writev&&(this._writev=s.writev),\"function\"==typeof s.destroy&&(this._destroy=s.destroy),\"function\"==typeof s.final&&(this._final=s.final)),j.call(this)}function doWrite(s,i,u,_,w,x,j){i.writelen=_,i.writecb=j,i.writing=!0,i.sync=!0,i.destroyed?i.onwrite(new le(\"write\")):u?s._writev(w,i.onwrite):s._write(w,x,i.onwrite),i.sync=!1}function afterWrite(s,i,u,_){u||function onwriteDrain(s,i){0===i.length&&i.needDrain&&(i.needDrain=!1,s.emit(\"drain\"))}(s,i),i.pendingcb--,_(),finishMaybe(s,i)}function clearBuffer(s,i){i.bufferProcessing=!0;var u=i.bufferedRequest;if(s._writev&&u&&u.next){var _=i.bufferedRequestCount,w=new Array(_),x=i.corkedRequestsFree;x.entry=u;for(var j=0,P=!0;u;)w[j]=u,u.isBuf||(P=!1),u=u.next,j+=1;w.allBuffers=P,doWrite(s,i,!0,i.length,w,\"\",x.finish),i.pendingcb++,i.lastBufferedRequest=null,x.next?(i.corkedRequestsFree=x.next,x.next=null):i.corkedRequestsFree=new CorkedRequest(i),i.bufferedRequestCount=0}else{for(;u;){var B=u.chunk,$=u.encoding,U=u.callback;if(doWrite(s,i,!1,i.objectMode?1:B.length,B,$,U),u=u.next,i.bufferedRequestCount--,i.writing)break}null===u&&(i.lastBufferedRequest=null)}i.bufferedRequest=u,i.bufferProcessing=!1}function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedRequest&&!s.finished&&!s.writing}function callFinal(s,i){s._final((function(u){i.pendingcb--,u&&fe(s,u),i.prefinished=!0,s.emit(\"prefinish\"),finishMaybe(s,i)}))}function finishMaybe(s,i){var u=needFinish(i);if(u&&(function prefinish(s,i){i.prefinished||i.finalCalled||(\"function\"!=typeof s._final||i.destroyed?(i.prefinished=!0,s.emit(\"prefinish\")):(i.pendingcb++,i.finalCalled=!0,w.nextTick(callFinal,s,i)))}(s,i),0===i.pendingcb&&(i.finished=!0,s.emit(\"finish\"),i.autoDestroy))){var _=s._readableState;(!_||_.autoDestroy&&_.endEmitted)&&s.destroy()}return u}u(56698)(Writable,j),WritableState.prototype.getBuffer=function getBuffer(){for(var s=this.bufferedRequest,i=[];s;)i.push(s),s=s.next;return i},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:x.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(s){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?($=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(s){return!!$.call(this,s)||this===Writable&&(s&&s._writableState instanceof WritableState)}})):$=function realHasInstance(s){return s instanceof this},Writable.prototype.pipe=function(){fe(this,new ae)},Writable.prototype.write=function(s,i,u){var _=this._writableState,x=!1,j=!_.objectMode&&function _isUint8Array(s){return P.isBuffer(s)||s instanceof B}(s);return j&&!P.isBuffer(s)&&(s=function _uint8ArrayToBuffer(s){return P.from(s)}(s)),\"function\"==typeof i&&(u=i,i=null),j?i=\"buffer\":i||(i=_.defaultEncoding),\"function\"!=typeof u&&(u=nop),_.ending?function writeAfterEnd(s,i){var u=new pe;fe(s,u),w.nextTick(i,u)}(this,u):(j||function validChunk(s,i,u,_){var x;return null===u?x=new ce:\"string\"==typeof u||i.objectMode||(x=new Z(\"chunk\",[\"string\",\"Buffer\"],u)),!x||(fe(s,x),w.nextTick(_,x),!1)}(this,_,s,u))&&(_.pendingcb++,x=function writeOrBuffer(s,i,u,_,w,x){if(!u){var j=function decodeChunk(s,i,u){s.objectMode||!1===s.decodeStrings||\"string\"!=typeof i||(i=P.from(i,u));return i}(i,_,w);_!==j&&(u=!0,w=\"buffer\",_=j)}var B=i.objectMode?1:_.length;i.length+=B;var $=i.length<i.highWaterMark;$||(i.needDrain=!0);if(i.writing||i.corked){var U=i.lastBufferedRequest;i.lastBufferedRequest={chunk:_,encoding:w,isBuf:u,callback:x,next:null},U?U.next=i.lastBufferedRequest:i.bufferedRequest=i.lastBufferedRequest,i.bufferedRequestCount+=1}else doWrite(s,i,!1,B,_,w,x);return $}(this,_,j,s,i,u)),x},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,s.writing||s.corked||s.bufferProcessing||!s.bufferedRequest||clearBuffer(this,s))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(s){if(\"string\"==typeof s&&(s=s.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((s+\"\").toLowerCase())>-1))throw new de(s);return this._writableState.defaultEncoding=s,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(s,i,u){u(new ee(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(s,i,u){var _=this._writableState;return\"function\"==typeof s?(u=s,s=null,i=null):\"function\"==typeof i&&(u=i,i=null),null!=s&&this.write(s,i),_.corked&&(_.corked=1,this.uncork()),_.ending||function endWritable(s,i,u){i.ending=!0,finishMaybe(s,i),u&&(i.finished?w.nextTick(u):s.once(\"finish\",u));i.ended=!0,s.writable=!1}(this,_,u),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(s){this._writableState&&(this._writableState.destroyed=s)}}),Writable.prototype.destroy=U.destroy,Writable.prototype._undestroy=U.undestroy,Writable.prototype._destroy=function(s,i){i(s)}},2955:(s,i,u)=>{\"use strict\";var _,w=u(65606);function _defineProperty(s,i,u){return(i=function _toPropertyKey(s){var i=function _toPrimitive(s,i){if(\"object\"!=typeof s||null===s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=typeof _)return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof i?i:String(i)}(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var x=u(86238),j=Symbol(\"lastResolve\"),P=Symbol(\"lastReject\"),B=Symbol(\"error\"),$=Symbol(\"ended\"),U=Symbol(\"lastPromise\"),Y=Symbol(\"handlePromise\"),X=Symbol(\"stream\");function createIterResult(s,i){return{value:s,done:i}}function readAndResolve(s){var i=s[j];if(null!==i){var u=s[X].read();null!==u&&(s[U]=null,s[j]=null,s[P]=null,i(createIterResult(u,!1)))}}function onReadable(s){w.nextTick(readAndResolve,s)}var Z=Object.getPrototypeOf((function(){})),ee=Object.setPrototypeOf((_defineProperty(_={get stream(){return this[X]},next:function next(){var s=this,i=this[B];if(null!==i)return Promise.reject(i);if(this[$])return Promise.resolve(createIterResult(void 0,!0));if(this[X].destroyed)return new Promise((function(i,u){w.nextTick((function(){s[B]?u(s[B]):i(createIterResult(void 0,!0))}))}));var u,_=this[U];if(_)u=new Promise(function wrapForNext(s,i){return function(u,_){s.then((function(){i[$]?u(createIterResult(void 0,!0)):i[Y](u,_)}),_)}}(_,this));else{var x=this[X].read();if(null!==x)return Promise.resolve(createIterResult(x,!1));u=new Promise(this[Y])}return this[U]=u,u}},Symbol.asyncIterator,(function(){return this})),_defineProperty(_,\"return\",(function _return(){var s=this;return new Promise((function(i,u){s[X].destroy(null,(function(s){s?u(s):i(createIterResult(void 0,!0))}))}))})),_),Z);s.exports=function createReadableStreamAsyncIterator(s){var i,u=Object.create(ee,(_defineProperty(i={},X,{value:s,writable:!0}),_defineProperty(i,j,{value:null,writable:!0}),_defineProperty(i,P,{value:null,writable:!0}),_defineProperty(i,B,{value:null,writable:!0}),_defineProperty(i,$,{value:s._readableState.endEmitted,writable:!0}),_defineProperty(i,Y,{value:function value(s,i){var _=u[X].read();_?(u[U]=null,u[j]=null,u[P]=null,s(createIterResult(_,!1))):(u[j]=s,u[P]=i)},writable:!0}),i));return u[U]=null,x(s,(function(s){if(s&&\"ERR_STREAM_PREMATURE_CLOSE\"!==s.code){var i=u[P];return null!==i&&(u[U]=null,u[j]=null,u[P]=null,i(s)),void(u[B]=s)}var _=u[j];null!==_&&(u[U]=null,u[j]=null,u[P]=null,_(createIterResult(void 0,!0))),u[$]=!0})),s.on(\"readable\",onReadable.bind(null,u)),u}},80345:(s,i,u)=>{\"use strict\";function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _defineProperty(s,i,u){return(i=_toPropertyKey(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_toPropertyKey(_.key),_)}}function _toPropertyKey(s){var i=function _toPrimitive(s,i){if(\"object\"!=typeof s||null===s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=typeof _)return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof i?i:String(i)}var _=u(48287).Buffer,w=u(15340).inspect,x=w&&w.custom||\"inspect\";s.exports=function(){function BufferList(){!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(BufferList,[{key:\"push\",value:function push(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:\"unshift\",value:function unshift(s){var i={data:s,next:this.head};0===this.length&&(this.tail=i),this.head=i,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var s=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,s}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(s){if(0===this.length)return\"\";for(var i=this.head,u=\"\"+i.data;i=i.next;)u+=s+i.data;return u}},{key:\"concat\",value:function concat(s){if(0===this.length)return _.alloc(0);for(var i,u,w,x=_.allocUnsafe(s>>>0),j=this.head,P=0;j;)i=j.data,u=x,w=P,_.prototype.copy.call(i,u,w),P+=j.data.length,j=j.next;return x}},{key:\"consume\",value:function consume(s,i){var u;return s<this.head.data.length?(u=this.head.data.slice(0,s),this.head.data=this.head.data.slice(s)):u=s===this.head.data.length?this.shift():i?this._getString(s):this._getBuffer(s),u}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(s){var i=this.head,u=1,_=i.data;for(s-=_.length;i=i.next;){var w=i.data,x=s>w.length?w.length:s;if(x===w.length?_+=w:_+=w.slice(0,s),0===(s-=x)){x===w.length?(++u,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=w.slice(x));break}++u}return this.length-=u,_}},{key:\"_getBuffer\",value:function _getBuffer(s){var i=_.allocUnsafe(s),u=this.head,w=1;for(u.data.copy(i),s-=u.data.length;u=u.next;){var x=u.data,j=s>x.length?x.length:s;if(x.copy(i,i.length-s,0,j),0===(s-=j)){j===x.length?(++w,u.next?this.head=u.next:this.head=this.tail=null):(this.head=u,u.data=x.slice(j));break}++w}return this.length-=w,i}},{key:x,value:function value(s,i){return w(this,_objectSpread(_objectSpread({},i),{},{depth:0,customInspect:!1}))}}]),BufferList}()},75896:(s,i,u)=>{\"use strict\";var _=u(65606);function emitErrorAndCloseNT(s,i){emitErrorNT(s,i),emitCloseNT(s)}function emitCloseNT(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit(\"close\")}function emitErrorNT(s,i){s.emit(\"error\",i)}s.exports={destroy:function destroy(s,i){var u=this,w=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;return w||x?(i?i(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(emitErrorNT,this,s)):_.nextTick(emitErrorNT,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,(function(s){!i&&s?u._writableState?u._writableState.errorEmitted?_.nextTick(emitCloseNT,u):(u._writableState.errorEmitted=!0,_.nextTick(emitErrorAndCloseNT,u,s)):_.nextTick(emitErrorAndCloseNT,u,s):i?(_.nextTick(emitCloseNT,u),i(s)):_.nextTick(emitCloseNT,u)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(s,i){var u=s._readableState,_=s._writableState;u&&u.autoDestroy||_&&_.autoDestroy?s.destroy(i):s.emit(\"error\",i)}}},86238:(s,i,u)=>{\"use strict\";var _=u(86048).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}s.exports=function eos(s,i,u){if(\"function\"==typeof i)return eos(s,null,i);i||(i={}),u=function once(s){var i=!1;return function(){if(!i){i=!0;for(var u=arguments.length,_=new Array(u),w=0;w<u;w++)_[w]=arguments[w];s.apply(this,_)}}}(u||noop);var w=i.readable||!1!==i.readable&&s.readable,x=i.writable||!1!==i.writable&&s.writable,j=function onlegacyfinish(){s.writable||B()},P=s._writableState&&s._writableState.finished,B=function onfinish(){x=!1,P=!0,w||u.call(s)},$=s._readableState&&s._readableState.endEmitted,U=function onend(){w=!1,$=!0,x||u.call(s)},Y=function onerror(i){u.call(s,i)},X=function onclose(){var i;return w&&!$?(s._readableState&&s._readableState.ended||(i=new _),u.call(s,i)):x&&!P?(s._writableState&&s._writableState.ended||(i=new _),u.call(s,i)):void 0},Z=function onrequest(){s.req.on(\"finish\",B)};return!function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?x&&!s._writableState&&(s.on(\"end\",j),s.on(\"close\",j)):(s.on(\"complete\",B),s.on(\"abort\",X),s.req?Z():s.on(\"request\",Z)),s.on(\"end\",U),s.on(\"finish\",B),!1!==i.error&&s.on(\"error\",Y),s.on(\"close\",X),function(){s.removeListener(\"complete\",B),s.removeListener(\"abort\",X),s.removeListener(\"request\",Z),s.req&&s.req.removeListener(\"finish\",B),s.removeListener(\"end\",j),s.removeListener(\"close\",j),s.removeListener(\"finish\",B),s.removeListener(\"end\",U),s.removeListener(\"error\",Y),s.removeListener(\"close\",X)}}},55157:s=>{s.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},57758:(s,i,u)=>{\"use strict\";var _;var w=u(86048).F,x=w.ERR_MISSING_ARGS,j=w.ERR_STREAM_DESTROYED;function noop(s){if(s)throw s}function call(s){s()}function pipe(s,i){return s.pipe(i)}s.exports=function pipeline(){for(var s=arguments.length,i=new Array(s),w=0;w<s;w++)i[w]=arguments[w];var P,B=function popCallback(s){return s.length?\"function\"!=typeof s[s.length-1]?noop:s.pop():noop}(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new x(\"streams\");var $=i.map((function(s,w){var x=w<i.length-1;return function destroyer(s,i,w,x){x=function once(s){var i=!1;return function(){i||(i=!0,s.apply(void 0,arguments))}}(x);var P=!1;s.on(\"close\",(function(){P=!0})),void 0===_&&(_=u(86238)),_(s,{readable:i,writable:w},(function(s){if(s)return x(s);P=!0,x()}));var B=!1;return function(i){if(!P&&!B)return B=!0,function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?s.abort():\"function\"==typeof s.destroy?s.destroy():void x(i||new j(\"pipe\"))}}(s,x,w>0,(function(s){P||(P=s),s&&$.forEach(call),x||($.forEach(call),B(P))}))}));return i.reduce(pipe)}},65291:(s,i,u)=>{\"use strict\";var _=u(86048).F.ERR_INVALID_OPT_VALUE;s.exports={getHighWaterMark:function getHighWaterMark(s,i,u,w){var x=function highWaterMarkFrom(s,i,u){return null!=s.highWaterMark?s.highWaterMark:i?s[u]:null}(i,w,u);if(null!=x){if(!isFinite(x)||Math.floor(x)!==x||x<0)throw new _(w?u:\"highWaterMark\",x);return Math.floor(x)}return s.objectMode?16:16384}}},40345:(s,i,u)=>{s.exports=u(37007).EventEmitter},84977:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var _=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(u(9404)),w=u(55674);i.default=function(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.default.Map,u=Object.keys(s);return function(){var _=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i(),x=arguments[1];return _.withMutations((function(i){u.forEach((function(u){var _=(0,s[u])(i.get(u),x);(0,w.validateNextState)(_,u,x),i.set(u,_)}))}))}},s.exports=i.default},89593:(s,i,u)=>{\"use strict\";i.H=void 0;var _=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(u(84977));i.H=_.default},48590:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.default=function(s){return s&&\"@@redux/INIT\"===s.type?\"initialState argument passed to createStore\":\"previous state received by the reducer\"},s.exports=i.default},82261:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var _=_interopRequireDefault(u(9404)),w=_interopRequireDefault(u(48590));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}i.default=function(s,i,u){var x=Object.keys(i);if(!x.length)return\"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";var j=(0,w.default)(u);if(_.default.isImmutable?!_.default.isImmutable(s):!_.default.Iterable.isIterable(s))return\"The \"+j+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: \"'+x.join('\", \"')+'\".';var P=s.toSeq().keySeq().toArray().filter((function(s){return!i.hasOwnProperty(s)}));return P.length>0?\"Unexpected \"+(1===P.length?\"property\":\"properties\")+' \"'+P.join('\", \"')+'\" found in '+j+'. Expected to find one of the known reducer property names instead: \"'+x.join('\", \"')+'\". Unexpected properties will be ignored.':null},s.exports=i.default},55674:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.validateNextState=i.getUnexpectedInvocationParameterMessage=i.getStateName=void 0;var _=_interopRequireDefault(u(48590)),w=_interopRequireDefault(u(82261)),x=_interopRequireDefault(u(27374));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}i.getStateName=_.default,i.getUnexpectedInvocationParameterMessage=w.default,i.validateNextState=x.default},27374:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.default=function(s,i,u){if(void 0===s)throw new Error('Reducer \"'+i+'\" returned undefined when handling \"'+u.type+'\" action. To ignore an action, you must explicitly return the previous state.')},s.exports=i.default},75208:s=>{\"use strict\";var i,u=\"\";s.exports=function repeat(s,_){if(\"string\"!=typeof s)throw new TypeError(\"expected a string\");if(1===_)return s;if(2===_)return s+s;var w=s.length*_;if(i!==s||void 0===i)i=s,u=\"\";else if(u.length>=w)return u.substr(0,w);for(;w>u.length&&_>1;)1&_&&(u+=s),_>>=1,s+=s;return u=(u+=s).substr(0,w)}},92063:s=>{\"use strict\";s.exports=function required(s,i){if(i=i.split(\":\")[0],!(s=+s))return!1;switch(i){case\"http\":case\"ws\":return 80!==s;case\"https\":case\"wss\":return 443!==s;case\"ftp\":return 21!==s;case\"gopher\":return 70!==s;case\"file\":return!1}return 0!==s}},27096:(s,i,u)=>{const _=u(87586),w=u(6205),x=u(10023),j=u(8048);s.exports=s=>{var i,u,P=0,B={type:w.ROOT,stack:[]},$=B,U=B.stack,Y=[],repeatErr=i=>{_.error(s,\"Nothing to repeat at column \"+(i-1))},X=_.strToChars(s);for(i=X.length;P<i;)switch(u=X[P++]){case\"\\\\\":switch(u=X[P++]){case\"b\":U.push(j.wordBoundary());break;case\"B\":U.push(j.nonWordBoundary());break;case\"w\":U.push(x.words());break;case\"W\":U.push(x.notWords());break;case\"d\":U.push(x.ints());break;case\"D\":U.push(x.notInts());break;case\"s\":U.push(x.whitespace());break;case\"S\":U.push(x.notWhitespace());break;default:/\\d/.test(u)?U.push({type:w.REFERENCE,value:parseInt(u,10)}):U.push({type:w.CHAR,value:u.charCodeAt(0)})}break;case\"^\":U.push(j.begin());break;case\"$\":U.push(j.end());break;case\"[\":var Z;\"^\"===X[P]?(Z=!0,P++):Z=!1;var ee=_.tokenizeClass(X.slice(P),s);P+=ee[1],U.push({type:w.SET,set:ee[0],not:Z});break;case\".\":U.push(x.anyChar());break;case\"(\":var ie={type:w.GROUP,stack:[],remember:!0};\"?\"===(u=X[P])&&(u=X[P+1],P+=2,\"=\"===u?ie.followedBy=!0:\"!\"===u?ie.notFollowedBy=!0:\":\"!==u&&_.error(s,`Invalid group, character '${u}' after '?' at column `+(P-1)),ie.remember=!1),U.push(ie),Y.push($),$=ie,U=ie.stack;break;case\")\":0===Y.length&&_.error(s,\"Unmatched ) at column \"+(P-1)),U=($=Y.pop()).options?$.options[$.options.length-1]:$.stack;break;case\"|\":$.options||($.options=[$.stack],delete $.stack);var ae=[];$.options.push(ae),U=ae;break;case\"{\":var le,ce,pe=/^(\\d+)(,(\\d+)?)?\\}/.exec(X.slice(P));null!==pe?(0===U.length&&repeatErr(P),le=parseInt(pe[1],10),ce=pe[2]?pe[3]?parseInt(pe[3],10):1/0:le,P+=pe[0].length,U.push({type:w.REPETITION,min:le,max:ce,value:U.pop()})):U.push({type:w.CHAR,value:123});break;case\"?\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:0,max:1,value:U.pop()});break;case\"+\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:1,max:1/0,value:U.pop()});break;case\"*\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:0,max:1/0,value:U.pop()});break;default:U.push({type:w.CHAR,value:u.charCodeAt(0)})}return 0!==Y.length&&_.error(s,\"Unterminated group\"),B},s.exports.types=w},8048:(s,i,u)=>{const _=u(6205);i.wordBoundary=()=>({type:_.POSITION,value:\"b\"}),i.nonWordBoundary=()=>({type:_.POSITION,value:\"B\"}),i.begin=()=>({type:_.POSITION,value:\"^\"}),i.end=()=>({type:_.POSITION,value:\"$\"})},10023:(s,i,u)=>{const _=u(6205),INTS=()=>[{type:_.RANGE,from:48,to:57}],WORDS=()=>[{type:_.CHAR,value:95},{type:_.RANGE,from:97,to:122},{type:_.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:_.CHAR,value:9},{type:_.CHAR,value:10},{type:_.CHAR,value:11},{type:_.CHAR,value:12},{type:_.CHAR,value:13},{type:_.CHAR,value:32},{type:_.CHAR,value:160},{type:_.CHAR,value:5760},{type:_.RANGE,from:8192,to:8202},{type:_.CHAR,value:8232},{type:_.CHAR,value:8233},{type:_.CHAR,value:8239},{type:_.CHAR,value:8287},{type:_.CHAR,value:12288},{type:_.CHAR,value:65279}];i.words=()=>({type:_.SET,set:WORDS(),not:!1}),i.notWords=()=>({type:_.SET,set:WORDS(),not:!0}),i.ints=()=>({type:_.SET,set:INTS(),not:!1}),i.notInts=()=>({type:_.SET,set:INTS(),not:!0}),i.whitespace=()=>({type:_.SET,set:WHITESPACE(),not:!1}),i.notWhitespace=()=>({type:_.SET,set:WHITESPACE(),not:!0}),i.anyChar=()=>({type:_.SET,set:[{type:_.CHAR,value:10},{type:_.CHAR,value:13},{type:_.CHAR,value:8232},{type:_.CHAR,value:8233}],not:!0})},6205:s=>{s.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},87586:(s,i,u)=>{const _=u(6205),w=u(10023),x={0:0,t:9,n:10,v:11,f:12,r:13};i.strToChars=function(s){return s=s.replace(/(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\\\\]^?])|([0tnvfr]))/g,(function(s,i,u,_,w,j,P,B){if(u)return s;var $=i?8:_?parseInt(_,16):w?parseInt(w,16):j?parseInt(j,8):P?\"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?\".indexOf(P):x[B],U=String.fromCharCode($);return/[[\\]{}^$.|?*+()]/.test(U)&&(U=\"\\\\\"+U),U}))},i.tokenizeClass=(s,u)=>{for(var x,j,P=[],B=/\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?([^])/g;null!=(x=B.exec(s));)if(x[1])P.push(w.words());else if(x[2])P.push(w.ints());else if(x[3])P.push(w.whitespace());else if(x[4])P.push(w.notWords());else if(x[5])P.push(w.notInts());else if(x[6])P.push(w.notWhitespace());else if(x[7])P.push({type:_.RANGE,from:(x[8]||x[9]).charCodeAt(0),to:x[10].charCodeAt(0)});else{if(!(j=x[12]))return[P,B.lastIndex];P.push({type:_.CHAR,value:j.charCodeAt(0)})}i.error(u,\"Unterminated character class\")},i.error=(s,i)=>{throw new SyntaxError(\"Invalid regular expression: /\"+s+\"/: \"+i)}},92861:(s,i,u)=>{var _=u(48287),w=_.Buffer;function copyProps(s,i){for(var u in s)i[u]=s[u]}function SafeBuffer(s,i,u){return w(s,i,u)}w.from&&w.alloc&&w.allocUnsafe&&w.allocUnsafeSlow?s.exports=_:(copyProps(_,i),i.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(w.prototype),copyProps(w,SafeBuffer),SafeBuffer.from=function(s,i,u){if(\"number\"==typeof s)throw new TypeError(\"Argument must not be a number\");return w(s,i,u)},SafeBuffer.alloc=function(s,i,u){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");var _=w(s);return void 0!==i?\"string\"==typeof u?_.fill(i,u):_.fill(i):_.fill(0),_},SafeBuffer.allocUnsafe=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return w(s)},SafeBuffer.allocUnsafeSlow=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return _.SlowBuffer(s)}},29844:(s,i)=>{\"use strict\";function f(s,i){var u=s.length;s.push(i);e:for(;0<u;){var _=u-1>>>1,w=s[_];if(!(0<g(w,i)))break e;s[_]=i,s[u]=w,u=_}}function h(s){return 0===s.length?null:s[0]}function k(s){if(0===s.length)return null;var i=s[0],u=s.pop();if(u!==i){s[0]=u;e:for(var _=0,w=s.length,x=w>>>1;_<x;){var j=2*(_+1)-1,P=s[j],B=j+1,$=s[B];if(0>g(P,u))B<w&&0>g($,P)?(s[_]=$,s[B]=u,_=B):(s[_]=P,s[j]=u,_=j);else{if(!(B<w&&0>g($,u)))break e;s[_]=$,s[B]=u,_=B}}}return i}function g(s,i){var u=s.sortIndex-i.sortIndex;return 0!==u?u:s.id-i.id}if(\"object\"==typeof performance&&\"function\"==typeof performance.now){var u=performance;i.unstable_now=function(){return u.now()}}else{var _=Date,w=_.now();i.unstable_now=function(){return _.now()-w}}var x=[],j=[],P=1,B=null,$=3,U=!1,Y=!1,X=!1,Z=\"function\"==typeof setTimeout?setTimeout:null,ee=\"function\"==typeof clearTimeout?clearTimeout:null,ie=\"undefined\"!=typeof setImmediate?setImmediate:null;function G(s){for(var i=h(j);null!==i;){if(null===i.callback)k(j);else{if(!(i.startTime<=s))break;k(j),i.sortIndex=i.expirationTime,f(x,i)}i=h(j)}}function H(s){if(X=!1,G(s),!Y)if(null!==h(x))Y=!0,I(J);else{var i=h(j);null!==i&&K(H,i.startTime-s)}}function J(s,u){Y=!1,X&&(X=!1,ee(pe),pe=-1),U=!0;var _=$;try{for(G(u),B=h(x);null!==B&&(!(B.expirationTime>u)||s&&!M());){var w=B.callback;if(\"function\"==typeof w){B.callback=null,$=B.priorityLevel;var P=w(B.expirationTime<=u);u=i.unstable_now(),\"function\"==typeof P?B.callback=P:B===h(x)&&k(x),G(u)}else k(x);B=h(x)}if(null!==B)var Z=!0;else{var ie=h(j);null!==ie&&K(H,ie.startTime-u),Z=!1}return Z}finally{B=null,$=_,U=!1}}\"undefined\"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var ae,le=!1,ce=null,pe=-1,de=5,fe=-1;function M(){return!(i.unstable_now()-fe<de)}function R(){if(null!==ce){var s=i.unstable_now();fe=s;var u=!0;try{u=ce(!0,s)}finally{u?ae():(le=!1,ce=null)}}else le=!1}if(\"function\"==typeof ie)ae=function(){ie(R)};else if(\"undefined\"!=typeof MessageChannel){var ye=new MessageChannel,be=ye.port2;ye.port1.onmessage=R,ae=function(){be.postMessage(null)}}else ae=function(){Z(R,0)};function I(s){ce=s,le||(le=!0,ae())}function K(s,u){pe=Z((function(){s(i.unstable_now())}),u)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(s){s.callback=null},i.unstable_continueExecution=function(){Y||U||(Y=!0,I(J))},i.unstable_forceFrameRate=function(s){0>s||125<s?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):de=0<s?Math.floor(1e3/s):5},i.unstable_getCurrentPriorityLevel=function(){return $},i.unstable_getFirstCallbackNode=function(){return h(x)},i.unstable_next=function(s){switch($){case 1:case 2:case 3:var i=3;break;default:i=$}var u=$;$=i;try{return s()}finally{$=u}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(s,i){switch(s){case 1:case 2:case 3:case 4:case 5:break;default:s=3}var u=$;$=s;try{return i()}finally{$=u}},i.unstable_scheduleCallback=function(s,u,_){var w=i.unstable_now();switch(\"object\"==typeof _&&null!==_?_=\"number\"==typeof(_=_.delay)&&0<_?w+_:w:_=w,s){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return s={id:P++,callback:u,priorityLevel:s,startTime:_,expirationTime:B=_+B,sortIndex:-1},_>w?(s.sortIndex=_,f(j,s),null===h(x)&&s===h(j)&&(X?(ee(pe),pe=-1):X=!0,K(H,_-w))):(s.sortIndex=B,f(x,s),Y||U||(Y=!0,I(J))),s},i.unstable_shouldYield=M,i.unstable_wrapCallback=function(s){var i=$;return function(){var u=$;$=i;try{return s.apply(this,arguments)}finally{$=u}}}},69982:(s,i,u)=>{\"use strict\";s.exports=u(29844)},20334:(s,i,u)=>{\"use strict\";var _=u(48287).Buffer;class NonError extends Error{constructor(s){super(NonError._prepareSuperMessage(s)),Object.defineProperty(this,\"name\",{value:\"NonError\",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,NonError)}static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{return String(s)}}}const w=[{property:\"name\",enumerable:!1},{property:\"message\",enumerable:!1},{property:\"stack\",enumerable:!1},{property:\"code\",enumerable:!0}],x=Symbol(\".toJSON called\"),destroyCircular=({from:s,seen:i,to_:u,forceEnumerable:j,maxDepth:P,depth:B})=>{const $=u||(Array.isArray(s)?[]:{});if(i.push(s),B>=P)return $;if(\"function\"==typeof s.toJSON&&!0!==s[x])return(s=>{s[x]=!0;const i=s.toJSON();return delete s[x],i})(s);for(const[u,w]of Object.entries(s))\"function\"==typeof _&&_.isBuffer(w)?$[u]=\"[object Buffer]\":\"function\"!=typeof w&&(w&&\"object\"==typeof w?i.includes(s[u])?$[u]=\"[Circular]\":(B++,$[u]=destroyCircular({from:s[u],seen:i.slice(),forceEnumerable:j,maxDepth:P,depth:B})):$[u]=w);for(const{property:i,enumerable:u}of w)\"string\"==typeof s[i]&&Object.defineProperty($,i,{value:s[i],enumerable:!!j||u,configurable:!0,writable:!0});return $};s.exports={serializeError:(s,i={})=>{const{maxDepth:u=Number.POSITIVE_INFINITY}=i;return\"object\"==typeof s&&null!==s?destroyCircular({from:s,seen:[],forceEnumerable:!0,maxDepth:u,depth:0}):\"function\"==typeof s?`[Function: ${s.name||\"anonymous\"}]`:s},deserializeError:(s,i={})=>{const{maxDepth:u=Number.POSITIVE_INFINITY}=i;if(s instanceof Error)return s;if(\"object\"==typeof s&&null!==s&&!Array.isArray(s)){const i=new Error;return destroyCircular({from:s,seen:[],to_:i,maxDepth:u,depth:0}),i}return new NonError(s)}}},96897:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(30041),x=u(30592)(),j=u(75795),P=u(69675),B=_(\"%Math.floor%\");s.exports=function setFunctionLength(s,i){if(\"function\"!=typeof s)throw new P(\"`fn` is not a function\");if(\"number\"!=typeof i||i<0||i>4294967295||B(i)!==i)throw new P(\"`length` must be a positive 32-bit integer\");var u=arguments.length>2&&!!arguments[2],_=!0,$=!0;if(\"length\"in s&&j){var U=j(s,\"length\");U&&!U.configurable&&(_=!1),U&&!U.writable&&($=!1)}return(_||$||!u)&&(x?w(s,\"length\",i,!0,!0):w(s,\"length\",i)),s}},90392:(s,i,u)=>{var _=u(92861).Buffer;function Hash(s,i){this._block=_.alloc(s),this._finalSize=i,this._blockSize=s,this._len=0}Hash.prototype.update=function(s,i){\"string\"==typeof s&&(i=i||\"utf8\",s=_.from(s,i));for(var u=this._block,w=this._blockSize,x=s.length,j=this._len,P=0;P<x;){for(var B=j%w,$=Math.min(x-P,w-B),U=0;U<$;U++)u[B+U]=s[P+U];P+=$,(j+=$)%w==0&&this._update(u)}return this._len+=x,this},Hash.prototype.digest=function(s){var i=this._len%this._blockSize;this._block[i]=128,this._block.fill(0,i+1),i>=this._finalSize&&(this._update(this._block),this._block.fill(0));var u=8*this._len;if(u<=4294967295)this._block.writeUInt32BE(u,this._blockSize-4);else{var _=(4294967295&u)>>>0,w=(u-_)/4294967296;this._block.writeUInt32BE(w,this._blockSize-8),this._block.writeUInt32BE(_,this._blockSize-4)}this._update(this._block);var x=this._hash();return s?x.toString(s):x},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},s.exports=Hash},62802:(s,i,u)=>{var _=s.exports=function SHA(s){s=s.toLowerCase();var i=_[s];if(!i)throw new Error(s+\" is not supported (we accept pull requests)\");return new i};_.sha=u(27816),_.sha1=u(63737),_.sha224=u(26710),_.sha256=u(24107),_.sha384=u(32827),_.sha512=u(82890)},27816:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1518500249,1859775393,-1894007588,-899497514],P=new Array(80);function Sha(){this.init(),this._w=P,w.call(this,64,56)}function rotl30(s){return s<<30|s>>>2}function ft(s,i,u,_){return 0===s?i&u|~i&_:2===s?i&u|i&_|u&_:i^u^_}_(Sha,w),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0;$<16;++$)u[$]=s.readInt32BE(4*$);for(;$<80;++$)u[$]=u[$-3]^u[$-8]^u[$-14]^u[$-16];for(var U=0;U<80;++U){var Y=~~(U/20),X=0|((i=_)<<5|i>>>27)+ft(Y,w,x,P)+B+u[U]+j[Y];B=P,P=x,x=rotl30(w),w=_,_=X}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0},Sha.prototype._hash=function(){var s=x.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha},63737:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1518500249,1859775393,-1894007588,-899497514],P=new Array(80);function Sha1(){this.init(),this._w=P,w.call(this,64,56)}function rotl5(s){return s<<5|s>>>27}function rotl30(s){return s<<30|s>>>2}function ft(s,i,u,_){return 0===s?i&u|~i&_:2===s?i&u|i&_|u&_:i^u^_}_(Sha1,w),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0;$<16;++$)u[$]=s.readInt32BE(4*$);for(;$<80;++$)u[$]=(i=u[$-3]^u[$-8]^u[$-14]^u[$-16])<<1|i>>>31;for(var U=0;U<80;++U){var Y=~~(U/20),X=rotl5(_)+ft(Y,w,x,P)+B+u[U]+j[Y]|0;B=P,P=x,x=rotl30(w),w=_,_=X}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0},Sha1.prototype._hash=function(){var s=x.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha1},26710:(s,i,u)=>{var _=u(56698),w=u(24107),x=u(90392),j=u(92861).Buffer,P=new Array(64);function Sha224(){this.init(),this._w=P,x.call(this,64,56)}_(Sha224,w),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var s=j.allocUnsafe(28);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s},s.exports=Sha224},24107:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],P=new Array(64);function Sha256(){this.init(),this._w=P,w.call(this,64,56)}function ch(s,i,u){return u^s&(i^u)}function maj(s,i,u){return s&i|u&(s|i)}function sigma0(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}function sigma1(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}function gamma0(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}_(Sha256,w),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0|this._f,U=0|this._g,Y=0|this._h,X=0;X<16;++X)u[X]=s.readInt32BE(4*X);for(;X<64;++X)u[X]=0|(((i=u[X-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10)+u[X-7]+gamma0(u[X-15])+u[X-16];for(var Z=0;Z<64;++Z){var ee=Y+sigma1(B)+ch(B,$,U)+j[Z]+u[Z]|0,ie=sigma0(_)+maj(_,w,x)|0;Y=U,U=$,$=B,B=P+ee|0,P=x,x=w,w=_,_=ee+ie|0}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0,this._f=$+this._f|0,this._g=U+this._g|0,this._h=Y+this._h|0},Sha256.prototype._hash=function(){var s=x.allocUnsafe(32);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s.writeInt32BE(this._h,28),s},s.exports=Sha256},32827:(s,i,u)=>{var _=u(56698),w=u(82890),x=u(90392),j=u(92861).Buffer,P=new Array(160);function Sha384(){this.init(),this._w=P,x.call(this,128,112)}_(Sha384,w),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var s=j.allocUnsafe(48);function writeInt64BE(i,u,_){s.writeInt32BE(i,_),s.writeInt32BE(u,_+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),s},s.exports=Sha384},82890:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],P=new Array(160);function Sha512(){this.init(),this._w=P,w.call(this,128,112)}function Ch(s,i,u){return u^s&(i^u)}function maj(s,i,u){return s&i|u&(s|i)}function sigma0(s,i){return(s>>>28|i<<4)^(i>>>2|s<<30)^(i>>>7|s<<25)}function sigma1(s,i){return(s>>>14|i<<18)^(s>>>18|i<<14)^(i>>>9|s<<23)}function Gamma0(s,i){return(s>>>1|i<<31)^(s>>>8|i<<24)^s>>>7}function Gamma0l(s,i){return(s>>>1|i<<31)^(s>>>8|i<<24)^(s>>>7|i<<25)}function Gamma1(s,i){return(s>>>19|i<<13)^(i>>>29|s<<3)^s>>>6}function Gamma1l(s,i){return(s>>>19|i<<13)^(i>>>29|s<<3)^(s>>>6|i<<26)}function getCarry(s,i){return s>>>0<i>>>0?1:0}_(Sha512,w),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(s){for(var i=this._w,u=0|this._ah,_=0|this._bh,w=0|this._ch,x=0|this._dh,P=0|this._eh,B=0|this._fh,$=0|this._gh,U=0|this._hh,Y=0|this._al,X=0|this._bl,Z=0|this._cl,ee=0|this._dl,ie=0|this._el,ae=0|this._fl,le=0|this._gl,ce=0|this._hl,pe=0;pe<32;pe+=2)i[pe]=s.readInt32BE(4*pe),i[pe+1]=s.readInt32BE(4*pe+4);for(;pe<160;pe+=2){var de=i[pe-30],fe=i[pe-30+1],ye=Gamma0(de,fe),be=Gamma0l(fe,de),_e=Gamma1(de=i[pe-4],fe=i[pe-4+1]),we=Gamma1l(fe,de),Se=i[pe-14],xe=i[pe-14+1],Pe=i[pe-32],Te=i[pe-32+1],Re=be+xe|0,qe=ye+Se+getCarry(Re,be)|0;qe=(qe=qe+_e+getCarry(Re=Re+we|0,we)|0)+Pe+getCarry(Re=Re+Te|0,Te)|0,i[pe]=qe,i[pe+1]=Re}for(var $e=0;$e<160;$e+=2){qe=i[$e],Re=i[$e+1];var ze=maj(u,_,w),We=maj(Y,X,Z),He=sigma0(u,Y),Ye=sigma0(Y,u),Xe=sigma1(P,ie),Qe=sigma1(ie,P),et=j[$e],tt=j[$e+1],rt=Ch(P,B,$),nt=Ch(ie,ae,le),ot=ce+Qe|0,st=U+Xe+getCarry(ot,ce)|0;st=(st=(st=st+rt+getCarry(ot=ot+nt|0,nt)|0)+et+getCarry(ot=ot+tt|0,tt)|0)+qe+getCarry(ot=ot+Re|0,Re)|0;var it=Ye+We|0,at=He+ze+getCarry(it,Ye)|0;U=$,ce=le,$=B,le=ae,B=P,ae=ie,P=x+st+getCarry(ie=ee+ot|0,ee)|0,x=w,ee=Z,w=_,Z=X,_=u,X=Y,u=st+at+getCarry(Y=ot+it|0,ot)|0}this._al=this._al+Y|0,this._bl=this._bl+X|0,this._cl=this._cl+Z|0,this._dl=this._dl+ee|0,this._el=this._el+ie|0,this._fl=this._fl+ae|0,this._gl=this._gl+le|0,this._hl=this._hl+ce|0,this._ah=this._ah+u+getCarry(this._al,Y)|0,this._bh=this._bh+_+getCarry(this._bl,X)|0,this._ch=this._ch+w+getCarry(this._cl,Z)|0,this._dh=this._dh+x+getCarry(this._dl,ee)|0,this._eh=this._eh+P+getCarry(this._el,ie)|0,this._fh=this._fh+B+getCarry(this._fl,ae)|0,this._gh=this._gh+$+getCarry(this._gl,le)|0,this._hh=this._hh+U+getCarry(this._hl,ce)|0},Sha512.prototype._hash=function(){var s=x.allocUnsafe(64);function writeInt64BE(i,u,_){s.writeInt32BE(i,_),s.writeInt32BE(u,_+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),s},s.exports=Sha512},8068:s=>{\"use strict\";var i=(()=>{var s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,u,_)=>u in i?s(i,u,{enumerable:!0,configurable:!0,writable:!0,value:_}):i[u]=_,__spreadValues=(s,i)=>{for(var u in i||(i={}))w.call(i,u)&&__defNormalProp(s,u,i[u]);if(_)for(var u of _(i))x.call(i,u)&&__defNormalProp(s,u,i[u]);return s},__publicField=(s,i,u)=>(__defNormalProp(s,\"symbol\"!=typeof i?i+\"\":i,u),u),j={};((i,u)=>{for(var _ in u)s(i,_,{get:u[_],enumerable:!0})})(j,{DEFAULT_OPTIONS:()=>B,DEFAULT_UUID_LENGTH:()=>P,default:()=>Y});var P=6,B={dictionary:\"alphanum\",shuffle:!0,debug:!1,length:P,counter:0},$=class _ShortUniqueId{constructor(s={}){__publicField(this,\"counter\"),__publicField(this,\"debug\"),__publicField(this,\"dict\"),__publicField(this,\"version\"),__publicField(this,\"dictIndex\",0),__publicField(this,\"dictRange\",[]),__publicField(this,\"lowerBound\",0),__publicField(this,\"upperBound\",0),__publicField(this,\"dictLength\",0),__publicField(this,\"uuidLength\"),__publicField(this,\"_digit_first_ascii\",48),__publicField(this,\"_digit_last_ascii\",58),__publicField(this,\"_alpha_lower_first_ascii\",97),__publicField(this,\"_alpha_lower_last_ascii\",123),__publicField(this,\"_hex_last_ascii\",103),__publicField(this,\"_alpha_upper_first_ascii\",65),__publicField(this,\"_alpha_upper_last_ascii\",91),__publicField(this,\"_number_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),__publicField(this,\"_alpha_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alpha_lower_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alpha_upper_dict_ranges\",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_lower_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alphanum_upper_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_hex_dict_ranges\",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),__publicField(this,\"_dict_ranges\",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),__publicField(this,\"log\",((...s)=>{const i=[...s];if(i[0]=`[short-unique-id] ${s[0]}`,!0===this.debug&&\"undefined\"!=typeof console&&null!==console)return console.log(...i)})),__publicField(this,\"setDictionary\",((s,i)=>{let u;if(s&&Array.isArray(s)&&s.length>1)u=s;else{let i;u=[],this.dictIndex=i=0;const _=`_${s}_dict_ranges`,w=this._dict_ranges[_];Object.keys(w).forEach((s=>{const _=s;for(this.dictRange=w[_],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=i=this.lowerBound;this.lowerBound<=this.upperBound?i<this.upperBound:i>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?i+=1:i-=1)u.push(String.fromCharCode(this.dictIndex))}))}if(i){const s=.5;u=u.sort((()=>Math.random()-s))}this.dict=u,this.dictLength=this.dict.length,this.setCounter(0)})),__publicField(this,\"seq\",(()=>this.sequentialUUID())),__publicField(this,\"sequentialUUID\",(()=>{let s,i,u=\"\";s=this.counter;do{i=s%this.dictLength,s=Math.trunc(s/this.dictLength),u+=this.dict[i]}while(0!==s);return this.counter+=1,u})),__publicField(this,\"rnd\",((s=this.uuidLength||P)=>this.randomUUID(s))),__publicField(this,\"randomUUID\",((s=this.uuidLength||P)=>{let i,u,_;if(null==s||s<1)throw new Error(\"Invalid UUID Length Provided\");for(i=\"\",_=0;_<s;_+=1)u=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,i+=this.dict[u];return i})),__publicField(this,\"fmt\",((s,i)=>this.formattedUUID(s,i))),__publicField(this,\"formattedUUID\",((s,i)=>{const u={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return s.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const _=s.slice(0,2),w=parseInt(s.slice(2),10);return\"$s\"===_?u[_]().padStart(w,\"0\"):\"$t\"===_&&i?u[_](w,i):u[_](w)}))})),__publicField(this,\"availableUUIDs\",((s=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,s).toFixed(0)))),__publicField(this,\"approxMaxBeforeCollision\",((s=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*s).toFixed(20)))),__publicField(this,\"collisionProbability\",((s=this.availableUUIDs(this.uuidLength),i=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(s)/this.availableUUIDs(i)).toFixed(20)))),__publicField(this,\"uniqueness\",((s=this.availableUUIDs(this.uuidLength))=>{const i=parseFloat((1-this.approxMaxBeforeCollision(s)/s).toFixed(20));return i>1?1:i<0?0:i})),__publicField(this,\"getVersion\",(()=>this.version)),__publicField(this,\"stamp\",((s,i)=>{const u=Math.floor(+(i||new Date)/1e3).toString(16);if(\"number\"==typeof s&&0===s)return u;if(\"number\"!=typeof s||s<10)throw new Error([\"Param finalLength must be a number greater than or equal to 10,\",\"or 0 if you want the raw hexadecimal timestamp\"].join(\"\\n\"));const _=s-9,w=Math.round(Math.random()*(_>15?15:_)),x=this.randomUUID(_);return`${x.substring(0,w)}${u}${x.substring(w)}${w.toString(16)}`})),__publicField(this,\"parseStamp\",((s,i)=>{if(i&&!/t0|t[1-9]\\d{1,}/.test(i))throw new Error(\"Cannot extract date from a formated UUID with no timestamp in the format\");const u=i?i.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const i={$r:s=>[...Array(s)].map((()=>\"r\")).join(\"\"),$s:s=>[...Array(s)].map((()=>\"s\")).join(\"\"),$t:s=>[...Array(s)].map((()=>\"t\")).join(\"\")},u=s.slice(0,2),_=parseInt(s.slice(2),10);return i[u](_)})).replace(/^(.*?)(t{8,})(.*)$/g,((i,u,_)=>s.substring(u.length,u.length+_.length))):s;if(8===u.length)return new Date(1e3*parseInt(u,16));if(u.length<10)throw new Error(\"Stamp length invalid\");const _=parseInt(u.substring(u.length-1),16);return new Date(1e3*parseInt(u.substring(_,_+8),16))})),__publicField(this,\"setCounter\",(s=>{this.counter=s}));const i=__spreadValues(__spreadValues({},B),s);this.counter=0,this.debug=!1,this.dict=[],this.version=\"5.0.3\";const{dictionary:u,shuffle:_,length:w,counter:x}=i;return this.uuidLength=w,this.setDictionary(u,_),this.setCounter(x),this.debug=i.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};__publicField($,\"default\",$);var U,Y=$;return U=j,((_,x,j,P)=>{if(x&&\"object\"==typeof x||\"function\"==typeof x)for(let B of u(x))w.call(_,B)||B===j||s(_,B,{get:()=>x[B],enumerable:!(P=i(x,B))||P.enumerable});return _})(s({},\"__esModule\",{value:!0}),U)})();s.exports=i.default,\"undefined\"!=typeof window&&(i=i.default)},920:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(38075),x=u(58859),j=_(\"%TypeError%\"),P=_(\"%WeakMap%\",!0),B=_(\"%Map%\",!0),$=w(\"WeakMap.prototype.get\",!0),U=w(\"WeakMap.prototype.set\",!0),Y=w(\"WeakMap.prototype.has\",!0),X=w(\"Map.prototype.get\",!0),Z=w(\"Map.prototype.set\",!0),ee=w(\"Map.prototype.has\",!0),listGetNode=function(s,i){for(var u,_=s;null!==(u=_.next);_=u)if(u.key===i)return _.next=u.next,u.next=s.next,s.next=u,u};s.exports=function getSideChannel(){var s,i,u,_={assert:function(s){if(!_.has(s))throw new j(\"Side channel does not contain \"+x(s))},get:function(_){if(P&&_&&(\"object\"==typeof _||\"function\"==typeof _)){if(s)return $(s,_)}else if(B){if(i)return X(i,_)}else if(u)return function(s,i){var u=listGetNode(s,i);return u&&u.value}(u,_)},has:function(_){if(P&&_&&(\"object\"==typeof _||\"function\"==typeof _)){if(s)return Y(s,_)}else if(B){if(i)return ee(i,_)}else if(u)return function(s,i){return!!listGetNode(s,i)}(u,_);return!1},set:function(_,w){P&&_&&(\"object\"==typeof _||\"function\"==typeof _)?(s||(s=new P),U(s,_,w)):B?(i||(i=new B),Z(i,_,w)):(u||(u={key:{},next:null}),function(s,i,u){var _=listGetNode(s,i);_?_.value=u:s.next={key:i,next:s.next,value:u}}(u,_,w))}};return _}},12646:s=>{!function(){\"use strict\";var i,u,_,w,x,j=\"properties\",P=\"deepProperties\",B=\"propertyDescriptors\",$=\"staticProperties\",U=\"staticDeepProperties\",Y=\"staticPropertyDescriptors\",X=\"configuration\",Z=\"deepConfiguration\",ee=\"deepProps\",ie=\"deepStatics\",ae=\"deepConf\",le=\"initializers\",ce=\"methods\",pe=\"composers\",de=\"compose\";function S(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s):[])}function r(s,i){return Array.prototype.slice.call(arguments,2).reduce(s,i)}var fe=r.bind(0,(function r(s,i){if(i)for(var u=S(i),_=0;_<u.length;_+=1)Object.defineProperty(s,u[_],Object.getOwnPropertyDescriptor(i,u[_]));return s}));function C(s){return\"function\"==typeof s}function N(s){return s&&\"object\"==typeof s||C(s)}function z(s){return s&&\"object\"==typeof s&&s.__proto__==Object.prototype}var ye=r.bind(0,(function r(s,u){if(u===i)return s;if(Array.isArray(u))return(Array.isArray(s)?s:[]).concat(u);if(!z(u))return u;for(var _,w,x=S(u),j=0;j<x.length;)_=x[j++],(w=Object.getOwnPropertyDescriptor(u,_)).hasOwnProperty(\"value\")?w.value!==i&&(s[_]=r(z(s[_])||Array.isArray(u[_])?s[_]:{},u[_])):Object.defineProperty(s,_,w);return s}));function I(){return(u=Array.prototype.concat.apply([],arguments).filter((function(s,i,u){return C(s)&&u.indexOf(s)===i}))).length?u:i}function e(s,i){function r(u,_){N(i[u])&&(N(s[u])||(s[u]={}),(_||fe)(s[u],i[u]))}function t(_){(u=I(s[_],i[_]))&&(s[_]=u)}return i&&N(i=i[de]||i)&&(r(ce),r(j),r(P,ye),r(B),r($),r(U,ye),r(Y),r(X),r(Z,ye),t(le),t(pe)),s}function R(){return function t(s){return u=function r(){return function r(s){var u,_,w=r[de]||{},x={__proto__:w[ce]},$=w[le],U=Array.prototype.slice.apply(arguments),Y=w[P];if(Y&&ye(x,Y),(Y=w[j])&&fe(x,Y),(Y=w[B])&&Object.defineProperties(x,Y),!$||!$.length)return x;for(s===i&&(s={}),w=0;w<$.length;)C(u=$[w++])&&(x=(_=u.call(x,s,{instance:x,stamp:r,args:U}))===i?x:_);return x}}(),(_=s[U])&&ye(u,_),(_=s[$])&&fe(u,_),(_=s[Y])&&Object.defineProperties(u,_),_=C(u[de])?u[de]:R,fe(u[de]=function(){return _.apply(this,arguments)},s),u}(Array.prototype.concat.apply([this],arguments).reduce(e,{}))}function V(s){return C(s)&&C(s[de])}var be={};function o(s,x){return function(){return(w={})[s]=x.apply(i,Array.prototype.concat.apply([{}],arguments)),((u=this)&&u[de]||_).call(u,w)}}be[ce]=o(ce,fe),be[j]=be.props=o(j,fe),be[le]=be.init=o(le,I),be[pe]=o(pe,I),be[P]=be[ee]=o(P,ye),be[$]=be.statics=o($,fe),be[U]=be[ie]=o(U,ye),be[X]=be.conf=o(X,fe),be[Z]=be[ae]=o(Z,ye),be[B]=o(B,fe),be[Y]=o(Y,fe),_=be[de]=fe((function r(){for(var s,be,_e=0,we=[],Se=arguments,xe=this;_e<Se.length;)N(s=Se[_e++])&&we.push(V(s)?s:((w={})[ce]=(be=s)[ce]||i,_=be.props,w[j]=N((u=be[j])||_)?fe({},_,u):i,w[le]=I(be.init,be[le]),w[pe]=I(be[pe]),_=be[ee],w[P]=N((u=be[P])||_)?ye({},_,u):i,w[B]=be[B],_=be.statics,w[$]=N((u=be[$])||_)?fe({},_,u):i,_=be[ie],w[U]=N((u=be[U])||_)?ye({},_,u):i,u=be[Y],w[Y]=N((_=be.name&&{name:{value:be.name}})||u)?fe({},u,_):i,_=be.conf,w[X]=N((u=be[X])||_)?fe({},_,u):i,_=be[ae],w[Z]=N((u=be[Z])||_)?ye({},_,u):i,w));if(s=R.apply(xe||x,we),xe&&we.unshift(xe),Array.isArray(Se=s[de][pe]))for(_e=0;_e<Se.length;)s=V(xe=Se[_e++]({stamp:s,composables:we}))?xe:s;return s}),be),be.create=function(){return this.apply(i,arguments)},(w={})[$]=be,x=R(w),_[de]=_.bind(),_.version=\"4.3.2\",\"object\"!=typeof i?s.exports=_:self.stampit=_}()},88310:(s,i,u)=>{s.exports=Stream;var _=u(37007).EventEmitter;function Stream(){_.call(this)}u(56698)(Stream,_),Stream.Readable=u(45412),Stream.Writable=u(16708),Stream.Duplex=u(25382),Stream.Transform=u(74610),Stream.PassThrough=u(63600),Stream.finished=u(86238),Stream.pipeline=u(57758),Stream.Stream=Stream,Stream.prototype.pipe=function(s,i){var u=this;function ondata(i){s.writable&&!1===s.write(i)&&u.pause&&u.pause()}function ondrain(){u.readable&&u.resume&&u.resume()}u.on(\"data\",ondata),s.on(\"drain\",ondrain),s._isStdio||i&&!1===i.end||(u.on(\"end\",onend),u.on(\"close\",onclose));var w=!1;function onend(){w||(w=!0,s.end())}function onclose(){w||(w=!0,\"function\"==typeof s.destroy&&s.destroy())}function onerror(s){if(cleanup(),0===_.listenerCount(this,\"error\"))throw s}function cleanup(){u.removeListener(\"data\",ondata),s.removeListener(\"drain\",ondrain),u.removeListener(\"end\",onend),u.removeListener(\"close\",onclose),u.removeListener(\"error\",onerror),s.removeListener(\"error\",onerror),u.removeListener(\"end\",cleanup),u.removeListener(\"close\",cleanup),s.removeListener(\"close\",cleanup)}return u.on(\"error\",onerror),s.on(\"error\",onerror),u.on(\"end\",cleanup),u.on(\"close\",cleanup),s.on(\"close\",cleanup),s.emit(\"pipe\",u),s}},83141:(s,i,u)=>{\"use strict\";var _=u(92861).Buffer,w=_.isEncoding||function(s){switch((s=\"\"+s)&&s.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(s){var i;switch(this.encoding=function normalizeEncoding(s){var i=function _normalizeEncoding(s){if(!s)return\"utf8\";for(var i;;)switch(s){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return s;default:if(i)return;s=(\"\"+s).toLowerCase(),i=!0}}(s);if(\"string\"!=typeof i&&(_.isEncoding===w||!w(s)))throw new Error(\"Unknown encoding: \"+s);return i||s}(s),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,i=4;break;case\"utf8\":this.fillLast=utf8FillLast,i=4;break;case\"base64\":this.text=base64Text,this.end=base64End,i=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(i)}function utf8CheckByte(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function utf8FillLast(s){var i=this.lastTotal-this.lastNeed,u=function utf8CheckExtraBytes(s,i,u){if(128!=(192&i[0]))return s.lastNeed=0,\"�\";if(s.lastNeed>1&&i.length>1){if(128!=(192&i[1]))return s.lastNeed=1,\"�\";if(s.lastNeed>2&&i.length>2&&128!=(192&i[2]))return s.lastNeed=2,\"�\"}}(this,s);return void 0!==u?u:this.lastNeed<=s.length?(s.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,i,0,s.length),void(this.lastNeed-=s.length))}function utf16Text(s,i){if((s.length-i)%2==0){var u=s.toString(\"utf16le\",i);if(u){var _=u.charCodeAt(u.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString(\"utf16le\",i,s.length-1)}function utf16End(s){var i=s&&s.length?this.write(s):\"\";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return i+this.lastChar.toString(\"utf16le\",0,u)}return i}function base64Text(s,i){var u=(s.length-i)%3;return 0===u?s.toString(\"base64\",i):(this.lastNeed=3-u,this.lastTotal=3,1===u?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString(\"base64\",i,s.length-u))}function base64End(s){var i=s&&s.length?this.write(s):\"\";return this.lastNeed?i+this.lastChar.toString(\"base64\",0,3-this.lastNeed):i}function simpleWrite(s){return s.toString(this.encoding)}function simpleEnd(s){return s&&s.length?this.write(s):\"\"}i.I=StringDecoder,StringDecoder.prototype.write=function(s){if(0===s.length)return\"\";var i,u;if(this.lastNeed){if(void 0===(i=this.fillLast(s)))return\"\";u=this.lastNeed,this.lastNeed=0}else u=0;return u<s.length?i?i+this.text(s,u):this.text(s,u):i||\"\"},StringDecoder.prototype.end=function utf8End(s){var i=s&&s.length?this.write(s):\"\";return this.lastNeed?i+\"�\":i},StringDecoder.prototype.text=function utf8Text(s,i){var u=function utf8CheckIncomplete(s,i,u){var _=i.length-1;if(_<u)return 0;var w=utf8CheckByte(i[_]);if(w>=0)return w>0&&(s.lastNeed=w-1),w;if(--_<u||-2===w)return 0;if(w=utf8CheckByte(i[_]),w>=0)return w>0&&(s.lastNeed=w-2),w;if(--_<u||-2===w)return 0;if(w=utf8CheckByte(i[_]),w>=0)return w>0&&(2===w?w=0:s.lastNeed=w-3),w;return 0}(this,s,i);if(!this.lastNeed)return s.toString(\"utf8\",i);this.lastTotal=u;var _=s.length-(u-this.lastNeed);return s.copy(this.lastChar,0,_),s.toString(\"utf8\",i,_)},StringDecoder.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},16426:s=>{s.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var i=document.activeElement,u=[],_=0;_<s.rangeCount;_++)u.push(s.getRangeAt(_));switch(i.tagName.toUpperCase()){case\"INPUT\":case\"TEXTAREA\":i.blur();break;default:i=null}return s.removeAllRanges(),function(){\"Caret\"===s.type&&s.removeAllRanges(),s.rangeCount||u.forEach((function(i){s.addRange(i)})),i&&i.focus()}}},36623:s=>{\"use strict\";function toS(s){return Object.prototype.toString.call(s)}var i=Array.isArray||function isArray(s){return\"[object Array]\"===Object.prototype.toString.call(s)};function forEach(s,i){if(s.forEach)return s.forEach(i);for(var u=0;u<s.length;u++)i(s[u],u,s)}var u=Object.keys||function keys(s){var i=[];for(var u in s)i.push(u);return i},_=Object.prototype.hasOwnProperty||function(s,i){return i in s};function copy(s){if(\"object\"==typeof s&&null!==s){var _;if(i(s))_=[];else if(function isDate(s){return\"[object Date]\"===toS(s)}(s))_=new Date(s.getTime?s.getTime():s);else if(function isRegExp(s){return\"[object RegExp]\"===toS(s)}(s))_=new RegExp(s);else if(function isError(s){return\"[object Error]\"===toS(s)}(s))_={message:s.message};else if(function isBoolean(s){return\"[object Boolean]\"===toS(s)}(s)||function isNumber(s){return\"[object Number]\"===toS(s)}(s)||function isString(s){return\"[object String]\"===toS(s)}(s))_=Object(s);else if(Object.create&&Object.getPrototypeOf)_=Object.create(Object.getPrototypeOf(s));else if(s.constructor===Object)_={};else{var w=s.constructor&&s.constructor.prototype||s.__proto__||{},x=function T(){};x.prototype=w,_=new x}return forEach(u(s),(function(i){_[i]=s[i]})),_}return s}function walk(s,w,x){var j=[],P=[],B=!0;return function walker(s){var $=x?copy(s):s,U={},Y=!0,X={node:$,node_:s,path:[].concat(j),parent:P[P.length-1],parents:P,key:j[j.length-1],isRoot:0===j.length,level:j.length,circular:null,update:function(s,i){X.isRoot||(X.parent.node[X.key]=s),X.node=s,i&&(Y=!1)},delete:function(s){delete X.parent.node[X.key],s&&(Y=!1)},remove:function(s){i(X.parent.node)?X.parent.node.splice(X.key,1):delete X.parent.node[X.key],s&&(Y=!1)},keys:null,before:function(s){U.before=s},after:function(s){U.after=s},pre:function(s){U.pre=s},post:function(s){U.post=s},stop:function(){B=!1},block:function(){Y=!1}};if(!B)return X;function updateState(){if(\"object\"==typeof X.node&&null!==X.node){X.keys&&X.node_===X.node||(X.keys=u(X.node)),X.isLeaf=0===X.keys.length;for(var i=0;i<P.length;i++)if(P[i].node_===s){X.circular=P[i];break}}else X.isLeaf=!0,X.keys=null;X.notLeaf=!X.isLeaf,X.notRoot=!X.isRoot}updateState();var Z=w.call(X,X.node);return void 0!==Z&&X.update&&X.update(Z),U.before&&U.before.call(X,X.node),Y?(\"object\"!=typeof X.node||null===X.node||X.circular||(P.push(X),updateState(),forEach(X.keys,(function(s,i){j.push(s),U.pre&&U.pre.call(X,X.node[s],s);var u=walker(X.node[s]);x&&_.call(X.node,s)&&(X.node[s]=u.node),u.isLast=i===X.keys.length-1,u.isFirst=0===i,U.post&&U.post.call(X,u),j.pop()})),P.pop()),U.after&&U.after.call(X,X.node),X):X}(s).node}function Traverse(s){this.value=s}function traverse(s){return new Traverse(s)}Traverse.prototype.get=function(s){for(var i=this.value,u=0;u<s.length;u++){var w=s[u];if(!i||!_.call(i,w))return;i=i[w]}return i},Traverse.prototype.has=function(s){for(var i=this.value,u=0;u<s.length;u++){var w=s[u];if(!i||!_.call(i,w))return!1;i=i[w]}return!0},Traverse.prototype.set=function(s,i){for(var u=this.value,w=0;w<s.length-1;w++){var x=s[w];_.call(u,x)||(u[x]={}),u=u[x]}return u[s[w]]=i,i},Traverse.prototype.map=function(s){return walk(this.value,s,!0)},Traverse.prototype.forEach=function(s){return this.value=walk(this.value,s,!1),this.value},Traverse.prototype.reduce=function(s,i){var u=1===arguments.length,_=u?this.value:i;return this.forEach((function(i){this.isRoot&&u||(_=s.call(this,_,i))})),_},Traverse.prototype.paths=function(){var s=[];return this.forEach((function(){s.push(this.path)})),s},Traverse.prototype.nodes=function(){var s=[];return this.forEach((function(){s.push(this.node)})),s},Traverse.prototype.clone=function(){var s=[],i=[];return function clone(_){for(var w=0;w<s.length;w++)if(s[w]===_)return i[w];if(\"object\"==typeof _&&null!==_){var x=copy(_);return s.push(_),i.push(x),forEach(u(_),(function(s){x[s]=clone(_[s])})),s.pop(),i.pop(),x}return _}(this.value)},forEach(u(Traverse.prototype),(function(s){traverse[s]=function(i){var u=[].slice.call(arguments,1),_=new Traverse(i);return _[s].apply(_,u)}})),s.exports=traverse},61160:(s,i,u)=>{\"use strict\";var _=u(92063),w=u(73992),x=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,j=/[\\n\\r\\t]/g,P=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,B=/:\\d+$/,$=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,U=/^[a-zA-Z]:/;function trimLeft(s){return(s||\"\").toString().replace(x,\"\")}var Y=[[\"#\",\"hash\"],[\"?\",\"query\"],function sanitize(s,i){return isSpecial(i.protocol)?s.replace(/\\\\/g,\"/\"):s},[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],X={hash:1,query:1};function lolcation(s){var i,_=(\"undefined\"!=typeof window?window:void 0!==u.g?u.g:\"undefined\"!=typeof self?self:{}).location||{},w={},x=typeof(s=s||_);if(\"blob:\"===s.protocol)w=new Url(unescape(s.pathname),{});else if(\"string\"===x)for(i in w=new Url(s,{}),X)delete w[i];else if(\"object\"===x){for(i in s)i in X||(w[i]=s[i]);void 0===w.slashes&&(w.slashes=P.test(s.href))}return w}function isSpecial(s){return\"file:\"===s||\"ftp:\"===s||\"http:\"===s||\"https:\"===s||\"ws:\"===s||\"wss:\"===s}function extractProtocol(s,i){s=(s=trimLeft(s)).replace(j,\"\"),i=i||{};var u,_=$.exec(s),w=_[1]?_[1].toLowerCase():\"\",x=!!_[2],P=!!_[3],B=0;return x?P?(u=_[2]+_[3]+_[4],B=_[2].length+_[3].length):(u=_[2]+_[4],B=_[2].length):P?(u=_[3]+_[4],B=_[3].length):u=_[4],\"file:\"===w?B>=2&&(u=u.slice(2)):isSpecial(w)?u=_[4]:w?x&&(u=u.slice(2)):B>=2&&isSpecial(i.protocol)&&(u=_[4]),{protocol:w,slashes:x||isSpecial(w),slashesCount:B,rest:u}}function Url(s,i,u){if(s=(s=trimLeft(s)).replace(j,\"\"),!(this instanceof Url))return new Url(s,i,u);var x,P,B,$,X,Z,ee=Y.slice(),ie=typeof i,ae=this,le=0;for(\"object\"!==ie&&\"string\"!==ie&&(u=i,i=null),u&&\"function\"!=typeof u&&(u=w.parse),x=!(P=extractProtocol(s||\"\",i=lolcation(i))).protocol&&!P.slashes,ae.slashes=P.slashes||x&&i.slashes,ae.protocol=P.protocol||i.protocol||\"\",s=P.rest,(\"file:\"===P.protocol&&(2!==P.slashesCount||U.test(s))||!P.slashes&&(P.protocol||P.slashesCount<2||!isSpecial(ae.protocol)))&&(ee[3]=[/(.*)/,\"pathname\"]);le<ee.length;le++)\"function\"!=typeof($=ee[le])?(B=$[0],Z=$[1],B!=B?ae[Z]=s:\"string\"==typeof B?~(X=\"@\"===B?s.lastIndexOf(B):s.indexOf(B))&&(\"number\"==typeof $[2]?(ae[Z]=s.slice(0,X),s=s.slice(X+$[2])):(ae[Z]=s.slice(X),s=s.slice(0,X))):(X=B.exec(s))&&(ae[Z]=X[1],s=s.slice(0,X.index)),ae[Z]=ae[Z]||x&&$[3]&&i[Z]||\"\",$[4]&&(ae[Z]=ae[Z].toLowerCase())):s=$(s,ae);u&&(ae.query=u(ae.query)),x&&i.slashes&&\"/\"!==ae.pathname.charAt(0)&&(\"\"!==ae.pathname||\"\"!==i.pathname)&&(ae.pathname=function resolve(s,i){if(\"\"===s)return i;for(var u=(i||\"/\").split(\"/\").slice(0,-1).concat(s.split(\"/\")),_=u.length,w=u[_-1],x=!1,j=0;_--;)\".\"===u[_]?u.splice(_,1):\"..\"===u[_]?(u.splice(_,1),j++):j&&(0===_&&(x=!0),u.splice(_,1),j--);return x&&u.unshift(\"\"),\".\"!==w&&\"..\"!==w||u.push(\"\"),u.join(\"/\")}(ae.pathname,i.pathname)),\"/\"!==ae.pathname.charAt(0)&&isSpecial(ae.protocol)&&(ae.pathname=\"/\"+ae.pathname),_(ae.port,ae.protocol)||(ae.host=ae.hostname,ae.port=\"\"),ae.username=ae.password=\"\",ae.auth&&(~(X=ae.auth.indexOf(\":\"))?(ae.username=ae.auth.slice(0,X),ae.username=encodeURIComponent(decodeURIComponent(ae.username)),ae.password=ae.auth.slice(X+1),ae.password=encodeURIComponent(decodeURIComponent(ae.password))):ae.username=encodeURIComponent(decodeURIComponent(ae.auth)),ae.auth=ae.password?ae.username+\":\"+ae.password:ae.username),ae.origin=\"file:\"!==ae.protocol&&isSpecial(ae.protocol)&&ae.host?ae.protocol+\"//\"+ae.host:\"null\",ae.href=ae.toString()}Url.prototype={set:function set(s,i,u){var x=this;switch(s){case\"query\":\"string\"==typeof i&&i.length&&(i=(u||w.parse)(i)),x[s]=i;break;case\"port\":x[s]=i,_(i,x.protocol)?i&&(x.host=x.hostname+\":\"+i):(x.host=x.hostname,x[s]=\"\");break;case\"hostname\":x[s]=i,x.port&&(i+=\":\"+x.port),x.host=i;break;case\"host\":x[s]=i,B.test(i)?(i=i.split(\":\"),x.port=i.pop(),x.hostname=i.join(\":\")):(x.hostname=i,x.port=\"\");break;case\"protocol\":x.protocol=i.toLowerCase(),x.slashes=!u;break;case\"pathname\":case\"hash\":if(i){var j=\"pathname\"===s?\"/\":\"#\";x[s]=i.charAt(0)!==j?j+i:i}else x[s]=i;break;case\"username\":case\"password\":x[s]=encodeURIComponent(i);break;case\"auth\":var P=i.indexOf(\":\");~P?(x.username=i.slice(0,P),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=i.slice(P+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(i))}for(var $=0;$<Y.length;$++){var U=Y[$];U[4]&&(x[U[1]]=x[U[1]].toLowerCase())}return x.auth=x.password?x.username+\":\"+x.password:x.username,x.origin=\"file:\"!==x.protocol&&isSpecial(x.protocol)&&x.host?x.protocol+\"//\"+x.host:\"null\",x.href=x.toString(),x},toString:function toString(s){s&&\"function\"==typeof s||(s=w.stringify);var i,u=this,_=u.host,x=u.protocol;x&&\":\"!==x.charAt(x.length-1)&&(x+=\":\");var j=x+(u.protocol&&u.slashes||isSpecial(u.protocol)?\"//\":\"\");return u.username?(j+=u.username,u.password&&(j+=\":\"+u.password),j+=\"@\"):u.password?(j+=\":\"+u.password,j+=\"@\"):\"file:\"!==u.protocol&&isSpecial(u.protocol)&&!_&&\"/\"!==u.pathname&&(j+=\"@\"),(\":\"===_[_.length-1]||B.test(u.hostname)&&!u.port)&&(_+=\":\"),j+=_+u.pathname,(i=\"object\"==typeof u.query?s(u.query):u.query)&&(j+=\"?\"!==i.charAt(0)?\"?\"+i:i),u.hash&&(j+=u.hash),j}},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=w,s.exports=Url},77154:(s,i,u)=>{\"use strict\";var _=u(96540);var w=\"function\"==typeof Object.is?Object.is:function n(s,i){return s===i&&(0!==s||1/s==1/i)||s!=s&&i!=i},x=_.useSyncExternalStore,j=_.useRef,P=_.useEffect,B=_.useMemo,$=_.useDebugValue;i.useSyncExternalStoreWithSelector=function(s,i,u,_,U){var Y=j(null);if(null===Y.current){var X={hasValue:!1,value:null};Y.current=X}else X=Y.current;Y=B((function(){function a(i){if(!j){if(j=!0,s=i,i=_(i),void 0!==U&&X.hasValue){var u=X.value;if(U(u,i))return x=u}return x=i}if(u=x,w(s,i))return u;var P=_(i);return void 0!==U&&U(u,P)?u:(s=i,x=P)}var s,x,j=!1,P=void 0===u?null:u;return[function(){return a(i())},null===P?void 0:function(){return a(P())}]}),[i,u,_,U]);var Z=x(s,Y[0],Y[1]);return P((function(){X.hasValue=!0,X.value=Z}),[Z]),$(Z),Z}},78418:(s,i,u)=>{\"use strict\";s.exports=u(77154)},94643:(s,i,u)=>{function config(s){try{if(!u.g.localStorage)return!1}catch(s){return!1}var i=u.g.localStorage[s];return null!=i&&\"true\"===String(i).toLowerCase()}s.exports=function deprecate(s,i){if(config(\"noDeprecation\"))return s;var u=!1;return function deprecated(){if(!u){if(config(\"throwDeprecation\"))throw new Error(i);config(\"traceDeprecation\")?console.trace(i):console.warn(i),u=!0}return s.apply(this,arguments)}}},26657:(s,i,u)=>{\"use strict\";var _=u(75208),w=function isClosingTag(s){return/<\\/+[^>]+>/.test(s)},x=function isSelfClosingTag(s){return/<[^>]+\\/>/.test(s)},j=function isOpeningTag(s){return function isTag(s){return/<[^>!]+>/.test(s)}(s)&&!w(s)&&!x(s)};function getType(s){return w(s)?\"ClosingTag\":j(s)?\"OpeningTag\":x(s)?\"SelfClosingTag\":\"Text\"}s.exports=function(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=i.indentor,w=i.textNodesOnSameLine,x=0,j=[];u=u||\"    \";var P=function lexer(s){return function splitOnTags(s){return s.split(/(<\\/?[^>]+>)/g).filter((function(s){return\"\"!==s.trim()}))}(s).map((function(s){return{value:s,type:getType(s)}}))}(s).map((function(s,i,P){var B=s.value,$=s.type;\"ClosingTag\"===$&&x--;var U=_(u,x),Y=U+B;if(\"OpeningTag\"===$&&x++,w){var X=P[i-1],Z=P[i-2];\"ClosingTag\"===$&&\"Text\"===X.type&&\"OpeningTag\"===Z.type&&(Y=\"\"+U+Z.value+X.value+B,j.push(i-2,i-1))}return Y}));return j.forEach((function(s){return P[s]=null})),P.filter((function(s){return!!s})).join(\"\\n\")}},31499:s=>{var i={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};s.exports=function escapeForXML(s){return s&&s.replace?s.replace(/([&\"<>'])/g,(function(s,u){return i[u]})):s}},19123:(s,i,u)=>{var _=u(65606),w=u(31499),x=u(88310).Stream;function resolve(s,i,u){var _,x=function create_indent(s,i){return new Array(i||0).join(s||\"\")}(i,u=u||0),j=s;if(\"object\"==typeof s&&((j=s[_=Object.keys(s)[0]])&&j._elem))return j._elem.name=_,j._elem.icount=u,j._elem.indent=i,j._elem.indents=x,j._elem.interrupt=j,j._elem;var P,B=[],$=[];function get_attributes(s){Object.keys(s).forEach((function(i){B.push(function attribute(s,i){return s+'=\"'+w(i)+'\"'}(i,s[i]))}))}switch(typeof j){case\"object\":if(null===j)break;j._attr&&get_attributes(j._attr),j._cdata&&$.push((\"<![CDATA[\"+j._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),j.forEach&&(P=!1,$.push(\"\"),j.forEach((function(s){\"object\"==typeof s?\"_attr\"==Object.keys(s)[0]?get_attributes(s._attr):$.push(resolve(s,i,u+1)):($.pop(),P=!0,$.push(w(s)))})),P||$.push(\"\"));break;default:$.push(w(j))}return{name:_,interrupt:!1,attributes:B,content:$,icount:u,indents:x,indent:i}}function format(s,i,u){if(\"object\"!=typeof i)return s(!1,i);var _=i.interrupt?1:i.content.length;function proceed(){for(;i.content.length;){var w=i.content.shift();if(void 0!==w){if(interrupt(w))return;format(s,w)}}s(!1,(_>1?i.indents:\"\")+(i.name?\"</\"+i.name+\">\":\"\")+(i.indent&&!u?\"\\n\":\"\")),u&&u()}function interrupt(i){return!!i.interrupt&&(i.interrupt.append=s,i.interrupt.end=proceed,i.interrupt=!1,s(!0),!0)}if(s(!1,i.indents+(i.name?\"<\"+i.name:\"\")+(i.attributes.length?\" \"+i.attributes.join(\" \"):\"\")+(_?i.name?\">\":\"\":i.name?\"/>\":\"\")+(i.indent&&_>1?\"\\n\":\"\")),!_)return s(!1,i.indent?\"\\n\":\"\");interrupt(i)||proceed()}s.exports=function xml(s,i){\"object\"!=typeof i&&(i={indent:i});var u=i.stream?new x:null,w=\"\",j=!1,P=i.indent?!0===i.indent?\"    \":i.indent:\"\",B=!0;function delay(s){B?_.nextTick(s):s()}function append(s,i){if(void 0!==i&&(w+=i),s&&!j&&(u=u||new x,j=!0),s&&j){var _=w;delay((function(){u.emit(\"data\",_)})),w=\"\"}}function add(s,i){format(append,resolve(s,P,P?1:0),i)}function end(){if(u){var s=w;delay((function(){u.emit(\"data\",s),u.emit(\"end\"),u.readable=!1,u.emit(\"close\")}))}}return delay((function(){B=!1})),i.declaration&&function addXmlDeclaration(s){var i={version:\"1.0\",encoding:s.encoding||\"UTF-8\"};s.standalone&&(i.standalone=s.standalone),add({\"?xml\":{_attr:i}}),w=w.replace(\"/>\",\"?>\")}(i.declaration),s&&s.forEach?s.forEach((function(i,u){var _;u+1===s.length&&(_=end),add(i,_)})):add(s,end),u?(u.readable=!0,u):w},s.exports.element=s.exports.Element=function element(){var s={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(s){if(!this.append)throw new Error(\"not assigned to a parent!\");var i=this,u=this._elem.indent;format(this.append,resolve(s,u,this._elem.icount+(u?1:0)),(function(){i.append(!0)}))},close:function(s){void 0!==s&&this.push(s),this.end&&this.end()}};return s}},86215:function(s,i){var u,_,w;_=[],u=function(){\"use strict\";var isNativeSmoothScrollEnabledOn=function(s){return s&&\"getComputedStyle\"in window&&\"smooth\"===window.getComputedStyle(s)[\"scroll-behavior\"]};if(\"undefined\"==typeof window||!(\"document\"in window))return{};var makeScroller=function(s,i,u){var _;i=i||999,u||0===u||(u=9);var setScrollTimeoutId=function(s){_=s},stopScroll=function(){clearTimeout(_),setScrollTimeoutId(0)},getTopWithEdgeOffset=function(i){return Math.max(0,s.getTopOf(i)-u)},scrollToY=function(u,_,w){if(stopScroll(),0===_||_&&_<0||isNativeSmoothScrollEnabledOn(s.body))s.toY(u),w&&w();else{var x=s.getY(),j=Math.max(0,u)-x,P=(new Date).getTime();_=_||Math.min(Math.abs(j),i),function loopScroll(){setScrollTimeoutId(setTimeout((function(){var i=Math.min(1,((new Date).getTime()-P)/_),u=Math.max(0,Math.floor(x+j*(i<.5?2*i*i:i*(4-2*i)-1)));s.toY(u),i<1&&s.getHeight()+u<s.body.scrollHeight?loopScroll():(setTimeout(stopScroll,99),w&&w())}),9))}()}},scrollToElem=function(s,i,u){scrollToY(getTopWithEdgeOffset(s),i,u)},scrollIntoView=function(i,_,w){var x=i.getBoundingClientRect().height,j=s.getTopOf(i)+x,P=s.getHeight(),B=s.getY(),$=B+P;getTopWithEdgeOffset(i)<B||x+u>P?scrollToElem(i,_,w):j+u>$?scrollToY(j-P+u,_,w):w&&w()},scrollToCenterOf=function(i,u,_,w){scrollToY(Math.max(0,s.getTopOf(i)-s.getHeight()/2+(_||i.getBoundingClientRect().height/2)),u,w)};return{setup:function(s,_){return(0===s||s)&&(i=s),(0===_||_)&&(u=_),{defaultDuration:i,edgeOffset:u}},to:scrollToElem,toY:scrollToY,intoView:scrollIntoView,center:scrollToCenterOf,stop:stopScroll,moving:function(){return!!_},getY:s.getY,getTopOf:s.getTopOf}},s=document.documentElement,getDocY=function(){return window.scrollY||s.scrollTop},i=makeScroller({body:document.scrollingElement||document.body,toY:function(s){window.scrollTo(0,s)},getY:getDocY,getHeight:function(){return window.innerHeight||s.clientHeight},getTopOf:function(i){return i.getBoundingClientRect().top+getDocY()-s.offsetTop}});if(i.createScroller=function(i,u,_){return makeScroller({body:i,toY:function(s){i.scrollTop=s},getY:function(){return i.scrollTop},getHeight:function(){return Math.min(i.clientHeight,window.innerHeight||s.clientHeight)},getTopOf:function(s){return s.offsetTop}},u,_)},\"addEventListener\"in window&&!window.noZensmooth&&!isNativeSmoothScrollEnabledOn(document.body)){var u=\"history\"in window&&\"pushState\"in history,_=u&&\"scrollRestoration\"in history;_&&(history.scrollRestoration=\"auto\"),window.addEventListener(\"load\",(function(){_&&(setTimeout((function(){history.scrollRestoration=\"manual\"}),9),window.addEventListener(\"popstate\",(function(s){s.state&&\"zenscrollY\"in s.state&&i.toY(s.state.zenscrollY)}),!1)),window.location.hash&&setTimeout((function(){var s=i.setup().edgeOffset;if(s){var u=document.getElementById(window.location.href.split(\"#\")[1]);if(u){var _=Math.max(0,i.getTopOf(u)-s),w=i.getY()-_;0<=w&&w<9&&window.scrollTo(0,_)}}}),9)}),!1);var w=new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\");window.addEventListener(\"click\",(function(s){for(var x=s.target;x&&\"A\"!==x.tagName;)x=x.parentNode;if(!(!x||1!==s.which||s.shiftKey||s.metaKey||s.ctrlKey||s.altKey)){if(_){var j=history.state&&\"object\"==typeof history.state?history.state:{};j.zenscrollY=i.getY();try{history.replaceState(j,\"\")}catch(s){}}var P=x.getAttribute(\"href\")||\"\";if(0===P.indexOf(\"#\")&&!w.test(x.className)){var B=0,$=document.getElementById(P.substring(1));if(\"#\"!==P){if(!$)return;B=i.getTopOf($)}s.preventDefault();var onDone=function(){window.location=P},U=i.setup().edgeOffset;U&&(B=Math.max(0,B-U),u&&(onDone=function(){history.pushState({},\"\",P)})),i.toY(B,null,onDone)}}}),!1)}return i}(),void 0===(w=\"function\"==typeof u?u.apply(i,_):u)||(s.exports=w)},42634:()=>{},15340:()=>{},79838:()=>{},48675:(s,i,u)=>{s.exports=u(20850)},7666:(s,i,u)=>{var _=u(84851),w=u(953);function _extends(){var i;return s.exports=_extends=_?w(i=_).call(i):function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},s.exports.__esModule=!0,s.exports.default=s.exports,_extends.apply(this,arguments)}s.exports=_extends,s.exports.__esModule=!0,s.exports.default=s.exports},46942:(s,i)=>{var u;!function(){\"use strict\";var _={}.hasOwnProperty;function classNames(){for(var s=\"\",i=0;i<arguments.length;i++){var u=arguments[i];u&&(s=appendClass(s,parseValue(u)))}return s}function parseValue(s){if(\"string\"==typeof s||\"number\"==typeof s)return s;if(\"object\"!=typeof s)return\"\";if(Array.isArray(s))return classNames.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var i=\"\";for(var u in s)_.call(s,u)&&s[u]&&(i=appendClass(i,u));return i}function appendClass(s,i){return i?s?s+\" \"+i:s+i:s}s.exports?(classNames.default=classNames,s.exports=classNames):void 0===(u=function(){return classNames}.apply(i,[]))||(s.exports=u)}()},68623:(s,i,u)=>{\"use strict\";var _=u(694);s.exports=_},93700:(s,i,u)=>{\"use strict\";var _=u(19709);s.exports=_},462:(s,i,u)=>{\"use strict\";var _=u(40975);s.exports=_},37257:(s,i,u)=>{\"use strict\";u(96605),u(64502),u(36371),u(99363),u(7057);var _=u(92046);s.exports=_.AggregateError},32567:(s,i,u)=>{\"use strict\";u(79307);var _=u(61747);s.exports=_(\"Function\",\"bind\")},23034:(s,i,u)=>{\"use strict\";var _=u(88280),w=u(32567),x=Function.prototype;s.exports=function(s){var i=s.bind;return s===x||_(x,s)&&i===x.bind?w:i}},9748:(s,i,u)=>{\"use strict\";u(71340);var _=u(92046);s.exports=_.Object.assign},20850:(s,i,u)=>{\"use strict\";s.exports=u(46076)},953:(s,i,u)=>{\"use strict\";s.exports=u(53375)},84851:(s,i,u)=>{\"use strict\";s.exports=u(85401)},46076:(s,i,u)=>{\"use strict\";u(91599);var _=u(68623);s.exports=_},53375:(s,i,u)=>{\"use strict\";var _=u(93700);s.exports=_},85401:(s,i,u)=>{\"use strict\";var _=u(462);s.exports=_},82159:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(4640),x=TypeError;s.exports=function(s){if(_(s))return s;throw new x(w(s)+\" is not a function\")}},10043:(s,i,u)=>{\"use strict\";var _=u(62250),w=String,x=TypeError;s.exports=function(s){if(\"object\"==typeof s||_(s))return s;throw new x(\"Can't set \"+w(s)+\" as a prototype\")}},42156:s=>{\"use strict\";s.exports=function(){}},36624:(s,i,u)=>{\"use strict\";var _=u(46285),w=String,x=TypeError;s.exports=function(s){if(_(s))return s;throw new x(w(s)+\" is not an object\")}},74436:(s,i,u)=>{\"use strict\";var _=u(4993),w=u(34849),x=u(20575),createMethod=function(s){return function(i,u,j){var P,B=_(i),$=x(B),U=w(j,$);if(s&&u!=u){for(;$>U;)if((P=B[U++])!=P)return!0}else for(;$>U;U++)if((s||U in B)&&B[U]===u)return s||U||0;return!s&&-1}};s.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},93427:(s,i,u)=>{\"use strict\";var _=u(1907);s.exports=_([].slice)},45807:(s,i,u)=>{\"use strict\";var _=u(1907),w=_({}.toString),x=_(\"\".slice);s.exports=function(s){return x(w(s),8,-1)}},73948:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(62250),x=u(45807),j=u(76264)(\"toStringTag\"),P=Object,B=\"Arguments\"===x(function(){return arguments}());s.exports=_?x:function(s){var i,u,_;return void 0===s?\"Undefined\":null===s?\"Null\":\"string\"==typeof(u=function(s,i){try{return s[i]}catch(s){}}(i=P(s),j))?u:B?x(i):\"Object\"===(_=x(i))&&w(i.callee)?\"Arguments\":_}},19595:(s,i,u)=>{\"use strict\";var _=u(49724),w=u(11042),x=u(13846),j=u(74284);s.exports=function(s,i,u){for(var P=w(i),B=j.f,$=x.f,U=0;U<P.length;U++){var Y=P[U];_(s,Y)||u&&_(u,Y)||B(s,Y,$(i,Y))}}},57382:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},59550:s=>{\"use strict\";s.exports=function(s,i){return{value:s,done:i}}},61626:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(74284),x=u(75817);s.exports=_?function(s,i,u){return w.f(s,i,x(1,u))}:function(s,i,u){return s[i]=u,s}},75817:s=>{\"use strict\";s.exports=function(s,i){return{enumerable:!(1&s),configurable:!(2&s),writable:!(4&s),value:i}}},68055:(s,i,u)=>{\"use strict\";var _=u(61626);s.exports=function(s,i,u,w){return w&&w.enumerable?s[i]=u:_(s,i,u),s}},2532:(s,i,u)=>{\"use strict\";var _=u(41010),w=Object.defineProperty;s.exports=function(s,i){try{w(_,s,{value:i,configurable:!0,writable:!0})}catch(u){_[s]=i}return i}},39447:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},97882:s=>{\"use strict\";var i=\"object\"==typeof document&&document.all,u=void 0===i&&void 0!==i;s.exports={all:i,IS_HTMLDDA:u}},49552:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(46285),x=_.document,j=w(x)&&w(x.createElement);s.exports=function(s){return j?x.createElement(s):{}}},19287:s=>{\"use strict\";s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},64723:s=>{\"use strict\";s.exports=\"undefined\"!=typeof navigator&&String(navigator.userAgent)||\"\"},15683:(s,i,u)=>{\"use strict\";var _,w,x=u(41010),j=u(64723),P=x.process,B=x.Deno,$=P&&P.versions||B&&B.version,U=$&&$.v8;U&&(w=(_=U.split(\".\"))[0]>0&&_[0]<4?1:+(_[0]+_[1])),!w&&j&&(!(_=j.match(/Edge\\/(\\d+)/))||_[1]>=74)&&(_=j.match(/Chrome\\/(\\d+)/))&&(w=+_[1]),s.exports=w},80376:s=>{\"use strict\";s.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},85762:(s,i,u)=>{\"use strict\";var _=u(1907),w=Error,x=_(\"\".replace),j=String(new w(\"zxcasd\").stack),P=/\\n\\s*at [^:]*:[^\\n]*/,B=P.test(j);s.exports=function(s,i){if(B&&\"string\"==typeof s&&!w.prepareStackTrace)for(;i--;)s=x(s,P,\"\");return s}},85884:(s,i,u)=>{\"use strict\";var _=u(61626),w=u(85762),x=u(23888),j=Error.captureStackTrace;s.exports=function(s,i,u,P){x&&(j?j(s,i):_(s,\"stack\",w(u,P)))}},23888:(s,i,u)=>{\"use strict\";var _=u(98828),w=u(75817);s.exports=!_((function(){var s=new Error(\"a\");return!(\"stack\"in s)||(Object.defineProperty(s,\"stack\",w(1,7)),7!==s.stack)}))},11091:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(76024),x=u(92361),j=u(62250),P=u(13846).f,B=u(7463),$=u(92046),U=u(28311),Y=u(61626),X=u(49724),wrapConstructor=function(s){var Wrapper=function(i,u,_){if(this instanceof Wrapper){switch(arguments.length){case 0:return new s;case 1:return new s(i);case 2:return new s(i,u)}return new s(i,u,_)}return w(s,this,arguments)};return Wrapper.prototype=s.prototype,Wrapper};s.exports=function(s,i){var u,w,Z,ee,ie,ae,le,ce,pe,de=s.target,fe=s.global,ye=s.stat,be=s.proto,_e=fe?_:ye?_[de]:(_[de]||{}).prototype,we=fe?$:$[de]||Y($,de,{})[de],Se=we.prototype;for(ee in i)w=!(u=B(fe?ee:de+(ye?\".\":\"#\")+ee,s.forced))&&_e&&X(_e,ee),ae=we[ee],w&&(le=s.dontCallGetSet?(pe=P(_e,ee))&&pe.value:_e[ee]),ie=w&&le?le:i[ee],w&&typeof ae==typeof ie||(ce=s.bind&&w?U(ie,_):s.wrap&&w?wrapConstructor(ie):be&&j(ie)?x(ie):ie,(s.sham||ie&&ie.sham||ae&&ae.sham)&&Y(ce,\"sham\",!0),Y(we,ee,ce),be&&(X($,Z=de+\"Prototype\")||Y($,Z,{}),Y($[Z],ee,ie),s.real&&Se&&(u||!Se[ee])&&Y(Se,ee,ie)))}},98828:s=>{\"use strict\";s.exports=function(s){try{return!!s()}catch(s){return!0}}},76024:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype,x=w.apply,j=w.call;s.exports=\"object\"==typeof Reflect&&Reflect.apply||(_?j.bind(x):function(){return j.apply(x,arguments)})},28311:(s,i,u)=>{\"use strict\";var _=u(92361),w=u(82159),x=u(41505),j=_(_.bind);s.exports=function(s,i){return w(s),void 0===i?s:x?j(s,i):function(){return s.apply(i,arguments)}}},41505:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){var s=function(){}.bind();return\"function\"!=typeof s||s.hasOwnProperty(\"prototype\")}))},44673:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(82159),x=u(46285),j=u(49724),P=u(93427),B=u(41505),$=Function,U=_([].concat),Y=_([].join),X={};s.exports=B?$.bind:function bind(s){var i=w(this),u=i.prototype,_=P(arguments,1),B=function bound(){var u=U(_,P(arguments));return this instanceof B?function(s,i,u){if(!j(X,i)){for(var _=[],w=0;w<i;w++)_[w]=\"a[\"+w+\"]\";X[i]=$(\"C,a\",\"return new C(\"+Y(_,\",\")+\")\")}return X[i](s,u)}(i,u.length,u):i.apply(s,u)};return x(u)&&(B.prototype=u),B}},13930:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype.call;s.exports=_?w.bind(w):function(){return w.apply(w,arguments)}},36833:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(49724),x=Function.prototype,j=_&&Object.getOwnPropertyDescriptor,P=w(x,\"name\"),B=P&&\"something\"===function something(){}.name,$=P&&(!_||_&&j(x,\"name\").configurable);s.exports={EXISTS:P,PROPER:B,CONFIGURABLE:$}},51871:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(82159);s.exports=function(s,i,u){try{return _(w(Object.getOwnPropertyDescriptor(s,i)[u]))}catch(s){}}},92361:(s,i,u)=>{\"use strict\";var _=u(45807),w=u(1907);s.exports=function(s){if(\"Function\"===_(s))return w(s)}},1907:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype,x=w.call,j=_&&w.bind.bind(x,x);s.exports=_?j:function(s){return function(){return x.apply(s,arguments)}}},61747:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(92046);s.exports=function(s,i){var u=w[s+\"Prototype\"],x=u&&u[i];if(x)return x;var j=_[s],P=j&&j.prototype;return P&&P[i]}},85582:(s,i,u)=>{\"use strict\";var _=u(92046),w=u(41010),x=u(62250),aFunction=function(s){return x(s)?s:void 0};s.exports=function(s,i){return arguments.length<2?aFunction(_[s])||aFunction(w[s]):_[s]&&_[s][i]||w[s]&&w[s][i]}},73448:(s,i,u)=>{\"use strict\";var _=u(73948),w=u(29367),x=u(87136),j=u(93742),P=u(76264)(\"iterator\");s.exports=function(s){if(!x(s))return w(s,P)||w(s,\"@@iterator\")||j[_(s)]}},10300:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(82159),x=u(36624),j=u(4640),P=u(73448),B=TypeError;s.exports=function(s,i){var u=arguments.length<2?P(s):i;if(w(u))return x(_(u,s));throw new B(j(s)+\" is not iterable\")}},29367:(s,i,u)=>{\"use strict\";var _=u(82159),w=u(87136);s.exports=function(s,i){var u=s[i];return w(u)?void 0:_(u)}},41010:function(s,i,u){\"use strict\";var check=function(s){return s&&s.Math===Math&&s};s.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof u.g&&u.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},49724:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(39298),x=_({}.hasOwnProperty);s.exports=Object.hasOwn||function hasOwn(s,i){return x(w(s),i)}},38530:s=>{\"use strict\";s.exports={}},62416:(s,i,u)=>{\"use strict\";var _=u(85582);s.exports=_(\"document\",\"documentElement\")},73648:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(98828),x=u(49552);s.exports=!_&&!w((function(){return 7!==Object.defineProperty(x(\"div\"),\"a\",{get:function(){return 7}}).a}))},16946:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(98828),x=u(45807),j=Object,P=_(\"\".split);s.exports=w((function(){return!j(\"z\").propertyIsEnumerable(0)}))?function(s){return\"String\"===x(s)?P(s,\"\"):j(s)}:j},34084:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(46285),x=u(79192);s.exports=function(s,i,u){var j,P;return x&&_(j=i.constructor)&&j!==u&&w(P=j.prototype)&&P!==u.prototype&&x(s,P),s}},39259:(s,i,u)=>{\"use strict\";var _=u(46285),w=u(61626);s.exports=function(s,i){_(i)&&\"cause\"in i&&w(s,\"cause\",i.cause)}},64932:(s,i,u)=>{\"use strict\";var _,w,x,j=u(40551),P=u(41010),B=u(46285),$=u(61626),U=u(49724),Y=u(36128),X=u(92522),Z=u(38530),ee=\"Object already initialized\",ie=P.TypeError,ae=P.WeakMap;if(j||Y.state){var le=Y.state||(Y.state=new ae);le.get=le.get,le.has=le.has,le.set=le.set,_=function(s,i){if(le.has(s))throw new ie(ee);return i.facade=s,le.set(s,i),i},w=function(s){return le.get(s)||{}},x=function(s){return le.has(s)}}else{var ce=X(\"state\");Z[ce]=!0,_=function(s,i){if(U(s,ce))throw new ie(ee);return i.facade=s,$(s,ce,i),i},w=function(s){return U(s,ce)?s[ce]:{}},x=function(s){return U(s,ce)}}s.exports={set:_,get:w,has:x,enforce:function(s){return x(s)?w(s):_(s,{})},getterFor:function(s){return function(i){var u;if(!B(i)||(u=w(i)).type!==s)throw new ie(\"Incompatible receiver, \"+s+\" required\");return u}}}},37812:(s,i,u)=>{\"use strict\";var _=u(76264),w=u(93742),x=_(\"iterator\"),j=Array.prototype;s.exports=function(s){return void 0!==s&&(w.Array===s||j[x]===s)}},62250:(s,i,u)=>{\"use strict\";var _=u(97882),w=_.all;s.exports=_.IS_HTMLDDA?function(s){return\"function\"==typeof s||s===w}:function(s){return\"function\"==typeof s}},7463:(s,i,u)=>{\"use strict\";var _=u(98828),w=u(62250),x=/#|\\.prototype\\./,isForced=function(s,i){var u=P[j(s)];return u===$||u!==B&&(w(i)?_(i):!!i)},j=isForced.normalize=function(s){return String(s).replace(x,\".\").toLowerCase()},P=isForced.data={},B=isForced.NATIVE=\"N\",$=isForced.POLYFILL=\"P\";s.exports=isForced},87136:s=>{\"use strict\";s.exports=function(s){return null==s}},46285:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(97882),x=w.all;s.exports=w.IS_HTMLDDA?function(s){return\"object\"==typeof s?null!==s:_(s)||s===x}:function(s){return\"object\"==typeof s?null!==s:_(s)}},7376:s=>{\"use strict\";s.exports=!0},25594:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(62250),x=u(88280),j=u(51175),P=Object;s.exports=j?function(s){return\"symbol\"==typeof s}:function(s){var i=_(\"Symbol\");return w(i)&&x(i.prototype,P(s))}},24823:(s,i,u)=>{\"use strict\";var _=u(28311),w=u(13930),x=u(36624),j=u(4640),P=u(37812),B=u(20575),$=u(88280),U=u(10300),Y=u(73448),X=u(40154),Z=TypeError,Result=function(s,i){this.stopped=s,this.result=i},ee=Result.prototype;s.exports=function(s,i,u){var ie,ae,le,ce,pe,de,fe,ye=u&&u.that,be=!(!u||!u.AS_ENTRIES),_e=!(!u||!u.IS_RECORD),we=!(!u||!u.IS_ITERATOR),Se=!(!u||!u.INTERRUPTED),xe=_(i,ye),stop=function(s){return ie&&X(ie,\"normal\",s),new Result(!0,s)},callFn=function(s){return be?(x(s),Se?xe(s[0],s[1],stop):xe(s[0],s[1])):Se?xe(s,stop):xe(s)};if(_e)ie=s.iterator;else if(we)ie=s;else{if(!(ae=Y(s)))throw new Z(j(s)+\" is not iterable\");if(P(ae)){for(le=0,ce=B(s);ce>le;le++)if((pe=callFn(s[le]))&&$(ee,pe))return pe;return new Result(!1)}ie=U(s,ae)}for(de=_e?s.next:ie.next;!(fe=w(de,ie)).done;){try{pe=callFn(fe.value)}catch(s){X(ie,\"throw\",s)}if(\"object\"==typeof pe&&pe&&$(ee,pe))return pe}return new Result(!1)}},40154:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(36624),x=u(29367);s.exports=function(s,i,u){var j,P;w(s);try{if(!(j=x(s,\"return\"))){if(\"throw\"===i)throw u;return u}j=_(j,s)}catch(s){P=!0,j=s}if(\"throw\"===i)throw u;if(P)throw j;return w(j),u}},47181:(s,i,u)=>{\"use strict\";var _=u(95116).IteratorPrototype,w=u(58075),x=u(75817),j=u(14840),P=u(93742),returnThis=function(){return this};s.exports=function(s,i,u,B){var $=i+\" Iterator\";return s.prototype=w(_,{next:x(+!B,u)}),j(s,$,!1,!0),P[$]=returnThis,s}},60183:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(13930),x=u(7376),j=u(36833),P=u(62250),B=u(47181),$=u(15972),U=u(79192),Y=u(14840),X=u(61626),Z=u(68055),ee=u(76264),ie=u(93742),ae=u(95116),le=j.PROPER,ce=j.CONFIGURABLE,pe=ae.IteratorPrototype,de=ae.BUGGY_SAFARI_ITERATORS,fe=ee(\"iterator\"),ye=\"keys\",be=\"values\",_e=\"entries\",returnThis=function(){return this};s.exports=function(s,i,u,j,ee,ae,we){B(u,i,j);var Se,xe,Pe,getIterationMethod=function(s){if(s===ee&&ze)return ze;if(!de&&s&&s in qe)return qe[s];switch(s){case ye:return function keys(){return new u(this,s)};case be:return function values(){return new u(this,s)};case _e:return function entries(){return new u(this,s)}}return function(){return new u(this)}},Te=i+\" Iterator\",Re=!1,qe=s.prototype,$e=qe[fe]||qe[\"@@iterator\"]||ee&&qe[ee],ze=!de&&$e||getIterationMethod(ee),We=\"Array\"===i&&qe.entries||$e;if(We&&(Se=$(We.call(new s)))!==Object.prototype&&Se.next&&(x||$(Se)===pe||(U?U(Se,pe):P(Se[fe])||Z(Se,fe,returnThis)),Y(Se,Te,!0,!0),x&&(ie[Te]=returnThis)),le&&ee===be&&$e&&$e.name!==be&&(!x&&ce?X(qe,\"name\",be):(Re=!0,ze=function values(){return w($e,this)})),ee)if(xe={values:getIterationMethod(be),keys:ae?ze:getIterationMethod(ye),entries:getIterationMethod(_e)},we)for(Pe in xe)(de||Re||!(Pe in qe))&&Z(qe,Pe,xe[Pe]);else _({target:i,proto:!0,forced:de||Re},xe);return x&&!we||qe[fe]===ze||Z(qe,fe,ze,{name:ee}),ie[i]=ze,xe}},95116:(s,i,u)=>{\"use strict\";var _,w,x,j=u(98828),P=u(62250),B=u(46285),$=u(58075),U=u(15972),Y=u(68055),X=u(76264),Z=u(7376),ee=X(\"iterator\"),ie=!1;[].keys&&(\"next\"in(x=[].keys())?(w=U(U(x)))!==Object.prototype&&(_=w):ie=!0),!B(_)||j((function(){var s={};return _[ee].call(s)!==s}))?_={}:Z&&(_=$(_)),P(_[ee])||Y(_,ee,(function(){return this})),s.exports={IteratorPrototype:_,BUGGY_SAFARI_ITERATORS:ie}},93742:s=>{\"use strict\";s.exports={}},20575:(s,i,u)=>{\"use strict\";var _=u(3121);s.exports=function(s){return _(s.length)}},41176:s=>{\"use strict\";var i=Math.ceil,u=Math.floor;s.exports=Math.trunc||function trunc(s){var _=+s;return(_>0?u:i)(_)}},32096:(s,i,u)=>{\"use strict\";var _=u(90160);s.exports=function(s,i){return void 0===s?arguments.length<2?\"\":i:_(s)}},29538:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(1907),x=u(13930),j=u(98828),P=u(2875),B=u(87170),$=u(22574),U=u(39298),Y=u(16946),X=Object.assign,Z=Object.defineProperty,ee=w([].concat);s.exports=!X||j((function(){if(_&&1!==X({b:1},X(Z({},\"a\",{enumerable:!0,get:function(){Z(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var s={},i={},u=Symbol(\"assign detection\"),w=\"abcdefghijklmnopqrst\";return s[u]=7,w.split(\"\").forEach((function(s){i[s]=s})),7!==X({},s)[u]||P(X({},i)).join(\"\")!==w}))?function assign(s,i){for(var u=U(s),w=arguments.length,j=1,X=B.f,Z=$.f;w>j;)for(var ie,ae=Y(arguments[j++]),le=X?ee(P(ae),X(ae)):P(ae),ce=le.length,pe=0;ce>pe;)ie=le[pe++],_&&!x(Z,ae,ie)||(u[ie]=ae[ie]);return u}:X},58075:(s,i,u)=>{\"use strict\";var _,w=u(36624),x=u(42220),j=u(80376),P=u(38530),B=u(62416),$=u(49552),U=u(92522),Y=\"prototype\",X=\"script\",Z=U(\"IE_PROTO\"),EmptyConstructor=function(){},scriptTag=function(s){return\"<\"+X+\">\"+s+\"</\"+X+\">\"},NullProtoObjectViaActiveX=function(s){s.write(scriptTag(\"\")),s.close();var i=s.parentWindow.Object;return s=null,i},NullProtoObject=function(){try{_=new ActiveXObject(\"htmlfile\")}catch(s){}var s,i,u;NullProtoObject=\"undefined\"!=typeof document?document.domain&&_?NullProtoObjectViaActiveX(_):(i=$(\"iframe\"),u=\"java\"+X+\":\",i.style.display=\"none\",B.appendChild(i),i.src=String(u),(s=i.contentWindow.document).open(),s.write(scriptTag(\"document.F=Object\")),s.close(),s.F):NullProtoObjectViaActiveX(_);for(var w=j.length;w--;)delete NullProtoObject[Y][j[w]];return NullProtoObject()};P[Z]=!0,s.exports=Object.create||function create(s,i){var u;return null!==s?(EmptyConstructor[Y]=w(s),u=new EmptyConstructor,EmptyConstructor[Y]=null,u[Z]=s):u=NullProtoObject(),void 0===i?u:x.f(u,i)}},42220:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(58661),x=u(74284),j=u(36624),P=u(4993),B=u(2875);i.f=_&&!w?Object.defineProperties:function defineProperties(s,i){j(s);for(var u,_=P(i),w=B(i),$=w.length,U=0;$>U;)x.f(s,u=w[U++],_[u]);return s}},74284:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(73648),x=u(58661),j=u(36624),P=u(70470),B=TypeError,$=Object.defineProperty,U=Object.getOwnPropertyDescriptor,Y=\"enumerable\",X=\"configurable\",Z=\"writable\";i.f=_?x?function defineProperty(s,i,u){if(j(s),i=P(i),j(u),\"function\"==typeof s&&\"prototype\"===i&&\"value\"in u&&Z in u&&!u[Z]){var _=U(s,i);_&&_[Z]&&(s[i]=u.value,u={configurable:X in u?u[X]:_[X],enumerable:Y in u?u[Y]:_[Y],writable:!1})}return $(s,i,u)}:$:function defineProperty(s,i,u){if(j(s),i=P(i),j(u),w)try{return $(s,i,u)}catch(s){}if(\"get\"in u||\"set\"in u)throw new B(\"Accessors not supported\");return\"value\"in u&&(s[i]=u.value),s}},13846:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(13930),x=u(22574),j=u(75817),P=u(4993),B=u(70470),$=u(49724),U=u(73648),Y=Object.getOwnPropertyDescriptor;i.f=_?Y:function getOwnPropertyDescriptor(s,i){if(s=P(s),i=B(i),U)try{return Y(s,i)}catch(s){}if($(s,i))return j(!w(x.f,s,i),s[i])}},24443:(s,i,u)=>{\"use strict\";var _=u(23045),w=u(80376).concat(\"length\",\"prototype\");i.f=Object.getOwnPropertyNames||function getOwnPropertyNames(s){return _(s,w)}},87170:(s,i)=>{\"use strict\";i.f=Object.getOwnPropertySymbols},15972:(s,i,u)=>{\"use strict\";var _=u(49724),w=u(62250),x=u(39298),j=u(92522),P=u(57382),B=j(\"IE_PROTO\"),$=Object,U=$.prototype;s.exports=P?$.getPrototypeOf:function(s){var i=x(s);if(_(i,B))return i[B];var u=i.constructor;return w(u)&&i instanceof u?u.prototype:i instanceof $?U:null}},88280:(s,i,u)=>{\"use strict\";var _=u(1907);s.exports=_({}.isPrototypeOf)},23045:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(49724),x=u(4993),j=u(74436).indexOf,P=u(38530),B=_([].push);s.exports=function(s,i){var u,_=x(s),$=0,U=[];for(u in _)!w(P,u)&&w(_,u)&&B(U,u);for(;i.length>$;)w(_,u=i[$++])&&(~j(U,u)||B(U,u));return U}},2875:(s,i,u)=>{\"use strict\";var _=u(23045),w=u(80376);s.exports=Object.keys||function keys(s){return _(s,w)}},22574:(s,i)=>{\"use strict\";var u={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,w=_&&!u.call({1:2},1);i.f=w?function propertyIsEnumerable(s){var i=_(this,s);return!!i&&i.enumerable}:u},79192:(s,i,u)=>{\"use strict\";var _=u(51871),w=u(36624),x=u(10043);s.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var s,i=!1,u={};try{(s=_(Object.prototype,\"__proto__\",\"set\"))(u,[]),i=u instanceof Array}catch(s){}return function setPrototypeOf(u,_){return w(u),x(_),i?s(u,_):u.__proto__=_,u}}():void 0)},54878:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(73948);s.exports=_?{}.toString:function toString(){return\"[object \"+w(this)+\"]\"}},60581:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(62250),x=u(46285),j=TypeError;s.exports=function(s,i){var u,P;if(\"string\"===i&&w(u=s.toString)&&!x(P=_(u,s)))return P;if(w(u=s.valueOf)&&!x(P=_(u,s)))return P;if(\"string\"!==i&&w(u=s.toString)&&!x(P=_(u,s)))return P;throw new j(\"Can't convert object to primitive value\")}},11042:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(1907),x=u(24443),j=u(87170),P=u(36624),B=w([].concat);s.exports=_(\"Reflect\",\"ownKeys\")||function ownKeys(s){var i=x.f(P(s)),u=j.f;return u?B(i,u(s)):i}},92046:s=>{\"use strict\";s.exports={}},54829:(s,i,u)=>{\"use strict\";var _=u(74284).f;s.exports=function(s,i,u){u in s||_(s,u,{configurable:!0,get:function(){return i[u]},set:function(s){i[u]=s}})}},74239:(s,i,u)=>{\"use strict\";var _=u(87136),w=TypeError;s.exports=function(s){if(_(s))throw new w(\"Can't call method on \"+s);return s}},14840:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(74284).f,x=u(61626),j=u(49724),P=u(54878),B=u(76264)(\"toStringTag\");s.exports=function(s,i,u,$){var U=u?s:s&&s.prototype;U&&(j(U,B)||w(U,B,{configurable:!0,value:i}),$&&!_&&x(U,\"toString\",P))}},92522:(s,i,u)=>{\"use strict\";var _=u(85816),w=u(6499),x=_(\"keys\");s.exports=function(s){return x[s]||(x[s]=w(s))}},36128:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(2532),x=\"__core-js_shared__\",j=_[x]||w(x,{});s.exports=j},85816:(s,i,u)=>{\"use strict\";var _=u(7376),w=u(36128);(s.exports=function(s,i){return w[s]||(w[s]=void 0!==i?i:{})})(\"versions\",[]).push({version:\"3.34.0\",mode:_?\"pure\":\"global\",copyright:\"© 2014-2023 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},11470:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(65482),x=u(90160),j=u(74239),P=_(\"\".charAt),B=_(\"\".charCodeAt),$=_(\"\".slice),createMethod=function(s){return function(i,u){var _,U,Y=x(j(i)),X=w(u),Z=Y.length;return X<0||X>=Z?s?\"\":void 0:(_=B(Y,X))<55296||_>56319||X+1===Z||(U=B(Y,X+1))<56320||U>57343?s?P(Y,X):_:s?$(Y,X,X+2):U-56320+(_-55296<<10)+65536}};s.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},19846:(s,i,u)=>{\"use strict\";var _=u(15683),w=u(98828),x=u(41010).String;s.exports=!!Object.getOwnPropertySymbols&&!w((function(){var s=Symbol(\"symbol detection\");return!x(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&_&&_<41}))},34849:(s,i,u)=>{\"use strict\";var _=u(65482),w=Math.max,x=Math.min;s.exports=function(s,i){var u=_(s);return u<0?w(u+i,0):x(u,i)}},4993:(s,i,u)=>{\"use strict\";var _=u(16946),w=u(74239);s.exports=function(s){return _(w(s))}},65482:(s,i,u)=>{\"use strict\";var _=u(41176);s.exports=function(s){var i=+s;return i!=i||0===i?0:_(i)}},3121:(s,i,u)=>{\"use strict\";var _=u(65482),w=Math.min;s.exports=function(s){return s>0?w(_(s),9007199254740991):0}},39298:(s,i,u)=>{\"use strict\";var _=u(74239),w=Object;s.exports=function(s){return w(_(s))}},46028:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(46285),x=u(25594),j=u(29367),P=u(60581),B=u(76264),$=TypeError,U=B(\"toPrimitive\");s.exports=function(s,i){if(!w(s)||x(s))return s;var u,B=j(s,U);if(B){if(void 0===i&&(i=\"default\"),u=_(B,s,i),!w(u)||x(u))return u;throw new $(\"Can't convert object to primitive value\")}return void 0===i&&(i=\"number\"),P(s,i)}},70470:(s,i,u)=>{\"use strict\";var _=u(46028),w=u(25594);s.exports=function(s){var i=_(s,\"string\");return w(i)?i:i+\"\"}},52623:(s,i,u)=>{\"use strict\";var _={};_[u(76264)(\"toStringTag\")]=\"z\",s.exports=\"[object z]\"===String(_)},90160:(s,i,u)=>{\"use strict\";var _=u(73948),w=String;s.exports=function(s){if(\"Symbol\"===_(s))throw new TypeError(\"Cannot convert a Symbol value to a string\");return w(s)}},4640:s=>{\"use strict\";var i=String;s.exports=function(s){try{return i(s)}catch(s){return\"Object\"}}},6499:(s,i,u)=>{\"use strict\";var _=u(1907),w=0,x=Math.random(),j=_(1..toString);s.exports=function(s){return\"Symbol(\"+(void 0===s?\"\":s)+\")_\"+j(++w+x,36)}},51175:(s,i,u)=>{\"use strict\";var _=u(19846);s.exports=_&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},58661:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(98828);s.exports=_&&w((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},40551:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(62250),x=_.WeakMap;s.exports=w(x)&&/native code/.test(String(x))},76264:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(85816),x=u(49724),j=u(6499),P=u(19846),B=u(51175),$=_.Symbol,U=w(\"wks\"),Y=B?$.for||$:$&&$.withoutSetter||j;s.exports=function(s){return x(U,s)||(U[s]=P&&x($,s)?$[s]:Y(\"Symbol.\"+s)),U[s]}},19358:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(49724),x=u(61626),j=u(88280),P=u(79192),B=u(19595),$=u(54829),U=u(34084),Y=u(32096),X=u(39259),Z=u(85884),ee=u(39447),ie=u(7376);s.exports=function(s,i,u,ae){var le=\"stackTraceLimit\",ce=ae?2:1,pe=s.split(\".\"),de=pe[pe.length-1],fe=_.apply(null,pe);if(fe){var ye=fe.prototype;if(!ie&&w(ye,\"cause\")&&delete ye.cause,!u)return fe;var be=_(\"Error\"),_e=i((function(s,i){var u=Y(ae?i:s,void 0),_=ae?new fe(s):new fe;return void 0!==u&&x(_,\"message\",u),Z(_,_e,_.stack,2),this&&j(ye,this)&&U(_,this,_e),arguments.length>ce&&X(_,arguments[ce]),_}));if(_e.prototype=ye,\"Error\"!==de?P?P(_e,be):B(_e,be,{name:!0}):ee&&le in fe&&($(_e,fe,le),$(_e,fe,\"prepareStackTrace\")),B(_e,fe),!ie)try{ye.name!==de&&x(ye,\"name\",de),ye.constructor=_e}catch(s){}return _e}}},36371:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(85582),x=u(76024),j=u(98828),P=u(19358),B=\"AggregateError\",$=w(B),U=!j((function(){return 1!==$([1]).errors[0]}))&&j((function(){return 7!==$([1],B,{cause:7}).cause}));_({global:!0,constructor:!0,arity:2,forced:U},{AggregateError:P(B,(function(s){return function AggregateError(i,u){return x(s,this,arguments)}}),U,!0)})},82048:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(88280),x=u(15972),j=u(79192),P=u(19595),B=u(58075),$=u(61626),U=u(75817),Y=u(39259),X=u(85884),Z=u(24823),ee=u(32096),ie=u(76264)(\"toStringTag\"),ae=Error,le=[].push,ce=function AggregateError(s,i){var u,_=w(pe,this);j?u=j(new ae,_?x(this):pe):(u=_?this:B(pe),$(u,ie,\"Error\")),void 0!==i&&$(u,\"message\",ee(i)),X(u,ce,u.stack,1),arguments.length>2&&Y(u,arguments[2]);var P=[];return Z(s,le,{that:P}),$(u,\"errors\",P),u};j?j(ce,ae):P(ce,ae,{name:!0});var pe=ce.prototype=B(ae.prototype,{constructor:U(1,ce),message:U(1,\"\"),name:U(1,\"AggregateError\")});_({global:!0,constructor:!0,arity:2},{AggregateError:ce})},64502:(s,i,u)=>{\"use strict\";u(82048)},99363:(s,i,u)=>{\"use strict\";var _=u(4993),w=u(42156),x=u(93742),j=u(64932),P=u(74284).f,B=u(60183),$=u(59550),U=u(7376),Y=u(39447),X=\"Array Iterator\",Z=j.set,ee=j.getterFor(X);s.exports=B(Array,\"Array\",(function(s,i){Z(this,{type:X,target:_(s),index:0,kind:i})}),(function(){var s=ee(this),i=s.target,u=s.index++;if(!i||u>=i.length)return s.target=void 0,$(void 0,!0);switch(s.kind){case\"keys\":return $(u,!1);case\"values\":return $(i[u],!1)}return $([u,i[u]],!1)}),\"values\");var ie=x.Arguments=x.Array;if(w(\"keys\"),w(\"values\"),w(\"entries\"),!U&&Y&&\"values\"!==ie.name)try{P(ie,\"name\",{value:\"values\"})}catch(s){}},96605:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(41010),x=u(76024),j=u(19358),P=\"WebAssembly\",B=w[P],$=7!==new Error(\"e\",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(s,i){var u={};u[s]=j(s,i,$),_({global:!0,constructor:!0,arity:1,forced:$},u)},exportWebAssemblyErrorCauseWrapper=function(s,i){if(B&&B[s]){var u={};u[s]=j(P+\".\"+s,i,$),_({target:P,stat:!0,constructor:!0,arity:1,forced:$},u)}};exportGlobalErrorCauseWrapper(\"Error\",(function(s){return function Error(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"EvalError\",(function(s){return function EvalError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"RangeError\",(function(s){return function RangeError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"ReferenceError\",(function(s){return function ReferenceError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"SyntaxError\",(function(s){return function SyntaxError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"TypeError\",(function(s){return function TypeError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"URIError\",(function(s){return function URIError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"CompileError\",(function(s){return function CompileError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"LinkError\",(function(s){return function LinkError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"RuntimeError\",(function(s){return function RuntimeError(i){return x(s,this,arguments)}}))},79307:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(44673);_({target:\"Function\",proto:!0,forced:Function.bind!==w},{bind:w})},71340:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(29538);_({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==w},{assign:w})},7057:(s,i,u)=>{\"use strict\";var _=u(11470).charAt,w=u(90160),x=u(64932),j=u(60183),P=u(59550),B=\"String Iterator\",$=x.set,U=x.getterFor(B);j(String,\"String\",(function(s){$(this,{type:B,string:w(s),index:0})}),(function next(){var s,i=U(this),u=i.string,w=i.index;return w>=u.length?P(void 0,!0):(s=_(u,w),i.index+=s.length,P(s,!1))}))},91599:(s,i,u)=>{\"use strict\";u(64502)},12560:(s,i,u)=>{\"use strict\";u(99363);var _=u(19287),w=u(41010),x=u(14840),j=u(93742);for(var P in _)x(w[P],P),j[P]=j.Array},694:(s,i,u)=>{\"use strict\";u(91599);var _=u(37257);u(12560),s.exports=_},19709:(s,i,u)=>{\"use strict\";var _=u(23034);s.exports=_},40975:(s,i,u)=>{\"use strict\";var _=u(9748);s.exports=_}},_={};function __webpack_require__(s){var i=_[s];if(void 0!==i)return i.exports;var w=_[s]={id:s,loaded:!1,exports:{}};return u[s].call(w.exports,w,w.exports,__webpack_require__),w.loaded=!0,w.exports}__webpack_require__.n=s=>{var i=s&&s.__esModule?()=>s.default:()=>s;return __webpack_require__.d(i,{a:i}),i},i=Object.getPrototypeOf?s=>Object.getPrototypeOf(s):s=>s.__proto__,__webpack_require__.t=function(u,_){if(1&_&&(u=this(u)),8&_)return u;if(\"object\"==typeof u&&u){if(4&_&&u.__esModule)return u;if(16&_&&\"function\"==typeof u.then)return u}var w=Object.create(null);__webpack_require__.r(w);var x={};s=s||[null,i({}),i([]),i(i)];for(var j=2&_&&u;\"object\"==typeof j&&!~s.indexOf(j);j=i(j))Object.getOwnPropertyNames(j).forEach((s=>x[s]=()=>u[s]));return x.default=()=>u,__webpack_require__.d(w,x),w},__webpack_require__.d=(s,i)=>{for(var u in i)__webpack_require__.o(i,u)&&!__webpack_require__.o(s,u)&&Object.defineProperty(s,u,{enumerable:!0,get:i[u]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(s){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(s,i)=>Object.prototype.hasOwnProperty.call(s,i),__webpack_require__.r=s=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(s,\"__esModule\",{value:!0})},__webpack_require__.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);var w={};return(()=>{\"use strict\";__webpack_require__.d(w,{default:()=>ZI});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{CLEAR:()=>ct,CLEAR_BY:()=>ut,NEW_AUTH_ERR:()=>lt,NEW_SPEC_ERR:()=>it,NEW_SPEC_ERR_BATCH:()=>at,NEW_THROWN_ERR:()=>ot,NEW_THROWN_ERR_BATCH:()=>st,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{AUTHORIZE:()=>Lt,AUTHORIZE_OAUTH2:()=>$t,CONFIGURE_AUTH:()=>zt,LOGOUT:()=>Ft,PRE_AUTHORIZE_OAUTH2:()=>qt,RESTORE_AUTHORIZATION:()=>Vt,SHOW_AUTH_POPUP:()=>Bt,VALIDATE:()=>Ut,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{authorized:()=>Zt,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>Qt,getConfigs:()=>er,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,shownDefinitions:()=>Xt});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{TOGGLE_CONFIGS:()=>ao,UPDATE_CONFIGS:()=>io,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{get:()=>get});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{transform:()=>transform});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{transform:()=>parameter_oneof_transform});var $={};__webpack_require__.r($),__webpack_require__.d($,{allErrors:()=>xo,lastError:()=>ko});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{SHOW:()=>Io,UPDATE_FILTER:()=>jo,UPDATE_LAYOUT:()=>Ao,UPDATE_MODE:()=>Po,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>Mo,whatMode:()=>whatMode});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{taggedOperations:()=>taggedOperations});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{requestSnippetGenerator_curl_bash:()=>requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd:()=>requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell:()=>requestSnippetGenerator_curl_powershell});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{getActiveLanguage:()=>Do,getDefaultExpanded:()=>Bo,getGenerators:()=>Ro,getSnippetGenerators:()=>getSnippetGenerators});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>Ys,canExecuteScheme:()=>canExecuteScheme,consumes:()=>Ws,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>Gs,externalDocs:()=>Fs,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>Xi,host:()=>Xs,info:()=>Ls,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>Bs,lastError:()=>js,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>Ni,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>Vs,operationsWithRootInherited:()=>Zs,operationsWithTags:()=>_i,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>Us,produces:()=>Ks,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>Pi,responseFor:()=>responseFor,responses:()=>Si,schemes:()=>Qs,security:()=>Hs,securityDefinitions:()=>Js,semver:()=>$s,spec:()=>spec,specJS:()=>Ts,specJson:()=>Ms,specJsonWithResolvedSubtrees:()=>Ds,specResolved:()=>Rs,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>Ns,specStr:()=>Is,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>ai,url:()=>Ps,validOperationMethods:()=>zs,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>qs});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{CLEAR_REQUEST:()=>ka,CLEAR_RESPONSE:()=>xa,CLEAR_VALIDATE_PARAMS:()=>Ca,LOG_REQUEST:()=>wa,SET_MUTATED_REQUEST:()=>Ea,SET_REQUEST:()=>_a,SET_RESPONSE:()=>ba,SET_SCHEME:()=>Na,UPDATE_EMPTY_PARAM_INCLUSION:()=>ya,UPDATE_JSON:()=>ma,UPDATE_OPERATION_META_VALUE:()=>Aa,UPDATE_PARAM:()=>ga,UPDATE_RESOLVED:()=>ja,UPDATE_RESOLVED_SUBTREE:()=>Ia,UPDATE_SPEC:()=>ua,UPDATE_URL:()=>da,VALIDATE_PARAMS:()=>va,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{JsonPatchError:()=>Ja,_areEquals:()=>_areEquals,applyOperation:()=>applyOperation,applyPatch:()=>applyPatch,applyReducer:()=>applyReducer,deepClone:()=>Ga,getValueByPointer:()=>getValueByPointer,validate:()=>validate,validator:()=>validator});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{compare:()=>compare,generate:()=>generate,observe:()=>observe,unobserve:()=>unobserve});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{hasElementSourceMap:()=>hasElementSourceMap,includesClasses:()=>includesClasses,includesSymbols:()=>includesSymbols,isAnnotationElement:()=>Qp,isArrayElement:()=>Jp,isBooleanElement:()=>Kp,isCommentElement:()=>Zp,isElement:()=>Up,isLinkElement:()=>Yp,isMemberElement:()=>Gp,isNullElement:()=>Wp,isNumberElement:()=>Vp,isObjectElement:()=>Hp,isParseResultElement:()=>nh,isPrimitiveElement:()=>isPrimitiveElement,isRefElement:()=>Xp,isSourceMapElement:()=>hh,isStringElement:()=>zp});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{isJSONReferenceElement:()=>mg,isJSONSchemaElement:()=>fg,isLinkDescriptionElement:()=>yg,isMediaElement:()=>gg});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{isBooleanJsonSchemaElement:()=>isBooleanJsonSchemaElement,isCallbackElement:()=>Iy,isComponentsElement:()=>Ny,isContactElement:()=>My,isExampleElement:()=>Ty,isExternalDocumentationElement:()=>Ry,isHeaderElement:()=>Dy,isInfoElement:()=>By,isLicenseElement:()=>Ly,isLinkElement:()=>Fy,isMediaTypeElement:()=>tv,isOpenApi3_0Element:()=>$y,isOpenapiElement:()=>qy,isOperationElement:()=>Uy,isParameterElement:()=>zy,isPathItemElement:()=>Vy,isPathsElement:()=>Wy,isReferenceElement:()=>Ky,isRequestBodyElement:()=>Hy,isResponseElement:()=>Jy,isResponsesElement:()=>Gy,isSchemaElement:()=>Yy,isSecurityRequirementElement:()=>Xy,isSecuritySchemeElement:()=>Qy,isServerElement:()=>Zy,isServerVariableElement:()=>ev,isServersElement:()=>rv});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{isBooleanJsonSchemaElement:()=>predicates_isBooleanJsonSchemaElement,isCallbackElement:()=>nw,isComponentsElement:()=>ow,isContactElement:()=>sw,isExampleElement:()=>iw,isExternalDocumentationElement:()=>aw,isHeaderElement:()=>lw,isInfoElement:()=>cw,isJsonSchemaDialectElement:()=>uw,isLicenseElement:()=>pw,isLinkElement:()=>hw,isMediaTypeElement:()=>Aw,isOpenApi3_1Element:()=>fw,isOpenapiElement:()=>dw,isOperationElement:()=>mw,isParameterElement:()=>gw,isPathItemElement:()=>yw,isPathItemElementExternal:()=>isPathItemElementExternal,isPathsElement:()=>vw,isReferenceElement:()=>bw,isReferenceElementExternal:()=>isReferenceElementExternal,isRequestBodyElement:()=>_w,isResponseElement:()=>Ew,isResponsesElement:()=>ww,isSchemaElement:()=>Sw,isSecurityRequirementElement:()=>xw,isSecuritySchemeElement:()=>kw,isServerElement:()=>Ow,isServerVariableElement:()=>Cw});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{cookie:()=>parameter_builders_cookie,header:()=>parameter_builders_header,path:()=>parameter_builders_path,query:()=>query});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>layout_utils_Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{basePath:()=>Oj,consumes:()=>Cj,definitions:()=>nj,findDefinition:()=>ZA,hasHost:()=>fj,host:()=>_j,produces:()=>Aj,schemes:()=>Dj,securityDefinitions:()=>gj,validOperationMethods:()=>wrap_selectors_validOperationMethods});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{definitionsToAuthorize:()=>Bj});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{callbacksOperations:()=>Kj,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>$j});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>yP,CLEAR_REQUEST_BODY_VALUE:()=>vP,SET_REQUEST_BODY_VALIDATE_ERROR:()=>gP,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>hP,UPDATE_REQUEST_BODY_INCLUSION:()=>pP,UPDATE_REQUEST_BODY_VALUE:()=>cP,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>uP,UPDATE_REQUEST_CONTENT_TYPE:()=>dP,UPDATE_RESPONSE_CONTENT_TYPE:()=>fP,UPDATE_SELECTED_SERVER:()=>lP,UPDATE_SERVER_VARIABLE_VALUE:()=>mP,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{activeExamplesMember:()=>CP,hasUserEditedBody:()=>xP,requestBodyErrors:()=>OP,requestBodyInclusionSetting:()=>kP,requestBodyValue:()=>wP,requestContentType:()=>AP,responseContentType:()=>jP,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>EP,serverEffectiveValue:()=>NP,serverVariableValue:()=>PP,serverVariables:()=>IP,shouldRetainRequestBodyValue:()=>SP,validOperationMethods:()=>TP,validateBeforeExecute:()=>MP,validateShallowRequired:()=>validateShallowRequired});var $e=__webpack_require__(81919),ze=__webpack_require__.n($e),We=__webpack_require__(96540);function formatProdErrorMessage(s){return`Minified Redux error #${s}; visit https://redux.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}var He=(()=>\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\")(),randomString=()=>Math.random().toString(36).substring(7).split(\"\").join(\".\"),Ye={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`};function isPlainObject(s){if(\"object\"!=typeof s||null===s)return!1;let i=s;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(s)===i||null===Object.getPrototypeOf(s)}function createStore(s,i,u){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(2));if(\"function\"==typeof i&&\"function\"==typeof u||\"function\"==typeof u&&\"function\"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if(\"function\"==typeof i&&void 0===u&&(u=i,i=void 0),void 0!==u){if(\"function\"!=typeof u)throw new Error(formatProdErrorMessage(1));return u(createStore)(s,i)}let _=s,w=i,x=new Map,j=x,P=0,B=!1;function ensureCanMutateNextListeners(){j===x&&(j=new Map,x.forEach(((s,i)=>{j.set(i,s)})))}function getState(){if(B)throw new Error(formatProdErrorMessage(3));return w}function subscribe(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(4));if(B)throw new Error(formatProdErrorMessage(5));let i=!0;ensureCanMutateNextListeners();const u=P++;return j.set(u,s),function unsubscribe(){if(i){if(B)throw new Error(formatProdErrorMessage(6));i=!1,ensureCanMutateNextListeners(),j.delete(u),x=null}}}function dispatch(s){if(!isPlainObject(s))throw new Error(formatProdErrorMessage(7));if(void 0===s.type)throw new Error(formatProdErrorMessage(8));if(\"string\"!=typeof s.type)throw new Error(formatProdErrorMessage(17));if(B)throw new Error(formatProdErrorMessage(9));try{B=!0,w=_(w,s)}finally{B=!1}return(x=j).forEach((s=>{s()})),s}dispatch({type:Ye.INIT});return{dispatch,subscribe,getState,replaceReducer:function replaceReducer(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(10));_=s,dispatch({type:Ye.REPLACE})},[He]:function observable(){const s=subscribe;return{subscribe(i){if(\"object\"!=typeof i||null===i)throw new Error(formatProdErrorMessage(11));function observeState(){const s=i;s.next&&s.next(getState())}observeState();return{unsubscribe:s(observeState)}},[He](){return this}}}}}function bindActionCreator(s,i){return function(...u){return i(s.apply(this,u))}}function compose(...s){return 0===s.length?s=>s:1===s.length?s[0]:s.reduce(((s,i)=>(...u)=>s(i(...u))))}var Xe=__webpack_require__(9404),Qe=__webpack_require__.n(Xe),et=__webpack_require__(89593),tt=__webpack_require__(20334),rt=__webpack_require__(55364),nt=__webpack_require__.n(rt);const ot=\"err_new_thrown_err\",st=\"err_new_thrown_err_batch\",it=\"err_new_spec_err\",at=\"err_new_spec_err_batch\",lt=\"err_new_auth_err\",ct=\"err_clear\",ut=\"err_clear_by\";function newThrownErr(s){return{type:ot,payload:(0,tt.serializeError)(s)}}function newThrownErrBatch(s){return{type:st,payload:s}}function newSpecErr(s){return{type:it,payload:s}}function newSpecErrBatch(s){return{type:at,payload:s}}function newAuthErr(s){return{type:lt,payload:s}}function clear(s={}){return{type:ct,payload:s}}function clearBy(s=(()=>!0)){return{type:ut,payload:s}}const pt=function makeWindow(){var s={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return s;try{s=window;for(var i of[\"File\",\"Blob\",\"FormData\"])i in window&&(s[i]=window[i])}catch(s){console.error(s)}return s}();var ht=__webpack_require__(16750),dt=(__webpack_require__(84058),__webpack_require__(55808),__webpack_require__(50104)),mt=__webpack_require__.n(dt),gt=__webpack_require__(7309),yt=__webpack_require__.n(gt),vt=__webpack_require__(42426),bt=__webpack_require__.n(vt),_t=__webpack_require__(75288),Et=__webpack_require__.n(_t),wt=__webpack_require__(1882),St=__webpack_require__.n(wt),xt=__webpack_require__(2205),kt=__webpack_require__.n(xt),Ot=__webpack_require__(53209),Ct=__webpack_require__.n(Ot),At=__webpack_require__(62802),jt=__webpack_require__.n(At);const Pt=Qe().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(s,{isOAS3:i}={}){if(!Qe().Map.isMap(s))return{schema:Qe().Map(),parameterContentMediaType:null};if(!i)return\"body\"===s.get(\"in\")?{schema:s.get(\"schema\",Qe().Map()),parameterContentMediaType:null}:{schema:s.filter(((s,i)=>Pt.includes(i))),parameterContentMediaType:null};if(s.get(\"content\")){const i=s.get(\"content\",Qe().Map({})).keySeq().first();return{schema:s.getIn([\"content\",i,\"schema\"],Qe().Map()),parameterContentMediaType:i}}return{schema:s.get(\"schema\")?s.get(\"schema\",Qe().Map()):Qe().Map(),parameterContentMediaType:null}}var It=__webpack_require__(48287).Buffer;const Nt=\"default\",isImmutable=s=>Qe().Iterable.isIterable(s);function objectify(s){return isObject(s)?isImmutable(s)?s.toJS():s:{}}function fromJSOrdered(s){if(isImmutable(s))return s;if(s instanceof pt.File)return s;if(!isObject(s))return s;if(Array.isArray(s))return Qe().Seq(s).map(fromJSOrdered).toList();if(St()(s.entries)){const i=function createObjWithHashedKeys(s){if(!St()(s.entries))return s;const i={},u=\"_**[]\",_={};for(let w of s.entries())if(i[w[0]]||_[w[0]]&&_[w[0]].containsMultiple){if(!_[w[0]]){_[w[0]]={containsMultiple:!0,length:1},i[`${w[0]}${u}${_[w[0]].length}`]=i[w[0]],delete i[w[0]]}_[w[0]].length+=1,i[`${w[0]}${u}${_[w[0]].length}`]=w[1]}else i[w[0]]=w[1];return i}(s);return Qe().OrderedMap(i).map(fromJSOrdered)}return Qe().OrderedMap(s).map(fromJSOrdered)}function normalizeArray(s){return Array.isArray(s)?s:[s]}function isFn(s){return\"function\"==typeof s}function isObject(s){return!!s&&\"object\"==typeof s}function isFunc(s){return\"function\"==typeof s}function isArray(s){return Array.isArray(s)}const Mt=mt();function objMap(s,i){return Object.keys(s).reduce(((u,_)=>(u[_]=i(s[_],_),u)),{})}function objReduce(s,i){return Object.keys(s).reduce(((u,_)=>{let w=i(s[_],_);return w&&\"object\"==typeof w&&Object.assign(u,w),u}),{})}function systemThunkMiddleware(s){return({dispatch:i,getState:u})=>i=>u=>\"function\"==typeof u?u(s()):i(u)}function validateValueBySchema(s,i,u,_,w){if(!i)return[];let x=[],j=i.get(\"nullable\"),P=i.get(\"required\"),B=i.get(\"maximum\"),$=i.get(\"minimum\"),U=i.get(\"type\"),Y=i.get(\"format\"),X=i.get(\"maxLength\"),Z=i.get(\"minLength\"),ee=i.get(\"uniqueItems\"),ie=i.get(\"maxItems\"),ae=i.get(\"minItems\"),le=i.get(\"pattern\");const ce=u||!0===P,pe=null!=s;if(j&&null===s||!U||!(ce||pe&&\"array\"===U||!(!ce&&!pe)))return[];let de=\"string\"===U&&s,fe=\"array\"===U&&Array.isArray(s)&&s.length,ye=\"array\"===U&&Qe().List.isList(s)&&s.count();const be=[de,fe,ye,\"array\"===U&&\"string\"==typeof s&&s,\"file\"===U&&s instanceof pt.File,\"boolean\"===U&&(s||!1===s),\"number\"===U&&(s||0===s),\"integer\"===U&&(s||0===s),\"object\"===U&&\"object\"==typeof s&&null!==s,\"object\"===U&&\"string\"==typeof s&&s].some((s=>!!s));if(ce&&!be&&!_)return x.push(\"Required field is not provided\"),x;if(\"object\"===U&&(null===w||\"application/json\"===w)){let u=s;if(\"string\"==typeof s)try{u=JSON.parse(s)}catch(s){return x.push(\"Parameter string value must be valid JSON\"),x}i&&i.has(\"required\")&&isFunc(P.isList)&&P.isList()&&P.forEach((s=>{void 0===u[s]&&x.push({propKey:s,error:\"Required property not found\"})})),i&&i.has(\"properties\")&&i.get(\"properties\").forEach(((s,i)=>{const j=validateValueBySchema(u[i],s,!1,_,w);x.push(...j.map((s=>({propKey:i,error:s}))))}))}if(le){let i=((s,i)=>{if(!new RegExp(i).test(s))return\"Value must follow pattern \"+i})(s,le);i&&x.push(i)}if(ae&&\"array\"===U){let i=((s,i)=>{if(!s&&i>=1||s&&s.length<i)return`Array must contain at least ${i} item${1===i?\"\":\"s\"}`})(s,ae);i&&x.push(i)}if(ie&&\"array\"===U){let i=((s,i)=>{if(s&&s.length>i)return`Array must not contain more then ${i} item${1===i?\"\":\"s\"}`})(s,ie);i&&x.push({needRemove:!0,error:i})}if(ee&&\"array\"===U){let i=((s,i)=>{if(s&&(\"true\"===i||!0===i)){const i=(0,Xe.fromJS)(s),u=i.toSet();if(s.length>u.size){let s=(0,Xe.Set)();if(i.forEach(((u,_)=>{i.filter((s=>isFunc(s.equals)?s.equals(u):s===u)).size>1&&(s=s.add(_))})),0!==s.size)return s.map((s=>({index:s,error:\"No duplicates allowed.\"}))).toArray()}}})(s,ee);i&&x.push(...i)}if(X||0===X){let i=((s,i)=>{if(s.length>i)return`Value must be no longer than ${i} character${1!==i?\"s\":\"\"}`})(s,X);i&&x.push(i)}if(Z){let i=((s,i)=>{if(s.length<i)return`Value must be at least ${i} character${1!==i?\"s\":\"\"}`})(s,Z);i&&x.push(i)}if(B||0===B){let i=((s,i)=>{if(s>i)return`Value must be less than ${i}`})(s,B);i&&x.push(i)}if($||0===$){let i=((s,i)=>{if(s<i)return`Value must be greater than ${i}`})(s,$);i&&x.push(i)}if(\"string\"===U){let i;if(i=\"date-time\"===Y?(s=>{if(isNaN(Date.parse(s)))return\"Value must be a DateTime\"})(s):\"uuid\"===Y?(s=>{if(s=s.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(s))return\"Value must be a Guid\"})(s):(s=>{if(s&&\"string\"!=typeof s)return\"Value must be a string\"})(s),!i)return x;x.push(i)}else if(\"boolean\"===U){let i=(s=>{if(\"true\"!==s&&\"false\"!==s&&!0!==s&&!1!==s)return\"Value must be a boolean\"})(s);if(!i)return x;x.push(i)}else if(\"number\"===U){let i=(s=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(s))return\"Value must be a number\"})(s);if(!i)return x;x.push(i)}else if(\"integer\"===U){let i=(s=>{if(!/^-?\\d+$/.test(s))return\"Value must be an integer\"})(s);if(!i)return x;x.push(i)}else if(\"array\"===U){if(!fe&&!ye)return x;s&&s.forEach(((s,u)=>{const j=validateValueBySchema(s,i.get(\"items\"),!1,_,w);x.push(...j.map((s=>({index:u,error:s}))))}))}else if(\"file\"===U){let i=(s=>{if(s&&!(s instanceof pt.File))return\"Value must be a file\"})(s);if(!i)return x;x.push(i)}return x}const utils_btoa=s=>{let i;return i=s instanceof It?s:It.from(s.toString(),\"utf-8\"),i.toString(\"base64\")},Tt={operationsSorter:{alpha:(s,i)=>s.get(\"path\").localeCompare(i.get(\"path\")),method:(s,i)=>s.get(\"method\").localeCompare(i.get(\"method\"))},tagsSorter:{alpha:(s,i)=>s.localeCompare(i)}},buildFormData=s=>{let i=[];for(let u in s){let _=s[u];void 0!==_&&\"\"!==_&&i.push([u,\"=\",encodeURIComponent(_).replace(/%20/g,\"+\")].join(\"\"))}return i.join(\"&\")},shallowEqualKeys=(s,i,u)=>!!yt()(u,(u=>Et()(s[u],i[u])));function sanitizeUrl(s){return\"string\"!=typeof s||\"\"===s?\"\":(0,ht.J)(s)}function requiresValidationURL(s){return!(!s||s.indexOf(\"localhost\")>=0||s.indexOf(\"127.0.0.1\")>=0||\"none\"===s)}const createDeepLinkPath=s=>\"string\"==typeof s||s instanceof String?s.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=s=>kt()(createDeepLinkPath(s).replace(/%20/g,\"_\")),getExtensions=s=>s.filter(((s,i)=>/^x-/.test(i))),getCommonExtensions=s=>s.filter(((s,i)=>/^pattern|maxLength|minLength|maximum|minimum/.test(i)));function deeplyStripKey(s,i,u=(()=>!0)){if(\"object\"!=typeof s||Array.isArray(s)||null===s||!i)return s;const _=Object.assign({},s);return Object.keys(_).forEach((s=>{s===i&&u(_[s],s)?delete _[s]:_[s]=deeplyStripKey(_[s],i,u)})),_}function stringify(s){if(\"string\"==typeof s)return s;if(s&&s.toJS&&(s=s.toJS()),\"object\"==typeof s&&null!==s)try{return JSON.stringify(s,null,2)}catch(i){return String(s)}return null==s?\"\":s.toString()}function paramToIdentifier(s,{returnAll:i=!1,allowHashes:u=!0}={}){if(!Qe().Map.isMap(s))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const _=s.get(\"name\"),w=s.get(\"in\");let x=[];return s&&s.hashCode&&w&&_&&u&&x.push(`${w}.${_}.hash-${s.hashCode()}`),w&&_&&x.push(`${w}.${_}`),x.push(_),i?x:x[0]||\"\"}function paramToValue(s,i){return paramToIdentifier(s,{returnAll:!0}).map((s=>i[s])).filter((s=>void 0!==s))[0]}function b64toB64UrlEncoded(s){return s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=s=>!s||!(!isImmutable(s)||!s.isEmpty()),idFn=s=>s;function createStoreWithMiddleware(s,i,u){let _=[systemThunkMiddleware(u)];return createStore(s,i,(pt.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose)(function applyMiddleware(...s){return i=>(u,_)=>{const w=i(u,_);let dispatch=()=>{throw new Error(formatProdErrorMessage(15))};const x={getState:w.getState,dispatch:(s,...i)=>dispatch(s,...i)},j=s.map((s=>s(x)));return dispatch=compose(...j)(w.dispatch),{...w,dispatch}}}(..._)))}class Store{constructor(s={}){ze()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},s),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(s,i,u){return createStoreWithMiddleware(s,i,u)}(idFn,(0,Xe.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(s,i=!0){var u=combinePlugins(s,this.getSystem(),this.pluginsOptions);systemExtend(this.system,u),i&&this.buildSystem();callAfterLoad.call(this.system,s,this.getSystem())&&this.buildSystem()}buildSystem(s=!0){let i=this.getStore().dispatch,u=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(i),this.getWrappedAndBoundSelectors(u,this.getSystem),this.getStateThunks(u),this.getFn(),this.getConfigs()),s&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:Qe(),React:We},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(s){this.system.configs=s}rebuildReducer(){this.store.replaceReducer(function buildReducer(s){return function allReducers(s){let i=Object.keys(s).reduce(((i,u)=>(i[u]=function makeReducer(s){return(i=new Xe.Map,u)=>{if(!s)return i;let _=s[u.type];if(_){const s=wrapWithTryCatch(_)(i,u);return null===s?i:s}return i}}(s[u]),i)),{});if(!Object.keys(i).length)return idFn;return(0,et.H)(i)}(objMap(s,(s=>s.reducers)))}(this.system.statePlugins))}getType(s){let i=s[0].toUpperCase()+s.slice(1);return objReduce(this.system.statePlugins,((u,_)=>{let w=u[s];if(w)return{[_+i]:w}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(s=>objReduce(s,((s,i)=>{if(isFn(s))return{[i]:s}}))))}getWrappedAndBoundActions(s){return objMap(this.getBoundActions(s),((s,i)=>{let u=this.system.statePlugins[i.slice(0,-7)].wrapActions;return u?objMap(s,((s,i)=>{let _=u[i];return _?(Array.isArray(_)||(_=[_]),_.reduce(((s,i)=>{let newAction=(...u)=>i(s,this.getSystem())(...u);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction)}),s||Function.prototype)):s})):s}))}getWrappedAndBoundSelectors(s,i){return objMap(this.getBoundSelectors(s,i),((i,u)=>{let _=[u.slice(0,-9)],w=this.system.statePlugins[_].wrapSelectors;return w?objMap(i,((i,u)=>{let x=w[u];return x?(Array.isArray(x)||(x=[x]),x.reduce(((i,u)=>{let wrappedSelector=(...w)=>u(i,this.getSystem())(s().getIn(_),...w);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),i||Function.prototype)):i})):i}))}getStates(s){return Object.keys(this.system.statePlugins).reduce(((i,u)=>(i[u]=s.get(u),i)),{})}getStateThunks(s){return Object.keys(this.system.statePlugins).reduce(((i,u)=>(i[u]=()=>s().get(u),i)),{})}getFn(){return{fn:this.system.fn}}getComponents(s){const i=this.system.components[s];return Array.isArray(i)?i.reduce(((s,i)=>i(s,this.getSystem()))):void 0!==s?this.system.components[s]:this.system.components}getBoundSelectors(s,i){return objMap(this.getSelectors(),((u,_)=>{let w=[_.slice(0,-9)];return objMap(u,(u=>(..._)=>{let x=wrapWithTryCatch(u).apply(null,[s().getIn(w),..._]);return\"function\"==typeof x&&(x=wrapWithTryCatch(x)(i())),x}))}))}getBoundActions(s){s=s||this.getStore().dispatch;const i=this.getActions(),process=s=>\"function\"!=typeof s?objMap(s,(s=>process(s))):(...i)=>{var u=null;try{u=s(...i)}catch(s){u={type:ot,error:!0,payload:(0,tt.serializeError)(s)}}finally{return u}};return objMap(i,(i=>function bindActionCreators(s,i){if(\"function\"==typeof s)return bindActionCreator(s,i);if(\"object\"!=typeof s||null===s)throw new Error(formatProdErrorMessage(16));const u={};for(const _ in s){const w=s[_];\"function\"==typeof w&&(u[_]=bindActionCreator(w,i))}return u}(process(i),s)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(s){return i=>ze()({},this.getWrappedAndBoundActions(i),this.getFn(),s)}}function combinePlugins(s,i,u){if(isObject(s)&&!isArray(s))return nt()({},s);if(isFunc(s))return combinePlugins(s(i),i,u);if(isArray(s)){const _=\"chain\"===u.pluginLoadType?i.getComponents():{};return s.map((s=>combinePlugins(s,i,u))).reduce(systemExtend,_)}return{}}function callAfterLoad(s,i,{hasLoaded:u}={}){let _=u;return isObject(s)&&!isArray(s)&&\"function\"==typeof s.afterLoad&&(_=!0,wrapWithTryCatch(s.afterLoad).call(this,i)),isFunc(s)?callAfterLoad.call(this,s(i),i,{hasLoaded:_}):isArray(s)?s.map((s=>callAfterLoad.call(this,s,i,{hasLoaded:_}))):_}function systemExtend(s={},i={}){if(!isObject(s))return{};if(!isObject(i))return s;i.wrapComponents&&(objMap(i.wrapComponents,((u,_)=>{const w=s.components&&s.components[_];w&&Array.isArray(w)?(s.components[_]=w.concat([u]),delete i.wrapComponents[_]):w&&(s.components[_]=[w,u],delete i.wrapComponents[_])})),Object.keys(i.wrapComponents).length||delete i.wrapComponents);const{statePlugins:u}=s;if(isObject(u))for(let s in u){const _=u[s];if(!isObject(_))continue;const{wrapActions:w,wrapSelectors:x}=_;if(isObject(w))for(let u in w){let _=w[u];Array.isArray(_)||(_=[_],w[u]=_),i&&i.statePlugins&&i.statePlugins[s]&&i.statePlugins[s].wrapActions&&i.statePlugins[s].wrapActions[u]&&(i.statePlugins[s].wrapActions[u]=w[u].concat(i.statePlugins[s].wrapActions[u]))}if(isObject(x))for(let u in x){let _=x[u];Array.isArray(_)||(_=[_],x[u]=_),i&&i.statePlugins&&i.statePlugins[s]&&i.statePlugins[s].wrapSelectors&&i.statePlugins[s].wrapSelectors[u]&&(i.statePlugins[s].wrapSelectors[u]=x[u].concat(i.statePlugins[s].wrapSelectors[u]))}}return ze()(s,i)}function wrapWithTryCatch(s,{logErrors:i=!0}={}){return\"function\"!=typeof s?s:function(...u){try{return s.call(this,...u)}catch(s){return i&&console.error(s),null}}}var Rt=__webpack_require__(61160),Dt=__webpack_require__.n(Rt);const Bt=\"show_popup\",Lt=\"authorize\",Ft=\"logout\",qt=\"pre_authorize_oauth2\",$t=\"authorize_oauth2\",Ut=\"validate\",zt=\"configure_auth\",Vt=\"restore_authorization\";function showDefinitions(s){return{type:Bt,payload:s}}function authorize(s){return{type:Lt,payload:s}}const authorizeWithPersistOption=s=>({authActions:i})=>{i.authorize(s),i.persistAuthorizationIfNeeded()};function logout(s){return{type:Ft,payload:s}}const logoutWithPersistOption=s=>({authActions:i})=>{i.logout(s),i.persistAuthorizationIfNeeded()},preAuthorizeImplicit=s=>({authActions:i,errActions:u})=>{let{auth:_,token:w,isValid:x}=s,{schema:j,name:P}=_,B=j.get(\"flow\");delete pt.swaggerUIRedirectOauth2,\"accessCode\"===B||x||u.newAuthErr({authId:P,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),w.error?u.newAuthErr({authId:P,source:\"auth\",level:\"error\",message:JSON.stringify(w)}):i.authorizeOauth2WithPersistOption({auth:_,token:w})};function authorizeOauth2(s){return{type:$t,payload:s}}const authorizeOauth2WithPersistOption=s=>({authActions:i})=>{i.authorizeOauth2(s),i.persistAuthorizationIfNeeded()},authorizePassword=s=>({authActions:i})=>{let{schema:u,name:_,username:w,password:x,passwordType:j,clientId:P,clientSecret:B}=s,$={grant_type:\"password\",scope:s.scopes.join(\" \"),username:w,password:x},U={};switch(j){case\"request-body\":!function setClientIdAndSecret(s,i,u){i&&Object.assign(s,{client_id:i});u&&Object.assign(s,{client_secret:u})}($,P,B);break;case\"basic\":U.Authorization=\"Basic \"+utils_btoa(P+\":\"+B);break;default:console.warn(`Warning: invalid passwordType ${j} was passed, not including client id and secret`)}return i.authorizeRequest({body:buildFormData($),url:u.get(\"tokenUrl\"),name:_,headers:U,query:{},auth:s})};const authorizeApplication=s=>({authActions:i})=>{let{schema:u,scopes:_,name:w,clientId:x,clientSecret:j}=s,P={Authorization:\"Basic \"+utils_btoa(x+\":\"+j)},B={grant_type:\"client_credentials\",scope:_.join(\" \")};return i.authorizeRequest({body:buildFormData(B),name:w,url:u.get(\"tokenUrl\"),auth:s,headers:P})},authorizeAccessCodeWithFormParams=({auth:s,redirectUrl:i})=>({authActions:u})=>{let{schema:_,name:w,clientId:x,clientSecret:j,codeVerifier:P}=s,B={grant_type:\"authorization_code\",code:s.code,client_id:x,client_secret:j,redirect_uri:i,code_verifier:P};return u.authorizeRequest({body:buildFormData(B),name:w,url:_.get(\"tokenUrl\"),auth:s})},authorizeAccessCodeWithBasicAuthentication=({auth:s,redirectUrl:i})=>({authActions:u})=>{let{schema:_,name:w,clientId:x,clientSecret:j,codeVerifier:P}=s,B={Authorization:\"Basic \"+utils_btoa(x+\":\"+j)},$={grant_type:\"authorization_code\",code:s.code,client_id:x,redirect_uri:i,code_verifier:P};return u.authorizeRequest({body:buildFormData($),name:w,url:_.get(\"tokenUrl\"),auth:s,headers:B})},authorizeRequest=s=>({fn:i,getConfigs:u,authActions:_,errActions:w,oas3Selectors:x,specSelectors:j,authSelectors:P})=>{let B,{body:$,query:U={},headers:Y={},name:X,url:Z,auth:ee}=s,{additionalQueryStringParams:ie}=P.getConfigs()||{};if(j.isOAS3()){let s=x.serverEffectiveValue(x.selectedServer());B=Dt()(Z,s,!0)}else B=Dt()(Z,j.url(),!0);\"object\"==typeof ie&&(B.query=Object.assign({},B.query,ie));const ae=B.toString();let le=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},Y);i.fetch({url:ae,method:\"post\",headers:le,query:U,body:$,requestInterceptor:u().requestInterceptor,responseInterceptor:u().responseInterceptor}).then((function(s){let i=JSON.parse(s.data),u=i&&(i.error||\"\"),x=i&&(i.parseError||\"\");s.ok?u||x?w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:JSON.stringify(i)}):_.authorizeOauth2WithPersistOption({auth:ee,token:i}):w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:s.statusText})})).catch((s=>{let i=new Error(s).message;if(s.response&&s.response.data){const u=s.response.data;try{const s=\"string\"==typeof u?JSON.parse(u):u;s.error&&(i+=`, error: ${s.error}`),s.error_description&&(i+=`, description: ${s.error_description}`)}catch(s){}}w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:i})}))};function configureAuth(s){return{type:zt,payload:s}}function restoreAuthorization(s){return{type:Vt,payload:s}}const persistAuthorizationIfNeeded=()=>({authSelectors:s,getConfigs:i})=>{if(!i().persistAuthorization)return;const u=s.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(u))},authPopup=(s,i)=>()=>{pt.swaggerUIRedirectOauth2=i,pt.open(s)},Wt={[Bt]:(s,{payload:i})=>s.set(\"showDefinitions\",i),[Lt]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(i),_=s.get(\"authorized\")||(0,Xe.Map)();return u.entrySeq().forEach((([i,u])=>{if(!isFunc(u.getIn))return s.set(\"authorized\",_);let w=u.getIn([\"schema\",\"type\"]);if(\"apiKey\"===w||\"http\"===w)_=_.set(i,u);else if(\"basic\"===w){let s=u.getIn([\"value\",\"username\"]),w=u.getIn([\"value\",\"password\"]);_=_.setIn([i,\"value\"],{username:s,header:\"Basic \"+utils_btoa(s+\":\"+w)}),_=_.setIn([i,\"schema\"],u.get(\"schema\"))}})),s.set(\"authorized\",_)},[$t]:(s,{payload:i})=>{let u,{auth:_,token:w}=i;_.token=Object.assign({},w),u=(0,Xe.fromJS)(_);let x=s.get(\"authorized\")||(0,Xe.Map)();return x=x.set(u.get(\"name\"),u),s.set(\"authorized\",x)},[Ft]:(s,{payload:i})=>{let u=s.get(\"authorized\").withMutations((s=>{i.forEach((i=>{s.delete(i)}))}));return s.set(\"authorized\",u)},[zt]:(s,{payload:i})=>s.set(\"configs\",i),[Vt]:(s,{payload:i})=>s.set(\"authorized\",(0,Xe.fromJS)(i.authorized))};function assertIsFunction(s,i=\"expected a function, instead received \"+typeof s){if(\"function\"!=typeof s)throw new TypeError(i)}var ensureIsArray=s=>Array.isArray(s)?s:[s];function getDependencies(s){const i=Array.isArray(s[0])?s[0]:s;return function assertIsArrayOfFunctions(s,i=\"expected all items to be functions, instead received the following types: \"){if(!s.every((s=>\"function\"==typeof s))){const u=s.map((s=>\"function\"==typeof s?`function ${s.name||\"unnamed\"}()`:typeof s)).join(\", \");throw new TypeError(`${i}[${u}]`)}}(i,\"createSelector expects all input-selectors to be functions, but received the following types: \"),i}Symbol(),Object.getPrototypeOf({});var Kt=\"undefined\"!=typeof WeakRef?WeakRef:class{constructor(s){this.value=s}deref(){return this.value}},Ht=0,Jt=1;function createCacheNode(){return{s:Ht,v:void 0,o:null,p:null}}function weakMapMemoize(s,i={}){let u=createCacheNode();const{resultEqualityCheck:_}=i;let w,x=0;function memoized(){let i=u;const{length:j}=arguments;for(let s=0,u=j;s<u;s++){const u=arguments[s];if(\"function\"==typeof u||\"object\"==typeof u&&null!==u){let s=i.o;null===s&&(i.o=s=new WeakMap);const _=s.get(u);void 0===_?(i=createCacheNode(),s.set(u,i)):i=_}else{let s=i.p;null===s&&(i.p=s=new Map);const _=s.get(u);void 0===_?(i=createCacheNode(),s.set(u,i)):i=_}}const P=i;let B;if(i.s===Jt?B=i.v:(B=s.apply(null,arguments),x++),P.s=Jt,_){const s=w?.deref?.()??w;null!=s&&_(s,B)&&(B=s,0!==x&&x--);w=\"object\"==typeof B&&null!==B||\"function\"==typeof B?new Kt(B):B}return P.v=B,B}return memoized.clearCache=()=>{u=createCacheNode(),memoized.resetResultsCount()},memoized.resultsCount=()=>x,memoized.resetResultsCount=()=>{x=0},memoized}function createSelectorCreator(s,...i){const u=\"function\"==typeof s?{memoize:s,memoizeOptions:i}:s,createSelector2=(...s)=>{let i,_=0,w=0,x={},j=s.pop();\"object\"==typeof j&&(x=j,j=s.pop()),assertIsFunction(j,`createSelector expects an output function after the inputs, but received: [${typeof j}]`);const P={...u,...x},{memoize:B,memoizeOptions:$=[],argsMemoize:U=weakMapMemoize,argsMemoizeOptions:Y=[],devModeChecks:X={}}=P,Z=ensureIsArray($),ee=ensureIsArray(Y),ie=getDependencies(s),ae=B((function recomputationWrapper(){return _++,j.apply(null,arguments)}),...Z);const le=U((function dependenciesChecker(){w++;const s=function collectInputSelectorResults(s,i){const u=[],{length:_}=s;for(let w=0;w<_;w++)u.push(s[w].apply(null,i));return u}(ie,arguments);return i=ae.apply(null,s),i}),...ee);return Object.assign(le,{resultFunc:j,memoizedResultFunc:ae,dependencies:ie,dependencyRecomputations:()=>w,resetDependencyRecomputations:()=>{w=0},lastResult:()=>i,recomputations:()=>_,resetRecomputations:()=>{_=0},memoize:B,argsMemoize:U})};return Object.assign(createSelector2,{withTypes:()=>createSelector2}),createSelector2}var Gt=createSelectorCreator(weakMapMemoize),Yt=Object.assign(((s,i=Gt)=>{!function assertIsObject(s,i=\"expected an object, instead received \"+typeof s){if(\"object\"!=typeof s)throw new TypeError(i)}(s,\"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a \"+typeof s);const u=Object.keys(s);return i(u.map((i=>s[i])),((...s)=>s.reduce(((s,i,_)=>(s[u[_]]=i,s)),{})))}),{withTypes:()=>Yt});const state=s=>s,Xt=Gt(state,(s=>s.get(\"showDefinitions\"))),Qt=Gt(state,(()=>({specSelectors:s})=>{let i=s.securityDefinitions()||(0,Xe.Map)({}),u=(0,Xe.List)();return i.entrySeq().forEach((([s,i])=>{let _=(0,Xe.Map)();_=_.set(s,i),u=u.push(_)})),u})),getDefinitionsByNames=(s,i)=>({specSelectors:s})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let u=s.securityDefinitions(),_=(0,Xe.List)();return i.valueSeq().forEach((s=>{let i=(0,Xe.Map)();s.entrySeq().forEach((([s,_])=>{let w,x=u.get(s);\"oauth2\"===x.get(\"type\")&&_.size&&(w=x.get(\"scopes\"),w.keySeq().forEach((s=>{_.contains(s)||(w=w.delete(s))})),x=x.set(\"allowedScopes\",w)),i=i.set(s,x)})),_=_.push(i)})),_},definitionsForRequirements=(s,i=(0,Xe.List)())=>({authSelectors:s})=>{const u=s.definitionsToAuthorize()||(0,Xe.List)();let _=(0,Xe.List)();return u.forEach((s=>{let u=i.find((i=>i.get(s.keySeq().first())));u&&(s.forEach(((i,_)=>{if(\"oauth2\"===i.get(\"type\")){const w=u.get(_);let x=i.get(\"scopes\");Xe.List.isList(w)&&Xe.Map.isMap(x)&&(x.keySeq().forEach((s=>{w.contains(s)||(x=x.delete(s))})),s=s.set(_,i.set(\"scopes\",x)))}})),_=_.push(s))})),_},Zt=Gt(state,(s=>s.get(\"authorized\")||(0,Xe.Map)())),isAuthorized=(s,i)=>({authSelectors:s})=>{let u=s.authorized();return Xe.List.isList(i)?!!i.toJS().filter((s=>-1===Object.keys(s).map((s=>!!u.get(s))).indexOf(!1))).length:null},er=Gt(state,(s=>s.get(\"configs\"))),execute=(s,{authSelectors:i,specSelectors:u})=>({path:_,method:w,operation:x,extras:j})=>{let P={authorized:i.authorized()&&i.authorized().toJS(),definitions:u.securityDefinitions()&&u.securityDefinitions().toJS(),specSecurity:u.security()&&u.security().toJS()};return s({path:_,method:w,operation:x,securities:P,...j})},loaded=(s,i)=>u=>{const{getConfigs:_,authActions:w}=i,x=_();if(s(u),x.persistAuthorization){const s=localStorage.getItem(\"authorized\");s&&w.restoreAuthorization({authorized:JSON.parse(s)})}},wrap_actions_authorize=(s,i)=>u=>{s(u);if(i.getConfigs().persistAuthorization)try{const[{schema:s,value:i}]=Object.values(u),_=\"apiKey\"===s.get(\"type\"),w=\"cookie\"===s.get(\"in\");_&&w&&(document.cookie=`${s.get(\"name\")}=${i}; SameSite=None; Secure`)}catch(s){console.error(\"Error persisting cookie based apiKey in document.cookie.\",s)}},wrap_actions_logout=(s,i)=>u=>{const _=i.getConfigs(),w=i.authSelectors.authorized();try{_.persistAuthorization&&Array.isArray(u)&&u.forEach((s=>{const i=w.get(s,{}),u=\"apiKey\"===i.getIn([\"schema\",\"type\"]),_=\"cookie\"===i.getIn([\"schema\",\"in\"]);if(u&&_){const s=i.getIn([\"schema\",\"name\"]);document.cookie=`${s}=; Max-Age=-99999999`}}))}catch(s){console.error(\"Error deleting cookie based apiKey from document.cookie.\",s)}s(u)};var tr=__webpack_require__(90179),rr=__webpack_require__.n(tr);class LockAuthIcon extends We.Component{mapStateToProps(s,i){return{state:s,ownProps:rr()(i,Object.keys(i.getSystem()))}}render(){const{getComponent:s,ownProps:i}=this.props,u=s(\"LockIcon\");return We.createElement(u,i)}}const nr=LockAuthIcon;class UnlockAuthIcon extends We.Component{mapStateToProps(s,i){return{state:s,ownProps:rr()(i,Object.keys(i.getSystem()))}}render(){const{getComponent:s,ownProps:i}=this.props,u=s(\"UnlockIcon\");return We.createElement(u,i)}}const sr=UnlockAuthIcon;function auth(){return{afterLoad(s){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=s.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,s),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,s)},components:{LockAuthIcon:nr,UnlockAuthIcon:sr,LockAuthOperationIcon:nr,UnlockAuthOperationIcon:sr},statePlugins:{auth:{reducers:Wt,actions:i,selectors:u,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(s,i,u,_){const{authActions:{authorize:w},specSelectors:{specJson:x,isOAS3:j}}=s,P=j()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],B=x().getIn([...P,i]);return B?w({[i]:{value:{username:u,password:_},schema:B.toJS()}}):null}function preauthorizeApiKey(s,i,u){const{authActions:{authorize:_},specSelectors:{specJson:w,isOAS3:x}}=s,j=x()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],P=w().getIn([...j,i]);return P?_({[i]:{value:u,schema:P.toJS()}}):null}function isNothing(s){return null==s}var ir=function repeat(s,i){var u,_=\"\";for(u=0;u<i;u+=1)_+=s;return _},ar=function isNegativeZero(s){return 0===s&&Number.NEGATIVE_INFINITY===1/s},lr={isNothing,isObject:function js_yaml_isObject(s){return\"object\"==typeof s&&null!==s},toArray:function toArray(s){return Array.isArray(s)?s:isNothing(s)?[]:[s]},repeat:ir,isNegativeZero:ar,extend:function extend(s,i){var u,_,w,x;if(i)for(u=0,_=(x=Object.keys(i)).length;u<_;u+=1)s[w=x[u]]=i[w];return s}};function formatError(s,i){var u=\"\",_=s.reason||\"(unknown reason)\";return s.mark?(s.mark.name&&(u+='in \"'+s.mark.name+'\" '),u+=\"(\"+(s.mark.line+1)+\":\"+(s.mark.column+1)+\")\",!i&&s.mark.snippet&&(u+=\"\\n\\n\"+s.mark.snippet),_+\" \"+u):_}function YAMLException$1(s,i){Error.call(this),this.name=\"YAMLException\",this.reason=s,this.mark=i,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(s){return this.name+\": \"+formatError(this,s)};var cr=YAMLException$1;function getLine(s,i,u,_,w){var x=\"\",j=\"\",P=Math.floor(w/2)-1;return _-i>P&&(i=_-P+(x=\" ... \").length),u-_>P&&(u=_+P-(j=\" ...\").length),{str:x+s.slice(i,u).replace(/\\t/g,\"→\")+j,pos:_-i+x.length}}function padStart(s,i){return lr.repeat(\" \",i-s.length)+s}var ur=function makeSnippet(s,i){if(i=Object.create(i||null),!s.buffer)return null;i.maxLength||(i.maxLength=79),\"number\"!=typeof i.indent&&(i.indent=1),\"number\"!=typeof i.linesBefore&&(i.linesBefore=3),\"number\"!=typeof i.linesAfter&&(i.linesAfter=2);for(var u,_=/\\r?\\n|\\r|\\0/g,w=[0],x=[],j=-1;u=_.exec(s.buffer);)x.push(u.index),w.push(u.index+u[0].length),s.position<=u.index&&j<0&&(j=w.length-2);j<0&&(j=w.length-1);var P,B,$=\"\",U=Math.min(s.line+i.linesAfter,x.length).toString().length,Y=i.maxLength-(i.indent+U+3);for(P=1;P<=i.linesBefore&&!(j-P<0);P++)B=getLine(s.buffer,w[j-P],x[j-P],s.position-(w[j]-w[j-P]),Y),$=lr.repeat(\" \",i.indent)+padStart((s.line-P+1).toString(),U)+\" | \"+B.str+\"\\n\"+$;for(B=getLine(s.buffer,w[j],x[j],s.position,Y),$+=lr.repeat(\" \",i.indent)+padStart((s.line+1).toString(),U)+\" | \"+B.str+\"\\n\",$+=lr.repeat(\"-\",i.indent+U+3+B.pos)+\"^\\n\",P=1;P<=i.linesAfter&&!(j+P>=x.length);P++)B=getLine(s.buffer,w[j+P],x[j+P],s.position-(w[j]-w[j+P]),Y),$+=lr.repeat(\" \",i.indent)+padStart((s.line+P+1).toString(),U)+\" | \"+B.str+\"\\n\";return $.replace(/\\n$/,\"\")},pr=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],dr=[\"scalar\",\"sequence\",\"mapping\"];var fr=function Type$1(s,i){if(i=i||{},Object.keys(i).forEach((function(i){if(-1===pr.indexOf(i))throw new cr('Unknown option \"'+i+'\" is met in definition of \"'+s+'\" YAML type.')})),this.options=i,this.tag=s,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(s){return s},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=function compileStyleAliases(s){var i={};return null!==s&&Object.keys(s).forEach((function(u){s[u].forEach((function(s){i[String(s)]=u}))})),i}(i.styleAliases||null),-1===dr.indexOf(this.kind))throw new cr('Unknown kind \"'+this.kind+'\" is specified for \"'+s+'\" YAML type.')};function compileList(s,i){var u=[];return s[i].forEach((function(s){var i=u.length;u.forEach((function(u,_){u.tag===s.tag&&u.kind===s.kind&&u.multi===s.multi&&(i=_)})),u[i]=s})),u}function Schema$1(s){return this.extend(s)}Schema$1.prototype.extend=function extend(s){var i=[],u=[];if(s instanceof fr)u.push(s);else if(Array.isArray(s))u=u.concat(s);else{if(!s||!Array.isArray(s.implicit)&&!Array.isArray(s.explicit))throw new cr(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");s.implicit&&(i=i.concat(s.implicit)),s.explicit&&(u=u.concat(s.explicit))}i.forEach((function(s){if(!(s instanceof fr))throw new cr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(s.loadKind&&\"scalar\"!==s.loadKind)throw new cr(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(s.multi)throw new cr(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),u.forEach((function(s){if(!(s instanceof fr))throw new cr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var _=Object.create(Schema$1.prototype);return _.implicit=(this.implicit||[]).concat(i),_.explicit=(this.explicit||[]).concat(u),_.compiledImplicit=compileList(_,\"implicit\"),_.compiledExplicit=compileList(_,\"explicit\"),_.compiledTypeMap=function compileMap(){var s,i,u={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(s){s.multi?(u.multi[s.kind].push(s),u.multi.fallback.push(s)):u[s.kind][s.tag]=u.fallback[s.tag]=s}for(s=0,i=arguments.length;s<i;s+=1)arguments[s].forEach(collectType);return u}(_.compiledImplicit,_.compiledExplicit),_};var mr=Schema$1,gr=new fr(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(s){return null!==s?s:\"\"}}),yr=new fr(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(s){return null!==s?s:[]}}),vr=new fr(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(s){return null!==s?s:{}}}),br=new mr({explicit:[gr,yr,vr]});var _r=new fr(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(s){if(null===s)return!0;var i=s.length;return 1===i&&\"~\"===s||4===i&&(\"null\"===s||\"Null\"===s||\"NULL\"===s)},construct:function constructYamlNull(){return null},predicate:function isNull(s){return null===s},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var Er=new fr(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(s){if(null===s)return!1;var i=s.length;return 4===i&&(\"true\"===s||\"True\"===s||\"TRUE\"===s)||5===i&&(\"false\"===s||\"False\"===s||\"FALSE\"===s)},construct:function constructYamlBoolean(s){return\"true\"===s||\"True\"===s||\"TRUE\"===s},predicate:function isBoolean(s){return\"[object Boolean]\"===Object.prototype.toString.call(s)},represent:{lowercase:function(s){return s?\"true\":\"false\"},uppercase:function(s){return s?\"TRUE\":\"FALSE\"},camelcase:function(s){return s?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(s){return 48<=s&&s<=55}function isDecCode(s){return 48<=s&&s<=57}var wr=new fr(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(s){if(null===s)return!1;var i,u,_=s.length,w=0,x=!1;if(!_)return!1;if(\"-\"!==(i=s[w])&&\"+\"!==i||(i=s[++w]),\"0\"===i){if(w+1===_)return!0;if(\"b\"===(i=s[++w])){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(\"0\"!==i&&\"1\"!==i)return!1;x=!0}return x&&\"_\"!==i}if(\"x\"===i){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(!(48<=(u=s.charCodeAt(w))&&u<=57||65<=u&&u<=70||97<=u&&u<=102))return!1;x=!0}return x&&\"_\"!==i}if(\"o\"===i){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(!isOctCode(s.charCodeAt(w)))return!1;x=!0}return x&&\"_\"!==i}}if(\"_\"===i)return!1;for(;w<_;w++)if(\"_\"!==(i=s[w])){if(!isDecCode(s.charCodeAt(w)))return!1;x=!0}return!(!x||\"_\"===i)},construct:function constructYamlInteger(s){var i,u=s,_=1;if(-1!==u.indexOf(\"_\")&&(u=u.replace(/_/g,\"\")),\"-\"!==(i=u[0])&&\"+\"!==i||(\"-\"===i&&(_=-1),i=(u=u.slice(1))[0]),\"0\"===u)return 0;if(\"0\"===i){if(\"b\"===u[1])return _*parseInt(u.slice(2),2);if(\"x\"===u[1])return _*parseInt(u.slice(2),16);if(\"o\"===u[1])return _*parseInt(u.slice(2),8)}return _*parseInt(u,10)},predicate:function isInteger(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&s%1==0&&!lr.isNegativeZero(s)},represent:{binary:function(s){return s>=0?\"0b\"+s.toString(2):\"-0b\"+s.toString(2).slice(1)},octal:function(s){return s>=0?\"0o\"+s.toString(8):\"-0o\"+s.toString(8).slice(1)},decimal:function(s){return s.toString(10)},hexadecimal:function(s){return s>=0?\"0x\"+s.toString(16).toUpperCase():\"-0x\"+s.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),Sr=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var xr=/^[-+]?[0-9]+e/;var kr=new fr(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(s){return null!==s&&!(!Sr.test(s)||\"_\"===s[s.length-1])},construct:function constructYamlFloat(s){var i,u;return u=\"-\"===(i=s.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(i[0])>=0&&(i=i.slice(1)),\".inf\"===i?1===u?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===i?NaN:u*parseFloat(i,10)},predicate:function isFloat(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&(s%1!=0||lr.isNegativeZero(s))},represent:function representYamlFloat(s,i){var u;if(isNaN(s))switch(i){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===s)switch(i){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===s)switch(i){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(lr.isNegativeZero(s))return\"-0.0\";return u=s.toString(10),xr.test(u)?u.replace(\"e\",\".e\"):u},defaultStyle:\"lowercase\"}),Or=br.extend({implicit:[_r,Er,wr,kr]}),Cr=Or,Ar=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),jr=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var Pr=new fr(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(s){return null!==s&&(null!==Ar.exec(s)||null!==jr.exec(s))},construct:function constructYamlTimestamp(s){var i,u,_,w,x,j,P,B,$=0,U=null;if(null===(i=Ar.exec(s))&&(i=jr.exec(s)),null===i)throw new Error(\"Date resolve error\");if(u=+i[1],_=+i[2]-1,w=+i[3],!i[4])return new Date(Date.UTC(u,_,w));if(x=+i[4],j=+i[5],P=+i[6],i[7]){for($=i[7].slice(0,3);$.length<3;)$+=\"0\";$=+$}return i[9]&&(U=6e4*(60*+i[10]+ +(i[11]||0)),\"-\"===i[9]&&(U=-U)),B=new Date(Date.UTC(u,_,w,x,j,P,$)),U&&B.setTime(B.getTime()-U),B},instanceOf:Date,represent:function representYamlTimestamp(s){return s.toISOString()}});var Ir=new fr(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(s){return\"<<\"===s||null===s}}),Nr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var Mr=new fr(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(s){if(null===s)return!1;var i,u,_=0,w=s.length,x=Nr;for(u=0;u<w;u++)if(!((i=x.indexOf(s.charAt(u)))>64)){if(i<0)return!1;_+=6}return _%8==0},construct:function constructYamlBinary(s){var i,u,_=s.replace(/[\\r\\n=]/g,\"\"),w=_.length,x=Nr,j=0,P=[];for(i=0;i<w;i++)i%4==0&&i&&(P.push(j>>16&255),P.push(j>>8&255),P.push(255&j)),j=j<<6|x.indexOf(_.charAt(i));return 0===(u=w%4*6)?(P.push(j>>16&255),P.push(j>>8&255),P.push(255&j)):18===u?(P.push(j>>10&255),P.push(j>>2&255)):12===u&&P.push(j>>4&255),new Uint8Array(P)},predicate:function isBinary(s){return\"[object Uint8Array]\"===Object.prototype.toString.call(s)},represent:function representYamlBinary(s){var i,u,_=\"\",w=0,x=s.length,j=Nr;for(i=0;i<x;i++)i%3==0&&i&&(_+=j[w>>18&63],_+=j[w>>12&63],_+=j[w>>6&63],_+=j[63&w]),w=(w<<8)+s[i];return 0===(u=x%3)?(_+=j[w>>18&63],_+=j[w>>12&63],_+=j[w>>6&63],_+=j[63&w]):2===u?(_+=j[w>>10&63],_+=j[w>>4&63],_+=j[w<<2&63],_+=j[64]):1===u&&(_+=j[w>>2&63],_+=j[w<<4&63],_+=j[64],_+=j[64]),_}}),Tr=Object.prototype.hasOwnProperty,Rr=Object.prototype.toString;var Dr=new fr(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(s){if(null===s)return!0;var i,u,_,w,x,j=[],P=s;for(i=0,u=P.length;i<u;i+=1){if(_=P[i],x=!1,\"[object Object]\"!==Rr.call(_))return!1;for(w in _)if(Tr.call(_,w)){if(x)return!1;x=!0}if(!x)return!1;if(-1!==j.indexOf(w))return!1;j.push(w)}return!0},construct:function constructYamlOmap(s){return null!==s?s:[]}}),Br=Object.prototype.toString;var Lr=new fr(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(s){if(null===s)return!0;var i,u,_,w,x,j=s;for(x=new Array(j.length),i=0,u=j.length;i<u;i+=1){if(_=j[i],\"[object Object]\"!==Br.call(_))return!1;if(1!==(w=Object.keys(_)).length)return!1;x[i]=[w[0],_[w[0]]]}return!0},construct:function constructYamlPairs(s){if(null===s)return[];var i,u,_,w,x,j=s;for(x=new Array(j.length),i=0,u=j.length;i<u;i+=1)_=j[i],w=Object.keys(_),x[i]=[w[0],_[w[0]]];return x}}),Fr=Object.prototype.hasOwnProperty;var qr=new fr(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(s){if(null===s)return!0;var i,u=s;for(i in u)if(Fr.call(u,i)&&null!==u[i])return!1;return!0},construct:function constructYamlSet(s){return null!==s?s:{}}}),$r=Cr.extend({implicit:[Pr,Ir],explicit:[Mr,Dr,Lr,qr]}),Ur=Object.prototype.hasOwnProperty,zr=1,Vr=2,Wr=3,Kr=4,Hr=1,Jr=2,Gr=3,Yr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Xr=/[\\x85\\u2028\\u2029]/,Qr=/[,\\[\\]\\{\\}]/,Zr=/^(?:!|!!|![a-z\\-]+!)$/i,en=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(s){return Object.prototype.toString.call(s)}function is_EOL(s){return 10===s||13===s}function is_WHITE_SPACE(s){return 9===s||32===s}function is_WS_OR_EOL(s){return 9===s||32===s||10===s||13===s}function is_FLOW_INDICATOR(s){return 44===s||91===s||93===s||123===s||125===s}function fromHexCode(s){var i;return 48<=s&&s<=57?s-48:97<=(i=32|s)&&i<=102?i-97+10:-1}function simpleEscapeSequence(s){return 48===s?\"\\0\":97===s?\"\u0007\":98===s?\"\\b\":116===s||9===s?\"\\t\":110===s?\"\\n\":118===s?\"\\v\":102===s?\"\\f\":114===s?\"\\r\":101===s?\"\u001b\":32===s?\" \":34===s?'\"':47===s?\"/\":92===s?\"\\\\\":78===s?\"\":95===s?\" \":76===s?\"\\u2028\":80===s?\"\\u2029\":\"\"}function charFromCodepoint(s){return s<=65535?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10),56320+(s-65536&1023))}for(var tn=new Array(256),rn=new Array(256),nn=0;nn<256;nn++)tn[nn]=simpleEscapeSequence(nn)?1:0,rn[nn]=simpleEscapeSequence(nn);function State$1(s,i){this.input=s,this.filename=i.filename||null,this.schema=i.schema||$r,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(s,i){var u={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return u.snippet=ur(u),new cr(i,u)}function throwError(s,i){throw generateError(s,i)}function throwWarning(s,i){s.onWarning&&s.onWarning.call(null,generateError(s,i))}var on={YAML:function handleYamlDirective(s,i,u){var _,w,x;null!==s.version&&throwError(s,\"duplication of %YAML directive\"),1!==u.length&&throwError(s,\"YAML directive accepts exactly one argument\"),null===(_=/^([0-9]+)\\.([0-9]+)$/.exec(u[0]))&&throwError(s,\"ill-formed argument of the YAML directive\"),w=parseInt(_[1],10),x=parseInt(_[2],10),1!==w&&throwError(s,\"unacceptable YAML version of the document\"),s.version=u[0],s.checkLineBreaks=x<2,1!==x&&2!==x&&throwWarning(s,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(s,i,u){var _,w;2!==u.length&&throwError(s,\"TAG directive accepts exactly two arguments\"),_=u[0],w=u[1],Zr.test(_)||throwError(s,\"ill-formed tag handle (first argument) of the TAG directive\"),Ur.call(s.tagMap,_)&&throwError(s,'there is a previously declared suffix for \"'+_+'\" tag handle'),en.test(w)||throwError(s,\"ill-formed tag prefix (second argument) of the TAG directive\");try{w=decodeURIComponent(w)}catch(i){throwError(s,\"tag prefix is malformed: \"+w)}s.tagMap[_]=w}};function captureSegment(s,i,u,_){var w,x,j,P;if(i<u){if(P=s.input.slice(i,u),_)for(w=0,x=P.length;w<x;w+=1)9===(j=P.charCodeAt(w))||32<=j&&j<=1114111||throwError(s,\"expected valid JSON character\");else Yr.test(P)&&throwError(s,\"the stream contains non-printable characters\");s.result+=P}}function mergeMappings(s,i,u,_){var w,x,j,P;for(lr.isObject(u)||throwError(s,\"cannot merge mappings; the provided source object is unacceptable\"),j=0,P=(w=Object.keys(u)).length;j<P;j+=1)x=w[j],Ur.call(i,x)||(i[x]=u[x],_[x]=!0)}function storeMappingPair(s,i,u,_,w,x,j,P,B){var $,U;if(Array.isArray(w))for($=0,U=(w=Array.prototype.slice.call(w)).length;$<U;$+=1)Array.isArray(w[$])&&throwError(s,\"nested arrays are not supported inside keys\"),\"object\"==typeof w&&\"[object Object]\"===_class(w[$])&&(w[$]=\"[object Object]\");if(\"object\"==typeof w&&\"[object Object]\"===_class(w)&&(w=\"[object Object]\"),w=String(w),null===i&&(i={}),\"tag:yaml.org,2002:merge\"===_)if(Array.isArray(x))for($=0,U=x.length;$<U;$+=1)mergeMappings(s,i,x[$],u);else mergeMappings(s,i,x,u);else s.json||Ur.call(u,w)||!Ur.call(i,w)||(s.line=j||s.line,s.lineStart=P||s.lineStart,s.position=B||s.position,throwError(s,\"duplicated mapping key\")),\"__proto__\"===w?Object.defineProperty(i,w,{configurable:!0,enumerable:!0,writable:!0,value:x}):i[w]=x,delete u[w];return i}function readLineBreak(s){var i;10===(i=s.input.charCodeAt(s.position))?s.position++:13===i?(s.position++,10===s.input.charCodeAt(s.position)&&s.position++):throwError(s,\"a line break is expected\"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function skipSeparationSpace(s,i,u){for(var _=0,w=s.input.charCodeAt(s.position);0!==w;){for(;is_WHITE_SPACE(w);)9===w&&-1===s.firstTabInLine&&(s.firstTabInLine=s.position),w=s.input.charCodeAt(++s.position);if(i&&35===w)do{w=s.input.charCodeAt(++s.position)}while(10!==w&&13!==w&&0!==w);if(!is_EOL(w))break;for(readLineBreak(s),w=s.input.charCodeAt(s.position),_++,s.lineIndent=0;32===w;)s.lineIndent++,w=s.input.charCodeAt(++s.position)}return-1!==u&&0!==_&&s.lineIndent<u&&throwWarning(s,\"deficient indentation\"),_}function testDocumentSeparator(s){var i,u=s.position;return!(45!==(i=s.input.charCodeAt(u))&&46!==i||i!==s.input.charCodeAt(u+1)||i!==s.input.charCodeAt(u+2)||(u+=3,0!==(i=s.input.charCodeAt(u))&&!is_WS_OR_EOL(i)))}function writeFoldedLines(s,i){1===i?s.result+=\" \":i>1&&(s.result+=lr.repeat(\"\\n\",i-1))}function readBlockSequence(s,i){var u,_,w=s.tag,x=s.anchor,j=[],P=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=j),_=s.input.charCodeAt(s.position);0!==_&&(-1!==s.firstTabInLine&&(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),45===_)&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1));)if(P=!0,s.position++,skipSeparationSpace(s,!0,-1)&&s.lineIndent<=i)j.push(null),_=s.input.charCodeAt(s.position);else if(u=s.line,composeNode(s,i,Wr,!1,!0),j.push(s.result),skipSeparationSpace(s,!0,-1),_=s.input.charCodeAt(s.position),(s.line===u||s.lineIndent>i)&&0!==_)throwError(s,\"bad indentation of a sequence entry\");else if(s.lineIndent<i)break;return!!P&&(s.tag=w,s.anchor=x,s.kind=\"sequence\",s.result=j,!0)}function readTagProperty(s){var i,u,_,w,x=!1,j=!1;if(33!==(w=s.input.charCodeAt(s.position)))return!1;if(null!==s.tag&&throwError(s,\"duplication of a tag property\"),60===(w=s.input.charCodeAt(++s.position))?(x=!0,w=s.input.charCodeAt(++s.position)):33===w?(j=!0,u=\"!!\",w=s.input.charCodeAt(++s.position)):u=\"!\",i=s.position,x){do{w=s.input.charCodeAt(++s.position)}while(0!==w&&62!==w);s.position<s.length?(_=s.input.slice(i,s.position),w=s.input.charCodeAt(++s.position)):throwError(s,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==w&&!is_WS_OR_EOL(w);)33===w&&(j?throwError(s,\"tag suffix cannot contain exclamation marks\"):(u=s.input.slice(i-1,s.position+1),Zr.test(u)||throwError(s,\"named tag handle cannot contain such characters\"),j=!0,i=s.position+1)),w=s.input.charCodeAt(++s.position);_=s.input.slice(i,s.position),Qr.test(_)&&throwError(s,\"tag suffix cannot contain flow indicator characters\")}_&&!en.test(_)&&throwError(s,\"tag name cannot contain such characters: \"+_);try{_=decodeURIComponent(_)}catch(i){throwError(s,\"tag name is malformed: \"+_)}return x?s.tag=_:Ur.call(s.tagMap,u)?s.tag=s.tagMap[u]+_:\"!\"===u?s.tag=\"!\"+_:\"!!\"===u?s.tag=\"tag:yaml.org,2002:\"+_:throwError(s,'undeclared tag handle \"'+u+'\"'),!0}function readAnchorProperty(s){var i,u;if(38!==(u=s.input.charCodeAt(s.position)))return!1;for(null!==s.anchor&&throwError(s,\"duplication of an anchor property\"),u=s.input.charCodeAt(++s.position),i=s.position;0!==u&&!is_WS_OR_EOL(u)&&!is_FLOW_INDICATOR(u);)u=s.input.charCodeAt(++s.position);return s.position===i&&throwError(s,\"name of an anchor node must contain at least one character\"),s.anchor=s.input.slice(i,s.position),!0}function composeNode(s,i,u,_,w){var x,j,P,B,$,U,Y,X,Z,ee=1,ie=!1,ae=!1;if(null!==s.listener&&s.listener(\"open\",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null,x=j=P=Kr===u||Wr===u,_&&skipSeparationSpace(s,!0,-1)&&(ie=!0,s.lineIndent>i?ee=1:s.lineIndent===i?ee=0:s.lineIndent<i&&(ee=-1)),1===ee)for(;readTagProperty(s)||readAnchorProperty(s);)skipSeparationSpace(s,!0,-1)?(ie=!0,P=x,s.lineIndent>i?ee=1:s.lineIndent===i?ee=0:s.lineIndent<i&&(ee=-1)):P=!1;if(P&&(P=ie||w),1!==ee&&Kr!==u||(X=zr===u||Vr===u?i:i+1,Z=s.position-s.lineStart,1===ee?P&&(readBlockSequence(s,Z)||function readBlockMapping(s,i,u){var _,w,x,j,P,B,$,U=s.tag,Y=s.anchor,X={},Z=Object.create(null),ee=null,ie=null,ae=null,le=!1,ce=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=X),$=s.input.charCodeAt(s.position);0!==$;){if(le||-1===s.firstTabInLine||(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),_=s.input.charCodeAt(s.position+1),x=s.line,63!==$&&58!==$||!is_WS_OR_EOL(_)){if(j=s.line,P=s.lineStart,B=s.position,!composeNode(s,u,Vr,!1,!0))break;if(s.line===x){for($=s.input.charCodeAt(s.position);is_WHITE_SPACE($);)$=s.input.charCodeAt(++s.position);if(58===$)is_WS_OR_EOL($=s.input.charCodeAt(++s.position))||throwError(s,\"a whitespace character is expected after the key-value separator within a block mapping\"),le&&(storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ee=ie=ae=null),ce=!0,le=!1,w=!1,ee=s.tag,ie=s.result;else{if(!ce)return s.tag=U,s.anchor=Y,!0;throwError(s,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!ce)return s.tag=U,s.anchor=Y,!0;throwError(s,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===$?(le&&(storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ee=ie=ae=null),ce=!0,le=!0,w=!0):le?(le=!1,w=!0):throwError(s,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),s.position+=1,$=_;if((s.line===x||s.lineIndent>i)&&(le&&(j=s.line,P=s.lineStart,B=s.position),composeNode(s,i,Kr,!0,w)&&(le?ie=s.result:ae=s.result),le||(storeMappingPair(s,X,Z,ee,ie,ae,j,P,B),ee=ie=ae=null),skipSeparationSpace(s,!0,-1),$=s.input.charCodeAt(s.position)),(s.line===x||s.lineIndent>i)&&0!==$)throwError(s,\"bad indentation of a mapping entry\");else if(s.lineIndent<i)break}return le&&storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ce&&(s.tag=U,s.anchor=Y,s.kind=\"mapping\",s.result=X),ce}(s,Z,X))||function readFlowCollection(s,i){var u,_,w,x,j,P,B,$,U,Y,X,Z,ee=!0,ie=s.tag,ae=s.anchor,le=Object.create(null);if(91===(Z=s.input.charCodeAt(s.position)))j=93,$=!1,x=[];else{if(123!==Z)return!1;j=125,$=!0,x={}}for(null!==s.anchor&&(s.anchorMap[s.anchor]=x),Z=s.input.charCodeAt(++s.position);0!==Z;){if(skipSeparationSpace(s,!0,i),(Z=s.input.charCodeAt(s.position))===j)return s.position++,s.tag=ie,s.anchor=ae,s.kind=$?\"mapping\":\"sequence\",s.result=x,!0;ee?44===Z&&throwError(s,\"expected the node content, but found ','\"):throwError(s,\"missed comma between flow collection entries\"),X=null,P=B=!1,63===Z&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1))&&(P=B=!0,s.position++,skipSeparationSpace(s,!0,i)),u=s.line,_=s.lineStart,w=s.position,composeNode(s,i,zr,!1,!0),Y=s.tag,U=s.result,skipSeparationSpace(s,!0,i),Z=s.input.charCodeAt(s.position),!B&&s.line!==u||58!==Z||(P=!0,Z=s.input.charCodeAt(++s.position),skipSeparationSpace(s,!0,i),composeNode(s,i,zr,!1,!0),X=s.result),$?storeMappingPair(s,x,le,Y,U,X,u,_,w):P?x.push(storeMappingPair(s,null,le,Y,U,X,u,_,w)):x.push(U),skipSeparationSpace(s,!0,i),44===(Z=s.input.charCodeAt(s.position))?(ee=!0,Z=s.input.charCodeAt(++s.position)):ee=!1}throwError(s,\"unexpected end of the stream within a flow collection\")}(s,X)?ae=!0:(j&&function readBlockScalar(s,i){var u,_,w,x,j,P=Hr,B=!1,$=!1,U=i,Y=0,X=!1;if(124===(x=s.input.charCodeAt(s.position)))_=!1;else{if(62!==x)return!1;_=!0}for(s.kind=\"scalar\",s.result=\"\";0!==x;)if(43===(x=s.input.charCodeAt(++s.position))||45===x)Hr===P?P=43===x?Gr:Jr:throwError(s,\"repeat of a chomping mode identifier\");else{if(!((w=48<=(j=x)&&j<=57?j-48:-1)>=0))break;0===w?throwError(s,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):$?throwError(s,\"repeat of an indentation width identifier\"):(U=i+w-1,$=!0)}if(is_WHITE_SPACE(x)){do{x=s.input.charCodeAt(++s.position)}while(is_WHITE_SPACE(x));if(35===x)do{x=s.input.charCodeAt(++s.position)}while(!is_EOL(x)&&0!==x)}for(;0!==x;){for(readLineBreak(s),s.lineIndent=0,x=s.input.charCodeAt(s.position);(!$||s.lineIndent<U)&&32===x;)s.lineIndent++,x=s.input.charCodeAt(++s.position);if(!$&&s.lineIndent>U&&(U=s.lineIndent),is_EOL(x))Y++;else{if(s.lineIndent<U){P===Gr?s.result+=lr.repeat(\"\\n\",B?1+Y:Y):P===Hr&&B&&(s.result+=\"\\n\");break}for(_?is_WHITE_SPACE(x)?(X=!0,s.result+=lr.repeat(\"\\n\",B?1+Y:Y)):X?(X=!1,s.result+=lr.repeat(\"\\n\",Y+1)):0===Y?B&&(s.result+=\" \"):s.result+=lr.repeat(\"\\n\",Y):s.result+=lr.repeat(\"\\n\",B?1+Y:Y),B=!0,$=!0,Y=0,u=s.position;!is_EOL(x)&&0!==x;)x=s.input.charCodeAt(++s.position);captureSegment(s,u,s.position,!1)}}return!0}(s,X)||function readSingleQuotedScalar(s,i){var u,_,w;if(39!==(u=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,_=w=s.position;0!==(u=s.input.charCodeAt(s.position));)if(39===u){if(captureSegment(s,_,s.position,!0),39!==(u=s.input.charCodeAt(++s.position)))return!0;_=s.position,s.position++,w=s.position}else is_EOL(u)?(captureSegment(s,_,w,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,i)),_=w=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a single quoted scalar\"):(s.position++,w=s.position);throwError(s,\"unexpected end of the stream within a single quoted scalar\")}(s,X)||function readDoubleQuotedScalar(s,i){var u,_,w,x,j,P,B;if(34!==(P=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,u=_=s.position;0!==(P=s.input.charCodeAt(s.position));){if(34===P)return captureSegment(s,u,s.position,!0),s.position++,!0;if(92===P){if(captureSegment(s,u,s.position,!0),is_EOL(P=s.input.charCodeAt(++s.position)))skipSeparationSpace(s,!1,i);else if(P<256&&tn[P])s.result+=rn[P],s.position++;else if((j=120===(B=P)?2:117===B?4:85===B?8:0)>0){for(w=j,x=0;w>0;w--)(j=fromHexCode(P=s.input.charCodeAt(++s.position)))>=0?x=(x<<4)+j:throwError(s,\"expected hexadecimal character\");s.result+=charFromCodepoint(x),s.position++}else throwError(s,\"unknown escape sequence\");u=_=s.position}else is_EOL(P)?(captureSegment(s,u,_,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,i)),u=_=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a double quoted scalar\"):(s.position++,_=s.position)}throwError(s,\"unexpected end of the stream within a double quoted scalar\")}(s,X)?ae=!0:!function readAlias(s){var i,u,_;if(42!==(_=s.input.charCodeAt(s.position)))return!1;for(_=s.input.charCodeAt(++s.position),i=s.position;0!==_&&!is_WS_OR_EOL(_)&&!is_FLOW_INDICATOR(_);)_=s.input.charCodeAt(++s.position);return s.position===i&&throwError(s,\"name of an alias node must contain at least one character\"),u=s.input.slice(i,s.position),Ur.call(s.anchorMap,u)||throwError(s,'unidentified alias \"'+u+'\"'),s.result=s.anchorMap[u],skipSeparationSpace(s,!0,-1),!0}(s)?function readPlainScalar(s,i,u){var _,w,x,j,P,B,$,U,Y=s.kind,X=s.result;if(is_WS_OR_EOL(U=s.input.charCodeAt(s.position))||is_FLOW_INDICATOR(U)||35===U||38===U||42===U||33===U||124===U||62===U||39===U||34===U||37===U||64===U||96===U)return!1;if((63===U||45===U)&&(is_WS_OR_EOL(_=s.input.charCodeAt(s.position+1))||u&&is_FLOW_INDICATOR(_)))return!1;for(s.kind=\"scalar\",s.result=\"\",w=x=s.position,j=!1;0!==U;){if(58===U){if(is_WS_OR_EOL(_=s.input.charCodeAt(s.position+1))||u&&is_FLOW_INDICATOR(_))break}else if(35===U){if(is_WS_OR_EOL(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&testDocumentSeparator(s)||u&&is_FLOW_INDICATOR(U))break;if(is_EOL(U)){if(P=s.line,B=s.lineStart,$=s.lineIndent,skipSeparationSpace(s,!1,-1),s.lineIndent>=i){j=!0,U=s.input.charCodeAt(s.position);continue}s.position=x,s.line=P,s.lineStart=B,s.lineIndent=$;break}}j&&(captureSegment(s,w,x,!1),writeFoldedLines(s,s.line-P),w=x=s.position,j=!1),is_WHITE_SPACE(U)||(x=s.position+1),U=s.input.charCodeAt(++s.position)}return captureSegment(s,w,x,!1),!!s.result||(s.kind=Y,s.result=X,!1)}(s,X,zr===u)&&(ae=!0,null===s.tag&&(s.tag=\"?\")):(ae=!0,null===s.tag&&null===s.anchor||throwError(s,\"alias node should not have any properties\")),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):0===ee&&(ae=P&&readBlockSequence(s,Z))),null===s.tag)null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);else if(\"?\"===s.tag){for(null!==s.result&&\"scalar\"!==s.kind&&throwError(s,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+s.kind+'\"'),B=0,$=s.implicitTypes.length;B<$;B+=1)if((Y=s.implicitTypes[B]).resolve(s.result)){s.result=Y.construct(s.result),s.tag=Y.tag,null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);break}}else if(\"!\"!==s.tag){if(Ur.call(s.typeMap[s.kind||\"fallback\"],s.tag))Y=s.typeMap[s.kind||\"fallback\"][s.tag];else for(Y=null,B=0,$=(U=s.typeMap.multi[s.kind||\"fallback\"]).length;B<$;B+=1)if(s.tag.slice(0,U[B].tag.length)===U[B].tag){Y=U[B];break}Y||throwError(s,\"unknown tag !<\"+s.tag+\">\"),null!==s.result&&Y.kind!==s.kind&&throwError(s,\"unacceptable node kind for !<\"+s.tag+'> tag; it should be \"'+Y.kind+'\", not \"'+s.kind+'\"'),Y.resolve(s.result,s.tag)?(s.result=Y.construct(s.result,s.tag),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):throwError(s,\"cannot resolve a node with !<\"+s.tag+\"> explicit tag\")}return null!==s.listener&&s.listener(\"close\",s),null!==s.tag||null!==s.anchor||ae}function readDocument(s){var i,u,_,w,x=s.position,j=!1;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);0!==(w=s.input.charCodeAt(s.position))&&(skipSeparationSpace(s,!0,-1),w=s.input.charCodeAt(s.position),!(s.lineIndent>0||37!==w));){for(j=!0,w=s.input.charCodeAt(++s.position),i=s.position;0!==w&&!is_WS_OR_EOL(w);)w=s.input.charCodeAt(++s.position);for(_=[],(u=s.input.slice(i,s.position)).length<1&&throwError(s,\"directive name must not be less than one character in length\");0!==w;){for(;is_WHITE_SPACE(w);)w=s.input.charCodeAt(++s.position);if(35===w){do{w=s.input.charCodeAt(++s.position)}while(0!==w&&!is_EOL(w));break}if(is_EOL(w))break;for(i=s.position;0!==w&&!is_WS_OR_EOL(w);)w=s.input.charCodeAt(++s.position);_.push(s.input.slice(i,s.position))}0!==w&&readLineBreak(s),Ur.call(on,u)?on[u](s,u,_):throwWarning(s,'unknown document directive \"'+u+'\"')}skipSeparationSpace(s,!0,-1),0===s.lineIndent&&45===s.input.charCodeAt(s.position)&&45===s.input.charCodeAt(s.position+1)&&45===s.input.charCodeAt(s.position+2)?(s.position+=3,skipSeparationSpace(s,!0,-1)):j&&throwError(s,\"directives end mark is expected\"),composeNode(s,s.lineIndent-1,Kr,!1,!0),skipSeparationSpace(s,!0,-1),s.checkLineBreaks&&Xr.test(s.input.slice(x,s.position))&&throwWarning(s,\"non-ASCII line breaks are interpreted as content\"),s.documents.push(s.result),s.position===s.lineStart&&testDocumentSeparator(s)?46===s.input.charCodeAt(s.position)&&(s.position+=3,skipSeparationSpace(s,!0,-1)):s.position<s.length-1&&throwError(s,\"end of the stream or a document separator is expected\")}function loadDocuments(s,i){i=i||{},0!==(s=String(s)).length&&(10!==s.charCodeAt(s.length-1)&&13!==s.charCodeAt(s.length-1)&&(s+=\"\\n\"),65279===s.charCodeAt(0)&&(s=s.slice(1)));var u=new State$1(s,i),_=s.indexOf(\"\\0\");for(-1!==_&&(u.position=_,throwError(u,\"null byte is not allowed in input\")),u.input+=\"\\0\";32===u.input.charCodeAt(u.position);)u.lineIndent+=1,u.position+=1;for(;u.position<u.length-1;)readDocument(u);return u.documents}var sn={loadAll:function loadAll$1(s,i,u){null!==i&&\"object\"==typeof i&&void 0===u&&(u=i,i=null);var _=loadDocuments(s,u);if(\"function\"!=typeof i)return _;for(var w=0,x=_.length;w<x;w+=1)i(_[w])},load:function load$1(s,i){var u=loadDocuments(s,i);if(0!==u.length){if(1===u.length)return u[0];throw new cr(\"expected a single document in the stream, but found more\")}}},an=Object.prototype.toString,ln=Object.prototype.hasOwnProperty,cn=65279,un=9,pn=10,hn=13,dn=32,fn=33,mn=34,gn=35,yn=37,vn=38,bn=39,_n=42,En=44,wn=45,Sn=58,xn=61,kn=62,On=63,Cn=64,An=91,jn=93,Pn=96,In=123,Nn=124,Mn=125,Tn={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Rn=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Dn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(s){var i,u,_;if(i=s.toString(16).toUpperCase(),s<=255)u=\"x\",_=2;else if(s<=65535)u=\"u\",_=4;else{if(!(s<=4294967295))throw new cr(\"code point within a string may not be greater than 0xFFFFFFFF\");u=\"U\",_=8}return\"\\\\\"+u+lr.repeat(\"0\",_-i.length)+i}var Bn=1,Ln=2;function State(s){this.schema=s.schema||$r,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=lr.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=function compileStyleMap(s,i){var u,_,w,x,j,P,B;if(null===i)return{};for(u={},w=0,x=(_=Object.keys(i)).length;w<x;w+=1)j=_[w],P=String(i[j]),\"!!\"===j.slice(0,2)&&(j=\"tag:yaml.org,2002:\"+j.slice(2)),(B=s.compiledTypeMap.fallback[j])&&ln.call(B.styleAliases,P)&&(P=B.styleAliases[P]),u[j]=P;return u}(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType='\"'===s.quotingType?Ln:Bn,this.forceQuotes=s.forceQuotes||!1,this.replacer=\"function\"==typeof s.replacer?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(s,i){for(var u,_=lr.repeat(\" \",i),w=0,x=-1,j=\"\",P=s.length;w<P;)-1===(x=s.indexOf(\"\\n\",w))?(u=s.slice(w),w=P):(u=s.slice(w,x+1),w=x+1),u.length&&\"\\n\"!==u&&(j+=_),j+=u;return j}function generateNextLine(s,i){return\"\\n\"+lr.repeat(\" \",s.indent*i)}function isWhitespace(s){return s===dn||s===un}function isPrintable(s){return 32<=s&&s<=126||161<=s&&s<=55295&&8232!==s&&8233!==s||57344<=s&&s<=65533&&s!==cn||65536<=s&&s<=1114111}function isNsCharOrWhitespace(s){return isPrintable(s)&&s!==cn&&s!==hn&&s!==pn}function isPlainSafe(s,i,u){var _=isNsCharOrWhitespace(s),w=_&&!isWhitespace(s);return(u?_:_&&s!==En&&s!==An&&s!==jn&&s!==In&&s!==Mn)&&s!==gn&&!(i===Sn&&!w)||isNsCharOrWhitespace(i)&&!isWhitespace(i)&&s===gn||i===Sn&&w}function codePointAt(s,i){var u,_=s.charCodeAt(i);return _>=55296&&_<=56319&&i+1<s.length&&(u=s.charCodeAt(i+1))>=56320&&u<=57343?1024*(_-55296)+u-56320+65536:_}function needIndentIndicator(s){return/^\\n* /.test(s)}var Fn=1,qn=2,$n=3,Un=4,zn=5;function chooseScalarStyle(s,i,u,_,w,x,j,P){var B,$=0,U=null,Y=!1,X=!1,Z=-1!==_,ee=-1,ie=function isPlainSafeFirst(s){return isPrintable(s)&&s!==cn&&!isWhitespace(s)&&s!==wn&&s!==On&&s!==Sn&&s!==En&&s!==An&&s!==jn&&s!==In&&s!==Mn&&s!==gn&&s!==vn&&s!==_n&&s!==fn&&s!==Nn&&s!==xn&&s!==kn&&s!==bn&&s!==mn&&s!==yn&&s!==Cn&&s!==Pn}(codePointAt(s,0))&&function isPlainSafeLast(s){return!isWhitespace(s)&&s!==Sn}(codePointAt(s,s.length-1));if(i||j)for(B=0;B<s.length;$>=65536?B+=2:B++){if(!isPrintable($=codePointAt(s,B)))return zn;ie=ie&&isPlainSafe($,U,P),U=$}else{for(B=0;B<s.length;$>=65536?B+=2:B++){if(($=codePointAt(s,B))===pn)Y=!0,Z&&(X=X||B-ee-1>_&&\" \"!==s[ee+1],ee=B);else if(!isPrintable($))return zn;ie=ie&&isPlainSafe($,U,P),U=$}X=X||Z&&B-ee-1>_&&\" \"!==s[ee+1]}return Y||X?u>9&&needIndentIndicator(s)?zn:j?x===Ln?zn:qn:X?Un:$n:!ie||j||w(s)?x===Ln?zn:qn:Fn}function writeScalar(s,i,u,_,w){s.dump=function(){if(0===i.length)return s.quotingType===Ln?'\"\"':\"''\";if(!s.noCompatMode&&(-1!==Rn.indexOf(i)||Dn.test(i)))return s.quotingType===Ln?'\"'+i+'\"':\"'\"+i+\"'\";var x=s.indent*Math.max(1,u),j=-1===s.lineWidth?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-x),P=_||s.flowLevel>-1&&u>=s.flowLevel;switch(chooseScalarStyle(i,P,s.indent,j,(function testAmbiguity(i){return function testImplicitResolving(s,i){var u,_;for(u=0,_=s.implicitTypes.length;u<_;u+=1)if(s.implicitTypes[u].resolve(i))return!0;return!1}(s,i)}),s.quotingType,s.forceQuotes&&!_,w)){case Fn:return i;case qn:return\"'\"+i.replace(/'/g,\"''\")+\"'\";case $n:return\"|\"+blockHeader(i,s.indent)+dropEndingNewline(indentString(i,x));case Un:return\">\"+blockHeader(i,s.indent)+dropEndingNewline(indentString(function foldString(s,i){var u,_,w=/(\\n+)([^\\n]*)/g,x=(P=s.indexOf(\"\\n\"),P=-1!==P?P:s.length,w.lastIndex=P,foldLine(s.slice(0,P),i)),j=\"\\n\"===s[0]||\" \"===s[0];var P;for(;_=w.exec(s);){var B=_[1],$=_[2];u=\" \"===$[0],x+=B+(j||u||\"\"===$?\"\":\"\\n\")+foldLine($,i),j=u}return x}(i,j),x));case zn:return'\"'+function escapeString(s){for(var i,u=\"\",_=0,w=0;w<s.length;_>=65536?w+=2:w++)_=codePointAt(s,w),!(i=Tn[_])&&isPrintable(_)?(u+=s[w],_>=65536&&(u+=s[w+1])):u+=i||encodeHex(_);return u}(i)+'\"';default:throw new cr(\"impossible error: invalid scalar style\")}}()}function blockHeader(s,i){var u=needIndentIndicator(s)?String(i):\"\",_=\"\\n\"===s[s.length-1];return u+(_&&(\"\\n\"===s[s.length-2]||\"\\n\"===s)?\"+\":_?\"\":\"-\")+\"\\n\"}function dropEndingNewline(s){return\"\\n\"===s[s.length-1]?s.slice(0,-1):s}function foldLine(s,i){if(\"\"===s||\" \"===s[0])return s;for(var u,_,w=/ [^ ]/g,x=0,j=0,P=0,B=\"\";u=w.exec(s);)(P=u.index)-x>i&&(_=j>x?j:P,B+=\"\\n\"+s.slice(x,_),x=_+1),j=P;return B+=\"\\n\",s.length-x>i&&j>x?B+=s.slice(x,j)+\"\\n\"+s.slice(j+1):B+=s.slice(x),B.slice(1)}function writeBlockSequence(s,i,u,_){var w,x,j,P=\"\",B=s.tag;for(w=0,x=u.length;w<x;w+=1)j=u[w],s.replacer&&(j=s.replacer.call(u,String(w),j)),(writeNode(s,i+1,j,!0,!0,!1,!0)||void 0===j&&writeNode(s,i+1,null,!0,!0,!1,!0))&&(_&&\"\"===P||(P+=generateNextLine(s,i)),s.dump&&pn===s.dump.charCodeAt(0)?P+=\"-\":P+=\"- \",P+=s.dump);s.tag=B,s.dump=P||\"[]\"}function detectType(s,i,u){var _,w,x,j,P,B;for(x=0,j=(w=u?s.explicitTypes:s.implicitTypes).length;x<j;x+=1)if(((P=w[x]).instanceOf||P.predicate)&&(!P.instanceOf||\"object\"==typeof i&&i instanceof P.instanceOf)&&(!P.predicate||P.predicate(i))){if(u?P.multi&&P.representName?s.tag=P.representName(i):s.tag=P.tag:s.tag=\"?\",P.represent){if(B=s.styleMap[P.tag]||P.defaultStyle,\"[object Function]\"===an.call(P.represent))_=P.represent(i,B);else{if(!ln.call(P.represent,B))throw new cr(\"!<\"+P.tag+'> tag resolver accepts not \"'+B+'\" style');_=P.represent[B](i,B)}s.dump=_}return!0}return!1}function writeNode(s,i,u,_,w,x,j){s.tag=null,s.dump=u,detectType(s,u,!1)||detectType(s,u,!0);var P,B=an.call(s.dump),$=_;_&&(_=s.flowLevel<0||s.flowLevel>i);var U,Y,X=\"[object Object]\"===B||\"[object Array]\"===B;if(X&&(Y=-1!==(U=s.duplicates.indexOf(u))),(null!==s.tag&&\"?\"!==s.tag||Y||2!==s.indent&&i>0)&&(w=!1),Y&&s.usedDuplicates[U])s.dump=\"*ref_\"+U;else{if(X&&Y&&!s.usedDuplicates[U]&&(s.usedDuplicates[U]=!0),\"[object Object]\"===B)_&&0!==Object.keys(s.dump).length?(!function writeBlockMapping(s,i,u,_){var w,x,j,P,B,$,U=\"\",Y=s.tag,X=Object.keys(u);if(!0===s.sortKeys)X.sort();else if(\"function\"==typeof s.sortKeys)X.sort(s.sortKeys);else if(s.sortKeys)throw new cr(\"sortKeys must be a boolean or a function\");for(w=0,x=X.length;w<x;w+=1)$=\"\",_&&\"\"===U||($+=generateNextLine(s,i)),P=u[j=X[w]],s.replacer&&(P=s.replacer.call(u,j,P)),writeNode(s,i+1,j,!0,!0,!0)&&((B=null!==s.tag&&\"?\"!==s.tag||s.dump&&s.dump.length>1024)&&(s.dump&&pn===s.dump.charCodeAt(0)?$+=\"?\":$+=\"? \"),$+=s.dump,B&&($+=generateNextLine(s,i)),writeNode(s,i+1,P,!0,B)&&(s.dump&&pn===s.dump.charCodeAt(0)?$+=\":\":$+=\": \",U+=$+=s.dump));s.tag=Y,s.dump=U||\"{}\"}(s,i,s.dump,w),Y&&(s.dump=\"&ref_\"+U+s.dump)):(!function writeFlowMapping(s,i,u){var _,w,x,j,P,B=\"\",$=s.tag,U=Object.keys(u);for(_=0,w=U.length;_<w;_+=1)P=\"\",\"\"!==B&&(P+=\", \"),s.condenseFlow&&(P+='\"'),j=u[x=U[_]],s.replacer&&(j=s.replacer.call(u,x,j)),writeNode(s,i,x,!1,!1)&&(s.dump.length>1024&&(P+=\"? \"),P+=s.dump+(s.condenseFlow?'\"':\"\")+\":\"+(s.condenseFlow?\"\":\" \"),writeNode(s,i,j,!1,!1)&&(B+=P+=s.dump));s.tag=$,s.dump=\"{\"+B+\"}\"}(s,i,s.dump),Y&&(s.dump=\"&ref_\"+U+\" \"+s.dump));else if(\"[object Array]\"===B)_&&0!==s.dump.length?(s.noArrayIndent&&!j&&i>0?writeBlockSequence(s,i-1,s.dump,w):writeBlockSequence(s,i,s.dump,w),Y&&(s.dump=\"&ref_\"+U+s.dump)):(!function writeFlowSequence(s,i,u){var _,w,x,j=\"\",P=s.tag;for(_=0,w=u.length;_<w;_+=1)x=u[_],s.replacer&&(x=s.replacer.call(u,String(_),x)),(writeNode(s,i,x,!1,!1)||void 0===x&&writeNode(s,i,null,!1,!1))&&(\"\"!==j&&(j+=\",\"+(s.condenseFlow?\"\":\" \")),j+=s.dump);s.tag=P,s.dump=\"[\"+j+\"]\"}(s,i,s.dump),Y&&(s.dump=\"&ref_\"+U+\" \"+s.dump));else{if(\"[object String]\"!==B){if(\"[object Undefined]\"===B)return!1;if(s.skipInvalid)return!1;throw new cr(\"unacceptable kind of an object to dump \"+B)}\"?\"!==s.tag&&writeScalar(s,s.dump,i,x,$)}null!==s.tag&&\"?\"!==s.tag&&(P=encodeURI(\"!\"===s.tag[0]?s.tag.slice(1):s.tag).replace(/!/g,\"%21\"),P=\"!\"===s.tag[0]?\"!\"+P:\"tag:yaml.org,2002:\"===P.slice(0,18)?\"!!\"+P.slice(18):\"!<\"+P+\">\",s.dump=P+\" \"+s.dump)}return!0}function getDuplicateReferences(s,i){var u,_,w=[],x=[];for(inspectNode(s,w,x),u=0,_=x.length;u<_;u+=1)i.duplicates.push(w[x[u]]);i.usedDuplicates=new Array(_)}function inspectNode(s,i,u){var _,w,x;if(null!==s&&\"object\"==typeof s)if(-1!==(w=i.indexOf(s)))-1===u.indexOf(w)&&u.push(w);else if(i.push(s),Array.isArray(s))for(w=0,x=s.length;w<x;w+=1)inspectNode(s[w],i,u);else for(w=0,x=(_=Object.keys(s)).length;w<x;w+=1)inspectNode(s[_[w]],i,u)}var Vn=function dump$1(s,i){var u=new State(i=i||{});u.noRefs||getDuplicateReferences(s,u);var _=s;return u.replacer&&(_=u.replacer.call({\"\":_},\"\",_)),writeNode(u,0,_,!0,!0)?u.dump+\"\\n\":\"\"};function renamed(s,i){return function(){throw new Error(\"Function yaml.\"+s+\" is removed in js-yaml 4. Use yaml.\"+i+\" instead, which is now safe by default.\")}}var Wn=fr,Kn=mr,Hn=br,Jn=Or,Gn=Cr,Yn=$r,Xn=sn.load,Qn=sn.loadAll,Zn={dump:Vn}.dump,eo=cr,to={binary:Mr,float:kr,map:vr,null:_r,pairs:Lr,set:qr,timestamp:Pr,bool:Er,int:wr,merge:Ir,omap:Dr,seq:yr,str:gr},ro=renamed(\"safeLoad\",\"load\"),no=renamed(\"safeLoadAll\",\"loadAll\"),oo=renamed(\"safeDump\",\"dump\");const so={Type:Wn,Schema:Kn,FAILSAFE_SCHEMA:Hn,JSON_SCHEMA:Jn,CORE_SCHEMA:Gn,DEFAULT_SCHEMA:Yn,load:Xn,loadAll:Qn,dump:Zn,YAMLException:eo,types:to,safeLoad:ro,safeLoadAll:no,safeDump:oo},parseYamlConfig=(s,i)=>{try{return so.load(s)}catch(s){return i&&i.errActions.newThrownErr(new Error(s)),{}}},io=\"configs_update\",ao=\"configs_toggle\";function update(s,i){return{type:io,payload:{[s]:i}}}function toggle(s){return{type:ao,payload:s}}const actions_loaded=()=>()=>{},downloadConfig=s=>i=>{const{fn:{fetch:u}}=i;return u(s)},getConfigByUrl=(s,i)=>({specActions:u})=>{if(s)return u.downloadConfig(s).then(next,next);function next(_){_ instanceof Error||_.status>=400?(u.updateLoadingStatus(\"failedConfig\"),u.updateLoadingStatus(\"failedConfig\"),u.updateUrl(\"\"),console.error(_.statusText+\" \"+s.url),i(null)):i(parseYamlConfig(_.text))}},get=(s,i)=>s.getIn(Array.isArray(i)?i:[i]),lo={[io]:(s,i)=>s.merge((0,Xe.fromJS)(i.payload)),[ao]:(s,i)=>{const u=i.payload,_=s.get(u);return s.set(u,!_)}},co={getLocalConfig:()=>parseYamlConfig('---\\nurl: \"https://petstore.swagger.io/v2/swagger.json\"\\ndom_id: \"#swagger-ui\"\\nvalidatorUrl: \"https://validator.swagger.io/validator\"\\n')};function configsPlugin(){return{statePlugins:{spec:{actions:x,selectors:co},configs:{reducers:lo,actions:_,selectors:j}}}}const setHash=s=>s?history.pushState(null,null,`#${s}`):window.location.hash=\"\";var uo=__webpack_require__(86215),po=__webpack_require__.n(uo);const ho=\"layout_scroll_to\",fo=\"layout_clear_scroll\";const mo={fn:{getScrollParent:function getScrollParent(s,i){const u=document.documentElement;let _=getComputedStyle(s);const w=\"absolute\"===_.position,x=i?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===_.position)return u;for(let i=s;i=i.parentElement;)if(_=getComputedStyle(i),(!w||\"static\"!==_.position)&&x.test(_.overflow+_.overflowY+_.overflowX))return i;return u}},statePlugins:{layout:{actions:{scrollToElement:(s,i)=>u=>{try{i=i||u.fn.getScrollParent(s),po().createScroller(i).to(s)}catch(s){console.error(s)}},scrollTo:s=>({type:ho,payload:Array.isArray(s)?s:[s]}),clearScrollTo:()=>({type:fo}),readyToScroll:(s,i)=>u=>{const _=u.layoutSelectors.getScrollToKey();Qe().is(_,(0,Xe.fromJS)(s))&&(u.layoutActions.scrollToElement(i),u.layoutActions.clearScrollTo())},parseDeepLinkHash:s=>({layoutActions:i,layoutSelectors:u,getConfigs:_})=>{if(_().deepLinking&&s){let _=s.slice(1);\"!\"===_[0]&&(_=_.slice(1)),\"/\"===_[0]&&(_=_.slice(1));const w=_.split(\"/\").map((s=>s||\"\")),x=u.isShownKeyFromUrlHashArray(w),[j,P=\"\",B=\"\"]=x;if(\"operations\"===j){const s=u.isShownKeyFromUrlHashArray([P]);P.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),i.show(s.map((s=>s.replace(/_/g,\" \"))),!0)),i.show(s,!0)}(P.indexOf(\"_\")>-1||B.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),i.show(x.map((s=>s.replace(/_/g,\" \"))),!0)),i.show(x,!0),i.scrollTo(x)}}},selectors:{getScrollToKey:s=>s.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(s,i){const[u,_]=i;return _?[\"operations\",u,_]:u?[\"operations-tag\",u]:[]},urlHashArrayFromIsShownKey(s,i){let[u,_,w]=i;return\"operations\"==u?[_,w]:\"operations-tag\"==u?[_]:[]}},reducers:{[ho]:(s,i)=>s.set(\"scrollToKey\",Qe().fromJS(i.payload)),[fo]:s=>s.delete(\"scrollToKey\")},wrapActions:{show:(s,{getConfigs:i,layoutSelectors:u})=>(..._)=>{if(s(..._),i().deepLinking)try{let[s,i]=_;s=Array.isArray(s)?s:[s];const w=u.urlHashArrayFromIsShownKey(s);if(!w.length)return;const[x,j]=w;if(!i)return setHash(\"/\");2===w.length?setHash(createDeepLinkPath(`/${encodeURIComponent(x)}/${encodeURIComponent(j)}`)):1===w.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(x)}`))}catch(s){console.error(s)}}}}}};var go=__webpack_require__(2209),yo=__webpack_require__.n(go);const operation_wrapper=(s,i)=>class OperationWrapper extends We.Component{onLoad=s=>{const{operation:u}=this.props,{tag:_,operationId:w}=u.toObject();let{isShownKey:x}=u.toObject();x=x||[\"operations\",_,w],i.layoutActions.readyToScroll(x,s)};render(){return We.createElement(\"span\",{ref:this.onLoad},We.createElement(s,this.props))}},operation_tag_wrapper=(s,i)=>class OperationTagWrapper extends We.Component{onLoad=s=>{const{tag:u}=this.props,_=[\"operations-tag\",u];i.layoutActions.readyToScroll(_,s)};render(){return We.createElement(\"span\",{ref:this.onLoad},We.createElement(s,this.props))}};function deep_linking(){return[mo,{statePlugins:{configs:{wrapActions:{loaded:(s,i)=>(...u)=>{s(...u);const _=decodeURIComponent(window.location.hash);i.layoutActions.parseDeepLinkHash(_)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var vo=__webpack_require__(40860),bo=__webpack_require__.n(vo);function transform(s){return s.map((s=>{let i=\"is not of a type(s)\",u=s.get(\"message\").indexOf(i);if(u>-1){let i=s.get(\"message\").slice(u+19).split(\",\");return s.set(\"message\",s.get(\"message\").slice(0,u)+function makeNewMessage(s){return s.reduce(((s,i,u,_)=>u===_.length-1&&_.length>1?s+\"or \"+i:_[u+1]&&_.length>2?s+i+\", \":_[u+1]?s+i+\" \":s+i),\"should be a\")}(i))}return s}))}var _o=__webpack_require__(58156),Eo=__webpack_require__.n(_o);function parameter_oneof_transform(s,{jsSpec:i}){return s}const wo=[P,B];function transformErrors(s){let i={jsSpec:{}},u=bo()(wo,((s,u)=>{try{return u.transform(s,i).filter((s=>!!s))}catch(i){return console.error(\"Transformer error:\",i),s}}),s);return u.filter((s=>!!s)).map((s=>(!s.get(\"line\")&&s.get(\"path\"),s)))}let So={line:0,level:\"error\",message:\"Unknown error\"};const xo=Gt((s=>s),(s=>s.get(\"errors\",(0,Xe.List)()))),ko=Gt(xo,(s=>s.last()));function err(i){return{statePlugins:{err:{reducers:{[ot]:(s,{payload:i})=>{let u=Object.assign(So,i,{type:\"thrown\"});return s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)))).update(\"errors\",(s=>transformErrors(s)))},[st]:(s,{payload:i})=>(i=i.map((s=>(0,Xe.fromJS)(Object.assign(So,s,{type:\"thrown\"})))),s.update(\"errors\",(s=>(s||(0,Xe.List)()).concat((0,Xe.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))),[it]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(i);return u=u.set(\"type\",\"spec\"),s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)).sortBy((s=>s.get(\"line\"))))).update(\"errors\",(s=>transformErrors(s)))},[at]:(s,{payload:i})=>(i=i.map((s=>(0,Xe.fromJS)(Object.assign(So,s,{type:\"spec\"})))),s.update(\"errors\",(s=>(s||(0,Xe.List)()).concat((0,Xe.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))),[lt]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(Object.assign({},i));return u=u.set(\"type\",\"auth\"),s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)))).update(\"errors\",(s=>transformErrors(s)))},[ct]:(s,{payload:i})=>{if(!i||!s.get(\"errors\"))return s;let u=s.get(\"errors\").filter((s=>s.keySeq().every((u=>{const _=s.get(u),w=i[u];return!w||_!==w}))));return s.merge({errors:u})},[ut]:(s,{payload:i})=>{if(!i||\"function\"!=typeof i)return s;let u=s.get(\"errors\").filter((s=>i(s)));return s.merge({errors:u})}},actions:s,selectors:$}}}}function opsFilter(s,i){return s.filter(((s,u)=>-1!==u.indexOf(i)))}function filter(){return{fn:{opsFilter}}}var Oo=__webpack_require__(7666),Co=__webpack_require__.n(Oo);const arrow_up=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:s=null,width:i=15,height:u=16,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"g\",{transform:\"translate(2, -1)\"},We.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),Ao=\"layout_update_layout\",jo=\"layout_update_filter\",Po=\"layout_update_mode\",Io=\"layout_show\";function updateLayout(s){return{type:Ao,payload:s}}function updateFilter(s){return{type:jo,payload:s}}function actions_show(s,i=!0){return s=normalizeArray(s),{type:Io,payload:{thing:s,shown:i}}}function changeMode(s,i=\"\"){return s=normalizeArray(s),{type:Po,payload:{thing:s,mode:i}}}const No={[Ao]:(s,i)=>s.set(\"layout\",i.payload),[jo]:(s,i)=>s.set(\"filter\",i.payload),[Io]:(s,i)=>{const u=i.payload.shown,_=(0,Xe.fromJS)(i.payload.thing);return s.update(\"shown\",(0,Xe.fromJS)({}),(s=>s.set(_,u)))},[Po]:(s,i)=>{let u=i.payload.thing,_=i.payload.mode;return s.setIn([\"modes\"].concat(u),(_||\"\")+\"\")}},current=s=>s.get(\"layout\"),currentFilter=s=>s.get(\"filter\"),isShown=(s,i,u)=>(i=normalizeArray(i),s.get(\"shown\",(0,Xe.fromJS)({})).get((0,Xe.fromJS)(i),u)),whatMode=(s,i,u=\"\")=>(i=normalizeArray(i),s.getIn([\"modes\",...i],u)),Mo=Gt((s=>s),(s=>!isShown(s,\"editor\"))),taggedOperations=(s,i)=>(u,..._)=>{let w=s(u,..._);const{fn:x,layoutSelectors:j,getConfigs:P}=i.getSystem(),B=P(),{maxDisplayedTags:$}=B;let U=j.currentFilter();return U&&!0!==U&&\"true\"!==U&&\"false\"!==U&&(w=x.opsFilter(w,U)),$&&!isNaN($)&&$>=0&&(w=w.slice(0,$)),w};function plugins_layout(){return{statePlugins:{layout:{reducers:No,actions:U,selectors:Y},spec:{wrapSelectors:X}}}}function logs({configs:s}){const i={debug:0,info:1,log:2,warn:3,error:4},getLevel=s=>i[s]||-1;let{logLevel:u}=s,_=getLevel(u);function log(s,...i){getLevel(s)>=_&&console[s](...i)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let To=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:s=>(...i)=>(To=!0,s(...i)),updateJsonSpec:(s,i)=>(...u)=>{const _=i.getConfigs().onComplete;return To&&\"function\"==typeof _&&(setTimeout(_,0),To=!1),s(...u)}}}}}}const extractKey=s=>{const i=\"_**[]\";return s.indexOf(i)<0?s:s.split(i)[0].trim()},escapeShell=s=>\"-d \"===s||/^[_\\/-]/g.test(s)?s:\"'\"+s.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=s=>\"-d \"===(s=s.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?s.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(s)?s:'\"'+s+'\"',escapePowershell=s=>{if(\"-d \"===s)return s;if(/\\n/.test(s)){return`@\"\\n${s.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(s)){return`'${s.replace(/'/g,\"''\")}'`}return s};const curlify=(s,i,u,_=\"\")=>{let w=!1,x=\"\";const addWords=(...s)=>x+=\" \"+s.map(i).join(\" \"),addWordsWithoutLeadingSpace=(...s)=>x+=s.map(i).join(\" \"),addNewLine=()=>x+=` ${u}`,addIndent=(s=1)=>x+=\"  \".repeat(s);let j=s.get(\"headers\");if(x+=\"curl\"+_,s.has(\"curlOptions\")&&addWords(...s.get(\"curlOptions\")),addWords(\"-X\",s.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${s.get(\"url\")}`),j&&j.size)for(let i of s.get(\"headers\").entries()){addNewLine(),addIndent();let[s,u]=i;addWordsWithoutLeadingSpace(\"-H\",`${s}: ${u}`),w=w||/^content-type$/i.test(s)&&/^multipart\\/form-data$/i.test(u)}const P=s.get(\"body\");if(P)if(w&&[\"POST\",\"PUT\",\"PATCH\"].includes(s.get(\"method\")))for(let[s,i]of P.entrySeq()){let u=extractKey(s);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),i instanceof pt.File&&\"string\"==typeof i.valueOf()?addWords(`${u}=${i.data}${i.type?`;type=${i.type}`:\"\"}`):i instanceof pt.File?addWords(`${u}=@${i.name}${i.type?`;type=${i.type}`:\"\"}`):addWords(`${u}=${i}`)}else if(P instanceof pt.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${P.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let i=P;Xe.Map.isMap(i)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(s){let i=[];for(let[u,_]of s.get(\"body\").entrySeq()){let s=extractKey(u);_ instanceof pt.File?i.push(`  \"${s}\": {\\n    \"name\": \"${_.name}\"${_.type?`,\\n    \"type\": \"${_.type}\"`:\"\"}\\n  }`):i.push(`  \"${s}\": ${JSON.stringify(_,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${i.join(\",\\n\")}\\n}`}(s)):(\"string\"!=typeof i&&(i=JSON.stringify(i)),addWordsWithoutLeadingSpace(i))}else P||\"POST\"!==s.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return x},requestSnippetGenerator_curl_powershell=s=>curlify(s,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=s=>curlify(s,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=s=>curlify(s,escapeCMD,\"^\\n\"),request_snippets_selectors_state=s=>s||(0,Xe.Map)(),Ro=Gt(request_snippets_selectors_state,(s=>{const i=s.get(\"languages\"),u=s.get(\"generators\",(0,Xe.Map)());return!i||i.isEmpty()?u:u.filter(((s,u)=>i.includes(u)))})),getSnippetGenerators=s=>({fn:i})=>Ro(s).map(((s,u)=>{const _=(s=>i[`requestSnippetGenerator_${s}`])(u);return\"function\"!=typeof _?null:s.set(\"fn\",_)})).filter((s=>s)),Do=Gt(request_snippets_selectors_state,(s=>s.get(\"activeLanguage\"))),Bo=Gt(request_snippets_selectors_state,(s=>s.get(\"defaultExpanded\")));var Lo=__webpack_require__(59399);function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function _arrayLikeToArray(s,i){(null==i||i>s.length)&&(i=s.length);for(var u=0,_=new Array(i);u<i;u++)_[u]=s[u];return _}function _toConsumableArray(s){return function _arrayWithoutHoles(s){if(Array.isArray(s))return _arrayLikeToArray(s)}(s)||function _iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function _unsupportedIterableToArray(s,i){if(s){if(\"string\"==typeof s)return _arrayLikeToArray(s,i);var u=Object.prototype.toString.call(s).slice(8,-1);return\"Object\"===u&&s.constructor&&(u=s.constructor.name),\"Map\"===u||\"Set\"===u?Array.from(s):\"Arguments\"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?_arrayLikeToArray(s,i):void 0}}(s)||function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}function toPropertyKey(s){var i=function toPrimitive(s,i){if(\"object\"!=_typeof(s)||!s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=_typeof(_))return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==_typeof(i)?i:String(i)}function _defineProperty(s,i,u){return(i=toPropertyKey(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function _extends(){return _extends=Object.assign?Object.assign.bind():function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},_extends.apply(this,arguments)}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}var Fo={};function createStyleObject(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;return function getClassNameCombinations(s){if(0===s.length||1===s.length)return s;var i=s.join(\".\");return Fo[i]||(Fo[i]=function powerSetPermutations(s){var i=s.length;return 0===i||1===i?s:2===i?[s[0],s[1],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0])]:3===i?[s[0],s[1],s[2],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:i>=4?[s[0],s[1],s[2],s[3],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3]),\"\".concat(s[3],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:void 0}(s)),Fo[i]}(s.filter((function(s){return\"token\"!==s}))).reduce((function(s,i){return _objectSpread(_objectSpread({},s),u[i])}),i)}function createClassNameString(s){return s.join(\" \")}function createElement(s){var i=s.node,u=s.stylesheet,_=s.style,w=void 0===_?{}:_,x=s.useInlineStyles,j=s.key,P=i.properties,B=i.type,$=i.tagName,U=i.value;if(\"text\"===B)return U;if($){var Y,X=function createChildren(s,i){var u=0;return function(_){return u+=1,_.map((function(_,w){return createElement({node:_,stylesheet:s,useInlineStyles:i,key:\"code-segment-\".concat(u,\"-\").concat(w)})}))}}(u,x);if(x){var Z=Object.keys(u).reduce((function(s,i){return i.split(\".\").forEach((function(i){s.includes(i)||s.push(i)})),s}),[]),ee=P.className&&P.className.includes(\"token\")?[\"token\"]:[],ie=P.className&&ee.concat(P.className.filter((function(s){return!Z.includes(s)})));Y=_objectSpread(_objectSpread({},P),{},{className:createClassNameString(ie)||void 0,style:createStyleObject(P.className,Object.assign({},P.style,w),u)})}else Y=_objectSpread(_objectSpread({},P),{},{className:createClassNameString(P.className)});var ae=X(i.children);return We.createElement($,_extends({key:j},Y),ae)}}const checkForListedLanguage=function(s,i){return-1!==s.listLanguages().indexOf(i)};var qo=[\"language\",\"children\",\"style\",\"customStyle\",\"codeTagProps\",\"useInlineStyles\",\"showLineNumbers\",\"showInlineLineNumbers\",\"startingLineNumber\",\"lineNumberContainerStyle\",\"lineNumberStyle\",\"wrapLines\",\"wrapLongLines\",\"lineProps\",\"renderer\",\"PreTag\",\"CodeTag\",\"code\",\"astGenerator\"];function highlight_ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function highlight_objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?highlight_ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):highlight_ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}var $o=/\\n/g;function AllLineNumbers(s){var i=s.codeString,u=s.codeStyle,_=s.containerStyle,w=void 0===_?{float:\"left\",paddingRight:\"10px\"}:_,x=s.numberStyle,j=void 0===x?{}:x,P=s.startingLineNumber;return We.createElement(\"code\",{style:Object.assign({},u,w)},function getAllLineNumbers(s){var i=s.lines,u=s.startingLineNumber,_=s.style;return i.map((function(s,i){var w=i+u;return We.createElement(\"span\",{key:\"line-\".concat(i),className:\"react-syntax-highlighter-line-number\",style:\"function\"==typeof _?_(w):_},\"\".concat(w,\"\\n\"))}))}({lines:i.replace(/\\n$/,\"\").split(\"\\n\"),style:j,startingLineNumber:P}))}function getInlineLineNumber(s,i){return{type:\"element\",tagName:\"span\",properties:{key:\"line-number--\".concat(s),className:[\"comment\",\"linenumber\",\"react-syntax-highlighter-line-number\"],style:i},children:[{type:\"text\",value:s}]}}function assembleLineNumberStyles(s,i,u){var _,w={display:\"inline-block\",minWidth:(_=u,\"\".concat(_.toString().length,\".25em\")),paddingRight:\"1em\",textAlign:\"right\",userSelect:\"none\"},x=\"function\"==typeof s?s(i):s;return highlight_objectSpread(highlight_objectSpread({},w),x)}function createLineElement(s){var i=s.children,u=s.lineNumber,_=s.lineNumberStyle,w=s.largestLineNumber,x=s.showInlineLineNumbers,j=s.lineProps,P=void 0===j?{}:j,B=s.className,$=void 0===B?[]:B,U=s.showLineNumbers,Y=s.wrapLongLines,X=\"function\"==typeof P?P(u):P;if(X.className=$,u&&x){var Z=assembleLineNumberStyles(_,u,w);i.unshift(getInlineLineNumber(u,Z))}return Y&U&&(X.style=highlight_objectSpread(highlight_objectSpread({},X.style),{},{display:\"flex\"})),{type:\"element\",tagName:\"span\",properties:X,children:i}}function flattenCodeTree(s){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],_=0;_<s.length;_++){var w=s[_];if(\"text\"===w.type)u.push(createLineElement({children:[w],className:_toConsumableArray(new Set(i))}));else if(w.children){var x=i.concat(w.properties.className);flattenCodeTree(w.children,x).forEach((function(s){return u.push(s)}))}}return u}function processLines(s,i,u,_,w,x,j,P,B){var $,U=flattenCodeTree(s.value),Y=[],X=-1,Z=0;function createLine(s,x){var $=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return i||$.length>0?function createWrappedLine(s,i){return createLineElement({children:s,lineNumber:i,lineNumberStyle:P,largestLineNumber:j,showInlineLineNumbers:w,lineProps:u,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:_,wrapLongLines:B})}(s,x,$):function createUnwrappedLine(s,i){if(_&&i&&w){var u=assembleLineNumberStyles(P,i,j);s.unshift(getInlineLineNumber(i,u))}return s}(s,x)}for(var ee=function _loop(){var s=U[Z],i=s.children[0].value,u=function getNewLines(s){return s.match($o)}(i);if(u){var w=i.split(\"\\n\");w.forEach((function(i,u){var j=_&&Y.length+x,P={type:\"text\",value:\"\".concat(i,\"\\n\")};if(0===u){var B=createLine(U.slice(X+1,Z).concat(createLineElement({children:[P],className:s.properties.className})),j);Y.push(B)}else if(u===w.length-1){var $=U[Z+1]&&U[Z+1].children&&U[Z+1].children[0],ee={type:\"text\",value:\"\".concat(i)};if($){var ie=createLineElement({children:[ee],className:s.properties.className});U.splice(Z+1,0,ie)}else{var ae=createLine([ee],j,s.properties.className);Y.push(ae)}}else{var le=createLine([P],j,s.properties.className);Y.push(le)}})),X=Z}Z++};Z<U.length;)ee();if(X!==U.length-1){var ie=U.slice(X+1,U.length);if(ie&&ie.length){var ae=createLine(ie,_&&Y.length+x);Y.push(ae)}}return i?Y:($=[]).concat.apply($,Y)}function defaultRenderer(s){var i=s.rows,u=s.stylesheet,_=s.useInlineStyles;return i.map((function(s,i){return createElement({node:s,stylesheet:u,useInlineStyles:_,key:\"code-segement\".concat(i)})}))}function isHighlightJs(s){return s&&void 0!==s.highlightAuto}var Uo=__webpack_require__(43768),zo=function highlight(s,i){return function SyntaxHighlighter(u){var _=u.language,w=u.children,x=u.style,j=void 0===x?i:x,P=u.customStyle,B=void 0===P?{}:P,$=u.codeTagProps,U=void 0===$?{className:_?\"language-\".concat(_):void 0,style:highlight_objectSpread(highlight_objectSpread({},j['code[class*=\"language-\"]']),j['code[class*=\"language-'.concat(_,'\"]')])}:$,Y=u.useInlineStyles,X=void 0===Y||Y,Z=u.showLineNumbers,ee=void 0!==Z&&Z,ie=u.showInlineLineNumbers,ae=void 0===ie||ie,le=u.startingLineNumber,ce=void 0===le?1:le,pe=u.lineNumberContainerStyle,de=u.lineNumberStyle,fe=void 0===de?{}:de,ye=u.wrapLines,be=u.wrapLongLines,_e=void 0!==be&&be,we=u.lineProps,Se=void 0===we?{}:we,xe=u.renderer,Pe=u.PreTag,Te=void 0===Pe?\"pre\":Pe,Re=u.CodeTag,qe=void 0===Re?\"code\":Re,$e=u.code,ze=void 0===$e?(Array.isArray(w)?w[0]:w)||\"\":$e,He=u.astGenerator,Ye=_objectWithoutProperties(u,qo);He=He||s;var Xe=ee?We.createElement(AllLineNumbers,{containerStyle:pe,codeStyle:U.style||{},numberStyle:fe,startingLineNumber:ce,codeString:ze}):null,Qe=j.hljs||j['pre[class*=\"language-\"]']||{backgroundColor:\"#fff\"},et=isHighlightJs(He)?\"hljs\":\"prismjs\",tt=X?Object.assign({},Ye,{style:Object.assign({},Qe,B)}):Object.assign({},Ye,{className:Ye.className?\"\".concat(et,\" \").concat(Ye.className):et,style:Object.assign({},B)});if(U.style=highlight_objectSpread(highlight_objectSpread({},U.style),{},_e?{whiteSpace:\"pre-wrap\"}:{whiteSpace:\"pre\"}),!He)return We.createElement(Te,tt,Xe,We.createElement(qe,U,ze));(void 0===ye&&xe||_e)&&(ye=!0),xe=xe||defaultRenderer;var rt=[{type:\"text\",value:ze}],nt=function getCodeTree(s){var i=s.astGenerator,u=s.language,_=s.code,w=s.defaultCodeValue;if(isHighlightJs(i)){var x=checkForListedLanguage(i,u);return\"text\"===u?{value:w,language:\"text\"}:x?i.highlight(u,_):i.highlightAuto(_)}try{return u&&\"text\"!==u?{value:i.highlight(_,u)}:{value:w}}catch(s){return{value:w}}}({astGenerator:He,language:_,code:ze,defaultCodeValue:rt});null===nt.language&&(nt.value=rt);var ot=processLines(nt,ye,Se,ee,ae,ce,nt.value.length+ce,fe,_e);return We.createElement(Te,tt,We.createElement(qe,U,!ae&&Xe,xe({rows:ot,stylesheet:j,useInlineStyles:X})))}}(Uo,{});zo.registerLanguage=Uo.registerLanguage;const Vo=zo;var Wo=__webpack_require__(95089);const Ko=__webpack_require__.n(Wo)();var Ho=__webpack_require__(65772);const Jo=__webpack_require__.n(Ho)();var Go=__webpack_require__(17285);const Yo=__webpack_require__.n(Go)();var Xo=__webpack_require__(35344);const Qo=__webpack_require__.n(Xo)();var Zo=__webpack_require__(17533);const es=__webpack_require__.n(Zo)();var ts=__webpack_require__(73402);const rs=__webpack_require__.n(ts)();var ns=__webpack_require__(26571);const os=__webpack_require__.n(ns)(),ss={hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#333\",color:\"white\"},\"hljs-name\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-code\":{fontStyle:\"italic\",color:\"#888\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-tag\":{color:\"#62c8f3\"},\"hljs-variable\":{color:\"#ade5fc\"},\"hljs-template-variable\":{color:\"#ade5fc\"},\"hljs-selector-id\":{color:\"#ade5fc\"},\"hljs-selector-class\":{color:\"#ade5fc\"},\"hljs-string\":{color:\"#a2fca2\"},\"hljs-bullet\":{color:\"#d36363\"},\"hljs-type\":{color:\"#ffa\"},\"hljs-title\":{color:\"#ffa\"},\"hljs-section\":{color:\"#ffa\"},\"hljs-attribute\":{color:\"#ffa\"},\"hljs-quote\":{color:\"#ffa\"},\"hljs-built_in\":{color:\"#ffa\"},\"hljs-builtin-name\":{color:\"#ffa\"},\"hljs-number\":{color:\"#d36363\"},\"hljs-symbol\":{color:\"#d36363\"},\"hljs-keyword\":{color:\"#fcc28c\"},\"hljs-selector-tag\":{color:\"#fcc28c\"},\"hljs-literal\":{color:\"#fcc28c\"},\"hljs-comment\":{color:\"#888\"},\"hljs-deletion\":{color:\"#333\",backgroundColor:\"#fc9b9b\"},\"hljs-regexp\":{color:\"#c6b4f0\"},\"hljs-link\":{color:\"#c6b4f0\"},\"hljs-meta\":{color:\"#fc9b9b\"},\"hljs-addition\":{backgroundColor:\"#a2fca2\",color:\"#333\"}};Vo.registerLanguage(\"json\",Jo),Vo.registerLanguage(\"js\",Ko),Vo.registerLanguage(\"xml\",Yo),Vo.registerLanguage(\"yaml\",es),Vo.registerLanguage(\"http\",rs),Vo.registerLanguage(\"bash\",Qo),Vo.registerLanguage(\"powershell\",os),Vo.registerLanguage(\"javascript\",Ko);const as={agate:ss,arta:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#222\",color:\"#aaa\"},\"hljs-subst\":{color:\"#aaa\"},\"hljs-section\":{color:\"#fff\",fontWeight:\"bold\"},\"hljs-comment\":{color:\"#444\"},\"hljs-quote\":{color:\"#444\"},\"hljs-meta\":{color:\"#444\"},\"hljs-string\":{color:\"#ffcc33\"},\"hljs-symbol\":{color:\"#ffcc33\"},\"hljs-bullet\":{color:\"#ffcc33\"},\"hljs-regexp\":{color:\"#ffcc33\"},\"hljs-number\":{color:\"#00cc66\"},\"hljs-addition\":{color:\"#00cc66\"},\"hljs-built_in\":{color:\"#32aaee\"},\"hljs-builtin-name\":{color:\"#32aaee\"},\"hljs-literal\":{color:\"#32aaee\"},\"hljs-type\":{color:\"#32aaee\"},\"hljs-template-variable\":{color:\"#32aaee\"},\"hljs-attribute\":{color:\"#32aaee\"},\"hljs-link\":{color:\"#32aaee\"},\"hljs-keyword\":{color:\"#6644aa\"},\"hljs-selector-tag\":{color:\"#6644aa\"},\"hljs-name\":{color:\"#6644aa\"},\"hljs-selector-id\":{color:\"#6644aa\"},\"hljs-selector-class\":{color:\"#6644aa\"},\"hljs-title\":{color:\"#bb1166\"},\"hljs-variable\":{color:\"#bb1166\"},\"hljs-deletion\":{color:\"#bb1166\"},\"hljs-template-tag\":{color:\"#bb1166\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-emphasis\":{fontStyle:\"italic\"}},monokai:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#272822\",color:\"#ddd\"},\"hljs-tag\":{color:\"#f92672\"},\"hljs-keyword\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-strong\":{color:\"#f92672\"},\"hljs-name\":{color:\"#f92672\"},\"hljs-code\":{color:\"#66d9ef\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-attribute\":{color:\"#bf79db\"},\"hljs-symbol\":{color:\"#bf79db\"},\"hljs-regexp\":{color:\"#bf79db\"},\"hljs-link\":{color:\"#bf79db\"},\"hljs-string\":{color:\"#a6e22e\"},\"hljs-bullet\":{color:\"#a6e22e\"},\"hljs-subst\":{color:\"#a6e22e\"},\"hljs-title\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-section\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-emphasis\":{color:\"#a6e22e\"},\"hljs-type\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#a6e22e\"},\"hljs-builtin-name\":{color:\"#a6e22e\"},\"hljs-selector-attr\":{color:\"#a6e22e\"},\"hljs-selector-pseudo\":{color:\"#a6e22e\"},\"hljs-addition\":{color:\"#a6e22e\"},\"hljs-variable\":{color:\"#a6e22e\"},\"hljs-template-tag\":{color:\"#a6e22e\"},\"hljs-template-variable\":{color:\"#a6e22e\"},\"hljs-comment\":{color:\"#75715e\"},\"hljs-quote\":{color:\"#75715e\"},\"hljs-deletion\":{color:\"#75715e\"},\"hljs-meta\":{color:\"#75715e\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-selector-id\":{fontWeight:\"bold\"}},nord:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#2E3440\",color:\"#D8DEE9\"},\"hljs-subst\":{color:\"#D8DEE9\"},\"hljs-selector-tag\":{color:\"#81A1C1\"},\"hljs-selector-id\":{color:\"#8FBCBB\",fontWeight:\"bold\"},\"hljs-selector-class\":{color:\"#8FBCBB\"},\"hljs-selector-attr\":{color:\"#8FBCBB\"},\"hljs-selector-pseudo\":{color:\"#88C0D0\"},\"hljs-addition\":{backgroundColor:\"rgba(163, 190, 140, 0.5)\"},\"hljs-deletion\":{backgroundColor:\"rgba(191, 97, 106, 0.5)\"},\"hljs-built_in\":{color:\"#8FBCBB\"},\"hljs-type\":{color:\"#8FBCBB\"},\"hljs-class\":{color:\"#8FBCBB\"},\"hljs-function\":{color:\"#88C0D0\"},\"hljs-function > .hljs-title\":{color:\"#88C0D0\"},\"hljs-keyword\":{color:\"#81A1C1\"},\"hljs-literal\":{color:\"#81A1C1\"},\"hljs-symbol\":{color:\"#81A1C1\"},\"hljs-number\":{color:\"#B48EAD\"},\"hljs-regexp\":{color:\"#EBCB8B\"},\"hljs-string\":{color:\"#A3BE8C\"},\"hljs-title\":{color:\"#8FBCBB\"},\"hljs-params\":{color:\"#D8DEE9\"},\"hljs-bullet\":{color:\"#81A1C1\"},\"hljs-code\":{color:\"#8FBCBB\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-formula\":{color:\"#8FBCBB\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-link:hover\":{textDecoration:\"underline\"},\"hljs-quote\":{color:\"#4C566A\"},\"hljs-comment\":{color:\"#4C566A\"},\"hljs-doctag\":{color:\"#8FBCBB\"},\"hljs-meta\":{color:\"#5E81AC\"},\"hljs-meta-keyword\":{color:\"#5E81AC\"},\"hljs-meta-string\":{color:\"#A3BE8C\"},\"hljs-attr\":{color:\"#8FBCBB\"},\"hljs-attribute\":{color:\"#D8DEE9\"},\"hljs-builtin-name\":{color:\"#81A1C1\"},\"hljs-name\":{color:\"#81A1C1\"},\"hljs-section\":{color:\"#88C0D0\"},\"hljs-tag\":{color:\"#81A1C1\"},\"hljs-variable\":{color:\"#D8DEE9\"},\"hljs-template-variable\":{color:\"#D8DEE9\"},\"hljs-template-tag\":{color:\"#5E81AC\"},\"abnf .hljs-attribute\":{color:\"#88C0D0\"},\"abnf .hljs-symbol\":{color:\"#EBCB8B\"},\"apache .hljs-attribute\":{color:\"#88C0D0\"},\"apache .hljs-section\":{color:\"#81A1C1\"},\"arduino .hljs-built_in\":{color:\"#88C0D0\"},\"aspectj .hljs-meta\":{color:\"#D08770\"},\"aspectj > .hljs-title\":{color:\"#88C0D0\"},\"bnf .hljs-attribute\":{color:\"#8FBCBB\"},\"clojure .hljs-name\":{color:\"#88C0D0\"},\"clojure .hljs-symbol\":{color:\"#EBCB8B\"},\"coq .hljs-built_in\":{color:\"#88C0D0\"},\"cpp .hljs-meta-string\":{color:\"#8FBCBB\"},\"css .hljs-built_in\":{color:\"#88C0D0\"},\"css .hljs-keyword\":{color:\"#D08770\"},\"diff .hljs-meta\":{color:\"#8FBCBB\"},\"ebnf .hljs-attribute\":{color:\"#8FBCBB\"},\"glsl .hljs-built_in\":{color:\"#88C0D0\"},\"groovy .hljs-meta:not(:first-child)\":{color:\"#D08770\"},\"haxe .hljs-meta\":{color:\"#D08770\"},\"java .hljs-meta\":{color:\"#D08770\"},\"ldif .hljs-attribute\":{color:\"#8FBCBB\"},\"lisp .hljs-name\":{color:\"#88C0D0\"},\"lua .hljs-built_in\":{color:\"#88C0D0\"},\"moonscript .hljs-built_in\":{color:\"#88C0D0\"},\"nginx .hljs-attribute\":{color:\"#88C0D0\"},\"nginx .hljs-section\":{color:\"#5E81AC\"},\"pf .hljs-built_in\":{color:\"#88C0D0\"},\"processing .hljs-built_in\":{color:\"#88C0D0\"},\"scss .hljs-keyword\":{color:\"#81A1C1\"},\"stylus .hljs-keyword\":{color:\"#81A1C1\"},\"swift .hljs-meta\":{color:\"#D08770\"},\"vim .hljs-built_in\":{color:\"#88C0D0\",fontStyle:\"italic\"},\"yaml .hljs-meta\":{color:\"#D08770\"}},obsidian:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#282b2e\",color:\"#e0e2e4\"},\"hljs-keyword\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-id\":{color:\"#93c763\"},\"hljs-number\":{color:\"#ffcd22\"},\"hljs-attribute\":{color:\"#668bb0\"},\"hljs-code\":{color:\"white\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-section\":{color:\"white\",fontWeight:\"bold\"},\"hljs-regexp\":{color:\"#d39745\"},\"hljs-link\":{color:\"#d39745\"},\"hljs-meta\":{color:\"#557182\"},\"hljs-tag\":{color:\"#8cbbad\"},\"hljs-name\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-bullet\":{color:\"#8cbbad\"},\"hljs-subst\":{color:\"#8cbbad\"},\"hljs-emphasis\":{color:\"#8cbbad\"},\"hljs-type\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#8cbbad\"},\"hljs-selector-attr\":{color:\"#8cbbad\"},\"hljs-selector-pseudo\":{color:\"#8cbbad\"},\"hljs-addition\":{color:\"#8cbbad\"},\"hljs-variable\":{color:\"#8cbbad\"},\"hljs-template-tag\":{color:\"#8cbbad\"},\"hljs-template-variable\":{color:\"#8cbbad\"},\"hljs-string\":{color:\"#ec7600\"},\"hljs-symbol\":{color:\"#ec7600\"},\"hljs-comment\":{color:\"#818e96\"},\"hljs-quote\":{color:\"#818e96\"},\"hljs-deletion\":{color:\"#818e96\"},\"hljs-selector-class\":{color:\"#A082BD\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-title\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"}},\"tomorrow-night\":{\"hljs-comment\":{color:\"#969896\"},\"hljs-quote\":{color:\"#969896\"},\"hljs-variable\":{color:\"#cc6666\"},\"hljs-template-variable\":{color:\"#cc6666\"},\"hljs-tag\":{color:\"#cc6666\"},\"hljs-name\":{color:\"#cc6666\"},\"hljs-selector-id\":{color:\"#cc6666\"},\"hljs-selector-class\":{color:\"#cc6666\"},\"hljs-regexp\":{color:\"#cc6666\"},\"hljs-deletion\":{color:\"#cc6666\"},\"hljs-number\":{color:\"#de935f\"},\"hljs-built_in\":{color:\"#de935f\"},\"hljs-builtin-name\":{color:\"#de935f\"},\"hljs-literal\":{color:\"#de935f\"},\"hljs-type\":{color:\"#de935f\"},\"hljs-params\":{color:\"#de935f\"},\"hljs-meta\":{color:\"#de935f\"},\"hljs-link\":{color:\"#de935f\"},\"hljs-attribute\":{color:\"#f0c674\"},\"hljs-string\":{color:\"#b5bd68\"},\"hljs-symbol\":{color:\"#b5bd68\"},\"hljs-bullet\":{color:\"#b5bd68\"},\"hljs-addition\":{color:\"#b5bd68\"},\"hljs-title\":{color:\"#81a2be\"},\"hljs-section\":{color:\"#81a2be\"},\"hljs-keyword\":{color:\"#b294bb\"},\"hljs-selector-tag\":{color:\"#b294bb\"},hljs:{display:\"block\",overflowX:\"auto\",background:\"#1d1f21\",color:\"#c5c8c6\",padding:\"0.5em\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}},idea:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",color:\"#000\",background:\"#fff\"},\"hljs-subst\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-title\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-comment\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-quote\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-meta\":{color:\"#808000\"},\"hljs-tag\":{background:\"#efefef\"},\"hljs-section\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-name\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-literal\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-keyword\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-tag\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-type\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-id\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-class\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-attribute\":{fontWeight:\"bold\",color:\"#0000ff\"},\"hljs-number\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-regexp\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-link\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-string\":{color:\"#008000\",fontWeight:\"bold\"},\"hljs-symbol\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-bullet\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-formula\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-doctag\":{textDecoration:\"underline\"},\"hljs-variable\":{color:\"#660e7a\"},\"hljs-template-variable\":{color:\"#660e7a\"},\"hljs-addition\":{background:\"#baeeba\"},\"hljs-deletion\":{background:\"#ffc8bd\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}}},ls=Object.keys(as),getStyle=s=>ls.includes(s)?as[s]:(console.warn(`Request style '${s}' is not available, returning default instead`),ss),cs={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},us={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:s,requestSnippetsSelectors:i,getConfigs:u,getComponent:_})=>{const w=St()(u)?u():null,x=!1!==Eo()(w,\"syntaxHighlight\")&&Eo()(w,\"syntaxHighlight.activated\",!0),j=(0,We.useRef)(null),P=_(\"ArrowUpIcon\"),B=_(\"ArrowDownIcon\"),[$,U]=(0,We.useState)(i.getSnippetGenerators()?.keySeq().first()),[Y,X]=(0,We.useState)(i?.getDefaultExpanded());(0,We.useEffect)((()=>{}),[]),(0,We.useEffect)((()=>{const s=Array.from(j.current.childNodes).filter((s=>!!s.nodeType&&s.classList?.contains(\"curl-command\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s]);const Z=i.getSnippetGenerators(),ee=Z.get($),ie=ee.get(\"fn\")(s),handleSetIsExpanded=()=>{X(!Y)},handleGetBtnStyle=s=>s===$?us:cs,handlePreventYScrollingBeyondElement=s=>{const{target:i,deltaY:u}=s,{scrollHeight:_,offsetHeight:w,scrollTop:x}=i;_>w&&(0===x&&u<0||w+x>=_&&u>0)&&s.preventDefault()},ae=x?We.createElement(Vo,{language:ee.get(\"syntax\"),className:\"curl microlight\",style:getStyle(Eo()(w,\"syntaxHighlight.theme\"))},ie):We.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:ie});return We.createElement(\"div\",{className:\"request-snippets\",ref:j},We.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},We.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),We.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:Y?\"Collapse operation\":\"Expand operation\"},Y?We.createElement(B,{className:\"arrow\",width:\"10\",height:\"10\"}):We.createElement(P,{className:\"arrow\",width:\"10\",height:\"10\"}))),Y&&We.createElement(\"div\",{className:\"curl-command\"},We.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},Z.entrySeq().map((([s,i])=>We.createElement(\"div\",{style:handleGetBtnStyle(s),className:\"btn\",key:s,onClick:()=>(s=>{$!==s&&U(s)})(s)},We.createElement(\"h4\",{style:s===$?{color:\"white\"}:{}},i.get(\"title\")))))),We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Lo.CopyToClipboard,{text:ie},We.createElement(\"button\",null))),We.createElement(\"div\",null,ae)))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:Z,statePlugins:{requestSnippets:{selectors:ee}}});var ps=__webpack_require__(19123),hs=__webpack_require__.n(ps),ds=__webpack_require__(41859),fs=__webpack_require__.n(ds),ms=__webpack_require__(62193),gs=__webpack_require__.n(ms);const shallowArrayEquals=s=>i=>Array.isArray(s)&&Array.isArray(i)&&s.length===i.length&&s.every(((s,u)=>s===i[u])),list=(...s)=>s;class Cache extends Map{delete(s){const i=Array.from(this.keys()).find(shallowArrayEquals(s));return super.delete(i)}get(s){const i=Array.from(this.keys()).find(shallowArrayEquals(s));return super.get(i)}has(s){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(s))}}const utils_memoizeN=(s,i=list)=>{const{Cache:u}=mt();mt().Cache=Cache;const _=mt()(s,i);return mt().Cache=u,_},ys={string:s=>s.pattern?(s=>{try{return new(fs())(s).gen()}catch(s){return\"string\"}})(s.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:s=>\"boolean\"!=typeof s.default||s.default},primitive=s=>{s=objectify(s);let{type:i,format:u}=s,_=ys[`${i}_${u}`]||ys[i];return isFunc(_)?_(s):\"Unknown Type: \"+s.type},sanitizeRef=s=>deeplyStripKey(s,\"$$ref\",(s=>\"string\"==typeof s&&s.indexOf(\"#\")>-1)),vs=[\"maxProperties\",\"minProperties\"],bs=[\"minItems\",\"maxItems\"],_s=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],Es=[\"minLength\",\"maxLength\"],liftSampleHelper=(s,i,u={})=>{if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...vs,...bs,..._s,...Es].forEach((u=>(u=>{void 0===i[u]&&void 0!==s[u]&&(i[u]=s[u])})(u))),void 0!==s.required&&Array.isArray(s.required)&&(void 0!==i.required&&i.required.length||(i.required=[]),s.required.forEach((s=>{i.required.includes(s)||i.required.push(s)}))),s.properties){i.properties||(i.properties={});let _=objectify(s.properties);for(let w in _)Object.prototype.hasOwnProperty.call(_,w)&&(_[w]&&_[w].deprecated||_[w]&&_[w].readOnly&&!u.includeReadOnly||_[w]&&_[w].writeOnly&&!u.includeWriteOnly||i.properties[w]||(i.properties[w]=_[w],!s.required&&Array.isArray(s.required)&&-1!==s.required.indexOf(w)&&(i.required?i.required.push(w):i.required=[w])))}return s.items&&(i.items||(i.items={}),i.items=liftSampleHelper(s.items,i.items,u)),i},sampleFromSchemaGeneric=(s,i={},u=void 0,_=!1)=>{s&&isFunc(s.toJS)&&(s=s.toJS());let w=void 0!==u||s&&void 0!==s.example||s&&void 0!==s.default;const x=!w&&s&&s.oneOf&&s.oneOf.length>0,j=!w&&s&&s.anyOf&&s.anyOf.length>0;if(!w&&(x||j)){const u=objectify(x?s.oneOf[0]:s.anyOf[0]);if(liftSampleHelper(u,s,i),!s.xml&&u.xml&&(s.xml=u.xml),void 0!==s.example&&void 0!==u.example)w=!0;else if(u.properties){s.properties||(s.properties={});let _=objectify(u.properties);for(let w in _)Object.prototype.hasOwnProperty.call(_,w)&&(_[w]&&_[w].deprecated||_[w]&&_[w].readOnly&&!i.includeReadOnly||_[w]&&_[w].writeOnly&&!i.includeWriteOnly||s.properties[w]||(s.properties[w]=_[w],!u.required&&Array.isArray(u.required)&&-1!==u.required.indexOf(w)&&(s.required?s.required.push(w):s.required=[w])))}}const P={};let{xml:B,type:$,example:U,properties:Y,additionalProperties:X,items:Z}=s||{},{includeReadOnly:ee,includeWriteOnly:ie}=i;B=B||{};let ae,{name:le,prefix:ce,namespace:pe}=B,de={};if(_&&(le=le||\"notagname\",ae=(ce?ce+\":\":\"\")+le,pe)){P[ce?\"xmlns:\"+ce:\"xmlns\"]=pe}_&&(de[ae]=[]);const schemaHasAny=i=>i.some((i=>Object.prototype.hasOwnProperty.call(s,i)));s&&!$&&(Y||X||schemaHasAny(vs)?$=\"object\":Z||schemaHasAny(bs)?$=\"array\":schemaHasAny(_s)?($=\"number\",s.type=\"number\"):w||s.enum||($=\"string\",s.type=\"string\"));const handleMinMaxItems=i=>{if(null!=s?.maxItems&&(i=i.slice(0,s?.maxItems)),null!=s?.minItems){let u=0;for(;i.length<s?.minItems;)i.push(i[u++%i.length])}return i},fe=objectify(Y);let ye,be=0;const hasExceededMaxProperties=()=>s&&null!==s.maxProperties&&void 0!==s.maxProperties&&be>=s.maxProperties,canAddProperty=i=>!s||null===s.maxProperties||void 0===s.maxProperties||!hasExceededMaxProperties()&&(!(i=>!(s&&s.required&&s.required.length&&s.required.includes(i)))(i)||s.maxProperties-be-(()=>{if(!s||!s.required)return 0;let i=0;return _?s.required.forEach((s=>i+=void 0===de[s]?0:1)):s.required.forEach((s=>i+=void 0===de[ae]?.find((i=>void 0!==i[s]))?0:1)),s.required.length-i})()>0);if(ye=_?(u,w=void 0)=>{if(s&&fe[u]){if(fe[u].xml=fe[u].xml||{},fe[u].xml.attribute){const s=Array.isArray(fe[u].enum)?fe[u].enum[0]:void 0,i=fe[u].example,_=fe[u].default;return void(P[fe[u].xml.name||u]=void 0!==i?i:void 0!==_?_:void 0!==s?s:primitive(fe[u]))}fe[u].xml.name=fe[u].xml.name||u}else fe[u]||!1===X||(fe[u]={xml:{name:u}});let x=sampleFromSchemaGeneric(s&&fe[u]||void 0,i,w,_);canAddProperty(u)&&(be++,Array.isArray(x)?de[ae]=de[ae].concat(x):de[ae].push(x))}:(u,w)=>{if(canAddProperty(u)){if(Object.prototype.hasOwnProperty.call(s,\"discriminator\")&&s.discriminator&&Object.prototype.hasOwnProperty.call(s.discriminator,\"mapping\")&&s.discriminator.mapping&&Object.prototype.hasOwnProperty.call(s,\"$$ref\")&&s.$$ref&&s.discriminator.propertyName===u){for(let i in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[i])){de[u]=i;break}}else de[u]=sampleFromSchemaGeneric(fe[u],i,w,_);be++}},w){let w;if(w=sanitizeRef(void 0!==u?u:void 0!==U?U:s.default),!_){if(\"number\"==typeof w&&\"string\"===$)return`${w}`;if(\"string\"!=typeof w||\"string\"===$)return w;try{return JSON.parse(w)}catch(s){return w}}if(s||($=Array.isArray(w)?\"array\":typeof w),\"array\"===$){if(!Array.isArray(w)){if(\"string\"==typeof w)return w;w=[w]}const u=s?s.items:void 0;u&&(u.xml=u.xml||B||{},u.xml.name=u.xml.name||B.name);let x=w.map((s=>sampleFromSchemaGeneric(u,i,s,_)));return x=handleMinMaxItems(x),B.wrapped?(de[ae]=x,gs()(P)||de[ae].push({_attr:P})):de=x,de}if(\"object\"===$){if(\"string\"==typeof w)return w;for(let i in w)Object.prototype.hasOwnProperty.call(w,i)&&(s&&fe[i]&&fe[i].readOnly&&!ee||s&&fe[i]&&fe[i].writeOnly&&!ie||(s&&fe[i]&&fe[i].xml&&fe[i].xml.attribute?P[fe[i].xml.name||i]=w[i]:ye(i,w[i])));return gs()(P)||de[ae].push({_attr:P}),de}return de[ae]=gs()(P)?w:[{_attr:P},w],de}if(\"object\"===$){for(let s in fe)Object.prototype.hasOwnProperty.call(fe,s)&&(fe[s]&&fe[s].deprecated||fe[s]&&fe[s].readOnly&&!ee||fe[s]&&fe[s].writeOnly&&!ie||ye(s));if(_&&P&&de[ae].push({_attr:P}),hasExceededMaxProperties())return de;if(!0===X)_?de[ae].push({additionalProp:\"Anything can be here\"}):de.additionalProp1={},be++;else if(X){const u=objectify(X),w=sampleFromSchemaGeneric(u,i,void 0,_);if(_&&u.xml&&u.xml.name&&\"notagname\"!==u.xml.name)de[ae].push(w);else{const i=null!==s.minProperties&&void 0!==s.minProperties&&be<s.minProperties?s.minProperties-be:3;for(let s=1;s<=i;s++){if(hasExceededMaxProperties())return de;if(_){const i={};i[\"additionalProp\"+s]=w.notagname,de[ae].push(i)}else de[\"additionalProp\"+s]=w;be++}}}return de}if(\"array\"===$){if(!Z)return;let u;if(_&&(Z.xml=Z.xml||s?.xml||{},Z.xml.name=Z.xml.name||B.name),Array.isArray(Z.anyOf))u=Z.anyOf.map((s=>sampleFromSchemaGeneric(liftSampleHelper(Z,s,i),i,void 0,_)));else if(Array.isArray(Z.oneOf))u=Z.oneOf.map((s=>sampleFromSchemaGeneric(liftSampleHelper(Z,s,i),i,void 0,_)));else{if(!(!_||_&&B.wrapped))return sampleFromSchemaGeneric(Z,i,void 0,_);u=[sampleFromSchemaGeneric(Z,i,void 0,_)]}return u=handleMinMaxItems(u),_&&B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P}),de):u}let _e;if(s&&Array.isArray(s.enum))_e=normalizeArray(s.enum)[0];else{if(!s)return;if(_e=primitive(s),\"number\"==typeof _e){let i=s.minimum;null!=i&&(s.exclusiveMinimum&&i++,_e=i);let u=s.maximum;null!=u&&(s.exclusiveMaximum&&u--,_e=u)}if(\"string\"==typeof _e&&(null!==s.maxLength&&void 0!==s.maxLength&&(_e=_e.slice(0,s.maxLength)),null!==s.minLength&&void 0!==s.minLength)){let i=0;for(;_e.length<s.minLength;)_e+=_e[i++%_e.length]}}if(\"file\"!==$)return _?(de[ae]=gs()(P)?_e:[{_attr:P},_e],de):_e},inferSchema=s=>(s.schema&&(s=s.schema),s.properties&&(s.type=\"object\"),s),createXMLExample=(s,i,u)=>{const _=sampleFromSchemaGeneric(s,i,u,!0);if(_)return\"string\"==typeof _?_:hs()(_,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(s,i,u)=>sampleFromSchemaGeneric(s,i,u,!1),resolver=(s,i,u)=>[s,JSON.stringify(i),JSON.stringify(u)],ws=utils_memoizeN(createXMLExample,resolver),Ss=utils_memoizeN(sampleFromSchema,resolver),xs=[{when:/json/,shouldStringifyTypes:[\"string\"]}],ks=[\"object\"],get_json_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.memoizedSampleFromSchema(i,u,w),P=typeof j,B=xs.reduce(((s,i)=>i.when.test(_)?[...s,...i.shouldStringifyTypes]:s),ks);return bt()(B,(s=>s===P))?JSON.stringify(j,null,2):j},get_yaml_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.getJsonSampleSchema(i,u,_,w);let P;try{P=so.dump(so.load(j),{lineWidth:-1},{schema:Jn}),\"\\n\"===P[P.length-1]&&(P=P.slice(0,P.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return P.replace(/\\t/g,\"  \")},get_xml_sample_schema=s=>(i,u,_)=>{const{fn:w}=s();if(i&&!i.xml&&(i.xml={}),i&&!i.xml.name){if(!i.$$ref&&(i.type||i.items||i.properties||i.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(i.$$ref){let s=i.$$ref.match(/\\S*\\/(\\S+)$/);i.xml.name=s[1]}}return w.memoizedCreateXMLExample(i,u,_)},get_sample_schema=s=>(i,u=\"\",_={},w=void 0)=>{const{fn:x}=s();return\"function\"==typeof i?.toJS&&(i=i.toJS()),\"function\"==typeof w?.toJS&&(w=w.toJS()),/xml/.test(u)?x.getXmlSampleSchema(i,_,w):/(yaml|yml)/.test(u)?x.getYamlSampleSchema(i,_,u,w):x.getJsonSampleSchema(i,_,u,w)},json_schema_5_samples=({getSystem:s})=>{const i=get_json_sample_schema(s),u=get_yaml_sample_schema(s),_=get_xml_sample_schema(s),w=get_sample_schema(s);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Ss,memoizedCreateXMLExample:ws,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Ss,memoizedCreateXMLExample:ws,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w}}};var Os=__webpack_require__(37334),Cs=__webpack_require__.n(Os);const As=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=s=>s||(0,Xe.Map)(),js=Gt(spec_selectors_state,(s=>s.get(\"lastError\"))),Ps=Gt(spec_selectors_state,(s=>s.get(\"url\"))),Is=Gt(spec_selectors_state,(s=>s.get(\"spec\")||\"\")),Ns=Gt(spec_selectors_state,(s=>s.get(\"specSource\")||\"not-editor\")),Ms=Gt(spec_selectors_state,(s=>s.get(\"json\",(0,Xe.Map)()))),Ts=Gt(Ms,(s=>s.toJS())),Rs=Gt(spec_selectors_state,(s=>s.get(\"resolved\",(0,Xe.Map)()))),specResolvedSubtree=(s,i)=>s.getIn([\"resolvedSubtrees\",...i],void 0),mergerFn=(s,i)=>Xe.Map.isMap(s)&&Xe.Map.isMap(i)?i.get(\"$$ref\")?i:(0,Xe.OrderedMap)().mergeWith(mergerFn,s,i):i,Ds=Gt(spec_selectors_state,(s=>(0,Xe.OrderedMap)().mergeWith(mergerFn,s.get(\"json\"),s.get(\"resolvedSubtrees\")))),spec=s=>Ms(s),Bs=Gt(spec,(()=>!1)),Ls=Gt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"info\")))),Fs=Gt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"externalDocs\")))),qs=Gt(Ls,(s=>s&&s.get(\"version\"))),$s=Gt(qs,(s=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(s).slice(1))),Us=Gt(Ds,(s=>s.get(\"paths\"))),zs=Cs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),Vs=Gt(Us,(s=>{if(!s||s.size<1)return(0,Xe.List)();let i=(0,Xe.List)();return s&&s.forEach?(s.forEach(((s,u)=>{if(!s||!s.forEach)return{};s.forEach(((s,_)=>{As.indexOf(_)<0||(i=i.push((0,Xe.fromJS)({path:u,method:_,operation:s,id:`${_}-${u}`})))}))})),i):(0,Xe.List)()})),Ws=Gt(spec,(s=>(0,Xe.Set)(s.get(\"consumes\")))),Ks=Gt(spec,(s=>(0,Xe.Set)(s.get(\"produces\")))),Hs=Gt(spec,(s=>s.get(\"security\",(0,Xe.List)()))),Js=Gt(spec,(s=>s.get(\"securityDefinitions\"))),findDefinition=(s,i)=>{const u=s.getIn([\"resolvedSubtrees\",\"definitions\",i],null),_=s.getIn([\"json\",\"definitions\",i],null);return u||_||null},Gs=Gt(spec,(s=>{const i=s.get(\"definitions\");return Xe.Map.isMap(i)?i:(0,Xe.Map)()})),Ys=Gt(spec,(s=>s.get(\"basePath\"))),Xs=Gt(spec,(s=>s.get(\"host\"))),Qs=Gt(spec,(s=>s.get(\"schemes\",(0,Xe.Map)()))),Zs=Gt([Vs,Ws,Ks],((s,i,u)=>s.map((s=>s.update(\"operation\",(s=>{if(s){if(!Xe.Map.isMap(s))return;return s.withMutations((s=>(s.get(\"consumes\")||s.update(\"consumes\",(s=>(0,Xe.Set)(s).merge(i))),s.get(\"produces\")||s.update(\"produces\",(s=>(0,Xe.Set)(s).merge(u))),s)))}return(0,Xe.Map)()})))))),ai=Gt(spec,(s=>{const i=s.get(\"tags\",(0,Xe.List)());return Xe.List.isList(i)?i.filter((s=>Xe.Map.isMap(s))):(0,Xe.List)()})),tagDetails=(s,i)=>(ai(s)||(0,Xe.List)()).filter(Xe.Map.isMap).find((s=>s.get(\"name\")===i),(0,Xe.Map)()),_i=Gt(Zs,ai,((s,i)=>s.reduce(((s,i)=>{let u=(0,Xe.Set)(i.getIn([\"operation\",\"tags\"]));return u.count()<1?s.update(\"default\",(0,Xe.List)(),(s=>s.push(i))):u.reduce(((s,u)=>s.update(u,(0,Xe.List)(),(s=>s.push(i)))),s)}),i.reduce(((s,i)=>s.set(i.get(\"name\"),(0,Xe.List)())),(0,Xe.OrderedMap)())))),selectors_taggedOperations=s=>({getConfigs:i})=>{let{tagsSorter:u,operationsSorter:_}=i();return _i(s).sortBy(((s,i)=>i),((s,i)=>{let _=\"function\"==typeof u?u:Tt.tagsSorter[u];return _?_(s,i):null})).map(((i,u)=>{let w=\"function\"==typeof _?_:Tt.operationsSorter[_],x=w?i.sort(w):i;return(0,Xe.Map)({tagDetails:tagDetails(s,u),operations:x})}))},Si=Gt(spec_selectors_state,(s=>s.get(\"responses\",(0,Xe.Map)()))),Pi=Gt(spec_selectors_state,(s=>s.get(\"requests\",(0,Xe.Map)()))),Ni=Gt(spec_selectors_state,(s=>s.get(\"mutatedRequests\",(0,Xe.Map)()))),responseFor=(s,i,u)=>Si(s).getIn([i,u],null),requestFor=(s,i,u)=>Pi(s).getIn([i,u],null),mutatedRequestFor=(s,i,u)=>Ni(s).getIn([i,u],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(s,i,u)=>{const _=Ds(s).getIn([\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)()),w=s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)());return _.map((s=>{const i=w.get(`${u.get(\"in\")}.${u.get(\"name\")}`),_=w.get(`${u.get(\"in\")}.${u.get(\"name\")}.hash-${u.hashCode()}`);return(0,Xe.OrderedMap)().merge(s,i,_)})).find((s=>s.get(\"in\")===u.get(\"in\")&&s.get(\"name\")===u.get(\"name\")),(0,Xe.OrderedMap)())},parameterInclusionSettingFor=(s,i,u,_)=>{const w=`${_}.${u}`;return s.getIn([\"meta\",\"paths\",...i,\"parameter_inclusions\",w],!1)},parameterWithMeta=(s,i,u,_)=>{const w=Ds(s).getIn([\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)()).find((s=>s.get(\"in\")===_&&s.get(\"name\")===u),(0,Xe.OrderedMap)());return parameterWithMetaByIdentity(s,i,w)},operationWithMeta=(s,i,u)=>{const _=Ds(s).getIn([\"paths\",i,u],(0,Xe.OrderedMap)()),w=s.getIn([\"meta\",\"paths\",i,u],(0,Xe.OrderedMap)()),x=_.get(\"parameters\",(0,Xe.List)()).map((_=>parameterWithMetaByIdentity(s,[i,u],_)));return(0,Xe.OrderedMap)().merge(_,w).set(\"parameters\",x)};function getParameter(s,i,u,_){return i=i||[],s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([])).find((s=>Xe.Map.isMap(s)&&s.get(\"name\")===u&&s.get(\"in\")===_))||(0,Xe.Map)()}const Xi=Gt(spec,(s=>{const i=s.get(\"host\");return\"string\"==typeof i&&i.length>0&&\"/\"!==i[0]}));function parameterValues(s,i,u){return i=i||[],operationWithMeta(s,...i).get(\"parameters\",(0,Xe.List)()).reduce(((s,i)=>{let _=u&&\"body\"===i.get(\"in\")?i.get(\"value_xml\"):i.get(\"value\");return Xe.List.isList(_)&&(_=_.filter((s=>\"\"!==s))),s.set(paramToIdentifier(i,{allowHashes:!1}),_)}),(0,Xe.fromJS)({}))}function parametersIncludeIn(s,i=\"\"){if(Xe.List.isList(s))return s.some((s=>Xe.Map.isMap(s)&&s.get(\"in\")===i))}function parametersIncludeType(s,i=\"\"){if(Xe.List.isList(s))return s.some((s=>Xe.Map.isMap(s)&&s.get(\"type\")===i))}function contentTypeValues(s,i){i=i||[];let u=Ds(s).getIn([\"paths\",...i],(0,Xe.fromJS)({})),_=s.getIn([\"meta\",\"paths\",...i],(0,Xe.fromJS)({})),w=currentProducesFor(s,i);const x=u.get(\"parameters\")||new Xe.List,j=_.get(\"consumes_value\")?_.get(\"consumes_value\"):parametersIncludeType(x,\"file\")?\"multipart/form-data\":parametersIncludeType(x,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,Xe.fromJS)({requestContentType:j,responseContentType:w})}function currentProducesFor(s,i){i=i||[];const u=Ds(s).getIn([\"paths\",...i],null);if(null===u)return;const _=s.getIn([\"meta\",\"paths\",...i,\"produces_value\"],null),w=u.getIn([\"produces\",0],null);return _||w||\"application/json\"}function producesOptionsFor(s,i){i=i||[];const u=Ds(s),_=u.getIn([\"paths\",...i],null);if(null===_)return;const[w]=i,x=_.get(\"produces\",null),j=u.getIn([\"paths\",w,\"produces\"],null),P=u.getIn([\"produces\"],null);return x||j||P}function consumesOptionsFor(s,i){i=i||[];const u=Ds(s),_=u.getIn([\"paths\",...i],null);if(null===_)return;const[w]=i,x=_.get(\"consumes\",null),j=u.getIn([\"paths\",w,\"consumes\"],null),P=u.getIn([\"consumes\"],null);return x||j||P}const operationScheme=(s,i,u)=>{let _=s.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),w=Array.isArray(_)?_[1]:null;return s.getIn([\"scheme\",i,u])||s.getIn([\"scheme\",\"_defaultScheme\"])||w||\"\"},canExecuteScheme=(s,i,u)=>[\"http\",\"https\"].indexOf(operationScheme(s,i,u))>-1,validationErrors=(s,i)=>{i=i||[];let u=s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([]));const _=[];return u.forEach((s=>{let i=s.get(\"errors\");i&&i.count()&&i.map((s=>Xe.Map.isMap(s)?`${s.get(\"propKey\")}: ${s.get(\"error\")}`:s)).forEach((s=>_.push(s)))})),_},validateBeforeExecute=(s,i)=>0===validationErrors(s,i).length,getOAS3RequiredRequestBodyContentType=(s,i)=>{let u={requestBody:!1,requestContentType:{}},_=s.getIn([\"resolvedSubtrees\",\"paths\",...i,\"requestBody\"],(0,Xe.fromJS)([]));return _.size<1||(_.getIn([\"required\"])&&(u.requestBody=_.getIn([\"required\"])),_.getIn([\"content\"]).entrySeq().forEach((s=>{const i=s[0];if(s[1].getIn([\"schema\",\"required\"])){const _=s[1].getIn([\"schema\",\"required\"]).toJS();u.requestContentType[i]=_}}))),u},isMediaTypeSchemaPropertiesEqual=(s,i,u,_)=>{if((u||_)&&u===_)return!0;let w=s.getIn([\"resolvedSubtrees\",\"paths\",...i,\"requestBody\",\"content\"],(0,Xe.fromJS)([]));if(w.size<2||!u||!_)return!1;let x=w.getIn([u,\"schema\",\"properties\"],(0,Xe.fromJS)([])),j=w.getIn([_,\"schema\",\"properties\"],(0,Xe.fromJS)([]));return!!x.equals(j)};function returnSelfOrNewMap(s){return Xe.Map.isMap(s)?s:new Xe.Map}var Qi=__webpack_require__(85015),ea=__webpack_require__.n(Qi),ra=__webpack_require__(38221),na=__webpack_require__.n(ra),ia=__webpack_require__(63560),aa=__webpack_require__.n(ia),la=__webpack_require__(56367),ca=__webpack_require__.n(la);const ua=\"spec_update_spec\",da=\"spec_update_url\",ma=\"spec_update_json\",ga=\"spec_update_param\",ya=\"spec_update_empty_param_inclusion\",va=\"spec_validate_param\",ba=\"spec_set_response\",_a=\"spec_set_request\",Ea=\"spec_set_mutated_request\",wa=\"spec_log_request\",xa=\"spec_clear_response\",ka=\"spec_clear_request\",Ca=\"spec_clear_validate_param\",Aa=\"spec_update_operation_meta_value\",ja=\"spec_update_resolved\",Ia=\"spec_update_resolved_subtree\",Na=\"set_scheme\",toStr=s=>ea()(s)?s:\"\";function updateSpec(s){const i=toStr(s).replace(/\\t/g,\"  \");if(\"string\"==typeof s)return{type:ua,payload:i}}function updateResolved(s){return{type:ja,payload:s}}function updateUrl(s){return{type:da,payload:s}}function updateJsonSpec(s){return{type:ma,payload:s}}const parseToJson=s=>({specActions:i,specSelectors:u,errActions:_})=>{let{specStr:w}=u,x=null;try{s=s||w(),_.clear({source:\"parser\"}),x=so.load(s,{schema:Jn})}catch(s){return console.error(s),_.newSpecErr({source:\"parser\",level:\"error\",message:s.reason,line:s.mark&&s.mark.line?s.mark.line+1:void 0})}return x&&\"object\"==typeof x?i.updateJsonSpec(x):{}};let Da=!1;const resolveSpec=(s,i)=>({specActions:u,specSelectors:_,errActions:w,fn:{fetch:x,resolve:j,AST:P={}},getConfigs:B})=>{Da||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),Da=!0);const{modelPropertyMacro:$,parameterMacro:U,requestInterceptor:Y,responseInterceptor:X}=B();void 0===s&&(s=_.specJson()),void 0===i&&(i=_.url());let Z=P.getLineNumberForPath?P.getLineNumberForPath:()=>{},ee=_.specStr();return j({fetch:x,spec:s,baseDoc:String(new URL(i,document.baseURI)),modelPropertyMacro:$,parameterMacro:U,requestInterceptor:Y,responseInterceptor:X}).then((({spec:s,errors:i})=>{if(w.clear({type:\"thrown\"}),Array.isArray(i)&&i.length>0){let s=i.map((s=>(console.error(s),s.line=s.fullPath?Z(ee,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));w.newThrownErrBatch(s)}return u.updateResolved(s)}))};let Ba=[];const La=na()((()=>{const s=Ba.reduce(((s,{path:i,system:u})=>(s.has(u)||s.set(u,[]),s.get(u).push(i),s)),new Map);Ba=[],s.forEach((async(s,i)=>{if(!i)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!i.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:u,errSelectors:_,fn:{resolveSubtree:w,fetch:x,AST:j={}},specSelectors:P,specActions:B}=i,$=j.getLineNumberForPath??Cs()(void 0),U=P.specStr(),{modelPropertyMacro:Y,parameterMacro:X,requestInterceptor:Z,responseInterceptor:ee}=i.getConfigs();try{const i=await s.reduce((async(s,i)=>{let{resultMap:j,specWithCurrentSubtrees:B}=await s;const{errors:ie,spec:ae}=await w(B,i,{baseDoc:String(new URL(P.url(),document.baseURI)),modelPropertyMacro:Y,parameterMacro:X,requestInterceptor:Z,responseInterceptor:ee});if(_.allErrors().size&&u.clearBy((s=>\"thrown\"!==s.get(\"type\")||\"resolver\"!==s.get(\"source\")||!s.get(\"fullPath\").every(((s,u)=>s===i[u]||void 0===i[u])))),Array.isArray(ie)&&ie.length>0){let s=ie.map((s=>(s.line=s.fullPath?$(U,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));u.newThrownErrBatch(s)}return ae&&P.isOAS3()&&\"components\"===i[0]&&\"securitySchemes\"===i[1]&&await Promise.all(Object.values(ae).filter((s=>\"openIdConnect\"===s.type)).map((async s=>{const i={url:s.openIdConnectUrl,requestInterceptor:Z,responseInterceptor:ee};try{const u=await x(i);u instanceof Error||u.status>=400?console.error(u.statusText+\" \"+i.url):s.openIdConnectData=JSON.parse(u.text)}catch(s){console.error(s)}}))),aa()(j,i,ae),B=ca()(i,ae,B),{resultMap:j,specWithCurrentSubtrees:B}}),Promise.resolve({resultMap:(P.specResolvedSubtree([])||(0,Xe.Map)()).toJS(),specWithCurrentSubtrees:P.specJS()}));B.updateResolvedSubtree([],i.resultMap)}catch(s){console.error(s)}}))}),35),requestResolvedSubtree=s=>i=>{Ba.find((({path:u,system:_})=>_===i&&u.toString()===s.toString()))||(Ba.push({path:s,system:i}),La())};function changeParam(s,i,u,_,w){return{type:ga,payload:{path:s,value:_,paramName:i,paramIn:u,isXml:w}}}function changeParamByIdentity(s,i,u,_){return{type:ga,payload:{path:s,param:i,value:u,isXml:_}}}const updateResolvedSubtree=(s,i)=>({type:Ia,payload:{path:s,value:i}}),invalidateResolvedSubtreeCache=()=>({type:Ia,payload:{path:[],value:(0,Xe.Map)()}}),validateParams=(s,i)=>({type:va,payload:{pathMethod:s,isOAS3:i}}),updateEmptyParamInclusion=(s,i,u,_)=>({type:ya,payload:{pathMethod:s,paramName:i,paramIn:u,includeEmptyValue:_}});function clearValidateParams(s){return{type:Ca,payload:{pathMethod:s}}}function changeConsumesValue(s,i){return{type:Aa,payload:{path:s,value:i,key:\"consumes_value\"}}}function changeProducesValue(s,i){return{type:Aa,payload:{path:s,value:i,key:\"produces_value\"}}}const setResponse=(s,i,u)=>({payload:{path:s,method:i,res:u},type:ba}),setRequest=(s,i,u)=>({payload:{path:s,method:i,req:u},type:_a}),setMutatedRequest=(s,i,u)=>({payload:{path:s,method:i,req:u},type:Ea}),logRequest=s=>({payload:s,type:wa}),executeRequest=s=>({fn:i,specActions:u,specSelectors:_,getConfigs:w,oas3Selectors:x})=>{let{pathName:j,method:P,operation:B}=s,{requestInterceptor:$,responseInterceptor:U}=w(),Y=B.toJS();if(B&&B.get(\"parameters\")&&B.get(\"parameters\").filter((s=>s&&!0===s.get(\"allowEmptyValue\"))).forEach((i=>{if(_.parameterInclusionSettingFor([j,P],i.get(\"name\"),i.get(\"in\"))){s.parameters=s.parameters||{};const u=paramToValue(i,s.parameters);(!u||u&&0===u.size)&&(s.parameters[i.get(\"name\")]=\"\")}})),s.contextUrl=Dt()(_.url()).toString(),Y&&Y.operationId?s.operationId=Y.operationId:Y&&j&&P&&(s.operationId=i.opId(Y,j,P)),_.isOAS3()){const i=`${j}:${P}`;s.server=x.selectedServer(i)||x.selectedServer();const u=x.serverVariables({server:s.server,namespace:i}).toJS(),_=x.serverVariables({server:s.server}).toJS();s.serverVariables=Object.keys(u).length?u:_,s.requestContentType=x.requestContentType(j,P),s.responseContentType=x.responseContentType(j,P)||\"*/*\";const w=x.requestBodyValue(j,P),B=x.requestBodyInclusionSetting(j,P);w&&w.toJS?s.requestBody=w.map((s=>Xe.Map.isMap(s)?s.get(\"value\"):s)).filter(((s,i)=>(Array.isArray(s)?0!==s.length:!isEmptyValue(s))||B.get(i))).toJS():s.requestBody=w}let X=Object.assign({},s);X=i.buildRequest(X),u.setRequest(s.pathName,s.method,X);s.requestInterceptor=async i=>{let _=await $.apply(void 0,[i]),w=Object.assign({},_);return u.setMutatedRequest(s.pathName,s.method,w),_},s.responseInterceptor=U;const Z=Date.now();return i.execute(s).then((i=>{i.duration=Date.now()-Z,u.setResponse(s.pathName,s.method,i)})).catch((i=>{\"Failed to fetch\"===i.message&&(i.name=\"\",i.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),u.setResponse(s.pathName,s.method,{error:!0,err:i})}))},actions_execute=({path:s,method:i,...u}={})=>_=>{let{fn:{fetch:w},specSelectors:x,specActions:j}=_,P=x.specJsonWithResolvedSubtrees().toJS(),B=x.operationScheme(s,i),{requestContentType:$,responseContentType:U}=x.contentTypeValues([s,i]).toJS(),Y=/xml/i.test($),X=x.parameterValues([s,i],Y).toJS();return j.executeRequest({...u,fetch:w,spec:P,pathName:s,method:i,parameters:X,requestContentType:$,scheme:B,responseContentType:U})};function clearResponse(s,i){return{type:xa,payload:{path:s,method:i}}}function clearRequest(s,i){return{type:ka,payload:{path:s,method:i}}}function setScheme(s,i,u){return{type:Na,payload:{scheme:s,path:i,method:u}}}const Fa={[ua]:(s,i)=>\"string\"==typeof i.payload?s.set(\"spec\",i.payload):s,[da]:(s,i)=>s.set(\"url\",i.payload+\"\"),[ma]:(s,i)=>s.set(\"json\",fromJSOrdered(i.payload)),[ja]:(s,i)=>s.setIn([\"resolved\"],fromJSOrdered(i.payload)),[Ia]:(s,i)=>{const{value:u,path:_}=i.payload;return s.setIn([\"resolvedSubtrees\",..._],fromJSOrdered(u))},[ga]:(s,{payload:i})=>{let{path:u,paramName:_,paramIn:w,param:x,value:j,isXml:P}=i,B=x?paramToIdentifier(x):`${w}.${_}`;const $=P?\"value_xml\":\"value\";return s.setIn([\"meta\",\"paths\",...u,\"parameters\",B,$],(0,Xe.fromJS)(j))},[ya]:(s,{payload:i})=>{let{pathMethod:u,paramName:_,paramIn:w,includeEmptyValue:x}=i;if(!_||!w)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),s;const j=`${w}.${_}`;return s.setIn([\"meta\",\"paths\",...u,\"parameter_inclusions\",j],x)},[va]:(s,{payload:{pathMethod:i,isOAS3:u}})=>{const _=Ds(s).getIn([\"paths\",...i]),w=parameterValues(s,i).toJS();return s.updateIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)({}),(x=>_.get(\"parameters\",(0,Xe.List)()).reduce(((_,x)=>{const j=paramToValue(x,w),P=parameterInclusionSettingFor(s,i,x.get(\"name\"),x.get(\"in\")),B=((s,i,{isOAS3:u=!1,bypassRequiredCheck:_=!1}={})=>{let w=s.get(\"required\"),{schema:x,parameterContentMediaType:j}=getParameterSchema(s,{isOAS3:u});return validateValueBySchema(i,x,w,_,j)})(x,j,{bypassRequiredCheck:P,isOAS3:u});return _.setIn([paramToIdentifier(x),\"errors\"],(0,Xe.fromJS)(B))}),x)))},[Ca]:(s,{payload:{pathMethod:i}})=>s.updateIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([]),(s=>s.map((s=>s.set(\"errors\",(0,Xe.fromJS)([])))))),[ba]:(s,{payload:{res:i,path:u,method:_}})=>{let w;w=i.error?Object.assign({error:!0,name:i.err.name,message:i.err.message,statusCode:i.err.statusCode},i.err.response):i,w.headers=w.headers||{};let x=s.setIn([\"responses\",u,_],fromJSOrdered(w));return pt.Blob&&w.data instanceof pt.Blob&&(x=x.setIn([\"responses\",u,_,\"text\"],w.data)),x},[_a]:(s,{payload:{req:i,path:u,method:_}})=>s.setIn([\"requests\",u,_],fromJSOrdered(i)),[Ea]:(s,{payload:{req:i,path:u,method:_}})=>s.setIn([\"mutatedRequests\",u,_],fromJSOrdered(i)),[Aa]:(s,{payload:{path:i,value:u,key:_}})=>{let w=[\"paths\",...i],x=[\"meta\",\"paths\",...i];return s.getIn([\"json\",...w])||s.getIn([\"resolved\",...w])||s.getIn([\"resolvedSubtrees\",...w])?s.setIn([...x,_],(0,Xe.fromJS)(u)):s},[xa]:(s,{payload:{path:i,method:u}})=>s.deleteIn([\"responses\",i,u]),[ka]:(s,{payload:{path:i,method:u}})=>s.deleteIn([\"requests\",i,u]),[Na]:(s,{payload:{scheme:i,path:u,method:_}})=>u&&_?s.setIn([\"scheme\",u,_],i):u||_?void 0:s.setIn([\"scheme\",\"_defaultScheme\"],i)},wrap_actions_updateSpec=(s,{specActions:i})=>(...u)=>{s(...u),i.parseToJson(...u)},wrap_actions_updateJsonSpec=(s,{specActions:i})=>(...u)=>{s(...u),i.invalidateResolvedSubtreeCache();const[_]=u,w=Eo()(_,[\"paths\"])||{};Object.keys(w).forEach((s=>{Eo()(w,[s]).$ref&&i.requestResolvedSubtree([\"paths\",s])})),i.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(s,{specActions:i})=>u=>(i.logRequest(u),s(u)),wrap_actions_validateParams=(s,{specSelectors:i})=>u=>s(u,i.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...le},reducers:{...Fa},actions:{...ae},selectors:{...ie}}}});var $a=function(){var extendStatics=function(s,i){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var u in i)i.hasOwnProperty(u)&&(s[u]=i[u])},extendStatics(s,i)};return function(s,i){function __(){this.constructor=s}extendStatics(s,i),s.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}}(),za=Object.prototype.hasOwnProperty;function module_helpers_hasOwnProperty(s,i){return za.call(s,i)}function _objectKeys(s){if(Array.isArray(s)){for(var i=new Array(s.length),u=0;u<i.length;u++)i[u]=\"\"+u;return i}if(Object.keys)return Object.keys(s);var _=[];for(var w in s)module_helpers_hasOwnProperty(s,w)&&_.push(w);return _}function _deepClone(s){switch(typeof s){case\"object\":return JSON.parse(JSON.stringify(s));case\"undefined\":return null;default:return s}}function helpers_isInteger(s){for(var i,u=0,_=s.length;u<_;){if(!((i=s.charCodeAt(u))>=48&&i<=57))return!1;u++}return!0}function escapePathComponent(s){return-1===s.indexOf(\"/\")&&-1===s.indexOf(\"~\")?s:s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function unescapePathComponent(s){return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}function hasUndefined(s){if(void 0===s)return!0;if(s)if(Array.isArray(s)){for(var i=0,u=s.length;i<u;i++)if(hasUndefined(s[i]))return!0}else if(\"object\"==typeof s)for(var _=_objectKeys(s),w=_.length,x=0;x<w;x++)if(hasUndefined(s[_[x]]))return!0;return!1}function patchErrorMessageFormatter(s,i){var u=[s];for(var _ in i){var w=\"object\"==typeof i[_]?JSON.stringify(i[_],null,2):i[_];void 0!==w&&u.push(_+\": \"+w)}return u.join(\"\\n\")}var Ha=function(s){function PatchError(i,u,_,w,x){var j=this.constructor,P=s.call(this,patchErrorMessageFormatter(i,{name:u,index:_,operation:w,tree:x}))||this;return P.name=u,P.index=_,P.operation=w,P.tree=x,Object.setPrototypeOf(P,j.prototype),P.message=patchErrorMessageFormatter(i,{name:u,index:_,operation:w,tree:x}),P}return $a(PatchError,s),PatchError}(Error),Ja=Ha,Ga=_deepClone,tl={add:function(s,i,u){return s[i]=this.value,{newDocument:u}},remove:function(s,i,u){var _=s[i];return delete s[i],{newDocument:u,removed:_}},replace:function(s,i,u){var _=s[i];return s[i]=this.value,{newDocument:u,removed:_}},move:function(s,i,u){var _=getValueByPointer(u,this.path);_&&(_=_deepClone(_));var w=applyOperation(u,{op:\"remove\",path:this.from}).removed;return applyOperation(u,{op:\"add\",path:this.path,value:w}),{newDocument:u,removed:_}},copy:function(s,i,u){var _=getValueByPointer(u,this.from);return applyOperation(u,{op:\"add\",path:this.path,value:_deepClone(_)}),{newDocument:u}},test:function(s,i,u){return{newDocument:u,test:_areEquals(s[i],this.value)}},_get:function(s,i,u){return this.value=s[i],{newDocument:u}}},ll={add:function(s,i,u){return helpers_isInteger(i)?s.splice(i,0,this.value):s[i]=this.value,{newDocument:u,index:i}},remove:function(s,i,u){return{newDocument:u,removed:s.splice(i,1)[0]}},replace:function(s,i,u){var _=s[i];return s[i]=this.value,{newDocument:u,removed:_}},move:tl.move,copy:tl.copy,test:tl.test,_get:tl._get};function getValueByPointer(s,i){if(\"\"==i)return s;var u={op:\"_get\",path:i};return applyOperation(s,u),u.value}function applyOperation(s,i,u,_,w,x){if(void 0===u&&(u=!1),void 0===_&&(_=!0),void 0===w&&(w=!0),void 0===x&&(x=0),u&&(\"function\"==typeof u?u(i,0,s,i.path):validator(i,0)),\"\"===i.path){var j={newDocument:s};if(\"add\"===i.op)return j.newDocument=i.value,j;if(\"replace\"===i.op)return j.newDocument=i.value,j.removed=s,j;if(\"move\"===i.op||\"copy\"===i.op)return j.newDocument=getValueByPointer(s,i.from),\"move\"===i.op&&(j.removed=s),j;if(\"test\"===i.op){if(j.test=_areEquals(s,i.value),!1===j.test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j.newDocument=s,j}if(\"remove\"===i.op)return j.removed=s,j.newDocument=null,j;if(\"_get\"===i.op)return i.value=s,j;if(u)throw new Ja(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",x,i,s);return j}_||(s=_deepClone(s));var P=(i.path||\"\").split(\"/\"),B=s,$=1,U=P.length,Y=void 0,X=void 0,Z=void 0;for(Z=\"function\"==typeof u?u:validator;;){if((X=P[$])&&-1!=X.indexOf(\"~\")&&(X=unescapePathComponent(X)),w&&(\"__proto__\"==X||\"prototype\"==X&&$>0&&\"constructor\"==P[$-1]))throw new TypeError(\"JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README\");if(u&&void 0===Y&&(void 0===B[X]?Y=P.slice(0,$).join(\"/\"):$==U-1&&(Y=i.path),void 0!==Y&&Z(i,0,s,Y)),$++,Array.isArray(B)){if(\"-\"===X)X=B.length;else{if(u&&!helpers_isInteger(X))throw new Ja(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\",\"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\",x,i,s);helpers_isInteger(X)&&(X=~~X)}if($>=U){if(u&&\"add\"===i.op&&X>B.length)throw new Ja(\"The specified index MUST NOT be greater than the number of elements in the array\",\"OPERATION_VALUE_OUT_OF_BOUNDS\",x,i,s);if(!1===(j=ll[i.op].call(i,B,X,s)).test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j}}else if($>=U){if(!1===(j=tl[i.op].call(i,B,X,s)).test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j}if(B=B[X],u&&$<U&&(!B||\"object\"!=typeof B))throw new Ja(\"Cannot perform operation at the desired path\",\"OPERATION_PATH_UNRESOLVABLE\",x,i,s)}}function applyPatch(s,i,u,_,w){if(void 0===_&&(_=!0),void 0===w&&(w=!0),u&&!Array.isArray(i))throw new Ja(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");_||(s=_deepClone(s));for(var x=new Array(i.length),j=0,P=i.length;j<P;j++)x[j]=applyOperation(s,i[j],u,!0,w,j),s=x[j].newDocument;return x.newDocument=s,x}function applyReducer(s,i,u){var _=applyOperation(s,i);if(!1===_.test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",u,i,s);return _.newDocument}function validator(s,i,u,_){if(\"object\"!=typeof s||null===s||Array.isArray(s))throw new Ja(\"Operation is not an object\",\"OPERATION_NOT_AN_OBJECT\",i,s,u);if(!tl[s.op])throw new Ja(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",i,s,u);if(\"string\"!=typeof s.path)throw new Ja(\"Operation `path` property is not a string\",\"OPERATION_PATH_INVALID\",i,s,u);if(0!==s.path.indexOf(\"/\")&&s.path.length>0)throw new Ja('Operation `path` property must start with \"/\"',\"OPERATION_PATH_INVALID\",i,s,u);if((\"move\"===s.op||\"copy\"===s.op)&&\"string\"!=typeof s.from)throw new Ja(\"Operation `from` property is not present (applicable in `move` and `copy` operations)\",\"OPERATION_FROM_REQUIRED\",i,s,u);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&void 0===s.value)throw new Ja(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_REQUIRED\",i,s,u);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&hasUndefined(s.value))throw new Ja(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED\",i,s,u);if(u)if(\"add\"==s.op){var w=s.path.split(\"/\").length,x=_.split(\"/\").length;if(w!==x+1&&w!==x)throw new Ja(\"Cannot perform an `add` operation at the desired path\",\"OPERATION_PATH_CANNOT_ADD\",i,s,u)}else if(\"replace\"===s.op||\"remove\"===s.op||\"_get\"===s.op){if(s.path!==_)throw new Ja(\"Cannot perform the operation at a path that does not exist\",\"OPERATION_PATH_UNRESOLVABLE\",i,s,u)}else if(\"move\"===s.op||\"copy\"===s.op){var j=validate([{op:\"_get\",path:s.from,value:void 0}],u);if(j&&\"OPERATION_PATH_UNRESOLVABLE\"===j.name)throw new Ja(\"Cannot perform the operation from a path that does not exist\",\"OPERATION_FROM_UNRESOLVABLE\",i,s,u)}}function validate(s,i,u){try{if(!Array.isArray(s))throw new Ja(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");if(i)applyPatch(_deepClone(i),_deepClone(s),u||!0);else{u=u||validator;for(var _=0;_<s.length;_++)u(s[_],_,i,void 0)}}catch(s){if(s instanceof Ja)return s;throw s}}function _areEquals(s,i){if(s===i)return!0;if(s&&i&&\"object\"==typeof s&&\"object\"==typeof i){var u,_,w,x=Array.isArray(s),j=Array.isArray(i);if(x&&j){if((_=s.length)!=i.length)return!1;for(u=_;0!=u--;)if(!_areEquals(s[u],i[u]))return!1;return!0}if(x!=j)return!1;var P=Object.keys(s);if((_=P.length)!==Object.keys(i).length)return!1;for(u=_;0!=u--;)if(!i.hasOwnProperty(P[u]))return!1;for(u=_;0!=u--;)if(!_areEquals(s[w=P[u]],i[w]))return!1;return!0}return s!=s&&i!=i}var ul=new WeakMap,yl=function yl(s){this.observers=new Map,this.obj=s},vl=function vl(s,i){this.callback=s,this.observer=i};function unobserve(s,i){i.unobserve()}function observe(s,i){var u,_=function getMirror(s){return ul.get(s)}(s);if(_){var w=function getObserverFromMirror(s,i){return s.observers.get(i)}(_,i);u=w&&w.observer}else _=new yl(s),ul.set(s,_);if(u)return u;if(u={},_.value=_deepClone(s),i){u.callback=i,u.next=null;var dirtyCheck=function(){generate(u)},fastCheck=function(){clearTimeout(u.next),u.next=setTimeout(dirtyCheck)};\"undefined\"!=typeof window&&(window.addEventListener(\"mouseup\",fastCheck),window.addEventListener(\"keyup\",fastCheck),window.addEventListener(\"mousedown\",fastCheck),window.addEventListener(\"keydown\",fastCheck),window.addEventListener(\"change\",fastCheck))}return u.patches=[],u.object=s,u.unobserve=function(){generate(u),clearTimeout(u.next),function removeObserverFromMirror(s,i){s.observers.delete(i.callback)}(_,u),\"undefined\"!=typeof window&&(window.removeEventListener(\"mouseup\",fastCheck),window.removeEventListener(\"keyup\",fastCheck),window.removeEventListener(\"mousedown\",fastCheck),window.removeEventListener(\"keydown\",fastCheck),window.removeEventListener(\"change\",fastCheck))},_.observers.set(i,new vl(i,u)),u}function generate(s,i){void 0===i&&(i=!1);var u=ul.get(s.object);_generate(u.value,s.object,s.patches,\"\",i),s.patches.length&&applyPatch(u.value,s.patches);var _=s.patches;return _.length>0&&(s.patches=[],s.callback&&s.callback(_)),_}function _generate(s,i,u,_,w){if(i!==s){\"function\"==typeof i.toJSON&&(i=i.toJSON());for(var x=_objectKeys(i),j=_objectKeys(s),P=!1,B=j.length-1;B>=0;B--){var $=s[Y=j[B]];if(!module_helpers_hasOwnProperty(i,Y)||void 0===i[Y]&&void 0!==$&&!1===Array.isArray(i))Array.isArray(s)===Array.isArray(i)?(w&&u.push({op:\"test\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone($)}),u.push({op:\"remove\",path:_+\"/\"+escapePathComponent(Y)}),P=!0):(w&&u.push({op:\"test\",path:_,value:s}),u.push({op:\"replace\",path:_,value:i}),!0);else{var U=i[Y];\"object\"==typeof $&&null!=$&&\"object\"==typeof U&&null!=U&&Array.isArray($)===Array.isArray(U)?_generate($,U,u,_+\"/\"+escapePathComponent(Y),w):$!==U&&(!0,w&&u.push({op:\"test\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone($)}),u.push({op:\"replace\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone(U)}))}}if(P||x.length!=j.length)for(B=0;B<x.length;B++){var Y;module_helpers_hasOwnProperty(s,Y=x[B])||void 0===i[Y]||u.push({op:\"add\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone(i[Y])})}}}function compare(s,i,u){void 0===u&&(u=!1);var _=[];return _generate(s,i,_,\"\",u),_}Object.assign({},ce,pe,{JsonPatchError:Ha,deepClone:_deepClone,escapePathComponent,unescapePathComponent});var _l=__webpack_require__(14744),El=__webpack_require__.n(_l);const wl={add:function add(s,i){return{op:\"add\",path:s,value:i}},replace,remove:function remove(s){return{op:\"remove\",path:s}},merge:function lib_merge(s,i){return{type:\"mutation\",op:\"merge\",path:s,value:i}},mergeDeep:function mergeDeep(s,i){return{type:\"mutation\",op:\"mergeDeep\",path:s,value:i}},context:function context(s,i){return{type:\"context\",path:s,value:i}},getIn:function getIn(s,i){return i.reduce(((s,i)=>void 0!==i&&s?s[i]:s),s)},applyPatch:function lib_applyPatch(s,i,u){if(u=u||{},\"merge\"===(i={...i,path:i.path&&normalizeJSONPath(i.path)}).op){const u=getInByJsonPath(s,i.path);Object.assign(u,i.value),applyPatch(s,[replace(i.path,u)])}else if(\"mergeDeep\"===i.op){const u=getInByJsonPath(s,i.path),_=El()(u,i.value);s=applyPatch(s,[replace(i.path,_)]).newDocument}else if(\"add\"===i.op&&\"\"===i.path&&lib_isObject(i.value)){applyPatch(s,Object.keys(i.value).reduce(((s,u)=>(s.push({op:\"add\",path:`/${normalizeJSONPath(u)}`,value:i.value[u]}),s)),[]))}else if(\"replace\"===i.op&&\"\"===i.path){let{value:_}=i;u.allowMetaPatches&&i.meta&&isAdditiveMutation(i)&&(Array.isArray(i.value)||lib_isObject(i.value))&&(_={..._,...i.meta}),s=_}else if(applyPatch(s,[i]),u.allowMetaPatches&&i.meta&&isAdditiveMutation(i)&&(Array.isArray(i.value)||lib_isObject(i.value))){const u={...getInByJsonPath(s,i.path),...i.meta};applyPatch(s,[replace(i.path,u)])}return s},parentPathMatch:function parentPathMatch(s,i){if(!Array.isArray(i))return!1;for(let u=0,_=i.length;u<_;u+=1)if(i[u]!==s[u])return!1;return!0},flatten,fullyNormalizeArray:function fullyNormalizeArray(s){return cleanArray(flatten(lib_normalizeArray(s)))},normalizeArray:lib_normalizeArray,isPromise:function isPromise(s){return lib_isObject(s)&&lib_isFunction(s.then)},forEachNew:function forEachNew(s,i){try{return forEachNewPatch(s,forEach,i)}catch(s){return s}},forEachNewPrimitive:function forEachNewPrimitive(s,i){try{return forEachNewPatch(s,forEachPrimitive,i)}catch(s){return s}},isJsonPatch,isContextPatch:function isContextPatch(s){return isPatch(s)&&\"context\"===s.type},isPatch,isMutation,isAdditiveMutation,isGenerator:function isGenerator(s){return\"[object GeneratorFunction]\"===Object.prototype.toString.call(s)},isFunction:lib_isFunction,isObject:lib_isObject,isError:function lib_isError(s){return s instanceof Error}};function normalizeJSONPath(s){return Array.isArray(s)?s.length<1?\"\":`/${s.map((s=>(s+\"\").replace(/~/g,\"~0\").replace(/\\//g,\"~1\"))).join(\"/\")}`:s}function replace(s,i,u){return{op:\"replace\",path:s,value:i,meta:u}}function forEachNewPatch(s,i,u){return cleanArray(flatten(s.filter(isAdditiveMutation).map((s=>i(s.value,u,s.path)))||[]))}function forEachPrimitive(s,i,u){return u=u||[],Array.isArray(s)?s.map(((s,_)=>forEachPrimitive(s,i,u.concat(_)))):lib_isObject(s)?Object.keys(s).map((_=>forEachPrimitive(s[_],i,u.concat(_)))):i(s,u[u.length-1],u)}function forEach(s,i,u){let _=[];if((u=u||[]).length>0){const w=i(s,u[u.length-1],u);w&&(_=_.concat(w))}if(Array.isArray(s)){const w=s.map(((s,_)=>forEach(s,i,u.concat(_))));w&&(_=_.concat(w))}else if(lib_isObject(s)){const w=Object.keys(s).map((_=>forEach(s[_],i,u.concat(_))));w&&(_=_.concat(w))}return _=flatten(_),_}function lib_normalizeArray(s){return Array.isArray(s)?s:[s]}function flatten(s){return[].concat(...s.map((s=>Array.isArray(s)?flatten(s):s)))}function cleanArray(s){return s.filter((s=>void 0!==s))}function lib_isObject(s){return s&&\"object\"==typeof s}function lib_isFunction(s){return s&&\"function\"==typeof s}function isJsonPatch(s){if(isPatch(s)){const{op:i}=s;return\"add\"===i||\"remove\"===i||\"replace\"===i}return!1}function isMutation(s){return isJsonPatch(s)||isPatch(s)&&\"mutation\"===s.type}function isAdditiveMutation(s){return isMutation(s)&&(\"add\"===s.op||\"replace\"===s.op||\"merge\"===s.op||\"mergeDeep\"===s.op)}function isPatch(s){return s&&\"object\"==typeof s}function getInByJsonPath(s,i){try{return getValueByPointer(s,i)}catch(s){return console.error(s),{}}}var Sl=__webpack_require__(65606);function _isPlaceholder(s){return null!=s&&\"object\"==typeof s&&!0===s[\"@@functional/placeholder\"]}function _curry1(s){return function f1(i){return 0===arguments.length||_isPlaceholder(i)?f1:s.apply(this,arguments)}}function _curry2(s){return function f2(i,u){switch(arguments.length){case 0:return f2;case 1:return _isPlaceholder(i)?f2:_curry1((function(u){return s(i,u)}));default:return _isPlaceholder(i)&&_isPlaceholder(u)?f2:_isPlaceholder(i)?_curry1((function(i){return s(i,u)})):_isPlaceholder(u)?_curry1((function(u){return s(i,u)})):s(i,u)}}}function _curry3(s){return function f3(i,u,_){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(i)?f3:_curry2((function(u,_){return s(i,u,_)}));case 2:return _isPlaceholder(i)&&_isPlaceholder(u)?f3:_isPlaceholder(i)?_curry2((function(i,_){return s(i,u,_)})):_isPlaceholder(u)?_curry2((function(u,_){return s(i,u,_)})):_curry1((function(_){return s(i,u,_)}));default:return _isPlaceholder(i)&&_isPlaceholder(u)&&_isPlaceholder(_)?f3:_isPlaceholder(i)&&_isPlaceholder(u)?_curry2((function(i,u){return s(i,u,_)})):_isPlaceholder(i)&&_isPlaceholder(_)?_curry2((function(i,_){return s(i,u,_)})):_isPlaceholder(u)&&_isPlaceholder(_)?_curry2((function(u,_){return s(i,u,_)})):_isPlaceholder(i)?_curry1((function(i){return s(i,u,_)})):_isPlaceholder(u)?_curry1((function(u){return s(i,u,_)})):_isPlaceholder(_)?_curry1((function(_){return s(i,u,_)})):s(i,u,_)}}}const xl=Number.isInteger||function _isInteger(s){return s<<0===s};function _isString(s){return\"[object String]\"===Object.prototype.toString.call(s)}var Ol=_curry2((function nth(s,i){var u=s<0?i.length+s:s;return _isString(i)?i.charAt(u):i[u]}));const Cl=Ol;var Al=_curry2((function paths(s,i){return s.map((function(s){for(var u,_=i,w=0;w<s.length;){if(null==_)return;u=s[w],_=xl(u)?Cl(u,_):_[u],w+=1}return _}))}));const Pl=Al;const Il=_curry2((function path(s,i){return Pl([s],i)[0]}));const Nl=_curry3((function pathSatisfies(s,i,u){return s(Il(i,u))}));function _cloneRegExp(s){return new RegExp(s.source,s.flags?s.flags:(s.global?\"g\":\"\")+(s.ignoreCase?\"i\":\"\")+(s.multiline?\"m\":\"\")+(s.sticky?\"y\":\"\")+(s.unicode?\"u\":\"\")+(s.dotAll?\"s\":\"\"))}function _arrayFromIterator(s){for(var i,u=[];!(i=s.next()).done;)u.push(i.value);return u}function _includesWith(s,i,u){for(var _=0,w=u.length;_<w;){if(s(i,u[_]))return!0;_+=1}return!1}function _has(s,i){return Object.prototype.hasOwnProperty.call(i,s)}const Ml=\"function\"==typeof Object.is?Object.is:function _objectIs(s,i){return s===i?0!==s||1/s==1/i:s!=s&&i!=i};var Tl=Object.prototype.toString;const Rl=function(){return\"[object Arguments]\"===Tl.call(arguments)?function _isArguments(s){return\"[object Arguments]\"===Tl.call(s)}:function _isArguments(s){return _has(\"callee\",s)}}();var Dl=!{toString:null}.propertyIsEnumerable(\"toString\"),Bl=[\"constructor\",\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],Ll=function(){return arguments.propertyIsEnumerable(\"length\")}(),Fl=function contains(s,i){for(var u=0;u<s.length;){if(s[u]===i)return!0;u+=1}return!1},$l=\"function\"!=typeof Object.keys||Ll?_curry1((function keys(s){if(Object(s)!==s)return[];var i,u,_=[],w=Ll&&Rl(s);for(i in s)!_has(i,s)||w&&\"length\"===i||(_[_.length]=i);if(Dl)for(u=Bl.length-1;u>=0;)_has(i=Bl[u],s)&&!Fl(_,i)&&(_[_.length]=i),u-=1;return _})):_curry1((function keys(s){return Object(s)!==s?[]:Object.keys(s)}));const Ul=$l;const zl=_curry1((function type(s){return null===s?\"Null\":void 0===s?\"Undefined\":Object.prototype.toString.call(s).slice(8,-1)}));function _uniqContentEquals(s,i,u,_){var w=_arrayFromIterator(s);function eq(s,i){return _equals(s,i,u.slice(),_.slice())}return!_includesWith((function(s,i){return!_includesWith(eq,i,s)}),_arrayFromIterator(i),w)}function _equals(s,i,u,_){if(Ml(s,i))return!0;var w=zl(s);if(w!==zl(i))return!1;if(\"function\"==typeof s[\"fantasy-land/equals\"]||\"function\"==typeof i[\"fantasy-land/equals\"])return\"function\"==typeof s[\"fantasy-land/equals\"]&&s[\"fantasy-land/equals\"](i)&&\"function\"==typeof i[\"fantasy-land/equals\"]&&i[\"fantasy-land/equals\"](s);if(\"function\"==typeof s.equals||\"function\"==typeof i.equals)return\"function\"==typeof s.equals&&s.equals(i)&&\"function\"==typeof i.equals&&i.equals(s);switch(w){case\"Arguments\":case\"Array\":case\"Object\":if(\"function\"==typeof s.constructor&&\"Promise\"===function _functionName(s){var i=String(s).match(/^function (\\w*)/);return null==i?\"\":i[1]}(s.constructor))return s===i;break;case\"Boolean\":case\"Number\":case\"String\":if(typeof s!=typeof i||!Ml(s.valueOf(),i.valueOf()))return!1;break;case\"Date\":if(!Ml(s.valueOf(),i.valueOf()))return!1;break;case\"Error\":return s.name===i.name&&s.message===i.message;case\"RegExp\":if(s.source!==i.source||s.global!==i.global||s.ignoreCase!==i.ignoreCase||s.multiline!==i.multiline||s.sticky!==i.sticky||s.unicode!==i.unicode)return!1}for(var x=u.length-1;x>=0;){if(u[x]===s)return _[x]===i;x-=1}switch(w){case\"Map\":return s.size===i.size&&_uniqContentEquals(s.entries(),i.entries(),u.concat([s]),_.concat([i]));case\"Set\":return s.size===i.size&&_uniqContentEquals(s.values(),i.values(),u.concat([s]),_.concat([i]));case\"Arguments\":case\"Array\":case\"Object\":case\"Boolean\":case\"Number\":case\"String\":case\"Date\":case\"Error\":case\"RegExp\":case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"ArrayBuffer\":break;default:return!1}var j=Ul(s);if(j.length!==Ul(i).length)return!1;var P=u.concat([s]),B=_.concat([i]);for(x=j.length-1;x>=0;){var $=j[x];if(!_has($,i)||!_equals(i[$],s[$],P,B))return!1;x-=1}return!0}const Vl=_curry2((function equals(s,i){return _equals(s,i,[],[])}));function _includes(s,i){return function _indexOf(s,i,u){var _,w;if(\"function\"==typeof s.indexOf)switch(typeof i){case\"number\":if(0===i){for(_=1/i;u<s.length;){if(0===(w=s[u])&&1/w===_)return u;u+=1}return-1}if(i!=i){for(;u<s.length;){if(\"number\"==typeof(w=s[u])&&w!=w)return u;u+=1}return-1}return s.indexOf(i,u);case\"string\":case\"boolean\":case\"function\":case\"undefined\":return s.indexOf(i,u);case\"object\":if(null===i)return s.indexOf(i,u)}for(;u<s.length;){if(Vl(s[u],i))return u;u+=1}return-1}(i,s,0)>=0}function _map(s,i){for(var u=0,_=i.length,w=Array(_);u<_;)w[u]=s(i[u]),u+=1;return w}function _quote(s){return'\"'+s.replace(/\\\\/g,\"\\\\\\\\\").replace(/[\\b]/g,\"\\\\b\").replace(/\\f/g,\"\\\\f\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/\\t/g,\"\\\\t\").replace(/\\v/g,\"\\\\v\").replace(/\\0/g,\"\\\\0\").replace(/\"/g,'\\\\\"')+'\"'}var Wl=function pad(s){return(s<10?\"0\":\"\")+s};const Kl=\"function\"==typeof Date.prototype.toISOString?function _toISOString(s){return s.toISOString()}:function _toISOString(s){return s.getUTCFullYear()+\"-\"+Wl(s.getUTCMonth()+1)+\"-\"+Wl(s.getUTCDate())+\"T\"+Wl(s.getUTCHours())+\":\"+Wl(s.getUTCMinutes())+\":\"+Wl(s.getUTCSeconds())+\".\"+(s.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+\"Z\"};function _complement(s){return function(){return!s.apply(this,arguments)}}function _arrayReduce(s,i,u){for(var _=0,w=u.length;_<w;)i=s(i,u[_]),_+=1;return i}const Hl=Array.isArray||function _isArray(s){return null!=s&&s.length>=0&&\"[object Array]\"===Object.prototype.toString.call(s)};function _dispatchable(s,i,u){return function(){if(0===arguments.length)return u();var _=arguments[arguments.length-1];if(!Hl(_)){for(var w=0;w<s.length;){if(\"function\"==typeof _[s[w]])return _[s[w]].apply(_,Array.prototype.slice.call(arguments,0,-1));w+=1}if(function _isTransformer(s){return null!=s&&\"function\"==typeof s[\"@@transducer/step\"]}(_))return i.apply(null,Array.prototype.slice.call(arguments,0,-1))(_)}return u.apply(this,arguments)}}function _isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}const _xfBase_init=function(){return this.xf[\"@@transducer/init\"]()},_xfBase_result=function(s){return this.xf[\"@@transducer/result\"](s)};var Jl=function(){function XFilter(s,i){this.xf=i,this.f=s}return XFilter.prototype[\"@@transducer/init\"]=_xfBase_init,XFilter.prototype[\"@@transducer/result\"]=_xfBase_result,XFilter.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)?this.xf[\"@@transducer/step\"](s,i):s},XFilter}();function _xfilter(s){return function(i){return new Jl(s,i)}}var Gl=_curry2(_dispatchable([\"fantasy-land/filter\",\"filter\"],_xfilter,(function(s,i){return _isObject(i)?_arrayReduce((function(u,_){return s(i[_])&&(u[_]=i[_]),u}),{},Ul(i)):function _filter(s,i){for(var u=0,_=i.length,w=[];u<_;)s(i[u])&&(w[w.length]=i[u]),u+=1;return w}(s,i)})));const Yl=Gl;const Xl=_curry2((function reject(s,i){return Yl(_complement(s),i)}));function _toString_toString(s,i){var u=function recur(u){var _=i.concat([s]);return _includes(u,_)?\"<Circular>\":_toString_toString(u,_)},mapPairs=function(s,i){return _map((function(i){return _quote(i)+\": \"+u(s[i])}),i.slice().sort())};switch(Object.prototype.toString.call(s)){case\"[object Arguments]\":return\"(function() { return arguments; }(\"+_map(u,s).join(\", \")+\"))\";case\"[object Array]\":return\"[\"+_map(u,s).concat(mapPairs(s,Xl((function(s){return/^\\d+$/.test(s)}),Ul(s)))).join(\", \")+\"]\";case\"[object Boolean]\":return\"object\"==typeof s?\"new Boolean(\"+u(s.valueOf())+\")\":s.toString();case\"[object Date]\":return\"new Date(\"+(isNaN(s.valueOf())?u(NaN):_quote(Kl(s)))+\")\";case\"[object Map]\":return\"new Map(\"+u(Array.from(s))+\")\";case\"[object Null]\":return\"null\";case\"[object Number]\":return\"object\"==typeof s?\"new Number(\"+u(s.valueOf())+\")\":1/s==-1/0?\"-0\":s.toString(10);case\"[object Set]\":return\"new Set(\"+u(Array.from(s).sort())+\")\";case\"[object String]\":return\"object\"==typeof s?\"new String(\"+u(s.valueOf())+\")\":_quote(s);case\"[object Undefined]\":return\"undefined\";default:if(\"function\"==typeof s.toString){var _=s.toString();if(\"[object Object]\"!==_)return _}return\"{\"+mapPairs(s,Ul(s)).join(\", \")+\"}\"}}const Ql=_curry1((function toString(s){return _toString_toString(s,[])}));var Zl=_curry2((function test(s,i){if(!function _isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)}(s))throw new TypeError(\"‘test’ requires a value of type RegExp as its first argument; received \"+Ql(s));return _cloneRegExp(s).test(i)}));const ec=Zl;function _arity(s,i){switch(s){case 0:return function(){return i.apply(this,arguments)};case 1:return function(s){return i.apply(this,arguments)};case 2:return function(s,u){return i.apply(this,arguments)};case 3:return function(s,u,_){return i.apply(this,arguments)};case 4:return function(s,u,_,w){return i.apply(this,arguments)};case 5:return function(s,u,_,w,x){return i.apply(this,arguments)};case 6:return function(s,u,_,w,x,j){return i.apply(this,arguments)};case 7:return function(s,u,_,w,x,j,P){return i.apply(this,arguments)};case 8:return function(s,u,_,w,x,j,P,B){return i.apply(this,arguments)};case 9:return function(s,u,_,w,x,j,P,B,$){return i.apply(this,arguments)};case 10:return function(s,u,_,w,x,j,P,B,$,U){return i.apply(this,arguments)};default:throw new Error(\"First argument to _arity must be a non-negative integer no greater than ten\")}}function _pipe(s,i){return function(){return i.call(this,s.apply(this,arguments))}}const rc=_curry1((function isArrayLike(s){return!!Hl(s)||!!s&&(\"object\"==typeof s&&(!_isString(s)&&(0===s.length||s.length>0&&(s.hasOwnProperty(0)&&s.hasOwnProperty(s.length-1)))))}));var oc=\"undefined\"!=typeof Symbol?Symbol.iterator:\"@@iterator\";function _createReduce(s,i,u){return function _reduce(_,w,x){if(rc(x))return s(_,w,x);if(null==x)return w;if(\"function\"==typeof x[\"fantasy-land/reduce\"])return i(_,w,x,\"fantasy-land/reduce\");if(null!=x[oc])return u(_,w,x[oc]());if(\"function\"==typeof x.next)return u(_,w,x);if(\"function\"==typeof x.reduce)return i(_,w,x,\"reduce\");throw new TypeError(\"reduce: list must be array or iterable\")}}function _xArrayReduce(s,i,u){for(var _=0,w=u.length;_<w;){if((i=s[\"@@transducer/step\"](i,u[_]))&&i[\"@@transducer/reduced\"]){i=i[\"@@transducer/value\"];break}_+=1}return s[\"@@transducer/result\"](i)}var sc=_curry2((function bind(s,i){return _arity(s.length,(function(){return s.apply(i,arguments)}))}));const ic=sc;function _xIterableReduce(s,i,u){for(var _=u.next();!_.done;){if((i=s[\"@@transducer/step\"](i,_.value))&&i[\"@@transducer/reduced\"]){i=i[\"@@transducer/value\"];break}_=u.next()}return s[\"@@transducer/result\"](i)}function _xMethodReduce(s,i,u,_){return s[\"@@transducer/result\"](u[_](ic(s[\"@@transducer/step\"],s),i))}const ac=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce);var lc=function(){function XWrap(s){this.f=s}return XWrap.prototype[\"@@transducer/init\"]=function(){throw new Error(\"init not implemented on XWrap\")},XWrap.prototype[\"@@transducer/result\"]=function(s){return s},XWrap.prototype[\"@@transducer/step\"]=function(s,i){return this.f(s,i)},XWrap}();function _xwrap(s){return new lc(s)}var cc=_curry3((function(s,i,u){return ac(\"function\"==typeof s?_xwrap(s):s,i,u)}));const pc=cc;function _checkForMethod(s,i){return function(){var u=arguments.length;if(0===u)return i();var _=arguments[u-1];return Hl(_)||\"function\"!=typeof _[s]?i.apply(this,arguments):_[s].apply(_,Array.prototype.slice.call(arguments,0,u-1))}}var hc=_curry3(_checkForMethod(\"slice\",(function slice(s,i,u){return Array.prototype.slice.call(u,s,i)})));const dc=hc;const fc=_curry1(_checkForMethod(\"tail\",dc(1,1/0)));function pipe(){if(0===arguments.length)throw new Error(\"pipe requires at least one argument\");return _arity(arguments[0].length,pc(_pipe,arguments[0],fc(arguments)))}const gc=_curry2((function defaultTo(s,i){return null==i||i!=i?s:i}));const bc=_curry2((function prop(s,i){if(null!=i)return xl(s)?Cl(s,i):i[s]}));const _c=_curry3((function propOr(s,i,u){return gc(s,bc(i,u))}));const Ec=Cl(-1);function _curryN(s,i,u){return function(){for(var _=[],w=0,x=s,j=0,P=!1;j<i.length||w<arguments.length;){var B;j<i.length&&(!_isPlaceholder(i[j])||w>=arguments.length)?B=i[j]:(B=arguments[w],w+=1),_[j]=B,_isPlaceholder(B)?P=!0:x-=1,j+=1}return!P&&x<=0?u.apply(this,_):_arity(Math.max(0,x),_curryN(s,_,u))}}var kc=_curry2((function curryN(s,i){return 1===s?_curry1(i):_arity(s,_curryN(s,[],i))}));const Oc=kc;var jc=_curry1((function curry(s){return Oc(s.length,s)}));const Pc=jc;function _isFunction(s){var i=Object.prototype.toString.call(s);return\"[object Function]\"===i||\"[object AsyncFunction]\"===i||\"[object GeneratorFunction]\"===i||\"[object AsyncGeneratorFunction]\"===i}const Ic=_curry2((function invoker(s,i){return Oc(s+1,(function(){var u=arguments[s];if(null!=u&&_isFunction(u[i]))return u[i].apply(u,Array.prototype.slice.call(arguments,0,s));throw new TypeError(Ql(u)+' does not have a method named \"'+i+'\"')}))}));const Nc=Ic(1,\"split\");function dropLastWhile(s,i){for(var u=i.length-1;u>=0&&s(i[u]);)u-=1;return dc(0,u+1,i)}var Mc=function(){function XDropLastWhile(s,i){this.f=s,this.retained=[],this.xf=i}return XDropLastWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropLastWhile.prototype[\"@@transducer/result\"]=function(s){return this.retained=null,this.xf[\"@@transducer/result\"](s)},XDropLastWhile.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)?this.retain(s,i):this.flush(s,i)},XDropLastWhile.prototype.flush=function(s,i){return s=ac(this.xf,s,this.retained),this.retained=[],this.xf[\"@@transducer/step\"](s,i)},XDropLastWhile.prototype.retain=function(s,i){return this.retained.push(i),s},XDropLastWhile}();function _xdropLastWhile(s){return function(i){return new Mc(s,i)}}const Rc=_curry2(_dispatchable([],_xdropLastWhile,dropLastWhile));const Lc=Ic(1,\"join\");var Fc=_curry1((function flip(s){return Oc(s.length,(function(i,u){var _=Array.prototype.slice.call(arguments,0);return _[0]=u,_[1]=i,s.apply(this,_)}))}));const qc=Fc(_curry2(_includes));const Kc=Pc((function(s,i){return pipe(Nc(\"\"),Rc(qc(s)),Lc(\"\"))(i)}));function _iterableReduce(s,i,u){for(var _=u.next();!_.done;)i=s(i,_.value),_=u.next();return i}function _methodReduce(s,i,u,_){return u[_](s,i)}const Hc=_createReduce(_arrayReduce,_methodReduce,_iterableReduce);var Jc=function(){function XMap(s,i){this.xf=i,this.f=s}return XMap.prototype[\"@@transducer/init\"]=_xfBase_init,XMap.prototype[\"@@transducer/result\"]=_xfBase_result,XMap.prototype[\"@@transducer/step\"]=function(s,i){return this.xf[\"@@transducer/step\"](s,this.f(i))},XMap}();var Gc=_curry2(_dispatchable([\"fantasy-land/map\",\"map\"],(function _xmap(s){return function(i){return new Jc(s,i)}}),(function map(s,i){switch(Object.prototype.toString.call(i)){case\"[object Function]\":return Oc(i.length,(function(){return s.call(this,i.apply(this,arguments))}));case\"[object Object]\":return _arrayReduce((function(u,_){return u[_]=s(i[_]),u}),{},Ul(i));default:return _map(s,i)}})));const Qc=Gc;const eu=_curry2((function ap(s,i){return\"function\"==typeof i[\"fantasy-land/ap\"]?i[\"fantasy-land/ap\"](s):\"function\"==typeof s.ap?s.ap(i):\"function\"==typeof s?function(u){return s(u)(i(u))}:Hc((function(s,u){return function _concat(s,i){var u;i=i||[];var _=(s=s||[]).length,w=i.length,x=[];for(u=0;u<_;)x[x.length]=s[u],u+=1;for(u=0;u<w;)x[x.length]=i[u],u+=1;return x}(s,Qc(u,i))}),[],s)}));var tu=_curry2((function liftN(s,i){var u=Oc(s,i);return Oc(s,(function(){return _arrayReduce(eu,Qc(u,arguments[0]),Array.prototype.slice.call(arguments,1))}))}));const ru=tu;var nu=_curry1((function lift(s){return ru(s.length,s)}));const ou=nu;const su=ou(_curry1((function not(s){return!s})));const iu=_curry1((function always(s){return function(){return s}}));const au=iu(void 0);const lu=Vl(au());const cu=su(lu);const uu=_curry2((function max(s,i){if(s===i)return i;function safeMax(s,i){if(s>i!=i>s)return i>s?i:s}var u=safeMax(s,i);if(void 0!==u)return u;var _=safeMax(typeof s,typeof i);if(void 0!==_)return _===typeof s?s:i;var w=Ql(s),x=safeMax(w,Ql(i));return void 0!==x&&x===w?s:i}));var pu=_curry2((function pluck(s,i){return Qc(bc(s),i)}));const hu=pu;const du=_curry1((function anyPass(s){return Oc(pc(uu,0,hu(\"length\",s)),(function(){for(var i=0,u=s.length;i<u;){if(s[i].apply(this,arguments))return!0;i+=1}return!1}))}));var identical=function(s,i){switch(arguments.length){case 0:return identical;case 1:return function unaryIdentical(i){return 0===arguments.length?unaryIdentical:Ml(s,i)};default:return Ml(s,i)}};const fu=identical;const mu=Oc(1,pipe(zl,fu(\"GeneratorFunction\")));const gu=Oc(1,pipe(zl,fu(\"AsyncFunction\")));const yu=du([pipe(zl,fu(\"Function\")),mu,gu]);var vu=_curry3((function replace(s,i,u){return u.replace(s,i)}));const bu=vu;const _u=Oc(1,pipe(zl,fu(\"RegExp\")));const Eu=_curry3((function when(s,i,u){return s(u)?i(u):u}));const wu=Oc(1,pipe(zl,fu(\"String\")));const Su=Eu(wu,bu(/[.*+?^${}()|[\\]\\\\-]/g,\"\\\\$&\"));var xu=function checkValue(s,i){if(\"string\"!=typeof s&&!(s instanceof String))throw TypeError(\"`\".concat(i,\"` must be a string\"))};const ku=function replaceAll(s,i,u){!function checkArguments(s,i,u){if(null==u||null==s||null==i)throw TypeError(\"Input values must not be `null` or `undefined`\")}(s,i,u),xu(u,\"str\"),xu(i,\"replaceValue\"),function checkSearchValue(s){if(!(\"string\"==typeof s||s instanceof String||s instanceof RegExp))throw TypeError(\"`searchValue` must be a string or an regexp\")}(s);var _=new RegExp(_u(s)?s:Su(s),\"g\");return bu(_,i,u)};var Ou=Oc(3,ku),Cu=Ic(2,\"replaceAll\");const Au=yu(String.prototype.replaceAll)?Cu:Ou,isWindows=()=>Nl(ec(/^win/),[\"platform\"],Sl),getProtocol=s=>{try{const i=new URL(s);return Kc(\":\",i.protocol)}catch{return}},ju=(pipe(getProtocol,cu),s=>{if(Sl.browser)return!1;const i=getProtocol(s);return lu(i)||\"file\"===i||/^[a-zA-Z]$/.test(i)}),isHttpUrl=s=>{const i=getProtocol(s);return\"http\"===i||\"https\"===i},toFileSystemPath=(s,i)=>{const u=[/%23/g,\"#\",/%24/g,\"$\",/%26/g,\"&\",/%2C/g,\",\",/%40/g,\"@\"],_=_c(!1,\"keepFileProtocol\",i),w=_c(isWindows,\"isWindows\",i);let x=decodeURI(s);for(let s=0;s<u.length;s+=2)x=x.replace(u[s],u[s+1]);let j=\"file://\"===x.substring(0,7).toLowerCase();return j&&(x=\"/\"===x[7]?x.substring(8):x.substring(7),w()&&\"/\"===x[1]&&(x=`${x[0]}:${x.substring(1)}`),_?x=`file:///${x}`:(j=!1,x=w()?x:`/${x}`)),w()&&!j&&(x=Au(\"/\",\"\\\\\",x),\":\\\\\"===x.substring(1,3)&&(x=x[0].toUpperCase()+x.substring(1))),x},getHash=s=>{const i=s.indexOf(\"#\");return-1!==i?s.substring(i):\"#\"},stripHash=s=>{const i=s.indexOf(\"#\");let u=s;return i>=0&&(u=s.substring(0,i)),u},url_cwd=()=>{if(Sl.browser)return stripHash(globalThis.location.href);const s=Sl.cwd(),i=Ec(s);return[\"/\",\"\\\\\"].includes(i)?s:s+(isWindows()?\"\\\\\":\"/\")},resolve=(s,i)=>{const u=new URL(i,new URL(s,\"resolve://\"));if(\"resolve:\"===u.protocol){const{pathname:s,search:i,hash:_}=u;return s+i+_}return u.toString()},sanitize=s=>{if(ju(s))return(s=>{const i=[/\\?/g,\"%3F\",/#/g,\"%23\"];let u=s;isWindows()&&(u=u.replace(/\\\\/g,\"/\")),u=encodeURI(u);for(let s=0;s<i.length;s+=2)u=u.replace(i[s],i[s+1]);return u})(toFileSystemPath(s));try{return new URL(s).toString()}catch{return encodeURI(decodeURI(s)).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\")}},unsanitize=s=>ju(s)?toFileSystemPath(s):decodeURI(s),{fetch:Pu,Response:Iu,Headers:Nu,Request:Mu,FormData:Tu,File:Ru,Blob:Du}=globalThis;function createErrorType(s,i){function E(...s){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,[this.message]=s,i&&i.apply(this,s)}return E.prototype=new Error,E.prototype.name=s,E.prototype.constructor=E,E}void 0===globalThis.fetch&&(globalThis.fetch=Pu),void 0===globalThis.Headers&&(globalThis.Headers=Nu),void 0===globalThis.Request&&(globalThis.Request=Mu),void 0===globalThis.Response&&(globalThis.Response=Iu),void 0===globalThis.FormData&&(globalThis.FormData=Tu),void 0===globalThis.File&&(globalThis.File=Ru),void 0===globalThis.Blob&&(globalThis.Blob=Du);var Bu=__webpack_require__(36623),Lu=__webpack_require__.n(Bu);const Fu=\"application/json, application/yaml\",qu=\"https://swagger.io\",$u=Object.freeze({url:\"/\"}),Uu=[\"properties\"],zu=[\"properties\"],Vu=[\"definitions\",\"parameters\",\"responses\",\"securityDefinitions\",\"components/schemas\",\"components/responses\",\"components/parameters\",\"components/securitySchemes\"],Wu=[\"schema/example\",\"items/example\"];function isFreelyNamed(s){const i=s[s.length-1],u=s[s.length-2],_=s.join(\"/\");return Uu.indexOf(i)>-1&&-1===zu.indexOf(u)||Vu.indexOf(_)>-1||Wu.some((s=>_.indexOf(s)>-1))}function absolutifyPointer(s,i){const[u,_]=s.split(\"#\"),w=null!=i?i:\"\",x=null!=u?u:\"\";let j;if(isHttpUrl(w))j=resolve(w,x);else{const s=resolve(qu,w),i=resolve(s,x).replace(qu,\"\");j=x.startsWith(\"/\")?i:i.substring(1)}return _?`${j}#${_}`:j}const Ku=/^([a-z]+:\\/\\/|\\/\\/)/i,Hu=createErrorType(\"JSONRefError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),Ju={},Gu=new WeakMap,Yu=[s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"examples\"===s[5],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"example\"===s[4],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"example\"===s[5],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"examples\"===s[4]&&\"value\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"examples\"===s[5]&&\"value\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[4]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9]],Xu={key:\"$ref\",plugin:(s,i,u,_)=>{const w=_.getInstance(),x=u.slice(0,-1);if(isFreelyNamed(x)||(s=>Yu.some((i=>i(s))))(x))return;const{baseDoc:j}=_.getContext(u);if(\"string\"!=typeof s)return new Hu(\"$ref: must be a string (JSON-Ref)\",{$ref:s,baseDoc:j,fullPath:u});const P=refs_split(s),B=P[0],$=P[1]||\"\";let U,Y,X;try{U=j||B?absoluteify(B,j):null}catch(i){return wrapError(i,{pointer:$,$ref:s,basePath:U,fullPath:u})}if(function pointerAlreadyInPath(s,i,u,_){let w=Gu.get(_);w||(w={},Gu.set(_,w));const x=function arrayToJsonPointer(s){if(0===s.length)return\"\";return`/${s.map(escapeJsonPointerToken).join(\"/\")}`}(u),j=`${i||\"<specmap-base>\"}#${s}`,P=x.replace(/allOf\\/\\d+\\/?/g,\"\"),B=_.contextTree.get([]).baseDoc;if(i===B&&pointerIsAParent(P,s))return!0;let $=\"\";const U=u.some((s=>($=`${$}/${escapeJsonPointerToken(s)}`,w[$]&&w[$].some((s=>pointerIsAParent(s,j)||pointerIsAParent(j,s))))));if(U)return!0;return void(w[P]=(w[P]||[]).concat(j))}($,U,x,_)&&!w.useCircularStructures){const i=absolutifyPointer(s,U);return s===i?null:wl.replace(u,i)}if(null==U?(X=jsonPointerToArray($),Y=_.get(X),void 0===Y&&(Y=new Hu(`Could not resolve reference: ${s}`,{pointer:$,$ref:s,baseDoc:j,fullPath:u}))):(Y=extractFromDoc(U,$),Y=null!=Y.__value?Y.__value:Y.catch((i=>{throw wrapError(i,{pointer:$,$ref:s,baseDoc:j,fullPath:u})}))),Y instanceof Error)return[wl.remove(u),Y];const Z=absolutifyPointer(s,U),ee=wl.replace(x,Y,{$$ref:Z});if(U&&U!==j)return[ee,wl.context(x,{baseDoc:U})];try{if(!function patchValueAlreadyInPath(s,i){const u=[s];return i.path.reduce(((s,i)=>(u.push(s[i]),s[i])),s),pointToAncestor(i.value);function pointToAncestor(s){return wl.isObject(s)&&(u.indexOf(s)>=0||Object.keys(s).some((i=>pointToAncestor(s[i]))))}}(_.state,ee)||w.useCircularStructures)return ee}catch(s){return null}}},Qu=Object.assign(Xu,{docCache:Ju,absoluteify,clearCache:function clearCache(s){void 0!==s?delete Ju[s]:Object.keys(Ju).forEach((s=>{delete Ju[s]}))},JSONRefError:Hu,wrapError,getDoc,split:refs_split,extractFromDoc,fetchJSON:function fetchJSON(s){return fetch(s,{headers:{Accept:Fu},loadSpec:!0}).then((s=>s.text())).then((s=>so.load(s)))},extract,jsonPointerToArray,unescapeJsonPointerToken}),Zu=Qu;function absoluteify(s,i){if(!Ku.test(s)){if(!i)throw new Hu(`Tried to resolve a relative URL, without having a basePath. path: '${s}' basePath: '${i}'`);return resolve(i,s)}return s}function wrapError(s,i){let u;return u=s&&s.response&&s.response.body?`${s.response.body.code} ${s.response.body.message}`:s.message,new Hu(`Could not resolve reference: ${u}`,i,s)}function refs_split(s){return(s+\"\").split(\"#\")}function extractFromDoc(s,i){const u=Ju[s];if(u&&!wl.isPromise(u))try{const s=extract(i,u);return Object.assign(Promise.resolve(s),{__value:s})}catch(s){return Promise.reject(s)}return getDoc(s).then((s=>extract(i,s)))}function getDoc(s){const i=Ju[s];return i?wl.isPromise(i)?i:Promise.resolve(i):(Ju[s]=Qu.fetchJSON(s).then((i=>(Ju[s]=i,i))),Ju[s])}function extract(s,i){const u=jsonPointerToArray(s);if(u.length<1)return i;const _=wl.getIn(i,u);if(void 0===_)throw new Hu(`Could not resolve pointer: ${s} does not exist in document`,{pointer:s});return _}function jsonPointerToArray(s){if(\"string\"!=typeof s)throw new TypeError(\"Expected a string, got a \"+typeof s);return\"/\"===s[0]&&(s=s.substr(1)),\"\"===s?[]:s.split(\"/\").map(unescapeJsonPointerToken)}function unescapeJsonPointerToken(s){if(\"string\"!=typeof s)return s;return new URLSearchParams(`=${s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}`).get(\"\")}function escapeJsonPointerToken(s){return new URLSearchParams([[\"\",s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")]]).toString().slice(1)}const pointerBoundaryChar=s=>!s||\"/\"===s||\"#\"===s;function pointerIsAParent(s,i){if(pointerBoundaryChar(i))return!0;const u=s.charAt(i.length),_=i.slice(-1);return 0===s.indexOf(i)&&(!u||\"/\"===u||\"#\"===u)&&\"#\"!==_}const ep={key:\"allOf\",plugin:(s,i,u,_,w)=>{if(w.meta&&w.meta.$$ref)return;const x=u.slice(0,-1);if(isFreelyNamed(x))return;if(!Array.isArray(s)){const s=new TypeError(\"allOf must be an array\");return s.fullPath=u,s}let j=!1,P=w.value;if(x.forEach((s=>{P&&(P=P[s])})),P={...P},0===Object.keys(P).length)return;delete P.allOf;const B=[];return B.push(_.replace(x,{})),s.forEach(((s,i)=>{if(!_.isObject(s)){if(j)return null;j=!0;const s=new TypeError(\"Elements in allOf must be objects\");return s.fullPath=u,B.push(s)}B.push(_.mergeDeep(x,s));const w=function generateAbsoluteRefPatches(s,i,{specmap:u,getBaseUrlForNodePath:_=(s=>u.getContext([...i,...s]).baseDoc),targetKeys:w=[\"$ref\",\"$$ref\"]}={}){const x=[];return Lu()(s).forEach((function callback(){if(w.includes(this.key)&&\"string\"==typeof this.node){const s=this.path,w=i.concat(this.path),j=absolutifyPointer(this.node,_(s));x.push(u.replace(w,j))}})),x}(s,u.slice(0,-1),{getBaseUrlForNodePath:s=>_.getContext([...u,i,...s]).baseDoc,specmap:_});B.push(...w)})),P.example&&B.push(_.remove([].concat(x,\"example\"))),B.push(_.mergeDeep(x,P)),P.$$ref||B.push(_.remove([].concat(x,\"$$ref\"))),B}},tp={key:\"parameters\",plugin:(s,i,u,_)=>{if(Array.isArray(s)&&s.length){const i=Object.assign([],s),w=u.slice(0,-1),x={...wl.getIn(_.spec,w)};for(let w=0;w<s.length;w+=1){const j=s[w];try{i[w].default=_.parameterMacro(x,j)}catch(s){const i=new Error(s);return i.fullPath=u,i}}return wl.replace(u,i)}return wl.replace(u,s)}},rp={key:\"properties\",plugin:(s,i,u,_)=>{const w={...s};for(const i in s)try{w[i].default=_.modelPropertyMacro(w[i])}catch(s){const i=new Error(s);return i.fullPath=u,i}return wl.replace(u,w)}};class ContextTree{constructor(s){this.root=context_tree_createNode(s||{})}set(s,i){const u=this.getParent(s,!0);if(!u)return void context_tree_updateNode(this.root,i,null);const _=s[s.length-1],{children:w}=u;w[_]?context_tree_updateNode(w[_],i,u):w[_]=context_tree_createNode(i,u)}get(s){if((s=s||[]).length<1)return this.root.value;let i,u,_=this.root;for(let w=0;w<s.length&&(u=s[w],i=_.children,i[u]);w+=1)_=i[u];return _&&_.protoValue}getParent(s,i){return!s||s.length<1?null:s.length<2?this.root:s.slice(0,-1).reduce(((s,u)=>{if(!s)return s;const{children:_}=s;return!_[u]&&i&&(_[u]=context_tree_createNode(null,s)),_[u]}),this.root)}}function context_tree_createNode(s,i){return context_tree_updateNode({children:{}},s,i)}function context_tree_updateNode(s,i,u){return s.value=i||{},s.protoValue=u?{...u.protoValue,...s.value}:s.value,Object.keys(s.children).forEach((i=>{const u=s.children[i];s.children[i]=context_tree_updateNode(u,u.value,s)})),s}const noop=()=>{};class SpecMap{static getPluginName(s){return s.pluginName}static getPatchesOfType(s,i){return s.filter(i)}constructor(s){Object.assign(this,{spec:\"\",debugLevel:\"info\",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ContextTree,showDebug:!1,allPatches:[],pluginProp:\"specMap\",libMethods:Object.assign(Object.create(this),wl,{getInstance:()=>this}),allowMetaPatches:!1},s),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(wl.isFunction),this.patches.push(wl.add([],this.spec)),this.patches.push(wl.context([],this.context)),this.updatePatches(this.patches)}debug(s,...i){this.debugLevel===s&&console.log(...i)}verbose(s,...i){\"verbose\"===this.debugLevel&&console.log(`[${s}]   `,...i)}wrapPlugin(s,i){const{pathDiscriminator:u}=this;let _,w=null;return s[this.pluginProp]?(w=s,_=s[this.pluginProp]):wl.isFunction(s)?_=s:wl.isObject(s)&&(_=function createKeyBasedPlugin(s){const isSubPath=(s,i)=>!Array.isArray(s)||s.every(((s,u)=>s===i[u]));return function*generator(i,_){const w={};for(const[s,u]of i.filter(wl.isAdditiveMutation).entries()){if(!(s<3e3))return;yield*traverse(u.value,u.path,u)}function*traverse(i,x,j){if(wl.isObject(i)){const P=x.length-1,B=x[P],$=x.indexOf(\"properties\"),U=\"properties\"===B&&P===$,Y=_.allowMetaPatches&&w[i.$$ref];for(const P of Object.keys(i)){const B=i[P],$=x.concat(P),X=wl.isObject(B),Z=i.$$ref;if(Y||X&&(_.allowMetaPatches&&Z&&(w[Z]=!0),yield*traverse(B,$,j)),!U&&P===s.key){const i=isSubPath(u,x);u&&!i||(yield s.plugin(B,P,$,_,j))}}}else s.key===x[x.length-1]&&(yield s.plugin(i,s.key,x,_))}}}(s)),Object.assign(_.bind(w),{pluginName:s.name||i,isGenerator:wl.isGenerator(_)})}nextPlugin(){return this.wrappedPlugins.find((s=>this.getMutationsForPlugin(s).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((s=>s.value)))}getPluginHistory(s){const i=this.constructor.getPluginName(s);return this.pluginHistory[i]||[]}getPluginRunCount(s){return this.getPluginHistory(s).length}getPluginHistoryTip(s){const i=this.getPluginHistory(s);return i&&i[i.length-1]||{}}getPluginMutationIndex(s){const i=this.getPluginHistoryTip(s).mutationIndex;return\"number\"!=typeof i?-1:i}updatePluginHistory(s,i){const u=this.constructor.getPluginName(s);this.pluginHistory[u]=this.pluginHistory[u]||[],this.pluginHistory[u].push(i)}updatePatches(s){wl.normalizeArray(s).forEach((s=>{if(s instanceof Error)this.errors.push(s);else try{if(!wl.isObject(s))return void this.debug(\"updatePatches\",\"Got a non-object patch\",s);if(this.showDebug&&this.allPatches.push(s),wl.isPromise(s.value))return this.promisedPatches.push(s),void this.promisedPatchThen(s);if(wl.isContextPatch(s))return void this.setContext(s.path,s.value);wl.isMutation(s)&&this.updateMutations(s)}catch(s){console.error(s),this.errors.push(s)}}))}updateMutations(s){\"object\"==typeof s.value&&!Array.isArray(s.value)&&this.allowMetaPatches&&(s.value={...s.value});const i=wl.applyPatch(this.state,s,{allowMetaPatches:this.allowMetaPatches});i&&(this.mutations.push(s),this.state=i)}removePromisedPatch(s){const i=this.promisedPatches.indexOf(s);i<0?this.debug(\"Tried to remove a promisedPatch that isn't there!\"):this.promisedPatches.splice(i,1)}promisedPatchThen(s){return s.value=s.value.then((i=>{const u={...s,value:i};this.removePromisedPatch(s),this.updatePatches(u)})).catch((i=>{this.removePromisedPatch(s),this.updatePatches(i)})),s.value}getMutations(s,i){return s=s||0,\"number\"!=typeof i&&(i=this.mutations.length),this.mutations.slice(s,i)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(s){const i=this.getPluginMutationIndex(s);return this.getMutations(i+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(s){return wl.getIn(this.state,s)}_getContext(s){return this.contextTree.get(s)}setContext(s,i){return this.contextTree.set(s,i)}_hasRun(s){return this.getPluginRunCount(this.getCurrentPlugin())>(s||0)}dispatch(){const s=this,i=this.nextPlugin();if(!i){const s=this.nextPromisedPatch();if(s)return s.then((()=>this.dispatch())).catch((()=>this.dispatch()));const i={spec:this.state,errors:this.errors};return this.showDebug&&(i.patches=this.allPatches),Promise.resolve(i)}if(s.pluginCount=s.pluginCount||new WeakMap,s.pluginCount.set(i,(s.pluginCount.get(i)||0)+1),s.pluginCount[i]>100)return Promise.resolve({spec:s.state,errors:s.errors.concat(new Error(\"We've reached a hard limit of 100 plugin runs\"))});if(i!==this.currentPlugin&&this.promisedPatches.length){const s=this.promisedPatches.map((s=>s.value));return Promise.all(s.map((s=>s.then(noop,noop)))).then((()=>this.dispatch()))}return function executePlugin(){s.currentPlugin=i;const u=s.getCurrentMutations(),_=s.mutations.length-1;try{if(i.isGenerator)for(const _ of i(u,s.getLib()))updatePatches(_);else{updatePatches(i(u,s.getLib()))}}catch(s){console.error(s),updatePatches([Object.assign(Object.create(s),{plugin:i})])}finally{s.updatePluginHistory(i,{mutationIndex:_})}return s.dispatch()}();function updatePatches(u){u&&(u=wl.fullyNormalizeArray(u),s.updatePatches(u,i))}}}const np={refs:Zu,allOf:ep,parameters:tp,properties:rp},replace_special_chars_with_underscore=s=>s.replace(/\\W/gi,\"_\");function opId(s,i,u=\"\",{v2OperationIdCompatibilityMode:_}={}){if(!s||\"object\"!=typeof s)return null;return(s.operationId||\"\").replace(/\\s/g,\"\").length?replace_special_chars_with_underscore(s.operationId):function idFromPathMethod(s,i,{v2OperationIdCompatibilityMode:u}={}){if(u){let u=`${i.toLowerCase()}_${s}`.replace(/[\\s!@#$%^&*()_+=[{\\]};:<>|./?,\\\\'\"\"-]/g,\"_\");return u=u||`${s.substring(1)}_${i}`,u.replace(/((_){2,})/g,\"_\").replace(/^(_)*/g,\"\").replace(/([_])*$/g,\"\")}return`${i.toLowerCase()}${replace_special_chars_with_underscore(s)}`}(i,u,{v2OperationIdCompatibilityMode:_})}function normalize(s){const{spec:i}=s,{paths:u}=i,_={};if(!u||i.$$normalized)return s;for(const s in u){const w=u[s];if(null==w||![\"object\",\"function\"].includes(typeof w))continue;const x=w.parameters;for(const u in w){const j=w[u];if(null==j||![\"object\",\"function\"].includes(typeof j))continue;const P=opId(j,s,u);if(P){_[P]?_[P].push(j):_[P]=[j];const s=_[P];if(s.length>1)s.forEach(((s,i)=>{s.__originalOperationId=s.__originalOperationId||s.operationId,s.operationId=`${P}${i+1}`}));else if(void 0!==j.operationId){const i=s[0];i.__originalOperationId=i.__originalOperationId||j.operationId,i.operationId=P}}if(\"parameters\"!==u){const s=[],u={};for(const _ in i)\"produces\"!==_&&\"consumes\"!==_&&\"security\"!==_||(u[_]=i[_],s.push(u));if(x&&(u.parameters=x,s.push(u)),s.length)for(const i of s)for(const s in i)if(j[s]){if(\"parameters\"===s)for(const u of i[s]){j[s].some((s=>s.name&&s.name===u.name||s.$ref&&s.$ref===u.$ref||s.$$ref&&s.$$ref===u.$$ref||s===u))||j[s].push(u)}}else j[s]=i[s]}}}return i.$$normalized=!0,s}function makeFetchJSON(s,i={}){const{requestInterceptor:u,responseInterceptor:_}=i,w=s.withCredentials?\"include\":\"same-origin\";return i=>s({url:i,loadSpec:!0,requestInterceptor:u,responseInterceptor:_,headers:{Accept:Fu},credentials:w}).then((s=>s.body))}var op=__webpack_require__(55373),sp=__webpack_require__.n(op);const isRfc3986Reserved=s=>\":/?#[]@!$&'()*+,;=\".indexOf(s)>-1,isRrc3986Unreserved=s=>/^[a-z0-9\\-._~]+$/i.test(s);function encodeDisallowedCharacters(s,{escape:i}={},u){return\"number\"==typeof s&&(s=s.toString()),\"string\"==typeof s&&s.length&&i?u?JSON.parse(s):[...s].map((s=>{if(isRrc3986Unreserved(s))return s;if(isRfc3986Reserved(s)&&\"unsafe\"===i)return s;const u=new TextEncoder;return Array.from(u.encode(s)).map((s=>`0${s.toString(16).toUpperCase()}`.slice(-2))).map((s=>`%${s}`)).join(\"\")})).join(\"\"):s}function stylize(s){const{value:i}=s;return Array.isArray(i)?function encodeArray({key:s,value:i,style:u,explode:_,escape:w}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:w});if(\"simple\"===u)return i.map((s=>valueEncoder(s))).join(\",\");if(\"label\"===u)return`.${i.map((s=>valueEncoder(s))).join(\".\")}`;if(\"matrix\"===u)return i.map((s=>valueEncoder(s))).reduce(((i,u)=>!i||_?`${i||\"\"};${s}=${u}`:`${i},${u}`),\"\");if(\"form\"===u){const u=_?`&${s}=`:\",\";return i.map((s=>valueEncoder(s))).join(u)}if(\"spaceDelimited\"===u){const u=_?`${s}=`:\"\";return i.map((s=>valueEncoder(s))).join(` ${u}`)}if(\"pipeDelimited\"===u){const u=_?`${s}=`:\"\";return i.map((s=>valueEncoder(s))).join(`|${u}`)}return}(s):\"object\"==typeof i?function encodeObject({key:s,value:i,style:u,explode:_,escape:w}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:w}),x=Object.keys(i);if(\"simple\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s},`:\"\"}${u}${_?\"=\":\",\"}${w}`}),\"\");if(\"label\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s}.`:\".\"}${u}${_?\"=\":\".\"}${w}`}),\"\");if(\"matrix\"===u&&_)return x.reduce(((s,u)=>`${s?`${s};`:\";\"}${u}=${valueEncoder(i[u])}`),\"\");if(\"matrix\"===u)return x.reduce(((u,_)=>{const w=valueEncoder(i[_]);return`${u?`${u},`:`;${s}=`}${_},${w}`}),\"\");if(\"form\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s}${_?\"&\":\",\"}`:\"\"}${u}${_?\"=\":\",\"}${w}`}),\"\");return}(s):function encodePrimitive({key:s,value:i,style:u,escape:_}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:_});if(\"simple\"===u)return valueEncoder(i);if(\"label\"===u)return`.${valueEncoder(i)}`;if(\"matrix\"===u)return`;${s}=${valueEncoder(i)}`;if(\"form\"===u)return valueEncoder(i);if(\"deepObject\"===u)return valueEncoder(i,{},!0);return}(s)}const ip={serializeRes,mergeInQueryOrForm};async function http_http(s,i={}){\"object\"==typeof s&&(s=(i=s).url),i.headers=i.headers||{},ip.mergeInQueryOrForm(i),i.headers&&Object.keys(i.headers).forEach((s=>{const u=i.headers[s];\"string\"==typeof u&&(i.headers[s]=u.replace(/\\n+/g,\" \"))})),i.requestInterceptor&&(i=await i.requestInterceptor(i)||i);const u=i.headers[\"content-type\"]||i.headers[\"Content-Type\"];let _;/multipart\\/form-data/i.test(u)&&(delete i.headers[\"content-type\"],delete i.headers[\"Content-Type\"]);try{_=await(i.userFetch||fetch)(i.url,i),_=await ip.serializeRes(_,s,i),i.responseInterceptor&&(_=await i.responseInterceptor(_)||_)}catch(s){if(!_)throw s;const i=new Error(_.statusText||`response status is ${_.status}`);throw i.status=_.status,i.statusCode=_.status,i.responseError=s,i}if(!_.ok){const s=new Error(_.statusText||`response status is ${_.status}`);throw s.status=_.status,s.statusCode=_.status,s.response=_,s}return _}const shouldDownloadAsText=(s=\"\")=>/(json|xml|yaml|text)\\b/.test(s);function serializeRes(s,i,{loadSpec:u=!1}={}){const _={ok:s.ok,url:s.url||i,status:s.status,statusText:s.statusText,headers:serializeHeaders(s.headers)},w=_.headers[\"content-type\"],x=u||shouldDownloadAsText(w);return(x?s.text:s.blob||s.buffer).call(s).then((s=>{if(_.text=s,_.data=s,x)try{const i=function parseBody(s,i){return i&&(0===i.indexOf(\"application/json\")||i.indexOf(\"+json\")>0)?JSON.parse(s):so.load(s)}(s,w);_.body=i,_.obj=i}catch(s){_.parseError=s}return _}))}function serializeHeaders(s={}){return\"function\"!=typeof s.entries?{}:Array.from(s.entries()).reduce(((s,[i,u])=>(s[i]=function serializeHeaderValue(s){return s.includes(\", \")?s.split(\", \"):s}(u),s)),{})}function isFile(s,i){return i||\"undefined\"==typeof navigator||(i=navigator),i&&\"ReactNative\"===i.product?!(!s||\"object\"!=typeof s||\"string\"!=typeof s.uri):\"undefined\"!=typeof File&&s instanceof File||(\"undefined\"!=typeof Blob&&s instanceof Blob||(!!ArrayBuffer.isView(s)||null!==s&&\"object\"==typeof s&&\"function\"==typeof s.pipe))}function isArrayOfFile(s,i){return Array.isArray(s)&&s.some((s=>isFile(s,i)))}const lp={form:\",\",spaceDelimited:\"%20\",pipeDelimited:\"|\"},cp={csv:\",\",ssv:\"%20\",tsv:\"%09\",pipes:\"|\"};class FileWithData extends File{constructor(s,i=\"\",u={}){super([s],i,u),this.data=s}valueOf(){return this.data}toString(){return this.valueOf()}}function formatKeyValue(s,i,u=!1){const{collectionFormat:_,allowEmptyValue:w,serializationOption:x,encoding:j}=i,P=\"object\"!=typeof i||Array.isArray(i)?i:i.value,B=u?s=>s.toString():s=>encodeURIComponent(s),$=B(s);if(void 0===P&&w)return[[$,\"\"]];if(isFile(P)||isArrayOfFile(P))return[[$,P]];if(x)return formatKeyValueBySerializationOption(s,P,u,x);if(j){if([typeof j.style,typeof j.explode,typeof j.allowReserved].some((s=>\"undefined\"!==s))){const{style:i,explode:_,allowReserved:w}=j;return formatKeyValueBySerializationOption(s,P,u,{style:i,explode:_,allowReserved:w})}if(\"string\"==typeof j.contentType){if(j.contentType.startsWith(\"application/json\")){const s=B(\"string\"==typeof P?P:JSON.stringify(P));return[[$,new FileWithData(s,\"blob\",{type:j.contentType})]]}const s=B(String(P));return[[$,new FileWithData(s,\"blob\",{type:j.contentType})]]}return\"object\"!=typeof P?[[$,B(P)]]:Array.isArray(P)&&P.every((s=>\"object\"!=typeof s))?[[$,P.map(B).join(\",\")]]:[[$,B(JSON.stringify(P))]]}return\"object\"!=typeof P?[[$,B(P)]]:Array.isArray(P)?\"multi\"===_?[[$,P.map(B)]]:[[$,P.map(B).join(cp[_||\"csv\"])]]:[[$,\"\"]]}function formatKeyValueBySerializationOption(s,i,u,_){const w=_.style||\"form\",x=void 0===_.explode?\"form\"===w:_.explode,j=!u&&(_&&_.allowReserved?\"unsafe\":\"reserved\"),encodeFn=s=>encodeDisallowedCharacters(s,{escape:j}),P=u?s=>s:s=>encodeDisallowedCharacters(s,{escape:j});return\"object\"!=typeof i?[[P(s),encodeFn(i)]]:Array.isArray(i)?x?[[P(s),i.map(encodeFn)]]:[[P(s),i.map(encodeFn).join(lp[w])]]:\"deepObject\"===w?Object.keys(i).map((u=>[P(`${s}[${u}]`),encodeFn(i[u])])):x?Object.keys(i).map((s=>[P(s),encodeFn(i[s])])):[[P(s),Object.keys(i).map((s=>[`${P(s)},${encodeFn(i[s])}`])).join(\",\")]]}function encodeFormOrQuery(s){const i=Object.keys(s).reduce(((i,u)=>{for(const[_,w]of formatKeyValue(u,s[u]))i[_]=w instanceof FileWithData?w.valueOf():w;return i}),{});return sp().stringify(i,{encode:!1,indices:!1})||\"\"}function mergeInQueryOrForm(s={}){const{url:i=\"\",query:u,form:_}=s;if(_){const i=Object.keys(_).some((s=>{const{value:i}=_[s];return isFile(i)||isArrayOfFile(i)})),u=s.headers[\"content-type\"]||s.headers[\"Content-Type\"];if(i||/multipart\\/form-data/i.test(u)){const i=function http_buildFormData(s){return Object.entries(s).reduce(((s,[i,u])=>{for(const[_,w]of formatKeyValue(i,u,!0))if(Array.isArray(w))for(const i of w)if(ArrayBuffer.isView(i)){const u=new Blob([i]);s.append(_,u)}else s.append(_,i);else if(ArrayBuffer.isView(w)){const i=new Blob([w]);s.append(_,i)}else s.append(_,w);return s}),new FormData)}(s.form);s.formdata=i,s.body=i}else s.body=encodeFormOrQuery(_);delete s.form}if(u){const[_,w]=i.split(\"?\");let x=\"\";if(w){const s=sp().parse(w);Object.keys(u).forEach((i=>delete s[i])),x=sp().stringify(s,{encode:!0})}const j=((...s)=>{const i=s.filter((s=>s)).join(\"&\");return i?`?${i}`:\"\"})(x,encodeFormOrQuery(u));s.url=_+j,delete s.query}return s}const options_retrievalURI=s=>{var i,u;const{baseDoc:_,url:w}=s,x=null!==(i=null!=_?_:w)&&void 0!==i?i:\"\";return\"string\"==typeof(null===(u=globalThis.document)||void 0===u?void 0:u.baseURI)?String(new URL(x,globalThis.document.baseURI)):x},options_httpClient=s=>{const{fetch:i,http:u}=s;return i||u||http_http};async function resolveGenericStrategy(s){const{spec:i,mode:u,allowMetaPatches:_=!0,pathDiscriminator:w,modelPropertyMacro:x,parameterMacro:j,requestInterceptor:P,responseInterceptor:B,skipNormalization:$,useCircularStructures:U}=s,Y=options_retrievalURI(s),X=options_httpClient(s);return function doResolve(s){Y&&(np.refs.docCache[Y]=s);np.refs.fetchJSON=makeFetchJSON(X,{requestInterceptor:P,responseInterceptor:B});const i=[np.refs];\"function\"==typeof j&&i.push(np.parameters);\"function\"==typeof x&&i.push(np.properties);\"strict\"!==u&&i.push(np.allOf);return function mapSpec(s){return new SpecMap(s).dispatch()}({spec:s,context:{baseDoc:Y},plugins:i,allowMetaPatches:_,pathDiscriminator:w,parameterMacro:j,modelPropertyMacro:x,useCircularStructures:U}).then($?async s=>s:normalize)}(i)}const up={name:\"generic\",match:()=>!0,normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>resolveGenericStrategy(s)},pp=up;const isOpenAPI30=s=>{try{const{openapi:i}=s;return\"string\"==typeof i&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(i)}catch{return!1}},isOpenAPI31=s=>{try{const{openapi:i}=s;return\"string\"==typeof i&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(i)}catch{return!1}},isOpenAPI3=s=>isOpenAPI30(s)||isOpenAPI31(s),hp={name:\"openapi-2\",match:({spec:s})=>(s=>{try{const{swagger:i}=s;return\"2.0\"===i}catch{return!1}})(s),normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>async function resolveOpenAPI2Strategy(s){return resolveGenericStrategy(s)}(s)},dp=hp;const fp={name:\"openapi-3-0\",match:({spec:s})=>isOpenAPI30(s),normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>async function resolveOpenAPI30Strategy(s){return resolveGenericStrategy(s)}(s)},mp=fp;var gp=__webpack_require__(34035);class Annotation extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"annotation\"}get code(){return this.attributes.get(\"code\")}set code(s){this.attributes.set(\"code\",s)}}const yp=Annotation;class Comment extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"comment\"}}const vp=Comment;class ParseResult extends gp.wE{constructor(s,i,u){super(s,i,u),this.element=\"parseResult\"}get api(){return this.children.filter((s=>s.classes.contains(\"api\"))).first}get results(){return this.children.filter((s=>s.classes.contains(\"result\")))}get result(){return this.results.first}get annotations(){return this.children.filter((s=>\"annotation\"===s.element))}get warnings(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"warning\")))}get errors(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"error\")))}get isEmpty(){return this.children.reject((s=>\"annotation\"===s.element)).isEmpty}replaceResult(s){const{result:i}=this;if(lu(i))return!1;const u=this.content.findIndex((s=>s===i));return-1!==u&&(this.content[u]=s,!0)}}const bp=ParseResult;class SourceMap extends gp.wE{constructor(s,i,u){super(s,i,u),this.element=\"sourceMap\"}get positionStart(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(0)}get positionEnd(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(1)}set position(s){if(void 0===s)return;const i=new gp.wE([s.start.row,s.start.column,s.start.char]),u=new gp.wE([s.end.row,s.end.column,s.end.char]);i.classes.push(\"position\"),u.classes.push(\"position\"),this.push(i).push(u)}}const _p=SourceMap;var Ep=_curry3((function mergeWithKey(s,i,u){var _,w={};for(_ in u=u||{},i=i||{})_has(_,i)&&(w[_]=_has(_,u)?s(_,i[_],u[_]):i[_]);for(_ in u)_has(_,u)&&!_has(_,w)&&(w[_]=u[_]);return w}));const wp=Ep;var Sp=_curry3((function mergeDeepWithKey(s,i,u){return wp((function(i,u,_){return _isObject(u)&&_isObject(_)?mergeDeepWithKey(s,u,_):s(i,u,_)}),i,u)}));const xp=Sp;const kp=_curry2((function mergeDeepRight(s,i){return xp((function(s,i,u){return u}),s,i)}));const Op=dc(0,-1);var Cp=_curry2((function apply(s,i){return s.apply(this,i)}));const Ap=Cp;const jp=su(yu);const Pp=_curry2((function and(s,i){return s&&i}));const Ip=_curry2((function both(s,i){return _isFunction(s)?function _both(){return s.apply(this,arguments)&&i.apply(this,arguments)}:ou(Pp)(s,i)}));var Np=_curry1((function empty(s){return null!=s&&\"function\"==typeof s[\"fantasy-land/empty\"]?s[\"fantasy-land/empty\"]():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor[\"fantasy-land/empty\"]?s.constructor[\"fantasy-land/empty\"]():null!=s&&\"function\"==typeof s.empty?s.empty():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor.empty?s.constructor.empty():Hl(s)?[]:_isString(s)?\"\":_isObject(s)?{}:Rl(s)?function(){return arguments}():function _isTypedArray(s){var i=Object.prototype.toString.call(s);return\"[object Uint8ClampedArray]\"===i||\"[object Int8Array]\"===i||\"[object Uint8Array]\"===i||\"[object Int16Array]\"===i||\"[object Uint16Array]\"===i||\"[object Int32Array]\"===i||\"[object Uint32Array]\"===i||\"[object Float32Array]\"===i||\"[object Float64Array]\"===i||\"[object BigInt64Array]\"===i||\"[object BigUint64Array]\"===i}(s)?s.constructor.from(\"\"):void 0}));const Mp=Np;const Tp=_curry1((function isEmpty(s){return null!=s&&Vl(s,Mp(s))}));const Rp=Oc(1,yu(Array.isArray)?Array.isArray:pipe(zl,fu(\"Array\")));const Dp=Ip(Rp,Tp);var Bp=Oc(3,(function(s,i,u){var _=Il(s,u),w=Il(Op(s),u);if(!jp(_)&&!Dp(s)){var x=ic(_,w);return Ap(x,i)}}));const Lp=Bp;function _reduced(s){return s&&s[\"@@transducer/reduced\"]?s:{\"@@transducer/value\":s,\"@@transducer/reduced\":!0}}var Fp=function(){function XAll(s,i){this.xf=i,this.f=s,this.all=!0}return XAll.prototype[\"@@transducer/init\"]=_xfBase_init,XAll.prototype[\"@@transducer/result\"]=function(s){return this.all&&(s=this.xf[\"@@transducer/step\"](s,!0)),this.xf[\"@@transducer/result\"](s)},XAll.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)||(this.all=!1,s=_reduced(this.xf[\"@@transducer/step\"](s,!1))),s},XAll}();function _xall(s){return function(i){return new Fp(s,i)}}var qp=_curry2(_dispatchable([\"all\"],_xall,(function all(s,i){for(var u=0;u<i.length;){if(!s(i[u]))return!1;u+=1}return!0})));const $p=qp,hasMethod=(s,i)=>\"object\"==typeof i&&null!==i&&s in i&&\"function\"==typeof i[s],hasBasicElementProps=s=>\"object\"==typeof s&&null!=s&&\"_storedElement\"in s&&\"string\"==typeof s._storedElement&&\"_content\"in s,primitiveEq=(s,i)=>\"object\"==typeof i&&null!==i&&\"primitive\"in i&&(\"function\"==typeof i.primitive&&i.primitive()===s),hasClass=(s,i)=>\"object\"==typeof i&&null!==i&&\"classes\"in i&&(Array.isArray(i.classes)||i.classes instanceof gp.wE)&&i.classes.includes(s),isElementType=(s,i)=>\"object\"==typeof i&&null!==i&&\"element\"in i&&i.element===s,helpers=s=>s({hasMethod,hasBasicElementProps,primitiveEq,isElementType,hasClass}),Up=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Hg||s(u)&&i(void 0,u))),zp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Om||s(u)&&i(\"string\",u))),Vp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.kT||s(u)&&i(\"number\",u))),Wp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Os||s(u)&&i(\"null\",u))),Kp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.bd||s(u)&&i(\"boolean\",u))),Hp=helpers((({hasBasicElementProps:s,primitiveEq:i,hasMethod:u})=>_=>_ instanceof gp.Sh||s(_)&&i(\"object\",_)&&u(\"keys\",_)&&u(\"values\",_)&&u(\"items\",_))),Jp=helpers((({hasBasicElementProps:s,primitiveEq:i,hasMethod:u})=>_=>_ instanceof gp.wE&&!(_ instanceof gp.Sh)||s(_)&&i(\"array\",_)&&u(\"push\",_)&&u(\"unshift\",_)&&u(\"map\",_)&&u(\"reduce\",_))),Gp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.Pr||s(_)&&i(\"member\",_)&&u(void 0,_))),Yp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.Ft||s(_)&&i(\"link\",_)&&u(void 0,_))),Xp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.sI||s(_)&&i(\"ref\",_)&&u(void 0,_))),Qp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yp||s(_)&&i(\"annotation\",_)&&u(\"array\",_))),Zp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof vp||s(_)&&i(\"comment\",_)&&u(\"string\",_))),nh=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bp||s(_)&&i(\"parseResult\",_)&&u(\"array\",_))),hh=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _p||s(_)&&i(\"sourceMap\",_)&&u(\"array\",_))),isPrimitiveElement=s=>isElementType(\"object\",s)||isElementType(\"array\",s)||isElementType(\"boolean\",s)||isElementType(\"number\",s)||isElementType(\"string\",s)||isElementType(\"null\",s)||isElementType(\"member\",s),hasElementSourceMap=s=>hh(s.meta.get(\"sourceMap\")),includesSymbols=(s,i)=>{if(0===s.length)return!0;const u=i.attributes.get(\"symbols\");return!!Jp(u)&&$p(qc(u.toValue()),s)},includesClasses=(s,i)=>0===s.length||$p(qc(i.classes.toValue()),s);const _h=Vl(null);const Eh=su(_h);function isOfTypeObject_typeof(s){return isOfTypeObject_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},isOfTypeObject_typeof(s)}const Sh=function isOfTypeObject(s){return\"object\"===isOfTypeObject_typeof(s)};const jh=Oc(1,Ip(Eh,Sh));var Ph=pipe(zl,fu(\"Object\")),Nh=pipe(Ql,Vl(Ql(Object))),Th=Nl(Ip(yu,Nh),[\"constructor\"]),Rh=Oc(1,(function(s){if(!jh(s)||!Ph(s))return!1;var i=Object.getPrototypeOf(s);return!!_h(i)||Th(i)}));const Dh=Rh;class Namespace extends gp.g${constructor(){super(),this.register(\"annotation\",yp),this.register(\"comment\",vp),this.register(\"parseResult\",bp),this.register(\"sourceMap\",_p)}}const Bh=new Namespace,createNamespace=s=>{const i=new Namespace;return Dh(s)&&i.use(s),i},Fh=Bh,toolbox=()=>({predicates:{...de},namespace:Fh});const es_F=function(){return!1};var $h=__webpack_require__(48675);const Uh=class ApiDOMAggregateError extends $h{constructor(s,i,u){if(super(s,i,u),this.name=this.constructor.name,\"string\"==typeof i&&(this.message=i),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(i).stack,null!=u&&\"object\"==typeof u&&Object.hasOwn(u,\"cause\")&&!(\"cause\"in this)){const{cause:s}=u;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}};class ApiDOMError extends Error{static[Symbol.hasInstance](s){return super[Symbol.hasInstance](s)||Function.prototype[Symbol.hasInstance].call(Uh,s)}constructor(s,i){if(super(s,i),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=i&&\"object\"==typeof i&&Object.hasOwn(i,\"cause\")&&!(\"cause\"in this)){const{cause:s}=i;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}}const Vh=ApiDOMError;const Gh=class ApiDOMStructuredError extends Vh{constructor(s,i){if(super(s,i),null!=i&&\"object\"==typeof i){const{cause:s,...u}=i;Object.assign(this,u)}}},getVisitFn=(s,i,u)=>{const _=s[i];if(null!=_){if(!u&&\"function\"==typeof _)return _;const s=u?_.leave:_.enter;if(\"function\"==typeof s)return s}else{const _=u?s.leave:s.enter;if(null!=_){if(\"function\"==typeof _)return _;const s=_[i];if(\"function\"==typeof s)return s}}return null},Yh={},getNodeType=s=>null==s?void 0:s.type,isNode=s=>\"string\"==typeof getNodeType(s),cloneNode=s=>Object.create(Object.getPrototypeOf(s),Object.getOwnPropertyDescriptors(s)),mergeAll=(s,{visitFnGetter:i=getVisitFn,nodeTypeGetter:u=getNodeType,breakSymbol:_=Yh,deleteNodeSymbol:w=null,skipVisitingNodeSymbol:x=!1,exposeEdits:j=!1}={})=>{const P=Symbol(\"skip\"),B=new Array(s.length).fill(P);return{enter($,...U){let Y=$,X=!1;for(let Z=0;Z<s.length;Z+=1)if(B[Z]===P){const P=i(s[Z],u(Y),!1);if(\"function\"==typeof P){const i=P.call(s[Z],Y,...U);if(i===x)B[Z]=$;else if(i===_)B[Z]=_;else{if(i===w)return i;if(void 0!==i){if(!j)return i;Y=i,X=!0}}}}return X?Y:void 0},leave(w,...j){for(let $=0;$<s.length;$+=1)if(B[$]===P){const P=i(s[$],u(w),!0);if(\"function\"==typeof P){const i=P.call(s[$],w,...j);if(i===_)B[$]=_;else if(void 0!==i&&i!==x)return i}}else B[$]===w&&(B[$]=P)}}},visit=(s,i,{keyMap:u=null,state:_={},breakSymbol:w=Yh,deleteNodeSymbol:x=null,skipVisitingNodeSymbol:j=!1,visitFnGetter:P=getVisitFn,nodeTypeGetter:B=getNodeType,nodePredicate:$=isNode,nodeCloneFn:U=cloneNode,detectCycles:Y=!0}={})=>{const X=u||{};let Z,ee,ie=Array.isArray(s),ae=[s],le=-1,ce=[],pe=s;const de=[],fe=[];do{le+=1;const s=le===ae.length;let u;const be=s&&0!==ce.length;if(s){if(u=0===fe.length?void 0:de.pop(),pe=ee,ee=fe.pop(),be)if(ie){pe=pe.slice();let s=0;for(const[i,u]of ce){const _=i-s;u===x?(pe.splice(_,1),s+=1):pe[_]=u}}else{pe=U(pe);for(const[s,i]of ce)pe[s]=i}le=Z.index,ae=Z.keys,ce=Z.edits,ie=Z.inArray,Z=Z.prev}else if(ee!==x&&void 0!==ee){if(u=ie?le:ae[le],pe=ee[u],pe===x||void 0===pe)continue;de.push(u)}let _e;if(!Array.isArray(pe)){if(!$(pe))throw new Gh(`Invalid AST Node:  ${String(pe)}`,{node:pe});if(Y&&fe.includes(pe)){de.pop();continue}const x=P(i,B(pe),s);if(x){for(const[s,u]of Object.entries(_))i[s]=u;_e=x.call(i,pe,u,ee,de,fe)}if(_e===w)break;if(_e===j){if(!s){de.pop();continue}}else if(void 0!==_e&&(ce.push([u,_e]),!s)){if(!$(_e)){de.pop();continue}pe=_e}}var ye;if(void 0===_e&&be&&ce.push([u,pe]),!s)Z={inArray:ie,index:le,keys:ae,edits:ce,prev:Z},ie=Array.isArray(pe),ae=ie?pe:null!==(ye=X[B(pe)])&&void 0!==ye?ye:[],le=-1,ce=[],ee!==x&&void 0!==ee&&fe.push(ee),ee=pe}while(void 0!==Z);return 0!==ce.length?ce[ce.length-1][1]:s};visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,i,{keyMap:u=null,state:_={},breakSymbol:w=Yh,deleteNodeSymbol:x=null,skipVisitingNodeSymbol:j=!1,visitFnGetter:P=getVisitFn,nodeTypeGetter:B=getNodeType,nodePredicate:$=isNode,nodeCloneFn:U=cloneNode,detectCycles:Y=!0}={})=>{const X=u||{};let Z,ee,ie=Array.isArray(s),ae=[s],le=-1,ce=[],pe=s;const de=[],fe=[];do{le+=1;const s=le===ae.length;let u;const be=s&&0!==ce.length;if(s){if(u=0===fe.length?void 0:de.pop(),pe=ee,ee=fe.pop(),be)if(ie){pe=pe.slice();let s=0;for(const[i,u]of ce){const _=i-s;u===x?(pe.splice(_,1),s+=1):pe[_]=u}}else{pe=U(pe);for(const[s,i]of ce)pe[s]=i}le=Z.index,ae=Z.keys,ce=Z.edits,ie=Z.inArray,Z=Z.prev}else if(ee!==x&&void 0!==ee){if(u=ie?le:ae[le],pe=ee[u],pe===x||void 0===pe)continue;de.push(u)}let _e;if(!Array.isArray(pe)){if(!$(pe))throw new Gh(`Invalid AST Node: ${String(pe)}`,{node:pe});if(Y&&fe.includes(pe)){de.pop();continue}const x=P(i,B(pe),s);if(x){for(const[s,u]of Object.entries(_))i[s]=u;_e=await x.call(i,pe,u,ee,de,fe)}if(_e===w)break;if(_e===j){if(!s){de.pop();continue}}else if(void 0!==_e&&(ce.push([u,_e]),!s)){if(!$(_e)){de.pop();continue}pe=_e}}var ye;if(void 0===_e&&be&&ce.push([u,pe]),!s)Z={inArray:ie,index:le,keys:ae,edits:ce,prev:Z},ie=Array.isArray(pe),ae=ie?pe:null!==(ye=X[B(pe)])&&void 0!==ye?ye:[],le=-1,ce=[],ee!==x&&void 0!==ee&&fe.push(ee),ee=pe}while(void 0!==Z);return 0!==ce.length?ce[ce.length-1][1]:s};const Qh=class CloneError extends Gh{value;constructor(s,i){super(s,i),void 0!==i&&(this.value=i.value)}};const Zh=class DeepCloneError extends Qh{};const td=class ShallowCloneError extends Qh{},cloneDeep=(s,i={})=>{const{visited:u=new WeakMap}=i,_={...i,visited:u};if(u.has(s))return u.get(s);if(s instanceof gp.KeyValuePair){const{key:i,value:w}=s,x=Up(i)?cloneDeep(i,_):i,j=Up(w)?cloneDeep(w,_):w,P=new gp.KeyValuePair(x,j);return u.set(s,P),P}if(s instanceof gp.ot){const mapper=s=>cloneDeep(s,_),i=[...s].map(mapper),w=new gp.ot(i);return u.set(s,w),w}if(s instanceof gp.G6){const mapper=s=>cloneDeep(s,_),i=[...s].map(mapper),w=new gp.G6(i);return u.set(s,w),w}if(Up(s)){const i=cloneShallow(s);if(u.set(s,i),s.content)if(Up(s.content))i.content=cloneDeep(s.content,_);else if(s.content instanceof gp.KeyValuePair)i.content=cloneDeep(s.content,_);else if(Array.isArray(s.content)){const mapper=s=>cloneDeep(s,_);i.content=s.content.map(mapper)}else i.content=s.content;else i.content=s.content;return i}throw new Zh(\"Value provided to cloneDeep function couldn't be cloned\",{value:s})};cloneDeep.safe=s=>{try{return cloneDeep(s)}catch{return s}};const cloneShallowKeyValuePair=s=>{const{key:i,value:u}=s;return new gp.KeyValuePair(i,u)},cloneShallowElement=s=>{const i=new s.constructor;if(i.element=s.element,s.meta.length>0&&(i._meta=cloneDeep(s.meta)),s.attributes.length>0&&(i._attributes=cloneDeep(s.attributes)),Up(s.content)){const u=s.content;i.content=cloneShallowElement(u)}else Array.isArray(s.content)?i.content=[...s.content]:s.content instanceof gp.KeyValuePair?i.content=cloneShallowKeyValuePair(s.content):i.content=s.content;return i},cloneShallow=s=>{if(s instanceof gp.KeyValuePair)return cloneShallowKeyValuePair(s);if(s instanceof gp.ot)return(s=>{const i=[...s];return new gp.ot(i)})(s);if(s instanceof gp.G6)return(s=>{const i=[...s];return new gp.G6(i)})(s);if(Up(s))return cloneShallowElement(s);throw new td(\"Value provided to cloneShallow function couldn't be cloned\",{value:s})};cloneShallow.safe=s=>{try{return cloneShallow(s)}catch{return s}};const visitor_getNodeType=s=>Hp(s)?\"ObjectElement\":Jp(s)?\"ArrayElement\":Gp(s)?\"MemberElement\":zp(s)?\"StringElement\":Kp(s)?\"BooleanElement\":Vp(s)?\"NumberElement\":Wp(s)?\"NullElement\":Yp(s)?\"LinkElement\":Xp(s)?\"RefElement\":void 0,visitor_cloneNode=s=>Up(s)?cloneShallow(s):cloneNode(s),sd=pipe(visitor_getNodeType,wu),id={ObjectElement:[\"content\"],ArrayElement:[\"content\"],MemberElement:[\"key\",\"value\"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:[\"content\"],SourceMap:[\"content\"]};class PredicateVisitor{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:s=es_F,returnOnTrue:i,returnOnFalse:u}={}){this.result=[],this.predicate=s,this.returnOnTrue=i,this.returnOnFalse=u}enter(s){return this.predicate(s)?(this.result.push(s),this.returnOnTrue):this.returnOnFalse}}const visitor_visit=(s,i,{keyMap:u=id,..._}={})=>visit(s,i,{keyMap:u,nodeTypeGetter:visitor_getNodeType,nodePredicate:sd,nodeCloneFn:visitor_cloneNode,..._});visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,i,{keyMap:u=id,..._}={})=>visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,i,{keyMap:u,nodeTypeGetter:visitor_getNodeType,nodePredicate:sd,nodeCloneFn:visitor_cloneNode,..._});const ld={toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType,exposeEdits:!0}},dispatchPlugins=(s,i,u={})=>{if(0===i.length)return s;const _=kp(ld,u),{toolboxCreator:w,visitorOptions:x}=_,j=w(),P=i.map((s=>s(j))),B=mergeAll(P.map(_c({},\"visitor\")),{...x});P.forEach(Lp([\"pre\"],[]));const $=visitor_visit(s,B,x);return P.forEach(Lp([\"post\"],[])),$},refract=(s,{Type:i,plugins:u=[]})=>{const _=new i(s);return Up(s)&&(s.meta.length>0&&(_.meta=cloneDeep(s.meta)),s.attributes.length>0&&(_.attributes=cloneDeep(s.attributes))),dispatchPlugins(_,u,{toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType}})},createRefractor=s=>(i,u={})=>refract(i,{...u,Type:s});gp.Sh.refract=createRefractor(gp.Sh),gp.wE.refract=createRefractor(gp.wE),gp.Om.refract=createRefractor(gp.Om),gp.bd.refract=createRefractor(gp.bd),gp.Os.refract=createRefractor(gp.Os),gp.kT.refract=createRefractor(gp.kT),gp.Ft.refract=createRefractor(gp.Ft),gp.sI.refract=createRefractor(gp.sI),yp.refract=createRefractor(yp),vp.refract=createRefractor(vp),bp.refract=createRefractor(bp),_p.refract=createRefractor(_p);const computeEdges=(s,i=new WeakMap)=>(Gp(s)?(i.set(s.key,s),computeEdges(s.key,i),i.set(s.value,s),computeEdges(s.value,i)):s.children.forEach((u=>{i.set(u,s),computeEdges(u,i)})),i);const cd=class Transcluder_Transcluder{element;edges;constructor({element:s}){this.element=s}transclude(s,i){var u;if(s===this.element)return i;if(s===i)return this.element;this.edges=null!==(u=this.edges)&&void 0!==u?u:computeEdges(this.element);const _=this.edges.get(s);return lu(_)?void 0:(Hp(_)?((s,i,u)=>{const _=u.get(s);Hp(_)&&(_.content=_.map(((w,x,j)=>j===s?(u.delete(s),u.set(i,_),i):j)))})(s,i,this.edges):Jp(_)?((s,i,u)=>{const _=u.get(s);Jp(_)&&(_.content=_.map((w=>w===s?(u.delete(s),u.set(i,_),i):w)))})(s,i,this.edges):Gp(_)&&((s,i,u)=>{const _=u.get(s);Gp(_)&&(_.key===s&&(_.key=i,u.delete(s),u.set(i,_)),_.value===s&&(_.value=i,u.delete(s),u.set(i,_)))})(s,i,this.edges),this.element)}};const es_T=function(){return!0},nodeTypeGetter=s=>\"string\"==typeof(null==s?void 0:s.type)?s.type:visitor_getNodeType(s),ud={EphemeralObject:[\"content\"],EphemeralArray:[\"content\"],...id},value_visitor_visit=(s,i,{keyMap:u=ud,..._}={})=>visitor_visit(s,i,{keyMap:u,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),..._});value_visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,{keyMap:i=ud,...u}={})=>visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,visitor,{keyMap:i,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...u});const dd=class EphemeralArray{type=\"EphemeralArray\";content=[];reference=void 0;constructor(s){this.content=s,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const md=class EphemeralObject{type=\"EphemeralObject\";content=[];reference=void 0;constructor(s){this.content=s,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class Visitor{ObjectElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const i=new md(s.content);return this.references.set(s,i),i}};EphemeralObject={leave:s=>s.toObject()};MemberElement={enter:s=>[s.key,s.value]};ArrayElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const i=new dd(s.content);return this.references.set(s,i),i}};EphemeralArray={leave:s=>s.toArray()};references=new WeakMap;BooleanElement(s){return s.toValue()}NumberElement(s){return s.toValue()}StringElement(s){return s.toValue()}NullElement(){return null}RefElement(s,...i){var u;const _=i[3];return\"EphemeralObject\"===(null===(u=_[_.length-1])||void 0===u?void 0:u.type)?Symbol.for(\"delete-node\"):String(s.toValue())}LinkElement(s){return zp(s.href)?s.href.toValue():\"\"}}const serializers_value=s=>Up(s)?zp(s)||Vp(s)||Kp(s)||Wp(s)?s.toValue():value_visitor_visit(s,new Visitor):s,yd=pipe(bu(/~/g,\"~0\"),bu(/\\//g,\"~1\"),encodeURIComponent);const vd=class JsonPointerError extends Gh{};const _d=class CompilationJsonPointerError extends vd{tokens;constructor(s,i){super(s,i),void 0!==i&&(this.tokens=[...i.tokens])}},es_compile=s=>{try{return 0===s.length?\"\":`/${s.map(yd).join(\"/\")}`}catch(i){throw new _d(\"JSON Pointer compilation of tokens encountered an error.\",{tokens:s,cause:i})}};var Ed=_curry2((function converge(s,i){return Oc(pc(uu,0,hu(\"length\",i)),(function(){var u=arguments,_=this;return s.apply(_,_map((function(s){return s.apply(_,u)}),i))}))}));const wd=Ed;function _identity(s){return s}const Sd=_curry1(_identity);var xd=Ip(Oc(1,pipe(zl,fu(\"Number\"))),isFinite);var kd=Oc(1,xd);var Od=Ip(yu(Number.isFinite)?Oc(1,ic(Number.isFinite,Number)):kd,wd(Vl,[Math.floor,Sd]));var Cd=Oc(1,Od);const Ad=yu(Number.isInteger)?Oc(1,ic(Number.isInteger,Number)):Cd;var Id=function(){function XTake(s,i){this.xf=i,this.n=s,this.i=0}return XTake.prototype[\"@@transducer/init\"]=_xfBase_init,XTake.prototype[\"@@transducer/result\"]=_xfBase_result,XTake.prototype[\"@@transducer/step\"]=function(s,i){this.i+=1;var u=0===this.n?s:this.xf[\"@@transducer/step\"](s,i);return this.n>=0&&this.i>=this.n?_reduced(u):u},XTake}();function _xtake(s){return function(i){return new Id(s,i)}}const Nd=_curry2(_dispatchable([\"take\"],_xtake,(function take(s,i){return dc(0,s<0?1/0:s,i)})));var Md=_curry2((function(s,i){return Vl(Nd(s.length,i),s)}));const Td=Md;const Rd=Vl(\"\");var Dd=function(){function XDropWhile(s,i){this.xf=i,this.f=s}return XDropWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropWhile.prototype[\"@@transducer/result\"]=_xfBase_result,XDropWhile.prototype[\"@@transducer/step\"]=function(s,i){if(this.f){if(this.f(i))return s;this.f=null}return this.xf[\"@@transducer/step\"](s,i)},XDropWhile}();function _xdropWhile(s){return function(i){return new Dd(s,i)}}const Bd=_curry2(_dispatchable([\"dropWhile\"],_xdropWhile,(function dropWhile(s,i){for(var u=0,_=i.length;u<_&&s(i[u]);)u+=1;return dc(u,1/0,i)})));const Ld=Pc((function(s,i){return pipe(Nc(\"\"),Bd(qc(s)),Lc(\"\"))(i)})),Fd=pipe(bu(/~1/g,\"/\"),bu(/~0/g,\"~\"),(s=>{try{return decodeURIComponent(s)}catch{return s}}));const $d=class InvalidJsonPointerError extends vd{pointer;constructor(s,i){super(s,i),void 0!==i&&(this.pointer=i.pointer)}},uriToPointer=s=>{const i=(s=>{const i=s.indexOf(\"#\");return-1!==i?s.substring(i):\"#\"})(s);return Ld(\"#\",i)},es_parse=s=>{if(Rd(s))return[];if(!Td(\"/\",s))throw new $d(`Invalid JSON Pointer \"${s}\". JSON Pointers must begin with \"/\"`,{pointer:s});try{const i=pipe(Nc(\"/\"),Qc(Fd))(s);return fc(i)}catch(i){throw new $d(`JSON Pointer parsing of \"${s}\" encountered an error.`,{pointer:s,cause:i})}};const Ud=class EvaluationJsonPointerError extends vd{pointer;tokens;failedToken;failedTokenPosition;element;constructor(s,i){super(s,i),void 0!==i&&(this.pointer=i.pointer,Array.isArray(i.tokens)&&(this.tokens=[...i.tokens]),this.failedToken=i.failedToken,this.failedTokenPosition=i.failedTokenPosition,this.element=i.element)}},es_evaluate=(s,i)=>{let u;try{u=es_parse(s)}catch(u){throw new Ud(`JSON Pointer evaluation failed while parsing the pointer \"${s}\".`,{pointer:s,element:cloneDeep(i),cause:u})}return u.reduce(((i,_,w)=>{if(Hp(i)){if(!i.hasKey(_))throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an ObjectElement`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)});return i.get(_)}if(Jp(i)){if(!(_ in i.content)||!Ad(Number(_)))throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an ArrayElement`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)});return i.get(Number(_))}throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an unexpected Element`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)})}),i)};class Callback extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"callback\"}}const Vd=Callback;class Components extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"components\"}get schemas(){return this.get(\"schemas\")}set schemas(s){this.set(\"schemas\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get requestBodies(){return this.get(\"requestBodies\")}set requestBodies(s){this.set(\"requestBodies\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get securitySchemes(){return this.get(\"securitySchemes\")}set securitySchemes(s){this.set(\"securitySchemes\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}}const Wd=Components;class Contact extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"contact\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get email(){return this.get(\"email\")}set email(s){this.set(\"email\",s)}}const Kd=Contact;class Discriminator extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"discriminator\"}get propertyName(){return this.get(\"propertyName\")}set propertyName(s){this.set(\"propertyName\",s)}get mapping(){return this.get(\"mapping\")}set mapping(s){this.set(\"mapping\",s)}}const Hd=Discriminator;class Encoding extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"encoding\"}get contentType(){return this.get(\"contentType\")}set contentType(s){this.set(\"contentType\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowedReserved(){return this.get(\"allowedReserved\")}set allowedReserved(s){this.set(\"allowedReserved\",s)}}const Jd=Encoding;class Example extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"example\"}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get value(){return this.get(\"value\")}set value(s){this.set(\"value\",s)}get externalValue(){return this.get(\"externalValue\")}set externalValue(s){this.set(\"externalValue\",s)}}const Gd=Example;class ExternalDocumentation extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"externalDocumentation\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Yd=ExternalDocumentation;class Header extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"header\"}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Header.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const Xd=Header;class Info extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"info\",this.classes.push(\"info\")}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get termsOfService(){return this.get(\"termsOfService\")}set termsOfService(s){this.set(\"termsOfService\",s)}get contact(){return this.get(\"contact\")}set contact(s){this.set(\"contact\",s)}get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get version(){return this.get(\"version\")}set version(s){this.set(\"version\",s)}}const Qd=Info;class License extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"license\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Zd=License;class Link extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"link\"}get operationRef(){return this.get(\"operationRef\")}set operationRef(s){this.set(\"operationRef\",s)}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get operation(){var s,i;return zp(this.operationRef)?null===(s=this.operationRef)||void 0===s?void 0:s.meta.get(\"operation\"):zp(this.operationId)?null===(i=this.operationId)||void 0===i?void 0:i.meta.get(\"operation\"):void 0}set operation(s){this.set(\"operation\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get server(){return this.get(\"server\")}set server(s){this.set(\"server\",s)}}const ef=Link;class MediaType extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"mediaType\"}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get encoding(){return this.get(\"encoding\")}set encoding(s){this.set(\"encoding\",s)}}const rf=MediaType;class OAuthFlow extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"oAuthFlow\"}get authorizationUrl(){return this.get(\"authorizationUrl\")}set authorizationUrl(s){this.set(\"authorizationUrl\",s)}get tokenUrl(){return this.get(\"tokenUrl\")}set tokenUrl(s){this.set(\"tokenUrl\",s)}get refreshUrl(){return this.get(\"refreshUrl\")}set refreshUrl(s){this.set(\"refreshUrl\",s)}get scopes(){return this.get(\"scopes\")}set scopes(s){this.set(\"scopes\",s)}}const of=OAuthFlow;class OAuthFlows extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"oAuthFlows\"}get implicit(){return this.get(\"implicit\")}set implicit(s){this.set(\"implicit\",s)}get password(){return this.get(\"password\")}set password(s){this.set(\"password\",s)}get clientCredentials(){return this.get(\"clientCredentials\")}set clientCredentials(s){this.set(\"clientCredentials\",s)}get authorizationCode(){return this.get(\"authorizationCode\")}set authorizationCode(s){this.set(\"authorizationCode\",s)}}const af=OAuthFlows;class Openapi extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"openapi\",this.classes.push(\"spec-version\"),this.classes.push(\"version\")}}const lf=Openapi;class OpenApi3_0 extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"openApi3_0\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const cf=OpenApi3_0;class Operation extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"operation\"}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}set externalDocs(s){this.set(\"externalDocs\",s)}get externalDocs(){return this.get(\"externalDocs\")}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get servers(){return this.get(\"severs\")}set servers(s){this.set(\"servers\",s)}}const uf=Operation;class Parameter extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"parameter\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Parameter.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const hf=Parameter;class PathItem extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"pathItem\"}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}}const df=PathItem;class Paths extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"paths\"}}const mf=Paths;class Reference extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"reference\",this.classes.push(\"openapi-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const gf=Reference;class RequestBody extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"requestBody\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}}const yf=RequestBody;class Response_Response extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"response\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}}const bf=Response_Response;class Responses extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"responses\"}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}}const _f=Responses;const Sf=class UnsupportedOperationError extends Vh{};class JSONSchema extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"JSONSchemaDraft4\"}get idProp(){return this.get(\"id\")}set idProp(s){this.set(\"id\",s)}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get dependencies(){return this.get(\"dependencies\")}set dependencies(s){this.set(\"dependencies\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){return this.get(\"definitions\")}set definitions(s){this.set(\"definitions\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get base(){return this.get(\"base\")}set base(s){this.set(\"base\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get media(){return this.get(\"media\")}set media(s){this.set(\"media\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}}const xf=JSONSchema;class JSONReference extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"JSONReference\",this.classes.push(\"json-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const kf=JSONReference;class Media extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"media\"}get binaryEncoding(){return this.get(\"binaryEncoding\")}set binaryEncoding(s){this.set(\"binaryEncoding\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}}const Of=Media;class LinkDescription extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"linkDescription\"}get href(){return this.get(\"href\")}set href(s){this.set(\"href\",s)}get rel(){return this.get(\"rel\")}set rel(s){this.set(\"rel\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){return this.get(\"mediaType\")}set mediaType(s){this.set(\"mediaType\",s)}get method(){return this.get(\"method\")}set method(s){this.set(\"method\",s)}get encType(){return this.get(\"encType\")}set encType(s){this.set(\"encType\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}}const Cf=LinkDescription;var jf=_curry2((function mapObjIndexed(s,i){return _arrayReduce((function(u,_){return u[_]=s(i[_],_,i),u}),{},Ul(i))}));const Pf=jf;const Nf=_curry1((function isNil(s){return null==s}));const Tf=_curry2((function hasPath(s,i){if(0===s.length||Nf(i))return!1;for(var u=i,_=0;_<s.length;){if(Nf(u)||!_has(s[_],u))return!1;u=u[s[_]],_+=1}return!0}));var Rf=_curry2((function has(s,i){return Tf([s],i)}));const Df=Rf;const Ff=_curry3((function propSatisfies(s,i,u){return s(bc(i,u))})),dereference=(s,i)=>{const u=gc(s,i);return Pf((s=>{if(Dh(s)&&Df(\"$ref\",s)&&Ff(wu,\"$ref\",s)){const i=Il([\"$ref\"],s),_=Ld(\"#/\",i);return Il(_.split(\"/\"),u)}return Dh(s)?dereference(s,u):s}),s)};var Vf=__webpack_require__(12646);const emptyElement=s=>{const i=s.meta.length>0?cloneDeep(s.meta):void 0,u=s.attributes.length>0?cloneDeep(s.attributes):void 0;return new s.constructor(void 0,i,u)},cloneUnlessOtherwiseSpecified=(s,i)=>i.clone&&i.isMergeableElement(s)?deepmerge(emptyElement(s),s,i):s,getMetaMergeFunction=s=>\"function\"!=typeof s.customMetaMerge?s=>cloneDeep(s):s.customMetaMerge,getAttributesMergeFunction=s=>\"function\"!=typeof s.customAttributesMerge?s=>cloneDeep(s):s.customAttributesMerge,Wf={clone:!0,isMergeableElement:s=>Hp(s)||Jp(s),arrayElementMerge:(s,i,u)=>s.concat(i)[\"fantasy-land/map\"]((s=>cloneUnlessOtherwiseSpecified(s,u))),objectElementMerge:(s,i,u)=>{const _=Hp(s)?emptyElement(s):emptyElement(i);return Hp(s)&&s.forEach(((s,i,w)=>{const x=cloneShallow(w);x.value=cloneUnlessOtherwiseSpecified(s,u),_.content.push(x)})),i.forEach(((i,w,x)=>{const j=serializers_value(w);let P;if(Hp(s)&&s.hasKey(j)&&u.isMergeableElement(i)){const _=s.get(j);P=cloneShallow(x),P.value=((s,i)=>{if(\"function\"!=typeof i.customMerge)return deepmerge;const u=i.customMerge(s,i);return\"function\"==typeof u?u:deepmerge})(w,u)(_,i)}else P=cloneShallow(x),P.value=cloneUnlessOtherwiseSpecified(i,u);_.remove(j),_.content.push(P)})),_},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function deepmerge(s,i,u){var _,w,x;const j={...Wf,...u};j.isMergeableElement=null!==(_=j.isMergeableElement)&&void 0!==_?_:Wf.isMergeableElement,j.arrayElementMerge=null!==(w=j.arrayElementMerge)&&void 0!==w?w:Wf.arrayElementMerge,j.objectElementMerge=null!==(x=j.objectElementMerge)&&void 0!==x?x:Wf.objectElementMerge;const P=Jp(i);if(!(P===Jp(s)))return cloneUnlessOtherwiseSpecified(i,j);const B=P&&\"function\"==typeof j.arrayElementMerge?j.arrayElementMerge(s,i,j):j.objectElementMerge(s,i,j);return B.meta=getMetaMergeFunction(j)(s.meta,i.meta),B.attributes=getAttributesMergeFunction(j)(s.attributes,i.attributes),B}deepmerge.all=(s,i)=>{if(!Array.isArray(s))throw new TypeError(\"First argument of deepmerge should be an array.\");return 0===s.length?new gp.Sh:s.reduce(((s,u)=>deepmerge(s,u,i)),emptyElement(s[0]))};const Hf=Vf({props:{element:null},methods:{copyMetaAndAttributes(s,i){(s.meta.length>0||i.meta.length>0)&&(i.meta=deepmerge(i.meta,s.meta),hasElementSourceMap(s)&&i.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(i.attributes=deepmerge(i.attributes,s.attributes))}}}),Jf=Hf,Gf=Vf(Jf,{methods:{enter(s){return this.element=cloneDeep(s),Yh}}});const Xf=iu(au());const Qf=_curry2((function pick(s,i){for(var u={},_=0;_<s.length;)s[_]in i&&(u[s[_]]=i[s[_]]),_+=1;return u})),em=Vf(Jf,{props:{specObj:null,passingOptionsNames:[\"specObj\"]},init({specObj:s=this.specObj}){this.specObj=s},methods:{retrievePassingOptions(){return Qf(this.passingOptionsNames,this)},retrieveFixedFields(s){const i=Il([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof i&&null!==i?Object.keys(i):[]},retrieveVisitor(s){return Nl(yu,[\"visitors\",...s],this.specObj)?Il([\"visitors\",...s],this.specObj):Il([\"visitors\",...s,\"$visitor\"],this.specObj)},retrieveVisitorInstance(s,i={}){const u=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...u,...i})},toRefractedElement(s,i,u={}){const _=this.retrieveVisitorInstance(s,u),w=Object.getPrototypeOf(_);return lu(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance([\"value\"]))),this.fallbackVisitorPrototype===w?cloneDeep(i):(visitor_visit(i,_,u),_.element)}}}),tm=Vf(em,{props:{specPath:Xf,ignoredFields:[]},init({specPath:s=this.specPath,ignoredFields:i=this.ignoredFields}={}){this.specPath=s,this.ignoredFields=i},methods:{ObjectElement(s){const i=this.specPath(s),u=this.retrieveFixedFields(i);return s.forEach(((s,_,w)=>{if(zp(_)&&u.includes(serializers_value(_))&&!this.ignoredFields.includes(serializers_value(_))){const u=this.toRefractedElement([...i,\"fixedFields\",serializers_value(_)],s),x=new gp.Pr(cloneDeep(_),u);this.copyMetaAndAttributes(w,x),x.classes.push(\"fixed-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(_))||this.element.content.push(cloneDeep(w))})),this.copyMetaAndAttributes(s,this.element),Yh}}}),rm=Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"JSONSchema\"])},init(){this.element=new xf}}),nm=Gf,om=Gf,sm=Gf,im=Gf,am=Gf,lm=Gf,cm=Gf,um=Gf,pm=Gf,hm=Gf,dm=Vf({props:{parent:null},init({parent:s=this.parent}){this.parent=s,this.passingOptionsNames=[...this.passingOptionsNames,\"parent\"]}}),isJSONReferenceLikeElement=s=>Hp(s)&&s.hasKey(\"$ref\"),fm=Vf(em,dm,Gf,{methods:{ObjectElement(s){const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"];return this.element=this.toRefractedElement(i,s),Yh},ArrayElement(s){return this.element=new gp.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),mm=Gf,gm=Gf,ym=Gf,vm=Gf,bm=Gf,_m=Vf(Gf,{methods:{ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-required\"),Yh}}});const Em=_curry1((function allPass(s){return Oc(pc(uu,0,hu(\"length\",s)),(function(){for(var i=0,u=s.length;i<u;){if(!s[i].apply(this,arguments))return!1;i+=1}return!0}))}));const wm=_curry2((function or(s,i){return s||i}));const Sm=su(Oc(1,Ip(Eh,_curry2((function either(s,i){return _isFunction(s)?function _either(){return s.apply(this,arguments)||i.apply(this,arguments)}:ou(wm)(s,i)}))(Sh,yu))));const xm=su(Tp);const km=Em([wu,Sm,xm]),Om=Vf(em,{props:{fieldPatternPredicate:es_F,specPath:Xf,ignoredFields:[]},init({specPath:s=this.specPath,ignoredFields:i=this.ignoredFields}={}){this.specPath=s,this.ignoredFields=i},methods:{ObjectElement(s){return s.forEach(((s,i,u)=>{if(!this.ignoredFields.includes(serializers_value(i))&&this.fieldPatternPredicate(serializers_value(i))){const _=this.specPath(s),w=this.toRefractedElement(_,s),x=new gp.Pr(cloneDeep(i),w);this.copyMetaAndAttributes(u,x),x.classes.push(\"patterned-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(i))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Cm=Vf(Om,{props:{fieldPatternPredicate:km}}),Am=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-properties\")}}),jm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-patternProperties\")}}),Pm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-dependencies\")}}),Im=Vf(Gf,{methods:{ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-enum\"),Yh}}}),Nm=Vf(Gf,{methods:{StringElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-type\"),Yh},ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-type\"),Yh}}}),Mm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-allOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Tm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-anyOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Rm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-oneOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Dm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-definitions\")}}),Bm=Gf,Lm=Gf,Fm=Gf,qm=Gf,$m=Gf,Um=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-links\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=this.toRefractedElement([\"document\",\"objects\",\"LinkDescription\"],s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),zm=Gf,Vm=Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"JSONReference\"])},init(){this.element=new kf},methods:{ObjectElement(s){const i=tm.compose.methods.ObjectElement.call(this,s);return zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}}),Wm=Vf(Gf,{methods:{StringElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"reference-value\"),Yh}}});const Km=_curry3((function ifElse(s,i,u){return Oc(Math.max(s.length,i.length,u.length),(function _ifElse(){return s.apply(this,arguments)?i.apply(this,arguments):u.apply(this,arguments)}))}));const Hm=_curry1((function comparator(s){return function(i,u){return s(i,u)?-1:s(u,i)?1:0}}));var Jm=_curry2((function sort(s,i){return Array.prototype.slice.call(i,0).sort(s)}));const Gm=Jm;const Ym=Cl(0);const Xm=_curry1(_reduced);const Qm=su(Nf);const Zm=Ip(Rp,xm);function dispatch_toConsumableArray(s){return function dispatch_arrayWithoutHoles(s){if(Array.isArray(s))return dispatch_arrayLikeToArray(s)}(s)||function dispatch_iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function dispatch_unsupportedIterableToArray(s,i){if(!s)return;if(\"string\"==typeof s)return dispatch_arrayLikeToArray(s,i);var u=Object.prototype.toString.call(s).slice(8,-1);\"Object\"===u&&s.constructor&&(u=s.constructor.name);if(\"Map\"===u||\"Set\"===u)return Array.from(s);if(\"Arguments\"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return dispatch_arrayLikeToArray(s,i)}(s)||function dispatch_nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function dispatch_arrayLikeToArray(s,i){(null==i||i>s.length)&&(i=s.length);for(var u=0,_=new Array(i);u<i;u++)_[u]=s[u];return _}var eg=pipe(Gm(Hm((function(s,i){return s.length>i.length}))),Ym,bc(\"length\")),rg=Pc((function(s,i,u){var _=u.apply(void 0,dispatch_toConsumableArray(s));return Qm(_)?Xm(_):i}));const ng=Km(Zm,(function dispatchImpl(s){var i=eg(s);return Oc(i,(function(){for(var i=arguments.length,u=new Array(i),_=0;_<i;_++)u[_]=arguments[_];return pc(rg(u),void 0,s)}))}),au),og=Vf(em,{props:{alternator:[]},methods:{enter(s){const i=this.alternator.map((({predicate:s,specPath:i})=>Km(s,iu(i),au))),u=ng(i)(s);return this.element=this.toRefractedElement(u,s),Yh}}}),sg=Vf(og,{props:{alternator:[{predicate:isJSONReferenceLikeElement,specPath:[\"document\",\"objects\",\"JSONReference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"JSONSchema\"]}]}}),lg={visitors:{value:Gf,JSONSchemaOrJSONReferenceVisitor:sg,document:{objects:{JSONSchema:{$visitor:rm,fixedFields:{id:nm,$schema:om,multipleOf:sm,maximum:im,exclusiveMaximum:am,minimum:lm,exclusiveMinimum:cm,maxLength:um,minLength:pm,pattern:hm,additionalItems:sg,items:fm,maxItems:mm,minItems:gm,uniqueItems:ym,maxProperties:vm,minProperties:bm,required:_m,properties:Am,additionalProperties:sg,patternProperties:jm,dependencies:Pm,enum:Im,type:Nm,allOf:Mm,anyOf:Tm,oneOf:Rm,not:sg,definitions:Dm,title:Bm,description:Lm,default:Fm,format:qm,base:$m,links:Um,media:{$ref:\"#/visitors/document/objects/Media\"},readOnly:zm}},JSONReference:{$visitor:Vm,fixedFields:{$ref:Wm}},Media:{$visitor:Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"Media\"])},init(){this.element=new Of}}),fixedFields:{binaryEncoding:Gf,type:Gf}},LinkDescription:{$visitor:Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"LinkDescription\"])},init(){this.element=new Cf}}),fixedFields:{href:Gf,rel:Gf,title:Gf,targetSchema:sg,mediaType:Gf,method:Gf,encType:Gf,schema:sg}}}}}},traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},pg={JSONSchemaDraft4Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...id},fg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof xf||s(_)&&i(\"JSONSchemaDraft4\",_)&&u(\"object\",_))),mg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kf||s(_)&&i(\"JSONReference\",_)&&u(\"object\",_))),gg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Of||s(_)&&i(\"media\",_)&&u(\"object\",_))),yg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Cf||s(_)&&i(\"linkDescription\",_)&&u(\"object\",_))),_g={namespace:s=>{const{base:i}=s;return i.register(\"jSONSchemaDraft4\",xf),i.register(\"jSONReference\",kf),i.register(\"media\",Of),i.register(\"linkDescription\",Cf),i}},xg=_g,refractor_toolbox=()=>{const s=createNamespace(xg);return{predicates:{...fe,isStringElement:zp},namespace:s}},refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:u=[],specificationObj:_=lg}={})=>{const w=(0,gp.e)(s),x=dereference(_),j=Lp(i,[],x);return visitor_visit(w,j,{state:{specObj:x}}),dispatchPlugins(j.element,u,{toolboxCreator:refractor_toolbox,visitorOptions:{keyMap:pg,nodeTypeGetter:traversal_visitor_getNodeType}})},refractor_createRefractor=s=>(i,u={})=>refractor_refract(i,{specPath:s,...u});xf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),kf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),Of.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Media\",\"$visitor\"]),Cf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const kg=class Schema_Schema extends xf{constructor(s,i,u){super(s,i,u),this.element=\"schema\",this.classes.push(\"json-schema-draft-4\")}get idProp(){throw new Sf(\"idProp getter in Schema class is not not supported.\")}set idProp(s){throw new Sf(\"idProp setter in Schema class is not not supported.\")}get $schema(){throw new Sf(\"$schema getter in Schema class is not not supported.\")}set $schema(s){throw new Sf(\"$schema setter in Schema class is not not supported.\")}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){throw new Sf(\"patternProperties getter in Schema class is not not supported.\")}set patternProperties(s){throw new Sf(\"patternProperties setter in Schema class is not not supported.\")}get dependencies(){throw new Sf(\"dependencies getter in Schema class is not not supported.\")}set dependencies(s){throw new Sf(\"dependencies setter in Schema class is not not supported.\")}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){throw new Sf(\"definitions getter in Schema class is not not supported.\")}set definitions(s){throw new Sf(\"definitions setter in Schema class is not not supported.\")}get base(){throw new Sf(\"base getter in Schema class is not not supported.\")}set base(s){throw new Sf(\"base setter in Schema class is not not supported.\")}get links(){throw new Sf(\"links getter in Schema class is not not supported.\")}set links(s){throw new Sf(\"links setter in Schema class is not not supported.\")}get media(){throw new Sf(\"media getter in Schema class is not not supported.\")}set media(s){throw new Sf(\"media setter in Schema class is not not supported.\")}get nullable(){return this.get(\"nullable\")}set nullable(s){this.set(\"nullable\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}};class SecurityRequirement extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"securityRequirement\"}}const Og=SecurityRequirement;class SecurityScheme extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"securityScheme\"}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get scheme(){return this.get(\"scheme\")}set scheme(s){this.set(\"scheme\",s)}get bearerFormat(){return this.get(\"bearerFormat\")}set bearerFormat(s){this.set(\"bearerFormat\",s)}get flows(){return this.get(\"flows\")}set flows(s){this.set(\"flows\",s)}get openIdConnectUrl(){return this.get(\"openIdConnectUrl\")}set openIdConnectUrl(s){this.set(\"openIdConnectUrl\",s)}}const Pg=SecurityScheme;class Server extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"server\"}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get variables(){return this.get(\"variables\")}set variables(s){this.set(\"variables\",s)}}const Ng=Server;class ServerVariable extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"serverVariable\"}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}}const Mg=ServerVariable;class Tag extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"tag\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const qg=Tag;class Xml extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"xml\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get namespace(){return this.get(\"namespace\")}set namespace(s){this.set(\"namespace\",s)}get prefix(){return this.get(\"prefix\")}set prefix(s){this.set(\"prefix\",s)}get attribute(){return this.get(\"attribute\")}set attribute(s){this.set(\"attribute\",s)}get wrapped(){return this.get(\"wrapped\")}set wrapped(s){this.set(\"wrapped\",s)}}const $g=Xml,copyProps=(s,i,u=[])=>{const _=Object.getOwnPropertyDescriptors(i);for(let s of u)delete _[s];Object.defineProperties(s,_)},protoChain=(s,i=[s])=>{const u=Object.getPrototypeOf(s);return null===u?i:protoChain(u,[...i,u])},hardMixProtos=(s,i,u=[])=>{var _;const w=null!==(_=((...s)=>{if(0===s.length)return;let i;const u=s.map((s=>protoChain(s)));for(;u.every((s=>s.length>0));){const s=u.map((s=>s.pop())),_=s[0];if(!s.every((s=>s===_)))break;i=_}return i})(...s))&&void 0!==_?_:Object.prototype,x=Object.create(w),j=protoChain(w);for(let i of s){let s=protoChain(i);for(let i=s.length-1;i>=0;i--){let _=s[i];-1===j.indexOf(_)&&(copyProps(x,_,[\"constructor\",...u]),j.push(_))}}return x.constructor=i,x},unique=s=>s.filter(((i,u)=>s.indexOf(i)==u)),getIngredientWithProp=(s,i)=>{const u=i.map((s=>protoChain(s)));let _=0,w=!0;for(;w;){w=!1;for(let x=i.length-1;x>=0;x--){const i=u[x][_];if(null!=i&&(w=!0,null!=Object.getOwnPropertyDescriptor(i,s)))return u[x][0]}_++}},proxyMix=(s,i=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>i,setPrototypeOf(){throw Error(\"Cannot set prototype of Proxies created by ts-mixer\")},getOwnPropertyDescriptor:(i,u)=>Object.getOwnPropertyDescriptor(getIngredientWithProp(u,s)||{},u),defineProperty(){throw new Error(\"Cannot define new properties on Proxies created by ts-mixer\")},has:(u,_)=>void 0!==getIngredientWithProp(_,s)||void 0!==i[_],get:(u,_)=>(getIngredientWithProp(_,s)||i)[_],set(i,u,_){const w=getIngredientWithProp(u,s);if(void 0===w)throw new Error(\"Cannot set new properties on Proxies created by ts-mixer\");return w[u]=_,!0},deleteProperty(){throw new Error(\"Cannot delete properties on Proxies created by ts-mixer\")},ownKeys:()=>s.map(Object.getOwnPropertyNames).reduce(((s,i)=>i.concat(s.filter((s=>i.indexOf(s)<0)))))}),Ug=null,zg=\"copy\",Wg=\"copy\",Kg=\"deep\",ey=new WeakMap,getMixinsForClass=s=>ey.get(s),mergeObjectsOfDecorators=(s,i)=>{var u,_;const w=unique([...Object.getOwnPropertyNames(s),...Object.getOwnPropertyNames(i)]),x={};for(let j of w)x[j]=unique([...null!==(u=null==s?void 0:s[j])&&void 0!==u?u:[],...null!==(_=null==i?void 0:i[j])&&void 0!==_?_:[]]);return x},mergePropertyAndMethodDecorators=(s,i)=>{var u,_,w,x;return{property:mergeObjectsOfDecorators(null!==(u=null==s?void 0:s.property)&&void 0!==u?u:{},null!==(_=null==i?void 0:i.property)&&void 0!==_?_:{}),method:mergeObjectsOfDecorators(null!==(w=null==s?void 0:s.method)&&void 0!==w?w:{},null!==(x=null==i?void 0:i.method)&&void 0!==x?x:{})}},mergeDecorators=(s,i)=>{var u,_,w,x,j,P;return{class:unique([...null!==(u=null==s?void 0:s.class)&&void 0!==u?u:[],...null!==(_=null==i?void 0:i.class)&&void 0!==_?_:[]]),static:mergePropertyAndMethodDecorators(null!==(w=null==s?void 0:s.static)&&void 0!==w?w:{},null!==(x=null==i?void 0:i.static)&&void 0!==x?x:{}),instance:mergePropertyAndMethodDecorators(null!==(j=null==s?void 0:s.instance)&&void 0!==j?j:{},null!==(P=null==i?void 0:i.instance)&&void 0!==P?P:{})}},ty=new Map,deepDecoratorSearch=(...s)=>{const i=((...s)=>{var i;const u=new Set,_=new Set([...s]);for(;_.size>0;)for(let s of _){const w=protoChain(s.prototype).map((s=>s.constructor)),x=[...w,...null!==(i=getMixinsForClass(s))&&void 0!==i?i:[]].filter((s=>!u.has(s)));for(let s of x)_.add(s);u.add(s),_.delete(s)}return[...u]})(...s).map((s=>ty.get(s))).filter((s=>!!s));return 0==i.length?{}:1==i.length?i[0]:i.reduce(((s,i)=>mergeDecorators(s,i)))},getDecoratorsForClass=s=>{let i=ty.get(s);return i||(i={},ty.set(s,i)),i};function Mixin(...s){var i,u,_;const w=s.map((s=>s.prototype)),x=Ug;if(null!==x){const s=w.map((s=>s[x])).filter((s=>\"function\"==typeof s)),i={[x]:function(...i){for(let u of s)u.apply(this,i)}};w.push(i)}function MixedClass(...i){for(const u of s)copyProps(this,new u(...i));null!==x&&\"function\"==typeof this[x]&&this[x].apply(this,i)}var j,P;MixedClass.prototype=\"copy\"===Wg?hardMixProtos(w,MixedClass):(j=w,P=MixedClass,proxyMix([...j,{constructor:P}])),Object.setPrototypeOf(MixedClass,\"copy\"===zg?hardMixProtos(s,null,[\"prototype\"]):proxyMix(s,Function.prototype));let B=MixedClass;if(\"none\"!==Kg){const w=\"deep\"===Kg?deepDecoratorSearch(...s):((...s)=>{const i=s.map((s=>getDecoratorsForClass(s)));return 0===i.length?{}:1===i.length?i[0]:i.reduce(((s,i)=>mergeDecorators(s,i)))})(...s);for(let s of null!==(i=null==w?void 0:w.class)&&void 0!==i?i:[]){const i=s(B);i&&(B=i)}applyPropAndMethodDecorators(null!==(u=null==w?void 0:w.static)&&void 0!==u?u:{},B),applyPropAndMethodDecorators(null!==(_=null==w?void 0:w.instance)&&void 0!==_?_:{},B.prototype)}var $,U;return $=B,U=s,ey.set($,U),B}const applyPropAndMethodDecorators=(s,i)=>{const u=s.property,_=s.method;if(u)for(let s in u)for(let _ of u[s])_(i,s);if(_)for(let s in _)for(let u of _[s])u(i,s,Object.getOwnPropertyDescriptor(i,s))};const ry=class visitors_Visitor_Visitor{element;constructor(s={}){Object.assign(this,s)}copyMetaAndAttributes(s,i){(s.meta.length>0||i.meta.length>0)&&(i.meta=deepmerge(i.meta,s.meta),hasElementSourceMap(s)&&i.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(i.attributes=deepmerge(i.attributes,s.attributes))}};const ny=class FallbackVisitor_FallbackVisitor extends ry{enter(s){return this.element=cloneDeep(s),Yh}};const oy=class SpecificationVisitor_SpecificationVisitor extends ry{specObj;passingOptionsNames=[\"specObj\",\"openApiGenericElement\",\"openApiSemanticElement\"];openApiGenericElement;openApiSemanticElement;constructor({specObj:s,passingOptionsNames:i,openApiGenericElement:u,openApiSemanticElement:_,...w}){super({...w}),this.specObj=s,this.openApiGenericElement=u,this.openApiSemanticElement=_,Array.isArray(i)&&(this.passingOptionsNames=i)}retrievePassingOptions(){return Qf(this.passingOptionsNames,this)}retrieveFixedFields(s){const i=Il([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof i&&null!==i?Object.keys(i):[]}retrieveVisitor(s){return Nl(yu,[\"visitors\",...s],this.specObj)?Il([\"visitors\",...s],this.specObj):Il([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,i={}){const u=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...u,...i})}toRefractedElement(s,i,u={}){const _=this.retrieveVisitorInstance(s,u);return _ instanceof ny&&(null==_?void 0:_.constructor)===ny?cloneDeep(i):(visitor_visit(i,_,u),_.element)}},isReferenceLikeElement=s=>Hp(s)&&s.hasKey(\"$ref\"),sy=Hp,iy=Hp,isOpenApiExtension=s=>zp(s.key)&&Td(\"x-\",serializers_value(s.key));const ay=class FixedFieldsVisitor_FixedFieldsVisitor extends oy{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:i,canSupportSpecificationExtensions:u,specificationExtensionPredicate:_,...w}){super({...w}),this.specPath=s,this.ignoredFields=i||[],\"boolean\"==typeof u&&(this.canSupportSpecificationExtensions=u),\"function\"==typeof _&&(this.specificationExtensionPredicate=_)}ObjectElement(s){const i=this.specPath(s),u=this.retrieveFixedFields(i);return s.forEach(((s,_,w)=>{if(zp(_)&&u.includes(serializers_value(_))&&!this.ignoredFields.includes(serializers_value(_))){const u=this.toRefractedElement([...i,\"fixedFields\",serializers_value(_)],s),x=new gp.Pr(cloneDeep(_),u);this.copyMetaAndAttributes(w,x),x.classes.push(\"fixed-field\"),this.element.content.push(x)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(w)){const s=this.toRefractedElement([\"document\",\"extension\"],w);this.element.content.push(s)}else this.ignoredFields.includes(serializers_value(_))||this.element.content.push(cloneDeep(w))})),this.copyMetaAndAttributes(s,this.element),Yh}};class OpenApi3_0Visitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new cf,this.specPath=iu([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){return ay.prototype.ObjectElement.call(this,s)}}const ly=OpenApi3_0Visitor;class OpenapiVisitor extends(Mixin(oy,ny)){StringElement(s){const i=new lf(serializers_value(s));return this.copyMetaAndAttributes(s,i),this.element=i,Yh}}const cy=OpenapiVisitor;const uy=class SpecificationExtensionVisitor extends oy{MemberElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"specification-extension\"),Yh}};class InfoVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Qd,this.specPath=iu([\"document\",\"objects\",\"Info\"]),this.canSupportSpecificationExtensions=!0}}const py=InfoVisitor;const hy=class VersionVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"api-version\"),this.element.classes.push(\"version\"),i}};class ContactVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Kd,this.specPath=iu([\"document\",\"objects\",\"Contact\"]),this.canSupportSpecificationExtensions=!0}}const dy=ContactVisitor;class LicenseVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Zd,this.specPath=iu([\"document\",\"objects\",\"License\"]),this.canSupportSpecificationExtensions=!0}}const fy=LicenseVisitor;class LinkVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new ef,this.specPath=iu([\"document\",\"objects\",\"Link\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return(zp(this.element.operationId)||zp(this.element.operationRef))&&this.element.classes.push(\"reference-element\"),i}}const my=LinkVisitor;const gy=class OperationRefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};const yy=class OperationIdVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};const vy=class PatternedFieldsVisitor_PatternedFieldsVisitor extends oy{specPath;ignoredFields;fieldPatternPredicate=es_F;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:i,fieldPatternPredicate:u,canSupportSpecificationExtensions:_,specificationExtensionPredicate:w,...x}){super({...x}),this.specPath=s,this.ignoredFields=i||[],\"function\"==typeof u&&(this.fieldPatternPredicate=u),\"boolean\"==typeof _&&(this.canSupportSpecificationExtensions=_),\"function\"==typeof w&&(this.specificationExtensionPredicate=w)}ObjectElement(s){return s.forEach(((s,i,u)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(u)){const s=this.toRefractedElement([\"document\",\"extension\"],u);this.element.content.push(s)}else if(!this.ignoredFields.includes(serializers_value(i))&&this.fieldPatternPredicate(serializers_value(i))){const _=this.specPath(s),w=this.toRefractedElement(_,s),x=new gp.Pr(cloneDeep(i),w);this.copyMetaAndAttributes(u,x),x.classes.push(\"patterned-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(i))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Yh}};const by=class MapVisitor_MapVisitor extends vy{constructor(s){super(s),this.fieldPatternPredicate=km}};class LinkParameters extends gp.Sh{static primaryClass=\"link-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(LinkParameters.primaryClass)}}const _y=LinkParameters;class ParametersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new _y,this.specPath=iu([\"value\"])}}const Ey=ParametersVisitor;class ServerVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Ng,this.specPath=iu([\"document\",\"objects\",\"Server\"]),this.canSupportSpecificationExtensions=!0}}const wy=ServerVisitor;const Sy=class UrlVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"server-url\"),i}};class Servers extends gp.wE{static primaryClass=\"servers\";constructor(s,i,u){super(s,i,u),this.classes.push(Servers.primaryClass)}}const xy=Servers;class ServersVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new xy}ArrayElement(s){return s.forEach((s=>{const i=sy(s)?[\"document\",\"objects\",\"Server\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const ky=ServersVisitor;class ServerVariableVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Mg,this.specPath=iu([\"document\",\"objects\",\"ServerVariable\"]),this.canSupportSpecificationExtensions=!0}}const Oy=ServerVariableVisitor;class ServerVariables extends gp.Sh{static primaryClass=\"server-variables\";constructor(s,i,u){super(s,i,u),this.classes.push(ServerVariables.primaryClass)}}const Cy=ServerVariables;class VariablesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Cy,this.specPath=iu([\"document\",\"objects\",\"ServerVariable\"])}}const Ay=VariablesVisitor;class media_type_MediaTypeVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new rf,this.specPath=iu([\"document\",\"objects\",\"MediaType\"]),this.canSupportSpecificationExtensions=!0}}const jy=media_type_MediaTypeVisitor;const Py=class AlternatingVisitor_AlternatingVisitor extends oy{alternator;constructor({alternator:s,...i}){super({...i}),this.alternator=s||[]}enter(s){const i=this.alternator.map((({predicate:s,specPath:i})=>Km(s,iu(i),au))),u=ng(i)(s);return this.element=this.toRefractedElement(u,s),Yh}},Iy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Vd||s(_)&&i(\"callback\",_)&&u(\"object\",_))),Ny=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Wd||s(_)&&i(\"components\",_)&&u(\"object\",_))),My=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Kd||s(_)&&i(\"contact\",_)&&u(\"object\",_))),Ty=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Gd||s(_)&&i(\"example\",_)&&u(\"object\",_))),Ry=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Yd||s(_)&&i(\"externalDocumentation\",_)&&u(\"object\",_))),Dy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Xd||s(_)&&i(\"header\",_)&&u(\"object\",_))),By=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Qd||s(_)&&i(\"info\",_)&&u(\"object\",_))),Ly=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Zd||s(_)&&i(\"license\",_)&&u(\"object\",_))),Fy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof ef||s(_)&&i(\"link\",_)&&u(\"object\",_))),qy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof lf||s(_)&&i(\"openapi\",_)&&u(\"string\",_))),$y=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof cf||s(w)&&i(\"openApi3_0\",w)&&u(\"object\",w)&&_(\"api\",w))),Uy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof uf||s(_)&&i(\"operation\",_)&&u(\"object\",_))),zy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof hf||s(_)&&i(\"parameter\",_)&&u(\"object\",_))),Vy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof df||s(_)&&i(\"pathItem\",_)&&u(\"object\",_))),Wy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof mf||s(_)&&i(\"paths\",_)&&u(\"object\",_))),Ky=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gf||s(_)&&i(\"reference\",_)&&u(\"object\",_))),Hy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yf||s(_)&&i(\"requestBody\",_)&&u(\"object\",_))),Jy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bf||s(_)&&i(\"response\",_)&&u(\"object\",_))),Gy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _f||s(_)&&i(\"responses\",_)&&u(\"object\",_))),Yy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kg||s(_)&&i(\"schema\",_)&&u(\"object\",_))),isBooleanJsonSchemaElement=s=>Kp(s)&&s.classes.includes(\"boolean-json-schema\"),Xy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Og||s(_)&&i(\"securityRequirement\",_)&&u(\"object\",_))),Qy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Pg||s(_)&&i(\"securityScheme\",_)&&u(\"object\",_))),Zy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Ng||s(_)&&i(\"server\",_)&&u(\"object\",_))),ev=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Mg||s(_)&&i(\"serverVariable\",_)&&u(\"object\",_))),tv=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof rf||s(_)&&i(\"mediaType\",_)&&u(\"object\",_))),rv=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof xy||s(w)&&i(\"array\",w)&&u(\"array\",w)&&_(\"servers\",w)));class SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const nv=SchemaVisitor;class ExamplesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"examples\"),this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"],this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),i}}const ov=ExamplesVisitor;class MediaTypeExamples extends gp.Sh{static primaryClass=\"media-type-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(MediaTypeExamples.primaryClass),this.classes.push(\"examples\")}}const sv=MediaTypeExamples;const iv=class ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new sv}};class MediaTypeEncoding extends gp.Sh{static primaryClass=\"media-type-encoding\";constructor(s,i,u){super(s,i,u),this.classes.push(MediaTypeEncoding.primaryClass)}}const av=MediaTypeEncoding;class EncodingVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new av,this.specPath=iu([\"document\",\"objects\",\"Encoding\"])}}const lv=EncodingVisitor;class SecurityRequirementVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Og,this.specPath=iu([\"value\"])}}const cv=SecurityRequirementVisitor;class Security extends gp.wE{static primaryClass=\"security\";constructor(s,i,u){super(s,i,u),this.classes.push(Security.primaryClass)}}const uv=Security;class SecurityVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new uv}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"SecurityRequirement\"],s);this.element.push(i)}else this.element.push(cloneDeep(s))})),this.copyMetaAndAttributes(s,this.element),Yh}}const pv=SecurityVisitor;class ComponentsVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Wd,this.specPath=iu([\"document\",\"objects\",\"Components\"]),this.canSupportSpecificationExtensions=!0}}const hv=ComponentsVisitor;class TagVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new qg,this.specPath=iu([\"document\",\"objects\",\"Tag\"]),this.canSupportSpecificationExtensions=!0}}const dv=TagVisitor;class ReferenceVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new gf,this.specPath=iu([\"document\",\"objects\",\"Reference\"]),this.canSupportSpecificationExtensions=!1}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}const fv=ReferenceVisitor;const mv=class $RefVisitor_$RefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class ParameterVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new hf,this.specPath=iu([\"document\",\"objects\",\"Parameter\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),i}}const gv=ParameterVisitor;class SchemaVisitor_SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const yv=SchemaVisitor_SchemaVisitor;class HeaderVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Xd,this.specPath=iu([\"document\",\"objects\",\"Header\"]),this.canSupportSpecificationExtensions=!0}}const vv=HeaderVisitor;class header_SchemaVisitor_SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const bv=header_SchemaVisitor_SchemaVisitor;class HeaderExamples extends gp.Sh{static primaryClass=\"header-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(HeaderExamples.primaryClass),this.classes.push(\"examples\")}}const _v=HeaderExamples;const Ev=class header_ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new _v}};class ContentVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"content\"),this.specPath=iu([\"document\",\"objects\",\"MediaType\"])}}const wv=ContentVisitor;class HeaderContent extends gp.Sh{static primaryClass=\"header-content\";constructor(s,i,u){super(s,i,u),this.classes.push(HeaderContent.primaryClass),this.classes.push(\"content\")}}const Sv=HeaderContent;const xv=class ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new Sv}};class schema_SchemaVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new kg,this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0}}const kv=schema_SchemaVisitor,{allOf:Ov}=lg.visitors.document.objects.JSONSchema.fixedFields,Cv=Ov.compose({methods:{ArrayElement(s){const i=Ov.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{anyOf:Av}=lg.visitors.document.objects.JSONSchema.fixedFields,jv=Av.compose({methods:{ArrayElement(s){const i=Av.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{oneOf:Pv}=lg.visitors.document.objects.JSONSchema.fixedFields,Iv=Pv.compose({methods:{ArrayElement(s){const i=Pv.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{items:Nv}=lg.visitors.document.objects.JSONSchema.fixedFields,Mv=Nv.compose({methods:{ObjectElement(s){const i=Nv.compose.methods.ObjectElement.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i},ArrayElement(s){return this.element=cloneDeep(s),Yh}}}),{properties:Tv}=lg.visitors.document.objects.JSONSchema.fixedFields,Rv=Tv.compose({methods:{ObjectElement(s){const i=Tv.compose.methods.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{type:Dv}=lg.visitors.document.objects.JSONSchema.fixedFields,Bv=Dv.compose({methods:{ArrayElement(s){return this.element=cloneDeep(s),Yh}}}),{JSONSchemaOrJSONReferenceVisitor:Lv}=lg.visitors,Fv=Lv.compose({methods:{ObjectElement(s){const i=Lv.compose.methods.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}});class DiscriminatorVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Hd,this.specPath=iu([\"document\",\"objects\",\"Discriminator\"]),this.canSupportSpecificationExtensions=!1}}const qv=DiscriminatorVisitor;class DiscriminatorMapping extends gp.Sh{static primaryClass=\"discriminator-mapping\";constructor(s,i,u){super(s,i,u),this.classes.push(DiscriminatorMapping.primaryClass)}}const $v=DiscriminatorMapping;class MappingVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new $v,this.specPath=iu([\"value\"])}}const Uv=MappingVisitor;class XmlVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new $g,this.specPath=iu([\"document\",\"objects\",\"XML\"]),this.canSupportSpecificationExtensions=!0}}const zv=XmlVisitor;class ParameterExamples extends gp.Sh{static primaryClass=\"parameter-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(ParameterExamples.primaryClass),this.classes.push(\"examples\")}}const Vv=ParameterExamples;const Wv=class parameter_ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new Vv}};class ParameterContent extends gp.Sh{static primaryClass=\"parameter-content\";constructor(s,i,u){super(s,i,u),this.classes.push(ParameterContent.primaryClass),this.classes.push(\"content\")}}const Kv=ParameterContent;const Hv=class parameter_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new Kv}};class ComponentsSchemas extends gp.Sh{static primaryClass=\"components-schemas\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsSchemas.primaryClass)}}const Jv=ComponentsSchemas;class SchemasVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Jv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Schema\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}const Gv=SchemasVisitor;class ComponentsResponses extends gp.Sh{static primaryClass=\"components-responses\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsResponses.primaryClass)}}const Yv=ComponentsResponses;class ResponsesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Yv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Jy).forEach(((s,i)=>{s.setMetaProperty(\"http-status-code\",serializers_value(i))})),i}}const Xv=ResponsesVisitor;class ComponentsParameters extends gp.Sh{static primaryClass=\"components-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsParameters.primaryClass),this.classes.push(\"parameters\")}}const Qv=ComponentsParameters;class ParametersVisitor_ParametersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Qv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"parameter\")})),i}}const Zv=ParametersVisitor_ParametersVisitor;class ComponentsExamples extends gp.Sh{static primaryClass=\"components-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsExamples.primaryClass),this.classes.push(\"examples\")}}const eb=ComponentsExamples;class components_ExamplesVisitor_ExamplesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new eb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),i}}const tb=components_ExamplesVisitor_ExamplesVisitor;class ComponentsRequestBodies extends gp.Sh{static primaryClass=\"components-request-bodies\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsRequestBodies.primaryClass)}}const nb=ComponentsRequestBodies;class RequestBodiesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new nb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"RequestBody\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"requestBody\")})),i}}const pb=RequestBodiesVisitor;class ComponentsHeaders extends gp.Sh{static primaryClass=\"components-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsHeaders.primaryClass)}}const mb=ComponentsHeaders;class HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new mb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const yb=HeadersVisitor;class ComponentsSecuritySchemes extends gp.Sh{static primaryClass=\"components-security-schemes\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsSecuritySchemes.primaryClass)}}const _b=ComponentsSecuritySchemes;class SecuritySchemesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new _b,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"SecurityScheme\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"securityScheme\")})),i}}const wb=SecuritySchemesVisitor;class ComponentsLinks extends gp.Sh{static primaryClass=\"components-links\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsLinks.primaryClass)}}const Sb=ComponentsLinks;class LinksVisitor_LinksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Sb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),i}}const Ob=LinksVisitor_LinksVisitor;class ComponentsCallbacks extends gp.Sh{static primaryClass=\"components-callbacks\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsCallbacks.primaryClass)}}const Ab=ComponentsCallbacks;class CallbacksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Ab,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),i}}const Pb=CallbacksVisitor;class ExampleVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Gd,this.specPath=iu([\"document\",\"objects\",\"Example\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.externalValue)&&this.element.classes.push(\"reference-element\"),i}}const Ib=ExampleVisitor;const Mb=class ExternalValueVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class ExternalDocumentationVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Yd,this.specPath=iu([\"document\",\"objects\",\"ExternalDocumentation\"]),this.canSupportSpecificationExtensions=!0}}const Rb=ExternalDocumentationVisitor;class encoding_EncodingVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Jd,this.specPath=iu([\"document\",\"objects\",\"Encoding\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.headers)&&this.element.headers.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const Lb=encoding_EncodingVisitor;class EncodingHeaders extends gp.Sh{static primaryClass=\"encoding-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(EncodingHeaders.primaryClass)}}const qb=EncodingHeaders;class HeadersVisitor_HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new qb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,i)=>{if(!Dy(s))return;const u=serializers_value(i);s.setMetaProperty(\"headerName\",u)})),i}}const zb=HeadersVisitor_HeadersVisitor;class PathsVisitor extends(Mixin(vy,ny)){constructor(s){super(s),this.element=new mf,this.specPath=iu([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=es_T}ObjectElement(s){const i=vy.prototype.ObjectElement.call(this,s);return this.element.filter(Vy).forEach(((s,i)=>{i.classes.push(\"openapi-path-template\"),i.classes.push(\"path-template\"),s.setMetaProperty(\"path\",cloneDeep(i))})),i}}const Qb=PathsVisitor;class RequestBodyVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new yf,this.specPath=iu([\"document\",\"objects\",\"RequestBody\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),i}}const e_=RequestBodyVisitor;class RequestBodyContent extends gp.Sh{static primaryClass=\"request-body-content\";constructor(s,i,u){super(s,i,u),this.classes.push(RequestBodyContent.primaryClass),this.classes.push(\"content\")}}const t_=RequestBodyContent;const r_=class request_body_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new t_}};class CallbackVisitor extends(Mixin(vy,ny)){constructor(s){super(s),this.element=new Vd,this.specPath=iu([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=s=>/{(?<expression>[^}]{1,2083})}/.test(String(s))}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Vy).forEach(((s,i)=>{s.setMetaProperty(\"runtime-expression\",serializers_value(i))})),i}}const n_=CallbackVisitor;class ResponseVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new bf,this.specPath=iu([\"document\",\"objects\",\"Response\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),Hp(this.element.headers)&&this.element.headers.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const o_=ResponseVisitor;class ResponseHeaders extends gp.Sh{static primaryClass=\"response-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseHeaders.primaryClass)}}const s_=ResponseHeaders;class response_HeadersVisitor_HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new s_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,i)=>{if(!Dy(s))return;const u=serializers_value(i);s.setMetaProperty(\"header-name\",u)})),i}}const i_=response_HeadersVisitor_HeadersVisitor;class ResponseContent extends gp.Sh{static primaryClass=\"response-content\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseContent.primaryClass),this.classes.push(\"content\")}}const a_=ResponseContent;const l_=class response_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new a_}};class ResponseLinks extends gp.Sh{static primaryClass=\"response-links\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseLinks.primaryClass)}}const c_=ResponseLinks;class response_LinksVisitor_LinksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new c_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),i}}const u_=response_LinksVisitor_LinksVisitor;function _isNumber(s){return\"[object Number]\"===Object.prototype.toString.call(s)}var p_=_curry2((function range(s,i){if(!_isNumber(s)||!_isNumber(i))throw new TypeError(\"Both arguments to range must be numbers\");for(var u=[],_=s;_<i;)u.push(_),_+=1;return u}));const h_=p_;function hasOrAdd(s,i,u){var _,w=typeof s;switch(w){case\"string\":case\"number\":return 0===s&&1/s==-1/0?!!u._items[\"-0\"]||(i&&(u._items[\"-0\"]=!0),!1):null!==u._nativeSet?i?(_=u._nativeSet.size,u._nativeSet.add(s),u._nativeSet.size===_):u._nativeSet.has(s):w in u._items?s in u._items[w]||(i&&(u._items[w][s]=!0),!1):(i&&(u._items[w]={},u._items[w][s]=!0),!1);case\"boolean\":if(w in u._items){var x=s?1:0;return!!u._items[w][x]||(i&&(u._items[w][x]=!0),!1)}return i&&(u._items[w]=s?[!1,!0]:[!0,!1]),!1;case\"function\":return null!==u._nativeSet?i?(_=u._nativeSet.size,u._nativeSet.add(s),u._nativeSet.size===_):u._nativeSet.has(s):w in u._items?!!_includes(s,u._items[w])||(i&&u._items[w].push(s),!1):(i&&(u._items[w]=[s]),!1);case\"undefined\":return!!u._items[w]||(i&&(u._items[w]=!0),!1);case\"object\":if(null===s)return!!u._items.null||(i&&(u._items.null=!0),!1);default:return(w=Object.prototype.toString.call(s))in u._items?!!_includes(s,u._items[w])||(i&&u._items[w].push(s),!1):(i&&(u._items[w]=[s]),!1)}}const d_=function(){function _Set(){this._nativeSet=\"function\"==typeof Set?new Set:null,this._items={}}return _Set.prototype.add=function(s){return!hasOrAdd(s,!0,this)},_Set.prototype.has=function(s){return hasOrAdd(s,!1,this)},_Set}();var f_=_curry2((function difference(s,i){for(var u=[],_=0,w=s.length,x=i.length,j=new d_,P=0;P<x;P+=1)j.add(i[P]);for(;_<w;)j.add(s[_])&&(u[u.length]=s[_]),_+=1;return u}));const m_=f_;class MixedFieldsVisitor extends(Mixin(ay,vy)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:s,specPathPatternedFields:i,...u}){super({...u}),this.specPathFixedFields=s,this.specPathPatternedFields=i}ObjectElement(s){const{specPath:i,ignoredFields:u}=this;try{this.specPath=this.specPathFixedFields;const i=this.retrieveFixedFields(this.specPath(s));this.ignoredFields=[...u,...m_(s.keys(),i)],ay.prototype.ObjectElement.call(this,s),this.specPath=this.specPathPatternedFields,this.ignoredFields=i,vy.prototype.ObjectElement.call(this,s)}catch(s){throw this.specPath=i,s}return Yh}}const g_=MixedFieldsVisitor;class responses_ResponsesVisitor extends(Mixin(g_,ny)){constructor(s){super(s),this.element=new _f,this.specPathFixedFields=iu([\"document\",\"objects\",\"Responses\"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"],this.fieldPatternPredicate=s=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${h_(100,600).join(\"|\")})$`).test(String(s))}ObjectElement(s){const i=g_.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Jy).forEach(((s,i)=>{const u=cloneDeep(i);this.fieldPatternPredicate(serializers_value(u))&&s.setMetaProperty(\"http-status-code\",u)})),i}}const y_=responses_ResponsesVisitor;class DefaultVisitor_DefaultVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Response\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)?this.element.setMetaProperty(\"referenced-element\",\"response\"):Jy(this.element)&&this.element.setMetaProperty(\"http-status-code\",\"default\"),i}}const v_=DefaultVisitor_DefaultVisitor;class OperationVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new uf,this.specPath=iu([\"document\",\"objects\",\"Operation\"])}}const b_=OperationVisitor;class OperationTags extends gp.wE{static primaryClass=\"operation-tags\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationTags.primaryClass)}}const E_=OperationTags;const w_=class TagsVisitor extends ny{constructor(s){super(s),this.element=new E_}ArrayElement(s){return this.element=this.element.concat(cloneDeep(s)),Yh}};class OperationParameters extends gp.wE{static primaryClass=\"operation-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationParameters.primaryClass),this.classes.push(\"parameters\")}}const S_=OperationParameters;class open_api_3_0_ParametersVisitor_ParametersVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"parameters\")}ArrayElement(s){return s.forEach((s=>{const i=isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"],u=this.toRefractedElement(i,s);Ky(u)&&u.setMetaProperty(\"referenced-element\",\"parameter\"),this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const x_=open_api_3_0_ParametersVisitor_ParametersVisitor;const k_=class operation_ParametersVisitor_ParametersVisitor extends x_{constructor(s){super(s),this.element=new S_}};const O_=class RequestBodyVisitor_RequestBodyVisitor extends Py{constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"RequestBody\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"requestBody\"),i}};class OperationCallbacks extends gp.Sh{static primaryClass=\"operation-callbacks\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationCallbacks.primaryClass)}}const C_=OperationCallbacks;class CallbacksVisitor_CallbacksVisitor extends(Mixin(by,ny)){specPath;constructor(s){super(s),this.element=new C_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),i}}const A_=CallbacksVisitor_CallbacksVisitor;class OperationSecurity extends gp.wE{static primaryClass=\"operation-security\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationSecurity.primaryClass),this.classes.push(\"security\")}}const j_=OperationSecurity;class SecurityVisitor_SecurityVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new j_}ArrayElement(s){return s.forEach((s=>{const i=Hp(s)?[\"document\",\"objects\",\"SecurityRequirement\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const P_=SecurityVisitor_SecurityVisitor;class OperationServers extends gp.wE{static primaryClass=\"operation-servers\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationServers.primaryClass),this.classes.push(\"servers\")}}const I_=OperationServers;const N_=class ServersVisitor_ServersVisitor extends ky{constructor(s){super(s),this.element=new I_}};class PathItemVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new df,this.specPath=iu([\"document\",\"objects\",\"PathItem\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return this.element.filter(Uy).forEach(((s,i)=>{const u=cloneDeep(i);u.content=serializers_value(u).toUpperCase(),s.setMetaProperty(\"http-method\",u)})),zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}const M_=PathItemVisitor;const T_=class path_item_$RefVisitor_$RefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class PathItemServers extends gp.wE{static primaryClass=\"path-item-servers\";constructor(s,i,u){super(s,i,u),this.classes.push(PathItemServers.primaryClass),this.classes.push(\"servers\")}}const R_=PathItemServers;const D_=class path_item_ServersVisitor_ServersVisitor extends ky{constructor(s){super(s),this.element=new R_}};class PathItemParameters extends gp.wE{static primaryClass=\"path-item-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(PathItemParameters.primaryClass),this.classes.push(\"parameters\")}}const B_=PathItemParameters;const L_=class path_item_ParametersVisitor_ParametersVisitor extends x_{constructor(s){super(s),this.element=new B_}};class SecuritySchemeVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Pg,this.specPath=iu([\"document\",\"objects\",\"SecurityScheme\"]),this.canSupportSpecificationExtensions=!0}}const F_=SecuritySchemeVisitor;class OAuthFlowsVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new af,this.specPath=iu([\"document\",\"objects\",\"OAuthFlows\"]),this.canSupportSpecificationExtensions=!0}}const q_=OAuthFlowsVisitor;class OAuthFlowVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new of,this.specPath=iu([\"document\",\"objects\",\"OAuthFlow\"]),this.canSupportSpecificationExtensions=!0}}const $_=OAuthFlowVisitor;class OAuthFlowScopes extends gp.Sh{static primaryClass=\"oauth-flow-scopes\";constructor(s,i,u){super(s,i,u),this.classes.push(OAuthFlowScopes.primaryClass)}}const U_=OAuthFlowScopes;class ScopesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new U_,this.specPath=iu([\"value\"])}}const z_=ScopesVisitor;class Tags extends gp.wE{static primaryClass=\"tags\";constructor(s,i,u){super(s,i,u),this.classes.push(Tags.primaryClass)}}const V_=Tags;class TagsVisitor_TagsVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new V_}ArrayElement(s){return s.forEach((s=>{const i=iy(s)?[\"document\",\"objects\",\"Tag\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const W_=TagsVisitor_TagsVisitor,{fixedFields:K_}=lg.visitors.document.objects.JSONSchema,H_={visitors:{value:ny,document:{objects:{OpenApi:{$visitor:ly,fixedFields:{openapi:cy,info:{$ref:\"#/visitors/document/objects/Info\"},servers:ky,paths:{$ref:\"#/visitors/document/objects/Paths\"},components:{$ref:\"#/visitors/document/objects/Components\"},security:pv,tags:W_,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:py,fixedFields:{title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},termsOfService:{$ref:\"#/visitors/value\"},contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:hy}},Contact:{$visitor:dy,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"},email:{$ref:\"#/visitors/value\"}}},License:{$visitor:fy,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Server:{$visitor:wy,fixedFields:{url:Sy,description:{$ref:\"#/visitors/value\"},variables:Ay}},ServerVariable:{$visitor:Oy,fixedFields:{enum:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Components:{$visitor:hv,fixedFields:{schemas:Gv,responses:Xv,parameters:Zv,examples:tb,requestBodies:pb,headers:yb,securitySchemes:wb,links:Ob,callbacks:Pb}},Paths:{$visitor:Qb},PathItem:{$visitor:M_,fixedFields:{$ref:T_,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:D_,parameters:L_}},Operation:{$visitor:b_,fixedFields:{tags:w_,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:{$ref:\"#/visitors/value\"},parameters:k_,requestBody:O_,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:A_,deprecated:{$ref:\"#/visitors/value\"},security:P_,servers:N_}},ExternalDocumentation:{$visitor:Rb,fixedFields:{description:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Parameter:{$visitor:gv,fixedFields:{name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:yv,example:{$ref:\"#/visitors/value\"},examples:Wv,content:Hv}},RequestBody:{$visitor:e_,fixedFields:{description:{$ref:\"#/visitors/value\"},content:r_,required:{$ref:\"#/visitors/value\"}}},MediaType:{$visitor:jy,fixedFields:{schema:nv,example:{$ref:\"#/visitors/value\"},examples:iv,encoding:lv}},Encoding:{$visitor:Lb,fixedFields:{contentType:{$ref:\"#/visitors/value\"},headers:zb,style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"}}},Responses:{$visitor:y_,fixedFields:{default:v_}},Response:{$visitor:o_,fixedFields:{description:{$ref:\"#/visitors/value\"},headers:i_,content:l_,links:u_}},Callback:{$visitor:n_},Example:{$visitor:Ib,fixedFields:{summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},value:{$ref:\"#/visitors/value\"},externalValue:Mb}},Link:{$visitor:my,fixedFields:{operationRef:gy,operationId:yy,parameters:Ey,requestBody:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:vv,fixedFields:{description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:bv,example:{$ref:\"#/visitors/value\"},examples:Ev,content:xv}},Tag:{$visitor:dv,fixedFields:{name:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:fv,fixedFields:{$ref:mv}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},JSONReference:{$ref:\"#/visitors/document/objects/Reference\"},Schema:{$visitor:kv,fixedFields:{title:K_.title,multipleOf:K_.multipleOf,maximum:K_.maximum,exclusiveMaximum:K_.exclusiveMaximum,minimum:K_.minimum,exclusiveMinimum:K_.exclusiveMinimum,maxLength:K_.maxLength,minLength:K_.minLength,pattern:K_.pattern,maxItems:K_.maxItems,minItems:K_.minItems,uniqueItems:K_.uniqueItems,maxProperties:K_.maxProperties,minProperties:K_.minProperties,required:K_.required,enum:K_.enum,type:Bv,allOf:Cv,anyOf:jv,oneOf:Iv,not:Fv,items:Mv,properties:Rv,additionalProperties:Fv,description:K_.description,format:K_.format,default:K_.default,nullable:{$ref:\"#/visitors/value\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},writeOnly:{$ref:\"#/visitors/value\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:qv,fixedFields:{propertyName:{$ref:\"#/visitors/value\"},mapping:Uv}},XML:{$visitor:zv,fixedFields:{name:{$ref:\"#/visitors/value\"},namespace:{$ref:\"#/visitors/value\"},prefix:{$ref:\"#/visitors/value\"},attribute:{$ref:\"#/visitors/value\"},wrapped:{$ref:\"#/visitors/value\"}}},SecurityScheme:{$visitor:F_,fixedFields:{type:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},scheme:{$ref:\"#/visitors/value\"},bearerFormat:{$ref:\"#/visitors/value\"},flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:{$ref:\"#/visitors/value\"}}},OAuthFlows:{$visitor:q_,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:$_,fixedFields:{authorizationUrl:{$ref:\"#/visitors/value\"},tokenUrl:{$ref:\"#/visitors/value\"},refreshUrl:{$ref:\"#/visitors/value\"},scopes:z_}},SecurityRequirement:{$visitor:cv}},extension:{$visitor:uy}}}},es_traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},J_={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_0Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...id},G_={namespace:s=>{const{base:i}=s;return i.register(\"callback\",Vd),i.register(\"components\",Wd),i.register(\"contact\",Kd),i.register(\"discriminator\",Hd),i.register(\"encoding\",Jd),i.register(\"example\",Gd),i.register(\"externalDocumentation\",Yd),i.register(\"header\",Xd),i.register(\"info\",Qd),i.register(\"license\",Zd),i.register(\"link\",ef),i.register(\"mediaType\",rf),i.register(\"oAuthFlow\",of),i.register(\"oAuthFlows\",af),i.register(\"openapi\",lf),i.register(\"openApi3_0\",cf),i.register(\"operation\",uf),i.register(\"parameter\",hf),i.register(\"pathItem\",df),i.register(\"paths\",mf),i.register(\"reference\",gf),i.register(\"requestBody\",yf),i.register(\"response\",bf),i.register(\"responses\",_f),i.register(\"schema\",kg),i.register(\"securityRequirement\",Og),i.register(\"securityScheme\",Pg),i.register(\"server\",Ng),i.register(\"serverVariable\",Mg),i.register(\"tag\",qg),i.register(\"xml\",$g),i}},Y_=G_,es_refractor_toolbox=()=>{const s=createNamespace(Y_);return{predicates:{...ye,isElement:Up,isStringElement:zp,isArrayElement:Jp,isObjectElement:Hp,isMemberElement:Gp,includesClasses,hasElementSourceMap},namespace:s}},es_refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:u=[]}={})=>{const _=(0,gp.e)(s),w=dereference(H_),x=new(Il(i,w))({specObj:w});return visitor_visit(_,x),dispatchPlugins(x.element,u,{toolboxCreator:es_refractor_toolbox,visitorOptions:{keyMap:J_,nodeTypeGetter:es_traversal_visitor_getNodeType}})},es_refractor_createRefractor=s=>(i,u={})=>es_refractor_refract(i,{specPath:s,...u});Vd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Wd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Kd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),Gd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Hd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Jd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),Yd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),Xd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),Qd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),Zd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),ef.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),rf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),of.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),af.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),lf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),cf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),uf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),hf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),df.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),mf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),gf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),yf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),bf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),_f.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),kg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),Og.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),Pg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),Ng.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),Mg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),qg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),$g.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const X_=class Callback_Callback extends Vd{};const Q_=class Components_Components extends Wd{get pathItems(){return this.get(\"pathItems\")}set pathItems(s){this.set(\"pathItems\",s)}};const Z_=class Contact_Contact extends Kd{};const eE=class Discriminator_Discriminator extends Hd{};const tE=class Encoding_Encoding extends Jd{};const rE=class Example_Example extends Gd{};const nE=class ExternalDocumentation_ExternalDocumentation extends Yd{};const oE=class Header_Header extends Xd{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const sE=class Info_Info extends Qd{get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}};class JsonSchemaDialect extends gp.Om{static default=new JsonSchemaDialect(\"https://spec.openapis.org/oas/3.1/dialect/base\");constructor(s,i,u){super(s,i,u),this.element=\"jsonSchemaDialect\"}}const iE=JsonSchemaDialect;const aE=class License_License extends Zd{get identifier(){return this.get(\"identifier\")}set identifier(s){this.set(\"identifier\",s)}};const lE=class Link_Link extends ef{};const cE=class MediaType_MediaType extends rf{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const uE=class OAuthFlow_OAuthFlow extends of{};const pE=class OAuthFlows_OAuthFlows extends af{};const hE=class Openapi_Openapi extends lf{};class OpenApi3_1 extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"openApi3_1\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get jsonSchemaDialect(){return this.get(\"jsonSchemaDialect\")}set jsonSchemaDialect(s){this.set(\"jsonSchemaDialect\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get webhooks(){return this.get(\"webhooks\")}set webhooks(s){this.set(\"webhooks\",s)}}const dE=OpenApi3_1;const fE=class Operation_Operation extends uf{get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}};const mE=class Parameter_Parameter extends hf{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const gE=class PathItem_PathItem extends df{get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}};const yE=class Paths_Paths extends mf{};class Reference_Reference extends gf{}Object.defineProperty(Reference_Reference.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0}),Object.defineProperty(Reference_Reference.prototype,\"summary\",{get(){return this.get(\"summary\")},set(s){this.set(\"summary\",s)},enumerable:!0});const vE=Reference_Reference;const bE=class RequestBody_RequestBody extends yf{};const _E=class elements_Response_Response extends bf{};const EE=class Responses_Responses extends _f{};class elements_Schema_Schema extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"schema\"}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get $vocabulary(){return this.get(\"$vocabulary\")}set $vocabulary(s){this.set(\"$vocabulary\",s)}get $id(){return this.get(\"$id\")}set $id(s){this.set(\"$id\",s)}get $anchor(){return this.get(\"$anchor\")}set $anchor(s){this.set(\"$anchor\",s)}get $dynamicAnchor(){return this.get(\"$dynamicAnchor\")}set $dynamicAnchor(s){this.set(\"$dynamicAnchor\",s)}get $dynamicRef(){return this.get(\"$dynamicRef\")}set $dynamicRef(s){this.set(\"$dynamicRef\",s)}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get $defs(){return this.get(\"$defs\")}set $defs(s){this.set(\"$defs\",s)}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get dependentSchemas(){return this.get(\"dependentSchemas\")}set dependentSchemas(s){this.set(\"dependentSchemas\",s)}get prefixItems(){return this.get(\"prefixItems\")}set prefixItems(s){this.set(\"prefixItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get unevaluatedItems(){return this.get(\"unevaluatedItems\")}set unevaluatedItems(s){this.set(\"unevaluatedItems\",s)}get unevaluatedProperties(){return this.get(\"unevaluatedProperties\")}set unevaluatedProperties(s){this.set(\"unevaluatedProperties\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get const(){return this.get(\"const\")}set const(s){this.set(\"const\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxContains(){return this.get(\"maxContains\")}set maxContains(s){this.set(\"maxContains\",s)}get minContains(){return this.get(\"minContains\")}set minContains(s){this.set(\"minContains\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get dependentRequired(){return this.get(\"dependentRequired\")}set dependentRequired(s){this.set(\"dependentRequired\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get contentEncoding(){return this.get(\"contentEncoding\")}set contentEncoding(s){this.set(\"contentEncoding\",s)}get contentMediaType(){return this.get(\"contentMediaType\")}set contentMediaType(s){this.set(\"contentMediaType\",s)}get contentSchema(){return this.get(\"contentSchema\")}set contentSchema(s){this.set(\"contentSchema\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}}const wE=elements_Schema_Schema;const SE=class SecurityRequirement_SecurityRequirement extends Og{};const xE=class SecurityScheme_SecurityScheme extends Pg{};const kE=class Server_Server extends Ng{};const OE=class ServerVariable_ServerVariable extends Mg{};const CE=class Tag_Tag extends qg{};const AE=class Xml_Xml extends $g{};class OpenApi3_1Visitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new dE,this.specPath=iu([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(s){return this.openApiGenericElement=s,ay.prototype.ObjectElement.call(this,s)}}const jE=OpenApi3_1Visitor,{visitors:{document:{objects:{Info:{$visitor:PE}}}}}=H_;const IE=class info_InfoVisitor extends PE{constructor(s){super(s),this.element=new sE}},{visitors:{document:{objects:{Contact:{$visitor:NE}}}}}=H_;const ME=class contact_ContactVisitor extends NE{constructor(s){super(s),this.element=new Z_}},{visitors:{document:{objects:{License:{$visitor:TE}}}}}=H_;const RE=class license_LicenseVisitor extends TE{constructor(s){super(s),this.element=new aE}},{visitors:{document:{objects:{Link:{$visitor:DE}}}}}=H_;const BE=class link_LinkVisitor extends DE{constructor(s){super(s),this.element=new lE}};class JsonSchemaDialectVisitor extends(Mixin(oy,ny)){StringElement(s){const i=new iE(serializers_value(s));return this.copyMetaAndAttributes(s,i),this.element=i,Yh}}const LE=JsonSchemaDialectVisitor,{visitors:{document:{objects:{Server:{$visitor:FE}}}}}=H_;const qE=class server_ServerVisitor extends FE{constructor(s){super(s),this.element=new kE}},{visitors:{document:{objects:{ServerVariable:{$visitor:$E}}}}}=H_;const UE=class server_variable_ServerVariableVisitor extends $E{constructor(s){super(s),this.element=new OE}},{visitors:{document:{objects:{MediaType:{$visitor:zE}}}}}=H_;const VE=class open_api_3_1_media_type_MediaTypeVisitor extends zE{constructor(s){super(s),this.element=new cE}},{visitors:{document:{objects:{SecurityRequirement:{$visitor:WE}}}}}=H_;const KE=class security_requirement_SecurityRequirementVisitor extends WE{constructor(s){super(s),this.element=new SE}},{visitors:{document:{objects:{Components:{$visitor:HE}}}}}=H_;const JE=class components_ComponentsVisitor extends HE{constructor(s){super(s),this.element=new Q_}},{visitors:{document:{objects:{Tag:{$visitor:GE}}}}}=H_;const YE=class tag_TagVisitor extends GE{constructor(s){super(s),this.element=new CE}},{visitors:{document:{objects:{Reference:{$visitor:XE}}}}}=H_;const QE=class reference_ReferenceVisitor extends XE{constructor(s){super(s),this.element=new vE}},{visitors:{document:{objects:{Parameter:{$visitor:ZE}}}}}=H_;const ew=class parameter_ParameterVisitor extends ZE{constructor(s){super(s),this.element=new mE}},{visitors:{document:{objects:{Header:{$visitor:tw}}}}}=H_;const rw=class header_HeaderVisitor extends tw{constructor(s){super(s),this.element=new oE}},nw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof X_||s(_)&&i(\"callback\",_)&&u(\"object\",_))),ow=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Q_||s(_)&&i(\"components\",_)&&u(\"object\",_))),sw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Z_||s(_)&&i(\"contact\",_)&&u(\"object\",_))),iw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof rE||s(_)&&i(\"example\",_)&&u(\"object\",_))),aw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof nE||s(_)&&i(\"externalDocumentation\",_)&&u(\"object\",_))),lw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof oE||s(_)&&i(\"header\",_)&&u(\"object\",_))),cw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof sE||s(_)&&i(\"info\",_)&&u(\"object\",_))),uw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof iE||s(_)&&i(\"jsonSchemaDialect\",_)&&u(\"string\",_))),pw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof aE||s(_)&&i(\"license\",_)&&u(\"object\",_))),hw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof lE||s(_)&&i(\"link\",_)&&u(\"object\",_))),dw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof hE||s(_)&&i(\"openapi\",_)&&u(\"string\",_))),fw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof dE||s(w)&&i(\"openApi3_1\",w)&&u(\"object\",w)&&_(\"api\",w))),mw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof fE||s(_)&&i(\"operation\",_)&&u(\"object\",_))),gw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof mE||s(_)&&i(\"parameter\",_)&&u(\"object\",_))),yw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gE||s(_)&&i(\"pathItem\",_)&&u(\"object\",_))),isPathItemElementExternal=s=>{if(!yw(s))return!1;if(!zp(s.$ref))return!1;const i=serializers_value(s.$ref);return\"string\"==typeof i&&i.length>0&&!i.startsWith(\"#\")},vw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yE||s(_)&&i(\"paths\",_)&&u(\"object\",_))),bw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof vE||s(_)&&i(\"reference\",_)&&u(\"object\",_))),isReferenceElementExternal=s=>{if(!bw(s))return!1;if(!zp(s.$ref))return!1;const i=serializers_value(s.$ref);return\"string\"==typeof i&&i.length>0&&!i.startsWith(\"#\")},_w=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bE||s(_)&&i(\"requestBody\",_)&&u(\"object\",_))),Ew=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _E||s(_)&&i(\"response\",_)&&u(\"object\",_))),ww=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof EE||s(_)&&i(\"responses\",_)&&u(\"object\",_))),Sw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof wE||s(_)&&i(\"schema\",_)&&u(\"object\",_))),predicates_isBooleanJsonSchemaElement=s=>Kp(s)&&s.classes.includes(\"boolean-json-schema\"),xw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof SE||s(_)&&i(\"securityRequirement\",_)&&u(\"object\",_))),kw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof xE||s(_)&&i(\"securityScheme\",_)&&u(\"object\",_))),Ow=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kE||s(_)&&i(\"server\",_)&&u(\"object\",_))),Cw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof OE||s(_)&&i(\"serverVariable\",_)&&u(\"object\",_))),Aw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof cE||s(_)&&i(\"mediaType\",_)&&u(\"object\",_)));const jw=class ParentSchemaAwareVisitor_ParentSchemaAwareVisitor{parent;constructor({parent:s}){this.parent=s}};class open_api_3_1_schema_SchemaVisitor extends(Mixin(ay,jw,ny)){constructor(s){super(s),this.element=new wE,this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=iE.default,this.passingOptionsNames.push(\"parent\")}ObjectElement(s){this.handle$schema(s),this.handle$id(s),this.parent=this.element;const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),i}BooleanElement(s){const i=super.enter(s);return this.element.classes.push(\"boolean-json-schema\"),i}getJsonSchemaDialect(){let s;return s=void 0!==this.openApiSemanticElement&&uw(this.openApiSemanticElement.jsonSchemaDialect)?serializers_value(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&zp(this.openApiGenericElement.get(\"jsonSchemaDialect\"))?serializers_value(this.openApiGenericElement.get(\"jsonSchemaDialect\")):serializers_value(this.jsonSchemaDefaultDialect),s}handle$schema(s){if(lu(this.parent)&&!zp(s.get(\"$schema\")))this.element.setMetaProperty(\"inherited$schema\",this.getJsonSchemaDialect());else if(Sw(this.parent)&&!zp(s.get(\"$schema\"))){const s=gc(serializers_value(this.parent.meta.get(\"inherited$schema\")),serializers_value(this.parent.$schema));this.element.setMetaProperty(\"inherited$schema\",s)}}handle$id(s){const i=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty(\"inherited$id\",[])):new gp.wE,u=serializers_value(s.get(\"$id\"));km(u)&&i.push(u),this.element.setMetaProperty(\"inherited$id\",i)}}const Pw=open_api_3_1_schema_SchemaVisitor;const Iw=class $vocabularyVisitor extends ny{ObjectElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-$vocabulary\"),i}};const Nw=class $refVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class $defsVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-$defs\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Mw=$defsVisitor;class schema_AllOfVisitor_AllOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-allOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Tw=schema_AllOfVisitor_AllOfVisitor;class schema_AnyOfVisitor_AnyOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-anyOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Rw=schema_AnyOfVisitor_AnyOfVisitor;class schema_OneOfVisitor_OneOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-oneOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Dw=schema_OneOfVisitor_OneOfVisitor;class DependentSchemasVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-dependentSchemas\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Bw=DependentSchemasVisitor;class PrefixItemsVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-prefixItems\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Lw=PrefixItemsVisitor;class schema_PropertiesVisitor_PropertiesVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Fw=schema_PropertiesVisitor_PropertiesVisitor;class PatternPropertiesVisitor_PatternPropertiesVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const qw=PatternPropertiesVisitor_PatternPropertiesVisitor;const $w=class schema_TypeVisitor_TypeVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-type\"),i}ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-type\"),i}};const Uw=class EnumVisitor_EnumVisitor extends ny{ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-enum\"),i}};const zw=class DependentRequiredVisitor extends ny{ObjectElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-dependentRequired\"),i}};const Vw=class schema_ExamplesVisitor_ExamplesVisitor extends ny{ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-examples\"),i}},{visitors:{document:{objects:{Discriminator:{$visitor:Ww}}}}}=H_;const Kw=class distriminator_DiscriminatorVisitor extends Ww{constructor(s){super(s),this.element=new eE,this.canSupportSpecificationExtensions=!0}},{visitors:{document:{objects:{XML:{$visitor:Hw}}}}}=H_;const Jw=class xml_XmlVisitor extends Hw{constructor(s){super(s),this.element=new AE}};class SchemasVisitor_SchemasVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Jv,this.specPath=iu([\"document\",\"objects\",\"Schema\"])}}const Gw=SchemasVisitor_SchemasVisitor;class ComponentsPathItems extends gp.Sh{static primaryClass=\"components-path-items\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsPathItems.primaryClass)}}const Yw=ComponentsPathItems;class PathItemsVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Yw,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),i}}const Xw=PathItemsVisitor,{visitors:{document:{objects:{Example:{$visitor:Qw}}}}}=H_;const Zw=class example_ExampleVisitor extends Qw{constructor(s){super(s),this.element=new rE}},{visitors:{document:{objects:{ExternalDocumentation:{$visitor:eS}}}}}=H_;const tS=class external_documentation_ExternalDocumentationVisitor extends eS{constructor(s){super(s),this.element=new nE}},{visitors:{document:{objects:{Encoding:{$visitor:rS}}}}}=H_;const nS=class open_api_3_1_encoding_EncodingVisitor extends rS{constructor(s){super(s),this.element=new tE}},{visitors:{document:{objects:{Paths:{$visitor:oS}}}}}=H_;const sS=class paths_PathsVisitor extends oS{constructor(s){super(s),this.element=new yE}},{visitors:{document:{objects:{RequestBody:{$visitor:iS}}}}}=H_;const aS=class request_body_RequestBodyVisitor extends iS{constructor(s){super(s),this.element=new bE}},{visitors:{document:{objects:{Callback:{$visitor:lS}}}}}=H_;const cS=class callback_CallbackVisitor extends lS{constructor(s){super(s),this.element=new X_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=lS.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),i}},{visitors:{document:{objects:{Response:{$visitor:uS}}}}}=H_;const pS=class response_ResponseVisitor extends uS{constructor(s){super(s),this.element=new _E}},{visitors:{document:{objects:{Responses:{$visitor:hS}}}}}=H_;const dS=class open_api_3_1_responses_ResponsesVisitor extends hS{constructor(s){super(s),this.element=new EE}},{visitors:{document:{objects:{Operation:{$visitor:fS}}}}}=H_;const mS=class operation_OperationVisitor extends fS{constructor(s){super(s),this.element=new fE}},{visitors:{document:{objects:{PathItem:{$visitor:gS}}}}}=H_;const yS=class path_item_PathItemVisitor extends gS{constructor(s){super(s),this.element=new gE}},{visitors:{document:{objects:{SecurityScheme:{$visitor:vS}}}}}=H_;const bS=class security_scheme_SecuritySchemeVisitor extends vS{constructor(s){super(s),this.element=new xE}},{visitors:{document:{objects:{OAuthFlows:{$visitor:_S}}}}}=H_;const ES=class oauth_flows_OAuthFlowsVisitor extends _S{constructor(s){super(s),this.element=new pE}},{visitors:{document:{objects:{OAuthFlow:{$visitor:wS}}}}}=H_;const SS=class oauth_flow_OAuthFlowVisitor extends wS{constructor(s){super(s),this.element=new uE}};class Webhooks extends gp.Sh{static primaryClass=\"webhooks\";constructor(s,i,u){super(s,i,u),this.classes.push(Webhooks.primaryClass)}}const xS=Webhooks;class WebhooksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new xS,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),this.element.filter(yw).forEach(((s,i)=>{s.setMetaProperty(\"webhook-name\",serializers_value(i))})),i}}const kS=WebhooksVisitor,OS={visitors:{value:H_.visitors.value,document:{objects:{OpenApi:{$visitor:jE,fixedFields:{openapi:H_.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:\"#/visitors/document/objects/Info\"},jsonSchemaDialect:LE,servers:H_.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:\"#/visitors/document/objects/Paths\"},webhooks:kS,components:{$ref:\"#/visitors/document/objects/Components\"},security:H_.visitors.document.objects.OpenApi.fixedFields.security,tags:H_.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:IE,fixedFields:{title:H_.visitors.document.objects.Info.fixedFields.title,description:H_.visitors.document.objects.Info.fixedFields.description,summary:{$ref:\"#/visitors/value\"},termsOfService:H_.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:H_.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:ME,fixedFields:{name:H_.visitors.document.objects.Contact.fixedFields.name,url:H_.visitors.document.objects.Contact.fixedFields.url,email:H_.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:RE,fixedFields:{name:H_.visitors.document.objects.License.fixedFields.name,identifier:{$ref:\"#/visitors/value\"},url:H_.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:qE,fixedFields:{url:H_.visitors.document.objects.Server.fixedFields.url,description:H_.visitors.document.objects.Server.fixedFields.description,variables:H_.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:UE,fixedFields:{enum:H_.visitors.document.objects.ServerVariable.fixedFields.enum,default:H_.visitors.document.objects.ServerVariable.fixedFields.default,description:H_.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:JE,fixedFields:{schemas:Gw,responses:H_.visitors.document.objects.Components.fixedFields.responses,parameters:H_.visitors.document.objects.Components.fixedFields.parameters,examples:H_.visitors.document.objects.Components.fixedFields.examples,requestBodies:H_.visitors.document.objects.Components.fixedFields.requestBodies,headers:H_.visitors.document.objects.Components.fixedFields.headers,securitySchemes:H_.visitors.document.objects.Components.fixedFields.securitySchemes,links:H_.visitors.document.objects.Components.fixedFields.links,callbacks:H_.visitors.document.objects.Components.fixedFields.callbacks,pathItems:Xw}},Paths:{$visitor:sS},PathItem:{$visitor:yS,fixedFields:{$ref:H_.visitors.document.objects.PathItem.fixedFields.$ref,summary:H_.visitors.document.objects.PathItem.fixedFields.summary,description:H_.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:H_.visitors.document.objects.PathItem.fixedFields.servers,parameters:H_.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:mS,fixedFields:{tags:H_.visitors.document.objects.Operation.fixedFields.tags,summary:H_.visitors.document.objects.Operation.fixedFields.summary,description:H_.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:H_.visitors.document.objects.Operation.fixedFields.operationId,parameters:H_.visitors.document.objects.Operation.fixedFields.parameters,requestBody:H_.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:H_.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:H_.visitors.document.objects.Operation.fixedFields.deprecated,security:H_.visitors.document.objects.Operation.fixedFields.security,servers:H_.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:tS,fixedFields:{description:H_.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:H_.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:ew,fixedFields:{name:H_.visitors.document.objects.Parameter.fixedFields.name,in:H_.visitors.document.objects.Parameter.fixedFields.in,description:H_.visitors.document.objects.Parameter.fixedFields.description,required:H_.visitors.document.objects.Parameter.fixedFields.required,deprecated:H_.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:H_.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:H_.visitors.document.objects.Parameter.fixedFields.style,explode:H_.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:H_.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.Parameter.fixedFields.example,examples:H_.visitors.document.objects.Parameter.fixedFields.examples,content:H_.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:aS,fixedFields:{description:H_.visitors.document.objects.RequestBody.fixedFields.description,content:H_.visitors.document.objects.RequestBody.fixedFields.content,required:H_.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:VE,fixedFields:{schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.MediaType.fixedFields.example,examples:H_.visitors.document.objects.MediaType.fixedFields.examples,encoding:H_.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:nS,fixedFields:{contentType:H_.visitors.document.objects.Encoding.fixedFields.contentType,headers:H_.visitors.document.objects.Encoding.fixedFields.headers,style:H_.visitors.document.objects.Encoding.fixedFields.style,explode:H_.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:H_.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:dS,fixedFields:{default:H_.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:pS,fixedFields:{description:H_.visitors.document.objects.Response.fixedFields.description,headers:H_.visitors.document.objects.Response.fixedFields.headers,content:H_.visitors.document.objects.Response.fixedFields.content,links:H_.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:cS},Example:{$visitor:Zw,fixedFields:{summary:H_.visitors.document.objects.Example.fixedFields.summary,description:H_.visitors.document.objects.Example.fixedFields.description,value:H_.visitors.document.objects.Example.fixedFields.value,externalValue:H_.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:BE,fixedFields:{operationRef:H_.visitors.document.objects.Link.fixedFields.operationRef,operationId:H_.visitors.document.objects.Link.fixedFields.operationId,parameters:H_.visitors.document.objects.Link.fixedFields.parameters,requestBody:H_.visitors.document.objects.Link.fixedFields.requestBody,description:H_.visitors.document.objects.Link.fixedFields.description,server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:rw,fixedFields:{description:H_.visitors.document.objects.Header.fixedFields.description,required:H_.visitors.document.objects.Header.fixedFields.required,deprecated:H_.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:H_.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:H_.visitors.document.objects.Header.fixedFields.style,explode:H_.visitors.document.objects.Header.fixedFields.explode,allowReserved:H_.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.Header.fixedFields.example,examples:H_.visitors.document.objects.Header.fixedFields.examples,content:H_.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:YE,fixedFields:{name:H_.visitors.document.objects.Tag.fixedFields.name,description:H_.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:QE,fixedFields:{$ref:H_.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Schema:{$visitor:Pw,fixedFields:{$schema:{$ref:\"#/visitors/value\"},$vocabulary:Iw,$id:{$ref:\"#/visitors/value\"},$anchor:{$ref:\"#/visitors/value\"},$dynamicAnchor:{$ref:\"#/visitors/value\"},$dynamicRef:{$ref:\"#/visitors/value\"},$ref:Nw,$defs:Mw,$comment:{$ref:\"#/visitors/value\"},allOf:Tw,anyOf:Rw,oneOf:Dw,not:{$ref:\"#/visitors/document/objects/Schema\"},if:{$ref:\"#/visitors/document/objects/Schema\"},then:{$ref:\"#/visitors/document/objects/Schema\"},else:{$ref:\"#/visitors/document/objects/Schema\"},dependentSchemas:Bw,prefixItems:Lw,items:{$ref:\"#/visitors/document/objects/Schema\"},contains:{$ref:\"#/visitors/document/objects/Schema\"},properties:Fw,patternProperties:qw,additionalProperties:{$ref:\"#/visitors/document/objects/Schema\"},propertyNames:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedItems:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedProperties:{$ref:\"#/visitors/document/objects/Schema\"},type:$w,enum:Uw,const:{$ref:\"#/visitors/value\"},multipleOf:{$ref:\"#/visitors/value\"},maximum:{$ref:\"#/visitors/value\"},exclusiveMaximum:{$ref:\"#/visitors/value\"},minimum:{$ref:\"#/visitors/value\"},exclusiveMinimum:{$ref:\"#/visitors/value\"},maxLength:{$ref:\"#/visitors/value\"},minLength:{$ref:\"#/visitors/value\"},pattern:{$ref:\"#/visitors/value\"},maxItems:{$ref:\"#/visitors/value\"},minItems:{$ref:\"#/visitors/value\"},uniqueItems:{$ref:\"#/visitors/value\"},maxContains:{$ref:\"#/visitors/value\"},minContains:{$ref:\"#/visitors/value\"},maxProperties:{$ref:\"#/visitors/value\"},minProperties:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},dependentRequired:zw,title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},readOnly:{$ref:\"#/visitors/value\"},writeOnly:{$ref:\"#/visitors/value\"},examples:Vw,format:{$ref:\"#/visitors/value\"},contentEncoding:{$ref:\"#/visitors/value\"},contentMediaType:{$ref:\"#/visitors/value\"},contentSchema:{$ref:\"#/visitors/document/objects/Schema\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:Kw,fixedFields:{propertyName:H_.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:H_.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:Jw,fixedFields:{name:H_.visitors.document.objects.XML.fixedFields.name,namespace:H_.visitors.document.objects.XML.fixedFields.namespace,prefix:H_.visitors.document.objects.XML.fixedFields.prefix,attribute:H_.visitors.document.objects.XML.fixedFields.attribute,wrapped:H_.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:bS,fixedFields:{type:H_.visitors.document.objects.SecurityScheme.fixedFields.type,description:H_.visitors.document.objects.SecurityScheme.fixedFields.description,name:H_.visitors.document.objects.SecurityScheme.fixedFields.name,in:H_.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:H_.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:H_.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:H_.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:ES,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:SS,fixedFields:{authorizationUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:H_.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:KE}},extension:{$visitor:H_.visitors.document.extension.$visitor}}}},apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},CS={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_1Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...id},AS={namespace:s=>{const{base:i}=s;return i.register(\"callback\",X_),i.register(\"components\",Q_),i.register(\"contact\",Z_),i.register(\"discriminator\",eE),i.register(\"encoding\",tE),i.register(\"example\",rE),i.register(\"externalDocumentation\",nE),i.register(\"header\",oE),i.register(\"info\",sE),i.register(\"jsonSchemaDialect\",iE),i.register(\"license\",aE),i.register(\"link\",lE),i.register(\"mediaType\",cE),i.register(\"oAuthFlow\",uE),i.register(\"oAuthFlows\",pE),i.register(\"openapi\",hE),i.register(\"openApi3_1\",dE),i.register(\"operation\",fE),i.register(\"parameter\",mE),i.register(\"pathItem\",gE),i.register(\"paths\",yE),i.register(\"reference\",vE),i.register(\"requestBody\",bE),i.register(\"response\",_E),i.register(\"responses\",EE),i.register(\"schema\",wE),i.register(\"securityRequirement\",SE),i.register(\"securityScheme\",xE),i.register(\"server\",kE),i.register(\"serverVariable\",OE),i.register(\"tag\",CE),i.register(\"xml\",AE),i}},jS=AS,apidom_ns_openapi_3_1_es_refractor_toolbox=()=>{const s=createNamespace(jS);return{predicates:{...be,isElement:Up,isStringElement:zp,isArrayElement:Jp,isObjectElement:Hp,isMemberElement:Gp,isServersElement:rv,includesClasses,hasElementSourceMap},namespace:s}},apidom_ns_openapi_3_1_es_refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:u=[]}={})=>{const _=(0,gp.e)(s),w=dereference(OS),x=new(Il(i,w))({specObj:w});return visitor_visit(_,x),dispatchPlugins(x.element,u,{toolboxCreator:apidom_ns_openapi_3_1_es_refractor_toolbox,visitorOptions:{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}})},apidom_ns_openapi_3_1_es_refractor_createRefractor=s=>(i,u={})=>apidom_ns_openapi_3_1_es_refractor_refract(i,{specPath:s,...u});X_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Q_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Z_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),rE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),eE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),tE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),nE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),oE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),sE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),iE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"jsonSchemaDialect\"]),aE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),lE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),cE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),uE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),pE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),hE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),dE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),fE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),mE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),gE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),yE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),vE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),bE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),_E.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),EE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),wE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),SE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),xE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),kE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),OE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),CE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),AE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const PS=class NotImplementedError extends Sf{};const IS=class MediaTypes extends Array{unknownMediaType=\"application/octet-stream\";filterByFormat(){throw new PS(\"filterByFormat method in MediaTypes class is not yet implemented.\")}findBy(){throw new PS(\"findBy method in MediaTypes class is not yet implemented.\")}latest(){throw new PS(\"latest method in MediaTypes class is not yet implemented.\")}};class OpenAPIMediaTypes extends IS{filterByFormat(s=\"generic\"){const i=\"generic\"===s?\"openapi;version\":s;return this.filter((s=>s.includes(i)))}findBy(s=\"3.1.0\",i=\"generic\"){const u=\"generic\"===i?`vnd.oai.openapi;version=${s}`:`vnd.oai.openapi+${i};version=${s}`;return this.find((s=>s.includes(u)))||this.unknownMediaType}latest(s=\"generic\"){return Ec(this.filterByFormat(s))}}const NS=new OpenAPIMediaTypes(\"application/vnd.oai.openapi;version=3.1.0\",\"application/vnd.oai.openapi+json;version=3.1.0\",\"application/vnd.oai.openapi+yaml;version=3.1.0\"),MS=Vf({props:{uri:\"\",value:null,depth:0,refSet:null,errors:[]},init({depth:s=this.depth,refSet:i=this.refSet,uri:u=this.uri,value:_=this.value}={}){this.uri=u,this.value=_,this.depth=s,this.refSet=i,this.errors=[]}}),TS=MS;const RS=_curry3((function propEq(s,i,u){return Vl(s,bc(i,u))})),DS=Vf({props:{rootRef:null,refs:[],circular:!1},init({refs:s=[]}={}){this.refs=[],s.forEach((s=>this.add(s)))},methods:{get size(){return this.refs.length},add(s){return this.has(s)||(this.refs.push(s),this.rootRef=null===this.rootRef?s:this.rootRef,s.refSet=this),this},merge(s){for(const i of s.values())this.add(i);return this},has(s){const i=wu(s)?s:s.uri;return cu(this.find(RS(i,\"uri\")))},find(s){return this.refs.find(s)},*values(){yield*this.refs},clean(){this.refs.forEach((s=>{s.refSet=null})),this.rootRef=null,this.refs=[]}}}),BS=DS,LS={parse:{mediaType:\"text/plain\",parsers:[],parserOpts:{}},resolve:{baseURI:\"\",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:\"ignore\",circularReplacer:Sd,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}};const FS=_curry2((function lens(s,i){return function(u){return function(_){return Qc((function(s){return i(s,_)}),u(s(_)))}}}));var qS=_curry3((function assocPath(s,i,u){if(0===s.length)return i;var _=s[0];if(s.length>1){var w=!Nf(u)&&_has(_,u)&&\"object\"==typeof u[_]?u[_]:xl(s[1])?[]:{};i=assocPath(Array.prototype.slice.call(s,1),i,w)}return function _assoc(s,i,u){if(xl(s)&&Hl(u)){var _=[].concat(u);return _[s]=i,_}var w={};for(var x in u)w[x]=u[x];return w[s]=i,w}(_,i,u)}));const $S=qS;var Identity=function(s){return{value:s,map:function(i){return Identity(i(s))}}},US=_curry3((function over(s,i,u){return s((function(s){return Identity(i(s))}))(u).value}));const zS=US,VS=FS(Il([\"resolve\",\"baseURI\"]),$S([\"resolve\",\"baseURI\"])),baseURIDefault=s=>Rd(s)?url_cwd():s,util_merge=(s,i)=>{const u=kp(s,i);return zS(VS,baseURIDefault,u)},WS=Vf({props:{uri:null,mediaType:\"text/plain\",data:null,parseResult:null},init({uri:s=this.uri,mediaType:i=this.mediaType,data:u=this.data,parseResult:_=this.parseResult}={}){this.uri=s,this.mediaType=i,this.data=u,this.parseResult=_},methods:{get extension(){return wu(this.uri)?(s=>{const i=s.lastIndexOf(\".\");return i>=0?s.substring(i).toLowerCase():\"\"})(this.uri):\"\"},toString(){if(\"string\"==typeof this.data)return this.data;if(this.data instanceof ArrayBuffer||[\"ArrayBuffer\"].includes(zl(this.data))||ArrayBuffer.isView(this.data)){return new TextDecoder(\"utf-8\").decode(this.data)}return String(this.data)}}}),KS=WS;const HS=class PluginError extends Vh{plugin;constructor(s,i){super(s,{cause:i.cause}),this.plugin=i.plugin}},plugins_filter=async(s,i,u)=>{const _=await Promise.all(u.map(Lp([s],i)));return u.filter(((s,i)=>_[i]))},run=async(s,i,u)=>{let _;for(const w of u)try{const u=await w[s].call(w,...i);return{plugin:w,result:u}}catch(s){_=new HS(\"Error while running plugin\",{cause:s,plugin:w})}return Promise.reject(_)};const JS=class DereferenceError extends Vh{};const GS=class UnmatchedDereferenceStrategyError extends JS{},dereferenceApiDOM=async(s,i)=>{let u=s,_=!1;if(!nh(s)){const i=cloneShallow(s);i.classes.push(\"result\"),u=new bp([i]),_=!0}const w=KS({uri:i.resolve.baseURI,parseResult:u,mediaType:i.parse.mediaType}),x=await plugins_filter(\"canDereference\",[w,i],i.dereference.strategies);if(Tp(x))throw new GS(w.uri);try{const{result:s}=await run(\"dereference\",[w,i],x);return _?s.get(0):s}catch(s){throw new JS(`Error while dereferencing file \"${w.uri}\"`,{cause:s})}};const YS=class ParseError extends Vh{};const XS=class ParserError extends YS{},QS=Vf({props:{name:\"\",allowEmpty:!0,sourceMap:!1,fileExtensions:[],mediaTypes:[]},init({allowEmpty:s=this.allowEmpty,sourceMap:i=this.sourceMap,fileExtensions:u=this.fileExtensions,mediaTypes:_=this.mediaTypes}={}){this.allowEmpty=s,this.sourceMap=i,this.fileExtensions=u,this.mediaTypes=_},methods:{async canParse(){throw new PS(\"canParse method in Parser stamp is not yet implemented.\")},async parse(){throw new PS(\"parse method in Parser stamp is not yet implemented.\")}}}),ZS=QS,ex=Vf(ZS,{props:{name:\"binary\"},methods:{async canParse(s){return 0===this.fileExtensions.length||this.fileExtensions.includes(s.extension)},async parse(s){try{const i=unescape(encodeURIComponent(s.toString())),u=btoa(i),_=new bp;if(0!==u.length){const s=new gp.Om(u);s.classes.push(\"result\"),_.push(s)}return _}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),tx=Vf({props:{name:null},methods:{canResolve:()=>!1,async resolve(){throw new PS(\"resolve method in ResolveStrategy stamp is not yet implemented.\")}}}),rx=Vf(tx,{init(){this.name=\"openapi-3-1\"},methods:{canResolve(s,i){const u=i.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));return void 0!==u&&u.canDereference(s,i)},async resolve(s,i){const u=i.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));if(void 0===u)throw new GS('\"openapi-3-1\" dereference strategy is not available.');const _=BS(),w=util_merge(i,{resolve:{internal:!1},dereference:{refSet:_}});return await u.dereference(s,w),_}}});function _clone(s,i,u){if(u||(u=new nx),function _isPrimitive(s){var i=typeof s;return null==s||\"object\"!=i&&\"function\"!=i}(s))return s;var _=function copy(_){var w=u.get(s);if(w)return w;for(var x in u.set(s,_),s)Object.prototype.hasOwnProperty.call(s,x)&&(_[x]=i?_clone(s[x],!0,u):s[x]);return _};switch(zl(s)){case\"Object\":return _(Object.create(Object.getPrototypeOf(s)));case\"Array\":return _([]);case\"Date\":return new Date(s.valueOf());case\"RegExp\":return _cloneRegExp(s);case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"BigInt64Array\":case\"BigUint64Array\":return s.slice();default:return s}}var nx=function(){function _ObjectMap(){this.map={},this.length=0}return _ObjectMap.prototype.set=function(s,i){const u=this.hash(s);let _=this.map[u];_||(this.map[u]=_=[]),_.push([s,i]),this.length+=1},_ObjectMap.prototype.hash=function(s){let i=[];for(var u in s)i.push(Object.prototype.toString.call(s[u]));return i.join()},_ObjectMap.prototype.get=function(s){if(this.length<=180){for(const i in this.map){const u=this.map[i];for(let i=0;i<u.length;i+=1){const _=u[i];if(_[0]===s)return _[1]}}return}const i=this.hash(s),u=this.map[i];if(u)for(let i=0;i<u.length;i+=1){const _=u[i];if(_[0]===s)return _[1]}},_ObjectMap}(),ox=function(){function XReduceBy(s,i,u,_){this.valueFn=s,this.valueAcc=i,this.keyFn=u,this.xf=_,this.inputs={}}return XReduceBy.prototype[\"@@transducer/init\"]=_xfBase_init,XReduceBy.prototype[\"@@transducer/result\"]=function(s){var i;for(i in this.inputs)if(_has(i,this.inputs)&&(s=this.xf[\"@@transducer/step\"](s,this.inputs[i]))[\"@@transducer/reduced\"]){s=s[\"@@transducer/value\"];break}return this.inputs=null,this.xf[\"@@transducer/result\"](s)},XReduceBy.prototype[\"@@transducer/step\"]=function(s,i){var u=this.keyFn(i);return this.inputs[u]=this.inputs[u]||[u,_clone(this.valueAcc,!1)],this.inputs[u][1]=this.valueFn(this.inputs[u][1],i),s},XReduceBy}();function _xreduceBy(s,i,u){return function(_){return new ox(s,i,u,_)}}var sx=_curryN(4,[],_dispatchable([],_xreduceBy,(function reduceBy(s,i,u,_){var w=_xwrap((function(_,w){var x=u(w),j=s(_has(x,_)?_[x]:_clone(i,!1),w);return j&&j[\"@@transducer/reduced\"]?_reduced(_):(_[x]=j,_)}));return ac(w,{},_)})));const ix=_curry2(_checkForMethod(\"groupBy\",sx((function(s,i){return s.push(i),s}),[]))),removeSpaces=s=>s.replace(/\\s/g,\"\"),normalize_operation_ids_replaceSpecialCharsWithUnderscore=s=>s.replace(/\\W/gi,\"_\"),normalizeOperationId=(s,i,u)=>{const _=removeSpaces(s);return _.length>0?normalize_operation_ids_replaceSpecialCharsWithUnderscore(_):((s,i)=>`${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(i.toLowerCase()))}${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(s))}`)(i,u)},normalize_operation_ids=({operationIdNormalizer:s=normalizeOperationId}={})=>({predicates:i,namespace:u})=>{const _=[],w=[],x=[];return{visitor:{OpenApi3_1Element:{leave(){const s=ix((s=>serializers_value(s.operationId)),w);Object.entries(s).forEach((([s,i])=>{Array.isArray(i)&&(i.length<=1||i.forEach(((i,_)=>{const w=`${s}${_+1}`;i.operationId=new u.elements.String(w)})))})),x.forEach((s=>{if(void 0===s.operationId)return;const i=String(serializers_value(s.operationId)),u=w.find((s=>serializers_value(s.meta.get(\"originalOperationId\"))===i));void 0!==u&&(s.operationId=cloneDeep.safe(u.operationId),s.meta.set(\"originalOperationId\",i),s.set(\"__originalOperationId\",i))})),w.length=0,x.length=0}},PathItemElement:{enter(s){const i=gc(\"path\",serializers_value(s.meta.get(\"path\")));_.push(i)},leave(){_.pop()}},OperationElement:{enter(i){if(void 0===i.operationId)return;const x=String(serializers_value(i.operationId)),j=Ec(_),P=gc(\"method\",serializers_value(i.meta.get(\"http-method\"))),B=s(x,j,P);x!==B&&(i.operationId=new u.elements.String(B),i.set(\"__originalOperationId\",x),i.meta.set(\"originalOperationId\",x),w.push(i))}},LinkElement:{leave(s){i.isLinkElement(s)&&void 0!==s.operationId&&x.push(s)}}}}};const ax=_curry3((function pathOr(s,i,u){return gc(s,Il(i,u))}));var lx=function(){function XUniqWith(s,i){this.xf=i,this.pred=s,this.items=[]}return XUniqWith.prototype[\"@@transducer/init\"]=_xfBase_init,XUniqWith.prototype[\"@@transducer/result\"]=_xfBase_result,XUniqWith.prototype[\"@@transducer/step\"]=function(s,i){return _includesWith(this.pred,i,this.items)?s:(this.items.push(i),this.xf[\"@@transducer/step\"](s,i))},XUniqWith}();function _xuniqWith(s){return function(i){return new lx(s,i)}}var cx=_curry2(_dispatchable([],_xuniqWith,(function(s,i){for(var u,_=0,w=i.length,x=[];_<w;)_includesWith(s,u=i[_],x)||(x[x.length]=u),_+=1;return x})));const ux=cx,normalize_parameters=()=>({predicates:s})=>{const parameterEquals=(i,u)=>!!s.isParameterElement(i)&&(!!s.isParameterElement(u)&&(!!s.isStringElement(i.name)&&(!!s.isStringElement(i.in)&&(!!s.isStringElement(u.name)&&(!!s.isStringElement(u.in)&&(serializers_value(i.name)===serializers_value(u.name)&&serializers_value(i.in)===serializers_value(u.in))))))),i=[];return{visitor:{PathItemElement:{enter(u,_,w,x,j){if(j.some(s.isComponentsElement))return;const{parameters:P}=u;s.isArrayElement(P)?i.push([...P.content]):i.push([])},leave(){i.pop()}},OperationElement:{leave(s){const u=Ec(i);if(!Array.isArray(u)||0===u.length)return;const _=ax([],[\"parameters\",\"content\"],s),w=ux(parameterEquals,[..._,...u]);s.parameters=new S_(w)}}}}},normalize_security_requirements=()=>({predicates:s})=>{let i;return{visitor:{OpenApi3_1Element:{enter(u){s.isArrayElement(u.security)&&(i=u.security)},leave(){i=void 0}},OperationElement:{leave(u,_,w,x,j){if(j.some(s.isComponentsElement))return;var P;void 0===u.security&&void 0!==i&&(u.security=new j_(null===(P=i)||void 0===P?void 0:P.content))}}}}},normalize_servers=()=>({predicates:s,namespace:i})=>({visitor:{OpenApi3_1Element(u){const _=void 0===u.servers,w=s.isArrayElement(u.servers),x=w&&0===u.servers.length,j=i.elements.Server.refract({url:\"/\"});_||!w?u.servers=new xy([j]):w&&x&&u.servers.push(j)},PathItemElement(i,u,_,w,x){if(x.some(s.isComponentsElement))return;if(!x.some(s.isOpenApi3_1Element))return;const j=x.find(s.isOpenApi3_1Element),P=void 0===i.servers,B=s.isArrayElement(i.servers),$=B&&0===i.servers.length;if(s.isOpenApi3_1Element(j)){var U;const s=null===(U=j.servers)||void 0===U?void 0:U.content,u=null!=s?s:[];P||!B?i.servers=new R_(u):B&&$&&u.forEach((s=>{i.servers.push(s)}))}},OperationElement(i,u,_,w,x){if(x.some(s.isComponentsElement))return;if(!x.some(s.isOpenApi3_1Element))return;const j=[...x].reverse().find(s.isPathItemElement),P=void 0===i.servers,B=s.isArrayElement(i.servers),$=B&&0===i.servers.length;if(s.isPathItemElement(j)){var U;const s=null===(U=j.servers)||void 0===U?void 0:U.content,u=null!=s?s:[];P||!B?i.servers=new I_(u):B&&$&&u.forEach((s=>{i.servers.push(s)}))}}}}),normalize_parameter_examples=()=>({predicates:s})=>({visitor:{ParameterElement:{leave(i,u,_,w,x){var j,P;if(!x.some(s.isComponentsElement)&&void 0!==i.schema&&s.isSchemaElement(i.schema)&&(void 0!==(null===(j=i.schema)||void 0===j?void 0:j.example)||void 0!==(null===(P=i.schema)||void 0===P?void 0:P.examples))){if(void 0!==i.examples&&s.isObjectElement(i.examples)){const s=i.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==i.schema.examples&&i.schema.set(\"examples\",s),void(void 0!==i.schema.example&&i.schema.set(\"example\",s))}void 0!==i.example&&(void 0!==i.schema.examples&&i.schema.set(\"examples\",[cloneDeep(i.example)]),void 0!==i.schema.example&&i.schema.set(\"example\",cloneDeep(i.example)))}}}}}),normalize_header_examples=()=>({predicates:s})=>({visitor:{HeaderElement:{leave(i,u,_,w,x){var j,P;if(!x.some(s.isComponentsElement)&&void 0!==i.schema&&s.isSchemaElement(i.schema)&&(void 0!==(null===(j=i.schema)||void 0===j?void 0:j.example)||void 0!==(null===(P=i.schema)||void 0===P?void 0:P.examples))){if(void 0!==i.examples&&s.isObjectElement(i.examples)){const s=i.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==i.schema.examples&&i.schema.set(\"examples\",s),void(void 0!==i.schema.example&&i.schema.set(\"example\",s))}void 0!==i.example&&(void 0!==i.schema.examples&&i.schema.set(\"examples\",[cloneDeep(i.example)]),void 0!==i.schema.example&&i.schema.set(\"example\",cloneDeep(i.example)))}}}}}),pojoAdapter=s=>i=>{if(null!=i&&i.$$normalized)return i;if(pojoAdapter.cache.has(i))return pojoAdapter.cache.get(i);const u=dE.refract(i),_=s(u),w=serializers_value(_);return pojoAdapter.cache.set(i,w),w};pojoAdapter.cache=new WeakMap;const openapi_3_1_apidom_normalize=s=>{if(!Hp(s))return s;if(s.hasKey(\"$$normalized\"))return s;const i=[normalize_operation_ids({operationIdNormalizer:(s,i,u)=>opId({operationId:s},i,u,{v2OperationIdCompatibilityMode:!1})}),normalize_parameters(),normalize_security_requirements(),normalize_servers(),normalize_parameter_examples(),normalize_header_examples()],u=dispatchPlugins(s,i,{toolboxCreator:apidom_ns_openapi_3_1_es_refractor_toolbox,visitorOptions:{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}});return u.set(\"$$normalized\",!0),u},px=Vf({props:{name:null},methods:{canRead:()=>!1,async read(){throw new PS(\"read method in Resolver stamp is not yet implemented.\")}}}),hx=Vf(px,{props:{timeout:5e3,redirects:5,withCredentials:!1},init({timeout:s=this.timeout,redirects:i=this.redirects,withCredentials:u=this.withCredentials}={}){this.timeout=s,this.redirects=i,this.withCredentials=u},methods:{canRead:s=>isHttpUrl(s.uri),async read(){throw new PS(\"read method in HttpResolver stamp is not yet implemented.\")},getHttpClient(){throw new PS(\"getHttpClient method in HttpResolver stamp is not yet implemented.\")}}});const dx=class ResolveError extends Vh{};const fx=class ResolverError extends dx{},{AbortController:mx,AbortSignal:gx}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=mx),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=gx);const yx=hx.compose({props:{name:\"http-swagger-client\",swaggerHTTPClient:http_http,swaggerHTTPClientConfig:{}},init({swaggerHTTPClient:s=this.swaggerHTTPClient}={}){this.swaggerHTTPClient=s},methods:{getHttpClient(){return this.swaggerHTTPClient},async read(s){const i=this.getHttpClient(),u=new AbortController,{signal:_}=u,w=setTimeout((()=>{u.abort()}),this.timeout),x=this.getHttpClient().withCredentials||this.withCredentials?\"include\":\"same-origin\",j=0===this.redirects?\"error\":\"follow\",P=this.redirects>0?this.redirects:void 0;try{return(await i({url:s.uri,signal:_,userFetch:async(s,i)=>{let u=await fetch(s,i);try{u.headers.delete(\"Content-Type\")}catch{u=new Response(u.body,{...u,headers:new Headers(u.headers)}),u.headers.delete(\"Content-Type\")}return u},credentials:x,redirect:j,follow:P,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(i){throw new fx(`Error downloading \"${s.uri}\"`,{cause:i})}finally{clearTimeout(w)}}}}),from=(s,i=Fh)=>{if(wu(s))try{return i.fromRefract(JSON.parse(s))}catch{}return Dh(s)&&Df(\"element\",s)?i.fromRefract(s):i.toElement(s)},vx=ZS.compose({props:{name:\"json-swagger-client\",fileExtensions:[\".json\"],mediaTypes:[\"application/json\"]},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{return JSON.parse(s.toString()),!0}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"json-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();if(this.allowEmpty&&\"\"===u.trim())return i;try{const s=from(JSON.parse(u));return s.classes.push(\"result\"),i.push(s),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),bx=ZS.compose({props:{name:\"yaml-1-2-swagger-client\",fileExtensions:[\".yaml\",\".yml\"],mediaTypes:[\"text/yaml\",\"application/yaml\"]},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{return so.load(s.toString(),{schema:Jn}),!0}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();try{const s=so.load(u,{schema:Jn});if(this.allowEmpty&&void 0===s)return i;const _=from(s);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),_x=ZS.compose({props:{name:\"openapi-json-3-1-swagger-client\",fileExtensions:[\".json\"],mediaTypes:new OpenAPIMediaTypes(...NS.filterByFormat(\"generic\"),...NS.filterByFormat(\"json\")),detectionRegExp:/\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\"/},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{const i=s.toString();return JSON.parse(i),this.detectionRegExp.test(i)}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();if(this.allowEmpty&&\"\"===u.trim())return i;try{const s=JSON.parse(u),_=dE.refract(s,this.refractorOpts);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),Ex=ZS.compose({props:{name:\"openapi-yaml-3-1-swagger-client\",fileExtensions:[\".yaml\",\".yml\"],mediaTypes:new OpenAPIMediaTypes(...NS.filterByFormat(\"generic\"),...NS.filterByFormat(\"yaml\")),detectionRegExp:/(?<YAML>^([\"']?)openapi\\2\\s*:\\s*([\"']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\")/m},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{const i=s.toString();return so.load(i),this.detectionRegExp.test(i)}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();try{const s=so.load(u,{schema:Jn});if(this.allowEmpty&&void 0===s)return i;const _=dE.refract(s,this.refractorOpts);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),wx=Vf({props:{name:null},methods:{canDereference:()=>!1,async dereference(){throw new PS(\"dereference method in DereferenceStrategy stamp is not yet implemented.\")}}});var Sx=_curry2((function none(s,i){return $p(_complement(s),i)}));const xx=Sx;var kx=__webpack_require__(8068);const Ox=class ElementIdentityError extends Gh{value;constructor(s,i){super(s,i),void 0!==i&&(this.value=i.value)}},Cx=Vf({props:{uuid:null,length:null,identityMap:null},init({length:s=6}={}){this.length=6,this.uuid=new kx({length:s}),this.identityMap=new WeakMap},methods:{identify(s){if(!Up(s))throw new Ox(\"Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.\",{value:s});if(s.meta.hasKey(\"id\")&&zp(s.meta.get(\"id\"))&&!s.meta.get(\"id\").equals(\"\"))return s.id;if(this.identityMap.has(s))return this.identityMap.get(s);const i=new gp.Om(this.generateId());return this.identityMap.set(s,i),i},forget(s){return!!this.identityMap.has(s)&&(this.identityMap.delete(s),!0)},generateId(){return this.uuid.randomUUID()}}}),Ax=(Cx({length:6}),(s,i)=>{const u=new PredicateVisitor({predicate:s,returnOnTrue:Yh});return visitor_visit(i,u),ax(void 0,[0],u.result)});const jx=class JsonSchema$anchorError extends Vh{};const Px=class EvaluationJsonSchema$anchorError extends jx{};const Ix=class InvalidJsonSchema$anchorError extends jx{constructor(s){super(`Invalid JSON Schema $anchor \"${s}\".`)}},isAnchor=s=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(s),uriToAnchor=s=>{const i=getHash(s);return Ld(\"#\",i)},$anchor_evaluate=(s,i)=>{const u=(s=>{if(!isAnchor(s))throw new Ix(s);return s})(s),_=Ax((s=>Sw(s)&&serializers_value(s.$anchor)===u),i);if(lu(_))throw new Px(`Evaluation failed on token: \"${u}\"`);return _},traversal_filter=(s,i)=>{const u=new PredicateVisitor({predicate:s});return visitor_visit(i,u),new gp.G6(u.result)};const Nx=class JsonSchemaUriError extends Vh{};const Mx=class EvaluationJsonSchemaUriError extends Nx{},resolveSchema$refField=(s,i)=>{if(void 0===i.$ref)return;const u=getHash(serializers_value(i.$ref)),_=serializers_value(i.meta.get(\"inherited$id\")),w=pc(((s,i)=>resolve(s,sanitize(stripHash(i)))),s,[..._,serializers_value(i.$ref)]);return`${w}${\"#\"===u?\"\":u}`},refractToSchemaElement=s=>{if(refractToSchemaElement.cache.has(s))return refractToSchemaElement.cache.get(s);const i=wE.refract(s);return refractToSchemaElement.cache.set(s,i),i};refractToSchemaElement.cache=new WeakMap;const maybeRefractToSchemaElement=s=>isPrimitiveElement(s)?refractToSchemaElement(s):s,uri_evaluate=(s,i)=>{const{cache:u}=uri_evaluate,_=stripHash(s),isSchemaElementWith$id=s=>Sw(s)&&void 0!==s.$id;if(!u.has(i)){const s=traversal_filter(isSchemaElementWith$id,i);u.set(i,Array.from(s))}const w=u.get(i).find((s=>{const i=((s,i)=>{if(void 0===i.$id)return;const u=serializers_value(i.meta.get(\"inherited$id\"));return pc(((s,i)=>resolve(s,sanitize(stripHash(i)))),s,[...u,serializers_value(i.$id)])})(_,s);return i===_}));if(lu(w))throw new Mx(`Evaluation failed on URI: \"${s}\"`);let x,j;return isAnchor(uriToAnchor(s))?(x=$anchor_evaluate,j=uriToAnchor(s)):(x=es_evaluate,j=uriToPointer(s)),x(j,w)};uri_evaluate.cache=new WeakMap;const Tx=class MaximumDereferenceDepthError extends JS{};const Rx=class MaximumResolveDepthError extends dx{};const Dx=class UnmatchedResolverError extends fx{},_swagger_api_apidom_reference_es_parse=async(s,i)=>{const u=KS({uri:sanitize(stripHash(s)),mediaType:i.parse.mediaType}),_=await(async(s,i)=>{const u=i.resolve.resolvers.map((s=>{const u=Object.create(s);return Object.assign(u,i.resolve.resolverOpts)})),_=await plugins_filter(\"canRead\",[s,i],u);if(Tp(_))throw new Dx(s.uri);try{const{result:i}=await run(\"read\",[s],_);return i}catch(i){throw new dx(`Error while reading file \"${s.uri}\"`,{cause:i})}})(u,i);return(async(s,i)=>{const u=i.parse.parsers.map((s=>{const u=Object.create(s);return Object.assign(u,i.parse.parserOpts)})),_=await plugins_filter(\"canParse\",[s,i],u);if(Tp(_))throw new Dx(s.uri);try{const{plugin:u,result:w}=await run(\"parse\",[s,i],_);return!u.allowEmpty&&w.isEmpty?Promise.reject(new YS(`Error while parsing file \"${s.uri}\". File is empty.`)):w}catch(i){throw new YS(`Error while parsing file \"${s.uri}\"`,{cause:i})}})(KS({...u,data:_}),i)};class AncestorLineage extends Array{includesCycle(s){return this.filter((i=>i.has(s))).length>1}includes(s,i){return s instanceof Set?super.includes(s,i):this.some((i=>i.has(s)))}findItem(s){for(const i of this)for(const u of i)if(Up(u)&&s(u))return u}}const Bx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Lx=Cx(),Fx=Vf({props:{indirections:null,namespace:null,reference:null,options:null,ancestors:null,refractCache:null},init({indirections:s=[],reference:i,namespace:u,options:_,ancestors:w=new AncestorLineage,refractCache:x=new Map}){this.indirections=s,this.namespace=u,this.reference=i,this.options=_,this.ancestors=new AncestorLineage(...w),this.refractCache=x},methods:{toBaseURI(s){return resolve(this.reference.uri,sanitize(stripHash(s)))},async toReference(s){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Rx(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file \"${this.reference.uri}\"`);const i=this.toBaseURI(s),{refSet:u}=this.reference;if(u.has(i))return u.find(RS(i,\"uri\"));const _=await _swagger_api_apidom_reference_es_parse(unsanitize(i),{...this.options,parse:{...this.options.parse,mediaType:\"text/plain\"}}),w=TS({uri:i,value:cloneDeep(_),depth:this.reference.depth+1});if(u.add(w),this.options.dereference.immutable){const s=TS({uri:`immutable://${i}`,value:_,depth:this.reference.depth+1});u.add(s)}return w},toAncestorLineage(s){const i=new Set(s.filter(Up));return[new AncestorLineage(...this.ancestors,i),i]},async ReferenceElement(s,i,u,_,w){if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]),P=this.toBaseURI(serializers_value(s.$ref)),B=stripHash(this.reference.uri)===P,$=!B;if(!this.options.resolve.internal&&B)return!1;if(!this.options.resolve.external&&$)return!1;const U=await this.toReference(serializers_value(s.$ref)),Y=resolve(P,serializers_value(s.$ref));this.indirections.push(s);const X=uriToPointer(Y);let Z=es_evaluate(X,U.value.result);if(Z.id=Lx.identify(Z),isPrimitiveElement(Z)){const i=serializers_value(s.meta.get(\"referenced-element\")),u=`${i}-${serializers_value(Lx.identify(Z))}`;if(this.refractCache.has(u))Z=this.refractCache.get(u);else if(isReferenceLikeElement(Z))Z=vE.refract(Z),Z.setMetaProperty(\"referenced-element\",i),this.refractCache.set(u,Z);else{Z=this.namespace.getElementClass(i).refract(Z),this.refractCache.set(u,Z)}}if(s===Z)throw new Vh(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(Z)){if(U.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const _=new gp.sI(Z.id,{type:\"reference\",uri:U.uri,$ref:serializers_value(s.$ref)}),w=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if(($||bw(Z)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(Z)){j.add(s);const i=Fx({reference:U,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});Z=await Bx(Z,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}this.indirections.pop();const ae=cloneShallow(Z);return ae.setMetaProperty(\"id\",Lx.generateId()),ae.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ae.setMetaProperty(\"ref-origin\",U.uri),ae.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Lx.identify(s))),Hp(Z)&&Hp(ae)&&(s.hasKey(\"description\")&&\"description\"in Z&&(ae.remove(\"description\"),ae.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in Z&&(ae.remove(\"summary\"),ae.set(\"summary\",s.get(\"summary\")))),Gp(u)?u.value=ae:Array.isArray(u)&&(u[i]=ae),!u&&ae},async PathItemElement(s,i,u,_,w){if(!zp(s.$ref))return;if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]),P=this.toBaseURI(serializers_value(s.$ref)),B=stripHash(this.reference.uri)===P,$=!B;if(!this.options.resolve.internal&&B)return;if(!this.options.resolve.external&&$)return;const U=await this.toReference(serializers_value(s.$ref)),Y=resolve(P,serializers_value(s.$ref));this.indirections.push(s);const X=uriToPointer(Y);let Z=es_evaluate(X,U.value.result);if(Z.id=Lx.identify(Z),isPrimitiveElement(Z)){const s=`path-item-${serializers_value(Lx.identify(Z))}`;this.refractCache.has(s)?Z=this.refractCache.get(s):(Z=gE.refract(Z),this.refractCache.set(s,Z))}if(s===Z)throw new Vh(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(Z)){if(U.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const _=new gp.sI(Z.id,{type:\"path-item\",uri:U.uri,$ref:serializers_value(s.$ref)}),w=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if(($||yw(Z)&&zp(Z.$ref)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(Z)){j.add(s);const i=Fx({reference:U,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});Z=await Bx(Z,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}if(this.indirections.pop(),yw(Z)){const i=new gE([...Z.content],cloneDeep(Z.meta),cloneDeep(Z.attributes));i.setMetaProperty(\"id\",Lx.generateId()),s.forEach(((s,u,_)=>{i.remove(serializers_value(u)),i.content.push(_)})),i.remove(\"$ref\"),i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",U.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Lx.identify(s))),Z=i}return Gp(u)?u.value=Z:Array.isArray(u)&&(u[i]=Z),u?void 0:Z},async LinkElement(s,i,u){if(!zp(s.operationRef)&&!zp(s.operationId))return;if(zp(s.operationRef)&&zp(s.operationId))throw new Vh(\"LinkElement operationRef and operationId fields are mutually exclusive.\");let _;if(zp(s.operationRef)){var w;const x=uriToPointer(serializers_value(s.operationRef)),j=this.toBaseURI(serializers_value(s.operationRef)),P=stripHash(this.reference.uri)===j,B=!P;if(!this.options.resolve.internal&&P)return;if(!this.options.resolve.external&&B)return;const $=await this.toReference(serializers_value(s.operationRef));if(_=es_evaluate(x,$.value.result),isPrimitiveElement(_)){const s=`operation-${serializers_value(Lx.identify(_))}`;this.refractCache.has(s)?_=this.refractCache.get(s):(_=fE.refract(_),this.refractCache.set(s,_))}_=cloneShallow(_),_.setMetaProperty(\"ref-origin\",$.uri);const U=cloneShallow(s);return null===(w=U.operationRef)||void 0===w||w.meta.set(\"operation\",_),Gp(u)?u.value=U:Array.isArray(u)&&(u[i]=U),u?void 0:U}if(zp(s.operationId)){var x;const w=serializers_value(s.operationId),j=await this.toReference(unsanitize(this.reference.uri));if(_=Ax((s=>mw(s)&&Up(s.operationId)&&s.operationId.equals(w)),j.value.result),lu(_))throw new Vh(`OperationElement(operationId=${w}) not found.`);const P=cloneShallow(s);return null===(x=P.operationId)||void 0===x||x.meta.set(\"operation\",_),Gp(u)?u.value=P:Array.isArray(u)&&(u[i]=P),u?void 0:P}},async ExampleElement(s,i,u){if(!zp(s.externalValue))return;if(s.hasKey(\"value\")&&zp(s.externalValue))throw new Vh(\"ExampleElement value and externalValue fields are mutually exclusive.\");const _=this.toBaseURI(serializers_value(s.externalValue)),w=stripHash(this.reference.uri)===_,x=!w;if(!this.options.resolve.internal&&w)return;if(!this.options.resolve.external&&x)return;const j=await this.toReference(serializers_value(s.externalValue)),P=cloneShallow(j.value.result);P.setMetaProperty(\"ref-origin\",j.uri);const B=cloneShallow(s);return B.value=P,Gp(u)?u.value=B:Array.isArray(u)&&(u[i]=B),u?void 0:B},async SchemaElement(s,i,u,_,w){if(!zp(s.$ref))return;if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]);let P=await this.toReference(unsanitize(this.reference.uri)),{uri:B}=P;const $=resolveSchema$refField(B,s),U=stripHash($),Y=KS({uri:U}),X=xx((s=>s.canRead(Y)),this.options.resolve.resolvers),Z=!X;let ee,ie=stripHash(this.reference.uri)===$,ae=!ie;this.indirections.push(s);try{if(X||Z){B=this.toBaseURI($);const s=$,i=maybeRefractToSchemaElement(P.value.result);if(ee=uri_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Lx.identify(ee),!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return}else{if(B=this.toBaseURI($),ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToPointer($),i=maybeRefractToSchemaElement(P.value.result);ee=es_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Lx.identify(ee)}}catch(s){if(!(Z&&s instanceof Mx))throw s;if(isAnchor(uriToAnchor($))){if(ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToAnchor($),i=maybeRefractToSchemaElement(P.value.result);ee=$anchor_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Lx.identify(ee)}else{if(B=this.toBaseURI($),ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToPointer($),i=maybeRefractToSchemaElement(P.value.result);ee=es_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Lx.identify(ee)}}if(s===ee)throw new Vh(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(ee)){if(P.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var le,ce;const _=new gp.sI(ee.id,{type:\"json-schema\",uri:P.uri,$ref:serializers_value(s.$ref)}),w=(null!==(le=null===(ce=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ce?void 0:ce.circularReplacer)&&void 0!==le?le:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if((ae||Sw(ee)&&zp(ee.$ref)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(ee)){j.add(s);const i=Fx({reference:P,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});ee=await Bx(ee,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(ee)){const _=cloneDeep(ee);return _.setMetaProperty(\"id\",Lx.generateId()),_.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),_.setMetaProperty(\"ref-origin\",P.uri),_.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Lx.identify(s))),Gp(u)?u.value=_:Array.isArray(u)&&(u[i]=_),!u&&_}if(Sw(ee)){const i=new wE([...ee.content],cloneDeep(ee.meta),cloneDeep(ee.attributes));i.setMetaProperty(\"id\",Lx.generateId()),s.forEach(((s,u,_)=>{i.remove(serializers_value(u)),i.content.push(_)})),i.remove(\"$ref\"),i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",P.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Lx.identify(s))),ee=i}return Gp(u)?u.value=ee:Array.isArray(u)&&(u[i]=ee),u?void 0:ee}}}),qx=Fx,$x=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Ux=Vf(wx,{init(){this.name=\"openapi-3-1\"},methods:{canDereference(s){var i;return\"text/plain\"!==s.mediaType?NS.includes(s.mediaType):fw(null===(i=s.parseResult)||void 0===i?void 0:i.result)},async dereference(s,i){var u;const _=createNamespace(jS),w=null!==(u=i.dereference.refSet)&&void 0!==u?u:BS(),x=BS();let j,P=w;w.has(s.uri)?j=w.find(RS(s.uri,\"uri\")):(j=TS({uri:s.uri,value:s.parseResult}),w.add(j)),i.dereference.immutable&&(w.refs.map((s=>TS({...s,value:cloneDeep(s.value)}))).forEach((s=>x.add(s))),j=x.find((i=>i.uri===s.uri)),P=x);const B=qx({reference:j,namespace:_,options:i}),$=await $x(P.rootRef.value,B,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType});return i.dereference.immutable&&(x.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>TS({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>w.add(s))),j=w.find((i=>i.uri===s.uri)),P=w),null===i.dereference.refSet&&w.clean(),x.clean(),$}}}),zx=Ux,to_path=s=>{const i=(s=>s.slice(2))(s);return i.reduce(((s,u,_)=>{if(Gp(u)){const i=String(serializers_value(u.key));s.push(i)}else if(Jp(i[_-2])){const w=i[_-2].content.indexOf(u);s.push(w)}return s}),[])},get_root_cause=s=>{if(null==s.cause)return s;let{cause:i}=s;for(;null!=i.cause;)i=i.cause;return i},Vx=createErrorType(\"SchemaRefError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),{wrapError:Wx}=Zu,Kx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Hx=Cx(),wasReferencedBy=s=>i=>i.meta.hasKey(\"ref-referencing-element-id\")&&i.meta.get(\"ref-referencing-element-id\").equals(serializers_value(Hx.identify(s))),Jx=qx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,basePath:null},init({allowMetaPatches:s=this.allowMetaPatches,useCircularStructures:i=this.useCircularStructures,basePath:u=this.basePath}){this.allowMetaPatches=s,this.useCircularStructures=i,this.basePath=u},methods:{async ReferenceElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;const B=this.toBaseURI(serializers_value(s.$ref)),$=stripHash(this.reference.uri)===B,U=!$;if(!this.options.resolve.internal&&$)return!1;if(!this.options.resolve.external&&U)return!1;const Y=await this.toReference(serializers_value(s.$ref)),X=resolve(B,serializers_value(s.$ref));this.indirections.push(s);const Z=uriToPointer(X);let ee=es_evaluate(Z,Y.value.result);if(isPrimitiveElement(ee)){const i=serializers_value(s.meta.get(\"referenced-element\")),u=`${i}-${serializers_value(Hx.identify(ee))}`;if(this.refractCache.has(u))ee=this.refractCache.get(u);else if(isReferenceLikeElement(ee))ee=vE.refract(ee),ee.setMetaProperty(\"referenced-element\",i),this.refractCache.set(u,ee);else{ee=this.namespace.getElementClass(i).refract(ee),this.refractCache.set(u,ee)}}if(this.indirections.includes(ee))throw new Vh(\"Recursive JSON Pointer detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ee)){if(isHttpUrl(B)||ju(B)){const i=new vE({$ref:X},cloneDeep(s.meta),cloneDeep(s.attributes));return i.get(\"$ref\").classes.push(\"cycle\"),i}return!1}}P.add(s);const ie=Jx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:_,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});ee=await Kx(ee,ie,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop();const mergeAndAnnotateReferencedElement=i=>{const u=cloneShallow(i);if(u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),u.setMetaProperty(\"ref-origin\",Y.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),Hp(i)&&(s.hasKey(\"description\")&&\"description\"in i&&(u.remove(\"description\"),u.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in i&&(u.remove(\"summary\"),u.set(\"summary\",s.get(\"summary\")))),this.allowMetaPatches&&Hp(u)&&!u.hasKey(\"$$ref\")){const s=resolve(B,X);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ee)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ee);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ee)}catch(i){var P,B,$;const _=get_root_cause(i),x=Wx(_,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:uriToPointer(serializers_value(s.$ref)),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]});return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async PathItemElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(!zp(s.$ref))return;if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;const B=this.toBaseURI(serializers_value(s.$ref)),$=stripHash(this.reference.uri)===B,U=!$;if(!this.options.resolve.internal&&$)return;if(!this.options.resolve.external&&U)return;const Y=await this.toReference(serializers_value(s.$ref)),X=resolve(B,serializers_value(s.$ref));this.indirections.push(s);const Z=uriToPointer(X);let ee=es_evaluate(Z,Y.value.result);if(isPrimitiveElement(ee)){const s=`pathItem-${serializers_value(Hx.identify(ee))}`;this.refractCache.has(s)?ee=this.refractCache.get(s):(ee=gE.refract(ee),this.refractCache.set(s,ee))}if(this.indirections.includes(ee))throw new Vh(\"Recursive JSON Pointer detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ee)){if(isHttpUrl(B)||ju(B)){const i=new gE({$ref:X},cloneDeep(s.meta),cloneDeep(s.attributes));return i.get(\"$ref\").classes.push(\"cycle\"),i}return!1}}P.add(s);const ie=Jx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:_,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});ee=await Kx(ee,ie,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop();const mergeAndAnnotateReferencedElement=i=>{const u=new gE([...i.content],cloneDeep(i.meta),cloneDeep(i.attributes));if(s.forEach(((s,i,_)=>{u.remove(serializers_value(i)),u.content.push(_)})),u.remove(\"$ref\"),u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),u.setMetaProperty(\"ref-origin\",Y.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),this.allowMetaPatches&&void 0===u.get(\"$$ref\")){const s=resolve(B,X);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ee)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ee);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ee)}catch(i){var P,B,$;const _=get_root_cause(i),x=Wx(_,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:uriToPointer(serializers_value(s.$ref)),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]});return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async SchemaElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(!zp(s.$ref))return;if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;let B=await this.toReference(unsanitize(this.reference.uri)),{uri:$}=B;const U=resolveSchema$refField($,s),Y=stripHash(U),X=KS({uri:Y}),Z=!this.options.resolve.resolvers.some((s=>s.canRead(X))),ee=!Z,isInternalReference=s=>stripHash(this.reference.uri)===s,isExternalReference=s=>!isInternalReference(s);let ie;this.indirections.push(s);try{if(Z||ee){ie=uri_evaluate(U,maybeRefractToSchemaElement(B.value.result))}else{if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToPointer(U);ie=maybeRefractToSchemaElement(es_evaluate(s,B.value.result))}}catch(s){if(!(ee&&s instanceof Mx))throw s;if(isAnchor(uriToAnchor(U))){if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToAnchor(U);ie=$anchor_evaluate(s,maybeRefractToSchemaElement(B.value.result))}else{if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToPointer(U);ie=maybeRefractToSchemaElement(es_evaluate(s,B.value.result))}}if(this.indirections.includes(ie))throw new Vh(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ie)){if(isHttpUrl($)||ju($)){const i=resolve($,U),u=new wE({$ref:i},cloneDeep(s.meta),cloneDeep(s.attributes));return u.get(\"$ref\").classes.push(\"cycle\"),u}return!1}}P.add(s);const ae=Jx({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:_,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});if(ie=await Kx(ie,ae,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop(),predicates_isBooleanJsonSchemaElement(ie)){const i=cloneDeep(ie);return i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",B.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),i}const mergeAndAnnotateReferencedElement=i=>{const u=new wE([...i.content],cloneDeep(i.meta),cloneDeep(i.attributes));if(s.forEach(((s,i,_)=>{u.remove(serializers_value(i)),u.content.push(_)})),u.remove(\"$ref\"),u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),u.setMetaProperty(\"ref-origin\",B.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),this.allowMetaPatches&&void 0===u.get(\"$$ref\")){const s=resolve($,U);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ie)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ie);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ie)}catch(i){var P,B,$;const _=get_root_cause(i),x=new Vx(`Could not resolve reference: ${_.message}`,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]},_);return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async LinkElement(){},async ExampleElement(s,i,u,_,w){try{return await qx.compose.methods.ExampleElement.call(this,s,i,u,_,w)}catch(i){var x,j,P;const _=get_root_cause(i),B=Wx(_,{baseDoc:this.reference.uri,externalValue:serializers_value(s.externalValue),fullPath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"externalValue\"]});return void(null===(j=this.options.dereference.dereferenceOpts)||void 0===j||null===(j=j.errors)||void 0===j||null===(P=j.push)||void 0===P||P.call(j,B))}}}}),Gx=Jx,Yx=zx.compose.bind(),Xx=Yx({init({parameterMacro:s,options:i}){this.parameterMacro=s,this.options=i},props:{parameterMacro:null,options:null,macroOperation:null,OperationElement:{enter(s){this.macroOperation=s},leave(){this.macroOperation=null}},ParameterElement:{leave(s,i,u,_,w){const x=null===this.macroOperation?null:serializers_value(this.macroOperation),j=serializers_value(s);try{const i=this.parameterMacro(x,j);s.set(\"default\",i)}catch(s){var P,B;const i=new Error(s,{cause:s});i.fullPath=to_path([...w,u]),null===(P=this.options.dereference.dereferenceOpts)||void 0===P||null===(P=P.errors)||void 0===P||null===(B=P.push)||void 0===B||B.call(P,i)}}}}}),Qx=Yx({init({modelPropertyMacro:s,options:i}){this.modelPropertyMacro=s,this.options=i},props:{modelPropertyMacro:null,options:null,SchemaElement:{leave(s,i,u,_,w){void 0!==s.properties&&Hp(s.properties)&&s.properties.forEach((i=>{if(Hp(i))try{const s=this.modelPropertyMacro(serializers_value(i));i.set(\"default\",s)}catch(i){var _,x;const j=new Error(i,{cause:i});j.fullPath=[...to_path([...w,u,s]),\"properties\"],null===(_=this.options.dereference.dereferenceOpts)||void 0===_||null===(_=_.errors)||void 0===_||null===(x=_.push)||void 0===x||x.call(_,j)}}))}}}}),Zx=Qx,tk=Yx({init({options:s}){this.options=s},props:{options:null,SchemaElement:{leave(s,i,u,_,w){if(void 0===s.allOf)return;if(!Jp(s.allOf)){var x,j;const i=new TypeError(\"allOf must be an array\");return i.fullPath=[...to_path([...w,u,s]),\"allOf\"],void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(j=x.push)||void 0===j||j.call(x,i))}if(s.allOf.isEmpty)return new wE(s.content.filter((s=>\"allOf\"!==serializers_value(s.key))),cloneDeep(s.meta),cloneDeep(s.attributes));if(!s.allOf.content.every(Sw)){var P,B;const i=new TypeError(\"Elements in allOf must be objects\");return i.fullPath=[...to_path([...w,u,s]),\"allOf\"],void(null===(P=this.options.dereference.dereferenceOpts)||void 0===P||null===(P=P.errors)||void 0===P||null===(B=P.push)||void 0===B||B.call(P,i))}const $=deepmerge.all([...s.allOf.content,s]);if(s.hasKey(\"$$ref\")||$.remove(\"$$ref\"),s.hasKey(\"example\")){$.getMember(\"example\").value=s.get(\"example\")}if(s.hasKey(\"examples\")){$.getMember(\"examples\").value=s.get(\"examples\")}return $.remove(\"allOf\"),$}}}}),rk=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],nk=zx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,parameterMacro:null,modelPropertyMacro:null,mode:\"non-strict\",ancestors:null},init({useCircularStructures:s=this.useCircularStructures,allowMetaPatches:i=this.allowMetaPatches,parameterMacro:u=this.parameterMacro,modelPropertyMacro:_=this.modelPropertyMacro,mode:w=this.mode,ancestors:x=[]}={}){this.name=\"openapi-3-1-swagger-client\",this.useCircularStructures=s,this.allowMetaPatches=i,this.parameterMacro=u,this.modelPropertyMacro=_,this.mode=w,this.ancestors=[...x]},methods:{async dereference(s,i){var u;const _=[],w=createNamespace(jS),x=null!==(u=i.dereference.refSet)&&void 0!==u?u:BS();let j;x.has(s.uri)?j=x.find((i=>i.uri===s.uri)):(j=TS({uri:s.uri,value:s.parseResult}),x.add(j));const P=Gx({reference:j,namespace:w,options:i,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors});if(_.push(P),\"function\"==typeof this.parameterMacro){const s=Xx({parameterMacro:this.parameterMacro,options:i});_.push(s)}if(\"function\"==typeof this.modelPropertyMacro){const s=Zx({modelPropertyMacro:this.modelPropertyMacro,options:i});_.push(s)}if(\"strict\"!==this.mode){const s=tk({options:i});_.push(s)}const B=mergeAll(_,{nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),$=await rk(x.rootRef.value,B,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType});return null===i.dereference.refSet&&x.clean(),$}}}),ok=nk,resolveOpenAPI31Strategy=async s=>{const{spec:i,timeout:u,redirects:_,requestInterceptor:w,responseInterceptor:x,pathDiscriminator:j=[],allowMetaPatches:P=!1,useCircularStructures:B=!1,skipNormalization:$=!1,parameterMacro:U=null,modelPropertyMacro:Y=null,mode:X=\"non-strict\"}=s;try{const{cache:Z}=resolveOpenAPI31Strategy,ee=isHttpUrl(url_cwd())?url_cwd():qu,ie=options_retrievalURI(s),ae=resolve(ee,ie);let le;Z.has(i)?le=Z.get(i):(le=dE.refract(i),le.classes.push(\"result\"),Z.set(i,le));const ce=new bp([le]),pe=es_compile(j),de=\"\"===pe?\"\":`#${pe}`,fe=es_evaluate(pe,le),ye=TS({uri:ae,value:ce}),be=BS({refs:[ye]});\"\"!==pe&&(be.rootRef=null);const _e=[new Set([fe])],we=[],Se=await(async(s,i={})=>{const u=util_merge(LS,i);return dereferenceApiDOM(s,u)})(fe,{resolve:{baseURI:`${ae}${de}`,resolvers:[yx({timeout:u||1e4,redirects:_||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:w,responseInterceptor:x}},strategies:[rx()]},parse:{mediaType:NS.latest(),parsers:[_x({allowEmpty:!1,sourceMap:!1}),Ex({allowEmpty:!1,sourceMap:!1}),vx({allowEmpty:!1,sourceMap:!1}),bx({allowEmpty:!1,sourceMap:!1}),ex({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[ok({allowMetaPatches:P,useCircularStructures:B,parameterMacro:U,modelPropertyMacro:Y,mode:X,ancestors:_e})],refSet:be,dereferenceOpts:{errors:we},immutable:!1}}),xe=((s,i,u)=>new cd({element:u}).transclude(s,i))(fe,Se,le),Pe=$?xe:openapi_3_1_apidom_normalize(xe);return{spec:serializers_value(Pe),errors:we}}catch(s){if(s instanceof $d||s instanceof Ud)return{spec:null,errors:[]};throw s}};resolveOpenAPI31Strategy.cache=new WeakMap;const sk=resolveOpenAPI31Strategy,uk={name:\"openapi-3-1-apidom\",match:({spec:s})=>isOpenAPI31(s),normalize:({spec:s})=>pojoAdapter(openapi_3_1_apidom_normalize)(s),resolve:async s=>sk(s)},pk=uk,makeResolve=s=>async i=>(async s=>{const{spec:i,requestInterceptor:u,responseInterceptor:_}=s,w=options_retrievalURI(s),x=options_httpClient(s),j=i||await makeFetchJSON(x,{requestInterceptor:u,responseInterceptor:_})(w),P={...s,spec:j};return s.strategies.find((s=>s.match(P))).resolve(P)})({...s,...i}),mk=makeResolve({strategies:[mp,dp,pp]});var gk=__webpack_require__(57427);function is_plain_object_isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}function is_plain_object_isPlainObject(s){var i,u;return!1!==is_plain_object_isObject(s)&&(void 0===(i=s.constructor)||!1!==is_plain_object_isObject(u=i.prototype)&&!1!==u.hasOwnProperty(\"isPrototypeOf\"))}const yk={body:function bodyBuilder({req:s,value:i}){void 0!==i&&(s.body=i)},header:function headerBuilder({req:s,parameter:i,value:u}){s.headers=s.headers||{},void 0!==u&&(s.headers[i.name]=u)},query:function queryBuilder({req:s,value:i,parameter:u}){s.query=s.query||{},!1===i&&\"boolean\"===u.type&&(i=\"false\");0===i&&[\"number\",\"integer\"].indexOf(u.type)>-1&&(i=\"0\");if(i)s.query[u.name]={collectionFormat:u.collectionFormat,value:i};else if(u.allowEmptyValue&&void 0!==i){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}},path:function pathBuilder({req:s,value:i,parameter:u}){void 0!==i&&(s.url=s.url.replace(new RegExp(`{${u.name}}`,\"g\"),encodeURIComponent(i)))},formData:function formDataBuilder({req:s,value:i,parameter:u}){!1===i&&\"boolean\"===u.type&&(i=\"false\");0===i&&[\"number\",\"integer\"].indexOf(u.type)>-1&&(i=\"0\");if(i)s.form=s.form||{},s.form[u.name]={collectionFormat:u.collectionFormat,value:i};else if(u.allowEmptyValue&&void 0!==i){s.form=s.form||{};const i=u.name;s.form[i]=s.form[i]||{},s.form[i].allowEmptyValue=!0}}};function serialize(s,i){return i.includes(\"application/json\")?\"string\"==typeof s?s:JSON.stringify(s):s.toString()}function parameter_builders_path({req:s,value:i,parameter:u}){const{name:_,style:w,explode:x,content:j}=u;if(void 0!==i)if(j){const u=Object.keys(j)[0];s.url=s.url.split(`{${_}}`).join(encodeDisallowedCharacters(serialize(i,u),{escape:!0}))}else{const j=stylize({key:u.name,value:i,style:w||\"simple\",explode:x||!1,escape:!0});s.url=s.url.replace(new RegExp(`{${_}}`,\"g\"),j)}}function query({req:s,value:i,parameter:u}){if(s.query=s.query||{},void 0!==i&&u.content){const _=serialize(i,Object.keys(u.content)[0]);if(_)s.query[u.name]=_;else if(u.allowEmptyValue){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}}else if(!1===i&&(i=\"false\"),0===i&&(i=\"0\"),i){const{style:_,explode:w,allowReserved:x}=u;s.query[u.name]={value:i,serializationOption:{style:_,explode:w,allowReserved:x}}}else if(u.allowEmptyValue&&void 0!==i){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}}const vk=[\"accept\",\"authorization\",\"content-type\"];function parameter_builders_header({req:s,parameter:i,value:u}){if(s.headers=s.headers||{},!(vk.indexOf(i.name.toLowerCase())>-1))if(void 0!==u&&i.content){const _=Object.keys(i.content)[0];s.headers[i.name]=serialize(u,_)}else void 0===u||Array.isArray(u)&&0===u.length||(s.headers[i.name]=stylize({key:i.name,value:u,style:i.style||\"simple\",explode:void 0!==i.explode&&i.explode,escape:!1}))}function parameter_builders_cookie({req:s,parameter:i,value:u}){s.headers=s.headers||{};const _=typeof u;if(void 0!==u&&i.content){const _=Object.keys(i.content)[0];s.headers.Cookie=`${i.name}=${serialize(u,_)}`}else if(void 0!==u&&(!Array.isArray(u)||0!==u.length)){const w=\"object\"===_&&!Array.isArray(u)&&i.explode?\"\":`${i.name}=`;s.headers.Cookie=w+stylize({key:i.name,value:u,escape:!1,style:i.style||\"form\",explode:void 0!==i.explode&&i.explode})}}const _k=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:window,{btoa:wk}=_k,xk=wk;function buildRequest(s,i){const{operation:u,requestBody:_,securities:w,spec:x,attachContentTypeForEmptyPayload:j}=s;let{requestContentType:P}=s;i=function applySecurities({request:s,securities:i={},operation:u={},spec:_}){var w;const x={...s},{authorized:j={}}=i,P=u.security||_.security||[],B=j&&!!Object.keys(j).length,$=(null==_||null===(w=_.components)||void 0===w?void 0:w.securitySchemes)||{};if(x.headers=x.headers||{},x.query=x.query||{},!Object.keys(i).length||!B||!P||Array.isArray(u.security)&&!u.security.length)return s;return P.forEach((s=>{Object.keys(s).forEach((s=>{const i=j[s],u=$[s];if(!i)return;const _=i.value||i,{type:w}=u;if(i)if(\"apiKey\"===w)\"query\"===u.in&&(x.query[u.name]=_),\"header\"===u.in&&(x.headers[u.name]=_),\"cookie\"===u.in&&(x.cookies[u.name]=_);else if(\"http\"===w){if(/^basic$/i.test(u.scheme)){const s=_.username||\"\",i=_.password||\"\",u=xk(`${s}:${i}`);x.headers.Authorization=`Basic ${u}`}/^bearer$/i.test(u.scheme)&&(x.headers.Authorization=`Bearer ${_}`)}else if(\"oauth2\"===w||\"openIdConnect\"===w){const s=i.token||{},_=s[u[\"x-tokenName\"]||\"access_token\"];let w=s.token_type;w&&\"bearer\"!==w.toLowerCase()||(w=\"Bearer\"),x.headers.Authorization=`${w} ${_}`}}))})),x}({request:i,securities:w,operation:u,spec:x});const B=u.requestBody||{},$=Object.keys(B.content||{}),U=P&&$.indexOf(P)>-1;if(_||j){if(P&&U)i.headers[\"Content-Type\"]=P;else if(!P){const s=$[0];s&&(i.headers[\"Content-Type\"]=s,P=s)}}else P&&U&&(i.headers[\"Content-Type\"]=P);if(!s.responseContentType&&u.responses){const s=Object.entries(u.responses).filter((([s,i])=>{const u=parseInt(s,10);return u>=200&&u<300&&is_plain_object_isPlainObject(i.content)})).reduce(((s,[,i])=>s.concat(Object.keys(i.content))),[]);s.length>0&&(i.headers.accept=s.join(\", \"))}if(_)if(P){if($.indexOf(P)>-1)if(\"application/x-www-form-urlencoded\"===P||\"multipart/form-data\"===P)if(\"object\"==typeof _){var Y,X;const s=null!==(Y=null===(X=B.content[P])||void 0===X?void 0:X.encoding)&&void 0!==Y?Y:{};i.form={},Object.keys(_).forEach((u=>{i.form[u]={value:_[u],encoding:s[u]||{}}}))}else i.form=_;else i.body=_}else i.body=_;return i}function build_request_buildRequest(s,i){const{spec:u,operation:_,securities:w,requestContentType:x,responseContentType:j,attachContentTypeForEmptyPayload:P}=s;if(i=function build_request_applySecurities({request:s,securities:i={},operation:u={},spec:_}){const w={...s},{authorized:x={},specSecurity:j=[]}=i,P=u.security||j,B=x&&!!Object.keys(x).length,$=_.securityDefinitions;if(w.headers=w.headers||{},w.query=w.query||{},!Object.keys(i).length||!B||!P||Array.isArray(u.security)&&!u.security.length)return s;return P.forEach((s=>{Object.keys(s).forEach((s=>{const i=x[s];if(!i)return;const{token:u}=i,_=i.value||i,j=$[s],{type:P}=j,B=j[\"x-tokenName\"]||\"access_token\",U=u&&u[B];let Y=u&&u.token_type;if(i)if(\"apiKey\"===P){const s=\"query\"===j.in?\"query\":\"headers\";w[s]=w[s]||{},w[s][j.name]=_}else if(\"basic\"===P)if(_.header)w.headers.authorization=_.header;else{const s=_.username||\"\",i=_.password||\"\";_.base64=xk(`${s}:${i}`),w.headers.authorization=`Basic ${_.base64}`}else\"oauth2\"===P&&U&&(Y=Y&&\"bearer\"!==Y.toLowerCase()?Y:\"Bearer\",w.headers.authorization=`${Y} ${U}`)}))})),w}({request:i,securities:w,operation:_,spec:u}),i.body||i.form||P)x?i.headers[\"Content-Type\"]=x:Array.isArray(_.consumes)?[i.headers[\"Content-Type\"]]=_.consumes:Array.isArray(u.consumes)?[i.headers[\"Content-Type\"]]=u.consumes:_.parameters&&_.parameters.filter((s=>\"file\"===s.type)).length?i.headers[\"Content-Type\"]=\"multipart/form-data\":_.parameters&&_.parameters.filter((s=>\"formData\"===s.in)).length&&(i.headers[\"Content-Type\"]=\"application/x-www-form-urlencoded\");else if(x){const s=_.parameters&&_.parameters.filter((s=>\"body\"===s.in)).length>0,u=_.parameters&&_.parameters.filter((s=>\"formData\"===s.in)).length>0;(s||u)&&(i.headers[\"Content-Type\"]=x)}return!j&&Array.isArray(_.produces)&&_.produces.length>0&&(i.headers.accept=_.produces.join(\", \")),i}function idFromPathMethodLegacy(s,i){return`${i.toLowerCase()}-${s}`}const arrayOrEmpty=s=>Array.isArray(s)?s:[],parseURIReference=s=>{try{return new URL(s)}catch{const i=new URL(s,qu),u=String(s).startsWith(\"/\")?i.pathname:i.pathname.substring(1);return{hash:i.hash,host:\"\",hostname:\"\",href:\"\",origin:\"\",password:\"\",pathname:u,port:\"\",protocol:\"\",search:i.search,searchParams:i.searchParams}}},Ck=createErrorType(\"OperationNotFoundError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),findParametersWithName=(s,i)=>i.filter((i=>i.name===s)),deduplicateParameters=s=>{const i={};s.forEach((s=>{i[s.in]||(i[s.in]={}),i[s.in][s.name]=s}));const u=[];return Object.keys(i).forEach((s=>{Object.keys(i[s]).forEach((_=>{u.push(i[s][_])}))})),u},Ak={buildRequest:execute_buildRequest};function execute_execute({http:s,fetch:i,spec:u,operationId:_,pathName:w,method:x,parameters:j,securities:P,...B}){const $=s||i||http_http;w&&x&&!_&&(_=idFromPathMethodLegacy(w,x));const U=Ak.buildRequest({spec:u,operationId:_,parameters:j,securities:P,http:$,...B});return U.body&&(is_plain_object_isPlainObject(U.body)||Array.isArray(U.body))&&(U.body=JSON.stringify(U.body)),$(U)}function execute_buildRequest(s){const{spec:i,operationId:u,responseContentType:_,scheme:w,requestInterceptor:x,responseInterceptor:j,contextUrl:P,userFetch:B,server:$,serverVariables:U,http:Y,signal:X}=s;let{parameters:Z,parameterBuilders:ee}=s;const ie=isOpenAPI3(i);ee||(ee=ie?_e:yk);let ae={url:\"\",credentials:Y&&Y.withCredentials?\"include\":\"same-origin\",headers:{},cookies:{}};X&&(ae.signal=X),x&&(ae.requestInterceptor=x),j&&(ae.responseInterceptor=j),B&&(ae.userFetch=B);const le=function getOperationRaw(s,i){return s&&s.paths?function findOperation(s,i){return function eachOperation(s,i,u){if(!s||\"object\"!=typeof s||!s.paths||\"object\"!=typeof s.paths)return null;const{paths:_}=s;for(const w in _)for(const x in _[w]){if(\"PARAMETERS\"===x.toUpperCase())continue;const j=_[w][x];if(!j||\"object\"!=typeof j)continue;const P={spec:s,pathName:w,method:x.toUpperCase(),operation:j},B=i(P);if(u&&B)return P}}(s,i,!0)||null}(s,(({pathName:s,method:u,operation:_})=>{if(!_||\"object\"!=typeof _)return!1;const w=_.operationId;return[opId(_,s,u),idFromPathMethodLegacy(s,u),w].some((s=>s&&s===i))})):null}(i,u);if(!le)throw new Ck(`Operation ${u} not found`);const{operation:ce={},method:pe,pathName:de}=le;if(ae.url+=function baseUrl(s){const i=isOpenAPI3(s.spec);return i?function oas3BaseUrl({spec:s,pathName:i,method:u,server:_,contextUrl:w,serverVariables:x={}}){var j,P;let B,$=[],U=\"\";const Y=null==s||null===(j=s.paths)||void 0===j||null===(j=j[i])||void 0===j||null===(j=j[(u||\"\").toLowerCase()])||void 0===j?void 0:j.servers,X=null==s||null===(P=s.paths)||void 0===P||null===(P=P[i])||void 0===P?void 0:P.servers,Z=null==s?void 0:s.servers;$=isNonEmptyServerList(Y)?Y:isNonEmptyServerList(X)?X:isNonEmptyServerList(Z)?Z:[$u],_&&(B=$.find((s=>s.url===_)),B&&(U=_));U||([B]=$,U=B.url);if(U.includes(\"{\")){const s=function getVariableTemplateNames(s){const i=[],u=/{([^}]+)}/g;let _;for(;_=u.exec(s);)i.push(_[1]);return i}(U);s.forEach((s=>{if(B.variables&&B.variables[s]){const i=B.variables[s],u=x[s]||i.default,_=new RegExp(`{${s}}`,\"g\");U=U.replace(_,u)}}))}return function buildOas3UrlWithContext(s=\"\",i=\"\"){const u=parseURIReference(s&&i?resolve(i,s):s),_=parseURIReference(i),w=stripNonAlpha(u.protocol)||stripNonAlpha(_.protocol),x=u.host||_.host,j=u.pathname;let P;P=w&&x?`${w}://${x+j}`:j;return\"/\"===P[P.length-1]?P.slice(0,-1):P}(U,w)}(s):function swagger2BaseUrl({spec:s,scheme:i,contextUrl:u=\"\"}){const _=parseURIReference(u),w=Array.isArray(s.schemes)?s.schemes[0]:null,x=i||w||stripNonAlpha(_.protocol)||\"http\",j=s.host||_.host||\"\",P=s.basePath||\"\";let B;B=x&&j?`${x}://${j+P}`:P;return\"/\"===B[B.length-1]?B.slice(0,-1):B}(s)}({spec:i,scheme:w,contextUrl:P,server:$,serverVariables:U,pathName:de,method:pe}),!u)return delete ae.cookies,ae;ae.url+=de,ae.method=`${pe}`.toUpperCase(),Z=Z||{};const fe=i.paths[de]||{};_&&(ae.headers.accept=_);const ye=deduplicateParameters([].concat(arrayOrEmpty(ce.parameters)).concat(arrayOrEmpty(fe.parameters)));ye.forEach((s=>{const u=ee[s.in];let _;if(\"body\"===s.in&&s.schema&&s.schema.properties&&(_=Z),_=s&&s.name&&Z[s.name],void 0===_?_=s&&s.name&&Z[`${s.in}.${s.name}`]:findParametersWithName(s.name,ye).length>1&&console.warn(`Parameter '${s.name}' is ambiguous because the defined spec has more than one parameter with the name: '${s.name}' and the passed-in parameter values did not define an 'in' value.`),null!==_){if(void 0!==s.default&&void 0===_&&(_=s.default),void 0===_&&s.required&&!s.allowEmptyValue)throw new Error(`Required parameter ${s.name} is not provided`);if(ie&&s.schema&&\"object\"===s.schema.type&&\"string\"==typeof _)try{_=JSON.parse(_)}catch(s){throw new Error(\"Could not parse object parameter value string as JSON\")}u&&u({req:ae,parameter:s,value:_,operation:ce,spec:i})}}));const be={...s,operation:ce};if(ae=ie?buildRequest(be,ae):build_request_buildRequest(be,ae),ae.cookies&&Object.keys(ae.cookies).length){const s=Object.keys(ae.cookies).reduce(((s,i)=>{const u=ae.cookies[i];return s+(s?\"&\":\"\")+gk.serialize(i,u)}),\"\");ae.headers.Cookie=s}return ae.cookies&&delete ae.cookies,mergeInQueryOrForm(ae),ae}const stripNonAlpha=s=>s?s.replace(/\\W/g,\"\"):null;const isNonEmptyServerList=s=>Array.isArray(s)&&s.length>0;const makeResolveSubtree=s=>async(i,u,_={})=>(async(s,i,u={})=>{const{returnEntireTree:_,baseDoc:w,requestInterceptor:x,responseInterceptor:j,parameterMacro:P,modelPropertyMacro:B,useCircularStructures:$,strategies:U}=u,Y={spec:s,pathDiscriminator:i,baseDoc:w,requestInterceptor:x,responseInterceptor:j,parameterMacro:P,modelPropertyMacro:B,useCircularStructures:$,strategies:U},X=U.find((s=>s.match(Y))).normalize(Y),Z=await mk({...Y,spec:X,allowMetaPatches:!0,skipNormalization:!0});return!_&&Array.isArray(i)&&i.length&&(Z.spec=i.reduce(((s,i)=>null==s?void 0:s[i]),Z.spec)||null),Z})(i,u,{...s,..._}),Bk=(makeResolveSubtree({strategies:[mp,dp,pp]}),(s,i)=>(...u)=>{s(...u);const _=i.getConfigs().withCredentials;void 0!==_&&(i.fn.fetch.withCredentials=\"string\"==typeof _?\"true\"===_:!!_)});function swagger_client({configs:s,getConfigs:i}){return{fn:{fetch:(u=http_http,_=s.preFetch,w=s.postFetch,w=w||(s=>s),_=_||(s=>s),s=>(\"string\"==typeof s&&(s={url:s}),ip.mergeInQueryOrForm(s),s=_(s),w(u(s)))),buildRequest:execute_buildRequest,execute:execute_execute,resolve:makeResolve({strategies:[pk,mp,dp,pp]}),resolveSubtree:async(s,u,_={})=>{const w=i(),x={modelPropertyMacro:w.modelPropertyMacro,parameterMacro:w.parameterMacro,requestInterceptor:w.requestInterceptor,responseInterceptor:w.responseInterceptor,strategies:[pk,mp,dp,pp]};return makeResolveSubtree(x)(s,u,_)},serializeRes,opId},statePlugins:{configs:{wrapActions:{loaded:Bk}}}};var u,_,w}function util(){return{fn:{shallowEqualKeys}}}var qk=__webpack_require__(40961),zk=__webpack_require__(78418),Wk=We,eO=Symbol.for(\"react-redux-context\"),tO=\"undefined\"!=typeof globalThis?globalThis:{};function getContext(){if(!Wk.createContext)return{};const s=tO[eO]??(tO[eO]=new Map);let i=s.get(Wk.createContext);return i||(i=Wk.createContext(null),s.set(Wk.createContext,i)),i}var rO=getContext(),notInitialized=()=>{throw new Error(\"uSES not initialized!\")};var nO=Symbol.for(\"react.element\"),oO=Symbol.for(\"react.portal\"),sO=Symbol.for(\"react.fragment\"),iO=Symbol.for(\"react.strict_mode\"),aO=Symbol.for(\"react.profiler\"),lO=Symbol.for(\"react.provider\"),cO=Symbol.for(\"react.context\"),uO=Symbol.for(\"react.server_context\"),pO=Symbol.for(\"react.forward_ref\"),hO=Symbol.for(\"react.suspense\"),dO=Symbol.for(\"react.suspense_list\"),fO=Symbol.for(\"react.memo\"),mO=Symbol.for(\"react.lazy\"),gO=(Symbol.for(\"react.offscreen\"),Symbol.for(\"react.client.reference\"),pO),yO=fO;function typeOf(s){if(\"object\"==typeof s&&null!==s){const i=s.$$typeof;switch(i){case nO:{const u=s.type;switch(u){case sO:case aO:case iO:case hO:case dO:return u;default:{const s=u&&u.$$typeof;switch(s){case uO:case cO:case pO:case mO:case fO:case lO:return s;default:return i}}}}case oO:return i}}}function pureFinalPropsSelectorFactory(s,i,u,_,{areStatesEqual:w,areOwnPropsEqual:x,areStatePropsEqual:j}){let P,B,$,U,Y,X=!1;function handleSubsequentCalls(X,Z){const ee=!x(Z,B),ie=!w(X,P,Z,B);return P=X,B=Z,ee&&ie?function handleNewPropsAndNewState(){return $=s(P,B),i.dependsOnOwnProps&&(U=i(_,B)),Y=u($,U,B),Y}():ee?function handleNewProps(){return s.dependsOnOwnProps&&($=s(P,B)),i.dependsOnOwnProps&&(U=i(_,B)),Y=u($,U,B),Y}():ie?function handleNewState(){const i=s(P,B),_=!j(i,$);return $=i,_&&(Y=u($,U,B)),Y}():Y}return function pureFinalPropsSelector(w,x){return X?handleSubsequentCalls(w,x):function handleFirstCall(w,x){return P=w,B=x,$=s(P,B),U=i(_,B),Y=u($,U,B),X=!0,Y}(w,x)}}function wrapMapToPropsConstant(s){return function initConstantSelector(i){const u=s(i);function constantSelector(){return u}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(s){return s.dependsOnOwnProps?Boolean(s.dependsOnOwnProps):1!==s.length}function wrapMapToPropsFunc(s,i){return function initProxySelector(i,{displayName:u}){const _=function mapToPropsProxy(s,i){return _.dependsOnOwnProps?_.mapToProps(s,i):_.mapToProps(s,void 0)};return _.dependsOnOwnProps=!0,_.mapToProps=function detectFactoryAndVerify(i,u){_.mapToProps=s,_.dependsOnOwnProps=getDependsOnOwnProps(s);let w=_(i,u);return\"function\"==typeof w&&(_.mapToProps=w,_.dependsOnOwnProps=getDependsOnOwnProps(w),w=_(i,u)),w},_}}function createInvalidArgFactory(s,i){return(u,_)=>{throw new Error(`Invalid value of type ${typeof s} for ${i} argument when connecting component ${_.wrappedComponentName}.`)}}function defaultMergeProps(s,i,u){return{...u,...s,...i}}function defaultNoopBatch(s){s()}var vO={notify(){},get:()=>[]};function createSubscription(s,i){let u,_=vO,w=0,x=!1;function handleChangeWrapper(){j.onStateChange&&j.onStateChange()}function trySubscribe(){w++,u||(u=i?i.addNestedSub(handleChangeWrapper):s.subscribe(handleChangeWrapper),_=function createListenerCollection(){let s=null,i=null;return{clear(){s=null,i=null},notify(){defaultNoopBatch((()=>{let i=s;for(;i;)i.callback(),i=i.next}))},get(){const i=[];let u=s;for(;u;)i.push(u),u=u.next;return i},subscribe(u){let _=!0;const w=i={callback:u,next:null,prev:i};return w.prev?w.prev.next=w:s=w,function unsubscribe(){_&&null!==s&&(_=!1,w.next?w.next.prev=w.prev:i=w.prev,w.prev?w.prev.next=w.next:s=w.next)}}}}())}function tryUnsubscribe(){w--,u&&0===w&&(u(),u=void 0,_.clear(),_=vO)}const j={addNestedSub:function addNestedSub(s){trySubscribe();const i=_.subscribe(s);let u=!1;return()=>{u||(u=!0,i(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){_.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return x},trySubscribe:function trySubscribeSelf(){x||(x=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){x&&(x=!1,tryUnsubscribe())},getListeners:()=>_};return j}var bO=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement)?Wk.useLayoutEffect:Wk.useEffect;function is(s,i){return s===i?0!==s||0!==i||1/s==1/i:s!=s&&i!=i}function shallowEqual(s,i){if(is(s,i))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof i||null===i)return!1;const u=Object.keys(s),_=Object.keys(i);if(u.length!==_.length)return!1;for(let _=0;_<u.length;_++)if(!Object.prototype.hasOwnProperty.call(i,u[_])||!is(s[u[_]],i[u[_]]))return!1;return!0}var _O={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},EO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},SO={[gO]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[yO]:wO};function getStatics(s){return function isMemo(s){return typeOf(s)===fO}(s)?wO:SO[s.$$typeof]||_O}var xO=Object.defineProperty,kO=Object.getOwnPropertyNames,OO=Object.getOwnPropertySymbols,CO=Object.getOwnPropertyDescriptor,AO=Object.getPrototypeOf,jO=Object.prototype;function hoistNonReactStatics(s,i){if(\"string\"!=typeof i){if(jO){const u=AO(i);u&&u!==jO&&hoistNonReactStatics(s,u)}let u=kO(i);OO&&(u=u.concat(OO(i)));const _=getStatics(s),w=getStatics(i);for(let x=0;x<u.length;++x){const j=u[x];if(!(EO[j]||w&&w[j]||_&&_[j])){const u=CO(i,j);try{xO(s,j,u)}catch(s){}}}}return s}var PO=notInitialized,IO=[null,null];function captureWrapperProps(s,i,u,_,w,x){s.current=_,u.current=!1,w.current&&(w.current=null,x())}function strictEqual(s,i){return s===i}var NO=function connect(s,i,u,{pure:_,areStatesEqual:w=strictEqual,areOwnPropsEqual:x=shallowEqual,areStatePropsEqual:j=shallowEqual,areMergedPropsEqual:P=shallowEqual,forwardRef:B=!1,context:$=rO}={}){const U=$,Y=function mapStateToPropsFactory(s){return s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapStateToProps\"):wrapMapToPropsConstant((()=>({})))}(s),X=function mapDispatchToPropsFactory(s){return s&&\"object\"==typeof s?wrapMapToPropsConstant((i=>function react_redux_bindActionCreators(s,i){const u={};for(const _ in s){const w=s[_];\"function\"==typeof w&&(u[_]=(...s)=>i(w(...s)))}return u}(s,i))):s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapDispatchToProps\"):wrapMapToPropsConstant((s=>({dispatch:s})))}(i),Z=function mergePropsFactory(s){return s?\"function\"==typeof s?function wrapMergePropsFunc(s){return function initMergePropsProxy(i,{displayName:u,areMergedPropsEqual:_}){let w,x=!1;return function mergePropsProxy(i,u,j){const P=s(i,u,j);return x?_(P,w)||(w=P):(x=!0,w=P),w}}}(s):createInvalidArgFactory(s,\"mergeProps\"):()=>defaultMergeProps}(u),ee=Boolean(s);return s=>{const i=s.displayName||s.name||\"Component\",u=`Connect(${i})`,_={shouldHandleStateChanges:ee,displayName:u,wrappedComponentName:i,WrappedComponent:s,initMapStateToProps:Y,initMapDispatchToProps:X,initMergeProps:Z,areStatesEqual:w,areStatePropsEqual:j,areOwnPropsEqual:x,areMergedPropsEqual:P};function ConnectFunction(i){const[u,w,x]=Wk.useMemo((()=>{const{reactReduxForwardedRef:s,...u}=i;return[i.context,s,u]}),[i]),j=Wk.useMemo((()=>U),[u,U]),P=Wk.useContext(j),B=Boolean(i.store)&&Boolean(i.store.getState)&&Boolean(i.store.dispatch),$=Boolean(P)&&Boolean(P.store);const Y=B?i.store:P.store,X=$?P.getServerState:Y.getState,Z=Wk.useMemo((()=>function finalPropsSelectorFactory(s,{initMapStateToProps:i,initMapDispatchToProps:u,initMergeProps:_,...w}){return pureFinalPropsSelectorFactory(i(s,w),u(s,w),_(s,w),s,w)}(Y.dispatch,_)),[Y]),[ie,ae]=Wk.useMemo((()=>{if(!ee)return IO;const s=createSubscription(Y,B?void 0:P.subscription),i=s.notifyNestedSubs.bind(s);return[s,i]}),[Y,B,P]),le=Wk.useMemo((()=>B?P:{...P,subscription:ie}),[B,P,ie]),ce=Wk.useRef(),pe=Wk.useRef(x),de=Wk.useRef(),fe=Wk.useRef(!1),ye=(Wk.useRef(!1),Wk.useRef(!1)),be=Wk.useRef();bO((()=>(ye.current=!0,()=>{ye.current=!1})),[]);const _e=Wk.useMemo((()=>()=>de.current&&x===pe.current?de.current:Z(Y.getState(),x)),[Y,x]),we=Wk.useMemo((()=>s=>ie?function subscribeUpdates(s,i,u,_,w,x,j,P,B,$,U){if(!s)return()=>{};let Y=!1,X=null;const checkForUpdates=()=>{if(Y||!P.current)return;const s=i.getState();let u,Z;try{u=_(s,w.current)}catch(s){Z=s,X=s}Z||(X=null),u===x.current?j.current||$():(x.current=u,B.current=u,j.current=!0,U())};return u.onStateChange=checkForUpdates,u.trySubscribe(),checkForUpdates(),()=>{if(Y=!0,u.tryUnsubscribe(),u.onStateChange=null,X)throw X}}(ee,Y,ie,Z,pe,ce,fe,ye,de,ae,s):()=>{}),[ie]);let Se;!function useIsomorphicLayoutEffectWithArgs(s,i,u){bO((()=>s(...i)),u)}(captureWrapperProps,[pe,ce,fe,x,de,ae]);try{Se=PO(we,_e,X?()=>Z(X(),x):_e)}catch(s){throw be.current&&(s.message+=`\\nThe error may be correlated with this previous error:\\n${be.current.stack}\\n\\n`),s}bO((()=>{be.current=void 0,de.current=void 0,ce.current=Se}));const xe=Wk.useMemo((()=>Wk.createElement(s,{...Se,ref:w})),[w,s,Se]);return Wk.useMemo((()=>ee?Wk.createElement(j.Provider,{value:le},xe):xe),[j,xe,le])}const $=Wk.memo(ConnectFunction);if($.WrappedComponent=s,$.displayName=ConnectFunction.displayName=u,B){const i=Wk.forwardRef((function forwardConnectRef(s,i){return Wk.createElement($,{...s,reactReduxForwardedRef:i})}));return i.displayName=u,i.WrappedComponent=s,hoistNonReactStatics(i,s)}return hoistNonReactStatics($,s)}};var MO=function Provider({store:s,context:i,children:u,serverState:_,stabilityCheck:w=\"once\",identityFunctionCheck:x=\"once\"}){const j=Wk.useMemo((()=>{const i=createSubscription(s);return{store:s,subscription:i,getServerState:_?()=>_:void 0,stabilityCheck:w,identityFunctionCheck:x}}),[s,_,w,x]),P=Wk.useMemo((()=>s.getState()),[s]);bO((()=>{const{subscription:i}=j;return i.onStateChange=i.notifyNestedSubs,i.trySubscribe(),P!==s.getState()&&i.notifyNestedSubs(),()=>{i.tryUnsubscribe(),i.onStateChange=void 0}}),[j,P]);const B=i||rO;return Wk.createElement(B.Provider,{value:j},u)};var TO;TO=zk.useSyncExternalStoreWithSelector,(s=>{PO=s})(We.useSyncExternalStore);var RO=__webpack_require__(83488),DO=__webpack_require__.n(RO);const withSystem=s=>i=>{const{fn:u}=s();class WithSystem extends We.Component{render(){return We.createElement(i,Co()({},s(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${u.getDisplayName(i)})`,WithSystem},withRoot=(s,i)=>u=>{const{fn:_}=s();class WithRoot extends We.Component{render(){return We.createElement(MO,{store:i},We.createElement(u,Co()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${_.getDisplayName(u)})`,WithRoot},withConnect=(s,i,u)=>compose(u?withRoot(s,u):DO(),NO(((u,_)=>{const w={..._,...s()},x=i.prototype?.mapStateToProps||(s=>({state:s}));return x(u,w)})),withSystem(s))(i),handleProps=(s,i,u,_)=>{for(const w in i){const x=i[w];\"function\"==typeof x&&x(u[w],_[w],s())}},withMappedContainer=(s,i,u)=>(i,_)=>{const{fn:w}=s(),x=u(i,\"root\");class WithMappedContainer extends We.Component{constructor(i,u){super(i,u),handleProps(s,_,i,{})}UNSAFE_componentWillReceiveProps(i){handleProps(s,_,i,this.props)}render(){const s=rr()(this.props,_?Object.keys(_):[]);return We.createElement(x,s)}}return WithMappedContainer.displayName=`WithMappedContainer(${w.getDisplayName(x)})`,WithMappedContainer},render=(s,i,u,_)=>w=>{const x=u(s,i,_)(\"App\",\"root\"),{createRoot:j}=qk;j(w).render(We.createElement(x,null))},getComponent=(s,i,u)=>(_,w,x={})=>{if(\"string\"!=typeof _)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof _);const j=u(_);return j?w?\"root\"===w?withConnect(s,j,i()):withConnect(s,j):j:(x.failSilently||s().log.warn(\"Could not find component:\",_),null)},getDisplayName=s=>s.displayName||s.name||\"Component\",view=({getComponents:s,getStore:i,getSystem:u})=>{const _=(s=>Mt(s,((...s)=>JSON.stringify(s))))(getComponent(u,i,s)),w=(s=>utils_memoizeN(s,((...s)=>s)))(withMappedContainer(u,0,_));return{rootInjects:{getComponent:_,makeMappedContainer:w,render:render(u,i,getComponent,s)},fn:{getDisplayName}}},view_legacy=({React:s,getSystem:i,getStore:u,getComponents:_})=>{const w={},x=parseInt(s?.version,10);return x>=16&&x<18&&(w.render=((s,i,u,_)=>w=>{const x=u(s,i,_)(\"App\",\"root\");qk.render(We.createElement(x,null),w)})(i,u,getComponent,_)),{rootInjects:w}};function downloadUrlPlugin(s){let{fn:i}=s;const u={download:s=>({errActions:u,specSelectors:_,specActions:w,getConfigs:x})=>{let{fetch:j}=i;const P=x();function next(i){if(i instanceof Error||i.status>=400)return w.updateLoadingStatus(\"failed\"),u.newThrownErr(Object.assign(new Error((i.message||i.statusText)+\" \"+s),{source:\"fetch\"})),void(!i.status&&i instanceof Error&&function checkPossibleFailReasons(){try{let i;if(\"URL\"in pt?i=new URL(s):(i=document.createElement(\"a\"),i.href=s),\"https:\"!==i.protocol&&\"https:\"===pt.location.protocol){const s=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${i.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void u.newThrownErr(s)}if(i.origin!==pt.location.origin){const s=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${i.origin}) does not match the page (${pt.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});u.newThrownErr(s)}}catch(s){return}}());w.updateLoadingStatus(\"success\"),w.updateSpec(i.text),_.url()!==s&&w.updateUrl(s)}s=s||_.url(),w.updateLoadingStatus(\"loading\"),u.clear({source:\"fetch\"}),j({url:s,loadSpec:!0,requestInterceptor:P.requestInterceptor||(s=>s),responseInterceptor:P.responseInterceptor||(s=>s),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:s=>{let i=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===i.indexOf(s)&&console.error(`Error: ${s} is not one of ${JSON.stringify(i)}`),{type:\"spec_update_loading_status\",payload:s}}};let _={loadingStatus:Gt((s=>s||(0,Xe.Map)()),(s=>s.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:u,reducers:{spec_update_loading_status:(s,i)=>\"string\"==typeof i.payload?s.set(\"loadingStatus\",i.payload):s},selectors:_}}}}var BO=__webpack_require__(47248),LO=__webpack_require__.n(BO);const FO=console.error,withErrorBoundary=s=>i=>{const{getComponent:u,fn:_}=s(),w=u(\"ErrorBoundary\"),x=_.getDisplayName(i);class WithErrorBoundary extends We.Component{render(){return We.createElement(w,{targetName:x,getComponent:u,fn:_},We.createElement(i,Co()({},this.props,this.context)))}}var j;return WithErrorBoundary.displayName=`WithErrorBoundary(${x})`,(j=i).prototype&&j.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=i.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:s})=>We.createElement(\"div\",{className:\"fallback\"},\"😱 \",We.createElement(\"i\",null,\"Could not render \",\"t\"===s?\"this component\":s,\", see the console.\"));class ErrorBoundary extends We.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:FO},children:null};static getDerivedStateFromError(s){return{hasError:!0,error:s}}constructor(...s){super(...s),this.state={hasError:!1,error:null}}componentDidCatch(s,i){this.props.fn.componentDidCatch(s,i)}render(){const{getComponent:s,targetName:i,children:u}=this.props;if(this.state.hasError){const u=s(\"Fallback\");return We.createElement(u,{name:i})}return u}}const qO=ErrorBoundary,safe_render=({componentList:s=[],fullOverride:i=!1}={})=>({getSystem:u})=>{const _=i?s:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...s],w=LO()(_,Array(_.length).fill(((s,{fn:i})=>i.withErrorBoundary(s))));return{fn:{componentDidCatch:FO,withErrorBoundary:withErrorBoundary(u)},components:{ErrorBoundary:qO,Fallback:fallback},wrapComponents:w}};class App extends We.Component{getLayout(){const{getComponent:s,layoutSelectors:i}=this.props,u=i.current(),_=s(u,!0);return _||(()=>We.createElement(\"h1\",null,' No layout defined for \"',u,'\" '))}render(){const s=this.getLayout();return We.createElement(s,null)}}const $O=App;class AuthorizationPopup extends We.Component{close=()=>{let{authActions:s}=this.props;s.showDefinitions(!1)};render(){let{authSelectors:s,authActions:i,getComponent:u,errSelectors:_,specSelectors:w,fn:{AST:x={}}}=this.props,j=s.shownDefinitions();const P=u(\"auths\"),B=u(\"CloseIcon\");return We.createElement(\"div\",{className:\"dialog-ux\"},We.createElement(\"div\",{className:\"backdrop-ux\"}),We.createElement(\"div\",{className:\"modal-ux\"},We.createElement(\"div\",{className:\"modal-dialog-ux\"},We.createElement(\"div\",{className:\"modal-ux-inner\"},We.createElement(\"div\",{className:\"modal-ux-header\"},We.createElement(\"h3\",null,\"Available authorizations\"),We.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},We.createElement(B,null))),We.createElement(\"div\",{className:\"modal-ux-content\"},j.valueSeq().map(((j,B)=>We.createElement(P,{key:B,AST:x,definitions:j,getComponent:u,errSelectors:_,authSelectors:s,authActions:i,specSelectors:w}))))))))}}class AuthorizeBtn extends We.Component{render(){let{isAuthorized:s,showPopup:i,onClick:u,getComponent:_}=this.props;const w=_(\"authorizationPopup\",!0),x=_(\"LockAuthIcon\",!0),j=_(\"UnlockAuthIcon\",!0);return We.createElement(\"div\",{className:\"auth-wrapper\"},We.createElement(\"button\",{className:s?\"btn authorize locked\":\"btn authorize unlocked\",onClick:u},We.createElement(\"span\",null,\"Authorize\"),s?We.createElement(x,null):We.createElement(j,null)),i&&We.createElement(w,null))}}class AuthorizeBtnContainer extends We.Component{render(){const{authActions:s,authSelectors:i,specSelectors:u,getComponent:_}=this.props,w=u.securityDefinitions(),x=i.definitionsToAuthorize(),j=_(\"authorizeBtn\");return w?We.createElement(j,{onClick:()=>s.showDefinitions(x),isAuthorized:!!i.authorized().size,showPopup:!!i.shownDefinitions(),getComponent:_}):null}}class AuthorizeOperationBtn extends We.Component{onClick=s=>{s.stopPropagation();let{onClick:i}=this.props;i&&i()};render(){let{isAuthorized:s,getComponent:i}=this.props;const u=i(\"LockAuthOperationIcon\",!0),_=i(\"UnlockAuthOperationIcon\",!0);return We.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":s?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},s?We.createElement(u,{className:\"locked\"}):We.createElement(_,{className:\"unlocked\"}))}}class Auths extends We.Component{constructor(s,i){super(s,i),this.state={}}onAuthChange=s=>{let{name:i}=s;this.setState({[i]:s})};submitAuth=s=>{s.preventDefault();let{authActions:i}=this.props;i.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:i,definitions:u}=this.props,_=u.map(((s,i)=>i)).toArray();this.setState(_.reduce(((s,i)=>(s[i]=\"\",s)),{})),i.logoutWithPersistOption(_)};close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};render(){let{definitions:s,getComponent:i,authSelectors:u,errSelectors:_}=this.props;const w=i(\"AuthItem\"),x=i(\"oauth2\",!0),j=i(\"Button\");let P=u.authorized(),B=s.filter(((s,i)=>!!P.get(i))),$=s.filter((s=>\"oauth2\"!==s.get(\"type\"))),U=s.filter((s=>\"oauth2\"===s.get(\"type\")));return We.createElement(\"div\",{className:\"auth-container\"},!!$.size&&We.createElement(\"form\",{onSubmit:this.submitAuth},$.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray(),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},$.size===B.size?We.createElement(j,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement(j,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),We.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),U&&U.size?We.createElement(\"div\",null,We.createElement(\"div\",{className:\"scope-def\"},We.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),We.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(x,{authorized:P,schema:s,name:i})))).toArray()):null)}}class auth_item_Auths extends We.Component{render(){let{schema:s,name:i,getComponent:u,onAuthChange:_,authorized:w,errSelectors:x}=this.props;const j=u(\"apiKeyAuth\"),P=u(\"basicAuth\");let B;const $=s.get(\"type\");switch($){case\"apiKey\":B=We.createElement(j,{key:i,schema:s,name:i,errSelectors:x,authorized:w,getComponent:u,onChange:_});break;case\"basic\":B=We.createElement(P,{key:i,schema:s,name:i,errSelectors:x,authorized:w,getComponent:u,onChange:_});break;default:B=We.createElement(\"div\",{key:i},\"Unknown security definition type \",$)}return We.createElement(\"div\",{key:`${i}-jump`},B)}}class AuthError extends We.Component{render(){let{error:s}=this.props,i=s.get(\"level\"),u=s.get(\"message\"),_=s.get(\"source\");return We.createElement(\"div\",{className:\"errors\"},We.createElement(\"b\",null,_,\" \",i),We.createElement(\"span\",null,u))}}class ApiKeyAuth extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_}=this.props,w=this.getValue();this.state={name:u,schema:_,value:w}}getValue(){let{name:s,authorized:i}=this.props;return i&&i.getIn([s,\"value\"])}onChange=s=>{let{onChange:i}=this.props,u=s.target.value,_=Object.assign({},this.state,{value:u});this.setState(_),i(_)};render(){let{schema:s,getComponent:i,errSelectors:u,name:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"Markdown\",!0),$=i(\"JumpToPath\",!0);let U=this.getValue(),Y=u.allErrors().filter((s=>s.get(\"authId\")===_));return We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\" (apiKey)\",We.createElement($,{path:[\"securityDefinitions\",_]})),U&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"p\",null,\"Name: \",We.createElement(\"code\",null,s.get(\"name\")))),We.createElement(x,null,We.createElement(\"p\",null,\"In: \",We.createElement(\"code\",null,s.get(\"in\")))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),U?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),Y.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}}class BasicAuth extends We.Component{constructor(s,i){super(s,i);let{schema:u,name:_}=this.props,w=this.getValue().username;this.state={name:_,schema:u,value:w?{username:w}:{}}}getValue(){let{authorized:s,name:i}=this.props;return s&&s.getIn([i,\"value\"])||{}}onChange=s=>{let{onChange:i}=this.props,{value:u,name:_}=s.target,w=this.state.value;w[_]=u,this.setState({value:w}),i(this.state)};render(){let{schema:s,getComponent:i,name:u,errSelectors:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"JumpToPath\",!0),$=i(\"Markdown\",!0);let U=this.getValue().username,Y=_.allErrors().filter((s=>s.get(\"authId\")===u));return We.createElement(\"div\",null,We.createElement(\"h4\",null,\"Basic authorization\",We.createElement(B,{path:[\"securityDefinitions\",u]})),U&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement($,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),U?We.createElement(\"code\",null,\" \",U,\" \"):We.createElement(j,null,We.createElement(w,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),U?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),Y.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}}function example_Example(s){const{example:i,showValue:u,getComponent:_,getConfigs:w}=s,x=_(\"Markdown\",!0),j=_(\"highlightCode\");return i?We.createElement(\"div\",{className:\"example\"},i.get(\"description\")?We.createElement(\"section\",{className:\"example__section\"},We.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),We.createElement(\"p\",null,We.createElement(x,{source:i.get(\"description\")}))):null,u&&i.has(\"value\")?We.createElement(\"section\",{className:\"example__section\"},We.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),We.createElement(j,{getConfigs:w,value:stringify(i.get(\"value\"))})):null):null}class ExamplesSelect extends We.PureComponent{static defaultProps={examples:Qe().Map({}),onSelect:(...s)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...s),currentExampleKey:null,showLabels:!0};_onSelect=(s,{isSyntheticChange:i=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(s,{isSyntheticChange:i})};_onDomSelect=s=>{if(\"function\"==typeof this.props.onSelect){const i=s.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(i,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:s,currentExampleKey:i}=this.props,u=s.get(i),_=s.keySeq().first(),w=s.get(_);return u||w||Map({})};componentDidMount(){const{onSelect:s,examples:i}=this.props;if(\"function\"==typeof s){const s=i.first(),u=i.keyOf(s);this._onSelect(u,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(s){const{currentExampleKey:i,examples:u}=s;if(u!==this.props.examples&&!u.has(i)){const s=u.first(),i=u.keyOf(s);this._onSelect(i,{isSyntheticChange:!0})}}render(){const{examples:s,currentExampleKey:i,isValueModified:u,isModifiedValueAvailable:_,showLabels:w}=this.props;return We.createElement(\"div\",{className:\"examples-select\"},w?We.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,We.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:_&&u?\"__MODIFIED__VALUE__\":i||\"\"},_?We.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,s.map(((s,i)=>We.createElement(\"option\",{key:i,value:i},s.get(\"summary\")||i))).valueSeq()))}}const stringifyUnlessList=s=>Xe.List.isList(s)?s:stringify(s);class ExamplesSelectValueRetainer extends We.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,Xe.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...s),updateValue:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...s)};constructor(s){super(s);const i=this._getCurrentExampleValue();this.state={[s.currentNamespace]:(0,Xe.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:i,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==i})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:s}=this.props;return(this.state[s]||(0,Xe.Map)()).toObject()};_setStateForCurrentNamespace=s=>{const{currentNamespace:i}=this.props;return this._setStateForNamespace(i,s)};_setStateForNamespace=(s,i)=>{const u=(this.state[s]||(0,Xe.Map)()).mergeDeep(i);return this.setState({[s]:u})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:s}=this.props;return this._getCurrentExampleValue()===s};_getValueForExample=(s,i)=>{const{examples:u}=i||this.props;return stringifyUnlessList((u||(0,Xe.Map)({})).getIn([s,\"value\"]))};_getCurrentExampleValue=s=>{const{currentKey:i}=s||this.props;return this._getValueForExample(i,s||this.props)};_onExamplesSelect=(s,{isSyntheticChange:i}={},...u)=>{const{onSelect:_,updateValue:w,currentUserInputValue:x,userHasEditedBody:j}=this.props,{lastUserEditedValue:P}=this._getStateForCurrentNamespace(),B=this._getValueForExample(s);if(\"__MODIFIED__VALUE__\"===s)return w(stringifyUnlessList(P)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof _&&_(s,{isSyntheticChange:i},...u),this._setStateForCurrentNamespace({lastDownstreamValue:B,isModifiedValueSelected:i&&j||!!x&&x!==B}),i||\"function\"==typeof w&&w(stringifyUnlessList(B))};UNSAFE_componentWillReceiveProps(s){const{currentUserInputValue:i,examples:u,onSelect:_,userHasEditedBody:w}=s,{lastUserEditedValue:x,lastDownstreamValue:j}=this._getStateForCurrentNamespace(),P=this._getValueForExample(s.currentKey,s),B=u.filter((s=>s.get(\"value\")===i||stringify(s.get(\"value\"))===i));if(B.size){let i;i=B.has(s.currentKey)?s.currentKey:B.keySeq().first(),_(i,{isSyntheticChange:!0})}else i!==this.props.currentUserInputValue&&i!==x&&i!==j&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(s.currentNamespace,{lastUserEditedValue:s.currentUserInputValue,isModifiedValueSelected:w||i!==P}))}render(){const{currentUserInputValue:s,examples:i,currentKey:u,getComponent:_,userHasEditedBody:w}=this.props,{lastDownstreamValue:x,lastUserEditedValue:j,isModifiedValueSelected:P}=this._getStateForCurrentNamespace(),B=_(\"ExamplesSelect\");return We.createElement(B,{examples:i,currentExampleKey:u,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!j&&j!==x,isValueModified:void 0!==s&&P&&s!==this._getCurrentExampleValue()||w})}}function oauth2_authorize_authorize({auth:s,authActions:i,errActions:u,configs:_,authConfigs:w={},currentServer:x}){let{schema:j,scopes:P,name:B,clientId:$}=s,U=j.get(\"flow\"),Y=[];switch(U){case\"password\":return void i.authorizePassword(s);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void i.authorizeApplication(s);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":Y.push(\"response_type=code\");break;case\"implicit\":Y.push(\"response_type=token\")}\"string\"==typeof $&&Y.push(\"client_id=\"+encodeURIComponent($));let X=_.oauth2RedirectUrl;if(void 0===X)return void u.newAuthErr({authId:B,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});Y.push(\"redirect_uri=\"+encodeURIComponent(X));let Z=[];if(Array.isArray(P)?Z=P:Qe().List.isList(P)&&(Z=P.toArray()),Z.length>0){let s=w.scopeSeparator||\" \";Y.push(\"scope=\"+encodeURIComponent(Z.join(s)))}let ee=utils_btoa(new Date);if(Y.push(\"state=\"+encodeURIComponent(ee)),void 0!==w.realm&&Y.push(\"realm=\"+encodeURIComponent(w.realm)),(\"authorizationCode\"===U||\"authorization_code\"===U||\"accessCode\"===U)&&w.usePkceWithAuthorizationCodeGrant){const i=function generateCodeVerifier(){return b64toB64UrlEncoded(Ct()(32).toString(\"base64\"))}(),u=function createCodeChallenge(s){return b64toB64UrlEncoded(jt()(\"sha256\").update(s).digest(\"base64\"))}(i);Y.push(\"code_challenge=\"+u),Y.push(\"code_challenge_method=S256\"),s.codeVerifier=i}let{additionalQueryStringParams:ie}=w;for(let s in ie)void 0!==ie[s]&&Y.push([s,ie[s]].map(encodeURIComponent).join(\"=\"));const ae=j.get(\"authorizationUrl\");let le;le=x?Dt()(sanitizeUrl(ae),x,!0).toString():sanitizeUrl(ae);let ce,pe=[le,Y.join(\"&\")].join(-1===ae.indexOf(\"?\")?\"?\":\"&\");ce=\"implicit\"===U?i.preAuthorizeImplicit:w.useBasicAuthenticationWithAccessCodeGrant?i.authorizeAccessCodeWithBasicAuthentication:i.authorizeAccessCodeWithFormParams,i.authPopup(pe,{auth:s,state:ee,redirectUrl:X,callback:ce,errCb:u.newAuthErr})}class Oauth2 extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_,authorized:w,authSelectors:x}=this.props,j=w&&w.get(u),P=x.getConfigs()||{},B=j&&j.get(\"username\")||\"\",$=j&&j.get(\"clientId\")||P.clientId||\"\",U=j&&j.get(\"clientSecret\")||P.clientSecret||\"\",Y=j&&j.get(\"passwordType\")||\"basic\",X=j&&j.get(\"scopes\")||P.scopes||[];\"string\"==typeof X&&(X=X.split(P.scopeSeparator||\" \")),this.state={appName:P.appName,name:u,schema:_,scopes:X,clientId:$,clientSecret:U,username:B,password:\"\",passwordType:Y}}close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};authorize=()=>{let{authActions:s,errActions:i,getConfigs:u,authSelectors:_,oas3Selectors:w}=this.props,x=u(),j=_.getConfigs();i.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:w.serverEffectiveValue(w.selectedServer()),authActions:s,errActions:i,configs:x,authConfigs:j})};onScopeChange=s=>{let{target:i}=s,{checked:u}=i,_=i.dataset.value;if(u&&-1===this.state.scopes.indexOf(_)){let s=this.state.scopes.concat([_]);this.setState({scopes:s})}else!u&&this.state.scopes.indexOf(_)>-1&&this.setState({scopes:this.state.scopes.filter((s=>s!==_))})};onInputChange=s=>{let{target:{dataset:{name:i},value:u}}=s,_={[i]:u};this.setState(_)};selectScopes=s=>{s.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=s=>{s.preventDefault();let{authActions:i,errActions:u,name:_}=this.props;u.clear({authId:_,type:\"auth\",source:\"auth\"}),i.logoutWithPersistOption([_])};render(){let{schema:s,getComponent:i,authSelectors:u,errSelectors:_,name:w,specSelectors:x}=this.props;const j=i(\"Input\"),P=i(\"Row\"),B=i(\"Col\"),$=i(\"Button\"),U=i(\"authError\"),Y=i(\"JumpToPath\",!0),X=i(\"Markdown\",!0),Z=i(\"InitializedInput\"),{isOAS3:ee}=x;let ie=ee()?s.get(\"openIdConnectUrl\"):null;const ae=\"implicit\",le=\"password\",ce=ee()?ie?\"authorization_code\":\"authorizationCode\":\"accessCode\",pe=ee()?ie?\"client_credentials\":\"clientCredentials\":\"application\";let de=!!(u.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,fe=s.get(\"flow\"),ye=fe===ce&&de?fe+\" with PKCE\":fe,be=s.get(\"allowedScopes\")||s.get(\"scopes\"),_e=!!u.authorized().get(w),we=_.allErrors().filter((s=>s.get(\"authId\")===w)),Se=!we.filter((s=>\"validation\"===s.get(\"source\"))).size,xe=s.get(\"description\");return We.createElement(\"div\",null,We.createElement(\"h4\",null,w,\" (OAuth2, \",ye,\") \",We.createElement(Y,{path:[\"securityDefinitions\",w]})),this.state.appName?We.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,xe&&We.createElement(X,{source:s.get(\"description\")}),_e&&We.createElement(\"h6\",null,\"Authorized\"),ie&&We.createElement(\"p\",null,\"OpenID Connect URL: \",We.createElement(\"code\",null,ie)),(fe===ae||fe===ce)&&We.createElement(\"p\",null,\"Authorization URL: \",We.createElement(\"code\",null,s.get(\"authorizationUrl\"))),(fe===le||fe===ce||fe===pe)&&We.createElement(\"p\",null,\"Token URL:\",We.createElement(\"code\",null,\" \",s.get(\"tokenUrl\"))),We.createElement(\"p\",{className:\"flow\"},\"Flow: \",We.createElement(\"code\",null,ye)),fe!==le?null:We.createElement(P,null,We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),_e?We.createElement(\"code\",null,\" \",this.state.username,\" \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),_e?We.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},We.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),We.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(fe===pe||fe===ae||fe===ce||fe===le)&&(!_e||_e&&this.state.clientId)&&We.createElement(P,null,We.createElement(\"label\",{htmlFor:`client_id_${fe}`},\"client_id:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(Z,{id:`client_id_${fe}`,type:\"text\",required:fe===le,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(fe===pe||fe===ce||fe===le)&&We.createElement(P,null,We.createElement(\"label\",{htmlFor:`client_secret_${fe}`},\"client_secret:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(Z,{id:`client_secret_${fe}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!_e&&be&&be.size?We.createElement(\"div\",{className:\"scopes\"},We.createElement(\"h2\",null,\"Scopes:\",We.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),We.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),be.map(((s,i)=>We.createElement(P,{key:i},We.createElement(\"div\",{className:\"checkbox\"},We.createElement(j,{\"data-value\":i,id:`${i}-${fe}-checkbox-${this.state.name}`,disabled:_e,checked:this.state.scopes.includes(i),type:\"checkbox\",onChange:this.onScopeChange}),We.createElement(\"label\",{htmlFor:`${i}-${fe}-checkbox-${this.state.name}`},We.createElement(\"span\",{className:\"item\"}),We.createElement(\"div\",{className:\"text\"},We.createElement(\"p\",{className:\"name\"},i),We.createElement(\"p\",{className:\"description\"},s))))))).toArray()):null,we.valueSeq().map(((s,i)=>We.createElement(U,{error:s,key:i}))),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},Se&&(_e?We.createElement($,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement($,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),We.createElement($,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends We.Component{onClick=()=>{let{specActions:s,path:i,method:u}=this.props;s.clearResponse(i,u),s.clearRequest(i,u)};render(){return We.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const live_response_Headers=({headers:s})=>We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Response headers\"),We.createElement(\"pre\",{className:\"microlight\"},s)),Duration=({duration:s})=>We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Request duration\"),We.createElement(\"pre\",{className:\"microlight\"},s,\" ms\"));class LiveResponse extends We.Component{shouldComponentUpdate(s){return this.props.response!==s.response||this.props.path!==s.path||this.props.method!==s.method||this.props.displayRequestDuration!==s.displayRequestDuration}render(){const{response:s,getComponent:i,getConfigs:u,displayRequestDuration:_,specSelectors:w,path:x,method:j}=this.props,{showMutatedRequest:P,requestSnippetsEnabled:B}=u(),$=P?w.mutatedRequestFor(x,j):w.requestFor(x,j),U=s.get(\"status\"),Y=$.get(\"url\"),X=s.get(\"headers\").toJS(),Z=s.get(\"notDocumented\"),ee=s.get(\"error\"),ie=s.get(\"text\"),ae=s.get(\"duration\"),le=Object.keys(X),ce=X[\"content-type\"]||X[\"Content-Type\"],pe=i(\"responseBody\"),de=le.map((s=>{var i=Array.isArray(X[s])?X[s].join():X[s];return We.createElement(\"span\",{className:\"headerline\",key:s},\" \",s,\": \",i,\" \")})),fe=0!==de.length,ye=i(\"Markdown\",!0),be=i(\"RequestSnippets\",!0),_e=i(\"curl\");return We.createElement(\"div\",null,$&&(!0===B||\"true\"===B?We.createElement(be,{request:$}):We.createElement(_e,{request:$,getConfigs:u})),Y&&We.createElement(\"div\",null,We.createElement(\"div\",{className:\"request-url\"},We.createElement(\"h4\",null,\"Request URL\"),We.createElement(\"pre\",{className:\"microlight\"},Y))),We.createElement(\"h4\",null,\"Server response\"),We.createElement(\"table\",{className:\"responses-table live-responses-table\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"responses-header\"},We.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),We.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),We.createElement(\"tbody\",null,We.createElement(\"tr\",{className:\"response\"},We.createElement(\"td\",{className:\"response-col_status\"},U,Z?We.createElement(\"div\",{className:\"response-undocumented\"},We.createElement(\"i\",null,\" Undocumented \")):null),We.createElement(\"td\",{className:\"response-col_description\"},ee?We.createElement(ye,{source:`${\"\"!==s.get(\"name\")?`${s.get(\"name\")}: `:\"\"}${s.get(\"message\")}`}):null,ie?We.createElement(pe,{content:ie,contentType:ce,url:Y,headers:X,getConfigs:u,getComponent:i}):null,fe?We.createElement(live_response_Headers,{headers:de}):null,_&&ae?We.createElement(Duration,{duration:ae}):null)))))}}class OnlineValidatorBadge extends We.Component{constructor(s,i){super(s,i);let{getConfigs:u}=s,{validatorUrl:_}=u();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===_?\"https://validator.swagger.io/validator\":_}}getDefinitionUrl=()=>{let{specSelectors:s}=this.props;return new(Dt())(s.url(),pt.location).toString()};UNSAFE_componentWillReceiveProps(s){let{getConfigs:i}=s,{validatorUrl:u}=i();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===u?\"https://validator.swagger.io/validator\":u})}render(){let{getConfigs:s}=this.props,{spec:i}=s(),u=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof i&&Object.keys(i).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?We.createElement(\"span\",{className:\"float-right\"},We.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${u}/debug?url=${encodeURIComponent(this.state.url)}`},We.createElement(ValidatorImage,{src:`${u}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends We.Component{constructor(s){super(s),this.state={loaded:!1,error:!1}}componentDidMount(){const s=new Image;s.onload=()=>{this.setState({loaded:!0})},s.onerror=()=>{this.setState({error:!0})},s.src=this.props.src}UNSAFE_componentWillReceiveProps(s){if(s.src!==this.props.src){const i=new Image;i.onload=()=>{this.setState({loaded:!0})},i.onerror=()=>{this.setState({error:!0})},i.src=s.src}}render(){return this.state.error?We.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?We.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends We.Component{render(){let{specSelectors:s}=this.props;const i=s.taggedOperations();return 0===i.size?We.createElement(\"h3\",null,\" No operations defined in spec!\"):We.createElement(\"div\",null,i.map(this.renderOperationTag).toArray(),i.size<1?We.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(s,i)=>{const{specSelectors:u,getComponent:_,oas3Selectors:w,layoutSelectors:x,layoutActions:j,getConfigs:P}=this.props,B=u.validOperationMethods(),$=_(\"OperationContainer\",!0),U=_(\"OperationTag\"),Y=s.get(\"operations\");return We.createElement(U,{key:\"operation-\"+i,tagObj:s,tag:i,oas3Selectors:w,layoutSelectors:x,layoutActions:j,getConfigs:P,getComponent:_,specUrl:u.url()},We.createElement(\"div\",{className:\"operation-tag-content\"},Y.map((s=>{const u=s.get(\"path\"),_=s.get(\"method\"),w=Qe().List([\"paths\",u,_]);return-1===B.indexOf(_)?null:We.createElement($,{key:`${u}-${_}`,specPath:w,op:s,path:u,method:_,tag:i})})).toArray()))}}function isAbsoluteUrl(s){return s.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(s,i){return s?isAbsoluteUrl(s)?function addProtocol(s){return s.match(/^\\/\\//i)?`${window.location.protocol}${s}`:s}(s):new URL(s,i).href:i}function safeBuildUrl(s,i,{selectedServer:u=\"\"}={}){try{return function buildUrl(s,i,{selectedServer:u=\"\"}={}){if(!s)return;if(isAbsoluteUrl(s))return s;const _=buildBaseUrl(u,i);return isAbsoluteUrl(_)?new URL(s,_).href:new URL(s,window.location.href).href}(s,i,{selectedServer:u})}catch{return}}class OperationTag extends We.Component{static defaultProps={tagObj:Qe().fromJS({}),tag:\"\"};render(){const{tagObj:s,tag:i,children:u,oas3Selectors:_,layoutSelectors:w,layoutActions:x,getConfigs:j,getComponent:P,specUrl:B}=this.props;let{docExpansion:$,deepLinking:U}=j();const Y=U&&\"false\"!==U,X=P(\"Collapse\"),Z=P(\"Markdown\",!0),ee=P(\"DeepLink\"),ie=P(\"Link\"),ae=P(\"ArrowUpIcon\"),le=P(\"ArrowDownIcon\");let ce,pe=s.getIn([\"tagDetails\",\"description\"],null),de=s.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),fe=s.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);ce=isFunc(_)&&isFunc(_.selectedServer)?safeBuildUrl(fe,B,{selectedServer:_.selectedServer()}):fe;let ye=[\"operations-tag\",i],be=w.isShown(ye,\"full\"===$||\"list\"===$);return We.createElement(\"div\",{className:be?\"opblock-tag-section is-open\":\"opblock-tag-section\"},We.createElement(\"h3\",{onClick:()=>x.show(ye,!be),className:pe?\"opblock-tag\":\"opblock-tag no-desc\",id:ye.map((s=>escapeDeepLinkPath(s))).join(\"-\"),\"data-tag\":i,\"data-is-open\":be},We.createElement(ee,{enabled:Y,isShown:be,path:createDeepLinkPath(i),text:i}),pe?We.createElement(\"small\",null,We.createElement(Z,{source:pe})):We.createElement(\"small\",null),ce?We.createElement(\"div\",{className:\"info__externaldocs\"},We.createElement(\"small\",null,We.createElement(ie,{href:sanitizeUrl(ce),onClick:s=>s.stopPropagation(),target:\"_blank\"},de||ce))):null,We.createElement(\"button\",{\"aria-expanded\":be,className:\"expand-operation\",title:be?\"Collapse operation\":\"Expand operation\",onClick:()=>x.show(ye,!be)},be?We.createElement(ae,{className:\"arrow\"}):We.createElement(le,{className:\"arrow\"}))),We.createElement(X,{isOpened:be},u))}}var UO;function rolling_load_extends(){return rolling_load_extends=Object.assign?Object.assign.bind():function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},rolling_load_extends.apply(this,arguments)}const rolling_load=s=>We.createElement(\"svg\",rolling_load_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},s),UO||(UO=We.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},We.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"}))));class operation_Operation extends We.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{specPath:s,response:i,request:u,toggleShown:_,onTryoutClick:w,onResetClick:x,onCancelClick:j,onExecute:P,fn:B,getComponent:$,getConfigs:U,specActions:Y,specSelectors:X,authActions:Z,authSelectors:ee,oas3Actions:ie,oas3Selectors:ae}=this.props,le=this.props.operation,{deprecated:ce,isShown:pe,path:de,method:fe,op:ye,tag:be,operationId:_e,allowTryItOut:we,displayRequestDuration:Se,tryItOutEnabled:xe,executeInProgress:Pe}=le.toJS(),{description:Te,externalDocs:Re,schemes:qe}=ye;const $e=Re?safeBuildUrl(Re.url,X.url(),{selectedServer:ae.selectedServer()}):\"\";let ze=le.getIn([\"op\"]),He=ze.get(\"responses\"),Ye=function getList(s,i){if(!Qe().Iterable.isIterable(s))return Qe().List();let u=s.getIn(Array.isArray(i)?i:[i]);return Qe().List.isList(u)?u:Qe().List()}(ze,[\"parameters\"]),Xe=X.operationScheme(de,fe),et=[\"operations\",be,_e],tt=getExtensions(ze);const rt=$(\"responses\"),nt=$(\"parameters\"),ot=$(\"execute\"),st=$(\"clear\"),it=$(\"Collapse\"),at=$(\"Markdown\",!0),lt=$(\"schemes\"),ct=$(\"OperationServers\"),ut=$(\"OperationExt\"),pt=$(\"OperationSummary\"),ht=$(\"Link\"),{showExtensions:dt}=U();if(He&&i&&i.size>0){let s=!He.get(String(i.get(\"status\")))&&!He.get(\"default\");i=i.set(\"notDocumented\",s)}let mt=[de,fe];const gt=X.validationErrors([de,fe]);return We.createElement(\"div\",{className:ce?\"opblock opblock-deprecated\":pe?`opblock opblock-${fe} is-open`:`opblock opblock-${fe}`,id:escapeDeepLinkPath(et.join(\"-\"))},We.createElement(pt,{operationProps:le,isShown:pe,toggleShown:_,getComponent:$,authActions:Z,authSelectors:ee,specPath:s}),We.createElement(it,{isOpened:pe},We.createElement(\"div\",{className:\"opblock-body\"},ze&&ze.size||null===ze?null:We.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),ce&&We.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),Te&&We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"div\",{className:\"opblock-description\"},We.createElement(at,{source:Te}))),$e?We.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},We.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),We.createElement(\"div\",{className:\"opblock-external-docs\"},Re.description&&We.createElement(\"span\",{className:\"opblock-external-docs__description\"},We.createElement(at,{source:Re.description})),We.createElement(ht,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl($e)},$e))):null,ze&&ze.size?We.createElement(nt,{parameters:Ye,specPath:s.push(\"parameters\"),operation:ze,onChangeKey:mt,onTryoutClick:w,onResetClick:x,onCancelClick:j,tryItOutEnabled:xe,allowTryItOut:we,fn:B,getComponent:$,specActions:Y,specSelectors:X,pathMethod:[de,fe],getConfigs:U,oas3Actions:ie,oas3Selectors:ae}):null,xe?We.createElement(ct,{getComponent:$,path:de,method:fe,operationServers:ze.get(\"servers\"),pathServers:X.paths().getIn([de,\"servers\"]),getSelectedServer:ae.selectedServer,setSelectedServer:ie.setSelectedServer,setServerVariableValue:ie.setServerVariableValue,getServerVariable:ae.serverVariableValue,getEffectiveServerValue:ae.serverEffectiveValue}):null,xe&&we&&qe&&qe.size?We.createElement(\"div\",{className:\"opblock-schemes\"},We.createElement(lt,{schemes:qe,path:de,method:fe,specActions:Y,currentScheme:Xe})):null,!xe||!we||gt.length<=0?null:We.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",We.createElement(\"ul\",null,gt.map(((s,i)=>We.createElement(\"li\",{key:i},\" \",s,\" \"))))),We.createElement(\"div\",{className:xe&&i&&we?\"btn-group\":\"execute-wrapper\"},xe&&we?We.createElement(ot,{operation:ze,specActions:Y,specSelectors:X,oas3Selectors:ae,oas3Actions:ie,path:de,method:fe,onExecute:P,disabled:Pe}):null,xe&&i&&we?We.createElement(st,{specActions:Y,path:de,method:fe}):null),Pe?We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"div\",{className:\"loading\"})):null,He?We.createElement(rt,{responses:He,request:u,tryItOutResponse:i,getComponent:$,getConfigs:U,specSelectors:X,oas3Actions:ie,oas3Selectors:ae,specActions:Y,produces:X.producesOptionsFor([de,fe]),producesValue:X.currentProducesFor([de,fe]),specPath:s.push(\"responses\"),path:de,method:fe,displayRequestDuration:Se,fn:B}):null,dt&&tt.size?We.createElement(ut,{extensions:tt,getComponent:$}):null)))}}class OperationContainer extends We.PureComponent{constructor(s,i){super(s,i);const{tryItOutEnabled:u}=s.getConfigs();this.state={tryItOutEnabled:!0===u||\"true\"===u,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(s,i){const{op:u,layoutSelectors:_,getConfigs:w}=i,{docExpansion:x,deepLinking:j,displayOperationId:P,displayRequestDuration:B,supportedSubmitMethods:$}=w(),U=_.showSummary(),Y=u.getIn([\"operation\",\"__originalOperationId\"])||u.getIn([\"operation\",\"operationId\"])||opId(u.get(\"operation\"),i.path,i.method)||u.get(\"id\"),X=[\"operations\",i.tag,Y],Z=j&&\"false\"!==j,ee=$.indexOf(i.method)>=0&&(void 0===i.allowTryItOut?i.specSelectors.allowTryItOutFor(i.path,i.method):i.allowTryItOut),ie=u.getIn([\"operation\",\"security\"])||i.specSelectors.security();return{operationId:Y,isDeepLinkingEnabled:Z,showSummary:U,displayOperationId:P,displayRequestDuration:B,allowTryItOut:ee,security:ie,isAuthorized:i.authSelectors.isAuthorized(ie),isShown:_.isShown(X,\"full\"===x),jumpToKey:`paths.${i.path}.${i.method}`,response:i.specSelectors.responseFor(i.path,i.method),request:i.specSelectors.requestFor(i.path,i.method)}}componentDidMount(){const{isShown:s}=this.props,i=this.getResolvedSubtree();s&&void 0===i&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(s){const{response:i,isShown:u}=s,_=this.getResolvedSubtree();i!==this.props.response&&this.setState({executeInProgress:!1}),u&&void 0===_&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:s,tag:i,operationId:u,isShown:_}=this.props;const w=this.getResolvedSubtree();_||void 0!==w||this.requestResolvedSubtree(),s.show([\"operations\",i,u],!_)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=s=>{const i=this.props.oas3Selectors.selectDefaultRequestBodyValue(...s);this.props.oas3Actions.setRequestBodyValue({value:i,pathMethod:s})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:s,path:i,method:u,specPath:_}=this.props;return _?s.specResolvedSubtree(_.toJS()):s.specResolvedSubtree([\"paths\",i,u])};requestResolvedSubtree=()=>{const{specActions:s,path:i,method:u,specPath:_}=this.props;return _?s.requestResolvedSubtree(_.toJS()):s.requestResolvedSubtree([\"paths\",i,u])};render(){let{op:s,tag:i,path:u,method:_,security:w,isAuthorized:x,operationId:j,showSummary:P,isShown:B,jumpToKey:$,allowTryItOut:U,response:Y,request:X,displayOperationId:Z,displayRequestDuration:ee,isDeepLinkingEnabled:ie,specPath:ae,specSelectors:le,specActions:ce,getComponent:pe,getConfigs:de,layoutSelectors:fe,layoutActions:ye,authActions:be,authSelectors:_e,oas3Actions:we,oas3Selectors:Se,fn:xe}=this.props;const Pe=pe(\"operation\"),Te=this.getResolvedSubtree()||(0,Xe.Map)(),Re=(0,Xe.fromJS)({op:Te,tag:i,path:u,summary:s.getIn([\"operation\",\"summary\"])||\"\",deprecated:Te.get(\"deprecated\")||s.getIn([\"operation\",\"deprecated\"])||!1,method:_,security:w,isAuthorized:x,operationId:j,originalOperationId:Te.getIn([\"operation\",\"__originalOperationId\"]),showSummary:P,isShown:B,jumpToKey:$,allowTryItOut:U,request:X,displayOperationId:Z,displayRequestDuration:ee,isDeepLinkingEnabled:ie,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return We.createElement(Pe,{operation:Re,response:Y,request:X,isShown:B,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:ae,specActions:ce,specSelectors:le,oas3Actions:we,oas3Selectors:Se,layoutActions:ye,layoutSelectors:fe,authActions:be,authSelectors:_e,getComponent:pe,getConfigs:de,fn:xe})}}var zO=__webpack_require__(13222),VO=__webpack_require__.n(zO);class OperationSummary extends We.PureComponent{static defaultProps={operationProps:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{isShown:s,toggleShown:i,getComponent:u,authActions:_,authSelectors:w,operationProps:x,specPath:j}=this.props,{summary:P,isAuthorized:B,method:$,op:U,showSummary:Y,path:X,operationId:Z,originalOperationId:ee,displayOperationId:ie}=x.toJS(),{summary:ae}=U,le=x.get(\"security\");const ce=u(\"authorizeOperationBtn\",!0),pe=u(\"OperationSummaryMethod\"),de=u(\"OperationSummaryPath\"),fe=u(\"JumpToPath\",!0),ye=u(\"CopyToClipboardBtn\",!0),be=u(\"ArrowUpIcon\"),_e=u(\"ArrowDownIcon\"),we=le&&!!le.count(),Se=we&&1===le.size&&le.first().isEmpty(),xe=!we||Se;return We.createElement(\"div\",{className:`opblock-summary opblock-summary-${$}`},We.createElement(\"button\",{\"aria-expanded\":s,className:\"opblock-summary-control\",onClick:i},We.createElement(pe,{method:$}),We.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},We.createElement(de,{getComponent:u,operationProps:x,specPath:j}),Y?We.createElement(\"div\",{className:\"opblock-summary-description\"},VO()(ae||P)):null),ie&&(ee||Z)?We.createElement(\"span\",{className:\"opblock-summary-operation-id\"},ee||Z):null),We.createElement(ye,{textToCopy:`${j.get(1)}`}),xe?null:We.createElement(ce,{isAuthorized:B,onClick:()=>{const s=w.definitionsForRequirements(le);_.showDefinitions(s)}}),We.createElement(fe,{path:j}),We.createElement(\"button\",{\"aria-label\":`${$} ${X.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":s,tabIndex:\"-1\",onClick:i},s?We.createElement(be,{className:\"arrow\"}):We.createElement(_e,{className:\"arrow\"})))}}class OperationSummaryMethod extends We.PureComponent{static defaultProps={operationProps:null};render(){let{method:s}=this.props;return We.createElement(\"span\",{className:\"opblock-summary-method\"},s.toUpperCase())}}class OperationSummaryPath extends We.PureComponent{render(){let{getComponent:s,operationProps:i}=this.props,{deprecated:u,isShown:_,path:w,tag:x,operationId:j,isDeepLinkingEnabled:P}=i.toJS();const B=w.split(/(?=\\/)/g);for(let s=1;s<B.length;s+=2)B.splice(s,0,We.createElement(\"wbr\",{key:s}));const $=s(\"DeepLink\");return We.createElement(\"span\",{className:u?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":w},We.createElement($,{enabled:P,isShown:_,path:createDeepLinkPath(`${x}/${j}`),text:B}))}}const operation_extensions=({extensions:s,getComponent:i})=>{let u=i(\"OperationExtRow\");return We.createElement(\"div\",{className:\"opblock-section\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",null,\"Extensions\")),We.createElement(\"div\",{className:\"table-container\"},We.createElement(\"table\",null,We.createElement(\"thead\",null,We.createElement(\"tr\",null,We.createElement(\"td\",{className:\"col_header\"},\"Field\"),We.createElement(\"td\",{className:\"col_header\"},\"Value\"))),We.createElement(\"tbody\",null,s.entrySeq().map((([s,i])=>We.createElement(u,{key:`${s}-${i}`,xKey:s,xVal:i})))))))},operation_extension_row=({xKey:s,xVal:i})=>{const u=i?i.toJS?i.toJS():i:null;return We.createElement(\"tr\",null,We.createElement(\"td\",null,s),We.createElement(\"td\",null,JSON.stringify(u)))};var WO=__webpack_require__(46942),KO=__webpack_require__.n(WO),HO=__webpack_require__(5419),JO=__webpack_require__.n(HO);const highlight_code=({value:s,fileName:i=\"response.txt\",className:u,downloadable:_,getConfigs:w,canCopy:x,language:j})=>{const P=St()(w)?w():null,B=!1!==Eo()(P,\"syntaxHighlight\")&&Eo()(P,\"syntaxHighlight.activated\",!0),$=(0,We.useRef)(null);(0,We.useEffect)((()=>{const s=Array.from($.current.childNodes).filter((s=>!!s.nodeType&&s.classList.contains(\"microlight\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s,u,j]);const handlePreventYScrollingBeyondElement=s=>{const{target:i,deltaY:u}=s,{scrollHeight:_,offsetHeight:w,scrollTop:x}=i;_>w&&(0===x&&u<0||w+x>=_&&u>0)&&s.preventDefault()};return We.createElement(\"div\",{className:\"highlight-code\",ref:$},x&&We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Lo.CopyToClipboard,{text:s},We.createElement(\"button\",null))),_?We.createElement(\"button\",{className:\"download-contents\",onClick:()=>{JO()(s,i)}},\"Download\"):null,B?We.createElement(Vo,{language:j,className:KO()(u,\"microlight\"),style:getStyle(Eo()(P,\"syntaxHighlight.theme\",\"agate\"))},s):We.createElement(\"pre\",{className:KO()(u,\"microlight\")},s))};function createHtmlReadyId(s,i=\"_\"){return s.replace(/[^\\w-]/g,i)}class responses_Responses extends We.Component{static defaultProps={tryItOutResponse:null,produces:(0,Xe.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);onResponseContentTypeChange=({controlsAcceptHeader:s,value:i})=>{const{oas3Actions:u,path:_,method:w}=this.props;s&&u.setResponseContentType({value:i,path:_,method:w})};render(){let{responses:s,tryItOutResponse:i,getComponent:u,getConfigs:_,specSelectors:w,fn:x,producesValue:j,displayRequestDuration:P,specPath:B,path:$,method:U,oas3Selectors:Y,oas3Actions:X}=this.props,Z=function defaultStatusCode(s){let i=s.keySeq();return i.contains(Nt)?Nt:i.filter((s=>\"2\"===(s+\"\")[0])).sort().first()}(s);const ee=u(\"contentType\"),ie=u(\"liveResponse\"),ae=u(\"response\");let le=this.props.produces&&this.props.produces.size?this.props.produces:responses_Responses.defaultProps.produces;const ce=w.isOAS3()?function getAcceptControllingResponse(s){if(!Qe().OrderedMap.isOrderedMap(s))return null;if(!s.size)return null;const i=s.find(((s,i)=>i.startsWith(\"2\")&&Object.keys(s.get(\"content\")||{}).length>0)),u=s.get(\"default\")||Qe().OrderedMap(),_=(u.get(\"content\")||Qe().OrderedMap()).keySeq().toJS().length?u:null;return i||_}(s):null,pe=createHtmlReadyId(`${U}${$}_responses`),de=`${pe}_select`;return We.createElement(\"div\",{className:\"responses-wrapper\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",null,\"Responses\"),w.isOAS3()?null:We.createElement(\"label\",{htmlFor:de},We.createElement(\"span\",null,\"Response content type\"),We.createElement(ee,{value:j,ariaControls:pe,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:le,controlId:de,onChange:this.onChangeProducesWrapper}))),We.createElement(\"div\",{className:\"responses-inner\"},i?We.createElement(\"div\",null,We.createElement(ie,{response:i,getComponent:u,getConfigs:_,specSelectors:w,path:this.props.path,method:this.props.method,displayRequestDuration:P}),We.createElement(\"h4\",null,\"Responses\")):null,We.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:pe,role:\"region\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"responses-header\"},We.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),We.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),w.isOAS3()?We.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),We.createElement(\"tbody\",null,s.entrySeq().map((([s,P])=>{let ee=i&&i.get(\"status\")==s?\"response_current\":\"\";return We.createElement(ae,{key:s,path:$,method:U,specPath:B.push(s),isDefault:Z===s,fn:x,className:ee,code:s,response:P,specSelectors:w,controlsAcceptHeader:P===ce,onContentTypeChange:this.onResponseContentTypeChange,contentType:j,getConfigs:_,activeExamplesKey:Y.activeExamplesMember($,U,\"responses\",s),oas3Actions:X,getComponent:u})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(s){const i=function canJsonParse(s){try{return!!JSON.parse(s)}catch(s){return null}}(s);return i?\"json\":null}class response_Response extends We.Component{constructor(s,i){super(s,i),this.state={responseContentType:\"\"}}static defaultProps={response:(0,Xe.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=s=>{const{onContentTypeChange:i,controlsAcceptHeader:u}=this.props;this.setState({responseContentType:s}),i({value:s,controlsAcceptHeader:u})};getTargetExamplesKey=()=>{const{response:s,contentType:i,activeExamplesKey:u}=this.props,_=this.state.responseContentType||i,w=s.getIn([\"content\",_],(0,Xe.Map)({})).get(\"examples\",null).keySeq().first();return u||w};render(){let{path:s,method:i,code:u,response:_,className:w,specPath:x,fn:j,getComponent:P,getConfigs:B,specSelectors:$,contentType:U,controlsAcceptHeader:Y,oas3Actions:X}=this.props,{inferSchema:Z,getSampleSchema:ee}=j,ie=$.isOAS3();const{showExtensions:ae}=B();let le=ae?getExtensions(_):null,ce=_.get(\"headers\"),pe=_.get(\"links\");const de=P(\"ResponseExtension\"),fe=P(\"headers\"),ye=P(\"highlightCode\"),be=P(\"modelExample\"),_e=P(\"Markdown\",!0),we=P(\"operationLink\"),Se=P(\"contentType\"),xe=P(\"ExamplesSelect\"),Pe=P(\"Example\");var Te,Re;const qe=this.state.responseContentType||U,$e=_.getIn([\"content\",qe],(0,Xe.Map)({})),ze=$e.get(\"examples\",null);if(ie){const s=$e.get(\"schema\");Te=s?Z(s.toJS()):null,Re=s?(0,Xe.List)([\"content\",this.state.responseContentType,\"schema\"]):x}else Te=_.get(\"schema\"),Re=_.has(\"schema\")?x.push(\"schema\"):x;let He,Ye,Qe=!1,et={includeReadOnly:!0};if(ie)if(Ye=$e.get(\"schema\")?.toJS(),ze){const s=this.getTargetExamplesKey(),getMediaTypeExample=s=>s.get(\"value\");He=getMediaTypeExample(ze.get(s,(0,Xe.Map)({}))),void 0===He&&(He=getMediaTypeExample(ze.values().next().value)),Qe=!0}else void 0!==$e.get(\"example\")&&(He=$e.get(\"example\"),Qe=!0);else{Ye=Te,et={...et,includeWriteOnly:!0};const s=_.getIn([\"examples\",qe]);s&&(He=s,Qe=!0)}const tt=((s,i,u)=>{if(null==s)return null;const _=getKnownSyntaxHighlighterLanguage(s)?\"json\":null;return We.createElement(\"div\",null,We.createElement(i,{className:\"example\",getConfigs:u,language:_,value:stringify(s)}))})(ee(Ye,qe,et,Qe?He:void 0),ye,B);return We.createElement(\"tr\",{className:\"response \"+(w||\"\"),\"data-code\":u},We.createElement(\"td\",{className:\"response-col_status\"},u),We.createElement(\"td\",{className:\"response-col_description\"},We.createElement(\"div\",{className:\"response-col_description__inner\"},We.createElement(_e,{source:_.get(\"description\")})),ae&&le.size?le.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null,ie&&_.get(\"content\")?We.createElement(\"section\",{className:\"response-controls\"},We.createElement(\"div\",{className:KO()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":Y})},We.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),We.createElement(Se,{value:this.state.responseContentType,contentTypes:_.get(\"content\")?_.get(\"content\").keySeq():(0,Xe.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),Y?We.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",We.createElement(\"code\",null,\"Accept\"),\" header.\"):null),ze?We.createElement(\"div\",{className:\"response-control-examples\"},We.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),We.createElement(xe,{examples:ze,currentExampleKey:this.getTargetExamplesKey(),onSelect:_=>X.setActiveExamplesMember({name:_,pathMethod:[s,i],contextType:\"responses\",contextName:u}),showLabels:!1})):null):null,tt||Te?We.createElement(be,{specPath:Re,getComponent:P,getConfigs:B,specSelectors:$,schema:fromJSOrdered(Te),example:tt,includeReadOnly:!0}):null,ie&&ze?We.createElement(Pe,{example:ze.get(this.getTargetExamplesKey(),(0,Xe.Map)({})),getComponent:P,getConfigs:B,omitValue:!0}):null,ce?We.createElement(fe,{headers:ce,getComponent:P}):null),ie?We.createElement(\"td\",{className:\"response-col_links\"},pe?pe.toSeq().entrySeq().map((([s,i])=>We.createElement(we,{key:s,name:s,link:i,getComponent:P}))):We.createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:s,xVal:i})=>We.createElement(\"div\",{className:\"response__extension\"},s,\": \",String(i));var GO=__webpack_require__(26657),YO=__webpack_require__.n(GO),XO=__webpack_require__(80218),QO=__webpack_require__.n(XO);class ResponseBody extends We.PureComponent{state={parsedContent:null};updateParsedContent=s=>{const{content:i}=this.props;if(s!==i)if(i&&i instanceof Blob){var u=new FileReader;u.onload=()=>{this.setState({parsedContent:u.result})},u.readAsText(i)}else this.setState({parsedContent:i.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(s){this.updateParsedContent(s.content)}render(){let{content:s,contentType:i,url:u,headers:_={},getConfigs:w,getComponent:x}=this.props;const{parsedContent:j}=this.state,P=x(\"highlightCode\"),B=\"response_\"+(new Date).getTime();let $,U;if(u=u||\"\",(/^application\\/octet-stream/i.test(i)||_[\"Content-Disposition\"]&&/attachment/i.test(_[\"Content-Disposition\"])||_[\"content-disposition\"]&&/attachment/i.test(_[\"content-disposition\"])||_[\"Content-Description\"]&&/File Transfer/i.test(_[\"Content-Description\"])||_[\"content-description\"]&&/File Transfer/i.test(_[\"content-description\"]))&&(s.size>0||s.length>0))if(\"Blob\"in window){let w=i||\"text/html\",x=s instanceof Blob?s:new Blob([s],{type:w}),j=window.URL.createObjectURL(x),P=[w,u.substr(u.lastIndexOf(\"/\")+1),j].join(\":\"),B=_[\"content-disposition\"]||_[\"Content-Disposition\"];if(void 0!==B){let s=function extractFileNameFromContentDispositionHeader(s){let i;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((u=>(i=u.exec(s),null!==i))),null!==i&&i.length>1)try{return decodeURIComponent(i[1])}catch(s){console.error(s)}return null}(B);null!==s&&(P=s)}U=pt.navigator&&pt.navigator.msSaveOrOpenBlob?We.createElement(\"div\",null,We.createElement(\"a\",{href:j,onClick:()=>pt.navigator.msSaveOrOpenBlob(x,P)},\"Download file\")):We.createElement(\"div\",null,We.createElement(\"a\",{href:j,download:P},\"Download file\"))}else U=We.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(i)){let i=null;getKnownSyntaxHighlighterLanguage(s)&&(i=\"json\");try{$=JSON.stringify(JSON.parse(s),null,\"  \")}catch(i){$=\"can't parse JSON.  Raw result:\\n\\n\"+s}U=We.createElement(P,{language:i,downloadable:!0,fileName:`${B}.json`,value:$,getConfigs:w,canCopy:!0})}else/xml/i.test(i)?($=YO()(s,{textNodesOnSameLine:!0,indentor:\"  \"}),U=We.createElement(P,{downloadable:!0,fileName:`${B}.xml`,value:$,getConfigs:w,canCopy:!0})):U=\"text/html\"===QO()(i)||/text\\/plain/.test(i)?We.createElement(P,{downloadable:!0,fileName:`${B}.html`,value:s,getConfigs:w,canCopy:!0}):\"text/csv\"===QO()(i)||/text\\/csv/.test(i)?We.createElement(P,{downloadable:!0,fileName:`${B}.csv`,value:s,getConfigs:w,canCopy:!0}):/^image\\//i.test(i)?i.includes(\"svg\")?We.createElement(\"div\",null,\" \",s,\" \"):We.createElement(\"img\",{src:window.URL.createObjectURL(s)}):/^audio\\//i.test(i)?We.createElement(\"pre\",{className:\"microlight\"},We.createElement(\"audio\",{controls:!0,key:u},We.createElement(\"source\",{src:u,type:i}))):\"string\"==typeof s?We.createElement(P,{downloadable:!0,fileName:`${B}.txt`,value:s,getConfigs:w,canCopy:!0}):s.size>0?j?We.createElement(\"div\",null,We.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),We.createElement(P,{downloadable:!0,fileName:`${B}.txt`,value:j,getConfigs:w,canCopy:!0})):We.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return U?We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Response body\"),U):null}}class Parameters extends We.Component{constructor(s){super(s),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(s,i,u)=>{let{specActions:{changeParamByIdentity:_},onChangeKey:w}=this.props;_(w,s,i,u)};onChangeConsumesWrapper=s=>{let{specActions:{changeConsumesValue:i},onChangeKey:u}=this.props;i(u,s)};toggleTab=s=>\"parameters\"===s?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===s?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:s,pathMethod:i})=>{let{specActions:u,oas3Selectors:_,oas3Actions:w}=this.props;const x=_.hasUserEditedBody(...i),j=_.shouldRetainRequestBodyValue(...i);w.setRequestContentType({value:s,pathMethod:i}),w.initRequestBodyValidateError({pathMethod:i}),x||(j||w.setRequestBodyValue({value:void 0,pathMethod:i}),u.clearResponse(...i),u.clearRequest(...i),u.clearValidateParams(i))};render(){let{onTryoutClick:s,onResetClick:i,parameters:u,allowTryItOut:_,tryItOutEnabled:w,specPath:x,fn:j,getComponent:P,getConfigs:B,specSelectors:$,specActions:U,pathMethod:Y,oas3Actions:X,oas3Selectors:Z,operation:ee}=this.props;const ie=P(\"parameterRow\"),ae=P(\"TryItOutButton\"),le=P(\"contentType\"),ce=P(\"Callbacks\",!0),pe=P(\"RequestBody\",!0),de=w&&_,fe=$.isOAS3(),ye=`${createHtmlReadyId(`${Y[1]}${Y[0]}_requests`)}_select`,be=ee.get(\"requestBody\"),_e=Object.values(u.reduce(((s,i)=>{const u=i.get(\"in\");return s[u]??=[],s[u].push(i),s}),{})).reduce(((s,i)=>s.concat(i)),[]);return We.createElement(\"div\",{className:\"opblock-section\"},We.createElement(\"div\",{className:\"opblock-section-header\"},fe?We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},We.createElement(\"h4\",{className:\"opblock-title\"},We.createElement(\"span\",null,\"Parameters\"))),ee.get(\"callbacks\")?We.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},We.createElement(\"h4\",{className:\"opblock-title\"},We.createElement(\"span\",null,\"Callbacks\"))):null):We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),_?We.createElement(ae,{isOAS3:$.isOAS3(),hasUserEditedBody:Z.hasUserEditedBody(...Y),enabled:w,onCancelClick:this.props.onCancelClick,onTryoutClick:s,onResetClick:()=>i(Y)}):null),this.state.parametersVisible?We.createElement(\"div\",{className:\"parameters-container\"},_e.length?We.createElement(\"div\",{className:\"table-container\"},We.createElement(\"table\",{className:\"parameters\"},We.createElement(\"thead\",null,We.createElement(\"tr\",null,We.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),We.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),We.createElement(\"tbody\",null,_e.map(((s,i)=>We.createElement(ie,{fn:j,specPath:x.push(i.toString()),getComponent:P,getConfigs:B,rawParam:s,param:$.parameterWithMetaByIdentity(Y,s),key:`${s.get(\"in\")}.${s.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:$,specActions:U,oas3Actions:X,oas3Selectors:Z,pathMethod:Y,isExecute:de})))))):We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?We.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},We.createElement(ce,{callbacks:(0,Xe.Map)(ee.get(\"callbacks\")),specPath:x.slice(0,-1).push(\"callbacks\")})):null,fe&&be&&this.state.parametersVisible&&We.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",{className:`opblock-title parameter__name ${be.get(\"required\")&&\"required\"}`},\"Request body\"),We.createElement(\"label\",{id:ye},We.createElement(le,{value:Z.requestContentType(...Y),contentTypes:be.get(\"content\",(0,Xe.List)()).keySeq(),onChange:s=>{this.onChangeMediaType({value:s,pathMethod:Y})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:ye}))),We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(pe,{setRetainRequestBodyValueFlag:s=>X.setRetainRequestBodyValueFlag({value:s,pathMethod:Y}),userHasEditedBody:Z.hasUserEditedBody(...Y),specPath:x.slice(0,-1).push(\"requestBody\"),requestBody:be,requestBodyValue:Z.requestBodyValue(...Y),requestBodyInclusionSetting:Z.requestBodyInclusionSetting(...Y),requestBodyErrors:Z.requestBodyErrors(...Y),isExecute:de,getConfigs:B,activeExamplesKey:Z.activeExamplesMember(...Y,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(s,i)=>{if(i){const u=Z.requestBodyValue(...Y),_=Xe.Map.isMap(u)?u:(0,Xe.Map)();return X.setRequestBodyValue({pathMethod:Y,value:_.setIn(i,s)})}X.setRequestBodyValue({value:s,pathMethod:Y})},onChangeIncludeEmpty:(s,i)=>{X.setRequestBodyInclusion({pathMethod:Y,value:i,name:s})},contentType:Z.requestContentType(...Y)}))))}}const parameter_extension=({xKey:s,xVal:i})=>We.createElement(\"div\",{className:\"parameter__extension\"},s,\": \",String(i)),ZO={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends We.Component{static defaultProps=ZO;componentDidMount(){const{isIncludedOptions:s,onChange:i}=this.props,{shouldDispatchInit:u,defaultValue:_}=s;u&&i(_)}onCheckboxChange=s=>{const{onChange:i}=this.props;i(s.target.checked)};render(){let{isIncluded:s,isDisabled:i}=this.props;return We.createElement(\"div\",null,We.createElement(\"label\",{htmlFor:\"include_empty_value\",className:KO()(\"parameter__empty_value_toggle\",{disabled:i})},We.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:i,checked:!i&&s,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends We.Component{constructor(s,i){super(s,i),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(s){let i,{specSelectors:u,pathMethod:_,rawParam:w}=s,x=u.isOAS3(),j=u.parameterWithMetaByIdentity(_,w)||new Xe.Map;if(j=j.isEmpty()?w:j,x){let{schema:s}=getParameterSchema(j,{isOAS3:x});i=s?s.get(\"enum\"):void 0}else i=j?j.get(\"enum\"):void 0;let P,B=j?j.get(\"value\"):void 0;void 0!==B?P=B:w.get(\"required\")&&i&&i.size&&(P=i.first()),void 0!==P&&P!==B&&this.onChangeWrapper(function numberToString(s){return\"number\"==typeof s?s.toString():s}(P)),this.setDefaultValue()}onChangeWrapper=(s,i=!1)=>{let u,{onChange:_,rawParam:w}=this.props;return u=\"\"===s||s&&0===s.size?null:s,_(w,u,i)};_onExampleSelect=s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=s=>{let{specActions:i,param:u,pathMethod:_}=this.props;const w=u.get(\"name\"),x=u.get(\"in\");return i.updateEmptyParamInclusion(_,w,x,s)};setDefaultValue=()=>{let{specSelectors:s,pathMethod:i,rawParam:u,oas3Selectors:_,fn:w}=this.props;const x=s.parameterWithMetaByIdentity(i,u)||(0,Xe.Map)(),{schema:j}=getParameterSchema(x,{isOAS3:s.isOAS3()}),P=x.get(\"content\",(0,Xe.Map)()).keySeq().first(),B=j?w.getSampleSchema(j.toJS(),P,{includeWriteOnly:!0}):null;if(x&&void 0===x.get(\"value\")&&\"body\"!==x.get(\"in\")){let u;if(s.isSwagger2())u=void 0!==x.get(\"x-example\")?x.get(\"x-example\"):void 0!==x.getIn([\"schema\",\"example\"])?x.getIn([\"schema\",\"example\"]):j&&j.getIn([\"default\"]);else if(s.isOAS3()){const s=_.activeExamplesMember(...i,\"parameters\",this.getParamKey());u=void 0!==x.getIn([\"examples\",s,\"value\"])?x.getIn([\"examples\",s,\"value\"]):void 0!==x.getIn([\"content\",P,\"example\"])?x.getIn([\"content\",P,\"example\"]):void 0!==x.get(\"example\")?x.get(\"example\"):void 0!==(j&&j.get(\"example\"))?j&&j.get(\"example\"):void 0!==(j&&j.get(\"default\"))?j&&j.get(\"default\"):x.get(\"default\")}void 0===u||Xe.List.isList(u)||(u=stringify(u)),void 0!==u?this.onChangeWrapper(u):j&&\"object\"===j.get(\"type\")&&B&&!x.get(\"examples\")&&this.onChangeWrapper(Xe.List.isList(B)?B:stringify(B))}};getParamKey(){const{param:s}=this.props;return s?`${s.get(\"name\")}-${s.get(\"in\")}`:null}render(){let{param:s,rawParam:i,getComponent:u,getConfigs:_,isExecute:w,fn:x,onChangeConsumes:j,specSelectors:P,pathMethod:B,specPath:$,oas3Selectors:U}=this.props,Y=P.isOAS3();const{showExtensions:X,showCommonExtensions:Z}=_();if(s||(s=i),!i)return null;const ee=u(\"JsonSchemaForm\"),ie=u(\"ParamBody\");let ae=s.get(\"in\"),le=\"body\"!==ae?null:We.createElement(ie,{getComponent:u,getConfigs:_,fn:x,param:s,consumes:P.consumesOptionsFor(B),consumesValue:P.contentTypeValues(B).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:j,isExecute:w,specSelectors:P,pathMethod:B});const ce=u(\"modelExample\"),pe=u(\"Markdown\",!0),de=u(\"ParameterExt\"),fe=u(\"ParameterIncludeEmpty\"),ye=u(\"ExamplesSelectValueRetainer\"),be=u(\"Example\");let _e,we,Se,xe,{schema:Pe}=getParameterSchema(s,{isOAS3:Y}),Te=P.parameterWithMetaByIdentity(B,i)||(0,Xe.Map)(),Re=Pe?Pe.get(\"format\"):null,qe=Pe?Pe.get(\"type\"):null,$e=Pe?Pe.getIn([\"items\",\"type\"]):null,ze=\"formData\"===ae,He=\"FormData\"in pt,Ye=s.get(\"required\"),Qe=Te?Te.get(\"value\"):\"\",et=Z?getCommonExtensions(Pe):null,tt=X?getExtensions(s):null,rt=!1;return void 0!==s&&Pe&&(_e=Pe.get(\"items\")),void 0!==_e?(we=_e.get(\"enum\"),Se=_e.get(\"default\")):Pe&&(we=Pe.get(\"enum\")),we&&we.size&&we.size>0&&(rt=!0),void 0!==s&&(Pe&&(Se=Pe.get(\"default\")),void 0===Se&&(Se=s.get(\"default\")),xe=s.get(\"example\"),void 0===xe&&(xe=s.get(\"x-example\"))),We.createElement(\"tr\",{\"data-param-name\":s.get(\"name\"),\"data-param-in\":s.get(\"in\")},We.createElement(\"td\",{className:\"parameters-col_name\"},We.createElement(\"div\",{className:Ye?\"parameter__name required\":\"parameter__name\"},s.get(\"name\"),Ye?We.createElement(\"span\",null,\" *\"):null),We.createElement(\"div\",{className:\"parameter__type\"},qe,$e&&`[${$e}]`,Re&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",Re,\")\")),We.createElement(\"div\",{className:\"parameter__deprecated\"},Y&&s.get(\"deprecated\")?\"deprecated\":null),We.createElement(\"div\",{className:\"parameter__in\"},\"(\",s.get(\"in\"),\")\"),Z&&et.size?et.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null,X&&tt.size?tt.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null),We.createElement(\"td\",{className:\"parameters-col_description\"},s.get(\"description\")?We.createElement(pe,{source:s.get(\"description\")}):null,!le&&w||!rt?null:We.createElement(pe,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+we.map((function(s){return s})).toArray().join(\", \")}),!le&&w||void 0===Se?null:We.createElement(pe,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+Se}),!le&&w||void 0===xe?null:We.createElement(pe,{source:\"<i>Example</i> : \"+xe}),ze&&!He&&We.createElement(\"div\",null,\"Error: your browser does not support FormData\"),Y&&s.get(\"examples\")?We.createElement(\"section\",{className:\"parameter-controls\"},We.createElement(ye,{examples:s.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:u,defaultToFirstExample:!0,currentKey:U.activeExamplesMember(...B,\"parameters\",this.getParamKey()),currentUserInputValue:Qe})):null,le?null:We.createElement(ee,{fn:x,getComponent:u,value:Qe,required:Ye,disabled:!w,description:s.get(\"name\"),onChange:this.onChangeWrapper,errors:Te.get(\"errors\"),schema:Pe}),le&&Pe?We.createElement(ce,{getComponent:u,specPath:$.push(\"schema\"),getConfigs:_,isExecute:w,specSelectors:P,schema:Pe,example:le,includeWriteOnly:!0}):null,!le&&w&&s.get(\"allowEmptyValue\")?We.createElement(fe,{onChange:this.onChangeIncludeEmpty,isIncluded:P.parameterInclusionSettingFor(B,s.get(\"name\"),s.get(\"in\")),isDisabled:!isEmptyValue(Qe)}):null,Y&&s.get(\"examples\")?We.createElement(be,{example:s.getIn([\"examples\",U.activeExamplesMember(...B,\"parameters\",this.getParamKey())]),getComponent:u,getConfigs:_}):null))}}class Execute extends We.Component{handleValidateParameters=()=>{let{specSelectors:s,specActions:i,path:u,method:_}=this.props;return i.validateParams([u,_]),s.validateBeforeExecute([u,_])};handleValidateRequestBody=()=>{let{path:s,method:i,specSelectors:u,oas3Selectors:_,oas3Actions:w}=this.props,x={missingBodyValue:!1,missingRequiredKeys:[]};w.clearRequestBodyValidateError({path:s,method:i});let j=u.getOAS3RequiredRequestBodyContentType([s,i]),P=_.requestBodyValue(s,i),B=_.validateBeforeExecute([s,i]),$=_.requestContentType(s,i);if(!B)return x.missingBodyValue=!0,w.setRequestBodyValidateError({path:s,method:i,validationErrors:x}),!1;if(!j)return!0;let U=_.validateShallowRequired({oas3RequiredRequestBodyContentType:j,oas3RequestContentType:$,oas3RequestBodyValue:P});return!U||U.length<1||(U.forEach((s=>{x.missingRequiredKeys.push(s)})),w.setRequestBodyValidateError({path:s,method:i,validationErrors:x}),!1)};handleValidationResultPass=()=>{let{specActions:s,operation:i,path:u,method:_}=this.props;this.props.onExecute&&this.props.onExecute(),s.execute({operation:i,path:u,method:_})};handleValidationResultFail=()=>{let{specActions:s,path:i,method:u}=this.props;s.clearValidateParams([i,u]),setTimeout((()=>{s.validateParams([i,u])}),40)};handleValidationResult=s=>{s?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let s=this.handleValidateParameters(),i=this.handleValidateRequestBody(),u=s&&i;this.handleValidationResult(u)};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);render(){const{disabled:s}=this.props;return We.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:s},\"Execute\")}}class headers_Headers extends We.Component{render(){let{headers:s,getComponent:i}=this.props;const u=i(\"Property\"),_=i(\"Markdown\",!0);return s&&s.size?We.createElement(\"div\",{className:\"headers-wrapper\"},We.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),We.createElement(\"table\",{className:\"headers\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"header-row\"},We.createElement(\"th\",{className:\"header-col\"},\"Name\"),We.createElement(\"th\",{className:\"header-col\"},\"Description\"),We.createElement(\"th\",{className:\"header-col\"},\"Type\"))),We.createElement(\"tbody\",null,s.entrySeq().map((([s,i])=>{if(!Qe().Map.isMap(i))return null;const w=i.get(\"description\"),x=i.getIn([\"schema\"])?i.getIn([\"schema\",\"type\"]):i.getIn([\"type\"]),j=i.getIn([\"schema\",\"example\"]);return We.createElement(\"tr\",{key:s},We.createElement(\"td\",{className:\"header-col\"},s),We.createElement(\"td\",{className:\"header-col\"},w?We.createElement(_,{source:w}):null),We.createElement(\"td\",{className:\"header-col\"},x,\" \",j?We.createElement(u,{propKey:\"Example\",propVal:j,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends We.Component{render(){let{editorActions:s,errSelectors:i,layoutSelectors:u,layoutActions:_,getComponent:w}=this.props;const x=w(\"Collapse\");if(s&&s.jumpToLine)var j=s.jumpToLine;let P=i.allErrors().filter((s=>\"thrown\"===s.get(\"type\")||\"error\"===s.get(\"level\")));if(!P||P.count()<1)return null;let B=u.isShown([\"errorPane\"],!0),$=P.sortBy((s=>s.get(\"line\")));return We.createElement(\"pre\",{className:\"errors-wrapper\"},We.createElement(\"hgroup\",{className:\"error\"},We.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),We.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>_.show([\"errorPane\"],!B)},B?\"Hide\":\"Show\")),We.createElement(x,{isOpened:B,animated:!0},We.createElement(\"div\",{className:\"errors\"},$.map(((s,i)=>{let u=s.get(\"type\");return\"thrown\"===u||\"auth\"===u?We.createElement(ThrownErrorItem,{key:i,error:s.get(\"error\")||s,jumpToLine:j}):\"spec\"===u?We.createElement(SpecErrorItem,{key:i,error:s,jumpToLine:j}):void 0})))))}}const ThrownErrorItem=({error:s,jumpToLine:i})=>{if(!s)return null;let u=s.get(\"line\");return We.createElement(\"div\",{className:\"error-wrapper\"},s?We.createElement(\"div\",null,We.createElement(\"h4\",null,s.get(\"source\")&&s.get(\"level\")?toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"):\"\",s.get(\"path\")?We.createElement(\"small\",null,\" at \",s.get(\"path\")):null),We.createElement(\"span\",{className:\"message thrown\"},s.get(\"message\")),We.createElement(\"div\",{className:\"error-line\"},u&&i?We.createElement(\"a\",{onClick:i.bind(null,u)},\"Jump to line \",u):null)):null)},SpecErrorItem=({error:s,jumpToLine:i=null})=>{let u=null;return s.get(\"path\")?u=Xe.List.isList(s.get(\"path\"))?We.createElement(\"small\",null,\"at \",s.get(\"path\").join(\".\")):We.createElement(\"small\",null,\"at \",s.get(\"path\")):s.get(\"line\")&&!i&&(u=We.createElement(\"small\",null,\"on line \",s.get(\"line\"))),We.createElement(\"div\",{className:\"error-wrapper\"},s?We.createElement(\"div\",null,We.createElement(\"h4\",null,toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"),\" \",u),We.createElement(\"span\",{className:\"message\"},s.get(\"message\")),We.createElement(\"div\",{className:\"error-line\"},i?We.createElement(\"a\",{onClick:i.bind(null,s.get(\"line\"))},\"Jump to line \",s.get(\"line\")):null)):null)};function toTitleCase(s){return(s||\"\").split(\" \").map((s=>s[0].toUpperCase()+s.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends We.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,Xe.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(s){s.contentTypes&&s.contentTypes.size&&(s.contentTypes.includes(s.value)||s.onChange(s.contentTypes.first()))}onChangeWrapper=s=>this.props.onChange(s.target.value);render(){let{ariaControls:s,ariaLabel:i,className:u,contentTypes:_,controlId:w,value:x}=this.props;return _&&_.size?We.createElement(\"div\",{className:\"content-type-wrapper \"+(u||\"\")},We.createElement(\"select\",{\"aria-controls\":s,\"aria-label\":i,className:\"content-type\",id:w,onChange:this.onChangeWrapper,value:x||\"\"},_.map((s=>We.createElement(\"option\",{key:s,value:s},s))).toArray())):null}}function xclass(...s){return s.filter((s=>!!s)).join(\" \").trim()}class Container extends We.Component{render(){let{fullscreen:s,full:i,...u}=this.props;if(s)return We.createElement(\"section\",u);let _=\"swagger-container\"+(i?\"-full\":\"\");return We.createElement(\"section\",Co()({},u,{className:xclass(u.className,_)}))}}const eC={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends We.Component{render(){const{hide:s,keepContents:i,mobile:u,tablet:_,desktop:w,large:x,...j}=this.props;if(s&&!i)return We.createElement(\"span\",null);let P=[];for(let s in eC){if(!Object.prototype.hasOwnProperty.call(eC,s))continue;let i=eC[s];if(s in this.props){let u=this.props[s];if(u<1){P.push(\"none\"+i);continue}P.push(\"block\"+i),P.push(\"col-\"+u+i)}}s&&P.push(\"hidden\");let B=xclass(j.className,...P);return We.createElement(\"section\",Co()({},j,{className:B}))}}class Row extends We.Component{render(){return We.createElement(\"div\",Co()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends We.Component{static defaultProps={className:\"\"};render(){return We.createElement(\"button\",Co()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=s=>We.createElement(\"textarea\",s),Input=s=>We.createElement(\"input\",s);class Select extends We.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(s,i){let u;super(s,i),u=s.value?s.value:s.multiple?[\"\"]:\"\",this.state={value:u}}onChange=s=>{let i,{onChange:u,multiple:_}=this.props,w=[].slice.call(s.target.options);i=_?w.filter((function(s){return s.selected})).map((function(s){return s.value})):s.target.value,this.setState({value:i}),u&&u(i)};UNSAFE_componentWillReceiveProps(s){s.value!==this.props.value&&this.setState({value:s.value})}render(){let{allowedValues:s,multiple:i,allowEmptyValue:u,disabled:_}=this.props,w=this.state.value?.toJS?.()||this.state.value;return We.createElement(\"select\",{className:this.props.className,multiple:i,value:w,onChange:this.onChange,disabled:_},u?We.createElement(\"option\",{value:\"\"},\"--\"):null,s.map((function(s,i){return We.createElement(\"option\",{key:i,value:String(s)},String(s))})))}}class layout_utils_Link extends We.Component{render(){return We.createElement(\"a\",Co()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:s})=>We.createElement(\"div\",{className:\"no-margin\"},\" \",s,\" \");class Collapse extends We.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?We.createElement(NoMargin,null,this.props.children):We.createElement(\"noscript\",null)}render(){let{animated:s,isOpened:i,children:u}=this.props;return s?(u=i?u:null,We.createElement(NoMargin,null,u)):this.renderNotAnimated()}}class Overview extends We.Component{constructor(...s){super(...s),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(s,i){this.props.layoutActions.show(s,i)}showOp(s,i){let{layoutActions:u}=this.props;u.show(s,i)}render(){let{specSelectors:s,layoutSelectors:i,layoutActions:u,getComponent:_}=this.props,w=s.taggedOperations();const x=_(\"Collapse\");return We.createElement(\"div\",null,We.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),w.map(((s,_)=>{let w=s.get(\"operations\"),j=[\"overview-tags\",_],P=i.isShown(j,!0);return We.createElement(\"div\",{key:\"overview-\"+_},We.createElement(\"h4\",{onClick:()=>u.show(j,!P),className:\"link overview-tag\"},\" \",P?\"-\":\"+\",_),We.createElement(x,{isOpened:P,animated:!0},w.map((s=>{let{path:_,method:w,id:x}=s.toObject(),j=\"operations\",P=x,B=i.isShown([j,P]);return We.createElement(OperationLink,{key:x,path:_,method:w,id:_+\"-\"+w,shown:B,showOpId:P,showOpIdPrefix:j,href:`#operation-${P}`,onClick:u.show})})).toArray()))})).toArray(),w.size<1&&We.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends We.Component{constructor(s){super(s),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:s,showOpIdPrefix:i,onClick:u,shown:_}=this.props;u([i,s],!_)}render(){let{id:s,method:i,shown:u,href:_}=this.props;return We.createElement(layout_utils_Link,{href:_,onClick:this.onClick,className:\"block opblock-link \"+(u?\"shown\":\"\")},We.createElement(\"div\",null,We.createElement(\"small\",{className:`bold-label-${i}`},i.toUpperCase()),We.createElement(\"span\",{className:\"bold-label\"},s)))}}class InitializedInput extends We.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:s,defaultValue:i,initialValue:u,..._}=this.props;return We.createElement(\"input\",Co()({},_,{ref:s=>this.inputRef=s}))}}class InfoBasePath extends We.Component{render(){const{host:s,basePath:i}=this.props;return We.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",s,i,\" ]\")}}class InfoUrl extends We.PureComponent{render(){const{url:s,getComponent:i}=this.props,u=i(\"Link\");return We.createElement(u,{target:\"_blank\",href:sanitizeUrl(s)},We.createElement(\"span\",{className:\"url\"},\" \",s))}}class info_Info extends We.Component{render(){const{info:s,url:i,host:u,basePath:_,getComponent:w,externalDocs:x,selectedServer:j,url:P}=this.props,B=s.get(\"version\"),$=s.get(\"description\"),U=s.get(\"title\"),Y=safeBuildUrl(s.get(\"termsOfService\"),P,{selectedServer:j}),X=s.get(\"contact\"),Z=s.get(\"license\"),ee=safeBuildUrl(x&&x.get(\"url\"),P,{selectedServer:j}),ie=x&&x.get(\"description\"),ae=w(\"Markdown\",!0),le=w(\"Link\"),ce=w(\"VersionStamp\"),pe=w(\"OpenAPIVersion\"),de=w(\"InfoUrl\"),fe=w(\"InfoBasePath\"),ye=w(\"License\"),be=w(\"Contact\");return We.createElement(\"div\",{className:\"info\"},We.createElement(\"hgroup\",{className:\"main\"},We.createElement(\"h2\",{className:\"title\"},U,We.createElement(\"span\",null,B&&We.createElement(ce,{version:B}),We.createElement(pe,{oasVersion:\"2.0\"}))),u||_?We.createElement(fe,{host:u,basePath:_}):null,i&&We.createElement(de,{getComponent:w,url:i})),We.createElement(\"div\",{className:\"description\"},We.createElement(ae,{source:$})),Y&&We.createElement(\"div\",{className:\"info__tos\"},We.createElement(le,{target:\"_blank\",href:sanitizeUrl(Y)},\"Terms of service\")),X?.size>0&&We.createElement(be,{getComponent:w,data:X,selectedServer:j,url:i}),Z?.size>0&&We.createElement(ye,{getComponent:w,license:Z,selectedServer:j,url:i}),ee?We.createElement(le,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(ee)},ie||ee):null)}}const tC=info_Info;class InfoContainer extends We.Component{render(){const{specSelectors:s,getComponent:i,oas3Selectors:u}=this.props,_=s.info(),w=s.url(),x=s.basePath(),j=s.host(),P=s.externalDocs(),B=u.selectedServer(),$=i(\"info\");return We.createElement(\"div\",null,_&&_.count()?We.createElement($,{info:_,url:w,host:j,basePath:x,externalDocs:P,getComponent:i,selectedServer:B}):null)}}class contact_Contact extends We.Component{render(){const{data:s,getComponent:i,selectedServer:u,url:_}=this.props,w=s.get(\"name\",\"the developer\"),x=safeBuildUrl(s.get(\"url\"),_,{selectedServer:u}),j=s.get(\"email\"),P=i(\"Link\");return We.createElement(\"div\",{className:\"info__contact\"},x&&We.createElement(\"div\",null,We.createElement(P,{href:sanitizeUrl(x),target:\"_blank\"},w,\" - Website\")),j&&We.createElement(P,{href:sanitizeUrl(`mailto:${j}`)},x?`Send email to ${w}`:`Contact ${w}`))}}const rC=contact_Contact;class license_License extends We.Component{render(){const{license:s,getComponent:i,selectedServer:u,url:_}=this.props,w=s.get(\"name\",\"License\"),x=safeBuildUrl(s.get(\"url\"),_,{selectedServer:u}),j=i(\"Link\");return We.createElement(\"div\",{className:\"info__license\"},x?We.createElement(\"div\",{className:\"info__license__url\"},We.createElement(j,{target:\"_blank\",href:sanitizeUrl(x)},w)):We.createElement(\"span\",null,w))}}const nC=license_License;class JumpToPath extends We.Component{render(){return null}}class CopyToClipboardBtn extends We.Component{render(){let{getComponent:s}=this.props;const i=s(\"CopyIcon\");return We.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},We.createElement(Lo.CopyToClipboard,{text:this.props.textToCopy},We.createElement(i,null)))}}class Footer extends We.Component{render(){return We.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends We.Component{onFilterChange=s=>{const{target:{value:i}}=s;this.props.layoutActions.updateFilter(i)};render(){const{specSelectors:s,layoutSelectors:i,getComponent:u}=this.props,_=u(\"Col\"),w=\"loading\"===s.loadingStatus(),x=\"failed\"===s.loadingStatus(),j=i.currentFilter(),P=[\"operation-filter-input\"];return x&&P.push(\"failed\"),w&&P.push(\"loading\"),We.createElement(\"div\",null,null===j||!1===j||\"false\"===j?null:We.createElement(\"div\",{className:\"filter-container\"},We.createElement(_,{className:\"filter wrapper\",mobile:12},We.createElement(\"input\",{className:P.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:!0===j||\"true\"===j?\"\":j,disabled:w}))))}}const oC=Function.prototype;class ParamBody extends We.PureComponent{static defaultProp={consumes:(0,Xe.fromJS)([\"application/json\"]),param:(0,Xe.fromJS)({}),onChange:oC,onChangeConsumes:oC};constructor(s,i){super(s,i),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(s){this.updateValues.call(this,s)}updateValues=s=>{let{param:i,isExecute:u,consumesValue:_=\"\"}=s,w=/xml/i.test(_),x=/json/i.test(_),j=w?i.get(\"value_xml\"):i.get(\"value\");if(void 0!==j){let s=!j&&x?\"{}\":j;this.setState({value:s}),this.onChange(s,{isXml:w,isEditBox:u})}else w?this.onChange(this.sample(\"xml\"),{isXml:w,isEditBox:u}):this.onChange(this.sample(),{isEditBox:u})};sample=s=>{let{param:i,fn:u}=this.props,_=u.inferSchema(i.toJS());return u.getSampleSchema(_,s,{includeWriteOnly:!0})};onChange=(s,{isEditBox:i,isXml:u})=>{this.setState({value:s,isEditBox:i}),this._onChange(s,u)};_onChange=(s,i)=>{(this.props.onChange||oC)(s,i)};handleOnChange=s=>{const{consumesValue:i}=this.props,u=/xml/i.test(i),_=s.target.value;this.onChange(_,{isXml:u,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((s=>({isEditBox:!s.isEditBox})));render(){let{onChangeConsumes:s,param:i,isExecute:u,specSelectors:_,pathMethod:w,getConfigs:x,getComponent:j}=this.props;const P=j(\"Button\"),B=j(\"TextArea\"),$=j(\"highlightCode\"),U=j(\"contentType\");let Y=(_?_.parameterWithMetaByIdentity(w,i):i).get(\"errors\",(0,Xe.List)()),X=_.contentTypeValues(w).get(\"requestContentType\"),Z=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:ee,isEditBox:ie}=this.state,ae=null;getKnownSyntaxHighlighterLanguage(ee)&&(ae=\"json\");const le=`${createHtmlReadyId(`${w[1]}${w[0]}_parameters`)}_select`;return We.createElement(\"div\",{className:\"body-param\",\"data-param-name\":i.get(\"name\"),\"data-param-in\":i.get(\"in\")},ie&&u?We.createElement(B,{className:\"body-param__text\"+(Y.count()?\" invalid\":\"\"),value:ee,onChange:this.handleOnChange}):ee&&We.createElement($,{className:\"body-param__example\",language:ae,getConfigs:x,value:ee}),We.createElement(\"div\",{className:\"body-param-options\"},u?We.createElement(\"div\",{className:\"body-param-edit\"},We.createElement(P,{className:ie?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},ie?\"Cancel\":\"Edit\")):null,We.createElement(\"label\",{htmlFor:le},We.createElement(\"span\",null,\"Parameter content type\"),We.createElement(U,{value:X,contentTypes:Z,onChange:s,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:le}))))}}class Curl extends We.Component{render(){let{request:s,getConfigs:i}=this.props,u=requestSnippetGenerator_curl_bash(s);const _=i(),w=Eo()(_,\"syntaxHighlight.activated\")?We.createElement(Vo,{language:\"bash\",className:\"curl microlight\",style:getStyle(Eo()(_,\"syntaxHighlight.theme\"))},u):We.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:u});return We.createElement(\"div\",{className:\"curl-command\"},We.createElement(\"h4\",null,\"Curl\"),We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Lo.CopyToClipboard,{text:u},We.createElement(\"button\",null))),We.createElement(\"div\",null,w))}}class Schemes extends We.Component{UNSAFE_componentWillMount(){let{schemes:s}=this.props;this.setScheme(s.first())}UNSAFE_componentWillReceiveProps(s){this.props.currentScheme&&s.schemes.includes(this.props.currentScheme)||this.setScheme(s.schemes.first())}onChange=s=>{this.setScheme(s.target.value)};setScheme=s=>{let{path:i,method:u,specActions:_}=this.props;_.setScheme(s,i,u)};render(){let{schemes:s,currentScheme:i}=this.props;return We.createElement(\"label\",{htmlFor:\"schemes\"},We.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),We.createElement(\"select\",{onChange:this.onChange,value:i,id:\"schemes\"},s.valueSeq().map((s=>We.createElement(\"option\",{value:s,key:s},s))).toArray()))}}class SchemesContainer extends We.Component{render(){const{specActions:s,specSelectors:i,getComponent:u}=this.props,_=i.operationScheme(),w=i.schemes(),x=u(\"schemes\");return w&&w.size?We.createElement(x,{currentScheme:_,schemes:w,specActions:s}):null}}class ModelCollapse extends We.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:Qe().List([])};constructor(s,i){super(s,i);let{expanded:u,collapsedContent:_}=this.props;this.state={expanded:u,collapsedContent:_||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:s,expanded:i,modelName:u}=this.props;s&&i&&this.props.onToggle(u,i)}UNSAFE_componentWillReceiveProps(s){this.props.expanded!==s.expanded&&this.setState({expanded:s.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=s=>{if(s&&this.props.layoutSelectors){const i=this.props.layoutSelectors.getScrollToKey();Qe().is(i,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,s.parentElement)}};render(){const{title:s,classes:i}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?We.createElement(\"span\",{className:i||\"\"},this.props.children):We.createElement(\"span\",{className:i||\"\",ref:this.onLoad},We.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},s&&We.createElement(\"span\",{className:\"pointer\"},s),We.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&We.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:s,isExecute:i,schema:u,example:_})=>{const w=(0,We.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),x=(0,We.useMemo)((()=>Object.keys(w)),[w]).includes(s)&&u&&!i?s:w.example,j=(s=>{const i=(0,We.useRef)();return(0,We.useEffect)((()=>{i.current=s})),i.current})(i),[P,B]=(0,We.useState)(x),$=(0,We.useCallback)((s=>{B(s.target.dataset.name)}),[]);return(0,We.useEffect)((()=>{j&&!i&&_&&B(w.example)}),[j,i,_]),{activeTab:P,onTabChange:$,tabs:w}},model_example=({schema:s,example:i,isExecute:u=!1,specPath:_,includeWriteOnly:w=!1,includeReadOnly:x=!1,getComponent:j,getConfigs:P,specSelectors:B})=>{const{defaultModelRendering:$,defaultModelExpandDepth:U}=P(),Y=j(\"ModelWrapper\"),X=j(\"highlightCode\"),Z=Ct()(5).toString(\"base64\"),ee=Ct()(5).toString(\"base64\"),ie=Ct()(5).toString(\"base64\"),ae=Ct()(5).toString(\"base64\"),le=B.isOAS3(),{activeTab:ce,tabs:pe,onTabChange:de}=useTabs({initialTab:$,isExecute:u,schema:s,example:i});return We.createElement(\"div\",{className:\"model-example\"},We.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},We.createElement(\"li\",{className:KO()(\"tabitem\",{active:ce===pe.example}),role:\"presentation\"},We.createElement(\"button\",{\"aria-controls\":ee,\"aria-selected\":ce===pe.example,className:\"tablinks\",\"data-name\":\"example\",id:Z,onClick:de,role:\"tab\"},u?\"Edit Value\":\"Example Value\")),s&&We.createElement(\"li\",{className:KO()(\"tabitem\",{active:ce===pe.model}),role:\"presentation\"},We.createElement(\"button\",{\"aria-controls\":ae,\"aria-selected\":ce===pe.model,className:KO()(\"tablinks\",{inactive:u}),\"data-name\":\"model\",id:ie,onClick:de,role:\"tab\"},le?\"Schema\":\"Model\"))),ce===pe.example&&We.createElement(\"div\",{\"aria-hidden\":ce!==pe.example,\"aria-labelledby\":Z,\"data-name\":\"examplePanel\",id:ee,role:\"tabpanel\",tabIndex:\"0\"},i||We.createElement(X,{value:\"(no example available)\",getConfigs:P})),ce===pe.model&&We.createElement(\"div\",{\"aria-hidden\":ce===pe.example,\"aria-labelledby\":ie,\"data-name\":\"modelPanel\",id:ae,role:\"tabpanel\",tabIndex:\"0\"},We.createElement(Y,{schema:s,getComponent:j,getConfigs:P,specSelectors:B,expandDepth:U,specPath:_,includeReadOnly:x,includeWriteOnly:w})))};class ModelWrapper extends We.Component{onToggle=(s,i)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,i)};render(){let{getComponent:s,getConfigs:i}=this.props;const u=s(\"Model\");let _;return this.props.layoutSelectors&&(_=this.props.layoutSelectors.isShown(this.props.fullPath)),We.createElement(\"div\",{className:\"model-box\"},We.createElement(u,Co()({},this.props,{getConfigs:i,expanded:_,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}function react_immutable_pure_component_es_typeof(s){return react_immutable_pure_component_es_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},react_immutable_pure_component_es_typeof(s)}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function react_immutable_pure_component_es_defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function react_immutable_pure_component_es_ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _possibleConstructorReturn(s,i){return!i||\"object\"!=typeof i&&\"function\"!=typeof i?function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}(s):i}var sC={};function react_immutable_pure_component_es_get(s,i,u){return function isInvalid(s){return null==s}(s)?u:function isMapLike(s){return null!==s&&\"object\"===react_immutable_pure_component_es_typeof(s)&&\"function\"==typeof s.get&&\"function\"==typeof s.has}(s)?s.has(i)?s.get(i):u:hasOwnProperty.call(s,i)?s[i]:u}function react_immutable_pure_component_es_getIn(s,i,u){for(var _=0;_!==i.length;)if((s=react_immutable_pure_component_es_get(s,i[_++],sC))===sC)return u;return s}function check(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},_=function createChecker(s,i){return function(u){if(\"string\"==typeof u)return(0,Xe.is)(i[u],s[u]);if(Array.isArray(u))return(0,Xe.is)(react_immutable_pure_component_es_getIn(i,u),react_immutable_pure_component_es_getIn(s,u));throw new TypeError(\"Invalid key: expected Array or string: \"+u)}}(i,u),w=s||Object.keys(function _objectSpread2(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?react_immutable_pure_component_es_ownKeys(u,!0).forEach((function(i){react_immutable_pure_component_es_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):react_immutable_pure_component_es_ownKeys(u).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}({},u,{},i));return w.every(_)}const iC=function(s){function ImmutablePureComponent(){return function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,ImmutablePureComponent),_possibleConstructorReturn(this,_getPrototypeOf(ImmutablePureComponent).apply(this,arguments))}return function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),i&&_setPrototypeOf(s,i)}(ImmutablePureComponent,s),function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),s}(ImmutablePureComponent,[{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!check(this.updateOnProps,this.props,s,\"updateOnProps\")||!check(this.updateOnStates,this.state,i,\"updateOnStates\")}}]),ImmutablePureComponent}(We.Component);var aC=__webpack_require__(5556),lC=__webpack_require__.n(aC);const decodeRefName=s=>{const i=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(i)}catch{return i}};class Model extends iC{static propTypes={schema:yo().map.isRequired,getComponent:lC().func.isRequired,getConfigs:lC().func.isRequired,specSelectors:lC().object.isRequired,name:lC().string,displayName:lC().string,isRef:lC().bool,required:lC().bool,expandDepth:lC().number,depth:lC().number,specPath:yo().list.isRequired,includeReadOnly:lC().bool,includeWriteOnly:lC().bool};getModelName=s=>-1!==s.indexOf(\"#/definitions/\")?decodeRefName(s.replace(/^.*#\\/definitions\\//,\"\")):-1!==s.indexOf(\"#/components/schemas/\")?decodeRefName(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=s=>{let{specSelectors:i}=this.props;return i.findDefinition(s)};render(){let{getComponent:s,getConfigs:i,specSelectors:u,schema:_,required:w,name:x,isRef:j,specPath:P,displayName:B,includeReadOnly:$,includeWriteOnly:U}=this.props;const Y=s(\"ObjectModel\"),X=s(\"ArrayModel\"),Z=s(\"PrimitiveModel\");let ee=\"object\",ie=_&&_.get(\"$$ref\"),ae=_&&_.get(\"$ref\");if(!x&&ie&&(x=this.getModelName(ie)),ae){x=this.getModelName(ae);const s=this.getRefSchema(x);Xe.Map.isMap(s)?(_=s.set(\"$$ref\",ae),ie=ae):(_=null,x=ae)}if(!_)return We.createElement(\"span\",{className:\"model model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},B||x),!ae&&We.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const le=u.isOAS3()&&_.get(\"deprecated\");switch(j=void 0!==j?j:!!ie,ee=_&&_.get(\"type\")||ee,ee){case\"object\":return We.createElement(Y,Co()({className:\"object\"},this.props,{specPath:P,getConfigs:i,schema:_,name:x,deprecated:le,isRef:j,includeReadOnly:$,includeWriteOnly:U}));case\"array\":return We.createElement(X,Co()({className:\"array\"},this.props,{getConfigs:i,schema:_,name:x,deprecated:le,required:w,includeReadOnly:$,includeWriteOnly:U}));default:return We.createElement(Z,Co()({},this.props,{getComponent:s,getConfigs:i,schema:_,name:x,deprecated:le,required:w}))}}}class Models extends We.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(s,i)=>{const{layoutActions:u}=this.props;u.show([...this.getSchemaBasePath(),s],i),i&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),s])};onLoadModels=s=>{s&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),s)};onLoadModel=s=>{if(s){const i=s.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),i],s)}};render(){let{specSelectors:s,getComponent:i,layoutSelectors:u,layoutActions:_,getConfigs:w}=this.props,x=s.definitions(),{docExpansion:j,defaultModelsExpandDepth:P}=w();if(!x.size||P<0)return null;const B=this.getSchemaBasePath();let $=u.isShown(B,P>0&&\"none\"!==j);const U=s.isOAS3(),Y=i(\"ModelWrapper\"),X=i(\"Collapse\"),Z=i(\"ModelCollapse\"),ee=i(\"JumpToPath\",!0),ie=i(\"ArrowUpIcon\"),ae=i(\"ArrowDownIcon\");return We.createElement(\"section\",{className:$?\"models is-open\":\"models\",ref:this.onLoadModels},We.createElement(\"h4\",null,We.createElement(\"button\",{\"aria-expanded\":$,className:\"models-control\",onClick:()=>_.show(B,!$)},We.createElement(\"span\",null,U?\"Schemas\":\"Models\"),$?We.createElement(ie,null):We.createElement(ae,null))),We.createElement(X,{isOpened:$},x.entrySeq().map((([x])=>{const j=[...B,x],$=Qe().List(j),U=s.specResolvedSubtree(j),X=s.specJson().getIn(j),ie=Xe.Map.isMap(U)?U:Qe().Map(),ae=Xe.Map.isMap(X)?X:Qe().Map(),le=ie.get(\"title\")||ae.get(\"title\")||x,ce=u.isShown(j,!1);ce&&0===ie.size&&ae.size>0&&this.props.specActions.requestResolvedSubtree(j);const pe=We.createElement(Y,{name:x,expandDepth:P,schema:ie||Qe().Map(),displayName:le,fullPath:j,specPath:$,getComponent:i,specSelectors:s,getConfigs:w,layoutSelectors:u,layoutActions:_,includeReadOnly:!0,includeWriteOnly:!0}),de=We.createElement(\"span\",{className:\"model-box\"},We.createElement(\"span\",{className:\"model model-title\"},le));return We.createElement(\"div\",{id:`model-${x}`,className:\"model-container\",key:`models-section-${x}`,\"data-name\":x,ref:this.onLoadModel},We.createElement(\"span\",{className:\"models-jump-to-path\"},We.createElement(ee,{specPath:$})),We.createElement(Z,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(x),onToggle:this.handleToggle,title:de,displayName:le,modelName:x,specPath:$,layoutSelectors:u,layoutActions:_,hideSelfOnExpand:!0,expanded:P>0&&ce},pe))})).toArray()))}}const enum_model=({value:s,getComponent:i})=>{let u=i(\"ModelCollapse\"),_=We.createElement(\"span\",null,\"Array [ \",s.count(),\" ]\");return We.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",We.createElement(\"br\",null),We.createElement(u,{collapsedContent:_},\"[ \",s.join(\", \"),\" ]\"))};class ObjectModel extends We.Component{render(){let{schema:s,name:i,displayName:u,isRef:_,getComponent:w,getConfigs:x,depth:j,onToggle:P,expanded:B,specPath:$,...U}=this.props,{specSelectors:Y,expandDepth:X,includeReadOnly:Z,includeWriteOnly:ee}=U;const{isOAS3:ie}=Y;if(!s)return null;const{showExtensions:ae}=x();let le=s.get(\"description\"),ce=s.get(\"properties\"),pe=s.get(\"additionalProperties\"),de=s.get(\"title\")||u||i,fe=s.get(\"required\"),ye=s.filter(((s,i)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(i))),be=s.get(\"deprecated\"),_e=s.getIn([\"externalDocs\",\"url\"]),we=s.getIn([\"externalDocs\",\"description\"]);const Se=w(\"JumpToPath\",!0),xe=w(\"Markdown\",!0),Pe=w(\"Model\"),Te=w(\"ModelCollapse\"),Re=w(\"Property\"),qe=w(\"Link\"),JumpToPathSection=()=>We.createElement(\"span\",{className:\"model-jump-to-path\"},We.createElement(Se,{specPath:$})),$e=We.createElement(\"span\",null,We.createElement(\"span\",null,\"{\"),\"...\",We.createElement(\"span\",null,\"}\"),_?We.createElement(JumpToPathSection,null):\"\"),ze=Y.isOAS3()?s.get(\"allOf\"):null,He=Y.isOAS3()?s.get(\"anyOf\"):null,Ye=Y.isOAS3()?s.get(\"oneOf\"):null,Qe=Y.isOAS3()?s.get(\"not\"):null,et=de&&We.createElement(\"span\",{className:\"model-title\"},_&&s.get(\"$$ref\")&&We.createElement(\"span\",{className:\"model-hint\"},s.get(\"$$ref\")),We.createElement(\"span\",{className:\"model-title__text\"},de));return We.createElement(\"span\",{className:\"model\"},We.createElement(Te,{modelName:i,title:et,onToggle:P,expanded:!!B||j<=X,collapsedContent:$e},We.createElement(\"span\",{className:\"brace-open object\"},\"{\"),_?We.createElement(JumpToPathSection,null):null,We.createElement(\"span\",{className:\"inner-object\"},We.createElement(\"table\",{className:\"model\"},We.createElement(\"tbody\",null,le?We.createElement(\"tr\",{className:\"description\"},We.createElement(\"td\",null,\"description:\"),We.createElement(\"td\",null,We.createElement(xe,{source:le}))):null,_e&&We.createElement(\"tr\",{className:\"external-docs\"},We.createElement(\"td\",null,\"externalDocs:\"),We.createElement(\"td\",null,We.createElement(qe,{target:\"_blank\",href:sanitizeUrl(_e)},we||_e))),be?We.createElement(\"tr\",{className:\"property\"},We.createElement(\"td\",null,\"deprecated:\"),We.createElement(\"td\",null,\"true\")):null,ce&&ce.size?ce.entrySeq().filter((([,s])=>(!s.get(\"readOnly\")||Z)&&(!s.get(\"writeOnly\")||ee))).map((([s,u])=>{let _=ie()&&u.get(\"deprecated\"),P=Xe.List.isList(fe)&&fe.contains(s),B=[\"property-row\"];return _&&B.push(\"deprecated\"),P&&B.push(\"required\"),We.createElement(\"tr\",{key:s,className:B.join(\" \")},We.createElement(\"td\",null,s,P&&We.createElement(\"span\",{className:\"star\"},\"*\")),We.createElement(\"td\",null,We.createElement(Pe,Co()({key:`object-${i}-${s}_${u}`},U,{required:P,getComponent:w,specPath:$.push(\"properties\",s),getConfigs:x,schema:u,depth:j+1}))))})).toArray():null,ae?We.createElement(\"tr\",null,We.createElement(\"td\",null,\" \")):null,ae?s.entrySeq().map((([s,i])=>{if(\"x-\"!==s.slice(0,2))return;const u=i?i.toJS?i.toJS():i:null;return We.createElement(\"tr\",{key:s,className:\"extension\"},We.createElement(\"td\",null,s),We.createElement(\"td\",null,JSON.stringify(u)))})).toArray():null,pe&&pe.size?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"< * >:\"),We.createElement(\"td\",null,We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"additionalProperties\"),getConfigs:x,schema:pe,depth:j+1})))):null,ze?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"allOf ->\"),We.createElement(\"td\",null,ze.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"allOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,He?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"anyOf ->\"),We.createElement(\"td\",null,He.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"anyOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,Ye?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"oneOf ->\"),We.createElement(\"td\",null,Ye.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"oneOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,Qe?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"not ->\"),We.createElement(\"td\",null,We.createElement(\"div\",null,We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"not\"),getConfigs:x,schema:Qe,depth:j+1}))))):null))),We.createElement(\"span\",{className:\"brace-close\"},\"}\")),ye.size?ye.entrySeq().map((([s,i])=>We.createElement(Re,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:\"property\"}))):null)}}class ArrayModel extends We.Component{render(){let{getComponent:s,getConfigs:i,schema:u,depth:_,expandDepth:w,name:x,displayName:j,specPath:P}=this.props,B=u.get(\"description\"),$=u.get(\"items\"),U=u.get(\"title\")||j||x,Y=u.filter(((s,i)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(i))),X=u.getIn([\"externalDocs\",\"url\"]),Z=u.getIn([\"externalDocs\",\"description\"]);const ee=s(\"Markdown\",!0),ie=s(\"ModelCollapse\"),ae=s(\"Model\"),le=s(\"Property\"),ce=s(\"Link\"),pe=U&&We.createElement(\"span\",{className:\"model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},U));return We.createElement(\"span\",{className:\"model\"},We.createElement(ie,{title:pe,expanded:_<=w,collapsedContent:\"[...]\"},\"[\",Y.size?Y.entrySeq().map((([s,i])=>We.createElement(le,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:\"property\"}))):null,B?We.createElement(ee,{source:B}):Y.size?We.createElement(\"div\",{className:\"markdown\"}):null,X&&We.createElement(\"div\",{className:\"external-docs\"},We.createElement(ce,{target:\"_blank\",href:sanitizeUrl(X)},Z||X)),We.createElement(\"span\",null,We.createElement(ae,Co()({},this.props,{getConfigs:i,specPath:P.push(\"items\"),name:null,schema:$,required:!1,depth:_+1}))),\"]\"))}}const cC=\"property primitive\";class Primitive extends We.Component{render(){let{schema:s,getComponent:i,getConfigs:u,name:_,displayName:w,depth:x,expandDepth:j}=this.props;const{showExtensions:P}=u();if(!s||!s.get)return We.createElement(\"div\",null);let B=s.get(\"type\"),$=s.get(\"format\"),U=s.get(\"xml\"),Y=s.get(\"enum\"),X=s.get(\"title\")||w||_,Z=s.get(\"description\"),ee=getExtensions(s),ie=s.filter(((s,i)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(i))).filterNot(((s,i)=>ee.has(i))),ae=s.getIn([\"externalDocs\",\"url\"]),le=s.getIn([\"externalDocs\",\"description\"]);const ce=i(\"Markdown\",!0),pe=i(\"EnumModel\"),de=i(\"Property\"),fe=i(\"ModelCollapse\"),ye=i(\"Link\"),be=X&&We.createElement(\"span\",{className:\"model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},X));return We.createElement(\"span\",{className:\"model\"},We.createElement(fe,{title:be,expanded:x<=j,collapsedContent:\"[...]\",hideSelfOnExpand:j!==x},We.createElement(\"span\",{className:\"prop\"},_&&x>1&&We.createElement(\"span\",{className:\"prop-name\"},X),We.createElement(\"span\",{className:\"prop-type\"},B),$&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",$,\")\"),ie.size?ie.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:cC}))):null,P&&ee.size?ee.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:cC}))):null,Z?We.createElement(ce,{source:Z}):null,ae&&We.createElement(\"div\",{className:\"external-docs\"},We.createElement(ye,{target:\"_blank\",href:sanitizeUrl(ae)},le||ae)),U&&U.size?We.createElement(\"span\",null,We.createElement(\"br\",null),We.createElement(\"span\",{className:cC},\"xml:\"),U.entrySeq().map((([s,i])=>We.createElement(\"span\",{key:`${s}-${i}`,className:cC},We.createElement(\"br\",null),\"   \",s,\": \",String(i)))).toArray()):null,Y&&We.createElement(pe,{value:Y,getComponent:i}))))}}const property=({propKey:s,propVal:i,propClass:u})=>We.createElement(\"span\",{className:u},We.createElement(\"br\",null),s,\": \",String(i));class TryItOutButton extends We.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:s,onCancelClick:i,onResetClick:u,enabled:_,hasUserEditedBody:w,isOAS3:x}=this.props,j=x&&w;return We.createElement(\"div\",{className:j?\"try-out btn-group\":\"try-out\"},_?We.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:i},\"Cancel\"):We.createElement(\"button\",{className:\"btn try-out__btn\",onClick:s},\"Try it out \"),j&&We.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:u},\"Reset\"))}}class VersionPragmaFilter extends We.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:s,isSwagger2:i,isOAS3:u,alsoShow:_}=this.props;return s?We.createElement(\"div\",null,this.props.children):i&&u?We.createElement(\"div\",{className:\"version-pragma\"},_,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,We.createElement(\"code\",null,\"swagger\"),\" and \",We.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),We.createElement(\"p\",null,\"Supported version fields are \",We.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",We.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\")))):i||u?We.createElement(\"div\",null,this.props.children):We.createElement(\"div\",{className:\"version-pragma\"},_,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),We.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",We.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",We.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\"))))}}const version_stamp=({version:s})=>We.createElement(\"small\",null,We.createElement(\"pre\",{className:\"version\"},\" \",s,\" \")),openapi_version=({oasVersion:s})=>We.createElement(\"small\",{className:\"version-stamp\"},We.createElement(\"pre\",{className:\"version\"},\"OAS \",s)),deep_link=({enabled:s,path:i,text:u})=>We.createElement(\"a\",{className:\"nostyle\",onClick:s?s=>s.preventDefault():null,href:s?`#/${i}`:null},We.createElement(\"span\",null,u)),svg_assets=()=>We.createElement(\"div\",null,We.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},We.createElement(\"defs\",null,We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},We.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},We.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},We.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},We.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},We.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},We.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},We.createElement(\"g\",{transform:\"translate(2, -1)\"},We.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))))));var uC;function decodeEntity(s){return(uC=uC||document.createElement(\"textarea\")).innerHTML=\"&\"+s+\";\",uC.value}var pC=Object.prototype.hasOwnProperty;function index_browser_has(s,i){return!!s&&pC.call(s,i)}function index_browser_assign(s){return[].slice.call(arguments,1).forEach((function(i){if(i){if(\"object\"!=typeof i)throw new TypeError(i+\"must be object\");Object.keys(i).forEach((function(u){s[u]=i[u]}))}})),s}var hC=/\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;function unescapeMd(s){return s.indexOf(\"\\\\\")<0?s:s.replace(hC,\"$1\")}function isValidEntityCode(s){return!(s>=55296&&s<=57343)&&(!(s>=64976&&s<=65007)&&(65535!=(65535&s)&&65534!=(65535&s)&&(!(s>=0&&s<=8)&&(11!==s&&(!(s>=14&&s<=31)&&(!(s>=127&&s<=159)&&!(s>1114111)))))))}function fromCodePoint(s){if(s>65535){var i=55296+((s-=65536)>>10),u=56320+(1023&s);return String.fromCharCode(i,u)}return String.fromCharCode(s)}var dC=/&([a-z#][a-z0-9]{1,31});/gi,fC=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function replaceEntityPattern(s,i){var u=0,_=decodeEntity(i);return i!==_?_:35===i.charCodeAt(0)&&fC.test(i)&&isValidEntityCode(u=\"x\"===i[1].toLowerCase()?parseInt(i.slice(2),16):parseInt(i.slice(1),10))?fromCodePoint(u):s}function replaceEntities(s){return s.indexOf(\"&\")<0?s:s.replace(dC,replaceEntityPattern)}var mC=/[&<>\"]/,gC=/[&<>\"]/g,yC={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\"};function replaceUnsafeChar(s){return yC[s]}function escapeHtml(s){return mC.test(s)?s.replace(gC,replaceUnsafeChar):s}var vC={};function nextToken(s,i){return++i>=s.length-2?i:\"paragraph_open\"===s[i].type&&s[i].tight&&\"inline\"===s[i+1].type&&0===s[i+1].content.length&&\"paragraph_close\"===s[i+2].type&&s[i+2].tight?nextToken(s,i+2):i}vC.blockquote_open=function(){return\"<blockquote>\\n\"},vC.blockquote_close=function(s,i){return\"</blockquote>\"+bC(s,i)},vC.code=function(s,i){return s[i].block?\"<pre><code>\"+escapeHtml(s[i].content)+\"</code></pre>\"+bC(s,i):\"<code>\"+escapeHtml(s[i].content)+\"</code>\"},vC.fence=function(s,i,u,_,w){var x,j,P=s[i],B=\"\",$=u.langPrefix;if(P.params){if(j=(x=P.params.split(/\\s+/g)).join(\" \"),index_browser_has(w.rules.fence_custom,x[0]))return w.rules.fence_custom[x[0]](s,i,u,_,w);B=' class=\"'+$+escapeHtml(replaceEntities(unescapeMd(j)))+'\"'}return\"<pre><code\"+B+\">\"+(u.highlight&&u.highlight.apply(u.highlight,[P.content].concat(x))||escapeHtml(P.content))+\"</code></pre>\"+bC(s,i)},vC.fence_custom={},vC.heading_open=function(s,i){return\"<h\"+s[i].hLevel+\">\"},vC.heading_close=function(s,i){return\"</h\"+s[i].hLevel+\">\\n\"},vC.hr=function(s,i,u){return(u.xhtmlOut?\"<hr />\":\"<hr>\")+bC(s,i)},vC.bullet_list_open=function(){return\"<ul>\\n\"},vC.bullet_list_close=function(s,i){return\"</ul>\"+bC(s,i)},vC.list_item_open=function(){return\"<li>\"},vC.list_item_close=function(){return\"</li>\\n\"},vC.ordered_list_open=function(s,i){var u=s[i];return\"<ol\"+(u.order>1?' start=\"'+u.order+'\"':\"\")+\">\\n\"},vC.ordered_list_close=function(s,i){return\"</ol>\"+bC(s,i)},vC.paragraph_open=function(s,i){return s[i].tight?\"\":\"<p>\"},vC.paragraph_close=function(s,i){var u=!(s[i].tight&&i&&\"inline\"===s[i-1].type&&!s[i-1].content);return(s[i].tight?\"\":\"</p>\")+(u?bC(s,i):\"\")},vC.link_open=function(s,i,u){var _=s[i].title?' title=\"'+escapeHtml(replaceEntities(s[i].title))+'\"':\"\",w=u.linkTarget?' target=\"'+u.linkTarget+'\"':\"\";return'<a href=\"'+escapeHtml(s[i].href)+'\"'+_+w+\">\"},vC.link_close=function(){return\"</a>\"},vC.image=function(s,i,u){var _=' src=\"'+escapeHtml(s[i].src)+'\"',w=s[i].title?' title=\"'+escapeHtml(replaceEntities(s[i].title))+'\"':\"\";return\"<img\"+_+(' alt=\"'+(s[i].alt?escapeHtml(replaceEntities(unescapeMd(s[i].alt))):\"\")+'\"')+w+(u.xhtmlOut?\" /\":\"\")+\">\"},vC.table_open=function(){return\"<table>\\n\"},vC.table_close=function(){return\"</table>\\n\"},vC.thead_open=function(){return\"<thead>\\n\"},vC.thead_close=function(){return\"</thead>\\n\"},vC.tbody_open=function(){return\"<tbody>\\n\"},vC.tbody_close=function(){return\"</tbody>\\n\"},vC.tr_open=function(){return\"<tr>\"},vC.tr_close=function(){return\"</tr>\\n\"},vC.th_open=function(s,i){var u=s[i];return\"<th\"+(u.align?' style=\"text-align:'+u.align+'\"':\"\")+\">\"},vC.th_close=function(){return\"</th>\"},vC.td_open=function(s,i){var u=s[i];return\"<td\"+(u.align?' style=\"text-align:'+u.align+'\"':\"\")+\">\"},vC.td_close=function(){return\"</td>\"},vC.strong_open=function(){return\"<strong>\"},vC.strong_close=function(){return\"</strong>\"},vC.em_open=function(){return\"<em>\"},vC.em_close=function(){return\"</em>\"},vC.del_open=function(){return\"<del>\"},vC.del_close=function(){return\"</del>\"},vC.ins_open=function(){return\"<ins>\"},vC.ins_close=function(){return\"</ins>\"},vC.mark_open=function(){return\"<mark>\"},vC.mark_close=function(){return\"</mark>\"},vC.sub=function(s,i){return\"<sub>\"+escapeHtml(s[i].content)+\"</sub>\"},vC.sup=function(s,i){return\"<sup>\"+escapeHtml(s[i].content)+\"</sup>\"},vC.hardbreak=function(s,i,u){return u.xhtmlOut?\"<br />\\n\":\"<br>\\n\"},vC.softbreak=function(s,i,u){return u.breaks?u.xhtmlOut?\"<br />\\n\":\"<br>\\n\":\"\\n\"},vC.text=function(s,i){return escapeHtml(s[i].content)},vC.htmlblock=function(s,i){return s[i].content},vC.htmltag=function(s,i){return s[i].content},vC.abbr_open=function(s,i){return'<abbr title=\"'+escapeHtml(replaceEntities(s[i].title))+'\">'},vC.abbr_close=function(){return\"</abbr>\"},vC.footnote_ref=function(s,i){var u=Number(s[i].id+1).toString(),_=\"fnref\"+u;return s[i].subId>0&&(_+=\":\"+s[i].subId),'<sup class=\"footnote-ref\"><a href=\"#fn'+u+'\" id=\"'+_+'\">['+u+\"]</a></sup>\"},vC.footnote_block_open=function(s,i,u){return(u.xhtmlOut?'<hr class=\"footnotes-sep\" />\\n':'<hr class=\"footnotes-sep\">\\n')+'<section class=\"footnotes\">\\n<ol class=\"footnotes-list\">\\n'},vC.footnote_block_close=function(){return\"</ol>\\n</section>\\n\"},vC.footnote_open=function(s,i){return'<li id=\"fn'+Number(s[i].id+1).toString()+'\"  class=\"footnote-item\">'},vC.footnote_close=function(){return\"</li>\\n\"},vC.footnote_anchor=function(s,i){var u=\"fnref\"+Number(s[i].id+1).toString();return s[i].subId>0&&(u+=\":\"+s[i].subId),' <a href=\"#'+u+'\" class=\"footnote-backref\">↩</a>'},vC.dl_open=function(){return\"<dl>\\n\"},vC.dt_open=function(){return\"<dt>\"},vC.dd_open=function(){return\"<dd>\"},vC.dl_close=function(){return\"</dl>\\n\"},vC.dt_close=function(){return\"</dt>\\n\"},vC.dd_close=function(){return\"</dd>\\n\"};var bC=vC.getBreak=function getBreak(s,i){return(i=nextToken(s,i))<s.length&&\"list_item_close\"===s[i].type?\"\":\"\\n\"};function Renderer(){this.rules=index_browser_assign({},vC),this.getBreak=vC.getBreak}function Ruler(){this.__rules__=[],this.__cache__=null}function StateInline(s,i,u,_,w){this.src=s,this.env=_,this.options=u,this.parser=i,this.tokens=w,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=\"\",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent=\"\",this.labelUnmatchedScopes=0}function parseLinkLabel(s,i){var u,_,w,x=-1,j=s.posMax,P=s.pos,B=s.isInLabel;if(s.isInLabel)return-1;if(s.labelUnmatchedScopes)return s.labelUnmatchedScopes--,-1;for(s.pos=i+1,s.isInLabel=!0,u=1;s.pos<j;){if(91===(w=s.src.charCodeAt(s.pos)))u++;else if(93===w&&0===--u){_=!0;break}s.parser.skipToken(s)}return _?(x=s.pos,s.labelUnmatchedScopes=0):s.labelUnmatchedScopes=u-1,s.pos=P,s.isInLabel=B,x}function parseAbbr(s,i,u,_){var w,x,j,P,B,$;if(42!==s.charCodeAt(0))return-1;if(91!==s.charCodeAt(1))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((x=parseLinkLabel(w=new StateInline(s,i,u,_,[]),1))<0||58!==s.charCodeAt(x+1))return-1;for(P=w.posMax,j=x+2;j<P&&10!==w.src.charCodeAt(j);j++);return B=s.slice(2,x),0===($=s.slice(x+2,j).trim()).length?-1:(_.abbreviations||(_.abbreviations={}),void 0===_.abbreviations[\":\"+B]&&(_.abbreviations[\":\"+B]=$),j)}function normalizeLink(s){var i=replaceEntities(s);try{i=decodeURI(i)}catch(s){}return encodeURI(i)}function parseLinkDestination(s,i){var u,_,w,x=i,j=s.posMax;if(60===s.src.charCodeAt(i)){for(i++;i<j;){if(10===(u=s.src.charCodeAt(i)))return!1;if(62===u)return w=normalizeLink(unescapeMd(s.src.slice(x+1,i))),!!s.parser.validateLink(w)&&(s.pos=i+1,s.linkContent=w,!0);92===u&&i+1<j?i+=2:i++}return!1}for(_=0;i<j&&32!==(u=s.src.charCodeAt(i))&&!(u<32||127===u);)if(92===u&&i+1<j)i+=2;else{if(40===u&&++_>1)break;if(41===u&&--_<0)break;i++}return x!==i&&(w=unescapeMd(s.src.slice(x,i)),!!s.parser.validateLink(w)&&(s.linkContent=w,s.pos=i,!0))}function parseLinkTitle(s,i){var u,_=i,w=s.posMax,x=s.src.charCodeAt(i);if(34!==x&&39!==x&&40!==x)return!1;for(i++,40===x&&(x=41);i<w;){if((u=s.src.charCodeAt(i))===x)return s.pos=i+1,s.linkContent=unescapeMd(s.src.slice(_+1,i)),!0;92===u&&i+1<w?i+=2:i++}return!1}function normalizeReference(s){return s.trim().replace(/\\s+/g,\" \").toUpperCase()}function parseReference(s,i,u,_){var w,x,j,P,B,$,U,Y,X;if(91!==s.charCodeAt(0))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((x=parseLinkLabel(w=new StateInline(s,i,u,_,[]),0))<0||58!==s.charCodeAt(x+1))return-1;for(P=w.posMax,j=x+2;j<P&&(32===(B=w.src.charCodeAt(j))||10===B);j++);if(!parseLinkDestination(w,j))return-1;for(U=w.linkContent,$=j=w.pos,j+=1;j<P&&(32===(B=w.src.charCodeAt(j))||10===B);j++);for(j<P&&$!==j&&parseLinkTitle(w,j)?(Y=w.linkContent,j=w.pos):(Y=\"\",j=$);j<P&&32===w.src.charCodeAt(j);)j++;return j<P&&10!==w.src.charCodeAt(j)?-1:(X=normalizeReference(s.slice(1,x)),void 0===_.references[X]&&(_.references[X]={title:Y,href:U}),j)}Renderer.prototype.renderInline=function(s,i,u){for(var _=this.rules,w=s.length,x=0,j=\"\";w--;)j+=_[s[x].type](s,x++,i,u,this);return j},Renderer.prototype.render=function(s,i,u){for(var _=this.rules,w=s.length,x=-1,j=\"\";++x<w;)\"inline\"===s[x].type?j+=this.renderInline(s[x].children,i,u):j+=_[s[x].type](s,x,i,u,this);return j},Ruler.prototype.__find__=function(s){for(var i=this.__rules__.length,u=-1;i--;)if(this.__rules__[++u].name===s)return u;return-1},Ruler.prototype.__compile__=function(){var s=this,i=[\"\"];s.__rules__.forEach((function(s){s.enabled&&s.alt.forEach((function(s){i.indexOf(s)<0&&i.push(s)}))})),s.__cache__={},i.forEach((function(i){s.__cache__[i]=[],s.__rules__.forEach((function(u){u.enabled&&(i&&u.alt.indexOf(i)<0||s.__cache__[i].push(u.fn))}))}))},Ruler.prototype.at=function(s,i,u){var _=this.__find__(s),w=u||{};if(-1===_)throw new Error(\"Parser rule not found: \"+s);this.__rules__[_].fn=i,this.__rules__[_].alt=w.alt||[],this.__cache__=null},Ruler.prototype.before=function(s,i,u,_){var w=this.__find__(s),x=_||{};if(-1===w)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(w,0,{name:i,enabled:!0,fn:u,alt:x.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(s,i,u,_){var w=this.__find__(s),x=_||{};if(-1===w)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(w+1,0,{name:i,enabled:!0,fn:u,alt:x.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(s,i,u){var _=u||{};this.__rules__.push({name:s,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(s,i){s=Array.isArray(s)?s:[s],i&&this.__rules__.forEach((function(s){s.enabled=!1})),s.forEach((function(s){var i=this.__find__(s);if(i<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[i].enabled=!0}),this),this.__cache__=null},Ruler.prototype.disable=function(s){(s=Array.isArray(s)?s:[s]).forEach((function(s){var i=this.__find__(s);if(i<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[i].enabled=!1}),this),this.__cache__=null},Ruler.prototype.getRules=function(s){return null===this.__cache__&&this.__compile__(),this.__cache__[s]||[]},StateInline.prototype.pushPending=function(){this.tokens.push({type:\"text\",content:this.pending,level:this.pendingLevel}),this.pending=\"\"},StateInline.prototype.push=function(s){this.pending&&this.pushPending(),this.tokens.push(s),this.pendingLevel=this.level},StateInline.prototype.cacheSet=function(s,i){for(var u=this.cache.length;u<=s;u++)this.cache.push(0);this.cache[s]=i},StateInline.prototype.cacheGet=function(s){return s<this.cache.length?this.cache[s]:0};var _C=\" \\n()[]'\\\".,!?-\";function regEscape(s){return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,\"\\\\$1\")}var EC=/\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/,wC=/\\((c|tm|r|p)\\)/gi,SC={c:\"©\",r:\"®\",p:\"§\",tm:\"™\"};function replaceScopedAbbr(s){return s.indexOf(\"(\")<0?s:s.replace(wC,(function(s,i){return SC[i.toLowerCase()]}))}var xC=/['\"]/,kC=/['\"]/g,OC=/[-\\s()\\[\\]]/;function isLetter(s,i){return!(i<0||i>=s.length)&&!OC.test(s[i])}function replaceAt(s,i,u){return s.substr(0,i)+u+s.substr(i+1)}var CC=[[\"block\",function block(s){s.inlineMode?s.tokens.push({type:\"inline\",content:s.src.replace(/\\n/g,\" \").trim(),level:0,lines:[0,1],children:[]}):s.block.parse(s.src,s.options,s.env,s.tokens)}],[\"abbr\",function abbr(s){var i,u,_,w,x=s.tokens;if(!s.inlineMode)for(i=1,u=x.length-1;i<u;i++)if(\"paragraph_open\"===x[i-1].type&&\"inline\"===x[i].type&&\"paragraph_close\"===x[i+1].type){for(_=x[i].content;_.length&&!((w=parseAbbr(_,s.inline,s.options,s.env))<0);)_=_.slice(w).trim();x[i].content=_,_.length||(x[i-1].tight=!0,x[i+1].tight=!0)}}],[\"references\",function references(s){var i,u,_,w,x=s.tokens;if(s.env.references=s.env.references||{},!s.inlineMode)for(i=1,u=x.length-1;i<u;i++)if(\"inline\"===x[i].type&&\"paragraph_open\"===x[i-1].type&&\"paragraph_close\"===x[i+1].type){for(_=x[i].content;_.length&&!((w=parseReference(_,s.inline,s.options,s.env))<0);)_=_.slice(w).trim();x[i].content=_,_.length||(x[i-1].tight=!0,x[i+1].tight=!0)}}],[\"inline\",function inline(s){var i,u,_,w=s.tokens;for(u=0,_=w.length;u<_;u++)\"inline\"===(i=w[u]).type&&s.inline.parse(i.content,s.options,s.env,i.children)}],[\"footnote_tail\",function footnote_block(s){var i,u,_,w,x,j,P,B,$,U=0,Y=!1,X={};if(s.env.footnotes&&(s.tokens=s.tokens.filter((function(s){return\"footnote_reference_open\"===s.type?(Y=!0,B=[],$=s.label,!1):\"footnote_reference_close\"===s.type?(Y=!1,X[\":\"+$]=B,!1):(Y&&B.push(s),!Y)})),s.env.footnotes.list)){for(j=s.env.footnotes.list,s.tokens.push({type:\"footnote_block_open\",level:U++}),i=0,u=j.length;i<u;i++){for(s.tokens.push({type:\"footnote_open\",id:i,level:U++}),j[i].tokens?((P=[]).push({type:\"paragraph_open\",tight:!1,level:U++}),P.push({type:\"inline\",content:\"\",level:U,children:j[i].tokens}),P.push({type:\"paragraph_close\",tight:!1,level:--U})):j[i].label&&(P=X[\":\"+j[i].label]),s.tokens=s.tokens.concat(P),x=\"paragraph_close\"===s.tokens[s.tokens.length-1].type?s.tokens.pop():null,w=j[i].count>0?j[i].count:1,_=0;_<w;_++)s.tokens.push({type:\"footnote_anchor\",id:i,subId:_,level:U});x&&s.tokens.push(x),s.tokens.push({type:\"footnote_close\",level:--U})}s.tokens.push({type:\"footnote_block_close\",level:--U})}}],[\"abbr2\",function abbr2(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z=s.tokens;if(s.env.abbreviations)for(s.env.abbrRegExp||(X=\"(^|[\"+_C.split(\"\").map(regEscape).join(\"\")+\"])(\"+Object.keys(s.env.abbreviations).map((function(s){return s.substr(1)})).sort((function(s,i){return i.length-s.length})).map(regEscape).join(\"|\")+\")($|[\"+_C.split(\"\").map(regEscape).join(\"\")+\"])\",s.env.abbrRegExp=new RegExp(X,\"g\")),U=s.env.abbrRegExp,u=0,_=Z.length;u<_;u++)if(\"inline\"===Z[u].type)for(i=(w=Z[u].children).length-1;i>=0;i--)if(\"text\"===(x=w[i]).type){for(B=0,j=x.content,U.lastIndex=0,$=x.level,P=[];Y=U.exec(j);)U.lastIndex>B&&P.push({type:\"text\",content:j.slice(B,Y.index+Y[1].length),level:$}),P.push({type:\"abbr_open\",title:s.env.abbreviations[\":\"+Y[2]],level:$++}),P.push({type:\"text\",content:Y[2],level:$}),P.push({type:\"abbr_close\",level:--$}),B=U.lastIndex-Y[3].length;P.length&&(B<j.length&&P.push({type:\"text\",content:j.slice(B),level:$}),Z[u].children=w=[].concat(w.slice(0,i),P,w.slice(i+1)))}}],[\"replacements\",function index_browser_replace(s){var i,u,_,w,x;if(s.options.typographer)for(x=s.tokens.length-1;x>=0;x--)if(\"inline\"===s.tokens[x].type)for(i=(w=s.tokens[x].children).length-1;i>=0;i--)\"text\"===(u=w[i]).type&&(_=replaceScopedAbbr(_=u.content),EC.test(_)&&(_=_.replace(/\\+-/g,\"±\").replace(/\\.{2,}/g,\"…\").replace(/([?!])…/g,\"$1..\").replace(/([?!]){4,}/g,\"$1$1$1\").replace(/,{2,}/g,\",\").replace(/(^|[^-])---([^-]|$)/gm,\"$1—$2\").replace(/(^|\\s)--(\\s|$)/gm,\"$1–$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/gm,\"$1–$2\")),u.content=_)}],[\"smartquotes\",function smartquotes(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le;if(s.options.typographer)for(le=[],ie=s.tokens.length-1;ie>=0;ie--)if(\"inline\"===s.tokens[ie].type)for(ae=s.tokens[ie].children,le.length=0,i=0;i<ae.length;i++)if(\"text\"===(u=ae[i]).type&&!xC.test(u.text)){for(P=ae[i].level,Z=le.length-1;Z>=0&&!(le[Z].level<=P);Z--);le.length=Z+1,x=0,j=(_=u.content).length;e:for(;x<j&&(kC.lastIndex=x,w=kC.exec(_));)if(B=!isLetter(_,w.index-1),x=w.index+1,ee=\"'\"===w[0],($=!isLetter(_,x))||B){if(Y=!$,X=!B)for(Z=le.length-1;Z>=0&&(U=le[Z],!(le[Z].level<P));Z--)if(U.single===ee&&le[Z].level===P){U=le[Z],ee?(ae[U.token].content=replaceAt(ae[U.token].content,U.pos,s.options.quotes[2]),u.content=replaceAt(u.content,w.index,s.options.quotes[3])):(ae[U.token].content=replaceAt(ae[U.token].content,U.pos,s.options.quotes[0]),u.content=replaceAt(u.content,w.index,s.options.quotes[1])),le.length=Z;continue e}Y?le.push({token:i,pos:w.index,single:ee,level:P}):X&&ee&&(u.content=replaceAt(u.content,w.index,\"’\"))}else ee&&(u.content=replaceAt(u.content,w.index,\"’\"))}}]];function Core(){this.options={},this.ruler=new Ruler;for(var s=0;s<CC.length;s++)this.ruler.push(CC[s][0],CC[s][1])}function StateBlock(s,i,u,_,w){var x,j,P,B,$,U,Y;for(this.src=s,this.parser=i,this.options=u,this.env=_,this.tokens=w,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType=\"root\",this.ddIndent=-1,this.level=0,this.result=\"\",U=0,Y=!1,P=B=U=0,$=(j=this.src).length;B<$;B++){if(x=j.charCodeAt(B),!Y){if(32===x){U++;continue}Y=!0}10!==x&&B!==$-1||(10!==x&&B++,this.bMarks.push(P),this.eMarks.push(B),this.tShift.push(U),Y=!1,U=0,P=B+1)}this.bMarks.push(j.length),this.eMarks.push(j.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}function skipBulletListMarker(s,i){var u,_,w;return(_=s.bMarks[i]+s.tShift[i])>=(w=s.eMarks[i])||42!==(u=s.src.charCodeAt(_++))&&45!==u&&43!==u||_<w&&32!==s.src.charCodeAt(_)?-1:_}function skipOrderedListMarker(s,i){var u,_=s.bMarks[i]+s.tShift[i],w=s.eMarks[i];if(_+1>=w)return-1;if((u=s.src.charCodeAt(_++))<48||u>57)return-1;for(;;){if(_>=w)return-1;if(!((u=s.src.charCodeAt(_++))>=48&&u<=57)){if(41===u||46===u)break;return-1}}return _<w&&32!==s.src.charCodeAt(_)?-1:_}Core.prototype.process=function(s){var i,u,_;for(i=0,u=(_=this.ruler.getRules(\"\")).length;i<u;i++)_[i](s)},StateBlock.prototype.isEmpty=function isEmpty(s){return this.bMarks[s]+this.tShift[s]>=this.eMarks[s]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(s){for(var i=this.lineMax;s<i&&!(this.bMarks[s]+this.tShift[s]<this.eMarks[s]);s++);return s},StateBlock.prototype.skipSpaces=function skipSpaces(s){for(var i=this.src.length;s<i&&32===this.src.charCodeAt(s);s++);return s},StateBlock.prototype.skipChars=function skipChars(s,i){for(var u=this.src.length;s<u&&this.src.charCodeAt(s)===i;s++);return s},StateBlock.prototype.skipCharsBack=function skipCharsBack(s,i,u){if(s<=u)return s;for(;s>u;)if(i!==this.src.charCodeAt(--s))return s+1;return s},StateBlock.prototype.getLines=function getLines(s,i,u,_){var w,x,j,P,B,$=s;if(s>=i)return\"\";if($+1===i)return x=this.bMarks[$]+Math.min(this.tShift[$],u),j=_?this.eMarks[$]+1:this.eMarks[$],this.src.slice(x,j);for(P=new Array(i-s),w=0;$<i;$++,w++)(B=this.tShift[$])>u&&(B=u),B<0&&(B=0),x=this.bMarks[$]+B,j=$+1<i||_?this.eMarks[$]+1:this.eMarks[$],P[w]=this.src.slice(x,j);return P.join(\"\")};var AC={};[\"article\",\"aside\",\"button\",\"blockquote\",\"body\",\"canvas\",\"caption\",\"col\",\"colgroup\",\"dd\",\"div\",\"dl\",\"dt\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"iframe\",\"li\",\"map\",\"object\",\"ol\",\"output\",\"p\",\"pre\",\"progress\",\"script\",\"section\",\"style\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"tr\",\"thead\",\"ul\",\"video\"].forEach((function(s){AC[s]=!0}));var jC=/^<([a-zA-Z]{1,15})[\\s\\/>]/,PC=/^<\\/([a-zA-Z]{1,15})[\\s>]/;function index_browser_getLine(s,i){var u=s.bMarks[i]+s.blkIndent,_=s.eMarks[i];return s.src.substr(u,_-u)}function skipMarker(s,i){var u,_,w=s.bMarks[i]+s.tShift[i],x=s.eMarks[i];return w>=x||126!==(_=s.src.charCodeAt(w++))&&58!==_||w===(u=s.skipSpaces(w))||u>=x?-1:u}var IC=[[\"code\",function code(s,i,u){var _,w;if(s.tShift[i]-s.blkIndent<4)return!1;for(w=_=i+1;_<u;)if(s.isEmpty(_))_++;else{if(!(s.tShift[_]-s.blkIndent>=4))break;w=++_}return s.line=_,s.tokens.push({type:\"code\",content:s.getLines(i,w,4+s.blkIndent,!0),block:!0,lines:[i,s.line],level:s.level}),!0}],[\"fences\",function fences(s,i,u,_){var w,x,j,P,B,$=!1,U=s.bMarks[i]+s.tShift[i],Y=s.eMarks[i];if(U+3>Y)return!1;if(126!==(w=s.src.charCodeAt(U))&&96!==w)return!1;if(B=U,(x=(U=s.skipChars(U,w))-B)<3)return!1;if((j=s.src.slice(U,Y).trim()).indexOf(\"`\")>=0)return!1;if(_)return!0;for(P=i;!(++P>=u)&&!((U=B=s.bMarks[P]+s.tShift[P])<(Y=s.eMarks[P])&&s.tShift[P]<s.blkIndent);)if(s.src.charCodeAt(U)===w&&!(s.tShift[P]-s.blkIndent>=4||(U=s.skipChars(U,w))-B<x||(U=s.skipSpaces(U))<Y)){$=!0;break}return x=s.tShift[i],s.line=P+($?1:0),s.tokens.push({type:\"fence\",params:j,content:s.getLines(i+1,P,x,!0),lines:[i,s.line],level:s.level}),!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"blockquote\",function blockquote(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie=s.bMarks[i]+s.tShift[i],ae=s.eMarks[i];if(ie>ae)return!1;if(62!==s.src.charCodeAt(ie++))return!1;if(s.level>=s.options.maxNesting)return!1;if(_)return!0;for(32===s.src.charCodeAt(ie)&&ie++,B=s.blkIndent,s.blkIndent=0,P=[s.bMarks[i]],s.bMarks[i]=ie,x=(ie=ie<ae?s.skipSpaces(ie):ie)>=ae,j=[s.tShift[i]],s.tShift[i]=ie-s.bMarks[i],Y=s.parser.ruler.getRules(\"blockquote\"),w=i+1;w<u&&!((ie=s.bMarks[w]+s.tShift[w])>=(ae=s.eMarks[w]));w++)if(62!==s.src.charCodeAt(ie++)){if(x)break;for(ee=!1,X=0,Z=Y.length;X<Z;X++)if(Y[X](s,w,u,!0)){ee=!0;break}if(ee)break;P.push(s.bMarks[w]),j.push(s.tShift[w]),s.tShift[w]=-1337}else 32===s.src.charCodeAt(ie)&&ie++,P.push(s.bMarks[w]),s.bMarks[w]=ie,x=(ie=ie<ae?s.skipSpaces(ie):ie)>=ae,j.push(s.tShift[w]),s.tShift[w]=ie-s.bMarks[w];for($=s.parentType,s.parentType=\"blockquote\",s.tokens.push({type:\"blockquote_open\",lines:U=[i,0],level:s.level++}),s.parser.tokenize(s,i,w),s.tokens.push({type:\"blockquote_close\",level:--s.level}),s.parentType=$,U[1]=s.line,X=0;X<j.length;X++)s.bMarks[X+i]=P[X],s.tShift[X+i]=j[X];return s.blkIndent=B,!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"hr\",function hr(s,i,u,_){var w,x,j,P=s.bMarks[i],B=s.eMarks[i];if((P+=s.tShift[i])>B)return!1;if(42!==(w=s.src.charCodeAt(P++))&&45!==w&&95!==w)return!1;for(x=1;P<B;){if((j=s.src.charCodeAt(P++))!==w&&32!==j)return!1;j===w&&x++}return!(x<3)&&(_||(s.line=i+1,s.tokens.push({type:\"hr\",lines:[i,s.line],level:s.level})),!0)},[\"paragraph\",\"blockquote\",\"list\"]],[\"list\",function index_browser_list(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le,ce,pe,de,fe,ye,be,_e,we=!0;if((Y=skipOrderedListMarker(s,i))>=0)ie=!0;else{if(!((Y=skipBulletListMarker(s,i))>=0))return!1;ie=!1}if(s.level>=s.options.maxNesting)return!1;if(ee=s.src.charCodeAt(Y-1),_)return!0;for(le=s.tokens.length,ie?(U=s.bMarks[i]+s.tShift[i],Z=Number(s.src.substr(U,Y-U-1)),s.tokens.push({type:\"ordered_list_open\",order:Z,lines:pe=[i,0],level:s.level++})):s.tokens.push({type:\"bullet_list_open\",lines:pe=[i,0],level:s.level++}),w=i,ce=!1,fe=s.parser.ruler.getRules(\"list\");!(!(w<u)||((X=(ae=s.skipSpaces(Y))>=s.eMarks[w]?1:ae-Y)>4&&(X=1),X<1&&(X=1),x=Y-s.bMarks[w]+X,s.tokens.push({type:\"list_item_open\",lines:de=[i,0],level:s.level++}),P=s.blkIndent,B=s.tight,j=s.tShift[i],$=s.parentType,s.tShift[i]=ae-s.bMarks[i],s.blkIndent=x,s.tight=!0,s.parentType=\"list\",s.parser.tokenize(s,i,u,!0),s.tight&&!ce||(we=!1),ce=s.line-i>1&&s.isEmpty(s.line-1),s.blkIndent=P,s.tShift[i]=j,s.tight=B,s.parentType=$,s.tokens.push({type:\"list_item_close\",level:--s.level}),w=i=s.line,de[1]=w,ae=s.bMarks[i],w>=u)||s.isEmpty(w)||s.tShift[w]<s.blkIndent);){for(_e=!1,ye=0,be=fe.length;ye<be;ye++)if(fe[ye](s,w,u,!0)){_e=!0;break}if(_e)break;if(ie){if((Y=skipOrderedListMarker(s,w))<0)break}else if((Y=skipBulletListMarker(s,w))<0)break;if(ee!==s.src.charCodeAt(Y-1))break}return s.tokens.push({type:ie?\"ordered_list_close\":\"bullet_list_close\",level:--s.level}),pe[1]=w,s.line=w,we&&function markTightParagraphs(s,i){var u,_,w=s.level+2;for(u=i+2,_=s.tokens.length-2;u<_;u++)s.tokens[u].level===w&&\"paragraph_open\"===s.tokens[u].type&&(s.tokens[u+2].tight=!0,s.tokens[u].tight=!0,u+=2)}(s,le),!0},[\"paragraph\",\"blockquote\"]],[\"footnote\",function footnote(s,i,u,_){var w,x,j,P,B,$=s.bMarks[i]+s.tShift[i],U=s.eMarks[i];if($+4>U)return!1;if(91!==s.src.charCodeAt($))return!1;if(94!==s.src.charCodeAt($+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(P=$+2;P<U;P++){if(32===s.src.charCodeAt(P))return!1;if(93===s.src.charCodeAt(P))break}return P!==$+2&&(!(P+1>=U||58!==s.src.charCodeAt(++P))&&(_||(P++,s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.refs||(s.env.footnotes.refs={}),B=s.src.slice($+2,P-2),s.env.footnotes.refs[\":\"+B]=-1,s.tokens.push({type:\"footnote_reference_open\",label:B,level:s.level++}),w=s.bMarks[i],x=s.tShift[i],j=s.parentType,s.tShift[i]=s.skipSpaces(P)-P,s.bMarks[i]=P,s.blkIndent+=4,s.parentType=\"footnote\",s.tShift[i]<s.blkIndent&&(s.tShift[i]+=s.blkIndent,s.bMarks[i]-=s.blkIndent),s.parser.tokenize(s,i,u,!0),s.parentType=j,s.blkIndent-=4,s.tShift[i]=x,s.bMarks[i]=w,s.tokens.push({type:\"footnote_reference_close\",level:--s.level})),!0))},[\"paragraph\"]],[\"heading\",function heading(s,i,u,_){var w,x,j,P=s.bMarks[i]+s.tShift[i],B=s.eMarks[i];if(P>=B)return!1;if(35!==(w=s.src.charCodeAt(P))||P>=B)return!1;for(x=1,w=s.src.charCodeAt(++P);35===w&&P<B&&x<=6;)x++,w=s.src.charCodeAt(++P);return!(x>6||P<B&&32!==w)&&(_||(B=s.skipCharsBack(B,32,P),(j=s.skipCharsBack(B,35,P))>P&&32===s.src.charCodeAt(j-1)&&(B=j),s.line=i+1,s.tokens.push({type:\"heading_open\",hLevel:x,lines:[i,s.line],level:s.level}),P<B&&s.tokens.push({type:\"inline\",content:s.src.slice(P,B).trim(),level:s.level+1,lines:[i,s.line],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:x,level:s.level})),!0)},[\"paragraph\",\"blockquote\"]],[\"lheading\",function lheading(s,i,u){var _,w,x,j=i+1;return!(j>=u)&&(!(s.tShift[j]<s.blkIndent)&&(!(s.tShift[j]-s.blkIndent>3)&&(!((w=s.bMarks[j]+s.tShift[j])>=(x=s.eMarks[j]))&&((45===(_=s.src.charCodeAt(w))||61===_)&&(w=s.skipChars(w,_),!((w=s.skipSpaces(w))<x)&&(w=s.bMarks[i]+s.tShift[i],s.line=j+1,s.tokens.push({type:\"heading_open\",hLevel:61===_?1:2,lines:[i,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:s.src.slice(w,s.eMarks[i]).trim(),level:s.level+1,lines:[i,s.line-1],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:61===_?1:2,level:s.level}),!0))))))}],[\"htmlblock\",function htmlblock(s,i,u,_){var w,x,j,P=s.bMarks[i],B=s.eMarks[i],$=s.tShift[i];if(P+=$,!s.options.html)return!1;if($>3||P+2>=B)return!1;if(60!==s.src.charCodeAt(P))return!1;if(33===(w=s.src.charCodeAt(P+1))||63===w){if(_)return!0}else{if(47!==w&&!function isLetter$1(s){var i=32|s;return i>=97&&i<=122}(w))return!1;if(47===w){if(!(x=s.src.slice(P,B).match(PC)))return!1}else if(!(x=s.src.slice(P,B).match(jC)))return!1;if(!0!==AC[x[1].toLowerCase()])return!1;if(_)return!0}for(j=i+1;j<s.lineMax&&!s.isEmpty(j);)j++;return s.line=j,s.tokens.push({type:\"htmlblock\",level:s.level,lines:[i,s.line],content:s.getLines(i,j,0,!0)}),!0},[\"paragraph\",\"blockquote\"]],[\"table\",function table(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee;if(i+2>u)return!1;if(B=i+1,s.tShift[B]<s.blkIndent)return!1;if((j=s.bMarks[B]+s.tShift[B])>=s.eMarks[B])return!1;if(124!==(w=s.src.charCodeAt(j))&&45!==w&&58!==w)return!1;if(x=index_browser_getLine(s,i+1),!/^[-:| ]+$/.test(x))return!1;if(($=x.split(\"|\"))<=2)return!1;for(Y=[],P=0;P<$.length;P++){if(!(X=$[P].trim())){if(0===P||P===$.length-1)continue;return!1}if(!/^:?-+:?$/.test(X))return!1;58===X.charCodeAt(X.length-1)?Y.push(58===X.charCodeAt(0)?\"center\":\"right\"):58===X.charCodeAt(0)?Y.push(\"left\"):Y.push(\"\")}if(-1===(x=index_browser_getLine(s,i).trim()).indexOf(\"|\"))return!1;if($=x.replace(/^\\||\\|$/g,\"\").split(\"|\"),Y.length!==$.length)return!1;if(_)return!0;for(s.tokens.push({type:\"table_open\",lines:Z=[i,0],level:s.level++}),s.tokens.push({type:\"thead_open\",lines:[i,i+1],level:s.level++}),s.tokens.push({type:\"tr_open\",lines:[i,i+1],level:s.level++}),P=0;P<$.length;P++)s.tokens.push({type:\"th_open\",align:Y[P],lines:[i,i+1],level:s.level++}),s.tokens.push({type:\"inline\",content:$[P].trim(),lines:[i,i+1],level:s.level,children:[]}),s.tokens.push({type:\"th_close\",level:--s.level});for(s.tokens.push({type:\"tr_close\",level:--s.level}),s.tokens.push({type:\"thead_close\",level:--s.level}),s.tokens.push({type:\"tbody_open\",lines:ee=[i+2,0],level:s.level++}),B=i+2;B<u&&!(s.tShift[B]<s.blkIndent)&&-1!==(x=index_browser_getLine(s,B).trim()).indexOf(\"|\");B++){for($=x.replace(/^\\||\\|$/g,\"\").split(\"|\"),s.tokens.push({type:\"tr_open\",level:s.level++}),P=0;P<$.length;P++)s.tokens.push({type:\"td_open\",align:Y[P],level:s.level++}),U=$[P].substring(124===$[P].charCodeAt(0)?1:0,124===$[P].charCodeAt($[P].length-1)?$[P].length-1:$[P].length).trim(),s.tokens.push({type:\"inline\",content:U,level:s.level,children:[]}),s.tokens.push({type:\"td_close\",level:--s.level});s.tokens.push({type:\"tr_close\",level:--s.level})}return s.tokens.push({type:\"tbody_close\",level:--s.level}),s.tokens.push({type:\"table_close\",level:--s.level}),Z[1]=ee[1]=B,s.line=B,!0},[\"paragraph\"]],[\"deflist\",function deflist(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le;if(_)return!(s.ddIndent<0)&&skipMarker(s,i)>=0;if(U=i+1,s.isEmpty(U)&&++U>u)return!1;if(s.tShift[U]<s.blkIndent)return!1;if((w=skipMarker(s,U))<0)return!1;if(s.level>=s.options.maxNesting)return!1;$=s.tokens.length,s.tokens.push({type:\"dl_open\",lines:B=[i,0],level:s.level++}),j=i,x=U;e:for(;;){for(le=!0,ae=!1,s.tokens.push({type:\"dt_open\",lines:[j,j],level:s.level++}),s.tokens.push({type:\"inline\",content:s.getLines(j,j+1,s.blkIndent,!1).trim(),level:s.level+1,lines:[j,j],children:[]}),s.tokens.push({type:\"dt_close\",level:--s.level});;){if(s.tokens.push({type:\"dd_open\",lines:P=[U,0],level:s.level++}),ie=s.tight,X=s.ddIndent,Y=s.blkIndent,ee=s.tShift[x],Z=s.parentType,s.blkIndent=s.ddIndent=s.tShift[x]+2,s.tShift[x]=w-s.bMarks[x],s.tight=!0,s.parentType=\"deflist\",s.parser.tokenize(s,x,u,!0),s.tight&&!ae||(le=!1),ae=s.line-x>1&&s.isEmpty(s.line-1),s.tShift[x]=ee,s.tight=ie,s.parentType=Z,s.blkIndent=Y,s.ddIndent=X,s.tokens.push({type:\"dd_close\",level:--s.level}),P[1]=U=s.line,U>=u)break e;if(s.tShift[U]<s.blkIndent)break e;if((w=skipMarker(s,U))<0)break;x=U}if(U>=u)break;if(j=U,s.isEmpty(j))break;if(s.tShift[j]<s.blkIndent)break;if((x=j+1)>=u)break;if(s.isEmpty(x)&&x++,x>=u)break;if(s.tShift[x]<s.blkIndent)break;if((w=skipMarker(s,x))<0)break}return s.tokens.push({type:\"dl_close\",level:--s.level}),B[1]=U,s.line=U,le&&function markTightParagraphs$1(s,i){var u,_,w=s.level+2;for(u=i+2,_=s.tokens.length-2;u<_;u++)s.tokens[u].level===w&&\"paragraph_open\"===s.tokens[u].type&&(s.tokens[u+2].tight=!0,s.tokens[u].tight=!0,u+=2)}(s,$),!0},[\"paragraph\"]],[\"paragraph\",function paragraph(s,i){var u,_,w,x,j,P,B=i+1;if(B<(u=s.lineMax)&&!s.isEmpty(B))for(P=s.parser.ruler.getRules(\"paragraph\");B<u&&!s.isEmpty(B);B++)if(!(s.tShift[B]-s.blkIndent>3)){for(w=!1,x=0,j=P.length;x<j;x++)if(P[x](s,B,u,!0)){w=!0;break}if(w)break}return _=s.getLines(i,B,s.blkIndent,!1).trim(),s.line=B,_.length&&(s.tokens.push({type:\"paragraph_open\",tight:!1,lines:[i,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:_,level:s.level+1,lines:[i,s.line],children:[]}),s.tokens.push({type:\"paragraph_close\",tight:!1,level:s.level})),!0}]];function ParserBlock(){this.ruler=new Ruler;for(var s=0;s<IC.length;s++)this.ruler.push(IC[s][0],IC[s][1],{alt:(IC[s][2]||[]).slice()})}ParserBlock.prototype.tokenize=function(s,i,u){for(var _,w=this.ruler.getRules(\"\"),x=w.length,j=i,P=!1;j<u&&(s.line=j=s.skipEmptyLines(j),!(j>=u))&&!(s.tShift[j]<s.blkIndent);){for(_=0;_<x&&!w[_](s,j,u,!1);_++);if(s.tight=!P,s.isEmpty(s.line-1)&&(P=!0),(j=s.line)<u&&s.isEmpty(j)){if(P=!0,++j<u&&\"list\"===s.parentType&&s.isEmpty(j))break;s.line=j}}};var NC=/[\\n\\t]/g,MC=/\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g,TC=/\\u00a0/g;function isTerminatorChar(s){switch(s){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}ParserBlock.prototype.parse=function(s,i,u,_){var w,x=0,j=0;if(!s)return[];(s=(s=s.replace(TC,\" \")).replace(MC,\"\\n\")).indexOf(\"\\t\")>=0&&(s=s.replace(NC,(function(i,u){var _;return 10===s.charCodeAt(u)?(x=u+1,j=0,i):(_=\"    \".slice((u-x-j)%4),j=u-x+1,_)}))),w=new StateBlock(s,this,i,u,_),this.tokenize(w,w.line,w.lineMax)};for(var RC=[],DC=0;DC<256;DC++)RC.push(0);function isAlphaNum(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122}function scanDelims(s,i){var u,_,w,x=i,j=!0,P=!0,B=s.posMax,$=s.src.charCodeAt(i);for(u=i>0?s.src.charCodeAt(i-1):-1;x<B&&s.src.charCodeAt(x)===$;)x++;return x>=B&&(j=!1),(w=x-i)>=4?j=P=!1:(32!==(_=x<B?s.src.charCodeAt(x):-1)&&10!==_||(j=!1),32!==u&&10!==u||(P=!1),95===$&&(isAlphaNum(u)&&(j=!1),isAlphaNum(_)&&(P=!1))),{can_open:j,can_close:P,delims:w}}\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach((function(s){RC[s.charCodeAt(0)]=1}));var BC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var LC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var FC=[\"coap\",\"doi\",\"javascript\",\"aaa\",\"aaas\",\"about\",\"acap\",\"cap\",\"cid\",\"crid\",\"data\",\"dav\",\"dict\",\"dns\",\"file\",\"ftp\",\"geo\",\"go\",\"gopher\",\"h323\",\"http\",\"https\",\"iax\",\"icap\",\"im\",\"imap\",\"info\",\"ipp\",\"iris\",\"iris.beep\",\"iris.xpc\",\"iris.xpcs\",\"iris.lwz\",\"ldap\",\"mailto\",\"mid\",\"msrp\",\"msrps\",\"mtqp\",\"mupdate\",\"news\",\"nfs\",\"ni\",\"nih\",\"nntp\",\"opaquelocktoken\",\"pop\",\"pres\",\"rtsp\",\"service\",\"session\",\"shttp\",\"sieve\",\"sip\",\"sips\",\"sms\",\"snmp\",\"soap.beep\",\"soap.beeps\",\"tag\",\"tel\",\"telnet\",\"tftp\",\"thismessage\",\"tn3270\",\"tip\",\"tv\",\"urn\",\"vemmi\",\"ws\",\"wss\",\"xcon\",\"xcon-userid\",\"xmlrpc.beep\",\"xmlrpc.beeps\",\"xmpp\",\"z39.50r\",\"z39.50s\",\"adiumxtra\",\"afp\",\"afs\",\"aim\",\"apt\",\"attachment\",\"aw\",\"beshare\",\"bitcoin\",\"bolo\",\"callto\",\"chrome\",\"chrome-extension\",\"com-eventbrite-attendee\",\"content\",\"cvs\",\"dlna-playsingle\",\"dlna-playcontainer\",\"dtn\",\"dvb\",\"ed2k\",\"facetime\",\"feed\",\"finger\",\"fish\",\"gg\",\"git\",\"gizmoproject\",\"gtalk\",\"hcp\",\"icon\",\"ipn\",\"irc\",\"irc6\",\"ircs\",\"itms\",\"jar\",\"jms\",\"keyparc\",\"lastfm\",\"ldaps\",\"magnet\",\"maps\",\"market\",\"message\",\"mms\",\"ms-help\",\"msnim\",\"mumble\",\"mvn\",\"notes\",\"oid\",\"palm\",\"paparazzi\",\"platform\",\"proxy\",\"psyc\",\"query\",\"res\",\"resource\",\"rmi\",\"rsync\",\"rtmp\",\"secondlife\",\"sftp\",\"sgn\",\"skype\",\"smb\",\"soldat\",\"spotify\",\"ssh\",\"steam\",\"svn\",\"teamspeak\",\"things\",\"udp\",\"unreal\",\"ut2004\",\"ventrilo\",\"view-source\",\"webcal\",\"wtai\",\"wyciwyg\",\"xfire\",\"xri\",\"ymsgr\"],qC=/^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,$C=/^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;function replace$1(s,i){return s=s.source,i=i||\"\",function self(u,_){return u?(_=_.source||_,s=s.replace(u,_),self):new RegExp(s,i)}}var UC=replace$1(/(?:unquoted|single_quoted|double_quoted)/)(\"unquoted\",/[^\"'=<>`\\x00-\\x20]+/)(\"single_quoted\",/'[^']*'/)(\"double_quoted\",/\"[^\"]*\"/)(),zC=replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)(\"attr_name\",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)(\"attr_value\",UC)(),VC=replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)(\"attribute\",zC)(),WC=replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)(\"open_tag\",VC)(\"close_tag\",/<\\/[A-Za-z][A-Za-z0-9]*\\s*>/)(\"comment\",/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/)(\"processing\",/<[?].*?[?]>/)(\"declaration\",/<![A-Z]+\\s+[^>]*>/)(\"cdata\",/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/)();var KC=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,HC=/^&([a-z][a-z0-9]{1,31});/i;var JC=[[\"text\",function index_browser_text(s,i){for(var u=s.pos;u<s.posMax&&!isTerminatorChar(s.src.charCodeAt(u));)u++;return u!==s.pos&&(i||(s.pending+=s.src.slice(s.pos,u)),s.pos=u,!0)}],[\"newline\",function newline(s,i){var u,_,w=s.pos;if(10!==s.src.charCodeAt(w))return!1;if(u=s.pending.length-1,_=s.posMax,!i)if(u>=0&&32===s.pending.charCodeAt(u))if(u>=1&&32===s.pending.charCodeAt(u-1)){for(var x=u-2;x>=0;x--)if(32!==s.pending.charCodeAt(x)){s.pending=s.pending.substring(0,x+1);break}s.push({type:\"hardbreak\",level:s.level})}else s.pending=s.pending.slice(0,-1),s.push({type:\"softbreak\",level:s.level});else s.push({type:\"softbreak\",level:s.level});for(w++;w<_&&32===s.src.charCodeAt(w);)w++;return s.pos=w,!0}],[\"escape\",function index_browser_escape(s,i){var u,_=s.pos,w=s.posMax;if(92!==s.src.charCodeAt(_))return!1;if(++_<w){if((u=s.src.charCodeAt(_))<256&&0!==RC[u])return i||(s.pending+=s.src[_]),s.pos+=2,!0;if(10===u){for(i||s.push({type:\"hardbreak\",level:s.level}),_++;_<w&&32===s.src.charCodeAt(_);)_++;return s.pos=_,!0}}return i||(s.pending+=\"\\\\\"),s.pos++,!0}],[\"backticks\",function backticks(s,i){var u,_,w,x,j,P=s.pos;if(96!==s.src.charCodeAt(P))return!1;for(u=P,P++,_=s.posMax;P<_&&96===s.src.charCodeAt(P);)P++;for(w=s.src.slice(u,P),x=j=P;-1!==(x=s.src.indexOf(\"`\",j));){for(j=x+1;j<_&&96===s.src.charCodeAt(j);)j++;if(j-x===w.length)return i||s.push({type:\"code\",content:s.src.slice(P,x).replace(/[ \\n]+/g,\" \").trim(),block:!1,level:s.level}),s.pos=j,!0}return i||(s.pending+=w),s.pos+=w.length,!0}],[\"del\",function del(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(126!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(126!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),126===x)return!1;if(126===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&126===s.src.charCodeAt(_);)_++;if(_>B+3)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(126===s.src.charCodeAt(s.pos)&&126===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),126!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&126!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"del_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"del_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"ins\",function ins(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(43!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(43!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),43===x)return!1;if(43===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&43===s.src.charCodeAt(_);)_++;if(_!==B+2)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(43===s.src.charCodeAt(s.pos)&&43===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),43!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&43!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"ins_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"ins_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"mark\",function mark(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(61!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(61!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),61===x)return!1;if(61===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&61===s.src.charCodeAt(_);)_++;if(_!==B+2)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(61===s.src.charCodeAt(s.pos)&&61===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),61!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&61!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"mark_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"mark_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"emphasis\",function emphasis(s,i){var u,_,w,x,j,P,B,$=s.posMax,U=s.pos,Y=s.src.charCodeAt(U);if(95!==Y&&42!==Y)return!1;if(i)return!1;if(u=(B=scanDelims(s,U)).delims,!B.can_open)return s.pos+=u,i||(s.pending+=s.src.slice(U,s.pos)),!0;if(s.level>=s.options.maxNesting)return!1;for(s.pos=U+u,P=[u];s.pos<$;)if(s.src.charCodeAt(s.pos)!==Y)s.parser.skipToken(s);else{if(_=(B=scanDelims(s,s.pos)).delims,B.can_close){for(x=P.pop(),j=_;x!==j;){if(j<x){P.push(x-j);break}if(j-=x,0===P.length)break;s.pos+=x,x=P.pop()}if(0===P.length){u=x,w=!0;break}s.pos+=_;continue}B.can_open&&P.push(_),s.pos+=_}return w?(s.posMax=s.pos,s.pos=U+u,i||(2!==u&&3!==u||s.push({type:\"strong_open\",level:s.level++}),1!==u&&3!==u||s.push({type:\"em_open\",level:s.level++}),s.parser.tokenize(s),1!==u&&3!==u||s.push({type:\"em_close\",level:--s.level}),2!==u&&3!==u||s.push({type:\"strong_close\",level:--s.level})),s.pos=s.posMax+u,s.posMax=$,!0):(s.pos=U,!1)}],[\"sub\",function sub(s,i){var u,_,w=s.posMax,x=s.pos;if(126!==s.src.charCodeAt(x))return!1;if(i)return!1;if(x+2>=w)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=x+1;s.pos<w;){if(126===s.src.charCodeAt(s.pos)){u=!0;break}s.parser.skipToken(s)}return u&&x+1!==s.pos?(_=s.src.slice(x+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=x,!1):(s.posMax=s.pos,s.pos=x+1,i||s.push({type:\"sub\",level:s.level,content:_.replace(BC,\"$1\")}),s.pos=s.posMax+1,s.posMax=w,!0):(s.pos=x,!1)}],[\"sup\",function sup(s,i){var u,_,w=s.posMax,x=s.pos;if(94!==s.src.charCodeAt(x))return!1;if(i)return!1;if(x+2>=w)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=x+1;s.pos<w;){if(94===s.src.charCodeAt(s.pos)){u=!0;break}s.parser.skipToken(s)}return u&&x+1!==s.pos?(_=s.src.slice(x+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=x,!1):(s.posMax=s.pos,s.pos=x+1,i||s.push({type:\"sup\",level:s.level,content:_.replace(LC,\"$1\")}),s.pos=s.posMax+1,s.posMax=w,!0):(s.pos=x,!1)}],[\"links\",function links(s,i){var u,_,w,x,j,P,B,$,U=!1,Y=s.pos,X=s.posMax,Z=s.pos,ee=s.src.charCodeAt(Z);if(33===ee&&(U=!0,ee=s.src.charCodeAt(++Z)),91!==ee)return!1;if(s.level>=s.options.maxNesting)return!1;if(u=Z+1,(_=parseLinkLabel(s,Z))<0)return!1;if((P=_+1)<X&&40===s.src.charCodeAt(P)){for(P++;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P>=X)return!1;for(Z=P,parseLinkDestination(s,P)?(x=s.linkContent,P=s.pos):x=\"\",Z=P;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P<X&&Z!==P&&parseLinkTitle(s,P))for(j=s.linkContent,P=s.pos;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);else j=\"\";if(P>=X||41!==s.src.charCodeAt(P))return s.pos=Y,!1;P++}else{if(s.linkLevel>0)return!1;for(;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P<X&&91===s.src.charCodeAt(P)&&(Z=P+1,(P=parseLinkLabel(s,P))>=0?w=s.src.slice(Z,P++):P=Z-1),w||(void 0===w&&(P=_+1),w=s.src.slice(u,_)),!(B=s.env.references[normalizeReference(w)]))return s.pos=Y,!1;x=B.href,j=B.title}return i||(s.pos=u,s.posMax=_,U?s.push({type:\"image\",src:x,title:j,alt:s.src.substr(u,_-u),level:s.level}):(s.push({type:\"link_open\",href:x,title:j,level:s.level++}),s.linkLevel++,s.parser.tokenize(s),s.linkLevel--,s.push({type:\"link_close\",level:--s.level}))),s.pos=P,s.posMax=X,!0}],[\"footnote_inline\",function footnote_inline(s,i){var u,_,w,x,j=s.posMax,P=s.pos;return!(P+2>=j)&&(94===s.src.charCodeAt(P)&&(91===s.src.charCodeAt(P+1)&&(!(s.level>=s.options.maxNesting)&&(u=P+2,!((_=parseLinkLabel(s,P+1))<0)&&(i||(s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.list||(s.env.footnotes.list=[]),w=s.env.footnotes.list.length,s.pos=u,s.posMax=_,s.push({type:\"footnote_ref\",id:w,level:s.level}),s.linkLevel++,x=s.tokens.length,s.parser.tokenize(s),s.env.footnotes.list[w]={tokens:s.tokens.splice(x)},s.linkLevel--),s.pos=_+1,s.posMax=j,!0)))))}],[\"footnote_ref\",function footnote_ref(s,i){var u,_,w,x,j=s.posMax,P=s.pos;if(P+3>j)return!1;if(!s.env.footnotes||!s.env.footnotes.refs)return!1;if(91!==s.src.charCodeAt(P))return!1;if(94!==s.src.charCodeAt(P+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(_=P+2;_<j;_++){if(32===s.src.charCodeAt(_))return!1;if(10===s.src.charCodeAt(_))return!1;if(93===s.src.charCodeAt(_))break}return _!==P+2&&(!(_>=j)&&(_++,u=s.src.slice(P+2,_-1),void 0!==s.env.footnotes.refs[\":\"+u]&&(i||(s.env.footnotes.list||(s.env.footnotes.list=[]),s.env.footnotes.refs[\":\"+u]<0?(w=s.env.footnotes.list.length,s.env.footnotes.list[w]={label:u,count:0},s.env.footnotes.refs[\":\"+u]=w):w=s.env.footnotes.refs[\":\"+u],x=s.env.footnotes.list[w].count,s.env.footnotes.list[w].count++,s.push({type:\"footnote_ref\",id:w,subId:x,level:s.level})),s.pos=_,s.posMax=j,!0)))}],[\"autolink\",function autolink(s,i){var u,_,w,x,j,P=s.pos;return 60===s.src.charCodeAt(P)&&(!((u=s.src.slice(P)).indexOf(\">\")<0)&&((_=u.match($C))?!(FC.indexOf(_[1].toLowerCase())<0)&&(j=normalizeLink(x=_[0].slice(1,-1)),!!s.parser.validateLink(x)&&(i||(s.push({type:\"link_open\",href:j,level:s.level}),s.push({type:\"text\",content:x,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=_[0].length,!0)):!!(w=u.match(qC))&&(j=normalizeLink(\"mailto:\"+(x=w[0].slice(1,-1))),!!s.parser.validateLink(j)&&(i||(s.push({type:\"link_open\",href:j,level:s.level}),s.push({type:\"text\",content:x,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=w[0].length,!0))))}],[\"htmltag\",function htmltag(s,i){var u,_,w,x=s.pos;return!!s.options.html&&(w=s.posMax,!(60!==s.src.charCodeAt(x)||x+2>=w)&&(!(33!==(u=s.src.charCodeAt(x+1))&&63!==u&&47!==u&&!function isLetter$2(s){var i=32|s;return i>=97&&i<=122}(u))&&(!!(_=s.src.slice(x).match(WC))&&(i||s.push({type:\"htmltag\",content:s.src.slice(x,x+_[0].length),level:s.level}),s.pos+=_[0].length,!0))))}],[\"entity\",function entity(s,i){var u,_,w=s.pos,x=s.posMax;if(38!==s.src.charCodeAt(w))return!1;if(w+1<x)if(35===s.src.charCodeAt(w+1)){if(_=s.src.slice(w).match(KC))return i||(u=\"x\"===_[1][0].toLowerCase()?parseInt(_[1].slice(1),16):parseInt(_[1],10),s.pending+=isValidEntityCode(u)?fromCodePoint(u):fromCodePoint(65533)),s.pos+=_[0].length,!0}else if(_=s.src.slice(w).match(HC)){var j=decodeEntity(_[1]);if(_[1]!==j)return i||(s.pending+=j),s.pos+=_[0].length,!0}return i||(s.pending+=\"&\"),s.pos++,!0}]];function ParserInline(){this.ruler=new Ruler;for(var s=0;s<JC.length;s++)this.ruler.push(JC[s][0],JC[s][1]);this.validateLink=validateLink}function validateLink(s){var i=s.trim().toLowerCase();return-1===(i=replaceEntities(i)).indexOf(\":\")||-1===[\"vbscript\",\"javascript\",\"file\",\"data\"].indexOf(i.split(\":\")[0])}ParserInline.prototype.skipToken=function(s){var i,u,_=this.ruler.getRules(\"\"),w=_.length,x=s.pos;if((u=s.cacheGet(x))>0)s.pos=u;else{for(i=0;i<w;i++)if(_[i](s,!0))return void s.cacheSet(x,s.pos);s.pos++,s.cacheSet(x,s.pos)}},ParserInline.prototype.tokenize=function(s){for(var i,u,_=this.ruler.getRules(\"\"),w=_.length,x=s.posMax;s.pos<x;){for(u=0;u<w&&!(i=_[u](s,!1));u++);if(i){if(s.pos>=x)break}else s.pending+=s.src[s.pos++]}s.pending&&s.pushPending()},ParserInline.prototype.parse=function(s,i,u,_){var w=new StateInline(s,this,i,u,_);this.tokenize(w)};var GC={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"replacements\",\"smartquotes\",\"references\",\"abbr2\",\"footnote_tail\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"footnote\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\",\"table\"]},inline:{rules:[\"autolink\",\"backticks\",\"del\",\"emphasis\",\"entity\",\"escape\",\"footnote_ref\",\"htmltag\",\"links\",\"newline\",\"text\"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"abbr2\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\"]},inline:{rules:[\"autolink\",\"backticks\",\"emphasis\",\"entity\",\"escape\",\"htmltag\",\"links\",\"newline\",\"text\"]}}}};function StateCore(s,i,u){this.src=i,this.env=u,this.options=s.options,this.tokens=[],this.inlineMode=!1,this.inline=s.inline,this.block=s.block,this.renderer=s.renderer,this.typographer=s.typographer}function Remarkable(s,i){\"string\"!=typeof s&&(i=s,s=\"default\"),i&&null!=i.linkify&&console.warn(\"linkify option is removed. Use linkify plugin instead:\\n\\nimport Remarkable from 'remarkable';\\nimport linkify from 'remarkable/linkify';\\nnew Remarkable().use(linkify)\\n\"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.ruler=new Ruler,this.options={},this.configure(GC[s]),this.set(i||{})}Remarkable.prototype.set=function(s){index_browser_assign(this.options,s)},Remarkable.prototype.configure=function(s){var i=this;if(!s)throw new Error(\"Wrong `remarkable` preset, check name/content\");s.options&&i.set(s.options),s.components&&Object.keys(s.components).forEach((function(u){s.components[u].rules&&i[u].ruler.enable(s.components[u].rules,!0)}))},Remarkable.prototype.use=function(s,i){return s(this,i),this},Remarkable.prototype.parse=function(s,i){var u=new StateCore(this,s,i);return this.core.process(u),u.tokens},Remarkable.prototype.render=function(s,i){return i=i||{},this.renderer.render(this.parse(s,i),this.options,i)},Remarkable.prototype.parseInline=function(s,i){var u=new StateCore(this,s,i);return u.inlineMode=!0,this.core.process(u),u.tokens},Remarkable.prototype.renderInline=function(s,i){return i=i||{},this.renderer.render(this.parseInline(s,i),this.options,i)};function indexOf(s,i){if(Array.prototype.indexOf)return s.indexOf(i);for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}function utils_remove(s,i){for(var u=s.length-1;u>=0;u--)!0===i(s[u])&&s.splice(u,1)}function throwUnhandledCaseError(s){throw new Error(\"Unhandled case for value: '\".concat(s,\"'\"))}var YC=function(){function HtmlTag(s){void 0===s&&(s={}),this.tagName=\"\",this.attrs={},this.innerHTML=\"\",this.whitespaceRegex=/\\s+/,this.tagName=s.tagName||\"\",this.attrs=s.attrs||{},this.innerHTML=s.innerHtml||s.innerHTML||\"\"}return HtmlTag.prototype.setTagName=function(s){return this.tagName=s,this},HtmlTag.prototype.getTagName=function(){return this.tagName||\"\"},HtmlTag.prototype.setAttr=function(s,i){return this.getAttrs()[s]=i,this},HtmlTag.prototype.getAttr=function(s){return this.getAttrs()[s]},HtmlTag.prototype.setAttrs=function(s){return Object.assign(this.getAttrs(),s),this},HtmlTag.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},HtmlTag.prototype.setClass=function(s){return this.setAttr(\"class\",s)},HtmlTag.prototype.addClass=function(s){for(var i,u=this.getClass(),_=this.whitespaceRegex,w=u?u.split(_):[],x=s.split(_);i=x.shift();)-1===indexOf(w,i)&&w.push(i);return this.getAttrs().class=w.join(\" \"),this},HtmlTag.prototype.removeClass=function(s){for(var i,u=this.getClass(),_=this.whitespaceRegex,w=u?u.split(_):[],x=s.split(_);w.length&&(i=x.shift());){var j=indexOf(w,i);-1!==j&&w.splice(j,1)}return this.getAttrs().class=w.join(\" \"),this},HtmlTag.prototype.getClass=function(){return this.getAttrs().class||\"\"},HtmlTag.prototype.hasClass=function(s){return-1!==(\" \"+this.getClass()+\" \").indexOf(\" \"+s+\" \")},HtmlTag.prototype.setInnerHTML=function(s){return this.innerHTML=s,this},HtmlTag.prototype.setInnerHtml=function(s){return this.setInnerHTML(s)},HtmlTag.prototype.getInnerHTML=function(){return this.innerHTML||\"\"},HtmlTag.prototype.getInnerHtml=function(){return this.getInnerHTML()},HtmlTag.prototype.toAnchorString=function(){var s=this.getTagName(),i=this.buildAttrsStr();return[\"<\",s,i=i?\" \"+i:\"\",\">\",this.getInnerHtml(),\"</\",s,\">\"].join(\"\")},HtmlTag.prototype.buildAttrsStr=function(){if(!this.attrs)return\"\";var s=this.getAttrs(),i=[];for(var u in s)s.hasOwnProperty(u)&&i.push(u+'=\"'+s[u]+'\"');return i.join(\" \")},HtmlTag}();var XC=function(){function AnchorTagBuilder(s){void 0===s&&(s={}),this.newWindow=!1,this.truncate={},this.className=\"\",this.newWindow=s.newWindow||!1,this.truncate=s.truncate||{},this.className=s.className||\"\"}return AnchorTagBuilder.prototype.build=function(s){return new YC({tagName:\"a\",attrs:this.createAttrs(s),innerHtml:this.processAnchorText(s.getAnchorText())})},AnchorTagBuilder.prototype.createAttrs=function(s){var i={href:s.getAnchorHref()},u=this.createCssClass(s);return u&&(i.class=u),this.newWindow&&(i.target=\"_blank\",i.rel=\"noopener noreferrer\"),this.truncate&&this.truncate.length&&this.truncate.length<s.getAnchorText().length&&(i.title=s.getAnchorHref()),i},AnchorTagBuilder.prototype.createCssClass=function(s){var i=this.className;if(i){for(var u=[i],_=s.getCssClassSuffixes(),w=0,x=_.length;w<x;w++)u.push(i+\"-\"+_[w]);return u.join(\" \")}return\"\"},AnchorTagBuilder.prototype.processAnchorText=function(s){return s=this.doTruncate(s)},AnchorTagBuilder.prototype.doTruncate=function(s){var i=this.truncate;if(!i||!i.length)return s;var u=i.length,_=i.location;return\"smart\"===_?function truncateSmart(s,i,u){var _,w;null==u?(u=\"&hellip;\",w=3,_=8):(w=u.length,_=u.length);var buildUrl=function(s){var i=\"\";return s.scheme&&s.host&&(i+=s.scheme+\"://\"),s.host&&(i+=s.host),s.path&&(i+=\"/\"+s.path),s.query&&(i+=\"?\"+s.query),s.fragment&&(i+=\"#\"+s.fragment),i},buildSegment=function(s,i){var _=i/2,w=Math.ceil(_),x=-1*Math.floor(_),j=\"\";return x<0&&(j=s.substr(x)),s.substr(0,w)+u+j};if(s.length<=i)return s;var x=i-w,j=function(s){var i={},u=s,_=u.match(/^([a-z]+):\\/\\//i);return _&&(i.scheme=_[1],u=u.substr(_[0].length)),(_=u.match(/^(.*?)(?=(\\?|#|\\/|$))/i))&&(i.host=_[1],u=u.substr(_[0].length)),(_=u.match(/^\\/(.*?)(?=(\\?|#|$))/i))&&(i.path=_[1],u=u.substr(_[0].length)),(_=u.match(/^\\?(.*?)(?=(#|$))/i))&&(i.query=_[1],u=u.substr(_[0].length)),(_=u.match(/^#(.*?)$/i))&&(i.fragment=_[1]),i}(s);if(j.query){var P=j.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);P&&(j.query=j.query.substr(0,P[1].length),s=buildUrl(j))}if(s.length<=i)return s;if(j.host&&(j.host=j.host.replace(/^www\\./,\"\"),s=buildUrl(j)),s.length<=i)return s;var B=\"\";if(j.host&&(B+=j.host),B.length>=x)return j.host.length==i?(j.host.substr(0,i-w)+u).substr(0,x+_):buildSegment(B,x).substr(0,x+_);var $=\"\";if(j.path&&($+=\"/\"+j.path),j.query&&($+=\"?\"+j.query),$){if((B+$).length>=x)return(B+$).length==i?(B+$).substr(0,i):(B+buildSegment($,x-B.length)).substr(0,x+_);B+=$}if(j.fragment){var U=\"#\"+j.fragment;if((B+U).length>=x)return(B+U).length==i?(B+U).substr(0,i):(B+buildSegment(U,x-B.length)).substr(0,x+_);B+=U}if(j.scheme&&j.host){var Y=j.scheme+\"://\";if((B+Y).length<x)return(Y+B).substr(0,i)}if(B.length<=i)return B;var X=\"\";return x>0&&(X=B.substr(-1*Math.floor(x/2))),(B.substr(0,Math.ceil(x/2))+u+X).substr(0,x+_)}(s,u):\"middle\"===_?function truncateMiddle(s,i,u){if(s.length<=i)return s;var _,w;null==u?(u=\"&hellip;\",_=8,w=3):(_=u.length,w=u.length);var x=i-w,j=\"\";return x>0&&(j=s.substr(-1*Math.floor(x/2))),(s.substr(0,Math.ceil(x/2))+u+j).substr(0,x+_)}(s,u):function truncateEnd(s,i,u){return function ellipsis(s,i,u){var _;return s.length>i&&(null==u?(u=\"&hellip;\",_=3):_=u.length,s=s.substring(0,i-_)+u),s}(s,i,u)}(s,u)},AnchorTagBuilder}(),QC=function(){function Match(s){this.__jsduckDummyDocProp=null,this.matchedText=\"\",this.offset=0,this.tagBuilder=s.tagBuilder,this.matchedText=s.matchedText,this.offset=s.offset}return Match.prototype.getMatchedText=function(){return this.matchedText},Match.prototype.setOffset=function(s){this.offset=s},Match.prototype.getOffset=function(){return this.offset},Match.prototype.getCssClassSuffixes=function(){return[this.getType()]},Match.prototype.buildTag=function(){return this.tagBuilder.build(this)},Match}(),extendStatics=function(s,i){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])},extendStatics(s,i)};function tslib_es6_extends(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Class extends value \"+String(i)+\" is not a constructor or null\");function __(){this.constructor=s}extendStatics(s,i),s.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}var __assign=function(){return __assign=Object.assign||function __assign(s){for(var i,u=1,_=arguments.length;u<_;u++)for(var w in i=arguments[u])Object.prototype.hasOwnProperty.call(i,w)&&(s[w]=i[w]);return s},__assign.apply(this,arguments)};Object.create;Object.create;\"function\"==typeof SuppressedError&&SuppressedError;var ZC,eA=function(s){function EmailMatch(i){var u=s.call(this,i)||this;return u.email=\"\",u.email=i.email,u}return tslib_es6_extends(EmailMatch,s),EmailMatch.prototype.getType=function(){return\"email\"},EmailMatch.prototype.getEmail=function(){return this.email},EmailMatch.prototype.getAnchorHref=function(){return\"mailto:\"+this.email},EmailMatch.prototype.getAnchorText=function(){return this.email},EmailMatch}(QC),tA=function(s){function HashtagMatch(i){var u=s.call(this,i)||this;return u.serviceName=\"\",u.hashtag=\"\",u.serviceName=i.serviceName,u.hashtag=i.hashtag,u}return tslib_es6_extends(HashtagMatch,s),HashtagMatch.prototype.getType=function(){return\"hashtag\"},HashtagMatch.prototype.getServiceName=function(){return this.serviceName},HashtagMatch.prototype.getHashtag=function(){return this.hashtag},HashtagMatch.prototype.getAnchorHref=function(){var s=this.serviceName,i=this.hashtag;switch(s){case\"twitter\":return\"https://twitter.com/hashtag/\"+i;case\"facebook\":return\"https://www.facebook.com/hashtag/\"+i;case\"instagram\":return\"https://instagram.com/explore/tags/\"+i;case\"tiktok\":return\"https://www.tiktok.com/tag/\"+i;default:throw new Error(\"Unknown service name to point hashtag to: \"+s)}},HashtagMatch.prototype.getAnchorText=function(){return\"#\"+this.hashtag},HashtagMatch}(QC),rA=function(s){function MentionMatch(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.mention=\"\",u.mention=i.mention,u.serviceName=i.serviceName,u}return tslib_es6_extends(MentionMatch,s),MentionMatch.prototype.getType=function(){return\"mention\"},MentionMatch.prototype.getMention=function(){return this.mention},MentionMatch.prototype.getServiceName=function(){return this.serviceName},MentionMatch.prototype.getAnchorHref=function(){switch(this.serviceName){case\"twitter\":return\"https://twitter.com/\"+this.mention;case\"instagram\":return\"https://instagram.com/\"+this.mention;case\"soundcloud\":return\"https://soundcloud.com/\"+this.mention;case\"tiktok\":return\"https://www.tiktok.com/@\"+this.mention;default:throw new Error(\"Unknown service name to point mention to: \"+this.serviceName)}},MentionMatch.prototype.getAnchorText=function(){return\"@\"+this.mention},MentionMatch.prototype.getCssClassSuffixes=function(){var i=s.prototype.getCssClassSuffixes.call(this),u=this.getServiceName();return u&&i.push(u),i},MentionMatch}(QC),nA=function(s){function PhoneMatch(i){var u=s.call(this,i)||this;return u.number=\"\",u.plusSign=!1,u.number=i.number,u.plusSign=i.plusSign,u}return tslib_es6_extends(PhoneMatch,s),PhoneMatch.prototype.getType=function(){return\"phone\"},PhoneMatch.prototype.getPhoneNumber=function(){return this.number},PhoneMatch.prototype.getNumber=function(){return this.getPhoneNumber()},PhoneMatch.prototype.getAnchorHref=function(){return\"tel:\"+(this.plusSign?\"+\":\"\")+this.number},PhoneMatch.prototype.getAnchorText=function(){return this.matchedText},PhoneMatch}(QC),oA=function(s){function UrlMatch(i){var u=s.call(this,i)||this;return u.url=\"\",u.urlMatchType=\"scheme\",u.protocolUrlMatch=!1,u.protocolRelativeMatch=!1,u.stripPrefix={scheme:!0,www:!0},u.stripTrailingSlash=!0,u.decodePercentEncoding=!0,u.schemePrefixRegex=/^(https?:\\/\\/)?/i,u.wwwPrefixRegex=/^(https?:\\/\\/)?(www\\.)?/i,u.protocolRelativeRegex=/^\\/\\//,u.protocolPrepended=!1,u.urlMatchType=i.urlMatchType,u.url=i.url,u.protocolUrlMatch=i.protocolUrlMatch,u.protocolRelativeMatch=i.protocolRelativeMatch,u.stripPrefix=i.stripPrefix,u.stripTrailingSlash=i.stripTrailingSlash,u.decodePercentEncoding=i.decodePercentEncoding,u}return tslib_es6_extends(UrlMatch,s),UrlMatch.prototype.getType=function(){return\"url\"},UrlMatch.prototype.getUrlMatchType=function(){return this.urlMatchType},UrlMatch.prototype.getUrl=function(){var s=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(s=this.url=\"http://\"+s,this.protocolPrepended=!0),s},UrlMatch.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,\"&\")},UrlMatch.prototype.getAnchorText=function(){var s=this.getMatchedText();return this.protocolRelativeMatch&&(s=this.stripProtocolRelativePrefix(s)),this.stripPrefix.scheme&&(s=this.stripSchemePrefix(s)),this.stripPrefix.www&&(s=this.stripWwwPrefix(s)),this.stripTrailingSlash&&(s=this.removeTrailingSlash(s)),this.decodePercentEncoding&&(s=this.removePercentEncoding(s)),s},UrlMatch.prototype.stripSchemePrefix=function(s){return s.replace(this.schemePrefixRegex,\"\")},UrlMatch.prototype.stripWwwPrefix=function(s){return s.replace(this.wwwPrefixRegex,\"$1\")},UrlMatch.prototype.stripProtocolRelativePrefix=function(s){return s.replace(this.protocolRelativeRegex,\"\")},UrlMatch.prototype.removeTrailingSlash=function(s){return\"/\"===s.charAt(s.length-1)&&(s=s.slice(0,-1)),s},UrlMatch.prototype.removePercentEncoding=function(s){var i=s.replace(/%22/gi,\"&quot;\").replace(/%26/gi,\"&amp;\").replace(/%27/gi,\"&#39;\").replace(/%3C/gi,\"&lt;\").replace(/%3E/gi,\"&gt;\");try{return decodeURIComponent(i)}catch(s){return i}},UrlMatch}(QC),sA=function sA(s){this.__jsduckDummyDocProp=null,this.tagBuilder=s.tagBuilder},iA=/[A-Za-z]/,aA=/[\\d]/,lA=/[\\D]/,cA=/\\s/,uA=/['\"]/,pA=/[\\x00-\\x1F\\x7F]/,hA=/A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source,dA=hA+/\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source+/\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source,fA=/0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source,mA=dA+fA,gA=dA+fA,yA=new RegExp(\"[\".concat(gA,\"]\")),vA=\"(?:[\"+fA+\"]{1,3}\\\\.){3}[\"+fA+\"]{1,3}\",bA=\"[\"+gA+\"](?:[\"+gA+\"\\\\-_]{0,61}[\"+gA+\"])?\",getDomainLabelStr=function(s){return\"(?=(\"+bA+\"))\\\\\"+s},getDomainNameStr=function(s){return\"(?:\"+getDomainLabelStr(s)+\"(?:\\\\.\"+getDomainLabelStr(s+1)+\"){0,126}|\"+vA+\")\"},_A=(new RegExp(\"[\"+gA+\".\\\\-]*[\"+gA+\"\\\\-]\"),yA),EA=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,wA=new RegExp(\"[\".concat(gA,\"!#$%&'*+/=?^_`{|}~-]\")),SA=new RegExp(\"^\".concat(EA.source,\"$\")),xA=function(s){function EmailMatcher(){var i=null!==s&&s.apply(this,arguments)||this;return i.localPartCharRegex=wA,i.strictTldRegex=SA,i}return tslib_es6_extends(EmailMatcher,s),EmailMatcher.prototype.parseMatches=function(s){for(var i=this.tagBuilder,u=this.localPartCharRegex,_=this.strictTldRegex,w=[],x=s.length,j=new kA,P={m:\"a\",a:\"i\",i:\"l\",l:\"t\",t:\"o\",o:\":\"},B=0,$=0,U=j;B<x;){var Y=s.charAt(B);switch($){case 0:stateNonEmailAddress(Y);break;case 1:stateMailTo(s.charAt(B-1),Y);break;case 2:stateLocalPart(Y);break;case 3:stateLocalPartDot(Y);break;case 4:stateAtSign(Y);break;case 5:stateDomainChar(Y);break;case 6:stateDomainHyphen(Y);break;case 7:stateDomainDot(Y);break;default:throwUnhandledCaseError($)}B++}return captureMatchIfValidAndReset(),w;function stateNonEmailAddress(s){\"m\"===s?beginEmailMatch(1):u.test(s)&&beginEmailMatch()}function stateMailTo(s,i){\":\"===s?u.test(i)?($=2,U=new kA(__assign(__assign({},U),{hasMailtoPrefix:!0}))):resetToNonEmailMatchState():P[s]===i||(u.test(i)?$=2:\".\"===i?$=3:\"@\"===i?$=4:resetToNonEmailMatchState())}function stateLocalPart(s){\".\"===s?$=3:\"@\"===s?$=4:u.test(s)||resetToNonEmailMatchState()}function stateLocalPartDot(s){\".\"===s||\"@\"===s?resetToNonEmailMatchState():u.test(s)?$=2:resetToNonEmailMatchState()}function stateAtSign(s){_A.test(s)?$=5:resetToNonEmailMatchState()}function stateDomainChar(s){\".\"===s?$=7:\"-\"===s?$=6:_A.test(s)||captureMatchIfValidAndReset()}function stateDomainHyphen(s){\"-\"===s||\".\"===s?captureMatchIfValidAndReset():_A.test(s)?$=5:captureMatchIfValidAndReset()}function stateDomainDot(s){\".\"===s||\"-\"===s?captureMatchIfValidAndReset():_A.test(s)?($=5,U=new kA(__assign(__assign({},U),{hasDomainDot:!0}))):captureMatchIfValidAndReset()}function beginEmailMatch(s){void 0===s&&(s=2),$=s,U=new kA({idx:B})}function resetToNonEmailMatchState(){$=0,U=j}function captureMatchIfValidAndReset(){if(U.hasDomainDot){var u=s.slice(U.idx,B);/[-.]$/.test(u)&&(u=u.slice(0,-1));var x=U.hasMailtoPrefix?u.slice(7):u;(function doesEmailHaveValidTld(s){var i=s.split(\".\").pop()||\"\",u=i.toLowerCase();return _.test(u)})(x)&&w.push(new eA({tagBuilder:i,matchedText:u,offset:U.idx,email:x}))}resetToNonEmailMatchState()}},EmailMatcher}(sA),kA=function kA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.hasMailtoPrefix=!!s.hasMailtoPrefix,this.hasDomainDot=!!s.hasDomainDot},OA=function(){function UrlMatchValidator(){}return UrlMatchValidator.isValid=function(s,i){return!(i&&!this.isValidUriScheme(i)||this.urlMatchDoesNotHaveProtocolOrDot(s,i)||this.urlMatchDoesNotHaveAtLeastOneWordChar(s,i)&&!this.isValidIpAddress(s)||this.containsMultipleDots(s))},UrlMatchValidator.isValidIpAddress=function(s){var i=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==s.match(i)},UrlMatchValidator.containsMultipleDots=function(s){var i=s;return this.hasFullProtocolRegex.test(s)&&(i=s.split(\"://\")[1]),i.split(\"/\")[0].indexOf(\"..\")>-1},UrlMatchValidator.isValidUriScheme=function(s){var i=s.match(this.uriSchemeRegex),u=i&&i[0].toLowerCase();return\"javascript:\"!==u&&\"vbscript:\"!==u},UrlMatchValidator.urlMatchDoesNotHaveProtocolOrDot=function(s,i){return!(!s||i&&this.hasFullProtocolRegex.test(i)||-1!==s.indexOf(\".\"))},UrlMatchValidator.urlMatchDoesNotHaveAtLeastOneWordChar=function(s,i){return!(!s||!i)&&(!this.hasFullProtocolRegex.test(i)&&!this.hasWordCharAfterProtocolRegex.test(s))},UrlMatchValidator.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\\/\\//,UrlMatchValidator.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,UrlMatchValidator.hasWordCharAfterProtocolRegex=new RegExp(\":[^\\\\s]*?[\"+hA+\"]\"),UrlMatchValidator.ipRegex=/[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?(:[0-9]*)?\\/?$/,UrlMatchValidator}(),CA=(ZC=new RegExp(\"[/?#](?:[\"+gA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}?!:,.;^✓]*[\"+gA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}✓])?\"),new RegExp([\"(?:\",\"(\",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\\/\\/)(?!\\d+\\/?)(?:\\/\\/)?)/.source,getDomainNameStr(2),\")\",\"|\",\"(\",\"(//)?\",/(?:www\\.)/.source,getDomainNameStr(6),\")\",\"|\",\"(\",\"(//)?\",getDomainNameStr(10)+\"\\\\.\",EA.source,\"(?![-\"+mA+\"])\",\")\",\")\",\"(?::[0-9]+)?\",\"(?:\"+ZC.source+\")?\"].join(\"\"),\"gi\")),AA=new RegExp(\"[\"+gA+\"]\"),jA=function(s){function UrlMatcher(i){var u=s.call(this,i)||this;return u.stripPrefix={scheme:!0,www:!0},u.stripTrailingSlash=!0,u.decodePercentEncoding=!0,u.matcherRegex=CA,u.wordCharRegExp=AA,u.stripPrefix=i.stripPrefix,u.stripTrailingSlash=i.stripTrailingSlash,u.decodePercentEncoding=i.decodePercentEncoding,u}return tslib_es6_extends(UrlMatcher,s),UrlMatcher.prototype.parseMatches=function(s){for(var i,u=this.matcherRegex,_=this.stripPrefix,w=this.stripTrailingSlash,x=this.decodePercentEncoding,j=this.tagBuilder,P=[],_loop_1=function(){var u=i[0],$=i[1],U=i[4],Y=i[5],X=i[9],Z=i.index,ee=Y||X,ie=s.charAt(Z-1);if(!OA.isValid(u,$))return\"continue\";if(Z>0&&\"@\"===ie)return\"continue\";if(Z>0&&ee&&B.wordCharRegExp.test(ie))return\"continue\";if(/\\?$/.test(u)&&(u=u.substr(0,u.length-1)),B.matchHasUnbalancedClosingParen(u))u=u.substr(0,u.length-1);else{var ae=B.matchHasInvalidCharAfterTld(u,$);ae>-1&&(u=u.substr(0,ae))}var le=[\"http://\",\"https://\"].find((function(s){return!!$&&-1!==$.indexOf(s)}));if(le){var ce=u.indexOf(le);u=u.substr(ce),$=$.substr(ce),Z+=ce}var pe=$?\"scheme\":U?\"www\":\"tld\",de=!!$;P.push(new oA({tagBuilder:j,matchedText:u,offset:Z,urlMatchType:pe,url:u,protocolUrlMatch:de,protocolRelativeMatch:!!ee,stripPrefix:_,stripTrailingSlash:w,decodePercentEncoding:x}))},B=this;null!==(i=u.exec(s));)_loop_1();return P},UrlMatcher.prototype.matchHasUnbalancedClosingParen=function(s){var i,u=s.charAt(s.length-1);if(\")\"===u)i=\"(\";else if(\"]\"===u)i=\"[\";else{if(\"}\"!==u)return!1;i=\"{\"}for(var _=0,w=0,x=s.length-1;w<x;w++){var j=s.charAt(w);j===i?_++:j===u&&(_=Math.max(_-1,0))}return 0===_},UrlMatcher.prototype.matchHasInvalidCharAfterTld=function(s,i){if(!s)return-1;var u=0;i&&(u=s.indexOf(\":\"),s=s.slice(u));var _=new RegExp(\"^((.?//)?[-.\"+gA+\"]*[-\"+gA+\"]\\\\.[-\"+gA+\"]+)\").exec(s);return null===_?-1:(u+=_[1].length,s=s.slice(_[1].length),/^[^-.A-Za-z0-9:\\/?#]/.test(s)?u:-1)},UrlMatcher}(sA),PA=new RegExp(\"[_\".concat(gA,\"]\")),IA=function(s){function HashtagMatcher(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.serviceName=i.serviceName,u}return tslib_es6_extends(HashtagMatcher,s),HashtagMatcher.prototype.parseMatches=function(s){for(var i=this.tagBuilder,u=this.serviceName,_=[],w=s.length,x=0,j=-1,P=0;x<w;){var B=s.charAt(x);switch(P){case 0:stateNone(B);break;case 1:stateNonHashtagWordChar(B);break;case 2:stateHashtagHashChar(B);break;case 3:stateHashtagTextChar(B);break;default:throwUnhandledCaseError(P)}x++}return captureMatchIfValid(),_;function stateNone(s){\"#\"===s?(P=2,j=x):yA.test(s)&&(P=1)}function stateNonHashtagWordChar(s){yA.test(s)||(P=0)}function stateHashtagHashChar(s){P=PA.test(s)?3:yA.test(s)?1:0}function stateHashtagTextChar(s){PA.test(s)||(captureMatchIfValid(),j=-1,P=yA.test(s)?1:0)}function captureMatchIfValid(){if(j>-1&&x-j<=140){var w=s.slice(j,x),P=new tA({tagBuilder:i,matchedText:w,offset:j,serviceName:u,hashtag:w.slice(1)});_.push(P)}}},HashtagMatcher}(sA),NA=[\"twitter\",\"facebook\",\"instagram\",\"tiktok\"],MA=new RegExp(\"\".concat(/(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/.source,\"|\").concat(/(0([1-9]{1}-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/.source),\"g\"),TA=function(s){function PhoneMatcher(){var i=null!==s&&s.apply(this,arguments)||this;return i.matcherRegex=MA,i}return tslib_es6_extends(PhoneMatcher,s),PhoneMatcher.prototype.parseMatches=function(s){for(var i,u=this.matcherRegex,_=this.tagBuilder,w=[];null!==(i=u.exec(s));){var x=i[0],j=x.replace(/[^0-9,;#]/g,\"\"),P=!(!i[1]&&!i[2]),B=0==i.index?\"\":s.substr(i.index-1,1),$=s.substr(i.index+x.length,1),U=!B.match(/\\d/)&&!$.match(/\\d/);this.testMatch(i[3])&&this.testMatch(x)&&U&&w.push(new nA({tagBuilder:_,matchedText:x,offset:i.index,number:j,plusSign:P}))}return w},PhoneMatcher.prototype.testMatch=function(s){return lA.test(s)},PhoneMatcher}(sA),RA=new RegExp(\"@[_\".concat(gA,\"]{1,50}(?![_\").concat(gA,\"])\"),\"g\"),DA=new RegExp(\"@[_.\".concat(gA,\"]{1,30}(?![_\").concat(gA,\"])\"),\"g\"),BA=new RegExp(\"@[-_.\".concat(gA,\"]{1,50}(?![-_\").concat(gA,\"])\"),\"g\"),LA=new RegExp(\"@[_.\".concat(gA,\"]{1,23}[_\").concat(gA,\"](?![_\").concat(gA,\"])\"),\"g\"),FA=new RegExp(\"[^\"+gA+\"]\"),qA=function(s){function MentionMatcher(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.matcherRegexes={twitter:RA,instagram:DA,soundcloud:BA,tiktok:LA},u.nonWordCharRegex=FA,u.serviceName=i.serviceName,u}return tslib_es6_extends(MentionMatcher,s),MentionMatcher.prototype.parseMatches=function(s){var i,u=this.serviceName,_=this.matcherRegexes[this.serviceName],w=this.nonWordCharRegex,x=this.tagBuilder,j=[];if(!_)return j;for(;null!==(i=_.exec(s));){var P=i.index,B=s.charAt(P-1);if(0===P||w.test(B)){var $=i[0].replace(/\\.+$/g,\"\"),U=$.slice(1);j.push(new rA({tagBuilder:x,matchedText:$,offset:P,serviceName:u,mention:U}))}}return j},MentionMatcher}(sA);function parseHtml(s,i){for(var u=i.onOpenTag,_=i.onCloseTag,w=i.onText,x=i.onComment,j=i.onDoctype,P=new $A,B=0,$=s.length,U=0,Y=0,X=P;B<$;){var Z=s.charAt(B);switch(U){case 0:stateData(Z);break;case 1:stateTagOpen(Z);break;case 2:stateEndTagOpen(Z);break;case 3:stateTagName(Z);break;case 4:stateBeforeAttributeName(Z);break;case 5:stateAttributeName(Z);break;case 6:stateAfterAttributeName(Z);break;case 7:stateBeforeAttributeValue(Z);break;case 8:stateAttributeValueDoubleQuoted(Z);break;case 9:stateAttributeValueSingleQuoted(Z);break;case 10:stateAttributeValueUnquoted(Z);break;case 11:stateAfterAttributeValueQuoted(Z);break;case 12:stateSelfClosingStartTag(Z);break;case 13:stateMarkupDeclarationOpen(Z);break;case 14:stateCommentStart(Z);break;case 15:stateCommentStartDash(Z);break;case 16:stateComment(Z);break;case 17:stateCommentEndDash(Z);break;case 18:stateCommentEnd(Z);break;case 19:stateCommentEndBang(Z);break;case 20:stateDoctype(Z);break;default:throwUnhandledCaseError(U)}B++}function stateData(s){\"<\"===s&&startNewTag()}function stateTagOpen(s){\"!\"===s?U=13:\"/\"===s?(U=2,X=new $A(__assign(__assign({},X),{isClosing:!0}))):\"<\"===s?startNewTag():iA.test(s)?(U=3,X=new $A(__assign(__assign({},X),{isOpening:!0}))):(U=0,X=P)}function stateTagName(s){cA.test(s)?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),U=4):\"<\"===s?startNewTag():\"/\"===s?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),U=12):\">\"===s?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),emitTagAndPreviousTextNode()):iA.test(s)||aA.test(s)||\":\"===s||resetToDataState()}function stateEndTagOpen(s){\">\"===s?resetToDataState():iA.test(s)?U=3:resetToDataState()}function stateBeforeAttributeName(s){cA.test(s)||(\"/\"===s?U=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():\"=\"===s||uA.test(s)||pA.test(s)?resetToDataState():U=5)}function stateAttributeName(s){cA.test(s)?U=6:\"/\"===s?U=12:\"=\"===s?U=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():uA.test(s)&&resetToDataState()}function stateAfterAttributeName(s){cA.test(s)||(\"/\"===s?U=12:\"=\"===s?U=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():uA.test(s)?resetToDataState():U=5)}function stateBeforeAttributeValue(s){cA.test(s)||('\"'===s?U=8:\"'\"===s?U=9:/[>=`]/.test(s)?resetToDataState():\"<\"===s?startNewTag():U=10)}function stateAttributeValueDoubleQuoted(s){'\"'===s&&(U=11)}function stateAttributeValueSingleQuoted(s){\"'\"===s&&(U=11)}function stateAttributeValueUnquoted(s){cA.test(s)?U=4:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function stateAfterAttributeValueQuoted(s){cA.test(s)?U=4:\"/\"===s?U=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():(U=4,function reconsumeCurrentCharacter(){B--}())}function stateSelfClosingStartTag(s){\">\"===s?(X=new $A(__assign(__assign({},X),{isClosing:!0})),emitTagAndPreviousTextNode()):U=4}function stateMarkupDeclarationOpen(i){\"--\"===s.substr(B,2)?(B+=2,X=new $A(__assign(__assign({},X),{type:\"comment\"})),U=14):\"DOCTYPE\"===s.substr(B,7).toUpperCase()?(B+=7,X=new $A(__assign(__assign({},X),{type:\"doctype\"})),U=20):resetToDataState()}function stateCommentStart(s){\"-\"===s?U=15:\">\"===s?resetToDataState():U=16}function stateCommentStartDash(s){\"-\"===s?U=18:\">\"===s?resetToDataState():U=16}function stateComment(s){\"-\"===s&&(U=17)}function stateCommentEndDash(s){U=\"-\"===s?18:16}function stateCommentEnd(s){\">\"===s?emitTagAndPreviousTextNode():\"!\"===s?U=19:\"-\"===s||(U=16)}function stateCommentEndBang(s){\"-\"===s?U=17:\">\"===s?emitTagAndPreviousTextNode():U=16}function stateDoctype(s){\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function resetToDataState(){U=0,X=P}function startNewTag(){U=1,X=new $A({idx:B})}function emitTagAndPreviousTextNode(){var i=s.slice(Y,X.idx);i&&w(i,Y),\"comment\"===X.type?x(X.idx):\"doctype\"===X.type?j(X.idx):(X.isOpening&&u(X.name,X.idx),X.isClosing&&_(X.name,X.idx)),resetToDataState(),Y=B+1}function captureTagName(){var i=X.idx+(X.isClosing?2:1);return s.slice(i,B).toLowerCase()}Y<B&&function emitText(){var i=s.slice(Y,B);w(i,Y),Y=B+1}()}var $A=function $A(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.type=s.type||\"tag\",this.name=s.name||\"\",this.isOpening=!!s.isOpening,this.isClosing=!!s.isClosing},UA=function(){function Autolinker(s){void 0===s&&(s={}),this.version=Autolinker.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:\"end\"},this.className=\"\",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(s.urls),this.email=\"boolean\"==typeof s.email?s.email:this.email,this.phone=\"boolean\"==typeof s.phone?s.phone:this.phone,this.hashtag=s.hashtag||this.hashtag,this.mention=s.mention||this.mention,this.newWindow=\"boolean\"==typeof s.newWindow?s.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(s.stripPrefix),this.stripTrailingSlash=\"boolean\"==typeof s.stripTrailingSlash?s.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=\"boolean\"==typeof s.decodePercentEncoding?s.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=s.sanitizeHtml||!1;var i=this.mention;if(!1!==i&&-1===[\"twitter\",\"instagram\",\"soundcloud\",\"tiktok\"].indexOf(i))throw new Error(\"invalid `mention` cfg '\".concat(i,\"' - see docs\"));var u=this.hashtag;if(!1!==u&&-1===NA.indexOf(u))throw new Error(\"invalid `hashtag` cfg '\".concat(u,\"' - see docs\"));this.truncate=this.normalizeTruncateCfg(s.truncate),this.className=s.className||this.className,this.replaceFn=s.replaceFn||this.replaceFn,this.context=s.context||this}return Autolinker.link=function(s,i){return new Autolinker(i).link(s)},Autolinker.parse=function(s,i){return new Autolinker(i).parse(s)},Autolinker.prototype.normalizeUrlsCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{schemeMatches:s,wwwMatches:s,tldMatches:s}:{schemeMatches:\"boolean\"!=typeof s.schemeMatches||s.schemeMatches,wwwMatches:\"boolean\"!=typeof s.wwwMatches||s.wwwMatches,tldMatches:\"boolean\"!=typeof s.tldMatches||s.tldMatches}},Autolinker.prototype.normalizeStripPrefixCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{scheme:s,www:s}:{scheme:\"boolean\"!=typeof s.scheme||s.scheme,www:\"boolean\"!=typeof s.www||s.www}},Autolinker.prototype.normalizeTruncateCfg=function(s){return\"number\"==typeof s?{length:s,location:\"end\"}:function defaults(s,i){for(var u in i)i.hasOwnProperty(u)&&void 0===s[u]&&(s[u]=i[u]);return s}(s||{},{length:Number.POSITIVE_INFINITY,location:\"end\"})},Autolinker.prototype.parse=function(s){var i=this,u=[\"a\",\"style\",\"script\"],_=0,w=[];return parseHtml(s,{onOpenTag:function(s){u.indexOf(s)>=0&&_++},onText:function(s,u){if(0===_){var x=function splitAndCapture(s,i){if(!i.global)throw new Error(\"`splitRegex` must have the 'g' flag set\");for(var u,_=[],w=0;u=i.exec(s);)_.push(s.substring(w,u.index)),_.push(u[0]),w=u.index+u[0].length;return _.push(s.substring(w)),_}(s,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),j=u;x.forEach((function(s,u){if(u%2==0){var _=i.parseText(s,j);w.push.apply(w,_)}j+=s.length}))}},onCloseTag:function(s){u.indexOf(s)>=0&&(_=Math.max(_-1,0))},onComment:function(s){},onDoctype:function(s){}}),w=this.compactMatches(w),w=this.removeUnwantedMatches(w)},Autolinker.prototype.compactMatches=function(s){s.sort((function(s,i){return s.getOffset()-i.getOffset()}));for(var i=0;i<s.length-1;){var u=s[i],_=u.getOffset(),w=u.getMatchedText().length,x=_+w;if(i+1<s.length){if(s[i+1].getOffset()===_){var j=s[i+1].getMatchedText().length>w?i:i+1;s.splice(j,1);continue}if(s[i+1].getOffset()<x){s.splice(i+1,1);continue}}i++}return s},Autolinker.prototype.removeUnwantedMatches=function(s){return this.hashtag||utils_remove(s,(function(s){return\"hashtag\"===s.getType()})),this.email||utils_remove(s,(function(s){return\"email\"===s.getType()})),this.phone||utils_remove(s,(function(s){return\"phone\"===s.getType()})),this.mention||utils_remove(s,(function(s){return\"mention\"===s.getType()})),this.urls.schemeMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"scheme\"===s.getUrlMatchType()})),this.urls.wwwMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"www\"===s.getUrlMatchType()})),this.urls.tldMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"tld\"===s.getUrlMatchType()})),s},Autolinker.prototype.parseText=function(s,i){void 0===i&&(i=0),i=i||0;for(var u=this.getMatchers(),_=[],w=0,x=u.length;w<x;w++){for(var j=u[w].parseMatches(s),P=0,B=j.length;P<B;P++)j[P].setOffset(i+j[P].getOffset());_.push.apply(_,j)}return _},Autolinker.prototype.link=function(s){if(!s)return\"\";this.sanitizeHtml&&(s=s.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));for(var i=this.parse(s),u=[],_=0,w=0,x=i.length;w<x;w++){var j=i[w];u.push(s.substring(_,j.getOffset())),u.push(this.createMatchReturnVal(j)),_=j.getOffset()+j.getMatchedText().length}return u.push(s.substring(_)),u.join(\"\")},Autolinker.prototype.createMatchReturnVal=function(s){var i;return this.replaceFn&&(i=this.replaceFn.call(this.context,s)),\"string\"==typeof i?i:!1===i?s.getMatchedText():i instanceof YC?i.toAnchorString():s.buildTag().toAnchorString()},Autolinker.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var s=this.getTagBuilder(),i=[new IA({tagBuilder:s,serviceName:this.hashtag}),new xA({tagBuilder:s}),new TA({tagBuilder:s}),new qA({tagBuilder:s,serviceName:this.mention}),new jA({tagBuilder:s,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=i},Autolinker.prototype.getTagBuilder=function(){var s=this.tagBuilder;return s||(s=this.tagBuilder=new XC({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),s},Autolinker.version=\"3.16.2\",Autolinker.AnchorTagBuilder=XC,Autolinker.HtmlTag=YC,Autolinker.matcher={Email:xA,Hashtag:IA,Matcher:sA,Mention:qA,Phone:TA,Url:jA},Autolinker.match={Email:eA,Hashtag:tA,Match:QC,Mention:rA,Phone:nA,Url:oA},Autolinker}();const zA=UA;var VA=/www|@|\\:\\/\\//;function isLinkOpen(s){return/^<a[>\\s]/i.test(s)}function isLinkClose(s){return/^<\\/a\\s*>/i.test(s)}function createLinkifier(){var s=[],i=new zA({stripPrefix:!1,url:!0,email:!0,replaceFn:function(i){switch(i.getType()){case\"url\":s.push({text:i.matchedText,url:i.getUrl()});break;case\"email\":s.push({text:i.matchedText,url:\"mailto:\"+i.getEmail().replace(/^mailto:/i,\"\")})}return!1}});return{links:s,autolinker:i}}function parseTokens(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z,ee=s.tokens,ie=null;for(u=0,_=ee.length;u<_;u++)if(\"inline\"===ee[u].type)for(Y=0,i=(w=ee[u].children).length-1;i>=0;i--)if(\"link_close\"!==(x=w[i]).type){if(\"htmltag\"===x.type&&(isLinkOpen(x.content)&&Y>0&&Y--,isLinkClose(x.content)&&Y++),!(Y>0)&&\"text\"===x.type&&VA.test(x.content)){if(ie||(X=(ie=createLinkifier()).links,Z=ie.autolinker),j=x.content,X.length=0,Z.link(j),!X.length)continue;for(P=[],U=x.level,B=0;B<X.length;B++)s.inline.validateLink(X[B].url)&&(($=j.indexOf(X[B].text))&&P.push({type:\"text\",content:j.slice(0,$),level:U}),P.push({type:\"link_open\",href:X[B].url,title:\"\",level:U++}),P.push({type:\"text\",content:X[B].text,level:U}),P.push({type:\"link_close\",level:--U}),j=j.slice($+X[B].text.length));j.length&&P.push({type:\"text\",content:j,level:U}),ee[u].children=w=[].concat(w.slice(0,i),P,w.slice(i+1))}}else for(i--;w[i].level!==x.level&&\"link_open\"!==w[i].type;)i--}function linkify(s){s.core.ruler.push(\"linkify\",parseTokens)}var WA=__webpack_require__(42838),KA=__webpack_require__.n(WA);KA().addHook&&KA().addHook(\"beforeSanitizeElements\",(function(s){return s.href&&s.setAttribute(\"rel\",\"noopener noreferrer\"),s}));const HA=function Markdown({source:s,className:i=\"\",getConfigs:u=(()=>({useUnsafeMarkdown:!1}))}){if(\"string\"!=typeof s)return null;const _=new Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(linkify);_.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:w}=u(),x=_.render(s),j=sanitizer(x,{useUnsafeMarkdown:w});return s&&x&&j?We.createElement(\"div\",{className:KO()(i,\"markdown\"),dangerouslySetInnerHTML:{__html:j}}):null};function sanitizer(s,{useUnsafeMarkdown:i=!1}={}){const u=i,_=i?[]:[\"style\",\"class\"];return i&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),KA().sanitize(s,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:u,FORBID_ATTR:_})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends We.Component{render(){const{errSelectors:s,specSelectors:i,getComponent:u}=this.props,_=u(\"SvgAssets\"),w=u(\"InfoContainer\",!0),x=u(\"VersionPragmaFilter\"),j=u(\"operations\",!0),P=u(\"Models\",!0),B=u(\"Webhooks\",!0),$=u(\"Row\"),U=u(\"Col\"),Y=u(\"errors\",!0),X=u(\"ServersContainer\",!0),Z=u(\"SchemesContainer\",!0),ee=u(\"AuthorizeBtnContainer\",!0),ie=u(\"FilterContainer\",!0),ae=i.isSwagger2(),le=i.isOAS3(),ce=i.isOAS31(),pe=!i.specStr(),de=i.loadingStatus();let fe=null;if(\"loading\"===de&&(fe=We.createElement(\"div\",{className:\"info\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"div\",{className:\"loading\"})))),\"failed\"===de&&(fe=We.createElement(\"div\",{className:\"info\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),We.createElement(Y,null)))),\"failedConfig\"===de){const i=s.lastError(),u=i?i.get(\"message\"):\"\";fe=We.createElement(\"div\",{className:\"info failed-config\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),We.createElement(\"p\",null,u)))}if(!fe&&pe&&(fe=We.createElement(\"h4\",null,\"No API definition provided.\")),fe)return We.createElement(\"div\",{className:\"swagger-ui\"},We.createElement(\"div\",{className:\"loading-container\"},fe));const ye=i.servers(),be=i.schemes(),_e=ye&&ye.size,we=be&&be.size,Se=!!i.securityDefinitions();return We.createElement(\"div\",{className:\"swagger-ui\"},We.createElement(_,null),We.createElement(x,{isSwagger2:ae,isOAS3:le,alsoShow:We.createElement(Y,null)},We.createElement(Y,null),We.createElement($,{className:\"information-container\"},We.createElement(U,{mobile:12},We.createElement(w,null))),_e||we||Se?We.createElement(\"div\",{className:\"scheme-container\"},We.createElement(U,{className:\"schemes wrapper\",mobile:12},_e||we?We.createElement(\"div\",{className:\"schemes-server-container\"},_e?We.createElement(X,null):null,we?We.createElement(Z,null):null):null,Se?We.createElement(ee,null):null)):null,We.createElement(ie,null),We.createElement($,null,We.createElement(U,{mobile:12,desktop:12},We.createElement(j,null))),ce&&We.createElement($,{className:\"webhooks-container\"},We.createElement(U,{mobile:12,desktop:12},We.createElement(B,null))),We.createElement($,null,We.createElement(U,{mobile:12,desktop:12},We.createElement(P,null)))))}}const core_components=()=>({components:{App:$O,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:tC,InfoContainer,InfoUrl,InfoBasePath,Contact:rC,License:nC,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:operation_Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,highlightCode:highlight_code,responses:responses_Responses,response:response_Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,schemes:Schemes,SchemesContainer,modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,Property:property,TryItOutButton,Markdown:HA,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example:example_Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{...we}});var JA=__webpack_require__(24677),GA=__webpack_require__.n(JA);const YA={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,Xe.List)()};class JsonSchemaForm extends We.Component{static defaultProps=YA;componentDidMount(){const{dispatchInitialValue:s,value:i,onChange:u}=this.props;s?u(i):!1===s&&u(\"\")}render(){let{schema:s,errors:i,value:u,onChange:_,getComponent:w,fn:x,disabled:j}=this.props;const P=s&&s.get?s.get(\"format\"):null,B=s&&s.get?s.get(\"type\"):null;let getComponentSilently=s=>w(s,!1,{failSilently:!0}),$=B?getComponentSilently(P?`JsonSchema_${B}_${P}`:`JsonSchema_${B}`):w(\"JsonSchema_string\");return $||($=w(\"JsonSchema_string\")),We.createElement($,Co()({},this.props,{errors:i,fn:x,getComponent:w,value:u,onChange:_,schema:s,disabled:j}))}}class JsonSchema_string extends We.Component{static defaultProps=YA;onChange=s=>{const i=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?s.target.files[0]:s.target.value;this.props.onChange(i,this.props.keyName)};onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:i,schema:u,errors:_,required:w,description:x,disabled:j}=this.props;const P=u&&u.get?u.get(\"enum\"):null,B=u&&u.get?u.get(\"format\"):null,$=u&&u.get?u.get(\"type\"):null,U=u&&u.get?u.get(\"in\"):null;if(i||(i=\"\"),_=_.toJS?_.toJS():[],P){const u=s(\"Select\");return We.createElement(u,{className:_.length?\"invalid\":\"\",title:_.length?_:\"\",allowedValues:[...P],value:i,allowEmptyValue:!w,disabled:j,onChange:this.onEnumChange})}const Y=j||U&&\"formData\"===U&&!(\"FormData\"in window),X=s(\"Input\");return $&&\"file\"===$?We.createElement(X,{type:\"file\",className:_.length?\"invalid\":\"\",title:_.length?_:\"\",onChange:this.onChange,disabled:Y}):We.createElement(GA(),{type:B&&\"password\"===B?\"password\":\"text\",className:_.length?\"invalid\":\"\",title:_.length?_:\"\",value:i,minLength:0,debounceTimeout:350,placeholder:x,onChange:this.onChange,disabled:Y})}}class JsonSchema_array extends We.PureComponent{static defaultProps=YA;constructor(s,i){super(s,i),this.state={value:valueOrEmptyList(s.value),schema:s.schema}}UNSAFE_componentWillReceiveProps(s){const i=valueOrEmptyList(s.value);i!==this.state.value&&this.setState({value:i}),s.schema!==this.state.schema&&this.setState({schema:s.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(s,i)=>{this.setState((({value:u})=>({value:u.set(i,s)})),this.onChange)};removeItem=s=>{this.setState((({value:i})=>({value:i.delete(s)})),this.onChange)};addItem=()=>{const{fn:s}=this.props;let i=valueOrEmptyList(this.state.value);this.setState((()=>({value:i.push(s.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=s=>{this.setState((()=>({value:s})),this.onChange)};render(){let{getComponent:s,required:i,schema:u,errors:_,fn:w,disabled:x}=this.props;_=_.toJS?_.toJS():Array.isArray(_)?_:[];const j=_.filter((s=>\"string\"==typeof s)),P=_.filter((s=>void 0!==s.needRemove)).map((s=>s.error)),B=this.state.value,$=!!(B&&B.count&&B.count()>0),U=u.getIn([\"items\",\"enum\"]),Y=u.getIn([\"items\",\"type\"]),X=u.getIn([\"items\",\"format\"]),Z=u.get(\"items\");let ee,ie=!1,ae=\"file\"===Y||\"string\"===Y&&\"binary\"===X;if(Y&&X?ee=s(`JsonSchema_${Y}_${X}`):\"boolean\"!==Y&&\"array\"!==Y&&\"object\"!==Y||(ee=s(`JsonSchema_${Y}`)),ee||ae||(ie=!0),U){const u=s(\"Select\");return We.createElement(u,{className:_.length?\"invalid\":\"\",title:_.length?_:\"\",multiple:!0,value:B,disabled:x,allowedValues:U,allowEmptyValue:!i,onChange:this.onEnumChange})}const le=s(\"Button\");return We.createElement(\"div\",{className:\"json-schema-array\"},$?B.map(((i,u)=>{const j=(0,Xe.fromJS)([..._.filter((s=>s.index===u)).map((s=>s.error))]);return We.createElement(\"div\",{key:u,className:\"json-schema-form-item\"},ae?We.createElement(JsonSchemaArrayItemFile,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j,getComponent:s}):ie?We.createElement(JsonSchemaArrayItemText,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j}):We.createElement(ee,Co()({},this.props,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j,schema:Z,getComponent:s,fn:w})),x?null:We.createElement(le,{className:`btn btn-sm json-schema-form-item-remove ${P.length?\"invalid\":null}`,title:P.length?P:\"\",onClick:()=>this.removeItem(u)},\" - \"))})):null,x?null:We.createElement(le,{className:`btn btn-sm json-schema-form-item-add ${j.length?\"invalid\":null}`,title:j.length?j:\"\",onClick:this.addItem},\"Add \",Y?`${Y} `:\"\",\"item\"))}}class JsonSchemaArrayItemText extends We.Component{static defaultProps=YA;onChange=s=>{const i=s.target.value;this.props.onChange(i,this.props.keyName)};render(){let{value:s,errors:i,description:u,disabled:_}=this.props;return s||(s=\"\"),i=i.toJS?i.toJS():[],We.createElement(GA(),{type:\"text\",className:i.length?\"invalid\":\"\",title:i.length?i:\"\",value:s,minLength:0,debounceTimeout:350,placeholder:u,onChange:this.onChange,disabled:_})}}class JsonSchemaArrayItemFile extends We.Component{static defaultProps=YA;onFileChange=s=>{const i=s.target.files[0];this.props.onChange(i,this.props.keyName)};render(){let{getComponent:s,errors:i,disabled:u}=this.props;const _=s(\"Input\"),w=u||!(\"FormData\"in window);return We.createElement(_,{type:\"file\",className:i.length?\"invalid\":\"\",title:i.length?i:\"\",onChange:this.onFileChange,disabled:w})}}class JsonSchema_boolean extends We.Component{static defaultProps=YA;onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:i,errors:u,schema:_,required:w,disabled:x}=this.props;u=u.toJS?u.toJS():[];let j=_&&_.get?_.get(\"enum\"):null,P=!j||!w,B=!j&&[\"true\",\"false\"];const $=s(\"Select\");return We.createElement($,{className:u.length?\"invalid\":\"\",title:u.length?u:\"\",value:String(i),disabled:x,allowedValues:j?[...j]:B,allowEmptyValue:P,onChange:this.onEnumChange})}}const stringifyObjectErrors=s=>s.map((s=>{const i=void 0!==s.propKey?s.propKey:s.index;let u=\"string\"==typeof s?s:\"string\"==typeof s.error?s.error:null;if(!i&&u)return u;let _=s.error,w=`/${s.propKey}`;for(;\"object\"==typeof _;){const s=void 0!==_.propKey?_.propKey:_.index;if(void 0===s)break;if(w+=`/${s}`,!_.error)break;_=_.error}return`${w}: ${_}`}));class JsonSchema_object extends We.PureComponent{constructor(){super()}static defaultProps=YA;onChange=s=>{this.props.onChange(s)};handleOnChange=s=>{const i=s.target.value;this.onChange(i)};render(){let{getComponent:s,value:i,errors:u,disabled:_}=this.props;const w=s(\"TextArea\");return u=u.toJS?u.toJS():Array.isArray(u)?u:[],We.createElement(\"div\",null,We.createElement(w,{className:KO()({invalid:u.length}),title:u.length?stringifyObjectErrors(u).join(\", \"):\"\",value:stringify(i),disabled:_,onChange:this.handleOnChange}))}}function valueOrEmptyList(s){return Xe.List.isList(s)?s:Array.isArray(s)?(0,Xe.fromJS)(s):(0,Xe.List)()}const json_schema_components=()=>({components:{...Se}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5_samples,core_components,form_components,swagger_client,json_schema_components,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,safe_render()],XA=(0,Xe.Map)();function onlyOAS3(s){return(i,u)=>(..._)=>{if(u.getSystem().specSelectors.isOAS3()){const i=s(..._);return\"function\"==typeof i?i(u):i}return i(..._)}}const QA=onlyOAS3(Cs()(null)),ZA=onlyOAS3(((s,i)=>s=>s.getSystem().specSelectors.findSchema(i))),nj=onlyOAS3((()=>s=>{const i=s.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return Xe.Map.isMap(i)?i:XA})),fj=onlyOAS3((()=>s=>s.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),gj=onlyOAS3(Gt(Ds,(s=>s.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(s,i)=>(u,..._)=>i.specSelectors.isOAS3()?i.oas3Selectors.validOperationMethods():s(..._),_j=QA,Oj=QA,Cj=QA,Aj=QA,Dj=QA;const Bj=function wrap_selectors_onlyOAS3(s){return(i,u)=>(..._)=>{if(u.getSystem().specSelectors.isOAS3()){let i=u.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return s(u,i,..._)}return i(..._)}}(Gt((s=>s),(({specSelectors:s})=>s.securityDefinitions()),((s,i)=>{let u=(0,Xe.List)();return i?(i.entrySeq().forEach((([s,i])=>{const _=i.get(\"type\");if(\"oauth2\"===_&&i.get(\"flows\").entrySeq().forEach((([_,w])=>{let x=(0,Xe.fromJS)({flow:_,authorizationUrl:w.get(\"authorizationUrl\"),tokenUrl:w.get(\"tokenUrl\"),scopes:w.get(\"scopes\"),type:i.get(\"type\"),description:i.get(\"description\")});u=u.push(new Xe.Map({[s]:x.filter((s=>void 0!==s))}))})),\"http\"!==_&&\"apiKey\"!==_||(u=u.push(new Xe.Map({[s]:i}))),\"openIdConnect\"===_&&i.get(\"openIdConnectData\")){let _=i.get(\"openIdConnectData\");(_.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((w=>{let x=_.get(\"scopes_supported\")&&_.get(\"scopes_supported\").reduce(((s,i)=>s.set(i,\"\")),new Xe.Map),j=(0,Xe.fromJS)({flow:w,authorizationUrl:_.get(\"authorization_endpoint\"),tokenUrl:_.get(\"token_endpoint\"),scopes:x,type:\"oauth2\",openIdConnectUrl:i.get(\"openIdConnectUrl\")});u=u.push(new Xe.Map({[s]:j.filter((s=>void 0!==s))}))}))}})),u):u})));function OAS3ComponentWrapFactory(s){return(i,u)=>_=>\"function\"==typeof u.specSelectors?.isOAS3?u.specSelectors.isOAS3()?We.createElement(s,Co()({},_,u,{Ori:i})):We.createElement(i,_):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const Lj=(0,Xe.Map)(),selectors_isSwagger2=()=>s=>function isSwagger2(s){const i=s.get(\"swagger\");return\"string\"==typeof i&&\"2.0\"===i}(s.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>s=>function isOAS30(s){const i=s.get(\"openapi\");return\"string\"==typeof i&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(i)}(s.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>s=>s.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(s){return(i,...u)=>_=>{if(_.specSelectors.isOAS3()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null}}const $j=selectors_onlyOAS3((()=>s=>s.specSelectors.specJson().get(\"servers\",Lj))),findSchema=(s,i)=>{const u=s.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",i],null),_=s.getIn([\"json\",\"components\",\"schemas\",i],null);return u||_||null},Kj=selectors_onlyOAS3(((s,{callbacks:i,specPath:u})=>s=>{const _=s.specSelectors.validOperationMethods();return Xe.Map.isMap(i)?i.reduce(((s,i,w)=>{if(!Xe.Map.isMap(i))return s;const x=i.reduce(((s,i,x)=>{if(!Xe.Map.isMap(i))return s;const j=i.entrySeq().filter((([s])=>_.includes(s))).map((([s,i])=>({operation:(0,Xe.Map)({operation:i}),method:s,path:x,callbackName:w,specPath:u.concat([w,x,s])})));return s.concat(j)}),(0,Xe.List)());return s.concat(x)}),(0,Xe.List)()).groupBy((s=>s.callbackName)).map((s=>s.toArray())).toObject():{}})),callbacks=({callbacks:s,specPath:i,specSelectors:u,getComponent:_})=>{const w=u.callbacksOperations({callbacks:s,specPath:i}),x=Object.keys(w),j=_(\"OperationContainer\",!0);return 0===x.length?We.createElement(\"span\",null,\"No callbacks\"):We.createElement(\"div\",null,x.map((s=>We.createElement(\"div\",{key:`${s}`},We.createElement(\"h2\",null,s),w[s].map((i=>We.createElement(j,{key:`${s}-${i.path}-${i.method}`,op:i.operation,tag:\"callbacks\",method:i.method,path:i.path,specPath:i.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(s,i,u,_)=>{const w=s.getIn([\"content\",i])??(0,Xe.OrderedMap)(),x=w.get(\"schema\",(0,Xe.OrderedMap)()).toJS(),j=void 0!==w.get(\"examples\"),P=w.get(\"example\"),B=j?w.getIn([\"examples\",u,\"value\"]):P;return stringify(_.getSampleSchema(x,i,{includeWriteOnly:!0},B))},components_request_body=({userHasEditedBody:s,requestBody:i,requestBodyValue:u,requestBodyInclusionSetting:_,requestBodyErrors:w,getComponent:x,getConfigs:j,specSelectors:P,fn:B,contentType:$,isExecute:U,specPath:Y,onChange:X,onChangeIncludeEmpty:Z,activeExamplesKey:ee,updateActiveExamplesKey:ie,setRetainRequestBodyValueFlag:ae})=>{const handleFile=s=>{X(s.target.files[0])},setIsIncludedOptions=s=>{let i={key:s,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===_.get(s,\"no value\")&&(i.shouldDispatchInit=!0),i},le=x(\"Markdown\",!0),ce=x(\"modelExample\"),pe=x(\"RequestBodyEditor\"),de=x(\"highlightCode\"),fe=x(\"ExamplesSelectValueRetainer\"),ye=x(\"Example\"),be=x(\"ParameterIncludeEmpty\"),{showCommonExtensions:_e}=j(),we=i?.get(\"description\")??null,Se=i?.get(\"content\")??new Xe.OrderedMap;$=$||Se.keySeq().first()||\"\";const xe=Se.get($)??(0,Xe.OrderedMap)(),Pe=xe.get(\"schema\",(0,Xe.OrderedMap)()),Te=xe.get(\"examples\",null),Re=Te?.map(((s,u)=>{const _=s?.get(\"value\",null);return _&&(s=s.set(\"value\",getDefaultRequestBodyValue(i,$,u,B),_)),s}));if(w=Xe.List.isList(w)?w:(0,Xe.List)(),!xe.size)return null;const qe=\"object\"===xe.getIn([\"schema\",\"type\"]),$e=\"binary\"===xe.getIn([\"schema\",\"format\"]),ze=\"base64\"===xe.getIn([\"schema\",\"format\"]);if(\"application/octet-stream\"===$||0===$.indexOf(\"image/\")||0===$.indexOf(\"audio/\")||0===$.indexOf(\"video/\")||$e||ze){const s=x(\"Input\");return U?We.createElement(s,{type:\"file\",onChange:handleFile}):We.createElement(\"i\",null,\"Example values are not available for \",We.createElement(\"code\",null,$),\" media types.\")}if(qe&&(\"application/x-www-form-urlencoded\"===$||0===$.indexOf(\"multipart/\"))&&Pe.get(\"properties\",(0,Xe.OrderedMap)()).size>0){const s=x(\"JsonSchemaForm\"),i=x(\"ParameterExt\"),j=Pe.get(\"properties\",(0,Xe.OrderedMap)());return u=Xe.Map.isMap(u)?u:(0,Xe.OrderedMap)(),We.createElement(\"div\",{className:\"table-container\"},we&&We.createElement(le,{source:we}),We.createElement(\"table\",null,We.createElement(\"tbody\",null,Xe.Map.isMap(j)&&j.entrySeq().map((([j,P])=>{if(P.get(\"readOnly\"))return;let $=_e?getCommonExtensions(P):null;const Y=Pe.get(\"required\",(0,Xe.List)()).includes(j),ee=P.get(\"type\"),ie=P.get(\"format\"),ae=P.get(\"description\"),ce=u.getIn([j,\"value\"]),pe=u.getIn([j,\"errors\"])||w,de=_.get(j)||!1,fe=P.has(\"default\")||P.has(\"example\")||P.hasIn([\"items\",\"example\"])||P.hasIn([\"items\",\"default\"]),ye=P.has(\"enum\")&&(1===P.get(\"enum\").size||Y),we=fe||ye;let Se=\"\";\"array\"!==ee||we||(Se=[]),(\"object\"===ee||we)&&(Se=B.getSampleSchema(P,!1,{includeWriteOnly:!0})),\"string\"!=typeof Se&&\"object\"===ee&&(Se=stringify(Se)),\"string\"==typeof Se&&\"array\"===ee&&(Se=JSON.parse(Se));const xe=\"string\"===ee&&(\"binary\"===ie||\"base64\"===ie);return We.createElement(\"tr\",{key:j,className:\"parameters\",\"data-property-name\":j},We.createElement(\"td\",{className:\"parameters-col_name\"},We.createElement(\"div\",{className:Y?\"parameter__name required\":\"parameter__name\"},j,Y?We.createElement(\"span\",null,\" *\"):null),We.createElement(\"div\",{className:\"parameter__type\"},ee,ie&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",ie,\")\"),_e&&$.size?$.entrySeq().map((([s,u])=>We.createElement(i,{key:`${s}-${u}`,xKey:s,xVal:u}))):null),We.createElement(\"div\",{className:\"parameter__deprecated\"},P.get(\"deprecated\")?\"deprecated\":null)),We.createElement(\"td\",{className:\"parameters-col_description\"},We.createElement(le,{source:ae}),U?We.createElement(\"div\",null,We.createElement(s,{fn:B,dispatchInitialValue:!xe,schema:P,description:j,getComponent:x,value:void 0===ce?Se:ce,required:Y,errors:pe,onChange:s=>{X(s,[j])}}),Y?null:We.createElement(be,{onChange:s=>Z(j,s),isIncluded:de,isIncludedOptions:setIsIncludedOptions(j),isDisabled:Array.isArray(ce)?0!==ce.length:!isEmptyValue(ce)})):null))})))))}const He=getDefaultRequestBodyValue(i,$,ee,B);let Ye=null;return getKnownSyntaxHighlighterLanguage(He)&&(Ye=\"json\"),We.createElement(\"div\",null,we&&We.createElement(le,{source:we}),Re?We.createElement(fe,{userHasEditedBody:s,examples:Re,currentKey:ee,currentUserInputValue:u,onSelect:s=>{ie(s)},updateValue:X,defaultToFirstExample:!0,getComponent:x,setRetainRequestBodyValueFlag:ae}):null,U?We.createElement(\"div\",null,We.createElement(pe,{value:u,errors:w,defaultValue:He,onChange:X,getComponent:x})):We.createElement(ce,{getComponent:x,getConfigs:j,specSelectors:P,expandDepth:1,isExecute:U,schema:xe.get(\"schema\"),specPath:Y.push(\"content\",$),example:We.createElement(de,{className:\"body-param__example\",getConfigs:j,language:Ye,value:stringify(u)||He}),includeWriteOnly:!0}),Re?We.createElement(ye,{example:Re.get(ee),getComponent:x,getConfigs:j}):null)};class operation_link_OperationLink extends We.Component{render(){const{link:s,name:i,getComponent:u}=this.props,_=u(\"Markdown\",!0);let w=s.get(\"operationId\")||s.get(\"operationRef\"),x=s.get(\"parameters\")&&s.get(\"parameters\").toJS(),j=s.get(\"description\");return We.createElement(\"div\",{className:\"operation-link\"},We.createElement(\"div\",{className:\"description\"},We.createElement(\"b\",null,We.createElement(\"code\",null,i)),j?We.createElement(_,{source:j}):null),We.createElement(\"pre\",null,\"Operation `\",w,\"`\",We.createElement(\"br\",null),We.createElement(\"br\",null),\"Parameters \",function padString(s,i){if(\"string\"!=typeof i)return\"\";return i.split(\"\\n\").map(((i,u)=>u>0?Array(s+1).join(\" \")+i:i)).join(\"\\n\")}(0,JSON.stringify(x,null,2))||\"{}\",We.createElement(\"br\",null)))}}const Hj=operation_link_OperationLink,components_servers=({servers:s,currentServer:i,setSelectedServer:u,setServerVariableValue:_,getServerVariable:w,getEffectiveServerValue:x})=>{const j=(s.find((s=>s.get(\"url\")===i))||(0,Xe.OrderedMap)()).get(\"variables\")||(0,Xe.OrderedMap)(),P=0!==j.size;(0,We.useEffect)((()=>{i||u(s.first()?.get(\"url\"))}),[]),(0,We.useEffect)((()=>{const w=s.find((s=>s.get(\"url\")===i));if(!w)return void u(s.first().get(\"url\"));(w.get(\"variables\")||(0,Xe.OrderedMap)()).map(((s,u)=>{_({server:i,key:u,val:s.get(\"default\")||\"\"})}))}),[i,s]);const B=(0,We.useCallback)((s=>{u(s.target.value)}),[u]),$=(0,We.useCallback)((s=>{const u=s.target.getAttribute(\"data-variable\"),w=s.target.value;_({server:i,key:u,val:w})}),[_,i]);return We.createElement(\"div\",{className:\"servers\"},We.createElement(\"label\",{htmlFor:\"servers\"},We.createElement(\"select\",{onChange:B,value:i,id:\"servers\"},s.valueSeq().map((s=>We.createElement(\"option\",{value:s.get(\"url\"),key:s.get(\"url\")},s.get(\"url\"),s.get(\"description\")&&` - ${s.get(\"description\")}`))).toArray())),P&&We.createElement(\"div\",null,We.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",We.createElement(\"code\",null,x(i))),We.createElement(\"h4\",null,\"Server variables\"),We.createElement(\"table\",null,We.createElement(\"tbody\",null,j.entrySeq().map((([s,u])=>We.createElement(\"tr\",{key:s},We.createElement(\"td\",null,s),We.createElement(\"td\",null,u.get(\"enum\")?We.createElement(\"select\",{\"data-variable\":s,onChange:$},u.get(\"enum\").map((u=>We.createElement(\"option\",{selected:u===w(i,s),key:u,value:u},u)))):We.createElement(\"input\",{type:\"text\",value:w(i,s)||\"\",onChange:$,\"data-variable\":s})))))))))};class ServersContainer extends We.Component{render(){const{specSelectors:s,oas3Selectors:i,oas3Actions:u,getComponent:_}=this.props,w=s.servers(),x=_(\"Servers\");return w&&w.size?We.createElement(\"div\",null,We.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),We.createElement(x,{servers:w,currentServer:i.selectedServer(),setSelectedServer:u.setSelectedServer,setServerVariableValue:u.setServerVariableValue,getServerVariable:i.serverVariableValue,getEffectiveServerValue:i.serverEffectiveValue})):null}}const Yj=Function.prototype;class RequestBodyEditor extends We.PureComponent{static defaultProps={onChange:Yj,userHasEditedBody:!1};constructor(s,i){super(s,i),this.state={value:stringify(s.value)||s.defaultValue},s.onChange(s.value)}applyDefaultValue=s=>{const{onChange:i,defaultValue:u}=s||this.props;return this.setState({value:u}),i(u)};onChange=s=>{this.props.onChange(stringify(s))};onDomChange=s=>{const i=s.target.value;this.setState({value:i},(()=>this.onChange(i)))};UNSAFE_componentWillReceiveProps(s){this.props.value!==s.value&&s.value!==this.state.value&&this.setState({value:stringify(s.value)}),!s.value&&s.defaultValue&&this.state.value&&this.applyDefaultValue(s)}render(){let{getComponent:s,errors:i}=this.props,{value:u}=this.state,_=i.size>0;const w=s(\"TextArea\");return We.createElement(\"div\",{className:\"body-param\"},We.createElement(w,{className:KO()(\"body-param__text\",{invalid:_}),title:i.size?i.join(\", \"):\"\",value:u,onChange:this.onDomChange}))}}class HttpAuth extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_}=this.props,w=this.getValue();this.state={name:u,schema:_,value:w}}getValue(){let{name:s,authorized:i}=this.props;return i&&i.getIn([s,\"value\"])}onChange=s=>{let{onChange:i}=this.props,{value:u,name:_}=s.target,w=Object.assign({},this.state.value);_?w[_]=u:w=u,this.setState({value:w},(()=>i(this.state)))};render(){let{schema:s,getComponent:i,errSelectors:u,name:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"Markdown\",!0),$=i(\"JumpToPath\",!0),U=(s.get(\"scheme\")||\"\").toLowerCase();let Y=this.getValue(),X=u.allErrors().filter((s=>s.get(\"authId\")===_));if(\"basic\"===U){let i=Y?Y.get(\"username\"):null;return We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\"  (http, Basic)\",We.createElement($,{path:[\"securityDefinitions\",_]})),i&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),i?We.createElement(\"code\",null,\" \",i,\" \"):We.createElement(j,null,We.createElement(w,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),i?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),X.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}return\"bearer\"===U?We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\"  (http, Bearer)\",We.createElement($,{path:[\"securityDefinitions\",_]})),Y&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),Y?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),X.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i})))):We.createElement(\"div\",null,We.createElement(\"em\",null,We.createElement(\"b\",null,_),\" HTTP authentication: unsupported scheme \",`'${U}'`))}}class operation_servers_OperationServers extends We.Component{setSelectedServer=s=>{const{path:i,method:u}=this.props;return this.forceUpdate(),this.props.setSelectedServer(s,`${i}:${u}`)};setServerVariableValue=s=>{const{path:i,method:u}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...s,namespace:`${i}:${u}`})};getSelectedServer=()=>{const{path:s,method:i}=this.props;return this.props.getSelectedServer(`${s}:${i}`)};getServerVariable=(s,i)=>{const{path:u,method:_}=this.props;return this.props.getServerVariable({namespace:`${u}:${_}`,server:s},i)};getEffectiveServerValue=s=>{const{path:i,method:u}=this.props;return this.props.getEffectiveServerValue({server:s,namespace:`${i}:${u}`})};render(){const{operationServers:s,pathServers:i,getComponent:u}=this.props;if(!s&&!i)return null;const _=u(\"Servers\"),w=s||i,x=s?\"operation\":\"path\";return We.createElement(\"div\",{className:\"opblock-section operation-servers\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"h4\",{className:\"message\"},\"These \",x,\"-level options override the global server options.\"),We.createElement(_,{servers:w,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const eP={Callbacks:callbacks,HttpAuth,RequestBody:components_request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers:operation_servers_OperationServers,operationLink:Hj},tP=new Remarkable(\"commonmark\");tP.block.ruler.enable([\"table\"]),tP.set({linkTarget:\"_blank\"});const rP=OAS3ComponentWrapFactory((({source:s,className:i=\"\",getConfigs:u=(()=>({useUnsafeMarkdown:!1}))})=>{if(\"string\"!=typeof s)return null;if(s){const{useUnsafeMarkdown:_}=u(),w=sanitizer(tP.render(s),{useUnsafeMarkdown:_});let x;return\"string\"==typeof w&&(x=w.trim()),We.createElement(\"div\",{dangerouslySetInnerHTML:{__html:x},className:KO()(i,\"renderedMarkdown\")})}return null})),nP=OAS3ComponentWrapFactory((({Ori:s,...i})=>{const{schema:u,getComponent:_,errSelectors:w,authorized:x,onAuthChange:j,name:P}=i,B=_(\"HttpAuth\");return\"http\"===u.get(\"type\")?We.createElement(B,{key:P,schema:u,name:P,errSelectors:w,authorized:x,getComponent:_,onChange:j}):We.createElement(s,i)})),oP=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends We.Component{render(){let{getConfigs:s,schema:i}=this.props,u=[\"model-box\"],_=null;return!0===i.get(\"deprecated\")&&(u.push(\"deprecated\"),_=We.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),We.createElement(\"div\",{className:u.join(\" \")},_,We.createElement(Model,Co()({},this.props,{getConfigs:s,depth:1,expandDepth:this.props.expandDepth||0})))}}const sP=OAS3ComponentWrapFactory(ModelComponent),iP=OAS3ComponentWrapFactory((({Ori:s,...i})=>{const{schema:u,getComponent:_,errors:w,onChange:x}=i,j=u&&u.get?u.get(\"format\"):null,P=u&&u.get?u.get(\"type\"):null,B=_(\"Input\");return P&&\"string\"===P&&j&&(\"binary\"===j||\"base64\"===j)?We.createElement(B,{type:\"file\",className:w.length?\"invalid\":\"\",title:w.length?w:\"\",onChange:s=>{x(s.target.files[0])},disabled:s.isDisabled}):We.createElement(s,i)})),aP={Markdown:rP,AuthItem:nP,OpenAPIVersion:function OAS30ComponentWrapFactory(s){return(i,u)=>_=>\"function\"==typeof u.specSelectors?.isOAS30?u.specSelectors.isOAS30()?We.createElement(s,Co()({},_,u,{Ori:i})):We.createElement(i,_):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((s=>{const{Ori:i}=s;return We.createElement(i,{oasVersion:\"3.0\"})})),JsonSchema_string:iP,model:sP,onlineValidatorBadge:oP},lP=\"oas3_set_servers\",cP=\"oas3_set_request_body_value\",uP=\"oas3_set_request_body_retain_flag\",pP=\"oas3_set_request_body_inclusion\",hP=\"oas3_set_active_examples_member\",dP=\"oas3_set_request_content_type\",fP=\"oas3_set_response_content_type\",mP=\"oas3_set_server_variable_value\",gP=\"oas3_set_request_body_validate_error\",yP=\"oas3_clear_request_body_validate_error\",vP=\"oas3_clear_request_body_value\";function setSelectedServer(s,i){return{type:lP,payload:{selectedServerUrl:s,namespace:i}}}function setRequestBodyValue({value:s,pathMethod:i}){return{type:cP,payload:{value:s,pathMethod:i}}}const setRetainRequestBodyValueFlag=({value:s,pathMethod:i})=>({type:uP,payload:{value:s,pathMethod:i}});function setRequestBodyInclusion({value:s,pathMethod:i,name:u}){return{type:pP,payload:{value:s,pathMethod:i,name:u}}}function setActiveExamplesMember({name:s,pathMethod:i,contextType:u,contextName:_}){return{type:hP,payload:{name:s,pathMethod:i,contextType:u,contextName:_}}}function setRequestContentType({value:s,pathMethod:i}){return{type:dP,payload:{value:s,pathMethod:i}}}function setResponseContentType({value:s,path:i,method:u}){return{type:fP,payload:{value:s,path:i,method:u}}}function setServerVariableValue({server:s,namespace:i,key:u,val:_}){return{type:mP,payload:{server:s,namespace:i,key:u,val:_}}}const setRequestBodyValidateError=({path:s,method:i,validationErrors:u})=>({type:gP,payload:{path:s,method:i,validationErrors:u}}),clearRequestBodyValidateError=({path:s,method:i})=>({type:yP,payload:{path:s,method:i}}),initRequestBodyValidateError=({pathMethod:s})=>({type:yP,payload:{path:s[0],method:s[1]}}),clearRequestBodyValue=({pathMethod:s})=>({type:vP,payload:{pathMethod:s}});var bP=__webpack_require__(60680),_P=__webpack_require__.n(bP);const oas3_selectors_onlyOAS3=s=>(i,...u)=>_=>{if(_.getSystem().specSelectors.isOAS3()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null};const EP=oas3_selectors_onlyOAS3(((s,i)=>{const u=i?[i,\"selectedServer\"]:[\"selectedServer\"];return s.getIn(u)||\"\"})),wP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"bodyValue\"])||null)),SP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(s,i,u)=>s=>{const{oas3Selectors:_,specSelectors:w,fn:x}=s.getSystem();if(w.isOAS3()){const s=_.requestContentType(i,u);if(s)return getDefaultRequestBodyValue(w.specResolvedSubtree([\"paths\",i,u,\"requestBody\"]),s,_.activeExamplesMember(i,u,\"requestBody\",\"requestBody\"),x)}return null},xP=oas3_selectors_onlyOAS3(((s,i,u)=>s=>{const{oas3Selectors:_,specSelectors:w,fn:x}=s;let j=!1;const P=_.requestContentType(i,u);let B=_.requestBodyValue(i,u);const $=w.specResolvedSubtree([\"paths\",i,u,\"requestBody\"]);if(!$)return!1;if(Xe.Map.isMap(B)&&(B=stringify(B.mapEntries((s=>Xe.Map.isMap(s[1])?[s[0],s[1].get(\"value\")]:s)).toJS())),Xe.List.isList(B)&&(B=stringify(B)),P){const s=getDefaultRequestBodyValue($,P,_.activeExamplesMember(i,u,\"requestBody\",\"requestBody\"),x);j=!!B&&B!==s}return j})),kP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"bodyInclusion\"])||(0,Xe.Map)())),OP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"errors\"])||null)),CP=oas3_selectors_onlyOAS3(((s,i,u,_,w)=>s.getIn([\"examples\",i,u,_,w,\"activeExample\"])||null)),AP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"requestContentType\"])||null)),jP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"responseContentType\"])||null)),PP=oas3_selectors_onlyOAS3(((s,i,u)=>{let _;if(\"string\"!=typeof i){const{server:s,namespace:w}=i;_=w?[w,\"serverVariableValues\",s,u]:[\"serverVariableValues\",s,u]}else{_=[\"serverVariableValues\",i,u]}return s.getIn(_)||null})),IP=oas3_selectors_onlyOAS3(((s,i)=>{let u;if(\"string\"!=typeof i){const{server:s,namespace:_}=i;u=_?[_,\"serverVariableValues\",s]:[\"serverVariableValues\",s]}else{u=[\"serverVariableValues\",i]}return s.getIn(u)||(0,Xe.OrderedMap)()})),NP=oas3_selectors_onlyOAS3(((s,i)=>{var u,_;if(\"string\"!=typeof i){const{server:w,namespace:x}=i;_=w,u=x?s.getIn([x,\"serverVariableValues\",_]):s.getIn([\"serverVariableValues\",_])}else _=i,u=s.getIn([\"serverVariableValues\",_]);u=u||(0,Xe.OrderedMap)();let w=_;return u.map(((s,i)=>{w=w.replace(new RegExp(`{${_P()(i)}}`,\"g\"),s)})),w})),MP=function validateRequestBodyIsRequired(s){return(...i)=>u=>{const _=u.getSystem().specSelectors.specJson();let w=[...i][1]||[];return!_.getIn([\"paths\",...w,\"requestBody\",\"required\"])||s(...i)}}(((s,i)=>((s,i)=>(i=i||[],!!s.getIn([\"requestData\",...i,\"bodyValue\"])))(s,i))),validateShallowRequired=(s,{oas3RequiredRequestBodyContentType:i,oas3RequestContentType:u,oas3RequestBodyValue:_})=>{let w=[];if(!Xe.Map.isMap(_))return w;let x=[];return Object.keys(i.requestContentType).forEach((s=>{if(s===u){i.requestContentType[s].forEach((s=>{x.indexOf(s)<0&&x.push(s)}))}})),x.forEach((s=>{_.getIn([s,\"value\"])||w.push(s)})),w},TP=Cs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),RP={[lP]:(s,{payload:{selectedServerUrl:i,namespace:u}})=>{const _=u?[u,\"selectedServer\"]:[\"selectedServer\"];return s.setIn(_,i)},[cP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;if(!Xe.Map.isMap(i))return s.setIn([\"requestData\",_,w,\"bodyValue\"],i);let x,j=s.getIn([\"requestData\",_,w,\"bodyValue\"])||(0,Xe.Map)();Xe.Map.isMap(j)||(j=(0,Xe.Map)());const[...P]=i.keys();return P.forEach((s=>{let u=i.getIn([s]);j.has(s)&&Xe.Map.isMap(u)||(x=j.setIn([s,\"value\"],u))})),s.setIn([\"requestData\",_,w,\"bodyValue\"],x)},[uP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;return s.setIn([\"requestData\",_,w,\"retainBodyValue\"],i)},[pP]:(s,{payload:{value:i,pathMethod:u,name:_}})=>{let[w,x]=u;return s.setIn([\"requestData\",w,x,\"bodyInclusion\",_],i)},[hP]:(s,{payload:{name:i,pathMethod:u,contextType:_,contextName:w}})=>{let[x,j]=u;return s.setIn([\"examples\",x,j,_,w,\"activeExample\"],i)},[dP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;return s.setIn([\"requestData\",_,w,\"requestContentType\"],i)},[fP]:(s,{payload:{value:i,path:u,method:_}})=>s.setIn([\"requestData\",u,_,\"responseContentType\"],i),[mP]:(s,{payload:{server:i,namespace:u,key:_,val:w}})=>{const x=u?[u,\"serverVariableValues\",i,_]:[\"serverVariableValues\",i,_];return s.setIn(x,w)},[gP]:(s,{payload:{path:i,method:u,validationErrors:_}})=>{let w=[];if(w.push(\"Required field is not provided\"),_.missingBodyValue)return s.setIn([\"requestData\",i,u,\"errors\"],(0,Xe.fromJS)(w));if(_.missingRequiredKeys&&_.missingRequiredKeys.length>0){const{missingRequiredKeys:x}=_;return s.updateIn([\"requestData\",i,u,\"bodyValue\"],(0,Xe.fromJS)({}),(s=>x.reduce(((s,i)=>s.setIn([i,\"errors\"],(0,Xe.fromJS)(w))),s)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),s},[yP]:(s,{payload:{path:i,method:u}})=>{const _=s.getIn([\"requestData\",i,u,\"bodyValue\"]);if(!Xe.Map.isMap(_))return s.setIn([\"requestData\",i,u,\"errors\"],(0,Xe.fromJS)([]));const[...w]=_.keys();return w?s.updateIn([\"requestData\",i,u,\"bodyValue\"],(0,Xe.fromJS)({}),(s=>w.reduce(((s,i)=>s.setIn([i,\"errors\"],(0,Xe.fromJS)([]))),s))):s},[vP]:(s,{payload:{pathMethod:i}})=>{let[u,_]=i;const w=s.getIn([\"requestData\",u,_,\"bodyValue\"]);return w?Xe.Map.isMap(w)?s.setIn([\"requestData\",u,_,\"bodyValue\"],(0,Xe.Map)()):s.setIn([\"requestData\",u,_,\"bodyValue\"],\"\"):s}};function oas3(){return{components:eP,wrapComponents:aP,statePlugins:{spec:{wrapSelectors:xe,selectors:Te},auth:{wrapSelectors:Pe},oas3:{actions:{...Re},reducers:RP,selectors:{...qe}}}}}const webhooks=({specSelectors:s,getComponent:i})=>{const u=s.selectWebhooksOperations(),_=Object.keys(u),w=i(\"OperationContainer\",!0);return 0===_.length?null:We.createElement(\"div\",{className:\"webhooks\"},We.createElement(\"h2\",null,\"Webhooks\"),_.map((s=>We.createElement(\"div\",{key:`${s}-webhook`},u[s].map((i=>We.createElement(w,{key:`${s}-${i.method}-webhook`,op:i.operation,tag:\"webhooks\",method:i.method,path:s,specPath:i.specPath,allowTryItOut:!1})))))))},oas31_components_license=({getComponent:s,specSelectors:i})=>{const u=i.selectLicenseNameField(),_=i.selectLicenseUrl(),w=s(\"Link\");return We.createElement(\"div\",{className:\"info__license\"},_?We.createElement(\"div\",{className:\"info__license__url\"},We.createElement(w,{target:\"_blank\",href:sanitizeUrl(_)},u)):We.createElement(\"span\",null,u))},oas31_components_contact=({getComponent:s,specSelectors:i})=>{const u=i.selectContactNameField(),_=i.selectContactUrl(),w=i.selectContactEmailField(),x=s(\"Link\");return We.createElement(\"div\",{className:\"info__contact\"},_&&We.createElement(\"div\",null,We.createElement(x,{href:sanitizeUrl(_),target:\"_blank\"},u,\" - Website\")),w&&We.createElement(x,{href:sanitizeUrl(`mailto:${w}`)},_?`Send email to ${u}`:`Contact ${u}`))},oas31_components_info=({getComponent:s,specSelectors:i})=>{const u=i.version(),_=i.url(),w=i.basePath(),x=i.host(),j=i.selectInfoSummaryField(),P=i.selectInfoDescriptionField(),B=i.selectInfoTitleField(),$=i.selectInfoTermsOfServiceUrl(),U=i.selectExternalDocsUrl(),Y=i.selectExternalDocsDescriptionField(),X=i.contact(),Z=i.license(),ee=s(\"Markdown\",!0),ie=s(\"Link\"),ae=s(\"VersionStamp\"),le=s(\"OpenAPIVersion\"),ce=s(\"InfoUrl\"),pe=s(\"InfoBasePath\"),de=s(\"License\",!0),fe=s(\"Contact\",!0),ye=s(\"JsonSchemaDialect\",!0);return We.createElement(\"div\",{className:\"info\"},We.createElement(\"hgroup\",{className:\"main\"},We.createElement(\"h2\",{className:\"title\"},B,We.createElement(\"span\",null,u&&We.createElement(ae,{version:u}),We.createElement(le,{oasVersion:\"3.1\"}))),(x||w)&&We.createElement(pe,{host:x,basePath:w}),_&&We.createElement(ce,{getComponent:s,url:_})),j&&We.createElement(\"p\",{className:\"info__summary\"},j),We.createElement(\"div\",{className:\"info__description description\"},We.createElement(ee,{source:P})),$&&We.createElement(\"div\",{className:\"info__tos\"},We.createElement(ie,{target:\"_blank\",href:sanitizeUrl($)},\"Terms of service\")),X.size>0&&We.createElement(fe,null),Z.size>0&&We.createElement(de,null),U&&We.createElement(ie,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(U)},Y||U),We.createElement(ye,null))},json_schema_dialect=({getComponent:s,specSelectors:i})=>{const u=i.selectJsonSchemaDialectField(),_=i.selectJsonSchemaDialectDefault(),w=s(\"Link\");return We.createElement(We.Fragment,null,u&&u===_&&We.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",We.createElement(w,{target:\"_blank\",href:sanitizeUrl(u)},u)),u&&u!==_&&We.createElement(\"div\",{className:\"error-wrapper\"},We.createElement(\"div\",{className:\"no-margin\"},We.createElement(\"div\",{className:\"errors\"},We.createElement(\"div\",{className:\"errors-wrapper\"},We.createElement(\"h4\",{className:\"center\"},\"Warning\"),We.createElement(\"p\",{className:\"message\"},We.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",We.createElement(w,{target:\"_blank\",href:_},_),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:s,isSwagger2:i,isOAS3:u,isOAS31:_,alsoShow:w,children:x})=>s?We.createElement(\"div\",null,x):i&&(u||_)?We.createElement(\"div\",{className:\"version-pragma\"},w,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,We.createElement(\"code\",null,\"swagger\"),\" and \",We.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),We.createElement(\"p\",null,\"Supported version fields are \",We.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",We.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):i||u||_?We.createElement(\"div\",null,x):We.createElement(\"div\",{className:\"version-pragma\"},w,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),We.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",We.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",We.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=s=>\"string\"==typeof s&&s.includes(\"#/components/schemas/\")?(s=>{const i=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(i)}catch{return i}})(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,DP=(0,We.forwardRef)((({schema:s,getComponent:i,onToggle:u=(()=>{})},_)=>{const w=i(\"JSONSchema202012\"),x=getModelName(s.get(\"$$ref\")),j=(0,We.useCallback)(((s,i)=>{u(x,i)}),[x,u]);return We.createElement(w,{name:x,schema:s.toJS(),ref:_,onExpand:j})})),BP=DP,models=({specActions:s,specSelectors:i,layoutSelectors:u,layoutActions:_,getComponent:w,getConfigs:x})=>{const j=i.selectSchemas(),P=Object.keys(j).length>0,B=[\"components\",\"schemas\"],{docExpansion:$,defaultModelsExpandDepth:U}=x(),Y=U>0&&\"none\"!==$,X=u.isShown(B,Y),Z=w(\"Collapse\"),ee=w(\"JSONSchema202012\"),ie=w(\"ArrowUpIcon\"),ae=w(\"ArrowDownIcon\");(0,We.useEffect)((()=>{const u=X&&U>1,_=null!=i.specResolvedSubtree(B);u&&!_&&s.requestResolvedSubtree(B)}),[X,U]);const le=(0,We.useCallback)((()=>{_.show(B,!X)}),[X]),ce=(0,We.useCallback)((s=>{null!==s&&_.readyToScroll(B,s)}),[]),handleJSONSchema202012Ref=s=>i=>{null!==i&&_.readyToScroll([...B,s],i)},handleJSONSchema202012Expand=u=>(_,w)=>{if(w){const _=[...B,u];null!=i.specResolvedSubtree(_)||s.requestResolvedSubtree([...B,u])}};return!P||U<0?null:We.createElement(\"section\",{className:KO()(\"models\",{\"is-open\":X}),ref:ce},We.createElement(\"h4\",null,We.createElement(\"button\",{\"aria-expanded\":X,className:\"models-control\",onClick:le},We.createElement(\"span\",null,\"Schemas\"),X?We.createElement(ie,null):We.createElement(ae,null))),We.createElement(Z,{isOpened:X},Object.entries(j).map((([s,i])=>We.createElement(ee,{key:s,ref:handleJSONSchema202012Ref(s),schema:i,name:s,onExpand:handleJSONSchema202012Expand(s)})))))},mutual_tls_auth=({schema:s,getComponent:i})=>{const u=i(\"JumpToPath\",!0);return We.createElement(\"div\",null,We.createElement(\"h4\",null,s.get(\"name\"),\" (mutualTLS)\",\" \",We.createElement(u,{path:[\"securityDefinitions\",s.get(\"name\")]})),We.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),We.createElement(\"p\",null,s.get(\"description\")))};class auths_Auths extends We.Component{constructor(s,i){super(s,i),this.state={}}onAuthChange=s=>{let{name:i}=s;this.setState({[i]:s})};submitAuth=s=>{s.preventDefault();let{authActions:i}=this.props;i.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:i,definitions:u}=this.props,_=u.map(((s,i)=>i)).toArray();this.setState(_.reduce(((s,i)=>(s[i]=\"\",s)),{})),i.logoutWithPersistOption(_)};close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};render(){let{definitions:s,getComponent:i,authSelectors:u,errSelectors:_}=this.props;const w=i(\"AuthItem\"),x=i(\"oauth2\",!0),j=i(\"Button\"),P=u.authorized(),B=s.filter(((s,i)=>!!P.get(i))),$=s.filter((s=>\"oauth2\"!==s.get(\"type\")&&\"mutualTLS\"!==s.get(\"type\"))),U=s.filter((s=>\"oauth2\"===s.get(\"type\"))),Y=s.filter((s=>\"mutualTLS\"===s.get(\"type\")));return We.createElement(\"div\",{className:\"auth-container\"},$.size>0&&We.createElement(\"form\",{onSubmit:this.submitAuth},$.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray(),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},$.size===B.size?We.createElement(j,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement(j,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),We.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),U.size>0?We.createElement(\"div\",null,We.createElement(\"div\",{className:\"scope-def\"},We.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),We.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(x,{authorized:P,schema:s,name:i})))).toArray()):null,Y.size>0&&We.createElement(\"div\",null,Y.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray()))}}const LP=auths_Auths,isOAS31=s=>{const i=s.get(\"openapi\");return\"string\"==typeof i&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(i)},fn_createOnlyOAS31Selector=s=>(i,...u)=>_=>{if(_.getSystem().specSelectors.isOAS31()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null},createOnlyOAS31SelectorWrapper=s=>(i,u)=>(_,...w)=>{if(u.getSystem().specSelectors.isOAS31()){const x=s(_,...w);return\"function\"==typeof x?x(i,u):x}return i(...w)},fn_createSystemSelector=s=>(i,...u)=>_=>{const w=s(i,_,...u);return\"function\"==typeof w?w(_):w},createOnlyOAS31ComponentWrapper=s=>(i,u)=>_=>u.specSelectors.isOAS31()?We.createElement(s,Co()({},_,{originalComponent:i,getSystem:u.getSystem})):We.createElement(i,_),FP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31License\",!0);return We.createElement(i,null)})),qP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31Contact\",!0);return We.createElement(i,null)})),$P=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31Info\",!0);return We.createElement(i,null)})),UP=createOnlyOAS31ComponentWrapper((({getSystem:s,...i})=>{const u=s(),{getComponent:_,fn:w,getConfigs:x}=u,j=x(),P=_(\"OAS31Model\"),B=_(\"JSONSchema202012\"),$=_(\"JSONSchema202012Keyword$schema\"),U=_(\"JSONSchema202012Keyword$vocabulary\"),Y=_(\"JSONSchema202012Keyword$id\"),X=_(\"JSONSchema202012Keyword$anchor\"),Z=_(\"JSONSchema202012Keyword$dynamicAnchor\"),ee=_(\"JSONSchema202012Keyword$ref\"),ie=_(\"JSONSchema202012Keyword$dynamicRef\"),ae=_(\"JSONSchema202012Keyword$defs\"),le=_(\"JSONSchema202012Keyword$comment\"),ce=_(\"JSONSchema202012KeywordAllOf\"),pe=_(\"JSONSchema202012KeywordAnyOf\"),de=_(\"JSONSchema202012KeywordOneOf\"),fe=_(\"JSONSchema202012KeywordNot\"),ye=_(\"JSONSchema202012KeywordIf\"),be=_(\"JSONSchema202012KeywordThen\"),_e=_(\"JSONSchema202012KeywordElse\"),we=_(\"JSONSchema202012KeywordDependentSchemas\"),Se=_(\"JSONSchema202012KeywordPrefixItems\"),xe=_(\"JSONSchema202012KeywordItems\"),Pe=_(\"JSONSchema202012KeywordContains\"),Te=_(\"JSONSchema202012KeywordProperties\"),Re=_(\"JSONSchema202012KeywordPatternProperties\"),qe=_(\"JSONSchema202012KeywordAdditionalProperties\"),$e=_(\"JSONSchema202012KeywordPropertyNames\"),ze=_(\"JSONSchema202012KeywordUnevaluatedItems\"),He=_(\"JSONSchema202012KeywordUnevaluatedProperties\"),Ye=_(\"JSONSchema202012KeywordType\"),Xe=_(\"JSONSchema202012KeywordEnum\"),Qe=_(\"JSONSchema202012KeywordConst\"),et=_(\"JSONSchema202012KeywordConstraint\"),tt=_(\"JSONSchema202012KeywordDependentRequired\"),rt=_(\"JSONSchema202012KeywordContentSchema\"),nt=_(\"JSONSchema202012KeywordTitle\"),ot=_(\"JSONSchema202012KeywordDescription\"),st=_(\"JSONSchema202012KeywordDefault\"),it=_(\"JSONSchema202012KeywordDeprecated\"),at=_(\"JSONSchema202012KeywordReadOnly\"),lt=_(\"JSONSchema202012KeywordWriteOnly\"),ct=_(\"JSONSchema202012Accordion\"),ut=_(\"JSONSchema202012ExpandDeepButton\"),pt=_(\"JSONSchema202012ChevronRightIcon\"),ht=_(\"withJSONSchema202012Context\")(P,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:j.defaultModelExpandDepth,includeReadOnly:Boolean(i.includeReadOnly),includeWriteOnly:Boolean(i.includeWriteOnly)},components:{JSONSchema:B,Keyword$schema:$,Keyword$vocabulary:U,Keyword$id:Y,Keyword$anchor:X,Keyword$dynamicAnchor:Z,Keyword$ref:ee,Keyword$dynamicRef:ie,Keyword$defs:ae,Keyword$comment:le,KeywordAllOf:ce,KeywordAnyOf:pe,KeywordOneOf:de,KeywordNot:fe,KeywordIf:ye,KeywordThen:be,KeywordElse:_e,KeywordDependentSchemas:we,KeywordPrefixItems:Se,KeywordItems:xe,KeywordContains:Pe,KeywordProperties:Te,KeywordPatternProperties:Re,KeywordAdditionalProperties:qe,KeywordPropertyNames:$e,KeywordUnevaluatedItems:ze,KeywordUnevaluatedProperties:He,KeywordType:Ye,KeywordEnum:Xe,KeywordConst:Qe,KeywordConstraint:et,KeywordDependentRequired:tt,KeywordContentSchema:rt,KeywordTitle:nt,KeywordDescription:ot,KeywordDefault:st,KeywordDeprecated:it,KeywordReadOnly:at,KeywordWriteOnly:lt,Accordion:ct,ExpandDeepButton:ut,ChevronRightIcon:pt},fn:{upperFirst:w.upperFirst,isExpandable:w.jsonSchema202012.isExpandable,getProperties:w.jsonSchema202012.getProperties}});return We.createElement(ht,i)})),zP=UP,VP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const{getComponent:i,fn:u,getConfigs:_}=s(),w=_();if(VP.ModelsWithJSONSchemaContext)return We.createElement(VP.ModelsWithJSONSchemaContext,null);const x=i(\"OAS31Models\",!0),j=i(\"JSONSchema202012\"),P=i(\"JSONSchema202012Keyword$schema\"),B=i(\"JSONSchema202012Keyword$vocabulary\"),$=i(\"JSONSchema202012Keyword$id\"),U=i(\"JSONSchema202012Keyword$anchor\"),Y=i(\"JSONSchema202012Keyword$dynamicAnchor\"),X=i(\"JSONSchema202012Keyword$ref\"),Z=i(\"JSONSchema202012Keyword$dynamicRef\"),ee=i(\"JSONSchema202012Keyword$defs\"),ie=i(\"JSONSchema202012Keyword$comment\"),ae=i(\"JSONSchema202012KeywordAllOf\"),le=i(\"JSONSchema202012KeywordAnyOf\"),ce=i(\"JSONSchema202012KeywordOneOf\"),pe=i(\"JSONSchema202012KeywordNot\"),de=i(\"JSONSchema202012KeywordIf\"),fe=i(\"JSONSchema202012KeywordThen\"),ye=i(\"JSONSchema202012KeywordElse\"),be=i(\"JSONSchema202012KeywordDependentSchemas\"),_e=i(\"JSONSchema202012KeywordPrefixItems\"),we=i(\"JSONSchema202012KeywordItems\"),Se=i(\"JSONSchema202012KeywordContains\"),xe=i(\"JSONSchema202012KeywordProperties\"),Pe=i(\"JSONSchema202012KeywordPatternProperties\"),Te=i(\"JSONSchema202012KeywordAdditionalProperties\"),Re=i(\"JSONSchema202012KeywordPropertyNames\"),qe=i(\"JSONSchema202012KeywordUnevaluatedItems\"),$e=i(\"JSONSchema202012KeywordUnevaluatedProperties\"),ze=i(\"JSONSchema202012KeywordType\"),He=i(\"JSONSchema202012KeywordEnum\"),Ye=i(\"JSONSchema202012KeywordConst\"),Xe=i(\"JSONSchema202012KeywordConstraint\"),Qe=i(\"JSONSchema202012KeywordDependentRequired\"),et=i(\"JSONSchema202012KeywordContentSchema\"),tt=i(\"JSONSchema202012KeywordTitle\"),rt=i(\"JSONSchema202012KeywordDescription\"),nt=i(\"JSONSchema202012KeywordDefault\"),ot=i(\"JSONSchema202012KeywordDeprecated\"),st=i(\"JSONSchema202012KeywordReadOnly\"),it=i(\"JSONSchema202012KeywordWriteOnly\"),at=i(\"JSONSchema202012Accordion\"),lt=i(\"JSONSchema202012ExpandDeepButton\"),ct=i(\"JSONSchema202012ChevronRightIcon\"),ut=i(\"withJSONSchema202012Context\");return VP.ModelsWithJSONSchemaContext=ut(x,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:w.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},components:{JSONSchema:j,Keyword$schema:P,Keyword$vocabulary:B,Keyword$id:$,Keyword$anchor:U,Keyword$dynamicAnchor:Y,Keyword$ref:X,Keyword$dynamicRef:Z,Keyword$defs:ee,Keyword$comment:ie,KeywordAllOf:ae,KeywordAnyOf:le,KeywordOneOf:ce,KeywordNot:pe,KeywordIf:de,KeywordThen:fe,KeywordElse:ye,KeywordDependentSchemas:be,KeywordPrefixItems:_e,KeywordItems:we,KeywordContains:Se,KeywordProperties:xe,KeywordPatternProperties:Pe,KeywordAdditionalProperties:Te,KeywordPropertyNames:Re,KeywordUnevaluatedItems:qe,KeywordUnevaluatedProperties:$e,KeywordType:ze,KeywordEnum:He,KeywordConst:Ye,KeywordConstraint:Xe,KeywordDependentRequired:Qe,KeywordContentSchema:et,KeywordTitle:tt,KeywordDescription:rt,KeywordDefault:nt,KeywordDeprecated:ot,KeywordReadOnly:st,KeywordWriteOnly:it,Accordion:at,ExpandDeepButton:lt,ChevronRightIcon:ct},fn:{upperFirst:u.upperFirst,isExpandable:u.jsonSchema202012.isExpandable,getProperties:u.jsonSchema202012.getProperties}}),We.createElement(VP.ModelsWithJSONSchemaContext,null)}));VP.ModelsWithJSONSchemaContext=null;const WP=VP,wrap_components_version_pragma_filter=(s,i)=>s=>{const u=i.specSelectors.isOAS31(),_=i.getComponent(\"OAS31VersionPragmaFilter\");return We.createElement(_,Co()({isOAS31:u},s))},KP=createOnlyOAS31ComponentWrapper((({originalComponent:s,...i})=>{const{getComponent:u,schema:_}=i,w=u(\"MutualTLSAuth\",!0);return\"mutualTLS\"===_.get(\"type\")?We.createElement(w,{schema:_}):We.createElement(s,i)})),HP=KP,JP=createOnlyOAS31ComponentWrapper((({getSystem:s,...i})=>{const u=s().getComponent(\"OAS31Auths\",!0);return We.createElement(u,i)})),GP=(0,Xe.Map)(),YP=Gt(((s,i)=>i.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>s=>{const i=s.specSelectors.specJson().get(\"webhooks\");return Xe.Map.isMap(i)?i:GP},XP=Gt([(s,i)=>i.specSelectors.webhooks(),(s,i)=>i.specSelectors.validOperationMethods(),(s,i)=>i.specSelectors.specResolvedSubtree([\"webhooks\"])],((s,i)=>s.reduce(((s,u,_)=>{if(!Xe.Map.isMap(u))return s;const w=u.entrySeq().filter((([s])=>i.includes(s))).map((([s,i])=>({operation:(0,Xe.Map)({operation:i}),method:s,path:_,specPath:(0,Xe.List)([\"webhooks\",_,s])})));return s.concat(w)}),(0,Xe.List)()).groupBy((s=>s.path)).map((s=>s.toArray())).toObject())),selectors_license=()=>s=>{const i=s.specSelectors.info().get(\"license\");return Xe.Map.isMap(i)?i:GP},selectLicenseNameField=()=>s=>s.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>s=>s.specSelectors.license().get(\"url\"),QP=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectLicenseUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectLicenseIdentifierField=()=>s=>s.specSelectors.license().get(\"identifier\"),selectors_contact=()=>s=>{const i=s.specSelectors.info().get(\"contact\");return Xe.Map.isMap(i)?i:GP},selectContactNameField=()=>s=>s.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>s=>s.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>s=>s.specSelectors.contact().get(\"url\"),ZP=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectContactUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectInfoTitleField=()=>s=>s.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>s=>s.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>s=>s.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>s=>s.specSelectors.info().get(\"termsOfService\"),eI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectInfoTermsOfServiceField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectExternalDocsDescriptionField=()=>s=>s.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>s=>s.specSelectors.externalDocs().get(\"url\"),tI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectExternalDocsUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectJsonSchemaDialectField=()=>s=>s.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",rI=Gt(((s,i)=>i.specSelectors.definitions()),((s,i)=>i.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((s,i)=>Xe.Map.isMap(s)?Xe.Map.isMap(i)?Object.entries(s.toJS()).reduce(((s,[u,_])=>{const w=i.get(u);return s[u]=w?.toJS()||_,s}),{}):s.toJS():{})),wrap_selectors_isOAS3=(s,i)=>(u,..._)=>i.specSelectors.isOAS31()||s(..._),nI=createOnlyOAS31SelectorWrapper((()=>(s,i)=>i.oas31Selectors.selectLicenseUrl())),oI=createOnlyOAS31SelectorWrapper((()=>(s,i)=>{const u=i.specSelectors.securityDefinitions();let _=s();return u?(u.entrySeq().forEach((([s,i])=>{\"mutualTLS\"===i.get(\"type\")&&(_=_.push(new Xe.Map({[s]:i})))})),_):_})),sI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectLicenseUrlField(),(s,i)=>i.specSelectors.selectLicenseIdentifierField()],((s,i,u,_)=>u?safeBuildUrl(u,s,{selectedServer:i}):_?`https://spdx.org/licenses/${_}.html`:void 0)),keywords_Example=({schema:s,getSystem:i})=>{const{fn:u}=i(),{hasKeyword:_,stringify:w}=u.jsonSchema202012.useFn();return _(s,\"example\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Example\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},w(s.example))):null},keywords_Xml=({schema:s,getSystem:i})=>{const u=s?.xml||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!!(u.name||u.namespace||u.prefix),[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012DeepExpansionContext\")(),ae=(0,We.useCallback)((()=>{U((s=>!s))}),[]),le=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(ie.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ae},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),We.createElement(ee,{expanded:$,onClick:le})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===u.attribute&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===u.wrapped&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(We.Fragment,null,u.name&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.name))),u.namespace&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.namespace))),u.prefix&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.prefix)))))))},Discriminator_DiscriminatorMapping=({discriminator:s})=>{const i=s?.mapping||{};return 0===Object.keys(i).length?null:Object.entries(i).map((([s,i])=>We.createElement(\"div\",{key:`${s}-${i}`,className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},s),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i))))},keywords_Discriminator_Discriminator=({schema:s,getSystem:i})=>{const u=s?.discriminator||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!!u.mapping,[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012DeepExpansionContext\")(),ae=(0,We.useCallback)((()=>{U((s=>!s))}),[]),le=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(ie.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ae},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),We.createElement(ee,{expanded:$,onClick:le})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),u.propertyName&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},u.propertyName),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(Discriminator_DiscriminatorMapping,{discriminator:u})))))},keywords_ExternalDocs=({schema:s,getSystem:i})=>{const u=s?.externalDocs||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!(!u.description&&!u.url),[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012KeywordDescription\"),ae=w(\"Link\"),le=w(\"JSONSchema202012DeepExpansionContext\")(),ce=(0,We.useCallback)((()=>{U((s=>!s))}),[]),pe=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(le.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ce},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),We.createElement(ee,{expanded:$,onClick:pe})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(We.Fragment,null,u.description&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(ie,{schema:u,getSystem:i})),u.url&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},We.createElement(ae,{target:\"_blank\",href:sanitizeUrl(u.url)},u.url))))))))},keywords_Description=({schema:s,getSystem:i})=>{if(!s?.description)return null;const{getComponent:u}=i(),_=u(\"Markdown\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},We.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},We.createElement(_,{source:s.description})))},iI=createOnlyOAS31ComponentWrapper(keywords_Description),aI=createOnlyOAS31ComponentWrapper((({schema:s,getSystem:i,originalComponent:u})=>{const{getComponent:_}=i(),w=_(\"JSONSchema202012KeywordDiscriminator\"),x=_(\"JSONSchema202012KeywordXml\"),j=_(\"JSONSchema202012KeywordExample\"),P=_(\"JSONSchema202012KeywordExternalDocs\");return We.createElement(We.Fragment,null,We.createElement(u,{schema:s}),We.createElement(w,{schema:s,getSystem:i}),We.createElement(x,{schema:s,getSystem:i}),We.createElement(P,{schema:s,getSystem:i}),We.createElement(j,{schema:s,getSystem:i}))})),lI=aI,keywords_Properties=({schema:s,getSystem:i})=>{const{fn:u}=i(),{useComponent:_}=u.jsonSchema202012,{getDependentRequired:w,getProperties:x}=u.jsonSchema202012.useFn(),j=u.jsonSchema202012.useConfig(),P=Array.isArray(s?.required)?s.required:[],B=_(\"JSONSchema\"),$=x(s,j);return 0===Object.keys($).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},We.createElement(\"ul\",null,Object.entries($).map((([i,u])=>{const _=P.includes(i),x=w(i,s);return We.createElement(\"li\",{key:i,className:KO()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":_})},We.createElement(B,{name:i,schema:u,dependentRequired:x}))}))))},cI=createOnlyOAS31ComponentWrapper(keywords_Properties),getProperties=(s,{includeReadOnly:i,includeWriteOnly:u})=>{if(!s?.properties)return{};const _=Object.entries(s.properties).filter((([,s])=>(!(!0===s?.readOnly)||i)&&(!(!0===s?.writeOnly)||u)));return Object.fromEntries(_)};const uI=function afterLoad({fn:s,getSystem:i}){if(s.jsonSchema202012){const u=((s,i)=>{const{fn:u}=i();if(\"function\"!=typeof s)return null;const{hasKeyword:_}=u.jsonSchema202012;return i=>s(i)||_(i,\"example\")||i?.xml||i?.discriminator||i?.externalDocs})(s.jsonSchema202012.isExpandable,i);Object.assign(this.fn.jsonSchema202012,{isExpandable:u,getProperties})}if(\"function\"==typeof s.sampleFromSchema&&s.jsonSchema202012){const u=((s,i)=>{const{fn:u,specSelectors:_}=i;return Object.fromEntries(Object.entries(s).map((([s,i])=>{const w=u[s];return[s,(...s)=>_.isOAS31()?i(...s):\"function\"==typeof w?w(...s):void 0]})))})({sampleFromSchema:s.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:s.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:s.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:s.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:s.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:s.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:s.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:s.jsonSchema202012.getXmlSampleSchema,getSampleSchema:s.jsonSchema202012.getSampleSchema},i());Object.assign(this.fn,u)}},oas31=({fn:s})=>{const i=s.createSystemSelector||fn_createSystemSelector,u=s.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:uI,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:oas31_components_license,OAS31Contact:oas31_components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:BP,OAS31Models:models,OAS31Auths:LP,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:keywords_Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs},wrapComponents:{InfoContainer:$P,License:FP,Contact:qP,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:zP,Models:WP,AuthItem:HP,auths:JP,JSONSchema202012KeywordDescription:iI,JSONSchema202012KeywordDefault:lI,JSONSchema202012KeywordProperties:cI},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:oI}},spec:{selectors:{isOAS31:i(YP),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:u(selectLicenseIdentifierField),selectLicenseUrl:i(QP),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:i(ZP),selectInfoTitleField,selectInfoSummaryField:u(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:i(eI),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:i(tI),webhooks:u(selectors_webhooks),selectWebhooksOperations:u(i(XP)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:i(rI)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:nI}},oas31:{selectors:{selectLicenseUrl:u(i(sI))}}}}},pI=lC().object,hI=lC().bool,dI=(lC().oneOfType([pI,hI]),(0,We.createContext)(null));dI.displayName=\"JSONSchemaContext\";const fI=(0,We.createContext)(0);fI.displayName=\"JSONSchemaLevelContext\";const mI=(0,We.createContext)(!1);mI.displayName=\"JSONSchemaDeepExpansionContext\";const gI=(0,We.createContext)(new Set),useConfig=()=>{const{config:s}=(0,We.useContext)(dI);return s},useComponent=s=>{const{components:i}=(0,We.useContext)(dI);return i[s]||null},useFn=(s=void 0)=>{const{fn:i}=(0,We.useContext)(dI);return void 0!==s?i[s]:i},useLevel=()=>{const s=(0,We.useContext)(fI);return[s,s+1]},useIsExpanded=()=>{const[s]=useLevel(),{defaultExpandedLevels:i}=useConfig();return i-s>0},useIsExpandedDeeply=()=>(0,We.useContext)(mI),useRenderedSchemas=(s=void 0)=>{if(void 0===s)return(0,We.useContext)(gI);const i=(0,We.useContext)(gI);return new Set([...i,s])},yI=(0,We.forwardRef)((({schema:s,name:i=\"\",dependentRequired:u=[],onExpand:_=(()=>{})},w)=>{const x=useFn(),j=useIsExpanded(),P=useIsExpandedDeeply(),[B,$]=(0,We.useState)(j||P),[U,Y]=(0,We.useState)(P),[X,Z]=useLevel(),ee=(()=>{const[s]=useLevel();return s>0})(),ie=x.isExpandable(s)||u.length>0,ae=(s=>useRenderedSchemas().has(s))(s),le=useRenderedSchemas(s),ce=x.stringifyConstraints(s),pe=useComponent(\"Accordion\"),de=useComponent(\"Keyword$schema\"),fe=useComponent(\"Keyword$vocabulary\"),ye=useComponent(\"Keyword$id\"),be=useComponent(\"Keyword$anchor\"),_e=useComponent(\"Keyword$dynamicAnchor\"),we=useComponent(\"Keyword$ref\"),Se=useComponent(\"Keyword$dynamicRef\"),xe=useComponent(\"Keyword$defs\"),Pe=useComponent(\"Keyword$comment\"),Te=useComponent(\"KeywordAllOf\"),Re=useComponent(\"KeywordAnyOf\"),qe=useComponent(\"KeywordOneOf\"),$e=useComponent(\"KeywordNot\"),ze=useComponent(\"KeywordIf\"),He=useComponent(\"KeywordThen\"),Ye=useComponent(\"KeywordElse\"),Xe=useComponent(\"KeywordDependentSchemas\"),Qe=useComponent(\"KeywordPrefixItems\"),et=useComponent(\"KeywordItems\"),tt=useComponent(\"KeywordContains\"),rt=useComponent(\"KeywordProperties\"),nt=useComponent(\"KeywordPatternProperties\"),ot=useComponent(\"KeywordAdditionalProperties\"),st=useComponent(\"KeywordPropertyNames\"),it=useComponent(\"KeywordUnevaluatedItems\"),at=useComponent(\"KeywordUnevaluatedProperties\"),lt=useComponent(\"KeywordType\"),ct=useComponent(\"KeywordEnum\"),ut=useComponent(\"KeywordConst\"),pt=useComponent(\"KeywordConstraint\"),ht=useComponent(\"KeywordDependentRequired\"),dt=useComponent(\"KeywordContentSchema\"),mt=useComponent(\"KeywordTitle\"),gt=useComponent(\"KeywordDescription\"),yt=useComponent(\"KeywordDefault\"),vt=useComponent(\"KeywordDeprecated\"),bt=useComponent(\"KeywordReadOnly\"),_t=useComponent(\"KeywordWriteOnly\"),Et=useComponent(\"ExpandDeepButton\");(0,We.useEffect)((()=>{Y(P)}),[P]),(0,We.useEffect)((()=>{Y(U)}),[U]);const wt=(0,We.useCallback)(((s,i)=>{$(i),!i&&Y(!1),_(s,i,!1)}),[_]),St=(0,We.useCallback)(((s,i)=>{$(i),Y(i),_(s,i,!0)}),[_]);return We.createElement(fI.Provider,{value:Z},We.createElement(mI.Provider,{value:U},We.createElement(gI.Provider,{value:le},We.createElement(\"article\",{ref:w,\"data-json-schema-level\":X,className:KO()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":ee,\"json-schema-2020-12--circular\":ae})},We.createElement(\"div\",{className:\"json-schema-2020-12-head\"},ie&&!ae?We.createElement(We.Fragment,null,We.createElement(pe,{expanded:B,onChange:wt},We.createElement(mt,{title:i,schema:s})),We.createElement(Et,{expanded:B,onClick:St})):We.createElement(mt,{title:i,schema:s}),We.createElement(vt,{schema:s}),We.createElement(bt,{schema:s}),We.createElement(_t,{schema:s}),We.createElement(lt,{schema:s,isCircular:ae}),ce.length>0&&ce.map((s=>We.createElement(pt,{key:`${s.scope}-${s.value}`,constraint:s})))),We.createElement(\"div\",{className:KO()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!B})},B&&We.createElement(We.Fragment,null,We.createElement(gt,{schema:s}),!ae&&ie&&We.createElement(We.Fragment,null,We.createElement(rt,{schema:s}),We.createElement(nt,{schema:s}),We.createElement(ot,{schema:s}),We.createElement(at,{schema:s}),We.createElement(st,{schema:s}),We.createElement(Te,{schema:s}),We.createElement(Re,{schema:s}),We.createElement(qe,{schema:s}),We.createElement($e,{schema:s}),We.createElement(ze,{schema:s}),We.createElement(He,{schema:s}),We.createElement(Ye,{schema:s}),We.createElement(Xe,{schema:s}),We.createElement(Qe,{schema:s}),We.createElement(et,{schema:s}),We.createElement(it,{schema:s}),We.createElement(tt,{schema:s}),We.createElement(dt,{schema:s})),We.createElement(ct,{schema:s}),We.createElement(ut,{schema:s}),We.createElement(ht,{schema:s,dependentRequired:u}),We.createElement(yt,{schema:s}),We.createElement(de,{schema:s}),We.createElement(fe,{schema:s}),We.createElement(ye,{schema:s}),We.createElement(be,{schema:s}),We.createElement(_e,{schema:s}),We.createElement(we,{schema:s}),!ae&&ie&&We.createElement(xe,{schema:s}),We.createElement(Se,{schema:s}),We.createElement(Pe,{schema:s})))))))})),vI=yI,keywords_$schema=({schema:s})=>s?.$schema?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$schema)):null,$vocabulary_$vocabulary=({schema:s})=>{const i=useIsExpanded(),u=useIsExpandedDeeply(),[_,w]=(0,We.useState)(i||u),x=useComponent(\"Accordion\"),j=(0,We.useCallback)((()=>{w((s=>!s))}),[]);return s?.$vocabulary?\"object\"!=typeof s.$vocabulary?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},We.createElement(x,{expanded:_,onChange:j},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",null,_&&Object.entries(s.$vocabulary).map((([s,i])=>We.createElement(\"li\",{key:s,className:KO()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!i})},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s)))))):null},keywords_$id=({schema:s})=>s?.$id?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$id)):null,keywords_$anchor=({schema:s})=>s?.$anchor?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$anchor)):null,keywords_$dynamicAnchor=({schema:s})=>s?.$dynamicAnchor?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicAnchor)):null,keywords_$ref=({schema:s})=>s?.$ref?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$ref)):null,keywords_$dynamicRef=({schema:s})=>s?.$dynamicRef?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicRef)):null,keywords_$defs=({schema:s})=>{const i=s?.$defs||{},u=useIsExpanded(),_=useIsExpandedDeeply(),[w,x]=(0,We.useState)(u||_),[j,P]=(0,We.useState)(!1),B=useComponent(\"Accordion\"),$=useComponent(\"ExpandDeepButton\"),U=useComponent(\"JSONSchema\"),Y=(0,We.useCallback)((()=>{x((s=>!s))}),[]),X=(0,We.useCallback)(((s,i)=>{x(i),P(i)}),[]);return 0===Object.keys(i).length?null:We.createElement(mI.Provider,{value:j},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\"},We.createElement(B,{expanded:w,onChange:Y},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),We.createElement($,{expanded:w,onClick:X}),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!w})},w&&We.createElement(We.Fragment,null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(U,{name:s,schema:i}))))))))},keywords_$comment=({schema:s})=>s?.$comment?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$comment)):null,keywords_AllOf=({schema:s})=>{const i=s?.allOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{allOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_AnyOf=({schema:s})=>{const i=s?.anyOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{anyOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_OneOf=({schema:s})=>{const i=s?.oneOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{oneOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_Not=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"not\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},We.createElement(u,{name:_,schema:s.not}))},keywords_If=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"if\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},We.createElement(u,{name:_,schema:s.if}))},keywords_Then=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"then\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},We.createElement(u,{name:_,schema:s.then}))},keywords_Else=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"else\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},We.createElement(u,{name:_,schema:s.else}))},keywords_DependentSchemas=({schema:s})=>{const i=s?.dependentSchemas||[],u=useIsExpanded(),_=useIsExpandedDeeply(),[w,x]=(0,We.useState)(u||_),[j,P]=(0,We.useState)(!1),B=useComponent(\"Accordion\"),$=useComponent(\"ExpandDeepButton\"),U=useComponent(\"JSONSchema\"),Y=(0,We.useCallback)((()=>{x((s=>!s))}),[]),X=(0,We.useCallback)(((s,i)=>{x(i),P(i)}),[]);return\"object\"!=typeof i||0===Object.keys(i).length?null:We.createElement(mI.Provider,{value:j},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\"},We.createElement(B,{expanded:w,onChange:Y},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),We.createElement($,{expanded:w,onClick:X}),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!w})},w&&We.createElement(We.Fragment,null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(U,{name:s,schema:i}))))))))},keywords_PrefixItems=({schema:s})=>{const i=s?.prefixItems||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{prefixItems:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_Items=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"items\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},We.createElement(u,{name:_,schema:s.items}))},keywords_Contains=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"contains\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},We.createElement(u,{name:_,schema:s.contains}))},keywords_Properties_Properties=({schema:s})=>{const i=useFn(),u=s?.properties||{},_=Array.isArray(s?.required)?s.required:[],w=useComponent(\"JSONSchema\");return 0===Object.keys(u).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},We.createElement(\"ul\",null,Object.entries(u).map((([u,x])=>{const j=_.includes(u),P=i.getDependentRequired(u,s);return We.createElement(\"li\",{key:u,className:KO()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":j})},We.createElement(w,{name:u,schema:x,dependentRequired:P}))}))))},PatternProperties_PatternProperties=({schema:s})=>{const i=s?.patternProperties||{},u=useComponent(\"JSONSchema\");return 0===Object.keys(i).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},We.createElement(\"ul\",null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(u,{name:s,schema:i}))))))},keywords_AdditionalProperties=({schema:s})=>{const i=useFn(),{additionalProperties:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"additionalProperties\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===u?We.createElement(We.Fragment,null,w,We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===u?We.createElement(We.Fragment,null,w,We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):We.createElement(_,{name:w,schema:u}))},keywords_PropertyNames=({schema:s})=>{const i=useFn(),{propertyNames:u}=s,_=useComponent(\"JSONSchema\"),w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return i.hasKeyword(s,\"propertyNames\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},We.createElement(_,{name:w,schema:u})):null},keywords_UnevaluatedItems=({schema:s})=>{const i=useFn(),{unevaluatedItems:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"unevaluatedItems\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},We.createElement(_,{name:w,schema:u}))},keywords_UnevaluatedProperties=({schema:s})=>{const i=useFn(),{unevaluatedProperties:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"unevaluatedProperties\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},We.createElement(_,{name:w,schema:u}))},keywords_Type=({schema:s,isCircular:i=!1})=>{const u=useFn().getType(s),_=i?\" [circular]\":\"\";return We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${u}${_}`)},Enum_Enum=({schema:s})=>{const i=useFn();return Array.isArray(s?.enum)?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Allowed values\"),We.createElement(\"ul\",null,s.enum.map((s=>{const u=i.stringify(s);return We.createElement(\"li\",{key:u},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},u))})))):null},keywords_Const=({schema:s})=>{const i=useFn();return i.hasKeyword(s,\"const\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Const\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},i.stringify(s.const))):null},Constraint=({constraint:s})=>We.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${s.scope}`},s.value),bI=We.memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:s})=>0===s.length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),We.createElement(\"ul\",null,s.map((s=>We.createElement(\"li\",{key:s},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},s)))))),keywords_ContentSchema=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"contentSchema\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},We.createElement(u,{name:_,schema:s.contentSchema}))},Title_Title=({title:s=\"\",schema:i})=>{const u=useFn();return s||u.getTitle(i)?We.createElement(\"div\",{className:\"json-schema-2020-12__title\"},s||u.getTitle(i)):null},keywords_Description_Description=({schema:s})=>s?.description?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},We.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},s.description)):null,keywords_Default=({schema:s})=>{const i=useFn();return i.hasKeyword(s,\"default\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Default\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},i.stringify(s.default))):null},keywords_Deprecated=({schema:s})=>!0!==s?.deprecated?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:s})=>!0!==s?.readOnly?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:s})=>!0!==s?.writeOnly?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),Accordion_Accordion=({expanded:s=!1,children:i,onChange:u})=>{const _=useComponent(\"ChevronRightIcon\"),w=(0,We.useCallback)((i=>{u(i,!s)}),[s,u]);return We.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:w},We.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},i),We.createElement(\"span\",{className:KO()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":s,\"json-schema-2020-12-accordion__icon--collapsed\":!s})},We.createElement(_,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:s,onClick:i})=>{const u=(0,We.useCallback)((u=>{i(u,!s)}),[s,i]);return We.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:u},s?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>We.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},We.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),fn_upperFirst=s=>\"string\"==typeof s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:s,getTitle=s=>{const i=useFn();return s?.title?i.upperFirst(s.title):s?.$anchor?i.upperFirst(s.$anchor):s?.$id?s.$id:\"\"},getType=(s,i=new WeakSet)=>{const u=useFn();if(null==s)return\"any\";if(u.isBooleanJSONSchema(s))return s?\"any\":\"never\";if(\"object\"!=typeof s)return\"any\";if(i.has(s))return\"any\";i.add(s);const{type:_,prefixItems:w,items:x}=s,getArrayType=()=>{if(Array.isArray(w)){const s=w.map((s=>getType(s,i))),u=x?getType(x,i):\"any\";return`array<[${s.join(\", \")}], ${u}>`}if(x){return`array<${getType(x,i)}>`}return\"array<any>\"};if(s.not&&\"any\"===getType(s.not))return\"never\";const handleCombiningKeywords=(u,_)=>{if(Array.isArray(s[u])){return`(${s[u].map((s=>getType(s,i))).join(_)})`}return null},j=[Array.isArray(_)?_.map((s=>\"array\"===s?getArrayType():s)).join(\" | \"):\"array\"===_?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(_)?_:(()=>{if(Object.hasOwn(s,\"prefixItems\")||Object.hasOwn(s,\"items\")||Object.hasOwn(s,\"contains\"))return getArrayType();if(Object.hasOwn(s,\"properties\")||Object.hasOwn(s,\"additionalProperties\")||Object.hasOwn(s,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(s.format))return\"integer\";if([\"float\",\"double\"].includes(s.format))return\"number\";if(Object.hasOwn(s,\"minimum\")||Object.hasOwn(s,\"maximum\")||Object.hasOwn(s,\"exclusiveMinimum\")||Object.hasOwn(s,\"exclusiveMaximum\")||Object.hasOwn(s,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(s,\"pattern\")||Object.hasOwn(s,\"format\")||Object.hasOwn(s,\"minLength\")||Object.hasOwn(s,\"maxLength\"))return\"string\";if(void 0!==s.const){if(null===s.const)return\"null\";if(\"boolean\"==typeof s.const)return\"boolean\";if(\"number\"==typeof s.const)return Number.isInteger(s.const)?\"integer\":\"number\";if(\"string\"==typeof s.const)return\"string\";if(Array.isArray(s.const))return\"array<any>\";if(\"object\"==typeof s.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return i.delete(s),j||\"any\"},isBooleanJSONSchema=s=>\"boolean\"==typeof s,hasKeyword=(s,i)=>null!==s&&\"object\"==typeof s&&Object.hasOwn(s,i),isExpandable=s=>{const i=useFn();return s?.$schema||s?.$vocabulary||s?.$id||s?.$anchor||s?.$dynamicAnchor||s?.$ref||s?.$dynamicRef||s?.$defs||s?.$comment||s?.allOf||s?.anyOf||s?.oneOf||i.hasKeyword(s,\"not\")||i.hasKeyword(s,\"if\")||i.hasKeyword(s,\"then\")||i.hasKeyword(s,\"else\")||s?.dependentSchemas||s?.prefixItems||i.hasKeyword(s,\"items\")||i.hasKeyword(s,\"contains\")||s?.properties||s?.patternProperties||i.hasKeyword(s,\"additionalProperties\")||i.hasKeyword(s,\"propertyNames\")||i.hasKeyword(s,\"unevaluatedItems\")||i.hasKeyword(s,\"unevaluatedProperties\")||s?.description||s?.enum||i.hasKeyword(s,\"const\")||i.hasKeyword(s,\"contentSchema\")||i.hasKeyword(s,\"default\")},fn_stringify=s=>null===s||[\"number\",\"bigint\",\"boolean\"].includes(typeof s)?String(s):Array.isArray(s)?`[${s.map(fn_stringify).join(\", \")}]`:JSON.stringify(s),stringifyConstraintRange=(s,i,u)=>{const _=\"number\"==typeof i,w=\"number\"==typeof u;return _&&w?i===u?`${i} ${s}`:`[${i}, ${u}] ${s}`:_?`>= ${i} ${s}`:w?`<= ${u} ${s}`:null},stringifyConstraints=s=>{const i=[],u=(s=>{if(\"number\"!=typeof s?.multipleOf)return null;if(s.multipleOf<=0)return null;if(1===s.multipleOf)return null;const{multipleOf:i}=s;if(Number.isInteger(i))return`multiple of ${i}`;const u=10**i.toString().split(\".\")[1].length;return`multiple of ${i*u}/${u}`})(s);null!==u&&i.push({scope:\"number\",value:u});const _=(s=>{const i=s?.minimum,u=s?.maximum,_=s?.exclusiveMinimum,w=s?.exclusiveMaximum,x=\"number\"==typeof i,j=\"number\"==typeof u,P=\"number\"==typeof _,B=\"number\"==typeof w,$=P&&(!x||i<_),U=B&&(!j||u>w);if((x||P)&&(j||B))return`${$?\"(\":\"[\"}${$?_:i}, ${U?w:u}${U?\")\":\"]\"}`;if(x||P)return`${$?\">\":\"≥\"} ${$?_:i}`;if(j||B)return`${U?\"<\":\"≤\"} ${U?w:u}`;return null})(s);null!==_&&i.push({scope:\"number\",value:_}),s?.format&&i.push({scope:\"string\",value:s.format});const w=stringifyConstraintRange(\"characters\",s?.minLength,s?.maxLength);null!==w&&i.push({scope:\"string\",value:w}),s?.pattern&&i.push({scope:\"string\",value:`matches ${s?.pattern}`}),s?.contentMediaType&&i.push({scope:\"string\",value:`media type: ${s.contentMediaType}`}),s?.contentEncoding&&i.push({scope:\"string\",value:`encoding: ${s.contentEncoding}`});const x=stringifyConstraintRange(s?.hasUniqueItems?\"unique items\":\"items\",s?.minItems,s?.maxItems);null!==x&&i.push({scope:\"array\",value:x});const j=stringifyConstraintRange(\"contained items\",s?.minContains,s?.maxContains);null!==j&&i.push({scope:\"array\",value:j});const P=stringifyConstraintRange(\"properties\",s?.minProperties,s?.maxProperties);return null!==P&&i.push({scope:\"object\",value:P}),i},getDependentRequired=(s,i)=>i?.dependentRequired?Array.from(Object.entries(i.dependentRequired).reduce(((i,[u,_])=>Array.isArray(_)&&_.includes(s)?(i.add(u),i):i),new Set)):[],withJSONSchemaContext=(s,i={})=>{const u={components:{JSONSchema:vI,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:keywords_Const,KeywordConstraint:bI,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:keywords_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...i.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,...i.config},fn:{upperFirst:fn_upperFirst,getTitle,getType,isBooleanJSONSchema,hasKeyword,isExpandable,stringify:fn_stringify,stringifyConstraints,getDependentRequired,...i.fn}},HOC=i=>We.createElement(dI.Provider,{value:u},We.createElement(s,i));return HOC.contexts={JSONSchemaContext:dI},HOC.displayName=s.displayName,HOC},json_schema_2020_12=()=>({components:{JSONSchema202012:vI,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:keywords_Const,JSONSchema202012KeywordConstraint:bI,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:keywords_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,JSONSchema202012DeepExpansionContext:()=>mI},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{isExpandable,hasKeyword,useFn,useConfig,useComponent,useIsExpandedDeeply}}});var _I=__webpack_require__(11331),EI=__webpack_require__.n(_I);const array=(s,{sample:i})=>((s,i={})=>{const{minItems:u,maxItems:_,uniqueItems:w}=i,{contains:x,minContains:j,maxContains:P}=i;let B=[...s];if(null!=x&&\"object\"==typeof x){if(Number.isInteger(j)&&j>1){const s=B.at(0);for(let i=1;i<j;i+=1)B.unshift(s)}Number.isInteger(P)}if(Number.isInteger(_)&&_>0&&(B=s.slice(0,_)),Number.isInteger(u)&&u>0)for(let s=0;B.length<u;s+=1)B.push(B[s%B.length]);return!0===w&&(B=Array.from(new Set(B))),B})(i,s),object=()=>{throw new Error(\"Not implemented\")},bytes=s=>Ct()(s),random_pick=s=>s.at(0),predicates_isBooleanJSONSchema=s=>\"boolean\"==typeof s,isJSONSchemaObject=s=>EI()(s),isJSONSchema=s=>predicates_isBooleanJSONSchema(s)||isJSONSchemaObject(s),email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const wI=class Registry{data={};register(s,i){this.data[s]=i}unregister(s){void 0===s?this.data={}:delete this.data[s]}get(s){return this.data[s]}},SI=new wI,api_formatAPI=(s,i)=>\"function\"==typeof i?SI.register(s,i):null===i?SI.unregister(s):SI.get(s);var xI=__webpack_require__(48287).Buffer;const _7bit=s=>xI.from(s).toString(\"ascii\");var kI=__webpack_require__(48287).Buffer;const _8bit=s=>kI.from(s).toString(\"utf8\");var OI=__webpack_require__(48287).Buffer;const encoders_binary=s=>OI.from(s).toString(\"binary\"),quoted_printable=s=>{let i=\"\";for(let u=0;u<s.length;u++){const _=s.charCodeAt(u);if(61===_)i+=\"=3D\";else if(_>=33&&_<=60||_>=62&&_<=126||9===_||32===_)i+=s.charAt(u);else if(13===_||10===_)i+=\"\\r\\n\";else if(_>126){const _=unescape(encodeURIComponent(s.charAt(u)));for(let s=0;s<_.length;s++)i+=\"=\"+(\"0\"+_.charCodeAt(s).toString(16)).slice(-2).toUpperCase()}else i+=\"=\"+(\"0\"+_.toString(16)).slice(-2).toUpperCase()}return i};var CI=__webpack_require__(48287).Buffer;const base16=s=>CI.from(s).toString(\"hex\");var AI=__webpack_require__(48287).Buffer;const base32=s=>{const i=AI.from(s).toString(\"utf8\"),u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let _=0,w=\"\",x=0,j=0;for(let s=0;s<i.length;s++)for(x=x<<8|i.charCodeAt(s),j+=8;j>=5;)w+=u.charAt(x>>>j-5&31),j-=5;j>0&&(w+=u.charAt(x<<5-j&31),_=(8-8*i.length%5)%5);for(let s=0;s<_;s++)w+=\"=\";return w};var jI=__webpack_require__(48287).Buffer;const base64=s=>jI.from(s).toString(\"base64\");var PI=__webpack_require__(48287).Buffer;const base64url=s=>PI.from(s).toString(\"base64url\");const II=new class EncoderRegistry extends wI{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary:encoders_binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(s,i)=>\"function\"==typeof i?II.register(s,i):null===i?II.unregister(s):II.get(s);encoderAPI.getDefaults=()=>II.defaults;const NI=encoderAPI,MI={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},TI={\"image/*\":()=>bytes(25).toString(\"binary\")},RI={\"audio/*\":()=>bytes(25).toString(\"binary\")},DI={\"video/*\":()=>bytes(25).toString(\"binary\")},BI={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const LI=new class MediaTypeRegistry extends wI{#e={...MI,...TI,...RI,...DI,...BI};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(s,i)=>{if(\"function\"==typeof i)return LI.register(s,i);if(null===i)return LI.unregister(s);const u=s.split(\";\").at(0),_=`${u.split(\"/\").at(0)}/*`;return LI.get(s)||LI.get(u)||LI.get(_)};mediaTypeAPI.getDefaults=()=>LI.defaults;const FI=mediaTypeAPI,types_string=(s,{sample:i}={})=>{const{contentEncoding:u,contentMediaType:_,contentSchema:w}=s,{pattern:x,format:j}=s,P=NI(u)||DO();let B;if(\"string\"==typeof x)B=(s=>{try{return new(fs())(s).gen()}catch{return\"string\"}})(x);else if(\"string\"==typeof j)B=(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"email\":return email();case\"idn-email\":return idn_email();case\"hostname\":return hostname();case\"idn-hostname\":return idn_hostname();case\"ipv4\":return ipv4();case\"ipv6\":return ipv6();case\"uri\":return uri();case\"uri-reference\":return uri_reference();case\"iri\":return iri();case\"iri-reference\":return iri_reference();case\"uuid\":return uuid();case\"uri-template\":return uri_template();case\"json-pointer\":return json_pointer();case\"relative-json-pointer\":return relative_json_pointer();case\"date-time\":return date_time();case\"date\":return date();case\"time\":return time();case\"duration\":return duration();case\"password\":return generators_password();case\"regex\":return regex()}return\"string\"})(s);else if(isJSONSchema(w)&&\"string\"==typeof _&&void 0!==i)B=Array.isArray(i)||\"object\"==typeof i?JSON.stringify(i):String(i);else if(\"string\"==typeof _){const i=FI(_);\"function\"==typeof i&&(B=i(s))}else B=\"string\";return P(((s,i={})=>{const{maxLength:u,minLength:_}=i;let w=s;if(Number.isInteger(u)&&u>0&&(w=w.slice(0,u)),Number.isInteger(_)&&_>0){let s=0;for(;w.length<_;)w+=w[s++%w.length]}return w})(B,s))},generators_float=()=>.1,generators_double=()=>.1,applyNumberConstraints=(s,i={})=>{const{minimum:u,maximum:_,exclusiveMinimum:w,exclusiveMaximum:x}=i,{multipleOf:j}=i,P=Number.isInteger(s)?1:Number.EPSILON;let B=\"number\"==typeof u?u:null,$=\"number\"==typeof _?_:null,U=s;if(\"number\"==typeof w&&(B=null!==B?Math.max(B,w+P):w+P),\"number\"==typeof x&&($=null!==$?Math.min($,x-P):x-P),U=B>$&&s||B||$||U,\"number\"==typeof j&&j>0){const s=U%j;U=0===s?U:U+j-s}return U},types_number=s=>{const{format:i}=s;let u;return u=\"string\"==typeof i?(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"float\":return generators_float();case\"double\":return generators_double()}return 0})(s):0,applyNumberConstraints(u,s)},int32=()=>2**30>>>0,int64=()=>2**53-1,types_integer=s=>{const{format:i}=s;let u;return u=\"string\"==typeof i?(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"int32\":return int32();case\"int64\":return int64()}return 0})(s):0,applyNumberConstraints(u,s)},types_boolean=s=>\"boolean\"!=typeof s.default||s.default,qI=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(s,i)=>\"string\"==typeof i&&Object.hasOwn(s,i)?s[i]:()=>`Unknown Type: ${i}`}),$I=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=s=>{if(!isJSONSchemaObject(s))return!1;const{examples:i,example:u,default:_}=s;return!!(Array.isArray(i)&&i.length>=1)||(void 0!==_||void 0!==u)},extractExample=s=>{if(!isJSONSchemaObject(s))return null;const{examples:i,example:u,default:_}=s;return Array.isArray(i)&&i.length>=1?i.at(0):void 0!==_?_:void 0!==u?u:void 0},UI={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};UI.number=UI.integer;const zI=\"string\",inferTypeFromValue=s=>void 0===s?null:null===s?\"null\":Array.isArray(s)?\"array\":Number.isInteger(s)?\"integer\":typeof s,foldType=s=>{if(Array.isArray(s)&&s.length>=1){if(s.includes(\"array\"))return\"array\";if(s.includes(\"object\"))return\"object\";{const i=random_pick(s);if($I.includes(i))return i}}return $I.includes(s)?s:null},inferType=(s,i=new WeakSet)=>{if(!isJSONSchemaObject(s))return zI;if(i.has(s))return zI;i.add(s);let{type:u,const:_}=s;if(u=foldType(u),\"string\"!=typeof u){const i=Object.keys(UI);e:for(let _=0;_<i.length;_+=1){const w=i[_],x=UI[w];for(let i=0;i<x.length;i+=1){const _=x[i];if(Object.hasOwn(s,_)){u=w;break e}}}}if(\"string\"!=typeof u&&void 0!==_){const s=inferTypeFromValue(_);u=\"string\"==typeof s?s:u}if(\"string\"!=typeof u){const combineTypes=u=>{if(Array.isArray(s[u])){const _=s[u].map((s=>inferType(s,i)));return foldType(_)}return null},_=combineTypes(\"allOf\"),w=combineTypes(\"anyOf\"),x=combineTypes(\"oneOf\"),j=s.not?inferType(s.not,i):null;(_||w||x||j)&&(u=foldType([_,w,x,j].filter(Boolean)))}if(\"string\"!=typeof u&&hasExample(s)){const i=extractExample(s),_=inferTypeFromValue(i);u=\"string\"==typeof _?_:u}return i.delete(s),u||zI},type_getType=s=>inferType(s),typeCast=s=>predicates_isBooleanJSONSchema(s)?(s=>!1===s?{not:{}}:{})(s):isJSONSchemaObject(s)?s:{},merge_merge=(s,i,u={})=>{if(predicates_isBooleanJSONSchema(s)&&!0===s)return!0;if(predicates_isBooleanJSONSchema(s)&&!1===s)return!1;if(predicates_isBooleanJSONSchema(i)&&!0===i)return!0;if(predicates_isBooleanJSONSchema(i)&&!1===i)return!1;if(!isJSONSchema(s))return i;if(!isJSONSchema(i))return s;const _={...i,...s};if(i.type&&s.type&&Array.isArray(i.type)&&\"string\"==typeof i.type){const u=normalizeArray(i.type).concat(s.type);_.type=Array.from(new Set(u))}if(Array.isArray(i.required)&&Array.isArray(s.required)&&(_.required=[...new Set([...s.required,...i.required])]),i.properties&&s.properties){const w=new Set([...Object.keys(i.properties),...Object.keys(s.properties)]);_.properties={};for(const x of w){const w=i.properties[x]||{},j=s.properties[x]||{};w.readOnly&&!u.includeReadOnly||w.writeOnly&&!u.includeWriteOnly?_.required=(_.required||[]).filter((s=>s!==x)):_.properties[x]=merge_merge(j,w,u)}}return isJSONSchema(i.items)&&isJSONSchema(s.items)&&(_.items=merge_merge(s.items,i.items,u)),isJSONSchema(i.contains)&&isJSONSchema(s.contains)&&(_.contains=merge_merge(s.contains,i.contains,u)),isJSONSchema(i.contentSchema)&&isJSONSchema(s.contentSchema)&&(_.contentSchema=merge_merge(s.contentSchema,i.contentSchema,u)),_},VI=merge_merge,main_sampleFromSchemaGeneric=(s,i={},u=void 0,_=!1)=>{if(null==s&&void 0===u)return;\"function\"==typeof s?.toJS&&(s=s.toJS()),s=typeCast(s);let w=void 0!==u||hasExample(s);const x=!w&&Array.isArray(s.oneOf)&&s.oneOf.length>0,j=!w&&Array.isArray(s.anyOf)&&s.anyOf.length>0;if(!w&&(x||j)){const u=typeCast(random_pick(x?s.oneOf:s.anyOf));!(s=VI(s,u,i)).xml&&u.xml&&(s.xml=u.xml),hasExample(s)&&hasExample(u)&&(w=!0)}const P={};let{xml:B,properties:$,additionalProperties:U,items:Y,contains:X}=s||{},Z=type_getType(s),{includeReadOnly:ee,includeWriteOnly:ie}=i;B=B||{};let ae,{name:le,prefix:ce,namespace:pe}=B,de={};if(Object.hasOwn(s,\"type\")||(s.type=Z),_&&(le=le||\"notagname\",ae=(ce?`${ce}:`:\"\")+le,pe)){P[ce?`xmlns:${ce}`:\"xmlns\"]=pe}_&&(de[ae]=[]);const fe=objectify($);let ye,be=0;const hasExceededMaxProperties=()=>Number.isInteger(s.maxProperties)&&s.maxProperties>0&&be>=s.maxProperties,canAddProperty=i=>!(Number.isInteger(s.maxProperties)&&s.maxProperties>0)||!hasExceededMaxProperties()&&(!(i=>!Array.isArray(s.required)||0===s.required.length||!s.required.includes(i))(i)||s.maxProperties-be-(()=>{if(!Array.isArray(s.required)||0===s.required.length)return 0;let i=0;return _?s.required.forEach((s=>i+=void 0===de[s]?0:1)):s.required.forEach((s=>{i+=void 0===de[ae]?.find((i=>void 0!==i[s]))?0:1})),s.required.length-i})()>0);if(ye=_?(u,w=void 0)=>{if(s&&fe[u]){if(fe[u].xml=fe[u].xml||{},fe[u].xml.attribute){const s=Array.isArray(fe[u].enum)?random_pick(fe[u].enum):void 0;if(hasExample(fe[u]))P[fe[u].xml.name||u]=extractExample(fe[u]);else if(void 0!==s)P[fe[u].xml.name||u]=s;else{const s=typeCast(fe[u]),i=type_getType(s),_=fe[u].xml.name||u;P[_]=qI[i](s)}return}fe[u].xml.name=fe[u].xml.name||u}else fe[u]||!1===U||(fe[u]={xml:{name:u}});let x=main_sampleFromSchemaGeneric(fe[u],i,w,_);canAddProperty(u)&&(be++,Array.isArray(x)?de[ae]=de[ae].concat(x):de[ae].push(x))}:(u,w)=>{if(canAddProperty(u)){if(EI()(s.discriminator?.mapping)&&s.discriminator.propertyName===u&&\"string\"==typeof s.$$ref){for(const i in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[i])){de[u]=i;break}}else de[u]=main_sampleFromSchemaGeneric(fe[u],i,w,_);be++}},w){let w;if(w=void 0!==u?u:extractExample(s),!_){if(\"number\"==typeof w&&\"string\"===Z)return`${w}`;if(\"string\"!=typeof w||\"string\"===Z)return w;try{return JSON.parse(w)}catch{return w}}if(\"array\"===Z){if(!Array.isArray(w)){if(\"string\"==typeof w)return w;w=[w]}let u=[];return isJSONSchemaObject(Y)&&(Y.xml=Y.xml||B||{},Y.xml.name=Y.xml.name||B.name,u=w.map((s=>main_sampleFromSchemaGeneric(Y,i,s,_)))),isJSONSchemaObject(X)&&(X.xml=X.xml||B||{},X.xml.name=X.xml.name||B.name,u=[main_sampleFromSchemaGeneric(X,i,void 0,_),...u]),u=qI.array(s,{sample:u}),B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P})):de=u,de}if(\"object\"===Z){if(\"string\"==typeof w)return w;for(const s in w)Object.hasOwn(w,s)&&(fe[s]?.readOnly&&!ee||fe[s]?.writeOnly&&!ie||(fe[s]?.xml?.attribute?P[fe[s].xml.name||s]=w[s]:ye(s,w[s])));return gs()(P)||de[ae].push({_attr:P}),de}return de[ae]=gs()(P)?w:[{_attr:P},w],de}if(\"array\"===Z){let u=[];if(isJSONSchemaObject(X))if(_&&(X.xml=X.xml||s.xml||{},X.xml.name=X.xml.name||B.name),Array.isArray(X.anyOf))u.push(...X.anyOf.map((s=>main_sampleFromSchemaGeneric(VI(s,X,i),i,void 0,_))));else if(Array.isArray(X.oneOf))u.push(...X.oneOf.map((s=>main_sampleFromSchemaGeneric(VI(s,X,i),i,void 0,_))));else{if(!(!_||_&&B.wrapped))return main_sampleFromSchemaGeneric(X,i,void 0,_);u.push(main_sampleFromSchemaGeneric(X,i,void 0,_))}if(isJSONSchemaObject(Y))if(_&&(Y.xml=Y.xml||s.xml||{},Y.xml.name=Y.xml.name||B.name),Array.isArray(Y.anyOf))u.push(...Y.anyOf.map((s=>main_sampleFromSchemaGeneric(VI(s,Y,i),i,void 0,_))));else if(Array.isArray(Y.oneOf))u.push(...Y.oneOf.map((s=>main_sampleFromSchemaGeneric(VI(s,Y,i),i,void 0,_))));else{if(!(!_||_&&B.wrapped))return main_sampleFromSchemaGeneric(Y,i,void 0,_);u.push(main_sampleFromSchemaGeneric(Y,i,void 0,_))}return u=qI.array(s,{sample:u}),_&&B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P}),de):u}if(\"object\"===Z){for(let s in fe)Object.hasOwn(fe,s)&&(fe[s]?.deprecated||fe[s]?.readOnly&&!ee||fe[s]?.writeOnly&&!ie||ye(s));if(_&&P&&de[ae].push({_attr:P}),hasExceededMaxProperties())return de;if(predicates_isBooleanJSONSchema(U)&&U)_?de[ae].push({additionalProp:\"Anything can be here\"}):de.additionalProp1={},be++;else if(isJSONSchemaObject(U)){const u=U,w=main_sampleFromSchemaGeneric(u,i,void 0,_);if(_&&\"string\"==typeof u?.xml?.name&&\"notagname\"!==u?.xml?.name)de[ae].push(w);else{const i=Number.isInteger(s.minProperties)&&s.minProperties>0&&be<s.minProperties?s.minProperties-be:3;for(let s=1;s<=i;s++){if(hasExceededMaxProperties())return de;if(_){const i={};i[\"additionalProp\"+s]=w.notagname,de[ae].push(i)}else de[\"additionalProp\"+s]=w;be++}}}return de}let _e;if(void 0!==s.const)_e=s.const;else if(s&&Array.isArray(s.enum))_e=random_pick(normalizeArray(s.enum));else{const u=isJSONSchemaObject(s.contentSchema)?main_sampleFromSchemaGeneric(s.contentSchema,i,void 0,_):void 0;_e=qI[Z](s,{sample:u})}return _?(de[ae]=gs()(P)?_e:[{_attr:P},_e],de):_e},main_createXMLExample=(s,i,u)=>{const _=main_sampleFromSchemaGeneric(s,i,u,!0);if(_)return\"string\"==typeof _?_:hs()(_,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(s,i,u)=>main_sampleFromSchemaGeneric(s,i,u,!1),main_resolver=(s,i,u)=>[s,JSON.stringify(i),JSON.stringify(u)],WI=utils_memoizeN(main_createXMLExample,main_resolver),KI=utils_memoizeN(main_sampleFromSchema,main_resolver),HI=[{when:/json/,shouldStringifyTypes:[\"string\"]}],JI=[\"object\"],fn_get_json_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.jsonSchema202012.memoizedSampleFromSchema(i,u,w),P=typeof j,B=HI.reduce(((s,i)=>i.when.test(_)?[...s,...i.shouldStringifyTypes]:s),JI);return bt()(B,(s=>s===P))?JSON.stringify(j,null,2):j},fn_get_yaml_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.jsonSchema202012.getJsonSampleSchema(i,u,_,w);let P;try{P=so.dump(so.load(j),{lineWidth:-1},{schema:Jn}),\"\\n\"===P[P.length-1]&&(P=P.slice(0,P.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return P.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=s=>(i,u,_)=>{const{fn:w}=s();if(i&&!i.xml&&(i.xml={}),i&&!i.xml.name){if(!i.$$ref&&(i.type||i.items||i.properties||i.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(i.$$ref){let s=i.$$ref.match(/\\S*\\/(\\S+)$/);i.xml.name=s[1]}}return w.jsonSchema202012.memoizedCreateXMLExample(i,u,_)},fn_get_sample_schema=s=>(i,u=\"\",_={},w=void 0)=>{const{fn:x}=s();return\"function\"==typeof i?.toJS&&(i=i.toJS()),\"function\"==typeof w?.toJS&&(w=w.toJS()),/xml/.test(u)?x.jsonSchema202012.getXmlSampleSchema(i,_,w):/(yaml|yml)/.test(u)?x.jsonSchema202012.getYamlSampleSchema(i,_,u,w):x.jsonSchema202012.getJsonSampleSchema(i,_,u,w)},json_schema_2020_12_samples=({getSystem:s})=>{const i=fn_get_json_sample_schema(s),u=fn_get_yaml_sample_schema(s),_=fn_get_xml_sample_schema(s),w=fn_get_sample_schema(s);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleEncoderAPI:NI,sampleFormatAPI:api_formatAPI,sampleMediaTypeAPI:FI,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:KI,memoizedCreateXMLExample:WI,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const{GIT_DIRTY:GI,GIT_COMMIT:YI,PACKAGE_VERSION:XI,BUILD_TIME:QI}={PACKAGE_VERSION:\"5.12.3\",GIT_COMMIT:\"gc002e597\",GIT_DIRTY:!0,BUILD_TIME:\"Wed, 27 Mar 2024 06:57:29 GMT\"};function SwaggerUI(s){pt.versions=pt.versions||{},pt.versions.swaggerUi={version:XI,gitRevision:YI,gitDirty:GI,buildTimestamp:QI};const i={dom_id:null,domNode:null,spec:{},url:\"\",urls:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:null,filter:null,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:s=>s,responseInterceptor:s=>s,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],pluginsOptions:{pluginLoadType:\"legacy\"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"}};let u=s.queryConfigEnabled?(()=>{let s={},i=pt.location.search;if(!i)return{};if(\"\"!=i){let u=i.substr(1).split(\"&\");for(let i in u)Object.prototype.hasOwnProperty.call(u,i)&&(i=u[i].split(\"=\"),s[decodeURIComponent(i[0])]=i[1]&&decodeURIComponent(i[1])||\"\")}return s})():{};const _=s.domNode;delete s.domNode;const w=ze()({},i,s,u),x={system:{configs:w.configs},plugins:w.presets,pluginsOptions:w.pluginsOptions,state:ze()({layout:{layout:w.layout,filter:w.filter},spec:{spec:\"\",url:w.url},requestSnippets:w.requestSnippets},w.initialState)};if(w.initialState)for(var j in w.initialState)Object.prototype.hasOwnProperty.call(w.initialState,j)&&void 0===w.initialState[j]&&delete x.state[j];var P=new Store(x);P.register([w.plugins,()=>({fn:w.fn,components:w.components,state:w.state})]);var B=P.getSystem();const downloadSpec=s=>{let i=B.specSelectors.getLocalConfig?B.specSelectors.getLocalConfig():{},x=ze()({},i,w,s||{},u);if(_&&(x.domNode=_),P.setConfigs(x),B.configsActions.loaded(),null!==s&&(!u.url&&\"object\"==typeof x.spec&&Object.keys(x.spec).length?(B.specActions.updateUrl(\"\"),B.specActions.updateLoadingStatus(\"success\"),B.specActions.updateSpec(JSON.stringify(x.spec))):B.specActions.download&&x.url&&!x.urls&&(B.specActions.updateUrl(x.url),B.specActions.download(x.url))),x.domNode)B.render(x.domNode,\"App\");else if(x.dom_id){let s=document.querySelector(x.dom_id);B.render(s,\"App\")}else null===x.dom_id||null===x.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\");return B},$=u.config||w.configUrl;return $&&B.specActions&&B.specActions.getConfigByUrl?(B.specActions.getConfigByUrl({url:$,loadRemoteConfig:!0,requestInterceptor:w.requestInterceptor,responseInterceptor:w.responseInterceptor},downloadSpec),B):downloadSpec()}SwaggerUI.System=Store,SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SafeRender:safe_render};const ZI=SwaggerUI})(),w=w.default})()));\n//# sourceMappingURL=swagger-ui-bundle.js.map"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui-es-bundle-core.js",
    "content": "/*! For license information please see swagger-ui-es-bundle-core.js.LICENSE.txt */\nimport*as e from\"base64-js\";import*as t from\"ieee754\";import*as r from\"react\";import*as n from\"redux\";import*as a from\"immutable\";import*as o from\"redux-immutable\";import*as s from\"serialize-error\";import*as l from\"lodash/merge\";import*as i from\"@braintree/sanitize-url\";import*as c from\"lodash/camelCase\";import*as u from\"lodash/upperFirst\";import*as d from\"lodash/memoize\";import*as p from\"lodash/find\";import*as m from\"lodash/some\";import*as f from\"lodash/eq\";import*as h from\"lodash/isFunction\";import*as g from\"css.escape\";import*as y from\"url-parse\";import*as S from\"reselect\";import*as _ from\"prop-types\";import*as v from\"lodash/omit\";import*as b from\"js-yaml\";import*as w from\"zenscroll\";import*as C from\"react-immutable-proptypes\";import*as x from\"lodash/reduce\";import*as k from\"lodash/get\";import*as O from\"@babel/runtime-corejs3/helpers/extends\";import*as N from\"react-copy-to-clipboard\";import*as A from\"react-syntax-highlighter/dist/esm/light\";import*as I from\"react-syntax-highlighter/dist/esm/languages/hljs/javascript\";import*as R from\"react-syntax-highlighter/dist/esm/languages/hljs/json\";import*as B from\"react-syntax-highlighter/dist/esm/languages/hljs/xml\";import*as T from\"react-syntax-highlighter/dist/esm/languages/hljs/bash\";import*as j from\"react-syntax-highlighter/dist/esm/languages/hljs/yaml\";import*as P from\"react-syntax-highlighter/dist/esm/languages/hljs/http\";import*as M from\"react-syntax-highlighter/dist/esm/languages/hljs/powershell\";import*as q from\"react-syntax-highlighter/dist/esm/styles/hljs/agate\";import*as L from\"react-syntax-highlighter/dist/esm/styles/hljs/arta\";import*as D from\"react-syntax-highlighter/dist/esm/styles/hljs/monokai\";import*as U from\"react-syntax-highlighter/dist/esm/styles/hljs/nord\";import*as $ from\"react-syntax-highlighter/dist/esm/styles/hljs/obsidian\";import*as J from\"react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night\";import*as V from\"react-syntax-highlighter/dist/esm/styles/hljs/idea\";import*as K from\"randexp\";import*as z from\"lodash/isEmpty\";import*as F from\"lodash/constant\";import*as W from\"lodash/isString\";import*as H from\"lodash/debounce\";import*as G from\"lodash/set\";import*as X from\"lodash/fp/assocPath\";import*as Y from\"swagger-client/es/resolver/strategies/generic\";import*as Q from\"swagger-client/es/resolver/strategies/openapi-2\";import*as Z from\"swagger-client/es/resolver/strategies/openapi-3-0\";import*as ee from\"swagger-client/es/resolver/strategies/openapi-3-1-apidom\";import*as te from\"swagger-client/es/resolver\";import*as re from\"swagger-client/es/execute\";import*as ne from\"swagger-client/es/http\";import*as ae from\"swagger-client/es/subtree-resolver\";import*as oe from\"swagger-client/es/helpers\";import*as se from\"react-dom\";import*as le from\"react-redux\";import*as ie from\"lodash/identity\";import*as ce from\"lodash/zipObject\";import*as ue from\"lodash/toString\";import*as de from\"classnames\";import*as pe from\"js-file-download\";import*as me from\"xml-but-prettier\";import*as fe from\"lodash/toLower\";import*as he from\"react-immutable-pure-component\";import*as ge from\"remarkable\";import*as ye from\"remarkable/linkify\";import*as Ee from\"dompurify\";import*as Se from\"react-debounce-input\";import*as _e from\"lodash/escapeRegExp\";import*as ve from\"lodash/isPlainObject\";var be={287:function(e,t,r){const n=r(987),a=r(362),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(e){+e!=e&&(e=0);return Buffer.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function createBuffer(e){if(e>s)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if(\"string\"==typeof e)return function fromString(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!Buffer.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|byteLength(e,t);let n=createBuffer(r);const a=n.write(e,t);a!==r&&(n=n.slice(0,a));return n}(e,t);if(ArrayBuffer.isView(e))return function fromArrayView(e){if(isInstance(e,Uint8Array)){const t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);const a=function fromObject(e){if(Buffer.isBuffer(e)){const t=0|checked(e.length),r=createBuffer(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return fromArrayLike(e.data)}(e);if(a)return a;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function assertSize(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){const t=e.length<0?0:0|checked(e.length),r=createBuffer(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,Buffer.prototype),n}function checked(e){if(e>=s)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s.toString(16)+\" bytes\");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let a=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return utf8ToBytes(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return base64ToBytes(e).length;default:if(a)return n?-1:utf8ToBytes(e).length;t=(\"\"+t).toLowerCase(),a=!0}}function slowToString(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return hexSlice(this,t,r);case\"utf8\":case\"utf-8\":return utf8Slice(this,t,r);case\"ascii\":return asciiSlice(this,t,r);case\"latin1\":case\"binary\":return latin1Slice(this,t,r);case\"base64\":return base64Slice(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function swap(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,a){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if(\"string\"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,a);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,a);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(e,t,r,n,a){let o,s=1,l=e.length,i=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;s=2,l/=2,i/=2,r/=2}function read(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let n=-1;for(o=r;o<l;o++)if(read(e,o)===read(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===i)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+i>l&&(r=l-i),o=r;o>=0;o--){let r=!0;for(let n=0;n<i;n++)if(read(e,o+n)!==read(t,n)){r=!1;break}if(r)return o}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;const a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(numberIsNaN(n))return s;e[r+s]=n}return s}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(function asciiToBytes(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(function utf16leToBytes(e,t){let r,n,a;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,a=r%256,o.push(a),o.push(n);return o}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);const n=[];let a=t;for(;a<r;){const t=e[a];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=r){let r,n,l,i;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[a+1],128==(192&r)&&(i=(31&t)<<6|63&r,i>127&&(o=i));break;case 3:r=e[a+1],n=e[a+2],128==(192&r)&&128==(192&n)&&(i=(15&t)<<12|(63&r)<<6|63&n,i>2047&&(i<55296||i>57343)&&(o=i));break;case 4:r=e[a+1],n=e[a+2],l=e[a+3],128==(192&r)&&128==(192&n)&&128==(192&l)&&(i=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&l,i>65535&&i<1114112&&(o=i))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),a+=s}return function decodeCodePointsArray(e){const t=e.length;if(t<=l)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=l));return r}(n)}t.kMaxLength=s,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?\"string\"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function isBuffer(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function compare(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let a=0,o=Math.min(r,n);a<o;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(e){switch(String(e).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!0;default:return!1}},Buffer.concat=function concat(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=Buffer.allocUnsafe(t);let a=0;for(r=0;r<e.length;++r){let t=e[r];if(isInstance(t,Uint8Array))a+t.length>n.length?(Buffer.isBuffer(t)||(t=Buffer.from(t)),t.copy(n,a)):Uint8Array.prototype.set.call(n,t,a);else{if(!Buffer.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,a)}a+=t.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function swap32(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function swap64(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function toString(){const e=this.length;return 0===e?\"\":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){let e=\"\";const r=t.INSPECT_MAX_BYTES;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"<Buffer \"+e+\">\"},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(e,t,r,n,a){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError(\"out of range index\");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(a>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const l=Math.min(o,s),i=this.slice(n,a),c=e.slice(t,r);for(let e=0;e<l;++e)if(i[e]!==c[e]){o=i[e],s=c[e];break}return o<s?-1:s<o?1:0},Buffer.prototype.includes=function includes(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function indexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function write(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let o=!1;for(;;)switch(n){case\"hex\":return hexWrite(this,e,t,r);case\"utf8\":case\"utf-8\":return utf8Write(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,e,t,r);case\"base64\":return base64Write(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,e,t,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const l=4096;function asciiSlice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function latin1Slice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function hexSlice(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let a=\"\";for(let n=t;n<r;++n)a+=u[e[n]];return a}function utf16leSlice(e,t,r){const n=e.slice(t,r);let a=\"\";for(let e=0;e<n.length-1;e+=2)a+=String.fromCharCode(n[e]+256*n[e+1]);return a}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(e,t,r,n,a,o){if(!Buffer.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>a||t<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(e,t,r,n,a){checkIntBI(t,n,a,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function wrtBigUInt64BE(e,t,r,n,a){checkIntBI(t,n,a,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function checkIEEE754(e,t,r,n,a,o){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,8),a.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function slice(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,Buffer.prototype),n},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[e+o]*a;return n},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e+--t],a=1;for(;t>0&&(a*=256);)n+=this[e+--t]*a;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(a)})),Buffer.prototype.readIntLE=function readIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[e+o]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function readIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=t,a=1,o=this[e+--n];for(;n>0&&(a*=256);)o+=this[e+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},Buffer.prototype.readInt8=function readInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),Buffer.prototype.readFloatLE=function readFloatLE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),a.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),a.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),a.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),a.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let a=1,o=0;for(this[t]=255&e;++o<r&&(a*=256);)this[t+o]=e/a&255;return t+r},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Buffer.prototype.writeIntBE=function writeIntBE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Buffer.prototype.writeInt8=function writeInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function copy(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const a=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),a},Buffer.prototype.fill=function fill(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!Buffer.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t<128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;let a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(a=t;a<r;++a)this[a]=e;else{const o=Buffer.isBuffer(e)?e:Buffer.from(e,n),s=o.length;if(0===s)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};const i={};function E(e,t,r){i[e]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function addNumericalSeparator(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function checkIntBI(e,t,r,n,a,o){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let a;throw a=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new i.ERR_OUT_OF_RANGE(\"value\",a,e)}!function checkBounds(e,t,r){validateNumber(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||boundsError(t,e.length-(r+1))}(n,a,o)}function validateNumber(e,t){if(\"number\"!=typeof e)throw new i.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function boundsError(e,t,r){if(Math.floor(e)!==e)throw validateNumber(e,r),new i.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new i.ERR_BUFFER_OUT_OF_BOUNDS;throw new i.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(e,t,r){let n=`The value of \"${e}\" is out of range.`,a=r;return Number.isInteger(r)&&Math.abs(r)>2**32?a=addNumericalSeparator(String(r)):\"bigint\"==typeof r&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=addNumericalSeparator(a)),a+=\"n\"),n+=` It must be ${t}. Received ${a}`,n}),RangeError);const c=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(e,t){let r;t=t||1/0;const n=e.length;let a=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function base64ToBytes(e){return n.toByteArray(function base64clean(e){if((e=(e=e.split(\"=\")[0]).trim().replace(c,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function blitBuffer(e,t,r,n){let a;for(a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e}const u=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t}();function defineBigIntMethod(e){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:e}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},919:function(e,t,r){var n=r(287).Buffer;function isSpecificValue(e){return e instanceof n||e instanceof Date||e instanceof RegExp}function cloneSpecificValue(e){if(e instanceof n){var t=n.alloc?n.alloc(e.length):new n(e.length);return e.copy(t),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error(\"Unexpected situation\")}function deepCloneArray(e){var t=[];return e.forEach((function(e,r){\"object\"==typeof e&&null!==e?Array.isArray(e)?t[r]=deepCloneArray(e):isSpecificValue(e)?t[r]=cloneSpecificValue(e):t[r]=a({},e):t[r]=e})),t}function safeGetProperty(e,t){return\"__proto__\"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,r=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(n){\"object\"!=typeof n||null===n||Array.isArray(n)||Object.keys(n).forEach((function(o){return t=safeGetProperty(r,o),(e=safeGetProperty(n,o))===r?void 0:\"object\"!=typeof e||null===e?void(r[o]=e):Array.isArray(e)?void(r[o]=deepCloneArray(e)):isSpecificValue(e)?void(r[o]=cloneSpecificValue(e)):\"object\"!=typeof t||null===t||Array.isArray(t)?void(r[o]=a({},e)):void(r[o]=a(t,e))}))})),r}},7:function(e){var t,r=\"object\"==typeof Reflect?Reflect:null,n=r&&\"function\"==typeof r.apply?r.apply:function ReflectApply(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&\"function\"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function NumberIsNaN(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}e.exports=EventEmitter,e.exports.once=function once(e,t){return new Promise((function(r,n){function errorListener(r){e.removeListener(t,resolver),n(r)}function resolver(){\"function\"==typeof e.removeListener&&e.removeListener(\"error\",errorListener),r([].slice.call(arguments))}eventTargetAgnosticAddListener(e,t,resolver,{once:!0}),\"error\"!==t&&function addErrorHandlerIfEventEmitter(e,t,r){\"function\"==typeof e.on&&eventTargetAgnosticAddListener(e,\"error\",t,r)}(e,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var o=10;function checkListener(e){if(\"function\"!=typeof e)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,r,n){var a,o,s;if(checkListener(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit(\"newListener\",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if(\"function\"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(a=_getMaxListeners(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");l.name=\"MaxListenersExceededWarning\",l.emitter=e,l.type=t,l.count=s.length,function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}(l)}return e}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=onceWrapper.bind(n);return a.listener=r,n.wrapFn=a,a}function _listeners(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:\"function\"==typeof a?r?[a.listener||a]:[a]:r?function unwrapListeners(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):arrayClone(a,a.length)}function listenerCount(e){var t=this._events;if(void 0!==t){var r=t[e];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function arrayClone(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function eventTargetAgnosticAddListener(e,t,r,n){if(\"function\"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if(\"function\"!=typeof e.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function wrapListener(a){n.once&&e.removeEventListener(t,wrapListener),r(a)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return o},set:function(e){if(\"number\"!=typeof e||e<0||a(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");o=e}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(e){if(\"number\"!=typeof e||e<0||a(e))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+e+\".\");return this._maxListeners=e,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a=\"error\"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var l=new Error(\"Unhandled error.\"+(s?\" (\"+s.message+\")\":\"\"));throw l.context=s,l}var i=o[e];if(void 0===i)return!1;if(\"function\"==typeof i)n(i,this,t);else{var c=i.length,u=arrayClone(i,c);for(r=0;r<c;++r)n(u[r],this,t)}return!0},EventEmitter.prototype.addListener=function addListener(e,t){return _addListener(this,e,t,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(e,t){return _addListener(this,e,t,!0)},EventEmitter.prototype.once=function once(e,t){return checkListener(t),this.on(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(e,t){return checkListener(t),this.prependListener(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.removeListener=function removeListener(e,t){var r,n,a,o,s;if(checkListener(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit(\"removeListener\",e,r.listener||t));else if(\"function\"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",e,s||t)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,o=Object.keys(r);for(n=0;n<o.length;++n)\"removeListener\"!==(a=o[n])&&this.removeAllListeners(a);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},EventEmitter.prototype.listeners=function listeners(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return\"function\"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?t(this._events):[]}},698:function(e){\"function\"==typeof Object.create?e.exports=function inherits(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype,e.prototype=new TempCtor,e.prototype.constructor=e}}},606:function(e){var t,r,n=e.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(t===setTimeout)return setTimeout(e,0);if((t===defaultSetTimout||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){t=defaultSetTimout}try{r=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();var a,o=[],s=!1,l=-1;function cleanUpNextTick(){s&&a&&(s=!1,a.length?o=a.concat(o):l=-1,o.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=o.length;t;){for(a=o,o=[];++l<t;)a&&a[l].run();l=-1,t=o.length}a=null,s=!1,function runClearTimeout(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];o.push(new Item(e,t)),1!==o.length||s||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},n.title=\"browser\",n.browser=!0,n.env={},n.argv=[],n.version=\"\",n.versions={},n.on=noop,n.addListener=noop,n.once=noop,n.off=noop,n.removeListener=noop,n.removeAllListeners=noop,n.emit=noop,n.prependListener=noop,n.prependOnceListener=noop,n.listeners=function(e){return[]},n.binding=function(e){throw new Error(\"process.binding is not supported\")},n.cwd=function(){return\"/\"},n.chdir=function(e){throw new Error(\"process.chdir is not supported\")},n.umask=function(){return 0}},209:function(e,t,r){var n=r(606),a=65536,o=4294967295;var s=r(861).Buffer,l=r.g.crypto||r.g.msCrypto;l&&l.getRandomValues?e.exports=function randomBytes(e,t){if(e>o)throw new RangeError(\"requested too many random bytes\");var r=s.allocUnsafe(e);if(e>0)if(e>a)for(var i=0;i<e;i+=a)l.getRandomValues(r.slice(i,i+a));else l.getRandomValues(r);if(\"function\"==typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},48:function(e){var t={};function createErrorType(e,r,n){n||(n=Error);var a=function(e){function NodeError(t,n,a){return e.call(this,function getMessage(e,t,n){return\"string\"==typeof r?r:r(e,t,n)}(t,n,a))||this}return function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(NodeError,e),NodeError}(n);a.prototype.name=n.name,a.prototype.code=e,t[e]=a}function oneOf(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:2===r?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}return\"of \".concat(t,\" \").concat(String(e))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(e,t){return'The value \"'+t+'\" is invalid for option \"'+e+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(e,t,r){var n,a;if(\"string\"==typeof t&&function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\",function endsWith(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e,\" argument\"))a=\"The \".concat(e,\" \").concat(n,\" \").concat(oneOf(t,\"type\"));else{var o=function includes(e,t,r){return\"number\"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,\".\")?\"property\":\"argument\";a='The \"'.concat(e,'\" ').concat(o,\" \").concat(n,\" \").concat(oneOf(t,\"type\"))}return a+=\". Received type \".concat(typeof r)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(e){return\"The \"+e+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(e){return\"Cannot call \"+e+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(e){return\"Unknown encoding: \"+e}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.F=t},382:function(e,t,r){var n=r(606),a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=Duplex;var o=r(412),s=r(708);r(698)(Duplex,o);for(var l=a(s.prototype),i=0;i<l.length;i++){var c=l[i];Duplex.prototype[c]||(Duplex.prototype[c]=s.prototype[c])}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||n.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},600:function(e,t,r){e.exports=PassThrough;var n=r(610);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}r(698)(PassThrough,n),PassThrough.prototype._transform=function(e,t,r){r(null,e)}},412:function(e,t,r){var n,a=r(606);e.exports=Readable,Readable.ReadableState=ReadableState;r(7).EventEmitter;var o=function EElistenerCount(e,t){return e.listeners(t).length},s=r(345),l=r(287).Buffer,i=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var c,u=r(838);c=u&&u.debuglog?u.debuglog(\"stream\"):function debug(){};var d,p,m,f=r(726),h=r(896),g=r(291).getHighWaterMark,y=r(48).F,S=y.ERR_INVALID_ARG_TYPE,_=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,b=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(698)(Readable,s);var w=h.errorOrDestroy,C=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(e,t,a){n=n||r(382),e=e||{},\"boolean\"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,\"readableHighWaterMark\",a),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(141).I),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function Readable(e){if(n=n||r(382),!(this instanceof Readable))return new Readable(e);var t=this instanceof n;this._readableState=new ReadableState(e,this,t),this.readable=!0,e&&(\"function\"==typeof e.read&&(this._read=e.read),\"function\"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function readableAddChunk(e,t,r,n,a){c(\"readableAddChunk\",t);var o,s=e._readableState;if(null===t)s.reading=!1,function onEofChunk(e,t){if(c(\"onEofChunk\"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?emitReadable(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,emitReadable_(e)))}(e,s);else if(a||(o=function chunkInvalid(e,t){var r;(function _isUint8Array(e){return l.isBuffer(e)||e instanceof i})(t)||\"string\"==typeof t||void 0===t||e.objectMode||(r=new S(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],t));return r}(s,t)),o)w(e,o);else if(s.objectMode||t&&t.length>0)if(\"string\"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function _uint8ArrayToBuffer(e){return l.from(e)}(t)),n)s.endEmitted?w(e,new b):addChunk(e,s,t,!0);else if(s.ended)w(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?addChunk(e,s,t,!1):maybeReadMore(e,s)):addChunk(e,s,t,!1)}else n||(s.reading=!1,maybeReadMore(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function addChunk(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit(\"data\",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(e){this._readableState&&(this._readableState.destroyed=e)}}),Readable.prototype.destroy=h.destroy,Readable.prototype._undestroy=h.undestroy,Readable.prototype._destroy=function(e,t){t(e)},Readable.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=\"\"),r=!0),readableAddChunk(this,e,t,!1,r)},Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(e){d||(d=r(141).I);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,a=\"\";null!==n;)a+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),\"\"!==a&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var x=1073741824;function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function computeNewHighWaterMark(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function emitReadable(e){var t=e._readableState;c(\"emitReadable\",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c(\"emitReadable\",t.flowing),t.emittedReadable=!0,a.nextTick(emitReadable_,e))}function emitReadable_(e){var t=e._readableState;c(\"emitReadable_\",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit(\"readable\"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,a.nextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c(\"maybeReadMore read 0\"),e.read(0),r===t.length)break}t.readingMore=!1}function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount(\"readable\")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(\"data\")>0&&e.resume()}function nReadingNextTick(e){c(\"readable nexttick read 0\"),e.read(0)}function resume_(e,t){c(\"resume\",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(\"resume\"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(c(\"flow\",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(\"\"):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function endReadable(e){var t=e._readableState;c(\"endReadable\",t.endEmitted),t.endEmitted||(t.ended=!0,a.nextTick(endReadableNT,t,e))}function endReadableNT(e,t){if(c(\"endReadableNT\",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function indexOf(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Readable.prototype.read=function(e){c(\"read\",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var n,a=t.needReadable;return c(\"need readable\",a),(0===t.length||t.length-e<t.highWaterMark)&&c(\"length less than watermark\",a=!0),t.ended||t.reading?c(\"reading or ended\",a=!1):a&&(c(\"do read\"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t))),null===(n=e>0?fromList(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==n&&this.emit(\"data\",n),n},Readable.prototype._read=function(e){w(this,new v(\"_read()\"))},Readable.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c(\"pipe count=%d opts=%j\",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==a.stdout&&e!==a.stderr?onend:unpipe;function onunpipe(t,a){c(\"onunpipe\"),t===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,function cleanup(){c(\"cleanup\"),e.removeListener(\"close\",onclose),e.removeListener(\"finish\",onfinish),e.removeListener(\"drain\",l),e.removeListener(\"error\",onerror),e.removeListener(\"unpipe\",onunpipe),r.removeListener(\"end\",onend),r.removeListener(\"end\",unpipe),r.removeListener(\"data\",ondata),i=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}())}function onend(){c(\"onend\"),e.end()}n.endEmitted?a.nextTick(s):r.once(\"end\",s),e.on(\"unpipe\",onunpipe);var l=function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;c(\"pipeOnDrain\",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,\"data\")&&(t.flowing=!0,flow(e))}}(r);e.on(\"drain\",l);var i=!1;function ondata(t){c(\"ondata\");var a=e.write(t);c(\"dest.write\",a),!1===a&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==indexOf(n.pipes,e))&&!i&&(c(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function onerror(t){c(\"onerror\",t),unpipe(),e.removeListener(\"error\",onerror),0===o(e,\"error\")&&w(e,t)}function onclose(){e.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){c(\"onfinish\"),e.removeListener(\"close\",onclose),unpipe()}function unpipe(){c(\"unpipe\"),r.unpipe(e)}return r.on(\"data\",ondata),function prependListener(e,t,r){if(\"function\"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,\"error\",onerror),e.once(\"close\",onclose),e.once(\"finish\",onfinish),e.emit(\"pipe\",r),n.flowing||(c(\"pipe resume\"),r.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r)),this;if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<a;o++)n[o].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var s=indexOf(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this,r)),this},Readable.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return\"data\"===e?(n.readableListening=this.listenerCount(\"readable\")>0,!1!==n.flowing&&this.resume()):\"readable\"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c(\"on readable\",n.length,n.reading),n.length?emitReadable(this):n.reading||a.nextTick(nReadingNextTick,this))),r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return\"readable\"===e&&a.nextTick(updateReadableListening,this),r},Readable.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==e&&void 0!==e||a.nextTick(updateReadableListening,this),t},Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(c(\"resume\"),e.flowing=!e.readableListening,function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,a.nextTick(resume_,e,t))}(this,e)),e.paused=!1,this},Readable.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on(\"data\",(function(a){(c(\"wrapped data\"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a)||(r.objectMode||a&&a.length)&&(t.push(a)||(n=!0,e.pause()))})),e)void 0===this[a]&&\"function\"==typeof e[a]&&(this[a]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<C.length;o++)e.on(C[o],this.emit.bind(this,C[o]));return this._read=function(t){c(\"wrapped _read\",t),n&&(n=!1,e.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r(955)),p(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(e){this._readableState&&(this._readableState.flowing=e)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(e,t){return void 0===m&&(m=r(157)),m(Readable,e,t)})},610:function(e,t,r){e.exports=Transform;var n=r(48).F,a=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,i=r(382);function afterTransform(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit(\"error\",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function Transform(e){if(!(this instanceof Transform))return new Transform(e);i.call(this,e),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(\"function\"==typeof e.transform&&(this._transform=e.transform),\"function\"==typeof e.flush&&(this._flush=e.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var e=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(t,r){done(e,t,r)}))}function done(e,t,r){if(t)return e.emit(\"error\",t);if(null!=r&&e.push(r),e._writableState.length)throw new l;if(e._transformState.transforming)throw new s;return e.push(null)}r(698)(Transform,i),Transform.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},Transform.prototype._transform=function(e,t,r){r(new a(\"_transform()\"))},Transform.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},Transform.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},Transform.prototype._destroy=function(e,t){i.prototype._destroy.call(this,e,(function(e){t(e)}))}},708:function(e,t,r){var n,a=r(606);function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(e,t,r){var n=e.entry;e.entry=null;for(;n;){var a=n.callback;t.pendingcb--,a(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=Writable,Writable.WritableState=WritableState;var o={deprecate:r(643)},s=r(345),l=r(287).Buffer,i=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var c,u=r(896),d=r(291).getHighWaterMark,p=r(48).F,m=p.ERR_INVALID_ARG_TYPE,f=p.ERR_METHOD_NOT_IMPLEMENTED,h=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,S=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,v=p.ERR_UNKNOWN_ENCODING,b=u.errorOrDestroy;function nop(){}function WritableState(e,t,o){n=n||r(382),e=e||{},\"boolean\"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,\"writableHighWaterMark\",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function onwrite(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(\"function\"!=typeof o)throw new h;if(function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function onwriteError(e,t,r,n,o){--t.pendingcb,r?(a.nextTick(o,n),a.nextTick(finishMaybe,e,t),e._writableState.errorEmitted=!0,b(e,n)):(o(n),e._writableState.errorEmitted=!0,b(e,n),finishMaybe(e,t))}(e,r,n,t,o);else{var s=needFinish(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),n?a.nextTick(afterWrite,e,r,s,o):afterWrite(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(e){var t=this instanceof(n=n||r(382));if(!t&&!c.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t),this.writable=!0,e&&(\"function\"==typeof e.write&&(this._write=e.write),\"function\"==typeof e.writev&&(this._writev=e.writev),\"function\"==typeof e.destroy&&(this._destroy=e.destroy),\"function\"==typeof e.final&&(this._final=e.final)),s.call(this)}function doWrite(e,t,r,n,a,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y(\"write\")):r?e._writev(a,t.onwrite):e._write(a,o,t.onwrite),t.sync=!1}function afterWrite(e,t,r,n){r||function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit(\"drain\"))}(e,t),t.pendingcb--,n(),finishMaybe(e,t)}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,l=!0;r;)a[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;a.allBuffers=l,doWrite(e,t,!0,t.length,a,\"\",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new CorkedRequest(t),t.bufferedRequestCount=0}else{for(;r;){var i=r.chunk,c=r.encoding,u=r.callback;if(doWrite(e,t,!1,t.objectMode?1:i.length,i,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function callFinal(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit(\"prefinish\"),finishMaybe(e,t)}))}function finishMaybe(e,t){var r=needFinish(t);if(r&&(function prefinish(e,t){t.prefinished||t.finalCalled||(\"function\"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit(\"prefinish\")):(t.pendingcb++,t.finalCalled=!0,a.nextTick(callFinal,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit(\"finish\"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(698)(Writable,s),WritableState.prototype.getBuffer=function getBuffer(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:o.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(e){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){return!!c.call(this,e)||this===Writable&&(e&&e._writableState instanceof WritableState)}})):c=function realHasInstance(e){return e instanceof this},Writable.prototype.pipe=function(){b(this,new g)},Writable.prototype.write=function(e,t,r){var n=this._writableState,o=!1,s=!n.objectMode&&function _isUint8Array(e){return l.isBuffer(e)||e instanceof i}(e);return s&&!l.isBuffer(e)&&(e=function _uint8ArrayToBuffer(e){return l.from(e)}(e)),\"function\"==typeof t&&(r=t,t=null),s?t=\"buffer\":t||(t=n.defaultEncoding),\"function\"!=typeof r&&(r=nop),n.ending?function writeAfterEnd(e,t){var r=new _;b(e,r),a.nextTick(t,r)}(this,r):(s||function validChunk(e,t,r,n){var o;return null===r?o=new S:\"string\"==typeof r||t.objectMode||(o=new m(\"chunk\",[\"string\",\"Buffer\"],r)),!o||(b(e,o),a.nextTick(n,o),!1)}(this,n,e,r))&&(n.pendingcb++,o=function writeOrBuffer(e,t,r,n,a,o){if(!r){var s=function decodeChunk(e,t,r){e.objectMode||!1===e.decodeStrings||\"string\"!=typeof t||(t=l.from(t,r));return t}(t,n,a);n!==s&&(r=!0,a=\"buffer\",n=s)}var i=t.objectMode?1:n.length;t.length+=i;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:a,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,i,n,a,o);return c}(this,n,s,e,t,r)),o},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(\"string\"==typeof e&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(e,t,r){r(new f(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var n=this._writableState;return\"function\"==typeof e?(r=e,e=null,t=null):\"function\"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?a.nextTick(r):e.once(\"finish\",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=u.destroy,Writable.prototype._undestroy=u.undestroy,Writable.prototype._destroy=function(e,t){t(e)}},955:function(e,t,r){var n,a=r(606);function _defineProperty(e,t,r){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if(\"object\"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(238),s=Symbol(\"lastResolve\"),l=Symbol(\"lastReject\"),i=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),d=Symbol(\"handlePromise\"),p=Symbol(\"stream\");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[s];if(null!==t){var r=e[p].read();null!==r&&(e[u]=null,e[s]=null,e[l]=null,t(createIterResult(r,!1)))}}function onReadable(e){a.nextTick(readAndResolve,e)}var m=Object.getPrototypeOf((function(){})),f=Object.setPrototypeOf((_defineProperty(n={get stream(){return this[p]},next:function next(){var e=this,t=this[i];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(createIterResult(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){a.nextTick((function(){e[i]?r(e[i]):t(createIterResult(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function wrapForNext(e,t){return function(r,n){e.then((function(){t[c]?r(createIterResult(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(createIterResult(o,!1));r=new Promise(this[d])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),_defineProperty(n,\"return\",(function _return(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(createIterResult(void 0,!0))}))}))})),n),m);e.exports=function createReadableStreamAsyncIterator(e){var t,r=Object.create(f,(_defineProperty(t={},p,{value:e,writable:!0}),_defineProperty(t,s,{value:null,writable:!0}),_defineProperty(t,l,{value:null,writable:!0}),_defineProperty(t,i,{value:null,writable:!0}),_defineProperty(t,c,{value:e._readableState.endEmitted,writable:!0}),_defineProperty(t,d,{value:function value(e,t){var n=r[p].read();n?(r[u]=null,r[s]=null,r[l]=null,e(createIterResult(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[u]=null,o(e,(function(e){if(e&&\"ERR_STREAM_PREMATURE_CLOSE\"!==e.code){var t=r[l];return null!==t&&(r[u]=null,r[s]=null,r[l]=null,t(e)),void(r[i]=e)}var n=r[s];null!==n&&(r[u]=null,r[s]=null,r[l]=null,n(createIterResult(void 0,!0))),r[c]=!0})),e.on(\"readable\",onReadable.bind(null,r)),r}},726:function(e,t,r){function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _toPropertyKey(e){var t=function _toPrimitive(e,t){if(\"object\"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}var n=r(287).Buffer,a=r(340).inspect,o=a&&a.custom||\"inspect\";e.exports=function(){function BufferList(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}(BufferList,[{key:\"push\",value:function push(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:\"unshift\",value:function unshift(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(e){if(0===this.length)return\"\";for(var t=this.head,r=\"\"+t.data;t=t.next;)r+=e+t.data;return r}},{key:\"concat\",value:function concat(e){if(0===this.length)return n.alloc(0);for(var t,r,a,o=n.allocUnsafe(e>>>0),s=this.head,l=0;s;)t=s.data,r=o,a=l,n.prototype.copy.call(t,r,a),l+=s.data.length,s=s.next;return o}},{key:\"consume\",value:function consume(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var a=t.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function _getBuffer(e){var t=n.allocUnsafe(e),r=this.head,a=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,s),0===(e-=s)){s===o.length?(++a,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++a}return this.length-=a,t}},{key:o,value:function value(e,t){return a(this,_objectSpread(_objectSpread({},t),{},{depth:0,customInspect:!1}))}}]),BufferList}()},896:function(e,t,r){var n=r(606);function emitErrorAndCloseNT(e,t){emitErrorNT(e,t),emitCloseNT(e)}function emitCloseNT(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(\"close\")}function emitErrorNT(e,t){e.emit(\"error\",t)}e.exports={destroy:function destroy(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(emitErrorNT,this,e)):n.nextTick(emitErrorNT,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(emitCloseNT,r):(r._writableState.errorEmitted=!0,n.nextTick(emitErrorAndCloseNT,r,e)):n.nextTick(emitErrorAndCloseNT,r,e):t?(n.nextTick(emitCloseNT,r),t(e)):n.nextTick(emitCloseNT,r)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit(\"error\",t)}}},238:function(e,t,r){var n=r(48).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}e.exports=function eos(e,t,r){if(\"function\"==typeof t)return eos(e,null,t);t||(t={}),r=function once(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];e.apply(this,n)}}}(r||noop);var a=t.readable||!1!==t.readable&&e.readable,o=t.writable||!1!==t.writable&&e.writable,s=function onlegacyfinish(){e.writable||i()},l=e._writableState&&e._writableState.finished,i=function onfinish(){o=!1,l=!0,a||r.call(e)},c=e._readableState&&e._readableState.endEmitted,u=function onend(){a=!1,c=!0,o||r.call(e)},d=function onerror(t){r.call(e,t)},p=function onclose(){var t;return a&&!c?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):o&&!l?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},m=function onrequest(){e.req.on(\"finish\",i)};return!function isRequest(e){return e.setHeader&&\"function\"==typeof e.abort}(e)?o&&!e._writableState&&(e.on(\"end\",s),e.on(\"close\",s)):(e.on(\"complete\",i),e.on(\"abort\",p),e.req?m():e.on(\"request\",m)),e.on(\"end\",u),e.on(\"finish\",i),!1!==t.error&&e.on(\"error\",d),e.on(\"close\",p),function(){e.removeListener(\"complete\",i),e.removeListener(\"abort\",p),e.removeListener(\"request\",m),e.req&&e.req.removeListener(\"finish\",i),e.removeListener(\"end\",s),e.removeListener(\"close\",s),e.removeListener(\"finish\",i),e.removeListener(\"end\",u),e.removeListener(\"error\",d),e.removeListener(\"close\",p)}}},157:function(e){e.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},758:function(e,t,r){var n;var a=r(48).F,o=a.ERR_MISSING_ARGS,s=a.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function call(e){e()}function pipe(e,t){return e.pipe(t)}e.exports=function pipeline(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var l,i=function popCallback(e){return e.length?\"function\"!=typeof e[e.length-1]?noop:e.pop():noop}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o(\"streams\");var c=t.map((function(e,a){var o=a<t.length-1;return function destroyer(e,t,a,o){o=function once(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var l=!1;e.on(\"close\",(function(){l=!0})),void 0===n&&(n=r(238)),n(e,{readable:t,writable:a},(function(e){if(e)return o(e);l=!0,o()}));var i=!1;return function(t){if(!l&&!i)return i=!0,function isRequest(e){return e.setHeader&&\"function\"==typeof e.abort}(e)?e.abort():\"function\"==typeof e.destroy?e.destroy():void o(t||new s(\"pipe\"))}}(e,o,a>0,(function(e){l||(l=e),e&&c.forEach(call),o||(c.forEach(call),i(l))}))}));return t.reduce(pipe)}},291:function(e,t,r){var n=r(48).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function getHighWaterMark(e,t,r,a){var o=function highWaterMarkFrom(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(a?r:\"highWaterMark\",o);return Math.floor(o)}return e.objectMode?16:16384}}},345:function(e,t,r){e.exports=r(7).EventEmitter},861:function(e,t,r){var n=r(287),a=n.Buffer;function copyProps(e,t){for(var r in e)t[r]=e[r]}function SafeBuffer(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(copyProps(n,t),t.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(a.prototype),copyProps(a,SafeBuffer),SafeBuffer.from=function(e,t,r){if(\"number\"==typeof e)throw new TypeError(\"Argument must not be a number\");return a(e,t,r)},SafeBuffer.alloc=function(e,t,r){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");var n=a(e);return void 0!==t?\"string\"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},SafeBuffer.allocUnsafe=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return a(e)},SafeBuffer.allocUnsafeSlow=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(e)}},392:function(e,t,r){var n=r(861).Buffer;function Hash(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Hash.prototype.update=function(e,t){\"string\"==typeof e&&(t=t||\"utf8\",e=n.from(e,t));for(var r=this._block,a=this._blockSize,o=e.length,s=this._len,l=0;l<o;){for(var i=s%a,c=Math.min(o-l,a-i),u=0;u<c;u++)r[i+u]=e[l+u];l+=c,(s+=c)%a==0&&this._update(r)}return this._len+=o,this},Hash.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,a=(r-n)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},e.exports=Hash},802:function(e,t,r){var n=e.exports=function SHA(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+\" is not supported (we accept pull requests)\");return new t};n.sha=r(816),n.sha1=r(737),n.sha224=r(710),n.sha256=r(107),n.sha384=r(827),n.sha512=r(890)},816:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function Sha(){this.init(),this._w=l,a.call(this,64,56)}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha,a),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,o=0|this._c,l=0|this._d,i=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var u=0;u<80;++u){var d=~~(u/20),p=0|((t=n)<<5|t>>>27)+ft(d,a,o,l)+i+r[u]+s[d];i=l,l=o,o=rotl30(a),a=n,n=p}this._a=n+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=l+this._d|0,this._e=i+this._e|0},Sha.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha},737:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function Sha1(){this.init(),this._w=l,a.call(this,64,56)}function rotl5(e){return e<<5|e>>>27}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha1,a),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,o=0|this._c,l=0|this._d,i=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=(t=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|t>>>31;for(var u=0;u<80;++u){var d=~~(u/20),p=rotl5(n)+ft(d,a,o,l)+i+r[u]+s[d]|0;i=l,l=o,o=rotl30(a),a=n,n=p}this._a=n+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=l+this._d|0,this._e=i+this._e|0},Sha1.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha1},710:function(e,t,r){var n=r(698),a=r(107),o=r(392),s=r(861).Buffer,l=new Array(64);function Sha224(){this.init(),this._w=l,o.call(this,64,56)}n(Sha224,a),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=Sha224},107:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);function Sha256(){this.init(),this._w=l,a.call(this,64,56)}function ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function sigma1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function gamma0(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(Sha256,a),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,o=0|this._c,l=0|this._d,i=0|this._e,c=0|this._f,u=0|this._g,d=0|this._h,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<64;++p)r[p]=0|(((t=r[p-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[p-7]+gamma0(r[p-15])+r[p-16];for(var m=0;m<64;++m){var f=d+sigma1(i)+ch(i,c,u)+s[m]+r[m]|0,h=sigma0(n)+maj(n,a,o)|0;d=u,u=c,c=i,i=l+f|0,l=o,o=a,a=n,n=f+h|0}this._a=n+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=l+this._d|0,this._e=i+this._e|0,this._f=c+this._f|0,this._g=u+this._g|0,this._h=d+this._h|0},Sha256.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=Sha256},827:function(e,t,r){var n=r(698),a=r(890),o=r(392),s=r(861).Buffer,l=new Array(160);function Sha384(){this.init(),this._w=l,o.call(this,128,112)}n(Sha384,a),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var e=s.allocUnsafe(48);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),e},e.exports=Sha384},890:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function Sha512(){this.init(),this._w=l,a.call(this,128,112)}function Ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function sigma1(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Gamma0(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Gamma0l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Gamma1(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gamma1l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function getCarry(e,t){return e>>>0<t>>>0?1:0}n(Sha512,a),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,a=0|this._ch,o=0|this._dh,l=0|this._eh,i=0|this._fh,c=0|this._gh,u=0|this._hh,d=0|this._al,p=0|this._bl,m=0|this._cl,f=0|this._dl,h=0|this._el,g=0|this._fl,y=0|this._gl,S=0|this._hl,_=0;_<32;_+=2)t[_]=e.readInt32BE(4*_),t[_+1]=e.readInt32BE(4*_+4);for(;_<160;_+=2){var v=t[_-30],b=t[_-30+1],w=Gamma0(v,b),C=Gamma0l(b,v),x=Gamma1(v=t[_-4],b=t[_-4+1]),k=Gamma1l(b,v),O=t[_-14],N=t[_-14+1],A=t[_-32],I=t[_-32+1],R=C+N|0,B=w+O+getCarry(R,C)|0;B=(B=B+x+getCarry(R=R+k|0,k)|0)+A+getCarry(R=R+I|0,I)|0,t[_]=B,t[_+1]=R}for(var T=0;T<160;T+=2){B=t[T],R=t[T+1];var j=maj(r,n,a),P=maj(d,p,m),M=sigma0(r,d),q=sigma0(d,r),L=sigma1(l,h),D=sigma1(h,l),U=s[T],$=s[T+1],J=Ch(l,i,c),V=Ch(h,g,y),K=S+D|0,z=u+L+getCarry(K,S)|0;z=(z=(z=z+J+getCarry(K=K+V|0,V)|0)+U+getCarry(K=K+$|0,$)|0)+B+getCarry(K=K+R|0,R)|0;var F=q+P|0,W=M+j+getCarry(F,q)|0;u=c,S=y,c=i,y=g,i=l,g=h,l=o+z+getCarry(h=f+K|0,f)|0,o=a,f=m,a=n,m=p,n=r,p=d,r=z+W+getCarry(d=K+F|0,K)|0}this._al=this._al+d|0,this._bl=this._bl+p|0,this._cl=this._cl+m|0,this._dl=this._dl+f|0,this._el=this._el+h|0,this._fl=this._fl+g|0,this._gl=this._gl+y|0,this._hl=this._hl+S|0,this._ah=this._ah+r+getCarry(this._al,d)|0,this._bh=this._bh+n+getCarry(this._bl,p)|0,this._ch=this._ch+a+getCarry(this._cl,m)|0,this._dh=this._dh+o+getCarry(this._dl,f)|0,this._eh=this._eh+l+getCarry(this._el,h)|0,this._fh=this._fh+i+getCarry(this._fl,g)|0,this._gh=this._gh+c+getCarry(this._gl,y)|0,this._hh=this._hh+u+getCarry(this._hl,S)|0},Sha512.prototype._hash=function(){var e=o.allocUnsafe(64);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),e},e.exports=Sha512},310:function(e,t,r){e.exports=Stream;var n=r(7).EventEmitter;function Stream(){n.call(this)}r(698)(Stream,n),Stream.Readable=r(412),Stream.Writable=r(708),Stream.Duplex=r(382),Stream.Transform=r(610),Stream.PassThrough=r(600),Stream.finished=r(238),Stream.pipeline=r(758),Stream.Stream=Stream,Stream.prototype.pipe=function(e,t){var r=this;function ondata(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function ondrain(){r.readable&&r.resume&&r.resume()}r.on(\"data\",ondata),e.on(\"drain\",ondrain),e._isStdio||t&&!1===t.end||(r.on(\"end\",onend),r.on(\"close\",onclose));var a=!1;function onend(){a||(a=!0,e.end())}function onclose(){a||(a=!0,\"function\"==typeof e.destroy&&e.destroy())}function onerror(e){if(cleanup(),0===n.listenerCount(this,\"error\"))throw e}function cleanup(){r.removeListener(\"data\",ondata),e.removeListener(\"drain\",ondrain),r.removeListener(\"end\",onend),r.removeListener(\"close\",onclose),r.removeListener(\"error\",onerror),e.removeListener(\"error\",onerror),r.removeListener(\"end\",cleanup),r.removeListener(\"close\",cleanup),e.removeListener(\"close\",cleanup)}return r.on(\"error\",onerror),e.on(\"error\",onerror),r.on(\"end\",cleanup),r.on(\"close\",cleanup),e.on(\"close\",cleanup),e.emit(\"pipe\",r),e}},141:function(e,t,r){var n=r(861).Buffer,a=n.isEncoding||function(e){switch((e=\"\"+e)&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(e){var t;switch(this.encoding=function normalizeEncoding(e){var t=function _normalizeEncoding(e){if(!e)return\"utf8\";for(var t;;)switch(e){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return e;default:if(t)return;e=(\"\"+e).toLowerCase(),t=!0}}(e);if(\"string\"!=typeof t&&(n.isEncoding===a||!a(e)))throw new Error(\"Unknown encoding: \"+e);return t||e}(e),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,t=4;break;case\"utf8\":this.fillLast=utf8FillLast,t=4;break;case\"base64\":this.text=base64Text,this.end=base64End,t=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function utf8CheckByte(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed,r=function utf8CheckExtraBytes(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,\"�\";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"�\";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"�\"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function utf16Text(e,t){if((e.length-t)%2==0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;return 0===r?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function base64End(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):\"\"}t.I=StringDecoder,StringDecoder.prototype.write=function(e){if(0===e.length)return\"\";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||\"\"},StringDecoder.prototype.end=function utf8End(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"�\":t},StringDecoder.prototype.text=function utf8Text(e,t){var r=function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n<r)return 0;var a=utf8CheckByte(t[n]);if(a>=0)return a>0&&(e.lastNeed=a-1),a;if(--n<r||-2===a)return 0;if(a=utf8CheckByte(t[n]),a>=0)return a>0&&(e.lastNeed=a-2),a;if(--n<r||-2===a)return 0;if(a=utf8CheckByte(t[n]),a>=0)return a>0&&(2===a?a=0:e.lastNeed=a-3),a;return 0}(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)},StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},643:function(e,t,r){function config(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&\"true\"===String(t).toLowerCase()}e.exports=function deprecate(e,t){if(config(\"noDeprecation\"))return e;var r=!1;return function deprecated(){if(!r){if(config(\"throwDeprecation\"))throw new Error(t);config(\"traceDeprecation\")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},499:function(e){var t={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};e.exports=function escapeForXML(e){return e&&e.replace?e.replace(/([&\"<>'])/g,(function(e,r){return t[r]})):e}},123:function(e,t,r){var n=r(606),a=r(499),o=r(310).Stream;function resolve(e,t,r){var n,o=function create_indent(e,t){return new Array(t||0).join(e||\"\")}(t,r=r||0),s=e;if(\"object\"==typeof e&&((s=e[n=Object.keys(e)[0]])&&s._elem))return s._elem.name=n,s._elem.icount=r,s._elem.indent=t,s._elem.indents=o,s._elem.interrupt=s,s._elem;var l,i=[],c=[];function get_attributes(e){Object.keys(e).forEach((function(t){i.push(function attribute(e,t){return e+'=\"'+a(t)+'\"'}(t,e[t]))}))}switch(typeof s){case\"object\":if(null===s)break;s._attr&&get_attributes(s._attr),s._cdata&&c.push((\"<![CDATA[\"+s._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),s.forEach&&(l=!1,c.push(\"\"),s.forEach((function(e){\"object\"==typeof e?\"_attr\"==Object.keys(e)[0]?get_attributes(e._attr):c.push(resolve(e,t,r+1)):(c.pop(),l=!0,c.push(a(e)))})),l||c.push(\"\"));break;default:c.push(a(s))}return{name:n,interrupt:!1,attributes:i,content:c,icount:r,indents:o,indent:t}}function format(e,t,r){if(\"object\"!=typeof t)return e(!1,t);var n=t.interrupt?1:t.content.length;function proceed(){for(;t.content.length;){var a=t.content.shift();if(void 0!==a){if(interrupt(a))return;format(e,a)}}e(!1,(n>1?t.indents:\"\")+(t.name?\"</\"+t.name+\">\":\"\")+(t.indent&&!r?\"\\n\":\"\")),r&&r()}function interrupt(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=proceed,t.interrupt=!1,e(!0),!0)}if(e(!1,t.indents+(t.name?\"<\"+t.name:\"\")+(t.attributes.length?\" \"+t.attributes.join(\" \"):\"\")+(n?t.name?\">\":\"\":t.name?\"/>\":\"\")+(t.indent&&n>1?\"\\n\":\"\")),!n)return e(!1,t.indent?\"\\n\":\"\");interrupt(t)||proceed()}e.exports=function xml(e,t){\"object\"!=typeof t&&(t={indent:t});var r=t.stream?new o:null,a=\"\",s=!1,l=t.indent?!0===t.indent?\"    \":t.indent:\"\",i=!0;function delay(e){i?n.nextTick(e):e()}function append(e,t){if(void 0!==t&&(a+=t),e&&!s&&(r=r||new o,s=!0),e&&s){var n=a;delay((function(){r.emit(\"data\",n)})),a=\"\"}}function add(e,t){format(append,resolve(e,l,l?1:0),t)}function end(){if(r){var e=a;delay((function(){r.emit(\"data\",e),r.emit(\"end\"),r.readable=!1,r.emit(\"close\")}))}}return delay((function(){i=!1})),t.declaration&&function addXmlDeclaration(e){var t={version:\"1.0\",encoding:e.encoding||\"UTF-8\"};e.standalone&&(t.standalone=e.standalone),add({\"?xml\":{_attr:t}}),a=a.replace(\"/>\",\"?>\")}(t.declaration),e&&e.forEach?e.forEach((function(t,r){var n;r+1===e.length&&(n=end),add(t,n)})):add(e,end),r?(r.readable=!0,r):a},e.exports.element=e.exports.Element=function element(){var e={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(e){if(!this.append)throw new Error(\"not assigned to a parent!\");var t=this,r=this._elem.indent;format(this.append,resolve(e,r,this._elem.icount+(r?1:0)),(function(){t.append(!0)}))},close:function(e){void 0!==e&&this.push(e),this.end&&this.end()}};return e}},987:function(t){t.exports=e},362:function(e){e.exports=t},340:function(){},838:function(){}},we={};function __webpack_require__(e){var t=we[e];if(void 0!==t)return t.exports;var r=we[e]={exports:{}};return be[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var Ce={};!function(){__webpack_require__.d(Ce,{A:function(){return Gs}});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{CLEAR:function(){return rt},CLEAR_BY:function(){return nt},NEW_AUTH_ERR:function(){return tt},NEW_SPEC_ERR:function(){return Ze},NEW_SPEC_ERR_BATCH:function(){return et},NEW_THROWN_ERR:function(){return Ye},NEW_THROWN_ERR_BATCH:function(){return Qe},clear:function(){return clear},clearBy:function(){return clearBy},newAuthErr:function(){return newAuthErr},newSpecErr:function(){return newSpecErr},newSpecErrBatch:function(){return newSpecErrBatch},newThrownErr:function(){return newThrownErr},newThrownErrBatch:function(){return newThrownErrBatch}});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{AUTHORIZE:function(){return Ct},AUTHORIZE_OAUTH2:function(){return Ot},CONFIGURE_AUTH:function(){return At},LOGOUT:function(){return xt},PRE_AUTHORIZE_OAUTH2:function(){return kt},RESTORE_AUTHORIZATION:function(){return It},SHOW_AUTH_POPUP:function(){return wt},VALIDATE:function(){return Nt},authPopup:function(){return authPopup},authorize:function(){return authorize},authorizeAccessCodeWithBasicAuthentication:function(){return authorizeAccessCodeWithBasicAuthentication},authorizeAccessCodeWithFormParams:function(){return authorizeAccessCodeWithFormParams},authorizeApplication:function(){return authorizeApplication},authorizeOauth2:function(){return authorizeOauth2},authorizeOauth2WithPersistOption:function(){return authorizeOauth2WithPersistOption},authorizePassword:function(){return authorizePassword},authorizeRequest:function(){return authorizeRequest},authorizeWithPersistOption:function(){return authorizeWithPersistOption},configureAuth:function(){return configureAuth},logout:function(){return logout},logoutWithPersistOption:function(){return logoutWithPersistOption},persistAuthorizationIfNeeded:function(){return persistAuthorizationIfNeeded},preAuthorizeImplicit:function(){return preAuthorizeImplicit},restoreAuthorization:function(){return restoreAuthorization},showDefinitions:function(){return showDefinitions}});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{authorized:function(){return Pt},definitionsForRequirements:function(){return definitionsForRequirements},definitionsToAuthorize:function(){return jt},getConfigs:function(){return Mt},getDefinitionsByNames:function(){return getDefinitionsByNames},isAuthorized:function(){return isAuthorized},shownDefinitions:function(){return Tt}});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{TOGGLE_CONFIGS:function(){return Vt},UPDATE_CONFIGS:function(){return Jt},loaded:function(){return actions_loaded},toggle:function(){return toggle},update:function(){return update}});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{downloadConfig:function(){return downloadConfig},getConfigByUrl:function(){return getConfigByUrl}});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{get:function(){return get}});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{transform:function(){return transform}});var ke={};__webpack_require__.r(ke),__webpack_require__.d(ke,{transform:function(){return parameter_oneof_transform}});var Oe={};__webpack_require__.r(Oe),__webpack_require__.d(Oe,{allErrors:function(){return tr},lastError:function(){return rr}});var Ne={};__webpack_require__.r(Ne),__webpack_require__.d(Ne,{SHOW:function(){return lr},UPDATE_FILTER:function(){return or},UPDATE_LAYOUT:function(){return ar},UPDATE_MODE:function(){return sr},changeMode:function(){return changeMode},show:function(){return actions_show},updateFilter:function(){return updateFilter},updateLayout:function(){return updateLayout}});var Ae={};__webpack_require__.r(Ae),__webpack_require__.d(Ae,{current:function(){return current},currentFilter:function(){return currentFilter},isShown:function(){return isShown},showSummary:function(){return cr},whatMode:function(){return whatMode}});var Ie={};__webpack_require__.r(Ie),__webpack_require__.d(Ie,{taggedOperations:function(){return taggedOperations}});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{requestSnippetGenerator_curl_bash:function(){return requestSnippetGenerator_curl_bash},requestSnippetGenerator_curl_cmd:function(){return requestSnippetGenerator_curl_cmd},requestSnippetGenerator_curl_powershell:function(){return requestSnippetGenerator_curl_powershell}});var Be={};__webpack_require__.r(Be),__webpack_require__.d(Be,{getActiveLanguage:function(){return pr},getDefaultExpanded:function(){return mr},getGenerators:function(){return dr},getSnippetGenerators:function(){return getSnippetGenerators}});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{allowTryItOutFor:function(){return allowTryItOutFor},basePath:function(){return yn},canExecuteScheme:function(){return canExecuteScheme},consumes:function(){return pn},consumesOptionsFor:function(){return consumesOptionsFor},contentTypeValues:function(){return contentTypeValues},currentProducesFor:function(){return currentProducesFor},definitions:function(){return gn},externalDocs:function(){return on},findDefinition:function(){return findDefinition},getOAS3RequiredRequestBodyContentType:function(){return getOAS3RequiredRequestBodyContentType},getParameter:function(){return getParameter},hasHost:function(){return kn},host:function(){return En},info:function(){return an},isMediaTypeSchemaPropertiesEqual:function(){return isMediaTypeSchemaPropertiesEqual},isOAS3:function(){return nn},lastError:function(){return Gr},mutatedRequestFor:function(){return mutatedRequestFor},mutatedRequests:function(){return xn},operationScheme:function(){return operationScheme},operationWithMeta:function(){return operationWithMeta},operations:function(){return dn},operationsWithRootInherited:function(){return _n},operationsWithTags:function(){return bn},parameterInclusionSettingFor:function(){return parameterInclusionSettingFor},parameterValues:function(){return parameterValues},parameterWithMeta:function(){return parameterWithMeta},parameterWithMetaByIdentity:function(){return parameterWithMetaByIdentity},parametersIncludeIn:function(){return parametersIncludeIn},parametersIncludeType:function(){return parametersIncludeType},paths:function(){return cn},produces:function(){return mn},producesOptionsFor:function(){return producesOptionsFor},requestFor:function(){return requestFor},requests:function(){return Cn},responseFor:function(){return responseFor},responses:function(){return wn},schemes:function(){return Sn},security:function(){return fn},securityDefinitions:function(){return hn},semver:function(){return ln},spec:function(){return spec},specJS:function(){return en},specJson:function(){return Zr},specJsonWithResolvedSubtrees:function(){return rn},specResolved:function(){return tn},specResolvedSubtree:function(){return specResolvedSubtree},specSource:function(){return Qr},specStr:function(){return Yr},tagDetails:function(){return tagDetails},taggedOperations:function(){return selectors_taggedOperations},tags:function(){return vn},url:function(){return Xr},validOperationMethods:function(){return un},validateBeforeExecute:function(){return validateBeforeExecute},validationErrors:function(){return validationErrors},version:function(){return sn}});var je={};__webpack_require__.r(je),__webpack_require__.d(je,{CLEAR_REQUEST:function(){return Jn},CLEAR_RESPONSE:function(){return $n},CLEAR_VALIDATE_PARAMS:function(){return Vn},LOG_REQUEST:function(){return Un},SET_MUTATED_REQUEST:function(){return Dn},SET_REQUEST:function(){return Ln},SET_RESPONSE:function(){return qn},SET_SCHEME:function(){return Wn},UPDATE_EMPTY_PARAM_INCLUSION:function(){return Pn},UPDATE_JSON:function(){return Tn},UPDATE_OPERATION_META_VALUE:function(){return Kn},UPDATE_PARAM:function(){return jn},UPDATE_RESOLVED:function(){return zn},UPDATE_RESOLVED_SUBTREE:function(){return Fn},UPDATE_SPEC:function(){return Rn},UPDATE_URL:function(){return Bn},VALIDATE_PARAMS:function(){return Mn},changeConsumesValue:function(){return changeConsumesValue},changeParam:function(){return changeParam},changeParamByIdentity:function(){return changeParamByIdentity},changeProducesValue:function(){return changeProducesValue},clearRequest:function(){return clearRequest},clearResponse:function(){return clearResponse},clearValidateParams:function(){return clearValidateParams},execute:function(){return actions_execute},executeRequest:function(){return executeRequest},invalidateResolvedSubtreeCache:function(){return invalidateResolvedSubtreeCache},logRequest:function(){return logRequest},parseToJson:function(){return parseToJson},requestResolvedSubtree:function(){return requestResolvedSubtree},resolveSpec:function(){return resolveSpec},setMutatedRequest:function(){return setMutatedRequest},setRequest:function(){return setRequest},setResponse:function(){return setResponse},setScheme:function(){return setScheme},updateEmptyParamInclusion:function(){return updateEmptyParamInclusion},updateJsonSpec:function(){return updateJsonSpec},updateResolved:function(){return updateResolved},updateResolvedSubtree:function(){return updateResolvedSubtree},updateSpec:function(){return updateSpec},updateUrl:function(){return updateUrl},validateParams:function(){return validateParams}});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{executeRequest:function(){return wrap_actions_executeRequest},updateJsonSpec:function(){return wrap_actions_updateJsonSpec},updateSpec:function(){return wrap_actions_updateSpec},validateParams:function(){return wrap_actions_validateParams}});var Me={};__webpack_require__.r(Me),__webpack_require__.d(Me,{Button:function(){return Button},Col:function(){return Col},Collapse:function(){return Collapse},Container:function(){return Container},Input:function(){return Input},Link:function(){return Link},Row:function(){return Row},Select:function(){return Select},TextArea:function(){return TextArea}});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{JsonSchemaArrayItemFile:function(){return JsonSchemaArrayItemFile},JsonSchemaArrayItemText:function(){return JsonSchemaArrayItemText},JsonSchemaForm:function(){return JsonSchemaForm},JsonSchema_array:function(){return JsonSchema_array},JsonSchema_boolean:function(){return JsonSchema_boolean},JsonSchema_object:function(){return JsonSchema_object},JsonSchema_string:function(){return JsonSchema_string}});var Le={};__webpack_require__.r(Le),__webpack_require__.d(Le,{basePath:function(){return $a},consumes:function(){return Ja},definitions:function(){return qa},findDefinition:function(){return Ma},hasHost:function(){return La},host:function(){return Ua},produces:function(){return Va},schemes:function(){return Ka},securityDefinitions:function(){return Da},validOperationMethods:function(){return wrap_selectors_validOperationMethods}});var De={};__webpack_require__.r(De),__webpack_require__.d(De,{definitionsToAuthorize:function(){return za}});var Ue={};__webpack_require__.r(Ue),__webpack_require__.d(Ue,{callbacksOperations:function(){return Ha},findSchema:function(){return findSchema},isOAS3:function(){return selectors_isOAS3},isOAS30:function(){return selectors_isOAS30},isSwagger2:function(){return selectors_isSwagger2},servers:function(){return Wa}});var $e={};__webpack_require__.r($e),__webpack_require__.d($e,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:function(){return ho},CLEAR_REQUEST_BODY_VALUE:function(){return go},SET_REQUEST_BODY_VALIDATE_ERROR:function(){return fo},UPDATE_ACTIVE_EXAMPLES_MEMBER:function(){return co},UPDATE_REQUEST_BODY_INCLUSION:function(){return io},UPDATE_REQUEST_BODY_VALUE:function(){return so},UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:function(){return lo},UPDATE_REQUEST_CONTENT_TYPE:function(){return uo},UPDATE_RESPONSE_CONTENT_TYPE:function(){return po},UPDATE_SELECTED_SERVER:function(){return oo},UPDATE_SERVER_VARIABLE_VALUE:function(){return mo},clearRequestBodyValidateError:function(){return clearRequestBodyValidateError},clearRequestBodyValue:function(){return clearRequestBodyValue},initRequestBodyValidateError:function(){return initRequestBodyValidateError},setActiveExamplesMember:function(){return setActiveExamplesMember},setRequestBodyInclusion:function(){return setRequestBodyInclusion},setRequestBodyValidateError:function(){return setRequestBodyValidateError},setRequestBodyValue:function(){return setRequestBodyValue},setRequestContentType:function(){return setRequestContentType},setResponseContentType:function(){return setResponseContentType},setRetainRequestBodyValueFlag:function(){return setRetainRequestBodyValueFlag},setSelectedServer:function(){return setSelectedServer},setServerVariableValue:function(){return setServerVariableValue}});var Je={};__webpack_require__.r(Je),__webpack_require__.d(Je,{activeExamplesMember:function(){return Co},hasUserEditedBody:function(){return vo},requestBodyErrors:function(){return wo},requestBodyInclusionSetting:function(){return bo},requestBodyValue:function(){return So},requestContentType:function(){return xo},responseContentType:function(){return ko},selectDefaultRequestBodyValue:function(){return selectDefaultRequestBodyValue},selectedServer:function(){return Eo},serverEffectiveValue:function(){return Ao},serverVariableValue:function(){return Oo},serverVariables:function(){return No},shouldRetainRequestBodyValue:function(){return _o},validOperationMethods:function(){return Ro},validateBeforeExecute:function(){return Io},validateShallowRequired:function(){return validateShallowRequired}});var Ve=__webpack_require__(919),Ke=__webpack_require__.n(Ve),ze=function(e){var t={};return __webpack_require__.d(t,e),t}({Component:function(){return r.Component},PureComponent:function(){return r.PureComponent},createContext:function(){return r.createContext},createElement:function(){return r.createElement},default:function(){return r.default},forwardRef:function(){return r.forwardRef},useCallback:function(){return r.useCallback},useContext:function(){return r.useContext},useEffect:function(){return r.useEffect},useMemo:function(){return r.useMemo},useRef:function(){return r.useRef},useState:function(){return r.useState}}),Fe=function(e){var t={};return __webpack_require__.d(t,e),t}({applyMiddleware:function(){return n.applyMiddleware},bindActionCreators:function(){return n.bindActionCreators},compose:function(){return n.compose},createStore:function(){return n.createStore}}),We=function(e){var t={};return __webpack_require__.d(t,e),t}({List:function(){return a.List},Map:function(){return a.Map},OrderedMap:function(){return a.OrderedMap},Seq:function(){return a.Seq},Set:function(){return a.Set},default:function(){return a.default},fromJS:function(){return a.fromJS}}),He=function(e){var t={};return __webpack_require__.d(t,e),t}({combineReducers:function(){return o.combineReducers}}),Ge=function(e){var t={};return __webpack_require__.d(t,e),t}({serializeError:function(){return s.serializeError}}),Xe=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return l.default}});const Ye=\"err_new_thrown_err\",Qe=\"err_new_thrown_err_batch\",Ze=\"err_new_spec_err\",et=\"err_new_spec_err_batch\",tt=\"err_new_auth_err\",rt=\"err_clear\",nt=\"err_clear_by\";function newThrownErr(e){return{type:Ye,payload:(0,Ge.serializeError)(e)}}function newThrownErrBatch(e){return{type:Qe,payload:e}}function newSpecErr(e){return{type:Ze,payload:e}}function newSpecErrBatch(e){return{type:et,payload:e}}function newAuthErr(e){return{type:tt,payload:e}}function clear(e={}){return{type:rt,payload:e}}function clearBy(e=(()=>!0)){return{type:nt,payload:e}}var at=function makeWindow(){var e={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return e;try{e=window;for(var t of[\"File\",\"Blob\",\"FormData\"])t in window&&(e[t]=window[t])}catch(e){console.error(e)}return e}(),ot=function(e){var t={};return __webpack_require__.d(t,e),t}({sanitizeUrl:function(){return i.sanitizeUrl}}),st=(function(e){var t={};__webpack_require__.d(t,e)}({}),function(e){var t={};__webpack_require__.d(t,e)}({}),function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return d.default}})),lt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return p.default}}),it=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return m.default}}),ct=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return f.default}}),ut=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return h.default}}),dt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return g.default}}),pt=__webpack_require__(209),mt=__webpack_require__.n(pt),ht=__webpack_require__(802),gt=__webpack_require__.n(ht);const yt=We.default.Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(e,{isOAS3:t}={}){if(!We.default.Map.isMap(e))return{schema:We.default.Map(),parameterContentMediaType:null};if(!t)return\"body\"===e.get(\"in\")?{schema:e.get(\"schema\",We.default.Map()),parameterContentMediaType:null}:{schema:e.filter(((e,t)=>yt.includes(t))),parameterContentMediaType:null};if(e.get(\"content\")){const t=e.get(\"content\",We.default.Map({})).keySeq().first();return{schema:e.getIn([\"content\",t,\"schema\"],We.default.Map()),parameterContentMediaType:t}}return{schema:e.get(\"schema\")?e.get(\"schema\",We.default.Map()):We.default.Map(),parameterContentMediaType:null}}var Et=__webpack_require__(287).Buffer;const St=\"default\",isImmutable=e=>We.default.Iterable.isIterable(e);function objectify(e){return isObject(e)?isImmutable(e)?e.toJS():e:{}}function fromJSOrdered(e){if(isImmutable(e))return e;if(e instanceof at.File)return e;if(!isObject(e))return e;if(Array.isArray(e))return We.default.Seq(e).map(fromJSOrdered).toList();if((0,ut.default)(e.entries)){const t=function createObjWithHashedKeys(e){if(!(0,ut.default)(e.entries))return e;const t={},r=\"_**[]\",n={};for(let a of e.entries())if(t[a[0]]||n[a[0]]&&n[a[0]].containsMultiple){if(!n[a[0]]){n[a[0]]={containsMultiple:!0,length:1},t[`${a[0]}${r}${n[a[0]].length}`]=t[a[0]],delete t[a[0]]}n[a[0]].length+=1,t[`${a[0]}${r}${n[a[0]].length}`]=a[1]}else t[a[0]]=a[1];return t}(e);return We.default.OrderedMap(t).map(fromJSOrdered)}return We.default.OrderedMap(e).map(fromJSOrdered)}function normalizeArray(e){return Array.isArray(e)?e:[e]}function isFn(e){return\"function\"==typeof e}function isObject(e){return!!e&&\"object\"==typeof e}function isFunc(e){return\"function\"==typeof e}function isArray(e){return Array.isArray(e)}const _t=st.default;function objMap(e,t){return Object.keys(e).reduce(((r,n)=>(r[n]=t(e[n],n),r)),{})}function objReduce(e,t){return Object.keys(e).reduce(((r,n)=>{let a=t(e[n],n);return a&&\"object\"==typeof a&&Object.assign(r,a),r}),{})}function systemThunkMiddleware(e){return({dispatch:t,getState:r})=>t=>r=>\"function\"==typeof r?r(e()):t(r)}function validateValueBySchema(e,t,r,n,a){if(!t)return[];let o=[],s=t.get(\"nullable\"),l=t.get(\"required\"),i=t.get(\"maximum\"),c=t.get(\"minimum\"),u=t.get(\"type\"),d=t.get(\"format\"),p=t.get(\"maxLength\"),m=t.get(\"minLength\"),f=t.get(\"uniqueItems\"),h=t.get(\"maxItems\"),g=t.get(\"minItems\"),y=t.get(\"pattern\");const S=r||!0===l,_=null!=e;if(s&&null===e||!u||!(S||_&&\"array\"===u||!(!S&&!_)))return[];let v=\"string\"===u&&e,b=\"array\"===u&&Array.isArray(e)&&e.length,w=\"array\"===u&&We.default.List.isList(e)&&e.count();const C=[v,b,w,\"array\"===u&&\"string\"==typeof e&&e,\"file\"===u&&e instanceof at.File,\"boolean\"===u&&(e||!1===e),\"number\"===u&&(e||0===e),\"integer\"===u&&(e||0===e),\"object\"===u&&\"object\"==typeof e&&null!==e,\"object\"===u&&\"string\"==typeof e&&e].some((e=>!!e));if(S&&!C&&!n)return o.push(\"Required field is not provided\"),o;if(\"object\"===u&&(null===a||\"application/json\"===a)){let r=e;if(\"string\"==typeof e)try{r=JSON.parse(e)}catch(e){return o.push(\"Parameter string value must be valid JSON\"),o}t&&t.has(\"required\")&&isFunc(l.isList)&&l.isList()&&l.forEach((e=>{void 0===r[e]&&o.push({propKey:e,error:\"Required property not found\"})})),t&&t.has(\"properties\")&&t.get(\"properties\").forEach(((e,t)=>{const s=validateValueBySchema(r[t],e,!1,n,a);o.push(...s.map((e=>({propKey:t,error:e}))))}))}if(y){let t=((e,t)=>{if(!new RegExp(t).test(e))return\"Value must follow pattern \"+t})(e,y);t&&o.push(t)}if(g&&\"array\"===u){let t=((e,t)=>{if(!e&&t>=1||e&&e.length<t)return`Array must contain at least ${t} item${1===t?\"\":\"s\"}`})(e,g);t&&o.push(t)}if(h&&\"array\"===u){let t=((e,t)=>{if(e&&e.length>t)return`Array must not contain more then ${t} item${1===t?\"\":\"s\"}`})(e,h);t&&o.push({needRemove:!0,error:t})}if(f&&\"array\"===u){let t=((e,t)=>{if(e&&(\"true\"===t||!0===t)){const t=(0,We.fromJS)(e),r=t.toSet();if(e.length>r.size){let e=(0,We.Set)();if(t.forEach(((r,n)=>{t.filter((e=>isFunc(e.equals)?e.equals(r):e===r)).size>1&&(e=e.add(n))})),0!==e.size)return e.map((e=>({index:e,error:\"No duplicates allowed.\"}))).toArray()}}})(e,f);t&&o.push(...t)}if(p||0===p){let t=((e,t)=>{if(e.length>t)return`Value must be no longer than ${t} character${1!==t?\"s\":\"\"}`})(e,p);t&&o.push(t)}if(m){let t=((e,t)=>{if(e.length<t)return`Value must be at least ${t} character${1!==t?\"s\":\"\"}`})(e,m);t&&o.push(t)}if(i||0===i){let t=((e,t)=>{if(e>t)return`Value must be less than ${t}`})(e,i);t&&o.push(t)}if(c||0===c){let t=((e,t)=>{if(e<t)return`Value must be greater than ${t}`})(e,c);t&&o.push(t)}if(\"string\"===u){let t;if(t=\"date-time\"===d?(e=>{if(isNaN(Date.parse(e)))return\"Value must be a DateTime\"})(e):\"uuid\"===d?(e=>{if(e=e.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e))return\"Value must be a Guid\"})(e):(e=>{if(e&&\"string\"!=typeof e)return\"Value must be a string\"})(e),!t)return o;o.push(t)}else if(\"boolean\"===u){let t=(e=>{if(\"true\"!==e&&\"false\"!==e&&!0!==e&&!1!==e)return\"Value must be a boolean\"})(e);if(!t)return o;o.push(t)}else if(\"number\"===u){let t=(e=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(e))return\"Value must be a number\"})(e);if(!t)return o;o.push(t)}else if(\"integer\"===u){let t=(e=>{if(!/^-?\\d+$/.test(e))return\"Value must be an integer\"})(e);if(!t)return o;o.push(t)}else if(\"array\"===u){if(!b&&!w)return o;e&&e.forEach(((e,r)=>{const s=validateValueBySchema(e,t.get(\"items\"),!1,n,a);o.push(...s.map((e=>({index:r,error:e}))))}))}else if(\"file\"===u){let t=(e=>{if(e&&!(e instanceof at.File))return\"Value must be a file\"})(e);if(!t)return o;o.push(t)}return o}const btoa=e=>{let t;return t=e instanceof Et?e:Et.from(e.toString(),\"utf-8\"),t.toString(\"base64\")},vt={operationsSorter:{alpha:(e,t)=>e.get(\"path\").localeCompare(t.get(\"path\")),method:(e,t)=>e.get(\"method\").localeCompare(t.get(\"method\"))},tagsSorter:{alpha:(e,t)=>e.localeCompare(t)}},buildFormData=e=>{let t=[];for(let r in e){let n=e[r];void 0!==n&&\"\"!==n&&t.push([r,\"=\",encodeURIComponent(n).replace(/%20/g,\"+\")].join(\"\"))}return t.join(\"&\")},shallowEqualKeys=(e,t,r)=>!!(0,lt.default)(r,(r=>(0,ct.default)(e[r],t[r])));function sanitizeUrl(e){return\"string\"!=typeof e||\"\"===e?\"\":(0,ot.sanitizeUrl)(e)}function requiresValidationURL(e){return!(!e||e.indexOf(\"localhost\")>=0||e.indexOf(\"127.0.0.1\")>=0||\"none\"===e)}const createDeepLinkPath=e=>\"string\"==typeof e||e instanceof String?e.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=e=>(0,dt.default)(createDeepLinkPath(e).replace(/%20/g,\"_\")),getExtensions=e=>e.filter(((e,t)=>/^x-/.test(t))),getCommonExtensions=e=>e.filter(((e,t)=>/^pattern|maxLength|minLength|maximum|minimum/.test(t)));function deeplyStripKey(e,t,r=(()=>!0)){if(\"object\"!=typeof e||Array.isArray(e)||null===e||!t)return e;const n=Object.assign({},e);return Object.keys(n).forEach((e=>{e===t&&r(n[e],e)?delete n[e]:n[e]=deeplyStripKey(n[e],t,r)})),n}function stringify(e){if(\"string\"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),\"object\"==typeof e&&null!==e)try{return JSON.stringify(e,null,2)}catch(t){return String(e)}return null==e?\"\":e.toString()}function paramToIdentifier(e,{returnAll:t=!1,allowHashes:r=!0}={}){if(!We.default.Map.isMap(e))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const n=e.get(\"name\"),a=e.get(\"in\");let o=[];return e&&e.hashCode&&a&&n&&r&&o.push(`${a}.${n}.hash-${e.hashCode()}`),a&&n&&o.push(`${a}.${n}`),o.push(n),t?o:o[0]||\"\"}function paramToValue(e,t){return paramToIdentifier(e,{returnAll:!0}).map((e=>t[e])).filter((e=>void 0!==e))[0]}function b64toB64UrlEncoded(e){return e.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=e=>!e||!(!isImmutable(e)||!e.isEmpty()),idFn=e=>e;class Store{constructor(e={}){Ke()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},e),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(e,t,r){return function createStoreWithMiddleware(e,t,r){let n=[systemThunkMiddleware(r)];const a=at.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Fe.compose;return(0,Fe.createStore)(e,t,a((0,Fe.applyMiddleware)(...n)))}(e,t,r)}(idFn,(0,We.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(e,t=!0){var r=combinePlugins(e,this.getSystem(),this.pluginsOptions);systemExtend(this.system,r),t&&this.buildSystem();callAfterLoad.call(this.system,e,this.getSystem())&&this.buildSystem()}buildSystem(e=!0){let t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getWrappedAndBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:We.default,React:ze.default},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(e){this.system.configs=e}rebuildReducer(){this.store.replaceReducer(function buildReducer(e){return function allReducers(e){let t=Object.keys(e).reduce(((t,r)=>(t[r]=function makeReducer(e){return(t=new We.Map,r)=>{if(!e)return t;let n=e[r.type];if(n){const e=wrapWithTryCatch(n)(t,r);return null===e?t:e}return t}}(e[r]),t)),{});if(!Object.keys(t).length)return idFn;return(0,He.combineReducers)(t)}(objMap(e,(e=>e.reducers)))}(this.system.statePlugins))}getType(e){let t=e[0].toUpperCase()+e.slice(1);return objReduce(this.system.statePlugins,((r,n)=>{let a=r[e];if(a)return{[n+t]:a}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(e=>objReduce(e,((e,t)=>{if(isFn(e))return{[t]:e}}))))}getWrappedAndBoundActions(e){return objMap(this.getBoundActions(e),((e,t)=>{let r=this.system.statePlugins[t.slice(0,-7)].wrapActions;return r?objMap(e,((e,t)=>{let n=r[t];return n?(Array.isArray(n)||(n=[n]),n.reduce(((e,t)=>{let newAction=(...r)=>t(e,this.getSystem())(...r);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction)}),e||Function.prototype)):e})):e}))}getWrappedAndBoundSelectors(e,t){return objMap(this.getBoundSelectors(e,t),((t,r)=>{let n=[r.slice(0,-9)],a=this.system.statePlugins[n].wrapSelectors;return a?objMap(t,((t,r)=>{let o=a[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(((t,r)=>{let wrappedSelector=(...a)=>r(t,this.getSystem())(e().getIn(n),...a);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),t||Function.prototype)):t})):t}))}getStates(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=e.get(r),t)),{})}getStateThunks(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=()=>e().get(r),t)),{})}getFn(){return{fn:this.system.fn}}getComponents(e){const t=this.system.components[e];return Array.isArray(t)?t.reduce(((e,t)=>t(e,this.getSystem()))):void 0!==e?this.system.components[e]:this.system.components}getBoundSelectors(e,t){return objMap(this.getSelectors(),((r,n)=>{let a=[n.slice(0,-9)];return objMap(r,(r=>(...n)=>{let o=wrapWithTryCatch(r).apply(null,[e().getIn(a),...n]);return\"function\"==typeof o&&(o=wrapWithTryCatch(o)(t())),o}))}))}getBoundActions(e){e=e||this.getStore().dispatch;const t=this.getActions(),process=e=>\"function\"!=typeof e?objMap(e,(e=>process(e))):(...t)=>{var r=null;try{r=e(...t)}catch(e){r={type:Ye,error:!0,payload:(0,Ge.serializeError)(e)}}finally{return r}};return objMap(t,(t=>(0,Fe.bindActionCreators)(process(t),e)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(e){return t=>Ke()({},this.getWrappedAndBoundActions(t),this.getFn(),e)}}function combinePlugins(e,t,r){if(isObject(e)&&!isArray(e))return(0,Xe.default)({},e);if(isFunc(e))return combinePlugins(e(t),t,r);if(isArray(e)){const n=\"chain\"===r.pluginLoadType?t.getComponents():{};return e.map((e=>combinePlugins(e,t,r))).reduce(systemExtend,n)}return{}}function callAfterLoad(e,t,{hasLoaded:r}={}){let n=r;return isObject(e)&&!isArray(e)&&\"function\"==typeof e.afterLoad&&(n=!0,wrapWithTryCatch(e.afterLoad).call(this,t)),isFunc(e)?callAfterLoad.call(this,e(t),t,{hasLoaded:n}):isArray(e)?e.map((e=>callAfterLoad.call(this,e,t,{hasLoaded:n}))):n}function systemExtend(e={},t={}){if(!isObject(e))return{};if(!isObject(t))return e;t.wrapComponents&&(objMap(t.wrapComponents,((r,n)=>{const a=e.components&&e.components[n];a&&Array.isArray(a)?(e.components[n]=a.concat([r]),delete t.wrapComponents[n]):a&&(e.components[n]=[a,r],delete t.wrapComponents[n])})),Object.keys(t.wrapComponents).length||delete t.wrapComponents);const{statePlugins:r}=e;if(isObject(r))for(let e in r){const n=r[e];if(!isObject(n))continue;const{wrapActions:a,wrapSelectors:o}=n;if(isObject(a))for(let r in a){let n=a[r];Array.isArray(n)||(n=[n],a[r]=n),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapActions&&t.statePlugins[e].wrapActions[r]&&(t.statePlugins[e].wrapActions[r]=a[r].concat(t.statePlugins[e].wrapActions[r]))}if(isObject(o))for(let r in o){let n=o[r];Array.isArray(n)||(n=[n],o[r]=n),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapSelectors&&t.statePlugins[e].wrapSelectors[r]&&(t.statePlugins[e].wrapSelectors[r]=o[r].concat(t.statePlugins[e].wrapSelectors[r]))}}return Ke()(e,t)}function wrapWithTryCatch(e,{logErrors:t=!0}={}){return\"function\"!=typeof e?e:function(...r){try{return e.call(this,...r)}catch(e){return t&&console.error(e),null}}}var bt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return y.default}});const wt=\"show_popup\",Ct=\"authorize\",xt=\"logout\",kt=\"pre_authorize_oauth2\",Ot=\"authorize_oauth2\",Nt=\"validate\",At=\"configure_auth\",It=\"restore_authorization\";function showDefinitions(e){return{type:wt,payload:e}}function authorize(e){return{type:Ct,payload:e}}const authorizeWithPersistOption=e=>({authActions:t})=>{t.authorize(e),t.persistAuthorizationIfNeeded()};function logout(e){return{type:xt,payload:e}}const logoutWithPersistOption=e=>({authActions:t})=>{t.logout(e),t.persistAuthorizationIfNeeded()},preAuthorizeImplicit=e=>({authActions:t,errActions:r})=>{let{auth:n,token:a,isValid:o}=e,{schema:s,name:l}=n,i=s.get(\"flow\");delete at.swaggerUIRedirectOauth2,\"accessCode\"===i||o||r.newAuthErr({authId:l,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),a.error?r.newAuthErr({authId:l,source:\"auth\",level:\"error\",message:JSON.stringify(a)}):t.authorizeOauth2WithPersistOption({auth:n,token:a})};function authorizeOauth2(e){return{type:Ot,payload:e}}const authorizeOauth2WithPersistOption=e=>({authActions:t})=>{t.authorizeOauth2(e),t.persistAuthorizationIfNeeded()},authorizePassword=e=>({authActions:t})=>{let{schema:r,name:n,username:a,password:o,passwordType:s,clientId:l,clientSecret:i}=e,c={grant_type:\"password\",scope:e.scopes.join(\" \"),username:a,password:o},u={};switch(s){case\"request-body\":!function setClientIdAndSecret(e,t,r){t&&Object.assign(e,{client_id:t});r&&Object.assign(e,{client_secret:r})}(c,l,i);break;case\"basic\":u.Authorization=\"Basic \"+btoa(l+\":\"+i);break;default:console.warn(`Warning: invalid passwordType ${s} was passed, not including client id and secret`)}return t.authorizeRequest({body:buildFormData(c),url:r.get(\"tokenUrl\"),name:n,headers:u,query:{},auth:e})};const authorizeApplication=e=>({authActions:t})=>{let{schema:r,scopes:n,name:a,clientId:o,clientSecret:s}=e,l={Authorization:\"Basic \"+btoa(o+\":\"+s)},i={grant_type:\"client_credentials\",scope:n.join(\" \")};return t.authorizeRequest({body:buildFormData(i),name:a,url:r.get(\"tokenUrl\"),auth:e,headers:l})},authorizeAccessCodeWithFormParams=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:n,name:a,clientId:o,clientSecret:s,codeVerifier:l}=e,i={grant_type:\"authorization_code\",code:e.code,client_id:o,client_secret:s,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(i),name:a,url:n.get(\"tokenUrl\"),auth:e})},authorizeAccessCodeWithBasicAuthentication=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:n,name:a,clientId:o,clientSecret:s,codeVerifier:l}=e,i={Authorization:\"Basic \"+btoa(o+\":\"+s)},c={grant_type:\"authorization_code\",code:e.code,client_id:o,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(c),name:a,url:n.get(\"tokenUrl\"),auth:e,headers:i})},authorizeRequest=e=>({fn:t,getConfigs:r,authActions:n,errActions:a,oas3Selectors:o,specSelectors:s,authSelectors:l})=>{let i,{body:c,query:u={},headers:d={},name:p,url:m,auth:f}=e,{additionalQueryStringParams:h}=l.getConfigs()||{};if(s.isOAS3()){let e=o.serverEffectiveValue(o.selectedServer());i=(0,bt.default)(m,e,!0)}else i=(0,bt.default)(m,s.url(),!0);\"object\"==typeof h&&(i.query=Object.assign({},i.query,h));const g=i.toString();let y=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},d);t.fetch({url:g,method:\"post\",headers:y,query:u,body:c,requestInterceptor:r().requestInterceptor,responseInterceptor:r().responseInterceptor}).then((function(e){let t=JSON.parse(e.data),r=t&&(t.error||\"\"),o=t&&(t.parseError||\"\");e.ok?r||o?a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:JSON.stringify(t)}):n.authorizeOauth2WithPersistOption({auth:f,token:t}):a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:e.statusText})})).catch((e=>{let t=new Error(e).message;if(e.response&&e.response.data){const r=e.response.data;try{const e=\"string\"==typeof r?JSON.parse(r):r;e.error&&(t+=`, error: ${e.error}`),e.error_description&&(t+=`, description: ${e.error_description}`)}catch(e){}}a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:t})}))};function configureAuth(e){return{type:At,payload:e}}function restoreAuthorization(e){return{type:It,payload:e}}const persistAuthorizationIfNeeded=()=>({authSelectors:e,getConfigs:t})=>{if(!t().persistAuthorization)return;const r=e.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(r))},authPopup=(e,t)=>()=>{at.swaggerUIRedirectOauth2=t,at.open(e)};var Rt={[wt]:(e,{payload:t})=>e.set(\"showDefinitions\",t),[Ct]:(e,{payload:t})=>{let r=(0,We.fromJS)(t),n=e.get(\"authorized\")||(0,We.Map)();return r.entrySeq().forEach((([t,r])=>{if(!isFunc(r.getIn))return e.set(\"authorized\",n);let a=r.getIn([\"schema\",\"type\"]);if(\"apiKey\"===a||\"http\"===a)n=n.set(t,r);else if(\"basic\"===a){let e=r.getIn([\"value\",\"username\"]),a=r.getIn([\"value\",\"password\"]);n=n.setIn([t,\"value\"],{username:e,header:\"Basic \"+btoa(e+\":\"+a)}),n=n.setIn([t,\"schema\"],r.get(\"schema\"))}})),e.set(\"authorized\",n)},[Ot]:(e,{payload:t})=>{let r,{auth:n,token:a}=t;n.token=Object.assign({},a),r=(0,We.fromJS)(n);let o=e.get(\"authorized\")||(0,We.Map)();return o=o.set(r.get(\"name\"),r),e.set(\"authorized\",o)},[xt]:(e,{payload:t})=>{let r=e.get(\"authorized\").withMutations((e=>{t.forEach((t=>{e.delete(t)}))}));return e.set(\"authorized\",r)},[At]:(e,{payload:t})=>e.set(\"configs\",t),[It]:(e,{payload:t})=>e.set(\"authorized\",(0,We.fromJS)(t.authorized))},Bt=function(e){var t={};return __webpack_require__.d(t,e),t}({createSelector:function(){return S.createSelector}});const state=e=>e,Tt=(0,Bt.createSelector)(state,(e=>e.get(\"showDefinitions\"))),jt=(0,Bt.createSelector)(state,(()=>({specSelectors:e})=>{let t=e.securityDefinitions()||(0,We.Map)({}),r=(0,We.List)();return t.entrySeq().forEach((([e,t])=>{let n=(0,We.Map)();n=n.set(e,t),r=r.push(n)})),r})),getDefinitionsByNames=(e,t)=>({specSelectors:e})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let r=e.securityDefinitions(),n=(0,We.List)();return t.valueSeq().forEach((e=>{let t=(0,We.Map)();e.entrySeq().forEach((([e,n])=>{let a,o=r.get(e);\"oauth2\"===o.get(\"type\")&&n.size&&(a=o.get(\"scopes\"),a.keySeq().forEach((e=>{n.contains(e)||(a=a.delete(e))})),o=o.set(\"allowedScopes\",a)),t=t.set(e,o)})),n=n.push(t)})),n},definitionsForRequirements=(e,t=(0,We.List)())=>({authSelectors:e})=>{const r=e.definitionsToAuthorize()||(0,We.List)();let n=(0,We.List)();return r.forEach((e=>{let r=t.find((t=>t.get(e.keySeq().first())));r&&(e.forEach(((t,n)=>{if(\"oauth2\"===t.get(\"type\")){const a=r.get(n);let o=t.get(\"scopes\");We.List.isList(a)&&We.Map.isMap(o)&&(o.keySeq().forEach((e=>{a.contains(e)||(o=o.delete(e))})),e=e.set(n,t.set(\"scopes\",o)))}})),n=n.push(e))})),n},Pt=(0,Bt.createSelector)(state,(e=>e.get(\"authorized\")||(0,We.Map)())),isAuthorized=(e,t)=>({authSelectors:e})=>{let r=e.authorized();return We.List.isList(t)?!!t.toJS().filter((e=>-1===Object.keys(e).map((e=>!!r.get(e))).indexOf(!1))).length:null},Mt=(0,Bt.createSelector)(state,(e=>e.get(\"configs\"))),execute=(e,{authSelectors:t,specSelectors:r})=>({path:n,method:a,operation:o,extras:s})=>{let l={authorized:t.authorized()&&t.authorized().toJS(),definitions:r.securityDefinitions()&&r.securityDefinitions().toJS(),specSecurity:r.security()&&r.security().toJS()};return e({path:n,method:a,operation:o,securities:l,...s})},loaded=(e,t)=>r=>{const{getConfigs:n,authActions:a}=t,o=n();if(e(r),o.persistAuthorization){const e=localStorage.getItem(\"authorized\");e&&a.restoreAuthorization({authorized:JSON.parse(e)})}},wrap_actions_authorize=(e,t)=>r=>{e(r);if(t.getConfigs().persistAuthorization)try{const[{schema:e,value:t}]=Object.values(r),n=\"apiKey\"===e.get(\"type\"),a=\"cookie\"===e.get(\"in\");n&&a&&(document.cookie=`${e.get(\"name\")}=${t}; SameSite=None; Secure`)}catch(e){console.error(\"Error persisting cookie based apiKey in document.cookie.\",e)}},wrap_actions_logout=(e,t)=>r=>{const n=t.getConfigs(),a=t.authSelectors.authorized();try{n.persistAuthorization&&Array.isArray(r)&&r.forEach((e=>{const t=a.get(e,{}),r=\"apiKey\"===t.getIn([\"schema\",\"type\"]),n=\"cookie\"===t.getIn([\"schema\",\"in\"]);if(r&&n){const e=t.getIn([\"schema\",\"name\"]);document.cookie=`${e}=; Max-Age=-99999999`}}))}catch(e){console.error(\"Error deleting cookie based apiKey from document.cookie.\",e)}e(r)};var qt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return _.default}}),Lt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return v.default}});class LockAuthIcon extends ze.default.Component{mapStateToProps(e,t){return{state:e,ownProps:(0,Lt.default)(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"LockIcon\");return ze.default.createElement(r,t)}}var Dt=LockAuthIcon;class UnlockAuthIcon extends ze.default.Component{mapStateToProps(e,t){return{state:e,ownProps:(0,Lt.default)(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"UnlockIcon\");return ze.default.createElement(r,t)}}var Ut=UnlockAuthIcon;function auth(){return{afterLoad(e){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=e.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,e),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,e)},components:{LockAuthIcon:Dt,UnlockAuthIcon:Ut,LockAuthOperationIcon:Dt,UnlockAuthOperationIcon:Ut},statePlugins:{auth:{reducers:Rt,actions:t,selectors:c,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(e,t,r,n){const{authActions:{authorize:a},specSelectors:{specJson:o,isOAS3:s}}=e,l=s()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],i=o().getIn([...l,t]);return i?a({[t]:{value:{username:r,password:n},schema:i.toJS()}}):null}function preauthorizeApiKey(e,t,r){const{authActions:{authorize:n},specSelectors:{specJson:a,isOAS3:o}}=e,s=o()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],l=a().getIn([...s,t]);return l?n({[t]:{value:r,schema:l.toJS()}}):null}var $t=function(e){var t={};return __webpack_require__.d(t,e),t}({JSON_SCHEMA:function(){return b.JSON_SCHEMA},default:function(){return b.default}});const parseYamlConfig=(e,t)=>{try{return $t.default.load(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}},Jt=\"configs_update\",Vt=\"configs_toggle\";function update(e,t){return{type:Jt,payload:{[e]:t}}}function toggle(e){return{type:Vt,payload:e}}const actions_loaded=()=>()=>{},downloadConfig=e=>t=>{const{fn:{fetch:r}}=t;return r(e)},getConfigByUrl=(e,t)=>({specActions:r})=>{if(e)return r.downloadConfig(e).then(next,next);function next(n){n instanceof Error||n.status>=400?(r.updateLoadingStatus(\"failedConfig\"),r.updateLoadingStatus(\"failedConfig\"),r.updateUrl(\"\"),console.error(n.statusText+\" \"+e.url),t(null)):t(parseYamlConfig(n.text))}},get=(e,t)=>e.getIn(Array.isArray(t)?t:[t]);var Kt={[Jt]:(e,t)=>e.merge((0,We.fromJS)(t.payload)),[Vt]:(e,t)=>{const r=t.payload,n=e.get(r);return e.set(r,!n)}};const zt={getLocalConfig:()=>parseYamlConfig('---\\nurl: \"https://petstore.swagger.io/v2/swagger.json\"\\ndom_id: \"#swagger-ui\"\\nvalidatorUrl: \"https://validator.swagger.io/validator\"\\n')};function configsPlugin(){return{statePlugins:{spec:{actions:be,selectors:zt},configs:{reducers:Kt,actions:u,selectors:we}}}}const setHash=e=>e?history.pushState(null,null,`#${e}`):window.location.hash=\"\";var Ft=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return w.default}});const Wt=\"layout_scroll_to\",Ht=\"layout_clear_scroll\";var Gt={fn:{getScrollParent:function getScrollParent(e,t){const r=document.documentElement;let n=getComputedStyle(e);const a=\"absolute\"===n.position,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===n.position)return r;for(let t=e;t=t.parentElement;)if(n=getComputedStyle(t),(!a||\"static\"!==n.position)&&o.test(n.overflow+n.overflowY+n.overflowX))return t;return r}},statePlugins:{layout:{actions:{scrollToElement:(e,t)=>r=>{try{t=t||r.fn.getScrollParent(e),Ft.default.createScroller(t).to(e)}catch(e){console.error(e)}},scrollTo:e=>({type:Wt,payload:Array.isArray(e)?e:[e]}),clearScrollTo:()=>({type:Ht}),readyToScroll:(e,t)=>r=>{const n=r.layoutSelectors.getScrollToKey();We.default.is(n,(0,We.fromJS)(e))&&(r.layoutActions.scrollToElement(t),r.layoutActions.clearScrollTo())},parseDeepLinkHash:e=>({layoutActions:t,layoutSelectors:r,getConfigs:n})=>{if(n().deepLinking&&e){let n=e.slice(1);\"!\"===n[0]&&(n=n.slice(1)),\"/\"===n[0]&&(n=n.slice(1));const a=n.split(\"/\").map((e=>e||\"\")),o=r.isShownKeyFromUrlHashArray(a),[s,l=\"\",i=\"\"]=o;if(\"operations\"===s){const e=r.isShownKeyFromUrlHashArray([l]);l.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(e.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(e,!0)}(l.indexOf(\"_\")>-1||i.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(o.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(o,!0),t.scrollTo(o)}}},selectors:{getScrollToKey:e=>e.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(e,t){const[r,n]=t;return n?[\"operations\",r,n]:r?[\"operations-tag\",r]:[]},urlHashArrayFromIsShownKey(e,t){let[r,n,a]=t;return\"operations\"==r?[n,a]:\"operations-tag\"==r?[n]:[]}},reducers:{[Wt]:(e,t)=>e.set(\"scrollToKey\",We.default.fromJS(t.payload)),[Ht]:e=>e.delete(\"scrollToKey\")},wrapActions:{show:(e,{getConfigs:t,layoutSelectors:r})=>(...n)=>{if(e(...n),t().deepLinking)try{let[e,t]=n;e=Array.isArray(e)?e:[e];const a=r.urlHashArrayFromIsShownKey(e);if(!a.length)return;const[o,s]=a;if(!t)return setHash(\"/\");2===a.length?setHash(createDeepLinkPath(`/${encodeURIComponent(o)}/${encodeURIComponent(s)}`)):1===a.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(o)}`))}catch(e){console.error(e)}}}}}},Xt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return C.default}});var operation_wrapper=(e,t)=>class OperationWrapper extends ze.default.Component{onLoad=e=>{const{operation:r}=this.props,{tag:n,operationId:a}=r.toObject();let{isShownKey:o}=r.toObject();o=o||[\"operations\",n,a],t.layoutActions.readyToScroll(o,e)};render(){return ze.default.createElement(\"span\",{ref:this.onLoad},ze.default.createElement(e,this.props))}};var operation_tag_wrapper=(e,t)=>class OperationTagWrapper extends ze.default.Component{onLoad=e=>{const{tag:r}=this.props,n=[\"operations-tag\",r];t.layoutActions.readyToScroll(n,e)};render(){return ze.default.createElement(\"span\",{ref:this.onLoad},ze.default.createElement(e,this.props))}};function deep_linking(){return[Gt,{statePlugins:{configs:{wrapActions:{loaded:(e,t)=>(...r)=>{e(...r);const n=decodeURIComponent(window.location.hash);t.layoutActions.parseDeepLinkHash(n)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var Yt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return x.default}});function transform(e){return e.map((e=>{let t=\"is not of a type(s)\",r=e.get(\"message\").indexOf(t);if(r>-1){let t=e.get(\"message\").slice(r+19).split(\",\");return e.set(\"message\",e.get(\"message\").slice(0,r)+function makeNewMessage(e){return e.reduce(((e,t,r,n)=>r===n.length-1&&n.length>1?e+\"or \"+t:n[r+1]&&n.length>2?e+t+\", \":n[r+1]?e+t+\" \":e+t),\"should be a\")}(t))}return e}))}var Qt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return k.default}});function parameter_oneof_transform(e,{jsSpec:t}){return e}const Zt=[xe,ke];function transformErrors(e){let t={jsSpec:{}},r=(0,Yt.default)(Zt,((e,r)=>{try{return r.transform(e,t).filter((e=>!!e))}catch(t){return console.error(\"Transformer error:\",t),e}}),e);return r.filter((e=>!!e)).map((e=>(!e.get(\"line\")&&e.get(\"path\"),e)))}let er={line:0,level:\"error\",message:\"Unknown error\"};const tr=(0,Bt.createSelector)((e=>e),(e=>e.get(\"errors\",(0,We.List)()))),rr=(0,Bt.createSelector)(tr,(e=>e.last()));function err(t){return{statePlugins:{err:{reducers:{[Ye]:(e,{payload:t})=>{let r=Object.assign(er,t,{type:\"thrown\"});return e.update(\"errors\",(e=>(e||(0,We.List)()).push((0,We.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[Qe]:(e,{payload:t})=>(t=t.map((e=>(0,We.fromJS)(Object.assign(er,e,{type:\"thrown\"})))),e.update(\"errors\",(e=>(e||(0,We.List)()).concat((0,We.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[Ze]:(e,{payload:t})=>{let r=(0,We.fromJS)(t);return r=r.set(\"type\",\"spec\"),e.update(\"errors\",(e=>(e||(0,We.List)()).push((0,We.fromJS)(r)).sortBy((e=>e.get(\"line\"))))).update(\"errors\",(e=>transformErrors(e)))},[et]:(e,{payload:t})=>(t=t.map((e=>(0,We.fromJS)(Object.assign(er,e,{type:\"spec\"})))),e.update(\"errors\",(e=>(e||(0,We.List)()).concat((0,We.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[tt]:(e,{payload:t})=>{let r=(0,We.fromJS)(Object.assign({},t));return r=r.set(\"type\",\"auth\"),e.update(\"errors\",(e=>(e||(0,We.List)()).push((0,We.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[rt]:(e,{payload:t})=>{if(!t||!e.get(\"errors\"))return e;let r=e.get(\"errors\").filter((e=>e.keySeq().every((r=>{const n=e.get(r),a=t[r];return!a||n!==a}))));return e.merge({errors:r})},[nt]:(e,{payload:t})=>{if(!t||\"function\"!=typeof t)return e;let r=e.get(\"errors\").filter((e=>t(e)));return e.merge({errors:r})}},actions:e,selectors:Oe}}}}function opsFilter(e,t){return e.filter(((e,r)=>-1!==r.indexOf(t)))}function filter(){return{fn:{opsFilter}}}var nr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return O.default}});var arrow_up=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"}));var arrow_down=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"}));var arrow=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"}));var components_close=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"}));var copy=({className:e=null,width:t=15,height:r=16,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"g\",{transform:\"translate(2, -1)\"},ze.default.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})));var lock=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"}));var unlock=({className:e=null,width:t=20,height:r=20,...n})=>ze.default.createElement(\"svg\",(0,nr.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),ze.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"}));var icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}});const ar=\"layout_update_layout\",or=\"layout_update_filter\",sr=\"layout_update_mode\",lr=\"layout_show\";function updateLayout(e){return{type:ar,payload:e}}function updateFilter(e){return{type:or,payload:e}}function actions_show(e,t=!0){return e=normalizeArray(e),{type:lr,payload:{thing:e,shown:t}}}function changeMode(e,t=\"\"){return e=normalizeArray(e),{type:sr,payload:{thing:e,mode:t}}}var ir={[ar]:(e,t)=>e.set(\"layout\",t.payload),[or]:(e,t)=>e.set(\"filter\",t.payload),[lr]:(e,t)=>{const r=t.payload.shown,n=(0,We.fromJS)(t.payload.thing);return e.update(\"shown\",(0,We.fromJS)({}),(e=>e.set(n,r)))},[sr]:(e,t)=>{let r=t.payload.thing,n=t.payload.mode;return e.setIn([\"modes\"].concat(r),(n||\"\")+\"\")}};const current=e=>e.get(\"layout\"),currentFilter=e=>e.get(\"filter\"),isShown=(e,t,r)=>(t=normalizeArray(t),e.get(\"shown\",(0,We.fromJS)({})).get((0,We.fromJS)(t),r)),whatMode=(e,t,r=\"\")=>(t=normalizeArray(t),e.getIn([\"modes\",...t],r)),cr=(0,Bt.createSelector)((e=>e),(e=>!isShown(e,\"editor\"))),taggedOperations=(e,t)=>(r,...n)=>{let a=e(r,...n);const{fn:o,layoutSelectors:s,getConfigs:l}=t.getSystem(),i=l(),{maxDisplayedTags:c}=i;let u=s.currentFilter();return u&&!0!==u&&\"true\"!==u&&\"false\"!==u&&(a=o.opsFilter(a,u)),c&&!isNaN(c)&&c>=0&&(a=a.slice(0,c)),a};function plugins_layout(){return{statePlugins:{layout:{reducers:ir,actions:Ne,selectors:Ae},spec:{wrapSelectors:Ie}}}}function logs({configs:e}){const t={debug:0,info:1,log:2,warn:3,error:4},getLevel=e=>t[e]||-1;let{logLevel:r}=e,n=getLevel(r);function log(e,...t){getLevel(e)>=n&&console[e](...t)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let ur=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:e=>(...t)=>(ur=!0,e(...t)),updateJsonSpec:(e,t)=>(...r)=>{const n=t.getConfigs().onComplete;return ur&&\"function\"==typeof n&&(setTimeout(n,0),ur=!1),e(...r)}}}}}}const extractKey=e=>{const t=\"_**[]\";return e.indexOf(t)<0?e:e.split(t)[0].trim()},escapeShell=e=>\"-d \"===e||/^[_\\/-]/g.test(e)?e:\"'\"+e.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=e=>\"-d \"===(e=e.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?e.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(e)?e:'\"'+e+'\"',escapePowershell=e=>{if(\"-d \"===e)return e;if(/\\n/.test(e)){return`@\"\\n${e.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(e)){return`'${e.replace(/'/g,\"''\")}'`}return e};const curlify=(e,t,r,n=\"\")=>{let a=!1,o=\"\";const addWords=(...e)=>o+=\" \"+e.map(t).join(\" \"),addWordsWithoutLeadingSpace=(...e)=>o+=e.map(t).join(\" \"),addNewLine=()=>o+=` ${r}`,addIndent=(e=1)=>o+=\"  \".repeat(e);let s=e.get(\"headers\");if(o+=\"curl\"+n,e.has(\"curlOptions\")&&addWords(...e.get(\"curlOptions\")),addWords(\"-X\",e.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${e.get(\"url\")}`),s&&s.size)for(let t of e.get(\"headers\").entries()){addNewLine(),addIndent();let[e,r]=t;addWordsWithoutLeadingSpace(\"-H\",`${e}: ${r}`),a=a||/^content-type$/i.test(e)&&/^multipart\\/form-data$/i.test(r)}const l=e.get(\"body\");if(l)if(a&&[\"POST\",\"PUT\",\"PATCH\"].includes(e.get(\"method\")))for(let[e,t]of l.entrySeq()){let r=extractKey(e);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),t instanceof at.File&&\"string\"==typeof t.valueOf()?addWords(`${r}=${t.data}${t.type?`;type=${t.type}`:\"\"}`):t instanceof at.File?addWords(`${r}=@${t.name}${t.type?`;type=${t.type}`:\"\"}`):addWords(`${r}=${t}`)}else if(l instanceof at.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${l.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let t=l;We.Map.isMap(t)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(e){let t=[];for(let[r,n]of e.get(\"body\").entrySeq()){let e=extractKey(r);n instanceof at.File?t.push(`  \"${e}\": {\\n    \"name\": \"${n.name}\"${n.type?`,\\n    \"type\": \"${n.type}\"`:\"\"}\\n  }`):t.push(`  \"${e}\": ${JSON.stringify(n,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${t.join(\",\\n\")}\\n}`}(e)):(\"string\"!=typeof t&&(t=JSON.stringify(t)),addWordsWithoutLeadingSpace(t))}else l||\"POST\"!==e.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return o},requestSnippetGenerator_curl_powershell=e=>curlify(e,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=e=>curlify(e,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=e=>curlify(e,escapeCMD,\"^\\n\"),request_snippets_selectors_state=e=>e||(0,We.Map)(),dr=(0,Bt.createSelector)(request_snippets_selectors_state,(e=>{const t=e.get(\"languages\"),r=e.get(\"generators\",(0,We.Map)());return!t||t.isEmpty()?r:r.filter(((e,r)=>t.includes(r)))})),getSnippetGenerators=e=>({fn:t})=>dr(e).map(((e,r)=>{const n=(e=>t[`requestSnippetGenerator_${e}`])(r);return\"function\"!=typeof n?null:e.set(\"fn\",n)})).filter((e=>e)),pr=(0,Bt.createSelector)(request_snippets_selectors_state,(e=>e.get(\"activeLanguage\"))),mr=(0,Bt.createSelector)(request_snippets_selectors_state,(e=>e.get(\"defaultExpanded\")));var fr=function(e){var t={};return __webpack_require__.d(t,e),t}({CopyToClipboard:function(){return N.CopyToClipboard}}),hr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return A.default}}),gr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return I.default}}),yr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return R.default}}),Er=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return B.default}}),Sr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return T.default}}),_r=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return j.default}}),vr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return P.default}}),br=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return M.default}}),wr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return q.default}}),Cr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return L.default}}),xr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return D.default}}),kr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return U.default}}),Or=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return $.default}}),Nr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return J.default}}),Ar=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return V.default}});hr.default.registerLanguage(\"json\",yr.default),hr.default.registerLanguage(\"js\",gr.default),hr.default.registerLanguage(\"xml\",Er.default),hr.default.registerLanguage(\"yaml\",_r.default),hr.default.registerLanguage(\"http\",vr.default),hr.default.registerLanguage(\"bash\",Sr.default),hr.default.registerLanguage(\"powershell\",br.default),hr.default.registerLanguage(\"javascript\",gr.default);const Ir={agate:wr.default,arta:Cr.default,monokai:xr.default,nord:kr.default,obsidian:Or.default,\"tomorrow-night\":Nr.default,idea:Ar.default},Rr=Object.keys(Ir),getStyle=e=>Rr.includes(e)?Ir[e]:(console.warn(`Request style '${e}' is not available, returning default instead`),wr.default),Br={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},Tr={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"};var request_snippets=({request:e,requestSnippetsSelectors:t,getConfigs:r,getComponent:n})=>{const a=(0,ut.default)(r)?r():null,o=!1!==(0,Qt.default)(a,\"syntaxHighlight\")&&(0,Qt.default)(a,\"syntaxHighlight.activated\",!0),s=(0,ze.useRef)(null),l=n(\"ArrowUpIcon\"),i=n(\"ArrowDownIcon\"),[c,u]=(0,ze.useState)(t.getSnippetGenerators()?.keySeq().first()),[d,p]=(0,ze.useState)(t?.getDefaultExpanded());(0,ze.useEffect)((()=>{}),[]),(0,ze.useEffect)((()=>{const e=Array.from(s.current.childNodes).filter((e=>!!e.nodeType&&e.classList?.contains(\"curl-command\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e]);const m=t.getSnippetGenerators(),f=m.get(c),h=f.get(\"fn\")(e),handleSetIsExpanded=()=>{p(!d)},handleGetBtnStyle=e=>e===c?Tr:Br,handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:n,offsetHeight:a,scrollTop:o}=t;n>a&&(0===o&&r<0||a+o>=n&&r>0)&&e.preventDefault()},g=o?ze.default.createElement(hr.default,{language:f.get(\"syntax\"),className:\"curl microlight\",style:getStyle((0,Qt.default)(a,\"syntaxHighlight.theme\"))},h):ze.default.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:h});return ze.default.createElement(\"div\",{className:\"request-snippets\",ref:s},ze.default.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},ze.default.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),ze.default.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:d?\"Collapse operation\":\"Expand operation\"},d?ze.default.createElement(i,{className:\"arrow\",width:\"10\",height:\"10\"}):ze.default.createElement(l,{className:\"arrow\",width:\"10\",height:\"10\"}))),d&&ze.default.createElement(\"div\",{className:\"curl-command\"},ze.default.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},m.entrySeq().map((([e,t])=>ze.default.createElement(\"div\",{style:handleGetBtnStyle(e),className:\"btn\",key:e,onClick:()=>(e=>{c!==e&&u(e)})(e)},ze.default.createElement(\"h4\",{style:e===c?{color:\"white\"}:{}},t.get(\"title\")))))),ze.default.createElement(\"div\",{className:\"copy-to-clipboard\"},ze.default.createElement(fr.CopyToClipboard,{text:h},ze.default.createElement(\"button\",null))),ze.default.createElement(\"div\",null,g)))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:Re,statePlugins:{requestSnippets:{selectors:Be}}}),jr=__webpack_require__(123),Pr=__webpack_require__.n(jr),Mr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return K.default}}),qr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return z.default}});const shallowArrayEquals=e=>t=>Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,r)=>e===t[r])),list=(...e)=>e;class Cache extends Map{delete(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.delete(t)}get(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.get(t)}has(e){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(e))}}var utils_memoizeN=(e,t=list)=>{const{Cache:r}=st.default;st.default.Cache=Cache;const n=(0,st.default)(e,t);return st.default.Cache=r,n};const Lr={string:e=>e.pattern?(e=>{try{return new Mr.default(e).gen()}catch(e){return\"string\"}})(e.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:e=>\"boolean\"!=typeof e.default||e.default},primitive=e=>{e=objectify(e);let{type:t,format:r}=e,n=Lr[`${t}_${r}`]||Lr[t];return isFunc(n)?n(e):\"Unknown Type: \"+e.type},sanitizeRef=e=>deeplyStripKey(e,\"$$ref\",(e=>\"string\"==typeof e&&e.indexOf(\"#\")>-1)),Dr=[\"maxProperties\",\"minProperties\"],Ur=[\"minItems\",\"maxItems\"],$r=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],Jr=[\"minLength\",\"maxLength\"],liftSampleHelper=(e,t,r={})=>{if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...Dr,...Ur,...$r,...Jr].forEach((r=>(r=>{void 0===t[r]&&void 0!==e[r]&&(t[r]=e[r])})(r))),void 0!==e.required&&Array.isArray(e.required)&&(void 0!==t.required&&t.required.length||(t.required=[]),e.required.forEach((e=>{t.required.includes(e)||t.required.push(e)}))),e.properties){t.properties||(t.properties={});let n=objectify(e.properties);for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(n[a]&&n[a].deprecated||n[a]&&n[a].readOnly&&!r.includeReadOnly||n[a]&&n[a].writeOnly&&!r.includeWriteOnly||t.properties[a]||(t.properties[a]=n[a],!e.required&&Array.isArray(e.required)&&-1!==e.required.indexOf(a)&&(t.required?t.required.push(a):t.required=[a])))}return e.items&&(t.items||(t.items={}),t.items=liftSampleHelper(e.items,t.items,r)),t},sampleFromSchemaGeneric=(e,t={},r=void 0,n=!1)=>{e&&isFunc(e.toJS)&&(e=e.toJS());let a=void 0!==r||e&&void 0!==e.example||e&&void 0!==e.default;const o=!a&&e&&e.oneOf&&e.oneOf.length>0,s=!a&&e&&e.anyOf&&e.anyOf.length>0;if(!a&&(o||s)){const r=objectify(o?e.oneOf[0]:e.anyOf[0]);if(liftSampleHelper(r,e,t),!e.xml&&r.xml&&(e.xml=r.xml),void 0!==e.example&&void 0!==r.example)a=!0;else if(r.properties){e.properties||(e.properties={});let n=objectify(r.properties);for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(n[a]&&n[a].deprecated||n[a]&&n[a].readOnly&&!t.includeReadOnly||n[a]&&n[a].writeOnly&&!t.includeWriteOnly||e.properties[a]||(e.properties[a]=n[a],!r.required&&Array.isArray(r.required)&&-1!==r.required.indexOf(a)&&(e.required?e.required.push(a):e.required=[a])))}}const l={};let{xml:i,type:c,example:u,properties:d,additionalProperties:p,items:m}=e||{},{includeReadOnly:f,includeWriteOnly:h}=t;i=i||{};let g,{name:y,prefix:S,namespace:_}=i,v={};if(n&&(y=y||\"notagname\",g=(S?S+\":\":\"\")+y,_)){l[S?\"xmlns:\"+S:\"xmlns\"]=_}n&&(v[g]=[]);const schemaHasAny=t=>t.some((t=>Object.prototype.hasOwnProperty.call(e,t)));e&&!c&&(d||p||schemaHasAny(Dr)?c=\"object\":m||schemaHasAny(Ur)?c=\"array\":schemaHasAny($r)?(c=\"number\",e.type=\"number\"):a||e.enum||(c=\"string\",e.type=\"string\"));const handleMinMaxItems=t=>{if(null!=e?.maxItems&&(t=t.slice(0,e?.maxItems)),null!=e?.minItems){let r=0;for(;t.length<e?.minItems;)t.push(t[r++%t.length])}return t},b=objectify(d);let w,C=0;const hasExceededMaxProperties=()=>e&&null!==e.maxProperties&&void 0!==e.maxProperties&&C>=e.maxProperties,canAddProperty=t=>!e||null===e.maxProperties||void 0===e.maxProperties||!hasExceededMaxProperties()&&(!(t=>!(e&&e.required&&e.required.length&&e.required.includes(t)))(t)||e.maxProperties-C-(()=>{if(!e||!e.required)return 0;let t=0;return n?e.required.forEach((e=>t+=void 0===v[e]?0:1)):e.required.forEach((e=>t+=void 0===v[g]?.find((t=>void 0!==t[e]))?0:1)),e.required.length-t})()>0);if(w=n?(r,a=void 0)=>{if(e&&b[r]){if(b[r].xml=b[r].xml||{},b[r].xml.attribute){const e=Array.isArray(b[r].enum)?b[r].enum[0]:void 0,t=b[r].example,n=b[r].default;return void(l[b[r].xml.name||r]=void 0!==t?t:void 0!==n?n:void 0!==e?e:primitive(b[r]))}b[r].xml.name=b[r].xml.name||r}else b[r]||!1===p||(b[r]={xml:{name:r}});let o=sampleFromSchemaGeneric(e&&b[r]||void 0,t,a,n);canAddProperty(r)&&(C++,Array.isArray(o)?v[g]=v[g].concat(o):v[g].push(o))}:(r,a)=>{if(canAddProperty(r)){if(Object.prototype.hasOwnProperty.call(e,\"discriminator\")&&e.discriminator&&Object.prototype.hasOwnProperty.call(e.discriminator,\"mapping\")&&e.discriminator.mapping&&Object.prototype.hasOwnProperty.call(e,\"$$ref\")&&e.$$ref&&e.discriminator.propertyName===r){for(let t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){v[r]=t;break}}else v[r]=sampleFromSchemaGeneric(b[r],t,a,n);C++}},a){let a;if(a=sanitizeRef(void 0!==r?r:void 0!==u?u:e.default),!n){if(\"number\"==typeof a&&\"string\"===c)return`${a}`;if(\"string\"!=typeof a||\"string\"===c)return a;try{return JSON.parse(a)}catch(e){return a}}if(e||(c=Array.isArray(a)?\"array\":typeof a),\"array\"===c){if(!Array.isArray(a)){if(\"string\"==typeof a)return a;a=[a]}const r=e?e.items:void 0;r&&(r.xml=r.xml||i||{},r.xml.name=r.xml.name||i.name);let o=a.map((e=>sampleFromSchemaGeneric(r,t,e,n)));return o=handleMinMaxItems(o),i.wrapped?(v[g]=o,(0,qr.default)(l)||v[g].push({_attr:l})):v=o,v}if(\"object\"===c){if(\"string\"==typeof a)return a;for(let t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e&&b[t]&&b[t].readOnly&&!f||e&&b[t]&&b[t].writeOnly&&!h||(e&&b[t]&&b[t].xml&&b[t].xml.attribute?l[b[t].xml.name||t]=a[t]:w(t,a[t])));return(0,qr.default)(l)||v[g].push({_attr:l}),v}return v[g]=(0,qr.default)(l)?a:[{_attr:l},a],v}if(\"object\"===c){for(let e in b)Object.prototype.hasOwnProperty.call(b,e)&&(b[e]&&b[e].deprecated||b[e]&&b[e].readOnly&&!f||b[e]&&b[e].writeOnly&&!h||w(e));if(n&&l&&v[g].push({_attr:l}),hasExceededMaxProperties())return v;if(!0===p)n?v[g].push({additionalProp:\"Anything can be here\"}):v.additionalProp1={},C++;else if(p){const r=objectify(p),a=sampleFromSchemaGeneric(r,t,void 0,n);if(n&&r.xml&&r.xml.name&&\"notagname\"!==r.xml.name)v[g].push(a);else{const t=null!==e.minProperties&&void 0!==e.minProperties&&C<e.minProperties?e.minProperties-C:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return v;if(n){const t={};t[\"additionalProp\"+e]=a.notagname,v[g].push(t)}else v[\"additionalProp\"+e]=a;C++}}}return v}if(\"array\"===c){if(!m)return;let r;if(n&&(m.xml=m.xml||e?.xml||{},m.xml.name=m.xml.name||i.name),Array.isArray(m.anyOf))r=m.anyOf.map((e=>sampleFromSchemaGeneric(liftSampleHelper(m,e,t),t,void 0,n)));else if(Array.isArray(m.oneOf))r=m.oneOf.map((e=>sampleFromSchemaGeneric(liftSampleHelper(m,e,t),t,void 0,n)));else{if(!(!n||n&&i.wrapped))return sampleFromSchemaGeneric(m,t,void 0,n);r=[sampleFromSchemaGeneric(m,t,void 0,n)]}return r=handleMinMaxItems(r),n&&i.wrapped?(v[g]=r,(0,qr.default)(l)||v[g].push({_attr:l}),v):r}let x;if(e&&Array.isArray(e.enum))x=normalizeArray(e.enum)[0];else{if(!e)return;if(x=primitive(e),\"number\"==typeof x){let t=e.minimum;null!=t&&(e.exclusiveMinimum&&t++,x=t);let r=e.maximum;null!=r&&(e.exclusiveMaximum&&r--,x=r)}if(\"string\"==typeof x&&(null!==e.maxLength&&void 0!==e.maxLength&&(x=x.slice(0,e.maxLength)),null!==e.minLength&&void 0!==e.minLength)){let t=0;for(;x.length<e.minLength;)x+=x[t++%x.length]}}if(\"file\"!==c)return n?(v[g]=(0,qr.default)(l)?x:[{_attr:l},x],v):x},inferSchema=e=>(e.schema&&(e=e.schema),e.properties&&(e.type=\"object\"),e),createXMLExample=(e,t,r)=>{const n=sampleFromSchemaGeneric(e,t,r,!0);if(n)return\"string\"==typeof n?n:Pr()(n,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(e,t,r)=>sampleFromSchemaGeneric(e,t,r,!1),resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Vr=utils_memoizeN(createXMLExample,resolver),Kr=utils_memoizeN(sampleFromSchema,resolver),zr=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Fr=[\"object\"];var get_json_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.memoizedSampleFromSchema(t,r,a),l=typeof s,i=zr.reduce(((e,t)=>t.when.test(n)?[...e,...t.shouldStringifyTypes]:e),Fr);return(0,it.default)(i,(e=>e===l))?JSON.stringify(s,null,2):s};var get_yaml_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.getJsonSampleSchema(t,r,n,a);let l;try{l=$t.default.dump($t.default.load(s),{lineWidth:-1},{schema:$t.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")};var get_xml_sample_schema=e=>(t,r,n)=>{const{fn:a}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return a.memoizedCreateXMLExample(t,r,n)};var get_sample_schema=e=>(t,r=\"\",n={},a=void 0)=>{const{fn:o}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof a?.toJS&&(a=a.toJS()),/xml/.test(r)?o.getXmlSampleSchema(t,n,a):/(yaml|yml)/.test(r)?o.getYamlSampleSchema(t,n,r,a):o.getJsonSampleSchema(t,n,r,a)};var json_schema_5_samples=({getSystem:e})=>{const t=get_json_sample_schema(e),r=get_yaml_sample_schema(e),n=get_xml_sample_schema(e),a=get_sample_schema(e);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Kr,memoizedCreateXMLExample:Vr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Kr,memoizedCreateXMLExample:Vr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a}}},Wr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return F.default}});const Hr=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=e=>e||(0,We.Map)(),Gr=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"lastError\"))),Xr=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"url\"))),Yr=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"spec\")||\"\")),Qr=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"specSource\")||\"not-editor\")),Zr=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"json\",(0,We.Map)()))),en=(0,Bt.createSelector)(Zr,(e=>e.toJS())),tn=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"resolved\",(0,We.Map)()))),specResolvedSubtree=(e,t)=>e.getIn([\"resolvedSubtrees\",...t],void 0),mergerFn=(e,t)=>We.Map.isMap(e)&&We.Map.isMap(t)?t.get(\"$$ref\")?t:(0,We.OrderedMap)().mergeWith(mergerFn,e,t):t,rn=(0,Bt.createSelector)(spec_selectors_state,(e=>(0,We.OrderedMap)().mergeWith(mergerFn,e.get(\"json\"),e.get(\"resolvedSubtrees\")))),spec=e=>Zr(e),nn=(0,Bt.createSelector)(spec,(()=>!1)),an=(0,Bt.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"info\")))),on=(0,Bt.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"externalDocs\")))),sn=(0,Bt.createSelector)(an,(e=>e&&e.get(\"version\"))),ln=(0,Bt.createSelector)(sn,(e=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(e).slice(1))),cn=(0,Bt.createSelector)(rn,(e=>e.get(\"paths\"))),un=(0,Wr.default)([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),dn=(0,Bt.createSelector)(cn,(e=>{if(!e||e.size<1)return(0,We.List)();let t=(0,We.List)();return e&&e.forEach?(e.forEach(((e,r)=>{if(!e||!e.forEach)return{};e.forEach(((e,n)=>{Hr.indexOf(n)<0||(t=t.push((0,We.fromJS)({path:r,method:n,operation:e,id:`${n}-${r}`})))}))})),t):(0,We.List)()})),pn=(0,Bt.createSelector)(spec,(e=>(0,We.Set)(e.get(\"consumes\")))),mn=(0,Bt.createSelector)(spec,(e=>(0,We.Set)(e.get(\"produces\")))),fn=(0,Bt.createSelector)(spec,(e=>e.get(\"security\",(0,We.List)()))),hn=(0,Bt.createSelector)(spec,(e=>e.get(\"securityDefinitions\"))),findDefinition=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"definitions\",t],null),n=e.getIn([\"json\",\"definitions\",t],null);return r||n||null},gn=(0,Bt.createSelector)(spec,(e=>{const t=e.get(\"definitions\");return We.Map.isMap(t)?t:(0,We.Map)()})),yn=(0,Bt.createSelector)(spec,(e=>e.get(\"basePath\"))),En=(0,Bt.createSelector)(spec,(e=>e.get(\"host\"))),Sn=(0,Bt.createSelector)(spec,(e=>e.get(\"schemes\",(0,We.Map)()))),_n=(0,Bt.createSelector)([dn,pn,mn],((e,t,r)=>e.map((e=>e.update(\"operation\",(e=>{if(e){if(!We.Map.isMap(e))return;return e.withMutations((e=>(e.get(\"consumes\")||e.update(\"consumes\",(e=>(0,We.Set)(e).merge(t))),e.get(\"produces\")||e.update(\"produces\",(e=>(0,We.Set)(e).merge(r))),e)))}return(0,We.Map)()})))))),vn=(0,Bt.createSelector)(spec,(e=>{const t=e.get(\"tags\",(0,We.List)());return We.List.isList(t)?t.filter((e=>We.Map.isMap(e))):(0,We.List)()})),tagDetails=(e,t)=>(vn(e)||(0,We.List)()).filter(We.Map.isMap).find((e=>e.get(\"name\")===t),(0,We.Map)()),bn=(0,Bt.createSelector)(_n,vn,((e,t)=>e.reduce(((e,t)=>{let r=(0,We.Set)(t.getIn([\"operation\",\"tags\"]));return r.count()<1?e.update(\"default\",(0,We.List)(),(e=>e.push(t))):r.reduce(((e,r)=>e.update(r,(0,We.List)(),(e=>e.push(t)))),e)}),t.reduce(((e,t)=>e.set(t.get(\"name\"),(0,We.List)())),(0,We.OrderedMap)())))),selectors_taggedOperations=e=>({getConfigs:t})=>{let{tagsSorter:r,operationsSorter:n}=t();return bn(e).sortBy(((e,t)=>t),((e,t)=>{let n=\"function\"==typeof r?r:vt.tagsSorter[r];return n?n(e,t):null})).map(((t,r)=>{let a=\"function\"==typeof n?n:vt.operationsSorter[n],o=a?t.sort(a):t;return(0,We.Map)({tagDetails:tagDetails(e,r),operations:o})}))},wn=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"responses\",(0,We.Map)()))),Cn=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"requests\",(0,We.Map)()))),xn=(0,Bt.createSelector)(spec_selectors_state,(e=>e.get(\"mutatedRequests\",(0,We.Map)()))),responseFor=(e,t,r)=>wn(e).getIn([t,r],null),requestFor=(e,t,r)=>Cn(e).getIn([t,r],null),mutatedRequestFor=(e,t,r)=>xn(e).getIn([t,r],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(e,t,r)=>{const n=rn(e).getIn([\"paths\",...t,\"parameters\"],(0,We.OrderedMap)()),a=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,We.OrderedMap)());return n.map((e=>{const t=a.get(`${r.get(\"in\")}.${r.get(\"name\")}`),n=a.get(`${r.get(\"in\")}.${r.get(\"name\")}.hash-${r.hashCode()}`);return(0,We.OrderedMap)().merge(e,t,n)})).find((e=>e.get(\"in\")===r.get(\"in\")&&e.get(\"name\")===r.get(\"name\")),(0,We.OrderedMap)())},parameterInclusionSettingFor=(e,t,r,n)=>{const a=`${n}.${r}`;return e.getIn([\"meta\",\"paths\",...t,\"parameter_inclusions\",a],!1)},parameterWithMeta=(e,t,r,n)=>{const a=rn(e).getIn([\"paths\",...t,\"parameters\"],(0,We.OrderedMap)()).find((e=>e.get(\"in\")===n&&e.get(\"name\")===r),(0,We.OrderedMap)());return parameterWithMetaByIdentity(e,t,a)},operationWithMeta=(e,t,r)=>{const n=rn(e).getIn([\"paths\",t,r],(0,We.OrderedMap)()),a=e.getIn([\"meta\",\"paths\",t,r],(0,We.OrderedMap)()),o=n.get(\"parameters\",(0,We.List)()).map((n=>parameterWithMetaByIdentity(e,[t,r],n)));return(0,We.OrderedMap)().merge(n,a).set(\"parameters\",o)};function getParameter(e,t,r,n){return t=t||[],e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,We.fromJS)([])).find((e=>We.Map.isMap(e)&&e.get(\"name\")===r&&e.get(\"in\")===n))||(0,We.Map)()}const kn=(0,Bt.createSelector)(spec,(e=>{const t=e.get(\"host\");return\"string\"==typeof t&&t.length>0&&\"/\"!==t[0]}));function parameterValues(e,t,r){return t=t||[],operationWithMeta(e,...t).get(\"parameters\",(0,We.List)()).reduce(((e,t)=>{let n=r&&\"body\"===t.get(\"in\")?t.get(\"value_xml\"):t.get(\"value\");return We.List.isList(n)&&(n=n.filter((e=>\"\"!==e))),e.set(paramToIdentifier(t,{allowHashes:!1}),n)}),(0,We.fromJS)({}))}function parametersIncludeIn(e,t=\"\"){if(We.List.isList(e))return e.some((e=>We.Map.isMap(e)&&e.get(\"in\")===t))}function parametersIncludeType(e,t=\"\"){if(We.List.isList(e))return e.some((e=>We.Map.isMap(e)&&e.get(\"type\")===t))}function contentTypeValues(e,t){t=t||[];let r=rn(e).getIn([\"paths\",...t],(0,We.fromJS)({})),n=e.getIn([\"meta\",\"paths\",...t],(0,We.fromJS)({})),a=currentProducesFor(e,t);const o=r.get(\"parameters\")||new We.List,s=n.get(\"consumes_value\")?n.get(\"consumes_value\"):parametersIncludeType(o,\"file\")?\"multipart/form-data\":parametersIncludeType(o,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,We.fromJS)({requestContentType:s,responseContentType:a})}function currentProducesFor(e,t){t=t||[];const r=rn(e).getIn([\"paths\",...t],null);if(null===r)return;const n=e.getIn([\"meta\",\"paths\",...t,\"produces_value\"],null),a=r.getIn([\"produces\",0],null);return n||a||\"application/json\"}function producesOptionsFor(e,t){t=t||[];const r=rn(e),n=r.getIn([\"paths\",...t],null);if(null===n)return;const[a]=t,o=n.get(\"produces\",null),s=r.getIn([\"paths\",a,\"produces\"],null),l=r.getIn([\"produces\"],null);return o||s||l}function consumesOptionsFor(e,t){t=t||[];const r=rn(e),n=r.getIn([\"paths\",...t],null);if(null===n)return;const[a]=t,o=n.get(\"consumes\",null),s=r.getIn([\"paths\",a,\"consumes\"],null),l=r.getIn([\"consumes\"],null);return o||s||l}const operationScheme=(e,t,r)=>{let n=e.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),a=Array.isArray(n)?n[1]:null;return e.getIn([\"scheme\",t,r])||e.getIn([\"scheme\",\"_defaultScheme\"])||a||\"\"},canExecuteScheme=(e,t,r)=>[\"http\",\"https\"].indexOf(operationScheme(e,t,r))>-1,validationErrors=(e,t)=>{t=t||[];let r=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,We.fromJS)([]));const n=[];return r.forEach((e=>{let t=e.get(\"errors\");t&&t.count()&&t.map((e=>We.Map.isMap(e)?`${e.get(\"propKey\")}: ${e.get(\"error\")}`:e)).forEach((e=>n.push(e)))})),n},validateBeforeExecute=(e,t)=>0===validationErrors(e,t).length,getOAS3RequiredRequestBodyContentType=(e,t)=>{let r={requestBody:!1,requestContentType:{}},n=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\"],(0,We.fromJS)([]));return n.size<1||(n.getIn([\"required\"])&&(r.requestBody=n.getIn([\"required\"])),n.getIn([\"content\"]).entrySeq().forEach((e=>{const t=e[0];if(e[1].getIn([\"schema\",\"required\"])){const n=e[1].getIn([\"schema\",\"required\"]).toJS();r.requestContentType[t]=n}}))),r},isMediaTypeSchemaPropertiesEqual=(e,t,r,n)=>{if((r||n)&&r===n)return!0;let a=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\",\"content\"],(0,We.fromJS)([]));if(a.size<2||!r||!n)return!1;let o=a.getIn([r,\"schema\",\"properties\"],(0,We.fromJS)([])),s=a.getIn([n,\"schema\",\"properties\"],(0,We.fromJS)([]));return!!o.equals(s)};function returnSelfOrNewMap(e){return We.Map.isMap(e)?e:new We.Map}var On=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return W.default}}),Nn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return H.default}}),An=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return G.default}}),In=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return X.default}});const Rn=\"spec_update_spec\",Bn=\"spec_update_url\",Tn=\"spec_update_json\",jn=\"spec_update_param\",Pn=\"spec_update_empty_param_inclusion\",Mn=\"spec_validate_param\",qn=\"spec_set_response\",Ln=\"spec_set_request\",Dn=\"spec_set_mutated_request\",Un=\"spec_log_request\",$n=\"spec_clear_response\",Jn=\"spec_clear_request\",Vn=\"spec_clear_validate_param\",Kn=\"spec_update_operation_meta_value\",zn=\"spec_update_resolved\",Fn=\"spec_update_resolved_subtree\",Wn=\"set_scheme\",toStr=e=>(0,On.default)(e)?e:\"\";function updateSpec(e){const t=toStr(e).replace(/\\t/g,\"  \");if(\"string\"==typeof e)return{type:Rn,payload:t}}function updateResolved(e){return{type:zn,payload:e}}function updateUrl(e){return{type:Bn,payload:e}}function updateJsonSpec(e){return{type:Tn,payload:e}}const parseToJson=e=>({specActions:t,specSelectors:r,errActions:n})=>{let{specStr:a}=r,o=null;try{e=e||a(),n.clear({source:\"parser\"}),o=$t.default.load(e,{schema:$t.JSON_SCHEMA})}catch(e){return console.error(e),n.newSpecErr({source:\"parser\",level:\"error\",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return o&&\"object\"==typeof o?t.updateJsonSpec(o):{}};let Hn=!1;const resolveSpec=(e,t)=>({specActions:r,specSelectors:n,errActions:a,fn:{fetch:o,resolve:s,AST:l={}},getConfigs:i})=>{Hn||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),Hn=!0);const{modelPropertyMacro:c,parameterMacro:u,requestInterceptor:d,responseInterceptor:p}=i();void 0===e&&(e=n.specJson()),void 0===t&&(t=n.url());let m=l.getLineNumberForPath?l.getLineNumberForPath:()=>{},f=n.specStr();return s({fetch:o,spec:e,baseDoc:String(new URL(t,document.baseURI)),modelPropertyMacro:c,parameterMacro:u,requestInterceptor:d,responseInterceptor:p}).then((({spec:e,errors:t})=>{if(a.clear({type:\"thrown\"}),Array.isArray(t)&&t.length>0){let e=t.map((e=>(console.error(e),e.line=e.fullPath?m(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));a.newThrownErrBatch(e)}return r.updateResolved(e)}))};let Gn=[];const Xn=(0,Nn.default)((()=>{const e=Gn.reduce(((e,{path:t,system:r})=>(e.has(r)||e.set(r,[]),e.get(r).push(t),e)),new Map);Gn=[],e.forEach((async(e,t)=>{if(!t)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!t.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:r,errSelectors:n,fn:{resolveSubtree:a,fetch:o,AST:s={}},specSelectors:l,specActions:i}=t,c=s.getLineNumberForPath??(0,Wr.default)(void 0),u=l.specStr(),{modelPropertyMacro:d,parameterMacro:p,requestInterceptor:m,responseInterceptor:f}=t.getConfigs();try{const t=await e.reduce((async(e,t)=>{let{resultMap:s,specWithCurrentSubtrees:i}=await e;const{errors:h,spec:g}=await a(i,t,{baseDoc:String(new URL(l.url(),document.baseURI)),modelPropertyMacro:d,parameterMacro:p,requestInterceptor:m,responseInterceptor:f});if(n.allErrors().size&&r.clearBy((e=>\"thrown\"!==e.get(\"type\")||\"resolver\"!==e.get(\"source\")||!e.get(\"fullPath\").every(((e,r)=>e===t[r]||void 0===t[r])))),Array.isArray(h)&&h.length>0){let e=h.map((e=>(e.line=e.fullPath?c(u,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));r.newThrownErrBatch(e)}return g&&l.isOAS3()&&\"components\"===t[0]&&\"securitySchemes\"===t[1]&&await Promise.all(Object.values(g).filter((e=>\"openIdConnect\"===e.type)).map((async e=>{const t={url:e.openIdConnectUrl,requestInterceptor:m,responseInterceptor:f};try{const r=await o(t);r instanceof Error||r.status>=400?console.error(r.statusText+\" \"+t.url):e.openIdConnectData=JSON.parse(r.text)}catch(e){console.error(e)}}))),(0,An.default)(s,t,g),i=(0,In.default)(t,g,i),{resultMap:s,specWithCurrentSubtrees:i}}),Promise.resolve({resultMap:(l.specResolvedSubtree([])||(0,We.Map)()).toJS(),specWithCurrentSubtrees:l.specJS()}));i.updateResolvedSubtree([],t.resultMap)}catch(e){console.error(e)}}))}),35),requestResolvedSubtree=e=>t=>{Gn.find((({path:r,system:n})=>n===t&&r.toString()===e.toString()))||(Gn.push({path:e,system:t}),Xn())};function changeParam(e,t,r,n,a){return{type:jn,payload:{path:e,value:n,paramName:t,paramIn:r,isXml:a}}}function changeParamByIdentity(e,t,r,n){return{type:jn,payload:{path:e,param:t,value:r,isXml:n}}}const updateResolvedSubtree=(e,t)=>({type:Fn,payload:{path:e,value:t}}),invalidateResolvedSubtreeCache=()=>({type:Fn,payload:{path:[],value:(0,We.Map)()}}),validateParams=(e,t)=>({type:Mn,payload:{pathMethod:e,isOAS3:t}}),updateEmptyParamInclusion=(e,t,r,n)=>({type:Pn,payload:{pathMethod:e,paramName:t,paramIn:r,includeEmptyValue:n}});function clearValidateParams(e){return{type:Vn,payload:{pathMethod:e}}}function changeConsumesValue(e,t){return{type:Kn,payload:{path:e,value:t,key:\"consumes_value\"}}}function changeProducesValue(e,t){return{type:Kn,payload:{path:e,value:t,key:\"produces_value\"}}}const setResponse=(e,t,r)=>({payload:{path:e,method:t,res:r},type:qn}),setRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:Ln}),setMutatedRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:Dn}),logRequest=e=>({payload:e,type:Un}),executeRequest=e=>({fn:t,specActions:r,specSelectors:n,getConfigs:a,oas3Selectors:o})=>{let{pathName:s,method:l,operation:i}=e,{requestInterceptor:c,responseInterceptor:u}=a(),d=i.toJS();if(i&&i.get(\"parameters\")&&i.get(\"parameters\").filter((e=>e&&!0===e.get(\"allowEmptyValue\"))).forEach((t=>{if(n.parameterInclusionSettingFor([s,l],t.get(\"name\"),t.get(\"in\"))){e.parameters=e.parameters||{};const r=paramToValue(t,e.parameters);(!r||r&&0===r.size)&&(e.parameters[t.get(\"name\")]=\"\")}})),e.contextUrl=(0,bt.default)(n.url()).toString(),d&&d.operationId?e.operationId=d.operationId:d&&s&&l&&(e.operationId=t.opId(d,s,l)),n.isOAS3()){const t=`${s}:${l}`;e.server=o.selectedServer(t)||o.selectedServer();const r=o.serverVariables({server:e.server,namespace:t}).toJS(),n=o.serverVariables({server:e.server}).toJS();e.serverVariables=Object.keys(r).length?r:n,e.requestContentType=o.requestContentType(s,l),e.responseContentType=o.responseContentType(s,l)||\"*/*\";const a=o.requestBodyValue(s,l),i=o.requestBodyInclusionSetting(s,l);a&&a.toJS?e.requestBody=a.map((e=>We.Map.isMap(e)?e.get(\"value\"):e)).filter(((e,t)=>(Array.isArray(e)?0!==e.length:!isEmptyValue(e))||i.get(t))).toJS():e.requestBody=a}let p=Object.assign({},e);p=t.buildRequest(p),r.setRequest(e.pathName,e.method,p);e.requestInterceptor=async t=>{let n=await c.apply(void 0,[t]),a=Object.assign({},n);return r.setMutatedRequest(e.pathName,e.method,a),n},e.responseInterceptor=u;const m=Date.now();return t.execute(e).then((t=>{t.duration=Date.now()-m,r.setResponse(e.pathName,e.method,t)})).catch((t=>{\"Failed to fetch\"===t.message&&(t.name=\"\",t.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),r.setResponse(e.pathName,e.method,{error:!0,err:t})}))},actions_execute=({path:e,method:t,...r}={})=>n=>{let{fn:{fetch:a},specSelectors:o,specActions:s}=n,l=o.specJsonWithResolvedSubtrees().toJS(),i=o.operationScheme(e,t),{requestContentType:c,responseContentType:u}=o.contentTypeValues([e,t]).toJS(),d=/xml/i.test(c),p=o.parameterValues([e,t],d).toJS();return s.executeRequest({...r,fetch:a,spec:l,pathName:e,method:t,parameters:p,requestContentType:c,scheme:i,responseContentType:u})};function clearResponse(e,t){return{type:$n,payload:{path:e,method:t}}}function clearRequest(e,t){return{type:Jn,payload:{path:e,method:t}}}function setScheme(e,t,r){return{type:Wn,payload:{scheme:e,path:t,method:r}}}var Yn={[Rn]:(e,t)=>\"string\"==typeof t.payload?e.set(\"spec\",t.payload):e,[Bn]:(e,t)=>e.set(\"url\",t.payload+\"\"),[Tn]:(e,t)=>e.set(\"json\",fromJSOrdered(t.payload)),[zn]:(e,t)=>e.setIn([\"resolved\"],fromJSOrdered(t.payload)),[Fn]:(e,t)=>{const{value:r,path:n}=t.payload;return e.setIn([\"resolvedSubtrees\",...n],fromJSOrdered(r))},[jn]:(e,{payload:t})=>{let{path:r,paramName:n,paramIn:a,param:o,value:s,isXml:l}=t,i=o?paramToIdentifier(o):`${a}.${n}`;const c=l?\"value_xml\":\"value\";return e.setIn([\"meta\",\"paths\",...r,\"parameters\",i,c],(0,We.fromJS)(s))},[Pn]:(e,{payload:t})=>{let{pathMethod:r,paramName:n,paramIn:a,includeEmptyValue:o}=t;if(!n||!a)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),e;const s=`${a}.${n}`;return e.setIn([\"meta\",\"paths\",...r,\"parameter_inclusions\",s],o)},[Mn]:(e,{payload:{pathMethod:t,isOAS3:r}})=>{const n=rn(e).getIn([\"paths\",...t]),a=parameterValues(e,t).toJS();return e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,We.fromJS)({}),(o=>n.get(\"parameters\",(0,We.List)()).reduce(((n,o)=>{const s=paramToValue(o,a),l=parameterInclusionSettingFor(e,t,o.get(\"name\"),o.get(\"in\")),i=((e,t,{isOAS3:r=!1,bypassRequiredCheck:n=!1}={})=>{let a=e.get(\"required\"),{schema:o,parameterContentMediaType:s}=getParameterSchema(e,{isOAS3:r});return validateValueBySchema(t,o,a,n,s)})(o,s,{bypassRequiredCheck:l,isOAS3:r});return n.setIn([paramToIdentifier(o),\"errors\"],(0,We.fromJS)(i))}),o)))},[Vn]:(e,{payload:{pathMethod:t}})=>e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,We.fromJS)([]),(e=>e.map((e=>e.set(\"errors\",(0,We.fromJS)([])))))),[qn]:(e,{payload:{res:t,path:r,method:n}})=>{let a;a=t.error?Object.assign({error:!0,name:t.err.name,message:t.err.message,statusCode:t.err.statusCode},t.err.response):t,a.headers=a.headers||{};let o=e.setIn([\"responses\",r,n],fromJSOrdered(a));return at.Blob&&a.data instanceof at.Blob&&(o=o.setIn([\"responses\",r,n,\"text\"],a.data)),o},[Ln]:(e,{payload:{req:t,path:r,method:n}})=>e.setIn([\"requests\",r,n],fromJSOrdered(t)),[Dn]:(e,{payload:{req:t,path:r,method:n}})=>e.setIn([\"mutatedRequests\",r,n],fromJSOrdered(t)),[Kn]:(e,{payload:{path:t,value:r,key:n}})=>{let a=[\"paths\",...t],o=[\"meta\",\"paths\",...t];return e.getIn([\"json\",...a])||e.getIn([\"resolved\",...a])||e.getIn([\"resolvedSubtrees\",...a])?e.setIn([...o,n],(0,We.fromJS)(r)):e},[$n]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"responses\",t,r]),[Jn]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"requests\",t,r]),[Wn]:(e,{payload:{scheme:t,path:r,method:n}})=>r&&n?e.setIn([\"scheme\",r,n],t):r||n?void 0:e.setIn([\"scheme\",\"_defaultScheme\"],t)};const wrap_actions_updateSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.parseToJson(...r)},wrap_actions_updateJsonSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.invalidateResolvedSubtreeCache();const[n]=r,a=(0,Qt.default)(n,[\"paths\"])||{};Object.keys(a).forEach((e=>{(0,Qt.default)(a,[e]).$ref&&t.requestResolvedSubtree([\"paths\",e])})),t.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(e,{specActions:t})=>r=>(t.logRequest(r),e(r)),wrap_actions_validateParams=(e,{specSelectors:t})=>r=>e(r,t.isOAS3());var plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...Pe},reducers:{...Yn},actions:{...je},selectors:{...Te}}}}),Qn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Y.default}}),Zn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Q.default}}),ea=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Z.default}}),ta=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ee.default}}),ra=function(e){var t={};return __webpack_require__.d(t,e),t}({makeResolve:function(){return te.makeResolve}}),na=function(e){var t={};return __webpack_require__.d(t,e),t}({buildRequest:function(){return re.buildRequest},execute:function(){return re.execute}}),aa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ne.default},makeHttp:function(){return ne.makeHttp},serializeRes:function(){return ne.serializeRes}}),oa=function(e){var t={};return __webpack_require__.d(t,e),t}({makeResolveSubtree:function(){return ae.makeResolveSubtree}}),sa=function(e){var t={};return __webpack_require__.d(t,e),t}({opId:function(){return oe.opId}});const configs_wrap_actions_loaded=(e,t)=>(...r)=>{e(...r);const n=t.getConfigs().withCredentials;void 0!==n&&(t.fn.fetch.withCredentials=\"string\"==typeof n?\"true\"===n:!!n)};function swagger_client({configs:e,getConfigs:t}){return{fn:{fetch:(0,aa.makeHttp)(aa.default,e.preFetch,e.postFetch),buildRequest:na.buildRequest,execute:na.execute,resolve:(0,ra.makeResolve)({strategies:[ta.default,ea.default,Zn.default,Qn.default]}),resolveSubtree:async(e,r,n={})=>{const a=t(),o={modelPropertyMacro:a.modelPropertyMacro,parameterMacro:a.parameterMacro,requestInterceptor:a.requestInterceptor,responseInterceptor:a.responseInterceptor,strategies:[ta.default,ea.default,Zn.default,Qn.default]};return(0,oa.makeResolveSubtree)(o)(e,r,n)},serializeRes:aa.serializeRes,opId:sa.opId},statePlugins:{configs:{wrapActions:{loaded:configs_wrap_actions_loaded}}}}}function util(){return{fn:{shallowEqualKeys}}}var la=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return se.default}}),ia=function(e){var t={};return __webpack_require__.d(t,e),t}({Provider:function(){return le.Provider},connect:function(){return le.connect}}),ca=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ie.default}});const withSystem=e=>t=>{const{fn:r}=e();class WithSystem extends ze.Component{render(){return ze.default.createElement(t,(0,nr.default)({},e(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${r.getDisplayName(t)})`,WithSystem},withRoot=(e,t)=>r=>{const{fn:n}=e();class WithRoot extends ze.Component{render(){return ze.default.createElement(ia.Provider,{store:t},ze.default.createElement(r,(0,nr.default)({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${n.getDisplayName(r)})`,WithRoot},withConnect=(e,t,r)=>(0,Fe.compose)(r?withRoot(e,r):ca.default,(0,ia.connect)(((r,n)=>{const a={...n,...e()},o=t.prototype?.mapStateToProps||(e=>({state:e}));return o(r,a)})),withSystem(e))(t),handleProps=(e,t,r,n)=>{for(const a in t){const o=t[a];\"function\"==typeof o&&o(r[a],n[a],e())}},withMappedContainer=(e,t,r)=>(t,n)=>{const{fn:a}=e(),o=r(t,\"root\");class WithMappedContainer extends ze.Component{constructor(t,r){super(t,r),handleProps(e,n,t,{})}UNSAFE_componentWillReceiveProps(t){handleProps(e,n,t,this.props)}render(){const e=(0,Lt.default)(this.props,n?Object.keys(n):[]);return ze.default.createElement(o,e)}}return WithMappedContainer.displayName=`WithMappedContainer(${a.getDisplayName(o)})`,WithMappedContainer},render=(e,t,r,n)=>a=>{const o=r(e,t,n)(\"App\",\"root\"),{createRoot:s}=la.default;s(a).render(ze.default.createElement(o,null))},getComponent=(e,t,r)=>(n,a,o={})=>{if(\"string\"!=typeof n)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof n);const s=r(n);return s?a?\"root\"===a?withConnect(e,s,t()):withConnect(e,s):s:(o.failSilently||e().log.warn(\"Could not find component:\",n),null)},getDisplayName=e=>e.displayName||e.name||\"Component\";var view=({getComponents:e,getStore:t,getSystem:r})=>{const n=(a=getComponent(r,t,e),_t(a,((...e)=>JSON.stringify(e))));var a;const o=(e=>utils_memoizeN(e,((...e)=>e)))(withMappedContainer(r,0,n));return{rootInjects:{getComponent:n,makeMappedContainer:o,render:render(r,t,getComponent,e)},fn:{getDisplayName}}};var view_legacy=({React:e,getSystem:t,getStore:r,getComponents:n})=>{const a={},o=parseInt(e?.version,10);return o>=16&&o<18&&(a.render=((e,t,r,n)=>a=>{const o=r(e,t,n)(\"App\",\"root\");la.default.render(ze.default.createElement(o,null),a)})(t,r,getComponent,n)),{rootInjects:a}};function downloadUrlPlugin(e){let{fn:t}=e;const r={download:e=>({errActions:r,specSelectors:n,specActions:a,getConfigs:o})=>{let{fetch:s}=t;const l=o();function next(t){if(t instanceof Error||t.status>=400)return a.updateLoadingStatus(\"failed\"),r.newThrownErr(Object.assign(new Error((t.message||t.statusText)+\" \"+e),{source:\"fetch\"})),void(!t.status&&t instanceof Error&&function checkPossibleFailReasons(){try{let t;if(\"URL\"in at?t=new URL(e):(t=document.createElement(\"a\"),t.href=e),\"https:\"!==t.protocol&&\"https:\"===at.location.protocol){const e=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${t.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void r.newThrownErr(e)}if(t.origin!==at.location.origin){const e=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${t.origin}) does not match the page (${at.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});r.newThrownErr(e)}}catch(e){return}}());a.updateLoadingStatus(\"success\"),a.updateSpec(t.text),n.url()!==e&&a.updateUrl(e)}e=e||n.url(),a.updateLoadingStatus(\"loading\"),r.clear({source:\"fetch\"}),s({url:e,loadSpec:!0,requestInterceptor:l.requestInterceptor||(e=>e),responseInterceptor:l.responseInterceptor||(e=>e),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:e=>{let t=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===t.indexOf(e)&&console.error(`Error: ${e} is not one of ${JSON.stringify(t)}`),{type:\"spec_update_loading_status\",payload:e}}};let n={loadingStatus:(0,Bt.createSelector)((e=>e||(0,We.Map)()),(e=>e.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:r,reducers:{spec_update_loading_status:(e,t)=>\"string\"==typeof t.payload?e.set(\"loadingStatus\",t.payload):e},selectors:n}}}}var ua=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ce.default}});const da=console.error,withErrorBoundary=e=>t=>{const{getComponent:r,fn:n}=e(),a=r(\"ErrorBoundary\"),o=n.getDisplayName(t);class WithErrorBoundary extends ze.Component{render(){return ze.default.createElement(a,{targetName:o,getComponent:r,fn:n},ze.default.createElement(t,(0,nr.default)({},this.props,this.context)))}}var s;return WithErrorBoundary.displayName=`WithErrorBoundary(${o})`,(s=t).prototype&&s.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=t.prototype.mapStateToProps),WithErrorBoundary};var fallback=({name:e})=>ze.default.createElement(\"div\",{className:\"fallback\"},\"😱 \",ze.default.createElement(\"i\",null,\"Could not render \",\"t\"===e?\"this component\":e,\", see the console.\"));class ErrorBoundary extends ze.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:da},children:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}constructor(...e){super(...e),this.state={hasError:!1,error:null}}componentDidCatch(e,t){this.props.fn.componentDidCatch(e,t)}render(){const{getComponent:e,targetName:t,children:r}=this.props;if(this.state.hasError){const r=e(\"Fallback\");return ze.default.createElement(r,{name:t})}return r}}var pa=ErrorBoundary;var safe_render=({componentList:e=[],fullOverride:t=!1}={})=>({getSystem:r})=>{const n=t?e:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...e],a=(0,ua.default)(n,Array(n.length).fill(((e,{fn:t})=>t.withErrorBoundary(e))));return{fn:{componentDidCatch:da,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:pa,Fallback:fallback},wrapComponents:a}};class App extends ze.default.Component{getLayout(){const{getComponent:e,layoutSelectors:t}=this.props,r=t.current(),n=e(r,!0);return n||(()=>ze.default.createElement(\"h1\",null,' No layout defined for \"',r,'\" '))}render(){const e=this.getLayout();return ze.default.createElement(e,null)}}var ma=App;class AuthorizationPopup extends ze.default.Component{close=()=>{let{authActions:e}=this.props;e.showDefinitions(!1)};render(){let{authSelectors:e,authActions:t,getComponent:r,errSelectors:n,specSelectors:a,fn:{AST:o={}}}=this.props,s=e.shownDefinitions();const l=r(\"auths\"),i=r(\"CloseIcon\");return ze.default.createElement(\"div\",{className:\"dialog-ux\"},ze.default.createElement(\"div\",{className:\"backdrop-ux\"}),ze.default.createElement(\"div\",{className:\"modal-ux\"},ze.default.createElement(\"div\",{className:\"modal-dialog-ux\"},ze.default.createElement(\"div\",{className:\"modal-ux-inner\"},ze.default.createElement(\"div\",{className:\"modal-ux-header\"},ze.default.createElement(\"h3\",null,\"Available authorizations\"),ze.default.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},ze.default.createElement(i,null))),ze.default.createElement(\"div\",{className:\"modal-ux-content\"},s.valueSeq().map(((s,i)=>ze.default.createElement(l,{key:i,AST:o,definitions:s,getComponent:r,errSelectors:n,authSelectors:e,authActions:t,specSelectors:a}))))))))}}class AuthorizeBtn extends ze.default.Component{render(){let{isAuthorized:e,showPopup:t,onClick:r,getComponent:n}=this.props;const a=n(\"authorizationPopup\",!0),o=n(\"LockAuthIcon\",!0),s=n(\"UnlockAuthIcon\",!0);return ze.default.createElement(\"div\",{className:\"auth-wrapper\"},ze.default.createElement(\"button\",{className:e?\"btn authorize locked\":\"btn authorize unlocked\",onClick:r},ze.default.createElement(\"span\",null,\"Authorize\"),e?ze.default.createElement(o,null):ze.default.createElement(s,null)),t&&ze.default.createElement(a,null))}}class AuthorizeBtnContainer extends ze.default.Component{render(){const{authActions:e,authSelectors:t,specSelectors:r,getComponent:n}=this.props,a=r.securityDefinitions(),o=t.definitionsToAuthorize(),s=n(\"authorizeBtn\");return a?ze.default.createElement(s,{onClick:()=>e.showDefinitions(o),isAuthorized:!!t.authorized().size,showPopup:!!t.shownDefinitions(),getComponent:n}):null}}class AuthorizeOperationBtn extends ze.default.Component{onClick=e=>{e.stopPropagation();let{onClick:t}=this.props;t&&t()};render(){let{isAuthorized:e,getComponent:t}=this.props;const r=t(\"LockAuthOperationIcon\",!0),n=t(\"UnlockAuthOperationIcon\",!0);return ze.default.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":e?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},e?ze.default.createElement(r,{className:\"locked\"}):ze.default.createElement(n,{className:\"unlocked\"}))}}class Auths extends ze.default.Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,n=r.map(((e,t)=>t)).toArray();this.setState(n.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(n)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:n}=this.props;const a=t(\"AuthItem\"),o=t(\"oauth2\",!0),s=t(\"Button\");let l=r.authorized(),i=e.filter(((e,t)=>!!l.get(t))),c=e.filter((e=>\"oauth2\"!==e.get(\"type\"))),u=e.filter((e=>\"oauth2\"===e.get(\"type\")));return ze.default.createElement(\"div\",{className:\"auth-container\"},!!c.size&&ze.default.createElement(\"form\",{onSubmit:this.submitAuth},c.map(((e,r)=>ze.default.createElement(a,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n}))).toArray(),ze.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},c.size===i.size?ze.default.createElement(s,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):ze.default.createElement(s,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),ze.default.createElement(s,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),u&&u.size?ze.default.createElement(\"div\",null,ze.default.createElement(\"div\",{className:\"scope-def\"},ze.default.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),ze.default.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>ze.default.createElement(\"div\",{key:t},ze.default.createElement(o,{authorized:l,schema:e,name:t})))).toArray()):null)}}class auth_item_Auths extends ze.default.Component{render(){let{schema:e,name:t,getComponent:r,onAuthChange:n,authorized:a,errSelectors:o}=this.props;const s=r(\"apiKeyAuth\"),l=r(\"basicAuth\");let i;const c=e.get(\"type\");switch(c){case\"apiKey\":i=ze.default.createElement(s,{key:t,schema:e,name:t,errSelectors:o,authorized:a,getComponent:r,onChange:n});break;case\"basic\":i=ze.default.createElement(l,{key:t,schema:e,name:t,errSelectors:o,authorized:a,getComponent:r,onChange:n});break;default:i=ze.default.createElement(\"div\",{key:t},\"Unknown security definition type \",c)}return ze.default.createElement(\"div\",{key:`${t}-jump`},i)}}class AuthError extends ze.default.Component{render(){let{error:e}=this.props,t=e.get(\"level\"),r=e.get(\"message\"),n=e.get(\"source\");return ze.default.createElement(\"div\",{className:\"errors\"},ze.default.createElement(\"b\",null,n,\" \",t),ze.default.createElement(\"span\",null,r))}}class ApiKeyAuth extends ze.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n}=this.props,a=this.getValue();this.state={name:r,schema:n,value:a}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,r=e.target.value,n=Object.assign({},this.state,{value:r});this.setState(n),t(n)};render(){let{schema:e,getComponent:t,errSelectors:r,name:n}=this.props;const a=t(\"Input\"),o=t(\"Row\"),s=t(\"Col\"),l=t(\"authError\"),i=t(\"Markdown\",!0),c=t(\"JumpToPath\",!0);let u=this.getValue(),d=r.allErrors().filter((e=>e.get(\"authId\")===n));return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,ze.default.createElement(\"code\",null,n||e.get(\"name\")),\" (apiKey)\",ze.default.createElement(c,{path:[\"securityDefinitions\",n]})),u&&ze.default.createElement(\"h6\",null,\"Authorized\"),ze.default.createElement(o,null,ze.default.createElement(i,{source:e.get(\"description\")})),ze.default.createElement(o,null,ze.default.createElement(\"p\",null,\"Name: \",ze.default.createElement(\"code\",null,e.get(\"name\")))),ze.default.createElement(o,null,ze.default.createElement(\"p\",null,\"In: \",ze.default.createElement(\"code\",null,e.get(\"in\")))),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),u?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),d.valueSeq().map(((e,t)=>ze.default.createElement(l,{error:e,key:t}))))}}class BasicAuth extends ze.default.Component{constructor(e,t){super(e,t);let{schema:r,name:n}=this.props,a=this.getValue().username;this.state={name:n,schema:r,value:a?{username:a}:{}}}getValue(){let{authorized:e,name:t}=this.props;return e&&e.getIn([t,\"value\"])||{}}onChange=e=>{let{onChange:t}=this.props,{value:r,name:n}=e.target,a=this.state.value;a[n]=r,this.setState({value:a}),t(this.state)};render(){let{schema:e,getComponent:t,name:r,errSelectors:n}=this.props;const a=t(\"Input\"),o=t(\"Row\"),s=t(\"Col\"),l=t(\"authError\"),i=t(\"JumpToPath\",!0),c=t(\"Markdown\",!0);let u=this.getValue().username,d=n.allErrors().filter((e=>e.get(\"authId\")===r));return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,\"Basic authorization\",ze.default.createElement(i,{path:[\"securityDefinitions\",r]})),u&&ze.default.createElement(\"h6\",null,\"Authorized\"),ze.default.createElement(o,null,ze.default.createElement(c,{source:e.get(\"description\")})),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),u?ze.default.createElement(\"code\",null,\" \",u,\" \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),u?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),d.valueSeq().map(((e,t)=>ze.default.createElement(l,{error:e,key:t}))))}}function Example(e){const{example:t,showValue:r,getComponent:n,getConfigs:a}=e,o=n(\"Markdown\",!0),s=n(\"highlightCode\");return t?ze.default.createElement(\"div\",{className:\"example\"},t.get(\"description\")?ze.default.createElement(\"section\",{className:\"example__section\"},ze.default.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),ze.default.createElement(\"p\",null,ze.default.createElement(o,{source:t.get(\"description\")}))):null,r&&t.has(\"value\")?ze.default.createElement(\"section\",{className:\"example__section\"},ze.default.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),ze.default.createElement(s,{getConfigs:a,value:stringify(t.get(\"value\"))})):null):null}class ExamplesSelect extends ze.default.PureComponent{static defaultProps={examples:We.default.Map({}),onSelect:(...e)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...e),currentExampleKey:null,showLabels:!0};_onSelect=(e,{isSyntheticChange:t=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(e,{isSyntheticChange:t})};_onDomSelect=e=>{if(\"function\"==typeof this.props.onSelect){const t=e.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(t,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:e,currentExampleKey:t}=this.props,r=e.get(t),n=e.keySeq().first(),a=e.get(n);return r||a||Map({})};componentDidMount(){const{onSelect:e,examples:t}=this.props;if(\"function\"==typeof e){const e=t.first(),r=t.keyOf(e);this._onSelect(r,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(e){const{currentExampleKey:t,examples:r}=e;if(r!==this.props.examples&&!r.has(t)){const e=r.first(),t=r.keyOf(e);this._onSelect(t,{isSyntheticChange:!0})}}render(){const{examples:e,currentExampleKey:t,isValueModified:r,isModifiedValueAvailable:n,showLabels:a}=this.props;return ze.default.createElement(\"div\",{className:\"examples-select\"},a?ze.default.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,ze.default.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:n&&r?\"__MODIFIED__VALUE__\":t||\"\"},n?ze.default.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,e.map(((e,t)=>ze.default.createElement(\"option\",{key:t,value:t},e.get(\"summary\")||t))).valueSeq()))}}const stringifyUnlessList=e=>We.List.isList(e)?e:stringify(e);class ExamplesSelectValueRetainer extends ze.default.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,We.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...e),updateValue:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...e)};constructor(e){super(e);const t=this._getCurrentExampleValue();this.state={[e.currentNamespace]:(0,We.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:t,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==t})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:e}=this.props;return(this.state[e]||(0,We.Map)()).toObject()};_setStateForCurrentNamespace=e=>{const{currentNamespace:t}=this.props;return this._setStateForNamespace(t,e)};_setStateForNamespace=(e,t)=>{const r=(this.state[e]||(0,We.Map)()).mergeDeep(t);return this.setState({[e]:r})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:e}=this.props;return this._getCurrentExampleValue()===e};_getValueForExample=(e,t)=>{const{examples:r}=t||this.props;return stringifyUnlessList((r||(0,We.Map)({})).getIn([e,\"value\"]))};_getCurrentExampleValue=e=>{const{currentKey:t}=e||this.props;return this._getValueForExample(t,e||this.props)};_onExamplesSelect=(e,{isSyntheticChange:t}={},...r)=>{const{onSelect:n,updateValue:a,currentUserInputValue:o,userHasEditedBody:s}=this.props,{lastUserEditedValue:l}=this._getStateForCurrentNamespace(),i=this._getValueForExample(e);if(\"__MODIFIED__VALUE__\"===e)return a(stringifyUnlessList(l)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof n&&n(e,{isSyntheticChange:t},...r),this._setStateForCurrentNamespace({lastDownstreamValue:i,isModifiedValueSelected:t&&s||!!o&&o!==i}),t||\"function\"==typeof a&&a(stringifyUnlessList(i))};UNSAFE_componentWillReceiveProps(e){const{currentUserInputValue:t,examples:r,onSelect:n,userHasEditedBody:a}=e,{lastUserEditedValue:o,lastDownstreamValue:s}=this._getStateForCurrentNamespace(),l=this._getValueForExample(e.currentKey,e),i=r.filter((e=>e.get(\"value\")===t||stringify(e.get(\"value\"))===t));if(i.size){let t;t=i.has(e.currentKey)?e.currentKey:i.keySeq().first(),n(t,{isSyntheticChange:!0})}else t!==this.props.currentUserInputValue&&t!==o&&t!==s&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(e.currentNamespace,{lastUserEditedValue:e.currentUserInputValue,isModifiedValueSelected:a||t!==l}))}render(){const{currentUserInputValue:e,examples:t,currentKey:r,getComponent:n,userHasEditedBody:a}=this.props,{lastDownstreamValue:o,lastUserEditedValue:s,isModifiedValueSelected:l}=this._getStateForCurrentNamespace(),i=n(\"ExamplesSelect\");return ze.default.createElement(i,{examples:t,currentExampleKey:r,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!s&&s!==o,isValueModified:void 0!==e&&l&&e!==this._getCurrentExampleValue()||a})}}function oauth2_authorize_authorize({auth:e,authActions:t,errActions:r,configs:n,authConfigs:a={},currentServer:o}){let{schema:s,scopes:l,name:i,clientId:c}=e,u=s.get(\"flow\"),d=[];switch(u){case\"password\":return void t.authorizePassword(e);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void t.authorizeApplication(e);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":d.push(\"response_type=code\");break;case\"implicit\":d.push(\"response_type=token\")}\"string\"==typeof c&&d.push(\"client_id=\"+encodeURIComponent(c));let p=n.oauth2RedirectUrl;if(void 0===p)return void r.newAuthErr({authId:i,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});d.push(\"redirect_uri=\"+encodeURIComponent(p));let m=[];if(Array.isArray(l)?m=l:We.default.List.isList(l)&&(m=l.toArray()),m.length>0){let e=a.scopeSeparator||\" \";d.push(\"scope=\"+encodeURIComponent(m.join(e)))}let f=btoa(new Date);if(d.push(\"state=\"+encodeURIComponent(f)),void 0!==a.realm&&d.push(\"realm=\"+encodeURIComponent(a.realm)),(\"authorizationCode\"===u||\"authorization_code\"===u||\"accessCode\"===u)&&a.usePkceWithAuthorizationCodeGrant){const t=function generateCodeVerifier(){return b64toB64UrlEncoded(mt()(32).toString(\"base64\"))}(),r=function createCodeChallenge(e){return b64toB64UrlEncoded(gt()(\"sha256\").update(e).digest(\"base64\"))}(t);d.push(\"code_challenge=\"+r),d.push(\"code_challenge_method=S256\"),e.codeVerifier=t}let{additionalQueryStringParams:h}=a;for(let e in h)void 0!==h[e]&&d.push([e,h[e]].map(encodeURIComponent).join(\"=\"));const g=s.get(\"authorizationUrl\");let y;y=o?(0,bt.default)(sanitizeUrl(g),o,!0).toString():sanitizeUrl(g);let S,_=[y,d.join(\"&\")].join(-1===g.indexOf(\"?\")?\"?\":\"&\");S=\"implicit\"===u?t.preAuthorizeImplicit:a.useBasicAuthenticationWithAccessCodeGrant?t.authorizeAccessCodeWithBasicAuthentication:t.authorizeAccessCodeWithFormParams,t.authPopup(_,{auth:e,state:f,redirectUrl:p,callback:S,errCb:r.newAuthErr})}class Oauth2 extends ze.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n,authorized:a,authSelectors:o}=this.props,s=a&&a.get(r),l=o.getConfigs()||{},i=s&&s.get(\"username\")||\"\",c=s&&s.get(\"clientId\")||l.clientId||\"\",u=s&&s.get(\"clientSecret\")||l.clientSecret||\"\",d=s&&s.get(\"passwordType\")||\"basic\",p=s&&s.get(\"scopes\")||l.scopes||[];\"string\"==typeof p&&(p=p.split(l.scopeSeparator||\" \")),this.state={appName:l.appName,name:r,schema:n,scopes:p,clientId:c,clientSecret:u,username:i,password:\"\",passwordType:d}}close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};authorize=()=>{let{authActions:e,errActions:t,getConfigs:r,authSelectors:n,oas3Selectors:a}=this.props,o=r(),s=n.getConfigs();t.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:a.serverEffectiveValue(a.selectedServer()),authActions:e,errActions:t,configs:o,authConfigs:s})};onScopeChange=e=>{let{target:t}=e,{checked:r}=t,n=t.dataset.value;if(r&&-1===this.state.scopes.indexOf(n)){let e=this.state.scopes.concat([n]);this.setState({scopes:e})}else!r&&this.state.scopes.indexOf(n)>-1&&this.setState({scopes:this.state.scopes.filter((e=>e!==n))})};onInputChange=e=>{let{target:{dataset:{name:t},value:r}}=e,n={[t]:r};this.setState(n)};selectScopes=e=>{e.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=e=>{e.preventDefault();let{authActions:t,errActions:r,name:n}=this.props;r.clear({authId:n,type:\"auth\",source:\"auth\"}),t.logoutWithPersistOption([n])};render(){let{schema:e,getComponent:t,authSelectors:r,errSelectors:n,name:a,specSelectors:o}=this.props;const s=t(\"Input\"),l=t(\"Row\"),i=t(\"Col\"),c=t(\"Button\"),u=t(\"authError\"),d=t(\"JumpToPath\",!0),p=t(\"Markdown\",!0),m=t(\"InitializedInput\"),{isOAS3:f}=o;let h=f()?e.get(\"openIdConnectUrl\"):null;const g=\"implicit\",y=\"password\",S=f()?h?\"authorization_code\":\"authorizationCode\":\"accessCode\",_=f()?h?\"client_credentials\":\"clientCredentials\":\"application\";let v=!!(r.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,b=e.get(\"flow\"),w=b===S&&v?b+\" with PKCE\":b,C=e.get(\"allowedScopes\")||e.get(\"scopes\"),x=!!r.authorized().get(a),k=n.allErrors().filter((e=>e.get(\"authId\")===a)),O=!k.filter((e=>\"validation\"===e.get(\"source\"))).size,N=e.get(\"description\");return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,a,\" (OAuth2, \",w,\") \",ze.default.createElement(d,{path:[\"securityDefinitions\",a]})),this.state.appName?ze.default.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,N&&ze.default.createElement(p,{source:e.get(\"description\")}),x&&ze.default.createElement(\"h6\",null,\"Authorized\"),h&&ze.default.createElement(\"p\",null,\"OpenID Connect URL: \",ze.default.createElement(\"code\",null,h)),(b===g||b===S)&&ze.default.createElement(\"p\",null,\"Authorization URL: \",ze.default.createElement(\"code\",null,e.get(\"authorizationUrl\"))),(b===y||b===S||b===_)&&ze.default.createElement(\"p\",null,\"Token URL:\",ze.default.createElement(\"code\",null,\" \",e.get(\"tokenUrl\"))),ze.default.createElement(\"p\",{className:\"flow\"},\"Flow: \",ze.default.createElement(\"code\",null,w)),b!==y?null:ze.default.createElement(l,null,ze.default.createElement(l,null,ze.default.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),x?ze.default.createElement(\"code\",null,\" \",this.state.username,\" \"):ze.default.createElement(i,{tablet:10,desktop:10},ze.default.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),ze.default.createElement(l,null,ze.default.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),x?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(i,{tablet:10,desktop:10},ze.default.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),ze.default.createElement(l,null,ze.default.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),x?ze.default.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):ze.default.createElement(i,{tablet:10,desktop:10},ze.default.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},ze.default.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),ze.default.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(b===_||b===g||b===S||b===y)&&(!x||x&&this.state.clientId)&&ze.default.createElement(l,null,ze.default.createElement(\"label\",{htmlFor:`client_id_${b}`},\"client_id:\"),x?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(i,{tablet:10,desktop:10},ze.default.createElement(m,{id:`client_id_${b}`,type:\"text\",required:b===y,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(b===_||b===S||b===y)&&ze.default.createElement(l,null,ze.default.createElement(\"label\",{htmlFor:`client_secret_${b}`},\"client_secret:\"),x?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(i,{tablet:10,desktop:10},ze.default.createElement(m,{id:`client_secret_${b}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!x&&C&&C.size?ze.default.createElement(\"div\",{className:\"scopes\"},ze.default.createElement(\"h2\",null,\"Scopes:\",ze.default.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),ze.default.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),C.map(((e,t)=>ze.default.createElement(l,{key:t},ze.default.createElement(\"div\",{className:\"checkbox\"},ze.default.createElement(s,{\"data-value\":t,id:`${t}-${b}-checkbox-${this.state.name}`,disabled:x,checked:this.state.scopes.includes(t),type:\"checkbox\",onChange:this.onScopeChange}),ze.default.createElement(\"label\",{htmlFor:`${t}-${b}-checkbox-${this.state.name}`},ze.default.createElement(\"span\",{className:\"item\"}),ze.default.createElement(\"div\",{className:\"text\"},ze.default.createElement(\"p\",{className:\"name\"},t),ze.default.createElement(\"p\",{className:\"description\"},e))))))).toArray()):null,k.valueSeq().map(((e,t)=>ze.default.createElement(u,{error:e,key:t}))),ze.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},O&&(x?ze.default.createElement(c,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):ze.default.createElement(c,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),ze.default.createElement(c,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends ze.Component{onClick=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearResponse(t,r),e.clearRequest(t,r)};render(){return ze.default.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const Headers=({headers:e})=>ze.default.createElement(\"div\",null,ze.default.createElement(\"h5\",null,\"Response headers\"),ze.default.createElement(\"pre\",{className:\"microlight\"},e)),Duration=({duration:e})=>ze.default.createElement(\"div\",null,ze.default.createElement(\"h5\",null,\"Request duration\"),ze.default.createElement(\"pre\",{className:\"microlight\"},e,\" ms\"));class LiveResponse extends ze.default.Component{shouldComponentUpdate(e){return this.props.response!==e.response||this.props.path!==e.path||this.props.method!==e.method||this.props.displayRequestDuration!==e.displayRequestDuration}render(){const{response:e,getComponent:t,getConfigs:r,displayRequestDuration:n,specSelectors:a,path:o,method:s}=this.props,{showMutatedRequest:l,requestSnippetsEnabled:i}=r(),c=l?a.mutatedRequestFor(o,s):a.requestFor(o,s),u=e.get(\"status\"),d=c.get(\"url\"),p=e.get(\"headers\").toJS(),m=e.get(\"notDocumented\"),f=e.get(\"error\"),h=e.get(\"text\"),g=e.get(\"duration\"),y=Object.keys(p),S=p[\"content-type\"]||p[\"Content-Type\"],_=t(\"responseBody\"),v=y.map((e=>{var t=Array.isArray(p[e])?p[e].join():p[e];return ze.default.createElement(\"span\",{className:\"headerline\",key:e},\" \",e,\": \",t,\" \")})),b=0!==v.length,w=t(\"Markdown\",!0),C=t(\"RequestSnippets\",!0),x=t(\"curl\");return ze.default.createElement(\"div\",null,c&&(!0===i||\"true\"===i?ze.default.createElement(C,{request:c}):ze.default.createElement(x,{request:c,getConfigs:r})),d&&ze.default.createElement(\"div\",null,ze.default.createElement(\"div\",{className:\"request-url\"},ze.default.createElement(\"h4\",null,\"Request URL\"),ze.default.createElement(\"pre\",{className:\"microlight\"},d))),ze.default.createElement(\"h4\",null,\"Server response\"),ze.default.createElement(\"table\",{className:\"responses-table live-responses-table\"},ze.default.createElement(\"thead\",null,ze.default.createElement(\"tr\",{className:\"responses-header\"},ze.default.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),ze.default.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),ze.default.createElement(\"tbody\",null,ze.default.createElement(\"tr\",{className:\"response\"},ze.default.createElement(\"td\",{className:\"response-col_status\"},u,m?ze.default.createElement(\"div\",{className:\"response-undocumented\"},ze.default.createElement(\"i\",null,\" Undocumented \")):null),ze.default.createElement(\"td\",{className:\"response-col_description\"},f?ze.default.createElement(w,{source:`${\"\"!==e.get(\"name\")?`${e.get(\"name\")}: `:\"\"}${e.get(\"message\")}`}):null,h?ze.default.createElement(_,{content:h,contentType:S,url:d,headers:p,getConfigs:r,getComponent:t}):null,b?ze.default.createElement(Headers,{headers:v}):null,n&&g?ze.default.createElement(Duration,{duration:g}):null)))))}}class OnlineValidatorBadge extends ze.default.Component{constructor(e,t){super(e,t);let{getConfigs:r}=e,{validatorUrl:n}=r();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===n?\"https://validator.swagger.io/validator\":n}}getDefinitionUrl=()=>{let{specSelectors:e}=this.props;return new bt.default(e.url(),at.location).toString()};UNSAFE_componentWillReceiveProps(e){let{getConfigs:t}=e,{validatorUrl:r}=t();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===r?\"https://validator.swagger.io/validator\":r})}render(){let{getConfigs:e}=this.props,{spec:t}=e(),r=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof t&&Object.keys(t).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?ze.default.createElement(\"span\",{className:\"float-right\"},ze.default.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${r}/debug?url=${encodeURIComponent(this.state.url)}`},ze.default.createElement(ValidatorImage,{src:`${r}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends ze.default.Component{constructor(e){super(e),this.state={loaded:!1,error:!1}}componentDidMount(){const e=new Image;e.onload=()=>{this.setState({loaded:!0})},e.onerror=()=>{this.setState({error:!0})},e.src=this.props.src}UNSAFE_componentWillReceiveProps(e){if(e.src!==this.props.src){const t=new Image;t.onload=()=>{this.setState({loaded:!0})},t.onerror=()=>{this.setState({error:!0})},t.src=e.src}}render(){return this.state.error?ze.default.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?ze.default.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends ze.default.Component{render(){let{specSelectors:e}=this.props;const t=e.taggedOperations();return 0===t.size?ze.default.createElement(\"h3\",null,\" No operations defined in spec!\"):ze.default.createElement(\"div\",null,t.map(this.renderOperationTag).toArray(),t.size<1?ze.default.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(e,t)=>{const{specSelectors:r,getComponent:n,oas3Selectors:a,layoutSelectors:o,layoutActions:s,getConfigs:l}=this.props,i=r.validOperationMethods(),c=n(\"OperationContainer\",!0),u=n(\"OperationTag\"),d=e.get(\"operations\");return ze.default.createElement(u,{key:\"operation-\"+t,tagObj:e,tag:t,oas3Selectors:a,layoutSelectors:o,layoutActions:s,getConfigs:l,getComponent:n,specUrl:r.url()},ze.default.createElement(\"div\",{className:\"operation-tag-content\"},d.map((e=>{const r=e.get(\"path\"),n=e.get(\"method\"),a=We.default.List([\"paths\",r,n]);return-1===i.indexOf(n)?null:ze.default.createElement(c,{key:`${r}-${n}`,specPath:a,op:e,path:r,method:n,tag:t})})).toArray()))}}function isAbsoluteUrl(e){return e.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(e,t){return e?isAbsoluteUrl(e)?function addProtocol(e){return e.match(/^\\/\\//i)?`${window.location.protocol}${e}`:e}(e):new URL(e,t).href:t}function safeBuildUrl(e,t,{selectedServer:r=\"\"}={}){try{return function buildUrl(e,t,{selectedServer:r=\"\"}={}){if(!e)return;if(isAbsoluteUrl(e))return e;const n=buildBaseUrl(r,t);return isAbsoluteUrl(n)?new URL(e,n).href:new URL(e,window.location.href).href}(e,t,{selectedServer:r})}catch{return}}class OperationTag extends ze.default.Component{static defaultProps={tagObj:We.default.fromJS({}),tag:\"\"};render(){const{tagObj:e,tag:t,children:r,oas3Selectors:n,layoutSelectors:a,layoutActions:o,getConfigs:s,getComponent:l,specUrl:i}=this.props;let{docExpansion:c,deepLinking:u}=s();const d=u&&\"false\"!==u,p=l(\"Collapse\"),m=l(\"Markdown\",!0),f=l(\"DeepLink\"),h=l(\"Link\"),g=l(\"ArrowUpIcon\"),y=l(\"ArrowDownIcon\");let S,_=e.getIn([\"tagDetails\",\"description\"],null),v=e.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),b=e.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);S=isFunc(n)&&isFunc(n.selectedServer)?safeBuildUrl(b,i,{selectedServer:n.selectedServer()}):b;let w=[\"operations-tag\",t],C=a.isShown(w,\"full\"===c||\"list\"===c);return ze.default.createElement(\"div\",{className:C?\"opblock-tag-section is-open\":\"opblock-tag-section\"},ze.default.createElement(\"h3\",{onClick:()=>o.show(w,!C),className:_?\"opblock-tag\":\"opblock-tag no-desc\",id:w.map((e=>escapeDeepLinkPath(e))).join(\"-\"),\"data-tag\":t,\"data-is-open\":C},ze.default.createElement(f,{enabled:d,isShown:C,path:createDeepLinkPath(t),text:t}),_?ze.default.createElement(\"small\",null,ze.default.createElement(m,{source:_})):ze.default.createElement(\"small\",null),S?ze.default.createElement(\"div\",{className:\"info__externaldocs\"},ze.default.createElement(\"small\",null,ze.default.createElement(h,{href:sanitizeUrl(S),onClick:e=>e.stopPropagation(),target:\"_blank\"},v||S))):null,ze.default.createElement(\"button\",{\"aria-expanded\":C,className:\"expand-operation\",title:C?\"Collapse operation\":\"Expand operation\",onClick:()=>o.show(w,!C)},C?ze.default.createElement(g,{className:\"arrow\"}):ze.default.createElement(y,{className:\"arrow\"}))),ze.default.createElement(p,{isOpened:C},r))}}var fa;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}var rolling_load=e=>ze.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},e),fa||(fa=ze.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},ze.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"}))));class Operation extends ze.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,We.List)(),summary:\"\"};render(){let{specPath:e,response:t,request:r,toggleShown:n,onTryoutClick:a,onResetClick:o,onCancelClick:s,onExecute:l,fn:i,getComponent:c,getConfigs:u,specActions:d,specSelectors:p,authActions:m,authSelectors:f,oas3Actions:h,oas3Selectors:g}=this.props,y=this.props.operation,{deprecated:S,isShown:_,path:v,method:b,op:w,tag:C,operationId:x,allowTryItOut:k,displayRequestDuration:O,tryItOutEnabled:N,executeInProgress:A}=y.toJS(),{description:I,externalDocs:R,schemes:B}=w;const T=R?safeBuildUrl(R.url,p.url(),{selectedServer:g.selectedServer()}):\"\";let j=y.getIn([\"op\"]),P=j.get(\"responses\"),M=function getList(e,t){if(!We.default.Iterable.isIterable(e))return We.default.List();let r=e.getIn(Array.isArray(t)?t:[t]);return We.default.List.isList(r)?r:We.default.List()}(j,[\"parameters\"]),q=p.operationScheme(v,b),L=[\"operations\",C,x],D=getExtensions(j);const U=c(\"responses\"),$=c(\"parameters\"),J=c(\"execute\"),V=c(\"clear\"),K=c(\"Collapse\"),z=c(\"Markdown\",!0),F=c(\"schemes\"),W=c(\"OperationServers\"),H=c(\"OperationExt\"),G=c(\"OperationSummary\"),X=c(\"Link\"),{showExtensions:Y}=u();if(P&&t&&t.size>0){let e=!P.get(String(t.get(\"status\")))&&!P.get(\"default\");t=t.set(\"notDocumented\",e)}let Q=[v,b];const Z=p.validationErrors([v,b]);return ze.default.createElement(\"div\",{className:S?\"opblock opblock-deprecated\":_?`opblock opblock-${b} is-open`:`opblock opblock-${b}`,id:escapeDeepLinkPath(L.join(\"-\"))},ze.default.createElement(G,{operationProps:y,isShown:_,toggleShown:n,getComponent:c,authActions:m,authSelectors:f,specPath:e}),ze.default.createElement(K,{isOpened:_},ze.default.createElement(\"div\",{className:\"opblock-body\"},j&&j.size||null===j?null:ze.default.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),S&&ze.default.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),I&&ze.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},ze.default.createElement(\"div\",{className:\"opblock-description\"},ze.default.createElement(z,{source:I}))),T?ze.default.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},ze.default.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),ze.default.createElement(\"div\",{className:\"opblock-external-docs\"},R.description&&ze.default.createElement(\"span\",{className:\"opblock-external-docs__description\"},ze.default.createElement(z,{source:R.description})),ze.default.createElement(X,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(T)},T))):null,j&&j.size?ze.default.createElement($,{parameters:M,specPath:e.push(\"parameters\"),operation:j,onChangeKey:Q,onTryoutClick:a,onResetClick:o,onCancelClick:s,tryItOutEnabled:N,allowTryItOut:k,fn:i,getComponent:c,specActions:d,specSelectors:p,pathMethod:[v,b],getConfigs:u,oas3Actions:h,oas3Selectors:g}):null,N?ze.default.createElement(W,{getComponent:c,path:v,method:b,operationServers:j.get(\"servers\"),pathServers:p.paths().getIn([v,\"servers\"]),getSelectedServer:g.selectedServer,setSelectedServer:h.setSelectedServer,setServerVariableValue:h.setServerVariableValue,getServerVariable:g.serverVariableValue,getEffectiveServerValue:g.serverEffectiveValue}):null,N&&k&&B&&B.size?ze.default.createElement(\"div\",{className:\"opblock-schemes\"},ze.default.createElement(F,{schemes:B,path:v,method:b,specActions:d,currentScheme:q})):null,!N||!k||Z.length<=0?null:ze.default.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",ze.default.createElement(\"ul\",null,Z.map(((e,t)=>ze.default.createElement(\"li\",{key:t},\" \",e,\" \"))))),ze.default.createElement(\"div\",{className:N&&t&&k?\"btn-group\":\"execute-wrapper\"},N&&k?ze.default.createElement(J,{operation:j,specActions:d,specSelectors:p,oas3Selectors:g,oas3Actions:h,path:v,method:b,onExecute:l,disabled:A}):null,N&&t&&k?ze.default.createElement(V,{specActions:d,path:v,method:b}):null),A?ze.default.createElement(\"div\",{className:\"loading-container\"},ze.default.createElement(\"div\",{className:\"loading\"})):null,P?ze.default.createElement(U,{responses:P,request:r,tryItOutResponse:t,getComponent:c,getConfigs:u,specSelectors:p,oas3Actions:h,oas3Selectors:g,specActions:d,produces:p.producesOptionsFor([v,b]),producesValue:p.currentProducesFor([v,b]),specPath:e.push(\"responses\"),path:v,method:b,displayRequestDuration:O,fn:i}):null,Y&&D.size?ze.default.createElement(H,{extensions:D,getComponent:c}):null)))}}class OperationContainer extends ze.PureComponent{constructor(e,t){super(e,t);const{tryItOutEnabled:r}=e.getConfigs();this.state={tryItOutEnabled:!0===r||\"true\"===r,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(e,t){const{op:r,layoutSelectors:n,getConfigs:a}=t,{docExpansion:o,deepLinking:s,displayOperationId:l,displayRequestDuration:i,supportedSubmitMethods:c}=a(),u=n.showSummary(),d=r.getIn([\"operation\",\"__originalOperationId\"])||r.getIn([\"operation\",\"operationId\"])||(0,sa.opId)(r.get(\"operation\"),t.path,t.method)||r.get(\"id\"),p=[\"operations\",t.tag,d],m=s&&\"false\"!==s,f=c.indexOf(t.method)>=0&&(void 0===t.allowTryItOut?t.specSelectors.allowTryItOutFor(t.path,t.method):t.allowTryItOut),h=r.getIn([\"operation\",\"security\"])||t.specSelectors.security();return{operationId:d,isDeepLinkingEnabled:m,showSummary:u,displayOperationId:l,displayRequestDuration:i,allowTryItOut:f,security:h,isAuthorized:t.authSelectors.isAuthorized(h),isShown:n.isShown(p,\"full\"===o),jumpToKey:`paths.${t.path}.${t.method}`,response:t.specSelectors.responseFor(t.path,t.method),request:t.specSelectors.requestFor(t.path,t.method)}}componentDidMount(){const{isShown:e}=this.props,t=this.getResolvedSubtree();e&&void 0===t&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(e){const{response:t,isShown:r}=e,n=this.getResolvedSubtree();t!==this.props.response&&this.setState({executeInProgress:!1}),r&&void 0===n&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:e,tag:t,operationId:r,isShown:n}=this.props;const a=this.getResolvedSubtree();n||void 0!==a||this.requestResolvedSubtree(),e.show([\"operations\",t,r],!n)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=e=>{const t=this.props.oas3Selectors.selectDefaultRequestBodyValue(...e);this.props.oas3Actions.setRequestBodyValue({value:t,pathMethod:e})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:e,path:t,method:r,specPath:n}=this.props;return n?e.specResolvedSubtree(n.toJS()):e.specResolvedSubtree([\"paths\",t,r])};requestResolvedSubtree=()=>{const{specActions:e,path:t,method:r,specPath:n}=this.props;return n?e.requestResolvedSubtree(n.toJS()):e.requestResolvedSubtree([\"paths\",t,r])};render(){let{op:e,tag:t,path:r,method:n,security:a,isAuthorized:o,operationId:s,showSummary:l,isShown:i,jumpToKey:c,allowTryItOut:u,response:d,request:p,displayOperationId:m,displayRequestDuration:f,isDeepLinkingEnabled:h,specPath:g,specSelectors:y,specActions:S,getComponent:_,getConfigs:v,layoutSelectors:b,layoutActions:w,authActions:C,authSelectors:x,oas3Actions:k,oas3Selectors:O,fn:N}=this.props;const A=_(\"operation\"),I=this.getResolvedSubtree()||(0,We.Map)(),R=(0,We.fromJS)({op:I,tag:t,path:r,summary:e.getIn([\"operation\",\"summary\"])||\"\",deprecated:I.get(\"deprecated\")||e.getIn([\"operation\",\"deprecated\"])||!1,method:n,security:a,isAuthorized:o,operationId:s,originalOperationId:I.getIn([\"operation\",\"__originalOperationId\"]),showSummary:l,isShown:i,jumpToKey:c,allowTryItOut:u,request:p,displayOperationId:m,displayRequestDuration:f,isDeepLinkingEnabled:h,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return ze.default.createElement(A,{operation:R,response:d,request:p,isShown:i,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:g,specActions:S,specSelectors:y,oas3Actions:k,oas3Selectors:O,layoutActions:w,layoutSelectors:b,authActions:C,authSelectors:x,getComponent:_,getConfigs:v,fn:N})}}var ha=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ue.default}});class OperationSummary extends ze.PureComponent{static defaultProps={operationProps:null,specPath:(0,We.List)(),summary:\"\"};render(){let{isShown:e,toggleShown:t,getComponent:r,authActions:n,authSelectors:a,operationProps:o,specPath:s}=this.props,{summary:l,isAuthorized:i,method:c,op:u,showSummary:d,path:p,operationId:m,originalOperationId:f,displayOperationId:h}=o.toJS(),{summary:g}=u,y=o.get(\"security\");const S=r(\"authorizeOperationBtn\",!0),_=r(\"OperationSummaryMethod\"),v=r(\"OperationSummaryPath\"),b=r(\"JumpToPath\",!0),w=r(\"CopyToClipboardBtn\",!0),C=r(\"ArrowUpIcon\"),x=r(\"ArrowDownIcon\"),k=y&&!!y.count(),O=k&&1===y.size&&y.first().isEmpty(),N=!k||O;return ze.default.createElement(\"div\",{className:`opblock-summary opblock-summary-${c}`},ze.default.createElement(\"button\",{\"aria-expanded\":e,className:\"opblock-summary-control\",onClick:t},ze.default.createElement(_,{method:c}),ze.default.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},ze.default.createElement(v,{getComponent:r,operationProps:o,specPath:s}),d?ze.default.createElement(\"div\",{className:\"opblock-summary-description\"},(0,ha.default)(g||l)):null),h&&(f||m)?ze.default.createElement(\"span\",{className:\"opblock-summary-operation-id\"},f||m):null),ze.default.createElement(w,{textToCopy:`${s.get(1)}`}),N?null:ze.default.createElement(S,{isAuthorized:i,onClick:()=>{const e=a.definitionsForRequirements(y);n.showDefinitions(e)}}),ze.default.createElement(b,{path:s}),ze.default.createElement(\"button\",{\"aria-label\":`${c} ${p.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":e,tabIndex:\"-1\",onClick:t},e?ze.default.createElement(C,{className:\"arrow\"}):ze.default.createElement(x,{className:\"arrow\"})))}}class OperationSummaryMethod extends ze.PureComponent{static defaultProps={operationProps:null};render(){let{method:e}=this.props;return ze.default.createElement(\"span\",{className:\"opblock-summary-method\"},e.toUpperCase())}}class OperationSummaryPath extends ze.PureComponent{render(){let{getComponent:e,operationProps:t}=this.props,{deprecated:r,isShown:n,path:a,tag:o,operationId:s,isDeepLinkingEnabled:l}=t.toJS();const i=a.split(/(?=\\/)/g);for(let e=1;e<i.length;e+=2)i.splice(e,0,ze.default.createElement(\"wbr\",{key:e}));const c=e(\"DeepLink\");return ze.default.createElement(\"span\",{className:r?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":a},ze.default.createElement(c,{enabled:l,isShown:n,path:createDeepLinkPath(`${o}/${s}`),text:i}))}}var operation_extensions=({extensions:e,getComponent:t})=>{let r=t(\"OperationExtRow\");return ze.default.createElement(\"div\",{className:\"opblock-section\"},ze.default.createElement(\"div\",{className:\"opblock-section-header\"},ze.default.createElement(\"h4\",null,\"Extensions\")),ze.default.createElement(\"div\",{className:\"table-container\"},ze.default.createElement(\"table\",null,ze.default.createElement(\"thead\",null,ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",{className:\"col_header\"},\"Field\"),ze.default.createElement(\"td\",{className:\"col_header\"},\"Value\"))),ze.default.createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>ze.default.createElement(r,{key:`${e}-${t}`,xKey:e,xVal:t})))))))};var operation_extension_row=({xKey:e,xVal:t})=>{const r=t?t.toJS?t.toJS():t:null;return ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,e),ze.default.createElement(\"td\",null,JSON.stringify(r)))},ga=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return de.default}}),ya=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return pe.default}});var highlight_code=({value:e,fileName:t=\"response.txt\",className:r,downloadable:n,getConfigs:a,canCopy:o,language:s})=>{const l=(0,ut.default)(a)?a():null,i=!1!==(0,Qt.default)(l,\"syntaxHighlight\")&&(0,Qt.default)(l,\"syntaxHighlight.activated\",!0),c=(0,ze.useRef)(null);(0,ze.useEffect)((()=>{const e=Array.from(c.current.childNodes).filter((e=>!!e.nodeType&&e.classList.contains(\"microlight\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e,r,s]);const handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:n,offsetHeight:a,scrollTop:o}=t;n>a&&(0===o&&r<0||a+o>=n&&r>0)&&e.preventDefault()};return ze.default.createElement(\"div\",{className:\"highlight-code\",ref:c},o&&ze.default.createElement(\"div\",{className:\"copy-to-clipboard\"},ze.default.createElement(fr.CopyToClipboard,{text:e},ze.default.createElement(\"button\",null))),n?ze.default.createElement(\"button\",{className:\"download-contents\",onClick:()=>{(0,ya.default)(e,t)}},\"Download\"):null,i?ze.default.createElement(hr.default,{language:s,className:(0,ga.default)(r,\"microlight\"),style:getStyle((0,Qt.default)(l,\"syntaxHighlight.theme\",\"agate\"))},e):ze.default.createElement(\"pre\",{className:(0,ga.default)(r,\"microlight\")},e))};function createHtmlReadyId(e,t=\"_\"){return e.replace(/[^\\w-]/g,t)}class Responses extends ze.default.Component{static defaultProps={tryItOutResponse:null,produces:(0,We.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);onResponseContentTypeChange=({controlsAcceptHeader:e,value:t})=>{const{oas3Actions:r,path:n,method:a}=this.props;e&&r.setResponseContentType({value:t,path:n,method:a})};render(){let{responses:e,tryItOutResponse:t,getComponent:r,getConfigs:n,specSelectors:a,fn:o,producesValue:s,displayRequestDuration:l,specPath:i,path:c,method:u,oas3Selectors:d,oas3Actions:p}=this.props,m=function defaultStatusCode(e){let t=e.keySeq();return t.contains(St)?St:t.filter((e=>\"2\"===(e+\"\")[0])).sort().first()}(e);const f=r(\"contentType\"),h=r(\"liveResponse\"),g=r(\"response\");let y=this.props.produces&&this.props.produces.size?this.props.produces:Responses.defaultProps.produces;const S=a.isOAS3()?function getAcceptControllingResponse(e){if(!We.default.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;const t=e.find(((e,t)=>t.startsWith(\"2\")&&Object.keys(e.get(\"content\")||{}).length>0)),r=e.get(\"default\")||We.default.OrderedMap(),n=(r.get(\"content\")||We.default.OrderedMap()).keySeq().toJS().length?r:null;return t||n}(e):null,_=createHtmlReadyId(`${u}${c}_responses`),v=`${_}_select`;return ze.default.createElement(\"div\",{className:\"responses-wrapper\"},ze.default.createElement(\"div\",{className:\"opblock-section-header\"},ze.default.createElement(\"h4\",null,\"Responses\"),a.isOAS3()?null:ze.default.createElement(\"label\",{htmlFor:v},ze.default.createElement(\"span\",null,\"Response content type\"),ze.default.createElement(f,{value:s,ariaControls:_,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:y,controlId:v,onChange:this.onChangeProducesWrapper}))),ze.default.createElement(\"div\",{className:\"responses-inner\"},t?ze.default.createElement(\"div\",null,ze.default.createElement(h,{response:t,getComponent:r,getConfigs:n,specSelectors:a,path:this.props.path,method:this.props.method,displayRequestDuration:l}),ze.default.createElement(\"h4\",null,\"Responses\")):null,ze.default.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:_,role:\"region\"},ze.default.createElement(\"thead\",null,ze.default.createElement(\"tr\",{className:\"responses-header\"},ze.default.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),ze.default.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),a.isOAS3()?ze.default.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),ze.default.createElement(\"tbody\",null,e.entrySeq().map((([e,l])=>{let f=t&&t.get(\"status\")==e?\"response_current\":\"\";return ze.default.createElement(g,{key:e,path:c,method:u,specPath:i.push(e),isDefault:m===e,fn:o,className:f,code:e,response:l,specSelectors:a,controlsAcceptHeader:l===S,onContentTypeChange:this.onResponseContentTypeChange,contentType:s,getConfigs:n,activeExamplesKey:d.activeExamplesMember(c,u,\"responses\",e),oas3Actions:p,getComponent:r})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(e){return function canJsonParse(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?\"json\":null}class Response extends ze.default.Component{constructor(e,t){super(e,t),this.state={responseContentType:\"\"}}static defaultProps={response:(0,We.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=e=>{const{onContentTypeChange:t,controlsAcceptHeader:r}=this.props;this.setState({responseContentType:e}),t({value:e,controlsAcceptHeader:r})};getTargetExamplesKey=()=>{const{response:e,contentType:t,activeExamplesKey:r}=this.props,n=this.state.responseContentType||t,a=e.getIn([\"content\",n],(0,We.Map)({})).get(\"examples\",null).keySeq().first();return r||a};render(){let{path:e,method:t,code:r,response:n,className:a,specPath:o,fn:s,getComponent:l,getConfigs:i,specSelectors:c,contentType:u,controlsAcceptHeader:d,oas3Actions:p}=this.props,{inferSchema:m,getSampleSchema:f}=s,h=c.isOAS3();const{showExtensions:g}=i();let y=g?getExtensions(n):null,S=n.get(\"headers\"),_=n.get(\"links\");const v=l(\"ResponseExtension\"),b=l(\"headers\"),w=l(\"highlightCode\"),C=l(\"modelExample\"),x=l(\"Markdown\",!0),k=l(\"operationLink\"),O=l(\"contentType\"),N=l(\"ExamplesSelect\"),A=l(\"Example\");var I,R;const B=this.state.responseContentType||u,T=n.getIn([\"content\",B],(0,We.Map)({})),j=T.get(\"examples\",null);if(h){const e=T.get(\"schema\");I=e?m(e.toJS()):null,R=e?(0,We.List)([\"content\",this.state.responseContentType,\"schema\"]):o}else I=n.get(\"schema\"),R=n.has(\"schema\")?o.push(\"schema\"):o;let P,M,q=!1,L={includeReadOnly:!0};if(h)if(M=T.get(\"schema\")?.toJS(),j){const e=this.getTargetExamplesKey(),getMediaTypeExample=e=>e.get(\"value\");P=getMediaTypeExample(j.get(e,(0,We.Map)({}))),void 0===P&&(P=getMediaTypeExample(j.values().next().value)),q=!0}else void 0!==T.get(\"example\")&&(P=T.get(\"example\"),q=!0);else{M=I,L={...L,includeWriteOnly:!0};const e=n.getIn([\"examples\",B]);e&&(P=e,q=!0)}const D=((e,t,r)=>{if(null==e)return null;const n=getKnownSyntaxHighlighterLanguage(e)?\"json\":null;return ze.default.createElement(\"div\",null,ze.default.createElement(t,{className:\"example\",getConfigs:r,language:n,value:stringify(e)}))})(f(M,B,L,q?P:void 0),w,i);return ze.default.createElement(\"tr\",{className:\"response \"+(a||\"\"),\"data-code\":r},ze.default.createElement(\"td\",{className:\"response-col_status\"},r),ze.default.createElement(\"td\",{className:\"response-col_description\"},ze.default.createElement(\"div\",{className:\"response-col_description__inner\"},ze.default.createElement(x,{source:n.get(\"description\")})),g&&y.size?y.entrySeq().map((([e,t])=>ze.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,h&&n.get(\"content\")?ze.default.createElement(\"section\",{className:\"response-controls\"},ze.default.createElement(\"div\",{className:(0,ga.default)(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":d})},ze.default.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),ze.default.createElement(O,{value:this.state.responseContentType,contentTypes:n.get(\"content\")?n.get(\"content\").keySeq():(0,We.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),d?ze.default.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",ze.default.createElement(\"code\",null,\"Accept\"),\" header.\"):null),j?ze.default.createElement(\"div\",{className:\"response-control-examples\"},ze.default.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),ze.default.createElement(N,{examples:j,currentExampleKey:this.getTargetExamplesKey(),onSelect:n=>p.setActiveExamplesMember({name:n,pathMethod:[e,t],contextType:\"responses\",contextName:r}),showLabels:!1})):null):null,D||I?ze.default.createElement(C,{specPath:R,getComponent:l,getConfigs:i,specSelectors:c,schema:fromJSOrdered(I),example:D,includeReadOnly:!0}):null,h&&j?ze.default.createElement(A,{example:j.get(this.getTargetExamplesKey(),(0,We.Map)({})),getComponent:l,getConfigs:i,omitValue:!0}):null,S?ze.default.createElement(b,{headers:S,getComponent:l}):null),h?ze.default.createElement(\"td\",{className:\"response-col_links\"},_?_.toSeq().entrySeq().map((([e,t])=>ze.default.createElement(k,{key:e,name:e,link:t,getComponent:l}))):ze.default.createElement(\"i\",null,\"No links\")):null)}}var response_extension=({xKey:e,xVal:t})=>ze.default.createElement(\"div\",{className:\"response__extension\"},e,\": \",String(t)),Ea=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return me.default}}),Sa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return fe.default}});class ResponseBody extends ze.default.PureComponent{state={parsedContent:null};updateParsedContent=e=>{const{content:t}=this.props;if(e!==t)if(t&&t instanceof Blob){var r=new FileReader;r.onload=()=>{this.setState({parsedContent:r.result})},r.readAsText(t)}else this.setState({parsedContent:t.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(e){this.updateParsedContent(e.content)}render(){let{content:e,contentType:t,url:r,headers:n={},getConfigs:a,getComponent:o}=this.props;const{parsedContent:s}=this.state,l=o(\"highlightCode\"),i=\"response_\"+(new Date).getTime();let c,u;if(r=r||\"\",(/^application\\/octet-stream/i.test(t)||n[\"Content-Disposition\"]&&/attachment/i.test(n[\"Content-Disposition\"])||n[\"content-disposition\"]&&/attachment/i.test(n[\"content-disposition\"])||n[\"Content-Description\"]&&/File Transfer/i.test(n[\"Content-Description\"])||n[\"content-description\"]&&/File Transfer/i.test(n[\"content-description\"]))&&(e.size>0||e.length>0))if(\"Blob\"in window){let a=t||\"text/html\",o=e instanceof Blob?e:new Blob([e],{type:a}),s=window.URL.createObjectURL(o),l=[a,r.substr(r.lastIndexOf(\"/\")+1),s].join(\":\"),i=n[\"content-disposition\"]||n[\"Content-Disposition\"];if(void 0!==i){let e=function extractFileNameFromContentDispositionHeader(e){let t;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((r=>(t=r.exec(e),null!==t))),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}(i);null!==e&&(l=e)}u=at.navigator&&at.navigator.msSaveOrOpenBlob?ze.default.createElement(\"div\",null,ze.default.createElement(\"a\",{href:s,onClick:()=>at.navigator.msSaveOrOpenBlob(o,l)},\"Download file\")):ze.default.createElement(\"div\",null,ze.default.createElement(\"a\",{href:s,download:l},\"Download file\"))}else u=ze.default.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(t)){let t=null;getKnownSyntaxHighlighterLanguage(e)&&(t=\"json\");try{c=JSON.stringify(JSON.parse(e),null,\"  \")}catch(t){c=\"can't parse JSON.  Raw result:\\n\\n\"+e}u=ze.default.createElement(l,{language:t,downloadable:!0,fileName:`${i}.json`,value:c,getConfigs:a,canCopy:!0})}else/xml/i.test(t)?(c=(0,Ea.default)(e,{textNodesOnSameLine:!0,indentor:\"  \"}),u=ze.default.createElement(l,{downloadable:!0,fileName:`${i}.xml`,value:c,getConfigs:a,canCopy:!0})):u=\"text/html\"===(0,Sa.default)(t)||/text\\/plain/.test(t)?ze.default.createElement(l,{downloadable:!0,fileName:`${i}.html`,value:e,getConfigs:a,canCopy:!0}):\"text/csv\"===(0,Sa.default)(t)||/text\\/csv/.test(t)?ze.default.createElement(l,{downloadable:!0,fileName:`${i}.csv`,value:e,getConfigs:a,canCopy:!0}):/^image\\//i.test(t)?t.includes(\"svg\")?ze.default.createElement(\"div\",null,\" \",e,\" \"):ze.default.createElement(\"img\",{src:window.URL.createObjectURL(e)}):/^audio\\//i.test(t)?ze.default.createElement(\"pre\",{className:\"microlight\"},ze.default.createElement(\"audio\",{controls:!0,key:r},ze.default.createElement(\"source\",{src:r,type:t}))):\"string\"==typeof e?ze.default.createElement(l,{downloadable:!0,fileName:`${i}.txt`,value:e,getConfigs:a,canCopy:!0}):e.size>0?s?ze.default.createElement(\"div\",null,ze.default.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),ze.default.createElement(l,{downloadable:!0,fileName:`${i}.txt`,value:s,getConfigs:a,canCopy:!0})):ze.default.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return u?ze.default.createElement(\"div\",null,ze.default.createElement(\"h5\",null,\"Response body\"),u):null}}class Parameters extends ze.Component{constructor(e){super(e),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(e,t,r)=>{let{specActions:{changeParamByIdentity:n},onChangeKey:a}=this.props;n(a,e,t,r)};onChangeConsumesWrapper=e=>{let{specActions:{changeConsumesValue:t},onChangeKey:r}=this.props;t(r,e)};toggleTab=e=>\"parameters\"===e?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===e?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:e,pathMethod:t})=>{let{specActions:r,oas3Selectors:n,oas3Actions:a}=this.props;const o=n.hasUserEditedBody(...t),s=n.shouldRetainRequestBodyValue(...t);a.setRequestContentType({value:e,pathMethod:t}),a.initRequestBodyValidateError({pathMethod:t}),o||(s||a.setRequestBodyValue({value:void 0,pathMethod:t}),r.clearResponse(...t),r.clearRequest(...t),r.clearValidateParams(t))};render(){let{onTryoutClick:e,onResetClick:t,parameters:r,allowTryItOut:n,tryItOutEnabled:a,specPath:o,fn:s,getComponent:l,getConfigs:i,specSelectors:c,specActions:u,pathMethod:d,oas3Actions:p,oas3Selectors:m,operation:f}=this.props;const h=l(\"parameterRow\"),g=l(\"TryItOutButton\"),y=l(\"contentType\"),S=l(\"Callbacks\",!0),_=l(\"RequestBody\",!0),v=a&&n,b=c.isOAS3(),w=`${createHtmlReadyId(`${d[1]}${d[0]}_requests`)}_select`,C=f.get(\"requestBody\"),x=Object.values(r.reduce(((e,t)=>{const r=t.get(\"in\");return e[r]??=[],e[r].push(t),e}),{})).reduce(((e,t)=>e.concat(t)),[]);return ze.default.createElement(\"div\",{className:\"opblock-section\"},ze.default.createElement(\"div\",{className:\"opblock-section-header\"},b?ze.default.createElement(\"div\",{className:\"tab-header\"},ze.default.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},ze.default.createElement(\"h4\",{className:\"opblock-title\"},ze.default.createElement(\"span\",null,\"Parameters\"))),f.get(\"callbacks\")?ze.default.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},ze.default.createElement(\"h4\",{className:\"opblock-title\"},ze.default.createElement(\"span\",null,\"Callbacks\"))):null):ze.default.createElement(\"div\",{className:\"tab-header\"},ze.default.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),n?ze.default.createElement(g,{isOAS3:c.isOAS3(),hasUserEditedBody:m.hasUserEditedBody(...d),enabled:a,onCancelClick:this.props.onCancelClick,onTryoutClick:e,onResetClick:()=>t(d)}):null),this.state.parametersVisible?ze.default.createElement(\"div\",{className:\"parameters-container\"},x.length?ze.default.createElement(\"div\",{className:\"table-container\"},ze.default.createElement(\"table\",{className:\"parameters\"},ze.default.createElement(\"thead\",null,ze.default.createElement(\"tr\",null,ze.default.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),ze.default.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),ze.default.createElement(\"tbody\",null,x.map(((e,t)=>ze.default.createElement(h,{fn:s,specPath:o.push(t.toString()),getComponent:l,getConfigs:i,rawParam:e,param:c.parameterWithMetaByIdentity(d,e),key:`${e.get(\"in\")}.${e.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:c,specActions:u,oas3Actions:p,oas3Selectors:m,pathMethod:d,isExecute:v})))))):ze.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},ze.default.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?ze.default.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},ze.default.createElement(S,{callbacks:(0,We.Map)(f.get(\"callbacks\")),specPath:o.slice(0,-1).push(\"callbacks\")})):null,b&&C&&this.state.parametersVisible&&ze.default.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},ze.default.createElement(\"div\",{className:\"opblock-section-header\"},ze.default.createElement(\"h4\",{className:`opblock-title parameter__name ${C.get(\"required\")&&\"required\"}`},\"Request body\"),ze.default.createElement(\"label\",{id:w},ze.default.createElement(y,{value:m.requestContentType(...d),contentTypes:C.get(\"content\",(0,We.List)()).keySeq(),onChange:e=>{this.onChangeMediaType({value:e,pathMethod:d})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:w}))),ze.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},ze.default.createElement(_,{setRetainRequestBodyValueFlag:e=>p.setRetainRequestBodyValueFlag({value:e,pathMethod:d}),userHasEditedBody:m.hasUserEditedBody(...d),specPath:o.slice(0,-1).push(\"requestBody\"),requestBody:C,requestBodyValue:m.requestBodyValue(...d),requestBodyInclusionSetting:m.requestBodyInclusionSetting(...d),requestBodyErrors:m.requestBodyErrors(...d),isExecute:v,getConfigs:i,activeExamplesKey:m.activeExamplesMember(...d,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(e,t)=>{if(t){const r=m.requestBodyValue(...d),n=We.Map.isMap(r)?r:(0,We.Map)();return p.setRequestBodyValue({pathMethod:d,value:n.setIn(t,e)})}p.setRequestBodyValue({value:e,pathMethod:d})},onChangeIncludeEmpty:(e,t)=>{p.setRequestBodyInclusion({pathMethod:d,value:t,name:e})},contentType:m.requestContentType(...d)}))))}}var parameter_extension=({xKey:e,xVal:t})=>ze.default.createElement(\"div\",{className:\"parameter__extension\"},e,\": \",String(t));const _a={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends ze.Component{static defaultProps=_a;componentDidMount(){const{isIncludedOptions:e,onChange:t}=this.props,{shouldDispatchInit:r,defaultValue:n}=e;r&&t(n)}onCheckboxChange=e=>{const{onChange:t}=this.props;t(e.target.checked)};render(){let{isIncluded:e,isDisabled:t}=this.props;return ze.default.createElement(\"div\",null,ze.default.createElement(\"label\",{htmlFor:\"include_empty_value\",className:(0,ga.default)(\"parameter__empty_value_toggle\",{disabled:t})},ze.default.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:t,checked:!t&&e,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends ze.Component{constructor(e,t){super(e,t),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(e){let t,{specSelectors:r,pathMethod:n,rawParam:a}=e,o=r.isOAS3(),s=r.parameterWithMetaByIdentity(n,a)||new We.Map;if(s=s.isEmpty()?a:s,o){let{schema:e}=getParameterSchema(s,{isOAS3:o});t=e?e.get(\"enum\"):void 0}else t=s?s.get(\"enum\"):void 0;let l,i=s?s.get(\"value\"):void 0;void 0!==i?l=i:a.get(\"required\")&&t&&t.size&&(l=t.first()),void 0!==l&&l!==i&&this.onChangeWrapper(function numberToString(e){return\"number\"==typeof e?e.toString():e}(l)),this.setDefaultValue()}onChangeWrapper=(e,t=!1)=>{let r,{onChange:n,rawParam:a}=this.props;return r=\"\"===e||e&&0===e.size?null:e,n(a,r,t)};_onExampleSelect=e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=e=>{let{specActions:t,param:r,pathMethod:n}=this.props;const a=r.get(\"name\"),o=r.get(\"in\");return t.updateEmptyParamInclusion(n,a,o,e)};setDefaultValue=()=>{let{specSelectors:e,pathMethod:t,rawParam:r,oas3Selectors:n,fn:a}=this.props;const o=e.parameterWithMetaByIdentity(t,r)||(0,We.Map)(),{schema:s}=getParameterSchema(o,{isOAS3:e.isOAS3()}),l=o.get(\"content\",(0,We.Map)()).keySeq().first(),i=s?a.getSampleSchema(s.toJS(),l,{includeWriteOnly:!0}):null;if(o&&void 0===o.get(\"value\")&&\"body\"!==o.get(\"in\")){let r;if(e.isSwagger2())r=void 0!==o.get(\"x-example\")?o.get(\"x-example\"):void 0!==o.getIn([\"schema\",\"example\"])?o.getIn([\"schema\",\"example\"]):s&&s.getIn([\"default\"]);else if(e.isOAS3()){const e=n.activeExamplesMember(...t,\"parameters\",this.getParamKey());r=void 0!==o.getIn([\"examples\",e,\"value\"])?o.getIn([\"examples\",e,\"value\"]):void 0!==o.getIn([\"content\",l,\"example\"])?o.getIn([\"content\",l,\"example\"]):void 0!==o.get(\"example\")?o.get(\"example\"):void 0!==(s&&s.get(\"example\"))?s&&s.get(\"example\"):void 0!==(s&&s.get(\"default\"))?s&&s.get(\"default\"):o.get(\"default\")}void 0===r||We.List.isList(r)||(r=stringify(r)),void 0!==r?this.onChangeWrapper(r):s&&\"object\"===s.get(\"type\")&&i&&!o.get(\"examples\")&&this.onChangeWrapper(We.List.isList(i)?i:stringify(i))}};getParamKey(){const{param:e}=this.props;return e?`${e.get(\"name\")}-${e.get(\"in\")}`:null}render(){let{param:e,rawParam:t,getComponent:r,getConfigs:n,isExecute:a,fn:o,onChangeConsumes:s,specSelectors:l,pathMethod:i,specPath:c,oas3Selectors:u}=this.props,d=l.isOAS3();const{showExtensions:p,showCommonExtensions:m}=n();if(e||(e=t),!t)return null;const f=r(\"JsonSchemaForm\"),h=r(\"ParamBody\");let g=e.get(\"in\"),y=\"body\"!==g?null:ze.default.createElement(h,{getComponent:r,getConfigs:n,fn:o,param:e,consumes:l.consumesOptionsFor(i),consumesValue:l.contentTypeValues(i).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:s,isExecute:a,specSelectors:l,pathMethod:i});const S=r(\"modelExample\"),_=r(\"Markdown\",!0),v=r(\"ParameterExt\"),b=r(\"ParameterIncludeEmpty\"),w=r(\"ExamplesSelectValueRetainer\"),C=r(\"Example\");let x,k,O,N,{schema:A}=getParameterSchema(e,{isOAS3:d}),I=l.parameterWithMetaByIdentity(i,t)||(0,We.Map)(),R=A?A.get(\"format\"):null,B=A?A.get(\"type\"):null,T=A?A.getIn([\"items\",\"type\"]):null,j=\"formData\"===g,P=\"FormData\"in at,M=e.get(\"required\"),q=I?I.get(\"value\"):\"\",L=m?getCommonExtensions(A):null,D=p?getExtensions(e):null,U=!1;return void 0!==e&&A&&(x=A.get(\"items\")),void 0!==x?(k=x.get(\"enum\"),O=x.get(\"default\")):A&&(k=A.get(\"enum\")),k&&k.size&&k.size>0&&(U=!0),void 0!==e&&(A&&(O=A.get(\"default\")),void 0===O&&(O=e.get(\"default\")),N=e.get(\"example\"),void 0===N&&(N=e.get(\"x-example\"))),ze.default.createElement(\"tr\",{\"data-param-name\":e.get(\"name\"),\"data-param-in\":e.get(\"in\")},ze.default.createElement(\"td\",{className:\"parameters-col_name\"},ze.default.createElement(\"div\",{className:M?\"parameter__name required\":\"parameter__name\"},e.get(\"name\"),M?ze.default.createElement(\"span\",null,\" *\"):null),ze.default.createElement(\"div\",{className:\"parameter__type\"},B,T&&`[${T}]`,R&&ze.default.createElement(\"span\",{className:\"prop-format\"},\"($\",R,\")\")),ze.default.createElement(\"div\",{className:\"parameter__deprecated\"},d&&e.get(\"deprecated\")?\"deprecated\":null),ze.default.createElement(\"div\",{className:\"parameter__in\"},\"(\",e.get(\"in\"),\")\"),m&&L.size?L.entrySeq().map((([e,t])=>ze.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,p&&D.size?D.entrySeq().map((([e,t])=>ze.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null),ze.default.createElement(\"td\",{className:\"parameters-col_description\"},e.get(\"description\")?ze.default.createElement(_,{source:e.get(\"description\")}):null,!y&&a||!U?null:ze.default.createElement(_,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+k.map((function(e){return e})).toArray().join(\", \")}),!y&&a||void 0===O?null:ze.default.createElement(_,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+O}),!y&&a||void 0===N?null:ze.default.createElement(_,{source:\"<i>Example</i> : \"+N}),j&&!P&&ze.default.createElement(\"div\",null,\"Error: your browser does not support FormData\"),d&&e.get(\"examples\")?ze.default.createElement(\"section\",{className:\"parameter-controls\"},ze.default.createElement(w,{examples:e.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:r,defaultToFirstExample:!0,currentKey:u.activeExamplesMember(...i,\"parameters\",this.getParamKey()),currentUserInputValue:q})):null,y?null:ze.default.createElement(f,{fn:o,getComponent:r,value:q,required:M,disabled:!a,description:e.get(\"name\"),onChange:this.onChangeWrapper,errors:I.get(\"errors\"),schema:A}),y&&A?ze.default.createElement(S,{getComponent:r,specPath:c.push(\"schema\"),getConfigs:n,isExecute:a,specSelectors:l,schema:A,example:y,includeWriteOnly:!0}):null,!y&&a&&e.get(\"allowEmptyValue\")?ze.default.createElement(b,{onChange:this.onChangeIncludeEmpty,isIncluded:l.parameterInclusionSettingFor(i,e.get(\"name\"),e.get(\"in\")),isDisabled:!isEmptyValue(q)}):null,d&&e.get(\"examples\")?ze.default.createElement(C,{example:e.getIn([\"examples\",u.activeExamplesMember(...i,\"parameters\",this.getParamKey())]),getComponent:r,getConfigs:n}):null))}}class Execute extends ze.Component{handleValidateParameters=()=>{let{specSelectors:e,specActions:t,path:r,method:n}=this.props;return t.validateParams([r,n]),e.validateBeforeExecute([r,n])};handleValidateRequestBody=()=>{let{path:e,method:t,specSelectors:r,oas3Selectors:n,oas3Actions:a}=this.props,o={missingBodyValue:!1,missingRequiredKeys:[]};a.clearRequestBodyValidateError({path:e,method:t});let s=r.getOAS3RequiredRequestBodyContentType([e,t]),l=n.requestBodyValue(e,t),i=n.validateBeforeExecute([e,t]),c=n.requestContentType(e,t);if(!i)return o.missingBodyValue=!0,a.setRequestBodyValidateError({path:e,method:t,validationErrors:o}),!1;if(!s)return!0;let u=n.validateShallowRequired({oas3RequiredRequestBodyContentType:s,oas3RequestContentType:c,oas3RequestBodyValue:l});return!u||u.length<1||(u.forEach((e=>{o.missingRequiredKeys.push(e)})),a.setRequestBodyValidateError({path:e,method:t,validationErrors:o}),!1)};handleValidationResultPass=()=>{let{specActions:e,operation:t,path:r,method:n}=this.props;this.props.onExecute&&this.props.onExecute(),e.execute({operation:t,path:r,method:n})};handleValidationResultFail=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearValidateParams([t,r]),setTimeout((()=>{e.validateParams([t,r])}),40)};handleValidationResult=e=>{e?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let e=this.handleValidateParameters(),t=this.handleValidateRequestBody(),r=e&&t;this.handleValidationResult(r)};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);render(){const{disabled:e}=this.props;return ze.default.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:e},\"Execute\")}}class headers_Headers extends ze.default.Component{render(){let{headers:e,getComponent:t}=this.props;const r=t(\"Property\"),n=t(\"Markdown\",!0);return e&&e.size?ze.default.createElement(\"div\",{className:\"headers-wrapper\"},ze.default.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),ze.default.createElement(\"table\",{className:\"headers\"},ze.default.createElement(\"thead\",null,ze.default.createElement(\"tr\",{className:\"header-row\"},ze.default.createElement(\"th\",{className:\"header-col\"},\"Name\"),ze.default.createElement(\"th\",{className:\"header-col\"},\"Description\"),ze.default.createElement(\"th\",{className:\"header-col\"},\"Type\"))),ze.default.createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>{if(!We.default.Map.isMap(t))return null;const a=t.get(\"description\"),o=t.getIn([\"schema\"])?t.getIn([\"schema\",\"type\"]):t.getIn([\"type\"]),s=t.getIn([\"schema\",\"example\"]);return ze.default.createElement(\"tr\",{key:e},ze.default.createElement(\"td\",{className:\"header-col\"},e),ze.default.createElement(\"td\",{className:\"header-col\"},a?ze.default.createElement(n,{source:a}):null),ze.default.createElement(\"td\",{className:\"header-col\"},o,\" \",s?ze.default.createElement(r,{propKey:\"Example\",propVal:s,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends ze.default.Component{render(){let{editorActions:e,errSelectors:t,layoutSelectors:r,layoutActions:n,getComponent:a}=this.props;const o=a(\"Collapse\");if(e&&e.jumpToLine)var s=e.jumpToLine;let l=t.allErrors().filter((e=>\"thrown\"===e.get(\"type\")||\"error\"===e.get(\"level\")));if(!l||l.count()<1)return null;let i=r.isShown([\"errorPane\"],!0),c=l.sortBy((e=>e.get(\"line\")));return ze.default.createElement(\"pre\",{className:\"errors-wrapper\"},ze.default.createElement(\"hgroup\",{className:\"error\"},ze.default.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),ze.default.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>n.show([\"errorPane\"],!i)},i?\"Hide\":\"Show\")),ze.default.createElement(o,{isOpened:i,animated:!0},ze.default.createElement(\"div\",{className:\"errors\"},c.map(((e,t)=>{let r=e.get(\"type\");return\"thrown\"===r||\"auth\"===r?ze.default.createElement(ThrownErrorItem,{key:t,error:e.get(\"error\")||e,jumpToLine:s}):\"spec\"===r?ze.default.createElement(SpecErrorItem,{key:t,error:e,jumpToLine:s}):void 0})))))}}const ThrownErrorItem=({error:e,jumpToLine:t})=>{if(!e)return null;let r=e.get(\"line\");return ze.default.createElement(\"div\",{className:\"error-wrapper\"},e?ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,e.get(\"source\")&&e.get(\"level\")?toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"):\"\",e.get(\"path\")?ze.default.createElement(\"small\",null,\" at \",e.get(\"path\")):null),ze.default.createElement(\"span\",{className:\"message thrown\"},e.get(\"message\")),ze.default.createElement(\"div\",{className:\"error-line\"},r&&t?ze.default.createElement(\"a\",{onClick:t.bind(null,r)},\"Jump to line \",r):null)):null)},SpecErrorItem=({error:e,jumpToLine:t=null})=>{let r=null;return e.get(\"path\")?r=We.List.isList(e.get(\"path\"))?ze.default.createElement(\"small\",null,\"at \",e.get(\"path\").join(\".\")):ze.default.createElement(\"small\",null,\"at \",e.get(\"path\")):e.get(\"line\")&&!t&&(r=ze.default.createElement(\"small\",null,\"on line \",e.get(\"line\"))),ze.default.createElement(\"div\",{className:\"error-wrapper\"},e?ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"),\" \",r),ze.default.createElement(\"span\",{className:\"message\"},e.get(\"message\")),ze.default.createElement(\"div\",{className:\"error-line\"},t?ze.default.createElement(\"a\",{onClick:t.bind(null,e.get(\"line\"))},\"Jump to line \",e.get(\"line\")):null)):null)};function toTitleCase(e){return(e||\"\").split(\" \").map((e=>e[0].toUpperCase()+e.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends ze.default.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,We.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(e){e.contentTypes&&e.contentTypes.size&&(e.contentTypes.includes(e.value)||e.onChange(e.contentTypes.first()))}onChangeWrapper=e=>this.props.onChange(e.target.value);render(){let{ariaControls:e,ariaLabel:t,className:r,contentTypes:n,controlId:a,value:o}=this.props;return n&&n.size?ze.default.createElement(\"div\",{className:\"content-type-wrapper \"+(r||\"\")},ze.default.createElement(\"select\",{\"aria-controls\":e,\"aria-label\":t,className:\"content-type\",id:a,onChange:this.onChangeWrapper,value:o||\"\"},n.map((e=>ze.default.createElement(\"option\",{key:e,value:e},e))).toArray())):null}}function xclass(...e){return e.filter((e=>!!e)).join(\" \").trim()}class Container extends ze.default.Component{render(){let{fullscreen:e,full:t,...r}=this.props;if(e)return ze.default.createElement(\"section\",r);let n=\"swagger-container\"+(t?\"-full\":\"\");return ze.default.createElement(\"section\",(0,nr.default)({},r,{className:xclass(r.className,n)}))}}const va={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends ze.default.Component{render(){const{hide:e,keepContents:t,mobile:r,tablet:n,desktop:a,large:o,...s}=this.props;if(e&&!t)return ze.default.createElement(\"span\",null);let l=[];for(let e in va){if(!Object.prototype.hasOwnProperty.call(va,e))continue;let t=va[e];if(e in this.props){let r=this.props[e];if(r<1){l.push(\"none\"+t);continue}l.push(\"block\"+t),l.push(\"col-\"+r+t)}}e&&l.push(\"hidden\");let i=xclass(s.className,...l);return ze.default.createElement(\"section\",(0,nr.default)({},s,{className:i}))}}class Row extends ze.default.Component{render(){return ze.default.createElement(\"div\",(0,nr.default)({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends ze.default.Component{static defaultProps={className:\"\"};render(){return ze.default.createElement(\"button\",(0,nr.default)({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=e=>ze.default.createElement(\"textarea\",e),Input=e=>ze.default.createElement(\"input\",e);class Select extends ze.default.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(e,t){let r;super(e,t),r=e.value?e.value:e.multiple?[\"\"]:\"\",this.state={value:r}}onChange=e=>{let t,{onChange:r,multiple:n}=this.props,a=[].slice.call(e.target.options);t=n?a.filter((function(e){return e.selected})).map((function(e){return e.value})):e.target.value,this.setState({value:t}),r&&r(t)};UNSAFE_componentWillReceiveProps(e){e.value!==this.props.value&&this.setState({value:e.value})}render(){let{allowedValues:e,multiple:t,allowEmptyValue:r,disabled:n}=this.props,a=this.state.value?.toJS?.()||this.state.value;return ze.default.createElement(\"select\",{className:this.props.className,multiple:t,value:a,onChange:this.onChange,disabled:n},r?ze.default.createElement(\"option\",{value:\"\"},\"--\"):null,e.map((function(e,t){return ze.default.createElement(\"option\",{key:t,value:String(e)},String(e))})))}}class Link extends ze.default.Component{render(){return ze.default.createElement(\"a\",(0,nr.default)({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:e})=>ze.default.createElement(\"div\",{className:\"no-margin\"},\" \",e,\" \");class Collapse extends ze.default.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?ze.default.createElement(NoMargin,null,this.props.children):ze.default.createElement(\"noscript\",null)}render(){let{animated:e,isOpened:t,children:r}=this.props;return e?(r=t?r:null,ze.default.createElement(NoMargin,null,r)):this.renderNotAnimated()}}class Overview extends ze.default.Component{constructor(...e){super(...e),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(e,t){this.props.layoutActions.show(e,t)}showOp(e,t){let{layoutActions:r}=this.props;r.show(e,t)}render(){let{specSelectors:e,layoutSelectors:t,layoutActions:r,getComponent:n}=this.props,a=e.taggedOperations();const o=n(\"Collapse\");return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),a.map(((e,n)=>{let a=e.get(\"operations\"),s=[\"overview-tags\",n],l=t.isShown(s,!0);return ze.default.createElement(\"div\",{key:\"overview-\"+n},ze.default.createElement(\"h4\",{onClick:()=>r.show(s,!l),className:\"link overview-tag\"},\" \",l?\"-\":\"+\",n),ze.default.createElement(o,{isOpened:l,animated:!0},a.map((e=>{let{path:n,method:a,id:o}=e.toObject(),s=\"operations\",l=o,i=t.isShown([s,l]);return ze.default.createElement(OperationLink,{key:o,path:n,method:a,id:n+\"-\"+a,shown:i,showOpId:l,showOpIdPrefix:s,href:`#operation-${l}`,onClick:r.show})})).toArray()))})).toArray(),a.size<1&&ze.default.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends ze.default.Component{constructor(e){super(e),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:e,showOpIdPrefix:t,onClick:r,shown:n}=this.props;r([t,e],!n)}render(){let{id:e,method:t,shown:r,href:n}=this.props;return ze.default.createElement(Link,{href:n,onClick:this.onClick,className:\"block opblock-link \"+(r?\"shown\":\"\")},ze.default.createElement(\"div\",null,ze.default.createElement(\"small\",{className:`bold-label-${t}`},t.toUpperCase()),ze.default.createElement(\"span\",{className:\"bold-label\"},e)))}}class InitializedInput extends ze.default.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:e,defaultValue:t,initialValue:r,...n}=this.props;return ze.default.createElement(\"input\",(0,nr.default)({},n,{ref:e=>this.inputRef=e}))}}class InfoBasePath extends ze.default.Component{render(){const{host:e,basePath:t}=this.props;return ze.default.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",e,t,\" ]\")}}class InfoUrl extends ze.default.PureComponent{render(){const{url:e,getComponent:t}=this.props,r=t(\"Link\");return ze.default.createElement(r,{target:\"_blank\",href:sanitizeUrl(e)},ze.default.createElement(\"span\",{className:\"url\"},\" \",e))}}class Info extends ze.default.Component{render(){const{info:e,url:t,host:r,basePath:n,getComponent:a,externalDocs:o,selectedServer:s,url:l}=this.props,i=e.get(\"version\"),c=e.get(\"description\"),u=e.get(\"title\"),d=safeBuildUrl(e.get(\"termsOfService\"),l,{selectedServer:s}),p=e.get(\"contact\"),m=e.get(\"license\"),f=safeBuildUrl(o&&o.get(\"url\"),l,{selectedServer:s}),h=o&&o.get(\"description\"),g=a(\"Markdown\",!0),y=a(\"Link\"),S=a(\"VersionStamp\"),_=a(\"OpenAPIVersion\"),v=a(\"InfoUrl\"),b=a(\"InfoBasePath\"),w=a(\"License\"),C=a(\"Contact\");return ze.default.createElement(\"div\",{className:\"info\"},ze.default.createElement(\"hgroup\",{className:\"main\"},ze.default.createElement(\"h2\",{className:\"title\"},u,ze.default.createElement(\"span\",null,i&&ze.default.createElement(S,{version:i}),ze.default.createElement(_,{oasVersion:\"2.0\"}))),r||n?ze.default.createElement(b,{host:r,basePath:n}):null,t&&ze.default.createElement(v,{getComponent:a,url:t})),ze.default.createElement(\"div\",{className:\"description\"},ze.default.createElement(g,{source:c})),d&&ze.default.createElement(\"div\",{className:\"info__tos\"},ze.default.createElement(y,{target:\"_blank\",href:sanitizeUrl(d)},\"Terms of service\")),p?.size>0&&ze.default.createElement(C,{getComponent:a,data:p,selectedServer:s,url:t}),m?.size>0&&ze.default.createElement(w,{getComponent:a,license:m,selectedServer:s,url:t}),f?ze.default.createElement(y,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(f)},h||f):null)}}var ba=Info;class InfoContainer extends ze.default.Component{render(){const{specSelectors:e,getComponent:t,oas3Selectors:r}=this.props,n=e.info(),a=e.url(),o=e.basePath(),s=e.host(),l=e.externalDocs(),i=r.selectedServer(),c=t(\"info\");return ze.default.createElement(\"div\",null,n&&n.count()?ze.default.createElement(c,{info:n,url:a,host:s,basePath:o,externalDocs:l,getComponent:t,selectedServer:i}):null)}}class Contact extends ze.default.Component{render(){const{data:e,getComponent:t,selectedServer:r,url:n}=this.props,a=e.get(\"name\",\"the developer\"),o=safeBuildUrl(e.get(\"url\"),n,{selectedServer:r}),s=e.get(\"email\"),l=t(\"Link\");return ze.default.createElement(\"div\",{className:\"info__contact\"},o&&ze.default.createElement(\"div\",null,ze.default.createElement(l,{href:sanitizeUrl(o),target:\"_blank\"},a,\" - Website\")),s&&ze.default.createElement(l,{href:sanitizeUrl(`mailto:${s}`)},o?`Send email to ${a}`:`Contact ${a}`))}}var wa=Contact;class License extends ze.default.Component{render(){const{license:e,getComponent:t,selectedServer:r,url:n}=this.props,a=e.get(\"name\",\"License\"),o=safeBuildUrl(e.get(\"url\"),n,{selectedServer:r}),s=t(\"Link\");return ze.default.createElement(\"div\",{className:\"info__license\"},o?ze.default.createElement(\"div\",{className:\"info__license__url\"},ze.default.createElement(s,{target:\"_blank\",href:sanitizeUrl(o)},a)):ze.default.createElement(\"span\",null,a))}}var Ca=License;class JumpToPath extends ze.default.Component{render(){return null}}class CopyToClipboardBtn extends ze.default.Component{render(){let{getComponent:e}=this.props;const t=e(\"CopyIcon\");return ze.default.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},ze.default.createElement(fr.CopyToClipboard,{text:this.props.textToCopy},ze.default.createElement(t,null)))}}class Footer extends ze.default.Component{render(){return ze.default.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends ze.default.Component{onFilterChange=e=>{const{target:{value:t}}=e;this.props.layoutActions.updateFilter(t)};render(){const{specSelectors:e,layoutSelectors:t,getComponent:r}=this.props,n=r(\"Col\"),a=\"loading\"===e.loadingStatus(),o=\"failed\"===e.loadingStatus(),s=t.currentFilter(),l=[\"operation-filter-input\"];return o&&l.push(\"failed\"),a&&l.push(\"loading\"),ze.default.createElement(\"div\",null,null===s||!1===s||\"false\"===s?null:ze.default.createElement(\"div\",{className:\"filter-container\"},ze.default.createElement(n,{className:\"filter wrapper\",mobile:12},ze.default.createElement(\"input\",{className:l.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:!0===s||\"true\"===s?\"\":s,disabled:a}))))}}const xa=Function.prototype;class ParamBody extends ze.PureComponent{static defaultProp={consumes:(0,We.fromJS)([\"application/json\"]),param:(0,We.fromJS)({}),onChange:xa,onChangeConsumes:xa};constructor(e,t){super(e,t),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(e){this.updateValues.call(this,e)}updateValues=e=>{let{param:t,isExecute:r,consumesValue:n=\"\"}=e,a=/xml/i.test(n),o=/json/i.test(n),s=a?t.get(\"value_xml\"):t.get(\"value\");if(void 0!==s){let e=!s&&o?\"{}\":s;this.setState({value:e}),this.onChange(e,{isXml:a,isEditBox:r})}else a?this.onChange(this.sample(\"xml\"),{isXml:a,isEditBox:r}):this.onChange(this.sample(),{isEditBox:r})};sample=e=>{let{param:t,fn:r}=this.props,n=r.inferSchema(t.toJS());return r.getSampleSchema(n,e,{includeWriteOnly:!0})};onChange=(e,{isEditBox:t,isXml:r})=>{this.setState({value:e,isEditBox:t}),this._onChange(e,r)};_onChange=(e,t)=>{(this.props.onChange||xa)(e,t)};handleOnChange=e=>{const{consumesValue:t}=this.props,r=/xml/i.test(t),n=e.target.value;this.onChange(n,{isXml:r,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((e=>({isEditBox:!e.isEditBox})));render(){let{onChangeConsumes:e,param:t,isExecute:r,specSelectors:n,pathMethod:a,getConfigs:o,getComponent:s}=this.props;const l=s(\"Button\"),i=s(\"TextArea\"),c=s(\"highlightCode\"),u=s(\"contentType\");let d=(n?n.parameterWithMetaByIdentity(a,t):t).get(\"errors\",(0,We.List)()),p=n.contentTypeValues(a).get(\"requestContentType\"),m=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:f,isEditBox:h}=this.state,g=null;getKnownSyntaxHighlighterLanguage(f)&&(g=\"json\");const y=`${createHtmlReadyId(`${a[1]}${a[0]}_parameters`)}_select`;return ze.default.createElement(\"div\",{className:\"body-param\",\"data-param-name\":t.get(\"name\"),\"data-param-in\":t.get(\"in\")},h&&r?ze.default.createElement(i,{className:\"body-param__text\"+(d.count()?\" invalid\":\"\"),value:f,onChange:this.handleOnChange}):f&&ze.default.createElement(c,{className:\"body-param__example\",language:g,getConfigs:o,value:f}),ze.default.createElement(\"div\",{className:\"body-param-options\"},r?ze.default.createElement(\"div\",{className:\"body-param-edit\"},ze.default.createElement(l,{className:h?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},h?\"Cancel\":\"Edit\")):null,ze.default.createElement(\"label\",{htmlFor:y},ze.default.createElement(\"span\",null,\"Parameter content type\"),ze.default.createElement(u,{value:p,contentTypes:m,onChange:e,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:y}))))}}class Curl extends ze.default.Component{render(){let{request:e,getConfigs:t}=this.props,r=requestSnippetGenerator_curl_bash(e);const n=t(),a=(0,Qt.default)(n,\"syntaxHighlight.activated\")?ze.default.createElement(hr.default,{language:\"bash\",className:\"curl microlight\",style:getStyle((0,Qt.default)(n,\"syntaxHighlight.theme\"))},r):ze.default.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:r});return ze.default.createElement(\"div\",{className:\"curl-command\"},ze.default.createElement(\"h4\",null,\"Curl\"),ze.default.createElement(\"div\",{className:\"copy-to-clipboard\"},ze.default.createElement(fr.CopyToClipboard,{text:r},ze.default.createElement(\"button\",null))),ze.default.createElement(\"div\",null,a))}}class Schemes extends ze.default.Component{UNSAFE_componentWillMount(){let{schemes:e}=this.props;this.setScheme(e.first())}UNSAFE_componentWillReceiveProps(e){this.props.currentScheme&&e.schemes.includes(this.props.currentScheme)||this.setScheme(e.schemes.first())}onChange=e=>{this.setScheme(e.target.value)};setScheme=e=>{let{path:t,method:r,specActions:n}=this.props;n.setScheme(e,t,r)};render(){let{schemes:e,currentScheme:t}=this.props;return ze.default.createElement(\"label\",{htmlFor:\"schemes\"},ze.default.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),ze.default.createElement(\"select\",{onChange:this.onChange,value:t,id:\"schemes\"},e.valueSeq().map((e=>ze.default.createElement(\"option\",{value:e,key:e},e))).toArray()))}}class SchemesContainer extends ze.default.Component{render(){const{specActions:e,specSelectors:t,getComponent:r}=this.props,n=t.operationScheme(),a=t.schemes(),o=r(\"schemes\");return a&&a.size?ze.default.createElement(o,{currentScheme:n,schemes:a,specActions:e}):null}}class ModelCollapse extends ze.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:We.default.List([])};constructor(e,t){super(e,t);let{expanded:r,collapsedContent:n}=this.props;this.state={expanded:r,collapsedContent:n||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:e,expanded:t,modelName:r}=this.props;e&&t&&this.props.onToggle(r,t)}UNSAFE_componentWillReceiveProps(e){this.props.expanded!==e.expanded&&this.setState({expanded:e.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=e=>{if(e&&this.props.layoutSelectors){const t=this.props.layoutSelectors.getScrollToKey();We.default.is(t,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,e.parentElement)}};render(){const{title:e,classes:t}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?ze.default.createElement(\"span\",{className:t||\"\"},this.props.children):ze.default.createElement(\"span\",{className:t||\"\",ref:this.onLoad},ze.default.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},e&&ze.default.createElement(\"span\",{className:\"pointer\"},e),ze.default.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&ze.default.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:e,isExecute:t,schema:r,example:n})=>{const a=(0,ze.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),o=(0,ze.useMemo)((()=>Object.keys(a)),[a]).includes(e)&&r&&!t?e:a.example,s=(e=>{const t=(0,ze.useRef)();return(0,ze.useEffect)((()=>{t.current=e})),t.current})(t),[l,i]=(0,ze.useState)(o),c=(0,ze.useCallback)((e=>{i(e.target.dataset.name)}),[]);return(0,ze.useEffect)((()=>{s&&!t&&n&&i(a.example)}),[s,t,n]),{activeTab:l,onTabChange:c,tabs:a}};var model_example=({schema:e,example:t,isExecute:r=!1,specPath:n,includeWriteOnly:a=!1,includeReadOnly:o=!1,getComponent:s,getConfigs:l,specSelectors:i})=>{const{defaultModelRendering:c,defaultModelExpandDepth:u}=l(),d=s(\"ModelWrapper\"),p=s(\"highlightCode\"),m=mt()(5).toString(\"base64\"),f=mt()(5).toString(\"base64\"),h=mt()(5).toString(\"base64\"),g=mt()(5).toString(\"base64\"),y=i.isOAS3(),{activeTab:S,tabs:_,onTabChange:v}=useTabs({initialTab:c,isExecute:r,schema:e,example:t});return ze.default.createElement(\"div\",{className:\"model-example\"},ze.default.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},ze.default.createElement(\"li\",{className:(0,ga.default)(\"tabitem\",{active:S===_.example}),role:\"presentation\"},ze.default.createElement(\"button\",{\"aria-controls\":f,\"aria-selected\":S===_.example,className:\"tablinks\",\"data-name\":\"example\",id:m,onClick:v,role:\"tab\"},r?\"Edit Value\":\"Example Value\")),e&&ze.default.createElement(\"li\",{className:(0,ga.default)(\"tabitem\",{active:S===_.model}),role:\"presentation\"},ze.default.createElement(\"button\",{\"aria-controls\":g,\"aria-selected\":S===_.model,className:(0,ga.default)(\"tablinks\",{inactive:r}),\"data-name\":\"model\",id:h,onClick:v,role:\"tab\"},y?\"Schema\":\"Model\"))),S===_.example&&ze.default.createElement(\"div\",{\"aria-hidden\":S!==_.example,\"aria-labelledby\":m,\"data-name\":\"examplePanel\",id:f,role:\"tabpanel\",tabIndex:\"0\"},t||ze.default.createElement(p,{value:\"(no example available)\",getConfigs:l})),S===_.model&&ze.default.createElement(\"div\",{\"aria-hidden\":S===_.example,\"aria-labelledby\":h,\"data-name\":\"modelPanel\",id:g,role:\"tabpanel\",tabIndex:\"0\"},ze.default.createElement(d,{schema:e,getComponent:s,getConfigs:l,specSelectors:i,expandDepth:u,specPath:n,includeReadOnly:o,includeWriteOnly:a})))};class ModelWrapper extends ze.Component{onToggle=(e,t)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,t)};render(){let{getComponent:e,getConfigs:t}=this.props;const r=e(\"Model\");let n;return this.props.layoutSelectors&&(n=this.props.layoutSelectors.isShown(this.props.fullPath)),ze.default.createElement(\"div\",{className:\"model-box\"},ze.default.createElement(r,(0,nr.default)({},this.props,{getConfigs:t,expanded:n,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}var ka=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return he.default}});const decodeRefName=e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}};class Model extends ka.default{static propTypes={schema:Xt.default.map.isRequired,getComponent:qt.default.func.isRequired,getConfigs:qt.default.func.isRequired,specSelectors:qt.default.object.isRequired,name:qt.default.string,displayName:qt.default.string,isRef:qt.default.bool,required:qt.default.bool,expandDepth:qt.default.number,depth:qt.default.number,specPath:Xt.default.list.isRequired,includeReadOnly:qt.default.bool,includeWriteOnly:qt.default.bool};getModelName=e=>-1!==e.indexOf(\"#/definitions/\")?decodeRefName(e.replace(/^.*#\\/definitions\\//,\"\")):-1!==e.indexOf(\"#/components/schemas/\")?decodeRefName(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=e=>{let{specSelectors:t}=this.props;return t.findDefinition(e)};render(){let{getComponent:e,getConfigs:t,specSelectors:r,schema:n,required:a,name:o,isRef:s,specPath:l,displayName:i,includeReadOnly:c,includeWriteOnly:u}=this.props;const d=e(\"ObjectModel\"),p=e(\"ArrayModel\"),m=e(\"PrimitiveModel\");let f=\"object\",h=n&&n.get(\"$$ref\"),g=n&&n.get(\"$ref\");if(!o&&h&&(o=this.getModelName(h)),g){o=this.getModelName(g);const e=this.getRefSchema(o);We.Map.isMap(e)?(n=e.set(\"$$ref\",g),h=g):(n=null,o=g)}if(!n)return ze.default.createElement(\"span\",{className:\"model model-title\"},ze.default.createElement(\"span\",{className:\"model-title__text\"},i||o),!g&&ze.default.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const y=r.isOAS3()&&n.get(\"deprecated\");switch(s=void 0!==s?s:!!h,f=n&&n.get(\"type\")||f,f){case\"object\":return ze.default.createElement(d,(0,nr.default)({className:\"object\"},this.props,{specPath:l,getConfigs:t,schema:n,name:o,deprecated:y,isRef:s,includeReadOnly:c,includeWriteOnly:u}));case\"array\":return ze.default.createElement(p,(0,nr.default)({className:\"array\"},this.props,{getConfigs:t,schema:n,name:o,deprecated:y,required:a,includeReadOnly:c,includeWriteOnly:u}));default:return ze.default.createElement(m,(0,nr.default)({},this.props,{getComponent:e,getConfigs:t,schema:n,name:o,deprecated:y,required:a}))}}}class Models extends ze.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(e,t)=>{const{layoutActions:r}=this.props;r.show([...this.getSchemaBasePath(),e],t),t&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),e])};onLoadModels=e=>{e&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),e)};onLoadModel=e=>{if(e){const t=e.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),t],e)}};render(){let{specSelectors:e,getComponent:t,layoutSelectors:r,layoutActions:n,getConfigs:a}=this.props,o=e.definitions(),{docExpansion:s,defaultModelsExpandDepth:l}=a();if(!o.size||l<0)return null;const i=this.getSchemaBasePath();let c=r.isShown(i,l>0&&\"none\"!==s);const u=e.isOAS3(),d=t(\"ModelWrapper\"),p=t(\"Collapse\"),m=t(\"ModelCollapse\"),f=t(\"JumpToPath\",!0),h=t(\"ArrowUpIcon\"),g=t(\"ArrowDownIcon\");return ze.default.createElement(\"section\",{className:c?\"models is-open\":\"models\",ref:this.onLoadModels},ze.default.createElement(\"h4\",null,ze.default.createElement(\"button\",{\"aria-expanded\":c,className:\"models-control\",onClick:()=>n.show(i,!c)},ze.default.createElement(\"span\",null,u?\"Schemas\":\"Models\"),c?ze.default.createElement(h,null):ze.default.createElement(g,null))),ze.default.createElement(p,{isOpened:c},o.entrySeq().map((([o])=>{const s=[...i,o],c=We.default.List(s),u=e.specResolvedSubtree(s),p=e.specJson().getIn(s),h=We.Map.isMap(u)?u:We.default.Map(),g=We.Map.isMap(p)?p:We.default.Map(),y=h.get(\"title\")||g.get(\"title\")||o,S=r.isShown(s,!1);S&&0===h.size&&g.size>0&&this.props.specActions.requestResolvedSubtree(s);const _=ze.default.createElement(d,{name:o,expandDepth:l,schema:h||We.default.Map(),displayName:y,fullPath:s,specPath:c,getComponent:t,specSelectors:e,getConfigs:a,layoutSelectors:r,layoutActions:n,includeReadOnly:!0,includeWriteOnly:!0}),v=ze.default.createElement(\"span\",{className:\"model-box\"},ze.default.createElement(\"span\",{className:\"model model-title\"},y));return ze.default.createElement(\"div\",{id:`model-${o}`,className:\"model-container\",key:`models-section-${o}`,\"data-name\":o,ref:this.onLoadModel},ze.default.createElement(\"span\",{className:\"models-jump-to-path\"},ze.default.createElement(f,{specPath:c})),ze.default.createElement(m,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(o),onToggle:this.handleToggle,title:v,displayName:y,modelName:o,specPath:c,layoutSelectors:r,layoutActions:n,hideSelfOnExpand:!0,expanded:l>0&&S},_))})).toArray()))}}var enum_model=({value:e,getComponent:t})=>{let r=t(\"ModelCollapse\"),n=ze.default.createElement(\"span\",null,\"Array [ \",e.count(),\" ]\");return ze.default.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",ze.default.createElement(\"br\",null),ze.default.createElement(r,{collapsedContent:n},\"[ \",e.join(\", \"),\" ]\"))};class ObjectModel extends ze.Component{render(){let{schema:e,name:t,displayName:r,isRef:n,getComponent:a,getConfigs:o,depth:s,onToggle:l,expanded:i,specPath:c,...u}=this.props,{specSelectors:d,expandDepth:p,includeReadOnly:m,includeWriteOnly:f}=u;const{isOAS3:h}=d;if(!e)return null;const{showExtensions:g}=o();let y=e.get(\"description\"),S=e.get(\"properties\"),_=e.get(\"additionalProperties\"),v=e.get(\"title\")||r||t,b=e.get(\"required\"),w=e.filter(((e,t)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(t))),C=e.get(\"deprecated\"),x=e.getIn([\"externalDocs\",\"url\"]),k=e.getIn([\"externalDocs\",\"description\"]);const O=a(\"JumpToPath\",!0),N=a(\"Markdown\",!0),A=a(\"Model\"),I=a(\"ModelCollapse\"),R=a(\"Property\"),B=a(\"Link\"),JumpToPathSection=()=>ze.default.createElement(\"span\",{className:\"model-jump-to-path\"},ze.default.createElement(O,{specPath:c})),T=ze.default.createElement(\"span\",null,ze.default.createElement(\"span\",null,\"{\"),\"...\",ze.default.createElement(\"span\",null,\"}\"),n?ze.default.createElement(JumpToPathSection,null):\"\"),j=d.isOAS3()?e.get(\"allOf\"):null,P=d.isOAS3()?e.get(\"anyOf\"):null,M=d.isOAS3()?e.get(\"oneOf\"):null,q=d.isOAS3()?e.get(\"not\"):null,L=v&&ze.default.createElement(\"span\",{className:\"model-title\"},n&&e.get(\"$$ref\")&&ze.default.createElement(\"span\",{className:\"model-hint\"},e.get(\"$$ref\")),ze.default.createElement(\"span\",{className:\"model-title__text\"},v));return ze.default.createElement(\"span\",{className:\"model\"},ze.default.createElement(I,{modelName:t,title:L,onToggle:l,expanded:!!i||s<=p,collapsedContent:T},ze.default.createElement(\"span\",{className:\"brace-open object\"},\"{\"),n?ze.default.createElement(JumpToPathSection,null):null,ze.default.createElement(\"span\",{className:\"inner-object\"},ze.default.createElement(\"table\",{className:\"model\"},ze.default.createElement(\"tbody\",null,y?ze.default.createElement(\"tr\",{className:\"description\"},ze.default.createElement(\"td\",null,\"description:\"),ze.default.createElement(\"td\",null,ze.default.createElement(N,{source:y}))):null,x&&ze.default.createElement(\"tr\",{className:\"external-docs\"},ze.default.createElement(\"td\",null,\"externalDocs:\"),ze.default.createElement(\"td\",null,ze.default.createElement(B,{target:\"_blank\",href:sanitizeUrl(x)},k||x))),C?ze.default.createElement(\"tr\",{className:\"property\"},ze.default.createElement(\"td\",null,\"deprecated:\"),ze.default.createElement(\"td\",null,\"true\")):null,S&&S.size?S.entrySeq().filter((([,e])=>(!e.get(\"readOnly\")||m)&&(!e.get(\"writeOnly\")||f))).map((([e,r])=>{let n=h()&&r.get(\"deprecated\"),l=We.List.isList(b)&&b.contains(e),i=[\"property-row\"];return n&&i.push(\"deprecated\"),l&&i.push(\"required\"),ze.default.createElement(\"tr\",{key:e,className:i.join(\" \")},ze.default.createElement(\"td\",null,e,l&&ze.default.createElement(\"span\",{className:\"star\"},\"*\")),ze.default.createElement(\"td\",null,ze.default.createElement(A,(0,nr.default)({key:`object-${t}-${e}_${r}`},u,{required:l,getComponent:a,specPath:c.push(\"properties\",e),getConfigs:o,schema:r,depth:s+1}))))})).toArray():null,g?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\" \")):null,g?e.entrySeq().map((([e,t])=>{if(\"x-\"!==e.slice(0,2))return;const r=t?t.toJS?t.toJS():t:null;return ze.default.createElement(\"tr\",{key:e,className:\"extension\"},ze.default.createElement(\"td\",null,e),ze.default.createElement(\"td\",null,JSON.stringify(r)))})).toArray():null,_&&_.size?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\"< * >:\"),ze.default.createElement(\"td\",null,ze.default.createElement(A,(0,nr.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"additionalProperties\"),getConfigs:o,schema:_,depth:s+1})))):null,j?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\"allOf ->\"),ze.default.createElement(\"td\",null,j.map(((e,t)=>ze.default.createElement(\"div\",{key:t},ze.default.createElement(A,(0,nr.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"allOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,P?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\"anyOf ->\"),ze.default.createElement(\"td\",null,P.map(((e,t)=>ze.default.createElement(\"div\",{key:t},ze.default.createElement(A,(0,nr.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"anyOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,M?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\"oneOf ->\"),ze.default.createElement(\"td\",null,M.map(((e,t)=>ze.default.createElement(\"div\",{key:t},ze.default.createElement(A,(0,nr.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"oneOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,q?ze.default.createElement(\"tr\",null,ze.default.createElement(\"td\",null,\"not ->\"),ze.default.createElement(\"td\",null,ze.default.createElement(\"div\",null,ze.default.createElement(A,(0,nr.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"not\"),getConfigs:o,schema:q,depth:s+1}))))):null))),ze.default.createElement(\"span\",{className:\"brace-close\"},\"}\")),w.size?w.entrySeq().map((([e,t])=>ze.default.createElement(R,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null)}}class ArrayModel extends ze.Component{render(){let{getComponent:e,getConfigs:t,schema:r,depth:n,expandDepth:a,name:o,displayName:s,specPath:l}=this.props,i=r.get(\"description\"),c=r.get(\"items\"),u=r.get(\"title\")||s||o,d=r.filter(((e,t)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))),p=r.getIn([\"externalDocs\",\"url\"]),m=r.getIn([\"externalDocs\",\"description\"]);const f=e(\"Markdown\",!0),h=e(\"ModelCollapse\"),g=e(\"Model\"),y=e(\"Property\"),S=e(\"Link\"),_=u&&ze.default.createElement(\"span\",{className:\"model-title\"},ze.default.createElement(\"span\",{className:\"model-title__text\"},u));return ze.default.createElement(\"span\",{className:\"model\"},ze.default.createElement(h,{title:_,expanded:n<=a,collapsedContent:\"[...]\"},\"[\",d.size?d.entrySeq().map((([e,t])=>ze.default.createElement(y,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null,i?ze.default.createElement(f,{source:i}):d.size?ze.default.createElement(\"div\",{className:\"markdown\"}):null,p&&ze.default.createElement(\"div\",{className:\"external-docs\"},ze.default.createElement(S,{target:\"_blank\",href:sanitizeUrl(p)},m||p)),ze.default.createElement(\"span\",null,ze.default.createElement(g,(0,nr.default)({},this.props,{getConfigs:t,specPath:l.push(\"items\"),name:null,schema:c,required:!1,depth:n+1}))),\"]\"))}}const Oa=\"property primitive\";class Primitive extends ze.Component{render(){let{schema:e,getComponent:t,getConfigs:r,name:n,displayName:a,depth:o,expandDepth:s}=this.props;const{showExtensions:l}=r();if(!e||!e.get)return ze.default.createElement(\"div\",null);let i=e.get(\"type\"),c=e.get(\"format\"),u=e.get(\"xml\"),d=e.get(\"enum\"),p=e.get(\"title\")||a||n,m=e.get(\"description\"),f=getExtensions(e),h=e.filter(((e,t)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))).filterNot(((e,t)=>f.has(t))),g=e.getIn([\"externalDocs\",\"url\"]),y=e.getIn([\"externalDocs\",\"description\"]);const S=t(\"Markdown\",!0),_=t(\"EnumModel\"),v=t(\"Property\"),b=t(\"ModelCollapse\"),w=t(\"Link\"),C=p&&ze.default.createElement(\"span\",{className:\"model-title\"},ze.default.createElement(\"span\",{className:\"model-title__text\"},p));return ze.default.createElement(\"span\",{className:\"model\"},ze.default.createElement(b,{title:C,expanded:o<=s,collapsedContent:\"[...]\",hideSelfOnExpand:s!==o},ze.default.createElement(\"span\",{className:\"prop\"},n&&o>1&&ze.default.createElement(\"span\",{className:\"prop-name\"},p),ze.default.createElement(\"span\",{className:\"prop-type\"},i),c&&ze.default.createElement(\"span\",{className:\"prop-format\"},\"($\",c,\")\"),h.size?h.entrySeq().map((([e,t])=>ze.default.createElement(v,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:Oa}))):null,l&&f.size?f.entrySeq().map((([e,t])=>ze.default.createElement(v,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:Oa}))):null,m?ze.default.createElement(S,{source:m}):null,g&&ze.default.createElement(\"div\",{className:\"external-docs\"},ze.default.createElement(w,{target:\"_blank\",href:sanitizeUrl(g)},y||g)),u&&u.size?ze.default.createElement(\"span\",null,ze.default.createElement(\"br\",null),ze.default.createElement(\"span\",{className:Oa},\"xml:\"),u.entrySeq().map((([e,t])=>ze.default.createElement(\"span\",{key:`${e}-${t}`,className:Oa},ze.default.createElement(\"br\",null),\"   \",e,\": \",String(t)))).toArray()):null,d&&ze.default.createElement(_,{value:d,getComponent:t}))))}}var property=({propKey:e,propVal:t,propClass:r})=>ze.default.createElement(\"span\",{className:r},ze.default.createElement(\"br\",null),e,\": \",String(t));class TryItOutButton extends ze.default.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:e,onCancelClick:t,onResetClick:r,enabled:n,hasUserEditedBody:a,isOAS3:o}=this.props,s=o&&a;return ze.default.createElement(\"div\",{className:s?\"try-out btn-group\":\"try-out\"},n?ze.default.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:t},\"Cancel\"):ze.default.createElement(\"button\",{className:\"btn try-out__btn\",onClick:e},\"Try it out \"),s&&ze.default.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:r},\"Reset\"))}}class VersionPragmaFilter extends ze.default.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:e,isSwagger2:t,isOAS3:r,alsoShow:n}=this.props;return e?ze.default.createElement(\"div\",null,this.props.children):t&&r?ze.default.createElement(\"div\",{className:\"version-pragma\"},n,ze.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},ze.default.createElement(\"div\",null,ze.default.createElement(\"h3\",null,\"Unable to render this definition\"),ze.default.createElement(\"p\",null,ze.default.createElement(\"code\",null,\"swagger\"),\" and \",ze.default.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),ze.default.createElement(\"p\",null,\"Supported version fields are \",ze.default.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",ze.default.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",ze.default.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\")))):t||r?ze.default.createElement(\"div\",null,this.props.children):ze.default.createElement(\"div\",{className:\"version-pragma\"},n,ze.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},ze.default.createElement(\"div\",null,ze.default.createElement(\"h3\",null,\"Unable to render this definition\"),ze.default.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),ze.default.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",ze.default.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",ze.default.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",ze.default.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\"))))}}var version_stamp=({version:e})=>ze.default.createElement(\"small\",null,ze.default.createElement(\"pre\",{className:\"version\"},\" \",e,\" \"));var openapi_version=({oasVersion:e})=>ze.default.createElement(\"small\",{className:\"version-stamp\"},ze.default.createElement(\"pre\",{className:\"version\"},\"OAS \",e));var deep_link=({enabled:e,path:t,text:r})=>ze.default.createElement(\"a\",{className:\"nostyle\",onClick:e?e=>e.preventDefault():null,href:e?`#/${t}`:null},ze.default.createElement(\"span\",null,r));var svg_assets=()=>ze.default.createElement(\"div\",null,ze.default.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},ze.default.createElement(\"defs\",null,ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},ze.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},ze.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},ze.default.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},ze.default.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},ze.default.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},ze.default.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},ze.default.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},ze.default.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),ze.default.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},ze.default.createElement(\"g\",{transform:\"translate(2, -1)\"},ze.default.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})))))),Na=function(e){var t={};return __webpack_require__.d(t,e),t}({Remarkable:function(){return ge.Remarkable}}),Aa=function(e){var t={};return __webpack_require__.d(t,e),t}({linkify:function(){return ye.linkify}}),Ia=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Ee.default}});Ia.default.addHook&&Ia.default.addHook(\"beforeSanitizeElements\",(function(e){return e.href&&e.setAttribute(\"rel\",\"noopener noreferrer\"),e}));var Ra=function Markdown({source:e,className:t=\"\",getConfigs:r=(()=>({useUnsafeMarkdown:!1}))}){if(\"string\"!=typeof e)return null;const n=new Na.Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(Aa.linkify);n.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:a}=r(),o=n.render(e),s=sanitizer(o,{useUnsafeMarkdown:a});return e&&o&&s?ze.default.createElement(\"div\",{className:(0,ga.default)(t,\"markdown\"),dangerouslySetInnerHTML:{__html:s}}):null};function sanitizer(e,{useUnsafeMarkdown:t=!1}={}){const r=t,n=t?[]:[\"style\",\"class\"];return t&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),Ia.default.sanitize(e,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:r,FORBID_ATTR:n})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends ze.default.Component{render(){const{errSelectors:e,specSelectors:t,getComponent:r}=this.props,n=r(\"SvgAssets\"),a=r(\"InfoContainer\",!0),o=r(\"VersionPragmaFilter\"),s=r(\"operations\",!0),l=r(\"Models\",!0),i=r(\"Webhooks\",!0),c=r(\"Row\"),u=r(\"Col\"),d=r(\"errors\",!0),p=r(\"ServersContainer\",!0),m=r(\"SchemesContainer\",!0),f=r(\"AuthorizeBtnContainer\",!0),h=r(\"FilterContainer\",!0),g=t.isSwagger2(),y=t.isOAS3(),S=t.isOAS31(),_=!t.specStr(),v=t.loadingStatus();let b=null;if(\"loading\"===v&&(b=ze.default.createElement(\"div\",{className:\"info\"},ze.default.createElement(\"div\",{className:\"loading-container\"},ze.default.createElement(\"div\",{className:\"loading\"})))),\"failed\"===v&&(b=ze.default.createElement(\"div\",{className:\"info\"},ze.default.createElement(\"div\",{className:\"loading-container\"},ze.default.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),ze.default.createElement(d,null)))),\"failedConfig\"===v){const t=e.lastError(),r=t?t.get(\"message\"):\"\";b=ze.default.createElement(\"div\",{className:\"info failed-config\"},ze.default.createElement(\"div\",{className:\"loading-container\"},ze.default.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),ze.default.createElement(\"p\",null,r)))}if(!b&&_&&(b=ze.default.createElement(\"h4\",null,\"No API definition provided.\")),b)return ze.default.createElement(\"div\",{className:\"swagger-ui\"},ze.default.createElement(\"div\",{className:\"loading-container\"},b));const w=t.servers(),C=t.schemes(),x=w&&w.size,k=C&&C.size,O=!!t.securityDefinitions();return ze.default.createElement(\"div\",{className:\"swagger-ui\"},ze.default.createElement(n,null),ze.default.createElement(o,{isSwagger2:g,isOAS3:y,alsoShow:ze.default.createElement(d,null)},ze.default.createElement(d,null),ze.default.createElement(c,{className:\"information-container\"},ze.default.createElement(u,{mobile:12},ze.default.createElement(a,null))),x||k||O?ze.default.createElement(\"div\",{className:\"scheme-container\"},ze.default.createElement(u,{className:\"schemes wrapper\",mobile:12},x||k?ze.default.createElement(\"div\",{className:\"schemes-server-container\"},x?ze.default.createElement(p,null):null,k?ze.default.createElement(m,null):null):null,O?ze.default.createElement(f,null):null)):null,ze.default.createElement(h,null),ze.default.createElement(c,null,ze.default.createElement(u,{mobile:12,desktop:12},ze.default.createElement(s,null))),S&&ze.default.createElement(c,{className:\"webhooks-container\"},ze.default.createElement(u,{mobile:12,desktop:12},ze.default.createElement(i,null))),ze.default.createElement(c,null,ze.default.createElement(u,{mobile:12,desktop:12},ze.default.createElement(l,null)))))}}var core_components=()=>({components:{App:ma,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:ba,InfoContainer,InfoUrl,InfoBasePath,Contact:wa,License:Ca,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,highlightCode:highlight_code,responses:Responses,response:Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,schemes:Schemes,SchemesContainer,modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,Property:property,TryItOutButton,Markdown:Ra,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example,ExamplesSelect,ExamplesSelectValueRetainer}});var form_components=()=>({components:{...Me}}),Ba=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Se.default}});const Ta={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,We.List)()};class JsonSchemaForm extends ze.Component{static defaultProps=Ta;componentDidMount(){const{dispatchInitialValue:e,value:t,onChange:r}=this.props;e?r(t):!1===e&&r(\"\")}render(){let{schema:e,errors:t,value:r,onChange:n,getComponent:a,fn:o,disabled:s}=this.props;const l=e&&e.get?e.get(\"format\"):null,i=e&&e.get?e.get(\"type\"):null;let getComponentSilently=e=>a(e,!1,{failSilently:!0}),c=i?getComponentSilently(l?`JsonSchema_${i}_${l}`:`JsonSchema_${i}`):a(\"JsonSchema_string\");return c||(c=a(\"JsonSchema_string\")),ze.default.createElement(c,(0,nr.default)({},this.props,{errors:t,fn:o,getComponent:a,value:r,onChange:n,schema:e,disabled:s}))}}class JsonSchema_string extends ze.Component{static defaultProps=Ta;onChange=e=>{const t=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?e.target.files[0]:e.target.value;this.props.onChange(t,this.props.keyName)};onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,schema:r,errors:n,required:a,description:o,disabled:s}=this.props;const l=r&&r.get?r.get(\"enum\"):null,i=r&&r.get?r.get(\"format\"):null,c=r&&r.get?r.get(\"type\"):null,u=r&&r.get?r.get(\"in\"):null;if(t||(t=\"\"),n=n.toJS?n.toJS():[],l){const r=e(\"Select\");return ze.default.createElement(r,{className:n.length?\"invalid\":\"\",title:n.length?n:\"\",allowedValues:[...l],value:t,allowEmptyValue:!a,disabled:s,onChange:this.onEnumChange})}const d=s||u&&\"formData\"===u&&!(\"FormData\"in window),p=e(\"Input\");return c&&\"file\"===c?ze.default.createElement(p,{type:\"file\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",onChange:this.onChange,disabled:d}):ze.default.createElement(Ba.default,{type:i&&\"password\"===i?\"password\":\"text\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",value:t,minLength:0,debounceTimeout:350,placeholder:o,onChange:this.onChange,disabled:d})}}class JsonSchema_array extends ze.PureComponent{static defaultProps=Ta;constructor(e,t){super(e,t),this.state={value:valueOrEmptyList(e.value),schema:e.schema}}UNSAFE_componentWillReceiveProps(e){const t=valueOrEmptyList(e.value);t!==this.state.value&&this.setState({value:t}),e.schema!==this.state.schema&&this.setState({schema:e.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(e,t)=>{this.setState((({value:r})=>({value:r.set(t,e)})),this.onChange)};removeItem=e=>{this.setState((({value:t})=>({value:t.delete(e)})),this.onChange)};addItem=()=>{const{fn:e}=this.props;let t=valueOrEmptyList(this.state.value);this.setState((()=>({value:t.push(e.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=e=>{this.setState((()=>({value:e})),this.onChange)};render(){let{getComponent:e,required:t,schema:r,errors:n,fn:a,disabled:o}=this.props;n=n.toJS?n.toJS():Array.isArray(n)?n:[];const s=n.filter((e=>\"string\"==typeof e)),l=n.filter((e=>void 0!==e.needRemove)).map((e=>e.error)),i=this.state.value,c=!!(i&&i.count&&i.count()>0),u=r.getIn([\"items\",\"enum\"]),d=r.getIn([\"items\",\"type\"]),p=r.getIn([\"items\",\"format\"]),m=r.get(\"items\");let f,h=!1,g=\"file\"===d||\"string\"===d&&\"binary\"===p;if(d&&p?f=e(`JsonSchema_${d}_${p}`):\"boolean\"!==d&&\"array\"!==d&&\"object\"!==d||(f=e(`JsonSchema_${d}`)),f||g||(h=!0),u){const r=e(\"Select\");return ze.default.createElement(r,{className:n.length?\"invalid\":\"\",title:n.length?n:\"\",multiple:!0,value:i,disabled:o,allowedValues:u,allowEmptyValue:!t,onChange:this.onEnumChange})}const y=e(\"Button\");return ze.default.createElement(\"div\",{className:\"json-schema-array\"},c?i.map(((t,r)=>{const s=(0,We.fromJS)([...n.filter((e=>e.index===r)).map((e=>e.error))]);return ze.default.createElement(\"div\",{key:r,className:\"json-schema-form-item\"},g?ze.default.createElement(JsonSchemaArrayItemFile,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s,getComponent:e}):h?ze.default.createElement(JsonSchemaArrayItemText,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s}):ze.default.createElement(f,(0,nr.default)({},this.props,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s,schema:m,getComponent:e,fn:a})),o?null:ze.default.createElement(y,{className:`btn btn-sm json-schema-form-item-remove ${l.length?\"invalid\":null}`,title:l.length?l:\"\",onClick:()=>this.removeItem(r)},\" - \"))})):null,o?null:ze.default.createElement(y,{className:`btn btn-sm json-schema-form-item-add ${s.length?\"invalid\":null}`,title:s.length?s:\"\",onClick:this.addItem},\"Add \",d?`${d} `:\"\",\"item\"))}}class JsonSchemaArrayItemText extends ze.Component{static defaultProps=Ta;onChange=e=>{const t=e.target.value;this.props.onChange(t,this.props.keyName)};render(){let{value:e,errors:t,description:r,disabled:n}=this.props;return e||(e=\"\"),t=t.toJS?t.toJS():[],ze.default.createElement(Ba.default,{type:\"text\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",value:e,minLength:0,debounceTimeout:350,placeholder:r,onChange:this.onChange,disabled:n})}}class JsonSchemaArrayItemFile extends ze.Component{static defaultProps=Ta;onFileChange=e=>{const t=e.target.files[0];this.props.onChange(t,this.props.keyName)};render(){let{getComponent:e,errors:t,disabled:r}=this.props;const n=e(\"Input\"),a=r||!(\"FormData\"in window);return ze.default.createElement(n,{type:\"file\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",onChange:this.onFileChange,disabled:a})}}class JsonSchema_boolean extends ze.Component{static defaultProps=Ta;onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,errors:r,schema:n,required:a,disabled:o}=this.props;r=r.toJS?r.toJS():[];let s=n&&n.get?n.get(\"enum\"):null,l=!s||!a,i=!s&&[\"true\",\"false\"];const c=e(\"Select\");return ze.default.createElement(c,{className:r.length?\"invalid\":\"\",title:r.length?r:\"\",value:String(t),disabled:o,allowedValues:s?[...s]:i,allowEmptyValue:l,onChange:this.onEnumChange})}}const stringifyObjectErrors=e=>e.map((e=>{const t=void 0!==e.propKey?e.propKey:e.index;let r=\"string\"==typeof e?e:\"string\"==typeof e.error?e.error:null;if(!t&&r)return r;let n=e.error,a=`/${e.propKey}`;for(;\"object\"==typeof n;){const e=void 0!==n.propKey?n.propKey:n.index;if(void 0===e)break;if(a+=`/${e}`,!n.error)break;n=n.error}return`${a}: ${n}`}));class JsonSchema_object extends ze.PureComponent{constructor(){super()}static defaultProps=Ta;onChange=e=>{this.props.onChange(e)};handleOnChange=e=>{const t=e.target.value;this.onChange(t)};render(){let{getComponent:e,value:t,errors:r,disabled:n}=this.props;const a=e(\"TextArea\");return r=r.toJS?r.toJS():Array.isArray(r)?r:[],ze.default.createElement(\"div\",null,ze.default.createElement(a,{className:(0,ga.default)({invalid:r.length}),title:r.length?stringifyObjectErrors(r).join(\", \"):\"\",value:stringify(t),disabled:n,onChange:this.handleOnChange}))}}function valueOrEmptyList(e){return We.List.isList(e)?e:Array.isArray(e)?(0,We.fromJS)(e):(0,We.List)()}var json_schema_components=()=>({components:{...qe}});var base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5_samples,core_components,form_components,swagger_client,json_schema_components,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,safe_render()];const ja=(0,We.Map)();function onlyOAS3(e){return(t,r)=>(...n)=>{if(r.getSystem().specSelectors.isOAS3()){const t=e(...n);return\"function\"==typeof t?t(r):t}return t(...n)}}const Pa=onlyOAS3((0,Wr.default)(null)),Ma=onlyOAS3(((e,t)=>e=>e.getSystem().specSelectors.findSchema(t))),qa=onlyOAS3((()=>e=>{const t=e.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return We.Map.isMap(t)?t:ja})),La=onlyOAS3((()=>e=>e.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),Da=onlyOAS3((0,Bt.createSelector)(rn,(e=>e.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(e,t)=>(r,...n)=>t.specSelectors.isOAS3()?t.oas3Selectors.validOperationMethods():e(...n),Ua=Pa,$a=Pa,Ja=Pa,Va=Pa,Ka=Pa;const za=function wrap_selectors_onlyOAS3(e){return(t,r)=>(...n)=>{if(r.getSystem().specSelectors.isOAS3()){let t=r.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return e(r,t,...n)}return t(...n)}}((0,Bt.createSelector)((e=>e),(({specSelectors:e})=>e.securityDefinitions()),((e,t)=>{let r=(0,We.List)();return t?(t.entrySeq().forEach((([e,t])=>{const n=t.get(\"type\");if(\"oauth2\"===n&&t.get(\"flows\").entrySeq().forEach((([n,a])=>{let o=(0,We.fromJS)({flow:n,authorizationUrl:a.get(\"authorizationUrl\"),tokenUrl:a.get(\"tokenUrl\"),scopes:a.get(\"scopes\"),type:t.get(\"type\"),description:t.get(\"description\")});r=r.push(new We.Map({[e]:o.filter((e=>void 0!==e))}))})),\"http\"!==n&&\"apiKey\"!==n||(r=r.push(new We.Map({[e]:t}))),\"openIdConnect\"===n&&t.get(\"openIdConnectData\")){let n=t.get(\"openIdConnectData\");(n.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((a=>{let o=n.get(\"scopes_supported\")&&n.get(\"scopes_supported\").reduce(((e,t)=>e.set(t,\"\")),new We.Map),s=(0,We.fromJS)({flow:a,authorizationUrl:n.get(\"authorization_endpoint\"),tokenUrl:n.get(\"token_endpoint\"),scopes:o,type:\"oauth2\",openIdConnectUrl:t.get(\"openIdConnectUrl\")});r=r.push(new We.Map({[e]:s.filter((e=>void 0!==e))}))}))}})),r):r})));function OAS3ComponentWrapFactory(e){return(t,r)=>n=>\"function\"==typeof r.specSelectors?.isOAS3?r.specSelectors.isOAS3()?ze.default.createElement(e,(0,nr.default)({},n,r,{Ori:t})):ze.default.createElement(t,n):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const Fa=(0,We.Map)(),selectors_isSwagger2=()=>e=>function isSwagger2(e){const t=e.get(\"swagger\");return\"string\"==typeof t&&\"2.0\"===t}(e.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>e=>function isOAS30(e){const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(t)}(e.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>e=>e.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(e){return(t,...r)=>n=>{if(n.specSelectors.isOAS3()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null}}const Wa=selectors_onlyOAS3((()=>e=>e.specSelectors.specJson().get(\"servers\",Fa))),findSchema=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",t],null),n=e.getIn([\"json\",\"components\",\"schemas\",t],null);return r||n||null},Ha=selectors_onlyOAS3(((e,{callbacks:t,specPath:r})=>e=>{const n=e.specSelectors.validOperationMethods();return We.Map.isMap(t)?t.reduce(((e,t,a)=>{if(!We.Map.isMap(t))return e;const o=t.reduce(((e,t,o)=>{if(!We.Map.isMap(t))return e;const s=t.entrySeq().filter((([e])=>n.includes(e))).map((([e,t])=>({operation:(0,We.Map)({operation:t}),method:e,path:o,callbackName:a,specPath:r.concat([a,o,e])})));return e.concat(s)}),(0,We.List)());return e.concat(o)}),(0,We.List)()).groupBy((e=>e.callbackName)).map((e=>e.toArray())).toObject():{}}));var callbacks=({callbacks:e,specPath:t,specSelectors:r,getComponent:n})=>{const a=r.callbacksOperations({callbacks:e,specPath:t}),o=Object.keys(a),s=n(\"OperationContainer\",!0);return 0===o.length?ze.default.createElement(\"span\",null,\"No callbacks\"):ze.default.createElement(\"div\",null,o.map((e=>ze.default.createElement(\"div\",{key:`${e}`},ze.default.createElement(\"h2\",null,e),a[e].map((t=>ze.default.createElement(s,{key:`${e}-${t.path}-${t.method}`,op:t.operation,tag:\"callbacks\",method:t.method,path:t.path,specPath:t.specPath,allowTryItOut:!1})))))))};const getDefaultRequestBodyValue=(e,t,r,n)=>{const a=e.getIn([\"content\",t])??(0,We.OrderedMap)(),o=a.get(\"schema\",(0,We.OrderedMap)()).toJS(),s=void 0!==a.get(\"examples\"),l=a.get(\"example\"),i=s?a.getIn([\"examples\",r,\"value\"]):l;return stringify(n.getSampleSchema(o,t,{includeWriteOnly:!0},i))};var request_body=({userHasEditedBody:e,requestBody:t,requestBodyValue:r,requestBodyInclusionSetting:n,requestBodyErrors:a,getComponent:o,getConfigs:s,specSelectors:l,fn:i,contentType:c,isExecute:u,specPath:d,onChange:p,onChangeIncludeEmpty:m,activeExamplesKey:f,updateActiveExamplesKey:h,setRetainRequestBodyValueFlag:g})=>{const handleFile=e=>{p(e.target.files[0])},setIsIncludedOptions=e=>{let t={key:e,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===n.get(e,\"no value\")&&(t.shouldDispatchInit=!0),t},y=o(\"Markdown\",!0),S=o(\"modelExample\"),_=o(\"RequestBodyEditor\"),v=o(\"highlightCode\"),b=o(\"ExamplesSelectValueRetainer\"),w=o(\"Example\"),C=o(\"ParameterIncludeEmpty\"),{showCommonExtensions:x}=s(),k=t?.get(\"description\")??null,O=t?.get(\"content\")??new We.OrderedMap;c=c||O.keySeq().first()||\"\";const N=O.get(c)??(0,We.OrderedMap)(),A=N.get(\"schema\",(0,We.OrderedMap)()),I=N.get(\"examples\",null),R=I?.map(((e,r)=>{const n=e?.get(\"value\",null);return n&&(e=e.set(\"value\",getDefaultRequestBodyValue(t,c,r,i),n)),e}));if(a=We.List.isList(a)?a:(0,We.List)(),!N.size)return null;const B=\"object\"===N.getIn([\"schema\",\"type\"]),T=\"binary\"===N.getIn([\"schema\",\"format\"]),j=\"base64\"===N.getIn([\"schema\",\"format\"]);if(\"application/octet-stream\"===c||0===c.indexOf(\"image/\")||0===c.indexOf(\"audio/\")||0===c.indexOf(\"video/\")||T||j){const e=o(\"Input\");return u?ze.default.createElement(e,{type:\"file\",onChange:handleFile}):ze.default.createElement(\"i\",null,\"Example values are not available for \",ze.default.createElement(\"code\",null,c),\" media types.\")}if(B&&(\"application/x-www-form-urlencoded\"===c||0===c.indexOf(\"multipart/\"))&&A.get(\"properties\",(0,We.OrderedMap)()).size>0){const e=o(\"JsonSchemaForm\"),t=o(\"ParameterExt\"),s=A.get(\"properties\",(0,We.OrderedMap)());return r=We.Map.isMap(r)?r:(0,We.OrderedMap)(),ze.default.createElement(\"div\",{className:\"table-container\"},k&&ze.default.createElement(y,{source:k}),ze.default.createElement(\"table\",null,ze.default.createElement(\"tbody\",null,We.Map.isMap(s)&&s.entrySeq().map((([s,l])=>{if(l.get(\"readOnly\"))return;let c=x?getCommonExtensions(l):null;const d=A.get(\"required\",(0,We.List)()).includes(s),f=l.get(\"type\"),h=l.get(\"format\"),g=l.get(\"description\"),S=r.getIn([s,\"value\"]),_=r.getIn([s,\"errors\"])||a,v=n.get(s)||!1,b=l.has(\"default\")||l.has(\"example\")||l.hasIn([\"items\",\"example\"])||l.hasIn([\"items\",\"default\"]),w=l.has(\"enum\")&&(1===l.get(\"enum\").size||d),k=b||w;let O=\"\";\"array\"!==f||k||(O=[]),(\"object\"===f||k)&&(O=i.getSampleSchema(l,!1,{includeWriteOnly:!0})),\"string\"!=typeof O&&\"object\"===f&&(O=stringify(O)),\"string\"==typeof O&&\"array\"===f&&(O=JSON.parse(O));const N=\"string\"===f&&(\"binary\"===h||\"base64\"===h);return ze.default.createElement(\"tr\",{key:s,className:\"parameters\",\"data-property-name\":s},ze.default.createElement(\"td\",{className:\"parameters-col_name\"},ze.default.createElement(\"div\",{className:d?\"parameter__name required\":\"parameter__name\"},s,d?ze.default.createElement(\"span\",null,\" *\"):null),ze.default.createElement(\"div\",{className:\"parameter__type\"},f,h&&ze.default.createElement(\"span\",{className:\"prop-format\"},\"($\",h,\")\"),x&&c.size?c.entrySeq().map((([e,r])=>ze.default.createElement(t,{key:`${e}-${r}`,xKey:e,xVal:r}))):null),ze.default.createElement(\"div\",{className:\"parameter__deprecated\"},l.get(\"deprecated\")?\"deprecated\":null)),ze.default.createElement(\"td\",{className:\"parameters-col_description\"},ze.default.createElement(y,{source:g}),u?ze.default.createElement(\"div\",null,ze.default.createElement(e,{fn:i,dispatchInitialValue:!N,schema:l,description:s,getComponent:o,value:void 0===S?O:S,required:d,errors:_,onChange:e=>{p(e,[s])}}),d?null:ze.default.createElement(C,{onChange:e=>m(s,e),isIncluded:v,isIncludedOptions:setIsIncludedOptions(s),isDisabled:Array.isArray(S)?0!==S.length:!isEmptyValue(S)})):null))})))))}const P=getDefaultRequestBodyValue(t,c,f,i);let M=null;return getKnownSyntaxHighlighterLanguage(P)&&(M=\"json\"),ze.default.createElement(\"div\",null,k&&ze.default.createElement(y,{source:k}),R?ze.default.createElement(b,{userHasEditedBody:e,examples:R,currentKey:f,currentUserInputValue:r,onSelect:e=>{h(e)},updateValue:p,defaultToFirstExample:!0,getComponent:o,setRetainRequestBodyValueFlag:g}):null,u?ze.default.createElement(\"div\",null,ze.default.createElement(_,{value:r,errors:a,defaultValue:P,onChange:p,getComponent:o})):ze.default.createElement(S,{getComponent:o,getConfigs:s,specSelectors:l,expandDepth:1,isExecute:u,schema:N.get(\"schema\"),specPath:d.push(\"content\",c),example:ze.default.createElement(v,{className:\"body-param__example\",getConfigs:s,language:M,value:stringify(r)||P}),includeWriteOnly:!0}),R?ze.default.createElement(w,{example:R.get(f),getComponent:o,getConfigs:s}):null)};class operation_link_OperationLink extends ze.Component{render(){const{link:e,name:t,getComponent:r}=this.props,n=r(\"Markdown\",!0);let a=e.get(\"operationId\")||e.get(\"operationRef\"),o=e.get(\"parameters\")&&e.get(\"parameters\").toJS(),s=e.get(\"description\");return ze.default.createElement(\"div\",{className:\"operation-link\"},ze.default.createElement(\"div\",{className:\"description\"},ze.default.createElement(\"b\",null,ze.default.createElement(\"code\",null,t)),s?ze.default.createElement(n,{source:s}):null),ze.default.createElement(\"pre\",null,\"Operation `\",a,\"`\",ze.default.createElement(\"br\",null),ze.default.createElement(\"br\",null),\"Parameters \",function padString(e,t){if(\"string\"!=typeof t)return\"\";return t.split(\"\\n\").map(((t,r)=>r>0?Array(e+1).join(\" \")+t:t)).join(\"\\n\")}(0,JSON.stringify(o,null,2))||\"{}\",ze.default.createElement(\"br\",null)))}}var Ga=operation_link_OperationLink;var components_servers=({servers:e,currentServer:t,setSelectedServer:r,setServerVariableValue:n,getServerVariable:a,getEffectiveServerValue:o})=>{const s=(e.find((e=>e.get(\"url\")===t))||(0,We.OrderedMap)()).get(\"variables\")||(0,We.OrderedMap)(),l=0!==s.size;(0,ze.useEffect)((()=>{t||r(e.first()?.get(\"url\"))}),[]),(0,ze.useEffect)((()=>{const a=e.find((e=>e.get(\"url\")===t));if(!a)return void r(e.first().get(\"url\"));(a.get(\"variables\")||(0,We.OrderedMap)()).map(((e,r)=>{n({server:t,key:r,val:e.get(\"default\")||\"\"})}))}),[t,e]);const i=(0,ze.useCallback)((e=>{r(e.target.value)}),[r]),c=(0,ze.useCallback)((e=>{const r=e.target.getAttribute(\"data-variable\"),a=e.target.value;n({server:t,key:r,val:a})}),[n,t]);return ze.default.createElement(\"div\",{className:\"servers\"},ze.default.createElement(\"label\",{htmlFor:\"servers\"},ze.default.createElement(\"select\",{onChange:i,value:t,id:\"servers\"},e.valueSeq().map((e=>ze.default.createElement(\"option\",{value:e.get(\"url\"),key:e.get(\"url\")},e.get(\"url\"),e.get(\"description\")&&` - ${e.get(\"description\")}`))).toArray())),l&&ze.default.createElement(\"div\",null,ze.default.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",ze.default.createElement(\"code\",null,o(t))),ze.default.createElement(\"h4\",null,\"Server variables\"),ze.default.createElement(\"table\",null,ze.default.createElement(\"tbody\",null,s.entrySeq().map((([e,r])=>ze.default.createElement(\"tr\",{key:e},ze.default.createElement(\"td\",null,e),ze.default.createElement(\"td\",null,r.get(\"enum\")?ze.default.createElement(\"select\",{\"data-variable\":e,onChange:c},r.get(\"enum\").map((r=>ze.default.createElement(\"option\",{selected:r===a(t,e),key:r,value:r},r)))):ze.default.createElement(\"input\",{type:\"text\",value:a(t,e)||\"\",onChange:c,\"data-variable\":e})))))))))};class ServersContainer extends ze.default.Component{render(){const{specSelectors:e,oas3Selectors:t,oas3Actions:r,getComponent:n}=this.props,a=e.servers(),o=n(\"Servers\");return a&&a.size?ze.default.createElement(\"div\",null,ze.default.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),ze.default.createElement(o,{servers:a,currentServer:t.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:t.serverVariableValue,getEffectiveServerValue:t.serverEffectiveValue})):null}}const Xa=Function.prototype;class RequestBodyEditor extends ze.PureComponent{static defaultProps={onChange:Xa,userHasEditedBody:!1};constructor(e,t){super(e,t),this.state={value:stringify(e.value)||e.defaultValue},e.onChange(e.value)}applyDefaultValue=e=>{const{onChange:t,defaultValue:r}=e||this.props;return this.setState({value:r}),t(r)};onChange=e=>{this.props.onChange(stringify(e))};onDomChange=e=>{const t=e.target.value;this.setState({value:t},(()=>this.onChange(t)))};UNSAFE_componentWillReceiveProps(e){this.props.value!==e.value&&e.value!==this.state.value&&this.setState({value:stringify(e.value)}),!e.value&&e.defaultValue&&this.state.value&&this.applyDefaultValue(e)}render(){let{getComponent:e,errors:t}=this.props,{value:r}=this.state,n=t.size>0;const a=e(\"TextArea\");return ze.default.createElement(\"div\",{className:\"body-param\"},ze.default.createElement(a,{className:(0,ga.default)(\"body-param__text\",{invalid:n}),title:t.size?t.join(\", \"):\"\",value:r,onChange:this.onDomChange}))}}class HttpAuth extends ze.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n}=this.props,a=this.getValue();this.state={name:r,schema:n,value:a}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,{value:r,name:n}=e.target,a=Object.assign({},this.state.value);n?a[n]=r:a=r,this.setState({value:a},(()=>t(this.state)))};render(){let{schema:e,getComponent:t,errSelectors:r,name:n}=this.props;const a=t(\"Input\"),o=t(\"Row\"),s=t(\"Col\"),l=t(\"authError\"),i=t(\"Markdown\",!0),c=t(\"JumpToPath\",!0),u=(e.get(\"scheme\")||\"\").toLowerCase();let d=this.getValue(),p=r.allErrors().filter((e=>e.get(\"authId\")===n));if(\"basic\"===u){let t=d?d.get(\"username\"):null;return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,ze.default.createElement(\"code\",null,n||e.get(\"name\")),\"  (http, Basic)\",ze.default.createElement(c,{path:[\"securityDefinitions\",n]})),t&&ze.default.createElement(\"h6\",null,\"Authorized\"),ze.default.createElement(o,null,ze.default.createElement(i,{source:e.get(\"description\")})),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),t?ze.default.createElement(\"code\",null,\" \",t,\" \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),t?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),p.valueSeq().map(((e,t)=>ze.default.createElement(l,{error:e,key:t}))))}return\"bearer\"===u?ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,ze.default.createElement(\"code\",null,n||e.get(\"name\")),\"  (http, Bearer)\",ze.default.createElement(c,{path:[\"securityDefinitions\",n]})),d&&ze.default.createElement(\"h6\",null,\"Authorized\"),ze.default.createElement(o,null,ze.default.createElement(i,{source:e.get(\"description\")})),ze.default.createElement(o,null,ze.default.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),d?ze.default.createElement(\"code\",null,\" ****** \"):ze.default.createElement(s,null,ze.default.createElement(a,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),p.valueSeq().map(((e,t)=>ze.default.createElement(l,{error:e,key:t})))):ze.default.createElement(\"div\",null,ze.default.createElement(\"em\",null,ze.default.createElement(\"b\",null,n),\" HTTP authentication: unsupported scheme \",`'${u}'`))}}class OperationServers extends ze.default.Component{setSelectedServer=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setSelectedServer(e,`${t}:${r}`)};setServerVariableValue=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...e,namespace:`${t}:${r}`})};getSelectedServer=()=>{const{path:e,method:t}=this.props;return this.props.getSelectedServer(`${e}:${t}`)};getServerVariable=(e,t)=>{const{path:r,method:n}=this.props;return this.props.getServerVariable({namespace:`${r}:${n}`,server:e},t)};getEffectiveServerValue=e=>{const{path:t,method:r}=this.props;return this.props.getEffectiveServerValue({server:e,namespace:`${t}:${r}`})};render(){const{operationServers:e,pathServers:t,getComponent:r}=this.props;if(!e&&!t)return null;const n=r(\"Servers\"),a=e||t,o=e?\"operation\":\"path\";return ze.default.createElement(\"div\",{className:\"opblock-section operation-servers\"},ze.default.createElement(\"div\",{className:\"opblock-section-header\"},ze.default.createElement(\"div\",{className:\"tab-header\"},ze.default.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),ze.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},ze.default.createElement(\"h4\",{className:\"message\"},\"These \",o,\"-level options override the global server options.\"),ze.default.createElement(n,{servers:a,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}var Ya={Callbacks:callbacks,HttpAuth,RequestBody:request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers,operationLink:Ga};const Qa=new Na.Remarkable(\"commonmark\");Qa.block.ruler.enable([\"table\"]),Qa.set({linkTarget:\"_blank\"});var Za=OAS3ComponentWrapFactory((({source:e,className:t=\"\",getConfigs:r=(()=>({useUnsafeMarkdown:!1}))})=>{if(\"string\"!=typeof e)return null;if(e){const{useUnsafeMarkdown:n}=r(),a=sanitizer(Qa.render(e),{useUnsafeMarkdown:n});let o;return\"string\"==typeof a&&(o=a.trim()),ze.default.createElement(\"div\",{dangerouslySetInnerHTML:{__html:o},className:(0,ga.default)(t,\"renderedMarkdown\")})}return null})),eo=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:n,errSelectors:a,authorized:o,onAuthChange:s,name:l}=t,i=n(\"HttpAuth\");return\"http\"===r.get(\"type\")?ze.default.createElement(i,{key:l,schema:r,name:l,errSelectors:a,authorized:o,getComponent:n,onChange:s}):ze.default.createElement(e,t)})),to=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends ze.Component{render(){let{getConfigs:e,schema:t}=this.props,r=[\"model-box\"],n=null;return!0===t.get(\"deprecated\")&&(r.push(\"deprecated\"),n=ze.default.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),ze.default.createElement(\"div\",{className:r.join(\" \")},n,ze.default.createElement(Model,(0,nr.default)({},this.props,{getConfigs:e,depth:1,expandDepth:this.props.expandDepth||0})))}}var ro=OAS3ComponentWrapFactory(ModelComponent),no=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:n,errors:a,onChange:o}=t,s=r&&r.get?r.get(\"format\"):null,l=r&&r.get?r.get(\"type\"):null,i=n(\"Input\");return l&&\"string\"===l&&s&&(\"binary\"===s||\"base64\"===s)?ze.default.createElement(i,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:e=>{o(e.target.files[0])},disabled:e.isDisabled}):ze.default.createElement(e,t)})),ao={Markdown:Za,AuthItem:eo,OpenAPIVersion:function OAS30ComponentWrapFactory(e){return(t,r)=>n=>\"function\"==typeof r.specSelectors?.isOAS30?r.specSelectors.isOAS30()?ze.default.createElement(e,(0,nr.default)({},n,r,{Ori:t})):ze.default.createElement(t,n):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((e=>{const{Ori:t}=e;return ze.default.createElement(t,{oasVersion:\"3.0\"})})),JsonSchema_string:no,model:ro,onlineValidatorBadge:to};const oo=\"oas3_set_servers\",so=\"oas3_set_request_body_value\",lo=\"oas3_set_request_body_retain_flag\",io=\"oas3_set_request_body_inclusion\",co=\"oas3_set_active_examples_member\",uo=\"oas3_set_request_content_type\",po=\"oas3_set_response_content_type\",mo=\"oas3_set_server_variable_value\",fo=\"oas3_set_request_body_validate_error\",ho=\"oas3_clear_request_body_validate_error\",go=\"oas3_clear_request_body_value\";function setSelectedServer(e,t){return{type:oo,payload:{selectedServerUrl:e,namespace:t}}}function setRequestBodyValue({value:e,pathMethod:t}){return{type:so,payload:{value:e,pathMethod:t}}}const setRetainRequestBodyValueFlag=({value:e,pathMethod:t})=>({type:lo,payload:{value:e,pathMethod:t}});function setRequestBodyInclusion({value:e,pathMethod:t,name:r}){return{type:io,payload:{value:e,pathMethod:t,name:r}}}function setActiveExamplesMember({name:e,pathMethod:t,contextType:r,contextName:n}){return{type:co,payload:{name:e,pathMethod:t,contextType:r,contextName:n}}}function setRequestContentType({value:e,pathMethod:t}){return{type:uo,payload:{value:e,pathMethod:t}}}function setResponseContentType({value:e,path:t,method:r}){return{type:po,payload:{value:e,path:t,method:r}}}function setServerVariableValue({server:e,namespace:t,key:r,val:n}){return{type:mo,payload:{server:e,namespace:t,key:r,val:n}}}const setRequestBodyValidateError=({path:e,method:t,validationErrors:r})=>({type:fo,payload:{path:e,method:t,validationErrors:r}}),clearRequestBodyValidateError=({path:e,method:t})=>({type:ho,payload:{path:e,method:t}}),initRequestBodyValidateError=({pathMethod:e})=>({type:ho,payload:{path:e[0],method:e[1]}}),clearRequestBodyValue=({pathMethod:e})=>({type:go,payload:{pathMethod:e}});var yo=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return _e.default}});const oas3_selectors_onlyOAS3=e=>(t,...r)=>n=>{if(n.getSystem().specSelectors.isOAS3()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null};const Eo=oas3_selectors_onlyOAS3(((e,t)=>{const r=t?[t,\"selectedServer\"]:[\"selectedServer\"];return e.getIn(r)||\"\"})),So=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyValue\"])||null)),_o=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(e,t,r)=>e=>{const{oas3Selectors:n,specSelectors:a,fn:o}=e.getSystem();if(a.isOAS3()){const e=n.requestContentType(t,r);if(e)return getDefaultRequestBodyValue(a.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]),e,n.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),o)}return null},vo=oas3_selectors_onlyOAS3(((e,t,r)=>e=>{const{oas3Selectors:n,specSelectors:a,fn:o}=e;let s=!1;const l=n.requestContentType(t,r);let i=n.requestBodyValue(t,r);const c=a.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]);if(!c)return!1;if(We.Map.isMap(i)&&(i=stringify(i.mapEntries((e=>We.Map.isMap(e[1])?[e[0],e[1].get(\"value\")]:e)).toJS())),We.List.isList(i)&&(i=stringify(i)),l){const e=getDefaultRequestBodyValue(c,l,n.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),o);s=!!i&&i!==e}return s})),bo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyInclusion\"])||(0,We.Map)())),wo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"errors\"])||null)),Co=oas3_selectors_onlyOAS3(((e,t,r,n,a)=>e.getIn([\"examples\",t,r,n,a,\"activeExample\"])||null)),xo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"requestContentType\"])||null)),ko=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"responseContentType\"])||null)),Oo=oas3_selectors_onlyOAS3(((e,t,r)=>{let n;if(\"string\"!=typeof t){const{server:e,namespace:a}=t;n=a?[a,\"serverVariableValues\",e,r]:[\"serverVariableValues\",e,r]}else{n=[\"serverVariableValues\",t,r]}return e.getIn(n)||null})),No=oas3_selectors_onlyOAS3(((e,t)=>{let r;if(\"string\"!=typeof t){const{server:e,namespace:n}=t;r=n?[n,\"serverVariableValues\",e]:[\"serverVariableValues\",e]}else{r=[\"serverVariableValues\",t]}return e.getIn(r)||(0,We.OrderedMap)()})),Ao=oas3_selectors_onlyOAS3(((e,t)=>{var r,n;if(\"string\"!=typeof t){const{server:a,namespace:o}=t;n=a,r=o?e.getIn([o,\"serverVariableValues\",n]):e.getIn([\"serverVariableValues\",n])}else n=t,r=e.getIn([\"serverVariableValues\",n]);r=r||(0,We.OrderedMap)();let a=n;return r.map(((e,t)=>{a=a.replace(new RegExp(`{${(0,yo.default)(t)}}`,\"g\"),e)})),a})),Io=function validateRequestBodyIsRequired(e){return(...t)=>r=>{const n=r.getSystem().specSelectors.specJson();let a=[...t][1]||[];return!n.getIn([\"paths\",...a,\"requestBody\",\"required\"])||e(...t)}}(((e,t)=>((e,t)=>(t=t||[],!!e.getIn([\"requestData\",...t,\"bodyValue\"])))(e,t))),validateShallowRequired=(e,{oas3RequiredRequestBodyContentType:t,oas3RequestContentType:r,oas3RequestBodyValue:n})=>{let a=[];if(!We.Map.isMap(n))return a;let o=[];return Object.keys(t.requestContentType).forEach((e=>{if(e===r){t.requestContentType[e].forEach((e=>{o.indexOf(e)<0&&o.push(e)}))}})),o.forEach((e=>{n.getIn([e,\"value\"])||a.push(e)})),a},Ro=(0,Wr.default)([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]);var Bo={[oo]:(e,{payload:{selectedServerUrl:t,namespace:r}})=>{const n=r?[r,\"selectedServer\"]:[\"selectedServer\"];return e.setIn(n,t)},[so]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;if(!We.Map.isMap(t))return e.setIn([\"requestData\",n,a,\"bodyValue\"],t);let o,s=e.getIn([\"requestData\",n,a,\"bodyValue\"])||(0,We.Map)();We.Map.isMap(s)||(s=(0,We.Map)());const[...l]=t.keys();return l.forEach((e=>{let r=t.getIn([e]);s.has(e)&&We.Map.isMap(r)||(o=s.setIn([e,\"value\"],r))})),e.setIn([\"requestData\",n,a,\"bodyValue\"],o)},[lo]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;return e.setIn([\"requestData\",n,a,\"retainBodyValue\"],t)},[io]:(e,{payload:{value:t,pathMethod:r,name:n}})=>{let[a,o]=r;return e.setIn([\"requestData\",a,o,\"bodyInclusion\",n],t)},[co]:(e,{payload:{name:t,pathMethod:r,contextType:n,contextName:a}})=>{let[o,s]=r;return e.setIn([\"examples\",o,s,n,a,\"activeExample\"],t)},[uo]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;return e.setIn([\"requestData\",n,a,\"requestContentType\"],t)},[po]:(e,{payload:{value:t,path:r,method:n}})=>e.setIn([\"requestData\",r,n,\"responseContentType\"],t),[mo]:(e,{payload:{server:t,namespace:r,key:n,val:a}})=>{const o=r?[r,\"serverVariableValues\",t,n]:[\"serverVariableValues\",t,n];return e.setIn(o,a)},[fo]:(e,{payload:{path:t,method:r,validationErrors:n}})=>{let a=[];if(a.push(\"Required field is not provided\"),n.missingBodyValue)return e.setIn([\"requestData\",t,r,\"errors\"],(0,We.fromJS)(a));if(n.missingRequiredKeys&&n.missingRequiredKeys.length>0){const{missingRequiredKeys:o}=n;return e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,We.fromJS)({}),(e=>o.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,We.fromJS)(a))),e)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),e},[ho]:(e,{payload:{path:t,method:r}})=>{const n=e.getIn([\"requestData\",t,r,\"bodyValue\"]);if(!We.Map.isMap(n))return e.setIn([\"requestData\",t,r,\"errors\"],(0,We.fromJS)([]));const[...a]=n.keys();return a?e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,We.fromJS)({}),(e=>a.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,We.fromJS)([]))),e))):e},[go]:(e,{payload:{pathMethod:t}})=>{let[r,n]=t;const a=e.getIn([\"requestData\",r,n,\"bodyValue\"]);return a?We.Map.isMap(a)?e.setIn([\"requestData\",r,n,\"bodyValue\"],(0,We.Map)()):e.setIn([\"requestData\",r,n,\"bodyValue\"],\"\"):e}};function oas3(){return{components:Ya,wrapComponents:ao,statePlugins:{spec:{wrapSelectors:Le,selectors:Ue},auth:{wrapSelectors:De},oas3:{actions:{...$e},reducers:Bo,selectors:{...Je}}}}}var webhooks=({specSelectors:e,getComponent:t})=>{const r=e.selectWebhooksOperations(),n=Object.keys(r),a=t(\"OperationContainer\",!0);return 0===n.length?null:ze.default.createElement(\"div\",{className:\"webhooks\"},ze.default.createElement(\"h2\",null,\"Webhooks\"),n.map((e=>ze.default.createElement(\"div\",{key:`${e}-webhook`},r[e].map((t=>ze.default.createElement(a,{key:`${e}-${t.method}-webhook`,op:t.operation,tag:\"webhooks\",method:t.method,path:e,specPath:t.specPath,allowTryItOut:!1})))))))};var components_license=({getComponent:e,specSelectors:t})=>{const r=t.selectLicenseNameField(),n=t.selectLicenseUrl(),a=e(\"Link\");return ze.default.createElement(\"div\",{className:\"info__license\"},n?ze.default.createElement(\"div\",{className:\"info__license__url\"},ze.default.createElement(a,{target:\"_blank\",href:sanitizeUrl(n)},r)):ze.default.createElement(\"span\",null,r))};var components_contact=({getComponent:e,specSelectors:t})=>{const r=t.selectContactNameField(),n=t.selectContactUrl(),a=t.selectContactEmailField(),o=e(\"Link\");return ze.default.createElement(\"div\",{className:\"info__contact\"},n&&ze.default.createElement(\"div\",null,ze.default.createElement(o,{href:sanitizeUrl(n),target:\"_blank\"},r,\" - Website\")),a&&ze.default.createElement(o,{href:sanitizeUrl(`mailto:${a}`)},n?`Send email to ${r}`:`Contact ${r}`))};var oas31_components_info=({getComponent:e,specSelectors:t})=>{const r=t.version(),n=t.url(),a=t.basePath(),o=t.host(),s=t.selectInfoSummaryField(),l=t.selectInfoDescriptionField(),i=t.selectInfoTitleField(),c=t.selectInfoTermsOfServiceUrl(),u=t.selectExternalDocsUrl(),d=t.selectExternalDocsDescriptionField(),p=t.contact(),m=t.license(),f=e(\"Markdown\",!0),h=e(\"Link\"),g=e(\"VersionStamp\"),y=e(\"OpenAPIVersion\"),S=e(\"InfoUrl\"),_=e(\"InfoBasePath\"),v=e(\"License\",!0),b=e(\"Contact\",!0),w=e(\"JsonSchemaDialect\",!0);return ze.default.createElement(\"div\",{className:\"info\"},ze.default.createElement(\"hgroup\",{className:\"main\"},ze.default.createElement(\"h2\",{className:\"title\"},i,ze.default.createElement(\"span\",null,r&&ze.default.createElement(g,{version:r}),ze.default.createElement(y,{oasVersion:\"3.1\"}))),(o||a)&&ze.default.createElement(_,{host:o,basePath:a}),n&&ze.default.createElement(S,{getComponent:e,url:n})),s&&ze.default.createElement(\"p\",{className:\"info__summary\"},s),ze.default.createElement(\"div\",{className:\"info__description description\"},ze.default.createElement(f,{source:l})),c&&ze.default.createElement(\"div\",{className:\"info__tos\"},ze.default.createElement(h,{target:\"_blank\",href:sanitizeUrl(c)},\"Terms of service\")),p.size>0&&ze.default.createElement(b,null),m.size>0&&ze.default.createElement(v,null),u&&ze.default.createElement(h,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(u)},d||u),ze.default.createElement(w,null))};var json_schema_dialect=({getComponent:e,specSelectors:t})=>{const r=t.selectJsonSchemaDialectField(),n=t.selectJsonSchemaDialectDefault(),a=e(\"Link\");return ze.default.createElement(ze.default.Fragment,null,r&&r===n&&ze.default.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",ze.default.createElement(a,{target:\"_blank\",href:sanitizeUrl(r)},r)),r&&r!==n&&ze.default.createElement(\"div\",{className:\"error-wrapper\"},ze.default.createElement(\"div\",{className:\"no-margin\"},ze.default.createElement(\"div\",{className:\"errors\"},ze.default.createElement(\"div\",{className:\"errors-wrapper\"},ze.default.createElement(\"h4\",{className:\"center\"},\"Warning\"),ze.default.createElement(\"p\",{className:\"message\"},ze.default.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",ze.default.createElement(a,{target:\"_blank\",href:n},n),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))};var version_pragma_filter=({bypass:e,isSwagger2:t,isOAS3:r,isOAS31:n,alsoShow:a,children:o})=>e?ze.default.createElement(\"div\",null,o):t&&(r||n)?ze.default.createElement(\"div\",{className:\"version-pragma\"},a,ze.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},ze.default.createElement(\"div\",null,ze.default.createElement(\"h3\",null,\"Unable to render this definition\"),ze.default.createElement(\"p\",null,ze.default.createElement(\"code\",null,\"swagger\"),\" and \",ze.default.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),ze.default.createElement(\"p\",null,\"Supported version fields are \",ze.default.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",ze.default.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",ze.default.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):t||r||n?ze.default.createElement(\"div\",null,o):ze.default.createElement(\"div\",{className:\"version-pragma\"},a,ze.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},ze.default.createElement(\"div\",null,ze.default.createElement(\"h3\",null,\"Unable to render this definition\"),ze.default.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),ze.default.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",ze.default.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",ze.default.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",ze.default.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\"))));const getModelName=e=>\"string\"==typeof e&&e.includes(\"#/components/schemas/\")?(e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}})(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,To=(0,ze.forwardRef)((({schema:e,getComponent:t,onToggle:r=(()=>{})},n)=>{const a=t(\"JSONSchema202012\"),o=getModelName(e.get(\"$$ref\")),s=(0,ze.useCallback)(((e,t)=>{r(o,t)}),[o,r]);return ze.default.createElement(a,{name:o,schema:e.toJS(),ref:n,onExpand:s})}));var jo=To;var models=({specActions:e,specSelectors:t,layoutSelectors:r,layoutActions:n,getComponent:a,getConfigs:o})=>{const s=t.selectSchemas(),l=Object.keys(s).length>0,i=[\"components\",\"schemas\"],{docExpansion:c,defaultModelsExpandDepth:u}=o(),d=u>0&&\"none\"!==c,p=r.isShown(i,d),m=a(\"Collapse\"),f=a(\"JSONSchema202012\"),h=a(\"ArrowUpIcon\"),g=a(\"ArrowDownIcon\");(0,ze.useEffect)((()=>{const r=p&&u>1,n=null!=t.specResolvedSubtree(i);r&&!n&&e.requestResolvedSubtree(i)}),[p,u]);const y=(0,ze.useCallback)((()=>{n.show(i,!p)}),[p]),S=(0,ze.useCallback)((e=>{null!==e&&n.readyToScroll(i,e)}),[]),handleJSONSchema202012Ref=e=>t=>{null!==t&&n.readyToScroll([...i,e],t)},handleJSONSchema202012Expand=r=>(n,a)=>{if(a){const n=[...i,r];null!=t.specResolvedSubtree(n)||e.requestResolvedSubtree([...i,r])}};return!l||u<0?null:ze.default.createElement(\"section\",{className:(0,ga.default)(\"models\",{\"is-open\":p}),ref:S},ze.default.createElement(\"h4\",null,ze.default.createElement(\"button\",{\"aria-expanded\":p,className:\"models-control\",onClick:y},ze.default.createElement(\"span\",null,\"Schemas\"),p?ze.default.createElement(h,null):ze.default.createElement(g,null))),ze.default.createElement(m,{isOpened:p},Object.entries(s).map((([e,t])=>ze.default.createElement(f,{key:e,ref:handleJSONSchema202012Ref(e),schema:t,name:e,onExpand:handleJSONSchema202012Expand(e)})))))};var mutual_tls_auth=({schema:e,getComponent:t})=>{const r=t(\"JumpToPath\",!0);return ze.default.createElement(\"div\",null,ze.default.createElement(\"h4\",null,e.get(\"name\"),\" (mutualTLS)\",\" \",ze.default.createElement(r,{path:[\"securityDefinitions\",e.get(\"name\")]})),ze.default.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),ze.default.createElement(\"p\",null,e.get(\"description\")))};class auths_Auths extends ze.default.Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,n=r.map(((e,t)=>t)).toArray();this.setState(n.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(n)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:n}=this.props;const a=t(\"AuthItem\"),o=t(\"oauth2\",!0),s=t(\"Button\"),l=r.authorized(),i=e.filter(((e,t)=>!!l.get(t))),c=e.filter((e=>\"oauth2\"!==e.get(\"type\")&&\"mutualTLS\"!==e.get(\"type\"))),u=e.filter((e=>\"oauth2\"===e.get(\"type\"))),d=e.filter((e=>\"mutualTLS\"===e.get(\"type\")));return ze.default.createElement(\"div\",{className:\"auth-container\"},c.size>0&&ze.default.createElement(\"form\",{onSubmit:this.submitAuth},c.map(((e,r)=>ze.default.createElement(a,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n}))).toArray(),ze.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},c.size===i.size?ze.default.createElement(s,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):ze.default.createElement(s,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),ze.default.createElement(s,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),u.size>0?ze.default.createElement(\"div\",null,ze.default.createElement(\"div\",{className:\"scope-def\"},ze.default.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),ze.default.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>ze.default.createElement(\"div\",{key:t},ze.default.createElement(o,{authorized:l,schema:e,name:t})))).toArray()):null,d.size>0&&ze.default.createElement(\"div\",null,d.map(((e,r)=>ze.default.createElement(a,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n}))).toArray()))}}var Po=auths_Auths;const isOAS31=e=>{const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(t)},fn_createOnlyOAS31Selector=e=>(t,...r)=>n=>{if(n.getSystem().specSelectors.isOAS31()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null},createOnlyOAS31SelectorWrapper=e=>(t,r)=>(n,...a)=>{if(r.getSystem().specSelectors.isOAS31()){const o=e(n,...a);return\"function\"==typeof o?o(t,r):o}return t(...a)},fn_createSystemSelector=e=>(t,...r)=>n=>{const a=e(t,n,...r);return\"function\"==typeof a?a(n):a},createOnlyOAS31ComponentWrapper=e=>(t,r)=>n=>r.specSelectors.isOAS31()?ze.default.createElement(e,(0,nr.default)({},n,{originalComponent:t,getSystem:r.getSystem})):ze.default.createElement(t,n);var Mo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31License\",!0);return ze.default.createElement(t,null)}));var qo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Contact\",!0);return ze.default.createElement(t,null)}));var Lo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Info\",!0);return ze.default.createElement(t,null)}));const Do=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e(),{getComponent:n,fn:a,getConfigs:o}=r,s=o(),l=n(\"OAS31Model\"),i=n(\"JSONSchema202012\"),c=n(\"JSONSchema202012Keyword$schema\"),u=n(\"JSONSchema202012Keyword$vocabulary\"),d=n(\"JSONSchema202012Keyword$id\"),p=n(\"JSONSchema202012Keyword$anchor\"),m=n(\"JSONSchema202012Keyword$dynamicAnchor\"),f=n(\"JSONSchema202012Keyword$ref\"),h=n(\"JSONSchema202012Keyword$dynamicRef\"),g=n(\"JSONSchema202012Keyword$defs\"),y=n(\"JSONSchema202012Keyword$comment\"),S=n(\"JSONSchema202012KeywordAllOf\"),_=n(\"JSONSchema202012KeywordAnyOf\"),v=n(\"JSONSchema202012KeywordOneOf\"),b=n(\"JSONSchema202012KeywordNot\"),w=n(\"JSONSchema202012KeywordIf\"),C=n(\"JSONSchema202012KeywordThen\"),x=n(\"JSONSchema202012KeywordElse\"),k=n(\"JSONSchema202012KeywordDependentSchemas\"),O=n(\"JSONSchema202012KeywordPrefixItems\"),N=n(\"JSONSchema202012KeywordItems\"),A=n(\"JSONSchema202012KeywordContains\"),I=n(\"JSONSchema202012KeywordProperties\"),R=n(\"JSONSchema202012KeywordPatternProperties\"),B=n(\"JSONSchema202012KeywordAdditionalProperties\"),T=n(\"JSONSchema202012KeywordPropertyNames\"),j=n(\"JSONSchema202012KeywordUnevaluatedItems\"),P=n(\"JSONSchema202012KeywordUnevaluatedProperties\"),M=n(\"JSONSchema202012KeywordType\"),q=n(\"JSONSchema202012KeywordEnum\"),L=n(\"JSONSchema202012KeywordConst\"),D=n(\"JSONSchema202012KeywordConstraint\"),U=n(\"JSONSchema202012KeywordDependentRequired\"),$=n(\"JSONSchema202012KeywordContentSchema\"),J=n(\"JSONSchema202012KeywordTitle\"),V=n(\"JSONSchema202012KeywordDescription\"),K=n(\"JSONSchema202012KeywordDefault\"),z=n(\"JSONSchema202012KeywordDeprecated\"),F=n(\"JSONSchema202012KeywordReadOnly\"),W=n(\"JSONSchema202012KeywordWriteOnly\"),H=n(\"JSONSchema202012Accordion\"),G=n(\"JSONSchema202012ExpandDeepButton\"),X=n(\"JSONSchema202012ChevronRightIcon\"),Y=n(\"withJSONSchema202012Context\")(l,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:s.defaultModelExpandDepth,includeReadOnly:Boolean(t.includeReadOnly),includeWriteOnly:Boolean(t.includeWriteOnly)},components:{JSONSchema:i,Keyword$schema:c,Keyword$vocabulary:u,Keyword$id:d,Keyword$anchor:p,Keyword$dynamicAnchor:m,Keyword$ref:f,Keyword$dynamicRef:h,Keyword$defs:g,Keyword$comment:y,KeywordAllOf:S,KeywordAnyOf:_,KeywordOneOf:v,KeywordNot:b,KeywordIf:w,KeywordThen:C,KeywordElse:x,KeywordDependentSchemas:k,KeywordPrefixItems:O,KeywordItems:N,KeywordContains:A,KeywordProperties:I,KeywordPatternProperties:R,KeywordAdditionalProperties:B,KeywordPropertyNames:T,KeywordUnevaluatedItems:j,KeywordUnevaluatedProperties:P,KeywordType:M,KeywordEnum:q,KeywordConst:L,KeywordConstraint:D,KeywordDependentRequired:U,KeywordContentSchema:$,KeywordTitle:J,KeywordDescription:V,KeywordDefault:K,KeywordDeprecated:z,KeywordReadOnly:F,KeywordWriteOnly:W,Accordion:H,ExpandDeepButton:G,ChevronRightIcon:X},fn:{upperFirst:a.upperFirst,isExpandable:a.jsonSchema202012.isExpandable,getProperties:a.jsonSchema202012.getProperties}});return ze.default.createElement(Y,t)}));var Uo=Do;const $o=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const{getComponent:t,fn:r,getConfigs:n}=e(),a=n();if($o.ModelsWithJSONSchemaContext)return ze.default.createElement($o.ModelsWithJSONSchemaContext,null);const o=t(\"OAS31Models\",!0),s=t(\"JSONSchema202012\"),l=t(\"JSONSchema202012Keyword$schema\"),i=t(\"JSONSchema202012Keyword$vocabulary\"),c=t(\"JSONSchema202012Keyword$id\"),u=t(\"JSONSchema202012Keyword$anchor\"),d=t(\"JSONSchema202012Keyword$dynamicAnchor\"),p=t(\"JSONSchema202012Keyword$ref\"),m=t(\"JSONSchema202012Keyword$dynamicRef\"),f=t(\"JSONSchema202012Keyword$defs\"),h=t(\"JSONSchema202012Keyword$comment\"),g=t(\"JSONSchema202012KeywordAllOf\"),y=t(\"JSONSchema202012KeywordAnyOf\"),S=t(\"JSONSchema202012KeywordOneOf\"),_=t(\"JSONSchema202012KeywordNot\"),v=t(\"JSONSchema202012KeywordIf\"),b=t(\"JSONSchema202012KeywordThen\"),w=t(\"JSONSchema202012KeywordElse\"),C=t(\"JSONSchema202012KeywordDependentSchemas\"),x=t(\"JSONSchema202012KeywordPrefixItems\"),k=t(\"JSONSchema202012KeywordItems\"),O=t(\"JSONSchema202012KeywordContains\"),N=t(\"JSONSchema202012KeywordProperties\"),A=t(\"JSONSchema202012KeywordPatternProperties\"),I=t(\"JSONSchema202012KeywordAdditionalProperties\"),R=t(\"JSONSchema202012KeywordPropertyNames\"),B=t(\"JSONSchema202012KeywordUnevaluatedItems\"),T=t(\"JSONSchema202012KeywordUnevaluatedProperties\"),j=t(\"JSONSchema202012KeywordType\"),P=t(\"JSONSchema202012KeywordEnum\"),M=t(\"JSONSchema202012KeywordConst\"),q=t(\"JSONSchema202012KeywordConstraint\"),L=t(\"JSONSchema202012KeywordDependentRequired\"),D=t(\"JSONSchema202012KeywordContentSchema\"),U=t(\"JSONSchema202012KeywordTitle\"),$=t(\"JSONSchema202012KeywordDescription\"),J=t(\"JSONSchema202012KeywordDefault\"),V=t(\"JSONSchema202012KeywordDeprecated\"),K=t(\"JSONSchema202012KeywordReadOnly\"),z=t(\"JSONSchema202012KeywordWriteOnly\"),F=t(\"JSONSchema202012Accordion\"),W=t(\"JSONSchema202012ExpandDeepButton\"),H=t(\"JSONSchema202012ChevronRightIcon\"),G=t(\"withJSONSchema202012Context\");return $o.ModelsWithJSONSchemaContext=G(o,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:a.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},components:{JSONSchema:s,Keyword$schema:l,Keyword$vocabulary:i,Keyword$id:c,Keyword$anchor:u,Keyword$dynamicAnchor:d,Keyword$ref:p,Keyword$dynamicRef:m,Keyword$defs:f,Keyword$comment:h,KeywordAllOf:g,KeywordAnyOf:y,KeywordOneOf:S,KeywordNot:_,KeywordIf:v,KeywordThen:b,KeywordElse:w,KeywordDependentSchemas:C,KeywordPrefixItems:x,KeywordItems:k,KeywordContains:O,KeywordProperties:N,KeywordPatternProperties:A,KeywordAdditionalProperties:I,KeywordPropertyNames:R,KeywordUnevaluatedItems:B,KeywordUnevaluatedProperties:T,KeywordType:j,KeywordEnum:P,KeywordConst:M,KeywordConstraint:q,KeywordDependentRequired:L,KeywordContentSchema:D,KeywordTitle:U,KeywordDescription:$,KeywordDefault:J,KeywordDeprecated:V,KeywordReadOnly:K,KeywordWriteOnly:z,Accordion:F,ExpandDeepButton:W,ChevronRightIcon:H},fn:{upperFirst:r.upperFirst,isExpandable:r.jsonSchema202012.isExpandable,getProperties:r.jsonSchema202012.getProperties}}),ze.default.createElement($o.ModelsWithJSONSchemaContext,null)}));$o.ModelsWithJSONSchemaContext=null;var Jo=$o;var wrap_components_version_pragma_filter=(e,t)=>e=>{const r=t.specSelectors.isOAS31(),n=t.getComponent(\"OAS31VersionPragmaFilter\");return ze.default.createElement(n,(0,nr.default)({isOAS31:r},e))};const Vo=createOnlyOAS31ComponentWrapper((({originalComponent:e,...t})=>{const{getComponent:r,schema:n}=t,a=r(\"MutualTLSAuth\",!0);return\"mutualTLS\"===n.get(\"type\")?ze.default.createElement(a,{schema:n}):ze.default.createElement(e,t)}));var Ko=Vo;var zo=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e().getComponent(\"OAS31Auths\",!0);return ze.default.createElement(r,t)}));const Fo=(0,We.Map)(),Wo=(0,Bt.createSelector)(((e,t)=>t.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>e=>{const t=e.specSelectors.specJson().get(\"webhooks\");return We.Map.isMap(t)?t:Fo},Ho=(0,Bt.createSelector)([(e,t)=>t.specSelectors.webhooks(),(e,t)=>t.specSelectors.validOperationMethods(),(e,t)=>t.specSelectors.specResolvedSubtree([\"webhooks\"])],((e,t)=>e.reduce(((e,r,n)=>{if(!We.Map.isMap(r))return e;const a=r.entrySeq().filter((([e])=>t.includes(e))).map((([e,t])=>({operation:(0,We.Map)({operation:t}),method:e,path:n,specPath:(0,We.List)([\"webhooks\",n,e])})));return e.concat(a)}),(0,We.List)()).groupBy((e=>e.path)).map((e=>e.toArray())).toObject())),selectors_license=()=>e=>{const t=e.specSelectors.info().get(\"license\");return We.Map.isMap(t)?t:Fo},selectLicenseNameField=()=>e=>e.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>e=>e.specSelectors.license().get(\"url\"),Go=(0,Bt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectLicenseIdentifierField=()=>e=>e.specSelectors.license().get(\"identifier\"),selectors_contact=()=>e=>{const t=e.specSelectors.info().get(\"contact\");return We.Map.isMap(t)?t:Fo},selectContactNameField=()=>e=>e.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>e=>e.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>e=>e.specSelectors.contact().get(\"url\"),Xo=(0,Bt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectContactUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectInfoTitleField=()=>e=>e.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>e=>e.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>e=>e.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>e=>e.specSelectors.info().get(\"termsOfService\"),Yo=(0,Bt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectInfoTermsOfServiceField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectExternalDocsDescriptionField=()=>e=>e.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>e=>e.specSelectors.externalDocs().get(\"url\"),Qo=(0,Bt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectExternalDocsUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectJsonSchemaDialectField=()=>e=>e.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",Zo=(0,Bt.createSelector)(((e,t)=>t.specSelectors.definitions()),((e,t)=>t.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((e,t)=>We.Map.isMap(e)?We.Map.isMap(t)?Object.entries(e.toJS()).reduce(((e,[r,n])=>{const a=t.get(r);return e[r]=a?.toJS()||n,e}),{}):e.toJS():{})),wrap_selectors_isOAS3=(e,t)=>(r,...n)=>t.specSelectors.isOAS31()||e(...n),es=createOnlyOAS31SelectorWrapper((()=>(e,t)=>t.oas31Selectors.selectLicenseUrl())),ts=createOnlyOAS31SelectorWrapper((()=>(e,t)=>{const r=t.specSelectors.securityDefinitions();let n=e();return r?(r.entrySeq().forEach((([e,t])=>{\"mutualTLS\"===t.get(\"type\")&&(n=n.push(new We.Map({[e]:t})))})),n):n})),rs=(0,Bt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField(),(e,t)=>t.specSelectors.selectLicenseIdentifierField()],((e,t,r,n)=>r?safeBuildUrl(r,e,{selectedServer:t}):n?`https://spdx.org/licenses/${n}.html`:void 0));var keywords_Example=({schema:e,getSystem:t})=>{const{fn:r}=t(),{hasKeyword:n,stringify:a}=r.jsonSchema202012.useFn();return n(e,\"example\")?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Example\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},a(e.example))):null};var keywords_Xml=({schema:e,getSystem:t})=>{const r=e?.xml||{},{fn:n,getComponent:a}=t(),{useIsExpandedDeeply:o,useComponent:s}=n.jsonSchema202012,l=o(),i=!!(r.name||r.namespace||r.prefix),[c,u]=(0,ze.useState)(l),[d,p]=(0,ze.useState)(!1),m=s(\"Accordion\"),f=s(\"ExpandDeepButton\"),h=a(\"JSONSchema202012DeepExpansionContext\")(),g=(0,ze.useCallback)((()=>{u((e=>!e))}),[]),y=(0,ze.useCallback)(((e,t)=>{u(t),p(t)}),[]);return 0===Object.keys(r).length?null:ze.default.createElement(h.Provider,{value:d},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\"},i?ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(m,{expanded:c,onChange:g},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),ze.default.createElement(f,{expanded:c,onClick:y})):ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===r.attribute&&ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===r.wrapped&&ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!c})},c&&ze.default.createElement(ze.default.Fragment,null,r.name&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.name))),r.namespace&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.namespace))),r.prefix&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.prefix)))))))};var Discriminator_DiscriminatorMapping=({discriminator:e})=>{const t=e?.mapping||{};return 0===Object.keys(t).length?null:Object.entries(t).map((([e,t])=>ze.default.createElement(\"div\",{key:`${e}-${t}`,className:\"json-schema-2020-12-keyword\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},e),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},t))))};var Discriminator_Discriminator=({schema:e,getSystem:t})=>{const r=e?.discriminator||{},{fn:n,getComponent:a}=t(),{useIsExpandedDeeply:o,useComponent:s}=n.jsonSchema202012,l=o(),i=!!r.mapping,[c,u]=(0,ze.useState)(l),[d,p]=(0,ze.useState)(!1),m=s(\"Accordion\"),f=s(\"ExpandDeepButton\"),h=a(\"JSONSchema202012DeepExpansionContext\")(),g=(0,ze.useCallback)((()=>{u((e=>!e))}),[]),y=(0,ze.useCallback)(((e,t)=>{u(t),p(t)}),[]);return 0===Object.keys(r).length?null:ze.default.createElement(h.Provider,{value:d},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\"},i?ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(m,{expanded:c,onChange:g},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),ze.default.createElement(f,{expanded:c,onClick:y})):ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),r.propertyName&&ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},r.propertyName),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!c})},c&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(Discriminator_DiscriminatorMapping,{discriminator:r})))))};var keywords_ExternalDocs=({schema:e,getSystem:t})=>{const r=e?.externalDocs||{},{fn:n,getComponent:a}=t(),{useIsExpandedDeeply:o,useComponent:s}=n.jsonSchema202012,l=o(),i=!(!r.description&&!r.url),[c,u]=(0,ze.useState)(l),[d,p]=(0,ze.useState)(!1),m=s(\"Accordion\"),f=s(\"ExpandDeepButton\"),h=a(\"JSONSchema202012KeywordDescription\"),g=a(\"Link\"),y=a(\"JSONSchema202012DeepExpansionContext\")(),S=(0,ze.useCallback)((()=>{u((e=>!e))}),[]),_=(0,ze.useCallback)(((e,t)=>{u(t),p(t)}),[]);return 0===Object.keys(r).length?null:ze.default.createElement(y.Provider,{value:d},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\"},i?ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(m,{expanded:c,onChange:S},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),ze.default.createElement(f,{expanded:c,onClick:_})):ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!c})},c&&ze.default.createElement(ze.default.Fragment,null,r.description&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(h,{schema:r,getSystem:t})),r.url&&ze.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},ze.default.createElement(g,{target:\"_blank\",href:sanitizeUrl(r.url)},r.url))))))))};var keywords_Description=({schema:e,getSystem:t})=>{if(!e?.description)return null;const{getComponent:r}=t(),n=r(\"Markdown\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},ze.default.createElement(n,{source:e.description})))};var ns=createOnlyOAS31ComponentWrapper(keywords_Description);const as=createOnlyOAS31ComponentWrapper((({schema:e,getSystem:t,originalComponent:r})=>{const{getComponent:n}=t(),a=n(\"JSONSchema202012KeywordDiscriminator\"),o=n(\"JSONSchema202012KeywordXml\"),s=n(\"JSONSchema202012KeywordExample\"),l=n(\"JSONSchema202012KeywordExternalDocs\");return ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(r,{schema:e}),ze.default.createElement(a,{schema:e,getSystem:t}),ze.default.createElement(o,{schema:e,getSystem:t}),ze.default.createElement(l,{schema:e,getSystem:t}),ze.default.createElement(s,{schema:e,getSystem:t}))}));var os=as;var keywords_Properties=({schema:e,getSystem:t})=>{const{fn:r}=t(),{useComponent:n}=r.jsonSchema202012,{getDependentRequired:a,getProperties:o}=r.jsonSchema202012.useFn(),s=r.jsonSchema202012.useConfig(),l=Array.isArray(e?.required)?e.required:[],i=n(\"JSONSchema\"),c=o(e,s);return 0===Object.keys(c).length?null:ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},ze.default.createElement(\"ul\",null,Object.entries(c).map((([t,r])=>{const n=l.includes(t),o=a(t,e);return ze.default.createElement(\"li\",{key:t,className:(0,ga.default)(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":n})},ze.default.createElement(i,{name:t,schema:r,dependentRequired:o}))}))))};var ss=createOnlyOAS31ComponentWrapper(keywords_Properties);const getProperties=(e,{includeReadOnly:t,includeWriteOnly:r})=>{if(!e?.properties)return{};const n=Object.entries(e.properties).filter((([,e])=>(!(!0===e?.readOnly)||t)&&(!(!0===e?.writeOnly)||r)));return Object.fromEntries(n)};var ls=function afterLoad({fn:e,getSystem:t}){if(e.jsonSchema202012){const r=((e,t)=>{const{fn:r}=t();if(\"function\"!=typeof e)return null;const{hasKeyword:n}=r.jsonSchema202012;return t=>e(t)||n(t,\"example\")||t?.xml||t?.discriminator||t?.externalDocs})(e.jsonSchema202012.isExpandable,t);Object.assign(this.fn.jsonSchema202012,{isExpandable:r,getProperties})}if(\"function\"==typeof e.sampleFromSchema&&e.jsonSchema202012){const r=((e,t)=>{const{fn:r,specSelectors:n}=t;return Object.fromEntries(Object.entries(e).map((([e,t])=>{const a=r[e];return[e,(...e)=>n.isOAS31()?t(...e):\"function\"==typeof a?a(...e):void 0]})))})({sampleFromSchema:e.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:e.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:e.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:e.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:e.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:e.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:e.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:e.jsonSchema202012.getXmlSampleSchema,getSampleSchema:e.jsonSchema202012.getSampleSchema},t());Object.assign(this.fn,r)}};var oas31=({fn:e})=>{const t=e.createSystemSelector||fn_createSystemSelector,r=e.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:ls,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:components_license,OAS31Contact:components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:jo,OAS31Models:models,OAS31Auths:Po,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs},wrapComponents:{InfoContainer:Lo,License:Mo,Contact:qo,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:Uo,Models:Jo,AuthItem:Ko,auths:zo,JSONSchema202012KeywordDescription:ns,JSONSchema202012KeywordDefault:os,JSONSchema202012KeywordProperties:ss},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:ts}},spec:{selectors:{isOAS31:t(Wo),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:r(selectLicenseIdentifierField),selectLicenseUrl:t(Go),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:t(Xo),selectInfoTitleField,selectInfoSummaryField:r(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:t(Yo),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:t(Qo),webhooks:r(selectors_webhooks),selectWebhooksOperations:r(t(Ho)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:t(Zo)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:es}},oas31:{selectors:{selectLicenseUrl:r(t(rs))}}}}};const is=qt.default.object,cs=qt.default.bool,us=(qt.default.oneOfType([is,cs]),(0,ze.createContext)(null));us.displayName=\"JSONSchemaContext\";const ds=(0,ze.createContext)(0);ds.displayName=\"JSONSchemaLevelContext\";const ps=(0,ze.createContext)(!1);ps.displayName=\"JSONSchemaDeepExpansionContext\";const ms=(0,ze.createContext)(new Set),useConfig=()=>{const{config:e}=(0,ze.useContext)(us);return e},useComponent=e=>{const{components:t}=(0,ze.useContext)(us);return t[e]||null},useFn=(e=void 0)=>{const{fn:t}=(0,ze.useContext)(us);return void 0!==e?t[e]:t},useLevel=()=>{const e=(0,ze.useContext)(ds);return[e,e+1]},useIsExpanded=()=>{const[e]=useLevel(),{defaultExpandedLevels:t}=useConfig();return t-e>0},useIsExpandedDeeply=()=>(0,ze.useContext)(ps),useRenderedSchemas=(e=void 0)=>{if(void 0===e)return(0,ze.useContext)(ms);const t=(0,ze.useContext)(ms);return new Set([...t,e])},fs=(0,ze.forwardRef)((({schema:e,name:t=\"\",dependentRequired:r=[],onExpand:n=(()=>{})},a)=>{const o=useFn(),s=useIsExpanded(),l=useIsExpandedDeeply(),[i,c]=(0,ze.useState)(s||l),[u,d]=(0,ze.useState)(l),[p,m]=useLevel(),f=(()=>{const[e]=useLevel();return e>0})(),h=o.isExpandable(e)||r.length>0,g=(e=>useRenderedSchemas().has(e))(e),y=useRenderedSchemas(e),S=o.stringifyConstraints(e),_=useComponent(\"Accordion\"),v=useComponent(\"Keyword$schema\"),b=useComponent(\"Keyword$vocabulary\"),w=useComponent(\"Keyword$id\"),C=useComponent(\"Keyword$anchor\"),x=useComponent(\"Keyword$dynamicAnchor\"),k=useComponent(\"Keyword$ref\"),O=useComponent(\"Keyword$dynamicRef\"),N=useComponent(\"Keyword$defs\"),A=useComponent(\"Keyword$comment\"),I=useComponent(\"KeywordAllOf\"),R=useComponent(\"KeywordAnyOf\"),B=useComponent(\"KeywordOneOf\"),T=useComponent(\"KeywordNot\"),j=useComponent(\"KeywordIf\"),P=useComponent(\"KeywordThen\"),M=useComponent(\"KeywordElse\"),q=useComponent(\"KeywordDependentSchemas\"),L=useComponent(\"KeywordPrefixItems\"),D=useComponent(\"KeywordItems\"),U=useComponent(\"KeywordContains\"),$=useComponent(\"KeywordProperties\"),J=useComponent(\"KeywordPatternProperties\"),V=useComponent(\"KeywordAdditionalProperties\"),K=useComponent(\"KeywordPropertyNames\"),z=useComponent(\"KeywordUnevaluatedItems\"),F=useComponent(\"KeywordUnevaluatedProperties\"),W=useComponent(\"KeywordType\"),H=useComponent(\"KeywordEnum\"),G=useComponent(\"KeywordConst\"),X=useComponent(\"KeywordConstraint\"),Y=useComponent(\"KeywordDependentRequired\"),Q=useComponent(\"KeywordContentSchema\"),Z=useComponent(\"KeywordTitle\"),ee=useComponent(\"KeywordDescription\"),te=useComponent(\"KeywordDefault\"),re=useComponent(\"KeywordDeprecated\"),ne=useComponent(\"KeywordReadOnly\"),ae=useComponent(\"KeywordWriteOnly\"),oe=useComponent(\"ExpandDeepButton\");(0,ze.useEffect)((()=>{d(l)}),[l]),(0,ze.useEffect)((()=>{d(u)}),[u]);const se=(0,ze.useCallback)(((e,t)=>{c(t),!t&&d(!1),n(e,t,!1)}),[n]),le=(0,ze.useCallback)(((e,t)=>{c(t),d(t),n(e,t,!0)}),[n]);return ze.default.createElement(ds.Provider,{value:m},ze.default.createElement(ps.Provider,{value:u},ze.default.createElement(ms.Provider,{value:y},ze.default.createElement(\"article\",{ref:a,\"data-json-schema-level\":p,className:(0,ga.default)(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":f,\"json-schema-2020-12--circular\":g})},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-head\"},h&&!g?ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(_,{expanded:i,onChange:se},ze.default.createElement(Z,{title:t,schema:e})),ze.default.createElement(oe,{expanded:i,onClick:le})):ze.default.createElement(Z,{title:t,schema:e}),ze.default.createElement(re,{schema:e}),ze.default.createElement(ne,{schema:e}),ze.default.createElement(ae,{schema:e}),ze.default.createElement(W,{schema:e,isCircular:g}),S.length>0&&S.map((e=>ze.default.createElement(X,{key:`${e.scope}-${e.value}`,constraint:e})))),ze.default.createElement(\"div\",{className:(0,ga.default)(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!i})},i&&ze.default.createElement(ze.default.Fragment,null,ze.default.createElement(ee,{schema:e}),!g&&h&&ze.default.createElement(ze.default.Fragment,null,ze.default.createElement($,{schema:e}),ze.default.createElement(J,{schema:e}),ze.default.createElement(V,{schema:e}),ze.default.createElement(F,{schema:e}),ze.default.createElement(K,{schema:e}),ze.default.createElement(I,{schema:e}),ze.default.createElement(R,{schema:e}),ze.default.createElement(B,{schema:e}),ze.default.createElement(T,{schema:e}),ze.default.createElement(j,{schema:e}),ze.default.createElement(P,{schema:e}),ze.default.createElement(M,{schema:e}),ze.default.createElement(q,{schema:e}),ze.default.createElement(L,{schema:e}),ze.default.createElement(D,{schema:e}),ze.default.createElement(z,{schema:e}),ze.default.createElement(U,{schema:e}),ze.default.createElement(Q,{schema:e})),ze.default.createElement(H,{schema:e}),ze.default.createElement(G,{schema:e}),ze.default.createElement(Y,{schema:e,dependentRequired:r}),ze.default.createElement(te,{schema:e}),ze.default.createElement(v,{schema:e}),ze.default.createElement(b,{schema:e}),ze.default.createElement(w,{schema:e}),ze.default.createElement(C,{schema:e}),ze.default.createElement(x,{schema:e}),ze.default.createElement(k,{schema:e}),!g&&h&&ze.default.createElement(N,{schema:e}),ze.default.createElement(O,{schema:e}),ze.default.createElement(A,{schema:e})))))))}));var hs=fs;var keywords_$schema=({schema:e})=>e?.$schema?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$schema)):null;var $vocabulary_$vocabulary=({schema:e})=>{const t=useIsExpanded(),r=useIsExpandedDeeply(),[n,a]=(0,ze.useState)(t||r),o=useComponent(\"Accordion\"),s=(0,ze.useCallback)((()=>{a((e=>!e))}),[]);return e?.$vocabulary?\"object\"!=typeof e.$vocabulary?null:ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},ze.default.createElement(o,{expanded:n,onChange:s},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",null,n&&Object.entries(e.$vocabulary).map((([e,t])=>ze.default.createElement(\"li\",{key:e,className:(0,ga.default)(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!t})},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e)))))):null};var keywords_$id=({schema:e})=>e?.$id?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$id)):null;var keywords_$anchor=({schema:e})=>e?.$anchor?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$anchor)):null;var keywords_$dynamicAnchor=({schema:e})=>e?.$dynamicAnchor?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicAnchor)):null;var keywords_$ref=({schema:e})=>e?.$ref?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$ref)):null;var keywords_$dynamicRef=({schema:e})=>e?.$dynamicRef?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicRef)):null;var keywords_$defs=({schema:e})=>{const t=e?.$defs||{},r=useIsExpanded(),n=useIsExpandedDeeply(),[a,o]=(0,ze.useState)(r||n),[s,l]=(0,ze.useState)(!1),i=useComponent(\"Accordion\"),c=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=(0,ze.useCallback)((()=>{o((e=>!e))}),[]),p=(0,ze.useCallback)(((e,t)=>{o(t),l(t)}),[]);return 0===Object.keys(t).length?null:ze.default.createElement(ps.Provider,{value:s},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\"},ze.default.createElement(i,{expanded:a,onChange:d},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),ze.default.createElement(c,{expanded:a,onClick:p}),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!a})},a&&ze.default.createElement(ze.default.Fragment,null,Object.entries(t).map((([e,t])=>ze.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},ze.default.createElement(u,{name:e,schema:t}))))))))};var keywords_$comment=({schema:e})=>e?.$comment?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$comment)):null;var keywords_AllOf=({schema:e})=>{const t=e?.allOf||[],r=useFn(),n=useIsExpanded(),a=useIsExpandedDeeply(),[o,s]=(0,ze.useState)(n||a),[l,i]=(0,ze.useState)(!1),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=useComponent(\"KeywordType\"),m=(0,ze.useCallback)((()=>{s((e=>!e))}),[]),f=(0,ze.useCallback)(((e,t)=>{s(t),i(t)}),[]);return Array.isArray(t)&&0!==t.length?ze.default.createElement(ps.Provider,{value:l},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\"},ze.default.createElement(c,{expanded:o,onChange:m},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),ze.default.createElement(u,{expanded:o,onClick:f}),ze.default.createElement(p,{schema:{allOf:t}}),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&ze.default.createElement(ze.default.Fragment,null,t.map(((e,t)=>ze.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},ze.default.createElement(d,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null};var keywords_AnyOf=({schema:e})=>{const t=e?.anyOf||[],r=useFn(),n=useIsExpanded(),a=useIsExpandedDeeply(),[o,s]=(0,ze.useState)(n||a),[l,i]=(0,ze.useState)(!1),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=useComponent(\"KeywordType\"),m=(0,ze.useCallback)((()=>{s((e=>!e))}),[]),f=(0,ze.useCallback)(((e,t)=>{s(t),i(t)}),[]);return Array.isArray(t)&&0!==t.length?ze.default.createElement(ps.Provider,{value:l},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\"},ze.default.createElement(c,{expanded:o,onChange:m},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),ze.default.createElement(u,{expanded:o,onClick:f}),ze.default.createElement(p,{schema:{anyOf:t}}),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&ze.default.createElement(ze.default.Fragment,null,t.map(((e,t)=>ze.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},ze.default.createElement(d,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null};var keywords_OneOf=({schema:e})=>{const t=e?.oneOf||[],r=useFn(),n=useIsExpanded(),a=useIsExpandedDeeply(),[o,s]=(0,ze.useState)(n||a),[l,i]=(0,ze.useState)(!1),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=useComponent(\"KeywordType\"),m=(0,ze.useCallback)((()=>{s((e=>!e))}),[]),f=(0,ze.useCallback)(((e,t)=>{s(t),i(t)}),[]);return Array.isArray(t)&&0!==t.length?ze.default.createElement(ps.Provider,{value:l},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\"},ze.default.createElement(c,{expanded:o,onChange:m},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),ze.default.createElement(u,{expanded:o,onClick:f}),ze.default.createElement(p,{schema:{oneOf:t}}),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&ze.default.createElement(ze.default.Fragment,null,t.map(((e,t)=>ze.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},ze.default.createElement(d,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null};var keywords_Not=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"not\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},ze.default.createElement(r,{name:n,schema:e.not}))};var keywords_If=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"if\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},ze.default.createElement(r,{name:n,schema:e.if}))};var keywords_Then=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"then\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},ze.default.createElement(r,{name:n,schema:e.then}))};var keywords_Else=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"else\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},ze.default.createElement(r,{name:n,schema:e.else}))};var keywords_DependentSchemas=({schema:e})=>{const t=e?.dependentSchemas||[],r=useIsExpanded(),n=useIsExpandedDeeply(),[a,o]=(0,ze.useState)(r||n),[s,l]=(0,ze.useState)(!1),i=useComponent(\"Accordion\"),c=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=(0,ze.useCallback)((()=>{o((e=>!e))}),[]),p=(0,ze.useCallback)(((e,t)=>{o(t),l(t)}),[]);return\"object\"!=typeof t||0===Object.keys(t).length?null:ze.default.createElement(ps.Provider,{value:s},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\"},ze.default.createElement(i,{expanded:a,onChange:d},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),ze.default.createElement(c,{expanded:a,onClick:p}),ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!a})},a&&ze.default.createElement(ze.default.Fragment,null,Object.entries(t).map((([e,t])=>ze.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},ze.default.createElement(u,{name:e,schema:t}))))))))};var keywords_PrefixItems=({schema:e})=>{const t=e?.prefixItems||[],r=useFn(),n=useIsExpanded(),a=useIsExpandedDeeply(),[o,s]=(0,ze.useState)(n||a),[l,i]=(0,ze.useState)(!1),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=useComponent(\"KeywordType\"),m=(0,ze.useCallback)((()=>{s((e=>!e))}),[]),f=(0,ze.useCallback)(((e,t)=>{s(t),i(t)}),[]);return Array.isArray(t)&&0!==t.length?ze.default.createElement(ps.Provider,{value:l},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\"},ze.default.createElement(c,{expanded:o,onChange:m},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),ze.default.createElement(u,{expanded:o,onClick:f}),ze.default.createElement(p,{schema:{prefixItems:t}}),ze.default.createElement(\"ul\",{className:(0,ga.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&ze.default.createElement(ze.default.Fragment,null,t.map(((e,t)=>ze.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},ze.default.createElement(d,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null};var keywords_Items=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"items\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},ze.default.createElement(r,{name:n,schema:e.items}))};var keywords_Contains=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contains\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},ze.default.createElement(r,{name:n,schema:e.contains}))};var keywords_Properties_Properties=({schema:e})=>{const t=useFn(),r=e?.properties||{},n=Array.isArray(e?.required)?e.required:[],a=useComponent(\"JSONSchema\");return 0===Object.keys(r).length?null:ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},ze.default.createElement(\"ul\",null,Object.entries(r).map((([r,o])=>{const s=n.includes(r),l=t.getDependentRequired(r,e);return ze.default.createElement(\"li\",{key:r,className:(0,ga.default)(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":s})},ze.default.createElement(a,{name:r,schema:o,dependentRequired:l}))}))))};var PatternProperties_PatternProperties=({schema:e})=>{const t=e?.patternProperties||{},r=useComponent(\"JSONSchema\");return 0===Object.keys(t).length?null:ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},ze.default.createElement(\"ul\",null,Object.entries(t).map((([e,t])=>ze.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},ze.default.createElement(r,{name:e,schema:t}))))))};var keywords_AdditionalProperties=({schema:e})=>{const t=useFn(),{additionalProperties:r}=e,n=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"additionalProperties\"))return null;const a=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===r?ze.default.createElement(ze.default.Fragment,null,a,ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===r?ze.default.createElement(ze.default.Fragment,null,a,ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):ze.default.createElement(n,{name:a,schema:r}))};var keywords_PropertyNames=({schema:e})=>{const t=useFn(),{propertyNames:r}=e,n=useComponent(\"JSONSchema\"),a=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return t.hasKeyword(e,\"propertyNames\")?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},ze.default.createElement(n,{name:a,schema:r})):null};var keywords_UnevaluatedItems=({schema:e})=>{const t=useFn(),{unevaluatedItems:r}=e,n=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedItems\"))return null;const a=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},ze.default.createElement(n,{name:a,schema:r}))};var keywords_UnevaluatedProperties=({schema:e})=>{const t=useFn(),{unevaluatedProperties:r}=e,n=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedProperties\"))return null;const a=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},ze.default.createElement(n,{name:a,schema:r}))};var keywords_Type=({schema:e,isCircular:t=!1})=>{const r=useFn().getType(e),n=t?\" [circular]\":\"\";return ze.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${r}${n}`)};var Enum_Enum=({schema:e})=>{const t=useFn();return Array.isArray(e?.enum)?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Allowed values\"),ze.default.createElement(\"ul\",null,e.enum.map((e=>{const r=t.stringify(e);return ze.default.createElement(\"li\",{key:r},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},r))})))):null};var keywords_Const=({schema:e})=>{const t=useFn();return t.hasKeyword(e,\"const\")?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Const\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},t.stringify(e.const))):null};const Constraint=({constraint:e})=>ze.default.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`},e.value);var gs=ze.default.memo(Constraint);var DependentRequired_DependentRequired=({dependentRequired:e})=>0===e.length?null:ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),ze.default.createElement(\"ul\",null,e.map((e=>ze.default.createElement(\"li\",{key:e},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},e))))));var keywords_ContentSchema=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contentSchema\"))return null;const n=ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},ze.default.createElement(r,{name:n,schema:e.contentSchema}))};var Title_Title=({title:e=\"\",schema:t})=>{const r=useFn();return e||r.getTitle(t)?ze.default.createElement(\"div\",{className:\"json-schema-2020-12__title\"},e||r.getTitle(t)):null};var keywords_Description_Description=({schema:e})=>e?.description?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},e.description)):null;var keywords_Default=({schema:e})=>{const t=useFn();return t.hasKeyword(e,\"default\")?ze.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"},ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Default\"),ze.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},t.stringify(e.default))):null};var keywords_Deprecated=({schema:e})=>!0!==e?.deprecated?null:ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\");var keywords_ReadOnly=({schema:e})=>!0!==e?.readOnly?null:ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\");var keywords_WriteOnly=({schema:e})=>!0!==e?.writeOnly?null:ze.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\");var Accordion_Accordion=({expanded:e=!1,children:t,onChange:r})=>{const n=useComponent(\"ChevronRightIcon\"),a=(0,ze.useCallback)((t=>{r(t,!e)}),[e,r]);return ze.default.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:a},ze.default.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},t),ze.default.createElement(\"span\",{className:(0,ga.default)(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":e,\"json-schema-2020-12-accordion__icon--collapsed\":!e})},ze.default.createElement(n,null)))};var ExpandDeepButton_ExpandDeepButton=({expanded:e,onClick:t})=>{const r=(0,ze.useCallback)((r=>{t(r,!e)}),[e,t]);return ze.default.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:r},e?\"Collapse all\":\"Expand all\")};var icons_ChevronRight=()=>ze.default.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},ze.default.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"}));const fn_upperFirst=e=>\"string\"==typeof e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,getTitle=e=>{const t=useFn();return e?.title?t.upperFirst(e.title):e?.$anchor?t.upperFirst(e.$anchor):e?.$id?e.$id:\"\"},getType=(e,t=new WeakSet)=>{const r=useFn();if(null==e)return\"any\";if(r.isBooleanJSONSchema(e))return e?\"any\":\"never\";if(\"object\"!=typeof e)return\"any\";if(t.has(e))return\"any\";t.add(e);const{type:n,prefixItems:a,items:o}=e,getArrayType=()=>{if(Array.isArray(a)){const e=a.map((e=>getType(e,t))),r=o?getType(o,t):\"any\";return`array<[${e.join(\", \")}], ${r}>`}if(o){return`array<${getType(o,t)}>`}return\"array<any>\"};if(e.not&&\"any\"===getType(e.not))return\"never\";const handleCombiningKeywords=(r,n)=>{if(Array.isArray(e[r])){return`(${e[r].map((e=>getType(e,t))).join(n)})`}return null},s=[Array.isArray(n)?n.map((e=>\"array\"===e?getArrayType():e)).join(\" | \"):\"array\"===n?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(n)?n:(()=>{if(Object.hasOwn(e,\"prefixItems\")||Object.hasOwn(e,\"items\")||Object.hasOwn(e,\"contains\"))return getArrayType();if(Object.hasOwn(e,\"properties\")||Object.hasOwn(e,\"additionalProperties\")||Object.hasOwn(e,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(e.format))return\"integer\";if([\"float\",\"double\"].includes(e.format))return\"number\";if(Object.hasOwn(e,\"minimum\")||Object.hasOwn(e,\"maximum\")||Object.hasOwn(e,\"exclusiveMinimum\")||Object.hasOwn(e,\"exclusiveMaximum\")||Object.hasOwn(e,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(e,\"pattern\")||Object.hasOwn(e,\"format\")||Object.hasOwn(e,\"minLength\")||Object.hasOwn(e,\"maxLength\"))return\"string\";if(void 0!==e.const){if(null===e.const)return\"null\";if(\"boolean\"==typeof e.const)return\"boolean\";if(\"number\"==typeof e.const)return Number.isInteger(e.const)?\"integer\":\"number\";if(\"string\"==typeof e.const)return\"string\";if(Array.isArray(e.const))return\"array<any>\";if(\"object\"==typeof e.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return t.delete(e),s||\"any\"},isBooleanJSONSchema=e=>\"boolean\"==typeof e,hasKeyword=(e,t)=>null!==e&&\"object\"==typeof e&&Object.hasOwn(e,t),isExpandable=e=>{const t=useFn();return e?.$schema||e?.$vocabulary||e?.$id||e?.$anchor||e?.$dynamicAnchor||e?.$ref||e?.$dynamicRef||e?.$defs||e?.$comment||e?.allOf||e?.anyOf||e?.oneOf||t.hasKeyword(e,\"not\")||t.hasKeyword(e,\"if\")||t.hasKeyword(e,\"then\")||t.hasKeyword(e,\"else\")||e?.dependentSchemas||e?.prefixItems||t.hasKeyword(e,\"items\")||t.hasKeyword(e,\"contains\")||e?.properties||e?.patternProperties||t.hasKeyword(e,\"additionalProperties\")||t.hasKeyword(e,\"propertyNames\")||t.hasKeyword(e,\"unevaluatedItems\")||t.hasKeyword(e,\"unevaluatedProperties\")||e?.description||e?.enum||t.hasKeyword(e,\"const\")||t.hasKeyword(e,\"contentSchema\")||t.hasKeyword(e,\"default\")},fn_stringify=e=>null===e||[\"number\",\"bigint\",\"boolean\"].includes(typeof e)?String(e):Array.isArray(e)?`[${e.map(fn_stringify).join(\", \")}]`:JSON.stringify(e),stringifyConstraintRange=(e,t,r)=>{const n=\"number\"==typeof t,a=\"number\"==typeof r;return n&&a?t===r?`${t} ${e}`:`[${t}, ${r}] ${e}`:n?`>= ${t} ${e}`:a?`<= ${r} ${e}`:null},stringifyConstraints=e=>{const t=[],r=(e=>{if(\"number\"!=typeof e?.multipleOf)return null;if(e.multipleOf<=0)return null;if(1===e.multipleOf)return null;const{multipleOf:t}=e;if(Number.isInteger(t))return`multiple of ${t}`;const r=10**t.toString().split(\".\")[1].length;return`multiple of ${t*r}/${r}`})(e);null!==r&&t.push({scope:\"number\",value:r});const n=(e=>{const t=e?.minimum,r=e?.maximum,n=e?.exclusiveMinimum,a=e?.exclusiveMaximum,o=\"number\"==typeof t,s=\"number\"==typeof r,l=\"number\"==typeof n,i=\"number\"==typeof a,c=l&&(!o||t<n),u=i&&(!s||r>a);if((o||l)&&(s||i))return`${c?\"(\":\"[\"}${c?n:t}, ${u?a:r}${u?\")\":\"]\"}`;if(o||l)return`${c?\">\":\"≥\"} ${c?n:t}`;if(s||i)return`${u?\"<\":\"≤\"} ${u?a:r}`;return null})(e);null!==n&&t.push({scope:\"number\",value:n}),e?.format&&t.push({scope:\"string\",value:e.format});const a=stringifyConstraintRange(\"characters\",e?.minLength,e?.maxLength);null!==a&&t.push({scope:\"string\",value:a}),e?.pattern&&t.push({scope:\"string\",value:`matches ${e?.pattern}`}),e?.contentMediaType&&t.push({scope:\"string\",value:`media type: ${e.contentMediaType}`}),e?.contentEncoding&&t.push({scope:\"string\",value:`encoding: ${e.contentEncoding}`});const o=stringifyConstraintRange(e?.hasUniqueItems?\"unique items\":\"items\",e?.minItems,e?.maxItems);null!==o&&t.push({scope:\"array\",value:o});const s=stringifyConstraintRange(\"contained items\",e?.minContains,e?.maxContains);null!==s&&t.push({scope:\"array\",value:s});const l=stringifyConstraintRange(\"properties\",e?.minProperties,e?.maxProperties);return null!==l&&t.push({scope:\"object\",value:l}),t},getDependentRequired=(e,t)=>t?.dependentRequired?Array.from(Object.entries(t.dependentRequired).reduce(((t,[r,n])=>Array.isArray(n)&&n.includes(e)?(t.add(r),t):t),new Set)):[],withJSONSchemaContext=(e,t={})=>{const r={components:{JSONSchema:hs,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:keywords_Const,KeywordConstraint:gs,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:keywords_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...t.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,...t.config},fn:{upperFirst:fn_upperFirst,getTitle,getType,isBooleanJSONSchema,hasKeyword,isExpandable,stringify:fn_stringify,stringifyConstraints,getDependentRequired,...t.fn}},HOC=t=>ze.default.createElement(us.Provider,{value:r},ze.default.createElement(e,t));return HOC.contexts={JSONSchemaContext:us},HOC.displayName=e.displayName,HOC};var json_schema_2020_12=()=>({components:{JSONSchema202012:hs,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:keywords_Const,JSONSchema202012KeywordConstraint:gs,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:keywords_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,JSONSchema202012DeepExpansionContext:()=>ps},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{isExpandable,hasKeyword,useFn,useConfig,useComponent,useIsExpandedDeeply}}}),ys=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ve.default}});var array=(e,{sample:t})=>((e,t={})=>{const{minItems:r,maxItems:n,uniqueItems:a}=t,{contains:o,minContains:s,maxContains:l}=t;let i=[...e];if(null!=o&&\"object\"==typeof o){if(Number.isInteger(s)&&s>1){const e=i.at(0);for(let t=1;t<s;t+=1)i.unshift(e)}Number.isInteger(l)}if(Number.isInteger(n)&&n>0&&(i=e.slice(0,n)),Number.isInteger(r)&&r>0)for(let e=0;i.length<r;e+=1)i.push(i[e%i.length]);return!0===a&&(i=Array.from(new Set(i))),i})(t,e);var object=()=>{throw new Error(\"Not implemented\")};const bytes=e=>mt()(e),pick=e=>e.at(0),predicates_isBooleanJSONSchema=e=>\"boolean\"==typeof e,isJSONSchemaObject=e=>(0,ys.default)(e),isJSONSchema=e=>predicates_isBooleanJSONSchema(e)||isJSONSchemaObject(e);var email=()=>\"user@example.com\";var idn_email=()=>\"실례@example.com\";var hostname=()=>\"example.com\";var idn_hostname=()=>\"실례.com\";var ipv4=()=>\"198.51.100.42\";var ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\";var uri=()=>\"https://example.com/\";var uri_reference=()=>\"path/index.html\";var iri=()=>\"https://실례.com/\";var iri_reference=()=>\"path/실례.html\";var uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\";var uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\";var json_pointer=()=>\"/a/b/c\";var relative_json_pointer=()=>\"1/0\";var date_time=()=>(new Date).toISOString();var date=()=>(new Date).toISOString().substring(0,10);var time=()=>(new Date).toISOString().substring(11);var duration=()=>\"P3D\";var generators_password=()=>\"********\";var regex=()=>\"^[a-z]+$\";var Es=class Registry{data={};register(e,t){this.data[e]=t}unregister(e){void 0===e?this.data={}:delete this.data[e]}get(e){return this.data[e]}};const Ss=new Es;var api_formatAPI=(e,t)=>\"function\"==typeof t?Ss.register(e,t):null===t?Ss.unregister(e):Ss.get(e),_s=__webpack_require__(287).Buffer;var _7bit=e=>_s.from(e).toString(\"ascii\"),vs=__webpack_require__(287).Buffer;var _8bit=e=>vs.from(e).toString(\"utf8\"),bs=__webpack_require__(287).Buffer;var binary=e=>bs.from(e).toString(\"binary\");var quoted_printable=e=>{let t=\"\";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);if(61===n)t+=\"=3D\";else if(n>=33&&n<=60||n>=62&&n<=126||9===n||32===n)t+=e.charAt(r);else if(13===n||10===n)t+=\"\\r\\n\";else if(n>126){const n=unescape(encodeURIComponent(e.charAt(r)));for(let e=0;e<n.length;e++)t+=\"=\"+(\"0\"+n.charCodeAt(e).toString(16)).slice(-2).toUpperCase()}else t+=\"=\"+(\"0\"+n.toString(16)).slice(-2).toUpperCase()}return t},ws=__webpack_require__(287).Buffer;var base16=e=>ws.from(e).toString(\"hex\"),Cs=__webpack_require__(287).Buffer;var base32=e=>{const t=Cs.from(e).toString(\"utf8\"),r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let n=0,a=\"\",o=0,s=0;for(let e=0;e<t.length;e++)for(o=o<<8|t.charCodeAt(e),s+=8;s>=5;)a+=r.charAt(o>>>s-5&31),s-=5;s>0&&(a+=r.charAt(o<<5-s&31),n=(8-8*t.length%5)%5);for(let e=0;e<n;e++)a+=\"=\";return a},xs=__webpack_require__(287).Buffer;var base64=e=>xs.from(e).toString(\"base64\"),ks=__webpack_require__(287).Buffer;var base64url=e=>ks.from(e).toString(\"base64url\");const Os=new class EncoderRegistry extends Es{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(e,t)=>\"function\"==typeof t?Os.register(e,t):null===t?Os.unregister(e):Os.get(e);encoderAPI.getDefaults=()=>Os.defaults;var Ns=encoderAPI;var As={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"};var Is={\"image/*\":()=>bytes(25).toString(\"binary\")};var Rs={\"audio/*\":()=>bytes(25).toString(\"binary\")};var Bs={\"video/*\":()=>bytes(25).toString(\"binary\")};var Ts={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const js=new class MediaTypeRegistry extends Es{#e={...As,...Is,...Rs,...Bs,...Ts};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(e,t)=>{if(\"function\"==typeof t)return js.register(e,t);if(null===t)return js.unregister(e);const r=e.split(\";\").at(0),n=`${r.split(\"/\").at(0)}/*`;return js.get(e)||js.get(r)||js.get(n)};mediaTypeAPI.getDefaults=()=>js.defaults;var Ps=mediaTypeAPI;var types_string=(e,{sample:t}={})=>{const{contentEncoding:r,contentMediaType:n,contentSchema:a}=e,{pattern:o,format:s}=e,l=Ns(r)||ca.default;let i;if(\"string\"==typeof o)i=(e=>{try{return new Mr.default(e).gen()}catch{return\"string\"}})(o);else if(\"string\"==typeof s)i=(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"email\":return email();case\"idn-email\":return idn_email();case\"hostname\":return hostname();case\"idn-hostname\":return idn_hostname();case\"ipv4\":return ipv4();case\"ipv6\":return ipv6();case\"uri\":return uri();case\"uri-reference\":return uri_reference();case\"iri\":return iri();case\"iri-reference\":return iri_reference();case\"uuid\":return uuid();case\"uri-template\":return uri_template();case\"json-pointer\":return json_pointer();case\"relative-json-pointer\":return relative_json_pointer();case\"date-time\":return date_time();case\"date\":return date();case\"time\":return time();case\"duration\":return duration();case\"password\":return generators_password();case\"regex\":return regex()}return\"string\"})(e);else if(isJSONSchema(a)&&\"string\"==typeof n&&void 0!==t)i=Array.isArray(t)||\"object\"==typeof t?JSON.stringify(t):String(t);else if(\"string\"==typeof n){const t=Ps(n);\"function\"==typeof t&&(i=t(e))}else i=\"string\";return l(((e,t={})=>{const{maxLength:r,minLength:n}=t;let a=e;if(Number.isInteger(r)&&r>0&&(a=a.slice(0,r)),Number.isInteger(n)&&n>0){let e=0;for(;a.length<n;)a+=a[e++%a.length]}return a})(i,e))};var generators_float=()=>.1;var generators_double=()=>.1;const applyNumberConstraints=(e,t={})=>{const{minimum:r,maximum:n,exclusiveMinimum:a,exclusiveMaximum:o}=t,{multipleOf:s}=t,l=Number.isInteger(e)?1:Number.EPSILON;let i=\"number\"==typeof r?r:null,c=\"number\"==typeof n?n:null,u=e;if(\"number\"==typeof a&&(i=null!==i?Math.max(i,a+l):a+l),\"number\"==typeof o&&(c=null!==c?Math.min(c,o-l):o-l),u=i>c&&e||i||c||u,\"number\"==typeof s&&s>0){const e=u%s;u=0===e?u:u+s-e}return u};var types_number=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"float\":return generators_float();case\"double\":return generators_double()}return 0})(e):0,applyNumberConstraints(r,e)};var int32=()=>2**30>>>0;var int64=()=>2**53-1;var types_integer=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"int32\":return int32();case\"int64\":return int64()}return 0})(e):0,applyNumberConstraints(r,e)};var types_boolean=e=>\"boolean\"!=typeof e.default||e.default;var Ms=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(e,t)=>\"string\"==typeof t&&Object.hasOwn(e,t)?e[t]:()=>`Unknown Type: ${t}`});const qs=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=e=>{if(!isJSONSchemaObject(e))return!1;const{examples:t,example:r,default:n}=e;return!!(Array.isArray(t)&&t.length>=1)||(void 0!==n||void 0!==r)},extractExample=e=>{if(!isJSONSchemaObject(e))return null;const{examples:t,example:r,default:n}=e;return Array.isArray(t)&&t.length>=1?t.at(0):void 0!==n?n:void 0!==r?r:void 0},Ls={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};Ls.number=Ls.integer;const Ds=\"string\",inferTypeFromValue=e=>void 0===e?null:null===e?\"null\":Array.isArray(e)?\"array\":Number.isInteger(e)?\"integer\":typeof e,foldType=e=>{if(Array.isArray(e)&&e.length>=1){if(e.includes(\"array\"))return\"array\";if(e.includes(\"object\"))return\"object\";{const t=pick(e);if(qs.includes(t))return t}}return qs.includes(e)?e:null},inferType=(e,t=new WeakSet)=>{if(!isJSONSchemaObject(e))return Ds;if(t.has(e))return Ds;t.add(e);let{type:r,const:n}=e;if(r=foldType(r),\"string\"!=typeof r){const t=Object.keys(Ls);e:for(let n=0;n<t.length;n+=1){const a=t[n],o=Ls[a];for(let t=0;t<o.length;t+=1){const n=o[t];if(Object.hasOwn(e,n)){r=a;break e}}}}if(\"string\"!=typeof r&&void 0!==n){const e=inferTypeFromValue(n);r=\"string\"==typeof e?e:r}if(\"string\"!=typeof r){const combineTypes=r=>{if(Array.isArray(e[r])){const n=e[r].map((e=>inferType(e,t)));return foldType(n)}return null},n=combineTypes(\"allOf\"),a=combineTypes(\"anyOf\"),o=combineTypes(\"oneOf\"),s=e.not?inferType(e.not,t):null;(n||a||o||s)&&(r=foldType([n,a,o,s].filter(Boolean)))}if(\"string\"!=typeof r&&hasExample(e)){const t=extractExample(e),n=inferTypeFromValue(t);r=\"string\"==typeof n?n:r}return t.delete(e),r||Ds},type_getType=e=>inferType(e),typeCast=e=>predicates_isBooleanJSONSchema(e)?(e=>!1===e?{not:{}}:{})(e):isJSONSchemaObject(e)?e:{},merge=(e,t,r={})=>{if(predicates_isBooleanJSONSchema(e)&&!0===e)return!0;if(predicates_isBooleanJSONSchema(e)&&!1===e)return!1;if(predicates_isBooleanJSONSchema(t)&&!0===t)return!0;if(predicates_isBooleanJSONSchema(t)&&!1===t)return!1;if(!isJSONSchema(e))return t;if(!isJSONSchema(t))return e;const n={...t,...e};if(t.type&&e.type&&Array.isArray(t.type)&&\"string\"==typeof t.type){const r=normalizeArray(t.type).concat(e.type);n.type=Array.from(new Set(r))}if(Array.isArray(t.required)&&Array.isArray(e.required)&&(n.required=[...new Set([...e.required,...t.required])]),t.properties&&e.properties){const a=new Set([...Object.keys(t.properties),...Object.keys(e.properties)]);n.properties={};for(const o of a){const a=t.properties[o]||{},s=e.properties[o]||{};a.readOnly&&!r.includeReadOnly||a.writeOnly&&!r.includeWriteOnly?n.required=(n.required||[]).filter((e=>e!==o)):n.properties[o]=merge(s,a,r)}}return isJSONSchema(t.items)&&isJSONSchema(e.items)&&(n.items=merge(e.items,t.items,r)),isJSONSchema(t.contains)&&isJSONSchema(e.contains)&&(n.contains=merge(e.contains,t.contains,r)),isJSONSchema(t.contentSchema)&&isJSONSchema(e.contentSchema)&&(n.contentSchema=merge(e.contentSchema,t.contentSchema,r)),n};var Us=merge;const main_sampleFromSchemaGeneric=(e,t={},r=void 0,n=!1)=>{if(null==e&&void 0===r)return;\"function\"==typeof e?.toJS&&(e=e.toJS()),e=typeCast(e);let a=void 0!==r||hasExample(e);const o=!a&&Array.isArray(e.oneOf)&&e.oneOf.length>0,s=!a&&Array.isArray(e.anyOf)&&e.anyOf.length>0;if(!a&&(o||s)){const r=typeCast(pick(o?e.oneOf:e.anyOf));!(e=Us(e,r,t)).xml&&r.xml&&(e.xml=r.xml),hasExample(e)&&hasExample(r)&&(a=!0)}const l={};let{xml:i,properties:c,additionalProperties:u,items:d,contains:p}=e||{},m=type_getType(e),{includeReadOnly:f,includeWriteOnly:h}=t;i=i||{};let g,{name:y,prefix:S,namespace:_}=i,v={};if(Object.hasOwn(e,\"type\")||(e.type=m),n&&(y=y||\"notagname\",g=(S?`${S}:`:\"\")+y,_)){l[S?`xmlns:${S}`:\"xmlns\"]=_}n&&(v[g]=[]);const b=objectify(c);let w,C=0;const hasExceededMaxProperties=()=>Number.isInteger(e.maxProperties)&&e.maxProperties>0&&C>=e.maxProperties,canAddProperty=t=>!(Number.isInteger(e.maxProperties)&&e.maxProperties>0)||!hasExceededMaxProperties()&&(!(t=>!Array.isArray(e.required)||0===e.required.length||!e.required.includes(t))(t)||e.maxProperties-C-(()=>{if(!Array.isArray(e.required)||0===e.required.length)return 0;let t=0;return n?e.required.forEach((e=>t+=void 0===v[e]?0:1)):e.required.forEach((e=>{t+=void 0===v[g]?.find((t=>void 0!==t[e]))?0:1})),e.required.length-t})()>0);if(w=n?(r,a=void 0)=>{if(e&&b[r]){if(b[r].xml=b[r].xml||{},b[r].xml.attribute){const e=Array.isArray(b[r].enum)?pick(b[r].enum):void 0;if(hasExample(b[r]))l[b[r].xml.name||r]=extractExample(b[r]);else if(void 0!==e)l[b[r].xml.name||r]=e;else{const e=typeCast(b[r]),t=type_getType(e),n=b[r].xml.name||r;l[n]=Ms[t](e)}return}b[r].xml.name=b[r].xml.name||r}else b[r]||!1===u||(b[r]={xml:{name:r}});let o=main_sampleFromSchemaGeneric(b[r],t,a,n);canAddProperty(r)&&(C++,Array.isArray(o)?v[g]=v[g].concat(o):v[g].push(o))}:(r,a)=>{if(canAddProperty(r)){if((0,ys.default)(e.discriminator?.mapping)&&e.discriminator.propertyName===r&&\"string\"==typeof e.$$ref){for(const t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){v[r]=t;break}}else v[r]=main_sampleFromSchemaGeneric(b[r],t,a,n);C++}},a){let a;if(a=void 0!==r?r:extractExample(e),!n){if(\"number\"==typeof a&&\"string\"===m)return`${a}`;if(\"string\"!=typeof a||\"string\"===m)return a;try{return JSON.parse(a)}catch{return a}}if(\"array\"===m){if(!Array.isArray(a)){if(\"string\"==typeof a)return a;a=[a]}let r=[];return isJSONSchemaObject(d)&&(d.xml=d.xml||i||{},d.xml.name=d.xml.name||i.name,r=a.map((e=>main_sampleFromSchemaGeneric(d,t,e,n)))),isJSONSchemaObject(p)&&(p.xml=p.xml||i||{},p.xml.name=p.xml.name||i.name,r=[main_sampleFromSchemaGeneric(p,t,void 0,n),...r]),r=Ms.array(e,{sample:r}),i.wrapped?(v[g]=r,(0,qr.default)(l)||v[g].push({_attr:l})):v=r,v}if(\"object\"===m){if(\"string\"==typeof a)return a;for(const e in a)Object.hasOwn(a,e)&&(b[e]?.readOnly&&!f||b[e]?.writeOnly&&!h||(b[e]?.xml?.attribute?l[b[e].xml.name||e]=a[e]:w(e,a[e])));return(0,qr.default)(l)||v[g].push({_attr:l}),v}return v[g]=(0,qr.default)(l)?a:[{_attr:l},a],v}if(\"array\"===m){let r=[];if(isJSONSchemaObject(p))if(n&&(p.xml=p.xml||e.xml||{},p.xml.name=p.xml.name||i.name),Array.isArray(p.anyOf))r.push(...p.anyOf.map((e=>main_sampleFromSchemaGeneric(Us(e,p,t),t,void 0,n))));else if(Array.isArray(p.oneOf))r.push(...p.oneOf.map((e=>main_sampleFromSchemaGeneric(Us(e,p,t),t,void 0,n))));else{if(!(!n||n&&i.wrapped))return main_sampleFromSchemaGeneric(p,t,void 0,n);r.push(main_sampleFromSchemaGeneric(p,t,void 0,n))}if(isJSONSchemaObject(d))if(n&&(d.xml=d.xml||e.xml||{},d.xml.name=d.xml.name||i.name),Array.isArray(d.anyOf))r.push(...d.anyOf.map((e=>main_sampleFromSchemaGeneric(Us(e,d,t),t,void 0,n))));else if(Array.isArray(d.oneOf))r.push(...d.oneOf.map((e=>main_sampleFromSchemaGeneric(Us(e,d,t),t,void 0,n))));else{if(!(!n||n&&i.wrapped))return main_sampleFromSchemaGeneric(d,t,void 0,n);r.push(main_sampleFromSchemaGeneric(d,t,void 0,n))}return r=Ms.array(e,{sample:r}),n&&i.wrapped?(v[g]=r,(0,qr.default)(l)||v[g].push({_attr:l}),v):r}if(\"object\"===m){for(let e in b)Object.hasOwn(b,e)&&(b[e]?.deprecated||b[e]?.readOnly&&!f||b[e]?.writeOnly&&!h||w(e));if(n&&l&&v[g].push({_attr:l}),hasExceededMaxProperties())return v;if(predicates_isBooleanJSONSchema(u)&&u)n?v[g].push({additionalProp:\"Anything can be here\"}):v.additionalProp1={},C++;else if(isJSONSchemaObject(u)){const r=u,a=main_sampleFromSchemaGeneric(r,t,void 0,n);if(n&&\"string\"==typeof r?.xml?.name&&\"notagname\"!==r?.xml?.name)v[g].push(a);else{const t=Number.isInteger(e.minProperties)&&e.minProperties>0&&C<e.minProperties?e.minProperties-C:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return v;if(n){const t={};t[\"additionalProp\"+e]=a.notagname,v[g].push(t)}else v[\"additionalProp\"+e]=a;C++}}}return v}let x;if(void 0!==e.const)x=e.const;else if(e&&Array.isArray(e.enum))x=pick(normalizeArray(e.enum));else{const r=isJSONSchemaObject(e.contentSchema)?main_sampleFromSchemaGeneric(e.contentSchema,t,void 0,n):void 0;x=Ms[m](e,{sample:r})}return n?(v[g]=(0,qr.default)(l)?x:[{_attr:l},x],v):x},main_createXMLExample=(e,t,r)=>{const n=main_sampleFromSchemaGeneric(e,t,r,!0);if(n)return\"string\"==typeof n?n:Pr()(n,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(e,t,r)=>main_sampleFromSchemaGeneric(e,t,r,!1),main_resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],$s=utils_memoizeN(main_createXMLExample,main_resolver),Js=utils_memoizeN(main_sampleFromSchema,main_resolver),Vs=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Ks=[\"object\"];var fn_get_json_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.jsonSchema202012.memoizedSampleFromSchema(t,r,a),l=typeof s,i=Vs.reduce(((e,t)=>t.when.test(n)?[...e,...t.shouldStringifyTypes]:e),Ks);return(0,it.default)(i,(e=>e===l))?JSON.stringify(s,null,2):s};var fn_get_yaml_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.jsonSchema202012.getJsonSampleSchema(t,r,n,a);let l;try{l=$t.default.dump($t.default.load(s),{lineWidth:-1},{schema:$t.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")};var fn_get_xml_sample_schema=e=>(t,r,n)=>{const{fn:a}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return a.jsonSchema202012.memoizedCreateXMLExample(t,r,n)};var fn_get_sample_schema=e=>(t,r=\"\",n={},a=void 0)=>{const{fn:o}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof a?.toJS&&(a=a.toJS()),/xml/.test(r)?o.jsonSchema202012.getXmlSampleSchema(t,n,a):/(yaml|yml)/.test(r)?o.jsonSchema202012.getYamlSampleSchema(t,n,r,a):o.jsonSchema202012.getJsonSampleSchema(t,n,r,a)};var json_schema_2020_12_samples=({getSystem:e})=>{const t=fn_get_json_sample_schema(e),r=fn_get_yaml_sample_schema(e),n=fn_get_xml_sample_schema(e),a=fn_get_sample_schema(e);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleEncoderAPI:Ns,sampleFormatAPI:api_formatAPI,sampleMediaTypeAPI:Ps,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:Js,memoizedCreateXMLExample:$s,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const{GIT_DIRTY:zs,GIT_COMMIT:Fs,PACKAGE_VERSION:Ws,BUILD_TIME:Hs}={PACKAGE_VERSION:\"5.12.3\",GIT_COMMIT:\"gc002e597\",GIT_DIRTY:!0,BUILD_TIME:\"Wed, 27 Mar 2024 06:57:30 GMT\"};function SwaggerUI(e){at.versions=at.versions||{},at.versions.swaggerUi={version:Ws,gitRevision:Fs,gitDirty:zs,buildTimestamp:Hs};const t={dom_id:null,domNode:null,spec:{},url:\"\",urls:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:null,filter:null,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:e=>e,responseInterceptor:e=>e,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],pluginsOptions:{pluginLoadType:\"legacy\"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"}};let r=e.queryConfigEnabled?(()=>{let e={},t=at.location.search;if(!t)return{};if(\"\"!=t){let r=t.substr(1).split(\"&\");for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(t=r[t].split(\"=\"),e[decodeURIComponent(t[0])]=t[1]&&decodeURIComponent(t[1])||\"\")}return e})():{};const n=e.domNode;delete e.domNode;const a=Ke()({},t,e,r),o={system:{configs:a.configs},plugins:a.presets,pluginsOptions:a.pluginsOptions,state:Ke()({layout:{layout:a.layout,filter:a.filter},spec:{spec:\"\",url:a.url},requestSnippets:a.requestSnippets},a.initialState)};if(a.initialState)for(var s in a.initialState)Object.prototype.hasOwnProperty.call(a.initialState,s)&&void 0===a.initialState[s]&&delete o.state[s];var l=new Store(o);l.register([a.plugins,()=>({fn:a.fn,components:a.components,state:a.state})]);var i=l.getSystem();const downloadSpec=e=>{let t=i.specSelectors.getLocalConfig?i.specSelectors.getLocalConfig():{},o=Ke()({},t,a,e||{},r);if(n&&(o.domNode=n),l.setConfigs(o),i.configsActions.loaded(),null!==e&&(!r.url&&\"object\"==typeof o.spec&&Object.keys(o.spec).length?(i.specActions.updateUrl(\"\"),i.specActions.updateLoadingStatus(\"success\"),i.specActions.updateSpec(JSON.stringify(o.spec))):i.specActions.download&&o.url&&!o.urls&&(i.specActions.updateUrl(o.url),i.specActions.download(o.url))),o.domNode)i.render(o.domNode,\"App\");else if(o.dom_id){let e=document.querySelector(o.dom_id);i.render(e,\"App\")}else null===o.dom_id||null===o.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\");return i},c=r.config||a.configUrl;return c&&i.specActions&&i.specActions.getConfigByUrl?(i.specActions.getConfigByUrl({url:c,loadRemoteConfig:!0,requestInterceptor:a.requestInterceptor,responseInterceptor:a.responseInterceptor},downloadSpec),i):downloadSpec()}SwaggerUI.System=Store,SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SafeRender:safe_render};var Gs=SwaggerUI}();var xe=Ce.A;export{xe as default};\n//# sourceMappingURL=swagger-ui-es-bundle-core.js.map"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui-es-bundle.js",
    "content": "/*! For license information please see swagger-ui-es-bundle.js.LICENSE.txt */\n(()=>{var s,i,u={69119:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.BLANK_URL=i.relativeFirstCharacters=i.urlSchemeRegex=i.ctrlCharactersRegex=i.htmlCtrlEntityRegex=i.htmlEntitiesRegex=i.invalidProtocolRegex=void 0,i.invalidProtocolRegex=/^([^\\w]*)(javascript|data|vbscript)/im,i.htmlEntitiesRegex=/&#(\\w+)(^\\w|;)?/g,i.htmlCtrlEntityRegex=/&(newline|tab);/gi,i.ctrlCharactersRegex=/[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim,i.urlSchemeRegex=/^.+(:|&colon;)/gim,i.relativeFirstCharacters=[\".\",\"/\"],i.BLANK_URL=\"about:blank\"},16750:(s,i,u)=>{\"use strict\";i.J=void 0;var _=u(69119);i.J=function sanitizeUrl(s){if(!s)return _.BLANK_URL;var i,u,w=s;do{i=(w=(u=w,u.replace(_.ctrlCharactersRegex,\"\").replace(_.htmlEntitiesRegex,(function(s,i){return String.fromCharCode(i)}))).replace(_.htmlCtrlEntityRegex,\"\").replace(_.ctrlCharactersRegex,\"\").trim()).match(_.ctrlCharactersRegex)||w.match(_.htmlEntitiesRegex)||w.match(_.htmlCtrlEntityRegex)}while(i&&i.length>0);var x=w;if(!x)return _.BLANK_URL;if(function isRelativeUrlWithoutProtocol(s){return _.relativeFirstCharacters.indexOf(s[0])>-1}(x))return x;var j=x.match(_.urlSchemeRegex);if(!j)return x;var P=j[0];return _.invalidProtocolRegex.test(P)?_.BLANK_URL:x}},67526:(s,i)=>{\"use strict\";i.byteLength=function byteLength(s){var i=getLens(s),u=i[0],_=i[1];return 3*(u+_)/4-_},i.toByteArray=function toByteArray(s){var i,u,x=getLens(s),j=x[0],P=x[1],B=new w(function _byteLength(s,i,u){return 3*(i+u)/4-u}(0,j,P)),$=0,U=P>0?j-4:j;for(u=0;u<U;u+=4)i=_[s.charCodeAt(u)]<<18|_[s.charCodeAt(u+1)]<<12|_[s.charCodeAt(u+2)]<<6|_[s.charCodeAt(u+3)],B[$++]=i>>16&255,B[$++]=i>>8&255,B[$++]=255&i;2===P&&(i=_[s.charCodeAt(u)]<<2|_[s.charCodeAt(u+1)]>>4,B[$++]=255&i);1===P&&(i=_[s.charCodeAt(u)]<<10|_[s.charCodeAt(u+1)]<<4|_[s.charCodeAt(u+2)]>>2,B[$++]=i>>8&255,B[$++]=255&i);return B},i.fromByteArray=function fromByteArray(s){for(var i,_=s.length,w=_%3,x=[],j=16383,P=0,B=_-w;P<B;P+=j)x.push(encodeChunk(s,P,P+j>B?B:P+j));1===w?(i=s[_-1],x.push(u[i>>2]+u[i<<4&63]+\"==\")):2===w&&(i=(s[_-2]<<8)+s[_-1],x.push(u[i>>10]+u[i>>4&63]+u[i<<2&63]+\"=\"));return x.join(\"\")};for(var u=[],_=[],w=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,x=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",j=0;j<64;++j)u[j]=x[j],_[x.charCodeAt(j)]=j;function getLens(s){var i=s.length;if(i%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var u=s.indexOf(\"=\");return-1===u&&(u=i),[u,u===i?0:4-u%4]}function encodeChunk(s,i,_){for(var w,x,j=[],P=i;P<_;P+=3)w=(s[P]<<16&16711680)+(s[P+1]<<8&65280)+(255&s[P+2]),j.push(u[(x=w)>>18&63]+u[x>>12&63]+u[x>>6&63]+u[63&x]);return j.join(\"\")}_[\"-\".charCodeAt(0)]=62,_[\"_\".charCodeAt(0)]=63},48287:(s,i,u)=>{\"use strict\";const _=u(67526),w=u(251),x=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;i.Buffer=Buffer,i.SlowBuffer=function SlowBuffer(s){+s!=s&&(s=0);return Buffer.alloc(+s)},i.INSPECT_MAX_BYTES=50;const j=2147483647;function createBuffer(s){if(s>j)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"');const i=new Uint8Array(s);return Object.setPrototypeOf(i,Buffer.prototype),i}function Buffer(s,i,u){if(\"number\"==typeof s){if(\"string\"==typeof i)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(s)}return from(s,i,u)}function from(s,i,u){if(\"string\"==typeof s)return function fromString(s,i){\"string\"==typeof i&&\"\"!==i||(i=\"utf8\");if(!Buffer.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);const u=0|byteLength(s,i);let _=createBuffer(u);const w=_.write(s,i);w!==u&&(_=_.slice(0,w));return _}(s,i);if(ArrayBuffer.isView(s))return function fromArrayView(s){if(isInstance(s,Uint8Array)){const i=new Uint8Array(s);return fromArrayBuffer(i.buffer,i.byteOffset,i.byteLength)}return fromArrayLike(s)}(s);if(null==s)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s);if(isInstance(s,ArrayBuffer)||s&&isInstance(s.buffer,ArrayBuffer))return fromArrayBuffer(s,i,u);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(s,SharedArrayBuffer)||s&&isInstance(s.buffer,SharedArrayBuffer)))return fromArrayBuffer(s,i,u);if(\"number\"==typeof s)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const _=s.valueOf&&s.valueOf();if(null!=_&&_!==s)return Buffer.from(_,i,u);const w=function fromObject(s){if(Buffer.isBuffer(s)){const i=0|checked(s.length),u=createBuffer(i);return 0===u.length||s.copy(u,0,0,i),u}if(void 0!==s.length)return\"number\"!=typeof s.length||numberIsNaN(s.length)?createBuffer(0):fromArrayLike(s);if(\"Buffer\"===s.type&&Array.isArray(s.data))return fromArrayLike(s.data)}(s);if(w)return w;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof s[Symbol.toPrimitive])return Buffer.from(s[Symbol.toPrimitive](\"string\"),i,u);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s)}function assertSize(s){if(\"number\"!=typeof s)throw new TypeError('\"size\" argument must be of type number');if(s<0)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"')}function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checked(s))}function fromArrayLike(s){const i=s.length<0?0:0|checked(s.length),u=createBuffer(i);for(let _=0;_<i;_+=1)u[_]=255&s[_];return u}function fromArrayBuffer(s,i,u){if(i<0||s.byteLength<i)throw new RangeError('\"offset\" is outside of buffer bounds');if(s.byteLength<i+(u||0))throw new RangeError('\"length\" is outside of buffer bounds');let _;return _=void 0===i&&void 0===u?new Uint8Array(s):void 0===u?new Uint8Array(s,i):new Uint8Array(s,i,u),Object.setPrototypeOf(_,Buffer.prototype),_}function checked(s){if(s>=j)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+j.toString(16)+\" bytes\");return 0|s}function byteLength(s,i){if(Buffer.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||isInstance(s,ArrayBuffer))return s.byteLength;if(\"string\"!=typeof s)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);const u=s.length,_=arguments.length>2&&!0===arguments[2];if(!_&&0===u)return 0;let w=!1;for(;;)switch(i){case\"ascii\":case\"latin1\":case\"binary\":return u;case\"utf8\":case\"utf-8\":return utf8ToBytes(s).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*u;case\"hex\":return u>>>1;case\"base64\":return base64ToBytes(s).length;default:if(w)return _?-1:utf8ToBytes(s).length;i=(\"\"+i).toLowerCase(),w=!0}}function slowToString(s,i,u){let _=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return\"\";if((void 0===u||u>this.length)&&(u=this.length),u<=0)return\"\";if((u>>>=0)<=(i>>>=0))return\"\";for(s||(s=\"utf8\");;)switch(s){case\"hex\":return hexSlice(this,i,u);case\"utf8\":case\"utf-8\":return utf8Slice(this,i,u);case\"ascii\":return asciiSlice(this,i,u);case\"latin1\":case\"binary\":return latin1Slice(this,i,u);case\"base64\":return base64Slice(this,i,u);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,i,u);default:if(_)throw new TypeError(\"Unknown encoding: \"+s);s=(s+\"\").toLowerCase(),_=!0}}function swap(s,i,u){const _=s[i];s[i]=s[u],s[u]=_}function bidirectionalIndexOf(s,i,u,_,w){if(0===s.length)return-1;if(\"string\"==typeof u?(_=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),numberIsNaN(u=+u)&&(u=w?0:s.length-1),u<0&&(u=s.length+u),u>=s.length){if(w)return-1;u=s.length-1}else if(u<0){if(!w)return-1;u=0}if(\"string\"==typeof i&&(i=Buffer.from(i,_)),Buffer.isBuffer(i))return 0===i.length?-1:arrayIndexOf(s,i,u,_,w);if(\"number\"==typeof i)return i&=255,\"function\"==typeof Uint8Array.prototype.indexOf?w?Uint8Array.prototype.indexOf.call(s,i,u):Uint8Array.prototype.lastIndexOf.call(s,i,u):arrayIndexOf(s,[i],u,_,w);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(s,i,u,_,w){let x,j=1,P=s.length,B=i.length;if(void 0!==_&&(\"ucs2\"===(_=String(_).toLowerCase())||\"ucs-2\"===_||\"utf16le\"===_||\"utf-16le\"===_)){if(s.length<2||i.length<2)return-1;j=2,P/=2,B/=2,u/=2}function read(s,i){return 1===j?s[i]:s.readUInt16BE(i*j)}if(w){let _=-1;for(x=u;x<P;x++)if(read(s,x)===read(i,-1===_?0:x-_)){if(-1===_&&(_=x),x-_+1===B)return _*j}else-1!==_&&(x-=x-_),_=-1}else for(u+B>P&&(u=P-B),x=u;x>=0;x--){let u=!0;for(let _=0;_<B;_++)if(read(s,x+_)!==read(i,_)){u=!1;break}if(u)return x}return-1}function hexWrite(s,i,u,_){u=Number(u)||0;const w=s.length-u;_?(_=Number(_))>w&&(_=w):_=w;const x=i.length;let j;for(_>x/2&&(_=x/2),j=0;j<_;++j){const _=parseInt(i.substr(2*j,2),16);if(numberIsNaN(_))return j;s[u+j]=_}return j}function utf8Write(s,i,u,_){return blitBuffer(utf8ToBytes(i,s.length-u),s,u,_)}function asciiWrite(s,i,u,_){return blitBuffer(function asciiToBytes(s){const i=[];for(let u=0;u<s.length;++u)i.push(255&s.charCodeAt(u));return i}(i),s,u,_)}function base64Write(s,i,u,_){return blitBuffer(base64ToBytes(i),s,u,_)}function ucs2Write(s,i,u,_){return blitBuffer(function utf16leToBytes(s,i){let u,_,w;const x=[];for(let j=0;j<s.length&&!((i-=2)<0);++j)u=s.charCodeAt(j),_=u>>8,w=u%256,x.push(w),x.push(_);return x}(i,s.length-u),s,u,_)}function base64Slice(s,i,u){return 0===i&&u===s.length?_.fromByteArray(s):_.fromByteArray(s.slice(i,u))}function utf8Slice(s,i,u){u=Math.min(s.length,u);const _=[];let w=i;for(;w<u;){const i=s[w];let x=null,j=i>239?4:i>223?3:i>191?2:1;if(w+j<=u){let u,_,P,B;switch(j){case 1:i<128&&(x=i);break;case 2:u=s[w+1],128==(192&u)&&(B=(31&i)<<6|63&u,B>127&&(x=B));break;case 3:u=s[w+1],_=s[w+2],128==(192&u)&&128==(192&_)&&(B=(15&i)<<12|(63&u)<<6|63&_,B>2047&&(B<55296||B>57343)&&(x=B));break;case 4:u=s[w+1],_=s[w+2],P=s[w+3],128==(192&u)&&128==(192&_)&&128==(192&P)&&(B=(15&i)<<18|(63&u)<<12|(63&_)<<6|63&P,B>65535&&B<1114112&&(x=B))}}null===x?(x=65533,j=1):x>65535&&(x-=65536,_.push(x>>>10&1023|55296),x=56320|1023&x),_.push(x),w+=j}return function decodeCodePointsArray(s){const i=s.length;if(i<=P)return String.fromCharCode.apply(String,s);let u=\"\",_=0;for(;_<i;)u+=String.fromCharCode.apply(String,s.slice(_,_+=P));return u}(_)}i.kMaxLength=j,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const s=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(s,i),42===s.foo()}catch(s){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(s,i,u){return from(s,i,u)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(s,i,u){return function alloc(s,i,u){return assertSize(s),s<=0?createBuffer(s):void 0!==i?\"string\"==typeof u?createBuffer(s).fill(i,u):createBuffer(s).fill(i):createBuffer(s)}(s,i,u)},Buffer.allocUnsafe=function(s){return allocUnsafe(s)},Buffer.allocUnsafeSlow=function(s){return allocUnsafe(s)},Buffer.isBuffer=function isBuffer(s){return null!=s&&!0===s._isBuffer&&s!==Buffer.prototype},Buffer.compare=function compare(s,i){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),isInstance(i,Uint8Array)&&(i=Buffer.from(i,i.offset,i.byteLength)),!Buffer.isBuffer(s)||!Buffer.isBuffer(i))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(s===i)return 0;let u=s.length,_=i.length;for(let w=0,x=Math.min(u,_);w<x;++w)if(s[w]!==i[w]){u=s[w],_=i[w];break}return u<_?-1:_<u?1:0},Buffer.isEncoding=function isEncoding(s){switch(String(s).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!0;default:return!1}},Buffer.concat=function concat(s,i){if(!Array.isArray(s))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===s.length)return Buffer.alloc(0);let u;if(void 0===i)for(i=0,u=0;u<s.length;++u)i+=s[u].length;const _=Buffer.allocUnsafe(i);let w=0;for(u=0;u<s.length;++u){let i=s[u];if(isInstance(i,Uint8Array))w+i.length>_.length?(Buffer.isBuffer(i)||(i=Buffer.from(i)),i.copy(_,w)):Uint8Array.prototype.set.call(_,i,w);else{if(!Buffer.isBuffer(i))throw new TypeError('\"list\" argument must be an Array of Buffers');i.copy(_,w)}w+=i.length}return _},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const s=this.length;if(s%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let i=0;i<s;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function swap32(){const s=this.length;if(s%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let i=0;i<s;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function swap64(){const s=this.length;if(s%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let i=0;i<s;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(){const s=this.length;return 0===s?\"\":0===arguments.length?utf8Slice(this,0,s):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(s){if(!Buffer.isBuffer(s))throw new TypeError(\"Argument must be a Buffer\");return this===s||0===Buffer.compare(this,s)},Buffer.prototype.inspect=function inspect(){let s=\"\";const u=i.INSPECT_MAX_BYTES;return s=this.toString(\"hex\",0,u).replace(/(.{2})/g,\"$1 \").trim(),this.length>u&&(s+=\" ... \"),\"<Buffer \"+s+\">\"},x&&(Buffer.prototype[x]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(s,i,u,_,w){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),!Buffer.isBuffer(s))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(void 0===i&&(i=0),void 0===u&&(u=s?s.length:0),void 0===_&&(_=0),void 0===w&&(w=this.length),i<0||u>s.length||_<0||w>this.length)throw new RangeError(\"out of range index\");if(_>=w&&i>=u)return 0;if(_>=w)return-1;if(i>=u)return 1;if(this===s)return 0;let x=(w>>>=0)-(_>>>=0),j=(u>>>=0)-(i>>>=0);const P=Math.min(x,j),B=this.slice(_,w),$=s.slice(i,u);for(let s=0;s<P;++s)if(B[s]!==$[s]){x=B[s],j=$[s];break}return x<j?-1:j<x?1:0},Buffer.prototype.includes=function includes(s,i,u){return-1!==this.indexOf(s,i,u)},Buffer.prototype.indexOf=function indexOf(s,i,u){return bidirectionalIndexOf(this,s,i,u,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(s,i,u){return bidirectionalIndexOf(this,s,i,u,!1)},Buffer.prototype.write=function write(s,i,u,_){if(void 0===i)_=\"utf8\",u=this.length,i=0;else if(void 0===u&&\"string\"==typeof i)_=i,u=this.length,i=0;else{if(!isFinite(i))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");i>>>=0,isFinite(u)?(u>>>=0,void 0===_&&(_=\"utf8\")):(_=u,u=void 0)}const w=this.length-i;if((void 0===u||u>w)&&(u=w),s.length>0&&(u<0||i<0)||i>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");_||(_=\"utf8\");let x=!1;for(;;)switch(_){case\"hex\":return hexWrite(this,s,i,u);case\"utf8\":case\"utf-8\":return utf8Write(this,s,i,u);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,s,i,u);case\"base64\":return base64Write(this,s,i,u);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,s,i,u);default:if(x)throw new TypeError(\"Unknown encoding: \"+_);_=(\"\"+_).toLowerCase(),x=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function asciiSlice(s,i,u){let _=\"\";u=Math.min(s.length,u);for(let w=i;w<u;++w)_+=String.fromCharCode(127&s[w]);return _}function latin1Slice(s,i,u){let _=\"\";u=Math.min(s.length,u);for(let w=i;w<u;++w)_+=String.fromCharCode(s[w]);return _}function hexSlice(s,i,u){const _=s.length;(!i||i<0)&&(i=0),(!u||u<0||u>_)&&(u=_);let w=\"\";for(let _=i;_<u;++_)w+=U[s[_]];return w}function utf16leSlice(s,i,u){const _=s.slice(i,u);let w=\"\";for(let s=0;s<_.length-1;s+=2)w+=String.fromCharCode(_[s]+256*_[s+1]);return w}function checkOffset(s,i,u){if(s%1!=0||s<0)throw new RangeError(\"offset is not uint\");if(s+i>u)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(s,i,u,_,w,x){if(!Buffer.isBuffer(s))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(i>w||i<x)throw new RangeError('\"value\" argument is out of bounds');if(u+_>s.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x,x>>=8,s[u++]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,j>>=8,s[u++]=j,u}function wrtBigUInt64BE(s,i,u,_,w){checkIntBI(i,_,w,s,u,7);let x=Number(i&BigInt(4294967295));s[u+7]=x,x>>=8,s[u+6]=x,x>>=8,s[u+5]=x,x>>=8,s[u+4]=x;let j=Number(i>>BigInt(32)&BigInt(4294967295));return s[u+3]=j,j>>=8,s[u+2]=j,j>>=8,s[u+1]=j,j>>=8,s[u]=j,u+8}function checkIEEE754(s,i,u,_,w,x){if(u+_>s.length)throw new RangeError(\"Index out of range\");if(u<0)throw new RangeError(\"Index out of range\")}function writeFloat(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,4),w.write(s,i,u,_,23,4),u+4}function writeDouble(s,i,u,_,x){return i=+i,u>>>=0,x||checkIEEE754(s,0,u,8),w.write(s,i,u,_,52,8),u+8}Buffer.prototype.slice=function slice(s,i){const u=this.length;(s=~~s)<0?(s+=u)<0&&(s=0):s>u&&(s=u),(i=void 0===i?u:~~i)<0?(i+=u)<0&&(i=0):i>u&&(i=u),i<s&&(i=s);const _=this.subarray(s,i);return Object.setPrototypeOf(_,Buffer.prototype),_},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x<i&&(w*=256);)_+=this[s+x]*w;return _},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s+--i],w=1;for(;i>0&&(w*=256);)_+=this[s+--i]*w;return _},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),this[s]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]|this[s+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(s,i){return s>>>=0,i||checkOffset(s,2,this.length),this[s]<<8|this[s+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i+256*this[++s]+65536*this[++s]+this[++s]*2**24,w=this[++s]+256*this[++s]+65536*this[++s]+u*2**24;return BigInt(_)+(BigInt(w)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=i*2**24+65536*this[++s]+256*this[++s]+this[++s],w=this[++s]*2**24+65536*this[++s]+256*this[++s]+u;return(BigInt(_)<<BigInt(32))+BigInt(w)})),Buffer.prototype.readIntLE=function readIntLE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=this[s],w=1,x=0;for(;++x<i&&(w*=256);)_+=this[s+x]*w;return w*=128,_>=w&&(_-=Math.pow(2,8*i)),_},Buffer.prototype.readIntBE=function readIntBE(s,i,u){s>>>=0,i>>>=0,u||checkOffset(s,i,this.length);let _=i,w=1,x=this[s+--_];for(;_>0&&(w*=256);)x+=this[s+--_]*w;return w*=128,x>=w&&(x-=Math.pow(2,8*i)),x},Buffer.prototype.readInt8=function readInt8(s,i){return s>>>=0,i||checkOffset(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},Buffer.prototype.readInt16LE=function readInt16LE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s]|this[s+1]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt16BE=function readInt16BE(s,i){s>>>=0,i||checkOffset(s,2,this.length);const u=this[s+1]|this[s]<<8;return 32768&u?4294901760|u:u},Buffer.prototype.readInt32LE=function readInt32LE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=this[s+4]+256*this[s+5]+65536*this[s+6]+(u<<24);return(BigInt(_)<<BigInt(32))+BigInt(i+256*this[++s]+65536*this[++s]+this[++s]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(s){validateNumber(s>>>=0,\"offset\");const i=this[s],u=this[s+7];void 0!==i&&void 0!==u||boundsError(s,this.length-8);const _=(i<<24)+65536*this[++s]+256*this[++s]+this[++s];return(BigInt(_)<<BigInt(32))+BigInt(this[++s]*2**24+65536*this[++s]+256*this[++s]+u)})),Buffer.prototype.readFloatLE=function readFloatLE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(s,i){return s>>>=0,i||checkOffset(s,4,this.length),w.read(this,s,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(s,i){return s>>>=0,i||checkOffset(s,8,this.length),w.read(this,s,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(s,i,u,_){if(s=+s,i>>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=1,x=0;for(this[i]=255&s;++x<u&&(w*=256);)this[i+x]=s/w&255;return i+u},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(s,i,u,_){if(s=+s,i>>>=0,u>>>=0,!_){checkInt(this,s,i,u,Math.pow(2,8*u)-1,0)}let w=u-1,x=1;for(this[i+w]=255&s;--w>=0&&(x*=256);)this[i+w]=s/x&255;return i+u},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,255,0),this[i]=255&s,i+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,65535,0),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i+3]=s>>>24,this[i+2]=s>>>16,this[i+1]=s>>>8,this[i]=255&s,i+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,4294967295,0),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=0,x=1,j=0;for(this[i]=255&s;++w<u&&(x*=256);)s<0&&0===j&&0!==this[i+w-1]&&(j=1),this[i+w]=(s/x>>0)-j&255;return i+u},Buffer.prototype.writeIntBE=function writeIntBE(s,i,u,_){if(s=+s,i>>>=0,!_){const _=Math.pow(2,8*u-1);checkInt(this,s,i,u,_-1,-_)}let w=u-1,x=1,j=0;for(this[i+w]=255&s;--w>=0&&(x*=256);)s<0&&0===j&&0!==this[i+w+1]&&(j=1),this[i+w]=(s/x>>0)-j&255;return i+u},Buffer.prototype.writeInt8=function writeInt8(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,1,127,-128),s<0&&(s=255+s+1),this[i]=255&s,i+1},Buffer.prototype.writeInt16LE=function writeInt16LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=255&s,this[i+1]=s>>>8,i+2},Buffer.prototype.writeInt16BE=function writeInt16BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,2,32767,-32768),this[i]=s>>>8,this[i+1]=255&s,i+2},Buffer.prototype.writeInt32LE=function writeInt32LE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),this[i]=255&s,this[i+1]=s>>>8,this[i+2]=s>>>16,this[i+3]=s>>>24,i+4},Buffer.prototype.writeInt32BE=function writeInt32BE(s,i,u){return s=+s,i>>>=0,u||checkInt(this,s,i,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[i]=s>>>24,this[i+1]=s>>>16,this[i+2]=s>>>8,this[i+3]=255&s,i+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(s,i=0){return wrtBigUInt64LE(this,s,i,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(s,i=0){return wrtBigUInt64BE(this,s,i,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(s,i,u){return writeFloat(this,s,i,!0,u)},Buffer.prototype.writeFloatBE=function writeFloatBE(s,i,u){return writeFloat(this,s,i,!1,u)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(s,i,u){return writeDouble(this,s,i,!0,u)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(s,i,u){return writeDouble(this,s,i,!1,u)},Buffer.prototype.copy=function copy(s,i,u,_){if(!Buffer.isBuffer(s))throw new TypeError(\"argument should be a Buffer\");if(u||(u=0),_||0===_||(_=this.length),i>=s.length&&(i=s.length),i||(i=0),_>0&&_<u&&(_=u),_===u)return 0;if(0===s.length||0===this.length)return 0;if(i<0)throw new RangeError(\"targetStart out of bounds\");if(u<0||u>=this.length)throw new RangeError(\"Index out of range\");if(_<0)throw new RangeError(\"sourceEnd out of bounds\");_>this.length&&(_=this.length),s.length-i<_-u&&(_=s.length-i+u);const w=_-u;return this===s&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(i,u,_):Uint8Array.prototype.set.call(s,this.subarray(u,_),i),w},Buffer.prototype.fill=function fill(s,i,u,_){if(\"string\"==typeof s){if(\"string\"==typeof i?(_=i,i=0,u=this.length):\"string\"==typeof u&&(_=u,u=this.length),void 0!==_&&\"string\"!=typeof _)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof _&&!Buffer.isEncoding(_))throw new TypeError(\"Unknown encoding: \"+_);if(1===s.length){const i=s.charCodeAt(0);(\"utf8\"===_&&i<128||\"latin1\"===_)&&(s=i)}}else\"number\"==typeof s?s&=255:\"boolean\"==typeof s&&(s=Number(s));if(i<0||this.length<i||this.length<u)throw new RangeError(\"Out of range index\");if(u<=i)return this;let w;if(i>>>=0,u=void 0===u?this.length:u>>>0,s||(s=0),\"number\"==typeof s)for(w=i;w<u;++w)this[w]=s;else{const x=Buffer.isBuffer(s)?s:Buffer.from(s,_),j=x.length;if(0===j)throw new TypeError('The value \"'+s+'\" is invalid for argument \"value\"');for(w=0;w<u-i;++w)this[w+i]=x[w%j]}return this};const B={};function E(s,i,u){B[s]=class NodeError extends u{constructor(){super(),Object.defineProperty(this,\"message\",{value:i.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${s}]`,this.stack,delete this.name}get code(){return s}set code(s){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${s}]: ${this.message}`}}}function addNumericalSeparator(s){let i=\"\",u=s.length;const _=\"-\"===s[0]?1:0;for(;u>=_+4;u-=3)i=`_${s.slice(u-3,u)}${i}`;return`${s.slice(0,u)}${i}`}function checkIntBI(s,i,u,_,w,x){if(s>u||s<i){const _=\"bigint\"==typeof i?\"n\":\"\";let w;throw w=x>3?0===i||i===BigInt(0)?`>= 0${_} and < 2${_} ** ${8*(x+1)}${_}`:`>= -(2${_} ** ${8*(x+1)-1}${_}) and < 2 ** ${8*(x+1)-1}${_}`:`>= ${i}${_} and <= ${u}${_}`,new B.ERR_OUT_OF_RANGE(\"value\",w,s)}!function checkBounds(s,i,u){validateNumber(i,\"offset\"),void 0!==s[i]&&void 0!==s[i+u]||boundsError(i,s.length-(u+1))}(_,w,x)}function validateNumber(s,i){if(\"number\"!=typeof s)throw new B.ERR_INVALID_ARG_TYPE(i,\"number\",s)}function boundsError(s,i,u){if(Math.floor(s)!==s)throw validateNumber(s,u),new B.ERR_OUT_OF_RANGE(u||\"offset\",\"an integer\",s);if(i<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(u||\"offset\",`>= ${u?1:0} and <= ${i}`,s)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(s){return s?`${s} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(s,i){return`The \"${s}\" argument must be of type number. Received type ${typeof i}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(s,i,u){let _=`The value of \"${s}\" is out of range.`,w=u;return Number.isInteger(u)&&Math.abs(u)>2**32?w=addNumericalSeparator(String(u)):\"bigint\"==typeof u&&(w=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(w=addNumericalSeparator(w)),w+=\"n\"),_+=` It must be ${i}. Received ${w}`,_}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(s,i){let u;i=i||1/0;const _=s.length;let w=null;const x=[];for(let j=0;j<_;++j){if(u=s.charCodeAt(j),u>55295&&u<57344){if(!w){if(u>56319){(i-=3)>-1&&x.push(239,191,189);continue}if(j+1===_){(i-=3)>-1&&x.push(239,191,189);continue}w=u;continue}if(u<56320){(i-=3)>-1&&x.push(239,191,189),w=u;continue}u=65536+(w-55296<<10|u-56320)}else w&&(i-=3)>-1&&x.push(239,191,189);if(w=null,u<128){if((i-=1)<0)break;x.push(u)}else if(u<2048){if((i-=2)<0)break;x.push(u>>6|192,63&u|128)}else if(u<65536){if((i-=3)<0)break;x.push(u>>12|224,u>>6&63|128,63&u|128)}else{if(!(u<1114112))throw new Error(\"Invalid code point\");if((i-=4)<0)break;x.push(u>>18|240,u>>12&63|128,u>>6&63|128,63&u|128)}}return x}function base64ToBytes(s){return _.toByteArray(function base64clean(s){if((s=(s=s.split(\"=\")[0]).trim().replace($,\"\")).length<2)return\"\";for(;s.length%4!=0;)s+=\"=\";return s}(s))}function blitBuffer(s,i,u,_){let w;for(w=0;w<_&&!(w+u>=i.length||w>=s.length);++w)i[w+u]=s[w];return w}function isInstance(s,i){return s instanceof i||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===i.name}function numberIsNaN(s){return s!=s}const U=function(){const s=\"0123456789abcdef\",i=new Array(256);for(let u=0;u<16;++u){const _=16*u;for(let w=0;w<16;++w)i[_+w]=s[u]+s[w]}return i}();function defineBigIntMethod(s){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:s}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},38075:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(10487),x=w(_(\"String.prototype.indexOf\"));s.exports=function callBoundIntrinsic(s,i){var u=_(s,!!i);return\"function\"==typeof u&&x(s,\".prototype.\")>-1?w(u):u}},10487:(s,i,u)=>{\"use strict\";var _=u(66743),w=u(70453),x=u(96897),j=u(69675),P=w(\"%Function.prototype.apply%\"),B=w(\"%Function.prototype.call%\"),$=w(\"%Reflect.apply%\",!0)||_.call(B,P),U=u(30655),Y=w(\"%Math.max%\");s.exports=function callBind(s){if(\"function\"!=typeof s)throw new j(\"a function is required\");var i=$(_,B,arguments);return x(i,1+Y(0,s.length-(arguments.length-1)),!0)};var X=function applyBind(){return $(_,P,arguments)};U?U(s.exports,\"apply\",{value:X}):s.exports.apply=X},57427:(s,i)=>{\"use strict\";i.parse=function parse(s,i){if(\"string\"!=typeof s)throw new TypeError(\"argument str must be a string\");var u={},_=(i||{}).decode||decode,w=0;for(;w<s.length;){var x=s.indexOf(\"=\",w);if(-1===x)break;var j=s.indexOf(\";\",w);if(-1===j)j=s.length;else if(j<x){w=s.lastIndexOf(\";\",x-1)+1;continue}var P=s.slice(w,x).trim();if(void 0===u[P]){var B=s.slice(x+1,j).trim();34===B.charCodeAt(0)&&(B=B.slice(1,-1)),u[P]=tryDecode(B,_)}w=j+1}return u},i.serialize=function serialize(s,i,w){var x=w||{},j=x.encode||encode;if(\"function\"!=typeof j)throw new TypeError(\"option encode is invalid\");if(!_.test(s))throw new TypeError(\"argument name is invalid\");var P=j(i);if(P&&!_.test(P))throw new TypeError(\"argument val is invalid\");var B=s+\"=\"+P;if(null!=x.maxAge){var $=x.maxAge-0;if(isNaN($)||!isFinite($))throw new TypeError(\"option maxAge is invalid\");B+=\"; Max-Age=\"+Math.floor($)}if(x.domain){if(!_.test(x.domain))throw new TypeError(\"option domain is invalid\");B+=\"; Domain=\"+x.domain}if(x.path){if(!_.test(x.path))throw new TypeError(\"option path is invalid\");B+=\"; Path=\"+x.path}if(x.expires){var U=x.expires;if(!function isDate(s){return\"[object Date]\"===u.call(s)||s instanceof Date}(U)||isNaN(U.valueOf()))throw new TypeError(\"option expires is invalid\");B+=\"; Expires=\"+U.toUTCString()}x.httpOnly&&(B+=\"; HttpOnly\");x.secure&&(B+=\"; Secure\");x.partitioned&&(B+=\"; Partitioned\");if(x.priority){switch(\"string\"==typeof x.priority?x.priority.toLowerCase():x.priority){case\"low\":B+=\"; Priority=Low\";break;case\"medium\":B+=\"; Priority=Medium\";break;case\"high\":B+=\"; Priority=High\";break;default:throw new TypeError(\"option priority is invalid\")}}if(x.sameSite){switch(\"string\"==typeof x.sameSite?x.sameSite.toLowerCase():x.sameSite){case!0:B+=\"; SameSite=Strict\";break;case\"lax\":B+=\"; SameSite=Lax\";break;case\"strict\":B+=\"; SameSite=Strict\";break;case\"none\":B+=\"; SameSite=None\";break;default:throw new TypeError(\"option sameSite is invalid\")}}return B};var u=Object.prototype.toString,_=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function decode(s){return-1!==s.indexOf(\"%\")?decodeURIComponent(s):s}function encode(s){return encodeURIComponent(s)}function tryDecode(s,i){try{return i(s)}catch(i){return s}}},17965:(s,i,u)=>{\"use strict\";var _=u(16426),w={\"text/plain\":\"Text\",\"text/html\":\"Url\",default:\"Text\"};s.exports=function copy(s,i){var u,x,j,P,B,$,U=!1;i||(i={}),u=i.debug||!1;try{if(j=_(),P=document.createRange(),B=document.getSelection(),($=document.createElement(\"span\")).textContent=s,$.ariaHidden=\"true\",$.style.all=\"unset\",$.style.position=\"fixed\",$.style.top=0,$.style.clip=\"rect(0, 0, 0, 0)\",$.style.whiteSpace=\"pre\",$.style.webkitUserSelect=\"text\",$.style.MozUserSelect=\"text\",$.style.msUserSelect=\"text\",$.style.userSelect=\"text\",$.addEventListener(\"copy\",(function(_){if(_.stopPropagation(),i.format)if(_.preventDefault(),void 0===_.clipboardData){u&&console.warn(\"unable to use e.clipboardData\"),u&&console.warn(\"trying IE specific stuff\"),window.clipboardData.clearData();var x=w[i.format]||w.default;window.clipboardData.setData(x,s)}else _.clipboardData.clearData(),_.clipboardData.setData(i.format,s);i.onCopy&&(_.preventDefault(),i.onCopy(_.clipboardData))})),document.body.appendChild($),P.selectNodeContents($),B.addRange(P),!document.execCommand(\"copy\"))throw new Error(\"copy command was unsuccessful\");U=!0}catch(_){u&&console.error(\"unable to copy using execCommand: \",_),u&&console.warn(\"trying IE specific stuff\");try{window.clipboardData.setData(i.format||\"text\",s),i.onCopy&&i.onCopy(window.clipboardData),U=!0}catch(_){u&&console.error(\"unable to copy using clipboardData: \",_),u&&console.error(\"falling back to prompt\"),x=function format(s){var i=(/mac os x/i.test(navigator.userAgent)?\"⌘\":\"Ctrl\")+\"+C\";return s.replace(/#{\\s*key\\s*}/g,i)}(\"message\"in i?i.message:\"Copy to clipboard: #{key}, Enter\"),window.prompt(x,s)}}finally{B&&(\"function\"==typeof B.removeRange?B.removeRange(P):B.removeAllRanges()),$&&document.body.removeChild($),j()}return U}},2205:function(s,i,u){var _;_=void 0!==u.g?u.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var i,u=String(s),_=u.length,w=-1,x=\"\",j=u.charCodeAt(0);++w<_;)0!=(i=u.charCodeAt(w))?x+=i>=1&&i<=31||127==i||0==w&&i>=48&&i<=57||1==w&&i>=48&&i<=57&&45==j?\"\\\\\"+i.toString(16)+\" \":0==w&&1==_&&45==i||!(i>=128||45==i||95==i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122)?\"\\\\\"+u.charAt(w):u.charAt(w):x+=\"�\";return x};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(_)},81919:(s,i,u)=>{\"use strict\";var _=u(48287).Buffer;function isSpecificValue(s){return s instanceof _||s instanceof Date||s instanceof RegExp}function cloneSpecificValue(s){if(s instanceof _){var i=_.alloc?_.alloc(s.length):new _(s.length);return s.copy(i),i}if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error(\"Unexpected situation\")}function deepCloneArray(s){var i=[];return s.forEach((function(s,u){\"object\"==typeof s&&null!==s?Array.isArray(s)?i[u]=deepCloneArray(s):isSpecificValue(s)?i[u]=cloneSpecificValue(s):i[u]=w({},s):i[u]=s})),i}function safeGetProperty(s,i){return\"__proto__\"===i?void 0:s[i]}var w=s.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var s,i,u=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(_){\"object\"!=typeof _||null===_||Array.isArray(_)||Object.keys(_).forEach((function(x){return i=safeGetProperty(u,x),(s=safeGetProperty(_,x))===u?void 0:\"object\"!=typeof s||null===s?void(u[x]=s):Array.isArray(s)?void(u[x]=deepCloneArray(s)):isSpecificValue(s)?void(u[x]=cloneSpecificValue(s)):\"object\"!=typeof i||null===i||Array.isArray(i)?void(u[x]=w({},s)):void(u[x]=w(i,s))}))})),u}},14744:s=>{\"use strict\";var i=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&\"object\"==typeof s}(s)&&!function isSpecial(s){var i=Object.prototype.toString.call(s);return\"[object RegExp]\"===i||\"[object Date]\"===i||function isReactElement(s){return s.$$typeof===u}(s)}(s)};var u=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function cloneUnlessOtherwiseSpecified(s,i){return!1!==i.clone&&i.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,i):s}function defaultArrayMerge(s,i,u){return s.concat(i).map((function(s){return cloneUnlessOtherwiseSpecified(s,u)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(i){return Object.propertyIsEnumerable.call(s,i)})):[]}(s))}function propertyIsOnObject(s,i){try{return i in s}catch(s){return!1}}function mergeObject(s,i,u){var _={};return u.isMergeableObject(s)&&getKeys(s).forEach((function(i){_[i]=cloneUnlessOtherwiseSpecified(s[i],u)})),getKeys(i).forEach((function(w){(function propertyIsUnsafe(s,i){return propertyIsOnObject(s,i)&&!(Object.hasOwnProperty.call(s,i)&&Object.propertyIsEnumerable.call(s,i))})(s,w)||(propertyIsOnObject(s,w)&&u.isMergeableObject(i[w])?_[w]=function getMergeFunction(s,i){if(!i.customMerge)return deepmerge;var u=i.customMerge(s);return\"function\"==typeof u?u:deepmerge}(w,u)(s[w],i[w],u):_[w]=cloneUnlessOtherwiseSpecified(i[w],u))})),_}function deepmerge(s,u,_){(_=_||{}).arrayMerge=_.arrayMerge||defaultArrayMerge,_.isMergeableObject=_.isMergeableObject||i,_.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var w=Array.isArray(u);return w===Array.isArray(s)?w?_.arrayMerge(s,u,_):mergeObject(s,u,_):cloneUnlessOtherwiseSpecified(u,_)}deepmerge.all=function deepmergeAll(s,i){if(!Array.isArray(s))throw new Error(\"first argument should be an array\");return s.reduce((function(s,u){return deepmerge(s,u,i)}),{})};var _=deepmerge;s.exports=_},30041:(s,i,u)=>{\"use strict\";var _=u(30655),w=u(58068),x=u(69675),j=u(75795);s.exports=function defineDataProperty(s,i,u){if(!s||\"object\"!=typeof s&&\"function\"!=typeof s)throw new x(\"`obj` must be an object or a function`\");if(\"string\"!=typeof i&&\"symbol\"!=typeof i)throw new x(\"`property` must be a string or a symbol`\");if(arguments.length>3&&\"boolean\"!=typeof arguments[3]&&null!==arguments[3])throw new x(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&\"boolean\"!=typeof arguments[4]&&null!==arguments[4])throw new x(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&\"boolean\"!=typeof arguments[5]&&null!==arguments[5])throw new x(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&\"boolean\"!=typeof arguments[6])throw new x(\"`loose`, if provided, must be a boolean\");var P=arguments.length>3?arguments[3]:null,B=arguments.length>4?arguments[4]:null,$=arguments.length>5?arguments[5]:null,U=arguments.length>6&&arguments[6],Y=!!j&&j(s,i);if(_)_(s,i,{configurable:null===$&&Y?Y.configurable:!$,enumerable:null===P&&Y?Y.enumerable:!P,value:u,writable:null===B&&Y?Y.writable:!B});else{if(!U&&(P||B||$))throw new w(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\");s[i]=u}}},42838:function(s){s.exports=function(){\"use strict\";const{entries:s,setPrototypeOf:i,isFrozen:u,getPrototypeOf:_,getOwnPropertyDescriptor:w}=Object;let{freeze:x,seal:j,create:P}=Object,{apply:B,construct:$}=\"undefined\"!=typeof Reflect&&Reflect;x||(x=function freeze(s){return s}),j||(j=function seal(s){return s}),B||(B=function apply(s,i,u){return s.apply(i,u)}),$||($=function construct(s,i){return new s(...i)});const U=unapply(Array.prototype.forEach),Y=unapply(Array.prototype.pop),X=unapply(Array.prototype.push),Z=unapply(String.prototype.toLowerCase),ee=unapply(String.prototype.toString),ie=unapply(String.prototype.match),ae=unapply(String.prototype.replace),le=unapply(String.prototype.indexOf),ce=unapply(String.prototype.trim),pe=unapply(Object.prototype.hasOwnProperty),de=unapply(RegExp.prototype.test),fe=unconstruct(TypeError);function unapply(s){return function(i){for(var u=arguments.length,_=new Array(u>1?u-1:0),w=1;w<u;w++)_[w-1]=arguments[w];return B(s,i,_)}}function unconstruct(s){return function(){for(var i=arguments.length,u=new Array(i),_=0;_<i;_++)u[_]=arguments[_];return $(s,u)}}function addToSet(s,_){let w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z;i&&i(s,null);let x=_.length;for(;x--;){let i=_[x];if(\"string\"==typeof i){const s=w(i);s!==i&&(u(_)||(_[x]=s),i=s)}s[i]=!0}return s}function cleanArray(s){for(let i=0;i<s.length;i++)pe(s,i)||(s[i]=null);return s}function clone(i){const u=P(null);for(const[_,w]of s(i))pe(i,_)&&(Array.isArray(w)?u[_]=cleanArray(w):w&&\"object\"==typeof w&&w.constructor===Object?u[_]=clone(w):u[_]=w);return u}function lookupGetter(s,i){for(;null!==s;){const u=w(s,i);if(u){if(u.get)return unapply(u.get);if(\"function\"==typeof u.value)return unapply(u.value)}s=_(s)}function fallbackValue(){return null}return fallbackValue}const ye=x([\"a\",\"abbr\",\"acronym\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"big\",\"blink\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"content\",\"data\",\"datalist\",\"dd\",\"decorator\",\"del\",\"details\",\"dfn\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"element\",\"em\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meter\",\"nav\",\"nobr\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"select\",\"shadow\",\"small\",\"source\",\"spacer\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]),be=x([\"svg\",\"a\",\"altglyph\",\"altglyphdef\",\"altglyphitem\",\"animatecolor\",\"animatemotion\",\"animatetransform\",\"circle\",\"clippath\",\"defs\",\"desc\",\"ellipse\",\"filter\",\"font\",\"g\",\"glyph\",\"glyphref\",\"hkern\",\"image\",\"line\",\"lineargradient\",\"marker\",\"mask\",\"metadata\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialgradient\",\"rect\",\"stop\",\"style\",\"switch\",\"symbol\",\"text\",\"textpath\",\"title\",\"tref\",\"tspan\",\"view\",\"vkern\"]),_e=x([\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\"]),we=x([\"animate\",\"color-profile\",\"cursor\",\"discard\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignobject\",\"hatch\",\"hatchpath\",\"mesh\",\"meshgradient\",\"meshpatch\",\"meshrow\",\"missing-glyph\",\"script\",\"set\",\"solidcolor\",\"unknown\",\"use\"]),Se=x([\"math\",\"menclose\",\"merror\",\"mfenced\",\"mfrac\",\"mglyph\",\"mi\",\"mlabeledtr\",\"mmultiscripts\",\"mn\",\"mo\",\"mover\",\"mpadded\",\"mphantom\",\"mroot\",\"mrow\",\"ms\",\"mspace\",\"msqrt\",\"mstyle\",\"msub\",\"msup\",\"msubsup\",\"mtable\",\"mtd\",\"mtext\",\"mtr\",\"munder\",\"munderover\",\"mprescripts\"]),xe=x([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),Pe=x([\"#text\"]),Te=x([\"accept\",\"action\",\"align\",\"alt\",\"autocapitalize\",\"autocomplete\",\"autopictureinpicture\",\"autoplay\",\"background\",\"bgcolor\",\"border\",\"capture\",\"cellpadding\",\"cellspacing\",\"checked\",\"cite\",\"class\",\"clear\",\"color\",\"cols\",\"colspan\",\"controls\",\"controlslist\",\"coords\",\"crossorigin\",\"datetime\",\"decoding\",\"default\",\"dir\",\"disabled\",\"disablepictureinpicture\",\"disableremoteplayback\",\"download\",\"draggable\",\"enctype\",\"enterkeyhint\",\"face\",\"for\",\"headers\",\"height\",\"hidden\",\"high\",\"href\",\"hreflang\",\"id\",\"inputmode\",\"integrity\",\"ismap\",\"kind\",\"label\",\"lang\",\"list\",\"loading\",\"loop\",\"low\",\"max\",\"maxlength\",\"media\",\"method\",\"min\",\"minlength\",\"multiple\",\"muted\",\"name\",\"nonce\",\"noshade\",\"novalidate\",\"nowrap\",\"open\",\"optimum\",\"pattern\",\"placeholder\",\"playsinline\",\"poster\",\"preload\",\"pubdate\",\"radiogroup\",\"readonly\",\"rel\",\"required\",\"rev\",\"reversed\",\"role\",\"rows\",\"rowspan\",\"spellcheck\",\"scope\",\"selected\",\"shape\",\"size\",\"sizes\",\"span\",\"srclang\",\"start\",\"src\",\"srcset\",\"step\",\"style\",\"summary\",\"tabindex\",\"title\",\"translate\",\"type\",\"usemap\",\"valign\",\"value\",\"width\",\"xmlns\",\"slot\"]),Re=x([\"accent-height\",\"accumulate\",\"additive\",\"alignment-baseline\",\"ascent\",\"attributename\",\"attributetype\",\"azimuth\",\"basefrequency\",\"baseline-shift\",\"begin\",\"bias\",\"by\",\"class\",\"clip\",\"clippathunits\",\"clip-path\",\"clip-rule\",\"color\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"cx\",\"cy\",\"d\",\"dx\",\"dy\",\"diffuseconstant\",\"direction\",\"display\",\"divisor\",\"dur\",\"edgemode\",\"elevation\",\"end\",\"fill\",\"fill-opacity\",\"fill-rule\",\"filter\",\"filterunits\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"fx\",\"fy\",\"g1\",\"g2\",\"glyph-name\",\"glyphref\",\"gradientunits\",\"gradienttransform\",\"height\",\"href\",\"id\",\"image-rendering\",\"in\",\"in2\",\"k\",\"k1\",\"k2\",\"k3\",\"k4\",\"kerning\",\"keypoints\",\"keysplines\",\"keytimes\",\"lang\",\"lengthadjust\",\"letter-spacing\",\"kernelmatrix\",\"kernelunitlength\",\"lighting-color\",\"local\",\"marker-end\",\"marker-mid\",\"marker-start\",\"markerheight\",\"markerunits\",\"markerwidth\",\"maskcontentunits\",\"maskunits\",\"max\",\"mask\",\"media\",\"method\",\"mode\",\"min\",\"name\",\"numoctaves\",\"offset\",\"operator\",\"opacity\",\"order\",\"orient\",\"orientation\",\"origin\",\"overflow\",\"paint-order\",\"path\",\"pathlength\",\"patterncontentunits\",\"patterntransform\",\"patternunits\",\"points\",\"preservealpha\",\"preserveaspectratio\",\"primitiveunits\",\"r\",\"rx\",\"ry\",\"radius\",\"refx\",\"refy\",\"repeatcount\",\"repeatdur\",\"restart\",\"result\",\"rotate\",\"scale\",\"seed\",\"shape-rendering\",\"specularconstant\",\"specularexponent\",\"spreadmethod\",\"startoffset\",\"stddeviation\",\"stitchtiles\",\"stop-color\",\"stop-opacity\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke\",\"stroke-width\",\"style\",\"surfacescale\",\"systemlanguage\",\"tabindex\",\"targetx\",\"targety\",\"transform\",\"transform-origin\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"textlength\",\"type\",\"u1\",\"u2\",\"unicode\",\"values\",\"viewbox\",\"visibility\",\"version\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"width\",\"word-spacing\",\"wrap\",\"writing-mode\",\"xchannelselector\",\"ychannelselector\",\"x\",\"x1\",\"x2\",\"xmlns\",\"y\",\"y1\",\"y2\",\"z\",\"zoomandpan\"]),qe=x([\"accent\",\"accentunder\",\"align\",\"bevelled\",\"close\",\"columnsalign\",\"columnlines\",\"columnspan\",\"denomalign\",\"depth\",\"dir\",\"display\",\"displaystyle\",\"encoding\",\"fence\",\"frame\",\"height\",\"href\",\"id\",\"largeop\",\"length\",\"linethickness\",\"lspace\",\"lquote\",\"mathbackground\",\"mathcolor\",\"mathsize\",\"mathvariant\",\"maxsize\",\"minsize\",\"movablelimits\",\"notation\",\"numalign\",\"open\",\"rowalign\",\"rowlines\",\"rowspacing\",\"rowspan\",\"rspace\",\"rquote\",\"scriptlevel\",\"scriptminsize\",\"scriptsizemultiplier\",\"selection\",\"separator\",\"separators\",\"stretchy\",\"subscriptshift\",\"supscriptshift\",\"symmetric\",\"voffset\",\"width\",\"xmlns\"]),$e=x([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),ze=j(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),We=j(/<%[\\w\\W]*|[\\w\\W]*%>/gm),He=j(/\\${[\\w\\W]*}/gm),Ye=j(/^data-[\\-\\w.\\u00B7-\\uFFFF]/),Xe=j(/^aria-[\\-\\w]+$/),Qe=j(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),et=j(/^(?:\\w+script|data):/i),tt=j(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),rt=j(/^html$/i),nt=j(/^[a-z][.\\w]*(-[.\\w]+)+$/i);var ot=Object.freeze({__proto__:null,MUSTACHE_EXPR:ze,ERB_EXPR:We,TMPLIT_EXPR:He,DATA_ATTR:Ye,ARIA_ATTR:Xe,IS_ALLOWED_URI:Qe,IS_SCRIPT_OR_DATA:et,ATTR_WHITESPACE:tt,DOCTYPE_NAME:rt,CUSTOM_ELEMENT:nt});const st=function getGlobal(){return\"undefined\"==typeof window?null:window},it=function _createTrustedTypesPolicy(s,i){if(\"object\"!=typeof s||\"function\"!=typeof s.createPolicy)return null;let u=null;const _=\"data-tt-policy-suffix\";i&&i.hasAttribute(_)&&(u=i.getAttribute(_));const w=\"dompurify\"+(u?\"#\"+u:\"\");try{return s.createPolicy(w,{createHTML:s=>s,createScriptURL:s=>s})}catch(s){return console.warn(\"TrustedTypes policy \"+w+\" could not be created.\"),null}};function createDOMPurify(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const DOMPurify=s=>createDOMPurify(s);if(DOMPurify.version=\"3.0.11\",DOMPurify.removed=[],!i||!i.document||9!==i.document.nodeType)return DOMPurify.isSupported=!1,DOMPurify;let{document:u}=i;const _=u,w=_.currentScript,{DocumentFragment:j,HTMLTemplateElement:B,Node:$,Element:ze,NodeFilter:We,NamedNodeMap:He=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:Ye,DOMParser:Xe,trustedTypes:et}=i,tt=ze.prototype,nt=lookupGetter(tt,\"cloneNode\"),at=lookupGetter(tt,\"nextSibling\"),lt=lookupGetter(tt,\"childNodes\"),ct=lookupGetter(tt,\"parentNode\");if(\"function\"==typeof B){const s=u.createElement(\"template\");s.content&&s.content.ownerDocument&&(u=s.content.ownerDocument)}let ut,pt=\"\";const{implementation:ht,createNodeIterator:dt,createDocumentFragment:mt,getElementsByTagName:gt}=u,{importNode:yt}=_;let vt={};DOMPurify.isSupported=\"function\"==typeof s&&\"function\"==typeof ct&&ht&&void 0!==ht.createHTMLDocument;const{MUSTACHE_EXPR:bt,ERB_EXPR:_t,TMPLIT_EXPR:Et,DATA_ATTR:wt,ARIA_ATTR:St,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:Ot}=ot;let{IS_ALLOWED_URI:Ct}=ot,At=null;const jt=addToSet({},[...ye,...be,..._e,...Se,...Pe]);let Pt=null;const It=addToSet({},[...Te,...Re,...qe,...$e]);let Nt=Object.seal(P(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Mt=null,Tt=null,Rt=!0,Dt=!0,Lt=!1,Bt=!0,Ft=!1,qt=!1,$t=!1,Ut=!1,zt=!1,Vt=!1,Wt=!1,Kt=!0,Ht=!1;const Jt=\"user-content-\";let Gt=!0,Yt=!1,Xt={},Qt=null;const Zt=addToSet({},[\"annotation-xml\",\"audio\",\"colgroup\",\"desc\",\"foreignobject\",\"head\",\"iframe\",\"math\",\"mi\",\"mn\",\"mo\",\"ms\",\"mtext\",\"noembed\",\"noframes\",\"noscript\",\"plaintext\",\"script\",\"style\",\"svg\",\"template\",\"thead\",\"title\",\"video\",\"xmp\"]);let er=null;const tr=addToSet({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]);let rr=null;const nr=addToSet({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),sr=\"http://www.w3.org/1998/Math/MathML\",ir=\"http://www.w3.org/2000/svg\",ar=\"http://www.w3.org/1999/xhtml\";let lr=ar,cr=!1,ur=null;const pr=addToSet({},[sr,ir,ar],ee);let dr=null;const fr=[\"application/xhtml+xml\",\"text/html\"],mr=\"text/html\";let gr=null,yr=null;const vr=u.createElement(\"form\"),br=function isRegexOrFunction(s){return s instanceof RegExp||s instanceof Function},_r=function _parseConfig(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!yr||yr!==s){if(s&&\"object\"==typeof s||(s={}),s=clone(s),dr=-1===fr.indexOf(s.PARSER_MEDIA_TYPE)?mr:s.PARSER_MEDIA_TYPE,gr=\"application/xhtml+xml\"===dr?ee:Z,At=pe(s,\"ALLOWED_TAGS\")?addToSet({},s.ALLOWED_TAGS,gr):jt,Pt=pe(s,\"ALLOWED_ATTR\")?addToSet({},s.ALLOWED_ATTR,gr):It,ur=pe(s,\"ALLOWED_NAMESPACES\")?addToSet({},s.ALLOWED_NAMESPACES,ee):pr,rr=pe(s,\"ADD_URI_SAFE_ATTR\")?addToSet(clone(nr),s.ADD_URI_SAFE_ATTR,gr):nr,er=pe(s,\"ADD_DATA_URI_TAGS\")?addToSet(clone(tr),s.ADD_DATA_URI_TAGS,gr):tr,Qt=pe(s,\"FORBID_CONTENTS\")?addToSet({},s.FORBID_CONTENTS,gr):Zt,Mt=pe(s,\"FORBID_TAGS\")?addToSet({},s.FORBID_TAGS,gr):{},Tt=pe(s,\"FORBID_ATTR\")?addToSet({},s.FORBID_ATTR,gr):{},Xt=!!pe(s,\"USE_PROFILES\")&&s.USE_PROFILES,Rt=!1!==s.ALLOW_ARIA_ATTR,Dt=!1!==s.ALLOW_DATA_ATTR,Lt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,Bt=!1!==s.ALLOW_SELF_CLOSE_IN_ATTR,Ft=s.SAFE_FOR_TEMPLATES||!1,qt=s.WHOLE_DOCUMENT||!1,zt=s.RETURN_DOM||!1,Vt=s.RETURN_DOM_FRAGMENT||!1,Wt=s.RETURN_TRUSTED_TYPE||!1,Ut=s.FORCE_BODY||!1,Kt=!1!==s.SANITIZE_DOM,Ht=s.SANITIZE_NAMED_PROPS||!1,Gt=!1!==s.KEEP_CONTENT,Yt=s.IN_PLACE||!1,Ct=s.ALLOWED_URI_REGEXP||Qe,lr=s.NAMESPACE||ar,Nt=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&br(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Nt.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&br(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Nt.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Nt.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Dt=!1),Vt&&(zt=!0),Xt&&(At=addToSet({},Pe),Pt=[],!0===Xt.html&&(addToSet(At,ye),addToSet(Pt,Te)),!0===Xt.svg&&(addToSet(At,be),addToSet(Pt,Re),addToSet(Pt,$e)),!0===Xt.svgFilters&&(addToSet(At,_e),addToSet(Pt,Re),addToSet(Pt,$e)),!0===Xt.mathMl&&(addToSet(At,Se),addToSet(Pt,qe),addToSet(Pt,$e))),s.ADD_TAGS&&(At===jt&&(At=clone(At)),addToSet(At,s.ADD_TAGS,gr)),s.ADD_ATTR&&(Pt===It&&(Pt=clone(Pt)),addToSet(Pt,s.ADD_ATTR,gr)),s.ADD_URI_SAFE_ATTR&&addToSet(rr,s.ADD_URI_SAFE_ATTR,gr),s.FORBID_CONTENTS&&(Qt===Zt&&(Qt=clone(Qt)),addToSet(Qt,s.FORBID_CONTENTS,gr)),Gt&&(At[\"#text\"]=!0),qt&&addToSet(At,[\"html\",\"head\",\"body\"]),At.table&&(addToSet(At,[\"tbody\"]),delete Mt.tbody),s.TRUSTED_TYPES_POLICY){if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createHTML)throw fe('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createScriptURL)throw fe('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');ut=s.TRUSTED_TYPES_POLICY,pt=ut.createHTML(\"\")}else void 0===ut&&(ut=it(et,w)),null!==ut&&\"string\"==typeof pt&&(pt=ut.createHTML(\"\"));x&&x(s),yr=s}},Er=addToSet({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),wr=addToSet({},[\"foreignobject\",\"desc\",\"title\",\"annotation-xml\"]),Sr=addToSet({},[\"title\",\"style\",\"font\",\"a\",\"script\"]),xr=addToSet({},[...be,..._e,...we]),kr=addToSet({},[...Se,...xe]),Or=function _checkValidNamespace(s){let i=ct(s);i&&i.tagName||(i={namespaceURI:lr,tagName:\"template\"});const u=Z(s.tagName),_=Z(i.tagName);return!!ur[s.namespaceURI]&&(s.namespaceURI===ir?i.namespaceURI===ar?\"svg\"===u:i.namespaceURI===sr?\"svg\"===u&&(\"annotation-xml\"===_||Er[_]):Boolean(xr[u]):s.namespaceURI===sr?i.namespaceURI===ar?\"math\"===u:i.namespaceURI===ir?\"math\"===u&&wr[_]:Boolean(kr[u]):s.namespaceURI===ar?!(i.namespaceURI===ir&&!wr[_])&&!(i.namespaceURI===sr&&!Er[_])&&!kr[u]&&(Sr[u]||!xr[u]):!(\"application/xhtml+xml\"!==dr||!ur[s.namespaceURI]))},Cr=function _forceRemove(s){X(DOMPurify.removed,{element:s});try{s.parentNode.removeChild(s)}catch(i){s.remove()}},Ar=function _removeAttribute(s,i){try{X(DOMPurify.removed,{attribute:i.getAttributeNode(s),from:i})}catch(s){X(DOMPurify.removed,{attribute:null,from:i})}if(i.removeAttribute(s),\"is\"===s&&!Pt[s])if(zt||Vt)try{Cr(i)}catch(s){}else try{i.setAttribute(s,\"\")}catch(s){}},jr=function _initDocument(s){let i=null,_=null;if(Ut)s=\"<remove></remove>\"+s;else{const i=ie(s,/^[\\r\\n\\t ]+/);_=i&&i[0]}\"application/xhtml+xml\"===dr&&lr===ar&&(s='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+s+\"</body></html>\");const w=ut?ut.createHTML(s):s;if(lr===ar)try{i=(new Xe).parseFromString(w,dr)}catch(s){}if(!i||!i.documentElement){i=ht.createDocument(lr,\"template\",null);try{i.documentElement.innerHTML=cr?pt:w}catch(s){}}const x=i.body||i.documentElement;return s&&_&&x.insertBefore(u.createTextNode(_),x.childNodes[0]||null),lr===ar?gt.call(i,qt?\"html\":\"body\")[0]:qt?i.documentElement:x},Pr=function _createNodeIterator(s){return dt.call(s.ownerDocument||s,s,We.SHOW_ELEMENT|We.SHOW_COMMENT|We.SHOW_TEXT|We.SHOW_PROCESSING_INSTRUCTION|We.SHOW_CDATA_SECTION,null)},Ir=function _isClobbered(s){return s instanceof Ye&&(\"string\"!=typeof s.nodeName||\"string\"!=typeof s.textContent||\"function\"!=typeof s.removeChild||!(s.attributes instanceof He)||\"function\"!=typeof s.removeAttribute||\"function\"!=typeof s.setAttribute||\"string\"!=typeof s.namespaceURI||\"function\"!=typeof s.insertBefore||\"function\"!=typeof s.hasChildNodes)},Nr=function _isNode(s){return\"function\"==typeof $&&s instanceof $},Mr=function _executeHook(s,i,u){vt[s]&&U(vt[s],(s=>{s.call(DOMPurify,i,u,yr)}))},Tr=function _sanitizeElements(s){let i=null;if(Mr(\"beforeSanitizeElements\",s,null),Ir(s))return Cr(s),!0;const u=gr(s.nodeName);if(Mr(\"uponSanitizeElement\",s,{tagName:u,allowedTags:At}),s.hasChildNodes()&&!Nr(s.firstElementChild)&&de(/<[/\\w]/g,s.innerHTML)&&de(/<[/\\w]/g,s.textContent))return Cr(s),!0;if(7===s.nodeType)return Cr(s),!0;if(!At[u]||Mt[u]){if(!Mt[u]&&Dr(u)){if(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,u))return!1;if(Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(u))return!1}if(Gt&&!Qt[u]){const i=ct(s)||s.parentNode,u=lt(s)||s.childNodes;if(u&&i)for(let _=u.length-1;_>=0;--_)i.insertBefore(nt(u[_],!0),at(s))}return Cr(s),!0}return s instanceof ze&&!Or(s)?(Cr(s),!0):\"noscript\"!==u&&\"noembed\"!==u&&\"noframes\"!==u||!de(/<\\/no(script|embed|frames)/i,s.innerHTML)?(Ft&&3===s.nodeType&&(i=s.textContent,U([bt,_t,Et],(s=>{i=ae(i,s,\" \")})),s.textContent!==i&&(X(DOMPurify.removed,{element:s.cloneNode()}),s.textContent=i)),Mr(\"afterSanitizeElements\",s,null),!1):(Cr(s),!0)},Rr=function _isValidAttribute(s,i,_){if(Kt&&(\"id\"===i||\"name\"===i)&&(_ in u||_ in vr))return!1;if(Dt&&!Tt[i]&&de(wt,i));else if(Rt&&de(St,i));else if(!Pt[i]||Tt[i]){if(!(Dr(s)&&(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,s)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(s))&&(Nt.attributeNameCheck instanceof RegExp&&de(Nt.attributeNameCheck,i)||Nt.attributeNameCheck instanceof Function&&Nt.attributeNameCheck(i))||\"is\"===i&&Nt.allowCustomizedBuiltInElements&&(Nt.tagNameCheck instanceof RegExp&&de(Nt.tagNameCheck,_)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(_))))return!1}else if(rr[i]);else if(de(Ct,ae(_,kt,\"\")));else if(\"src\"!==i&&\"xlink:href\"!==i&&\"href\"!==i||\"script\"===s||0!==le(_,\"data:\")||!er[s])if(Lt&&!de(xt,ae(_,kt,\"\")));else if(_)return!1;return!0},Dr=function _isBasicCustomElement(s){return\"annotation-xml\"!==s&&ie(s,Ot)},Lr=function _sanitizeAttributes(s){Mr(\"beforeSanitizeAttributes\",s,null);const{attributes:i}=s;if(!i)return;const u={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:Pt};let _=i.length;for(;_--;){const w=i[_],{name:x,namespaceURI:j,value:P}=w,B=gr(x);let $=\"value\"===x?P:ce(P);if(u.attrName=B,u.attrValue=$,u.keepAttr=!0,u.forceKeepAttr=void 0,Mr(\"uponSanitizeAttribute\",s,u),$=u.attrValue,u.forceKeepAttr)continue;if(Ar(x,s),!u.keepAttr)continue;if(!Bt&&de(/\\/>/i,$)){Ar(x,s);continue}Ft&&U([bt,_t,Et],(s=>{$=ae($,s,\" \")}));const X=gr(s.nodeName);if(Rr(X,B,$)){if(!Ht||\"id\"!==B&&\"name\"!==B||(Ar(x,s),$=Jt+$),ut&&\"object\"==typeof et&&\"function\"==typeof et.getAttributeType)if(j);else switch(et.getAttributeType(X,B)){case\"TrustedHTML\":$=ut.createHTML($);break;case\"TrustedScriptURL\":$=ut.createScriptURL($)}try{j?s.setAttributeNS(j,x,$):s.setAttribute(x,$),Y(DOMPurify.removed)}catch(s){}}}Mr(\"afterSanitizeAttributes\",s,null)},Br=function _sanitizeShadowDOM(s){let i=null;const u=Pr(s);for(Mr(\"beforeSanitizeShadowDOM\",s,null);i=u.nextNode();)Mr(\"uponSanitizeShadowNode\",i,null),Tr(i)||(i.content instanceof j&&_sanitizeShadowDOM(i.content),Lr(i));Mr(\"afterSanitizeShadowDOM\",s,null)};return DOMPurify.sanitize=function(s){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=null,w=null,x=null,P=null;if(cr=!s,cr&&(s=\"\\x3c!--\\x3e\"),\"string\"!=typeof s&&!Nr(s)){if(\"function\"!=typeof s.toString)throw fe(\"toString is not a function\");if(\"string\"!=typeof(s=s.toString()))throw fe(\"dirty is not a string, aborting\")}if(!DOMPurify.isSupported)return s;if($t||_r(i),DOMPurify.removed=[],\"string\"==typeof s&&(Yt=!1),Yt){if(s.nodeName){const i=gr(s.nodeName);if(!At[i]||Mt[i])throw fe(\"root node is forbidden and cannot be sanitized in-place\")}}else if(s instanceof $)u=jr(\"\\x3c!----\\x3e\"),w=u.ownerDocument.importNode(s,!0),1===w.nodeType&&\"BODY\"===w.nodeName||\"HTML\"===w.nodeName?u=w:u.appendChild(w);else{if(!zt&&!Ft&&!qt&&-1===s.indexOf(\"<\"))return ut&&Wt?ut.createHTML(s):s;if(u=jr(s),!u)return zt?null:Wt?pt:\"\"}u&&Ut&&Cr(u.firstChild);const B=Pr(Yt?s:u);for(;x=B.nextNode();)Tr(x)||(x.content instanceof j&&Br(x.content),Lr(x));if(Yt)return s;if(zt){if(Vt)for(P=mt.call(u.ownerDocument);u.firstChild;)P.appendChild(u.firstChild);else P=u;return(Pt.shadowroot||Pt.shadowrootmode)&&(P=yt.call(_,P,!0)),P}let Y=qt?u.outerHTML:u.innerHTML;return qt&&At[\"!doctype\"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&de(rt,u.ownerDocument.doctype.name)&&(Y=\"<!DOCTYPE \"+u.ownerDocument.doctype.name+\">\\n\"+Y),Ft&&U([bt,_t,Et],(s=>{Y=ae(Y,s,\" \")})),ut&&Wt?ut.createHTML(Y):Y},DOMPurify.setConfig=function(){_r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),$t=!0},DOMPurify.clearConfig=function(){yr=null,$t=!1},DOMPurify.isValidAttribute=function(s,i,u){yr||_r({});const _=gr(s),w=gr(i);return Rr(_,w,u)},DOMPurify.addHook=function(s,i){\"function\"==typeof i&&(vt[s]=vt[s]||[],X(vt[s],i))},DOMPurify.removeHook=function(s){if(vt[s])return Y(vt[s])},DOMPurify.removeHooks=function(s){vt[s]&&(vt[s]=[])},DOMPurify.removeAllHooks=function(){vt={}},DOMPurify}return createDOMPurify()}()},78004:s=>{\"use strict\";class SubRange{constructor(s,i){this.low=s,this.high=i,this.length=1+i-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.low&&s.high<this.high?[new SubRange(this.low,s.low-1),new SubRange(s.high+1,this.high)]:s.low<=this.low?[new SubRange(s.high+1,this.high)]:[new SubRange(this.low,s.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+\"-\"+this.high}}class DRange{constructor(s,i){this.ranges=[],this.length=0,null!=s&&this.add(s,i)}_update_length(){this.length=this.ranges.reduce(((s,i)=>s+i.length),0)}add(s,i){var _add=s=>{for(var i=0;i<this.ranges.length&&!s.touches(this.ranges[i]);)i++;for(var u=this.ranges.slice(0,i);i<this.ranges.length&&s.touches(this.ranges[i]);)s=s.add(this.ranges[i]),i++;u.push(s),this.ranges=u.concat(this.ranges.slice(i)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_add):(null==i&&(i=s),_add(new SubRange(s,i))),this}subtract(s,i){var _subtract=s=>{for(var i=0;i<this.ranges.length&&!s.overlaps(this.ranges[i]);)i++;for(var u=this.ranges.slice(0,i);i<this.ranges.length&&s.overlaps(this.ranges[i]);)u=u.concat(this.ranges[i].subtract(s)),i++;this.ranges=u.concat(this.ranges.slice(i)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_subtract):(null==i&&(i=s),_subtract(new SubRange(s,i))),this}intersect(s,i){var u=[],_intersect=s=>{for(var i=0;i<this.ranges.length&&!s.overlaps(this.ranges[i]);)i++;for(;i<this.ranges.length&&s.overlaps(this.ranges[i]);){var _=Math.max(this.ranges[i].low,s.low),w=Math.min(this.ranges[i].high,s.high);u.push(new SubRange(_,w)),i++}};return s instanceof DRange?s.ranges.forEach(_intersect):(null==i&&(i=s),_intersect(new SubRange(s,i))),this.ranges=u,this._update_length(),this}index(s){for(var i=0;i<this.ranges.length&&this.ranges[i].length<=s;)s-=this.ranges[i].length,i++;return this.ranges[i].low+s}toString(){return\"[ \"+this.ranges.join(\", \")+\" ]\"}clone(){return new DRange(this)}numbers(){return this.ranges.reduce(((s,i)=>{for(var u=i.low;u<=i.high;)s.push(u),u++;return s}),[])}subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:1+s.high-s.low})))}}s.exports=DRange},30655:(s,i,u)=>{\"use strict\";var _=u(70453)(\"%Object.defineProperty%\",!0)||!1;if(_)try{_({},\"a\",{value:1})}catch(s){_=!1}s.exports=_},41237:s=>{\"use strict\";s.exports=EvalError},69383:s=>{\"use strict\";s.exports=Error},79290:s=>{\"use strict\";s.exports=RangeError},79538:s=>{\"use strict\";s.exports=ReferenceError},58068:s=>{\"use strict\";s.exports=SyntaxError},69675:s=>{\"use strict\";s.exports=TypeError},35345:s=>{\"use strict\";s.exports=URIError},37007:s=>{\"use strict\";var i,u=\"object\"==typeof Reflect?Reflect:null,_=u&&\"function\"==typeof u.apply?u.apply:function ReflectApply(s,i,u){return Function.prototype.apply.call(s,i,u)};i=u&&\"function\"==typeof u.ownKeys?u.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s)};var w=Number.isNaN||function NumberIsNaN(s){return s!=s};function EventEmitter(){EventEmitter.init.call(this)}s.exports=EventEmitter,s.exports.once=function once(s,i){return new Promise((function(u,_){function errorListener(u){s.removeListener(i,resolver),_(u)}function resolver(){\"function\"==typeof s.removeListener&&s.removeListener(\"error\",errorListener),u([].slice.call(arguments))}eventTargetAgnosticAddListener(s,i,resolver,{once:!0}),\"error\"!==i&&function addErrorHandlerIfEventEmitter(s,i,u){\"function\"==typeof s.on&&eventTargetAgnosticAddListener(s,\"error\",i,u)}(s,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var x=10;function checkListener(s){if(\"function\"!=typeof s)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof s)}function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitter.defaultMaxListeners:s._maxListeners}function _addListener(s,i,u,_){var w,x,j;if(checkListener(u),void 0===(x=s._events)?(x=s._events=Object.create(null),s._eventsCount=0):(void 0!==x.newListener&&(s.emit(\"newListener\",i,u.listener?u.listener:u),x=s._events),j=x[i]),void 0===j)j=x[i]=u,++s._eventsCount;else if(\"function\"==typeof j?j=x[i]=_?[u,j]:[j,u]:_?j.unshift(u):j.push(u),(w=_getMaxListeners(s))>0&&j.length>w&&!j.warned){j.warned=!0;var P=new Error(\"Possible EventEmitter memory leak detected. \"+j.length+\" \"+String(i)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");P.name=\"MaxListenersExceededWarning\",P.emitter=s,P.type=i,P.count=j.length,function ProcessEmitWarning(s){console&&console.warn&&console.warn(s)}(P)}return s}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(s,i,u){var _={fired:!1,wrapFn:void 0,target:s,type:i,listener:u},w=onceWrapper.bind(_);return w.listener=u,_.wrapFn=w,w}function _listeners(s,i,u){var _=s._events;if(void 0===_)return[];var w=_[i];return void 0===w?[]:\"function\"==typeof w?u?[w.listener||w]:[w]:u?function unwrapListeners(s){for(var i=new Array(s.length),u=0;u<i.length;++u)i[u]=s[u].listener||s[u];return i}(w):arrayClone(w,w.length)}function listenerCount(s){var i=this._events;if(void 0!==i){var u=i[s];if(\"function\"==typeof u)return 1;if(void 0!==u)return u.length}return 0}function arrayClone(s,i){for(var u=new Array(i),_=0;_<i;++_)u[_]=s[_];return u}function eventTargetAgnosticAddListener(s,i,u,_){if(\"function\"==typeof s.on)_.once?s.once(i,u):s.on(i,u);else{if(\"function\"!=typeof s.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof s);s.addEventListener(i,(function wrapListener(w){_.once&&s.removeEventListener(i,wrapListener),u(w)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return x},set:function(s){if(\"number\"!=typeof s||s<0||w(s))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+s+\".\");x=s}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(s){if(\"number\"!=typeof s||s<0||w(s))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+s+\".\");return this._maxListeners=s,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(s){for(var i=[],u=1;u<arguments.length;u++)i.push(arguments[u]);var w=\"error\"===s,x=this._events;if(void 0!==x)w=w&&void 0===x.error;else if(!w)return!1;if(w){var j;if(i.length>0&&(j=i[0]),j instanceof Error)throw j;var P=new Error(\"Unhandled error.\"+(j?\" (\"+j.message+\")\":\"\"));throw P.context=j,P}var B=x[s];if(void 0===B)return!1;if(\"function\"==typeof B)_(B,this,i);else{var $=B.length,U=arrayClone(B,$);for(u=0;u<$;++u)_(U[u],this,i)}return!0},EventEmitter.prototype.addListener=function addListener(s,i){return _addListener(this,s,i,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(s,i){return _addListener(this,s,i,!0)},EventEmitter.prototype.once=function once(s,i){return checkListener(i),this.on(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(s,i){return checkListener(i),this.prependListener(s,_onceWrap(this,s,i)),this},EventEmitter.prototype.removeListener=function removeListener(s,i){var u,_,w,x,j;if(checkListener(i),void 0===(_=this._events))return this;if(void 0===(u=_[s]))return this;if(u===i||u.listener===i)0==--this._eventsCount?this._events=Object.create(null):(delete _[s],_.removeListener&&this.emit(\"removeListener\",s,u.listener||i));else if(\"function\"!=typeof u){for(w=-1,x=u.length-1;x>=0;x--)if(u[x]===i||u[x].listener===i){j=u[x].listener,w=x;break}if(w<0)return this;0===w?u.shift():function spliceOne(s,i){for(;i+1<s.length;i++)s[i]=s[i+1];s.pop()}(u,w),1===u.length&&(_[s]=u[0]),void 0!==_.removeListener&&this.emit(\"removeListener\",s,j||i)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(s){var i,u,_;if(void 0===(u=this._events))return this;if(void 0===u.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==u[s]&&(0==--this._eventsCount?this._events=Object.create(null):delete u[s]),this;if(0===arguments.length){var w,x=Object.keys(u);for(_=0;_<x.length;++_)\"removeListener\"!==(w=x[_])&&this.removeAllListeners(w);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(i=u[s]))this.removeListener(s,i);else if(void 0!==i)for(_=i.length-1;_>=0;_--)this.removeListener(s,i[_]);return this},EventEmitter.prototype.listeners=function listeners(s){return _listeners(this,s,!0)},EventEmitter.prototype.rawListeners=function rawListeners(s){return _listeners(this,s,!1)},EventEmitter.listenerCount=function(s,i){return\"function\"==typeof s.listenerCount?s.listenerCount(i):listenerCount.call(s,i)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?i(this._events):[]}},85587:(s,i,u)=>{\"use strict\";var _=u(26311),w=create(Error);function create(s){return FormattedError.displayName=s.displayName||s.name,FormattedError;function FormattedError(i){return i&&(i=_.apply(null,arguments)),new s(i)}}s.exports=w,w.eval=create(EvalError),w.range=create(RangeError),w.reference=create(ReferenceError),w.syntax=create(SyntaxError),w.type=create(TypeError),w.uri=create(URIError),w.create=create},26311:s=>{!function(){var i;function format(s){for(var i,u,_,w,x=1,j=[].slice.call(arguments),P=0,B=s.length,$=\"\",U=!1,Y=!1,nextArg=function(){return j[x++]},slurpNumber=function(){for(var u=\"\";/\\d/.test(s[P]);)u+=s[P++],i=s[P];return u.length>0?parseInt(u):null};P<B;++P)if(i=s[P],U)switch(U=!1,\".\"==i?(Y=!1,i=s[++P]):\"0\"==i&&\".\"==s[P+1]?(Y=!0,i=s[P+=2]):Y=!0,w=slurpNumber(),i){case\"b\":$+=parseInt(nextArg(),10).toString(2);break;case\"c\":$+=\"string\"==typeof(u=nextArg())||u instanceof String?u:String.fromCharCode(parseInt(u,10));break;case\"d\":$+=parseInt(nextArg(),10);break;case\"f\":_=String(parseFloat(nextArg()).toFixed(w||6)),$+=Y?_:_.replace(/^0/,\"\");break;case\"j\":$+=JSON.stringify(nextArg());break;case\"o\":$+=\"0\"+parseInt(nextArg(),10).toString(8);break;case\"s\":$+=nextArg();break;case\"x\":$+=\"0x\"+parseInt(nextArg(),10).toString(16);break;case\"X\":$+=\"0x\"+parseInt(nextArg(),10).toString(16).toUpperCase();break;default:$+=i}else\"%\"===i?U=!0:$+=i;return $}(i=s.exports=format).format=format,i.vsprintf=function vsprintf(s,i){return format.apply(null,[s].concat(i))},\"undefined\"!=typeof console&&\"function\"==typeof console.log&&(i.printf=function printf(){console.log(format.apply(null,arguments))})}()},89353:s=>{\"use strict\";var i=Object.prototype.toString,u=Math.max,_=function concatty(s,i){for(var u=[],_=0;_<s.length;_+=1)u[_]=s[_];for(var w=0;w<i.length;w+=1)u[w+s.length]=i[w];return u};s.exports=function bind(s){var w=this;if(\"function\"!=typeof w||\"[object Function]\"!==i.apply(w))throw new TypeError(\"Function.prototype.bind called on incompatible \"+w);for(var x,j=function slicy(s,i){for(var u=[],_=i||0,w=0;_<s.length;_+=1,w+=1)u[w]=s[_];return u}(arguments,1),P=u(0,w.length-j.length),B=[],$=0;$<P;$++)B[$]=\"$\"+$;if(x=Function(\"binder\",\"return function (\"+function(s,i){for(var u=\"\",_=0;_<s.length;_+=1)u+=s[_],_+1<s.length&&(u+=i);return u}(B,\",\")+\"){ return binder.apply(this,arguments); }\")((function(){if(this instanceof x){var i=w.apply(this,_(j,arguments));return Object(i)===i?i:this}return w.apply(s,_(j,arguments))})),w.prototype){var U=function Empty(){};U.prototype=w.prototype,x.prototype=new U,U.prototype=null}return x}},66743:(s,i,u)=>{\"use strict\";var _=u(89353);s.exports=Function.prototype.bind||_},70453:(s,i,u)=>{\"use strict\";var _,w=u(69383),x=u(41237),j=u(79290),P=u(79538),B=u(58068),$=u(69675),U=u(35345),Y=Function,getEvalledConstructor=function(s){try{return Y('\"use strict\"; return ('+s+\").constructor;\")()}catch(s){}},X=Object.getOwnPropertyDescriptor;if(X)try{X({},\"\")}catch(s){X=null}var throwTypeError=function(){throw new $},Z=X?function(){try{return throwTypeError}catch(s){try{return X(arguments,\"callee\").get}catch(s){return throwTypeError}}}():throwTypeError,ee=u(64039)(),ie=u(80024)(),ae=Object.getPrototypeOf||(ie?function(s){return s.__proto__}:null),le={},ce=\"undefined\"!=typeof Uint8Array&&ae?ae(Uint8Array):_,pe={__proto__:null,\"%AggregateError%\":\"undefined\"==typeof AggregateError?_:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?_:ArrayBuffer,\"%ArrayIteratorPrototype%\":ee&&ae?ae([][Symbol.iterator]()):_,\"%AsyncFromSyncIteratorPrototype%\":_,\"%AsyncFunction%\":le,\"%AsyncGenerator%\":le,\"%AsyncGeneratorFunction%\":le,\"%AsyncIteratorPrototype%\":le,\"%Atomics%\":\"undefined\"==typeof Atomics?_:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?_:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?_:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?_:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?_:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":w,\"%eval%\":eval,\"%EvalError%\":x,\"%Float32Array%\":\"undefined\"==typeof Float32Array?_:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?_:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?_:FinalizationRegistry,\"%Function%\":Y,\"%GeneratorFunction%\":le,\"%Int8Array%\":\"undefined\"==typeof Int8Array?_:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?_:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?_:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":ee&&ae?ae(ae([][Symbol.iterator]())):_,\"%JSON%\":\"object\"==typeof JSON?JSON:_,\"%Map%\":\"undefined\"==typeof Map?_:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&ee&&ae?ae((new Map)[Symbol.iterator]()):_,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?_:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?_:Proxy,\"%RangeError%\":j,\"%ReferenceError%\":P,\"%Reflect%\":\"undefined\"==typeof Reflect?_:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?_:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&ee&&ae?ae((new Set)[Symbol.iterator]()):_,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?_:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":ee&&ae?ae(\"\"[Symbol.iterator]()):_,\"%Symbol%\":ee?Symbol:_,\"%SyntaxError%\":B,\"%ThrowTypeError%\":Z,\"%TypedArray%\":ce,\"%TypeError%\":$,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?_:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?_:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?_:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?_:Uint32Array,\"%URIError%\":U,\"%WeakMap%\":\"undefined\"==typeof WeakMap?_:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?_:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?_:WeakSet};if(ae)try{null.error}catch(s){var de=ae(ae(s));pe[\"%Error.prototype%\"]=de}var fe=function doEval(s){var i;if(\"%AsyncFunction%\"===s)i=getEvalledConstructor(\"async function () {}\");else if(\"%GeneratorFunction%\"===s)i=getEvalledConstructor(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===s)i=getEvalledConstructor(\"async function* () {}\");else if(\"%AsyncGenerator%\"===s){var u=doEval(\"%AsyncGeneratorFunction%\");u&&(i=u.prototype)}else if(\"%AsyncIteratorPrototype%\"===s){var _=doEval(\"%AsyncGenerator%\");_&&ae&&(i=ae(_.prototype))}return pe[s]=i,i},ye={__proto__:null,\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},be=u(66743),_e=u(9957),we=be.call(Function.call,Array.prototype.concat),Se=be.call(Function.apply,Array.prototype.splice),xe=be.call(Function.call,String.prototype.replace),Pe=be.call(Function.call,String.prototype.slice),Te=be.call(Function.call,RegExp.prototype.exec),Re=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,qe=/\\\\(\\\\)?/g,$e=function getBaseIntrinsic(s,i){var u,_=s;if(_e(ye,_)&&(_=\"%\"+(u=ye[_])[0]+\"%\"),_e(pe,_)){var w=pe[_];if(w===le&&(w=fe(_)),void 0===w&&!i)throw new $(\"intrinsic \"+s+\" exists, but is not available. Please file an issue!\");return{alias:u,name:_,value:w}}throw new B(\"intrinsic \"+s+\" does not exist!\")};s.exports=function GetIntrinsic(s,i){if(\"string\"!=typeof s||0===s.length)throw new $(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof i)throw new $('\"allowMissing\" argument must be a boolean');if(null===Te(/^%?[^%]*%?$/,s))throw new B(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var u=function stringToPath(s){var i=Pe(s,0,1),u=Pe(s,-1);if(\"%\"===i&&\"%\"!==u)throw new B(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===u&&\"%\"!==i)throw new B(\"invalid intrinsic syntax, expected opening `%`\");var _=[];return xe(s,Re,(function(s,i,u,w){_[_.length]=u?xe(w,qe,\"$1\"):i||s})),_}(s),_=u.length>0?u[0]:\"\",w=$e(\"%\"+_+\"%\",i),x=w.name,j=w.value,P=!1,U=w.alias;U&&(_=U[0],Se(u,we([0,1],U)));for(var Y=1,Z=!0;Y<u.length;Y+=1){var ee=u[Y],ie=Pe(ee,0,1),ae=Pe(ee,-1);if(('\"'===ie||\"'\"===ie||\"`\"===ie||'\"'===ae||\"'\"===ae||\"`\"===ae)&&ie!==ae)throw new B(\"property names with quotes must have matching quotes\");if(\"constructor\"!==ee&&Z||(P=!0),_e(pe,x=\"%\"+(_+=\".\"+ee)+\"%\"))j=pe[x];else if(null!=j){if(!(ee in j)){if(!i)throw new $(\"base intrinsic for \"+s+\" exists, but the property is not available.\");return}if(X&&Y+1>=u.length){var le=X(j,ee);j=(Z=!!le)&&\"get\"in le&&!(\"originalValue\"in le.get)?le.get:j[ee]}else Z=_e(j,ee),j=j[ee];Z&&!P&&(pe[x]=j)}}return j}},75795:(s,i,u)=>{\"use strict\";var _=u(70453)(\"%Object.getOwnPropertyDescriptor%\",!0);if(_)try{_([],\"length\")}catch(s){_=null}s.exports=_},30592:(s,i,u)=>{\"use strict\";var _=u(30655),w=function hasPropertyDescriptors(){return!!_};w.hasArrayLengthDefineBug=function hasArrayLengthDefineBug(){if(!_)return null;try{return 1!==_([],\"length\",{value:1}).length}catch(s){return!0}},s.exports=w},80024:s=>{\"use strict\";var i={__proto__:null,foo:{}},u=Object;s.exports=function hasProto(){return{__proto__:i}.foo===i.foo&&!(i instanceof u)}},64039:(s,i,u)=>{\"use strict\";var _=\"undefined\"!=typeof Symbol&&Symbol,w=u(41333);s.exports=function hasNativeSymbols(){return\"function\"==typeof _&&(\"function\"==typeof Symbol&&(\"symbol\"==typeof _(\"foo\")&&(\"symbol\"==typeof Symbol(\"bar\")&&w())))}},41333:s=>{\"use strict\";s.exports=function hasSymbols(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var s={},i=Symbol(\"test\"),u=Object(i);if(\"string\"==typeof i)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(i))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(u))return!1;for(i in s[i]=42,s)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(s).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(s).length)return!1;var _=Object.getOwnPropertySymbols(s);if(1!==_.length||_[0]!==i)return!1;if(!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var w=Object.getOwnPropertyDescriptor(s,i);if(42!==w.value||!0!==w.enumerable)return!1}return!0}},9957:(s,i,u)=>{\"use strict\";var _=Function.prototype.call,w=Object.prototype.hasOwnProperty,x=u(66743);s.exports=x.call(_,w)},45981:s=>{function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=function(){throw new Error(\"map is read-only\")}:s instanceof Set&&(s.add=s.clear=s.delete=function(){throw new Error(\"set is read-only\")}),Object.freeze(s),Object.getOwnPropertyNames(s).forEach((function(i){var u=s[i];\"object\"!=typeof u||Object.isFrozen(u)||deepFreeze(u)})),s}var i=deepFreeze,u=deepFreeze;i.default=u;class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(s){return s.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#x27;\")}function inherit(s,...i){const u=Object.create(null);for(const i in s)u[i]=s[i];return i.forEach((function(s){for(const i in s)u[i]=s[i]})),u}const emitsWrappingTags=s=>!!s.kind;class HTMLRenderer{constructor(s,i){this.buffer=\"\",this.classPrefix=i.classPrefix,s.walk(this)}addText(s){this.buffer+=escapeHTML(s)}openNode(s){if(!emitsWrappingTags(s))return;let i=s.kind;s.sublanguage||(i=`${this.classPrefix}${i}`),this.span(i)}closeNode(s){emitsWrappingTags(s)&&(this.buffer+=\"</span>\")}value(){return this.buffer}span(s){this.buffer+=`<span class=\"${s}\">`}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(s){this.top.children.push(s)}openNode(s){const i={kind:s,children:[]};this.add(i),this.stack.push(i)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(s){return this.constructor._walk(s,this.rootNode)}static _walk(s,i){return\"string\"==typeof i?s.addText(i):i.children&&(s.openNode(i),i.children.forEach((i=>this._walk(s,i))),s.closeNode(i)),s}static _collapse(s){\"string\"!=typeof s&&s.children&&(s.children.every((s=>\"string\"==typeof s))?s.children=[s.children.join(\"\")]:s.children.forEach((s=>{TokenTree._collapse(s)})))}}class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.options=s}addKeyword(s,i){\"\"!==s&&(this.openNode(i),this.addText(s),this.closeNode())}addText(s){\"\"!==s&&this.add(s)}addSublanguage(s,i){const u=s.root;u.kind=i,u.sublanguage=!0,this.add(u)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(s){return s?\"string\"==typeof s?s:s.source:null}const _=/\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;const w=\"[a-zA-Z]\\\\w*\",x=\"[a-zA-Z_]\\\\w*\",j=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",P=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",B=\"\\\\b(0b[01]+)\",$={begin:\"\\\\\\\\[\\\\s\\\\S]\",relevance:0},U={className:\"string\",begin:\"'\",end:\"'\",illegal:\"\\\\n\",contains:[$]},Y={className:\"string\",begin:'\"',end:'\"',illegal:\"\\\\n\",contains:[$]},X={begin:/\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/},COMMENT=function(s,i,u={}){const _=inherit({className:\"comment\",begin:s,end:i,contains:[]},u);return _.contains.push(X),_.contains.push({className:\"doctag\",begin:\"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):\",relevance:0}),_},Z=COMMENT(\"//\",\"$\"),ee=COMMENT(\"/\\\\*\",\"\\\\*/\"),ie=COMMENT(\"#\",\"$\"),ae={className:\"number\",begin:j,relevance:0},le={className:\"number\",begin:P,relevance:0},ce={className:\"number\",begin:B,relevance:0},pe={className:\"number\",begin:j+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",relevance:0},de={begin:/(?=\\/[^/\\n]*\\/)/,contains:[{className:\"regexp\",begin:/\\//,end:/\\/[gimuy]*/,illegal:/\\n/,contains:[$,{begin:/\\[/,end:/\\]/,relevance:0,contains:[$]}]}]},fe={className:\"title\",begin:w,relevance:0},ye={className:\"title\",begin:x,relevance:0},be={begin:\"\\\\.\\\\s*\"+x,relevance:0};var _e=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\\b\\B/,IDENT_RE:w,UNDERSCORE_IDENT_RE:x,NUMBER_RE:j,C_NUMBER_RE:P,BINARY_NUMBER_RE:B,RE_STARTERS_RE:\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",SHEBANG:(s={})=>{const i=/^#![ ]*\\//;return s.binary&&(s.begin=function concat(...s){return s.map((s=>source(s))).join(\"\")}(i,/.*\\b/,s.binary,/\\b.*/)),inherit({className:\"meta\",begin:i,end:/$/,relevance:0,\"on:begin\":(s,i)=>{0!==s.index&&i.ignoreMatch()}},s)},BACKSLASH_ESCAPE:$,APOS_STRING_MODE:U,QUOTE_STRING_MODE:Y,PHRASAL_WORDS_MODE:X,COMMENT,C_LINE_COMMENT_MODE:Z,C_BLOCK_COMMENT_MODE:ee,HASH_COMMENT_MODE:ie,NUMBER_MODE:ae,C_NUMBER_MODE:le,BINARY_NUMBER_MODE:ce,CSS_NUMBER_MODE:pe,REGEXP_MODE:de,TITLE_MODE:fe,UNDERSCORE_TITLE_MODE:ye,METHOD_GUARD:be,END_SAME_AS_BEGIN:function(s){return Object.assign(s,{\"on:begin\":(s,i)=>{i.data._beginMatch=s[1]},\"on:end\":(s,i)=>{i.data._beginMatch!==s[1]&&i.ignoreMatch()}})}});function skipIfhasPrecedingDot(s,i){\".\"===s.input[s.index-1]&&i.ignoreMatch()}function beginKeywords(s,i){i&&s.beginKeywords&&(s.begin=\"\\\\b(\"+s.beginKeywords.split(\" \").join(\"|\")+\")(?!\\\\.)(?=\\\\b|\\\\s)\",s.__beforeBegin=skipIfhasPrecedingDot,s.keywords=s.keywords||s.beginKeywords,delete s.beginKeywords,void 0===s.relevance&&(s.relevance=0))}function compileIllegal(s,i){Array.isArray(s.illegal)&&(s.illegal=function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}(...s.illegal))}function compileMatch(s,i){if(s.match){if(s.begin||s.end)throw new Error(\"begin & end are not supported with match\");s.begin=s.match,delete s.match}}function compileRelevance(s,i){void 0===s.relevance&&(s.relevance=1)}const we=[\"of\",\"and\",\"for\",\"in\",\"not\",\"or\",\"if\",\"then\",\"parent\",\"list\",\"value\"],Se=\"keyword\";function compileKeywords(s,i,u=Se){const _={};return\"string\"==typeof s?compileList(u,s.split(\" \")):Array.isArray(s)?compileList(u,s):Object.keys(s).forEach((function(u){Object.assign(_,compileKeywords(s[u],i,u))})),_;function compileList(s,u){i&&(u=u.map((s=>s.toLowerCase()))),u.forEach((function(i){const u=i.split(\"|\");_[u[0]]=[s,scoreForKeyword(u[0],u[1])]}))}}function scoreForKeyword(s,i){return i?Number(i):function commonKeyword(s){return we.includes(s.toLowerCase())}(s)?0:1}function compileLanguage(s,{plugins:i}){function langRe(i,u){return new RegExp(source(i),\"m\"+(s.case_insensitive?\"i\":\"\")+(u?\"g\":\"\"))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,i){i.position=this.position++,this.matchIndexes[this.matchAt]=i,this.regexes.push([i,s]),this.matchAt+=function countMatchGroups(s){return new RegExp(s.toString()+\"|\").exec(\"\").length-1}(s)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const s=this.regexes.map((s=>s[1]));this.matcherRe=langRe(function join(s,i=\"|\"){let u=0;return s.map((s=>{u+=1;const i=u;let w=source(s),x=\"\";for(;w.length>0;){const s=_.exec(w);if(!s){x+=w;break}x+=w.substring(0,s.index),w=w.substring(s.index+s[0].length),\"\\\\\"===s[0][0]&&s[1]?x+=\"\\\\\"+String(Number(s[1])+i):(x+=s[0],\"(\"===s[0]&&u++)}return x})).map((s=>`(${s})`)).join(i)}(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const i=this.matcherRe.exec(s);if(!i)return null;const u=i.findIndex(((s,i)=>i>0&&void 0!==s)),_=this.matchIndexes[u];return i.splice(0,u),Object.assign(i,_)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const i=new MultiRegex;return this.rules.slice(s).forEach((([s,u])=>i.addRule(s,u))),i.compile(),this.multiRegexes[s]=i,i}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(s,i){this.rules.push([s,i]),\"begin\"===i.type&&this.count++}exec(s){const i=this.getMatcher(this.regexIndex);i.lastIndex=this.lastIndex;let u=i.exec(s);if(this.resumingScanAtSamePosition())if(u&&u.index===this.lastIndex);else{const i=this.getMatcher(0);i.lastIndex=this.lastIndex+1,u=i.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}if(s.compilerExtensions||(s.compilerExtensions=[]),s.contains&&s.contains.includes(\"self\"))throw new Error(\"ERR: contains `self` is not supported at the top-level of a language.  See documentation.\");return s.classNameAliases=inherit(s.classNameAliases||{}),function compileMode(i,u){const _=i;if(i.isCompiled)return _;[compileMatch].forEach((s=>s(i,u))),s.compilerExtensions.forEach((s=>s(i,u))),i.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((s=>s(i,u))),i.isCompiled=!0;let w=null;if(\"object\"==typeof i.keywords&&(w=i.keywords.$pattern,delete i.keywords.$pattern),i.keywords&&(i.keywords=compileKeywords(i.keywords,s.case_insensitive)),i.lexemes&&w)throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");return w=w||i.lexemes||/\\w+/,_.keywordPatternRe=langRe(w,!0),u&&(i.begin||(i.begin=/\\B|\\b/),_.beginRe=langRe(i.begin),i.endSameAsBegin&&(i.end=i.begin),i.end||i.endsWithParent||(i.end=/\\B|\\b/),i.end&&(_.endRe=langRe(i.end)),_.terminatorEnd=source(i.end)||\"\",i.endsWithParent&&u.terminatorEnd&&(_.terminatorEnd+=(i.end?\"|\":\"\")+u.terminatorEnd)),i.illegal&&(_.illegalRe=langRe(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(s){return function expandOrCloneMode(s){s.variants&&!s.cachedVariants&&(s.cachedVariants=s.variants.map((function(i){return inherit(s,{variants:null},i)})));if(s.cachedVariants)return s.cachedVariants;if(dependencyOnParent(s))return inherit(s,{starts:s.starts?inherit(s.starts):null});if(Object.isFrozen(s))return inherit(s);return s}(\"self\"===s?i:s)}))),i.contains.forEach((function(s){compileMode(s,_)})),i.starts&&compileMode(i.starts,u),_.matcher=function buildModeRegex(s){const i=new ResumableMultiRegex;return s.contains.forEach((s=>i.addRule(s.begin,{rule:s,type:\"begin\"}))),s.terminatorEnd&&i.addRule(s.terminatorEnd,{type:\"end\"}),s.illegal&&i.addRule(s.illegal,{type:\"illegal\"}),i}(_),_}(s)}function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyOnParent(s.starts))}function BuildVuePlugin(s){const i={props:[\"language\",\"code\",\"autodetect\"],data:function(){return{detectedLanguage:\"\",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?\"\":\"hljs \"+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!s.getLanguage(this.language))return console.warn(`The language \"${this.language}\" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let i={};return this.autoDetect?(i=s.highlightAuto(this.code),this.detectedLanguage=i.language):(i=s.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),i.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(s){return Boolean(s||\"\"===s)}(this.autodetect)},ignoreIllegals:()=>!0},render(s){return s(\"pre\",{},[s(\"code\",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:i,VuePlugin:{install(s){s.component(\"highlightjs\",i)}}}}const xe={\"after:highlightElement\":({el:s,result:i,text:u})=>{const _=nodeStream(s);if(!_.length)return;const w=document.createElement(\"div\");w.innerHTML=i.value,i.value=function mergeStreams(s,i,u){let _=0,w=\"\";const x=[];function selectStream(){return s.length&&i.length?s[0].offset!==i[0].offset?s[0].offset<i[0].offset?s:i:\"start\"===i[0].event?s:i:s.length?s:i}function open(s){function attributeString(s){return\" \"+s.nodeName+'=\"'+escapeHTML(s.value)+'\"'}w+=\"<\"+tag(s)+[].map.call(s.attributes,attributeString).join(\"\")+\">\"}function close(s){w+=\"</\"+tag(s)+\">\"}function render(s){(\"start\"===s.event?open:close)(s.node)}for(;s.length||i.length;){let i=selectStream();if(w+=escapeHTML(u.substring(_,i[0].offset)),_=i[0].offset,i===s){x.reverse().forEach(close);do{render(i.splice(0,1)[0]),i=selectStream()}while(i===s&&i.length&&i[0].offset===_);x.reverse().forEach(open)}else\"start\"===i[0].event?x.push(i[0].node):x.pop(),render(i.splice(0,1)[0])}return w+escapeHTML(u.substr(_))}(_,nodeStream(w),u)}};function tag(s){return s.nodeName.toLowerCase()}function nodeStream(s){const i=[];return function _nodeStream(s,u){for(let _=s.firstChild;_;_=_.nextSibling)3===_.nodeType?u+=_.nodeValue.length:1===_.nodeType&&(i.push({event:\"start\",offset:u,node:_}),u=_nodeStream(_,u),tag(_).match(/br|hr|img|input/)||i.push({event:\"stop\",offset:u,node:_}));return u}(s,0),i}const Pe={},error=s=>{console.error(s)},warn=(s,...i)=>{console.log(`WARN: ${s}`,...i)},deprecated=(s,i)=>{Pe[`${s}/${i}`]||(console.log(`Deprecated as of ${s}. ${i}`),Pe[`${s}/${i}`]=!0)},Te=escapeHTML,Re=inherit,qe=Symbol(\"nomatch\");var $e=function(s){const u=Object.create(null),_=Object.create(null),w=[];let x=!0;const j=/(^(<[^>]+>|\\t|)+|\\n)/gm,P=\"Could not find the language '{}', did you forget to load/include a language module?\",B={disableAutodetect:!0,name:\"Plain text\",contains:[]};let $={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\\blang(?:uage)?-([\\w-]+)\\b/i,classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(s){return $.noHighlightRe.test(s)}function highlight(s,i,u,_){let w=\"\",x=\"\";\"object\"==typeof i?(w=s,u=i.ignoreIllegals,x=i.language,_=void 0):(deprecated(\"10.7.0\",\"highlight(lang, code, ...args) has been deprecated.\"),deprecated(\"10.7.0\",\"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\"),x=s,w=i);const j={code:w,language:x};fire(\"before:highlight\",j);const P=j.result?j.result:_highlight(j.language,j.code,u,_);return P.code=j.code,fire(\"after:highlight\",P),P}function _highlight(s,i,_,j){function keywordData(s,i){const u=U.case_insensitive?i[0].toLowerCase():i[0];return Object.prototype.hasOwnProperty.call(s.keywords,u)&&s.keywords[u]}function processBuffer(){null!=Z.subLanguage?function processSubLanguage(){if(\"\"===ae)return;let s=null;if(\"string\"==typeof Z.subLanguage){if(!u[Z.subLanguage])return void ie.addText(ae);s=_highlight(Z.subLanguage,ae,!0,ee[Z.subLanguage]),ee[Z.subLanguage]=s.top}else s=highlightAuto(ae,Z.subLanguage.length?Z.subLanguage:null);Z.relevance>0&&(le+=s.relevance),ie.addSublanguage(s.emitter,s.language)}():function processKeywords(){if(!Z.keywords)return void ie.addText(ae);let s=0;Z.keywordPatternRe.lastIndex=0;let i=Z.keywordPatternRe.exec(ae),u=\"\";for(;i;){u+=ae.substring(s,i.index);const _=keywordData(Z,i);if(_){const[s,w]=_;if(ie.addText(u),u=\"\",le+=w,s.startsWith(\"_\"))u+=i[0];else{const u=U.classNameAliases[s]||s;ie.addKeyword(i[0],u)}}else u+=i[0];s=Z.keywordPatternRe.lastIndex,i=Z.keywordPatternRe.exec(ae)}u+=ae.substr(s),ie.addText(u)}(),ae=\"\"}function startNewMode(s){return s.className&&ie.openNode(U.classNameAliases[s.className]||s.className),Z=Object.create(s,{parent:{value:Z}}),Z}function endOfMode(s,i,u){let _=function startsWith(s,i){const u=s&&s.exec(i);return u&&0===u.index}(s.endRe,u);if(_){if(s[\"on:end\"]){const u=new Response(s);s[\"on:end\"](i,u),u.isMatchIgnored&&(_=!1)}if(_){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return endOfMode(s.parent,i,u)}function doIgnore(s){return 0===Z.matcher.regexIndex?(ae+=s[0],1):(de=!0,0)}function doBeginMatch(s){const i=s[0],u=s.rule,_=new Response(u),w=[u.__beforeBegin,u[\"on:begin\"]];for(const u of w)if(u&&(u(s,_),_.isMatchIgnored))return doIgnore(i);return u&&u.endSameAsBegin&&(u.endRe=function escape(s){return new RegExp(s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\"),\"m\")}(i)),u.skip?ae+=i:(u.excludeBegin&&(ae+=i),processBuffer(),u.returnBegin||u.excludeBegin||(ae=i)),startNewMode(u),u.returnBegin?0:i.length}function doEndMatch(s){const u=s[0],_=i.substr(s.index),w=endOfMode(Z,s,_);if(!w)return qe;const x=Z;x.skip?ae+=u:(x.returnEnd||x.excludeEnd||(ae+=u),processBuffer(),x.excludeEnd&&(ae=u));do{Z.className&&ie.closeNode(),Z.skip||Z.subLanguage||(le+=Z.relevance),Z=Z.parent}while(Z!==w.parent);return w.starts&&(w.endSameAsBegin&&(w.starts.endRe=w.endRe),startNewMode(w.starts)),x.returnEnd?0:u.length}let B={};function processLexeme(u,w){const j=w&&w[0];if(ae+=u,null==j)return processBuffer(),0;if(\"begin\"===B.type&&\"end\"===w.type&&B.index===w.index&&\"\"===j){if(ae+=i.slice(w.index,w.index+1),!x){const i=new Error(\"0 width match regex\");throw i.languageName=s,i.badRule=B.rule,i}return 1}if(B=w,\"begin\"===w.type)return doBeginMatch(w);if(\"illegal\"===w.type&&!_){const s=new Error('Illegal lexeme \"'+j+'\" for mode \"'+(Z.className||\"<unnamed>\")+'\"');throw s.mode=Z,s}if(\"end\"===w.type){const s=doEndMatch(w);if(s!==qe)return s}if(\"illegal\"===w.type&&\"\"===j)return 1;if(pe>1e5&&pe>3*w.index){throw new Error(\"potential infinite loop, way more iterations than matches\")}return ae+=j,j.length}const U=getLanguage(s);if(!U)throw error(P.replace(\"{}\",s)),new Error('Unknown language: \"'+s+'\"');const Y=compileLanguage(U,{plugins:w});let X=\"\",Z=j||Y;const ee={},ie=new $.__emitter($);!function processContinuations(){const s=[];for(let i=Z;i!==U;i=i.parent)i.className&&s.unshift(i.className);s.forEach((s=>ie.openNode(s)))}();let ae=\"\",le=0,ce=0,pe=0,de=!1;try{for(Z.matcher.considerAll();;){pe++,de?de=!1:Z.matcher.considerAll(),Z.matcher.lastIndex=ce;const s=Z.matcher.exec(i);if(!s)break;const u=processLexeme(i.substring(ce,s.index),s);ce=s.index+u}return processLexeme(i.substr(ce)),ie.closeAllNodes(),ie.finalize(),X=ie.toHTML(),{relevance:Math.floor(le),value:X,language:s,illegal:!1,emitter:ie,top:Z}}catch(u){if(u.message&&u.message.includes(\"Illegal\"))return{illegal:!0,illegalBy:{msg:u.message,context:i.slice(ce-100,ce+100),mode:u.mode},sofar:X,relevance:0,value:Te(i),emitter:ie};if(x)return{illegal:!1,relevance:0,value:Te(i),emitter:ie,language:s,top:Z,errorRaised:u};throw u}}function highlightAuto(s,i){i=i||$.languages||Object.keys(u);const _=function justTextHighlightResult(s){const i={relevance:0,emitter:new $.__emitter($),value:Te(s),illegal:!1,top:B};return i.emitter.addText(s),i}(s),w=i.filter(getLanguage).filter(autoDetection).map((i=>_highlight(i,s,!1)));w.unshift(_);const x=w.sort(((s,i)=>{if(s.relevance!==i.relevance)return i.relevance-s.relevance;if(s.language&&i.language){if(getLanguage(s.language).supersetOf===i.language)return 1;if(getLanguage(i.language).supersetOf===s.language)return-1}return 0})),[j,P]=x,U=j;return U.second_best=P,U}const U={\"before:highlightElement\":({el:s})=>{$.useBR&&(s.innerHTML=s.innerHTML.replace(/\\n/g,\"\").replace(/<br[ /]*>/g,\"\\n\"))},\"after:highlightElement\":({result:s})=>{$.useBR&&(s.value=s.value.replace(/\\n/g,\"<br>\"))}},Y=/^(<[^>]+>|\\t)+/gm,X={\"after:highlightElement\":({result:s})=>{$.tabReplace&&(s.value=s.value.replace(Y,(s=>s.replace(/\\t/g,$.tabReplace))))}};function highlightElement(s){let i=null;const u=function blockLanguage(s){let i=s.className+\" \";i+=s.parentNode?s.parentNode.className:\"\";const u=$.languageDetectRe.exec(i);if(u){const i=getLanguage(u[1]);return i||(warn(P.replace(\"{}\",u[1])),warn(\"Falling back to no-highlight mode for this block.\",s)),i?u[1]:\"no-highlight\"}return i.split(/\\s+/).find((s=>shouldNotHighlight(s)||getLanguage(s)))}(s);if(shouldNotHighlight(u))return;fire(\"before:highlightElement\",{el:s,language:u}),i=s;const w=i.textContent,x=u?highlight(w,{language:u,ignoreIllegals:!0}):highlightAuto(w);fire(\"after:highlightElement\",{el:s,result:x,text:w}),s.innerHTML=x.value,function updateClassName(s,i,u){const w=i?_[i]:u;s.classList.add(\"hljs\"),w&&s.classList.add(w)}(s,u,x.language),s.result={language:x.language,re:x.relevance,relavance:x.relevance},x.second_best&&(s.second_best={language:x.second_best.language,re:x.second_best.relevance,relavance:x.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated(\"10.6.0\",\"initHighlighting() is deprecated.  Use highlightAll() instead.\");document.querySelectorAll(\"pre code\").forEach(highlightElement)};let Z=!1;function highlightAll(){if(\"loading\"===document.readyState)return void(Z=!0);document.querySelectorAll(\"pre code\").forEach(highlightElement)}function getLanguage(s){return s=(s||\"\").toLowerCase(),u[s]||u[_[s]]}function registerAliases(s,{languageName:i}){\"string\"==typeof s&&(s=[s]),s.forEach((s=>{_[s.toLowerCase()]=i}))}function autoDetection(s){const i=getLanguage(s);return i&&!i.disableAutodetect}function fire(s,i){const u=s;w.forEach((function(s){s[u]&&s[u](i)}))}\"undefined\"!=typeof window&&window.addEventListener&&window.addEventListener(\"DOMContentLoaded\",(function boot(){Z&&highlightAll()}),!1),Object.assign(s,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(s){return deprecated(\"10.2.0\",\"fixMarkup will be removed entirely in v11.0\"),deprecated(\"10.2.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2534\"),function fixMarkup(s){return $.tabReplace||$.useBR?s.replace(j,(s=>\"\\n\"===s?$.useBR?\"<br>\":s:$.tabReplace?s.replace(/\\t/g,$.tabReplace):s)):s}(s)},highlightElement,highlightBlock:function deprecateHighlightBlock(s){return deprecated(\"10.7.0\",\"highlightBlock will be removed entirely in v12.0\"),deprecated(\"10.7.0\",\"Please use highlightElement now.\"),highlightElement(s)},configure:function configure(s){s.useBR&&(deprecated(\"10.3.0\",\"'useBR' will be removed entirely in v11.0\"),deprecated(\"10.3.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2559\")),$=Re($,s)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated(\"10.6.0\",\"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\"),Z=!0},registerLanguage:function registerLanguage(i,_){let w=null;try{w=_(s)}catch(s){if(error(\"Language definition for '{}' could not be registered.\".replace(\"{}\",i)),!x)throw s;error(s),w=B}w.name||(w.name=i),u[i]=w,w.rawDefinition=_.bind(null,s),w.aliases&&registerAliases(w.aliases,{languageName:i})},unregisterLanguage:function unregisterLanguage(s){delete u[s];for(const i of Object.keys(_))_[i]===s&&delete _[i]},listLanguages:function listLanguages(){return Object.keys(u)},getLanguage,registerAliases,requireLanguage:function requireLanguage(s){deprecated(\"10.4.0\",\"requireLanguage will be removed entirely in v11.\"),deprecated(\"10.4.0\",\"Please see https://github.com/highlightjs/highlight.js/pull/2844\");const i=getLanguage(s);if(i)return i;throw new Error(\"The '{}' language is required, but not loaded.\".replace(\"{}\",s))},autoDetection,inherit:Re,addPlugin:function addPlugin(s){!function upgradePluginAPI(s){s[\"before:highlightBlock\"]&&!s[\"before:highlightElement\"]&&(s[\"before:highlightElement\"]=i=>{s[\"before:highlightBlock\"](Object.assign({block:i.el},i))}),s[\"after:highlightBlock\"]&&!s[\"after:highlightElement\"]&&(s[\"after:highlightElement\"]=i=>{s[\"after:highlightBlock\"](Object.assign({block:i.el},i))})}(s),w.push(s)},vuePlugin:BuildVuePlugin(s).VuePlugin}),s.debugMode=function(){x=!1},s.safeMode=function(){x=!0},s.versionString=\"10.7.3\";for(const s in _e)\"object\"==typeof _e[s]&&i(_e[s]);return Object.assign(s,_e),s.addPlugin(U),s.addPlugin(xe),s.addPlugin(X),s}({});s.exports=$e},35344:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function bash(s){const i={},u={begin:/\\$\\{/,end:/\\}/,contains:[\"self\",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:\"variable\",variants:[{begin:concat(/\\$[\\w\\d#@][\\w\\d_]*/,\"(?![\\\\w\\\\d])(?![$])\")},u]});const _={className:\"subst\",begin:/\\$\\(/,end:/\\)/,contains:[s.BACKSLASH_ESCAPE]},w={begin:/<<-?\\s*(?=\\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\\w+)/,end:/(\\w+)/,className:\"string\"})]}},x={className:\"string\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE,i,_]};_.contains.push(x);const j={begin:/\\$\\(\\(/,end:/\\)\\)/,contains:[{begin:/\\d+#[0-9a-f]+/,className:\"number\"},s.NUMBER_MODE,i]},P=s.SHEBANG({binary:`(${[\"fish\",\"bash\",\"zsh\",\"sh\",\"csh\",\"ksh\",\"tcsh\",\"dash\",\"scsh\"].join(\"|\")})`,relevance:10}),B={className:\"function\",begin:/\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,returnBegin:!0,contains:[s.inherit(s.TITLE_MODE,{begin:/\\w[\\w\\d_]*/})],relevance:0};return{name:\"Bash\",aliases:[\"sh\",\"zsh\"],keywords:{$pattern:/\\b[a-z._-]+\\b/,keyword:\"if then else elif fi for while in do done case esac function\",literal:\"true false\",built_in:\"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp\"},contains:[P,s.SHEBANG(),B,j,s.HASH_COMMENT_MODE,w,x,{className:\"\",begin:/\\\\\"/},{className:\"string\",begin:/'/,end:/'/},i]}}},73402:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function http(s){const i=\"HTTP/(2|1\\\\.[01])\",u={className:\"attribute\",begin:concat(\"^\",/[A-Za-z][A-Za-z0-9-]*/,\"(?=\\\\:\\\\s)\"),starts:{contains:[{className:\"punctuation\",begin:/: /,relevance:0,starts:{end:\"$\",relevance:0}}]}},_=[u,{begin:\"\\\\n\\\\n\",starts:{subLanguage:[],endsWithParent:!0}}];return{name:\"HTTP\",aliases:[\"https\"],illegal:/\\S/,contains:[{begin:\"^(?=\"+i+\" \\\\d{3})\",end:/$/,contains:[{className:\"meta\",begin:i},{className:\"number\",begin:\"\\\\b\\\\d{3}\\\\b\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:_}},{begin:\"(?=^[A-Z]+ (.*?) \"+i+\"$)\",end:/$/,contains:[{className:\"string\",begin:\" \",end:\" \",excludeBegin:!0,excludeEnd:!0},{className:\"meta\",begin:i},{className:\"keyword\",begin:\"[A-Z]+\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:_}},s.inherit(u,{relevance:0})]}}},95089:s=>{const i=\"[A-Za-z$_][0-9A-Za-z$_]*\",u=[\"as\",\"in\",\"of\",\"if\",\"for\",\"while\",\"finally\",\"var\",\"new\",\"function\",\"do\",\"return\",\"void\",\"else\",\"break\",\"catch\",\"instanceof\",\"with\",\"throw\",\"case\",\"default\",\"try\",\"switch\",\"continue\",\"typeof\",\"delete\",\"let\",\"yield\",\"const\",\"class\",\"debugger\",\"async\",\"await\",\"static\",\"import\",\"from\",\"export\",\"extends\"],_=[\"true\",\"false\",\"null\",\"undefined\",\"NaN\",\"Infinity\"],w=[].concat([\"setInterval\",\"setTimeout\",\"clearInterval\",\"clearTimeout\",\"require\",\"exports\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\"],[\"arguments\",\"this\",\"super\",\"console\",\"window\",\"document\",\"localStorage\",\"module\",\"global\"],[\"Intl\",\"DataView\",\"Number\",\"Math\",\"Date\",\"String\",\"RegExp\",\"Object\",\"Function\",\"Boolean\",\"Error\",\"Symbol\",\"Set\",\"Map\",\"WeakSet\",\"WeakMap\",\"Proxy\",\"Reflect\",\"JSON\",\"Promise\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Float32Array\",\"Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"ArrayBuffer\",\"BigInt64Array\",\"BigUint64Array\",\"BigInt\"],[\"EvalError\",\"InternalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\"]);function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function javascript(s){const x=i,j=\"<>\",P=\"</>\",B={begin:/<[A-Za-z0-9\\\\._:-]+/,end:/\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,isTrulyOpeningTag:(s,i)=>{const u=s[0].length+s.index,_=s.input[u];\"<\"!==_?\">\"===_&&(((s,{after:i})=>{const u=\"</\"+s[0].slice(1);return-1!==s.input.indexOf(u,i)})(s,{after:u})||i.ignoreMatch()):i.ignoreMatch()}},$={$pattern:i,keyword:u,literal:_,built_in:w},U=\"[0-9](_?[0-9])*\",Y=`\\\\.(${U})`,X=\"0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*\",Z={className:\"number\",variants:[{begin:`(\\\\b(${X})((${Y})|\\\\.)?|(${Y}))[eE][+-]?(${U})\\\\b`},{begin:`\\\\b(${X})\\\\b((${Y})\\\\b|\\\\.)?|(${Y})\\\\b`},{begin:\"\\\\b(0|[1-9](_?[0-9])*)n\\\\b\"},{begin:\"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"},{begin:\"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"},{begin:\"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"},{begin:\"\\\\b0[0-7]+n?\\\\b\"}],relevance:0},ee={className:\"subst\",begin:\"\\\\$\\\\{\",end:\"\\\\}\",keywords:$,contains:[]},ie={begin:\"html`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,ee],subLanguage:\"xml\"}},ae={begin:\"css`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,ee],subLanguage:\"css\"}},le={className:\"string\",begin:\"`\",end:\"`\",contains:[s.BACKSLASH_ESCAPE,ee]},ce={className:\"comment\",variants:[s.COMMENT(/\\/\\*\\*(?!\\/)/,\"\\\\*/\",{relevance:0,contains:[{className:\"doctag\",begin:\"@[A-Za-z]+\",contains:[{className:\"type\",begin:\"\\\\{\",end:\"\\\\}\",relevance:0},{className:\"variable\",begin:x+\"(?=\\\\s*(-)|$)\",endsParent:!0,relevance:0},{begin:/(?=[^\\n])\\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},pe=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,ie,ae,le,Z,s.REGEXP_MODE];ee.contains=pe.concat({begin:/\\{/,end:/\\}/,keywords:$,contains:[\"self\"].concat(pe)});const de=[].concat(ce,ee.contains),fe=de.concat([{begin:/\\(/,end:/\\)/,keywords:$,contains:[\"self\"].concat(de)}]),ye={className:\"params\",begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:$,contains:fe};return{name:\"Javascript\",aliases:[\"js\",\"jsx\",\"mjs\",\"cjs\"],keywords:$,exports:{PARAMS_CONTAINS:fe},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:\"shebang\",binary:\"node\",relevance:5}),{label:\"use_strict\",className:\"meta\",relevance:10,begin:/^\\s*['\"]use (strict|asm)['\"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,ie,ae,le,ce,Z,{begin:concat(/[{,\\n]\\s*/,lookahead(concat(/(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,x+\"\\\\s*:\"))),relevance:0,contains:[{className:\"attr\",begin:x+lookahead(\"\\\\s*:\"),relevance:0}]},{begin:\"(\"+s.RE_STARTERS_RE+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",keywords:\"return throw case\",contains:[ce,s.REGEXP_MODE,{className:\"function\",begin:\"(\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)|\"+s.UNDERSCORE_IDENT_RE+\")\\\\s*=>\",returnBegin:!0,end:\"\\\\s*=>\",contains:[{className:\"params\",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\\(\\s*\\)/,skip:!0},{begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:$,contains:fe}]}]},{begin:/,/,relevance:0},{className:\"\",begin:/\\s/,end:/\\s*/,skip:!0},{variants:[{begin:j,end:P},{begin:B.begin,\"on:begin\":B.isTrulyOpeningTag,end:B.end}],subLanguage:\"xml\",contains:[{begin:B.begin,end:B.end,skip:!0,contains:[\"self\"]}]}],relevance:0},{className:\"function\",beginKeywords:\"function\",end:/[{;]/,excludeEnd:!0,keywords:$,contains:[\"self\",s.inherit(s.TITLE_MODE,{begin:x}),ye],illegal:/%/},{beginKeywords:\"while if switch catch for\"},{className:\"function\",begin:s.UNDERSCORE_IDENT_RE+\"\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)\\\\s*\\\\{\",returnBegin:!0,contains:[ye,s.inherit(s.TITLE_MODE,{begin:x})]},{variants:[{begin:\"\\\\.\"+x},{begin:\"\\\\$\"+x}],relevance:0},{className:\"class\",beginKeywords:\"class\",end:/[{;=]/,excludeEnd:!0,illegal:/[:\"[\\]]/,contains:[{beginKeywords:\"extends\"},s.UNDERSCORE_TITLE_MODE]},{begin:/\\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[s.inherit(s.TITLE_MODE,{begin:x}),\"self\",ye]},{begin:\"(get|set)\\\\s+(?=\"+x+\"\\\\()\",end:/\\{/,keywords:\"get set\",contains:[s.inherit(s.TITLE_MODE,{begin:x}),{begin:/\\(\\)/},ye]},{begin:/\\$[(.]/}]}}},65772:s=>{s.exports=function json(s){const i={literal:\"true false null\"},u=[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],_=[s.QUOTE_STRING_MODE,s.C_NUMBER_MODE],w={end:\",\",endsWithParent:!0,excludeEnd:!0,contains:_,keywords:i},x={begin:/\\{/,end:/\\}/,contains:[{className:\"attr\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE],illegal:\"\\\\n\"},s.inherit(w,{begin:/:/})].concat(u),illegal:\"\\\\S\"},j={begin:\"\\\\[\",end:\"\\\\]\",contains:[s.inherit(w)],illegal:\"\\\\S\"};return _.push(x,j),u.forEach((function(s){_.push(s)})),{name:\"JSON\",contains:_,keywords:i,illegal:\"\\\\S\"}}},26571:s=>{s.exports=function powershell(s){const i={$pattern:/-?[A-z\\.\\-]+\\b/,keyword:\"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter\",built_in:\"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write\"},u={begin:\"`[\\\\s\\\\S]\",relevance:0},_={className:\"variable\",variants:[{begin:/\\$\\B/},{className:\"keyword\",begin:/\\$this/},{begin:/\\$[\\w\\d][\\w\\d_:]*/}]},w={className:\"string\",variants:[{begin:/\"/,end:/\"/},{begin:/@\"/,end:/^\"@/}],contains:[u,_,{className:\"variable\",begin:/\\$[A-z]/,end:/[^A-z]/}]},x={className:\"string\",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},j=s.inherit(s.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:\"doctag\",variants:[{begin:/\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/}]}]}),P={className:\"built_in\",variants:[{begin:\"(\".concat(\"Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where\",\")+(-)[\\\\w\\\\d]+\")}]},B={className:\"class\",beginKeywords:\"class enum\",end:/\\s*[{]/,excludeEnd:!0,relevance:0,contains:[s.TITLE_MODE]},$={className:\"function\",begin:/function\\s+/,end:/\\s*\\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:\"function\",relevance:0,className:\"keyword\"},{className:\"title\",begin:/\\w[\\w\\d]*((-)[\\w\\d]+)*/,relevance:0},{begin:/\\(/,end:/\\)/,className:\"params\",relevance:0,contains:[_]}]},U={begin:/using\\s/,end:/$/,returnBegin:!0,contains:[w,x,{className:\"keyword\",begin:/(using|assembly|command|module|namespace|type)/}]},Y={variants:[{className:\"operator\",begin:\"(\".concat(\"-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor\",\")\\\\b\")},{className:\"literal\",begin:/(-)[\\w\\d]+/,relevance:0}]},X={className:\"function\",begin:/\\[.*\\]\\s*[\\w]+[ ]??\\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:\"keyword\",begin:\"(\".concat(i.keyword.toString().replace(/\\s/g,\"|\"),\")\\\\b\"),endsParent:!0,relevance:0},s.inherit(s.TITLE_MODE,{endsParent:!0})]},Z=[X,j,u,s.NUMBER_MODE,w,x,P,_,{className:\"literal\",begin:/\\$(null|true|false)\\b/},{className:\"selector-tag\",begin:/@\\B/,relevance:0}],ee={begin:/\\[/,end:/\\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat(\"self\",Z,{begin:\"(\"+[\"string\",\"char\",\"byte\",\"int\",\"long\",\"bool\",\"decimal\",\"single\",\"double\",\"DateTime\",\"xml\",\"array\",\"hashtable\",\"void\"].join(\"|\")+\")\",className:\"built_in\",relevance:0},{className:\"type\",begin:/[\\.\\w\\d]+/,relevance:0})};return X.contains.unshift(ee),{name:\"PowerShell\",aliases:[\"ps\",\"ps1\"],case_insensitive:!0,keywords:i,contains:Z.concat(B,$,U,Y,ee)}}},17285:s=>{function source(s){return s?\"string\"==typeof s?s:s.source:null}function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>source(s))).join(\"\")}function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}s.exports=function xml(s){const i=concat(/[A-Z_]/,function optional(s){return concat(\"(\",s,\")?\")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),u={className:\"symbol\",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},_={begin:/\\s/,contains:[{className:\"meta-keyword\",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\\n/}]},w=s.inherit(_,{begin:/\\(/,end:/\\)/}),x=s.inherit(s.APOS_STRING_MODE,{className:\"meta-string\"}),j=s.inherit(s.QUOTE_STRING_MODE,{className:\"meta-string\"}),P={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:\"attr\",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\\s*/,relevance:0,contains:[{className:\"string\",endsParent:!0,variants:[{begin:/\"/,end:/\"/,contains:[u]},{begin:/'/,end:/'/,contains:[u]},{begin:/[^\\s\"'=<>`]+/}]}]}]};return{name:\"HTML, XML\",aliases:[\"html\",\"xhtml\",\"rss\",\"atom\",\"xjb\",\"xsd\",\"xsl\",\"plist\",\"wsf\",\"svg\"],case_insensitive:!0,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,relevance:10,contains:[_,j,x,w,{begin:/\\[/,end:/\\]/,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,contains:[_,w,j,x]}]}]},s.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\\[CDATA\\[/,end:/\\]\\]>/,relevance:10},u,{className:\"meta\",begin:/<\\?xml/,end:/\\?>/,relevance:10},{className:\"tag\",begin:/<style(?=\\s|>)/,end:/>/,keywords:{name:\"style\"},contains:[P],starts:{end:/<\\/style>/,returnEnd:!0,subLanguage:[\"css\",\"xml\"]}},{className:\"tag\",begin:/<script(?=\\s|>)/,end:/>/,keywords:{name:\"script\"},contains:[P],starts:{end:/<\\/script>/,returnEnd:!0,subLanguage:[\"javascript\",\"handlebars\",\"xml\"]}},{className:\"tag\",begin:/<>|<\\/>/},{className:\"tag\",begin:concat(/</,lookahead(concat(i,either(/\\/>/,/>/,/\\s/)))),end:/\\/?>/,contains:[{className:\"name\",begin:i,relevance:0,starts:P}]},{className:\"tag\",begin:concat(/<\\//,lookahead(concat(i,/>/))),contains:[{className:\"name\",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17533:s=>{s.exports=function yaml(s){var i=\"true false yes no null\",u=\"[\\\\w#;/?:@&=+$,.~*'()[\\\\]]+\",_={className:\"string\",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/\\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:\"template-variable\",variants:[{begin:/\\{\\{/,end:/\\}\\}/},{begin:/%\\{/,end:/\\}/}]}]},w=s.inherit(_,{variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/[^\\s,{}[\\]]+/}]}),x={className:\"number\",begin:\"\\\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\\\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\\\.[0-9]*)?([ \\\\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\\\b\"},j={end:\",\",endsWithParent:!0,excludeEnd:!0,keywords:i,relevance:0},P={begin:/\\{/,end:/\\}/,contains:[j],illegal:\"\\\\n\",relevance:0},B={begin:\"\\\\[\",end:\"\\\\]\",contains:[j],illegal:\"\\\\n\",relevance:0},$=[{className:\"attr\",variants:[{begin:\"\\\\w[\\\\w :\\\\/.-]*:(?=[ \\t]|$)\"},{begin:'\"\\\\w[\\\\w :\\\\/.-]*\":(?=[ \\t]|$)'},{begin:\"'\\\\w[\\\\w :\\\\/.-]*':(?=[ \\t]|$)\"}]},{className:\"meta\",begin:\"^---\\\\s*$\",relevance:10},{className:\"string\",begin:\"[\\\\|>]([1-9]?[+-])?[ ]*\\\\n( +)[^ ][^\\\\n]*\\\\n(\\\\2[^\\\\n]+\\\\n?)*\"},{begin:\"<%[%=-]?\",end:\"[%-]?%>\",subLanguage:\"ruby\",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:\"type\",begin:\"!\\\\w+!\"+u},{className:\"type\",begin:\"!<\"+u+\">\"},{className:\"type\",begin:\"!\"+u},{className:\"type\",begin:\"!!\"+u},{className:\"meta\",begin:\"&\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"meta\",begin:\"\\\\*\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"bullet\",begin:\"-(?=[ ]|$)\",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:i,keywords:{literal:i}},x,{className:\"number\",begin:s.C_NUMBER_RE+\"\\\\b\",relevance:0},P,B,_],U=[...$];return U.pop(),U.push(w),j.contains=U,{name:\"YAML\",case_insensitive:!0,aliases:[\"yml\"],contains:$}}},251:(s,i)=>{i.read=function(s,i,u,_,w){var x,j,P=8*w-_-1,B=(1<<P)-1,$=B>>1,U=-7,Y=u?w-1:0,X=u?-1:1,Z=s[i+Y];for(Y+=X,x=Z&(1<<-U)-1,Z>>=-U,U+=P;U>0;x=256*x+s[i+Y],Y+=X,U-=8);for(j=x&(1<<-U)-1,x>>=-U,U+=_;U>0;j=256*j+s[i+Y],Y+=X,U-=8);if(0===x)x=1-$;else{if(x===B)return j?NaN:1/0*(Z?-1:1);j+=Math.pow(2,_),x-=$}return(Z?-1:1)*j*Math.pow(2,x-_)},i.write=function(s,i,u,_,w,x){var j,P,B,$=8*x-w-1,U=(1<<$)-1,Y=U>>1,X=23===w?Math.pow(2,-24)-Math.pow(2,-77):0,Z=_?0:x-1,ee=_?1:-1,ie=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(P=isNaN(i)?1:0,j=U):(j=Math.floor(Math.log(i)/Math.LN2),i*(B=Math.pow(2,-j))<1&&(j--,B*=2),(i+=j+Y>=1?X/B:X*Math.pow(2,1-Y))*B>=2&&(j++,B/=2),j+Y>=U?(P=0,j=U):j+Y>=1?(P=(i*B-1)*Math.pow(2,w),j+=Y):(P=i*Math.pow(2,Y-1)*Math.pow(2,w),j=0));w>=8;s[u+Z]=255&P,Z+=ee,P/=256,w-=8);for(j=j<<w|P,$+=w;$>0;s[u+Z]=255&j,Z+=ee,j/=256,$-=8);s[u+Z-ee]|=128*ie}},9404:function(s){s.exports=function(){\"use strict\";var s=Array.prototype.slice;function createClass(s,i){i&&(s.prototype=Object.create(i.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[i])}function isKeyed(s){return!(!s||!s[u])}function isIndexed(s){return!(!s||!s[_])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[w])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var i=\"@@__IMMUTABLE_ITERABLE__@@\",u=\"@@__IMMUTABLE_KEYED__@@\",_=\"@@__IMMUTABLE_INDEXED__@@\",w=\"@@__IMMUTABLE_ORDERED__@@\",x=\"delete\",j=5,P=1<<j,B=P-1,$={},U={value:!1},Y={value:!1};function MakeRef(s){return s.value=!1,s}function SetRef(s){s&&(s.value=!0)}function OwnerID(){}function arrCopy(s,i){i=i||0;for(var u=Math.max(0,s.length-i),_=new Array(u),w=0;w<u;w++)_[w]=s[w+i];return _}function ensureSize(s){return void 0===s.size&&(s.size=s.__iterate(returnTrue)),s.size}function wrapIndex(s,i){if(\"number\"!=typeof i){var u=i>>>0;if(\"\"+u!==i||4294967295===u)return NaN;i=u}return i<0?ensureSize(s)+i:i}function returnTrue(){return!0}function wholeSlice(s,i,u){return(0===s||void 0!==u&&s<=-u)&&(void 0===i||void 0!==u&&i>=u)}function resolveBegin(s,i){return resolveIndex(s,i,0)}function resolveEnd(s,i){return resolveIndex(s,i,i)}function resolveIndex(s,i,u){return void 0===s?u:s<0?Math.max(0,i+s):void 0===i?s:Math.min(i,s)}var X=0,Z=1,ee=2,ie=\"function\"==typeof Symbol&&Symbol.iterator,ae=\"@@iterator\",le=ie||ae;function Iterator(s){this.next=s}function iteratorValue(s,i,u,_){var w=0===s?i:1===s?u:[i,u];return _?_.value=w:_={value:w,done:!1},_}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&\"function\"==typeof s.next}function getIterator(s){var i=getIteratorFn(s);return i&&i.call(s)}function getIteratorFn(s){var i=s&&(ie&&s[ie]||s[ae]);if(\"function\"==typeof i)return i}function isArrayLike(s){return s&&\"number\"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=X,Iterator.VALUES=Z,Iterator.ENTRIES=ee,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[le]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!0)},Seq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(s,i){return seqIterate(this,s,i,!1)},IndexedSeq.prototype.__iterator=function(s,i){return seqIterator(this,s,i,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ce,pe,de,fe=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var i=Object.keys(s);this._object=s,this._keys=i,this.size=i.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[fe])}function emptySequence(){return ce||(ce=new ArraySeq([]))}function keyedSeqFromValue(s){var i=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():\"object\"==typeof s?new ObjectSeq(s):void 0;if(!i)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+s);return i}function indexedSeqFromValue(s){var i=maybeIndexedSeqFromValue(s);if(!i)throw new TypeError(\"Expected Array or iterable object of values: \"+s);return i}function seqFromValue(s){var i=maybeIndexedSeqFromValue(s)||\"object\"==typeof s&&new ObjectSeq(s);if(!i)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+s);return i}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,i,u,_){var w=s._cache;if(w){for(var x=w.length-1,j=0;j<=x;j++){var P=w[u?x-j:j];if(!1===i(P[1],_?P[0]:j,s))return j+1}return j}return s.__iterateUncached(i,u)}function seqIterator(s,i,u,_){var w=s._cache;if(w){var x=w.length-1,j=0;return new Iterator((function(){var s=w[u?x-j:j];return j++>x?iteratorDone():iteratorValue(i,_?s[0]:j-1,s[1])}))}return s.__iteratorUncached(i,u)}function fromJS(s,i){return i?fromJSWith(i,s,\"\",{\"\":s}):fromJSDefault(s)}function fromJSWith(s,i,u,_){return Array.isArray(i)?s.call(_,u,IndexedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):isPlainObj(i)?s.call(_,u,KeyedSeq(i).map((function(u,_){return fromJSWith(s,u,_,i)}))):i}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,i){if(s===i||s!=s&&i!=i)return!0;if(!s||!i)return!1;if(\"function\"==typeof s.valueOf&&\"function\"==typeof i.valueOf){if((s=s.valueOf())===(i=i.valueOf())||s!=s&&i!=i)return!0;if(!s||!i)return!1}return!(\"function\"!=typeof s.equals||\"function\"!=typeof i.equals||!s.equals(i))}function deepEqual(s,i){if(s===i)return!0;if(!isIterable(i)||void 0!==s.size&&void 0!==i.size&&s.size!==i.size||void 0!==s.__hash&&void 0!==i.__hash&&s.__hash!==i.__hash||isKeyed(s)!==isKeyed(i)||isIndexed(s)!==isIndexed(i)||isOrdered(s)!==isOrdered(i))return!1;if(0===s.size&&0===i.size)return!0;var u=!isAssociative(s);if(isOrdered(s)){var _=s.entries();return i.every((function(s,i){var w=_.next().value;return w&&is(w[1],s)&&(u||is(w[0],i))}))&&_.next().done}var w=!1;if(void 0===s.size)if(void 0===i.size)\"function\"==typeof s.cacheResult&&s.cacheResult();else{w=!0;var x=s;s=i,i=x}var j=!0,P=i.__iterate((function(i,_){if(u?!s.has(i):w?!is(i,s.get(_,$)):!is(s.get(_,$),i))return j=!1,!1}));return j&&s.size===P}function Repeat(s,i){if(!(this instanceof Repeat))return new Repeat(s,i);if(this._value=s,this.size=void 0===i?1/0:Math.max(0,i),0===this.size){if(pe)return pe;pe=this}}function invariant(s,i){if(!s)throw new Error(i)}function Range(s,i,u){if(!(this instanceof Range))return new Range(s,i,u);if(invariant(0!==u,\"Cannot step a Range by 0\"),s=s||0,void 0===i&&(i=1/0),u=void 0===u?1:Math.abs(u),i<s&&(u=-u),this._start=s,this._end=i,this._step=u,this.size=Math.max(0,Math.ceil((i-s)/u-1)+1),0===this.size){if(de)return de;de=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[fe]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(s,i){return this.has(s)?this._array[wrapIndex(this,s)]:i},ArraySeq.prototype.__iterate=function(s,i){for(var u=this._array,_=u.length-1,w=0;w<=_;w++)if(!1===s(u[i?_-w:w],w,this))return w+1;return w},ArraySeq.prototype.__iterator=function(s,i){var u=this._array,_=u.length-1,w=0;return new Iterator((function(){return w>_?iteratorDone():iteratorValue(s,w,u[i?_-w++:w++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,i){return void 0===i||this.has(s)?this._object[s]:i},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,i){for(var u=this._object,_=this._keys,w=_.length-1,x=0;x<=w;x++){var j=_[i?w-x:x];if(!1===s(u[j],j,this))return x+1}return x},ObjectSeq.prototype.__iterator=function(s,i){var u=this._object,_=this._keys,w=_.length-1,x=0;return new Iterator((function(){var j=_[i?w-x:x];return x++>w?iteratorDone():iteratorValue(s,j,u[j])}))},ObjectSeq.prototype[w]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);var u=getIterator(this._iterable),_=0;if(isIterator(u))for(var w;!(w=u.next()).done&&!1!==s(w.value,_++,this););return _},IterableSeq.prototype.__iteratorUncached=function(s,i){if(i)return this.cacheResult().__iterator(s,i);var u=getIterator(this._iterable);if(!isIterator(u))return new Iterator(iteratorDone);var _=0;return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,_++,i.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,i){if(i)return this.cacheResult().__iterate(s,i);for(var u,_=this._iterator,w=this._iteratorCache,x=0;x<w.length;)if(!1===s(w[x],x++,this))return x;for(;!(u=_.next()).done;){var j=u.value;if(w[x]=j,!1===s(j,x++,this))break}return x},IteratorSeq.prototype.__iteratorUncached=function(s,i){if(i)return this.cacheResult().__iterator(s,i);var u=this._iterator,_=this._iteratorCache,w=0;return new Iterator((function(){if(w>=_.length){var i=u.next();if(i.done)return i;_[w]=i.value}return iteratorValue(s,w,_[w++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(s,i){return this.has(s)?this._value:i},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,i){var u=this.size;return wholeSlice(s,i,u)?this:new Repeat(this._value,resolveEnd(i,u)-resolveBegin(s,u))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,i){for(var u=0;u<this.size;u++)if(!1===s(this._value,u,this))return u+1;return u},Repeat.prototype.__iterator=function(s,i){var u=this,_=0;return new Iterator((function(){return _<u.size?iteratorValue(s,_++,u._value):iteratorDone()}))},Repeat.prototype.equals=function(s){return s instanceof Repeat?is(this._value,s._value):deepEqual(s)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(s,i){return this.has(s)?this._start+wrapIndex(this,s)*this._step:i},Range.prototype.includes=function(s){var i=(s-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},Range.prototype.slice=function(s,i){return wholeSlice(s,i,this.size)?this:(s=resolveBegin(s,this.size),(i=resolveEnd(i,this.size))<=s?new Range(0,0):new Range(this.get(s,this._end),this.get(i,this._end),this._step))},Range.prototype.indexOf=function(s){var i=s-this._start;if(i%this._step==0){var u=i/this._step;if(u>=0&&u<this.size)return u}return-1},Range.prototype.lastIndexOf=function(s){return this.indexOf(s)},Range.prototype.__iterate=function(s,i){for(var u=this.size-1,_=this._step,w=i?this._start+u*_:this._start,x=0;x<=u;x++){if(!1===s(w,x,this))return x+1;w+=i?-_:_}return x},Range.prototype.__iterator=function(s,i){var u=this.size-1,_=this._step,w=i?this._start+u*_:this._start,x=0;return new Iterator((function(){var j=w;return w+=i?-_:_,x>u?iteratorDone():iteratorValue(s,x++,j)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var ye=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,i){var u=65535&(s|=0),_=65535&(i|=0);return u*_+((s>>>16)*_+u*(i>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if(\"function\"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var i=typeof s;if(\"number\"===i){if(s!=s||s===1/0)return 0;var u=0|s;for(u!==s&&(u^=4294967295*s);s>4294967295;)u^=s/=4294967295;return smi(u)}if(\"string\"===i)return s.length>Te?cachedHashString(s):hashString(s);if(\"function\"==typeof s.hashCode)return s.hashCode();if(\"object\"===i)return hashJSObj(s);if(\"function\"==typeof s.toString)return hashString(s.toString());throw new Error(\"Value type \"+i+\" cannot be hashed.\")}function cachedHashString(s){var i=$e[s];return void 0===i&&(i=hashString(s),qe===Re&&(qe=0,$e={}),qe++,$e[s]=i),i}function hashString(s){for(var i=0,u=0;u<s.length;u++)i=31*i+s.charCodeAt(u)|0;return smi(i)}function hashJSObj(s){var i;if(Se&&void 0!==(i=we.get(s)))return i;if(void 0!==(i=s[Pe]))return i;if(!_e){if(void 0!==(i=s.propertyIsEnumerable&&s.propertyIsEnumerable[Pe]))return i;if(void 0!==(i=getIENodeHash(s)))return i}if(i=++xe,1073741824&xe&&(xe=0),Se)we.set(s,i);else{if(void 0!==be&&!1===be(s))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(_e)Object.defineProperty(s,Pe,{enumerable:!1,configurable:!1,writable:!1,value:i});else if(void 0!==s.propertyIsEnumerable&&s.propertyIsEnumerable===s.constructor.prototype.propertyIsEnumerable)s.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},s.propertyIsEnumerable[Pe]=i;else{if(void 0===s.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");s[Pe]=i}}return i}var be=Object.isExtensible,_e=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(s){return!1}}();function getIENodeHash(s){if(s&&s.nodeType>0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var we,Se=\"function\"==typeof WeakMap;Se&&(we=new WeakMap);var xe=0,Pe=\"__immutablehash__\";\"function\"==typeof Symbol&&(Pe=Symbol(Pe));var Te=16,Re=255,qe=0,$e={};function assertNotInfinite(s){invariant(s!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(i){var u=KeyedIterable(s);assertNotInfinite(u.size),u.forEach((function(s,u){return i.set(u,s)}))}))}function isMap(s){return!(!s||!s[We])}createClass(Map,KeyedCollection),Map.of=function(){var i=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var u=0;u<i.length;u+=2){if(u+1>=i.length)throw new Error(\"Missing value for key: \"+i[u]);s.set(i[u],i[u+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(s,i){return this._root?this._root.get(0,void 0,s,i):i},Map.prototype.set=function(s,i){return updateMap(this,s,i)},Map.prototype.setIn=function(s,i){return this.updateIn(s,$,(function(){return i}))},Map.prototype.remove=function(s){return updateMap(this,s,$)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return $}))},Map.prototype.update=function(s,i,u){return 1===arguments.length?s(this):this.updateIn([s],i,u)},Map.prototype.updateIn=function(s,i,u){u||(u=i,i=void 0);var _=updateInDeepMap(this,forceIterator(s),i,u);return _===$?void 0:_},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(i){return mergeIntoMapWith(this,i,s.call(arguments,1))},Map.prototype.mergeIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return\"function\"==typeof s.merge?s.merge.apply(s,u):u[u.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(i){var u=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(i),u)},Map.prototype.mergeDeepIn=function(i){var u=s.call(arguments,1);return this.updateIn(i,emptyMap(),(function(s){return\"function\"==typeof s.mergeDeep?s.mergeDeep.apply(s,u):u[u.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,i){return OrderedMap(sortFactory(this,i,s))},Map.prototype.withMutations=function(s){var i=this.asMutable();return s(i),i.wasAltered()?i.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,i){return new MapIterator(this,s,i)},Map.prototype.__iterate=function(s,i){var u=this,_=0;return this._root&&this._root.iterate((function(i){return _++,s(i[1],i[0],u)}),i),_},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var ze,We=\"@@__IMMUTABLE_MAP__@@\",He=Map.prototype;function ArrayMapNode(s,i){this.ownerID=s,this.entries=i}function BitmapIndexedNode(s,i,u){this.ownerID=s,this.bitmap=i,this.nodes=u}function HashArrayMapNode(s,i,u){this.ownerID=s,this.count=i,this.nodes=u}function HashCollisionNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entries=u}function ValueNode(s,i,u){this.ownerID=s,this.keyHash=i,this.entry=u}function MapIterator(s,i,u){this._type=i,this._reverse=u,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,i){return iteratorValue(s,i[0],i[1])}function mapIteratorFrame(s,i){return{node:s,index:0,__prev:i}}function makeMap(s,i,u,_){var w=Object.create(He);return w.size=s,w._root=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyMap(){return ze||(ze=makeMap(0))}function updateMap(s,i,u){var _,w;if(s._root){var x=MakeRef(U),j=MakeRef(Y);if(_=updateNode(s._root,s.__ownerID,0,void 0,i,u,x,j),!j.value)return s;w=s.size+(x.value?u===$?-1:1:0)}else{if(u===$)return s;w=1,_=new ArrayMapNode(s.__ownerID,[[i,u]])}return s.__ownerID?(s.size=w,s._root=_,s.__hash=void 0,s.__altered=!0,s):_?makeMap(w,_):emptyMap()}function updateNode(s,i,u,_,w,x,j,P){return s?s.update(i,u,_,w,x,j,P):x===$?s:(SetRef(P),SetRef(j),new ValueNode(i,_,[w,x]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,i,u,_,w){if(s.keyHash===_)return new HashCollisionNode(i,_,[s.entry,w]);var x,P=(0===u?s.keyHash:s.keyHash>>>u)&B,$=(0===u?_:_>>>u)&B;return new BitmapIndexedNode(i,1<<P|1<<$,P===$?[mergeIntoNode(s,i,u+j,_,w)]:(x=new ValueNode(i,_,w),P<$?[s,x]:[x,s]))}function createNodes(s,i,u,_){s||(s=new OwnerID);for(var w=new ValueNode(s,hash(u),[u,_]),x=0;x<i.length;x++){var j=i[x];w=w.update(s,0,void 0,j[0],j[1])}return w}function packNodes(s,i,u,_){for(var w=0,x=0,j=new Array(u),P=0,B=1,$=i.length;P<$;P++,B<<=1){var U=i[P];void 0!==U&&P!==_&&(w|=B,j[x++]=U)}return new BitmapIndexedNode(s,w,j)}function expandNodes(s,i,u,_,w){for(var x=0,j=new Array(P),B=0;0!==u;B++,u>>>=1)j[B]=1&u?i[x++]:void 0;return j[_]=w,new HashArrayMapNode(s,x+1,j)}function mergeIntoMapWith(s,i,u){for(var _=[],w=0;w<u.length;w++){var x=u[w],j=KeyedIterable(x);isIterable(x)||(j=j.map((function(s){return fromJS(s)}))),_.push(j)}return mergeIntoCollectionWith(s,i,_)}function deepMerger(s,i,u){return s&&s.mergeDeep&&isIterable(i)?s.mergeDeep(i):is(s,i)?s:i}function deepMergerWith(s){return function(i,u,_){if(i&&i.mergeDeepWith&&isIterable(u))return i.mergeDeepWith(s,u);var w=s(i,u,_);return is(i,w)?i:w}}function mergeIntoCollectionWith(s,i,u){return 0===(u=u.filter((function(s){return 0!==s.size}))).length?s:0!==s.size||s.__ownerID||1!==u.length?s.withMutations((function(s){for(var _=i?function(u,_){s.update(_,$,(function(s){return s===$?u:i(s,u,_)}))}:function(i,u){s.set(u,i)},w=0;w<u.length;w++)u[w].forEach(_)})):s.constructor(u[0])}function updateInDeepMap(s,i,u,_){var w=s===$,x=i.next();if(x.done){var j=w?u:s,P=_(j);return P===j?s:P}invariant(w||s&&s.set,\"invalid keyPath\");var B=x.value,U=w?$:s.get(B,$),Y=updateInDeepMap(U,i,u,_);return Y===U?s:Y===$?s.remove(B):(w?emptyMap():s).set(B,Y)}function popCount(s){return s=(s=(858993459&(s-=s>>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,i,u,_){var w=_?s:arrCopy(s);return w[i]=u,w}function spliceIn(s,i,u,_){var w=s.length+1;if(_&&i+1===w)return s[i]=u,s;for(var x=new Array(w),j=0,P=0;P<w;P++)P===i?(x[P]=u,j=-1):x[P]=s[P+j];return x}function spliceOut(s,i,u){var _=s.length-1;if(u&&i===_)return s.pop(),s;for(var w=new Array(_),x=0,j=0;j<_;j++)j===i&&(x=1),w[j]=s[j+x];return w}He[We]=!0,He[x]=He.remove,He.removeIn=He.deleteIn,ArrayMapNode.prototype.get=function(s,i,u,_){for(var w=this.entries,x=0,j=w.length;x<j;x++)if(is(u,w[x][0]))return w[x][1];return _},ArrayMapNode.prototype.update=function(s,i,u,_,w,x,j){for(var P=w===$,B=this.entries,U=0,Y=B.length;U<Y&&!is(_,B[U][0]);U++);var X=U<Y;if(X?B[U][1]===w:P)return this;if(SetRef(j),(P||!X)&&SetRef(x),!P||1!==B.length){if(!X&&!P&&B.length>=Ye)return createNodes(s,B,_,w);var Z=s&&s===this.ownerID,ee=Z?B:arrCopy(B);return X?P?U===Y-1?ee.pop():ee[U]=ee.pop():ee[U]=[_,w]:ee.push([_,w]),Z?(this.entries=ee,this):new ArrayMapNode(s,ee)}},BitmapIndexedNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=1<<((0===s?i:i>>>s)&B),x=this.bitmap;return 0==(x&w)?_:this.nodes[popCount(x&w-1)].get(s+j,i,u,_)},BitmapIndexedNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=1<<U,X=this.bitmap,Z=0!=(X&Y);if(!Z&&w===$)return this;var ee=popCount(X&Y-1),ie=this.nodes,ae=Z?ie[ee]:void 0,le=updateNode(ae,s,i+j,u,_,w,x,P);if(le===ae)return this;if(!Z&&le&&ie.length>=Xe)return expandNodes(s,ie,X,U,le);if(Z&&!le&&2===ie.length&&isLeafNode(ie[1^ee]))return ie[1^ee];if(Z&&le&&1===ie.length&&isLeafNode(le))return le;var ce=s&&s===this.ownerID,pe=Z?le?X:X^Y:X|Y,de=Z?le?setIn(ie,ee,le,ce):spliceOut(ie,ee,ce):spliceIn(ie,ee,le,ce);return ce?(this.bitmap=pe,this.nodes=de,this):new BitmapIndexedNode(s,pe,de)},HashArrayMapNode.prototype.get=function(s,i,u,_){void 0===i&&(i=hash(u));var w=(0===s?i:i>>>s)&B,x=this.nodes[w];return x?x.get(s+j,i,u,_):_},HashArrayMapNode.prototype.update=function(s,i,u,_,w,x,P){void 0===u&&(u=hash(_));var U=(0===i?u:u>>>i)&B,Y=w===$,X=this.nodes,Z=X[U];if(Y&&!Z)return this;var ee=updateNode(Z,s,i+j,u,_,w,x,P);if(ee===Z)return this;var ie=this.count;if(Z){if(!ee&&--ie<Qe)return packNodes(s,X,ie,U)}else ie++;var ae=s&&s===this.ownerID,le=setIn(X,U,ee,ae);return ae?(this.count=ie,this.nodes=le,this):new HashArrayMapNode(s,ie,le)},HashCollisionNode.prototype.get=function(s,i,u,_){for(var w=this.entries,x=0,j=w.length;x<j;x++)if(is(u,w[x][0]))return w[x][1];return _},HashCollisionNode.prototype.update=function(s,i,u,_,w,x,j){void 0===u&&(u=hash(_));var P=w===$;if(u!==this.keyHash)return P?this:(SetRef(j),SetRef(x),mergeIntoNode(this,s,i,u,[_,w]));for(var B=this.entries,U=0,Y=B.length;U<Y&&!is(_,B[U][0]);U++);var X=U<Y;if(X?B[U][1]===w:P)return this;if(SetRef(j),(P||!X)&&SetRef(x),P&&2===Y)return new ValueNode(s,this.keyHash,B[1^U]);var Z=s&&s===this.ownerID,ee=Z?B:arrCopy(B);return X?P?U===Y-1?ee.pop():ee[U]=ee.pop():ee[U]=[_,w]:ee.push([_,w]),Z?(this.entries=ee,this):new HashCollisionNode(s,this.keyHash,ee)},ValueNode.prototype.get=function(s,i,u,_){return is(u,this.entry[0])?this.entry[1]:_},ValueNode.prototype.update=function(s,i,u,_,w,x,j){var P=w===$,B=is(_,this.entry[0]);return(B?w===this.entry[1]:P)?this:(SetRef(j),P?void SetRef(x):B?s&&s===this.ownerID?(this.entry[1]=w,this):new ValueNode(s,this.keyHash,[_,w]):(SetRef(x),mergeIntoNode(this,s,i,hash(_),[_,w])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(s,i){for(var u=this.entries,_=0,w=u.length-1;_<=w;_++)if(!1===s(u[i?w-_:_]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(s,i){for(var u=this.nodes,_=0,w=u.length-1;_<=w;_++){var x=u[i?w-_:_];if(x&&!1===x.iterate(s,i))return!1}},ValueNode.prototype.iterate=function(s,i){return s(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var s=this._type,i=this._stack;i;){var u,_=i.node,w=i.index++;if(_.entry){if(0===w)return mapIteratorValue(s,_.entry)}else if(_.entries){if(w<=(u=_.entries.length-1))return mapIteratorValue(s,_.entries[this._reverse?u-w:w])}else if(w<=(u=_.nodes.length-1)){var x=_.nodes[this._reverse?u-w:w];if(x){if(x.entry)return mapIteratorValue(s,x.entry);i=this._stack=mapIteratorFrame(x,i)}continue}i=this._stack=this._stack.__prev}return iteratorDone()};var Ye=P/4,Xe=P/2,Qe=P/4;function List(s){var i=emptyList();if(null==s)return i;if(isList(s))return s;var u=IndexedIterable(s),_=u.size;return 0===_?i:(assertNotInfinite(_),_>0&&_<P?makeList(0,_,j,null,new VNode(u.toArray())):i.withMutations((function(s){s.setSize(_),u.forEach((function(i,u){return s.set(u,i)}))})))}function isList(s){return!(!s||!s[et])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(s,i){if((s=wrapIndex(this,s))>=0&&s<this.size){var u=listNodeFor(this,s+=this._origin);return u&&u.array[s&B]}return i},List.prototype.set=function(s,i){return updateList(this,s,i)},List.prototype.remove=function(s){return this.has(s)?0===s?this.shift():s===this.size-1?this.pop():this.splice(s,1):this},List.prototype.insert=function(s,i){return this.splice(s,0,i)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=j,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var s=arguments,i=this.size;return this.withMutations((function(u){setListBounds(u,0,i+s.length);for(var _=0;_<s.length;_++)u.set(i+_,s[_])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var s=arguments;return this.withMutations((function(i){setListBounds(i,-s.length);for(var u=0;u<s.length;u++)i.set(u,s[u])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(i){return mergeIntoListWith(this,i,s.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(i){var u=s.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(i),u)},List.prototype.setSize=function(s){return setListBounds(this,0,s)},List.prototype.slice=function(s,i){var u=this.size;return wholeSlice(s,i,u)?this:setListBounds(this,resolveBegin(s,u),resolveEnd(i,u))},List.prototype.__iterator=function(s,i){var u=0,_=iterateList(this,i);return new Iterator((function(){var i=_();return i===ot?iteratorDone():iteratorValue(s,u++,i)}))},List.prototype.__iterate=function(s,i){for(var u,_=0,w=iterateList(this,i);(u=w())!==ot&&!1!==s(u,_++,this););return _},List.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeList(this._origin,this._capacity,this._level,this._root,this._tail,s,this.__hash):(this.__ownerID=s,this)},List.isList=isList;var et=\"@@__IMMUTABLE_LIST__@@\",tt=List.prototype;function VNode(s,i){this.array=s,this.ownerID=i}tt[et]=!0,tt[x]=tt.remove,tt.setIn=He.setIn,tt.deleteIn=tt.removeIn=He.removeIn,tt.update=He.update,tt.updateIn=He.updateIn,tt.mergeIn=He.mergeIn,tt.mergeDeepIn=He.mergeDeepIn,tt.withMutations=He.withMutations,tt.asMutable=He.asMutable,tt.asImmutable=He.asImmutable,tt.wasAltered=He.wasAltered,VNode.prototype.removeBefore=function(s,i,u){if(u===i?1<<i:0===this.array.length)return this;var _=u>>>i&B;if(_>=this.array.length)return new VNode([],s);var w,x=0===_;if(i>0){var P=this.array[_];if((w=P&&P.removeBefore(s,i-j,u))===P&&x)return this}if(x&&!w)return this;var $=editableVNode(this,s);if(!x)for(var U=0;U<_;U++)$.array[U]=void 0;return w&&($.array[_]=w),$},VNode.prototype.removeAfter=function(s,i,u){if(u===(i?1<<i:0)||0===this.array.length)return this;var _,w=u-1>>>i&B;if(w>=this.array.length)return this;if(i>0){var x=this.array[w];if((_=x&&x.removeAfter(s,i-j,u))===x&&w===this.array.length-1)return this}var P=editableVNode(this,s);return P.array.splice(w+1),_&&(P.array[w]=_),P};var rt,nt,ot={};function iterateList(s,i){var u=s._origin,_=s._capacity,w=getTailOffset(_),x=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,i,u){return 0===i?iterateLeaf(s,u):iterateNode(s,i,u)}function iterateLeaf(s,j){var B=j===w?x&&x.array:s&&s.array,$=j>u?0:u-j,U=_-j;return U>P&&(U=P),function(){if($===U)return ot;var s=i?--U:$++;return B&&B[s]}}function iterateNode(s,w,x){var B,$=s&&s.array,U=x>u?0:u-x>>w,Y=1+(_-x>>w);return Y>P&&(Y=P),function(){for(;;){if(B){var s=B();if(s!==ot)return s;B=null}if(U===Y)return ot;var u=i?--Y:U++;B=iterateNodeOrLeaf($&&$[u],w-j,x+(u<<w))}}}}function makeList(s,i,u,_,w,x,j){var P=Object.create(tt);return P.size=i-s,P._origin=s,P._capacity=i,P._level=u,P._root=_,P._tail=w,P.__ownerID=x,P.__hash=j,P.__altered=!1,P}function emptyList(){return rt||(rt=makeList(0,0,j))}function updateList(s,i,u){if((i=wrapIndex(s,i))!=i)return s;if(i>=s.size||i<0)return s.withMutations((function(s){i<0?setListBounds(s,i).set(0,u):setListBounds(s,0,i+1).set(i,u)}));i+=s._origin;var _=s._tail,w=s._root,x=MakeRef(Y);return i>=getTailOffset(s._capacity)?_=updateVNode(_,s.__ownerID,0,i,u,x):w=updateVNode(w,s.__ownerID,s._level,i,u,x),x.value?s.__ownerID?(s._root=w,s._tail=_,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,w,_):s}function updateVNode(s,i,u,_,w,x){var P,$=_>>>u&B,U=s&&$<s.array.length;if(!U&&void 0===w)return s;if(u>0){var Y=s&&s.array[$],X=updateVNode(Y,i,u-j,_,w,x);return X===Y?s:((P=editableVNode(s,i)).array[$]=X,P)}return U&&s.array[$]===w?s:(SetRef(x),P=editableVNode(s,i),void 0===w&&$===P.array.length-1?P.array.pop():P.array[$]=w,P)}function editableVNode(s,i){return i&&s&&i===s.ownerID?s:new VNode(s?s.array.slice():[],i)}function listNodeFor(s,i){if(i>=getTailOffset(s._capacity))return s._tail;if(i<1<<s._level+j){for(var u=s._root,_=s._level;u&&_>0;)u=u.array[i>>>_&B],_-=j;return u}}function setListBounds(s,i,u){void 0!==i&&(i|=0),void 0!==u&&(u|=0);var _=s.__ownerID||new OwnerID,w=s._origin,x=s._capacity,P=w+i,$=void 0===u?x:u<0?x+u:w+u;if(P===w&&$===x)return s;if(P>=$)return s.clear();for(var U=s._level,Y=s._root,X=0;P+X<0;)Y=new VNode(Y&&Y.array.length?[void 0,Y]:[],_),X+=1<<(U+=j);X&&(P+=X,w+=X,$+=X,x+=X);for(var Z=getTailOffset(x),ee=getTailOffset($);ee>=1<<U+j;)Y=new VNode(Y&&Y.array.length?[Y]:[],_),U+=j;var ie=s._tail,ae=ee<Z?listNodeFor(s,$-1):ee>Z?new VNode([],_):ie;if(ie&&ee>Z&&P<x&&ie.array.length){for(var le=Y=editableVNode(Y,_),ce=U;ce>j;ce-=j){var pe=Z>>>ce&B;le=le.array[pe]=editableVNode(le.array[pe],_)}le.array[Z>>>j&B]=ie}if($<x&&(ae=ae&&ae.removeAfter(_,0,$)),P>=ee)P-=ee,$-=ee,U=j,Y=null,ae=ae&&ae.removeBefore(_,0,P);else if(P>w||ee<Z){for(X=0;Y;){var de=P>>>U&B;if(de!==ee>>>U&B)break;de&&(X+=(1<<U)*de),U-=j,Y=Y.array[de]}Y&&P>w&&(Y=Y.removeBefore(_,U,P-X)),Y&&ee<Z&&(Y=Y.removeAfter(_,U,ee-X)),X&&(P-=X,$-=X)}return s.__ownerID?(s.size=$-P,s._origin=P,s._capacity=$,s._level=U,s._root=Y,s._tail=ae,s.__hash=void 0,s.__altered=!0,s):makeList(P,$,U,Y,ae)}function mergeIntoListWith(s,i,u){for(var _=[],w=0,x=0;x<u.length;x++){var j=u[x],P=IndexedIterable(j);P.size>w&&(w=P.size),isIterable(j)||(P=P.map((function(s){return fromJS(s)}))),_.push(P)}return w>s.size&&(s=s.setSize(w)),mergeIntoCollectionWith(s,i,_)}function getTailOffset(s){return s<P?0:s-1>>>j<<j}function OrderedMap(s){return null==s?emptyOrderedMap():isOrderedMap(s)?s:emptyOrderedMap().withMutations((function(i){var u=KeyedIterable(s);assertNotInfinite(u.size),u.forEach((function(s,u){return i.set(u,s)}))}))}function isOrderedMap(s){return isMap(s)&&isOrdered(s)}function makeOrderedMap(s,i,u,_){var w=Object.create(OrderedMap.prototype);return w.size=s?s.size:0,w._map=s,w._list=i,w.__ownerID=u,w.__hash=_,w}function emptyOrderedMap(){return nt||(nt=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(s,i,u){var _,w,x=s._map,j=s._list,B=x.get(i),U=void 0!==B;if(u===$){if(!U)return s;j.size>=P&&j.size>=2*x.size?(_=(w=j.filter((function(s,i){return void 0!==s&&B!==i}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(_.__ownerID=w.__ownerID=s.__ownerID)):(_=x.remove(i),w=B===j.size-1?j.pop():j.set(B,void 0))}else if(U){if(u===j.get(B)[1])return s;_=x,w=j.set(B,[i,u])}else _=x.set(i,j.size),w=j.set(j.size,[i,u]);return s.__ownerID?(s.size=_.size,s._map=_,s._list=w,s.__hash=void 0,s):makeOrderedMap(_,w)}function ToKeyedSequence(s,i){this._iter=s,this._useKeys=i,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.flip=function(){return s},i.reverse=function(){var i=s.reverse.apply(this);return i.flip=function(){return s.reverse()},i},i.has=function(i){return s.includes(i)},i.includes=function(i){return s.has(i)},i.cacheResult=cacheResultThrough,i.__iterateUncached=function(i,u){var _=this;return s.__iterate((function(s,u){return!1!==i(u,s,_)}),u)},i.__iteratorUncached=function(i,u){if(i===ee){var _=s.__iterator(i,u);return new Iterator((function(){var s=_.next();if(!s.done){var i=s.value[0];s.value[0]=s.value[1],s.value[1]=i}return s}))}return s.__iterator(i===Z?X:Z,u)},i}function mapFactory(s,i,u){var _=makeSequence(s);return _.size=s.size,_.has=function(i){return s.has(i)},_.get=function(_,w){var x=s.get(_,$);return x===$?w:i.call(u,x,_,s)},_.__iterateUncached=function(_,w){var x=this;return s.__iterate((function(s,w,j){return!1!==_(i.call(u,s,w,j),w,x)}),w)},_.__iteratorUncached=function(_,w){var x=s.__iterator(ee,w);return new Iterator((function(){var w=x.next();if(w.done)return w;var j=w.value,P=j[0];return iteratorValue(_,P,i.call(u,j[1],P,s),w)}))},_}function reverseFactory(s,i){var u=makeSequence(s);return u._iter=s,u.size=s.size,u.reverse=function(){return s},s.flip&&(u.flip=function(){var i=flipFactory(s);return i.reverse=function(){return s.flip()},i}),u.get=function(u,_){return s.get(i?u:-1-u,_)},u.has=function(u){return s.has(i?u:-1-u)},u.includes=function(i){return s.includes(i)},u.cacheResult=cacheResultThrough,u.__iterate=function(i,u){var _=this;return s.__iterate((function(s,u){return i(s,u,_)}),!u)},u.__iterator=function(i,u){return s.__iterator(i,!u)},u}function filterFactory(s,i,u,_){var w=makeSequence(s);return _&&(w.has=function(_){var w=s.get(_,$);return w!==$&&!!i.call(u,w,_,s)},w.get=function(_,w){var x=s.get(_,$);return x!==$&&i.call(u,x,_,s)?x:w}),w.__iterateUncached=function(w,x){var j=this,P=0;return s.__iterate((function(s,x,B){if(i.call(u,s,x,B))return P++,w(s,_?x:P-1,j)}),x),P},w.__iteratorUncached=function(w,x){var j=s.__iterator(ee,x),P=0;return new Iterator((function(){for(;;){var x=j.next();if(x.done)return x;var B=x.value,$=B[0],U=B[1];if(i.call(u,U,$,s))return iteratorValue(w,_?$:P++,U,x)}}))},w}function countByFactory(s,i,u){var _=Map().asMutable();return s.__iterate((function(w,x){_.update(i.call(u,w,x,s),0,(function(s){return s+1}))})),_.asImmutable()}function groupByFactory(s,i,u){var _=isKeyed(s),w=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(x,j){w.update(i.call(u,x,j,s),(function(s){return(s=s||[]).push(_?[j,x]:x),s}))}));var x=iterableClass(s);return w.map((function(i){return reify(s,x(i))}))}function sliceFactory(s,i,u,_){var w=s.size;if(void 0!==i&&(i|=0),void 0!==u&&(u===1/0?u=w:u|=0),wholeSlice(i,u,w))return s;var x=resolveBegin(i,w),j=resolveEnd(u,w);if(x!=x||j!=j)return sliceFactory(s.toSeq().cacheResult(),i,u,_);var P,B=j-x;B==B&&(P=B<0?0:B);var $=makeSequence(s);return $.size=0===P?P:s.size&&P||void 0,!_&&isSeq(s)&&P>=0&&($.get=function(i,u){return(i=wrapIndex(this,i))>=0&&i<P?s.get(i+x,u):u}),$.__iterateUncached=function(i,u){var w=this;if(0===P)return 0;if(u)return this.cacheResult().__iterate(i,u);var j=0,B=!0,$=0;return s.__iterate((function(s,u){if(!B||!(B=j++<x))return $++,!1!==i(s,_?u:$-1,w)&&$!==P})),$},$.__iteratorUncached=function(i,u){if(0!==P&&u)return this.cacheResult().__iterator(i,u);var w=0!==P&&s.__iterator(i,u),j=0,B=0;return new Iterator((function(){for(;j++<x;)w.next();if(++B>P)return iteratorDone();var s=w.next();return _||i===Z?s:iteratorValue(i,B-1,i===X?void 0:s.value[1],s)}))},$}function takeWhileFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterate(_,w);var j=0;return s.__iterate((function(s,w,P){return i.call(u,s,w,P)&&++j&&_(s,w,x)})),j},_.__iteratorUncached=function(_,w){var x=this;if(w)return this.cacheResult().__iterator(_,w);var j=s.__iterator(ee,w),P=!0;return new Iterator((function(){if(!P)return iteratorDone();var s=j.next();if(s.done)return s;var w=s.value,B=w[0],$=w[1];return i.call(u,$,B,x)?_===ee?s:iteratorValue(_,B,$,s):(P=!1,iteratorDone())}))},_}function skipWhileFactory(s,i,u,_){var w=makeSequence(s);return w.__iterateUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterate(w,x);var P=!0,B=0;return s.__iterate((function(s,x,$){if(!P||!(P=i.call(u,s,x,$)))return B++,w(s,_?x:B-1,j)})),B},w.__iteratorUncached=function(w,x){var j=this;if(x)return this.cacheResult().__iterator(w,x);var P=s.__iterator(ee,x),B=!0,$=0;return new Iterator((function(){var s,x,U;do{if((s=P.next()).done)return _||w===Z?s:iteratorValue(w,$++,w===X?void 0:s.value[1],s);var Y=s.value;x=Y[0],U=Y[1],B&&(B=i.call(u,U,x,j))}while(B);return w===ee?s:iteratorValue(w,x,U,s)}))},w}function concatFactory(s,i){var u=isKeyed(s),_=[s].concat(i).map((function(s){return isIterable(s)?u&&(s=KeyedIterable(s)):s=u?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===_.length)return s;if(1===_.length){var w=_[0];if(w===s||u&&isKeyed(w)||isIndexed(s)&&isIndexed(w))return w}var x=new ArraySeq(_);return u?x=x.toKeyedSeq():isIndexed(s)||(x=x.toSetSeq()),(x=x.flatten(!0)).size=_.reduce((function(s,i){if(void 0!==s){var u=i.size;if(void 0!==u)return s+u}}),0),x}function flattenFactory(s,i,u){var _=makeSequence(s);return _.__iterateUncached=function(_,w){var x=0,j=!1;function flatDeep(s,P){var B=this;s.__iterate((function(s,w){return(!i||P<i)&&isIterable(s)?flatDeep(s,P+1):!1===_(s,u?w:x++,B)&&(j=!0),!j}),w)}return flatDeep(s,0),x},_.__iteratorUncached=function(_,w){var x=s.__iterator(_,w),j=[],P=0;return new Iterator((function(){for(;x;){var s=x.next();if(!1===s.done){var B=s.value;if(_===ee&&(B=B[1]),i&&!(j.length<i)||!isIterable(B))return u?s:iteratorValue(_,P++,B,s);j.push(x),x=B.__iterator(_,w)}else x=j.pop()}return iteratorDone()}))},_}function flatMapFactory(s,i,u){var _=iterableClass(s);return s.toSeq().map((function(w,x){return _(i.call(u,w,x,s))})).flatten(!0)}function interposeFactory(s,i){var u=makeSequence(s);return u.size=s.size&&2*s.size-1,u.__iterateUncached=function(u,_){var w=this,x=0;return s.__iterate((function(s,_){return(!x||!1!==u(i,x++,w))&&!1!==u(s,x++,w)}),_),x},u.__iteratorUncached=function(u,_){var w,x=s.__iterator(Z,_),j=0;return new Iterator((function(){return(!w||j%2)&&(w=x.next()).done?w:j%2?iteratorValue(u,j++,i):iteratorValue(u,j++,w.value,w)}))},u}function sortFactory(s,i,u){i||(i=defaultComparator);var _=isKeyed(s),w=0,x=s.toSeq().map((function(i,_){return[_,i,w++,u?u(i,_,s):i]})).toArray();return x.sort((function(s,u){return i(s[3],u[3])||s[2]-u[2]})).forEach(_?function(s,i){x[i].length=2}:function(s,i){x[i]=s[1]}),_?KeyedSeq(x):isIndexed(s)?IndexedSeq(x):SetSeq(x)}function maxFactory(s,i,u){if(i||(i=defaultComparator),u){var _=s.toSeq().map((function(i,_){return[i,u(i,_,s)]})).reduce((function(s,u){return maxCompare(i,s[1],u[1])?u:s}));return _&&_[0]}return s.reduce((function(s,u){return maxCompare(i,s,u)?u:s}))}function maxCompare(s,i,u){var _=s(u,i);return 0===_&&u!==i&&(null==u||u!=u)||_>0}function zipWithFactory(s,i,u){var _=makeSequence(s);return _.size=new ArraySeq(u).map((function(s){return s.size})).min(),_.__iterate=function(s,i){for(var u,_=this.__iterator(Z,i),w=0;!(u=_.next()).done&&!1!==s(u.value,w++,this););return w},_.__iteratorUncached=function(s,_){var w=u.map((function(s){return s=Iterable(s),getIterator(_?s.reverse():s)})),x=0,j=!1;return new Iterator((function(){var u;return j||(u=w.map((function(s){return s.next()})),j=u.some((function(s){return s.done}))),j?iteratorDone():iteratorValue(s,x++,i.apply(null,u.map((function(s){return s.value}))))}))},_}function reify(s,i){return isSeq(s)?i:s.constructor(i)}function validateEntry(s){if(s!==Object(s))throw new TypeError(\"Expected [K, V] tuple: \"+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,i){return s>i?1:s<i?-1:0}function forceIterator(s){var i=getIterator(s);if(!i){if(!isArrayLike(s))throw new TypeError(\"Expected iterable or array-like: \"+s);i=getIterator(Iterable(s))}return i}function Record(s,i){var u,_=function Record(x){if(x instanceof _)return x;if(!(this instanceof _))return new _(x);if(!u){u=!0;var j=Object.keys(s);setProps(w,j),w.size=j.length,w._name=i,w._keys=j,w._defaultValues=s}this._map=Map(x)},w=_.prototype=Object.create(st);return w.constructor=_,_}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(s,i){var u=this._map.get(s);return void 0!==u?this._list.get(u)[1]:i},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(s,i){return updateOrderedMap(this,s,i)},OrderedMap.prototype.remove=function(s){return updateOrderedMap(this,s,$)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(s,i){var u=this;return this._list.__iterate((function(i){return i&&s(i[1],i[0],u)}),i)},OrderedMap.prototype.__iterator=function(s,i){return this._list.fromEntrySeq().__iterator(s,i)},OrderedMap.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map.__ensureOwner(s),u=this._list.__ensureOwner(s);return s?makeOrderedMap(i,u,s,this.__hash):(this.__ownerID=s,this._map=i,this._list=u,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[w]=!0,OrderedMap.prototype[x]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(s,i){return this._iter.get(s,i)},ToKeyedSequence.prototype.has=function(s){return this._iter.has(s)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var s=this,i=reverseFactory(this,!0);return this._useKeys||(i.valueSeq=function(){return s._iter.toSeq().reverse()}),i},ToKeyedSequence.prototype.map=function(s,i){var u=this,_=mapFactory(this,s,i);return this._useKeys||(_.valueSeq=function(){return u._iter.toSeq().map(s,i)}),_},ToKeyedSequence.prototype.__iterate=function(s,i){var u,_=this;return this._iter.__iterate(this._useKeys?function(i,u){return s(i,u,_)}:(u=i?resolveSize(this):0,function(w){return s(w,i?--u:u++,_)}),i)},ToKeyedSequence.prototype.__iterator=function(s,i){if(this._useKeys)return this._iter.__iterator(s,i);var u=this._iter.__iterator(Z,i),_=i?resolveSize(this):0;return new Iterator((function(){var w=u.next();return w.done?w:iteratorValue(s,i?--_:_++,w.value,w)}))},ToKeyedSequence.prototype[w]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(s){return this._iter.includes(s)},ToIndexedSequence.prototype.__iterate=function(s,i){var u=this,_=0;return this._iter.__iterate((function(i){return s(i,_++,u)}),i)},ToIndexedSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i),_=0;return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,_++,i.value,i)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(s){return this._iter.includes(s)},ToSetSequence.prototype.__iterate=function(s,i){var u=this;return this._iter.__iterate((function(i){return s(i,i,u)}),i)},ToSetSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i);return new Iterator((function(){var i=u.next();return i.done?i:iteratorValue(s,i.value,i.value,i)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(s,i){var u=this;return this._iter.__iterate((function(i){if(i){validateEntry(i);var _=isIterable(i);return s(_?i.get(1):i[1],_?i.get(0):i[0],u)}}),i)},FromEntriesSequence.prototype.__iterator=function(s,i){var u=this._iter.__iterator(Z,i);return new Iterator((function(){for(;;){var i=u.next();if(i.done)return i;var _=i.value;if(_){validateEntry(_);var w=isIterable(_);return iteratorValue(s,w?_.get(0):_[0],w?_.get(1):_[1],i)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(s){return this._defaultValues.hasOwnProperty(s)},Record.prototype.get=function(s,i){if(!this.has(s))return i;var u=this._defaultValues[s];return this._map?this._map.get(s,u):u},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var s=this.constructor;return s._empty||(s._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(s,i){if(!this.has(s))throw new Error('Cannot set unknown key \"'+s+'\" on '+recordName(this));if(this._map&&!this._map.has(s)&&i===this._defaultValues[s])return this;var u=this._map&&this._map.set(s,i);return this.__ownerID||u===this._map?this:makeRecord(this,u)},Record.prototype.remove=function(s){if(!this.has(s))return this;var i=this._map&&this._map.remove(s);return this.__ownerID||i===this._map?this:makeRecord(this,i)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(s,i){var u=this;return KeyedIterable(this._defaultValues).map((function(s,i){return u.get(i)})).__iterator(s,i)},Record.prototype.__iterate=function(s,i){var u=this;return KeyedIterable(this._defaultValues).map((function(s,i){return u.get(i)})).__iterate(s,i)},Record.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map&&this._map.__ensureOwner(s);return s?makeRecord(this,i,s):(this.__ownerID=s,this._map=i,this)};var st=Record.prototype;function makeRecord(s,i,u){var _=Object.create(Object.getPrototypeOf(s));return _._map=i,_.__ownerID=u,_}function recordName(s){return s._name||s.constructor.name||\"Record\"}function setProps(s,i){try{i.forEach(setProp.bind(void 0,s))}catch(s){}}function setProp(s,i){Object.defineProperty(s,i,{get:function(){return this.get(i)},set:function(s){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(i,s)}})}function Set(s){return null==s?emptySet():isSet(s)&&!isOrdered(s)?s:emptySet().withMutations((function(i){var u=SetIterable(s);assertNotInfinite(u.size),u.forEach((function(s){return i.add(s)}))}))}function isSet(s){return!(!s||!s[at])}st[x]=st.remove,st.deleteIn=st.removeIn=He.removeIn,st.merge=He.merge,st.mergeWith=He.mergeWith,st.mergeIn=He.mergeIn,st.mergeDeep=He.mergeDeep,st.mergeDeepWith=He.mergeDeepWith,st.mergeDeepIn=He.mergeDeepIn,st.setIn=He.setIn,st.update=He.update,st.updateIn=He.updateIn,st.withMutations=He.withMutations,st.asMutable=He.asMutable,st.asImmutable=He.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(s){return this._map.has(s)},Set.prototype.add=function(s){return updateSet(this,this._map.set(s,!0))},Set.prototype.remove=function(s){return updateSet(this,this._map.remove(s))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var i=s.call(arguments,0);return 0===(i=i.filter((function(s){return 0!==s.size}))).length?this:0!==this.size||this.__ownerID||1!==i.length?this.withMutations((function(s){for(var u=0;u<i.length;u++)SetIterable(i[u]).forEach((function(i){return s.add(i)}))})):this.constructor(i[0])},Set.prototype.intersect=function(){var i=s.call(arguments,0);if(0===i.length)return this;i=i.map((function(s){return SetIterable(s)}));var u=this;return this.withMutations((function(s){u.forEach((function(u){i.every((function(s){return s.includes(u)}))||s.remove(u)}))}))},Set.prototype.subtract=function(){var i=s.call(arguments,0);if(0===i.length)return this;i=i.map((function(s){return SetIterable(s)}));var u=this;return this.withMutations((function(s){u.forEach((function(u){i.some((function(s){return s.includes(u)}))&&s.remove(u)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(i){var u=s.call(arguments,1);return this.union.apply(this,u)},Set.prototype.sort=function(s){return OrderedSet(sortFactory(this,s))},Set.prototype.sortBy=function(s,i){return OrderedSet(sortFactory(this,i,s))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(s,i){var u=this;return this._map.__iterate((function(i,_){return s(_,_,u)}),i)},Set.prototype.__iterator=function(s,i){return this._map.map((function(s,i){return i})).__iterator(s,i)},Set.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var i=this._map.__ensureOwner(s);return s?this.__make(i,s):(this.__ownerID=s,this._map=i,this)},Set.isSet=isSet;var it,at=\"@@__IMMUTABLE_SET__@@\",lt=Set.prototype;function updateSet(s,i){return s.__ownerID?(s.size=i.size,s._map=i,s):i===s._map?s:0===i.size?s.__empty():s.__make(i)}function makeSet(s,i){var u=Object.create(lt);return u.size=s?s.size:0,u._map=s,u.__ownerID=i,u}function emptySet(){return it||(it=makeSet(emptyMap()))}function OrderedSet(s){return null==s?emptyOrderedSet():isOrderedSet(s)?s:emptyOrderedSet().withMutations((function(i){var u=SetIterable(s);assertNotInfinite(u.size),u.forEach((function(s){return i.add(s)}))}))}function isOrderedSet(s){return isSet(s)&&isOrdered(s)}lt[at]=!0,lt[x]=lt.remove,lt.mergeDeep=lt.merge,lt.mergeDeepWith=lt.mergeWith,lt.withMutations=He.withMutations,lt.asMutable=He.asMutable,lt.asImmutable=He.asImmutable,lt.__empty=emptySet,lt.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var ct,ut=OrderedSet.prototype;function makeOrderedSet(s,i){var u=Object.create(ut);return u.size=s?s.size:0,u._map=s,u.__ownerID=i,u}function emptyOrderedSet(){return ct||(ct=makeOrderedSet(emptyOrderedMap()))}function Stack(s){return null==s?emptyStack():isStack(s)?s:emptyStack().unshiftAll(s)}function isStack(s){return!(!s||!s[ht])}ut[w]=!0,ut.__empty=emptyOrderedSet,ut.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(s,i){var u=this._head;for(s=wrapIndex(this,s);u&&s--;)u=u.next;return u?u.value:i},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var s=this.size+arguments.length,i=this._head,u=arguments.length-1;u>=0;u--)i={value:arguments[u],next:i};return this.__ownerID?(this.size=s,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(s,i)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var i=this.size,u=this._head;return s.reverse().forEach((function(s){i++,u={value:s,next:u}})),this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(i,u)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,i){if(wholeSlice(s,i,this.size))return this;var u=resolveBegin(s,this.size);if(resolveEnd(i,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,i);for(var _=this.size-u,w=this._head;u--;)w=w.next;return this.__ownerID?(this.size=_,this._head=w,this.__hash=void 0,this.__altered=!0,this):makeStack(_,w)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,i){if(i)return this.reverse().__iterate(s);for(var u=0,_=this._head;_&&!1!==s(_.value,u++,this);)_=_.next;return u},Stack.prototype.__iterator=function(s,i){if(i)return this.reverse().__iterator(s);var u=0,_=this._head;return new Iterator((function(){if(_){var i=_.value;return _=_.next,iteratorValue(s,u++,i)}return iteratorDone()}))},Stack.isStack=isStack;var pt,ht=\"@@__IMMUTABLE_STACK__@@\",dt=Stack.prototype;function makeStack(s,i,u,_){var w=Object.create(dt);return w.size=s,w._head=i,w.__ownerID=u,w.__hash=_,w.__altered=!1,w}function emptyStack(){return pt||(pt=makeStack(0))}function mixin(s,i){var keyCopier=function(u){s.prototype[u]=i[u]};return Object.keys(i).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(keyCopier),s}dt[ht]=!0,dt.withMutations=He.withMutations,dt.asMutable=He.asMutable,dt.asImmutable=He.asImmutable,dt.wasAltered=He.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(i,u){s[u]=i})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(i,u){s[u]=i})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(s,i){return 0===this.size?s+i:s+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+i},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(i){return is(i,s)}))},entries:function(){return this.__iterator(ee)},every:function(s,i){assertNotInfinite(this.size);var u=!0;return this.__iterate((function(_,w,x){if(!s.call(i,_,w,x))return u=!1,!1})),u},filter:function(s,i){return reify(this,filterFactory(this,s,i,!0))},find:function(s,i,u){var _=this.findEntry(s,i);return _?_[1]:u},forEach:function(s,i){return assertNotInfinite(this.size),this.__iterate(i?s.bind(i):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?\"\"+s:\",\";var i=\"\",u=!0;return this.__iterate((function(_){u?u=!1:i+=s,i+=null!=_?_.toString():\"\"})),i},keys:function(){return this.__iterator(X)},map:function(s,i){return reify(this,mapFactory(this,s,i))},reduce:function(s,i,u){var _,w;return assertNotInfinite(this.size),arguments.length<2?w=!0:_=i,this.__iterate((function(i,x,j){w?(w=!1,_=i):_=s.call(u,_,i,x,j)})),_},reduceRight:function(s,i,u){var _=this.toKeyedSeq().reverse();return _.reduce.apply(_,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!0))},some:function(s,i){return!this.every(not(s),i)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(Z)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,i){return ensureSize(s?this.toSeq().filter(s,i):this)},countBy:function(s,i){return countByFactory(this,s,i)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var i=s.toSeq().map(entryMapper).toIndexedSeq();return i.fromEntrySeq=function(){return s.toSeq()},i},filterNot:function(s,i){return this.filter(not(s),i)},findEntry:function(s,i,u){var _=u;return this.__iterate((function(u,w,x){if(s.call(i,u,w,x))return _=[w,u],!1})),_},findKey:function(s,i){var u=this.findEntry(s,i);return u&&u[0]},findLast:function(s,i,u){return this.toKeyedSeq().reverse().find(s,i,u)},findLastEntry:function(s,i,u){return this.toKeyedSeq().reverse().findEntry(s,i,u)},findLastKey:function(s,i){return this.toKeyedSeq().reverse().findKey(s,i)},first:function(){return this.find(returnTrue)},flatMap:function(s,i){return reify(this,flatMapFactory(this,s,i))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,i){return this.find((function(i,u){return is(u,s)}),void 0,i)},getIn:function(s,i){for(var u,_=this,w=forceIterator(s);!(u=w.next()).done;){var x=u.value;if((_=_&&_.get?_.get(x,$):$)===$)return i}return _},groupBy:function(s,i){return groupByFactory(this,s,i)},has:function(s){return this.get(s,$)!==$},hasIn:function(s){return this.getIn(s,$)!==$},isSubset:function(s){return s=\"function\"==typeof s.includes?s:Iterable(s),this.every((function(i){return s.includes(i)}))},isSuperset:function(s){return(s=\"function\"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(i){return is(i,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,i){return maxFactory(this,i,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,i){return maxFactory(this,i?neg(i):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,i){return reify(this,skipWhileFactory(this,s,i,!0))},skipUntil:function(s,i){return this.skipWhile(not(s),i)},sortBy:function(s,i){return reify(this,sortFactory(this,i,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,i){return reify(this,takeWhileFactory(this,s,i))},takeUntil:function(s,i){return this.takeWhile(not(s),i)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var mt=Iterable.prototype;mt[i]=!0,mt[le]=mt.values,mt.__toJS=mt.toArray,mt.__toStringMapper=quoteString,mt.inspect=mt.toSource=function(){return this.toString()},mt.chain=mt.flatMap,mt.contains=mt.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,i){var u=this,_=0;return reify(this,this.toSeq().map((function(w,x){return s.call(i,[x,w],_++,u)})).fromEntrySeq())},mapKeys:function(s,i){var u=this;return reify(this,this.toSeq().flip().map((function(_,w){return s.call(i,_,w,u)})).flip())}});var gt=KeyedIterable.prototype;function keyMapper(s,i){return i}function entryMapper(s,i){return[i,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return\"string\"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,i){return s<i?1:s>i?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var i=isOrdered(s),u=isKeyed(s),_=i?1:0;return murmurHashOfSize(s.__iterate(u?i?function(s,i){_=31*_+hashMerge(hash(s),hash(i))|0}:function(s,i){_=_+hashMerge(hash(s),hash(i))|0}:i?function(s){_=31*_+hash(s)|0}:function(s){_=_+hash(s)|0}),_)}function murmurHashOfSize(s,i){return i=ye(i,3432918353),i=ye(i<<15|i>>>-15,461845907),i=ye(i<<13|i>>>-13,5),i=ye((i=(i+3864292196|0)^s)^i>>>16,2246822507),i=smi((i=ye(i^i>>>13,3266489909))^i>>>16)}function hashMerge(s,i){return s^i+2654435769+(s<<6)+(s>>2)|0}return gt[u]=!0,gt[le]=mt.entries,gt.__toJS=mt.toObject,gt.__toStringMapper=function(s,i){return JSON.stringify(i)+\": \"+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,i){return reify(this,filterFactory(this,s,i,!1))},findIndex:function(s,i){var u=this.findEntry(s,i);return u?u[0]:-1},indexOf:function(s){var i=this.keyOf(s);return void 0===i?-1:i},lastIndexOf:function(s){var i=this.lastKeyOf(s);return void 0===i?-1:i},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,i){return reify(this,sliceFactory(this,s,i,!1))},splice:function(s,i){var u=arguments.length;if(i=Math.max(0|i,0),0===u||2===u&&!i)return this;s=resolveBegin(s,s<0?this.count():this.size);var _=this.slice(0,s);return reify(this,1===u?_:_.concat(arrCopy(arguments,2),this.slice(s+i)))},findLastIndex:function(s,i){var u=this.findLastEntry(s,i);return u?u[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,i){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?i:this.find((function(i,u){return u===s}),void 0,i)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s<this.size:-1!==this.indexOf(s))},interpose:function(s){return reify(this,interposeFactory(this,s))},interleave:function(){var s=[this].concat(arrCopy(arguments)),i=zipWithFactory(this.toSeq(),IndexedSeq.of,s),u=i.flatten(!0);return i.size&&(u.size=i.size*s.length),reify(this,u)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(s,i){return reify(this,skipWhileFactory(this,s,i,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(s){var i=arrCopy(arguments);return i[0]=this,reify(this,zipWithFactory(this,s,i))}}),IndexedIterable.prototype[_]=!0,IndexedIterable.prototype[w]=!0,mixin(SetIterable,{get:function(s,i){return this.has(s)?s:i},includes:function(s){return this.has(s)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=mt.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},56698:s=>{\"function\"==typeof Object.create?s.exports=function inherits(s,i){i&&(s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function inherits(s,i){if(i){s.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype,s.prototype=new TempCtor,s.prototype.constructor=s}}},5419:s=>{s.exports=function(s,i,u,_){var w=new Blob(void 0!==_?[_,s]:[s],{type:u||\"application/octet-stream\"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(w,i);else{var x=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(w):window.webkitURL.createObjectURL(w),j=document.createElement(\"a\");j.style.display=\"none\",j.href=x,j.setAttribute(\"download\",i),void 0===j.download&&j.setAttribute(\"target\",\"_blank\"),document.body.appendChild(j),j.click(),setTimeout((function(){document.body.removeChild(j),window.URL.revokeObjectURL(x)}),200)}}},20181:(s,i,u)=>{var _=NaN,w=\"[object Symbol]\",x=/^\\s+|\\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt,U=\"object\"==typeof u.g&&u.g&&u.g.Object===Object&&u.g,Y=\"object\"==typeof self&&self&&self.Object===Object&&self,X=U||Y||Function(\"return this\")(),Z=Object.prototype.toString,ee=Math.max,ie=Math.min,now=function(){return X.Date.now()};function isObject(s){var i=typeof s;return!!s&&(\"object\"==i||\"function\"==i)}function toNumber(s){if(\"number\"==typeof s)return s;if(function isSymbol(s){return\"symbol\"==typeof s||function isObjectLike(s){return!!s&&\"object\"==typeof s}(s)&&Z.call(s)==w}(s))return _;if(isObject(s)){var i=\"function\"==typeof s.valueOf?s.valueOf():s;s=isObject(i)?i+\"\":i}if(\"string\"!=typeof s)return 0===s?s:+s;s=s.replace(x,\"\");var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?_:+s}s.exports=function debounce(s,i,u){var _,w,x,j,P,B,$=0,U=!1,Y=!1,X=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(i){var u=_,x=w;return _=w=void 0,$=i,j=s.apply(x,u)}function shouldInvoke(s){var u=s-B;return void 0===B||u>=i||u<0||Y&&s-$>=x}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);P=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-B);return Y?ie(u,x-(s-$)):u}(s))}function trailingEdge(s){return P=void 0,X&&_?invokeFunc(s):(_=w=void 0,j)}function debounced(){var s=now(),u=shouldInvoke(s);if(_=arguments,w=this,B=s,u){if(void 0===P)return function leadingEdge(s){return $=s,P=setTimeout(timerExpired,i),U?invokeFunc(s):j}(B);if(Y)return P=setTimeout(timerExpired,i),invokeFunc(B)}return void 0===P&&(P=setTimeout(timerExpired,i)),j}return i=toNumber(i)||0,isObject(u)&&(U=!!u.leading,x=(Y=\"maxWait\"in u)?ee(toNumber(u.maxWait)||0,i):x,X=\"trailing\"in u?!!u.trailing:X),debounced.cancel=function cancel(){void 0!==P&&clearTimeout(P),$=0,_=B=w=P=void 0},debounced.flush=function flush(){return void 0===P?j:trailingEdge(now())},debounced}},55580:(s,i,u)=>{var _=u(56110)(u(9325),\"DataView\");s.exports=_},21549:(s,i,u)=>{var _=u(22032),w=u(63862),x=u(66721),j=u(12749),P=u(35749);function Hash(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}Hash.prototype.clear=_,Hash.prototype.delete=w,Hash.prototype.get=x,Hash.prototype.has=j,Hash.prototype.set=P,s.exports=Hash},30980:(s,i,u)=>{var _=u(39344),w=u(94033);function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=_(w.prototype),LazyWrapper.prototype.constructor=LazyWrapper,s.exports=LazyWrapper},80079:(s,i,u)=>{var _=u(63702),w=u(70080),x=u(24739),j=u(48655),P=u(31175);function ListCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}ListCache.prototype.clear=_,ListCache.prototype.delete=w,ListCache.prototype.get=x,ListCache.prototype.has=j,ListCache.prototype.set=P,s.exports=ListCache},56017:(s,i,u)=>{var _=u(39344),w=u(94033);function LodashWrapper(s,i){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=_(w.prototype),LodashWrapper.prototype.constructor=LodashWrapper,s.exports=LodashWrapper},68223:(s,i,u)=>{var _=u(56110)(u(9325),\"Map\");s.exports=_},53661:(s,i,u)=>{var _=u(63040),w=u(17670),x=u(90289),j=u(4509),P=u(72949);function MapCache(s){var i=-1,u=null==s?0:s.length;for(this.clear();++i<u;){var _=s[i];this.set(_[0],_[1])}}MapCache.prototype.clear=_,MapCache.prototype.delete=w,MapCache.prototype.get=x,MapCache.prototype.has=j,MapCache.prototype.set=P,s.exports=MapCache},32804:(s,i,u)=>{var _=u(56110)(u(9325),\"Promise\");s.exports=_},76545:(s,i,u)=>{var _=u(56110)(u(9325),\"Set\");s.exports=_},38859:(s,i,u)=>{var _=u(53661),w=u(31380),x=u(51459);function SetCache(s){var i=-1,u=null==s?0:s.length;for(this.__data__=new _;++i<u;)this.add(s[i])}SetCache.prototype.add=SetCache.prototype.push=w,SetCache.prototype.has=x,s.exports=SetCache},37217:(s,i,u)=>{var _=u(80079),w=u(51420),x=u(90938),j=u(63605),P=u(29817),B=u(80945);function Stack(s){var i=this.__data__=new _(s);this.size=i.size}Stack.prototype.clear=w,Stack.prototype.delete=x,Stack.prototype.get=j,Stack.prototype.has=P,Stack.prototype.set=B,s.exports=Stack},51873:(s,i,u)=>{var _=u(9325).Symbol;s.exports=_},37828:(s,i,u)=>{var _=u(9325).Uint8Array;s.exports=_},28303:(s,i,u)=>{var _=u(56110)(u(9325),\"WeakMap\");s.exports=_},91033:s=>{s.exports=function apply(s,i,u){switch(u.length){case 0:return s.call(i);case 1:return s.call(i,u[0]);case 2:return s.call(i,u[0],u[1]);case 3:return s.call(i,u[0],u[1],u[2])}return s.apply(i,u)}},83729:s=>{s.exports=function arrayEach(s,i){for(var u=-1,_=null==s?0:s.length;++u<_&&!1!==i(s[u],u,s););return s}},79770:s=>{s.exports=function arrayFilter(s,i){for(var u=-1,_=null==s?0:s.length,w=0,x=[];++u<_;){var j=s[u];i(j,u,s)&&(x[w++]=j)}return x}},15325:(s,i,u)=>{var _=u(96131);s.exports=function arrayIncludes(s,i){return!!(null==s?0:s.length)&&_(s,i,0)>-1}},70695:(s,i,u)=>{var _=u(78096),w=u(72428),x=u(56449),j=u(3656),P=u(30361),B=u(37167),$=Object.prototype.hasOwnProperty;s.exports=function arrayLikeKeys(s,i){var u=x(s),U=!u&&w(s),Y=!u&&!U&&j(s),X=!u&&!U&&!Y&&B(s),Z=u||U||Y||X,ee=Z?_(s.length,String):[],ie=ee.length;for(var ae in s)!i&&!$.call(s,ae)||Z&&(\"length\"==ae||Y&&(\"offset\"==ae||\"parent\"==ae)||X&&(\"buffer\"==ae||\"byteLength\"==ae||\"byteOffset\"==ae)||P(ae,ie))||ee.push(ae);return ee}},34932:s=>{s.exports=function arrayMap(s,i){for(var u=-1,_=null==s?0:s.length,w=Array(_);++u<_;)w[u]=i(s[u],u,s);return w}},14528:s=>{s.exports=function arrayPush(s,i){for(var u=-1,_=i.length,w=s.length;++u<_;)s[w+u]=i[u];return s}},40882:s=>{s.exports=function arrayReduce(s,i,u,_){var w=-1,x=null==s?0:s.length;for(_&&x&&(u=s[++w]);++w<x;)u=i(u,s[w],w,s);return u}},14248:s=>{s.exports=function arraySome(s,i){for(var u=-1,_=null==s?0:s.length;++u<_;)if(i(s[u],u,s))return!0;return!1}},61074:s=>{s.exports=function asciiToArray(s){return s.split(\"\")}},1733:s=>{var i=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;s.exports=function asciiWords(s){return s.match(i)||[]}},87805:(s,i,u)=>{var _=u(43360),w=u(75288);s.exports=function assignMergeValue(s,i,u){(void 0!==u&&!w(s[i],u)||void 0===u&&!(i in s))&&_(s,i,u)}},16547:(s,i,u)=>{var _=u(43360),w=u(75288),x=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,i,u){var j=s[i];x.call(s,i)&&w(j,u)&&(void 0!==u||i in s)||_(s,i,u)}},26025:(s,i,u)=>{var _=u(75288);s.exports=function assocIndexOf(s,i){for(var u=s.length;u--;)if(_(s[u][0],i))return u;return-1}},74733:(s,i,u)=>{var _=u(21791),w=u(95950);s.exports=function baseAssign(s,i){return s&&_(i,w(i),s)}},43838:(s,i,u)=>{var _=u(21791),w=u(37241);s.exports=function baseAssignIn(s,i){return s&&_(i,w(i),s)}},43360:(s,i,u)=>{var _=u(93243);s.exports=function baseAssignValue(s,i,u){\"__proto__\"==i&&_?_(s,i,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[i]=u}},9999:(s,i,u)=>{var _=u(37217),w=u(83729),x=u(16547),j=u(74733),P=u(43838),B=u(93290),$=u(23007),U=u(92271),Y=u(48948),X=u(50002),Z=u(83349),ee=u(5861),ie=u(76189),ae=u(77199),le=u(35529),ce=u(56449),pe=u(3656),de=u(87730),fe=u(23805),ye=u(38440),be=u(95950),_e=u(37241),we=\"[object Arguments]\",Se=\"[object Function]\",xe=\"[object Object]\",Pe={};Pe[we]=Pe[\"[object Array]\"]=Pe[\"[object ArrayBuffer]\"]=Pe[\"[object DataView]\"]=Pe[\"[object Boolean]\"]=Pe[\"[object Date]\"]=Pe[\"[object Float32Array]\"]=Pe[\"[object Float64Array]\"]=Pe[\"[object Int8Array]\"]=Pe[\"[object Int16Array]\"]=Pe[\"[object Int32Array]\"]=Pe[\"[object Map]\"]=Pe[\"[object Number]\"]=Pe[xe]=Pe[\"[object RegExp]\"]=Pe[\"[object Set]\"]=Pe[\"[object String]\"]=Pe[\"[object Symbol]\"]=Pe[\"[object Uint8Array]\"]=Pe[\"[object Uint8ClampedArray]\"]=Pe[\"[object Uint16Array]\"]=Pe[\"[object Uint32Array]\"]=!0,Pe[\"[object Error]\"]=Pe[Se]=Pe[\"[object WeakMap]\"]=!1,s.exports=function baseClone(s,i,u,Te,Re,qe){var $e,ze=1&i,We=2&i,He=4&i;if(u&&($e=Re?u(s,Te,Re,qe):u(s)),void 0!==$e)return $e;if(!fe(s))return s;var Ye=ce(s);if(Ye){if($e=ie(s),!ze)return $(s,$e)}else{var Xe=ee(s),Qe=Xe==Se||\"[object GeneratorFunction]\"==Xe;if(pe(s))return B(s,ze);if(Xe==xe||Xe==we||Qe&&!Re){if($e=We||Qe?{}:le(s),!ze)return We?Y(s,P($e,s)):U(s,j($e,s))}else{if(!Pe[Xe])return Re?s:{};$e=ae(s,Xe,ze)}}qe||(qe=new _);var et=qe.get(s);if(et)return et;qe.set(s,$e),ye(s)?s.forEach((function(_){$e.add(baseClone(_,i,u,_,s,qe))})):de(s)&&s.forEach((function(_,w){$e.set(w,baseClone(_,i,u,w,s,qe))}));var tt=Ye?void 0:(He?We?Z:X:We?_e:be)(s);return w(tt||s,(function(_,w){tt&&(_=s[w=_]),x($e,w,baseClone(_,i,u,w,s,qe))})),$e}},39344:(s,i,u)=>{var _=u(23805),w=Object.create,x=function(){function object(){}return function(s){if(!_(s))return{};if(w)return w(s);object.prototype=s;var i=new object;return object.prototype=void 0,i}}();s.exports=x},80909:(s,i,u)=>{var _=u(30641),w=u(38329)(_);s.exports=w},2523:s=>{s.exports=function baseFindIndex(s,i,u,_){for(var w=s.length,x=u+(_?1:-1);_?x--:++x<w;)if(i(s[x],x,s))return x;return-1}},83120:(s,i,u)=>{var _=u(14528),w=u(45891);s.exports=function baseFlatten(s,i,u,x,j){var P=-1,B=s.length;for(u||(u=w),j||(j=[]);++P<B;){var $=s[P];i>0&&u($)?i>1?baseFlatten($,i-1,u,x,j):_(j,$):x||(j[j.length]=$)}return j}},86649:(s,i,u)=>{var _=u(83221)();s.exports=_},30641:(s,i,u)=>{var _=u(86649),w=u(95950);s.exports=function baseForOwn(s,i){return s&&_(s,i,w)}},47422:(s,i,u)=>{var _=u(31769),w=u(77797);s.exports=function baseGet(s,i){for(var u=0,x=(i=_(i,s)).length;null!=s&&u<x;)s=s[w(i[u++])];return u&&u==x?s:void 0}},82199:(s,i,u)=>{var _=u(14528),w=u(56449);s.exports=function baseGetAllKeys(s,i,u){var x=i(s);return w(s)?x:_(x,u(s))}},72552:(s,i,u)=>{var _=u(51873),w=u(659),x=u(59350),j=_?_.toStringTag:void 0;s.exports=function baseGetTag(s){return null==s?void 0===s?\"[object Undefined]\":\"[object Null]\":j&&j in Object(s)?w(s):x(s)}},28077:s=>{s.exports=function baseHasIn(s,i){return null!=s&&i in Object(s)}},96131:(s,i,u)=>{var _=u(2523),w=u(85463),x=u(76959);s.exports=function baseIndexOf(s,i,u){return i==i?x(s,i,u):_(s,w,u)}},27534:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function baseIsArguments(s){return w(s)&&\"[object Arguments]\"==_(s)}},60270:(s,i,u)=>{var _=u(87068),w=u(40346);s.exports=function baseIsEqual(s,i,u,x,j){return s===i||(null==s||null==i||!w(s)&&!w(i)?s!=s&&i!=i:_(s,i,u,x,baseIsEqual,j))}},87068:(s,i,u)=>{var _=u(37217),w=u(25911),x=u(21986),j=u(50689),P=u(5861),B=u(56449),$=u(3656),U=u(37167),Y=\"[object Arguments]\",X=\"[object Array]\",Z=\"[object Object]\",ee=Object.prototype.hasOwnProperty;s.exports=function baseIsEqualDeep(s,i,u,ie,ae,le){var ce=B(s),pe=B(i),de=ce?X:P(s),fe=pe?X:P(i),ye=(de=de==Y?Z:de)==Z,be=(fe=fe==Y?Z:fe)==Z,_e=de==fe;if(_e&&$(s)){if(!$(i))return!1;ce=!0,ye=!1}if(_e&&!ye)return le||(le=new _),ce||U(s)?w(s,i,u,ie,ae,le):x(s,i,de,u,ie,ae,le);if(!(1&u)){var we=ye&&ee.call(s,\"__wrapped__\"),Se=be&&ee.call(i,\"__wrapped__\");if(we||Se){var xe=we?s.value():s,Pe=Se?i.value():i;return le||(le=new _),ae(xe,Pe,u,ie,le)}}return!!_e&&(le||(le=new _),j(s,i,u,ie,ae,le))}},29172:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function baseIsMap(s){return w(s)&&\"[object Map]\"==_(s)}},41799:(s,i,u)=>{var _=u(37217),w=u(60270);s.exports=function baseIsMatch(s,i,u,x){var j=u.length,P=j,B=!x;if(null==s)return!P;for(s=Object(s);j--;){var $=u[j];if(B&&$[2]?$[1]!==s[$[0]]:!($[0]in s))return!1}for(;++j<P;){var U=($=u[j])[0],Y=s[U],X=$[1];if(B&&$[2]){if(void 0===Y&&!(U in s))return!1}else{var Z=new _;if(x)var ee=x(Y,X,U,s,i,Z);if(!(void 0===ee?w(X,Y,3,x,Z):ee))return!1}}return!0}},85463:s=>{s.exports=function baseIsNaN(s){return s!=s}},45083:(s,i,u)=>{var _=u(1882),w=u(87296),x=u(23805),j=u(47473),P=/^\\[object .+?Constructor\\]$/,B=Function.prototype,$=Object.prototype,U=B.toString,Y=$.hasOwnProperty,X=RegExp(\"^\"+U.call(Y).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");s.exports=function baseIsNative(s){return!(!x(s)||w(s))&&(_(s)?X:P).test(j(s))}},16038:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function baseIsSet(s){return w(s)&&\"[object Set]\"==_(s)}},4901:(s,i,u)=>{var _=u(72552),w=u(30294),x=u(40346),j={};j[\"[object Float32Array]\"]=j[\"[object Float64Array]\"]=j[\"[object Int8Array]\"]=j[\"[object Int16Array]\"]=j[\"[object Int32Array]\"]=j[\"[object Uint8Array]\"]=j[\"[object Uint8ClampedArray]\"]=j[\"[object Uint16Array]\"]=j[\"[object Uint32Array]\"]=!0,j[\"[object Arguments]\"]=j[\"[object Array]\"]=j[\"[object ArrayBuffer]\"]=j[\"[object Boolean]\"]=j[\"[object DataView]\"]=j[\"[object Date]\"]=j[\"[object Error]\"]=j[\"[object Function]\"]=j[\"[object Map]\"]=j[\"[object Number]\"]=j[\"[object Object]\"]=j[\"[object RegExp]\"]=j[\"[object Set]\"]=j[\"[object String]\"]=j[\"[object WeakMap]\"]=!1,s.exports=function baseIsTypedArray(s){return x(s)&&w(s.length)&&!!j[_(s)]}},15389:(s,i,u)=>{var _=u(93663),w=u(87978),x=u(83488),j=u(56449),P=u(50583);s.exports=function baseIteratee(s){return\"function\"==typeof s?s:null==s?x:\"object\"==typeof s?j(s)?w(s[0],s[1]):_(s):P(s)}},88984:(s,i,u)=>{var _=u(55527),w=u(3650),x=Object.prototype.hasOwnProperty;s.exports=function baseKeys(s){if(!_(s))return w(s);var i=[];for(var u in Object(s))x.call(s,u)&&\"constructor\"!=u&&i.push(u);return i}},72903:(s,i,u)=>{var _=u(23805),w=u(55527),x=u(90181),j=Object.prototype.hasOwnProperty;s.exports=function baseKeysIn(s){if(!_(s))return x(s);var i=w(s),u=[];for(var P in s)(\"constructor\"!=P||!i&&j.call(s,P))&&u.push(P);return u}},94033:s=>{s.exports=function baseLodash(){}},93663:(s,i,u)=>{var _=u(41799),w=u(10776),x=u(67197);s.exports=function baseMatches(s){var i=w(s);return 1==i.length&&i[0][2]?x(i[0][0],i[0][1]):function(u){return u===s||_(u,s,i)}}},87978:(s,i,u)=>{var _=u(60270),w=u(58156),x=u(80631),j=u(28586),P=u(30756),B=u(67197),$=u(77797);s.exports=function baseMatchesProperty(s,i){return j(s)&&P(i)?B($(s),i):function(u){var j=w(u,s);return void 0===j&&j===i?x(u,s):_(i,j,3)}}},85250:(s,i,u)=>{var _=u(37217),w=u(87805),x=u(86649),j=u(42824),P=u(23805),B=u(37241),$=u(14974);s.exports=function baseMerge(s,i,u,U,Y){s!==i&&x(i,(function(x,B){if(Y||(Y=new _),P(x))j(s,i,B,u,baseMerge,U,Y);else{var X=U?U($(s,B),x,B+\"\",s,i,Y):void 0;void 0===X&&(X=x),w(s,B,X)}}),B)}},42824:(s,i,u)=>{var _=u(87805),w=u(93290),x=u(71961),j=u(23007),P=u(35529),B=u(72428),$=u(56449),U=u(83693),Y=u(3656),X=u(1882),Z=u(23805),ee=u(11331),ie=u(37167),ae=u(14974),le=u(69884);s.exports=function baseMergeDeep(s,i,u,ce,pe,de,fe){var ye=ae(s,u),be=ae(i,u),_e=fe.get(be);if(_e)_(s,u,_e);else{var we=de?de(ye,be,u+\"\",s,i,fe):void 0,Se=void 0===we;if(Se){var xe=$(be),Pe=!xe&&Y(be),Te=!xe&&!Pe&&ie(be);we=be,xe||Pe||Te?$(ye)?we=ye:U(ye)?we=j(ye):Pe?(Se=!1,we=w(be,!0)):Te?(Se=!1,we=x(be,!0)):we=[]:ee(be)||B(be)?(we=ye,B(ye)?we=le(ye):Z(ye)&&!X(ye)||(we=P(be))):Se=!1}Se&&(fe.set(be,we),pe(we,be,ce,de,fe),fe.delete(be)),_(s,u,we)}}},47237:s=>{s.exports=function baseProperty(s){return function(i){return null==i?void 0:i[s]}}},17255:(s,i,u)=>{var _=u(47422);s.exports=function basePropertyDeep(s){return function(i){return _(i,s)}}},54552:s=>{s.exports=function basePropertyOf(s){return function(i){return null==s?void 0:s[i]}}},85558:s=>{s.exports=function baseReduce(s,i,u,_,w){return w(s,(function(s,w,x){u=_?(_=!1,s):i(u,s,w,x)})),u}},69302:(s,i,u)=>{var _=u(83488),w=u(56757),x=u(32865);s.exports=function baseRest(s,i){return x(w(s,i,_),s+\"\")}},73170:(s,i,u)=>{var _=u(16547),w=u(31769),x=u(30361),j=u(23805),P=u(77797);s.exports=function baseSet(s,i,u,B){if(!j(s))return s;for(var $=-1,U=(i=w(i,s)).length,Y=U-1,X=s;null!=X&&++$<U;){var Z=P(i[$]),ee=u;if(\"__proto__\"===Z||\"constructor\"===Z||\"prototype\"===Z)return s;if($!=Y){var ie=X[Z];void 0===(ee=B?B(ie,Z,X):void 0)&&(ee=j(ie)?ie:x(i[$+1])?[]:{})}_(X,Z,ee),X=X[Z]}return s}},68882:(s,i,u)=>{var _=u(83488),w=u(48152),x=w?function(s,i){return w.set(s,i),s}:_;s.exports=x},19570:(s,i,u)=>{var _=u(37334),w=u(93243),x=u(83488),j=w?function(s,i){return w(s,\"toString\",{configurable:!0,enumerable:!1,value:_(i),writable:!0})}:x;s.exports=j},25160:s=>{s.exports=function baseSlice(s,i,u){var _=-1,w=s.length;i<0&&(i=-i>w?0:w+i),(u=u>w?w:u)<0&&(u+=w),w=i>u?0:u-i>>>0,i>>>=0;for(var x=Array(w);++_<w;)x[_]=s[_+i];return x}},90916:(s,i,u)=>{var _=u(80909);s.exports=function baseSome(s,i){var u;return _(s,(function(s,_,w){return!(u=i(s,_,w))})),!!u}},78096:s=>{s.exports=function baseTimes(s,i){for(var u=-1,_=Array(s);++u<s;)_[u]=i(u);return _}},77556:(s,i,u)=>{var _=u(51873),w=u(34932),x=u(56449),j=u(44394),P=_?_.prototype:void 0,B=P?P.toString:void 0;s.exports=function baseToString(s){if(\"string\"==typeof s)return s;if(x(s))return w(s,baseToString)+\"\";if(j(s))return B?B.call(s):\"\";var i=s+\"\";return\"0\"==i&&1/s==-Infinity?\"-0\":i}},54128:(s,i,u)=>{var _=u(31800),w=/^\\s+/;s.exports=function baseTrim(s){return s?s.slice(0,_(s)+1).replace(w,\"\"):s}},27301:s=>{s.exports=function baseUnary(s){return function(i){return s(i)}}},19931:(s,i,u)=>{var _=u(31769),w=u(68090),x=u(68969),j=u(77797);s.exports=function baseUnset(s,i){return i=_(i,s),null==(s=x(s,i))||delete s[j(w(i))]}},51234:s=>{s.exports=function baseZipObject(s,i,u){for(var _=-1,w=s.length,x=i.length,j={};++_<w;){var P=_<x?i[_]:void 0;u(j,s[_],P)}return j}},19219:s=>{s.exports=function cacheHas(s,i){return s.has(i)}},31769:(s,i,u)=>{var _=u(56449),w=u(28586),x=u(61802),j=u(13222);s.exports=function castPath(s,i){return _(s)?s:w(s,i)?[s]:x(j(s))}},28754:(s,i,u)=>{var _=u(25160);s.exports=function castSlice(s,i,u){var w=s.length;return u=void 0===u?w:u,!i&&u>=w?s:_(s,i,u)}},49653:(s,i,u)=>{var _=u(37828);s.exports=function cloneArrayBuffer(s){var i=new s.constructor(s.byteLength);return new _(i).set(new _(s)),i}},93290:(s,i,u)=>{s=u.nmd(s);var _=u(9325),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w?_.Buffer:void 0,P=j?j.allocUnsafe:void 0;s.exports=function cloneBuffer(s,i){if(i)return s.slice();var u=s.length,_=P?P(u):new s.constructor(u);return s.copy(_),_}},76169:(s,i,u)=>{var _=u(49653);s.exports=function cloneDataView(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}},73201:s=>{var i=/\\w*$/;s.exports=function cloneRegExp(s){var u=new s.constructor(s.source,i.exec(s));return u.lastIndex=s.lastIndex,u}},93736:(s,i,u)=>{var _=u(51873),w=_?_.prototype:void 0,x=w?w.valueOf:void 0;s.exports=function cloneSymbol(s){return x?Object(x.call(s)):{}}},71961:(s,i,u)=>{var _=u(49653);s.exports=function cloneTypedArray(s,i){var u=i?_(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}},91596:s=>{var i=Math.max;s.exports=function composeArgs(s,u,_,w){for(var x=-1,j=s.length,P=_.length,B=-1,$=u.length,U=i(j-P,0),Y=Array($+U),X=!w;++B<$;)Y[B]=u[B];for(;++x<P;)(X||x<j)&&(Y[_[x]]=s[x]);for(;U--;)Y[B++]=s[x++];return Y}},53320:s=>{var i=Math.max;s.exports=function composeArgsRight(s,u,_,w){for(var x=-1,j=s.length,P=-1,B=_.length,$=-1,U=u.length,Y=i(j-B,0),X=Array(Y+U),Z=!w;++x<Y;)X[x]=s[x];for(var ee=x;++$<U;)X[ee+$]=u[$];for(;++P<B;)(Z||x<j)&&(X[ee+_[P]]=s[x++]);return X}},23007:s=>{s.exports=function copyArray(s,i){var u=-1,_=s.length;for(i||(i=Array(_));++u<_;)i[u]=s[u];return i}},21791:(s,i,u)=>{var _=u(16547),w=u(43360);s.exports=function copyObject(s,i,u,x){var j=!u;u||(u={});for(var P=-1,B=i.length;++P<B;){var $=i[P],U=x?x(u[$],s[$],$,u,s):void 0;void 0===U&&(U=s[$]),j?w(u,$,U):_(u,$,U)}return u}},92271:(s,i,u)=>{var _=u(21791),w=u(4664);s.exports=function copySymbols(s,i){return _(s,w(s),i)}},48948:(s,i,u)=>{var _=u(21791),w=u(86375);s.exports=function copySymbolsIn(s,i){return _(s,w(s),i)}},55481:(s,i,u)=>{var _=u(9325)[\"__core-js_shared__\"];s.exports=_},58523:s=>{s.exports=function countHolders(s,i){for(var u=s.length,_=0;u--;)s[u]===i&&++_;return _}},20999:(s,i,u)=>{var _=u(69302),w=u(36800);s.exports=function createAssigner(s){return _((function(i,u){var _=-1,x=u.length,j=x>1?u[x-1]:void 0,P=x>2?u[2]:void 0;for(j=s.length>3&&\"function\"==typeof j?(x--,j):void 0,P&&w(u[0],u[1],P)&&(j=x<3?void 0:j,x=1),i=Object(i);++_<x;){var B=u[_];B&&s(i,B,_,j)}return i}))}},38329:(s,i,u)=>{var _=u(64894);s.exports=function createBaseEach(s,i){return function(u,w){if(null==u)return u;if(!_(u))return s(u,w);for(var x=u.length,j=i?x:-1,P=Object(u);(i?j--:++j<x)&&!1!==w(P[j],j,P););return u}}},83221:s=>{s.exports=function createBaseFor(s){return function(i,u,_){for(var w=-1,x=Object(i),j=_(i),P=j.length;P--;){var B=j[s?P:++w];if(!1===u(x[B],B,x))break}return i}}},11842:(s,i,u)=>{var _=u(82819),w=u(9325);s.exports=function createBind(s,i,u){var x=1&i,j=_(s);return function wrapper(){return(this&&this!==w&&this instanceof wrapper?j:s).apply(x?u:this,arguments)}}},12507:(s,i,u)=>{var _=u(28754),w=u(49698),x=u(63912),j=u(13222);s.exports=function createCaseFirst(s){return function(i){i=j(i);var u=w(i)?x(i):void 0,P=u?u[0]:i.charAt(0),B=u?_(u,1).join(\"\"):i.slice(1);return P[s]()+B}}},45539:(s,i,u)=>{var _=u(40882),w=u(50828),x=u(66645),j=RegExp(\"['’]\",\"g\");s.exports=function createCompounder(s){return function(i){return _(x(w(i).replace(j,\"\")),s,\"\")}}},82819:(s,i,u)=>{var _=u(39344),w=u(23805);s.exports=function createCtor(s){return function(){var i=arguments;switch(i.length){case 0:return new s;case 1:return new s(i[0]);case 2:return new s(i[0],i[1]);case 3:return new s(i[0],i[1],i[2]);case 4:return new s(i[0],i[1],i[2],i[3]);case 5:return new s(i[0],i[1],i[2],i[3],i[4]);case 6:return new s(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new s(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var u=_(s.prototype),x=s.apply(u,i);return w(x)?x:u}}},77078:(s,i,u)=>{var _=u(91033),w=u(82819),x=u(37471),j=u(18073),P=u(11287),B=u(36306),$=u(9325);s.exports=function createCurry(s,i,u){var U=w(s);return function wrapper(){for(var w=arguments.length,Y=Array(w),X=w,Z=P(wrapper);X--;)Y[X]=arguments[X];var ee=w<3&&Y[0]!==Z&&Y[w-1]!==Z?[]:B(Y,Z);return(w-=ee.length)<u?j(s,i,x,wrapper.placeholder,void 0,Y,ee,void 0,void 0,u-w):_(this&&this!==$&&this instanceof wrapper?U:s,this,Y)}}},62006:(s,i,u)=>{var _=u(15389),w=u(64894),x=u(95950);s.exports=function createFind(s){return function(i,u,j){var P=Object(i);if(!w(i)){var B=_(u,3);i=x(i),u=function(s){return B(P[s],s,P)}}var $=s(i,u,j);return $>-1?P[B?i[$]:$]:void 0}}},37471:(s,i,u)=>{var _=u(91596),w=u(53320),x=u(58523),j=u(82819),P=u(18073),B=u(11287),$=u(68294),U=u(36306),Y=u(9325);s.exports=function createHybrid(s,i,u,X,Z,ee,ie,ae,le,ce){var pe=128&i,de=1&i,fe=2&i,ye=24&i,be=512&i,_e=fe?void 0:j(s);return function wrapper(){for(var we=arguments.length,Se=Array(we),xe=we;xe--;)Se[xe]=arguments[xe];if(ye)var Pe=B(wrapper),Te=x(Se,Pe);if(X&&(Se=_(Se,X,Z,ye)),ee&&(Se=w(Se,ee,ie,ye)),we-=Te,ye&&we<ce){var Re=U(Se,Pe);return P(s,i,createHybrid,wrapper.placeholder,u,Se,Re,ae,le,ce-we)}var qe=de?u:this,$e=fe?qe[s]:s;return we=Se.length,ae?Se=$(Se,ae):be&&we>1&&Se.reverse(),pe&&le<we&&(Se.length=le),this&&this!==Y&&this instanceof wrapper&&($e=_e||j($e)),$e.apply(qe,Se)}}},24168:(s,i,u)=>{var _=u(91033),w=u(82819),x=u(9325);s.exports=function createPartial(s,i,u,j){var P=1&i,B=w(s);return function wrapper(){for(var i=-1,w=arguments.length,$=-1,U=j.length,Y=Array(U+w),X=this&&this!==x&&this instanceof wrapper?B:s;++$<U;)Y[$]=j[$];for(;w--;)Y[$++]=arguments[++i];return _(X,P?u:this,Y)}}},18073:(s,i,u)=>{var _=u(85087),w=u(54641),x=u(70981);s.exports=function createRecurry(s,i,u,j,P,B,$,U,Y,X){var Z=8&i;i|=Z?32:64,4&(i&=~(Z?64:32))||(i&=-4);var ee=[s,i,P,Z?B:void 0,Z?$:void 0,Z?void 0:B,Z?void 0:$,U,Y,X],ie=u.apply(void 0,ee);return _(s)&&w(ie,ee),ie.placeholder=j,x(ie,s,i)}},66977:(s,i,u)=>{var _=u(68882),w=u(11842),x=u(77078),j=u(37471),P=u(24168),B=u(37381),$=u(3209),U=u(54641),Y=u(70981),X=u(61489),Z=Math.max;s.exports=function createWrap(s,i,u,ee,ie,ae,le,ce){var pe=2&i;if(!pe&&\"function\"!=typeof s)throw new TypeError(\"Expected a function\");var de=ee?ee.length:0;if(de||(i&=-97,ee=ie=void 0),le=void 0===le?le:Z(X(le),0),ce=void 0===ce?ce:X(ce),de-=ie?ie.length:0,64&i){var fe=ee,ye=ie;ee=ie=void 0}var be=pe?void 0:B(s),_e=[s,i,u,ee,ie,fe,ye,ae,le,ce];if(be&&$(_e,be),s=_e[0],i=_e[1],u=_e[2],ee=_e[3],ie=_e[4],!(ce=_e[9]=void 0===_e[9]?pe?0:s.length:Z(_e[9]-de,0))&&24&i&&(i&=-25),i&&1!=i)we=8==i||16==i?x(s,i,ce):32!=i&&33!=i||ie.length?j.apply(void 0,_e):P(s,i,u,ee);else var we=w(s,i,u);return Y((be?_:U)(we,_e),s,i)}},53138:(s,i,u)=>{var _=u(11331);s.exports=function customOmitClone(s){return _(s)?void 0:s}},24647:(s,i,u)=>{var _=u(54552)({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"});s.exports=_},93243:(s,i,u)=>{var _=u(56110),w=function(){try{var s=_(Object,\"defineProperty\");return s({},\"\",{}),s}catch(s){}}();s.exports=w},25911:(s,i,u)=>{var _=u(38859),w=u(14248),x=u(19219);s.exports=function equalArrays(s,i,u,j,P,B){var $=1&u,U=s.length,Y=i.length;if(U!=Y&&!($&&Y>U))return!1;var X=B.get(s),Z=B.get(i);if(X&&Z)return X==i&&Z==s;var ee=-1,ie=!0,ae=2&u?new _:void 0;for(B.set(s,i),B.set(i,s);++ee<U;){var le=s[ee],ce=i[ee];if(j)var pe=$?j(ce,le,ee,i,s,B):j(le,ce,ee,s,i,B);if(void 0!==pe){if(pe)continue;ie=!1;break}if(ae){if(!w(i,(function(s,i){if(!x(ae,i)&&(le===s||P(le,s,u,j,B)))return ae.push(i)}))){ie=!1;break}}else if(le!==ce&&!P(le,ce,u,j,B)){ie=!1;break}}return B.delete(s),B.delete(i),ie}},21986:(s,i,u)=>{var _=u(51873),w=u(37828),x=u(75288),j=u(25911),P=u(20317),B=u(84247),$=_?_.prototype:void 0,U=$?$.valueOf:void 0;s.exports=function equalByTag(s,i,u,_,$,Y,X){switch(u){case\"[object DataView]\":if(s.byteLength!=i.byteLength||s.byteOffset!=i.byteOffset)return!1;s=s.buffer,i=i.buffer;case\"[object ArrayBuffer]\":return!(s.byteLength!=i.byteLength||!Y(new w(s),new w(i)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return x(+s,+i);case\"[object Error]\":return s.name==i.name&&s.message==i.message;case\"[object RegExp]\":case\"[object String]\":return s==i+\"\";case\"[object Map]\":var Z=P;case\"[object Set]\":var ee=1&_;if(Z||(Z=B),s.size!=i.size&&!ee)return!1;var ie=X.get(s);if(ie)return ie==i;_|=2,X.set(s,i);var ae=j(Z(s),Z(i),_,$,Y,X);return X.delete(s),ae;case\"[object Symbol]\":if(U)return U.call(s)==U.call(i)}return!1}},50689:(s,i,u)=>{var _=u(50002),w=Object.prototype.hasOwnProperty;s.exports=function equalObjects(s,i,u,x,j,P){var B=1&u,$=_(s),U=$.length;if(U!=_(i).length&&!B)return!1;for(var Y=U;Y--;){var X=$[Y];if(!(B?X in i:w.call(i,X)))return!1}var Z=P.get(s),ee=P.get(i);if(Z&&ee)return Z==i&&ee==s;var ie=!0;P.set(s,i),P.set(i,s);for(var ae=B;++Y<U;){var le=s[X=$[Y]],ce=i[X];if(x)var pe=B?x(ce,le,X,i,s,P):x(le,ce,X,s,i,P);if(!(void 0===pe?le===ce||j(le,ce,u,x,P):pe)){ie=!1;break}ae||(ae=\"constructor\"==X)}if(ie&&!ae){var de=s.constructor,fe=i.constructor;de==fe||!(\"constructor\"in s)||!(\"constructor\"in i)||\"function\"==typeof de&&de instanceof de&&\"function\"==typeof fe&&fe instanceof fe||(ie=!1)}return P.delete(s),P.delete(i),ie}},38816:(s,i,u)=>{var _=u(35970),w=u(56757),x=u(32865);s.exports=function flatRest(s){return x(w(s,void 0,_),s+\"\")}},34840:(s,i,u)=>{var _=\"object\"==typeof u.g&&u.g&&u.g.Object===Object&&u.g;s.exports=_},50002:(s,i,u)=>{var _=u(82199),w=u(4664),x=u(95950);s.exports=function getAllKeys(s){return _(s,x,w)}},83349:(s,i,u)=>{var _=u(82199),w=u(86375),x=u(37241);s.exports=function getAllKeysIn(s){return _(s,x,w)}},37381:(s,i,u)=>{var _=u(48152),w=u(63950),x=_?function(s){return _.get(s)}:w;s.exports=x},62284:(s,i,u)=>{var _=u(84629),w=Object.prototype.hasOwnProperty;s.exports=function getFuncName(s){for(var i=s.name+\"\",u=_[i],x=w.call(_,i)?u.length:0;x--;){var j=u[x],P=j.func;if(null==P||P==s)return j.name}return i}},11287:s=>{s.exports=function getHolder(s){return s.placeholder}},12651:(s,i,u)=>{var _=u(74218);s.exports=function getMapData(s,i){var u=s.__data__;return _(i)?u[\"string\"==typeof i?\"string\":\"hash\"]:u.map}},10776:(s,i,u)=>{var _=u(30756),w=u(95950);s.exports=function getMatchData(s){for(var i=w(s),u=i.length;u--;){var x=i[u],j=s[x];i[u]=[x,j,_(j)]}return i}},56110:(s,i,u)=>{var _=u(45083),w=u(10392);s.exports=function getNative(s,i){var u=w(s,i);return _(u)?u:void 0}},28879:(s,i,u)=>{var _=u(74335)(Object.getPrototypeOf,Object);s.exports=_},659:(s,i,u)=>{var _=u(51873),w=Object.prototype,x=w.hasOwnProperty,j=w.toString,P=_?_.toStringTag:void 0;s.exports=function getRawTag(s){var i=x.call(s,P),u=s[P];try{s[P]=void 0;var _=!0}catch(s){}var w=j.call(s);return _&&(i?s[P]=u:delete s[P]),w}},4664:(s,i,u)=>{var _=u(79770),w=u(63345),x=Object.prototype.propertyIsEnumerable,j=Object.getOwnPropertySymbols,P=j?function(s){return null==s?[]:(s=Object(s),_(j(s),(function(i){return x.call(s,i)})))}:w;s.exports=P},86375:(s,i,u)=>{var _=u(14528),w=u(28879),x=u(4664),j=u(63345),P=Object.getOwnPropertySymbols?function(s){for(var i=[];s;)_(i,x(s)),s=w(s);return i}:j;s.exports=P},5861:(s,i,u)=>{var _=u(55580),w=u(68223),x=u(32804),j=u(76545),P=u(28303),B=u(72552),$=u(47473),U=\"[object Map]\",Y=\"[object Promise]\",X=\"[object Set]\",Z=\"[object WeakMap]\",ee=\"[object DataView]\",ie=$(_),ae=$(w),le=$(x),ce=$(j),pe=$(P),de=B;(_&&de(new _(new ArrayBuffer(1)))!=ee||w&&de(new w)!=U||x&&de(x.resolve())!=Y||j&&de(new j)!=X||P&&de(new P)!=Z)&&(de=function(s){var i=B(s),u=\"[object Object]\"==i?s.constructor:void 0,_=u?$(u):\"\";if(_)switch(_){case ie:return ee;case ae:return U;case le:return Y;case ce:return X;case pe:return Z}return i}),s.exports=de},10392:s=>{s.exports=function getValue(s,i){return null==s?void 0:s[i]}},75251:s=>{var i=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,u=/,? & /;s.exports=function getWrapDetails(s){var _=s.match(i);return _?_[1].split(u):[]}},49326:(s,i,u)=>{var _=u(31769),w=u(72428),x=u(56449),j=u(30361),P=u(30294),B=u(77797);s.exports=function hasPath(s,i,u){for(var $=-1,U=(i=_(i,s)).length,Y=!1;++$<U;){var X=B(i[$]);if(!(Y=null!=s&&u(s,X)))break;s=s[X]}return Y||++$!=U?Y:!!(U=null==s?0:s.length)&&P(U)&&j(X,U)&&(x(s)||w(s))}},49698:s=>{var i=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");s.exports=function hasUnicode(s){return i.test(s)}},45434:s=>{var i=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;s.exports=function hasUnicodeWord(s){return i.test(s)}},22032:(s,i,u)=>{var _=u(81042);s.exports=function hashClear(){this.__data__=_?_(null):{},this.size=0}},63862:s=>{s.exports=function hashDelete(s){var i=this.has(s)&&delete this.__data__[s];return this.size-=i?1:0,i}},66721:(s,i,u)=>{var _=u(81042),w=Object.prototype.hasOwnProperty;s.exports=function hashGet(s){var i=this.__data__;if(_){var u=i[s];return\"__lodash_hash_undefined__\"===u?void 0:u}return w.call(i,s)?i[s]:void 0}},12749:(s,i,u)=>{var _=u(81042),w=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var i=this.__data__;return _?void 0!==i[s]:w.call(i,s)}},35749:(s,i,u)=>{var _=u(81042);s.exports=function hashSet(s,i){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=_&&void 0===i?\"__lodash_hash_undefined__\":i,this}},76189:s=>{var i=Object.prototype.hasOwnProperty;s.exports=function initCloneArray(s){var u=s.length,_=new s.constructor(u);return u&&\"string\"==typeof s[0]&&i.call(s,\"index\")&&(_.index=s.index,_.input=s.input),_}},77199:(s,i,u)=>{var _=u(49653),w=u(76169),x=u(73201),j=u(93736),P=u(71961);s.exports=function initCloneByTag(s,i,u){var B=s.constructor;switch(i){case\"[object ArrayBuffer]\":return _(s);case\"[object Boolean]\":case\"[object Date]\":return new B(+s);case\"[object DataView]\":return w(s,u);case\"[object Float32Array]\":case\"[object Float64Array]\":case\"[object Int8Array]\":case\"[object Int16Array]\":case\"[object Int32Array]\":case\"[object Uint8Array]\":case\"[object Uint8ClampedArray]\":case\"[object Uint16Array]\":case\"[object Uint32Array]\":return P(s,u);case\"[object Map]\":case\"[object Set]\":return new B;case\"[object Number]\":case\"[object String]\":return new B(s);case\"[object RegExp]\":return x(s);case\"[object Symbol]\":return j(s)}}},35529:(s,i,u)=>{var _=u(39344),w=u(28879),x=u(55527);s.exports=function initCloneObject(s){return\"function\"!=typeof s.constructor||x(s)?{}:_(w(s))}},62060:s=>{var i=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;s.exports=function insertWrapDetails(s,u){var _=u.length;if(!_)return s;var w=_-1;return u[w]=(_>1?\"& \":\"\")+u[w],u=u.join(_>2?\", \":\" \"),s.replace(i,\"{\\n/* [wrapped with \"+u+\"] */\\n\")}},45891:(s,i,u)=>{var _=u(51873),w=u(72428),x=u(56449),j=_?_.isConcatSpreadable:void 0;s.exports=function isFlattenable(s){return x(s)||w(s)||!!(j&&s&&s[j])}},30361:s=>{var i=/^(?:0|[1-9]\\d*)$/;s.exports=function isIndex(s,u){var _=typeof s;return!!(u=null==u?9007199254740991:u)&&(\"number\"==_||\"symbol\"!=_&&i.test(s))&&s>-1&&s%1==0&&s<u}},36800:(s,i,u)=>{var _=u(75288),w=u(64894),x=u(30361),j=u(23805);s.exports=function isIterateeCall(s,i,u){if(!j(u))return!1;var P=typeof i;return!!(\"number\"==P?w(u)&&x(i,u.length):\"string\"==P&&i in u)&&_(u[i],s)}},28586:(s,i,u)=>{var _=u(56449),w=u(44394),x=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,j=/^\\w*$/;s.exports=function isKey(s,i){if(_(s))return!1;var u=typeof s;return!(\"number\"!=u&&\"symbol\"!=u&&\"boolean\"!=u&&null!=s&&!w(s))||(j.test(s)||!x.test(s)||null!=i&&s in Object(i))}},74218:s=>{s.exports=function isKeyable(s){var i=typeof s;return\"string\"==i||\"number\"==i||\"symbol\"==i||\"boolean\"==i?\"__proto__\"!==s:null===s}},85087:(s,i,u)=>{var _=u(30980),w=u(37381),x=u(62284),j=u(53758);s.exports=function isLaziable(s){var i=x(s),u=j[i];if(\"function\"!=typeof u||!(i in _.prototype))return!1;if(s===u)return!0;var P=w(u);return!!P&&s===P[0]}},87296:(s,i,u)=>{var _,w=u(55481),x=(_=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+_:\"\";s.exports=function isMasked(s){return!!x&&x in s}},55527:s=>{var i=Object.prototype;s.exports=function isPrototype(s){var u=s&&s.constructor;return s===(\"function\"==typeof u&&u.prototype||i)}},30756:(s,i,u)=>{var _=u(23805);s.exports=function isStrictComparable(s){return s==s&&!_(s)}},63702:s=>{s.exports=function listCacheClear(){this.__data__=[],this.size=0}},70080:(s,i,u)=>{var _=u(26025),w=Array.prototype.splice;s.exports=function listCacheDelete(s){var i=this.__data__,u=_(i,s);return!(u<0)&&(u==i.length-1?i.pop():w.call(i,u,1),--this.size,!0)}},24739:(s,i,u)=>{var _=u(26025);s.exports=function listCacheGet(s){var i=this.__data__,u=_(i,s);return u<0?void 0:i[u][1]}},48655:(s,i,u)=>{var _=u(26025);s.exports=function listCacheHas(s){return _(this.__data__,s)>-1}},31175:(s,i,u)=>{var _=u(26025);s.exports=function listCacheSet(s,i){var u=this.__data__,w=_(u,s);return w<0?(++this.size,u.push([s,i])):u[w][1]=i,this}},63040:(s,i,u)=>{var _=u(21549),w=u(80079),x=u(68223);s.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new _,map:new(x||w),string:new _}}},17670:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheDelete(s){var i=_(this,s).delete(s);return this.size-=i?1:0,i}},90289:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheGet(s){return _(this,s).get(s)}},4509:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheHas(s){return _(this,s).has(s)}},72949:(s,i,u)=>{var _=u(12651);s.exports=function mapCacheSet(s,i){var u=_(this,s),w=u.size;return u.set(s,i),this.size+=u.size==w?0:1,this}},20317:s=>{s.exports=function mapToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s,_){u[++i]=[_,s]})),u}},67197:s=>{s.exports=function matchesStrictComparable(s,i){return function(u){return null!=u&&(u[s]===i&&(void 0!==i||s in Object(u)))}}},62224:(s,i,u)=>{var _=u(50104);s.exports=function memoizeCapped(s){var i=_(s,(function(s){return 500===u.size&&u.clear(),s})),u=i.cache;return i}},3209:(s,i,u)=>{var _=u(91596),w=u(53320),x=u(36306),j=\"__lodash_placeholder__\",P=128,B=Math.min;s.exports=function mergeData(s,i){var u=s[1],$=i[1],U=u|$,Y=U<131,X=$==P&&8==u||$==P&&256==u&&s[7].length<=i[8]||384==$&&i[7].length<=i[8]&&8==u;if(!Y&&!X)return s;1&$&&(s[2]=i[2],U|=1&u?0:4);var Z=i[3];if(Z){var ee=s[3];s[3]=ee?_(ee,Z,i[4]):Z,s[4]=ee?x(s[3],j):i[4]}return(Z=i[5])&&(ee=s[5],s[5]=ee?w(ee,Z,i[6]):Z,s[6]=ee?x(s[5],j):i[6]),(Z=i[7])&&(s[7]=Z),$&P&&(s[8]=null==s[8]?i[8]:B(s[8],i[8])),null==s[9]&&(s[9]=i[9]),s[0]=i[0],s[1]=U,s}},48152:(s,i,u)=>{var _=u(28303),w=_&&new _;s.exports=w},81042:(s,i,u)=>{var _=u(56110)(Object,\"create\");s.exports=_},3650:(s,i,u)=>{var _=u(74335)(Object.keys,Object);s.exports=_},90181:s=>{s.exports=function nativeKeysIn(s){var i=[];if(null!=s)for(var u in Object(s))i.push(u);return i}},86009:(s,i,u)=>{s=u.nmd(s);var _=u(34840),w=i&&!i.nodeType&&i,x=w&&s&&!s.nodeType&&s,j=x&&x.exports===w&&_.process,P=function(){try{var s=x&&x.require&&x.require(\"util\").types;return s||j&&j.binding&&j.binding(\"util\")}catch(s){}}();s.exports=P},59350:s=>{var i=Object.prototype.toString;s.exports=function objectToString(s){return i.call(s)}},74335:s=>{s.exports=function overArg(s,i){return function(u){return s(i(u))}}},56757:(s,i,u)=>{var _=u(91033),w=Math.max;s.exports=function overRest(s,i,u){return i=w(void 0===i?s.length-1:i,0),function(){for(var x=arguments,j=-1,P=w(x.length-i,0),B=Array(P);++j<P;)B[j]=x[i+j];j=-1;for(var $=Array(i+1);++j<i;)$[j]=x[j];return $[i]=u(B),_(s,this,$)}}},68969:(s,i,u)=>{var _=u(47422),w=u(25160);s.exports=function parent(s,i){return i.length<2?s:_(s,w(i,0,-1))}},84629:s=>{s.exports={}},68294:(s,i,u)=>{var _=u(23007),w=u(30361),x=Math.min;s.exports=function reorder(s,i){for(var u=s.length,j=x(i.length,u),P=_(s);j--;){var B=i[j];s[j]=w(B,u)?P[B]:void 0}return s}},36306:s=>{var i=\"__lodash_placeholder__\";s.exports=function replaceHolders(s,u){for(var _=-1,w=s.length,x=0,j=[];++_<w;){var P=s[_];P!==u&&P!==i||(s[_]=i,j[x++]=_)}return j}},9325:(s,i,u)=>{var _=u(34840),w=\"object\"==typeof self&&self&&self.Object===Object&&self,x=_||w||Function(\"return this\")();s.exports=x},14974:s=>{s.exports=function safeGet(s,i){if((\"constructor\"!==i||\"function\"!=typeof s[i])&&\"__proto__\"!=i)return s[i]}},31380:s=>{s.exports=function setCacheAdd(s){return this.__data__.set(s,\"__lodash_hash_undefined__\"),this}},51459:s=>{s.exports=function setCacheHas(s){return this.__data__.has(s)}},54641:(s,i,u)=>{var _=u(68882),w=u(51811)(_);s.exports=w},84247:s=>{s.exports=function setToArray(s){var i=-1,u=Array(s.size);return s.forEach((function(s){u[++i]=s})),u}},32865:(s,i,u)=>{var _=u(19570),w=u(51811)(_);s.exports=w},70981:(s,i,u)=>{var _=u(75251),w=u(62060),x=u(32865),j=u(75948);s.exports=function setWrapToString(s,i,u){var P=i+\"\";return x(s,w(P,j(_(P),u)))}},51811:s=>{var i=Date.now;s.exports=function shortOut(s){var u=0,_=0;return function(){var w=i(),x=16-(w-_);if(_=w,x>0){if(++u>=800)return arguments[0]}else u=0;return s.apply(void 0,arguments)}}},51420:(s,i,u)=>{var _=u(80079);s.exports=function stackClear(){this.__data__=new _,this.size=0}},90938:s=>{s.exports=function stackDelete(s){var i=this.__data__,u=i.delete(s);return this.size=i.size,u}},63605:s=>{s.exports=function stackGet(s){return this.__data__.get(s)}},29817:s=>{s.exports=function stackHas(s){return this.__data__.has(s)}},80945:(s,i,u)=>{var _=u(80079),w=u(68223),x=u(53661);s.exports=function stackSet(s,i){var u=this.__data__;if(u instanceof _){var j=u.__data__;if(!w||j.length<199)return j.push([s,i]),this.size=++u.size,this;u=this.__data__=new x(j)}return u.set(s,i),this.size=u.size,this}},76959:s=>{s.exports=function strictIndexOf(s,i,u){for(var _=u-1,w=s.length;++_<w;)if(s[_]===i)return _;return-1}},63912:(s,i,u)=>{var _=u(61074),w=u(49698),x=u(42054);s.exports=function stringToArray(s){return w(s)?x(s):_(s)}},61802:(s,i,u)=>{var _=u(62224),w=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,x=/\\\\(\\\\)?/g,j=_((function(s){var i=[];return 46===s.charCodeAt(0)&&i.push(\"\"),s.replace(w,(function(s,u,_,w){i.push(_?w.replace(x,\"$1\"):u||s)})),i}));s.exports=j},77797:(s,i,u)=>{var _=u(44394);s.exports=function toKey(s){if(\"string\"==typeof s||_(s))return s;var i=s+\"\";return\"0\"==i&&1/s==-Infinity?\"-0\":i}},47473:s=>{var i=Function.prototype.toString;s.exports=function toSource(s){if(null!=s){try{return i.call(s)}catch(s){}try{return s+\"\"}catch(s){}}return\"\"}},31800:s=>{var i=/\\s/;s.exports=function trimmedEndIndex(s){for(var u=s.length;u--&&i.test(s.charAt(u)););return u}},42054:s=>{var i=\"\\\\ud800-\\\\udfff\",u=\"[\"+i+\"]\",_=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",w=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",x=\"[^\"+i+\"]\",j=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",P=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",B=\"(?:\"+_+\"|\"+w+\")\"+\"?\",$=\"[\\\\ufe0e\\\\ufe0f]?\",U=$+B+(\"(?:\\\\u200d(?:\"+[x,j,P].join(\"|\")+\")\"+$+B+\")*\"),Y=\"(?:\"+[x+_+\"?\",_,j,P,u].join(\"|\")+\")\",X=RegExp(w+\"(?=\"+w+\")|\"+Y+U,\"g\");s.exports=function unicodeToArray(s){return s.match(X)||[]}},22225:s=>{var i=\"\\\\ud800-\\\\udfff\",u=\"\\\\u2700-\\\\u27bf\",_=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",w=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",x=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",j=\"[\"+x+\"]\",P=\"\\\\d+\",B=\"[\"+u+\"]\",$=\"[\"+_+\"]\",U=\"[^\"+i+x+P+u+_+w+\"]\",Y=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",X=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",Z=\"[\"+w+\"]\",ee=\"(?:\"+$+\"|\"+U+\")\",ie=\"(?:\"+Z+\"|\"+U+\")\",ae=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",le=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",ce=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",pe=\"[\\\\ufe0e\\\\ufe0f]?\",de=pe+ce+(\"(?:\\\\u200d(?:\"+[\"[^\"+i+\"]\",Y,X].join(\"|\")+\")\"+pe+ce+\")*\"),fe=\"(?:\"+[B,Y,X].join(\"|\")+\")\"+de,ye=RegExp([Z+\"?\"+$+\"+\"+ae+\"(?=\"+[j,Z,\"$\"].join(\"|\")+\")\",ie+\"+\"+le+\"(?=\"+[j,Z+ee,\"$\"].join(\"|\")+\")\",Z+\"?\"+ee+\"+\"+ae,Z+\"+\"+le,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",P,fe].join(\"|\"),\"g\");s.exports=function unicodeWords(s){return s.match(ye)||[]}},75948:(s,i,u)=>{var _=u(83729),w=u(15325),x=[[\"ary\",128],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",32],[\"partialRight\",64],[\"rearg\",256]];s.exports=function updateWrapDetails(s,i){return _(x,(function(u){var _=\"_.\"+u[0];i&u[1]&&!w(s,_)&&s.push(_)})),s.sort()}},80257:(s,i,u)=>{var _=u(30980),w=u(56017),x=u(23007);s.exports=function wrapperClone(s){if(s instanceof _)return s.clone();var i=new w(s.__wrapped__,s.__chain__);return i.__actions__=x(s.__actions__),i.__index__=s.__index__,i.__values__=s.__values__,i}},64626:(s,i,u)=>{var _=u(66977);s.exports=function ary(s,i,u){return i=u?void 0:i,i=s&&null==i?s.length:i,_(s,128,void 0,void 0,void 0,void 0,i)}},84058:(s,i,u)=>{var _=u(14792),w=u(45539)((function(s,i,u){return i=i.toLowerCase(),s+(u?_(i):i)}));s.exports=w},14792:(s,i,u)=>{var _=u(13222),w=u(55808);s.exports=function capitalize(s){return w(_(s).toLowerCase())}},32629:(s,i,u)=>{var _=u(9999);s.exports=function clone(s){return _(s,4)}},37334:s=>{s.exports=function constant(s){return function(){return s}}},49747:(s,i,u)=>{var _=u(66977);function curry(s,i,u){var w=_(s,8,void 0,void 0,void 0,void 0,void 0,i=u?void 0:i);return w.placeholder=curry.placeholder,w}curry.placeholder={},s.exports=curry},38221:(s,i,u)=>{var _=u(23805),w=u(10124),x=u(99374),j=Math.max,P=Math.min;s.exports=function debounce(s,i,u){var B,$,U,Y,X,Z,ee=0,ie=!1,ae=!1,le=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(i){var u=B,_=$;return B=$=void 0,ee=i,Y=s.apply(_,u)}function shouldInvoke(s){var u=s-Z;return void 0===Z||u>=i||u<0||ae&&s-ee>=U}function timerExpired(){var s=w();if(shouldInvoke(s))return trailingEdge(s);X=setTimeout(timerExpired,function remainingWait(s){var u=i-(s-Z);return ae?P(u,U-(s-ee)):u}(s))}function trailingEdge(s){return X=void 0,le&&B?invokeFunc(s):(B=$=void 0,Y)}function debounced(){var s=w(),u=shouldInvoke(s);if(B=arguments,$=this,Z=s,u){if(void 0===X)return function leadingEdge(s){return ee=s,X=setTimeout(timerExpired,i),ie?invokeFunc(s):Y}(Z);if(ae)return clearTimeout(X),X=setTimeout(timerExpired,i),invokeFunc(Z)}return void 0===X&&(X=setTimeout(timerExpired,i)),Y}return i=x(i)||0,_(u)&&(ie=!!u.leading,U=(ae=\"maxWait\"in u)?j(x(u.maxWait)||0,i):U,le=\"trailing\"in u?!!u.trailing:le),debounced.cancel=function cancel(){void 0!==X&&clearTimeout(X),ee=0,B=Z=$=X=void 0},debounced.flush=function flush(){return void 0===X?Y:trailingEdge(w())},debounced}},50828:(s,i,u)=>{var _=u(24647),w=u(13222),x=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,j=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");s.exports=function deburr(s){return(s=w(s))&&s.replace(x,_).replace(j,\"\")}},75288:s=>{s.exports=function eq(s,i){return s===i||s!=s&&i!=i}},60680:(s,i,u)=>{var _=u(13222),w=/[\\\\^$.*+?()[\\]{}|]/g,x=RegExp(w.source);s.exports=function escapeRegExp(s){return(s=_(s))&&x.test(s)?s.replace(w,\"\\\\$&\"):s}},7309:(s,i,u)=>{var _=u(62006)(u(24713));s.exports=_},24713:(s,i,u)=>{var _=u(2523),w=u(15389),x=u(61489),j=Math.max;s.exports=function findIndex(s,i,u){var P=null==s?0:s.length;if(!P)return-1;var B=null==u?0:x(u);return B<0&&(B=j(P+B,0)),_(s,w(i,3),B)}},35970:(s,i,u)=>{var _=u(83120);s.exports=function flatten(s){return(null==s?0:s.length)?_(s,1):[]}},73424:(s,i,u)=>{var _=u(16962),w=u(2874),x=Array.prototype.push;function baseAry(s,i){return 2==i?function(i,u){return s(i,u)}:function(i){return s(i)}}function cloneArray(s){for(var i=s?s.length:0,u=Array(i);i--;)u[i]=s[i];return u}function wrapImmutable(s,i){return function(){var u=arguments.length;if(u){for(var _=Array(u);u--;)_[u]=arguments[u];var w=_[0]=i.apply(void 0,_);return s.apply(void 0,_),w}}}s.exports=function baseConvert(s,i,u,j){var P=\"function\"==typeof i,B=i===Object(i);if(B&&(j=u,u=i,i=void 0),null==u)throw new TypeError;j||(j={});var $={cap:!(\"cap\"in j)||j.cap,curry:!(\"curry\"in j)||j.curry,fixed:!(\"fixed\"in j)||j.fixed,immutable:!(\"immutable\"in j)||j.immutable,rearg:!(\"rearg\"in j)||j.rearg},U=P?u:w,Y=\"curry\"in j&&j.curry,X=\"fixed\"in j&&j.fixed,Z=\"rearg\"in j&&j.rearg,ee=P?u.runInContext():void 0,ie=P?u:{ary:s.ary,assign:s.assign,clone:s.clone,curry:s.curry,forEach:s.forEach,isArray:s.isArray,isError:s.isError,isFunction:s.isFunction,isWeakMap:s.isWeakMap,iteratee:s.iteratee,keys:s.keys,rearg:s.rearg,toInteger:s.toInteger,toPath:s.toPath},ae=ie.ary,le=ie.assign,ce=ie.clone,pe=ie.curry,de=ie.forEach,fe=ie.isArray,ye=ie.isError,be=ie.isFunction,_e=ie.isWeakMap,we=ie.keys,Se=ie.rearg,xe=ie.toInteger,Pe=ie.toPath,Te=we(_.aryMethod),Re={castArray:function(s){return function(){var i=arguments[0];return fe(i)?s(cloneArray(i)):s.apply(void 0,arguments)}},iteratee:function(s){return function(){var i=arguments[1],u=s(arguments[0],i),_=u.length;return $.cap&&\"number\"==typeof i?(i=i>2?i-2:1,_&&_<=i?u:baseAry(u,i)):u}},mixin:function(s){return function(i){var u=this;if(!be(u))return s(u,Object(i));var _=[];return de(we(i),(function(s){be(i[s])&&_.push([s,u.prototype[s]])})),s(u,Object(i)),de(_,(function(s){var i=s[1];be(i)?u.prototype[s[0]]=i:delete u.prototype[s[0]]})),u}},nthArg:function(s){return function(i){var u=i<0?1:xe(i)+1;return pe(s(i),u)}},rearg:function(s){return function(i,u){var _=u?u.length:0;return pe(s(i,u),_)}},runInContext:function(i){return function(u){return baseConvert(s,i(u),j)}}};function castCap(s,i){if($.cap){var u=_.iterateeRearg[s];if(u)return function iterateeRearg(s,i){return overArg(s,(function(s){var u=i.length;return function baseArity(s,i){return 2==i?function(i,u){return s.apply(void 0,arguments)}:function(i){return s.apply(void 0,arguments)}}(Se(baseAry(s,u),i),u)}))}(i,u);var w=!P&&_.iterateeAry[s];if(w)return function iterateeAry(s,i){return overArg(s,(function(s){return\"function\"==typeof s?baseAry(s,i):s}))}(i,w)}return i}function castFixed(s,i,u){if($.fixed&&(X||!_.skipFixed[s])){var w=_.methodSpread[s],j=w&&w.start;return void 0===j?ae(i,u):function flatSpread(s,i){return function(){for(var u=arguments.length,_=u-1,w=Array(u);u--;)w[u]=arguments[u];var j=w[i],P=w.slice(0,i);return j&&x.apply(P,j),i!=_&&x.apply(P,w.slice(i+1)),s.apply(this,P)}}(i,j)}return i}function castRearg(s,i,u){return $.rearg&&u>1&&(Z||!_.skipRearg[s])?Se(i,_.methodRearg[s]||_.aryRearg[u]):i}function cloneByPath(s,i){for(var u=-1,_=(i=Pe(i)).length,w=_-1,x=ce(Object(s)),j=x;null!=j&&++u<_;){var P=i[u],B=j[P];null==B||be(B)||ye(B)||_e(B)||(j[P]=ce(u==w?B:Object(B))),j=j[P]}return x}function createConverter(s,i){var u=_.aliasToReal[s]||s,w=_.remap[u]||u,x=j;return function(s){var _=P?ee:ie,j=P?ee[w]:i,B=le(le({},x),s);return baseConvert(_,u,j,B)}}function overArg(s,i){return function(){var u=arguments.length;if(!u)return s();for(var _=Array(u);u--;)_[u]=arguments[u];var w=$.rearg?0:u-1;return _[w]=i(_[w]),s.apply(void 0,_)}}function wrap(s,i,u){var w,x=_.aliasToReal[s]||s,j=i,P=Re[x];return P?j=P(i):$.immutable&&(_.mutate.array[x]?j=wrapImmutable(i,cloneArray):_.mutate.object[x]?j=wrapImmutable(i,function createCloner(s){return function(i){return s({},i)}}(i)):_.mutate.set[x]&&(j=wrapImmutable(i,cloneByPath))),de(Te,(function(s){return de(_.aryMethod[s],(function(i){if(x==i){var u=_.methodSpread[x],P=u&&u.afterRearg;return w=P?castFixed(x,castRearg(x,j,s),s):castRearg(x,castFixed(x,j,s),s),w=function castCurry(s,i,u){return Y||$.curry&&u>1?pe(i,u):i}(0,w=castCap(x,w),s),!1}})),!w})),w||(w=j),w==i&&(w=Y?pe(w,1):function(){return i.apply(this,arguments)}),w.convert=createConverter(x,i),w.placeholder=i.placeholder=u,w}if(!B)return wrap(i,u,U);var qe=u,$e=[];return de(Te,(function(s){de(_.aryMethod[s],(function(s){var i=qe[_.remap[s]||s];i&&$e.push([s,wrap(s,i,qe)])}))})),de(we(qe),(function(s){var i=qe[s];if(\"function\"==typeof i){for(var u=$e.length;u--;)if($e[u][0]==s)return;i.convert=createConverter(s,i),$e.push([s,i])}})),de($e,(function(s){qe[s[0]]=s[1]})),qe.convert=function convertLib(s){return qe.runInContext.convert(s)(void 0)},qe.placeholder=qe,de(we(qe),(function(s){de(_.realToAlias[s]||[],(function(i){qe[i]=qe[s]}))})),qe}},16962:(s,i)=>{i.aliasToReal={each:\"forEach\",eachRight:\"forEachRight\",entries:\"toPairs\",entriesIn:\"toPairsIn\",extend:\"assignIn\",extendAll:\"assignInAll\",extendAllWith:\"assignInAllWith\",extendWith:\"assignInWith\",first:\"head\",conforms:\"conformsTo\",matches:\"isMatch\",property:\"get\",__:\"placeholder\",F:\"stubFalse\",T:\"stubTrue\",all:\"every\",allPass:\"overEvery\",always:\"constant\",any:\"some\",anyPass:\"overSome\",apply:\"spread\",assoc:\"set\",assocPath:\"set\",complement:\"negate\",compose:\"flowRight\",contains:\"includes\",dissoc:\"unset\",dissocPath:\"unset\",dropLast:\"dropRight\",dropLastWhile:\"dropRightWhile\",equals:\"isEqual\",identical:\"eq\",indexBy:\"keyBy\",init:\"initial\",invertObj:\"invert\",juxt:\"over\",omitAll:\"omit\",nAry:\"ary\",path:\"get\",pathEq:\"matchesProperty\",pathOr:\"getOr\",paths:\"at\",pickAll:\"pick\",pipe:\"flow\",pluck:\"map\",prop:\"get\",propEq:\"matchesProperty\",propOr:\"getOr\",props:\"at\",symmetricDifference:\"xor\",symmetricDifferenceBy:\"xorBy\",symmetricDifferenceWith:\"xorWith\",takeLast:\"takeRight\",takeLastWhile:\"takeRightWhile\",unapply:\"rest\",unnest:\"flatten\",useWith:\"overArgs\",where:\"conformsTo\",whereEq:\"isMatch\",zipObj:\"zipObject\"},i.aryMethod={1:[\"assignAll\",\"assignInAll\",\"attempt\",\"castArray\",\"ceil\",\"create\",\"curry\",\"curryRight\",\"defaultsAll\",\"defaultsDeepAll\",\"floor\",\"flow\",\"flowRight\",\"fromPairs\",\"invert\",\"iteratee\",\"memoize\",\"method\",\"mergeAll\",\"methodOf\",\"mixin\",\"nthArg\",\"over\",\"overEvery\",\"overSome\",\"rest\",\"reverse\",\"round\",\"runInContext\",\"spread\",\"template\",\"trim\",\"trimEnd\",\"trimStart\",\"uniqueId\",\"words\",\"zipAll\"],2:[\"add\",\"after\",\"ary\",\"assign\",\"assignAllWith\",\"assignIn\",\"assignInAllWith\",\"at\",\"before\",\"bind\",\"bindAll\",\"bindKey\",\"chunk\",\"cloneDeepWith\",\"cloneWith\",\"concat\",\"conformsTo\",\"countBy\",\"curryN\",\"curryRightN\",\"debounce\",\"defaults\",\"defaultsDeep\",\"defaultTo\",\"delay\",\"difference\",\"divide\",\"drop\",\"dropRight\",\"dropRightWhile\",\"dropWhile\",\"endsWith\",\"eq\",\"every\",\"filter\",\"find\",\"findIndex\",\"findKey\",\"findLast\",\"findLastIndex\",\"findLastKey\",\"flatMap\",\"flatMapDeep\",\"flattenDepth\",\"forEach\",\"forEachRight\",\"forIn\",\"forInRight\",\"forOwn\",\"forOwnRight\",\"get\",\"groupBy\",\"gt\",\"gte\",\"has\",\"hasIn\",\"includes\",\"indexOf\",\"intersection\",\"invertBy\",\"invoke\",\"invokeMap\",\"isEqual\",\"isMatch\",\"join\",\"keyBy\",\"lastIndexOf\",\"lt\",\"lte\",\"map\",\"mapKeys\",\"mapValues\",\"matchesProperty\",\"maxBy\",\"meanBy\",\"merge\",\"mergeAllWith\",\"minBy\",\"multiply\",\"nth\",\"omit\",\"omitBy\",\"overArgs\",\"pad\",\"padEnd\",\"padStart\",\"parseInt\",\"partial\",\"partialRight\",\"partition\",\"pick\",\"pickBy\",\"propertyOf\",\"pull\",\"pullAll\",\"pullAt\",\"random\",\"range\",\"rangeRight\",\"rearg\",\"reject\",\"remove\",\"repeat\",\"restFrom\",\"result\",\"sampleSize\",\"some\",\"sortBy\",\"sortedIndex\",\"sortedIndexOf\",\"sortedLastIndex\",\"sortedLastIndexOf\",\"sortedUniqBy\",\"split\",\"spreadFrom\",\"startsWith\",\"subtract\",\"sumBy\",\"take\",\"takeRight\",\"takeRightWhile\",\"takeWhile\",\"tap\",\"throttle\",\"thru\",\"times\",\"trimChars\",\"trimCharsEnd\",\"trimCharsStart\",\"truncate\",\"union\",\"uniqBy\",\"uniqWith\",\"unset\",\"unzipWith\",\"without\",\"wrap\",\"xor\",\"zip\",\"zipObject\",\"zipObjectDeep\"],3:[\"assignInWith\",\"assignWith\",\"clamp\",\"differenceBy\",\"differenceWith\",\"findFrom\",\"findIndexFrom\",\"findLastFrom\",\"findLastIndexFrom\",\"getOr\",\"includesFrom\",\"indexOfFrom\",\"inRange\",\"intersectionBy\",\"intersectionWith\",\"invokeArgs\",\"invokeArgsMap\",\"isEqualWith\",\"isMatchWith\",\"flatMapDepth\",\"lastIndexOfFrom\",\"mergeWith\",\"orderBy\",\"padChars\",\"padCharsEnd\",\"padCharsStart\",\"pullAllBy\",\"pullAllWith\",\"rangeStep\",\"rangeStepRight\",\"reduce\",\"reduceRight\",\"replace\",\"set\",\"slice\",\"sortedIndexBy\",\"sortedLastIndexBy\",\"transform\",\"unionBy\",\"unionWith\",\"update\",\"xorBy\",\"xorWith\",\"zipWith\"],4:[\"fill\",\"setWith\",\"updateWith\"]},i.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},i.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},i.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},i.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},i.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},i.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},i.realToAlias=function(){var s=Object.prototype.hasOwnProperty,u=i.aliasToReal,_={};for(var w in u){var x=u[w];s.call(_,x)?_[x].push(w):_[x]=[w]}return _}(),i.remap={assignAll:\"assign\",assignAllWith:\"assignWith\",assignInAll:\"assignIn\",assignInAllWith:\"assignInWith\",curryN:\"curry\",curryRightN:\"curryRight\",defaultsAll:\"defaults\",defaultsDeepAll:\"defaultsDeep\",findFrom:\"find\",findIndexFrom:\"findIndex\",findLastFrom:\"findLast\",findLastIndexFrom:\"findLastIndex\",getOr:\"get\",includesFrom:\"includes\",indexOfFrom:\"indexOf\",invokeArgs:\"invoke\",invokeArgsMap:\"invokeMap\",lastIndexOfFrom:\"lastIndexOf\",mergeAll:\"merge\",mergeAllWith:\"mergeWith\",padChars:\"pad\",padCharsEnd:\"padEnd\",padCharsStart:\"padStart\",propertyOf:\"get\",rangeStep:\"range\",rangeStepRight:\"rangeRight\",restFrom:\"rest\",spreadFrom:\"spread\",trimChars:\"trim\",trimCharsEnd:\"trimEnd\",trimCharsStart:\"trimStart\",zipAll:\"zip\"},i.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},i.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},47934:(s,i,u)=>{s.exports={ary:u(64626),assign:u(74733),clone:u(32629),curry:u(49747),forEach:u(83729),isArray:u(56449),isError:u(23546),isFunction:u(1882),isWeakMap:u(47886),iteratee:u(33855),keys:u(88984),rearg:u(84195),toInteger:u(61489),toPath:u(42072)}},56367:(s,i,u)=>{s.exports=u(77731)},79920:(s,i,u)=>{var _=u(73424),w=u(47934);s.exports=function convert(s,i,u){return _(w,s,i,u)}},2874:s=>{s.exports={}},77731:(s,i,u)=>{var _=u(79920)(\"set\",u(63560));_.placeholder=u(2874),s.exports=_},58156:(s,i,u)=>{var _=u(47422);s.exports=function get(s,i,u){var w=null==s?void 0:_(s,i);return void 0===w?u:w}},80631:(s,i,u)=>{var _=u(28077),w=u(49326);s.exports=function hasIn(s,i){return null!=s&&w(s,i,_)}},83488:s=>{s.exports=function identity(s){return s}},72428:(s,i,u)=>{var _=u(27534),w=u(40346),x=Object.prototype,j=x.hasOwnProperty,P=x.propertyIsEnumerable,B=_(function(){return arguments}())?_:function(s){return w(s)&&j.call(s,\"callee\")&&!P.call(s,\"callee\")};s.exports=B},56449:s=>{var i=Array.isArray;s.exports=i},64894:(s,i,u)=>{var _=u(1882),w=u(30294);s.exports=function isArrayLike(s){return null!=s&&w(s.length)&&!_(s)}},83693:(s,i,u)=>{var _=u(64894),w=u(40346);s.exports=function isArrayLikeObject(s){return w(s)&&_(s)}},53812:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isBoolean(s){return!0===s||!1===s||w(s)&&\"[object Boolean]\"==_(s)}},3656:(s,i,u)=>{s=u.nmd(s);var _=u(9325),w=u(89935),x=i&&!i.nodeType&&i,j=x&&s&&!s.nodeType&&s,P=j&&j.exports===x?_.Buffer:void 0,B=(P?P.isBuffer:void 0)||w;s.exports=B},62193:(s,i,u)=>{var _=u(88984),w=u(5861),x=u(72428),j=u(56449),P=u(64894),B=u(3656),$=u(55527),U=u(37167),Y=Object.prototype.hasOwnProperty;s.exports=function isEmpty(s){if(null==s)return!0;if(P(s)&&(j(s)||\"string\"==typeof s||\"function\"==typeof s.splice||B(s)||U(s)||x(s)))return!s.length;var i=w(s);if(\"[object Map]\"==i||\"[object Set]\"==i)return!s.size;if($(s))return!_(s).length;for(var u in s)if(Y.call(s,u))return!1;return!0}},2404:(s,i,u)=>{var _=u(60270);s.exports=function isEqual(s,i){return _(s,i)}},23546:(s,i,u)=>{var _=u(72552),w=u(40346),x=u(11331);s.exports=function isError(s){if(!w(s))return!1;var i=_(s);return\"[object Error]\"==i||\"[object DOMException]\"==i||\"string\"==typeof s.message&&\"string\"==typeof s.name&&!x(s)}},1882:(s,i,u)=>{var _=u(72552),w=u(23805);s.exports=function isFunction(s){if(!w(s))return!1;var i=_(s);return\"[object Function]\"==i||\"[object GeneratorFunction]\"==i||\"[object AsyncFunction]\"==i||\"[object Proxy]\"==i}},30294:s=>{s.exports=function isLength(s){return\"number\"==typeof s&&s>-1&&s%1==0&&s<=9007199254740991}},87730:(s,i,u)=>{var _=u(29172),w=u(27301),x=u(86009),j=x&&x.isMap,P=j?w(j):_;s.exports=P},5187:s=>{s.exports=function isNull(s){return null===s}},98023:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isNumber(s){return\"number\"==typeof s||w(s)&&\"[object Number]\"==_(s)}},23805:s=>{s.exports=function isObject(s){var i=typeof s;return null!=s&&(\"object\"==i||\"function\"==i)}},40346:s=>{s.exports=function isObjectLike(s){return null!=s&&\"object\"==typeof s}},11331:(s,i,u)=>{var _=u(72552),w=u(28879),x=u(40346),j=Function.prototype,P=Object.prototype,B=j.toString,$=P.hasOwnProperty,U=B.call(Object);s.exports=function isPlainObject(s){if(!x(s)||\"[object Object]\"!=_(s))return!1;var i=w(s);if(null===i)return!0;var u=$.call(i,\"constructor\")&&i.constructor;return\"function\"==typeof u&&u instanceof u&&B.call(u)==U}},38440:(s,i,u)=>{var _=u(16038),w=u(27301),x=u(86009),j=x&&x.isSet,P=j?w(j):_;s.exports=P},85015:(s,i,u)=>{var _=u(72552),w=u(56449),x=u(40346);s.exports=function isString(s){return\"string\"==typeof s||!w(s)&&x(s)&&\"[object String]\"==_(s)}},44394:(s,i,u)=>{var _=u(72552),w=u(40346);s.exports=function isSymbol(s){return\"symbol\"==typeof s||w(s)&&\"[object Symbol]\"==_(s)}},37167:(s,i,u)=>{var _=u(4901),w=u(27301),x=u(86009),j=x&&x.isTypedArray,P=j?w(j):_;s.exports=P},47886:(s,i,u)=>{var _=u(5861),w=u(40346);s.exports=function isWeakMap(s){return w(s)&&\"[object WeakMap]\"==_(s)}},33855:(s,i,u)=>{var _=u(9999),w=u(15389);s.exports=function iteratee(s){return w(\"function\"==typeof s?s:_(s,1))}},95950:(s,i,u)=>{var _=u(70695),w=u(88984),x=u(64894);s.exports=function keys(s){return x(s)?_(s):w(s)}},37241:(s,i,u)=>{var _=u(70695),w=u(72903),x=u(64894);s.exports=function keysIn(s){return x(s)?_(s,!0):w(s)}},68090:s=>{s.exports=function last(s){var i=null==s?0:s.length;return i?s[i-1]:void 0}},50104:(s,i,u)=>{var _=u(53661);function memoize(s,i){if(\"function\"!=typeof s||null!=i&&\"function\"!=typeof i)throw new TypeError(\"Expected a function\");var memoized=function(){var u=arguments,_=i?i.apply(this,u):u[0],w=memoized.cache;if(w.has(_))return w.get(_);var x=s.apply(this,u);return memoized.cache=w.set(_,x)||w,x};return memoized.cache=new(memoize.Cache||_),memoized}memoize.Cache=_,s.exports=memoize},55364:(s,i,u)=>{var _=u(85250),w=u(20999)((function(s,i,u){_(s,i,u)}));s.exports=w},6048:s=>{s.exports=function negate(s){if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");return function(){var i=arguments;switch(i.length){case 0:return!s.call(this);case 1:return!s.call(this,i[0]);case 2:return!s.call(this,i[0],i[1]);case 3:return!s.call(this,i[0],i[1],i[2])}return!s.apply(this,i)}}},63950:s=>{s.exports=function noop(){}},10124:(s,i,u)=>{var _=u(9325);s.exports=function(){return _.Date.now()}},90179:(s,i,u)=>{var _=u(34932),w=u(9999),x=u(19931),j=u(31769),P=u(21791),B=u(53138),$=u(38816),U=u(83349),Y=$((function(s,i){var u={};if(null==s)return u;var $=!1;i=_(i,(function(i){return i=j(i,s),$||($=i.length>1),i})),P(s,U(s),u),$&&(u=w(u,7,B));for(var Y=i.length;Y--;)x(u,i[Y]);return u}));s.exports=Y},50583:(s,i,u)=>{var _=u(47237),w=u(17255),x=u(28586),j=u(77797);s.exports=function property(s){return x(s)?_(j(s)):w(s)}},84195:(s,i,u)=>{var _=u(66977),w=u(38816),x=w((function(s,i){return _(s,256,void 0,void 0,void 0,i)}));s.exports=x},40860:(s,i,u)=>{var _=u(40882),w=u(80909),x=u(15389),j=u(85558),P=u(56449);s.exports=function reduce(s,i,u){var B=P(s)?_:j,$=arguments.length<3;return B(s,x(i,4),u,$,w)}},63560:(s,i,u)=>{var _=u(73170);s.exports=function set(s,i,u){return null==s?s:_(s,i,u)}},42426:(s,i,u)=>{var _=u(14248),w=u(15389),x=u(90916),j=u(56449),P=u(36800);s.exports=function some(s,i,u){var B=j(s)?_:x;return u&&P(s,i,u)&&(i=void 0),B(s,w(i,3))}},63345:s=>{s.exports=function stubArray(){return[]}},89935:s=>{s.exports=function stubFalse(){return!1}},17400:(s,i,u)=>{var _=u(99374),w=1/0;s.exports=function toFinite(s){return s?(s=_(s))===w||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},61489:(s,i,u)=>{var _=u(17400);s.exports=function toInteger(s){var i=_(s),u=i%1;return i==i?u?i-u:i:0}},80218:(s,i,u)=>{var _=u(13222);s.exports=function toLower(s){return _(s).toLowerCase()}},99374:(s,i,u)=>{var _=u(54128),w=u(23805),x=u(44394),j=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,B=/^0o[0-7]+$/i,$=parseInt;s.exports=function toNumber(s){if(\"number\"==typeof s)return s;if(x(s))return NaN;if(w(s)){var i=\"function\"==typeof s.valueOf?s.valueOf():s;s=w(i)?i+\"\":i}if(\"string\"!=typeof s)return 0===s?s:+s;s=_(s);var u=P.test(s);return u||B.test(s)?$(s.slice(2),u?2:8):j.test(s)?NaN:+s}},42072:(s,i,u)=>{var _=u(34932),w=u(23007),x=u(56449),j=u(44394),P=u(61802),B=u(77797),$=u(13222);s.exports=function toPath(s){return x(s)?_(s,B):j(s)?[s]:w(P($(s)))}},69884:(s,i,u)=>{var _=u(21791),w=u(37241);s.exports=function toPlainObject(s){return _(s,w(s))}},13222:(s,i,u)=>{var _=u(77556);s.exports=function toString(s){return null==s?\"\":_(s)}},55808:(s,i,u)=>{var _=u(12507)(\"toUpperCase\");s.exports=_},66645:(s,i,u)=>{var _=u(1733),w=u(45434),x=u(13222),j=u(22225);s.exports=function words(s,i,u){return s=x(s),void 0===(i=u?void 0:i)?w(s)?j(s):_(s):s.match(i)||[]}},53758:(s,i,u)=>{var _=u(30980),w=u(56017),x=u(94033),j=u(56449),P=u(40346),B=u(80257),$=Object.prototype.hasOwnProperty;function lodash(s){if(P(s)&&!j(s)&&!(s instanceof _)){if(s instanceof w)return s;if($.call(s,\"__wrapped__\"))return B(s)}return new w(s)}lodash.prototype=x.prototype,lodash.prototype.constructor=lodash,s.exports=lodash},47248:(s,i,u)=>{var _=u(16547),w=u(51234);s.exports=function zipObject(s,i){return w(s||[],i||[],_)}},43768:(s,i,u)=>{\"use strict\";var _=u(45981),w=u(85587);i.highlight=highlight,i.highlightAuto=function highlightAuto(s,i){var u,j,P,B,$=i||{},U=$.subset||_.listLanguages(),Y=$.prefix,X=U.length,Z=-1;null==Y&&(Y=x);if(\"string\"!=typeof s)throw w(\"Expected `string` for value, got `%s`\",s);j={relevance:0,language:null,value:[]},u={relevance:0,language:null,value:[]};for(;++Z<X;)B=U[Z],_.getLanguage(B)&&((P=highlight(B,s,i)).language=B,P.relevance>j.relevance&&(j=P),P.relevance>u.relevance&&(j=u,u=P));j.language&&(u.secondBest=j);return u},i.registerLanguage=function registerLanguage(s,i){_.registerLanguage(s,i)},i.listLanguages=function listLanguages(){return _.listLanguages()},i.registerAlias=function registerAlias(s,i){var u,w=s;i&&((w={})[s]=i);for(u in w)_.registerAliases(w[u],{languageName:u})},Emitter.prototype.addText=function text(s){var i,u,_=this.stack;if(\"\"===s)return;i=_[_.length-1],(u=i.children[i.children.length-1])&&\"text\"===u.type?u.value+=s:i.children.push({type:\"text\",value:s})},Emitter.prototype.addKeyword=function addKeyword(s,i){this.openNode(i),this.addText(s),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(s,i){var u=this.stack,_=u[u.length-1],w=s.rootNode.children,x=i?{type:\"element\",tagName:\"span\",properties:{className:[i]},children:w}:w;_.children=_.children.concat(x)},Emitter.prototype.openNode=function open(s){var i=this.stack,u=this.options.classPrefix+s,_=i[i.length-1],w={type:\"element\",tagName:\"span\",properties:{className:[u]},children:[]};_.children.push(w),i.push(w)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return\"\"};var x=\"hljs-\";function highlight(s,i,u){var j,P=_.configure({}),B=(u||{}).prefix;if(\"string\"!=typeof s)throw w(\"Expected `string` for name, got `%s`\",s);if(!_.getLanguage(s))throw w(\"Unknown language: `%s` is not registered\",s);if(\"string\"!=typeof i)throw w(\"Expected `string` for value, got `%s`\",i);if(null==B&&(B=x),_.configure({__emitter:Emitter,classPrefix:B}),j=_.highlight(i,{language:s,ignoreIllegals:!0}),_.configure(P||{}),j.errorRaised)throw j.errorRaised;return{relevance:j.relevance,language:j.language,value:j.emitter.rootNode.children}}function Emitter(s){this.options=s,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},92340:(s,i,u)=>{const _=u(6048);function coerceElementMatchingCallback(s){return\"string\"==typeof s?i=>i.element===s:s.constructor&&s.extend?i=>i instanceof s:s}class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return this.elements.map((s=>s.toValue()))}map(s,i){return this.elements.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(s,i))}reject(s,i){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(_(s),i))}find(s,i){return s=coerceElementMatchingCallback(s),this.elements.find(s,i)}forEach(s,i){this.elements.forEach(s,i)}reduce(s,i){return this.elements.reduce(s,i)}includes(s){return this.elements.some((i=>i.equals(s)))}shift(){return this.elements.shift()}unshift(s){this.elements.unshift(this.refract(s))}push(s){return this.elements.push(this.refract(s)),this}add(s){this.push(s)}get(s){return this.elements[s]}getValue(s){const i=this.elements[s];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}\"undefined\"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),s.exports=ArraySlice},55973:s=>{class KeyValuePair{constructor(s,i){this.key=s,this.value=i}clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clone()),this.value&&(s.value=this.value.clone()),s}}s.exports=KeyValuePair},3110:(s,i,u)=>{const _=u(5187),w=u(85015),x=u(98023),j=u(53812),P=u(23805),B=u(85105),$=u(86804);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=$.Element,this.KeyValuePair=$.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register(\"null\",$.NullElement).register(\"string\",$.StringElement).register(\"number\",$.NumberElement).register(\"boolean\",$.BooleanElement).register(\"array\",$.ArrayElement).register(\"object\",$.ObjectElement).register(\"member\",$.MemberElement).register(\"ref\",$.RefElement).register(\"link\",$.LinkElement),this.detect(_,$.NullElement,!1).detect(w,$.StringElement,!1).detect(x,$.NumberElement,!1).detect(j,$.BooleanElement,!1).detect(Array.isArray,$.ArrayElement,!1).detect(P,$.ObjectElement,!1),this}register(s,i){return this._elements=void 0,this.elementMap[s]=i,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,i,u){return void 0===u||u?this.elementDetection.unshift([s,i]):this.elementDetection.push([s,i]),this}toElement(s){if(s instanceof this.Element)return s;let i;for(let u=0;u<this.elementDetection.length;u+=1){const _=this.elementDetection[u][0],w=this.elementDetection[u][1];if(_(s)){i=new w(s);break}}return i}getElementClass(s){const i=this.elementMap[s];return void 0===i?this.Element:i}fromRefract(s){return this.serialiser.deserialise(s)}toRefract(s){return this.serialiser.serialise(s)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((s=>{const i=s[0].toUpperCase()+s.substr(1);this._elements[i]=this.elementMap[s]}))),this._elements}get serialiser(){return new B(this)}}B.prototype.Namespace=Namespace,s.exports=Namespace},10866:(s,i,u)=>{const _=u(6048),w=u(92340);class ObjectSlice extends w{map(s,i){return this.elements.map((u=>s.bind(i)(u.value,u.key,u)))}filter(s,i){return new ObjectSlice(this.elements.filter((u=>s.bind(i)(u.value,u.key,u))))}reject(s,i){return this.filter(_(s.bind(i)))}forEach(s,i){return this.elements.forEach(((u,_)=>{s.bind(i)(u.value,u.key,u,_)}))}keys(){return this.map(((s,i)=>i.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},86804:(s,i,u)=>{const _=u(10316),w=u(41067),x=u(71167),j=u(40239),P=u(12242),B=u(6233),$=u(87726),U=u(61045),Y=u(86303),X=u(14540),Z=u(92340),ee=u(10866),ie=u(55973);function refract(s){if(s instanceof _)return s;if(\"string\"==typeof s)return new x(s);if(\"number\"==typeof s)return new j(s);if(\"boolean\"==typeof s)return new P(s);if(null===s)return new w;if(Array.isArray(s))return new B(s.map(refract));if(\"object\"==typeof s){return new U(s)}return s}_.prototype.ObjectElement=U,_.prototype.RefElement=X,_.prototype.MemberElement=$,_.prototype.refract=refract,Z.prototype.refract=refract,s.exports={Element:_,NullElement:w,StringElement:x,NumberElement:j,BooleanElement:P,ArrayElement:B,MemberElement:$,ObjectElement:U,LinkElement:Y,RefElement:X,refract,ArraySlice:Z,ObjectSlice:ee,KeyValuePair:ie}},86303:(s,i,u)=>{const _=u(10316);s.exports=class LinkElement extends _{constructor(s,i,u){super(s||[],i,u),this.element=\"link\"}get relation(){return this.attributes.get(\"relation\")}set relation(s){this.attributes.set(\"relation\",s)}get href(){return this.attributes.get(\"href\")}set href(s){this.attributes.set(\"href\",s)}}},14540:(s,i,u)=>{const _=u(10316);s.exports=class RefElement extends _{constructor(s,i,u){super(s||[],i,u),this.element=\"ref\",this.path||(this.path=\"element\")}get path(){return this.attributes.get(\"path\")}set path(s){this.attributes.set(\"path\",s)}}},34035:(s,i,u)=>{const _=u(3110),w=u(86804);i.g$=_,i.KeyValuePair=u(55973),i.G6=w.ArraySlice,i.ot=w.ObjectSlice,i.Hg=w.Element,i.Om=w.StringElement,i.kT=w.NumberElement,i.bd=w.BooleanElement,i.Os=w.NullElement,i.wE=w.ArrayElement,i.Sh=w.ObjectElement,i.Pr=w.MemberElement,i.sI=w.RefElement,i.Ft=w.LinkElement,i.e=w.refract,u(85105),u(75147)},6233:(s,i,u)=>{const _=u(6048),w=u(10316),x=u(92340);class ArrayElement extends w{constructor(s,i,u){super(s||[],i,u),this.element=\"array\"}primitive(){return\"array\"}get(s){return this.content[s]}getValue(s){const i=this.get(s);if(i)return i.toValue()}getIndex(s){return this.content[s]}set(s,i){return this.content[s]=this.refract(i),this}remove(s){const i=this.content.splice(s,1);return i.length?i[0]:null}map(s,i){return this.content.map(s,i)}flatMap(s,i){return this.map(s,i).reduce(((s,i)=>s.concat(i)),[])}compactMap(s,i){const u=[];return this.forEach((_=>{const w=s.bind(i)(_);w&&u.push(w)})),u}filter(s,i){return new x(this.content.filter(s,i))}reject(s,i){return this.filter(_(s),i)}reduce(s,i){let u,_;void 0!==i?(u=0,_=this.refract(i)):(u=1,_=\"object\"===this.primitive()?this.first.value:this.first);for(let i=u;i<this.length;i+=1){const u=this.content[i];_=\"object\"===this.primitive()?this.refract(s(_,u.value,u.key,u,this)):this.refract(s(_,u,i,this))}return _}forEach(s,i){this.content.forEach(((u,_)=>{s.bind(i)(u,this.refract(_))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,i){const u=i||{},_=!!u.recursive,w=void 0===u.results?[]:u.results;return this.forEach(((i,u,x)=>{_&&void 0!==i.findElements&&i.findElements(s,{results:w,recursive:_}),s(i,u,x)&&w.push(i)})),w}find(s){return new x(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((i=>i.element===s))}findByClass(s){return this.find((i=>i.classes.includes(s)))}getById(s){return this.find((i=>i.id.toValue()===s)).first}includes(s){return this.content.some((i=>i.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}\"fantasy-land/empty\"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}\"fantasy-land/concat\"(s){return this.concat(s)}\"fantasy-land/map\"(s){return new this.constructor(this.map(s))}\"fantasy-land/chain\"(s){return this.map((i=>s(i)),this).reduce(((s,i)=>s.concat(i)),this.empty())}\"fantasy-land/filter\"(s){return new this.constructor(this.content.filter(s))}\"fantasy-land/reduce\"(s,i){return this.content.reduce(s,i)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement[\"fantasy-land/empty\"]=ArrayElement.empty,\"undefined\"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},12242:(s,i,u)=>{const _=u(10316);s.exports=class BooleanElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"boolean\"}primitive(){return\"boolean\"}}},10316:(s,i,u)=>{const _=u(2404),w=u(55973),x=u(92340);class Element{constructor(s,i,u){i&&(this.meta=i),u&&(this.attributes=u),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(\"\"===this.id.toValue())throw Error(\"Cannot create reference to an element that does not contain an ID\");const i=new this.RefElement(this.id.toValue());return s&&(i.path=s),i}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error(\"Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`\");const i=s.pop();let u=new x;const append=(s,i)=>(s.push(i),s),checkElement=(s,u)=>{u.element===i&&s.push(u);const _=u.findRecursive(i);return _&&_.reduce(append,s),u.content instanceof w&&(u.content.key&&checkElement(s,u.content.key),u.content.value&&checkElement(s,u.content.value)),s};return this.content&&(this.content.element&&checkElement(u,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,u)),s.isEmpty||(u=u.filter((i=>{let u=i.parents.map((s=>s.element));for(const i in s){const _=s[i],w=u.indexOf(_);if(-1===w)return!1;u=u.splice(0,w)}return!0}))),u}set(s){return this.content=s,this}equals(s){return _(this.toValue(),s)}getMetaProperty(s,i){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(i);return s.freeze(),s}this.meta.set(s,i)}return this.meta.get(s)}setMetaProperty(s,i){this.meta.set(s,i)}get element(){return this._storedElement||\"element\"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof x)this.content=s.elements;else if(\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"null\"===s||null==s)this._content=s;else if(s instanceof w)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if(\"object\"!=typeof s)throw new Error(\"Cannot set content to given value\");this._content=Object.keys(s).map((i=>new this.MemberElement(i,s[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty(\"id\",\"\")}set id(s){this.setMetaProperty(\"id\",s)}get classes(){return this.getMetaProperty(\"classes\",[])}set classes(s){this.setMetaProperty(\"classes\",s)}get title(){return this.getMetaProperty(\"title\",\"\")}set title(s){this.setMetaProperty(\"title\",s)}get description(){return this.getMetaProperty(\"description\",\"\")}set description(s){this.setMetaProperty(\"description\",s)}get links(){return this.getMetaProperty(\"links\",[])}set links(s){this.setMetaProperty(\"links\",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const i=new x;for(;s;)i.push(s),s=s.parent;return i}get children(){if(Array.isArray(this.content))return new x(this.content);if(this.content instanceof w){const s=new x([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new x([this.content]):new x}get recursiveChildren(){const s=new x;return this.children.forEach((i=>{s.push(i),i.recursiveChildren.forEach((i=>{s.push(i)}))})),s}}s.exports=Element},87726:(s,i,u)=>{const _=u(55973),w=u(10316);s.exports=class MemberElement extends w{constructor(s,i,u,w){super(new _,u,w),this.element=\"member\",this.key=s,this.value=i}get key(){return this.content.key}set key(s){this.content.key=this.refract(s)}get value(){return this.content.value}set value(s){this.content.value=this.refract(s)}}},41067:(s,i,u)=>{const _=u(10316);s.exports=class NullElement extends _{constructor(s,i,u){super(s||null,i,u),this.element=\"null\"}primitive(){return\"null\"}set(){return new Error(\"Cannot set the value of null\")}}},40239:(s,i,u)=>{const _=u(10316);s.exports=class NumberElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"number\"}primitive(){return\"number\"}}},61045:(s,i,u)=>{const _=u(6048),w=u(23805),x=u(6233),j=u(87726),P=u(10866);s.exports=class ObjectElement extends x{constructor(s,i,u){super(s||[],i,u),this.element=\"object\"}primitive(){return\"object\"}toValue(){return this.content.reduce(((s,i)=>(s[i.key.toValue()]=i.value?i.value.toValue():void 0,s)),{})}get(s){const i=this.getMember(s);if(i)return i.value}getMember(s){if(void 0!==s)return this.content.find((i=>i.key.toValue()===s))}remove(s){let i=null;return this.content=this.content.filter((u=>u.key.toValue()!==s||(i=u,!1))),i}getKey(s){const i=this.getMember(s);if(i)return i.key}set(s,i){if(w(s))return Object.keys(s).forEach((i=>{this.set(i,s[i])})),this;const u=s,_=this.getMember(u);return _?_.value=i:this.content.push(new j(u,i)),this}keys(){return this.content.map((s=>s.key.toValue()))}values(){return this.content.map((s=>s.value.toValue()))}hasKey(s){return this.content.some((i=>i.key.equals(s)))}items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}map(s,i){return this.content.map((u=>s.bind(i)(u.value,u.key,u)))}compactMap(s,i){const u=[];return this.forEach(((_,w,x)=>{const j=s.bind(i)(_,w,x);j&&u.push(j)})),u}filter(s,i){return new P(this.content).filter(s,i)}reject(s,i){return this.filter(_(s),i)}forEach(s,i){return this.content.forEach((u=>s.bind(i)(u.value,u.key,u)))}}},71167:(s,i,u)=>{const _=u(10316);s.exports=class StringElement extends _{constructor(s,i,u){super(s,i,u),this.element=\"string\"}primitive(){return\"string\"}get length(){return this.content.length}}},75147:(s,i,u)=>{const _=u(85105);s.exports=class JSON06Serialiser extends _{serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);let i;s._attributes&&s.attributes.get(\"variable\")&&(i=s.attributes.get(\"variable\"));const u={element:s.element};s._meta&&s._meta.length>0&&(u.meta=this.serialiseObject(s.meta));const _=\"enum\"===s.element||-1!==s.attributes.keys().indexOf(\"enumerations\");if(_){const i=this.enumSerialiseAttributes(s);i&&(u.attributes=i)}else if(s._attributes&&s._attributes.length>0){let{attributes:_}=s;_.get(\"metadata\")&&(_=_.clone(),_.set(\"meta\",_.get(\"metadata\")),_.remove(\"metadata\")),\"member\"===s.element&&i&&(_=_.clone(),_.remove(\"variable\")),_.length>0&&(u.attributes=this.serialiseObject(_))}if(_)u.content=this.enumSerialiseContent(s,u);else if(this[`${s.element}SerialiseContent`])u.content=this[`${s.element}SerialiseContent`](s,u);else if(void 0!==s.content){let _;i&&s.content.key?(_=s.content.clone(),_.key.attributes.set(\"variable\",i),_=this.serialiseContent(_)):_=this.serialiseContent(s.content),this.shouldSerialiseContent(s,_)&&(u.content=_)}else this.shouldSerialiseContent(s,s.content)&&s instanceof this.namespace.elements.Array&&(u.content=[]);return u}shouldSerialiseContent(s,i){return\"parseResult\"===s.element||\"httpRequest\"===s.element||\"httpResponse\"===s.element||\"category\"===s.element||\"link\"===s.element||void 0!==i&&(!Array.isArray(i)||0!==i.length)}refSerialiseContent(s,i){return delete i.attributes,{href:s.toValue(),path:s.path.toValue()}}sourceMapSerialiseContent(s){return s.toValue()}dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}enumSerialiseAttributes(s){const i=s.attributes.clone(),u=i.remove(\"enumerations\")||new this.namespace.elements.Array([]),_=i.get(\"default\");let w=i.get(\"samples\")||new this.namespace.elements.Array([]);if(_&&_.content&&(_.content.attributes&&_.content.attributes.remove(\"typeAttributes\"),i.set(\"default\",new this.namespace.elements.Array([_.content]))),w.forEach((s=>{s.content&&s.content.element&&s.content.attributes.remove(\"typeAttributes\")})),s.content&&0!==u.length&&w.unshift(s.content),w=w.map((s=>s instanceof this.namespace.elements.Array?[s]:new this.namespace.elements.Array([s.content]))),w.length&&i.set(\"samples\",w),i.length>0)return this.serialiseObject(i)}enumSerialiseContent(s){if(s._attributes){const i=s.attributes.get(\"enumerations\");if(i&&i.length>0)return i.content.map((s=>{const i=s.clone();return i.attributes.remove(\"typeAttributes\"),this.serialise(i)}))}if(s.content){const i=s.content.clone();return i.attributes.remove(\"typeAttributes\"),[this.serialise(i)]}return[]}deserialise(s){if(\"string\"==typeof s)return new this.namespace.elements.String(s);if(\"number\"==typeof s)return new this.namespace.elements.Number(s);if(\"boolean\"==typeof s)return new this.namespace.elements.Boolean(s);if(null===s)return new this.namespace.elements.Null;if(Array.isArray(s))return new this.namespace.elements.Array(s.map(this.deserialise,this));const i=this.namespace.getElementClass(s.element),u=new i;u.element!==s.element&&(u.element=s.element),s.meta&&this.deserialiseObject(s.meta,u.meta),s.attributes&&this.deserialiseObject(s.attributes,u.attributes);const _=this.deserialiseContent(s.content);if(void 0===_&&null!==u.content||(u.content=_),\"enum\"===u.element){u.content&&u.attributes.set(\"enumerations\",u.content);let s=u.attributes.get(\"samples\");if(u.attributes.remove(\"samples\"),s){const _=s;s=new this.namespace.elements.Array,_.forEach((_=>{_.forEach((_=>{const w=new i(_);w.element=u.element,s.push(w)}))}));const w=s.shift();u.content=w?w.content:void 0,u.attributes.set(\"samples\",s)}else u.content=void 0;let _=u.attributes.get(\"default\");if(_&&_.length>0){_=_.get(0);const s=new i(_);s.element=u.element,u.attributes.set(\"default\",s)}}else if(\"dataStructure\"===u.element&&Array.isArray(u.content))[u.content]=u.content;else if(\"category\"===u.element){const s=u.attributes.get(\"meta\");s&&(u.attributes.set(\"metadata\",s),u.attributes.remove(\"meta\"))}else\"member\"===u.element&&u.key&&u.key._attributes&&u.key._attributes.getValue(\"variable\")&&(u.attributes.set(\"variable\",u.key.attributes.get(\"variable\")),u.key.attributes.remove(\"variable\"));return u}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}return s&&s.map?s.map(this.serialise,this):s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._meta&&s.meta.keys().length)||\"enum\"!==s.element&&(s.element!==s.primitive()||\"member\"===s.element)}convertKeyToRefract(s,i){return this.shouldRefract(i)?this.serialise(i):\"enum\"===i.element?this.serialiseEnum(i):\"array\"===i.element?i.map((i=>this.shouldRefract(i)||\"default\"===s?this.serialise(i):\"array\"===i.element||\"object\"===i.element||\"enum\"===i.element?i.children.map((s=>this.serialise(s))):i.toValue())):\"object\"===i.element?(i.content||[]).map(this.serialise,this):i.toValue()}serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}serialiseObject(s){const i={};return s.forEach(((s,u)=>{if(s){const _=u.toValue();i[_]=this.convertKeyToRefract(_,s)}})),i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},85105:s=>{s.exports=class JSONSerialiser{constructor(s){this.namespace=s||new this.Namespace}serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);const i={element:s.element};s._meta&&s._meta.length>0&&(i.meta=this.serialiseObject(s.meta)),s._attributes&&s._attributes.length>0&&(i.attributes=this.serialiseObject(s.attributes));const u=this.serialiseContent(s.content);return void 0!==u&&(i.content=u),i}deserialise(s){if(!s.element)throw new Error(\"Given value is not an object containing an element name\");const i=new(this.namespace.getElementClass(s.element));i.element!==s.element&&(i.element=s.element),s.meta&&this.deserialiseObject(s.meta,i.meta),s.attributes&&this.deserialiseObject(s.attributes,i.attributes);const u=this.deserialiseContent(s.content);return void 0===u&&null!==i.content||(i.content=u),i}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const i={key:this.serialise(s.key)};return s.value&&(i.value=this.serialise(s.value)),i}if(s&&s.map){if(0===s.length)return;return s.map(this.serialise,this)}return s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const i=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(i.value=this.deserialise(s.value)),i}if(s.map)return s.map(this.deserialise,this)}return s}serialiseObject(s){const i={};if(s.forEach(((s,u)=>{s&&(i[u.toValue()]=this.serialise(s))})),0!==Object.keys(i).length)return i}deserialiseObject(s,i){Object.keys(s).forEach((u=>{i.set(u,this.deserialise(s[u]))}))}}},58859:(s,i,u)=>{var _=\"function\"==typeof Map&&Map.prototype,w=Object.getOwnPropertyDescriptor&&_?Object.getOwnPropertyDescriptor(Map.prototype,\"size\"):null,x=_&&w&&\"function\"==typeof w.get?w.get:null,j=_&&Map.prototype.forEach,P=\"function\"==typeof Set&&Set.prototype,B=Object.getOwnPropertyDescriptor&&P?Object.getOwnPropertyDescriptor(Set.prototype,\"size\"):null,$=P&&B&&\"function\"==typeof B.get?B.get:null,U=P&&Set.prototype.forEach,Y=\"function\"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,X=\"function\"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Z=\"function\"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,ie=Object.prototype.toString,ae=Function.prototype.toString,le=String.prototype.match,ce=String.prototype.slice,pe=String.prototype.replace,de=String.prototype.toUpperCase,fe=String.prototype.toLowerCase,ye=RegExp.prototype.test,be=Array.prototype.concat,_e=Array.prototype.join,we=Array.prototype.slice,Se=Math.floor,xe=\"function\"==typeof BigInt?BigInt.prototype.valueOf:null,Pe=Object.getOwnPropertySymbols,Te=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?Symbol.prototype.toString:null,Re=\"function\"==typeof Symbol&&\"object\"==typeof Symbol.iterator,qe=\"function\"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Re||\"symbol\")?Symbol.toStringTag:null,$e=Object.prototype.propertyIsEnumerable,ze=(\"function\"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function addNumericSeparator(s,i){if(s===1/0||s===-1/0||s!=s||s&&s>-1e3&&s<1e3||ye.call(/e/,i))return i;var u=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(\"number\"==typeof s){var _=s<0?-Se(-s):Se(s);if(_!==s){var w=String(_),x=ce.call(i,w.length+1);return pe.call(w,u,\"$&_\")+\".\"+pe.call(pe.call(x,/([0-9]{3})/g,\"$&_\"),/_$/,\"\")}}return pe.call(i,u,\"$&_\")}var We=u(42634),He=We.custom,Ye=isSymbol(He)?He:null;function wrapQuotes(s,i,u){var _=\"double\"===(u.quoteStyle||i)?'\"':\"'\";return _+s+_}function quote(s){return pe.call(String(s),/\"/g,\"&quot;\")}function isArray(s){return!(\"[object Array]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}function isRegExp(s){return!(\"[object RegExp]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}function isSymbol(s){if(Re)return s&&\"object\"==typeof s&&s instanceof Symbol;if(\"symbol\"==typeof s)return!0;if(!s||\"object\"!=typeof s||!Te)return!1;try{return Te.call(s),!0}catch(s){}return!1}s.exports=function inspect_(s,i,_,w){var P=i||{};if(has(P,\"quoteStyle\")&&\"single\"!==P.quoteStyle&&\"double\"!==P.quoteStyle)throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');if(has(P,\"maxStringLength\")&&(\"number\"==typeof P.maxStringLength?P.maxStringLength<0&&P.maxStringLength!==1/0:null!==P.maxStringLength))throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');var B=!has(P,\"customInspect\")||P.customInspect;if(\"boolean\"!=typeof B&&\"symbol\"!==B)throw new TypeError(\"option \\\"customInspect\\\", if provided, must be `true`, `false`, or `'symbol'`\");if(has(P,\"indent\")&&null!==P.indent&&\"\\t\"!==P.indent&&!(parseInt(P.indent,10)===P.indent&&P.indent>0))throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');if(has(P,\"numericSeparator\")&&\"boolean\"!=typeof P.numericSeparator)throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');var ie=P.numericSeparator;if(void 0===s)return\"undefined\";if(null===s)return\"null\";if(\"boolean\"==typeof s)return s?\"true\":\"false\";if(\"string\"==typeof s)return inspectString(s,P);if(\"number\"==typeof s){if(0===s)return 1/0/s>0?\"0\":\"-0\";var de=String(s);return ie?addNumericSeparator(s,de):de}if(\"bigint\"==typeof s){var ye=String(s)+\"n\";return ie?addNumericSeparator(s,ye):ye}var Se=void 0===P.depth?5:P.depth;if(void 0===_&&(_=0),_>=Se&&Se>0&&\"object\"==typeof s)return isArray(s)?\"[Array]\":\"[Object]\";var Pe=function getIndent(s,i){var u;if(\"\\t\"===s.indent)u=\"\\t\";else{if(!(\"number\"==typeof s.indent&&s.indent>0))return null;u=_e.call(Array(s.indent+1),\" \")}return{base:u,prev:_e.call(Array(i+1),u)}}(P,_);if(void 0===w)w=[];else if(indexOf(w,s)>=0)return\"[Circular]\";function inspect(s,i,u){if(i&&(w=we.call(w)).push(i),u){var x={depth:P.depth};return has(P,\"quoteStyle\")&&(x.quoteStyle=P.quoteStyle),inspect_(s,x,_+1,w)}return inspect_(s,P,_+1,w)}if(\"function\"==typeof s&&!isRegExp(s)){var He=function nameOf(s){if(s.name)return s.name;var i=le.call(ae.call(s),/^function\\s*([\\w$]+)/);if(i)return i[1];return null}(s),Xe=arrObjKeys(s,inspect);return\"[Function\"+(He?\": \"+He:\" (anonymous)\")+\"]\"+(Xe.length>0?\" { \"+_e.call(Xe,\", \")+\" }\":\"\")}if(isSymbol(s)){var Qe=Re?pe.call(String(s),/^(Symbol\\(.*\\))_[^)]*$/,\"$1\"):Te.call(s);return\"object\"!=typeof s||Re?Qe:markBoxed(Qe)}if(function isElement(s){if(!s||\"object\"!=typeof s)return!1;if(\"undefined\"!=typeof HTMLElement&&s instanceof HTMLElement)return!0;return\"string\"==typeof s.nodeName&&\"function\"==typeof s.getAttribute}(s)){for(var et=\"<\"+fe.call(String(s.nodeName)),tt=s.attributes||[],rt=0;rt<tt.length;rt++)et+=\" \"+tt[rt].name+\"=\"+wrapQuotes(quote(tt[rt].value),\"double\",P);return et+=\">\",s.childNodes&&s.childNodes.length&&(et+=\"...\"),et+=\"</\"+fe.call(String(s.nodeName))+\">\"}if(isArray(s)){if(0===s.length)return\"[]\";var nt=arrObjKeys(s,inspect);return Pe&&!function singleLineValues(s){for(var i=0;i<s.length;i++)if(indexOf(s[i],\"\\n\")>=0)return!1;return!0}(nt)?\"[\"+indentedJoin(nt,Pe)+\"]\":\"[ \"+_e.call(nt,\", \")+\" ]\"}if(function isError(s){return!(\"[object Error]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s)){var ot=arrObjKeys(s,inspect);return\"cause\"in Error.prototype||!(\"cause\"in s)||$e.call(s,\"cause\")?0===ot.length?\"[\"+String(s)+\"]\":\"{ [\"+String(s)+\"] \"+_e.call(ot,\", \")+\" }\":\"{ [\"+String(s)+\"] \"+_e.call(be.call(\"[cause]: \"+inspect(s.cause),ot),\", \")+\" }\"}if(\"object\"==typeof s&&B){if(Ye&&\"function\"==typeof s[Ye]&&We)return We(s,{depth:Se-_});if(\"symbol\"!==B&&\"function\"==typeof s.inspect)return s.inspect()}if(function isMap(s){if(!x||!s||\"object\"!=typeof s)return!1;try{x.call(s);try{$.call(s)}catch(s){return!0}return s instanceof Map}catch(s){}return!1}(s)){var st=[];return j&&j.call(s,(function(i,u){st.push(inspect(u,s,!0)+\" => \"+inspect(i,s))})),collectionOf(\"Map\",x.call(s),st,Pe)}if(function isSet(s){if(!$||!s||\"object\"!=typeof s)return!1;try{$.call(s);try{x.call(s)}catch(s){return!0}return s instanceof Set}catch(s){}return!1}(s)){var it=[];return U&&U.call(s,(function(i){it.push(inspect(i,s))})),collectionOf(\"Set\",$.call(s),it,Pe)}if(function isWeakMap(s){if(!Y||!s||\"object\"!=typeof s)return!1;try{Y.call(s,Y);try{X.call(s,X)}catch(s){return!0}return s instanceof WeakMap}catch(s){}return!1}(s))return weakCollectionOf(\"WeakMap\");if(function isWeakSet(s){if(!X||!s||\"object\"!=typeof s)return!1;try{X.call(s,X);try{Y.call(s,Y)}catch(s){return!0}return s instanceof WeakSet}catch(s){}return!1}(s))return weakCollectionOf(\"WeakSet\");if(function isWeakRef(s){if(!Z||!s||\"object\"!=typeof s)return!1;try{return Z.call(s),!0}catch(s){}return!1}(s))return weakCollectionOf(\"WeakRef\");if(function isNumber(s){return!(\"[object Number]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(inspect(Number(s)));if(function isBigInt(s){if(!s||\"object\"!=typeof s||!xe)return!1;try{return xe.call(s),!0}catch(s){}return!1}(s))return markBoxed(inspect(xe.call(s)));if(function isBoolean(s){return!(\"[object Boolean]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(ee.call(s));if(function isString(s){return!(\"[object String]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s))return markBoxed(inspect(String(s)));if(\"undefined\"!=typeof window&&s===window)return\"{ [object Window] }\";if(s===u.g)return\"{ [object globalThis] }\";if(!function isDate(s){return!(\"[object Date]\"!==toStr(s)||qe&&\"object\"==typeof s&&qe in s)}(s)&&!isRegExp(s)){var at=arrObjKeys(s,inspect),lt=ze?ze(s)===Object.prototype:s instanceof Object||s.constructor===Object,ct=s instanceof Object?\"\":\"null prototype\",ut=!lt&&qe&&Object(s)===s&&qe in s?ce.call(toStr(s),8,-1):ct?\"Object\":\"\",pt=(lt||\"function\"!=typeof s.constructor?\"\":s.constructor.name?s.constructor.name+\" \":\"\")+(ut||ct?\"[\"+_e.call(be.call([],ut||[],ct||[]),\": \")+\"] \":\"\");return 0===at.length?pt+\"{}\":Pe?pt+\"{\"+indentedJoin(at,Pe)+\"}\":pt+\"{ \"+_e.call(at,\", \")+\" }\"}return String(s)};var Xe=Object.prototype.hasOwnProperty||function(s){return s in this};function has(s,i){return Xe.call(s,i)}function toStr(s){return ie.call(s)}function indexOf(s,i){if(s.indexOf)return s.indexOf(i);for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}function inspectString(s,i){if(s.length>i.maxStringLength){var u=s.length-i.maxStringLength,_=\"... \"+u+\" more character\"+(u>1?\"s\":\"\");return inspectString(ce.call(s,0,i.maxStringLength),i)+_}return wrapQuotes(pe.call(pe.call(s,/(['\\\\])/g,\"\\\\$1\"),/[\\x00-\\x1f]/g,lowbyte),\"single\",i)}function lowbyte(s){var i=s.charCodeAt(0),u={8:\"b\",9:\"t\",10:\"n\",12:\"f\",13:\"r\"}[i];return u?\"\\\\\"+u:\"\\\\x\"+(i<16?\"0\":\"\")+de.call(i.toString(16))}function markBoxed(s){return\"Object(\"+s+\")\"}function weakCollectionOf(s){return s+\" { ? }\"}function collectionOf(s,i,u,_){return s+\" (\"+i+\") {\"+(_?indentedJoin(u,_):_e.call(u,\", \"))+\"}\"}function indentedJoin(s,i){if(0===s.length)return\"\";var u=\"\\n\"+i.prev+i.base;return u+_e.call(s,\",\"+u)+\"\\n\"+i.prev}function arrObjKeys(s,i){var u=isArray(s),_=[];if(u){_.length=s.length;for(var w=0;w<s.length;w++)_[w]=has(s,w)?i(s[w],s):\"\"}var x,j=\"function\"==typeof Pe?Pe(s):[];if(Re){x={};for(var P=0;P<j.length;P++)x[\"$\"+j[P]]=j[P]}for(var B in s)has(s,B)&&(u&&String(Number(B))===B&&B<s.length||Re&&x[\"$\"+B]instanceof Symbol||(ye.call(/[^\\w$]/,B)?_.push(i(B,s)+\": \"+i(s[B],s)):_.push(B+\": \"+i(s[B],s))));if(\"function\"==typeof Pe)for(var $=0;$<j.length;$++)$e.call(s,j[$])&&_.push(\"[\"+i(j[$])+\"]: \"+i(s[j[$]],s));return _}},65606:s=>{var i,u,_=s.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(s){if(i===setTimeout)return setTimeout(s,0);if((i===defaultSetTimout||!i)&&setTimeout)return i=setTimeout,setTimeout(s,0);try{return i(s,0)}catch(u){try{return i.call(null,s,0)}catch(u){return i.call(this,s,0)}}}!function(){try{i=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(s){i=defaultSetTimout}try{u=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(s){u=defaultClearTimeout}}();var w,x=[],j=!1,P=-1;function cleanUpNextTick(){j&&w&&(j=!1,w.length?x=w.concat(x):P=-1,x.length&&drainQueue())}function drainQueue(){if(!j){var s=runTimeout(cleanUpNextTick);j=!0;for(var i=x.length;i;){for(w=x,x=[];++P<i;)w&&w[P].run();P=-1,i=x.length}w=null,j=!1,function runClearTimeout(s){if(u===clearTimeout)return clearTimeout(s);if((u===defaultClearTimeout||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(s);try{return u(s)}catch(i){try{return u.call(null,s)}catch(i){return u.call(this,s)}}}(s)}}function Item(s,i){this.fun=s,this.array=i}function noop(){}_.nextTick=function(s){var i=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)i[u-1]=arguments[u];x.push(new Item(s,i)),1!==x.length||j||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},_.title=\"browser\",_.browser=!0,_.env={},_.argv=[],_.version=\"\",_.versions={},_.on=noop,_.addListener=noop,_.once=noop,_.off=noop,_.removeListener=noop,_.removeAllListeners=noop,_.emit=noop,_.prependListener=noop,_.prependOnceListener=noop,_.listeners=function(s){return[]},_.binding=function(s){throw new Error(\"process.binding is not supported\")},_.cwd=function(){return\"/\"},_.chdir=function(s){throw new Error(\"process.chdir is not supported\")},_.umask=function(){return 0}},2694:(s,i,u)=>{\"use strict\";var _=u(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,i,u,w,x,j){if(j!==_){var P=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw P.name=\"Invariant Violation\",P}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},5556:(s,i,u)=>{s.exports=u(2694)()},6925:s=>{\"use strict\";s.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},74765:s=>{\"use strict\";var i=String.prototype.replace,u=/%20/g,_=\"RFC1738\",w=\"RFC3986\";s.exports={default:w,formatters:{RFC1738:function(s){return i.call(s,u,\"+\")},RFC3986:function(s){return String(s)}},RFC1738:_,RFC3986:w}},55373:(s,i,u)=>{\"use strict\";var _=u(98636),w=u(62642),x=u(74765);s.exports={formats:x,parse:w,stringify:_}},62642:(s,i,u)=>{\"use strict\";var _=u(37720),w=Object.prototype.hasOwnProperty,x=Array.isArray,j={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:\"utf-8\",charsetSentinel:!1,comma:!1,decoder:_.decode,delimiter:\"&\",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(s){return s.replace(/&#(\\d+);/g,(function(s,i){return String.fromCharCode(parseInt(i,10))}))},parseArrayValue=function(s,i){return s&&\"string\"==typeof s&&i.comma&&s.indexOf(\",\")>-1?s.split(\",\"):s},P=function parseQueryStringKeys(s,i,u,_){if(s){var x=u.allowDots?s.replace(/\\.([^.[]+)/g,\"[$1]\"):s,j=/(\\[[^[\\]]*])/g,P=u.depth>0&&/(\\[[^[\\]]*])/.exec(x),B=P?x.slice(0,P.index):x,$=[];if(B){if(!u.plainObjects&&w.call(Object.prototype,B)&&!u.allowPrototypes)return;$.push(B)}for(var U=0;u.depth>0&&null!==(P=j.exec(x))&&U<u.depth;){if(U+=1,!u.plainObjects&&w.call(Object.prototype,P[1].slice(1,-1))&&!u.allowPrototypes)return;$.push(P[1])}return P&&$.push(\"[\"+x.slice(P.index)+\"]\"),function(s,i,u,_){for(var w=_?i:parseArrayValue(i,u),x=s.length-1;x>=0;--x){var j,P=s[x];if(\"[]\"===P&&u.parseArrays)j=[].concat(w);else{j=u.plainObjects?Object.create(null):{};var B=\"[\"===P.charAt(0)&&\"]\"===P.charAt(P.length-1)?P.slice(1,-1):P,$=parseInt(B,10);u.parseArrays||\"\"!==B?!isNaN($)&&P!==B&&String($)===B&&$>=0&&u.parseArrays&&$<=u.arrayLimit?(j=[])[$]=w:\"__proto__\"!==B&&(j[B]=w):j={0:w}}w=j}return w}($,i,u,_)}};s.exports=function(s,i){var u=function normalizeParseOptions(s){if(!s)return j;if(null!==s.decoder&&void 0!==s.decoder&&\"function\"!=typeof s.decoder)throw new TypeError(\"Decoder has to be a function.\");if(void 0!==s.charset&&\"utf-8\"!==s.charset&&\"iso-8859-1\"!==s.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var i=void 0===s.charset?j.charset:s.charset;return{allowDots:void 0===s.allowDots?j.allowDots:!!s.allowDots,allowPrototypes:\"boolean\"==typeof s.allowPrototypes?s.allowPrototypes:j.allowPrototypes,allowSparse:\"boolean\"==typeof s.allowSparse?s.allowSparse:j.allowSparse,arrayLimit:\"number\"==typeof s.arrayLimit?s.arrayLimit:j.arrayLimit,charset:i,charsetSentinel:\"boolean\"==typeof s.charsetSentinel?s.charsetSentinel:j.charsetSentinel,comma:\"boolean\"==typeof s.comma?s.comma:j.comma,decoder:\"function\"==typeof s.decoder?s.decoder:j.decoder,delimiter:\"string\"==typeof s.delimiter||_.isRegExp(s.delimiter)?s.delimiter:j.delimiter,depth:\"number\"==typeof s.depth||!1===s.depth?+s.depth:j.depth,ignoreQueryPrefix:!0===s.ignoreQueryPrefix,interpretNumericEntities:\"boolean\"==typeof s.interpretNumericEntities?s.interpretNumericEntities:j.interpretNumericEntities,parameterLimit:\"number\"==typeof s.parameterLimit?s.parameterLimit:j.parameterLimit,parseArrays:!1!==s.parseArrays,plainObjects:\"boolean\"==typeof s.plainObjects?s.plainObjects:j.plainObjects,strictNullHandling:\"boolean\"==typeof s.strictNullHandling?s.strictNullHandling:j.strictNullHandling}}(i);if(\"\"===s||null==s)return u.plainObjects?Object.create(null):{};for(var B=\"string\"==typeof s?function parseQueryStringValues(s,i){var u,P={},B=i.ignoreQueryPrefix?s.replace(/^\\?/,\"\"):s,$=i.parameterLimit===1/0?void 0:i.parameterLimit,U=B.split(i.delimiter,$),Y=-1,X=i.charset;if(i.charsetSentinel)for(u=0;u<U.length;++u)0===U[u].indexOf(\"utf8=\")&&(\"utf8=%E2%9C%93\"===U[u]?X=\"utf-8\":\"utf8=%26%2310003%3B\"===U[u]&&(X=\"iso-8859-1\"),Y=u,u=U.length);for(u=0;u<U.length;++u)if(u!==Y){var Z,ee,ie=U[u],ae=ie.indexOf(\"]=\"),le=-1===ae?ie.indexOf(\"=\"):ae+1;-1===le?(Z=i.decoder(ie,j.decoder,X,\"key\"),ee=i.strictNullHandling?null:\"\"):(Z=i.decoder(ie.slice(0,le),j.decoder,X,\"key\"),ee=_.maybeMap(parseArrayValue(ie.slice(le+1),i),(function(s){return i.decoder(s,j.decoder,X,\"value\")}))),ee&&i.interpretNumericEntities&&\"iso-8859-1\"===X&&(ee=interpretNumericEntities(ee)),ie.indexOf(\"[]=\")>-1&&(ee=x(ee)?[ee]:ee),w.call(P,Z)?P[Z]=_.combine(P[Z],ee):P[Z]=ee}return P}(s,u):s,$=u.plainObjects?Object.create(null):{},U=Object.keys(B),Y=0;Y<U.length;++Y){var X=U[Y],Z=P(X,B[X],u,\"string\"==typeof s);$=_.merge($,Z,u)}return!0===u.allowSparse?$:_.compact($)}},98636:(s,i,u)=>{\"use strict\";var _=u(920),w=u(37720),x=u(74765),j=Object.prototype.hasOwnProperty,P={brackets:function brackets(s){return s+\"[]\"},comma:\"comma\",indices:function indices(s,i){return s+\"[\"+i+\"]\"},repeat:function repeat(s){return s}},B=Array.isArray,$=String.prototype.split,U=Array.prototype.push,pushToArray=function(s,i){U.apply(s,B(i)?i:[i])},Y=Date.prototype.toISOString,X=x.default,Z={addQueryPrefix:!1,allowDots:!1,charset:\"utf-8\",charsetSentinel:!1,delimiter:\"&\",encode:!0,encoder:w.encode,encodeValuesOnly:!1,format:X,formatter:x.formatters[X],indices:!1,serializeDate:function serializeDate(s){return Y.call(s)},skipNulls:!1,strictNullHandling:!1},ee={},ie=function stringify(s,i,u,x,j,P,U,Y,X,ie,ae,le,ce,pe,de,fe){for(var ye=s,be=fe,_e=0,we=!1;void 0!==(be=be.get(ee))&&!we;){var Se=be.get(s);if(_e+=1,void 0!==Se){if(Se===_e)throw new RangeError(\"Cyclic object value\");we=!0}void 0===be.get(ee)&&(_e=0)}if(\"function\"==typeof Y?ye=Y(i,ye):ye instanceof Date?ye=ae(ye):\"comma\"===u&&B(ye)&&(ye=w.maybeMap(ye,(function(s){return s instanceof Date?ae(s):s}))),null===ye){if(j)return U&&!pe?U(i,Z.encoder,de,\"key\",le):i;ye=\"\"}if(function isNonNullishPrimitive(s){return\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"symbol\"==typeof s||\"bigint\"==typeof s}(ye)||w.isBuffer(ye)){if(U){var xe=pe?i:U(i,Z.encoder,de,\"key\",le);if(\"comma\"===u&&pe){for(var Pe=$.call(String(ye),\",\"),Te=\"\",Re=0;Re<Pe.length;++Re)Te+=(0===Re?\"\":\",\")+ce(U(Pe[Re],Z.encoder,de,\"value\",le));return[ce(xe)+(x&&B(ye)&&1===Pe.length?\"[]\":\"\")+\"=\"+Te]}return[ce(xe)+\"=\"+ce(U(ye,Z.encoder,de,\"value\",le))]}return[ce(i)+\"=\"+ce(String(ye))]}var qe,$e=[];if(void 0===ye)return $e;if(\"comma\"===u&&B(ye))qe=[{value:ye.length>0?ye.join(\",\")||null:void 0}];else if(B(Y))qe=Y;else{var ze=Object.keys(ye);qe=X?ze.sort(X):ze}for(var We=x&&B(ye)&&1===ye.length?i+\"[]\":i,He=0;He<qe.length;++He){var Ye=qe[He],Xe=\"object\"==typeof Ye&&void 0!==Ye.value?Ye.value:ye[Ye];if(!P||null!==Xe){var Qe=B(ye)?\"function\"==typeof u?u(We,Ye):We:We+(ie?\".\"+Ye:\"[\"+Ye+\"]\");fe.set(s,_e);var et=_();et.set(ee,fe),pushToArray($e,stringify(Xe,Qe,u,x,j,P,U,Y,X,ie,ae,le,ce,pe,de,et))}}return $e};s.exports=function(s,i){var u,w=s,$=function normalizeStringifyOptions(s){if(!s)return Z;if(null!==s.encoder&&void 0!==s.encoder&&\"function\"!=typeof s.encoder)throw new TypeError(\"Encoder has to be a function.\");var i=s.charset||Z.charset;if(void 0!==s.charset&&\"utf-8\"!==s.charset&&\"iso-8859-1\"!==s.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var u=x.default;if(void 0!==s.format){if(!j.call(x.formatters,s.format))throw new TypeError(\"Unknown format option provided.\");u=s.format}var _=x.formatters[u],w=Z.filter;return(\"function\"==typeof s.filter||B(s.filter))&&(w=s.filter),{addQueryPrefix:\"boolean\"==typeof s.addQueryPrefix?s.addQueryPrefix:Z.addQueryPrefix,allowDots:void 0===s.allowDots?Z.allowDots:!!s.allowDots,charset:i,charsetSentinel:\"boolean\"==typeof s.charsetSentinel?s.charsetSentinel:Z.charsetSentinel,delimiter:void 0===s.delimiter?Z.delimiter:s.delimiter,encode:\"boolean\"==typeof s.encode?s.encode:Z.encode,encoder:\"function\"==typeof s.encoder?s.encoder:Z.encoder,encodeValuesOnly:\"boolean\"==typeof s.encodeValuesOnly?s.encodeValuesOnly:Z.encodeValuesOnly,filter:w,format:u,formatter:_,serializeDate:\"function\"==typeof s.serializeDate?s.serializeDate:Z.serializeDate,skipNulls:\"boolean\"==typeof s.skipNulls?s.skipNulls:Z.skipNulls,sort:\"function\"==typeof s.sort?s.sort:null,strictNullHandling:\"boolean\"==typeof s.strictNullHandling?s.strictNullHandling:Z.strictNullHandling}}(i);\"function\"==typeof $.filter?w=(0,$.filter)(\"\",w):B($.filter)&&(u=$.filter);var U,Y=[];if(\"object\"!=typeof w||null===w)return\"\";U=i&&i.arrayFormat in P?i.arrayFormat:i&&\"indices\"in i?i.indices?\"indices\":\"repeat\":\"indices\";var X=P[U];if(i&&\"commaRoundTrip\"in i&&\"boolean\"!=typeof i.commaRoundTrip)throw new TypeError(\"`commaRoundTrip` must be a boolean, or absent\");var ee=\"comma\"===X&&i&&i.commaRoundTrip;u||(u=Object.keys(w)),$.sort&&u.sort($.sort);for(var ae=_(),le=0;le<u.length;++le){var ce=u[le];$.skipNulls&&null===w[ce]||pushToArray(Y,ie(w[ce],ce,X,ee,$.strictNullHandling,$.skipNulls,$.encode?$.encoder:null,$.filter,$.sort,$.allowDots,$.serializeDate,$.format,$.formatter,$.encodeValuesOnly,$.charset,ae))}var pe=Y.join($.delimiter),de=!0===$.addQueryPrefix?\"?\":\"\";return $.charsetSentinel&&(\"iso-8859-1\"===$.charset?de+=\"utf8=%26%2310003%3B&\":de+=\"utf8=%E2%9C%93&\"),pe.length>0?de+pe:\"\"}},37720:(s,i,u)=>{\"use strict\";var _=u(74765),w=Object.prototype.hasOwnProperty,x=Array.isArray,j=function(){for(var s=[],i=0;i<256;++i)s.push(\"%\"+((i<16?\"0\":\"\")+i.toString(16)).toUpperCase());return s}(),P=function arrayToObject(s,i){for(var u=i&&i.plainObjects?Object.create(null):{},_=0;_<s.length;++_)void 0!==s[_]&&(u[_]=s[_]);return u};s.exports={arrayToObject:P,assign:function assignSingleSource(s,i){return Object.keys(i).reduce((function(s,u){return s[u]=i[u],s}),s)},combine:function combine(s,i){return[].concat(s,i)},compact:function compact(s){for(var i=[{obj:{o:s},prop:\"o\"}],u=[],_=0;_<i.length;++_)for(var w=i[_],j=w.obj[w.prop],P=Object.keys(j),B=0;B<P.length;++B){var $=P[B],U=j[$];\"object\"==typeof U&&null!==U&&-1===u.indexOf(U)&&(i.push({obj:j,prop:$}),u.push(U))}return function compactQueue(s){for(;s.length>1;){var i=s.pop(),u=i.obj[i.prop];if(x(u)){for(var _=[],w=0;w<u.length;++w)void 0!==u[w]&&_.push(u[w]);i.obj[i.prop]=_}}}(i),s},decode:function(s,i,u){var _=s.replace(/\\+/g,\" \");if(\"iso-8859-1\"===u)return _.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(_)}catch(s){return _}},encode:function encode(s,i,u,w,x){if(0===s.length)return s;var P=s;if(\"symbol\"==typeof s?P=Symbol.prototype.toString.call(s):\"string\"!=typeof s&&(P=String(s)),\"iso-8859-1\"===u)return escape(P).replace(/%u[0-9a-f]{4}/gi,(function(s){return\"%26%23\"+parseInt(s.slice(2),16)+\"%3B\"}));for(var B=\"\",$=0;$<P.length;++$){var U=P.charCodeAt($);45===U||46===U||95===U||126===U||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||x===_.RFC1738&&(40===U||41===U)?B+=P.charAt($):U<128?B+=j[U]:U<2048?B+=j[192|U>>6]+j[128|63&U]:U<55296||U>=57344?B+=j[224|U>>12]+j[128|U>>6&63]+j[128|63&U]:($+=1,U=65536+((1023&U)<<10|1023&P.charCodeAt($)),B+=j[240|U>>18]+j[128|U>>12&63]+j[128|U>>6&63]+j[128|63&U])}return B},isBuffer:function isBuffer(s){return!(!s||\"object\"!=typeof s)&&!!(s.constructor&&s.constructor.isBuffer&&s.constructor.isBuffer(s))},isRegExp:function isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)},maybeMap:function maybeMap(s,i){if(x(s)){for(var u=[],_=0;_<s.length;_+=1)u.push(i(s[_]));return u}return i(s)},merge:function merge(s,i,u){if(!i)return s;if(\"object\"!=typeof i){if(x(s))s.push(i);else{if(!s||\"object\"!=typeof s)return[s,i];(u&&(u.plainObjects||u.allowPrototypes)||!w.call(Object.prototype,i))&&(s[i]=!0)}return s}if(!s||\"object\"!=typeof s)return[s].concat(i);var _=s;return x(s)&&!x(i)&&(_=P(s,u)),x(s)&&x(i)?(i.forEach((function(i,_){if(w.call(s,_)){var x=s[_];x&&\"object\"==typeof x&&i&&\"object\"==typeof i?s[_]=merge(x,i,u):s.push(i)}else s[_]=i})),s):Object.keys(i).reduce((function(s,_){var x=i[_];return w.call(s,_)?s[_]=merge(s[_],x,u):s[_]=x,s}),_)}}},73992:(s,i)=>{\"use strict\";var u=Object.prototype.hasOwnProperty;function decode(s){try{return decodeURIComponent(s.replace(/\\+/g,\" \"))}catch(s){return null}}function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}i.stringify=function querystringify(s,i){i=i||\"\";var _,w,x=[];for(w in\"string\"!=typeof i&&(i=\"?\"),s)if(u.call(s,w)){if((_=s[w])||null!=_&&!isNaN(_)||(_=\"\"),w=encode(w),_=encode(_),null===w||null===_)continue;x.push(w+\"=\"+_)}return x.length?i+x.join(\"&\"):\"\"},i.parse=function querystring(s){for(var i,u=/([^=?#&]+)=?([^&]*)/g,_={};i=u.exec(s);){var w=decode(i[1]),x=decode(i[2]);null===w||null===x||w in _||(_[w]=x)}return _}},41859:(s,i,u)=>{const _=u(27096),w=u(78004),x=_.types;s.exports=class RandExp{constructor(s,i){if(this._setDefaults(s),s instanceof RegExp)this.ignoreCase=s.ignoreCase,this.multiline=s.multiline,s=s.source;else{if(\"string\"!=typeof s)throw new Error(\"Expected a regexp or string\");this.ignoreCase=i&&-1!==i.indexOf(\"i\"),this.multiline=i&&-1!==i.indexOf(\"m\")}this.tokens=_(s)}_setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=s.defaultRange?s.defaultRange:this.defaultRange.clone(),s.randInt&&(this.randInt=s.randInt)}gen(){return this._gen(this.tokens,[])}_gen(s,i){var u,_,w,j,P;switch(s.type){case x.ROOT:case x.GROUP:if(s.followedBy||s.notFollowedBy)return\"\";for(s.remember&&void 0===s.groupNumber&&(s.groupNumber=i.push(null)-1),_=\"\",j=0,P=(u=s.options?this._randSelect(s.options):s.stack).length;j<P;j++)_+=this._gen(u[j],i);return s.remember&&(i[s.groupNumber]=_),_;case x.POSITION:return\"\";case x.SET:var B=this._expand(s);return B.length?String.fromCharCode(this._randSelect(B)):\"\";case x.REPETITION:for(w=this.randInt(s.min,s.max===1/0?s.min+this.max:s.max),_=\"\",j=0;j<w;j++)_+=this._gen(s.value,i);return _;case x.REFERENCE:return i[s.value-1]||\"\";case x.CHAR:var $=this.ignoreCase&&this._randBool()?this._toOtherCase(s.value):s.value;return String.fromCharCode($)}}_toOtherCase(s){return s+(97<=s&&s<=122?-32:65<=s&&s<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(s){return s instanceof w?s.index(this.randInt(0,s.length-1)):s[this.randInt(0,s.length-1)]}_expand(s){if(s.type===_.types.CHAR)return new w(s.value);if(s.type===_.types.RANGE)return new w(s.from,s.to);{let i=new w;for(let u=0;u<s.set.length;u++){let _=this._expand(s.set[u]);if(i.add(_),this.ignoreCase)for(let s=0;s<_.length;s++){let u=_.index(s),w=this._toOtherCase(u);u!==w&&i.add(w)}}return s.not?this.defaultRange.clone().subtract(i):this.defaultRange.clone().intersect(i)}}randInt(s,i){return s+Math.floor(Math.random()*(1+i-s))}get defaultRange(){return this._range=this._range||new w(32,126)}set defaultRange(s){this._range=s}static randexp(s,i){var u;return\"string\"==typeof s&&(s=new RegExp(s,i)),void 0===s._randexp?(u=new RandExp(s,i),s._randexp=u):(u=s._randexp)._setDefaults(s),u.gen()}static sugar(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}}}},53209:(s,i,u)=>{\"use strict\";var _=u(65606),w=65536,x=4294967295;var j=u(92861).Buffer,P=u.g.crypto||u.g.msCrypto;P&&P.getRandomValues?s.exports=function randomBytes(s,i){if(s>x)throw new RangeError(\"requested too many random bytes\");var u=j.allocUnsafe(s);if(s>0)if(s>w)for(var B=0;B<s;B+=w)P.getRandomValues(u.slice(B,B+w));else P.getRandomValues(u);if(\"function\"==typeof i)return _.nextTick((function(){i(null,u)}));return u}:s.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},25264:(s,i,u)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(i,\"__esModule\",{value:!0}),i.CopyToClipboard=void 0;var _=_interopRequireDefault(u(96540)),w=_interopRequireDefault(u(17965)),x=[\"text\",\"onCopy\",\"options\",\"children\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _createSuper(s){var i=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var u,_=_getPrototypeOf(s);if(i){var w=_getPrototypeOf(this).constructor;u=Reflect.construct(_,arguments,w)}else u=_.apply(this,arguments);return function _possibleConstructorReturn(s,i){if(i&&(\"object\"===_typeof(i)||\"function\"==typeof i))return i;if(void 0!==i)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,u)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var j=function(s){!function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),i&&_setPrototypeOf(s,i)}(CopyToClipboard,s);var i=_createSuper(CopyToClipboard);function CopyToClipboard(){var s;!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,CopyToClipboard);for(var u=arguments.length,x=new Array(u),j=0;j<u;j++)x[j]=arguments[j];return _defineProperty(_assertThisInitialized(s=i.call.apply(i,[this].concat(x))),\"onClick\",(function(i){var u=s.props,x=u.text,j=u.onCopy,P=u.children,B=u.options,$=_.default.Children.only(P),U=(0,w.default)(x,B);j&&j(x,U),$&&$.props&&\"function\"==typeof $.props.onClick&&$.props.onClick(i)})),s}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(CopyToClipboard,[{key:\"render\",value:function render(){var s=this.props,i=(s.text,s.onCopy,s.options,s.children),u=_objectWithoutProperties(s,x),w=_.default.Children.only(i);return _.default.cloneElement(w,_objectSpread(_objectSpread({},u),{},{onClick:this.onClick}))}}]),CopyToClipboard}(_.default.PureComponent);i.CopyToClipboard=j,_defineProperty(j,\"defaultProps\",{onCopy:void 0,options:void 0})},59399:(s,i,u)=>{\"use strict\";var _=u(25264).CopyToClipboard;_.CopyToClipboard=_,s.exports=_},81214:(s,i,u)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(i,\"__esModule\",{value:!0}),i.DebounceInput=void 0;var _=_interopRequireDefault(u(96540)),w=_interopRequireDefault(u(20181)),x=[\"element\",\"onChange\",\"value\",\"minLength\",\"debounceTimeout\",\"forceNotifyByEnter\",\"forceNotifyOnBlur\",\"onKeyDown\",\"onBlur\",\"inputRef\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _createSuper(s){var i=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var u,_=_getPrototypeOf(s);if(i){var w=_getPrototypeOf(this).constructor;u=Reflect.construct(_,arguments,w)}else u=_.apply(this,arguments);return function _possibleConstructorReturn(s,i){if(i&&(\"object\"===_typeof(i)||\"function\"==typeof i))return i;if(void 0!==i)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,u)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var j=function(s){!function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),i&&_setPrototypeOf(s,i)}(DebounceInput,s);var i=_createSuper(DebounceInput);function DebounceInput(s){var u;!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,DebounceInput),_defineProperty(_assertThisInitialized(u=i.call(this,s)),\"onChange\",(function(s){s.persist();var i=u.state.value,_=u.props.minLength;u.setState({value:s.target.value},(function(){var w=u.state.value;w.length>=_?u.notify(s):i.length>w.length&&u.notify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:\"\"})}))}))})),_defineProperty(_assertThisInitialized(u),\"onKeyDown\",(function(s){\"Enter\"===s.key&&u.forceNotify(s);var i=u.props.onKeyDown;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),\"onBlur\",(function(s){u.forceNotify(s);var i=u.props.onBlur;i&&(s.persist(),i(s))})),_defineProperty(_assertThisInitialized(u),\"createNotifier\",(function(s){if(s<0)u.notify=function(){return null};else if(0===s)u.notify=u.doNotify;else{var i=(0,w.default)((function(s){u.isDebouncing=!1,u.doNotify(s)}),s);u.notify=function(s){u.isDebouncing=!0,i(s)},u.flush=function(){return i.flush()},u.cancel=function(){u.isDebouncing=!1,i.cancel()}}})),_defineProperty(_assertThisInitialized(u),\"doNotify\",(function(){u.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(u),\"forceNotify\",(function(s){var i=u.props.debounceTimeout;if(u.isDebouncing||!(i>0)){u.cancel&&u.cancel();var _=u.state.value,w=u.props.minLength;_.length>=w?u.doNotify(s):u.doNotify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:_})}))}})),u.isDebouncing=!1,u.state={value:void 0===s.value||null===s.value?\"\":s.value};var _=u.props.debounceTimeout;return u.createNotifier(_),u}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(DebounceInput,[{key:\"componentDidUpdate\",value:function componentDidUpdate(s){if(!this.isDebouncing){var i=this.props,u=i.value,_=i.debounceTimeout,w=s.debounceTimeout,x=s.value,j=this.state.value;void 0!==u&&x!==u&&j!==u&&this.setState({value:u}),_!==w&&this.createNotifier(_)}}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:\"render\",value:function render(){var s,i,u=this.props,w=u.element,j=(u.onChange,u.value,u.minLength,u.debounceTimeout,u.forceNotifyByEnter),P=u.forceNotifyOnBlur,B=u.onKeyDown,$=u.onBlur,U=u.inputRef,Y=_objectWithoutProperties(u,x),X=this.state.value;s=j?{onKeyDown:this.onKeyDown}:B?{onKeyDown:B}:{},i=P?{onBlur:this.onBlur}:$?{onBlur:$}:{};var Z=U?{ref:U}:{};return _.default.createElement(w,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},Y),{},{onChange:this.onChange,value:X},s),i),Z))}}]),DebounceInput}(_.default.PureComponent);i.DebounceInput=j,_defineProperty(j,\"defaultProps\",{element:\"input\",type:\"text\",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},24677:(s,i,u)=>{\"use strict\";var _=u(81214).DebounceInput;_.DebounceInput=_,s.exports=_},22551:(s,i,u)=>{\"use strict\";var _=u(96540),w=u(69982);function p(s){for(var i=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+s,u=1;u<arguments.length;u++)i+=\"&args[]=\"+encodeURIComponent(arguments[u]);return\"Minified React error #\"+s+\"; visit \"+i+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var x=new Set,j={};function fa(s,i){ha(s,i),ha(s+\"Capture\",i)}function ha(s,i){for(j[s]=i,s=0;s<i.length;s++)x.add(i[s])}var P=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),B=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,U={},Y={};function v(s,i,u,_,w,x,j){this.acceptsBooleans=2===i||3===i||4===i,this.attributeName=_,this.attributeNamespace=w,this.mustUseProperty=u,this.propertyName=s,this.type=i,this.sanitizeURL=x,this.removeEmptyString=j}var X={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(s){X[s]=new v(s,0,!1,s,null,!1,!1)})),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(s){var i=s[0];X[i]=new v(i,1,!1,s[1],null,!1,!1)})),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(s){X[s]=new v(s,2,!1,s.toLowerCase(),null,!1,!1)})),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(s){X[s]=new v(s,2,!1,s,null,!1,!1)})),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(s){X[s]=new v(s,3,!1,s.toLowerCase(),null,!1,!1)})),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(s){X[s]=new v(s,3,!0,s,null,!1,!1)})),[\"capture\",\"download\"].forEach((function(s){X[s]=new v(s,4,!1,s,null,!1,!1)})),[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(s){X[s]=new v(s,6,!1,s,null,!1,!1)})),[\"rowSpan\",\"start\"].forEach((function(s){X[s]=new v(s,5,!1,s.toLowerCase(),null,!1,!1)}));var Z=/[\\-:]([a-z])/g;function sa(s){return s[1].toUpperCase()}function ta(s,i,u,_){var w=X.hasOwnProperty(i)?X[i]:null;(null!==w?0!==w.type:_||!(2<i.length)||\"o\"!==i[0]&&\"O\"!==i[0]||\"n\"!==i[1]&&\"N\"!==i[1])&&(function qa(s,i,u,_){if(null==i||function pa(s,i,u,_){if(null!==u&&0===u.type)return!1;switch(typeof i){case\"function\":case\"symbol\":return!0;case\"boolean\":return!_&&(null!==u?!u.acceptsBooleans:\"data-\"!==(s=s.toLowerCase().slice(0,5))&&\"aria-\"!==s);default:return!1}}(s,i,u,_))return!0;if(_)return!1;if(null!==u)switch(u.type){case 3:return!i;case 4:return!1===i;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}(i,u,w,_)&&(u=null),_||null===w?function oa(s){return!!B.call(Y,s)||!B.call(U,s)&&($.test(s)?Y[s]=!0:(U[s]=!0,!1))}(i)&&(null===u?s.removeAttribute(i):s.setAttribute(i,\"\"+u)):w.mustUseProperty?s[w.propertyName]=null===u?3!==w.type&&\"\":u:(i=w.attributeName,_=w.attributeNamespace,null===u?s.removeAttribute(i):(u=3===(w=w.type)||4===w&&!0===u?\"\":\"\"+u,_?s.setAttributeNS(_,i,u):s.setAttribute(i,u))))}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,null,!1,!1)})),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,\"http://www.w3.org/1999/xlink\",!1,!1)})),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(s){var i=s.replace(Z,sa);X[i]=new v(i,1,!1,s,\"http://www.w3.org/XML/1998/namespace\",!1,!1)})),[\"tabIndex\",\"crossOrigin\"].forEach((function(s){X[s]=new v(s,1,!1,s.toLowerCase(),null,!1,!1)})),X.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(s){X[s]=new v(s,1,!1,s.toLowerCase(),null,!0,!0)}));var ee=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ie=Symbol.for(\"react.element\"),ae=Symbol.for(\"react.portal\"),le=Symbol.for(\"react.fragment\"),ce=Symbol.for(\"react.strict_mode\"),pe=Symbol.for(\"react.profiler\"),de=Symbol.for(\"react.provider\"),fe=Symbol.for(\"react.context\"),ye=Symbol.for(\"react.forward_ref\"),be=Symbol.for(\"react.suspense\"),_e=Symbol.for(\"react.suspense_list\"),we=Symbol.for(\"react.memo\"),Se=Symbol.for(\"react.lazy\");Symbol.for(\"react.scope\"),Symbol.for(\"react.debug_trace_mode\");var xe=Symbol.for(\"react.offscreen\");Symbol.for(\"react.legacy_hidden\"),Symbol.for(\"react.cache\"),Symbol.for(\"react.tracing_marker\");var Pe=Symbol.iterator;function Ka(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=Pe&&s[Pe]||s[\"@@iterator\"])?s:null}var Te,Re=Object.assign;function Ma(s){if(void 0===Te)try{throw Error()}catch(s){var i=s.stack.trim().match(/\\n( *(at )?)/);Te=i&&i[1]||\"\"}return\"\\n\"+Te+s}var qe=!1;function Oa(s,i){if(!s||qe)return\"\";qe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(s){var _=s}Reflect.construct(s,[],i)}else{try{i.call()}catch(s){_=s}s.call(i.prototype)}else{try{throw Error()}catch(s){_=s}s()}}catch(i){if(i&&_&&\"string\"==typeof i.stack){for(var w=i.stack.split(\"\\n\"),x=_.stack.split(\"\\n\"),j=w.length-1,P=x.length-1;1<=j&&0<=P&&w[j]!==x[P];)P--;for(;1<=j&&0<=P;j--,P--)if(w[j]!==x[P]){if(1!==j||1!==P)do{if(j--,0>--P||w[j]!==x[P]){var B=\"\\n\"+w[j].replace(\" at new \",\" at \");return s.displayName&&B.includes(\"<anonymous>\")&&(B=B.replace(\"<anonymous>\",s.displayName)),B}}while(1<=j&&0<=P);break}}}finally{qe=!1,Error.prepareStackTrace=u}return(s=s?s.displayName||s.name:\"\")?Ma(s):\"\"}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return s=Oa(s.type,!1);case 11:return s=Oa(s.type.render,!1);case 1:return s=Oa(s.type,!0);default:return\"\"}}function Qa(s){if(null==s)return null;if(\"function\"==typeof s)return s.displayName||s.name||null;if(\"string\"==typeof s)return s;switch(s){case le:return\"Fragment\";case ae:return\"Portal\";case pe:return\"Profiler\";case ce:return\"StrictMode\";case be:return\"Suspense\";case _e:return\"SuspenseList\"}if(\"object\"==typeof s)switch(s.$$typeof){case fe:return(s.displayName||\"Context\")+\".Consumer\";case de:return(s._context.displayName||\"Context\")+\".Provider\";case ye:var i=s.render;return(s=s.displayName)||(s=\"\"!==(s=i.displayName||i.name||\"\")?\"ForwardRef(\"+s+\")\":\"ForwardRef\"),s;case we:return null!==(i=s.displayName||null)?i:Qa(s.type)||\"Memo\";case Se:i=s._payload,s=s._init;try{return Qa(s(i))}catch(s){}}return null}function Ra(s){var i=s.type;switch(s.tag){case 24:return\"Cache\";case 9:return(i.displayName||\"Context\")+\".Consumer\";case 10:return(i._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return s=(s=i.render).displayName||s.name||\"\",i.displayName||(\"\"!==s?\"ForwardRef(\"+s+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return i;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(i);case 8:return i===ce?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"==typeof i)return i.displayName||i.name||null;if(\"string\"==typeof i)return i}return null}function Sa(s){switch(typeof s){case\"boolean\":case\"number\":case\"string\":case\"undefined\":case\"object\":return s;default:return\"\"}}function Ta(s){var i=s.type;return(s=s.nodeName)&&\"input\"===s.toLowerCase()&&(\"checkbox\"===i||\"radio\"===i)}function Va(s){s._valueTracker||(s._valueTracker=function Ua(s){var i=Ta(s)?\"checked\":\"value\",u=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),_=\"\"+s[i];if(!s.hasOwnProperty(i)&&void 0!==u&&\"function\"==typeof u.get&&\"function\"==typeof u.set){var w=u.get,x=u.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return w.call(this)},set:function(s){_=\"\"+s,x.call(this,s)}}),Object.defineProperty(s,i,{enumerable:u.enumerable}),{getValue:function(){return _},setValue:function(s){_=\"\"+s},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}(s))}function Wa(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var u=i.getValue(),_=\"\";return s&&(_=Ta(s)?s.checked?\"true\":\"false\":s.value),(s=_)!==u&&(i.setValue(s),!0)}function Xa(s){if(void 0===(s=s||(\"undefined\"!=typeof document?document:void 0)))return null;try{return s.activeElement||s.body}catch(i){return s.body}}function Ya(s,i){var u=i.checked;return Re({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=u?u:s._wrapperState.initialChecked})}function Za(s,i){var u=null==i.defaultValue?\"\":i.defaultValue,_=null!=i.checked?i.checked:i.defaultChecked;u=Sa(null!=i.value?i.value:u),s._wrapperState={initialChecked:_,initialValue:u,controlled:\"checkbox\"===i.type||\"radio\"===i.type?null!=i.checked:null!=i.value}}function ab(s,i){null!=(i=i.checked)&&ta(s,\"checked\",i,!1)}function bb(s,i){ab(s,i);var u=Sa(i.value),_=i.type;if(null!=u)\"number\"===_?(0===u&&\"\"===s.value||s.value!=u)&&(s.value=\"\"+u):s.value!==\"\"+u&&(s.value=\"\"+u);else if(\"submit\"===_||\"reset\"===_)return void s.removeAttribute(\"value\");i.hasOwnProperty(\"value\")?cb(s,i.type,u):i.hasOwnProperty(\"defaultValue\")&&cb(s,i.type,Sa(i.defaultValue)),null==i.checked&&null!=i.defaultChecked&&(s.defaultChecked=!!i.defaultChecked)}function db(s,i,u){if(i.hasOwnProperty(\"value\")||i.hasOwnProperty(\"defaultValue\")){var _=i.type;if(!(\"submit\"!==_&&\"reset\"!==_||void 0!==i.value&&null!==i.value))return;i=\"\"+s._wrapperState.initialValue,u||i===s.value||(s.value=i),s.defaultValue=i}\"\"!==(u=s.name)&&(s.name=\"\"),s.defaultChecked=!!s._wrapperState.initialChecked,\"\"!==u&&(s.name=u)}function cb(s,i,u){\"number\"===i&&Xa(s.ownerDocument)===s||(null==u?s.defaultValue=\"\"+s._wrapperState.initialValue:s.defaultValue!==\"\"+u&&(s.defaultValue=\"\"+u))}var $e=Array.isArray;function fb(s,i,u,_){if(s=s.options,i){i={};for(var w=0;w<u.length;w++)i[\"$\"+u[w]]=!0;for(u=0;u<s.length;u++)w=i.hasOwnProperty(\"$\"+s[u].value),s[u].selected!==w&&(s[u].selected=w),w&&_&&(s[u].defaultSelected=!0)}else{for(u=\"\"+Sa(u),i=null,w=0;w<s.length;w++){if(s[w].value===u)return s[w].selected=!0,void(_&&(s[w].defaultSelected=!0));null!==i||s[w].disabled||(i=s[w])}null!==i&&(i.selected=!0)}}function gb(s,i){if(null!=i.dangerouslySetInnerHTML)throw Error(p(91));return Re({},i,{value:void 0,defaultValue:void 0,children:\"\"+s._wrapperState.initialValue})}function hb(s,i){var u=i.value;if(null==u){if(u=i.children,i=i.defaultValue,null!=u){if(null!=i)throw Error(p(92));if($e(u)){if(1<u.length)throw Error(p(93));u=u[0]}i=u}null==i&&(i=\"\"),u=i}s._wrapperState={initialValue:Sa(u)}}function ib(s,i){var u=Sa(i.value),_=Sa(i.defaultValue);null!=u&&((u=\"\"+u)!==s.value&&(s.value=u),null==i.defaultValue&&s.defaultValue!==u&&(s.defaultValue=u)),null!=_&&(s.defaultValue=\"\"+_)}function jb(s){var i=s.textContent;i===s._wrapperState.initialValue&&\"\"!==i&&null!==i&&(s.value=i)}function kb(s){switch(s){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function lb(s,i){return null==s||\"http://www.w3.org/1999/xhtml\"===s?kb(i):\"http://www.w3.org/2000/svg\"===s&&\"foreignObject\"===i?\"http://www.w3.org/1999/xhtml\":s}var ze,We,He=(We=function(s,i){if(\"http://www.w3.org/2000/svg\"!==s.namespaceURI||\"innerHTML\"in s)s.innerHTML=i;else{for((ze=ze||document.createElement(\"div\")).innerHTML=\"<svg>\"+i.valueOf().toString()+\"</svg>\",i=ze.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(s,i,u,_){MSApp.execUnsafeLocalFunction((function(){return We(s,i)}))}:We);function ob(s,i){if(i){var u=s.firstChild;if(u&&u===s.lastChild&&3===u.nodeType)return void(u.nodeValue=i)}s.textContent=i}var Ye={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xe=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function rb(s,i,u){return null==i||\"boolean\"==typeof i||\"\"===i?\"\":u||\"number\"!=typeof i||0===i||Ye.hasOwnProperty(s)&&Ye[s]?(\"\"+i).trim():i+\"px\"}function sb(s,i){for(var u in s=s.style,i)if(i.hasOwnProperty(u)){var _=0===u.indexOf(\"--\"),w=rb(u,i[u],_);\"float\"===u&&(u=\"cssFloat\"),_?s.setProperty(u,w):s[u]=w}}Object.keys(Ye).forEach((function(s){Xe.forEach((function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),Ye[i]=Ye[s]}))}));var Qe=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(s,i){if(i){if(Qe[s]&&(null!=i.children||null!=i.dangerouslySetInnerHTML))throw Error(p(137,s));if(null!=i.dangerouslySetInnerHTML){if(null!=i.children)throw Error(p(60));if(\"object\"!=typeof i.dangerouslySetInnerHTML||!(\"__html\"in i.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=i.style&&\"object\"!=typeof i.style)throw Error(p(62))}}function vb(s,i){if(-1===s.indexOf(\"-\"))return\"string\"==typeof i.is;switch(s){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var et=null;function xb(s){return(s=s.target||s.srcElement||window).correspondingUseElement&&(s=s.correspondingUseElement),3===s.nodeType?s.parentNode:s}var tt=null,rt=null,nt=null;function Bb(s){if(s=Cb(s)){if(\"function\"!=typeof tt)throw Error(p(280));var i=s.stateNode;i&&(i=Db(i),tt(s.stateNode,s.type,i))}}function Eb(s){rt?nt?nt.push(s):nt=[s]:rt=s}function Fb(){if(rt){var s=rt,i=nt;if(nt=rt=null,Bb(s),i)for(s=0;s<i.length;s++)Bb(i[s])}}function Gb(s,i){return s(i)}function Hb(){}var ot=!1;function Jb(s,i,u){if(ot)return s(i,u);ot=!0;try{return Gb(s,i,u)}finally{ot=!1,(null!==rt||null!==nt)&&(Hb(),Fb())}}function Kb(s,i){var u=s.stateNode;if(null===u)return null;var _=Db(u);if(null===_)return null;u=_[i];e:switch(i){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(_=!_.disabled)||(_=!(\"button\"===(s=s.type)||\"input\"===s||\"select\"===s||\"textarea\"===s)),s=!_;break e;default:s=!1}if(s)return null;if(u&&\"function\"!=typeof u)throw Error(p(231,i,typeof u));return u}var st=!1;if(P)try{var it={};Object.defineProperty(it,\"passive\",{get:function(){st=!0}}),window.addEventListener(\"test\",it,it),window.removeEventListener(\"test\",it,it)}catch(We){st=!1}function Nb(s,i,u,_,w,x,j,P,B){var $=Array.prototype.slice.call(arguments,3);try{i.apply(u,$)}catch(s){this.onError(s)}}var at=!1,lt=null,ct=!1,ut=null,pt={onError:function(s){at=!0,lt=s}};function Tb(s,i,u,_,w,x,j,P,B){at=!1,lt=null,Nb.apply(pt,arguments)}function Vb(s){var i=s,u=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do{0!=(4098&(i=s).flags)&&(u=i.return),s=i.return}while(s)}return 3===i.tag?u:null}function Wb(s){if(13===s.tag){var i=s.memoizedState;if(null===i&&(null!==(s=s.alternate)&&(i=s.memoizedState)),null!==i)return i.dehydrated}return null}function Xb(s){if(Vb(s)!==s)throw Error(p(188))}function Zb(s){return null!==(s=function Yb(s){var i=s.alternate;if(!i){if(null===(i=Vb(s)))throw Error(p(188));return i!==s?null:s}for(var u=s,_=i;;){var w=u.return;if(null===w)break;var x=w.alternate;if(null===x){if(null!==(_=w.return)){u=_;continue}break}if(w.child===x.child){for(x=w.child;x;){if(x===u)return Xb(w),s;if(x===_)return Xb(w),i;x=x.sibling}throw Error(p(188))}if(u.return!==_.return)u=w,_=x;else{for(var j=!1,P=w.child;P;){if(P===u){j=!0,u=w,_=x;break}if(P===_){j=!0,_=w,u=x;break}P=P.sibling}if(!j){for(P=x.child;P;){if(P===u){j=!0,u=x,_=w;break}if(P===_){j=!0,_=x,u=w;break}P=P.sibling}if(!j)throw Error(p(189))}}if(u.alternate!==_)throw Error(p(190))}if(3!==u.tag)throw Error(p(188));return u.stateNode.current===u?s:i}(s))?$b(s):null}function $b(s){if(5===s.tag||6===s.tag)return s;for(s=s.child;null!==s;){var i=$b(s);if(null!==i)return i;s=s.sibling}return null}var ht=w.unstable_scheduleCallback,dt=w.unstable_cancelCallback,mt=w.unstable_shouldYield,gt=w.unstable_requestPaint,yt=w.unstable_now,vt=w.unstable_getCurrentPriorityLevel,bt=w.unstable_ImmediatePriority,_t=w.unstable_UserBlockingPriority,Et=w.unstable_NormalPriority,wt=w.unstable_LowPriority,St=w.unstable_IdlePriority,xt=null,kt=null;var Ot=Math.clz32?Math.clz32:function nc(s){return s>>>=0,0===s?32:31-(Ct(s)/At|0)|0},Ct=Math.log,At=Math.LN2;var jt=64,Pt=4194304;function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&s;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&s;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,i){var u=s.pendingLanes;if(0===u)return 0;var _=0,w=s.suspendedLanes,x=s.pingedLanes,j=268435455&u;if(0!==j){var P=j&~w;0!==P?_=tc(P):0!==(x&=j)&&(_=tc(x))}else 0!==(j=u&~w)?_=tc(j):0!==x&&(_=tc(x));if(0===_)return 0;if(0!==i&&i!==_&&0==(i&w)&&((w=_&-_)>=(x=i&-i)||16===w&&0!=(4194240&x)))return i;if(0!=(4&_)&&(_|=16&u),0!==(i=s.entangledLanes))for(s=s.entanglements,i&=_;0<i;)w=1<<(u=31-Ot(i)),_|=s[u],i&=~w;return _}function vc(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;default:return-1}}function xc(s){return 0!==(s=-1073741825&s.pendingLanes)?s:1073741824&s?1073741824:0}function yc(){var s=jt;return 0==(4194240&(jt<<=1))&&(jt=64),s}function zc(s){for(var i=[],u=0;31>u;u++)i.push(s);return i}function Ac(s,i,u){s.pendingLanes|=i,536870912!==i&&(s.suspendedLanes=0,s.pingedLanes=0),(s=s.eventTimes)[i=31-Ot(i)]=u}function Cc(s,i){var u=s.entangledLanes|=i;for(s=s.entanglements;u;){var _=31-Ot(u),w=1<<_;w&i|s[_]&i&&(s[_]|=i),u&=~w}}var It=0;function Dc(s){return 1<(s&=-s)?4<s?0!=(268435455&s)?16:536870912:4:1}var Nt,Mt,Tt,Rt,Dt,Lt=!1,Bt=[],Ft=null,qt=null,$t=null,Ut=new Map,zt=new Map,Vt=[],Wt=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function Sc(s,i){switch(s){case\"focusin\":case\"focusout\":Ft=null;break;case\"dragenter\":case\"dragleave\":qt=null;break;case\"mouseover\":case\"mouseout\":$t=null;break;case\"pointerover\":case\"pointerout\":Ut.delete(i.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":zt.delete(i.pointerId)}}function Tc(s,i,u,_,w,x){return null===s||s.nativeEvent!==x?(s={blockedOn:i,domEventName:u,eventSystemFlags:_,nativeEvent:x,targetContainers:[w]},null!==i&&(null!==(i=Cb(i))&&Mt(i)),s):(s.eventSystemFlags|=_,i=s.targetContainers,null!==w&&-1===i.indexOf(w)&&i.push(w),s)}function Vc(s){var i=Wc(s.target);if(null!==i){var u=Vb(i);if(null!==u)if(13===(i=u.tag)){if(null!==(i=Wb(u)))return s.blockedOn=i,void Dt(s.priority,(function(){Tt(u)}))}else if(3===i&&u.stateNode.current.memoizedState.isDehydrated)return void(s.blockedOn=3===u.tag?u.stateNode.containerInfo:null)}s.blockedOn=null}function Xc(s){if(null!==s.blockedOn)return!1;for(var i=s.targetContainers;0<i.length;){var u=Yc(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(null!==u)return null!==(i=Cb(u))&&Mt(i),s.blockedOn=u,!1;var _=new(u=s.nativeEvent).constructor(u.type,u);et=_,u.target.dispatchEvent(_),et=null,i.shift()}return!0}function Zc(s,i,u){Xc(s)&&u.delete(i)}function $c(){Lt=!1,null!==Ft&&Xc(Ft)&&(Ft=null),null!==qt&&Xc(qt)&&(qt=null),null!==$t&&Xc($t)&&($t=null),Ut.forEach(Zc),zt.forEach(Zc)}function ad(s,i){s.blockedOn===i&&(s.blockedOn=null,Lt||(Lt=!0,w.unstable_scheduleCallback(w.unstable_NormalPriority,$c)))}function bd(s){function b(i){return ad(i,s)}if(0<Bt.length){ad(Bt[0],s);for(var i=1;i<Bt.length;i++){var u=Bt[i];u.blockedOn===s&&(u.blockedOn=null)}}for(null!==Ft&&ad(Ft,s),null!==qt&&ad(qt,s),null!==$t&&ad($t,s),Ut.forEach(b),zt.forEach(b),i=0;i<Vt.length;i++)(u=Vt[i]).blockedOn===s&&(u.blockedOn=null);for(;0<Vt.length&&null===(i=Vt[0]).blockedOn;)Vc(i),null===i.blockedOn&&Vt.shift()}var Kt=ee.ReactCurrentBatchConfig,Ht=!0;function ed(s,i,u,_){var w=It,x=Kt.transition;Kt.transition=null;try{It=1,fd(s,i,u,_)}finally{It=w,Kt.transition=x}}function gd(s,i,u,_){var w=It,x=Kt.transition;Kt.transition=null;try{It=4,fd(s,i,u,_)}finally{It=w,Kt.transition=x}}function fd(s,i,u,_){if(Ht){var w=Yc(s,i,u,_);if(null===w)hd(s,i,_,Jt,u),Sc(s,_);else if(function Uc(s,i,u,_,w){switch(i){case\"focusin\":return Ft=Tc(Ft,s,i,u,_,w),!0;case\"dragenter\":return qt=Tc(qt,s,i,u,_,w),!0;case\"mouseover\":return $t=Tc($t,s,i,u,_,w),!0;case\"pointerover\":var x=w.pointerId;return Ut.set(x,Tc(Ut.get(x)||null,s,i,u,_,w)),!0;case\"gotpointercapture\":return x=w.pointerId,zt.set(x,Tc(zt.get(x)||null,s,i,u,_,w)),!0}return!1}(w,s,i,u,_))_.stopPropagation();else if(Sc(s,_),4&i&&-1<Wt.indexOf(s)){for(;null!==w;){var x=Cb(w);if(null!==x&&Nt(x),null===(x=Yc(s,i,u,_))&&hd(s,i,_,Jt,u),x===w)break;w=x}null!==w&&_.stopPropagation()}else hd(s,i,_,null,u)}}var Jt=null;function Yc(s,i,u,_){if(Jt=null,null!==(s=Wc(s=xb(_))))if(null===(i=Vb(s)))s=null;else if(13===(u=i.tag)){if(null!==(s=Wb(i)))return s;s=null}else if(3===u){if(i.stateNode.current.memoizedState.isDehydrated)return 3===i.tag?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return Jt=s,null}function jd(s){switch(s){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(vt()){case bt:return 1;case _t:return 4;case Et:case wt:return 16;case St:return 536870912;default:return 16}default:return 16}}var Gt=null,Yt=null,Xt=null;function nd(){if(Xt)return Xt;var s,i,u=Yt,_=u.length,w=\"value\"in Gt?Gt.value:Gt.textContent,x=w.length;for(s=0;s<_&&u[s]===w[s];s++);var j=_-s;for(i=1;i<=j&&u[_-i]===w[x-i];i++);return Xt=w.slice(s,1<i?1-i:void 0)}function od(s){var i=s.keyCode;return\"charCode\"in s?0===(s=s.charCode)&&13===i&&(s=13):s=i,10===s&&(s=13),32<=s||13===s?s:0}function pd(){return!0}function qd(){return!1}function rd(s){function b(i,u,_,w,x){for(var j in this._reactName=i,this._targetInst=_,this.type=u,this.nativeEvent=w,this.target=x,this.currentTarget=null,s)s.hasOwnProperty(j)&&(i=s[j],this[j]=i?i(w):w[j]);return this.isDefaultPrevented=(null!=w.defaultPrevented?w.defaultPrevented:!1===w.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return Re(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():\"unknown\"!=typeof s.returnValue&&(s.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():\"unknown\"!=typeof s.cancelBubble&&(s.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Qt,Zt,er,tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rr=rd(tr),nr=Re({},tr,{view:0,detail:0}),sr=rd(nr),ir=Re({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(s){return void 0===s.relatedTarget?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return\"movementX\"in s?s.movementX:(s!==er&&(er&&\"mousemove\"===s.type?(Qt=s.screenX-er.screenX,Zt=s.screenY-er.screenY):Zt=Qt=0,er=s),Qt)},movementY:function(s){return\"movementY\"in s?s.movementY:Zt}}),ar=rd(ir),lr=rd(Re({},ir,{dataTransfer:0})),cr=rd(Re({},nr,{relatedTarget:0})),ur=rd(Re({},tr,{animationName:0,elapsedTime:0,pseudoElement:0})),pr=Re({},tr,{clipboardData:function(s){return\"clipboardData\"in s?s.clipboardData:window.clipboardData}}),dr=rd(pr),fr=rd(Re({},tr,{data:0})),mr={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},gr={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},yr={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):!!(s=yr[s])&&!!i[s]}function zd(){return Pd}var vr=Re({},nr,{key:function(s){if(s.key){var i=mr[s.key]||s.key;if(\"Unidentified\"!==i)return i}return\"keypress\"===s.type?13===(s=od(s))?\"Enter\":String.fromCharCode(s):\"keydown\"===s.type||\"keyup\"===s.type?gr[s.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(s){return\"keypress\"===s.type?od(s):0},keyCode:function(s){return\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0},which:function(s){return\"keypress\"===s.type?od(s):\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0}}),br=rd(vr),_r=rd(Re({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Er=rd(Re({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),wr=rd(Re({},tr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Sr=Re({},ir,{deltaX:function(s){return\"deltaX\"in s?s.deltaX:\"wheelDeltaX\"in s?-s.wheelDeltaX:0},deltaY:function(s){return\"deltaY\"in s?s.deltaY:\"wheelDeltaY\"in s?-s.wheelDeltaY:\"wheelDelta\"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),xr=rd(Sr),kr=[9,13,27,32],Or=P&&\"CompositionEvent\"in window,Cr=null;P&&\"documentMode\"in document&&(Cr=document.documentMode);var Ar=P&&\"TextEvent\"in window&&!Cr,jr=P&&(!Or||Cr&&8<Cr&&11>=Cr),Pr=String.fromCharCode(32),Ir=!1;function ge(s,i){switch(s){case\"keyup\":return-1!==kr.indexOf(i.keyCode);case\"keydown\":return 229!==i.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function he(s){return\"object\"==typeof(s=s.detail)&&\"data\"in s?s.data:null}var Nr=!1;var Mr={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return\"input\"===i?!!Mr[s.type]:\"textarea\"===i}function ne(s,i,u,_){Eb(_),0<(i=oe(i,\"onChange\")).length&&(u=new rr(\"onChange\",\"change\",null,u,_),s.push({event:u,listeners:i}))}var Tr=null,Rr=null;function re(s){se(s,0)}function te(s){if(Wa(ue(s)))return s}function ve(s,i){if(\"change\"===s)return i}var Dr=!1;if(P){var Lr;if(P){var Br=\"oninput\"in document;if(!Br){var Fr=document.createElement(\"div\");Fr.setAttribute(\"oninput\",\"return;\"),Br=\"function\"==typeof Fr.oninput}Lr=Br}else Lr=!1;Dr=Lr&&(!document.documentMode||9<document.documentMode)}function Ae(){Tr&&(Tr.detachEvent(\"onpropertychange\",Be),Rr=Tr=null)}function Be(s){if(\"value\"===s.propertyName&&te(Rr)){var i=[];ne(i,Rr,s,xb(s)),Jb(re,i)}}function Ce(s,i,u){\"focusin\"===s?(Ae(),Rr=u,(Tr=i).attachEvent(\"onpropertychange\",Be)):\"focusout\"===s&&Ae()}function De(s){if(\"selectionchange\"===s||\"keyup\"===s||\"keydown\"===s)return te(Rr)}function Ee(s,i){if(\"click\"===s)return te(i)}function Fe(s,i){if(\"input\"===s||\"change\"===s)return te(i)}var qr=\"function\"==typeof Object.is?Object.is:function Ge(s,i){return s===i&&(0!==s||1/s==1/i)||s!=s&&i!=i};function Ie(s,i){if(qr(s,i))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof i||null===i)return!1;var u=Object.keys(s),_=Object.keys(i);if(u.length!==_.length)return!1;for(_=0;_<u.length;_++){var w=u[_];if(!B.call(i,w)||!qr(s[w],i[w]))return!1}return!0}function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ke(s,i){var u,_=Je(s);for(s=0;_;){if(3===_.nodeType){if(u=s+_.textContent.length,s<=i&&u>=i)return{node:_,offset:i-s};s=u}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=Je(_)}}function Le(s,i){return!(!s||!i)&&(s===i||(!s||3!==s.nodeType)&&(i&&3===i.nodeType?Le(s,i.parentNode):\"contains\"in s?s.contains(i):!!s.compareDocumentPosition&&!!(16&s.compareDocumentPosition(i))))}function Me(){for(var s=window,i=Xa();i instanceof s.HTMLIFrameElement;){try{var u=\"string\"==typeof i.contentWindow.location.href}catch(s){u=!1}if(!u)break;i=Xa((s=i.contentWindow).document)}return i}function Ne(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(\"input\"===i&&(\"text\"===s.type||\"search\"===s.type||\"tel\"===s.type||\"url\"===s.type||\"password\"===s.type)||\"textarea\"===i||\"true\"===s.contentEditable)}function Oe(s){var i=Me(),u=s.focusedElem,_=s.selectionRange;if(i!==u&&u&&u.ownerDocument&&Le(u.ownerDocument.documentElement,u)){if(null!==_&&Ne(u))if(i=_.start,void 0===(s=_.end)&&(s=i),\"selectionStart\"in u)u.selectionStart=i,u.selectionEnd=Math.min(s,u.value.length);else if((s=(i=u.ownerDocument||document)&&i.defaultView||window).getSelection){s=s.getSelection();var w=u.textContent.length,x=Math.min(_.start,w);_=void 0===_.end?x:Math.min(_.end,w),!s.extend&&x>_&&(w=_,_=x,x=w),w=Ke(u,x);var j=Ke(u,_);w&&j&&(1!==s.rangeCount||s.anchorNode!==w.node||s.anchorOffset!==w.offset||s.focusNode!==j.node||s.focusOffset!==j.offset)&&((i=i.createRange()).setStart(w.node,w.offset),s.removeAllRanges(),x>_?(s.addRange(i),s.extend(j.node,j.offset)):(i.setEnd(j.node,j.offset),s.addRange(i)))}for(i=[],s=u;s=s.parentNode;)1===s.nodeType&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(\"function\"==typeof u.focus&&u.focus(),u=0;u<i.length;u++)(s=i[u]).element.scrollLeft=s.left,s.element.scrollTop=s.top}}var $r=P&&\"documentMode\"in document&&11>=document.documentMode,Ur=null,zr=null,Vr=null,Wr=!1;function Ue(s,i,u){var _=u.window===u?u.document:9===u.nodeType?u:u.ownerDocument;Wr||null==Ur||Ur!==Xa(_)||(\"selectionStart\"in(_=Ur)&&Ne(_)?_={start:_.selectionStart,end:_.selectionEnd}:_={anchorNode:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset},Vr&&Ie(Vr,_)||(Vr=_,0<(_=oe(zr,\"onSelect\")).length&&(i=new rr(\"onSelect\",\"select\",null,i,u),s.push({event:i,listeners:_}),i.target=Ur)))}function Ve(s,i){var u={};return u[s.toLowerCase()]=i.toLowerCase(),u[\"Webkit\"+s]=\"webkit\"+i,u[\"Moz\"+s]=\"moz\"+i,u}var Kr={animationend:Ve(\"Animation\",\"AnimationEnd\"),animationiteration:Ve(\"Animation\",\"AnimationIteration\"),animationstart:Ve(\"Animation\",\"AnimationStart\"),transitionend:Ve(\"Transition\",\"TransitionEnd\")},Hr={},Jr={};function Ze(s){if(Hr[s])return Hr[s];if(!Kr[s])return s;var i,u=Kr[s];for(i in u)if(u.hasOwnProperty(i)&&i in Jr)return Hr[s]=u[i];return s}P&&(Jr=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),\"TransitionEvent\"in window||delete Kr.transitionend.transition);var Gr=Ze(\"animationend\"),Yr=Ze(\"animationiteration\"),Xr=Ze(\"animationstart\"),Qr=Ze(\"transitionend\"),Zr=new Map,en=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");function ff(s,i){Zr.set(s,i),fa(i,[s])}for(var tn=0;tn<en.length;tn++){var rn=en[tn];ff(rn.toLowerCase(),\"on\"+(rn[0].toUpperCase()+rn.slice(1)))}ff(Gr,\"onAnimationEnd\"),ff(Yr,\"onAnimationIteration\"),ff(Xr,\"onAnimationStart\"),ff(\"dblclick\",\"onDoubleClick\"),ff(\"focusin\",\"onFocus\"),ff(\"focusout\",\"onBlur\"),ff(Qr,\"onTransitionEnd\"),ha(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),ha(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),ha(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),ha(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),fa(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),fa(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),fa(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),fa(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var nn=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),on=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(nn));function nf(s,i,u){var _=s.type||\"unknown-event\";s.currentTarget=u,function Ub(s,i,u,_,w,x,j,P,B){if(Tb.apply(this,arguments),at){if(!at)throw Error(p(198));var $=lt;at=!1,lt=null,ct||(ct=!0,ut=$)}}(_,i,void 0,s),s.currentTarget=null}function se(s,i){i=0!=(4&i);for(var u=0;u<s.length;u++){var _=s[u],w=_.event;_=_.listeners;e:{var x=void 0;if(i)for(var j=_.length-1;0<=j;j--){var P=_[j],B=P.instance,$=P.currentTarget;if(P=P.listener,B!==x&&w.isPropagationStopped())break e;nf(w,P,$),x=B}else for(j=0;j<_.length;j++){if(B=(P=_[j]).instance,$=P.currentTarget,P=P.listener,B!==x&&w.isPropagationStopped())break e;nf(w,P,$),x=B}}}if(ct)throw s=ut,ct=!1,ut=null,s}function D(s,i){var u=i[bn];void 0===u&&(u=i[bn]=new Set);var _=s+\"__bubble\";u.has(_)||(pf(i,s,2,!1),u.add(_))}function qf(s,i,u){var _=0;i&&(_|=4),pf(u,s,_,i)}var sn=\"_reactListening\"+Math.random().toString(36).slice(2);function sf(s){if(!s[sn]){s[sn]=!0,x.forEach((function(i){\"selectionchange\"!==i&&(on.has(i)||qf(i,!1,s),qf(i,!0,s))}));var i=9===s.nodeType?s:s.ownerDocument;null===i||i[sn]||(i[sn]=!0,qf(\"selectionchange\",!1,i))}}function pf(s,i,u,_){switch(jd(i)){case 1:var w=ed;break;case 4:w=gd;break;default:w=fd}u=w.bind(null,i,u,s),w=void 0,!st||\"touchstart\"!==i&&\"touchmove\"!==i&&\"wheel\"!==i||(w=!0),_?void 0!==w?s.addEventListener(i,u,{capture:!0,passive:w}):s.addEventListener(i,u,!0):void 0!==w?s.addEventListener(i,u,{passive:w}):s.addEventListener(i,u,!1)}function hd(s,i,u,_,w){var x=_;if(0==(1&i)&&0==(2&i)&&null!==_)e:for(;;){if(null===_)return;var j=_.tag;if(3===j||4===j){var P=_.stateNode.containerInfo;if(P===w||8===P.nodeType&&P.parentNode===w)break;if(4===j)for(j=_.return;null!==j;){var B=j.tag;if((3===B||4===B)&&((B=j.stateNode.containerInfo)===w||8===B.nodeType&&B.parentNode===w))return;j=j.return}for(;null!==P;){if(null===(j=Wc(P)))return;if(5===(B=j.tag)||6===B){_=x=j;continue e}P=P.parentNode}}_=_.return}Jb((function(){var _=x,w=xb(u),j=[];e:{var P=Zr.get(s);if(void 0!==P){var B=rr,$=s;switch(s){case\"keypress\":if(0===od(u))break e;case\"keydown\":case\"keyup\":B=br;break;case\"focusin\":$=\"focus\",B=cr;break;case\"focusout\":$=\"blur\",B=cr;break;case\"beforeblur\":case\"afterblur\":B=cr;break;case\"click\":if(2===u.button)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":B=ar;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":B=lr;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":B=Er;break;case Gr:case Yr:case Xr:B=ur;break;case Qr:B=wr;break;case\"scroll\":B=sr;break;case\"wheel\":B=xr;break;case\"copy\":case\"cut\":case\"paste\":B=dr;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":B=_r}var U=0!=(4&i),Y=!U&&\"scroll\"===s,X=U?null!==P?P+\"Capture\":null:P;U=[];for(var Z,ee=_;null!==ee;){var ie=(Z=ee).stateNode;if(5===Z.tag&&null!==ie&&(Z=ie,null!==X&&(null!=(ie=Kb(ee,X))&&U.push(tf(ee,ie,Z)))),Y)break;ee=ee.return}0<U.length&&(P=new B(P,$,null,u,w),j.push({event:P,listeners:U}))}}if(0==(7&i)){if(B=\"mouseout\"===s||\"pointerout\"===s,(!(P=\"mouseover\"===s||\"pointerover\"===s)||u===et||!($=u.relatedTarget||u.fromElement)||!Wc($)&&!$[vn])&&(B||P)&&(P=w.window===w?w:(P=w.ownerDocument)?P.defaultView||P.parentWindow:window,B?(B=_,null!==($=($=u.relatedTarget||u.toElement)?Wc($):null)&&($!==(Y=Vb($))||5!==$.tag&&6!==$.tag)&&($=null)):(B=null,$=_),B!==$)){if(U=ar,ie=\"onMouseLeave\",X=\"onMouseEnter\",ee=\"mouse\",\"pointerout\"!==s&&\"pointerover\"!==s||(U=_r,ie=\"onPointerLeave\",X=\"onPointerEnter\",ee=\"pointer\"),Y=null==B?P:ue(B),Z=null==$?P:ue($),(P=new U(ie,ee+\"leave\",B,u,w)).target=Y,P.relatedTarget=Z,ie=null,Wc(w)===_&&((U=new U(X,ee+\"enter\",$,u,w)).target=Z,U.relatedTarget=Y,ie=U),Y=ie,B&&$)e:{for(X=$,ee=0,Z=U=B;Z;Z=vf(Z))ee++;for(Z=0,ie=X;ie;ie=vf(ie))Z++;for(;0<ee-Z;)U=vf(U),ee--;for(;0<Z-ee;)X=vf(X),Z--;for(;ee--;){if(U===X||null!==X&&U===X.alternate)break e;U=vf(U),X=vf(X)}U=null}else U=null;null!==B&&wf(j,P,B,U,!1),null!==$&&null!==Y&&wf(j,Y,$,U,!0)}if(\"select\"===(B=(P=_?ue(_):window).nodeName&&P.nodeName.toLowerCase())||\"input\"===B&&\"file\"===P.type)var ae=ve;else if(me(P))if(Dr)ae=Fe;else{ae=De;var le=Ce}else(B=P.nodeName)&&\"input\"===B.toLowerCase()&&(\"checkbox\"===P.type||\"radio\"===P.type)&&(ae=Ee);switch(ae&&(ae=ae(s,_))?ne(j,ae,u,w):(le&&le(s,P,_),\"focusout\"===s&&(le=P._wrapperState)&&le.controlled&&\"number\"===P.type&&cb(P,\"number\",P.value)),le=_?ue(_):window,s){case\"focusin\":(me(le)||\"true\"===le.contentEditable)&&(Ur=le,zr=_,Vr=null);break;case\"focusout\":Vr=zr=Ur=null;break;case\"mousedown\":Wr=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":Wr=!1,Ue(j,u,w);break;case\"selectionchange\":if($r)break;case\"keydown\":case\"keyup\":Ue(j,u,w)}var ce;if(Or)e:{switch(s){case\"compositionstart\":var pe=\"onCompositionStart\";break e;case\"compositionend\":pe=\"onCompositionEnd\";break e;case\"compositionupdate\":pe=\"onCompositionUpdate\";break e}pe=void 0}else Nr?ge(s,u)&&(pe=\"onCompositionEnd\"):\"keydown\"===s&&229===u.keyCode&&(pe=\"onCompositionStart\");pe&&(jr&&\"ko\"!==u.locale&&(Nr||\"onCompositionStart\"!==pe?\"onCompositionEnd\"===pe&&Nr&&(ce=nd()):(Yt=\"value\"in(Gt=w)?Gt.value:Gt.textContent,Nr=!0)),0<(le=oe(_,pe)).length&&(pe=new fr(pe,s,null,u,w),j.push({event:pe,listeners:le}),ce?pe.data=ce:null!==(ce=he(u))&&(pe.data=ce))),(ce=Ar?function je(s,i){switch(s){case\"compositionend\":return he(i);case\"keypress\":return 32!==i.which?null:(Ir=!0,Pr);case\"textInput\":return(s=i.data)===Pr&&Ir?null:s;default:return null}}(s,u):function ke(s,i){if(Nr)return\"compositionend\"===s||!Or&&ge(s,i)?(s=nd(),Xt=Yt=Gt=null,Nr=!1,s):null;switch(s){case\"paste\":default:return null;case\"keypress\":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case\"compositionend\":return jr&&\"ko\"!==i.locale?null:i.data}}(s,u))&&(0<(_=oe(_,\"onBeforeInput\")).length&&(w=new fr(\"onBeforeInput\",\"beforeinput\",null,u,w),j.push({event:w,listeners:_}),w.data=ce))}se(j,i)}))}function tf(s,i,u){return{instance:s,listener:i,currentTarget:u}}function oe(s,i){for(var u=i+\"Capture\",_=[];null!==s;){var w=s,x=w.stateNode;5===w.tag&&null!==x&&(w=x,null!=(x=Kb(s,u))&&_.unshift(tf(s,x,w)),null!=(x=Kb(s,i))&&_.push(tf(s,x,w))),s=s.return}return _}function vf(s){if(null===s)return null;do{s=s.return}while(s&&5!==s.tag);return s||null}function wf(s,i,u,_,w){for(var x=i._reactName,j=[];null!==u&&u!==_;){var P=u,B=P.alternate,$=P.stateNode;if(null!==B&&B===_)break;5===P.tag&&null!==$&&(P=$,w?null!=(B=Kb(u,x))&&j.unshift(tf(u,B,P)):w||null!=(B=Kb(u,x))&&j.push(tf(u,B,P))),u=u.return}0!==j.length&&s.push({event:i,listeners:j})}var an=/\\r\\n?/g,ln=/\\u0000|\\uFFFD/g;function zf(s){return(\"string\"==typeof s?s:\"\"+s).replace(an,\"\\n\").replace(ln,\"\")}function Af(s,i,u){if(i=zf(i),zf(s)!==i&&u)throw Error(p(425))}function Bf(){}var cn=null,un=null;function Ef(s,i){return\"textarea\"===s||\"noscript\"===s||\"string\"==typeof i.children||\"number\"==typeof i.children||\"object\"==typeof i.dangerouslySetInnerHTML&&null!==i.dangerouslySetInnerHTML&&null!=i.dangerouslySetInnerHTML.__html}var pn=\"function\"==typeof setTimeout?setTimeout:void 0,hn=\"function\"==typeof clearTimeout?clearTimeout:void 0,dn=\"function\"==typeof Promise?Promise:void 0,fn=\"function\"==typeof queueMicrotask?queueMicrotask:void 0!==dn?function(s){return dn.resolve(null).then(s).catch(If)}:pn;function If(s){setTimeout((function(){throw s}))}function Kf(s,i){var u=i,_=0;do{var w=u.nextSibling;if(s.removeChild(u),w&&8===w.nodeType)if(\"/$\"===(u=w.data)){if(0===_)return s.removeChild(w),void bd(i);_--}else\"$\"!==u&&\"$?\"!==u&&\"$!\"!==u||_++;u=w}while(u);bd(i)}function Lf(s){for(;null!=s;s=s.nextSibling){var i=s.nodeType;if(1===i||3===i)break;if(8===i){if(\"$\"===(i=s.data)||\"$!\"===i||\"$?\"===i)break;if(\"/$\"===i)return null}}return s}function Mf(s){s=s.previousSibling;for(var i=0;s;){if(8===s.nodeType){var u=s.data;if(\"$\"===u||\"$!\"===u||\"$?\"===u){if(0===i)return s;i--}else\"/$\"===u&&i++}s=s.previousSibling}return null}var mn=Math.random().toString(36).slice(2),gn=\"__reactFiber$\"+mn,yn=\"__reactProps$\"+mn,vn=\"__reactContainer$\"+mn,bn=\"__reactEvents$\"+mn,_n=\"__reactListeners$\"+mn,En=\"__reactHandles$\"+mn;function Wc(s){var i=s[gn];if(i)return i;for(var u=s.parentNode;u;){if(i=u[vn]||u[gn]){if(u=i.alternate,null!==i.child||null!==u&&null!==u.child)for(s=Mf(s);null!==s;){if(u=s[gn])return u;s=Mf(s)}return i}u=(s=u).parentNode}return null}function Cb(s){return!(s=s[gn]||s[vn])||5!==s.tag&&6!==s.tag&&13!==s.tag&&3!==s.tag?null:s}function ue(s){if(5===s.tag||6===s.tag)return s.stateNode;throw Error(p(33))}function Db(s){return s[yn]||null}var wn=[],Sn=-1;function Uf(s){return{current:s}}function E(s){0>Sn||(s.current=wn[Sn],wn[Sn]=null,Sn--)}function G(s,i){Sn++,wn[Sn]=s.current,s.current=i}var xn={},kn=Uf(xn),On=Uf(!1),Cn=xn;function Yf(s,i){var u=s.type.contextTypes;if(!u)return xn;var _=s.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===i)return _.__reactInternalMemoizedMaskedChildContext;var w,x={};for(w in u)x[w]=i[w];return _&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=x),x}function Zf(s){return null!=(s=s.childContextTypes)}function $f(){E(On),E(kn)}function ag(s,i,u){if(kn.current!==xn)throw Error(p(168));G(kn,i),G(On,u)}function bg(s,i,u){var _=s.stateNode;if(i=i.childContextTypes,\"function\"!=typeof _.getChildContext)return u;for(var w in _=_.getChildContext())if(!(w in i))throw Error(p(108,Ra(s)||\"Unknown\",w));return Re({},u,_)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||xn,Cn=kn.current,G(kn,s),G(On,On.current),!0}function dg(s,i,u){var _=s.stateNode;if(!_)throw Error(p(169));u?(s=bg(s,i,Cn),_.__reactInternalMemoizedMergedChildContext=s,E(On),E(kn),G(kn,s)):E(On),G(On,u)}var An=null,jn=!1,Pn=!1;function hg(s){null===An?An=[s]:An.push(s)}function jg(){if(!Pn&&null!==An){Pn=!0;var s=0,i=It;try{var u=An;for(It=1;s<u.length;s++){var _=u[s];do{_=_(!0)}while(null!==_)}An=null,jn=!1}catch(i){throw null!==An&&(An=An.slice(s+1)),ht(bt,jg),i}finally{It=i,Pn=!1}}return null}var In=[],Nn=0,Mn=null,Tn=0,Rn=[],Dn=0,Ln=null,Bn=1,Fn=\"\";function tg(s,i){In[Nn++]=Tn,In[Nn++]=Mn,Mn=s,Tn=i}function ug(s,i,u){Rn[Dn++]=Bn,Rn[Dn++]=Fn,Rn[Dn++]=Ln,Ln=s;var _=Bn;s=Fn;var w=32-Ot(_)-1;_&=~(1<<w),u+=1;var x=32-Ot(i)+w;if(30<x){var j=w-w%5;x=(_&(1<<j)-1).toString(32),_>>=j,w-=j,Bn=1<<32-Ot(i)+w|u<<w|_,Fn=x+s}else Bn=1<<x|u<<w|_,Fn=s}function vg(s){null!==s.return&&(tg(s,1),ug(s,1,0))}function wg(s){for(;s===Mn;)Mn=In[--Nn],In[Nn]=null,Tn=In[--Nn],In[Nn]=null;for(;s===Ln;)Ln=Rn[--Dn],Rn[Dn]=null,Fn=Rn[--Dn],Rn[Dn]=null,Bn=Rn[--Dn],Rn[Dn]=null}var qn=null,$n=null,Un=!1,zn=null;function Ag(s,i){var u=Bg(5,null,null,0);u.elementType=\"DELETED\",u.stateNode=i,u.return=s,null===(i=s.deletions)?(s.deletions=[u],s.flags|=16):i.push(u)}function Cg(s,i){switch(s.tag){case 5:var u=s.type;return null!==(i=1!==i.nodeType||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i)&&(s.stateNode=i,qn=s,$n=Lf(i.firstChild),!0);case 6:return null!==(i=\"\"===s.pendingProps||3!==i.nodeType?null:i)&&(s.stateNode=i,qn=s,$n=null,!0);case 13:return null!==(i=8!==i.nodeType?null:i)&&(u=null!==Ln?{id:Bn,overflow:Fn}:null,s.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},(u=Bg(18,null,null,0)).stateNode=i,u.return=s,s.child=u,qn=s,$n=null,!0);default:return!1}}function Dg(s){return 0!=(1&s.mode)&&0==(128&s.flags)}function Eg(s){if(Un){var i=$n;if(i){var u=i;if(!Cg(s,i)){if(Dg(s))throw Error(p(418));i=Lf(u.nextSibling);var _=qn;i&&Cg(s,i)?Ag(_,u):(s.flags=-4097&s.flags|2,Un=!1,qn=s)}}else{if(Dg(s))throw Error(p(418));s.flags=-4097&s.flags|2,Un=!1,qn=s}}}function Fg(s){for(s=s.return;null!==s&&5!==s.tag&&3!==s.tag&&13!==s.tag;)s=s.return;qn=s}function Gg(s){if(s!==qn)return!1;if(!Un)return Fg(s),Un=!0,!1;var i;if((i=3!==s.tag)&&!(i=5!==s.tag)&&(i=\"head\"!==(i=s.type)&&\"body\"!==i&&!Ef(s.type,s.memoizedProps)),i&&(i=$n)){if(Dg(s))throw Hg(),Error(p(418));for(;i;)Ag(s,i),i=Lf(i.nextSibling)}if(Fg(s),13===s.tag){if(!(s=null!==(s=s.memoizedState)?s.dehydrated:null))throw Error(p(317));e:{for(s=s.nextSibling,i=0;s;){if(8===s.nodeType){var u=s.data;if(\"/$\"===u){if(0===i){$n=Lf(s.nextSibling);break e}i--}else\"$\"!==u&&\"$!\"!==u&&\"$?\"!==u||i++}s=s.nextSibling}$n=null}}else $n=qn?Lf(s.stateNode.nextSibling):null;return!0}function Hg(){for(var s=$n;s;)s=Lf(s.nextSibling)}function Ig(){$n=qn=null,Un=!1}function Jg(s){null===zn?zn=[s]:zn.push(s)}var Vn=ee.ReactCurrentBatchConfig;function Lg(s,i){if(s&&s.defaultProps){for(var u in i=Re({},i),s=s.defaultProps)void 0===i[u]&&(i[u]=s[u]);return i}return i}var Wn=Uf(null),Kn=null,Hn=null,Jn=null;function Qg(){Jn=Hn=Kn=null}function Rg(s){var i=Wn.current;E(Wn),s._currentValue=i}function Sg(s,i,u){for(;null!==s;){var _=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,null!==_&&(_.childLanes|=i)):null!==_&&(_.childLanes&i)!==i&&(_.childLanes|=i),s===u)break;s=s.return}}function Tg(s,i){Kn=s,Jn=Hn=null,null!==(s=s.dependencies)&&null!==s.firstContext&&(0!=(s.lanes&i)&&(xo=!0),s.firstContext=null)}function Vg(s){var i=s._currentValue;if(Jn!==s)if(s={context:s,memoizedValue:i,next:null},null===Hn){if(null===Kn)throw Error(p(308));Hn=s,Kn.dependencies={lanes:0,firstContext:s}}else Hn=Hn.next=s;return i}var Gn=null;function Xg(s){null===Gn?Gn=[s]:Gn.push(s)}function Yg(s,i,u,_){var w=i.interleaved;return null===w?(u.next=u,Xg(i)):(u.next=w.next,w.next=u),i.interleaved=u,Zg(s,_)}function Zg(s,i){s.lanes|=i;var u=s.alternate;for(null!==u&&(u.lanes|=i),u=s,s=s.return;null!==s;)s.childLanes|=i,null!==(u=s.alternate)&&(u.childLanes|=i),u=s,s=s.return;return 3===u.tag?u.stateNode:null}var Yn=!1;function ah(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ch(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function dh(s,i,u){var _=s.updateQueue;if(null===_)return null;if(_=_.shared,0!=(2&Uo)){var w=_.pending;return null===w?i.next=i:(i.next=w.next,w.next=i),_.pending=i,Zg(s,u)}return null===(w=_.interleaved)?(i.next=i,Xg(_)):(i.next=w.next,w.next=i),_.interleaved=i,Zg(s,u)}function eh(s,i,u){if(null!==(i=i.updateQueue)&&(i=i.shared,0!=(4194240&u))){var _=i.lanes;u|=_&=s.pendingLanes,i.lanes=u,Cc(s,u)}}function fh(s,i){var u=s.updateQueue,_=s.alternate;if(null!==_&&u===(_=_.updateQueue)){var w=null,x=null;if(null!==(u=u.firstBaseUpdate)){do{var j={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};null===x?w=x=j:x=x.next=j,u=u.next}while(null!==u);null===x?w=x=i:x=x.next=i}else w=x=i;return u={baseState:_.baseState,firstBaseUpdate:w,lastBaseUpdate:x,shared:_.shared,effects:_.effects},void(s.updateQueue=u)}null===(s=u.lastBaseUpdate)?u.firstBaseUpdate=i:s.next=i,u.lastBaseUpdate=i}function gh(s,i,u,_){var w=s.updateQueue;Yn=!1;var x=w.firstBaseUpdate,j=w.lastBaseUpdate,P=w.shared.pending;if(null!==P){w.shared.pending=null;var B=P,$=B.next;B.next=null,null===j?x=$:j.next=$,j=B;var U=s.alternate;null!==U&&((P=(U=U.updateQueue).lastBaseUpdate)!==j&&(null===P?U.firstBaseUpdate=$:P.next=$,U.lastBaseUpdate=B))}if(null!==x){var Y=w.baseState;for(j=0,U=$=B=null,P=x;;){var X=P.lane,Z=P.eventTime;if((_&X)===X){null!==U&&(U=U.next={eventTime:Z,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ee=s,ie=P;switch(X=i,Z=u,ie.tag){case 1:if(\"function\"==typeof(ee=ie.payload)){Y=ee.call(Z,Y,X);break e}Y=ee;break e;case 3:ee.flags=-65537&ee.flags|128;case 0:if(null==(X=\"function\"==typeof(ee=ie.payload)?ee.call(Z,Y,X):ee))break e;Y=Re({},Y,X);break e;case 2:Yn=!0}}null!==P.callback&&0!==P.lane&&(s.flags|=64,null===(X=w.effects)?w.effects=[P]:X.push(P))}else Z={eventTime:Z,lane:X,tag:P.tag,payload:P.payload,callback:P.callback,next:null},null===U?($=U=Z,B=Y):U=U.next=Z,j|=X;if(null===(P=P.next)){if(null===(P=w.shared.pending))break;P=(X=P).next,X.next=null,w.lastBaseUpdate=X,w.shared.pending=null}}if(null===U&&(B=Y),w.baseState=B,w.firstBaseUpdate=$,w.lastBaseUpdate=U,null!==(i=w.shared.interleaved)){w=i;do{j|=w.lane,w=w.next}while(w!==i)}else null===x&&(w.shared.lanes=0);Yo|=j,s.lanes=j,s.memoizedState=Y}}function ih(s,i,u){if(s=i.effects,i.effects=null,null!==s)for(i=0;i<s.length;i++){var _=s[i],w=_.callback;if(null!==w){if(_.callback=null,_=u,\"function\"!=typeof w)throw Error(p(191,w));w.call(_)}}}var Xn=(new _.Component).refs;function kh(s,i,u,_){u=null==(u=u(_,i=s.memoizedState))?i:Re({},i,u),s.memoizedState=u,0===s.lanes&&(s.updateQueue.baseState=u)}var Qn={isMounted:function(s){return!!(s=s._reactInternals)&&Vb(s)===s},enqueueSetState:function(s,i,u){s=s._reactInternals;var _=L(),w=lh(s),x=ch(_,w);x.payload=i,null!=u&&(x.callback=u),null!==(i=dh(s,x,w))&&(mh(i,s,w,_),eh(i,s,w))},enqueueReplaceState:function(s,i,u){s=s._reactInternals;var _=L(),w=lh(s),x=ch(_,w);x.tag=1,x.payload=i,null!=u&&(x.callback=u),null!==(i=dh(s,x,w))&&(mh(i,s,w,_),eh(i,s,w))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var u=L(),_=lh(s),w=ch(u,_);w.tag=2,null!=i&&(w.callback=i),null!==(i=dh(s,w,_))&&(mh(i,s,_,u),eh(i,s,_))}};function oh(s,i,u,_,w,x,j){return\"function\"==typeof(s=s.stateNode).shouldComponentUpdate?s.shouldComponentUpdate(_,x,j):!i.prototype||!i.prototype.isPureReactComponent||(!Ie(u,_)||!Ie(w,x))}function ph(s,i,u){var _=!1,w=xn,x=i.contextType;return\"object\"==typeof x&&null!==x?x=Vg(x):(w=Zf(i)?Cn:kn.current,x=(_=null!=(_=i.contextTypes))?Yf(s,w):xn),i=new i(u,x),s.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=Qn,s.stateNode=i,i._reactInternals=s,_&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=w,s.__reactInternalMemoizedMaskedChildContext=x),i}function qh(s,i,u,_){s=i.state,\"function\"==typeof i.componentWillReceiveProps&&i.componentWillReceiveProps(u,_),\"function\"==typeof i.UNSAFE_componentWillReceiveProps&&i.UNSAFE_componentWillReceiveProps(u,_),i.state!==s&&Qn.enqueueReplaceState(i,i.state,null)}function rh(s,i,u,_){var w=s.stateNode;w.props=u,w.state=s.memoizedState,w.refs=Xn,ah(s);var x=i.contextType;\"object\"==typeof x&&null!==x?w.context=Vg(x):(x=Zf(i)?Cn:kn.current,w.context=Yf(s,x)),w.state=s.memoizedState,\"function\"==typeof(x=i.getDerivedStateFromProps)&&(kh(s,i,x,u),w.state=s.memoizedState),\"function\"==typeof i.getDerivedStateFromProps||\"function\"==typeof w.getSnapshotBeforeUpdate||\"function\"!=typeof w.UNSAFE_componentWillMount&&\"function\"!=typeof w.componentWillMount||(i=w.state,\"function\"==typeof w.componentWillMount&&w.componentWillMount(),\"function\"==typeof w.UNSAFE_componentWillMount&&w.UNSAFE_componentWillMount(),i!==w.state&&Qn.enqueueReplaceState(w,w.state,null),gh(s,u,w,_),w.state=s.memoizedState),\"function\"==typeof w.componentDidMount&&(s.flags|=4194308)}function sh(s,i,u){if(null!==(s=u.ref)&&\"function\"!=typeof s&&\"object\"!=typeof s){if(u._owner){if(u=u._owner){if(1!==u.tag)throw Error(p(309));var _=u.stateNode}if(!_)throw Error(p(147,s));var w=_,x=\"\"+s;return null!==i&&null!==i.ref&&\"function\"==typeof i.ref&&i.ref._stringRef===x?i.ref:(i=function(s){var i=w.refs;i===Xn&&(i=w.refs={}),null===s?delete i[x]:i[x]=s},i._stringRef=x,i)}if(\"string\"!=typeof s)throw Error(p(284));if(!u._owner)throw Error(p(290,s))}return s}function th(s,i){throw s=Object.prototype.toString.call(i),Error(p(31,\"[object Object]\"===s?\"object with keys {\"+Object.keys(i).join(\", \")+\"}\":s))}function uh(s){return(0,s._init)(s._payload)}function vh(s){function b(i,u){if(s){var _=i.deletions;null===_?(i.deletions=[u],i.flags|=16):_.push(u)}}function c(i,u){if(!s)return null;for(;null!==u;)b(i,u),u=u.sibling;return null}function d(s,i){for(s=new Map;null!==i;)null!==i.key?s.set(i.key,i):s.set(i.index,i),i=i.sibling;return s}function e(s,i){return(s=wh(s,i)).index=0,s.sibling=null,s}function f(i,u,_){return i.index=_,s?null!==(_=i.alternate)?(_=_.index)<u?(i.flags|=2,u):_:(i.flags|=2,u):(i.flags|=1048576,u)}function g(i){return s&&null===i.alternate&&(i.flags|=2),i}function h(s,i,u,_){return null===i||6!==i.tag?((i=xh(u,s.mode,_)).return=s,i):((i=e(i,u)).return=s,i)}function k(s,i,u,_){var w=u.type;return w===le?m(s,i,u.props.children,_,u.key):null!==i&&(i.elementType===w||\"object\"==typeof w&&null!==w&&w.$$typeof===Se&&uh(w)===i.type)?((_=e(i,u.props)).ref=sh(s,i,u),_.return=s,_):((_=yh(u.type,u.key,u.props,null,s.mode,_)).ref=sh(s,i,u),_.return=s,_)}function l(s,i,u,_){return null===i||4!==i.tag||i.stateNode.containerInfo!==u.containerInfo||i.stateNode.implementation!==u.implementation?((i=zh(u,s.mode,_)).return=s,i):((i=e(i,u.children||[])).return=s,i)}function m(s,i,u,_,w){return null===i||7!==i.tag?((i=Ah(u,s.mode,_,w)).return=s,i):((i=e(i,u)).return=s,i)}function q(s,i,u){if(\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i)return(i=xh(\"\"+i,s.mode,u)).return=s,i;if(\"object\"==typeof i&&null!==i){switch(i.$$typeof){case ie:return(u=yh(i.type,i.key,i.props,null,s.mode,u)).ref=sh(s,null,i),u.return=s,u;case ae:return(i=zh(i,s.mode,u)).return=s,i;case Se:return q(s,(0,i._init)(i._payload),u)}if($e(i)||Ka(i))return(i=Ah(i,s.mode,u,null)).return=s,i;th(s,i)}return null}function r(s,i,u,_){var w=null!==i?i.key:null;if(\"string\"==typeof u&&\"\"!==u||\"number\"==typeof u)return null!==w?null:h(s,i,\"\"+u,_);if(\"object\"==typeof u&&null!==u){switch(u.$$typeof){case ie:return u.key===w?k(s,i,u,_):null;case ae:return u.key===w?l(s,i,u,_):null;case Se:return r(s,i,(w=u._init)(u._payload),_)}if($e(u)||Ka(u))return null!==w?null:m(s,i,u,_,null);th(s,u)}return null}function y(s,i,u,_,w){if(\"string\"==typeof _&&\"\"!==_||\"number\"==typeof _)return h(i,s=s.get(u)||null,\"\"+_,w);if(\"object\"==typeof _&&null!==_){switch(_.$$typeof){case ie:return k(i,s=s.get(null===_.key?u:_.key)||null,_,w);case ae:return l(i,s=s.get(null===_.key?u:_.key)||null,_,w);case Se:return y(s,i,u,(0,_._init)(_._payload),w)}if($e(_)||Ka(_))return m(i,s=s.get(u)||null,_,w,null);th(i,_)}return null}function n(i,u,_,w){for(var x=null,j=null,P=u,B=u=0,$=null;null!==P&&B<_.length;B++){P.index>B?($=P,P=null):$=P.sibling;var U=r(i,P,_[B],w);if(null===U){null===P&&(P=$);break}s&&P&&null===U.alternate&&b(i,P),u=f(U,u,B),null===j?x=U:j.sibling=U,j=U,P=$}if(B===_.length)return c(i,P),Un&&tg(i,B),x;if(null===P){for(;B<_.length;B++)null!==(P=q(i,_[B],w))&&(u=f(P,u,B),null===j?x=P:j.sibling=P,j=P);return Un&&tg(i,B),x}for(P=d(i,P);B<_.length;B++)null!==($=y(P,i,B,_[B],w))&&(s&&null!==$.alternate&&P.delete(null===$.key?B:$.key),u=f($,u,B),null===j?x=$:j.sibling=$,j=$);return s&&P.forEach((function(s){return b(i,s)})),Un&&tg(i,B),x}function t(i,u,_,w){var x=Ka(_);if(\"function\"!=typeof x)throw Error(p(150));if(null==(_=x.call(_)))throw Error(p(151));for(var j=x=null,P=u,B=u=0,$=null,U=_.next();null!==P&&!U.done;B++,U=_.next()){P.index>B?($=P,P=null):$=P.sibling;var Y=r(i,P,U.value,w);if(null===Y){null===P&&(P=$);break}s&&P&&null===Y.alternate&&b(i,P),u=f(Y,u,B),null===j?x=Y:j.sibling=Y,j=Y,P=$}if(U.done)return c(i,P),Un&&tg(i,B),x;if(null===P){for(;!U.done;B++,U=_.next())null!==(U=q(i,U.value,w))&&(u=f(U,u,B),null===j?x=U:j.sibling=U,j=U);return Un&&tg(i,B),x}for(P=d(i,P);!U.done;B++,U=_.next())null!==(U=y(P,i,B,U.value,w))&&(s&&null!==U.alternate&&P.delete(null===U.key?B:U.key),u=f(U,u,B),null===j?x=U:j.sibling=U,j=U);return s&&P.forEach((function(s){return b(i,s)})),Un&&tg(i,B),x}return function J(s,i,u,_){if(\"object\"==typeof u&&null!==u&&u.type===le&&null===u.key&&(u=u.props.children),\"object\"==typeof u&&null!==u){switch(u.$$typeof){case ie:e:{for(var w=u.key,x=i;null!==x;){if(x.key===w){if((w=u.type)===le){if(7===x.tag){c(s,x.sibling),(i=e(x,u.props.children)).return=s,s=i;break e}}else if(x.elementType===w||\"object\"==typeof w&&null!==w&&w.$$typeof===Se&&uh(w)===x.type){c(s,x.sibling),(i=e(x,u.props)).ref=sh(s,x,u),i.return=s,s=i;break e}c(s,x);break}b(s,x),x=x.sibling}u.type===le?((i=Ah(u.props.children,s.mode,_,u.key)).return=s,s=i):((_=yh(u.type,u.key,u.props,null,s.mode,_)).ref=sh(s,i,u),_.return=s,s=_)}return g(s);case ae:e:{for(x=u.key;null!==i;){if(i.key===x){if(4===i.tag&&i.stateNode.containerInfo===u.containerInfo&&i.stateNode.implementation===u.implementation){c(s,i.sibling),(i=e(i,u.children||[])).return=s,s=i;break e}c(s,i);break}b(s,i),i=i.sibling}(i=zh(u,s.mode,_)).return=s,s=i}return g(s);case Se:return J(s,i,(x=u._init)(u._payload),_)}if($e(u))return n(s,i,u,_);if(Ka(u))return t(s,i,u,_);th(s,u)}return\"string\"==typeof u&&\"\"!==u||\"number\"==typeof u?(u=\"\"+u,null!==i&&6===i.tag?(c(s,i.sibling),(i=e(i,u)).return=s,s=i):(c(s,i),(i=xh(u,s.mode,_)).return=s,s=i),g(s)):c(s,i)}}var Zn=vh(!0),eo=vh(!1),to={},ro=Uf(to),no=Uf(to),oo=Uf(to);function Hh(s){if(s===to)throw Error(p(174));return s}function Ih(s,i){switch(G(oo,i),G(no,s),G(ro,to),s=i.nodeType){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:lb(null,\"\");break;default:i=lb(i=(s=8===s?i.parentNode:i).namespaceURI||null,s=s.tagName)}E(ro),G(ro,i)}function Jh(){E(ro),E(no),E(oo)}function Kh(s){Hh(oo.current);var i=Hh(ro.current),u=lb(i,s.type);i!==u&&(G(no,s),G(ro,u))}function Lh(s){no.current===s&&(E(ro),E(no))}var so=Uf(0);function Mh(s){for(var i=s;null!==i;){if(13===i.tag){var u=i.memoizedState;if(null!==u&&(null===(u=u.dehydrated)||\"$?\"===u.data||\"$!\"===u.data))return i}else if(19===i.tag&&void 0!==i.memoizedProps.revealOrder){if(0!=(128&i.flags))return i}else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===s)break;for(;null===i.sibling;){if(null===i.return||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var io=[];function Oh(){for(var s=0;s<io.length;s++)io[s]._workInProgressVersionPrimary=null;io.length=0}var ao=ee.ReactCurrentDispatcher,lo=ee.ReactCurrentBatchConfig,co=0,uo=null,po=null,ho=null,fo=!1,mo=!1,go=0,yo=0;function Q(){throw Error(p(321))}function Wh(s,i){if(null===i)return!1;for(var u=0;u<i.length&&u<s.length;u++)if(!qr(s[u],i[u]))return!1;return!0}function Xh(s,i,u,_,w,x){if(co=x,uo=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ao.current=null===s||null===s.memoizedState?bo:_o,s=u(_,w),mo){x=0;do{if(mo=!1,go=0,25<=x)throw Error(p(301));x+=1,ho=po=null,i.updateQueue=null,ao.current=Eo,s=u(_,w)}while(mo)}if(ao.current=vo,i=null!==po&&null!==po.next,co=0,ho=po=uo=null,fo=!1,i)throw Error(p(300));return s}function bi(){var s=0!==go;return go=0,s}function ci(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ho?uo.memoizedState=ho=s:ho=ho.next=s,ho}function di(){if(null===po){var s=uo.alternate;s=null!==s?s.memoizedState:null}else s=po.next;var i=null===ho?uo.memoizedState:ho.next;if(null!==i)ho=i,po=s;else{if(null===s)throw Error(p(310));s={memoizedState:(po=s).memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},null===ho?uo.memoizedState=ho=s:ho=ho.next=s}return ho}function ei(s,i){return\"function\"==typeof i?i(s):i}function fi(s){var i=di(),u=i.queue;if(null===u)throw Error(p(311));u.lastRenderedReducer=s;var _=po,w=_.baseQueue,x=u.pending;if(null!==x){if(null!==w){var j=w.next;w.next=x.next,x.next=j}_.baseQueue=w=x,u.pending=null}if(null!==w){x=w.next,_=_.baseState;var P=j=null,B=null,$=x;do{var U=$.lane;if((co&U)===U)null!==B&&(B=B.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),_=$.hasEagerState?$.eagerState:s(_,$.action);else{var Y={lane:U,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};null===B?(P=B=Y,j=_):B=B.next=Y,uo.lanes|=U,Yo|=U}$=$.next}while(null!==$&&$!==x);null===B?j=_:B.next=P,qr(_,i.memoizedState)||(xo=!0),i.memoizedState=_,i.baseState=j,i.baseQueue=B,u.lastRenderedState=_}if(null!==(s=u.interleaved)){w=s;do{x=w.lane,uo.lanes|=x,Yo|=x,w=w.next}while(w!==s)}else null===w&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function gi(s){var i=di(),u=i.queue;if(null===u)throw Error(p(311));u.lastRenderedReducer=s;var _=u.dispatch,w=u.pending,x=i.memoizedState;if(null!==w){u.pending=null;var j=w=w.next;do{x=s(x,j.action),j=j.next}while(j!==w);qr(x,i.memoizedState)||(xo=!0),i.memoizedState=x,null===i.baseQueue&&(i.baseState=x),u.lastRenderedState=x}return[x,_]}function hi(){}function ii(s,i){var u=uo,_=di(),w=i(),x=!qr(_.memoizedState,w);if(x&&(_.memoizedState=w,xo=!0),_=_.queue,ji(ki.bind(null,u,_,s),[s]),_.getSnapshot!==i||x||null!==ho&&1&ho.memoizedState.tag){if(u.flags|=2048,li(9,mi.bind(null,u,_,w,i),void 0,null),null===zo)throw Error(p(349));0!=(30&co)||ni(u,i,w)}return w}function ni(s,i,u){s.flags|=16384,s={getSnapshot:i,value:u},null===(i=uo.updateQueue)?(i={lastEffect:null,stores:null},uo.updateQueue=i,i.stores=[s]):null===(u=i.stores)?i.stores=[s]:u.push(s)}function mi(s,i,u,_){i.value=u,i.getSnapshot=_,oi(i)&&pi(s)}function ki(s,i,u){return u((function(){oi(i)&&pi(s)}))}function oi(s){var i=s.getSnapshot;s=s.value;try{var u=i();return!qr(s,u)}catch(s){return!0}}function pi(s){var i=Zg(s,1);null!==i&&mh(i,s,1,-1)}function qi(s){var i=ci();return\"function\"==typeof s&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:s},i.queue=s,s=s.dispatch=ri.bind(null,uo,s),[i.memoizedState,s]}function li(s,i,u,_){return s={tag:s,create:i,destroy:u,deps:_,next:null},null===(i=uo.updateQueue)?(i={lastEffect:null,stores:null},uo.updateQueue=i,i.lastEffect=s.next=s):null===(u=i.lastEffect)?i.lastEffect=s.next=s:(_=u.next,u.next=s,s.next=_,i.lastEffect=s),s}function si(){return di().memoizedState}function ti(s,i,u,_){var w=ci();uo.flags|=s,w.memoizedState=li(1|i,u,void 0,void 0===_?null:_)}function ui(s,i,u,_){var w=di();_=void 0===_?null:_;var x=void 0;if(null!==po){var j=po.memoizedState;if(x=j.destroy,null!==_&&Wh(_,j.deps))return void(w.memoizedState=li(i,u,x,_))}uo.flags|=s,w.memoizedState=li(1|i,u,x,_)}function vi(s,i){return ti(8390656,8,s,i)}function ji(s,i){return ui(2048,8,s,i)}function wi(s,i){return ui(4,2,s,i)}function xi(s,i){return ui(4,4,s,i)}function yi(s,i){return\"function\"==typeof i?(s=s(),i(s),function(){i(null)}):null!=i?(s=s(),i.current=s,function(){i.current=null}):void 0}function zi(s,i,u){return u=null!=u?u.concat([s]):null,ui(4,4,yi.bind(null,i,s),u)}function Ai(){}function Bi(s,i){var u=di();i=void 0===i?null:i;var _=u.memoizedState;return null!==_&&null!==i&&Wh(i,_[1])?_[0]:(u.memoizedState=[s,i],s)}function Ci(s,i){var u=di();i=void 0===i?null:i;var _=u.memoizedState;return null!==_&&null!==i&&Wh(i,_[1])?_[0]:(s=s(),u.memoizedState=[s,i],s)}function Di(s,i,u){return 0==(21&co)?(s.baseState&&(s.baseState=!1,xo=!0),s.memoizedState=u):(qr(u,i)||(u=yc(),uo.lanes|=u,Yo|=u,s.baseState=!0),i)}function Ei(s,i){var u=It;It=0!==u&&4>u?u:4,s(!0);var _=lo.transition;lo.transition={};try{s(!1),i()}finally{It=u,lo.transition=_}}function Fi(){return di().memoizedState}function Gi(s,i,u){var _=lh(s);if(u={lane:_,action:u,hasEagerState:!1,eagerState:null,next:null},Hi(s))Ii(i,u);else if(null!==(u=Yg(s,i,u,_))){mh(u,s,_,L()),Ji(u,i,_)}}function ri(s,i,u){var _=lh(s),w={lane:_,action:u,hasEagerState:!1,eagerState:null,next:null};if(Hi(s))Ii(i,w);else{var x=s.alternate;if(0===s.lanes&&(null===x||0===x.lanes)&&null!==(x=i.lastRenderedReducer))try{var j=i.lastRenderedState,P=x(j,u);if(w.hasEagerState=!0,w.eagerState=P,qr(P,j)){var B=i.interleaved;return null===B?(w.next=w,Xg(i)):(w.next=B.next,B.next=w),void(i.interleaved=w)}}catch(s){}null!==(u=Yg(s,i,w,_))&&(mh(u,s,_,w=L()),Ji(u,i,_))}}function Hi(s){var i=s.alternate;return s===uo||null!==i&&i===uo}function Ii(s,i){mo=fo=!0;var u=s.pending;null===u?i.next=i:(i.next=u.next,u.next=i),s.pending=i}function Ji(s,i,u){if(0!=(4194240&u)){var _=i.lanes;u|=_&=s.pendingLanes,i.lanes=u,Cc(s,u)}}var vo={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},bo={readContext:Vg,useCallback:function(s,i){return ci().memoizedState=[s,void 0===i?null:i],s},useContext:Vg,useEffect:vi,useImperativeHandle:function(s,i,u){return u=null!=u?u.concat([s]):null,ti(4194308,4,yi.bind(null,i,s),u)},useLayoutEffect:function(s,i){return ti(4194308,4,s,i)},useInsertionEffect:function(s,i){return ti(4,2,s,i)},useMemo:function(s,i){var u=ci();return i=void 0===i?null:i,s=s(),u.memoizedState=[s,i],s},useReducer:function(s,i,u){var _=ci();return i=void 0!==u?u(i):i,_.memoizedState=_.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},_.queue=s,s=s.dispatch=Gi.bind(null,uo,s),[_.memoizedState,s]},useRef:function(s){return s={current:s},ci().memoizedState=s},useState:qi,useDebugValue:Ai,useDeferredValue:function(s){return ci().memoizedState=s},useTransition:function(){var s=qi(!1),i=s[0];return s=Ei.bind(null,s[1]),ci().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,u){var _=uo,w=ci();if(Un){if(void 0===u)throw Error(p(407));u=u()}else{if(u=i(),null===zo)throw Error(p(349));0!=(30&co)||ni(_,i,u)}w.memoizedState=u;var x={value:u,getSnapshot:i};return w.queue=x,vi(ki.bind(null,_,x,s),[s]),_.flags|=2048,li(9,mi.bind(null,_,x,u,i),void 0,null),u},useId:function(){var s=ci(),i=zo.identifierPrefix;if(Un){var u=Fn;i=\":\"+i+\"R\"+(u=(Bn&~(1<<32-Ot(Bn)-1)).toString(32)+u),0<(u=go++)&&(i+=\"H\"+u.toString(32)),i+=\":\"}else i=\":\"+i+\"r\"+(u=yo++).toString(32)+\":\";return s.memoizedState=i},unstable_isNewReconciler:!1},_o={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)},useDebugValue:Ai,useDeferredValue:function(s){return Di(di(),po.memoizedState,s)},useTransition:function(){return[fi(ei)[0],di().memoizedState]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},Eo={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(s){var i=di();return null===po?i.memoizedState=s:Di(i,po.memoizedState,s)},useTransition:function(){return[gi(ei)[0],di().memoizedState]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(s,i){try{var u=\"\",_=i;do{u+=Pa(_),_=_.return}while(_);var w=u}catch(s){w=\"\\nError generating stack: \"+s.message+\"\\n\"+s.stack}return{value:s,source:i,stack:w,digest:null}}function Li(s,i,u){return{value:s,source:null,stack:null!=u?u:null,digest:null!=i?i:null}}function Mi(s,i){try{console.error(i.value)}catch(s){setTimeout((function(){throw s}))}}var wo=\"function\"==typeof WeakMap?WeakMap:Map;function Oi(s,i,u){(u=ch(-1,u)).tag=3,u.payload={element:null};var _=i.value;return u.callback=function(){os||(os=!0,ss=_),Mi(0,i)},u}function Ri(s,i,u){(u=ch(-1,u)).tag=3;var _=s.type.getDerivedStateFromError;if(\"function\"==typeof _){var w=i.value;u.payload=function(){return _(w)},u.callback=function(){Mi(0,i)}}var x=s.stateNode;return null!==x&&\"function\"==typeof x.componentDidCatch&&(u.callback=function(){Mi(0,i),\"function\"!=typeof _&&(null===as?as=new Set([this]):as.add(this));var s=i.stack;this.componentDidCatch(i.value,{componentStack:null!==s?s:\"\"})}),u}function Ti(s,i,u){var _=s.pingCache;if(null===_){_=s.pingCache=new wo;var w=new Set;_.set(i,w)}else void 0===(w=_.get(i))&&(w=new Set,_.set(i,w));w.has(u)||(w.add(u),s=Ui.bind(null,s,i,u),i.then(s,s))}function Vi(s){do{var i;if((i=13===s.tag)&&(i=null===(i=s.memoizedState)||null!==i.dehydrated),i)return s;s=s.return}while(null!==s);return null}function Wi(s,i,u,_,w){return 0==(1&s.mode)?(s===i?s.flags|=65536:(s.flags|=128,u.flags|=131072,u.flags&=-52805,1===u.tag&&(null===u.alternate?u.tag=17:((i=ch(-1,1)).tag=2,dh(u,i,1))),u.lanes|=1),s):(s.flags|=65536,s.lanes=w,s)}var So=ee.ReactCurrentOwner,xo=!1;function Yi(s,i,u,_){i.child=null===s?eo(i,null,u,_):Zn(i,s.child,u,_)}function Zi(s,i,u,_,w){u=u.render;var x=i.ref;return Tg(i,w),_=Xh(s,i,u,_,x,w),u=bi(),null===s||xo?(Un&&u&&vg(i),i.flags|=1,Yi(s,i,_,w),i.child):(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~w,$i(s,i,w))}function aj(s,i,u,_,w){if(null===s){var x=u.type;return\"function\"!=typeof x||bj(x)||void 0!==x.defaultProps||null!==u.compare||void 0!==u.defaultProps?((s=yh(u.type,null,_,i,i.mode,w)).ref=i.ref,s.return=i,i.child=s):(i.tag=15,i.type=x,cj(s,i,x,_,w))}if(x=s.child,0==(s.lanes&w)){var j=x.memoizedProps;if((u=null!==(u=u.compare)?u:Ie)(j,_)&&s.ref===i.ref)return $i(s,i,w)}return i.flags|=1,(s=wh(x,_)).ref=i.ref,s.return=i,i.child=s}function cj(s,i,u,_,w){if(null!==s){var x=s.memoizedProps;if(Ie(x,_)&&s.ref===i.ref){if(xo=!1,i.pendingProps=_=x,0==(s.lanes&w))return i.lanes=s.lanes,$i(s,i,w);0!=(131072&s.flags)&&(xo=!0)}}return dj(s,i,u,_,w)}function ej(s,i,u){var _=i.pendingProps,w=_.children,x=null!==s?s.memoizedState:null;if(\"hidden\"===_.mode)if(0==(1&i.mode))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Ho,Ko),Ko|=u;else{if(0==(1073741824&u))return s=null!==x?x.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,G(Ho,Ko),Ko|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},_=null!==x?x.baseLanes:u,G(Ho,Ko),Ko|=_}else null!==x?(_=x.baseLanes|u,i.memoizedState=null):_=u,G(Ho,Ko),Ko|=_;return Yi(s,i,w,u),i.child}function hj(s,i){var u=i.ref;(null===s&&null!==u||null!==s&&s.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function dj(s,i,u,_,w){var x=Zf(u)?Cn:kn.current;return x=Yf(i,x),Tg(i,w),u=Xh(s,i,u,_,x,w),_=bi(),null===s||xo?(Un&&_&&vg(i),i.flags|=1,Yi(s,i,u,w),i.child):(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~w,$i(s,i,w))}function ij(s,i,u,_,w){if(Zf(u)){var x=!0;cg(i)}else x=!1;if(Tg(i,w),null===i.stateNode)jj(s,i),ph(i,u,_),rh(i,u,_,w),_=!0;else if(null===s){var j=i.stateNode,P=i.memoizedProps;j.props=P;var B=j.context,$=u.contextType;\"object\"==typeof $&&null!==$?$=Vg($):$=Yf(i,$=Zf(u)?Cn:kn.current);var U=u.getDerivedStateFromProps,Y=\"function\"==typeof U||\"function\"==typeof j.getSnapshotBeforeUpdate;Y||\"function\"!=typeof j.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof j.componentWillReceiveProps||(P!==_||B!==$)&&qh(i,j,_,$),Yn=!1;var X=i.memoizedState;j.state=X,gh(i,_,j,w),B=i.memoizedState,P!==_||X!==B||On.current||Yn?(\"function\"==typeof U&&(kh(i,u,U,_),B=i.memoizedState),(P=Yn||oh(i,u,P,_,X,B,$))?(Y||\"function\"!=typeof j.UNSAFE_componentWillMount&&\"function\"!=typeof j.componentWillMount||(\"function\"==typeof j.componentWillMount&&j.componentWillMount(),\"function\"==typeof j.UNSAFE_componentWillMount&&j.UNSAFE_componentWillMount()),\"function\"==typeof j.componentDidMount&&(i.flags|=4194308)):(\"function\"==typeof j.componentDidMount&&(i.flags|=4194308),i.memoizedProps=_,i.memoizedState=B),j.props=_,j.state=B,j.context=$,_=P):(\"function\"==typeof j.componentDidMount&&(i.flags|=4194308),_=!1)}else{j=i.stateNode,bh(s,i),P=i.memoizedProps,$=i.type===i.elementType?P:Lg(i.type,P),j.props=$,Y=i.pendingProps,X=j.context,\"object\"==typeof(B=u.contextType)&&null!==B?B=Vg(B):B=Yf(i,B=Zf(u)?Cn:kn.current);var Z=u.getDerivedStateFromProps;(U=\"function\"==typeof Z||\"function\"==typeof j.getSnapshotBeforeUpdate)||\"function\"!=typeof j.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof j.componentWillReceiveProps||(P!==Y||X!==B)&&qh(i,j,_,B),Yn=!1,X=i.memoizedState,j.state=X,gh(i,_,j,w);var ee=i.memoizedState;P!==Y||X!==ee||On.current||Yn?(\"function\"==typeof Z&&(kh(i,u,Z,_),ee=i.memoizedState),($=Yn||oh(i,u,$,_,X,ee,B)||!1)?(U||\"function\"!=typeof j.UNSAFE_componentWillUpdate&&\"function\"!=typeof j.componentWillUpdate||(\"function\"==typeof j.componentWillUpdate&&j.componentWillUpdate(_,ee,B),\"function\"==typeof j.UNSAFE_componentWillUpdate&&j.UNSAFE_componentWillUpdate(_,ee,B)),\"function\"==typeof j.componentDidUpdate&&(i.flags|=4),\"function\"==typeof j.getSnapshotBeforeUpdate&&(i.flags|=1024)):(\"function\"!=typeof j.componentDidUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=4),\"function\"!=typeof j.getSnapshotBeforeUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=1024),i.memoizedProps=_,i.memoizedState=ee),j.props=_,j.state=ee,j.context=B,_=$):(\"function\"!=typeof j.componentDidUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=4),\"function\"!=typeof j.getSnapshotBeforeUpdate||P===s.memoizedProps&&X===s.memoizedState||(i.flags|=1024),_=!1)}return kj(s,i,u,_,x,w)}function kj(s,i,u,_,w,x){hj(s,i);var j=0!=(128&i.flags);if(!_&&!j)return w&&dg(i,u,!1),$i(s,i,x);_=i.stateNode,So.current=i;var P=j&&\"function\"!=typeof u.getDerivedStateFromError?null:_.render();return i.flags|=1,null!==s&&j?(i.child=Zn(i,s.child,null,x),i.child=Zn(i,null,P,x)):Yi(s,i,P,x),i.memoizedState=_.state,w&&dg(i,u,!0),i.child}function lj(s){var i=s.stateNode;i.pendingContext?ag(0,i.pendingContext,i.pendingContext!==i.context):i.context&&ag(0,i.context,!1),Ih(s,i.containerInfo)}function mj(s,i,u,_,w){return Ig(),Jg(w),i.flags|=256,Yi(s,i,u,_),i.child}var ko,Oo,Co,Ao,jo={dehydrated:null,treeContext:null,retryLane:0};function oj(s){return{baseLanes:s,cachePool:null,transitions:null}}function pj(s,i,u){var _,w=i.pendingProps,x=so.current,j=!1,P=0!=(128&i.flags);if((_=P)||(_=(null===s||null!==s.memoizedState)&&0!=(2&x)),_?(j=!0,i.flags&=-129):null!==s&&null===s.memoizedState||(x|=1),G(so,1&x),null===s)return Eg(i),null!==(s=i.memoizedState)&&null!==(s=s.dehydrated)?(0==(1&i.mode)?i.lanes=1:\"$!\"===s.data?i.lanes=8:i.lanes=1073741824,null):(P=w.children,s=w.fallback,j?(w=i.mode,j=i.child,P={mode:\"hidden\",children:P},0==(1&w)&&null!==j?(j.childLanes=0,j.pendingProps=P):j=qj(P,w,0,null),s=Ah(s,w,u,null),j.return=i,s.return=i,j.sibling=s,i.child=j,i.child.memoizedState=oj(u),i.memoizedState=jo,s):rj(i,P));if(null!==(x=s.memoizedState)&&null!==(_=x.dehydrated))return function sj(s,i,u,_,w,x,j){if(u)return 256&i.flags?(i.flags&=-257,tj(s,i,j,_=Li(Error(p(422))))):null!==i.memoizedState?(i.child=s.child,i.flags|=128,null):(x=_.fallback,w=i.mode,_=qj({mode:\"visible\",children:_.children},w,0,null),(x=Ah(x,w,j,null)).flags|=2,_.return=i,x.return=i,_.sibling=x,i.child=_,0!=(1&i.mode)&&Zn(i,s.child,null,j),i.child.memoizedState=oj(j),i.memoizedState=jo,x);if(0==(1&i.mode))return tj(s,i,j,null);if(\"$!\"===w.data){if(_=w.nextSibling&&w.nextSibling.dataset)var P=_.dgst;return _=P,tj(s,i,j,_=Li(x=Error(p(419)),_,void 0))}if(P=0!=(j&s.childLanes),xo||P){if(null!==(_=zo)){switch(j&-j){case 4:w=2;break;case 16:w=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:w=32;break;case 536870912:w=268435456;break;default:w=0}0!==(w=0!=(w&(_.suspendedLanes|j))?0:w)&&w!==x.retryLane&&(x.retryLane=w,Zg(s,w),mh(_,s,w,-1))}return uj(),tj(s,i,j,_=Li(Error(p(421))))}return\"$?\"===w.data?(i.flags|=128,i.child=s.child,i=vj.bind(null,s),w._reactRetry=i,null):(s=x.treeContext,$n=Lf(w.nextSibling),qn=i,Un=!0,zn=null,null!==s&&(Rn[Dn++]=Bn,Rn[Dn++]=Fn,Rn[Dn++]=Ln,Bn=s.id,Fn=s.overflow,Ln=i),i=rj(i,_.children),i.flags|=4096,i)}(s,i,P,w,_,x,u);if(j){j=w.fallback,P=i.mode,_=(x=s.child).sibling;var B={mode:\"hidden\",children:w.children};return 0==(1&P)&&i.child!==x?((w=i.child).childLanes=0,w.pendingProps=B,i.deletions=null):(w=wh(x,B)).subtreeFlags=14680064&x.subtreeFlags,null!==_?j=wh(_,j):(j=Ah(j,P,u,null)).flags|=2,j.return=i,w.return=i,w.sibling=j,i.child=w,w=j,j=i.child,P=null===(P=s.child.memoizedState)?oj(u):{baseLanes:P.baseLanes|u,cachePool:null,transitions:P.transitions},j.memoizedState=P,j.childLanes=s.childLanes&~u,i.memoizedState=jo,w}return s=(j=s.child).sibling,w=wh(j,{mode:\"visible\",children:w.children}),0==(1&i.mode)&&(w.lanes=u),w.return=i,w.sibling=null,null!==s&&(null===(u=i.deletions)?(i.deletions=[s],i.flags|=16):u.push(s)),i.child=w,i.memoizedState=null,w}function rj(s,i){return(i=qj({mode:\"visible\",children:i},s.mode,0,null)).return=s,s.child=i}function tj(s,i,u,_){return null!==_&&Jg(_),Zn(i,s.child,null,u),(s=rj(i,i.pendingProps.children)).flags|=2,i.memoizedState=null,s}function wj(s,i,u){s.lanes|=i;var _=s.alternate;null!==_&&(_.lanes|=i),Sg(s.return,i,u)}function xj(s,i,u,_,w){var x=s.memoizedState;null===x?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:_,tail:u,tailMode:w}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=_,x.tail=u,x.tailMode=w)}function yj(s,i,u){var _=i.pendingProps,w=_.revealOrder,x=_.tail;if(Yi(s,i,_.children,u),0!=(2&(_=so.current)))_=1&_|2,i.flags|=128;else{if(null!==s&&0!=(128&s.flags))e:for(s=i.child;null!==s;){if(13===s.tag)null!==s.memoizedState&&wj(s,u,i);else if(19===s.tag)wj(s,u,i);else if(null!==s.child){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;null===s.sibling;){if(null===s.return||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}_&=1}if(G(so,_),0==(1&i.mode))i.memoizedState=null;else switch(w){case\"forwards\":for(u=i.child,w=null;null!==u;)null!==(s=u.alternate)&&null===Mh(s)&&(w=u),u=u.sibling;null===(u=w)?(w=i.child,i.child=null):(w=u.sibling,u.sibling=null),xj(i,!1,w,u,x);break;case\"backwards\":for(u=null,w=i.child,i.child=null;null!==w;){if(null!==(s=w.alternate)&&null===Mh(s)){i.child=w;break}s=w.sibling,w.sibling=u,u=w,w=s}xj(i,!0,u,null,x);break;case\"together\":xj(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jj(s,i){0==(1&i.mode)&&null!==s&&(s.alternate=null,i.alternate=null,i.flags|=2)}function $i(s,i,u){if(null!==s&&(i.dependencies=s.dependencies),Yo|=i.lanes,0==(u&i.childLanes))return null;if(null!==s&&i.child!==s.child)throw Error(p(153));if(null!==i.child){for(u=wh(s=i.child,s.pendingProps),i.child=u,u.return=i;null!==s.sibling;)s=s.sibling,(u=u.sibling=wh(s,s.pendingProps)).return=i;u.sibling=null}return i.child}function Ej(s,i){if(!Un)switch(s.tailMode){case\"hidden\":i=s.tail;for(var u=null;null!==i;)null!==i.alternate&&(u=i),i=i.sibling;null===u?s.tail=null:u.sibling=null;break;case\"collapsed\":u=s.tail;for(var _=null;null!==u;)null!==u.alternate&&(_=u),u=u.sibling;null===_?i||null===s.tail?s.tail=null:s.tail.sibling=null:_.sibling=null}}function S(s){var i=null!==s.alternate&&s.alternate.child===s.child,u=0,_=0;if(i)for(var w=s.child;null!==w;)u|=w.lanes|w.childLanes,_|=14680064&w.subtreeFlags,_|=14680064&w.flags,w.return=s,w=w.sibling;else for(w=s.child;null!==w;)u|=w.lanes|w.childLanes,_|=w.subtreeFlags,_|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=_,s.childLanes=u,i}function Fj(s,i,u){var _=i.pendingProps;switch(wg(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(i),null;case 1:case 17:return Zf(i.type)&&$f(),S(i),null;case 3:return _=i.stateNode,Jh(),E(On),E(kn),Oh(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),null!==s&&null!==s.child||(Gg(i)?i.flags|=4:null===s||s.memoizedState.isDehydrated&&0==(256&i.flags)||(i.flags|=1024,null!==zn&&(Gj(zn),zn=null))),Oo(s,i),S(i),null;case 5:Lh(i);var w=Hh(oo.current);if(u=i.type,null!==s&&null!=i.stateNode)Co(s,i,u,_,w),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!_){if(null===i.stateNode)throw Error(p(166));return S(i),null}if(s=Hh(ro.current),Gg(i)){_=i.stateNode,u=i.type;var x=i.memoizedProps;switch(_[gn]=i,_[yn]=x,s=0!=(1&i.mode),u){case\"dialog\":D(\"cancel\",_),D(\"close\",_);break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",_);break;case\"video\":case\"audio\":for(w=0;w<nn.length;w++)D(nn[w],_);break;case\"source\":D(\"error\",_);break;case\"img\":case\"image\":case\"link\":D(\"error\",_),D(\"load\",_);break;case\"details\":D(\"toggle\",_);break;case\"input\":Za(_,x),D(\"invalid\",_);break;case\"select\":_._wrapperState={wasMultiple:!!x.multiple},D(\"invalid\",_);break;case\"textarea\":hb(_,x),D(\"invalid\",_)}for(var P in ub(u,x),w=null,x)if(x.hasOwnProperty(P)){var B=x[P];\"children\"===P?\"string\"==typeof B?_.textContent!==B&&(!0!==x.suppressHydrationWarning&&Af(_.textContent,B,s),w=[\"children\",B]):\"number\"==typeof B&&_.textContent!==\"\"+B&&(!0!==x.suppressHydrationWarning&&Af(_.textContent,B,s),w=[\"children\",\"\"+B]):j.hasOwnProperty(P)&&null!=B&&\"onScroll\"===P&&D(\"scroll\",_)}switch(u){case\"input\":Va(_),db(_,x,!0);break;case\"textarea\":Va(_),jb(_);break;case\"select\":case\"option\":break;default:\"function\"==typeof x.onClick&&(_.onclick=Bf)}_=w,i.updateQueue=_,null!==_&&(i.flags|=4)}else{P=9===w.nodeType?w:w.ownerDocument,\"http://www.w3.org/1999/xhtml\"===s&&(s=kb(u)),\"http://www.w3.org/1999/xhtml\"===s?\"script\"===u?((s=P.createElement(\"div\")).innerHTML=\"<script><\\/script>\",s=s.removeChild(s.firstChild)):\"string\"==typeof _.is?s=P.createElement(u,{is:_.is}):(s=P.createElement(u),\"select\"===u&&(P=s,_.multiple?P.multiple=!0:_.size&&(P.size=_.size))):s=P.createElementNS(s,u),s[gn]=i,s[yn]=_,ko(s,i,!1,!1),i.stateNode=s;e:{switch(P=vb(u,_),u){case\"dialog\":D(\"cancel\",s),D(\"close\",s),w=_;break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",s),w=_;break;case\"video\":case\"audio\":for(w=0;w<nn.length;w++)D(nn[w],s);w=_;break;case\"source\":D(\"error\",s),w=_;break;case\"img\":case\"image\":case\"link\":D(\"error\",s),D(\"load\",s),w=_;break;case\"details\":D(\"toggle\",s),w=_;break;case\"input\":Za(s,_),w=Ya(s,_),D(\"invalid\",s);break;case\"option\":default:w=_;break;case\"select\":s._wrapperState={wasMultiple:!!_.multiple},w=Re({},_,{value:void 0}),D(\"invalid\",s);break;case\"textarea\":hb(s,_),w=gb(s,_),D(\"invalid\",s)}for(x in ub(u,w),B=w)if(B.hasOwnProperty(x)){var $=B[x];\"style\"===x?sb(s,$):\"dangerouslySetInnerHTML\"===x?null!=($=$?$.__html:void 0)&&He(s,$):\"children\"===x?\"string\"==typeof $?(\"textarea\"!==u||\"\"!==$)&&ob(s,$):\"number\"==typeof $&&ob(s,\"\"+$):\"suppressContentEditableWarning\"!==x&&\"suppressHydrationWarning\"!==x&&\"autoFocus\"!==x&&(j.hasOwnProperty(x)?null!=$&&\"onScroll\"===x&&D(\"scroll\",s):null!=$&&ta(s,x,$,P))}switch(u){case\"input\":Va(s),db(s,_,!1);break;case\"textarea\":Va(s),jb(s);break;case\"option\":null!=_.value&&s.setAttribute(\"value\",\"\"+Sa(_.value));break;case\"select\":s.multiple=!!_.multiple,null!=(x=_.value)?fb(s,!!_.multiple,x,!1):null!=_.defaultValue&&fb(s,!!_.multiple,_.defaultValue,!0);break;default:\"function\"==typeof w.onClick&&(s.onclick=Bf)}switch(u){case\"button\":case\"input\":case\"select\":case\"textarea\":_=!!_.autoFocus;break e;case\"img\":_=!0;break e;default:_=!1}}_&&(i.flags|=4)}null!==i.ref&&(i.flags|=512,i.flags|=2097152)}return S(i),null;case 6:if(s&&null!=i.stateNode)Ao(s,i,s.memoizedProps,_);else{if(\"string\"!=typeof _&&null===i.stateNode)throw Error(p(166));if(u=Hh(oo.current),Hh(ro.current),Gg(i)){if(_=i.stateNode,u=i.memoizedProps,_[gn]=i,(x=_.nodeValue!==u)&&null!==(s=qn))switch(s.tag){case 3:Af(_.nodeValue,u,0!=(1&s.mode));break;case 5:!0!==s.memoizedProps.suppressHydrationWarning&&Af(_.nodeValue,u,0!=(1&s.mode))}x&&(i.flags|=4)}else(_=(9===u.nodeType?u:u.ownerDocument).createTextNode(_))[gn]=i,i.stateNode=_}return S(i),null;case 13:if(E(so),_=i.memoizedState,null===s||null!==s.memoizedState&&null!==s.memoizedState.dehydrated){if(Un&&null!==$n&&0!=(1&i.mode)&&0==(128&i.flags))Hg(),Ig(),i.flags|=98560,x=!1;else if(x=Gg(i),null!==_&&null!==_.dehydrated){if(null===s){if(!x)throw Error(p(318));if(!(x=null!==(x=i.memoizedState)?x.dehydrated:null))throw Error(p(317));x[gn]=i}else Ig(),0==(128&i.flags)&&(i.memoizedState=null),i.flags|=4;S(i),x=!1}else null!==zn&&(Gj(zn),zn=null),x=!0;if(!x)return 65536&i.flags?i:null}return 0!=(128&i.flags)?(i.lanes=u,i):((_=null!==_)!==(null!==s&&null!==s.memoizedState)&&_&&(i.child.flags|=8192,0!=(1&i.mode)&&(null===s||0!=(1&so.current)?0===Jo&&(Jo=3):uj())),null!==i.updateQueue&&(i.flags|=4),S(i),null);case 4:return Jh(),Oo(s,i),null===s&&sf(i.stateNode.containerInfo),S(i),null;case 10:return Rg(i.type._context),S(i),null;case 19:if(E(so),null===(x=i.memoizedState))return S(i),null;if(_=0!=(128&i.flags),null===(P=x.rendering))if(_)Ej(x,!1);else{if(0!==Jo||null!==s&&0!=(128&s.flags))for(s=i.child;null!==s;){if(null!==(P=Mh(s))){for(i.flags|=128,Ej(x,!1),null!==(_=P.updateQueue)&&(i.updateQueue=_,i.flags|=4),i.subtreeFlags=0,_=u,u=i.child;null!==u;)s=_,(x=u).flags&=14680066,null===(P=x.alternate)?(x.childLanes=0,x.lanes=s,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=P.childLanes,x.lanes=P.lanes,x.child=P.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=P.memoizedProps,x.memoizedState=P.memoizedState,x.updateQueue=P.updateQueue,x.type=P.type,s=P.dependencies,x.dependencies=null===s?null:{lanes:s.lanes,firstContext:s.firstContext}),u=u.sibling;return G(so,1&so.current|2),i.child}s=s.sibling}null!==x.tail&&yt()>rs&&(i.flags|=128,_=!0,Ej(x,!1),i.lanes=4194304)}else{if(!_)if(null!==(s=Mh(P))){if(i.flags|=128,_=!0,null!==(u=s.updateQueue)&&(i.updateQueue=u,i.flags|=4),Ej(x,!0),null===x.tail&&\"hidden\"===x.tailMode&&!P.alternate&&!Un)return S(i),null}else 2*yt()-x.renderingStartTime>rs&&1073741824!==u&&(i.flags|=128,_=!0,Ej(x,!1),i.lanes=4194304);x.isBackwards?(P.sibling=i.child,i.child=P):(null!==(u=x.last)?u.sibling=P:i.child=P,x.last=P)}return null!==x.tail?(i=x.tail,x.rendering=i,x.tail=i.sibling,x.renderingStartTime=yt(),i.sibling=null,u=so.current,G(so,_?1&u|2:1&u),i):(S(i),null);case 22:case 23:return Ij(),_=null!==i.memoizedState,null!==s&&null!==s.memoizedState!==_&&(i.flags|=8192),_&&0!=(1&i.mode)?0!=(1073741824&Ko)&&(S(i),6&i.subtreeFlags&&(i.flags|=8192)):S(i),null;case 24:case 25:return null}throw Error(p(156,i.tag))}function Jj(s,i){switch(wg(i),i.tag){case 1:return Zf(i.type)&&$f(),65536&(s=i.flags)?(i.flags=-65537&s|128,i):null;case 3:return Jh(),E(On),E(kn),Oh(),0!=(65536&(s=i.flags))&&0==(128&s)?(i.flags=-65537&s|128,i):null;case 5:return Lh(i),null;case 13:if(E(so),null!==(s=i.memoizedState)&&null!==s.dehydrated){if(null===i.alternate)throw Error(p(340));Ig()}return 65536&(s=i.flags)?(i.flags=-65537&s|128,i):null;case 19:return E(so),null;case 4:return Jh(),null;case 10:return Rg(i.type._context),null;case 22:case 23:return Ij(),null;default:return null}}ko=function(s,i){for(var u=i.child;null!==u;){if(5===u.tag||6===u.tag)s.appendChild(u.stateNode);else if(4!==u.tag&&null!==u.child){u.child.return=u,u=u.child;continue}if(u===i)break;for(;null===u.sibling;){if(null===u.return||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Oo=function(){},Co=function(s,i,u,_){var w=s.memoizedProps;if(w!==_){s=i.stateNode,Hh(ro.current);var x,P=null;switch(u){case\"input\":w=Ya(s,w),_=Ya(s,_),P=[];break;case\"select\":w=Re({},w,{value:void 0}),_=Re({},_,{value:void 0}),P=[];break;case\"textarea\":w=gb(s,w),_=gb(s,_),P=[];break;default:\"function\"!=typeof w.onClick&&\"function\"==typeof _.onClick&&(s.onclick=Bf)}for(U in ub(u,_),u=null,w)if(!_.hasOwnProperty(U)&&w.hasOwnProperty(U)&&null!=w[U])if(\"style\"===U){var B=w[U];for(x in B)B.hasOwnProperty(x)&&(u||(u={}),u[x]=\"\")}else\"dangerouslySetInnerHTML\"!==U&&\"children\"!==U&&\"suppressContentEditableWarning\"!==U&&\"suppressHydrationWarning\"!==U&&\"autoFocus\"!==U&&(j.hasOwnProperty(U)?P||(P=[]):(P=P||[]).push(U,null));for(U in _){var $=_[U];if(B=null!=w?w[U]:void 0,_.hasOwnProperty(U)&&$!==B&&(null!=$||null!=B))if(\"style\"===U)if(B){for(x in B)!B.hasOwnProperty(x)||$&&$.hasOwnProperty(x)||(u||(u={}),u[x]=\"\");for(x in $)$.hasOwnProperty(x)&&B[x]!==$[x]&&(u||(u={}),u[x]=$[x])}else u||(P||(P=[]),P.push(U,u)),u=$;else\"dangerouslySetInnerHTML\"===U?($=$?$.__html:void 0,B=B?B.__html:void 0,null!=$&&B!==$&&(P=P||[]).push(U,$)):\"children\"===U?\"string\"!=typeof $&&\"number\"!=typeof $||(P=P||[]).push(U,\"\"+$):\"suppressContentEditableWarning\"!==U&&\"suppressHydrationWarning\"!==U&&(j.hasOwnProperty(U)?(null!=$&&\"onScroll\"===U&&D(\"scroll\",s),P||B===$||(P=[])):(P=P||[]).push(U,$))}u&&(P=P||[]).push(\"style\",u);var U=P;(i.updateQueue=U)&&(i.flags|=4)}},Ao=function(s,i,u,_){u!==_&&(i.flags|=4)};var Po=!1,Io=!1,No=\"function\"==typeof WeakSet?WeakSet:Set,Mo=null;function Mj(s,i){var u=s.ref;if(null!==u)if(\"function\"==typeof u)try{u(null)}catch(u){W(s,i,u)}else u.current=null}function Nj(s,i,u){try{u()}catch(u){W(s,i,u)}}var To=!1;function Qj(s,i,u){var _=i.updateQueue;if(null!==(_=null!==_?_.lastEffect:null)){var w=_=_.next;do{if((w.tag&s)===s){var x=w.destroy;w.destroy=void 0,void 0!==x&&Nj(i,u,x)}w=w.next}while(w!==_)}}function Rj(s,i){if(null!==(i=null!==(i=i.updateQueue)?i.lastEffect:null)){var u=i=i.next;do{if((u.tag&s)===s){var _=u.create;u.destroy=_()}u=u.next}while(u!==i)}}function Sj(s){var i=s.ref;if(null!==i){var u=s.stateNode;s.tag,s=u,\"function\"==typeof i?i(s):i.current=s}}function Tj(s){var i=s.alternate;null!==i&&(s.alternate=null,Tj(i)),s.child=null,s.deletions=null,s.sibling=null,5===s.tag&&(null!==(i=s.stateNode)&&(delete i[gn],delete i[yn],delete i[bn],delete i[_n],delete i[En])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Uj(s){return 5===s.tag||3===s.tag||4===s.tag}function Vj(s){e:for(;;){for(;null===s.sibling;){if(null===s.return||Uj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;5!==s.tag&&6!==s.tag&&18!==s.tag;){if(2&s.flags)continue e;if(null===s.child||4===s.tag)continue e;s.child.return=s,s=s.child}if(!(2&s.flags))return s.stateNode}}function Wj(s,i,u){var _=s.tag;if(5===_||6===_)s=s.stateNode,i?8===u.nodeType?u.parentNode.insertBefore(s,i):u.insertBefore(s,i):(8===u.nodeType?(i=u.parentNode).insertBefore(s,u):(i=u).appendChild(s),null!=(u=u._reactRootContainer)||null!==i.onclick||(i.onclick=Bf));else if(4!==_&&null!==(s=s.child))for(Wj(s,i,u),s=s.sibling;null!==s;)Wj(s,i,u),s=s.sibling}function Xj(s,i,u){var _=s.tag;if(5===_||6===_)s=s.stateNode,i?u.insertBefore(s,i):u.appendChild(s);else if(4!==_&&null!==(s=s.child))for(Xj(s,i,u),s=s.sibling;null!==s;)Xj(s,i,u),s=s.sibling}var Ro=null,Do=!1;function Zj(s,i,u){for(u=u.child;null!==u;)ak(s,i,u),u=u.sibling}function ak(s,i,u){if(kt&&\"function\"==typeof kt.onCommitFiberUnmount)try{kt.onCommitFiberUnmount(xt,u)}catch(s){}switch(u.tag){case 5:Io||Mj(u,i);case 6:var _=Ro,w=Do;Ro=null,Zj(s,i,u),Do=w,null!==(Ro=_)&&(Do?(s=Ro,u=u.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):Ro.removeChild(u.stateNode));break;case 18:null!==Ro&&(Do?(s=Ro,u=u.stateNode,8===s.nodeType?Kf(s.parentNode,u):1===s.nodeType&&Kf(s,u),bd(s)):Kf(Ro,u.stateNode));break;case 4:_=Ro,w=Do,Ro=u.stateNode.containerInfo,Do=!0,Zj(s,i,u),Ro=_,Do=w;break;case 0:case 11:case 14:case 15:if(!Io&&(null!==(_=u.updateQueue)&&null!==(_=_.lastEffect))){w=_=_.next;do{var x=w,j=x.destroy;x=x.tag,void 0!==j&&(0!=(2&x)||0!=(4&x))&&Nj(u,i,j),w=w.next}while(w!==_)}Zj(s,i,u);break;case 1:if(!Io&&(Mj(u,i),\"function\"==typeof(_=u.stateNode).componentWillUnmount))try{_.props=u.memoizedProps,_.state=u.memoizedState,_.componentWillUnmount()}catch(s){W(u,i,s)}Zj(s,i,u);break;case 21:Zj(s,i,u);break;case 22:1&u.mode?(Io=(_=Io)||null!==u.memoizedState,Zj(s,i,u),Io=_):Zj(s,i,u);break;default:Zj(s,i,u)}}function bk(s){var i=s.updateQueue;if(null!==i){s.updateQueue=null;var u=s.stateNode;null===u&&(u=s.stateNode=new No),i.forEach((function(i){var _=ck.bind(null,s,i);u.has(i)||(u.add(i),i.then(_,_))}))}}function dk(s,i){var u=i.deletions;if(null!==u)for(var _=0;_<u.length;_++){var w=u[_];try{var x=s,j=i,P=j;e:for(;null!==P;){switch(P.tag){case 5:Ro=P.stateNode,Do=!1;break e;case 3:case 4:Ro=P.stateNode.containerInfo,Do=!0;break e}P=P.return}if(null===Ro)throw Error(p(160));ak(x,j,w),Ro=null,Do=!1;var B=w.alternate;null!==B&&(B.return=null),w.return=null}catch(s){W(w,i,s)}}if(12854&i.subtreeFlags)for(i=i.child;null!==i;)ek(i,s),i=i.sibling}function ek(s,i){var u=s.alternate,_=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(dk(i,s),fk(s),4&_){try{Qj(3,s,s.return),Rj(3,s)}catch(i){W(s,s.return,i)}try{Qj(5,s,s.return)}catch(i){W(s,s.return,i)}}break;case 1:dk(i,s),fk(s),512&_&&null!==u&&Mj(u,u.return);break;case 5:if(dk(i,s),fk(s),512&_&&null!==u&&Mj(u,u.return),32&s.flags){var w=s.stateNode;try{ob(w,\"\")}catch(i){W(s,s.return,i)}}if(4&_&&null!=(w=s.stateNode)){var x=s.memoizedProps,j=null!==u?u.memoizedProps:x,P=s.type,B=s.updateQueue;if(s.updateQueue=null,null!==B)try{\"input\"===P&&\"radio\"===x.type&&null!=x.name&&ab(w,x),vb(P,j);var $=vb(P,x);for(j=0;j<B.length;j+=2){var U=B[j],Y=B[j+1];\"style\"===U?sb(w,Y):\"dangerouslySetInnerHTML\"===U?He(w,Y):\"children\"===U?ob(w,Y):ta(w,U,Y,$)}switch(P){case\"input\":bb(w,x);break;case\"textarea\":ib(w,x);break;case\"select\":var X=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!x.multiple;var Z=x.value;null!=Z?fb(w,!!x.multiple,Z,!1):X!==!!x.multiple&&(null!=x.defaultValue?fb(w,!!x.multiple,x.defaultValue,!0):fb(w,!!x.multiple,x.multiple?[]:\"\",!1))}w[yn]=x}catch(i){W(s,s.return,i)}}break;case 6:if(dk(i,s),fk(s),4&_){if(null===s.stateNode)throw Error(p(162));w=s.stateNode,x=s.memoizedProps;try{w.nodeValue=x}catch(i){W(s,s.return,i)}}break;case 3:if(dk(i,s),fk(s),4&_&&null!==u&&u.memoizedState.isDehydrated)try{bd(i.containerInfo)}catch(i){W(s,s.return,i)}break;case 4:default:dk(i,s),fk(s);break;case 13:dk(i,s),fk(s),8192&(w=s.child).flags&&(x=null!==w.memoizedState,w.stateNode.isHidden=x,!x||null!==w.alternate&&null!==w.alternate.memoizedState||(ts=yt())),4&_&&bk(s);break;case 22:if(U=null!==u&&null!==u.memoizedState,1&s.mode?(Io=($=Io)||U,dk(i,s),Io=$):dk(i,s),fk(s),8192&_){if($=null!==s.memoizedState,(s.stateNode.isHidden=$)&&!U&&0!=(1&s.mode))for(Mo=s,U=s.child;null!==U;){for(Y=Mo=U;null!==Mo;){switch(Z=(X=Mo).child,X.tag){case 0:case 11:case 14:case 15:Qj(4,X,X.return);break;case 1:Mj(X,X.return);var ee=X.stateNode;if(\"function\"==typeof ee.componentWillUnmount){_=X,u=X.return;try{i=_,ee.props=i.memoizedProps,ee.state=i.memoizedState,ee.componentWillUnmount()}catch(s){W(_,u,s)}}break;case 5:Mj(X,X.return);break;case 22:if(null!==X.memoizedState){hk(Y);continue}}null!==Z?(Z.return=X,Mo=Z):hk(Y)}U=U.sibling}e:for(U=null,Y=s;;){if(5===Y.tag){if(null===U){U=Y;try{w=Y.stateNode,$?\"function\"==typeof(x=w.style).setProperty?x.setProperty(\"display\",\"none\",\"important\"):x.display=\"none\":(P=Y.stateNode,j=null!=(B=Y.memoizedProps.style)&&B.hasOwnProperty(\"display\")?B.display:null,P.style.display=rb(\"display\",j))}catch(i){W(s,s.return,i)}}}else if(6===Y.tag){if(null===U)try{Y.stateNode.nodeValue=$?\"\":Y.memoizedProps}catch(i){W(s,s.return,i)}}else if((22!==Y.tag&&23!==Y.tag||null===Y.memoizedState||Y===s)&&null!==Y.child){Y.child.return=Y,Y=Y.child;continue}if(Y===s)break e;for(;null===Y.sibling;){if(null===Y.return||Y.return===s)break e;U===Y&&(U=null),Y=Y.return}U===Y&&(U=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:dk(i,s),fk(s),4&_&&bk(s);case 21:}}function fk(s){var i=s.flags;if(2&i){try{e:{for(var u=s.return;null!==u;){if(Uj(u)){var _=u;break e}u=u.return}throw Error(p(160))}switch(_.tag){case 5:var w=_.stateNode;32&_.flags&&(ob(w,\"\"),_.flags&=-33),Xj(s,Vj(s),w);break;case 3:case 4:var x=_.stateNode.containerInfo;Wj(s,Vj(s),x);break;default:throw Error(p(161))}}catch(i){W(s,s.return,i)}s.flags&=-3}4096&i&&(s.flags&=-4097)}function ik(s,i,u){Mo=s,jk(s,i,u)}function jk(s,i,u){for(var _=0!=(1&s.mode);null!==Mo;){var w=Mo,x=w.child;if(22===w.tag&&_){var j=null!==w.memoizedState||Po;if(!j){var P=w.alternate,B=null!==P&&null!==P.memoizedState||Io;P=Po;var $=Io;if(Po=j,(Io=B)&&!$)for(Mo=w;null!==Mo;)B=(j=Mo).child,22===j.tag&&null!==j.memoizedState?kk(w):null!==B?(B.return=j,Mo=B):kk(w);for(;null!==x;)Mo=x,jk(x,i,u),x=x.sibling;Mo=w,Po=P,Io=$}lk(s)}else 0!=(8772&w.subtreeFlags)&&null!==x?(x.return=w,Mo=x):lk(s)}}function lk(s){for(;null!==Mo;){var i=Mo;if(0!=(8772&i.flags)){var u=i.alternate;try{if(0!=(8772&i.flags))switch(i.tag){case 0:case 11:case 15:Io||Rj(5,i);break;case 1:var _=i.stateNode;if(4&i.flags&&!Io)if(null===u)_.componentDidMount();else{var w=i.elementType===i.type?u.memoizedProps:Lg(i.type,u.memoizedProps);_.componentDidUpdate(w,u.memoizedState,_.__reactInternalSnapshotBeforeUpdate)}var x=i.updateQueue;null!==x&&ih(i,x,_);break;case 3:var j=i.updateQueue;if(null!==j){if(u=null,null!==i.child)switch(i.child.tag){case 5:case 1:u=i.child.stateNode}ih(i,j,u)}break;case 5:var P=i.stateNode;if(null===u&&4&i.flags){u=P;var B=i.memoizedProps;switch(i.type){case\"button\":case\"input\":case\"select\":case\"textarea\":B.autoFocus&&u.focus();break;case\"img\":B.src&&(u.src=B.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===i.memoizedState){var $=i.alternate;if(null!==$){var U=$.memoizedState;if(null!==U){var Y=U.dehydrated;null!==Y&&bd(Y)}}}break;default:throw Error(p(163))}Io||512&i.flags&&Sj(i)}catch(s){W(i,i.return,s)}}if(i===s){Mo=null;break}if(null!==(u=i.sibling)){u.return=i.return,Mo=u;break}Mo=i.return}}function hk(s){for(;null!==Mo;){var i=Mo;if(i===s){Mo=null;break}var u=i.sibling;if(null!==u){u.return=i.return,Mo=u;break}Mo=i.return}}function kk(s){for(;null!==Mo;){var i=Mo;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{Rj(4,i)}catch(s){W(i,u,s)}break;case 1:var _=i.stateNode;if(\"function\"==typeof _.componentDidMount){var w=i.return;try{_.componentDidMount()}catch(s){W(i,w,s)}}var x=i.return;try{Sj(i)}catch(s){W(i,x,s)}break;case 5:var j=i.return;try{Sj(i)}catch(s){W(i,j,s)}}}catch(s){W(i,i.return,s)}if(i===s){Mo=null;break}var P=i.sibling;if(null!==P){P.return=i.return,Mo=P;break}Mo=i.return}}var Lo,Bo=Math.ceil,Fo=ee.ReactCurrentDispatcher,qo=ee.ReactCurrentOwner,$o=ee.ReactCurrentBatchConfig,Uo=0,zo=null,Vo=null,Wo=0,Ko=0,Ho=Uf(0),Jo=0,Go=null,Yo=0,Xo=0,Qo=0,Zo=null,es=null,ts=0,rs=1/0,ns=null,os=!1,ss=null,as=null,ls=!1,cs=null,us=0,ps=0,hs=null,ds=-1,fs=0;function L(){return 0!=(6&Uo)?yt():-1!==ds?ds:ds=yt()}function lh(s){return 0==(1&s.mode)?1:0!=(2&Uo)&&0!==Wo?Wo&-Wo:null!==Vn.transition?(0===fs&&(fs=yc()),fs):0!==(s=It)?s:s=void 0===(s=window.event)?16:jd(s.type)}function mh(s,i,u,_){if(50<ps)throw ps=0,hs=null,Error(p(185));Ac(s,u,_),0!=(2&Uo)&&s===zo||(s===zo&&(0==(2&Uo)&&(Xo|=u),4===Jo&&Dk(s,Wo)),Ek(s,_),1===u&&0===Uo&&0==(1&i.mode)&&(rs=yt()+500,jn&&jg()))}function Ek(s,i){var u=s.callbackNode;!function wc(s,i){for(var u=s.suspendedLanes,_=s.pingedLanes,w=s.expirationTimes,x=s.pendingLanes;0<x;){var j=31-Ot(x),P=1<<j,B=w[j];-1===B?0!=(P&u)&&0==(P&_)||(w[j]=vc(P,i)):B<=i&&(s.expiredLanes|=P),x&=~P}}(s,i);var _=uc(s,s===zo?Wo:0);if(0===_)null!==u&&dt(u),s.callbackNode=null,s.callbackPriority=0;else if(i=_&-_,s.callbackPriority!==i){if(null!=u&&dt(u),1===i)0===s.tag?function ig(s){jn=!0,hg(s)}(Fk.bind(null,s)):hg(Fk.bind(null,s)),fn((function(){0==(6&Uo)&&jg()})),u=null;else{switch(Dc(_)){case 1:u=bt;break;case 4:u=_t;break;case 16:default:u=Et;break;case 536870912:u=St}u=Gk(u,Hk.bind(null,s))}s.callbackPriority=i,s.callbackNode=u}}function Hk(s,i){if(ds=-1,fs=0,0!=(6&Uo))throw Error(p(327));var u=s.callbackNode;if(Ik()&&s.callbackNode!==u)return null;var _=uc(s,s===zo?Wo:0);if(0===_)return null;if(0!=(30&_)||0!=(_&s.expiredLanes)||i)i=Jk(s,_);else{i=_;var w=Uo;Uo|=2;var x=Kk();for(zo===s&&Wo===i||(ns=null,rs=yt()+500,Lk(s,i));;)try{Mk();break}catch(i){Nk(s,i)}Qg(),Fo.current=x,Uo=w,null!==Vo?i=0:(zo=null,Wo=0,i=Jo)}if(0!==i){if(2===i&&(0!==(w=xc(s))&&(_=w,i=Ok(s,w))),1===i)throw u=Go,Lk(s,0),Dk(s,_),Ek(s,yt()),u;if(6===i)Dk(s,_);else{if(w=s.current.alternate,0==(30&_)&&!function Pk(s){for(var i=s;;){if(16384&i.flags){var u=i.updateQueue;if(null!==u&&null!==(u=u.stores))for(var _=0;_<u.length;_++){var w=u[_],x=w.getSnapshot;w=w.value;try{if(!qr(x(),w))return!1}catch(s){return!1}}}if(u=i.child,16384&i.subtreeFlags&&null!==u)u.return=i,i=u;else{if(i===s)break;for(;null===i.sibling;){if(null===i.return||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}(w)&&(2===(i=Jk(s,_))&&(0!==(x=xc(s))&&(_=x,i=Ok(s,x))),1===i))throw u=Go,Lk(s,0),Dk(s,_),Ek(s,yt()),u;switch(s.finishedWork=w,s.finishedLanes=_,i){case 0:case 1:throw Error(p(345));case 2:case 5:Qk(s,es,ns);break;case 3:if(Dk(s,_),(130023424&_)===_&&10<(i=ts+500-yt())){if(0!==uc(s,0))break;if(((w=s.suspendedLanes)&_)!==_){L(),s.pingedLanes|=s.suspendedLanes&w;break}s.timeoutHandle=pn(Qk.bind(null,s,es,ns),i);break}Qk(s,es,ns);break;case 4:if(Dk(s,_),(4194240&_)===_)break;for(i=s.eventTimes,w=-1;0<_;){var j=31-Ot(_);x=1<<j,(j=i[j])>w&&(w=j),_&=~x}if(_=w,10<(_=(120>(_=yt()-_)?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*Bo(_/1960))-_)){s.timeoutHandle=pn(Qk.bind(null,s,es,ns),_);break}Qk(s,es,ns);break;default:throw Error(p(329))}}}return Ek(s,yt()),s.callbackNode===u?Hk.bind(null,s):null}function Ok(s,i){var u=Zo;return s.current.memoizedState.isDehydrated&&(Lk(s,i).flags|=256),2!==(s=Jk(s,i))&&(i=es,es=u,null!==i&&Gj(i)),s}function Gj(s){null===es?es=s:es.push.apply(es,s)}function Dk(s,i){for(i&=~Qo,i&=~Xo,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var u=31-Ot(i),_=1<<u;s[u]=-1,i&=~_}}function Fk(s){if(0!=(6&Uo))throw Error(p(327));Ik();var i=uc(s,0);if(0==(1&i))return Ek(s,yt()),null;var u=Jk(s,i);if(0!==s.tag&&2===u){var _=xc(s);0!==_&&(i=_,u=Ok(s,_))}if(1===u)throw u=Go,Lk(s,0),Dk(s,i),Ek(s,yt()),u;if(6===u)throw Error(p(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Qk(s,es,ns),Ek(s,yt()),null}function Rk(s,i){var u=Uo;Uo|=1;try{return s(i)}finally{0===(Uo=u)&&(rs=yt()+500,jn&&jg())}}function Sk(s){null!==cs&&0===cs.tag&&0==(6&Uo)&&Ik();var i=Uo;Uo|=1;var u=$o.transition,_=It;try{if($o.transition=null,It=1,s)return s()}finally{It=_,$o.transition=u,0==(6&(Uo=i))&&jg()}}function Ij(){Ko=Ho.current,E(Ho)}function Lk(s,i){s.finishedWork=null,s.finishedLanes=0;var u=s.timeoutHandle;if(-1!==u&&(s.timeoutHandle=-1,hn(u)),null!==Vo)for(u=Vo.return;null!==u;){var _=u;switch(wg(_),_.tag){case 1:null!=(_=_.type.childContextTypes)&&$f();break;case 3:Jh(),E(On),E(kn),Oh();break;case 5:Lh(_);break;case 4:Jh();break;case 13:case 19:E(so);break;case 10:Rg(_.type._context);break;case 22:case 23:Ij()}u=u.return}if(zo=s,Vo=s=wh(s.current,null),Wo=Ko=i,Jo=0,Go=null,Qo=Xo=Yo=0,es=Zo=null,null!==Gn){for(i=0;i<Gn.length;i++)if(null!==(_=(u=Gn[i]).interleaved)){u.interleaved=null;var w=_.next,x=u.pending;if(null!==x){var j=x.next;x.next=w,_.next=j}u.pending=_}Gn=null}return s}function Nk(s,i){for(;;){var u=Vo;try{if(Qg(),ao.current=vo,fo){for(var _=uo.memoizedState;null!==_;){var w=_.queue;null!==w&&(w.pending=null),_=_.next}fo=!1}if(co=0,ho=po=uo=null,mo=!1,go=0,qo.current=null,null===u||null===u.return){Jo=1,Go=i,Vo=null;break}e:{var x=s,j=u.return,P=u,B=i;if(i=Wo,P.flags|=32768,null!==B&&\"object\"==typeof B&&\"function\"==typeof B.then){var $=B,U=P,Y=U.tag;if(0==(1&U.mode)&&(0===Y||11===Y||15===Y)){var X=U.alternate;X?(U.updateQueue=X.updateQueue,U.memoizedState=X.memoizedState,U.lanes=X.lanes):(U.updateQueue=null,U.memoizedState=null)}var Z=Vi(j);if(null!==Z){Z.flags&=-257,Wi(Z,j,P,0,i),1&Z.mode&&Ti(x,$,i),B=$;var ee=(i=Z).updateQueue;if(null===ee){var ie=new Set;ie.add(B),i.updateQueue=ie}else ee.add(B);break e}if(0==(1&i)){Ti(x,$,i),uj();break e}B=Error(p(426))}else if(Un&&1&P.mode){var ae=Vi(j);if(null!==ae){0==(65536&ae.flags)&&(ae.flags|=256),Wi(ae,j,P,0,i),Jg(Ki(B,P));break e}}x=B=Ki(B,P),4!==Jo&&(Jo=2),null===Zo?Zo=[x]:Zo.push(x),x=j;do{switch(x.tag){case 3:x.flags|=65536,i&=-i,x.lanes|=i,fh(x,Oi(0,B,i));break e;case 1:P=B;var le=x.type,ce=x.stateNode;if(0==(128&x.flags)&&(\"function\"==typeof le.getDerivedStateFromError||null!==ce&&\"function\"==typeof ce.componentDidCatch&&(null===as||!as.has(ce)))){x.flags|=65536,i&=-i,x.lanes|=i,fh(x,Ri(x,P,i));break e}}x=x.return}while(null!==x)}Tk(u)}catch(s){i=s,Vo===u&&null!==u&&(Vo=u=u.return);continue}break}}function Kk(){var s=Fo.current;return Fo.current=vo,null===s?vo:s}function uj(){0!==Jo&&3!==Jo&&2!==Jo||(Jo=4),null===zo||0==(268435455&Yo)&&0==(268435455&Xo)||Dk(zo,Wo)}function Jk(s,i){var u=Uo;Uo|=2;var _=Kk();for(zo===s&&Wo===i||(ns=null,Lk(s,i));;)try{Uk();break}catch(i){Nk(s,i)}if(Qg(),Uo=u,Fo.current=_,null!==Vo)throw Error(p(261));return zo=null,Wo=0,Jo}function Uk(){for(;null!==Vo;)Vk(Vo)}function Mk(){for(;null!==Vo&&!mt();)Vk(Vo)}function Vk(s){var i=Lo(s.alternate,s,Ko);s.memoizedProps=s.pendingProps,null===i?Tk(s):Vo=i,qo.current=null}function Tk(s){var i=s;do{var u=i.alternate;if(s=i.return,0==(32768&i.flags)){if(null!==(u=Fj(u,i,Ko)))return void(Vo=u)}else{if(null!==(u=Jj(u,i)))return u.flags&=32767,void(Vo=u);if(null===s)return Jo=6,void(Vo=null);s.flags|=32768,s.subtreeFlags=0,s.deletions=null}if(null!==(i=i.sibling))return void(Vo=i);Vo=i=s}while(null!==i);0===Jo&&(Jo=5)}function Qk(s,i,u){var _=It,w=$o.transition;try{$o.transition=null,It=1,function Xk(s,i,u,_){do{Ik()}while(null!==cs);if(0!=(6&Uo))throw Error(p(327));u=s.finishedWork;var w=s.finishedLanes;if(null===u)return null;if(s.finishedWork=null,s.finishedLanes=0,u===s.current)throw Error(p(177));s.callbackNode=null,s.callbackPriority=0;var x=u.lanes|u.childLanes;if(function Bc(s,i){var u=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var _=s.eventTimes;for(s=s.expirationTimes;0<u;){var w=31-Ot(u),x=1<<w;i[w]=0,_[w]=-1,s[w]=-1,u&=~x}}(s,x),s===zo&&(Vo=zo=null,Wo=0),0==(2064&u.subtreeFlags)&&0==(2064&u.flags)||ls||(ls=!0,Gk(Et,(function(){return Ik(),null}))),x=0!=(15990&u.flags),0!=(15990&u.subtreeFlags)||x){x=$o.transition,$o.transition=null;var j=It;It=1;var P=Uo;Uo|=4,qo.current=null,function Pj(s,i){if(cn=Ht,Ne(s=Me())){if(\"selectionStart\"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var _=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(_&&0!==_.rangeCount){u=_.anchorNode;var w=_.anchorOffset,x=_.focusNode;_=_.focusOffset;try{u.nodeType,x.nodeType}catch(s){u=null;break e}var j=0,P=-1,B=-1,$=0,U=0,Y=s,X=null;t:for(;;){for(var Z;Y!==u||0!==w&&3!==Y.nodeType||(P=j+w),Y!==x||0!==_&&3!==Y.nodeType||(B=j+_),3===Y.nodeType&&(j+=Y.nodeValue.length),null!==(Z=Y.firstChild);)X=Y,Y=Z;for(;;){if(Y===s)break t;if(X===u&&++$===w&&(P=j),X===x&&++U===_&&(B=j),null!==(Z=Y.nextSibling))break;X=(Y=X).parentNode}Y=Z}u=-1===P||-1===B?null:{start:P,end:B}}else u=null}u=u||{start:0,end:0}}else u=null;for(un={focusedElem:s,selectionRange:u},Ht=!1,Mo=i;null!==Mo;)if(s=(i=Mo).child,0!=(1028&i.subtreeFlags)&&null!==s)s.return=i,Mo=s;else for(;null!==Mo;){i=Mo;try{var ee=i.alternate;if(0!=(1024&i.flags))switch(i.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==ee){var ie=ee.memoizedProps,ae=ee.memoizedState,le=i.stateNode,ce=le.getSnapshotBeforeUpdate(i.elementType===i.type?ie:Lg(i.type,ie),ae);le.__reactInternalSnapshotBeforeUpdate=ce}break;case 3:var pe=i.stateNode.containerInfo;1===pe.nodeType?pe.textContent=\"\":9===pe.nodeType&&pe.documentElement&&pe.removeChild(pe.documentElement);break;default:throw Error(p(163))}}catch(s){W(i,i.return,s)}if(null!==(s=i.sibling)){s.return=i.return,Mo=s;break}Mo=i.return}return ee=To,To=!1,ee}(s,u),ek(u,s),Oe(un),Ht=!!cn,un=cn=null,s.current=u,ik(u,s,w),gt(),Uo=P,It=j,$o.transition=x}else s.current=u;if(ls&&(ls=!1,cs=s,us=w),x=s.pendingLanes,0===x&&(as=null),function mc(s){if(kt&&\"function\"==typeof kt.onCommitFiberRoot)try{kt.onCommitFiberRoot(xt,s,void 0,128==(128&s.current.flags))}catch(s){}}(u.stateNode),Ek(s,yt()),null!==i)for(_=s.onRecoverableError,u=0;u<i.length;u++)w=i[u],_(w.value,{componentStack:w.stack,digest:w.digest});if(os)throw os=!1,s=ss,ss=null,s;return 0!=(1&us)&&0!==s.tag&&Ik(),x=s.pendingLanes,0!=(1&x)?s===hs?ps++:(ps=0,hs=s):ps=0,jg(),null}(s,i,u,_)}finally{$o.transition=w,It=_}return null}function Ik(){if(null!==cs){var s=Dc(us),i=$o.transition,u=It;try{if($o.transition=null,It=16>s?16:s,null===cs)var _=!1;else{if(s=cs,cs=null,us=0,0!=(6&Uo))throw Error(p(331));var w=Uo;for(Uo|=4,Mo=s.current;null!==Mo;){var x=Mo,j=x.child;if(0!=(16&Mo.flags)){var P=x.deletions;if(null!==P){for(var B=0;B<P.length;B++){var $=P[B];for(Mo=$;null!==Mo;){var U=Mo;switch(U.tag){case 0:case 11:case 15:Qj(8,U,x)}var Y=U.child;if(null!==Y)Y.return=U,Mo=Y;else for(;null!==Mo;){var X=(U=Mo).sibling,Z=U.return;if(Tj(U),U===$){Mo=null;break}if(null!==X){X.return=Z,Mo=X;break}Mo=Z}}}var ee=x.alternate;if(null!==ee){var ie=ee.child;if(null!==ie){ee.child=null;do{var ae=ie.sibling;ie.sibling=null,ie=ae}while(null!==ie)}}Mo=x}}if(0!=(2064&x.subtreeFlags)&&null!==j)j.return=x,Mo=j;else e:for(;null!==Mo;){if(0!=(2048&(x=Mo).flags))switch(x.tag){case 0:case 11:case 15:Qj(9,x,x.return)}var le=x.sibling;if(null!==le){le.return=x.return,Mo=le;break e}Mo=x.return}}var ce=s.current;for(Mo=ce;null!==Mo;){var pe=(j=Mo).child;if(0!=(2064&j.subtreeFlags)&&null!==pe)pe.return=j,Mo=pe;else e:for(j=ce;null!==Mo;){if(0!=(2048&(P=Mo).flags))try{switch(P.tag){case 0:case 11:case 15:Rj(9,P)}}catch(s){W(P,P.return,s)}if(P===j){Mo=null;break e}var de=P.sibling;if(null!==de){de.return=P.return,Mo=de;break e}Mo=P.return}}if(Uo=w,jg(),kt&&\"function\"==typeof kt.onPostCommitFiberRoot)try{kt.onPostCommitFiberRoot(xt,s)}catch(s){}_=!0}return _}finally{It=u,$o.transition=i}}return!1}function Yk(s,i,u){s=dh(s,i=Oi(0,i=Ki(u,i),1),1),i=L(),null!==s&&(Ac(s,1,i),Ek(s,i))}function W(s,i,u){if(3===s.tag)Yk(s,s,u);else for(;null!==i;){if(3===i.tag){Yk(i,s,u);break}if(1===i.tag){var _=i.stateNode;if(\"function\"==typeof i.type.getDerivedStateFromError||\"function\"==typeof _.componentDidCatch&&(null===as||!as.has(_))){i=dh(i,s=Ri(i,s=Ki(u,s),1),1),s=L(),null!==i&&(Ac(i,1,s),Ek(i,s));break}}i=i.return}}function Ui(s,i,u){var _=s.pingCache;null!==_&&_.delete(i),i=L(),s.pingedLanes|=s.suspendedLanes&u,zo===s&&(Wo&u)===u&&(4===Jo||3===Jo&&(130023424&Wo)===Wo&&500>yt()-ts?Lk(s,0):Qo|=u),Ek(s,i)}function Zk(s,i){0===i&&(0==(1&s.mode)?i=1:(i=Pt,0==(130023424&(Pt<<=1))&&(Pt=4194304)));var u=L();null!==(s=Zg(s,i))&&(Ac(s,i,u),Ek(s,u))}function vj(s){var i=s.memoizedState,u=0;null!==i&&(u=i.retryLane),Zk(s,u)}function ck(s,i){var u=0;switch(s.tag){case 13:var _=s.stateNode,w=s.memoizedState;null!==w&&(u=w.retryLane);break;case 19:_=s.stateNode;break;default:throw Error(p(314))}null!==_&&_.delete(i),Zk(s,u)}function Gk(s,i){return ht(s,i)}function al(s,i,u,_){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,i,u,_){return new al(s,i,u,_)}function bj(s){return!(!(s=s.prototype)||!s.isReactComponent)}function wh(s,i){var u=s.alternate;return null===u?((u=Bg(s.tag,i,s.key,s.mode)).elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=i,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=14680064&s.flags,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,i=s.dependencies,u.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u}function yh(s,i,u,_,w,x){var j=2;if(_=s,\"function\"==typeof s)bj(s)&&(j=1);else if(\"string\"==typeof s)j=5;else e:switch(s){case le:return Ah(u.children,w,x,i);case ce:j=8,w|=8;break;case pe:return(s=Bg(12,u,i,2|w)).elementType=pe,s.lanes=x,s;case be:return(s=Bg(13,u,i,w)).elementType=be,s.lanes=x,s;case _e:return(s=Bg(19,u,i,w)).elementType=_e,s.lanes=x,s;case xe:return qj(u,w,x,i);default:if(\"object\"==typeof s&&null!==s)switch(s.$$typeof){case de:j=10;break e;case fe:j=9;break e;case ye:j=11;break e;case we:j=14;break e;case Se:j=16,_=null;break e}throw Error(p(130,null==s?s:typeof s,\"\"))}return(i=Bg(j,u,i,w)).elementType=s,i.type=_,i.lanes=x,i}function Ah(s,i,u,_){return(s=Bg(7,s,_,i)).lanes=u,s}function qj(s,i,u,_){return(s=Bg(22,s,_,i)).elementType=xe,s.lanes=u,s.stateNode={isHidden:!1},s}function xh(s,i,u){return(s=Bg(6,s,null,i)).lanes=u,s}function zh(s,i,u){return(i=Bg(4,null!==s.children?s.children:[],s.key,i)).lanes=u,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function bl(s,i,u,_,w){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=_,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function cl(s,i,u,_,w,x,j,P,B){return s=new bl(s,i,u,P,B),1===i?(i=1,!0===x&&(i|=8)):i=0,x=Bg(3,null,null,i),s.current=x,x.stateNode=s,x.memoizedState={element:_,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(x),s}function el(s){if(!s)return xn;e:{if(Vb(s=s._reactInternals)!==s||1!==s.tag)throw Error(p(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Zf(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(null!==i);throw Error(p(171))}if(1===s.tag){var u=s.type;if(Zf(u))return bg(s,u,i)}return i}function fl(s,i,u,_,w,x,j,P,B){return(s=cl(u,_,!0,s,0,x,0,P,B)).context=el(null),u=s.current,(x=ch(_=L(),w=lh(u))).callback=null!=i?i:null,dh(u,x,w),s.current.lanes=w,Ac(s,w,_),Ek(s,_),s}function gl(s,i,u,_){var w=i.current,x=L(),j=lh(w);return u=el(u),null===i.context?i.context=u:i.pendingContext=u,(i=ch(x,j)).payload={element:s},null!==(_=void 0===_?null:_)&&(i.callback=_),null!==(s=dh(w,i,j))&&(mh(s,w,j,x),eh(s,w,j)),j}function hl(s){return(s=s.current).child?(s.child.tag,s.child.stateNode):null}function il(s,i){if(null!==(s=s.memoizedState)&&null!==s.dehydrated){var u=s.retryLane;s.retryLane=0!==u&&u<i?u:i}}function jl(s,i){il(s,i),(s=s.alternate)&&il(s,i)}Lo=function(s,i,u){if(null!==s)if(s.memoizedProps!==i.pendingProps||On.current)xo=!0;else{if(0==(s.lanes&u)&&0==(128&i.flags))return xo=!1,function zj(s,i,u){switch(i.tag){case 3:lj(i),Ig();break;case 5:Kh(i);break;case 1:Zf(i.type)&&cg(i);break;case 4:Ih(i,i.stateNode.containerInfo);break;case 10:var _=i.type._context,w=i.memoizedProps.value;G(Wn,_._currentValue),_._currentValue=w;break;case 13:if(null!==(_=i.memoizedState))return null!==_.dehydrated?(G(so,1&so.current),i.flags|=128,null):0!=(u&i.child.childLanes)?pj(s,i,u):(G(so,1&so.current),null!==(s=$i(s,i,u))?s.sibling:null);G(so,1&so.current);break;case 19:if(_=0!=(u&i.childLanes),0!=(128&s.flags)){if(_)return yj(s,i,u);i.flags|=128}if(null!==(w=i.memoizedState)&&(w.rendering=null,w.tail=null,w.lastEffect=null),G(so,so.current),_)break;return null;case 22:case 23:return i.lanes=0,ej(s,i,u)}return $i(s,i,u)}(s,i,u);xo=0!=(131072&s.flags)}else xo=!1,Un&&0!=(1048576&i.flags)&&ug(i,Tn,i.index);switch(i.lanes=0,i.tag){case 2:var _=i.type;jj(s,i),s=i.pendingProps;var w=Yf(i,kn.current);Tg(i,u),w=Xh(null,i,_,s,w,u);var x=bi();return i.flags|=1,\"object\"==typeof w&&null!==w&&\"function\"==typeof w.render&&void 0===w.$$typeof?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Zf(_)?(x=!0,cg(i)):x=!1,i.memoizedState=null!==w.state&&void 0!==w.state?w.state:null,ah(i),w.updater=Qn,i.stateNode=w,w._reactInternals=i,rh(i,_,s,u),i=kj(null,i,_,!0,x,u)):(i.tag=0,Un&&x&&vg(i),Yi(null,i,w,u),i=i.child),i;case 16:_=i.elementType;e:{switch(jj(s,i),s=i.pendingProps,_=(w=_._init)(_._payload),i.type=_,w=i.tag=function $k(s){if(\"function\"==typeof s)return bj(s)?1:0;if(null!=s){if((s=s.$$typeof)===ye)return 11;if(s===we)return 14}return 2}(_),s=Lg(_,s),w){case 0:i=dj(null,i,_,s,u);break e;case 1:i=ij(null,i,_,s,u);break e;case 11:i=Zi(null,i,_,s,u);break e;case 14:i=aj(null,i,_,Lg(_.type,s),u);break e}throw Error(p(306,_,\"\"))}return i;case 0:return _=i.type,w=i.pendingProps,dj(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 1:return _=i.type,w=i.pendingProps,ij(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 3:e:{if(lj(i),null===s)throw Error(p(387));_=i.pendingProps,w=(x=i.memoizedState).element,bh(s,i),gh(i,_,null,u);var j=i.memoizedState;if(_=j.element,x.isDehydrated){if(x={element:_,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},i.updateQueue.baseState=x,i.memoizedState=x,256&i.flags){i=mj(s,i,_,u,w=Ki(Error(p(423)),i));break e}if(_!==w){i=mj(s,i,_,u,w=Ki(Error(p(424)),i));break e}for($n=Lf(i.stateNode.containerInfo.firstChild),qn=i,Un=!0,zn=null,u=eo(i,null,_,u),i.child=u;u;)u.flags=-3&u.flags|4096,u=u.sibling}else{if(Ig(),_===w){i=$i(s,i,u);break e}Yi(s,i,_,u)}i=i.child}return i;case 5:return Kh(i),null===s&&Eg(i),_=i.type,w=i.pendingProps,x=null!==s?s.memoizedProps:null,j=w.children,Ef(_,w)?j=null:null!==x&&Ef(_,x)&&(i.flags|=32),hj(s,i),Yi(s,i,j,u),i.child;case 6:return null===s&&Eg(i),null;case 13:return pj(s,i,u);case 4:return Ih(i,i.stateNode.containerInfo),_=i.pendingProps,null===s?i.child=Zn(i,null,_,u):Yi(s,i,_,u),i.child;case 11:return _=i.type,w=i.pendingProps,Zi(s,i,_,w=i.elementType===_?w:Lg(_,w),u);case 7:return Yi(s,i,i.pendingProps,u),i.child;case 8:case 12:return Yi(s,i,i.pendingProps.children,u),i.child;case 10:e:{if(_=i.type._context,w=i.pendingProps,x=i.memoizedProps,j=w.value,G(Wn,_._currentValue),_._currentValue=j,null!==x)if(qr(x.value,j)){if(x.children===w.children&&!On.current){i=$i(s,i,u);break e}}else for(null!==(x=i.child)&&(x.return=i);null!==x;){var P=x.dependencies;if(null!==P){j=x.child;for(var B=P.firstContext;null!==B;){if(B.context===_){if(1===x.tag){(B=ch(-1,u&-u)).tag=2;var $=x.updateQueue;if(null!==$){var U=($=$.shared).pending;null===U?B.next=B:(B.next=U.next,U.next=B),$.pending=B}}x.lanes|=u,null!==(B=x.alternate)&&(B.lanes|=u),Sg(x.return,u,i),P.lanes|=u;break}B=B.next}}else if(10===x.tag)j=x.type===i.type?null:x.child;else if(18===x.tag){if(null===(j=x.return))throw Error(p(341));j.lanes|=u,null!==(P=j.alternate)&&(P.lanes|=u),Sg(j,u,i),j=x.sibling}else j=x.child;if(null!==j)j.return=x;else for(j=x;null!==j;){if(j===i){j=null;break}if(null!==(x=j.sibling)){x.return=j.return,j=x;break}j=j.return}x=j}Yi(s,i,w.children,u),i=i.child}return i;case 9:return w=i.type,_=i.pendingProps.children,Tg(i,u),_=_(w=Vg(w)),i.flags|=1,Yi(s,i,_,u),i.child;case 14:return w=Lg(_=i.type,i.pendingProps),aj(s,i,_,w=Lg(_.type,w),u);case 15:return cj(s,i,i.type,i.pendingProps,u);case 17:return _=i.type,w=i.pendingProps,w=i.elementType===_?w:Lg(_,w),jj(s,i),i.tag=1,Zf(_)?(s=!0,cg(i)):s=!1,Tg(i,u),ph(i,_,w),rh(i,_,w,u),kj(null,i,_,!0,s,u);case 19:return yj(s,i,u);case 22:return ej(s,i,u)}throw Error(p(156,i.tag))};var ms=\"function\"==typeof reportError?reportError:function(s){console.error(s)};function ml(s){this._internalRoot=s}function nl(s){this._internalRoot=s}function ol(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType)}function pl(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType&&(8!==s.nodeType||\" react-mount-point-unstable \"!==s.nodeValue))}function ql(){}function sl(s,i,u,_,w){var x=u._reactRootContainer;if(x){var j=x;if(\"function\"==typeof w){var P=w;w=function(){var s=hl(j);P.call(s)}}gl(i,j,s,w)}else j=function rl(s,i,u,_,w){if(w){if(\"function\"==typeof _){var x=_;_=function(){var s=hl(j);x.call(s)}}var j=fl(i,_,s,0,null,!1,0,\"\",ql);return s._reactRootContainer=j,s[vn]=j.current,sf(8===s.nodeType?s.parentNode:s),Sk(),j}for(;w=s.lastChild;)s.removeChild(w);if(\"function\"==typeof _){var P=_;_=function(){var s=hl(B);P.call(s)}}var B=cl(s,0,!1,null,0,!1,0,\"\",ql);return s._reactRootContainer=B,s[vn]=B.current,sf(8===s.nodeType?s.parentNode:s),Sk((function(){gl(i,B,u,_)})),B}(u,i,s,w,_);return hl(j)}nl.prototype.render=ml.prototype.render=function(s){var i=this._internalRoot;if(null===i)throw Error(p(409));gl(s,i,null,null)},nl.prototype.unmount=ml.prototype.unmount=function(){var s=this._internalRoot;if(null!==s){this._internalRoot=null;var i=s.containerInfo;Sk((function(){gl(null,s,null,null)})),i[vn]=null}},nl.prototype.unstable_scheduleHydration=function(s){if(s){var i=Rt();s={blockedOn:null,target:s,priority:i};for(var u=0;u<Vt.length&&0!==i&&i<Vt[u].priority;u++);Vt.splice(u,0,s),0===u&&Vc(s)}},Nt=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var u=tc(i.pendingLanes);0!==u&&(Cc(i,1|u),Ek(i,yt()),0==(6&Uo)&&(rs=yt()+500,jg()))}break;case 13:Sk((function(){var i=Zg(s,1);if(null!==i){var u=L();mh(i,s,1,u)}})),jl(s,1)}},Mt=function(s){if(13===s.tag){var i=Zg(s,134217728);if(null!==i)mh(i,s,134217728,L());jl(s,134217728)}},Tt=function(s){if(13===s.tag){var i=lh(s),u=Zg(s,i);if(null!==u)mh(u,s,i,L());jl(s,i)}},Rt=function(){return It},Dt=function(s,i){var u=It;try{return It=s,i()}finally{It=u}},tt=function(s,i,u){switch(i){case\"input\":if(bb(s,u),i=u.name,\"radio\"===u.type&&null!=i){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+i)+'][type=\"radio\"]'),i=0;i<u.length;i++){var _=u[i];if(_!==s&&_.form===s.form){var w=Db(_);if(!w)throw Error(p(90));Wa(_),bb(_,w)}}}break;case\"textarea\":ib(s,u);break;case\"select\":null!=(i=u.value)&&fb(s,!!u.multiple,i,!1)}},Gb=Rk,Hb=Sk;var gs={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ys={findFiberByHostInstance:Wc,bundleType:0,version:\"18.2.0\",rendererPackageName:\"react-dom\"},vs={bundleType:ys.bundleType,version:ys.version,rendererPackageName:ys.rendererPackageName,rendererConfig:ys.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return null===(s=Zb(s))?null:s.stateNode},findFiberByHostInstance:ys.findFiberByHostInstance||function kl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.2.0-next-9e3b772b8-20220608\"};if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bs.isDisabled&&bs.supportsFiber)try{xt=bs.inject(vs),kt=bs}catch(We){}}i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gs,i.createPortal=function(s,i){var u=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ol(i))throw Error(p(200));return function dl(s,i,u){var _=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ae,key:null==_?null:\"\"+_,children:s,containerInfo:i,implementation:u}}(s,i,null,u)},i.createRoot=function(s,i){if(!ol(s))throw Error(p(299));var u=!1,_=\"\",w=ms;return null!=i&&(!0===i.unstable_strictMode&&(u=!0),void 0!==i.identifierPrefix&&(_=i.identifierPrefix),void 0!==i.onRecoverableError&&(w=i.onRecoverableError)),i=cl(s,1,!1,null,0,u,0,_,w),s[vn]=i.current,sf(8===s.nodeType?s.parentNode:s),new ml(i)},i.findDOMNode=function(s){if(null==s)return null;if(1===s.nodeType)return s;var i=s._reactInternals;if(void 0===i){if(\"function\"==typeof s.render)throw Error(p(188));throw s=Object.keys(s).join(\",\"),Error(p(268,s))}return s=null===(s=Zb(i))?null:s.stateNode},i.flushSync=function(s){return Sk(s)},i.hydrate=function(s,i,u){if(!pl(i))throw Error(p(200));return sl(null,s,i,!0,u)},i.hydrateRoot=function(s,i,u){if(!ol(s))throw Error(p(405));var _=null!=u&&u.hydratedSources||null,w=!1,x=\"\",j=ms;if(null!=u&&(!0===u.unstable_strictMode&&(w=!0),void 0!==u.identifierPrefix&&(x=u.identifierPrefix),void 0!==u.onRecoverableError&&(j=u.onRecoverableError)),i=fl(i,null,s,1,null!=u?u:null,w,0,x,j),s[vn]=i.current,sf(s),_)for(s=0;s<_.length;s++)w=(w=(u=_[s])._getVersion)(u._source),null==i.mutableSourceEagerHydrationData?i.mutableSourceEagerHydrationData=[u,w]:i.mutableSourceEagerHydrationData.push(u,w);return new nl(i)},i.render=function(s,i,u){if(!pl(i))throw Error(p(200));return sl(null,s,i,!1,u)},i.unmountComponentAtNode=function(s){if(!pl(s))throw Error(p(40));return!!s._reactRootContainer&&(Sk((function(){sl(null,null,s,!1,(function(){s._reactRootContainer=null,s[vn]=null}))})),!0)},i.unstable_batchedUpdates=Rk,i.unstable_renderSubtreeIntoContainer=function(s,i,u,_){if(!pl(u))throw Error(p(200));if(null==s||void 0===s._reactInternals)throw Error(p(38));return sl(s,i,u,!1,_)},i.version=\"18.2.0-next-9e3b772b8-20220608\"},40961:(s,i,u)=>{\"use strict\";!function checkDCE(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}(),s.exports=u(22551)},2209:(s,i,u)=>{\"use strict\";var _,w=u(9404),x=\"<<anonymous>>\",j=function productionTypeChecker(){invariant(!1,\"ImmutablePropTypes type checking code is stripped in production.\")};j.isRequired=j;var P=function getProductionTypeChecker(){return j};function getPropType(s){var i=typeof s;return Array.isArray(s)?\"array\":s instanceof RegExp?\"object\":s instanceof w.Iterable?\"Immutable.\"+s.toSource().split(\" \")[0]:i}function createChainableTypeChecker(s){function checkType(i,u,_,w,j,P){for(var B=arguments.length,$=Array(B>6?B-6:0),U=6;U<B;U++)$[U-6]=arguments[U];return P=P||_,w=w||x,null!=u[_]?s.apply(void 0,[u,_,w,j,P].concat($)):i?new Error(\"Required \"+j+\" `\"+P+\"` was not specified in `\"+w+\"`.\"):void 0}var i=checkType.bind(null,!1);return i.isRequired=checkType.bind(null,!0),i}function createIterableSubclassTypeChecker(s,i){return function createImmutableTypeChecker(s,i){return createChainableTypeChecker((function validate(u,_,w,x,j){var P=u[_];if(!i(P)){var B=getPropType(P);return new Error(\"Invalid \"+x+\" `\"+j+\"` of type `\"+B+\"` supplied to `\"+w+\"`, expected `\"+s+\"`.\")}return null}))}(\"Iterable.\"+s,(function(s){return w.Iterable.isIterable(s)&&i(s)}))}(_={listOf:P,mapOf:P,orderedMapOf:P,setOf:P,orderedSetOf:P,stackOf:P,iterableOf:P,recordOf:P,shape:P,contains:P,mapContains:P,orderedMapContains:P,list:j,map:j,orderedMap:j,set:j,orderedSet:j,stack:j,seq:j,record:j,iterable:j}).iterable.indexed=createIterableSubclassTypeChecker(\"Indexed\",w.Iterable.isIndexed),_.iterable.keyed=createIterableSubclassTypeChecker(\"Keyed\",w.Iterable.isKeyed),s.exports=_},15287:(s,i)=>{\"use strict\";var u=Symbol.for(\"react.element\"),_=Symbol.for(\"react.portal\"),w=Symbol.for(\"react.fragment\"),x=Symbol.for(\"react.strict_mode\"),j=Symbol.for(\"react.profiler\"),P=Symbol.for(\"react.provider\"),B=Symbol.for(\"react.context\"),$=Symbol.for(\"react.forward_ref\"),U=Symbol.for(\"react.suspense\"),Y=Symbol.for(\"react.memo\"),X=Symbol.for(\"react.lazy\"),Z=Symbol.iterator;var ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ie=Object.assign,ae={};function E(s,i,u){this.props=s,this.context=i,this.refs=ae,this.updater=u||ee}function F(){}function G(s,i,u){this.props=s,this.context=i,this.refs=ae,this.updater=u||ee}E.prototype.isReactComponent={},E.prototype.setState=function(s,i){if(\"object\"!=typeof s&&\"function\"!=typeof s&&null!=s)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,s,i,\"setState\")},E.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,\"forceUpdate\")},F.prototype=E.prototype;var le=G.prototype=new F;le.constructor=G,ie(le,E.prototype),le.isPureReactComponent=!0;var ce=Array.isArray,pe=Object.prototype.hasOwnProperty,de={current:null},fe={key:!0,ref:!0,__self:!0,__source:!0};function M(s,i,_){var w,x={},j=null,P=null;if(null!=i)for(w in void 0!==i.ref&&(P=i.ref),void 0!==i.key&&(j=\"\"+i.key),i)pe.call(i,w)&&!fe.hasOwnProperty(w)&&(x[w]=i[w]);var B=arguments.length-2;if(1===B)x.children=_;else if(1<B){for(var $=Array(B),U=0;U<B;U++)$[U]=arguments[U+2];x.children=$}if(s&&s.defaultProps)for(w in B=s.defaultProps)void 0===x[w]&&(x[w]=B[w]);return{$$typeof:u,type:s,key:j,ref:P,props:x,_owner:de.current}}function O(s){return\"object\"==typeof s&&null!==s&&s.$$typeof===u}var ye=/\\/+/g;function Q(s,i){return\"object\"==typeof s&&null!==s&&null!=s.key?function escape(s){var i={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+s.replace(/[=:]/g,(function(s){return i[s]}))}(\"\"+s.key):i.toString(36)}function R(s,i,w,x,j){var P=typeof s;\"undefined\"!==P&&\"boolean\"!==P||(s=null);var B=!1;if(null===s)B=!0;else switch(P){case\"string\":case\"number\":B=!0;break;case\"object\":switch(s.$$typeof){case u:case _:B=!0}}if(B)return j=j(B=s),s=\"\"===x?\".\"+Q(B,0):x,ce(j)?(w=\"\",null!=s&&(w=s.replace(ye,\"$&/\")+\"/\"),R(j,i,w,\"\",(function(s){return s}))):null!=j&&(O(j)&&(j=function N(s,i){return{$$typeof:u,type:s.type,key:i,ref:s.ref,props:s.props,_owner:s._owner}}(j,w+(!j.key||B&&B.key===j.key?\"\":(\"\"+j.key).replace(ye,\"$&/\")+\"/\")+s)),i.push(j)),1;if(B=0,x=\"\"===x?\".\":x+\":\",ce(s))for(var $=0;$<s.length;$++){var U=x+Q(P=s[$],$);B+=R(P,i,w,U,j)}else if(U=function A(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=Z&&s[Z]||s[\"@@iterator\"])?s:null}(s),\"function\"==typeof U)for(s=U.call(s),$=0;!(P=s.next()).done;)B+=R(P=P.value,i,w,U=x+Q(P,$++),j);else if(\"object\"===P)throw i=String(s),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===i?\"object with keys {\"+Object.keys(s).join(\", \")+\"}\":i)+\"). If you meant to render a collection of children, use an array instead.\");return B}function S(s,i,u){if(null==s)return s;var _=[],w=0;return R(s,_,\"\",\"\",(function(s){return i.call(u,s,w++)})),_}function T(s){if(-1===s._status){var i=s._result;(i=i()).then((function(i){0!==s._status&&-1!==s._status||(s._status=1,s._result=i)}),(function(i){0!==s._status&&-1!==s._status||(s._status=2,s._result=i)})),-1===s._status&&(s._status=0,s._result=i)}if(1===s._status)return s._result.default;throw s._result}var be={current:null},_e={transition:null},we={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:_e,ReactCurrentOwner:de};i.Children={map:S,forEach:function(s,i,u){S(s,(function(){i.apply(this,arguments)}),u)},count:function(s){var i=0;return S(s,(function(){i++})),i},toArray:function(s){return S(s,(function(s){return s}))||[]},only:function(s){if(!O(s))throw Error(\"React.Children.only expected to receive a single React element child.\");return s}},i.Component=E,i.Fragment=w,i.Profiler=j,i.PureComponent=G,i.StrictMode=x,i.Suspense=U,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=we,i.cloneElement=function(s,i,_){if(null==s)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+s+\".\");var w=ie({},s.props),x=s.key,j=s.ref,P=s._owner;if(null!=i){if(void 0!==i.ref&&(j=i.ref,P=de.current),void 0!==i.key&&(x=\"\"+i.key),s.type&&s.type.defaultProps)var B=s.type.defaultProps;for($ in i)pe.call(i,$)&&!fe.hasOwnProperty($)&&(w[$]=void 0===i[$]&&void 0!==B?B[$]:i[$])}var $=arguments.length-2;if(1===$)w.children=_;else if(1<$){B=Array($);for(var U=0;U<$;U++)B[U]=arguments[U+2];w.children=B}return{$$typeof:u,type:s.type,key:x,ref:j,props:w,_owner:P}},i.createContext=function(s){return(s={$$typeof:B,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:P,_context:s},s.Consumer=s},i.createElement=M,i.createFactory=function(s){var i=M.bind(null,s);return i.type=s,i},i.createRef=function(){return{current:null}},i.forwardRef=function(s){return{$$typeof:$,render:s}},i.isValidElement=O,i.lazy=function(s){return{$$typeof:X,_payload:{_status:-1,_result:s},_init:T}},i.memo=function(s,i){return{$$typeof:Y,type:s,compare:void 0===i?null:i}},i.startTransition=function(s){var i=_e.transition;_e.transition={};try{s()}finally{_e.transition=i}},i.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\")},i.useCallback=function(s,i){return be.current.useCallback(s,i)},i.useContext=function(s){return be.current.useContext(s)},i.useDebugValue=function(){},i.useDeferredValue=function(s){return be.current.useDeferredValue(s)},i.useEffect=function(s,i){return be.current.useEffect(s,i)},i.useId=function(){return be.current.useId()},i.useImperativeHandle=function(s,i,u){return be.current.useImperativeHandle(s,i,u)},i.useInsertionEffect=function(s,i){return be.current.useInsertionEffect(s,i)},i.useLayoutEffect=function(s,i){return be.current.useLayoutEffect(s,i)},i.useMemo=function(s,i){return be.current.useMemo(s,i)},i.useReducer=function(s,i,u){return be.current.useReducer(s,i,u)},i.useRef=function(s){return be.current.useRef(s)},i.useState=function(s){return be.current.useState(s)},i.useSyncExternalStore=function(s,i,u){return be.current.useSyncExternalStore(s,i,u)},i.useTransition=function(){return be.current.useTransition()},i.version=\"18.2.0\"},96540:(s,i,u)=>{\"use strict\";s.exports=u(15287)},86048:s=>{\"use strict\";var i={};function createErrorType(s,u,_){_||(_=Error);var w=function(s){function NodeError(i,_,w){return s.call(this,function getMessage(s,i,_){return\"string\"==typeof u?u:u(s,i,_)}(i,_,w))||this}return function _inheritsLoose(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.__proto__=i}(NodeError,s),NodeError}(_);w.prototype.name=_.name,w.prototype.code=s,i[s]=w}function oneOf(s,i){if(Array.isArray(s)){var u=s.length;return s=s.map((function(s){return String(s)})),u>2?\"one of \".concat(i,\" \").concat(s.slice(0,u-1).join(\", \"),\", or \")+s[u-1]:2===u?\"one of \".concat(i,\" \").concat(s[0],\" or \").concat(s[1]):\"of \".concat(i,\" \").concat(s[0])}return\"of \".concat(i,\" \").concat(String(s))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(s,i){return'The value \"'+i+'\" is invalid for option \"'+s+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(s,i,u){var _,w;if(\"string\"==typeof i&&function startsWith(s,i,u){return s.substr(!u||u<0?0:+u,i.length)===i}(i,\"not \")?(_=\"must not be\",i=i.replace(/^not /,\"\")):_=\"must be\",function endsWith(s,i,u){return(void 0===u||u>s.length)&&(u=s.length),s.substring(u-i.length,u)===i}(s,\" argument\"))w=\"The \".concat(s,\" \").concat(_,\" \").concat(oneOf(i,\"type\"));else{var x=function includes(s,i,u){return\"number\"!=typeof u&&(u=0),!(u+i.length>s.length)&&-1!==s.indexOf(i,u)}(s,\".\")?\"property\":\"argument\";w='The \"'.concat(s,'\" ').concat(x,\" \").concat(_,\" \").concat(oneOf(i,\"type\"))}return w+=\". Received type \".concat(typeof u)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(s){return\"The \"+s+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(s){return\"Cannot call \"+s+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(s){return\"Unknown encoding: \"+s}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),s.exports.F=i},25382:(s,i,u)=>{\"use strict\";var _=u(65606),w=Object.keys||function(s){var i=[];for(var u in s)i.push(u);return i};s.exports=Duplex;var x=u(45412),j=u(16708);u(56698)(Duplex,x);for(var P=w(j.prototype),B=0;B<P.length;B++){var $=P[B];Duplex.prototype[$]||(Duplex.prototype[$]=j.prototype[$])}function Duplex(s){if(!(this instanceof Duplex))return new Duplex(s);x.call(this,s),j.call(this,s),this.allowHalfOpen=!0,s&&(!1===s.readable&&(this.readable=!1),!1===s.writable&&(this.writable=!1),!1===s.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||_.nextTick(onEndNT,this)}function onEndNT(s){s.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(s){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=s,this._writableState.destroyed=s)}})},63600:(s,i,u)=>{\"use strict\";s.exports=PassThrough;var _=u(74610);function PassThrough(s){if(!(this instanceof PassThrough))return new PassThrough(s);_.call(this,s)}u(56698)(PassThrough,_),PassThrough.prototype._transform=function(s,i,u){u(null,s)}},45412:(s,i,u)=>{\"use strict\";var _,w=u(65606);s.exports=Readable,Readable.ReadableState=ReadableState;u(37007).EventEmitter;var x=function EElistenerCount(s,i){return s.listeners(i).length},j=u(40345),P=u(48287).Buffer,B=(void 0!==u.g?u.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var $,U=u(79838);$=U&&U.debuglog?U.debuglog(\"stream\"):function debug(){};var Y,X,Z,ee=u(80345),ie=u(75896),ae=u(65291).getHighWaterMark,le=u(86048).F,ce=le.ERR_INVALID_ARG_TYPE,pe=le.ERR_STREAM_PUSH_AFTER_EOF,de=le.ERR_METHOD_NOT_IMPLEMENTED,fe=le.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;u(56698)(Readable,j);var ye=ie.errorOrDestroy,be=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(s,i,w){_=_||u(25382),s=s||{},\"boolean\"!=typeof w&&(w=i instanceof _),this.objectMode=!!s.objectMode,w&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.highWaterMark=ae(this,s,\"readableHighWaterMark\",w),this.buffer=new ee,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.destroyed=!1,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(Y||(Y=u(83141).I),this.decoder=new Y(s.encoding),this.encoding=s.encoding)}function Readable(s){if(_=_||u(25382),!(this instanceof Readable))return new Readable(s);var i=this instanceof _;this._readableState=new ReadableState(s,this,i),this.readable=!0,s&&(\"function\"==typeof s.read&&(this._read=s.read),\"function\"==typeof s.destroy&&(this._destroy=s.destroy)),j.call(this)}function readableAddChunk(s,i,u,_,w){$(\"readableAddChunk\",i);var x,j=s._readableState;if(null===i)j.reading=!1,function onEofChunk(s,i){if($(\"onEofChunk\"),i.ended)return;if(i.decoder){var u=i.decoder.end();u&&u.length&&(i.buffer.push(u),i.length+=i.objectMode?1:u.length)}i.ended=!0,i.sync?emitReadable(s):(i.needReadable=!1,i.emittedReadable||(i.emittedReadable=!0,emitReadable_(s)))}(s,j);else if(w||(x=function chunkInvalid(s,i){var u;(function _isUint8Array(s){return P.isBuffer(s)||s instanceof B})(i)||\"string\"==typeof i||void 0===i||s.objectMode||(u=new ce(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],i));return u}(j,i)),x)ye(s,x);else if(j.objectMode||i&&i.length>0)if(\"string\"==typeof i||j.objectMode||Object.getPrototypeOf(i)===P.prototype||(i=function _uint8ArrayToBuffer(s){return P.from(s)}(i)),_)j.endEmitted?ye(s,new fe):addChunk(s,j,i,!0);else if(j.ended)ye(s,new pe);else{if(j.destroyed)return!1;j.reading=!1,j.decoder&&!u?(i=j.decoder.write(i),j.objectMode||0!==i.length?addChunk(s,j,i,!1):maybeReadMore(s,j)):addChunk(s,j,i,!1)}else _||(j.reading=!1,maybeReadMore(s,j));return!j.ended&&(j.length<j.highWaterMark||0===j.length)}function addChunk(s,i,u,_){i.flowing&&0===i.length&&!i.sync?(i.awaitDrain=0,s.emit(\"data\",u)):(i.length+=i.objectMode?1:u.length,_?i.buffer.unshift(u):i.buffer.push(u),i.needReadable&&emitReadable(s)),maybeReadMore(s,i)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(s){this._readableState&&(this._readableState.destroyed=s)}}),Readable.prototype.destroy=ie.destroy,Readable.prototype._undestroy=ie.undestroy,Readable.prototype._destroy=function(s,i){i(s)},Readable.prototype.push=function(s,i){var u,_=this._readableState;return _.objectMode?u=!0:\"string\"==typeof s&&((i=i||_.defaultEncoding)!==_.encoding&&(s=P.from(s,i),i=\"\"),u=!0),readableAddChunk(this,s,i,!1,u)},Readable.prototype.unshift=function(s){return readableAddChunk(this,s,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(s){Y||(Y=u(83141).I);var i=new Y(s);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,w=\"\";null!==_;)w+=i.write(_.data),_=_.next;return this._readableState.buffer.clear(),\"\"!==w&&this._readableState.buffer.push(w),this._readableState.length=w.length,this};var _e=1073741824;function howMuchToRead(s,i){return s<=0||0===i.length&&i.ended?0:i.objectMode?1:s!=s?i.flowing&&i.length?i.buffer.head.data.length:i.length:(s>i.highWaterMark&&(i.highWaterMark=function computeNewHighWaterMark(s){return s>=_e?s=_e:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}(s)),s<=i.length?s:i.ended?i.length:(i.needReadable=!0,0))}function emitReadable(s){var i=s._readableState;$(\"emitReadable\",i.needReadable,i.emittedReadable),i.needReadable=!1,i.emittedReadable||($(\"emitReadable\",i.flowing),i.emittedReadable=!0,w.nextTick(emitReadable_,s))}function emitReadable_(s){var i=s._readableState;$(\"emitReadable_\",i.destroyed,i.length,i.ended),i.destroyed||!i.length&&!i.ended||(s.emit(\"readable\"),i.emittedReadable=!1),i.needReadable=!i.flowing&&!i.ended&&i.length<=i.highWaterMark,flow(s)}function maybeReadMore(s,i){i.readingMore||(i.readingMore=!0,w.nextTick(maybeReadMore_,s,i))}function maybeReadMore_(s,i){for(;!i.reading&&!i.ended&&(i.length<i.highWaterMark||i.flowing&&0===i.length);){var u=i.length;if($(\"maybeReadMore read 0\"),s.read(0),u===i.length)break}i.readingMore=!1}function updateReadableListening(s){var i=s._readableState;i.readableListening=s.listenerCount(\"readable\")>0,i.resumeScheduled&&!i.paused?i.flowing=!0:s.listenerCount(\"data\")>0&&s.resume()}function nReadingNextTick(s){$(\"readable nexttick read 0\"),s.read(0)}function resume_(s,i){$(\"resume\",i.reading),i.reading||s.read(0),i.resumeScheduled=!1,s.emit(\"resume\"),flow(s),i.flowing&&!i.reading&&s.read(0)}function flow(s){var i=s._readableState;for($(\"flow\",i.flowing);i.flowing&&null!==s.read(););}function fromList(s,i){return 0===i.length?null:(i.objectMode?u=i.buffer.shift():!s||s>=i.length?(u=i.decoder?i.buffer.join(\"\"):1===i.buffer.length?i.buffer.first():i.buffer.concat(i.length),i.buffer.clear()):u=i.buffer.consume(s,i.decoder),u);var u}function endReadable(s){var i=s._readableState;$(\"endReadable\",i.endEmitted),i.endEmitted||(i.ended=!0,w.nextTick(endReadableNT,i,s))}function endReadableNT(s,i){if($(\"endReadableNT\",s.endEmitted,s.length),!s.endEmitted&&0===s.length&&(s.endEmitted=!0,i.readable=!1,i.emit(\"end\"),s.autoDestroy)){var u=i._writableState;(!u||u.autoDestroy&&u.finished)&&i.destroy()}}function indexOf(s,i){for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}Readable.prototype.read=function(s){$(\"read\",s),s=parseInt(s,10);var i=this._readableState,u=s;if(0!==s&&(i.emittedReadable=!1),0===s&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return $(\"read: emitReadable\",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(s=howMuchToRead(s,i))&&i.ended)return 0===i.length&&endReadable(this),null;var _,w=i.needReadable;return $(\"need readable\",w),(0===i.length||i.length-s<i.highWaterMark)&&$(\"length less than watermark\",w=!0),i.ended||i.reading?$(\"reading or ended\",w=!1):w&&($(\"do read\"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(s=howMuchToRead(u,i))),null===(_=s>0?fromList(s,i):null)?(i.needReadable=i.length<=i.highWaterMark,s=0):(i.length-=s,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),u!==s&&i.ended&&endReadable(this)),null!==_&&this.emit(\"data\",_),_},Readable.prototype._read=function(s){ye(this,new de(\"_read()\"))},Readable.prototype.pipe=function(s,i){var u=this,_=this._readableState;switch(_.pipesCount){case 0:_.pipes=s;break;case 1:_.pipes=[_.pipes,s];break;default:_.pipes.push(s)}_.pipesCount+=1,$(\"pipe count=%d opts=%j\",_.pipesCount,i);var j=(!i||!1!==i.end)&&s!==w.stdout&&s!==w.stderr?onend:unpipe;function onunpipe(i,w){$(\"onunpipe\"),i===u&&w&&!1===w.hasUnpiped&&(w.hasUnpiped=!0,function cleanup(){$(\"cleanup\"),s.removeListener(\"close\",onclose),s.removeListener(\"finish\",onfinish),s.removeListener(\"drain\",P),s.removeListener(\"error\",onerror),s.removeListener(\"unpipe\",onunpipe),u.removeListener(\"end\",onend),u.removeListener(\"end\",unpipe),u.removeListener(\"data\",ondata),B=!0,!_.awaitDrain||s._writableState&&!s._writableState.needDrain||P()}())}function onend(){$(\"onend\"),s.end()}_.endEmitted?w.nextTick(j):u.once(\"end\",j),s.on(\"unpipe\",onunpipe);var P=function pipeOnDrain(s){return function pipeOnDrainFunctionResult(){var i=s._readableState;$(\"pipeOnDrain\",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&x(s,\"data\")&&(i.flowing=!0,flow(s))}}(u);s.on(\"drain\",P);var B=!1;function ondata(i){$(\"ondata\");var w=s.write(i);$(\"dest.write\",w),!1===w&&((1===_.pipesCount&&_.pipes===s||_.pipesCount>1&&-1!==indexOf(_.pipes,s))&&!B&&($(\"false write response, pause\",_.awaitDrain),_.awaitDrain++),u.pause())}function onerror(i){$(\"onerror\",i),unpipe(),s.removeListener(\"error\",onerror),0===x(s,\"error\")&&ye(s,i)}function onclose(){s.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){$(\"onfinish\"),s.removeListener(\"close\",onclose),unpipe()}function unpipe(){$(\"unpipe\"),u.unpipe(s)}return u.on(\"data\",ondata),function prependListener(s,i,u){if(\"function\"==typeof s.prependListener)return s.prependListener(i,u);s._events&&s._events[i]?Array.isArray(s._events[i])?s._events[i].unshift(u):s._events[i]=[u,s._events[i]]:s.on(i,u)}(s,\"error\",onerror),s.once(\"close\",onclose),s.once(\"finish\",onfinish),s.emit(\"pipe\",u),_.flowing||($(\"pipe resume\"),u.resume()),s},Readable.prototype.unpipe=function(s){var i=this._readableState,u={hasUnpiped:!1};if(0===i.pipesCount)return this;if(1===i.pipesCount)return s&&s!==i.pipes||(s||(s=i.pipes),i.pipes=null,i.pipesCount=0,i.flowing=!1,s&&s.emit(\"unpipe\",this,u)),this;if(!s){var _=i.pipes,w=i.pipesCount;i.pipes=null,i.pipesCount=0,i.flowing=!1;for(var x=0;x<w;x++)_[x].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var j=indexOf(i.pipes,s);return-1===j||(i.pipes.splice(j,1),i.pipesCount-=1,1===i.pipesCount&&(i.pipes=i.pipes[0]),s.emit(\"unpipe\",this,u)),this},Readable.prototype.on=function(s,i){var u=j.prototype.on.call(this,s,i),_=this._readableState;return\"data\"===s?(_.readableListening=this.listenerCount(\"readable\")>0,!1!==_.flowing&&this.resume()):\"readable\"===s&&(_.endEmitted||_.readableListening||(_.readableListening=_.needReadable=!0,_.flowing=!1,_.emittedReadable=!1,$(\"on readable\",_.length,_.reading),_.length?emitReadable(this):_.reading||w.nextTick(nReadingNextTick,this))),u},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(s,i){var u=j.prototype.removeListener.call(this,s,i);return\"readable\"===s&&w.nextTick(updateReadableListening,this),u},Readable.prototype.removeAllListeners=function(s){var i=j.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==s&&void 0!==s||w.nextTick(updateReadableListening,this),i},Readable.prototype.resume=function(){var s=this._readableState;return s.flowing||($(\"resume\"),s.flowing=!s.readableListening,function resume(s,i){i.resumeScheduled||(i.resumeScheduled=!0,w.nextTick(resume_,s,i))}(this,s)),s.paused=!1,this},Readable.prototype.pause=function(){return $(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&($(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(s){var i=this,u=this._readableState,_=!1;for(var w in s.on(\"end\",(function(){if($(\"wrapped end\"),u.decoder&&!u.ended){var s=u.decoder.end();s&&s.length&&i.push(s)}i.push(null)})),s.on(\"data\",(function(w){($(\"wrapped data\"),u.decoder&&(w=u.decoder.write(w)),u.objectMode&&null==w)||(u.objectMode||w&&w.length)&&(i.push(w)||(_=!0,s.pause()))})),s)void 0===this[w]&&\"function\"==typeof s[w]&&(this[w]=function methodWrap(i){return function methodWrapReturnFunction(){return s[i].apply(s,arguments)}}(w));for(var x=0;x<be.length;x++)s.on(be[x],this.emit.bind(this,be[x]));return this._read=function(i){$(\"wrapped _read\",i),_&&(_=!1,s.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===X&&(X=u(2955)),X(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(s){this._readableState&&(this._readableState.flowing=s)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(s,i){return void 0===Z&&(Z=u(55157)),Z(Readable,s,i)})},74610:(s,i,u)=>{\"use strict\";s.exports=Transform;var _=u(86048).F,w=_.ERR_METHOD_NOT_IMPLEMENTED,x=_.ERR_MULTIPLE_CALLBACK,j=_.ERR_TRANSFORM_ALREADY_TRANSFORMING,P=_.ERR_TRANSFORM_WITH_LENGTH_0,B=u(25382);function afterTransform(s,i){var u=this._transformState;u.transforming=!1;var _=u.writecb;if(null===_)return this.emit(\"error\",new x);u.writechunk=null,u.writecb=null,null!=i&&this.push(i),_(s);var w=this._readableState;w.reading=!1,(w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}function Transform(s){if(!(this instanceof Transform))return new Transform(s);B.call(this,s),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(\"function\"==typeof s.transform&&(this._transform=s.transform),\"function\"==typeof s.flush&&(this._flush=s.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var s=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(i,u){done(s,i,u)}))}function done(s,i,u){if(i)return s.emit(\"error\",i);if(null!=u&&s.push(u),s._writableState.length)throw new P;if(s._transformState.transforming)throw new j;return s.push(null)}u(56698)(Transform,B),Transform.prototype.push=function(s,i){return this._transformState.needTransform=!1,B.prototype.push.call(this,s,i)},Transform.prototype._transform=function(s,i,u){u(new w(\"_transform()\"))},Transform.prototype._write=function(s,i,u){var _=this._transformState;if(_.writecb=u,_.writechunk=s,_.writeencoding=i,!_.transforming){var w=this._readableState;(_.needTransform||w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}},Transform.prototype._read=function(s){var i=this._transformState;null===i.writechunk||i.transforming?i.needTransform=!0:(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform))},Transform.prototype._destroy=function(s,i){B.prototype._destroy.call(this,s,(function(s){i(s)}))}},16708:(s,i,u)=>{\"use strict\";var _,w=u(65606);function CorkedRequest(s){var i=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(s,i,u){var _=s.entry;s.entry=null;for(;_;){var w=_.callback;i.pendingcb--,w(u),_=_.next}i.corkedRequestsFree.next=s}(i,s)}}s.exports=Writable,Writable.WritableState=WritableState;var x={deprecate:u(94643)},j=u(40345),P=u(48287).Buffer,B=(void 0!==u.g?u.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var $,U=u(75896),Y=u(65291).getHighWaterMark,X=u(86048).F,Z=X.ERR_INVALID_ARG_TYPE,ee=X.ERR_METHOD_NOT_IMPLEMENTED,ie=X.ERR_MULTIPLE_CALLBACK,ae=X.ERR_STREAM_CANNOT_PIPE,le=X.ERR_STREAM_DESTROYED,ce=X.ERR_STREAM_NULL_VALUES,pe=X.ERR_STREAM_WRITE_AFTER_END,de=X.ERR_UNKNOWN_ENCODING,fe=U.errorOrDestroy;function nop(){}function WritableState(s,i,x){_=_||u(25382),s=s||{},\"boolean\"!=typeof x&&(x=i instanceof _),this.objectMode=!!s.objectMode,x&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=Y(this,s,\"writableHighWaterMark\",x),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=!1===s.decodeStrings;this.decodeStrings=!j,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){!function onwrite(s,i){var u=s._writableState,_=u.sync,x=u.writecb;if(\"function\"!=typeof x)throw new ie;if(function onwriteStateUpdate(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}(u),i)!function onwriteError(s,i,u,_,x){--i.pendingcb,u?(w.nextTick(x,_),w.nextTick(finishMaybe,s,i),s._writableState.errorEmitted=!0,fe(s,_)):(x(_),s._writableState.errorEmitted=!0,fe(s,_),finishMaybe(s,i))}(s,u,_,i,x);else{var j=needFinish(u)||s.destroyed;j||u.corked||u.bufferProcessing||!u.bufferedRequest||clearBuffer(s,u),_?w.nextTick(afterWrite,s,u,j,x):afterWrite(s,u,j,x)}}(i,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(s){var i=this instanceof(_=_||u(25382));if(!i&&!$.call(Writable,this))return new Writable(s);this._writableState=new WritableState(s,this,i),this.writable=!0,s&&(\"function\"==typeof s.write&&(this._write=s.write),\"function\"==typeof s.writev&&(this._writev=s.writev),\"function\"==typeof s.destroy&&(this._destroy=s.destroy),\"function\"==typeof s.final&&(this._final=s.final)),j.call(this)}function doWrite(s,i,u,_,w,x,j){i.writelen=_,i.writecb=j,i.writing=!0,i.sync=!0,i.destroyed?i.onwrite(new le(\"write\")):u?s._writev(w,i.onwrite):s._write(w,x,i.onwrite),i.sync=!1}function afterWrite(s,i,u,_){u||function onwriteDrain(s,i){0===i.length&&i.needDrain&&(i.needDrain=!1,s.emit(\"drain\"))}(s,i),i.pendingcb--,_(),finishMaybe(s,i)}function clearBuffer(s,i){i.bufferProcessing=!0;var u=i.bufferedRequest;if(s._writev&&u&&u.next){var _=i.bufferedRequestCount,w=new Array(_),x=i.corkedRequestsFree;x.entry=u;for(var j=0,P=!0;u;)w[j]=u,u.isBuf||(P=!1),u=u.next,j+=1;w.allBuffers=P,doWrite(s,i,!0,i.length,w,\"\",x.finish),i.pendingcb++,i.lastBufferedRequest=null,x.next?(i.corkedRequestsFree=x.next,x.next=null):i.corkedRequestsFree=new CorkedRequest(i),i.bufferedRequestCount=0}else{for(;u;){var B=u.chunk,$=u.encoding,U=u.callback;if(doWrite(s,i,!1,i.objectMode?1:B.length,B,$,U),u=u.next,i.bufferedRequestCount--,i.writing)break}null===u&&(i.lastBufferedRequest=null)}i.bufferedRequest=u,i.bufferProcessing=!1}function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedRequest&&!s.finished&&!s.writing}function callFinal(s,i){s._final((function(u){i.pendingcb--,u&&fe(s,u),i.prefinished=!0,s.emit(\"prefinish\"),finishMaybe(s,i)}))}function finishMaybe(s,i){var u=needFinish(i);if(u&&(function prefinish(s,i){i.prefinished||i.finalCalled||(\"function\"!=typeof s._final||i.destroyed?(i.prefinished=!0,s.emit(\"prefinish\")):(i.pendingcb++,i.finalCalled=!0,w.nextTick(callFinal,s,i)))}(s,i),0===i.pendingcb&&(i.finished=!0,s.emit(\"finish\"),i.autoDestroy))){var _=s._readableState;(!_||_.autoDestroy&&_.endEmitted)&&s.destroy()}return u}u(56698)(Writable,j),WritableState.prototype.getBuffer=function getBuffer(){for(var s=this.bufferedRequest,i=[];s;)i.push(s),s=s.next;return i},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:x.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(s){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?($=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(s){return!!$.call(this,s)||this===Writable&&(s&&s._writableState instanceof WritableState)}})):$=function realHasInstance(s){return s instanceof this},Writable.prototype.pipe=function(){fe(this,new ae)},Writable.prototype.write=function(s,i,u){var _=this._writableState,x=!1,j=!_.objectMode&&function _isUint8Array(s){return P.isBuffer(s)||s instanceof B}(s);return j&&!P.isBuffer(s)&&(s=function _uint8ArrayToBuffer(s){return P.from(s)}(s)),\"function\"==typeof i&&(u=i,i=null),j?i=\"buffer\":i||(i=_.defaultEncoding),\"function\"!=typeof u&&(u=nop),_.ending?function writeAfterEnd(s,i){var u=new pe;fe(s,u),w.nextTick(i,u)}(this,u):(j||function validChunk(s,i,u,_){var x;return null===u?x=new ce:\"string\"==typeof u||i.objectMode||(x=new Z(\"chunk\",[\"string\",\"Buffer\"],u)),!x||(fe(s,x),w.nextTick(_,x),!1)}(this,_,s,u))&&(_.pendingcb++,x=function writeOrBuffer(s,i,u,_,w,x){if(!u){var j=function decodeChunk(s,i,u){s.objectMode||!1===s.decodeStrings||\"string\"!=typeof i||(i=P.from(i,u));return i}(i,_,w);_!==j&&(u=!0,w=\"buffer\",_=j)}var B=i.objectMode?1:_.length;i.length+=B;var $=i.length<i.highWaterMark;$||(i.needDrain=!0);if(i.writing||i.corked){var U=i.lastBufferedRequest;i.lastBufferedRequest={chunk:_,encoding:w,isBuf:u,callback:x,next:null},U?U.next=i.lastBufferedRequest:i.bufferedRequest=i.lastBufferedRequest,i.bufferedRequestCount+=1}else doWrite(s,i,!1,B,_,w,x);return $}(this,_,j,s,i,u)),x},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,s.writing||s.corked||s.bufferProcessing||!s.bufferedRequest||clearBuffer(this,s))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(s){if(\"string\"==typeof s&&(s=s.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((s+\"\").toLowerCase())>-1))throw new de(s);return this._writableState.defaultEncoding=s,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(s,i,u){u(new ee(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(s,i,u){var _=this._writableState;return\"function\"==typeof s?(u=s,s=null,i=null):\"function\"==typeof i&&(u=i,i=null),null!=s&&this.write(s,i),_.corked&&(_.corked=1,this.uncork()),_.ending||function endWritable(s,i,u){i.ending=!0,finishMaybe(s,i),u&&(i.finished?w.nextTick(u):s.once(\"finish\",u));i.ended=!0,s.writable=!1}(this,_,u),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(s){this._writableState&&(this._writableState.destroyed=s)}}),Writable.prototype.destroy=U.destroy,Writable.prototype._undestroy=U.undestroy,Writable.prototype._destroy=function(s,i){i(s)}},2955:(s,i,u)=>{\"use strict\";var _,w=u(65606);function _defineProperty(s,i,u){return(i=function _toPropertyKey(s){var i=function _toPrimitive(s,i){if(\"object\"!=typeof s||null===s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=typeof _)return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof i?i:String(i)}(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}var x=u(86238),j=Symbol(\"lastResolve\"),P=Symbol(\"lastReject\"),B=Symbol(\"error\"),$=Symbol(\"ended\"),U=Symbol(\"lastPromise\"),Y=Symbol(\"handlePromise\"),X=Symbol(\"stream\");function createIterResult(s,i){return{value:s,done:i}}function readAndResolve(s){var i=s[j];if(null!==i){var u=s[X].read();null!==u&&(s[U]=null,s[j]=null,s[P]=null,i(createIterResult(u,!1)))}}function onReadable(s){w.nextTick(readAndResolve,s)}var Z=Object.getPrototypeOf((function(){})),ee=Object.setPrototypeOf((_defineProperty(_={get stream(){return this[X]},next:function next(){var s=this,i=this[B];if(null!==i)return Promise.reject(i);if(this[$])return Promise.resolve(createIterResult(void 0,!0));if(this[X].destroyed)return new Promise((function(i,u){w.nextTick((function(){s[B]?u(s[B]):i(createIterResult(void 0,!0))}))}));var u,_=this[U];if(_)u=new Promise(function wrapForNext(s,i){return function(u,_){s.then((function(){i[$]?u(createIterResult(void 0,!0)):i[Y](u,_)}),_)}}(_,this));else{var x=this[X].read();if(null!==x)return Promise.resolve(createIterResult(x,!1));u=new Promise(this[Y])}return this[U]=u,u}},Symbol.asyncIterator,(function(){return this})),_defineProperty(_,\"return\",(function _return(){var s=this;return new Promise((function(i,u){s[X].destroy(null,(function(s){s?u(s):i(createIterResult(void 0,!0))}))}))})),_),Z);s.exports=function createReadableStreamAsyncIterator(s){var i,u=Object.create(ee,(_defineProperty(i={},X,{value:s,writable:!0}),_defineProperty(i,j,{value:null,writable:!0}),_defineProperty(i,P,{value:null,writable:!0}),_defineProperty(i,B,{value:null,writable:!0}),_defineProperty(i,$,{value:s._readableState.endEmitted,writable:!0}),_defineProperty(i,Y,{value:function value(s,i){var _=u[X].read();_?(u[U]=null,u[j]=null,u[P]=null,s(createIterResult(_,!1))):(u[j]=s,u[P]=i)},writable:!0}),i));return u[U]=null,x(s,(function(s){if(s&&\"ERR_STREAM_PREMATURE_CLOSE\"!==s.code){var i=u[P];return null!==i&&(u[U]=null,u[j]=null,u[P]=null,i(s)),void(u[B]=s)}var _=u[j];null!==_&&(u[U]=null,u[j]=null,u[P]=null,_(createIterResult(void 0,!0))),u[$]=!0})),s.on(\"readable\",onReadable.bind(null,u)),u}},80345:(s,i,u)=>{\"use strict\";function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}function _defineProperty(s,i,u){return(i=_toPropertyKey(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_toPropertyKey(_.key),_)}}function _toPropertyKey(s){var i=function _toPrimitive(s,i){if(\"object\"!=typeof s||null===s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=typeof _)return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof i?i:String(i)}var _=u(48287).Buffer,w=u(15340).inspect,x=w&&w.custom||\"inspect\";s.exports=function(){function BufferList(){!function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(BufferList,[{key:\"push\",value:function push(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:\"unshift\",value:function unshift(s){var i={data:s,next:this.head};0===this.length&&(this.tail=i),this.head=i,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var s=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,s}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(s){if(0===this.length)return\"\";for(var i=this.head,u=\"\"+i.data;i=i.next;)u+=s+i.data;return u}},{key:\"concat\",value:function concat(s){if(0===this.length)return _.alloc(0);for(var i,u,w,x=_.allocUnsafe(s>>>0),j=this.head,P=0;j;)i=j.data,u=x,w=P,_.prototype.copy.call(i,u,w),P+=j.data.length,j=j.next;return x}},{key:\"consume\",value:function consume(s,i){var u;return s<this.head.data.length?(u=this.head.data.slice(0,s),this.head.data=this.head.data.slice(s)):u=s===this.head.data.length?this.shift():i?this._getString(s):this._getBuffer(s),u}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(s){var i=this.head,u=1,_=i.data;for(s-=_.length;i=i.next;){var w=i.data,x=s>w.length?w.length:s;if(x===w.length?_+=w:_+=w.slice(0,s),0===(s-=x)){x===w.length?(++u,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=w.slice(x));break}++u}return this.length-=u,_}},{key:\"_getBuffer\",value:function _getBuffer(s){var i=_.allocUnsafe(s),u=this.head,w=1;for(u.data.copy(i),s-=u.data.length;u=u.next;){var x=u.data,j=s>x.length?x.length:s;if(x.copy(i,i.length-s,0,j),0===(s-=j)){j===x.length?(++w,u.next?this.head=u.next:this.head=this.tail=null):(this.head=u,u.data=x.slice(j));break}++w}return this.length-=w,i}},{key:x,value:function value(s,i){return w(this,_objectSpread(_objectSpread({},i),{},{depth:0,customInspect:!1}))}}]),BufferList}()},75896:(s,i,u)=>{\"use strict\";var _=u(65606);function emitErrorAndCloseNT(s,i){emitErrorNT(s,i),emitCloseNT(s)}function emitCloseNT(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit(\"close\")}function emitErrorNT(s,i){s.emit(\"error\",i)}s.exports={destroy:function destroy(s,i){var u=this,w=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;return w||x?(i?i(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(emitErrorNT,this,s)):_.nextTick(emitErrorNT,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,(function(s){!i&&s?u._writableState?u._writableState.errorEmitted?_.nextTick(emitCloseNT,u):(u._writableState.errorEmitted=!0,_.nextTick(emitErrorAndCloseNT,u,s)):_.nextTick(emitErrorAndCloseNT,u,s):i?(_.nextTick(emitCloseNT,u),i(s)):_.nextTick(emitCloseNT,u)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(s,i){var u=s._readableState,_=s._writableState;u&&u.autoDestroy||_&&_.autoDestroy?s.destroy(i):s.emit(\"error\",i)}}},86238:(s,i,u)=>{\"use strict\";var _=u(86048).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}s.exports=function eos(s,i,u){if(\"function\"==typeof i)return eos(s,null,i);i||(i={}),u=function once(s){var i=!1;return function(){if(!i){i=!0;for(var u=arguments.length,_=new Array(u),w=0;w<u;w++)_[w]=arguments[w];s.apply(this,_)}}}(u||noop);var w=i.readable||!1!==i.readable&&s.readable,x=i.writable||!1!==i.writable&&s.writable,j=function onlegacyfinish(){s.writable||B()},P=s._writableState&&s._writableState.finished,B=function onfinish(){x=!1,P=!0,w||u.call(s)},$=s._readableState&&s._readableState.endEmitted,U=function onend(){w=!1,$=!0,x||u.call(s)},Y=function onerror(i){u.call(s,i)},X=function onclose(){var i;return w&&!$?(s._readableState&&s._readableState.ended||(i=new _),u.call(s,i)):x&&!P?(s._writableState&&s._writableState.ended||(i=new _),u.call(s,i)):void 0},Z=function onrequest(){s.req.on(\"finish\",B)};return!function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?x&&!s._writableState&&(s.on(\"end\",j),s.on(\"close\",j)):(s.on(\"complete\",B),s.on(\"abort\",X),s.req?Z():s.on(\"request\",Z)),s.on(\"end\",U),s.on(\"finish\",B),!1!==i.error&&s.on(\"error\",Y),s.on(\"close\",X),function(){s.removeListener(\"complete\",B),s.removeListener(\"abort\",X),s.removeListener(\"request\",Z),s.req&&s.req.removeListener(\"finish\",B),s.removeListener(\"end\",j),s.removeListener(\"close\",j),s.removeListener(\"finish\",B),s.removeListener(\"end\",U),s.removeListener(\"error\",Y),s.removeListener(\"close\",X)}}},55157:s=>{s.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},57758:(s,i,u)=>{\"use strict\";var _;var w=u(86048).F,x=w.ERR_MISSING_ARGS,j=w.ERR_STREAM_DESTROYED;function noop(s){if(s)throw s}function call(s){s()}function pipe(s,i){return s.pipe(i)}s.exports=function pipeline(){for(var s=arguments.length,i=new Array(s),w=0;w<s;w++)i[w]=arguments[w];var P,B=function popCallback(s){return s.length?\"function\"!=typeof s[s.length-1]?noop:s.pop():noop}(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new x(\"streams\");var $=i.map((function(s,w){var x=w<i.length-1;return function destroyer(s,i,w,x){x=function once(s){var i=!1;return function(){i||(i=!0,s.apply(void 0,arguments))}}(x);var P=!1;s.on(\"close\",(function(){P=!0})),void 0===_&&(_=u(86238)),_(s,{readable:i,writable:w},(function(s){if(s)return x(s);P=!0,x()}));var B=!1;return function(i){if(!P&&!B)return B=!0,function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?s.abort():\"function\"==typeof s.destroy?s.destroy():void x(i||new j(\"pipe\"))}}(s,x,w>0,(function(s){P||(P=s),s&&$.forEach(call),x||($.forEach(call),B(P))}))}));return i.reduce(pipe)}},65291:(s,i,u)=>{\"use strict\";var _=u(86048).F.ERR_INVALID_OPT_VALUE;s.exports={getHighWaterMark:function getHighWaterMark(s,i,u,w){var x=function highWaterMarkFrom(s,i,u){return null!=s.highWaterMark?s.highWaterMark:i?s[u]:null}(i,w,u);if(null!=x){if(!isFinite(x)||Math.floor(x)!==x||x<0)throw new _(w?u:\"highWaterMark\",x);return Math.floor(x)}return s.objectMode?16:16384}}},40345:(s,i,u)=>{s.exports=u(37007).EventEmitter},84977:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var _=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(u(9404)),w=u(55674);i.default=function(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.default.Map,u=Object.keys(s);return function(){var _=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i(),x=arguments[1];return _.withMutations((function(i){u.forEach((function(u){var _=(0,s[u])(i.get(u),x);(0,w.validateNextState)(_,u,x),i.set(u,_)}))}))}},s.exports=i.default},89593:(s,i,u)=>{\"use strict\";i.H=void 0;var _=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(u(84977));i.H=_.default},48590:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.default=function(s){return s&&\"@@redux/INIT\"===s.type?\"initialState argument passed to createStore\":\"previous state received by the reducer\"},s.exports=i.default},82261:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var _=_interopRequireDefault(u(9404)),w=_interopRequireDefault(u(48590));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}i.default=function(s,i,u){var x=Object.keys(i);if(!x.length)return\"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";var j=(0,w.default)(u);if(_.default.isImmutable?!_.default.isImmutable(s):!_.default.Iterable.isIterable(s))return\"The \"+j+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: \"'+x.join('\", \"')+'\".';var P=s.toSeq().keySeq().toArray().filter((function(s){return!i.hasOwnProperty(s)}));return P.length>0?\"Unexpected \"+(1===P.length?\"property\":\"properties\")+' \"'+P.join('\", \"')+'\" found in '+j+'. Expected to find one of the known reducer property names instead: \"'+x.join('\", \"')+'\". Unexpected properties will be ignored.':null},s.exports=i.default},55674:(s,i,u)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.validateNextState=i.getUnexpectedInvocationParameterMessage=i.getStateName=void 0;var _=_interopRequireDefault(u(48590)),w=_interopRequireDefault(u(82261)),x=_interopRequireDefault(u(27374));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}i.getStateName=_.default,i.getUnexpectedInvocationParameterMessage=w.default,i.validateNextState=x.default},27374:(s,i)=>{\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0}),i.default=function(s,i,u){if(void 0===s)throw new Error('Reducer \"'+i+'\" returned undefined when handling \"'+u.type+'\" action. To ignore an action, you must explicitly return the previous state.')},s.exports=i.default},75208:s=>{\"use strict\";var i,u=\"\";s.exports=function repeat(s,_){if(\"string\"!=typeof s)throw new TypeError(\"expected a string\");if(1===_)return s;if(2===_)return s+s;var w=s.length*_;if(i!==s||void 0===i)i=s,u=\"\";else if(u.length>=w)return u.substr(0,w);for(;w>u.length&&_>1;)1&_&&(u+=s),_>>=1,s+=s;return u=(u+=s).substr(0,w)}},92063:s=>{\"use strict\";s.exports=function required(s,i){if(i=i.split(\":\")[0],!(s=+s))return!1;switch(i){case\"http\":case\"ws\":return 80!==s;case\"https\":case\"wss\":return 443!==s;case\"ftp\":return 21!==s;case\"gopher\":return 70!==s;case\"file\":return!1}return 0!==s}},27096:(s,i,u)=>{const _=u(87586),w=u(6205),x=u(10023),j=u(8048);s.exports=s=>{var i,u,P=0,B={type:w.ROOT,stack:[]},$=B,U=B.stack,Y=[],repeatErr=i=>{_.error(s,\"Nothing to repeat at column \"+(i-1))},X=_.strToChars(s);for(i=X.length;P<i;)switch(u=X[P++]){case\"\\\\\":switch(u=X[P++]){case\"b\":U.push(j.wordBoundary());break;case\"B\":U.push(j.nonWordBoundary());break;case\"w\":U.push(x.words());break;case\"W\":U.push(x.notWords());break;case\"d\":U.push(x.ints());break;case\"D\":U.push(x.notInts());break;case\"s\":U.push(x.whitespace());break;case\"S\":U.push(x.notWhitespace());break;default:/\\d/.test(u)?U.push({type:w.REFERENCE,value:parseInt(u,10)}):U.push({type:w.CHAR,value:u.charCodeAt(0)})}break;case\"^\":U.push(j.begin());break;case\"$\":U.push(j.end());break;case\"[\":var Z;\"^\"===X[P]?(Z=!0,P++):Z=!1;var ee=_.tokenizeClass(X.slice(P),s);P+=ee[1],U.push({type:w.SET,set:ee[0],not:Z});break;case\".\":U.push(x.anyChar());break;case\"(\":var ie={type:w.GROUP,stack:[],remember:!0};\"?\"===(u=X[P])&&(u=X[P+1],P+=2,\"=\"===u?ie.followedBy=!0:\"!\"===u?ie.notFollowedBy=!0:\":\"!==u&&_.error(s,`Invalid group, character '${u}' after '?' at column `+(P-1)),ie.remember=!1),U.push(ie),Y.push($),$=ie,U=ie.stack;break;case\")\":0===Y.length&&_.error(s,\"Unmatched ) at column \"+(P-1)),U=($=Y.pop()).options?$.options[$.options.length-1]:$.stack;break;case\"|\":$.options||($.options=[$.stack],delete $.stack);var ae=[];$.options.push(ae),U=ae;break;case\"{\":var le,ce,pe=/^(\\d+)(,(\\d+)?)?\\}/.exec(X.slice(P));null!==pe?(0===U.length&&repeatErr(P),le=parseInt(pe[1],10),ce=pe[2]?pe[3]?parseInt(pe[3],10):1/0:le,P+=pe[0].length,U.push({type:w.REPETITION,min:le,max:ce,value:U.pop()})):U.push({type:w.CHAR,value:123});break;case\"?\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:0,max:1,value:U.pop()});break;case\"+\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:1,max:1/0,value:U.pop()});break;case\"*\":0===U.length&&repeatErr(P),U.push({type:w.REPETITION,min:0,max:1/0,value:U.pop()});break;default:U.push({type:w.CHAR,value:u.charCodeAt(0)})}return 0!==Y.length&&_.error(s,\"Unterminated group\"),B},s.exports.types=w},8048:(s,i,u)=>{const _=u(6205);i.wordBoundary=()=>({type:_.POSITION,value:\"b\"}),i.nonWordBoundary=()=>({type:_.POSITION,value:\"B\"}),i.begin=()=>({type:_.POSITION,value:\"^\"}),i.end=()=>({type:_.POSITION,value:\"$\"})},10023:(s,i,u)=>{const _=u(6205),INTS=()=>[{type:_.RANGE,from:48,to:57}],WORDS=()=>[{type:_.CHAR,value:95},{type:_.RANGE,from:97,to:122},{type:_.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:_.CHAR,value:9},{type:_.CHAR,value:10},{type:_.CHAR,value:11},{type:_.CHAR,value:12},{type:_.CHAR,value:13},{type:_.CHAR,value:32},{type:_.CHAR,value:160},{type:_.CHAR,value:5760},{type:_.RANGE,from:8192,to:8202},{type:_.CHAR,value:8232},{type:_.CHAR,value:8233},{type:_.CHAR,value:8239},{type:_.CHAR,value:8287},{type:_.CHAR,value:12288},{type:_.CHAR,value:65279}];i.words=()=>({type:_.SET,set:WORDS(),not:!1}),i.notWords=()=>({type:_.SET,set:WORDS(),not:!0}),i.ints=()=>({type:_.SET,set:INTS(),not:!1}),i.notInts=()=>({type:_.SET,set:INTS(),not:!0}),i.whitespace=()=>({type:_.SET,set:WHITESPACE(),not:!1}),i.notWhitespace=()=>({type:_.SET,set:WHITESPACE(),not:!0}),i.anyChar=()=>({type:_.SET,set:[{type:_.CHAR,value:10},{type:_.CHAR,value:13},{type:_.CHAR,value:8232},{type:_.CHAR,value:8233}],not:!0})},6205:s=>{s.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},87586:(s,i,u)=>{const _=u(6205),w=u(10023),x={0:0,t:9,n:10,v:11,f:12,r:13};i.strToChars=function(s){return s=s.replace(/(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\\\\]^?])|([0tnvfr]))/g,(function(s,i,u,_,w,j,P,B){if(u)return s;var $=i?8:_?parseInt(_,16):w?parseInt(w,16):j?parseInt(j,8):P?\"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?\".indexOf(P):x[B],U=String.fromCharCode($);return/[[\\]{}^$.|?*+()]/.test(U)&&(U=\"\\\\\"+U),U}))},i.tokenizeClass=(s,u)=>{for(var x,j,P=[],B=/\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?([^])/g;null!=(x=B.exec(s));)if(x[1])P.push(w.words());else if(x[2])P.push(w.ints());else if(x[3])P.push(w.whitespace());else if(x[4])P.push(w.notWords());else if(x[5])P.push(w.notInts());else if(x[6])P.push(w.notWhitespace());else if(x[7])P.push({type:_.RANGE,from:(x[8]||x[9]).charCodeAt(0),to:x[10].charCodeAt(0)});else{if(!(j=x[12]))return[P,B.lastIndex];P.push({type:_.CHAR,value:j.charCodeAt(0)})}i.error(u,\"Unterminated character class\")},i.error=(s,i)=>{throw new SyntaxError(\"Invalid regular expression: /\"+s+\"/: \"+i)}},92861:(s,i,u)=>{var _=u(48287),w=_.Buffer;function copyProps(s,i){for(var u in s)i[u]=s[u]}function SafeBuffer(s,i,u){return w(s,i,u)}w.from&&w.alloc&&w.allocUnsafe&&w.allocUnsafeSlow?s.exports=_:(copyProps(_,i),i.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(w.prototype),copyProps(w,SafeBuffer),SafeBuffer.from=function(s,i,u){if(\"number\"==typeof s)throw new TypeError(\"Argument must not be a number\");return w(s,i,u)},SafeBuffer.alloc=function(s,i,u){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");var _=w(s);return void 0!==i?\"string\"==typeof u?_.fill(i,u):_.fill(i):_.fill(0),_},SafeBuffer.allocUnsafe=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return w(s)},SafeBuffer.allocUnsafeSlow=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return _.SlowBuffer(s)}},29844:(s,i)=>{\"use strict\";function f(s,i){var u=s.length;s.push(i);e:for(;0<u;){var _=u-1>>>1,w=s[_];if(!(0<g(w,i)))break e;s[_]=i,s[u]=w,u=_}}function h(s){return 0===s.length?null:s[0]}function k(s){if(0===s.length)return null;var i=s[0],u=s.pop();if(u!==i){s[0]=u;e:for(var _=0,w=s.length,x=w>>>1;_<x;){var j=2*(_+1)-1,P=s[j],B=j+1,$=s[B];if(0>g(P,u))B<w&&0>g($,P)?(s[_]=$,s[B]=u,_=B):(s[_]=P,s[j]=u,_=j);else{if(!(B<w&&0>g($,u)))break e;s[_]=$,s[B]=u,_=B}}}return i}function g(s,i){var u=s.sortIndex-i.sortIndex;return 0!==u?u:s.id-i.id}if(\"object\"==typeof performance&&\"function\"==typeof performance.now){var u=performance;i.unstable_now=function(){return u.now()}}else{var _=Date,w=_.now();i.unstable_now=function(){return _.now()-w}}var x=[],j=[],P=1,B=null,$=3,U=!1,Y=!1,X=!1,Z=\"function\"==typeof setTimeout?setTimeout:null,ee=\"function\"==typeof clearTimeout?clearTimeout:null,ie=\"undefined\"!=typeof setImmediate?setImmediate:null;function G(s){for(var i=h(j);null!==i;){if(null===i.callback)k(j);else{if(!(i.startTime<=s))break;k(j),i.sortIndex=i.expirationTime,f(x,i)}i=h(j)}}function H(s){if(X=!1,G(s),!Y)if(null!==h(x))Y=!0,I(J);else{var i=h(j);null!==i&&K(H,i.startTime-s)}}function J(s,u){Y=!1,X&&(X=!1,ee(pe),pe=-1),U=!0;var _=$;try{for(G(u),B=h(x);null!==B&&(!(B.expirationTime>u)||s&&!M());){var w=B.callback;if(\"function\"==typeof w){B.callback=null,$=B.priorityLevel;var P=w(B.expirationTime<=u);u=i.unstable_now(),\"function\"==typeof P?B.callback=P:B===h(x)&&k(x),G(u)}else k(x);B=h(x)}if(null!==B)var Z=!0;else{var ie=h(j);null!==ie&&K(H,ie.startTime-u),Z=!1}return Z}finally{B=null,$=_,U=!1}}\"undefined\"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var ae,le=!1,ce=null,pe=-1,de=5,fe=-1;function M(){return!(i.unstable_now()-fe<de)}function R(){if(null!==ce){var s=i.unstable_now();fe=s;var u=!0;try{u=ce(!0,s)}finally{u?ae():(le=!1,ce=null)}}else le=!1}if(\"function\"==typeof ie)ae=function(){ie(R)};else if(\"undefined\"!=typeof MessageChannel){var ye=new MessageChannel,be=ye.port2;ye.port1.onmessage=R,ae=function(){be.postMessage(null)}}else ae=function(){Z(R,0)};function I(s){ce=s,le||(le=!0,ae())}function K(s,u){pe=Z((function(){s(i.unstable_now())}),u)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(s){s.callback=null},i.unstable_continueExecution=function(){Y||U||(Y=!0,I(J))},i.unstable_forceFrameRate=function(s){0>s||125<s?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):de=0<s?Math.floor(1e3/s):5},i.unstable_getCurrentPriorityLevel=function(){return $},i.unstable_getFirstCallbackNode=function(){return h(x)},i.unstable_next=function(s){switch($){case 1:case 2:case 3:var i=3;break;default:i=$}var u=$;$=i;try{return s()}finally{$=u}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(s,i){switch(s){case 1:case 2:case 3:case 4:case 5:break;default:s=3}var u=$;$=s;try{return i()}finally{$=u}},i.unstable_scheduleCallback=function(s,u,_){var w=i.unstable_now();switch(\"object\"==typeof _&&null!==_?_=\"number\"==typeof(_=_.delay)&&0<_?w+_:w:_=w,s){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return s={id:P++,callback:u,priorityLevel:s,startTime:_,expirationTime:B=_+B,sortIndex:-1},_>w?(s.sortIndex=_,f(j,s),null===h(x)&&s===h(j)&&(X?(ee(pe),pe=-1):X=!0,K(H,_-w))):(s.sortIndex=B,f(x,s),Y||U||(Y=!0,I(J))),s},i.unstable_shouldYield=M,i.unstable_wrapCallback=function(s){var i=$;return function(){var u=$;$=i;try{return s.apply(this,arguments)}finally{$=u}}}},69982:(s,i,u)=>{\"use strict\";s.exports=u(29844)},20334:(s,i,u)=>{\"use strict\";var _=u(48287).Buffer;class NonError extends Error{constructor(s){super(NonError._prepareSuperMessage(s)),Object.defineProperty(this,\"name\",{value:\"NonError\",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,NonError)}static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{return String(s)}}}const w=[{property:\"name\",enumerable:!1},{property:\"message\",enumerable:!1},{property:\"stack\",enumerable:!1},{property:\"code\",enumerable:!0}],x=Symbol(\".toJSON called\"),destroyCircular=({from:s,seen:i,to_:u,forceEnumerable:j,maxDepth:P,depth:B})=>{const $=u||(Array.isArray(s)?[]:{});if(i.push(s),B>=P)return $;if(\"function\"==typeof s.toJSON&&!0!==s[x])return(s=>{s[x]=!0;const i=s.toJSON();return delete s[x],i})(s);for(const[u,w]of Object.entries(s))\"function\"==typeof _&&_.isBuffer(w)?$[u]=\"[object Buffer]\":\"function\"!=typeof w&&(w&&\"object\"==typeof w?i.includes(s[u])?$[u]=\"[Circular]\":(B++,$[u]=destroyCircular({from:s[u],seen:i.slice(),forceEnumerable:j,maxDepth:P,depth:B})):$[u]=w);for(const{property:i,enumerable:u}of w)\"string\"==typeof s[i]&&Object.defineProperty($,i,{value:s[i],enumerable:!!j||u,configurable:!0,writable:!0});return $};s.exports={serializeError:(s,i={})=>{const{maxDepth:u=Number.POSITIVE_INFINITY}=i;return\"object\"==typeof s&&null!==s?destroyCircular({from:s,seen:[],forceEnumerable:!0,maxDepth:u,depth:0}):\"function\"==typeof s?`[Function: ${s.name||\"anonymous\"}]`:s},deserializeError:(s,i={})=>{const{maxDepth:u=Number.POSITIVE_INFINITY}=i;if(s instanceof Error)return s;if(\"object\"==typeof s&&null!==s&&!Array.isArray(s)){const i=new Error;return destroyCircular({from:s,seen:[],to_:i,maxDepth:u,depth:0}),i}return new NonError(s)}}},96897:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(30041),x=u(30592)(),j=u(75795),P=u(69675),B=_(\"%Math.floor%\");s.exports=function setFunctionLength(s,i){if(\"function\"!=typeof s)throw new P(\"`fn` is not a function\");if(\"number\"!=typeof i||i<0||i>4294967295||B(i)!==i)throw new P(\"`length` must be a positive 32-bit integer\");var u=arguments.length>2&&!!arguments[2],_=!0,$=!0;if(\"length\"in s&&j){var U=j(s,\"length\");U&&!U.configurable&&(_=!1),U&&!U.writable&&($=!1)}return(_||$||!u)&&(x?w(s,\"length\",i,!0,!0):w(s,\"length\",i)),s}},90392:(s,i,u)=>{var _=u(92861).Buffer;function Hash(s,i){this._block=_.alloc(s),this._finalSize=i,this._blockSize=s,this._len=0}Hash.prototype.update=function(s,i){\"string\"==typeof s&&(i=i||\"utf8\",s=_.from(s,i));for(var u=this._block,w=this._blockSize,x=s.length,j=this._len,P=0;P<x;){for(var B=j%w,$=Math.min(x-P,w-B),U=0;U<$;U++)u[B+U]=s[P+U];P+=$,(j+=$)%w==0&&this._update(u)}return this._len+=x,this},Hash.prototype.digest=function(s){var i=this._len%this._blockSize;this._block[i]=128,this._block.fill(0,i+1),i>=this._finalSize&&(this._update(this._block),this._block.fill(0));var u=8*this._len;if(u<=4294967295)this._block.writeUInt32BE(u,this._blockSize-4);else{var _=(4294967295&u)>>>0,w=(u-_)/4294967296;this._block.writeUInt32BE(w,this._blockSize-8),this._block.writeUInt32BE(_,this._blockSize-4)}this._update(this._block);var x=this._hash();return s?x.toString(s):x},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},s.exports=Hash},62802:(s,i,u)=>{var _=s.exports=function SHA(s){s=s.toLowerCase();var i=_[s];if(!i)throw new Error(s+\" is not supported (we accept pull requests)\");return new i};_.sha=u(27816),_.sha1=u(63737),_.sha224=u(26710),_.sha256=u(24107),_.sha384=u(32827),_.sha512=u(82890)},27816:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1518500249,1859775393,-1894007588,-899497514],P=new Array(80);function Sha(){this.init(),this._w=P,w.call(this,64,56)}function rotl30(s){return s<<30|s>>>2}function ft(s,i,u,_){return 0===s?i&u|~i&_:2===s?i&u|i&_|u&_:i^u^_}_(Sha,w),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0;$<16;++$)u[$]=s.readInt32BE(4*$);for(;$<80;++$)u[$]=u[$-3]^u[$-8]^u[$-14]^u[$-16];for(var U=0;U<80;++U){var Y=~~(U/20),X=0|((i=_)<<5|i>>>27)+ft(Y,w,x,P)+B+u[U]+j[Y];B=P,P=x,x=rotl30(w),w=_,_=X}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0},Sha.prototype._hash=function(){var s=x.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha},63737:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1518500249,1859775393,-1894007588,-899497514],P=new Array(80);function Sha1(){this.init(),this._w=P,w.call(this,64,56)}function rotl5(s){return s<<5|s>>>27}function rotl30(s){return s<<30|s>>>2}function ft(s,i,u,_){return 0===s?i&u|~i&_:2===s?i&u|i&_|u&_:i^u^_}_(Sha1,w),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0;$<16;++$)u[$]=s.readInt32BE(4*$);for(;$<80;++$)u[$]=(i=u[$-3]^u[$-8]^u[$-14]^u[$-16])<<1|i>>>31;for(var U=0;U<80;++U){var Y=~~(U/20),X=rotl5(_)+ft(Y,w,x,P)+B+u[U]+j[Y]|0;B=P,P=x,x=rotl30(w),w=_,_=X}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0},Sha1.prototype._hash=function(){var s=x.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha1},26710:(s,i,u)=>{var _=u(56698),w=u(24107),x=u(90392),j=u(92861).Buffer,P=new Array(64);function Sha224(){this.init(),this._w=P,x.call(this,64,56)}_(Sha224,w),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var s=j.allocUnsafe(28);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s},s.exports=Sha224},24107:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],P=new Array(64);function Sha256(){this.init(),this._w=P,w.call(this,64,56)}function ch(s,i,u){return u^s&(i^u)}function maj(s,i,u){return s&i|u&(s|i)}function sigma0(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}function sigma1(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}function gamma0(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}_(Sha256,w),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(s){for(var i,u=this._w,_=0|this._a,w=0|this._b,x=0|this._c,P=0|this._d,B=0|this._e,$=0|this._f,U=0|this._g,Y=0|this._h,X=0;X<16;++X)u[X]=s.readInt32BE(4*X);for(;X<64;++X)u[X]=0|(((i=u[X-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10)+u[X-7]+gamma0(u[X-15])+u[X-16];for(var Z=0;Z<64;++Z){var ee=Y+sigma1(B)+ch(B,$,U)+j[Z]+u[Z]|0,ie=sigma0(_)+maj(_,w,x)|0;Y=U,U=$,$=B,B=P+ee|0,P=x,x=w,w=_,_=ee+ie|0}this._a=_+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=P+this._d|0,this._e=B+this._e|0,this._f=$+this._f|0,this._g=U+this._g|0,this._h=Y+this._h|0},Sha256.prototype._hash=function(){var s=x.allocUnsafe(32);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s.writeInt32BE(this._h,28),s},s.exports=Sha256},32827:(s,i,u)=>{var _=u(56698),w=u(82890),x=u(90392),j=u(92861).Buffer,P=new Array(160);function Sha384(){this.init(),this._w=P,x.call(this,128,112)}_(Sha384,w),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var s=j.allocUnsafe(48);function writeInt64BE(i,u,_){s.writeInt32BE(i,_),s.writeInt32BE(u,_+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),s},s.exports=Sha384},82890:(s,i,u)=>{var _=u(56698),w=u(90392),x=u(92861).Buffer,j=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],P=new Array(160);function Sha512(){this.init(),this._w=P,w.call(this,128,112)}function Ch(s,i,u){return u^s&(i^u)}function maj(s,i,u){return s&i|u&(s|i)}function sigma0(s,i){return(s>>>28|i<<4)^(i>>>2|s<<30)^(i>>>7|s<<25)}function sigma1(s,i){return(s>>>14|i<<18)^(s>>>18|i<<14)^(i>>>9|s<<23)}function Gamma0(s,i){return(s>>>1|i<<31)^(s>>>8|i<<24)^s>>>7}function Gamma0l(s,i){return(s>>>1|i<<31)^(s>>>8|i<<24)^(s>>>7|i<<25)}function Gamma1(s,i){return(s>>>19|i<<13)^(i>>>29|s<<3)^s>>>6}function Gamma1l(s,i){return(s>>>19|i<<13)^(i>>>29|s<<3)^(s>>>6|i<<26)}function getCarry(s,i){return s>>>0<i>>>0?1:0}_(Sha512,w),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(s){for(var i=this._w,u=0|this._ah,_=0|this._bh,w=0|this._ch,x=0|this._dh,P=0|this._eh,B=0|this._fh,$=0|this._gh,U=0|this._hh,Y=0|this._al,X=0|this._bl,Z=0|this._cl,ee=0|this._dl,ie=0|this._el,ae=0|this._fl,le=0|this._gl,ce=0|this._hl,pe=0;pe<32;pe+=2)i[pe]=s.readInt32BE(4*pe),i[pe+1]=s.readInt32BE(4*pe+4);for(;pe<160;pe+=2){var de=i[pe-30],fe=i[pe-30+1],ye=Gamma0(de,fe),be=Gamma0l(fe,de),_e=Gamma1(de=i[pe-4],fe=i[pe-4+1]),we=Gamma1l(fe,de),Se=i[pe-14],xe=i[pe-14+1],Pe=i[pe-32],Te=i[pe-32+1],Re=be+xe|0,qe=ye+Se+getCarry(Re,be)|0;qe=(qe=qe+_e+getCarry(Re=Re+we|0,we)|0)+Pe+getCarry(Re=Re+Te|0,Te)|0,i[pe]=qe,i[pe+1]=Re}for(var $e=0;$e<160;$e+=2){qe=i[$e],Re=i[$e+1];var ze=maj(u,_,w),We=maj(Y,X,Z),He=sigma0(u,Y),Ye=sigma0(Y,u),Xe=sigma1(P,ie),Qe=sigma1(ie,P),et=j[$e],tt=j[$e+1],rt=Ch(P,B,$),nt=Ch(ie,ae,le),ot=ce+Qe|0,st=U+Xe+getCarry(ot,ce)|0;st=(st=(st=st+rt+getCarry(ot=ot+nt|0,nt)|0)+et+getCarry(ot=ot+tt|0,tt)|0)+qe+getCarry(ot=ot+Re|0,Re)|0;var it=Ye+We|0,at=He+ze+getCarry(it,Ye)|0;U=$,ce=le,$=B,le=ae,B=P,ae=ie,P=x+st+getCarry(ie=ee+ot|0,ee)|0,x=w,ee=Z,w=_,Z=X,_=u,X=Y,u=st+at+getCarry(Y=ot+it|0,ot)|0}this._al=this._al+Y|0,this._bl=this._bl+X|0,this._cl=this._cl+Z|0,this._dl=this._dl+ee|0,this._el=this._el+ie|0,this._fl=this._fl+ae|0,this._gl=this._gl+le|0,this._hl=this._hl+ce|0,this._ah=this._ah+u+getCarry(this._al,Y)|0,this._bh=this._bh+_+getCarry(this._bl,X)|0,this._ch=this._ch+w+getCarry(this._cl,Z)|0,this._dh=this._dh+x+getCarry(this._dl,ee)|0,this._eh=this._eh+P+getCarry(this._el,ie)|0,this._fh=this._fh+B+getCarry(this._fl,ae)|0,this._gh=this._gh+$+getCarry(this._gl,le)|0,this._hh=this._hh+U+getCarry(this._hl,ce)|0},Sha512.prototype._hash=function(){var s=x.allocUnsafe(64);function writeInt64BE(i,u,_){s.writeInt32BE(i,_),s.writeInt32BE(u,_+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),s},s.exports=Sha512},8068:s=>{\"use strict\";var i=(()=>{var s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,u,_)=>u in i?s(i,u,{enumerable:!0,configurable:!0,writable:!0,value:_}):i[u]=_,__spreadValues=(s,i)=>{for(var u in i||(i={}))w.call(i,u)&&__defNormalProp(s,u,i[u]);if(_)for(var u of _(i))x.call(i,u)&&__defNormalProp(s,u,i[u]);return s},__publicField=(s,i,u)=>(__defNormalProp(s,\"symbol\"!=typeof i?i+\"\":i,u),u),j={};((i,u)=>{for(var _ in u)s(i,_,{get:u[_],enumerable:!0})})(j,{DEFAULT_OPTIONS:()=>B,DEFAULT_UUID_LENGTH:()=>P,default:()=>Y});var P=6,B={dictionary:\"alphanum\",shuffle:!0,debug:!1,length:P,counter:0},$=class _ShortUniqueId{constructor(s={}){__publicField(this,\"counter\"),__publicField(this,\"debug\"),__publicField(this,\"dict\"),__publicField(this,\"version\"),__publicField(this,\"dictIndex\",0),__publicField(this,\"dictRange\",[]),__publicField(this,\"lowerBound\",0),__publicField(this,\"upperBound\",0),__publicField(this,\"dictLength\",0),__publicField(this,\"uuidLength\"),__publicField(this,\"_digit_first_ascii\",48),__publicField(this,\"_digit_last_ascii\",58),__publicField(this,\"_alpha_lower_first_ascii\",97),__publicField(this,\"_alpha_lower_last_ascii\",123),__publicField(this,\"_hex_last_ascii\",103),__publicField(this,\"_alpha_upper_first_ascii\",65),__publicField(this,\"_alpha_upper_last_ascii\",91),__publicField(this,\"_number_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),__publicField(this,\"_alpha_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alpha_lower_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alpha_upper_dict_ranges\",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_lower_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alphanum_upper_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_hex_dict_ranges\",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),__publicField(this,\"_dict_ranges\",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),__publicField(this,\"log\",((...s)=>{const i=[...s];if(i[0]=`[short-unique-id] ${s[0]}`,!0===this.debug&&\"undefined\"!=typeof console&&null!==console)return console.log(...i)})),__publicField(this,\"setDictionary\",((s,i)=>{let u;if(s&&Array.isArray(s)&&s.length>1)u=s;else{let i;u=[],this.dictIndex=i=0;const _=`_${s}_dict_ranges`,w=this._dict_ranges[_];Object.keys(w).forEach((s=>{const _=s;for(this.dictRange=w[_],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=i=this.lowerBound;this.lowerBound<=this.upperBound?i<this.upperBound:i>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?i+=1:i-=1)u.push(String.fromCharCode(this.dictIndex))}))}if(i){const s=.5;u=u.sort((()=>Math.random()-s))}this.dict=u,this.dictLength=this.dict.length,this.setCounter(0)})),__publicField(this,\"seq\",(()=>this.sequentialUUID())),__publicField(this,\"sequentialUUID\",(()=>{let s,i,u=\"\";s=this.counter;do{i=s%this.dictLength,s=Math.trunc(s/this.dictLength),u+=this.dict[i]}while(0!==s);return this.counter+=1,u})),__publicField(this,\"rnd\",((s=this.uuidLength||P)=>this.randomUUID(s))),__publicField(this,\"randomUUID\",((s=this.uuidLength||P)=>{let i,u,_;if(null==s||s<1)throw new Error(\"Invalid UUID Length Provided\");for(i=\"\",_=0;_<s;_+=1)u=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,i+=this.dict[u];return i})),__publicField(this,\"fmt\",((s,i)=>this.formattedUUID(s,i))),__publicField(this,\"formattedUUID\",((s,i)=>{const u={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return s.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const _=s.slice(0,2),w=parseInt(s.slice(2),10);return\"$s\"===_?u[_]().padStart(w,\"0\"):\"$t\"===_&&i?u[_](w,i):u[_](w)}))})),__publicField(this,\"availableUUIDs\",((s=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,s).toFixed(0)))),__publicField(this,\"approxMaxBeforeCollision\",((s=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*s).toFixed(20)))),__publicField(this,\"collisionProbability\",((s=this.availableUUIDs(this.uuidLength),i=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(s)/this.availableUUIDs(i)).toFixed(20)))),__publicField(this,\"uniqueness\",((s=this.availableUUIDs(this.uuidLength))=>{const i=parseFloat((1-this.approxMaxBeforeCollision(s)/s).toFixed(20));return i>1?1:i<0?0:i})),__publicField(this,\"getVersion\",(()=>this.version)),__publicField(this,\"stamp\",((s,i)=>{const u=Math.floor(+(i||new Date)/1e3).toString(16);if(\"number\"==typeof s&&0===s)return u;if(\"number\"!=typeof s||s<10)throw new Error([\"Param finalLength must be a number greater than or equal to 10,\",\"or 0 if you want the raw hexadecimal timestamp\"].join(\"\\n\"));const _=s-9,w=Math.round(Math.random()*(_>15?15:_)),x=this.randomUUID(_);return`${x.substring(0,w)}${u}${x.substring(w)}${w.toString(16)}`})),__publicField(this,\"parseStamp\",((s,i)=>{if(i&&!/t0|t[1-9]\\d{1,}/.test(i))throw new Error(\"Cannot extract date from a formated UUID with no timestamp in the format\");const u=i?i.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const i={$r:s=>[...Array(s)].map((()=>\"r\")).join(\"\"),$s:s=>[...Array(s)].map((()=>\"s\")).join(\"\"),$t:s=>[...Array(s)].map((()=>\"t\")).join(\"\")},u=s.slice(0,2),_=parseInt(s.slice(2),10);return i[u](_)})).replace(/^(.*?)(t{8,})(.*)$/g,((i,u,_)=>s.substring(u.length,u.length+_.length))):s;if(8===u.length)return new Date(1e3*parseInt(u,16));if(u.length<10)throw new Error(\"Stamp length invalid\");const _=parseInt(u.substring(u.length-1),16);return new Date(1e3*parseInt(u.substring(_,_+8),16))})),__publicField(this,\"setCounter\",(s=>{this.counter=s}));const i=__spreadValues(__spreadValues({},B),s);this.counter=0,this.debug=!1,this.dict=[],this.version=\"5.0.3\";const{dictionary:u,shuffle:_,length:w,counter:x}=i;return this.uuidLength=w,this.setDictionary(u,_),this.setCounter(x),this.debug=i.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};__publicField($,\"default\",$);var U,Y=$;return U=j,((_,x,j,P)=>{if(x&&\"object\"==typeof x||\"function\"==typeof x)for(let B of u(x))w.call(_,B)||B===j||s(_,B,{get:()=>x[B],enumerable:!(P=i(x,B))||P.enumerable});return _})(s({},\"__esModule\",{value:!0}),U)})();s.exports=i.default,\"undefined\"!=typeof window&&(i=i.default)},920:(s,i,u)=>{\"use strict\";var _=u(70453),w=u(38075),x=u(58859),j=_(\"%TypeError%\"),P=_(\"%WeakMap%\",!0),B=_(\"%Map%\",!0),$=w(\"WeakMap.prototype.get\",!0),U=w(\"WeakMap.prototype.set\",!0),Y=w(\"WeakMap.prototype.has\",!0),X=w(\"Map.prototype.get\",!0),Z=w(\"Map.prototype.set\",!0),ee=w(\"Map.prototype.has\",!0),listGetNode=function(s,i){for(var u,_=s;null!==(u=_.next);_=u)if(u.key===i)return _.next=u.next,u.next=s.next,s.next=u,u};s.exports=function getSideChannel(){var s,i,u,_={assert:function(s){if(!_.has(s))throw new j(\"Side channel does not contain \"+x(s))},get:function(_){if(P&&_&&(\"object\"==typeof _||\"function\"==typeof _)){if(s)return $(s,_)}else if(B){if(i)return X(i,_)}else if(u)return function(s,i){var u=listGetNode(s,i);return u&&u.value}(u,_)},has:function(_){if(P&&_&&(\"object\"==typeof _||\"function\"==typeof _)){if(s)return Y(s,_)}else if(B){if(i)return ee(i,_)}else if(u)return function(s,i){return!!listGetNode(s,i)}(u,_);return!1},set:function(_,w){P&&_&&(\"object\"==typeof _||\"function\"==typeof _)?(s||(s=new P),U(s,_,w)):B?(i||(i=new B),Z(i,_,w)):(u||(u={key:{},next:null}),function(s,i,u){var _=listGetNode(s,i);_?_.value=u:s.next={key:i,next:s.next,value:u}}(u,_,w))}};return _}},12646:s=>{!function(){\"use strict\";var i,u,_,w,x,j=\"properties\",P=\"deepProperties\",B=\"propertyDescriptors\",$=\"staticProperties\",U=\"staticDeepProperties\",Y=\"staticPropertyDescriptors\",X=\"configuration\",Z=\"deepConfiguration\",ee=\"deepProps\",ie=\"deepStatics\",ae=\"deepConf\",le=\"initializers\",ce=\"methods\",pe=\"composers\",de=\"compose\";function S(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s):[])}function r(s,i){return Array.prototype.slice.call(arguments,2).reduce(s,i)}var fe=r.bind(0,(function r(s,i){if(i)for(var u=S(i),_=0;_<u.length;_+=1)Object.defineProperty(s,u[_],Object.getOwnPropertyDescriptor(i,u[_]));return s}));function C(s){return\"function\"==typeof s}function N(s){return s&&\"object\"==typeof s||C(s)}function z(s){return s&&\"object\"==typeof s&&s.__proto__==Object.prototype}var ye=r.bind(0,(function r(s,u){if(u===i)return s;if(Array.isArray(u))return(Array.isArray(s)?s:[]).concat(u);if(!z(u))return u;for(var _,w,x=S(u),j=0;j<x.length;)_=x[j++],(w=Object.getOwnPropertyDescriptor(u,_)).hasOwnProperty(\"value\")?w.value!==i&&(s[_]=r(z(s[_])||Array.isArray(u[_])?s[_]:{},u[_])):Object.defineProperty(s,_,w);return s}));function I(){return(u=Array.prototype.concat.apply([],arguments).filter((function(s,i,u){return C(s)&&u.indexOf(s)===i}))).length?u:i}function e(s,i){function r(u,_){N(i[u])&&(N(s[u])||(s[u]={}),(_||fe)(s[u],i[u]))}function t(_){(u=I(s[_],i[_]))&&(s[_]=u)}return i&&N(i=i[de]||i)&&(r(ce),r(j),r(P,ye),r(B),r($),r(U,ye),r(Y),r(X),r(Z,ye),t(le),t(pe)),s}function R(){return function t(s){return u=function r(){return function r(s){var u,_,w=r[de]||{},x={__proto__:w[ce]},$=w[le],U=Array.prototype.slice.apply(arguments),Y=w[P];if(Y&&ye(x,Y),(Y=w[j])&&fe(x,Y),(Y=w[B])&&Object.defineProperties(x,Y),!$||!$.length)return x;for(s===i&&(s={}),w=0;w<$.length;)C(u=$[w++])&&(x=(_=u.call(x,s,{instance:x,stamp:r,args:U}))===i?x:_);return x}}(),(_=s[U])&&ye(u,_),(_=s[$])&&fe(u,_),(_=s[Y])&&Object.defineProperties(u,_),_=C(u[de])?u[de]:R,fe(u[de]=function(){return _.apply(this,arguments)},s),u}(Array.prototype.concat.apply([this],arguments).reduce(e,{}))}function V(s){return C(s)&&C(s[de])}var be={};function o(s,x){return function(){return(w={})[s]=x.apply(i,Array.prototype.concat.apply([{}],arguments)),((u=this)&&u[de]||_).call(u,w)}}be[ce]=o(ce,fe),be[j]=be.props=o(j,fe),be[le]=be.init=o(le,I),be[pe]=o(pe,I),be[P]=be[ee]=o(P,ye),be[$]=be.statics=o($,fe),be[U]=be[ie]=o(U,ye),be[X]=be.conf=o(X,fe),be[Z]=be[ae]=o(Z,ye),be[B]=o(B,fe),be[Y]=o(Y,fe),_=be[de]=fe((function r(){for(var s,be,_e=0,we=[],Se=arguments,xe=this;_e<Se.length;)N(s=Se[_e++])&&we.push(V(s)?s:((w={})[ce]=(be=s)[ce]||i,_=be.props,w[j]=N((u=be[j])||_)?fe({},_,u):i,w[le]=I(be.init,be[le]),w[pe]=I(be[pe]),_=be[ee],w[P]=N((u=be[P])||_)?ye({},_,u):i,w[B]=be[B],_=be.statics,w[$]=N((u=be[$])||_)?fe({},_,u):i,_=be[ie],w[U]=N((u=be[U])||_)?ye({},_,u):i,u=be[Y],w[Y]=N((_=be.name&&{name:{value:be.name}})||u)?fe({},u,_):i,_=be.conf,w[X]=N((u=be[X])||_)?fe({},_,u):i,_=be[ae],w[Z]=N((u=be[Z])||_)?ye({},_,u):i,w));if(s=R.apply(xe||x,we),xe&&we.unshift(xe),Array.isArray(Se=s[de][pe]))for(_e=0;_e<Se.length;)s=V(xe=Se[_e++]({stamp:s,composables:we}))?xe:s;return s}),be),be.create=function(){return this.apply(i,arguments)},(w={})[$]=be,x=R(w),_[de]=_.bind(),_.version=\"4.3.2\",\"object\"!=typeof i?s.exports=_:self.stampit=_}()},88310:(s,i,u)=>{s.exports=Stream;var _=u(37007).EventEmitter;function Stream(){_.call(this)}u(56698)(Stream,_),Stream.Readable=u(45412),Stream.Writable=u(16708),Stream.Duplex=u(25382),Stream.Transform=u(74610),Stream.PassThrough=u(63600),Stream.finished=u(86238),Stream.pipeline=u(57758),Stream.Stream=Stream,Stream.prototype.pipe=function(s,i){var u=this;function ondata(i){s.writable&&!1===s.write(i)&&u.pause&&u.pause()}function ondrain(){u.readable&&u.resume&&u.resume()}u.on(\"data\",ondata),s.on(\"drain\",ondrain),s._isStdio||i&&!1===i.end||(u.on(\"end\",onend),u.on(\"close\",onclose));var w=!1;function onend(){w||(w=!0,s.end())}function onclose(){w||(w=!0,\"function\"==typeof s.destroy&&s.destroy())}function onerror(s){if(cleanup(),0===_.listenerCount(this,\"error\"))throw s}function cleanup(){u.removeListener(\"data\",ondata),s.removeListener(\"drain\",ondrain),u.removeListener(\"end\",onend),u.removeListener(\"close\",onclose),u.removeListener(\"error\",onerror),s.removeListener(\"error\",onerror),u.removeListener(\"end\",cleanup),u.removeListener(\"close\",cleanup),s.removeListener(\"close\",cleanup)}return u.on(\"error\",onerror),s.on(\"error\",onerror),u.on(\"end\",cleanup),u.on(\"close\",cleanup),s.on(\"close\",cleanup),s.emit(\"pipe\",u),s}},83141:(s,i,u)=>{\"use strict\";var _=u(92861).Buffer,w=_.isEncoding||function(s){switch((s=\"\"+s)&&s.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(s){var i;switch(this.encoding=function normalizeEncoding(s){var i=function _normalizeEncoding(s){if(!s)return\"utf8\";for(var i;;)switch(s){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return s;default:if(i)return;s=(\"\"+s).toLowerCase(),i=!0}}(s);if(\"string\"!=typeof i&&(_.isEncoding===w||!w(s)))throw new Error(\"Unknown encoding: \"+s);return i||s}(s),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,i=4;break;case\"utf8\":this.fillLast=utf8FillLast,i=4;break;case\"base64\":this.text=base64Text,this.end=base64End,i=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(i)}function utf8CheckByte(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function utf8FillLast(s){var i=this.lastTotal-this.lastNeed,u=function utf8CheckExtraBytes(s,i,u){if(128!=(192&i[0]))return s.lastNeed=0,\"�\";if(s.lastNeed>1&&i.length>1){if(128!=(192&i[1]))return s.lastNeed=1,\"�\";if(s.lastNeed>2&&i.length>2&&128!=(192&i[2]))return s.lastNeed=2,\"�\"}}(this,s);return void 0!==u?u:this.lastNeed<=s.length?(s.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,i,0,s.length),void(this.lastNeed-=s.length))}function utf16Text(s,i){if((s.length-i)%2==0){var u=s.toString(\"utf16le\",i);if(u){var _=u.charCodeAt(u.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString(\"utf16le\",i,s.length-1)}function utf16End(s){var i=s&&s.length?this.write(s):\"\";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return i+this.lastChar.toString(\"utf16le\",0,u)}return i}function base64Text(s,i){var u=(s.length-i)%3;return 0===u?s.toString(\"base64\",i):(this.lastNeed=3-u,this.lastTotal=3,1===u?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString(\"base64\",i,s.length-u))}function base64End(s){var i=s&&s.length?this.write(s):\"\";return this.lastNeed?i+this.lastChar.toString(\"base64\",0,3-this.lastNeed):i}function simpleWrite(s){return s.toString(this.encoding)}function simpleEnd(s){return s&&s.length?this.write(s):\"\"}i.I=StringDecoder,StringDecoder.prototype.write=function(s){if(0===s.length)return\"\";var i,u;if(this.lastNeed){if(void 0===(i=this.fillLast(s)))return\"\";u=this.lastNeed,this.lastNeed=0}else u=0;return u<s.length?i?i+this.text(s,u):this.text(s,u):i||\"\"},StringDecoder.prototype.end=function utf8End(s){var i=s&&s.length?this.write(s):\"\";return this.lastNeed?i+\"�\":i},StringDecoder.prototype.text=function utf8Text(s,i){var u=function utf8CheckIncomplete(s,i,u){var _=i.length-1;if(_<u)return 0;var w=utf8CheckByte(i[_]);if(w>=0)return w>0&&(s.lastNeed=w-1),w;if(--_<u||-2===w)return 0;if(w=utf8CheckByte(i[_]),w>=0)return w>0&&(s.lastNeed=w-2),w;if(--_<u||-2===w)return 0;if(w=utf8CheckByte(i[_]),w>=0)return w>0&&(2===w?w=0:s.lastNeed=w-3),w;return 0}(this,s,i);if(!this.lastNeed)return s.toString(\"utf8\",i);this.lastTotal=u;var _=s.length-(u-this.lastNeed);return s.copy(this.lastChar,0,_),s.toString(\"utf8\",i,_)},StringDecoder.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},16426:s=>{s.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var i=document.activeElement,u=[],_=0;_<s.rangeCount;_++)u.push(s.getRangeAt(_));switch(i.tagName.toUpperCase()){case\"INPUT\":case\"TEXTAREA\":i.blur();break;default:i=null}return s.removeAllRanges(),function(){\"Caret\"===s.type&&s.removeAllRanges(),s.rangeCount||u.forEach((function(i){s.addRange(i)})),i&&i.focus()}}},36623:s=>{\"use strict\";function toS(s){return Object.prototype.toString.call(s)}var i=Array.isArray||function isArray(s){return\"[object Array]\"===Object.prototype.toString.call(s)};function forEach(s,i){if(s.forEach)return s.forEach(i);for(var u=0;u<s.length;u++)i(s[u],u,s)}var u=Object.keys||function keys(s){var i=[];for(var u in s)i.push(u);return i},_=Object.prototype.hasOwnProperty||function(s,i){return i in s};function copy(s){if(\"object\"==typeof s&&null!==s){var _;if(i(s))_=[];else if(function isDate(s){return\"[object Date]\"===toS(s)}(s))_=new Date(s.getTime?s.getTime():s);else if(function isRegExp(s){return\"[object RegExp]\"===toS(s)}(s))_=new RegExp(s);else if(function isError(s){return\"[object Error]\"===toS(s)}(s))_={message:s.message};else if(function isBoolean(s){return\"[object Boolean]\"===toS(s)}(s)||function isNumber(s){return\"[object Number]\"===toS(s)}(s)||function isString(s){return\"[object String]\"===toS(s)}(s))_=Object(s);else if(Object.create&&Object.getPrototypeOf)_=Object.create(Object.getPrototypeOf(s));else if(s.constructor===Object)_={};else{var w=s.constructor&&s.constructor.prototype||s.__proto__||{},x=function T(){};x.prototype=w,_=new x}return forEach(u(s),(function(i){_[i]=s[i]})),_}return s}function walk(s,w,x){var j=[],P=[],B=!0;return function walker(s){var $=x?copy(s):s,U={},Y=!0,X={node:$,node_:s,path:[].concat(j),parent:P[P.length-1],parents:P,key:j[j.length-1],isRoot:0===j.length,level:j.length,circular:null,update:function(s,i){X.isRoot||(X.parent.node[X.key]=s),X.node=s,i&&(Y=!1)},delete:function(s){delete X.parent.node[X.key],s&&(Y=!1)},remove:function(s){i(X.parent.node)?X.parent.node.splice(X.key,1):delete X.parent.node[X.key],s&&(Y=!1)},keys:null,before:function(s){U.before=s},after:function(s){U.after=s},pre:function(s){U.pre=s},post:function(s){U.post=s},stop:function(){B=!1},block:function(){Y=!1}};if(!B)return X;function updateState(){if(\"object\"==typeof X.node&&null!==X.node){X.keys&&X.node_===X.node||(X.keys=u(X.node)),X.isLeaf=0===X.keys.length;for(var i=0;i<P.length;i++)if(P[i].node_===s){X.circular=P[i];break}}else X.isLeaf=!0,X.keys=null;X.notLeaf=!X.isLeaf,X.notRoot=!X.isRoot}updateState();var Z=w.call(X,X.node);return void 0!==Z&&X.update&&X.update(Z),U.before&&U.before.call(X,X.node),Y?(\"object\"!=typeof X.node||null===X.node||X.circular||(P.push(X),updateState(),forEach(X.keys,(function(s,i){j.push(s),U.pre&&U.pre.call(X,X.node[s],s);var u=walker(X.node[s]);x&&_.call(X.node,s)&&(X.node[s]=u.node),u.isLast=i===X.keys.length-1,u.isFirst=0===i,U.post&&U.post.call(X,u),j.pop()})),P.pop()),U.after&&U.after.call(X,X.node),X):X}(s).node}function Traverse(s){this.value=s}function traverse(s){return new Traverse(s)}Traverse.prototype.get=function(s){for(var i=this.value,u=0;u<s.length;u++){var w=s[u];if(!i||!_.call(i,w))return;i=i[w]}return i},Traverse.prototype.has=function(s){for(var i=this.value,u=0;u<s.length;u++){var w=s[u];if(!i||!_.call(i,w))return!1;i=i[w]}return!0},Traverse.prototype.set=function(s,i){for(var u=this.value,w=0;w<s.length-1;w++){var x=s[w];_.call(u,x)||(u[x]={}),u=u[x]}return u[s[w]]=i,i},Traverse.prototype.map=function(s){return walk(this.value,s,!0)},Traverse.prototype.forEach=function(s){return this.value=walk(this.value,s,!1),this.value},Traverse.prototype.reduce=function(s,i){var u=1===arguments.length,_=u?this.value:i;return this.forEach((function(i){this.isRoot&&u||(_=s.call(this,_,i))})),_},Traverse.prototype.paths=function(){var s=[];return this.forEach((function(){s.push(this.path)})),s},Traverse.prototype.nodes=function(){var s=[];return this.forEach((function(){s.push(this.node)})),s},Traverse.prototype.clone=function(){var s=[],i=[];return function clone(_){for(var w=0;w<s.length;w++)if(s[w]===_)return i[w];if(\"object\"==typeof _&&null!==_){var x=copy(_);return s.push(_),i.push(x),forEach(u(_),(function(s){x[s]=clone(_[s])})),s.pop(),i.pop(),x}return _}(this.value)},forEach(u(Traverse.prototype),(function(s){traverse[s]=function(i){var u=[].slice.call(arguments,1),_=new Traverse(i);return _[s].apply(_,u)}})),s.exports=traverse},61160:(s,i,u)=>{\"use strict\";var _=u(92063),w=u(73992),x=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,j=/[\\n\\r\\t]/g,P=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,B=/:\\d+$/,$=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,U=/^[a-zA-Z]:/;function trimLeft(s){return(s||\"\").toString().replace(x,\"\")}var Y=[[\"#\",\"hash\"],[\"?\",\"query\"],function sanitize(s,i){return isSpecial(i.protocol)?s.replace(/\\\\/g,\"/\"):s},[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],X={hash:1,query:1};function lolcation(s){var i,_=(\"undefined\"!=typeof window?window:void 0!==u.g?u.g:\"undefined\"!=typeof self?self:{}).location||{},w={},x=typeof(s=s||_);if(\"blob:\"===s.protocol)w=new Url(unescape(s.pathname),{});else if(\"string\"===x)for(i in w=new Url(s,{}),X)delete w[i];else if(\"object\"===x){for(i in s)i in X||(w[i]=s[i]);void 0===w.slashes&&(w.slashes=P.test(s.href))}return w}function isSpecial(s){return\"file:\"===s||\"ftp:\"===s||\"http:\"===s||\"https:\"===s||\"ws:\"===s||\"wss:\"===s}function extractProtocol(s,i){s=(s=trimLeft(s)).replace(j,\"\"),i=i||{};var u,_=$.exec(s),w=_[1]?_[1].toLowerCase():\"\",x=!!_[2],P=!!_[3],B=0;return x?P?(u=_[2]+_[3]+_[4],B=_[2].length+_[3].length):(u=_[2]+_[4],B=_[2].length):P?(u=_[3]+_[4],B=_[3].length):u=_[4],\"file:\"===w?B>=2&&(u=u.slice(2)):isSpecial(w)?u=_[4]:w?x&&(u=u.slice(2)):B>=2&&isSpecial(i.protocol)&&(u=_[4]),{protocol:w,slashes:x||isSpecial(w),slashesCount:B,rest:u}}function Url(s,i,u){if(s=(s=trimLeft(s)).replace(j,\"\"),!(this instanceof Url))return new Url(s,i,u);var x,P,B,$,X,Z,ee=Y.slice(),ie=typeof i,ae=this,le=0;for(\"object\"!==ie&&\"string\"!==ie&&(u=i,i=null),u&&\"function\"!=typeof u&&(u=w.parse),x=!(P=extractProtocol(s||\"\",i=lolcation(i))).protocol&&!P.slashes,ae.slashes=P.slashes||x&&i.slashes,ae.protocol=P.protocol||i.protocol||\"\",s=P.rest,(\"file:\"===P.protocol&&(2!==P.slashesCount||U.test(s))||!P.slashes&&(P.protocol||P.slashesCount<2||!isSpecial(ae.protocol)))&&(ee[3]=[/(.*)/,\"pathname\"]);le<ee.length;le++)\"function\"!=typeof($=ee[le])?(B=$[0],Z=$[1],B!=B?ae[Z]=s:\"string\"==typeof B?~(X=\"@\"===B?s.lastIndexOf(B):s.indexOf(B))&&(\"number\"==typeof $[2]?(ae[Z]=s.slice(0,X),s=s.slice(X+$[2])):(ae[Z]=s.slice(X),s=s.slice(0,X))):(X=B.exec(s))&&(ae[Z]=X[1],s=s.slice(0,X.index)),ae[Z]=ae[Z]||x&&$[3]&&i[Z]||\"\",$[4]&&(ae[Z]=ae[Z].toLowerCase())):s=$(s,ae);u&&(ae.query=u(ae.query)),x&&i.slashes&&\"/\"!==ae.pathname.charAt(0)&&(\"\"!==ae.pathname||\"\"!==i.pathname)&&(ae.pathname=function resolve(s,i){if(\"\"===s)return i;for(var u=(i||\"/\").split(\"/\").slice(0,-1).concat(s.split(\"/\")),_=u.length,w=u[_-1],x=!1,j=0;_--;)\".\"===u[_]?u.splice(_,1):\"..\"===u[_]?(u.splice(_,1),j++):j&&(0===_&&(x=!0),u.splice(_,1),j--);return x&&u.unshift(\"\"),\".\"!==w&&\"..\"!==w||u.push(\"\"),u.join(\"/\")}(ae.pathname,i.pathname)),\"/\"!==ae.pathname.charAt(0)&&isSpecial(ae.protocol)&&(ae.pathname=\"/\"+ae.pathname),_(ae.port,ae.protocol)||(ae.host=ae.hostname,ae.port=\"\"),ae.username=ae.password=\"\",ae.auth&&(~(X=ae.auth.indexOf(\":\"))?(ae.username=ae.auth.slice(0,X),ae.username=encodeURIComponent(decodeURIComponent(ae.username)),ae.password=ae.auth.slice(X+1),ae.password=encodeURIComponent(decodeURIComponent(ae.password))):ae.username=encodeURIComponent(decodeURIComponent(ae.auth)),ae.auth=ae.password?ae.username+\":\"+ae.password:ae.username),ae.origin=\"file:\"!==ae.protocol&&isSpecial(ae.protocol)&&ae.host?ae.protocol+\"//\"+ae.host:\"null\",ae.href=ae.toString()}Url.prototype={set:function set(s,i,u){var x=this;switch(s){case\"query\":\"string\"==typeof i&&i.length&&(i=(u||w.parse)(i)),x[s]=i;break;case\"port\":x[s]=i,_(i,x.protocol)?i&&(x.host=x.hostname+\":\"+i):(x.host=x.hostname,x[s]=\"\");break;case\"hostname\":x[s]=i,x.port&&(i+=\":\"+x.port),x.host=i;break;case\"host\":x[s]=i,B.test(i)?(i=i.split(\":\"),x.port=i.pop(),x.hostname=i.join(\":\")):(x.hostname=i,x.port=\"\");break;case\"protocol\":x.protocol=i.toLowerCase(),x.slashes=!u;break;case\"pathname\":case\"hash\":if(i){var j=\"pathname\"===s?\"/\":\"#\";x[s]=i.charAt(0)!==j?j+i:i}else x[s]=i;break;case\"username\":case\"password\":x[s]=encodeURIComponent(i);break;case\"auth\":var P=i.indexOf(\":\");~P?(x.username=i.slice(0,P),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=i.slice(P+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(i))}for(var $=0;$<Y.length;$++){var U=Y[$];U[4]&&(x[U[1]]=x[U[1]].toLowerCase())}return x.auth=x.password?x.username+\":\"+x.password:x.username,x.origin=\"file:\"!==x.protocol&&isSpecial(x.protocol)&&x.host?x.protocol+\"//\"+x.host:\"null\",x.href=x.toString(),x},toString:function toString(s){s&&\"function\"==typeof s||(s=w.stringify);var i,u=this,_=u.host,x=u.protocol;x&&\":\"!==x.charAt(x.length-1)&&(x+=\":\");var j=x+(u.protocol&&u.slashes||isSpecial(u.protocol)?\"//\":\"\");return u.username?(j+=u.username,u.password&&(j+=\":\"+u.password),j+=\"@\"):u.password?(j+=\":\"+u.password,j+=\"@\"):\"file:\"!==u.protocol&&isSpecial(u.protocol)&&!_&&\"/\"!==u.pathname&&(j+=\"@\"),(\":\"===_[_.length-1]||B.test(u.hostname)&&!u.port)&&(_+=\":\"),j+=_+u.pathname,(i=\"object\"==typeof u.query?s(u.query):u.query)&&(j+=\"?\"!==i.charAt(0)?\"?\"+i:i),u.hash&&(j+=u.hash),j}},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=w,s.exports=Url},77154:(s,i,u)=>{\"use strict\";var _=u(96540);var w=\"function\"==typeof Object.is?Object.is:function n(s,i){return s===i&&(0!==s||1/s==1/i)||s!=s&&i!=i},x=_.useSyncExternalStore,j=_.useRef,P=_.useEffect,B=_.useMemo,$=_.useDebugValue;i.useSyncExternalStoreWithSelector=function(s,i,u,_,U){var Y=j(null);if(null===Y.current){var X={hasValue:!1,value:null};Y.current=X}else X=Y.current;Y=B((function(){function a(i){if(!j){if(j=!0,s=i,i=_(i),void 0!==U&&X.hasValue){var u=X.value;if(U(u,i))return x=u}return x=i}if(u=x,w(s,i))return u;var P=_(i);return void 0!==U&&U(u,P)?u:(s=i,x=P)}var s,x,j=!1,P=void 0===u?null:u;return[function(){return a(i())},null===P?void 0:function(){return a(P())}]}),[i,u,_,U]);var Z=x(s,Y[0],Y[1]);return P((function(){X.hasValue=!0,X.value=Z}),[Z]),$(Z),Z}},78418:(s,i,u)=>{\"use strict\";s.exports=u(77154)},94643:(s,i,u)=>{function config(s){try{if(!u.g.localStorage)return!1}catch(s){return!1}var i=u.g.localStorage[s];return null!=i&&\"true\"===String(i).toLowerCase()}s.exports=function deprecate(s,i){if(config(\"noDeprecation\"))return s;var u=!1;return function deprecated(){if(!u){if(config(\"throwDeprecation\"))throw new Error(i);config(\"traceDeprecation\")?console.trace(i):console.warn(i),u=!0}return s.apply(this,arguments)}}},26657:(s,i,u)=>{\"use strict\";var _=u(75208),w=function isClosingTag(s){return/<\\/+[^>]+>/.test(s)},x=function isSelfClosingTag(s){return/<[^>]+\\/>/.test(s)},j=function isOpeningTag(s){return function isTag(s){return/<[^>!]+>/.test(s)}(s)&&!w(s)&&!x(s)};function getType(s){return w(s)?\"ClosingTag\":j(s)?\"OpeningTag\":x(s)?\"SelfClosingTag\":\"Text\"}s.exports=function(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=i.indentor,w=i.textNodesOnSameLine,x=0,j=[];u=u||\"    \";var P=function lexer(s){return function splitOnTags(s){return s.split(/(<\\/?[^>]+>)/g).filter((function(s){return\"\"!==s.trim()}))}(s).map((function(s){return{value:s,type:getType(s)}}))}(s).map((function(s,i,P){var B=s.value,$=s.type;\"ClosingTag\"===$&&x--;var U=_(u,x),Y=U+B;if(\"OpeningTag\"===$&&x++,w){var X=P[i-1],Z=P[i-2];\"ClosingTag\"===$&&\"Text\"===X.type&&\"OpeningTag\"===Z.type&&(Y=\"\"+U+Z.value+X.value+B,j.push(i-2,i-1))}return Y}));return j.forEach((function(s){return P[s]=null})),P.filter((function(s){return!!s})).join(\"\\n\")}},31499:s=>{var i={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};s.exports=function escapeForXML(s){return s&&s.replace?s.replace(/([&\"<>'])/g,(function(s,u){return i[u]})):s}},19123:(s,i,u)=>{var _=u(65606),w=u(31499),x=u(88310).Stream;function resolve(s,i,u){var _,x=function create_indent(s,i){return new Array(i||0).join(s||\"\")}(i,u=u||0),j=s;if(\"object\"==typeof s&&((j=s[_=Object.keys(s)[0]])&&j._elem))return j._elem.name=_,j._elem.icount=u,j._elem.indent=i,j._elem.indents=x,j._elem.interrupt=j,j._elem;var P,B=[],$=[];function get_attributes(s){Object.keys(s).forEach((function(i){B.push(function attribute(s,i){return s+'=\"'+w(i)+'\"'}(i,s[i]))}))}switch(typeof j){case\"object\":if(null===j)break;j._attr&&get_attributes(j._attr),j._cdata&&$.push((\"<![CDATA[\"+j._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),j.forEach&&(P=!1,$.push(\"\"),j.forEach((function(s){\"object\"==typeof s?\"_attr\"==Object.keys(s)[0]?get_attributes(s._attr):$.push(resolve(s,i,u+1)):($.pop(),P=!0,$.push(w(s)))})),P||$.push(\"\"));break;default:$.push(w(j))}return{name:_,interrupt:!1,attributes:B,content:$,icount:u,indents:x,indent:i}}function format(s,i,u){if(\"object\"!=typeof i)return s(!1,i);var _=i.interrupt?1:i.content.length;function proceed(){for(;i.content.length;){var w=i.content.shift();if(void 0!==w){if(interrupt(w))return;format(s,w)}}s(!1,(_>1?i.indents:\"\")+(i.name?\"</\"+i.name+\">\":\"\")+(i.indent&&!u?\"\\n\":\"\")),u&&u()}function interrupt(i){return!!i.interrupt&&(i.interrupt.append=s,i.interrupt.end=proceed,i.interrupt=!1,s(!0),!0)}if(s(!1,i.indents+(i.name?\"<\"+i.name:\"\")+(i.attributes.length?\" \"+i.attributes.join(\" \"):\"\")+(_?i.name?\">\":\"\":i.name?\"/>\":\"\")+(i.indent&&_>1?\"\\n\":\"\")),!_)return s(!1,i.indent?\"\\n\":\"\");interrupt(i)||proceed()}s.exports=function xml(s,i){\"object\"!=typeof i&&(i={indent:i});var u=i.stream?new x:null,w=\"\",j=!1,P=i.indent?!0===i.indent?\"    \":i.indent:\"\",B=!0;function delay(s){B?_.nextTick(s):s()}function append(s,i){if(void 0!==i&&(w+=i),s&&!j&&(u=u||new x,j=!0),s&&j){var _=w;delay((function(){u.emit(\"data\",_)})),w=\"\"}}function add(s,i){format(append,resolve(s,P,P?1:0),i)}function end(){if(u){var s=w;delay((function(){u.emit(\"data\",s),u.emit(\"end\"),u.readable=!1,u.emit(\"close\")}))}}return delay((function(){B=!1})),i.declaration&&function addXmlDeclaration(s){var i={version:\"1.0\",encoding:s.encoding||\"UTF-8\"};s.standalone&&(i.standalone=s.standalone),add({\"?xml\":{_attr:i}}),w=w.replace(\"/>\",\"?>\")}(i.declaration),s&&s.forEach?s.forEach((function(i,u){var _;u+1===s.length&&(_=end),add(i,_)})):add(s,end),u?(u.readable=!0,u):w},s.exports.element=s.exports.Element=function element(){var s={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(s){if(!this.append)throw new Error(\"not assigned to a parent!\");var i=this,u=this._elem.indent;format(this.append,resolve(s,u,this._elem.icount+(u?1:0)),(function(){i.append(!0)}))},close:function(s){void 0!==s&&this.push(s),this.end&&this.end()}};return s}},86215:function(s,i){var u,_,w;_=[],u=function(){\"use strict\";var isNativeSmoothScrollEnabledOn=function(s){return s&&\"getComputedStyle\"in window&&\"smooth\"===window.getComputedStyle(s)[\"scroll-behavior\"]};if(\"undefined\"==typeof window||!(\"document\"in window))return{};var makeScroller=function(s,i,u){var _;i=i||999,u||0===u||(u=9);var setScrollTimeoutId=function(s){_=s},stopScroll=function(){clearTimeout(_),setScrollTimeoutId(0)},getTopWithEdgeOffset=function(i){return Math.max(0,s.getTopOf(i)-u)},scrollToY=function(u,_,w){if(stopScroll(),0===_||_&&_<0||isNativeSmoothScrollEnabledOn(s.body))s.toY(u),w&&w();else{var x=s.getY(),j=Math.max(0,u)-x,P=(new Date).getTime();_=_||Math.min(Math.abs(j),i),function loopScroll(){setScrollTimeoutId(setTimeout((function(){var i=Math.min(1,((new Date).getTime()-P)/_),u=Math.max(0,Math.floor(x+j*(i<.5?2*i*i:i*(4-2*i)-1)));s.toY(u),i<1&&s.getHeight()+u<s.body.scrollHeight?loopScroll():(setTimeout(stopScroll,99),w&&w())}),9))}()}},scrollToElem=function(s,i,u){scrollToY(getTopWithEdgeOffset(s),i,u)},scrollIntoView=function(i,_,w){var x=i.getBoundingClientRect().height,j=s.getTopOf(i)+x,P=s.getHeight(),B=s.getY(),$=B+P;getTopWithEdgeOffset(i)<B||x+u>P?scrollToElem(i,_,w):j+u>$?scrollToY(j-P+u,_,w):w&&w()},scrollToCenterOf=function(i,u,_,w){scrollToY(Math.max(0,s.getTopOf(i)-s.getHeight()/2+(_||i.getBoundingClientRect().height/2)),u,w)};return{setup:function(s,_){return(0===s||s)&&(i=s),(0===_||_)&&(u=_),{defaultDuration:i,edgeOffset:u}},to:scrollToElem,toY:scrollToY,intoView:scrollIntoView,center:scrollToCenterOf,stop:stopScroll,moving:function(){return!!_},getY:s.getY,getTopOf:s.getTopOf}},s=document.documentElement,getDocY=function(){return window.scrollY||s.scrollTop},i=makeScroller({body:document.scrollingElement||document.body,toY:function(s){window.scrollTo(0,s)},getY:getDocY,getHeight:function(){return window.innerHeight||s.clientHeight},getTopOf:function(i){return i.getBoundingClientRect().top+getDocY()-s.offsetTop}});if(i.createScroller=function(i,u,_){return makeScroller({body:i,toY:function(s){i.scrollTop=s},getY:function(){return i.scrollTop},getHeight:function(){return Math.min(i.clientHeight,window.innerHeight||s.clientHeight)},getTopOf:function(s){return s.offsetTop}},u,_)},\"addEventListener\"in window&&!window.noZensmooth&&!isNativeSmoothScrollEnabledOn(document.body)){var u=\"history\"in window&&\"pushState\"in history,_=u&&\"scrollRestoration\"in history;_&&(history.scrollRestoration=\"auto\"),window.addEventListener(\"load\",(function(){_&&(setTimeout((function(){history.scrollRestoration=\"manual\"}),9),window.addEventListener(\"popstate\",(function(s){s.state&&\"zenscrollY\"in s.state&&i.toY(s.state.zenscrollY)}),!1)),window.location.hash&&setTimeout((function(){var s=i.setup().edgeOffset;if(s){var u=document.getElementById(window.location.href.split(\"#\")[1]);if(u){var _=Math.max(0,i.getTopOf(u)-s),w=i.getY()-_;0<=w&&w<9&&window.scrollTo(0,_)}}}),9)}),!1);var w=new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\");window.addEventListener(\"click\",(function(s){for(var x=s.target;x&&\"A\"!==x.tagName;)x=x.parentNode;if(!(!x||1!==s.which||s.shiftKey||s.metaKey||s.ctrlKey||s.altKey)){if(_){var j=history.state&&\"object\"==typeof history.state?history.state:{};j.zenscrollY=i.getY();try{history.replaceState(j,\"\")}catch(s){}}var P=x.getAttribute(\"href\")||\"\";if(0===P.indexOf(\"#\")&&!w.test(x.className)){var B=0,$=document.getElementById(P.substring(1));if(\"#\"!==P){if(!$)return;B=i.getTopOf($)}s.preventDefault();var onDone=function(){window.location=P},U=i.setup().edgeOffset;U&&(B=Math.max(0,B-U),u&&(onDone=function(){history.pushState({},\"\",P)})),i.toY(B,null,onDone)}}}),!1)}return i}(),void 0===(w=\"function\"==typeof u?u.apply(i,_):u)||(s.exports=w)},42634:()=>{},15340:()=>{},79838:()=>{},48675:(s,i,u)=>{s.exports=u(20850)},7666:(s,i,u)=>{var _=u(84851),w=u(953);function _extends(){var i;return s.exports=_extends=_?w(i=_).call(i):function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},s.exports.__esModule=!0,s.exports.default=s.exports,_extends.apply(this,arguments)}s.exports=_extends,s.exports.__esModule=!0,s.exports.default=s.exports},46942:(s,i)=>{var u;!function(){\"use strict\";var _={}.hasOwnProperty;function classNames(){for(var s=\"\",i=0;i<arguments.length;i++){var u=arguments[i];u&&(s=appendClass(s,parseValue(u)))}return s}function parseValue(s){if(\"string\"==typeof s||\"number\"==typeof s)return s;if(\"object\"!=typeof s)return\"\";if(Array.isArray(s))return classNames.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var i=\"\";for(var u in s)_.call(s,u)&&s[u]&&(i=appendClass(i,u));return i}function appendClass(s,i){return i?s?s+\" \"+i:s+i:s}s.exports?(classNames.default=classNames,s.exports=classNames):void 0===(u=function(){return classNames}.apply(i,[]))||(s.exports=u)}()},68623:(s,i,u)=>{\"use strict\";var _=u(694);s.exports=_},93700:(s,i,u)=>{\"use strict\";var _=u(19709);s.exports=_},462:(s,i,u)=>{\"use strict\";var _=u(40975);s.exports=_},37257:(s,i,u)=>{\"use strict\";u(96605),u(64502),u(36371),u(99363),u(7057);var _=u(92046);s.exports=_.AggregateError},32567:(s,i,u)=>{\"use strict\";u(79307);var _=u(61747);s.exports=_(\"Function\",\"bind\")},23034:(s,i,u)=>{\"use strict\";var _=u(88280),w=u(32567),x=Function.prototype;s.exports=function(s){var i=s.bind;return s===x||_(x,s)&&i===x.bind?w:i}},9748:(s,i,u)=>{\"use strict\";u(71340);var _=u(92046);s.exports=_.Object.assign},20850:(s,i,u)=>{\"use strict\";s.exports=u(46076)},953:(s,i,u)=>{\"use strict\";s.exports=u(53375)},84851:(s,i,u)=>{\"use strict\";s.exports=u(85401)},46076:(s,i,u)=>{\"use strict\";u(91599);var _=u(68623);s.exports=_},53375:(s,i,u)=>{\"use strict\";var _=u(93700);s.exports=_},85401:(s,i,u)=>{\"use strict\";var _=u(462);s.exports=_},82159:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(4640),x=TypeError;s.exports=function(s){if(_(s))return s;throw new x(w(s)+\" is not a function\")}},10043:(s,i,u)=>{\"use strict\";var _=u(62250),w=String,x=TypeError;s.exports=function(s){if(\"object\"==typeof s||_(s))return s;throw new x(\"Can't set \"+w(s)+\" as a prototype\")}},42156:s=>{\"use strict\";s.exports=function(){}},36624:(s,i,u)=>{\"use strict\";var _=u(46285),w=String,x=TypeError;s.exports=function(s){if(_(s))return s;throw new x(w(s)+\" is not an object\")}},74436:(s,i,u)=>{\"use strict\";var _=u(4993),w=u(34849),x=u(20575),createMethod=function(s){return function(i,u,j){var P,B=_(i),$=x(B),U=w(j,$);if(s&&u!=u){for(;$>U;)if((P=B[U++])!=P)return!0}else for(;$>U;U++)if((s||U in B)&&B[U]===u)return s||U||0;return!s&&-1}};s.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},93427:(s,i,u)=>{\"use strict\";var _=u(1907);s.exports=_([].slice)},45807:(s,i,u)=>{\"use strict\";var _=u(1907),w=_({}.toString),x=_(\"\".slice);s.exports=function(s){return x(w(s),8,-1)}},73948:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(62250),x=u(45807),j=u(76264)(\"toStringTag\"),P=Object,B=\"Arguments\"===x(function(){return arguments}());s.exports=_?x:function(s){var i,u,_;return void 0===s?\"Undefined\":null===s?\"Null\":\"string\"==typeof(u=function(s,i){try{return s[i]}catch(s){}}(i=P(s),j))?u:B?x(i):\"Object\"===(_=x(i))&&w(i.callee)?\"Arguments\":_}},19595:(s,i,u)=>{\"use strict\";var _=u(49724),w=u(11042),x=u(13846),j=u(74284);s.exports=function(s,i,u){for(var P=w(i),B=j.f,$=x.f,U=0;U<P.length;U++){var Y=P[U];_(s,Y)||u&&_(u,Y)||B(s,Y,$(i,Y))}}},57382:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},59550:s=>{\"use strict\";s.exports=function(s,i){return{value:s,done:i}}},61626:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(74284),x=u(75817);s.exports=_?function(s,i,u){return w.f(s,i,x(1,u))}:function(s,i,u){return s[i]=u,s}},75817:s=>{\"use strict\";s.exports=function(s,i){return{enumerable:!(1&s),configurable:!(2&s),writable:!(4&s),value:i}}},68055:(s,i,u)=>{\"use strict\";var _=u(61626);s.exports=function(s,i,u,w){return w&&w.enumerable?s[i]=u:_(s,i,u),s}},2532:(s,i,u)=>{\"use strict\";var _=u(41010),w=Object.defineProperty;s.exports=function(s,i){try{w(_,s,{value:i,configurable:!0,writable:!0})}catch(u){_[s]=i}return i}},39447:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},97882:s=>{\"use strict\";var i=\"object\"==typeof document&&document.all,u=void 0===i&&void 0!==i;s.exports={all:i,IS_HTMLDDA:u}},49552:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(46285),x=_.document,j=w(x)&&w(x.createElement);s.exports=function(s){return j?x.createElement(s):{}}},19287:s=>{\"use strict\";s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},64723:s=>{\"use strict\";s.exports=\"undefined\"!=typeof navigator&&String(navigator.userAgent)||\"\"},15683:(s,i,u)=>{\"use strict\";var _,w,x=u(41010),j=u(64723),P=x.process,B=x.Deno,$=P&&P.versions||B&&B.version,U=$&&$.v8;U&&(w=(_=U.split(\".\"))[0]>0&&_[0]<4?1:+(_[0]+_[1])),!w&&j&&(!(_=j.match(/Edge\\/(\\d+)/))||_[1]>=74)&&(_=j.match(/Chrome\\/(\\d+)/))&&(w=+_[1]),s.exports=w},80376:s=>{\"use strict\";s.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},85762:(s,i,u)=>{\"use strict\";var _=u(1907),w=Error,x=_(\"\".replace),j=String(new w(\"zxcasd\").stack),P=/\\n\\s*at [^:]*:[^\\n]*/,B=P.test(j);s.exports=function(s,i){if(B&&\"string\"==typeof s&&!w.prepareStackTrace)for(;i--;)s=x(s,P,\"\");return s}},85884:(s,i,u)=>{\"use strict\";var _=u(61626),w=u(85762),x=u(23888),j=Error.captureStackTrace;s.exports=function(s,i,u,P){x&&(j?j(s,i):_(s,\"stack\",w(u,P)))}},23888:(s,i,u)=>{\"use strict\";var _=u(98828),w=u(75817);s.exports=!_((function(){var s=new Error(\"a\");return!(\"stack\"in s)||(Object.defineProperty(s,\"stack\",w(1,7)),7!==s.stack)}))},11091:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(76024),x=u(92361),j=u(62250),P=u(13846).f,B=u(7463),$=u(92046),U=u(28311),Y=u(61626),X=u(49724),wrapConstructor=function(s){var Wrapper=function(i,u,_){if(this instanceof Wrapper){switch(arguments.length){case 0:return new s;case 1:return new s(i);case 2:return new s(i,u)}return new s(i,u,_)}return w(s,this,arguments)};return Wrapper.prototype=s.prototype,Wrapper};s.exports=function(s,i){var u,w,Z,ee,ie,ae,le,ce,pe,de=s.target,fe=s.global,ye=s.stat,be=s.proto,_e=fe?_:ye?_[de]:(_[de]||{}).prototype,we=fe?$:$[de]||Y($,de,{})[de],Se=we.prototype;for(ee in i)w=!(u=B(fe?ee:de+(ye?\".\":\"#\")+ee,s.forced))&&_e&&X(_e,ee),ae=we[ee],w&&(le=s.dontCallGetSet?(pe=P(_e,ee))&&pe.value:_e[ee]),ie=w&&le?le:i[ee],w&&typeof ae==typeof ie||(ce=s.bind&&w?U(ie,_):s.wrap&&w?wrapConstructor(ie):be&&j(ie)?x(ie):ie,(s.sham||ie&&ie.sham||ae&&ae.sham)&&Y(ce,\"sham\",!0),Y(we,ee,ce),be&&(X($,Z=de+\"Prototype\")||Y($,Z,{}),Y($[Z],ee,ie),s.real&&Se&&(u||!Se[ee])&&Y(Se,ee,ie)))}},98828:s=>{\"use strict\";s.exports=function(s){try{return!!s()}catch(s){return!0}}},76024:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype,x=w.apply,j=w.call;s.exports=\"object\"==typeof Reflect&&Reflect.apply||(_?j.bind(x):function(){return j.apply(x,arguments)})},28311:(s,i,u)=>{\"use strict\";var _=u(92361),w=u(82159),x=u(41505),j=_(_.bind);s.exports=function(s,i){return w(s),void 0===i?s:x?j(s,i):function(){return s.apply(i,arguments)}}},41505:(s,i,u)=>{\"use strict\";var _=u(98828);s.exports=!_((function(){var s=function(){}.bind();return\"function\"!=typeof s||s.hasOwnProperty(\"prototype\")}))},44673:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(82159),x=u(46285),j=u(49724),P=u(93427),B=u(41505),$=Function,U=_([].concat),Y=_([].join),X={};s.exports=B?$.bind:function bind(s){var i=w(this),u=i.prototype,_=P(arguments,1),B=function bound(){var u=U(_,P(arguments));return this instanceof B?function(s,i,u){if(!j(X,i)){for(var _=[],w=0;w<i;w++)_[w]=\"a[\"+w+\"]\";X[i]=$(\"C,a\",\"return new C(\"+Y(_,\",\")+\")\")}return X[i](s,u)}(i,u.length,u):i.apply(s,u)};return x(u)&&(B.prototype=u),B}},13930:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype.call;s.exports=_?w.bind(w):function(){return w.apply(w,arguments)}},36833:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(49724),x=Function.prototype,j=_&&Object.getOwnPropertyDescriptor,P=w(x,\"name\"),B=P&&\"something\"===function something(){}.name,$=P&&(!_||_&&j(x,\"name\").configurable);s.exports={EXISTS:P,PROPER:B,CONFIGURABLE:$}},51871:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(82159);s.exports=function(s,i,u){try{return _(w(Object.getOwnPropertyDescriptor(s,i)[u]))}catch(s){}}},92361:(s,i,u)=>{\"use strict\";var _=u(45807),w=u(1907);s.exports=function(s){if(\"Function\"===_(s))return w(s)}},1907:(s,i,u)=>{\"use strict\";var _=u(41505),w=Function.prototype,x=w.call,j=_&&w.bind.bind(x,x);s.exports=_?j:function(s){return function(){return x.apply(s,arguments)}}},61747:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(92046);s.exports=function(s,i){var u=w[s+\"Prototype\"],x=u&&u[i];if(x)return x;var j=_[s],P=j&&j.prototype;return P&&P[i]}},85582:(s,i,u)=>{\"use strict\";var _=u(92046),w=u(41010),x=u(62250),aFunction=function(s){return x(s)?s:void 0};s.exports=function(s,i){return arguments.length<2?aFunction(_[s])||aFunction(w[s]):_[s]&&_[s][i]||w[s]&&w[s][i]}},73448:(s,i,u)=>{\"use strict\";var _=u(73948),w=u(29367),x=u(87136),j=u(93742),P=u(76264)(\"iterator\");s.exports=function(s){if(!x(s))return w(s,P)||w(s,\"@@iterator\")||j[_(s)]}},10300:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(82159),x=u(36624),j=u(4640),P=u(73448),B=TypeError;s.exports=function(s,i){var u=arguments.length<2?P(s):i;if(w(u))return x(_(u,s));throw new B(j(s)+\" is not iterable\")}},29367:(s,i,u)=>{\"use strict\";var _=u(82159),w=u(87136);s.exports=function(s,i){var u=s[i];return w(u)?void 0:_(u)}},41010:function(s,i,u){\"use strict\";var check=function(s){return s&&s.Math===Math&&s};s.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof u.g&&u.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},49724:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(39298),x=_({}.hasOwnProperty);s.exports=Object.hasOwn||function hasOwn(s,i){return x(w(s),i)}},38530:s=>{\"use strict\";s.exports={}},62416:(s,i,u)=>{\"use strict\";var _=u(85582);s.exports=_(\"document\",\"documentElement\")},73648:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(98828),x=u(49552);s.exports=!_&&!w((function(){return 7!==Object.defineProperty(x(\"div\"),\"a\",{get:function(){return 7}}).a}))},16946:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(98828),x=u(45807),j=Object,P=_(\"\".split);s.exports=w((function(){return!j(\"z\").propertyIsEnumerable(0)}))?function(s){return\"String\"===x(s)?P(s,\"\"):j(s)}:j},34084:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(46285),x=u(79192);s.exports=function(s,i,u){var j,P;return x&&_(j=i.constructor)&&j!==u&&w(P=j.prototype)&&P!==u.prototype&&x(s,P),s}},39259:(s,i,u)=>{\"use strict\";var _=u(46285),w=u(61626);s.exports=function(s,i){_(i)&&\"cause\"in i&&w(s,\"cause\",i.cause)}},64932:(s,i,u)=>{\"use strict\";var _,w,x,j=u(40551),P=u(41010),B=u(46285),$=u(61626),U=u(49724),Y=u(36128),X=u(92522),Z=u(38530),ee=\"Object already initialized\",ie=P.TypeError,ae=P.WeakMap;if(j||Y.state){var le=Y.state||(Y.state=new ae);le.get=le.get,le.has=le.has,le.set=le.set,_=function(s,i){if(le.has(s))throw new ie(ee);return i.facade=s,le.set(s,i),i},w=function(s){return le.get(s)||{}},x=function(s){return le.has(s)}}else{var ce=X(\"state\");Z[ce]=!0,_=function(s,i){if(U(s,ce))throw new ie(ee);return i.facade=s,$(s,ce,i),i},w=function(s){return U(s,ce)?s[ce]:{}},x=function(s){return U(s,ce)}}s.exports={set:_,get:w,has:x,enforce:function(s){return x(s)?w(s):_(s,{})},getterFor:function(s){return function(i){var u;if(!B(i)||(u=w(i)).type!==s)throw new ie(\"Incompatible receiver, \"+s+\" required\");return u}}}},37812:(s,i,u)=>{\"use strict\";var _=u(76264),w=u(93742),x=_(\"iterator\"),j=Array.prototype;s.exports=function(s){return void 0!==s&&(w.Array===s||j[x]===s)}},62250:(s,i,u)=>{\"use strict\";var _=u(97882),w=_.all;s.exports=_.IS_HTMLDDA?function(s){return\"function\"==typeof s||s===w}:function(s){return\"function\"==typeof s}},7463:(s,i,u)=>{\"use strict\";var _=u(98828),w=u(62250),x=/#|\\.prototype\\./,isForced=function(s,i){var u=P[j(s)];return u===$||u!==B&&(w(i)?_(i):!!i)},j=isForced.normalize=function(s){return String(s).replace(x,\".\").toLowerCase()},P=isForced.data={},B=isForced.NATIVE=\"N\",$=isForced.POLYFILL=\"P\";s.exports=isForced},87136:s=>{\"use strict\";s.exports=function(s){return null==s}},46285:(s,i,u)=>{\"use strict\";var _=u(62250),w=u(97882),x=w.all;s.exports=w.IS_HTMLDDA?function(s){return\"object\"==typeof s?null!==s:_(s)||s===x}:function(s){return\"object\"==typeof s?null!==s:_(s)}},7376:s=>{\"use strict\";s.exports=!0},25594:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(62250),x=u(88280),j=u(51175),P=Object;s.exports=j?function(s){return\"symbol\"==typeof s}:function(s){var i=_(\"Symbol\");return w(i)&&x(i.prototype,P(s))}},24823:(s,i,u)=>{\"use strict\";var _=u(28311),w=u(13930),x=u(36624),j=u(4640),P=u(37812),B=u(20575),$=u(88280),U=u(10300),Y=u(73448),X=u(40154),Z=TypeError,Result=function(s,i){this.stopped=s,this.result=i},ee=Result.prototype;s.exports=function(s,i,u){var ie,ae,le,ce,pe,de,fe,ye=u&&u.that,be=!(!u||!u.AS_ENTRIES),_e=!(!u||!u.IS_RECORD),we=!(!u||!u.IS_ITERATOR),Se=!(!u||!u.INTERRUPTED),xe=_(i,ye),stop=function(s){return ie&&X(ie,\"normal\",s),new Result(!0,s)},callFn=function(s){return be?(x(s),Se?xe(s[0],s[1],stop):xe(s[0],s[1])):Se?xe(s,stop):xe(s)};if(_e)ie=s.iterator;else if(we)ie=s;else{if(!(ae=Y(s)))throw new Z(j(s)+\" is not iterable\");if(P(ae)){for(le=0,ce=B(s);ce>le;le++)if((pe=callFn(s[le]))&&$(ee,pe))return pe;return new Result(!1)}ie=U(s,ae)}for(de=_e?s.next:ie.next;!(fe=w(de,ie)).done;){try{pe=callFn(fe.value)}catch(s){X(ie,\"throw\",s)}if(\"object\"==typeof pe&&pe&&$(ee,pe))return pe}return new Result(!1)}},40154:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(36624),x=u(29367);s.exports=function(s,i,u){var j,P;w(s);try{if(!(j=x(s,\"return\"))){if(\"throw\"===i)throw u;return u}j=_(j,s)}catch(s){P=!0,j=s}if(\"throw\"===i)throw u;if(P)throw j;return w(j),u}},47181:(s,i,u)=>{\"use strict\";var _=u(95116).IteratorPrototype,w=u(58075),x=u(75817),j=u(14840),P=u(93742),returnThis=function(){return this};s.exports=function(s,i,u,B){var $=i+\" Iterator\";return s.prototype=w(_,{next:x(+!B,u)}),j(s,$,!1,!0),P[$]=returnThis,s}},60183:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(13930),x=u(7376),j=u(36833),P=u(62250),B=u(47181),$=u(15972),U=u(79192),Y=u(14840),X=u(61626),Z=u(68055),ee=u(76264),ie=u(93742),ae=u(95116),le=j.PROPER,ce=j.CONFIGURABLE,pe=ae.IteratorPrototype,de=ae.BUGGY_SAFARI_ITERATORS,fe=ee(\"iterator\"),ye=\"keys\",be=\"values\",_e=\"entries\",returnThis=function(){return this};s.exports=function(s,i,u,j,ee,ae,we){B(u,i,j);var Se,xe,Pe,getIterationMethod=function(s){if(s===ee&&ze)return ze;if(!de&&s&&s in qe)return qe[s];switch(s){case ye:return function keys(){return new u(this,s)};case be:return function values(){return new u(this,s)};case _e:return function entries(){return new u(this,s)}}return function(){return new u(this)}},Te=i+\" Iterator\",Re=!1,qe=s.prototype,$e=qe[fe]||qe[\"@@iterator\"]||ee&&qe[ee],ze=!de&&$e||getIterationMethod(ee),We=\"Array\"===i&&qe.entries||$e;if(We&&(Se=$(We.call(new s)))!==Object.prototype&&Se.next&&(x||$(Se)===pe||(U?U(Se,pe):P(Se[fe])||Z(Se,fe,returnThis)),Y(Se,Te,!0,!0),x&&(ie[Te]=returnThis)),le&&ee===be&&$e&&$e.name!==be&&(!x&&ce?X(qe,\"name\",be):(Re=!0,ze=function values(){return w($e,this)})),ee)if(xe={values:getIterationMethod(be),keys:ae?ze:getIterationMethod(ye),entries:getIterationMethod(_e)},we)for(Pe in xe)(de||Re||!(Pe in qe))&&Z(qe,Pe,xe[Pe]);else _({target:i,proto:!0,forced:de||Re},xe);return x&&!we||qe[fe]===ze||Z(qe,fe,ze,{name:ee}),ie[i]=ze,xe}},95116:(s,i,u)=>{\"use strict\";var _,w,x,j=u(98828),P=u(62250),B=u(46285),$=u(58075),U=u(15972),Y=u(68055),X=u(76264),Z=u(7376),ee=X(\"iterator\"),ie=!1;[].keys&&(\"next\"in(x=[].keys())?(w=U(U(x)))!==Object.prototype&&(_=w):ie=!0),!B(_)||j((function(){var s={};return _[ee].call(s)!==s}))?_={}:Z&&(_=$(_)),P(_[ee])||Y(_,ee,(function(){return this})),s.exports={IteratorPrototype:_,BUGGY_SAFARI_ITERATORS:ie}},93742:s=>{\"use strict\";s.exports={}},20575:(s,i,u)=>{\"use strict\";var _=u(3121);s.exports=function(s){return _(s.length)}},41176:s=>{\"use strict\";var i=Math.ceil,u=Math.floor;s.exports=Math.trunc||function trunc(s){var _=+s;return(_>0?u:i)(_)}},32096:(s,i,u)=>{\"use strict\";var _=u(90160);s.exports=function(s,i){return void 0===s?arguments.length<2?\"\":i:_(s)}},29538:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(1907),x=u(13930),j=u(98828),P=u(2875),B=u(87170),$=u(22574),U=u(39298),Y=u(16946),X=Object.assign,Z=Object.defineProperty,ee=w([].concat);s.exports=!X||j((function(){if(_&&1!==X({b:1},X(Z({},\"a\",{enumerable:!0,get:function(){Z(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var s={},i={},u=Symbol(\"assign detection\"),w=\"abcdefghijklmnopqrst\";return s[u]=7,w.split(\"\").forEach((function(s){i[s]=s})),7!==X({},s)[u]||P(X({},i)).join(\"\")!==w}))?function assign(s,i){for(var u=U(s),w=arguments.length,j=1,X=B.f,Z=$.f;w>j;)for(var ie,ae=Y(arguments[j++]),le=X?ee(P(ae),X(ae)):P(ae),ce=le.length,pe=0;ce>pe;)ie=le[pe++],_&&!x(Z,ae,ie)||(u[ie]=ae[ie]);return u}:X},58075:(s,i,u)=>{\"use strict\";var _,w=u(36624),x=u(42220),j=u(80376),P=u(38530),B=u(62416),$=u(49552),U=u(92522),Y=\"prototype\",X=\"script\",Z=U(\"IE_PROTO\"),EmptyConstructor=function(){},scriptTag=function(s){return\"<\"+X+\">\"+s+\"</\"+X+\">\"},NullProtoObjectViaActiveX=function(s){s.write(scriptTag(\"\")),s.close();var i=s.parentWindow.Object;return s=null,i},NullProtoObject=function(){try{_=new ActiveXObject(\"htmlfile\")}catch(s){}var s,i,u;NullProtoObject=\"undefined\"!=typeof document?document.domain&&_?NullProtoObjectViaActiveX(_):(i=$(\"iframe\"),u=\"java\"+X+\":\",i.style.display=\"none\",B.appendChild(i),i.src=String(u),(s=i.contentWindow.document).open(),s.write(scriptTag(\"document.F=Object\")),s.close(),s.F):NullProtoObjectViaActiveX(_);for(var w=j.length;w--;)delete NullProtoObject[Y][j[w]];return NullProtoObject()};P[Z]=!0,s.exports=Object.create||function create(s,i){var u;return null!==s?(EmptyConstructor[Y]=w(s),u=new EmptyConstructor,EmptyConstructor[Y]=null,u[Z]=s):u=NullProtoObject(),void 0===i?u:x.f(u,i)}},42220:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(58661),x=u(74284),j=u(36624),P=u(4993),B=u(2875);i.f=_&&!w?Object.defineProperties:function defineProperties(s,i){j(s);for(var u,_=P(i),w=B(i),$=w.length,U=0;$>U;)x.f(s,u=w[U++],_[u]);return s}},74284:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(73648),x=u(58661),j=u(36624),P=u(70470),B=TypeError,$=Object.defineProperty,U=Object.getOwnPropertyDescriptor,Y=\"enumerable\",X=\"configurable\",Z=\"writable\";i.f=_?x?function defineProperty(s,i,u){if(j(s),i=P(i),j(u),\"function\"==typeof s&&\"prototype\"===i&&\"value\"in u&&Z in u&&!u[Z]){var _=U(s,i);_&&_[Z]&&(s[i]=u.value,u={configurable:X in u?u[X]:_[X],enumerable:Y in u?u[Y]:_[Y],writable:!1})}return $(s,i,u)}:$:function defineProperty(s,i,u){if(j(s),i=P(i),j(u),w)try{return $(s,i,u)}catch(s){}if(\"get\"in u||\"set\"in u)throw new B(\"Accessors not supported\");return\"value\"in u&&(s[i]=u.value),s}},13846:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(13930),x=u(22574),j=u(75817),P=u(4993),B=u(70470),$=u(49724),U=u(73648),Y=Object.getOwnPropertyDescriptor;i.f=_?Y:function getOwnPropertyDescriptor(s,i){if(s=P(s),i=B(i),U)try{return Y(s,i)}catch(s){}if($(s,i))return j(!w(x.f,s,i),s[i])}},24443:(s,i,u)=>{\"use strict\";var _=u(23045),w=u(80376).concat(\"length\",\"prototype\");i.f=Object.getOwnPropertyNames||function getOwnPropertyNames(s){return _(s,w)}},87170:(s,i)=>{\"use strict\";i.f=Object.getOwnPropertySymbols},15972:(s,i,u)=>{\"use strict\";var _=u(49724),w=u(62250),x=u(39298),j=u(92522),P=u(57382),B=j(\"IE_PROTO\"),$=Object,U=$.prototype;s.exports=P?$.getPrototypeOf:function(s){var i=x(s);if(_(i,B))return i[B];var u=i.constructor;return w(u)&&i instanceof u?u.prototype:i instanceof $?U:null}},88280:(s,i,u)=>{\"use strict\";var _=u(1907);s.exports=_({}.isPrototypeOf)},23045:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(49724),x=u(4993),j=u(74436).indexOf,P=u(38530),B=_([].push);s.exports=function(s,i){var u,_=x(s),$=0,U=[];for(u in _)!w(P,u)&&w(_,u)&&B(U,u);for(;i.length>$;)w(_,u=i[$++])&&(~j(U,u)||B(U,u));return U}},2875:(s,i,u)=>{\"use strict\";var _=u(23045),w=u(80376);s.exports=Object.keys||function keys(s){return _(s,w)}},22574:(s,i)=>{\"use strict\";var u={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,w=_&&!u.call({1:2},1);i.f=w?function propertyIsEnumerable(s){var i=_(this,s);return!!i&&i.enumerable}:u},79192:(s,i,u)=>{\"use strict\";var _=u(51871),w=u(36624),x=u(10043);s.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var s,i=!1,u={};try{(s=_(Object.prototype,\"__proto__\",\"set\"))(u,[]),i=u instanceof Array}catch(s){}return function setPrototypeOf(u,_){return w(u),x(_),i?s(u,_):u.__proto__=_,u}}():void 0)},54878:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(73948);s.exports=_?{}.toString:function toString(){return\"[object \"+w(this)+\"]\"}},60581:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(62250),x=u(46285),j=TypeError;s.exports=function(s,i){var u,P;if(\"string\"===i&&w(u=s.toString)&&!x(P=_(u,s)))return P;if(w(u=s.valueOf)&&!x(P=_(u,s)))return P;if(\"string\"!==i&&w(u=s.toString)&&!x(P=_(u,s)))return P;throw new j(\"Can't convert object to primitive value\")}},11042:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(1907),x=u(24443),j=u(87170),P=u(36624),B=w([].concat);s.exports=_(\"Reflect\",\"ownKeys\")||function ownKeys(s){var i=x.f(P(s)),u=j.f;return u?B(i,u(s)):i}},92046:s=>{\"use strict\";s.exports={}},54829:(s,i,u)=>{\"use strict\";var _=u(74284).f;s.exports=function(s,i,u){u in s||_(s,u,{configurable:!0,get:function(){return i[u]},set:function(s){i[u]=s}})}},74239:(s,i,u)=>{\"use strict\";var _=u(87136),w=TypeError;s.exports=function(s){if(_(s))throw new w(\"Can't call method on \"+s);return s}},14840:(s,i,u)=>{\"use strict\";var _=u(52623),w=u(74284).f,x=u(61626),j=u(49724),P=u(54878),B=u(76264)(\"toStringTag\");s.exports=function(s,i,u,$){var U=u?s:s&&s.prototype;U&&(j(U,B)||w(U,B,{configurable:!0,value:i}),$&&!_&&x(U,\"toString\",P))}},92522:(s,i,u)=>{\"use strict\";var _=u(85816),w=u(6499),x=_(\"keys\");s.exports=function(s){return x[s]||(x[s]=w(s))}},36128:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(2532),x=\"__core-js_shared__\",j=_[x]||w(x,{});s.exports=j},85816:(s,i,u)=>{\"use strict\";var _=u(7376),w=u(36128);(s.exports=function(s,i){return w[s]||(w[s]=void 0!==i?i:{})})(\"versions\",[]).push({version:\"3.34.0\",mode:_?\"pure\":\"global\",copyright:\"© 2014-2023 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},11470:(s,i,u)=>{\"use strict\";var _=u(1907),w=u(65482),x=u(90160),j=u(74239),P=_(\"\".charAt),B=_(\"\".charCodeAt),$=_(\"\".slice),createMethod=function(s){return function(i,u){var _,U,Y=x(j(i)),X=w(u),Z=Y.length;return X<0||X>=Z?s?\"\":void 0:(_=B(Y,X))<55296||_>56319||X+1===Z||(U=B(Y,X+1))<56320||U>57343?s?P(Y,X):_:s?$(Y,X,X+2):U-56320+(_-55296<<10)+65536}};s.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},19846:(s,i,u)=>{\"use strict\";var _=u(15683),w=u(98828),x=u(41010).String;s.exports=!!Object.getOwnPropertySymbols&&!w((function(){var s=Symbol(\"symbol detection\");return!x(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&_&&_<41}))},34849:(s,i,u)=>{\"use strict\";var _=u(65482),w=Math.max,x=Math.min;s.exports=function(s,i){var u=_(s);return u<0?w(u+i,0):x(u,i)}},4993:(s,i,u)=>{\"use strict\";var _=u(16946),w=u(74239);s.exports=function(s){return _(w(s))}},65482:(s,i,u)=>{\"use strict\";var _=u(41176);s.exports=function(s){var i=+s;return i!=i||0===i?0:_(i)}},3121:(s,i,u)=>{\"use strict\";var _=u(65482),w=Math.min;s.exports=function(s){return s>0?w(_(s),9007199254740991):0}},39298:(s,i,u)=>{\"use strict\";var _=u(74239),w=Object;s.exports=function(s){return w(_(s))}},46028:(s,i,u)=>{\"use strict\";var _=u(13930),w=u(46285),x=u(25594),j=u(29367),P=u(60581),B=u(76264),$=TypeError,U=B(\"toPrimitive\");s.exports=function(s,i){if(!w(s)||x(s))return s;var u,B=j(s,U);if(B){if(void 0===i&&(i=\"default\"),u=_(B,s,i),!w(u)||x(u))return u;throw new $(\"Can't convert object to primitive value\")}return void 0===i&&(i=\"number\"),P(s,i)}},70470:(s,i,u)=>{\"use strict\";var _=u(46028),w=u(25594);s.exports=function(s){var i=_(s,\"string\");return w(i)?i:i+\"\"}},52623:(s,i,u)=>{\"use strict\";var _={};_[u(76264)(\"toStringTag\")]=\"z\",s.exports=\"[object z]\"===String(_)},90160:(s,i,u)=>{\"use strict\";var _=u(73948),w=String;s.exports=function(s){if(\"Symbol\"===_(s))throw new TypeError(\"Cannot convert a Symbol value to a string\");return w(s)}},4640:s=>{\"use strict\";var i=String;s.exports=function(s){try{return i(s)}catch(s){return\"Object\"}}},6499:(s,i,u)=>{\"use strict\";var _=u(1907),w=0,x=Math.random(),j=_(1..toString);s.exports=function(s){return\"Symbol(\"+(void 0===s?\"\":s)+\")_\"+j(++w+x,36)}},51175:(s,i,u)=>{\"use strict\";var _=u(19846);s.exports=_&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},58661:(s,i,u)=>{\"use strict\";var _=u(39447),w=u(98828);s.exports=_&&w((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},40551:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(62250),x=_.WeakMap;s.exports=w(x)&&/native code/.test(String(x))},76264:(s,i,u)=>{\"use strict\";var _=u(41010),w=u(85816),x=u(49724),j=u(6499),P=u(19846),B=u(51175),$=_.Symbol,U=w(\"wks\"),Y=B?$.for||$:$&&$.withoutSetter||j;s.exports=function(s){return x(U,s)||(U[s]=P&&x($,s)?$[s]:Y(\"Symbol.\"+s)),U[s]}},19358:(s,i,u)=>{\"use strict\";var _=u(85582),w=u(49724),x=u(61626),j=u(88280),P=u(79192),B=u(19595),$=u(54829),U=u(34084),Y=u(32096),X=u(39259),Z=u(85884),ee=u(39447),ie=u(7376);s.exports=function(s,i,u,ae){var le=\"stackTraceLimit\",ce=ae?2:1,pe=s.split(\".\"),de=pe[pe.length-1],fe=_.apply(null,pe);if(fe){var ye=fe.prototype;if(!ie&&w(ye,\"cause\")&&delete ye.cause,!u)return fe;var be=_(\"Error\"),_e=i((function(s,i){var u=Y(ae?i:s,void 0),_=ae?new fe(s):new fe;return void 0!==u&&x(_,\"message\",u),Z(_,_e,_.stack,2),this&&j(ye,this)&&U(_,this,_e),arguments.length>ce&&X(_,arguments[ce]),_}));if(_e.prototype=ye,\"Error\"!==de?P?P(_e,be):B(_e,be,{name:!0}):ee&&le in fe&&($(_e,fe,le),$(_e,fe,\"prepareStackTrace\")),B(_e,fe),!ie)try{ye.name!==de&&x(ye,\"name\",de),ye.constructor=_e}catch(s){}return _e}}},36371:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(85582),x=u(76024),j=u(98828),P=u(19358),B=\"AggregateError\",$=w(B),U=!j((function(){return 1!==$([1]).errors[0]}))&&j((function(){return 7!==$([1],B,{cause:7}).cause}));_({global:!0,constructor:!0,arity:2,forced:U},{AggregateError:P(B,(function(s){return function AggregateError(i,u){return x(s,this,arguments)}}),U,!0)})},82048:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(88280),x=u(15972),j=u(79192),P=u(19595),B=u(58075),$=u(61626),U=u(75817),Y=u(39259),X=u(85884),Z=u(24823),ee=u(32096),ie=u(76264)(\"toStringTag\"),ae=Error,le=[].push,ce=function AggregateError(s,i){var u,_=w(pe,this);j?u=j(new ae,_?x(this):pe):(u=_?this:B(pe),$(u,ie,\"Error\")),void 0!==i&&$(u,\"message\",ee(i)),X(u,ce,u.stack,1),arguments.length>2&&Y(u,arguments[2]);var P=[];return Z(s,le,{that:P}),$(u,\"errors\",P),u};j?j(ce,ae):P(ce,ae,{name:!0});var pe=ce.prototype=B(ae.prototype,{constructor:U(1,ce),message:U(1,\"\"),name:U(1,\"AggregateError\")});_({global:!0,constructor:!0,arity:2},{AggregateError:ce})},64502:(s,i,u)=>{\"use strict\";u(82048)},99363:(s,i,u)=>{\"use strict\";var _=u(4993),w=u(42156),x=u(93742),j=u(64932),P=u(74284).f,B=u(60183),$=u(59550),U=u(7376),Y=u(39447),X=\"Array Iterator\",Z=j.set,ee=j.getterFor(X);s.exports=B(Array,\"Array\",(function(s,i){Z(this,{type:X,target:_(s),index:0,kind:i})}),(function(){var s=ee(this),i=s.target,u=s.index++;if(!i||u>=i.length)return s.target=void 0,$(void 0,!0);switch(s.kind){case\"keys\":return $(u,!1);case\"values\":return $(i[u],!1)}return $([u,i[u]],!1)}),\"values\");var ie=x.Arguments=x.Array;if(w(\"keys\"),w(\"values\"),w(\"entries\"),!U&&Y&&\"values\"!==ie.name)try{P(ie,\"name\",{value:\"values\"})}catch(s){}},96605:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(41010),x=u(76024),j=u(19358),P=\"WebAssembly\",B=w[P],$=7!==new Error(\"e\",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(s,i){var u={};u[s]=j(s,i,$),_({global:!0,constructor:!0,arity:1,forced:$},u)},exportWebAssemblyErrorCauseWrapper=function(s,i){if(B&&B[s]){var u={};u[s]=j(P+\".\"+s,i,$),_({target:P,stat:!0,constructor:!0,arity:1,forced:$},u)}};exportGlobalErrorCauseWrapper(\"Error\",(function(s){return function Error(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"EvalError\",(function(s){return function EvalError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"RangeError\",(function(s){return function RangeError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"ReferenceError\",(function(s){return function ReferenceError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"SyntaxError\",(function(s){return function SyntaxError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"TypeError\",(function(s){return function TypeError(i){return x(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"URIError\",(function(s){return function URIError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"CompileError\",(function(s){return function CompileError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"LinkError\",(function(s){return function LinkError(i){return x(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"RuntimeError\",(function(s){return function RuntimeError(i){return x(s,this,arguments)}}))},79307:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(44673);_({target:\"Function\",proto:!0,forced:Function.bind!==w},{bind:w})},71340:(s,i,u)=>{\"use strict\";var _=u(11091),w=u(29538);_({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==w},{assign:w})},7057:(s,i,u)=>{\"use strict\";var _=u(11470).charAt,w=u(90160),x=u(64932),j=u(60183),P=u(59550),B=\"String Iterator\",$=x.set,U=x.getterFor(B);j(String,\"String\",(function(s){$(this,{type:B,string:w(s),index:0})}),(function next(){var s,i=U(this),u=i.string,w=i.index;return w>=u.length?P(void 0,!0):(s=_(u,w),i.index+=s.length,P(s,!1))}))},91599:(s,i,u)=>{\"use strict\";u(64502)},12560:(s,i,u)=>{\"use strict\";u(99363);var _=u(19287),w=u(41010),x=u(14840),j=u(93742);for(var P in _)x(w[P],P),j[P]=j.Array},694:(s,i,u)=>{\"use strict\";u(91599);var _=u(37257);u(12560),s.exports=_},19709:(s,i,u)=>{\"use strict\";var _=u(23034);s.exports=_},40975:(s,i,u)=>{\"use strict\";var _=u(9748);s.exports=_}},_={};function __webpack_require__(s){var i=_[s];if(void 0!==i)return i.exports;var w=_[s]={id:s,loaded:!1,exports:{}};return u[s].call(w.exports,w,w.exports,__webpack_require__),w.loaded=!0,w.exports}__webpack_require__.n=s=>{var i=s&&s.__esModule?()=>s.default:()=>s;return __webpack_require__.d(i,{a:i}),i},i=Object.getPrototypeOf?s=>Object.getPrototypeOf(s):s=>s.__proto__,__webpack_require__.t=function(u,_){if(1&_&&(u=this(u)),8&_)return u;if(\"object\"==typeof u&&u){if(4&_&&u.__esModule)return u;if(16&_&&\"function\"==typeof u.then)return u}var w=Object.create(null);__webpack_require__.r(w);var x={};s=s||[null,i({}),i([]),i(i)];for(var j=2&_&&u;\"object\"==typeof j&&!~s.indexOf(j);j=i(j))Object.getOwnPropertyNames(j).forEach((s=>x[s]=()=>u[s]));return x.default=()=>u,__webpack_require__.d(w,x),w},__webpack_require__.d=(s,i)=>{for(var u in i)__webpack_require__.o(i,u)&&!__webpack_require__.o(s,u)&&Object.defineProperty(s,u,{enumerable:!0,get:i[u]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(s){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(s,i)=>Object.prototype.hasOwnProperty.call(s,i),__webpack_require__.r=s=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(s,\"__esModule\",{value:!0})},__webpack_require__.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);var w={};(()=>{\"use strict\";__webpack_require__.d(w,{default:()=>ZI});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{CLEAR:()=>ct,CLEAR_BY:()=>ut,NEW_AUTH_ERR:()=>lt,NEW_SPEC_ERR:()=>it,NEW_SPEC_ERR_BATCH:()=>at,NEW_THROWN_ERR:()=>ot,NEW_THROWN_ERR_BATCH:()=>st,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{AUTHORIZE:()=>Bt,AUTHORIZE_OAUTH2:()=>$t,CONFIGURE_AUTH:()=>zt,LOGOUT:()=>Ft,PRE_AUTHORIZE_OAUTH2:()=>qt,RESTORE_AUTHORIZATION:()=>Vt,SHOW_AUTH_POPUP:()=>Lt,VALIDATE:()=>Ut,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{authorized:()=>Zt,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>Qt,getConfigs:()=>er,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,shownDefinitions:()=>Xt});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{TOGGLE_CONFIGS:()=>ao,UPDATE_CONFIGS:()=>io,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{get:()=>get});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{transform:()=>transform});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{transform:()=>parameter_oneof_transform});var $={};__webpack_require__.r($),__webpack_require__.d($,{allErrors:()=>xo,lastError:()=>ko});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{SHOW:()=>Io,UPDATE_FILTER:()=>jo,UPDATE_LAYOUT:()=>Ao,UPDATE_MODE:()=>Po,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>Mo,whatMode:()=>whatMode});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{taggedOperations:()=>taggedOperations});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{requestSnippetGenerator_curl_bash:()=>requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd:()=>requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell:()=>requestSnippetGenerator_curl_powershell});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{getActiveLanguage:()=>Do,getDefaultExpanded:()=>Lo,getGenerators:()=>Ro,getSnippetGenerators:()=>getSnippetGenerators});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>Ys,canExecuteScheme:()=>canExecuteScheme,consumes:()=>Ws,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>Gs,externalDocs:()=>Fs,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>Xi,host:()=>Xs,info:()=>Bs,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>Ls,lastError:()=>js,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>Ni,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>Vs,operationsWithRootInherited:()=>Zs,operationsWithTags:()=>_i,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>Us,produces:()=>Ks,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>Pi,responseFor:()=>responseFor,responses:()=>Si,schemes:()=>Qs,security:()=>Hs,securityDefinitions:()=>Js,semver:()=>$s,spec:()=>spec,specJS:()=>Ts,specJson:()=>Ms,specJsonWithResolvedSubtrees:()=>Ds,specResolved:()=>Rs,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>Ns,specStr:()=>Is,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>ai,url:()=>Ps,validOperationMethods:()=>zs,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>qs});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{CLEAR_REQUEST:()=>ka,CLEAR_RESPONSE:()=>xa,CLEAR_VALIDATE_PARAMS:()=>Ca,LOG_REQUEST:()=>wa,SET_MUTATED_REQUEST:()=>Ea,SET_REQUEST:()=>_a,SET_RESPONSE:()=>ba,SET_SCHEME:()=>Na,UPDATE_EMPTY_PARAM_INCLUSION:()=>ya,UPDATE_JSON:()=>ma,UPDATE_OPERATION_META_VALUE:()=>Aa,UPDATE_PARAM:()=>ga,UPDATE_RESOLVED:()=>ja,UPDATE_RESOLVED_SUBTREE:()=>Ia,UPDATE_SPEC:()=>ua,UPDATE_URL:()=>da,VALIDATE_PARAMS:()=>va,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{JsonPatchError:()=>Ja,_areEquals:()=>_areEquals,applyOperation:()=>applyOperation,applyPatch:()=>applyPatch,applyReducer:()=>applyReducer,deepClone:()=>Ga,getValueByPointer:()=>getValueByPointer,validate:()=>validate,validator:()=>validator});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{compare:()=>compare,generate:()=>generate,observe:()=>observe,unobserve:()=>unobserve});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{hasElementSourceMap:()=>hasElementSourceMap,includesClasses:()=>includesClasses,includesSymbols:()=>includesSymbols,isAnnotationElement:()=>Qp,isArrayElement:()=>Jp,isBooleanElement:()=>Kp,isCommentElement:()=>Zp,isElement:()=>Up,isLinkElement:()=>Yp,isMemberElement:()=>Gp,isNullElement:()=>Wp,isNumberElement:()=>Vp,isObjectElement:()=>Hp,isParseResultElement:()=>nh,isPrimitiveElement:()=>isPrimitiveElement,isRefElement:()=>Xp,isSourceMapElement:()=>hh,isStringElement:()=>zp});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{isJSONReferenceElement:()=>mg,isJSONSchemaElement:()=>fg,isLinkDescriptionElement:()=>yg,isMediaElement:()=>gg});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{isBooleanJsonSchemaElement:()=>isBooleanJsonSchemaElement,isCallbackElement:()=>Iy,isComponentsElement:()=>Ny,isContactElement:()=>My,isExampleElement:()=>Ty,isExternalDocumentationElement:()=>Ry,isHeaderElement:()=>Dy,isInfoElement:()=>Ly,isLicenseElement:()=>By,isLinkElement:()=>Fy,isMediaTypeElement:()=>tv,isOpenApi3_0Element:()=>$y,isOpenapiElement:()=>qy,isOperationElement:()=>Uy,isParameterElement:()=>zy,isPathItemElement:()=>Vy,isPathsElement:()=>Wy,isReferenceElement:()=>Ky,isRequestBodyElement:()=>Hy,isResponseElement:()=>Jy,isResponsesElement:()=>Gy,isSchemaElement:()=>Yy,isSecurityRequirementElement:()=>Xy,isSecuritySchemeElement:()=>Qy,isServerElement:()=>Zy,isServerVariableElement:()=>ev,isServersElement:()=>rv});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{isBooleanJsonSchemaElement:()=>predicates_isBooleanJsonSchemaElement,isCallbackElement:()=>nw,isComponentsElement:()=>ow,isContactElement:()=>sw,isExampleElement:()=>iw,isExternalDocumentationElement:()=>aw,isHeaderElement:()=>lw,isInfoElement:()=>cw,isJsonSchemaDialectElement:()=>uw,isLicenseElement:()=>pw,isLinkElement:()=>hw,isMediaTypeElement:()=>Aw,isOpenApi3_1Element:()=>fw,isOpenapiElement:()=>dw,isOperationElement:()=>mw,isParameterElement:()=>gw,isPathItemElement:()=>yw,isPathItemElementExternal:()=>isPathItemElementExternal,isPathsElement:()=>vw,isReferenceElement:()=>bw,isReferenceElementExternal:()=>isReferenceElementExternal,isRequestBodyElement:()=>_w,isResponseElement:()=>Ew,isResponsesElement:()=>ww,isSchemaElement:()=>Sw,isSecurityRequirementElement:()=>xw,isSecuritySchemeElement:()=>kw,isServerElement:()=>Ow,isServerVariableElement:()=>Cw});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{cookie:()=>parameter_builders_cookie,header:()=>parameter_builders_header,path:()=>parameter_builders_path,query:()=>query});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>layout_utils_Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{basePath:()=>Oj,consumes:()=>Cj,definitions:()=>nj,findDefinition:()=>ZA,hasHost:()=>fj,host:()=>_j,produces:()=>Aj,schemes:()=>Dj,securityDefinitions:()=>gj,validOperationMethods:()=>wrap_selectors_validOperationMethods});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{definitionsToAuthorize:()=>Lj});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{callbacksOperations:()=>Kj,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>$j});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>yP,CLEAR_REQUEST_BODY_VALUE:()=>vP,SET_REQUEST_BODY_VALIDATE_ERROR:()=>gP,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>hP,UPDATE_REQUEST_BODY_INCLUSION:()=>pP,UPDATE_REQUEST_BODY_VALUE:()=>cP,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>uP,UPDATE_REQUEST_CONTENT_TYPE:()=>dP,UPDATE_RESPONSE_CONTENT_TYPE:()=>fP,UPDATE_SELECTED_SERVER:()=>lP,UPDATE_SERVER_VARIABLE_VALUE:()=>mP,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{activeExamplesMember:()=>CP,hasUserEditedBody:()=>xP,requestBodyErrors:()=>OP,requestBodyInclusionSetting:()=>kP,requestBodyValue:()=>wP,requestContentType:()=>AP,responseContentType:()=>jP,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>EP,serverEffectiveValue:()=>NP,serverVariableValue:()=>PP,serverVariables:()=>IP,shouldRetainRequestBodyValue:()=>SP,validOperationMethods:()=>TP,validateBeforeExecute:()=>MP,validateShallowRequired:()=>validateShallowRequired});var $e=__webpack_require__(81919),ze=__webpack_require__.n($e),We=__webpack_require__(96540);function formatProdErrorMessage(s){return`Minified Redux error #${s}; visit https://redux.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}var He=(()=>\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\")(),randomString=()=>Math.random().toString(36).substring(7).split(\"\").join(\".\"),Ye={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`};function isPlainObject(s){if(\"object\"!=typeof s||null===s)return!1;let i=s;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(s)===i||null===Object.getPrototypeOf(s)}function createStore(s,i,u){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(2));if(\"function\"==typeof i&&\"function\"==typeof u||\"function\"==typeof u&&\"function\"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if(\"function\"==typeof i&&void 0===u&&(u=i,i=void 0),void 0!==u){if(\"function\"!=typeof u)throw new Error(formatProdErrorMessage(1));return u(createStore)(s,i)}let _=s,w=i,x=new Map,j=x,P=0,B=!1;function ensureCanMutateNextListeners(){j===x&&(j=new Map,x.forEach(((s,i)=>{j.set(i,s)})))}function getState(){if(B)throw new Error(formatProdErrorMessage(3));return w}function subscribe(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(4));if(B)throw new Error(formatProdErrorMessage(5));let i=!0;ensureCanMutateNextListeners();const u=P++;return j.set(u,s),function unsubscribe(){if(i){if(B)throw new Error(formatProdErrorMessage(6));i=!1,ensureCanMutateNextListeners(),j.delete(u),x=null}}}function dispatch(s){if(!isPlainObject(s))throw new Error(formatProdErrorMessage(7));if(void 0===s.type)throw new Error(formatProdErrorMessage(8));if(\"string\"!=typeof s.type)throw new Error(formatProdErrorMessage(17));if(B)throw new Error(formatProdErrorMessage(9));try{B=!0,w=_(w,s)}finally{B=!1}return(x=j).forEach((s=>{s()})),s}dispatch({type:Ye.INIT});return{dispatch,subscribe,getState,replaceReducer:function replaceReducer(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(10));_=s,dispatch({type:Ye.REPLACE})},[He]:function observable(){const s=subscribe;return{subscribe(i){if(\"object\"!=typeof i||null===i)throw new Error(formatProdErrorMessage(11));function observeState(){const s=i;s.next&&s.next(getState())}observeState();return{unsubscribe:s(observeState)}},[He](){return this}}}}}function bindActionCreator(s,i){return function(...u){return i(s.apply(this,u))}}function compose(...s){return 0===s.length?s=>s:1===s.length?s[0]:s.reduce(((s,i)=>(...u)=>s(i(...u))))}var Xe=__webpack_require__(9404),Qe=__webpack_require__.n(Xe),et=__webpack_require__(89593),tt=__webpack_require__(20334),rt=__webpack_require__(55364),nt=__webpack_require__.n(rt);const ot=\"err_new_thrown_err\",st=\"err_new_thrown_err_batch\",it=\"err_new_spec_err\",at=\"err_new_spec_err_batch\",lt=\"err_new_auth_err\",ct=\"err_clear\",ut=\"err_clear_by\";function newThrownErr(s){return{type:ot,payload:(0,tt.serializeError)(s)}}function newThrownErrBatch(s){return{type:st,payload:s}}function newSpecErr(s){return{type:it,payload:s}}function newSpecErrBatch(s){return{type:at,payload:s}}function newAuthErr(s){return{type:lt,payload:s}}function clear(s={}){return{type:ct,payload:s}}function clearBy(s=(()=>!0)){return{type:ut,payload:s}}const pt=function makeWindow(){var s={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return s;try{s=window;for(var i of[\"File\",\"Blob\",\"FormData\"])i in window&&(s[i]=window[i])}catch(s){console.error(s)}return s}();var ht=__webpack_require__(16750),dt=(__webpack_require__(84058),__webpack_require__(55808),__webpack_require__(50104)),mt=__webpack_require__.n(dt),gt=__webpack_require__(7309),yt=__webpack_require__.n(gt),vt=__webpack_require__(42426),bt=__webpack_require__.n(vt),_t=__webpack_require__(75288),Et=__webpack_require__.n(_t),wt=__webpack_require__(1882),St=__webpack_require__.n(wt),xt=__webpack_require__(2205),kt=__webpack_require__.n(xt),Ot=__webpack_require__(53209),Ct=__webpack_require__.n(Ot),At=__webpack_require__(62802),jt=__webpack_require__.n(At);const Pt=Qe().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(s,{isOAS3:i}={}){if(!Qe().Map.isMap(s))return{schema:Qe().Map(),parameterContentMediaType:null};if(!i)return\"body\"===s.get(\"in\")?{schema:s.get(\"schema\",Qe().Map()),parameterContentMediaType:null}:{schema:s.filter(((s,i)=>Pt.includes(i))),parameterContentMediaType:null};if(s.get(\"content\")){const i=s.get(\"content\",Qe().Map({})).keySeq().first();return{schema:s.getIn([\"content\",i,\"schema\"],Qe().Map()),parameterContentMediaType:i}}return{schema:s.get(\"schema\")?s.get(\"schema\",Qe().Map()):Qe().Map(),parameterContentMediaType:null}}var It=__webpack_require__(48287).Buffer;const Nt=\"default\",isImmutable=s=>Qe().Iterable.isIterable(s);function objectify(s){return isObject(s)?isImmutable(s)?s.toJS():s:{}}function fromJSOrdered(s){if(isImmutable(s))return s;if(s instanceof pt.File)return s;if(!isObject(s))return s;if(Array.isArray(s))return Qe().Seq(s).map(fromJSOrdered).toList();if(St()(s.entries)){const i=function createObjWithHashedKeys(s){if(!St()(s.entries))return s;const i={},u=\"_**[]\",_={};for(let w of s.entries())if(i[w[0]]||_[w[0]]&&_[w[0]].containsMultiple){if(!_[w[0]]){_[w[0]]={containsMultiple:!0,length:1},i[`${w[0]}${u}${_[w[0]].length}`]=i[w[0]],delete i[w[0]]}_[w[0]].length+=1,i[`${w[0]}${u}${_[w[0]].length}`]=w[1]}else i[w[0]]=w[1];return i}(s);return Qe().OrderedMap(i).map(fromJSOrdered)}return Qe().OrderedMap(s).map(fromJSOrdered)}function normalizeArray(s){return Array.isArray(s)?s:[s]}function isFn(s){return\"function\"==typeof s}function isObject(s){return!!s&&\"object\"==typeof s}function isFunc(s){return\"function\"==typeof s}function isArray(s){return Array.isArray(s)}const Mt=mt();function objMap(s,i){return Object.keys(s).reduce(((u,_)=>(u[_]=i(s[_],_),u)),{})}function objReduce(s,i){return Object.keys(s).reduce(((u,_)=>{let w=i(s[_],_);return w&&\"object\"==typeof w&&Object.assign(u,w),u}),{})}function systemThunkMiddleware(s){return({dispatch:i,getState:u})=>i=>u=>\"function\"==typeof u?u(s()):i(u)}function validateValueBySchema(s,i,u,_,w){if(!i)return[];let x=[],j=i.get(\"nullable\"),P=i.get(\"required\"),B=i.get(\"maximum\"),$=i.get(\"minimum\"),U=i.get(\"type\"),Y=i.get(\"format\"),X=i.get(\"maxLength\"),Z=i.get(\"minLength\"),ee=i.get(\"uniqueItems\"),ie=i.get(\"maxItems\"),ae=i.get(\"minItems\"),le=i.get(\"pattern\");const ce=u||!0===P,pe=null!=s;if(j&&null===s||!U||!(ce||pe&&\"array\"===U||!(!ce&&!pe)))return[];let de=\"string\"===U&&s,fe=\"array\"===U&&Array.isArray(s)&&s.length,ye=\"array\"===U&&Qe().List.isList(s)&&s.count();const be=[de,fe,ye,\"array\"===U&&\"string\"==typeof s&&s,\"file\"===U&&s instanceof pt.File,\"boolean\"===U&&(s||!1===s),\"number\"===U&&(s||0===s),\"integer\"===U&&(s||0===s),\"object\"===U&&\"object\"==typeof s&&null!==s,\"object\"===U&&\"string\"==typeof s&&s].some((s=>!!s));if(ce&&!be&&!_)return x.push(\"Required field is not provided\"),x;if(\"object\"===U&&(null===w||\"application/json\"===w)){let u=s;if(\"string\"==typeof s)try{u=JSON.parse(s)}catch(s){return x.push(\"Parameter string value must be valid JSON\"),x}i&&i.has(\"required\")&&isFunc(P.isList)&&P.isList()&&P.forEach((s=>{void 0===u[s]&&x.push({propKey:s,error:\"Required property not found\"})})),i&&i.has(\"properties\")&&i.get(\"properties\").forEach(((s,i)=>{const j=validateValueBySchema(u[i],s,!1,_,w);x.push(...j.map((s=>({propKey:i,error:s}))))}))}if(le){let i=((s,i)=>{if(!new RegExp(i).test(s))return\"Value must follow pattern \"+i})(s,le);i&&x.push(i)}if(ae&&\"array\"===U){let i=((s,i)=>{if(!s&&i>=1||s&&s.length<i)return`Array must contain at least ${i} item${1===i?\"\":\"s\"}`})(s,ae);i&&x.push(i)}if(ie&&\"array\"===U){let i=((s,i)=>{if(s&&s.length>i)return`Array must not contain more then ${i} item${1===i?\"\":\"s\"}`})(s,ie);i&&x.push({needRemove:!0,error:i})}if(ee&&\"array\"===U){let i=((s,i)=>{if(s&&(\"true\"===i||!0===i)){const i=(0,Xe.fromJS)(s),u=i.toSet();if(s.length>u.size){let s=(0,Xe.Set)();if(i.forEach(((u,_)=>{i.filter((s=>isFunc(s.equals)?s.equals(u):s===u)).size>1&&(s=s.add(_))})),0!==s.size)return s.map((s=>({index:s,error:\"No duplicates allowed.\"}))).toArray()}}})(s,ee);i&&x.push(...i)}if(X||0===X){let i=((s,i)=>{if(s.length>i)return`Value must be no longer than ${i} character${1!==i?\"s\":\"\"}`})(s,X);i&&x.push(i)}if(Z){let i=((s,i)=>{if(s.length<i)return`Value must be at least ${i} character${1!==i?\"s\":\"\"}`})(s,Z);i&&x.push(i)}if(B||0===B){let i=((s,i)=>{if(s>i)return`Value must be less than ${i}`})(s,B);i&&x.push(i)}if($||0===$){let i=((s,i)=>{if(s<i)return`Value must be greater than ${i}`})(s,$);i&&x.push(i)}if(\"string\"===U){let i;if(i=\"date-time\"===Y?(s=>{if(isNaN(Date.parse(s)))return\"Value must be a DateTime\"})(s):\"uuid\"===Y?(s=>{if(s=s.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(s))return\"Value must be a Guid\"})(s):(s=>{if(s&&\"string\"!=typeof s)return\"Value must be a string\"})(s),!i)return x;x.push(i)}else if(\"boolean\"===U){let i=(s=>{if(\"true\"!==s&&\"false\"!==s&&!0!==s&&!1!==s)return\"Value must be a boolean\"})(s);if(!i)return x;x.push(i)}else if(\"number\"===U){let i=(s=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(s))return\"Value must be a number\"})(s);if(!i)return x;x.push(i)}else if(\"integer\"===U){let i=(s=>{if(!/^-?\\d+$/.test(s))return\"Value must be an integer\"})(s);if(!i)return x;x.push(i)}else if(\"array\"===U){if(!fe&&!ye)return x;s&&s.forEach(((s,u)=>{const j=validateValueBySchema(s,i.get(\"items\"),!1,_,w);x.push(...j.map((s=>({index:u,error:s}))))}))}else if(\"file\"===U){let i=(s=>{if(s&&!(s instanceof pt.File))return\"Value must be a file\"})(s);if(!i)return x;x.push(i)}return x}const utils_btoa=s=>{let i;return i=s instanceof It?s:It.from(s.toString(),\"utf-8\"),i.toString(\"base64\")},Tt={operationsSorter:{alpha:(s,i)=>s.get(\"path\").localeCompare(i.get(\"path\")),method:(s,i)=>s.get(\"method\").localeCompare(i.get(\"method\"))},tagsSorter:{alpha:(s,i)=>s.localeCompare(i)}},buildFormData=s=>{let i=[];for(let u in s){let _=s[u];void 0!==_&&\"\"!==_&&i.push([u,\"=\",encodeURIComponent(_).replace(/%20/g,\"+\")].join(\"\"))}return i.join(\"&\")},shallowEqualKeys=(s,i,u)=>!!yt()(u,(u=>Et()(s[u],i[u])));function sanitizeUrl(s){return\"string\"!=typeof s||\"\"===s?\"\":(0,ht.J)(s)}function requiresValidationURL(s){return!(!s||s.indexOf(\"localhost\")>=0||s.indexOf(\"127.0.0.1\")>=0||\"none\"===s)}const createDeepLinkPath=s=>\"string\"==typeof s||s instanceof String?s.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=s=>kt()(createDeepLinkPath(s).replace(/%20/g,\"_\")),getExtensions=s=>s.filter(((s,i)=>/^x-/.test(i))),getCommonExtensions=s=>s.filter(((s,i)=>/^pattern|maxLength|minLength|maximum|minimum/.test(i)));function deeplyStripKey(s,i,u=(()=>!0)){if(\"object\"!=typeof s||Array.isArray(s)||null===s||!i)return s;const _=Object.assign({},s);return Object.keys(_).forEach((s=>{s===i&&u(_[s],s)?delete _[s]:_[s]=deeplyStripKey(_[s],i,u)})),_}function stringify(s){if(\"string\"==typeof s)return s;if(s&&s.toJS&&(s=s.toJS()),\"object\"==typeof s&&null!==s)try{return JSON.stringify(s,null,2)}catch(i){return String(s)}return null==s?\"\":s.toString()}function paramToIdentifier(s,{returnAll:i=!1,allowHashes:u=!0}={}){if(!Qe().Map.isMap(s))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const _=s.get(\"name\"),w=s.get(\"in\");let x=[];return s&&s.hashCode&&w&&_&&u&&x.push(`${w}.${_}.hash-${s.hashCode()}`),w&&_&&x.push(`${w}.${_}`),x.push(_),i?x:x[0]||\"\"}function paramToValue(s,i){return paramToIdentifier(s,{returnAll:!0}).map((s=>i[s])).filter((s=>void 0!==s))[0]}function b64toB64UrlEncoded(s){return s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=s=>!s||!(!isImmutable(s)||!s.isEmpty()),idFn=s=>s;function createStoreWithMiddleware(s,i,u){let _=[systemThunkMiddleware(u)];return createStore(s,i,(pt.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose)(function applyMiddleware(...s){return i=>(u,_)=>{const w=i(u,_);let dispatch=()=>{throw new Error(formatProdErrorMessage(15))};const x={getState:w.getState,dispatch:(s,...i)=>dispatch(s,...i)},j=s.map((s=>s(x)));return dispatch=compose(...j)(w.dispatch),{...w,dispatch}}}(..._)))}class Store{constructor(s={}){ze()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},s),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(s,i,u){return createStoreWithMiddleware(s,i,u)}(idFn,(0,Xe.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(s,i=!0){var u=combinePlugins(s,this.getSystem(),this.pluginsOptions);systemExtend(this.system,u),i&&this.buildSystem();callAfterLoad.call(this.system,s,this.getSystem())&&this.buildSystem()}buildSystem(s=!0){let i=this.getStore().dispatch,u=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(i),this.getWrappedAndBoundSelectors(u,this.getSystem),this.getStateThunks(u),this.getFn(),this.getConfigs()),s&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:Qe(),React:We},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(s){this.system.configs=s}rebuildReducer(){this.store.replaceReducer(function buildReducer(s){return function allReducers(s){let i=Object.keys(s).reduce(((i,u)=>(i[u]=function makeReducer(s){return(i=new Xe.Map,u)=>{if(!s)return i;let _=s[u.type];if(_){const s=wrapWithTryCatch(_)(i,u);return null===s?i:s}return i}}(s[u]),i)),{});if(!Object.keys(i).length)return idFn;return(0,et.H)(i)}(objMap(s,(s=>s.reducers)))}(this.system.statePlugins))}getType(s){let i=s[0].toUpperCase()+s.slice(1);return objReduce(this.system.statePlugins,((u,_)=>{let w=u[s];if(w)return{[_+i]:w}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(s=>objReduce(s,((s,i)=>{if(isFn(s))return{[i]:s}}))))}getWrappedAndBoundActions(s){return objMap(this.getBoundActions(s),((s,i)=>{let u=this.system.statePlugins[i.slice(0,-7)].wrapActions;return u?objMap(s,((s,i)=>{let _=u[i];return _?(Array.isArray(_)||(_=[_]),_.reduce(((s,i)=>{let newAction=(...u)=>i(s,this.getSystem())(...u);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction)}),s||Function.prototype)):s})):s}))}getWrappedAndBoundSelectors(s,i){return objMap(this.getBoundSelectors(s,i),((i,u)=>{let _=[u.slice(0,-9)],w=this.system.statePlugins[_].wrapSelectors;return w?objMap(i,((i,u)=>{let x=w[u];return x?(Array.isArray(x)||(x=[x]),x.reduce(((i,u)=>{let wrappedSelector=(...w)=>u(i,this.getSystem())(s().getIn(_),...w);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),i||Function.prototype)):i})):i}))}getStates(s){return Object.keys(this.system.statePlugins).reduce(((i,u)=>(i[u]=s.get(u),i)),{})}getStateThunks(s){return Object.keys(this.system.statePlugins).reduce(((i,u)=>(i[u]=()=>s().get(u),i)),{})}getFn(){return{fn:this.system.fn}}getComponents(s){const i=this.system.components[s];return Array.isArray(i)?i.reduce(((s,i)=>i(s,this.getSystem()))):void 0!==s?this.system.components[s]:this.system.components}getBoundSelectors(s,i){return objMap(this.getSelectors(),((u,_)=>{let w=[_.slice(0,-9)];return objMap(u,(u=>(..._)=>{let x=wrapWithTryCatch(u).apply(null,[s().getIn(w),..._]);return\"function\"==typeof x&&(x=wrapWithTryCatch(x)(i())),x}))}))}getBoundActions(s){s=s||this.getStore().dispatch;const i=this.getActions(),process=s=>\"function\"!=typeof s?objMap(s,(s=>process(s))):(...i)=>{var u=null;try{u=s(...i)}catch(s){u={type:ot,error:!0,payload:(0,tt.serializeError)(s)}}finally{return u}};return objMap(i,(i=>function bindActionCreators(s,i){if(\"function\"==typeof s)return bindActionCreator(s,i);if(\"object\"!=typeof s||null===s)throw new Error(formatProdErrorMessage(16));const u={};for(const _ in s){const w=s[_];\"function\"==typeof w&&(u[_]=bindActionCreator(w,i))}return u}(process(i),s)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(s){return i=>ze()({},this.getWrappedAndBoundActions(i),this.getFn(),s)}}function combinePlugins(s,i,u){if(isObject(s)&&!isArray(s))return nt()({},s);if(isFunc(s))return combinePlugins(s(i),i,u);if(isArray(s)){const _=\"chain\"===u.pluginLoadType?i.getComponents():{};return s.map((s=>combinePlugins(s,i,u))).reduce(systemExtend,_)}return{}}function callAfterLoad(s,i,{hasLoaded:u}={}){let _=u;return isObject(s)&&!isArray(s)&&\"function\"==typeof s.afterLoad&&(_=!0,wrapWithTryCatch(s.afterLoad).call(this,i)),isFunc(s)?callAfterLoad.call(this,s(i),i,{hasLoaded:_}):isArray(s)?s.map((s=>callAfterLoad.call(this,s,i,{hasLoaded:_}))):_}function systemExtend(s={},i={}){if(!isObject(s))return{};if(!isObject(i))return s;i.wrapComponents&&(objMap(i.wrapComponents,((u,_)=>{const w=s.components&&s.components[_];w&&Array.isArray(w)?(s.components[_]=w.concat([u]),delete i.wrapComponents[_]):w&&(s.components[_]=[w,u],delete i.wrapComponents[_])})),Object.keys(i.wrapComponents).length||delete i.wrapComponents);const{statePlugins:u}=s;if(isObject(u))for(let s in u){const _=u[s];if(!isObject(_))continue;const{wrapActions:w,wrapSelectors:x}=_;if(isObject(w))for(let u in w){let _=w[u];Array.isArray(_)||(_=[_],w[u]=_),i&&i.statePlugins&&i.statePlugins[s]&&i.statePlugins[s].wrapActions&&i.statePlugins[s].wrapActions[u]&&(i.statePlugins[s].wrapActions[u]=w[u].concat(i.statePlugins[s].wrapActions[u]))}if(isObject(x))for(let u in x){let _=x[u];Array.isArray(_)||(_=[_],x[u]=_),i&&i.statePlugins&&i.statePlugins[s]&&i.statePlugins[s].wrapSelectors&&i.statePlugins[s].wrapSelectors[u]&&(i.statePlugins[s].wrapSelectors[u]=x[u].concat(i.statePlugins[s].wrapSelectors[u]))}}return ze()(s,i)}function wrapWithTryCatch(s,{logErrors:i=!0}={}){return\"function\"!=typeof s?s:function(...u){try{return s.call(this,...u)}catch(s){return i&&console.error(s),null}}}var Rt=__webpack_require__(61160),Dt=__webpack_require__.n(Rt);const Lt=\"show_popup\",Bt=\"authorize\",Ft=\"logout\",qt=\"pre_authorize_oauth2\",$t=\"authorize_oauth2\",Ut=\"validate\",zt=\"configure_auth\",Vt=\"restore_authorization\";function showDefinitions(s){return{type:Lt,payload:s}}function authorize(s){return{type:Bt,payload:s}}const authorizeWithPersistOption=s=>({authActions:i})=>{i.authorize(s),i.persistAuthorizationIfNeeded()};function logout(s){return{type:Ft,payload:s}}const logoutWithPersistOption=s=>({authActions:i})=>{i.logout(s),i.persistAuthorizationIfNeeded()},preAuthorizeImplicit=s=>({authActions:i,errActions:u})=>{let{auth:_,token:w,isValid:x}=s,{schema:j,name:P}=_,B=j.get(\"flow\");delete pt.swaggerUIRedirectOauth2,\"accessCode\"===B||x||u.newAuthErr({authId:P,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),w.error?u.newAuthErr({authId:P,source:\"auth\",level:\"error\",message:JSON.stringify(w)}):i.authorizeOauth2WithPersistOption({auth:_,token:w})};function authorizeOauth2(s){return{type:$t,payload:s}}const authorizeOauth2WithPersistOption=s=>({authActions:i})=>{i.authorizeOauth2(s),i.persistAuthorizationIfNeeded()},authorizePassword=s=>({authActions:i})=>{let{schema:u,name:_,username:w,password:x,passwordType:j,clientId:P,clientSecret:B}=s,$={grant_type:\"password\",scope:s.scopes.join(\" \"),username:w,password:x},U={};switch(j){case\"request-body\":!function setClientIdAndSecret(s,i,u){i&&Object.assign(s,{client_id:i});u&&Object.assign(s,{client_secret:u})}($,P,B);break;case\"basic\":U.Authorization=\"Basic \"+utils_btoa(P+\":\"+B);break;default:console.warn(`Warning: invalid passwordType ${j} was passed, not including client id and secret`)}return i.authorizeRequest({body:buildFormData($),url:u.get(\"tokenUrl\"),name:_,headers:U,query:{},auth:s})};const authorizeApplication=s=>({authActions:i})=>{let{schema:u,scopes:_,name:w,clientId:x,clientSecret:j}=s,P={Authorization:\"Basic \"+utils_btoa(x+\":\"+j)},B={grant_type:\"client_credentials\",scope:_.join(\" \")};return i.authorizeRequest({body:buildFormData(B),name:w,url:u.get(\"tokenUrl\"),auth:s,headers:P})},authorizeAccessCodeWithFormParams=({auth:s,redirectUrl:i})=>({authActions:u})=>{let{schema:_,name:w,clientId:x,clientSecret:j,codeVerifier:P}=s,B={grant_type:\"authorization_code\",code:s.code,client_id:x,client_secret:j,redirect_uri:i,code_verifier:P};return u.authorizeRequest({body:buildFormData(B),name:w,url:_.get(\"tokenUrl\"),auth:s})},authorizeAccessCodeWithBasicAuthentication=({auth:s,redirectUrl:i})=>({authActions:u})=>{let{schema:_,name:w,clientId:x,clientSecret:j,codeVerifier:P}=s,B={Authorization:\"Basic \"+utils_btoa(x+\":\"+j)},$={grant_type:\"authorization_code\",code:s.code,client_id:x,redirect_uri:i,code_verifier:P};return u.authorizeRequest({body:buildFormData($),name:w,url:_.get(\"tokenUrl\"),auth:s,headers:B})},authorizeRequest=s=>({fn:i,getConfigs:u,authActions:_,errActions:w,oas3Selectors:x,specSelectors:j,authSelectors:P})=>{let B,{body:$,query:U={},headers:Y={},name:X,url:Z,auth:ee}=s,{additionalQueryStringParams:ie}=P.getConfigs()||{};if(j.isOAS3()){let s=x.serverEffectiveValue(x.selectedServer());B=Dt()(Z,s,!0)}else B=Dt()(Z,j.url(),!0);\"object\"==typeof ie&&(B.query=Object.assign({},B.query,ie));const ae=B.toString();let le=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},Y);i.fetch({url:ae,method:\"post\",headers:le,query:U,body:$,requestInterceptor:u().requestInterceptor,responseInterceptor:u().responseInterceptor}).then((function(s){let i=JSON.parse(s.data),u=i&&(i.error||\"\"),x=i&&(i.parseError||\"\");s.ok?u||x?w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:JSON.stringify(i)}):_.authorizeOauth2WithPersistOption({auth:ee,token:i}):w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:s.statusText})})).catch((s=>{let i=new Error(s).message;if(s.response&&s.response.data){const u=s.response.data;try{const s=\"string\"==typeof u?JSON.parse(u):u;s.error&&(i+=`, error: ${s.error}`),s.error_description&&(i+=`, description: ${s.error_description}`)}catch(s){}}w.newAuthErr({authId:X,level:\"error\",source:\"auth\",message:i})}))};function configureAuth(s){return{type:zt,payload:s}}function restoreAuthorization(s){return{type:Vt,payload:s}}const persistAuthorizationIfNeeded=()=>({authSelectors:s,getConfigs:i})=>{if(!i().persistAuthorization)return;const u=s.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(u))},authPopup=(s,i)=>()=>{pt.swaggerUIRedirectOauth2=i,pt.open(s)},Wt={[Lt]:(s,{payload:i})=>s.set(\"showDefinitions\",i),[Bt]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(i),_=s.get(\"authorized\")||(0,Xe.Map)();return u.entrySeq().forEach((([i,u])=>{if(!isFunc(u.getIn))return s.set(\"authorized\",_);let w=u.getIn([\"schema\",\"type\"]);if(\"apiKey\"===w||\"http\"===w)_=_.set(i,u);else if(\"basic\"===w){let s=u.getIn([\"value\",\"username\"]),w=u.getIn([\"value\",\"password\"]);_=_.setIn([i,\"value\"],{username:s,header:\"Basic \"+utils_btoa(s+\":\"+w)}),_=_.setIn([i,\"schema\"],u.get(\"schema\"))}})),s.set(\"authorized\",_)},[$t]:(s,{payload:i})=>{let u,{auth:_,token:w}=i;_.token=Object.assign({},w),u=(0,Xe.fromJS)(_);let x=s.get(\"authorized\")||(0,Xe.Map)();return x=x.set(u.get(\"name\"),u),s.set(\"authorized\",x)},[Ft]:(s,{payload:i})=>{let u=s.get(\"authorized\").withMutations((s=>{i.forEach((i=>{s.delete(i)}))}));return s.set(\"authorized\",u)},[zt]:(s,{payload:i})=>s.set(\"configs\",i),[Vt]:(s,{payload:i})=>s.set(\"authorized\",(0,Xe.fromJS)(i.authorized))};function assertIsFunction(s,i=\"expected a function, instead received \"+typeof s){if(\"function\"!=typeof s)throw new TypeError(i)}var ensureIsArray=s=>Array.isArray(s)?s:[s];function getDependencies(s){const i=Array.isArray(s[0])?s[0]:s;return function assertIsArrayOfFunctions(s,i=\"expected all items to be functions, instead received the following types: \"){if(!s.every((s=>\"function\"==typeof s))){const u=s.map((s=>\"function\"==typeof s?`function ${s.name||\"unnamed\"}()`:typeof s)).join(\", \");throw new TypeError(`${i}[${u}]`)}}(i,\"createSelector expects all input-selectors to be functions, but received the following types: \"),i}Symbol(),Object.getPrototypeOf({});var Kt=\"undefined\"!=typeof WeakRef?WeakRef:class{constructor(s){this.value=s}deref(){return this.value}},Ht=0,Jt=1;function createCacheNode(){return{s:Ht,v:void 0,o:null,p:null}}function weakMapMemoize(s,i={}){let u=createCacheNode();const{resultEqualityCheck:_}=i;let w,x=0;function memoized(){let i=u;const{length:j}=arguments;for(let s=0,u=j;s<u;s++){const u=arguments[s];if(\"function\"==typeof u||\"object\"==typeof u&&null!==u){let s=i.o;null===s&&(i.o=s=new WeakMap);const _=s.get(u);void 0===_?(i=createCacheNode(),s.set(u,i)):i=_}else{let s=i.p;null===s&&(i.p=s=new Map);const _=s.get(u);void 0===_?(i=createCacheNode(),s.set(u,i)):i=_}}const P=i;let B;if(i.s===Jt?B=i.v:(B=s.apply(null,arguments),x++),P.s=Jt,_){const s=w?.deref?.()??w;null!=s&&_(s,B)&&(B=s,0!==x&&x--);w=\"object\"==typeof B&&null!==B||\"function\"==typeof B?new Kt(B):B}return P.v=B,B}return memoized.clearCache=()=>{u=createCacheNode(),memoized.resetResultsCount()},memoized.resultsCount=()=>x,memoized.resetResultsCount=()=>{x=0},memoized}function createSelectorCreator(s,...i){const u=\"function\"==typeof s?{memoize:s,memoizeOptions:i}:s,createSelector2=(...s)=>{let i,_=0,w=0,x={},j=s.pop();\"object\"==typeof j&&(x=j,j=s.pop()),assertIsFunction(j,`createSelector expects an output function after the inputs, but received: [${typeof j}]`);const P={...u,...x},{memoize:B,memoizeOptions:$=[],argsMemoize:U=weakMapMemoize,argsMemoizeOptions:Y=[],devModeChecks:X={}}=P,Z=ensureIsArray($),ee=ensureIsArray(Y),ie=getDependencies(s),ae=B((function recomputationWrapper(){return _++,j.apply(null,arguments)}),...Z);const le=U((function dependenciesChecker(){w++;const s=function collectInputSelectorResults(s,i){const u=[],{length:_}=s;for(let w=0;w<_;w++)u.push(s[w].apply(null,i));return u}(ie,arguments);return i=ae.apply(null,s),i}),...ee);return Object.assign(le,{resultFunc:j,memoizedResultFunc:ae,dependencies:ie,dependencyRecomputations:()=>w,resetDependencyRecomputations:()=>{w=0},lastResult:()=>i,recomputations:()=>_,resetRecomputations:()=>{_=0},memoize:B,argsMemoize:U})};return Object.assign(createSelector2,{withTypes:()=>createSelector2}),createSelector2}var Gt=createSelectorCreator(weakMapMemoize),Yt=Object.assign(((s,i=Gt)=>{!function assertIsObject(s,i=\"expected an object, instead received \"+typeof s){if(\"object\"!=typeof s)throw new TypeError(i)}(s,\"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a \"+typeof s);const u=Object.keys(s);return i(u.map((i=>s[i])),((...s)=>s.reduce(((s,i,_)=>(s[u[_]]=i,s)),{})))}),{withTypes:()=>Yt});const state=s=>s,Xt=Gt(state,(s=>s.get(\"showDefinitions\"))),Qt=Gt(state,(()=>({specSelectors:s})=>{let i=s.securityDefinitions()||(0,Xe.Map)({}),u=(0,Xe.List)();return i.entrySeq().forEach((([s,i])=>{let _=(0,Xe.Map)();_=_.set(s,i),u=u.push(_)})),u})),getDefinitionsByNames=(s,i)=>({specSelectors:s})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let u=s.securityDefinitions(),_=(0,Xe.List)();return i.valueSeq().forEach((s=>{let i=(0,Xe.Map)();s.entrySeq().forEach((([s,_])=>{let w,x=u.get(s);\"oauth2\"===x.get(\"type\")&&_.size&&(w=x.get(\"scopes\"),w.keySeq().forEach((s=>{_.contains(s)||(w=w.delete(s))})),x=x.set(\"allowedScopes\",w)),i=i.set(s,x)})),_=_.push(i)})),_},definitionsForRequirements=(s,i=(0,Xe.List)())=>({authSelectors:s})=>{const u=s.definitionsToAuthorize()||(0,Xe.List)();let _=(0,Xe.List)();return u.forEach((s=>{let u=i.find((i=>i.get(s.keySeq().first())));u&&(s.forEach(((i,_)=>{if(\"oauth2\"===i.get(\"type\")){const w=u.get(_);let x=i.get(\"scopes\");Xe.List.isList(w)&&Xe.Map.isMap(x)&&(x.keySeq().forEach((s=>{w.contains(s)||(x=x.delete(s))})),s=s.set(_,i.set(\"scopes\",x)))}})),_=_.push(s))})),_},Zt=Gt(state,(s=>s.get(\"authorized\")||(0,Xe.Map)())),isAuthorized=(s,i)=>({authSelectors:s})=>{let u=s.authorized();return Xe.List.isList(i)?!!i.toJS().filter((s=>-1===Object.keys(s).map((s=>!!u.get(s))).indexOf(!1))).length:null},er=Gt(state,(s=>s.get(\"configs\"))),execute=(s,{authSelectors:i,specSelectors:u})=>({path:_,method:w,operation:x,extras:j})=>{let P={authorized:i.authorized()&&i.authorized().toJS(),definitions:u.securityDefinitions()&&u.securityDefinitions().toJS(),specSecurity:u.security()&&u.security().toJS()};return s({path:_,method:w,operation:x,securities:P,...j})},loaded=(s,i)=>u=>{const{getConfigs:_,authActions:w}=i,x=_();if(s(u),x.persistAuthorization){const s=localStorage.getItem(\"authorized\");s&&w.restoreAuthorization({authorized:JSON.parse(s)})}},wrap_actions_authorize=(s,i)=>u=>{s(u);if(i.getConfigs().persistAuthorization)try{const[{schema:s,value:i}]=Object.values(u),_=\"apiKey\"===s.get(\"type\"),w=\"cookie\"===s.get(\"in\");_&&w&&(document.cookie=`${s.get(\"name\")}=${i}; SameSite=None; Secure`)}catch(s){console.error(\"Error persisting cookie based apiKey in document.cookie.\",s)}},wrap_actions_logout=(s,i)=>u=>{const _=i.getConfigs(),w=i.authSelectors.authorized();try{_.persistAuthorization&&Array.isArray(u)&&u.forEach((s=>{const i=w.get(s,{}),u=\"apiKey\"===i.getIn([\"schema\",\"type\"]),_=\"cookie\"===i.getIn([\"schema\",\"in\"]);if(u&&_){const s=i.getIn([\"schema\",\"name\"]);document.cookie=`${s}=; Max-Age=-99999999`}}))}catch(s){console.error(\"Error deleting cookie based apiKey from document.cookie.\",s)}s(u)};var tr=__webpack_require__(90179),rr=__webpack_require__.n(tr);class LockAuthIcon extends We.Component{mapStateToProps(s,i){return{state:s,ownProps:rr()(i,Object.keys(i.getSystem()))}}render(){const{getComponent:s,ownProps:i}=this.props,u=s(\"LockIcon\");return We.createElement(u,i)}}const nr=LockAuthIcon;class UnlockAuthIcon extends We.Component{mapStateToProps(s,i){return{state:s,ownProps:rr()(i,Object.keys(i.getSystem()))}}render(){const{getComponent:s,ownProps:i}=this.props,u=s(\"UnlockIcon\");return We.createElement(u,i)}}const sr=UnlockAuthIcon;function auth(){return{afterLoad(s){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=s.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,s),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,s)},components:{LockAuthIcon:nr,UnlockAuthIcon:sr,LockAuthOperationIcon:nr,UnlockAuthOperationIcon:sr},statePlugins:{auth:{reducers:Wt,actions:i,selectors:u,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(s,i,u,_){const{authActions:{authorize:w},specSelectors:{specJson:x,isOAS3:j}}=s,P=j()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],B=x().getIn([...P,i]);return B?w({[i]:{value:{username:u,password:_},schema:B.toJS()}}):null}function preauthorizeApiKey(s,i,u){const{authActions:{authorize:_},specSelectors:{specJson:w,isOAS3:x}}=s,j=x()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],P=w().getIn([...j,i]);return P?_({[i]:{value:u,schema:P.toJS()}}):null}function isNothing(s){return null==s}var ir=function repeat(s,i){var u,_=\"\";for(u=0;u<i;u+=1)_+=s;return _},ar=function isNegativeZero(s){return 0===s&&Number.NEGATIVE_INFINITY===1/s},lr={isNothing,isObject:function js_yaml_isObject(s){return\"object\"==typeof s&&null!==s},toArray:function toArray(s){return Array.isArray(s)?s:isNothing(s)?[]:[s]},repeat:ir,isNegativeZero:ar,extend:function extend(s,i){var u,_,w,x;if(i)for(u=0,_=(x=Object.keys(i)).length;u<_;u+=1)s[w=x[u]]=i[w];return s}};function formatError(s,i){var u=\"\",_=s.reason||\"(unknown reason)\";return s.mark?(s.mark.name&&(u+='in \"'+s.mark.name+'\" '),u+=\"(\"+(s.mark.line+1)+\":\"+(s.mark.column+1)+\")\",!i&&s.mark.snippet&&(u+=\"\\n\\n\"+s.mark.snippet),_+\" \"+u):_}function YAMLException$1(s,i){Error.call(this),this.name=\"YAMLException\",this.reason=s,this.mark=i,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(s){return this.name+\": \"+formatError(this,s)};var cr=YAMLException$1;function getLine(s,i,u,_,w){var x=\"\",j=\"\",P=Math.floor(w/2)-1;return _-i>P&&(i=_-P+(x=\" ... \").length),u-_>P&&(u=_+P-(j=\" ...\").length),{str:x+s.slice(i,u).replace(/\\t/g,\"→\")+j,pos:_-i+x.length}}function padStart(s,i){return lr.repeat(\" \",i-s.length)+s}var ur=function makeSnippet(s,i){if(i=Object.create(i||null),!s.buffer)return null;i.maxLength||(i.maxLength=79),\"number\"!=typeof i.indent&&(i.indent=1),\"number\"!=typeof i.linesBefore&&(i.linesBefore=3),\"number\"!=typeof i.linesAfter&&(i.linesAfter=2);for(var u,_=/\\r?\\n|\\r|\\0/g,w=[0],x=[],j=-1;u=_.exec(s.buffer);)x.push(u.index),w.push(u.index+u[0].length),s.position<=u.index&&j<0&&(j=w.length-2);j<0&&(j=w.length-1);var P,B,$=\"\",U=Math.min(s.line+i.linesAfter,x.length).toString().length,Y=i.maxLength-(i.indent+U+3);for(P=1;P<=i.linesBefore&&!(j-P<0);P++)B=getLine(s.buffer,w[j-P],x[j-P],s.position-(w[j]-w[j-P]),Y),$=lr.repeat(\" \",i.indent)+padStart((s.line-P+1).toString(),U)+\" | \"+B.str+\"\\n\"+$;for(B=getLine(s.buffer,w[j],x[j],s.position,Y),$+=lr.repeat(\" \",i.indent)+padStart((s.line+1).toString(),U)+\" | \"+B.str+\"\\n\",$+=lr.repeat(\"-\",i.indent+U+3+B.pos)+\"^\\n\",P=1;P<=i.linesAfter&&!(j+P>=x.length);P++)B=getLine(s.buffer,w[j+P],x[j+P],s.position-(w[j]-w[j+P]),Y),$+=lr.repeat(\" \",i.indent)+padStart((s.line+P+1).toString(),U)+\" | \"+B.str+\"\\n\";return $.replace(/\\n$/,\"\")},pr=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],dr=[\"scalar\",\"sequence\",\"mapping\"];var fr=function Type$1(s,i){if(i=i||{},Object.keys(i).forEach((function(i){if(-1===pr.indexOf(i))throw new cr('Unknown option \"'+i+'\" is met in definition of \"'+s+'\" YAML type.')})),this.options=i,this.tag=s,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(s){return s},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=function compileStyleAliases(s){var i={};return null!==s&&Object.keys(s).forEach((function(u){s[u].forEach((function(s){i[String(s)]=u}))})),i}(i.styleAliases||null),-1===dr.indexOf(this.kind))throw new cr('Unknown kind \"'+this.kind+'\" is specified for \"'+s+'\" YAML type.')};function compileList(s,i){var u=[];return s[i].forEach((function(s){var i=u.length;u.forEach((function(u,_){u.tag===s.tag&&u.kind===s.kind&&u.multi===s.multi&&(i=_)})),u[i]=s})),u}function Schema$1(s){return this.extend(s)}Schema$1.prototype.extend=function extend(s){var i=[],u=[];if(s instanceof fr)u.push(s);else if(Array.isArray(s))u=u.concat(s);else{if(!s||!Array.isArray(s.implicit)&&!Array.isArray(s.explicit))throw new cr(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");s.implicit&&(i=i.concat(s.implicit)),s.explicit&&(u=u.concat(s.explicit))}i.forEach((function(s){if(!(s instanceof fr))throw new cr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(s.loadKind&&\"scalar\"!==s.loadKind)throw new cr(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(s.multi)throw new cr(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),u.forEach((function(s){if(!(s instanceof fr))throw new cr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var _=Object.create(Schema$1.prototype);return _.implicit=(this.implicit||[]).concat(i),_.explicit=(this.explicit||[]).concat(u),_.compiledImplicit=compileList(_,\"implicit\"),_.compiledExplicit=compileList(_,\"explicit\"),_.compiledTypeMap=function compileMap(){var s,i,u={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(s){s.multi?(u.multi[s.kind].push(s),u.multi.fallback.push(s)):u[s.kind][s.tag]=u.fallback[s.tag]=s}for(s=0,i=arguments.length;s<i;s+=1)arguments[s].forEach(collectType);return u}(_.compiledImplicit,_.compiledExplicit),_};var mr=Schema$1,gr=new fr(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(s){return null!==s?s:\"\"}}),yr=new fr(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(s){return null!==s?s:[]}}),vr=new fr(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(s){return null!==s?s:{}}}),br=new mr({explicit:[gr,yr,vr]});var _r=new fr(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(s){if(null===s)return!0;var i=s.length;return 1===i&&\"~\"===s||4===i&&(\"null\"===s||\"Null\"===s||\"NULL\"===s)},construct:function constructYamlNull(){return null},predicate:function isNull(s){return null===s},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var Er=new fr(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(s){if(null===s)return!1;var i=s.length;return 4===i&&(\"true\"===s||\"True\"===s||\"TRUE\"===s)||5===i&&(\"false\"===s||\"False\"===s||\"FALSE\"===s)},construct:function constructYamlBoolean(s){return\"true\"===s||\"True\"===s||\"TRUE\"===s},predicate:function isBoolean(s){return\"[object Boolean]\"===Object.prototype.toString.call(s)},represent:{lowercase:function(s){return s?\"true\":\"false\"},uppercase:function(s){return s?\"TRUE\":\"FALSE\"},camelcase:function(s){return s?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(s){return 48<=s&&s<=55}function isDecCode(s){return 48<=s&&s<=57}var wr=new fr(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(s){if(null===s)return!1;var i,u,_=s.length,w=0,x=!1;if(!_)return!1;if(\"-\"!==(i=s[w])&&\"+\"!==i||(i=s[++w]),\"0\"===i){if(w+1===_)return!0;if(\"b\"===(i=s[++w])){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(\"0\"!==i&&\"1\"!==i)return!1;x=!0}return x&&\"_\"!==i}if(\"x\"===i){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(!(48<=(u=s.charCodeAt(w))&&u<=57||65<=u&&u<=70||97<=u&&u<=102))return!1;x=!0}return x&&\"_\"!==i}if(\"o\"===i){for(w++;w<_;w++)if(\"_\"!==(i=s[w])){if(!isOctCode(s.charCodeAt(w)))return!1;x=!0}return x&&\"_\"!==i}}if(\"_\"===i)return!1;for(;w<_;w++)if(\"_\"!==(i=s[w])){if(!isDecCode(s.charCodeAt(w)))return!1;x=!0}return!(!x||\"_\"===i)},construct:function constructYamlInteger(s){var i,u=s,_=1;if(-1!==u.indexOf(\"_\")&&(u=u.replace(/_/g,\"\")),\"-\"!==(i=u[0])&&\"+\"!==i||(\"-\"===i&&(_=-1),i=(u=u.slice(1))[0]),\"0\"===u)return 0;if(\"0\"===i){if(\"b\"===u[1])return _*parseInt(u.slice(2),2);if(\"x\"===u[1])return _*parseInt(u.slice(2),16);if(\"o\"===u[1])return _*parseInt(u.slice(2),8)}return _*parseInt(u,10)},predicate:function isInteger(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&s%1==0&&!lr.isNegativeZero(s)},represent:{binary:function(s){return s>=0?\"0b\"+s.toString(2):\"-0b\"+s.toString(2).slice(1)},octal:function(s){return s>=0?\"0o\"+s.toString(8):\"-0o\"+s.toString(8).slice(1)},decimal:function(s){return s.toString(10)},hexadecimal:function(s){return s>=0?\"0x\"+s.toString(16).toUpperCase():\"-0x\"+s.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),Sr=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var xr=/^[-+]?[0-9]+e/;var kr=new fr(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(s){return null!==s&&!(!Sr.test(s)||\"_\"===s[s.length-1])},construct:function constructYamlFloat(s){var i,u;return u=\"-\"===(i=s.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(i[0])>=0&&(i=i.slice(1)),\".inf\"===i?1===u?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===i?NaN:u*parseFloat(i,10)},predicate:function isFloat(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&(s%1!=0||lr.isNegativeZero(s))},represent:function representYamlFloat(s,i){var u;if(isNaN(s))switch(i){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===s)switch(i){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===s)switch(i){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(lr.isNegativeZero(s))return\"-0.0\";return u=s.toString(10),xr.test(u)?u.replace(\"e\",\".e\"):u},defaultStyle:\"lowercase\"}),Or=br.extend({implicit:[_r,Er,wr,kr]}),Cr=Or,Ar=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),jr=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var Pr=new fr(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(s){return null!==s&&(null!==Ar.exec(s)||null!==jr.exec(s))},construct:function constructYamlTimestamp(s){var i,u,_,w,x,j,P,B,$=0,U=null;if(null===(i=Ar.exec(s))&&(i=jr.exec(s)),null===i)throw new Error(\"Date resolve error\");if(u=+i[1],_=+i[2]-1,w=+i[3],!i[4])return new Date(Date.UTC(u,_,w));if(x=+i[4],j=+i[5],P=+i[6],i[7]){for($=i[7].slice(0,3);$.length<3;)$+=\"0\";$=+$}return i[9]&&(U=6e4*(60*+i[10]+ +(i[11]||0)),\"-\"===i[9]&&(U=-U)),B=new Date(Date.UTC(u,_,w,x,j,P,$)),U&&B.setTime(B.getTime()-U),B},instanceOf:Date,represent:function representYamlTimestamp(s){return s.toISOString()}});var Ir=new fr(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(s){return\"<<\"===s||null===s}}),Nr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var Mr=new fr(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(s){if(null===s)return!1;var i,u,_=0,w=s.length,x=Nr;for(u=0;u<w;u++)if(!((i=x.indexOf(s.charAt(u)))>64)){if(i<0)return!1;_+=6}return _%8==0},construct:function constructYamlBinary(s){var i,u,_=s.replace(/[\\r\\n=]/g,\"\"),w=_.length,x=Nr,j=0,P=[];for(i=0;i<w;i++)i%4==0&&i&&(P.push(j>>16&255),P.push(j>>8&255),P.push(255&j)),j=j<<6|x.indexOf(_.charAt(i));return 0===(u=w%4*6)?(P.push(j>>16&255),P.push(j>>8&255),P.push(255&j)):18===u?(P.push(j>>10&255),P.push(j>>2&255)):12===u&&P.push(j>>4&255),new Uint8Array(P)},predicate:function isBinary(s){return\"[object Uint8Array]\"===Object.prototype.toString.call(s)},represent:function representYamlBinary(s){var i,u,_=\"\",w=0,x=s.length,j=Nr;for(i=0;i<x;i++)i%3==0&&i&&(_+=j[w>>18&63],_+=j[w>>12&63],_+=j[w>>6&63],_+=j[63&w]),w=(w<<8)+s[i];return 0===(u=x%3)?(_+=j[w>>18&63],_+=j[w>>12&63],_+=j[w>>6&63],_+=j[63&w]):2===u?(_+=j[w>>10&63],_+=j[w>>4&63],_+=j[w<<2&63],_+=j[64]):1===u&&(_+=j[w>>2&63],_+=j[w<<4&63],_+=j[64],_+=j[64]),_}}),Tr=Object.prototype.hasOwnProperty,Rr=Object.prototype.toString;var Dr=new fr(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(s){if(null===s)return!0;var i,u,_,w,x,j=[],P=s;for(i=0,u=P.length;i<u;i+=1){if(_=P[i],x=!1,\"[object Object]\"!==Rr.call(_))return!1;for(w in _)if(Tr.call(_,w)){if(x)return!1;x=!0}if(!x)return!1;if(-1!==j.indexOf(w))return!1;j.push(w)}return!0},construct:function constructYamlOmap(s){return null!==s?s:[]}}),Lr=Object.prototype.toString;var Br=new fr(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(s){if(null===s)return!0;var i,u,_,w,x,j=s;for(x=new Array(j.length),i=0,u=j.length;i<u;i+=1){if(_=j[i],\"[object Object]\"!==Lr.call(_))return!1;if(1!==(w=Object.keys(_)).length)return!1;x[i]=[w[0],_[w[0]]]}return!0},construct:function constructYamlPairs(s){if(null===s)return[];var i,u,_,w,x,j=s;for(x=new Array(j.length),i=0,u=j.length;i<u;i+=1)_=j[i],w=Object.keys(_),x[i]=[w[0],_[w[0]]];return x}}),Fr=Object.prototype.hasOwnProperty;var qr=new fr(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(s){if(null===s)return!0;var i,u=s;for(i in u)if(Fr.call(u,i)&&null!==u[i])return!1;return!0},construct:function constructYamlSet(s){return null!==s?s:{}}}),$r=Cr.extend({implicit:[Pr,Ir],explicit:[Mr,Dr,Br,qr]}),Ur=Object.prototype.hasOwnProperty,zr=1,Vr=2,Wr=3,Kr=4,Hr=1,Jr=2,Gr=3,Yr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Xr=/[\\x85\\u2028\\u2029]/,Qr=/[,\\[\\]\\{\\}]/,Zr=/^(?:!|!!|![a-z\\-]+!)$/i,en=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(s){return Object.prototype.toString.call(s)}function is_EOL(s){return 10===s||13===s}function is_WHITE_SPACE(s){return 9===s||32===s}function is_WS_OR_EOL(s){return 9===s||32===s||10===s||13===s}function is_FLOW_INDICATOR(s){return 44===s||91===s||93===s||123===s||125===s}function fromHexCode(s){var i;return 48<=s&&s<=57?s-48:97<=(i=32|s)&&i<=102?i-97+10:-1}function simpleEscapeSequence(s){return 48===s?\"\\0\":97===s?\"\u0007\":98===s?\"\\b\":116===s||9===s?\"\\t\":110===s?\"\\n\":118===s?\"\\v\":102===s?\"\\f\":114===s?\"\\r\":101===s?\"\u001b\":32===s?\" \":34===s?'\"':47===s?\"/\":92===s?\"\\\\\":78===s?\"\":95===s?\" \":76===s?\"\\u2028\":80===s?\"\\u2029\":\"\"}function charFromCodepoint(s){return s<=65535?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10),56320+(s-65536&1023))}for(var tn=new Array(256),rn=new Array(256),nn=0;nn<256;nn++)tn[nn]=simpleEscapeSequence(nn)?1:0,rn[nn]=simpleEscapeSequence(nn);function State$1(s,i){this.input=s,this.filename=i.filename||null,this.schema=i.schema||$r,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(s,i){var u={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return u.snippet=ur(u),new cr(i,u)}function throwError(s,i){throw generateError(s,i)}function throwWarning(s,i){s.onWarning&&s.onWarning.call(null,generateError(s,i))}var on={YAML:function handleYamlDirective(s,i,u){var _,w,x;null!==s.version&&throwError(s,\"duplication of %YAML directive\"),1!==u.length&&throwError(s,\"YAML directive accepts exactly one argument\"),null===(_=/^([0-9]+)\\.([0-9]+)$/.exec(u[0]))&&throwError(s,\"ill-formed argument of the YAML directive\"),w=parseInt(_[1],10),x=parseInt(_[2],10),1!==w&&throwError(s,\"unacceptable YAML version of the document\"),s.version=u[0],s.checkLineBreaks=x<2,1!==x&&2!==x&&throwWarning(s,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(s,i,u){var _,w;2!==u.length&&throwError(s,\"TAG directive accepts exactly two arguments\"),_=u[0],w=u[1],Zr.test(_)||throwError(s,\"ill-formed tag handle (first argument) of the TAG directive\"),Ur.call(s.tagMap,_)&&throwError(s,'there is a previously declared suffix for \"'+_+'\" tag handle'),en.test(w)||throwError(s,\"ill-formed tag prefix (second argument) of the TAG directive\");try{w=decodeURIComponent(w)}catch(i){throwError(s,\"tag prefix is malformed: \"+w)}s.tagMap[_]=w}};function captureSegment(s,i,u,_){var w,x,j,P;if(i<u){if(P=s.input.slice(i,u),_)for(w=0,x=P.length;w<x;w+=1)9===(j=P.charCodeAt(w))||32<=j&&j<=1114111||throwError(s,\"expected valid JSON character\");else Yr.test(P)&&throwError(s,\"the stream contains non-printable characters\");s.result+=P}}function mergeMappings(s,i,u,_){var w,x,j,P;for(lr.isObject(u)||throwError(s,\"cannot merge mappings; the provided source object is unacceptable\"),j=0,P=(w=Object.keys(u)).length;j<P;j+=1)x=w[j],Ur.call(i,x)||(i[x]=u[x],_[x]=!0)}function storeMappingPair(s,i,u,_,w,x,j,P,B){var $,U;if(Array.isArray(w))for($=0,U=(w=Array.prototype.slice.call(w)).length;$<U;$+=1)Array.isArray(w[$])&&throwError(s,\"nested arrays are not supported inside keys\"),\"object\"==typeof w&&\"[object Object]\"===_class(w[$])&&(w[$]=\"[object Object]\");if(\"object\"==typeof w&&\"[object Object]\"===_class(w)&&(w=\"[object Object]\"),w=String(w),null===i&&(i={}),\"tag:yaml.org,2002:merge\"===_)if(Array.isArray(x))for($=0,U=x.length;$<U;$+=1)mergeMappings(s,i,x[$],u);else mergeMappings(s,i,x,u);else s.json||Ur.call(u,w)||!Ur.call(i,w)||(s.line=j||s.line,s.lineStart=P||s.lineStart,s.position=B||s.position,throwError(s,\"duplicated mapping key\")),\"__proto__\"===w?Object.defineProperty(i,w,{configurable:!0,enumerable:!0,writable:!0,value:x}):i[w]=x,delete u[w];return i}function readLineBreak(s){var i;10===(i=s.input.charCodeAt(s.position))?s.position++:13===i?(s.position++,10===s.input.charCodeAt(s.position)&&s.position++):throwError(s,\"a line break is expected\"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function skipSeparationSpace(s,i,u){for(var _=0,w=s.input.charCodeAt(s.position);0!==w;){for(;is_WHITE_SPACE(w);)9===w&&-1===s.firstTabInLine&&(s.firstTabInLine=s.position),w=s.input.charCodeAt(++s.position);if(i&&35===w)do{w=s.input.charCodeAt(++s.position)}while(10!==w&&13!==w&&0!==w);if(!is_EOL(w))break;for(readLineBreak(s),w=s.input.charCodeAt(s.position),_++,s.lineIndent=0;32===w;)s.lineIndent++,w=s.input.charCodeAt(++s.position)}return-1!==u&&0!==_&&s.lineIndent<u&&throwWarning(s,\"deficient indentation\"),_}function testDocumentSeparator(s){var i,u=s.position;return!(45!==(i=s.input.charCodeAt(u))&&46!==i||i!==s.input.charCodeAt(u+1)||i!==s.input.charCodeAt(u+2)||(u+=3,0!==(i=s.input.charCodeAt(u))&&!is_WS_OR_EOL(i)))}function writeFoldedLines(s,i){1===i?s.result+=\" \":i>1&&(s.result+=lr.repeat(\"\\n\",i-1))}function readBlockSequence(s,i){var u,_,w=s.tag,x=s.anchor,j=[],P=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=j),_=s.input.charCodeAt(s.position);0!==_&&(-1!==s.firstTabInLine&&(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),45===_)&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1));)if(P=!0,s.position++,skipSeparationSpace(s,!0,-1)&&s.lineIndent<=i)j.push(null),_=s.input.charCodeAt(s.position);else if(u=s.line,composeNode(s,i,Wr,!1,!0),j.push(s.result),skipSeparationSpace(s,!0,-1),_=s.input.charCodeAt(s.position),(s.line===u||s.lineIndent>i)&&0!==_)throwError(s,\"bad indentation of a sequence entry\");else if(s.lineIndent<i)break;return!!P&&(s.tag=w,s.anchor=x,s.kind=\"sequence\",s.result=j,!0)}function readTagProperty(s){var i,u,_,w,x=!1,j=!1;if(33!==(w=s.input.charCodeAt(s.position)))return!1;if(null!==s.tag&&throwError(s,\"duplication of a tag property\"),60===(w=s.input.charCodeAt(++s.position))?(x=!0,w=s.input.charCodeAt(++s.position)):33===w?(j=!0,u=\"!!\",w=s.input.charCodeAt(++s.position)):u=\"!\",i=s.position,x){do{w=s.input.charCodeAt(++s.position)}while(0!==w&&62!==w);s.position<s.length?(_=s.input.slice(i,s.position),w=s.input.charCodeAt(++s.position)):throwError(s,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==w&&!is_WS_OR_EOL(w);)33===w&&(j?throwError(s,\"tag suffix cannot contain exclamation marks\"):(u=s.input.slice(i-1,s.position+1),Zr.test(u)||throwError(s,\"named tag handle cannot contain such characters\"),j=!0,i=s.position+1)),w=s.input.charCodeAt(++s.position);_=s.input.slice(i,s.position),Qr.test(_)&&throwError(s,\"tag suffix cannot contain flow indicator characters\")}_&&!en.test(_)&&throwError(s,\"tag name cannot contain such characters: \"+_);try{_=decodeURIComponent(_)}catch(i){throwError(s,\"tag name is malformed: \"+_)}return x?s.tag=_:Ur.call(s.tagMap,u)?s.tag=s.tagMap[u]+_:\"!\"===u?s.tag=\"!\"+_:\"!!\"===u?s.tag=\"tag:yaml.org,2002:\"+_:throwError(s,'undeclared tag handle \"'+u+'\"'),!0}function readAnchorProperty(s){var i,u;if(38!==(u=s.input.charCodeAt(s.position)))return!1;for(null!==s.anchor&&throwError(s,\"duplication of an anchor property\"),u=s.input.charCodeAt(++s.position),i=s.position;0!==u&&!is_WS_OR_EOL(u)&&!is_FLOW_INDICATOR(u);)u=s.input.charCodeAt(++s.position);return s.position===i&&throwError(s,\"name of an anchor node must contain at least one character\"),s.anchor=s.input.slice(i,s.position),!0}function composeNode(s,i,u,_,w){var x,j,P,B,$,U,Y,X,Z,ee=1,ie=!1,ae=!1;if(null!==s.listener&&s.listener(\"open\",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null,x=j=P=Kr===u||Wr===u,_&&skipSeparationSpace(s,!0,-1)&&(ie=!0,s.lineIndent>i?ee=1:s.lineIndent===i?ee=0:s.lineIndent<i&&(ee=-1)),1===ee)for(;readTagProperty(s)||readAnchorProperty(s);)skipSeparationSpace(s,!0,-1)?(ie=!0,P=x,s.lineIndent>i?ee=1:s.lineIndent===i?ee=0:s.lineIndent<i&&(ee=-1)):P=!1;if(P&&(P=ie||w),1!==ee&&Kr!==u||(X=zr===u||Vr===u?i:i+1,Z=s.position-s.lineStart,1===ee?P&&(readBlockSequence(s,Z)||function readBlockMapping(s,i,u){var _,w,x,j,P,B,$,U=s.tag,Y=s.anchor,X={},Z=Object.create(null),ee=null,ie=null,ae=null,le=!1,ce=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=X),$=s.input.charCodeAt(s.position);0!==$;){if(le||-1===s.firstTabInLine||(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),_=s.input.charCodeAt(s.position+1),x=s.line,63!==$&&58!==$||!is_WS_OR_EOL(_)){if(j=s.line,P=s.lineStart,B=s.position,!composeNode(s,u,Vr,!1,!0))break;if(s.line===x){for($=s.input.charCodeAt(s.position);is_WHITE_SPACE($);)$=s.input.charCodeAt(++s.position);if(58===$)is_WS_OR_EOL($=s.input.charCodeAt(++s.position))||throwError(s,\"a whitespace character is expected after the key-value separator within a block mapping\"),le&&(storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ee=ie=ae=null),ce=!0,le=!1,w=!1,ee=s.tag,ie=s.result;else{if(!ce)return s.tag=U,s.anchor=Y,!0;throwError(s,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!ce)return s.tag=U,s.anchor=Y,!0;throwError(s,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===$?(le&&(storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ee=ie=ae=null),ce=!0,le=!0,w=!0):le?(le=!1,w=!0):throwError(s,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),s.position+=1,$=_;if((s.line===x||s.lineIndent>i)&&(le&&(j=s.line,P=s.lineStart,B=s.position),composeNode(s,i,Kr,!0,w)&&(le?ie=s.result:ae=s.result),le||(storeMappingPair(s,X,Z,ee,ie,ae,j,P,B),ee=ie=ae=null),skipSeparationSpace(s,!0,-1),$=s.input.charCodeAt(s.position)),(s.line===x||s.lineIndent>i)&&0!==$)throwError(s,\"bad indentation of a mapping entry\");else if(s.lineIndent<i)break}return le&&storeMappingPair(s,X,Z,ee,ie,null,j,P,B),ce&&(s.tag=U,s.anchor=Y,s.kind=\"mapping\",s.result=X),ce}(s,Z,X))||function readFlowCollection(s,i){var u,_,w,x,j,P,B,$,U,Y,X,Z,ee=!0,ie=s.tag,ae=s.anchor,le=Object.create(null);if(91===(Z=s.input.charCodeAt(s.position)))j=93,$=!1,x=[];else{if(123!==Z)return!1;j=125,$=!0,x={}}for(null!==s.anchor&&(s.anchorMap[s.anchor]=x),Z=s.input.charCodeAt(++s.position);0!==Z;){if(skipSeparationSpace(s,!0,i),(Z=s.input.charCodeAt(s.position))===j)return s.position++,s.tag=ie,s.anchor=ae,s.kind=$?\"mapping\":\"sequence\",s.result=x,!0;ee?44===Z&&throwError(s,\"expected the node content, but found ','\"):throwError(s,\"missed comma between flow collection entries\"),X=null,P=B=!1,63===Z&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1))&&(P=B=!0,s.position++,skipSeparationSpace(s,!0,i)),u=s.line,_=s.lineStart,w=s.position,composeNode(s,i,zr,!1,!0),Y=s.tag,U=s.result,skipSeparationSpace(s,!0,i),Z=s.input.charCodeAt(s.position),!B&&s.line!==u||58!==Z||(P=!0,Z=s.input.charCodeAt(++s.position),skipSeparationSpace(s,!0,i),composeNode(s,i,zr,!1,!0),X=s.result),$?storeMappingPair(s,x,le,Y,U,X,u,_,w):P?x.push(storeMappingPair(s,null,le,Y,U,X,u,_,w)):x.push(U),skipSeparationSpace(s,!0,i),44===(Z=s.input.charCodeAt(s.position))?(ee=!0,Z=s.input.charCodeAt(++s.position)):ee=!1}throwError(s,\"unexpected end of the stream within a flow collection\")}(s,X)?ae=!0:(j&&function readBlockScalar(s,i){var u,_,w,x,j,P=Hr,B=!1,$=!1,U=i,Y=0,X=!1;if(124===(x=s.input.charCodeAt(s.position)))_=!1;else{if(62!==x)return!1;_=!0}for(s.kind=\"scalar\",s.result=\"\";0!==x;)if(43===(x=s.input.charCodeAt(++s.position))||45===x)Hr===P?P=43===x?Gr:Jr:throwError(s,\"repeat of a chomping mode identifier\");else{if(!((w=48<=(j=x)&&j<=57?j-48:-1)>=0))break;0===w?throwError(s,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):$?throwError(s,\"repeat of an indentation width identifier\"):(U=i+w-1,$=!0)}if(is_WHITE_SPACE(x)){do{x=s.input.charCodeAt(++s.position)}while(is_WHITE_SPACE(x));if(35===x)do{x=s.input.charCodeAt(++s.position)}while(!is_EOL(x)&&0!==x)}for(;0!==x;){for(readLineBreak(s),s.lineIndent=0,x=s.input.charCodeAt(s.position);(!$||s.lineIndent<U)&&32===x;)s.lineIndent++,x=s.input.charCodeAt(++s.position);if(!$&&s.lineIndent>U&&(U=s.lineIndent),is_EOL(x))Y++;else{if(s.lineIndent<U){P===Gr?s.result+=lr.repeat(\"\\n\",B?1+Y:Y):P===Hr&&B&&(s.result+=\"\\n\");break}for(_?is_WHITE_SPACE(x)?(X=!0,s.result+=lr.repeat(\"\\n\",B?1+Y:Y)):X?(X=!1,s.result+=lr.repeat(\"\\n\",Y+1)):0===Y?B&&(s.result+=\" \"):s.result+=lr.repeat(\"\\n\",Y):s.result+=lr.repeat(\"\\n\",B?1+Y:Y),B=!0,$=!0,Y=0,u=s.position;!is_EOL(x)&&0!==x;)x=s.input.charCodeAt(++s.position);captureSegment(s,u,s.position,!1)}}return!0}(s,X)||function readSingleQuotedScalar(s,i){var u,_,w;if(39!==(u=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,_=w=s.position;0!==(u=s.input.charCodeAt(s.position));)if(39===u){if(captureSegment(s,_,s.position,!0),39!==(u=s.input.charCodeAt(++s.position)))return!0;_=s.position,s.position++,w=s.position}else is_EOL(u)?(captureSegment(s,_,w,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,i)),_=w=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a single quoted scalar\"):(s.position++,w=s.position);throwError(s,\"unexpected end of the stream within a single quoted scalar\")}(s,X)||function readDoubleQuotedScalar(s,i){var u,_,w,x,j,P,B;if(34!==(P=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,u=_=s.position;0!==(P=s.input.charCodeAt(s.position));){if(34===P)return captureSegment(s,u,s.position,!0),s.position++,!0;if(92===P){if(captureSegment(s,u,s.position,!0),is_EOL(P=s.input.charCodeAt(++s.position)))skipSeparationSpace(s,!1,i);else if(P<256&&tn[P])s.result+=rn[P],s.position++;else if((j=120===(B=P)?2:117===B?4:85===B?8:0)>0){for(w=j,x=0;w>0;w--)(j=fromHexCode(P=s.input.charCodeAt(++s.position)))>=0?x=(x<<4)+j:throwError(s,\"expected hexadecimal character\");s.result+=charFromCodepoint(x),s.position++}else throwError(s,\"unknown escape sequence\");u=_=s.position}else is_EOL(P)?(captureSegment(s,u,_,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,i)),u=_=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a double quoted scalar\"):(s.position++,_=s.position)}throwError(s,\"unexpected end of the stream within a double quoted scalar\")}(s,X)?ae=!0:!function readAlias(s){var i,u,_;if(42!==(_=s.input.charCodeAt(s.position)))return!1;for(_=s.input.charCodeAt(++s.position),i=s.position;0!==_&&!is_WS_OR_EOL(_)&&!is_FLOW_INDICATOR(_);)_=s.input.charCodeAt(++s.position);return s.position===i&&throwError(s,\"name of an alias node must contain at least one character\"),u=s.input.slice(i,s.position),Ur.call(s.anchorMap,u)||throwError(s,'unidentified alias \"'+u+'\"'),s.result=s.anchorMap[u],skipSeparationSpace(s,!0,-1),!0}(s)?function readPlainScalar(s,i,u){var _,w,x,j,P,B,$,U,Y=s.kind,X=s.result;if(is_WS_OR_EOL(U=s.input.charCodeAt(s.position))||is_FLOW_INDICATOR(U)||35===U||38===U||42===U||33===U||124===U||62===U||39===U||34===U||37===U||64===U||96===U)return!1;if((63===U||45===U)&&(is_WS_OR_EOL(_=s.input.charCodeAt(s.position+1))||u&&is_FLOW_INDICATOR(_)))return!1;for(s.kind=\"scalar\",s.result=\"\",w=x=s.position,j=!1;0!==U;){if(58===U){if(is_WS_OR_EOL(_=s.input.charCodeAt(s.position+1))||u&&is_FLOW_INDICATOR(_))break}else if(35===U){if(is_WS_OR_EOL(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&testDocumentSeparator(s)||u&&is_FLOW_INDICATOR(U))break;if(is_EOL(U)){if(P=s.line,B=s.lineStart,$=s.lineIndent,skipSeparationSpace(s,!1,-1),s.lineIndent>=i){j=!0,U=s.input.charCodeAt(s.position);continue}s.position=x,s.line=P,s.lineStart=B,s.lineIndent=$;break}}j&&(captureSegment(s,w,x,!1),writeFoldedLines(s,s.line-P),w=x=s.position,j=!1),is_WHITE_SPACE(U)||(x=s.position+1),U=s.input.charCodeAt(++s.position)}return captureSegment(s,w,x,!1),!!s.result||(s.kind=Y,s.result=X,!1)}(s,X,zr===u)&&(ae=!0,null===s.tag&&(s.tag=\"?\")):(ae=!0,null===s.tag&&null===s.anchor||throwError(s,\"alias node should not have any properties\")),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):0===ee&&(ae=P&&readBlockSequence(s,Z))),null===s.tag)null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);else if(\"?\"===s.tag){for(null!==s.result&&\"scalar\"!==s.kind&&throwError(s,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+s.kind+'\"'),B=0,$=s.implicitTypes.length;B<$;B+=1)if((Y=s.implicitTypes[B]).resolve(s.result)){s.result=Y.construct(s.result),s.tag=Y.tag,null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);break}}else if(\"!\"!==s.tag){if(Ur.call(s.typeMap[s.kind||\"fallback\"],s.tag))Y=s.typeMap[s.kind||\"fallback\"][s.tag];else for(Y=null,B=0,$=(U=s.typeMap.multi[s.kind||\"fallback\"]).length;B<$;B+=1)if(s.tag.slice(0,U[B].tag.length)===U[B].tag){Y=U[B];break}Y||throwError(s,\"unknown tag !<\"+s.tag+\">\"),null!==s.result&&Y.kind!==s.kind&&throwError(s,\"unacceptable node kind for !<\"+s.tag+'> tag; it should be \"'+Y.kind+'\", not \"'+s.kind+'\"'),Y.resolve(s.result,s.tag)?(s.result=Y.construct(s.result,s.tag),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):throwError(s,\"cannot resolve a node with !<\"+s.tag+\"> explicit tag\")}return null!==s.listener&&s.listener(\"close\",s),null!==s.tag||null!==s.anchor||ae}function readDocument(s){var i,u,_,w,x=s.position,j=!1;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);0!==(w=s.input.charCodeAt(s.position))&&(skipSeparationSpace(s,!0,-1),w=s.input.charCodeAt(s.position),!(s.lineIndent>0||37!==w));){for(j=!0,w=s.input.charCodeAt(++s.position),i=s.position;0!==w&&!is_WS_OR_EOL(w);)w=s.input.charCodeAt(++s.position);for(_=[],(u=s.input.slice(i,s.position)).length<1&&throwError(s,\"directive name must not be less than one character in length\");0!==w;){for(;is_WHITE_SPACE(w);)w=s.input.charCodeAt(++s.position);if(35===w){do{w=s.input.charCodeAt(++s.position)}while(0!==w&&!is_EOL(w));break}if(is_EOL(w))break;for(i=s.position;0!==w&&!is_WS_OR_EOL(w);)w=s.input.charCodeAt(++s.position);_.push(s.input.slice(i,s.position))}0!==w&&readLineBreak(s),Ur.call(on,u)?on[u](s,u,_):throwWarning(s,'unknown document directive \"'+u+'\"')}skipSeparationSpace(s,!0,-1),0===s.lineIndent&&45===s.input.charCodeAt(s.position)&&45===s.input.charCodeAt(s.position+1)&&45===s.input.charCodeAt(s.position+2)?(s.position+=3,skipSeparationSpace(s,!0,-1)):j&&throwError(s,\"directives end mark is expected\"),composeNode(s,s.lineIndent-1,Kr,!1,!0),skipSeparationSpace(s,!0,-1),s.checkLineBreaks&&Xr.test(s.input.slice(x,s.position))&&throwWarning(s,\"non-ASCII line breaks are interpreted as content\"),s.documents.push(s.result),s.position===s.lineStart&&testDocumentSeparator(s)?46===s.input.charCodeAt(s.position)&&(s.position+=3,skipSeparationSpace(s,!0,-1)):s.position<s.length-1&&throwError(s,\"end of the stream or a document separator is expected\")}function loadDocuments(s,i){i=i||{},0!==(s=String(s)).length&&(10!==s.charCodeAt(s.length-1)&&13!==s.charCodeAt(s.length-1)&&(s+=\"\\n\"),65279===s.charCodeAt(0)&&(s=s.slice(1)));var u=new State$1(s,i),_=s.indexOf(\"\\0\");for(-1!==_&&(u.position=_,throwError(u,\"null byte is not allowed in input\")),u.input+=\"\\0\";32===u.input.charCodeAt(u.position);)u.lineIndent+=1,u.position+=1;for(;u.position<u.length-1;)readDocument(u);return u.documents}var sn={loadAll:function loadAll$1(s,i,u){null!==i&&\"object\"==typeof i&&void 0===u&&(u=i,i=null);var _=loadDocuments(s,u);if(\"function\"!=typeof i)return _;for(var w=0,x=_.length;w<x;w+=1)i(_[w])},load:function load$1(s,i){var u=loadDocuments(s,i);if(0!==u.length){if(1===u.length)return u[0];throw new cr(\"expected a single document in the stream, but found more\")}}},an=Object.prototype.toString,ln=Object.prototype.hasOwnProperty,cn=65279,un=9,pn=10,hn=13,dn=32,fn=33,mn=34,gn=35,yn=37,vn=38,bn=39,_n=42,En=44,wn=45,Sn=58,xn=61,kn=62,On=63,Cn=64,An=91,jn=93,Pn=96,In=123,Nn=124,Mn=125,Tn={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Rn=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Dn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(s){var i,u,_;if(i=s.toString(16).toUpperCase(),s<=255)u=\"x\",_=2;else if(s<=65535)u=\"u\",_=4;else{if(!(s<=4294967295))throw new cr(\"code point within a string may not be greater than 0xFFFFFFFF\");u=\"U\",_=8}return\"\\\\\"+u+lr.repeat(\"0\",_-i.length)+i}var Ln=1,Bn=2;function State(s){this.schema=s.schema||$r,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=lr.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=function compileStyleMap(s,i){var u,_,w,x,j,P,B;if(null===i)return{};for(u={},w=0,x=(_=Object.keys(i)).length;w<x;w+=1)j=_[w],P=String(i[j]),\"!!\"===j.slice(0,2)&&(j=\"tag:yaml.org,2002:\"+j.slice(2)),(B=s.compiledTypeMap.fallback[j])&&ln.call(B.styleAliases,P)&&(P=B.styleAliases[P]),u[j]=P;return u}(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType='\"'===s.quotingType?Bn:Ln,this.forceQuotes=s.forceQuotes||!1,this.replacer=\"function\"==typeof s.replacer?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(s,i){for(var u,_=lr.repeat(\" \",i),w=0,x=-1,j=\"\",P=s.length;w<P;)-1===(x=s.indexOf(\"\\n\",w))?(u=s.slice(w),w=P):(u=s.slice(w,x+1),w=x+1),u.length&&\"\\n\"!==u&&(j+=_),j+=u;return j}function generateNextLine(s,i){return\"\\n\"+lr.repeat(\" \",s.indent*i)}function isWhitespace(s){return s===dn||s===un}function isPrintable(s){return 32<=s&&s<=126||161<=s&&s<=55295&&8232!==s&&8233!==s||57344<=s&&s<=65533&&s!==cn||65536<=s&&s<=1114111}function isNsCharOrWhitespace(s){return isPrintable(s)&&s!==cn&&s!==hn&&s!==pn}function isPlainSafe(s,i,u){var _=isNsCharOrWhitespace(s),w=_&&!isWhitespace(s);return(u?_:_&&s!==En&&s!==An&&s!==jn&&s!==In&&s!==Mn)&&s!==gn&&!(i===Sn&&!w)||isNsCharOrWhitespace(i)&&!isWhitespace(i)&&s===gn||i===Sn&&w}function codePointAt(s,i){var u,_=s.charCodeAt(i);return _>=55296&&_<=56319&&i+1<s.length&&(u=s.charCodeAt(i+1))>=56320&&u<=57343?1024*(_-55296)+u-56320+65536:_}function needIndentIndicator(s){return/^\\n* /.test(s)}var Fn=1,qn=2,$n=3,Un=4,zn=5;function chooseScalarStyle(s,i,u,_,w,x,j,P){var B,$=0,U=null,Y=!1,X=!1,Z=-1!==_,ee=-1,ie=function isPlainSafeFirst(s){return isPrintable(s)&&s!==cn&&!isWhitespace(s)&&s!==wn&&s!==On&&s!==Sn&&s!==En&&s!==An&&s!==jn&&s!==In&&s!==Mn&&s!==gn&&s!==vn&&s!==_n&&s!==fn&&s!==Nn&&s!==xn&&s!==kn&&s!==bn&&s!==mn&&s!==yn&&s!==Cn&&s!==Pn}(codePointAt(s,0))&&function isPlainSafeLast(s){return!isWhitespace(s)&&s!==Sn}(codePointAt(s,s.length-1));if(i||j)for(B=0;B<s.length;$>=65536?B+=2:B++){if(!isPrintable($=codePointAt(s,B)))return zn;ie=ie&&isPlainSafe($,U,P),U=$}else{for(B=0;B<s.length;$>=65536?B+=2:B++){if(($=codePointAt(s,B))===pn)Y=!0,Z&&(X=X||B-ee-1>_&&\" \"!==s[ee+1],ee=B);else if(!isPrintable($))return zn;ie=ie&&isPlainSafe($,U,P),U=$}X=X||Z&&B-ee-1>_&&\" \"!==s[ee+1]}return Y||X?u>9&&needIndentIndicator(s)?zn:j?x===Bn?zn:qn:X?Un:$n:!ie||j||w(s)?x===Bn?zn:qn:Fn}function writeScalar(s,i,u,_,w){s.dump=function(){if(0===i.length)return s.quotingType===Bn?'\"\"':\"''\";if(!s.noCompatMode&&(-1!==Rn.indexOf(i)||Dn.test(i)))return s.quotingType===Bn?'\"'+i+'\"':\"'\"+i+\"'\";var x=s.indent*Math.max(1,u),j=-1===s.lineWidth?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-x),P=_||s.flowLevel>-1&&u>=s.flowLevel;switch(chooseScalarStyle(i,P,s.indent,j,(function testAmbiguity(i){return function testImplicitResolving(s,i){var u,_;for(u=0,_=s.implicitTypes.length;u<_;u+=1)if(s.implicitTypes[u].resolve(i))return!0;return!1}(s,i)}),s.quotingType,s.forceQuotes&&!_,w)){case Fn:return i;case qn:return\"'\"+i.replace(/'/g,\"''\")+\"'\";case $n:return\"|\"+blockHeader(i,s.indent)+dropEndingNewline(indentString(i,x));case Un:return\">\"+blockHeader(i,s.indent)+dropEndingNewline(indentString(function foldString(s,i){var u,_,w=/(\\n+)([^\\n]*)/g,x=(P=s.indexOf(\"\\n\"),P=-1!==P?P:s.length,w.lastIndex=P,foldLine(s.slice(0,P),i)),j=\"\\n\"===s[0]||\" \"===s[0];var P;for(;_=w.exec(s);){var B=_[1],$=_[2];u=\" \"===$[0],x+=B+(j||u||\"\"===$?\"\":\"\\n\")+foldLine($,i),j=u}return x}(i,j),x));case zn:return'\"'+function escapeString(s){for(var i,u=\"\",_=0,w=0;w<s.length;_>=65536?w+=2:w++)_=codePointAt(s,w),!(i=Tn[_])&&isPrintable(_)?(u+=s[w],_>=65536&&(u+=s[w+1])):u+=i||encodeHex(_);return u}(i)+'\"';default:throw new cr(\"impossible error: invalid scalar style\")}}()}function blockHeader(s,i){var u=needIndentIndicator(s)?String(i):\"\",_=\"\\n\"===s[s.length-1];return u+(_&&(\"\\n\"===s[s.length-2]||\"\\n\"===s)?\"+\":_?\"\":\"-\")+\"\\n\"}function dropEndingNewline(s){return\"\\n\"===s[s.length-1]?s.slice(0,-1):s}function foldLine(s,i){if(\"\"===s||\" \"===s[0])return s;for(var u,_,w=/ [^ ]/g,x=0,j=0,P=0,B=\"\";u=w.exec(s);)(P=u.index)-x>i&&(_=j>x?j:P,B+=\"\\n\"+s.slice(x,_),x=_+1),j=P;return B+=\"\\n\",s.length-x>i&&j>x?B+=s.slice(x,j)+\"\\n\"+s.slice(j+1):B+=s.slice(x),B.slice(1)}function writeBlockSequence(s,i,u,_){var w,x,j,P=\"\",B=s.tag;for(w=0,x=u.length;w<x;w+=1)j=u[w],s.replacer&&(j=s.replacer.call(u,String(w),j)),(writeNode(s,i+1,j,!0,!0,!1,!0)||void 0===j&&writeNode(s,i+1,null,!0,!0,!1,!0))&&(_&&\"\"===P||(P+=generateNextLine(s,i)),s.dump&&pn===s.dump.charCodeAt(0)?P+=\"-\":P+=\"- \",P+=s.dump);s.tag=B,s.dump=P||\"[]\"}function detectType(s,i,u){var _,w,x,j,P,B;for(x=0,j=(w=u?s.explicitTypes:s.implicitTypes).length;x<j;x+=1)if(((P=w[x]).instanceOf||P.predicate)&&(!P.instanceOf||\"object\"==typeof i&&i instanceof P.instanceOf)&&(!P.predicate||P.predicate(i))){if(u?P.multi&&P.representName?s.tag=P.representName(i):s.tag=P.tag:s.tag=\"?\",P.represent){if(B=s.styleMap[P.tag]||P.defaultStyle,\"[object Function]\"===an.call(P.represent))_=P.represent(i,B);else{if(!ln.call(P.represent,B))throw new cr(\"!<\"+P.tag+'> tag resolver accepts not \"'+B+'\" style');_=P.represent[B](i,B)}s.dump=_}return!0}return!1}function writeNode(s,i,u,_,w,x,j){s.tag=null,s.dump=u,detectType(s,u,!1)||detectType(s,u,!0);var P,B=an.call(s.dump),$=_;_&&(_=s.flowLevel<0||s.flowLevel>i);var U,Y,X=\"[object Object]\"===B||\"[object Array]\"===B;if(X&&(Y=-1!==(U=s.duplicates.indexOf(u))),(null!==s.tag&&\"?\"!==s.tag||Y||2!==s.indent&&i>0)&&(w=!1),Y&&s.usedDuplicates[U])s.dump=\"*ref_\"+U;else{if(X&&Y&&!s.usedDuplicates[U]&&(s.usedDuplicates[U]=!0),\"[object Object]\"===B)_&&0!==Object.keys(s.dump).length?(!function writeBlockMapping(s,i,u,_){var w,x,j,P,B,$,U=\"\",Y=s.tag,X=Object.keys(u);if(!0===s.sortKeys)X.sort();else if(\"function\"==typeof s.sortKeys)X.sort(s.sortKeys);else if(s.sortKeys)throw new cr(\"sortKeys must be a boolean or a function\");for(w=0,x=X.length;w<x;w+=1)$=\"\",_&&\"\"===U||($+=generateNextLine(s,i)),P=u[j=X[w]],s.replacer&&(P=s.replacer.call(u,j,P)),writeNode(s,i+1,j,!0,!0,!0)&&((B=null!==s.tag&&\"?\"!==s.tag||s.dump&&s.dump.length>1024)&&(s.dump&&pn===s.dump.charCodeAt(0)?$+=\"?\":$+=\"? \"),$+=s.dump,B&&($+=generateNextLine(s,i)),writeNode(s,i+1,P,!0,B)&&(s.dump&&pn===s.dump.charCodeAt(0)?$+=\":\":$+=\": \",U+=$+=s.dump));s.tag=Y,s.dump=U||\"{}\"}(s,i,s.dump,w),Y&&(s.dump=\"&ref_\"+U+s.dump)):(!function writeFlowMapping(s,i,u){var _,w,x,j,P,B=\"\",$=s.tag,U=Object.keys(u);for(_=0,w=U.length;_<w;_+=1)P=\"\",\"\"!==B&&(P+=\", \"),s.condenseFlow&&(P+='\"'),j=u[x=U[_]],s.replacer&&(j=s.replacer.call(u,x,j)),writeNode(s,i,x,!1,!1)&&(s.dump.length>1024&&(P+=\"? \"),P+=s.dump+(s.condenseFlow?'\"':\"\")+\":\"+(s.condenseFlow?\"\":\" \"),writeNode(s,i,j,!1,!1)&&(B+=P+=s.dump));s.tag=$,s.dump=\"{\"+B+\"}\"}(s,i,s.dump),Y&&(s.dump=\"&ref_\"+U+\" \"+s.dump));else if(\"[object Array]\"===B)_&&0!==s.dump.length?(s.noArrayIndent&&!j&&i>0?writeBlockSequence(s,i-1,s.dump,w):writeBlockSequence(s,i,s.dump,w),Y&&(s.dump=\"&ref_\"+U+s.dump)):(!function writeFlowSequence(s,i,u){var _,w,x,j=\"\",P=s.tag;for(_=0,w=u.length;_<w;_+=1)x=u[_],s.replacer&&(x=s.replacer.call(u,String(_),x)),(writeNode(s,i,x,!1,!1)||void 0===x&&writeNode(s,i,null,!1,!1))&&(\"\"!==j&&(j+=\",\"+(s.condenseFlow?\"\":\" \")),j+=s.dump);s.tag=P,s.dump=\"[\"+j+\"]\"}(s,i,s.dump),Y&&(s.dump=\"&ref_\"+U+\" \"+s.dump));else{if(\"[object String]\"!==B){if(\"[object Undefined]\"===B)return!1;if(s.skipInvalid)return!1;throw new cr(\"unacceptable kind of an object to dump \"+B)}\"?\"!==s.tag&&writeScalar(s,s.dump,i,x,$)}null!==s.tag&&\"?\"!==s.tag&&(P=encodeURI(\"!\"===s.tag[0]?s.tag.slice(1):s.tag).replace(/!/g,\"%21\"),P=\"!\"===s.tag[0]?\"!\"+P:\"tag:yaml.org,2002:\"===P.slice(0,18)?\"!!\"+P.slice(18):\"!<\"+P+\">\",s.dump=P+\" \"+s.dump)}return!0}function getDuplicateReferences(s,i){var u,_,w=[],x=[];for(inspectNode(s,w,x),u=0,_=x.length;u<_;u+=1)i.duplicates.push(w[x[u]]);i.usedDuplicates=new Array(_)}function inspectNode(s,i,u){var _,w,x;if(null!==s&&\"object\"==typeof s)if(-1!==(w=i.indexOf(s)))-1===u.indexOf(w)&&u.push(w);else if(i.push(s),Array.isArray(s))for(w=0,x=s.length;w<x;w+=1)inspectNode(s[w],i,u);else for(w=0,x=(_=Object.keys(s)).length;w<x;w+=1)inspectNode(s[_[w]],i,u)}var Vn=function dump$1(s,i){var u=new State(i=i||{});u.noRefs||getDuplicateReferences(s,u);var _=s;return u.replacer&&(_=u.replacer.call({\"\":_},\"\",_)),writeNode(u,0,_,!0,!0)?u.dump+\"\\n\":\"\"};function renamed(s,i){return function(){throw new Error(\"Function yaml.\"+s+\" is removed in js-yaml 4. Use yaml.\"+i+\" instead, which is now safe by default.\")}}var Wn=fr,Kn=mr,Hn=br,Jn=Or,Gn=Cr,Yn=$r,Xn=sn.load,Qn=sn.loadAll,Zn={dump:Vn}.dump,eo=cr,to={binary:Mr,float:kr,map:vr,null:_r,pairs:Br,set:qr,timestamp:Pr,bool:Er,int:wr,merge:Ir,omap:Dr,seq:yr,str:gr},ro=renamed(\"safeLoad\",\"load\"),no=renamed(\"safeLoadAll\",\"loadAll\"),oo=renamed(\"safeDump\",\"dump\");const so={Type:Wn,Schema:Kn,FAILSAFE_SCHEMA:Hn,JSON_SCHEMA:Jn,CORE_SCHEMA:Gn,DEFAULT_SCHEMA:Yn,load:Xn,loadAll:Qn,dump:Zn,YAMLException:eo,types:to,safeLoad:ro,safeLoadAll:no,safeDump:oo},parseYamlConfig=(s,i)=>{try{return so.load(s)}catch(s){return i&&i.errActions.newThrownErr(new Error(s)),{}}},io=\"configs_update\",ao=\"configs_toggle\";function update(s,i){return{type:io,payload:{[s]:i}}}function toggle(s){return{type:ao,payload:s}}const actions_loaded=()=>()=>{},downloadConfig=s=>i=>{const{fn:{fetch:u}}=i;return u(s)},getConfigByUrl=(s,i)=>({specActions:u})=>{if(s)return u.downloadConfig(s).then(next,next);function next(_){_ instanceof Error||_.status>=400?(u.updateLoadingStatus(\"failedConfig\"),u.updateLoadingStatus(\"failedConfig\"),u.updateUrl(\"\"),console.error(_.statusText+\" \"+s.url),i(null)):i(parseYamlConfig(_.text))}},get=(s,i)=>s.getIn(Array.isArray(i)?i:[i]),lo={[io]:(s,i)=>s.merge((0,Xe.fromJS)(i.payload)),[ao]:(s,i)=>{const u=i.payload,_=s.get(u);return s.set(u,!_)}},co={getLocalConfig:()=>parseYamlConfig('---\\nurl: \"https://petstore.swagger.io/v2/swagger.json\"\\ndom_id: \"#swagger-ui\"\\nvalidatorUrl: \"https://validator.swagger.io/validator\"\\n')};function configsPlugin(){return{statePlugins:{spec:{actions:x,selectors:co},configs:{reducers:lo,actions:_,selectors:j}}}}const setHash=s=>s?history.pushState(null,null,`#${s}`):window.location.hash=\"\";var uo=__webpack_require__(86215),po=__webpack_require__.n(uo);const ho=\"layout_scroll_to\",fo=\"layout_clear_scroll\";const mo={fn:{getScrollParent:function getScrollParent(s,i){const u=document.documentElement;let _=getComputedStyle(s);const w=\"absolute\"===_.position,x=i?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===_.position)return u;for(let i=s;i=i.parentElement;)if(_=getComputedStyle(i),(!w||\"static\"!==_.position)&&x.test(_.overflow+_.overflowY+_.overflowX))return i;return u}},statePlugins:{layout:{actions:{scrollToElement:(s,i)=>u=>{try{i=i||u.fn.getScrollParent(s),po().createScroller(i).to(s)}catch(s){console.error(s)}},scrollTo:s=>({type:ho,payload:Array.isArray(s)?s:[s]}),clearScrollTo:()=>({type:fo}),readyToScroll:(s,i)=>u=>{const _=u.layoutSelectors.getScrollToKey();Qe().is(_,(0,Xe.fromJS)(s))&&(u.layoutActions.scrollToElement(i),u.layoutActions.clearScrollTo())},parseDeepLinkHash:s=>({layoutActions:i,layoutSelectors:u,getConfigs:_})=>{if(_().deepLinking&&s){let _=s.slice(1);\"!\"===_[0]&&(_=_.slice(1)),\"/\"===_[0]&&(_=_.slice(1));const w=_.split(\"/\").map((s=>s||\"\")),x=u.isShownKeyFromUrlHashArray(w),[j,P=\"\",B=\"\"]=x;if(\"operations\"===j){const s=u.isShownKeyFromUrlHashArray([P]);P.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),i.show(s.map((s=>s.replace(/_/g,\" \"))),!0)),i.show(s,!0)}(P.indexOf(\"_\")>-1||B.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),i.show(x.map((s=>s.replace(/_/g,\" \"))),!0)),i.show(x,!0),i.scrollTo(x)}}},selectors:{getScrollToKey:s=>s.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(s,i){const[u,_]=i;return _?[\"operations\",u,_]:u?[\"operations-tag\",u]:[]},urlHashArrayFromIsShownKey(s,i){let[u,_,w]=i;return\"operations\"==u?[_,w]:\"operations-tag\"==u?[_]:[]}},reducers:{[ho]:(s,i)=>s.set(\"scrollToKey\",Qe().fromJS(i.payload)),[fo]:s=>s.delete(\"scrollToKey\")},wrapActions:{show:(s,{getConfigs:i,layoutSelectors:u})=>(..._)=>{if(s(..._),i().deepLinking)try{let[s,i]=_;s=Array.isArray(s)?s:[s];const w=u.urlHashArrayFromIsShownKey(s);if(!w.length)return;const[x,j]=w;if(!i)return setHash(\"/\");2===w.length?setHash(createDeepLinkPath(`/${encodeURIComponent(x)}/${encodeURIComponent(j)}`)):1===w.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(x)}`))}catch(s){console.error(s)}}}}}};var go=__webpack_require__(2209),yo=__webpack_require__.n(go);const operation_wrapper=(s,i)=>class OperationWrapper extends We.Component{onLoad=s=>{const{operation:u}=this.props,{tag:_,operationId:w}=u.toObject();let{isShownKey:x}=u.toObject();x=x||[\"operations\",_,w],i.layoutActions.readyToScroll(x,s)};render(){return We.createElement(\"span\",{ref:this.onLoad},We.createElement(s,this.props))}},operation_tag_wrapper=(s,i)=>class OperationTagWrapper extends We.Component{onLoad=s=>{const{tag:u}=this.props,_=[\"operations-tag\",u];i.layoutActions.readyToScroll(_,s)};render(){return We.createElement(\"span\",{ref:this.onLoad},We.createElement(s,this.props))}};function deep_linking(){return[mo,{statePlugins:{configs:{wrapActions:{loaded:(s,i)=>(...u)=>{s(...u);const _=decodeURIComponent(window.location.hash);i.layoutActions.parseDeepLinkHash(_)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var vo=__webpack_require__(40860),bo=__webpack_require__.n(vo);function transform(s){return s.map((s=>{let i=\"is not of a type(s)\",u=s.get(\"message\").indexOf(i);if(u>-1){let i=s.get(\"message\").slice(u+19).split(\",\");return s.set(\"message\",s.get(\"message\").slice(0,u)+function makeNewMessage(s){return s.reduce(((s,i,u,_)=>u===_.length-1&&_.length>1?s+\"or \"+i:_[u+1]&&_.length>2?s+i+\", \":_[u+1]?s+i+\" \":s+i),\"should be a\")}(i))}return s}))}var _o=__webpack_require__(58156),Eo=__webpack_require__.n(_o);function parameter_oneof_transform(s,{jsSpec:i}){return s}const wo=[P,B];function transformErrors(s){let i={jsSpec:{}},u=bo()(wo,((s,u)=>{try{return u.transform(s,i).filter((s=>!!s))}catch(i){return console.error(\"Transformer error:\",i),s}}),s);return u.filter((s=>!!s)).map((s=>(!s.get(\"line\")&&s.get(\"path\"),s)))}let So={line:0,level:\"error\",message:\"Unknown error\"};const xo=Gt((s=>s),(s=>s.get(\"errors\",(0,Xe.List)()))),ko=Gt(xo,(s=>s.last()));function err(i){return{statePlugins:{err:{reducers:{[ot]:(s,{payload:i})=>{let u=Object.assign(So,i,{type:\"thrown\"});return s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)))).update(\"errors\",(s=>transformErrors(s)))},[st]:(s,{payload:i})=>(i=i.map((s=>(0,Xe.fromJS)(Object.assign(So,s,{type:\"thrown\"})))),s.update(\"errors\",(s=>(s||(0,Xe.List)()).concat((0,Xe.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))),[it]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(i);return u=u.set(\"type\",\"spec\"),s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)).sortBy((s=>s.get(\"line\"))))).update(\"errors\",(s=>transformErrors(s)))},[at]:(s,{payload:i})=>(i=i.map((s=>(0,Xe.fromJS)(Object.assign(So,s,{type:\"spec\"})))),s.update(\"errors\",(s=>(s||(0,Xe.List)()).concat((0,Xe.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))),[lt]:(s,{payload:i})=>{let u=(0,Xe.fromJS)(Object.assign({},i));return u=u.set(\"type\",\"auth\"),s.update(\"errors\",(s=>(s||(0,Xe.List)()).push((0,Xe.fromJS)(u)))).update(\"errors\",(s=>transformErrors(s)))},[ct]:(s,{payload:i})=>{if(!i||!s.get(\"errors\"))return s;let u=s.get(\"errors\").filter((s=>s.keySeq().every((u=>{const _=s.get(u),w=i[u];return!w||_!==w}))));return s.merge({errors:u})},[ut]:(s,{payload:i})=>{if(!i||\"function\"!=typeof i)return s;let u=s.get(\"errors\").filter((s=>i(s)));return s.merge({errors:u})}},actions:s,selectors:$}}}}function opsFilter(s,i){return s.filter(((s,u)=>-1!==u.indexOf(i)))}function filter(){return{fn:{opsFilter}}}var Oo=__webpack_require__(7666),Co=__webpack_require__.n(Oo);const arrow_up=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:s=null,width:i=15,height:u=16,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"g\",{transform:\"translate(2, -1)\"},We.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:s=null,width:i=20,height:u=20,..._})=>We.createElement(\"svg\",Co()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:i,height:u,\"aria-hidden\":\"true\",focusable:\"false\"},_),We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),Ao=\"layout_update_layout\",jo=\"layout_update_filter\",Po=\"layout_update_mode\",Io=\"layout_show\";function updateLayout(s){return{type:Ao,payload:s}}function updateFilter(s){return{type:jo,payload:s}}function actions_show(s,i=!0){return s=normalizeArray(s),{type:Io,payload:{thing:s,shown:i}}}function changeMode(s,i=\"\"){return s=normalizeArray(s),{type:Po,payload:{thing:s,mode:i}}}const No={[Ao]:(s,i)=>s.set(\"layout\",i.payload),[jo]:(s,i)=>s.set(\"filter\",i.payload),[Io]:(s,i)=>{const u=i.payload.shown,_=(0,Xe.fromJS)(i.payload.thing);return s.update(\"shown\",(0,Xe.fromJS)({}),(s=>s.set(_,u)))},[Po]:(s,i)=>{let u=i.payload.thing,_=i.payload.mode;return s.setIn([\"modes\"].concat(u),(_||\"\")+\"\")}},current=s=>s.get(\"layout\"),currentFilter=s=>s.get(\"filter\"),isShown=(s,i,u)=>(i=normalizeArray(i),s.get(\"shown\",(0,Xe.fromJS)({})).get((0,Xe.fromJS)(i),u)),whatMode=(s,i,u=\"\")=>(i=normalizeArray(i),s.getIn([\"modes\",...i],u)),Mo=Gt((s=>s),(s=>!isShown(s,\"editor\"))),taggedOperations=(s,i)=>(u,..._)=>{let w=s(u,..._);const{fn:x,layoutSelectors:j,getConfigs:P}=i.getSystem(),B=P(),{maxDisplayedTags:$}=B;let U=j.currentFilter();return U&&!0!==U&&\"true\"!==U&&\"false\"!==U&&(w=x.opsFilter(w,U)),$&&!isNaN($)&&$>=0&&(w=w.slice(0,$)),w};function plugins_layout(){return{statePlugins:{layout:{reducers:No,actions:U,selectors:Y},spec:{wrapSelectors:X}}}}function logs({configs:s}){const i={debug:0,info:1,log:2,warn:3,error:4},getLevel=s=>i[s]||-1;let{logLevel:u}=s,_=getLevel(u);function log(s,...i){getLevel(s)>=_&&console[s](...i)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let To=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:s=>(...i)=>(To=!0,s(...i)),updateJsonSpec:(s,i)=>(...u)=>{const _=i.getConfigs().onComplete;return To&&\"function\"==typeof _&&(setTimeout(_,0),To=!1),s(...u)}}}}}}const extractKey=s=>{const i=\"_**[]\";return s.indexOf(i)<0?s:s.split(i)[0].trim()},escapeShell=s=>\"-d \"===s||/^[_\\/-]/g.test(s)?s:\"'\"+s.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=s=>\"-d \"===(s=s.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?s.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(s)?s:'\"'+s+'\"',escapePowershell=s=>{if(\"-d \"===s)return s;if(/\\n/.test(s)){return`@\"\\n${s.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(s)){return`'${s.replace(/'/g,\"''\")}'`}return s};const curlify=(s,i,u,_=\"\")=>{let w=!1,x=\"\";const addWords=(...s)=>x+=\" \"+s.map(i).join(\" \"),addWordsWithoutLeadingSpace=(...s)=>x+=s.map(i).join(\" \"),addNewLine=()=>x+=` ${u}`,addIndent=(s=1)=>x+=\"  \".repeat(s);let j=s.get(\"headers\");if(x+=\"curl\"+_,s.has(\"curlOptions\")&&addWords(...s.get(\"curlOptions\")),addWords(\"-X\",s.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${s.get(\"url\")}`),j&&j.size)for(let i of s.get(\"headers\").entries()){addNewLine(),addIndent();let[s,u]=i;addWordsWithoutLeadingSpace(\"-H\",`${s}: ${u}`),w=w||/^content-type$/i.test(s)&&/^multipart\\/form-data$/i.test(u)}const P=s.get(\"body\");if(P)if(w&&[\"POST\",\"PUT\",\"PATCH\"].includes(s.get(\"method\")))for(let[s,i]of P.entrySeq()){let u=extractKey(s);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),i instanceof pt.File&&\"string\"==typeof i.valueOf()?addWords(`${u}=${i.data}${i.type?`;type=${i.type}`:\"\"}`):i instanceof pt.File?addWords(`${u}=@${i.name}${i.type?`;type=${i.type}`:\"\"}`):addWords(`${u}=${i}`)}else if(P instanceof pt.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${P.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let i=P;Xe.Map.isMap(i)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(s){let i=[];for(let[u,_]of s.get(\"body\").entrySeq()){let s=extractKey(u);_ instanceof pt.File?i.push(`  \"${s}\": {\\n    \"name\": \"${_.name}\"${_.type?`,\\n    \"type\": \"${_.type}\"`:\"\"}\\n  }`):i.push(`  \"${s}\": ${JSON.stringify(_,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${i.join(\",\\n\")}\\n}`}(s)):(\"string\"!=typeof i&&(i=JSON.stringify(i)),addWordsWithoutLeadingSpace(i))}else P||\"POST\"!==s.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return x},requestSnippetGenerator_curl_powershell=s=>curlify(s,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=s=>curlify(s,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=s=>curlify(s,escapeCMD,\"^\\n\"),request_snippets_selectors_state=s=>s||(0,Xe.Map)(),Ro=Gt(request_snippets_selectors_state,(s=>{const i=s.get(\"languages\"),u=s.get(\"generators\",(0,Xe.Map)());return!i||i.isEmpty()?u:u.filter(((s,u)=>i.includes(u)))})),getSnippetGenerators=s=>({fn:i})=>Ro(s).map(((s,u)=>{const _=(s=>i[`requestSnippetGenerator_${s}`])(u);return\"function\"!=typeof _?null:s.set(\"fn\",_)})).filter((s=>s)),Do=Gt(request_snippets_selectors_state,(s=>s.get(\"activeLanguage\"))),Lo=Gt(request_snippets_selectors_state,(s=>s.get(\"defaultExpanded\")));var Bo=__webpack_require__(59399);function _objectWithoutProperties(s,i){if(null==s)return{};var u,_,w=function _objectWithoutPropertiesLoose(s,i){if(null==s)return{};var u,_,w={},x=Object.keys(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||(w[u]=s[u]);return w}(s,i);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(s);for(_=0;_<x.length;_++)u=x[_],i.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(s,u)&&(w[u]=s[u])}return w}function _arrayLikeToArray(s,i){(null==i||i>s.length)&&(i=s.length);for(var u=0,_=new Array(i);u<i;u++)_[u]=s[u];return _}function _toConsumableArray(s){return function _arrayWithoutHoles(s){if(Array.isArray(s))return _arrayLikeToArray(s)}(s)||function _iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function _unsupportedIterableToArray(s,i){if(s){if(\"string\"==typeof s)return _arrayLikeToArray(s,i);var u=Object.prototype.toString.call(s).slice(8,-1);return\"Object\"===u&&s.constructor&&(u=s.constructor.name),\"Map\"===u||\"Set\"===u?Array.from(s):\"Arguments\"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?_arrayLikeToArray(s,i):void 0}}(s)||function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}function toPropertyKey(s){var i=function toPrimitive(s,i){if(\"object\"!=_typeof(s)||!s)return s;var u=s[Symbol.toPrimitive];if(void 0!==u){var _=u.call(s,i||\"default\");if(\"object\"!=_typeof(_))return _;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===i?String:Number)(s)}(s,\"string\");return\"symbol\"==_typeof(i)?i:String(i)}function _defineProperty(s,i,u){return(i=toPropertyKey(i))in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function _extends(){return _extends=Object.assign?Object.assign.bind():function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},_extends.apply(this,arguments)}function ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}var Fo={};function createStyleObject(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;return function getClassNameCombinations(s){if(0===s.length||1===s.length)return s;var i=s.join(\".\");return Fo[i]||(Fo[i]=function powerSetPermutations(s){var i=s.length;return 0===i||1===i?s:2===i?[s[0],s[1],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0])]:3===i?[s[0],s[1],s[2],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:i>=4?[s[0],s[1],s[2],s[3],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3]),\"\".concat(s[3],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:void 0}(s)),Fo[i]}(s.filter((function(s){return\"token\"!==s}))).reduce((function(s,i){return _objectSpread(_objectSpread({},s),u[i])}),i)}function createClassNameString(s){return s.join(\" \")}function createElement(s){var i=s.node,u=s.stylesheet,_=s.style,w=void 0===_?{}:_,x=s.useInlineStyles,j=s.key,P=i.properties,B=i.type,$=i.tagName,U=i.value;if(\"text\"===B)return U;if($){var Y,X=function createChildren(s,i){var u=0;return function(_){return u+=1,_.map((function(_,w){return createElement({node:_,stylesheet:s,useInlineStyles:i,key:\"code-segment-\".concat(u,\"-\").concat(w)})}))}}(u,x);if(x){var Z=Object.keys(u).reduce((function(s,i){return i.split(\".\").forEach((function(i){s.includes(i)||s.push(i)})),s}),[]),ee=P.className&&P.className.includes(\"token\")?[\"token\"]:[],ie=P.className&&ee.concat(P.className.filter((function(s){return!Z.includes(s)})));Y=_objectSpread(_objectSpread({},P),{},{className:createClassNameString(ie)||void 0,style:createStyleObject(P.className,Object.assign({},P.style,w),u)})}else Y=_objectSpread(_objectSpread({},P),{},{className:createClassNameString(P.className)});var ae=X(i.children);return We.createElement($,_extends({key:j},Y),ae)}}const checkForListedLanguage=function(s,i){return-1!==s.listLanguages().indexOf(i)};var qo=[\"language\",\"children\",\"style\",\"customStyle\",\"codeTagProps\",\"useInlineStyles\",\"showLineNumbers\",\"showInlineLineNumbers\",\"startingLineNumber\",\"lineNumberContainerStyle\",\"lineNumberStyle\",\"wrapLines\",\"wrapLongLines\",\"lineProps\",\"renderer\",\"PreTag\",\"CodeTag\",\"code\",\"astGenerator\"];function highlight_ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function highlight_objectSpread(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?highlight_ownKeys(Object(u),!0).forEach((function(i){_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):highlight_ownKeys(Object(u)).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}var $o=/\\n/g;function AllLineNumbers(s){var i=s.codeString,u=s.codeStyle,_=s.containerStyle,w=void 0===_?{float:\"left\",paddingRight:\"10px\"}:_,x=s.numberStyle,j=void 0===x?{}:x,P=s.startingLineNumber;return We.createElement(\"code\",{style:Object.assign({},u,w)},function getAllLineNumbers(s){var i=s.lines,u=s.startingLineNumber,_=s.style;return i.map((function(s,i){var w=i+u;return We.createElement(\"span\",{key:\"line-\".concat(i),className:\"react-syntax-highlighter-line-number\",style:\"function\"==typeof _?_(w):_},\"\".concat(w,\"\\n\"))}))}({lines:i.replace(/\\n$/,\"\").split(\"\\n\"),style:j,startingLineNumber:P}))}function getInlineLineNumber(s,i){return{type:\"element\",tagName:\"span\",properties:{key:\"line-number--\".concat(s),className:[\"comment\",\"linenumber\",\"react-syntax-highlighter-line-number\"],style:i},children:[{type:\"text\",value:s}]}}function assembleLineNumberStyles(s,i,u){var _,w={display:\"inline-block\",minWidth:(_=u,\"\".concat(_.toString().length,\".25em\")),paddingRight:\"1em\",textAlign:\"right\",userSelect:\"none\"},x=\"function\"==typeof s?s(i):s;return highlight_objectSpread(highlight_objectSpread({},w),x)}function createLineElement(s){var i=s.children,u=s.lineNumber,_=s.lineNumberStyle,w=s.largestLineNumber,x=s.showInlineLineNumbers,j=s.lineProps,P=void 0===j?{}:j,B=s.className,$=void 0===B?[]:B,U=s.showLineNumbers,Y=s.wrapLongLines,X=\"function\"==typeof P?P(u):P;if(X.className=$,u&&x){var Z=assembleLineNumberStyles(_,u,w);i.unshift(getInlineLineNumber(u,Z))}return Y&U&&(X.style=highlight_objectSpread(highlight_objectSpread({},X.style),{},{display:\"flex\"})),{type:\"element\",tagName:\"span\",properties:X,children:i}}function flattenCodeTree(s){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],_=0;_<s.length;_++){var w=s[_];if(\"text\"===w.type)u.push(createLineElement({children:[w],className:_toConsumableArray(new Set(i))}));else if(w.children){var x=i.concat(w.properties.className);flattenCodeTree(w.children,x).forEach((function(s){return u.push(s)}))}}return u}function processLines(s,i,u,_,w,x,j,P,B){var $,U=flattenCodeTree(s.value),Y=[],X=-1,Z=0;function createLine(s,x){var $=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return i||$.length>0?function createWrappedLine(s,i){return createLineElement({children:s,lineNumber:i,lineNumberStyle:P,largestLineNumber:j,showInlineLineNumbers:w,lineProps:u,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:_,wrapLongLines:B})}(s,x,$):function createUnwrappedLine(s,i){if(_&&i&&w){var u=assembleLineNumberStyles(P,i,j);s.unshift(getInlineLineNumber(i,u))}return s}(s,x)}for(var ee=function _loop(){var s=U[Z],i=s.children[0].value,u=function getNewLines(s){return s.match($o)}(i);if(u){var w=i.split(\"\\n\");w.forEach((function(i,u){var j=_&&Y.length+x,P={type:\"text\",value:\"\".concat(i,\"\\n\")};if(0===u){var B=createLine(U.slice(X+1,Z).concat(createLineElement({children:[P],className:s.properties.className})),j);Y.push(B)}else if(u===w.length-1){var $=U[Z+1]&&U[Z+1].children&&U[Z+1].children[0],ee={type:\"text\",value:\"\".concat(i)};if($){var ie=createLineElement({children:[ee],className:s.properties.className});U.splice(Z+1,0,ie)}else{var ae=createLine([ee],j,s.properties.className);Y.push(ae)}}else{var le=createLine([P],j,s.properties.className);Y.push(le)}})),X=Z}Z++};Z<U.length;)ee();if(X!==U.length-1){var ie=U.slice(X+1,U.length);if(ie&&ie.length){var ae=createLine(ie,_&&Y.length+x);Y.push(ae)}}return i?Y:($=[]).concat.apply($,Y)}function defaultRenderer(s){var i=s.rows,u=s.stylesheet,_=s.useInlineStyles;return i.map((function(s,i){return createElement({node:s,stylesheet:u,useInlineStyles:_,key:\"code-segement\".concat(i)})}))}function isHighlightJs(s){return s&&void 0!==s.highlightAuto}var Uo=__webpack_require__(43768),zo=function highlight(s,i){return function SyntaxHighlighter(u){var _=u.language,w=u.children,x=u.style,j=void 0===x?i:x,P=u.customStyle,B=void 0===P?{}:P,$=u.codeTagProps,U=void 0===$?{className:_?\"language-\".concat(_):void 0,style:highlight_objectSpread(highlight_objectSpread({},j['code[class*=\"language-\"]']),j['code[class*=\"language-'.concat(_,'\"]')])}:$,Y=u.useInlineStyles,X=void 0===Y||Y,Z=u.showLineNumbers,ee=void 0!==Z&&Z,ie=u.showInlineLineNumbers,ae=void 0===ie||ie,le=u.startingLineNumber,ce=void 0===le?1:le,pe=u.lineNumberContainerStyle,de=u.lineNumberStyle,fe=void 0===de?{}:de,ye=u.wrapLines,be=u.wrapLongLines,_e=void 0!==be&&be,we=u.lineProps,Se=void 0===we?{}:we,xe=u.renderer,Pe=u.PreTag,Te=void 0===Pe?\"pre\":Pe,Re=u.CodeTag,qe=void 0===Re?\"code\":Re,$e=u.code,ze=void 0===$e?(Array.isArray(w)?w[0]:w)||\"\":$e,He=u.astGenerator,Ye=_objectWithoutProperties(u,qo);He=He||s;var Xe=ee?We.createElement(AllLineNumbers,{containerStyle:pe,codeStyle:U.style||{},numberStyle:fe,startingLineNumber:ce,codeString:ze}):null,Qe=j.hljs||j['pre[class*=\"language-\"]']||{backgroundColor:\"#fff\"},et=isHighlightJs(He)?\"hljs\":\"prismjs\",tt=X?Object.assign({},Ye,{style:Object.assign({},Qe,B)}):Object.assign({},Ye,{className:Ye.className?\"\".concat(et,\" \").concat(Ye.className):et,style:Object.assign({},B)});if(U.style=highlight_objectSpread(highlight_objectSpread({},U.style),{},_e?{whiteSpace:\"pre-wrap\"}:{whiteSpace:\"pre\"}),!He)return We.createElement(Te,tt,Xe,We.createElement(qe,U,ze));(void 0===ye&&xe||_e)&&(ye=!0),xe=xe||defaultRenderer;var rt=[{type:\"text\",value:ze}],nt=function getCodeTree(s){var i=s.astGenerator,u=s.language,_=s.code,w=s.defaultCodeValue;if(isHighlightJs(i)){var x=checkForListedLanguage(i,u);return\"text\"===u?{value:w,language:\"text\"}:x?i.highlight(u,_):i.highlightAuto(_)}try{return u&&\"text\"!==u?{value:i.highlight(_,u)}:{value:w}}catch(s){return{value:w}}}({astGenerator:He,language:_,code:ze,defaultCodeValue:rt});null===nt.language&&(nt.value=rt);var ot=processLines(nt,ye,Se,ee,ae,ce,nt.value.length+ce,fe,_e);return We.createElement(Te,tt,We.createElement(qe,U,!ae&&Xe,xe({rows:ot,stylesheet:j,useInlineStyles:X})))}}(Uo,{});zo.registerLanguage=Uo.registerLanguage;const Vo=zo;var Wo=__webpack_require__(95089);const Ko=__webpack_require__.n(Wo)();var Ho=__webpack_require__(65772);const Jo=__webpack_require__.n(Ho)();var Go=__webpack_require__(17285);const Yo=__webpack_require__.n(Go)();var Xo=__webpack_require__(35344);const Qo=__webpack_require__.n(Xo)();var Zo=__webpack_require__(17533);const es=__webpack_require__.n(Zo)();var ts=__webpack_require__(73402);const rs=__webpack_require__.n(ts)();var ns=__webpack_require__(26571);const os=__webpack_require__.n(ns)(),ss={hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#333\",color:\"white\"},\"hljs-name\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-code\":{fontStyle:\"italic\",color:\"#888\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-tag\":{color:\"#62c8f3\"},\"hljs-variable\":{color:\"#ade5fc\"},\"hljs-template-variable\":{color:\"#ade5fc\"},\"hljs-selector-id\":{color:\"#ade5fc\"},\"hljs-selector-class\":{color:\"#ade5fc\"},\"hljs-string\":{color:\"#a2fca2\"},\"hljs-bullet\":{color:\"#d36363\"},\"hljs-type\":{color:\"#ffa\"},\"hljs-title\":{color:\"#ffa\"},\"hljs-section\":{color:\"#ffa\"},\"hljs-attribute\":{color:\"#ffa\"},\"hljs-quote\":{color:\"#ffa\"},\"hljs-built_in\":{color:\"#ffa\"},\"hljs-builtin-name\":{color:\"#ffa\"},\"hljs-number\":{color:\"#d36363\"},\"hljs-symbol\":{color:\"#d36363\"},\"hljs-keyword\":{color:\"#fcc28c\"},\"hljs-selector-tag\":{color:\"#fcc28c\"},\"hljs-literal\":{color:\"#fcc28c\"},\"hljs-comment\":{color:\"#888\"},\"hljs-deletion\":{color:\"#333\",backgroundColor:\"#fc9b9b\"},\"hljs-regexp\":{color:\"#c6b4f0\"},\"hljs-link\":{color:\"#c6b4f0\"},\"hljs-meta\":{color:\"#fc9b9b\"},\"hljs-addition\":{backgroundColor:\"#a2fca2\",color:\"#333\"}};Vo.registerLanguage(\"json\",Jo),Vo.registerLanguage(\"js\",Ko),Vo.registerLanguage(\"xml\",Yo),Vo.registerLanguage(\"yaml\",es),Vo.registerLanguage(\"http\",rs),Vo.registerLanguage(\"bash\",Qo),Vo.registerLanguage(\"powershell\",os),Vo.registerLanguage(\"javascript\",Ko);const as={agate:ss,arta:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#222\",color:\"#aaa\"},\"hljs-subst\":{color:\"#aaa\"},\"hljs-section\":{color:\"#fff\",fontWeight:\"bold\"},\"hljs-comment\":{color:\"#444\"},\"hljs-quote\":{color:\"#444\"},\"hljs-meta\":{color:\"#444\"},\"hljs-string\":{color:\"#ffcc33\"},\"hljs-symbol\":{color:\"#ffcc33\"},\"hljs-bullet\":{color:\"#ffcc33\"},\"hljs-regexp\":{color:\"#ffcc33\"},\"hljs-number\":{color:\"#00cc66\"},\"hljs-addition\":{color:\"#00cc66\"},\"hljs-built_in\":{color:\"#32aaee\"},\"hljs-builtin-name\":{color:\"#32aaee\"},\"hljs-literal\":{color:\"#32aaee\"},\"hljs-type\":{color:\"#32aaee\"},\"hljs-template-variable\":{color:\"#32aaee\"},\"hljs-attribute\":{color:\"#32aaee\"},\"hljs-link\":{color:\"#32aaee\"},\"hljs-keyword\":{color:\"#6644aa\"},\"hljs-selector-tag\":{color:\"#6644aa\"},\"hljs-name\":{color:\"#6644aa\"},\"hljs-selector-id\":{color:\"#6644aa\"},\"hljs-selector-class\":{color:\"#6644aa\"},\"hljs-title\":{color:\"#bb1166\"},\"hljs-variable\":{color:\"#bb1166\"},\"hljs-deletion\":{color:\"#bb1166\"},\"hljs-template-tag\":{color:\"#bb1166\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-emphasis\":{fontStyle:\"italic\"}},monokai:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#272822\",color:\"#ddd\"},\"hljs-tag\":{color:\"#f92672\"},\"hljs-keyword\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-strong\":{color:\"#f92672\"},\"hljs-name\":{color:\"#f92672\"},\"hljs-code\":{color:\"#66d9ef\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-attribute\":{color:\"#bf79db\"},\"hljs-symbol\":{color:\"#bf79db\"},\"hljs-regexp\":{color:\"#bf79db\"},\"hljs-link\":{color:\"#bf79db\"},\"hljs-string\":{color:\"#a6e22e\"},\"hljs-bullet\":{color:\"#a6e22e\"},\"hljs-subst\":{color:\"#a6e22e\"},\"hljs-title\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-section\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-emphasis\":{color:\"#a6e22e\"},\"hljs-type\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#a6e22e\"},\"hljs-builtin-name\":{color:\"#a6e22e\"},\"hljs-selector-attr\":{color:\"#a6e22e\"},\"hljs-selector-pseudo\":{color:\"#a6e22e\"},\"hljs-addition\":{color:\"#a6e22e\"},\"hljs-variable\":{color:\"#a6e22e\"},\"hljs-template-tag\":{color:\"#a6e22e\"},\"hljs-template-variable\":{color:\"#a6e22e\"},\"hljs-comment\":{color:\"#75715e\"},\"hljs-quote\":{color:\"#75715e\"},\"hljs-deletion\":{color:\"#75715e\"},\"hljs-meta\":{color:\"#75715e\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-selector-id\":{fontWeight:\"bold\"}},nord:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#2E3440\",color:\"#D8DEE9\"},\"hljs-subst\":{color:\"#D8DEE9\"},\"hljs-selector-tag\":{color:\"#81A1C1\"},\"hljs-selector-id\":{color:\"#8FBCBB\",fontWeight:\"bold\"},\"hljs-selector-class\":{color:\"#8FBCBB\"},\"hljs-selector-attr\":{color:\"#8FBCBB\"},\"hljs-selector-pseudo\":{color:\"#88C0D0\"},\"hljs-addition\":{backgroundColor:\"rgba(163, 190, 140, 0.5)\"},\"hljs-deletion\":{backgroundColor:\"rgba(191, 97, 106, 0.5)\"},\"hljs-built_in\":{color:\"#8FBCBB\"},\"hljs-type\":{color:\"#8FBCBB\"},\"hljs-class\":{color:\"#8FBCBB\"},\"hljs-function\":{color:\"#88C0D0\"},\"hljs-function > .hljs-title\":{color:\"#88C0D0\"},\"hljs-keyword\":{color:\"#81A1C1\"},\"hljs-literal\":{color:\"#81A1C1\"},\"hljs-symbol\":{color:\"#81A1C1\"},\"hljs-number\":{color:\"#B48EAD\"},\"hljs-regexp\":{color:\"#EBCB8B\"},\"hljs-string\":{color:\"#A3BE8C\"},\"hljs-title\":{color:\"#8FBCBB\"},\"hljs-params\":{color:\"#D8DEE9\"},\"hljs-bullet\":{color:\"#81A1C1\"},\"hljs-code\":{color:\"#8FBCBB\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-formula\":{color:\"#8FBCBB\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-link:hover\":{textDecoration:\"underline\"},\"hljs-quote\":{color:\"#4C566A\"},\"hljs-comment\":{color:\"#4C566A\"},\"hljs-doctag\":{color:\"#8FBCBB\"},\"hljs-meta\":{color:\"#5E81AC\"},\"hljs-meta-keyword\":{color:\"#5E81AC\"},\"hljs-meta-string\":{color:\"#A3BE8C\"},\"hljs-attr\":{color:\"#8FBCBB\"},\"hljs-attribute\":{color:\"#D8DEE9\"},\"hljs-builtin-name\":{color:\"#81A1C1\"},\"hljs-name\":{color:\"#81A1C1\"},\"hljs-section\":{color:\"#88C0D0\"},\"hljs-tag\":{color:\"#81A1C1\"},\"hljs-variable\":{color:\"#D8DEE9\"},\"hljs-template-variable\":{color:\"#D8DEE9\"},\"hljs-template-tag\":{color:\"#5E81AC\"},\"abnf .hljs-attribute\":{color:\"#88C0D0\"},\"abnf .hljs-symbol\":{color:\"#EBCB8B\"},\"apache .hljs-attribute\":{color:\"#88C0D0\"},\"apache .hljs-section\":{color:\"#81A1C1\"},\"arduino .hljs-built_in\":{color:\"#88C0D0\"},\"aspectj .hljs-meta\":{color:\"#D08770\"},\"aspectj > .hljs-title\":{color:\"#88C0D0\"},\"bnf .hljs-attribute\":{color:\"#8FBCBB\"},\"clojure .hljs-name\":{color:\"#88C0D0\"},\"clojure .hljs-symbol\":{color:\"#EBCB8B\"},\"coq .hljs-built_in\":{color:\"#88C0D0\"},\"cpp .hljs-meta-string\":{color:\"#8FBCBB\"},\"css .hljs-built_in\":{color:\"#88C0D0\"},\"css .hljs-keyword\":{color:\"#D08770\"},\"diff .hljs-meta\":{color:\"#8FBCBB\"},\"ebnf .hljs-attribute\":{color:\"#8FBCBB\"},\"glsl .hljs-built_in\":{color:\"#88C0D0\"},\"groovy .hljs-meta:not(:first-child)\":{color:\"#D08770\"},\"haxe .hljs-meta\":{color:\"#D08770\"},\"java .hljs-meta\":{color:\"#D08770\"},\"ldif .hljs-attribute\":{color:\"#8FBCBB\"},\"lisp .hljs-name\":{color:\"#88C0D0\"},\"lua .hljs-built_in\":{color:\"#88C0D0\"},\"moonscript .hljs-built_in\":{color:\"#88C0D0\"},\"nginx .hljs-attribute\":{color:\"#88C0D0\"},\"nginx .hljs-section\":{color:\"#5E81AC\"},\"pf .hljs-built_in\":{color:\"#88C0D0\"},\"processing .hljs-built_in\":{color:\"#88C0D0\"},\"scss .hljs-keyword\":{color:\"#81A1C1\"},\"stylus .hljs-keyword\":{color:\"#81A1C1\"},\"swift .hljs-meta\":{color:\"#D08770\"},\"vim .hljs-built_in\":{color:\"#88C0D0\",fontStyle:\"italic\"},\"yaml .hljs-meta\":{color:\"#D08770\"}},obsidian:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#282b2e\",color:\"#e0e2e4\"},\"hljs-keyword\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-id\":{color:\"#93c763\"},\"hljs-number\":{color:\"#ffcd22\"},\"hljs-attribute\":{color:\"#668bb0\"},\"hljs-code\":{color:\"white\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-section\":{color:\"white\",fontWeight:\"bold\"},\"hljs-regexp\":{color:\"#d39745\"},\"hljs-link\":{color:\"#d39745\"},\"hljs-meta\":{color:\"#557182\"},\"hljs-tag\":{color:\"#8cbbad\"},\"hljs-name\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-bullet\":{color:\"#8cbbad\"},\"hljs-subst\":{color:\"#8cbbad\"},\"hljs-emphasis\":{color:\"#8cbbad\"},\"hljs-type\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#8cbbad\"},\"hljs-selector-attr\":{color:\"#8cbbad\"},\"hljs-selector-pseudo\":{color:\"#8cbbad\"},\"hljs-addition\":{color:\"#8cbbad\"},\"hljs-variable\":{color:\"#8cbbad\"},\"hljs-template-tag\":{color:\"#8cbbad\"},\"hljs-template-variable\":{color:\"#8cbbad\"},\"hljs-string\":{color:\"#ec7600\"},\"hljs-symbol\":{color:\"#ec7600\"},\"hljs-comment\":{color:\"#818e96\"},\"hljs-quote\":{color:\"#818e96\"},\"hljs-deletion\":{color:\"#818e96\"},\"hljs-selector-class\":{color:\"#A082BD\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-title\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"}},\"tomorrow-night\":{\"hljs-comment\":{color:\"#969896\"},\"hljs-quote\":{color:\"#969896\"},\"hljs-variable\":{color:\"#cc6666\"},\"hljs-template-variable\":{color:\"#cc6666\"},\"hljs-tag\":{color:\"#cc6666\"},\"hljs-name\":{color:\"#cc6666\"},\"hljs-selector-id\":{color:\"#cc6666\"},\"hljs-selector-class\":{color:\"#cc6666\"},\"hljs-regexp\":{color:\"#cc6666\"},\"hljs-deletion\":{color:\"#cc6666\"},\"hljs-number\":{color:\"#de935f\"},\"hljs-built_in\":{color:\"#de935f\"},\"hljs-builtin-name\":{color:\"#de935f\"},\"hljs-literal\":{color:\"#de935f\"},\"hljs-type\":{color:\"#de935f\"},\"hljs-params\":{color:\"#de935f\"},\"hljs-meta\":{color:\"#de935f\"},\"hljs-link\":{color:\"#de935f\"},\"hljs-attribute\":{color:\"#f0c674\"},\"hljs-string\":{color:\"#b5bd68\"},\"hljs-symbol\":{color:\"#b5bd68\"},\"hljs-bullet\":{color:\"#b5bd68\"},\"hljs-addition\":{color:\"#b5bd68\"},\"hljs-title\":{color:\"#81a2be\"},\"hljs-section\":{color:\"#81a2be\"},\"hljs-keyword\":{color:\"#b294bb\"},\"hljs-selector-tag\":{color:\"#b294bb\"},hljs:{display:\"block\",overflowX:\"auto\",background:\"#1d1f21\",color:\"#c5c8c6\",padding:\"0.5em\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}},idea:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",color:\"#000\",background:\"#fff\"},\"hljs-subst\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-title\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-comment\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-quote\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-meta\":{color:\"#808000\"},\"hljs-tag\":{background:\"#efefef\"},\"hljs-section\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-name\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-literal\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-keyword\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-tag\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-type\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-id\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-class\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-attribute\":{fontWeight:\"bold\",color:\"#0000ff\"},\"hljs-number\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-regexp\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-link\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-string\":{color:\"#008000\",fontWeight:\"bold\"},\"hljs-symbol\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-bullet\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-formula\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-doctag\":{textDecoration:\"underline\"},\"hljs-variable\":{color:\"#660e7a\"},\"hljs-template-variable\":{color:\"#660e7a\"},\"hljs-addition\":{background:\"#baeeba\"},\"hljs-deletion\":{background:\"#ffc8bd\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}}},ls=Object.keys(as),getStyle=s=>ls.includes(s)?as[s]:(console.warn(`Request style '${s}' is not available, returning default instead`),ss),cs={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},us={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:s,requestSnippetsSelectors:i,getConfigs:u,getComponent:_})=>{const w=St()(u)?u():null,x=!1!==Eo()(w,\"syntaxHighlight\")&&Eo()(w,\"syntaxHighlight.activated\",!0),j=(0,We.useRef)(null),P=_(\"ArrowUpIcon\"),B=_(\"ArrowDownIcon\"),[$,U]=(0,We.useState)(i.getSnippetGenerators()?.keySeq().first()),[Y,X]=(0,We.useState)(i?.getDefaultExpanded());(0,We.useEffect)((()=>{}),[]),(0,We.useEffect)((()=>{const s=Array.from(j.current.childNodes).filter((s=>!!s.nodeType&&s.classList?.contains(\"curl-command\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s]);const Z=i.getSnippetGenerators(),ee=Z.get($),ie=ee.get(\"fn\")(s),handleSetIsExpanded=()=>{X(!Y)},handleGetBtnStyle=s=>s===$?us:cs,handlePreventYScrollingBeyondElement=s=>{const{target:i,deltaY:u}=s,{scrollHeight:_,offsetHeight:w,scrollTop:x}=i;_>w&&(0===x&&u<0||w+x>=_&&u>0)&&s.preventDefault()},ae=x?We.createElement(Vo,{language:ee.get(\"syntax\"),className:\"curl microlight\",style:getStyle(Eo()(w,\"syntaxHighlight.theme\"))},ie):We.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:ie});return We.createElement(\"div\",{className:\"request-snippets\",ref:j},We.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},We.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),We.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:Y?\"Collapse operation\":\"Expand operation\"},Y?We.createElement(B,{className:\"arrow\",width:\"10\",height:\"10\"}):We.createElement(P,{className:\"arrow\",width:\"10\",height:\"10\"}))),Y&&We.createElement(\"div\",{className:\"curl-command\"},We.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},Z.entrySeq().map((([s,i])=>We.createElement(\"div\",{style:handleGetBtnStyle(s),className:\"btn\",key:s,onClick:()=>(s=>{$!==s&&U(s)})(s)},We.createElement(\"h4\",{style:s===$?{color:\"white\"}:{}},i.get(\"title\")))))),We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Bo.CopyToClipboard,{text:ie},We.createElement(\"button\",null))),We.createElement(\"div\",null,ae)))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:Z,statePlugins:{requestSnippets:{selectors:ee}}});var ps=__webpack_require__(19123),hs=__webpack_require__.n(ps),ds=__webpack_require__(41859),fs=__webpack_require__.n(ds),ms=__webpack_require__(62193),gs=__webpack_require__.n(ms);const shallowArrayEquals=s=>i=>Array.isArray(s)&&Array.isArray(i)&&s.length===i.length&&s.every(((s,u)=>s===i[u])),list=(...s)=>s;class Cache extends Map{delete(s){const i=Array.from(this.keys()).find(shallowArrayEquals(s));return super.delete(i)}get(s){const i=Array.from(this.keys()).find(shallowArrayEquals(s));return super.get(i)}has(s){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(s))}}const utils_memoizeN=(s,i=list)=>{const{Cache:u}=mt();mt().Cache=Cache;const _=mt()(s,i);return mt().Cache=u,_},ys={string:s=>s.pattern?(s=>{try{return new(fs())(s).gen()}catch(s){return\"string\"}})(s.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:s=>\"boolean\"!=typeof s.default||s.default},primitive=s=>{s=objectify(s);let{type:i,format:u}=s,_=ys[`${i}_${u}`]||ys[i];return isFunc(_)?_(s):\"Unknown Type: \"+s.type},sanitizeRef=s=>deeplyStripKey(s,\"$$ref\",(s=>\"string\"==typeof s&&s.indexOf(\"#\")>-1)),vs=[\"maxProperties\",\"minProperties\"],bs=[\"minItems\",\"maxItems\"],_s=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],Es=[\"minLength\",\"maxLength\"],liftSampleHelper=(s,i,u={})=>{if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...vs,...bs,..._s,...Es].forEach((u=>(u=>{void 0===i[u]&&void 0!==s[u]&&(i[u]=s[u])})(u))),void 0!==s.required&&Array.isArray(s.required)&&(void 0!==i.required&&i.required.length||(i.required=[]),s.required.forEach((s=>{i.required.includes(s)||i.required.push(s)}))),s.properties){i.properties||(i.properties={});let _=objectify(s.properties);for(let w in _)Object.prototype.hasOwnProperty.call(_,w)&&(_[w]&&_[w].deprecated||_[w]&&_[w].readOnly&&!u.includeReadOnly||_[w]&&_[w].writeOnly&&!u.includeWriteOnly||i.properties[w]||(i.properties[w]=_[w],!s.required&&Array.isArray(s.required)&&-1!==s.required.indexOf(w)&&(i.required?i.required.push(w):i.required=[w])))}return s.items&&(i.items||(i.items={}),i.items=liftSampleHelper(s.items,i.items,u)),i},sampleFromSchemaGeneric=(s,i={},u=void 0,_=!1)=>{s&&isFunc(s.toJS)&&(s=s.toJS());let w=void 0!==u||s&&void 0!==s.example||s&&void 0!==s.default;const x=!w&&s&&s.oneOf&&s.oneOf.length>0,j=!w&&s&&s.anyOf&&s.anyOf.length>0;if(!w&&(x||j)){const u=objectify(x?s.oneOf[0]:s.anyOf[0]);if(liftSampleHelper(u,s,i),!s.xml&&u.xml&&(s.xml=u.xml),void 0!==s.example&&void 0!==u.example)w=!0;else if(u.properties){s.properties||(s.properties={});let _=objectify(u.properties);for(let w in _)Object.prototype.hasOwnProperty.call(_,w)&&(_[w]&&_[w].deprecated||_[w]&&_[w].readOnly&&!i.includeReadOnly||_[w]&&_[w].writeOnly&&!i.includeWriteOnly||s.properties[w]||(s.properties[w]=_[w],!u.required&&Array.isArray(u.required)&&-1!==u.required.indexOf(w)&&(s.required?s.required.push(w):s.required=[w])))}}const P={};let{xml:B,type:$,example:U,properties:Y,additionalProperties:X,items:Z}=s||{},{includeReadOnly:ee,includeWriteOnly:ie}=i;B=B||{};let ae,{name:le,prefix:ce,namespace:pe}=B,de={};if(_&&(le=le||\"notagname\",ae=(ce?ce+\":\":\"\")+le,pe)){P[ce?\"xmlns:\"+ce:\"xmlns\"]=pe}_&&(de[ae]=[]);const schemaHasAny=i=>i.some((i=>Object.prototype.hasOwnProperty.call(s,i)));s&&!$&&(Y||X||schemaHasAny(vs)?$=\"object\":Z||schemaHasAny(bs)?$=\"array\":schemaHasAny(_s)?($=\"number\",s.type=\"number\"):w||s.enum||($=\"string\",s.type=\"string\"));const handleMinMaxItems=i=>{if(null!=s?.maxItems&&(i=i.slice(0,s?.maxItems)),null!=s?.minItems){let u=0;for(;i.length<s?.minItems;)i.push(i[u++%i.length])}return i},fe=objectify(Y);let ye,be=0;const hasExceededMaxProperties=()=>s&&null!==s.maxProperties&&void 0!==s.maxProperties&&be>=s.maxProperties,canAddProperty=i=>!s||null===s.maxProperties||void 0===s.maxProperties||!hasExceededMaxProperties()&&(!(i=>!(s&&s.required&&s.required.length&&s.required.includes(i)))(i)||s.maxProperties-be-(()=>{if(!s||!s.required)return 0;let i=0;return _?s.required.forEach((s=>i+=void 0===de[s]?0:1)):s.required.forEach((s=>i+=void 0===de[ae]?.find((i=>void 0!==i[s]))?0:1)),s.required.length-i})()>0);if(ye=_?(u,w=void 0)=>{if(s&&fe[u]){if(fe[u].xml=fe[u].xml||{},fe[u].xml.attribute){const s=Array.isArray(fe[u].enum)?fe[u].enum[0]:void 0,i=fe[u].example,_=fe[u].default;return void(P[fe[u].xml.name||u]=void 0!==i?i:void 0!==_?_:void 0!==s?s:primitive(fe[u]))}fe[u].xml.name=fe[u].xml.name||u}else fe[u]||!1===X||(fe[u]={xml:{name:u}});let x=sampleFromSchemaGeneric(s&&fe[u]||void 0,i,w,_);canAddProperty(u)&&(be++,Array.isArray(x)?de[ae]=de[ae].concat(x):de[ae].push(x))}:(u,w)=>{if(canAddProperty(u)){if(Object.prototype.hasOwnProperty.call(s,\"discriminator\")&&s.discriminator&&Object.prototype.hasOwnProperty.call(s.discriminator,\"mapping\")&&s.discriminator.mapping&&Object.prototype.hasOwnProperty.call(s,\"$$ref\")&&s.$$ref&&s.discriminator.propertyName===u){for(let i in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[i])){de[u]=i;break}}else de[u]=sampleFromSchemaGeneric(fe[u],i,w,_);be++}},w){let w;if(w=sanitizeRef(void 0!==u?u:void 0!==U?U:s.default),!_){if(\"number\"==typeof w&&\"string\"===$)return`${w}`;if(\"string\"!=typeof w||\"string\"===$)return w;try{return JSON.parse(w)}catch(s){return w}}if(s||($=Array.isArray(w)?\"array\":typeof w),\"array\"===$){if(!Array.isArray(w)){if(\"string\"==typeof w)return w;w=[w]}const u=s?s.items:void 0;u&&(u.xml=u.xml||B||{},u.xml.name=u.xml.name||B.name);let x=w.map((s=>sampleFromSchemaGeneric(u,i,s,_)));return x=handleMinMaxItems(x),B.wrapped?(de[ae]=x,gs()(P)||de[ae].push({_attr:P})):de=x,de}if(\"object\"===$){if(\"string\"==typeof w)return w;for(let i in w)Object.prototype.hasOwnProperty.call(w,i)&&(s&&fe[i]&&fe[i].readOnly&&!ee||s&&fe[i]&&fe[i].writeOnly&&!ie||(s&&fe[i]&&fe[i].xml&&fe[i].xml.attribute?P[fe[i].xml.name||i]=w[i]:ye(i,w[i])));return gs()(P)||de[ae].push({_attr:P}),de}return de[ae]=gs()(P)?w:[{_attr:P},w],de}if(\"object\"===$){for(let s in fe)Object.prototype.hasOwnProperty.call(fe,s)&&(fe[s]&&fe[s].deprecated||fe[s]&&fe[s].readOnly&&!ee||fe[s]&&fe[s].writeOnly&&!ie||ye(s));if(_&&P&&de[ae].push({_attr:P}),hasExceededMaxProperties())return de;if(!0===X)_?de[ae].push({additionalProp:\"Anything can be here\"}):de.additionalProp1={},be++;else if(X){const u=objectify(X),w=sampleFromSchemaGeneric(u,i,void 0,_);if(_&&u.xml&&u.xml.name&&\"notagname\"!==u.xml.name)de[ae].push(w);else{const i=null!==s.minProperties&&void 0!==s.minProperties&&be<s.minProperties?s.minProperties-be:3;for(let s=1;s<=i;s++){if(hasExceededMaxProperties())return de;if(_){const i={};i[\"additionalProp\"+s]=w.notagname,de[ae].push(i)}else de[\"additionalProp\"+s]=w;be++}}}return de}if(\"array\"===$){if(!Z)return;let u;if(_&&(Z.xml=Z.xml||s?.xml||{},Z.xml.name=Z.xml.name||B.name),Array.isArray(Z.anyOf))u=Z.anyOf.map((s=>sampleFromSchemaGeneric(liftSampleHelper(Z,s,i),i,void 0,_)));else if(Array.isArray(Z.oneOf))u=Z.oneOf.map((s=>sampleFromSchemaGeneric(liftSampleHelper(Z,s,i),i,void 0,_)));else{if(!(!_||_&&B.wrapped))return sampleFromSchemaGeneric(Z,i,void 0,_);u=[sampleFromSchemaGeneric(Z,i,void 0,_)]}return u=handleMinMaxItems(u),_&&B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P}),de):u}let _e;if(s&&Array.isArray(s.enum))_e=normalizeArray(s.enum)[0];else{if(!s)return;if(_e=primitive(s),\"number\"==typeof _e){let i=s.minimum;null!=i&&(s.exclusiveMinimum&&i++,_e=i);let u=s.maximum;null!=u&&(s.exclusiveMaximum&&u--,_e=u)}if(\"string\"==typeof _e&&(null!==s.maxLength&&void 0!==s.maxLength&&(_e=_e.slice(0,s.maxLength)),null!==s.minLength&&void 0!==s.minLength)){let i=0;for(;_e.length<s.minLength;)_e+=_e[i++%_e.length]}}if(\"file\"!==$)return _?(de[ae]=gs()(P)?_e:[{_attr:P},_e],de):_e},inferSchema=s=>(s.schema&&(s=s.schema),s.properties&&(s.type=\"object\"),s),createXMLExample=(s,i,u)=>{const _=sampleFromSchemaGeneric(s,i,u,!0);if(_)return\"string\"==typeof _?_:hs()(_,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(s,i,u)=>sampleFromSchemaGeneric(s,i,u,!1),resolver=(s,i,u)=>[s,JSON.stringify(i),JSON.stringify(u)],ws=utils_memoizeN(createXMLExample,resolver),Ss=utils_memoizeN(sampleFromSchema,resolver),xs=[{when:/json/,shouldStringifyTypes:[\"string\"]}],ks=[\"object\"],get_json_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.memoizedSampleFromSchema(i,u,w),P=typeof j,B=xs.reduce(((s,i)=>i.when.test(_)?[...s,...i.shouldStringifyTypes]:s),ks);return bt()(B,(s=>s===P))?JSON.stringify(j,null,2):j},get_yaml_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.getJsonSampleSchema(i,u,_,w);let P;try{P=so.dump(so.load(j),{lineWidth:-1},{schema:Jn}),\"\\n\"===P[P.length-1]&&(P=P.slice(0,P.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return P.replace(/\\t/g,\"  \")},get_xml_sample_schema=s=>(i,u,_)=>{const{fn:w}=s();if(i&&!i.xml&&(i.xml={}),i&&!i.xml.name){if(!i.$$ref&&(i.type||i.items||i.properties||i.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(i.$$ref){let s=i.$$ref.match(/\\S*\\/(\\S+)$/);i.xml.name=s[1]}}return w.memoizedCreateXMLExample(i,u,_)},get_sample_schema=s=>(i,u=\"\",_={},w=void 0)=>{const{fn:x}=s();return\"function\"==typeof i?.toJS&&(i=i.toJS()),\"function\"==typeof w?.toJS&&(w=w.toJS()),/xml/.test(u)?x.getXmlSampleSchema(i,_,w):/(yaml|yml)/.test(u)?x.getYamlSampleSchema(i,_,u,w):x.getJsonSampleSchema(i,_,u,w)},json_schema_5_samples=({getSystem:s})=>{const i=get_json_sample_schema(s),u=get_yaml_sample_schema(s),_=get_xml_sample_schema(s),w=get_sample_schema(s);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Ss,memoizedCreateXMLExample:ws,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Ss,memoizedCreateXMLExample:ws,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w}}};var Os=__webpack_require__(37334),Cs=__webpack_require__.n(Os);const As=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=s=>s||(0,Xe.Map)(),js=Gt(spec_selectors_state,(s=>s.get(\"lastError\"))),Ps=Gt(spec_selectors_state,(s=>s.get(\"url\"))),Is=Gt(spec_selectors_state,(s=>s.get(\"spec\")||\"\")),Ns=Gt(spec_selectors_state,(s=>s.get(\"specSource\")||\"not-editor\")),Ms=Gt(spec_selectors_state,(s=>s.get(\"json\",(0,Xe.Map)()))),Ts=Gt(Ms,(s=>s.toJS())),Rs=Gt(spec_selectors_state,(s=>s.get(\"resolved\",(0,Xe.Map)()))),specResolvedSubtree=(s,i)=>s.getIn([\"resolvedSubtrees\",...i],void 0),mergerFn=(s,i)=>Xe.Map.isMap(s)&&Xe.Map.isMap(i)?i.get(\"$$ref\")?i:(0,Xe.OrderedMap)().mergeWith(mergerFn,s,i):i,Ds=Gt(spec_selectors_state,(s=>(0,Xe.OrderedMap)().mergeWith(mergerFn,s.get(\"json\"),s.get(\"resolvedSubtrees\")))),spec=s=>Ms(s),Ls=Gt(spec,(()=>!1)),Bs=Gt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"info\")))),Fs=Gt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"externalDocs\")))),qs=Gt(Bs,(s=>s&&s.get(\"version\"))),$s=Gt(qs,(s=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(s).slice(1))),Us=Gt(Ds,(s=>s.get(\"paths\"))),zs=Cs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),Vs=Gt(Us,(s=>{if(!s||s.size<1)return(0,Xe.List)();let i=(0,Xe.List)();return s&&s.forEach?(s.forEach(((s,u)=>{if(!s||!s.forEach)return{};s.forEach(((s,_)=>{As.indexOf(_)<0||(i=i.push((0,Xe.fromJS)({path:u,method:_,operation:s,id:`${_}-${u}`})))}))})),i):(0,Xe.List)()})),Ws=Gt(spec,(s=>(0,Xe.Set)(s.get(\"consumes\")))),Ks=Gt(spec,(s=>(0,Xe.Set)(s.get(\"produces\")))),Hs=Gt(spec,(s=>s.get(\"security\",(0,Xe.List)()))),Js=Gt(spec,(s=>s.get(\"securityDefinitions\"))),findDefinition=(s,i)=>{const u=s.getIn([\"resolvedSubtrees\",\"definitions\",i],null),_=s.getIn([\"json\",\"definitions\",i],null);return u||_||null},Gs=Gt(spec,(s=>{const i=s.get(\"definitions\");return Xe.Map.isMap(i)?i:(0,Xe.Map)()})),Ys=Gt(spec,(s=>s.get(\"basePath\"))),Xs=Gt(spec,(s=>s.get(\"host\"))),Qs=Gt(spec,(s=>s.get(\"schemes\",(0,Xe.Map)()))),Zs=Gt([Vs,Ws,Ks],((s,i,u)=>s.map((s=>s.update(\"operation\",(s=>{if(s){if(!Xe.Map.isMap(s))return;return s.withMutations((s=>(s.get(\"consumes\")||s.update(\"consumes\",(s=>(0,Xe.Set)(s).merge(i))),s.get(\"produces\")||s.update(\"produces\",(s=>(0,Xe.Set)(s).merge(u))),s)))}return(0,Xe.Map)()})))))),ai=Gt(spec,(s=>{const i=s.get(\"tags\",(0,Xe.List)());return Xe.List.isList(i)?i.filter((s=>Xe.Map.isMap(s))):(0,Xe.List)()})),tagDetails=(s,i)=>(ai(s)||(0,Xe.List)()).filter(Xe.Map.isMap).find((s=>s.get(\"name\")===i),(0,Xe.Map)()),_i=Gt(Zs,ai,((s,i)=>s.reduce(((s,i)=>{let u=(0,Xe.Set)(i.getIn([\"operation\",\"tags\"]));return u.count()<1?s.update(\"default\",(0,Xe.List)(),(s=>s.push(i))):u.reduce(((s,u)=>s.update(u,(0,Xe.List)(),(s=>s.push(i)))),s)}),i.reduce(((s,i)=>s.set(i.get(\"name\"),(0,Xe.List)())),(0,Xe.OrderedMap)())))),selectors_taggedOperations=s=>({getConfigs:i})=>{let{tagsSorter:u,operationsSorter:_}=i();return _i(s).sortBy(((s,i)=>i),((s,i)=>{let _=\"function\"==typeof u?u:Tt.tagsSorter[u];return _?_(s,i):null})).map(((i,u)=>{let w=\"function\"==typeof _?_:Tt.operationsSorter[_],x=w?i.sort(w):i;return(0,Xe.Map)({tagDetails:tagDetails(s,u),operations:x})}))},Si=Gt(spec_selectors_state,(s=>s.get(\"responses\",(0,Xe.Map)()))),Pi=Gt(spec_selectors_state,(s=>s.get(\"requests\",(0,Xe.Map)()))),Ni=Gt(spec_selectors_state,(s=>s.get(\"mutatedRequests\",(0,Xe.Map)()))),responseFor=(s,i,u)=>Si(s).getIn([i,u],null),requestFor=(s,i,u)=>Pi(s).getIn([i,u],null),mutatedRequestFor=(s,i,u)=>Ni(s).getIn([i,u],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(s,i,u)=>{const _=Ds(s).getIn([\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)()),w=s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)());return _.map((s=>{const i=w.get(`${u.get(\"in\")}.${u.get(\"name\")}`),_=w.get(`${u.get(\"in\")}.${u.get(\"name\")}.hash-${u.hashCode()}`);return(0,Xe.OrderedMap)().merge(s,i,_)})).find((s=>s.get(\"in\")===u.get(\"in\")&&s.get(\"name\")===u.get(\"name\")),(0,Xe.OrderedMap)())},parameterInclusionSettingFor=(s,i,u,_)=>{const w=`${_}.${u}`;return s.getIn([\"meta\",\"paths\",...i,\"parameter_inclusions\",w],!1)},parameterWithMeta=(s,i,u,_)=>{const w=Ds(s).getIn([\"paths\",...i,\"parameters\"],(0,Xe.OrderedMap)()).find((s=>s.get(\"in\")===_&&s.get(\"name\")===u),(0,Xe.OrderedMap)());return parameterWithMetaByIdentity(s,i,w)},operationWithMeta=(s,i,u)=>{const _=Ds(s).getIn([\"paths\",i,u],(0,Xe.OrderedMap)()),w=s.getIn([\"meta\",\"paths\",i,u],(0,Xe.OrderedMap)()),x=_.get(\"parameters\",(0,Xe.List)()).map((_=>parameterWithMetaByIdentity(s,[i,u],_)));return(0,Xe.OrderedMap)().merge(_,w).set(\"parameters\",x)};function getParameter(s,i,u,_){return i=i||[],s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([])).find((s=>Xe.Map.isMap(s)&&s.get(\"name\")===u&&s.get(\"in\")===_))||(0,Xe.Map)()}const Xi=Gt(spec,(s=>{const i=s.get(\"host\");return\"string\"==typeof i&&i.length>0&&\"/\"!==i[0]}));function parameterValues(s,i,u){return i=i||[],operationWithMeta(s,...i).get(\"parameters\",(0,Xe.List)()).reduce(((s,i)=>{let _=u&&\"body\"===i.get(\"in\")?i.get(\"value_xml\"):i.get(\"value\");return Xe.List.isList(_)&&(_=_.filter((s=>\"\"!==s))),s.set(paramToIdentifier(i,{allowHashes:!1}),_)}),(0,Xe.fromJS)({}))}function parametersIncludeIn(s,i=\"\"){if(Xe.List.isList(s))return s.some((s=>Xe.Map.isMap(s)&&s.get(\"in\")===i))}function parametersIncludeType(s,i=\"\"){if(Xe.List.isList(s))return s.some((s=>Xe.Map.isMap(s)&&s.get(\"type\")===i))}function contentTypeValues(s,i){i=i||[];let u=Ds(s).getIn([\"paths\",...i],(0,Xe.fromJS)({})),_=s.getIn([\"meta\",\"paths\",...i],(0,Xe.fromJS)({})),w=currentProducesFor(s,i);const x=u.get(\"parameters\")||new Xe.List,j=_.get(\"consumes_value\")?_.get(\"consumes_value\"):parametersIncludeType(x,\"file\")?\"multipart/form-data\":parametersIncludeType(x,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,Xe.fromJS)({requestContentType:j,responseContentType:w})}function currentProducesFor(s,i){i=i||[];const u=Ds(s).getIn([\"paths\",...i],null);if(null===u)return;const _=s.getIn([\"meta\",\"paths\",...i,\"produces_value\"],null),w=u.getIn([\"produces\",0],null);return _||w||\"application/json\"}function producesOptionsFor(s,i){i=i||[];const u=Ds(s),_=u.getIn([\"paths\",...i],null);if(null===_)return;const[w]=i,x=_.get(\"produces\",null),j=u.getIn([\"paths\",w,\"produces\"],null),P=u.getIn([\"produces\"],null);return x||j||P}function consumesOptionsFor(s,i){i=i||[];const u=Ds(s),_=u.getIn([\"paths\",...i],null);if(null===_)return;const[w]=i,x=_.get(\"consumes\",null),j=u.getIn([\"paths\",w,\"consumes\"],null),P=u.getIn([\"consumes\"],null);return x||j||P}const operationScheme=(s,i,u)=>{let _=s.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),w=Array.isArray(_)?_[1]:null;return s.getIn([\"scheme\",i,u])||s.getIn([\"scheme\",\"_defaultScheme\"])||w||\"\"},canExecuteScheme=(s,i,u)=>[\"http\",\"https\"].indexOf(operationScheme(s,i,u))>-1,validationErrors=(s,i)=>{i=i||[];let u=s.getIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([]));const _=[];return u.forEach((s=>{let i=s.get(\"errors\");i&&i.count()&&i.map((s=>Xe.Map.isMap(s)?`${s.get(\"propKey\")}: ${s.get(\"error\")}`:s)).forEach((s=>_.push(s)))})),_},validateBeforeExecute=(s,i)=>0===validationErrors(s,i).length,getOAS3RequiredRequestBodyContentType=(s,i)=>{let u={requestBody:!1,requestContentType:{}},_=s.getIn([\"resolvedSubtrees\",\"paths\",...i,\"requestBody\"],(0,Xe.fromJS)([]));return _.size<1||(_.getIn([\"required\"])&&(u.requestBody=_.getIn([\"required\"])),_.getIn([\"content\"]).entrySeq().forEach((s=>{const i=s[0];if(s[1].getIn([\"schema\",\"required\"])){const _=s[1].getIn([\"schema\",\"required\"]).toJS();u.requestContentType[i]=_}}))),u},isMediaTypeSchemaPropertiesEqual=(s,i,u,_)=>{if((u||_)&&u===_)return!0;let w=s.getIn([\"resolvedSubtrees\",\"paths\",...i,\"requestBody\",\"content\"],(0,Xe.fromJS)([]));if(w.size<2||!u||!_)return!1;let x=w.getIn([u,\"schema\",\"properties\"],(0,Xe.fromJS)([])),j=w.getIn([_,\"schema\",\"properties\"],(0,Xe.fromJS)([]));return!!x.equals(j)};function returnSelfOrNewMap(s){return Xe.Map.isMap(s)?s:new Xe.Map}var Qi=__webpack_require__(85015),ea=__webpack_require__.n(Qi),ra=__webpack_require__(38221),na=__webpack_require__.n(ra),ia=__webpack_require__(63560),aa=__webpack_require__.n(ia),la=__webpack_require__(56367),ca=__webpack_require__.n(la);const ua=\"spec_update_spec\",da=\"spec_update_url\",ma=\"spec_update_json\",ga=\"spec_update_param\",ya=\"spec_update_empty_param_inclusion\",va=\"spec_validate_param\",ba=\"spec_set_response\",_a=\"spec_set_request\",Ea=\"spec_set_mutated_request\",wa=\"spec_log_request\",xa=\"spec_clear_response\",ka=\"spec_clear_request\",Ca=\"spec_clear_validate_param\",Aa=\"spec_update_operation_meta_value\",ja=\"spec_update_resolved\",Ia=\"spec_update_resolved_subtree\",Na=\"set_scheme\",toStr=s=>ea()(s)?s:\"\";function updateSpec(s){const i=toStr(s).replace(/\\t/g,\"  \");if(\"string\"==typeof s)return{type:ua,payload:i}}function updateResolved(s){return{type:ja,payload:s}}function updateUrl(s){return{type:da,payload:s}}function updateJsonSpec(s){return{type:ma,payload:s}}const parseToJson=s=>({specActions:i,specSelectors:u,errActions:_})=>{let{specStr:w}=u,x=null;try{s=s||w(),_.clear({source:\"parser\"}),x=so.load(s,{schema:Jn})}catch(s){return console.error(s),_.newSpecErr({source:\"parser\",level:\"error\",message:s.reason,line:s.mark&&s.mark.line?s.mark.line+1:void 0})}return x&&\"object\"==typeof x?i.updateJsonSpec(x):{}};let Da=!1;const resolveSpec=(s,i)=>({specActions:u,specSelectors:_,errActions:w,fn:{fetch:x,resolve:j,AST:P={}},getConfigs:B})=>{Da||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),Da=!0);const{modelPropertyMacro:$,parameterMacro:U,requestInterceptor:Y,responseInterceptor:X}=B();void 0===s&&(s=_.specJson()),void 0===i&&(i=_.url());let Z=P.getLineNumberForPath?P.getLineNumberForPath:()=>{},ee=_.specStr();return j({fetch:x,spec:s,baseDoc:String(new URL(i,document.baseURI)),modelPropertyMacro:$,parameterMacro:U,requestInterceptor:Y,responseInterceptor:X}).then((({spec:s,errors:i})=>{if(w.clear({type:\"thrown\"}),Array.isArray(i)&&i.length>0){let s=i.map((s=>(console.error(s),s.line=s.fullPath?Z(ee,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));w.newThrownErrBatch(s)}return u.updateResolved(s)}))};let La=[];const Ba=na()((()=>{const s=La.reduce(((s,{path:i,system:u})=>(s.has(u)||s.set(u,[]),s.get(u).push(i),s)),new Map);La=[],s.forEach((async(s,i)=>{if(!i)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!i.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:u,errSelectors:_,fn:{resolveSubtree:w,fetch:x,AST:j={}},specSelectors:P,specActions:B}=i,$=j.getLineNumberForPath??Cs()(void 0),U=P.specStr(),{modelPropertyMacro:Y,parameterMacro:X,requestInterceptor:Z,responseInterceptor:ee}=i.getConfigs();try{const i=await s.reduce((async(s,i)=>{let{resultMap:j,specWithCurrentSubtrees:B}=await s;const{errors:ie,spec:ae}=await w(B,i,{baseDoc:String(new URL(P.url(),document.baseURI)),modelPropertyMacro:Y,parameterMacro:X,requestInterceptor:Z,responseInterceptor:ee});if(_.allErrors().size&&u.clearBy((s=>\"thrown\"!==s.get(\"type\")||\"resolver\"!==s.get(\"source\")||!s.get(\"fullPath\").every(((s,u)=>s===i[u]||void 0===i[u])))),Array.isArray(ie)&&ie.length>0){let s=ie.map((s=>(s.line=s.fullPath?$(U,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));u.newThrownErrBatch(s)}return ae&&P.isOAS3()&&\"components\"===i[0]&&\"securitySchemes\"===i[1]&&await Promise.all(Object.values(ae).filter((s=>\"openIdConnect\"===s.type)).map((async s=>{const i={url:s.openIdConnectUrl,requestInterceptor:Z,responseInterceptor:ee};try{const u=await x(i);u instanceof Error||u.status>=400?console.error(u.statusText+\" \"+i.url):s.openIdConnectData=JSON.parse(u.text)}catch(s){console.error(s)}}))),aa()(j,i,ae),B=ca()(i,ae,B),{resultMap:j,specWithCurrentSubtrees:B}}),Promise.resolve({resultMap:(P.specResolvedSubtree([])||(0,Xe.Map)()).toJS(),specWithCurrentSubtrees:P.specJS()}));B.updateResolvedSubtree([],i.resultMap)}catch(s){console.error(s)}}))}),35),requestResolvedSubtree=s=>i=>{La.find((({path:u,system:_})=>_===i&&u.toString()===s.toString()))||(La.push({path:s,system:i}),Ba())};function changeParam(s,i,u,_,w){return{type:ga,payload:{path:s,value:_,paramName:i,paramIn:u,isXml:w}}}function changeParamByIdentity(s,i,u,_){return{type:ga,payload:{path:s,param:i,value:u,isXml:_}}}const updateResolvedSubtree=(s,i)=>({type:Ia,payload:{path:s,value:i}}),invalidateResolvedSubtreeCache=()=>({type:Ia,payload:{path:[],value:(0,Xe.Map)()}}),validateParams=(s,i)=>({type:va,payload:{pathMethod:s,isOAS3:i}}),updateEmptyParamInclusion=(s,i,u,_)=>({type:ya,payload:{pathMethod:s,paramName:i,paramIn:u,includeEmptyValue:_}});function clearValidateParams(s){return{type:Ca,payload:{pathMethod:s}}}function changeConsumesValue(s,i){return{type:Aa,payload:{path:s,value:i,key:\"consumes_value\"}}}function changeProducesValue(s,i){return{type:Aa,payload:{path:s,value:i,key:\"produces_value\"}}}const setResponse=(s,i,u)=>({payload:{path:s,method:i,res:u},type:ba}),setRequest=(s,i,u)=>({payload:{path:s,method:i,req:u},type:_a}),setMutatedRequest=(s,i,u)=>({payload:{path:s,method:i,req:u},type:Ea}),logRequest=s=>({payload:s,type:wa}),executeRequest=s=>({fn:i,specActions:u,specSelectors:_,getConfigs:w,oas3Selectors:x})=>{let{pathName:j,method:P,operation:B}=s,{requestInterceptor:$,responseInterceptor:U}=w(),Y=B.toJS();if(B&&B.get(\"parameters\")&&B.get(\"parameters\").filter((s=>s&&!0===s.get(\"allowEmptyValue\"))).forEach((i=>{if(_.parameterInclusionSettingFor([j,P],i.get(\"name\"),i.get(\"in\"))){s.parameters=s.parameters||{};const u=paramToValue(i,s.parameters);(!u||u&&0===u.size)&&(s.parameters[i.get(\"name\")]=\"\")}})),s.contextUrl=Dt()(_.url()).toString(),Y&&Y.operationId?s.operationId=Y.operationId:Y&&j&&P&&(s.operationId=i.opId(Y,j,P)),_.isOAS3()){const i=`${j}:${P}`;s.server=x.selectedServer(i)||x.selectedServer();const u=x.serverVariables({server:s.server,namespace:i}).toJS(),_=x.serverVariables({server:s.server}).toJS();s.serverVariables=Object.keys(u).length?u:_,s.requestContentType=x.requestContentType(j,P),s.responseContentType=x.responseContentType(j,P)||\"*/*\";const w=x.requestBodyValue(j,P),B=x.requestBodyInclusionSetting(j,P);w&&w.toJS?s.requestBody=w.map((s=>Xe.Map.isMap(s)?s.get(\"value\"):s)).filter(((s,i)=>(Array.isArray(s)?0!==s.length:!isEmptyValue(s))||B.get(i))).toJS():s.requestBody=w}let X=Object.assign({},s);X=i.buildRequest(X),u.setRequest(s.pathName,s.method,X);s.requestInterceptor=async i=>{let _=await $.apply(void 0,[i]),w=Object.assign({},_);return u.setMutatedRequest(s.pathName,s.method,w),_},s.responseInterceptor=U;const Z=Date.now();return i.execute(s).then((i=>{i.duration=Date.now()-Z,u.setResponse(s.pathName,s.method,i)})).catch((i=>{\"Failed to fetch\"===i.message&&(i.name=\"\",i.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),u.setResponse(s.pathName,s.method,{error:!0,err:i})}))},actions_execute=({path:s,method:i,...u}={})=>_=>{let{fn:{fetch:w},specSelectors:x,specActions:j}=_,P=x.specJsonWithResolvedSubtrees().toJS(),B=x.operationScheme(s,i),{requestContentType:$,responseContentType:U}=x.contentTypeValues([s,i]).toJS(),Y=/xml/i.test($),X=x.parameterValues([s,i],Y).toJS();return j.executeRequest({...u,fetch:w,spec:P,pathName:s,method:i,parameters:X,requestContentType:$,scheme:B,responseContentType:U})};function clearResponse(s,i){return{type:xa,payload:{path:s,method:i}}}function clearRequest(s,i){return{type:ka,payload:{path:s,method:i}}}function setScheme(s,i,u){return{type:Na,payload:{scheme:s,path:i,method:u}}}const Fa={[ua]:(s,i)=>\"string\"==typeof i.payload?s.set(\"spec\",i.payload):s,[da]:(s,i)=>s.set(\"url\",i.payload+\"\"),[ma]:(s,i)=>s.set(\"json\",fromJSOrdered(i.payload)),[ja]:(s,i)=>s.setIn([\"resolved\"],fromJSOrdered(i.payload)),[Ia]:(s,i)=>{const{value:u,path:_}=i.payload;return s.setIn([\"resolvedSubtrees\",..._],fromJSOrdered(u))},[ga]:(s,{payload:i})=>{let{path:u,paramName:_,paramIn:w,param:x,value:j,isXml:P}=i,B=x?paramToIdentifier(x):`${w}.${_}`;const $=P?\"value_xml\":\"value\";return s.setIn([\"meta\",\"paths\",...u,\"parameters\",B,$],(0,Xe.fromJS)(j))},[ya]:(s,{payload:i})=>{let{pathMethod:u,paramName:_,paramIn:w,includeEmptyValue:x}=i;if(!_||!w)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),s;const j=`${w}.${_}`;return s.setIn([\"meta\",\"paths\",...u,\"parameter_inclusions\",j],x)},[va]:(s,{payload:{pathMethod:i,isOAS3:u}})=>{const _=Ds(s).getIn([\"paths\",...i]),w=parameterValues(s,i).toJS();return s.updateIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)({}),(x=>_.get(\"parameters\",(0,Xe.List)()).reduce(((_,x)=>{const j=paramToValue(x,w),P=parameterInclusionSettingFor(s,i,x.get(\"name\"),x.get(\"in\")),B=((s,i,{isOAS3:u=!1,bypassRequiredCheck:_=!1}={})=>{let w=s.get(\"required\"),{schema:x,parameterContentMediaType:j}=getParameterSchema(s,{isOAS3:u});return validateValueBySchema(i,x,w,_,j)})(x,j,{bypassRequiredCheck:P,isOAS3:u});return _.setIn([paramToIdentifier(x),\"errors\"],(0,Xe.fromJS)(B))}),x)))},[Ca]:(s,{payload:{pathMethod:i}})=>s.updateIn([\"meta\",\"paths\",...i,\"parameters\"],(0,Xe.fromJS)([]),(s=>s.map((s=>s.set(\"errors\",(0,Xe.fromJS)([])))))),[ba]:(s,{payload:{res:i,path:u,method:_}})=>{let w;w=i.error?Object.assign({error:!0,name:i.err.name,message:i.err.message,statusCode:i.err.statusCode},i.err.response):i,w.headers=w.headers||{};let x=s.setIn([\"responses\",u,_],fromJSOrdered(w));return pt.Blob&&w.data instanceof pt.Blob&&(x=x.setIn([\"responses\",u,_,\"text\"],w.data)),x},[_a]:(s,{payload:{req:i,path:u,method:_}})=>s.setIn([\"requests\",u,_],fromJSOrdered(i)),[Ea]:(s,{payload:{req:i,path:u,method:_}})=>s.setIn([\"mutatedRequests\",u,_],fromJSOrdered(i)),[Aa]:(s,{payload:{path:i,value:u,key:_}})=>{let w=[\"paths\",...i],x=[\"meta\",\"paths\",...i];return s.getIn([\"json\",...w])||s.getIn([\"resolved\",...w])||s.getIn([\"resolvedSubtrees\",...w])?s.setIn([...x,_],(0,Xe.fromJS)(u)):s},[xa]:(s,{payload:{path:i,method:u}})=>s.deleteIn([\"responses\",i,u]),[ka]:(s,{payload:{path:i,method:u}})=>s.deleteIn([\"requests\",i,u]),[Na]:(s,{payload:{scheme:i,path:u,method:_}})=>u&&_?s.setIn([\"scheme\",u,_],i):u||_?void 0:s.setIn([\"scheme\",\"_defaultScheme\"],i)},wrap_actions_updateSpec=(s,{specActions:i})=>(...u)=>{s(...u),i.parseToJson(...u)},wrap_actions_updateJsonSpec=(s,{specActions:i})=>(...u)=>{s(...u),i.invalidateResolvedSubtreeCache();const[_]=u,w=Eo()(_,[\"paths\"])||{};Object.keys(w).forEach((s=>{Eo()(w,[s]).$ref&&i.requestResolvedSubtree([\"paths\",s])})),i.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(s,{specActions:i})=>u=>(i.logRequest(u),s(u)),wrap_actions_validateParams=(s,{specSelectors:i})=>u=>s(u,i.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...le},reducers:{...Fa},actions:{...ae},selectors:{...ie}}}});var $a=function(){var extendStatics=function(s,i){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var u in i)i.hasOwnProperty(u)&&(s[u]=i[u])},extendStatics(s,i)};return function(s,i){function __(){this.constructor=s}extendStatics(s,i),s.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}}(),za=Object.prototype.hasOwnProperty;function module_helpers_hasOwnProperty(s,i){return za.call(s,i)}function _objectKeys(s){if(Array.isArray(s)){for(var i=new Array(s.length),u=0;u<i.length;u++)i[u]=\"\"+u;return i}if(Object.keys)return Object.keys(s);var _=[];for(var w in s)module_helpers_hasOwnProperty(s,w)&&_.push(w);return _}function _deepClone(s){switch(typeof s){case\"object\":return JSON.parse(JSON.stringify(s));case\"undefined\":return null;default:return s}}function helpers_isInteger(s){for(var i,u=0,_=s.length;u<_;){if(!((i=s.charCodeAt(u))>=48&&i<=57))return!1;u++}return!0}function escapePathComponent(s){return-1===s.indexOf(\"/\")&&-1===s.indexOf(\"~\")?s:s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function unescapePathComponent(s){return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}function hasUndefined(s){if(void 0===s)return!0;if(s)if(Array.isArray(s)){for(var i=0,u=s.length;i<u;i++)if(hasUndefined(s[i]))return!0}else if(\"object\"==typeof s)for(var _=_objectKeys(s),w=_.length,x=0;x<w;x++)if(hasUndefined(s[_[x]]))return!0;return!1}function patchErrorMessageFormatter(s,i){var u=[s];for(var _ in i){var w=\"object\"==typeof i[_]?JSON.stringify(i[_],null,2):i[_];void 0!==w&&u.push(_+\": \"+w)}return u.join(\"\\n\")}var Ha=function(s){function PatchError(i,u,_,w,x){var j=this.constructor,P=s.call(this,patchErrorMessageFormatter(i,{name:u,index:_,operation:w,tree:x}))||this;return P.name=u,P.index=_,P.operation=w,P.tree=x,Object.setPrototypeOf(P,j.prototype),P.message=patchErrorMessageFormatter(i,{name:u,index:_,operation:w,tree:x}),P}return $a(PatchError,s),PatchError}(Error),Ja=Ha,Ga=_deepClone,tl={add:function(s,i,u){return s[i]=this.value,{newDocument:u}},remove:function(s,i,u){var _=s[i];return delete s[i],{newDocument:u,removed:_}},replace:function(s,i,u){var _=s[i];return s[i]=this.value,{newDocument:u,removed:_}},move:function(s,i,u){var _=getValueByPointer(u,this.path);_&&(_=_deepClone(_));var w=applyOperation(u,{op:\"remove\",path:this.from}).removed;return applyOperation(u,{op:\"add\",path:this.path,value:w}),{newDocument:u,removed:_}},copy:function(s,i,u){var _=getValueByPointer(u,this.from);return applyOperation(u,{op:\"add\",path:this.path,value:_deepClone(_)}),{newDocument:u}},test:function(s,i,u){return{newDocument:u,test:_areEquals(s[i],this.value)}},_get:function(s,i,u){return this.value=s[i],{newDocument:u}}},ll={add:function(s,i,u){return helpers_isInteger(i)?s.splice(i,0,this.value):s[i]=this.value,{newDocument:u,index:i}},remove:function(s,i,u){return{newDocument:u,removed:s.splice(i,1)[0]}},replace:function(s,i,u){var _=s[i];return s[i]=this.value,{newDocument:u,removed:_}},move:tl.move,copy:tl.copy,test:tl.test,_get:tl._get};function getValueByPointer(s,i){if(\"\"==i)return s;var u={op:\"_get\",path:i};return applyOperation(s,u),u.value}function applyOperation(s,i,u,_,w,x){if(void 0===u&&(u=!1),void 0===_&&(_=!0),void 0===w&&(w=!0),void 0===x&&(x=0),u&&(\"function\"==typeof u?u(i,0,s,i.path):validator(i,0)),\"\"===i.path){var j={newDocument:s};if(\"add\"===i.op)return j.newDocument=i.value,j;if(\"replace\"===i.op)return j.newDocument=i.value,j.removed=s,j;if(\"move\"===i.op||\"copy\"===i.op)return j.newDocument=getValueByPointer(s,i.from),\"move\"===i.op&&(j.removed=s),j;if(\"test\"===i.op){if(j.test=_areEquals(s,i.value),!1===j.test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j.newDocument=s,j}if(\"remove\"===i.op)return j.removed=s,j.newDocument=null,j;if(\"_get\"===i.op)return i.value=s,j;if(u)throw new Ja(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",x,i,s);return j}_||(s=_deepClone(s));var P=(i.path||\"\").split(\"/\"),B=s,$=1,U=P.length,Y=void 0,X=void 0,Z=void 0;for(Z=\"function\"==typeof u?u:validator;;){if((X=P[$])&&-1!=X.indexOf(\"~\")&&(X=unescapePathComponent(X)),w&&(\"__proto__\"==X||\"prototype\"==X&&$>0&&\"constructor\"==P[$-1]))throw new TypeError(\"JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README\");if(u&&void 0===Y&&(void 0===B[X]?Y=P.slice(0,$).join(\"/\"):$==U-1&&(Y=i.path),void 0!==Y&&Z(i,0,s,Y)),$++,Array.isArray(B)){if(\"-\"===X)X=B.length;else{if(u&&!helpers_isInteger(X))throw new Ja(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\",\"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\",x,i,s);helpers_isInteger(X)&&(X=~~X)}if($>=U){if(u&&\"add\"===i.op&&X>B.length)throw new Ja(\"The specified index MUST NOT be greater than the number of elements in the array\",\"OPERATION_VALUE_OUT_OF_BOUNDS\",x,i,s);if(!1===(j=ll[i.op].call(i,B,X,s)).test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j}}else if($>=U){if(!1===(j=tl[i.op].call(i,B,X,s)).test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",x,i,s);return j}if(B=B[X],u&&$<U&&(!B||\"object\"!=typeof B))throw new Ja(\"Cannot perform operation at the desired path\",\"OPERATION_PATH_UNRESOLVABLE\",x,i,s)}}function applyPatch(s,i,u,_,w){if(void 0===_&&(_=!0),void 0===w&&(w=!0),u&&!Array.isArray(i))throw new Ja(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");_||(s=_deepClone(s));for(var x=new Array(i.length),j=0,P=i.length;j<P;j++)x[j]=applyOperation(s,i[j],u,!0,w,j),s=x[j].newDocument;return x.newDocument=s,x}function applyReducer(s,i,u){var _=applyOperation(s,i);if(!1===_.test)throw new Ja(\"Test operation failed\",\"TEST_OPERATION_FAILED\",u,i,s);return _.newDocument}function validator(s,i,u,_){if(\"object\"!=typeof s||null===s||Array.isArray(s))throw new Ja(\"Operation is not an object\",\"OPERATION_NOT_AN_OBJECT\",i,s,u);if(!tl[s.op])throw new Ja(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",i,s,u);if(\"string\"!=typeof s.path)throw new Ja(\"Operation `path` property is not a string\",\"OPERATION_PATH_INVALID\",i,s,u);if(0!==s.path.indexOf(\"/\")&&s.path.length>0)throw new Ja('Operation `path` property must start with \"/\"',\"OPERATION_PATH_INVALID\",i,s,u);if((\"move\"===s.op||\"copy\"===s.op)&&\"string\"!=typeof s.from)throw new Ja(\"Operation `from` property is not present (applicable in `move` and `copy` operations)\",\"OPERATION_FROM_REQUIRED\",i,s,u);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&void 0===s.value)throw new Ja(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_REQUIRED\",i,s,u);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&hasUndefined(s.value))throw new Ja(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED\",i,s,u);if(u)if(\"add\"==s.op){var w=s.path.split(\"/\").length,x=_.split(\"/\").length;if(w!==x+1&&w!==x)throw new Ja(\"Cannot perform an `add` operation at the desired path\",\"OPERATION_PATH_CANNOT_ADD\",i,s,u)}else if(\"replace\"===s.op||\"remove\"===s.op||\"_get\"===s.op){if(s.path!==_)throw new Ja(\"Cannot perform the operation at a path that does not exist\",\"OPERATION_PATH_UNRESOLVABLE\",i,s,u)}else if(\"move\"===s.op||\"copy\"===s.op){var j=validate([{op:\"_get\",path:s.from,value:void 0}],u);if(j&&\"OPERATION_PATH_UNRESOLVABLE\"===j.name)throw new Ja(\"Cannot perform the operation from a path that does not exist\",\"OPERATION_FROM_UNRESOLVABLE\",i,s,u)}}function validate(s,i,u){try{if(!Array.isArray(s))throw new Ja(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");if(i)applyPatch(_deepClone(i),_deepClone(s),u||!0);else{u=u||validator;for(var _=0;_<s.length;_++)u(s[_],_,i,void 0)}}catch(s){if(s instanceof Ja)return s;throw s}}function _areEquals(s,i){if(s===i)return!0;if(s&&i&&\"object\"==typeof s&&\"object\"==typeof i){var u,_,w,x=Array.isArray(s),j=Array.isArray(i);if(x&&j){if((_=s.length)!=i.length)return!1;for(u=_;0!=u--;)if(!_areEquals(s[u],i[u]))return!1;return!0}if(x!=j)return!1;var P=Object.keys(s);if((_=P.length)!==Object.keys(i).length)return!1;for(u=_;0!=u--;)if(!i.hasOwnProperty(P[u]))return!1;for(u=_;0!=u--;)if(!_areEquals(s[w=P[u]],i[w]))return!1;return!0}return s!=s&&i!=i}var ul=new WeakMap,yl=function yl(s){this.observers=new Map,this.obj=s},vl=function vl(s,i){this.callback=s,this.observer=i};function unobserve(s,i){i.unobserve()}function observe(s,i){var u,_=function getMirror(s){return ul.get(s)}(s);if(_){var w=function getObserverFromMirror(s,i){return s.observers.get(i)}(_,i);u=w&&w.observer}else _=new yl(s),ul.set(s,_);if(u)return u;if(u={},_.value=_deepClone(s),i){u.callback=i,u.next=null;var dirtyCheck=function(){generate(u)},fastCheck=function(){clearTimeout(u.next),u.next=setTimeout(dirtyCheck)};\"undefined\"!=typeof window&&(window.addEventListener(\"mouseup\",fastCheck),window.addEventListener(\"keyup\",fastCheck),window.addEventListener(\"mousedown\",fastCheck),window.addEventListener(\"keydown\",fastCheck),window.addEventListener(\"change\",fastCheck))}return u.patches=[],u.object=s,u.unobserve=function(){generate(u),clearTimeout(u.next),function removeObserverFromMirror(s,i){s.observers.delete(i.callback)}(_,u),\"undefined\"!=typeof window&&(window.removeEventListener(\"mouseup\",fastCheck),window.removeEventListener(\"keyup\",fastCheck),window.removeEventListener(\"mousedown\",fastCheck),window.removeEventListener(\"keydown\",fastCheck),window.removeEventListener(\"change\",fastCheck))},_.observers.set(i,new vl(i,u)),u}function generate(s,i){void 0===i&&(i=!1);var u=ul.get(s.object);_generate(u.value,s.object,s.patches,\"\",i),s.patches.length&&applyPatch(u.value,s.patches);var _=s.patches;return _.length>0&&(s.patches=[],s.callback&&s.callback(_)),_}function _generate(s,i,u,_,w){if(i!==s){\"function\"==typeof i.toJSON&&(i=i.toJSON());for(var x=_objectKeys(i),j=_objectKeys(s),P=!1,B=j.length-1;B>=0;B--){var $=s[Y=j[B]];if(!module_helpers_hasOwnProperty(i,Y)||void 0===i[Y]&&void 0!==$&&!1===Array.isArray(i))Array.isArray(s)===Array.isArray(i)?(w&&u.push({op:\"test\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone($)}),u.push({op:\"remove\",path:_+\"/\"+escapePathComponent(Y)}),P=!0):(w&&u.push({op:\"test\",path:_,value:s}),u.push({op:\"replace\",path:_,value:i}),!0);else{var U=i[Y];\"object\"==typeof $&&null!=$&&\"object\"==typeof U&&null!=U&&Array.isArray($)===Array.isArray(U)?_generate($,U,u,_+\"/\"+escapePathComponent(Y),w):$!==U&&(!0,w&&u.push({op:\"test\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone($)}),u.push({op:\"replace\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone(U)}))}}if(P||x.length!=j.length)for(B=0;B<x.length;B++){var Y;module_helpers_hasOwnProperty(s,Y=x[B])||void 0===i[Y]||u.push({op:\"add\",path:_+\"/\"+escapePathComponent(Y),value:_deepClone(i[Y])})}}}function compare(s,i,u){void 0===u&&(u=!1);var _=[];return _generate(s,i,_,\"\",u),_}Object.assign({},ce,pe,{JsonPatchError:Ha,deepClone:_deepClone,escapePathComponent,unescapePathComponent});var _l=__webpack_require__(14744),El=__webpack_require__.n(_l);const wl={add:function add(s,i){return{op:\"add\",path:s,value:i}},replace,remove:function remove(s){return{op:\"remove\",path:s}},merge:function lib_merge(s,i){return{type:\"mutation\",op:\"merge\",path:s,value:i}},mergeDeep:function mergeDeep(s,i){return{type:\"mutation\",op:\"mergeDeep\",path:s,value:i}},context:function context(s,i){return{type:\"context\",path:s,value:i}},getIn:function getIn(s,i){return i.reduce(((s,i)=>void 0!==i&&s?s[i]:s),s)},applyPatch:function lib_applyPatch(s,i,u){if(u=u||{},\"merge\"===(i={...i,path:i.path&&normalizeJSONPath(i.path)}).op){const u=getInByJsonPath(s,i.path);Object.assign(u,i.value),applyPatch(s,[replace(i.path,u)])}else if(\"mergeDeep\"===i.op){const u=getInByJsonPath(s,i.path),_=El()(u,i.value);s=applyPatch(s,[replace(i.path,_)]).newDocument}else if(\"add\"===i.op&&\"\"===i.path&&lib_isObject(i.value)){applyPatch(s,Object.keys(i.value).reduce(((s,u)=>(s.push({op:\"add\",path:`/${normalizeJSONPath(u)}`,value:i.value[u]}),s)),[]))}else if(\"replace\"===i.op&&\"\"===i.path){let{value:_}=i;u.allowMetaPatches&&i.meta&&isAdditiveMutation(i)&&(Array.isArray(i.value)||lib_isObject(i.value))&&(_={..._,...i.meta}),s=_}else if(applyPatch(s,[i]),u.allowMetaPatches&&i.meta&&isAdditiveMutation(i)&&(Array.isArray(i.value)||lib_isObject(i.value))){const u={...getInByJsonPath(s,i.path),...i.meta};applyPatch(s,[replace(i.path,u)])}return s},parentPathMatch:function parentPathMatch(s,i){if(!Array.isArray(i))return!1;for(let u=0,_=i.length;u<_;u+=1)if(i[u]!==s[u])return!1;return!0},flatten,fullyNormalizeArray:function fullyNormalizeArray(s){return cleanArray(flatten(lib_normalizeArray(s)))},normalizeArray:lib_normalizeArray,isPromise:function isPromise(s){return lib_isObject(s)&&lib_isFunction(s.then)},forEachNew:function forEachNew(s,i){try{return forEachNewPatch(s,forEach,i)}catch(s){return s}},forEachNewPrimitive:function forEachNewPrimitive(s,i){try{return forEachNewPatch(s,forEachPrimitive,i)}catch(s){return s}},isJsonPatch,isContextPatch:function isContextPatch(s){return isPatch(s)&&\"context\"===s.type},isPatch,isMutation,isAdditiveMutation,isGenerator:function isGenerator(s){return\"[object GeneratorFunction]\"===Object.prototype.toString.call(s)},isFunction:lib_isFunction,isObject:lib_isObject,isError:function lib_isError(s){return s instanceof Error}};function normalizeJSONPath(s){return Array.isArray(s)?s.length<1?\"\":`/${s.map((s=>(s+\"\").replace(/~/g,\"~0\").replace(/\\//g,\"~1\"))).join(\"/\")}`:s}function replace(s,i,u){return{op:\"replace\",path:s,value:i,meta:u}}function forEachNewPatch(s,i,u){return cleanArray(flatten(s.filter(isAdditiveMutation).map((s=>i(s.value,u,s.path)))||[]))}function forEachPrimitive(s,i,u){return u=u||[],Array.isArray(s)?s.map(((s,_)=>forEachPrimitive(s,i,u.concat(_)))):lib_isObject(s)?Object.keys(s).map((_=>forEachPrimitive(s[_],i,u.concat(_)))):i(s,u[u.length-1],u)}function forEach(s,i,u){let _=[];if((u=u||[]).length>0){const w=i(s,u[u.length-1],u);w&&(_=_.concat(w))}if(Array.isArray(s)){const w=s.map(((s,_)=>forEach(s,i,u.concat(_))));w&&(_=_.concat(w))}else if(lib_isObject(s)){const w=Object.keys(s).map((_=>forEach(s[_],i,u.concat(_))));w&&(_=_.concat(w))}return _=flatten(_),_}function lib_normalizeArray(s){return Array.isArray(s)?s:[s]}function flatten(s){return[].concat(...s.map((s=>Array.isArray(s)?flatten(s):s)))}function cleanArray(s){return s.filter((s=>void 0!==s))}function lib_isObject(s){return s&&\"object\"==typeof s}function lib_isFunction(s){return s&&\"function\"==typeof s}function isJsonPatch(s){if(isPatch(s)){const{op:i}=s;return\"add\"===i||\"remove\"===i||\"replace\"===i}return!1}function isMutation(s){return isJsonPatch(s)||isPatch(s)&&\"mutation\"===s.type}function isAdditiveMutation(s){return isMutation(s)&&(\"add\"===s.op||\"replace\"===s.op||\"merge\"===s.op||\"mergeDeep\"===s.op)}function isPatch(s){return s&&\"object\"==typeof s}function getInByJsonPath(s,i){try{return getValueByPointer(s,i)}catch(s){return console.error(s),{}}}var Sl=__webpack_require__(65606);function _isPlaceholder(s){return null!=s&&\"object\"==typeof s&&!0===s[\"@@functional/placeholder\"]}function _curry1(s){return function f1(i){return 0===arguments.length||_isPlaceholder(i)?f1:s.apply(this,arguments)}}function _curry2(s){return function f2(i,u){switch(arguments.length){case 0:return f2;case 1:return _isPlaceholder(i)?f2:_curry1((function(u){return s(i,u)}));default:return _isPlaceholder(i)&&_isPlaceholder(u)?f2:_isPlaceholder(i)?_curry1((function(i){return s(i,u)})):_isPlaceholder(u)?_curry1((function(u){return s(i,u)})):s(i,u)}}}function _curry3(s){return function f3(i,u,_){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(i)?f3:_curry2((function(u,_){return s(i,u,_)}));case 2:return _isPlaceholder(i)&&_isPlaceholder(u)?f3:_isPlaceholder(i)?_curry2((function(i,_){return s(i,u,_)})):_isPlaceholder(u)?_curry2((function(u,_){return s(i,u,_)})):_curry1((function(_){return s(i,u,_)}));default:return _isPlaceholder(i)&&_isPlaceholder(u)&&_isPlaceholder(_)?f3:_isPlaceholder(i)&&_isPlaceholder(u)?_curry2((function(i,u){return s(i,u,_)})):_isPlaceholder(i)&&_isPlaceholder(_)?_curry2((function(i,_){return s(i,u,_)})):_isPlaceholder(u)&&_isPlaceholder(_)?_curry2((function(u,_){return s(i,u,_)})):_isPlaceholder(i)?_curry1((function(i){return s(i,u,_)})):_isPlaceholder(u)?_curry1((function(u){return s(i,u,_)})):_isPlaceholder(_)?_curry1((function(_){return s(i,u,_)})):s(i,u,_)}}}const xl=Number.isInteger||function _isInteger(s){return s<<0===s};function _isString(s){return\"[object String]\"===Object.prototype.toString.call(s)}var Ol=_curry2((function nth(s,i){var u=s<0?i.length+s:s;return _isString(i)?i.charAt(u):i[u]}));const Cl=Ol;var Al=_curry2((function paths(s,i){return s.map((function(s){for(var u,_=i,w=0;w<s.length;){if(null==_)return;u=s[w],_=xl(u)?Cl(u,_):_[u],w+=1}return _}))}));const Pl=Al;const Il=_curry2((function path(s,i){return Pl([s],i)[0]}));const Nl=_curry3((function pathSatisfies(s,i,u){return s(Il(i,u))}));function _cloneRegExp(s){return new RegExp(s.source,s.flags?s.flags:(s.global?\"g\":\"\")+(s.ignoreCase?\"i\":\"\")+(s.multiline?\"m\":\"\")+(s.sticky?\"y\":\"\")+(s.unicode?\"u\":\"\")+(s.dotAll?\"s\":\"\"))}function _arrayFromIterator(s){for(var i,u=[];!(i=s.next()).done;)u.push(i.value);return u}function _includesWith(s,i,u){for(var _=0,w=u.length;_<w;){if(s(i,u[_]))return!0;_+=1}return!1}function _has(s,i){return Object.prototype.hasOwnProperty.call(i,s)}const Ml=\"function\"==typeof Object.is?Object.is:function _objectIs(s,i){return s===i?0!==s||1/s==1/i:s!=s&&i!=i};var Tl=Object.prototype.toString;const Rl=function(){return\"[object Arguments]\"===Tl.call(arguments)?function _isArguments(s){return\"[object Arguments]\"===Tl.call(s)}:function _isArguments(s){return _has(\"callee\",s)}}();var Dl=!{toString:null}.propertyIsEnumerable(\"toString\"),Ll=[\"constructor\",\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],Bl=function(){return arguments.propertyIsEnumerable(\"length\")}(),Fl=function contains(s,i){for(var u=0;u<s.length;){if(s[u]===i)return!0;u+=1}return!1},$l=\"function\"!=typeof Object.keys||Bl?_curry1((function keys(s){if(Object(s)!==s)return[];var i,u,_=[],w=Bl&&Rl(s);for(i in s)!_has(i,s)||w&&\"length\"===i||(_[_.length]=i);if(Dl)for(u=Ll.length-1;u>=0;)_has(i=Ll[u],s)&&!Fl(_,i)&&(_[_.length]=i),u-=1;return _})):_curry1((function keys(s){return Object(s)!==s?[]:Object.keys(s)}));const Ul=$l;const zl=_curry1((function type(s){return null===s?\"Null\":void 0===s?\"Undefined\":Object.prototype.toString.call(s).slice(8,-1)}));function _uniqContentEquals(s,i,u,_){var w=_arrayFromIterator(s);function eq(s,i){return _equals(s,i,u.slice(),_.slice())}return!_includesWith((function(s,i){return!_includesWith(eq,i,s)}),_arrayFromIterator(i),w)}function _equals(s,i,u,_){if(Ml(s,i))return!0;var w=zl(s);if(w!==zl(i))return!1;if(\"function\"==typeof s[\"fantasy-land/equals\"]||\"function\"==typeof i[\"fantasy-land/equals\"])return\"function\"==typeof s[\"fantasy-land/equals\"]&&s[\"fantasy-land/equals\"](i)&&\"function\"==typeof i[\"fantasy-land/equals\"]&&i[\"fantasy-land/equals\"](s);if(\"function\"==typeof s.equals||\"function\"==typeof i.equals)return\"function\"==typeof s.equals&&s.equals(i)&&\"function\"==typeof i.equals&&i.equals(s);switch(w){case\"Arguments\":case\"Array\":case\"Object\":if(\"function\"==typeof s.constructor&&\"Promise\"===function _functionName(s){var i=String(s).match(/^function (\\w*)/);return null==i?\"\":i[1]}(s.constructor))return s===i;break;case\"Boolean\":case\"Number\":case\"String\":if(typeof s!=typeof i||!Ml(s.valueOf(),i.valueOf()))return!1;break;case\"Date\":if(!Ml(s.valueOf(),i.valueOf()))return!1;break;case\"Error\":return s.name===i.name&&s.message===i.message;case\"RegExp\":if(s.source!==i.source||s.global!==i.global||s.ignoreCase!==i.ignoreCase||s.multiline!==i.multiline||s.sticky!==i.sticky||s.unicode!==i.unicode)return!1}for(var x=u.length-1;x>=0;){if(u[x]===s)return _[x]===i;x-=1}switch(w){case\"Map\":return s.size===i.size&&_uniqContentEquals(s.entries(),i.entries(),u.concat([s]),_.concat([i]));case\"Set\":return s.size===i.size&&_uniqContentEquals(s.values(),i.values(),u.concat([s]),_.concat([i]));case\"Arguments\":case\"Array\":case\"Object\":case\"Boolean\":case\"Number\":case\"String\":case\"Date\":case\"Error\":case\"RegExp\":case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"ArrayBuffer\":break;default:return!1}var j=Ul(s);if(j.length!==Ul(i).length)return!1;var P=u.concat([s]),B=_.concat([i]);for(x=j.length-1;x>=0;){var $=j[x];if(!_has($,i)||!_equals(i[$],s[$],P,B))return!1;x-=1}return!0}const Vl=_curry2((function equals(s,i){return _equals(s,i,[],[])}));function _includes(s,i){return function _indexOf(s,i,u){var _,w;if(\"function\"==typeof s.indexOf)switch(typeof i){case\"number\":if(0===i){for(_=1/i;u<s.length;){if(0===(w=s[u])&&1/w===_)return u;u+=1}return-1}if(i!=i){for(;u<s.length;){if(\"number\"==typeof(w=s[u])&&w!=w)return u;u+=1}return-1}return s.indexOf(i,u);case\"string\":case\"boolean\":case\"function\":case\"undefined\":return s.indexOf(i,u);case\"object\":if(null===i)return s.indexOf(i,u)}for(;u<s.length;){if(Vl(s[u],i))return u;u+=1}return-1}(i,s,0)>=0}function _map(s,i){for(var u=0,_=i.length,w=Array(_);u<_;)w[u]=s(i[u]),u+=1;return w}function _quote(s){return'\"'+s.replace(/\\\\/g,\"\\\\\\\\\").replace(/[\\b]/g,\"\\\\b\").replace(/\\f/g,\"\\\\f\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/\\t/g,\"\\\\t\").replace(/\\v/g,\"\\\\v\").replace(/\\0/g,\"\\\\0\").replace(/\"/g,'\\\\\"')+'\"'}var Wl=function pad(s){return(s<10?\"0\":\"\")+s};const Kl=\"function\"==typeof Date.prototype.toISOString?function _toISOString(s){return s.toISOString()}:function _toISOString(s){return s.getUTCFullYear()+\"-\"+Wl(s.getUTCMonth()+1)+\"-\"+Wl(s.getUTCDate())+\"T\"+Wl(s.getUTCHours())+\":\"+Wl(s.getUTCMinutes())+\":\"+Wl(s.getUTCSeconds())+\".\"+(s.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+\"Z\"};function _complement(s){return function(){return!s.apply(this,arguments)}}function _arrayReduce(s,i,u){for(var _=0,w=u.length;_<w;)i=s(i,u[_]),_+=1;return i}const Hl=Array.isArray||function _isArray(s){return null!=s&&s.length>=0&&\"[object Array]\"===Object.prototype.toString.call(s)};function _dispatchable(s,i,u){return function(){if(0===arguments.length)return u();var _=arguments[arguments.length-1];if(!Hl(_)){for(var w=0;w<s.length;){if(\"function\"==typeof _[s[w]])return _[s[w]].apply(_,Array.prototype.slice.call(arguments,0,-1));w+=1}if(function _isTransformer(s){return null!=s&&\"function\"==typeof s[\"@@transducer/step\"]}(_))return i.apply(null,Array.prototype.slice.call(arguments,0,-1))(_)}return u.apply(this,arguments)}}function _isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}const _xfBase_init=function(){return this.xf[\"@@transducer/init\"]()},_xfBase_result=function(s){return this.xf[\"@@transducer/result\"](s)};var Jl=function(){function XFilter(s,i){this.xf=i,this.f=s}return XFilter.prototype[\"@@transducer/init\"]=_xfBase_init,XFilter.prototype[\"@@transducer/result\"]=_xfBase_result,XFilter.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)?this.xf[\"@@transducer/step\"](s,i):s},XFilter}();function _xfilter(s){return function(i){return new Jl(s,i)}}var Gl=_curry2(_dispatchable([\"fantasy-land/filter\",\"filter\"],_xfilter,(function(s,i){return _isObject(i)?_arrayReduce((function(u,_){return s(i[_])&&(u[_]=i[_]),u}),{},Ul(i)):function _filter(s,i){for(var u=0,_=i.length,w=[];u<_;)s(i[u])&&(w[w.length]=i[u]),u+=1;return w}(s,i)})));const Yl=Gl;const Xl=_curry2((function reject(s,i){return Yl(_complement(s),i)}));function _toString_toString(s,i){var u=function recur(u){var _=i.concat([s]);return _includes(u,_)?\"<Circular>\":_toString_toString(u,_)},mapPairs=function(s,i){return _map((function(i){return _quote(i)+\": \"+u(s[i])}),i.slice().sort())};switch(Object.prototype.toString.call(s)){case\"[object Arguments]\":return\"(function() { return arguments; }(\"+_map(u,s).join(\", \")+\"))\";case\"[object Array]\":return\"[\"+_map(u,s).concat(mapPairs(s,Xl((function(s){return/^\\d+$/.test(s)}),Ul(s)))).join(\", \")+\"]\";case\"[object Boolean]\":return\"object\"==typeof s?\"new Boolean(\"+u(s.valueOf())+\")\":s.toString();case\"[object Date]\":return\"new Date(\"+(isNaN(s.valueOf())?u(NaN):_quote(Kl(s)))+\")\";case\"[object Map]\":return\"new Map(\"+u(Array.from(s))+\")\";case\"[object Null]\":return\"null\";case\"[object Number]\":return\"object\"==typeof s?\"new Number(\"+u(s.valueOf())+\")\":1/s==-1/0?\"-0\":s.toString(10);case\"[object Set]\":return\"new Set(\"+u(Array.from(s).sort())+\")\";case\"[object String]\":return\"object\"==typeof s?\"new String(\"+u(s.valueOf())+\")\":_quote(s);case\"[object Undefined]\":return\"undefined\";default:if(\"function\"==typeof s.toString){var _=s.toString();if(\"[object Object]\"!==_)return _}return\"{\"+mapPairs(s,Ul(s)).join(\", \")+\"}\"}}const Ql=_curry1((function toString(s){return _toString_toString(s,[])}));var Zl=_curry2((function test(s,i){if(!function _isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)}(s))throw new TypeError(\"‘test’ requires a value of type RegExp as its first argument; received \"+Ql(s));return _cloneRegExp(s).test(i)}));const ec=Zl;function _arity(s,i){switch(s){case 0:return function(){return i.apply(this,arguments)};case 1:return function(s){return i.apply(this,arguments)};case 2:return function(s,u){return i.apply(this,arguments)};case 3:return function(s,u,_){return i.apply(this,arguments)};case 4:return function(s,u,_,w){return i.apply(this,arguments)};case 5:return function(s,u,_,w,x){return i.apply(this,arguments)};case 6:return function(s,u,_,w,x,j){return i.apply(this,arguments)};case 7:return function(s,u,_,w,x,j,P){return i.apply(this,arguments)};case 8:return function(s,u,_,w,x,j,P,B){return i.apply(this,arguments)};case 9:return function(s,u,_,w,x,j,P,B,$){return i.apply(this,arguments)};case 10:return function(s,u,_,w,x,j,P,B,$,U){return i.apply(this,arguments)};default:throw new Error(\"First argument to _arity must be a non-negative integer no greater than ten\")}}function _pipe(s,i){return function(){return i.call(this,s.apply(this,arguments))}}const rc=_curry1((function isArrayLike(s){return!!Hl(s)||!!s&&(\"object\"==typeof s&&(!_isString(s)&&(0===s.length||s.length>0&&(s.hasOwnProperty(0)&&s.hasOwnProperty(s.length-1)))))}));var oc=\"undefined\"!=typeof Symbol?Symbol.iterator:\"@@iterator\";function _createReduce(s,i,u){return function _reduce(_,w,x){if(rc(x))return s(_,w,x);if(null==x)return w;if(\"function\"==typeof x[\"fantasy-land/reduce\"])return i(_,w,x,\"fantasy-land/reduce\");if(null!=x[oc])return u(_,w,x[oc]());if(\"function\"==typeof x.next)return u(_,w,x);if(\"function\"==typeof x.reduce)return i(_,w,x,\"reduce\");throw new TypeError(\"reduce: list must be array or iterable\")}}function _xArrayReduce(s,i,u){for(var _=0,w=u.length;_<w;){if((i=s[\"@@transducer/step\"](i,u[_]))&&i[\"@@transducer/reduced\"]){i=i[\"@@transducer/value\"];break}_+=1}return s[\"@@transducer/result\"](i)}var sc=_curry2((function bind(s,i){return _arity(s.length,(function(){return s.apply(i,arguments)}))}));const ic=sc;function _xIterableReduce(s,i,u){for(var _=u.next();!_.done;){if((i=s[\"@@transducer/step\"](i,_.value))&&i[\"@@transducer/reduced\"]){i=i[\"@@transducer/value\"];break}_=u.next()}return s[\"@@transducer/result\"](i)}function _xMethodReduce(s,i,u,_){return s[\"@@transducer/result\"](u[_](ic(s[\"@@transducer/step\"],s),i))}const ac=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce);var lc=function(){function XWrap(s){this.f=s}return XWrap.prototype[\"@@transducer/init\"]=function(){throw new Error(\"init not implemented on XWrap\")},XWrap.prototype[\"@@transducer/result\"]=function(s){return s},XWrap.prototype[\"@@transducer/step\"]=function(s,i){return this.f(s,i)},XWrap}();function _xwrap(s){return new lc(s)}var cc=_curry3((function(s,i,u){return ac(\"function\"==typeof s?_xwrap(s):s,i,u)}));const pc=cc;function _checkForMethod(s,i){return function(){var u=arguments.length;if(0===u)return i();var _=arguments[u-1];return Hl(_)||\"function\"!=typeof _[s]?i.apply(this,arguments):_[s].apply(_,Array.prototype.slice.call(arguments,0,u-1))}}var hc=_curry3(_checkForMethod(\"slice\",(function slice(s,i,u){return Array.prototype.slice.call(u,s,i)})));const dc=hc;const fc=_curry1(_checkForMethod(\"tail\",dc(1,1/0)));function pipe(){if(0===arguments.length)throw new Error(\"pipe requires at least one argument\");return _arity(arguments[0].length,pc(_pipe,arguments[0],fc(arguments)))}const gc=_curry2((function defaultTo(s,i){return null==i||i!=i?s:i}));const bc=_curry2((function prop(s,i){if(null!=i)return xl(s)?Cl(s,i):i[s]}));const _c=_curry3((function propOr(s,i,u){return gc(s,bc(i,u))}));const Ec=Cl(-1);function _curryN(s,i,u){return function(){for(var _=[],w=0,x=s,j=0,P=!1;j<i.length||w<arguments.length;){var B;j<i.length&&(!_isPlaceholder(i[j])||w>=arguments.length)?B=i[j]:(B=arguments[w],w+=1),_[j]=B,_isPlaceholder(B)?P=!0:x-=1,j+=1}return!P&&x<=0?u.apply(this,_):_arity(Math.max(0,x),_curryN(s,_,u))}}var kc=_curry2((function curryN(s,i){return 1===s?_curry1(i):_arity(s,_curryN(s,[],i))}));const Oc=kc;var jc=_curry1((function curry(s){return Oc(s.length,s)}));const Pc=jc;function _isFunction(s){var i=Object.prototype.toString.call(s);return\"[object Function]\"===i||\"[object AsyncFunction]\"===i||\"[object GeneratorFunction]\"===i||\"[object AsyncGeneratorFunction]\"===i}const Ic=_curry2((function invoker(s,i){return Oc(s+1,(function(){var u=arguments[s];if(null!=u&&_isFunction(u[i]))return u[i].apply(u,Array.prototype.slice.call(arguments,0,s));throw new TypeError(Ql(u)+' does not have a method named \"'+i+'\"')}))}));const Nc=Ic(1,\"split\");function dropLastWhile(s,i){for(var u=i.length-1;u>=0&&s(i[u]);)u-=1;return dc(0,u+1,i)}var Mc=function(){function XDropLastWhile(s,i){this.f=s,this.retained=[],this.xf=i}return XDropLastWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropLastWhile.prototype[\"@@transducer/result\"]=function(s){return this.retained=null,this.xf[\"@@transducer/result\"](s)},XDropLastWhile.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)?this.retain(s,i):this.flush(s,i)},XDropLastWhile.prototype.flush=function(s,i){return s=ac(this.xf,s,this.retained),this.retained=[],this.xf[\"@@transducer/step\"](s,i)},XDropLastWhile.prototype.retain=function(s,i){return this.retained.push(i),s},XDropLastWhile}();function _xdropLastWhile(s){return function(i){return new Mc(s,i)}}const Rc=_curry2(_dispatchable([],_xdropLastWhile,dropLastWhile));const Lc=Ic(1,\"join\");var Fc=_curry1((function flip(s){return Oc(s.length,(function(i,u){var _=Array.prototype.slice.call(arguments,0);return _[0]=u,_[1]=i,s.apply(this,_)}))}));const qc=Fc(_curry2(_includes));const Kc=Pc((function(s,i){return pipe(Nc(\"\"),Rc(qc(s)),Lc(\"\"))(i)}));function _iterableReduce(s,i,u){for(var _=u.next();!_.done;)i=s(i,_.value),_=u.next();return i}function _methodReduce(s,i,u,_){return u[_](s,i)}const Hc=_createReduce(_arrayReduce,_methodReduce,_iterableReduce);var Jc=function(){function XMap(s,i){this.xf=i,this.f=s}return XMap.prototype[\"@@transducer/init\"]=_xfBase_init,XMap.prototype[\"@@transducer/result\"]=_xfBase_result,XMap.prototype[\"@@transducer/step\"]=function(s,i){return this.xf[\"@@transducer/step\"](s,this.f(i))},XMap}();var Gc=_curry2(_dispatchable([\"fantasy-land/map\",\"map\"],(function _xmap(s){return function(i){return new Jc(s,i)}}),(function map(s,i){switch(Object.prototype.toString.call(i)){case\"[object Function]\":return Oc(i.length,(function(){return s.call(this,i.apply(this,arguments))}));case\"[object Object]\":return _arrayReduce((function(u,_){return u[_]=s(i[_]),u}),{},Ul(i));default:return _map(s,i)}})));const Qc=Gc;const eu=_curry2((function ap(s,i){return\"function\"==typeof i[\"fantasy-land/ap\"]?i[\"fantasy-land/ap\"](s):\"function\"==typeof s.ap?s.ap(i):\"function\"==typeof s?function(u){return s(u)(i(u))}:Hc((function(s,u){return function _concat(s,i){var u;i=i||[];var _=(s=s||[]).length,w=i.length,x=[];for(u=0;u<_;)x[x.length]=s[u],u+=1;for(u=0;u<w;)x[x.length]=i[u],u+=1;return x}(s,Qc(u,i))}),[],s)}));var tu=_curry2((function liftN(s,i){var u=Oc(s,i);return Oc(s,(function(){return _arrayReduce(eu,Qc(u,arguments[0]),Array.prototype.slice.call(arguments,1))}))}));const ru=tu;var nu=_curry1((function lift(s){return ru(s.length,s)}));const ou=nu;const su=ou(_curry1((function not(s){return!s})));const iu=_curry1((function always(s){return function(){return s}}));const au=iu(void 0);const lu=Vl(au());const cu=su(lu);const uu=_curry2((function max(s,i){if(s===i)return i;function safeMax(s,i){if(s>i!=i>s)return i>s?i:s}var u=safeMax(s,i);if(void 0!==u)return u;var _=safeMax(typeof s,typeof i);if(void 0!==_)return _===typeof s?s:i;var w=Ql(s),x=safeMax(w,Ql(i));return void 0!==x&&x===w?s:i}));var pu=_curry2((function pluck(s,i){return Qc(bc(s),i)}));const hu=pu;const du=_curry1((function anyPass(s){return Oc(pc(uu,0,hu(\"length\",s)),(function(){for(var i=0,u=s.length;i<u;){if(s[i].apply(this,arguments))return!0;i+=1}return!1}))}));var identical=function(s,i){switch(arguments.length){case 0:return identical;case 1:return function unaryIdentical(i){return 0===arguments.length?unaryIdentical:Ml(s,i)};default:return Ml(s,i)}};const fu=identical;const mu=Oc(1,pipe(zl,fu(\"GeneratorFunction\")));const gu=Oc(1,pipe(zl,fu(\"AsyncFunction\")));const yu=du([pipe(zl,fu(\"Function\")),mu,gu]);var vu=_curry3((function replace(s,i,u){return u.replace(s,i)}));const bu=vu;const _u=Oc(1,pipe(zl,fu(\"RegExp\")));const Eu=_curry3((function when(s,i,u){return s(u)?i(u):u}));const wu=Oc(1,pipe(zl,fu(\"String\")));const Su=Eu(wu,bu(/[.*+?^${}()|[\\]\\\\-]/g,\"\\\\$&\"));var xu=function checkValue(s,i){if(\"string\"!=typeof s&&!(s instanceof String))throw TypeError(\"`\".concat(i,\"` must be a string\"))};const ku=function replaceAll(s,i,u){!function checkArguments(s,i,u){if(null==u||null==s||null==i)throw TypeError(\"Input values must not be `null` or `undefined`\")}(s,i,u),xu(u,\"str\"),xu(i,\"replaceValue\"),function checkSearchValue(s){if(!(\"string\"==typeof s||s instanceof String||s instanceof RegExp))throw TypeError(\"`searchValue` must be a string or an regexp\")}(s);var _=new RegExp(_u(s)?s:Su(s),\"g\");return bu(_,i,u)};var Ou=Oc(3,ku),Cu=Ic(2,\"replaceAll\");const Au=yu(String.prototype.replaceAll)?Cu:Ou,isWindows=()=>Nl(ec(/^win/),[\"platform\"],Sl),getProtocol=s=>{try{const i=new URL(s);return Kc(\":\",i.protocol)}catch{return}},ju=(pipe(getProtocol,cu),s=>{if(Sl.browser)return!1;const i=getProtocol(s);return lu(i)||\"file\"===i||/^[a-zA-Z]$/.test(i)}),isHttpUrl=s=>{const i=getProtocol(s);return\"http\"===i||\"https\"===i},toFileSystemPath=(s,i)=>{const u=[/%23/g,\"#\",/%24/g,\"$\",/%26/g,\"&\",/%2C/g,\",\",/%40/g,\"@\"],_=_c(!1,\"keepFileProtocol\",i),w=_c(isWindows,\"isWindows\",i);let x=decodeURI(s);for(let s=0;s<u.length;s+=2)x=x.replace(u[s],u[s+1]);let j=\"file://\"===x.substring(0,7).toLowerCase();return j&&(x=\"/\"===x[7]?x.substring(8):x.substring(7),w()&&\"/\"===x[1]&&(x=`${x[0]}:${x.substring(1)}`),_?x=`file:///${x}`:(j=!1,x=w()?x:`/${x}`)),w()&&!j&&(x=Au(\"/\",\"\\\\\",x),\":\\\\\"===x.substring(1,3)&&(x=x[0].toUpperCase()+x.substring(1))),x},getHash=s=>{const i=s.indexOf(\"#\");return-1!==i?s.substring(i):\"#\"},stripHash=s=>{const i=s.indexOf(\"#\");let u=s;return i>=0&&(u=s.substring(0,i)),u},url_cwd=()=>{if(Sl.browser)return stripHash(globalThis.location.href);const s=Sl.cwd(),i=Ec(s);return[\"/\",\"\\\\\"].includes(i)?s:s+(isWindows()?\"\\\\\":\"/\")},resolve=(s,i)=>{const u=new URL(i,new URL(s,\"resolve://\"));if(\"resolve:\"===u.protocol){const{pathname:s,search:i,hash:_}=u;return s+i+_}return u.toString()},sanitize=s=>{if(ju(s))return(s=>{const i=[/\\?/g,\"%3F\",/#/g,\"%23\"];let u=s;isWindows()&&(u=u.replace(/\\\\/g,\"/\")),u=encodeURI(u);for(let s=0;s<i.length;s+=2)u=u.replace(i[s],i[s+1]);return u})(toFileSystemPath(s));try{return new URL(s).toString()}catch{return encodeURI(decodeURI(s)).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\")}},unsanitize=s=>ju(s)?toFileSystemPath(s):decodeURI(s),{fetch:Pu,Response:Iu,Headers:Nu,Request:Mu,FormData:Tu,File:Ru,Blob:Du}=globalThis;function createErrorType(s,i){function E(...s){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,[this.message]=s,i&&i.apply(this,s)}return E.prototype=new Error,E.prototype.name=s,E.prototype.constructor=E,E}void 0===globalThis.fetch&&(globalThis.fetch=Pu),void 0===globalThis.Headers&&(globalThis.Headers=Nu),void 0===globalThis.Request&&(globalThis.Request=Mu),void 0===globalThis.Response&&(globalThis.Response=Iu),void 0===globalThis.FormData&&(globalThis.FormData=Tu),void 0===globalThis.File&&(globalThis.File=Ru),void 0===globalThis.Blob&&(globalThis.Blob=Du);var Lu=__webpack_require__(36623),Bu=__webpack_require__.n(Lu);const Fu=\"application/json, application/yaml\",qu=\"https://swagger.io\",$u=Object.freeze({url:\"/\"}),Uu=[\"properties\"],zu=[\"properties\"],Vu=[\"definitions\",\"parameters\",\"responses\",\"securityDefinitions\",\"components/schemas\",\"components/responses\",\"components/parameters\",\"components/securitySchemes\"],Wu=[\"schema/example\",\"items/example\"];function isFreelyNamed(s){const i=s[s.length-1],u=s[s.length-2],_=s.join(\"/\");return Uu.indexOf(i)>-1&&-1===zu.indexOf(u)||Vu.indexOf(_)>-1||Wu.some((s=>_.indexOf(s)>-1))}function absolutifyPointer(s,i){const[u,_]=s.split(\"#\"),w=null!=i?i:\"\",x=null!=u?u:\"\";let j;if(isHttpUrl(w))j=resolve(w,x);else{const s=resolve(qu,w),i=resolve(s,x).replace(qu,\"\");j=x.startsWith(\"/\")?i:i.substring(1)}return _?`${j}#${_}`:j}const Ku=/^([a-z]+:\\/\\/|\\/\\/)/i,Hu=createErrorType(\"JSONRefError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),Ju={},Gu=new WeakMap,Yu=[s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"examples\"===s[5],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"example\"===s[4],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"example\"===s[5],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"examples\"===s[4]&&\"value\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"examples\"===s[5]&&\"value\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[4]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9]],Xu={key:\"$ref\",plugin:(s,i,u,_)=>{const w=_.getInstance(),x=u.slice(0,-1);if(isFreelyNamed(x)||(s=>Yu.some((i=>i(s))))(x))return;const{baseDoc:j}=_.getContext(u);if(\"string\"!=typeof s)return new Hu(\"$ref: must be a string (JSON-Ref)\",{$ref:s,baseDoc:j,fullPath:u});const P=refs_split(s),B=P[0],$=P[1]||\"\";let U,Y,X;try{U=j||B?absoluteify(B,j):null}catch(i){return wrapError(i,{pointer:$,$ref:s,basePath:U,fullPath:u})}if(function pointerAlreadyInPath(s,i,u,_){let w=Gu.get(_);w||(w={},Gu.set(_,w));const x=function arrayToJsonPointer(s){if(0===s.length)return\"\";return`/${s.map(escapeJsonPointerToken).join(\"/\")}`}(u),j=`${i||\"<specmap-base>\"}#${s}`,P=x.replace(/allOf\\/\\d+\\/?/g,\"\"),B=_.contextTree.get([]).baseDoc;if(i===B&&pointerIsAParent(P,s))return!0;let $=\"\";const U=u.some((s=>($=`${$}/${escapeJsonPointerToken(s)}`,w[$]&&w[$].some((s=>pointerIsAParent(s,j)||pointerIsAParent(j,s))))));if(U)return!0;return void(w[P]=(w[P]||[]).concat(j))}($,U,x,_)&&!w.useCircularStructures){const i=absolutifyPointer(s,U);return s===i?null:wl.replace(u,i)}if(null==U?(X=jsonPointerToArray($),Y=_.get(X),void 0===Y&&(Y=new Hu(`Could not resolve reference: ${s}`,{pointer:$,$ref:s,baseDoc:j,fullPath:u}))):(Y=extractFromDoc(U,$),Y=null!=Y.__value?Y.__value:Y.catch((i=>{throw wrapError(i,{pointer:$,$ref:s,baseDoc:j,fullPath:u})}))),Y instanceof Error)return[wl.remove(u),Y];const Z=absolutifyPointer(s,U),ee=wl.replace(x,Y,{$$ref:Z});if(U&&U!==j)return[ee,wl.context(x,{baseDoc:U})];try{if(!function patchValueAlreadyInPath(s,i){const u=[s];return i.path.reduce(((s,i)=>(u.push(s[i]),s[i])),s),pointToAncestor(i.value);function pointToAncestor(s){return wl.isObject(s)&&(u.indexOf(s)>=0||Object.keys(s).some((i=>pointToAncestor(s[i]))))}}(_.state,ee)||w.useCircularStructures)return ee}catch(s){return null}}},Qu=Object.assign(Xu,{docCache:Ju,absoluteify,clearCache:function clearCache(s){void 0!==s?delete Ju[s]:Object.keys(Ju).forEach((s=>{delete Ju[s]}))},JSONRefError:Hu,wrapError,getDoc,split:refs_split,extractFromDoc,fetchJSON:function fetchJSON(s){return fetch(s,{headers:{Accept:Fu},loadSpec:!0}).then((s=>s.text())).then((s=>so.load(s)))},extract,jsonPointerToArray,unescapeJsonPointerToken}),Zu=Qu;function absoluteify(s,i){if(!Ku.test(s)){if(!i)throw new Hu(`Tried to resolve a relative URL, without having a basePath. path: '${s}' basePath: '${i}'`);return resolve(i,s)}return s}function wrapError(s,i){let u;return u=s&&s.response&&s.response.body?`${s.response.body.code} ${s.response.body.message}`:s.message,new Hu(`Could not resolve reference: ${u}`,i,s)}function refs_split(s){return(s+\"\").split(\"#\")}function extractFromDoc(s,i){const u=Ju[s];if(u&&!wl.isPromise(u))try{const s=extract(i,u);return Object.assign(Promise.resolve(s),{__value:s})}catch(s){return Promise.reject(s)}return getDoc(s).then((s=>extract(i,s)))}function getDoc(s){const i=Ju[s];return i?wl.isPromise(i)?i:Promise.resolve(i):(Ju[s]=Qu.fetchJSON(s).then((i=>(Ju[s]=i,i))),Ju[s])}function extract(s,i){const u=jsonPointerToArray(s);if(u.length<1)return i;const _=wl.getIn(i,u);if(void 0===_)throw new Hu(`Could not resolve pointer: ${s} does not exist in document`,{pointer:s});return _}function jsonPointerToArray(s){if(\"string\"!=typeof s)throw new TypeError(\"Expected a string, got a \"+typeof s);return\"/\"===s[0]&&(s=s.substr(1)),\"\"===s?[]:s.split(\"/\").map(unescapeJsonPointerToken)}function unescapeJsonPointerToken(s){if(\"string\"!=typeof s)return s;return new URLSearchParams(`=${s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}`).get(\"\")}function escapeJsonPointerToken(s){return new URLSearchParams([[\"\",s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")]]).toString().slice(1)}const pointerBoundaryChar=s=>!s||\"/\"===s||\"#\"===s;function pointerIsAParent(s,i){if(pointerBoundaryChar(i))return!0;const u=s.charAt(i.length),_=i.slice(-1);return 0===s.indexOf(i)&&(!u||\"/\"===u||\"#\"===u)&&\"#\"!==_}const ep={key:\"allOf\",plugin:(s,i,u,_,w)=>{if(w.meta&&w.meta.$$ref)return;const x=u.slice(0,-1);if(isFreelyNamed(x))return;if(!Array.isArray(s)){const s=new TypeError(\"allOf must be an array\");return s.fullPath=u,s}let j=!1,P=w.value;if(x.forEach((s=>{P&&(P=P[s])})),P={...P},0===Object.keys(P).length)return;delete P.allOf;const B=[];return B.push(_.replace(x,{})),s.forEach(((s,i)=>{if(!_.isObject(s)){if(j)return null;j=!0;const s=new TypeError(\"Elements in allOf must be objects\");return s.fullPath=u,B.push(s)}B.push(_.mergeDeep(x,s));const w=function generateAbsoluteRefPatches(s,i,{specmap:u,getBaseUrlForNodePath:_=(s=>u.getContext([...i,...s]).baseDoc),targetKeys:w=[\"$ref\",\"$$ref\"]}={}){const x=[];return Bu()(s).forEach((function callback(){if(w.includes(this.key)&&\"string\"==typeof this.node){const s=this.path,w=i.concat(this.path),j=absolutifyPointer(this.node,_(s));x.push(u.replace(w,j))}})),x}(s,u.slice(0,-1),{getBaseUrlForNodePath:s=>_.getContext([...u,i,...s]).baseDoc,specmap:_});B.push(...w)})),P.example&&B.push(_.remove([].concat(x,\"example\"))),B.push(_.mergeDeep(x,P)),P.$$ref||B.push(_.remove([].concat(x,\"$$ref\"))),B}},tp={key:\"parameters\",plugin:(s,i,u,_)=>{if(Array.isArray(s)&&s.length){const i=Object.assign([],s),w=u.slice(0,-1),x={...wl.getIn(_.spec,w)};for(let w=0;w<s.length;w+=1){const j=s[w];try{i[w].default=_.parameterMacro(x,j)}catch(s){const i=new Error(s);return i.fullPath=u,i}}return wl.replace(u,i)}return wl.replace(u,s)}},rp={key:\"properties\",plugin:(s,i,u,_)=>{const w={...s};for(const i in s)try{w[i].default=_.modelPropertyMacro(w[i])}catch(s){const i=new Error(s);return i.fullPath=u,i}return wl.replace(u,w)}};class ContextTree{constructor(s){this.root=context_tree_createNode(s||{})}set(s,i){const u=this.getParent(s,!0);if(!u)return void context_tree_updateNode(this.root,i,null);const _=s[s.length-1],{children:w}=u;w[_]?context_tree_updateNode(w[_],i,u):w[_]=context_tree_createNode(i,u)}get(s){if((s=s||[]).length<1)return this.root.value;let i,u,_=this.root;for(let w=0;w<s.length&&(u=s[w],i=_.children,i[u]);w+=1)_=i[u];return _&&_.protoValue}getParent(s,i){return!s||s.length<1?null:s.length<2?this.root:s.slice(0,-1).reduce(((s,u)=>{if(!s)return s;const{children:_}=s;return!_[u]&&i&&(_[u]=context_tree_createNode(null,s)),_[u]}),this.root)}}function context_tree_createNode(s,i){return context_tree_updateNode({children:{}},s,i)}function context_tree_updateNode(s,i,u){return s.value=i||{},s.protoValue=u?{...u.protoValue,...s.value}:s.value,Object.keys(s.children).forEach((i=>{const u=s.children[i];s.children[i]=context_tree_updateNode(u,u.value,s)})),s}const noop=()=>{};class SpecMap{static getPluginName(s){return s.pluginName}static getPatchesOfType(s,i){return s.filter(i)}constructor(s){Object.assign(this,{spec:\"\",debugLevel:\"info\",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ContextTree,showDebug:!1,allPatches:[],pluginProp:\"specMap\",libMethods:Object.assign(Object.create(this),wl,{getInstance:()=>this}),allowMetaPatches:!1},s),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(wl.isFunction),this.patches.push(wl.add([],this.spec)),this.patches.push(wl.context([],this.context)),this.updatePatches(this.patches)}debug(s,...i){this.debugLevel===s&&console.log(...i)}verbose(s,...i){\"verbose\"===this.debugLevel&&console.log(`[${s}]   `,...i)}wrapPlugin(s,i){const{pathDiscriminator:u}=this;let _,w=null;return s[this.pluginProp]?(w=s,_=s[this.pluginProp]):wl.isFunction(s)?_=s:wl.isObject(s)&&(_=function createKeyBasedPlugin(s){const isSubPath=(s,i)=>!Array.isArray(s)||s.every(((s,u)=>s===i[u]));return function*generator(i,_){const w={};for(const[s,u]of i.filter(wl.isAdditiveMutation).entries()){if(!(s<3e3))return;yield*traverse(u.value,u.path,u)}function*traverse(i,x,j){if(wl.isObject(i)){const P=x.length-1,B=x[P],$=x.indexOf(\"properties\"),U=\"properties\"===B&&P===$,Y=_.allowMetaPatches&&w[i.$$ref];for(const P of Object.keys(i)){const B=i[P],$=x.concat(P),X=wl.isObject(B),Z=i.$$ref;if(Y||X&&(_.allowMetaPatches&&Z&&(w[Z]=!0),yield*traverse(B,$,j)),!U&&P===s.key){const i=isSubPath(u,x);u&&!i||(yield s.plugin(B,P,$,_,j))}}}else s.key===x[x.length-1]&&(yield s.plugin(i,s.key,x,_))}}}(s)),Object.assign(_.bind(w),{pluginName:s.name||i,isGenerator:wl.isGenerator(_)})}nextPlugin(){return this.wrappedPlugins.find((s=>this.getMutationsForPlugin(s).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((s=>s.value)))}getPluginHistory(s){const i=this.constructor.getPluginName(s);return this.pluginHistory[i]||[]}getPluginRunCount(s){return this.getPluginHistory(s).length}getPluginHistoryTip(s){const i=this.getPluginHistory(s);return i&&i[i.length-1]||{}}getPluginMutationIndex(s){const i=this.getPluginHistoryTip(s).mutationIndex;return\"number\"!=typeof i?-1:i}updatePluginHistory(s,i){const u=this.constructor.getPluginName(s);this.pluginHistory[u]=this.pluginHistory[u]||[],this.pluginHistory[u].push(i)}updatePatches(s){wl.normalizeArray(s).forEach((s=>{if(s instanceof Error)this.errors.push(s);else try{if(!wl.isObject(s))return void this.debug(\"updatePatches\",\"Got a non-object patch\",s);if(this.showDebug&&this.allPatches.push(s),wl.isPromise(s.value))return this.promisedPatches.push(s),void this.promisedPatchThen(s);if(wl.isContextPatch(s))return void this.setContext(s.path,s.value);wl.isMutation(s)&&this.updateMutations(s)}catch(s){console.error(s),this.errors.push(s)}}))}updateMutations(s){\"object\"==typeof s.value&&!Array.isArray(s.value)&&this.allowMetaPatches&&(s.value={...s.value});const i=wl.applyPatch(this.state,s,{allowMetaPatches:this.allowMetaPatches});i&&(this.mutations.push(s),this.state=i)}removePromisedPatch(s){const i=this.promisedPatches.indexOf(s);i<0?this.debug(\"Tried to remove a promisedPatch that isn't there!\"):this.promisedPatches.splice(i,1)}promisedPatchThen(s){return s.value=s.value.then((i=>{const u={...s,value:i};this.removePromisedPatch(s),this.updatePatches(u)})).catch((i=>{this.removePromisedPatch(s),this.updatePatches(i)})),s.value}getMutations(s,i){return s=s||0,\"number\"!=typeof i&&(i=this.mutations.length),this.mutations.slice(s,i)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(s){const i=this.getPluginMutationIndex(s);return this.getMutations(i+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(s){return wl.getIn(this.state,s)}_getContext(s){return this.contextTree.get(s)}setContext(s,i){return this.contextTree.set(s,i)}_hasRun(s){return this.getPluginRunCount(this.getCurrentPlugin())>(s||0)}dispatch(){const s=this,i=this.nextPlugin();if(!i){const s=this.nextPromisedPatch();if(s)return s.then((()=>this.dispatch())).catch((()=>this.dispatch()));const i={spec:this.state,errors:this.errors};return this.showDebug&&(i.patches=this.allPatches),Promise.resolve(i)}if(s.pluginCount=s.pluginCount||new WeakMap,s.pluginCount.set(i,(s.pluginCount.get(i)||0)+1),s.pluginCount[i]>100)return Promise.resolve({spec:s.state,errors:s.errors.concat(new Error(\"We've reached a hard limit of 100 plugin runs\"))});if(i!==this.currentPlugin&&this.promisedPatches.length){const s=this.promisedPatches.map((s=>s.value));return Promise.all(s.map((s=>s.then(noop,noop)))).then((()=>this.dispatch()))}return function executePlugin(){s.currentPlugin=i;const u=s.getCurrentMutations(),_=s.mutations.length-1;try{if(i.isGenerator)for(const _ of i(u,s.getLib()))updatePatches(_);else{updatePatches(i(u,s.getLib()))}}catch(s){console.error(s),updatePatches([Object.assign(Object.create(s),{plugin:i})])}finally{s.updatePluginHistory(i,{mutationIndex:_})}return s.dispatch()}();function updatePatches(u){u&&(u=wl.fullyNormalizeArray(u),s.updatePatches(u,i))}}}const np={refs:Zu,allOf:ep,parameters:tp,properties:rp},replace_special_chars_with_underscore=s=>s.replace(/\\W/gi,\"_\");function opId(s,i,u=\"\",{v2OperationIdCompatibilityMode:_}={}){if(!s||\"object\"!=typeof s)return null;return(s.operationId||\"\").replace(/\\s/g,\"\").length?replace_special_chars_with_underscore(s.operationId):function idFromPathMethod(s,i,{v2OperationIdCompatibilityMode:u}={}){if(u){let u=`${i.toLowerCase()}_${s}`.replace(/[\\s!@#$%^&*()_+=[{\\]};:<>|./?,\\\\'\"\"-]/g,\"_\");return u=u||`${s.substring(1)}_${i}`,u.replace(/((_){2,})/g,\"_\").replace(/^(_)*/g,\"\").replace(/([_])*$/g,\"\")}return`${i.toLowerCase()}${replace_special_chars_with_underscore(s)}`}(i,u,{v2OperationIdCompatibilityMode:_})}function normalize(s){const{spec:i}=s,{paths:u}=i,_={};if(!u||i.$$normalized)return s;for(const s in u){const w=u[s];if(null==w||![\"object\",\"function\"].includes(typeof w))continue;const x=w.parameters;for(const u in w){const j=w[u];if(null==j||![\"object\",\"function\"].includes(typeof j))continue;const P=opId(j,s,u);if(P){_[P]?_[P].push(j):_[P]=[j];const s=_[P];if(s.length>1)s.forEach(((s,i)=>{s.__originalOperationId=s.__originalOperationId||s.operationId,s.operationId=`${P}${i+1}`}));else if(void 0!==j.operationId){const i=s[0];i.__originalOperationId=i.__originalOperationId||j.operationId,i.operationId=P}}if(\"parameters\"!==u){const s=[],u={};for(const _ in i)\"produces\"!==_&&\"consumes\"!==_&&\"security\"!==_||(u[_]=i[_],s.push(u));if(x&&(u.parameters=x,s.push(u)),s.length)for(const i of s)for(const s in i)if(j[s]){if(\"parameters\"===s)for(const u of i[s]){j[s].some((s=>s.name&&s.name===u.name||s.$ref&&s.$ref===u.$ref||s.$$ref&&s.$$ref===u.$$ref||s===u))||j[s].push(u)}}else j[s]=i[s]}}}return i.$$normalized=!0,s}function makeFetchJSON(s,i={}){const{requestInterceptor:u,responseInterceptor:_}=i,w=s.withCredentials?\"include\":\"same-origin\";return i=>s({url:i,loadSpec:!0,requestInterceptor:u,responseInterceptor:_,headers:{Accept:Fu},credentials:w}).then((s=>s.body))}var op=__webpack_require__(55373),sp=__webpack_require__.n(op);const isRfc3986Reserved=s=>\":/?#[]@!$&'()*+,;=\".indexOf(s)>-1,isRrc3986Unreserved=s=>/^[a-z0-9\\-._~]+$/i.test(s);function encodeDisallowedCharacters(s,{escape:i}={},u){return\"number\"==typeof s&&(s=s.toString()),\"string\"==typeof s&&s.length&&i?u?JSON.parse(s):[...s].map((s=>{if(isRrc3986Unreserved(s))return s;if(isRfc3986Reserved(s)&&\"unsafe\"===i)return s;const u=new TextEncoder;return Array.from(u.encode(s)).map((s=>`0${s.toString(16).toUpperCase()}`.slice(-2))).map((s=>`%${s}`)).join(\"\")})).join(\"\"):s}function stylize(s){const{value:i}=s;return Array.isArray(i)?function encodeArray({key:s,value:i,style:u,explode:_,escape:w}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:w});if(\"simple\"===u)return i.map((s=>valueEncoder(s))).join(\",\");if(\"label\"===u)return`.${i.map((s=>valueEncoder(s))).join(\".\")}`;if(\"matrix\"===u)return i.map((s=>valueEncoder(s))).reduce(((i,u)=>!i||_?`${i||\"\"};${s}=${u}`:`${i},${u}`),\"\");if(\"form\"===u){const u=_?`&${s}=`:\",\";return i.map((s=>valueEncoder(s))).join(u)}if(\"spaceDelimited\"===u){const u=_?`${s}=`:\"\";return i.map((s=>valueEncoder(s))).join(` ${u}`)}if(\"pipeDelimited\"===u){const u=_?`${s}=`:\"\";return i.map((s=>valueEncoder(s))).join(`|${u}`)}return}(s):\"object\"==typeof i?function encodeObject({key:s,value:i,style:u,explode:_,escape:w}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:w}),x=Object.keys(i);if(\"simple\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s},`:\"\"}${u}${_?\"=\":\",\"}${w}`}),\"\");if(\"label\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s}.`:\".\"}${u}${_?\"=\":\".\"}${w}`}),\"\");if(\"matrix\"===u&&_)return x.reduce(((s,u)=>`${s?`${s};`:\";\"}${u}=${valueEncoder(i[u])}`),\"\");if(\"matrix\"===u)return x.reduce(((u,_)=>{const w=valueEncoder(i[_]);return`${u?`${u},`:`;${s}=`}${_},${w}`}),\"\");if(\"form\"===u)return x.reduce(((s,u)=>{const w=valueEncoder(i[u]);return`${s?`${s}${_?\"&\":\",\"}`:\"\"}${u}${_?\"=\":\",\"}${w}`}),\"\");return}(s):function encodePrimitive({key:s,value:i,style:u,escape:_}){const valueEncoder=s=>encodeDisallowedCharacters(s,{escape:_});if(\"simple\"===u)return valueEncoder(i);if(\"label\"===u)return`.${valueEncoder(i)}`;if(\"matrix\"===u)return`;${s}=${valueEncoder(i)}`;if(\"form\"===u)return valueEncoder(i);if(\"deepObject\"===u)return valueEncoder(i,{},!0);return}(s)}const ip={serializeRes,mergeInQueryOrForm};async function http_http(s,i={}){\"object\"==typeof s&&(s=(i=s).url),i.headers=i.headers||{},ip.mergeInQueryOrForm(i),i.headers&&Object.keys(i.headers).forEach((s=>{const u=i.headers[s];\"string\"==typeof u&&(i.headers[s]=u.replace(/\\n+/g,\" \"))})),i.requestInterceptor&&(i=await i.requestInterceptor(i)||i);const u=i.headers[\"content-type\"]||i.headers[\"Content-Type\"];let _;/multipart\\/form-data/i.test(u)&&(delete i.headers[\"content-type\"],delete i.headers[\"Content-Type\"]);try{_=await(i.userFetch||fetch)(i.url,i),_=await ip.serializeRes(_,s,i),i.responseInterceptor&&(_=await i.responseInterceptor(_)||_)}catch(s){if(!_)throw s;const i=new Error(_.statusText||`response status is ${_.status}`);throw i.status=_.status,i.statusCode=_.status,i.responseError=s,i}if(!_.ok){const s=new Error(_.statusText||`response status is ${_.status}`);throw s.status=_.status,s.statusCode=_.status,s.response=_,s}return _}const shouldDownloadAsText=(s=\"\")=>/(json|xml|yaml|text)\\b/.test(s);function serializeRes(s,i,{loadSpec:u=!1}={}){const _={ok:s.ok,url:s.url||i,status:s.status,statusText:s.statusText,headers:serializeHeaders(s.headers)},w=_.headers[\"content-type\"],x=u||shouldDownloadAsText(w);return(x?s.text:s.blob||s.buffer).call(s).then((s=>{if(_.text=s,_.data=s,x)try{const i=function parseBody(s,i){return i&&(0===i.indexOf(\"application/json\")||i.indexOf(\"+json\")>0)?JSON.parse(s):so.load(s)}(s,w);_.body=i,_.obj=i}catch(s){_.parseError=s}return _}))}function serializeHeaders(s={}){return\"function\"!=typeof s.entries?{}:Array.from(s.entries()).reduce(((s,[i,u])=>(s[i]=function serializeHeaderValue(s){return s.includes(\", \")?s.split(\", \"):s}(u),s)),{})}function isFile(s,i){return i||\"undefined\"==typeof navigator||(i=navigator),i&&\"ReactNative\"===i.product?!(!s||\"object\"!=typeof s||\"string\"!=typeof s.uri):\"undefined\"!=typeof File&&s instanceof File||(\"undefined\"!=typeof Blob&&s instanceof Blob||(!!ArrayBuffer.isView(s)||null!==s&&\"object\"==typeof s&&\"function\"==typeof s.pipe))}function isArrayOfFile(s,i){return Array.isArray(s)&&s.some((s=>isFile(s,i)))}const lp={form:\",\",spaceDelimited:\"%20\",pipeDelimited:\"|\"},cp={csv:\",\",ssv:\"%20\",tsv:\"%09\",pipes:\"|\"};class FileWithData extends File{constructor(s,i=\"\",u={}){super([s],i,u),this.data=s}valueOf(){return this.data}toString(){return this.valueOf()}}function formatKeyValue(s,i,u=!1){const{collectionFormat:_,allowEmptyValue:w,serializationOption:x,encoding:j}=i,P=\"object\"!=typeof i||Array.isArray(i)?i:i.value,B=u?s=>s.toString():s=>encodeURIComponent(s),$=B(s);if(void 0===P&&w)return[[$,\"\"]];if(isFile(P)||isArrayOfFile(P))return[[$,P]];if(x)return formatKeyValueBySerializationOption(s,P,u,x);if(j){if([typeof j.style,typeof j.explode,typeof j.allowReserved].some((s=>\"undefined\"!==s))){const{style:i,explode:_,allowReserved:w}=j;return formatKeyValueBySerializationOption(s,P,u,{style:i,explode:_,allowReserved:w})}if(\"string\"==typeof j.contentType){if(j.contentType.startsWith(\"application/json\")){const s=B(\"string\"==typeof P?P:JSON.stringify(P));return[[$,new FileWithData(s,\"blob\",{type:j.contentType})]]}const s=B(String(P));return[[$,new FileWithData(s,\"blob\",{type:j.contentType})]]}return\"object\"!=typeof P?[[$,B(P)]]:Array.isArray(P)&&P.every((s=>\"object\"!=typeof s))?[[$,P.map(B).join(\",\")]]:[[$,B(JSON.stringify(P))]]}return\"object\"!=typeof P?[[$,B(P)]]:Array.isArray(P)?\"multi\"===_?[[$,P.map(B)]]:[[$,P.map(B).join(cp[_||\"csv\"])]]:[[$,\"\"]]}function formatKeyValueBySerializationOption(s,i,u,_){const w=_.style||\"form\",x=void 0===_.explode?\"form\"===w:_.explode,j=!u&&(_&&_.allowReserved?\"unsafe\":\"reserved\"),encodeFn=s=>encodeDisallowedCharacters(s,{escape:j}),P=u?s=>s:s=>encodeDisallowedCharacters(s,{escape:j});return\"object\"!=typeof i?[[P(s),encodeFn(i)]]:Array.isArray(i)?x?[[P(s),i.map(encodeFn)]]:[[P(s),i.map(encodeFn).join(lp[w])]]:\"deepObject\"===w?Object.keys(i).map((u=>[P(`${s}[${u}]`),encodeFn(i[u])])):x?Object.keys(i).map((s=>[P(s),encodeFn(i[s])])):[[P(s),Object.keys(i).map((s=>[`${P(s)},${encodeFn(i[s])}`])).join(\",\")]]}function encodeFormOrQuery(s){const i=Object.keys(s).reduce(((i,u)=>{for(const[_,w]of formatKeyValue(u,s[u]))i[_]=w instanceof FileWithData?w.valueOf():w;return i}),{});return sp().stringify(i,{encode:!1,indices:!1})||\"\"}function mergeInQueryOrForm(s={}){const{url:i=\"\",query:u,form:_}=s;if(_){const i=Object.keys(_).some((s=>{const{value:i}=_[s];return isFile(i)||isArrayOfFile(i)})),u=s.headers[\"content-type\"]||s.headers[\"Content-Type\"];if(i||/multipart\\/form-data/i.test(u)){const i=function http_buildFormData(s){return Object.entries(s).reduce(((s,[i,u])=>{for(const[_,w]of formatKeyValue(i,u,!0))if(Array.isArray(w))for(const i of w)if(ArrayBuffer.isView(i)){const u=new Blob([i]);s.append(_,u)}else s.append(_,i);else if(ArrayBuffer.isView(w)){const i=new Blob([w]);s.append(_,i)}else s.append(_,w);return s}),new FormData)}(s.form);s.formdata=i,s.body=i}else s.body=encodeFormOrQuery(_);delete s.form}if(u){const[_,w]=i.split(\"?\");let x=\"\";if(w){const s=sp().parse(w);Object.keys(u).forEach((i=>delete s[i])),x=sp().stringify(s,{encode:!0})}const j=((...s)=>{const i=s.filter((s=>s)).join(\"&\");return i?`?${i}`:\"\"})(x,encodeFormOrQuery(u));s.url=_+j,delete s.query}return s}const options_retrievalURI=s=>{var i,u;const{baseDoc:_,url:w}=s,x=null!==(i=null!=_?_:w)&&void 0!==i?i:\"\";return\"string\"==typeof(null===(u=globalThis.document)||void 0===u?void 0:u.baseURI)?String(new URL(x,globalThis.document.baseURI)):x},options_httpClient=s=>{const{fetch:i,http:u}=s;return i||u||http_http};async function resolveGenericStrategy(s){const{spec:i,mode:u,allowMetaPatches:_=!0,pathDiscriminator:w,modelPropertyMacro:x,parameterMacro:j,requestInterceptor:P,responseInterceptor:B,skipNormalization:$,useCircularStructures:U}=s,Y=options_retrievalURI(s),X=options_httpClient(s);return function doResolve(s){Y&&(np.refs.docCache[Y]=s);np.refs.fetchJSON=makeFetchJSON(X,{requestInterceptor:P,responseInterceptor:B});const i=[np.refs];\"function\"==typeof j&&i.push(np.parameters);\"function\"==typeof x&&i.push(np.properties);\"strict\"!==u&&i.push(np.allOf);return function mapSpec(s){return new SpecMap(s).dispatch()}({spec:s,context:{baseDoc:Y},plugins:i,allowMetaPatches:_,pathDiscriminator:w,parameterMacro:j,modelPropertyMacro:x,useCircularStructures:U}).then($?async s=>s:normalize)}(i)}const up={name:\"generic\",match:()=>!0,normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>resolveGenericStrategy(s)},pp=up;const isOpenAPI30=s=>{try{const{openapi:i}=s;return\"string\"==typeof i&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(i)}catch{return!1}},isOpenAPI31=s=>{try{const{openapi:i}=s;return\"string\"==typeof i&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(i)}catch{return!1}},isOpenAPI3=s=>isOpenAPI30(s)||isOpenAPI31(s),hp={name:\"openapi-2\",match:({spec:s})=>(s=>{try{const{swagger:i}=s;return\"2.0\"===i}catch{return!1}})(s),normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>async function resolveOpenAPI2Strategy(s){return resolveGenericStrategy(s)}(s)},dp=hp;const fp={name:\"openapi-3-0\",match:({spec:s})=>isOpenAPI30(s),normalize({spec:s}){const{spec:i}=normalize({spec:s});return i},resolve:async s=>async function resolveOpenAPI30Strategy(s){return resolveGenericStrategy(s)}(s)},mp=fp;var gp=__webpack_require__(34035);class Annotation extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"annotation\"}get code(){return this.attributes.get(\"code\")}set code(s){this.attributes.set(\"code\",s)}}const yp=Annotation;class Comment extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"comment\"}}const vp=Comment;class ParseResult extends gp.wE{constructor(s,i,u){super(s,i,u),this.element=\"parseResult\"}get api(){return this.children.filter((s=>s.classes.contains(\"api\"))).first}get results(){return this.children.filter((s=>s.classes.contains(\"result\")))}get result(){return this.results.first}get annotations(){return this.children.filter((s=>\"annotation\"===s.element))}get warnings(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"warning\")))}get errors(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"error\")))}get isEmpty(){return this.children.reject((s=>\"annotation\"===s.element)).isEmpty}replaceResult(s){const{result:i}=this;if(lu(i))return!1;const u=this.content.findIndex((s=>s===i));return-1!==u&&(this.content[u]=s,!0)}}const bp=ParseResult;class SourceMap extends gp.wE{constructor(s,i,u){super(s,i,u),this.element=\"sourceMap\"}get positionStart(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(0)}get positionEnd(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(1)}set position(s){if(void 0===s)return;const i=new gp.wE([s.start.row,s.start.column,s.start.char]),u=new gp.wE([s.end.row,s.end.column,s.end.char]);i.classes.push(\"position\"),u.classes.push(\"position\"),this.push(i).push(u)}}const _p=SourceMap;var Ep=_curry3((function mergeWithKey(s,i,u){var _,w={};for(_ in u=u||{},i=i||{})_has(_,i)&&(w[_]=_has(_,u)?s(_,i[_],u[_]):i[_]);for(_ in u)_has(_,u)&&!_has(_,w)&&(w[_]=u[_]);return w}));const wp=Ep;var Sp=_curry3((function mergeDeepWithKey(s,i,u){return wp((function(i,u,_){return _isObject(u)&&_isObject(_)?mergeDeepWithKey(s,u,_):s(i,u,_)}),i,u)}));const xp=Sp;const kp=_curry2((function mergeDeepRight(s,i){return xp((function(s,i,u){return u}),s,i)}));const Op=dc(0,-1);var Cp=_curry2((function apply(s,i){return s.apply(this,i)}));const Ap=Cp;const jp=su(yu);const Pp=_curry2((function and(s,i){return s&&i}));const Ip=_curry2((function both(s,i){return _isFunction(s)?function _both(){return s.apply(this,arguments)&&i.apply(this,arguments)}:ou(Pp)(s,i)}));var Np=_curry1((function empty(s){return null!=s&&\"function\"==typeof s[\"fantasy-land/empty\"]?s[\"fantasy-land/empty\"]():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor[\"fantasy-land/empty\"]?s.constructor[\"fantasy-land/empty\"]():null!=s&&\"function\"==typeof s.empty?s.empty():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor.empty?s.constructor.empty():Hl(s)?[]:_isString(s)?\"\":_isObject(s)?{}:Rl(s)?function(){return arguments}():function _isTypedArray(s){var i=Object.prototype.toString.call(s);return\"[object Uint8ClampedArray]\"===i||\"[object Int8Array]\"===i||\"[object Uint8Array]\"===i||\"[object Int16Array]\"===i||\"[object Uint16Array]\"===i||\"[object Int32Array]\"===i||\"[object Uint32Array]\"===i||\"[object Float32Array]\"===i||\"[object Float64Array]\"===i||\"[object BigInt64Array]\"===i||\"[object BigUint64Array]\"===i}(s)?s.constructor.from(\"\"):void 0}));const Mp=Np;const Tp=_curry1((function isEmpty(s){return null!=s&&Vl(s,Mp(s))}));const Rp=Oc(1,yu(Array.isArray)?Array.isArray:pipe(zl,fu(\"Array\")));const Dp=Ip(Rp,Tp);var Lp=Oc(3,(function(s,i,u){var _=Il(s,u),w=Il(Op(s),u);if(!jp(_)&&!Dp(s)){var x=ic(_,w);return Ap(x,i)}}));const Bp=Lp;function _reduced(s){return s&&s[\"@@transducer/reduced\"]?s:{\"@@transducer/value\":s,\"@@transducer/reduced\":!0}}var Fp=function(){function XAll(s,i){this.xf=i,this.f=s,this.all=!0}return XAll.prototype[\"@@transducer/init\"]=_xfBase_init,XAll.prototype[\"@@transducer/result\"]=function(s){return this.all&&(s=this.xf[\"@@transducer/step\"](s,!0)),this.xf[\"@@transducer/result\"](s)},XAll.prototype[\"@@transducer/step\"]=function(s,i){return this.f(i)||(this.all=!1,s=_reduced(this.xf[\"@@transducer/step\"](s,!1))),s},XAll}();function _xall(s){return function(i){return new Fp(s,i)}}var qp=_curry2(_dispatchable([\"all\"],_xall,(function all(s,i){for(var u=0;u<i.length;){if(!s(i[u]))return!1;u+=1}return!0})));const $p=qp,hasMethod=(s,i)=>\"object\"==typeof i&&null!==i&&s in i&&\"function\"==typeof i[s],hasBasicElementProps=s=>\"object\"==typeof s&&null!=s&&\"_storedElement\"in s&&\"string\"==typeof s._storedElement&&\"_content\"in s,primitiveEq=(s,i)=>\"object\"==typeof i&&null!==i&&\"primitive\"in i&&(\"function\"==typeof i.primitive&&i.primitive()===s),hasClass=(s,i)=>\"object\"==typeof i&&null!==i&&\"classes\"in i&&(Array.isArray(i.classes)||i.classes instanceof gp.wE)&&i.classes.includes(s),isElementType=(s,i)=>\"object\"==typeof i&&null!==i&&\"element\"in i&&i.element===s,helpers=s=>s({hasMethod,hasBasicElementProps,primitiveEq,isElementType,hasClass}),Up=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Hg||s(u)&&i(void 0,u))),zp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Om||s(u)&&i(\"string\",u))),Vp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.kT||s(u)&&i(\"number\",u))),Wp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.Os||s(u)&&i(\"null\",u))),Kp=helpers((({hasBasicElementProps:s,primitiveEq:i})=>u=>u instanceof gp.bd||s(u)&&i(\"boolean\",u))),Hp=helpers((({hasBasicElementProps:s,primitiveEq:i,hasMethod:u})=>_=>_ instanceof gp.Sh||s(_)&&i(\"object\",_)&&u(\"keys\",_)&&u(\"values\",_)&&u(\"items\",_))),Jp=helpers((({hasBasicElementProps:s,primitiveEq:i,hasMethod:u})=>_=>_ instanceof gp.wE&&!(_ instanceof gp.Sh)||s(_)&&i(\"array\",_)&&u(\"push\",_)&&u(\"unshift\",_)&&u(\"map\",_)&&u(\"reduce\",_))),Gp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.Pr||s(_)&&i(\"member\",_)&&u(void 0,_))),Yp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.Ft||s(_)&&i(\"link\",_)&&u(void 0,_))),Xp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gp.sI||s(_)&&i(\"ref\",_)&&u(void 0,_))),Qp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yp||s(_)&&i(\"annotation\",_)&&u(\"array\",_))),Zp=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof vp||s(_)&&i(\"comment\",_)&&u(\"string\",_))),nh=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bp||s(_)&&i(\"parseResult\",_)&&u(\"array\",_))),hh=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _p||s(_)&&i(\"sourceMap\",_)&&u(\"array\",_))),isPrimitiveElement=s=>isElementType(\"object\",s)||isElementType(\"array\",s)||isElementType(\"boolean\",s)||isElementType(\"number\",s)||isElementType(\"string\",s)||isElementType(\"null\",s)||isElementType(\"member\",s),hasElementSourceMap=s=>hh(s.meta.get(\"sourceMap\")),includesSymbols=(s,i)=>{if(0===s.length)return!0;const u=i.attributes.get(\"symbols\");return!!Jp(u)&&$p(qc(u.toValue()),s)},includesClasses=(s,i)=>0===s.length||$p(qc(i.classes.toValue()),s);const _h=Vl(null);const Eh=su(_h);function isOfTypeObject_typeof(s){return isOfTypeObject_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},isOfTypeObject_typeof(s)}const Sh=function isOfTypeObject(s){return\"object\"===isOfTypeObject_typeof(s)};const jh=Oc(1,Ip(Eh,Sh));var Ph=pipe(zl,fu(\"Object\")),Nh=pipe(Ql,Vl(Ql(Object))),Th=Nl(Ip(yu,Nh),[\"constructor\"]),Rh=Oc(1,(function(s){if(!jh(s)||!Ph(s))return!1;var i=Object.getPrototypeOf(s);return!!_h(i)||Th(i)}));const Dh=Rh;class Namespace extends gp.g${constructor(){super(),this.register(\"annotation\",yp),this.register(\"comment\",vp),this.register(\"parseResult\",bp),this.register(\"sourceMap\",_p)}}const Bh=new Namespace,createNamespace=s=>{const i=new Namespace;return Dh(s)&&i.use(s),i},Fh=Bh,toolbox=()=>({predicates:{...de},namespace:Fh});const es_F=function(){return!1};var $h=__webpack_require__(48675);const Uh=class ApiDOMAggregateError extends $h{constructor(s,i,u){if(super(s,i,u),this.name=this.constructor.name,\"string\"==typeof i&&(this.message=i),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(i).stack,null!=u&&\"object\"==typeof u&&Object.hasOwn(u,\"cause\")&&!(\"cause\"in this)){const{cause:s}=u;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}};class ApiDOMError extends Error{static[Symbol.hasInstance](s){return super[Symbol.hasInstance](s)||Function.prototype[Symbol.hasInstance].call(Uh,s)}constructor(s,i){if(super(s,i),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=i&&\"object\"==typeof i&&Object.hasOwn(i,\"cause\")&&!(\"cause\"in this)){const{cause:s}=i;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}}const Vh=ApiDOMError;const Gh=class ApiDOMStructuredError extends Vh{constructor(s,i){if(super(s,i),null!=i&&\"object\"==typeof i){const{cause:s,...u}=i;Object.assign(this,u)}}},getVisitFn=(s,i,u)=>{const _=s[i];if(null!=_){if(!u&&\"function\"==typeof _)return _;const s=u?_.leave:_.enter;if(\"function\"==typeof s)return s}else{const _=u?s.leave:s.enter;if(null!=_){if(\"function\"==typeof _)return _;const s=_[i];if(\"function\"==typeof s)return s}}return null},Yh={},getNodeType=s=>null==s?void 0:s.type,isNode=s=>\"string\"==typeof getNodeType(s),cloneNode=s=>Object.create(Object.getPrototypeOf(s),Object.getOwnPropertyDescriptors(s)),mergeAll=(s,{visitFnGetter:i=getVisitFn,nodeTypeGetter:u=getNodeType,breakSymbol:_=Yh,deleteNodeSymbol:w=null,skipVisitingNodeSymbol:x=!1,exposeEdits:j=!1}={})=>{const P=Symbol(\"skip\"),B=new Array(s.length).fill(P);return{enter($,...U){let Y=$,X=!1;for(let Z=0;Z<s.length;Z+=1)if(B[Z]===P){const P=i(s[Z],u(Y),!1);if(\"function\"==typeof P){const i=P.call(s[Z],Y,...U);if(i===x)B[Z]=$;else if(i===_)B[Z]=_;else{if(i===w)return i;if(void 0!==i){if(!j)return i;Y=i,X=!0}}}}return X?Y:void 0},leave(w,...j){for(let $=0;$<s.length;$+=1)if(B[$]===P){const P=i(s[$],u(w),!0);if(\"function\"==typeof P){const i=P.call(s[$],w,...j);if(i===_)B[$]=_;else if(void 0!==i&&i!==x)return i}}else B[$]===w&&(B[$]=P)}}},visit=(s,i,{keyMap:u=null,state:_={},breakSymbol:w=Yh,deleteNodeSymbol:x=null,skipVisitingNodeSymbol:j=!1,visitFnGetter:P=getVisitFn,nodeTypeGetter:B=getNodeType,nodePredicate:$=isNode,nodeCloneFn:U=cloneNode,detectCycles:Y=!0}={})=>{const X=u||{};let Z,ee,ie=Array.isArray(s),ae=[s],le=-1,ce=[],pe=s;const de=[],fe=[];do{le+=1;const s=le===ae.length;let u;const be=s&&0!==ce.length;if(s){if(u=0===fe.length?void 0:de.pop(),pe=ee,ee=fe.pop(),be)if(ie){pe=pe.slice();let s=0;for(const[i,u]of ce){const _=i-s;u===x?(pe.splice(_,1),s+=1):pe[_]=u}}else{pe=U(pe);for(const[s,i]of ce)pe[s]=i}le=Z.index,ae=Z.keys,ce=Z.edits,ie=Z.inArray,Z=Z.prev}else if(ee!==x&&void 0!==ee){if(u=ie?le:ae[le],pe=ee[u],pe===x||void 0===pe)continue;de.push(u)}let _e;if(!Array.isArray(pe)){if(!$(pe))throw new Gh(`Invalid AST Node:  ${String(pe)}`,{node:pe});if(Y&&fe.includes(pe)){de.pop();continue}const x=P(i,B(pe),s);if(x){for(const[s,u]of Object.entries(_))i[s]=u;_e=x.call(i,pe,u,ee,de,fe)}if(_e===w)break;if(_e===j){if(!s){de.pop();continue}}else if(void 0!==_e&&(ce.push([u,_e]),!s)){if(!$(_e)){de.pop();continue}pe=_e}}var ye;if(void 0===_e&&be&&ce.push([u,pe]),!s)Z={inArray:ie,index:le,keys:ae,edits:ce,prev:Z},ie=Array.isArray(pe),ae=ie?pe:null!==(ye=X[B(pe)])&&void 0!==ye?ye:[],le=-1,ce=[],ee!==x&&void 0!==ee&&fe.push(ee),ee=pe}while(void 0!==Z);return 0!==ce.length?ce[ce.length-1][1]:s};visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,i,{keyMap:u=null,state:_={},breakSymbol:w=Yh,deleteNodeSymbol:x=null,skipVisitingNodeSymbol:j=!1,visitFnGetter:P=getVisitFn,nodeTypeGetter:B=getNodeType,nodePredicate:$=isNode,nodeCloneFn:U=cloneNode,detectCycles:Y=!0}={})=>{const X=u||{};let Z,ee,ie=Array.isArray(s),ae=[s],le=-1,ce=[],pe=s;const de=[],fe=[];do{le+=1;const s=le===ae.length;let u;const be=s&&0!==ce.length;if(s){if(u=0===fe.length?void 0:de.pop(),pe=ee,ee=fe.pop(),be)if(ie){pe=pe.slice();let s=0;for(const[i,u]of ce){const _=i-s;u===x?(pe.splice(_,1),s+=1):pe[_]=u}}else{pe=U(pe);for(const[s,i]of ce)pe[s]=i}le=Z.index,ae=Z.keys,ce=Z.edits,ie=Z.inArray,Z=Z.prev}else if(ee!==x&&void 0!==ee){if(u=ie?le:ae[le],pe=ee[u],pe===x||void 0===pe)continue;de.push(u)}let _e;if(!Array.isArray(pe)){if(!$(pe))throw new Gh(`Invalid AST Node: ${String(pe)}`,{node:pe});if(Y&&fe.includes(pe)){de.pop();continue}const x=P(i,B(pe),s);if(x){for(const[s,u]of Object.entries(_))i[s]=u;_e=await x.call(i,pe,u,ee,de,fe)}if(_e===w)break;if(_e===j){if(!s){de.pop();continue}}else if(void 0!==_e&&(ce.push([u,_e]),!s)){if(!$(_e)){de.pop();continue}pe=_e}}var ye;if(void 0===_e&&be&&ce.push([u,pe]),!s)Z={inArray:ie,index:le,keys:ae,edits:ce,prev:Z},ie=Array.isArray(pe),ae=ie?pe:null!==(ye=X[B(pe)])&&void 0!==ye?ye:[],le=-1,ce=[],ee!==x&&void 0!==ee&&fe.push(ee),ee=pe}while(void 0!==Z);return 0!==ce.length?ce[ce.length-1][1]:s};const Qh=class CloneError extends Gh{value;constructor(s,i){super(s,i),void 0!==i&&(this.value=i.value)}};const Zh=class DeepCloneError extends Qh{};const td=class ShallowCloneError extends Qh{},cloneDeep=(s,i={})=>{const{visited:u=new WeakMap}=i,_={...i,visited:u};if(u.has(s))return u.get(s);if(s instanceof gp.KeyValuePair){const{key:i,value:w}=s,x=Up(i)?cloneDeep(i,_):i,j=Up(w)?cloneDeep(w,_):w,P=new gp.KeyValuePair(x,j);return u.set(s,P),P}if(s instanceof gp.ot){const mapper=s=>cloneDeep(s,_),i=[...s].map(mapper),w=new gp.ot(i);return u.set(s,w),w}if(s instanceof gp.G6){const mapper=s=>cloneDeep(s,_),i=[...s].map(mapper),w=new gp.G6(i);return u.set(s,w),w}if(Up(s)){const i=cloneShallow(s);if(u.set(s,i),s.content)if(Up(s.content))i.content=cloneDeep(s.content,_);else if(s.content instanceof gp.KeyValuePair)i.content=cloneDeep(s.content,_);else if(Array.isArray(s.content)){const mapper=s=>cloneDeep(s,_);i.content=s.content.map(mapper)}else i.content=s.content;else i.content=s.content;return i}throw new Zh(\"Value provided to cloneDeep function couldn't be cloned\",{value:s})};cloneDeep.safe=s=>{try{return cloneDeep(s)}catch{return s}};const cloneShallowKeyValuePair=s=>{const{key:i,value:u}=s;return new gp.KeyValuePair(i,u)},cloneShallowElement=s=>{const i=new s.constructor;if(i.element=s.element,s.meta.length>0&&(i._meta=cloneDeep(s.meta)),s.attributes.length>0&&(i._attributes=cloneDeep(s.attributes)),Up(s.content)){const u=s.content;i.content=cloneShallowElement(u)}else Array.isArray(s.content)?i.content=[...s.content]:s.content instanceof gp.KeyValuePair?i.content=cloneShallowKeyValuePair(s.content):i.content=s.content;return i},cloneShallow=s=>{if(s instanceof gp.KeyValuePair)return cloneShallowKeyValuePair(s);if(s instanceof gp.ot)return(s=>{const i=[...s];return new gp.ot(i)})(s);if(s instanceof gp.G6)return(s=>{const i=[...s];return new gp.G6(i)})(s);if(Up(s))return cloneShallowElement(s);throw new td(\"Value provided to cloneShallow function couldn't be cloned\",{value:s})};cloneShallow.safe=s=>{try{return cloneShallow(s)}catch{return s}};const visitor_getNodeType=s=>Hp(s)?\"ObjectElement\":Jp(s)?\"ArrayElement\":Gp(s)?\"MemberElement\":zp(s)?\"StringElement\":Kp(s)?\"BooleanElement\":Vp(s)?\"NumberElement\":Wp(s)?\"NullElement\":Yp(s)?\"LinkElement\":Xp(s)?\"RefElement\":void 0,visitor_cloneNode=s=>Up(s)?cloneShallow(s):cloneNode(s),sd=pipe(visitor_getNodeType,wu),id={ObjectElement:[\"content\"],ArrayElement:[\"content\"],MemberElement:[\"key\",\"value\"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:[\"content\"],SourceMap:[\"content\"]};class PredicateVisitor{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:s=es_F,returnOnTrue:i,returnOnFalse:u}={}){this.result=[],this.predicate=s,this.returnOnTrue=i,this.returnOnFalse=u}enter(s){return this.predicate(s)?(this.result.push(s),this.returnOnTrue):this.returnOnFalse}}const visitor_visit=(s,i,{keyMap:u=id,..._}={})=>visit(s,i,{keyMap:u,nodeTypeGetter:visitor_getNodeType,nodePredicate:sd,nodeCloneFn:visitor_cloneNode,..._});visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,i,{keyMap:u=id,..._}={})=>visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,i,{keyMap:u,nodeTypeGetter:visitor_getNodeType,nodePredicate:sd,nodeCloneFn:visitor_cloneNode,..._});const ld={toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType,exposeEdits:!0}},dispatchPlugins=(s,i,u={})=>{if(0===i.length)return s;const _=kp(ld,u),{toolboxCreator:w,visitorOptions:x}=_,j=w(),P=i.map((s=>s(j))),B=mergeAll(P.map(_c({},\"visitor\")),{...x});P.forEach(Bp([\"pre\"],[]));const $=visitor_visit(s,B,x);return P.forEach(Bp([\"post\"],[])),$},refract=(s,{Type:i,plugins:u=[]})=>{const _=new i(s);return Up(s)&&(s.meta.length>0&&(_.meta=cloneDeep(s.meta)),s.attributes.length>0&&(_.attributes=cloneDeep(s.attributes))),dispatchPlugins(_,u,{toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType}})},createRefractor=s=>(i,u={})=>refract(i,{...u,Type:s});gp.Sh.refract=createRefractor(gp.Sh),gp.wE.refract=createRefractor(gp.wE),gp.Om.refract=createRefractor(gp.Om),gp.bd.refract=createRefractor(gp.bd),gp.Os.refract=createRefractor(gp.Os),gp.kT.refract=createRefractor(gp.kT),gp.Ft.refract=createRefractor(gp.Ft),gp.sI.refract=createRefractor(gp.sI),yp.refract=createRefractor(yp),vp.refract=createRefractor(vp),bp.refract=createRefractor(bp),_p.refract=createRefractor(_p);const computeEdges=(s,i=new WeakMap)=>(Gp(s)?(i.set(s.key,s),computeEdges(s.key,i),i.set(s.value,s),computeEdges(s.value,i)):s.children.forEach((u=>{i.set(u,s),computeEdges(u,i)})),i);const cd=class Transcluder_Transcluder{element;edges;constructor({element:s}){this.element=s}transclude(s,i){var u;if(s===this.element)return i;if(s===i)return this.element;this.edges=null!==(u=this.edges)&&void 0!==u?u:computeEdges(this.element);const _=this.edges.get(s);return lu(_)?void 0:(Hp(_)?((s,i,u)=>{const _=u.get(s);Hp(_)&&(_.content=_.map(((w,x,j)=>j===s?(u.delete(s),u.set(i,_),i):j)))})(s,i,this.edges):Jp(_)?((s,i,u)=>{const _=u.get(s);Jp(_)&&(_.content=_.map((w=>w===s?(u.delete(s),u.set(i,_),i):w)))})(s,i,this.edges):Gp(_)&&((s,i,u)=>{const _=u.get(s);Gp(_)&&(_.key===s&&(_.key=i,u.delete(s),u.set(i,_)),_.value===s&&(_.value=i,u.delete(s),u.set(i,_)))})(s,i,this.edges),this.element)}};const es_T=function(){return!0},nodeTypeGetter=s=>\"string\"==typeof(null==s?void 0:s.type)?s.type:visitor_getNodeType(s),ud={EphemeralObject:[\"content\"],EphemeralArray:[\"content\"],...id},value_visitor_visit=(s,i,{keyMap:u=ud,..._}={})=>visitor_visit(s,i,{keyMap:u,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),..._});value_visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,{keyMap:i=ud,...u}={})=>visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,visitor,{keyMap:i,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...u});const dd=class EphemeralArray{type=\"EphemeralArray\";content=[];reference=void 0;constructor(s){this.content=s,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const md=class EphemeralObject{type=\"EphemeralObject\";content=[];reference=void 0;constructor(s){this.content=s,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class Visitor{ObjectElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const i=new md(s.content);return this.references.set(s,i),i}};EphemeralObject={leave:s=>s.toObject()};MemberElement={enter:s=>[s.key,s.value]};ArrayElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const i=new dd(s.content);return this.references.set(s,i),i}};EphemeralArray={leave:s=>s.toArray()};references=new WeakMap;BooleanElement(s){return s.toValue()}NumberElement(s){return s.toValue()}StringElement(s){return s.toValue()}NullElement(){return null}RefElement(s,...i){var u;const _=i[3];return\"EphemeralObject\"===(null===(u=_[_.length-1])||void 0===u?void 0:u.type)?Symbol.for(\"delete-node\"):String(s.toValue())}LinkElement(s){return zp(s.href)?s.href.toValue():\"\"}}const serializers_value=s=>Up(s)?zp(s)||Vp(s)||Kp(s)||Wp(s)?s.toValue():value_visitor_visit(s,new Visitor):s,yd=pipe(bu(/~/g,\"~0\"),bu(/\\//g,\"~1\"),encodeURIComponent);const vd=class JsonPointerError extends Gh{};const _d=class CompilationJsonPointerError extends vd{tokens;constructor(s,i){super(s,i),void 0!==i&&(this.tokens=[...i.tokens])}},es_compile=s=>{try{return 0===s.length?\"\":`/${s.map(yd).join(\"/\")}`}catch(i){throw new _d(\"JSON Pointer compilation of tokens encountered an error.\",{tokens:s,cause:i})}};var Ed=_curry2((function converge(s,i){return Oc(pc(uu,0,hu(\"length\",i)),(function(){var u=arguments,_=this;return s.apply(_,_map((function(s){return s.apply(_,u)}),i))}))}));const wd=Ed;function _identity(s){return s}const Sd=_curry1(_identity);var xd=Ip(Oc(1,pipe(zl,fu(\"Number\"))),isFinite);var kd=Oc(1,xd);var Od=Ip(yu(Number.isFinite)?Oc(1,ic(Number.isFinite,Number)):kd,wd(Vl,[Math.floor,Sd]));var Cd=Oc(1,Od);const Ad=yu(Number.isInteger)?Oc(1,ic(Number.isInteger,Number)):Cd;var Id=function(){function XTake(s,i){this.xf=i,this.n=s,this.i=0}return XTake.prototype[\"@@transducer/init\"]=_xfBase_init,XTake.prototype[\"@@transducer/result\"]=_xfBase_result,XTake.prototype[\"@@transducer/step\"]=function(s,i){this.i+=1;var u=0===this.n?s:this.xf[\"@@transducer/step\"](s,i);return this.n>=0&&this.i>=this.n?_reduced(u):u},XTake}();function _xtake(s){return function(i){return new Id(s,i)}}const Nd=_curry2(_dispatchable([\"take\"],_xtake,(function take(s,i){return dc(0,s<0?1/0:s,i)})));var Md=_curry2((function(s,i){return Vl(Nd(s.length,i),s)}));const Td=Md;const Rd=Vl(\"\");var Dd=function(){function XDropWhile(s,i){this.xf=i,this.f=s}return XDropWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropWhile.prototype[\"@@transducer/result\"]=_xfBase_result,XDropWhile.prototype[\"@@transducer/step\"]=function(s,i){if(this.f){if(this.f(i))return s;this.f=null}return this.xf[\"@@transducer/step\"](s,i)},XDropWhile}();function _xdropWhile(s){return function(i){return new Dd(s,i)}}const Ld=_curry2(_dispatchable([\"dropWhile\"],_xdropWhile,(function dropWhile(s,i){for(var u=0,_=i.length;u<_&&s(i[u]);)u+=1;return dc(u,1/0,i)})));const Bd=Pc((function(s,i){return pipe(Nc(\"\"),Ld(qc(s)),Lc(\"\"))(i)})),Fd=pipe(bu(/~1/g,\"/\"),bu(/~0/g,\"~\"),(s=>{try{return decodeURIComponent(s)}catch{return s}}));const $d=class InvalidJsonPointerError extends vd{pointer;constructor(s,i){super(s,i),void 0!==i&&(this.pointer=i.pointer)}},uriToPointer=s=>{const i=(s=>{const i=s.indexOf(\"#\");return-1!==i?s.substring(i):\"#\"})(s);return Bd(\"#\",i)},es_parse=s=>{if(Rd(s))return[];if(!Td(\"/\",s))throw new $d(`Invalid JSON Pointer \"${s}\". JSON Pointers must begin with \"/\"`,{pointer:s});try{const i=pipe(Nc(\"/\"),Qc(Fd))(s);return fc(i)}catch(i){throw new $d(`JSON Pointer parsing of \"${s}\" encountered an error.`,{pointer:s,cause:i})}};const Ud=class EvaluationJsonPointerError extends vd{pointer;tokens;failedToken;failedTokenPosition;element;constructor(s,i){super(s,i),void 0!==i&&(this.pointer=i.pointer,Array.isArray(i.tokens)&&(this.tokens=[...i.tokens]),this.failedToken=i.failedToken,this.failedTokenPosition=i.failedTokenPosition,this.element=i.element)}},es_evaluate=(s,i)=>{let u;try{u=es_parse(s)}catch(u){throw new Ud(`JSON Pointer evaluation failed while parsing the pointer \"${s}\".`,{pointer:s,element:cloneDeep(i),cause:u})}return u.reduce(((i,_,w)=>{if(Hp(i)){if(!i.hasKey(_))throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an ObjectElement`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)});return i.get(_)}if(Jp(i)){if(!(_ in i.content)||!Ad(Number(_)))throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an ArrayElement`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)});return i.get(Number(_))}throw new Ud(`JSON Pointer evaluation failed while evaluating token \"${_}\" against an unexpected Element`,{pointer:s,tokens:u,failedToken:_,failedTokenPosition:w,element:cloneDeep(i)})}),i)};class Callback extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"callback\"}}const Vd=Callback;class Components extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"components\"}get schemas(){return this.get(\"schemas\")}set schemas(s){this.set(\"schemas\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get requestBodies(){return this.get(\"requestBodies\")}set requestBodies(s){this.set(\"requestBodies\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get securitySchemes(){return this.get(\"securitySchemes\")}set securitySchemes(s){this.set(\"securitySchemes\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}}const Wd=Components;class Contact extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"contact\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get email(){return this.get(\"email\")}set email(s){this.set(\"email\",s)}}const Kd=Contact;class Discriminator extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"discriminator\"}get propertyName(){return this.get(\"propertyName\")}set propertyName(s){this.set(\"propertyName\",s)}get mapping(){return this.get(\"mapping\")}set mapping(s){this.set(\"mapping\",s)}}const Hd=Discriminator;class Encoding extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"encoding\"}get contentType(){return this.get(\"contentType\")}set contentType(s){this.set(\"contentType\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowedReserved(){return this.get(\"allowedReserved\")}set allowedReserved(s){this.set(\"allowedReserved\",s)}}const Jd=Encoding;class Example extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"example\"}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get value(){return this.get(\"value\")}set value(s){this.set(\"value\",s)}get externalValue(){return this.get(\"externalValue\")}set externalValue(s){this.set(\"externalValue\",s)}}const Gd=Example;class ExternalDocumentation extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"externalDocumentation\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Yd=ExternalDocumentation;class Header extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"header\"}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Header.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const Xd=Header;class Info extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"info\",this.classes.push(\"info\")}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get termsOfService(){return this.get(\"termsOfService\")}set termsOfService(s){this.set(\"termsOfService\",s)}get contact(){return this.get(\"contact\")}set contact(s){this.set(\"contact\",s)}get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get version(){return this.get(\"version\")}set version(s){this.set(\"version\",s)}}const Qd=Info;class License extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"license\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Zd=License;class Link extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"link\"}get operationRef(){return this.get(\"operationRef\")}set operationRef(s){this.set(\"operationRef\",s)}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get operation(){var s,i;return zp(this.operationRef)?null===(s=this.operationRef)||void 0===s?void 0:s.meta.get(\"operation\"):zp(this.operationId)?null===(i=this.operationId)||void 0===i?void 0:i.meta.get(\"operation\"):void 0}set operation(s){this.set(\"operation\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get server(){return this.get(\"server\")}set server(s){this.set(\"server\",s)}}const ef=Link;class MediaType extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"mediaType\"}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get encoding(){return this.get(\"encoding\")}set encoding(s){this.set(\"encoding\",s)}}const rf=MediaType;class OAuthFlow extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"oAuthFlow\"}get authorizationUrl(){return this.get(\"authorizationUrl\")}set authorizationUrl(s){this.set(\"authorizationUrl\",s)}get tokenUrl(){return this.get(\"tokenUrl\")}set tokenUrl(s){this.set(\"tokenUrl\",s)}get refreshUrl(){return this.get(\"refreshUrl\")}set refreshUrl(s){this.set(\"refreshUrl\",s)}get scopes(){return this.get(\"scopes\")}set scopes(s){this.set(\"scopes\",s)}}const of=OAuthFlow;class OAuthFlows extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"oAuthFlows\"}get implicit(){return this.get(\"implicit\")}set implicit(s){this.set(\"implicit\",s)}get password(){return this.get(\"password\")}set password(s){this.set(\"password\",s)}get clientCredentials(){return this.get(\"clientCredentials\")}set clientCredentials(s){this.set(\"clientCredentials\",s)}get authorizationCode(){return this.get(\"authorizationCode\")}set authorizationCode(s){this.set(\"authorizationCode\",s)}}const af=OAuthFlows;class Openapi extends gp.Om{constructor(s,i,u){super(s,i,u),this.element=\"openapi\",this.classes.push(\"spec-version\"),this.classes.push(\"version\")}}const lf=Openapi;class OpenApi3_0 extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"openApi3_0\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const cf=OpenApi3_0;class Operation extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"operation\"}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}set externalDocs(s){this.set(\"externalDocs\",s)}get externalDocs(){return this.get(\"externalDocs\")}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get servers(){return this.get(\"severs\")}set servers(s){this.set(\"servers\",s)}}const uf=Operation;class Parameter extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"parameter\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new gp.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Parameter.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const hf=Parameter;class PathItem extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"pathItem\"}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}}const df=PathItem;class Paths extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"paths\"}}const mf=Paths;class Reference extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"reference\",this.classes.push(\"openapi-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const gf=Reference;class RequestBody extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"requestBody\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new gp.bd(!1)}set required(s){this.set(\"required\",s)}}const yf=RequestBody;class Response_Response extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"response\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}}const bf=Response_Response;class Responses extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"responses\"}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}}const _f=Responses;const Sf=class UnsupportedOperationError extends Vh{};class JSONSchema extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"JSONSchemaDraft4\"}get idProp(){return this.get(\"id\")}set idProp(s){this.set(\"id\",s)}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get dependencies(){return this.get(\"dependencies\")}set dependencies(s){this.set(\"dependencies\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){return this.get(\"definitions\")}set definitions(s){this.set(\"definitions\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get base(){return this.get(\"base\")}set base(s){this.set(\"base\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get media(){return this.get(\"media\")}set media(s){this.set(\"media\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}}const xf=JSONSchema;class JSONReference extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"JSONReference\",this.classes.push(\"json-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const kf=JSONReference;class Media extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"media\"}get binaryEncoding(){return this.get(\"binaryEncoding\")}set binaryEncoding(s){this.set(\"binaryEncoding\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}}const Of=Media;class LinkDescription extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"linkDescription\"}get href(){return this.get(\"href\")}set href(s){this.set(\"href\",s)}get rel(){return this.get(\"rel\")}set rel(s){this.set(\"rel\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){return this.get(\"mediaType\")}set mediaType(s){this.set(\"mediaType\",s)}get method(){return this.get(\"method\")}set method(s){this.set(\"method\",s)}get encType(){return this.get(\"encType\")}set encType(s){this.set(\"encType\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}}const Cf=LinkDescription;var jf=_curry2((function mapObjIndexed(s,i){return _arrayReduce((function(u,_){return u[_]=s(i[_],_,i),u}),{},Ul(i))}));const Pf=jf;const Nf=_curry1((function isNil(s){return null==s}));const Tf=_curry2((function hasPath(s,i){if(0===s.length||Nf(i))return!1;for(var u=i,_=0;_<s.length;){if(Nf(u)||!_has(s[_],u))return!1;u=u[s[_]],_+=1}return!0}));var Rf=_curry2((function has(s,i){return Tf([s],i)}));const Df=Rf;const Ff=_curry3((function propSatisfies(s,i,u){return s(bc(i,u))})),dereference=(s,i)=>{const u=gc(s,i);return Pf((s=>{if(Dh(s)&&Df(\"$ref\",s)&&Ff(wu,\"$ref\",s)){const i=Il([\"$ref\"],s),_=Bd(\"#/\",i);return Il(_.split(\"/\"),u)}return Dh(s)?dereference(s,u):s}),s)};var Vf=__webpack_require__(12646);const emptyElement=s=>{const i=s.meta.length>0?cloneDeep(s.meta):void 0,u=s.attributes.length>0?cloneDeep(s.attributes):void 0;return new s.constructor(void 0,i,u)},cloneUnlessOtherwiseSpecified=(s,i)=>i.clone&&i.isMergeableElement(s)?deepmerge(emptyElement(s),s,i):s,getMetaMergeFunction=s=>\"function\"!=typeof s.customMetaMerge?s=>cloneDeep(s):s.customMetaMerge,getAttributesMergeFunction=s=>\"function\"!=typeof s.customAttributesMerge?s=>cloneDeep(s):s.customAttributesMerge,Wf={clone:!0,isMergeableElement:s=>Hp(s)||Jp(s),arrayElementMerge:(s,i,u)=>s.concat(i)[\"fantasy-land/map\"]((s=>cloneUnlessOtherwiseSpecified(s,u))),objectElementMerge:(s,i,u)=>{const _=Hp(s)?emptyElement(s):emptyElement(i);return Hp(s)&&s.forEach(((s,i,w)=>{const x=cloneShallow(w);x.value=cloneUnlessOtherwiseSpecified(s,u),_.content.push(x)})),i.forEach(((i,w,x)=>{const j=serializers_value(w);let P;if(Hp(s)&&s.hasKey(j)&&u.isMergeableElement(i)){const _=s.get(j);P=cloneShallow(x),P.value=((s,i)=>{if(\"function\"!=typeof i.customMerge)return deepmerge;const u=i.customMerge(s,i);return\"function\"==typeof u?u:deepmerge})(w,u)(_,i)}else P=cloneShallow(x),P.value=cloneUnlessOtherwiseSpecified(i,u);_.remove(j),_.content.push(P)})),_},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function deepmerge(s,i,u){var _,w,x;const j={...Wf,...u};j.isMergeableElement=null!==(_=j.isMergeableElement)&&void 0!==_?_:Wf.isMergeableElement,j.arrayElementMerge=null!==(w=j.arrayElementMerge)&&void 0!==w?w:Wf.arrayElementMerge,j.objectElementMerge=null!==(x=j.objectElementMerge)&&void 0!==x?x:Wf.objectElementMerge;const P=Jp(i);if(!(P===Jp(s)))return cloneUnlessOtherwiseSpecified(i,j);const B=P&&\"function\"==typeof j.arrayElementMerge?j.arrayElementMerge(s,i,j):j.objectElementMerge(s,i,j);return B.meta=getMetaMergeFunction(j)(s.meta,i.meta),B.attributes=getAttributesMergeFunction(j)(s.attributes,i.attributes),B}deepmerge.all=(s,i)=>{if(!Array.isArray(s))throw new TypeError(\"First argument of deepmerge should be an array.\");return 0===s.length?new gp.Sh:s.reduce(((s,u)=>deepmerge(s,u,i)),emptyElement(s[0]))};const Hf=Vf({props:{element:null},methods:{copyMetaAndAttributes(s,i){(s.meta.length>0||i.meta.length>0)&&(i.meta=deepmerge(i.meta,s.meta),hasElementSourceMap(s)&&i.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(i.attributes=deepmerge(i.attributes,s.attributes))}}}),Jf=Hf,Gf=Vf(Jf,{methods:{enter(s){return this.element=cloneDeep(s),Yh}}});const Xf=iu(au());const Qf=_curry2((function pick(s,i){for(var u={},_=0;_<s.length;)s[_]in i&&(u[s[_]]=i[s[_]]),_+=1;return u})),em=Vf(Jf,{props:{specObj:null,passingOptionsNames:[\"specObj\"]},init({specObj:s=this.specObj}){this.specObj=s},methods:{retrievePassingOptions(){return Qf(this.passingOptionsNames,this)},retrieveFixedFields(s){const i=Il([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof i&&null!==i?Object.keys(i):[]},retrieveVisitor(s){return Nl(yu,[\"visitors\",...s],this.specObj)?Il([\"visitors\",...s],this.specObj):Il([\"visitors\",...s,\"$visitor\"],this.specObj)},retrieveVisitorInstance(s,i={}){const u=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...u,...i})},toRefractedElement(s,i,u={}){const _=this.retrieveVisitorInstance(s,u),w=Object.getPrototypeOf(_);return lu(this.fallbackVisitorPrototype)&&(this.fallbackVisitorPrototype=Object.getPrototypeOf(this.retrieveVisitorInstance([\"value\"]))),this.fallbackVisitorPrototype===w?cloneDeep(i):(visitor_visit(i,_,u),_.element)}}}),tm=Vf(em,{props:{specPath:Xf,ignoredFields:[]},init({specPath:s=this.specPath,ignoredFields:i=this.ignoredFields}={}){this.specPath=s,this.ignoredFields=i},methods:{ObjectElement(s){const i=this.specPath(s),u=this.retrieveFixedFields(i);return s.forEach(((s,_,w)=>{if(zp(_)&&u.includes(serializers_value(_))&&!this.ignoredFields.includes(serializers_value(_))){const u=this.toRefractedElement([...i,\"fixedFields\",serializers_value(_)],s),x=new gp.Pr(cloneDeep(_),u);this.copyMetaAndAttributes(w,x),x.classes.push(\"fixed-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(_))||this.element.content.push(cloneDeep(w))})),this.copyMetaAndAttributes(s,this.element),Yh}}}),rm=Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"JSONSchema\"])},init(){this.element=new xf}}),nm=Gf,om=Gf,sm=Gf,im=Gf,am=Gf,lm=Gf,cm=Gf,um=Gf,pm=Gf,hm=Gf,dm=Vf({props:{parent:null},init({parent:s=this.parent}){this.parent=s,this.passingOptionsNames=[...this.passingOptionsNames,\"parent\"]}}),isJSONReferenceLikeElement=s=>Hp(s)&&s.hasKey(\"$ref\"),fm=Vf(em,dm,Gf,{methods:{ObjectElement(s){const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"];return this.element=this.toRefractedElement(i,s),Yh},ArrayElement(s){return this.element=new gp.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),mm=Gf,gm=Gf,ym=Gf,vm=Gf,bm=Gf,_m=Vf(Gf,{methods:{ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-required\"),Yh}}});const Em=_curry1((function allPass(s){return Oc(pc(uu,0,hu(\"length\",s)),(function(){for(var i=0,u=s.length;i<u;){if(!s[i].apply(this,arguments))return!1;i+=1}return!0}))}));const wm=_curry2((function or(s,i){return s||i}));const Sm=su(Oc(1,Ip(Eh,_curry2((function either(s,i){return _isFunction(s)?function _either(){return s.apply(this,arguments)||i.apply(this,arguments)}:ou(wm)(s,i)}))(Sh,yu))));const xm=su(Tp);const km=Em([wu,Sm,xm]),Om=Vf(em,{props:{fieldPatternPredicate:es_F,specPath:Xf,ignoredFields:[]},init({specPath:s=this.specPath,ignoredFields:i=this.ignoredFields}={}){this.specPath=s,this.ignoredFields=i},methods:{ObjectElement(s){return s.forEach(((s,i,u)=>{if(!this.ignoredFields.includes(serializers_value(i))&&this.fieldPatternPredicate(serializers_value(i))){const _=this.specPath(s),w=this.toRefractedElement(_,s),x=new gp.Pr(cloneDeep(i),w);this.copyMetaAndAttributes(u,x),x.classes.push(\"patterned-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(i))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Cm=Vf(Om,{props:{fieldPatternPredicate:km}}),Am=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-properties\")}}),jm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-patternProperties\")}}),Pm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-dependencies\")}}),Im=Vf(Gf,{methods:{ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-enum\"),Yh}}}),Nm=Vf(Gf,{methods:{StringElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-type\"),Yh},ArrayElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"json-schema-type\"),Yh}}}),Mm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-allOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Tm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-anyOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Rm=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-oneOf\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),Dm=Vf(Cm,dm,Gf,{props:{specPath:s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]},init(){this.element=new gp.Sh,this.element.classes.push(\"json-schema-definitions\")}}),Lm=Gf,Bm=Gf,Fm=Gf,qm=Gf,$m=Gf,Um=Vf(em,dm,Gf,{init(){this.element=new gp.wE,this.element.classes.push(\"json-schema-links\")},methods:{ArrayElement(s){return s.forEach((s=>{const i=this.toRefractedElement([\"document\",\"objects\",\"LinkDescription\"],s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Yh}}}),zm=Gf,Vm=Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"JSONReference\"])},init(){this.element=new kf},methods:{ObjectElement(s){const i=tm.compose.methods.ObjectElement.call(this,s);return zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}}),Wm=Vf(Gf,{methods:{StringElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"reference-value\"),Yh}}});const Km=_curry3((function ifElse(s,i,u){return Oc(Math.max(s.length,i.length,u.length),(function _ifElse(){return s.apply(this,arguments)?i.apply(this,arguments):u.apply(this,arguments)}))}));const Hm=_curry1((function comparator(s){return function(i,u){return s(i,u)?-1:s(u,i)?1:0}}));var Jm=_curry2((function sort(s,i){return Array.prototype.slice.call(i,0).sort(s)}));const Gm=Jm;const Ym=Cl(0);const Xm=_curry1(_reduced);const Qm=su(Nf);const Zm=Ip(Rp,xm);function dispatch_toConsumableArray(s){return function dispatch_arrayWithoutHoles(s){if(Array.isArray(s))return dispatch_arrayLikeToArray(s)}(s)||function dispatch_iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function dispatch_unsupportedIterableToArray(s,i){if(!s)return;if(\"string\"==typeof s)return dispatch_arrayLikeToArray(s,i);var u=Object.prototype.toString.call(s).slice(8,-1);\"Object\"===u&&s.constructor&&(u=s.constructor.name);if(\"Map\"===u||\"Set\"===u)return Array.from(s);if(\"Arguments\"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return dispatch_arrayLikeToArray(s,i)}(s)||function dispatch_nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function dispatch_arrayLikeToArray(s,i){(null==i||i>s.length)&&(i=s.length);for(var u=0,_=new Array(i);u<i;u++)_[u]=s[u];return _}var eg=pipe(Gm(Hm((function(s,i){return s.length>i.length}))),Ym,bc(\"length\")),rg=Pc((function(s,i,u){var _=u.apply(void 0,dispatch_toConsumableArray(s));return Qm(_)?Xm(_):i}));const ng=Km(Zm,(function dispatchImpl(s){var i=eg(s);return Oc(i,(function(){for(var i=arguments.length,u=new Array(i),_=0;_<i;_++)u[_]=arguments[_];return pc(rg(u),void 0,s)}))}),au),og=Vf(em,{props:{alternator:[]},methods:{enter(s){const i=this.alternator.map((({predicate:s,specPath:i})=>Km(s,iu(i),au))),u=ng(i)(s);return this.element=this.toRefractedElement(u,s),Yh}}}),sg=Vf(og,{props:{alternator:[{predicate:isJSONReferenceLikeElement,specPath:[\"document\",\"objects\",\"JSONReference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"JSONSchema\"]}]}}),lg={visitors:{value:Gf,JSONSchemaOrJSONReferenceVisitor:sg,document:{objects:{JSONSchema:{$visitor:rm,fixedFields:{id:nm,$schema:om,multipleOf:sm,maximum:im,exclusiveMaximum:am,minimum:lm,exclusiveMinimum:cm,maxLength:um,minLength:pm,pattern:hm,additionalItems:sg,items:fm,maxItems:mm,minItems:gm,uniqueItems:ym,maxProperties:vm,minProperties:bm,required:_m,properties:Am,additionalProperties:sg,patternProperties:jm,dependencies:Pm,enum:Im,type:Nm,allOf:Mm,anyOf:Tm,oneOf:Rm,not:sg,definitions:Dm,title:Lm,description:Bm,default:Fm,format:qm,base:$m,links:Um,media:{$ref:\"#/visitors/document/objects/Media\"},readOnly:zm}},JSONReference:{$visitor:Vm,fixedFields:{$ref:Wm}},Media:{$visitor:Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"Media\"])},init(){this.element=new Of}}),fixedFields:{binaryEncoding:Gf,type:Gf}},LinkDescription:{$visitor:Vf(tm,Gf,{props:{specPath:iu([\"document\",\"objects\",\"LinkDescription\"])},init(){this.element=new Cf}}),fixedFields:{href:Gf,rel:Gf,title:Gf,targetSchema:sg,mediaType:Gf,method:Gf,encType:Gf,schema:sg}}}}}},traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},pg={JSONSchemaDraft4Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...id},fg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof xf||s(_)&&i(\"JSONSchemaDraft4\",_)&&u(\"object\",_))),mg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kf||s(_)&&i(\"JSONReference\",_)&&u(\"object\",_))),gg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Of||s(_)&&i(\"media\",_)&&u(\"object\",_))),yg=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Cf||s(_)&&i(\"linkDescription\",_)&&u(\"object\",_))),_g={namespace:s=>{const{base:i}=s;return i.register(\"jSONSchemaDraft4\",xf),i.register(\"jSONReference\",kf),i.register(\"media\",Of),i.register(\"linkDescription\",Cf),i}},xg=_g,refractor_toolbox=()=>{const s=createNamespace(xg);return{predicates:{...fe,isStringElement:zp},namespace:s}},refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:u=[],specificationObj:_=lg}={})=>{const w=(0,gp.e)(s),x=dereference(_),j=Bp(i,[],x);return visitor_visit(w,j,{state:{specObj:x}}),dispatchPlugins(j.element,u,{toolboxCreator:refractor_toolbox,visitorOptions:{keyMap:pg,nodeTypeGetter:traversal_visitor_getNodeType}})},refractor_createRefractor=s=>(i,u={})=>refractor_refract(i,{specPath:s,...u});xf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),kf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),Of.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Media\",\"$visitor\"]),Cf.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const kg=class Schema_Schema extends xf{constructor(s,i,u){super(s,i,u),this.element=\"schema\",this.classes.push(\"json-schema-draft-4\")}get idProp(){throw new Sf(\"idProp getter in Schema class is not not supported.\")}set idProp(s){throw new Sf(\"idProp setter in Schema class is not not supported.\")}get $schema(){throw new Sf(\"$schema getter in Schema class is not not supported.\")}set $schema(s){throw new Sf(\"$schema setter in Schema class is not not supported.\")}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){throw new Sf(\"patternProperties getter in Schema class is not not supported.\")}set patternProperties(s){throw new Sf(\"patternProperties setter in Schema class is not not supported.\")}get dependencies(){throw new Sf(\"dependencies getter in Schema class is not not supported.\")}set dependencies(s){throw new Sf(\"dependencies setter in Schema class is not not supported.\")}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){throw new Sf(\"definitions getter in Schema class is not not supported.\")}set definitions(s){throw new Sf(\"definitions setter in Schema class is not not supported.\")}get base(){throw new Sf(\"base getter in Schema class is not not supported.\")}set base(s){throw new Sf(\"base setter in Schema class is not not supported.\")}get links(){throw new Sf(\"links getter in Schema class is not not supported.\")}set links(s){throw new Sf(\"links setter in Schema class is not not supported.\")}get media(){throw new Sf(\"media getter in Schema class is not not supported.\")}set media(s){throw new Sf(\"media setter in Schema class is not not supported.\")}get nullable(){return this.get(\"nullable\")}set nullable(s){this.set(\"nullable\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}};class SecurityRequirement extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"securityRequirement\"}}const Og=SecurityRequirement;class SecurityScheme extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"securityScheme\"}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get scheme(){return this.get(\"scheme\")}set scheme(s){this.set(\"scheme\",s)}get bearerFormat(){return this.get(\"bearerFormat\")}set bearerFormat(s){this.set(\"bearerFormat\",s)}get flows(){return this.get(\"flows\")}set flows(s){this.set(\"flows\",s)}get openIdConnectUrl(){return this.get(\"openIdConnectUrl\")}set openIdConnectUrl(s){this.set(\"openIdConnectUrl\",s)}}const Pg=SecurityScheme;class Server extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"server\"}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get variables(){return this.get(\"variables\")}set variables(s){this.set(\"variables\",s)}}const Ng=Server;class ServerVariable extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"serverVariable\"}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}}const Mg=ServerVariable;class Tag extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"tag\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const qg=Tag;class Xml extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"xml\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get namespace(){return this.get(\"namespace\")}set namespace(s){this.set(\"namespace\",s)}get prefix(){return this.get(\"prefix\")}set prefix(s){this.set(\"prefix\",s)}get attribute(){return this.get(\"attribute\")}set attribute(s){this.set(\"attribute\",s)}get wrapped(){return this.get(\"wrapped\")}set wrapped(s){this.set(\"wrapped\",s)}}const $g=Xml,copyProps=(s,i,u=[])=>{const _=Object.getOwnPropertyDescriptors(i);for(let s of u)delete _[s];Object.defineProperties(s,_)},protoChain=(s,i=[s])=>{const u=Object.getPrototypeOf(s);return null===u?i:protoChain(u,[...i,u])},hardMixProtos=(s,i,u=[])=>{var _;const w=null!==(_=((...s)=>{if(0===s.length)return;let i;const u=s.map((s=>protoChain(s)));for(;u.every((s=>s.length>0));){const s=u.map((s=>s.pop())),_=s[0];if(!s.every((s=>s===_)))break;i=_}return i})(...s))&&void 0!==_?_:Object.prototype,x=Object.create(w),j=protoChain(w);for(let i of s){let s=protoChain(i);for(let i=s.length-1;i>=0;i--){let _=s[i];-1===j.indexOf(_)&&(copyProps(x,_,[\"constructor\",...u]),j.push(_))}}return x.constructor=i,x},unique=s=>s.filter(((i,u)=>s.indexOf(i)==u)),getIngredientWithProp=(s,i)=>{const u=i.map((s=>protoChain(s)));let _=0,w=!0;for(;w;){w=!1;for(let x=i.length-1;x>=0;x--){const i=u[x][_];if(null!=i&&(w=!0,null!=Object.getOwnPropertyDescriptor(i,s)))return u[x][0]}_++}},proxyMix=(s,i=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>i,setPrototypeOf(){throw Error(\"Cannot set prototype of Proxies created by ts-mixer\")},getOwnPropertyDescriptor:(i,u)=>Object.getOwnPropertyDescriptor(getIngredientWithProp(u,s)||{},u),defineProperty(){throw new Error(\"Cannot define new properties on Proxies created by ts-mixer\")},has:(u,_)=>void 0!==getIngredientWithProp(_,s)||void 0!==i[_],get:(u,_)=>(getIngredientWithProp(_,s)||i)[_],set(i,u,_){const w=getIngredientWithProp(u,s);if(void 0===w)throw new Error(\"Cannot set new properties on Proxies created by ts-mixer\");return w[u]=_,!0},deleteProperty(){throw new Error(\"Cannot delete properties on Proxies created by ts-mixer\")},ownKeys:()=>s.map(Object.getOwnPropertyNames).reduce(((s,i)=>i.concat(s.filter((s=>i.indexOf(s)<0)))))}),Ug=null,zg=\"copy\",Wg=\"copy\",Kg=\"deep\",ey=new WeakMap,getMixinsForClass=s=>ey.get(s),mergeObjectsOfDecorators=(s,i)=>{var u,_;const w=unique([...Object.getOwnPropertyNames(s),...Object.getOwnPropertyNames(i)]),x={};for(let j of w)x[j]=unique([...null!==(u=null==s?void 0:s[j])&&void 0!==u?u:[],...null!==(_=null==i?void 0:i[j])&&void 0!==_?_:[]]);return x},mergePropertyAndMethodDecorators=(s,i)=>{var u,_,w,x;return{property:mergeObjectsOfDecorators(null!==(u=null==s?void 0:s.property)&&void 0!==u?u:{},null!==(_=null==i?void 0:i.property)&&void 0!==_?_:{}),method:mergeObjectsOfDecorators(null!==(w=null==s?void 0:s.method)&&void 0!==w?w:{},null!==(x=null==i?void 0:i.method)&&void 0!==x?x:{})}},mergeDecorators=(s,i)=>{var u,_,w,x,j,P;return{class:unique([...null!==(u=null==s?void 0:s.class)&&void 0!==u?u:[],...null!==(_=null==i?void 0:i.class)&&void 0!==_?_:[]]),static:mergePropertyAndMethodDecorators(null!==(w=null==s?void 0:s.static)&&void 0!==w?w:{},null!==(x=null==i?void 0:i.static)&&void 0!==x?x:{}),instance:mergePropertyAndMethodDecorators(null!==(j=null==s?void 0:s.instance)&&void 0!==j?j:{},null!==(P=null==i?void 0:i.instance)&&void 0!==P?P:{})}},ty=new Map,deepDecoratorSearch=(...s)=>{const i=((...s)=>{var i;const u=new Set,_=new Set([...s]);for(;_.size>0;)for(let s of _){const w=protoChain(s.prototype).map((s=>s.constructor)),x=[...w,...null!==(i=getMixinsForClass(s))&&void 0!==i?i:[]].filter((s=>!u.has(s)));for(let s of x)_.add(s);u.add(s),_.delete(s)}return[...u]})(...s).map((s=>ty.get(s))).filter((s=>!!s));return 0==i.length?{}:1==i.length?i[0]:i.reduce(((s,i)=>mergeDecorators(s,i)))},getDecoratorsForClass=s=>{let i=ty.get(s);return i||(i={},ty.set(s,i)),i};function Mixin(...s){var i,u,_;const w=s.map((s=>s.prototype)),x=Ug;if(null!==x){const s=w.map((s=>s[x])).filter((s=>\"function\"==typeof s)),i={[x]:function(...i){for(let u of s)u.apply(this,i)}};w.push(i)}function MixedClass(...i){for(const u of s)copyProps(this,new u(...i));null!==x&&\"function\"==typeof this[x]&&this[x].apply(this,i)}var j,P;MixedClass.prototype=\"copy\"===Wg?hardMixProtos(w,MixedClass):(j=w,P=MixedClass,proxyMix([...j,{constructor:P}])),Object.setPrototypeOf(MixedClass,\"copy\"===zg?hardMixProtos(s,null,[\"prototype\"]):proxyMix(s,Function.prototype));let B=MixedClass;if(\"none\"!==Kg){const w=\"deep\"===Kg?deepDecoratorSearch(...s):((...s)=>{const i=s.map((s=>getDecoratorsForClass(s)));return 0===i.length?{}:1===i.length?i[0]:i.reduce(((s,i)=>mergeDecorators(s,i)))})(...s);for(let s of null!==(i=null==w?void 0:w.class)&&void 0!==i?i:[]){const i=s(B);i&&(B=i)}applyPropAndMethodDecorators(null!==(u=null==w?void 0:w.static)&&void 0!==u?u:{},B),applyPropAndMethodDecorators(null!==(_=null==w?void 0:w.instance)&&void 0!==_?_:{},B.prototype)}var $,U;return $=B,U=s,ey.set($,U),B}const applyPropAndMethodDecorators=(s,i)=>{const u=s.property,_=s.method;if(u)for(let s in u)for(let _ of u[s])_(i,s);if(_)for(let s in _)for(let u of _[s])u(i,s,Object.getOwnPropertyDescriptor(i,s))};const ry=class visitors_Visitor_Visitor{element;constructor(s={}){Object.assign(this,s)}copyMetaAndAttributes(s,i){(s.meta.length>0||i.meta.length>0)&&(i.meta=deepmerge(i.meta,s.meta),hasElementSourceMap(s)&&i.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(i.attributes=deepmerge(i.attributes,s.attributes))}};const ny=class FallbackVisitor_FallbackVisitor extends ry{enter(s){return this.element=cloneDeep(s),Yh}};const oy=class SpecificationVisitor_SpecificationVisitor extends ry{specObj;passingOptionsNames=[\"specObj\",\"openApiGenericElement\",\"openApiSemanticElement\"];openApiGenericElement;openApiSemanticElement;constructor({specObj:s,passingOptionsNames:i,openApiGenericElement:u,openApiSemanticElement:_,...w}){super({...w}),this.specObj=s,this.openApiGenericElement=u,this.openApiSemanticElement=_,Array.isArray(i)&&(this.passingOptionsNames=i)}retrievePassingOptions(){return Qf(this.passingOptionsNames,this)}retrieveFixedFields(s){const i=Il([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof i&&null!==i?Object.keys(i):[]}retrieveVisitor(s){return Nl(yu,[\"visitors\",...s],this.specObj)?Il([\"visitors\",...s],this.specObj):Il([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,i={}){const u=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...u,...i})}toRefractedElement(s,i,u={}){const _=this.retrieveVisitorInstance(s,u);return _ instanceof ny&&(null==_?void 0:_.constructor)===ny?cloneDeep(i):(visitor_visit(i,_,u),_.element)}},isReferenceLikeElement=s=>Hp(s)&&s.hasKey(\"$ref\"),sy=Hp,iy=Hp,isOpenApiExtension=s=>zp(s.key)&&Td(\"x-\",serializers_value(s.key));const ay=class FixedFieldsVisitor_FixedFieldsVisitor extends oy{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:i,canSupportSpecificationExtensions:u,specificationExtensionPredicate:_,...w}){super({...w}),this.specPath=s,this.ignoredFields=i||[],\"boolean\"==typeof u&&(this.canSupportSpecificationExtensions=u),\"function\"==typeof _&&(this.specificationExtensionPredicate=_)}ObjectElement(s){const i=this.specPath(s),u=this.retrieveFixedFields(i);return s.forEach(((s,_,w)=>{if(zp(_)&&u.includes(serializers_value(_))&&!this.ignoredFields.includes(serializers_value(_))){const u=this.toRefractedElement([...i,\"fixedFields\",serializers_value(_)],s),x=new gp.Pr(cloneDeep(_),u);this.copyMetaAndAttributes(w,x),x.classes.push(\"fixed-field\"),this.element.content.push(x)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(w)){const s=this.toRefractedElement([\"document\",\"extension\"],w);this.element.content.push(s)}else this.ignoredFields.includes(serializers_value(_))||this.element.content.push(cloneDeep(w))})),this.copyMetaAndAttributes(s,this.element),Yh}};class OpenApi3_0Visitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new cf,this.specPath=iu([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){return ay.prototype.ObjectElement.call(this,s)}}const ly=OpenApi3_0Visitor;class OpenapiVisitor extends(Mixin(oy,ny)){StringElement(s){const i=new lf(serializers_value(s));return this.copyMetaAndAttributes(s,i),this.element=i,Yh}}const cy=OpenapiVisitor;const uy=class SpecificationExtensionVisitor extends oy{MemberElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"specification-extension\"),Yh}};class InfoVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Qd,this.specPath=iu([\"document\",\"objects\",\"Info\"]),this.canSupportSpecificationExtensions=!0}}const py=InfoVisitor;const hy=class VersionVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"api-version\"),this.element.classes.push(\"version\"),i}};class ContactVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Kd,this.specPath=iu([\"document\",\"objects\",\"Contact\"]),this.canSupportSpecificationExtensions=!0}}const dy=ContactVisitor;class LicenseVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Zd,this.specPath=iu([\"document\",\"objects\",\"License\"]),this.canSupportSpecificationExtensions=!0}}const fy=LicenseVisitor;class LinkVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new ef,this.specPath=iu([\"document\",\"objects\",\"Link\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return(zp(this.element.operationId)||zp(this.element.operationRef))&&this.element.classes.push(\"reference-element\"),i}}const my=LinkVisitor;const gy=class OperationRefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};const yy=class OperationIdVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};const vy=class PatternedFieldsVisitor_PatternedFieldsVisitor extends oy{specPath;ignoredFields;fieldPatternPredicate=es_F;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:i,fieldPatternPredicate:u,canSupportSpecificationExtensions:_,specificationExtensionPredicate:w,...x}){super({...x}),this.specPath=s,this.ignoredFields=i||[],\"function\"==typeof u&&(this.fieldPatternPredicate=u),\"boolean\"==typeof _&&(this.canSupportSpecificationExtensions=_),\"function\"==typeof w&&(this.specificationExtensionPredicate=w)}ObjectElement(s){return s.forEach(((s,i,u)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(u)){const s=this.toRefractedElement([\"document\",\"extension\"],u);this.element.content.push(s)}else if(!this.ignoredFields.includes(serializers_value(i))&&this.fieldPatternPredicate(serializers_value(i))){const _=this.specPath(s),w=this.toRefractedElement(_,s),x=new gp.Pr(cloneDeep(i),w);this.copyMetaAndAttributes(u,x),x.classes.push(\"patterned-field\"),this.element.content.push(x)}else this.ignoredFields.includes(serializers_value(i))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Yh}};const by=class MapVisitor_MapVisitor extends vy{constructor(s){super(s),this.fieldPatternPredicate=km}};class LinkParameters extends gp.Sh{static primaryClass=\"link-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(LinkParameters.primaryClass)}}const _y=LinkParameters;class ParametersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new _y,this.specPath=iu([\"value\"])}}const Ey=ParametersVisitor;class ServerVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Ng,this.specPath=iu([\"document\",\"objects\",\"Server\"]),this.canSupportSpecificationExtensions=!0}}const wy=ServerVisitor;const Sy=class UrlVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"server-url\"),i}};class Servers extends gp.wE{static primaryClass=\"servers\";constructor(s,i,u){super(s,i,u),this.classes.push(Servers.primaryClass)}}const xy=Servers;class ServersVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new xy}ArrayElement(s){return s.forEach((s=>{const i=sy(s)?[\"document\",\"objects\",\"Server\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const ky=ServersVisitor;class ServerVariableVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Mg,this.specPath=iu([\"document\",\"objects\",\"ServerVariable\"]),this.canSupportSpecificationExtensions=!0}}const Oy=ServerVariableVisitor;class ServerVariables extends gp.Sh{static primaryClass=\"server-variables\";constructor(s,i,u){super(s,i,u),this.classes.push(ServerVariables.primaryClass)}}const Cy=ServerVariables;class VariablesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Cy,this.specPath=iu([\"document\",\"objects\",\"ServerVariable\"])}}const Ay=VariablesVisitor;class media_type_MediaTypeVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new rf,this.specPath=iu([\"document\",\"objects\",\"MediaType\"]),this.canSupportSpecificationExtensions=!0}}const jy=media_type_MediaTypeVisitor;const Py=class AlternatingVisitor_AlternatingVisitor extends oy{alternator;constructor({alternator:s,...i}){super({...i}),this.alternator=s||[]}enter(s){const i=this.alternator.map((({predicate:s,specPath:i})=>Km(s,iu(i),au))),u=ng(i)(s);return this.element=this.toRefractedElement(u,s),Yh}},Iy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Vd||s(_)&&i(\"callback\",_)&&u(\"object\",_))),Ny=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Wd||s(_)&&i(\"components\",_)&&u(\"object\",_))),My=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Kd||s(_)&&i(\"contact\",_)&&u(\"object\",_))),Ty=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Gd||s(_)&&i(\"example\",_)&&u(\"object\",_))),Ry=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Yd||s(_)&&i(\"externalDocumentation\",_)&&u(\"object\",_))),Dy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Xd||s(_)&&i(\"header\",_)&&u(\"object\",_))),Ly=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Qd||s(_)&&i(\"info\",_)&&u(\"object\",_))),By=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Zd||s(_)&&i(\"license\",_)&&u(\"object\",_))),Fy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof ef||s(_)&&i(\"link\",_)&&u(\"object\",_))),qy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof lf||s(_)&&i(\"openapi\",_)&&u(\"string\",_))),$y=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof cf||s(w)&&i(\"openApi3_0\",w)&&u(\"object\",w)&&_(\"api\",w))),Uy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof uf||s(_)&&i(\"operation\",_)&&u(\"object\",_))),zy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof hf||s(_)&&i(\"parameter\",_)&&u(\"object\",_))),Vy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof df||s(_)&&i(\"pathItem\",_)&&u(\"object\",_))),Wy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof mf||s(_)&&i(\"paths\",_)&&u(\"object\",_))),Ky=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gf||s(_)&&i(\"reference\",_)&&u(\"object\",_))),Hy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yf||s(_)&&i(\"requestBody\",_)&&u(\"object\",_))),Jy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bf||s(_)&&i(\"response\",_)&&u(\"object\",_))),Gy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _f||s(_)&&i(\"responses\",_)&&u(\"object\",_))),Yy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kg||s(_)&&i(\"schema\",_)&&u(\"object\",_))),isBooleanJsonSchemaElement=s=>Kp(s)&&s.classes.includes(\"boolean-json-schema\"),Xy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Og||s(_)&&i(\"securityRequirement\",_)&&u(\"object\",_))),Qy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Pg||s(_)&&i(\"securityScheme\",_)&&u(\"object\",_))),Zy=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Ng||s(_)&&i(\"server\",_)&&u(\"object\",_))),ev=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Mg||s(_)&&i(\"serverVariable\",_)&&u(\"object\",_))),tv=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof rf||s(_)&&i(\"mediaType\",_)&&u(\"object\",_))),rv=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof xy||s(w)&&i(\"array\",w)&&u(\"array\",w)&&_(\"servers\",w)));class SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const nv=SchemaVisitor;class ExamplesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"examples\"),this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"],this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),i}}const ov=ExamplesVisitor;class MediaTypeExamples extends gp.Sh{static primaryClass=\"media-type-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(MediaTypeExamples.primaryClass),this.classes.push(\"examples\")}}const sv=MediaTypeExamples;const iv=class ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new sv}};class MediaTypeEncoding extends gp.Sh{static primaryClass=\"media-type-encoding\";constructor(s,i,u){super(s,i,u),this.classes.push(MediaTypeEncoding.primaryClass)}}const av=MediaTypeEncoding;class EncodingVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new av,this.specPath=iu([\"document\",\"objects\",\"Encoding\"])}}const lv=EncodingVisitor;class SecurityRequirementVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Og,this.specPath=iu([\"value\"])}}const cv=SecurityRequirementVisitor;class Security extends gp.wE{static primaryClass=\"security\";constructor(s,i,u){super(s,i,u),this.classes.push(Security.primaryClass)}}const uv=Security;class SecurityVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new uv}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"SecurityRequirement\"],s);this.element.push(i)}else this.element.push(cloneDeep(s))})),this.copyMetaAndAttributes(s,this.element),Yh}}const pv=SecurityVisitor;class ComponentsVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Wd,this.specPath=iu([\"document\",\"objects\",\"Components\"]),this.canSupportSpecificationExtensions=!0}}const hv=ComponentsVisitor;class TagVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new qg,this.specPath=iu([\"document\",\"objects\",\"Tag\"]),this.canSupportSpecificationExtensions=!0}}const dv=TagVisitor;class ReferenceVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new gf,this.specPath=iu([\"document\",\"objects\",\"Reference\"]),this.canSupportSpecificationExtensions=!1}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}const fv=ReferenceVisitor;const mv=class $RefVisitor_$RefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class ParameterVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new hf,this.specPath=iu([\"document\",\"objects\",\"Parameter\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),i}}const gv=ParameterVisitor;class SchemaVisitor_SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const yv=SchemaVisitor_SchemaVisitor;class HeaderVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Xd,this.specPath=iu([\"document\",\"objects\",\"Header\"]),this.canSupportSpecificationExtensions=!0}}const vv=HeaderVisitor;class header_SchemaVisitor_SchemaVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}const bv=header_SchemaVisitor_SchemaVisitor;class HeaderExamples extends gp.Sh{static primaryClass=\"header-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(HeaderExamples.primaryClass),this.classes.push(\"examples\")}}const _v=HeaderExamples;const Ev=class header_ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new _v}};class ContentVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"content\"),this.specPath=iu([\"document\",\"objects\",\"MediaType\"])}}const wv=ContentVisitor;class HeaderContent extends gp.Sh{static primaryClass=\"header-content\";constructor(s,i,u){super(s,i,u),this.classes.push(HeaderContent.primaryClass),this.classes.push(\"content\")}}const Sv=HeaderContent;const xv=class ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new Sv}};class schema_SchemaVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new kg,this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0}}const kv=schema_SchemaVisitor,{allOf:Ov}=lg.visitors.document.objects.JSONSchema.fixedFields,Cv=Ov.compose({methods:{ArrayElement(s){const i=Ov.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{anyOf:Av}=lg.visitors.document.objects.JSONSchema.fixedFields,jv=Av.compose({methods:{ArrayElement(s){const i=Av.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{oneOf:Pv}=lg.visitors.document.objects.JSONSchema.fixedFields,Iv=Pv.compose({methods:{ArrayElement(s){const i=Pv.compose.methods.ArrayElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{items:Nv}=lg.visitors.document.objects.JSONSchema.fixedFields,Mv=Nv.compose({methods:{ObjectElement(s){const i=Nv.compose.methods.ObjectElement.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i},ArrayElement(s){return this.element=cloneDeep(s),Yh}}}),{properties:Tv}=lg.visitors.document.objects.JSONSchema.fixedFields,Rv=Tv.compose({methods:{ObjectElement(s){const i=Tv.compose.methods.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}}),{type:Dv}=lg.visitors.document.objects.JSONSchema.fixedFields,Lv=Dv.compose({methods:{ArrayElement(s){return this.element=cloneDeep(s),Yh}}}),{JSONSchemaOrJSONReferenceVisitor:Bv}=lg.visitors,Fv=Bv.compose({methods:{ObjectElement(s){const i=Bv.compose.methods.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),i}}});class DiscriminatorVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Hd,this.specPath=iu([\"document\",\"objects\",\"Discriminator\"]),this.canSupportSpecificationExtensions=!1}}const qv=DiscriminatorVisitor;class DiscriminatorMapping extends gp.Sh{static primaryClass=\"discriminator-mapping\";constructor(s,i,u){super(s,i,u),this.classes.push(DiscriminatorMapping.primaryClass)}}const $v=DiscriminatorMapping;class MappingVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new $v,this.specPath=iu([\"value\"])}}const Uv=MappingVisitor;class XmlVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new $g,this.specPath=iu([\"document\",\"objects\",\"XML\"]),this.canSupportSpecificationExtensions=!0}}const zv=XmlVisitor;class ParameterExamples extends gp.Sh{static primaryClass=\"parameter-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(ParameterExamples.primaryClass),this.classes.push(\"examples\")}}const Vv=ParameterExamples;const Wv=class parameter_ExamplesVisitor_ExamplesVisitor extends ov{constructor(s){super(s),this.element=new Vv}};class ParameterContent extends gp.Sh{static primaryClass=\"parameter-content\";constructor(s,i,u){super(s,i,u),this.classes.push(ParameterContent.primaryClass),this.classes.push(\"content\")}}const Kv=ParameterContent;const Hv=class parameter_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new Kv}};class ComponentsSchemas extends gp.Sh{static primaryClass=\"components-schemas\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsSchemas.primaryClass)}}const Jv=ComponentsSchemas;class SchemasVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Jv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Schema\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),i}}const Gv=SchemasVisitor;class ComponentsResponses extends gp.Sh{static primaryClass=\"components-responses\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsResponses.primaryClass)}}const Yv=ComponentsResponses;class ResponsesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Yv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Jy).forEach(((s,i)=>{s.setMetaProperty(\"http-status-code\",serializers_value(i))})),i}}const Xv=ResponsesVisitor;class ComponentsParameters extends gp.Sh{static primaryClass=\"components-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsParameters.primaryClass),this.classes.push(\"parameters\")}}const Qv=ComponentsParameters;class ParametersVisitor_ParametersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Qv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"parameter\")})),i}}const Zv=ParametersVisitor_ParametersVisitor;class ComponentsExamples extends gp.Sh{static primaryClass=\"components-examples\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsExamples.primaryClass),this.classes.push(\"examples\")}}const eb=ComponentsExamples;class components_ExamplesVisitor_ExamplesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new eb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),i}}const tb=components_ExamplesVisitor_ExamplesVisitor;class ComponentsRequestBodies extends gp.Sh{static primaryClass=\"components-request-bodies\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsRequestBodies.primaryClass)}}const nb=ComponentsRequestBodies;class RequestBodiesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new nb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"RequestBody\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"requestBody\")})),i}}const pb=RequestBodiesVisitor;class ComponentsHeaders extends gp.Sh{static primaryClass=\"components-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsHeaders.primaryClass)}}const mb=ComponentsHeaders;class HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new mb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const yb=HeadersVisitor;class ComponentsSecuritySchemes extends gp.Sh{static primaryClass=\"components-security-schemes\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsSecuritySchemes.primaryClass)}}const _b=ComponentsSecuritySchemes;class SecuritySchemesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new _b,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"SecurityScheme\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"securityScheme\")})),i}}const wb=SecuritySchemesVisitor;class ComponentsLinks extends gp.Sh{static primaryClass=\"components-links\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsLinks.primaryClass)}}const Sb=ComponentsLinks;class LinksVisitor_LinksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Sb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),i}}const Ob=LinksVisitor_LinksVisitor;class ComponentsCallbacks extends gp.Sh{static primaryClass=\"components-callbacks\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsCallbacks.primaryClass)}}const Ab=ComponentsCallbacks;class CallbacksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Ab,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),i}}const Pb=CallbacksVisitor;class ExampleVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Gd,this.specPath=iu([\"document\",\"objects\",\"Example\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.externalValue)&&this.element.classes.push(\"reference-element\"),i}}const Ib=ExampleVisitor;const Mb=class ExternalValueVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class ExternalDocumentationVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Yd,this.specPath=iu([\"document\",\"objects\",\"ExternalDocumentation\"]),this.canSupportSpecificationExtensions=!0}}const Rb=ExternalDocumentationVisitor;class encoding_EncodingVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Jd,this.specPath=iu([\"document\",\"objects\",\"Encoding\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.headers)&&this.element.headers.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const Lb=encoding_EncodingVisitor;class EncodingHeaders extends gp.Sh{static primaryClass=\"encoding-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(EncodingHeaders.primaryClass)}}const qb=EncodingHeaders;class HeadersVisitor_HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new qb,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,i)=>{if(!Dy(s))return;const u=serializers_value(i);s.setMetaProperty(\"headerName\",u)})),i}}const zb=HeadersVisitor_HeadersVisitor;class PathsVisitor extends(Mixin(vy,ny)){constructor(s){super(s),this.element=new mf,this.specPath=iu([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=es_T}ObjectElement(s){const i=vy.prototype.ObjectElement.call(this,s);return this.element.filter(Vy).forEach(((s,i)=>{i.classes.push(\"openapi-path-template\"),i.classes.push(\"path-template\"),s.setMetaProperty(\"path\",cloneDeep(i))})),i}}const Qb=PathsVisitor;class RequestBodyVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new yf,this.specPath=iu([\"document\",\"objects\",\"RequestBody\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),i}}const e_=RequestBodyVisitor;class RequestBodyContent extends gp.Sh{static primaryClass=\"request-body-content\";constructor(s,i,u){super(s,i,u),this.classes.push(RequestBodyContent.primaryClass),this.classes.push(\"content\")}}const t_=RequestBodyContent;const r_=class request_body_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new t_}};class CallbackVisitor extends(Mixin(vy,ny)){constructor(s){super(s),this.element=new Vd,this.specPath=iu([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=s=>/{(?<expression>[^}]{1,2083})}/.test(String(s))}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Vy).forEach(((s,i)=>{s.setMetaProperty(\"runtime-expression\",serializers_value(i))})),i}}const n_=CallbackVisitor;class ResponseVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new bf,this.specPath=iu([\"document\",\"objects\",\"Response\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return Hp(this.element.contentProp)&&this.element.contentProp.filter(tv).forEach(((s,i)=>{s.setMetaProperty(\"media-type\",serializers_value(i))})),Hp(this.element.headers)&&this.element.headers.filter(Dy).forEach(((s,i)=>{s.setMetaProperty(\"header-name\",serializers_value(i))})),i}}const o_=ResponseVisitor;class ResponseHeaders extends gp.Sh{static primaryClass=\"response-headers\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseHeaders.primaryClass)}}const s_=ResponseHeaders;class response_HeadersVisitor_HeadersVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new s_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,i)=>{if(!Dy(s))return;const u=serializers_value(i);s.setMetaProperty(\"header-name\",u)})),i}}const i_=response_HeadersVisitor_HeadersVisitor;class ResponseContent extends gp.Sh{static primaryClass=\"response-content\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseContent.primaryClass),this.classes.push(\"content\")}}const a_=ResponseContent;const l_=class response_ContentVisitor_ContentVisitor extends wv{constructor(s){super(s),this.element=new a_}};class ResponseLinks extends gp.Sh{static primaryClass=\"response-links\";constructor(s,i,u){super(s,i,u),this.classes.push(ResponseLinks.primaryClass)}}const c_=ResponseLinks;class response_LinksVisitor_LinksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new c_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),i}}const u_=response_LinksVisitor_LinksVisitor;function _isNumber(s){return\"[object Number]\"===Object.prototype.toString.call(s)}var p_=_curry2((function range(s,i){if(!_isNumber(s)||!_isNumber(i))throw new TypeError(\"Both arguments to range must be numbers\");for(var u=[],_=s;_<i;)u.push(_),_+=1;return u}));const h_=p_;function hasOrAdd(s,i,u){var _,w=typeof s;switch(w){case\"string\":case\"number\":return 0===s&&1/s==-1/0?!!u._items[\"-0\"]||(i&&(u._items[\"-0\"]=!0),!1):null!==u._nativeSet?i?(_=u._nativeSet.size,u._nativeSet.add(s),u._nativeSet.size===_):u._nativeSet.has(s):w in u._items?s in u._items[w]||(i&&(u._items[w][s]=!0),!1):(i&&(u._items[w]={},u._items[w][s]=!0),!1);case\"boolean\":if(w in u._items){var x=s?1:0;return!!u._items[w][x]||(i&&(u._items[w][x]=!0),!1)}return i&&(u._items[w]=s?[!1,!0]:[!0,!1]),!1;case\"function\":return null!==u._nativeSet?i?(_=u._nativeSet.size,u._nativeSet.add(s),u._nativeSet.size===_):u._nativeSet.has(s):w in u._items?!!_includes(s,u._items[w])||(i&&u._items[w].push(s),!1):(i&&(u._items[w]=[s]),!1);case\"undefined\":return!!u._items[w]||(i&&(u._items[w]=!0),!1);case\"object\":if(null===s)return!!u._items.null||(i&&(u._items.null=!0),!1);default:return(w=Object.prototype.toString.call(s))in u._items?!!_includes(s,u._items[w])||(i&&u._items[w].push(s),!1):(i&&(u._items[w]=[s]),!1)}}const d_=function(){function _Set(){this._nativeSet=\"function\"==typeof Set?new Set:null,this._items={}}return _Set.prototype.add=function(s){return!hasOrAdd(s,!0,this)},_Set.prototype.has=function(s){return hasOrAdd(s,!1,this)},_Set}();var f_=_curry2((function difference(s,i){for(var u=[],_=0,w=s.length,x=i.length,j=new d_,P=0;P<x;P+=1)j.add(i[P]);for(;_<w;)j.add(s[_])&&(u[u.length]=s[_]),_+=1;return u}));const m_=f_;class MixedFieldsVisitor extends(Mixin(ay,vy)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:s,specPathPatternedFields:i,...u}){super({...u}),this.specPathFixedFields=s,this.specPathPatternedFields=i}ObjectElement(s){const{specPath:i,ignoredFields:u}=this;try{this.specPath=this.specPathFixedFields;const i=this.retrieveFixedFields(this.specPath(s));this.ignoredFields=[...u,...m_(s.keys(),i)],ay.prototype.ObjectElement.call(this,s),this.specPath=this.specPathPatternedFields,this.ignoredFields=i,vy.prototype.ObjectElement.call(this,s)}catch(s){throw this.specPath=i,s}return Yh}}const g_=MixedFieldsVisitor;class responses_ResponsesVisitor extends(Mixin(g_,ny)){constructor(s){super(s),this.element=new _f,this.specPathFixedFields=iu([\"document\",\"objects\",\"Responses\"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"],this.fieldPatternPredicate=s=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${h_(100,600).join(\"|\")})$`).test(String(s))}ObjectElement(s){const i=g_.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Jy).forEach(((s,i)=>{const u=cloneDeep(i);this.fieldPatternPredicate(serializers_value(u))&&s.setMetaProperty(\"http-status-code\",u)})),i}}const y_=responses_ResponsesVisitor;class DefaultVisitor_DefaultVisitor extends(Mixin(Py,ny)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Response\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)?this.element.setMetaProperty(\"referenced-element\",\"response\"):Jy(this.element)&&this.element.setMetaProperty(\"http-status-code\",\"default\"),i}}const v_=DefaultVisitor_DefaultVisitor;class OperationVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new uf,this.specPath=iu([\"document\",\"objects\",\"Operation\"])}}const b_=OperationVisitor;class OperationTags extends gp.wE{static primaryClass=\"operation-tags\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationTags.primaryClass)}}const E_=OperationTags;const w_=class TagsVisitor extends ny{constructor(s){super(s),this.element=new E_}ArrayElement(s){return this.element=this.element.concat(cloneDeep(s)),Yh}};class OperationParameters extends gp.wE{static primaryClass=\"operation-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationParameters.primaryClass),this.classes.push(\"parameters\")}}const S_=OperationParameters;class open_api_3_0_ParametersVisitor_ParametersVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"parameters\")}ArrayElement(s){return s.forEach((s=>{const i=isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"],u=this.toRefractedElement(i,s);Ky(u)&&u.setMetaProperty(\"referenced-element\",\"parameter\"),this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const x_=open_api_3_0_ParametersVisitor_ParametersVisitor;const k_=class operation_ParametersVisitor_ParametersVisitor extends x_{constructor(s){super(s),this.element=new S_}};const O_=class RequestBodyVisitor_RequestBodyVisitor extends Py{constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"RequestBody\"]}]}ObjectElement(s){const i=Py.prototype.enter.call(this,s);return Ky(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"requestBody\"),i}};class OperationCallbacks extends gp.Sh{static primaryClass=\"operation-callbacks\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationCallbacks.primaryClass)}}const C_=OperationCallbacks;class CallbacksVisitor_CallbacksVisitor extends(Mixin(by,ny)){specPath;constructor(s){super(s),this.element=new C_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(Ky).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),i}}const A_=CallbacksVisitor_CallbacksVisitor;class OperationSecurity extends gp.wE{static primaryClass=\"operation-security\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationSecurity.primaryClass),this.classes.push(\"security\")}}const j_=OperationSecurity;class SecurityVisitor_SecurityVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new j_}ArrayElement(s){return s.forEach((s=>{const i=Hp(s)?[\"document\",\"objects\",\"SecurityRequirement\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const P_=SecurityVisitor_SecurityVisitor;class OperationServers extends gp.wE{static primaryClass=\"operation-servers\";constructor(s,i,u){super(s,i,u),this.classes.push(OperationServers.primaryClass),this.classes.push(\"servers\")}}const I_=OperationServers;const N_=class ServersVisitor_ServersVisitor extends ky{constructor(s){super(s),this.element=new I_}};class PathItemVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new df,this.specPath=iu([\"document\",\"objects\",\"PathItem\"])}ObjectElement(s){const i=ay.prototype.ObjectElement.call(this,s);return this.element.filter(Uy).forEach(((s,i)=>{const u=cloneDeep(i);u.content=serializers_value(u).toUpperCase(),s.setMetaProperty(\"http-method\",u)})),zp(this.element.$ref)&&this.element.classes.push(\"reference-element\"),i}}const M_=PathItemVisitor;const T_=class path_item_$RefVisitor_$RefVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class PathItemServers extends gp.wE{static primaryClass=\"path-item-servers\";constructor(s,i,u){super(s,i,u),this.classes.push(PathItemServers.primaryClass),this.classes.push(\"servers\")}}const R_=PathItemServers;const D_=class path_item_ServersVisitor_ServersVisitor extends ky{constructor(s){super(s),this.element=new R_}};class PathItemParameters extends gp.wE{static primaryClass=\"path-item-parameters\";constructor(s,i,u){super(s,i,u),this.classes.push(PathItemParameters.primaryClass),this.classes.push(\"parameters\")}}const L_=PathItemParameters;const B_=class path_item_ParametersVisitor_ParametersVisitor extends x_{constructor(s){super(s),this.element=new L_}};class SecuritySchemeVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new Pg,this.specPath=iu([\"document\",\"objects\",\"SecurityScheme\"]),this.canSupportSpecificationExtensions=!0}}const F_=SecuritySchemeVisitor;class OAuthFlowsVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new af,this.specPath=iu([\"document\",\"objects\",\"OAuthFlows\"]),this.canSupportSpecificationExtensions=!0}}const q_=OAuthFlowsVisitor;class OAuthFlowVisitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new of,this.specPath=iu([\"document\",\"objects\",\"OAuthFlow\"]),this.canSupportSpecificationExtensions=!0}}const $_=OAuthFlowVisitor;class OAuthFlowScopes extends gp.Sh{static primaryClass=\"oauth-flow-scopes\";constructor(s,i,u){super(s,i,u),this.classes.push(OAuthFlowScopes.primaryClass)}}const U_=OAuthFlowScopes;class ScopesVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new U_,this.specPath=iu([\"value\"])}}const z_=ScopesVisitor;class Tags extends gp.wE{static primaryClass=\"tags\";constructor(s,i,u){super(s,i,u),this.classes.push(Tags.primaryClass)}}const V_=Tags;class TagsVisitor_TagsVisitor extends(Mixin(oy,ny)){constructor(s){super(s),this.element=new V_}ArrayElement(s){return s.forEach((s=>{const i=iy(s)?[\"document\",\"objects\",\"Tag\"]:[\"value\"],u=this.toRefractedElement(i,s);this.element.push(u)})),this.copyMetaAndAttributes(s,this.element),Yh}}const W_=TagsVisitor_TagsVisitor,{fixedFields:K_}=lg.visitors.document.objects.JSONSchema,H_={visitors:{value:ny,document:{objects:{OpenApi:{$visitor:ly,fixedFields:{openapi:cy,info:{$ref:\"#/visitors/document/objects/Info\"},servers:ky,paths:{$ref:\"#/visitors/document/objects/Paths\"},components:{$ref:\"#/visitors/document/objects/Components\"},security:pv,tags:W_,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:py,fixedFields:{title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},termsOfService:{$ref:\"#/visitors/value\"},contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:hy}},Contact:{$visitor:dy,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"},email:{$ref:\"#/visitors/value\"}}},License:{$visitor:fy,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Server:{$visitor:wy,fixedFields:{url:Sy,description:{$ref:\"#/visitors/value\"},variables:Ay}},ServerVariable:{$visitor:Oy,fixedFields:{enum:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Components:{$visitor:hv,fixedFields:{schemas:Gv,responses:Xv,parameters:Zv,examples:tb,requestBodies:pb,headers:yb,securitySchemes:wb,links:Ob,callbacks:Pb}},Paths:{$visitor:Qb},PathItem:{$visitor:M_,fixedFields:{$ref:T_,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:D_,parameters:B_}},Operation:{$visitor:b_,fixedFields:{tags:w_,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:{$ref:\"#/visitors/value\"},parameters:k_,requestBody:O_,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:A_,deprecated:{$ref:\"#/visitors/value\"},security:P_,servers:N_}},ExternalDocumentation:{$visitor:Rb,fixedFields:{description:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Parameter:{$visitor:gv,fixedFields:{name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:yv,example:{$ref:\"#/visitors/value\"},examples:Wv,content:Hv}},RequestBody:{$visitor:e_,fixedFields:{description:{$ref:\"#/visitors/value\"},content:r_,required:{$ref:\"#/visitors/value\"}}},MediaType:{$visitor:jy,fixedFields:{schema:nv,example:{$ref:\"#/visitors/value\"},examples:iv,encoding:lv}},Encoding:{$visitor:Lb,fixedFields:{contentType:{$ref:\"#/visitors/value\"},headers:zb,style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"}}},Responses:{$visitor:y_,fixedFields:{default:v_}},Response:{$visitor:o_,fixedFields:{description:{$ref:\"#/visitors/value\"},headers:i_,content:l_,links:u_}},Callback:{$visitor:n_},Example:{$visitor:Ib,fixedFields:{summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},value:{$ref:\"#/visitors/value\"},externalValue:Mb}},Link:{$visitor:my,fixedFields:{operationRef:gy,operationId:yy,parameters:Ey,requestBody:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:vv,fixedFields:{description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:bv,example:{$ref:\"#/visitors/value\"},examples:Ev,content:xv}},Tag:{$visitor:dv,fixedFields:{name:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:fv,fixedFields:{$ref:mv}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},JSONReference:{$ref:\"#/visitors/document/objects/Reference\"},Schema:{$visitor:kv,fixedFields:{title:K_.title,multipleOf:K_.multipleOf,maximum:K_.maximum,exclusiveMaximum:K_.exclusiveMaximum,minimum:K_.minimum,exclusiveMinimum:K_.exclusiveMinimum,maxLength:K_.maxLength,minLength:K_.minLength,pattern:K_.pattern,maxItems:K_.maxItems,minItems:K_.minItems,uniqueItems:K_.uniqueItems,maxProperties:K_.maxProperties,minProperties:K_.minProperties,required:K_.required,enum:K_.enum,type:Lv,allOf:Cv,anyOf:jv,oneOf:Iv,not:Fv,items:Mv,properties:Rv,additionalProperties:Fv,description:K_.description,format:K_.format,default:K_.default,nullable:{$ref:\"#/visitors/value\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},writeOnly:{$ref:\"#/visitors/value\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:qv,fixedFields:{propertyName:{$ref:\"#/visitors/value\"},mapping:Uv}},XML:{$visitor:zv,fixedFields:{name:{$ref:\"#/visitors/value\"},namespace:{$ref:\"#/visitors/value\"},prefix:{$ref:\"#/visitors/value\"},attribute:{$ref:\"#/visitors/value\"},wrapped:{$ref:\"#/visitors/value\"}}},SecurityScheme:{$visitor:F_,fixedFields:{type:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},scheme:{$ref:\"#/visitors/value\"},bearerFormat:{$ref:\"#/visitors/value\"},flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:{$ref:\"#/visitors/value\"}}},OAuthFlows:{$visitor:q_,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:$_,fixedFields:{authorizationUrl:{$ref:\"#/visitors/value\"},tokenUrl:{$ref:\"#/visitors/value\"},refreshUrl:{$ref:\"#/visitors/value\"},scopes:z_}},SecurityRequirement:{$visitor:cv}},extension:{$visitor:uy}}}},es_traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},J_={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_0Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...id},G_={namespace:s=>{const{base:i}=s;return i.register(\"callback\",Vd),i.register(\"components\",Wd),i.register(\"contact\",Kd),i.register(\"discriminator\",Hd),i.register(\"encoding\",Jd),i.register(\"example\",Gd),i.register(\"externalDocumentation\",Yd),i.register(\"header\",Xd),i.register(\"info\",Qd),i.register(\"license\",Zd),i.register(\"link\",ef),i.register(\"mediaType\",rf),i.register(\"oAuthFlow\",of),i.register(\"oAuthFlows\",af),i.register(\"openapi\",lf),i.register(\"openApi3_0\",cf),i.register(\"operation\",uf),i.register(\"parameter\",hf),i.register(\"pathItem\",df),i.register(\"paths\",mf),i.register(\"reference\",gf),i.register(\"requestBody\",yf),i.register(\"response\",bf),i.register(\"responses\",_f),i.register(\"schema\",kg),i.register(\"securityRequirement\",Og),i.register(\"securityScheme\",Pg),i.register(\"server\",Ng),i.register(\"serverVariable\",Mg),i.register(\"tag\",qg),i.register(\"xml\",$g),i}},Y_=G_,es_refractor_toolbox=()=>{const s=createNamespace(Y_);return{predicates:{...ye,isElement:Up,isStringElement:zp,isArrayElement:Jp,isObjectElement:Hp,isMemberElement:Gp,includesClasses,hasElementSourceMap},namespace:s}},es_refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:u=[]}={})=>{const _=(0,gp.e)(s),w=dereference(H_),x=new(Il(i,w))({specObj:w});return visitor_visit(_,x),dispatchPlugins(x.element,u,{toolboxCreator:es_refractor_toolbox,visitorOptions:{keyMap:J_,nodeTypeGetter:es_traversal_visitor_getNodeType}})},es_refractor_createRefractor=s=>(i,u={})=>es_refractor_refract(i,{specPath:s,...u});Vd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Wd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Kd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),Gd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Hd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Jd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),Yd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),Xd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),Qd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),Zd.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),ef.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),rf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),of.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),af.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),lf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),cf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),uf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),hf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),df.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),mf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),gf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),yf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),bf.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),_f.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),kg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),Og.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),Pg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),Ng.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),Mg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),qg.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),$g.refract=es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const X_=class Callback_Callback extends Vd{};const Q_=class Components_Components extends Wd{get pathItems(){return this.get(\"pathItems\")}set pathItems(s){this.set(\"pathItems\",s)}};const Z_=class Contact_Contact extends Kd{};const eE=class Discriminator_Discriminator extends Hd{};const tE=class Encoding_Encoding extends Jd{};const rE=class Example_Example extends Gd{};const nE=class ExternalDocumentation_ExternalDocumentation extends Yd{};const oE=class Header_Header extends Xd{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const sE=class Info_Info extends Qd{get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}};class JsonSchemaDialect extends gp.Om{static default=new JsonSchemaDialect(\"https://spec.openapis.org/oas/3.1/dialect/base\");constructor(s,i,u){super(s,i,u),this.element=\"jsonSchemaDialect\"}}const iE=JsonSchemaDialect;const aE=class License_License extends Zd{get identifier(){return this.get(\"identifier\")}set identifier(s){this.set(\"identifier\",s)}};const lE=class Link_Link extends ef{};const cE=class MediaType_MediaType extends rf{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const uE=class OAuthFlow_OAuthFlow extends of{};const pE=class OAuthFlows_OAuthFlows extends af{};const hE=class Openapi_Openapi extends lf{};class OpenApi3_1 extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"openApi3_1\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get jsonSchemaDialect(){return this.get(\"jsonSchemaDialect\")}set jsonSchemaDialect(s){this.set(\"jsonSchemaDialect\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get webhooks(){return this.get(\"webhooks\")}set webhooks(s){this.set(\"webhooks\",s)}}const dE=OpenApi3_1;const fE=class Operation_Operation extends uf{get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}};const mE=class Parameter_Parameter extends hf{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const gE=class PathItem_PathItem extends df{get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}};const yE=class Paths_Paths extends mf{};class Reference_Reference extends gf{}Object.defineProperty(Reference_Reference.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0}),Object.defineProperty(Reference_Reference.prototype,\"summary\",{get(){return this.get(\"summary\")},set(s){this.set(\"summary\",s)},enumerable:!0});const vE=Reference_Reference;const bE=class RequestBody_RequestBody extends yf{};const _E=class elements_Response_Response extends bf{};const EE=class Responses_Responses extends _f{};class elements_Schema_Schema extends gp.Sh{constructor(s,i,u){super(s,i,u),this.element=\"schema\"}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get $vocabulary(){return this.get(\"$vocabulary\")}set $vocabulary(s){this.set(\"$vocabulary\",s)}get $id(){return this.get(\"$id\")}set $id(s){this.set(\"$id\",s)}get $anchor(){return this.get(\"$anchor\")}set $anchor(s){this.set(\"$anchor\",s)}get $dynamicAnchor(){return this.get(\"$dynamicAnchor\")}set $dynamicAnchor(s){this.set(\"$dynamicAnchor\",s)}get $dynamicRef(){return this.get(\"$dynamicRef\")}set $dynamicRef(s){this.set(\"$dynamicRef\",s)}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get $defs(){return this.get(\"$defs\")}set $defs(s){this.set(\"$defs\",s)}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get dependentSchemas(){return this.get(\"dependentSchemas\")}set dependentSchemas(s){this.set(\"dependentSchemas\",s)}get prefixItems(){return this.get(\"prefixItems\")}set prefixItems(s){this.set(\"prefixItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get unevaluatedItems(){return this.get(\"unevaluatedItems\")}set unevaluatedItems(s){this.set(\"unevaluatedItems\",s)}get unevaluatedProperties(){return this.get(\"unevaluatedProperties\")}set unevaluatedProperties(s){this.set(\"unevaluatedProperties\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get const(){return this.get(\"const\")}set const(s){this.set(\"const\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxContains(){return this.get(\"maxContains\")}set maxContains(s){this.set(\"maxContains\",s)}get minContains(){return this.get(\"minContains\")}set minContains(s){this.set(\"minContains\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get dependentRequired(){return this.get(\"dependentRequired\")}set dependentRequired(s){this.set(\"dependentRequired\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get contentEncoding(){return this.get(\"contentEncoding\")}set contentEncoding(s){this.set(\"contentEncoding\",s)}get contentMediaType(){return this.get(\"contentMediaType\")}set contentMediaType(s){this.set(\"contentMediaType\",s)}get contentSchema(){return this.get(\"contentSchema\")}set contentSchema(s){this.set(\"contentSchema\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}}const wE=elements_Schema_Schema;const SE=class SecurityRequirement_SecurityRequirement extends Og{};const xE=class SecurityScheme_SecurityScheme extends Pg{};const kE=class Server_Server extends Ng{};const OE=class ServerVariable_ServerVariable extends Mg{};const CE=class Tag_Tag extends qg{};const AE=class Xml_Xml extends $g{};class OpenApi3_1Visitor extends(Mixin(ay,ny)){constructor(s){super(s),this.element=new dE,this.specPath=iu([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(s){return this.openApiGenericElement=s,ay.prototype.ObjectElement.call(this,s)}}const jE=OpenApi3_1Visitor,{visitors:{document:{objects:{Info:{$visitor:PE}}}}}=H_;const IE=class info_InfoVisitor extends PE{constructor(s){super(s),this.element=new sE}},{visitors:{document:{objects:{Contact:{$visitor:NE}}}}}=H_;const ME=class contact_ContactVisitor extends NE{constructor(s){super(s),this.element=new Z_}},{visitors:{document:{objects:{License:{$visitor:TE}}}}}=H_;const RE=class license_LicenseVisitor extends TE{constructor(s){super(s),this.element=new aE}},{visitors:{document:{objects:{Link:{$visitor:DE}}}}}=H_;const LE=class link_LinkVisitor extends DE{constructor(s){super(s),this.element=new lE}};class JsonSchemaDialectVisitor extends(Mixin(oy,ny)){StringElement(s){const i=new iE(serializers_value(s));return this.copyMetaAndAttributes(s,i),this.element=i,Yh}}const BE=JsonSchemaDialectVisitor,{visitors:{document:{objects:{Server:{$visitor:FE}}}}}=H_;const qE=class server_ServerVisitor extends FE{constructor(s){super(s),this.element=new kE}},{visitors:{document:{objects:{ServerVariable:{$visitor:$E}}}}}=H_;const UE=class server_variable_ServerVariableVisitor extends $E{constructor(s){super(s),this.element=new OE}},{visitors:{document:{objects:{MediaType:{$visitor:zE}}}}}=H_;const VE=class open_api_3_1_media_type_MediaTypeVisitor extends zE{constructor(s){super(s),this.element=new cE}},{visitors:{document:{objects:{SecurityRequirement:{$visitor:WE}}}}}=H_;const KE=class security_requirement_SecurityRequirementVisitor extends WE{constructor(s){super(s),this.element=new SE}},{visitors:{document:{objects:{Components:{$visitor:HE}}}}}=H_;const JE=class components_ComponentsVisitor extends HE{constructor(s){super(s),this.element=new Q_}},{visitors:{document:{objects:{Tag:{$visitor:GE}}}}}=H_;const YE=class tag_TagVisitor extends GE{constructor(s){super(s),this.element=new CE}},{visitors:{document:{objects:{Reference:{$visitor:XE}}}}}=H_;const QE=class reference_ReferenceVisitor extends XE{constructor(s){super(s),this.element=new vE}},{visitors:{document:{objects:{Parameter:{$visitor:ZE}}}}}=H_;const ew=class parameter_ParameterVisitor extends ZE{constructor(s){super(s),this.element=new mE}},{visitors:{document:{objects:{Header:{$visitor:tw}}}}}=H_;const rw=class header_HeaderVisitor extends tw{constructor(s){super(s),this.element=new oE}},nw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof X_||s(_)&&i(\"callback\",_)&&u(\"object\",_))),ow=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Q_||s(_)&&i(\"components\",_)&&u(\"object\",_))),sw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof Z_||s(_)&&i(\"contact\",_)&&u(\"object\",_))),iw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof rE||s(_)&&i(\"example\",_)&&u(\"object\",_))),aw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof nE||s(_)&&i(\"externalDocumentation\",_)&&u(\"object\",_))),lw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof oE||s(_)&&i(\"header\",_)&&u(\"object\",_))),cw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof sE||s(_)&&i(\"info\",_)&&u(\"object\",_))),uw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof iE||s(_)&&i(\"jsonSchemaDialect\",_)&&u(\"string\",_))),pw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof aE||s(_)&&i(\"license\",_)&&u(\"object\",_))),hw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof lE||s(_)&&i(\"link\",_)&&u(\"object\",_))),dw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof hE||s(_)&&i(\"openapi\",_)&&u(\"string\",_))),fw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u,hasClass:_})=>w=>w instanceof dE||s(w)&&i(\"openApi3_1\",w)&&u(\"object\",w)&&_(\"api\",w))),mw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof fE||s(_)&&i(\"operation\",_)&&u(\"object\",_))),gw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof mE||s(_)&&i(\"parameter\",_)&&u(\"object\",_))),yw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof gE||s(_)&&i(\"pathItem\",_)&&u(\"object\",_))),isPathItemElementExternal=s=>{if(!yw(s))return!1;if(!zp(s.$ref))return!1;const i=serializers_value(s.$ref);return\"string\"==typeof i&&i.length>0&&!i.startsWith(\"#\")},vw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof yE||s(_)&&i(\"paths\",_)&&u(\"object\",_))),bw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof vE||s(_)&&i(\"reference\",_)&&u(\"object\",_))),isReferenceElementExternal=s=>{if(!bw(s))return!1;if(!zp(s.$ref))return!1;const i=serializers_value(s.$ref);return\"string\"==typeof i&&i.length>0&&!i.startsWith(\"#\")},_w=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof bE||s(_)&&i(\"requestBody\",_)&&u(\"object\",_))),Ew=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof _E||s(_)&&i(\"response\",_)&&u(\"object\",_))),ww=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof EE||s(_)&&i(\"responses\",_)&&u(\"object\",_))),Sw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof wE||s(_)&&i(\"schema\",_)&&u(\"object\",_))),predicates_isBooleanJsonSchemaElement=s=>Kp(s)&&s.classes.includes(\"boolean-json-schema\"),xw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof SE||s(_)&&i(\"securityRequirement\",_)&&u(\"object\",_))),kw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof xE||s(_)&&i(\"securityScheme\",_)&&u(\"object\",_))),Ow=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof kE||s(_)&&i(\"server\",_)&&u(\"object\",_))),Cw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof OE||s(_)&&i(\"serverVariable\",_)&&u(\"object\",_))),Aw=helpers((({hasBasicElementProps:s,isElementType:i,primitiveEq:u})=>_=>_ instanceof cE||s(_)&&i(\"mediaType\",_)&&u(\"object\",_)));const jw=class ParentSchemaAwareVisitor_ParentSchemaAwareVisitor{parent;constructor({parent:s}){this.parent=s}};class open_api_3_1_schema_SchemaVisitor extends(Mixin(ay,jw,ny)){constructor(s){super(s),this.element=new wE,this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=iE.default,this.passingOptionsNames.push(\"parent\")}ObjectElement(s){this.handle$schema(s),this.handle$id(s),this.parent=this.element;const i=ay.prototype.ObjectElement.call(this,s);return zp(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),i}BooleanElement(s){const i=super.enter(s);return this.element.classes.push(\"boolean-json-schema\"),i}getJsonSchemaDialect(){let s;return s=void 0!==this.openApiSemanticElement&&uw(this.openApiSemanticElement.jsonSchemaDialect)?serializers_value(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&zp(this.openApiGenericElement.get(\"jsonSchemaDialect\"))?serializers_value(this.openApiGenericElement.get(\"jsonSchemaDialect\")):serializers_value(this.jsonSchemaDefaultDialect),s}handle$schema(s){if(lu(this.parent)&&!zp(s.get(\"$schema\")))this.element.setMetaProperty(\"inherited$schema\",this.getJsonSchemaDialect());else if(Sw(this.parent)&&!zp(s.get(\"$schema\"))){const s=gc(serializers_value(this.parent.meta.get(\"inherited$schema\")),serializers_value(this.parent.$schema));this.element.setMetaProperty(\"inherited$schema\",s)}}handle$id(s){const i=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty(\"inherited$id\",[])):new gp.wE,u=serializers_value(s.get(\"$id\"));km(u)&&i.push(u),this.element.setMetaProperty(\"inherited$id\",i)}}const Pw=open_api_3_1_schema_SchemaVisitor;const Iw=class $vocabularyVisitor extends ny{ObjectElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-$vocabulary\"),i}};const Nw=class $refVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"reference-value\"),i}};class $defsVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-$defs\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Mw=$defsVisitor;class schema_AllOfVisitor_AllOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-allOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Tw=schema_AllOfVisitor_AllOfVisitor;class schema_AnyOfVisitor_AnyOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-anyOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Rw=schema_AnyOfVisitor_AnyOfVisitor;class schema_OneOfVisitor_OneOfVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-oneOf\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Dw=schema_OneOfVisitor_OneOfVisitor;class DependentSchemasVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-dependentSchemas\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Lw=DependentSchemasVisitor;class PrefixItemsVisitor extends(Mixin(oy,jw,ny)){constructor(s){super(s),this.element=new gp.wE,this.element.classes.push(\"json-schema-prefixItems\"),this.passingOptionsNames.push(\"parent\")}ArrayElement(s){return s.forEach((s=>{if(Hp(s)){const i=this.toRefractedElement([\"document\",\"objects\",\"Schema\"],s);this.element.push(i)}else{const i=cloneDeep(s);this.element.push(i)}})),this.copyMetaAndAttributes(s,this.element),Yh}}const Bw=PrefixItemsVisitor;class schema_PropertiesVisitor_PropertiesVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const Fw=schema_PropertiesVisitor_PropertiesVisitor;class PatternPropertiesVisitor_PatternPropertiesVisitor extends(Mixin(by,jw,ny)){constructor(s){super(s),this.element=new gp.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=iu([\"document\",\"objects\",\"Schema\"]),this.passingOptionsNames.push(\"parent\")}}const qw=PatternPropertiesVisitor_PatternPropertiesVisitor;const $w=class schema_TypeVisitor_TypeVisitor extends ny{StringElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-type\"),i}ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-type\"),i}};const Uw=class EnumVisitor_EnumVisitor extends ny{ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-enum\"),i}};const zw=class DependentRequiredVisitor extends ny{ObjectElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-dependentRequired\"),i}};const Vw=class schema_ExamplesVisitor_ExamplesVisitor extends ny{ArrayElement(s){const i=super.enter(s);return this.element.classes.push(\"json-schema-examples\"),i}},{visitors:{document:{objects:{Discriminator:{$visitor:Ww}}}}}=H_;const Kw=class distriminator_DiscriminatorVisitor extends Ww{constructor(s){super(s),this.element=new eE,this.canSupportSpecificationExtensions=!0}},{visitors:{document:{objects:{XML:{$visitor:Hw}}}}}=H_;const Jw=class xml_XmlVisitor extends Hw{constructor(s){super(s),this.element=new AE}};class SchemasVisitor_SchemasVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Jv,this.specPath=iu([\"document\",\"objects\",\"Schema\"])}}const Gw=SchemasVisitor_SchemasVisitor;class ComponentsPathItems extends gp.Sh{static primaryClass=\"components-path-items\";constructor(s,i,u){super(s,i,u),this.classes.push(ComponentsPathItems.primaryClass)}}const Yw=ComponentsPathItems;class PathItemsVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new Yw,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),i}}const Xw=PathItemsVisitor,{visitors:{document:{objects:{Example:{$visitor:Qw}}}}}=H_;const Zw=class example_ExampleVisitor extends Qw{constructor(s){super(s),this.element=new rE}},{visitors:{document:{objects:{ExternalDocumentation:{$visitor:eS}}}}}=H_;const tS=class external_documentation_ExternalDocumentationVisitor extends eS{constructor(s){super(s),this.element=new nE}},{visitors:{document:{objects:{Encoding:{$visitor:rS}}}}}=H_;const nS=class open_api_3_1_encoding_EncodingVisitor extends rS{constructor(s){super(s),this.element=new tE}},{visitors:{document:{objects:{Paths:{$visitor:oS}}}}}=H_;const sS=class paths_PathsVisitor extends oS{constructor(s){super(s),this.element=new yE}},{visitors:{document:{objects:{RequestBody:{$visitor:iS}}}}}=H_;const aS=class request_body_RequestBodyVisitor extends iS{constructor(s){super(s),this.element=new bE}},{visitors:{document:{objects:{Callback:{$visitor:lS}}}}}=H_;const cS=class callback_CallbackVisitor extends lS{constructor(s){super(s),this.element=new X_,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=lS.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),i}},{visitors:{document:{objects:{Response:{$visitor:uS}}}}}=H_;const pS=class response_ResponseVisitor extends uS{constructor(s){super(s),this.element=new _E}},{visitors:{document:{objects:{Responses:{$visitor:hS}}}}}=H_;const dS=class open_api_3_1_responses_ResponsesVisitor extends hS{constructor(s){super(s),this.element=new EE}},{visitors:{document:{objects:{Operation:{$visitor:fS}}}}}=H_;const mS=class operation_OperationVisitor extends fS{constructor(s){super(s),this.element=new fE}},{visitors:{document:{objects:{PathItem:{$visitor:gS}}}}}=H_;const yS=class path_item_PathItemVisitor extends gS{constructor(s){super(s),this.element=new gE}},{visitors:{document:{objects:{SecurityScheme:{$visitor:vS}}}}}=H_;const bS=class security_scheme_SecuritySchemeVisitor extends vS{constructor(s){super(s),this.element=new xE}},{visitors:{document:{objects:{OAuthFlows:{$visitor:_S}}}}}=H_;const ES=class oauth_flows_OAuthFlowsVisitor extends _S{constructor(s){super(s),this.element=new pE}},{visitors:{document:{objects:{OAuthFlow:{$visitor:wS}}}}}=H_;const SS=class oauth_flow_OAuthFlowVisitor extends wS{constructor(s){super(s),this.element=new uE}};class Webhooks extends gp.Sh{static primaryClass=\"webhooks\";constructor(s,i,u){super(s,i,u),this.classes.push(Webhooks.primaryClass)}}const xS=Webhooks;class WebhooksVisitor extends(Mixin(by,ny)){constructor(s){super(s),this.element=new xS,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const i=by.prototype.ObjectElement.call(this,s);return this.element.filter(bw).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),this.element.filter(yw).forEach(((s,i)=>{s.setMetaProperty(\"webhook-name\",serializers_value(i))})),i}}const kS=WebhooksVisitor,OS={visitors:{value:H_.visitors.value,document:{objects:{OpenApi:{$visitor:jE,fixedFields:{openapi:H_.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:\"#/visitors/document/objects/Info\"},jsonSchemaDialect:BE,servers:H_.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:\"#/visitors/document/objects/Paths\"},webhooks:kS,components:{$ref:\"#/visitors/document/objects/Components\"},security:H_.visitors.document.objects.OpenApi.fixedFields.security,tags:H_.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:IE,fixedFields:{title:H_.visitors.document.objects.Info.fixedFields.title,description:H_.visitors.document.objects.Info.fixedFields.description,summary:{$ref:\"#/visitors/value\"},termsOfService:H_.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:H_.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:ME,fixedFields:{name:H_.visitors.document.objects.Contact.fixedFields.name,url:H_.visitors.document.objects.Contact.fixedFields.url,email:H_.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:RE,fixedFields:{name:H_.visitors.document.objects.License.fixedFields.name,identifier:{$ref:\"#/visitors/value\"},url:H_.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:qE,fixedFields:{url:H_.visitors.document.objects.Server.fixedFields.url,description:H_.visitors.document.objects.Server.fixedFields.description,variables:H_.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:UE,fixedFields:{enum:H_.visitors.document.objects.ServerVariable.fixedFields.enum,default:H_.visitors.document.objects.ServerVariable.fixedFields.default,description:H_.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:JE,fixedFields:{schemas:Gw,responses:H_.visitors.document.objects.Components.fixedFields.responses,parameters:H_.visitors.document.objects.Components.fixedFields.parameters,examples:H_.visitors.document.objects.Components.fixedFields.examples,requestBodies:H_.visitors.document.objects.Components.fixedFields.requestBodies,headers:H_.visitors.document.objects.Components.fixedFields.headers,securitySchemes:H_.visitors.document.objects.Components.fixedFields.securitySchemes,links:H_.visitors.document.objects.Components.fixedFields.links,callbacks:H_.visitors.document.objects.Components.fixedFields.callbacks,pathItems:Xw}},Paths:{$visitor:sS},PathItem:{$visitor:yS,fixedFields:{$ref:H_.visitors.document.objects.PathItem.fixedFields.$ref,summary:H_.visitors.document.objects.PathItem.fixedFields.summary,description:H_.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:H_.visitors.document.objects.PathItem.fixedFields.servers,parameters:H_.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:mS,fixedFields:{tags:H_.visitors.document.objects.Operation.fixedFields.tags,summary:H_.visitors.document.objects.Operation.fixedFields.summary,description:H_.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:H_.visitors.document.objects.Operation.fixedFields.operationId,parameters:H_.visitors.document.objects.Operation.fixedFields.parameters,requestBody:H_.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:H_.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:H_.visitors.document.objects.Operation.fixedFields.deprecated,security:H_.visitors.document.objects.Operation.fixedFields.security,servers:H_.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:tS,fixedFields:{description:H_.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:H_.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:ew,fixedFields:{name:H_.visitors.document.objects.Parameter.fixedFields.name,in:H_.visitors.document.objects.Parameter.fixedFields.in,description:H_.visitors.document.objects.Parameter.fixedFields.description,required:H_.visitors.document.objects.Parameter.fixedFields.required,deprecated:H_.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:H_.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:H_.visitors.document.objects.Parameter.fixedFields.style,explode:H_.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:H_.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.Parameter.fixedFields.example,examples:H_.visitors.document.objects.Parameter.fixedFields.examples,content:H_.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:aS,fixedFields:{description:H_.visitors.document.objects.RequestBody.fixedFields.description,content:H_.visitors.document.objects.RequestBody.fixedFields.content,required:H_.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:VE,fixedFields:{schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.MediaType.fixedFields.example,examples:H_.visitors.document.objects.MediaType.fixedFields.examples,encoding:H_.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:nS,fixedFields:{contentType:H_.visitors.document.objects.Encoding.fixedFields.contentType,headers:H_.visitors.document.objects.Encoding.fixedFields.headers,style:H_.visitors.document.objects.Encoding.fixedFields.style,explode:H_.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:H_.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:dS,fixedFields:{default:H_.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:pS,fixedFields:{description:H_.visitors.document.objects.Response.fixedFields.description,headers:H_.visitors.document.objects.Response.fixedFields.headers,content:H_.visitors.document.objects.Response.fixedFields.content,links:H_.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:cS},Example:{$visitor:Zw,fixedFields:{summary:H_.visitors.document.objects.Example.fixedFields.summary,description:H_.visitors.document.objects.Example.fixedFields.description,value:H_.visitors.document.objects.Example.fixedFields.value,externalValue:H_.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:LE,fixedFields:{operationRef:H_.visitors.document.objects.Link.fixedFields.operationRef,operationId:H_.visitors.document.objects.Link.fixedFields.operationId,parameters:H_.visitors.document.objects.Link.fixedFields.parameters,requestBody:H_.visitors.document.objects.Link.fixedFields.requestBody,description:H_.visitors.document.objects.Link.fixedFields.description,server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:rw,fixedFields:{description:H_.visitors.document.objects.Header.fixedFields.description,required:H_.visitors.document.objects.Header.fixedFields.required,deprecated:H_.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:H_.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:H_.visitors.document.objects.Header.fixedFields.style,explode:H_.visitors.document.objects.Header.fixedFields.explode,allowReserved:H_.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:H_.visitors.document.objects.Header.fixedFields.example,examples:H_.visitors.document.objects.Header.fixedFields.examples,content:H_.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:YE,fixedFields:{name:H_.visitors.document.objects.Tag.fixedFields.name,description:H_.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:QE,fixedFields:{$ref:H_.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Schema:{$visitor:Pw,fixedFields:{$schema:{$ref:\"#/visitors/value\"},$vocabulary:Iw,$id:{$ref:\"#/visitors/value\"},$anchor:{$ref:\"#/visitors/value\"},$dynamicAnchor:{$ref:\"#/visitors/value\"},$dynamicRef:{$ref:\"#/visitors/value\"},$ref:Nw,$defs:Mw,$comment:{$ref:\"#/visitors/value\"},allOf:Tw,anyOf:Rw,oneOf:Dw,not:{$ref:\"#/visitors/document/objects/Schema\"},if:{$ref:\"#/visitors/document/objects/Schema\"},then:{$ref:\"#/visitors/document/objects/Schema\"},else:{$ref:\"#/visitors/document/objects/Schema\"},dependentSchemas:Lw,prefixItems:Bw,items:{$ref:\"#/visitors/document/objects/Schema\"},contains:{$ref:\"#/visitors/document/objects/Schema\"},properties:Fw,patternProperties:qw,additionalProperties:{$ref:\"#/visitors/document/objects/Schema\"},propertyNames:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedItems:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedProperties:{$ref:\"#/visitors/document/objects/Schema\"},type:$w,enum:Uw,const:{$ref:\"#/visitors/value\"},multipleOf:{$ref:\"#/visitors/value\"},maximum:{$ref:\"#/visitors/value\"},exclusiveMaximum:{$ref:\"#/visitors/value\"},minimum:{$ref:\"#/visitors/value\"},exclusiveMinimum:{$ref:\"#/visitors/value\"},maxLength:{$ref:\"#/visitors/value\"},minLength:{$ref:\"#/visitors/value\"},pattern:{$ref:\"#/visitors/value\"},maxItems:{$ref:\"#/visitors/value\"},minItems:{$ref:\"#/visitors/value\"},uniqueItems:{$ref:\"#/visitors/value\"},maxContains:{$ref:\"#/visitors/value\"},minContains:{$ref:\"#/visitors/value\"},maxProperties:{$ref:\"#/visitors/value\"},minProperties:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},dependentRequired:zw,title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},readOnly:{$ref:\"#/visitors/value\"},writeOnly:{$ref:\"#/visitors/value\"},examples:Vw,format:{$ref:\"#/visitors/value\"},contentEncoding:{$ref:\"#/visitors/value\"},contentMediaType:{$ref:\"#/visitors/value\"},contentSchema:{$ref:\"#/visitors/document/objects/Schema\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:Kw,fixedFields:{propertyName:H_.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:H_.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:Jw,fixedFields:{name:H_.visitors.document.objects.XML.fixedFields.name,namespace:H_.visitors.document.objects.XML.fixedFields.namespace,prefix:H_.visitors.document.objects.XML.fixedFields.prefix,attribute:H_.visitors.document.objects.XML.fixedFields.attribute,wrapped:H_.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:bS,fixedFields:{type:H_.visitors.document.objects.SecurityScheme.fixedFields.type,description:H_.visitors.document.objects.SecurityScheme.fixedFields.description,name:H_.visitors.document.objects.SecurityScheme.fixedFields.name,in:H_.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:H_.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:H_.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:H_.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:ES,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:SS,fixedFields:{authorizationUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:H_.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:H_.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:KE}},extension:{$visitor:H_.visitors.document.extension.$visitor}}}},apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType=s=>{if(Up(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},CS={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_1Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...id},AS={namespace:s=>{const{base:i}=s;return i.register(\"callback\",X_),i.register(\"components\",Q_),i.register(\"contact\",Z_),i.register(\"discriminator\",eE),i.register(\"encoding\",tE),i.register(\"example\",rE),i.register(\"externalDocumentation\",nE),i.register(\"header\",oE),i.register(\"info\",sE),i.register(\"jsonSchemaDialect\",iE),i.register(\"license\",aE),i.register(\"link\",lE),i.register(\"mediaType\",cE),i.register(\"oAuthFlow\",uE),i.register(\"oAuthFlows\",pE),i.register(\"openapi\",hE),i.register(\"openApi3_1\",dE),i.register(\"operation\",fE),i.register(\"parameter\",mE),i.register(\"pathItem\",gE),i.register(\"paths\",yE),i.register(\"reference\",vE),i.register(\"requestBody\",bE),i.register(\"response\",_E),i.register(\"responses\",EE),i.register(\"schema\",wE),i.register(\"securityRequirement\",SE),i.register(\"securityScheme\",xE),i.register(\"server\",kE),i.register(\"serverVariable\",OE),i.register(\"tag\",CE),i.register(\"xml\",AE),i}},jS=AS,apidom_ns_openapi_3_1_es_refractor_toolbox=()=>{const s=createNamespace(jS);return{predicates:{...be,isElement:Up,isStringElement:zp,isArrayElement:Jp,isObjectElement:Hp,isMemberElement:Gp,isServersElement:rv,includesClasses,hasElementSourceMap},namespace:s}},apidom_ns_openapi_3_1_es_refractor_refract=(s,{specPath:i=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:u=[]}={})=>{const _=(0,gp.e)(s),w=dereference(OS),x=new(Il(i,w))({specObj:w});return visitor_visit(_,x),dispatchPlugins(x.element,u,{toolboxCreator:apidom_ns_openapi_3_1_es_refractor_toolbox,visitorOptions:{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}})},apidom_ns_openapi_3_1_es_refractor_createRefractor=s=>(i,u={})=>apidom_ns_openapi_3_1_es_refractor_refract(i,{specPath:s,...u});X_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Q_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Z_.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),rE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),eE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),tE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),nE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),oE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),sE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),iE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"jsonSchemaDialect\"]),aE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),lE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),cE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),uE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),pE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),hE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),dE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),fE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),mE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),gE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),yE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),vE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),bE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),_E.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),EE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),wE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),SE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),xE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),kE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),OE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),CE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),AE.refract=apidom_ns_openapi_3_1_es_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const PS=class NotImplementedError extends Sf{};const IS=class MediaTypes extends Array{unknownMediaType=\"application/octet-stream\";filterByFormat(){throw new PS(\"filterByFormat method in MediaTypes class is not yet implemented.\")}findBy(){throw new PS(\"findBy method in MediaTypes class is not yet implemented.\")}latest(){throw new PS(\"latest method in MediaTypes class is not yet implemented.\")}};class OpenAPIMediaTypes extends IS{filterByFormat(s=\"generic\"){const i=\"generic\"===s?\"openapi;version\":s;return this.filter((s=>s.includes(i)))}findBy(s=\"3.1.0\",i=\"generic\"){const u=\"generic\"===i?`vnd.oai.openapi;version=${s}`:`vnd.oai.openapi+${i};version=${s}`;return this.find((s=>s.includes(u)))||this.unknownMediaType}latest(s=\"generic\"){return Ec(this.filterByFormat(s))}}const NS=new OpenAPIMediaTypes(\"application/vnd.oai.openapi;version=3.1.0\",\"application/vnd.oai.openapi+json;version=3.1.0\",\"application/vnd.oai.openapi+yaml;version=3.1.0\"),MS=Vf({props:{uri:\"\",value:null,depth:0,refSet:null,errors:[]},init({depth:s=this.depth,refSet:i=this.refSet,uri:u=this.uri,value:_=this.value}={}){this.uri=u,this.value=_,this.depth=s,this.refSet=i,this.errors=[]}}),TS=MS;const RS=_curry3((function propEq(s,i,u){return Vl(s,bc(i,u))})),DS=Vf({props:{rootRef:null,refs:[],circular:!1},init({refs:s=[]}={}){this.refs=[],s.forEach((s=>this.add(s)))},methods:{get size(){return this.refs.length},add(s){return this.has(s)||(this.refs.push(s),this.rootRef=null===this.rootRef?s:this.rootRef,s.refSet=this),this},merge(s){for(const i of s.values())this.add(i);return this},has(s){const i=wu(s)?s:s.uri;return cu(this.find(RS(i,\"uri\")))},find(s){return this.refs.find(s)},*values(){yield*this.refs},clean(){this.refs.forEach((s=>{s.refSet=null})),this.rootRef=null,this.refs=[]}}}),LS=DS,BS={parse:{mediaType:\"text/plain\",parsers:[],parserOpts:{}},resolve:{baseURI:\"\",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:\"ignore\",circularReplacer:Sd,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}};const FS=_curry2((function lens(s,i){return function(u){return function(_){return Qc((function(s){return i(s,_)}),u(s(_)))}}}));var qS=_curry3((function assocPath(s,i,u){if(0===s.length)return i;var _=s[0];if(s.length>1){var w=!Nf(u)&&_has(_,u)&&\"object\"==typeof u[_]?u[_]:xl(s[1])?[]:{};i=assocPath(Array.prototype.slice.call(s,1),i,w)}return function _assoc(s,i,u){if(xl(s)&&Hl(u)){var _=[].concat(u);return _[s]=i,_}var w={};for(var x in u)w[x]=u[x];return w[s]=i,w}(_,i,u)}));const $S=qS;var Identity=function(s){return{value:s,map:function(i){return Identity(i(s))}}},US=_curry3((function over(s,i,u){return s((function(s){return Identity(i(s))}))(u).value}));const zS=US,VS=FS(Il([\"resolve\",\"baseURI\"]),$S([\"resolve\",\"baseURI\"])),baseURIDefault=s=>Rd(s)?url_cwd():s,util_merge=(s,i)=>{const u=kp(s,i);return zS(VS,baseURIDefault,u)},WS=Vf({props:{uri:null,mediaType:\"text/plain\",data:null,parseResult:null},init({uri:s=this.uri,mediaType:i=this.mediaType,data:u=this.data,parseResult:_=this.parseResult}={}){this.uri=s,this.mediaType=i,this.data=u,this.parseResult=_},methods:{get extension(){return wu(this.uri)?(s=>{const i=s.lastIndexOf(\".\");return i>=0?s.substring(i).toLowerCase():\"\"})(this.uri):\"\"},toString(){if(\"string\"==typeof this.data)return this.data;if(this.data instanceof ArrayBuffer||[\"ArrayBuffer\"].includes(zl(this.data))||ArrayBuffer.isView(this.data)){return new TextDecoder(\"utf-8\").decode(this.data)}return String(this.data)}}}),KS=WS;const HS=class PluginError extends Vh{plugin;constructor(s,i){super(s,{cause:i.cause}),this.plugin=i.plugin}},plugins_filter=async(s,i,u)=>{const _=await Promise.all(u.map(Bp([s],i)));return u.filter(((s,i)=>_[i]))},run=async(s,i,u)=>{let _;for(const w of u)try{const u=await w[s].call(w,...i);return{plugin:w,result:u}}catch(s){_=new HS(\"Error while running plugin\",{cause:s,plugin:w})}return Promise.reject(_)};const JS=class DereferenceError extends Vh{};const GS=class UnmatchedDereferenceStrategyError extends JS{},dereferenceApiDOM=async(s,i)=>{let u=s,_=!1;if(!nh(s)){const i=cloneShallow(s);i.classes.push(\"result\"),u=new bp([i]),_=!0}const w=KS({uri:i.resolve.baseURI,parseResult:u,mediaType:i.parse.mediaType}),x=await plugins_filter(\"canDereference\",[w,i],i.dereference.strategies);if(Tp(x))throw new GS(w.uri);try{const{result:s}=await run(\"dereference\",[w,i],x);return _?s.get(0):s}catch(s){throw new JS(`Error while dereferencing file \"${w.uri}\"`,{cause:s})}};const YS=class ParseError extends Vh{};const XS=class ParserError extends YS{},QS=Vf({props:{name:\"\",allowEmpty:!0,sourceMap:!1,fileExtensions:[],mediaTypes:[]},init({allowEmpty:s=this.allowEmpty,sourceMap:i=this.sourceMap,fileExtensions:u=this.fileExtensions,mediaTypes:_=this.mediaTypes}={}){this.allowEmpty=s,this.sourceMap=i,this.fileExtensions=u,this.mediaTypes=_},methods:{async canParse(){throw new PS(\"canParse method in Parser stamp is not yet implemented.\")},async parse(){throw new PS(\"parse method in Parser stamp is not yet implemented.\")}}}),ZS=QS,ex=Vf(ZS,{props:{name:\"binary\"},methods:{async canParse(s){return 0===this.fileExtensions.length||this.fileExtensions.includes(s.extension)},async parse(s){try{const i=unescape(encodeURIComponent(s.toString())),u=btoa(i),_=new bp;if(0!==u.length){const s=new gp.Om(u);s.classes.push(\"result\"),_.push(s)}return _}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),tx=Vf({props:{name:null},methods:{canResolve:()=>!1,async resolve(){throw new PS(\"resolve method in ResolveStrategy stamp is not yet implemented.\")}}}),rx=Vf(tx,{init(){this.name=\"openapi-3-1\"},methods:{canResolve(s,i){const u=i.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));return void 0!==u&&u.canDereference(s,i)},async resolve(s,i){const u=i.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));if(void 0===u)throw new GS('\"openapi-3-1\" dereference strategy is not available.');const _=LS(),w=util_merge(i,{resolve:{internal:!1},dereference:{refSet:_}});return await u.dereference(s,w),_}}});function _clone(s,i,u){if(u||(u=new nx),function _isPrimitive(s){var i=typeof s;return null==s||\"object\"!=i&&\"function\"!=i}(s))return s;var _=function copy(_){var w=u.get(s);if(w)return w;for(var x in u.set(s,_),s)Object.prototype.hasOwnProperty.call(s,x)&&(_[x]=i?_clone(s[x],!0,u):s[x]);return _};switch(zl(s)){case\"Object\":return _(Object.create(Object.getPrototypeOf(s)));case\"Array\":return _([]);case\"Date\":return new Date(s.valueOf());case\"RegExp\":return _cloneRegExp(s);case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"BigInt64Array\":case\"BigUint64Array\":return s.slice();default:return s}}var nx=function(){function _ObjectMap(){this.map={},this.length=0}return _ObjectMap.prototype.set=function(s,i){const u=this.hash(s);let _=this.map[u];_||(this.map[u]=_=[]),_.push([s,i]),this.length+=1},_ObjectMap.prototype.hash=function(s){let i=[];for(var u in s)i.push(Object.prototype.toString.call(s[u]));return i.join()},_ObjectMap.prototype.get=function(s){if(this.length<=180){for(const i in this.map){const u=this.map[i];for(let i=0;i<u.length;i+=1){const _=u[i];if(_[0]===s)return _[1]}}return}const i=this.hash(s),u=this.map[i];if(u)for(let i=0;i<u.length;i+=1){const _=u[i];if(_[0]===s)return _[1]}},_ObjectMap}(),ox=function(){function XReduceBy(s,i,u,_){this.valueFn=s,this.valueAcc=i,this.keyFn=u,this.xf=_,this.inputs={}}return XReduceBy.prototype[\"@@transducer/init\"]=_xfBase_init,XReduceBy.prototype[\"@@transducer/result\"]=function(s){var i;for(i in this.inputs)if(_has(i,this.inputs)&&(s=this.xf[\"@@transducer/step\"](s,this.inputs[i]))[\"@@transducer/reduced\"]){s=s[\"@@transducer/value\"];break}return this.inputs=null,this.xf[\"@@transducer/result\"](s)},XReduceBy.prototype[\"@@transducer/step\"]=function(s,i){var u=this.keyFn(i);return this.inputs[u]=this.inputs[u]||[u,_clone(this.valueAcc,!1)],this.inputs[u][1]=this.valueFn(this.inputs[u][1],i),s},XReduceBy}();function _xreduceBy(s,i,u){return function(_){return new ox(s,i,u,_)}}var sx=_curryN(4,[],_dispatchable([],_xreduceBy,(function reduceBy(s,i,u,_){var w=_xwrap((function(_,w){var x=u(w),j=s(_has(x,_)?_[x]:_clone(i,!1),w);return j&&j[\"@@transducer/reduced\"]?_reduced(_):(_[x]=j,_)}));return ac(w,{},_)})));const ix=_curry2(_checkForMethod(\"groupBy\",sx((function(s,i){return s.push(i),s}),[]))),removeSpaces=s=>s.replace(/\\s/g,\"\"),normalize_operation_ids_replaceSpecialCharsWithUnderscore=s=>s.replace(/\\W/gi,\"_\"),normalizeOperationId=(s,i,u)=>{const _=removeSpaces(s);return _.length>0?normalize_operation_ids_replaceSpecialCharsWithUnderscore(_):((s,i)=>`${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(i.toLowerCase()))}${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(s))}`)(i,u)},normalize_operation_ids=({operationIdNormalizer:s=normalizeOperationId}={})=>({predicates:i,namespace:u})=>{const _=[],w=[],x=[];return{visitor:{OpenApi3_1Element:{leave(){const s=ix((s=>serializers_value(s.operationId)),w);Object.entries(s).forEach((([s,i])=>{Array.isArray(i)&&(i.length<=1||i.forEach(((i,_)=>{const w=`${s}${_+1}`;i.operationId=new u.elements.String(w)})))})),x.forEach((s=>{if(void 0===s.operationId)return;const i=String(serializers_value(s.operationId)),u=w.find((s=>serializers_value(s.meta.get(\"originalOperationId\"))===i));void 0!==u&&(s.operationId=cloneDeep.safe(u.operationId),s.meta.set(\"originalOperationId\",i),s.set(\"__originalOperationId\",i))})),w.length=0,x.length=0}},PathItemElement:{enter(s){const i=gc(\"path\",serializers_value(s.meta.get(\"path\")));_.push(i)},leave(){_.pop()}},OperationElement:{enter(i){if(void 0===i.operationId)return;const x=String(serializers_value(i.operationId)),j=Ec(_),P=gc(\"method\",serializers_value(i.meta.get(\"http-method\"))),B=s(x,j,P);x!==B&&(i.operationId=new u.elements.String(B),i.set(\"__originalOperationId\",x),i.meta.set(\"originalOperationId\",x),w.push(i))}},LinkElement:{leave(s){i.isLinkElement(s)&&void 0!==s.operationId&&x.push(s)}}}}};const ax=_curry3((function pathOr(s,i,u){return gc(s,Il(i,u))}));var lx=function(){function XUniqWith(s,i){this.xf=i,this.pred=s,this.items=[]}return XUniqWith.prototype[\"@@transducer/init\"]=_xfBase_init,XUniqWith.prototype[\"@@transducer/result\"]=_xfBase_result,XUniqWith.prototype[\"@@transducer/step\"]=function(s,i){return _includesWith(this.pred,i,this.items)?s:(this.items.push(i),this.xf[\"@@transducer/step\"](s,i))},XUniqWith}();function _xuniqWith(s){return function(i){return new lx(s,i)}}var cx=_curry2(_dispatchable([],_xuniqWith,(function(s,i){for(var u,_=0,w=i.length,x=[];_<w;)_includesWith(s,u=i[_],x)||(x[x.length]=u),_+=1;return x})));const ux=cx,normalize_parameters=()=>({predicates:s})=>{const parameterEquals=(i,u)=>!!s.isParameterElement(i)&&(!!s.isParameterElement(u)&&(!!s.isStringElement(i.name)&&(!!s.isStringElement(i.in)&&(!!s.isStringElement(u.name)&&(!!s.isStringElement(u.in)&&(serializers_value(i.name)===serializers_value(u.name)&&serializers_value(i.in)===serializers_value(u.in))))))),i=[];return{visitor:{PathItemElement:{enter(u,_,w,x,j){if(j.some(s.isComponentsElement))return;const{parameters:P}=u;s.isArrayElement(P)?i.push([...P.content]):i.push([])},leave(){i.pop()}},OperationElement:{leave(s){const u=Ec(i);if(!Array.isArray(u)||0===u.length)return;const _=ax([],[\"parameters\",\"content\"],s),w=ux(parameterEquals,[..._,...u]);s.parameters=new S_(w)}}}}},normalize_security_requirements=()=>({predicates:s})=>{let i;return{visitor:{OpenApi3_1Element:{enter(u){s.isArrayElement(u.security)&&(i=u.security)},leave(){i=void 0}},OperationElement:{leave(u,_,w,x,j){if(j.some(s.isComponentsElement))return;var P;void 0===u.security&&void 0!==i&&(u.security=new j_(null===(P=i)||void 0===P?void 0:P.content))}}}}},normalize_servers=()=>({predicates:s,namespace:i})=>({visitor:{OpenApi3_1Element(u){const _=void 0===u.servers,w=s.isArrayElement(u.servers),x=w&&0===u.servers.length,j=i.elements.Server.refract({url:\"/\"});_||!w?u.servers=new xy([j]):w&&x&&u.servers.push(j)},PathItemElement(i,u,_,w,x){if(x.some(s.isComponentsElement))return;if(!x.some(s.isOpenApi3_1Element))return;const j=x.find(s.isOpenApi3_1Element),P=void 0===i.servers,B=s.isArrayElement(i.servers),$=B&&0===i.servers.length;if(s.isOpenApi3_1Element(j)){var U;const s=null===(U=j.servers)||void 0===U?void 0:U.content,u=null!=s?s:[];P||!B?i.servers=new R_(u):B&&$&&u.forEach((s=>{i.servers.push(s)}))}},OperationElement(i,u,_,w,x){if(x.some(s.isComponentsElement))return;if(!x.some(s.isOpenApi3_1Element))return;const j=[...x].reverse().find(s.isPathItemElement),P=void 0===i.servers,B=s.isArrayElement(i.servers),$=B&&0===i.servers.length;if(s.isPathItemElement(j)){var U;const s=null===(U=j.servers)||void 0===U?void 0:U.content,u=null!=s?s:[];P||!B?i.servers=new I_(u):B&&$&&u.forEach((s=>{i.servers.push(s)}))}}}}),normalize_parameter_examples=()=>({predicates:s})=>({visitor:{ParameterElement:{leave(i,u,_,w,x){var j,P;if(!x.some(s.isComponentsElement)&&void 0!==i.schema&&s.isSchemaElement(i.schema)&&(void 0!==(null===(j=i.schema)||void 0===j?void 0:j.example)||void 0!==(null===(P=i.schema)||void 0===P?void 0:P.examples))){if(void 0!==i.examples&&s.isObjectElement(i.examples)){const s=i.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==i.schema.examples&&i.schema.set(\"examples\",s),void(void 0!==i.schema.example&&i.schema.set(\"example\",s))}void 0!==i.example&&(void 0!==i.schema.examples&&i.schema.set(\"examples\",[cloneDeep(i.example)]),void 0!==i.schema.example&&i.schema.set(\"example\",cloneDeep(i.example)))}}}}}),normalize_header_examples=()=>({predicates:s})=>({visitor:{HeaderElement:{leave(i,u,_,w,x){var j,P;if(!x.some(s.isComponentsElement)&&void 0!==i.schema&&s.isSchemaElement(i.schema)&&(void 0!==(null===(j=i.schema)||void 0===j?void 0:j.example)||void 0!==(null===(P=i.schema)||void 0===P?void 0:P.examples))){if(void 0!==i.examples&&s.isObjectElement(i.examples)){const s=i.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==i.schema.examples&&i.schema.set(\"examples\",s),void(void 0!==i.schema.example&&i.schema.set(\"example\",s))}void 0!==i.example&&(void 0!==i.schema.examples&&i.schema.set(\"examples\",[cloneDeep(i.example)]),void 0!==i.schema.example&&i.schema.set(\"example\",cloneDeep(i.example)))}}}}}),pojoAdapter=s=>i=>{if(null!=i&&i.$$normalized)return i;if(pojoAdapter.cache.has(i))return pojoAdapter.cache.get(i);const u=dE.refract(i),_=s(u),w=serializers_value(_);return pojoAdapter.cache.set(i,w),w};pojoAdapter.cache=new WeakMap;const openapi_3_1_apidom_normalize=s=>{if(!Hp(s))return s;if(s.hasKey(\"$$normalized\"))return s;const i=[normalize_operation_ids({operationIdNormalizer:(s,i,u)=>opId({operationId:s},i,u,{v2OperationIdCompatibilityMode:!1})}),normalize_parameters(),normalize_security_requirements(),normalize_servers(),normalize_parameter_examples(),normalize_header_examples()],u=dispatchPlugins(s,i,{toolboxCreator:apidom_ns_openapi_3_1_es_refractor_toolbox,visitorOptions:{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}});return u.set(\"$$normalized\",!0),u},px=Vf({props:{name:null},methods:{canRead:()=>!1,async read(){throw new PS(\"read method in Resolver stamp is not yet implemented.\")}}}),hx=Vf(px,{props:{timeout:5e3,redirects:5,withCredentials:!1},init({timeout:s=this.timeout,redirects:i=this.redirects,withCredentials:u=this.withCredentials}={}){this.timeout=s,this.redirects=i,this.withCredentials=u},methods:{canRead:s=>isHttpUrl(s.uri),async read(){throw new PS(\"read method in HttpResolver stamp is not yet implemented.\")},getHttpClient(){throw new PS(\"getHttpClient method in HttpResolver stamp is not yet implemented.\")}}});const dx=class ResolveError extends Vh{};const fx=class ResolverError extends dx{},{AbortController:mx,AbortSignal:gx}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=mx),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=gx);const yx=hx.compose({props:{name:\"http-swagger-client\",swaggerHTTPClient:http_http,swaggerHTTPClientConfig:{}},init({swaggerHTTPClient:s=this.swaggerHTTPClient}={}){this.swaggerHTTPClient=s},methods:{getHttpClient(){return this.swaggerHTTPClient},async read(s){const i=this.getHttpClient(),u=new AbortController,{signal:_}=u,w=setTimeout((()=>{u.abort()}),this.timeout),x=this.getHttpClient().withCredentials||this.withCredentials?\"include\":\"same-origin\",j=0===this.redirects?\"error\":\"follow\",P=this.redirects>0?this.redirects:void 0;try{return(await i({url:s.uri,signal:_,userFetch:async(s,i)=>{let u=await fetch(s,i);try{u.headers.delete(\"Content-Type\")}catch{u=new Response(u.body,{...u,headers:new Headers(u.headers)}),u.headers.delete(\"Content-Type\")}return u},credentials:x,redirect:j,follow:P,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(i){throw new fx(`Error downloading \"${s.uri}\"`,{cause:i})}finally{clearTimeout(w)}}}}),from=(s,i=Fh)=>{if(wu(s))try{return i.fromRefract(JSON.parse(s))}catch{}return Dh(s)&&Df(\"element\",s)?i.fromRefract(s):i.toElement(s)},vx=ZS.compose({props:{name:\"json-swagger-client\",fileExtensions:[\".json\"],mediaTypes:[\"application/json\"]},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{return JSON.parse(s.toString()),!0}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"json-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();if(this.allowEmpty&&\"\"===u.trim())return i;try{const s=from(JSON.parse(u));return s.classes.push(\"result\"),i.push(s),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),bx=ZS.compose({props:{name:\"yaml-1-2-swagger-client\",fileExtensions:[\".yaml\",\".yml\"],mediaTypes:[\"text/yaml\",\"application/yaml\"]},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{return so.load(s.toString(),{schema:Jn}),!0}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();try{const s=so.load(u,{schema:Jn});if(this.allowEmpty&&void 0===s)return i;const _=from(s);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),_x=ZS.compose({props:{name:\"openapi-json-3-1-swagger-client\",fileExtensions:[\".json\"],mediaTypes:new OpenAPIMediaTypes(...NS.filterByFormat(\"generic\"),...NS.filterByFormat(\"json\")),detectionRegExp:/\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\"/},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{const i=s.toString();return JSON.parse(i),this.detectionRegExp.test(i)}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();if(this.allowEmpty&&\"\"===u.trim())return i;try{const s=JSON.parse(u),_=dE.refract(s,this.refractorOpts);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),Ex=ZS.compose({props:{name:\"openapi-yaml-3-1-swagger-client\",fileExtensions:[\".yaml\",\".yml\"],mediaTypes:new OpenAPIMediaTypes(...NS.filterByFormat(\"generic\"),...NS.filterByFormat(\"yaml\")),detectionRegExp:/(?<YAML>^([\"']?)openapi\\2\\s*:\\s*([\"']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\")/m},methods:{async canParse(s){const i=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),u=this.mediaTypes.includes(s.mediaType);if(!i)return!1;if(u)return!0;if(!u)try{const i=s.toString();return so.load(i),this.detectionRegExp.test(i)}catch(s){return!1}return!1},async parse(s){if(this.sourceMap)throw new XS(\"openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const i=new bp,u=s.toString();try{const s=so.load(u,{schema:Jn});if(this.allowEmpty&&void 0===s)return i;const _=dE.refract(s,this.refractorOpts);return _.classes.push(\"result\"),i.push(_),i}catch(i){throw new XS(`Error parsing \"${s.uri}\"`,{cause:i})}}}}),wx=Vf({props:{name:null},methods:{canDereference:()=>!1,async dereference(){throw new PS(\"dereference method in DereferenceStrategy stamp is not yet implemented.\")}}});var Sx=_curry2((function none(s,i){return $p(_complement(s),i)}));const xx=Sx;var kx=__webpack_require__(8068);const Ox=class ElementIdentityError extends Gh{value;constructor(s,i){super(s,i),void 0!==i&&(this.value=i.value)}},Cx=Vf({props:{uuid:null,length:null,identityMap:null},init({length:s=6}={}){this.length=6,this.uuid=new kx({length:s}),this.identityMap=new WeakMap},methods:{identify(s){if(!Up(s))throw new Ox(\"Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.\",{value:s});if(s.meta.hasKey(\"id\")&&zp(s.meta.get(\"id\"))&&!s.meta.get(\"id\").equals(\"\"))return s.id;if(this.identityMap.has(s))return this.identityMap.get(s);const i=new gp.Om(this.generateId());return this.identityMap.set(s,i),i},forget(s){return!!this.identityMap.has(s)&&(this.identityMap.delete(s),!0)},generateId(){return this.uuid.randomUUID()}}}),Ax=(Cx({length:6}),(s,i)=>{const u=new PredicateVisitor({predicate:s,returnOnTrue:Yh});return visitor_visit(i,u),ax(void 0,[0],u.result)});const jx=class JsonSchema$anchorError extends Vh{};const Px=class EvaluationJsonSchema$anchorError extends jx{};const Ix=class InvalidJsonSchema$anchorError extends jx{constructor(s){super(`Invalid JSON Schema $anchor \"${s}\".`)}},isAnchor=s=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(s),uriToAnchor=s=>{const i=getHash(s);return Bd(\"#\",i)},$anchor_evaluate=(s,i)=>{const u=(s=>{if(!isAnchor(s))throw new Ix(s);return s})(s),_=Ax((s=>Sw(s)&&serializers_value(s.$anchor)===u),i);if(lu(_))throw new Px(`Evaluation failed on token: \"${u}\"`);return _},traversal_filter=(s,i)=>{const u=new PredicateVisitor({predicate:s});return visitor_visit(i,u),new gp.G6(u.result)};const Nx=class JsonSchemaUriError extends Vh{};const Mx=class EvaluationJsonSchemaUriError extends Nx{},resolveSchema$refField=(s,i)=>{if(void 0===i.$ref)return;const u=getHash(serializers_value(i.$ref)),_=serializers_value(i.meta.get(\"inherited$id\")),w=pc(((s,i)=>resolve(s,sanitize(stripHash(i)))),s,[..._,serializers_value(i.$ref)]);return`${w}${\"#\"===u?\"\":u}`},refractToSchemaElement=s=>{if(refractToSchemaElement.cache.has(s))return refractToSchemaElement.cache.get(s);const i=wE.refract(s);return refractToSchemaElement.cache.set(s,i),i};refractToSchemaElement.cache=new WeakMap;const maybeRefractToSchemaElement=s=>isPrimitiveElement(s)?refractToSchemaElement(s):s,uri_evaluate=(s,i)=>{const{cache:u}=uri_evaluate,_=stripHash(s),isSchemaElementWith$id=s=>Sw(s)&&void 0!==s.$id;if(!u.has(i)){const s=traversal_filter(isSchemaElementWith$id,i);u.set(i,Array.from(s))}const w=u.get(i).find((s=>{const i=((s,i)=>{if(void 0===i.$id)return;const u=serializers_value(i.meta.get(\"inherited$id\"));return pc(((s,i)=>resolve(s,sanitize(stripHash(i)))),s,[...u,serializers_value(i.$id)])})(_,s);return i===_}));if(lu(w))throw new Mx(`Evaluation failed on URI: \"${s}\"`);let x,j;return isAnchor(uriToAnchor(s))?(x=$anchor_evaluate,j=uriToAnchor(s)):(x=es_evaluate,j=uriToPointer(s)),x(j,w)};uri_evaluate.cache=new WeakMap;const Tx=class MaximumDereferenceDepthError extends JS{};const Rx=class MaximumResolveDepthError extends dx{};const Dx=class UnmatchedResolverError extends fx{},_swagger_api_apidom_reference_es_parse=async(s,i)=>{const u=KS({uri:sanitize(stripHash(s)),mediaType:i.parse.mediaType}),_=await(async(s,i)=>{const u=i.resolve.resolvers.map((s=>{const u=Object.create(s);return Object.assign(u,i.resolve.resolverOpts)})),_=await plugins_filter(\"canRead\",[s,i],u);if(Tp(_))throw new Dx(s.uri);try{const{result:i}=await run(\"read\",[s],_);return i}catch(i){throw new dx(`Error while reading file \"${s.uri}\"`,{cause:i})}})(u,i);return(async(s,i)=>{const u=i.parse.parsers.map((s=>{const u=Object.create(s);return Object.assign(u,i.parse.parserOpts)})),_=await plugins_filter(\"canParse\",[s,i],u);if(Tp(_))throw new Dx(s.uri);try{const{plugin:u,result:w}=await run(\"parse\",[s,i],_);return!u.allowEmpty&&w.isEmpty?Promise.reject(new YS(`Error while parsing file \"${s.uri}\". File is empty.`)):w}catch(i){throw new YS(`Error while parsing file \"${s.uri}\"`,{cause:i})}})(KS({...u,data:_}),i)};class AncestorLineage extends Array{includesCycle(s){return this.filter((i=>i.has(s))).length>1}includes(s,i){return s instanceof Set?super.includes(s,i):this.some((i=>i.has(s)))}findItem(s){for(const i of this)for(const u of i)if(Up(u)&&s(u))return u}}const Lx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Bx=Cx(),Fx=Vf({props:{indirections:null,namespace:null,reference:null,options:null,ancestors:null,refractCache:null},init({indirections:s=[],reference:i,namespace:u,options:_,ancestors:w=new AncestorLineage,refractCache:x=new Map}){this.indirections=s,this.namespace=u,this.reference=i,this.options=_,this.ancestors=new AncestorLineage(...w),this.refractCache=x},methods:{toBaseURI(s){return resolve(this.reference.uri,sanitize(stripHash(s)))},async toReference(s){if(this.reference.depth>=this.options.resolve.maxDepth)throw new Rx(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file \"${this.reference.uri}\"`);const i=this.toBaseURI(s),{refSet:u}=this.reference;if(u.has(i))return u.find(RS(i,\"uri\"));const _=await _swagger_api_apidom_reference_es_parse(unsanitize(i),{...this.options,parse:{...this.options.parse,mediaType:\"text/plain\"}}),w=TS({uri:i,value:cloneDeep(_),depth:this.reference.depth+1});if(u.add(w),this.options.dereference.immutable){const s=TS({uri:`immutable://${i}`,value:_,depth:this.reference.depth+1});u.add(s)}return w},toAncestorLineage(s){const i=new Set(s.filter(Up));return[new AncestorLineage(...this.ancestors,i),i]},async ReferenceElement(s,i,u,_,w){if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]),P=this.toBaseURI(serializers_value(s.$ref)),B=stripHash(this.reference.uri)===P,$=!B;if(!this.options.resolve.internal&&B)return!1;if(!this.options.resolve.external&&$)return!1;const U=await this.toReference(serializers_value(s.$ref)),Y=resolve(P,serializers_value(s.$ref));this.indirections.push(s);const X=uriToPointer(Y);let Z=es_evaluate(X,U.value.result);if(Z.id=Bx.identify(Z),isPrimitiveElement(Z)){const i=serializers_value(s.meta.get(\"referenced-element\")),u=`${i}-${serializers_value(Bx.identify(Z))}`;if(this.refractCache.has(u))Z=this.refractCache.get(u);else if(isReferenceLikeElement(Z))Z=vE.refract(Z),Z.setMetaProperty(\"referenced-element\",i),this.refractCache.set(u,Z);else{Z=this.namespace.getElementClass(i).refract(Z),this.refractCache.set(u,Z)}}if(s===Z)throw new Vh(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(Z)){if(U.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const _=new gp.sI(Z.id,{type:\"reference\",uri:U.uri,$ref:serializers_value(s.$ref)}),w=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if(($||bw(Z)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(Z)){j.add(s);const i=Fx({reference:U,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});Z=await Lx(Z,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}this.indirections.pop();const ae=cloneShallow(Z);return ae.setMetaProperty(\"id\",Bx.generateId()),ae.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ae.setMetaProperty(\"ref-origin\",U.uri),ae.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Bx.identify(s))),Hp(Z)&&Hp(ae)&&(s.hasKey(\"description\")&&\"description\"in Z&&(ae.remove(\"description\"),ae.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in Z&&(ae.remove(\"summary\"),ae.set(\"summary\",s.get(\"summary\")))),Gp(u)?u.value=ae:Array.isArray(u)&&(u[i]=ae),!u&&ae},async PathItemElement(s,i,u,_,w){if(!zp(s.$ref))return;if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]),P=this.toBaseURI(serializers_value(s.$ref)),B=stripHash(this.reference.uri)===P,$=!B;if(!this.options.resolve.internal&&B)return;if(!this.options.resolve.external&&$)return;const U=await this.toReference(serializers_value(s.$ref)),Y=resolve(P,serializers_value(s.$ref));this.indirections.push(s);const X=uriToPointer(Y);let Z=es_evaluate(X,U.value.result);if(Z.id=Bx.identify(Z),isPrimitiveElement(Z)){const s=`path-item-${serializers_value(Bx.identify(Z))}`;this.refractCache.has(s)?Z=this.refractCache.get(s):(Z=gE.refract(Z),this.refractCache.set(s,Z))}if(s===Z)throw new Vh(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(Z)){if(U.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const _=new gp.sI(Z.id,{type:\"path-item\",uri:U.uri,$ref:serializers_value(s.$ref)}),w=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if(($||yw(Z)&&zp(Z.$ref)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(Z)){j.add(s);const i=Fx({reference:U,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});Z=await Lx(Z,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}if(this.indirections.pop(),yw(Z)){const i=new gE([...Z.content],cloneDeep(Z.meta),cloneDeep(Z.attributes));i.setMetaProperty(\"id\",Bx.generateId()),s.forEach(((s,u,_)=>{i.remove(serializers_value(u)),i.content.push(_)})),i.remove(\"$ref\"),i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",U.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Bx.identify(s))),Z=i}return Gp(u)?u.value=Z:Array.isArray(u)&&(u[i]=Z),u?void 0:Z},async LinkElement(s,i,u){if(!zp(s.operationRef)&&!zp(s.operationId))return;if(zp(s.operationRef)&&zp(s.operationId))throw new Vh(\"LinkElement operationRef and operationId fields are mutually exclusive.\");let _;if(zp(s.operationRef)){var w;const x=uriToPointer(serializers_value(s.operationRef)),j=this.toBaseURI(serializers_value(s.operationRef)),P=stripHash(this.reference.uri)===j,B=!P;if(!this.options.resolve.internal&&P)return;if(!this.options.resolve.external&&B)return;const $=await this.toReference(serializers_value(s.operationRef));if(_=es_evaluate(x,$.value.result),isPrimitiveElement(_)){const s=`operation-${serializers_value(Bx.identify(_))}`;this.refractCache.has(s)?_=this.refractCache.get(s):(_=fE.refract(_),this.refractCache.set(s,_))}_=cloneShallow(_),_.setMetaProperty(\"ref-origin\",$.uri);const U=cloneShallow(s);return null===(w=U.operationRef)||void 0===w||w.meta.set(\"operation\",_),Gp(u)?u.value=U:Array.isArray(u)&&(u[i]=U),u?void 0:U}if(zp(s.operationId)){var x;const w=serializers_value(s.operationId),j=await this.toReference(unsanitize(this.reference.uri));if(_=Ax((s=>mw(s)&&Up(s.operationId)&&s.operationId.equals(w)),j.value.result),lu(_))throw new Vh(`OperationElement(operationId=${w}) not found.`);const P=cloneShallow(s);return null===(x=P.operationId)||void 0===x||x.meta.set(\"operation\",_),Gp(u)?u.value=P:Array.isArray(u)&&(u[i]=P),u?void 0:P}},async ExampleElement(s,i,u){if(!zp(s.externalValue))return;if(s.hasKey(\"value\")&&zp(s.externalValue))throw new Vh(\"ExampleElement value and externalValue fields are mutually exclusive.\");const _=this.toBaseURI(serializers_value(s.externalValue)),w=stripHash(this.reference.uri)===_,x=!w;if(!this.options.resolve.internal&&w)return;if(!this.options.resolve.external&&x)return;const j=await this.toReference(serializers_value(s.externalValue)),P=cloneShallow(j.value.result);P.setMetaProperty(\"ref-origin\",j.uri);const B=cloneShallow(s);return B.value=P,Gp(u)?u.value=B:Array.isArray(u)&&(u[i]=B),u?void 0:B},async SchemaElement(s,i,u,_,w){if(!zp(s.$ref))return;if(this.indirections.includes(s))return!1;const[x,j]=this.toAncestorLineage([...w,u]);let P=await this.toReference(unsanitize(this.reference.uri)),{uri:B}=P;const $=resolveSchema$refField(B,s),U=stripHash($),Y=KS({uri:U}),X=xx((s=>s.canRead(Y)),this.options.resolve.resolvers),Z=!X;let ee,ie=stripHash(this.reference.uri)===$,ae=!ie;this.indirections.push(s);try{if(X||Z){B=this.toBaseURI($);const s=$,i=maybeRefractToSchemaElement(P.value.result);if(ee=uri_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Bx.identify(ee),!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return}else{if(B=this.toBaseURI($),ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToPointer($),i=maybeRefractToSchemaElement(P.value.result);ee=es_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Bx.identify(ee)}}catch(s){if(!(Z&&s instanceof Mx))throw s;if(isAnchor(uriToAnchor($))){if(ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToAnchor($),i=maybeRefractToSchemaElement(P.value.result);ee=$anchor_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Bx.identify(ee)}else{if(B=this.toBaseURI($),ie=stripHash(this.reference.uri)===B,ae=!ie,!this.options.resolve.internal&&ie)return;if(!this.options.resolve.external&&ae)return;P=await this.toReference(unsanitize($));const s=uriToPointer($),i=maybeRefractToSchemaElement(P.value.result);ee=es_evaluate(s,i),ee=maybeRefractToSchemaElement(ee),ee.id=Bx.identify(ee)}}if(s===ee)throw new Vh(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(x.includes(ee)){if(P.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Vh(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var le,ce;const _=new gp.sI(ee.id,{type:\"json-schema\",uri:P.uri,$ref:serializers_value(s.$ref)}),w=(null!==(le=null===(ce=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ce?void 0:ce.circularReplacer)&&void 0!==le?le:this.options.dereference.circularReplacer)(_);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!u&&w}}if((ae||Sw(ee)&&zp(ee.$ref)||[\"error\",\"replace\"].includes(this.options.dereference.circular))&&!x.includesCycle(ee)){j.add(s);const i=Fx({reference:P,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:x});ee=await Lx(ee,i,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),j.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(ee)){const _=cloneDeep(ee);return _.setMetaProperty(\"id\",Bx.generateId()),_.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),_.setMetaProperty(\"ref-origin\",P.uri),_.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Bx.identify(s))),Gp(u)?u.value=_:Array.isArray(u)&&(u[i]=_),!u&&_}if(Sw(ee)){const i=new wE([...ee.content],cloneDeep(ee.meta),cloneDeep(ee.attributes));i.setMetaProperty(\"id\",Bx.generateId()),s.forEach(((s,u,_)=>{i.remove(serializers_value(u)),i.content.push(_)})),i.remove(\"$ref\"),i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",P.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Bx.identify(s))),ee=i}return Gp(u)?u.value=ee:Array.isArray(u)&&(u[i]=ee),u?void 0:ee}}}),qx=Fx,$x=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Ux=Vf(wx,{init(){this.name=\"openapi-3-1\"},methods:{canDereference(s){var i;return\"text/plain\"!==s.mediaType?NS.includes(s.mediaType):fw(null===(i=s.parseResult)||void 0===i?void 0:i.result)},async dereference(s,i){var u;const _=createNamespace(jS),w=null!==(u=i.dereference.refSet)&&void 0!==u?u:LS(),x=LS();let j,P=w;w.has(s.uri)?j=w.find(RS(s.uri,\"uri\")):(j=TS({uri:s.uri,value:s.parseResult}),w.add(j)),i.dereference.immutable&&(w.refs.map((s=>TS({...s,value:cloneDeep(s.value)}))).forEach((s=>x.add(s))),j=x.find((i=>i.uri===s.uri)),P=x);const B=qx({reference:j,namespace:_,options:i}),$=await $x(P.rootRef.value,B,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType});return i.dereference.immutable&&(x.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>TS({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>w.add(s))),j=w.find((i=>i.uri===s.uri)),P=w),null===i.dereference.refSet&&w.clean(),x.clean(),$}}}),zx=Ux,to_path=s=>{const i=(s=>s.slice(2))(s);return i.reduce(((s,u,_)=>{if(Gp(u)){const i=String(serializers_value(u.key));s.push(i)}else if(Jp(i[_-2])){const w=i[_-2].content.indexOf(u);s.push(w)}return s}),[])},get_root_cause=s=>{if(null==s.cause)return s;let{cause:i}=s;for(;null!=i.cause;)i=i.cause;return i},Vx=createErrorType(\"SchemaRefError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),{wrapError:Wx}=Zu,Kx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],Hx=Cx(),wasReferencedBy=s=>i=>i.meta.hasKey(\"ref-referencing-element-id\")&&i.meta.get(\"ref-referencing-element-id\").equals(serializers_value(Hx.identify(s))),Jx=qx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,basePath:null},init({allowMetaPatches:s=this.allowMetaPatches,useCircularStructures:i=this.useCircularStructures,basePath:u=this.basePath}){this.allowMetaPatches=s,this.useCircularStructures=i,this.basePath=u},methods:{async ReferenceElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;const B=this.toBaseURI(serializers_value(s.$ref)),$=stripHash(this.reference.uri)===B,U=!$;if(!this.options.resolve.internal&&$)return!1;if(!this.options.resolve.external&&U)return!1;const Y=await this.toReference(serializers_value(s.$ref)),X=resolve(B,serializers_value(s.$ref));this.indirections.push(s);const Z=uriToPointer(X);let ee=es_evaluate(Z,Y.value.result);if(isPrimitiveElement(ee)){const i=serializers_value(s.meta.get(\"referenced-element\")),u=`${i}-${serializers_value(Hx.identify(ee))}`;if(this.refractCache.has(u))ee=this.refractCache.get(u);else if(isReferenceLikeElement(ee))ee=vE.refract(ee),ee.setMetaProperty(\"referenced-element\",i),this.refractCache.set(u,ee);else{ee=this.namespace.getElementClass(i).refract(ee),this.refractCache.set(u,ee)}}if(this.indirections.includes(ee))throw new Vh(\"Recursive JSON Pointer detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ee)){if(isHttpUrl(B)||ju(B)){const i=new vE({$ref:X},cloneDeep(s.meta),cloneDeep(s.attributes));return i.get(\"$ref\").classes.push(\"cycle\"),i}return!1}}P.add(s);const ie=Jx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:_,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});ee=await Kx(ee,ie,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop();const mergeAndAnnotateReferencedElement=i=>{const u=cloneShallow(i);if(u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),u.setMetaProperty(\"ref-origin\",Y.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),Hp(i)&&(s.hasKey(\"description\")&&\"description\"in i&&(u.remove(\"description\"),u.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in i&&(u.remove(\"summary\"),u.set(\"summary\",s.get(\"summary\")))),this.allowMetaPatches&&Hp(u)&&!u.hasKey(\"$$ref\")){const s=resolve(B,X);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ee)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ee);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ee)}catch(i){var P,B,$;const _=get_root_cause(i),x=Wx(_,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:uriToPointer(serializers_value(s.$ref)),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]});return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async PathItemElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(!zp(s.$ref))return;if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;const B=this.toBaseURI(serializers_value(s.$ref)),$=stripHash(this.reference.uri)===B,U=!$;if(!this.options.resolve.internal&&$)return;if(!this.options.resolve.external&&U)return;const Y=await this.toReference(serializers_value(s.$ref)),X=resolve(B,serializers_value(s.$ref));this.indirections.push(s);const Z=uriToPointer(X);let ee=es_evaluate(Z,Y.value.result);if(isPrimitiveElement(ee)){const s=`pathItem-${serializers_value(Hx.identify(ee))}`;this.refractCache.has(s)?ee=this.refractCache.get(s):(ee=gE.refract(ee),this.refractCache.set(s,ee))}if(this.indirections.includes(ee))throw new Vh(\"Recursive JSON Pointer detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ee)){if(isHttpUrl(B)||ju(B)){const i=new gE({$ref:X},cloneDeep(s.meta),cloneDeep(s.attributes));return i.get(\"$ref\").classes.push(\"cycle\"),i}return!1}}P.add(s);const ie=Jx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:_,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});ee=await Kx(ee,ie,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop();const mergeAndAnnotateReferencedElement=i=>{const u=new gE([...i.content],cloneDeep(i.meta),cloneDeep(i.attributes));if(s.forEach(((s,i,_)=>{u.remove(serializers_value(i)),u.content.push(_)})),u.remove(\"$ref\"),u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),u.setMetaProperty(\"ref-origin\",Y.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),this.allowMetaPatches&&void 0===u.get(\"$$ref\")){const s=resolve(B,X);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ee)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ee);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ee)}catch(i){var P,B,$;const _=get_root_cause(i),x=Wx(_,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:uriToPointer(serializers_value(s.$ref)),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]});return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async SchemaElement(s,i,u,_,w){try{var x;const[_,P]=this.toAncestorLineage([...w,u]);if(!zp(s.$ref))return;if(includesClasses([\"cycle\"],s.$ref))return!1;if(_.includesCycle(s))return!1;let B=await this.toReference(unsanitize(this.reference.uri)),{uri:$}=B;const U=resolveSchema$refField($,s),Y=stripHash(U),X=KS({uri:Y}),Z=!this.options.resolve.resolvers.some((s=>s.canRead(X))),ee=!Z,isInternalReference=s=>stripHash(this.reference.uri)===s,isExternalReference=s=>!isInternalReference(s);let ie;this.indirections.push(s);try{if(Z||ee){ie=uri_evaluate(U,maybeRefractToSchemaElement(B.value.result))}else{if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToPointer(U);ie=maybeRefractToSchemaElement(es_evaluate(s,B.value.result))}}catch(s){if(!(ee&&s instanceof Mx))throw s;if(isAnchor(uriToAnchor(U))){if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToAnchor(U);ie=$anchor_evaluate(s,maybeRefractToSchemaElement(B.value.result))}else{if($=this.toBaseURI(serializers_value(U)),!this.options.resolve.internal&&isInternalReference($))return;if(!this.options.resolve.external&&isExternalReference($))return;B=await this.toReference(unsanitize(U));const s=uriToPointer(U);ie=maybeRefractToSchemaElement(es_evaluate(s,B.value.result))}}if(this.indirections.includes(ie))throw new Vh(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new Tx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(!this.useCircularStructures){if(_.includes(ie)){if(isHttpUrl($)||ju($)){const i=resolve($,U),u=new wE({$ref:i},cloneDeep(s.meta),cloneDeep(s.attributes));return u.get(\"$ref\").classes.push(\"cycle\"),u}return!1}}P.add(s);const ae=Jx({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:_,basePath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"$ref\"]});if(ie=await Kx(ie,ae,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),P.delete(s),this.indirections.pop(),predicates_isBooleanJsonSchemaElement(ie)){const i=cloneDeep(ie);return i.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),i.setMetaProperty(\"ref-origin\",B.uri),i.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),i}const mergeAndAnnotateReferencedElement=i=>{const u=new wE([...i.content],cloneDeep(i.meta),cloneDeep(i.attributes));if(s.forEach(((s,i,_)=>{u.remove(serializers_value(i)),u.content.push(_)})),u.remove(\"$ref\"),u.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),u.setMetaProperty(\"ref-origin\",B.uri),u.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(Hx.identify(s))),this.allowMetaPatches&&void 0===u.get(\"$$ref\")){const s=resolve($,U);u.set(\"$$ref\",s)}return u};if(_.includes(s)||_.includes(ie)){var j;const w=null!==(j=_.findItem(wasReferencedBy(s)))&&void 0!==j?j:mergeAndAnnotateReferencedElement(ie);return Gp(u)?u.value=w:Array.isArray(u)&&(u[i]=w),!1}return mergeAndAnnotateReferencedElement(ie)}catch(i){var P,B,$;const _=get_root_cause(i),x=new Vx(`Could not resolve reference: ${_.message}`,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),fullPath:null!==(P=this.basePath)&&void 0!==P?P:[...to_path([...w,u,s]),\"$ref\"]},_);return void(null===(B=this.options.dereference.dereferenceOpts)||void 0===B||null===(B=B.errors)||void 0===B||null===($=B.push)||void 0===$||$.call(B,x))}},async LinkElement(){},async ExampleElement(s,i,u,_,w){try{return await qx.compose.methods.ExampleElement.call(this,s,i,u,_,w)}catch(i){var x,j,P;const _=get_root_cause(i),B=Wx(_,{baseDoc:this.reference.uri,externalValue:serializers_value(s.externalValue),fullPath:null!==(x=this.basePath)&&void 0!==x?x:[...to_path([...w,u,s]),\"externalValue\"]});return void(null===(j=this.options.dereference.dereferenceOpts)||void 0===j||null===(j=j.errors)||void 0===j||null===(P=j.push)||void 0===P||P.call(j,B))}}}}),Gx=Jx,Yx=zx.compose.bind(),Xx=Yx({init({parameterMacro:s,options:i}){this.parameterMacro=s,this.options=i},props:{parameterMacro:null,options:null,macroOperation:null,OperationElement:{enter(s){this.macroOperation=s},leave(){this.macroOperation=null}},ParameterElement:{leave(s,i,u,_,w){const x=null===this.macroOperation?null:serializers_value(this.macroOperation),j=serializers_value(s);try{const i=this.parameterMacro(x,j);s.set(\"default\",i)}catch(s){var P,B;const i=new Error(s,{cause:s});i.fullPath=to_path([...w,u]),null===(P=this.options.dereference.dereferenceOpts)||void 0===P||null===(P=P.errors)||void 0===P||null===(B=P.push)||void 0===B||B.call(P,i)}}}}}),Qx=Yx({init({modelPropertyMacro:s,options:i}){this.modelPropertyMacro=s,this.options=i},props:{modelPropertyMacro:null,options:null,SchemaElement:{leave(s,i,u,_,w){void 0!==s.properties&&Hp(s.properties)&&s.properties.forEach((i=>{if(Hp(i))try{const s=this.modelPropertyMacro(serializers_value(i));i.set(\"default\",s)}catch(i){var _,x;const j=new Error(i,{cause:i});j.fullPath=[...to_path([...w,u,s]),\"properties\"],null===(_=this.options.dereference.dereferenceOpts)||void 0===_||null===(_=_.errors)||void 0===_||null===(x=_.push)||void 0===x||x.call(_,j)}}))}}}}),Zx=Qx,tk=Yx({init({options:s}){this.options=s},props:{options:null,SchemaElement:{leave(s,i,u,_,w){if(void 0===s.allOf)return;if(!Jp(s.allOf)){var x,j;const i=new TypeError(\"allOf must be an array\");return i.fullPath=[...to_path([...w,u,s]),\"allOf\"],void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(j=x.push)||void 0===j||j.call(x,i))}if(s.allOf.isEmpty)return new wE(s.content.filter((s=>\"allOf\"!==serializers_value(s.key))),cloneDeep(s.meta),cloneDeep(s.attributes));if(!s.allOf.content.every(Sw)){var P,B;const i=new TypeError(\"Elements in allOf must be objects\");return i.fullPath=[...to_path([...w,u,s]),\"allOf\"],void(null===(P=this.options.dereference.dereferenceOpts)||void 0===P||null===(P=P.errors)||void 0===P||null===(B=P.push)||void 0===B||B.call(P,i))}const $=deepmerge.all([...s.allOf.content,s]);if(s.hasKey(\"$$ref\")||$.remove(\"$$ref\"),s.hasKey(\"example\")){$.getMember(\"example\").value=s.get(\"example\")}if(s.hasKey(\"examples\")){$.getMember(\"examples\").value=s.get(\"examples\")}return $.remove(\"allOf\"),$}}}}),rk=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],nk=zx.compose({props:{useCircularStructures:!0,allowMetaPatches:!1,parameterMacro:null,modelPropertyMacro:null,mode:\"non-strict\",ancestors:null},init({useCircularStructures:s=this.useCircularStructures,allowMetaPatches:i=this.allowMetaPatches,parameterMacro:u=this.parameterMacro,modelPropertyMacro:_=this.modelPropertyMacro,mode:w=this.mode,ancestors:x=[]}={}){this.name=\"openapi-3-1-swagger-client\",this.useCircularStructures=s,this.allowMetaPatches=i,this.parameterMacro=u,this.modelPropertyMacro=_,this.mode=w,this.ancestors=[...x]},methods:{async dereference(s,i){var u;const _=[],w=createNamespace(jS),x=null!==(u=i.dereference.refSet)&&void 0!==u?u:LS();let j;x.has(s.uri)?j=x.find((i=>i.uri===s.uri)):(j=TS({uri:s.uri,value:s.parseResult}),x.add(j));const P=Gx({reference:j,namespace:w,options:i,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors});if(_.push(P),\"function\"==typeof this.parameterMacro){const s=Xx({parameterMacro:this.parameterMacro,options:i});_.push(s)}if(\"function\"==typeof this.modelPropertyMacro){const s=Zx({modelPropertyMacro:this.modelPropertyMacro,options:i});_.push(s)}if(\"strict\"!==this.mode){const s=tk({options:i});_.push(s)}const B=mergeAll(_,{nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType}),$=await rk(x.rootRef.value,B,{keyMap:CS,nodeTypeGetter:apidom_ns_openapi_3_1_es_traversal_visitor_getNodeType});return null===i.dereference.refSet&&x.clean(),$}}}),ok=nk,resolveOpenAPI31Strategy=async s=>{const{spec:i,timeout:u,redirects:_,requestInterceptor:w,responseInterceptor:x,pathDiscriminator:j=[],allowMetaPatches:P=!1,useCircularStructures:B=!1,skipNormalization:$=!1,parameterMacro:U=null,modelPropertyMacro:Y=null,mode:X=\"non-strict\"}=s;try{const{cache:Z}=resolveOpenAPI31Strategy,ee=isHttpUrl(url_cwd())?url_cwd():qu,ie=options_retrievalURI(s),ae=resolve(ee,ie);let le;Z.has(i)?le=Z.get(i):(le=dE.refract(i),le.classes.push(\"result\"),Z.set(i,le));const ce=new bp([le]),pe=es_compile(j),de=\"\"===pe?\"\":`#${pe}`,fe=es_evaluate(pe,le),ye=TS({uri:ae,value:ce}),be=LS({refs:[ye]});\"\"!==pe&&(be.rootRef=null);const _e=[new Set([fe])],we=[],Se=await(async(s,i={})=>{const u=util_merge(BS,i);return dereferenceApiDOM(s,u)})(fe,{resolve:{baseURI:`${ae}${de}`,resolvers:[yx({timeout:u||1e4,redirects:_||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:w,responseInterceptor:x}},strategies:[rx()]},parse:{mediaType:NS.latest(),parsers:[_x({allowEmpty:!1,sourceMap:!1}),Ex({allowEmpty:!1,sourceMap:!1}),vx({allowEmpty:!1,sourceMap:!1}),bx({allowEmpty:!1,sourceMap:!1}),ex({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[ok({allowMetaPatches:P,useCircularStructures:B,parameterMacro:U,modelPropertyMacro:Y,mode:X,ancestors:_e})],refSet:be,dereferenceOpts:{errors:we},immutable:!1}}),xe=((s,i,u)=>new cd({element:u}).transclude(s,i))(fe,Se,le),Pe=$?xe:openapi_3_1_apidom_normalize(xe);return{spec:serializers_value(Pe),errors:we}}catch(s){if(s instanceof $d||s instanceof Ud)return{spec:null,errors:[]};throw s}};resolveOpenAPI31Strategy.cache=new WeakMap;const sk=resolveOpenAPI31Strategy,uk={name:\"openapi-3-1-apidom\",match:({spec:s})=>isOpenAPI31(s),normalize:({spec:s})=>pojoAdapter(openapi_3_1_apidom_normalize)(s),resolve:async s=>sk(s)},pk=uk,makeResolve=s=>async i=>(async s=>{const{spec:i,requestInterceptor:u,responseInterceptor:_}=s,w=options_retrievalURI(s),x=options_httpClient(s),j=i||await makeFetchJSON(x,{requestInterceptor:u,responseInterceptor:_})(w),P={...s,spec:j};return s.strategies.find((s=>s.match(P))).resolve(P)})({...s,...i}),mk=makeResolve({strategies:[mp,dp,pp]});var gk=__webpack_require__(57427);function is_plain_object_isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}function is_plain_object_isPlainObject(s){var i,u;return!1!==is_plain_object_isObject(s)&&(void 0===(i=s.constructor)||!1!==is_plain_object_isObject(u=i.prototype)&&!1!==u.hasOwnProperty(\"isPrototypeOf\"))}const yk={body:function bodyBuilder({req:s,value:i}){void 0!==i&&(s.body=i)},header:function headerBuilder({req:s,parameter:i,value:u}){s.headers=s.headers||{},void 0!==u&&(s.headers[i.name]=u)},query:function queryBuilder({req:s,value:i,parameter:u}){s.query=s.query||{},!1===i&&\"boolean\"===u.type&&(i=\"false\");0===i&&[\"number\",\"integer\"].indexOf(u.type)>-1&&(i=\"0\");if(i)s.query[u.name]={collectionFormat:u.collectionFormat,value:i};else if(u.allowEmptyValue&&void 0!==i){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}},path:function pathBuilder({req:s,value:i,parameter:u}){void 0!==i&&(s.url=s.url.replace(new RegExp(`{${u.name}}`,\"g\"),encodeURIComponent(i)))},formData:function formDataBuilder({req:s,value:i,parameter:u}){!1===i&&\"boolean\"===u.type&&(i=\"false\");0===i&&[\"number\",\"integer\"].indexOf(u.type)>-1&&(i=\"0\");if(i)s.form=s.form||{},s.form[u.name]={collectionFormat:u.collectionFormat,value:i};else if(u.allowEmptyValue&&void 0!==i){s.form=s.form||{};const i=u.name;s.form[i]=s.form[i]||{},s.form[i].allowEmptyValue=!0}}};function serialize(s,i){return i.includes(\"application/json\")?\"string\"==typeof s?s:JSON.stringify(s):s.toString()}function parameter_builders_path({req:s,value:i,parameter:u}){const{name:_,style:w,explode:x,content:j}=u;if(void 0!==i)if(j){const u=Object.keys(j)[0];s.url=s.url.split(`{${_}}`).join(encodeDisallowedCharacters(serialize(i,u),{escape:!0}))}else{const j=stylize({key:u.name,value:i,style:w||\"simple\",explode:x||!1,escape:!0});s.url=s.url.replace(new RegExp(`{${_}}`,\"g\"),j)}}function query({req:s,value:i,parameter:u}){if(s.query=s.query||{},void 0!==i&&u.content){const _=serialize(i,Object.keys(u.content)[0]);if(_)s.query[u.name]=_;else if(u.allowEmptyValue){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}}else if(!1===i&&(i=\"false\"),0===i&&(i=\"0\"),i){const{style:_,explode:w,allowReserved:x}=u;s.query[u.name]={value:i,serializationOption:{style:_,explode:w,allowReserved:x}}}else if(u.allowEmptyValue&&void 0!==i){const i=u.name;s.query[i]=s.query[i]||{},s.query[i].allowEmptyValue=!0}}const vk=[\"accept\",\"authorization\",\"content-type\"];function parameter_builders_header({req:s,parameter:i,value:u}){if(s.headers=s.headers||{},!(vk.indexOf(i.name.toLowerCase())>-1))if(void 0!==u&&i.content){const _=Object.keys(i.content)[0];s.headers[i.name]=serialize(u,_)}else void 0===u||Array.isArray(u)&&0===u.length||(s.headers[i.name]=stylize({key:i.name,value:u,style:i.style||\"simple\",explode:void 0!==i.explode&&i.explode,escape:!1}))}function parameter_builders_cookie({req:s,parameter:i,value:u}){s.headers=s.headers||{};const _=typeof u;if(void 0!==u&&i.content){const _=Object.keys(i.content)[0];s.headers.Cookie=`${i.name}=${serialize(u,_)}`}else if(void 0!==u&&(!Array.isArray(u)||0!==u.length)){const w=\"object\"===_&&!Array.isArray(u)&&i.explode?\"\":`${i.name}=`;s.headers.Cookie=w+stylize({key:i.name,value:u,escape:!1,style:i.style||\"form\",explode:void 0!==i.explode&&i.explode})}}const _k=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:window,{btoa:wk}=_k,xk=wk;function buildRequest(s,i){const{operation:u,requestBody:_,securities:w,spec:x,attachContentTypeForEmptyPayload:j}=s;let{requestContentType:P}=s;i=function applySecurities({request:s,securities:i={},operation:u={},spec:_}){var w;const x={...s},{authorized:j={}}=i,P=u.security||_.security||[],B=j&&!!Object.keys(j).length,$=(null==_||null===(w=_.components)||void 0===w?void 0:w.securitySchemes)||{};if(x.headers=x.headers||{},x.query=x.query||{},!Object.keys(i).length||!B||!P||Array.isArray(u.security)&&!u.security.length)return s;return P.forEach((s=>{Object.keys(s).forEach((s=>{const i=j[s],u=$[s];if(!i)return;const _=i.value||i,{type:w}=u;if(i)if(\"apiKey\"===w)\"query\"===u.in&&(x.query[u.name]=_),\"header\"===u.in&&(x.headers[u.name]=_),\"cookie\"===u.in&&(x.cookies[u.name]=_);else if(\"http\"===w){if(/^basic$/i.test(u.scheme)){const s=_.username||\"\",i=_.password||\"\",u=xk(`${s}:${i}`);x.headers.Authorization=`Basic ${u}`}/^bearer$/i.test(u.scheme)&&(x.headers.Authorization=`Bearer ${_}`)}else if(\"oauth2\"===w||\"openIdConnect\"===w){const s=i.token||{},_=s[u[\"x-tokenName\"]||\"access_token\"];let w=s.token_type;w&&\"bearer\"!==w.toLowerCase()||(w=\"Bearer\"),x.headers.Authorization=`${w} ${_}`}}))})),x}({request:i,securities:w,operation:u,spec:x});const B=u.requestBody||{},$=Object.keys(B.content||{}),U=P&&$.indexOf(P)>-1;if(_||j){if(P&&U)i.headers[\"Content-Type\"]=P;else if(!P){const s=$[0];s&&(i.headers[\"Content-Type\"]=s,P=s)}}else P&&U&&(i.headers[\"Content-Type\"]=P);if(!s.responseContentType&&u.responses){const s=Object.entries(u.responses).filter((([s,i])=>{const u=parseInt(s,10);return u>=200&&u<300&&is_plain_object_isPlainObject(i.content)})).reduce(((s,[,i])=>s.concat(Object.keys(i.content))),[]);s.length>0&&(i.headers.accept=s.join(\", \"))}if(_)if(P){if($.indexOf(P)>-1)if(\"application/x-www-form-urlencoded\"===P||\"multipart/form-data\"===P)if(\"object\"==typeof _){var Y,X;const s=null!==(Y=null===(X=B.content[P])||void 0===X?void 0:X.encoding)&&void 0!==Y?Y:{};i.form={},Object.keys(_).forEach((u=>{i.form[u]={value:_[u],encoding:s[u]||{}}}))}else i.form=_;else i.body=_}else i.body=_;return i}function build_request_buildRequest(s,i){const{spec:u,operation:_,securities:w,requestContentType:x,responseContentType:j,attachContentTypeForEmptyPayload:P}=s;if(i=function build_request_applySecurities({request:s,securities:i={},operation:u={},spec:_}){const w={...s},{authorized:x={},specSecurity:j=[]}=i,P=u.security||j,B=x&&!!Object.keys(x).length,$=_.securityDefinitions;if(w.headers=w.headers||{},w.query=w.query||{},!Object.keys(i).length||!B||!P||Array.isArray(u.security)&&!u.security.length)return s;return P.forEach((s=>{Object.keys(s).forEach((s=>{const i=x[s];if(!i)return;const{token:u}=i,_=i.value||i,j=$[s],{type:P}=j,B=j[\"x-tokenName\"]||\"access_token\",U=u&&u[B];let Y=u&&u.token_type;if(i)if(\"apiKey\"===P){const s=\"query\"===j.in?\"query\":\"headers\";w[s]=w[s]||{},w[s][j.name]=_}else if(\"basic\"===P)if(_.header)w.headers.authorization=_.header;else{const s=_.username||\"\",i=_.password||\"\";_.base64=xk(`${s}:${i}`),w.headers.authorization=`Basic ${_.base64}`}else\"oauth2\"===P&&U&&(Y=Y&&\"bearer\"!==Y.toLowerCase()?Y:\"Bearer\",w.headers.authorization=`${Y} ${U}`)}))})),w}({request:i,securities:w,operation:_,spec:u}),i.body||i.form||P)x?i.headers[\"Content-Type\"]=x:Array.isArray(_.consumes)?[i.headers[\"Content-Type\"]]=_.consumes:Array.isArray(u.consumes)?[i.headers[\"Content-Type\"]]=u.consumes:_.parameters&&_.parameters.filter((s=>\"file\"===s.type)).length?i.headers[\"Content-Type\"]=\"multipart/form-data\":_.parameters&&_.parameters.filter((s=>\"formData\"===s.in)).length&&(i.headers[\"Content-Type\"]=\"application/x-www-form-urlencoded\");else if(x){const s=_.parameters&&_.parameters.filter((s=>\"body\"===s.in)).length>0,u=_.parameters&&_.parameters.filter((s=>\"formData\"===s.in)).length>0;(s||u)&&(i.headers[\"Content-Type\"]=x)}return!j&&Array.isArray(_.produces)&&_.produces.length>0&&(i.headers.accept=_.produces.join(\", \")),i}function idFromPathMethodLegacy(s,i){return`${i.toLowerCase()}-${s}`}const arrayOrEmpty=s=>Array.isArray(s)?s:[],parseURIReference=s=>{try{return new URL(s)}catch{const i=new URL(s,qu),u=String(s).startsWith(\"/\")?i.pathname:i.pathname.substring(1);return{hash:i.hash,host:\"\",hostname:\"\",href:\"\",origin:\"\",password:\"\",pathname:u,port:\"\",protocol:\"\",search:i.search,searchParams:i.searchParams}}},Ck=createErrorType(\"OperationNotFoundError\",(function cb(s,i,u){this.originalError=u,Object.assign(this,i||{})})),findParametersWithName=(s,i)=>i.filter((i=>i.name===s)),deduplicateParameters=s=>{const i={};s.forEach((s=>{i[s.in]||(i[s.in]={}),i[s.in][s.name]=s}));const u=[];return Object.keys(i).forEach((s=>{Object.keys(i[s]).forEach((_=>{u.push(i[s][_])}))})),u},Ak={buildRequest:execute_buildRequest};function execute_execute({http:s,fetch:i,spec:u,operationId:_,pathName:w,method:x,parameters:j,securities:P,...B}){const $=s||i||http_http;w&&x&&!_&&(_=idFromPathMethodLegacy(w,x));const U=Ak.buildRequest({spec:u,operationId:_,parameters:j,securities:P,http:$,...B});return U.body&&(is_plain_object_isPlainObject(U.body)||Array.isArray(U.body))&&(U.body=JSON.stringify(U.body)),$(U)}function execute_buildRequest(s){const{spec:i,operationId:u,responseContentType:_,scheme:w,requestInterceptor:x,responseInterceptor:j,contextUrl:P,userFetch:B,server:$,serverVariables:U,http:Y,signal:X}=s;let{parameters:Z,parameterBuilders:ee}=s;const ie=isOpenAPI3(i);ee||(ee=ie?_e:yk);let ae={url:\"\",credentials:Y&&Y.withCredentials?\"include\":\"same-origin\",headers:{},cookies:{}};X&&(ae.signal=X),x&&(ae.requestInterceptor=x),j&&(ae.responseInterceptor=j),B&&(ae.userFetch=B);const le=function getOperationRaw(s,i){return s&&s.paths?function findOperation(s,i){return function eachOperation(s,i,u){if(!s||\"object\"!=typeof s||!s.paths||\"object\"!=typeof s.paths)return null;const{paths:_}=s;for(const w in _)for(const x in _[w]){if(\"PARAMETERS\"===x.toUpperCase())continue;const j=_[w][x];if(!j||\"object\"!=typeof j)continue;const P={spec:s,pathName:w,method:x.toUpperCase(),operation:j},B=i(P);if(u&&B)return P}}(s,i,!0)||null}(s,(({pathName:s,method:u,operation:_})=>{if(!_||\"object\"!=typeof _)return!1;const w=_.operationId;return[opId(_,s,u),idFromPathMethodLegacy(s,u),w].some((s=>s&&s===i))})):null}(i,u);if(!le)throw new Ck(`Operation ${u} not found`);const{operation:ce={},method:pe,pathName:de}=le;if(ae.url+=function baseUrl(s){const i=isOpenAPI3(s.spec);return i?function oas3BaseUrl({spec:s,pathName:i,method:u,server:_,contextUrl:w,serverVariables:x={}}){var j,P;let B,$=[],U=\"\";const Y=null==s||null===(j=s.paths)||void 0===j||null===(j=j[i])||void 0===j||null===(j=j[(u||\"\").toLowerCase()])||void 0===j?void 0:j.servers,X=null==s||null===(P=s.paths)||void 0===P||null===(P=P[i])||void 0===P?void 0:P.servers,Z=null==s?void 0:s.servers;$=isNonEmptyServerList(Y)?Y:isNonEmptyServerList(X)?X:isNonEmptyServerList(Z)?Z:[$u],_&&(B=$.find((s=>s.url===_)),B&&(U=_));U||([B]=$,U=B.url);if(U.includes(\"{\")){const s=function getVariableTemplateNames(s){const i=[],u=/{([^}]+)}/g;let _;for(;_=u.exec(s);)i.push(_[1]);return i}(U);s.forEach((s=>{if(B.variables&&B.variables[s]){const i=B.variables[s],u=x[s]||i.default,_=new RegExp(`{${s}}`,\"g\");U=U.replace(_,u)}}))}return function buildOas3UrlWithContext(s=\"\",i=\"\"){const u=parseURIReference(s&&i?resolve(i,s):s),_=parseURIReference(i),w=stripNonAlpha(u.protocol)||stripNonAlpha(_.protocol),x=u.host||_.host,j=u.pathname;let P;P=w&&x?`${w}://${x+j}`:j;return\"/\"===P[P.length-1]?P.slice(0,-1):P}(U,w)}(s):function swagger2BaseUrl({spec:s,scheme:i,contextUrl:u=\"\"}){const _=parseURIReference(u),w=Array.isArray(s.schemes)?s.schemes[0]:null,x=i||w||stripNonAlpha(_.protocol)||\"http\",j=s.host||_.host||\"\",P=s.basePath||\"\";let B;B=x&&j?`${x}://${j+P}`:P;return\"/\"===B[B.length-1]?B.slice(0,-1):B}(s)}({spec:i,scheme:w,contextUrl:P,server:$,serverVariables:U,pathName:de,method:pe}),!u)return delete ae.cookies,ae;ae.url+=de,ae.method=`${pe}`.toUpperCase(),Z=Z||{};const fe=i.paths[de]||{};_&&(ae.headers.accept=_);const ye=deduplicateParameters([].concat(arrayOrEmpty(ce.parameters)).concat(arrayOrEmpty(fe.parameters)));ye.forEach((s=>{const u=ee[s.in];let _;if(\"body\"===s.in&&s.schema&&s.schema.properties&&(_=Z),_=s&&s.name&&Z[s.name],void 0===_?_=s&&s.name&&Z[`${s.in}.${s.name}`]:findParametersWithName(s.name,ye).length>1&&console.warn(`Parameter '${s.name}' is ambiguous because the defined spec has more than one parameter with the name: '${s.name}' and the passed-in parameter values did not define an 'in' value.`),null!==_){if(void 0!==s.default&&void 0===_&&(_=s.default),void 0===_&&s.required&&!s.allowEmptyValue)throw new Error(`Required parameter ${s.name} is not provided`);if(ie&&s.schema&&\"object\"===s.schema.type&&\"string\"==typeof _)try{_=JSON.parse(_)}catch(s){throw new Error(\"Could not parse object parameter value string as JSON\")}u&&u({req:ae,parameter:s,value:_,operation:ce,spec:i})}}));const be={...s,operation:ce};if(ae=ie?buildRequest(be,ae):build_request_buildRequest(be,ae),ae.cookies&&Object.keys(ae.cookies).length){const s=Object.keys(ae.cookies).reduce(((s,i)=>{const u=ae.cookies[i];return s+(s?\"&\":\"\")+gk.serialize(i,u)}),\"\");ae.headers.Cookie=s}return ae.cookies&&delete ae.cookies,mergeInQueryOrForm(ae),ae}const stripNonAlpha=s=>s?s.replace(/\\W/g,\"\"):null;const isNonEmptyServerList=s=>Array.isArray(s)&&s.length>0;const makeResolveSubtree=s=>async(i,u,_={})=>(async(s,i,u={})=>{const{returnEntireTree:_,baseDoc:w,requestInterceptor:x,responseInterceptor:j,parameterMacro:P,modelPropertyMacro:B,useCircularStructures:$,strategies:U}=u,Y={spec:s,pathDiscriminator:i,baseDoc:w,requestInterceptor:x,responseInterceptor:j,parameterMacro:P,modelPropertyMacro:B,useCircularStructures:$,strategies:U},X=U.find((s=>s.match(Y))).normalize(Y),Z=await mk({...Y,spec:X,allowMetaPatches:!0,skipNormalization:!0});return!_&&Array.isArray(i)&&i.length&&(Z.spec=i.reduce(((s,i)=>null==s?void 0:s[i]),Z.spec)||null),Z})(i,u,{...s,..._}),Bk=(makeResolveSubtree({strategies:[mp,dp,pp]}),(s,i)=>(...u)=>{s(...u);const _=i.getConfigs().withCredentials;void 0!==_&&(i.fn.fetch.withCredentials=\"string\"==typeof _?\"true\"===_:!!_)});function swagger_client({configs:s,getConfigs:i}){return{fn:{fetch:(u=http_http,_=s.preFetch,w=s.postFetch,w=w||(s=>s),_=_||(s=>s),s=>(\"string\"==typeof s&&(s={url:s}),ip.mergeInQueryOrForm(s),s=_(s),w(u(s)))),buildRequest:execute_buildRequest,execute:execute_execute,resolve:makeResolve({strategies:[pk,mp,dp,pp]}),resolveSubtree:async(s,u,_={})=>{const w=i(),x={modelPropertyMacro:w.modelPropertyMacro,parameterMacro:w.parameterMacro,requestInterceptor:w.requestInterceptor,responseInterceptor:w.responseInterceptor,strategies:[pk,mp,dp,pp]};return makeResolveSubtree(x)(s,u,_)},serializeRes,opId},statePlugins:{configs:{wrapActions:{loaded:Bk}}}};var u,_,w}function util(){return{fn:{shallowEqualKeys}}}var qk=__webpack_require__(40961),zk=__webpack_require__(78418),Wk=We,eO=Symbol.for(\"react-redux-context\"),tO=\"undefined\"!=typeof globalThis?globalThis:{};function getContext(){if(!Wk.createContext)return{};const s=tO[eO]??(tO[eO]=new Map);let i=s.get(Wk.createContext);return i||(i=Wk.createContext(null),s.set(Wk.createContext,i)),i}var rO=getContext(),notInitialized=()=>{throw new Error(\"uSES not initialized!\")};var nO=Symbol.for(\"react.element\"),oO=Symbol.for(\"react.portal\"),sO=Symbol.for(\"react.fragment\"),iO=Symbol.for(\"react.strict_mode\"),aO=Symbol.for(\"react.profiler\"),lO=Symbol.for(\"react.provider\"),cO=Symbol.for(\"react.context\"),uO=Symbol.for(\"react.server_context\"),pO=Symbol.for(\"react.forward_ref\"),hO=Symbol.for(\"react.suspense\"),dO=Symbol.for(\"react.suspense_list\"),fO=Symbol.for(\"react.memo\"),mO=Symbol.for(\"react.lazy\"),gO=(Symbol.for(\"react.offscreen\"),Symbol.for(\"react.client.reference\"),pO),yO=fO;function typeOf(s){if(\"object\"==typeof s&&null!==s){const i=s.$$typeof;switch(i){case nO:{const u=s.type;switch(u){case sO:case aO:case iO:case hO:case dO:return u;default:{const s=u&&u.$$typeof;switch(s){case uO:case cO:case pO:case mO:case fO:case lO:return s;default:return i}}}}case oO:return i}}}function pureFinalPropsSelectorFactory(s,i,u,_,{areStatesEqual:w,areOwnPropsEqual:x,areStatePropsEqual:j}){let P,B,$,U,Y,X=!1;function handleSubsequentCalls(X,Z){const ee=!x(Z,B),ie=!w(X,P,Z,B);return P=X,B=Z,ee&&ie?function handleNewPropsAndNewState(){return $=s(P,B),i.dependsOnOwnProps&&(U=i(_,B)),Y=u($,U,B),Y}():ee?function handleNewProps(){return s.dependsOnOwnProps&&($=s(P,B)),i.dependsOnOwnProps&&(U=i(_,B)),Y=u($,U,B),Y}():ie?function handleNewState(){const i=s(P,B),_=!j(i,$);return $=i,_&&(Y=u($,U,B)),Y}():Y}return function pureFinalPropsSelector(w,x){return X?handleSubsequentCalls(w,x):function handleFirstCall(w,x){return P=w,B=x,$=s(P,B),U=i(_,B),Y=u($,U,B),X=!0,Y}(w,x)}}function wrapMapToPropsConstant(s){return function initConstantSelector(i){const u=s(i);function constantSelector(){return u}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(s){return s.dependsOnOwnProps?Boolean(s.dependsOnOwnProps):1!==s.length}function wrapMapToPropsFunc(s,i){return function initProxySelector(i,{displayName:u}){const _=function mapToPropsProxy(s,i){return _.dependsOnOwnProps?_.mapToProps(s,i):_.mapToProps(s,void 0)};return _.dependsOnOwnProps=!0,_.mapToProps=function detectFactoryAndVerify(i,u){_.mapToProps=s,_.dependsOnOwnProps=getDependsOnOwnProps(s);let w=_(i,u);return\"function\"==typeof w&&(_.mapToProps=w,_.dependsOnOwnProps=getDependsOnOwnProps(w),w=_(i,u)),w},_}}function createInvalidArgFactory(s,i){return(u,_)=>{throw new Error(`Invalid value of type ${typeof s} for ${i} argument when connecting component ${_.wrappedComponentName}.`)}}function defaultMergeProps(s,i,u){return{...u,...s,...i}}function defaultNoopBatch(s){s()}var vO={notify(){},get:()=>[]};function createSubscription(s,i){let u,_=vO,w=0,x=!1;function handleChangeWrapper(){j.onStateChange&&j.onStateChange()}function trySubscribe(){w++,u||(u=i?i.addNestedSub(handleChangeWrapper):s.subscribe(handleChangeWrapper),_=function createListenerCollection(){let s=null,i=null;return{clear(){s=null,i=null},notify(){defaultNoopBatch((()=>{let i=s;for(;i;)i.callback(),i=i.next}))},get(){const i=[];let u=s;for(;u;)i.push(u),u=u.next;return i},subscribe(u){let _=!0;const w=i={callback:u,next:null,prev:i};return w.prev?w.prev.next=w:s=w,function unsubscribe(){_&&null!==s&&(_=!1,w.next?w.next.prev=w.prev:i=w.prev,w.prev?w.prev.next=w.next:s=w.next)}}}}())}function tryUnsubscribe(){w--,u&&0===w&&(u(),u=void 0,_.clear(),_=vO)}const j={addNestedSub:function addNestedSub(s){trySubscribe();const i=_.subscribe(s);let u=!1;return()=>{u||(u=!0,i(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){_.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return x},trySubscribe:function trySubscribeSelf(){x||(x=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){x&&(x=!1,tryUnsubscribe())},getListeners:()=>_};return j}var bO=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement)?Wk.useLayoutEffect:Wk.useEffect;function is(s,i){return s===i?0!==s||0!==i||1/s==1/i:s!=s&&i!=i}function shallowEqual(s,i){if(is(s,i))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof i||null===i)return!1;const u=Object.keys(s),_=Object.keys(i);if(u.length!==_.length)return!1;for(let _=0;_<u.length;_++)if(!Object.prototype.hasOwnProperty.call(i,u[_])||!is(s[u[_]],i[u[_]]))return!1;return!0}var _O={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},EO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},SO={[gO]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[yO]:wO};function getStatics(s){return function isMemo(s){return typeOf(s)===fO}(s)?wO:SO[s.$$typeof]||_O}var xO=Object.defineProperty,kO=Object.getOwnPropertyNames,OO=Object.getOwnPropertySymbols,CO=Object.getOwnPropertyDescriptor,AO=Object.getPrototypeOf,jO=Object.prototype;function hoistNonReactStatics(s,i){if(\"string\"!=typeof i){if(jO){const u=AO(i);u&&u!==jO&&hoistNonReactStatics(s,u)}let u=kO(i);OO&&(u=u.concat(OO(i)));const _=getStatics(s),w=getStatics(i);for(let x=0;x<u.length;++x){const j=u[x];if(!(EO[j]||w&&w[j]||_&&_[j])){const u=CO(i,j);try{xO(s,j,u)}catch(s){}}}}return s}var PO=notInitialized,IO=[null,null];function captureWrapperProps(s,i,u,_,w,x){s.current=_,u.current=!1,w.current&&(w.current=null,x())}function strictEqual(s,i){return s===i}var NO=function connect(s,i,u,{pure:_,areStatesEqual:w=strictEqual,areOwnPropsEqual:x=shallowEqual,areStatePropsEqual:j=shallowEqual,areMergedPropsEqual:P=shallowEqual,forwardRef:B=!1,context:$=rO}={}){const U=$,Y=function mapStateToPropsFactory(s){return s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapStateToProps\"):wrapMapToPropsConstant((()=>({})))}(s),X=function mapDispatchToPropsFactory(s){return s&&\"object\"==typeof s?wrapMapToPropsConstant((i=>function react_redux_bindActionCreators(s,i){const u={};for(const _ in s){const w=s[_];\"function\"==typeof w&&(u[_]=(...s)=>i(w(...s)))}return u}(s,i))):s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapDispatchToProps\"):wrapMapToPropsConstant((s=>({dispatch:s})))}(i),Z=function mergePropsFactory(s){return s?\"function\"==typeof s?function wrapMergePropsFunc(s){return function initMergePropsProxy(i,{displayName:u,areMergedPropsEqual:_}){let w,x=!1;return function mergePropsProxy(i,u,j){const P=s(i,u,j);return x?_(P,w)||(w=P):(x=!0,w=P),w}}}(s):createInvalidArgFactory(s,\"mergeProps\"):()=>defaultMergeProps}(u),ee=Boolean(s);return s=>{const i=s.displayName||s.name||\"Component\",u=`Connect(${i})`,_={shouldHandleStateChanges:ee,displayName:u,wrappedComponentName:i,WrappedComponent:s,initMapStateToProps:Y,initMapDispatchToProps:X,initMergeProps:Z,areStatesEqual:w,areStatePropsEqual:j,areOwnPropsEqual:x,areMergedPropsEqual:P};function ConnectFunction(i){const[u,w,x]=Wk.useMemo((()=>{const{reactReduxForwardedRef:s,...u}=i;return[i.context,s,u]}),[i]),j=Wk.useMemo((()=>U),[u,U]),P=Wk.useContext(j),B=Boolean(i.store)&&Boolean(i.store.getState)&&Boolean(i.store.dispatch),$=Boolean(P)&&Boolean(P.store);const Y=B?i.store:P.store,X=$?P.getServerState:Y.getState,Z=Wk.useMemo((()=>function finalPropsSelectorFactory(s,{initMapStateToProps:i,initMapDispatchToProps:u,initMergeProps:_,...w}){return pureFinalPropsSelectorFactory(i(s,w),u(s,w),_(s,w),s,w)}(Y.dispatch,_)),[Y]),[ie,ae]=Wk.useMemo((()=>{if(!ee)return IO;const s=createSubscription(Y,B?void 0:P.subscription),i=s.notifyNestedSubs.bind(s);return[s,i]}),[Y,B,P]),le=Wk.useMemo((()=>B?P:{...P,subscription:ie}),[B,P,ie]),ce=Wk.useRef(),pe=Wk.useRef(x),de=Wk.useRef(),fe=Wk.useRef(!1),ye=(Wk.useRef(!1),Wk.useRef(!1)),be=Wk.useRef();bO((()=>(ye.current=!0,()=>{ye.current=!1})),[]);const _e=Wk.useMemo((()=>()=>de.current&&x===pe.current?de.current:Z(Y.getState(),x)),[Y,x]),we=Wk.useMemo((()=>s=>ie?function subscribeUpdates(s,i,u,_,w,x,j,P,B,$,U){if(!s)return()=>{};let Y=!1,X=null;const checkForUpdates=()=>{if(Y||!P.current)return;const s=i.getState();let u,Z;try{u=_(s,w.current)}catch(s){Z=s,X=s}Z||(X=null),u===x.current?j.current||$():(x.current=u,B.current=u,j.current=!0,U())};return u.onStateChange=checkForUpdates,u.trySubscribe(),checkForUpdates(),()=>{if(Y=!0,u.tryUnsubscribe(),u.onStateChange=null,X)throw X}}(ee,Y,ie,Z,pe,ce,fe,ye,de,ae,s):()=>{}),[ie]);let Se;!function useIsomorphicLayoutEffectWithArgs(s,i,u){bO((()=>s(...i)),u)}(captureWrapperProps,[pe,ce,fe,x,de,ae]);try{Se=PO(we,_e,X?()=>Z(X(),x):_e)}catch(s){throw be.current&&(s.message+=`\\nThe error may be correlated with this previous error:\\n${be.current.stack}\\n\\n`),s}bO((()=>{be.current=void 0,de.current=void 0,ce.current=Se}));const xe=Wk.useMemo((()=>Wk.createElement(s,{...Se,ref:w})),[w,s,Se]);return Wk.useMemo((()=>ee?Wk.createElement(j.Provider,{value:le},xe):xe),[j,xe,le])}const $=Wk.memo(ConnectFunction);if($.WrappedComponent=s,$.displayName=ConnectFunction.displayName=u,B){const i=Wk.forwardRef((function forwardConnectRef(s,i){return Wk.createElement($,{...s,reactReduxForwardedRef:i})}));return i.displayName=u,i.WrappedComponent=s,hoistNonReactStatics(i,s)}return hoistNonReactStatics($,s)}};var MO=function Provider({store:s,context:i,children:u,serverState:_,stabilityCheck:w=\"once\",identityFunctionCheck:x=\"once\"}){const j=Wk.useMemo((()=>{const i=createSubscription(s);return{store:s,subscription:i,getServerState:_?()=>_:void 0,stabilityCheck:w,identityFunctionCheck:x}}),[s,_,w,x]),P=Wk.useMemo((()=>s.getState()),[s]);bO((()=>{const{subscription:i}=j;return i.onStateChange=i.notifyNestedSubs,i.trySubscribe(),P!==s.getState()&&i.notifyNestedSubs(),()=>{i.tryUnsubscribe(),i.onStateChange=void 0}}),[j,P]);const B=i||rO;return Wk.createElement(B.Provider,{value:j},u)};var TO;TO=zk.useSyncExternalStoreWithSelector,(s=>{PO=s})(We.useSyncExternalStore);var RO=__webpack_require__(83488),DO=__webpack_require__.n(RO);const withSystem=s=>i=>{const{fn:u}=s();class WithSystem extends We.Component{render(){return We.createElement(i,Co()({},s(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${u.getDisplayName(i)})`,WithSystem},withRoot=(s,i)=>u=>{const{fn:_}=s();class WithRoot extends We.Component{render(){return We.createElement(MO,{store:i},We.createElement(u,Co()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${_.getDisplayName(u)})`,WithRoot},withConnect=(s,i,u)=>compose(u?withRoot(s,u):DO(),NO(((u,_)=>{const w={..._,...s()},x=i.prototype?.mapStateToProps||(s=>({state:s}));return x(u,w)})),withSystem(s))(i),handleProps=(s,i,u,_)=>{for(const w in i){const x=i[w];\"function\"==typeof x&&x(u[w],_[w],s())}},withMappedContainer=(s,i,u)=>(i,_)=>{const{fn:w}=s(),x=u(i,\"root\");class WithMappedContainer extends We.Component{constructor(i,u){super(i,u),handleProps(s,_,i,{})}UNSAFE_componentWillReceiveProps(i){handleProps(s,_,i,this.props)}render(){const s=rr()(this.props,_?Object.keys(_):[]);return We.createElement(x,s)}}return WithMappedContainer.displayName=`WithMappedContainer(${w.getDisplayName(x)})`,WithMappedContainer},render=(s,i,u,_)=>w=>{const x=u(s,i,_)(\"App\",\"root\"),{createRoot:j}=qk;j(w).render(We.createElement(x,null))},getComponent=(s,i,u)=>(_,w,x={})=>{if(\"string\"!=typeof _)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof _);const j=u(_);return j?w?\"root\"===w?withConnect(s,j,i()):withConnect(s,j):j:(x.failSilently||s().log.warn(\"Could not find component:\",_),null)},getDisplayName=s=>s.displayName||s.name||\"Component\",view=({getComponents:s,getStore:i,getSystem:u})=>{const _=(s=>Mt(s,((...s)=>JSON.stringify(s))))(getComponent(u,i,s)),w=(s=>utils_memoizeN(s,((...s)=>s)))(withMappedContainer(u,0,_));return{rootInjects:{getComponent:_,makeMappedContainer:w,render:render(u,i,getComponent,s)},fn:{getDisplayName}}},view_legacy=({React:s,getSystem:i,getStore:u,getComponents:_})=>{const w={},x=parseInt(s?.version,10);return x>=16&&x<18&&(w.render=((s,i,u,_)=>w=>{const x=u(s,i,_)(\"App\",\"root\");qk.render(We.createElement(x,null),w)})(i,u,getComponent,_)),{rootInjects:w}};function downloadUrlPlugin(s){let{fn:i}=s;const u={download:s=>({errActions:u,specSelectors:_,specActions:w,getConfigs:x})=>{let{fetch:j}=i;const P=x();function next(i){if(i instanceof Error||i.status>=400)return w.updateLoadingStatus(\"failed\"),u.newThrownErr(Object.assign(new Error((i.message||i.statusText)+\" \"+s),{source:\"fetch\"})),void(!i.status&&i instanceof Error&&function checkPossibleFailReasons(){try{let i;if(\"URL\"in pt?i=new URL(s):(i=document.createElement(\"a\"),i.href=s),\"https:\"!==i.protocol&&\"https:\"===pt.location.protocol){const s=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${i.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void u.newThrownErr(s)}if(i.origin!==pt.location.origin){const s=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${i.origin}) does not match the page (${pt.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});u.newThrownErr(s)}}catch(s){return}}());w.updateLoadingStatus(\"success\"),w.updateSpec(i.text),_.url()!==s&&w.updateUrl(s)}s=s||_.url(),w.updateLoadingStatus(\"loading\"),u.clear({source:\"fetch\"}),j({url:s,loadSpec:!0,requestInterceptor:P.requestInterceptor||(s=>s),responseInterceptor:P.responseInterceptor||(s=>s),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:s=>{let i=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===i.indexOf(s)&&console.error(`Error: ${s} is not one of ${JSON.stringify(i)}`),{type:\"spec_update_loading_status\",payload:s}}};let _={loadingStatus:Gt((s=>s||(0,Xe.Map)()),(s=>s.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:u,reducers:{spec_update_loading_status:(s,i)=>\"string\"==typeof i.payload?s.set(\"loadingStatus\",i.payload):s},selectors:_}}}}var LO=__webpack_require__(47248),BO=__webpack_require__.n(LO);const FO=console.error,withErrorBoundary=s=>i=>{const{getComponent:u,fn:_}=s(),w=u(\"ErrorBoundary\"),x=_.getDisplayName(i);class WithErrorBoundary extends We.Component{render(){return We.createElement(w,{targetName:x,getComponent:u,fn:_},We.createElement(i,Co()({},this.props,this.context)))}}var j;return WithErrorBoundary.displayName=`WithErrorBoundary(${x})`,(j=i).prototype&&j.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=i.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:s})=>We.createElement(\"div\",{className:\"fallback\"},\"😱 \",We.createElement(\"i\",null,\"Could not render \",\"t\"===s?\"this component\":s,\", see the console.\"));class ErrorBoundary extends We.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:FO},children:null};static getDerivedStateFromError(s){return{hasError:!0,error:s}}constructor(...s){super(...s),this.state={hasError:!1,error:null}}componentDidCatch(s,i){this.props.fn.componentDidCatch(s,i)}render(){const{getComponent:s,targetName:i,children:u}=this.props;if(this.state.hasError){const u=s(\"Fallback\");return We.createElement(u,{name:i})}return u}}const qO=ErrorBoundary,safe_render=({componentList:s=[],fullOverride:i=!1}={})=>({getSystem:u})=>{const _=i?s:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...s],w=BO()(_,Array(_.length).fill(((s,{fn:i})=>i.withErrorBoundary(s))));return{fn:{componentDidCatch:FO,withErrorBoundary:withErrorBoundary(u)},components:{ErrorBoundary:qO,Fallback:fallback},wrapComponents:w}};class App extends We.Component{getLayout(){const{getComponent:s,layoutSelectors:i}=this.props,u=i.current(),_=s(u,!0);return _||(()=>We.createElement(\"h1\",null,' No layout defined for \"',u,'\" '))}render(){const s=this.getLayout();return We.createElement(s,null)}}const $O=App;class AuthorizationPopup extends We.Component{close=()=>{let{authActions:s}=this.props;s.showDefinitions(!1)};render(){let{authSelectors:s,authActions:i,getComponent:u,errSelectors:_,specSelectors:w,fn:{AST:x={}}}=this.props,j=s.shownDefinitions();const P=u(\"auths\"),B=u(\"CloseIcon\");return We.createElement(\"div\",{className:\"dialog-ux\"},We.createElement(\"div\",{className:\"backdrop-ux\"}),We.createElement(\"div\",{className:\"modal-ux\"},We.createElement(\"div\",{className:\"modal-dialog-ux\"},We.createElement(\"div\",{className:\"modal-ux-inner\"},We.createElement(\"div\",{className:\"modal-ux-header\"},We.createElement(\"h3\",null,\"Available authorizations\"),We.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},We.createElement(B,null))),We.createElement(\"div\",{className:\"modal-ux-content\"},j.valueSeq().map(((j,B)=>We.createElement(P,{key:B,AST:x,definitions:j,getComponent:u,errSelectors:_,authSelectors:s,authActions:i,specSelectors:w}))))))))}}class AuthorizeBtn extends We.Component{render(){let{isAuthorized:s,showPopup:i,onClick:u,getComponent:_}=this.props;const w=_(\"authorizationPopup\",!0),x=_(\"LockAuthIcon\",!0),j=_(\"UnlockAuthIcon\",!0);return We.createElement(\"div\",{className:\"auth-wrapper\"},We.createElement(\"button\",{className:s?\"btn authorize locked\":\"btn authorize unlocked\",onClick:u},We.createElement(\"span\",null,\"Authorize\"),s?We.createElement(x,null):We.createElement(j,null)),i&&We.createElement(w,null))}}class AuthorizeBtnContainer extends We.Component{render(){const{authActions:s,authSelectors:i,specSelectors:u,getComponent:_}=this.props,w=u.securityDefinitions(),x=i.definitionsToAuthorize(),j=_(\"authorizeBtn\");return w?We.createElement(j,{onClick:()=>s.showDefinitions(x),isAuthorized:!!i.authorized().size,showPopup:!!i.shownDefinitions(),getComponent:_}):null}}class AuthorizeOperationBtn extends We.Component{onClick=s=>{s.stopPropagation();let{onClick:i}=this.props;i&&i()};render(){let{isAuthorized:s,getComponent:i}=this.props;const u=i(\"LockAuthOperationIcon\",!0),_=i(\"UnlockAuthOperationIcon\",!0);return We.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":s?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},s?We.createElement(u,{className:\"locked\"}):We.createElement(_,{className:\"unlocked\"}))}}class Auths extends We.Component{constructor(s,i){super(s,i),this.state={}}onAuthChange=s=>{let{name:i}=s;this.setState({[i]:s})};submitAuth=s=>{s.preventDefault();let{authActions:i}=this.props;i.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:i,definitions:u}=this.props,_=u.map(((s,i)=>i)).toArray();this.setState(_.reduce(((s,i)=>(s[i]=\"\",s)),{})),i.logoutWithPersistOption(_)};close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};render(){let{definitions:s,getComponent:i,authSelectors:u,errSelectors:_}=this.props;const w=i(\"AuthItem\"),x=i(\"oauth2\",!0),j=i(\"Button\");let P=u.authorized(),B=s.filter(((s,i)=>!!P.get(i))),$=s.filter((s=>\"oauth2\"!==s.get(\"type\"))),U=s.filter((s=>\"oauth2\"===s.get(\"type\")));return We.createElement(\"div\",{className:\"auth-container\"},!!$.size&&We.createElement(\"form\",{onSubmit:this.submitAuth},$.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray(),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},$.size===B.size?We.createElement(j,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement(j,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),We.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),U&&U.size?We.createElement(\"div\",null,We.createElement(\"div\",{className:\"scope-def\"},We.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),We.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(x,{authorized:P,schema:s,name:i})))).toArray()):null)}}class auth_item_Auths extends We.Component{render(){let{schema:s,name:i,getComponent:u,onAuthChange:_,authorized:w,errSelectors:x}=this.props;const j=u(\"apiKeyAuth\"),P=u(\"basicAuth\");let B;const $=s.get(\"type\");switch($){case\"apiKey\":B=We.createElement(j,{key:i,schema:s,name:i,errSelectors:x,authorized:w,getComponent:u,onChange:_});break;case\"basic\":B=We.createElement(P,{key:i,schema:s,name:i,errSelectors:x,authorized:w,getComponent:u,onChange:_});break;default:B=We.createElement(\"div\",{key:i},\"Unknown security definition type \",$)}return We.createElement(\"div\",{key:`${i}-jump`},B)}}class AuthError extends We.Component{render(){let{error:s}=this.props,i=s.get(\"level\"),u=s.get(\"message\"),_=s.get(\"source\");return We.createElement(\"div\",{className:\"errors\"},We.createElement(\"b\",null,_,\" \",i),We.createElement(\"span\",null,u))}}class ApiKeyAuth extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_}=this.props,w=this.getValue();this.state={name:u,schema:_,value:w}}getValue(){let{name:s,authorized:i}=this.props;return i&&i.getIn([s,\"value\"])}onChange=s=>{let{onChange:i}=this.props,u=s.target.value,_=Object.assign({},this.state,{value:u});this.setState(_),i(_)};render(){let{schema:s,getComponent:i,errSelectors:u,name:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"Markdown\",!0),$=i(\"JumpToPath\",!0);let U=this.getValue(),Y=u.allErrors().filter((s=>s.get(\"authId\")===_));return We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\" (apiKey)\",We.createElement($,{path:[\"securityDefinitions\",_]})),U&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"p\",null,\"Name: \",We.createElement(\"code\",null,s.get(\"name\")))),We.createElement(x,null,We.createElement(\"p\",null,\"In: \",We.createElement(\"code\",null,s.get(\"in\")))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),U?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),Y.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}}class BasicAuth extends We.Component{constructor(s,i){super(s,i);let{schema:u,name:_}=this.props,w=this.getValue().username;this.state={name:_,schema:u,value:w?{username:w}:{}}}getValue(){let{authorized:s,name:i}=this.props;return s&&s.getIn([i,\"value\"])||{}}onChange=s=>{let{onChange:i}=this.props,{value:u,name:_}=s.target,w=this.state.value;w[_]=u,this.setState({value:w}),i(this.state)};render(){let{schema:s,getComponent:i,name:u,errSelectors:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"JumpToPath\",!0),$=i(\"Markdown\",!0);let U=this.getValue().username,Y=_.allErrors().filter((s=>s.get(\"authId\")===u));return We.createElement(\"div\",null,We.createElement(\"h4\",null,\"Basic authorization\",We.createElement(B,{path:[\"securityDefinitions\",u]})),U&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement($,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),U?We.createElement(\"code\",null,\" \",U,\" \"):We.createElement(j,null,We.createElement(w,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),U?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),Y.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}}function example_Example(s){const{example:i,showValue:u,getComponent:_,getConfigs:w}=s,x=_(\"Markdown\",!0),j=_(\"highlightCode\");return i?We.createElement(\"div\",{className:\"example\"},i.get(\"description\")?We.createElement(\"section\",{className:\"example__section\"},We.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),We.createElement(\"p\",null,We.createElement(x,{source:i.get(\"description\")}))):null,u&&i.has(\"value\")?We.createElement(\"section\",{className:\"example__section\"},We.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),We.createElement(j,{getConfigs:w,value:stringify(i.get(\"value\"))})):null):null}class ExamplesSelect extends We.PureComponent{static defaultProps={examples:Qe().Map({}),onSelect:(...s)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...s),currentExampleKey:null,showLabels:!0};_onSelect=(s,{isSyntheticChange:i=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(s,{isSyntheticChange:i})};_onDomSelect=s=>{if(\"function\"==typeof this.props.onSelect){const i=s.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(i,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:s,currentExampleKey:i}=this.props,u=s.get(i),_=s.keySeq().first(),w=s.get(_);return u||w||Map({})};componentDidMount(){const{onSelect:s,examples:i}=this.props;if(\"function\"==typeof s){const s=i.first(),u=i.keyOf(s);this._onSelect(u,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(s){const{currentExampleKey:i,examples:u}=s;if(u!==this.props.examples&&!u.has(i)){const s=u.first(),i=u.keyOf(s);this._onSelect(i,{isSyntheticChange:!0})}}render(){const{examples:s,currentExampleKey:i,isValueModified:u,isModifiedValueAvailable:_,showLabels:w}=this.props;return We.createElement(\"div\",{className:\"examples-select\"},w?We.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,We.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:_&&u?\"__MODIFIED__VALUE__\":i||\"\"},_?We.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,s.map(((s,i)=>We.createElement(\"option\",{key:i,value:i},s.get(\"summary\")||i))).valueSeq()))}}const stringifyUnlessList=s=>Xe.List.isList(s)?s:stringify(s);class ExamplesSelectValueRetainer extends We.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,Xe.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...s),updateValue:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...s)};constructor(s){super(s);const i=this._getCurrentExampleValue();this.state={[s.currentNamespace]:(0,Xe.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:i,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==i})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:s}=this.props;return(this.state[s]||(0,Xe.Map)()).toObject()};_setStateForCurrentNamespace=s=>{const{currentNamespace:i}=this.props;return this._setStateForNamespace(i,s)};_setStateForNamespace=(s,i)=>{const u=(this.state[s]||(0,Xe.Map)()).mergeDeep(i);return this.setState({[s]:u})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:s}=this.props;return this._getCurrentExampleValue()===s};_getValueForExample=(s,i)=>{const{examples:u}=i||this.props;return stringifyUnlessList((u||(0,Xe.Map)({})).getIn([s,\"value\"]))};_getCurrentExampleValue=s=>{const{currentKey:i}=s||this.props;return this._getValueForExample(i,s||this.props)};_onExamplesSelect=(s,{isSyntheticChange:i}={},...u)=>{const{onSelect:_,updateValue:w,currentUserInputValue:x,userHasEditedBody:j}=this.props,{lastUserEditedValue:P}=this._getStateForCurrentNamespace(),B=this._getValueForExample(s);if(\"__MODIFIED__VALUE__\"===s)return w(stringifyUnlessList(P)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof _&&_(s,{isSyntheticChange:i},...u),this._setStateForCurrentNamespace({lastDownstreamValue:B,isModifiedValueSelected:i&&j||!!x&&x!==B}),i||\"function\"==typeof w&&w(stringifyUnlessList(B))};UNSAFE_componentWillReceiveProps(s){const{currentUserInputValue:i,examples:u,onSelect:_,userHasEditedBody:w}=s,{lastUserEditedValue:x,lastDownstreamValue:j}=this._getStateForCurrentNamespace(),P=this._getValueForExample(s.currentKey,s),B=u.filter((s=>s.get(\"value\")===i||stringify(s.get(\"value\"))===i));if(B.size){let i;i=B.has(s.currentKey)?s.currentKey:B.keySeq().first(),_(i,{isSyntheticChange:!0})}else i!==this.props.currentUserInputValue&&i!==x&&i!==j&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(s.currentNamespace,{lastUserEditedValue:s.currentUserInputValue,isModifiedValueSelected:w||i!==P}))}render(){const{currentUserInputValue:s,examples:i,currentKey:u,getComponent:_,userHasEditedBody:w}=this.props,{lastDownstreamValue:x,lastUserEditedValue:j,isModifiedValueSelected:P}=this._getStateForCurrentNamespace(),B=_(\"ExamplesSelect\");return We.createElement(B,{examples:i,currentExampleKey:u,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!j&&j!==x,isValueModified:void 0!==s&&P&&s!==this._getCurrentExampleValue()||w})}}function oauth2_authorize_authorize({auth:s,authActions:i,errActions:u,configs:_,authConfigs:w={},currentServer:x}){let{schema:j,scopes:P,name:B,clientId:$}=s,U=j.get(\"flow\"),Y=[];switch(U){case\"password\":return void i.authorizePassword(s);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void i.authorizeApplication(s);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":Y.push(\"response_type=code\");break;case\"implicit\":Y.push(\"response_type=token\")}\"string\"==typeof $&&Y.push(\"client_id=\"+encodeURIComponent($));let X=_.oauth2RedirectUrl;if(void 0===X)return void u.newAuthErr({authId:B,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});Y.push(\"redirect_uri=\"+encodeURIComponent(X));let Z=[];if(Array.isArray(P)?Z=P:Qe().List.isList(P)&&(Z=P.toArray()),Z.length>0){let s=w.scopeSeparator||\" \";Y.push(\"scope=\"+encodeURIComponent(Z.join(s)))}let ee=utils_btoa(new Date);if(Y.push(\"state=\"+encodeURIComponent(ee)),void 0!==w.realm&&Y.push(\"realm=\"+encodeURIComponent(w.realm)),(\"authorizationCode\"===U||\"authorization_code\"===U||\"accessCode\"===U)&&w.usePkceWithAuthorizationCodeGrant){const i=function generateCodeVerifier(){return b64toB64UrlEncoded(Ct()(32).toString(\"base64\"))}(),u=function createCodeChallenge(s){return b64toB64UrlEncoded(jt()(\"sha256\").update(s).digest(\"base64\"))}(i);Y.push(\"code_challenge=\"+u),Y.push(\"code_challenge_method=S256\"),s.codeVerifier=i}let{additionalQueryStringParams:ie}=w;for(let s in ie)void 0!==ie[s]&&Y.push([s,ie[s]].map(encodeURIComponent).join(\"=\"));const ae=j.get(\"authorizationUrl\");let le;le=x?Dt()(sanitizeUrl(ae),x,!0).toString():sanitizeUrl(ae);let ce,pe=[le,Y.join(\"&\")].join(-1===ae.indexOf(\"?\")?\"?\":\"&\");ce=\"implicit\"===U?i.preAuthorizeImplicit:w.useBasicAuthenticationWithAccessCodeGrant?i.authorizeAccessCodeWithBasicAuthentication:i.authorizeAccessCodeWithFormParams,i.authPopup(pe,{auth:s,state:ee,redirectUrl:X,callback:ce,errCb:u.newAuthErr})}class Oauth2 extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_,authorized:w,authSelectors:x}=this.props,j=w&&w.get(u),P=x.getConfigs()||{},B=j&&j.get(\"username\")||\"\",$=j&&j.get(\"clientId\")||P.clientId||\"\",U=j&&j.get(\"clientSecret\")||P.clientSecret||\"\",Y=j&&j.get(\"passwordType\")||\"basic\",X=j&&j.get(\"scopes\")||P.scopes||[];\"string\"==typeof X&&(X=X.split(P.scopeSeparator||\" \")),this.state={appName:P.appName,name:u,schema:_,scopes:X,clientId:$,clientSecret:U,username:B,password:\"\",passwordType:Y}}close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};authorize=()=>{let{authActions:s,errActions:i,getConfigs:u,authSelectors:_,oas3Selectors:w}=this.props,x=u(),j=_.getConfigs();i.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:w.serverEffectiveValue(w.selectedServer()),authActions:s,errActions:i,configs:x,authConfigs:j})};onScopeChange=s=>{let{target:i}=s,{checked:u}=i,_=i.dataset.value;if(u&&-1===this.state.scopes.indexOf(_)){let s=this.state.scopes.concat([_]);this.setState({scopes:s})}else!u&&this.state.scopes.indexOf(_)>-1&&this.setState({scopes:this.state.scopes.filter((s=>s!==_))})};onInputChange=s=>{let{target:{dataset:{name:i},value:u}}=s,_={[i]:u};this.setState(_)};selectScopes=s=>{s.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=s=>{s.preventDefault();let{authActions:i,errActions:u,name:_}=this.props;u.clear({authId:_,type:\"auth\",source:\"auth\"}),i.logoutWithPersistOption([_])};render(){let{schema:s,getComponent:i,authSelectors:u,errSelectors:_,name:w,specSelectors:x}=this.props;const j=i(\"Input\"),P=i(\"Row\"),B=i(\"Col\"),$=i(\"Button\"),U=i(\"authError\"),Y=i(\"JumpToPath\",!0),X=i(\"Markdown\",!0),Z=i(\"InitializedInput\"),{isOAS3:ee}=x;let ie=ee()?s.get(\"openIdConnectUrl\"):null;const ae=\"implicit\",le=\"password\",ce=ee()?ie?\"authorization_code\":\"authorizationCode\":\"accessCode\",pe=ee()?ie?\"client_credentials\":\"clientCredentials\":\"application\";let de=!!(u.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,fe=s.get(\"flow\"),ye=fe===ce&&de?fe+\" with PKCE\":fe,be=s.get(\"allowedScopes\")||s.get(\"scopes\"),_e=!!u.authorized().get(w),we=_.allErrors().filter((s=>s.get(\"authId\")===w)),Se=!we.filter((s=>\"validation\"===s.get(\"source\"))).size,xe=s.get(\"description\");return We.createElement(\"div\",null,We.createElement(\"h4\",null,w,\" (OAuth2, \",ye,\") \",We.createElement(Y,{path:[\"securityDefinitions\",w]})),this.state.appName?We.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,xe&&We.createElement(X,{source:s.get(\"description\")}),_e&&We.createElement(\"h6\",null,\"Authorized\"),ie&&We.createElement(\"p\",null,\"OpenID Connect URL: \",We.createElement(\"code\",null,ie)),(fe===ae||fe===ce)&&We.createElement(\"p\",null,\"Authorization URL: \",We.createElement(\"code\",null,s.get(\"authorizationUrl\"))),(fe===le||fe===ce||fe===pe)&&We.createElement(\"p\",null,\"Token URL:\",We.createElement(\"code\",null,\" \",s.get(\"tokenUrl\"))),We.createElement(\"p\",{className:\"flow\"},\"Flow: \",We.createElement(\"code\",null,ye)),fe!==le?null:We.createElement(P,null,We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),_e?We.createElement(\"code\",null,\" \",this.state.username,\" \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),We.createElement(P,null,We.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),_e?We.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},We.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),We.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(fe===pe||fe===ae||fe===ce||fe===le)&&(!_e||_e&&this.state.clientId)&&We.createElement(P,null,We.createElement(\"label\",{htmlFor:`client_id_${fe}`},\"client_id:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(Z,{id:`client_id_${fe}`,type:\"text\",required:fe===le,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(fe===pe||fe===ce||fe===le)&&We.createElement(P,null,We.createElement(\"label\",{htmlFor:`client_secret_${fe}`},\"client_secret:\"),_e?We.createElement(\"code\",null,\" ****** \"):We.createElement(B,{tablet:10,desktop:10},We.createElement(Z,{id:`client_secret_${fe}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!_e&&be&&be.size?We.createElement(\"div\",{className:\"scopes\"},We.createElement(\"h2\",null,\"Scopes:\",We.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),We.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),be.map(((s,i)=>We.createElement(P,{key:i},We.createElement(\"div\",{className:\"checkbox\"},We.createElement(j,{\"data-value\":i,id:`${i}-${fe}-checkbox-${this.state.name}`,disabled:_e,checked:this.state.scopes.includes(i),type:\"checkbox\",onChange:this.onScopeChange}),We.createElement(\"label\",{htmlFor:`${i}-${fe}-checkbox-${this.state.name}`},We.createElement(\"span\",{className:\"item\"}),We.createElement(\"div\",{className:\"text\"},We.createElement(\"p\",{className:\"name\"},i),We.createElement(\"p\",{className:\"description\"},s))))))).toArray()):null,we.valueSeq().map(((s,i)=>We.createElement(U,{error:s,key:i}))),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},Se&&(_e?We.createElement($,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement($,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),We.createElement($,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends We.Component{onClick=()=>{let{specActions:s,path:i,method:u}=this.props;s.clearResponse(i,u),s.clearRequest(i,u)};render(){return We.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const live_response_Headers=({headers:s})=>We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Response headers\"),We.createElement(\"pre\",{className:\"microlight\"},s)),Duration=({duration:s})=>We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Request duration\"),We.createElement(\"pre\",{className:\"microlight\"},s,\" ms\"));class LiveResponse extends We.Component{shouldComponentUpdate(s){return this.props.response!==s.response||this.props.path!==s.path||this.props.method!==s.method||this.props.displayRequestDuration!==s.displayRequestDuration}render(){const{response:s,getComponent:i,getConfigs:u,displayRequestDuration:_,specSelectors:w,path:x,method:j}=this.props,{showMutatedRequest:P,requestSnippetsEnabled:B}=u(),$=P?w.mutatedRequestFor(x,j):w.requestFor(x,j),U=s.get(\"status\"),Y=$.get(\"url\"),X=s.get(\"headers\").toJS(),Z=s.get(\"notDocumented\"),ee=s.get(\"error\"),ie=s.get(\"text\"),ae=s.get(\"duration\"),le=Object.keys(X),ce=X[\"content-type\"]||X[\"Content-Type\"],pe=i(\"responseBody\"),de=le.map((s=>{var i=Array.isArray(X[s])?X[s].join():X[s];return We.createElement(\"span\",{className:\"headerline\",key:s},\" \",s,\": \",i,\" \")})),fe=0!==de.length,ye=i(\"Markdown\",!0),be=i(\"RequestSnippets\",!0),_e=i(\"curl\");return We.createElement(\"div\",null,$&&(!0===B||\"true\"===B?We.createElement(be,{request:$}):We.createElement(_e,{request:$,getConfigs:u})),Y&&We.createElement(\"div\",null,We.createElement(\"div\",{className:\"request-url\"},We.createElement(\"h4\",null,\"Request URL\"),We.createElement(\"pre\",{className:\"microlight\"},Y))),We.createElement(\"h4\",null,\"Server response\"),We.createElement(\"table\",{className:\"responses-table live-responses-table\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"responses-header\"},We.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),We.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),We.createElement(\"tbody\",null,We.createElement(\"tr\",{className:\"response\"},We.createElement(\"td\",{className:\"response-col_status\"},U,Z?We.createElement(\"div\",{className:\"response-undocumented\"},We.createElement(\"i\",null,\" Undocumented \")):null),We.createElement(\"td\",{className:\"response-col_description\"},ee?We.createElement(ye,{source:`${\"\"!==s.get(\"name\")?`${s.get(\"name\")}: `:\"\"}${s.get(\"message\")}`}):null,ie?We.createElement(pe,{content:ie,contentType:ce,url:Y,headers:X,getConfigs:u,getComponent:i}):null,fe?We.createElement(live_response_Headers,{headers:de}):null,_&&ae?We.createElement(Duration,{duration:ae}):null)))))}}class OnlineValidatorBadge extends We.Component{constructor(s,i){super(s,i);let{getConfigs:u}=s,{validatorUrl:_}=u();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===_?\"https://validator.swagger.io/validator\":_}}getDefinitionUrl=()=>{let{specSelectors:s}=this.props;return new(Dt())(s.url(),pt.location).toString()};UNSAFE_componentWillReceiveProps(s){let{getConfigs:i}=s,{validatorUrl:u}=i();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===u?\"https://validator.swagger.io/validator\":u})}render(){let{getConfigs:s}=this.props,{spec:i}=s(),u=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof i&&Object.keys(i).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?We.createElement(\"span\",{className:\"float-right\"},We.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${u}/debug?url=${encodeURIComponent(this.state.url)}`},We.createElement(ValidatorImage,{src:`${u}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends We.Component{constructor(s){super(s),this.state={loaded:!1,error:!1}}componentDidMount(){const s=new Image;s.onload=()=>{this.setState({loaded:!0})},s.onerror=()=>{this.setState({error:!0})},s.src=this.props.src}UNSAFE_componentWillReceiveProps(s){if(s.src!==this.props.src){const i=new Image;i.onload=()=>{this.setState({loaded:!0})},i.onerror=()=>{this.setState({error:!0})},i.src=s.src}}render(){return this.state.error?We.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?We.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends We.Component{render(){let{specSelectors:s}=this.props;const i=s.taggedOperations();return 0===i.size?We.createElement(\"h3\",null,\" No operations defined in spec!\"):We.createElement(\"div\",null,i.map(this.renderOperationTag).toArray(),i.size<1?We.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(s,i)=>{const{specSelectors:u,getComponent:_,oas3Selectors:w,layoutSelectors:x,layoutActions:j,getConfigs:P}=this.props,B=u.validOperationMethods(),$=_(\"OperationContainer\",!0),U=_(\"OperationTag\"),Y=s.get(\"operations\");return We.createElement(U,{key:\"operation-\"+i,tagObj:s,tag:i,oas3Selectors:w,layoutSelectors:x,layoutActions:j,getConfigs:P,getComponent:_,specUrl:u.url()},We.createElement(\"div\",{className:\"operation-tag-content\"},Y.map((s=>{const u=s.get(\"path\"),_=s.get(\"method\"),w=Qe().List([\"paths\",u,_]);return-1===B.indexOf(_)?null:We.createElement($,{key:`${u}-${_}`,specPath:w,op:s,path:u,method:_,tag:i})})).toArray()))}}function isAbsoluteUrl(s){return s.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(s,i){return s?isAbsoluteUrl(s)?function addProtocol(s){return s.match(/^\\/\\//i)?`${window.location.protocol}${s}`:s}(s):new URL(s,i).href:i}function safeBuildUrl(s,i,{selectedServer:u=\"\"}={}){try{return function buildUrl(s,i,{selectedServer:u=\"\"}={}){if(!s)return;if(isAbsoluteUrl(s))return s;const _=buildBaseUrl(u,i);return isAbsoluteUrl(_)?new URL(s,_).href:new URL(s,window.location.href).href}(s,i,{selectedServer:u})}catch{return}}class OperationTag extends We.Component{static defaultProps={tagObj:Qe().fromJS({}),tag:\"\"};render(){const{tagObj:s,tag:i,children:u,oas3Selectors:_,layoutSelectors:w,layoutActions:x,getConfigs:j,getComponent:P,specUrl:B}=this.props;let{docExpansion:$,deepLinking:U}=j();const Y=U&&\"false\"!==U,X=P(\"Collapse\"),Z=P(\"Markdown\",!0),ee=P(\"DeepLink\"),ie=P(\"Link\"),ae=P(\"ArrowUpIcon\"),le=P(\"ArrowDownIcon\");let ce,pe=s.getIn([\"tagDetails\",\"description\"],null),de=s.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),fe=s.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);ce=isFunc(_)&&isFunc(_.selectedServer)?safeBuildUrl(fe,B,{selectedServer:_.selectedServer()}):fe;let ye=[\"operations-tag\",i],be=w.isShown(ye,\"full\"===$||\"list\"===$);return We.createElement(\"div\",{className:be?\"opblock-tag-section is-open\":\"opblock-tag-section\"},We.createElement(\"h3\",{onClick:()=>x.show(ye,!be),className:pe?\"opblock-tag\":\"opblock-tag no-desc\",id:ye.map((s=>escapeDeepLinkPath(s))).join(\"-\"),\"data-tag\":i,\"data-is-open\":be},We.createElement(ee,{enabled:Y,isShown:be,path:createDeepLinkPath(i),text:i}),pe?We.createElement(\"small\",null,We.createElement(Z,{source:pe})):We.createElement(\"small\",null),ce?We.createElement(\"div\",{className:\"info__externaldocs\"},We.createElement(\"small\",null,We.createElement(ie,{href:sanitizeUrl(ce),onClick:s=>s.stopPropagation(),target:\"_blank\"},de||ce))):null,We.createElement(\"button\",{\"aria-expanded\":be,className:\"expand-operation\",title:be?\"Collapse operation\":\"Expand operation\",onClick:()=>x.show(ye,!be)},be?We.createElement(ae,{className:\"arrow\"}):We.createElement(le,{className:\"arrow\"}))),We.createElement(X,{isOpened:be},u))}}var UO;function rolling_load_extends(){return rolling_load_extends=Object.assign?Object.assign.bind():function(s){for(var i=1;i<arguments.length;i++){var u=arguments[i];for(var _ in u)Object.prototype.hasOwnProperty.call(u,_)&&(s[_]=u[_])}return s},rolling_load_extends.apply(this,arguments)}const rolling_load=s=>We.createElement(\"svg\",rolling_load_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},s),UO||(UO=We.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},We.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"}))));class operation_Operation extends We.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{specPath:s,response:i,request:u,toggleShown:_,onTryoutClick:w,onResetClick:x,onCancelClick:j,onExecute:P,fn:B,getComponent:$,getConfigs:U,specActions:Y,specSelectors:X,authActions:Z,authSelectors:ee,oas3Actions:ie,oas3Selectors:ae}=this.props,le=this.props.operation,{deprecated:ce,isShown:pe,path:de,method:fe,op:ye,tag:be,operationId:_e,allowTryItOut:we,displayRequestDuration:Se,tryItOutEnabled:xe,executeInProgress:Pe}=le.toJS(),{description:Te,externalDocs:Re,schemes:qe}=ye;const $e=Re?safeBuildUrl(Re.url,X.url(),{selectedServer:ae.selectedServer()}):\"\";let ze=le.getIn([\"op\"]),He=ze.get(\"responses\"),Ye=function getList(s,i){if(!Qe().Iterable.isIterable(s))return Qe().List();let u=s.getIn(Array.isArray(i)?i:[i]);return Qe().List.isList(u)?u:Qe().List()}(ze,[\"parameters\"]),Xe=X.operationScheme(de,fe),et=[\"operations\",be,_e],tt=getExtensions(ze);const rt=$(\"responses\"),nt=$(\"parameters\"),ot=$(\"execute\"),st=$(\"clear\"),it=$(\"Collapse\"),at=$(\"Markdown\",!0),lt=$(\"schemes\"),ct=$(\"OperationServers\"),ut=$(\"OperationExt\"),pt=$(\"OperationSummary\"),ht=$(\"Link\"),{showExtensions:dt}=U();if(He&&i&&i.size>0){let s=!He.get(String(i.get(\"status\")))&&!He.get(\"default\");i=i.set(\"notDocumented\",s)}let mt=[de,fe];const gt=X.validationErrors([de,fe]);return We.createElement(\"div\",{className:ce?\"opblock opblock-deprecated\":pe?`opblock opblock-${fe} is-open`:`opblock opblock-${fe}`,id:escapeDeepLinkPath(et.join(\"-\"))},We.createElement(pt,{operationProps:le,isShown:pe,toggleShown:_,getComponent:$,authActions:Z,authSelectors:ee,specPath:s}),We.createElement(it,{isOpened:pe},We.createElement(\"div\",{className:\"opblock-body\"},ze&&ze.size||null===ze?null:We.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),ce&&We.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),Te&&We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"div\",{className:\"opblock-description\"},We.createElement(at,{source:Te}))),$e?We.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},We.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),We.createElement(\"div\",{className:\"opblock-external-docs\"},Re.description&&We.createElement(\"span\",{className:\"opblock-external-docs__description\"},We.createElement(at,{source:Re.description})),We.createElement(ht,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl($e)},$e))):null,ze&&ze.size?We.createElement(nt,{parameters:Ye,specPath:s.push(\"parameters\"),operation:ze,onChangeKey:mt,onTryoutClick:w,onResetClick:x,onCancelClick:j,tryItOutEnabled:xe,allowTryItOut:we,fn:B,getComponent:$,specActions:Y,specSelectors:X,pathMethod:[de,fe],getConfigs:U,oas3Actions:ie,oas3Selectors:ae}):null,xe?We.createElement(ct,{getComponent:$,path:de,method:fe,operationServers:ze.get(\"servers\"),pathServers:X.paths().getIn([de,\"servers\"]),getSelectedServer:ae.selectedServer,setSelectedServer:ie.setSelectedServer,setServerVariableValue:ie.setServerVariableValue,getServerVariable:ae.serverVariableValue,getEffectiveServerValue:ae.serverEffectiveValue}):null,xe&&we&&qe&&qe.size?We.createElement(\"div\",{className:\"opblock-schemes\"},We.createElement(lt,{schemes:qe,path:de,method:fe,specActions:Y,currentScheme:Xe})):null,!xe||!we||gt.length<=0?null:We.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",We.createElement(\"ul\",null,gt.map(((s,i)=>We.createElement(\"li\",{key:i},\" \",s,\" \"))))),We.createElement(\"div\",{className:xe&&i&&we?\"btn-group\":\"execute-wrapper\"},xe&&we?We.createElement(ot,{operation:ze,specActions:Y,specSelectors:X,oas3Selectors:ae,oas3Actions:ie,path:de,method:fe,onExecute:P,disabled:Pe}):null,xe&&i&&we?We.createElement(st,{specActions:Y,path:de,method:fe}):null),Pe?We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"div\",{className:\"loading\"})):null,He?We.createElement(rt,{responses:He,request:u,tryItOutResponse:i,getComponent:$,getConfigs:U,specSelectors:X,oas3Actions:ie,oas3Selectors:ae,specActions:Y,produces:X.producesOptionsFor([de,fe]),producesValue:X.currentProducesFor([de,fe]),specPath:s.push(\"responses\"),path:de,method:fe,displayRequestDuration:Se,fn:B}):null,dt&&tt.size?We.createElement(ut,{extensions:tt,getComponent:$}):null)))}}class OperationContainer extends We.PureComponent{constructor(s,i){super(s,i);const{tryItOutEnabled:u}=s.getConfigs();this.state={tryItOutEnabled:!0===u||\"true\"===u,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(s,i){const{op:u,layoutSelectors:_,getConfigs:w}=i,{docExpansion:x,deepLinking:j,displayOperationId:P,displayRequestDuration:B,supportedSubmitMethods:$}=w(),U=_.showSummary(),Y=u.getIn([\"operation\",\"__originalOperationId\"])||u.getIn([\"operation\",\"operationId\"])||opId(u.get(\"operation\"),i.path,i.method)||u.get(\"id\"),X=[\"operations\",i.tag,Y],Z=j&&\"false\"!==j,ee=$.indexOf(i.method)>=0&&(void 0===i.allowTryItOut?i.specSelectors.allowTryItOutFor(i.path,i.method):i.allowTryItOut),ie=u.getIn([\"operation\",\"security\"])||i.specSelectors.security();return{operationId:Y,isDeepLinkingEnabled:Z,showSummary:U,displayOperationId:P,displayRequestDuration:B,allowTryItOut:ee,security:ie,isAuthorized:i.authSelectors.isAuthorized(ie),isShown:_.isShown(X,\"full\"===x),jumpToKey:`paths.${i.path}.${i.method}`,response:i.specSelectors.responseFor(i.path,i.method),request:i.specSelectors.requestFor(i.path,i.method)}}componentDidMount(){const{isShown:s}=this.props,i=this.getResolvedSubtree();s&&void 0===i&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(s){const{response:i,isShown:u}=s,_=this.getResolvedSubtree();i!==this.props.response&&this.setState({executeInProgress:!1}),u&&void 0===_&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:s,tag:i,operationId:u,isShown:_}=this.props;const w=this.getResolvedSubtree();_||void 0!==w||this.requestResolvedSubtree(),s.show([\"operations\",i,u],!_)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=s=>{const i=this.props.oas3Selectors.selectDefaultRequestBodyValue(...s);this.props.oas3Actions.setRequestBodyValue({value:i,pathMethod:s})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:s,path:i,method:u,specPath:_}=this.props;return _?s.specResolvedSubtree(_.toJS()):s.specResolvedSubtree([\"paths\",i,u])};requestResolvedSubtree=()=>{const{specActions:s,path:i,method:u,specPath:_}=this.props;return _?s.requestResolvedSubtree(_.toJS()):s.requestResolvedSubtree([\"paths\",i,u])};render(){let{op:s,tag:i,path:u,method:_,security:w,isAuthorized:x,operationId:j,showSummary:P,isShown:B,jumpToKey:$,allowTryItOut:U,response:Y,request:X,displayOperationId:Z,displayRequestDuration:ee,isDeepLinkingEnabled:ie,specPath:ae,specSelectors:le,specActions:ce,getComponent:pe,getConfigs:de,layoutSelectors:fe,layoutActions:ye,authActions:be,authSelectors:_e,oas3Actions:we,oas3Selectors:Se,fn:xe}=this.props;const Pe=pe(\"operation\"),Te=this.getResolvedSubtree()||(0,Xe.Map)(),Re=(0,Xe.fromJS)({op:Te,tag:i,path:u,summary:s.getIn([\"operation\",\"summary\"])||\"\",deprecated:Te.get(\"deprecated\")||s.getIn([\"operation\",\"deprecated\"])||!1,method:_,security:w,isAuthorized:x,operationId:j,originalOperationId:Te.getIn([\"operation\",\"__originalOperationId\"]),showSummary:P,isShown:B,jumpToKey:$,allowTryItOut:U,request:X,displayOperationId:Z,displayRequestDuration:ee,isDeepLinkingEnabled:ie,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return We.createElement(Pe,{operation:Re,response:Y,request:X,isShown:B,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:ae,specActions:ce,specSelectors:le,oas3Actions:we,oas3Selectors:Se,layoutActions:ye,layoutSelectors:fe,authActions:be,authSelectors:_e,getComponent:pe,getConfigs:de,fn:xe})}}var zO=__webpack_require__(13222),VO=__webpack_require__.n(zO);class OperationSummary extends We.PureComponent{static defaultProps={operationProps:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{isShown:s,toggleShown:i,getComponent:u,authActions:_,authSelectors:w,operationProps:x,specPath:j}=this.props,{summary:P,isAuthorized:B,method:$,op:U,showSummary:Y,path:X,operationId:Z,originalOperationId:ee,displayOperationId:ie}=x.toJS(),{summary:ae}=U,le=x.get(\"security\");const ce=u(\"authorizeOperationBtn\",!0),pe=u(\"OperationSummaryMethod\"),de=u(\"OperationSummaryPath\"),fe=u(\"JumpToPath\",!0),ye=u(\"CopyToClipboardBtn\",!0),be=u(\"ArrowUpIcon\"),_e=u(\"ArrowDownIcon\"),we=le&&!!le.count(),Se=we&&1===le.size&&le.first().isEmpty(),xe=!we||Se;return We.createElement(\"div\",{className:`opblock-summary opblock-summary-${$}`},We.createElement(\"button\",{\"aria-expanded\":s,className:\"opblock-summary-control\",onClick:i},We.createElement(pe,{method:$}),We.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},We.createElement(de,{getComponent:u,operationProps:x,specPath:j}),Y?We.createElement(\"div\",{className:\"opblock-summary-description\"},VO()(ae||P)):null),ie&&(ee||Z)?We.createElement(\"span\",{className:\"opblock-summary-operation-id\"},ee||Z):null),We.createElement(ye,{textToCopy:`${j.get(1)}`}),xe?null:We.createElement(ce,{isAuthorized:B,onClick:()=>{const s=w.definitionsForRequirements(le);_.showDefinitions(s)}}),We.createElement(fe,{path:j}),We.createElement(\"button\",{\"aria-label\":`${$} ${X.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":s,tabIndex:\"-1\",onClick:i},s?We.createElement(be,{className:\"arrow\"}):We.createElement(_e,{className:\"arrow\"})))}}class OperationSummaryMethod extends We.PureComponent{static defaultProps={operationProps:null};render(){let{method:s}=this.props;return We.createElement(\"span\",{className:\"opblock-summary-method\"},s.toUpperCase())}}class OperationSummaryPath extends We.PureComponent{render(){let{getComponent:s,operationProps:i}=this.props,{deprecated:u,isShown:_,path:w,tag:x,operationId:j,isDeepLinkingEnabled:P}=i.toJS();const B=w.split(/(?=\\/)/g);for(let s=1;s<B.length;s+=2)B.splice(s,0,We.createElement(\"wbr\",{key:s}));const $=s(\"DeepLink\");return We.createElement(\"span\",{className:u?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":w},We.createElement($,{enabled:P,isShown:_,path:createDeepLinkPath(`${x}/${j}`),text:B}))}}const operation_extensions=({extensions:s,getComponent:i})=>{let u=i(\"OperationExtRow\");return We.createElement(\"div\",{className:\"opblock-section\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",null,\"Extensions\")),We.createElement(\"div\",{className:\"table-container\"},We.createElement(\"table\",null,We.createElement(\"thead\",null,We.createElement(\"tr\",null,We.createElement(\"td\",{className:\"col_header\"},\"Field\"),We.createElement(\"td\",{className:\"col_header\"},\"Value\"))),We.createElement(\"tbody\",null,s.entrySeq().map((([s,i])=>We.createElement(u,{key:`${s}-${i}`,xKey:s,xVal:i})))))))},operation_extension_row=({xKey:s,xVal:i})=>{const u=i?i.toJS?i.toJS():i:null;return We.createElement(\"tr\",null,We.createElement(\"td\",null,s),We.createElement(\"td\",null,JSON.stringify(u)))};var WO=__webpack_require__(46942),KO=__webpack_require__.n(WO),HO=__webpack_require__(5419),JO=__webpack_require__.n(HO);const highlight_code=({value:s,fileName:i=\"response.txt\",className:u,downloadable:_,getConfigs:w,canCopy:x,language:j})=>{const P=St()(w)?w():null,B=!1!==Eo()(P,\"syntaxHighlight\")&&Eo()(P,\"syntaxHighlight.activated\",!0),$=(0,We.useRef)(null);(0,We.useEffect)((()=>{const s=Array.from($.current.childNodes).filter((s=>!!s.nodeType&&s.classList.contains(\"microlight\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s,u,j]);const handlePreventYScrollingBeyondElement=s=>{const{target:i,deltaY:u}=s,{scrollHeight:_,offsetHeight:w,scrollTop:x}=i;_>w&&(0===x&&u<0||w+x>=_&&u>0)&&s.preventDefault()};return We.createElement(\"div\",{className:\"highlight-code\",ref:$},x&&We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Bo.CopyToClipboard,{text:s},We.createElement(\"button\",null))),_?We.createElement(\"button\",{className:\"download-contents\",onClick:()=>{JO()(s,i)}},\"Download\"):null,B?We.createElement(Vo,{language:j,className:KO()(u,\"microlight\"),style:getStyle(Eo()(P,\"syntaxHighlight.theme\",\"agate\"))},s):We.createElement(\"pre\",{className:KO()(u,\"microlight\")},s))};function createHtmlReadyId(s,i=\"_\"){return s.replace(/[^\\w-]/g,i)}class responses_Responses extends We.Component{static defaultProps={tryItOutResponse:null,produces:(0,Xe.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);onResponseContentTypeChange=({controlsAcceptHeader:s,value:i})=>{const{oas3Actions:u,path:_,method:w}=this.props;s&&u.setResponseContentType({value:i,path:_,method:w})};render(){let{responses:s,tryItOutResponse:i,getComponent:u,getConfigs:_,specSelectors:w,fn:x,producesValue:j,displayRequestDuration:P,specPath:B,path:$,method:U,oas3Selectors:Y,oas3Actions:X}=this.props,Z=function defaultStatusCode(s){let i=s.keySeq();return i.contains(Nt)?Nt:i.filter((s=>\"2\"===(s+\"\")[0])).sort().first()}(s);const ee=u(\"contentType\"),ie=u(\"liveResponse\"),ae=u(\"response\");let le=this.props.produces&&this.props.produces.size?this.props.produces:responses_Responses.defaultProps.produces;const ce=w.isOAS3()?function getAcceptControllingResponse(s){if(!Qe().OrderedMap.isOrderedMap(s))return null;if(!s.size)return null;const i=s.find(((s,i)=>i.startsWith(\"2\")&&Object.keys(s.get(\"content\")||{}).length>0)),u=s.get(\"default\")||Qe().OrderedMap(),_=(u.get(\"content\")||Qe().OrderedMap()).keySeq().toJS().length?u:null;return i||_}(s):null,pe=createHtmlReadyId(`${U}${$}_responses`),de=`${pe}_select`;return We.createElement(\"div\",{className:\"responses-wrapper\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",null,\"Responses\"),w.isOAS3()?null:We.createElement(\"label\",{htmlFor:de},We.createElement(\"span\",null,\"Response content type\"),We.createElement(ee,{value:j,ariaControls:pe,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:le,controlId:de,onChange:this.onChangeProducesWrapper}))),We.createElement(\"div\",{className:\"responses-inner\"},i?We.createElement(\"div\",null,We.createElement(ie,{response:i,getComponent:u,getConfigs:_,specSelectors:w,path:this.props.path,method:this.props.method,displayRequestDuration:P}),We.createElement(\"h4\",null,\"Responses\")):null,We.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:pe,role:\"region\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"responses-header\"},We.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),We.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),w.isOAS3()?We.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),We.createElement(\"tbody\",null,s.entrySeq().map((([s,P])=>{let ee=i&&i.get(\"status\")==s?\"response_current\":\"\";return We.createElement(ae,{key:s,path:$,method:U,specPath:B.push(s),isDefault:Z===s,fn:x,className:ee,code:s,response:P,specSelectors:w,controlsAcceptHeader:P===ce,onContentTypeChange:this.onResponseContentTypeChange,contentType:j,getConfigs:_,activeExamplesKey:Y.activeExamplesMember($,U,\"responses\",s),oas3Actions:X,getComponent:u})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(s){const i=function canJsonParse(s){try{return!!JSON.parse(s)}catch(s){return null}}(s);return i?\"json\":null}class response_Response extends We.Component{constructor(s,i){super(s,i),this.state={responseContentType:\"\"}}static defaultProps={response:(0,Xe.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=s=>{const{onContentTypeChange:i,controlsAcceptHeader:u}=this.props;this.setState({responseContentType:s}),i({value:s,controlsAcceptHeader:u})};getTargetExamplesKey=()=>{const{response:s,contentType:i,activeExamplesKey:u}=this.props,_=this.state.responseContentType||i,w=s.getIn([\"content\",_],(0,Xe.Map)({})).get(\"examples\",null).keySeq().first();return u||w};render(){let{path:s,method:i,code:u,response:_,className:w,specPath:x,fn:j,getComponent:P,getConfigs:B,specSelectors:$,contentType:U,controlsAcceptHeader:Y,oas3Actions:X}=this.props,{inferSchema:Z,getSampleSchema:ee}=j,ie=$.isOAS3();const{showExtensions:ae}=B();let le=ae?getExtensions(_):null,ce=_.get(\"headers\"),pe=_.get(\"links\");const de=P(\"ResponseExtension\"),fe=P(\"headers\"),ye=P(\"highlightCode\"),be=P(\"modelExample\"),_e=P(\"Markdown\",!0),we=P(\"operationLink\"),Se=P(\"contentType\"),xe=P(\"ExamplesSelect\"),Pe=P(\"Example\");var Te,Re;const qe=this.state.responseContentType||U,$e=_.getIn([\"content\",qe],(0,Xe.Map)({})),ze=$e.get(\"examples\",null);if(ie){const s=$e.get(\"schema\");Te=s?Z(s.toJS()):null,Re=s?(0,Xe.List)([\"content\",this.state.responseContentType,\"schema\"]):x}else Te=_.get(\"schema\"),Re=_.has(\"schema\")?x.push(\"schema\"):x;let He,Ye,Qe=!1,et={includeReadOnly:!0};if(ie)if(Ye=$e.get(\"schema\")?.toJS(),ze){const s=this.getTargetExamplesKey(),getMediaTypeExample=s=>s.get(\"value\");He=getMediaTypeExample(ze.get(s,(0,Xe.Map)({}))),void 0===He&&(He=getMediaTypeExample(ze.values().next().value)),Qe=!0}else void 0!==$e.get(\"example\")&&(He=$e.get(\"example\"),Qe=!0);else{Ye=Te,et={...et,includeWriteOnly:!0};const s=_.getIn([\"examples\",qe]);s&&(He=s,Qe=!0)}const tt=((s,i,u)=>{if(null==s)return null;const _=getKnownSyntaxHighlighterLanguage(s)?\"json\":null;return We.createElement(\"div\",null,We.createElement(i,{className:\"example\",getConfigs:u,language:_,value:stringify(s)}))})(ee(Ye,qe,et,Qe?He:void 0),ye,B);return We.createElement(\"tr\",{className:\"response \"+(w||\"\"),\"data-code\":u},We.createElement(\"td\",{className:\"response-col_status\"},u),We.createElement(\"td\",{className:\"response-col_description\"},We.createElement(\"div\",{className:\"response-col_description__inner\"},We.createElement(_e,{source:_.get(\"description\")})),ae&&le.size?le.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null,ie&&_.get(\"content\")?We.createElement(\"section\",{className:\"response-controls\"},We.createElement(\"div\",{className:KO()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":Y})},We.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),We.createElement(Se,{value:this.state.responseContentType,contentTypes:_.get(\"content\")?_.get(\"content\").keySeq():(0,Xe.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),Y?We.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",We.createElement(\"code\",null,\"Accept\"),\" header.\"):null),ze?We.createElement(\"div\",{className:\"response-control-examples\"},We.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),We.createElement(xe,{examples:ze,currentExampleKey:this.getTargetExamplesKey(),onSelect:_=>X.setActiveExamplesMember({name:_,pathMethod:[s,i],contextType:\"responses\",contextName:u}),showLabels:!1})):null):null,tt||Te?We.createElement(be,{specPath:Re,getComponent:P,getConfigs:B,specSelectors:$,schema:fromJSOrdered(Te),example:tt,includeReadOnly:!0}):null,ie&&ze?We.createElement(Pe,{example:ze.get(this.getTargetExamplesKey(),(0,Xe.Map)({})),getComponent:P,getConfigs:B,omitValue:!0}):null,ce?We.createElement(fe,{headers:ce,getComponent:P}):null),ie?We.createElement(\"td\",{className:\"response-col_links\"},pe?pe.toSeq().entrySeq().map((([s,i])=>We.createElement(we,{key:s,name:s,link:i,getComponent:P}))):We.createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:s,xVal:i})=>We.createElement(\"div\",{className:\"response__extension\"},s,\": \",String(i));var GO=__webpack_require__(26657),YO=__webpack_require__.n(GO),XO=__webpack_require__(80218),QO=__webpack_require__.n(XO);class ResponseBody extends We.PureComponent{state={parsedContent:null};updateParsedContent=s=>{const{content:i}=this.props;if(s!==i)if(i&&i instanceof Blob){var u=new FileReader;u.onload=()=>{this.setState({parsedContent:u.result})},u.readAsText(i)}else this.setState({parsedContent:i.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(s){this.updateParsedContent(s.content)}render(){let{content:s,contentType:i,url:u,headers:_={},getConfigs:w,getComponent:x}=this.props;const{parsedContent:j}=this.state,P=x(\"highlightCode\"),B=\"response_\"+(new Date).getTime();let $,U;if(u=u||\"\",(/^application\\/octet-stream/i.test(i)||_[\"Content-Disposition\"]&&/attachment/i.test(_[\"Content-Disposition\"])||_[\"content-disposition\"]&&/attachment/i.test(_[\"content-disposition\"])||_[\"Content-Description\"]&&/File Transfer/i.test(_[\"Content-Description\"])||_[\"content-description\"]&&/File Transfer/i.test(_[\"content-description\"]))&&(s.size>0||s.length>0))if(\"Blob\"in window){let w=i||\"text/html\",x=s instanceof Blob?s:new Blob([s],{type:w}),j=window.URL.createObjectURL(x),P=[w,u.substr(u.lastIndexOf(\"/\")+1),j].join(\":\"),B=_[\"content-disposition\"]||_[\"Content-Disposition\"];if(void 0!==B){let s=function extractFileNameFromContentDispositionHeader(s){let i;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((u=>(i=u.exec(s),null!==i))),null!==i&&i.length>1)try{return decodeURIComponent(i[1])}catch(s){console.error(s)}return null}(B);null!==s&&(P=s)}U=pt.navigator&&pt.navigator.msSaveOrOpenBlob?We.createElement(\"div\",null,We.createElement(\"a\",{href:j,onClick:()=>pt.navigator.msSaveOrOpenBlob(x,P)},\"Download file\")):We.createElement(\"div\",null,We.createElement(\"a\",{href:j,download:P},\"Download file\"))}else U=We.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(i)){let i=null;getKnownSyntaxHighlighterLanguage(s)&&(i=\"json\");try{$=JSON.stringify(JSON.parse(s),null,\"  \")}catch(i){$=\"can't parse JSON.  Raw result:\\n\\n\"+s}U=We.createElement(P,{language:i,downloadable:!0,fileName:`${B}.json`,value:$,getConfigs:w,canCopy:!0})}else/xml/i.test(i)?($=YO()(s,{textNodesOnSameLine:!0,indentor:\"  \"}),U=We.createElement(P,{downloadable:!0,fileName:`${B}.xml`,value:$,getConfigs:w,canCopy:!0})):U=\"text/html\"===QO()(i)||/text\\/plain/.test(i)?We.createElement(P,{downloadable:!0,fileName:`${B}.html`,value:s,getConfigs:w,canCopy:!0}):\"text/csv\"===QO()(i)||/text\\/csv/.test(i)?We.createElement(P,{downloadable:!0,fileName:`${B}.csv`,value:s,getConfigs:w,canCopy:!0}):/^image\\//i.test(i)?i.includes(\"svg\")?We.createElement(\"div\",null,\" \",s,\" \"):We.createElement(\"img\",{src:window.URL.createObjectURL(s)}):/^audio\\//i.test(i)?We.createElement(\"pre\",{className:\"microlight\"},We.createElement(\"audio\",{controls:!0,key:u},We.createElement(\"source\",{src:u,type:i}))):\"string\"==typeof s?We.createElement(P,{downloadable:!0,fileName:`${B}.txt`,value:s,getConfigs:w,canCopy:!0}):s.size>0?j?We.createElement(\"div\",null,We.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),We.createElement(P,{downloadable:!0,fileName:`${B}.txt`,value:j,getConfigs:w,canCopy:!0})):We.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return U?We.createElement(\"div\",null,We.createElement(\"h5\",null,\"Response body\"),U):null}}class Parameters extends We.Component{constructor(s){super(s),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(s,i,u)=>{let{specActions:{changeParamByIdentity:_},onChangeKey:w}=this.props;_(w,s,i,u)};onChangeConsumesWrapper=s=>{let{specActions:{changeConsumesValue:i},onChangeKey:u}=this.props;i(u,s)};toggleTab=s=>\"parameters\"===s?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===s?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:s,pathMethod:i})=>{let{specActions:u,oas3Selectors:_,oas3Actions:w}=this.props;const x=_.hasUserEditedBody(...i),j=_.shouldRetainRequestBodyValue(...i);w.setRequestContentType({value:s,pathMethod:i}),w.initRequestBodyValidateError({pathMethod:i}),x||(j||w.setRequestBodyValue({value:void 0,pathMethod:i}),u.clearResponse(...i),u.clearRequest(...i),u.clearValidateParams(i))};render(){let{onTryoutClick:s,onResetClick:i,parameters:u,allowTryItOut:_,tryItOutEnabled:w,specPath:x,fn:j,getComponent:P,getConfigs:B,specSelectors:$,specActions:U,pathMethod:Y,oas3Actions:X,oas3Selectors:Z,operation:ee}=this.props;const ie=P(\"parameterRow\"),ae=P(\"TryItOutButton\"),le=P(\"contentType\"),ce=P(\"Callbacks\",!0),pe=P(\"RequestBody\",!0),de=w&&_,fe=$.isOAS3(),ye=`${createHtmlReadyId(`${Y[1]}${Y[0]}_requests`)}_select`,be=ee.get(\"requestBody\"),_e=Object.values(u.reduce(((s,i)=>{const u=i.get(\"in\");return s[u]??=[],s[u].push(i),s}),{})).reduce(((s,i)=>s.concat(i)),[]);return We.createElement(\"div\",{className:\"opblock-section\"},We.createElement(\"div\",{className:\"opblock-section-header\"},fe?We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},We.createElement(\"h4\",{className:\"opblock-title\"},We.createElement(\"span\",null,\"Parameters\"))),ee.get(\"callbacks\")?We.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},We.createElement(\"h4\",{className:\"opblock-title\"},We.createElement(\"span\",null,\"Callbacks\"))):null):We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),_?We.createElement(ae,{isOAS3:$.isOAS3(),hasUserEditedBody:Z.hasUserEditedBody(...Y),enabled:w,onCancelClick:this.props.onCancelClick,onTryoutClick:s,onResetClick:()=>i(Y)}):null),this.state.parametersVisible?We.createElement(\"div\",{className:\"parameters-container\"},_e.length?We.createElement(\"div\",{className:\"table-container\"},We.createElement(\"table\",{className:\"parameters\"},We.createElement(\"thead\",null,We.createElement(\"tr\",null,We.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),We.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),We.createElement(\"tbody\",null,_e.map(((s,i)=>We.createElement(ie,{fn:j,specPath:x.push(i.toString()),getComponent:P,getConfigs:B,rawParam:s,param:$.parameterWithMetaByIdentity(Y,s),key:`${s.get(\"in\")}.${s.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:$,specActions:U,oas3Actions:X,oas3Selectors:Z,pathMethod:Y,isExecute:de})))))):We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?We.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},We.createElement(ce,{callbacks:(0,Xe.Map)(ee.get(\"callbacks\")),specPath:x.slice(0,-1).push(\"callbacks\")})):null,fe&&be&&this.state.parametersVisible&&We.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"h4\",{className:`opblock-title parameter__name ${be.get(\"required\")&&\"required\"}`},\"Request body\"),We.createElement(\"label\",{id:ye},We.createElement(le,{value:Z.requestContentType(...Y),contentTypes:be.get(\"content\",(0,Xe.List)()).keySeq(),onChange:s=>{this.onChangeMediaType({value:s,pathMethod:Y})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:ye}))),We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(pe,{setRetainRequestBodyValueFlag:s=>X.setRetainRequestBodyValueFlag({value:s,pathMethod:Y}),userHasEditedBody:Z.hasUserEditedBody(...Y),specPath:x.slice(0,-1).push(\"requestBody\"),requestBody:be,requestBodyValue:Z.requestBodyValue(...Y),requestBodyInclusionSetting:Z.requestBodyInclusionSetting(...Y),requestBodyErrors:Z.requestBodyErrors(...Y),isExecute:de,getConfigs:B,activeExamplesKey:Z.activeExamplesMember(...Y,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(s,i)=>{if(i){const u=Z.requestBodyValue(...Y),_=Xe.Map.isMap(u)?u:(0,Xe.Map)();return X.setRequestBodyValue({pathMethod:Y,value:_.setIn(i,s)})}X.setRequestBodyValue({value:s,pathMethod:Y})},onChangeIncludeEmpty:(s,i)=>{X.setRequestBodyInclusion({pathMethod:Y,value:i,name:s})},contentType:Z.requestContentType(...Y)}))))}}const parameter_extension=({xKey:s,xVal:i})=>We.createElement(\"div\",{className:\"parameter__extension\"},s,\": \",String(i)),ZO={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends We.Component{static defaultProps=ZO;componentDidMount(){const{isIncludedOptions:s,onChange:i}=this.props,{shouldDispatchInit:u,defaultValue:_}=s;u&&i(_)}onCheckboxChange=s=>{const{onChange:i}=this.props;i(s.target.checked)};render(){let{isIncluded:s,isDisabled:i}=this.props;return We.createElement(\"div\",null,We.createElement(\"label\",{htmlFor:\"include_empty_value\",className:KO()(\"parameter__empty_value_toggle\",{disabled:i})},We.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:i,checked:!i&&s,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends We.Component{constructor(s,i){super(s,i),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(s){let i,{specSelectors:u,pathMethod:_,rawParam:w}=s,x=u.isOAS3(),j=u.parameterWithMetaByIdentity(_,w)||new Xe.Map;if(j=j.isEmpty()?w:j,x){let{schema:s}=getParameterSchema(j,{isOAS3:x});i=s?s.get(\"enum\"):void 0}else i=j?j.get(\"enum\"):void 0;let P,B=j?j.get(\"value\"):void 0;void 0!==B?P=B:w.get(\"required\")&&i&&i.size&&(P=i.first()),void 0!==P&&P!==B&&this.onChangeWrapper(function numberToString(s){return\"number\"==typeof s?s.toString():s}(P)),this.setDefaultValue()}onChangeWrapper=(s,i=!1)=>{let u,{onChange:_,rawParam:w}=this.props;return u=\"\"===s||s&&0===s.size?null:s,_(w,u,i)};_onExampleSelect=s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=s=>{let{specActions:i,param:u,pathMethod:_}=this.props;const w=u.get(\"name\"),x=u.get(\"in\");return i.updateEmptyParamInclusion(_,w,x,s)};setDefaultValue=()=>{let{specSelectors:s,pathMethod:i,rawParam:u,oas3Selectors:_,fn:w}=this.props;const x=s.parameterWithMetaByIdentity(i,u)||(0,Xe.Map)(),{schema:j}=getParameterSchema(x,{isOAS3:s.isOAS3()}),P=x.get(\"content\",(0,Xe.Map)()).keySeq().first(),B=j?w.getSampleSchema(j.toJS(),P,{includeWriteOnly:!0}):null;if(x&&void 0===x.get(\"value\")&&\"body\"!==x.get(\"in\")){let u;if(s.isSwagger2())u=void 0!==x.get(\"x-example\")?x.get(\"x-example\"):void 0!==x.getIn([\"schema\",\"example\"])?x.getIn([\"schema\",\"example\"]):j&&j.getIn([\"default\"]);else if(s.isOAS3()){const s=_.activeExamplesMember(...i,\"parameters\",this.getParamKey());u=void 0!==x.getIn([\"examples\",s,\"value\"])?x.getIn([\"examples\",s,\"value\"]):void 0!==x.getIn([\"content\",P,\"example\"])?x.getIn([\"content\",P,\"example\"]):void 0!==x.get(\"example\")?x.get(\"example\"):void 0!==(j&&j.get(\"example\"))?j&&j.get(\"example\"):void 0!==(j&&j.get(\"default\"))?j&&j.get(\"default\"):x.get(\"default\")}void 0===u||Xe.List.isList(u)||(u=stringify(u)),void 0!==u?this.onChangeWrapper(u):j&&\"object\"===j.get(\"type\")&&B&&!x.get(\"examples\")&&this.onChangeWrapper(Xe.List.isList(B)?B:stringify(B))}};getParamKey(){const{param:s}=this.props;return s?`${s.get(\"name\")}-${s.get(\"in\")}`:null}render(){let{param:s,rawParam:i,getComponent:u,getConfigs:_,isExecute:w,fn:x,onChangeConsumes:j,specSelectors:P,pathMethod:B,specPath:$,oas3Selectors:U}=this.props,Y=P.isOAS3();const{showExtensions:X,showCommonExtensions:Z}=_();if(s||(s=i),!i)return null;const ee=u(\"JsonSchemaForm\"),ie=u(\"ParamBody\");let ae=s.get(\"in\"),le=\"body\"!==ae?null:We.createElement(ie,{getComponent:u,getConfigs:_,fn:x,param:s,consumes:P.consumesOptionsFor(B),consumesValue:P.contentTypeValues(B).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:j,isExecute:w,specSelectors:P,pathMethod:B});const ce=u(\"modelExample\"),pe=u(\"Markdown\",!0),de=u(\"ParameterExt\"),fe=u(\"ParameterIncludeEmpty\"),ye=u(\"ExamplesSelectValueRetainer\"),be=u(\"Example\");let _e,we,Se,xe,{schema:Pe}=getParameterSchema(s,{isOAS3:Y}),Te=P.parameterWithMetaByIdentity(B,i)||(0,Xe.Map)(),Re=Pe?Pe.get(\"format\"):null,qe=Pe?Pe.get(\"type\"):null,$e=Pe?Pe.getIn([\"items\",\"type\"]):null,ze=\"formData\"===ae,He=\"FormData\"in pt,Ye=s.get(\"required\"),Qe=Te?Te.get(\"value\"):\"\",et=Z?getCommonExtensions(Pe):null,tt=X?getExtensions(s):null,rt=!1;return void 0!==s&&Pe&&(_e=Pe.get(\"items\")),void 0!==_e?(we=_e.get(\"enum\"),Se=_e.get(\"default\")):Pe&&(we=Pe.get(\"enum\")),we&&we.size&&we.size>0&&(rt=!0),void 0!==s&&(Pe&&(Se=Pe.get(\"default\")),void 0===Se&&(Se=s.get(\"default\")),xe=s.get(\"example\"),void 0===xe&&(xe=s.get(\"x-example\"))),We.createElement(\"tr\",{\"data-param-name\":s.get(\"name\"),\"data-param-in\":s.get(\"in\")},We.createElement(\"td\",{className:\"parameters-col_name\"},We.createElement(\"div\",{className:Ye?\"parameter__name required\":\"parameter__name\"},s.get(\"name\"),Ye?We.createElement(\"span\",null,\" *\"):null),We.createElement(\"div\",{className:\"parameter__type\"},qe,$e&&`[${$e}]`,Re&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",Re,\")\")),We.createElement(\"div\",{className:\"parameter__deprecated\"},Y&&s.get(\"deprecated\")?\"deprecated\":null),We.createElement(\"div\",{className:\"parameter__in\"},\"(\",s.get(\"in\"),\")\"),Z&&et.size?et.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null,X&&tt.size?tt.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,xKey:s,xVal:i}))):null),We.createElement(\"td\",{className:\"parameters-col_description\"},s.get(\"description\")?We.createElement(pe,{source:s.get(\"description\")}):null,!le&&w||!rt?null:We.createElement(pe,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+we.map((function(s){return s})).toArray().join(\", \")}),!le&&w||void 0===Se?null:We.createElement(pe,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+Se}),!le&&w||void 0===xe?null:We.createElement(pe,{source:\"<i>Example</i> : \"+xe}),ze&&!He&&We.createElement(\"div\",null,\"Error: your browser does not support FormData\"),Y&&s.get(\"examples\")?We.createElement(\"section\",{className:\"parameter-controls\"},We.createElement(ye,{examples:s.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:u,defaultToFirstExample:!0,currentKey:U.activeExamplesMember(...B,\"parameters\",this.getParamKey()),currentUserInputValue:Qe})):null,le?null:We.createElement(ee,{fn:x,getComponent:u,value:Qe,required:Ye,disabled:!w,description:s.get(\"name\"),onChange:this.onChangeWrapper,errors:Te.get(\"errors\"),schema:Pe}),le&&Pe?We.createElement(ce,{getComponent:u,specPath:$.push(\"schema\"),getConfigs:_,isExecute:w,specSelectors:P,schema:Pe,example:le,includeWriteOnly:!0}):null,!le&&w&&s.get(\"allowEmptyValue\")?We.createElement(fe,{onChange:this.onChangeIncludeEmpty,isIncluded:P.parameterInclusionSettingFor(B,s.get(\"name\"),s.get(\"in\")),isDisabled:!isEmptyValue(Qe)}):null,Y&&s.get(\"examples\")?We.createElement(be,{example:s.getIn([\"examples\",U.activeExamplesMember(...B,\"parameters\",this.getParamKey())]),getComponent:u,getConfigs:_}):null))}}class Execute extends We.Component{handleValidateParameters=()=>{let{specSelectors:s,specActions:i,path:u,method:_}=this.props;return i.validateParams([u,_]),s.validateBeforeExecute([u,_])};handleValidateRequestBody=()=>{let{path:s,method:i,specSelectors:u,oas3Selectors:_,oas3Actions:w}=this.props,x={missingBodyValue:!1,missingRequiredKeys:[]};w.clearRequestBodyValidateError({path:s,method:i});let j=u.getOAS3RequiredRequestBodyContentType([s,i]),P=_.requestBodyValue(s,i),B=_.validateBeforeExecute([s,i]),$=_.requestContentType(s,i);if(!B)return x.missingBodyValue=!0,w.setRequestBodyValidateError({path:s,method:i,validationErrors:x}),!1;if(!j)return!0;let U=_.validateShallowRequired({oas3RequiredRequestBodyContentType:j,oas3RequestContentType:$,oas3RequestBodyValue:P});return!U||U.length<1||(U.forEach((s=>{x.missingRequiredKeys.push(s)})),w.setRequestBodyValidateError({path:s,method:i,validationErrors:x}),!1)};handleValidationResultPass=()=>{let{specActions:s,operation:i,path:u,method:_}=this.props;this.props.onExecute&&this.props.onExecute(),s.execute({operation:i,path:u,method:_})};handleValidationResultFail=()=>{let{specActions:s,path:i,method:u}=this.props;s.clearValidateParams([i,u]),setTimeout((()=>{s.validateParams([i,u])}),40)};handleValidationResult=s=>{s?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let s=this.handleValidateParameters(),i=this.handleValidateRequestBody(),u=s&&i;this.handleValidationResult(u)};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);render(){const{disabled:s}=this.props;return We.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:s},\"Execute\")}}class headers_Headers extends We.Component{render(){let{headers:s,getComponent:i}=this.props;const u=i(\"Property\"),_=i(\"Markdown\",!0);return s&&s.size?We.createElement(\"div\",{className:\"headers-wrapper\"},We.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),We.createElement(\"table\",{className:\"headers\"},We.createElement(\"thead\",null,We.createElement(\"tr\",{className:\"header-row\"},We.createElement(\"th\",{className:\"header-col\"},\"Name\"),We.createElement(\"th\",{className:\"header-col\"},\"Description\"),We.createElement(\"th\",{className:\"header-col\"},\"Type\"))),We.createElement(\"tbody\",null,s.entrySeq().map((([s,i])=>{if(!Qe().Map.isMap(i))return null;const w=i.get(\"description\"),x=i.getIn([\"schema\"])?i.getIn([\"schema\",\"type\"]):i.getIn([\"type\"]),j=i.getIn([\"schema\",\"example\"]);return We.createElement(\"tr\",{key:s},We.createElement(\"td\",{className:\"header-col\"},s),We.createElement(\"td\",{className:\"header-col\"},w?We.createElement(_,{source:w}):null),We.createElement(\"td\",{className:\"header-col\"},x,\" \",j?We.createElement(u,{propKey:\"Example\",propVal:j,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends We.Component{render(){let{editorActions:s,errSelectors:i,layoutSelectors:u,layoutActions:_,getComponent:w}=this.props;const x=w(\"Collapse\");if(s&&s.jumpToLine)var j=s.jumpToLine;let P=i.allErrors().filter((s=>\"thrown\"===s.get(\"type\")||\"error\"===s.get(\"level\")));if(!P||P.count()<1)return null;let B=u.isShown([\"errorPane\"],!0),$=P.sortBy((s=>s.get(\"line\")));return We.createElement(\"pre\",{className:\"errors-wrapper\"},We.createElement(\"hgroup\",{className:\"error\"},We.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),We.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>_.show([\"errorPane\"],!B)},B?\"Hide\":\"Show\")),We.createElement(x,{isOpened:B,animated:!0},We.createElement(\"div\",{className:\"errors\"},$.map(((s,i)=>{let u=s.get(\"type\");return\"thrown\"===u||\"auth\"===u?We.createElement(ThrownErrorItem,{key:i,error:s.get(\"error\")||s,jumpToLine:j}):\"spec\"===u?We.createElement(SpecErrorItem,{key:i,error:s,jumpToLine:j}):void 0})))))}}const ThrownErrorItem=({error:s,jumpToLine:i})=>{if(!s)return null;let u=s.get(\"line\");return We.createElement(\"div\",{className:\"error-wrapper\"},s?We.createElement(\"div\",null,We.createElement(\"h4\",null,s.get(\"source\")&&s.get(\"level\")?toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"):\"\",s.get(\"path\")?We.createElement(\"small\",null,\" at \",s.get(\"path\")):null),We.createElement(\"span\",{className:\"message thrown\"},s.get(\"message\")),We.createElement(\"div\",{className:\"error-line\"},u&&i?We.createElement(\"a\",{onClick:i.bind(null,u)},\"Jump to line \",u):null)):null)},SpecErrorItem=({error:s,jumpToLine:i=null})=>{let u=null;return s.get(\"path\")?u=Xe.List.isList(s.get(\"path\"))?We.createElement(\"small\",null,\"at \",s.get(\"path\").join(\".\")):We.createElement(\"small\",null,\"at \",s.get(\"path\")):s.get(\"line\")&&!i&&(u=We.createElement(\"small\",null,\"on line \",s.get(\"line\"))),We.createElement(\"div\",{className:\"error-wrapper\"},s?We.createElement(\"div\",null,We.createElement(\"h4\",null,toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"),\" \",u),We.createElement(\"span\",{className:\"message\"},s.get(\"message\")),We.createElement(\"div\",{className:\"error-line\"},i?We.createElement(\"a\",{onClick:i.bind(null,s.get(\"line\"))},\"Jump to line \",s.get(\"line\")):null)):null)};function toTitleCase(s){return(s||\"\").split(\" \").map((s=>s[0].toUpperCase()+s.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends We.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,Xe.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(s){s.contentTypes&&s.contentTypes.size&&(s.contentTypes.includes(s.value)||s.onChange(s.contentTypes.first()))}onChangeWrapper=s=>this.props.onChange(s.target.value);render(){let{ariaControls:s,ariaLabel:i,className:u,contentTypes:_,controlId:w,value:x}=this.props;return _&&_.size?We.createElement(\"div\",{className:\"content-type-wrapper \"+(u||\"\")},We.createElement(\"select\",{\"aria-controls\":s,\"aria-label\":i,className:\"content-type\",id:w,onChange:this.onChangeWrapper,value:x||\"\"},_.map((s=>We.createElement(\"option\",{key:s,value:s},s))).toArray())):null}}function xclass(...s){return s.filter((s=>!!s)).join(\" \").trim()}class Container extends We.Component{render(){let{fullscreen:s,full:i,...u}=this.props;if(s)return We.createElement(\"section\",u);let _=\"swagger-container\"+(i?\"-full\":\"\");return We.createElement(\"section\",Co()({},u,{className:xclass(u.className,_)}))}}const eC={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends We.Component{render(){const{hide:s,keepContents:i,mobile:u,tablet:_,desktop:w,large:x,...j}=this.props;if(s&&!i)return We.createElement(\"span\",null);let P=[];for(let s in eC){if(!Object.prototype.hasOwnProperty.call(eC,s))continue;let i=eC[s];if(s in this.props){let u=this.props[s];if(u<1){P.push(\"none\"+i);continue}P.push(\"block\"+i),P.push(\"col-\"+u+i)}}s&&P.push(\"hidden\");let B=xclass(j.className,...P);return We.createElement(\"section\",Co()({},j,{className:B}))}}class Row extends We.Component{render(){return We.createElement(\"div\",Co()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends We.Component{static defaultProps={className:\"\"};render(){return We.createElement(\"button\",Co()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=s=>We.createElement(\"textarea\",s),Input=s=>We.createElement(\"input\",s);class Select extends We.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(s,i){let u;super(s,i),u=s.value?s.value:s.multiple?[\"\"]:\"\",this.state={value:u}}onChange=s=>{let i,{onChange:u,multiple:_}=this.props,w=[].slice.call(s.target.options);i=_?w.filter((function(s){return s.selected})).map((function(s){return s.value})):s.target.value,this.setState({value:i}),u&&u(i)};UNSAFE_componentWillReceiveProps(s){s.value!==this.props.value&&this.setState({value:s.value})}render(){let{allowedValues:s,multiple:i,allowEmptyValue:u,disabled:_}=this.props,w=this.state.value?.toJS?.()||this.state.value;return We.createElement(\"select\",{className:this.props.className,multiple:i,value:w,onChange:this.onChange,disabled:_},u?We.createElement(\"option\",{value:\"\"},\"--\"):null,s.map((function(s,i){return We.createElement(\"option\",{key:i,value:String(s)},String(s))})))}}class layout_utils_Link extends We.Component{render(){return We.createElement(\"a\",Co()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:s})=>We.createElement(\"div\",{className:\"no-margin\"},\" \",s,\" \");class Collapse extends We.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?We.createElement(NoMargin,null,this.props.children):We.createElement(\"noscript\",null)}render(){let{animated:s,isOpened:i,children:u}=this.props;return s?(u=i?u:null,We.createElement(NoMargin,null,u)):this.renderNotAnimated()}}class Overview extends We.Component{constructor(...s){super(...s),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(s,i){this.props.layoutActions.show(s,i)}showOp(s,i){let{layoutActions:u}=this.props;u.show(s,i)}render(){let{specSelectors:s,layoutSelectors:i,layoutActions:u,getComponent:_}=this.props,w=s.taggedOperations();const x=_(\"Collapse\");return We.createElement(\"div\",null,We.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),w.map(((s,_)=>{let w=s.get(\"operations\"),j=[\"overview-tags\",_],P=i.isShown(j,!0);return We.createElement(\"div\",{key:\"overview-\"+_},We.createElement(\"h4\",{onClick:()=>u.show(j,!P),className:\"link overview-tag\"},\" \",P?\"-\":\"+\",_),We.createElement(x,{isOpened:P,animated:!0},w.map((s=>{let{path:_,method:w,id:x}=s.toObject(),j=\"operations\",P=x,B=i.isShown([j,P]);return We.createElement(OperationLink,{key:x,path:_,method:w,id:_+\"-\"+w,shown:B,showOpId:P,showOpIdPrefix:j,href:`#operation-${P}`,onClick:u.show})})).toArray()))})).toArray(),w.size<1&&We.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends We.Component{constructor(s){super(s),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:s,showOpIdPrefix:i,onClick:u,shown:_}=this.props;u([i,s],!_)}render(){let{id:s,method:i,shown:u,href:_}=this.props;return We.createElement(layout_utils_Link,{href:_,onClick:this.onClick,className:\"block opblock-link \"+(u?\"shown\":\"\")},We.createElement(\"div\",null,We.createElement(\"small\",{className:`bold-label-${i}`},i.toUpperCase()),We.createElement(\"span\",{className:\"bold-label\"},s)))}}class InitializedInput extends We.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:s,defaultValue:i,initialValue:u,..._}=this.props;return We.createElement(\"input\",Co()({},_,{ref:s=>this.inputRef=s}))}}class InfoBasePath extends We.Component{render(){const{host:s,basePath:i}=this.props;return We.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",s,i,\" ]\")}}class InfoUrl extends We.PureComponent{render(){const{url:s,getComponent:i}=this.props,u=i(\"Link\");return We.createElement(u,{target:\"_blank\",href:sanitizeUrl(s)},We.createElement(\"span\",{className:\"url\"},\" \",s))}}class info_Info extends We.Component{render(){const{info:s,url:i,host:u,basePath:_,getComponent:w,externalDocs:x,selectedServer:j,url:P}=this.props,B=s.get(\"version\"),$=s.get(\"description\"),U=s.get(\"title\"),Y=safeBuildUrl(s.get(\"termsOfService\"),P,{selectedServer:j}),X=s.get(\"contact\"),Z=s.get(\"license\"),ee=safeBuildUrl(x&&x.get(\"url\"),P,{selectedServer:j}),ie=x&&x.get(\"description\"),ae=w(\"Markdown\",!0),le=w(\"Link\"),ce=w(\"VersionStamp\"),pe=w(\"OpenAPIVersion\"),de=w(\"InfoUrl\"),fe=w(\"InfoBasePath\"),ye=w(\"License\"),be=w(\"Contact\");return We.createElement(\"div\",{className:\"info\"},We.createElement(\"hgroup\",{className:\"main\"},We.createElement(\"h2\",{className:\"title\"},U,We.createElement(\"span\",null,B&&We.createElement(ce,{version:B}),We.createElement(pe,{oasVersion:\"2.0\"}))),u||_?We.createElement(fe,{host:u,basePath:_}):null,i&&We.createElement(de,{getComponent:w,url:i})),We.createElement(\"div\",{className:\"description\"},We.createElement(ae,{source:$})),Y&&We.createElement(\"div\",{className:\"info__tos\"},We.createElement(le,{target:\"_blank\",href:sanitizeUrl(Y)},\"Terms of service\")),X?.size>0&&We.createElement(be,{getComponent:w,data:X,selectedServer:j,url:i}),Z?.size>0&&We.createElement(ye,{getComponent:w,license:Z,selectedServer:j,url:i}),ee?We.createElement(le,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(ee)},ie||ee):null)}}const tC=info_Info;class InfoContainer extends We.Component{render(){const{specSelectors:s,getComponent:i,oas3Selectors:u}=this.props,_=s.info(),w=s.url(),x=s.basePath(),j=s.host(),P=s.externalDocs(),B=u.selectedServer(),$=i(\"info\");return We.createElement(\"div\",null,_&&_.count()?We.createElement($,{info:_,url:w,host:j,basePath:x,externalDocs:P,getComponent:i,selectedServer:B}):null)}}class contact_Contact extends We.Component{render(){const{data:s,getComponent:i,selectedServer:u,url:_}=this.props,w=s.get(\"name\",\"the developer\"),x=safeBuildUrl(s.get(\"url\"),_,{selectedServer:u}),j=s.get(\"email\"),P=i(\"Link\");return We.createElement(\"div\",{className:\"info__contact\"},x&&We.createElement(\"div\",null,We.createElement(P,{href:sanitizeUrl(x),target:\"_blank\"},w,\" - Website\")),j&&We.createElement(P,{href:sanitizeUrl(`mailto:${j}`)},x?`Send email to ${w}`:`Contact ${w}`))}}const rC=contact_Contact;class license_License extends We.Component{render(){const{license:s,getComponent:i,selectedServer:u,url:_}=this.props,w=s.get(\"name\",\"License\"),x=safeBuildUrl(s.get(\"url\"),_,{selectedServer:u}),j=i(\"Link\");return We.createElement(\"div\",{className:\"info__license\"},x?We.createElement(\"div\",{className:\"info__license__url\"},We.createElement(j,{target:\"_blank\",href:sanitizeUrl(x)},w)):We.createElement(\"span\",null,w))}}const nC=license_License;class JumpToPath extends We.Component{render(){return null}}class CopyToClipboardBtn extends We.Component{render(){let{getComponent:s}=this.props;const i=s(\"CopyIcon\");return We.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},We.createElement(Bo.CopyToClipboard,{text:this.props.textToCopy},We.createElement(i,null)))}}class Footer extends We.Component{render(){return We.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends We.Component{onFilterChange=s=>{const{target:{value:i}}=s;this.props.layoutActions.updateFilter(i)};render(){const{specSelectors:s,layoutSelectors:i,getComponent:u}=this.props,_=u(\"Col\"),w=\"loading\"===s.loadingStatus(),x=\"failed\"===s.loadingStatus(),j=i.currentFilter(),P=[\"operation-filter-input\"];return x&&P.push(\"failed\"),w&&P.push(\"loading\"),We.createElement(\"div\",null,null===j||!1===j||\"false\"===j?null:We.createElement(\"div\",{className:\"filter-container\"},We.createElement(_,{className:\"filter wrapper\",mobile:12},We.createElement(\"input\",{className:P.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:!0===j||\"true\"===j?\"\":j,disabled:w}))))}}const oC=Function.prototype;class ParamBody extends We.PureComponent{static defaultProp={consumes:(0,Xe.fromJS)([\"application/json\"]),param:(0,Xe.fromJS)({}),onChange:oC,onChangeConsumes:oC};constructor(s,i){super(s,i),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(s){this.updateValues.call(this,s)}updateValues=s=>{let{param:i,isExecute:u,consumesValue:_=\"\"}=s,w=/xml/i.test(_),x=/json/i.test(_),j=w?i.get(\"value_xml\"):i.get(\"value\");if(void 0!==j){let s=!j&&x?\"{}\":j;this.setState({value:s}),this.onChange(s,{isXml:w,isEditBox:u})}else w?this.onChange(this.sample(\"xml\"),{isXml:w,isEditBox:u}):this.onChange(this.sample(),{isEditBox:u})};sample=s=>{let{param:i,fn:u}=this.props,_=u.inferSchema(i.toJS());return u.getSampleSchema(_,s,{includeWriteOnly:!0})};onChange=(s,{isEditBox:i,isXml:u})=>{this.setState({value:s,isEditBox:i}),this._onChange(s,u)};_onChange=(s,i)=>{(this.props.onChange||oC)(s,i)};handleOnChange=s=>{const{consumesValue:i}=this.props,u=/xml/i.test(i),_=s.target.value;this.onChange(_,{isXml:u,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((s=>({isEditBox:!s.isEditBox})));render(){let{onChangeConsumes:s,param:i,isExecute:u,specSelectors:_,pathMethod:w,getConfigs:x,getComponent:j}=this.props;const P=j(\"Button\"),B=j(\"TextArea\"),$=j(\"highlightCode\"),U=j(\"contentType\");let Y=(_?_.parameterWithMetaByIdentity(w,i):i).get(\"errors\",(0,Xe.List)()),X=_.contentTypeValues(w).get(\"requestContentType\"),Z=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:ee,isEditBox:ie}=this.state,ae=null;getKnownSyntaxHighlighterLanguage(ee)&&(ae=\"json\");const le=`${createHtmlReadyId(`${w[1]}${w[0]}_parameters`)}_select`;return We.createElement(\"div\",{className:\"body-param\",\"data-param-name\":i.get(\"name\"),\"data-param-in\":i.get(\"in\")},ie&&u?We.createElement(B,{className:\"body-param__text\"+(Y.count()?\" invalid\":\"\"),value:ee,onChange:this.handleOnChange}):ee&&We.createElement($,{className:\"body-param__example\",language:ae,getConfigs:x,value:ee}),We.createElement(\"div\",{className:\"body-param-options\"},u?We.createElement(\"div\",{className:\"body-param-edit\"},We.createElement(P,{className:ie?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},ie?\"Cancel\":\"Edit\")):null,We.createElement(\"label\",{htmlFor:le},We.createElement(\"span\",null,\"Parameter content type\"),We.createElement(U,{value:X,contentTypes:Z,onChange:s,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:le}))))}}class Curl extends We.Component{render(){let{request:s,getConfigs:i}=this.props,u=requestSnippetGenerator_curl_bash(s);const _=i(),w=Eo()(_,\"syntaxHighlight.activated\")?We.createElement(Vo,{language:\"bash\",className:\"curl microlight\",style:getStyle(Eo()(_,\"syntaxHighlight.theme\"))},u):We.createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:u});return We.createElement(\"div\",{className:\"curl-command\"},We.createElement(\"h4\",null,\"Curl\"),We.createElement(\"div\",{className:\"copy-to-clipboard\"},We.createElement(Bo.CopyToClipboard,{text:u},We.createElement(\"button\",null))),We.createElement(\"div\",null,w))}}class Schemes extends We.Component{UNSAFE_componentWillMount(){let{schemes:s}=this.props;this.setScheme(s.first())}UNSAFE_componentWillReceiveProps(s){this.props.currentScheme&&s.schemes.includes(this.props.currentScheme)||this.setScheme(s.schemes.first())}onChange=s=>{this.setScheme(s.target.value)};setScheme=s=>{let{path:i,method:u,specActions:_}=this.props;_.setScheme(s,i,u)};render(){let{schemes:s,currentScheme:i}=this.props;return We.createElement(\"label\",{htmlFor:\"schemes\"},We.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),We.createElement(\"select\",{onChange:this.onChange,value:i,id:\"schemes\"},s.valueSeq().map((s=>We.createElement(\"option\",{value:s,key:s},s))).toArray()))}}class SchemesContainer extends We.Component{render(){const{specActions:s,specSelectors:i,getComponent:u}=this.props,_=i.operationScheme(),w=i.schemes(),x=u(\"schemes\");return w&&w.size?We.createElement(x,{currentScheme:_,schemes:w,specActions:s}):null}}class ModelCollapse extends We.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:Qe().List([])};constructor(s,i){super(s,i);let{expanded:u,collapsedContent:_}=this.props;this.state={expanded:u,collapsedContent:_||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:s,expanded:i,modelName:u}=this.props;s&&i&&this.props.onToggle(u,i)}UNSAFE_componentWillReceiveProps(s){this.props.expanded!==s.expanded&&this.setState({expanded:s.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=s=>{if(s&&this.props.layoutSelectors){const i=this.props.layoutSelectors.getScrollToKey();Qe().is(i,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,s.parentElement)}};render(){const{title:s,classes:i}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?We.createElement(\"span\",{className:i||\"\"},this.props.children):We.createElement(\"span\",{className:i||\"\",ref:this.onLoad},We.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},s&&We.createElement(\"span\",{className:\"pointer\"},s),We.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&We.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:s,isExecute:i,schema:u,example:_})=>{const w=(0,We.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),x=(0,We.useMemo)((()=>Object.keys(w)),[w]).includes(s)&&u&&!i?s:w.example,j=(s=>{const i=(0,We.useRef)();return(0,We.useEffect)((()=>{i.current=s})),i.current})(i),[P,B]=(0,We.useState)(x),$=(0,We.useCallback)((s=>{B(s.target.dataset.name)}),[]);return(0,We.useEffect)((()=>{j&&!i&&_&&B(w.example)}),[j,i,_]),{activeTab:P,onTabChange:$,tabs:w}},model_example=({schema:s,example:i,isExecute:u=!1,specPath:_,includeWriteOnly:w=!1,includeReadOnly:x=!1,getComponent:j,getConfigs:P,specSelectors:B})=>{const{defaultModelRendering:$,defaultModelExpandDepth:U}=P(),Y=j(\"ModelWrapper\"),X=j(\"highlightCode\"),Z=Ct()(5).toString(\"base64\"),ee=Ct()(5).toString(\"base64\"),ie=Ct()(5).toString(\"base64\"),ae=Ct()(5).toString(\"base64\"),le=B.isOAS3(),{activeTab:ce,tabs:pe,onTabChange:de}=useTabs({initialTab:$,isExecute:u,schema:s,example:i});return We.createElement(\"div\",{className:\"model-example\"},We.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},We.createElement(\"li\",{className:KO()(\"tabitem\",{active:ce===pe.example}),role:\"presentation\"},We.createElement(\"button\",{\"aria-controls\":ee,\"aria-selected\":ce===pe.example,className:\"tablinks\",\"data-name\":\"example\",id:Z,onClick:de,role:\"tab\"},u?\"Edit Value\":\"Example Value\")),s&&We.createElement(\"li\",{className:KO()(\"tabitem\",{active:ce===pe.model}),role:\"presentation\"},We.createElement(\"button\",{\"aria-controls\":ae,\"aria-selected\":ce===pe.model,className:KO()(\"tablinks\",{inactive:u}),\"data-name\":\"model\",id:ie,onClick:de,role:\"tab\"},le?\"Schema\":\"Model\"))),ce===pe.example&&We.createElement(\"div\",{\"aria-hidden\":ce!==pe.example,\"aria-labelledby\":Z,\"data-name\":\"examplePanel\",id:ee,role:\"tabpanel\",tabIndex:\"0\"},i||We.createElement(X,{value:\"(no example available)\",getConfigs:P})),ce===pe.model&&We.createElement(\"div\",{\"aria-hidden\":ce===pe.example,\"aria-labelledby\":ie,\"data-name\":\"modelPanel\",id:ae,role:\"tabpanel\",tabIndex:\"0\"},We.createElement(Y,{schema:s,getComponent:j,getConfigs:P,specSelectors:B,expandDepth:U,specPath:_,includeReadOnly:x,includeWriteOnly:w})))};class ModelWrapper extends We.Component{onToggle=(s,i)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,i)};render(){let{getComponent:s,getConfigs:i}=this.props;const u=s(\"Model\");let _;return this.props.layoutSelectors&&(_=this.props.layoutSelectors.isShown(this.props.fullPath)),We.createElement(\"div\",{className:\"model-box\"},We.createElement(u,Co()({},this.props,{getConfigs:i,expanded:_,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}function react_immutable_pure_component_es_typeof(s){return react_immutable_pure_component_es_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},react_immutable_pure_component_es_typeof(s)}function _defineProperties(s,i){for(var u=0;u<i.length;u++){var _=i[u];_.enumerable=_.enumerable||!1,_.configurable=!0,\"value\"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function react_immutable_pure_component_es_defineProperty(s,i,u){return i in s?Object.defineProperty(s,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[i]=u,s}function react_immutable_pure_component_es_ownKeys(s,i){var u=Object.keys(s);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);i&&(_=_.filter((function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),u.push.apply(u,_)}return u}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,i){return s.__proto__=i,s},_setPrototypeOf(s,i)}function _possibleConstructorReturn(s,i){return!i||\"object\"!=typeof i&&\"function\"!=typeof i?function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}(s):i}var sC={};function react_immutable_pure_component_es_get(s,i,u){return function isInvalid(s){return null==s}(s)?u:function isMapLike(s){return null!==s&&\"object\"===react_immutable_pure_component_es_typeof(s)&&\"function\"==typeof s.get&&\"function\"==typeof s.has}(s)?s.has(i)?s.get(i):u:hasOwnProperty.call(s,i)?s[i]:u}function react_immutable_pure_component_es_getIn(s,i,u){for(var _=0;_!==i.length;)if((s=react_immutable_pure_component_es_get(s,i[_++],sC))===sC)return u;return s}function check(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},_=function createChecker(s,i){return function(u){if(\"string\"==typeof u)return(0,Xe.is)(i[u],s[u]);if(Array.isArray(u))return(0,Xe.is)(react_immutable_pure_component_es_getIn(i,u),react_immutable_pure_component_es_getIn(s,u));throw new TypeError(\"Invalid key: expected Array or string: \"+u)}}(i,u),w=s||Object.keys(function _objectSpread2(s){for(var i=1;i<arguments.length;i++){var u=null!=arguments[i]?arguments[i]:{};i%2?react_immutable_pure_component_es_ownKeys(u,!0).forEach((function(i){react_immutable_pure_component_es_defineProperty(s,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):react_immutable_pure_component_es_ownKeys(u).forEach((function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(u,i))}))}return s}({},u,{},i));return w.every(_)}const iC=function(s){function ImmutablePureComponent(){return function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError(\"Cannot call a class as a function\")}(this,ImmutablePureComponent),_possibleConstructorReturn(this,_getPrototypeOf(ImmutablePureComponent).apply(this,arguments))}return function _inherits(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),i&&_setPrototypeOf(s,i)}(ImmutablePureComponent,s),function _createClass(s,i,u){return i&&_defineProperties(s.prototype,i),u&&_defineProperties(s,u),s}(ImmutablePureComponent,[{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!check(this.updateOnProps,this.props,s,\"updateOnProps\")||!check(this.updateOnStates,this.state,i,\"updateOnStates\")}}]),ImmutablePureComponent}(We.Component);var aC=__webpack_require__(5556),lC=__webpack_require__.n(aC);const decodeRefName=s=>{const i=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(i)}catch{return i}};class Model extends iC{static propTypes={schema:yo().map.isRequired,getComponent:lC().func.isRequired,getConfigs:lC().func.isRequired,specSelectors:lC().object.isRequired,name:lC().string,displayName:lC().string,isRef:lC().bool,required:lC().bool,expandDepth:lC().number,depth:lC().number,specPath:yo().list.isRequired,includeReadOnly:lC().bool,includeWriteOnly:lC().bool};getModelName=s=>-1!==s.indexOf(\"#/definitions/\")?decodeRefName(s.replace(/^.*#\\/definitions\\//,\"\")):-1!==s.indexOf(\"#/components/schemas/\")?decodeRefName(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=s=>{let{specSelectors:i}=this.props;return i.findDefinition(s)};render(){let{getComponent:s,getConfigs:i,specSelectors:u,schema:_,required:w,name:x,isRef:j,specPath:P,displayName:B,includeReadOnly:$,includeWriteOnly:U}=this.props;const Y=s(\"ObjectModel\"),X=s(\"ArrayModel\"),Z=s(\"PrimitiveModel\");let ee=\"object\",ie=_&&_.get(\"$$ref\"),ae=_&&_.get(\"$ref\");if(!x&&ie&&(x=this.getModelName(ie)),ae){x=this.getModelName(ae);const s=this.getRefSchema(x);Xe.Map.isMap(s)?(_=s.set(\"$$ref\",ae),ie=ae):(_=null,x=ae)}if(!_)return We.createElement(\"span\",{className:\"model model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},B||x),!ae&&We.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const le=u.isOAS3()&&_.get(\"deprecated\");switch(j=void 0!==j?j:!!ie,ee=_&&_.get(\"type\")||ee,ee){case\"object\":return We.createElement(Y,Co()({className:\"object\"},this.props,{specPath:P,getConfigs:i,schema:_,name:x,deprecated:le,isRef:j,includeReadOnly:$,includeWriteOnly:U}));case\"array\":return We.createElement(X,Co()({className:\"array\"},this.props,{getConfigs:i,schema:_,name:x,deprecated:le,required:w,includeReadOnly:$,includeWriteOnly:U}));default:return We.createElement(Z,Co()({},this.props,{getComponent:s,getConfigs:i,schema:_,name:x,deprecated:le,required:w}))}}}class Models extends We.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(s,i)=>{const{layoutActions:u}=this.props;u.show([...this.getSchemaBasePath(),s],i),i&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),s])};onLoadModels=s=>{s&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),s)};onLoadModel=s=>{if(s){const i=s.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),i],s)}};render(){let{specSelectors:s,getComponent:i,layoutSelectors:u,layoutActions:_,getConfigs:w}=this.props,x=s.definitions(),{docExpansion:j,defaultModelsExpandDepth:P}=w();if(!x.size||P<0)return null;const B=this.getSchemaBasePath();let $=u.isShown(B,P>0&&\"none\"!==j);const U=s.isOAS3(),Y=i(\"ModelWrapper\"),X=i(\"Collapse\"),Z=i(\"ModelCollapse\"),ee=i(\"JumpToPath\",!0),ie=i(\"ArrowUpIcon\"),ae=i(\"ArrowDownIcon\");return We.createElement(\"section\",{className:$?\"models is-open\":\"models\",ref:this.onLoadModels},We.createElement(\"h4\",null,We.createElement(\"button\",{\"aria-expanded\":$,className:\"models-control\",onClick:()=>_.show(B,!$)},We.createElement(\"span\",null,U?\"Schemas\":\"Models\"),$?We.createElement(ie,null):We.createElement(ae,null))),We.createElement(X,{isOpened:$},x.entrySeq().map((([x])=>{const j=[...B,x],$=Qe().List(j),U=s.specResolvedSubtree(j),X=s.specJson().getIn(j),ie=Xe.Map.isMap(U)?U:Qe().Map(),ae=Xe.Map.isMap(X)?X:Qe().Map(),le=ie.get(\"title\")||ae.get(\"title\")||x,ce=u.isShown(j,!1);ce&&0===ie.size&&ae.size>0&&this.props.specActions.requestResolvedSubtree(j);const pe=We.createElement(Y,{name:x,expandDepth:P,schema:ie||Qe().Map(),displayName:le,fullPath:j,specPath:$,getComponent:i,specSelectors:s,getConfigs:w,layoutSelectors:u,layoutActions:_,includeReadOnly:!0,includeWriteOnly:!0}),de=We.createElement(\"span\",{className:\"model-box\"},We.createElement(\"span\",{className:\"model model-title\"},le));return We.createElement(\"div\",{id:`model-${x}`,className:\"model-container\",key:`models-section-${x}`,\"data-name\":x,ref:this.onLoadModel},We.createElement(\"span\",{className:\"models-jump-to-path\"},We.createElement(ee,{specPath:$})),We.createElement(Z,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(x),onToggle:this.handleToggle,title:de,displayName:le,modelName:x,specPath:$,layoutSelectors:u,layoutActions:_,hideSelfOnExpand:!0,expanded:P>0&&ce},pe))})).toArray()))}}const enum_model=({value:s,getComponent:i})=>{let u=i(\"ModelCollapse\"),_=We.createElement(\"span\",null,\"Array [ \",s.count(),\" ]\");return We.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",We.createElement(\"br\",null),We.createElement(u,{collapsedContent:_},\"[ \",s.join(\", \"),\" ]\"))};class ObjectModel extends We.Component{render(){let{schema:s,name:i,displayName:u,isRef:_,getComponent:w,getConfigs:x,depth:j,onToggle:P,expanded:B,specPath:$,...U}=this.props,{specSelectors:Y,expandDepth:X,includeReadOnly:Z,includeWriteOnly:ee}=U;const{isOAS3:ie}=Y;if(!s)return null;const{showExtensions:ae}=x();let le=s.get(\"description\"),ce=s.get(\"properties\"),pe=s.get(\"additionalProperties\"),de=s.get(\"title\")||u||i,fe=s.get(\"required\"),ye=s.filter(((s,i)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(i))),be=s.get(\"deprecated\"),_e=s.getIn([\"externalDocs\",\"url\"]),we=s.getIn([\"externalDocs\",\"description\"]);const Se=w(\"JumpToPath\",!0),xe=w(\"Markdown\",!0),Pe=w(\"Model\"),Te=w(\"ModelCollapse\"),Re=w(\"Property\"),qe=w(\"Link\"),JumpToPathSection=()=>We.createElement(\"span\",{className:\"model-jump-to-path\"},We.createElement(Se,{specPath:$})),$e=We.createElement(\"span\",null,We.createElement(\"span\",null,\"{\"),\"...\",We.createElement(\"span\",null,\"}\"),_?We.createElement(JumpToPathSection,null):\"\"),ze=Y.isOAS3()?s.get(\"allOf\"):null,He=Y.isOAS3()?s.get(\"anyOf\"):null,Ye=Y.isOAS3()?s.get(\"oneOf\"):null,Qe=Y.isOAS3()?s.get(\"not\"):null,et=de&&We.createElement(\"span\",{className:\"model-title\"},_&&s.get(\"$$ref\")&&We.createElement(\"span\",{className:\"model-hint\"},s.get(\"$$ref\")),We.createElement(\"span\",{className:\"model-title__text\"},de));return We.createElement(\"span\",{className:\"model\"},We.createElement(Te,{modelName:i,title:et,onToggle:P,expanded:!!B||j<=X,collapsedContent:$e},We.createElement(\"span\",{className:\"brace-open object\"},\"{\"),_?We.createElement(JumpToPathSection,null):null,We.createElement(\"span\",{className:\"inner-object\"},We.createElement(\"table\",{className:\"model\"},We.createElement(\"tbody\",null,le?We.createElement(\"tr\",{className:\"description\"},We.createElement(\"td\",null,\"description:\"),We.createElement(\"td\",null,We.createElement(xe,{source:le}))):null,_e&&We.createElement(\"tr\",{className:\"external-docs\"},We.createElement(\"td\",null,\"externalDocs:\"),We.createElement(\"td\",null,We.createElement(qe,{target:\"_blank\",href:sanitizeUrl(_e)},we||_e))),be?We.createElement(\"tr\",{className:\"property\"},We.createElement(\"td\",null,\"deprecated:\"),We.createElement(\"td\",null,\"true\")):null,ce&&ce.size?ce.entrySeq().filter((([,s])=>(!s.get(\"readOnly\")||Z)&&(!s.get(\"writeOnly\")||ee))).map((([s,u])=>{let _=ie()&&u.get(\"deprecated\"),P=Xe.List.isList(fe)&&fe.contains(s),B=[\"property-row\"];return _&&B.push(\"deprecated\"),P&&B.push(\"required\"),We.createElement(\"tr\",{key:s,className:B.join(\" \")},We.createElement(\"td\",null,s,P&&We.createElement(\"span\",{className:\"star\"},\"*\")),We.createElement(\"td\",null,We.createElement(Pe,Co()({key:`object-${i}-${s}_${u}`},U,{required:P,getComponent:w,specPath:$.push(\"properties\",s),getConfigs:x,schema:u,depth:j+1}))))})).toArray():null,ae?We.createElement(\"tr\",null,We.createElement(\"td\",null,\" \")):null,ae?s.entrySeq().map((([s,i])=>{if(\"x-\"!==s.slice(0,2))return;const u=i?i.toJS?i.toJS():i:null;return We.createElement(\"tr\",{key:s,className:\"extension\"},We.createElement(\"td\",null,s),We.createElement(\"td\",null,JSON.stringify(u)))})).toArray():null,pe&&pe.size?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"< * >:\"),We.createElement(\"td\",null,We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"additionalProperties\"),getConfigs:x,schema:pe,depth:j+1})))):null,ze?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"allOf ->\"),We.createElement(\"td\",null,ze.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"allOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,He?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"anyOf ->\"),We.createElement(\"td\",null,He.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"anyOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,Ye?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"oneOf ->\"),We.createElement(\"td\",null,Ye.map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"oneOf\",i),getConfigs:x,schema:s,depth:j+1}))))))):null,Qe?We.createElement(\"tr\",null,We.createElement(\"td\",null,\"not ->\"),We.createElement(\"td\",null,We.createElement(\"div\",null,We.createElement(Pe,Co()({},U,{required:!1,getComponent:w,specPath:$.push(\"not\"),getConfigs:x,schema:Qe,depth:j+1}))))):null))),We.createElement(\"span\",{className:\"brace-close\"},\"}\")),ye.size?ye.entrySeq().map((([s,i])=>We.createElement(Re,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:\"property\"}))):null)}}class ArrayModel extends We.Component{render(){let{getComponent:s,getConfigs:i,schema:u,depth:_,expandDepth:w,name:x,displayName:j,specPath:P}=this.props,B=u.get(\"description\"),$=u.get(\"items\"),U=u.get(\"title\")||j||x,Y=u.filter(((s,i)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(i))),X=u.getIn([\"externalDocs\",\"url\"]),Z=u.getIn([\"externalDocs\",\"description\"]);const ee=s(\"Markdown\",!0),ie=s(\"ModelCollapse\"),ae=s(\"Model\"),le=s(\"Property\"),ce=s(\"Link\"),pe=U&&We.createElement(\"span\",{className:\"model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},U));return We.createElement(\"span\",{className:\"model\"},We.createElement(ie,{title:pe,expanded:_<=w,collapsedContent:\"[...]\"},\"[\",Y.size?Y.entrySeq().map((([s,i])=>We.createElement(le,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:\"property\"}))):null,B?We.createElement(ee,{source:B}):Y.size?We.createElement(\"div\",{className:\"markdown\"}):null,X&&We.createElement(\"div\",{className:\"external-docs\"},We.createElement(ce,{target:\"_blank\",href:sanitizeUrl(X)},Z||X)),We.createElement(\"span\",null,We.createElement(ae,Co()({},this.props,{getConfigs:i,specPath:P.push(\"items\"),name:null,schema:$,required:!1,depth:_+1}))),\"]\"))}}const cC=\"property primitive\";class Primitive extends We.Component{render(){let{schema:s,getComponent:i,getConfigs:u,name:_,displayName:w,depth:x,expandDepth:j}=this.props;const{showExtensions:P}=u();if(!s||!s.get)return We.createElement(\"div\",null);let B=s.get(\"type\"),$=s.get(\"format\"),U=s.get(\"xml\"),Y=s.get(\"enum\"),X=s.get(\"title\")||w||_,Z=s.get(\"description\"),ee=getExtensions(s),ie=s.filter(((s,i)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(i))).filterNot(((s,i)=>ee.has(i))),ae=s.getIn([\"externalDocs\",\"url\"]),le=s.getIn([\"externalDocs\",\"description\"]);const ce=i(\"Markdown\",!0),pe=i(\"EnumModel\"),de=i(\"Property\"),fe=i(\"ModelCollapse\"),ye=i(\"Link\"),be=X&&We.createElement(\"span\",{className:\"model-title\"},We.createElement(\"span\",{className:\"model-title__text\"},X));return We.createElement(\"span\",{className:\"model\"},We.createElement(fe,{title:be,expanded:x<=j,collapsedContent:\"[...]\",hideSelfOnExpand:j!==x},We.createElement(\"span\",{className:\"prop\"},_&&x>1&&We.createElement(\"span\",{className:\"prop-name\"},X),We.createElement(\"span\",{className:\"prop-type\"},B),$&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",$,\")\"),ie.size?ie.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:cC}))):null,P&&ee.size?ee.entrySeq().map((([s,i])=>We.createElement(de,{key:`${s}-${i}`,propKey:s,propVal:i,propClass:cC}))):null,Z?We.createElement(ce,{source:Z}):null,ae&&We.createElement(\"div\",{className:\"external-docs\"},We.createElement(ye,{target:\"_blank\",href:sanitizeUrl(ae)},le||ae)),U&&U.size?We.createElement(\"span\",null,We.createElement(\"br\",null),We.createElement(\"span\",{className:cC},\"xml:\"),U.entrySeq().map((([s,i])=>We.createElement(\"span\",{key:`${s}-${i}`,className:cC},We.createElement(\"br\",null),\"   \",s,\": \",String(i)))).toArray()):null,Y&&We.createElement(pe,{value:Y,getComponent:i}))))}}const property=({propKey:s,propVal:i,propClass:u})=>We.createElement(\"span\",{className:u},We.createElement(\"br\",null),s,\": \",String(i));class TryItOutButton extends We.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:s,onCancelClick:i,onResetClick:u,enabled:_,hasUserEditedBody:w,isOAS3:x}=this.props,j=x&&w;return We.createElement(\"div\",{className:j?\"try-out btn-group\":\"try-out\"},_?We.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:i},\"Cancel\"):We.createElement(\"button\",{className:\"btn try-out__btn\",onClick:s},\"Try it out \"),j&&We.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:u},\"Reset\"))}}class VersionPragmaFilter extends We.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:s,isSwagger2:i,isOAS3:u,alsoShow:_}=this.props;return s?We.createElement(\"div\",null,this.props.children):i&&u?We.createElement(\"div\",{className:\"version-pragma\"},_,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,We.createElement(\"code\",null,\"swagger\"),\" and \",We.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),We.createElement(\"p\",null,\"Supported version fields are \",We.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",We.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\")))):i||u?We.createElement(\"div\",null,this.props.children):We.createElement(\"div\",{className:\"version-pragma\"},_,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),We.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",We.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",We.createElement(\"code\",null,\"openapi: 3.0.0\"),\").\"))))}}const version_stamp=({version:s})=>We.createElement(\"small\",null,We.createElement(\"pre\",{className:\"version\"},\" \",s,\" \")),openapi_version=({oasVersion:s})=>We.createElement(\"small\",{className:\"version-stamp\"},We.createElement(\"pre\",{className:\"version\"},\"OAS \",s)),deep_link=({enabled:s,path:i,text:u})=>We.createElement(\"a\",{className:\"nostyle\",onClick:s?s=>s.preventDefault():null,href:s?`#/${i}`:null},We.createElement(\"span\",null,u)),svg_assets=()=>We.createElement(\"div\",null,We.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},We.createElement(\"defs\",null,We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},We.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},We.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},We.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},We.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},We.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},We.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},We.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),We.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},We.createElement(\"g\",{transform:\"translate(2, -1)\"},We.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))))));var uC;function decodeEntity(s){return(uC=uC||document.createElement(\"textarea\")).innerHTML=\"&\"+s+\";\",uC.value}var pC=Object.prototype.hasOwnProperty;function index_browser_has(s,i){return!!s&&pC.call(s,i)}function index_browser_assign(s){return[].slice.call(arguments,1).forEach((function(i){if(i){if(\"object\"!=typeof i)throw new TypeError(i+\"must be object\");Object.keys(i).forEach((function(u){s[u]=i[u]}))}})),s}var hC=/\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;function unescapeMd(s){return s.indexOf(\"\\\\\")<0?s:s.replace(hC,\"$1\")}function isValidEntityCode(s){return!(s>=55296&&s<=57343)&&(!(s>=64976&&s<=65007)&&(65535!=(65535&s)&&65534!=(65535&s)&&(!(s>=0&&s<=8)&&(11!==s&&(!(s>=14&&s<=31)&&(!(s>=127&&s<=159)&&!(s>1114111)))))))}function fromCodePoint(s){if(s>65535){var i=55296+((s-=65536)>>10),u=56320+(1023&s);return String.fromCharCode(i,u)}return String.fromCharCode(s)}var dC=/&([a-z#][a-z0-9]{1,31});/gi,fC=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function replaceEntityPattern(s,i){var u=0,_=decodeEntity(i);return i!==_?_:35===i.charCodeAt(0)&&fC.test(i)&&isValidEntityCode(u=\"x\"===i[1].toLowerCase()?parseInt(i.slice(2),16):parseInt(i.slice(1),10))?fromCodePoint(u):s}function replaceEntities(s){return s.indexOf(\"&\")<0?s:s.replace(dC,replaceEntityPattern)}var mC=/[&<>\"]/,gC=/[&<>\"]/g,yC={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\"};function replaceUnsafeChar(s){return yC[s]}function escapeHtml(s){return mC.test(s)?s.replace(gC,replaceUnsafeChar):s}var vC={};function nextToken(s,i){return++i>=s.length-2?i:\"paragraph_open\"===s[i].type&&s[i].tight&&\"inline\"===s[i+1].type&&0===s[i+1].content.length&&\"paragraph_close\"===s[i+2].type&&s[i+2].tight?nextToken(s,i+2):i}vC.blockquote_open=function(){return\"<blockquote>\\n\"},vC.blockquote_close=function(s,i){return\"</blockquote>\"+bC(s,i)},vC.code=function(s,i){return s[i].block?\"<pre><code>\"+escapeHtml(s[i].content)+\"</code></pre>\"+bC(s,i):\"<code>\"+escapeHtml(s[i].content)+\"</code>\"},vC.fence=function(s,i,u,_,w){var x,j,P=s[i],B=\"\",$=u.langPrefix;if(P.params){if(j=(x=P.params.split(/\\s+/g)).join(\" \"),index_browser_has(w.rules.fence_custom,x[0]))return w.rules.fence_custom[x[0]](s,i,u,_,w);B=' class=\"'+$+escapeHtml(replaceEntities(unescapeMd(j)))+'\"'}return\"<pre><code\"+B+\">\"+(u.highlight&&u.highlight.apply(u.highlight,[P.content].concat(x))||escapeHtml(P.content))+\"</code></pre>\"+bC(s,i)},vC.fence_custom={},vC.heading_open=function(s,i){return\"<h\"+s[i].hLevel+\">\"},vC.heading_close=function(s,i){return\"</h\"+s[i].hLevel+\">\\n\"},vC.hr=function(s,i,u){return(u.xhtmlOut?\"<hr />\":\"<hr>\")+bC(s,i)},vC.bullet_list_open=function(){return\"<ul>\\n\"},vC.bullet_list_close=function(s,i){return\"</ul>\"+bC(s,i)},vC.list_item_open=function(){return\"<li>\"},vC.list_item_close=function(){return\"</li>\\n\"},vC.ordered_list_open=function(s,i){var u=s[i];return\"<ol\"+(u.order>1?' start=\"'+u.order+'\"':\"\")+\">\\n\"},vC.ordered_list_close=function(s,i){return\"</ol>\"+bC(s,i)},vC.paragraph_open=function(s,i){return s[i].tight?\"\":\"<p>\"},vC.paragraph_close=function(s,i){var u=!(s[i].tight&&i&&\"inline\"===s[i-1].type&&!s[i-1].content);return(s[i].tight?\"\":\"</p>\")+(u?bC(s,i):\"\")},vC.link_open=function(s,i,u){var _=s[i].title?' title=\"'+escapeHtml(replaceEntities(s[i].title))+'\"':\"\",w=u.linkTarget?' target=\"'+u.linkTarget+'\"':\"\";return'<a href=\"'+escapeHtml(s[i].href)+'\"'+_+w+\">\"},vC.link_close=function(){return\"</a>\"},vC.image=function(s,i,u){var _=' src=\"'+escapeHtml(s[i].src)+'\"',w=s[i].title?' title=\"'+escapeHtml(replaceEntities(s[i].title))+'\"':\"\";return\"<img\"+_+(' alt=\"'+(s[i].alt?escapeHtml(replaceEntities(unescapeMd(s[i].alt))):\"\")+'\"')+w+(u.xhtmlOut?\" /\":\"\")+\">\"},vC.table_open=function(){return\"<table>\\n\"},vC.table_close=function(){return\"</table>\\n\"},vC.thead_open=function(){return\"<thead>\\n\"},vC.thead_close=function(){return\"</thead>\\n\"},vC.tbody_open=function(){return\"<tbody>\\n\"},vC.tbody_close=function(){return\"</tbody>\\n\"},vC.tr_open=function(){return\"<tr>\"},vC.tr_close=function(){return\"</tr>\\n\"},vC.th_open=function(s,i){var u=s[i];return\"<th\"+(u.align?' style=\"text-align:'+u.align+'\"':\"\")+\">\"},vC.th_close=function(){return\"</th>\"},vC.td_open=function(s,i){var u=s[i];return\"<td\"+(u.align?' style=\"text-align:'+u.align+'\"':\"\")+\">\"},vC.td_close=function(){return\"</td>\"},vC.strong_open=function(){return\"<strong>\"},vC.strong_close=function(){return\"</strong>\"},vC.em_open=function(){return\"<em>\"},vC.em_close=function(){return\"</em>\"},vC.del_open=function(){return\"<del>\"},vC.del_close=function(){return\"</del>\"},vC.ins_open=function(){return\"<ins>\"},vC.ins_close=function(){return\"</ins>\"},vC.mark_open=function(){return\"<mark>\"},vC.mark_close=function(){return\"</mark>\"},vC.sub=function(s,i){return\"<sub>\"+escapeHtml(s[i].content)+\"</sub>\"},vC.sup=function(s,i){return\"<sup>\"+escapeHtml(s[i].content)+\"</sup>\"},vC.hardbreak=function(s,i,u){return u.xhtmlOut?\"<br />\\n\":\"<br>\\n\"},vC.softbreak=function(s,i,u){return u.breaks?u.xhtmlOut?\"<br />\\n\":\"<br>\\n\":\"\\n\"},vC.text=function(s,i){return escapeHtml(s[i].content)},vC.htmlblock=function(s,i){return s[i].content},vC.htmltag=function(s,i){return s[i].content},vC.abbr_open=function(s,i){return'<abbr title=\"'+escapeHtml(replaceEntities(s[i].title))+'\">'},vC.abbr_close=function(){return\"</abbr>\"},vC.footnote_ref=function(s,i){var u=Number(s[i].id+1).toString(),_=\"fnref\"+u;return s[i].subId>0&&(_+=\":\"+s[i].subId),'<sup class=\"footnote-ref\"><a href=\"#fn'+u+'\" id=\"'+_+'\">['+u+\"]</a></sup>\"},vC.footnote_block_open=function(s,i,u){return(u.xhtmlOut?'<hr class=\"footnotes-sep\" />\\n':'<hr class=\"footnotes-sep\">\\n')+'<section class=\"footnotes\">\\n<ol class=\"footnotes-list\">\\n'},vC.footnote_block_close=function(){return\"</ol>\\n</section>\\n\"},vC.footnote_open=function(s,i){return'<li id=\"fn'+Number(s[i].id+1).toString()+'\"  class=\"footnote-item\">'},vC.footnote_close=function(){return\"</li>\\n\"},vC.footnote_anchor=function(s,i){var u=\"fnref\"+Number(s[i].id+1).toString();return s[i].subId>0&&(u+=\":\"+s[i].subId),' <a href=\"#'+u+'\" class=\"footnote-backref\">↩</a>'},vC.dl_open=function(){return\"<dl>\\n\"},vC.dt_open=function(){return\"<dt>\"},vC.dd_open=function(){return\"<dd>\"},vC.dl_close=function(){return\"</dl>\\n\"},vC.dt_close=function(){return\"</dt>\\n\"},vC.dd_close=function(){return\"</dd>\\n\"};var bC=vC.getBreak=function getBreak(s,i){return(i=nextToken(s,i))<s.length&&\"list_item_close\"===s[i].type?\"\":\"\\n\"};function Renderer(){this.rules=index_browser_assign({},vC),this.getBreak=vC.getBreak}function Ruler(){this.__rules__=[],this.__cache__=null}function StateInline(s,i,u,_,w){this.src=s,this.env=_,this.options=u,this.parser=i,this.tokens=w,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=\"\",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent=\"\",this.labelUnmatchedScopes=0}function parseLinkLabel(s,i){var u,_,w,x=-1,j=s.posMax,P=s.pos,B=s.isInLabel;if(s.isInLabel)return-1;if(s.labelUnmatchedScopes)return s.labelUnmatchedScopes--,-1;for(s.pos=i+1,s.isInLabel=!0,u=1;s.pos<j;){if(91===(w=s.src.charCodeAt(s.pos)))u++;else if(93===w&&0===--u){_=!0;break}s.parser.skipToken(s)}return _?(x=s.pos,s.labelUnmatchedScopes=0):s.labelUnmatchedScopes=u-1,s.pos=P,s.isInLabel=B,x}function parseAbbr(s,i,u,_){var w,x,j,P,B,$;if(42!==s.charCodeAt(0))return-1;if(91!==s.charCodeAt(1))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((x=parseLinkLabel(w=new StateInline(s,i,u,_,[]),1))<0||58!==s.charCodeAt(x+1))return-1;for(P=w.posMax,j=x+2;j<P&&10!==w.src.charCodeAt(j);j++);return B=s.slice(2,x),0===($=s.slice(x+2,j).trim()).length?-1:(_.abbreviations||(_.abbreviations={}),void 0===_.abbreviations[\":\"+B]&&(_.abbreviations[\":\"+B]=$),j)}function normalizeLink(s){var i=replaceEntities(s);try{i=decodeURI(i)}catch(s){}return encodeURI(i)}function parseLinkDestination(s,i){var u,_,w,x=i,j=s.posMax;if(60===s.src.charCodeAt(i)){for(i++;i<j;){if(10===(u=s.src.charCodeAt(i)))return!1;if(62===u)return w=normalizeLink(unescapeMd(s.src.slice(x+1,i))),!!s.parser.validateLink(w)&&(s.pos=i+1,s.linkContent=w,!0);92===u&&i+1<j?i+=2:i++}return!1}for(_=0;i<j&&32!==(u=s.src.charCodeAt(i))&&!(u<32||127===u);)if(92===u&&i+1<j)i+=2;else{if(40===u&&++_>1)break;if(41===u&&--_<0)break;i++}return x!==i&&(w=unescapeMd(s.src.slice(x,i)),!!s.parser.validateLink(w)&&(s.linkContent=w,s.pos=i,!0))}function parseLinkTitle(s,i){var u,_=i,w=s.posMax,x=s.src.charCodeAt(i);if(34!==x&&39!==x&&40!==x)return!1;for(i++,40===x&&(x=41);i<w;){if((u=s.src.charCodeAt(i))===x)return s.pos=i+1,s.linkContent=unescapeMd(s.src.slice(_+1,i)),!0;92===u&&i+1<w?i+=2:i++}return!1}function normalizeReference(s){return s.trim().replace(/\\s+/g,\" \").toUpperCase()}function parseReference(s,i,u,_){var w,x,j,P,B,$,U,Y,X;if(91!==s.charCodeAt(0))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((x=parseLinkLabel(w=new StateInline(s,i,u,_,[]),0))<0||58!==s.charCodeAt(x+1))return-1;for(P=w.posMax,j=x+2;j<P&&(32===(B=w.src.charCodeAt(j))||10===B);j++);if(!parseLinkDestination(w,j))return-1;for(U=w.linkContent,$=j=w.pos,j+=1;j<P&&(32===(B=w.src.charCodeAt(j))||10===B);j++);for(j<P&&$!==j&&parseLinkTitle(w,j)?(Y=w.linkContent,j=w.pos):(Y=\"\",j=$);j<P&&32===w.src.charCodeAt(j);)j++;return j<P&&10!==w.src.charCodeAt(j)?-1:(X=normalizeReference(s.slice(1,x)),void 0===_.references[X]&&(_.references[X]={title:Y,href:U}),j)}Renderer.prototype.renderInline=function(s,i,u){for(var _=this.rules,w=s.length,x=0,j=\"\";w--;)j+=_[s[x].type](s,x++,i,u,this);return j},Renderer.prototype.render=function(s,i,u){for(var _=this.rules,w=s.length,x=-1,j=\"\";++x<w;)\"inline\"===s[x].type?j+=this.renderInline(s[x].children,i,u):j+=_[s[x].type](s,x,i,u,this);return j},Ruler.prototype.__find__=function(s){for(var i=this.__rules__.length,u=-1;i--;)if(this.__rules__[++u].name===s)return u;return-1},Ruler.prototype.__compile__=function(){var s=this,i=[\"\"];s.__rules__.forEach((function(s){s.enabled&&s.alt.forEach((function(s){i.indexOf(s)<0&&i.push(s)}))})),s.__cache__={},i.forEach((function(i){s.__cache__[i]=[],s.__rules__.forEach((function(u){u.enabled&&(i&&u.alt.indexOf(i)<0||s.__cache__[i].push(u.fn))}))}))},Ruler.prototype.at=function(s,i,u){var _=this.__find__(s),w=u||{};if(-1===_)throw new Error(\"Parser rule not found: \"+s);this.__rules__[_].fn=i,this.__rules__[_].alt=w.alt||[],this.__cache__=null},Ruler.prototype.before=function(s,i,u,_){var w=this.__find__(s),x=_||{};if(-1===w)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(w,0,{name:i,enabled:!0,fn:u,alt:x.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(s,i,u,_){var w=this.__find__(s),x=_||{};if(-1===w)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(w+1,0,{name:i,enabled:!0,fn:u,alt:x.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(s,i,u){var _=u||{};this.__rules__.push({name:s,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(s,i){s=Array.isArray(s)?s:[s],i&&this.__rules__.forEach((function(s){s.enabled=!1})),s.forEach((function(s){var i=this.__find__(s);if(i<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[i].enabled=!0}),this),this.__cache__=null},Ruler.prototype.disable=function(s){(s=Array.isArray(s)?s:[s]).forEach((function(s){var i=this.__find__(s);if(i<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[i].enabled=!1}),this),this.__cache__=null},Ruler.prototype.getRules=function(s){return null===this.__cache__&&this.__compile__(),this.__cache__[s]||[]},StateInline.prototype.pushPending=function(){this.tokens.push({type:\"text\",content:this.pending,level:this.pendingLevel}),this.pending=\"\"},StateInline.prototype.push=function(s){this.pending&&this.pushPending(),this.tokens.push(s),this.pendingLevel=this.level},StateInline.prototype.cacheSet=function(s,i){for(var u=this.cache.length;u<=s;u++)this.cache.push(0);this.cache[s]=i},StateInline.prototype.cacheGet=function(s){return s<this.cache.length?this.cache[s]:0};var _C=\" \\n()[]'\\\".,!?-\";function regEscape(s){return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,\"\\\\$1\")}var EC=/\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/,wC=/\\((c|tm|r|p)\\)/gi,SC={c:\"©\",r:\"®\",p:\"§\",tm:\"™\"};function replaceScopedAbbr(s){return s.indexOf(\"(\")<0?s:s.replace(wC,(function(s,i){return SC[i.toLowerCase()]}))}var xC=/['\"]/,kC=/['\"]/g,OC=/[-\\s()\\[\\]]/;function isLetter(s,i){return!(i<0||i>=s.length)&&!OC.test(s[i])}function replaceAt(s,i,u){return s.substr(0,i)+u+s.substr(i+1)}var CC=[[\"block\",function block(s){s.inlineMode?s.tokens.push({type:\"inline\",content:s.src.replace(/\\n/g,\" \").trim(),level:0,lines:[0,1],children:[]}):s.block.parse(s.src,s.options,s.env,s.tokens)}],[\"abbr\",function abbr(s){var i,u,_,w,x=s.tokens;if(!s.inlineMode)for(i=1,u=x.length-1;i<u;i++)if(\"paragraph_open\"===x[i-1].type&&\"inline\"===x[i].type&&\"paragraph_close\"===x[i+1].type){for(_=x[i].content;_.length&&!((w=parseAbbr(_,s.inline,s.options,s.env))<0);)_=_.slice(w).trim();x[i].content=_,_.length||(x[i-1].tight=!0,x[i+1].tight=!0)}}],[\"references\",function references(s){var i,u,_,w,x=s.tokens;if(s.env.references=s.env.references||{},!s.inlineMode)for(i=1,u=x.length-1;i<u;i++)if(\"inline\"===x[i].type&&\"paragraph_open\"===x[i-1].type&&\"paragraph_close\"===x[i+1].type){for(_=x[i].content;_.length&&!((w=parseReference(_,s.inline,s.options,s.env))<0);)_=_.slice(w).trim();x[i].content=_,_.length||(x[i-1].tight=!0,x[i+1].tight=!0)}}],[\"inline\",function inline(s){var i,u,_,w=s.tokens;for(u=0,_=w.length;u<_;u++)\"inline\"===(i=w[u]).type&&s.inline.parse(i.content,s.options,s.env,i.children)}],[\"footnote_tail\",function footnote_block(s){var i,u,_,w,x,j,P,B,$,U=0,Y=!1,X={};if(s.env.footnotes&&(s.tokens=s.tokens.filter((function(s){return\"footnote_reference_open\"===s.type?(Y=!0,B=[],$=s.label,!1):\"footnote_reference_close\"===s.type?(Y=!1,X[\":\"+$]=B,!1):(Y&&B.push(s),!Y)})),s.env.footnotes.list)){for(j=s.env.footnotes.list,s.tokens.push({type:\"footnote_block_open\",level:U++}),i=0,u=j.length;i<u;i++){for(s.tokens.push({type:\"footnote_open\",id:i,level:U++}),j[i].tokens?((P=[]).push({type:\"paragraph_open\",tight:!1,level:U++}),P.push({type:\"inline\",content:\"\",level:U,children:j[i].tokens}),P.push({type:\"paragraph_close\",tight:!1,level:--U})):j[i].label&&(P=X[\":\"+j[i].label]),s.tokens=s.tokens.concat(P),x=\"paragraph_close\"===s.tokens[s.tokens.length-1].type?s.tokens.pop():null,w=j[i].count>0?j[i].count:1,_=0;_<w;_++)s.tokens.push({type:\"footnote_anchor\",id:i,subId:_,level:U});x&&s.tokens.push(x),s.tokens.push({type:\"footnote_close\",level:--U})}s.tokens.push({type:\"footnote_block_close\",level:--U})}}],[\"abbr2\",function abbr2(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z=s.tokens;if(s.env.abbreviations)for(s.env.abbrRegExp||(X=\"(^|[\"+_C.split(\"\").map(regEscape).join(\"\")+\"])(\"+Object.keys(s.env.abbreviations).map((function(s){return s.substr(1)})).sort((function(s,i){return i.length-s.length})).map(regEscape).join(\"|\")+\")($|[\"+_C.split(\"\").map(regEscape).join(\"\")+\"])\",s.env.abbrRegExp=new RegExp(X,\"g\")),U=s.env.abbrRegExp,u=0,_=Z.length;u<_;u++)if(\"inline\"===Z[u].type)for(i=(w=Z[u].children).length-1;i>=0;i--)if(\"text\"===(x=w[i]).type){for(B=0,j=x.content,U.lastIndex=0,$=x.level,P=[];Y=U.exec(j);)U.lastIndex>B&&P.push({type:\"text\",content:j.slice(B,Y.index+Y[1].length),level:$}),P.push({type:\"abbr_open\",title:s.env.abbreviations[\":\"+Y[2]],level:$++}),P.push({type:\"text\",content:Y[2],level:$}),P.push({type:\"abbr_close\",level:--$}),B=U.lastIndex-Y[3].length;P.length&&(B<j.length&&P.push({type:\"text\",content:j.slice(B),level:$}),Z[u].children=w=[].concat(w.slice(0,i),P,w.slice(i+1)))}}],[\"replacements\",function index_browser_replace(s){var i,u,_,w,x;if(s.options.typographer)for(x=s.tokens.length-1;x>=0;x--)if(\"inline\"===s.tokens[x].type)for(i=(w=s.tokens[x].children).length-1;i>=0;i--)\"text\"===(u=w[i]).type&&(_=replaceScopedAbbr(_=u.content),EC.test(_)&&(_=_.replace(/\\+-/g,\"±\").replace(/\\.{2,}/g,\"…\").replace(/([?!])…/g,\"$1..\").replace(/([?!]){4,}/g,\"$1$1$1\").replace(/,{2,}/g,\",\").replace(/(^|[^-])---([^-]|$)/gm,\"$1—$2\").replace(/(^|\\s)--(\\s|$)/gm,\"$1–$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/gm,\"$1–$2\")),u.content=_)}],[\"smartquotes\",function smartquotes(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le;if(s.options.typographer)for(le=[],ie=s.tokens.length-1;ie>=0;ie--)if(\"inline\"===s.tokens[ie].type)for(ae=s.tokens[ie].children,le.length=0,i=0;i<ae.length;i++)if(\"text\"===(u=ae[i]).type&&!xC.test(u.text)){for(P=ae[i].level,Z=le.length-1;Z>=0&&!(le[Z].level<=P);Z--);le.length=Z+1,x=0,j=(_=u.content).length;e:for(;x<j&&(kC.lastIndex=x,w=kC.exec(_));)if(B=!isLetter(_,w.index-1),x=w.index+1,ee=\"'\"===w[0],($=!isLetter(_,x))||B){if(Y=!$,X=!B)for(Z=le.length-1;Z>=0&&(U=le[Z],!(le[Z].level<P));Z--)if(U.single===ee&&le[Z].level===P){U=le[Z],ee?(ae[U.token].content=replaceAt(ae[U.token].content,U.pos,s.options.quotes[2]),u.content=replaceAt(u.content,w.index,s.options.quotes[3])):(ae[U.token].content=replaceAt(ae[U.token].content,U.pos,s.options.quotes[0]),u.content=replaceAt(u.content,w.index,s.options.quotes[1])),le.length=Z;continue e}Y?le.push({token:i,pos:w.index,single:ee,level:P}):X&&ee&&(u.content=replaceAt(u.content,w.index,\"’\"))}else ee&&(u.content=replaceAt(u.content,w.index,\"’\"))}}]];function Core(){this.options={},this.ruler=new Ruler;for(var s=0;s<CC.length;s++)this.ruler.push(CC[s][0],CC[s][1])}function StateBlock(s,i,u,_,w){var x,j,P,B,$,U,Y;for(this.src=s,this.parser=i,this.options=u,this.env=_,this.tokens=w,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType=\"root\",this.ddIndent=-1,this.level=0,this.result=\"\",U=0,Y=!1,P=B=U=0,$=(j=this.src).length;B<$;B++){if(x=j.charCodeAt(B),!Y){if(32===x){U++;continue}Y=!0}10!==x&&B!==$-1||(10!==x&&B++,this.bMarks.push(P),this.eMarks.push(B),this.tShift.push(U),Y=!1,U=0,P=B+1)}this.bMarks.push(j.length),this.eMarks.push(j.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}function skipBulletListMarker(s,i){var u,_,w;return(_=s.bMarks[i]+s.tShift[i])>=(w=s.eMarks[i])||42!==(u=s.src.charCodeAt(_++))&&45!==u&&43!==u||_<w&&32!==s.src.charCodeAt(_)?-1:_}function skipOrderedListMarker(s,i){var u,_=s.bMarks[i]+s.tShift[i],w=s.eMarks[i];if(_+1>=w)return-1;if((u=s.src.charCodeAt(_++))<48||u>57)return-1;for(;;){if(_>=w)return-1;if(!((u=s.src.charCodeAt(_++))>=48&&u<=57)){if(41===u||46===u)break;return-1}}return _<w&&32!==s.src.charCodeAt(_)?-1:_}Core.prototype.process=function(s){var i,u,_;for(i=0,u=(_=this.ruler.getRules(\"\")).length;i<u;i++)_[i](s)},StateBlock.prototype.isEmpty=function isEmpty(s){return this.bMarks[s]+this.tShift[s]>=this.eMarks[s]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(s){for(var i=this.lineMax;s<i&&!(this.bMarks[s]+this.tShift[s]<this.eMarks[s]);s++);return s},StateBlock.prototype.skipSpaces=function skipSpaces(s){for(var i=this.src.length;s<i&&32===this.src.charCodeAt(s);s++);return s},StateBlock.prototype.skipChars=function skipChars(s,i){for(var u=this.src.length;s<u&&this.src.charCodeAt(s)===i;s++);return s},StateBlock.prototype.skipCharsBack=function skipCharsBack(s,i,u){if(s<=u)return s;for(;s>u;)if(i!==this.src.charCodeAt(--s))return s+1;return s},StateBlock.prototype.getLines=function getLines(s,i,u,_){var w,x,j,P,B,$=s;if(s>=i)return\"\";if($+1===i)return x=this.bMarks[$]+Math.min(this.tShift[$],u),j=_?this.eMarks[$]+1:this.eMarks[$],this.src.slice(x,j);for(P=new Array(i-s),w=0;$<i;$++,w++)(B=this.tShift[$])>u&&(B=u),B<0&&(B=0),x=this.bMarks[$]+B,j=$+1<i||_?this.eMarks[$]+1:this.eMarks[$],P[w]=this.src.slice(x,j);return P.join(\"\")};var AC={};[\"article\",\"aside\",\"button\",\"blockquote\",\"body\",\"canvas\",\"caption\",\"col\",\"colgroup\",\"dd\",\"div\",\"dl\",\"dt\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"iframe\",\"li\",\"map\",\"object\",\"ol\",\"output\",\"p\",\"pre\",\"progress\",\"script\",\"section\",\"style\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"tr\",\"thead\",\"ul\",\"video\"].forEach((function(s){AC[s]=!0}));var jC=/^<([a-zA-Z]{1,15})[\\s\\/>]/,PC=/^<\\/([a-zA-Z]{1,15})[\\s>]/;function index_browser_getLine(s,i){var u=s.bMarks[i]+s.blkIndent,_=s.eMarks[i];return s.src.substr(u,_-u)}function skipMarker(s,i){var u,_,w=s.bMarks[i]+s.tShift[i],x=s.eMarks[i];return w>=x||126!==(_=s.src.charCodeAt(w++))&&58!==_||w===(u=s.skipSpaces(w))||u>=x?-1:u}var IC=[[\"code\",function code(s,i,u){var _,w;if(s.tShift[i]-s.blkIndent<4)return!1;for(w=_=i+1;_<u;)if(s.isEmpty(_))_++;else{if(!(s.tShift[_]-s.blkIndent>=4))break;w=++_}return s.line=_,s.tokens.push({type:\"code\",content:s.getLines(i,w,4+s.blkIndent,!0),block:!0,lines:[i,s.line],level:s.level}),!0}],[\"fences\",function fences(s,i,u,_){var w,x,j,P,B,$=!1,U=s.bMarks[i]+s.tShift[i],Y=s.eMarks[i];if(U+3>Y)return!1;if(126!==(w=s.src.charCodeAt(U))&&96!==w)return!1;if(B=U,(x=(U=s.skipChars(U,w))-B)<3)return!1;if((j=s.src.slice(U,Y).trim()).indexOf(\"`\")>=0)return!1;if(_)return!0;for(P=i;!(++P>=u)&&!((U=B=s.bMarks[P]+s.tShift[P])<(Y=s.eMarks[P])&&s.tShift[P]<s.blkIndent);)if(s.src.charCodeAt(U)===w&&!(s.tShift[P]-s.blkIndent>=4||(U=s.skipChars(U,w))-B<x||(U=s.skipSpaces(U))<Y)){$=!0;break}return x=s.tShift[i],s.line=P+($?1:0),s.tokens.push({type:\"fence\",params:j,content:s.getLines(i+1,P,x,!0),lines:[i,s.line],level:s.level}),!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"blockquote\",function blockquote(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie=s.bMarks[i]+s.tShift[i],ae=s.eMarks[i];if(ie>ae)return!1;if(62!==s.src.charCodeAt(ie++))return!1;if(s.level>=s.options.maxNesting)return!1;if(_)return!0;for(32===s.src.charCodeAt(ie)&&ie++,B=s.blkIndent,s.blkIndent=0,P=[s.bMarks[i]],s.bMarks[i]=ie,x=(ie=ie<ae?s.skipSpaces(ie):ie)>=ae,j=[s.tShift[i]],s.tShift[i]=ie-s.bMarks[i],Y=s.parser.ruler.getRules(\"blockquote\"),w=i+1;w<u&&!((ie=s.bMarks[w]+s.tShift[w])>=(ae=s.eMarks[w]));w++)if(62!==s.src.charCodeAt(ie++)){if(x)break;for(ee=!1,X=0,Z=Y.length;X<Z;X++)if(Y[X](s,w,u,!0)){ee=!0;break}if(ee)break;P.push(s.bMarks[w]),j.push(s.tShift[w]),s.tShift[w]=-1337}else 32===s.src.charCodeAt(ie)&&ie++,P.push(s.bMarks[w]),s.bMarks[w]=ie,x=(ie=ie<ae?s.skipSpaces(ie):ie)>=ae,j.push(s.tShift[w]),s.tShift[w]=ie-s.bMarks[w];for($=s.parentType,s.parentType=\"blockquote\",s.tokens.push({type:\"blockquote_open\",lines:U=[i,0],level:s.level++}),s.parser.tokenize(s,i,w),s.tokens.push({type:\"blockquote_close\",level:--s.level}),s.parentType=$,U[1]=s.line,X=0;X<j.length;X++)s.bMarks[X+i]=P[X],s.tShift[X+i]=j[X];return s.blkIndent=B,!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"hr\",function hr(s,i,u,_){var w,x,j,P=s.bMarks[i],B=s.eMarks[i];if((P+=s.tShift[i])>B)return!1;if(42!==(w=s.src.charCodeAt(P++))&&45!==w&&95!==w)return!1;for(x=1;P<B;){if((j=s.src.charCodeAt(P++))!==w&&32!==j)return!1;j===w&&x++}return!(x<3)&&(_||(s.line=i+1,s.tokens.push({type:\"hr\",lines:[i,s.line],level:s.level})),!0)},[\"paragraph\",\"blockquote\",\"list\"]],[\"list\",function index_browser_list(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le,ce,pe,de,fe,ye,be,_e,we=!0;if((Y=skipOrderedListMarker(s,i))>=0)ie=!0;else{if(!((Y=skipBulletListMarker(s,i))>=0))return!1;ie=!1}if(s.level>=s.options.maxNesting)return!1;if(ee=s.src.charCodeAt(Y-1),_)return!0;for(le=s.tokens.length,ie?(U=s.bMarks[i]+s.tShift[i],Z=Number(s.src.substr(U,Y-U-1)),s.tokens.push({type:\"ordered_list_open\",order:Z,lines:pe=[i,0],level:s.level++})):s.tokens.push({type:\"bullet_list_open\",lines:pe=[i,0],level:s.level++}),w=i,ce=!1,fe=s.parser.ruler.getRules(\"list\");!(!(w<u)||((X=(ae=s.skipSpaces(Y))>=s.eMarks[w]?1:ae-Y)>4&&(X=1),X<1&&(X=1),x=Y-s.bMarks[w]+X,s.tokens.push({type:\"list_item_open\",lines:de=[i,0],level:s.level++}),P=s.blkIndent,B=s.tight,j=s.tShift[i],$=s.parentType,s.tShift[i]=ae-s.bMarks[i],s.blkIndent=x,s.tight=!0,s.parentType=\"list\",s.parser.tokenize(s,i,u,!0),s.tight&&!ce||(we=!1),ce=s.line-i>1&&s.isEmpty(s.line-1),s.blkIndent=P,s.tShift[i]=j,s.tight=B,s.parentType=$,s.tokens.push({type:\"list_item_close\",level:--s.level}),w=i=s.line,de[1]=w,ae=s.bMarks[i],w>=u)||s.isEmpty(w)||s.tShift[w]<s.blkIndent);){for(_e=!1,ye=0,be=fe.length;ye<be;ye++)if(fe[ye](s,w,u,!0)){_e=!0;break}if(_e)break;if(ie){if((Y=skipOrderedListMarker(s,w))<0)break}else if((Y=skipBulletListMarker(s,w))<0)break;if(ee!==s.src.charCodeAt(Y-1))break}return s.tokens.push({type:ie?\"ordered_list_close\":\"bullet_list_close\",level:--s.level}),pe[1]=w,s.line=w,we&&function markTightParagraphs(s,i){var u,_,w=s.level+2;for(u=i+2,_=s.tokens.length-2;u<_;u++)s.tokens[u].level===w&&\"paragraph_open\"===s.tokens[u].type&&(s.tokens[u+2].tight=!0,s.tokens[u].tight=!0,u+=2)}(s,le),!0},[\"paragraph\",\"blockquote\"]],[\"footnote\",function footnote(s,i,u,_){var w,x,j,P,B,$=s.bMarks[i]+s.tShift[i],U=s.eMarks[i];if($+4>U)return!1;if(91!==s.src.charCodeAt($))return!1;if(94!==s.src.charCodeAt($+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(P=$+2;P<U;P++){if(32===s.src.charCodeAt(P))return!1;if(93===s.src.charCodeAt(P))break}return P!==$+2&&(!(P+1>=U||58!==s.src.charCodeAt(++P))&&(_||(P++,s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.refs||(s.env.footnotes.refs={}),B=s.src.slice($+2,P-2),s.env.footnotes.refs[\":\"+B]=-1,s.tokens.push({type:\"footnote_reference_open\",label:B,level:s.level++}),w=s.bMarks[i],x=s.tShift[i],j=s.parentType,s.tShift[i]=s.skipSpaces(P)-P,s.bMarks[i]=P,s.blkIndent+=4,s.parentType=\"footnote\",s.tShift[i]<s.blkIndent&&(s.tShift[i]+=s.blkIndent,s.bMarks[i]-=s.blkIndent),s.parser.tokenize(s,i,u,!0),s.parentType=j,s.blkIndent-=4,s.tShift[i]=x,s.bMarks[i]=w,s.tokens.push({type:\"footnote_reference_close\",level:--s.level})),!0))},[\"paragraph\"]],[\"heading\",function heading(s,i,u,_){var w,x,j,P=s.bMarks[i]+s.tShift[i],B=s.eMarks[i];if(P>=B)return!1;if(35!==(w=s.src.charCodeAt(P))||P>=B)return!1;for(x=1,w=s.src.charCodeAt(++P);35===w&&P<B&&x<=6;)x++,w=s.src.charCodeAt(++P);return!(x>6||P<B&&32!==w)&&(_||(B=s.skipCharsBack(B,32,P),(j=s.skipCharsBack(B,35,P))>P&&32===s.src.charCodeAt(j-1)&&(B=j),s.line=i+1,s.tokens.push({type:\"heading_open\",hLevel:x,lines:[i,s.line],level:s.level}),P<B&&s.tokens.push({type:\"inline\",content:s.src.slice(P,B).trim(),level:s.level+1,lines:[i,s.line],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:x,level:s.level})),!0)},[\"paragraph\",\"blockquote\"]],[\"lheading\",function lheading(s,i,u){var _,w,x,j=i+1;return!(j>=u)&&(!(s.tShift[j]<s.blkIndent)&&(!(s.tShift[j]-s.blkIndent>3)&&(!((w=s.bMarks[j]+s.tShift[j])>=(x=s.eMarks[j]))&&((45===(_=s.src.charCodeAt(w))||61===_)&&(w=s.skipChars(w,_),!((w=s.skipSpaces(w))<x)&&(w=s.bMarks[i]+s.tShift[i],s.line=j+1,s.tokens.push({type:\"heading_open\",hLevel:61===_?1:2,lines:[i,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:s.src.slice(w,s.eMarks[i]).trim(),level:s.level+1,lines:[i,s.line-1],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:61===_?1:2,level:s.level}),!0))))))}],[\"htmlblock\",function htmlblock(s,i,u,_){var w,x,j,P=s.bMarks[i],B=s.eMarks[i],$=s.tShift[i];if(P+=$,!s.options.html)return!1;if($>3||P+2>=B)return!1;if(60!==s.src.charCodeAt(P))return!1;if(33===(w=s.src.charCodeAt(P+1))||63===w){if(_)return!0}else{if(47!==w&&!function isLetter$1(s){var i=32|s;return i>=97&&i<=122}(w))return!1;if(47===w){if(!(x=s.src.slice(P,B).match(PC)))return!1}else if(!(x=s.src.slice(P,B).match(jC)))return!1;if(!0!==AC[x[1].toLowerCase()])return!1;if(_)return!0}for(j=i+1;j<s.lineMax&&!s.isEmpty(j);)j++;return s.line=j,s.tokens.push({type:\"htmlblock\",level:s.level,lines:[i,s.line],content:s.getLines(i,j,0,!0)}),!0},[\"paragraph\",\"blockquote\"]],[\"table\",function table(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee;if(i+2>u)return!1;if(B=i+1,s.tShift[B]<s.blkIndent)return!1;if((j=s.bMarks[B]+s.tShift[B])>=s.eMarks[B])return!1;if(124!==(w=s.src.charCodeAt(j))&&45!==w&&58!==w)return!1;if(x=index_browser_getLine(s,i+1),!/^[-:| ]+$/.test(x))return!1;if(($=x.split(\"|\"))<=2)return!1;for(Y=[],P=0;P<$.length;P++){if(!(X=$[P].trim())){if(0===P||P===$.length-1)continue;return!1}if(!/^:?-+:?$/.test(X))return!1;58===X.charCodeAt(X.length-1)?Y.push(58===X.charCodeAt(0)?\"center\":\"right\"):58===X.charCodeAt(0)?Y.push(\"left\"):Y.push(\"\")}if(-1===(x=index_browser_getLine(s,i).trim()).indexOf(\"|\"))return!1;if($=x.replace(/^\\||\\|$/g,\"\").split(\"|\"),Y.length!==$.length)return!1;if(_)return!0;for(s.tokens.push({type:\"table_open\",lines:Z=[i,0],level:s.level++}),s.tokens.push({type:\"thead_open\",lines:[i,i+1],level:s.level++}),s.tokens.push({type:\"tr_open\",lines:[i,i+1],level:s.level++}),P=0;P<$.length;P++)s.tokens.push({type:\"th_open\",align:Y[P],lines:[i,i+1],level:s.level++}),s.tokens.push({type:\"inline\",content:$[P].trim(),lines:[i,i+1],level:s.level,children:[]}),s.tokens.push({type:\"th_close\",level:--s.level});for(s.tokens.push({type:\"tr_close\",level:--s.level}),s.tokens.push({type:\"thead_close\",level:--s.level}),s.tokens.push({type:\"tbody_open\",lines:ee=[i+2,0],level:s.level++}),B=i+2;B<u&&!(s.tShift[B]<s.blkIndent)&&-1!==(x=index_browser_getLine(s,B).trim()).indexOf(\"|\");B++){for($=x.replace(/^\\||\\|$/g,\"\").split(\"|\"),s.tokens.push({type:\"tr_open\",level:s.level++}),P=0;P<$.length;P++)s.tokens.push({type:\"td_open\",align:Y[P],level:s.level++}),U=$[P].substring(124===$[P].charCodeAt(0)?1:0,124===$[P].charCodeAt($[P].length-1)?$[P].length-1:$[P].length).trim(),s.tokens.push({type:\"inline\",content:U,level:s.level,children:[]}),s.tokens.push({type:\"td_close\",level:--s.level});s.tokens.push({type:\"tr_close\",level:--s.level})}return s.tokens.push({type:\"tbody_close\",level:--s.level}),s.tokens.push({type:\"table_close\",level:--s.level}),Z[1]=ee[1]=B,s.line=B,!0},[\"paragraph\"]],[\"deflist\",function deflist(s,i,u,_){var w,x,j,P,B,$,U,Y,X,Z,ee,ie,ae,le;if(_)return!(s.ddIndent<0)&&skipMarker(s,i)>=0;if(U=i+1,s.isEmpty(U)&&++U>u)return!1;if(s.tShift[U]<s.blkIndent)return!1;if((w=skipMarker(s,U))<0)return!1;if(s.level>=s.options.maxNesting)return!1;$=s.tokens.length,s.tokens.push({type:\"dl_open\",lines:B=[i,0],level:s.level++}),j=i,x=U;e:for(;;){for(le=!0,ae=!1,s.tokens.push({type:\"dt_open\",lines:[j,j],level:s.level++}),s.tokens.push({type:\"inline\",content:s.getLines(j,j+1,s.blkIndent,!1).trim(),level:s.level+1,lines:[j,j],children:[]}),s.tokens.push({type:\"dt_close\",level:--s.level});;){if(s.tokens.push({type:\"dd_open\",lines:P=[U,0],level:s.level++}),ie=s.tight,X=s.ddIndent,Y=s.blkIndent,ee=s.tShift[x],Z=s.parentType,s.blkIndent=s.ddIndent=s.tShift[x]+2,s.tShift[x]=w-s.bMarks[x],s.tight=!0,s.parentType=\"deflist\",s.parser.tokenize(s,x,u,!0),s.tight&&!ae||(le=!1),ae=s.line-x>1&&s.isEmpty(s.line-1),s.tShift[x]=ee,s.tight=ie,s.parentType=Z,s.blkIndent=Y,s.ddIndent=X,s.tokens.push({type:\"dd_close\",level:--s.level}),P[1]=U=s.line,U>=u)break e;if(s.tShift[U]<s.blkIndent)break e;if((w=skipMarker(s,U))<0)break;x=U}if(U>=u)break;if(j=U,s.isEmpty(j))break;if(s.tShift[j]<s.blkIndent)break;if((x=j+1)>=u)break;if(s.isEmpty(x)&&x++,x>=u)break;if(s.tShift[x]<s.blkIndent)break;if((w=skipMarker(s,x))<0)break}return s.tokens.push({type:\"dl_close\",level:--s.level}),B[1]=U,s.line=U,le&&function markTightParagraphs$1(s,i){var u,_,w=s.level+2;for(u=i+2,_=s.tokens.length-2;u<_;u++)s.tokens[u].level===w&&\"paragraph_open\"===s.tokens[u].type&&(s.tokens[u+2].tight=!0,s.tokens[u].tight=!0,u+=2)}(s,$),!0},[\"paragraph\"]],[\"paragraph\",function paragraph(s,i){var u,_,w,x,j,P,B=i+1;if(B<(u=s.lineMax)&&!s.isEmpty(B))for(P=s.parser.ruler.getRules(\"paragraph\");B<u&&!s.isEmpty(B);B++)if(!(s.tShift[B]-s.blkIndent>3)){for(w=!1,x=0,j=P.length;x<j;x++)if(P[x](s,B,u,!0)){w=!0;break}if(w)break}return _=s.getLines(i,B,s.blkIndent,!1).trim(),s.line=B,_.length&&(s.tokens.push({type:\"paragraph_open\",tight:!1,lines:[i,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:_,level:s.level+1,lines:[i,s.line],children:[]}),s.tokens.push({type:\"paragraph_close\",tight:!1,level:s.level})),!0}]];function ParserBlock(){this.ruler=new Ruler;for(var s=0;s<IC.length;s++)this.ruler.push(IC[s][0],IC[s][1],{alt:(IC[s][2]||[]).slice()})}ParserBlock.prototype.tokenize=function(s,i,u){for(var _,w=this.ruler.getRules(\"\"),x=w.length,j=i,P=!1;j<u&&(s.line=j=s.skipEmptyLines(j),!(j>=u))&&!(s.tShift[j]<s.blkIndent);){for(_=0;_<x&&!w[_](s,j,u,!1);_++);if(s.tight=!P,s.isEmpty(s.line-1)&&(P=!0),(j=s.line)<u&&s.isEmpty(j)){if(P=!0,++j<u&&\"list\"===s.parentType&&s.isEmpty(j))break;s.line=j}}};var NC=/[\\n\\t]/g,MC=/\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g,TC=/\\u00a0/g;function isTerminatorChar(s){switch(s){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}ParserBlock.prototype.parse=function(s,i,u,_){var w,x=0,j=0;if(!s)return[];(s=(s=s.replace(TC,\" \")).replace(MC,\"\\n\")).indexOf(\"\\t\")>=0&&(s=s.replace(NC,(function(i,u){var _;return 10===s.charCodeAt(u)?(x=u+1,j=0,i):(_=\"    \".slice((u-x-j)%4),j=u-x+1,_)}))),w=new StateBlock(s,this,i,u,_),this.tokenize(w,w.line,w.lineMax)};for(var RC=[],DC=0;DC<256;DC++)RC.push(0);function isAlphaNum(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122}function scanDelims(s,i){var u,_,w,x=i,j=!0,P=!0,B=s.posMax,$=s.src.charCodeAt(i);for(u=i>0?s.src.charCodeAt(i-1):-1;x<B&&s.src.charCodeAt(x)===$;)x++;return x>=B&&(j=!1),(w=x-i)>=4?j=P=!1:(32!==(_=x<B?s.src.charCodeAt(x):-1)&&10!==_||(j=!1),32!==u&&10!==u||(P=!1),95===$&&(isAlphaNum(u)&&(j=!1),isAlphaNum(_)&&(P=!1))),{can_open:j,can_close:P,delims:w}}\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach((function(s){RC[s.charCodeAt(0)]=1}));var LC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var BC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var FC=[\"coap\",\"doi\",\"javascript\",\"aaa\",\"aaas\",\"about\",\"acap\",\"cap\",\"cid\",\"crid\",\"data\",\"dav\",\"dict\",\"dns\",\"file\",\"ftp\",\"geo\",\"go\",\"gopher\",\"h323\",\"http\",\"https\",\"iax\",\"icap\",\"im\",\"imap\",\"info\",\"ipp\",\"iris\",\"iris.beep\",\"iris.xpc\",\"iris.xpcs\",\"iris.lwz\",\"ldap\",\"mailto\",\"mid\",\"msrp\",\"msrps\",\"mtqp\",\"mupdate\",\"news\",\"nfs\",\"ni\",\"nih\",\"nntp\",\"opaquelocktoken\",\"pop\",\"pres\",\"rtsp\",\"service\",\"session\",\"shttp\",\"sieve\",\"sip\",\"sips\",\"sms\",\"snmp\",\"soap.beep\",\"soap.beeps\",\"tag\",\"tel\",\"telnet\",\"tftp\",\"thismessage\",\"tn3270\",\"tip\",\"tv\",\"urn\",\"vemmi\",\"ws\",\"wss\",\"xcon\",\"xcon-userid\",\"xmlrpc.beep\",\"xmlrpc.beeps\",\"xmpp\",\"z39.50r\",\"z39.50s\",\"adiumxtra\",\"afp\",\"afs\",\"aim\",\"apt\",\"attachment\",\"aw\",\"beshare\",\"bitcoin\",\"bolo\",\"callto\",\"chrome\",\"chrome-extension\",\"com-eventbrite-attendee\",\"content\",\"cvs\",\"dlna-playsingle\",\"dlna-playcontainer\",\"dtn\",\"dvb\",\"ed2k\",\"facetime\",\"feed\",\"finger\",\"fish\",\"gg\",\"git\",\"gizmoproject\",\"gtalk\",\"hcp\",\"icon\",\"ipn\",\"irc\",\"irc6\",\"ircs\",\"itms\",\"jar\",\"jms\",\"keyparc\",\"lastfm\",\"ldaps\",\"magnet\",\"maps\",\"market\",\"message\",\"mms\",\"ms-help\",\"msnim\",\"mumble\",\"mvn\",\"notes\",\"oid\",\"palm\",\"paparazzi\",\"platform\",\"proxy\",\"psyc\",\"query\",\"res\",\"resource\",\"rmi\",\"rsync\",\"rtmp\",\"secondlife\",\"sftp\",\"sgn\",\"skype\",\"smb\",\"soldat\",\"spotify\",\"ssh\",\"steam\",\"svn\",\"teamspeak\",\"things\",\"udp\",\"unreal\",\"ut2004\",\"ventrilo\",\"view-source\",\"webcal\",\"wtai\",\"wyciwyg\",\"xfire\",\"xri\",\"ymsgr\"],qC=/^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,$C=/^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;function replace$1(s,i){return s=s.source,i=i||\"\",function self(u,_){return u?(_=_.source||_,s=s.replace(u,_),self):new RegExp(s,i)}}var UC=replace$1(/(?:unquoted|single_quoted|double_quoted)/)(\"unquoted\",/[^\"'=<>`\\x00-\\x20]+/)(\"single_quoted\",/'[^']*'/)(\"double_quoted\",/\"[^\"]*\"/)(),zC=replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)(\"attr_name\",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)(\"attr_value\",UC)(),VC=replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)(\"attribute\",zC)(),WC=replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)(\"open_tag\",VC)(\"close_tag\",/<\\/[A-Za-z][A-Za-z0-9]*\\s*>/)(\"comment\",/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/)(\"processing\",/<[?].*?[?]>/)(\"declaration\",/<![A-Z]+\\s+[^>]*>/)(\"cdata\",/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/)();var KC=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,HC=/^&([a-z][a-z0-9]{1,31});/i;var JC=[[\"text\",function index_browser_text(s,i){for(var u=s.pos;u<s.posMax&&!isTerminatorChar(s.src.charCodeAt(u));)u++;return u!==s.pos&&(i||(s.pending+=s.src.slice(s.pos,u)),s.pos=u,!0)}],[\"newline\",function newline(s,i){var u,_,w=s.pos;if(10!==s.src.charCodeAt(w))return!1;if(u=s.pending.length-1,_=s.posMax,!i)if(u>=0&&32===s.pending.charCodeAt(u))if(u>=1&&32===s.pending.charCodeAt(u-1)){for(var x=u-2;x>=0;x--)if(32!==s.pending.charCodeAt(x)){s.pending=s.pending.substring(0,x+1);break}s.push({type:\"hardbreak\",level:s.level})}else s.pending=s.pending.slice(0,-1),s.push({type:\"softbreak\",level:s.level});else s.push({type:\"softbreak\",level:s.level});for(w++;w<_&&32===s.src.charCodeAt(w);)w++;return s.pos=w,!0}],[\"escape\",function index_browser_escape(s,i){var u,_=s.pos,w=s.posMax;if(92!==s.src.charCodeAt(_))return!1;if(++_<w){if((u=s.src.charCodeAt(_))<256&&0!==RC[u])return i||(s.pending+=s.src[_]),s.pos+=2,!0;if(10===u){for(i||s.push({type:\"hardbreak\",level:s.level}),_++;_<w&&32===s.src.charCodeAt(_);)_++;return s.pos=_,!0}}return i||(s.pending+=\"\\\\\"),s.pos++,!0}],[\"backticks\",function backticks(s,i){var u,_,w,x,j,P=s.pos;if(96!==s.src.charCodeAt(P))return!1;for(u=P,P++,_=s.posMax;P<_&&96===s.src.charCodeAt(P);)P++;for(w=s.src.slice(u,P),x=j=P;-1!==(x=s.src.indexOf(\"`\",j));){for(j=x+1;j<_&&96===s.src.charCodeAt(j);)j++;if(j-x===w.length)return i||s.push({type:\"code\",content:s.src.slice(P,x).replace(/[ \\n]+/g,\" \").trim(),block:!1,level:s.level}),s.pos=j,!0}return i||(s.pending+=w),s.pos+=w.length,!0}],[\"del\",function del(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(126!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(126!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),126===x)return!1;if(126===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&126===s.src.charCodeAt(_);)_++;if(_>B+3)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(126===s.src.charCodeAt(s.pos)&&126===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),126!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&126!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"del_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"del_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"ins\",function ins(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(43!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(43!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),43===x)return!1;if(43===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&43===s.src.charCodeAt(_);)_++;if(_!==B+2)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(43===s.src.charCodeAt(s.pos)&&43===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),43!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&43!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"ins_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"ins_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"mark\",function mark(s,i){var u,_,w,x,j,P=s.posMax,B=s.pos;if(61!==s.src.charCodeAt(B))return!1;if(i)return!1;if(B+4>=P)return!1;if(61!==s.src.charCodeAt(B+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(x=B>0?s.src.charCodeAt(B-1):-1,j=s.src.charCodeAt(B+2),61===x)return!1;if(61===j)return!1;if(32===j||10===j)return!1;for(_=B+2;_<P&&61===s.src.charCodeAt(_);)_++;if(_!==B+2)return s.pos+=_-B,i||(s.pending+=s.src.slice(B,_)),!0;for(s.pos=B+2,w=1;s.pos+1<P;){if(61===s.src.charCodeAt(s.pos)&&61===s.src.charCodeAt(s.pos+1)&&(x=s.src.charCodeAt(s.pos-1),61!==(j=s.pos+2<P?s.src.charCodeAt(s.pos+2):-1)&&61!==x&&(32!==x&&10!==x?w--:32!==j&&10!==j&&w++,w<=0))){u=!0;break}s.parser.skipToken(s)}return u?(s.posMax=s.pos,s.pos=B+2,i||(s.push({type:\"mark_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"mark_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=P,!0):(s.pos=B,!1)}],[\"emphasis\",function emphasis(s,i){var u,_,w,x,j,P,B,$=s.posMax,U=s.pos,Y=s.src.charCodeAt(U);if(95!==Y&&42!==Y)return!1;if(i)return!1;if(u=(B=scanDelims(s,U)).delims,!B.can_open)return s.pos+=u,i||(s.pending+=s.src.slice(U,s.pos)),!0;if(s.level>=s.options.maxNesting)return!1;for(s.pos=U+u,P=[u];s.pos<$;)if(s.src.charCodeAt(s.pos)!==Y)s.parser.skipToken(s);else{if(_=(B=scanDelims(s,s.pos)).delims,B.can_close){for(x=P.pop(),j=_;x!==j;){if(j<x){P.push(x-j);break}if(j-=x,0===P.length)break;s.pos+=x,x=P.pop()}if(0===P.length){u=x,w=!0;break}s.pos+=_;continue}B.can_open&&P.push(_),s.pos+=_}return w?(s.posMax=s.pos,s.pos=U+u,i||(2!==u&&3!==u||s.push({type:\"strong_open\",level:s.level++}),1!==u&&3!==u||s.push({type:\"em_open\",level:s.level++}),s.parser.tokenize(s),1!==u&&3!==u||s.push({type:\"em_close\",level:--s.level}),2!==u&&3!==u||s.push({type:\"strong_close\",level:--s.level})),s.pos=s.posMax+u,s.posMax=$,!0):(s.pos=U,!1)}],[\"sub\",function sub(s,i){var u,_,w=s.posMax,x=s.pos;if(126!==s.src.charCodeAt(x))return!1;if(i)return!1;if(x+2>=w)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=x+1;s.pos<w;){if(126===s.src.charCodeAt(s.pos)){u=!0;break}s.parser.skipToken(s)}return u&&x+1!==s.pos?(_=s.src.slice(x+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=x,!1):(s.posMax=s.pos,s.pos=x+1,i||s.push({type:\"sub\",level:s.level,content:_.replace(LC,\"$1\")}),s.pos=s.posMax+1,s.posMax=w,!0):(s.pos=x,!1)}],[\"sup\",function sup(s,i){var u,_,w=s.posMax,x=s.pos;if(94!==s.src.charCodeAt(x))return!1;if(i)return!1;if(x+2>=w)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=x+1;s.pos<w;){if(94===s.src.charCodeAt(s.pos)){u=!0;break}s.parser.skipToken(s)}return u&&x+1!==s.pos?(_=s.src.slice(x+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=x,!1):(s.posMax=s.pos,s.pos=x+1,i||s.push({type:\"sup\",level:s.level,content:_.replace(BC,\"$1\")}),s.pos=s.posMax+1,s.posMax=w,!0):(s.pos=x,!1)}],[\"links\",function links(s,i){var u,_,w,x,j,P,B,$,U=!1,Y=s.pos,X=s.posMax,Z=s.pos,ee=s.src.charCodeAt(Z);if(33===ee&&(U=!0,ee=s.src.charCodeAt(++Z)),91!==ee)return!1;if(s.level>=s.options.maxNesting)return!1;if(u=Z+1,(_=parseLinkLabel(s,Z))<0)return!1;if((P=_+1)<X&&40===s.src.charCodeAt(P)){for(P++;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P>=X)return!1;for(Z=P,parseLinkDestination(s,P)?(x=s.linkContent,P=s.pos):x=\"\",Z=P;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P<X&&Z!==P&&parseLinkTitle(s,P))for(j=s.linkContent,P=s.pos;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);else j=\"\";if(P>=X||41!==s.src.charCodeAt(P))return s.pos=Y,!1;P++}else{if(s.linkLevel>0)return!1;for(;P<X&&(32===($=s.src.charCodeAt(P))||10===$);P++);if(P<X&&91===s.src.charCodeAt(P)&&(Z=P+1,(P=parseLinkLabel(s,P))>=0?w=s.src.slice(Z,P++):P=Z-1),w||(void 0===w&&(P=_+1),w=s.src.slice(u,_)),!(B=s.env.references[normalizeReference(w)]))return s.pos=Y,!1;x=B.href,j=B.title}return i||(s.pos=u,s.posMax=_,U?s.push({type:\"image\",src:x,title:j,alt:s.src.substr(u,_-u),level:s.level}):(s.push({type:\"link_open\",href:x,title:j,level:s.level++}),s.linkLevel++,s.parser.tokenize(s),s.linkLevel--,s.push({type:\"link_close\",level:--s.level}))),s.pos=P,s.posMax=X,!0}],[\"footnote_inline\",function footnote_inline(s,i){var u,_,w,x,j=s.posMax,P=s.pos;return!(P+2>=j)&&(94===s.src.charCodeAt(P)&&(91===s.src.charCodeAt(P+1)&&(!(s.level>=s.options.maxNesting)&&(u=P+2,!((_=parseLinkLabel(s,P+1))<0)&&(i||(s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.list||(s.env.footnotes.list=[]),w=s.env.footnotes.list.length,s.pos=u,s.posMax=_,s.push({type:\"footnote_ref\",id:w,level:s.level}),s.linkLevel++,x=s.tokens.length,s.parser.tokenize(s),s.env.footnotes.list[w]={tokens:s.tokens.splice(x)},s.linkLevel--),s.pos=_+1,s.posMax=j,!0)))))}],[\"footnote_ref\",function footnote_ref(s,i){var u,_,w,x,j=s.posMax,P=s.pos;if(P+3>j)return!1;if(!s.env.footnotes||!s.env.footnotes.refs)return!1;if(91!==s.src.charCodeAt(P))return!1;if(94!==s.src.charCodeAt(P+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(_=P+2;_<j;_++){if(32===s.src.charCodeAt(_))return!1;if(10===s.src.charCodeAt(_))return!1;if(93===s.src.charCodeAt(_))break}return _!==P+2&&(!(_>=j)&&(_++,u=s.src.slice(P+2,_-1),void 0!==s.env.footnotes.refs[\":\"+u]&&(i||(s.env.footnotes.list||(s.env.footnotes.list=[]),s.env.footnotes.refs[\":\"+u]<0?(w=s.env.footnotes.list.length,s.env.footnotes.list[w]={label:u,count:0},s.env.footnotes.refs[\":\"+u]=w):w=s.env.footnotes.refs[\":\"+u],x=s.env.footnotes.list[w].count,s.env.footnotes.list[w].count++,s.push({type:\"footnote_ref\",id:w,subId:x,level:s.level})),s.pos=_,s.posMax=j,!0)))}],[\"autolink\",function autolink(s,i){var u,_,w,x,j,P=s.pos;return 60===s.src.charCodeAt(P)&&(!((u=s.src.slice(P)).indexOf(\">\")<0)&&((_=u.match($C))?!(FC.indexOf(_[1].toLowerCase())<0)&&(j=normalizeLink(x=_[0].slice(1,-1)),!!s.parser.validateLink(x)&&(i||(s.push({type:\"link_open\",href:j,level:s.level}),s.push({type:\"text\",content:x,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=_[0].length,!0)):!!(w=u.match(qC))&&(j=normalizeLink(\"mailto:\"+(x=w[0].slice(1,-1))),!!s.parser.validateLink(j)&&(i||(s.push({type:\"link_open\",href:j,level:s.level}),s.push({type:\"text\",content:x,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=w[0].length,!0))))}],[\"htmltag\",function htmltag(s,i){var u,_,w,x=s.pos;return!!s.options.html&&(w=s.posMax,!(60!==s.src.charCodeAt(x)||x+2>=w)&&(!(33!==(u=s.src.charCodeAt(x+1))&&63!==u&&47!==u&&!function isLetter$2(s){var i=32|s;return i>=97&&i<=122}(u))&&(!!(_=s.src.slice(x).match(WC))&&(i||s.push({type:\"htmltag\",content:s.src.slice(x,x+_[0].length),level:s.level}),s.pos+=_[0].length,!0))))}],[\"entity\",function entity(s,i){var u,_,w=s.pos,x=s.posMax;if(38!==s.src.charCodeAt(w))return!1;if(w+1<x)if(35===s.src.charCodeAt(w+1)){if(_=s.src.slice(w).match(KC))return i||(u=\"x\"===_[1][0].toLowerCase()?parseInt(_[1].slice(1),16):parseInt(_[1],10),s.pending+=isValidEntityCode(u)?fromCodePoint(u):fromCodePoint(65533)),s.pos+=_[0].length,!0}else if(_=s.src.slice(w).match(HC)){var j=decodeEntity(_[1]);if(_[1]!==j)return i||(s.pending+=j),s.pos+=_[0].length,!0}return i||(s.pending+=\"&\"),s.pos++,!0}]];function ParserInline(){this.ruler=new Ruler;for(var s=0;s<JC.length;s++)this.ruler.push(JC[s][0],JC[s][1]);this.validateLink=validateLink}function validateLink(s){var i=s.trim().toLowerCase();return-1===(i=replaceEntities(i)).indexOf(\":\")||-1===[\"vbscript\",\"javascript\",\"file\",\"data\"].indexOf(i.split(\":\")[0])}ParserInline.prototype.skipToken=function(s){var i,u,_=this.ruler.getRules(\"\"),w=_.length,x=s.pos;if((u=s.cacheGet(x))>0)s.pos=u;else{for(i=0;i<w;i++)if(_[i](s,!0))return void s.cacheSet(x,s.pos);s.pos++,s.cacheSet(x,s.pos)}},ParserInline.prototype.tokenize=function(s){for(var i,u,_=this.ruler.getRules(\"\"),w=_.length,x=s.posMax;s.pos<x;){for(u=0;u<w&&!(i=_[u](s,!1));u++);if(i){if(s.pos>=x)break}else s.pending+=s.src[s.pos++]}s.pending&&s.pushPending()},ParserInline.prototype.parse=function(s,i,u,_){var w=new StateInline(s,this,i,u,_);this.tokenize(w)};var GC={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"replacements\",\"smartquotes\",\"references\",\"abbr2\",\"footnote_tail\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"footnote\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\",\"table\"]},inline:{rules:[\"autolink\",\"backticks\",\"del\",\"emphasis\",\"entity\",\"escape\",\"footnote_ref\",\"htmltag\",\"links\",\"newline\",\"text\"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"abbr2\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\"]},inline:{rules:[\"autolink\",\"backticks\",\"emphasis\",\"entity\",\"escape\",\"htmltag\",\"links\",\"newline\",\"text\"]}}}};function StateCore(s,i,u){this.src=i,this.env=u,this.options=s.options,this.tokens=[],this.inlineMode=!1,this.inline=s.inline,this.block=s.block,this.renderer=s.renderer,this.typographer=s.typographer}function Remarkable(s,i){\"string\"!=typeof s&&(i=s,s=\"default\"),i&&null!=i.linkify&&console.warn(\"linkify option is removed. Use linkify plugin instead:\\n\\nimport Remarkable from 'remarkable';\\nimport linkify from 'remarkable/linkify';\\nnew Remarkable().use(linkify)\\n\"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.ruler=new Ruler,this.options={},this.configure(GC[s]),this.set(i||{})}Remarkable.prototype.set=function(s){index_browser_assign(this.options,s)},Remarkable.prototype.configure=function(s){var i=this;if(!s)throw new Error(\"Wrong `remarkable` preset, check name/content\");s.options&&i.set(s.options),s.components&&Object.keys(s.components).forEach((function(u){s.components[u].rules&&i[u].ruler.enable(s.components[u].rules,!0)}))},Remarkable.prototype.use=function(s,i){return s(this,i),this},Remarkable.prototype.parse=function(s,i){var u=new StateCore(this,s,i);return this.core.process(u),u.tokens},Remarkable.prototype.render=function(s,i){return i=i||{},this.renderer.render(this.parse(s,i),this.options,i)},Remarkable.prototype.parseInline=function(s,i){var u=new StateCore(this,s,i);return u.inlineMode=!0,this.core.process(u),u.tokens},Remarkable.prototype.renderInline=function(s,i){return i=i||{},this.renderer.render(this.parseInline(s,i),this.options,i)};function indexOf(s,i){if(Array.prototype.indexOf)return s.indexOf(i);for(var u=0,_=s.length;u<_;u++)if(s[u]===i)return u;return-1}function utils_remove(s,i){for(var u=s.length-1;u>=0;u--)!0===i(s[u])&&s.splice(u,1)}function throwUnhandledCaseError(s){throw new Error(\"Unhandled case for value: '\".concat(s,\"'\"))}var YC=function(){function HtmlTag(s){void 0===s&&(s={}),this.tagName=\"\",this.attrs={},this.innerHTML=\"\",this.whitespaceRegex=/\\s+/,this.tagName=s.tagName||\"\",this.attrs=s.attrs||{},this.innerHTML=s.innerHtml||s.innerHTML||\"\"}return HtmlTag.prototype.setTagName=function(s){return this.tagName=s,this},HtmlTag.prototype.getTagName=function(){return this.tagName||\"\"},HtmlTag.prototype.setAttr=function(s,i){return this.getAttrs()[s]=i,this},HtmlTag.prototype.getAttr=function(s){return this.getAttrs()[s]},HtmlTag.prototype.setAttrs=function(s){return Object.assign(this.getAttrs(),s),this},HtmlTag.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},HtmlTag.prototype.setClass=function(s){return this.setAttr(\"class\",s)},HtmlTag.prototype.addClass=function(s){for(var i,u=this.getClass(),_=this.whitespaceRegex,w=u?u.split(_):[],x=s.split(_);i=x.shift();)-1===indexOf(w,i)&&w.push(i);return this.getAttrs().class=w.join(\" \"),this},HtmlTag.prototype.removeClass=function(s){for(var i,u=this.getClass(),_=this.whitespaceRegex,w=u?u.split(_):[],x=s.split(_);w.length&&(i=x.shift());){var j=indexOf(w,i);-1!==j&&w.splice(j,1)}return this.getAttrs().class=w.join(\" \"),this},HtmlTag.prototype.getClass=function(){return this.getAttrs().class||\"\"},HtmlTag.prototype.hasClass=function(s){return-1!==(\" \"+this.getClass()+\" \").indexOf(\" \"+s+\" \")},HtmlTag.prototype.setInnerHTML=function(s){return this.innerHTML=s,this},HtmlTag.prototype.setInnerHtml=function(s){return this.setInnerHTML(s)},HtmlTag.prototype.getInnerHTML=function(){return this.innerHTML||\"\"},HtmlTag.prototype.getInnerHtml=function(){return this.getInnerHTML()},HtmlTag.prototype.toAnchorString=function(){var s=this.getTagName(),i=this.buildAttrsStr();return[\"<\",s,i=i?\" \"+i:\"\",\">\",this.getInnerHtml(),\"</\",s,\">\"].join(\"\")},HtmlTag.prototype.buildAttrsStr=function(){if(!this.attrs)return\"\";var s=this.getAttrs(),i=[];for(var u in s)s.hasOwnProperty(u)&&i.push(u+'=\"'+s[u]+'\"');return i.join(\" \")},HtmlTag}();var XC=function(){function AnchorTagBuilder(s){void 0===s&&(s={}),this.newWindow=!1,this.truncate={},this.className=\"\",this.newWindow=s.newWindow||!1,this.truncate=s.truncate||{},this.className=s.className||\"\"}return AnchorTagBuilder.prototype.build=function(s){return new YC({tagName:\"a\",attrs:this.createAttrs(s),innerHtml:this.processAnchorText(s.getAnchorText())})},AnchorTagBuilder.prototype.createAttrs=function(s){var i={href:s.getAnchorHref()},u=this.createCssClass(s);return u&&(i.class=u),this.newWindow&&(i.target=\"_blank\",i.rel=\"noopener noreferrer\"),this.truncate&&this.truncate.length&&this.truncate.length<s.getAnchorText().length&&(i.title=s.getAnchorHref()),i},AnchorTagBuilder.prototype.createCssClass=function(s){var i=this.className;if(i){for(var u=[i],_=s.getCssClassSuffixes(),w=0,x=_.length;w<x;w++)u.push(i+\"-\"+_[w]);return u.join(\" \")}return\"\"},AnchorTagBuilder.prototype.processAnchorText=function(s){return s=this.doTruncate(s)},AnchorTagBuilder.prototype.doTruncate=function(s){var i=this.truncate;if(!i||!i.length)return s;var u=i.length,_=i.location;return\"smart\"===_?function truncateSmart(s,i,u){var _,w;null==u?(u=\"&hellip;\",w=3,_=8):(w=u.length,_=u.length);var buildUrl=function(s){var i=\"\";return s.scheme&&s.host&&(i+=s.scheme+\"://\"),s.host&&(i+=s.host),s.path&&(i+=\"/\"+s.path),s.query&&(i+=\"?\"+s.query),s.fragment&&(i+=\"#\"+s.fragment),i},buildSegment=function(s,i){var _=i/2,w=Math.ceil(_),x=-1*Math.floor(_),j=\"\";return x<0&&(j=s.substr(x)),s.substr(0,w)+u+j};if(s.length<=i)return s;var x=i-w,j=function(s){var i={},u=s,_=u.match(/^([a-z]+):\\/\\//i);return _&&(i.scheme=_[1],u=u.substr(_[0].length)),(_=u.match(/^(.*?)(?=(\\?|#|\\/|$))/i))&&(i.host=_[1],u=u.substr(_[0].length)),(_=u.match(/^\\/(.*?)(?=(\\?|#|$))/i))&&(i.path=_[1],u=u.substr(_[0].length)),(_=u.match(/^\\?(.*?)(?=(#|$))/i))&&(i.query=_[1],u=u.substr(_[0].length)),(_=u.match(/^#(.*?)$/i))&&(i.fragment=_[1]),i}(s);if(j.query){var P=j.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);P&&(j.query=j.query.substr(0,P[1].length),s=buildUrl(j))}if(s.length<=i)return s;if(j.host&&(j.host=j.host.replace(/^www\\./,\"\"),s=buildUrl(j)),s.length<=i)return s;var B=\"\";if(j.host&&(B+=j.host),B.length>=x)return j.host.length==i?(j.host.substr(0,i-w)+u).substr(0,x+_):buildSegment(B,x).substr(0,x+_);var $=\"\";if(j.path&&($+=\"/\"+j.path),j.query&&($+=\"?\"+j.query),$){if((B+$).length>=x)return(B+$).length==i?(B+$).substr(0,i):(B+buildSegment($,x-B.length)).substr(0,x+_);B+=$}if(j.fragment){var U=\"#\"+j.fragment;if((B+U).length>=x)return(B+U).length==i?(B+U).substr(0,i):(B+buildSegment(U,x-B.length)).substr(0,x+_);B+=U}if(j.scheme&&j.host){var Y=j.scheme+\"://\";if((B+Y).length<x)return(Y+B).substr(0,i)}if(B.length<=i)return B;var X=\"\";return x>0&&(X=B.substr(-1*Math.floor(x/2))),(B.substr(0,Math.ceil(x/2))+u+X).substr(0,x+_)}(s,u):\"middle\"===_?function truncateMiddle(s,i,u){if(s.length<=i)return s;var _,w;null==u?(u=\"&hellip;\",_=8,w=3):(_=u.length,w=u.length);var x=i-w,j=\"\";return x>0&&(j=s.substr(-1*Math.floor(x/2))),(s.substr(0,Math.ceil(x/2))+u+j).substr(0,x+_)}(s,u):function truncateEnd(s,i,u){return function ellipsis(s,i,u){var _;return s.length>i&&(null==u?(u=\"&hellip;\",_=3):_=u.length,s=s.substring(0,i-_)+u),s}(s,i,u)}(s,u)},AnchorTagBuilder}(),QC=function(){function Match(s){this.__jsduckDummyDocProp=null,this.matchedText=\"\",this.offset=0,this.tagBuilder=s.tagBuilder,this.matchedText=s.matchedText,this.offset=s.offset}return Match.prototype.getMatchedText=function(){return this.matchedText},Match.prototype.setOffset=function(s){this.offset=s},Match.prototype.getOffset=function(){return this.offset},Match.prototype.getCssClassSuffixes=function(){return[this.getType()]},Match.prototype.buildTag=function(){return this.tagBuilder.build(this)},Match}(),extendStatics=function(s,i){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])},extendStatics(s,i)};function tslib_es6_extends(s,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Class extends value \"+String(i)+\" is not a constructor or null\");function __(){this.constructor=s}extendStatics(s,i),s.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}var __assign=function(){return __assign=Object.assign||function __assign(s){for(var i,u=1,_=arguments.length;u<_;u++)for(var w in i=arguments[u])Object.prototype.hasOwnProperty.call(i,w)&&(s[w]=i[w]);return s},__assign.apply(this,arguments)};Object.create;Object.create;\"function\"==typeof SuppressedError&&SuppressedError;var ZC,eA=function(s){function EmailMatch(i){var u=s.call(this,i)||this;return u.email=\"\",u.email=i.email,u}return tslib_es6_extends(EmailMatch,s),EmailMatch.prototype.getType=function(){return\"email\"},EmailMatch.prototype.getEmail=function(){return this.email},EmailMatch.prototype.getAnchorHref=function(){return\"mailto:\"+this.email},EmailMatch.prototype.getAnchorText=function(){return this.email},EmailMatch}(QC),tA=function(s){function HashtagMatch(i){var u=s.call(this,i)||this;return u.serviceName=\"\",u.hashtag=\"\",u.serviceName=i.serviceName,u.hashtag=i.hashtag,u}return tslib_es6_extends(HashtagMatch,s),HashtagMatch.prototype.getType=function(){return\"hashtag\"},HashtagMatch.prototype.getServiceName=function(){return this.serviceName},HashtagMatch.prototype.getHashtag=function(){return this.hashtag},HashtagMatch.prototype.getAnchorHref=function(){var s=this.serviceName,i=this.hashtag;switch(s){case\"twitter\":return\"https://twitter.com/hashtag/\"+i;case\"facebook\":return\"https://www.facebook.com/hashtag/\"+i;case\"instagram\":return\"https://instagram.com/explore/tags/\"+i;case\"tiktok\":return\"https://www.tiktok.com/tag/\"+i;default:throw new Error(\"Unknown service name to point hashtag to: \"+s)}},HashtagMatch.prototype.getAnchorText=function(){return\"#\"+this.hashtag},HashtagMatch}(QC),rA=function(s){function MentionMatch(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.mention=\"\",u.mention=i.mention,u.serviceName=i.serviceName,u}return tslib_es6_extends(MentionMatch,s),MentionMatch.prototype.getType=function(){return\"mention\"},MentionMatch.prototype.getMention=function(){return this.mention},MentionMatch.prototype.getServiceName=function(){return this.serviceName},MentionMatch.prototype.getAnchorHref=function(){switch(this.serviceName){case\"twitter\":return\"https://twitter.com/\"+this.mention;case\"instagram\":return\"https://instagram.com/\"+this.mention;case\"soundcloud\":return\"https://soundcloud.com/\"+this.mention;case\"tiktok\":return\"https://www.tiktok.com/@\"+this.mention;default:throw new Error(\"Unknown service name to point mention to: \"+this.serviceName)}},MentionMatch.prototype.getAnchorText=function(){return\"@\"+this.mention},MentionMatch.prototype.getCssClassSuffixes=function(){var i=s.prototype.getCssClassSuffixes.call(this),u=this.getServiceName();return u&&i.push(u),i},MentionMatch}(QC),nA=function(s){function PhoneMatch(i){var u=s.call(this,i)||this;return u.number=\"\",u.plusSign=!1,u.number=i.number,u.plusSign=i.plusSign,u}return tslib_es6_extends(PhoneMatch,s),PhoneMatch.prototype.getType=function(){return\"phone\"},PhoneMatch.prototype.getPhoneNumber=function(){return this.number},PhoneMatch.prototype.getNumber=function(){return this.getPhoneNumber()},PhoneMatch.prototype.getAnchorHref=function(){return\"tel:\"+(this.plusSign?\"+\":\"\")+this.number},PhoneMatch.prototype.getAnchorText=function(){return this.matchedText},PhoneMatch}(QC),oA=function(s){function UrlMatch(i){var u=s.call(this,i)||this;return u.url=\"\",u.urlMatchType=\"scheme\",u.protocolUrlMatch=!1,u.protocolRelativeMatch=!1,u.stripPrefix={scheme:!0,www:!0},u.stripTrailingSlash=!0,u.decodePercentEncoding=!0,u.schemePrefixRegex=/^(https?:\\/\\/)?/i,u.wwwPrefixRegex=/^(https?:\\/\\/)?(www\\.)?/i,u.protocolRelativeRegex=/^\\/\\//,u.protocolPrepended=!1,u.urlMatchType=i.urlMatchType,u.url=i.url,u.protocolUrlMatch=i.protocolUrlMatch,u.protocolRelativeMatch=i.protocolRelativeMatch,u.stripPrefix=i.stripPrefix,u.stripTrailingSlash=i.stripTrailingSlash,u.decodePercentEncoding=i.decodePercentEncoding,u}return tslib_es6_extends(UrlMatch,s),UrlMatch.prototype.getType=function(){return\"url\"},UrlMatch.prototype.getUrlMatchType=function(){return this.urlMatchType},UrlMatch.prototype.getUrl=function(){var s=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(s=this.url=\"http://\"+s,this.protocolPrepended=!0),s},UrlMatch.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,\"&\")},UrlMatch.prototype.getAnchorText=function(){var s=this.getMatchedText();return this.protocolRelativeMatch&&(s=this.stripProtocolRelativePrefix(s)),this.stripPrefix.scheme&&(s=this.stripSchemePrefix(s)),this.stripPrefix.www&&(s=this.stripWwwPrefix(s)),this.stripTrailingSlash&&(s=this.removeTrailingSlash(s)),this.decodePercentEncoding&&(s=this.removePercentEncoding(s)),s},UrlMatch.prototype.stripSchemePrefix=function(s){return s.replace(this.schemePrefixRegex,\"\")},UrlMatch.prototype.stripWwwPrefix=function(s){return s.replace(this.wwwPrefixRegex,\"$1\")},UrlMatch.prototype.stripProtocolRelativePrefix=function(s){return s.replace(this.protocolRelativeRegex,\"\")},UrlMatch.prototype.removeTrailingSlash=function(s){return\"/\"===s.charAt(s.length-1)&&(s=s.slice(0,-1)),s},UrlMatch.prototype.removePercentEncoding=function(s){var i=s.replace(/%22/gi,\"&quot;\").replace(/%26/gi,\"&amp;\").replace(/%27/gi,\"&#39;\").replace(/%3C/gi,\"&lt;\").replace(/%3E/gi,\"&gt;\");try{return decodeURIComponent(i)}catch(s){return i}},UrlMatch}(QC),sA=function sA(s){this.__jsduckDummyDocProp=null,this.tagBuilder=s.tagBuilder},iA=/[A-Za-z]/,aA=/[\\d]/,lA=/[\\D]/,cA=/\\s/,uA=/['\"]/,pA=/[\\x00-\\x1F\\x7F]/,hA=/A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source,dA=hA+/\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source+/\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source,fA=/0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source,mA=dA+fA,gA=dA+fA,yA=new RegExp(\"[\".concat(gA,\"]\")),vA=\"(?:[\"+fA+\"]{1,3}\\\\.){3}[\"+fA+\"]{1,3}\",bA=\"[\"+gA+\"](?:[\"+gA+\"\\\\-_]{0,61}[\"+gA+\"])?\",getDomainLabelStr=function(s){return\"(?=(\"+bA+\"))\\\\\"+s},getDomainNameStr=function(s){return\"(?:\"+getDomainLabelStr(s)+\"(?:\\\\.\"+getDomainLabelStr(s+1)+\"){0,126}|\"+vA+\")\"},_A=(new RegExp(\"[\"+gA+\".\\\\-]*[\"+gA+\"\\\\-]\"),yA),EA=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,wA=new RegExp(\"[\".concat(gA,\"!#$%&'*+/=?^_`{|}~-]\")),SA=new RegExp(\"^\".concat(EA.source,\"$\")),xA=function(s){function EmailMatcher(){var i=null!==s&&s.apply(this,arguments)||this;return i.localPartCharRegex=wA,i.strictTldRegex=SA,i}return tslib_es6_extends(EmailMatcher,s),EmailMatcher.prototype.parseMatches=function(s){for(var i=this.tagBuilder,u=this.localPartCharRegex,_=this.strictTldRegex,w=[],x=s.length,j=new kA,P={m:\"a\",a:\"i\",i:\"l\",l:\"t\",t:\"o\",o:\":\"},B=0,$=0,U=j;B<x;){var Y=s.charAt(B);switch($){case 0:stateNonEmailAddress(Y);break;case 1:stateMailTo(s.charAt(B-1),Y);break;case 2:stateLocalPart(Y);break;case 3:stateLocalPartDot(Y);break;case 4:stateAtSign(Y);break;case 5:stateDomainChar(Y);break;case 6:stateDomainHyphen(Y);break;case 7:stateDomainDot(Y);break;default:throwUnhandledCaseError($)}B++}return captureMatchIfValidAndReset(),w;function stateNonEmailAddress(s){\"m\"===s?beginEmailMatch(1):u.test(s)&&beginEmailMatch()}function stateMailTo(s,i){\":\"===s?u.test(i)?($=2,U=new kA(__assign(__assign({},U),{hasMailtoPrefix:!0}))):resetToNonEmailMatchState():P[s]===i||(u.test(i)?$=2:\".\"===i?$=3:\"@\"===i?$=4:resetToNonEmailMatchState())}function stateLocalPart(s){\".\"===s?$=3:\"@\"===s?$=4:u.test(s)||resetToNonEmailMatchState()}function stateLocalPartDot(s){\".\"===s||\"@\"===s?resetToNonEmailMatchState():u.test(s)?$=2:resetToNonEmailMatchState()}function stateAtSign(s){_A.test(s)?$=5:resetToNonEmailMatchState()}function stateDomainChar(s){\".\"===s?$=7:\"-\"===s?$=6:_A.test(s)||captureMatchIfValidAndReset()}function stateDomainHyphen(s){\"-\"===s||\".\"===s?captureMatchIfValidAndReset():_A.test(s)?$=5:captureMatchIfValidAndReset()}function stateDomainDot(s){\".\"===s||\"-\"===s?captureMatchIfValidAndReset():_A.test(s)?($=5,U=new kA(__assign(__assign({},U),{hasDomainDot:!0}))):captureMatchIfValidAndReset()}function beginEmailMatch(s){void 0===s&&(s=2),$=s,U=new kA({idx:B})}function resetToNonEmailMatchState(){$=0,U=j}function captureMatchIfValidAndReset(){if(U.hasDomainDot){var u=s.slice(U.idx,B);/[-.]$/.test(u)&&(u=u.slice(0,-1));var x=U.hasMailtoPrefix?u.slice(7):u;(function doesEmailHaveValidTld(s){var i=s.split(\".\").pop()||\"\",u=i.toLowerCase();return _.test(u)})(x)&&w.push(new eA({tagBuilder:i,matchedText:u,offset:U.idx,email:x}))}resetToNonEmailMatchState()}},EmailMatcher}(sA),kA=function kA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.hasMailtoPrefix=!!s.hasMailtoPrefix,this.hasDomainDot=!!s.hasDomainDot},OA=function(){function UrlMatchValidator(){}return UrlMatchValidator.isValid=function(s,i){return!(i&&!this.isValidUriScheme(i)||this.urlMatchDoesNotHaveProtocolOrDot(s,i)||this.urlMatchDoesNotHaveAtLeastOneWordChar(s,i)&&!this.isValidIpAddress(s)||this.containsMultipleDots(s))},UrlMatchValidator.isValidIpAddress=function(s){var i=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==s.match(i)},UrlMatchValidator.containsMultipleDots=function(s){var i=s;return this.hasFullProtocolRegex.test(s)&&(i=s.split(\"://\")[1]),i.split(\"/\")[0].indexOf(\"..\")>-1},UrlMatchValidator.isValidUriScheme=function(s){var i=s.match(this.uriSchemeRegex),u=i&&i[0].toLowerCase();return\"javascript:\"!==u&&\"vbscript:\"!==u},UrlMatchValidator.urlMatchDoesNotHaveProtocolOrDot=function(s,i){return!(!s||i&&this.hasFullProtocolRegex.test(i)||-1!==s.indexOf(\".\"))},UrlMatchValidator.urlMatchDoesNotHaveAtLeastOneWordChar=function(s,i){return!(!s||!i)&&(!this.hasFullProtocolRegex.test(i)&&!this.hasWordCharAfterProtocolRegex.test(s))},UrlMatchValidator.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\\/\\//,UrlMatchValidator.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,UrlMatchValidator.hasWordCharAfterProtocolRegex=new RegExp(\":[^\\\\s]*?[\"+hA+\"]\"),UrlMatchValidator.ipRegex=/[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?(:[0-9]*)?\\/?$/,UrlMatchValidator}(),CA=(ZC=new RegExp(\"[/?#](?:[\"+gA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}?!:,.;^✓]*[\"+gA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}✓])?\"),new RegExp([\"(?:\",\"(\",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\\/\\/)(?!\\d+\\/?)(?:\\/\\/)?)/.source,getDomainNameStr(2),\")\",\"|\",\"(\",\"(//)?\",/(?:www\\.)/.source,getDomainNameStr(6),\")\",\"|\",\"(\",\"(//)?\",getDomainNameStr(10)+\"\\\\.\",EA.source,\"(?![-\"+mA+\"])\",\")\",\")\",\"(?::[0-9]+)?\",\"(?:\"+ZC.source+\")?\"].join(\"\"),\"gi\")),AA=new RegExp(\"[\"+gA+\"]\"),jA=function(s){function UrlMatcher(i){var u=s.call(this,i)||this;return u.stripPrefix={scheme:!0,www:!0},u.stripTrailingSlash=!0,u.decodePercentEncoding=!0,u.matcherRegex=CA,u.wordCharRegExp=AA,u.stripPrefix=i.stripPrefix,u.stripTrailingSlash=i.stripTrailingSlash,u.decodePercentEncoding=i.decodePercentEncoding,u}return tslib_es6_extends(UrlMatcher,s),UrlMatcher.prototype.parseMatches=function(s){for(var i,u=this.matcherRegex,_=this.stripPrefix,w=this.stripTrailingSlash,x=this.decodePercentEncoding,j=this.tagBuilder,P=[],_loop_1=function(){var u=i[0],$=i[1],U=i[4],Y=i[5],X=i[9],Z=i.index,ee=Y||X,ie=s.charAt(Z-1);if(!OA.isValid(u,$))return\"continue\";if(Z>0&&\"@\"===ie)return\"continue\";if(Z>0&&ee&&B.wordCharRegExp.test(ie))return\"continue\";if(/\\?$/.test(u)&&(u=u.substr(0,u.length-1)),B.matchHasUnbalancedClosingParen(u))u=u.substr(0,u.length-1);else{var ae=B.matchHasInvalidCharAfterTld(u,$);ae>-1&&(u=u.substr(0,ae))}var le=[\"http://\",\"https://\"].find((function(s){return!!$&&-1!==$.indexOf(s)}));if(le){var ce=u.indexOf(le);u=u.substr(ce),$=$.substr(ce),Z+=ce}var pe=$?\"scheme\":U?\"www\":\"tld\",de=!!$;P.push(new oA({tagBuilder:j,matchedText:u,offset:Z,urlMatchType:pe,url:u,protocolUrlMatch:de,protocolRelativeMatch:!!ee,stripPrefix:_,stripTrailingSlash:w,decodePercentEncoding:x}))},B=this;null!==(i=u.exec(s));)_loop_1();return P},UrlMatcher.prototype.matchHasUnbalancedClosingParen=function(s){var i,u=s.charAt(s.length-1);if(\")\"===u)i=\"(\";else if(\"]\"===u)i=\"[\";else{if(\"}\"!==u)return!1;i=\"{\"}for(var _=0,w=0,x=s.length-1;w<x;w++){var j=s.charAt(w);j===i?_++:j===u&&(_=Math.max(_-1,0))}return 0===_},UrlMatcher.prototype.matchHasInvalidCharAfterTld=function(s,i){if(!s)return-1;var u=0;i&&(u=s.indexOf(\":\"),s=s.slice(u));var _=new RegExp(\"^((.?//)?[-.\"+gA+\"]*[-\"+gA+\"]\\\\.[-\"+gA+\"]+)\").exec(s);return null===_?-1:(u+=_[1].length,s=s.slice(_[1].length),/^[^-.A-Za-z0-9:\\/?#]/.test(s)?u:-1)},UrlMatcher}(sA),PA=new RegExp(\"[_\".concat(gA,\"]\")),IA=function(s){function HashtagMatcher(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.serviceName=i.serviceName,u}return tslib_es6_extends(HashtagMatcher,s),HashtagMatcher.prototype.parseMatches=function(s){for(var i=this.tagBuilder,u=this.serviceName,_=[],w=s.length,x=0,j=-1,P=0;x<w;){var B=s.charAt(x);switch(P){case 0:stateNone(B);break;case 1:stateNonHashtagWordChar(B);break;case 2:stateHashtagHashChar(B);break;case 3:stateHashtagTextChar(B);break;default:throwUnhandledCaseError(P)}x++}return captureMatchIfValid(),_;function stateNone(s){\"#\"===s?(P=2,j=x):yA.test(s)&&(P=1)}function stateNonHashtagWordChar(s){yA.test(s)||(P=0)}function stateHashtagHashChar(s){P=PA.test(s)?3:yA.test(s)?1:0}function stateHashtagTextChar(s){PA.test(s)||(captureMatchIfValid(),j=-1,P=yA.test(s)?1:0)}function captureMatchIfValid(){if(j>-1&&x-j<=140){var w=s.slice(j,x),P=new tA({tagBuilder:i,matchedText:w,offset:j,serviceName:u,hashtag:w.slice(1)});_.push(P)}}},HashtagMatcher}(sA),NA=[\"twitter\",\"facebook\",\"instagram\",\"tiktok\"],MA=new RegExp(\"\".concat(/(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/.source,\"|\").concat(/(0([1-9]{1}-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/.source),\"g\"),TA=function(s){function PhoneMatcher(){var i=null!==s&&s.apply(this,arguments)||this;return i.matcherRegex=MA,i}return tslib_es6_extends(PhoneMatcher,s),PhoneMatcher.prototype.parseMatches=function(s){for(var i,u=this.matcherRegex,_=this.tagBuilder,w=[];null!==(i=u.exec(s));){var x=i[0],j=x.replace(/[^0-9,;#]/g,\"\"),P=!(!i[1]&&!i[2]),B=0==i.index?\"\":s.substr(i.index-1,1),$=s.substr(i.index+x.length,1),U=!B.match(/\\d/)&&!$.match(/\\d/);this.testMatch(i[3])&&this.testMatch(x)&&U&&w.push(new nA({tagBuilder:_,matchedText:x,offset:i.index,number:j,plusSign:P}))}return w},PhoneMatcher.prototype.testMatch=function(s){return lA.test(s)},PhoneMatcher}(sA),RA=new RegExp(\"@[_\".concat(gA,\"]{1,50}(?![_\").concat(gA,\"])\"),\"g\"),DA=new RegExp(\"@[_.\".concat(gA,\"]{1,30}(?![_\").concat(gA,\"])\"),\"g\"),LA=new RegExp(\"@[-_.\".concat(gA,\"]{1,50}(?![-_\").concat(gA,\"])\"),\"g\"),BA=new RegExp(\"@[_.\".concat(gA,\"]{1,23}[_\").concat(gA,\"](?![_\").concat(gA,\"])\"),\"g\"),FA=new RegExp(\"[^\"+gA+\"]\"),qA=function(s){function MentionMatcher(i){var u=s.call(this,i)||this;return u.serviceName=\"twitter\",u.matcherRegexes={twitter:RA,instagram:DA,soundcloud:LA,tiktok:BA},u.nonWordCharRegex=FA,u.serviceName=i.serviceName,u}return tslib_es6_extends(MentionMatcher,s),MentionMatcher.prototype.parseMatches=function(s){var i,u=this.serviceName,_=this.matcherRegexes[this.serviceName],w=this.nonWordCharRegex,x=this.tagBuilder,j=[];if(!_)return j;for(;null!==(i=_.exec(s));){var P=i.index,B=s.charAt(P-1);if(0===P||w.test(B)){var $=i[0].replace(/\\.+$/g,\"\"),U=$.slice(1);j.push(new rA({tagBuilder:x,matchedText:$,offset:P,serviceName:u,mention:U}))}}return j},MentionMatcher}(sA);function parseHtml(s,i){for(var u=i.onOpenTag,_=i.onCloseTag,w=i.onText,x=i.onComment,j=i.onDoctype,P=new $A,B=0,$=s.length,U=0,Y=0,X=P;B<$;){var Z=s.charAt(B);switch(U){case 0:stateData(Z);break;case 1:stateTagOpen(Z);break;case 2:stateEndTagOpen(Z);break;case 3:stateTagName(Z);break;case 4:stateBeforeAttributeName(Z);break;case 5:stateAttributeName(Z);break;case 6:stateAfterAttributeName(Z);break;case 7:stateBeforeAttributeValue(Z);break;case 8:stateAttributeValueDoubleQuoted(Z);break;case 9:stateAttributeValueSingleQuoted(Z);break;case 10:stateAttributeValueUnquoted(Z);break;case 11:stateAfterAttributeValueQuoted(Z);break;case 12:stateSelfClosingStartTag(Z);break;case 13:stateMarkupDeclarationOpen(Z);break;case 14:stateCommentStart(Z);break;case 15:stateCommentStartDash(Z);break;case 16:stateComment(Z);break;case 17:stateCommentEndDash(Z);break;case 18:stateCommentEnd(Z);break;case 19:stateCommentEndBang(Z);break;case 20:stateDoctype(Z);break;default:throwUnhandledCaseError(U)}B++}function stateData(s){\"<\"===s&&startNewTag()}function stateTagOpen(s){\"!\"===s?U=13:\"/\"===s?(U=2,X=new $A(__assign(__assign({},X),{isClosing:!0}))):\"<\"===s?startNewTag():iA.test(s)?(U=3,X=new $A(__assign(__assign({},X),{isOpening:!0}))):(U=0,X=P)}function stateTagName(s){cA.test(s)?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),U=4):\"<\"===s?startNewTag():\"/\"===s?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),U=12):\">\"===s?(X=new $A(__assign(__assign({},X),{name:captureTagName()})),emitTagAndPreviousTextNode()):iA.test(s)||aA.test(s)||\":\"===s||resetToDataState()}function stateEndTagOpen(s){\">\"===s?resetToDataState():iA.test(s)?U=3:resetToDataState()}function stateBeforeAttributeName(s){cA.test(s)||(\"/\"===s?U=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():\"=\"===s||uA.test(s)||pA.test(s)?resetToDataState():U=5)}function stateAttributeName(s){cA.test(s)?U=6:\"/\"===s?U=12:\"=\"===s?U=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():uA.test(s)&&resetToDataState()}function stateAfterAttributeName(s){cA.test(s)||(\"/\"===s?U=12:\"=\"===s?U=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():uA.test(s)?resetToDataState():U=5)}function stateBeforeAttributeValue(s){cA.test(s)||('\"'===s?U=8:\"'\"===s?U=9:/[>=`]/.test(s)?resetToDataState():\"<\"===s?startNewTag():U=10)}function stateAttributeValueDoubleQuoted(s){'\"'===s&&(U=11)}function stateAttributeValueSingleQuoted(s){\"'\"===s&&(U=11)}function stateAttributeValueUnquoted(s){cA.test(s)?U=4:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function stateAfterAttributeValueQuoted(s){cA.test(s)?U=4:\"/\"===s?U=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():(U=4,function reconsumeCurrentCharacter(){B--}())}function stateSelfClosingStartTag(s){\">\"===s?(X=new $A(__assign(__assign({},X),{isClosing:!0})),emitTagAndPreviousTextNode()):U=4}function stateMarkupDeclarationOpen(i){\"--\"===s.substr(B,2)?(B+=2,X=new $A(__assign(__assign({},X),{type:\"comment\"})),U=14):\"DOCTYPE\"===s.substr(B,7).toUpperCase()?(B+=7,X=new $A(__assign(__assign({},X),{type:\"doctype\"})),U=20):resetToDataState()}function stateCommentStart(s){\"-\"===s?U=15:\">\"===s?resetToDataState():U=16}function stateCommentStartDash(s){\"-\"===s?U=18:\">\"===s?resetToDataState():U=16}function stateComment(s){\"-\"===s&&(U=17)}function stateCommentEndDash(s){U=\"-\"===s?18:16}function stateCommentEnd(s){\">\"===s?emitTagAndPreviousTextNode():\"!\"===s?U=19:\"-\"===s||(U=16)}function stateCommentEndBang(s){\"-\"===s?U=17:\">\"===s?emitTagAndPreviousTextNode():U=16}function stateDoctype(s){\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function resetToDataState(){U=0,X=P}function startNewTag(){U=1,X=new $A({idx:B})}function emitTagAndPreviousTextNode(){var i=s.slice(Y,X.idx);i&&w(i,Y),\"comment\"===X.type?x(X.idx):\"doctype\"===X.type?j(X.idx):(X.isOpening&&u(X.name,X.idx),X.isClosing&&_(X.name,X.idx)),resetToDataState(),Y=B+1}function captureTagName(){var i=X.idx+(X.isClosing?2:1);return s.slice(i,B).toLowerCase()}Y<B&&function emitText(){var i=s.slice(Y,B);w(i,Y),Y=B+1}()}var $A=function $A(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.type=s.type||\"tag\",this.name=s.name||\"\",this.isOpening=!!s.isOpening,this.isClosing=!!s.isClosing},UA=function(){function Autolinker(s){void 0===s&&(s={}),this.version=Autolinker.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:\"end\"},this.className=\"\",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(s.urls),this.email=\"boolean\"==typeof s.email?s.email:this.email,this.phone=\"boolean\"==typeof s.phone?s.phone:this.phone,this.hashtag=s.hashtag||this.hashtag,this.mention=s.mention||this.mention,this.newWindow=\"boolean\"==typeof s.newWindow?s.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(s.stripPrefix),this.stripTrailingSlash=\"boolean\"==typeof s.stripTrailingSlash?s.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=\"boolean\"==typeof s.decodePercentEncoding?s.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=s.sanitizeHtml||!1;var i=this.mention;if(!1!==i&&-1===[\"twitter\",\"instagram\",\"soundcloud\",\"tiktok\"].indexOf(i))throw new Error(\"invalid `mention` cfg '\".concat(i,\"' - see docs\"));var u=this.hashtag;if(!1!==u&&-1===NA.indexOf(u))throw new Error(\"invalid `hashtag` cfg '\".concat(u,\"' - see docs\"));this.truncate=this.normalizeTruncateCfg(s.truncate),this.className=s.className||this.className,this.replaceFn=s.replaceFn||this.replaceFn,this.context=s.context||this}return Autolinker.link=function(s,i){return new Autolinker(i).link(s)},Autolinker.parse=function(s,i){return new Autolinker(i).parse(s)},Autolinker.prototype.normalizeUrlsCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{schemeMatches:s,wwwMatches:s,tldMatches:s}:{schemeMatches:\"boolean\"!=typeof s.schemeMatches||s.schemeMatches,wwwMatches:\"boolean\"!=typeof s.wwwMatches||s.wwwMatches,tldMatches:\"boolean\"!=typeof s.tldMatches||s.tldMatches}},Autolinker.prototype.normalizeStripPrefixCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{scheme:s,www:s}:{scheme:\"boolean\"!=typeof s.scheme||s.scheme,www:\"boolean\"!=typeof s.www||s.www}},Autolinker.prototype.normalizeTruncateCfg=function(s){return\"number\"==typeof s?{length:s,location:\"end\"}:function defaults(s,i){for(var u in i)i.hasOwnProperty(u)&&void 0===s[u]&&(s[u]=i[u]);return s}(s||{},{length:Number.POSITIVE_INFINITY,location:\"end\"})},Autolinker.prototype.parse=function(s){var i=this,u=[\"a\",\"style\",\"script\"],_=0,w=[];return parseHtml(s,{onOpenTag:function(s){u.indexOf(s)>=0&&_++},onText:function(s,u){if(0===_){var x=function splitAndCapture(s,i){if(!i.global)throw new Error(\"`splitRegex` must have the 'g' flag set\");for(var u,_=[],w=0;u=i.exec(s);)_.push(s.substring(w,u.index)),_.push(u[0]),w=u.index+u[0].length;return _.push(s.substring(w)),_}(s,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),j=u;x.forEach((function(s,u){if(u%2==0){var _=i.parseText(s,j);w.push.apply(w,_)}j+=s.length}))}},onCloseTag:function(s){u.indexOf(s)>=0&&(_=Math.max(_-1,0))},onComment:function(s){},onDoctype:function(s){}}),w=this.compactMatches(w),w=this.removeUnwantedMatches(w)},Autolinker.prototype.compactMatches=function(s){s.sort((function(s,i){return s.getOffset()-i.getOffset()}));for(var i=0;i<s.length-1;){var u=s[i],_=u.getOffset(),w=u.getMatchedText().length,x=_+w;if(i+1<s.length){if(s[i+1].getOffset()===_){var j=s[i+1].getMatchedText().length>w?i:i+1;s.splice(j,1);continue}if(s[i+1].getOffset()<x){s.splice(i+1,1);continue}}i++}return s},Autolinker.prototype.removeUnwantedMatches=function(s){return this.hashtag||utils_remove(s,(function(s){return\"hashtag\"===s.getType()})),this.email||utils_remove(s,(function(s){return\"email\"===s.getType()})),this.phone||utils_remove(s,(function(s){return\"phone\"===s.getType()})),this.mention||utils_remove(s,(function(s){return\"mention\"===s.getType()})),this.urls.schemeMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"scheme\"===s.getUrlMatchType()})),this.urls.wwwMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"www\"===s.getUrlMatchType()})),this.urls.tldMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"tld\"===s.getUrlMatchType()})),s},Autolinker.prototype.parseText=function(s,i){void 0===i&&(i=0),i=i||0;for(var u=this.getMatchers(),_=[],w=0,x=u.length;w<x;w++){for(var j=u[w].parseMatches(s),P=0,B=j.length;P<B;P++)j[P].setOffset(i+j[P].getOffset());_.push.apply(_,j)}return _},Autolinker.prototype.link=function(s){if(!s)return\"\";this.sanitizeHtml&&(s=s.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));for(var i=this.parse(s),u=[],_=0,w=0,x=i.length;w<x;w++){var j=i[w];u.push(s.substring(_,j.getOffset())),u.push(this.createMatchReturnVal(j)),_=j.getOffset()+j.getMatchedText().length}return u.push(s.substring(_)),u.join(\"\")},Autolinker.prototype.createMatchReturnVal=function(s){var i;return this.replaceFn&&(i=this.replaceFn.call(this.context,s)),\"string\"==typeof i?i:!1===i?s.getMatchedText():i instanceof YC?i.toAnchorString():s.buildTag().toAnchorString()},Autolinker.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var s=this.getTagBuilder(),i=[new IA({tagBuilder:s,serviceName:this.hashtag}),new xA({tagBuilder:s}),new TA({tagBuilder:s}),new qA({tagBuilder:s,serviceName:this.mention}),new jA({tagBuilder:s,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=i},Autolinker.prototype.getTagBuilder=function(){var s=this.tagBuilder;return s||(s=this.tagBuilder=new XC({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),s},Autolinker.version=\"3.16.2\",Autolinker.AnchorTagBuilder=XC,Autolinker.HtmlTag=YC,Autolinker.matcher={Email:xA,Hashtag:IA,Matcher:sA,Mention:qA,Phone:TA,Url:jA},Autolinker.match={Email:eA,Hashtag:tA,Match:QC,Mention:rA,Phone:nA,Url:oA},Autolinker}();const zA=UA;var VA=/www|@|\\:\\/\\//;function isLinkOpen(s){return/^<a[>\\s]/i.test(s)}function isLinkClose(s){return/^<\\/a\\s*>/i.test(s)}function createLinkifier(){var s=[],i=new zA({stripPrefix:!1,url:!0,email:!0,replaceFn:function(i){switch(i.getType()){case\"url\":s.push({text:i.matchedText,url:i.getUrl()});break;case\"email\":s.push({text:i.matchedText,url:\"mailto:\"+i.getEmail().replace(/^mailto:/i,\"\")})}return!1}});return{links:s,autolinker:i}}function parseTokens(s){var i,u,_,w,x,j,P,B,$,U,Y,X,Z,ee=s.tokens,ie=null;for(u=0,_=ee.length;u<_;u++)if(\"inline\"===ee[u].type)for(Y=0,i=(w=ee[u].children).length-1;i>=0;i--)if(\"link_close\"!==(x=w[i]).type){if(\"htmltag\"===x.type&&(isLinkOpen(x.content)&&Y>0&&Y--,isLinkClose(x.content)&&Y++),!(Y>0)&&\"text\"===x.type&&VA.test(x.content)){if(ie||(X=(ie=createLinkifier()).links,Z=ie.autolinker),j=x.content,X.length=0,Z.link(j),!X.length)continue;for(P=[],U=x.level,B=0;B<X.length;B++)s.inline.validateLink(X[B].url)&&(($=j.indexOf(X[B].text))&&P.push({type:\"text\",content:j.slice(0,$),level:U}),P.push({type:\"link_open\",href:X[B].url,title:\"\",level:U++}),P.push({type:\"text\",content:X[B].text,level:U}),P.push({type:\"link_close\",level:--U}),j=j.slice($+X[B].text.length));j.length&&P.push({type:\"text\",content:j,level:U}),ee[u].children=w=[].concat(w.slice(0,i),P,w.slice(i+1))}}else for(i--;w[i].level!==x.level&&\"link_open\"!==w[i].type;)i--}function linkify(s){s.core.ruler.push(\"linkify\",parseTokens)}var WA=__webpack_require__(42838),KA=__webpack_require__.n(WA);KA().addHook&&KA().addHook(\"beforeSanitizeElements\",(function(s){return s.href&&s.setAttribute(\"rel\",\"noopener noreferrer\"),s}));const HA=function Markdown({source:s,className:i=\"\",getConfigs:u=(()=>({useUnsafeMarkdown:!1}))}){if(\"string\"!=typeof s)return null;const _=new Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(linkify);_.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:w}=u(),x=_.render(s),j=sanitizer(x,{useUnsafeMarkdown:w});return s&&x&&j?We.createElement(\"div\",{className:KO()(i,\"markdown\"),dangerouslySetInnerHTML:{__html:j}}):null};function sanitizer(s,{useUnsafeMarkdown:i=!1}={}){const u=i,_=i?[]:[\"style\",\"class\"];return i&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),KA().sanitize(s,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:u,FORBID_ATTR:_})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends We.Component{render(){const{errSelectors:s,specSelectors:i,getComponent:u}=this.props,_=u(\"SvgAssets\"),w=u(\"InfoContainer\",!0),x=u(\"VersionPragmaFilter\"),j=u(\"operations\",!0),P=u(\"Models\",!0),B=u(\"Webhooks\",!0),$=u(\"Row\"),U=u(\"Col\"),Y=u(\"errors\",!0),X=u(\"ServersContainer\",!0),Z=u(\"SchemesContainer\",!0),ee=u(\"AuthorizeBtnContainer\",!0),ie=u(\"FilterContainer\",!0),ae=i.isSwagger2(),le=i.isOAS3(),ce=i.isOAS31(),pe=!i.specStr(),de=i.loadingStatus();let fe=null;if(\"loading\"===de&&(fe=We.createElement(\"div\",{className:\"info\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"div\",{className:\"loading\"})))),\"failed\"===de&&(fe=We.createElement(\"div\",{className:\"info\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),We.createElement(Y,null)))),\"failedConfig\"===de){const i=s.lastError(),u=i?i.get(\"message\"):\"\";fe=We.createElement(\"div\",{className:\"info failed-config\"},We.createElement(\"div\",{className:\"loading-container\"},We.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),We.createElement(\"p\",null,u)))}if(!fe&&pe&&(fe=We.createElement(\"h4\",null,\"No API definition provided.\")),fe)return We.createElement(\"div\",{className:\"swagger-ui\"},We.createElement(\"div\",{className:\"loading-container\"},fe));const ye=i.servers(),be=i.schemes(),_e=ye&&ye.size,we=be&&be.size,Se=!!i.securityDefinitions();return We.createElement(\"div\",{className:\"swagger-ui\"},We.createElement(_,null),We.createElement(x,{isSwagger2:ae,isOAS3:le,alsoShow:We.createElement(Y,null)},We.createElement(Y,null),We.createElement($,{className:\"information-container\"},We.createElement(U,{mobile:12},We.createElement(w,null))),_e||we||Se?We.createElement(\"div\",{className:\"scheme-container\"},We.createElement(U,{className:\"schemes wrapper\",mobile:12},_e||we?We.createElement(\"div\",{className:\"schemes-server-container\"},_e?We.createElement(X,null):null,we?We.createElement(Z,null):null):null,Se?We.createElement(ee,null):null)):null,We.createElement(ie,null),We.createElement($,null,We.createElement(U,{mobile:12,desktop:12},We.createElement(j,null))),ce&&We.createElement($,{className:\"webhooks-container\"},We.createElement(U,{mobile:12,desktop:12},We.createElement(B,null))),We.createElement($,null,We.createElement(U,{mobile:12,desktop:12},We.createElement(P,null)))))}}const core_components=()=>({components:{App:$O,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:tC,InfoContainer,InfoUrl,InfoBasePath,Contact:rC,License:nC,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:operation_Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,highlightCode:highlight_code,responses:responses_Responses,response:response_Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,schemes:Schemes,SchemesContainer,modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,Property:property,TryItOutButton,Markdown:HA,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example:example_Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{...we}});var JA=__webpack_require__(24677),GA=__webpack_require__.n(JA);const YA={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,Xe.List)()};class JsonSchemaForm extends We.Component{static defaultProps=YA;componentDidMount(){const{dispatchInitialValue:s,value:i,onChange:u}=this.props;s?u(i):!1===s&&u(\"\")}render(){let{schema:s,errors:i,value:u,onChange:_,getComponent:w,fn:x,disabled:j}=this.props;const P=s&&s.get?s.get(\"format\"):null,B=s&&s.get?s.get(\"type\"):null;let getComponentSilently=s=>w(s,!1,{failSilently:!0}),$=B?getComponentSilently(P?`JsonSchema_${B}_${P}`:`JsonSchema_${B}`):w(\"JsonSchema_string\");return $||($=w(\"JsonSchema_string\")),We.createElement($,Co()({},this.props,{errors:i,fn:x,getComponent:w,value:u,onChange:_,schema:s,disabled:j}))}}class JsonSchema_string extends We.Component{static defaultProps=YA;onChange=s=>{const i=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?s.target.files[0]:s.target.value;this.props.onChange(i,this.props.keyName)};onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:i,schema:u,errors:_,required:w,description:x,disabled:j}=this.props;const P=u&&u.get?u.get(\"enum\"):null,B=u&&u.get?u.get(\"format\"):null,$=u&&u.get?u.get(\"type\"):null,U=u&&u.get?u.get(\"in\"):null;if(i||(i=\"\"),_=_.toJS?_.toJS():[],P){const u=s(\"Select\");return We.createElement(u,{className:_.length?\"invalid\":\"\",title:_.length?_:\"\",allowedValues:[...P],value:i,allowEmptyValue:!w,disabled:j,onChange:this.onEnumChange})}const Y=j||U&&\"formData\"===U&&!(\"FormData\"in window),X=s(\"Input\");return $&&\"file\"===$?We.createElement(X,{type:\"file\",className:_.length?\"invalid\":\"\",title:_.length?_:\"\",onChange:this.onChange,disabled:Y}):We.createElement(GA(),{type:B&&\"password\"===B?\"password\":\"text\",className:_.length?\"invalid\":\"\",title:_.length?_:\"\",value:i,minLength:0,debounceTimeout:350,placeholder:x,onChange:this.onChange,disabled:Y})}}class JsonSchema_array extends We.PureComponent{static defaultProps=YA;constructor(s,i){super(s,i),this.state={value:valueOrEmptyList(s.value),schema:s.schema}}UNSAFE_componentWillReceiveProps(s){const i=valueOrEmptyList(s.value);i!==this.state.value&&this.setState({value:i}),s.schema!==this.state.schema&&this.setState({schema:s.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(s,i)=>{this.setState((({value:u})=>({value:u.set(i,s)})),this.onChange)};removeItem=s=>{this.setState((({value:i})=>({value:i.delete(s)})),this.onChange)};addItem=()=>{const{fn:s}=this.props;let i=valueOrEmptyList(this.state.value);this.setState((()=>({value:i.push(s.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=s=>{this.setState((()=>({value:s})),this.onChange)};render(){let{getComponent:s,required:i,schema:u,errors:_,fn:w,disabled:x}=this.props;_=_.toJS?_.toJS():Array.isArray(_)?_:[];const j=_.filter((s=>\"string\"==typeof s)),P=_.filter((s=>void 0!==s.needRemove)).map((s=>s.error)),B=this.state.value,$=!!(B&&B.count&&B.count()>0),U=u.getIn([\"items\",\"enum\"]),Y=u.getIn([\"items\",\"type\"]),X=u.getIn([\"items\",\"format\"]),Z=u.get(\"items\");let ee,ie=!1,ae=\"file\"===Y||\"string\"===Y&&\"binary\"===X;if(Y&&X?ee=s(`JsonSchema_${Y}_${X}`):\"boolean\"!==Y&&\"array\"!==Y&&\"object\"!==Y||(ee=s(`JsonSchema_${Y}`)),ee||ae||(ie=!0),U){const u=s(\"Select\");return We.createElement(u,{className:_.length?\"invalid\":\"\",title:_.length?_:\"\",multiple:!0,value:B,disabled:x,allowedValues:U,allowEmptyValue:!i,onChange:this.onEnumChange})}const le=s(\"Button\");return We.createElement(\"div\",{className:\"json-schema-array\"},$?B.map(((i,u)=>{const j=(0,Xe.fromJS)([..._.filter((s=>s.index===u)).map((s=>s.error))]);return We.createElement(\"div\",{key:u,className:\"json-schema-form-item\"},ae?We.createElement(JsonSchemaArrayItemFile,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j,getComponent:s}):ie?We.createElement(JsonSchemaArrayItemText,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j}):We.createElement(ee,Co()({},this.props,{value:i,onChange:s=>this.onItemChange(s,u),disabled:x,errors:j,schema:Z,getComponent:s,fn:w})),x?null:We.createElement(le,{className:`btn btn-sm json-schema-form-item-remove ${P.length?\"invalid\":null}`,title:P.length?P:\"\",onClick:()=>this.removeItem(u)},\" - \"))})):null,x?null:We.createElement(le,{className:`btn btn-sm json-schema-form-item-add ${j.length?\"invalid\":null}`,title:j.length?j:\"\",onClick:this.addItem},\"Add \",Y?`${Y} `:\"\",\"item\"))}}class JsonSchemaArrayItemText extends We.Component{static defaultProps=YA;onChange=s=>{const i=s.target.value;this.props.onChange(i,this.props.keyName)};render(){let{value:s,errors:i,description:u,disabled:_}=this.props;return s||(s=\"\"),i=i.toJS?i.toJS():[],We.createElement(GA(),{type:\"text\",className:i.length?\"invalid\":\"\",title:i.length?i:\"\",value:s,minLength:0,debounceTimeout:350,placeholder:u,onChange:this.onChange,disabled:_})}}class JsonSchemaArrayItemFile extends We.Component{static defaultProps=YA;onFileChange=s=>{const i=s.target.files[0];this.props.onChange(i,this.props.keyName)};render(){let{getComponent:s,errors:i,disabled:u}=this.props;const _=s(\"Input\"),w=u||!(\"FormData\"in window);return We.createElement(_,{type:\"file\",className:i.length?\"invalid\":\"\",title:i.length?i:\"\",onChange:this.onFileChange,disabled:w})}}class JsonSchema_boolean extends We.Component{static defaultProps=YA;onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:i,errors:u,schema:_,required:w,disabled:x}=this.props;u=u.toJS?u.toJS():[];let j=_&&_.get?_.get(\"enum\"):null,P=!j||!w,B=!j&&[\"true\",\"false\"];const $=s(\"Select\");return We.createElement($,{className:u.length?\"invalid\":\"\",title:u.length?u:\"\",value:String(i),disabled:x,allowedValues:j?[...j]:B,allowEmptyValue:P,onChange:this.onEnumChange})}}const stringifyObjectErrors=s=>s.map((s=>{const i=void 0!==s.propKey?s.propKey:s.index;let u=\"string\"==typeof s?s:\"string\"==typeof s.error?s.error:null;if(!i&&u)return u;let _=s.error,w=`/${s.propKey}`;for(;\"object\"==typeof _;){const s=void 0!==_.propKey?_.propKey:_.index;if(void 0===s)break;if(w+=`/${s}`,!_.error)break;_=_.error}return`${w}: ${_}`}));class JsonSchema_object extends We.PureComponent{constructor(){super()}static defaultProps=YA;onChange=s=>{this.props.onChange(s)};handleOnChange=s=>{const i=s.target.value;this.onChange(i)};render(){let{getComponent:s,value:i,errors:u,disabled:_}=this.props;const w=s(\"TextArea\");return u=u.toJS?u.toJS():Array.isArray(u)?u:[],We.createElement(\"div\",null,We.createElement(w,{className:KO()({invalid:u.length}),title:u.length?stringifyObjectErrors(u).join(\", \"):\"\",value:stringify(i),disabled:_,onChange:this.handleOnChange}))}}function valueOrEmptyList(s){return Xe.List.isList(s)?s:Array.isArray(s)?(0,Xe.fromJS)(s):(0,Xe.List)()}const json_schema_components=()=>({components:{...Se}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5_samples,core_components,form_components,swagger_client,json_schema_components,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,safe_render()],XA=(0,Xe.Map)();function onlyOAS3(s){return(i,u)=>(..._)=>{if(u.getSystem().specSelectors.isOAS3()){const i=s(..._);return\"function\"==typeof i?i(u):i}return i(..._)}}const QA=onlyOAS3(Cs()(null)),ZA=onlyOAS3(((s,i)=>s=>s.getSystem().specSelectors.findSchema(i))),nj=onlyOAS3((()=>s=>{const i=s.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return Xe.Map.isMap(i)?i:XA})),fj=onlyOAS3((()=>s=>s.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),gj=onlyOAS3(Gt(Ds,(s=>s.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(s,i)=>(u,..._)=>i.specSelectors.isOAS3()?i.oas3Selectors.validOperationMethods():s(..._),_j=QA,Oj=QA,Cj=QA,Aj=QA,Dj=QA;const Lj=function wrap_selectors_onlyOAS3(s){return(i,u)=>(..._)=>{if(u.getSystem().specSelectors.isOAS3()){let i=u.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return s(u,i,..._)}return i(..._)}}(Gt((s=>s),(({specSelectors:s})=>s.securityDefinitions()),((s,i)=>{let u=(0,Xe.List)();return i?(i.entrySeq().forEach((([s,i])=>{const _=i.get(\"type\");if(\"oauth2\"===_&&i.get(\"flows\").entrySeq().forEach((([_,w])=>{let x=(0,Xe.fromJS)({flow:_,authorizationUrl:w.get(\"authorizationUrl\"),tokenUrl:w.get(\"tokenUrl\"),scopes:w.get(\"scopes\"),type:i.get(\"type\"),description:i.get(\"description\")});u=u.push(new Xe.Map({[s]:x.filter((s=>void 0!==s))}))})),\"http\"!==_&&\"apiKey\"!==_||(u=u.push(new Xe.Map({[s]:i}))),\"openIdConnect\"===_&&i.get(\"openIdConnectData\")){let _=i.get(\"openIdConnectData\");(_.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((w=>{let x=_.get(\"scopes_supported\")&&_.get(\"scopes_supported\").reduce(((s,i)=>s.set(i,\"\")),new Xe.Map),j=(0,Xe.fromJS)({flow:w,authorizationUrl:_.get(\"authorization_endpoint\"),tokenUrl:_.get(\"token_endpoint\"),scopes:x,type:\"oauth2\",openIdConnectUrl:i.get(\"openIdConnectUrl\")});u=u.push(new Xe.Map({[s]:j.filter((s=>void 0!==s))}))}))}})),u):u})));function OAS3ComponentWrapFactory(s){return(i,u)=>_=>\"function\"==typeof u.specSelectors?.isOAS3?u.specSelectors.isOAS3()?We.createElement(s,Co()({},_,u,{Ori:i})):We.createElement(i,_):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const Bj=(0,Xe.Map)(),selectors_isSwagger2=()=>s=>function isSwagger2(s){const i=s.get(\"swagger\");return\"string\"==typeof i&&\"2.0\"===i}(s.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>s=>function isOAS30(s){const i=s.get(\"openapi\");return\"string\"==typeof i&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(i)}(s.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>s=>s.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(s){return(i,...u)=>_=>{if(_.specSelectors.isOAS3()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null}}const $j=selectors_onlyOAS3((()=>s=>s.specSelectors.specJson().get(\"servers\",Bj))),findSchema=(s,i)=>{const u=s.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",i],null),_=s.getIn([\"json\",\"components\",\"schemas\",i],null);return u||_||null},Kj=selectors_onlyOAS3(((s,{callbacks:i,specPath:u})=>s=>{const _=s.specSelectors.validOperationMethods();return Xe.Map.isMap(i)?i.reduce(((s,i,w)=>{if(!Xe.Map.isMap(i))return s;const x=i.reduce(((s,i,x)=>{if(!Xe.Map.isMap(i))return s;const j=i.entrySeq().filter((([s])=>_.includes(s))).map((([s,i])=>({operation:(0,Xe.Map)({operation:i}),method:s,path:x,callbackName:w,specPath:u.concat([w,x,s])})));return s.concat(j)}),(0,Xe.List)());return s.concat(x)}),(0,Xe.List)()).groupBy((s=>s.callbackName)).map((s=>s.toArray())).toObject():{}})),callbacks=({callbacks:s,specPath:i,specSelectors:u,getComponent:_})=>{const w=u.callbacksOperations({callbacks:s,specPath:i}),x=Object.keys(w),j=_(\"OperationContainer\",!0);return 0===x.length?We.createElement(\"span\",null,\"No callbacks\"):We.createElement(\"div\",null,x.map((s=>We.createElement(\"div\",{key:`${s}`},We.createElement(\"h2\",null,s),w[s].map((i=>We.createElement(j,{key:`${s}-${i.path}-${i.method}`,op:i.operation,tag:\"callbacks\",method:i.method,path:i.path,specPath:i.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(s,i,u,_)=>{const w=s.getIn([\"content\",i])??(0,Xe.OrderedMap)(),x=w.get(\"schema\",(0,Xe.OrderedMap)()).toJS(),j=void 0!==w.get(\"examples\"),P=w.get(\"example\"),B=j?w.getIn([\"examples\",u,\"value\"]):P;return stringify(_.getSampleSchema(x,i,{includeWriteOnly:!0},B))},components_request_body=({userHasEditedBody:s,requestBody:i,requestBodyValue:u,requestBodyInclusionSetting:_,requestBodyErrors:w,getComponent:x,getConfigs:j,specSelectors:P,fn:B,contentType:$,isExecute:U,specPath:Y,onChange:X,onChangeIncludeEmpty:Z,activeExamplesKey:ee,updateActiveExamplesKey:ie,setRetainRequestBodyValueFlag:ae})=>{const handleFile=s=>{X(s.target.files[0])},setIsIncludedOptions=s=>{let i={key:s,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===_.get(s,\"no value\")&&(i.shouldDispatchInit=!0),i},le=x(\"Markdown\",!0),ce=x(\"modelExample\"),pe=x(\"RequestBodyEditor\"),de=x(\"highlightCode\"),fe=x(\"ExamplesSelectValueRetainer\"),ye=x(\"Example\"),be=x(\"ParameterIncludeEmpty\"),{showCommonExtensions:_e}=j(),we=i?.get(\"description\")??null,Se=i?.get(\"content\")??new Xe.OrderedMap;$=$||Se.keySeq().first()||\"\";const xe=Se.get($)??(0,Xe.OrderedMap)(),Pe=xe.get(\"schema\",(0,Xe.OrderedMap)()),Te=xe.get(\"examples\",null),Re=Te?.map(((s,u)=>{const _=s?.get(\"value\",null);return _&&(s=s.set(\"value\",getDefaultRequestBodyValue(i,$,u,B),_)),s}));if(w=Xe.List.isList(w)?w:(0,Xe.List)(),!xe.size)return null;const qe=\"object\"===xe.getIn([\"schema\",\"type\"]),$e=\"binary\"===xe.getIn([\"schema\",\"format\"]),ze=\"base64\"===xe.getIn([\"schema\",\"format\"]);if(\"application/octet-stream\"===$||0===$.indexOf(\"image/\")||0===$.indexOf(\"audio/\")||0===$.indexOf(\"video/\")||$e||ze){const s=x(\"Input\");return U?We.createElement(s,{type:\"file\",onChange:handleFile}):We.createElement(\"i\",null,\"Example values are not available for \",We.createElement(\"code\",null,$),\" media types.\")}if(qe&&(\"application/x-www-form-urlencoded\"===$||0===$.indexOf(\"multipart/\"))&&Pe.get(\"properties\",(0,Xe.OrderedMap)()).size>0){const s=x(\"JsonSchemaForm\"),i=x(\"ParameterExt\"),j=Pe.get(\"properties\",(0,Xe.OrderedMap)());return u=Xe.Map.isMap(u)?u:(0,Xe.OrderedMap)(),We.createElement(\"div\",{className:\"table-container\"},we&&We.createElement(le,{source:we}),We.createElement(\"table\",null,We.createElement(\"tbody\",null,Xe.Map.isMap(j)&&j.entrySeq().map((([j,P])=>{if(P.get(\"readOnly\"))return;let $=_e?getCommonExtensions(P):null;const Y=Pe.get(\"required\",(0,Xe.List)()).includes(j),ee=P.get(\"type\"),ie=P.get(\"format\"),ae=P.get(\"description\"),ce=u.getIn([j,\"value\"]),pe=u.getIn([j,\"errors\"])||w,de=_.get(j)||!1,fe=P.has(\"default\")||P.has(\"example\")||P.hasIn([\"items\",\"example\"])||P.hasIn([\"items\",\"default\"]),ye=P.has(\"enum\")&&(1===P.get(\"enum\").size||Y),we=fe||ye;let Se=\"\";\"array\"!==ee||we||(Se=[]),(\"object\"===ee||we)&&(Se=B.getSampleSchema(P,!1,{includeWriteOnly:!0})),\"string\"!=typeof Se&&\"object\"===ee&&(Se=stringify(Se)),\"string\"==typeof Se&&\"array\"===ee&&(Se=JSON.parse(Se));const xe=\"string\"===ee&&(\"binary\"===ie||\"base64\"===ie);return We.createElement(\"tr\",{key:j,className:\"parameters\",\"data-property-name\":j},We.createElement(\"td\",{className:\"parameters-col_name\"},We.createElement(\"div\",{className:Y?\"parameter__name required\":\"parameter__name\"},j,Y?We.createElement(\"span\",null,\" *\"):null),We.createElement(\"div\",{className:\"parameter__type\"},ee,ie&&We.createElement(\"span\",{className:\"prop-format\"},\"($\",ie,\")\"),_e&&$.size?$.entrySeq().map((([s,u])=>We.createElement(i,{key:`${s}-${u}`,xKey:s,xVal:u}))):null),We.createElement(\"div\",{className:\"parameter__deprecated\"},P.get(\"deprecated\")?\"deprecated\":null)),We.createElement(\"td\",{className:\"parameters-col_description\"},We.createElement(le,{source:ae}),U?We.createElement(\"div\",null,We.createElement(s,{fn:B,dispatchInitialValue:!xe,schema:P,description:j,getComponent:x,value:void 0===ce?Se:ce,required:Y,errors:pe,onChange:s=>{X(s,[j])}}),Y?null:We.createElement(be,{onChange:s=>Z(j,s),isIncluded:de,isIncludedOptions:setIsIncludedOptions(j),isDisabled:Array.isArray(ce)?0!==ce.length:!isEmptyValue(ce)})):null))})))))}const He=getDefaultRequestBodyValue(i,$,ee,B);let Ye=null;return getKnownSyntaxHighlighterLanguage(He)&&(Ye=\"json\"),We.createElement(\"div\",null,we&&We.createElement(le,{source:we}),Re?We.createElement(fe,{userHasEditedBody:s,examples:Re,currentKey:ee,currentUserInputValue:u,onSelect:s=>{ie(s)},updateValue:X,defaultToFirstExample:!0,getComponent:x,setRetainRequestBodyValueFlag:ae}):null,U?We.createElement(\"div\",null,We.createElement(pe,{value:u,errors:w,defaultValue:He,onChange:X,getComponent:x})):We.createElement(ce,{getComponent:x,getConfigs:j,specSelectors:P,expandDepth:1,isExecute:U,schema:xe.get(\"schema\"),specPath:Y.push(\"content\",$),example:We.createElement(de,{className:\"body-param__example\",getConfigs:j,language:Ye,value:stringify(u)||He}),includeWriteOnly:!0}),Re?We.createElement(ye,{example:Re.get(ee),getComponent:x,getConfigs:j}):null)};class operation_link_OperationLink extends We.Component{render(){const{link:s,name:i,getComponent:u}=this.props,_=u(\"Markdown\",!0);let w=s.get(\"operationId\")||s.get(\"operationRef\"),x=s.get(\"parameters\")&&s.get(\"parameters\").toJS(),j=s.get(\"description\");return We.createElement(\"div\",{className:\"operation-link\"},We.createElement(\"div\",{className:\"description\"},We.createElement(\"b\",null,We.createElement(\"code\",null,i)),j?We.createElement(_,{source:j}):null),We.createElement(\"pre\",null,\"Operation `\",w,\"`\",We.createElement(\"br\",null),We.createElement(\"br\",null),\"Parameters \",function padString(s,i){if(\"string\"!=typeof i)return\"\";return i.split(\"\\n\").map(((i,u)=>u>0?Array(s+1).join(\" \")+i:i)).join(\"\\n\")}(0,JSON.stringify(x,null,2))||\"{}\",We.createElement(\"br\",null)))}}const Hj=operation_link_OperationLink,components_servers=({servers:s,currentServer:i,setSelectedServer:u,setServerVariableValue:_,getServerVariable:w,getEffectiveServerValue:x})=>{const j=(s.find((s=>s.get(\"url\")===i))||(0,Xe.OrderedMap)()).get(\"variables\")||(0,Xe.OrderedMap)(),P=0!==j.size;(0,We.useEffect)((()=>{i||u(s.first()?.get(\"url\"))}),[]),(0,We.useEffect)((()=>{const w=s.find((s=>s.get(\"url\")===i));if(!w)return void u(s.first().get(\"url\"));(w.get(\"variables\")||(0,Xe.OrderedMap)()).map(((s,u)=>{_({server:i,key:u,val:s.get(\"default\")||\"\"})}))}),[i,s]);const B=(0,We.useCallback)((s=>{u(s.target.value)}),[u]),$=(0,We.useCallback)((s=>{const u=s.target.getAttribute(\"data-variable\"),w=s.target.value;_({server:i,key:u,val:w})}),[_,i]);return We.createElement(\"div\",{className:\"servers\"},We.createElement(\"label\",{htmlFor:\"servers\"},We.createElement(\"select\",{onChange:B,value:i,id:\"servers\"},s.valueSeq().map((s=>We.createElement(\"option\",{value:s.get(\"url\"),key:s.get(\"url\")},s.get(\"url\"),s.get(\"description\")&&` - ${s.get(\"description\")}`))).toArray())),P&&We.createElement(\"div\",null,We.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",We.createElement(\"code\",null,x(i))),We.createElement(\"h4\",null,\"Server variables\"),We.createElement(\"table\",null,We.createElement(\"tbody\",null,j.entrySeq().map((([s,u])=>We.createElement(\"tr\",{key:s},We.createElement(\"td\",null,s),We.createElement(\"td\",null,u.get(\"enum\")?We.createElement(\"select\",{\"data-variable\":s,onChange:$},u.get(\"enum\").map((u=>We.createElement(\"option\",{selected:u===w(i,s),key:u,value:u},u)))):We.createElement(\"input\",{type:\"text\",value:w(i,s)||\"\",onChange:$,\"data-variable\":s})))))))))};class ServersContainer extends We.Component{render(){const{specSelectors:s,oas3Selectors:i,oas3Actions:u,getComponent:_}=this.props,w=s.servers(),x=_(\"Servers\");return w&&w.size?We.createElement(\"div\",null,We.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),We.createElement(x,{servers:w,currentServer:i.selectedServer(),setSelectedServer:u.setSelectedServer,setServerVariableValue:u.setServerVariableValue,getServerVariable:i.serverVariableValue,getEffectiveServerValue:i.serverEffectiveValue})):null}}const Yj=Function.prototype;class RequestBodyEditor extends We.PureComponent{static defaultProps={onChange:Yj,userHasEditedBody:!1};constructor(s,i){super(s,i),this.state={value:stringify(s.value)||s.defaultValue},s.onChange(s.value)}applyDefaultValue=s=>{const{onChange:i,defaultValue:u}=s||this.props;return this.setState({value:u}),i(u)};onChange=s=>{this.props.onChange(stringify(s))};onDomChange=s=>{const i=s.target.value;this.setState({value:i},(()=>this.onChange(i)))};UNSAFE_componentWillReceiveProps(s){this.props.value!==s.value&&s.value!==this.state.value&&this.setState({value:stringify(s.value)}),!s.value&&s.defaultValue&&this.state.value&&this.applyDefaultValue(s)}render(){let{getComponent:s,errors:i}=this.props,{value:u}=this.state,_=i.size>0;const w=s(\"TextArea\");return We.createElement(\"div\",{className:\"body-param\"},We.createElement(w,{className:KO()(\"body-param__text\",{invalid:_}),title:i.size?i.join(\", \"):\"\",value:u,onChange:this.onDomChange}))}}class HttpAuth extends We.Component{constructor(s,i){super(s,i);let{name:u,schema:_}=this.props,w=this.getValue();this.state={name:u,schema:_,value:w}}getValue(){let{name:s,authorized:i}=this.props;return i&&i.getIn([s,\"value\"])}onChange=s=>{let{onChange:i}=this.props,{value:u,name:_}=s.target,w=Object.assign({},this.state.value);_?w[_]=u:w=u,this.setState({value:w},(()=>i(this.state)))};render(){let{schema:s,getComponent:i,errSelectors:u,name:_}=this.props;const w=i(\"Input\"),x=i(\"Row\"),j=i(\"Col\"),P=i(\"authError\"),B=i(\"Markdown\",!0),$=i(\"JumpToPath\",!0),U=(s.get(\"scheme\")||\"\").toLowerCase();let Y=this.getValue(),X=u.allErrors().filter((s=>s.get(\"authId\")===_));if(\"basic\"===U){let i=Y?Y.get(\"username\"):null;return We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\"  (http, Basic)\",We.createElement($,{path:[\"securityDefinitions\",_]})),i&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),i?We.createElement(\"code\",null,\" \",i,\" \"):We.createElement(j,null,We.createElement(w,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),i?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),X.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i}))))}return\"bearer\"===U?We.createElement(\"div\",null,We.createElement(\"h4\",null,We.createElement(\"code\",null,_||s.get(\"name\")),\"  (http, Bearer)\",We.createElement($,{path:[\"securityDefinitions\",_]})),Y&&We.createElement(\"h6\",null,\"Authorized\"),We.createElement(x,null,We.createElement(B,{source:s.get(\"description\")})),We.createElement(x,null,We.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),Y?We.createElement(\"code\",null,\" ****** \"):We.createElement(j,null,We.createElement(w,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),X.valueSeq().map(((s,i)=>We.createElement(P,{error:s,key:i})))):We.createElement(\"div\",null,We.createElement(\"em\",null,We.createElement(\"b\",null,_),\" HTTP authentication: unsupported scheme \",`'${U}'`))}}class operation_servers_OperationServers extends We.Component{setSelectedServer=s=>{const{path:i,method:u}=this.props;return this.forceUpdate(),this.props.setSelectedServer(s,`${i}:${u}`)};setServerVariableValue=s=>{const{path:i,method:u}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...s,namespace:`${i}:${u}`})};getSelectedServer=()=>{const{path:s,method:i}=this.props;return this.props.getSelectedServer(`${s}:${i}`)};getServerVariable=(s,i)=>{const{path:u,method:_}=this.props;return this.props.getServerVariable({namespace:`${u}:${_}`,server:s},i)};getEffectiveServerValue=s=>{const{path:i,method:u}=this.props;return this.props.getEffectiveServerValue({server:s,namespace:`${i}:${u}`})};render(){const{operationServers:s,pathServers:i,getComponent:u}=this.props;if(!s&&!i)return null;const _=u(\"Servers\"),w=s||i,x=s?\"operation\":\"path\";return We.createElement(\"div\",{className:\"opblock-section operation-servers\"},We.createElement(\"div\",{className:\"opblock-section-header\"},We.createElement(\"div\",{className:\"tab-header\"},We.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),We.createElement(\"div\",{className:\"opblock-description-wrapper\"},We.createElement(\"h4\",{className:\"message\"},\"These \",x,\"-level options override the global server options.\"),We.createElement(_,{servers:w,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const eP={Callbacks:callbacks,HttpAuth,RequestBody:components_request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers:operation_servers_OperationServers,operationLink:Hj},tP=new Remarkable(\"commonmark\");tP.block.ruler.enable([\"table\"]),tP.set({linkTarget:\"_blank\"});const rP=OAS3ComponentWrapFactory((({source:s,className:i=\"\",getConfigs:u=(()=>({useUnsafeMarkdown:!1}))})=>{if(\"string\"!=typeof s)return null;if(s){const{useUnsafeMarkdown:_}=u(),w=sanitizer(tP.render(s),{useUnsafeMarkdown:_});let x;return\"string\"==typeof w&&(x=w.trim()),We.createElement(\"div\",{dangerouslySetInnerHTML:{__html:x},className:KO()(i,\"renderedMarkdown\")})}return null})),nP=OAS3ComponentWrapFactory((({Ori:s,...i})=>{const{schema:u,getComponent:_,errSelectors:w,authorized:x,onAuthChange:j,name:P}=i,B=_(\"HttpAuth\");return\"http\"===u.get(\"type\")?We.createElement(B,{key:P,schema:u,name:P,errSelectors:w,authorized:x,getComponent:_,onChange:j}):We.createElement(s,i)})),oP=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends We.Component{render(){let{getConfigs:s,schema:i}=this.props,u=[\"model-box\"],_=null;return!0===i.get(\"deprecated\")&&(u.push(\"deprecated\"),_=We.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),We.createElement(\"div\",{className:u.join(\" \")},_,We.createElement(Model,Co()({},this.props,{getConfigs:s,depth:1,expandDepth:this.props.expandDepth||0})))}}const sP=OAS3ComponentWrapFactory(ModelComponent),iP=OAS3ComponentWrapFactory((({Ori:s,...i})=>{const{schema:u,getComponent:_,errors:w,onChange:x}=i,j=u&&u.get?u.get(\"format\"):null,P=u&&u.get?u.get(\"type\"):null,B=_(\"Input\");return P&&\"string\"===P&&j&&(\"binary\"===j||\"base64\"===j)?We.createElement(B,{type:\"file\",className:w.length?\"invalid\":\"\",title:w.length?w:\"\",onChange:s=>{x(s.target.files[0])},disabled:s.isDisabled}):We.createElement(s,i)})),aP={Markdown:rP,AuthItem:nP,OpenAPIVersion:function OAS30ComponentWrapFactory(s){return(i,u)=>_=>\"function\"==typeof u.specSelectors?.isOAS30?u.specSelectors.isOAS30()?We.createElement(s,Co()({},_,u,{Ori:i})):We.createElement(i,_):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((s=>{const{Ori:i}=s;return We.createElement(i,{oasVersion:\"3.0\"})})),JsonSchema_string:iP,model:sP,onlineValidatorBadge:oP},lP=\"oas3_set_servers\",cP=\"oas3_set_request_body_value\",uP=\"oas3_set_request_body_retain_flag\",pP=\"oas3_set_request_body_inclusion\",hP=\"oas3_set_active_examples_member\",dP=\"oas3_set_request_content_type\",fP=\"oas3_set_response_content_type\",mP=\"oas3_set_server_variable_value\",gP=\"oas3_set_request_body_validate_error\",yP=\"oas3_clear_request_body_validate_error\",vP=\"oas3_clear_request_body_value\";function setSelectedServer(s,i){return{type:lP,payload:{selectedServerUrl:s,namespace:i}}}function setRequestBodyValue({value:s,pathMethod:i}){return{type:cP,payload:{value:s,pathMethod:i}}}const setRetainRequestBodyValueFlag=({value:s,pathMethod:i})=>({type:uP,payload:{value:s,pathMethod:i}});function setRequestBodyInclusion({value:s,pathMethod:i,name:u}){return{type:pP,payload:{value:s,pathMethod:i,name:u}}}function setActiveExamplesMember({name:s,pathMethod:i,contextType:u,contextName:_}){return{type:hP,payload:{name:s,pathMethod:i,contextType:u,contextName:_}}}function setRequestContentType({value:s,pathMethod:i}){return{type:dP,payload:{value:s,pathMethod:i}}}function setResponseContentType({value:s,path:i,method:u}){return{type:fP,payload:{value:s,path:i,method:u}}}function setServerVariableValue({server:s,namespace:i,key:u,val:_}){return{type:mP,payload:{server:s,namespace:i,key:u,val:_}}}const setRequestBodyValidateError=({path:s,method:i,validationErrors:u})=>({type:gP,payload:{path:s,method:i,validationErrors:u}}),clearRequestBodyValidateError=({path:s,method:i})=>({type:yP,payload:{path:s,method:i}}),initRequestBodyValidateError=({pathMethod:s})=>({type:yP,payload:{path:s[0],method:s[1]}}),clearRequestBodyValue=({pathMethod:s})=>({type:vP,payload:{pathMethod:s}});var bP=__webpack_require__(60680),_P=__webpack_require__.n(bP);const oas3_selectors_onlyOAS3=s=>(i,...u)=>_=>{if(_.getSystem().specSelectors.isOAS3()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null};const EP=oas3_selectors_onlyOAS3(((s,i)=>{const u=i?[i,\"selectedServer\"]:[\"selectedServer\"];return s.getIn(u)||\"\"})),wP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"bodyValue\"])||null)),SP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(s,i,u)=>s=>{const{oas3Selectors:_,specSelectors:w,fn:x}=s.getSystem();if(w.isOAS3()){const s=_.requestContentType(i,u);if(s)return getDefaultRequestBodyValue(w.specResolvedSubtree([\"paths\",i,u,\"requestBody\"]),s,_.activeExamplesMember(i,u,\"requestBody\",\"requestBody\"),x)}return null},xP=oas3_selectors_onlyOAS3(((s,i,u)=>s=>{const{oas3Selectors:_,specSelectors:w,fn:x}=s;let j=!1;const P=_.requestContentType(i,u);let B=_.requestBodyValue(i,u);const $=w.specResolvedSubtree([\"paths\",i,u,\"requestBody\"]);if(!$)return!1;if(Xe.Map.isMap(B)&&(B=stringify(B.mapEntries((s=>Xe.Map.isMap(s[1])?[s[0],s[1].get(\"value\")]:s)).toJS())),Xe.List.isList(B)&&(B=stringify(B)),P){const s=getDefaultRequestBodyValue($,P,_.activeExamplesMember(i,u,\"requestBody\",\"requestBody\"),x);j=!!B&&B!==s}return j})),kP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"bodyInclusion\"])||(0,Xe.Map)())),OP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"errors\"])||null)),CP=oas3_selectors_onlyOAS3(((s,i,u,_,w)=>s.getIn([\"examples\",i,u,_,w,\"activeExample\"])||null)),AP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"requestContentType\"])||null)),jP=oas3_selectors_onlyOAS3(((s,i,u)=>s.getIn([\"requestData\",i,u,\"responseContentType\"])||null)),PP=oas3_selectors_onlyOAS3(((s,i,u)=>{let _;if(\"string\"!=typeof i){const{server:s,namespace:w}=i;_=w?[w,\"serverVariableValues\",s,u]:[\"serverVariableValues\",s,u]}else{_=[\"serverVariableValues\",i,u]}return s.getIn(_)||null})),IP=oas3_selectors_onlyOAS3(((s,i)=>{let u;if(\"string\"!=typeof i){const{server:s,namespace:_}=i;u=_?[_,\"serverVariableValues\",s]:[\"serverVariableValues\",s]}else{u=[\"serverVariableValues\",i]}return s.getIn(u)||(0,Xe.OrderedMap)()})),NP=oas3_selectors_onlyOAS3(((s,i)=>{var u,_;if(\"string\"!=typeof i){const{server:w,namespace:x}=i;_=w,u=x?s.getIn([x,\"serverVariableValues\",_]):s.getIn([\"serverVariableValues\",_])}else _=i,u=s.getIn([\"serverVariableValues\",_]);u=u||(0,Xe.OrderedMap)();let w=_;return u.map(((s,i)=>{w=w.replace(new RegExp(`{${_P()(i)}}`,\"g\"),s)})),w})),MP=function validateRequestBodyIsRequired(s){return(...i)=>u=>{const _=u.getSystem().specSelectors.specJson();let w=[...i][1]||[];return!_.getIn([\"paths\",...w,\"requestBody\",\"required\"])||s(...i)}}(((s,i)=>((s,i)=>(i=i||[],!!s.getIn([\"requestData\",...i,\"bodyValue\"])))(s,i))),validateShallowRequired=(s,{oas3RequiredRequestBodyContentType:i,oas3RequestContentType:u,oas3RequestBodyValue:_})=>{let w=[];if(!Xe.Map.isMap(_))return w;let x=[];return Object.keys(i.requestContentType).forEach((s=>{if(s===u){i.requestContentType[s].forEach((s=>{x.indexOf(s)<0&&x.push(s)}))}})),x.forEach((s=>{_.getIn([s,\"value\"])||w.push(s)})),w},TP=Cs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),RP={[lP]:(s,{payload:{selectedServerUrl:i,namespace:u}})=>{const _=u?[u,\"selectedServer\"]:[\"selectedServer\"];return s.setIn(_,i)},[cP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;if(!Xe.Map.isMap(i))return s.setIn([\"requestData\",_,w,\"bodyValue\"],i);let x,j=s.getIn([\"requestData\",_,w,\"bodyValue\"])||(0,Xe.Map)();Xe.Map.isMap(j)||(j=(0,Xe.Map)());const[...P]=i.keys();return P.forEach((s=>{let u=i.getIn([s]);j.has(s)&&Xe.Map.isMap(u)||(x=j.setIn([s,\"value\"],u))})),s.setIn([\"requestData\",_,w,\"bodyValue\"],x)},[uP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;return s.setIn([\"requestData\",_,w,\"retainBodyValue\"],i)},[pP]:(s,{payload:{value:i,pathMethod:u,name:_}})=>{let[w,x]=u;return s.setIn([\"requestData\",w,x,\"bodyInclusion\",_],i)},[hP]:(s,{payload:{name:i,pathMethod:u,contextType:_,contextName:w}})=>{let[x,j]=u;return s.setIn([\"examples\",x,j,_,w,\"activeExample\"],i)},[dP]:(s,{payload:{value:i,pathMethod:u}})=>{let[_,w]=u;return s.setIn([\"requestData\",_,w,\"requestContentType\"],i)},[fP]:(s,{payload:{value:i,path:u,method:_}})=>s.setIn([\"requestData\",u,_,\"responseContentType\"],i),[mP]:(s,{payload:{server:i,namespace:u,key:_,val:w}})=>{const x=u?[u,\"serverVariableValues\",i,_]:[\"serverVariableValues\",i,_];return s.setIn(x,w)},[gP]:(s,{payload:{path:i,method:u,validationErrors:_}})=>{let w=[];if(w.push(\"Required field is not provided\"),_.missingBodyValue)return s.setIn([\"requestData\",i,u,\"errors\"],(0,Xe.fromJS)(w));if(_.missingRequiredKeys&&_.missingRequiredKeys.length>0){const{missingRequiredKeys:x}=_;return s.updateIn([\"requestData\",i,u,\"bodyValue\"],(0,Xe.fromJS)({}),(s=>x.reduce(((s,i)=>s.setIn([i,\"errors\"],(0,Xe.fromJS)(w))),s)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),s},[yP]:(s,{payload:{path:i,method:u}})=>{const _=s.getIn([\"requestData\",i,u,\"bodyValue\"]);if(!Xe.Map.isMap(_))return s.setIn([\"requestData\",i,u,\"errors\"],(0,Xe.fromJS)([]));const[...w]=_.keys();return w?s.updateIn([\"requestData\",i,u,\"bodyValue\"],(0,Xe.fromJS)({}),(s=>w.reduce(((s,i)=>s.setIn([i,\"errors\"],(0,Xe.fromJS)([]))),s))):s},[vP]:(s,{payload:{pathMethod:i}})=>{let[u,_]=i;const w=s.getIn([\"requestData\",u,_,\"bodyValue\"]);return w?Xe.Map.isMap(w)?s.setIn([\"requestData\",u,_,\"bodyValue\"],(0,Xe.Map)()):s.setIn([\"requestData\",u,_,\"bodyValue\"],\"\"):s}};function oas3(){return{components:eP,wrapComponents:aP,statePlugins:{spec:{wrapSelectors:xe,selectors:Te},auth:{wrapSelectors:Pe},oas3:{actions:{...Re},reducers:RP,selectors:{...qe}}}}}const webhooks=({specSelectors:s,getComponent:i})=>{const u=s.selectWebhooksOperations(),_=Object.keys(u),w=i(\"OperationContainer\",!0);return 0===_.length?null:We.createElement(\"div\",{className:\"webhooks\"},We.createElement(\"h2\",null,\"Webhooks\"),_.map((s=>We.createElement(\"div\",{key:`${s}-webhook`},u[s].map((i=>We.createElement(w,{key:`${s}-${i.method}-webhook`,op:i.operation,tag:\"webhooks\",method:i.method,path:s,specPath:i.specPath,allowTryItOut:!1})))))))},oas31_components_license=({getComponent:s,specSelectors:i})=>{const u=i.selectLicenseNameField(),_=i.selectLicenseUrl(),w=s(\"Link\");return We.createElement(\"div\",{className:\"info__license\"},_?We.createElement(\"div\",{className:\"info__license__url\"},We.createElement(w,{target:\"_blank\",href:sanitizeUrl(_)},u)):We.createElement(\"span\",null,u))},oas31_components_contact=({getComponent:s,specSelectors:i})=>{const u=i.selectContactNameField(),_=i.selectContactUrl(),w=i.selectContactEmailField(),x=s(\"Link\");return We.createElement(\"div\",{className:\"info__contact\"},_&&We.createElement(\"div\",null,We.createElement(x,{href:sanitizeUrl(_),target:\"_blank\"},u,\" - Website\")),w&&We.createElement(x,{href:sanitizeUrl(`mailto:${w}`)},_?`Send email to ${u}`:`Contact ${u}`))},oas31_components_info=({getComponent:s,specSelectors:i})=>{const u=i.version(),_=i.url(),w=i.basePath(),x=i.host(),j=i.selectInfoSummaryField(),P=i.selectInfoDescriptionField(),B=i.selectInfoTitleField(),$=i.selectInfoTermsOfServiceUrl(),U=i.selectExternalDocsUrl(),Y=i.selectExternalDocsDescriptionField(),X=i.contact(),Z=i.license(),ee=s(\"Markdown\",!0),ie=s(\"Link\"),ae=s(\"VersionStamp\"),le=s(\"OpenAPIVersion\"),ce=s(\"InfoUrl\"),pe=s(\"InfoBasePath\"),de=s(\"License\",!0),fe=s(\"Contact\",!0),ye=s(\"JsonSchemaDialect\",!0);return We.createElement(\"div\",{className:\"info\"},We.createElement(\"hgroup\",{className:\"main\"},We.createElement(\"h2\",{className:\"title\"},B,We.createElement(\"span\",null,u&&We.createElement(ae,{version:u}),We.createElement(le,{oasVersion:\"3.1\"}))),(x||w)&&We.createElement(pe,{host:x,basePath:w}),_&&We.createElement(ce,{getComponent:s,url:_})),j&&We.createElement(\"p\",{className:\"info__summary\"},j),We.createElement(\"div\",{className:\"info__description description\"},We.createElement(ee,{source:P})),$&&We.createElement(\"div\",{className:\"info__tos\"},We.createElement(ie,{target:\"_blank\",href:sanitizeUrl($)},\"Terms of service\")),X.size>0&&We.createElement(fe,null),Z.size>0&&We.createElement(de,null),U&&We.createElement(ie,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(U)},Y||U),We.createElement(ye,null))},json_schema_dialect=({getComponent:s,specSelectors:i})=>{const u=i.selectJsonSchemaDialectField(),_=i.selectJsonSchemaDialectDefault(),w=s(\"Link\");return We.createElement(We.Fragment,null,u&&u===_&&We.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",We.createElement(w,{target:\"_blank\",href:sanitizeUrl(u)},u)),u&&u!==_&&We.createElement(\"div\",{className:\"error-wrapper\"},We.createElement(\"div\",{className:\"no-margin\"},We.createElement(\"div\",{className:\"errors\"},We.createElement(\"div\",{className:\"errors-wrapper\"},We.createElement(\"h4\",{className:\"center\"},\"Warning\"),We.createElement(\"p\",{className:\"message\"},We.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",We.createElement(w,{target:\"_blank\",href:_},_),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:s,isSwagger2:i,isOAS3:u,isOAS31:_,alsoShow:w,children:x})=>s?We.createElement(\"div\",null,x):i&&(u||_)?We.createElement(\"div\",{className:\"version-pragma\"},w,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,We.createElement(\"code\",null,\"swagger\"),\" and \",We.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),We.createElement(\"p\",null,\"Supported version fields are \",We.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",We.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):i||u||_?We.createElement(\"div\",null,x):We.createElement(\"div\",{className:\"version-pragma\"},w,We.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},We.createElement(\"div\",null,We.createElement(\"h3\",null,\"Unable to render this definition\"),We.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),We.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",We.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",We.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",We.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=s=>\"string\"==typeof s&&s.includes(\"#/components/schemas/\")?(s=>{const i=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(i)}catch{return i}})(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,DP=(0,We.forwardRef)((({schema:s,getComponent:i,onToggle:u=(()=>{})},_)=>{const w=i(\"JSONSchema202012\"),x=getModelName(s.get(\"$$ref\")),j=(0,We.useCallback)(((s,i)=>{u(x,i)}),[x,u]);return We.createElement(w,{name:x,schema:s.toJS(),ref:_,onExpand:j})})),LP=DP,models=({specActions:s,specSelectors:i,layoutSelectors:u,layoutActions:_,getComponent:w,getConfigs:x})=>{const j=i.selectSchemas(),P=Object.keys(j).length>0,B=[\"components\",\"schemas\"],{docExpansion:$,defaultModelsExpandDepth:U}=x(),Y=U>0&&\"none\"!==$,X=u.isShown(B,Y),Z=w(\"Collapse\"),ee=w(\"JSONSchema202012\"),ie=w(\"ArrowUpIcon\"),ae=w(\"ArrowDownIcon\");(0,We.useEffect)((()=>{const u=X&&U>1,_=null!=i.specResolvedSubtree(B);u&&!_&&s.requestResolvedSubtree(B)}),[X,U]);const le=(0,We.useCallback)((()=>{_.show(B,!X)}),[X]),ce=(0,We.useCallback)((s=>{null!==s&&_.readyToScroll(B,s)}),[]),handleJSONSchema202012Ref=s=>i=>{null!==i&&_.readyToScroll([...B,s],i)},handleJSONSchema202012Expand=u=>(_,w)=>{if(w){const _=[...B,u];null!=i.specResolvedSubtree(_)||s.requestResolvedSubtree([...B,u])}};return!P||U<0?null:We.createElement(\"section\",{className:KO()(\"models\",{\"is-open\":X}),ref:ce},We.createElement(\"h4\",null,We.createElement(\"button\",{\"aria-expanded\":X,className:\"models-control\",onClick:le},We.createElement(\"span\",null,\"Schemas\"),X?We.createElement(ie,null):We.createElement(ae,null))),We.createElement(Z,{isOpened:X},Object.entries(j).map((([s,i])=>We.createElement(ee,{key:s,ref:handleJSONSchema202012Ref(s),schema:i,name:s,onExpand:handleJSONSchema202012Expand(s)})))))},mutual_tls_auth=({schema:s,getComponent:i})=>{const u=i(\"JumpToPath\",!0);return We.createElement(\"div\",null,We.createElement(\"h4\",null,s.get(\"name\"),\" (mutualTLS)\",\" \",We.createElement(u,{path:[\"securityDefinitions\",s.get(\"name\")]})),We.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),We.createElement(\"p\",null,s.get(\"description\")))};class auths_Auths extends We.Component{constructor(s,i){super(s,i),this.state={}}onAuthChange=s=>{let{name:i}=s;this.setState({[i]:s})};submitAuth=s=>{s.preventDefault();let{authActions:i}=this.props;i.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:i,definitions:u}=this.props,_=u.map(((s,i)=>i)).toArray();this.setState(_.reduce(((s,i)=>(s[i]=\"\",s)),{})),i.logoutWithPersistOption(_)};close=s=>{s.preventDefault();let{authActions:i}=this.props;i.showDefinitions(!1)};render(){let{definitions:s,getComponent:i,authSelectors:u,errSelectors:_}=this.props;const w=i(\"AuthItem\"),x=i(\"oauth2\",!0),j=i(\"Button\"),P=u.authorized(),B=s.filter(((s,i)=>!!P.get(i))),$=s.filter((s=>\"oauth2\"!==s.get(\"type\")&&\"mutualTLS\"!==s.get(\"type\"))),U=s.filter((s=>\"oauth2\"===s.get(\"type\"))),Y=s.filter((s=>\"mutualTLS\"===s.get(\"type\")));return We.createElement(\"div\",{className:\"auth-container\"},$.size>0&&We.createElement(\"form\",{onSubmit:this.submitAuth},$.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray(),We.createElement(\"div\",{className:\"auth-btn-wrapper\"},$.size===B.size?We.createElement(j,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):We.createElement(j,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),We.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),U.size>0?We.createElement(\"div\",null,We.createElement(\"div\",{className:\"scope-def\"},We.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),We.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,i)=>We.createElement(\"div\",{key:i},We.createElement(x,{authorized:P,schema:s,name:i})))).toArray()):null,Y.size>0&&We.createElement(\"div\",null,Y.map(((s,u)=>We.createElement(w,{key:u,schema:s,name:u,getComponent:i,onAuthChange:this.onAuthChange,authorized:P,errSelectors:_}))).toArray()))}}const BP=auths_Auths,isOAS31=s=>{const i=s.get(\"openapi\");return\"string\"==typeof i&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(i)},fn_createOnlyOAS31Selector=s=>(i,...u)=>_=>{if(_.getSystem().specSelectors.isOAS31()){const w=s(i,...u);return\"function\"==typeof w?w(_):w}return null},createOnlyOAS31SelectorWrapper=s=>(i,u)=>(_,...w)=>{if(u.getSystem().specSelectors.isOAS31()){const x=s(_,...w);return\"function\"==typeof x?x(i,u):x}return i(...w)},fn_createSystemSelector=s=>(i,...u)=>_=>{const w=s(i,_,...u);return\"function\"==typeof w?w(_):w},createOnlyOAS31ComponentWrapper=s=>(i,u)=>_=>u.specSelectors.isOAS31()?We.createElement(s,Co()({},_,{originalComponent:i,getSystem:u.getSystem})):We.createElement(i,_),FP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31License\",!0);return We.createElement(i,null)})),qP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31Contact\",!0);return We.createElement(i,null)})),$P=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const i=s().getComponent(\"OAS31Info\",!0);return We.createElement(i,null)})),UP=createOnlyOAS31ComponentWrapper((({getSystem:s,...i})=>{const u=s(),{getComponent:_,fn:w,getConfigs:x}=u,j=x(),P=_(\"OAS31Model\"),B=_(\"JSONSchema202012\"),$=_(\"JSONSchema202012Keyword$schema\"),U=_(\"JSONSchema202012Keyword$vocabulary\"),Y=_(\"JSONSchema202012Keyword$id\"),X=_(\"JSONSchema202012Keyword$anchor\"),Z=_(\"JSONSchema202012Keyword$dynamicAnchor\"),ee=_(\"JSONSchema202012Keyword$ref\"),ie=_(\"JSONSchema202012Keyword$dynamicRef\"),ae=_(\"JSONSchema202012Keyword$defs\"),le=_(\"JSONSchema202012Keyword$comment\"),ce=_(\"JSONSchema202012KeywordAllOf\"),pe=_(\"JSONSchema202012KeywordAnyOf\"),de=_(\"JSONSchema202012KeywordOneOf\"),fe=_(\"JSONSchema202012KeywordNot\"),ye=_(\"JSONSchema202012KeywordIf\"),be=_(\"JSONSchema202012KeywordThen\"),_e=_(\"JSONSchema202012KeywordElse\"),we=_(\"JSONSchema202012KeywordDependentSchemas\"),Se=_(\"JSONSchema202012KeywordPrefixItems\"),xe=_(\"JSONSchema202012KeywordItems\"),Pe=_(\"JSONSchema202012KeywordContains\"),Te=_(\"JSONSchema202012KeywordProperties\"),Re=_(\"JSONSchema202012KeywordPatternProperties\"),qe=_(\"JSONSchema202012KeywordAdditionalProperties\"),$e=_(\"JSONSchema202012KeywordPropertyNames\"),ze=_(\"JSONSchema202012KeywordUnevaluatedItems\"),He=_(\"JSONSchema202012KeywordUnevaluatedProperties\"),Ye=_(\"JSONSchema202012KeywordType\"),Xe=_(\"JSONSchema202012KeywordEnum\"),Qe=_(\"JSONSchema202012KeywordConst\"),et=_(\"JSONSchema202012KeywordConstraint\"),tt=_(\"JSONSchema202012KeywordDependentRequired\"),rt=_(\"JSONSchema202012KeywordContentSchema\"),nt=_(\"JSONSchema202012KeywordTitle\"),ot=_(\"JSONSchema202012KeywordDescription\"),st=_(\"JSONSchema202012KeywordDefault\"),it=_(\"JSONSchema202012KeywordDeprecated\"),at=_(\"JSONSchema202012KeywordReadOnly\"),lt=_(\"JSONSchema202012KeywordWriteOnly\"),ct=_(\"JSONSchema202012Accordion\"),ut=_(\"JSONSchema202012ExpandDeepButton\"),pt=_(\"JSONSchema202012ChevronRightIcon\"),ht=_(\"withJSONSchema202012Context\")(P,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:j.defaultModelExpandDepth,includeReadOnly:Boolean(i.includeReadOnly),includeWriteOnly:Boolean(i.includeWriteOnly)},components:{JSONSchema:B,Keyword$schema:$,Keyword$vocabulary:U,Keyword$id:Y,Keyword$anchor:X,Keyword$dynamicAnchor:Z,Keyword$ref:ee,Keyword$dynamicRef:ie,Keyword$defs:ae,Keyword$comment:le,KeywordAllOf:ce,KeywordAnyOf:pe,KeywordOneOf:de,KeywordNot:fe,KeywordIf:ye,KeywordThen:be,KeywordElse:_e,KeywordDependentSchemas:we,KeywordPrefixItems:Se,KeywordItems:xe,KeywordContains:Pe,KeywordProperties:Te,KeywordPatternProperties:Re,KeywordAdditionalProperties:qe,KeywordPropertyNames:$e,KeywordUnevaluatedItems:ze,KeywordUnevaluatedProperties:He,KeywordType:Ye,KeywordEnum:Xe,KeywordConst:Qe,KeywordConstraint:et,KeywordDependentRequired:tt,KeywordContentSchema:rt,KeywordTitle:nt,KeywordDescription:ot,KeywordDefault:st,KeywordDeprecated:it,KeywordReadOnly:at,KeywordWriteOnly:lt,Accordion:ct,ExpandDeepButton:ut,ChevronRightIcon:pt},fn:{upperFirst:w.upperFirst,isExpandable:w.jsonSchema202012.isExpandable,getProperties:w.jsonSchema202012.getProperties}});return We.createElement(ht,i)})),zP=UP,VP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const{getComponent:i,fn:u,getConfigs:_}=s(),w=_();if(VP.ModelsWithJSONSchemaContext)return We.createElement(VP.ModelsWithJSONSchemaContext,null);const x=i(\"OAS31Models\",!0),j=i(\"JSONSchema202012\"),P=i(\"JSONSchema202012Keyword$schema\"),B=i(\"JSONSchema202012Keyword$vocabulary\"),$=i(\"JSONSchema202012Keyword$id\"),U=i(\"JSONSchema202012Keyword$anchor\"),Y=i(\"JSONSchema202012Keyword$dynamicAnchor\"),X=i(\"JSONSchema202012Keyword$ref\"),Z=i(\"JSONSchema202012Keyword$dynamicRef\"),ee=i(\"JSONSchema202012Keyword$defs\"),ie=i(\"JSONSchema202012Keyword$comment\"),ae=i(\"JSONSchema202012KeywordAllOf\"),le=i(\"JSONSchema202012KeywordAnyOf\"),ce=i(\"JSONSchema202012KeywordOneOf\"),pe=i(\"JSONSchema202012KeywordNot\"),de=i(\"JSONSchema202012KeywordIf\"),fe=i(\"JSONSchema202012KeywordThen\"),ye=i(\"JSONSchema202012KeywordElse\"),be=i(\"JSONSchema202012KeywordDependentSchemas\"),_e=i(\"JSONSchema202012KeywordPrefixItems\"),we=i(\"JSONSchema202012KeywordItems\"),Se=i(\"JSONSchema202012KeywordContains\"),xe=i(\"JSONSchema202012KeywordProperties\"),Pe=i(\"JSONSchema202012KeywordPatternProperties\"),Te=i(\"JSONSchema202012KeywordAdditionalProperties\"),Re=i(\"JSONSchema202012KeywordPropertyNames\"),qe=i(\"JSONSchema202012KeywordUnevaluatedItems\"),$e=i(\"JSONSchema202012KeywordUnevaluatedProperties\"),ze=i(\"JSONSchema202012KeywordType\"),He=i(\"JSONSchema202012KeywordEnum\"),Ye=i(\"JSONSchema202012KeywordConst\"),Xe=i(\"JSONSchema202012KeywordConstraint\"),Qe=i(\"JSONSchema202012KeywordDependentRequired\"),et=i(\"JSONSchema202012KeywordContentSchema\"),tt=i(\"JSONSchema202012KeywordTitle\"),rt=i(\"JSONSchema202012KeywordDescription\"),nt=i(\"JSONSchema202012KeywordDefault\"),ot=i(\"JSONSchema202012KeywordDeprecated\"),st=i(\"JSONSchema202012KeywordReadOnly\"),it=i(\"JSONSchema202012KeywordWriteOnly\"),at=i(\"JSONSchema202012Accordion\"),lt=i(\"JSONSchema202012ExpandDeepButton\"),ct=i(\"JSONSchema202012ChevronRightIcon\"),ut=i(\"withJSONSchema202012Context\");return VP.ModelsWithJSONSchemaContext=ut(x,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:w.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},components:{JSONSchema:j,Keyword$schema:P,Keyword$vocabulary:B,Keyword$id:$,Keyword$anchor:U,Keyword$dynamicAnchor:Y,Keyword$ref:X,Keyword$dynamicRef:Z,Keyword$defs:ee,Keyword$comment:ie,KeywordAllOf:ae,KeywordAnyOf:le,KeywordOneOf:ce,KeywordNot:pe,KeywordIf:de,KeywordThen:fe,KeywordElse:ye,KeywordDependentSchemas:be,KeywordPrefixItems:_e,KeywordItems:we,KeywordContains:Se,KeywordProperties:xe,KeywordPatternProperties:Pe,KeywordAdditionalProperties:Te,KeywordPropertyNames:Re,KeywordUnevaluatedItems:qe,KeywordUnevaluatedProperties:$e,KeywordType:ze,KeywordEnum:He,KeywordConst:Ye,KeywordConstraint:Xe,KeywordDependentRequired:Qe,KeywordContentSchema:et,KeywordTitle:tt,KeywordDescription:rt,KeywordDefault:nt,KeywordDeprecated:ot,KeywordReadOnly:st,KeywordWriteOnly:it,Accordion:at,ExpandDeepButton:lt,ChevronRightIcon:ct},fn:{upperFirst:u.upperFirst,isExpandable:u.jsonSchema202012.isExpandable,getProperties:u.jsonSchema202012.getProperties}}),We.createElement(VP.ModelsWithJSONSchemaContext,null)}));VP.ModelsWithJSONSchemaContext=null;const WP=VP,wrap_components_version_pragma_filter=(s,i)=>s=>{const u=i.specSelectors.isOAS31(),_=i.getComponent(\"OAS31VersionPragmaFilter\");return We.createElement(_,Co()({isOAS31:u},s))},KP=createOnlyOAS31ComponentWrapper((({originalComponent:s,...i})=>{const{getComponent:u,schema:_}=i,w=u(\"MutualTLSAuth\",!0);return\"mutualTLS\"===_.get(\"type\")?We.createElement(w,{schema:_}):We.createElement(s,i)})),HP=KP,JP=createOnlyOAS31ComponentWrapper((({getSystem:s,...i})=>{const u=s().getComponent(\"OAS31Auths\",!0);return We.createElement(u,i)})),GP=(0,Xe.Map)(),YP=Gt(((s,i)=>i.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>s=>{const i=s.specSelectors.specJson().get(\"webhooks\");return Xe.Map.isMap(i)?i:GP},XP=Gt([(s,i)=>i.specSelectors.webhooks(),(s,i)=>i.specSelectors.validOperationMethods(),(s,i)=>i.specSelectors.specResolvedSubtree([\"webhooks\"])],((s,i)=>s.reduce(((s,u,_)=>{if(!Xe.Map.isMap(u))return s;const w=u.entrySeq().filter((([s])=>i.includes(s))).map((([s,i])=>({operation:(0,Xe.Map)({operation:i}),method:s,path:_,specPath:(0,Xe.List)([\"webhooks\",_,s])})));return s.concat(w)}),(0,Xe.List)()).groupBy((s=>s.path)).map((s=>s.toArray())).toObject())),selectors_license=()=>s=>{const i=s.specSelectors.info().get(\"license\");return Xe.Map.isMap(i)?i:GP},selectLicenseNameField=()=>s=>s.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>s=>s.specSelectors.license().get(\"url\"),QP=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectLicenseUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectLicenseIdentifierField=()=>s=>s.specSelectors.license().get(\"identifier\"),selectors_contact=()=>s=>{const i=s.specSelectors.info().get(\"contact\");return Xe.Map.isMap(i)?i:GP},selectContactNameField=()=>s=>s.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>s=>s.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>s=>s.specSelectors.contact().get(\"url\"),ZP=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectContactUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectInfoTitleField=()=>s=>s.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>s=>s.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>s=>s.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>s=>s.specSelectors.info().get(\"termsOfService\"),eI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectInfoTermsOfServiceField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectExternalDocsDescriptionField=()=>s=>s.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>s=>s.specSelectors.externalDocs().get(\"url\"),tI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectExternalDocsUrlField()],((s,i,u)=>{if(u)return safeBuildUrl(u,s,{selectedServer:i})})),selectJsonSchemaDialectField=()=>s=>s.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",rI=Gt(((s,i)=>i.specSelectors.definitions()),((s,i)=>i.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((s,i)=>Xe.Map.isMap(s)?Xe.Map.isMap(i)?Object.entries(s.toJS()).reduce(((s,[u,_])=>{const w=i.get(u);return s[u]=w?.toJS()||_,s}),{}):s.toJS():{})),wrap_selectors_isOAS3=(s,i)=>(u,..._)=>i.specSelectors.isOAS31()||s(..._),nI=createOnlyOAS31SelectorWrapper((()=>(s,i)=>i.oas31Selectors.selectLicenseUrl())),oI=createOnlyOAS31SelectorWrapper((()=>(s,i)=>{const u=i.specSelectors.securityDefinitions();let _=s();return u?(u.entrySeq().forEach((([s,i])=>{\"mutualTLS\"===i.get(\"type\")&&(_=_.push(new Xe.Map({[s]:i})))})),_):_})),sI=Gt([(s,i)=>i.specSelectors.url(),(s,i)=>i.oas3Selectors.selectedServer(),(s,i)=>i.specSelectors.selectLicenseUrlField(),(s,i)=>i.specSelectors.selectLicenseIdentifierField()],((s,i,u,_)=>u?safeBuildUrl(u,s,{selectedServer:i}):_?`https://spdx.org/licenses/${_}.html`:void 0)),keywords_Example=({schema:s,getSystem:i})=>{const{fn:u}=i(),{hasKeyword:_,stringify:w}=u.jsonSchema202012.useFn();return _(s,\"example\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Example\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},w(s.example))):null},keywords_Xml=({schema:s,getSystem:i})=>{const u=s?.xml||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!!(u.name||u.namespace||u.prefix),[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012DeepExpansionContext\")(),ae=(0,We.useCallback)((()=>{U((s=>!s))}),[]),le=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(ie.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ae},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),We.createElement(ee,{expanded:$,onClick:le})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===u.attribute&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===u.wrapped&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(We.Fragment,null,u.name&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.name))),u.namespace&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.namespace))),u.prefix&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},u.prefix)))))))},Discriminator_DiscriminatorMapping=({discriminator:s})=>{const i=s?.mapping||{};return 0===Object.keys(i).length?null:Object.entries(i).map((([s,i])=>We.createElement(\"div\",{key:`${s}-${i}`,className:\"json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},s),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i))))},keywords_Discriminator_Discriminator=({schema:s,getSystem:i})=>{const u=s?.discriminator||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!!u.mapping,[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012DeepExpansionContext\")(),ae=(0,We.useCallback)((()=>{U((s=>!s))}),[]),le=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(ie.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ae},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),We.createElement(ee,{expanded:$,onClick:le})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),u.propertyName&&We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},u.propertyName),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(Discriminator_DiscriminatorMapping,{discriminator:u})))))},keywords_ExternalDocs=({schema:s,getSystem:i})=>{const u=s?.externalDocs||{},{fn:_,getComponent:w}=i(),{useIsExpandedDeeply:x,useComponent:j}=_.jsonSchema202012,P=x(),B=!(!u.description&&!u.url),[$,U]=(0,We.useState)(P),[Y,X]=(0,We.useState)(!1),Z=j(\"Accordion\"),ee=j(\"ExpandDeepButton\"),ie=w(\"JSONSchema202012KeywordDescription\"),ae=w(\"Link\"),le=w(\"JSONSchema202012DeepExpansionContext\")(),ce=(0,We.useCallback)((()=>{U((s=>!s))}),[]),pe=(0,We.useCallback)(((s,i)=>{U(i),X(i)}),[]);return 0===Object.keys(u).length?null:We.createElement(le.Provider,{value:Y},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\"},B?We.createElement(We.Fragment,null,We.createElement(Z,{expanded:$,onChange:ce},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),We.createElement(ee,{expanded:$,onClick:pe})):We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&We.createElement(We.Fragment,null,u.description&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(ie,{schema:u,getSystem:i})),u.url&&We.createElement(\"li\",{className:\"json-schema-2020-12-property\"},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},We.createElement(ae,{target:\"_blank\",href:sanitizeUrl(u.url)},u.url))))))))},keywords_Description=({schema:s,getSystem:i})=>{if(!s?.description)return null;const{getComponent:u}=i(),_=u(\"Markdown\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},We.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},We.createElement(_,{source:s.description})))},iI=createOnlyOAS31ComponentWrapper(keywords_Description),aI=createOnlyOAS31ComponentWrapper((({schema:s,getSystem:i,originalComponent:u})=>{const{getComponent:_}=i(),w=_(\"JSONSchema202012KeywordDiscriminator\"),x=_(\"JSONSchema202012KeywordXml\"),j=_(\"JSONSchema202012KeywordExample\"),P=_(\"JSONSchema202012KeywordExternalDocs\");return We.createElement(We.Fragment,null,We.createElement(u,{schema:s}),We.createElement(w,{schema:s,getSystem:i}),We.createElement(x,{schema:s,getSystem:i}),We.createElement(P,{schema:s,getSystem:i}),We.createElement(j,{schema:s,getSystem:i}))})),lI=aI,keywords_Properties=({schema:s,getSystem:i})=>{const{fn:u}=i(),{useComponent:_}=u.jsonSchema202012,{getDependentRequired:w,getProperties:x}=u.jsonSchema202012.useFn(),j=u.jsonSchema202012.useConfig(),P=Array.isArray(s?.required)?s.required:[],B=_(\"JSONSchema\"),$=x(s,j);return 0===Object.keys($).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},We.createElement(\"ul\",null,Object.entries($).map((([i,u])=>{const _=P.includes(i),x=w(i,s);return We.createElement(\"li\",{key:i,className:KO()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":_})},We.createElement(B,{name:i,schema:u,dependentRequired:x}))}))))},cI=createOnlyOAS31ComponentWrapper(keywords_Properties),getProperties=(s,{includeReadOnly:i,includeWriteOnly:u})=>{if(!s?.properties)return{};const _=Object.entries(s.properties).filter((([,s])=>(!(!0===s?.readOnly)||i)&&(!(!0===s?.writeOnly)||u)));return Object.fromEntries(_)};const uI=function afterLoad({fn:s,getSystem:i}){if(s.jsonSchema202012){const u=((s,i)=>{const{fn:u}=i();if(\"function\"!=typeof s)return null;const{hasKeyword:_}=u.jsonSchema202012;return i=>s(i)||_(i,\"example\")||i?.xml||i?.discriminator||i?.externalDocs})(s.jsonSchema202012.isExpandable,i);Object.assign(this.fn.jsonSchema202012,{isExpandable:u,getProperties})}if(\"function\"==typeof s.sampleFromSchema&&s.jsonSchema202012){const u=((s,i)=>{const{fn:u,specSelectors:_}=i;return Object.fromEntries(Object.entries(s).map((([s,i])=>{const w=u[s];return[s,(...s)=>_.isOAS31()?i(...s):\"function\"==typeof w?w(...s):void 0]})))})({sampleFromSchema:s.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:s.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:s.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:s.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:s.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:s.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:s.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:s.jsonSchema202012.getXmlSampleSchema,getSampleSchema:s.jsonSchema202012.getSampleSchema},i());Object.assign(this.fn,u)}},oas31=({fn:s})=>{const i=s.createSystemSelector||fn_createSystemSelector,u=s.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:uI,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:oas31_components_license,OAS31Contact:oas31_components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:LP,OAS31Models:models,OAS31Auths:BP,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:keywords_Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs},wrapComponents:{InfoContainer:$P,License:FP,Contact:qP,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:zP,Models:WP,AuthItem:HP,auths:JP,JSONSchema202012KeywordDescription:iI,JSONSchema202012KeywordDefault:lI,JSONSchema202012KeywordProperties:cI},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:oI}},spec:{selectors:{isOAS31:i(YP),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:u(selectLicenseIdentifierField),selectLicenseUrl:i(QP),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:i(ZP),selectInfoTitleField,selectInfoSummaryField:u(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:i(eI),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:i(tI),webhooks:u(selectors_webhooks),selectWebhooksOperations:u(i(XP)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:i(rI)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:nI}},oas31:{selectors:{selectLicenseUrl:u(i(sI))}}}}},pI=lC().object,hI=lC().bool,dI=(lC().oneOfType([pI,hI]),(0,We.createContext)(null));dI.displayName=\"JSONSchemaContext\";const fI=(0,We.createContext)(0);fI.displayName=\"JSONSchemaLevelContext\";const mI=(0,We.createContext)(!1);mI.displayName=\"JSONSchemaDeepExpansionContext\";const gI=(0,We.createContext)(new Set),useConfig=()=>{const{config:s}=(0,We.useContext)(dI);return s},useComponent=s=>{const{components:i}=(0,We.useContext)(dI);return i[s]||null},useFn=(s=void 0)=>{const{fn:i}=(0,We.useContext)(dI);return void 0!==s?i[s]:i},useLevel=()=>{const s=(0,We.useContext)(fI);return[s,s+1]},useIsExpanded=()=>{const[s]=useLevel(),{defaultExpandedLevels:i}=useConfig();return i-s>0},useIsExpandedDeeply=()=>(0,We.useContext)(mI),useRenderedSchemas=(s=void 0)=>{if(void 0===s)return(0,We.useContext)(gI);const i=(0,We.useContext)(gI);return new Set([...i,s])},yI=(0,We.forwardRef)((({schema:s,name:i=\"\",dependentRequired:u=[],onExpand:_=(()=>{})},w)=>{const x=useFn(),j=useIsExpanded(),P=useIsExpandedDeeply(),[B,$]=(0,We.useState)(j||P),[U,Y]=(0,We.useState)(P),[X,Z]=useLevel(),ee=(()=>{const[s]=useLevel();return s>0})(),ie=x.isExpandable(s)||u.length>0,ae=(s=>useRenderedSchemas().has(s))(s),le=useRenderedSchemas(s),ce=x.stringifyConstraints(s),pe=useComponent(\"Accordion\"),de=useComponent(\"Keyword$schema\"),fe=useComponent(\"Keyword$vocabulary\"),ye=useComponent(\"Keyword$id\"),be=useComponent(\"Keyword$anchor\"),_e=useComponent(\"Keyword$dynamicAnchor\"),we=useComponent(\"Keyword$ref\"),Se=useComponent(\"Keyword$dynamicRef\"),xe=useComponent(\"Keyword$defs\"),Pe=useComponent(\"Keyword$comment\"),Te=useComponent(\"KeywordAllOf\"),Re=useComponent(\"KeywordAnyOf\"),qe=useComponent(\"KeywordOneOf\"),$e=useComponent(\"KeywordNot\"),ze=useComponent(\"KeywordIf\"),He=useComponent(\"KeywordThen\"),Ye=useComponent(\"KeywordElse\"),Xe=useComponent(\"KeywordDependentSchemas\"),Qe=useComponent(\"KeywordPrefixItems\"),et=useComponent(\"KeywordItems\"),tt=useComponent(\"KeywordContains\"),rt=useComponent(\"KeywordProperties\"),nt=useComponent(\"KeywordPatternProperties\"),ot=useComponent(\"KeywordAdditionalProperties\"),st=useComponent(\"KeywordPropertyNames\"),it=useComponent(\"KeywordUnevaluatedItems\"),at=useComponent(\"KeywordUnevaluatedProperties\"),lt=useComponent(\"KeywordType\"),ct=useComponent(\"KeywordEnum\"),ut=useComponent(\"KeywordConst\"),pt=useComponent(\"KeywordConstraint\"),ht=useComponent(\"KeywordDependentRequired\"),dt=useComponent(\"KeywordContentSchema\"),mt=useComponent(\"KeywordTitle\"),gt=useComponent(\"KeywordDescription\"),yt=useComponent(\"KeywordDefault\"),vt=useComponent(\"KeywordDeprecated\"),bt=useComponent(\"KeywordReadOnly\"),_t=useComponent(\"KeywordWriteOnly\"),Et=useComponent(\"ExpandDeepButton\");(0,We.useEffect)((()=>{Y(P)}),[P]),(0,We.useEffect)((()=>{Y(U)}),[U]);const wt=(0,We.useCallback)(((s,i)=>{$(i),!i&&Y(!1),_(s,i,!1)}),[_]),St=(0,We.useCallback)(((s,i)=>{$(i),Y(i),_(s,i,!0)}),[_]);return We.createElement(fI.Provider,{value:Z},We.createElement(mI.Provider,{value:U},We.createElement(gI.Provider,{value:le},We.createElement(\"article\",{ref:w,\"data-json-schema-level\":X,className:KO()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":ee,\"json-schema-2020-12--circular\":ae})},We.createElement(\"div\",{className:\"json-schema-2020-12-head\"},ie&&!ae?We.createElement(We.Fragment,null,We.createElement(pe,{expanded:B,onChange:wt},We.createElement(mt,{title:i,schema:s})),We.createElement(Et,{expanded:B,onClick:St})):We.createElement(mt,{title:i,schema:s}),We.createElement(vt,{schema:s}),We.createElement(bt,{schema:s}),We.createElement(_t,{schema:s}),We.createElement(lt,{schema:s,isCircular:ae}),ce.length>0&&ce.map((s=>We.createElement(pt,{key:`${s.scope}-${s.value}`,constraint:s})))),We.createElement(\"div\",{className:KO()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!B})},B&&We.createElement(We.Fragment,null,We.createElement(gt,{schema:s}),!ae&&ie&&We.createElement(We.Fragment,null,We.createElement(rt,{schema:s}),We.createElement(nt,{schema:s}),We.createElement(ot,{schema:s}),We.createElement(at,{schema:s}),We.createElement(st,{schema:s}),We.createElement(Te,{schema:s}),We.createElement(Re,{schema:s}),We.createElement(qe,{schema:s}),We.createElement($e,{schema:s}),We.createElement(ze,{schema:s}),We.createElement(He,{schema:s}),We.createElement(Ye,{schema:s}),We.createElement(Xe,{schema:s}),We.createElement(Qe,{schema:s}),We.createElement(et,{schema:s}),We.createElement(it,{schema:s}),We.createElement(tt,{schema:s}),We.createElement(dt,{schema:s})),We.createElement(ct,{schema:s}),We.createElement(ut,{schema:s}),We.createElement(ht,{schema:s,dependentRequired:u}),We.createElement(yt,{schema:s}),We.createElement(de,{schema:s}),We.createElement(fe,{schema:s}),We.createElement(ye,{schema:s}),We.createElement(be,{schema:s}),We.createElement(_e,{schema:s}),We.createElement(we,{schema:s}),!ae&&ie&&We.createElement(xe,{schema:s}),We.createElement(Se,{schema:s}),We.createElement(Pe,{schema:s})))))))})),vI=yI,keywords_$schema=({schema:s})=>s?.$schema?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$schema)):null,$vocabulary_$vocabulary=({schema:s})=>{const i=useIsExpanded(),u=useIsExpandedDeeply(),[_,w]=(0,We.useState)(i||u),x=useComponent(\"Accordion\"),j=(0,We.useCallback)((()=>{w((s=>!s))}),[]);return s?.$vocabulary?\"object\"!=typeof s.$vocabulary?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},We.createElement(x,{expanded:_,onChange:j},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",null,_&&Object.entries(s.$vocabulary).map((([s,i])=>We.createElement(\"li\",{key:s,className:KO()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!i})},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s)))))):null},keywords_$id=({schema:s})=>s?.$id?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$id)):null,keywords_$anchor=({schema:s})=>s?.$anchor?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$anchor)):null,keywords_$dynamicAnchor=({schema:s})=>s?.$dynamicAnchor?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicAnchor)):null,keywords_$ref=({schema:s})=>s?.$ref?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$ref)):null,keywords_$dynamicRef=({schema:s})=>s?.$dynamicRef?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicRef)):null,keywords_$defs=({schema:s})=>{const i=s?.$defs||{},u=useIsExpanded(),_=useIsExpandedDeeply(),[w,x]=(0,We.useState)(u||_),[j,P]=(0,We.useState)(!1),B=useComponent(\"Accordion\"),$=useComponent(\"ExpandDeepButton\"),U=useComponent(\"JSONSchema\"),Y=(0,We.useCallback)((()=>{x((s=>!s))}),[]),X=(0,We.useCallback)(((s,i)=>{x(i),P(i)}),[]);return 0===Object.keys(i).length?null:We.createElement(mI.Provider,{value:j},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\"},We.createElement(B,{expanded:w,onChange:Y},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),We.createElement($,{expanded:w,onClick:X}),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!w})},w&&We.createElement(We.Fragment,null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(U,{name:s,schema:i}))))))))},keywords_$comment=({schema:s})=>s?.$comment?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$comment)):null,keywords_AllOf=({schema:s})=>{const i=s?.allOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{allOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_AnyOf=({schema:s})=>{const i=s?.anyOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{anyOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_OneOf=({schema:s})=>{const i=s?.oneOf||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{oneOf:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_Not=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"not\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},We.createElement(u,{name:_,schema:s.not}))},keywords_If=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"if\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},We.createElement(u,{name:_,schema:s.if}))},keywords_Then=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"then\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},We.createElement(u,{name:_,schema:s.then}))},keywords_Else=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"else\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},We.createElement(u,{name:_,schema:s.else}))},keywords_DependentSchemas=({schema:s})=>{const i=s?.dependentSchemas||[],u=useIsExpanded(),_=useIsExpandedDeeply(),[w,x]=(0,We.useState)(u||_),[j,P]=(0,We.useState)(!1),B=useComponent(\"Accordion\"),$=useComponent(\"ExpandDeepButton\"),U=useComponent(\"JSONSchema\"),Y=(0,We.useCallback)((()=>{x((s=>!s))}),[]),X=(0,We.useCallback)(((s,i)=>{x(i),P(i)}),[]);return\"object\"!=typeof i||0===Object.keys(i).length?null:We.createElement(mI.Provider,{value:j},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\"},We.createElement(B,{expanded:w,onChange:Y},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),We.createElement($,{expanded:w,onClick:X}),We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!w})},w&&We.createElement(We.Fragment,null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(U,{name:s,schema:i}))))))))},keywords_PrefixItems=({schema:s})=>{const i=s?.prefixItems||[],u=useFn(),_=useIsExpanded(),w=useIsExpandedDeeply(),[x,j]=(0,We.useState)(_||w),[P,B]=(0,We.useState)(!1),$=useComponent(\"Accordion\"),U=useComponent(\"ExpandDeepButton\"),Y=useComponent(\"JSONSchema\"),X=useComponent(\"KeywordType\"),Z=(0,We.useCallback)((()=>{j((s=>!s))}),[]),ee=(0,We.useCallback)(((s,i)=>{j(i),B(i)}),[]);return Array.isArray(i)&&0!==i.length?We.createElement(mI.Provider,{value:P},We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\"},We.createElement($,{expanded:x,onChange:Z},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),We.createElement(U,{expanded:x,onClick:ee}),We.createElement(X,{schema:{prefixItems:i}}),We.createElement(\"ul\",{className:KO()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!x})},x&&We.createElement(We.Fragment,null,i.map(((s,i)=>We.createElement(\"li\",{key:`#${i}`,className:\"json-schema-2020-12-property\"},We.createElement(Y,{name:`#${i} ${u.getTitle(s)}`,schema:s})))))))):null},keywords_Items=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"items\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},We.createElement(u,{name:_,schema:s.items}))},keywords_Contains=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"contains\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},We.createElement(u,{name:_,schema:s.contains}))},keywords_Properties_Properties=({schema:s})=>{const i=useFn(),u=s?.properties||{},_=Array.isArray(s?.required)?s.required:[],w=useComponent(\"JSONSchema\");return 0===Object.keys(u).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},We.createElement(\"ul\",null,Object.entries(u).map((([u,x])=>{const j=_.includes(u),P=i.getDependentRequired(u,s);return We.createElement(\"li\",{key:u,className:KO()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":j})},We.createElement(w,{name:u,schema:x,dependentRequired:P}))}))))},PatternProperties_PatternProperties=({schema:s})=>{const i=s?.patternProperties||{},u=useComponent(\"JSONSchema\");return 0===Object.keys(i).length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},We.createElement(\"ul\",null,Object.entries(i).map((([s,i])=>We.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},We.createElement(u,{name:s,schema:i}))))))},keywords_AdditionalProperties=({schema:s})=>{const i=useFn(),{additionalProperties:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"additionalProperties\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===u?We.createElement(We.Fragment,null,w,We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===u?We.createElement(We.Fragment,null,w,We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):We.createElement(_,{name:w,schema:u}))},keywords_PropertyNames=({schema:s})=>{const i=useFn(),{propertyNames:u}=s,_=useComponent(\"JSONSchema\"),w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return i.hasKeyword(s,\"propertyNames\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},We.createElement(_,{name:w,schema:u})):null},keywords_UnevaluatedItems=({schema:s})=>{const i=useFn(),{unevaluatedItems:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"unevaluatedItems\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},We.createElement(_,{name:w,schema:u}))},keywords_UnevaluatedProperties=({schema:s})=>{const i=useFn(),{unevaluatedProperties:u}=s,_=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"unevaluatedProperties\"))return null;const w=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},We.createElement(_,{name:w,schema:u}))},keywords_Type=({schema:s,isCircular:i=!1})=>{const u=useFn().getType(s),_=i?\" [circular]\":\"\";return We.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${u}${_}`)},Enum_Enum=({schema:s})=>{const i=useFn();return Array.isArray(s?.enum)?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Allowed values\"),We.createElement(\"ul\",null,s.enum.map((s=>{const u=i.stringify(s);return We.createElement(\"li\",{key:u},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},u))})))):null},keywords_Const=({schema:s})=>{const i=useFn();return i.hasKeyword(s,\"const\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Const\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},i.stringify(s.const))):null},Constraint=({constraint:s})=>We.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${s.scope}`},s.value),bI=We.memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:s})=>0===s.length?null:We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),We.createElement(\"ul\",null,s.map((s=>We.createElement(\"li\",{key:s},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},s)))))),keywords_ContentSchema=({schema:s})=>{const i=useFn(),u=useComponent(\"JSONSchema\");if(!i.hasKeyword(s,\"contentSchema\"))return null;const _=We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},We.createElement(u,{name:_,schema:s.contentSchema}))},Title_Title=({title:s=\"\",schema:i})=>{const u=useFn();return s||u.getTitle(i)?We.createElement(\"div\",{className:\"json-schema-2020-12__title\"},s||u.getTitle(i)):null},keywords_Description_Description=({schema:s})=>s?.description?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},We.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},s.description)):null,keywords_Default=({schema:s})=>{const i=useFn();return i.hasKeyword(s,\"default\")?We.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"},We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Default\"),We.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},i.stringify(s.default))):null},keywords_Deprecated=({schema:s})=>!0!==s?.deprecated?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:s})=>!0!==s?.readOnly?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:s})=>!0!==s?.writeOnly?null:We.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),Accordion_Accordion=({expanded:s=!1,children:i,onChange:u})=>{const _=useComponent(\"ChevronRightIcon\"),w=(0,We.useCallback)((i=>{u(i,!s)}),[s,u]);return We.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:w},We.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},i),We.createElement(\"span\",{className:KO()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":s,\"json-schema-2020-12-accordion__icon--collapsed\":!s})},We.createElement(_,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:s,onClick:i})=>{const u=(0,We.useCallback)((u=>{i(u,!s)}),[s,i]);return We.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:u},s?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>We.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},We.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),fn_upperFirst=s=>\"string\"==typeof s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:s,getTitle=s=>{const i=useFn();return s?.title?i.upperFirst(s.title):s?.$anchor?i.upperFirst(s.$anchor):s?.$id?s.$id:\"\"},getType=(s,i=new WeakSet)=>{const u=useFn();if(null==s)return\"any\";if(u.isBooleanJSONSchema(s))return s?\"any\":\"never\";if(\"object\"!=typeof s)return\"any\";if(i.has(s))return\"any\";i.add(s);const{type:_,prefixItems:w,items:x}=s,getArrayType=()=>{if(Array.isArray(w)){const s=w.map((s=>getType(s,i))),u=x?getType(x,i):\"any\";return`array<[${s.join(\", \")}], ${u}>`}if(x){return`array<${getType(x,i)}>`}return\"array<any>\"};if(s.not&&\"any\"===getType(s.not))return\"never\";const handleCombiningKeywords=(u,_)=>{if(Array.isArray(s[u])){return`(${s[u].map((s=>getType(s,i))).join(_)})`}return null},j=[Array.isArray(_)?_.map((s=>\"array\"===s?getArrayType():s)).join(\" | \"):\"array\"===_?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(_)?_:(()=>{if(Object.hasOwn(s,\"prefixItems\")||Object.hasOwn(s,\"items\")||Object.hasOwn(s,\"contains\"))return getArrayType();if(Object.hasOwn(s,\"properties\")||Object.hasOwn(s,\"additionalProperties\")||Object.hasOwn(s,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(s.format))return\"integer\";if([\"float\",\"double\"].includes(s.format))return\"number\";if(Object.hasOwn(s,\"minimum\")||Object.hasOwn(s,\"maximum\")||Object.hasOwn(s,\"exclusiveMinimum\")||Object.hasOwn(s,\"exclusiveMaximum\")||Object.hasOwn(s,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(s,\"pattern\")||Object.hasOwn(s,\"format\")||Object.hasOwn(s,\"minLength\")||Object.hasOwn(s,\"maxLength\"))return\"string\";if(void 0!==s.const){if(null===s.const)return\"null\";if(\"boolean\"==typeof s.const)return\"boolean\";if(\"number\"==typeof s.const)return Number.isInteger(s.const)?\"integer\":\"number\";if(\"string\"==typeof s.const)return\"string\";if(Array.isArray(s.const))return\"array<any>\";if(\"object\"==typeof s.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return i.delete(s),j||\"any\"},isBooleanJSONSchema=s=>\"boolean\"==typeof s,hasKeyword=(s,i)=>null!==s&&\"object\"==typeof s&&Object.hasOwn(s,i),isExpandable=s=>{const i=useFn();return s?.$schema||s?.$vocabulary||s?.$id||s?.$anchor||s?.$dynamicAnchor||s?.$ref||s?.$dynamicRef||s?.$defs||s?.$comment||s?.allOf||s?.anyOf||s?.oneOf||i.hasKeyword(s,\"not\")||i.hasKeyword(s,\"if\")||i.hasKeyword(s,\"then\")||i.hasKeyword(s,\"else\")||s?.dependentSchemas||s?.prefixItems||i.hasKeyword(s,\"items\")||i.hasKeyword(s,\"contains\")||s?.properties||s?.patternProperties||i.hasKeyword(s,\"additionalProperties\")||i.hasKeyword(s,\"propertyNames\")||i.hasKeyword(s,\"unevaluatedItems\")||i.hasKeyword(s,\"unevaluatedProperties\")||s?.description||s?.enum||i.hasKeyword(s,\"const\")||i.hasKeyword(s,\"contentSchema\")||i.hasKeyword(s,\"default\")},fn_stringify=s=>null===s||[\"number\",\"bigint\",\"boolean\"].includes(typeof s)?String(s):Array.isArray(s)?`[${s.map(fn_stringify).join(\", \")}]`:JSON.stringify(s),stringifyConstraintRange=(s,i,u)=>{const _=\"number\"==typeof i,w=\"number\"==typeof u;return _&&w?i===u?`${i} ${s}`:`[${i}, ${u}] ${s}`:_?`>= ${i} ${s}`:w?`<= ${u} ${s}`:null},stringifyConstraints=s=>{const i=[],u=(s=>{if(\"number\"!=typeof s?.multipleOf)return null;if(s.multipleOf<=0)return null;if(1===s.multipleOf)return null;const{multipleOf:i}=s;if(Number.isInteger(i))return`multiple of ${i}`;const u=10**i.toString().split(\".\")[1].length;return`multiple of ${i*u}/${u}`})(s);null!==u&&i.push({scope:\"number\",value:u});const _=(s=>{const i=s?.minimum,u=s?.maximum,_=s?.exclusiveMinimum,w=s?.exclusiveMaximum,x=\"number\"==typeof i,j=\"number\"==typeof u,P=\"number\"==typeof _,B=\"number\"==typeof w,$=P&&(!x||i<_),U=B&&(!j||u>w);if((x||P)&&(j||B))return`${$?\"(\":\"[\"}${$?_:i}, ${U?w:u}${U?\")\":\"]\"}`;if(x||P)return`${$?\">\":\"≥\"} ${$?_:i}`;if(j||B)return`${U?\"<\":\"≤\"} ${U?w:u}`;return null})(s);null!==_&&i.push({scope:\"number\",value:_}),s?.format&&i.push({scope:\"string\",value:s.format});const w=stringifyConstraintRange(\"characters\",s?.minLength,s?.maxLength);null!==w&&i.push({scope:\"string\",value:w}),s?.pattern&&i.push({scope:\"string\",value:`matches ${s?.pattern}`}),s?.contentMediaType&&i.push({scope:\"string\",value:`media type: ${s.contentMediaType}`}),s?.contentEncoding&&i.push({scope:\"string\",value:`encoding: ${s.contentEncoding}`});const x=stringifyConstraintRange(s?.hasUniqueItems?\"unique items\":\"items\",s?.minItems,s?.maxItems);null!==x&&i.push({scope:\"array\",value:x});const j=stringifyConstraintRange(\"contained items\",s?.minContains,s?.maxContains);null!==j&&i.push({scope:\"array\",value:j});const P=stringifyConstraintRange(\"properties\",s?.minProperties,s?.maxProperties);return null!==P&&i.push({scope:\"object\",value:P}),i},getDependentRequired=(s,i)=>i?.dependentRequired?Array.from(Object.entries(i.dependentRequired).reduce(((i,[u,_])=>Array.isArray(_)&&_.includes(s)?(i.add(u),i):i),new Set)):[],withJSONSchemaContext=(s,i={})=>{const u={components:{JSONSchema:vI,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:keywords_Const,KeywordConstraint:bI,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:keywords_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...i.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,...i.config},fn:{upperFirst:fn_upperFirst,getTitle,getType,isBooleanJSONSchema,hasKeyword,isExpandable,stringify:fn_stringify,stringifyConstraints,getDependentRequired,...i.fn}},HOC=i=>We.createElement(dI.Provider,{value:u},We.createElement(s,i));return HOC.contexts={JSONSchemaContext:dI},HOC.displayName=s.displayName,HOC},json_schema_2020_12=()=>({components:{JSONSchema202012:vI,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:keywords_Const,JSONSchema202012KeywordConstraint:bI,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:keywords_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,JSONSchema202012DeepExpansionContext:()=>mI},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{isExpandable,hasKeyword,useFn,useConfig,useComponent,useIsExpandedDeeply}}});var _I=__webpack_require__(11331),EI=__webpack_require__.n(_I);const array=(s,{sample:i})=>((s,i={})=>{const{minItems:u,maxItems:_,uniqueItems:w}=i,{contains:x,minContains:j,maxContains:P}=i;let B=[...s];if(null!=x&&\"object\"==typeof x){if(Number.isInteger(j)&&j>1){const s=B.at(0);for(let i=1;i<j;i+=1)B.unshift(s)}Number.isInteger(P)}if(Number.isInteger(_)&&_>0&&(B=s.slice(0,_)),Number.isInteger(u)&&u>0)for(let s=0;B.length<u;s+=1)B.push(B[s%B.length]);return!0===w&&(B=Array.from(new Set(B))),B})(i,s),object=()=>{throw new Error(\"Not implemented\")},bytes=s=>Ct()(s),random_pick=s=>s.at(0),predicates_isBooleanJSONSchema=s=>\"boolean\"==typeof s,isJSONSchemaObject=s=>EI()(s),isJSONSchema=s=>predicates_isBooleanJSONSchema(s)||isJSONSchemaObject(s),email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const wI=class Registry{data={};register(s,i){this.data[s]=i}unregister(s){void 0===s?this.data={}:delete this.data[s]}get(s){return this.data[s]}},SI=new wI,api_formatAPI=(s,i)=>\"function\"==typeof i?SI.register(s,i):null===i?SI.unregister(s):SI.get(s);var xI=__webpack_require__(48287).Buffer;const _7bit=s=>xI.from(s).toString(\"ascii\");var kI=__webpack_require__(48287).Buffer;const _8bit=s=>kI.from(s).toString(\"utf8\");var OI=__webpack_require__(48287).Buffer;const encoders_binary=s=>OI.from(s).toString(\"binary\"),quoted_printable=s=>{let i=\"\";for(let u=0;u<s.length;u++){const _=s.charCodeAt(u);if(61===_)i+=\"=3D\";else if(_>=33&&_<=60||_>=62&&_<=126||9===_||32===_)i+=s.charAt(u);else if(13===_||10===_)i+=\"\\r\\n\";else if(_>126){const _=unescape(encodeURIComponent(s.charAt(u)));for(let s=0;s<_.length;s++)i+=\"=\"+(\"0\"+_.charCodeAt(s).toString(16)).slice(-2).toUpperCase()}else i+=\"=\"+(\"0\"+_.toString(16)).slice(-2).toUpperCase()}return i};var CI=__webpack_require__(48287).Buffer;const base16=s=>CI.from(s).toString(\"hex\");var AI=__webpack_require__(48287).Buffer;const base32=s=>{const i=AI.from(s).toString(\"utf8\"),u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let _=0,w=\"\",x=0,j=0;for(let s=0;s<i.length;s++)for(x=x<<8|i.charCodeAt(s),j+=8;j>=5;)w+=u.charAt(x>>>j-5&31),j-=5;j>0&&(w+=u.charAt(x<<5-j&31),_=(8-8*i.length%5)%5);for(let s=0;s<_;s++)w+=\"=\";return w};var jI=__webpack_require__(48287).Buffer;const base64=s=>jI.from(s).toString(\"base64\");var PI=__webpack_require__(48287).Buffer;const base64url=s=>PI.from(s).toString(\"base64url\");const II=new class EncoderRegistry extends wI{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary:encoders_binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(s,i)=>\"function\"==typeof i?II.register(s,i):null===i?II.unregister(s):II.get(s);encoderAPI.getDefaults=()=>II.defaults;const NI=encoderAPI,MI={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},TI={\"image/*\":()=>bytes(25).toString(\"binary\")},RI={\"audio/*\":()=>bytes(25).toString(\"binary\")},DI={\"video/*\":()=>bytes(25).toString(\"binary\")},LI={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const BI=new class MediaTypeRegistry extends wI{#e={...MI,...TI,...RI,...DI,...LI};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(s,i)=>{if(\"function\"==typeof i)return BI.register(s,i);if(null===i)return BI.unregister(s);const u=s.split(\";\").at(0),_=`${u.split(\"/\").at(0)}/*`;return BI.get(s)||BI.get(u)||BI.get(_)};mediaTypeAPI.getDefaults=()=>BI.defaults;const FI=mediaTypeAPI,types_string=(s,{sample:i}={})=>{const{contentEncoding:u,contentMediaType:_,contentSchema:w}=s,{pattern:x,format:j}=s,P=NI(u)||DO();let B;if(\"string\"==typeof x)B=(s=>{try{return new(fs())(s).gen()}catch{return\"string\"}})(x);else if(\"string\"==typeof j)B=(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"email\":return email();case\"idn-email\":return idn_email();case\"hostname\":return hostname();case\"idn-hostname\":return idn_hostname();case\"ipv4\":return ipv4();case\"ipv6\":return ipv6();case\"uri\":return uri();case\"uri-reference\":return uri_reference();case\"iri\":return iri();case\"iri-reference\":return iri_reference();case\"uuid\":return uuid();case\"uri-template\":return uri_template();case\"json-pointer\":return json_pointer();case\"relative-json-pointer\":return relative_json_pointer();case\"date-time\":return date_time();case\"date\":return date();case\"time\":return time();case\"duration\":return duration();case\"password\":return generators_password();case\"regex\":return regex()}return\"string\"})(s);else if(isJSONSchema(w)&&\"string\"==typeof _&&void 0!==i)B=Array.isArray(i)||\"object\"==typeof i?JSON.stringify(i):String(i);else if(\"string\"==typeof _){const i=FI(_);\"function\"==typeof i&&(B=i(s))}else B=\"string\";return P(((s,i={})=>{const{maxLength:u,minLength:_}=i;let w=s;if(Number.isInteger(u)&&u>0&&(w=w.slice(0,u)),Number.isInteger(_)&&_>0){let s=0;for(;w.length<_;)w+=w[s++%w.length]}return w})(B,s))},generators_float=()=>.1,generators_double=()=>.1,applyNumberConstraints=(s,i={})=>{const{minimum:u,maximum:_,exclusiveMinimum:w,exclusiveMaximum:x}=i,{multipleOf:j}=i,P=Number.isInteger(s)?1:Number.EPSILON;let B=\"number\"==typeof u?u:null,$=\"number\"==typeof _?_:null,U=s;if(\"number\"==typeof w&&(B=null!==B?Math.max(B,w+P):w+P),\"number\"==typeof x&&($=null!==$?Math.min($,x-P):x-P),U=B>$&&s||B||$||U,\"number\"==typeof j&&j>0){const s=U%j;U=0===s?U:U+j-s}return U},types_number=s=>{const{format:i}=s;let u;return u=\"string\"==typeof i?(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"float\":return generators_float();case\"double\":return generators_double()}return 0})(s):0,applyNumberConstraints(u,s)},int32=()=>2**30>>>0,int64=()=>2**53-1,types_integer=s=>{const{format:i}=s;let u;return u=\"string\"==typeof i?(s=>{const{format:i}=s,u=api_formatAPI(i);if(\"function\"==typeof u)return u(s);switch(i){case\"int32\":return int32();case\"int64\":return int64()}return 0})(s):0,applyNumberConstraints(u,s)},types_boolean=s=>\"boolean\"!=typeof s.default||s.default,qI=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(s,i)=>\"string\"==typeof i&&Object.hasOwn(s,i)?s[i]:()=>`Unknown Type: ${i}`}),$I=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=s=>{if(!isJSONSchemaObject(s))return!1;const{examples:i,example:u,default:_}=s;return!!(Array.isArray(i)&&i.length>=1)||(void 0!==_||void 0!==u)},extractExample=s=>{if(!isJSONSchemaObject(s))return null;const{examples:i,example:u,default:_}=s;return Array.isArray(i)&&i.length>=1?i.at(0):void 0!==_?_:void 0!==u?u:void 0},UI={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};UI.number=UI.integer;const zI=\"string\",inferTypeFromValue=s=>void 0===s?null:null===s?\"null\":Array.isArray(s)?\"array\":Number.isInteger(s)?\"integer\":typeof s,foldType=s=>{if(Array.isArray(s)&&s.length>=1){if(s.includes(\"array\"))return\"array\";if(s.includes(\"object\"))return\"object\";{const i=random_pick(s);if($I.includes(i))return i}}return $I.includes(s)?s:null},inferType=(s,i=new WeakSet)=>{if(!isJSONSchemaObject(s))return zI;if(i.has(s))return zI;i.add(s);let{type:u,const:_}=s;if(u=foldType(u),\"string\"!=typeof u){const i=Object.keys(UI);e:for(let _=0;_<i.length;_+=1){const w=i[_],x=UI[w];for(let i=0;i<x.length;i+=1){const _=x[i];if(Object.hasOwn(s,_)){u=w;break e}}}}if(\"string\"!=typeof u&&void 0!==_){const s=inferTypeFromValue(_);u=\"string\"==typeof s?s:u}if(\"string\"!=typeof u){const combineTypes=u=>{if(Array.isArray(s[u])){const _=s[u].map((s=>inferType(s,i)));return foldType(_)}return null},_=combineTypes(\"allOf\"),w=combineTypes(\"anyOf\"),x=combineTypes(\"oneOf\"),j=s.not?inferType(s.not,i):null;(_||w||x||j)&&(u=foldType([_,w,x,j].filter(Boolean)))}if(\"string\"!=typeof u&&hasExample(s)){const i=extractExample(s),_=inferTypeFromValue(i);u=\"string\"==typeof _?_:u}return i.delete(s),u||zI},type_getType=s=>inferType(s),typeCast=s=>predicates_isBooleanJSONSchema(s)?(s=>!1===s?{not:{}}:{})(s):isJSONSchemaObject(s)?s:{},merge_merge=(s,i,u={})=>{if(predicates_isBooleanJSONSchema(s)&&!0===s)return!0;if(predicates_isBooleanJSONSchema(s)&&!1===s)return!1;if(predicates_isBooleanJSONSchema(i)&&!0===i)return!0;if(predicates_isBooleanJSONSchema(i)&&!1===i)return!1;if(!isJSONSchema(s))return i;if(!isJSONSchema(i))return s;const _={...i,...s};if(i.type&&s.type&&Array.isArray(i.type)&&\"string\"==typeof i.type){const u=normalizeArray(i.type).concat(s.type);_.type=Array.from(new Set(u))}if(Array.isArray(i.required)&&Array.isArray(s.required)&&(_.required=[...new Set([...s.required,...i.required])]),i.properties&&s.properties){const w=new Set([...Object.keys(i.properties),...Object.keys(s.properties)]);_.properties={};for(const x of w){const w=i.properties[x]||{},j=s.properties[x]||{};w.readOnly&&!u.includeReadOnly||w.writeOnly&&!u.includeWriteOnly?_.required=(_.required||[]).filter((s=>s!==x)):_.properties[x]=merge_merge(j,w,u)}}return isJSONSchema(i.items)&&isJSONSchema(s.items)&&(_.items=merge_merge(s.items,i.items,u)),isJSONSchema(i.contains)&&isJSONSchema(s.contains)&&(_.contains=merge_merge(s.contains,i.contains,u)),isJSONSchema(i.contentSchema)&&isJSONSchema(s.contentSchema)&&(_.contentSchema=merge_merge(s.contentSchema,i.contentSchema,u)),_},VI=merge_merge,main_sampleFromSchemaGeneric=(s,i={},u=void 0,_=!1)=>{if(null==s&&void 0===u)return;\"function\"==typeof s?.toJS&&(s=s.toJS()),s=typeCast(s);let w=void 0!==u||hasExample(s);const x=!w&&Array.isArray(s.oneOf)&&s.oneOf.length>0,j=!w&&Array.isArray(s.anyOf)&&s.anyOf.length>0;if(!w&&(x||j)){const u=typeCast(random_pick(x?s.oneOf:s.anyOf));!(s=VI(s,u,i)).xml&&u.xml&&(s.xml=u.xml),hasExample(s)&&hasExample(u)&&(w=!0)}const P={};let{xml:B,properties:$,additionalProperties:U,items:Y,contains:X}=s||{},Z=type_getType(s),{includeReadOnly:ee,includeWriteOnly:ie}=i;B=B||{};let ae,{name:le,prefix:ce,namespace:pe}=B,de={};if(Object.hasOwn(s,\"type\")||(s.type=Z),_&&(le=le||\"notagname\",ae=(ce?`${ce}:`:\"\")+le,pe)){P[ce?`xmlns:${ce}`:\"xmlns\"]=pe}_&&(de[ae]=[]);const fe=objectify($);let ye,be=0;const hasExceededMaxProperties=()=>Number.isInteger(s.maxProperties)&&s.maxProperties>0&&be>=s.maxProperties,canAddProperty=i=>!(Number.isInteger(s.maxProperties)&&s.maxProperties>0)||!hasExceededMaxProperties()&&(!(i=>!Array.isArray(s.required)||0===s.required.length||!s.required.includes(i))(i)||s.maxProperties-be-(()=>{if(!Array.isArray(s.required)||0===s.required.length)return 0;let i=0;return _?s.required.forEach((s=>i+=void 0===de[s]?0:1)):s.required.forEach((s=>{i+=void 0===de[ae]?.find((i=>void 0!==i[s]))?0:1})),s.required.length-i})()>0);if(ye=_?(u,w=void 0)=>{if(s&&fe[u]){if(fe[u].xml=fe[u].xml||{},fe[u].xml.attribute){const s=Array.isArray(fe[u].enum)?random_pick(fe[u].enum):void 0;if(hasExample(fe[u]))P[fe[u].xml.name||u]=extractExample(fe[u]);else if(void 0!==s)P[fe[u].xml.name||u]=s;else{const s=typeCast(fe[u]),i=type_getType(s),_=fe[u].xml.name||u;P[_]=qI[i](s)}return}fe[u].xml.name=fe[u].xml.name||u}else fe[u]||!1===U||(fe[u]={xml:{name:u}});let x=main_sampleFromSchemaGeneric(fe[u],i,w,_);canAddProperty(u)&&(be++,Array.isArray(x)?de[ae]=de[ae].concat(x):de[ae].push(x))}:(u,w)=>{if(canAddProperty(u)){if(EI()(s.discriminator?.mapping)&&s.discriminator.propertyName===u&&\"string\"==typeof s.$$ref){for(const i in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[i])){de[u]=i;break}}else de[u]=main_sampleFromSchemaGeneric(fe[u],i,w,_);be++}},w){let w;if(w=void 0!==u?u:extractExample(s),!_){if(\"number\"==typeof w&&\"string\"===Z)return`${w}`;if(\"string\"!=typeof w||\"string\"===Z)return w;try{return JSON.parse(w)}catch{return w}}if(\"array\"===Z){if(!Array.isArray(w)){if(\"string\"==typeof w)return w;w=[w]}let u=[];return isJSONSchemaObject(Y)&&(Y.xml=Y.xml||B||{},Y.xml.name=Y.xml.name||B.name,u=w.map((s=>main_sampleFromSchemaGeneric(Y,i,s,_)))),isJSONSchemaObject(X)&&(X.xml=X.xml||B||{},X.xml.name=X.xml.name||B.name,u=[main_sampleFromSchemaGeneric(X,i,void 0,_),...u]),u=qI.array(s,{sample:u}),B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P})):de=u,de}if(\"object\"===Z){if(\"string\"==typeof w)return w;for(const s in w)Object.hasOwn(w,s)&&(fe[s]?.readOnly&&!ee||fe[s]?.writeOnly&&!ie||(fe[s]?.xml?.attribute?P[fe[s].xml.name||s]=w[s]:ye(s,w[s])));return gs()(P)||de[ae].push({_attr:P}),de}return de[ae]=gs()(P)?w:[{_attr:P},w],de}if(\"array\"===Z){let u=[];if(isJSONSchemaObject(X))if(_&&(X.xml=X.xml||s.xml||{},X.xml.name=X.xml.name||B.name),Array.isArray(X.anyOf))u.push(...X.anyOf.map((s=>main_sampleFromSchemaGeneric(VI(s,X,i),i,void 0,_))));else if(Array.isArray(X.oneOf))u.push(...X.oneOf.map((s=>main_sampleFromSchemaGeneric(VI(s,X,i),i,void 0,_))));else{if(!(!_||_&&B.wrapped))return main_sampleFromSchemaGeneric(X,i,void 0,_);u.push(main_sampleFromSchemaGeneric(X,i,void 0,_))}if(isJSONSchemaObject(Y))if(_&&(Y.xml=Y.xml||s.xml||{},Y.xml.name=Y.xml.name||B.name),Array.isArray(Y.anyOf))u.push(...Y.anyOf.map((s=>main_sampleFromSchemaGeneric(VI(s,Y,i),i,void 0,_))));else if(Array.isArray(Y.oneOf))u.push(...Y.oneOf.map((s=>main_sampleFromSchemaGeneric(VI(s,Y,i),i,void 0,_))));else{if(!(!_||_&&B.wrapped))return main_sampleFromSchemaGeneric(Y,i,void 0,_);u.push(main_sampleFromSchemaGeneric(Y,i,void 0,_))}return u=qI.array(s,{sample:u}),_&&B.wrapped?(de[ae]=u,gs()(P)||de[ae].push({_attr:P}),de):u}if(\"object\"===Z){for(let s in fe)Object.hasOwn(fe,s)&&(fe[s]?.deprecated||fe[s]?.readOnly&&!ee||fe[s]?.writeOnly&&!ie||ye(s));if(_&&P&&de[ae].push({_attr:P}),hasExceededMaxProperties())return de;if(predicates_isBooleanJSONSchema(U)&&U)_?de[ae].push({additionalProp:\"Anything can be here\"}):de.additionalProp1={},be++;else if(isJSONSchemaObject(U)){const u=U,w=main_sampleFromSchemaGeneric(u,i,void 0,_);if(_&&\"string\"==typeof u?.xml?.name&&\"notagname\"!==u?.xml?.name)de[ae].push(w);else{const i=Number.isInteger(s.minProperties)&&s.minProperties>0&&be<s.minProperties?s.minProperties-be:3;for(let s=1;s<=i;s++){if(hasExceededMaxProperties())return de;if(_){const i={};i[\"additionalProp\"+s]=w.notagname,de[ae].push(i)}else de[\"additionalProp\"+s]=w;be++}}}return de}let _e;if(void 0!==s.const)_e=s.const;else if(s&&Array.isArray(s.enum))_e=random_pick(normalizeArray(s.enum));else{const u=isJSONSchemaObject(s.contentSchema)?main_sampleFromSchemaGeneric(s.contentSchema,i,void 0,_):void 0;_e=qI[Z](s,{sample:u})}return _?(de[ae]=gs()(P)?_e:[{_attr:P},_e],de):_e},main_createXMLExample=(s,i,u)=>{const _=main_sampleFromSchemaGeneric(s,i,u,!0);if(_)return\"string\"==typeof _?_:hs()(_,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(s,i,u)=>main_sampleFromSchemaGeneric(s,i,u,!1),main_resolver=(s,i,u)=>[s,JSON.stringify(i),JSON.stringify(u)],WI=utils_memoizeN(main_createXMLExample,main_resolver),KI=utils_memoizeN(main_sampleFromSchema,main_resolver),HI=[{when:/json/,shouldStringifyTypes:[\"string\"]}],JI=[\"object\"],fn_get_json_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.jsonSchema202012.memoizedSampleFromSchema(i,u,w),P=typeof j,B=HI.reduce(((s,i)=>i.when.test(_)?[...s,...i.shouldStringifyTypes]:s),JI);return bt()(B,(s=>s===P))?JSON.stringify(j,null,2):j},fn_get_yaml_sample_schema=s=>(i,u,_,w)=>{const{fn:x}=s(),j=x.jsonSchema202012.getJsonSampleSchema(i,u,_,w);let P;try{P=so.dump(so.load(j),{lineWidth:-1},{schema:Jn}),\"\\n\"===P[P.length-1]&&(P=P.slice(0,P.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return P.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=s=>(i,u,_)=>{const{fn:w}=s();if(i&&!i.xml&&(i.xml={}),i&&!i.xml.name){if(!i.$$ref&&(i.type||i.items||i.properties||i.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(i.$$ref){let s=i.$$ref.match(/\\S*\\/(\\S+)$/);i.xml.name=s[1]}}return w.jsonSchema202012.memoizedCreateXMLExample(i,u,_)},fn_get_sample_schema=s=>(i,u=\"\",_={},w=void 0)=>{const{fn:x}=s();return\"function\"==typeof i?.toJS&&(i=i.toJS()),\"function\"==typeof w?.toJS&&(w=w.toJS()),/xml/.test(u)?x.jsonSchema202012.getXmlSampleSchema(i,_,w):/(yaml|yml)/.test(u)?x.jsonSchema202012.getYamlSampleSchema(i,_,u,w):x.jsonSchema202012.getJsonSampleSchema(i,_,u,w)},json_schema_2020_12_samples=({getSystem:s})=>{const i=fn_get_json_sample_schema(s),u=fn_get_yaml_sample_schema(s),_=fn_get_xml_sample_schema(s),w=fn_get_sample_schema(s);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleEncoderAPI:NI,sampleFormatAPI:api_formatAPI,sampleMediaTypeAPI:FI,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:KI,memoizedCreateXMLExample:WI,getJsonSampleSchema:i,getYamlSampleSchema:u,getXmlSampleSchema:_,getSampleSchema:w}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const{GIT_DIRTY:GI,GIT_COMMIT:YI,PACKAGE_VERSION:XI,BUILD_TIME:QI}={PACKAGE_VERSION:\"5.12.3\",GIT_COMMIT:\"gc002e597\",GIT_DIRTY:!0,BUILD_TIME:\"Wed, 27 Mar 2024 06:57:29 GMT\"};function SwaggerUI(s){pt.versions=pt.versions||{},pt.versions.swaggerUi={version:XI,gitRevision:YI,gitDirty:GI,buildTimestamp:QI};const i={dom_id:null,domNode:null,spec:{},url:\"\",urls:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:null,filter:null,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:s=>s,responseInterceptor:s=>s,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],pluginsOptions:{pluginLoadType:\"legacy\"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"}};let u=s.queryConfigEnabled?(()=>{let s={},i=pt.location.search;if(!i)return{};if(\"\"!=i){let u=i.substr(1).split(\"&\");for(let i in u)Object.prototype.hasOwnProperty.call(u,i)&&(i=u[i].split(\"=\"),s[decodeURIComponent(i[0])]=i[1]&&decodeURIComponent(i[1])||\"\")}return s})():{};const _=s.domNode;delete s.domNode;const w=ze()({},i,s,u),x={system:{configs:w.configs},plugins:w.presets,pluginsOptions:w.pluginsOptions,state:ze()({layout:{layout:w.layout,filter:w.filter},spec:{spec:\"\",url:w.url},requestSnippets:w.requestSnippets},w.initialState)};if(w.initialState)for(var j in w.initialState)Object.prototype.hasOwnProperty.call(w.initialState,j)&&void 0===w.initialState[j]&&delete x.state[j];var P=new Store(x);P.register([w.plugins,()=>({fn:w.fn,components:w.components,state:w.state})]);var B=P.getSystem();const downloadSpec=s=>{let i=B.specSelectors.getLocalConfig?B.specSelectors.getLocalConfig():{},x=ze()({},i,w,s||{},u);if(_&&(x.domNode=_),P.setConfigs(x),B.configsActions.loaded(),null!==s&&(!u.url&&\"object\"==typeof x.spec&&Object.keys(x.spec).length?(B.specActions.updateUrl(\"\"),B.specActions.updateLoadingStatus(\"success\"),B.specActions.updateSpec(JSON.stringify(x.spec))):B.specActions.download&&x.url&&!x.urls&&(B.specActions.updateUrl(x.url),B.specActions.download(x.url))),x.domNode)B.render(x.domNode,\"App\");else if(x.dom_id){let s=document.querySelector(x.dom_id);B.render(s,\"App\")}else null===x.dom_id||null===x.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\");return B},$=u.config||w.configUrl;return $&&B.specActions&&B.specActions.getConfigByUrl?(B.specActions.getConfigByUrl({url:$,loadRemoteConfig:!0,requestInterceptor:w.requestInterceptor,responseInterceptor:w.responseInterceptor},downloadSpec),B):downloadSpec()}SwaggerUI.System=Store,SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SafeRender:safe_render};const ZI=SwaggerUI})(),module.exports=w.default})();\n//# sourceMappingURL=swagger-ui-es-bundle.js.map"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui-standalone-preset.js",
    "content": "/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */\n!function webpackUniversalModuleDefinition(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.SwaggerUIStandalonePreset=t():e.SwaggerUIStandalonePreset=t()}(this,(()=>(()=>{var e={9119:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\\w+)(^\\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|&colon;)/gim,t.relativeFirstCharacters=[\".\",\"/\"],t.BLANK_URL=\"about:blank\"},6750:(e,t,r)=>{\"use strict\";var n=r(9119)},7526:(e,t)=>{\"use strict\";t.byteLength=function byteLength(e){var t=getLens(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function toByteArray(e){var t,r,o=getLens(e),a=o[0],s=o[1],u=new i(function _byteLength(e,t,r){return 3*(t+r)/4-r}(0,a,s)),c=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function fromByteArray(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(encodeChunk(e,s,s+a>u?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+\"==\")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+\"=\"));return o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function getLens(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function encodeChunk(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},8287:(e,t,r)=>{\"use strict\";const n=r(7526),i=r(251),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(e){+e!=e&&(e=0);return Buffer.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function createBuffer(e){if(e>a)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if(\"string\"==typeof e)return function fromString(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!Buffer.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|byteLength(e,t);let n=createBuffer(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function fromArrayView(e){if(isInstance(e,Uint8Array)){const t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);const i=function fromObject(e){if(Buffer.isBuffer(e)){const t=0|checked(e.length),r=createBuffer(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return fromArrayLike(e.data)}(e);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function assertSize(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){const t=e.length<0?0:0|checked(e.length),r=createBuffer(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,Buffer.prototype),n}function checked(e){if(e>=a)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+a.toString(16)+\" bytes\");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return utf8ToBytes(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return base64ToBytes(e).length;default:if(i)return n?-1:utf8ToBytes(e).length;t=(\"\"+t).toLowerCase(),i=!0}}function slowToString(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return hexSlice(this,t,r);case\"utf8\":case\"utf-8\":return utf8Slice(this,t,r);case\"ascii\":return asciiSlice(this,t,r);case\"latin1\":case\"binary\":return latin1Slice(this,t,r);case\"base64\":return base64Slice(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function swap(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function read(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(read(e,o)===read(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(read(e,o+n)!==read(t,n)){r=!1;break}if(r)return o}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(numberIsNaN(n))return a;e[r+a]=n}return a}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(function asciiToBytes(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(function utf16leToBytes(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function decodeCodePointsArray(e){const t=e.length;if(t<=s)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=s));return r}(n)}t.kMaxLength=a,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?\"string\"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function isBuffer(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function compare(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(e){switch(String(e).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!0;default:return!1}},Buffer.concat=function concat(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=Buffer.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(isInstance(t,Uint8Array))i+t.length>n.length?(Buffer.isBuffer(t)||(t=Buffer.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!Buffer.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function swap32(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function swap64(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function toString(){const e=this.length;return 0===e?\"\":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){let e=\"\";const r=t.INSPECT_MAX_BYTES;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"<Buffer \"+e+\">\"},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(e,t,r,n,i){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==c[e]){o=u[e],a=c[e];break}return o<a?-1:a<o?1:0},Buffer.prototype.includes=function includes(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function indexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function write(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let o=!1;for(;;)switch(n){case\"hex\":return hexWrite(this,e,t,r);case\"utf8\":case\"utf-8\":return utf8Write(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,e,t,r);case\"base64\":return base64Write(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,e,t,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const s=4096;function asciiSlice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function latin1Slice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function hexSlice(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i=\"\";for(let n=t;n<r;++n)i+=f[e[n]];return i}function utf16leSlice(e,t,r){const n=e.slice(t,r);let i=\"\";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(e,t,r,n,i,o){if(!Buffer.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(e,t,r,n,i){checkIntBI(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function wrtBigUInt64BE(e,t,r,n,i){checkIntBI(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function checkIEEE754(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,8),i.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function slice(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,Buffer.prototype),n},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),Buffer.prototype.readIntLE=function readIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function readIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},Buffer.prototype.readInt8=function readInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),Buffer.prototype.readFloatLE=function readFloatLE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},Buffer.prototype.writeIntBE=function writeIntBE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},Buffer.prototype.writeInt8=function writeInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function copy(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},Buffer.prototype.fill=function fill(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!Buffer.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t<128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=Buffer.isBuffer(e)?e:Buffer.from(e,n),a=o.length;if(0===a)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const u={};function E(e,t,r){u[e]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function addNumericalSeparator(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function checkIntBI(e,t,r,n,i,o){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new u.ERR_OUT_OF_RANGE(\"value\",i,e)}!function checkBounds(e,t,r){validateNumber(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||boundsError(t,e.length-(r+1))}(n,i,o)}function validateNumber(e,t){if(\"number\"!=typeof e)throw new u.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function boundsError(e,t,r){if(Math.floor(e)!==e)throw validateNumber(e,r),new u.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new u.ERR_BUFFER_OUT_OF_BOUNDS;throw new u.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(e,t,r){let n=`The value of \"${e}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=addNumericalSeparator(String(r)):\"bigint\"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=addNumericalSeparator(i)),i+=\"n\"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const c=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function base64ToBytes(e){return n.toByteArray(function base64clean(e){if((e=(e=e.split(\"=\")[0]).trim().replace(c,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function blitBuffer(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e}const f=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function defineBigIntMethod(e){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:e}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},2205:function(e,t,r){var n;n=void 0!==r.g?r.g:this,e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var cssEscape=function(e){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var t,r=String(e),n=r.length,i=-1,o=\"\",a=r.charCodeAt(0);++i<n;)0!=(t=r.charCodeAt(i))?o+=t>=1&&t<=31||127==t||0==i&&t>=48&&t<=57||1==i&&t>=48&&t<=57&&45==a?\"\\\\\"+t.toString(16)+\" \":0==i&&1==n&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?\"\\\\\"+r.charAt(i):r.charAt(i):o+=\"�\";return o};return e.CSS||(e.CSS={}),e.CSS.escape=cssEscape,cssEscape}(n)},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*_}},9404:function(e){e.exports=function(){\"use strict\";var e=Array.prototype.slice;function createClass(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function Iterable(e){return isIterable(e)?e:Seq(e)}function KeyedIterable(e){return isKeyed(e)?e:KeyedSeq(e)}function IndexedIterable(e){return isIndexed(e)?e:IndexedSeq(e)}function SetIterable(e){return isIterable(e)&&!isAssociative(e)?e:SetSeq(e)}function isIterable(e){return!(!e||!e[t])}function isKeyed(e){return!(!e||!e[r])}function isIndexed(e){return!(!e||!e[n])}function isAssociative(e){return isKeyed(e)||isIndexed(e)}function isOrdered(e){return!(!e||!e[i])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var t=\"@@__IMMUTABLE_ITERABLE__@@\",r=\"@@__IMMUTABLE_KEYED__@@\",n=\"@@__IMMUTABLE_INDEXED__@@\",i=\"@@__IMMUTABLE_ORDERED__@@\",o=\"delete\",a=5,s=1<<a,u=s-1,c={},f={value:!1},l={value:!1};function MakeRef(e){return e.value=!1,e}function SetRef(e){e&&(e.value=!0)}function OwnerID(){}function arrCopy(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function ensureSize(e){return void 0===e.size&&(e.size=e.__iterate(returnTrue)),e.size}function wrapIndex(e,t){if(\"number\"!=typeof t){var r=t>>>0;if(\"\"+r!==t||4294967295===r)return NaN;t=r}return t<0?ensureSize(e)+t:t}function returnTrue(){return!0}function wholeSlice(e,t,r){return(0===e||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function resolveBegin(e,t){return resolveIndex(e,t,0)}function resolveEnd(e,t){return resolveIndex(e,t,t)}function resolveIndex(e,t,r){return void 0===e?r:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var h=0,p=1,d=2,_=\"function\"==typeof Symbol&&Symbol.iterator,y=\"@@iterator\",m=_||y;function Iterator(e){this.next=e}function iteratorValue(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(e){return!!getIteratorFn(e)}function isIterator(e){return e&&\"function\"==typeof e.next}function getIterator(e){var t=getIteratorFn(e);return t&&t.call(e)}function getIteratorFn(e){var t=e&&(_&&e[_]||e[y]);if(\"function\"==typeof t)return t}function isArrayLike(e){return e&&\"number\"==typeof e.length}function Seq(e){return null==e?emptySequence():isIterable(e)?e.toSeq():seqFromValue(e)}function KeyedSeq(e){return null==e?emptySequence().toKeyedSeq():isIterable(e)?isKeyed(e)?e.toSeq():e.fromEntrySeq():keyedSeqFromValue(e)}function IndexedSeq(e){return null==e?emptySequence():isIterable(e)?isKeyed(e)?e.entrySeq():e.toIndexedSeq():indexedSeqFromValue(e)}function SetSeq(e){return(null==e?emptySequence():isIterable(e)?isKeyed(e)?e.entrySeq():e:indexedSeqFromValue(e)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=h,Iterator.VALUES=p,Iterator.ENTRIES=d,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[m]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(e,t){return seqIterate(this,e,t,!0)},Seq.prototype.__iterator=function(e,t){return seqIterator(this,e,t,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(e,t){return seqIterate(this,e,t,!1)},IndexedSeq.prototype.__iterator=function(e,t){return seqIterator(this,e,t,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var g,v,b,w=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(e){this._array=e,this.size=e.length}function ObjectSeq(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function IterableSeq(e){this._iterable=e,this.size=e.length||e.size}function IteratorSeq(e){this._iterator=e,this._iteratorCache=[]}function isSeq(e){return!(!e||!e[w])}function emptySequence(){return g||(g=new ArraySeq([]))}function keyedSeqFromValue(e){var t=Array.isArray(e)?new ArraySeq(e).fromEntrySeq():isIterator(e)?new IteratorSeq(e).fromEntrySeq():hasIterator(e)?new IterableSeq(e).fromEntrySeq():\"object\"==typeof e?new ObjectSeq(e):void 0;if(!t)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+e);return t}function indexedSeqFromValue(e){var t=maybeIndexedSeqFromValue(e);if(!t)throw new TypeError(\"Expected Array or iterable object of values: \"+e);return t}function seqFromValue(e){var t=maybeIndexedSeqFromValue(e)||\"object\"==typeof e&&new ObjectSeq(e);if(!t)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+e);return t}function maybeIndexedSeqFromValue(e){return isArrayLike(e)?new ArraySeq(e):isIterator(e)?new IteratorSeq(e):hasIterator(e)?new IterableSeq(e):void 0}function seqIterate(e,t,r,n){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[r?o-a:a];if(!1===t(s[1],n?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,r)}function seqIterator(e,t,r,n){var i=e._cache;if(i){var o=i.length-1,a=0;return new Iterator((function(){var e=i[r?o-a:a];return a++>o?iteratorDone():iteratorValue(t,n?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,r)}function fromJS(e,t){return t?fromJSWith(t,e,\"\",{\"\":e}):fromJSDefault(e)}function fromJSWith(e,t,r,n){return Array.isArray(t)?e.call(n,r,IndexedSeq(t).map((function(r,n){return fromJSWith(e,r,n,t)}))):isPlainObj(t)?e.call(n,r,KeyedSeq(t).map((function(r,n){return fromJSWith(e,r,n,t)}))):t}function fromJSDefault(e){return Array.isArray(e)?IndexedSeq(e).map(fromJSDefault).toList():isPlainObj(e)?KeyedSeq(e).map(fromJSDefault).toMap():e}function isPlainObj(e){return e&&(e.constructor===Object||void 0===e.constructor)}function is(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if(\"function\"==typeof e.valueOf&&\"function\"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!(\"function\"!=typeof e.equals||\"function\"!=typeof t.equals||!e.equals(t))}function deepEqual(e,t){if(e===t)return!0;if(!isIterable(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||isKeyed(e)!==isKeyed(t)||isIndexed(e)!==isIndexed(t)||isOrdered(e)!==isOrdered(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!isAssociative(e);if(isOrdered(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&is(i[1],e)&&(r||is(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)\"function\"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate((function(t,n){if(r?!e.has(t):i?!is(t,e.get(n,c)):!is(e.get(n,c),t))return a=!1,!1}));return a&&e.size===s}function Repeat(e,t){if(!(this instanceof Repeat))return new Repeat(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(v)return v;v=this}}function invariant(e,t){if(!e)throw new Error(t)}function Range(e,t,r){if(!(this instanceof Range))return new Range(e,t,r);if(invariant(0!==r,\"Cannot step a Range by 0\"),e=e||0,void 0===t&&(t=1/0),r=void 0===r?1:Math.abs(r),t<e&&(r=-r),this._start=e,this._end=t,this._step=r,this.size=Math.max(0,Math.ceil((t-e)/r-1)+1),0===this.size){if(b)return b;b=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[w]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(e,t){return this.has(e)?this._array[wrapIndex(this,e)]:t},ArraySeq.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===e(r[t?n-i:i],i,this))return i+1;return i},ArraySeq.prototype.__iterator=function(e,t){var r=this._array,n=r.length-1,i=0;return new Iterator((function(){return i>n?iteratorDone():iteratorValue(e,i,r[t?n-i++:i++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ObjectSeq.prototype.has=function(e){return this._object.hasOwnProperty(e)},ObjectSeq.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var a=n[t?i-o:o];if(!1===e(r[a],a,this))return o+1}return o},ObjectSeq.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length-1,o=0;return new Iterator((function(){var a=n[t?i-o:o];return o++>i?iteratorDone():iteratorValue(e,a,r[a])}))},ObjectSeq.prototype[i]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=getIterator(this._iterable),n=0;if(isIterator(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},IterableSeq.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=getIterator(this._iterable);if(!isIterator(r))return new Iterator(iteratorDone);var n=0;return new Iterator((function(){var t=r.next();return t.done?t:iteratorValue(e,n++,t.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(r=n.next()).done;){var a=r.value;if(i[o]=a,!1===e(a,o++,this))break}return o},IteratorSeq.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=this._iterator,n=this._iteratorCache,i=0;return new Iterator((function(){if(i>=n.length){var t=r.next();if(t.done)return t;n[i]=t.value}return iteratorValue(e,i,n[i++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(e,t){return this.has(e)?this._value:t},Repeat.prototype.includes=function(e){return is(this._value,e)},Repeat.prototype.slice=function(e,t){var r=this.size;return wholeSlice(e,t,r)?this:new Repeat(this._value,resolveEnd(t,r)-resolveBegin(e,r))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(e){return is(this._value,e)?0:-1},Repeat.prototype.lastIndexOf=function(e){return is(this._value,e)?this.size:-1},Repeat.prototype.__iterate=function(e,t){for(var r=0;r<this.size;r++)if(!1===e(this._value,r,this))return r+1;return r},Repeat.prototype.__iterator=function(e,t){var r=this,n=0;return new Iterator((function(){return n<r.size?iteratorValue(e,n++,r._value):iteratorDone()}))},Repeat.prototype.equals=function(e){return e instanceof Repeat?is(this._value,e._value):deepEqual(e)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(e,t){return this.has(e)?this._start+wrapIndex(this,e)*this._step:t},Range.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},Range.prototype.slice=function(e,t){return wholeSlice(e,t,this.size)?this:(e=resolveBegin(e,this.size),(t=resolveEnd(t,this.size))<=e?new Range(0,0):new Range(this.get(e,this._end),this.get(t,this._end),this._step))},Range.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},Range.prototype.lastIndexOf=function(e){return this.indexOf(e)},Range.prototype.__iterate=function(e,t){for(var r=this.size-1,n=this._step,i=t?this._start+r*n:this._start,o=0;o<=r;o++){if(!1===e(i,o,this))return o+1;i+=t?-n:n}return o},Range.prototype.__iterator=function(e,t){var r=this.size-1,n=this._step,i=t?this._start+r*n:this._start,o=0;return new Iterator((function(){var a=i;return i+=t?-n:n,o>r?iteratorDone():iteratorValue(e,o++,a)}))},Range.prototype.equals=function(e){return e instanceof Range?this._start===e._start&&this._end===e._end&&this._step===e._step:deepEqual(this,e)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var I=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function smi(e){return e>>>1&1073741824|3221225471&e}function hash(e){if(!1===e||null==e)return 0;if(\"function\"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if(\"number\"===t){if(e!=e||e===1/0)return 0;var r=0|e;for(r!==e&&(r^=4294967295*e);e>4294967295;)r^=e/=4294967295;return smi(r)}if(\"string\"===t)return e.length>j?cachedHashString(e):hashString(e);if(\"function\"==typeof e.hashCode)return e.hashCode();if(\"object\"===t)return hashJSObj(e);if(\"function\"==typeof e.toString)return hashString(e.toString());throw new Error(\"Value type \"+t+\" cannot be hashed.\")}function cachedHashString(e){var t=D[e];return void 0===t&&(t=hashString(e),P===z&&(P=0,D={}),P++,D[e]=t),t}function hashString(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return smi(t)}function hashJSObj(e){var t;if(C&&void 0!==(t=k.get(e)))return t;if(void 0!==(t=e[L]))return t;if(!B){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[L]))return t;if(void 0!==(t=getIENodeHash(e)))return t}if(t=++q,1073741824&q&&(q=0),C)k.set(e,t);else{if(void 0!==x&&!1===x(e))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(B)Object.defineProperty(e,L,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[L]=t;else{if(void 0===e.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");e[L]=t}}return t}var x=Object.isExtensible,B=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(e){return!1}}();function getIENodeHash(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var k,C=\"function\"==typeof WeakMap;C&&(k=new WeakMap);var q=0,L=\"__immutablehash__\";\"function\"==typeof Symbol&&(L=Symbol(L));var j=16,z=255,P=0,D={};function assertNotInfinite(e){invariant(e!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(e){return null==e?emptyMap():isMap(e)&&!isOrdered(e)?e:emptyMap().withMutations((function(t){var r=KeyedIterable(e);assertNotInfinite(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}function isMap(e){return!(!e||!e[W])}createClass(Map,KeyedCollection),Map.of=function(){var t=e.call(arguments,0);return emptyMap().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error(\"Missing value for key: \"+t[r]);e.set(t[r],t[r+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Map.prototype.set=function(e,t){return updateMap(this,e,t)},Map.prototype.setIn=function(e,t){return this.updateIn(e,c,(function(){return t}))},Map.prototype.remove=function(e){return updateMap(this,e,c)},Map.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return c}))},Map.prototype.update=function(e,t,r){return 1===arguments.length?e(this):this.updateIn([e],t,r)},Map.prototype.updateIn=function(e,t,r){r||(r=t,t=void 0);var n=updateInDeepMap(this,forceIterator(e),t,r);return n===c?void 0:n},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(t){return mergeIntoMapWith(this,t,e.call(arguments,1))},Map.prototype.mergeIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,emptyMap(),(function(e){return\"function\"==typeof e.merge?e.merge.apply(e,r):r[r.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(t){var r=e.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(t),r)},Map.prototype.mergeDeepIn=function(t){var r=e.call(arguments,1);return this.updateIn(t,emptyMap(),(function(e){return\"function\"==typeof e.mergeDeep?e.mergeDeep.apply(e,r):r[r.length-1]}))},Map.prototype.sort=function(e){return OrderedMap(sortFactory(this,e))},Map.prototype.sortBy=function(e,t){return OrderedMap(sortFactory(this,t,e))},Map.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(e,t){return new MapIterator(this,e,t)},Map.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},Map.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?makeMap(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Map.isMap=isMap;var U,W=\"@@__IMMUTABLE_MAP__@@\",K=Map.prototype;function ArrayMapNode(e,t){this.ownerID=e,this.entries=t}function BitmapIndexedNode(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r}function HashArrayMapNode(e,t,r){this.ownerID=e,this.count=t,this.nodes=r}function HashCollisionNode(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r}function ValueNode(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r}function MapIterator(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&mapIteratorFrame(e._root)}function mapIteratorValue(e,t){return iteratorValue(e,t[0],t[1])}function mapIteratorFrame(e,t){return{node:e,index:0,__prev:t}}function makeMap(e,t,r,n){var i=Object.create(K);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function emptyMap(){return U||(U=makeMap(0))}function updateMap(e,t,r){var n,i;if(e._root){var o=MakeRef(f),a=MakeRef(l);if(n=updateNode(e._root,e.__ownerID,0,void 0,t,r,o,a),!a.value)return e;i=e.size+(o.value?r===c?-1:1:0)}else{if(r===c)return e;i=1,n=new ArrayMapNode(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?makeMap(i,n):emptyMap()}function updateNode(e,t,r,n,i,o,a,s){return e?e.update(t,r,n,i,o,a,s):o===c?e:(SetRef(s),SetRef(a),new ValueNode(t,n,[i,o]))}function isLeafNode(e){return e.constructor===ValueNode||e.constructor===HashCollisionNode}function mergeIntoNode(e,t,r,n,i){if(e.keyHash===n)return new HashCollisionNode(t,n,[e.entry,i]);var o,s=(0===r?e.keyHash:e.keyHash>>>r)&u,c=(0===r?n:n>>>r)&u;return new BitmapIndexedNode(t,1<<s|1<<c,s===c?[mergeIntoNode(e,t,r+a,n,i)]:(o=new ValueNode(t,n,i),s<c?[e,o]:[o,e]))}function createNodes(e,t,r,n){e||(e=new OwnerID);for(var i=new ValueNode(e,hash(r),[r,n]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function packNodes(e,t,r,n){for(var i=0,o=0,a=new Array(r),s=0,u=1,c=t.length;s<c;s++,u<<=1){var f=t[s];void 0!==f&&s!==n&&(i|=u,a[o++]=f)}return new BitmapIndexedNode(e,i,a)}function expandNodes(e,t,r,n,i){for(var o=0,a=new Array(s),u=0;0!==r;u++,r>>>=1)a[u]=1&r?t[o++]:void 0;return a[n]=i,new HashArrayMapNode(e,o+1,a)}function mergeIntoMapWith(e,t,r){for(var n=[],i=0;i<r.length;i++){var o=r[i],a=KeyedIterable(o);isIterable(o)||(a=a.map((function(e){return fromJS(e)}))),n.push(a)}return mergeIntoCollectionWith(e,t,n)}function deepMerger(e,t,r){return e&&e.mergeDeep&&isIterable(t)?e.mergeDeep(t):is(e,t)?e:t}function deepMergerWith(e){return function(t,r,n){if(t&&t.mergeDeepWith&&isIterable(r))return t.mergeDeepWith(e,r);var i=e(t,r,n);return is(t,i)?t:i}}function mergeIntoCollectionWith(e,t,r){return 0===(r=r.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==r.length?e.withMutations((function(e){for(var n=t?function(r,n){e.update(n,c,(function(e){return e===c?r:t(e,r,n)}))}:function(t,r){e.set(r,t)},i=0;i<r.length;i++)r[i].forEach(n)})):e.constructor(r[0])}function updateInDeepMap(e,t,r,n){var i=e===c,o=t.next();if(o.done){var a=i?r:e,s=n(a);return s===a?e:s}invariant(i||e&&e.set,\"invalid keyPath\");var u=o.value,f=i?c:e.get(u,c),l=updateInDeepMap(f,t,r,n);return l===f?e:l===c?e.remove(u):(i?emptyMap():e).set(u,l)}function popCount(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function setIn(e,t,r,n){var i=n?e:arrCopy(e);return i[t]=r,i}function spliceIn(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=r,a=-1):o[s]=e[s+a];return o}function spliceOut(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),o=0,a=0;a<n;a++)a===t&&(o=1),i[a]=e[a+o];return i}K[W]=!0,K[o]=K.remove,K.removeIn=K.deleteIn,ArrayMapNode.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(is(r,i[o][0]))return i[o][1];return n},ArrayMapNode.prototype.update=function(e,t,r,n,i,o,a){for(var s=i===c,u=this.entries,f=0,l=u.length;f<l&&!is(n,u[f][0]);f++);var h=f<l;if(h?u[f][1]===i:s)return this;if(SetRef(a),(s||!h)&&SetRef(o),!s||1!==u.length){if(!h&&!s&&u.length>=V)return createNodes(e,u,n,i);var p=e&&e===this.ownerID,d=p?u:arrCopy(u);return h?s?f===l-1?d.pop():d[f]=d.pop():d[f]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new ArrayMapNode(e,d)}},BitmapIndexedNode.prototype.get=function(e,t,r,n){void 0===t&&(t=hash(r));var i=1<<((0===e?t:t>>>e)&u),o=this.bitmap;return 0==(o&i)?n:this.nodes[popCount(o&i-1)].get(e+a,t,r,n)},BitmapIndexedNode.prototype.update=function(e,t,r,n,i,o,s){void 0===r&&(r=hash(n));var f=(0===t?r:r>>>t)&u,l=1<<f,h=this.bitmap,p=0!=(h&l);if(!p&&i===c)return this;var d=popCount(h&l-1),_=this.nodes,y=p?_[d]:void 0,m=updateNode(y,e,t+a,r,n,i,o,s);if(m===y)return this;if(!p&&m&&_.length>=$)return expandNodes(e,_,h,f,m);if(p&&!m&&2===_.length&&isLeafNode(_[1^d]))return _[1^d];if(p&&m&&1===_.length&&isLeafNode(m))return m;var g=e&&e===this.ownerID,v=p?m?h:h^l:h|l,b=p?m?setIn(_,d,m,g):spliceOut(_,d,g):spliceIn(_,d,m,g);return g?(this.bitmap=v,this.nodes=b,this):new BitmapIndexedNode(e,v,b)},HashArrayMapNode.prototype.get=function(e,t,r,n){void 0===t&&(t=hash(r));var i=(0===e?t:t>>>e)&u,o=this.nodes[i];return o?o.get(e+a,t,r,n):n},HashArrayMapNode.prototype.update=function(e,t,r,n,i,o,s){void 0===r&&(r=hash(n));var f=(0===t?r:r>>>t)&u,l=i===c,h=this.nodes,p=h[f];if(l&&!p)return this;var d=updateNode(p,e,t+a,r,n,i,o,s);if(d===p)return this;var _=this.count;if(p){if(!d&&--_<H)return packNodes(e,h,_,f)}else _++;var y=e&&e===this.ownerID,m=setIn(h,f,d,y);return y?(this.count=_,this.nodes=m,this):new HashArrayMapNode(e,_,m)},HashCollisionNode.prototype.get=function(e,t,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(is(r,i[o][0]))return i[o][1];return n},HashCollisionNode.prototype.update=function(e,t,r,n,i,o,a){void 0===r&&(r=hash(n));var s=i===c;if(r!==this.keyHash)return s?this:(SetRef(a),SetRef(o),mergeIntoNode(this,e,t,r,[n,i]));for(var u=this.entries,f=0,l=u.length;f<l&&!is(n,u[f][0]);f++);var h=f<l;if(h?u[f][1]===i:s)return this;if(SetRef(a),(s||!h)&&SetRef(o),s&&2===l)return new ValueNode(e,this.keyHash,u[1^f]);var p=e&&e===this.ownerID,d=p?u:arrCopy(u);return h?s?f===l-1?d.pop():d[f]=d.pop():d[f]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new HashCollisionNode(e,this.keyHash,d)},ValueNode.prototype.get=function(e,t,r,n){return is(r,this.entry[0])?this.entry[1]:n},ValueNode.prototype.update=function(e,t,r,n,i,o,a){var s=i===c,u=is(n,this.entry[0]);return(u?i===this.entry[1]:s)?this:(SetRef(a),s?void SetRef(o):u?e&&e===this.ownerID?(this.entry[1]=i,this):new ValueNode(e,this.keyHash,[n,i]):(SetRef(o),mergeIntoNode(this,e,t,hash(n),[n,i])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===e(r[t?i-n:n]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[t?i-n:n];if(o&&!1===o.iterate(e,t))return!1}},ValueNode.prototype.iterate=function(e,t){return e(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r,n=t.node,i=t.index++;if(n.entry){if(0===i)return mapIteratorValue(e,n.entry)}else if(n.entries){if(i<=(r=n.entries.length-1))return mapIteratorValue(e,n.entries[this._reverse?r-i:i])}else if(i<=(r=n.nodes.length-1)){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return mapIteratorValue(e,o.entry);t=this._stack=mapIteratorFrame(o,t)}continue}t=this._stack=this._stack.__prev}return iteratorDone()};var V=s/4,$=s/2,H=s/4;function List(e){var t=emptyList();if(null==e)return t;if(isList(e))return e;var r=IndexedIterable(e),n=r.size;return 0===n?t:(assertNotInfinite(n),n>0&&n<s?makeList(0,n,a,null,new VNode(r.toArray())):t.withMutations((function(e){e.setSize(n),r.forEach((function(t,r){return e.set(r,t)}))})))}function isList(e){return!(!e||!e[Y])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(e,t){if((e=wrapIndex(this,e))>=0&&e<this.size){var r=listNodeFor(this,e+=this._origin);return r&&r.array[e&u]}return t},List.prototype.set=function(e,t){return updateList(this,e,t)},List.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},List.prototype.insert=function(e,t){return this.splice(e,0,t)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=a,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){setListBounds(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){setListBounds(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(t){return mergeIntoListWith(this,t,e.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(t){var r=e.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(t),r)},List.prototype.setSize=function(e){return setListBounds(this,0,e)},List.prototype.slice=function(e,t){var r=this.size;return wholeSlice(e,t,r)?this:setListBounds(this,resolveBegin(e,r),resolveEnd(t,r))},List.prototype.__iterator=function(e,t){var r=0,n=iterateList(this,t);return new Iterator((function(){var t=n();return t===ee?iteratorDone():iteratorValue(e,r++,t)}))},List.prototype.__iterate=function(e,t){for(var r,n=0,i=iterateList(this,t);(r=i())!==ee&&!1!==e(r,n++,this););return n},List.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?makeList(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},List.isList=isList;var Y=\"@@__IMMUTABLE_LIST__@@\",Z=List.prototype;function VNode(e,t){this.array=e,this.ownerID=t}Z[Y]=!0,Z[o]=Z.remove,Z.setIn=K.setIn,Z.deleteIn=Z.removeIn=K.removeIn,Z.update=K.update,Z.updateIn=K.updateIn,Z.mergeIn=K.mergeIn,Z.mergeDeepIn=K.mergeDeepIn,Z.withMutations=K.withMutations,Z.asMutable=K.asMutable,Z.asImmutable=K.asImmutable,Z.wasAltered=K.wasAltered,VNode.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&u;if(n>=this.array.length)return new VNode([],e);var i,o=0===n;if(t>0){var s=this.array[n];if((i=s&&s.removeBefore(e,t-a,r))===s&&o)return this}if(o&&!i)return this;var c=editableVNode(this,e);if(!o)for(var f=0;f<n;f++)c.array[f]=void 0;return i&&(c.array[n]=i),c},VNode.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,i=r-1>>>t&u;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((n=o&&o.removeAfter(e,t-a,r))===o&&i===this.array.length-1)return this}var s=editableVNode(this,e);return s.array.splice(i+1),n&&(s.array[i]=n),s};var J,X,ee={};function iterateList(e,t){var r=e._origin,n=e._capacity,i=getTailOffset(n),o=e._tail;return iterateNodeOrLeaf(e._root,e._level,0);function iterateNodeOrLeaf(e,t,r){return 0===t?iterateLeaf(e,r):iterateNode(e,t,r)}function iterateLeaf(e,a){var u=a===i?o&&o.array:e&&e.array,c=a>r?0:r-a,f=n-a;return f>s&&(f=s),function(){if(c===f)return ee;var e=t?--f:c++;return u&&u[e]}}function iterateNode(e,i,o){var u,c=e&&e.array,f=o>r?0:r-o>>i,l=1+(n-o>>i);return l>s&&(l=s),function(){for(;;){if(u){var e=u();if(e!==ee)return e;u=null}if(f===l)return ee;var r=t?--l:f++;u=iterateNodeOrLeaf(c&&c[r],i-a,o+(r<<i))}}}}function makeList(e,t,r,n,i,o,a){var s=Object.create(Z);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function emptyList(){return J||(J=makeList(0,0,a))}function updateList(e,t,r){if((t=wrapIndex(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?setListBounds(e,t).set(0,r):setListBounds(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,o=MakeRef(l);return t>=getTailOffset(e._capacity)?n=updateVNode(n,e.__ownerID,0,t,r,o):i=updateVNode(i,e.__ownerID,e._level,t,r,o),o.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):makeList(e._origin,e._capacity,e._level,i,n):e}function updateVNode(e,t,r,n,i,o){var s,c=n>>>r&u,f=e&&c<e.array.length;if(!f&&void 0===i)return e;if(r>0){var l=e&&e.array[c],h=updateVNode(l,t,r-a,n,i,o);return h===l?e:((s=editableVNode(e,t)).array[c]=h,s)}return f&&e.array[c]===i?e:(SetRef(o),s=editableVNode(e,t),void 0===i&&c===s.array.length-1?s.array.pop():s.array[c]=i,s)}function editableVNode(e,t){return t&&e&&t===e.ownerID?e:new VNode(e?e.array.slice():[],t)}function listNodeFor(e,t){if(t>=getTailOffset(e._capacity))return e._tail;if(t<1<<e._level+a){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&u],n-=a;return r}}function setListBounds(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new OwnerID,i=e._origin,o=e._capacity,s=i+t,c=void 0===r?o:r<0?o+r:i+r;if(s===i&&c===o)return e;if(s>=c)return e.clear();for(var f=e._level,l=e._root,h=0;s+h<0;)l=new VNode(l&&l.array.length?[void 0,l]:[],n),h+=1<<(f+=a);h&&(s+=h,i+=h,c+=h,o+=h);for(var p=getTailOffset(o),d=getTailOffset(c);d>=1<<f+a;)l=new VNode(l&&l.array.length?[l]:[],n),f+=a;var _=e._tail,y=d<p?listNodeFor(e,c-1):d>p?new VNode([],n):_;if(_&&d>p&&s<o&&_.array.length){for(var m=l=editableVNode(l,n),g=f;g>a;g-=a){var v=p>>>g&u;m=m.array[v]=editableVNode(m.array[v],n)}m.array[p>>>a&u]=_}if(c<o&&(y=y&&y.removeAfter(n,0,c)),s>=d)s-=d,c-=d,f=a,l=null,y=y&&y.removeBefore(n,0,s);else if(s>i||d<p){for(h=0;l;){var b=s>>>f&u;if(b!==d>>>f&u)break;b&&(h+=(1<<f)*b),f-=a,l=l.array[b]}l&&s>i&&(l=l.removeBefore(n,f,s-h)),l&&d<p&&(l=l.removeAfter(n,f,d-h)),h&&(s-=h,c-=h)}return e.__ownerID?(e.size=c-s,e._origin=s,e._capacity=c,e._level=f,e._root=l,e._tail=y,e.__hash=void 0,e.__altered=!0,e):makeList(s,c,f,l,y)}function mergeIntoListWith(e,t,r){for(var n=[],i=0,o=0;o<r.length;o++){var a=r[o],s=IndexedIterable(a);s.size>i&&(i=s.size),isIterable(a)||(s=s.map((function(e){return fromJS(e)}))),n.push(s)}return i>e.size&&(e=e.setSize(i)),mergeIntoCollectionWith(e,t,n)}function getTailOffset(e){return e<s?0:e-1>>>a<<a}function OrderedMap(e){return null==e?emptyOrderedMap():isOrderedMap(e)?e:emptyOrderedMap().withMutations((function(t){var r=KeyedIterable(e);assertNotInfinite(r.size),r.forEach((function(e,r){return t.set(r,e)}))}))}function isOrderedMap(e){return isMap(e)&&isOrdered(e)}function makeOrderedMap(e,t,r,n){var i=Object.create(OrderedMap.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i}function emptyOrderedMap(){return X||(X=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(e,t,r){var n,i,o=e._map,a=e._list,u=o.get(t),f=void 0!==u;if(r===c){if(!f)return e;a.size>=s&&a.size>=2*o.size?(n=(i=a.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(f){if(r===a.get(u)[1])return e;n=o,i=a.set(u,[t,r])}else n=o.set(t,a.size),i=a.set(a.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e):makeOrderedMap(n,i)}function ToKeyedSequence(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ToIndexedSequence(e){this._iter=e,this.size=e.size}function ToSetSequence(e){this._iter=e,this.size=e.size}function FromEntriesSequence(e){this._iter=e,this.size=e.size}function flipFactory(e){var t=makeSequence(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=cacheResultThrough,t.__iterateUncached=function(t,r){var n=this;return e.__iterate((function(e,r){return!1!==t(r,e,n)}),r)},t.__iteratorUncached=function(t,r){if(t===d){var n=e.__iterator(t,r);return new Iterator((function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===p?h:p,r)},t}function mapFactory(e,t,r){var n=makeSequence(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,i){var o=e.get(n,c);return o===c?i:t.call(r,o,n,e)},n.__iterateUncached=function(n,i){var o=this;return e.__iterate((function(e,i,a){return!1!==n(t.call(r,e,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=e.__iterator(d,i);return new Iterator((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return iteratorValue(n,s,t.call(r,a[1],s,e),i)}))},n}function reverseFactory(e,t){var r=makeSequence(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=flipFactory(e);return t.reverse=function(){return e.flip()},t}),r.get=function(r,n){return e.get(t?r:-1-r,n)},r.has=function(r){return e.has(t?r:-1-r)},r.includes=function(t){return e.includes(t)},r.cacheResult=cacheResultThrough,r.__iterate=function(t,r){var n=this;return e.__iterate((function(e,r){return t(e,r,n)}),!r)},r.__iterator=function(t,r){return e.__iterator(t,!r)},r}function filterFactory(e,t,r,n){var i=makeSequence(e);return n&&(i.has=function(n){var i=e.get(n,c);return i!==c&&!!t.call(r,i,n,e)},i.get=function(n,i){var o=e.get(n,c);return o!==c&&t.call(r,o,n,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,u){if(t.call(r,e,o,u))return s++,i(e,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(d,o),s=0;return new Iterator((function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(t.call(r,f,c,e))return iteratorValue(i,n?c:s++,f,o)}}))},i}function countByFactory(e,t,r){var n=Map().asMutable();return e.__iterate((function(i,o){n.update(t.call(r,i,o,e),0,(function(e){return e+1}))})),n.asImmutable()}function groupByFactory(e,t,r){var n=isKeyed(e),i=(isOrdered(e)?OrderedMap():Map()).asMutable();e.__iterate((function(o,a){i.update(t.call(r,o,a,e),(function(e){return(e=e||[]).push(n?[a,o]:o),e}))}));var o=iterableClass(e);return i.map((function(t){return reify(e,o(t))}))}function sliceFactory(e,t,r,n){var i=e.size;if(void 0!==t&&(t|=0),void 0!==r&&(r===1/0?r=i:r|=0),wholeSlice(t,r,i))return e;var o=resolveBegin(t,i),a=resolveEnd(r,i);if(o!=o||a!=a)return sliceFactory(e.toSeq().cacheResult(),t,r,n);var s,u=a-o;u==u&&(s=u<0?0:u);var c=makeSequence(e);return c.size=0===s?s:e.size&&s||void 0,!n&&isSeq(e)&&s>=0&&(c.get=function(t,r){return(t=wrapIndex(this,t))>=0&&t<s?e.get(t+o,r):r}),c.__iterateUncached=function(t,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(t,r);var a=0,u=!0,c=0;return e.__iterate((function(e,r){if(!u||!(u=a++<o))return c++,!1!==t(e,n?r:c-1,i)&&c!==s})),c},c.__iteratorUncached=function(t,r){if(0!==s&&r)return this.cacheResult().__iterator(t,r);var i=0!==s&&e.__iterator(t,r),a=0,u=0;return new Iterator((function(){for(;a++<o;)i.next();if(++u>s)return iteratorDone();var e=i.next();return n||t===p?e:iteratorValue(t,u-1,t===h?void 0:e.value[1],e)}))},c}function takeWhileFactory(e,t,r){var n=makeSequence(e);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return e.__iterate((function(e,i,s){return t.call(r,e,i,s)&&++a&&n(e,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=e.__iterator(d,i),s=!0;return new Iterator((function(){if(!s)return iteratorDone();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(r,c,u,o)?n===d?e:iteratorValue(n,u,c,e):(s=!1,iteratorDone())}))},n}function skipWhileFactory(e,t,r,n){var i=makeSequence(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate((function(e,o,c){if(!s||!(s=t.call(r,e,o,c)))return u++,i(e,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(d,o),u=!0,c=0;return new Iterator((function(){var e,o,f;do{if((e=s.next()).done)return n||i===p?e:iteratorValue(i,c++,i===h?void 0:e.value[1],e);var l=e.value;o=l[0],f=l[1],u&&(u=t.call(r,f,o,a))}while(u);return i===d?e:iteratorValue(i,o,f,e)}))},i}function concatFactory(e,t){var r=isKeyed(e),n=[e].concat(t).map((function(e){return isIterable(e)?r&&(e=KeyedIterable(e)):e=r?keyedSeqFromValue(e):indexedSeqFromValue(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===n.length)return e;if(1===n.length){var i=n[0];if(i===e||r&&isKeyed(i)||isIndexed(e)&&isIndexed(i))return i}var o=new ArraySeq(n);return r?o=o.toKeyedSeq():isIndexed(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}}),0),o}function flattenFactory(e,t,r){var n=makeSequence(e);return n.__iterateUncached=function(n,i){var o=0,a=!1;function flatDeep(e,s){var u=this;e.__iterate((function(e,i){return(!t||s<t)&&isIterable(e)?flatDeep(e,s+1):!1===n(e,r?i:o++,u)&&(a=!0),!a}),i)}return flatDeep(e,0),o},n.__iteratorUncached=function(n,i){var o=e.__iterator(n,i),a=[],s=0;return new Iterator((function(){for(;o;){var e=o.next();if(!1===e.done){var u=e.value;if(n===d&&(u=u[1]),t&&!(a.length<t)||!isIterable(u))return r?e:iteratorValue(n,s++,u,e);a.push(o),o=u.__iterator(n,i)}else o=a.pop()}return iteratorDone()}))},n}function flatMapFactory(e,t,r){var n=iterableClass(e);return e.toSeq().map((function(i,o){return n(t.call(r,i,o,e))})).flatten(!0)}function interposeFactory(e,t){var r=makeSequence(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return e.__iterate((function(e,n){return(!o||!1!==r(t,o++,i))&&!1!==r(e,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=e.__iterator(p,n),a=0;return new Iterator((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?iteratorValue(r,a++,t):iteratorValue(r,a++,i.value,i)}))},r}function sortFactory(e,t,r){t||(t=defaultComparator);var n=isKeyed(e),i=0,o=e.toSeq().map((function(t,n){return[n,t,i++,r?r(t,n,e):t]})).toArray();return o.sort((function(e,r){return t(e[3],r[3])||e[2]-r[2]})).forEach(n?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),n?KeyedSeq(o):isIndexed(e)?IndexedSeq(o):SetSeq(o)}function maxFactory(e,t,r){if(t||(t=defaultComparator),r){var n=e.toSeq().map((function(t,n){return[t,r(t,n,e)]})).reduce((function(e,r){return maxCompare(t,e[1],r[1])?r:e}));return n&&n[0]}return e.reduce((function(e,r){return maxCompare(t,e,r)?r:e}))}function maxCompare(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0}function zipWithFactory(e,t,r){var n=makeSequence(e);return n.size=new ArraySeq(r).map((function(e){return e.size})).min(),n.__iterate=function(e,t){for(var r,n=this.__iterator(p,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},n.__iteratorUncached=function(e,n){var i=r.map((function(e){return e=Iterable(e),getIterator(n?e.reverse():e)})),o=0,a=!1;return new Iterator((function(){var r;return a||(r=i.map((function(e){return e.next()})),a=r.some((function(e){return e.done}))),a?iteratorDone():iteratorValue(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},n}function reify(e,t){return isSeq(e)?t:e.constructor(t)}function validateEntry(e){if(e!==Object(e))throw new TypeError(\"Expected [K, V] tuple: \"+e)}function resolveSize(e){return assertNotInfinite(e.size),ensureSize(e)}function iterableClass(e){return isKeyed(e)?KeyedIterable:isIndexed(e)?IndexedIterable:SetIterable}function makeSequence(e){return Object.create((isKeyed(e)?KeyedSeq:isIndexed(e)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(e,t){return e>t?1:e<t?-1:0}function forceIterator(e){var t=getIterator(e);if(!t){if(!isArrayLike(e))throw new TypeError(\"Expected iterable or array-like: \"+e);t=getIterator(Iterable(e))}return t}function Record(e,t){var r,n=function Record(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var a=Object.keys(e);setProps(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Map(o)},i=n.prototype=Object.create(te);return i.constructor=n,n}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(e,t){return updateOrderedMap(this,e,t)},OrderedMap.prototype.remove=function(e){return updateOrderedMap(this,e,c)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],r)}),t)},OrderedMap.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},OrderedMap.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?makeOrderedMap(t,r,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=r,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[i]=!0,OrderedMap.prototype[o]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(e,t){return this._iter.get(e,t)},ToKeyedSequence.prototype.has=function(e){return this._iter.has(e)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var e=this,t=reverseFactory(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},ToKeyedSequence.prototype.map=function(e,t){var r=this,n=mapFactory(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},ToKeyedSequence.prototype.__iterate=function(e,t){var r,n=this;return this._iter.__iterate(this._useKeys?function(t,r){return e(t,r,n)}:(r=t?resolveSize(this):0,function(i){return e(i,t?--r:r++,n)}),t)},ToKeyedSequence.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var r=this._iter.__iterator(p,t),n=t?resolveSize(this):0;return new Iterator((function(){var i=r.next();return i.done?i:iteratorValue(e,t?--n:n++,i.value,i)}))},ToKeyedSequence.prototype[i]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(e){return this._iter.includes(e)},ToIndexedSequence.prototype.__iterate=function(e,t){var r=this,n=0;return this._iter.__iterate((function(t){return e(t,n++,r)}),t)},ToIndexedSequence.prototype.__iterator=function(e,t){var r=this._iter.__iterator(p,t),n=0;return new Iterator((function(){var t=r.next();return t.done?t:iteratorValue(e,n++,t.value,t)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(e){return this._iter.includes(e)},ToSetSequence.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){return e(t,t,r)}),t)},ToSetSequence.prototype.__iterator=function(e,t){var r=this._iter.__iterator(p,t);return new Iterator((function(){var t=r.next();return t.done?t:iteratorValue(e,t.value,t.value,t)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t){if(t){validateEntry(t);var n=isIterable(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}}),t)},FromEntriesSequence.prototype.__iterator=function(e,t){var r=this._iter.__iterator(p,t);return new Iterator((function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){validateEntry(n);var i=isIterable(n);return iteratorValue(e,i?n.get(0):n[0],i?n.get(1):n[1],t)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Record.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._defaultValues[e];return this._map?this._map.get(e,r):r},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key \"'+e+'\" on '+recordName(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:makeRecord(this,r)},Record.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:makeRecord(this,t)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(e,t){var r=this;return KeyedIterable(this._defaultValues).map((function(e,t){return r.get(t)})).__iterator(e,t)},Record.prototype.__iterate=function(e,t){var r=this;return KeyedIterable(this._defaultValues).map((function(e,t){return r.get(t)})).__iterate(e,t)},Record.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?makeRecord(this,t,e):(this.__ownerID=e,this._map=t,this)};var te=Record.prototype;function makeRecord(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._map=t,n.__ownerID=r,n}function recordName(e){return e._name||e.constructor.name||\"Record\"}function setProps(e,t){try{t.forEach(setProp.bind(void 0,e))}catch(e){}}function setProp(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(t,e)}})}function Set(e){return null==e?emptySet():isSet(e)&&!isOrdered(e)?e:emptySet().withMutations((function(t){var r=SetIterable(e);assertNotInfinite(r.size),r.forEach((function(e){return t.add(e)}))}))}function isSet(e){return!(!e||!e[ne])}te[o]=te.remove,te.deleteIn=te.removeIn=K.removeIn,te.merge=K.merge,te.mergeWith=K.mergeWith,te.mergeIn=K.mergeIn,te.mergeDeep=K.mergeDeep,te.mergeDeepWith=K.mergeDeepWith,te.mergeDeepIn=K.mergeDeepIn,te.setIn=K.setIn,te.update=K.update,te.updateIn=K.updateIn,te.withMutations=K.withMutations,te.asMutable=K.asMutable,te.asImmutable=K.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(e){return this(KeyedIterable(e).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(e){return this._map.has(e)},Set.prototype.add=function(e){return updateSet(this,this._map.set(e,!0))},Set.prototype.remove=function(e){return updateSet(this,this._map.remove(e))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var r=0;r<t.length;r++)SetIterable(t[r]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},Set.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return SetIterable(e)}));var r=this;return this.withMutations((function(e){r.forEach((function(r){t.every((function(e){return e.includes(r)}))||e.remove(r)}))}))},Set.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return SetIterable(e)}));var r=this;return this.withMutations((function(e){r.forEach((function(r){t.some((function(e){return e.includes(r)}))&&e.remove(r)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(t){var r=e.call(arguments,1);return this.union.apply(this,r)},Set.prototype.sort=function(e){return OrderedSet(sortFactory(this,e))},Set.prototype.sortBy=function(e,t){return OrderedSet(sortFactory(this,t,e))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate((function(t,n){return e(n,n,r)}),t)},Set.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},Set.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Set.isSet=isSet;var re,ne=\"@@__IMMUTABLE_SET__@@\",ie=Set.prototype;function updateSet(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function makeSet(e,t){var r=Object.create(ie);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function emptySet(){return re||(re=makeSet(emptyMap()))}function OrderedSet(e){return null==e?emptyOrderedSet():isOrderedSet(e)?e:emptyOrderedSet().withMutations((function(t){var r=SetIterable(e);assertNotInfinite(r.size),r.forEach((function(e){return t.add(e)}))}))}function isOrderedSet(e){return isSet(e)&&isOrdered(e)}ie[ne]=!0,ie[o]=ie.remove,ie.mergeDeep=ie.merge,ie.mergeDeepWith=ie.mergeWith,ie.withMutations=K.withMutations,ie.asMutable=K.asMutable,ie.asImmutable=K.asImmutable,ie.__empty=emptySet,ie.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(e){return this(KeyedIterable(e).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var oe,ae=OrderedSet.prototype;function makeOrderedSet(e,t){var r=Object.create(ae);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function emptyOrderedSet(){return oe||(oe=makeOrderedSet(emptyOrderedMap()))}function Stack(e){return null==e?emptyStack():isStack(e)?e:emptyStack().unshiftAll(e)}function isStack(e){return!(!e||!e[ue])}ae[i]=!0,ae.__empty=emptyOrderedSet,ae.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(e,t){var r=this._head;for(e=wrapIndex(this,e);r&&e--;)r=r.next;return r?r.value:t},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,r=arguments.length-1;r>=0;r--)t={value:arguments[r],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):makeStack(e,t)},Stack.prototype.pushAll=function(e){if(0===(e=IndexedIterable(e)).size)return this;assertNotInfinite(e.size);var t=this.size,r=this._head;return e.reverse().forEach((function(e){t++,r={value:e,next:r}})),this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):makeStack(t,r)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(e){return this.pushAll(e)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(e,t){if(wholeSlice(e,t,this.size))return this;var r=resolveBegin(e,this.size);if(resolveEnd(t,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,e,t);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(n,i)},Stack.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?makeStack(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Stack.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var r=0,n=this._head;n&&!1!==e(n.value,r++,this);)n=n.next;return r},Stack.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var r=0,n=this._head;return new Iterator((function(){if(n){var t=n.value;return n=n.next,iteratorValue(e,r++,t)}return iteratorDone()}))},Stack.isStack=isStack;var se,ue=\"@@__IMMUTABLE_STACK__@@\",ce=Stack.prototype;function makeStack(e,t,r,n){var i=Object.create(ce);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function emptyStack(){return se||(se=makeStack(0))}function mixin(e,t){var keyCopier=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(keyCopier),e}ce[ue]=!0,ce.withMutations=K.withMutations,ce.asMutable=K.asMutable,ce.asImmutable=K.asImmutable,ce.wasAltered=K.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,r){e[r]=t})),e},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(e){return e&&\"function\"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&\"function\"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var e={};return this.__iterate((function(t,r){e[r]=t})),e},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(e,t){return 0===this.size?e+t:e+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+t},concat:function(){return reify(this,concatFactory(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return is(t,e)}))},entries:function(){return this.__iterator(d)},every:function(e,t){assertNotInfinite(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!e.call(t,n,i,o))return r=!1,!1})),r},filter:function(e,t){return reify(this,filterFactory(this,e,t,!0))},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return assertNotInfinite(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){assertNotInfinite(this.size),e=void 0!==e?\"\"+e:\",\";var t=\"\",r=!0;return this.__iterate((function(n){r?r=!1:t+=e,t+=null!=n?n.toString():\"\"})),t},keys:function(){return this.__iterator(h)},map:function(e,t){return reify(this,mapFactory(this,e,t))},reduce:function(e,t,r){var n,i;return assertNotInfinite(this.size),arguments.length<2?i=!0:n=t,this.__iterate((function(t,o,a){i?(i=!1,n=t):n=e.call(r,n,t,o,a)})),n},reduceRight:function(e,t,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(e,t){return reify(this,sliceFactory(this,e,t,!0))},some:function(e,t){return!this.every(not(e),t)},sort:function(e){return reify(this,sortFactory(this,e))},values:function(){return this.__iterator(p)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return ensureSize(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return countByFactory(this,e,t)},equals:function(e){return deepEqual(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ArraySeq(e._cache);var t=e.toSeq().map(entryMapper).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(not(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate((function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1})),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(returnTrue)},flatMap:function(e,t){return reify(this,flatMapFactory(this,e,t))},flatten:function(e){return reify(this,flattenFactory(this,e,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(e,t){return this.find((function(t,r){return is(r,e)}),void 0,t)},getIn:function(e,t){for(var r,n=this,i=forceIterator(e);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,c):c)===c)return t}return n},groupBy:function(e,t){return groupByFactory(this,e,t)},has:function(e){return this.get(e,c)!==c},hasIn:function(e){return this.getIn(e,c)!==c},isSubset:function(e){return e=\"function\"==typeof e.includes?e:Iterable(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e=\"function\"==typeof e.isSubset?e:Iterable(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return is(t,e)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return maxFactory(this,e)},maxBy:function(e,t){return maxFactory(this,t,e)},min:function(e){return maxFactory(this,e?neg(e):defaultNegComparator)},minBy:function(e,t){return maxFactory(this,t?neg(t):defaultNegComparator,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return reify(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return reify(this,skipWhileFactory(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(not(e),t)},sortBy:function(e,t){return reify(this,sortFactory(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return reify(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return reify(this,takeWhileFactory(this,e,t))},takeUntil:function(e,t){return this.takeWhile(not(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var fe=Iterable.prototype;fe[t]=!0,fe[m]=fe.values,fe.__toJS=fe.toArray,fe.__toStringMapper=quoteString,fe.inspect=fe.toSource=function(){return this.toString()},fe.chain=fe.flatMap,fe.contains=fe.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(e,t){var r=this,n=0;return reify(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return reify(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var le=KeyedIterable.prototype;function keyMapper(e,t){return t}function entryMapper(e,t){return[t,e]}function not(e){return function(){return!e.apply(this,arguments)}}function neg(e){return function(){return-e.apply(this,arguments)}}function quoteString(e){return\"string\"==typeof e?JSON.stringify(e):String(e)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(e,t){return e<t?1:e>t?-1:0}function hashIterable(e){if(e.size===1/0)return 0;var t=isOrdered(e),r=isKeyed(e),n=t?1:0;return murmurHashOfSize(e.__iterate(r?t?function(e,t){n=31*n+hashMerge(hash(e),hash(t))|0}:function(e,t){n=n+hashMerge(hash(e),hash(t))|0}:t?function(e){n=31*n+hash(e)|0}:function(e){n=n+hash(e)|0}),n)}function murmurHashOfSize(e,t){return t=I(t,3432918353),t=I(t<<15|t>>>-15,461845907),t=I(t<<13|t>>>-13,5),t=I((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=smi((t=I(t^t>>>13,3266489909))^t>>>16)}function hashMerge(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return le[r]=!0,le[m]=fe.entries,le.__toJS=fe.toObject,le.__toStringMapper=function(e,t){return JSON.stringify(t)+\": \"+quoteString(e)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(e,t){return reify(this,filterFactory(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(e,t){return reify(this,sliceFactory(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(0|t,0),0===r||2===r&&!t)return this;e=resolveBegin(e,e<0?this.count():this.size);var n=this.slice(0,e);return reify(this,1===r?n:n.concat(arrCopy(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(e){return reify(this,flattenFactory(this,e,!1))},get:function(e,t){return(e=wrapIndex(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=wrapIndex(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return reify(this,interposeFactory(this,e))},interleave:function(){var e=[this].concat(arrCopy(arguments)),t=zipWithFactory(this.toSeq(),IndexedSeq.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),reify(this,r)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return reify(this,skipWhileFactory(this,e,t,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(e){var t=arrCopy(arguments);return t[0]=this,reify(this,zipWithFactory(this,e,t))}}),IndexedIterable.prototype[n]=!0,IndexedIterable.prototype[i]=!0,mixin(SetIterable,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=fe.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},6698:e=>{\"function\"==typeof Object.create?e.exports=function inherits(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype,e.prototype=new TempCtor,e.prototype.constructor=e}}},5580:(e,t,r)=>{var n=r(6110)(r(9325),\"DataView\");e.exports=n},1549:(e,t,r)=>{var n=r(2032),i=r(3862),o=r(6721),a=r(2749),s=r(5749);function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash.prototype.clear=n,Hash.prototype.delete=i,Hash.prototype.get=o,Hash.prototype.has=a,Hash.prototype.set=s,e.exports=Hash},79:(e,t,r)=>{var n=r(3702),i=r(80),o=r(4739),a=r(8655),s=r(1175);function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache.prototype.clear=n,ListCache.prototype.delete=i,ListCache.prototype.get=o,ListCache.prototype.has=a,ListCache.prototype.set=s,e.exports=ListCache},8223:(e,t,r)=>{var n=r(6110)(r(9325),\"Map\");e.exports=n},3661:(e,t,r)=>{var n=r(3040),i=r(7670),o=r(289),a=r(4509),s=r(2949);function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache.prototype.clear=n,MapCache.prototype.delete=i,MapCache.prototype.get=o,MapCache.prototype.has=a,MapCache.prototype.set=s,e.exports=MapCache},2804:(e,t,r)=>{var n=r(6110)(r(9325),\"Promise\");e.exports=n},6545:(e,t,r)=>{var n=r(6110)(r(9325),\"Set\");e.exports=n},8859:(e,t,r)=>{var n=r(3661),i=r(1380),o=r(1459);function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=i,SetCache.prototype.has=o,e.exports=SetCache},7217:(e,t,r)=>{var n=r(79),i=r(1420),o=r(938),a=r(3605),s=r(9817),u=r(945);function Stack(e){var t=this.__data__=new n(e);this.size=t.size}Stack.prototype.clear=i,Stack.prototype.delete=o,Stack.prototype.get=a,Stack.prototype.has=s,Stack.prototype.set=u,e.exports=Stack},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},7828:(e,t,r)=>{var n=r(9325).Uint8Array;e.exports=n},8303:(e,t,r)=>{var n=r(6110)(r(9325),\"WeakMap\");e.exports=n},9770:e=>{e.exports=function arrayFilter(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}},695:(e,t,r)=>{var n=r(8096),i=r(2428),o=r(6449),a=r(3656),s=r(361),u=r(7167),c=Object.prototype.hasOwnProperty;e.exports=function arrayLikeKeys(e,t){var r=o(e),f=!r&&i(e),l=!r&&!f&&a(e),h=!r&&!f&&!l&&u(e),p=r||f||l||h,d=p?n(e.length,String):[],_=d.length;for(var y in e)!t&&!c.call(e,y)||p&&(\"length\"==y||l&&(\"offset\"==y||\"parent\"==y)||h&&(\"buffer\"==y||\"byteLength\"==y||\"byteOffset\"==y)||s(y,_))||d.push(y);return d}},4932:e=>{e.exports=function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},4528:e=>{e.exports=function arrayPush(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},882:e=>{e.exports=function arrayReduce(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}},4248:e=>{e.exports=function arraySome(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},1074:e=>{e.exports=function asciiToArray(e){return e.split(\"\")}},1733:e=>{var t=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;e.exports=function asciiWords(e){return e.match(t)||[]}},6547:(e,t,r)=>{var n=r(3360),i=r(5288),o=Object.prototype.hasOwnProperty;e.exports=function assignValue(e,t,r){var a=e[t];o.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025:(e,t,r)=>{var n=r(5288);e.exports=function assocIndexOf(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},3360:(e,t,r)=>{var n=r(3243);e.exports=function baseAssignValue(e,t,r){\"__proto__\"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},909:(e,t,r)=>{var n=r(641),i=r(8329)(n);e.exports=i},2523:e=>{e.exports=function baseFindIndex(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},6649:(e,t,r)=>{var n=r(3221)();e.exports=n},641:(e,t,r)=>{var n=r(6649),i=r(5950);e.exports=function baseForOwn(e,t){return e&&n(e,t,i)}},7422:(e,t,r)=>{var n=r(1769),i=r(7797);e.exports=function baseGet(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},2199:(e,t,r)=>{var n=r(4528),i=r(6449);e.exports=function baseGetAllKeys(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},2552:(e,t,r)=>{var n=r(1873),i=r(659),o=r(9350),a=n?n.toStringTag:void 0;e.exports=function baseGetTag(e){return null==e?void 0===e?\"[object Undefined]\":\"[object Null]\":a&&a in Object(e)?i(e):o(e)}},8077:e=>{e.exports=function baseHasIn(e,t){return null!=e&&t in Object(e)}},7534:(e,t,r)=>{var n=r(2552),i=r(346);e.exports=function baseIsArguments(e){return i(e)&&\"[object Arguments]\"==n(e)}},270:(e,t,r)=>{var n=r(7068),i=r(346);e.exports=function baseIsEqual(e,t,r,o,a){return e===t||(null==e||null==t||!i(e)&&!i(t)?e!=e&&t!=t:n(e,t,r,o,baseIsEqual,a))}},7068:(e,t,r)=>{var n=r(7217),i=r(5911),o=r(1986),a=r(689),s=r(5861),u=r(6449),c=r(3656),f=r(7167),l=\"[object Arguments]\",h=\"[object Array]\",p=\"[object Object]\",d=Object.prototype.hasOwnProperty;e.exports=function baseIsEqualDeep(e,t,r,_,y,m){var g=u(e),v=u(t),b=g?h:s(e),w=v?h:s(t),I=(b=b==l?p:b)==p,x=(w=w==l?p:w)==p,B=b==w;if(B&&c(e)){if(!c(t))return!1;g=!0,I=!1}if(B&&!I)return m||(m=new n),g||f(e)?i(e,t,r,_,y,m):o(e,t,b,r,_,y,m);if(!(1&r)){var k=I&&d.call(e,\"__wrapped__\"),C=x&&d.call(t,\"__wrapped__\");if(k||C){var q=k?e.value():e,L=C?t.value():t;return m||(m=new n),y(q,L,r,_,m)}}return!!B&&(m||(m=new n),a(e,t,r,_,y,m))}},1799:(e,t,r)=>{var n=r(7217),i=r(270);e.exports=function baseIsMatch(e,t,r,o){var a=r.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var f=(c=r[a])[0],l=e[f],h=c[1];if(u&&c[2]){if(void 0===l&&!(f in e))return!1}else{var p=new n;if(o)var d=o(l,h,f,e,t,p);if(!(void 0===d?i(h,l,3,o,p):d))return!1}}return!0}},5083:(e,t,r)=>{var n=r(1882),i=r(7296),o=r(3805),a=r(7473),s=/^\\[object .+?Constructor\\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,l=c.hasOwnProperty,h=RegExp(\"^\"+f.call(l).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");e.exports=function baseIsNative(e){return!(!o(e)||i(e))&&(n(e)?h:s).test(a(e))}},4901:(e,t,r)=>{var n=r(2552),i=r(294),o=r(346),a={};a[\"[object Float32Array]\"]=a[\"[object Float64Array]\"]=a[\"[object Int8Array]\"]=a[\"[object Int16Array]\"]=a[\"[object Int32Array]\"]=a[\"[object Uint8Array]\"]=a[\"[object Uint8ClampedArray]\"]=a[\"[object Uint16Array]\"]=a[\"[object Uint32Array]\"]=!0,a[\"[object Arguments]\"]=a[\"[object Array]\"]=a[\"[object ArrayBuffer]\"]=a[\"[object Boolean]\"]=a[\"[object DataView]\"]=a[\"[object Date]\"]=a[\"[object Error]\"]=a[\"[object Function]\"]=a[\"[object Map]\"]=a[\"[object Number]\"]=a[\"[object Object]\"]=a[\"[object RegExp]\"]=a[\"[object Set]\"]=a[\"[object String]\"]=a[\"[object WeakMap]\"]=!1,e.exports=function baseIsTypedArray(e){return o(e)&&i(e.length)&&!!a[n(e)]}},5389:(e,t,r)=>{var n=r(3663),i=r(7978),o=r(3488),a=r(6449),s=r(583);e.exports=function baseIteratee(e){return\"function\"==typeof e?e:null==e?o:\"object\"==typeof e?a(e)?i(e[0],e[1]):n(e):s(e)}},8984:(e,t,r)=>{var n=r(5527),i=r(3650),o=Object.prototype.hasOwnProperty;e.exports=function baseKeys(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&\"constructor\"!=r&&t.push(r);return t}},3663:(e,t,r)=>{var n=r(1799),i=r(776),o=r(7197);e.exports=function baseMatches(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},7978:(e,t,r)=>{var n=r(270),i=r(8156),o=r(631),a=r(8586),s=r(756),u=r(7197),c=r(7797);e.exports=function baseMatchesProperty(e,t){return a(e)&&s(t)?u(c(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?o(r,e):n(t,a,3)}}},7237:e=>{e.exports=function baseProperty(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,r)=>{var n=r(7422);e.exports=function basePropertyDeep(e){return function(t){return n(t,e)}}},4552:e=>{e.exports=function basePropertyOf(e){return function(t){return null==e?void 0:e[t]}}},5160:e=>{e.exports=function baseSlice(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},916:(e,t,r)=>{var n=r(909);e.exports=function baseSome(e,t){var r;return n(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}},8096:e=>{e.exports=function baseTimes(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},7556:(e,t,r)=>{var n=r(1873),i=r(4932),o=r(6449),a=r(4394),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function baseToString(e){if(\"string\"==typeof e)return e;if(o(e))return i(e,baseToString)+\"\";if(a(e))return u?u.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-Infinity?\"-0\":t}},4128:(e,t,r)=>{var n=r(1800),i=/^\\s+/;e.exports=function baseTrim(e){return e?e.slice(0,n(e)+1).replace(i,\"\"):e}},7301:e=>{e.exports=function baseUnary(e){return function(t){return e(t)}}},1234:e=>{e.exports=function baseZipObject(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;){var s=n<o?t[n]:void 0;r(a,e[n],s)}return a}},9219:e=>{e.exports=function cacheHas(e,t){return e.has(t)}},1769:(e,t,r)=>{var n=r(6449),i=r(8586),o=r(1802),a=r(3222);e.exports=function castPath(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},8754:(e,t,r)=>{var n=r(5160);e.exports=function castSlice(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},5481:(e,t,r)=>{var n=r(9325)[\"__core-js_shared__\"];e.exports=n},8329:(e,t,r)=>{var n=r(4894);e.exports=function createBaseEach(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var o=r.length,a=t?o:-1,s=Object(r);(t?a--:++a<o)&&!1!==i(s[a],a,s););return r}}},3221:e=>{e.exports=function createBaseFor(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===r(o[u],u,o))break}return t}}},2507:(e,t,r)=>{var n=r(8754),i=r(9698),o=r(3912),a=r(3222);e.exports=function createCaseFirst(e){return function(t){t=a(t);var r=i(t)?o(t):void 0,s=r?r[0]:t.charAt(0),u=r?n(r,1).join(\"\"):t.slice(1);return s[e]()+u}}},5539:(e,t,r)=>{var n=r(882),i=r(828),o=r(6645),a=RegExp(\"['’]\",\"g\");e.exports=function createCompounder(e){return function(t){return n(o(i(t).replace(a,\"\")),e,\"\")}}},2006:(e,t,r)=>{var n=r(5389),i=r(4894),o=r(5950);e.exports=function createFind(e){return function(t,r,a){var s=Object(t);if(!i(t)){var u=n(r,3);t=o(t),r=function(e){return u(s[e],e,s)}}var c=e(t,r,a);return c>-1?s[u?t[c]:c]:void 0}}},4647:(e,t,r)=>{var n=r(4552)({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"});e.exports=n},3243:(e,t,r)=>{var n=r(6110),i=function(){try{var e=n(Object,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}();e.exports=i},5911:(e,t,r)=>{var n=r(8859),i=r(4248),o=r(9219);e.exports=function equalArrays(e,t,r,a,s,u){var c=1&r,f=e.length,l=t.length;if(f!=l&&!(c&&l>f))return!1;var h=u.get(e),p=u.get(t);if(h&&p)return h==t&&p==e;var d=-1,_=!0,y=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++d<f;){var m=e[d],g=t[d];if(a)var v=c?a(g,m,d,t,e,u):a(m,g,d,e,t,u);if(void 0!==v){if(v)continue;_=!1;break}if(y){if(!i(t,(function(e,t){if(!o(y,t)&&(m===e||s(m,e,r,a,u)))return y.push(t)}))){_=!1;break}}else if(m!==g&&!s(m,g,r,a,u)){_=!1;break}}return u.delete(e),u.delete(t),_}},1986:(e,t,r)=>{var n=r(1873),i=r(7828),o=r(5288),a=r(5911),s=r(317),u=r(4247),c=n?n.prototype:void 0,f=c?c.valueOf:void 0;e.exports=function equalByTag(e,t,r,n,c,l,h){switch(r){case\"[object DataView]\":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case\"[object ArrayBuffer]\":return!(e.byteLength!=t.byteLength||!l(new i(e),new i(t)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return o(+e,+t);case\"[object Error]\":return e.name==t.name&&e.message==t.message;case\"[object RegExp]\":case\"[object String]\":return e==t+\"\";case\"[object Map]\":var p=s;case\"[object Set]\":var d=1&n;if(p||(p=u),e.size!=t.size&&!d)return!1;var _=h.get(e);if(_)return _==t;n|=2,h.set(e,t);var y=a(p(e),p(t),n,c,l,h);return h.delete(e),y;case\"[object Symbol]\":if(f)return f.call(e)==f.call(t)}return!1}},689:(e,t,r)=>{var n=r(2),i=Object.prototype.hasOwnProperty;e.exports=function equalObjects(e,t,r,o,a,s){var u=1&r,c=n(e),f=c.length;if(f!=n(t).length&&!u)return!1;for(var l=f;l--;){var h=c[l];if(!(u?h in t:i.call(t,h)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var _=!0;s.set(e,t),s.set(t,e);for(var y=u;++l<f;){var m=e[h=c[l]],g=t[h];if(o)var v=u?o(g,m,h,t,e,s):o(m,g,h,e,t,s);if(!(void 0===v?m===g||a(m,g,r,o,s):v)){_=!1;break}y||(y=\"constructor\"==h)}if(_&&!y){var b=e.constructor,w=t.constructor;b==w||!(\"constructor\"in e)||!(\"constructor\"in t)||\"function\"==typeof b&&b instanceof b&&\"function\"==typeof w&&w instanceof w||(_=!1)}return s.delete(e),s.delete(t),_}},4840:(e,t,r)=>{var n=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},2:(e,t,r)=>{var n=r(2199),i=r(4664),o=r(5950);e.exports=function getAllKeys(e){return n(e,o,i)}},2651:(e,t,r)=>{var n=r(4218);e.exports=function getMapData(e,t){var r=e.__data__;return n(t)?r[\"string\"==typeof t?\"string\":\"hash\"]:r.map}},776:(e,t,r)=>{var n=r(756),i=r(5950);e.exports=function getMatchData(e){for(var t=i(e),r=t.length;r--;){var o=t[r],a=e[o];t[r]=[o,a,n(a)]}return t}},6110:(e,t,r)=>{var n=r(5083),i=r(392);e.exports=function getNative(e,t){var r=i(e,t);return n(r)?r:void 0}},659:(e,t,r)=>{var n=r(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function getRawTag(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},4664:(e,t,r)=>{var n=r(9770),i=r(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},5861:(e,t,r)=>{var n=r(5580),i=r(8223),o=r(2804),a=r(6545),s=r(8303),u=r(2552),c=r(7473),f=\"[object Map]\",l=\"[object Promise]\",h=\"[object Set]\",p=\"[object WeakMap]\",d=\"[object DataView]\",_=c(n),y=c(i),m=c(o),g=c(a),v=c(s),b=u;(n&&b(new n(new ArrayBuffer(1)))!=d||i&&b(new i)!=f||o&&b(o.resolve())!=l||a&&b(new a)!=h||s&&b(new s)!=p)&&(b=function(e){var t=u(e),r=\"[object Object]\"==t?e.constructor:void 0,n=r?c(r):\"\";if(n)switch(n){case _:return d;case y:return f;case m:return l;case g:return h;case v:return p}return t}),e.exports=b},392:e=>{e.exports=function getValue(e,t){return null==e?void 0:e[t]}},9326:(e,t,r)=>{var n=r(1769),i=r(2428),o=r(6449),a=r(361),s=r(294),u=r(7797);e.exports=function hasPath(e,t,r){for(var c=-1,f=(t=n(t,e)).length,l=!1;++c<f;){var h=u(t[c]);if(!(l=null!=e&&r(e,h)))break;e=e[h]}return l||++c!=f?l:!!(f=null==e?0:e.length)&&s(f)&&a(h,f)&&(o(e)||i(e))}},9698:e=>{var t=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");e.exports=function hasUnicode(e){return t.test(e)}},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function hasUnicodeWord(e){return t.test(e)}},2032:(e,t,r)=>{var n=r(1042);e.exports=function hashClear(){this.__data__=n?n(null):{},this.size=0}},3862:e=>{e.exports=function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,r)=>{var n=r(1042),i=Object.prototype.hasOwnProperty;e.exports=function hashGet(e){var t=this.__data__;if(n){var r=t[e];return\"__lodash_hash_undefined__\"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},2749:(e,t,r)=>{var n=r(1042),i=Object.prototype.hasOwnProperty;e.exports=function hashHas(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},5749:(e,t,r)=>{var n=r(1042);e.exports=function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?\"__lodash_hash_undefined__\":t,this}},361:e=>{var t=/^(?:0|[1-9]\\d*)$/;e.exports=function isIndex(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&(\"number\"==n||\"symbol\"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},6800:(e,t,r)=>{var n=r(5288),i=r(4894),o=r(361),a=r(3805);e.exports=function isIterateeCall(e,t,r){if(!a(r))return!1;var s=typeof t;return!!(\"number\"==s?i(r)&&o(t,r.length):\"string\"==s&&t in r)&&n(r[t],e)}},8586:(e,t,r)=>{var n=r(6449),i=r(4394),o=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;e.exports=function isKey(e,t){if(n(e))return!1;var r=typeof e;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},4218:e=>{e.exports=function isKeyable(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}},7296:(e,t,r)=>{var n,i=r(5481),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+n:\"\";e.exports=function isMasked(e){return!!o&&o in e}},5527:e=>{var t=Object.prototype;e.exports=function isPrototype(e){var r=e&&e.constructor;return e===(\"function\"==typeof r&&r.prototype||t)}},756:(e,t,r)=>{var n=r(3805);e.exports=function isStrictComparable(e){return e==e&&!n(e)}},3702:e=>{e.exports=function listCacheClear(){this.__data__=[],this.size=0}},80:(e,t,r)=>{var n=r(6025),i=Array.prototype.splice;e.exports=function listCacheDelete(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},4739:(e,t,r)=>{var n=r(6025);e.exports=function listCacheGet(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655:(e,t,r)=>{var n=r(6025);e.exports=function listCacheHas(e){return n(this.__data__,e)>-1}},1175:(e,t,r)=>{var n=r(6025);e.exports=function listCacheSet(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},3040:(e,t,r)=>{var n=r(1549),i=r(79),o=r(8223);e.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},7670:(e,t,r)=>{var n=r(2651);e.exports=function mapCacheDelete(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,r)=>{var n=r(2651);e.exports=function mapCacheGet(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(2651);e.exports=function mapCacheHas(e){return n(this,e).has(e)}},2949:(e,t,r)=>{var n=r(2651);e.exports=function mapCacheSet(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},317:e=>{e.exports=function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},7197:e=>{e.exports=function matchesStrictComparable(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},2224:(e,t,r)=>{var n=r(104);e.exports=function memoizeCapped(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},1042:(e,t,r)=>{var n=r(6110)(Object,\"create\");e.exports=n},3650:(e,t,r)=>{var n=r(4335)(Object.keys,Object);e.exports=n},6009:(e,t,r)=>{e=r.nmd(e);var n=r(4840),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require(\"util\").types;return e||a&&a.binding&&a.binding(\"util\")}catch(e){}}();e.exports=s},9350:e=>{var t=Object.prototype.toString;e.exports=function objectToString(e){return t.call(e)}},4335:e=>{e.exports=function overArg(e,t){return function(r){return e(t(r))}}},9325:(e,t,r)=>{var n=r(4840),i=\"object\"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function(\"return this\")();e.exports=o},1380:e=>{e.exports=function setCacheAdd(e){return this.__data__.set(e,\"__lodash_hash_undefined__\"),this}},1459:e=>{e.exports=function setCacheHas(e){return this.__data__.has(e)}},4247:e=>{e.exports=function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},1420:(e,t,r)=>{var n=r(79);e.exports=function stackClear(){this.__data__=new n,this.size=0}},938:e=>{e.exports=function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605:e=>{e.exports=function stackGet(e){return this.__data__.get(e)}},9817:e=>{e.exports=function stackHas(e){return this.__data__.has(e)}},945:(e,t,r)=>{var n=r(79),i=r(8223),o=r(3661);e.exports=function stackSet(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},3912:(e,t,r)=>{var n=r(1074),i=r(9698),o=r(2054);e.exports=function stringToArray(e){return i(e)?o(e):n(e)}},1802:(e,t,r)=>{var n=r(2224),i=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,o=/\\\\(\\\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(\"\"),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,\"$1\"):r||e)})),t}));e.exports=a},7797:(e,t,r)=>{var n=r(4394);e.exports=function toKey(e){if(\"string\"==typeof e||n(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-Infinity?\"-0\":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function toSource(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}},1800:e=>{var t=/\\s/;e.exports=function trimmedEndIndex(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2054:e=>{var t=\"\\\\ud800-\\\\udfff\",r=\"[\"+t+\"]\",n=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",i=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",o=\"[^\"+t+\"]\",a=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",s=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",u=\"(?:\"+n+\"|\"+i+\")\"+\"?\",c=\"[\\\\ufe0e\\\\ufe0f]?\",f=c+u+(\"(?:\\\\u200d(?:\"+[o,a,s].join(\"|\")+\")\"+c+u+\")*\"),l=\"(?:\"+[o+n+\"?\",n,a,s,r].join(\"|\")+\")\",h=RegExp(i+\"(?=\"+i+\")|\"+l+f,\"g\");e.exports=function unicodeToArray(e){return e.match(h)||[]}},2225:e=>{var t=\"\\\\ud800-\\\\udfff\",r=\"\\\\u2700-\\\\u27bf\",n=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",i=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",o=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",a=\"[\"+o+\"]\",s=\"\\\\d+\",u=\"[\"+r+\"]\",c=\"[\"+n+\"]\",f=\"[^\"+t+o+s+r+n+i+\"]\",l=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",h=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",p=\"[\"+i+\"]\",d=\"(?:\"+c+\"|\"+f+\")\",_=\"(?:\"+p+\"|\"+f+\")\",y=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",m=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",g=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",v=\"[\\\\ufe0e\\\\ufe0f]?\",b=v+g+(\"(?:\\\\u200d(?:\"+[\"[^\"+t+\"]\",l,h].join(\"|\")+\")\"+v+g+\")*\"),w=\"(?:\"+[u,l,h].join(\"|\")+\")\"+b,I=RegExp([p+\"?\"+c+\"+\"+y+\"(?=\"+[a,p,\"$\"].join(\"|\")+\")\",_+\"+\"+m+\"(?=\"+[a,p+d,\"$\"].join(\"|\")+\")\",p+\"?\"+d+\"+\"+y,p+\"+\"+m,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",s,w].join(\"|\"),\"g\");e.exports=function unicodeWords(e){return e.match(I)||[]}},4058:(e,t,r)=>{var n=r(4792),i=r(5539)((function(e,t,r){return t=t.toLowerCase(),e+(r?n(t):t)}));e.exports=i},4792:(e,t,r)=>{var n=r(3222),i=r(5808);e.exports=function capitalize(e){return i(n(e).toLowerCase())}},828:(e,t,r)=>{var n=r(4647),i=r(3222),o=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,a=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");e.exports=function deburr(e){return(e=i(e))&&e.replace(o,n).replace(a,\"\")}},5288:e=>{e.exports=function eq(e,t){return e===t||e!=e&&t!=t}},7309:(e,t,r)=>{var n=r(2006)(r(4713));e.exports=n},4713:(e,t,r)=>{var n=r(2523),i=r(5389),o=r(1489),a=Math.max;e.exports=function findIndex(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var u=null==r?0:o(r);return u<0&&(u=a(s+u,0)),n(e,i(t,3),u)}},8156:(e,t,r)=>{var n=r(7422);e.exports=function get(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},631:(e,t,r)=>{var n=r(8077),i=r(9326);e.exports=function hasIn(e,t){return null!=e&&i(e,t,n)}},3488:e=>{e.exports=function identity(e){return e}},2428:(e,t,r)=>{var n=r(7534),i=r(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,\"callee\")&&!s.call(e,\"callee\")};e.exports=u},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,r)=>{var n=r(1882),i=r(294);e.exports=function isArrayLike(e){return null!=e&&i(e.length)&&!n(e)}},3656:(e,t,r)=>{e=r.nmd(e);var n=r(9325),i=r(9935),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},1882:(e,t,r)=>{var n=r(2552),i=r(3805);e.exports=function isFunction(e){if(!i(e))return!1;var t=n(e);return\"[object Function]\"==t||\"[object GeneratorFunction]\"==t||\"[object AsyncFunction]\"==t||\"[object Proxy]\"==t}},294:e=>{e.exports=function isLength(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3805:e=>{e.exports=function isObject(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}},346:e=>{e.exports=function isObjectLike(e){return null!=e&&\"object\"==typeof e}},4394:(e,t,r)=>{var n=r(2552),i=r(346);e.exports=function isSymbol(e){return\"symbol\"==typeof e||i(e)&&\"[object Symbol]\"==n(e)}},7167:(e,t,r)=>{var n=r(4901),i=r(7301),o=r(6009),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},5950:(e,t,r)=>{var n=r(695),i=r(8984),o=r(4894);e.exports=function keys(e){return o(e)?n(e):i(e)}},104:(e,t,r)=>{var n=r(3661);function memoize(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new TypeError(\"Expected a function\");var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],i=memoized.cache;if(i.has(n))return i.get(n);var o=e.apply(this,r);return memoized.cache=i.set(n,o)||i,o};return memoized.cache=new(memoize.Cache||n),memoized}memoize.Cache=n,e.exports=memoize},583:(e,t,r)=>{var n=r(7237),i=r(7255),o=r(8586),a=r(7797);e.exports=function property(e){return o(e)?n(a(e)):i(e)}},2426:(e,t,r)=>{var n=r(4248),i=r(5389),o=r(916),a=r(6449),s=r(6800);e.exports=function some(e,t,r){var u=a(e)?n:o;return r&&s(e,t,r)&&(t=void 0),u(e,i(t,3))}},3345:e=>{e.exports=function stubArray(){return[]}},9935:e=>{e.exports=function stubFalse(){return!1}},7400:(e,t,r)=>{var n=r(9374),i=1/0;e.exports=function toFinite(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function toInteger(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),i=r(3805),o=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function toNumber(e){if(\"number\"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},3222:(e,t,r)=>{var n=r(7556);e.exports=function toString(e){return null==e?\"\":n(e)}},5808:(e,t,r)=>{var n=r(2507)(\"toUpperCase\");e.exports=n},6645:(e,t,r)=>{var n=r(1733),i=r(5434),o=r(3222),a=r(2225);e.exports=function words(e,t,r){return e=o(e),void 0===(t=r?void 0:t)?i(e)?a(e):n(e):e.match(t)||[]}},7248:(e,t,r)=>{var n=r(6547),i=r(1234);e.exports=function zipObject(e,t){return i(e||[],t||[],n)}},5606:e=>{var t,r,n=e.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(t===setTimeout)return setTimeout(e,0);if((t===defaultSetTimout||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){t=defaultSetTimout}try{r=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();var i,o=[],a=!1,s=-1;function cleanUpNextTick(){a&&i&&(a=!1,i.length?o=i.concat(o):s=-1,o.length&&drainQueue())}function drainQueue(){if(!a){var e=runTimeout(cleanUpNextTick);a=!0;for(var t=o.length;t;){for(i=o,o=[];++s<t;)i&&i[s].run();s=-1,t=o.length}i=null,a=!1,function runClearTimeout(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];o.push(new Item(e,t)),1!==o.length||a||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},n.title=\"browser\",n.browser=!0,n.env={},n.argv=[],n.version=\"\",n.versions={},n.on=noop,n.addListener=noop,n.once=noop,n.off=noop,n.removeListener=noop,n.removeAllListeners=noop,n.emit=noop,n.prependListener=noop,n.prependOnceListener=noop,n.listeners=function(e){return[]},n.binding=function(e){throw new Error(\"process.binding is not supported\")},n.cwd=function(){return\"/\"},n.chdir=function(e){throw new Error(\"process.chdir is not supported\")},n.umask=function(){return 0}},3209:(e,t,r)=>{\"use strict\";var n=r(5606),i=65536,o=4294967295;var a=r(2861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?e.exports=function randomBytes(e,t){if(e>o)throw new RangeError(\"requested too many random bytes\");var r=a.allocUnsafe(e);if(e>0)if(e>i)for(var u=0;u<e;u+=i)s.getRandomValues(r.slice(u,u+i));else s.getRandomValues(r);if(\"function\"==typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},5287:(e,t)=>{\"use strict\";var r=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),i=Symbol.for(\"react.fragment\"),o=Symbol.for(\"react.strict_mode\"),a=Symbol.for(\"react.profiler\"),s=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),c=Symbol.for(\"react.forward_ref\"),f=Symbol.for(\"react.suspense\"),l=Symbol.for(\"react.memo\"),h=Symbol.for(\"react.lazy\"),p=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,y={};function E(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||d}function F(){}function G(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||d}E.prototype.isReactComponent={},E.prototype.setState=function(e,t){if(\"object\"!=typeof e&&\"function\"!=typeof e&&null!=e)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,e,t,\"setState\")},E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")},F.prototype=E.prototype;var m=G.prototype=new F;m.constructor=G,_(m,E.prototype),m.isPureReactComponent=!0;var g=Array.isArray,v=Object.prototype.hasOwnProperty,b={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function M(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=\"\"+t.key),t)v.call(t,i)&&!w.hasOwnProperty(i)&&(o[i]=t[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),f=0;f<u;f++)c[f]=arguments[f+2];o.children=c}if(e&&e.defaultProps)for(i in u=e.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:e,key:a,ref:s,props:o,_owner:b.current}}function O(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===r}var I=/\\/+/g;function Q(e,t){return\"object\"==typeof e&&null!==e&&null!=e.key?function escape(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+e.replace(/[=:]/g,(function(e){return t[e]}))}(\"\"+e.key):t.toString(36)}function R(e,t,i,o,a){var s=typeof e;\"undefined\"!==s&&\"boolean\"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case\"string\":case\"number\":u=!0;break;case\"object\":switch(e.$$typeof){case r:case n:u=!0}}if(u)return a=a(u=e),e=\"\"===o?\".\"+Q(u,0):o,g(a)?(i=\"\",null!=e&&(i=e.replace(I,\"$&/\")+\"/\"),R(a,t,i,\"\",(function(e){return e}))):null!=a&&(O(a)&&(a=function N(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||u&&u.key===a.key?\"\":(\"\"+a.key).replace(I,\"$&/\")+\"/\")+e)),t.push(a)),1;if(u=0,o=\"\"===o?\".\":o+\":\",g(e))for(var c=0;c<e.length;c++){var f=o+Q(s=e[c],c);u+=R(s,t,i,f,a)}else if(f=function A(e){return null===e||\"object\"!=typeof e?null:\"function\"==typeof(e=p&&e[p]||e[\"@@iterator\"])?e:null}(e),\"function\"==typeof f)for(e=f.call(e),c=0;!(s=e.next()).done;)u+=R(s=s.value,t,i,f=o+Q(s,c++),a);else if(\"object\"===s)throw t=String(e),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===t?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":t)+\"). If you meant to render a collection of children, use an array instead.\");return u}function S(e,t,r){if(null==e)return e;var n=[],i=0;return R(e,n,\"\",\"\",(function(e){return t.call(r,e,i++)})),n}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var x={current:null},B={transition:null},k={ReactCurrentDispatcher:x,ReactCurrentBatchConfig:B,ReactCurrentOwner:b};t.Children={map:S,forEach:function(e,t,r){S(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return S(e,(function(){t++})),t},toArray:function(e){return S(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error(\"React.Children.only expected to receive a single React element child.\");return e}},t.Component=E,t.Fragment=i,t.Profiler=a,t.PureComponent=G,t.StrictMode=o,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.cloneElement=function(e,t,n){if(null==e)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+e+\".\");var i=_({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=b.current),void 0!==t.key&&(o=\"\"+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)v.call(t,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];i.children=u}return{$$typeof:r,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=M,t.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},t.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\")},t.useCallback=function(e,t){return x.current.useCallback(e,t)},t.useContext=function(e){return x.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return x.current.useDeferredValue(e)},t.useEffect=function(e,t){return x.current.useEffect(e,t)},t.useId=function(){return x.current.useId()},t.useImperativeHandle=function(e,t,r){return x.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return x.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return x.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return x.current.useMemo(e,t)},t.useReducer=function(e,t,r){return x.current.useReducer(e,t,r)},t.useRef=function(e){return x.current.useRef(e)},t.useState=function(e){return x.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return x.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return x.current.useTransition()},t.version=\"18.2.0\"},6540:(e,t,r)=>{\"use strict\";e.exports=r(5287)},2861:(e,t,r)=>{var n=r(8287),i=n.Buffer;function copyProps(e,t){for(var r in e)t[r]=e[r]}function SafeBuffer(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(copyProps(n,t),t.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(i.prototype),copyProps(i,SafeBuffer),SafeBuffer.from=function(e,t,r){if(\"number\"==typeof e)throw new TypeError(\"Argument must not be a number\");return i(e,t,r)},SafeBuffer.alloc=function(e,t,r){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");var n=i(e);return void 0!==t?\"string\"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},SafeBuffer.allocUnsafe=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return i(e)},SafeBuffer.allocUnsafeSlow=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(e)}},8011:(e,t,r)=>{var n=r(2861).Buffer;function Hash(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Hash.prototype.update=function(e,t){\"string\"==typeof e&&(t=t||\"utf8\",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),f=0;f<c;f++)r[u+f]=e[s+f];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},Hash.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},e.exports=Hash},2802:(e,t,r)=>{var n=e.exports=function SHA(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+\" is not supported (we accept pull requests)\");return new t};n.sha=r(7816),n.sha1=r(3737),n.sha224=r(6710),n.sha256=r(4107),n.sha384=r(2827),n.sha512=r(2890)},7816:(e,t,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function Sha(){this.init(),this._w=s,i.call(this,64,56)}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha,i),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var f=0;f<80;++f){var l=~~(f/20),h=0|((t=n)<<5|t>>>27)+ft(l,i,o,s)+u+r[f]+a[l];u=s,s=o,o=rotl30(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},Sha.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha},3737:(e,t,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function Sha1(){this.init(),this._w=s,i.call(this,64,56)}function rotl5(e){return e<<5|e>>>27}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha1,i),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=(t=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|t>>>31;for(var f=0;f<80;++f){var l=~~(f/20),h=rotl5(n)+ft(l,i,o,s)+u+r[f]+a[l]|0;u=s,s=o,o=rotl30(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},Sha1.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha1},6710:(e,t,r)=>{var n=r(6698),i=r(4107),o=r(8011),a=r(2861).Buffer,s=new Array(64);function Sha224(){this.init(),this._w=s,o.call(this,64,56)}n(Sha224,i),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=Sha224},4107:(e,t,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function Sha256(){this.init(),this._w=s,i.call(this,64,56)}function ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function sigma1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function gamma0(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(Sha256,i),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0|this._f,f=0|this._g,l=0|this._h,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((t=r[h-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[h-7]+gamma0(r[h-15])+r[h-16];for(var p=0;p<64;++p){var d=l+sigma1(u)+ch(u,c,f)+a[p]+r[p]|0,_=sigma0(n)+maj(n,i,o)|0;l=f,f=c,c=u,u=s+d|0,s=o,o=i,i=n,n=d+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=f+this._g|0,this._h=l+this._h|0},Sha256.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=Sha256},2827:(e,t,r)=>{var n=r(6698),i=r(2890),o=r(8011),a=r(2861).Buffer,s=new Array(160);function Sha384(){this.init(),this._w=s,o.call(this,128,112)}n(Sha384,i),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var e=a.allocUnsafe(48);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),e},e.exports=Sha384},2890:(e,t,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function Sha512(){this.init(),this._w=s,i.call(this,128,112)}function Ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function sigma1(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Gamma0(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Gamma0l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Gamma1(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gamma1l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function getCarry(e,t){return e>>>0<t>>>0?1:0}n(Sha512,i),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,c=0|this._gh,f=0|this._hh,l=0|this._al,h=0|this._bl,p=0|this._cl,d=0|this._dl,_=0|this._el,y=0|this._fl,m=0|this._gl,g=0|this._hl,v=0;v<32;v+=2)t[v]=e.readInt32BE(4*v),t[v+1]=e.readInt32BE(4*v+4);for(;v<160;v+=2){var b=t[v-30],w=t[v-30+1],I=Gamma0(b,w),x=Gamma0l(w,b),B=Gamma1(b=t[v-4],w=t[v-4+1]),k=Gamma1l(w,b),C=t[v-14],q=t[v-14+1],L=t[v-32],j=t[v-32+1],z=x+q|0,P=I+C+getCarry(z,x)|0;P=(P=P+B+getCarry(z=z+k|0,k)|0)+L+getCarry(z=z+j|0,j)|0,t[v]=P,t[v+1]=z}for(var D=0;D<160;D+=2){P=t[D],z=t[D+1];var U=maj(r,n,i),W=maj(l,h,p),K=sigma0(r,l),V=sigma0(l,r),$=sigma1(s,_),H=sigma1(_,s),Y=a[D],Z=a[D+1],J=Ch(s,u,c),X=Ch(_,y,m),ee=g+H|0,te=f+$+getCarry(ee,g)|0;te=(te=(te=te+J+getCarry(ee=ee+X|0,X)|0)+Y+getCarry(ee=ee+Z|0,Z)|0)+P+getCarry(ee=ee+z|0,z)|0;var re=V+W|0,ne=K+U+getCarry(re,V)|0;f=c,g=m,c=u,m=y,u=s,y=_,s=o+te+getCarry(_=d+ee|0,d)|0,o=i,d=p,i=n,p=h,n=r,h=l,r=te+ne+getCarry(l=ee+re|0,ee)|0}this._al=this._al+l|0,this._bl=this._bl+h|0,this._cl=this._cl+p|0,this._dl=this._dl+d|0,this._el=this._el+_|0,this._fl=this._fl+y|0,this._gl=this._gl+m|0,this._hl=this._hl+g|0,this._ah=this._ah+r+getCarry(this._al,l)|0,this._bh=this._bh+n+getCarry(this._bl,h)|0,this._ch=this._ch+i+getCarry(this._cl,p)|0,this._dh=this._dh+o+getCarry(this._dl,d)|0,this._eh=this._eh+s+getCarry(this._el,_)|0,this._fh=this._fh+u+getCarry(this._fl,y)|0,this._gh=this._gh+c+getCarry(this._gl,m)|0,this._hh=this._hh+f+getCarry(this._hl,g)|0},Sha512.prototype._hash=function(){var e=o.allocUnsafe(64);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),e},e.exports=Sha512},7666:(e,t,r)=>{var n=r(4851),i=r(953);function _extends(){var t;return e.exports=_extends=n?i(t=n).call(t):function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,_extends.apply(this,arguments)}e.exports=_extends,e.exports.__esModule=!0,e.exports.default=e.exports},3700:(e,t,r)=>{\"use strict\";var n=r(9709);e.exports=n},462:(e,t,r)=>{\"use strict\";var n=r(975);e.exports=n},2567:(e,t,r)=>{\"use strict\";r(9307);var n=r(1747);e.exports=n(\"Function\",\"bind\")},3034:(e,t,r)=>{\"use strict\";var n=r(8280),i=r(2567),o=Function.prototype;e.exports=function(e){var t=e.bind;return e===o||n(o,e)&&t===o.bind?i:t}},9748:(e,t,r)=>{\"use strict\";r(1340);var n=r(2046);e.exports=n.Object.assign},953:(e,t,r)=>{\"use strict\";e.exports=r(3375)},4851:(e,t,r)=>{\"use strict\";e.exports=r(5401)},3375:(e,t,r)=>{\"use strict\";var n=r(3700);e.exports=n},5401:(e,t,r)=>{\"use strict\";var n=r(462);e.exports=n},2159:(e,t,r)=>{\"use strict\";var n=r(2250),i=r(4640),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+\" is not a function\")}},6624:(e,t,r)=>{\"use strict\";var n=r(6285),i=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(i(e)+\" is not an object\")}},4436:(e,t,r)=>{\"use strict\";var n=r(7374),i=r(4849),o=r(575),createMethod=function(e){return function(t,r,a){var s,u=n(t),c=o(u),f=i(a,c);if(e&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},3427:(e,t,r)=>{\"use strict\";var n=r(1907);e.exports=n([].slice)},5807:(e,t,r)=>{\"use strict\";var n=r(1907),i=n({}.toString),o=n(\"\".slice);e.exports=function(e){return o(i(e),8,-1)}},1626:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(4284),o=r(5817);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},5817:e=>{\"use strict\";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2532:(e,t,r)=>{\"use strict\";var n=r(1010),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9447:(e,t,r)=>{\"use strict\";var n=r(8828);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7882:e=>{\"use strict\";var t=\"object\"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},9552:(e,t,r)=>{\"use strict\";var n=r(1010),i=r(6285),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},4723:e=>{\"use strict\";e.exports=\"undefined\"!=typeof navigator&&String(navigator.userAgent)||\"\"},5683:(e,t,r)=>{\"use strict\";var n,i,o=r(1010),a=r(4723),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,f=c&&c.v8;f&&(i=(n=f.split(\".\"))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),e.exports=i},376:e=>{\"use strict\";e.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},1091:(e,t,r)=>{\"use strict\";var n=r(1010),i=r(6024),o=r(2361),a=r(2250),s=r(3846).f,u=r(7463),c=r(2046),f=r(8311),l=r(1626),h=r(9724),wrapConstructor=function(e){var Wrapper=function(t,r,n){if(this instanceof Wrapper){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return i(e,this,arguments)};return Wrapper.prototype=e.prototype,Wrapper};e.exports=function(e,t){var r,i,p,d,_,y,m,g,v,b=e.target,w=e.global,I=e.stat,x=e.proto,B=w?n:I?n[b]:(n[b]||{}).prototype,k=w?c:c[b]||l(c,b,{})[b],C=k.prototype;for(d in t)i=!(r=u(w?d:b+(I?\".\":\"#\")+d,e.forced))&&B&&h(B,d),y=k[d],i&&(m=e.dontCallGetSet?(v=s(B,d))&&v.value:B[d]),_=i&&m?m:t[d],i&&typeof y==typeof _||(g=e.bind&&i?f(_,n):e.wrap&&i?wrapConstructor(_):x&&a(_)?o(_):_,(e.sham||_&&_.sham||y&&y.sham)&&l(g,\"sham\",!0),l(k,d,g),x&&(h(c,p=b+\"Prototype\")||l(c,p,{}),l(c[p],d,_),e.real&&C&&(r||!C[d])&&l(C,d,_)))}},8828:e=>{\"use strict\";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:(e,t,r)=>{\"use strict\";var n=r(1505),i=Function.prototype,o=i.apply,a=i.call;e.exports=\"object\"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},8311:(e,t,r)=>{\"use strict\";var n=r(2361),i=r(2159),o=r(1505),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},1505:(e,t,r)=>{\"use strict\";var n=r(8828);e.exports=!n((function(){var e=function(){}.bind();return\"function\"!=typeof e||e.hasOwnProperty(\"prototype\")}))},4673:(e,t,r)=>{\"use strict\";var n=r(1907),i=r(2159),o=r(6285),a=r(9724),s=r(3427),u=r(1505),c=Function,f=n([].concat),l=n([].join),h={};e.exports=u?c.bind:function bind(e){var t=i(this),r=t.prototype,n=s(arguments,1),u=function bound(){var r=f(n,s(arguments));return this instanceof u?function(e,t,r){if(!a(h,t)){for(var n=[],i=0;i<t;i++)n[i]=\"a[\"+i+\"]\";h[t]=c(\"C,a\",\"return new C(\"+l(n,\",\")+\")\")}return h[t](e,r)}(t,r.length,r):t.apply(e,r)};return o(r)&&(u.prototype=r),u}},3930:(e,t,r)=>{\"use strict\";var n=r(1505),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},2361:(e,t,r)=>{\"use strict\";var n=r(5807),i=r(1907);e.exports=function(e){if(\"Function\"===n(e))return i(e)}},1907:(e,t,r)=>{\"use strict\";var n=r(1505),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);e.exports=n?a:function(e){return function(){return o.apply(e,arguments)}}},1747:(e,t,r)=>{\"use strict\";var n=r(1010),i=r(2046);e.exports=function(e,t){var r=i[e+\"Prototype\"],o=r&&r[t];if(o)return o;var a=n[e],s=a&&a.prototype;return s&&s[t]}},5582:(e,t,r)=>{\"use strict\";var n=r(2046),i=r(1010),o=r(2250),aFunction=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?aFunction(n[e])||aFunction(i[e]):n[e]&&n[e][t]||i[e]&&i[e][t]}},9367:(e,t,r)=>{\"use strict\";var n=r(2159),i=r(7136);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},1010:function(e,t,r){\"use strict\";var check=function(e){return e&&e.Math===Math&&e};e.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof r.g&&r.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},9724:(e,t,r)=>{\"use strict\";var n=r(1907),i=r(9298),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return o(i(e),t)}},8530:e=>{\"use strict\";e.exports={}},3648:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(8828),o=r(9552);e.exports=!n&&!i((function(){return 7!==Object.defineProperty(o(\"div\"),\"a\",{get:function(){return 7}}).a}))},6946:(e,t,r)=>{\"use strict\";var n=r(1907),i=r(8828),o=r(5807),a=Object,s=n(\"\".split);e.exports=i((function(){return!a(\"z\").propertyIsEnumerable(0)}))?function(e){return\"String\"===o(e)?s(e,\"\"):a(e)}:a},2250:(e,t,r)=>{\"use strict\";var n=r(7882),i=n.all;e.exports=n.IS_HTMLDDA?function(e){return\"function\"==typeof e||e===i}:function(e){return\"function\"==typeof e}},7463:(e,t,r)=>{\"use strict\";var n=r(8828),i=r(2250),o=/#|\\.prototype\\./,isForced=function(e,t){var r=s[a(e)];return r===c||r!==u&&(i(t)?n(t):!!t)},a=isForced.normalize=function(e){return String(e).replace(o,\".\").toLowerCase()},s=isForced.data={},u=isForced.NATIVE=\"N\",c=isForced.POLYFILL=\"P\";e.exports=isForced},7136:e=>{\"use strict\";e.exports=function(e){return null==e}},6285:(e,t,r)=>{\"use strict\";var n=r(2250),i=r(7882),o=i.all;e.exports=i.IS_HTMLDDA?function(e){return\"object\"==typeof e?null!==e:n(e)||e===o}:function(e){return\"object\"==typeof e?null!==e:n(e)}},7376:e=>{\"use strict\";e.exports=!0},5594:(e,t,r)=>{\"use strict\";var n=r(5582),i=r(2250),o=r(8280),a=r(3556),s=Object;e.exports=a?function(e){return\"symbol\"==typeof e}:function(e){var t=n(\"Symbol\");return i(t)&&o(t.prototype,s(e))}},575:(e,t,r)=>{\"use strict\";var n=r(3121);e.exports=function(e){return n(e.length)}},1176:e=>{\"use strict\";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},9538:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(1907),o=r(3930),a=r(8828),s=r(2875),u=r(7170),c=r(2574),f=r(9298),l=r(6946),h=Object.assign,p=Object.defineProperty,d=i([].concat);e.exports=!h||a((function(){if(n&&1!==h({b:1},h(p({},\"a\",{enumerable:!0,get:function(){p(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(\"assign detection\"),i=\"abcdefghijklmnopqrst\";return e[r]=7,i.split(\"\").forEach((function(e){t[e]=e})),7!==h({},e)[r]||s(h({},t)).join(\"\")!==i}))?function assign(e,t){for(var r=f(e),i=arguments.length,a=1,h=u.f,p=c.f;i>a;)for(var _,y=l(arguments[a++]),m=h?d(s(y),h(y)):s(y),g=m.length,v=0;g>v;)_=m[v++],n&&!o(p,y,_)||(r[_]=y[_]);return r}:h},4284:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(3648),o=r(8661),a=r(6624),s=r(470),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l=\"enumerable\",h=\"configurable\",p=\"writable\";t.f=n?o?function defineProperty(e,t,r){if(a(e),t=s(t),a(r),\"function\"==typeof e&&\"prototype\"===t&&\"value\"in r&&p in r&&!r[p]){var n=f(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1})}return c(e,t,r)}:c:function defineProperty(e,t,r){if(a(e),t=s(t),a(r),i)try{return c(e,t,r)}catch(e){}if(\"get\"in r||\"set\"in r)throw new u(\"Accessors not supported\");return\"value\"in r&&(e[t]=r.value),e}},3846:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(3930),o=r(2574),a=r(5817),s=r(7374),u=r(470),c=r(9724),f=r(3648),l=Object.getOwnPropertyDescriptor;t.f=n?l:function getOwnPropertyDescriptor(e,t){if(e=s(e),t=u(t),f)try{return l(e,t)}catch(e){}if(c(e,t))return a(!i(o.f,e,t),e[t])}},7170:(e,t)=>{\"use strict\";t.f=Object.getOwnPropertySymbols},8280:(e,t,r)=>{\"use strict\";var n=r(1907);e.exports=n({}.isPrototypeOf)},3045:(e,t,r)=>{\"use strict\";var n=r(1907),i=r(9724),o=r(7374),a=r(4436).indexOf,s=r(8530),u=n([].push);e.exports=function(e,t){var r,n=o(e),c=0,f=[];for(r in n)!i(s,r)&&i(n,r)&&u(f,r);for(;t.length>c;)i(n,r=t[c++])&&(~a(f,r)||u(f,r));return f}},2875:(e,t,r)=>{\"use strict\";var n=r(3045),i=r(376);e.exports=Object.keys||function keys(e){return n(e,i)}},2574:(e,t)=>{\"use strict\";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r},581:(e,t,r)=>{\"use strict\";var n=r(3930),i=r(2250),o=r(6285),a=TypeError;e.exports=function(e,t){var r,s;if(\"string\"===t&&i(r=e.toString)&&!o(s=n(r,e)))return s;if(i(r=e.valueOf)&&!o(s=n(r,e)))return s;if(\"string\"!==t&&i(r=e.toString)&&!o(s=n(r,e)))return s;throw new a(\"Can't convert object to primitive value\")}},2046:e=>{\"use strict\";e.exports={}},4239:(e,t,r)=>{\"use strict\";var n=r(7136),i=TypeError;e.exports=function(e){if(n(e))throw new i(\"Can't call method on \"+e);return e}},6128:(e,t,r)=>{\"use strict\";var n=r(1010),i=r(2532),o=\"__core-js_shared__\",a=n[o]||i(o,{});e.exports=a},5816:(e,t,r)=>{\"use strict\";var n=r(7376),i=r(6128);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:\"3.34.0\",mode:n?\"pure\":\"global\",copyright:\"© 2014-2023 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},9846:(e,t,r)=>{\"use strict\";var n=r(5683),i=r(8828),o=r(1010).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol(\"symbol detection\");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4849:(e,t,r)=>{\"use strict\";var n=r(5482),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},7374:(e,t,r)=>{\"use strict\";var n=r(6946),i=r(4239);e.exports=function(e){return n(i(e))}},5482:(e,t,r)=>{\"use strict\";var n=r(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3121:(e,t,r)=>{\"use strict\";var n=r(5482),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},9298:(e,t,r)=>{\"use strict\";var n=r(4239),i=Object;e.exports=function(e){return i(n(e))}},6028:(e,t,r)=>{\"use strict\";var n=r(3930),i=r(6285),o=r(5594),a=r(9367),s=r(581),u=r(6264),c=TypeError,f=u(\"toPrimitive\");e.exports=function(e,t){if(!i(e)||o(e))return e;var r,u=a(e,f);if(u){if(void 0===t&&(t=\"default\"),r=n(u,e,t),!i(r)||o(r))return r;throw new c(\"Can't convert object to primitive value\")}return void 0===t&&(t=\"number\"),s(e,t)}},470:(e,t,r)=>{\"use strict\";var n=r(6028),i=r(5594);e.exports=function(e){var t=n(e,\"string\");return i(t)?t:t+\"\"}},4640:e=>{\"use strict\";var t=String;e.exports=function(e){try{return t(e)}catch(e){return\"Object\"}}},6499:(e,t,r)=>{\"use strict\";var n=r(1907),i=0,o=Math.random(),a=n(1..toString);e.exports=function(e){return\"Symbol(\"+(void 0===e?\"\":e)+\")_\"+a(++i+o,36)}},3556:(e,t,r)=>{\"use strict\";var n=r(9846);e.exports=n&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},8661:(e,t,r)=>{\"use strict\";var n=r(9447),i=r(8828);e.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},6264:(e,t,r)=>{\"use strict\";var n=r(1010),i=r(5816),o=r(9724),a=r(6499),s=r(9846),u=r(3556),c=n.Symbol,f=i(\"wks\"),l=u?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return o(f,e)||(f[e]=s&&o(c,e)?c[e]:l(\"Symbol.\"+e)),f[e]}},9307:(e,t,r)=>{\"use strict\";var n=r(1091),i=r(4673);n({target:\"Function\",proto:!0,forced:Function.bind!==i},{bind:i})},1340:(e,t,r)=>{\"use strict\";var n=r(1091),i=r(9538);n({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},9709:(e,t,r)=>{\"use strict\";var n=r(3034);e.exports=n},975:(e,t,r)=>{\"use strict\";var n=r(9748);e.exports=n}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{\"use strict\";__webpack_require__.d(r,{default:()=>Vt});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{TOGGLE_CONFIGS:()=>Tt,UPDATE_CONFIGS:()=>jt,loaded:()=>loaded,toggle:()=>toggle,update:()=>update});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{get:()=>get});var i=__webpack_require__(6540);class StandaloneLayout extends i.Component{render(){const{getComponent:e}=this.props,t=e(\"Container\"),r=e(\"Row\"),n=e(\"Col\"),o=e(\"Topbar\",!0),a=e(\"BaseLayout\",!0),s=e(\"onlineValidatorBadge\",!0);return i.createElement(t,{className:\"swagger-ui\"},o?i.createElement(o,null):null,i.createElement(a,null),i.createElement(r,null,i.createElement(n,null,i.createElement(s,null))))}}const o=StandaloneLayout,stadalone_layout=()=>({components:{StandaloneLayout:o}});var a=__webpack_require__(9404),s=__webpack_require__.n(a);__webpack_require__(6750),__webpack_require__(4058),__webpack_require__(5808),__webpack_require__(104),__webpack_require__(7309),__webpack_require__(2426),__webpack_require__(5288),__webpack_require__(1882),__webpack_require__(2205),__webpack_require__(3209),__webpack_require__(2802);const u=function makeWindow(){var e={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return e;try{e=window;for(var t of[\"File\",\"Blob\",\"FormData\"])t in window&&(e[t]=window[t])}catch(e){console.error(e)}return e}();s().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");__webpack_require__(8287).Buffer;const parseSearch=()=>{let e={},t=u.location.search;if(!t)return{};if(\"\"!=t){let r=t.substr(1).split(\"&\");for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(t=r[t].split(\"=\"),e[decodeURIComponent(t[0])]=t[1]&&decodeURIComponent(t[1])||\"\")}return e};class TopBar extends i.Component{constructor(e,t){super(e,t),this.state={url:e.specSelectors.url(),selectedIndex:0}}UNSAFE_componentWillReceiveProps(e){this.setState({url:e.specSelectors.url()})}onUrlChange=e=>{let{target:{value:t}}=e;this.setState({url:t})};flushAuthData(){const{persistAuthorization:e}=this.props.getConfigs();e||this.props.authActions.restoreAuthorization({authorized:{}})}loadSpec=e=>{this.flushAuthData(),this.props.specActions.updateUrl(e),this.props.specActions.download(e)};onUrlSelect=e=>{let t=e.target.value||e.target.href;this.loadSpec(t),this.setSelectedUrl(t),e.preventDefault()};downloadUrl=e=>{this.loadSpec(this.state.url),e.preventDefault()};setSearch=e=>{let t=parseSearch();t[\"urls.primaryName\"]=e.name;const r=`${window.location.protocol}//${window.location.host}${window.location.pathname}`;var n;window&&window.history&&window.history.pushState&&window.history.replaceState(null,\"\",`${r}?${n=t,Object.keys(n).map((e=>encodeURIComponent(e)+\"=\"+encodeURIComponent(n[e]))).join(\"&\")}`)};setSelectedUrl=e=>{const t=this.props.getConfigs().urls||[];t&&t.length&&e&&t.forEach(((t,r)=>{t.url===e&&(this.setState({selectedIndex:r}),this.setSearch(t))}))};componentDidMount(){const e=this.props.getConfigs(),t=e.urls||[];if(t&&t.length){var r=this.state.selectedIndex;let n=parseSearch()[\"urls.primaryName\"]||e[\"urls.primaryName\"];n&&t.forEach(((e,t)=>{e.name===n&&(this.setState({selectedIndex:t}),r=t)})),this.loadSpec(t[r].url)}}onFilterChange=e=>{let{target:{value:t}}=e;this.props.layoutActions.updateFilter(t)};render(){let{getComponent:e,specSelectors:t,getConfigs:r}=this.props;const n=e(\"Button\"),o=e(\"Link\"),a=e(\"Logo\");let s=\"loading\"===t.loadingStatus();const u=[\"download-url-input\"];\"failed\"===t.loadingStatus()&&u.push(\"failed\"),s&&u.push(\"loading\");const{urls:c}=r();let f=[],l=null;if(c){let e=[];c.forEach(((t,r)=>{e.push(i.createElement(\"option\",{key:r,value:t.url},t.name))})),f.push(i.createElement(\"label\",{className:\"select-label\",htmlFor:\"select\"},i.createElement(\"span\",null,\"Select a definition\"),i.createElement(\"select\",{id:\"select\",disabled:s,onChange:this.onUrlSelect,value:c[this.state.selectedIndex].url},e)))}else l=this.downloadUrl,f.push(i.createElement(\"input\",{className:u.join(\" \"),type:\"text\",onChange:this.onUrlChange,value:this.state.url,disabled:s,id:\"download-url-input\"})),f.push(i.createElement(n,{className:\"download-url-button\",onClick:this.downloadUrl},\"Explore\"));return i.createElement(\"div\",{className:\"topbar\"},i.createElement(\"div\",{className:\"wrapper\"},i.createElement(\"div\",{className:\"topbar-wrapper\"},i.createElement(o,null,i.createElement(a,null)),i.createElement(\"form\",{className:\"download-url-wrapper\",onSubmit:l},f.map(((e,t)=>(0,i.cloneElement)(e,{key:t})))))))}}const c=TopBar;var f,l,h,p,d,_,y,m,g,v,b,w,I,x,B,k,C,q,L,j,z,P,D,U,W,K,V,$,H,Y,Z,J;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}const logo_small=e=>i.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 407 116\"},e),f||(f=i.createElement(\"defs\",null,i.createElement(\"clipPath\",{id:\"logo_small_svg__clip-SW_TM-logo-on-dark\"},i.createElement(\"path\",{d:\"M0 0h407v116H0z\"})),i.createElement(\"style\",null,\".logo_small_svg__cls-2{fill:#fff}.logo_small_svg__cls-3{fill:#85ea2d}\"))),i.createElement(\"g\",{id:\"logo_small_svg__SW_TM-logo-on-dark\",style:{clipPath:\"url(#logo_small_svg__clip-SW_TM-logo-on-dark)\"}},i.createElement(\"g\",{id:\"logo_small_svg__SW_In-Product\",transform:\"translate(-.301)\"},l||(l=i.createElement(\"path\",{id:\"logo_small_svg__Path_2936\",d:\"M359.15 70.674h-.7v-3.682h-1.26v-.6h3.219v.6h-1.259Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2936\"})),h||(h=i.createElement(\"path\",{id:\"logo_small_svg__Path_2937\",d:\"m363.217 70.674-1.242-3.574h-.023q.05.8.05 1.494v2.083h-.636v-4.286h.987l1.19 3.407h.017l1.225-3.407h.99v4.283h-.675v-2.118a30 30 0 0 1 .044-1.453h-.023l-1.286 3.571Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2937\"})),p||(p=i.createElement(\"path\",{id:\"logo_small_svg__Path_2938\",d:\"M50.328 97.669a47.642 47.642 0 1 1 47.643-47.642 47.64 47.64 0 0 1-47.643 47.642\",className:\"logo_small_svg__cls-3\",\"data-name\":\"Path 2938\"})),d||(d=i.createElement(\"path\",{id:\"logo_small_svg__Path_2939\",d:\"M50.328 4.769A45.258 45.258 0 1 1 5.07 50.027 45.26 45.26 0 0 1 50.328 4.769m0-4.769a50.027 50.027 0 1 0 50.027 50.027A50.027 50.027 0 0 0 50.328 0\",className:\"logo_small_svg__cls-3\",\"data-name\":\"Path 2939\"})),i.createElement(\"path\",{id:\"logo_small_svg__Path_2940\",d:\"M31.8 33.854c-.154 1.712.058 3.482-.057 5.213a43 43 0 0 1-.693 5.156 9.53 9.53 0 0 1-4.1 5.829c4.079 2.654 4.54 6.771 4.81 10.946.135 2.25.077 4.52.308 6.752.173 1.731.846 2.174 2.636 2.231.73.02 1.48 0 2.327 0v5.349c-5.29.9-9.657-.6-10.734-5.079a31 31 0 0 1-.654-5c-.117-1.789.076-3.578-.058-5.367-.386-4.906-1.02-6.56-5.713-6.791v-6.1a9 9 0 0 1 1.028-.173c2.577-.135 3.674-.924 4.231-3.463a29 29 0 0 0 .481-4.329 82 82 0 0 1 .6-8.406c.673-3.982 3.136-5.906 7.234-6.137 1.154-.057 2.327 0 3.655 0v5.464c-.558.038-1.039.115-1.539.115-3.336-.115-3.51 1.02-3.762 3.79m6.406 12.658h-.077a3.515 3.515 0 1 0-.346 7.021h.231a3.46 3.46 0 0 0 3.655-3.251v-.192a3.523 3.523 0 0 0-3.461-3.578Zm12.062 0a3.373 3.373 0 0 0-3.482 3.251 2 2 0 0 0 .02.327 3.3 3.3 0 0 0 3.578 3.443 3.263 3.263 0 0 0 3.443-3.558 3.308 3.308 0 0 0-3.557-3.463Zm12.351 0a3.59 3.59 0 0 0-3.655 3.482 3.53 3.53 0 0 0 3.536 3.539h.039c1.769.309 3.559-1.4 3.674-3.462a3.57 3.57 0 0 0-3.6-3.559Zm16.948.288c-2.232-.1-3.348-.846-3.9-2.962a21.5 21.5 0 0 1-.635-4.136c-.154-2.578-.135-5.175-.308-7.753-.4-6.117-4.828-8.252-11.254-7.195v5.31c1.019 0 1.808 0 2.6.019 1.366.019 2.4.539 2.539 2.059.135 1.385.135 2.789.27 4.193.269 2.79.422 5.618.9 8.369a8.72 8.72 0 0 0 3.921 5.348c-3.4 2.289-4.406 5.559-4.578 9.234-.1 2.52-.154 5.059-.289 7.6-.115 2.308-.923 3.058-3.251 3.116-.654.019-1.289.077-2.019.115v5.445c1.365 0 2.616.077 3.866 0 3.886-.231 6.233-2.117 7-5.887A49 49 0 0 0 75 63.4c.135-1.923.116-3.866.308-5.771.289-2.982 1.655-4.213 4.636-4.4a4 4 0 0 0 .828-.192v-6.1c-.5-.058-.843-.115-1.208-.135Z\",\"data-name\":\"Path 2940\",style:{fill:\"#173647\"}}),_||(_=i.createElement(\"path\",{id:\"logo_small_svg__Path_2941\",d:\"M152.273 58.122a11.23 11.23 0 0 1-4.384 9.424q-4.383 3.382-11.9 3.382-8.14 0-12.524-2.1V63.7a33 33 0 0 0 6.137 1.879 32.3 32.3 0 0 0 6.575.689q5.322 0 8.015-2.02a6.63 6.63 0 0 0 2.692-5.62 7.2 7.2 0 0 0-.954-3.9 8.9 8.9 0 0 0-3.194-2.8 44.6 44.6 0 0 0-6.81-2.911q-6.387-2.286-9.126-5.417a11.96 11.96 0 0 1-2.74-8.172A10.16 10.16 0 0 1 128.039 27q3.977-3.131 10.52-3.131a31 31 0 0 1 12.555 2.5L149.455 31a28.4 28.4 0 0 0-11.021-2.38 10.67 10.67 0 0 0-6.606 1.816 5.98 5.98 0 0 0-2.38 5.041 7.7 7.7 0 0 0 .877 3.9 8.24 8.24 0 0 0 2.959 2.786 36.7 36.7 0 0 0 6.371 2.8q7.2 2.566 9.91 5.51a10.84 10.84 0 0 1 2.708 7.649\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2941\"})),y||(y=i.createElement(\"path\",{id:\"logo_small_svg__Path_2942\",d:\"M185.288 70.3 179 50.17q-.594-1.848-2.222-8.391h-.251q-1.252 5.479-2.192 8.453L167.849 70.3h-6.011l-9.361-34.315h5.447q3.318 12.931 5.057 19.693a80 80 0 0 1 1.988 9.111h.25q.345-1.785 1.112-4.618t1.33-4.493l6.294-19.693h5.635l6.137 19.693a66 66 0 0 1 2.379 9.048h.251a33 33 0 0 1 .673-3.475q.548-2.347 6.528-25.266h5.385L191.456 70.3Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2942\"})),m||(m=i.createElement(\"path\",{id:\"logo_small_svg__Path_2943\",d:\"m225.115 70.3-1.033-4.885h-.25a14.45 14.45 0 0 1-5.119 4.368 15.6 15.6 0 0 1-6.372 1.143q-5.1 0-8-2.63t-2.9-7.483q0-10.4 16.626-10.9l5.823-.188V47.6q0-4.038-1.738-5.964t-5.552-1.923a22.6 22.6 0 0 0-9.706 2.63l-1.6-3.977a24.4 24.4 0 0 1 5.557-2.16 24 24 0 0 1 6.058-.783q6.136 0 9.1 2.724t2.959 8.735V70.3Zm-11.741-3.663a10.55 10.55 0 0 0 7.626-2.66 9.85 9.85 0 0 0 2.771-7.451v-3.1l-5.2.219q-6.2.219-8.939 1.926a5.8 5.8 0 0 0-2.74 5.306 5.35 5.35 0 0 0 1.707 4.29 7.08 7.08 0 0 0 4.775 1.472Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2943\"})),g||(g=i.createElement(\"path\",{id:\"logo_small_svg__Path_2944\",d:\"M264.6 35.987v3.287l-6.356.752a11.16 11.16 0 0 1 2.255 6.856 10.15 10.15 0 0 1-3.444 8.047q-3.444 3-9.456 3a15.7 15.7 0 0 1-2.88-.25Q241.4 59.438 241.4 62.1a2.24 2.24 0 0 0 1.159 2.082 8.46 8.46 0 0 0 3.976.673h6.074q5.573 0 8.563 2.348a8.16 8.16 0 0 1 2.99 6.825 9.74 9.74 0 0 1-4.571 8.688q-4.572 2.989-13.338 2.99-6.732 0-10.379-2.5a8.09 8.09 0 0 1-3.647-7.076 7.95 7.95 0 0 1 2-5.417 10.2 10.2 0 0 1 5.636-3.1 5.43 5.43 0 0 1-2.207-1.847 4.9 4.9 0 0 1-.893-2.912 5.53 5.53 0 0 1 1-3.288 10.5 10.5 0 0 1 3.162-2.723 9.28 9.28 0 0 1-4.336-3.726 10.95 10.95 0 0 1-1.675-6.012q0-5.634 3.382-8.688t9.58-3.052a17.4 17.4 0 0 1 4.853.626Zm-27.367 40.075a4.66 4.66 0 0 0 2.348 4.227 12.97 12.97 0 0 0 6.732 1.44q6.543 0 9.69-1.956a5.99 5.99 0 0 0 3.147-5.307q0-2.787-1.723-3.867t-6.481-1.08h-6.23a8.2 8.2 0 0 0-5.51 1.69 6.04 6.04 0 0 0-1.973 4.853m2.818-29.086a6.98 6.98 0 0 0 2.035 5.448 8.12 8.12 0 0 0 5.667 1.847q7.608 0 7.608-7.389 0-7.733-7.7-7.733a7.63 7.63 0 0 0-5.635 1.972q-1.976 1.973-1.975 5.855\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2944\"})),v||(v=i.createElement(\"path\",{id:\"logo_small_svg__Path_2945\",d:\"M299.136 35.987v3.287l-6.356.752a11.17 11.17 0 0 1 2.254 6.856 10.15 10.15 0 0 1-3.444 8.047q-3.444 3-9.455 3a15.7 15.7 0 0 1-2.88-.25q-3.32 1.754-3.319 4.415a2.24 2.24 0 0 0 1.158 2.082 8.46 8.46 0 0 0 3.976.673h6.074q5.574 0 8.563 2.348a8.16 8.16 0 0 1 2.99 6.825 9.74 9.74 0 0 1-4.571 8.688q-4.57 2.989-13.337 2.99-6.732 0-10.379-2.5a8.09 8.09 0 0 1-3.648-7.076 7.95 7.95 0 0 1 2-5.417 10.2 10.2 0 0 1 5.636-3.1 5.43 5.43 0 0 1-2.208-1.847 4.9 4.9 0 0 1-.892-2.912 5.53 5.53 0 0 1 1-3.288 10.5 10.5 0 0 1 3.162-2.723 9.27 9.27 0 0 1-4.336-3.726 10.95 10.95 0 0 1-1.675-6.012q0-5.634 3.381-8.688t9.581-3.052a17.4 17.4 0 0 1 4.853.626Zm-27.364 40.075a4.66 4.66 0 0 0 2.348 4.227 12.97 12.97 0 0 0 6.731 1.44q6.544 0 9.691-1.956a5.99 5.99 0 0 0 3.146-5.307q0-2.787-1.722-3.867t-6.481-1.08h-6.23a8.2 8.2 0 0 0-5.511 1.69 6.04 6.04 0 0 0-1.972 4.853m2.818-29.086a6.98 6.98 0 0 0 2.035 5.448 8.12 8.12 0 0 0 5.667 1.847q7.607 0 7.608-7.389 0-7.733-7.7-7.733a7.63 7.63 0 0 0-5.635 1.972q-1.975 1.973-1.975 5.855\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2945\"})),b||(b=i.createElement(\"path\",{id:\"logo_small_svg__Path_2946\",d:\"M316.778 70.928q-7.608 0-12.007-4.634t-4.4-12.868q0-8.3 4.086-13.181a13.57 13.57 0 0 1 10.974-4.884 12.94 12.94 0 0 1 10.207 4.239q3.762 4.247 3.762 11.2v3.287h-23.643q.156 6.044 3.053 9.174t8.156 3.131a27.6 27.6 0 0 0 10.958-2.317v4.634a27.5 27.5 0 0 1-5.213 1.706 29.3 29.3 0 0 1-5.933.513m-1.409-31.215a8.49 8.49 0 0 0-6.591 2.692 12.4 12.4 0 0 0-2.9 7.452h17.94q0-4.916-2.191-7.53a7.71 7.71 0 0 0-6.258-2.614\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2946\"})),w||(w=i.createElement(\"path\",{id:\"logo_small_svg__Path_2947\",d:\"M350.9 35.361a20.4 20.4 0 0 1 4.1.375l-.721 4.822a17.7 17.7 0 0 0-3.757-.47 9.14 9.14 0 0 0-7.122 3.382 12.33 12.33 0 0 0-2.959 8.422V70.3h-5.2V35.987h4.29l.6 6.356h.25a15.1 15.1 0 0 1 4.6-5.166 10.36 10.36 0 0 1 5.919-1.816\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2947\"})),I||(I=i.createElement(\"path\",{id:\"logo_small_svg__Path_2948\",d:\"M255.857 96.638s-3.43-.391-4.85-.391c-2.058 0-3.111.735-3.111 2.18 0 1.568.882 1.935 3.748 2.719 3.527.98 4.8 1.911 4.8 4.777 0 3.675-2.3 5.267-5.61 5.267a36 36 0 0 1-5.487-.662l.27-2.18s3.306.441 5.046.441c2.082 0 3.037-.931 3.037-2.7 0-1.421-.759-1.91-3.331-2.523-3.626-.93-5.193-2.033-5.193-4.948 0-3.381 2.229-4.776 5.585-4.776a37 37 0 0 1 5.315.587Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2948\"})),x||(x=i.createElement(\"path\",{id:\"logo_small_svg__Path_2949\",d:\"M262.967 94.14h4.733l3.748 13.106L275.2 94.14h4.752v16.78H277.2v-14.5h-.145l-4.191 13.816h-2.842l-4.191-13.816h-.145v14.5h-2.719Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2949\"})),B||(B=i.createElement(\"path\",{id:\"logo_small_svg__Path_2950\",d:\"M322.057 94.14H334.3v2.425h-4.728v14.355h-2.743V96.565h-4.777Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2950\"})),k||(k=i.createElement(\"path\",{id:\"logo_small_svg__Path_2951\",d:\"M346.137 94.14c3.332 0 5.12 1.249 5.12 4.361 0 2.033-.637 3.037-1.984 3.772 1.445.563 2.4 1.592 2.4 3.9 0 3.43-2.081 4.752-5.339 4.752h-6.566V94.14Zm-3.65 2.352v4.8h3.6c1.666 0 2.4-.832 2.4-2.474 0-1.617-.833-2.327-2.5-2.327Zm0 7.1v4.973h3.7c1.689 0 2.694-.539 2.694-2.548 0-1.911-1.421-2.425-2.744-2.425Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2951\"})),C||(C=i.createElement(\"path\",{id:\"logo_small_svg__Path_2952\",d:\"M358.414 94.14H369v2.377h-7.864v4.751h6.394v2.332h-6.394v4.924H369v2.4h-10.586Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2952\"})),q||(q=i.createElement(\"path\",{id:\"logo_small_svg__Path_2953\",d:\"M378.747 94.14h5.414l4.164 16.78h-2.744l-1.239-4.92h-5.777l-1.239 4.923h-2.719Zm.361 9.456h4.708l-1.737-7.178h-1.225Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2953\"})),L||(L=i.createElement(\"path\",{id:\"logo_small_svg__Path_2954\",d:\"M397.1 105.947v4.973h-2.719V94.14h6.37c3.7 0 5.683 2.12 5.683 5.843 0 2.376-.956 4.519-2.744 5.352l2.769 5.585h-2.989l-2.426-4.973Zm3.651-9.455H397.1v7.1h3.7c2.057 0 2.841-1.85 2.841-3.589 0-1.9-.934-3.511-2.894-3.511Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2954\"})),j||(j=i.createElement(\"path\",{id:\"logo_small_svg__Path_2955\",d:\"M290.013 94.14h5.413l4.164 16.78h-2.743l-1.239-4.92h-5.777l-1.239 4.923h-2.719Zm.361 9.456h4.707l-1.737-7.178h-1.225Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2955\"})),z||(z=i.createElement(\"path\",{id:\"logo_small_svg__Path_2956\",d:\"M308.362 105.947v4.973h-2.719V94.14h6.369c3.7 0 5.683 2.12 5.683 5.843 0 2.376-.955 4.519-2.743 5.352l2.768 5.585h-2.989l-2.425-4.973Zm3.65-9.455h-3.65v7.1h3.7c2.058 0 2.841-1.85 2.841-3.589-.003-1.903-.931-3.511-2.891-3.511\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2956\"})),P||(P=i.createElement(\"path\",{id:\"logo_small_svg__Path_2957\",d:\"M130.606 107.643a3.02 3.02 0 0 1-1.18 2.537 5.1 5.1 0 0 1-3.2.91 8 8 0 0 1-3.371-.564v-1.383a9 9 0 0 0 1.652.506 8.7 8.7 0 0 0 1.77.186 3.57 3.57 0 0 0 2.157-.544 1.78 1.78 0 0 0 .725-1.512 1.95 1.95 0 0 0-.257-1.05 2.4 2.4 0 0 0-.86-.754 12 12 0 0 0-1.833-.784 5.84 5.84 0 0 1-2.456-1.458 3.2 3.2 0 0 1-.738-2.2 2.74 2.74 0 0 1 1.071-2.267 4.44 4.44 0 0 1 2.831-.843 8.3 8.3 0 0 1 3.38.675l-.447 1.247a7.6 7.6 0 0 0-2.966-.641 2.88 2.88 0 0 0-1.779.489 1.61 1.61 0 0 0-.64 1.357 2.1 2.1 0 0 0 .236 1.049 2.2 2.2 0 0 0 .8.75 10 10 0 0 0 1.715.754 6.8 6.8 0 0 1 2.667 1.483 2.92 2.92 0 0 1 .723 2.057\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2957\"})),D||(D=i.createElement(\"path\",{id:\"logo_small_svg__Path_2958\",d:\"M134.447 101.686v5.991a2.4 2.4 0 0 0 .515 1.686 2.1 2.1 0 0 0 1.609.556 2.63 2.63 0 0 0 2.12-.792 4 4 0 0 0 .67-2.587v-4.854h1.4v9.236H139.6l-.2-1.239h-.075a2.8 2.8 0 0 1-1.193 1.045 4 4 0 0 1-1.74.362 3.53 3.53 0 0 1-2.524-.8 3.4 3.4 0 0 1-.839-2.562v-6.042Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2958\"})),U||(U=i.createElement(\"path\",{id:\"logo_small_svg__Path_2959\",d:\"M148.206 111.09a4 4 0 0 1-1.647-.333 3.1 3.1 0 0 1-1.252-1.023h-.1a12 12 0 0 1 .1 1.533v3.8h-1.4v-13.381h1.137l.194 1.264h.067a3.26 3.26 0 0 1 1.256-1.1 3.8 3.8 0 0 1 1.643-.337 3.41 3.41 0 0 1 2.836 1.256 6.68 6.68 0 0 1-.017 7.057 3.42 3.42 0 0 1-2.817 1.264m-.2-8.385a2.48 2.48 0 0 0-2.048.784 4.04 4.04 0 0 0-.649 2.494v.312a4.63 4.63 0 0 0 .649 2.785 2.47 2.47 0 0 0 2.082.839 2.16 2.16 0 0 0 1.875-.969 4.6 4.6 0 0 0 .678-2.671 4.43 4.43 0 0 0-.678-2.651 2.23 2.23 0 0 0-1.915-.923Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2959\"})),W||(W=i.createElement(\"path\",{id:\"logo_small_svg__Path_2960\",d:\"M159.039 111.09a4 4 0 0 1-1.647-.333 3.1 3.1 0 0 1-1.252-1.023h-.1a12 12 0 0 1 .1 1.533v3.8h-1.4v-13.381h1.137l.194 1.264h.067a3.26 3.26 0 0 1 1.256-1.1 3.8 3.8 0 0 1 1.643-.337 3.41 3.41 0 0 1 2.836 1.256 6.68 6.68 0 0 1-.017 7.057 3.42 3.42 0 0 1-2.817 1.264m-.2-8.385a2.48 2.48 0 0 0-2.048.784 4.04 4.04 0 0 0-.649 2.494v.312a4.63 4.63 0 0 0 .649 2.785 2.47 2.47 0 0 0 2.082.839 2.16 2.16 0 0 0 1.875-.969 4.6 4.6 0 0 0 .678-2.671 4.43 4.43 0 0 0-.678-2.651 2.23 2.23 0 0 0-1.911-.923Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2960\"})),K||(K=i.createElement(\"path\",{id:\"logo_small_svg__Path_2961\",d:\"M173.612 106.3a5.1 5.1 0 0 1-1.137 3.527 4 4 0 0 1-3.143 1.268 4.17 4.17 0 0 1-2.2-.581 3.84 3.84 0 0 1-1.483-1.669 5.8 5.8 0 0 1-.522-2.545 5.1 5.1 0 0 1 1.129-3.518 4 4 0 0 1 3.135-1.26 3.9 3.9 0 0 1 3.08 1.29 5.07 5.07 0 0 1 1.141 3.488m-7.036 0a4.4 4.4 0 0 0 .708 2.7 2.81 2.81 0 0 0 4.167 0 4.37 4.37 0 0 0 .712-2.7 4.3 4.3 0 0 0-.712-2.675 2.5 2.5 0 0 0-2.1-.915 2.46 2.46 0 0 0-2.072.9 4.33 4.33 0 0 0-.7 2.69Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2961\"})),V||(V=i.createElement(\"path\",{id:\"logo_small_svg__Path_2962\",d:\"M180.525 101.517a5.5 5.5 0 0 1 1.1.1l-.194 1.3a4.8 4.8 0 0 0-1.011-.127 2.46 2.46 0 0 0-1.917.911 3.32 3.32 0 0 0-.8 2.267v4.955h-1.4v-9.236h1.154l.16 1.71h.068a4.05 4.05 0 0 1 1.238-1.39 2.8 2.8 0 0 1 1.6-.49Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2962\"})),$||($=i.createElement(\"path\",{id:\"logo_small_svg__Path_2963\",d:\"M187.363 109.936a4.5 4.5 0 0 0 .716-.055 4 4 0 0 0 .548-.114v1.07a2.5 2.5 0 0 1-.67.181 5 5 0 0 1-.8.072q-2.68 0-2.68-2.823v-5.494h-1.323v-.673l1.323-.582.59-1.972h.809v2.141h2.68v1.087h-2.68v5.435a1.87 1.87 0 0 0 .4 1.281 1.38 1.38 0 0 0 1.087.446\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2963\"})),H||(H=i.createElement(\"path\",{id:\"logo_small_svg__Path_2964\",d:\"M194.538 111.09a4.24 4.24 0 0 1-3.231-1.247 4.82 4.82 0 0 1-1.184-3.463 5.36 5.36 0 0 1 1.1-3.548 3.65 3.65 0 0 1 2.954-1.315 3.48 3.48 0 0 1 2.747 1.142 4.38 4.38 0 0 1 1.011 3.013v.885h-6.362a3.66 3.66 0 0 0 .822 2.469 2.84 2.84 0 0 0 2.2.843 7.4 7.4 0 0 0 2.949-.624v1.247a7.4 7.4 0 0 1-1.4.459 8 8 0 0 1-1.6.139Zm-.379-8.4a2.29 2.29 0 0 0-1.774.725 3.34 3.34 0 0 0-.779 2.006h4.828a3.07 3.07 0 0 0-.59-2.027 2.08 2.08 0 0 0-1.685-.706Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2964\"})),Y||(Y=i.createElement(\"path\",{id:\"logo_small_svg__Path_2965\",d:\"M206.951 109.683h-.076a3.29 3.29 0 0 1-2.9 1.407 3.43 3.43 0 0 1-2.819-1.239 5.45 5.45 0 0 1-1.006-3.522 5.54 5.54 0 0 1 1.011-3.548 3.4 3.4 0 0 1 2.814-1.264 3.36 3.36 0 0 1 2.883 1.365h.109l-.059-.665-.034-.649v-3.759h1.4v13.113h-1.138Zm-2.8.236a2.55 2.55 0 0 0 2.078-.779 3.95 3.95 0 0 0 .644-2.516v-.3a4.64 4.64 0 0 0-.653-2.8 2.48 2.48 0 0 0-2.086-.839 2.14 2.14 0 0 0-1.883.957 4.76 4.76 0 0 0-.653 2.7 4.55 4.55 0 0 0 .649 2.671 2.2 2.2 0 0 0 1.906.906Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2965\"})),Z||(Z=i.createElement(\"path\",{id:\"logo_small_svg__Path_2966\",d:\"M220.712 101.534a3.44 3.44 0 0 1 2.827 1.243 6.65 6.65 0 0 1-.009 7.053 3.42 3.42 0 0 1-2.818 1.26 4 4 0 0 1-1.648-.333 3.1 3.1 0 0 1-1.251-1.023h-.1l-.295 1.188h-1V97.809h1.4V101q0 1.069-.068 1.921h.068a3.32 3.32 0 0 1 2.894-1.387m-.2 1.171a2.44 2.44 0 0 0-2.064.822 6.34 6.34 0 0 0 .017 5.553 2.46 2.46 0 0 0 2.081.839 2.16 2.16 0 0 0 1.922-.94 4.83 4.83 0 0 0 .632-2.7 4.64 4.64 0 0 0-.632-2.689 2.24 2.24 0 0 0-1.959-.885Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2966\"})),J||(J=i.createElement(\"path\",{id:\"logo_small_svg__Path_2967\",d:\"M225.758 101.686h1.5l2.023 5.267a20 20 0 0 1 .826 2.6h.067q.109-.431.459-1.471t2.288-6.4h1.5l-3.969 10.518a5.25 5.25 0 0 1-1.378 2.212 2.93 2.93 0 0 1-1.934.653 5.7 5.7 0 0 1-1.264-.143V113.8a5 5 0 0 0 1.037.1 2.136 2.136 0 0 0 2.056-1.618l.514-1.314Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2967\"}))))),components_Logo=()=>i.createElement(logo_small,{height:\"40\"}),top_bar=()=>({components:{Topbar:c,Logo:components_Logo}});function isNothing(e){return null==e}var X={isNothing,isObject:function js_yaml_isObject(e){return\"object\"==typeof e&&null!==e},toArray:function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]},repeat:function repeat(e,t){var r,n=\"\";for(r=0;r<t;r+=1)n+=e;return n},isNegativeZero:function isNegativeZero(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function extend(e,t){var r,n,i,o;if(t)for(r=0,n=(o=Object.keys(t)).length;r<n;r+=1)e[i=o[r]]=t[i];return e}};function formatError(e,t){var r=\"\",n=e.reason||\"(unknown reason)\";return e.mark?(e.mark.name&&(r+='in \"'+e.mark.name+'\" '),r+=\"(\"+(e.mark.line+1)+\":\"+(e.mark.column+1)+\")\",!t&&e.mark.snippet&&(r+=\"\\n\\n\"+e.mark.snippet),n+\" \"+r):n}function YAMLException$1(e,t){Error.call(this),this.name=\"YAMLException\",this.reason=e,this.mark=t,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(e){return this.name+\": \"+formatError(this,e)};var ee=YAMLException$1;function getLine(e,t,r,n,i){var o=\"\",a=\"\",s=Math.floor(i/2)-1;return n-t>s&&(t=n-s+(o=\" ... \").length),r-n>s&&(r=n+s-(a=\" ...\").length),{str:o+e.slice(t,r).replace(/\\t/g,\"→\")+a,pos:n-t+o.length}}function padStart(e,t){return X.repeat(\" \",t-e.length)+e}var te=function makeSnippet(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),\"number\"!=typeof t.indent&&(t.indent=1),\"number\"!=typeof t.linesBefore&&(t.linesBefore=3),\"number\"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\\r?\\n|\\r|\\0/g,i=[0],o=[],a=-1;r=n.exec(e.buffer);)o.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,u,c=\"\",f=Math.min(e.line+t.linesAfter,o.length).toString().length,l=t.maxLength-(t.indent+f+3);for(s=1;s<=t.linesBefore&&!(a-s<0);s++)u=getLine(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),l),c=X.repeat(\" \",t.indent)+padStart((e.line-s+1).toString(),f)+\" | \"+u.str+\"\\n\"+c;for(u=getLine(e.buffer,i[a],o[a],e.position,l),c+=X.repeat(\" \",t.indent)+padStart((e.line+1).toString(),f)+\" | \"+u.str+\"\\n\",c+=X.repeat(\"-\",t.indent+f+3+u.pos)+\"^\\n\",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)u=getLine(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),l),c+=X.repeat(\" \",t.indent)+padStart((e.line+s+1).toString(),f)+\" | \"+u.str+\"\\n\";return c.replace(/\\n$/,\"\")},re=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],ne=[\"scalar\",\"sequence\",\"mapping\"];var ie=function Type$1(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===re.indexOf(t))throw new ee('Unknown option \"'+t+'\" is met in definition of \"'+e+'\" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function compileStyleAliases(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===ne.indexOf(this.kind))throw new ee('Unknown kind \"'+this.kind+'\" is specified for \"'+e+'\" YAML type.')};function compileList(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function Schema$1(e){return this.extend(e)}Schema$1.prototype.extend=function extend(e){var t=[],r=[];if(e instanceof ie)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new ee(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof ie))throw new ee(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(e.loadKind&&\"scalar\"!==e.loadKind)throw new ee(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(e.multi)throw new ee(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),r.forEach((function(e){if(!(e instanceof ie))throw new ee(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var n=Object.create(Schema$1.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=compileList(n,\"implicit\"),n.compiledExplicit=compileList(n,\"explicit\"),n.compiledTypeMap=function compileMap(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(collectType);return r}(n.compiledImplicit,n.compiledExplicit),n};var oe=Schema$1,ae=new ie(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(e){return null!==e?e:\"\"}}),se=new ie(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(e){return null!==e?e:[]}}),ue=new ie(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(e){return null!==e?e:{}}}),ce=new oe({explicit:[ae,se,ue]});var fe=new ie(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(e){if(null===e)return!0;var t=e.length;return 1===t&&\"~\"===e||4===t&&(\"null\"===e||\"Null\"===e||\"NULL\"===e)},construct:function constructYamlNull(){return null},predicate:function isNull(e){return null===e},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var le=new ie(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(e){if(null===e)return!1;var t=e.length;return 4===t&&(\"true\"===e||\"True\"===e||\"TRUE\"===e)||5===t&&(\"false\"===e||\"False\"===e||\"FALSE\"===e)},construct:function constructYamlBoolean(e){return\"true\"===e||\"True\"===e||\"TRUE\"===e},predicate:function isBoolean(e){return\"[object Boolean]\"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?\"true\":\"false\"},uppercase:function(e){return e?\"TRUE\":\"FALSE\"},camelcase:function(e){return e?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}var he=new ie(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(e){if(null===e)return!1;var t,r,n=e.length,i=0,o=!1;if(!n)return!1;if(\"-\"!==(t=e[i])&&\"+\"!==t||(t=e[++i]),\"0\"===t){if(i+1===n)return!0;if(\"b\"===(t=e[++i])){for(i++;i<n;i++)if(\"_\"!==(t=e[i])){if(\"0\"!==t&&\"1\"!==t)return!1;o=!0}return o&&\"_\"!==t}if(\"x\"===t){for(i++;i<n;i++)if(\"_\"!==(t=e[i])){if(!(48<=(r=e.charCodeAt(i))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;o=!0}return o&&\"_\"!==t}if(\"o\"===t){for(i++;i<n;i++)if(\"_\"!==(t=e[i])){if(!isOctCode(e.charCodeAt(i)))return!1;o=!0}return o&&\"_\"!==t}}if(\"_\"===t)return!1;for(;i<n;i++)if(\"_\"!==(t=e[i])){if(!isDecCode(e.charCodeAt(i)))return!1;o=!0}return!(!o||\"_\"===t)},construct:function constructYamlInteger(e){var t,r=e,n=1;if(-1!==r.indexOf(\"_\")&&(r=r.replace(/_/g,\"\")),\"-\"!==(t=r[0])&&\"+\"!==t||(\"-\"===t&&(n=-1),t=(r=r.slice(1))[0]),\"0\"===r)return 0;if(\"0\"===t){if(\"b\"===r[1])return n*parseInt(r.slice(2),2);if(\"x\"===r[1])return n*parseInt(r.slice(2),16);if(\"o\"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function isInteger(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&e%1==0&&!X.isNegativeZero(e)},represent:{binary:function(e){return e>=0?\"0b\"+e.toString(2):\"-0b\"+e.toString(2).slice(1)},octal:function(e){return e>=0?\"0o\"+e.toString(8):\"-0o\"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?\"0x\"+e.toString(16).toUpperCase():\"-0x\"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),pe=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var de=/^[-+]?[0-9]+e/;var _e=new ie(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(e){return null!==e&&!(!pe.test(e)||\"_\"===e[e.length-1])},construct:function constructYamlFloat(e){var t,r;return r=\"-\"===(t=e.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(t[0])>=0&&(t=t.slice(1)),\".inf\"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===t?NaN:r*parseFloat(t,10)},predicate:function isFloat(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&(e%1!=0||X.isNegativeZero(e))},represent:function representYamlFloat(e,t){var r;if(isNaN(e))switch(t){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===e)switch(t){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(X.isNegativeZero(e))return\"-0.0\";return r=e.toString(10),de.test(r)?r.replace(\"e\",\".e\"):r},defaultStyle:\"lowercase\"}),ye=ce.extend({implicit:[fe,le,he,_e]}),me=ye,ge=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),ve=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var be=new ie(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(e){return null!==e&&(null!==ge.exec(e)||null!==ve.exec(e))},construct:function constructYamlTimestamp(e){var t,r,n,i,o,a,s,u,c=0,f=null;if(null===(t=ge.exec(e))&&(t=ve.exec(e)),null===t)throw new Error(\"Date resolve error\");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=\"0\";c=+c}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),\"-\"===t[9]&&(f=-f)),u=new Date(Date.UTC(r,n,i,o,a,s,c)),f&&u.setTime(u.getTime()-f),u},instanceOf:Date,represent:function representYamlTimestamp(e){return e.toISOString()}});var Se=new ie(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(e){return\"<<\"===e||null===e}}),we=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var Ie=new ie(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=we;for(r=0;r<i;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function constructYamlBinary(e){var t,r,n=e.replace(/[\\r\\n=]/g,\"\"),i=n.length,o=we,a=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)},predicate:function isBinary(e){return\"[object Uint8Array]\"===Object.prototype.toString.call(e)},represent:function representYamlBinary(e){var t,r,n=\"\",i=0,o=e.length,a=we;for(t=0;t<o;t++)t%3==0&&t&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+e[t];return 0===(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}}),xe=Object.prototype.hasOwnProperty,Ee=Object.prototype.toString;var Oe=new ie(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(e){if(null===e)return!0;var t,r,n,i,o,a=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],o=!1,\"[object Object]\"!==Ee.call(n))return!1;for(i in n)if(xe.call(n,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0},construct:function constructYamlOmap(e){return null!==e?e:[]}}),Be=Object.prototype.toString;var ke=new ie(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(e){if(null===e)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],\"[object Object]\"!==Be.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[t]=[i[0],n[i[0]]]}return!0},construct:function constructYamlPairs(e){if(null===e)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}}),Ae=Object.prototype.hasOwnProperty;var Ce=new ie(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(e){if(null===e)return!0;var t,r=e;for(t in r)if(Ae.call(r,t)&&null!==r[t])return!1;return!0},construct:function constructYamlSet(e){return null!==e?e:{}}}),Me=me.extend({implicit:[be,Se],explicit:[Ie,Oe,ke,Ce]}),qe=Object.prototype.hasOwnProperty,Le=1,Ne=2,je=3,Te=4,Re=1,ze=2,Pe=3,Fe=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,De=/[\\x85\\u2028\\u2029]/,Ue=/[,\\[\\]\\{\\}]/,We=/^(?:!|!!|![a-z\\-]+!)$/i,Ke=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return 10===e||13===e}function is_WHITE_SPACE(e){return 9===e||32===e}function is_WS_OR_EOL(e){return 9===e||32===e||10===e||13===e}function is_FLOW_INDICATOR(e){return 44===e||91===e||93===e||123===e||125===e}function fromHexCode(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function simpleEscapeSequence(e){return 48===e?\"\\0\":97===e?\"\u0007\":98===e?\"\\b\":116===e||9===e?\"\\t\":110===e?\"\\n\":118===e?\"\\v\":102===e?\"\\f\":114===e?\"\\r\":101===e?\"\u001b\":32===e?\" \":34===e?'\"':47===e?\"/\":92===e?\"\\\\\":78===e?\"\":95===e?\" \":76===e?\"\\u2028\":80===e?\"\\u2029\":\"\"}function charFromCodepoint(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var Ve=new Array(256),$e=new Array(256),He=0;He<256;He++)Ve[He]=simpleEscapeSequence(He)?1:0,$e[He]=simpleEscapeSequence(He);function State$1(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Me,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=te(r),new ee(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}var Ye={YAML:function handleYamlDirective(e,t,r){var n,i,o;null!==e.version&&throwError(e,\"duplication of %YAML directive\"),1!==r.length&&throwError(e,\"YAML directive accepts exactly one argument\"),null===(n=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]))&&throwError(e,\"ill-formed argument of the YAML directive\"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&throwError(e,\"unacceptable YAML version of the document\"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&throwWarning(e,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(e,t,r){var n,i;2!==r.length&&throwError(e,\"TAG directive accepts exactly two arguments\"),n=r[0],i=r[1],We.test(n)||throwError(e,\"ill-formed tag handle (first argument) of the TAG directive\"),qe.call(e.tagMap,n)&&throwError(e,'there is a previously declared suffix for \"'+n+'\" tag handle'),Ke.test(i)||throwError(e,\"ill-formed tag prefix (second argument) of the TAG directive\");try{i=decodeURIComponent(i)}catch(t){throwError(e,\"tag prefix is malformed: \"+i)}e.tagMap[n]=i}};function captureSegment(e,t,r,n){var i,o,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||throwError(e,\"expected valid JSON character\");else Fe.test(s)&&throwError(e,\"the stream contains non-printable characters\");e.result+=s}}function mergeMappings(e,t,r,n){var i,o,a,s;for(X.isObject(r)||throwError(e,\"cannot merge mappings; the provided source object is unacceptable\"),a=0,s=(i=Object.keys(r)).length;a<s;a+=1)o=i[a],qe.call(t,o)||(t[o]=r[o],n[o]=!0)}function storeMappingPair(e,t,r,n,i,o,a,s,u){var c,f;if(Array.isArray(i))for(c=0,f=(i=Array.prototype.slice.call(i)).length;c<f;c+=1)Array.isArray(i[c])&&throwError(e,\"nested arrays are not supported inside keys\"),\"object\"==typeof i&&\"[object Object]\"===_class(i[c])&&(i[c]=\"[object Object]\");if(\"object\"==typeof i&&\"[object Object]\"===_class(i)&&(i=\"[object Object]\"),i=String(i),null===t&&(t={}),\"tag:yaml.org,2002:merge\"===n)if(Array.isArray(o))for(c=0,f=o.length;c<f;c+=1)mergeMappings(e,t,o[c],r);else mergeMappings(e,t,o,r);else e.json||qe.call(r,i)||!qe.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=u||e.position,throwError(e,\"duplicated mapping key\")),\"__proto__\"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}function readLineBreak(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):throwError(e,\"a line break is expected\"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function skipSeparationSpace(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;is_WHITE_SPACE(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!is_EOL(i))break;for(readLineBreak(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&throwWarning(e,\"deficient indentation\"),n}function testDocumentSeparator(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!is_WS_OR_EOL(t)))}function writeFoldedLines(e,t){1===t?e.result+=\" \":t>1&&(e.result+=X.repeat(\"\\n\",t-1))}function readBlockSequence(e,t){var r,n,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,throwError(e,\"tab characters must not be used in indentation\")),45===n)&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,skipSeparationSpace(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,composeNode(e,t,je,!1,!0),a.push(e.result),skipSeparationSpace(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)throwError(e,\"bad indentation of a sequence entry\");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind=\"sequence\",e.result=a,!0)}function readTagProperty(e){var t,r,n,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&throwError(e,\"duplication of a tag property\"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,r=\"!!\",i=e.input.charCodeAt(++e.position)):r=\"!\",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):throwError(e,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==i&&!is_WS_OR_EOL(i);)33===i&&(a?throwError(e,\"tag suffix cannot contain exclamation marks\"):(r=e.input.slice(t-1,e.position+1),We.test(r)||throwError(e,\"named tag handle cannot contain such characters\"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),Ue.test(n)&&throwError(e,\"tag suffix cannot contain flow indicator characters\")}n&&!Ke.test(n)&&throwError(e,\"tag name cannot contain such characters: \"+n);try{n=decodeURIComponent(n)}catch(t){throwError(e,\"tag name is malformed: \"+n)}return o?e.tag=n:qe.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:\"!\"===r?e.tag=\"!\"+n:\"!!\"===r?e.tag=\"tag:yaml.org,2002:\"+n:throwError(e,'undeclared tag handle \"'+r+'\"'),!0}function readAnchorProperty(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&throwError(e,\"duplication of an anchor property\"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,\"name of an anchor node must contain at least one character\"),e.anchor=e.input.slice(t,e.position),!0}function composeNode(e,t,r,n,i){var o,a,s,u,c,f,l,h,p,d=1,_=!1,y=!1;if(null!==e.listener&&e.listener(\"open\",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=Te===r||je===r,n&&skipSeparationSpace(e,!0,-1)&&(_=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),1===d)for(;readTagProperty(e)||readAnchorProperty(e);)skipSeparationSpace(e,!0,-1)?(_=!0,s=o,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):s=!1;if(s&&(s=_||i),1!==d&&Te!==r||(h=Le===r||Ne===r?t:t+1,p=e.position-e.lineStart,1===d?s&&(readBlockSequence(e,p)||function readBlockMapping(e,t,r){var n,i,o,a,s,u,c,f=e.tag,l=e.anchor,h={},p=Object.create(null),d=null,_=null,y=null,m=!1,g=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=h),c=e.input.charCodeAt(e.position);0!==c;){if(m||-1===e.firstTabInLine||(e.position=e.firstTabInLine,throwError(e,\"tab characters must not be used in indentation\")),n=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!is_WS_OR_EOL(n)){if(a=e.line,s=e.lineStart,u=e.position,!composeNode(e,r,Ne,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);is_WHITE_SPACE(c);)c=e.input.charCodeAt(++e.position);if(58===c)is_WS_OR_EOL(c=e.input.charCodeAt(++e.position))||throwError(e,\"a whitespace character is expected after the key-value separator within a block mapping\"),m&&(storeMappingPair(e,h,p,d,_,null,a,s,u),d=_=y=null),g=!0,m=!1,i=!1,d=e.tag,_=e.result;else{if(!g)return e.tag=f,e.anchor=l,!0;throwError(e,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!g)return e.tag=f,e.anchor=l,!0;throwError(e,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===c?(m&&(storeMappingPair(e,h,p,d,_,null,a,s,u),d=_=y=null),g=!0,m=!0,i=!0):m?(m=!1,i=!0):throwError(e,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),e.position+=1,c=n;if((e.line===o||e.lineIndent>t)&&(m&&(a=e.line,s=e.lineStart,u=e.position),composeNode(e,t,Te,!0,i)&&(m?_=e.result:y=e.result),m||(storeMappingPair(e,h,p,d,_,y,a,s,u),d=_=y=null),skipSeparationSpace(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)throwError(e,\"bad indentation of a mapping entry\");else if(e.lineIndent<t)break}return m&&storeMappingPair(e,h,p,d,_,null,a,s,u),g&&(e.tag=f,e.anchor=l,e.kind=\"mapping\",e.result=h),g}(e,p,h))||function readFlowCollection(e,t){var r,n,i,o,a,s,u,c,f,l,h,p,d=!0,_=e.tag,y=e.anchor,m=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==p)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),p=e.input.charCodeAt(++e.position);0!==p;){if(skipSeparationSpace(e,!0,t),(p=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=_,e.anchor=y,e.kind=c?\"mapping\":\"sequence\",e.result=o,!0;d?44===p&&throwError(e,\"expected the node content, but found ','\"):throwError(e,\"missed comma between flow collection entries\"),h=null,s=u=!1,63===p&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1))&&(s=u=!0,e.position++,skipSeparationSpace(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,composeNode(e,t,Le,!1,!0),l=e.tag,f=e.result,skipSeparationSpace(e,!0,t),p=e.input.charCodeAt(e.position),!u&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,Le,!1,!0),h=e.result),c?storeMappingPair(e,o,m,l,f,h,r,n,i):s?o.push(storeMappingPair(e,null,m,l,f,h,r,n,i)):o.push(f),skipSeparationSpace(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(d=!0,p=e.input.charCodeAt(++e.position)):d=!1}throwError(e,\"unexpected end of the stream within a flow collection\")}(e,h)?y=!0:(a&&function readBlockScalar(e,t){var r,n,i,o,a,s=Re,u=!1,c=!1,f=t,l=0,h=!1;if(124===(o=e.input.charCodeAt(e.position)))n=!1;else{if(62!==o)return!1;n=!0}for(e.kind=\"scalar\",e.result=\"\";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)Re===s?s=43===o?Pe:ze:throwError(e,\"repeat of a chomping mode identifier\");else{if(!((i=48<=(a=o)&&a<=57?a-48:-1)>=0))break;0===i?throwError(e,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):c?throwError(e,\"repeat of an indentation width identifier\"):(f=t+i-1,c=!0)}if(is_WHITE_SPACE(o)){do{o=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!is_EOL(o)&&0!==o)}for(;0!==o;){for(readLineBreak(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!c||e.lineIndent<f)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>f&&(f=e.lineIndent),is_EOL(o))l++;else{if(e.lineIndent<f){s===Pe?e.result+=X.repeat(\"\\n\",u?1+l:l):s===Re&&u&&(e.result+=\"\\n\");break}for(n?is_WHITE_SPACE(o)?(h=!0,e.result+=X.repeat(\"\\n\",u?1+l:l)):h?(h=!1,e.result+=X.repeat(\"\\n\",l+1)):0===l?u&&(e.result+=\" \"):e.result+=X.repeat(\"\\n\",l):e.result+=X.repeat(\"\\n\",u?1+l:l),u=!0,c=!0,l=0,r=e.position;!is_EOL(o)&&0!==o;)o=e.input.charCodeAt(++e.position);captureSegment(e,r,e.position,!1)}}return!0}(e,h)||function readSingleQuotedScalar(e,t){var r,n,i;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(captureSegment(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else is_EOL(r)?(captureSegment(e,n,i,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),n=i=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,\"unexpected end of the document within a single quoted scalar\"):(e.position++,i=e.position);throwError(e,\"unexpected end of the stream within a single quoted scalar\")}(e,h)||function readDoubleQuotedScalar(e,t){var r,n,i,o,a,s,u;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return captureSegment(e,r,e.position,!0),e.position++,!0;if(92===s){if(captureSegment(e,r,e.position,!0),is_EOL(s=e.input.charCodeAt(++e.position)))skipSeparationSpace(e,!1,t);else if(s<256&&Ve[s])e.result+=$e[s],e.position++;else if((a=120===(u=s)?2:117===u?4:85===u?8:0)>0){for(i=a,o=0;i>0;i--)(a=fromHexCode(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:throwError(e,\"expected hexadecimal character\");e.result+=charFromCodepoint(o),e.position++}else throwError(e,\"unknown escape sequence\");r=n=e.position}else is_EOL(s)?(captureSegment(e,r,n,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),r=n=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,\"unexpected end of the document within a double quoted scalar\"):(e.position++,n=e.position)}throwError(e,\"unexpected end of the stream within a double quoted scalar\")}(e,h)?y=!0:!function readAlias(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,\"name of an alias node must contain at least one character\"),r=e.input.slice(t,e.position),qe.call(e.anchorMap,r)||throwError(e,'unidentified alias \"'+r+'\"'),e.result=e.anchorMap[r],skipSeparationSpace(e,!0,-1),!0}(e)?function readPlainScalar(e,t,r){var n,i,o,a,s,u,c,f,l=e.kind,h=e.result;if(is_WS_OR_EOL(f=e.input.charCodeAt(e.position))||is_FLOW_INDICATOR(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if((63===f||45===f)&&(is_WS_OR_EOL(n=e.input.charCodeAt(e.position+1))||r&&is_FLOW_INDICATOR(n)))return!1;for(e.kind=\"scalar\",e.result=\"\",i=o=e.position,a=!1;0!==f;){if(58===f){if(is_WS_OR_EOL(n=e.input.charCodeAt(e.position+1))||r&&is_FLOW_INDICATOR(n))break}else if(35===f){if(is_WS_OR_EOL(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(f))break;if(is_EOL(f)){if(s=e.line,u=e.lineStart,c=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=u,e.lineIndent=c;break}}a&&(captureSegment(e,i,o,!1),writeFoldedLines(e,e.line-s),i=o=e.position,a=!1),is_WHITE_SPACE(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return captureSegment(e,i,o,!1),!!e.result||(e.kind=l,e.result=h,!1)}(e,h,Le===r)&&(y=!0,null===e.tag&&(e.tag=\"?\")):(y=!0,null===e.tag&&null===e.anchor||throwError(e,\"alias node should not have any properties\")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(y=s&&readBlockSequence(e,p))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if(\"?\"===e.tag){for(null!==e.result&&\"scalar\"!==e.kind&&throwError(e,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+e.kind+'\"'),u=0,c=e.implicitTypes.length;u<c;u+=1)if((l=e.implicitTypes[u]).resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if(\"!\"!==e.tag){if(qe.call(e.typeMap[e.kind||\"fallback\"],e.tag))l=e.typeMap[e.kind||\"fallback\"][e.tag];else for(l=null,u=0,c=(f=e.typeMap.multi[e.kind||\"fallback\"]).length;u<c;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){l=f[u];break}l||throwError(e,\"unknown tag !<\"+e.tag+\">\"),null!==e.result&&l.kind!==e.kind&&throwError(e,\"unacceptable node kind for !<\"+e.tag+'> tag; it should be \"'+l.kind+'\", not \"'+e.kind+'\"'),l.resolve(e.result,e.tag)?(e.result=l.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,\"cannot resolve a node with !<\"+e.tag+\"> explicit tag\")}return null!==e.listener&&e.listener(\"close\",e),null!==e.tag||null!==e.anchor||y}function readDocument(e){var t,r,n,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!is_WS_OR_EOL(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&throwError(e,\"directive name must not be less than one character in length\");0!==i;){for(;is_WHITE_SPACE(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!is_EOL(i));break}if(is_EOL(i))break;for(t=e.position;0!==i&&!is_WS_OR_EOL(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&readLineBreak(e),qe.call(Ye,r)?Ye[r](e,r,n):throwWarning(e,'unknown document directive \"'+r+'\"')}skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):a&&throwError(e,\"directives end mark is expected\"),composeNode(e,e.lineIndent-1,Te,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&De.test(e.input.slice(o,e.position))&&throwWarning(e,\"non-ASCII line breaks are interpreted as content\"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1)):e.position<e.length-1&&throwError(e,\"end of the stream or a document separator is expected\")}function loadDocuments(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=\"\\n\"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new State$1(e,t),n=e.indexOf(\"\\0\");for(-1!==n&&(r.position=n,throwError(r,\"null byte is not allowed in input\")),r.input+=\"\\0\";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)readDocument(r);return r.documents}var Ze={loadAll:function loadAll$1(e,t,r){null!==t&&\"object\"==typeof t&&void 0===r&&(r=t,t=null);var n=loadDocuments(e,r);if(\"function\"!=typeof t)return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])},load:function load$1(e,t){var r=loadDocuments(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new ee(\"expected a single document in the stream, but found more\")}}},Ge=Object.prototype.toString,Je=Object.prototype.hasOwnProperty,Qe=65279,Xe=9,et=10,tt=13,rt=32,nt=33,it=34,ot=35,at=37,st=38,ut=39,ct=42,lt=44,ht=45,pt=58,dt=61,_t=62,yt=63,mt=64,gt=91,vt=93,bt=96,St=123,wt=124,It=125,xt={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Et=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Ot=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r=\"x\",n=2;else if(e<=65535)r=\"u\",n=4;else{if(!(e<=4294967295))throw new ee(\"code point within a string may not be greater than 0xFFFFFFFF\");r=\"U\",n=8}return\"\\\\\"+r+X.repeat(\"0\",n-t.length)+t}var Bt=1,kt=2;function State(e){this.schema=e.schema||Me,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=X.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function compileStyleMap(e,t){var r,n,i,o,a,s,u;if(null===t)return{};for(r={},i=0,o=(n=Object.keys(t)).length;i<o;i+=1)a=n[i],s=String(t[a]),\"!!\"===a.slice(0,2)&&(a=\"tag:yaml.org,2002:\"+a.slice(2)),(u=e.compiledTypeMap.fallback[a])&&Je.call(u.styleAliases,s)&&(s=u.styleAliases[s]),r[a]=s;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='\"'===e.quotingType?kt:Bt,this.forceQuotes=e.forceQuotes||!1,this.replacer=\"function\"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(e,t){for(var r,n=X.repeat(\" \",t),i=0,o=-1,a=\"\",s=e.length;i<s;)-1===(o=e.indexOf(\"\\n\",i))?(r=e.slice(i),i=s):(r=e.slice(i,o+1),i=o+1),r.length&&\"\\n\"!==r&&(a+=n),a+=r;return a}function generateNextLine(e,t){return\"\\n\"+X.repeat(\" \",e.indent*t)}function isWhitespace(e){return e===rt||e===Xe}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Qe||65536<=e&&e<=1114111}function isNsCharOrWhitespace(e){return isPrintable(e)&&e!==Qe&&e!==tt&&e!==et}function isPlainSafe(e,t,r){var n=isNsCharOrWhitespace(e),i=n&&!isWhitespace(e);return(r?n:n&&e!==lt&&e!==gt&&e!==vt&&e!==St&&e!==It)&&e!==ot&&!(t===pt&&!i)||isNsCharOrWhitespace(t)&&!isWhitespace(t)&&e===ot||t===pt&&i}function codePointAt(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function needIndentIndicator(e){return/^\\n* /.test(e)}var At=1,Ct=2,Mt=3,qt=4,Lt=5;function chooseScalarStyle(e,t,r,n,i,o,a,s){var u,c=0,f=null,l=!1,h=!1,p=-1!==n,d=-1,_=function isPlainSafeFirst(e){return isPrintable(e)&&e!==Qe&&!isWhitespace(e)&&e!==ht&&e!==yt&&e!==pt&&e!==lt&&e!==gt&&e!==vt&&e!==St&&e!==It&&e!==ot&&e!==st&&e!==ct&&e!==nt&&e!==wt&&e!==dt&&e!==_t&&e!==ut&&e!==it&&e!==at&&e!==mt&&e!==bt}(codePointAt(e,0))&&function isPlainSafeLast(e){return!isWhitespace(e)&&e!==pt}(codePointAt(e,e.length-1));if(t||a)for(u=0;u<e.length;c>=65536?u+=2:u++){if(!isPrintable(c=codePointAt(e,u)))return Lt;_=_&&isPlainSafe(c,f,s),f=c}else{for(u=0;u<e.length;c>=65536?u+=2:u++){if((c=codePointAt(e,u))===et)l=!0,p&&(h=h||u-d-1>n&&\" \"!==e[d+1],d=u);else if(!isPrintable(c))return Lt;_=_&&isPlainSafe(c,f,s),f=c}h=h||p&&u-d-1>n&&\" \"!==e[d+1]}return l||h?r>9&&needIndentIndicator(e)?Lt:a?o===kt?Lt:Ct:h?qt:Mt:!_||a||i(e)?o===kt?Lt:Ct:At}function writeScalar(e,t,r,n,i){e.dump=function(){if(0===t.length)return e.quotingType===kt?'\"\"':\"''\";if(!e.noCompatMode&&(-1!==Et.indexOf(t)||Ot.test(t)))return e.quotingType===kt?'\"'+t+'\"':\"'\"+t+\"'\";var o=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=n||e.flowLevel>-1&&r>=e.flowLevel;switch(chooseScalarStyle(t,s,e.indent,a,(function testAmbiguity(t){return function testImplicitResolving(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!n,i)){case At:return t;case Ct:return\"'\"+t.replace(/'/g,\"''\")+\"'\";case Mt:return\"|\"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case qt:return\">\"+blockHeader(t,e.indent)+dropEndingNewline(indentString(function foldString(e,t){var r,n,i=/(\\n+)([^\\n]*)/g,o=(s=e.indexOf(\"\\n\"),s=-1!==s?s:e.length,i.lastIndex=s,foldLine(e.slice(0,s),t)),a=\"\\n\"===e[0]||\" \"===e[0];var s;for(;n=i.exec(e);){var u=n[1],c=n[2];r=\" \"===c[0],o+=u+(a||r||\"\"===c?\"\":\"\\n\")+foldLine(c,t),a=r}return o}(t,a),o));case Lt:return'\"'+function escapeString(e){for(var t,r=\"\",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=codePointAt(e,i),!(t=xt[n])&&isPrintable(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||encodeHex(n);return r}(t)+'\"';default:throw new ee(\"impossible error: invalid scalar style\")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):\"\",n=\"\\n\"===e[e.length-1];return r+(n&&(\"\\n\"===e[e.length-2]||\"\\n\"===e)?\"+\":n?\"\":\"-\")+\"\\n\"}function dropEndingNewline(e){return\"\\n\"===e[e.length-1]?e.slice(0,-1):e}function foldLine(e,t){if(\"\"===e||\" \"===e[0])return e;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,u=\"\";r=i.exec(e);)(s=r.index)-o>t&&(n=a>o?a:s,u+=\"\\n\"+e.slice(o,n),o=n+1),a=s;return u+=\"\\n\",e.length-o>t&&a>o?u+=e.slice(o,a)+\"\\n\"+e.slice(a+1):u+=e.slice(o),u.slice(1)}function writeBlockSequence(e,t,r,n){var i,o,a,s=\"\",u=e.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(writeNode(e,t+1,a,!0,!0,!1,!0)||void 0===a&&writeNode(e,t+1,null,!0,!0,!1,!0))&&(n&&\"\"===s||(s+=generateNextLine(e,t)),e.dump&&et===e.dump.charCodeAt(0)?s+=\"-\":s+=\"- \",s+=e.dump);e.tag=u,e.dump=s||\"[]\"}function detectType(e,t,r){var n,i,o,a,s,u;for(o=0,a=(i=r?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=i[o]).instanceOf||s.predicate)&&(!s.instanceOf||\"object\"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=\"?\",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,\"[object Function]\"===Ge.call(s.represent))n=s.represent(t,u);else{if(!Je.call(s.represent,u))throw new ee(\"!<\"+s.tag+'> tag resolver accepts not \"'+u+'\" style');n=s.represent[u](t,u)}e.dump=n}return!0}return!1}function writeNode(e,t,r,n,i,o,a){e.tag=null,e.dump=r,detectType(e,r,!1)||detectType(e,r,!0);var s,u=Ge.call(e.dump),c=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var f,l,h=\"[object Object]\"===u||\"[object Array]\"===u;if(h&&(l=-1!==(f=e.duplicates.indexOf(r))),(null!==e.tag&&\"?\"!==e.tag||l||2!==e.indent&&t>0)&&(i=!1),l&&e.usedDuplicates[f])e.dump=\"*ref_\"+f;else{if(h&&l&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),\"[object Object]\"===u)n&&0!==Object.keys(e.dump).length?(!function writeBlockMapping(e,t,r,n){var i,o,a,s,u,c,f=\"\",l=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if(\"function\"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new ee(\"sortKeys must be a boolean or a function\");for(i=0,o=h.length;i<o;i+=1)c=\"\",n&&\"\"===f||(c+=generateNextLine(e,t)),s=r[a=h[i]],e.replacer&&(s=e.replacer.call(r,a,s)),writeNode(e,t+1,a,!0,!0,!0)&&((u=null!==e.tag&&\"?\"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&et===e.dump.charCodeAt(0)?c+=\"?\":c+=\"? \"),c+=e.dump,u&&(c+=generateNextLine(e,t)),writeNode(e,t+1,s,!0,u)&&(e.dump&&et===e.dump.charCodeAt(0)?c+=\":\":c+=\": \",f+=c+=e.dump));e.tag=l,e.dump=f||\"{}\"}(e,t,e.dump,i),l&&(e.dump=\"&ref_\"+f+e.dump)):(!function writeFlowMapping(e,t,r){var n,i,o,a,s,u=\"\",c=e.tag,f=Object.keys(r);for(n=0,i=f.length;n<i;n+=1)s=\"\",\"\"!==u&&(s+=\", \"),e.condenseFlow&&(s+='\"'),a=r[o=f[n]],e.replacer&&(a=e.replacer.call(r,o,a)),writeNode(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+=\"? \"),s+=e.dump+(e.condenseFlow?'\"':\"\")+\":\"+(e.condenseFlow?\"\":\" \"),writeNode(e,t,a,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump=\"{\"+u+\"}\"}(e,t,e.dump),l&&(e.dump=\"&ref_\"+f+\" \"+e.dump));else if(\"[object Array]\"===u)n&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?writeBlockSequence(e,t-1,e.dump,i):writeBlockSequence(e,t,e.dump,i),l&&(e.dump=\"&ref_\"+f+e.dump)):(!function writeFlowSequence(e,t,r){var n,i,o,a=\"\",s=e.tag;for(n=0,i=r.length;n<i;n+=1)o=r[n],e.replacer&&(o=e.replacer.call(r,String(n),o)),(writeNode(e,t,o,!1,!1)||void 0===o&&writeNode(e,t,null,!1,!1))&&(\"\"!==a&&(a+=\",\"+(e.condenseFlow?\"\":\" \")),a+=e.dump);e.tag=s,e.dump=\"[\"+a+\"]\"}(e,t,e.dump),l&&(e.dump=\"&ref_\"+f+\" \"+e.dump));else{if(\"[object String]\"!==u){if(\"[object Undefined]\"===u)return!1;if(e.skipInvalid)return!1;throw new ee(\"unacceptable kind of an object to dump \"+u)}\"?\"!==e.tag&&writeScalar(e,e.dump,t,o,c)}null!==e.tag&&\"?\"!==e.tag&&(s=encodeURI(\"!\"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,\"%21\"),s=\"!\"===e.tag[0]?\"!\"+s:\"tag:yaml.org,2002:\"===s.slice(0,18)?\"!!\"+s.slice(18):\"!<\"+s+\">\",e.dump=s+\" \"+e.dump)}return!0}function getDuplicateReferences(e,t){var r,n,i=[],o=[];for(inspectNode(e,i,o),r=0,n=o.length;r<n;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function inspectNode(e,t,r){var n,i,o;if(null!==e&&\"object\"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)inspectNode(e[i],t,r);else for(i=0,o=(n=Object.keys(e)).length;i<o;i+=1)inspectNode(e[n[i]],t,r)}function renamed(e,t){return function(){throw new Error(\"Function yaml.\"+e+\" is removed in js-yaml 4. Use yaml.\"+t+\" instead, which is now safe by default.\")}}const Nt={Type:ie,Schema:oe,FAILSAFE_SCHEMA:ce,JSON_SCHEMA:ye,CORE_SCHEMA:me,DEFAULT_SCHEMA:Me,load:Ze.load,loadAll:Ze.loadAll,dump:{dump:function dump$1(e,t){var r=new State(t=t||{});r.noRefs||getDuplicateReferences(e,r);var n=e;return r.replacer&&(n=r.replacer.call({\"\":n},\"\",n)),writeNode(r,0,n,!0,!0)?r.dump+\"\\n\":\"\"}}.dump,YAMLException:ee,types:{binary:Ie,float:_e,map:ue,null:fe,pairs:ke,set:Ce,timestamp:be,bool:le,int:he,merge:Se,omap:Oe,seq:se,str:ae},safeLoad:renamed(\"safeLoad\",\"load\"),safeLoadAll:renamed(\"safeLoadAll\",\"loadAll\"),safeDump:renamed(\"safeDump\",\"dump\")},parseYamlConfig=(e,t)=>{try{return Nt.load(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}},jt=\"configs_update\",Tt=\"configs_toggle\";function update(e,t){return{type:jt,payload:{[e]:t}}}function toggle(e){return{type:Tt,payload:e}}const loaded=()=>()=>{},downloadConfig=e=>t=>{const{fn:{fetch:r}}=t;return r(e)},getConfigByUrl=(e,t)=>({specActions:r})=>{if(e)return r.downloadConfig(e).then(next,next);function next(n){n instanceof Error||n.status>=400?(r.updateLoadingStatus(\"failedConfig\"),r.updateLoadingStatus(\"failedConfig\"),r.updateUrl(\"\"),console.error(n.statusText+\" \"+e.url),t(null)):t(parseYamlConfig(n.text))}},get=(e,t)=>e.getIn(Array.isArray(t)?t:[t]),Rt={[jt]:(e,t)=>e.merge((0,a.fromJS)(t.payload)),[Tt]:(e,t)=>{const r=t.payload,n=e.get(r);return e.set(r,!n)}},zt={getLocalConfig:()=>parseYamlConfig('---\\nurl: \"https://petstore.swagger.io/v2/swagger.json\"\\ndom_id: \"#swagger-ui\"\\nvalidatorUrl: \"https://validator.swagger.io/validator\"\\n')};var Pt=__webpack_require__(7248),Ft=__webpack_require__.n(Pt),Dt=__webpack_require__(7666),Ut=__webpack_require__.n(Dt);const Wt=console.error,withErrorBoundary=e=>t=>{const{getComponent:r,fn:n}=e(),o=r(\"ErrorBoundary\"),a=n.getDisplayName(t);class WithErrorBoundary extends i.Component{render(){return i.createElement(o,{targetName:a,getComponent:r,fn:n},i.createElement(t,Ut()({},this.props,this.context)))}}var s;return WithErrorBoundary.displayName=`WithErrorBoundary(${a})`,(s=t).prototype&&s.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=t.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:e})=>i.createElement(\"div\",{className:\"fallback\"},\"😱 \",i.createElement(\"i\",null,\"Could not render \",\"t\"===e?\"this component\":e,\", see the console.\"));class ErrorBoundary extends i.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:Wt},children:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}constructor(...e){super(...e),this.state={hasError:!1,error:null}}componentDidCatch(e,t){this.props.fn.componentDidCatch(e,t)}render(){const{getComponent:e,targetName:t,children:r}=this.props;if(this.state.hasError){const r=e(\"Fallback\");return i.createElement(r,{name:t})}return r}}const Kt=ErrorBoundary,Vt=[top_bar,function configsPlugin(){return{statePlugins:{spec:{actions:t,selectors:zt},configs:{reducers:Rt,actions:e,selectors:n}}}},stadalone_layout,(({componentList:e=[],fullOverride:t=!1}={})=>({getSystem:r})=>{const n=t?e:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...e],i=Ft()(n,Array(n.length).fill(((e,{fn:t})=>t.withErrorBoundary(e))));return{fn:{componentDidCatch:Wt,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:Kt,Fallback:fallback},wrapComponents:i}})({fullOverride:!0,componentList:[\"Topbar\",\"StandaloneLayout\",\"onlineValidatorBadge\"]})]})(),r=r.default})()));\n//# sourceMappingURL=swagger-ui-standalone-preset.js.map"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui.css",
    "content": ".swagger-ui{color:#3b4151;font-family:sans-serif/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODYyRjhERDU2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODYyRjhERDQ2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QTY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3QjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCS01IAAABMSURBVHjaYmR4/5+BFPBfAMFm/MBgx8RAGWCn1AAmSg34Q6kBDKMGMDCwICeMIemF/5QawEipAWwUhwEjMDvbAWlWkvVBwu8vQIABAEwBCph8U6c0AAAAAElFTkSuQmCC) repeat 0 0}.swagger-ui .debug-grid-8-solid{background:#fff url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAAAAD/4QMxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkIxMjI0OTczNjdCMzExRTZCMkJDRTI0MDgxMDAyMTcxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkIxMjI0OTc0NjdCMzExRTZCMkJDRTI0MDgxMDAyMTcxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QjEyMjQ5NzE2N0IzMTFFNkIyQkNFMjQwODEwMDIxNzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QjEyMjQ5NzI2N0IzMTFFNkIyQkNFMjQwODEwMDIxNzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAbGhopHSlBJiZBQi8vL0JHPz4+P0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHAR0pKTQmND8oKD9HPzU/R0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAAIAAgDASIAAhEBAxEB/8QAWQABAQAAAAAAAAAAAAAAAAAAAAYBAQEAAAAAAAAAAAAAAAAAAAIEEAEBAAMBAAAAAAAAAAAAAAABADECA0ERAAEDBQAAAAAAAAAAAAAAAAARITFBUWESIv/aAAwDAQACEQMRAD8AoOnTV1QTD7JJshP3vSM3P//Z) repeat 0 0}.swagger-ui .debug-grid-16-solid{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY3MkJEN0U2N0M1MTFFNkIyQkNFMjQwODEwMDIxNzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY3MkJEN0Y2N0M1MTFFNkIyQkNFMjQwODEwMDIxNzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3RDY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pve6J3kAAAAzSURBVHjaYvz//z8D0UDsMwMjSRoYP5Gq4SPNbRjVMEQ1fCRDg+in/6+J1AJUxsgAEGAA31BAJMS0GYEAAAAASUVORK5CYII=) repeat 0 0}.swagger-ui .border-box,.swagger-ui a,.swagger-ui article,.swagger-ui body,.swagger-ui code,.swagger-ui dd,.swagger-ui div,.swagger-ui dl,.swagger-ui dt,.swagger-ui fieldset,.swagger-ui footer,.swagger-ui form,.swagger-ui h1,.swagger-ui h2,.swagger-ui h3,.swagger-ui h4,.swagger-ui h5,.swagger-ui h6,.swagger-ui header,.swagger-ui html,.swagger-ui input[type=email],.swagger-ui input[type=number],.swagger-ui input[type=password],.swagger-ui input[type=tel],.swagger-ui input[type=text],.swagger-ui input[type=url],.swagger-ui legend,.swagger-ui li,.swagger-ui main,.swagger-ui ol,.swagger-ui p,.swagger-ui pre,.swagger-ui section,.swagger-ui table,.swagger-ui td,.swagger-ui textarea,.swagger-ui th,.swagger-ui tr,.swagger-ui ul{box-sizing:border-box}.swagger-ui .aspect-ratio{height:0;position:relative}.swagger-ui .aspect-ratio--16x9{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1{padding-bottom:100%}.swagger-ui .aspect-ratio--object{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}@media screen and (min-width:30em){.swagger-ui .aspect-ratio-ns{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-ns{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-ns{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-ns{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-ns{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-ns{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-ns{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-ns{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-ns{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-ns{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-ns{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-ns{padding-bottom:100%}.swagger-ui .aspect-ratio--object-ns{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .aspect-ratio-m{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-m{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-m{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-m{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-m{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-m{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-m{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-m{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-m{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-m{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-m{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-m{padding-bottom:100%}.swagger-ui .aspect-ratio--object-m{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}@media screen and (min-width:60em){.swagger-ui .aspect-ratio-l{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-l{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-l{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-l{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-l{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-l{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-l{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-l{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-l{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-l{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-l{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-l{padding-bottom:100%}.swagger-ui .aspect-ratio--object-l{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}.swagger-ui img{max-width:100%}.swagger-ui .cover{background-size:cover!important}.swagger-ui .contain{background-size:contain!important}@media screen and (min-width:30em){.swagger-ui .cover-ns{background-size:cover!important}.swagger-ui .contain-ns{background-size:contain!important}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .cover-m{background-size:cover!important}.swagger-ui .contain-m{background-size:contain!important}}@media screen and (min-width:60em){.swagger-ui .cover-l{background-size:cover!important}.swagger-ui .contain-l{background-size:contain!important}}.swagger-ui .bg-center{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left{background-position:0;background-repeat:no-repeat}@media screen and (min-width:30em){.swagger-ui .bg-center-ns{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-ns{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-ns{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-ns{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-ns{background-position:0;background-repeat:no-repeat}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .bg-center-m{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-m{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-m{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-m{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-m{background-position:0;background-repeat:no-repeat}}@media screen and (min-width:60em){.swagger-ui .bg-center-l{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-l{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-l{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-l{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-l{background-position:0;background-repeat:no-repeat}}.swagger-ui .outline{outline:1px solid}.swagger-ui .outline-transparent{outline:1px solid transparent}.swagger-ui .outline-0{outline:0}@media screen and (min-width:30em){.swagger-ui .outline-ns{outline:1px solid}.swagger-ui .outline-transparent-ns{outline:1px solid transparent}.swagger-ui .outline-0-ns{outline:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .outline-m{outline:1px solid}.swagger-ui .outline-transparent-m{outline:1px solid transparent}.swagger-ui .outline-0-m{outline:0}}@media screen and (min-width:60em){.swagger-ui .outline-l{outline:1px solid}.swagger-ui .outline-transparent-l{outline:1px solid transparent}.swagger-ui .outline-0-l{outline:0}}.swagger-ui .ba{border-style:solid;border-width:1px}.swagger-ui .bt{border-top-style:solid;border-top-width:1px}.swagger-ui .br{border-right-style:solid;border-right-width:1px}.swagger-ui .bb{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl{border-left-style:solid;border-left-width:1px}.swagger-ui .bn{border-style:none;border-width:0}@media screen and (min-width:30em){.swagger-ui .ba-ns{border-style:solid;border-width:1px}.swagger-ui .bt-ns{border-top-style:solid;border-top-width:1px}.swagger-ui .br-ns{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-ns{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-ns{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-ns{border-style:none;border-width:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ba-m{border-style:solid;border-width:1px}.swagger-ui .bt-m{border-top-style:solid;border-top-width:1px}.swagger-ui .br-m{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-m{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-m{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-m{border-style:none;border-width:0}}@media screen and (min-width:60em){.swagger-ui .ba-l{border-style:solid;border-width:1px}.swagger-ui .bt-l{border-top-style:solid;border-top-width:1px}.swagger-ui .br-l{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-l{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-l{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-l{border-style:none;border-width:0}}.swagger-ui .b--black{border-color:#000}.swagger-ui .b--near-black{border-color:#111}.swagger-ui .b--dark-gray{border-color:#333}.swagger-ui .b--mid-gray{border-color:#555}.swagger-ui .b--gray{border-color:#777}.swagger-ui .b--silver{border-color:#999}.swagger-ui .b--light-silver{border-color:#aaa}.swagger-ui .b--moon-gray{border-color:#ccc}.swagger-ui .b--light-gray{border-color:#eee}.swagger-ui .b--near-white{border-color:#f4f4f4}.swagger-ui .b--white{border-color:#fff}.swagger-ui .b--white-90{border-color:hsla(0,0%,100%,.9)}.swagger-ui .b--white-80{border-color:hsla(0,0%,100%,.8)}.swagger-ui .b--white-70{border-color:hsla(0,0%,100%,.7)}.swagger-ui .b--white-60{border-color:hsla(0,0%,100%,.6)}.swagger-ui .b--white-50{border-color:hsla(0,0%,100%,.5)}.swagger-ui .b--white-40{border-color:hsla(0,0%,100%,.4)}.swagger-ui .b--white-30{border-color:hsla(0,0%,100%,.3)}.swagger-ui .b--white-20{border-color:hsla(0,0%,100%,.2)}.swagger-ui .b--white-10{border-color:hsla(0,0%,100%,.1)}.swagger-ui .b--white-05{border-color:hsla(0,0%,100%,.05)}.swagger-ui .b--white-025{border-color:hsla(0,0%,100%,.025)}.swagger-ui .b--white-0125{border-color:hsla(0,0%,100%,.013)}.swagger-ui .b--black-90{border-color:rgba(0,0,0,.9)}.swagger-ui .b--black-80{border-color:rgba(0,0,0,.8)}.swagger-ui .b--black-70{border-color:rgba(0,0,0,.7)}.swagger-ui .b--black-60{border-color:rgba(0,0,0,.6)}.swagger-ui .b--black-50{border-color:rgba(0,0,0,.5)}.swagger-ui .b--black-40{border-color:rgba(0,0,0,.4)}.swagger-ui .b--black-30{border-color:rgba(0,0,0,.3)}.swagger-ui .b--black-20{border-color:rgba(0,0,0,.2)}.swagger-ui .b--black-10{border-color:rgba(0,0,0,.1)}.swagger-ui .b--black-05{border-color:rgba(0,0,0,.05)}.swagger-ui .b--black-025{border-color:rgba(0,0,0,.025)}.swagger-ui .b--black-0125{border-color:rgba(0,0,0,.013)}.swagger-ui .b--dark-red{border-color:#e7040f}.swagger-ui .b--red{border-color:#ff4136}.swagger-ui .b--light-red{border-color:#ff725c}.swagger-ui .b--orange{border-color:#ff6300}.swagger-ui .b--gold{border-color:#ffb700}.swagger-ui .b--yellow{border-color:gold}.swagger-ui .b--light-yellow{border-color:#fbf1a9}.swagger-ui .b--purple{border-color:#5e2ca5}.swagger-ui .b--light-purple{border-color:#a463f2}.swagger-ui .b--dark-pink{border-color:#d5008f}.swagger-ui .b--hot-pink{border-color:#ff41b4}.swagger-ui .b--pink{border-color:#ff80cc}.swagger-ui .b--light-pink{border-color:#ffa3d7}.swagger-ui .b--dark-green{border-color:#137752}.swagger-ui .b--green{border-color:#19a974}.swagger-ui .b--light-green{border-color:#9eebcf}.swagger-ui .b--navy{border-color:#001b44}.swagger-ui .b--dark-blue{border-color:#00449e}.swagger-ui .b--blue{border-color:#357edd}.swagger-ui .b--light-blue{border-color:#96ccff}.swagger-ui .b--lightest-blue{border-color:#cdecff}.swagger-ui .b--washed-blue{border-color:#f6fffe}.swagger-ui .b--washed-green{border-color:#e8fdf5}.swagger-ui .b--washed-yellow{border-color:#fffceb}.swagger-ui .b--washed-red{border-color:#ffdfdf}.swagger-ui .b--transparent{border-color:transparent}.swagger-ui .b--inherit{border-color:inherit}.swagger-ui .br0{border-radius:0}.swagger-ui .br1{border-radius:.125rem}.swagger-ui .br2{border-radius:.25rem}.swagger-ui .br3{border-radius:.5rem}.swagger-ui .br4{border-radius:1rem}.swagger-ui .br-100{border-radius:100%}.swagger-ui .br-pill{border-radius:9999px}.swagger-ui .br--bottom{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left{border-bottom-right-radius:0;border-top-right-radius:0}@media screen and (min-width:30em){.swagger-ui .br0-ns{border-radius:0}.swagger-ui .br1-ns{border-radius:.125rem}.swagger-ui .br2-ns{border-radius:.25rem}.swagger-ui .br3-ns{border-radius:.5rem}.swagger-ui .br4-ns{border-radius:1rem}.swagger-ui .br-100-ns{border-radius:100%}.swagger-ui .br-pill-ns{border-radius:9999px}.swagger-ui .br--bottom-ns{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-ns{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-ns{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-ns{border-bottom-right-radius:0;border-top-right-radius:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .br0-m{border-radius:0}.swagger-ui .br1-m{border-radius:.125rem}.swagger-ui .br2-m{border-radius:.25rem}.swagger-ui .br3-m{border-radius:.5rem}.swagger-ui .br4-m{border-radius:1rem}.swagger-ui .br-100-m{border-radius:100%}.swagger-ui .br-pill-m{border-radius:9999px}.swagger-ui .br--bottom-m{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-m{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-m{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-m{border-bottom-right-radius:0;border-top-right-radius:0}}@media screen and (min-width:60em){.swagger-ui .br0-l{border-radius:0}.swagger-ui .br1-l{border-radius:.125rem}.swagger-ui .br2-l{border-radius:.25rem}.swagger-ui .br3-l{border-radius:.5rem}.swagger-ui .br4-l{border-radius:1rem}.swagger-ui .br-100-l{border-radius:100%}.swagger-ui .br-pill-l{border-radius:9999px}.swagger-ui .br--bottom-l{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-l{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-l{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-l{border-bottom-right-radius:0;border-top-right-radius:0}}.swagger-ui .b--dotted{border-style:dotted}.swagger-ui .b--dashed{border-style:dashed}.swagger-ui .b--solid{border-style:solid}.swagger-ui .b--none{border-style:none}@media screen and (min-width:30em){.swagger-ui .b--dotted-ns{border-style:dotted}.swagger-ui .b--dashed-ns{border-style:dashed}.swagger-ui .b--solid-ns{border-style:solid}.swagger-ui .b--none-ns{border-style:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .b--dotted-m{border-style:dotted}.swagger-ui .b--dashed-m{border-style:dashed}.swagger-ui .b--solid-m{border-style:solid}.swagger-ui .b--none-m{border-style:none}}@media screen and (min-width:60em){.swagger-ui .b--dotted-l{border-style:dotted}.swagger-ui .b--dashed-l{border-style:dashed}.swagger-ui .b--solid-l{border-style:solid}.swagger-ui .b--none-l{border-style:none}}.swagger-ui .bw0{border-width:0}.swagger-ui .bw1{border-width:.125rem}.swagger-ui .bw2{border-width:.25rem}.swagger-ui .bw3{border-width:.5rem}.swagger-ui .bw4{border-width:1rem}.swagger-ui .bw5{border-width:2rem}.swagger-ui .bt-0{border-top-width:0}.swagger-ui .br-0{border-right-width:0}.swagger-ui .bb-0{border-bottom-width:0}.swagger-ui .bl-0{border-left-width:0}@media screen and (min-width:30em){.swagger-ui .bw0-ns{border-width:0}.swagger-ui .bw1-ns{border-width:.125rem}.swagger-ui .bw2-ns{border-width:.25rem}.swagger-ui .bw3-ns{border-width:.5rem}.swagger-ui .bw4-ns{border-width:1rem}.swagger-ui .bw5-ns{border-width:2rem}.swagger-ui .bt-0-ns{border-top-width:0}.swagger-ui .br-0-ns{border-right-width:0}.swagger-ui .bb-0-ns{border-bottom-width:0}.swagger-ui .bl-0-ns{border-left-width:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .bw0-m{border-width:0}.swagger-ui .bw1-m{border-width:.125rem}.swagger-ui .bw2-m{border-width:.25rem}.swagger-ui .bw3-m{border-width:.5rem}.swagger-ui .bw4-m{border-width:1rem}.swagger-ui .bw5-m{border-width:2rem}.swagger-ui .bt-0-m{border-top-width:0}.swagger-ui .br-0-m{border-right-width:0}.swagger-ui .bb-0-m{border-bottom-width:0}.swagger-ui .bl-0-m{border-left-width:0}}@media screen and (min-width:60em){.swagger-ui .bw0-l{border-width:0}.swagger-ui .bw1-l{border-width:.125rem}.swagger-ui .bw2-l{border-width:.25rem}.swagger-ui .bw3-l{border-width:.5rem}.swagger-ui .bw4-l{border-width:1rem}.swagger-ui .bw5-l{border-width:2rem}.swagger-ui .bt-0-l{border-top-width:0}.swagger-ui .br-0-l{border-right-width:0}.swagger-ui .bb-0-l{border-bottom-width:0}.swagger-ui .bl-0-l{border-left-width:0}}.swagger-ui .shadow-1{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}@media screen and (min-width:30em){.swagger-ui .shadow-1-ns{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-ns{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-ns{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-ns{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-ns{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .shadow-1-m{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-m{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-m{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-m{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-m{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}@media screen and (min-width:60em){.swagger-ui .shadow-1-l{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-l{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-l{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-l{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-l{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}.swagger-ui .pre{overflow-x:auto;overflow-y:hidden;overflow:scroll}.swagger-ui .top-0{top:0}.swagger-ui .right-0{right:0}.swagger-ui .bottom-0{bottom:0}.swagger-ui .left-0{left:0}.swagger-ui .top-1{top:1rem}.swagger-ui .right-1{right:1rem}.swagger-ui .bottom-1{bottom:1rem}.swagger-ui .left-1{left:1rem}.swagger-ui .top-2{top:2rem}.swagger-ui .right-2{right:2rem}.swagger-ui .bottom-2{bottom:2rem}.swagger-ui .left-2{left:2rem}.swagger-ui .top--1{top:-1rem}.swagger-ui .right--1{right:-1rem}.swagger-ui .bottom--1{bottom:-1rem}.swagger-ui .left--1{left:-1rem}.swagger-ui .top--2{top:-2rem}.swagger-ui .right--2{right:-2rem}.swagger-ui .bottom--2{bottom:-2rem}.swagger-ui .left--2{left:-2rem}.swagger-ui .absolute--fill{bottom:0;left:0;right:0;top:0}@media screen and (min-width:30em){.swagger-ui .top-0-ns{top:0}.swagger-ui .left-0-ns{left:0}.swagger-ui .right-0-ns{right:0}.swagger-ui .bottom-0-ns{bottom:0}.swagger-ui .top-1-ns{top:1rem}.swagger-ui .left-1-ns{left:1rem}.swagger-ui .right-1-ns{right:1rem}.swagger-ui .bottom-1-ns{bottom:1rem}.swagger-ui .top-2-ns{top:2rem}.swagger-ui .left-2-ns{left:2rem}.swagger-ui .right-2-ns{right:2rem}.swagger-ui .bottom-2-ns{bottom:2rem}.swagger-ui .top--1-ns{top:-1rem}.swagger-ui .right--1-ns{right:-1rem}.swagger-ui .bottom--1-ns{bottom:-1rem}.swagger-ui .left--1-ns{left:-1rem}.swagger-ui .top--2-ns{top:-2rem}.swagger-ui .right--2-ns{right:-2rem}.swagger-ui .bottom--2-ns{bottom:-2rem}.swagger-ui .left--2-ns{left:-2rem}.swagger-ui .absolute--fill-ns{bottom:0;left:0;right:0;top:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .top-0-m{top:0}.swagger-ui .left-0-m{left:0}.swagger-ui .right-0-m{right:0}.swagger-ui .bottom-0-m{bottom:0}.swagger-ui .top-1-m{top:1rem}.swagger-ui .left-1-m{left:1rem}.swagger-ui .right-1-m{right:1rem}.swagger-ui .bottom-1-m{bottom:1rem}.swagger-ui .top-2-m{top:2rem}.swagger-ui .left-2-m{left:2rem}.swagger-ui .right-2-m{right:2rem}.swagger-ui .bottom-2-m{bottom:2rem}.swagger-ui .top--1-m{top:-1rem}.swagger-ui .right--1-m{right:-1rem}.swagger-ui .bottom--1-m{bottom:-1rem}.swagger-ui .left--1-m{left:-1rem}.swagger-ui .top--2-m{top:-2rem}.swagger-ui .right--2-m{right:-2rem}.swagger-ui .bottom--2-m{bottom:-2rem}.swagger-ui .left--2-m{left:-2rem}.swagger-ui .absolute--fill-m{bottom:0;left:0;right:0;top:0}}@media screen and (min-width:60em){.swagger-ui .top-0-l{top:0}.swagger-ui .left-0-l{left:0}.swagger-ui .right-0-l{right:0}.swagger-ui .bottom-0-l{bottom:0}.swagger-ui .top-1-l{top:1rem}.swagger-ui .left-1-l{left:1rem}.swagger-ui .right-1-l{right:1rem}.swagger-ui .bottom-1-l{bottom:1rem}.swagger-ui .top-2-l{top:2rem}.swagger-ui .left-2-l{left:2rem}.swagger-ui .right-2-l{right:2rem}.swagger-ui .bottom-2-l{bottom:2rem}.swagger-ui .top--1-l{top:-1rem}.swagger-ui .right--1-l{right:-1rem}.swagger-ui .bottom--1-l{bottom:-1rem}.swagger-ui .left--1-l{left:-1rem}.swagger-ui .top--2-l{top:-2rem}.swagger-ui .right--2-l{right:-2rem}.swagger-ui .bottom--2-l{bottom:-2rem}.swagger-ui .left--2-l{left:-2rem}.swagger-ui .absolute--fill-l{bottom:0;left:0;right:0;top:0}}.swagger-ui .cf:after,.swagger-ui .cf:before{content:\" \";display:table}.swagger-ui .cf:after{clear:both}.swagger-ui .cf{zoom:1}.swagger-ui .cl{clear:left}.swagger-ui .cr{clear:right}.swagger-ui .cb{clear:both}.swagger-ui .cn{clear:none}@media screen and (min-width:30em){.swagger-ui .cl-ns{clear:left}.swagger-ui .cr-ns{clear:right}.swagger-ui .cb-ns{clear:both}.swagger-ui .cn-ns{clear:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .cl-m{clear:left}.swagger-ui .cr-m{clear:right}.swagger-ui .cb-m{clear:both}.swagger-ui .cn-m{clear:none}}@media screen and (min-width:60em){.swagger-ui .cl-l{clear:left}.swagger-ui .cr-l{clear:right}.swagger-ui .cb-l{clear:both}.swagger-ui .cn-l{clear:none}}.swagger-ui .flex{display:flex}.swagger-ui .inline-flex{display:inline-flex}.swagger-ui .flex-auto{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none{flex:none}.swagger-ui .flex-column{flex-direction:column}.swagger-ui .flex-row{flex-direction:row}.swagger-ui .flex-wrap{flex-wrap:wrap}.swagger-ui .flex-nowrap{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse{flex-direction:column-reverse}.swagger-ui .flex-row-reverse{flex-direction:row-reverse}.swagger-ui .items-start{align-items:flex-start}.swagger-ui .items-end{align-items:flex-end}.swagger-ui .items-center{align-items:center}.swagger-ui .items-baseline{align-items:baseline}.swagger-ui .items-stretch{align-items:stretch}.swagger-ui .self-start{align-self:flex-start}.swagger-ui .self-end{align-self:flex-end}.swagger-ui .self-center{align-self:center}.swagger-ui .self-baseline{align-self:baseline}.swagger-ui .self-stretch{align-self:stretch}.swagger-ui .justify-start{justify-content:flex-start}.swagger-ui .justify-end{justify-content:flex-end}.swagger-ui .justify-center{justify-content:center}.swagger-ui .justify-between{justify-content:space-between}.swagger-ui .justify-around{justify-content:space-around}.swagger-ui .content-start{align-content:flex-start}.swagger-ui .content-end{align-content:flex-end}.swagger-ui .content-center{align-content:center}.swagger-ui .content-between{align-content:space-between}.swagger-ui .content-around{align-content:space-around}.swagger-ui .content-stretch{align-content:stretch}.swagger-ui .order-0{order:0}.swagger-ui .order-1{order:1}.swagger-ui .order-2{order:2}.swagger-ui .order-3{order:3}.swagger-ui .order-4{order:4}.swagger-ui .order-5{order:5}.swagger-ui .order-6{order:6}.swagger-ui .order-7{order:7}.swagger-ui .order-8{order:8}.swagger-ui .order-last{order:99999}.swagger-ui .flex-grow-0{flex-grow:0}.swagger-ui .flex-grow-1{flex-grow:1}.swagger-ui .flex-shrink-0{flex-shrink:0}.swagger-ui .flex-shrink-1{flex-shrink:1}@media screen and (min-width:30em){.swagger-ui .flex-ns{display:flex}.swagger-ui .inline-flex-ns{display:inline-flex}.swagger-ui .flex-auto-ns{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-ns{flex:none}.swagger-ui .flex-column-ns{flex-direction:column}.swagger-ui .flex-row-ns{flex-direction:row}.swagger-ui .flex-wrap-ns{flex-wrap:wrap}.swagger-ui .flex-nowrap-ns{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-ns{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-ns{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-ns{flex-direction:row-reverse}.swagger-ui .items-start-ns{align-items:flex-start}.swagger-ui .items-end-ns{align-items:flex-end}.swagger-ui .items-center-ns{align-items:center}.swagger-ui .items-baseline-ns{align-items:baseline}.swagger-ui .items-stretch-ns{align-items:stretch}.swagger-ui .self-start-ns{align-self:flex-start}.swagger-ui .self-end-ns{align-self:flex-end}.swagger-ui .self-center-ns{align-self:center}.swagger-ui .self-baseline-ns{align-self:baseline}.swagger-ui .self-stretch-ns{align-self:stretch}.swagger-ui .justify-start-ns{justify-content:flex-start}.swagger-ui .justify-end-ns{justify-content:flex-end}.swagger-ui .justify-center-ns{justify-content:center}.swagger-ui .justify-between-ns{justify-content:space-between}.swagger-ui .justify-around-ns{justify-content:space-around}.swagger-ui .content-start-ns{align-content:flex-start}.swagger-ui .content-end-ns{align-content:flex-end}.swagger-ui .content-center-ns{align-content:center}.swagger-ui .content-between-ns{align-content:space-between}.swagger-ui .content-around-ns{align-content:space-around}.swagger-ui .content-stretch-ns{align-content:stretch}.swagger-ui .order-0-ns{order:0}.swagger-ui .order-1-ns{order:1}.swagger-ui .order-2-ns{order:2}.swagger-ui .order-3-ns{order:3}.swagger-ui .order-4-ns{order:4}.swagger-ui .order-5-ns{order:5}.swagger-ui .order-6-ns{order:6}.swagger-ui .order-7-ns{order:7}.swagger-ui .order-8-ns{order:8}.swagger-ui .order-last-ns{order:99999}.swagger-ui .flex-grow-0-ns{flex-grow:0}.swagger-ui .flex-grow-1-ns{flex-grow:1}.swagger-ui .flex-shrink-0-ns{flex-shrink:0}.swagger-ui .flex-shrink-1-ns{flex-shrink:1}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .flex-m{display:flex}.swagger-ui .inline-flex-m{display:inline-flex}.swagger-ui .flex-auto-m{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-m{flex:none}.swagger-ui .flex-column-m{flex-direction:column}.swagger-ui .flex-row-m{flex-direction:row}.swagger-ui .flex-wrap-m{flex-wrap:wrap}.swagger-ui .flex-nowrap-m{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-m{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-m{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-m{flex-direction:row-reverse}.swagger-ui .items-start-m{align-items:flex-start}.swagger-ui .items-end-m{align-items:flex-end}.swagger-ui .items-center-m{align-items:center}.swagger-ui .items-baseline-m{align-items:baseline}.swagger-ui .items-stretch-m{align-items:stretch}.swagger-ui .self-start-m{align-self:flex-start}.swagger-ui .self-end-m{align-self:flex-end}.swagger-ui .self-center-m{align-self:center}.swagger-ui .self-baseline-m{align-self:baseline}.swagger-ui .self-stretch-m{align-self:stretch}.swagger-ui .justify-start-m{justify-content:flex-start}.swagger-ui .justify-end-m{justify-content:flex-end}.swagger-ui .justify-center-m{justify-content:center}.swagger-ui .justify-between-m{justify-content:space-between}.swagger-ui .justify-around-m{justify-content:space-around}.swagger-ui .content-start-m{align-content:flex-start}.swagger-ui .content-end-m{align-content:flex-end}.swagger-ui .content-center-m{align-content:center}.swagger-ui .content-between-m{align-content:space-between}.swagger-ui .content-around-m{align-content:space-around}.swagger-ui .content-stretch-m{align-content:stretch}.swagger-ui .order-0-m{order:0}.swagger-ui .order-1-m{order:1}.swagger-ui .order-2-m{order:2}.swagger-ui .order-3-m{order:3}.swagger-ui .order-4-m{order:4}.swagger-ui .order-5-m{order:5}.swagger-ui .order-6-m{order:6}.swagger-ui .order-7-m{order:7}.swagger-ui .order-8-m{order:8}.swagger-ui .order-last-m{order:99999}.swagger-ui .flex-grow-0-m{flex-grow:0}.swagger-ui .flex-grow-1-m{flex-grow:1}.swagger-ui .flex-shrink-0-m{flex-shrink:0}.swagger-ui .flex-shrink-1-m{flex-shrink:1}}@media screen and (min-width:60em){.swagger-ui .flex-l{display:flex}.swagger-ui .inline-flex-l{display:inline-flex}.swagger-ui .flex-auto-l{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-l{flex:none}.swagger-ui .flex-column-l{flex-direction:column}.swagger-ui .flex-row-l{flex-direction:row}.swagger-ui .flex-wrap-l{flex-wrap:wrap}.swagger-ui .flex-nowrap-l{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-l{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-l{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-l{flex-direction:row-reverse}.swagger-ui .items-start-l{align-items:flex-start}.swagger-ui .items-end-l{align-items:flex-end}.swagger-ui .items-center-l{align-items:center}.swagger-ui .items-baseline-l{align-items:baseline}.swagger-ui .items-stretch-l{align-items:stretch}.swagger-ui .self-start-l{align-self:flex-start}.swagger-ui .self-end-l{align-self:flex-end}.swagger-ui .self-center-l{align-self:center}.swagger-ui .self-baseline-l{align-self:baseline}.swagger-ui .self-stretch-l{align-self:stretch}.swagger-ui .justify-start-l{justify-content:flex-start}.swagger-ui .justify-end-l{justify-content:flex-end}.swagger-ui .justify-center-l{justify-content:center}.swagger-ui .justify-between-l{justify-content:space-between}.swagger-ui .justify-around-l{justify-content:space-around}.swagger-ui .content-start-l{align-content:flex-start}.swagger-ui .content-end-l{align-content:flex-end}.swagger-ui .content-center-l{align-content:center}.swagger-ui .content-between-l{align-content:space-between}.swagger-ui .content-around-l{align-content:space-around}.swagger-ui .content-stretch-l{align-content:stretch}.swagger-ui .order-0-l{order:0}.swagger-ui .order-1-l{order:1}.swagger-ui .order-2-l{order:2}.swagger-ui .order-3-l{order:3}.swagger-ui .order-4-l{order:4}.swagger-ui .order-5-l{order:5}.swagger-ui .order-6-l{order:6}.swagger-ui .order-7-l{order:7}.swagger-ui .order-8-l{order:8}.swagger-ui .order-last-l{order:99999}.swagger-ui .flex-grow-0-l{flex-grow:0}.swagger-ui .flex-grow-1-l{flex-grow:1}.swagger-ui .flex-shrink-0-l{flex-shrink:0}.swagger-ui .flex-shrink-1-l{flex-shrink:1}}.swagger-ui .dn{display:none}.swagger-ui .di{display:inline}.swagger-ui .db{display:block}.swagger-ui .dib{display:inline-block}.swagger-ui .dit{display:inline-table}.swagger-ui .dt{display:table}.swagger-ui .dtc{display:table-cell}.swagger-ui .dt-row{display:table-row}.swagger-ui .dt-row-group{display:table-row-group}.swagger-ui .dt-column{display:table-column}.swagger-ui .dt-column-group{display:table-column-group}.swagger-ui .dt--fixed{table-layout:fixed;width:100%}@media screen and (min-width:30em){.swagger-ui .dn-ns{display:none}.swagger-ui .di-ns{display:inline}.swagger-ui .db-ns{display:block}.swagger-ui .dib-ns{display:inline-block}.swagger-ui .dit-ns{display:inline-table}.swagger-ui .dt-ns{display:table}.swagger-ui .dtc-ns{display:table-cell}.swagger-ui .dt-row-ns{display:table-row}.swagger-ui .dt-row-group-ns{display:table-row-group}.swagger-ui .dt-column-ns{display:table-column}.swagger-ui .dt-column-group-ns{display:table-column-group}.swagger-ui .dt--fixed-ns{table-layout:fixed;width:100%}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .dn-m{display:none}.swagger-ui .di-m{display:inline}.swagger-ui .db-m{display:block}.swagger-ui .dib-m{display:inline-block}.swagger-ui .dit-m{display:inline-table}.swagger-ui .dt-m{display:table}.swagger-ui .dtc-m{display:table-cell}.swagger-ui .dt-row-m{display:table-row}.swagger-ui .dt-row-group-m{display:table-row-group}.swagger-ui .dt-column-m{display:table-column}.swagger-ui .dt-column-group-m{display:table-column-group}.swagger-ui .dt--fixed-m{table-layout:fixed;width:100%}}@media screen and (min-width:60em){.swagger-ui .dn-l{display:none}.swagger-ui .di-l{display:inline}.swagger-ui .db-l{display:block}.swagger-ui .dib-l{display:inline-block}.swagger-ui .dit-l{display:inline-table}.swagger-ui .dt-l{display:table}.swagger-ui .dtc-l{display:table-cell}.swagger-ui .dt-row-l{display:table-row}.swagger-ui .dt-row-group-l{display:table-row-group}.swagger-ui .dt-column-l{display:table-column}.swagger-ui .dt-column-group-l{display:table-column-group}.swagger-ui .dt--fixed-l{table-layout:fixed;width:100%}}.swagger-ui .fl{_display:inline;float:left}.swagger-ui .fr{_display:inline;float:right}.swagger-ui .fn{float:none}@media screen and (min-width:30em){.swagger-ui .fl-ns{_display:inline;float:left}.swagger-ui .fr-ns{_display:inline;float:right}.swagger-ui .fn-ns{float:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .fl-m{_display:inline;float:left}.swagger-ui .fr-m{_display:inline;float:right}.swagger-ui .fn-m{float:none}}@media screen and (min-width:60em){.swagger-ui .fl-l{_display:inline;float:left}.swagger-ui .fr-l{_display:inline;float:right}.swagger-ui .fn-l{float:none}}.swagger-ui .sans-serif{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica,helvetica neue,ubuntu,roboto,noto,segoe ui,arial,sans-serif}.swagger-ui .serif{font-family:georgia,serif}.swagger-ui .system-sans-serif{font-family:sans-serif}.swagger-ui .system-serif{font-family:serif}.swagger-ui .code,.swagger-ui code{font-family:Consolas,monaco,monospace}.swagger-ui .courier{font-family:Courier Next,courier,monospace}.swagger-ui .helvetica{font-family:helvetica neue,helvetica,sans-serif}.swagger-ui .avenir{font-family:avenir next,avenir,sans-serif}.swagger-ui .athelas{font-family:athelas,georgia,serif}.swagger-ui .georgia{font-family:georgia,serif}.swagger-ui .times{font-family:times,serif}.swagger-ui .bodoni{font-family:Bodoni MT,serif}.swagger-ui .calisto{font-family:Calisto MT,serif}.swagger-ui .garamond{font-family:garamond,serif}.swagger-ui .baskerville{font-family:baskerville,serif}.swagger-ui .i{font-style:italic}.swagger-ui .fs-normal{font-style:normal}@media screen and (min-width:30em){.swagger-ui .i-ns{font-style:italic}.swagger-ui .fs-normal-ns{font-style:normal}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .i-m{font-style:italic}.swagger-ui .fs-normal-m{font-style:normal}}@media screen and (min-width:60em){.swagger-ui .i-l{font-style:italic}.swagger-ui .fs-normal-l{font-style:normal}}.swagger-ui .normal{font-weight:400}.swagger-ui .b{font-weight:700}.swagger-ui .fw1{font-weight:100}.swagger-ui .fw2{font-weight:200}.swagger-ui .fw3{font-weight:300}.swagger-ui .fw4{font-weight:400}.swagger-ui .fw5{font-weight:500}.swagger-ui .fw6{font-weight:600}.swagger-ui .fw7{font-weight:700}.swagger-ui .fw8{font-weight:800}.swagger-ui .fw9{font-weight:900}@media screen and (min-width:30em){.swagger-ui .normal-ns{font-weight:400}.swagger-ui .b-ns{font-weight:700}.swagger-ui .fw1-ns{font-weight:100}.swagger-ui .fw2-ns{font-weight:200}.swagger-ui .fw3-ns{font-weight:300}.swagger-ui .fw4-ns{font-weight:400}.swagger-ui .fw5-ns{font-weight:500}.swagger-ui .fw6-ns{font-weight:600}.swagger-ui .fw7-ns{font-weight:700}.swagger-ui .fw8-ns{font-weight:800}.swagger-ui .fw9-ns{font-weight:900}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .normal-m{font-weight:400}.swagger-ui .b-m{font-weight:700}.swagger-ui .fw1-m{font-weight:100}.swagger-ui .fw2-m{font-weight:200}.swagger-ui .fw3-m{font-weight:300}.swagger-ui .fw4-m{font-weight:400}.swagger-ui .fw5-m{font-weight:500}.swagger-ui .fw6-m{font-weight:600}.swagger-ui .fw7-m{font-weight:700}.swagger-ui .fw8-m{font-weight:800}.swagger-ui .fw9-m{font-weight:900}}@media screen and (min-width:60em){.swagger-ui .normal-l{font-weight:400}.swagger-ui .b-l{font-weight:700}.swagger-ui .fw1-l{font-weight:100}.swagger-ui .fw2-l{font-weight:200}.swagger-ui .fw3-l{font-weight:300}.swagger-ui .fw4-l{font-weight:400}.swagger-ui .fw5-l{font-weight:500}.swagger-ui .fw6-l{font-weight:600}.swagger-ui .fw7-l{font-weight:700}.swagger-ui .fw8-l{font-weight:800}.swagger-ui .fw9-l{font-weight:900}}.swagger-ui .input-reset{-webkit-appearance:none;-moz-appearance:none}.swagger-ui .button-reset::-moz-focus-inner,.swagger-ui .input-reset::-moz-focus-inner{border:0;padding:0}.swagger-ui .h1{height:1rem}.swagger-ui .h2{height:2rem}.swagger-ui .h3{height:4rem}.swagger-ui .h4{height:8rem}.swagger-ui .h5{height:16rem}.swagger-ui .h-25{height:25%}.swagger-ui .h-50{height:50%}.swagger-ui .h-75{height:75%}.swagger-ui .h-100{height:100%}.swagger-ui .min-h-100{min-height:100%}.swagger-ui .vh-25{height:25vh}.swagger-ui .vh-50{height:50vh}.swagger-ui .vh-75{height:75vh}.swagger-ui .vh-100{height:100vh}.swagger-ui .min-vh-100{min-height:100vh}.swagger-ui .h-auto{height:auto}.swagger-ui .h-inherit{height:inherit}@media screen and (min-width:30em){.swagger-ui .h1-ns{height:1rem}.swagger-ui .h2-ns{height:2rem}.swagger-ui .h3-ns{height:4rem}.swagger-ui .h4-ns{height:8rem}.swagger-ui .h5-ns{height:16rem}.swagger-ui .h-25-ns{height:25%}.swagger-ui .h-50-ns{height:50%}.swagger-ui .h-75-ns{height:75%}.swagger-ui .h-100-ns{height:100%}.swagger-ui .min-h-100-ns{min-height:100%}.swagger-ui .vh-25-ns{height:25vh}.swagger-ui .vh-50-ns{height:50vh}.swagger-ui .vh-75-ns{height:75vh}.swagger-ui .vh-100-ns{height:100vh}.swagger-ui .min-vh-100-ns{min-height:100vh}.swagger-ui .h-auto-ns{height:auto}.swagger-ui .h-inherit-ns{height:inherit}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .h1-m{height:1rem}.swagger-ui .h2-m{height:2rem}.swagger-ui .h3-m{height:4rem}.swagger-ui .h4-m{height:8rem}.swagger-ui .h5-m{height:16rem}.swagger-ui .h-25-m{height:25%}.swagger-ui .h-50-m{height:50%}.swagger-ui .h-75-m{height:75%}.swagger-ui .h-100-m{height:100%}.swagger-ui .min-h-100-m{min-height:100%}.swagger-ui .vh-25-m{height:25vh}.swagger-ui .vh-50-m{height:50vh}.swagger-ui .vh-75-m{height:75vh}.swagger-ui .vh-100-m{height:100vh}.swagger-ui .min-vh-100-m{min-height:100vh}.swagger-ui .h-auto-m{height:auto}.swagger-ui .h-inherit-m{height:inherit}}@media screen and (min-width:60em){.swagger-ui .h1-l{height:1rem}.swagger-ui .h2-l{height:2rem}.swagger-ui .h3-l{height:4rem}.swagger-ui .h4-l{height:8rem}.swagger-ui .h5-l{height:16rem}.swagger-ui .h-25-l{height:25%}.swagger-ui .h-50-l{height:50%}.swagger-ui .h-75-l{height:75%}.swagger-ui .h-100-l{height:100%}.swagger-ui .min-h-100-l{min-height:100%}.swagger-ui .vh-25-l{height:25vh}.swagger-ui .vh-50-l{height:50vh}.swagger-ui .vh-75-l{height:75vh}.swagger-ui .vh-100-l{height:100vh}.swagger-ui .min-vh-100-l{min-height:100vh}.swagger-ui .h-auto-l{height:auto}.swagger-ui .h-inherit-l{height:inherit}}.swagger-ui .tracked{letter-spacing:.1em}.swagger-ui .tracked-tight{letter-spacing:-.05em}.swagger-ui .tracked-mega{letter-spacing:.25em}@media screen and (min-width:30em){.swagger-ui .tracked-ns{letter-spacing:.1em}.swagger-ui .tracked-tight-ns{letter-spacing:-.05em}.swagger-ui .tracked-mega-ns{letter-spacing:.25em}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .tracked-m{letter-spacing:.1em}.swagger-ui .tracked-tight-m{letter-spacing:-.05em}.swagger-ui .tracked-mega-m{letter-spacing:.25em}}@media screen and (min-width:60em){.swagger-ui .tracked-l{letter-spacing:.1em}.swagger-ui .tracked-tight-l{letter-spacing:-.05em}.swagger-ui .tracked-mega-l{letter-spacing:.25em}}.swagger-ui .lh-solid{line-height:1}.swagger-ui .lh-title{line-height:1.25}.swagger-ui .lh-copy{line-height:1.5}@media screen and (min-width:30em){.swagger-ui .lh-solid-ns{line-height:1}.swagger-ui .lh-title-ns{line-height:1.25}.swagger-ui .lh-copy-ns{line-height:1.5}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .lh-solid-m{line-height:1}.swagger-ui .lh-title-m{line-height:1.25}.swagger-ui .lh-copy-m{line-height:1.5}}@media screen and (min-width:60em){.swagger-ui .lh-solid-l{line-height:1}.swagger-ui .lh-title-l{line-height:1.25}.swagger-ui .lh-copy-l{line-height:1.5}}.swagger-ui .link{-webkit-text-decoration:none;text-decoration:none}.swagger-ui .link,.swagger-ui .link:active,.swagger-ui .link:focus,.swagger-ui .link:hover,.swagger-ui .link:link,.swagger-ui .link:visited{transition:color .15s ease-in}.swagger-ui .link:focus{outline:1px dotted currentColor}.swagger-ui .list{list-style-type:none}.swagger-ui .mw-100{max-width:100%}.swagger-ui .mw1{max-width:1rem}.swagger-ui .mw2{max-width:2rem}.swagger-ui .mw3{max-width:4rem}.swagger-ui .mw4{max-width:8rem}.swagger-ui .mw5{max-width:16rem}.swagger-ui .mw6{max-width:32rem}.swagger-ui .mw7{max-width:48rem}.swagger-ui .mw8{max-width:64rem}.swagger-ui .mw9{max-width:96rem}.swagger-ui .mw-none{max-width:none}@media screen and (min-width:30em){.swagger-ui .mw-100-ns{max-width:100%}.swagger-ui .mw1-ns{max-width:1rem}.swagger-ui .mw2-ns{max-width:2rem}.swagger-ui .mw3-ns{max-width:4rem}.swagger-ui .mw4-ns{max-width:8rem}.swagger-ui .mw5-ns{max-width:16rem}.swagger-ui .mw6-ns{max-width:32rem}.swagger-ui .mw7-ns{max-width:48rem}.swagger-ui .mw8-ns{max-width:64rem}.swagger-ui .mw9-ns{max-width:96rem}.swagger-ui .mw-none-ns{max-width:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .mw-100-m{max-width:100%}.swagger-ui .mw1-m{max-width:1rem}.swagger-ui .mw2-m{max-width:2rem}.swagger-ui .mw3-m{max-width:4rem}.swagger-ui .mw4-m{max-width:8rem}.swagger-ui .mw5-m{max-width:16rem}.swagger-ui .mw6-m{max-width:32rem}.swagger-ui .mw7-m{max-width:48rem}.swagger-ui .mw8-m{max-width:64rem}.swagger-ui .mw9-m{max-width:96rem}.swagger-ui .mw-none-m{max-width:none}}@media screen and (min-width:60em){.swagger-ui .mw-100-l{max-width:100%}.swagger-ui .mw1-l{max-width:1rem}.swagger-ui .mw2-l{max-width:2rem}.swagger-ui .mw3-l{max-width:4rem}.swagger-ui .mw4-l{max-width:8rem}.swagger-ui .mw5-l{max-width:16rem}.swagger-ui .mw6-l{max-width:32rem}.swagger-ui .mw7-l{max-width:48rem}.swagger-ui .mw8-l{max-width:64rem}.swagger-ui .mw9-l{max-width:96rem}.swagger-ui .mw-none-l{max-width:none}}.swagger-ui .w1{width:1rem}.swagger-ui .w2{width:2rem}.swagger-ui .w3{width:4rem}.swagger-ui .w4{width:8rem}.swagger-ui .w5{width:16rem}.swagger-ui .w-10{width:10%}.swagger-ui .w-20{width:20%}.swagger-ui .w-25{width:25%}.swagger-ui .w-30{width:30%}.swagger-ui .w-33{width:33%}.swagger-ui .w-34{width:34%}.swagger-ui .w-40{width:40%}.swagger-ui .w-50{width:50%}.swagger-ui .w-60{width:60%}.swagger-ui .w-70{width:70%}.swagger-ui .w-75{width:75%}.swagger-ui .w-80{width:80%}.swagger-ui .w-90{width:90%}.swagger-ui .w-100{width:100%}.swagger-ui .w-third{width:33.3333333333%}.swagger-ui .w-two-thirds{width:66.6666666667%}.swagger-ui .w-auto{width:auto}@media screen and (min-width:30em){.swagger-ui .w1-ns{width:1rem}.swagger-ui .w2-ns{width:2rem}.swagger-ui .w3-ns{width:4rem}.swagger-ui .w4-ns{width:8rem}.swagger-ui .w5-ns{width:16rem}.swagger-ui .w-10-ns{width:10%}.swagger-ui .w-20-ns{width:20%}.swagger-ui .w-25-ns{width:25%}.swagger-ui .w-30-ns{width:30%}.swagger-ui .w-33-ns{width:33%}.swagger-ui .w-34-ns{width:34%}.swagger-ui .w-40-ns{width:40%}.swagger-ui .w-50-ns{width:50%}.swagger-ui .w-60-ns{width:60%}.swagger-ui .w-70-ns{width:70%}.swagger-ui .w-75-ns{width:75%}.swagger-ui .w-80-ns{width:80%}.swagger-ui .w-90-ns{width:90%}.swagger-ui .w-100-ns{width:100%}.swagger-ui .w-third-ns{width:33.3333333333%}.swagger-ui .w-two-thirds-ns{width:66.6666666667%}.swagger-ui .w-auto-ns{width:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .w1-m{width:1rem}.swagger-ui .w2-m{width:2rem}.swagger-ui .w3-m{width:4rem}.swagger-ui .w4-m{width:8rem}.swagger-ui .w5-m{width:16rem}.swagger-ui .w-10-m{width:10%}.swagger-ui .w-20-m{width:20%}.swagger-ui .w-25-m{width:25%}.swagger-ui .w-30-m{width:30%}.swagger-ui .w-33-m{width:33%}.swagger-ui .w-34-m{width:34%}.swagger-ui .w-40-m{width:40%}.swagger-ui .w-50-m{width:50%}.swagger-ui .w-60-m{width:60%}.swagger-ui .w-70-m{width:70%}.swagger-ui .w-75-m{width:75%}.swagger-ui .w-80-m{width:80%}.swagger-ui .w-90-m{width:90%}.swagger-ui .w-100-m{width:100%}.swagger-ui .w-third-m{width:33.3333333333%}.swagger-ui .w-two-thirds-m{width:66.6666666667%}.swagger-ui .w-auto-m{width:auto}}@media screen and (min-width:60em){.swagger-ui .w1-l{width:1rem}.swagger-ui .w2-l{width:2rem}.swagger-ui .w3-l{width:4rem}.swagger-ui .w4-l{width:8rem}.swagger-ui .w5-l{width:16rem}.swagger-ui .w-10-l{width:10%}.swagger-ui .w-20-l{width:20%}.swagger-ui .w-25-l{width:25%}.swagger-ui .w-30-l{width:30%}.swagger-ui .w-33-l{width:33%}.swagger-ui .w-34-l{width:34%}.swagger-ui .w-40-l{width:40%}.swagger-ui .w-50-l{width:50%}.swagger-ui .w-60-l{width:60%}.swagger-ui .w-70-l{width:70%}.swagger-ui .w-75-l{width:75%}.swagger-ui .w-80-l{width:80%}.swagger-ui .w-90-l{width:90%}.swagger-ui .w-100-l{width:100%}.swagger-ui .w-third-l{width:33.3333333333%}.swagger-ui .w-two-thirds-l{width:66.6666666667%}.swagger-ui .w-auto-l{width:auto}}.swagger-ui .overflow-visible{overflow:visible}.swagger-ui .overflow-hidden{overflow:hidden}.swagger-ui .overflow-scroll{overflow:scroll}.swagger-ui .overflow-auto{overflow:auto}.swagger-ui .overflow-x-visible{overflow-x:visible}.swagger-ui .overflow-x-hidden{overflow-x:hidden}.swagger-ui .overflow-x-scroll{overflow-x:scroll}.swagger-ui .overflow-x-auto{overflow-x:auto}.swagger-ui .overflow-y-visible{overflow-y:visible}.swagger-ui .overflow-y-hidden{overflow-y:hidden}.swagger-ui .overflow-y-scroll{overflow-y:scroll}.swagger-ui .overflow-y-auto{overflow-y:auto}@media screen and (min-width:30em){.swagger-ui .overflow-visible-ns{overflow:visible}.swagger-ui .overflow-hidden-ns{overflow:hidden}.swagger-ui .overflow-scroll-ns{overflow:scroll}.swagger-ui .overflow-auto-ns{overflow:auto}.swagger-ui .overflow-x-visible-ns{overflow-x:visible}.swagger-ui .overflow-x-hidden-ns{overflow-x:hidden}.swagger-ui .overflow-x-scroll-ns{overflow-x:scroll}.swagger-ui .overflow-x-auto-ns{overflow-x:auto}.swagger-ui .overflow-y-visible-ns{overflow-y:visible}.swagger-ui .overflow-y-hidden-ns{overflow-y:hidden}.swagger-ui .overflow-y-scroll-ns{overflow-y:scroll}.swagger-ui .overflow-y-auto-ns{overflow-y:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .overflow-visible-m{overflow:visible}.swagger-ui .overflow-hidden-m{overflow:hidden}.swagger-ui .overflow-scroll-m{overflow:scroll}.swagger-ui .overflow-auto-m{overflow:auto}.swagger-ui .overflow-x-visible-m{overflow-x:visible}.swagger-ui .overflow-x-hidden-m{overflow-x:hidden}.swagger-ui .overflow-x-scroll-m{overflow-x:scroll}.swagger-ui .overflow-x-auto-m{overflow-x:auto}.swagger-ui .overflow-y-visible-m{overflow-y:visible}.swagger-ui .overflow-y-hidden-m{overflow-y:hidden}.swagger-ui .overflow-y-scroll-m{overflow-y:scroll}.swagger-ui .overflow-y-auto-m{overflow-y:auto}}@media screen and (min-width:60em){.swagger-ui .overflow-visible-l{overflow:visible}.swagger-ui .overflow-hidden-l{overflow:hidden}.swagger-ui .overflow-scroll-l{overflow:scroll}.swagger-ui .overflow-auto-l{overflow:auto}.swagger-ui .overflow-x-visible-l{overflow-x:visible}.swagger-ui .overflow-x-hidden-l{overflow-x:hidden}.swagger-ui .overflow-x-scroll-l{overflow-x:scroll}.swagger-ui .overflow-x-auto-l{overflow-x:auto}.swagger-ui .overflow-y-visible-l{overflow-y:visible}.swagger-ui .overflow-y-hidden-l{overflow-y:hidden}.swagger-ui .overflow-y-scroll-l{overflow-y:scroll}.swagger-ui .overflow-y-auto-l{overflow-y:auto}}.swagger-ui .static{position:static}.swagger-ui .relative{position:relative}.swagger-ui .absolute{position:absolute}.swagger-ui .fixed{position:fixed}@media screen and (min-width:30em){.swagger-ui .static-ns{position:static}.swagger-ui .relative-ns{position:relative}.swagger-ui .absolute-ns{position:absolute}.swagger-ui .fixed-ns{position:fixed}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .static-m{position:static}.swagger-ui .relative-m{position:relative}.swagger-ui .absolute-m{position:absolute}.swagger-ui .fixed-m{position:fixed}}@media screen and (min-width:60em){.swagger-ui .static-l{position:static}.swagger-ui .relative-l{position:relative}.swagger-ui .absolute-l{position:absolute}.swagger-ui .fixed-l{position:fixed}}.swagger-ui .o-100{opacity:1}.swagger-ui .o-90{opacity:.9}.swagger-ui .o-80{opacity:.8}.swagger-ui .o-70{opacity:.7}.swagger-ui .o-60{opacity:.6}.swagger-ui .o-50{opacity:.5}.swagger-ui .o-40{opacity:.4}.swagger-ui .o-30{opacity:.3}.swagger-ui .o-20{opacity:.2}.swagger-ui .o-10{opacity:.1}.swagger-ui .o-05{opacity:.05}.swagger-ui .o-025{opacity:.025}.swagger-ui .o-0{opacity:0}.swagger-ui .rotate-45{transform:rotate(45deg)}.swagger-ui .rotate-90{transform:rotate(90deg)}.swagger-ui .rotate-135{transform:rotate(135deg)}.swagger-ui .rotate-180{transform:rotate(180deg)}.swagger-ui .rotate-225{transform:rotate(225deg)}.swagger-ui .rotate-270{transform:rotate(270deg)}.swagger-ui .rotate-315{transform:rotate(315deg)}@media screen and (min-width:30em){.swagger-ui .rotate-45-ns{transform:rotate(45deg)}.swagger-ui .rotate-90-ns{transform:rotate(90deg)}.swagger-ui .rotate-135-ns{transform:rotate(135deg)}.swagger-ui .rotate-180-ns{transform:rotate(180deg)}.swagger-ui .rotate-225-ns{transform:rotate(225deg)}.swagger-ui .rotate-270-ns{transform:rotate(270deg)}.swagger-ui .rotate-315-ns{transform:rotate(315deg)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .rotate-45-m{transform:rotate(45deg)}.swagger-ui .rotate-90-m{transform:rotate(90deg)}.swagger-ui .rotate-135-m{transform:rotate(135deg)}.swagger-ui .rotate-180-m{transform:rotate(180deg)}.swagger-ui .rotate-225-m{transform:rotate(225deg)}.swagger-ui .rotate-270-m{transform:rotate(270deg)}.swagger-ui .rotate-315-m{transform:rotate(315deg)}}@media screen and (min-width:60em){.swagger-ui .rotate-45-l{transform:rotate(45deg)}.swagger-ui .rotate-90-l{transform:rotate(90deg)}.swagger-ui .rotate-135-l{transform:rotate(135deg)}.swagger-ui .rotate-180-l{transform:rotate(180deg)}.swagger-ui .rotate-225-l{transform:rotate(225deg)}.swagger-ui .rotate-270-l{transform:rotate(270deg)}.swagger-ui .rotate-315-l{transform:rotate(315deg)}}.swagger-ui .black-90{color:rgba(0,0,0,.9)}.swagger-ui .black-80{color:rgba(0,0,0,.8)}.swagger-ui .black-70{color:rgba(0,0,0,.7)}.swagger-ui .black-60{color:rgba(0,0,0,.6)}.swagger-ui .black-50{color:rgba(0,0,0,.5)}.swagger-ui .black-40{color:rgba(0,0,0,.4)}.swagger-ui .black-30{color:rgba(0,0,0,.3)}.swagger-ui .black-20{color:rgba(0,0,0,.2)}.swagger-ui .black-10{color:rgba(0,0,0,.1)}.swagger-ui .black-05{color:rgba(0,0,0,.05)}.swagger-ui .white-90{color:hsla(0,0%,100%,.9)}.swagger-ui .white-80{color:hsla(0,0%,100%,.8)}.swagger-ui .white-70{color:hsla(0,0%,100%,.7)}.swagger-ui .white-60{color:hsla(0,0%,100%,.6)}.swagger-ui .white-50{color:hsla(0,0%,100%,.5)}.swagger-ui .white-40{color:hsla(0,0%,100%,.4)}.swagger-ui .white-30{color:hsla(0,0%,100%,.3)}.swagger-ui .white-20{color:hsla(0,0%,100%,.2)}.swagger-ui .white-10{color:hsla(0,0%,100%,.1)}.swagger-ui .black{color:#000}.swagger-ui .near-black{color:#111}.swagger-ui .dark-gray{color:#333}.swagger-ui .mid-gray{color:#555}.swagger-ui .gray{color:#777}.swagger-ui .silver{color:#999}.swagger-ui .light-silver{color:#aaa}.swagger-ui .moon-gray{color:#ccc}.swagger-ui .light-gray{color:#eee}.swagger-ui .near-white{color:#f4f4f4}.swagger-ui .white{color:#fff}.swagger-ui .dark-red{color:#e7040f}.swagger-ui .red{color:#ff4136}.swagger-ui .light-red{color:#ff725c}.swagger-ui .orange{color:#ff6300}.swagger-ui .gold{color:#ffb700}.swagger-ui .yellow{color:gold}.swagger-ui .light-yellow{color:#fbf1a9}.swagger-ui .purple{color:#5e2ca5}.swagger-ui .light-purple{color:#a463f2}.swagger-ui .dark-pink{color:#d5008f}.swagger-ui .hot-pink{color:#ff41b4}.swagger-ui .pink{color:#ff80cc}.swagger-ui .light-pink{color:#ffa3d7}.swagger-ui .dark-green{color:#137752}.swagger-ui .green{color:#19a974}.swagger-ui .light-green{color:#9eebcf}.swagger-ui .navy{color:#001b44}.swagger-ui .dark-blue{color:#00449e}.swagger-ui .blue{color:#357edd}.swagger-ui .light-blue{color:#96ccff}.swagger-ui .lightest-blue{color:#cdecff}.swagger-ui .washed-blue{color:#f6fffe}.swagger-ui .washed-green{color:#e8fdf5}.swagger-ui .washed-yellow{color:#fffceb}.swagger-ui .washed-red{color:#ffdfdf}.swagger-ui .color-inherit{color:inherit}.swagger-ui .bg-black-90{background-color:rgba(0,0,0,.9)}.swagger-ui .bg-black-80{background-color:rgba(0,0,0,.8)}.swagger-ui .bg-black-70{background-color:rgba(0,0,0,.7)}.swagger-ui .bg-black-60{background-color:rgba(0,0,0,.6)}.swagger-ui .bg-black-50{background-color:rgba(0,0,0,.5)}.swagger-ui .bg-black-40{background-color:rgba(0,0,0,.4)}.swagger-ui .bg-black-30{background-color:rgba(0,0,0,.3)}.swagger-ui .bg-black-20{background-color:rgba(0,0,0,.2)}.swagger-ui .bg-black-10{background-color:rgba(0,0,0,.1)}.swagger-ui .bg-black-05{background-color:rgba(0,0,0,.05)}.swagger-ui .bg-white-90{background-color:hsla(0,0%,100%,.9)}.swagger-ui .bg-white-80{background-color:hsla(0,0%,100%,.8)}.swagger-ui .bg-white-70{background-color:hsla(0,0%,100%,.7)}.swagger-ui .bg-white-60{background-color:hsla(0,0%,100%,.6)}.swagger-ui .bg-white-50{background-color:hsla(0,0%,100%,.5)}.swagger-ui .bg-white-40{background-color:hsla(0,0%,100%,.4)}.swagger-ui .bg-white-30{background-color:hsla(0,0%,100%,.3)}.swagger-ui .bg-white-20{background-color:hsla(0,0%,100%,.2)}.swagger-ui .bg-white-10{background-color:hsla(0,0%,100%,.1)}.swagger-ui .bg-black{background-color:#000}.swagger-ui .bg-near-black{background-color:#111}.swagger-ui .bg-dark-gray{background-color:#333}.swagger-ui .bg-mid-gray{background-color:#555}.swagger-ui .bg-gray{background-color:#777}.swagger-ui .bg-silver{background-color:#999}.swagger-ui .bg-light-silver{background-color:#aaa}.swagger-ui .bg-moon-gray{background-color:#ccc}.swagger-ui .bg-light-gray{background-color:#eee}.swagger-ui .bg-near-white{background-color:#f4f4f4}.swagger-ui .bg-white{background-color:#fff}.swagger-ui .bg-transparent{background-color:transparent}.swagger-ui .bg-dark-red{background-color:#e7040f}.swagger-ui .bg-red{background-color:#ff4136}.swagger-ui .bg-light-red{background-color:#ff725c}.swagger-ui .bg-orange{background-color:#ff6300}.swagger-ui .bg-gold{background-color:#ffb700}.swagger-ui .bg-yellow{background-color:gold}.swagger-ui .bg-light-yellow{background-color:#fbf1a9}.swagger-ui .bg-purple{background-color:#5e2ca5}.swagger-ui .bg-light-purple{background-color:#a463f2}.swagger-ui .bg-dark-pink{background-color:#d5008f}.swagger-ui .bg-hot-pink{background-color:#ff41b4}.swagger-ui .bg-pink{background-color:#ff80cc}.swagger-ui .bg-light-pink{background-color:#ffa3d7}.swagger-ui .bg-dark-green{background-color:#137752}.swagger-ui .bg-green{background-color:#19a974}.swagger-ui .bg-light-green{background-color:#9eebcf}.swagger-ui .bg-navy{background-color:#001b44}.swagger-ui .bg-dark-blue{background-color:#00449e}.swagger-ui .bg-blue{background-color:#357edd}.swagger-ui .bg-light-blue{background-color:#96ccff}.swagger-ui .bg-lightest-blue{background-color:#cdecff}.swagger-ui .bg-washed-blue{background-color:#f6fffe}.swagger-ui .bg-washed-green{background-color:#e8fdf5}.swagger-ui .bg-washed-yellow{background-color:#fffceb}.swagger-ui .bg-washed-red{background-color:#ffdfdf}.swagger-ui .bg-inherit{background-color:inherit}.swagger-ui .hover-black:focus,.swagger-ui .hover-black:hover{color:#000}.swagger-ui .hover-near-black:focus,.swagger-ui .hover-near-black:hover{color:#111}.swagger-ui .hover-dark-gray:focus,.swagger-ui .hover-dark-gray:hover{color:#333}.swagger-ui .hover-mid-gray:focus,.swagger-ui .hover-mid-gray:hover{color:#555}.swagger-ui .hover-gray:focus,.swagger-ui .hover-gray:hover{color:#777}.swagger-ui .hover-silver:focus,.swagger-ui .hover-silver:hover{color:#999}.swagger-ui .hover-light-silver:focus,.swagger-ui .hover-light-silver:hover{color:#aaa}.swagger-ui .hover-moon-gray:focus,.swagger-ui .hover-moon-gray:hover{color:#ccc}.swagger-ui .hover-light-gray:focus,.swagger-ui .hover-light-gray:hover{color:#eee}.swagger-ui .hover-near-white:focus,.swagger-ui .hover-near-white:hover{color:#f4f4f4}.swagger-ui .hover-white:focus,.swagger-ui .hover-white:hover{color:#fff}.swagger-ui .hover-black-90:focus,.swagger-ui .hover-black-90:hover{color:rgba(0,0,0,.9)}.swagger-ui .hover-black-80:focus,.swagger-ui .hover-black-80:hover{color:rgba(0,0,0,.8)}.swagger-ui .hover-black-70:focus,.swagger-ui .hover-black-70:hover{color:rgba(0,0,0,.7)}.swagger-ui .hover-black-60:focus,.swagger-ui .hover-black-60:hover{color:rgba(0,0,0,.6)}.swagger-ui .hover-black-50:focus,.swagger-ui .hover-black-50:hover{color:rgba(0,0,0,.5)}.swagger-ui .hover-black-40:focus,.swagger-ui .hover-black-40:hover{color:rgba(0,0,0,.4)}.swagger-ui .hover-black-30:focus,.swagger-ui .hover-black-30:hover{color:rgba(0,0,0,.3)}.swagger-ui .hover-black-20:focus,.swagger-ui .hover-black-20:hover{color:rgba(0,0,0,.2)}.swagger-ui .hover-black-10:focus,.swagger-ui .hover-black-10:hover{color:rgba(0,0,0,.1)}.swagger-ui .hover-white-90:focus,.swagger-ui .hover-white-90:hover{color:hsla(0,0%,100%,.9)}.swagger-ui .hover-white-80:focus,.swagger-ui .hover-white-80:hover{color:hsla(0,0%,100%,.8)}.swagger-ui .hover-white-70:focus,.swagger-ui .hover-white-70:hover{color:hsla(0,0%,100%,.7)}.swagger-ui .hover-white-60:focus,.swagger-ui .hover-white-60:hover{color:hsla(0,0%,100%,.6)}.swagger-ui .hover-white-50:focus,.swagger-ui .hover-white-50:hover{color:hsla(0,0%,100%,.5)}.swagger-ui .hover-white-40:focus,.swagger-ui .hover-white-40:hover{color:hsla(0,0%,100%,.4)}.swagger-ui .hover-white-30:focus,.swagger-ui .hover-white-30:hover{color:hsla(0,0%,100%,.3)}.swagger-ui .hover-white-20:focus,.swagger-ui .hover-white-20:hover{color:hsla(0,0%,100%,.2)}.swagger-ui .hover-white-10:focus,.swagger-ui .hover-white-10:hover{color:hsla(0,0%,100%,.1)}.swagger-ui .hover-inherit:focus,.swagger-ui .hover-inherit:hover{color:inherit}.swagger-ui .hover-bg-black:focus,.swagger-ui .hover-bg-black:hover{background-color:#000}.swagger-ui .hover-bg-near-black:focus,.swagger-ui .hover-bg-near-black:hover{background-color:#111}.swagger-ui .hover-bg-dark-gray:focus,.swagger-ui .hover-bg-dark-gray:hover{background-color:#333}.swagger-ui .hover-bg-mid-gray:focus,.swagger-ui .hover-bg-mid-gray:hover{background-color:#555}.swagger-ui .hover-bg-gray:focus,.swagger-ui .hover-bg-gray:hover{background-color:#777}.swagger-ui .hover-bg-silver:focus,.swagger-ui .hover-bg-silver:hover{background-color:#999}.swagger-ui .hover-bg-light-silver:focus,.swagger-ui .hover-bg-light-silver:hover{background-color:#aaa}.swagger-ui .hover-bg-moon-gray:focus,.swagger-ui .hover-bg-moon-gray:hover{background-color:#ccc}.swagger-ui .hover-bg-light-gray:focus,.swagger-ui .hover-bg-light-gray:hover{background-color:#eee}.swagger-ui .hover-bg-near-white:focus,.swagger-ui .hover-bg-near-white:hover{background-color:#f4f4f4}.swagger-ui .hover-bg-white:focus,.swagger-ui .hover-bg-white:hover{background-color:#fff}.swagger-ui .hover-bg-transparent:focus,.swagger-ui .hover-bg-transparent:hover{background-color:transparent}.swagger-ui .hover-bg-black-90:focus,.swagger-ui .hover-bg-black-90:hover{background-color:rgba(0,0,0,.9)}.swagger-ui .hover-bg-black-80:focus,.swagger-ui .hover-bg-black-80:hover{background-color:rgba(0,0,0,.8)}.swagger-ui .hover-bg-black-70:focus,.swagger-ui .hover-bg-black-70:hover{background-color:rgba(0,0,0,.7)}.swagger-ui .hover-bg-black-60:focus,.swagger-ui .hover-bg-black-60:hover{background-color:rgba(0,0,0,.6)}.swagger-ui .hover-bg-black-50:focus,.swagger-ui .hover-bg-black-50:hover{background-color:rgba(0,0,0,.5)}.swagger-ui .hover-bg-black-40:focus,.swagger-ui .hover-bg-black-40:hover{background-color:rgba(0,0,0,.4)}.swagger-ui .hover-bg-black-30:focus,.swagger-ui .hover-bg-black-30:hover{background-color:rgba(0,0,0,.3)}.swagger-ui .hover-bg-black-20:focus,.swagger-ui .hover-bg-black-20:hover{background-color:rgba(0,0,0,.2)}.swagger-ui .hover-bg-black-10:focus,.swagger-ui .hover-bg-black-10:hover{background-color:rgba(0,0,0,.1)}.swagger-ui .hover-bg-white-90:focus,.swagger-ui .hover-bg-white-90:hover{background-color:hsla(0,0%,100%,.9)}.swagger-ui .hover-bg-white-80:focus,.swagger-ui .hover-bg-white-80:hover{background-color:hsla(0,0%,100%,.8)}.swagger-ui .hover-bg-white-70:focus,.swagger-ui .hover-bg-white-70:hover{background-color:hsla(0,0%,100%,.7)}.swagger-ui .hover-bg-white-60:focus,.swagger-ui .hover-bg-white-60:hover{background-color:hsla(0,0%,100%,.6)}.swagger-ui .hover-bg-white-50:focus,.swagger-ui .hover-bg-white-50:hover{background-color:hsla(0,0%,100%,.5)}.swagger-ui .hover-bg-white-40:focus,.swagger-ui .hover-bg-white-40:hover{background-color:hsla(0,0%,100%,.4)}.swagger-ui .hover-bg-white-30:focus,.swagger-ui .hover-bg-white-30:hover{background-color:hsla(0,0%,100%,.3)}.swagger-ui .hover-bg-white-20:focus,.swagger-ui .hover-bg-white-20:hover{background-color:hsla(0,0%,100%,.2)}.swagger-ui .hover-bg-white-10:focus,.swagger-ui .hover-bg-white-10:hover{background-color:hsla(0,0%,100%,.1)}.swagger-ui .hover-dark-red:focus,.swagger-ui .hover-dark-red:hover{color:#e7040f}.swagger-ui .hover-red:focus,.swagger-ui .hover-red:hover{color:#ff4136}.swagger-ui .hover-light-red:focus,.swagger-ui .hover-light-red:hover{color:#ff725c}.swagger-ui .hover-orange:focus,.swagger-ui .hover-orange:hover{color:#ff6300}.swagger-ui .hover-gold:focus,.swagger-ui .hover-gold:hover{color:#ffb700}.swagger-ui .hover-yellow:focus,.swagger-ui .hover-yellow:hover{color:gold}.swagger-ui .hover-light-yellow:focus,.swagger-ui .hover-light-yellow:hover{color:#fbf1a9}.swagger-ui .hover-purple:focus,.swagger-ui .hover-purple:hover{color:#5e2ca5}.swagger-ui .hover-light-purple:focus,.swagger-ui .hover-light-purple:hover{color:#a463f2}.swagger-ui .hover-dark-pink:focus,.swagger-ui .hover-dark-pink:hover{color:#d5008f}.swagger-ui .hover-hot-pink:focus,.swagger-ui .hover-hot-pink:hover{color:#ff41b4}.swagger-ui .hover-pink:focus,.swagger-ui .hover-pink:hover{color:#ff80cc}.swagger-ui .hover-light-pink:focus,.swagger-ui .hover-light-pink:hover{color:#ffa3d7}.swagger-ui .hover-dark-green:focus,.swagger-ui .hover-dark-green:hover{color:#137752}.swagger-ui .hover-green:focus,.swagger-ui .hover-green:hover{color:#19a974}.swagger-ui .hover-light-green:focus,.swagger-ui .hover-light-green:hover{color:#9eebcf}.swagger-ui .hover-navy:focus,.swagger-ui .hover-navy:hover{color:#001b44}.swagger-ui .hover-dark-blue:focus,.swagger-ui .hover-dark-blue:hover{color:#00449e}.swagger-ui .hover-blue:focus,.swagger-ui .hover-blue:hover{color:#357edd}.swagger-ui .hover-light-blue:focus,.swagger-ui .hover-light-blue:hover{color:#96ccff}.swagger-ui .hover-lightest-blue:focus,.swagger-ui .hover-lightest-blue:hover{color:#cdecff}.swagger-ui .hover-washed-blue:focus,.swagger-ui .hover-washed-blue:hover{color:#f6fffe}.swagger-ui .hover-washed-green:focus,.swagger-ui .hover-washed-green:hover{color:#e8fdf5}.swagger-ui .hover-washed-yellow:focus,.swagger-ui .hover-washed-yellow:hover{color:#fffceb}.swagger-ui .hover-washed-red:focus,.swagger-ui .hover-washed-red:hover{color:#ffdfdf}.swagger-ui .hover-bg-dark-red:focus,.swagger-ui .hover-bg-dark-red:hover{background-color:#e7040f}.swagger-ui .hover-bg-red:focus,.swagger-ui .hover-bg-red:hover{background-color:#ff4136}.swagger-ui .hover-bg-light-red:focus,.swagger-ui .hover-bg-light-red:hover{background-color:#ff725c}.swagger-ui .hover-bg-orange:focus,.swagger-ui .hover-bg-orange:hover{background-color:#ff6300}.swagger-ui .hover-bg-gold:focus,.swagger-ui .hover-bg-gold:hover{background-color:#ffb700}.swagger-ui .hover-bg-yellow:focus,.swagger-ui .hover-bg-yellow:hover{background-color:gold}.swagger-ui .hover-bg-light-yellow:focus,.swagger-ui .hover-bg-light-yellow:hover{background-color:#fbf1a9}.swagger-ui .hover-bg-purple:focus,.swagger-ui .hover-bg-purple:hover{background-color:#5e2ca5}.swagger-ui .hover-bg-light-purple:focus,.swagger-ui .hover-bg-light-purple:hover{background-color:#a463f2}.swagger-ui .hover-bg-dark-pink:focus,.swagger-ui .hover-bg-dark-pink:hover{background-color:#d5008f}.swagger-ui .hover-bg-hot-pink:focus,.swagger-ui .hover-bg-hot-pink:hover{background-color:#ff41b4}.swagger-ui .hover-bg-pink:focus,.swagger-ui .hover-bg-pink:hover{background-color:#ff80cc}.swagger-ui .hover-bg-light-pink:focus,.swagger-ui .hover-bg-light-pink:hover{background-color:#ffa3d7}.swagger-ui .hover-bg-dark-green:focus,.swagger-ui .hover-bg-dark-green:hover{background-color:#137752}.swagger-ui .hover-bg-green:focus,.swagger-ui .hover-bg-green:hover{background-color:#19a974}.swagger-ui .hover-bg-light-green:focus,.swagger-ui .hover-bg-light-green:hover{background-color:#9eebcf}.swagger-ui .hover-bg-navy:focus,.swagger-ui .hover-bg-navy:hover{background-color:#001b44}.swagger-ui .hover-bg-dark-blue:focus,.swagger-ui .hover-bg-dark-blue:hover{background-color:#00449e}.swagger-ui .hover-bg-blue:focus,.swagger-ui .hover-bg-blue:hover{background-color:#357edd}.swagger-ui .hover-bg-light-blue:focus,.swagger-ui .hover-bg-light-blue:hover{background-color:#96ccff}.swagger-ui .hover-bg-lightest-blue:focus,.swagger-ui .hover-bg-lightest-blue:hover{background-color:#cdecff}.swagger-ui .hover-bg-washed-blue:focus,.swagger-ui .hover-bg-washed-blue:hover{background-color:#f6fffe}.swagger-ui .hover-bg-washed-green:focus,.swagger-ui .hover-bg-washed-green:hover{background-color:#e8fdf5}.swagger-ui .hover-bg-washed-yellow:focus,.swagger-ui .hover-bg-washed-yellow:hover{background-color:#fffceb}.swagger-ui .hover-bg-washed-red:focus,.swagger-ui .hover-bg-washed-red:hover{background-color:#ffdfdf}.swagger-ui .hover-bg-inherit:focus,.swagger-ui .hover-bg-inherit:hover{background-color:inherit}.swagger-ui .pa0{padding:0}.swagger-ui .pa1{padding:.25rem}.swagger-ui .pa2{padding:.5rem}.swagger-ui .pa3{padding:1rem}.swagger-ui .pa4{padding:2rem}.swagger-ui .pa5{padding:4rem}.swagger-ui .pa6{padding:8rem}.swagger-ui .pa7{padding:16rem}.swagger-ui .pl0{padding-left:0}.swagger-ui .pl1{padding-left:.25rem}.swagger-ui .pl2{padding-left:.5rem}.swagger-ui .pl3{padding-left:1rem}.swagger-ui .pl4{padding-left:2rem}.swagger-ui .pl5{padding-left:4rem}.swagger-ui .pl6{padding-left:8rem}.swagger-ui .pl7{padding-left:16rem}.swagger-ui .pr0{padding-right:0}.swagger-ui .pr1{padding-right:.25rem}.swagger-ui .pr2{padding-right:.5rem}.swagger-ui .pr3{padding-right:1rem}.swagger-ui .pr4{padding-right:2rem}.swagger-ui .pr5{padding-right:4rem}.swagger-ui .pr6{padding-right:8rem}.swagger-ui .pr7{padding-right:16rem}.swagger-ui .pb0{padding-bottom:0}.swagger-ui .pb1{padding-bottom:.25rem}.swagger-ui .pb2{padding-bottom:.5rem}.swagger-ui .pb3{padding-bottom:1rem}.swagger-ui .pb4{padding-bottom:2rem}.swagger-ui .pb5{padding-bottom:4rem}.swagger-ui .pb6{padding-bottom:8rem}.swagger-ui .pb7{padding-bottom:16rem}.swagger-ui .pt0{padding-top:0}.swagger-ui .pt1{padding-top:.25rem}.swagger-ui .pt2{padding-top:.5rem}.swagger-ui .pt3{padding-top:1rem}.swagger-ui .pt4{padding-top:2rem}.swagger-ui .pt5{padding-top:4rem}.swagger-ui .pt6{padding-top:8rem}.swagger-ui .pt7{padding-top:16rem}.swagger-ui .pv0{padding-bottom:0;padding-top:0}.swagger-ui .pv1{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0{padding-left:0;padding-right:0}.swagger-ui .ph1{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0{margin:0}.swagger-ui .ma1{margin:.25rem}.swagger-ui .ma2{margin:.5rem}.swagger-ui .ma3{margin:1rem}.swagger-ui .ma4{margin:2rem}.swagger-ui .ma5{margin:4rem}.swagger-ui .ma6{margin:8rem}.swagger-ui .ma7{margin:16rem}.swagger-ui .ml0{margin-left:0}.swagger-ui .ml1{margin-left:.25rem}.swagger-ui .ml2{margin-left:.5rem}.swagger-ui .ml3{margin-left:1rem}.swagger-ui .ml4{margin-left:2rem}.swagger-ui .ml5{margin-left:4rem}.swagger-ui .ml6{margin-left:8rem}.swagger-ui .ml7{margin-left:16rem}.swagger-ui .mr0{margin-right:0}.swagger-ui .mr1{margin-right:.25rem}.swagger-ui .mr2{margin-right:.5rem}.swagger-ui .mr3{margin-right:1rem}.swagger-ui .mr4{margin-right:2rem}.swagger-ui .mr5{margin-right:4rem}.swagger-ui .mr6{margin-right:8rem}.swagger-ui .mr7{margin-right:16rem}.swagger-ui .mb0{margin-bottom:0}.swagger-ui .mb1{margin-bottom:.25rem}.swagger-ui .mb2{margin-bottom:.5rem}.swagger-ui .mb3{margin-bottom:1rem}.swagger-ui .mb4{margin-bottom:2rem}.swagger-ui .mb5{margin-bottom:4rem}.swagger-ui .mb6{margin-bottom:8rem}.swagger-ui .mb7{margin-bottom:16rem}.swagger-ui .mt0{margin-top:0}.swagger-ui .mt1{margin-top:.25rem}.swagger-ui .mt2{margin-top:.5rem}.swagger-ui .mt3{margin-top:1rem}.swagger-ui .mt4{margin-top:2rem}.swagger-ui .mt5{margin-top:4rem}.swagger-ui .mt6{margin-top:8rem}.swagger-ui .mt7{margin-top:16rem}.swagger-ui .mv0{margin-bottom:0;margin-top:0}.swagger-ui .mv1{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0{margin-left:0;margin-right:0}.swagger-ui .mh1{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7{margin-left:16rem;margin-right:16rem}@media screen and (min-width:30em){.swagger-ui .pa0-ns{padding:0}.swagger-ui .pa1-ns{padding:.25rem}.swagger-ui .pa2-ns{padding:.5rem}.swagger-ui .pa3-ns{padding:1rem}.swagger-ui .pa4-ns{padding:2rem}.swagger-ui .pa5-ns{padding:4rem}.swagger-ui .pa6-ns{padding:8rem}.swagger-ui .pa7-ns{padding:16rem}.swagger-ui .pl0-ns{padding-left:0}.swagger-ui .pl1-ns{padding-left:.25rem}.swagger-ui .pl2-ns{padding-left:.5rem}.swagger-ui .pl3-ns{padding-left:1rem}.swagger-ui .pl4-ns{padding-left:2rem}.swagger-ui .pl5-ns{padding-left:4rem}.swagger-ui .pl6-ns{padding-left:8rem}.swagger-ui .pl7-ns{padding-left:16rem}.swagger-ui .pr0-ns{padding-right:0}.swagger-ui .pr1-ns{padding-right:.25rem}.swagger-ui .pr2-ns{padding-right:.5rem}.swagger-ui .pr3-ns{padding-right:1rem}.swagger-ui .pr4-ns{padding-right:2rem}.swagger-ui .pr5-ns{padding-right:4rem}.swagger-ui .pr6-ns{padding-right:8rem}.swagger-ui .pr7-ns{padding-right:16rem}.swagger-ui .pb0-ns{padding-bottom:0}.swagger-ui .pb1-ns{padding-bottom:.25rem}.swagger-ui .pb2-ns{padding-bottom:.5rem}.swagger-ui .pb3-ns{padding-bottom:1rem}.swagger-ui .pb4-ns{padding-bottom:2rem}.swagger-ui .pb5-ns{padding-bottom:4rem}.swagger-ui .pb6-ns{padding-bottom:8rem}.swagger-ui .pb7-ns{padding-bottom:16rem}.swagger-ui .pt0-ns{padding-top:0}.swagger-ui .pt1-ns{padding-top:.25rem}.swagger-ui .pt2-ns{padding-top:.5rem}.swagger-ui .pt3-ns{padding-top:1rem}.swagger-ui .pt4-ns{padding-top:2rem}.swagger-ui .pt5-ns{padding-top:4rem}.swagger-ui .pt6-ns{padding-top:8rem}.swagger-ui .pt7-ns{padding-top:16rem}.swagger-ui .pv0-ns{padding-bottom:0;padding-top:0}.swagger-ui .pv1-ns{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-ns{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-ns{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-ns{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-ns{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-ns{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-ns{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-ns{padding-left:0;padding-right:0}.swagger-ui .ph1-ns{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-ns{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-ns{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-ns{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-ns{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-ns{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-ns{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-ns{margin:0}.swagger-ui .ma1-ns{margin:.25rem}.swagger-ui .ma2-ns{margin:.5rem}.swagger-ui .ma3-ns{margin:1rem}.swagger-ui .ma4-ns{margin:2rem}.swagger-ui .ma5-ns{margin:4rem}.swagger-ui .ma6-ns{margin:8rem}.swagger-ui .ma7-ns{margin:16rem}.swagger-ui .ml0-ns{margin-left:0}.swagger-ui .ml1-ns{margin-left:.25rem}.swagger-ui .ml2-ns{margin-left:.5rem}.swagger-ui .ml3-ns{margin-left:1rem}.swagger-ui .ml4-ns{margin-left:2rem}.swagger-ui .ml5-ns{margin-left:4rem}.swagger-ui .ml6-ns{margin-left:8rem}.swagger-ui .ml7-ns{margin-left:16rem}.swagger-ui .mr0-ns{margin-right:0}.swagger-ui .mr1-ns{margin-right:.25rem}.swagger-ui .mr2-ns{margin-right:.5rem}.swagger-ui .mr3-ns{margin-right:1rem}.swagger-ui .mr4-ns{margin-right:2rem}.swagger-ui .mr5-ns{margin-right:4rem}.swagger-ui .mr6-ns{margin-right:8rem}.swagger-ui .mr7-ns{margin-right:16rem}.swagger-ui .mb0-ns{margin-bottom:0}.swagger-ui .mb1-ns{margin-bottom:.25rem}.swagger-ui .mb2-ns{margin-bottom:.5rem}.swagger-ui .mb3-ns{margin-bottom:1rem}.swagger-ui .mb4-ns{margin-bottom:2rem}.swagger-ui .mb5-ns{margin-bottom:4rem}.swagger-ui .mb6-ns{margin-bottom:8rem}.swagger-ui .mb7-ns{margin-bottom:16rem}.swagger-ui .mt0-ns{margin-top:0}.swagger-ui .mt1-ns{margin-top:.25rem}.swagger-ui .mt2-ns{margin-top:.5rem}.swagger-ui .mt3-ns{margin-top:1rem}.swagger-ui .mt4-ns{margin-top:2rem}.swagger-ui .mt5-ns{margin-top:4rem}.swagger-ui .mt6-ns{margin-top:8rem}.swagger-ui .mt7-ns{margin-top:16rem}.swagger-ui .mv0-ns{margin-bottom:0;margin-top:0}.swagger-ui .mv1-ns{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-ns{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-ns{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-ns{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-ns{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-ns{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-ns{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-ns{margin-left:0;margin-right:0}.swagger-ui .mh1-ns{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-ns{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-ns{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-ns{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-ns{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-ns{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-ns{margin-left:16rem;margin-right:16rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .pa0-m{padding:0}.swagger-ui .pa1-m{padding:.25rem}.swagger-ui .pa2-m{padding:.5rem}.swagger-ui .pa3-m{padding:1rem}.swagger-ui .pa4-m{padding:2rem}.swagger-ui .pa5-m{padding:4rem}.swagger-ui .pa6-m{padding:8rem}.swagger-ui .pa7-m{padding:16rem}.swagger-ui .pl0-m{padding-left:0}.swagger-ui .pl1-m{padding-left:.25rem}.swagger-ui .pl2-m{padding-left:.5rem}.swagger-ui .pl3-m{padding-left:1rem}.swagger-ui .pl4-m{padding-left:2rem}.swagger-ui .pl5-m{padding-left:4rem}.swagger-ui .pl6-m{padding-left:8rem}.swagger-ui .pl7-m{padding-left:16rem}.swagger-ui .pr0-m{padding-right:0}.swagger-ui .pr1-m{padding-right:.25rem}.swagger-ui .pr2-m{padding-right:.5rem}.swagger-ui .pr3-m{padding-right:1rem}.swagger-ui .pr4-m{padding-right:2rem}.swagger-ui .pr5-m{padding-right:4rem}.swagger-ui .pr6-m{padding-right:8rem}.swagger-ui .pr7-m{padding-right:16rem}.swagger-ui .pb0-m{padding-bottom:0}.swagger-ui .pb1-m{padding-bottom:.25rem}.swagger-ui .pb2-m{padding-bottom:.5rem}.swagger-ui .pb3-m{padding-bottom:1rem}.swagger-ui .pb4-m{padding-bottom:2rem}.swagger-ui .pb5-m{padding-bottom:4rem}.swagger-ui .pb6-m{padding-bottom:8rem}.swagger-ui .pb7-m{padding-bottom:16rem}.swagger-ui .pt0-m{padding-top:0}.swagger-ui .pt1-m{padding-top:.25rem}.swagger-ui .pt2-m{padding-top:.5rem}.swagger-ui .pt3-m{padding-top:1rem}.swagger-ui .pt4-m{padding-top:2rem}.swagger-ui .pt5-m{padding-top:4rem}.swagger-ui .pt6-m{padding-top:8rem}.swagger-ui .pt7-m{padding-top:16rem}.swagger-ui .pv0-m{padding-bottom:0;padding-top:0}.swagger-ui .pv1-m{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-m{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-m{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-m{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-m{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-m{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-m{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-m{padding-left:0;padding-right:0}.swagger-ui .ph1-m{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-m{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-m{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-m{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-m{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-m{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-m{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-m{margin:0}.swagger-ui .ma1-m{margin:.25rem}.swagger-ui .ma2-m{margin:.5rem}.swagger-ui .ma3-m{margin:1rem}.swagger-ui .ma4-m{margin:2rem}.swagger-ui .ma5-m{margin:4rem}.swagger-ui .ma6-m{margin:8rem}.swagger-ui .ma7-m{margin:16rem}.swagger-ui .ml0-m{margin-left:0}.swagger-ui .ml1-m{margin-left:.25rem}.swagger-ui .ml2-m{margin-left:.5rem}.swagger-ui .ml3-m{margin-left:1rem}.swagger-ui .ml4-m{margin-left:2rem}.swagger-ui .ml5-m{margin-left:4rem}.swagger-ui .ml6-m{margin-left:8rem}.swagger-ui .ml7-m{margin-left:16rem}.swagger-ui .mr0-m{margin-right:0}.swagger-ui .mr1-m{margin-right:.25rem}.swagger-ui .mr2-m{margin-right:.5rem}.swagger-ui .mr3-m{margin-right:1rem}.swagger-ui .mr4-m{margin-right:2rem}.swagger-ui .mr5-m{margin-right:4rem}.swagger-ui .mr6-m{margin-right:8rem}.swagger-ui .mr7-m{margin-right:16rem}.swagger-ui .mb0-m{margin-bottom:0}.swagger-ui .mb1-m{margin-bottom:.25rem}.swagger-ui .mb2-m{margin-bottom:.5rem}.swagger-ui .mb3-m{margin-bottom:1rem}.swagger-ui .mb4-m{margin-bottom:2rem}.swagger-ui .mb5-m{margin-bottom:4rem}.swagger-ui .mb6-m{margin-bottom:8rem}.swagger-ui .mb7-m{margin-bottom:16rem}.swagger-ui .mt0-m{margin-top:0}.swagger-ui .mt1-m{margin-top:.25rem}.swagger-ui .mt2-m{margin-top:.5rem}.swagger-ui .mt3-m{margin-top:1rem}.swagger-ui .mt4-m{margin-top:2rem}.swagger-ui .mt5-m{margin-top:4rem}.swagger-ui .mt6-m{margin-top:8rem}.swagger-ui .mt7-m{margin-top:16rem}.swagger-ui .mv0-m{margin-bottom:0;margin-top:0}.swagger-ui .mv1-m{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-m{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-m{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-m{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-m{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-m{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-m{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-m{margin-left:0;margin-right:0}.swagger-ui .mh1-m{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-m{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-m{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-m{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-m{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-m{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-m{margin-left:16rem;margin-right:16rem}}@media screen and (min-width:60em){.swagger-ui .pa0-l{padding:0}.swagger-ui .pa1-l{padding:.25rem}.swagger-ui .pa2-l{padding:.5rem}.swagger-ui .pa3-l{padding:1rem}.swagger-ui .pa4-l{padding:2rem}.swagger-ui .pa5-l{padding:4rem}.swagger-ui .pa6-l{padding:8rem}.swagger-ui .pa7-l{padding:16rem}.swagger-ui .pl0-l{padding-left:0}.swagger-ui .pl1-l{padding-left:.25rem}.swagger-ui .pl2-l{padding-left:.5rem}.swagger-ui .pl3-l{padding-left:1rem}.swagger-ui .pl4-l{padding-left:2rem}.swagger-ui .pl5-l{padding-left:4rem}.swagger-ui .pl6-l{padding-left:8rem}.swagger-ui .pl7-l{padding-left:16rem}.swagger-ui .pr0-l{padding-right:0}.swagger-ui .pr1-l{padding-right:.25rem}.swagger-ui .pr2-l{padding-right:.5rem}.swagger-ui .pr3-l{padding-right:1rem}.swagger-ui .pr4-l{padding-right:2rem}.swagger-ui .pr5-l{padding-right:4rem}.swagger-ui .pr6-l{padding-right:8rem}.swagger-ui .pr7-l{padding-right:16rem}.swagger-ui .pb0-l{padding-bottom:0}.swagger-ui .pb1-l{padding-bottom:.25rem}.swagger-ui .pb2-l{padding-bottom:.5rem}.swagger-ui .pb3-l{padding-bottom:1rem}.swagger-ui .pb4-l{padding-bottom:2rem}.swagger-ui .pb5-l{padding-bottom:4rem}.swagger-ui .pb6-l{padding-bottom:8rem}.swagger-ui .pb7-l{padding-bottom:16rem}.swagger-ui .pt0-l{padding-top:0}.swagger-ui .pt1-l{padding-top:.25rem}.swagger-ui .pt2-l{padding-top:.5rem}.swagger-ui .pt3-l{padding-top:1rem}.swagger-ui .pt4-l{padding-top:2rem}.swagger-ui .pt5-l{padding-top:4rem}.swagger-ui .pt6-l{padding-top:8rem}.swagger-ui .pt7-l{padding-top:16rem}.swagger-ui .pv0-l{padding-bottom:0;padding-top:0}.swagger-ui .pv1-l{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-l{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-l{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-l{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-l{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-l{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-l{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-l{padding-left:0;padding-right:0}.swagger-ui .ph1-l{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-l{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-l{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-l{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-l{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-l{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-l{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-l{margin:0}.swagger-ui .ma1-l{margin:.25rem}.swagger-ui .ma2-l{margin:.5rem}.swagger-ui .ma3-l{margin:1rem}.swagger-ui .ma4-l{margin:2rem}.swagger-ui .ma5-l{margin:4rem}.swagger-ui .ma6-l{margin:8rem}.swagger-ui .ma7-l{margin:16rem}.swagger-ui .ml0-l{margin-left:0}.swagger-ui .ml1-l{margin-left:.25rem}.swagger-ui .ml2-l{margin-left:.5rem}.swagger-ui .ml3-l{margin-left:1rem}.swagger-ui .ml4-l{margin-left:2rem}.swagger-ui .ml5-l{margin-left:4rem}.swagger-ui .ml6-l{margin-left:8rem}.swagger-ui .ml7-l{margin-left:16rem}.swagger-ui .mr0-l{margin-right:0}.swagger-ui .mr1-l{margin-right:.25rem}.swagger-ui .mr2-l{margin-right:.5rem}.swagger-ui .mr3-l{margin-right:1rem}.swagger-ui .mr4-l{margin-right:2rem}.swagger-ui .mr5-l{margin-right:4rem}.swagger-ui .mr6-l{margin-right:8rem}.swagger-ui .mr7-l{margin-right:16rem}.swagger-ui .mb0-l{margin-bottom:0}.swagger-ui .mb1-l{margin-bottom:.25rem}.swagger-ui .mb2-l{margin-bottom:.5rem}.swagger-ui .mb3-l{margin-bottom:1rem}.swagger-ui .mb4-l{margin-bottom:2rem}.swagger-ui .mb5-l{margin-bottom:4rem}.swagger-ui .mb6-l{margin-bottom:8rem}.swagger-ui .mb7-l{margin-bottom:16rem}.swagger-ui .mt0-l{margin-top:0}.swagger-ui .mt1-l{margin-top:.25rem}.swagger-ui .mt2-l{margin-top:.5rem}.swagger-ui .mt3-l{margin-top:1rem}.swagger-ui .mt4-l{margin-top:2rem}.swagger-ui .mt5-l{margin-top:4rem}.swagger-ui .mt6-l{margin-top:8rem}.swagger-ui .mt7-l{margin-top:16rem}.swagger-ui .mv0-l{margin-bottom:0;margin-top:0}.swagger-ui .mv1-l{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-l{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-l{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-l{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-l{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-l{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-l{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-l{margin-left:0;margin-right:0}.swagger-ui .mh1-l{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-l{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-l{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-l{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-l{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-l{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-l{margin-left:16rem;margin-right:16rem}}.swagger-ui .na1{margin:-.25rem}.swagger-ui .na2{margin:-.5rem}.swagger-ui .na3{margin:-1rem}.swagger-ui .na4{margin:-2rem}.swagger-ui .na5{margin:-4rem}.swagger-ui .na6{margin:-8rem}.swagger-ui .na7{margin:-16rem}.swagger-ui .nl1{margin-left:-.25rem}.swagger-ui .nl2{margin-left:-.5rem}.swagger-ui .nl3{margin-left:-1rem}.swagger-ui .nl4{margin-left:-2rem}.swagger-ui .nl5{margin-left:-4rem}.swagger-ui .nl6{margin-left:-8rem}.swagger-ui .nl7{margin-left:-16rem}.swagger-ui .nr1{margin-right:-.25rem}.swagger-ui .nr2{margin-right:-.5rem}.swagger-ui .nr3{margin-right:-1rem}.swagger-ui .nr4{margin-right:-2rem}.swagger-ui .nr5{margin-right:-4rem}.swagger-ui .nr6{margin-right:-8rem}.swagger-ui .nr7{margin-right:-16rem}.swagger-ui .nb1{margin-bottom:-.25rem}.swagger-ui .nb2{margin-bottom:-.5rem}.swagger-ui .nb3{margin-bottom:-1rem}.swagger-ui .nb4{margin-bottom:-2rem}.swagger-ui .nb5{margin-bottom:-4rem}.swagger-ui .nb6{margin-bottom:-8rem}.swagger-ui .nb7{margin-bottom:-16rem}.swagger-ui .nt1{margin-top:-.25rem}.swagger-ui .nt2{margin-top:-.5rem}.swagger-ui .nt3{margin-top:-1rem}.swagger-ui .nt4{margin-top:-2rem}.swagger-ui .nt5{margin-top:-4rem}.swagger-ui .nt6{margin-top:-8rem}.swagger-ui .nt7{margin-top:-16rem}@media screen and (min-width:30em){.swagger-ui .na1-ns{margin:-.25rem}.swagger-ui .na2-ns{margin:-.5rem}.swagger-ui .na3-ns{margin:-1rem}.swagger-ui .na4-ns{margin:-2rem}.swagger-ui .na5-ns{margin:-4rem}.swagger-ui .na6-ns{margin:-8rem}.swagger-ui .na7-ns{margin:-16rem}.swagger-ui .nl1-ns{margin-left:-.25rem}.swagger-ui .nl2-ns{margin-left:-.5rem}.swagger-ui .nl3-ns{margin-left:-1rem}.swagger-ui .nl4-ns{margin-left:-2rem}.swagger-ui .nl5-ns{margin-left:-4rem}.swagger-ui .nl6-ns{margin-left:-8rem}.swagger-ui .nl7-ns{margin-left:-16rem}.swagger-ui .nr1-ns{margin-right:-.25rem}.swagger-ui .nr2-ns{margin-right:-.5rem}.swagger-ui .nr3-ns{margin-right:-1rem}.swagger-ui .nr4-ns{margin-right:-2rem}.swagger-ui .nr5-ns{margin-right:-4rem}.swagger-ui .nr6-ns{margin-right:-8rem}.swagger-ui .nr7-ns{margin-right:-16rem}.swagger-ui .nb1-ns{margin-bottom:-.25rem}.swagger-ui .nb2-ns{margin-bottom:-.5rem}.swagger-ui .nb3-ns{margin-bottom:-1rem}.swagger-ui .nb4-ns{margin-bottom:-2rem}.swagger-ui .nb5-ns{margin-bottom:-4rem}.swagger-ui .nb6-ns{margin-bottom:-8rem}.swagger-ui .nb7-ns{margin-bottom:-16rem}.swagger-ui .nt1-ns{margin-top:-.25rem}.swagger-ui .nt2-ns{margin-top:-.5rem}.swagger-ui .nt3-ns{margin-top:-1rem}.swagger-ui .nt4-ns{margin-top:-2rem}.swagger-ui .nt5-ns{margin-top:-4rem}.swagger-ui .nt6-ns{margin-top:-8rem}.swagger-ui .nt7-ns{margin-top:-16rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .na1-m{margin:-.25rem}.swagger-ui .na2-m{margin:-.5rem}.swagger-ui .na3-m{margin:-1rem}.swagger-ui .na4-m{margin:-2rem}.swagger-ui .na5-m{margin:-4rem}.swagger-ui .na6-m{margin:-8rem}.swagger-ui .na7-m{margin:-16rem}.swagger-ui .nl1-m{margin-left:-.25rem}.swagger-ui .nl2-m{margin-left:-.5rem}.swagger-ui .nl3-m{margin-left:-1rem}.swagger-ui .nl4-m{margin-left:-2rem}.swagger-ui .nl5-m{margin-left:-4rem}.swagger-ui .nl6-m{margin-left:-8rem}.swagger-ui .nl7-m{margin-left:-16rem}.swagger-ui .nr1-m{margin-right:-.25rem}.swagger-ui .nr2-m{margin-right:-.5rem}.swagger-ui .nr3-m{margin-right:-1rem}.swagger-ui .nr4-m{margin-right:-2rem}.swagger-ui .nr5-m{margin-right:-4rem}.swagger-ui .nr6-m{margin-right:-8rem}.swagger-ui .nr7-m{margin-right:-16rem}.swagger-ui .nb1-m{margin-bottom:-.25rem}.swagger-ui .nb2-m{margin-bottom:-.5rem}.swagger-ui .nb3-m{margin-bottom:-1rem}.swagger-ui .nb4-m{margin-bottom:-2rem}.swagger-ui .nb5-m{margin-bottom:-4rem}.swagger-ui .nb6-m{margin-bottom:-8rem}.swagger-ui .nb7-m{margin-bottom:-16rem}.swagger-ui .nt1-m{margin-top:-.25rem}.swagger-ui .nt2-m{margin-top:-.5rem}.swagger-ui .nt3-m{margin-top:-1rem}.swagger-ui .nt4-m{margin-top:-2rem}.swagger-ui .nt5-m{margin-top:-4rem}.swagger-ui .nt6-m{margin-top:-8rem}.swagger-ui .nt7-m{margin-top:-16rem}}@media screen and (min-width:60em){.swagger-ui .na1-l{margin:-.25rem}.swagger-ui .na2-l{margin:-.5rem}.swagger-ui .na3-l{margin:-1rem}.swagger-ui .na4-l{margin:-2rem}.swagger-ui .na5-l{margin:-4rem}.swagger-ui .na6-l{margin:-8rem}.swagger-ui .na7-l{margin:-16rem}.swagger-ui .nl1-l{margin-left:-.25rem}.swagger-ui .nl2-l{margin-left:-.5rem}.swagger-ui .nl3-l{margin-left:-1rem}.swagger-ui .nl4-l{margin-left:-2rem}.swagger-ui .nl5-l{margin-left:-4rem}.swagger-ui .nl6-l{margin-left:-8rem}.swagger-ui .nl7-l{margin-left:-16rem}.swagger-ui .nr1-l{margin-right:-.25rem}.swagger-ui .nr2-l{margin-right:-.5rem}.swagger-ui .nr3-l{margin-right:-1rem}.swagger-ui .nr4-l{margin-right:-2rem}.swagger-ui .nr5-l{margin-right:-4rem}.swagger-ui .nr6-l{margin-right:-8rem}.swagger-ui .nr7-l{margin-right:-16rem}.swagger-ui .nb1-l{margin-bottom:-.25rem}.swagger-ui .nb2-l{margin-bottom:-.5rem}.swagger-ui .nb3-l{margin-bottom:-1rem}.swagger-ui .nb4-l{margin-bottom:-2rem}.swagger-ui .nb5-l{margin-bottom:-4rem}.swagger-ui .nb6-l{margin-bottom:-8rem}.swagger-ui .nb7-l{margin-bottom:-16rem}.swagger-ui .nt1-l{margin-top:-.25rem}.swagger-ui .nt2-l{margin-top:-.5rem}.swagger-ui .nt3-l{margin-top:-1rem}.swagger-ui .nt4-l{margin-top:-2rem}.swagger-ui .nt5-l{margin-top:-4rem}.swagger-ui .nt6-l{margin-top:-8rem}.swagger-ui .nt7-l{margin-top:-16rem}}.swagger-ui .collapse{border-collapse:collapse;border-spacing:0}.swagger-ui .striped--light-silver:nth-child(odd){background-color:#aaa}.swagger-ui .striped--moon-gray:nth-child(odd){background-color:#ccc}.swagger-ui .striped--light-gray:nth-child(odd){background-color:#eee}.swagger-ui .striped--near-white:nth-child(odd){background-color:#f4f4f4}.swagger-ui .stripe-light:nth-child(odd){background-color:hsla(0,0%,100%,.1)}.swagger-ui .stripe-dark:nth-child(odd){background-color:rgba(0,0,0,.1)}.swagger-ui .strike{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline{-webkit-text-decoration:none;text-decoration:none}@media screen and (min-width:30em){.swagger-ui .strike-ns{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-ns{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-ns{-webkit-text-decoration:none;text-decoration:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .strike-m{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-m{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-m{-webkit-text-decoration:none;text-decoration:none}}@media screen and (min-width:60em){.swagger-ui .strike-l{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-l{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-l{-webkit-text-decoration:none;text-decoration:none}}.swagger-ui .tl{text-align:left}.swagger-ui .tr{text-align:right}.swagger-ui .tc{text-align:center}.swagger-ui .tj{text-align:justify}@media screen and (min-width:30em){.swagger-ui .tl-ns{text-align:left}.swagger-ui .tr-ns{text-align:right}.swagger-ui .tc-ns{text-align:center}.swagger-ui .tj-ns{text-align:justify}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .tl-m{text-align:left}.swagger-ui .tr-m{text-align:right}.swagger-ui .tc-m{text-align:center}.swagger-ui .tj-m{text-align:justify}}@media screen and (min-width:60em){.swagger-ui .tl-l{text-align:left}.swagger-ui .tr-l{text-align:right}.swagger-ui .tc-l{text-align:center}.swagger-ui .tj-l{text-align:justify}}.swagger-ui .ttc{text-transform:capitalize}.swagger-ui .ttl{text-transform:lowercase}.swagger-ui .ttu{text-transform:uppercase}.swagger-ui .ttn{text-transform:none}@media screen and (min-width:30em){.swagger-ui .ttc-ns{text-transform:capitalize}.swagger-ui .ttl-ns{text-transform:lowercase}.swagger-ui .ttu-ns{text-transform:uppercase}.swagger-ui .ttn-ns{text-transform:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ttc-m{text-transform:capitalize}.swagger-ui .ttl-m{text-transform:lowercase}.swagger-ui .ttu-m{text-transform:uppercase}.swagger-ui .ttn-m{text-transform:none}}@media screen and (min-width:60em){.swagger-ui .ttc-l{text-transform:capitalize}.swagger-ui .ttl-l{text-transform:lowercase}.swagger-ui .ttu-l{text-transform:uppercase}.swagger-ui .ttn-l{text-transform:none}}.swagger-ui .f-6,.swagger-ui .f-headline{font-size:6rem}.swagger-ui .f-5,.swagger-ui .f-subheadline{font-size:5rem}.swagger-ui .f1{font-size:3rem}.swagger-ui .f2{font-size:2.25rem}.swagger-ui .f3{font-size:1.5rem}.swagger-ui .f4{font-size:1.25rem}.swagger-ui .f5{font-size:1rem}.swagger-ui .f6{font-size:.875rem}.swagger-ui .f7{font-size:.75rem}@media screen and (min-width:30em){.swagger-ui .f-6-ns,.swagger-ui .f-headline-ns{font-size:6rem}.swagger-ui .f-5-ns,.swagger-ui .f-subheadline-ns{font-size:5rem}.swagger-ui .f1-ns{font-size:3rem}.swagger-ui .f2-ns{font-size:2.25rem}.swagger-ui .f3-ns{font-size:1.5rem}.swagger-ui .f4-ns{font-size:1.25rem}.swagger-ui .f5-ns{font-size:1rem}.swagger-ui .f6-ns{font-size:.875rem}.swagger-ui .f7-ns{font-size:.75rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .f-6-m,.swagger-ui .f-headline-m{font-size:6rem}.swagger-ui .f-5-m,.swagger-ui .f-subheadline-m{font-size:5rem}.swagger-ui .f1-m{font-size:3rem}.swagger-ui .f2-m{font-size:2.25rem}.swagger-ui .f3-m{font-size:1.5rem}.swagger-ui .f4-m{font-size:1.25rem}.swagger-ui .f5-m{font-size:1rem}.swagger-ui .f6-m{font-size:.875rem}.swagger-ui .f7-m{font-size:.75rem}}@media screen and (min-width:60em){.swagger-ui .f-6-l,.swagger-ui .f-headline-l{font-size:6rem}.swagger-ui .f-5-l,.swagger-ui .f-subheadline-l{font-size:5rem}.swagger-ui .f1-l{font-size:3rem}.swagger-ui .f2-l{font-size:2.25rem}.swagger-ui .f3-l{font-size:1.5rem}.swagger-ui .f4-l{font-size:1.25rem}.swagger-ui .f5-l{font-size:1rem}.swagger-ui .f6-l{font-size:.875rem}.swagger-ui .f7-l{font-size:.75rem}}.swagger-ui .measure{max-width:30em}.swagger-ui .measure-wide{max-width:34em}.swagger-ui .measure-narrow{max-width:20em}.swagger-ui .indent{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width:30em){.swagger-ui .measure-ns{max-width:30em}.swagger-ui .measure-wide-ns{max-width:34em}.swagger-ui .measure-narrow-ns{max-width:20em}.swagger-ui .indent-ns{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-ns{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-ns{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .measure-m{max-width:30em}.swagger-ui .measure-wide-m{max-width:34em}.swagger-ui .measure-narrow-m{max-width:20em}.swagger-ui .indent-m{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-m{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-m{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media screen and (min-width:60em){.swagger-ui .measure-l{max-width:30em}.swagger-ui .measure-wide-l{max-width:34em}.swagger-ui .measure-narrow-l{max-width:20em}.swagger-ui .indent-l{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-l{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.swagger-ui .overflow-container{overflow-y:scroll}.swagger-ui .center{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto{margin-right:auto}.swagger-ui .ml-auto{margin-left:auto}@media screen and (min-width:30em){.swagger-ui .center-ns{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-ns{margin-right:auto}.swagger-ui .ml-auto-ns{margin-left:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .center-m{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-m{margin-right:auto}.swagger-ui .ml-auto-m{margin-left:auto}}@media screen and (min-width:60em){.swagger-ui .center-l{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-l{margin-right:auto}.swagger-ui .ml-auto-l{margin-left:auto}}.swagger-ui .clip{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}@media screen and (min-width:30em){.swagger-ui .clip-ns{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .clip-m{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}@media screen and (min-width:60em){.swagger-ui .clip-l{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}.swagger-ui .ws-normal{white-space:normal}.swagger-ui .nowrap{white-space:nowrap}.swagger-ui .pre{white-space:pre}@media screen and (min-width:30em){.swagger-ui .ws-normal-ns{white-space:normal}.swagger-ui .nowrap-ns{white-space:nowrap}.swagger-ui .pre-ns{white-space:pre}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ws-normal-m{white-space:normal}.swagger-ui .nowrap-m{white-space:nowrap}.swagger-ui .pre-m{white-space:pre}}@media screen and (min-width:60em){.swagger-ui .ws-normal-l{white-space:normal}.swagger-ui .nowrap-l{white-space:nowrap}.swagger-ui .pre-l{white-space:pre}}.swagger-ui .v-base{vertical-align:baseline}.swagger-ui .v-mid{vertical-align:middle}.swagger-ui .v-top{vertical-align:top}.swagger-ui .v-btm{vertical-align:bottom}@media screen and (min-width:30em){.swagger-ui .v-base-ns{vertical-align:baseline}.swagger-ui .v-mid-ns{vertical-align:middle}.swagger-ui .v-top-ns{vertical-align:top}.swagger-ui .v-btm-ns{vertical-align:bottom}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .v-base-m{vertical-align:baseline}.swagger-ui .v-mid-m{vertical-align:middle}.swagger-ui .v-top-m{vertical-align:top}.swagger-ui .v-btm-m{vertical-align:bottom}}@media screen and (min-width:60em){.swagger-ui .v-base-l{vertical-align:baseline}.swagger-ui .v-mid-l{vertical-align:middle}.swagger-ui .v-top-l{vertical-align:top}.swagger-ui .v-btm-l{vertical-align:bottom}}.swagger-ui .dim{opacity:1;transition:opacity .15s ease-in}.swagger-ui .dim:focus,.swagger-ui .dim:hover{opacity:.5;transition:opacity .15s ease-in}.swagger-ui .dim:active{opacity:.8;transition:opacity .15s ease-out}.swagger-ui .glow{transition:opacity .15s ease-in}.swagger-ui .glow:focus,.swagger-ui .glow:hover{opacity:1;transition:opacity .15s ease-in}.swagger-ui .hide-child .child{opacity:0;transition:opacity .15s ease-in}.swagger-ui .hide-child:active .child,.swagger-ui .hide-child:focus .child,.swagger-ui .hide-child:hover .child{opacity:1;transition:opacity .15s ease-in}.swagger-ui .underline-hover:focus,.swagger-ui .underline-hover:hover{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .grow{-moz-osx-font-smoothing:grayscale;backface-visibility:hidden;transform:translateZ(0);transition:transform .25s ease-out}.swagger-ui .grow:focus,.swagger-ui .grow:hover{transform:scale(1.05)}.swagger-ui .grow:active{transform:scale(.9)}.swagger-ui .grow-large{-moz-osx-font-smoothing:grayscale;backface-visibility:hidden;transform:translateZ(0);transition:transform .25s ease-in-out}.swagger-ui .grow-large:focus,.swagger-ui .grow-large:hover{transform:scale(1.2)}.swagger-ui .grow-large:active{transform:scale(.95)}.swagger-ui .pointer:hover{cursor:pointer}.swagger-ui .shadow-hover{cursor:pointer;position:relative;transition:all .5s cubic-bezier(.165,.84,.44,1)}.swagger-ui .shadow-hover:after{border-radius:inherit;box-shadow:0 0 16px 2px rgba(0,0,0,.2);content:\"\";height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .5s cubic-bezier(.165,.84,.44,1);width:100%;z-index:-1}.swagger-ui .shadow-hover:focus:after,.swagger-ui .shadow-hover:hover:after{opacity:1}.swagger-ui .bg-animate,.swagger-ui .bg-animate:focus,.swagger-ui .bg-animate:hover{transition:background-color .15s ease-in-out}.swagger-ui .z-0{z-index:0}.swagger-ui .z-1{z-index:1}.swagger-ui .z-2{z-index:2}.swagger-ui .z-3{z-index:3}.swagger-ui .z-4{z-index:4}.swagger-ui .z-5{z-index:5}.swagger-ui .z-999{z-index:999}.swagger-ui .z-9999{z-index:9999}.swagger-ui .z-max{z-index:2147483647}.swagger-ui .z-inherit{z-index:inherit}.swagger-ui .z-initial,.swagger-ui .z-unset{z-index:auto}.swagger-ui .nested-copy-line-height ol,.swagger-ui .nested-copy-line-height p,.swagger-ui .nested-copy-line-height ul{line-height:1.5}.swagger-ui .nested-headline-line-height h1,.swagger-ui .nested-headline-line-height h2,.swagger-ui .nested-headline-line-height h3,.swagger-ui .nested-headline-line-height h4,.swagger-ui .nested-headline-line-height h5,.swagger-ui .nested-headline-line-height h6{line-height:1.25}.swagger-ui .nested-list-reset ol,.swagger-ui .nested-list-reset ul{list-style-type:none;margin-left:0;padding-left:0}.swagger-ui .nested-copy-indent p+p{margin-bottom:0;margin-top:0;text-indent:.1em}.swagger-ui .nested-copy-seperator p+p{margin-top:1.5em}.swagger-ui .nested-img img{display:block;max-width:100%;width:100%}.swagger-ui .nested-links a{color:#357edd;transition:color .15s ease-in}.swagger-ui .nested-links a:focus,.swagger-ui .nested-links a:hover{color:#96ccff;transition:color .15s ease-in}.swagger-ui .wrapper{box-sizing:border-box;margin:0 auto;max-width:1460px;padding:0 20px;width:100%}.swagger-ui .opblock-tag-section{display:flex;flex-direction:column}.swagger-ui .try-out.btn-group{display:flex;flex:.1 2 auto;padding:0}.swagger-ui .try-out__btn{margin-left:1.25rem}.swagger-ui .opblock-tag{align-items:center;border-bottom:1px solid rgba(59,65,81,.3);cursor:pointer;display:flex;padding:10px 20px 10px 10px;transition:all .2s}.swagger-ui .opblock-tag:hover{background:rgba(0,0,0,.02)}.swagger-ui .opblock-tag{color:#3b4151;font-family:sans-serif;font-size:24px;margin:0 0 5px}.swagger-ui .opblock-tag.no-desc span{flex:1}.swagger-ui .opblock-tag svg{transition:all .4s}.swagger-ui .opblock-tag small{color:#3b4151;flex:2;font-family:sans-serif;font-size:14px;font-weight:400;padding:0 10px}.swagger-ui .opblock-tag>div{flex:1 1 150px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.swagger-ui .opblock-tag small,.swagger-ui .opblock-tag>div{flex:1}}.swagger-ui .opblock-tag .info__externaldocs{text-align:right}.swagger-ui .parameter__type{color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;padding:5px 0}.swagger-ui .parameter-controls{margin-top:.75em}.swagger-ui .examples__title{display:block;font-size:1.1em;font-weight:700;margin-bottom:.75em}.swagger-ui .examples__section{margin-top:1.5em}.swagger-ui .examples__section-header{font-size:.9rem;font-weight:700;margin-bottom:.5rem}.swagger-ui .examples-select{display:inline-block;margin-bottom:.75em}.swagger-ui .examples-select .examples-select-element{width:100%}.swagger-ui .examples-select__section-label{font-size:.9rem;font-weight:700;margin-right:.5rem}.swagger-ui .example__section{margin-top:1.5em}.swagger-ui .example__section-header{font-size:.9rem;font-weight:700;margin-bottom:.5rem}.swagger-ui .view-line-link{cursor:pointer;margin:0 5px;position:relative;top:3px;transition:all .5s;width:20px}.swagger-ui .opblock{border:1px solid #000;border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.19);margin:0 0 15px}.swagger-ui .opblock .tab-header{display:flex;flex:1}.swagger-ui .opblock .tab-header .tab-item{cursor:pointer;padding:0 40px}.swagger-ui .opblock .tab-header .tab-item:first-of-type{padding:0 40px 0 0}.swagger-ui .opblock .tab-header .tab-item.active h4 span{position:relative}.swagger-ui .opblock .tab-header .tab-item.active h4 span:after{background:gray;bottom:-15px;content:\"\";height:4px;left:50%;position:absolute;transform:translateX(-50%);width:120%}.swagger-ui .opblock.is-open .opblock-summary{border-bottom:1px solid #000}.swagger-ui .opblock .opblock-section-header{align-items:center;background:hsla(0,0%,100%,.8);box-shadow:0 1px 2px rgba(0,0,0,.1);display:flex;min-height:50px;padding:8px 20px}.swagger-ui .opblock .opblock-section-header>label{align-items:center;color:#3b4151;display:flex;font-family:sans-serif;font-size:12px;font-weight:700;margin:0 0 0 auto}.swagger-ui .opblock .opblock-section-header>label>span{padding:0 10px 0 0}.swagger-ui .opblock .opblock-section-header h4{color:#3b4151;flex:1;font-family:sans-serif;font-size:14px;margin:0}.swagger-ui .opblock .opblock-summary-method{background:#000;border-radius:3px;color:#fff;font-family:sans-serif;font-size:14px;font-weight:700;min-width:80px;padding:6px 0;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.1)}@media(max-width:768px){.swagger-ui .opblock .opblock-summary-method{font-size:12px}}.swagger-ui .opblock .opblock-summary-operation-id,.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{align-items:center;color:#3b4151;display:flex;font-family:monospace;font-size:16px;font-weight:600;word-break:break-word}@media(max-width:768px){.swagger-ui .opblock .opblock-summary-operation-id,.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{font-size:12px}}.swagger-ui .opblock .opblock-summary-path{flex-shrink:1}@media(max-width:640px){.swagger-ui .opblock .opblock-summary-path{max-width:100%}}.swagger-ui .opblock .opblock-summary-path__deprecated{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .opblock .opblock-summary-operation-id{font-size:14px}.swagger-ui .opblock .opblock-summary-description{color:#3b4151;font-family:sans-serif;font-size:13px;word-break:break-word}.swagger-ui .opblock .opblock-summary-path-description-wrapper{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:0 10px;padding:0 10px;width:100%}@media(max-width:550px){.swagger-ui .opblock .opblock-summary-path-description-wrapper{align-items:flex-start;flex-direction:column}}.swagger-ui .opblock .opblock-summary{align-items:center;cursor:pointer;display:flex;padding:5px}.swagger-ui .opblock .opblock-summary .view-line-link{cursor:pointer;margin:0;position:relative;top:2px;transition:all .5s;width:0}.swagger-ui .opblock .opblock-summary:hover .view-line-link{margin:0 5px;width:18px}.swagger-ui .opblock .opblock-summary:hover .view-line-link.copy-to-clipboard{width:24px}.swagger-ui .opblock.opblock-post{background:rgba(73,204,144,.1);border-color:#49cc90}.swagger-ui .opblock.opblock-post .opblock-summary-method{background:#49cc90}.swagger-ui .opblock.opblock-post .opblock-summary{border-color:#49cc90}.swagger-ui .opblock.opblock-post .tab-header .tab-item.active h4 span:after{background:#49cc90}.swagger-ui .opblock.opblock-put{background:rgba(252,161,48,.1);border-color:#fca130}.swagger-ui .opblock.opblock-put .opblock-summary-method{background:#fca130}.swagger-ui .opblock.opblock-put .opblock-summary{border-color:#fca130}.swagger-ui .opblock.opblock-put .tab-header .tab-item.active h4 span:after{background:#fca130}.swagger-ui .opblock.opblock-delete{background:rgba(249,62,62,.1);border-color:#f93e3e}.swagger-ui .opblock.opblock-delete .opblock-summary-method{background:#f93e3e}.swagger-ui .opblock.opblock-delete .opblock-summary{border-color:#f93e3e}.swagger-ui .opblock.opblock-delete .tab-header .tab-item.active h4 span:after{background:#f93e3e}.swagger-ui .opblock.opblock-get{background:rgba(97,175,254,.1);border-color:#61affe}.swagger-ui .opblock.opblock-get .opblock-summary-method{background:#61affe}.swagger-ui .opblock.opblock-get .opblock-summary{border-color:#61affe}.swagger-ui .opblock.opblock-get .tab-header .tab-item.active h4 span:after{background:#61affe}.swagger-ui .opblock.opblock-patch{background:rgba(80,227,194,.1);border-color:#50e3c2}.swagger-ui .opblock.opblock-patch .opblock-summary-method{background:#50e3c2}.swagger-ui .opblock.opblock-patch .opblock-summary{border-color:#50e3c2}.swagger-ui .opblock.opblock-patch .tab-header .tab-item.active h4 span:after{background:#50e3c2}.swagger-ui .opblock.opblock-head{background:rgba(144,18,254,.1);border-color:#9012fe}.swagger-ui .opblock.opblock-head .opblock-summary-method{background:#9012fe}.swagger-ui .opblock.opblock-head .opblock-summary{border-color:#9012fe}.swagger-ui .opblock.opblock-head .tab-header .tab-item.active h4 span:after{background:#9012fe}.swagger-ui .opblock.opblock-options{background:rgba(13,90,167,.1);border-color:#0d5aa7}.swagger-ui .opblock.opblock-options .opblock-summary-method{background:#0d5aa7}.swagger-ui .opblock.opblock-options .opblock-summary{border-color:#0d5aa7}.swagger-ui .opblock.opblock-options .tab-header .tab-item.active h4 span:after{background:#0d5aa7}.swagger-ui .opblock.opblock-deprecated{background:hsla(0,0%,92%,.1);border-color:#ebebeb;opacity:.6}.swagger-ui .opblock.opblock-deprecated .opblock-summary-method{background:#ebebeb}.swagger-ui .opblock.opblock-deprecated .opblock-summary{border-color:#ebebeb}.swagger-ui .opblock.opblock-deprecated .tab-header .tab-item.active h4 span:after{background:#ebebeb}.swagger-ui .opblock .opblock-schemes{padding:8px 20px}.swagger-ui .opblock .opblock-schemes .schemes-title{padding:0 10px 0 0}.swagger-ui .filter .operation-filter-input{border:2px solid #d8dde7;margin:20px 0;padding:10px;width:100%}.swagger-ui .download-url-wrapper .failed,.swagger-ui .filter .failed{color:red}.swagger-ui .download-url-wrapper .loading,.swagger-ui .filter .loading{color:#aaa}.swagger-ui .model-example{margin-top:1em}.swagger-ui .tab{display:flex;list-style:none;padding:0}.swagger-ui .tab li{color:#3b4151;cursor:pointer;font-family:sans-serif;font-size:12px;min-width:60px;padding:0}.swagger-ui .tab li:first-of-type{padding-left:0;padding-right:12px;position:relative}.swagger-ui .tab li:first-of-type:after{background:rgba(0,0,0,.2);content:\"\";height:100%;position:absolute;right:6px;top:0;width:1px}.swagger-ui .tab li.active{font-weight:700}.swagger-ui .tab li button.tablinks{background:none;border:0;color:inherit;font-family:inherit;font-weight:inherit;padding:0}.swagger-ui .opblock-description-wrapper,.swagger-ui .opblock-external-docs-wrapper,.swagger-ui .opblock-title_normal{color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px;padding:15px 20px}.swagger-ui .opblock-description-wrapper h4,.swagger-ui .opblock-external-docs-wrapper h4,.swagger-ui .opblock-title_normal h4{color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px}.swagger-ui .opblock-description-wrapper p,.swagger-ui .opblock-external-docs-wrapper p,.swagger-ui .opblock-title_normal p{color:#3b4151;font-family:sans-serif;font-size:14px;margin:0}.swagger-ui .opblock-external-docs-wrapper h4{padding-left:0}.swagger-ui .execute-wrapper{padding:20px;text-align:right}.swagger-ui .execute-wrapper .btn{padding:8px 40px;width:100%}.swagger-ui .body-param-options{display:flex;flex-direction:column}.swagger-ui .body-param-options .body-param-edit{padding:10px 0}.swagger-ui .body-param-options label{padding:8px 0}.swagger-ui .body-param-options label select{margin:3px 0 0}.swagger-ui .responses-inner{padding:20px}.swagger-ui .responses-inner h4,.swagger-ui .responses-inner h5{color:#3b4151;font-family:sans-serif;font-size:12px;margin:10px 0 5px}.swagger-ui .responses-inner .curl{max-height:400px;white-space:normal}.swagger-ui .response-col_status{color:#3b4151;font-family:sans-serif;font-size:14px}.swagger-ui .response-col_status .response-undocumented{color:#909090;font-family:monospace;font-size:11px;font-weight:600}.swagger-ui .response-col_links{color:#3b4151;font-family:sans-serif;font-size:14px;max-width:40em;padding-left:2em}.swagger-ui .response-col_links .response-undocumented{color:#909090;font-family:monospace;font-size:11px;font-weight:600}.swagger-ui .response-col_links .operation-link{margin-bottom:1.5em}.swagger-ui .response-col_links .operation-link .description{margin-bottom:.5em}.swagger-ui .opblock-body .opblock-loading-animation{display:block;margin:3em auto}.swagger-ui .opblock-body pre.microlight{background:#333;border-radius:4px;font-size:12px;-webkit-hyphens:auto;hyphens:auto;margin:0;padding:10px;white-space:pre-wrap;word-break:break-all;word-break:break-word;word-wrap:break-word;color:#fff;font-family:monospace;font-weight:600}.swagger-ui .opblock-body pre.microlight .headerline{display:block}.swagger-ui .highlight-code{position:relative}.swagger-ui .highlight-code>.microlight{max-height:400px;min-height:6em;overflow-y:auto}.swagger-ui .highlight-code>.microlight code{white-space:pre-wrap!important;word-break:break-all}.swagger-ui .curl-command{position:relative}.swagger-ui .download-contents{align-items:center;background:#7d8293;border:none;border-radius:4px;bottom:10px;color:#fff;display:flex;font-family:sans-serif;font-size:14px;font-weight:600;height:30px;justify-content:center;padding:5px;position:absolute;right:10px;text-align:center}.swagger-ui .scheme-container{background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.15);margin:0 0 20px;padding:30px 0}.swagger-ui .scheme-container .schemes{align-items:flex-end;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.swagger-ui .scheme-container .schemes>.schemes-server-container{display:flex;flex-wrap:wrap;gap:10px}.swagger-ui .scheme-container .schemes>.schemes-server-container>label{color:#3b4151;display:flex;flex-direction:column;font-family:sans-serif;font-size:12px;font-weight:700;margin:-20px 15px 0 0}.swagger-ui .scheme-container .schemes>.schemes-server-container>label select{min-width:130px;text-transform:uppercase}.swagger-ui .scheme-container .schemes:not(:has(.schemes-server-container)){justify-content:flex-end}.swagger-ui .scheme-container .schemes .auth-wrapper{flex:none;justify-content:start}.swagger-ui .scheme-container .schemes .auth-wrapper .authorize{display:flex;flex-wrap:nowrap;margin:0;padding-right:20px}.swagger-ui .loading-container{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:1em;min-height:1px;padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{color:#3b4151;content:\"loading\";font-family:sans-serif;font-size:10px;font-weight:700;left:50%;position:absolute;text-transform:uppercase;top:50%;transform:translate(-50%,-50%)}.swagger-ui .loading-container .loading:before{animation:rotation 1s linear infinite,opacity .5s;backface-visibility:hidden;border:2px solid rgba(85,85,85,.1);border-radius:100%;border-top-color:rgba(0,0,0,.6);content:\"\";display:block;height:60px;left:50%;margin:-30px;opacity:1;position:absolute;top:50%;width:60px}@keyframes rotation{to{transform:rotate(1turn)}}.swagger-ui .response-controls{display:flex;padding-top:1em}.swagger-ui .response-control-media-type{margin-right:1em}.swagger-ui .response-control-media-type--accept-controller select{border-color:green}.swagger-ui .response-control-media-type__accept-message{color:green;font-size:.7em}.swagger-ui .response-control-examples__title,.swagger-ui .response-control-media-type__title{display:block;font-size:.7em;margin-bottom:.2em}@keyframes blinker{50%{opacity:0}}.swagger-ui .hidden{display:none}.swagger-ui .no-margin{border:none;height:auto;margin:0;padding:0}.swagger-ui .float-right{float:right}.swagger-ui .svg-assets{height:0;position:absolute;width:0}.swagger-ui section h3{color:#3b4151;font-family:sans-serif}.swagger-ui a.nostyle{display:inline}.swagger-ui a.nostyle,.swagger-ui a.nostyle:visited{color:inherit;cursor:pointer;text-decoration:inherit}.swagger-ui .fallback{color:#aaa;padding:1em}.swagger-ui .version-pragma{height:100%;padding:5em 0}.swagger-ui .version-pragma__message{display:flex;font-size:1.2em;height:100%;justify-content:center;line-height:1.5em;padding:0 .6em;text-align:center}.swagger-ui .version-pragma__message>div{flex:1;max-width:55ch}.swagger-ui .version-pragma__message code{background-color:#dedede;padding:4px 4px 2px;white-space:pre}.swagger-ui .opblock-link{font-weight:400}.swagger-ui .opblock-link.shown{font-weight:700}.swagger-ui span.token-string{color:#555}.swagger-ui span.token-not-formatted{color:#555;font-weight:700}.swagger-ui .btn{background:transparent;border:2px solid gray;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.1);color:#3b4151;font-family:sans-serif;font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s}.swagger-ui .btn.btn-sm{font-size:12px;padding:4px 23px}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{background-color:transparent;border-color:#ff6060;color:#ff6060;font-family:sans-serif}.swagger-ui .btn.authorize{background-color:transparent;border-color:#49cc90;color:#49cc90;display:inline;line-height:1}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{background-color:#4990e2;border-color:#4990e2;color:#fff}.swagger-ui .btn-group{display:flex;padding:30px}.swagger-ui .btn-group .btn{flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{background:none;border:none;padding:0 0 0 10px}.swagger-ui .authorization__btn .locked{opacity:1}.swagger-ui .authorization__btn .unlocked{opacity:.4}.swagger-ui .model-box-control,.swagger-ui .models-control,.swagger-ui .opblock-summary-control{all:inherit;border-bottom:0;cursor:pointer;flex:1;padding:0}.swagger-ui .model-box-control:focus,.swagger-ui .models-control:focus,.swagger-ui .opblock-summary-control:focus{outline:auto}.swagger-ui .expand-methods,.swagger-ui .expand-operation{background:none;border:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{height:20px;width:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#404040}.swagger-ui .expand-methods svg{transition:all .3s;fill:#707070}.swagger-ui button{cursor:pointer}.swagger-ui button.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui .copy-to-clipboard{align-items:center;background:#7d8293;border:none;border-radius:4px;bottom:10px;display:flex;height:30px;justify-content:center;position:absolute;right:100px;width:30px}.swagger-ui .copy-to-clipboard button{background:url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"15\\\" aria-hidden=\\\"true\\\"><path fill=\\\"%23fff\\\" fill-rule=\\\"evenodd\\\" d=\\\"M4 12h4v1H4zm5-6H4v1h5zm2 3V7l-3 3 3 3v-2h5V9zM6.5 8H4v1h2.5zM4 11h2.5v-1H4zm9 1h1v2c-.02.28-.11.52-.3.7s-.42.28-.7.3H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h3c0-1.11.89-2 2-2s2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V5H3v9h10zM4 4h8c0-.55-.45-1-1-1h-1c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H5c-.55 0-1 .45-1 1\\\"/></svg>\") 50% no-repeat;border:none;flex-grow:1;flex-shrink:1;height:25px}.swagger-ui .copy-to-clipboard:active{background:#5e626f}.swagger-ui .opblock-control-arrow{background:none;border:none;text-align:center}.swagger-ui .curl-command .copy-to-clipboard{bottom:5px;height:20px;right:10px;width:20px}.swagger-ui .curl-command .copy-to-clipboard button{height:18px}.swagger-ui .opblock .opblock-summary .view-line-link.copy-to-clipboard{height:26px;position:static}.swagger-ui select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#f7f7f7 url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M13.418 7.859a.695.695 0 0 1 .978 0 .68.68 0 0 1 0 .969l-3.908 3.83a.697.697 0 0 1-.979 0l-3.908-3.83a.68.68 0 0 1 0-.969.695.695 0 0 1 .978 0L10 11z\\\"/></svg>\") right 10px center no-repeat;background-size:20px;border:2px solid #41444e;border-radius:4px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);color:#3b4151;font-family:sans-serif;font-size:14px;font-weight:700;padding:5px 40px 5px 10px}.swagger-ui select[multiple]{background:#f7f7f7;margin:5px 0;padding:5px}.swagger-ui select.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui .opblock-body select{min-width:230px}@media(max-width:768px){.swagger-ui .opblock-body select{min-width:180px}}@media(max-width:640px){.swagger-ui .opblock-body select{min-width:100%;width:100%}}.swagger-ui label{color:#3b4151;font-family:sans-serif;font-size:12px;font-weight:700;margin:0 0 5px}.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{line-height:1}@media(max-width:768px){.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{max-width:175px}}.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text],.swagger-ui textarea{background:#fff;border:1px solid #d9d9d9;border-radius:4px;margin:5px 0;min-width:100px;padding:8px 10px}.swagger-ui input[type=email].invalid,.swagger-ui input[type=file].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid,.swagger-ui textarea.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui input[disabled],.swagger-ui select[disabled],.swagger-ui textarea[disabled]{background-color:#fafafa;color:#888;cursor:not-allowed}.swagger-ui select[disabled]{border-color:#888}.swagger-ui textarea[disabled]{background-color:#41444e;color:#fff}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.swagger-ui textarea{background:hsla(0,0%,100%,.8);border:none;border-radius:4px;color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;min-height:280px;outline:none;padding:10px;width:100%}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{background:#41444e;border-radius:4px;color:#fff;font-family:monospace;font-size:12px;font-weight:600;margin:0;min-height:100px;padding:10px;resize:none}.swagger-ui .checkbox{color:#303030;padding:5px 0 10px;transition:opacity .5s}.swagger-ui .checkbox label{display:flex}.swagger-ui .checkbox p{color:#3b4151;font-family:monospace;font-style:italic;font-weight:400!important;font-weight:600;margin:0!important}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{background:#e8e8e8;border-radius:1px;box-shadow:0 0 0 2px #e8e8e8;cursor:pointer;display:inline-block;flex:none;height:16px;margin:0 8px 0 0;padding:5px;position:relative;top:3px;width:16px}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"10\\\" height=\\\"8\\\" viewBox=\\\"3 7 10 8\\\"><path fill=\\\"%2341474E\\\" fill-rule=\\\"evenodd\\\" d=\\\"M6.333 15 3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z\\\"/></svg>\") 50% no-repeat}.swagger-ui .dialog-ux{bottom:0;left:0;position:fixed;right:0;top:0;z-index:9999}.swagger-ui .dialog-ux .backdrop-ux{background:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.swagger-ui .dialog-ux .modal-ux{background:#fff;border:1px solid #ebebeb;border-radius:4px;box-shadow:0 10px 30px 0 rgba(0,0,0,.2);left:50%;max-width:650px;min-width:300px;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%;z-index:9999}.swagger-ui .dialog-ux .modal-ux-content{max-height:540px;overflow-y:auto;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{color:#41444e;color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px}.swagger-ui .dialog-ux .modal-ux-content h4{color:#3b4151;font-family:sans-serif;font-size:18px;font-weight:600;margin:15px 0 0}.swagger-ui .dialog-ux .modal-ux-header{align-items:center;border-bottom:1px solid #ebebeb;display:flex;padding:12px 0}.swagger-ui .dialog-ux .modal-ux-header .close-modal{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;padding:0 10px}.swagger-ui .dialog-ux .modal-ux-header h3{color:#3b4151;flex:1;font-family:sans-serif;font-size:20px;font-weight:600;margin:0;padding:0 20px}.swagger-ui .model{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300;font-weight:600}.swagger-ui .model .deprecated span,.swagger-ui .model .deprecated td{color:#a0a0a0!important}.swagger-ui .model .deprecated>td:first-of-type{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .model-toggle{cursor:pointer;display:inline-block;font-size:10px;margin:auto .3em;position:relative;top:6px;transform:rotate(90deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .model-toggle.collapsed{transform:rotate(0deg)}.swagger-ui .model-toggle:after{background:url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\"><path d=\\\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\\\"/></svg>\") 50% no-repeat;background-size:100%;content:\"\";display:block;height:20px;width:20px}.swagger-ui .model-jump-to-path{cursor:pointer;position:relative}.swagger-ui .model-jump-to-path .view-line-link{cursor:pointer;position:absolute;top:-.4em}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{background:rgba(0,0,0,.7);border-radius:4px;color:#ebebeb;padding:.1em .5em;position:absolute;top:-1.8em;visibility:hidden;white-space:nowrap}.swagger-ui .model p{margin:0 0 1em}.swagger-ui .model .property{color:#999;font-style:italic}.swagger-ui .model .property.primitive{color:#6b6b6b}.swagger-ui .model .external-docs,.swagger-ui table.model tr.description{color:#666;font-weight:400}.swagger-ui table.model tr.description td:first-child,.swagger-ui table.model tr.property-row.required td:first-child{font-weight:700}.swagger-ui table.model tr.property-row td{vertical-align:top}.swagger-ui table.model tr.property-row td:first-child{padding-right:.2em}.swagger-ui table.model tr.property-row .star{color:red}.swagger-ui table.model tr.extension{color:#777}.swagger-ui table.model tr.extension td:last-child{vertical-align:top}.swagger-ui table.model tr.external-docs td:first-child{font-weight:700}.swagger-ui table.model tr .renderedMarkdown p:first-child{margin-top:0}.swagger-ui section.models{border:1px solid rgba(59,65,81,.3);border-radius:4px;margin:30px 0}.swagger-ui section.models .pointer{cursor:pointer}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{border-bottom:1px solid rgba(59,65,81,.3);margin:0 0 5px}.swagger-ui section.models h4{align-items:center;color:#606060;cursor:pointer;display:flex;font-family:sans-serif;font-size:16px;margin:0;padding:10px 20px 10px 10px;transition:all .2s}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{color:#707070;font-family:sans-serif;font-size:16px;margin:0 0 10px}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{background:rgba(0,0,0,.05);border-radius:4px;margin:0 20px 15px;position:relative;transition:all .5s}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-container .models-jump-to-path{opacity:.65;position:absolute;right:5px;top:8px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{background:rgba(0,0,0,.1);border-radius:4px;display:inline-block;padding:10px}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-box.deprecated{opacity:.5}.swagger-ui .model-title{color:#505050;font-family:sans-serif;font-size:16px}.swagger-ui .model-title img{bottom:0;margin-left:1em;position:relative}.swagger-ui .model-deprecated-warning{color:#f93e3e;font-family:sans-serif;font-size:16px;font-weight:600;margin-right:1em}.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-name{display:inline-block;margin-right:1em}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#606060}.swagger-ui .servers>label{color:#3b4151;font-family:sans-serif;font-size:12px;margin:-20px 15px 0 0}.swagger-ui .servers>label select{max-width:100%;min-width:130px;width:100%}.swagger-ui .servers h4.message{padding-bottom:2em}.swagger-ui .servers table tr{width:30em}.swagger-ui .servers table td{display:inline-block;max-width:15em;padding-bottom:10px;padding-top:10px;vertical-align:middle}.swagger-ui .servers table td:first-of-type{padding-right:1em}.swagger-ui .servers table td input{height:100%;width:100%}.swagger-ui .servers .computed-url{margin:2em 0}.swagger-ui .servers .computed-url code{display:inline-block;font-size:16px;margin:0 1em;padding:4px}.swagger-ui .servers-title{font-size:12px;font-weight:700}.swagger-ui .operation-servers h4.message{margin-bottom:2em}.swagger-ui table{border-collapse:collapse;padding:0 10px;width:100%}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{padding:0 0 0 2em;width:174px}.swagger-ui table.headers td{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300;font-weight:600;vertical-align:middle}.swagger-ui table.headers .header-example{color:#999;font-style:italic}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{min-width:6em;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{border-bottom:1px solid rgba(59,65,81,.2);color:#3b4151;font-family:sans-serif;font-size:12px;font-weight:700;padding:12px 0;text-align:left}.swagger-ui .parameters-col_description{margin-bottom:2em;width:99%}.swagger-ui .parameters-col_description input{max-width:340px;width:100%}.swagger-ui .parameters-col_description select{border-width:1px}.swagger-ui .parameters-col_description .markdown p,.swagger-ui .parameters-col_description .renderedMarkdown p{margin:0}.swagger-ui .parameter__name{color:#3b4151;font-family:sans-serif;font-size:16px;font-weight:400;margin-right:.75em}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required span{color:red}.swagger-ui .parameter__name.required:after{color:rgba(255,0,0,.6);content:\"required\";font-size:10px;padding:5px;position:relative;top:-6px}.swagger-ui .parameter__extension,.swagger-ui .parameter__in{color:gray;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .parameter__deprecated{color:red;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .parameter__empty_value_toggle{display:block;font-size:13px;padding-bottom:12px;padding-top:5px}.swagger-ui .parameter__empty_value_toggle input{margin-right:7px;width:auto}.swagger-ui .parameter__empty_value_toggle.disabled{opacity:.7}.swagger-ui .table-container{padding:20px}.swagger-ui .response-col_description{width:99%}.swagger-ui .response-col_description .markdown p,.swagger-ui .response-col_description .renderedMarkdown p{margin:0}.swagger-ui .response-col_links{min-width:6em}.swagger-ui .response__extension{color:gray;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .topbar{background-color:#1b1b1b;padding:10px 0}.swagger-ui .topbar .topbar-wrapper{align-items:center;display:flex;flex-wrap:wrap;gap:10px}@media(max-width:550px){.swagger-ui .topbar .topbar-wrapper{align-items:start;flex-direction:column}}.swagger-ui .topbar a{align-items:center;color:#fff;display:flex;flex:1;font-family:sans-serif;font-size:1.5em;font-weight:700;max-width:300px;-webkit-text-decoration:none;text-decoration:none}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:flex;flex:3;justify-content:flex-end}.swagger-ui .topbar .download-url-wrapper input[type=text]{border:2px solid #62a03f;border-radius:4px 0 0 4px;margin:0;max-width:100%;outline:none;width:100%}.swagger-ui .topbar .download-url-wrapper .select-label{align-items:center;color:#f0f0f0;display:flex;margin:0;max-width:600px;width:100%}.swagger-ui .topbar .download-url-wrapper .select-label span{flex:1;font-size:16px;padding:0 10px 0 0;text-align:right}.swagger-ui .topbar .download-url-wrapper .select-label select{border:2px solid #62a03f;box-shadow:none;flex:2;outline:none;width:100%}.swagger-ui .topbar .download-url-wrapper .download-url-button{background:#62a03f;border:none;border-radius:0 4px 4px 0;color:#fff;font-family:sans-serif;font-size:16px;font-weight:700;padding:4px 30px}@media(max-width:550px){.swagger-ui .topbar .download-url-wrapper{width:100%}}.swagger-ui .info{margin:50px 0}.swagger-ui .info.failed-config{margin-left:auto;margin-right:auto;max-width:880px;text-align:center}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info pre{font-size:14px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{color:#3b4151;font-family:sans-serif;font-size:14px}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{color:#3b4151;font-family:sans-serif}.swagger-ui .info a{color:#4990e2;font-family:sans-serif;font-size:14px;transition:all .4s}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300!important;font-weight:600;margin:0}.swagger-ui .info .title{color:#3b4151;font-family:sans-serif;font-size:36px;margin:0}.swagger-ui .info .title small{background:#7d8492;border-radius:57px;display:inline-block;font-size:10px;margin:0 0 0 5px;padding:2px 4px;position:relative;top:-5px;vertical-align:super}.swagger-ui .info .title small.version-stamp{background-color:#89bf04}.swagger-ui .info .title small pre{color:#fff;font-family:sans-serif;margin:0;padding:0}.swagger-ui .auth-btn-wrapper{display:flex;justify-content:center;padding:10px 0}.swagger-ui .auth-btn-wrapper .btn-done{margin-right:1em}.swagger-ui .auth-wrapper{display:flex;flex:1;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{margin-left:10px;margin-right:10px;padding-right:20px}.swagger-ui .auth-container{border-bottom:1px solid #ebebeb;margin:0 0 10px;padding:10px 20px}.swagger-ui .auth-container:last-of-type{border:0;margin:0;padding:10px 20px}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{background-color:#fee;border-radius:4px;color:red;color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;margin:1em;padding:10px}.swagger-ui .auth-container .errors b{margin-right:1em;text-transform:capitalize}.swagger-ui .scopes h2{color:#3b4151;font-family:sans-serif;font-size:14px}.swagger-ui .scopes h2 a{color:#4990e2;cursor:pointer;font-size:12px;padding-left:10px;-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{animation:scaleUp .5s;background:rgba(249,62,62,.1);border:2px solid #f93e3e;border-radius:4px;margin:20px;padding:10px 20px}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{color:#3b4151;font-family:monospace;font-size:14px;font-weight:600;margin:0}.swagger-ui .errors-wrapper .errors small{color:#606060}.swagger-ui .errors-wrapper .errors .message{white-space:pre-line}.swagger-ui .errors-wrapper .errors .message.thrown{max-width:100%}.swagger-ui .errors-wrapper .errors .error-line{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .errors-wrapper hgroup{align-items:center;display:flex}.swagger-ui .errors-wrapper hgroup h4{color:#3b4151;flex:1;font-family:sans-serif;font-size:20px;margin:0}@keyframes scaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.swagger-ui .Resizer.vertical.disabled{display:none}.swagger-ui .markdown p,.swagger-ui .markdown pre,.swagger-ui .renderedMarkdown p,.swagger-ui .renderedMarkdown pre{margin:1em auto;word-break:break-all;word-break:break-word}.swagger-ui .markdown pre,.swagger-ui .renderedMarkdown pre{background:none;color:#000;font-weight:400;padding:0;white-space:pre-wrap}.swagger-ui .markdown code,.swagger-ui .renderedMarkdown code{background:rgba(0,0,0,.05);border-radius:4px;color:#9012fe;font-family:monospace;font-size:14px;font-weight:600;padding:5px 7px}.swagger-ui .markdown pre>code,.swagger-ui .renderedMarkdown pre>code{display:block}.swagger-ui .json-schema-2020-12{background-color:rgba(0,0,0,.05);border-radius:4px;margin:0 20px 15px;padding:12px 0 12px 20px}.swagger-ui .json-schema-2020-12:first-of-type{margin:20px}.swagger-ui .json-schema-2020-12:last-of-type{margin:0 20px}.swagger-ui .json-schema-2020-12--embedded{background-color:inherit;padding-bottom:0;padding-left:inherit;padding-right:inherit;padding-top:0}.swagger-ui .json-schema-2020-12-body{border-left:1px dashed rgba(0,0,0,.1);margin:2px 0}.swagger-ui .json-schema-2020-12-body--collapsed{display:none}.swagger-ui .json-schema-2020-12-accordion{border:none;outline:none;padding-left:0}.swagger-ui .json-schema-2020-12-accordion__children{display:inline-block}.swagger-ui .json-schema-2020-12-accordion__icon{display:inline-block;height:18px;vertical-align:bottom;width:18px}.swagger-ui .json-schema-2020-12-accordion__icon--expanded{transform:rotate(-90deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .json-schema-2020-12-accordion__icon--collapsed{transform:rotate(0deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .json-schema-2020-12-accordion__icon svg{height:20px;width:20px}.swagger-ui .json-schema-2020-12-expand-deep-button{border:none;color:#505050;color:#afaeae;font-family:sans-serif;font-size:12px;padding-right:0}.swagger-ui .json-schema-2020-12-keyword{margin:5px 0}.swagger-ui .json-schema-2020-12-keyword__children{border-left:1px dashed rgba(0,0,0,.1);margin:0 0 0 20px;padding:0}.swagger-ui .json-schema-2020-12-keyword__children--collapsed{display:none}.swagger-ui .json-schema-2020-12-keyword__name{font-size:12px;font-weight:700;margin-left:20px}.swagger-ui .json-schema-2020-12-keyword__name--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-keyword__name--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__value{color:#6b6b6b;font-size:12px;font-style:italic;font-weight:400}.swagger-ui .json-schema-2020-12-keyword__value--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-keyword__value--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__value--const,.swagger-ui .json-schema-2020-12-keyword__value--warning{border:1px dashed #6b6b6b;border-radius:4px;color:#3b4151;color:#6b6b6b;display:inline-block;font-family:monospace;font-style:normal;font-weight:600;line-height:1.5;margin-left:10px;padding:1px 4px}.swagger-ui .json-schema-2020-12-keyword__value--warning{border:1px dashed red;color:red}.swagger-ui .json-schema-2020-12-keyword__name--secondary+.json-schema-2020-12-keyword__value--secondary:before{content:\"=\"}.swagger-ui .json-schema-2020-12__attribute{color:#3b4151;font-family:monospace;font-size:12px;padding-left:10px;text-transform:lowercase}.swagger-ui .json-schema-2020-12__attribute--primary{color:#55a}.swagger-ui .json-schema-2020-12__attribute--muted{color:gray}.swagger-ui .json-schema-2020-12__attribute--warning{color:red}.swagger-ui .json-schema-2020-12-keyword--\\$vocabulary ul{border-left:1px dashed rgba(0,0,0,.1);margin:0 0 0 20px}.swagger-ui .json-schema-2020-12-\\$vocabulary-uri{margin-left:35px}.swagger-ui .json-schema-2020-12-\\$vocabulary-uri--disabled{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .json-schema-2020-12-keyword--description{color:#6b6b6b;font-size:12px;margin-left:20px}.swagger-ui .json-schema-2020-12-keyword--description p{margin:0}.swagger-ui .json-schema-2020-12__title{color:#505050;display:inline-block;font-family:sans-serif;font-size:12px;font-weight:700;line-height:normal}.swagger-ui .json-schema-2020-12__title .json-schema-2020-12-keyword__name{margin:0}.swagger-ui .json-schema-2020-12-property{margin:7px 0}.swagger-ui .json-schema-2020-12-property .json-schema-2020-12__title{color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;vertical-align:middle}.swagger-ui .json-schema-2020-12-keyword--properties>ul{border:none;margin:0;padding:0}.swagger-ui .json-schema-2020-12-property{list-style-type:none}.swagger-ui .json-schema-2020-12-property--required>.json-schema-2020-12:first-of-type>.json-schema-2020-12-head .json-schema-2020-12__title:after{color:red;content:\"*\";font-weight:700}.swagger-ui .json-schema-2020-12-keyword--patternProperties ul{border:none;margin:0;padding:0}.swagger-ui .json-schema-2020-12-keyword--patternProperties .json-schema-2020-12__title:first-of-type:after,.swagger-ui .json-schema-2020-12-keyword--patternProperties .json-schema-2020-12__title:first-of-type:before{color:#55a;content:\"/\"}.swagger-ui .json-schema-2020-12-keyword--enum>ul{display:inline-block;margin:0;padding:0}.swagger-ui .json-schema-2020-12-keyword--enum>ul li{display:inline;list-style-type:none}.swagger-ui .json-schema-2020-12__constraint{background-color:#805ad5;border-radius:4px;color:#3b4151;color:#fff;font-family:monospace;font-weight:600;line-height:1.5;margin-left:10px;padding:1px 3px}.swagger-ui .json-schema-2020-12__constraint--string{background-color:#d69e2e;color:#fff}.swagger-ui .json-schema-2020-12-keyword--dependentRequired>ul{display:inline-block;margin:0;padding:0}.swagger-ui .json-schema-2020-12-keyword--dependentRequired>ul li{display:inline;list-style-type:none}.swagger-ui .model-box .json-schema-2020-12:not(.json-schema-2020-12--embedded)>.json-schema-2020-12-head .json-schema-2020-12__title:first-of-type{font-size:16px}.swagger-ui .model-box>.json-schema-2020-12{margin:0}.swagger-ui .model-box .json-schema-2020-12{background-color:transparent;padding:0}.swagger-ui .model-box .json-schema-2020-12-accordion,.swagger-ui .model-box .json-schema-2020-12-expand-deep-button{background-color:transparent}.swagger-ui .models .json-schema-2020-12:not(.json-schema-2020-12--embedded)>.json-schema-2020-12-head .json-schema-2020-12__title:first-of-type{font-size:16px}\n\n/*# sourceMappingURL=swagger-ui.css.map*/"
  },
  {
    "path": "www/http/swagger-ui/swagger-ui.js",
    "content": "!function webpackUniversalModuleDefinition(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.SwaggerUICore=t():e.SwaggerUICore=t()}(this,(()=>(()=>{\"use strict\";var e={158:e=>{e.exports=require(\"buffer\")}},t={};function __webpack_require__(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r={};return(()=>{__webpack_require__.d(r,{default:()=>Mo});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{CLEAR:()=>V,CLEAR_BY:()=>L,NEW_AUTH_ERR:()=>D,NEW_SPEC_ERR:()=>$,NEW_SPEC_ERR_BATCH:()=>K,NEW_THROWN_ERR:()=>T,NEW_THROWN_ERR_BATCH:()=>J,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{AUTHORIZE:()=>ge,AUTHORIZE_OAUTH2:()=>Se,CONFIGURE_AUTH:()=>_e,LOGOUT:()=>ye,PRE_AUTHORIZE_OAUTH2:()=>fe,RESTORE_AUTHORIZATION:()=>ve,SHOW_AUTH_POPUP:()=>he,VALIDATE:()=>Ee,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{authorized:()=>Oe,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>xe,getConfigs:()=>Ne,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,shownDefinitions:()=>Ce});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{TOGGLE_CONFIGS:()=>Je,UPDATE_CONFIGS:()=>Te,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{get:()=>get});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{transform:()=>transform});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{transform:()=>parameter_oneof_transform});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{allErrors:()=>Ze,lastError:()=>et});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{SHOW:()=>ot,UPDATE_FILTER:()=>nt,UPDATE_LAYOUT:()=>at,UPDATE_MODE:()=>st,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>ct,whatMode:()=>whatMode});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{taggedOperations:()=>taggedOperations});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{requestSnippetGenerator_curl_bash:()=>requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd:()=>requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell:()=>requestSnippetGenerator_curl_powershell});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{getActiveLanguage:()=>pt,getDefaultExpanded:()=>ut,getGenerators:()=>mt,getSnippetGenerators:()=>getSnippetGenerators});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>Pr,canExecuteScheme:()=>canExecuteScheme,consumes:()=>kr,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>jr,externalDocs:()=>wr,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>Lr,host:()=>Mr,info:()=>vr,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>_r,lastError:()=>ur,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>Vr,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>Nr,operationsWithRootInherited:()=>Tr,operationsWithTags:()=>$r,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>xr,produces:()=>Ar,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>Dr,responseFor:()=>responseFor,responses:()=>Kr,schemes:()=>Rr,security:()=>Ir,securityDefinitions:()=>qr,semver:()=>Cr,spec:()=>spec,specJS:()=>fr,specJson:()=>yr,specJsonWithResolvedSubtrees:()=>Er,specResolved:()=>Sr,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>gr,specStr:()=>hr,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>Jr,url:()=>dr,validOperationMethods:()=>Or,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>br});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{CLEAR_REQUEST:()=>ca,CLEAR_RESPONSE:()=>la,CLEAR_VALIDATE_PARAMS:()=>ia,LOG_REQUEST:()=>oa,SET_MUTATED_REQUEST:()=>sa,SET_REQUEST:()=>na,SET_RESPONSE:()=>aa,SET_SCHEME:()=>da,UPDATE_EMPTY_PARAM_INCLUSION:()=>ta,UPDATE_JSON:()=>Zr,UPDATE_OPERATION_META_VALUE:()=>ma,UPDATE_PARAM:()=>ea,UPDATE_RESOLVED:()=>pa,UPDATE_RESOLVED_SUBTREE:()=>ua,UPDATE_SPEC:()=>Yr,UPDATE_URL:()=>Qr,VALIDATE_PARAMS:()=>ra,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{basePath:()=>Cn,consumes:()=>xn,definitions:()=>_n,findDefinition:()=>En,hasHost:()=>vn,host:()=>bn,produces:()=>On,schemes:()=>Nn,securityDefinitions:()=>wn,validOperationMethods:()=>wrap_selectors_validOperationMethods});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{definitionsToAuthorize:()=>kn});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{callbacksOperations:()=>qn,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>In});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>Yn,CLEAR_REQUEST_BODY_VALUE:()=>Qn,SET_REQUEST_BODY_VALIDATE_ERROR:()=>Gn,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>Fn,UPDATE_REQUEST_BODY_INCLUSION:()=>Bn,UPDATE_REQUEST_BODY_VALUE:()=>Un,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>zn,UPDATE_REQUEST_CONTENT_TYPE:()=>Wn,UPDATE_RESPONSE_CONTENT_TYPE:()=>Hn,UPDATE_SELECTED_SERVER:()=>Ln,UPDATE_SERVER_VARIABLE_VALUE:()=>Xn,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{activeExamplesMember:()=>ls,hasUserEditedBody:()=>ns,requestBodyErrors:()=>os,requestBodyInclusionSetting:()=>ss,requestBodyValue:()=>rs,requestContentType:()=>cs,responseContentType:()=>is,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>ts,serverEffectiveValue:()=>us,serverVariableValue:()=>ms,serverVariables:()=>ps,shouldRetainRequestBodyValue:()=>as,validOperationMethods:()=>hs,validateBeforeExecute:()=>ds,validateShallowRequired:()=>validateShallowRequired});const x=require(\"deep-extend\");var O=__webpack_require__.n(x);const N=require(\"react\");var k=__webpack_require__.n(N);const A=require(\"redux\"),I=require(\"immutable\");var q=__webpack_require__.n(I);const j=require(\"redux-immutable\"),P=require(\"serialize-error\"),M=require(\"lodash/merge\");var R=__webpack_require__.n(M);const T=\"err_new_thrown_err\",J=\"err_new_thrown_err_batch\",$=\"err_new_spec_err\",K=\"err_new_spec_err_batch\",D=\"err_new_auth_err\",V=\"err_clear\",L=\"err_clear_by\";function newThrownErr(e){return{type:T,payload:(0,P.serializeError)(e)}}function newThrownErrBatch(e){return{type:J,payload:e}}function newSpecErr(e){return{type:$,payload:e}}function newSpecErrBatch(e){return{type:K,payload:e}}function newAuthErr(e){return{type:D,payload:e}}function clear(e={}){return{type:V,payload:e}}function clearBy(e=(()=>!0)){return{type:L,payload:e}}const U=function makeWindow(){var e={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return e;try{e=window;for(var t of[\"File\",\"Blob\",\"FormData\"])t in window&&(e[t]=window[t])}catch(e){console.error(e)}return e}(),z=require(\"@braintree/sanitize-url\"),B=(require(\"lodash/camelCase\"),require(\"lodash/upperFirst\"),require(\"lodash/memoize\"));var F=__webpack_require__.n(B);const W=require(\"lodash/find\");var H=__webpack_require__.n(W);const X=require(\"lodash/some\");var G=__webpack_require__.n(X);const Y=require(\"lodash/eq\");var Q=__webpack_require__.n(Y);const Z=require(\"lodash/isFunction\");var ee=__webpack_require__.n(Z);const te=require(\"css.escape\");var re=__webpack_require__.n(te);const ae=require(\"randombytes\");var ne=__webpack_require__.n(ae);const se=require(\"sha.js\");var oe=__webpack_require__.n(se);const le=q().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(e,{isOAS3:t}={}){if(!q().Map.isMap(e))return{schema:q().Map(),parameterContentMediaType:null};if(!t)return\"body\"===e.get(\"in\")?{schema:e.get(\"schema\",q().Map()),parameterContentMediaType:null}:{schema:e.filter(((e,t)=>le.includes(t))),parameterContentMediaType:null};if(e.get(\"content\")){const t=e.get(\"content\",q().Map({})).keySeq().first();return{schema:e.getIn([\"content\",t,\"schema\"],q().Map()),parameterContentMediaType:t}}return{schema:e.get(\"schema\")?e.get(\"schema\",q().Map()):q().Map(),parameterContentMediaType:null}}var ce=__webpack_require__(158).Buffer;const ie=\"default\",isImmutable=e=>q().Iterable.isIterable(e);function objectify(e){return isObject(e)?isImmutable(e)?e.toJS():e:{}}function fromJSOrdered(e){if(isImmutable(e))return e;if(e instanceof U.File)return e;if(!isObject(e))return e;if(Array.isArray(e))return q().Seq(e).map(fromJSOrdered).toList();if(ee()(e.entries)){const t=function createObjWithHashedKeys(e){if(!ee()(e.entries))return e;const t={},r=\"_**[]\",a={};for(let n of e.entries())if(t[n[0]]||a[n[0]]&&a[n[0]].containsMultiple){if(!a[n[0]]){a[n[0]]={containsMultiple:!0,length:1},t[`${n[0]}${r}${a[n[0]].length}`]=t[n[0]],delete t[n[0]]}a[n[0]].length+=1,t[`${n[0]}${r}${a[n[0]].length}`]=n[1]}else t[n[0]]=n[1];return t}(e);return q().OrderedMap(t).map(fromJSOrdered)}return q().OrderedMap(e).map(fromJSOrdered)}function normalizeArray(e){return Array.isArray(e)?e:[e]}function isFn(e){return\"function\"==typeof e}function isObject(e){return!!e&&\"object\"==typeof e}function isFunc(e){return\"function\"==typeof e}function isArray(e){return Array.isArray(e)}const me=F();function objMap(e,t){return Object.keys(e).reduce(((r,a)=>(r[a]=t(e[a],a),r)),{})}function objReduce(e,t){return Object.keys(e).reduce(((r,a)=>{let n=t(e[a],a);return n&&\"object\"==typeof n&&Object.assign(r,n),r}),{})}function systemThunkMiddleware(e){return({dispatch:t,getState:r})=>t=>r=>\"function\"==typeof r?r(e()):t(r)}function validateValueBySchema(e,t,r,a,n){if(!t)return[];let s=[],o=t.get(\"nullable\"),l=t.get(\"required\"),c=t.get(\"maximum\"),i=t.get(\"minimum\"),m=t.get(\"type\"),p=t.get(\"format\"),u=t.get(\"maxLength\"),d=t.get(\"minLength\"),h=t.get(\"uniqueItems\"),g=t.get(\"maxItems\"),y=t.get(\"minItems\"),f=t.get(\"pattern\");const S=r||!0===l,E=null!=e;if(o&&null===e||!m||!(S||E&&\"array\"===m||!(!S&&!E)))return[];let _=\"string\"===m&&e,v=\"array\"===m&&Array.isArray(e)&&e.length,w=\"array\"===m&&q().List.isList(e)&&e.count();const b=[_,v,w,\"array\"===m&&\"string\"==typeof e&&e,\"file\"===m&&e instanceof U.File,\"boolean\"===m&&(e||!1===e),\"number\"===m&&(e||0===e),\"integer\"===m&&(e||0===e),\"object\"===m&&\"object\"==typeof e&&null!==e,\"object\"===m&&\"string\"==typeof e&&e].some((e=>!!e));if(S&&!b&&!a)return s.push(\"Required field is not provided\"),s;if(\"object\"===m&&(null===n||\"application/json\"===n)){let r=e;if(\"string\"==typeof e)try{r=JSON.parse(e)}catch(e){return s.push(\"Parameter string value must be valid JSON\"),s}t&&t.has(\"required\")&&isFunc(l.isList)&&l.isList()&&l.forEach((e=>{void 0===r[e]&&s.push({propKey:e,error:\"Required property not found\"})})),t&&t.has(\"properties\")&&t.get(\"properties\").forEach(((e,t)=>{const o=validateValueBySchema(r[t],e,!1,a,n);s.push(...o.map((e=>({propKey:t,error:e}))))}))}if(f){let t=((e,t)=>{if(!new RegExp(t).test(e))return\"Value must follow pattern \"+t})(e,f);t&&s.push(t)}if(y&&\"array\"===m){let t=((e,t)=>{if(!e&&t>=1||e&&e.length<t)return`Array must contain at least ${t} item${1===t?\"\":\"s\"}`})(e,y);t&&s.push(t)}if(g&&\"array\"===m){let t=((e,t)=>{if(e&&e.length>t)return`Array must not contain more then ${t} item${1===t?\"\":\"s\"}`})(e,g);t&&s.push({needRemove:!0,error:t})}if(h&&\"array\"===m){let t=((e,t)=>{if(e&&(\"true\"===t||!0===t)){const t=(0,I.fromJS)(e),r=t.toSet();if(e.length>r.size){let e=(0,I.Set)();if(t.forEach(((r,a)=>{t.filter((e=>isFunc(e.equals)?e.equals(r):e===r)).size>1&&(e=e.add(a))})),0!==e.size)return e.map((e=>({index:e,error:\"No duplicates allowed.\"}))).toArray()}}})(e,h);t&&s.push(...t)}if(u||0===u){let t=((e,t)=>{if(e.length>t)return`Value must be no longer than ${t} character${1!==t?\"s\":\"\"}`})(e,u);t&&s.push(t)}if(d){let t=((e,t)=>{if(e.length<t)return`Value must be at least ${t} character${1!==t?\"s\":\"\"}`})(e,d);t&&s.push(t)}if(c||0===c){let t=((e,t)=>{if(e>t)return`Value must be less than ${t}`})(e,c);t&&s.push(t)}if(i||0===i){let t=((e,t)=>{if(e<t)return`Value must be greater than ${t}`})(e,i);t&&s.push(t)}if(\"string\"===m){let t;if(t=\"date-time\"===p?(e=>{if(isNaN(Date.parse(e)))return\"Value must be a DateTime\"})(e):\"uuid\"===p?(e=>{if(e=e.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e))return\"Value must be a Guid\"})(e):(e=>{if(e&&\"string\"!=typeof e)return\"Value must be a string\"})(e),!t)return s;s.push(t)}else if(\"boolean\"===m){let t=(e=>{if(\"true\"!==e&&\"false\"!==e&&!0!==e&&!1!==e)return\"Value must be a boolean\"})(e);if(!t)return s;s.push(t)}else if(\"number\"===m){let t=(e=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(e))return\"Value must be a number\"})(e);if(!t)return s;s.push(t)}else if(\"integer\"===m){let t=(e=>{if(!/^-?\\d+$/.test(e))return\"Value must be an integer\"})(e);if(!t)return s;s.push(t)}else if(\"array\"===m){if(!v&&!w)return s;e&&e.forEach(((e,r)=>{const o=validateValueBySchema(e,t.get(\"items\"),!1,a,n);s.push(...o.map((e=>({index:r,error:e}))))}))}else if(\"file\"===m){let t=(e=>{if(e&&!(e instanceof U.File))return\"Value must be a file\"})(e);if(!t)return s;s.push(t)}return s}const btoa=e=>{let t;return t=e instanceof ce?e:ce.from(e.toString(),\"utf-8\"),t.toString(\"base64\")},pe={operationsSorter:{alpha:(e,t)=>e.get(\"path\").localeCompare(t.get(\"path\")),method:(e,t)=>e.get(\"method\").localeCompare(t.get(\"method\"))},tagsSorter:{alpha:(e,t)=>e.localeCompare(t)}},buildFormData=e=>{let t=[];for(let r in e){let a=e[r];void 0!==a&&\"\"!==a&&t.push([r,\"=\",encodeURIComponent(a).replace(/%20/g,\"+\")].join(\"\"))}return t.join(\"&\")},shallowEqualKeys=(e,t,r)=>!!H()(r,(r=>Q()(e[r],t[r])));function sanitizeUrl(e){return\"string\"!=typeof e||\"\"===e?\"\":(0,z.sanitizeUrl)(e)}function requiresValidationURL(e){return!(!e||e.indexOf(\"localhost\")>=0||e.indexOf(\"127.0.0.1\")>=0||\"none\"===e)}const createDeepLinkPath=e=>\"string\"==typeof e||e instanceof String?e.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=e=>re()(createDeepLinkPath(e).replace(/%20/g,\"_\")),getExtensions=e=>e.filter(((e,t)=>/^x-/.test(t))),getCommonExtensions=e=>e.filter(((e,t)=>/^pattern|maxLength|minLength|maximum|minimum/.test(t)));function deeplyStripKey(e,t,r=(()=>!0)){if(\"object\"!=typeof e||Array.isArray(e)||null===e||!t)return e;const a=Object.assign({},e);return Object.keys(a).forEach((e=>{e===t&&r(a[e],e)?delete a[e]:a[e]=deeplyStripKey(a[e],t,r)})),a}function stringify(e){if(\"string\"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),\"object\"==typeof e&&null!==e)try{return JSON.stringify(e,null,2)}catch(t){return String(e)}return null==e?\"\":e.toString()}function paramToIdentifier(e,{returnAll:t=!1,allowHashes:r=!0}={}){if(!q().Map.isMap(e))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const a=e.get(\"name\"),n=e.get(\"in\");let s=[];return e&&e.hashCode&&n&&a&&r&&s.push(`${n}.${a}.hash-${e.hashCode()}`),n&&a&&s.push(`${n}.${a}`),s.push(a),t?s:s[0]||\"\"}function paramToValue(e,t){return paramToIdentifier(e,{returnAll:!0}).map((e=>t[e])).filter((e=>void 0!==e))[0]}function b64toB64UrlEncoded(e){return e.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=e=>!e||!(!isImmutable(e)||!e.isEmpty()),idFn=e=>e;class Store{constructor(e={}){O()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},e),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(e,t,r){return function createStoreWithMiddleware(e,t,r){let a=[systemThunkMiddleware(r)];const n=U.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||A.compose;return(0,A.createStore)(e,t,n((0,A.applyMiddleware)(...a)))}(e,t,r)}(idFn,(0,I.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(e,t=!0){var r=combinePlugins(e,this.getSystem(),this.pluginsOptions);systemExtend(this.system,r),t&&this.buildSystem();callAfterLoad.call(this.system,e,this.getSystem())&&this.buildSystem()}buildSystem(e=!0){let t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getWrappedAndBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:q(),React:k()},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(e){this.system.configs=e}rebuildReducer(){this.store.replaceReducer(function buildReducer(e){return function allReducers(e){let t=Object.keys(e).reduce(((t,r)=>(t[r]=function makeReducer(e){return(t=new I.Map,r)=>{if(!e)return t;let a=e[r.type];if(a){const e=wrapWithTryCatch(a)(t,r);return null===e?t:e}return t}}(e[r]),t)),{});if(!Object.keys(t).length)return idFn;return(0,j.combineReducers)(t)}(objMap(e,(e=>e.reducers)))}(this.system.statePlugins))}getType(e){let t=e[0].toUpperCase()+e.slice(1);return objReduce(this.system.statePlugins,((r,a)=>{let n=r[e];if(n)return{[a+t]:n}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(e=>objReduce(e,((e,t)=>{if(isFn(e))return{[t]:e}}))))}getWrappedAndBoundActions(e){return objMap(this.getBoundActions(e),((e,t)=>{let r=this.system.statePlugins[t.slice(0,-7)].wrapActions;return r?objMap(e,((e,t)=>{let a=r[t];return a?(Array.isArray(a)||(a=[a]),a.reduce(((e,t)=>{let newAction=(...r)=>t(e,this.getSystem())(...r);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction)}),e||Function.prototype)):e})):e}))}getWrappedAndBoundSelectors(e,t){return objMap(this.getBoundSelectors(e,t),((t,r)=>{let a=[r.slice(0,-9)],n=this.system.statePlugins[a].wrapSelectors;return n?objMap(t,((t,r)=>{let s=n[r];return s?(Array.isArray(s)||(s=[s]),s.reduce(((t,r)=>{let wrappedSelector=(...n)=>r(t,this.getSystem())(e().getIn(a),...n);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),t||Function.prototype)):t})):t}))}getStates(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=e.get(r),t)),{})}getStateThunks(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=()=>e().get(r),t)),{})}getFn(){return{fn:this.system.fn}}getComponents(e){const t=this.system.components[e];return Array.isArray(t)?t.reduce(((e,t)=>t(e,this.getSystem()))):void 0!==e?this.system.components[e]:this.system.components}getBoundSelectors(e,t){return objMap(this.getSelectors(),((r,a)=>{let n=[a.slice(0,-9)];return objMap(r,(r=>(...a)=>{let s=wrapWithTryCatch(r).apply(null,[e().getIn(n),...a]);return\"function\"==typeof s&&(s=wrapWithTryCatch(s)(t())),s}))}))}getBoundActions(e){e=e||this.getStore().dispatch;const t=this.getActions(),process=e=>\"function\"!=typeof e?objMap(e,(e=>process(e))):(...t)=>{var r=null;try{r=e(...t)}catch(e){r={type:T,error:!0,payload:(0,P.serializeError)(e)}}finally{return r}};return objMap(t,(t=>(0,A.bindActionCreators)(process(t),e)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(e){return t=>O()({},this.getWrappedAndBoundActions(t),this.getFn(),e)}}function combinePlugins(e,t,r){if(isObject(e)&&!isArray(e))return R()({},e);if(isFunc(e))return combinePlugins(e(t),t,r);if(isArray(e)){const a=\"chain\"===r.pluginLoadType?t.getComponents():{};return e.map((e=>combinePlugins(e,t,r))).reduce(systemExtend,a)}return{}}function callAfterLoad(e,t,{hasLoaded:r}={}){let a=r;return isObject(e)&&!isArray(e)&&\"function\"==typeof e.afterLoad&&(a=!0,wrapWithTryCatch(e.afterLoad).call(this,t)),isFunc(e)?callAfterLoad.call(this,e(t),t,{hasLoaded:a}):isArray(e)?e.map((e=>callAfterLoad.call(this,e,t,{hasLoaded:a}))):a}function systemExtend(e={},t={}){if(!isObject(e))return{};if(!isObject(t))return e;t.wrapComponents&&(objMap(t.wrapComponents,((r,a)=>{const n=e.components&&e.components[a];n&&Array.isArray(n)?(e.components[a]=n.concat([r]),delete t.wrapComponents[a]):n&&(e.components[a]=[n,r],delete t.wrapComponents[a])})),Object.keys(t.wrapComponents).length||delete t.wrapComponents);const{statePlugins:r}=e;if(isObject(r))for(let e in r){const a=r[e];if(!isObject(a))continue;const{wrapActions:n,wrapSelectors:s}=a;if(isObject(n))for(let r in n){let a=n[r];Array.isArray(a)||(a=[a],n[r]=a),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapActions&&t.statePlugins[e].wrapActions[r]&&(t.statePlugins[e].wrapActions[r]=n[r].concat(t.statePlugins[e].wrapActions[r]))}if(isObject(s))for(let r in s){let a=s[r];Array.isArray(a)||(a=[a],s[r]=a),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapSelectors&&t.statePlugins[e].wrapSelectors[r]&&(t.statePlugins[e].wrapSelectors[r]=s[r].concat(t.statePlugins[e].wrapSelectors[r]))}}return O()(e,t)}function wrapWithTryCatch(e,{logErrors:t=!0}={}){return\"function\"!=typeof e?e:function(...r){try{return e.call(this,...r)}catch(e){return t&&console.error(e),null}}}const ue=require(\"url-parse\");var de=__webpack_require__.n(ue);const he=\"show_popup\",ge=\"authorize\",ye=\"logout\",fe=\"pre_authorize_oauth2\",Se=\"authorize_oauth2\",Ee=\"validate\",_e=\"configure_auth\",ve=\"restore_authorization\";function showDefinitions(e){return{type:he,payload:e}}function authorize(e){return{type:ge,payload:e}}const authorizeWithPersistOption=e=>({authActions:t})=>{t.authorize(e),t.persistAuthorizationIfNeeded()};function logout(e){return{type:ye,payload:e}}const logoutWithPersistOption=e=>({authActions:t})=>{t.logout(e),t.persistAuthorizationIfNeeded()},preAuthorizeImplicit=e=>({authActions:t,errActions:r})=>{let{auth:a,token:n,isValid:s}=e,{schema:o,name:l}=a,c=o.get(\"flow\");delete U.swaggerUIRedirectOauth2,\"accessCode\"===c||s||r.newAuthErr({authId:l,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),n.error?r.newAuthErr({authId:l,source:\"auth\",level:\"error\",message:JSON.stringify(n)}):t.authorizeOauth2WithPersistOption({auth:a,token:n})};function authorizeOauth2(e){return{type:Se,payload:e}}const authorizeOauth2WithPersistOption=e=>({authActions:t})=>{t.authorizeOauth2(e),t.persistAuthorizationIfNeeded()},authorizePassword=e=>({authActions:t})=>{let{schema:r,name:a,username:n,password:s,passwordType:o,clientId:l,clientSecret:c}=e,i={grant_type:\"password\",scope:e.scopes.join(\" \"),username:n,password:s},m={};switch(o){case\"request-body\":!function setClientIdAndSecret(e,t,r){t&&Object.assign(e,{client_id:t});r&&Object.assign(e,{client_secret:r})}(i,l,c);break;case\"basic\":m.Authorization=\"Basic \"+btoa(l+\":\"+c);break;default:console.warn(`Warning: invalid passwordType ${o} was passed, not including client id and secret`)}return t.authorizeRequest({body:buildFormData(i),url:r.get(\"tokenUrl\"),name:a,headers:m,query:{},auth:e})};const authorizeApplication=e=>({authActions:t})=>{let{schema:r,scopes:a,name:n,clientId:s,clientSecret:o}=e,l={Authorization:\"Basic \"+btoa(s+\":\"+o)},c={grant_type:\"client_credentials\",scope:a.join(\" \")};return t.authorizeRequest({body:buildFormData(c),name:n,url:r.get(\"tokenUrl\"),auth:e,headers:l})},authorizeAccessCodeWithFormParams=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:a,name:n,clientId:s,clientSecret:o,codeVerifier:l}=e,c={grant_type:\"authorization_code\",code:e.code,client_id:s,client_secret:o,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(c),name:n,url:a.get(\"tokenUrl\"),auth:e})},authorizeAccessCodeWithBasicAuthentication=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:a,name:n,clientId:s,clientSecret:o,codeVerifier:l}=e,c={Authorization:\"Basic \"+btoa(s+\":\"+o)},i={grant_type:\"authorization_code\",code:e.code,client_id:s,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(i),name:n,url:a.get(\"tokenUrl\"),auth:e,headers:c})},authorizeRequest=e=>({fn:t,getConfigs:r,authActions:a,errActions:n,oas3Selectors:s,specSelectors:o,authSelectors:l})=>{let c,{body:i,query:m={},headers:p={},name:u,url:d,auth:h}=e,{additionalQueryStringParams:g}=l.getConfigs()||{};if(o.isOAS3()){let e=s.serverEffectiveValue(s.selectedServer());c=de()(d,e,!0)}else c=de()(d,o.url(),!0);\"object\"==typeof g&&(c.query=Object.assign({},c.query,g));const y=c.toString();let f=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},p);t.fetch({url:y,method:\"post\",headers:f,query:m,body:i,requestInterceptor:r().requestInterceptor,responseInterceptor:r().responseInterceptor}).then((function(e){let t=JSON.parse(e.data),r=t&&(t.error||\"\"),s=t&&(t.parseError||\"\");e.ok?r||s?n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:JSON.stringify(t)}):a.authorizeOauth2WithPersistOption({auth:h,token:t}):n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:e.statusText})})).catch((e=>{let t=new Error(e).message;if(e.response&&e.response.data){const r=e.response.data;try{const e=\"string\"==typeof r?JSON.parse(r):r;e.error&&(t+=`, error: ${e.error}`),e.error_description&&(t+=`, description: ${e.error_description}`)}catch(e){}}n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:t})}))};function configureAuth(e){return{type:_e,payload:e}}function restoreAuthorization(e){return{type:ve,payload:e}}const persistAuthorizationIfNeeded=()=>({authSelectors:e,getConfigs:t})=>{if(!t().persistAuthorization)return;const r=e.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(r))},authPopup=(e,t)=>()=>{U.swaggerUIRedirectOauth2=t,U.open(e)},we={[he]:(e,{payload:t})=>e.set(\"showDefinitions\",t),[ge]:(e,{payload:t})=>{let r=(0,I.fromJS)(t),a=e.get(\"authorized\")||(0,I.Map)();return r.entrySeq().forEach((([t,r])=>{if(!isFunc(r.getIn))return e.set(\"authorized\",a);let n=r.getIn([\"schema\",\"type\"]);if(\"apiKey\"===n||\"http\"===n)a=a.set(t,r);else if(\"basic\"===n){let e=r.getIn([\"value\",\"username\"]),n=r.getIn([\"value\",\"password\"]);a=a.setIn([t,\"value\"],{username:e,header:\"Basic \"+btoa(e+\":\"+n)}),a=a.setIn([t,\"schema\"],r.get(\"schema\"))}})),e.set(\"authorized\",a)},[Se]:(e,{payload:t})=>{let r,{auth:a,token:n}=t;a.token=Object.assign({},n),r=(0,I.fromJS)(a);let s=e.get(\"authorized\")||(0,I.Map)();return s=s.set(r.get(\"name\"),r),e.set(\"authorized\",s)},[ye]:(e,{payload:t})=>{let r=e.get(\"authorized\").withMutations((e=>{t.forEach((t=>{e.delete(t)}))}));return e.set(\"authorized\",r)},[_e]:(e,{payload:t})=>e.set(\"configs\",t),[ve]:(e,{payload:t})=>e.set(\"authorized\",(0,I.fromJS)(t.authorized))},be=require(\"reselect\"),state=e=>e,Ce=(0,be.createSelector)(state,(e=>e.get(\"showDefinitions\"))),xe=(0,be.createSelector)(state,(()=>({specSelectors:e})=>{let t=e.securityDefinitions()||(0,I.Map)({}),r=(0,I.List)();return t.entrySeq().forEach((([e,t])=>{let a=(0,I.Map)();a=a.set(e,t),r=r.push(a)})),r})),getDefinitionsByNames=(e,t)=>({specSelectors:e})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let r=e.securityDefinitions(),a=(0,I.List)();return t.valueSeq().forEach((e=>{let t=(0,I.Map)();e.entrySeq().forEach((([e,a])=>{let n,s=r.get(e);\"oauth2\"===s.get(\"type\")&&a.size&&(n=s.get(\"scopes\"),n.keySeq().forEach((e=>{a.contains(e)||(n=n.delete(e))})),s=s.set(\"allowedScopes\",n)),t=t.set(e,s)})),a=a.push(t)})),a},definitionsForRequirements=(e,t=(0,I.List)())=>({authSelectors:e})=>{const r=e.definitionsToAuthorize()||(0,I.List)();let a=(0,I.List)();return r.forEach((e=>{let r=t.find((t=>t.get(e.keySeq().first())));r&&(e.forEach(((t,a)=>{if(\"oauth2\"===t.get(\"type\")){const n=r.get(a);let s=t.get(\"scopes\");I.List.isList(n)&&I.Map.isMap(s)&&(s.keySeq().forEach((e=>{n.contains(e)||(s=s.delete(e))})),e=e.set(a,t.set(\"scopes\",s)))}})),a=a.push(e))})),a},Oe=(0,be.createSelector)(state,(e=>e.get(\"authorized\")||(0,I.Map)())),isAuthorized=(e,t)=>({authSelectors:e})=>{let r=e.authorized();return I.List.isList(t)?!!t.toJS().filter((e=>-1===Object.keys(e).map((e=>!!r.get(e))).indexOf(!1))).length:null},Ne=(0,be.createSelector)(state,(e=>e.get(\"configs\"))),execute=(e,{authSelectors:t,specSelectors:r})=>({path:a,method:n,operation:s,extras:o})=>{let l={authorized:t.authorized()&&t.authorized().toJS(),definitions:r.securityDefinitions()&&r.securityDefinitions().toJS(),specSecurity:r.security()&&r.security().toJS()};return e({path:a,method:n,operation:s,securities:l,...o})},loaded=(e,t)=>r=>{const{getConfigs:a,authActions:n}=t,s=a();if(e(r),s.persistAuthorization){const e=localStorage.getItem(\"authorized\");e&&n.restoreAuthorization({authorized:JSON.parse(e)})}},wrap_actions_authorize=(e,t)=>r=>{e(r);if(t.getConfigs().persistAuthorization)try{const[{schema:e,value:t}]=Object.values(r),a=\"apiKey\"===e.get(\"type\"),n=\"cookie\"===e.get(\"in\");a&&n&&(document.cookie=`${e.get(\"name\")}=${t}; SameSite=None; Secure`)}catch(e){console.error(\"Error persisting cookie based apiKey in document.cookie.\",e)}},wrap_actions_logout=(e,t)=>r=>{const a=t.getConfigs(),n=t.authSelectors.authorized();try{a.persistAuthorization&&Array.isArray(r)&&r.forEach((e=>{const t=n.get(e,{}),r=\"apiKey\"===t.getIn([\"schema\",\"type\"]),a=\"cookie\"===t.getIn([\"schema\",\"in\"]);if(r&&a){const e=t.getIn([\"schema\",\"name\"]);document.cookie=`${e}=; Max-Age=-99999999`}}))}catch(e){console.error(\"Error deleting cookie based apiKey from document.cookie.\",e)}e(r)},ke=require(\"prop-types\");var Ae=__webpack_require__.n(ke);const Ie=require(\"lodash/omit\");var qe=__webpack_require__.n(Ie);class LockAuthIcon extends k().Component{mapStateToProps(e,t){return{state:e,ownProps:qe()(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"LockIcon\");return k().createElement(r,t)}}const je=LockAuthIcon;class UnlockAuthIcon extends k().Component{mapStateToProps(e,t){return{state:e,ownProps:qe()(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"UnlockIcon\");return k().createElement(r,t)}}const Pe=UnlockAuthIcon;function auth(){return{afterLoad(e){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=e.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,e),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,e)},components:{LockAuthIcon:je,UnlockAuthIcon:Pe,LockAuthOperationIcon:je,UnlockAuthOperationIcon:Pe},statePlugins:{auth:{reducers:we,actions:t,selectors:a,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(e,t,r,a){const{authActions:{authorize:n},specSelectors:{specJson:s,isOAS3:o}}=e,l=o()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],c=s().getIn([...l,t]);return c?n({[t]:{value:{username:r,password:a},schema:c.toJS()}}):null}function preauthorizeApiKey(e,t,r){const{authActions:{authorize:a},specSelectors:{specJson:n,isOAS3:s}}=e,o=s()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],l=n().getIn([...o,t]);return l?a({[t]:{value:r,schema:l.toJS()}}):null}const Me=require(\"js-yaml\");var Re=__webpack_require__.n(Me);const parseYamlConfig=(e,t)=>{try{return Re().load(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}},Te=\"configs_update\",Je=\"configs_toggle\";function update(e,t){return{type:Te,payload:{[e]:t}}}function toggle(e){return{type:Je,payload:e}}const actions_loaded=()=>()=>{},downloadConfig=e=>t=>{const{fn:{fetch:r}}=t;return r(e)},getConfigByUrl=(e,t)=>({specActions:r})=>{if(e)return r.downloadConfig(e).then(next,next);function next(a){a instanceof Error||a.status>=400?(r.updateLoadingStatus(\"failedConfig\"),r.updateLoadingStatus(\"failedConfig\"),r.updateUrl(\"\"),console.error(a.statusText+\" \"+e.url),t(null)):t(parseYamlConfig(a.text))}},get=(e,t)=>e.getIn(Array.isArray(t)?t:[t]),$e={[Te]:(e,t)=>e.merge((0,I.fromJS)(t.payload)),[Je]:(e,t)=>{const r=t.payload,a=e.get(r);return e.set(r,!a)}},Ke={getLocalConfig:()=>parseYamlConfig('---\\nurl: \"https://petstore.swagger.io/v2/swagger.json\"\\ndom_id: \"#swagger-ui\"\\nvalidatorUrl: \"https://validator.swagger.io/validator\"\\n')};function configsPlugin(){return{statePlugins:{spec:{actions:s,selectors:Ke},configs:{reducers:$e,actions:n,selectors:o}}}}const setHash=e=>e?history.pushState(null,null,`#${e}`):window.location.hash=\"\",De=require(\"zenscroll\");var Ve=__webpack_require__.n(De);const Le=\"layout_scroll_to\",Ue=\"layout_clear_scroll\";const ze={fn:{getScrollParent:function getScrollParent(e,t){const r=document.documentElement;let a=getComputedStyle(e);const n=\"absolute\"===a.position,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===a.position)return r;for(let t=e;t=t.parentElement;)if(a=getComputedStyle(t),(!n||\"static\"!==a.position)&&s.test(a.overflow+a.overflowY+a.overflowX))return t;return r}},statePlugins:{layout:{actions:{scrollToElement:(e,t)=>r=>{try{t=t||r.fn.getScrollParent(e),Ve().createScroller(t).to(e)}catch(e){console.error(e)}},scrollTo:e=>({type:Le,payload:Array.isArray(e)?e:[e]}),clearScrollTo:()=>({type:Ue}),readyToScroll:(e,t)=>r=>{const a=r.layoutSelectors.getScrollToKey();q().is(a,(0,I.fromJS)(e))&&(r.layoutActions.scrollToElement(t),r.layoutActions.clearScrollTo())},parseDeepLinkHash:e=>({layoutActions:t,layoutSelectors:r,getConfigs:a})=>{if(a().deepLinking&&e){let a=e.slice(1);\"!\"===a[0]&&(a=a.slice(1)),\"/\"===a[0]&&(a=a.slice(1));const n=a.split(\"/\").map((e=>e||\"\")),s=r.isShownKeyFromUrlHashArray(n),[o,l=\"\",c=\"\"]=s;if(\"operations\"===o){const e=r.isShownKeyFromUrlHashArray([l]);l.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(e.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(e,!0)}(l.indexOf(\"_\")>-1||c.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(s.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(s,!0),t.scrollTo(s)}}},selectors:{getScrollToKey:e=>e.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(e,t){const[r,a]=t;return a?[\"operations\",r,a]:r?[\"operations-tag\",r]:[]},urlHashArrayFromIsShownKey(e,t){let[r,a,n]=t;return\"operations\"==r?[a,n]:\"operations-tag\"==r?[a]:[]}},reducers:{[Le]:(e,t)=>e.set(\"scrollToKey\",q().fromJS(t.payload)),[Ue]:e=>e.delete(\"scrollToKey\")},wrapActions:{show:(e,{getConfigs:t,layoutSelectors:r})=>(...a)=>{if(e(...a),t().deepLinking)try{let[e,t]=a;e=Array.isArray(e)?e:[e];const n=r.urlHashArrayFromIsShownKey(e);if(!n.length)return;const[s,o]=n;if(!t)return setHash(\"/\");2===n.length?setHash(createDeepLinkPath(`/${encodeURIComponent(s)}/${encodeURIComponent(o)}`)):1===n.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(s)}`))}catch(e){console.error(e)}}}}}},Be=require(\"react-immutable-proptypes\");var Fe=__webpack_require__.n(Be);const operation_wrapper=(e,t)=>class OperationWrapper extends k().Component{onLoad=e=>{const{operation:r}=this.props,{tag:a,operationId:n}=r.toObject();let{isShownKey:s}=r.toObject();s=s||[\"operations\",a,n],t.layoutActions.readyToScroll(s,e)};render(){return k().createElement(\"span\",{ref:this.onLoad},k().createElement(e,this.props))}},operation_tag_wrapper=(e,t)=>class OperationTagWrapper extends k().Component{onLoad=e=>{const{tag:r}=this.props,a=[\"operations-tag\",r];t.layoutActions.readyToScroll(a,e)};render(){return k().createElement(\"span\",{ref:this.onLoad},k().createElement(e,this.props))}};function deep_linking(){return[ze,{statePlugins:{configs:{wrapActions:{loaded:(e,t)=>(...r)=>{e(...r);const a=decodeURIComponent(window.location.hash);t.layoutActions.parseDeepLinkHash(a)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}const We=require(\"lodash/reduce\");var He=__webpack_require__.n(We);function transform(e){return e.map((e=>{let t=\"is not of a type(s)\",r=e.get(\"message\").indexOf(t);if(r>-1){let t=e.get(\"message\").slice(r+19).split(\",\");return e.set(\"message\",e.get(\"message\").slice(0,r)+function makeNewMessage(e){return e.reduce(((e,t,r,a)=>r===a.length-1&&a.length>1?e+\"or \"+t:a[r+1]&&a.length>2?e+t+\", \":a[r+1]?e+t+\" \":e+t),\"should be a\")}(t))}return e}))}const Xe=require(\"lodash/get\");var Ge=__webpack_require__.n(Xe);function parameter_oneof_transform(e,{jsSpec:t}){return e}const Ye=[l,c];function transformErrors(e){let t={jsSpec:{}},r=He()(Ye,((e,r)=>{try{return r.transform(e,t).filter((e=>!!e))}catch(t){return console.error(\"Transformer error:\",t),e}}),e);return r.filter((e=>!!e)).map((e=>(!e.get(\"line\")&&e.get(\"path\"),e)))}let Qe={line:0,level:\"error\",message:\"Unknown error\"};const Ze=(0,be.createSelector)((e=>e),(e=>e.get(\"errors\",(0,I.List)()))),et=(0,be.createSelector)(Ze,(e=>e.last()));function err(t){return{statePlugins:{err:{reducers:{[T]:(e,{payload:t})=>{let r=Object.assign(Qe,t,{type:\"thrown\"});return e.update(\"errors\",(e=>(e||(0,I.List)()).push((0,I.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[J]:(e,{payload:t})=>(t=t.map((e=>(0,I.fromJS)(Object.assign(Qe,e,{type:\"thrown\"})))),e.update(\"errors\",(e=>(e||(0,I.List)()).concat((0,I.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[$]:(e,{payload:t})=>{let r=(0,I.fromJS)(t);return r=r.set(\"type\",\"spec\"),e.update(\"errors\",(e=>(e||(0,I.List)()).push((0,I.fromJS)(r)).sortBy((e=>e.get(\"line\"))))).update(\"errors\",(e=>transformErrors(e)))},[K]:(e,{payload:t})=>(t=t.map((e=>(0,I.fromJS)(Object.assign(Qe,e,{type:\"spec\"})))),e.update(\"errors\",(e=>(e||(0,I.List)()).concat((0,I.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[D]:(e,{payload:t})=>{let r=(0,I.fromJS)(Object.assign({},t));return r=r.set(\"type\",\"auth\"),e.update(\"errors\",(e=>(e||(0,I.List)()).push((0,I.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[V]:(e,{payload:t})=>{if(!t||!e.get(\"errors\"))return e;let r=e.get(\"errors\").filter((e=>e.keySeq().every((r=>{const a=e.get(r),n=t[r];return!n||a!==n}))));return e.merge({errors:r})},[L]:(e,{payload:t})=>{if(!t||\"function\"!=typeof t)return e;let r=e.get(\"errors\").filter((e=>t(e)));return e.merge({errors:r})}},actions:e,selectors:i}}}}function opsFilter(e,t){return e.filter(((e,r)=>-1!==r.indexOf(t)))}function filter(){return{fn:{opsFilter}}}const tt=require(\"@babel/runtime-corejs3/helpers/extends\");var rt=__webpack_require__.n(tt);const arrow_up=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:e=null,width:t=15,height:r=16,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"g\",{transform:\"translate(2, -1)\"},k().createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:e=null,width:t=20,height:r=20,...a})=>k().createElement(\"svg\",rt()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),k().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),at=\"layout_update_layout\",nt=\"layout_update_filter\",st=\"layout_update_mode\",ot=\"layout_show\";function updateLayout(e){return{type:at,payload:e}}function updateFilter(e){return{type:nt,payload:e}}function actions_show(e,t=!0){return e=normalizeArray(e),{type:ot,payload:{thing:e,shown:t}}}function changeMode(e,t=\"\"){return e=normalizeArray(e),{type:st,payload:{thing:e,mode:t}}}const lt={[at]:(e,t)=>e.set(\"layout\",t.payload),[nt]:(e,t)=>e.set(\"filter\",t.payload),[ot]:(e,t)=>{const r=t.payload.shown,a=(0,I.fromJS)(t.payload.thing);return e.update(\"shown\",(0,I.fromJS)({}),(e=>e.set(a,r)))},[st]:(e,t)=>{let r=t.payload.thing,a=t.payload.mode;return e.setIn([\"modes\"].concat(r),(a||\"\")+\"\")}},current=e=>e.get(\"layout\"),currentFilter=e=>e.get(\"filter\"),isShown=(e,t,r)=>(t=normalizeArray(t),e.get(\"shown\",(0,I.fromJS)({})).get((0,I.fromJS)(t),r)),whatMode=(e,t,r=\"\")=>(t=normalizeArray(t),e.getIn([\"modes\",...t],r)),ct=(0,be.createSelector)((e=>e),(e=>!isShown(e,\"editor\"))),taggedOperations=(e,t)=>(r,...a)=>{let n=e(r,...a);const{fn:s,layoutSelectors:o,getConfigs:l}=t.getSystem(),c=l(),{maxDisplayedTags:i}=c;let m=o.currentFilter();return m&&!0!==m&&\"true\"!==m&&\"false\"!==m&&(n=s.opsFilter(n,m)),i&&!isNaN(i)&&i>=0&&(n=n.slice(0,i)),n};function plugins_layout(){return{statePlugins:{layout:{reducers:lt,actions:m,selectors:p},spec:{wrapSelectors:u}}}}function logs({configs:e}){const t={debug:0,info:1,log:2,warn:3,error:4},getLevel=e=>t[e]||-1;let{logLevel:r}=e,a=getLevel(r);function log(e,...t){getLevel(e)>=a&&console[e](...t)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let it=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:e=>(...t)=>(it=!0,e(...t)),updateJsonSpec:(e,t)=>(...r)=>{const a=t.getConfigs().onComplete;return it&&\"function\"==typeof a&&(setTimeout(a,0),it=!1),e(...r)}}}}}}const extractKey=e=>{const t=\"_**[]\";return e.indexOf(t)<0?e:e.split(t)[0].trim()},escapeShell=e=>\"-d \"===e||/^[_\\/-]/g.test(e)?e:\"'\"+e.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=e=>\"-d \"===(e=e.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?e.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(e)?e:'\"'+e+'\"',escapePowershell=e=>{if(\"-d \"===e)return e;if(/\\n/.test(e)){return`@\"\\n${e.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(e)){return`'${e.replace(/'/g,\"''\")}'`}return e};const curlify=(e,t,r,a=\"\")=>{let n=!1,s=\"\";const addWords=(...e)=>s+=\" \"+e.map(t).join(\" \"),addWordsWithoutLeadingSpace=(...e)=>s+=e.map(t).join(\" \"),addNewLine=()=>s+=` ${r}`,addIndent=(e=1)=>s+=\"  \".repeat(e);let o=e.get(\"headers\");if(s+=\"curl\"+a,e.has(\"curlOptions\")&&addWords(...e.get(\"curlOptions\")),addWords(\"-X\",e.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${e.get(\"url\")}`),o&&o.size)for(let t of e.get(\"headers\").entries()){addNewLine(),addIndent();let[e,r]=t;addWordsWithoutLeadingSpace(\"-H\",`${e}: ${r}`),n=n||/^content-type$/i.test(e)&&/^multipart\\/form-data$/i.test(r)}const l=e.get(\"body\");if(l)if(n&&[\"POST\",\"PUT\",\"PATCH\"].includes(e.get(\"method\")))for(let[e,t]of l.entrySeq()){let r=extractKey(e);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),t instanceof U.File&&\"string\"==typeof t.valueOf()?addWords(`${r}=${t.data}${t.type?`;type=${t.type}`:\"\"}`):t instanceof U.File?addWords(`${r}=@${t.name}${t.type?`;type=${t.type}`:\"\"}`):addWords(`${r}=${t}`)}else if(l instanceof U.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${l.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let t=l;I.Map.isMap(t)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(e){let t=[];for(let[r,a]of e.get(\"body\").entrySeq()){let e=extractKey(r);a instanceof U.File?t.push(`  \"${e}\": {\\n    \"name\": \"${a.name}\"${a.type?`,\\n    \"type\": \"${a.type}\"`:\"\"}\\n  }`):t.push(`  \"${e}\": ${JSON.stringify(a,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${t.join(\",\\n\")}\\n}`}(e)):(\"string\"!=typeof t&&(t=JSON.stringify(t)),addWordsWithoutLeadingSpace(t))}else l||\"POST\"!==e.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return s},requestSnippetGenerator_curl_powershell=e=>curlify(e,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=e=>curlify(e,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=e=>curlify(e,escapeCMD,\"^\\n\"),request_snippets_selectors_state=e=>e||(0,I.Map)(),mt=(0,be.createSelector)(request_snippets_selectors_state,(e=>{const t=e.get(\"languages\"),r=e.get(\"generators\",(0,I.Map)());return!t||t.isEmpty()?r:r.filter(((e,r)=>t.includes(r)))})),getSnippetGenerators=e=>({fn:t})=>mt(e).map(((e,r)=>{const a=(e=>t[`requestSnippetGenerator_${e}`])(r);return\"function\"!=typeof a?null:e.set(\"fn\",a)})).filter((e=>e)),pt=(0,be.createSelector)(request_snippets_selectors_state,(e=>e.get(\"activeLanguage\"))),ut=(0,be.createSelector)(request_snippets_selectors_state,(e=>e.get(\"defaultExpanded\"))),dt=require(\"react-copy-to-clipboard\"),ht=require(\"react-syntax-highlighter/dist/esm/light\");var gt=__webpack_require__.n(ht);const yt=require(\"react-syntax-highlighter/dist/esm/languages/hljs/javascript\");var ft=__webpack_require__.n(yt);const St=require(\"react-syntax-highlighter/dist/esm/languages/hljs/json\");var Et=__webpack_require__.n(St);const _t=require(\"react-syntax-highlighter/dist/esm/languages/hljs/xml\");var vt=__webpack_require__.n(_t);const wt=require(\"react-syntax-highlighter/dist/esm/languages/hljs/bash\");var bt=__webpack_require__.n(wt);const Ct=require(\"react-syntax-highlighter/dist/esm/languages/hljs/yaml\");var xt=__webpack_require__.n(Ct);const Ot=require(\"react-syntax-highlighter/dist/esm/languages/hljs/http\");var Nt=__webpack_require__.n(Ot);const kt=require(\"react-syntax-highlighter/dist/esm/languages/hljs/powershell\");var At=__webpack_require__.n(kt);const It=require(\"react-syntax-highlighter/dist/esm/styles/hljs/agate\");var qt=__webpack_require__.n(It);const jt=require(\"react-syntax-highlighter/dist/esm/styles/hljs/arta\");var Pt=__webpack_require__.n(jt);const Mt=require(\"react-syntax-highlighter/dist/esm/styles/hljs/monokai\");var Rt=__webpack_require__.n(Mt);const Tt=require(\"react-syntax-highlighter/dist/esm/styles/hljs/nord\");var Jt=__webpack_require__.n(Tt);const $t=require(\"react-syntax-highlighter/dist/esm/styles/hljs/obsidian\");var Kt=__webpack_require__.n($t);const Dt=require(\"react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night\");var Vt=__webpack_require__.n(Dt);const Lt=require(\"react-syntax-highlighter/dist/esm/styles/hljs/idea\");var Ut=__webpack_require__.n(Lt);gt().registerLanguage(\"json\",Et()),gt().registerLanguage(\"js\",ft()),gt().registerLanguage(\"xml\",vt()),gt().registerLanguage(\"yaml\",xt()),gt().registerLanguage(\"http\",Nt()),gt().registerLanguage(\"bash\",bt()),gt().registerLanguage(\"powershell\",At()),gt().registerLanguage(\"javascript\",ft());const zt={agate:qt(),arta:Pt(),monokai:Rt(),nord:Jt(),obsidian:Kt(),\"tomorrow-night\":Vt(),idea:Ut()},Bt=Object.keys(zt),getStyle=e=>Bt.includes(e)?zt[e]:(console.warn(`Request style '${e}' is not available, returning default instead`),qt()),Ft={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},Wt={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:e,requestSnippetsSelectors:t,getConfigs:r,getComponent:a})=>{const n=ee()(r)?r():null,s=!1!==Ge()(n,\"syntaxHighlight\")&&Ge()(n,\"syntaxHighlight.activated\",!0),o=(0,N.useRef)(null),l=a(\"ArrowUpIcon\"),c=a(\"ArrowDownIcon\"),[i,m]=(0,N.useState)(t.getSnippetGenerators()?.keySeq().first()),[p,u]=(0,N.useState)(t?.getDefaultExpanded());(0,N.useEffect)((()=>{}),[]),(0,N.useEffect)((()=>{const e=Array.from(o.current.childNodes).filter((e=>!!e.nodeType&&e.classList?.contains(\"curl-command\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e]);const d=t.getSnippetGenerators(),h=d.get(i),g=h.get(\"fn\")(e),handleSetIsExpanded=()=>{u(!p)},handleGetBtnStyle=e=>e===i?Wt:Ft,handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:a,offsetHeight:n,scrollTop:s}=t;a>n&&(0===s&&r<0||n+s>=a&&r>0)&&e.preventDefault()},y=s?k().createElement(gt(),{language:h.get(\"syntax\"),className:\"curl microlight\",style:getStyle(Ge()(n,\"syntaxHighlight.theme\"))},g):k().createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:g});return k().createElement(\"div\",{className:\"request-snippets\",ref:o},k().createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},k().createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),k().createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:p?\"Collapse operation\":\"Expand operation\"},p?k().createElement(c,{className:\"arrow\",width:\"10\",height:\"10\"}):k().createElement(l,{className:\"arrow\",width:\"10\",height:\"10\"}))),p&&k().createElement(\"div\",{className:\"curl-command\"},k().createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},d.entrySeq().map((([e,t])=>k().createElement(\"div\",{style:handleGetBtnStyle(e),className:\"btn\",key:e,onClick:()=>(e=>{i!==e&&m(e)})(e)},k().createElement(\"h4\",{style:e===i?{color:\"white\"}:{}},t.get(\"title\")))))),k().createElement(\"div\",{className:\"copy-to-clipboard\"},k().createElement(dt.CopyToClipboard,{text:g},k().createElement(\"button\",null))),k().createElement(\"div\",null,y)))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:d,statePlugins:{requestSnippets:{selectors:h}}}),Ht=require(\"xml\");var Xt=__webpack_require__.n(Ht);const Gt=require(\"randexp\");var Yt=__webpack_require__.n(Gt);const Qt=require(\"lodash/isEmpty\");var Zt=__webpack_require__.n(Qt);const shallowArrayEquals=e=>t=>Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,r)=>e===t[r])),list=(...e)=>e;class Cache extends Map{delete(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.delete(t)}get(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.get(t)}has(e){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(e))}}const utils_memoizeN=(e,t=list)=>{const{Cache:r}=F();F().Cache=Cache;const a=F()(e,t);return F().Cache=r,a},er={string:e=>e.pattern?(e=>{try{return new(Yt())(e).gen()}catch(e){return\"string\"}})(e.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:e=>\"boolean\"!=typeof e.default||e.default},primitive=e=>{e=objectify(e);let{type:t,format:r}=e,a=er[`${t}_${r}`]||er[t];return isFunc(a)?a(e):\"Unknown Type: \"+e.type},sanitizeRef=e=>deeplyStripKey(e,\"$$ref\",(e=>\"string\"==typeof e&&e.indexOf(\"#\")>-1)),tr=[\"maxProperties\",\"minProperties\"],rr=[\"minItems\",\"maxItems\"],ar=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],nr=[\"minLength\",\"maxLength\"],liftSampleHelper=(e,t,r={})=>{if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...tr,...rr,...ar,...nr].forEach((r=>(r=>{void 0===t[r]&&void 0!==e[r]&&(t[r]=e[r])})(r))),void 0!==e.required&&Array.isArray(e.required)&&(void 0!==t.required&&t.required.length||(t.required=[]),e.required.forEach((e=>{t.required.includes(e)||t.required.push(e)}))),e.properties){t.properties||(t.properties={});let a=objectify(e.properties);for(let n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]&&a[n].deprecated||a[n]&&a[n].readOnly&&!r.includeReadOnly||a[n]&&a[n].writeOnly&&!r.includeWriteOnly||t.properties[n]||(t.properties[n]=a[n],!e.required&&Array.isArray(e.required)&&-1!==e.required.indexOf(n)&&(t.required?t.required.push(n):t.required=[n])))}return e.items&&(t.items||(t.items={}),t.items=liftSampleHelper(e.items,t.items,r)),t},sampleFromSchemaGeneric=(e,t={},r=void 0,a=!1)=>{e&&isFunc(e.toJS)&&(e=e.toJS());let n=void 0!==r||e&&void 0!==e.example||e&&void 0!==e.default;const s=!n&&e&&e.oneOf&&e.oneOf.length>0,o=!n&&e&&e.anyOf&&e.anyOf.length>0;if(!n&&(s||o)){const r=objectify(s?e.oneOf[0]:e.anyOf[0]);if(liftSampleHelper(r,e,t),!e.xml&&r.xml&&(e.xml=r.xml),void 0!==e.example&&void 0!==r.example)n=!0;else if(r.properties){e.properties||(e.properties={});let a=objectify(r.properties);for(let n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]&&a[n].deprecated||a[n]&&a[n].readOnly&&!t.includeReadOnly||a[n]&&a[n].writeOnly&&!t.includeWriteOnly||e.properties[n]||(e.properties[n]=a[n],!r.required&&Array.isArray(r.required)&&-1!==r.required.indexOf(n)&&(e.required?e.required.push(n):e.required=[n])))}}const l={};let{xml:c,type:i,example:m,properties:p,additionalProperties:u,items:d}=e||{},{includeReadOnly:h,includeWriteOnly:g}=t;c=c||{};let y,{name:f,prefix:S,namespace:E}=c,_={};if(a&&(f=f||\"notagname\",y=(S?S+\":\":\"\")+f,E)){l[S?\"xmlns:\"+S:\"xmlns\"]=E}a&&(_[y]=[]);const schemaHasAny=t=>t.some((t=>Object.prototype.hasOwnProperty.call(e,t)));e&&!i&&(p||u||schemaHasAny(tr)?i=\"object\":d||schemaHasAny(rr)?i=\"array\":schemaHasAny(ar)?(i=\"number\",e.type=\"number\"):n||e.enum||(i=\"string\",e.type=\"string\"));const handleMinMaxItems=t=>{if(null!=e?.maxItems&&(t=t.slice(0,e?.maxItems)),null!=e?.minItems){let r=0;for(;t.length<e?.minItems;)t.push(t[r++%t.length])}return t},v=objectify(p);let w,b=0;const hasExceededMaxProperties=()=>e&&null!==e.maxProperties&&void 0!==e.maxProperties&&b>=e.maxProperties,canAddProperty=t=>!e||null===e.maxProperties||void 0===e.maxProperties||!hasExceededMaxProperties()&&(!(t=>!(e&&e.required&&e.required.length&&e.required.includes(t)))(t)||e.maxProperties-b-(()=>{if(!e||!e.required)return 0;let t=0;return a?e.required.forEach((e=>t+=void 0===_[e]?0:1)):e.required.forEach((e=>t+=void 0===_[y]?.find((t=>void 0!==t[e]))?0:1)),e.required.length-t})()>0);if(w=a?(r,n=void 0)=>{if(e&&v[r]){if(v[r].xml=v[r].xml||{},v[r].xml.attribute){const e=Array.isArray(v[r].enum)?v[r].enum[0]:void 0,t=v[r].example,a=v[r].default;return void(l[v[r].xml.name||r]=void 0!==t?t:void 0!==a?a:void 0!==e?e:primitive(v[r]))}v[r].xml.name=v[r].xml.name||r}else v[r]||!1===u||(v[r]={xml:{name:r}});let s=sampleFromSchemaGeneric(e&&v[r]||void 0,t,n,a);canAddProperty(r)&&(b++,Array.isArray(s)?_[y]=_[y].concat(s):_[y].push(s))}:(r,n)=>{if(canAddProperty(r)){if(Object.prototype.hasOwnProperty.call(e,\"discriminator\")&&e.discriminator&&Object.prototype.hasOwnProperty.call(e.discriminator,\"mapping\")&&e.discriminator.mapping&&Object.prototype.hasOwnProperty.call(e,\"$$ref\")&&e.$$ref&&e.discriminator.propertyName===r){for(let t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){_[r]=t;break}}else _[r]=sampleFromSchemaGeneric(v[r],t,n,a);b++}},n){let n;if(n=sanitizeRef(void 0!==r?r:void 0!==m?m:e.default),!a){if(\"number\"==typeof n&&\"string\"===i)return`${n}`;if(\"string\"!=typeof n||\"string\"===i)return n;try{return JSON.parse(n)}catch(e){return n}}if(e||(i=Array.isArray(n)?\"array\":typeof n),\"array\"===i){if(!Array.isArray(n)){if(\"string\"==typeof n)return n;n=[n]}const r=e?e.items:void 0;r&&(r.xml=r.xml||c||{},r.xml.name=r.xml.name||c.name);let s=n.map((e=>sampleFromSchemaGeneric(r,t,e,a)));return s=handleMinMaxItems(s),c.wrapped?(_[y]=s,Zt()(l)||_[y].push({_attr:l})):_=s,_}if(\"object\"===i){if(\"string\"==typeof n)return n;for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e&&v[t]&&v[t].readOnly&&!h||e&&v[t]&&v[t].writeOnly&&!g||(e&&v[t]&&v[t].xml&&v[t].xml.attribute?l[v[t].xml.name||t]=n[t]:w(t,n[t])));return Zt()(l)||_[y].push({_attr:l}),_}return _[y]=Zt()(l)?n:[{_attr:l},n],_}if(\"object\"===i){for(let e in v)Object.prototype.hasOwnProperty.call(v,e)&&(v[e]&&v[e].deprecated||v[e]&&v[e].readOnly&&!h||v[e]&&v[e].writeOnly&&!g||w(e));if(a&&l&&_[y].push({_attr:l}),hasExceededMaxProperties())return _;if(!0===u)a?_[y].push({additionalProp:\"Anything can be here\"}):_.additionalProp1={},b++;else if(u){const r=objectify(u),n=sampleFromSchemaGeneric(r,t,void 0,a);if(a&&r.xml&&r.xml.name&&\"notagname\"!==r.xml.name)_[y].push(n);else{const t=null!==e.minProperties&&void 0!==e.minProperties&&b<e.minProperties?e.minProperties-b:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return _;if(a){const t={};t[\"additionalProp\"+e]=n.notagname,_[y].push(t)}else _[\"additionalProp\"+e]=n;b++}}}return _}if(\"array\"===i){if(!d)return;let r;if(a&&(d.xml=d.xml||e?.xml||{},d.xml.name=d.xml.name||c.name),Array.isArray(d.anyOf))r=d.anyOf.map((e=>sampleFromSchemaGeneric(liftSampleHelper(d,e,t),t,void 0,a)));else if(Array.isArray(d.oneOf))r=d.oneOf.map((e=>sampleFromSchemaGeneric(liftSampleHelper(d,e,t),t,void 0,a)));else{if(!(!a||a&&c.wrapped))return sampleFromSchemaGeneric(d,t,void 0,a);r=[sampleFromSchemaGeneric(d,t,void 0,a)]}return r=handleMinMaxItems(r),a&&c.wrapped?(_[y]=r,Zt()(l)||_[y].push({_attr:l}),_):r}let C;if(e&&Array.isArray(e.enum))C=normalizeArray(e.enum)[0];else{if(!e)return;if(C=primitive(e),\"number\"==typeof C){let t=e.minimum;null!=t&&(e.exclusiveMinimum&&t++,C=t);let r=e.maximum;null!=r&&(e.exclusiveMaximum&&r--,C=r)}if(\"string\"==typeof C&&(null!==e.maxLength&&void 0!==e.maxLength&&(C=C.slice(0,e.maxLength)),null!==e.minLength&&void 0!==e.minLength)){let t=0;for(;C.length<e.minLength;)C+=C[t++%C.length]}}if(\"file\"!==i)return a?(_[y]=Zt()(l)?C:[{_attr:l},C],_):C},inferSchema=e=>(e.schema&&(e=e.schema),e.properties&&(e.type=\"object\"),e),createXMLExample=(e,t,r)=>{const a=sampleFromSchemaGeneric(e,t,r,!0);if(a)return\"string\"==typeof a?a:Xt()(a,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(e,t,r)=>sampleFromSchemaGeneric(e,t,r,!1),resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],sr=utils_memoizeN(createXMLExample,resolver),or=utils_memoizeN(sampleFromSchema,resolver),lr=[{when:/json/,shouldStringifyTypes:[\"string\"]}],cr=[\"object\"],get_json_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.memoizedSampleFromSchema(t,r,n),l=typeof o,c=lr.reduce(((e,t)=>t.when.test(a)?[...e,...t.shouldStringifyTypes]:e),cr);return G()(c,(e=>e===l))?JSON.stringify(o,null,2):o},get_yaml_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.getJsonSampleSchema(t,r,a,n);let l;try{l=Re().dump(Re().load(o),{lineWidth:-1},{schema:Me.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")},get_xml_sample_schema=e=>(t,r,a)=>{const{fn:n}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return n.memoizedCreateXMLExample(t,r,a)},get_sample_schema=e=>(t,r=\"\",a={},n=void 0)=>{const{fn:s}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof n?.toJS&&(n=n.toJS()),/xml/.test(r)?s.getXmlSampleSchema(t,a,n):/(yaml|yml)/.test(r)?s.getYamlSampleSchema(t,a,r,n):s.getJsonSampleSchema(t,a,r,n)},json_schema_5_samples=({getSystem:e})=>{const t=get_json_sample_schema(e),r=get_yaml_sample_schema(e),a=get_xml_sample_schema(e),n=get_sample_schema(e);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:or,memoizedCreateXMLExample:sr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:or,memoizedCreateXMLExample:sr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n}}},ir=require(\"lodash/constant\");var mr=__webpack_require__.n(ir);const pr=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=e=>e||(0,I.Map)(),ur=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"lastError\"))),dr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"url\"))),hr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"spec\")||\"\")),gr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"specSource\")||\"not-editor\")),yr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"json\",(0,I.Map)()))),fr=(0,be.createSelector)(yr,(e=>e.toJS())),Sr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"resolved\",(0,I.Map)()))),specResolvedSubtree=(e,t)=>e.getIn([\"resolvedSubtrees\",...t],void 0),mergerFn=(e,t)=>I.Map.isMap(e)&&I.Map.isMap(t)?t.get(\"$$ref\")?t:(0,I.OrderedMap)().mergeWith(mergerFn,e,t):t,Er=(0,be.createSelector)(spec_selectors_state,(e=>(0,I.OrderedMap)().mergeWith(mergerFn,e.get(\"json\"),e.get(\"resolvedSubtrees\")))),spec=e=>yr(e),_r=(0,be.createSelector)(spec,(()=>!1)),vr=(0,be.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"info\")))),wr=(0,be.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"externalDocs\")))),br=(0,be.createSelector)(vr,(e=>e&&e.get(\"version\"))),Cr=(0,be.createSelector)(br,(e=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(e).slice(1))),xr=(0,be.createSelector)(Er,(e=>e.get(\"paths\"))),Or=mr()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),Nr=(0,be.createSelector)(xr,(e=>{if(!e||e.size<1)return(0,I.List)();let t=(0,I.List)();return e&&e.forEach?(e.forEach(((e,r)=>{if(!e||!e.forEach)return{};e.forEach(((e,a)=>{pr.indexOf(a)<0||(t=t.push((0,I.fromJS)({path:r,method:a,operation:e,id:`${a}-${r}`})))}))})),t):(0,I.List)()})),kr=(0,be.createSelector)(spec,(e=>(0,I.Set)(e.get(\"consumes\")))),Ar=(0,be.createSelector)(spec,(e=>(0,I.Set)(e.get(\"produces\")))),Ir=(0,be.createSelector)(spec,(e=>e.get(\"security\",(0,I.List)()))),qr=(0,be.createSelector)(spec,(e=>e.get(\"securityDefinitions\"))),findDefinition=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"definitions\",t],null),a=e.getIn([\"json\",\"definitions\",t],null);return r||a||null},jr=(0,be.createSelector)(spec,(e=>{const t=e.get(\"definitions\");return I.Map.isMap(t)?t:(0,I.Map)()})),Pr=(0,be.createSelector)(spec,(e=>e.get(\"basePath\"))),Mr=(0,be.createSelector)(spec,(e=>e.get(\"host\"))),Rr=(0,be.createSelector)(spec,(e=>e.get(\"schemes\",(0,I.Map)()))),Tr=(0,be.createSelector)([Nr,kr,Ar],((e,t,r)=>e.map((e=>e.update(\"operation\",(e=>{if(e){if(!I.Map.isMap(e))return;return e.withMutations((e=>(e.get(\"consumes\")||e.update(\"consumes\",(e=>(0,I.Set)(e).merge(t))),e.get(\"produces\")||e.update(\"produces\",(e=>(0,I.Set)(e).merge(r))),e)))}return(0,I.Map)()})))))),Jr=(0,be.createSelector)(spec,(e=>{const t=e.get(\"tags\",(0,I.List)());return I.List.isList(t)?t.filter((e=>I.Map.isMap(e))):(0,I.List)()})),tagDetails=(e,t)=>(Jr(e)||(0,I.List)()).filter(I.Map.isMap).find((e=>e.get(\"name\")===t),(0,I.Map)()),$r=(0,be.createSelector)(Tr,Jr,((e,t)=>e.reduce(((e,t)=>{let r=(0,I.Set)(t.getIn([\"operation\",\"tags\"]));return r.count()<1?e.update(\"default\",(0,I.List)(),(e=>e.push(t))):r.reduce(((e,r)=>e.update(r,(0,I.List)(),(e=>e.push(t)))),e)}),t.reduce(((e,t)=>e.set(t.get(\"name\"),(0,I.List)())),(0,I.OrderedMap)())))),selectors_taggedOperations=e=>({getConfigs:t})=>{let{tagsSorter:r,operationsSorter:a}=t();return $r(e).sortBy(((e,t)=>t),((e,t)=>{let a=\"function\"==typeof r?r:pe.tagsSorter[r];return a?a(e,t):null})).map(((t,r)=>{let n=\"function\"==typeof a?a:pe.operationsSorter[a],s=n?t.sort(n):t;return(0,I.Map)({tagDetails:tagDetails(e,r),operations:s})}))},Kr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"responses\",(0,I.Map)()))),Dr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"requests\",(0,I.Map)()))),Vr=(0,be.createSelector)(spec_selectors_state,(e=>e.get(\"mutatedRequests\",(0,I.Map)()))),responseFor=(e,t,r)=>Kr(e).getIn([t,r],null),requestFor=(e,t,r)=>Dr(e).getIn([t,r],null),mutatedRequestFor=(e,t,r)=>Vr(e).getIn([t,r],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(e,t,r)=>{const a=Er(e).getIn([\"paths\",...t,\"parameters\"],(0,I.OrderedMap)()),n=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,I.OrderedMap)());return a.map((e=>{const t=n.get(`${r.get(\"in\")}.${r.get(\"name\")}`),a=n.get(`${r.get(\"in\")}.${r.get(\"name\")}.hash-${r.hashCode()}`);return(0,I.OrderedMap)().merge(e,t,a)})).find((e=>e.get(\"in\")===r.get(\"in\")&&e.get(\"name\")===r.get(\"name\")),(0,I.OrderedMap)())},parameterInclusionSettingFor=(e,t,r,a)=>{const n=`${a}.${r}`;return e.getIn([\"meta\",\"paths\",...t,\"parameter_inclusions\",n],!1)},parameterWithMeta=(e,t,r,a)=>{const n=Er(e).getIn([\"paths\",...t,\"parameters\"],(0,I.OrderedMap)()).find((e=>e.get(\"in\")===a&&e.get(\"name\")===r),(0,I.OrderedMap)());return parameterWithMetaByIdentity(e,t,n)},operationWithMeta=(e,t,r)=>{const a=Er(e).getIn([\"paths\",t,r],(0,I.OrderedMap)()),n=e.getIn([\"meta\",\"paths\",t,r],(0,I.OrderedMap)()),s=a.get(\"parameters\",(0,I.List)()).map((a=>parameterWithMetaByIdentity(e,[t,r],a)));return(0,I.OrderedMap)().merge(a,n).set(\"parameters\",s)};function getParameter(e,t,r,a){return t=t||[],e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,I.fromJS)([])).find((e=>I.Map.isMap(e)&&e.get(\"name\")===r&&e.get(\"in\")===a))||(0,I.Map)()}const Lr=(0,be.createSelector)(spec,(e=>{const t=e.get(\"host\");return\"string\"==typeof t&&t.length>0&&\"/\"!==t[0]}));function parameterValues(e,t,r){return t=t||[],operationWithMeta(e,...t).get(\"parameters\",(0,I.List)()).reduce(((e,t)=>{let a=r&&\"body\"===t.get(\"in\")?t.get(\"value_xml\"):t.get(\"value\");return I.List.isList(a)&&(a=a.filter((e=>\"\"!==e))),e.set(paramToIdentifier(t,{allowHashes:!1}),a)}),(0,I.fromJS)({}))}function parametersIncludeIn(e,t=\"\"){if(I.List.isList(e))return e.some((e=>I.Map.isMap(e)&&e.get(\"in\")===t))}function parametersIncludeType(e,t=\"\"){if(I.List.isList(e))return e.some((e=>I.Map.isMap(e)&&e.get(\"type\")===t))}function contentTypeValues(e,t){t=t||[];let r=Er(e).getIn([\"paths\",...t],(0,I.fromJS)({})),a=e.getIn([\"meta\",\"paths\",...t],(0,I.fromJS)({})),n=currentProducesFor(e,t);const s=r.get(\"parameters\")||new I.List,o=a.get(\"consumes_value\")?a.get(\"consumes_value\"):parametersIncludeType(s,\"file\")?\"multipart/form-data\":parametersIncludeType(s,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,I.fromJS)({requestContentType:o,responseContentType:n})}function currentProducesFor(e,t){t=t||[];const r=Er(e).getIn([\"paths\",...t],null);if(null===r)return;const a=e.getIn([\"meta\",\"paths\",...t,\"produces_value\"],null),n=r.getIn([\"produces\",0],null);return a||n||\"application/json\"}function producesOptionsFor(e,t){t=t||[];const r=Er(e),a=r.getIn([\"paths\",...t],null);if(null===a)return;const[n]=t,s=a.get(\"produces\",null),o=r.getIn([\"paths\",n,\"produces\"],null),l=r.getIn([\"produces\"],null);return s||o||l}function consumesOptionsFor(e,t){t=t||[];const r=Er(e),a=r.getIn([\"paths\",...t],null);if(null===a)return;const[n]=t,s=a.get(\"consumes\",null),o=r.getIn([\"paths\",n,\"consumes\"],null),l=r.getIn([\"consumes\"],null);return s||o||l}const operationScheme=(e,t,r)=>{let a=e.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),n=Array.isArray(a)?a[1]:null;return e.getIn([\"scheme\",t,r])||e.getIn([\"scheme\",\"_defaultScheme\"])||n||\"\"},canExecuteScheme=(e,t,r)=>[\"http\",\"https\"].indexOf(operationScheme(e,t,r))>-1,validationErrors=(e,t)=>{t=t||[];let r=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,I.fromJS)([]));const a=[];return r.forEach((e=>{let t=e.get(\"errors\");t&&t.count()&&t.map((e=>I.Map.isMap(e)?`${e.get(\"propKey\")}: ${e.get(\"error\")}`:e)).forEach((e=>a.push(e)))})),a},validateBeforeExecute=(e,t)=>0===validationErrors(e,t).length,getOAS3RequiredRequestBodyContentType=(e,t)=>{let r={requestBody:!1,requestContentType:{}},a=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\"],(0,I.fromJS)([]));return a.size<1||(a.getIn([\"required\"])&&(r.requestBody=a.getIn([\"required\"])),a.getIn([\"content\"]).entrySeq().forEach((e=>{const t=e[0];if(e[1].getIn([\"schema\",\"required\"])){const a=e[1].getIn([\"schema\",\"required\"]).toJS();r.requestContentType[t]=a}}))),r},isMediaTypeSchemaPropertiesEqual=(e,t,r,a)=>{if((r||a)&&r===a)return!0;let n=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\",\"content\"],(0,I.fromJS)([]));if(n.size<2||!r||!a)return!1;let s=n.getIn([r,\"schema\",\"properties\"],(0,I.fromJS)([])),o=n.getIn([a,\"schema\",\"properties\"],(0,I.fromJS)([]));return!!s.equals(o)};function returnSelfOrNewMap(e){return I.Map.isMap(e)?e:new I.Map}const Ur=require(\"lodash/isString\");var zr=__webpack_require__.n(Ur);const Br=require(\"lodash/debounce\");var Fr=__webpack_require__.n(Br);const Wr=require(\"lodash/set\");var Hr=__webpack_require__.n(Wr);const Xr=require(\"lodash/fp/assocPath\");var Gr=__webpack_require__.n(Xr);const Yr=\"spec_update_spec\",Qr=\"spec_update_url\",Zr=\"spec_update_json\",ea=\"spec_update_param\",ta=\"spec_update_empty_param_inclusion\",ra=\"spec_validate_param\",aa=\"spec_set_response\",na=\"spec_set_request\",sa=\"spec_set_mutated_request\",oa=\"spec_log_request\",la=\"spec_clear_response\",ca=\"spec_clear_request\",ia=\"spec_clear_validate_param\",ma=\"spec_update_operation_meta_value\",pa=\"spec_update_resolved\",ua=\"spec_update_resolved_subtree\",da=\"set_scheme\",toStr=e=>zr()(e)?e:\"\";function updateSpec(e){const t=toStr(e).replace(/\\t/g,\"  \");if(\"string\"==typeof e)return{type:Yr,payload:t}}function updateResolved(e){return{type:pa,payload:e}}function updateUrl(e){return{type:Qr,payload:e}}function updateJsonSpec(e){return{type:Zr,payload:e}}const parseToJson=e=>({specActions:t,specSelectors:r,errActions:a})=>{let{specStr:n}=r,s=null;try{e=e||n(),a.clear({source:\"parser\"}),s=Re().load(e,{schema:Me.JSON_SCHEMA})}catch(e){return console.error(e),a.newSpecErr({source:\"parser\",level:\"error\",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return s&&\"object\"==typeof s?t.updateJsonSpec(s):{}};let ha=!1;const resolveSpec=(e,t)=>({specActions:r,specSelectors:a,errActions:n,fn:{fetch:s,resolve:o,AST:l={}},getConfigs:c})=>{ha||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),ha=!0);const{modelPropertyMacro:i,parameterMacro:m,requestInterceptor:p,responseInterceptor:u}=c();void 0===e&&(e=a.specJson()),void 0===t&&(t=a.url());let d=l.getLineNumberForPath?l.getLineNumberForPath:()=>{},h=a.specStr();return o({fetch:s,spec:e,baseDoc:String(new URL(t,document.baseURI)),modelPropertyMacro:i,parameterMacro:m,requestInterceptor:p,responseInterceptor:u}).then((({spec:e,errors:t})=>{if(n.clear({type:\"thrown\"}),Array.isArray(t)&&t.length>0){let e=t.map((e=>(console.error(e),e.line=e.fullPath?d(h,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));n.newThrownErrBatch(e)}return r.updateResolved(e)}))};let ga=[];const ya=Fr()((()=>{const e=ga.reduce(((e,{path:t,system:r})=>(e.has(r)||e.set(r,[]),e.get(r).push(t),e)),new Map);ga=[],e.forEach((async(e,t)=>{if(!t)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!t.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:r,errSelectors:a,fn:{resolveSubtree:n,fetch:s,AST:o={}},specSelectors:l,specActions:c}=t,i=o.getLineNumberForPath??mr()(void 0),m=l.specStr(),{modelPropertyMacro:p,parameterMacro:u,requestInterceptor:d,responseInterceptor:h}=t.getConfigs();try{const t=await e.reduce((async(e,t)=>{let{resultMap:o,specWithCurrentSubtrees:c}=await e;const{errors:g,spec:y}=await n(c,t,{baseDoc:String(new URL(l.url(),document.baseURI)),modelPropertyMacro:p,parameterMacro:u,requestInterceptor:d,responseInterceptor:h});if(a.allErrors().size&&r.clearBy((e=>\"thrown\"!==e.get(\"type\")||\"resolver\"!==e.get(\"source\")||!e.get(\"fullPath\").every(((e,r)=>e===t[r]||void 0===t[r])))),Array.isArray(g)&&g.length>0){let e=g.map((e=>(e.line=e.fullPath?i(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));r.newThrownErrBatch(e)}return y&&l.isOAS3()&&\"components\"===t[0]&&\"securitySchemes\"===t[1]&&await Promise.all(Object.values(y).filter((e=>\"openIdConnect\"===e.type)).map((async e=>{const t={url:e.openIdConnectUrl,requestInterceptor:d,responseInterceptor:h};try{const r=await s(t);r instanceof Error||r.status>=400?console.error(r.statusText+\" \"+t.url):e.openIdConnectData=JSON.parse(r.text)}catch(e){console.error(e)}}))),Hr()(o,t,y),c=Gr()(t,y,c),{resultMap:o,specWithCurrentSubtrees:c}}),Promise.resolve({resultMap:(l.specResolvedSubtree([])||(0,I.Map)()).toJS(),specWithCurrentSubtrees:l.specJS()}));c.updateResolvedSubtree([],t.resultMap)}catch(e){console.error(e)}}))}),35),requestResolvedSubtree=e=>t=>{ga.find((({path:r,system:a})=>a===t&&r.toString()===e.toString()))||(ga.push({path:e,system:t}),ya())};function changeParam(e,t,r,a,n){return{type:ea,payload:{path:e,value:a,paramName:t,paramIn:r,isXml:n}}}function changeParamByIdentity(e,t,r,a){return{type:ea,payload:{path:e,param:t,value:r,isXml:a}}}const updateResolvedSubtree=(e,t)=>({type:ua,payload:{path:e,value:t}}),invalidateResolvedSubtreeCache=()=>({type:ua,payload:{path:[],value:(0,I.Map)()}}),validateParams=(e,t)=>({type:ra,payload:{pathMethod:e,isOAS3:t}}),updateEmptyParamInclusion=(e,t,r,a)=>({type:ta,payload:{pathMethod:e,paramName:t,paramIn:r,includeEmptyValue:a}});function clearValidateParams(e){return{type:ia,payload:{pathMethod:e}}}function changeConsumesValue(e,t){return{type:ma,payload:{path:e,value:t,key:\"consumes_value\"}}}function changeProducesValue(e,t){return{type:ma,payload:{path:e,value:t,key:\"produces_value\"}}}const setResponse=(e,t,r)=>({payload:{path:e,method:t,res:r},type:aa}),setRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:na}),setMutatedRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:sa}),logRequest=e=>({payload:e,type:oa}),executeRequest=e=>({fn:t,specActions:r,specSelectors:a,getConfigs:n,oas3Selectors:s})=>{let{pathName:o,method:l,operation:c}=e,{requestInterceptor:i,responseInterceptor:m}=n(),p=c.toJS();if(c&&c.get(\"parameters\")&&c.get(\"parameters\").filter((e=>e&&!0===e.get(\"allowEmptyValue\"))).forEach((t=>{if(a.parameterInclusionSettingFor([o,l],t.get(\"name\"),t.get(\"in\"))){e.parameters=e.parameters||{};const r=paramToValue(t,e.parameters);(!r||r&&0===r.size)&&(e.parameters[t.get(\"name\")]=\"\")}})),e.contextUrl=de()(a.url()).toString(),p&&p.operationId?e.operationId=p.operationId:p&&o&&l&&(e.operationId=t.opId(p,o,l)),a.isOAS3()){const t=`${o}:${l}`;e.server=s.selectedServer(t)||s.selectedServer();const r=s.serverVariables({server:e.server,namespace:t}).toJS(),a=s.serverVariables({server:e.server}).toJS();e.serverVariables=Object.keys(r).length?r:a,e.requestContentType=s.requestContentType(o,l),e.responseContentType=s.responseContentType(o,l)||\"*/*\";const n=s.requestBodyValue(o,l),c=s.requestBodyInclusionSetting(o,l);n&&n.toJS?e.requestBody=n.map((e=>I.Map.isMap(e)?e.get(\"value\"):e)).filter(((e,t)=>(Array.isArray(e)?0!==e.length:!isEmptyValue(e))||c.get(t))).toJS():e.requestBody=n}let u=Object.assign({},e);u=t.buildRequest(u),r.setRequest(e.pathName,e.method,u);e.requestInterceptor=async t=>{let a=await i.apply(void 0,[t]),n=Object.assign({},a);return r.setMutatedRequest(e.pathName,e.method,n),a},e.responseInterceptor=m;const d=Date.now();return t.execute(e).then((t=>{t.duration=Date.now()-d,r.setResponse(e.pathName,e.method,t)})).catch((t=>{\"Failed to fetch\"===t.message&&(t.name=\"\",t.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),r.setResponse(e.pathName,e.method,{error:!0,err:t})}))},actions_execute=({path:e,method:t,...r}={})=>a=>{let{fn:{fetch:n},specSelectors:s,specActions:o}=a,l=s.specJsonWithResolvedSubtrees().toJS(),c=s.operationScheme(e,t),{requestContentType:i,responseContentType:m}=s.contentTypeValues([e,t]).toJS(),p=/xml/i.test(i),u=s.parameterValues([e,t],p).toJS();return o.executeRequest({...r,fetch:n,spec:l,pathName:e,method:t,parameters:u,requestContentType:i,scheme:c,responseContentType:m})};function clearResponse(e,t){return{type:la,payload:{path:e,method:t}}}function clearRequest(e,t){return{type:ca,payload:{path:e,method:t}}}function setScheme(e,t,r){return{type:da,payload:{scheme:e,path:t,method:r}}}const fa={[Yr]:(e,t)=>\"string\"==typeof t.payload?e.set(\"spec\",t.payload):e,[Qr]:(e,t)=>e.set(\"url\",t.payload+\"\"),[Zr]:(e,t)=>e.set(\"json\",fromJSOrdered(t.payload)),[pa]:(e,t)=>e.setIn([\"resolved\"],fromJSOrdered(t.payload)),[ua]:(e,t)=>{const{value:r,path:a}=t.payload;return e.setIn([\"resolvedSubtrees\",...a],fromJSOrdered(r))},[ea]:(e,{payload:t})=>{let{path:r,paramName:a,paramIn:n,param:s,value:o,isXml:l}=t,c=s?paramToIdentifier(s):`${n}.${a}`;const i=l?\"value_xml\":\"value\";return e.setIn([\"meta\",\"paths\",...r,\"parameters\",c,i],(0,I.fromJS)(o))},[ta]:(e,{payload:t})=>{let{pathMethod:r,paramName:a,paramIn:n,includeEmptyValue:s}=t;if(!a||!n)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),e;const o=`${n}.${a}`;return e.setIn([\"meta\",\"paths\",...r,\"parameter_inclusions\",o],s)},[ra]:(e,{payload:{pathMethod:t,isOAS3:r}})=>{const a=Er(e).getIn([\"paths\",...t]),n=parameterValues(e,t).toJS();return e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,I.fromJS)({}),(s=>a.get(\"parameters\",(0,I.List)()).reduce(((a,s)=>{const o=paramToValue(s,n),l=parameterInclusionSettingFor(e,t,s.get(\"name\"),s.get(\"in\")),c=((e,t,{isOAS3:r=!1,bypassRequiredCheck:a=!1}={})=>{let n=e.get(\"required\"),{schema:s,parameterContentMediaType:o}=getParameterSchema(e,{isOAS3:r});return validateValueBySchema(t,s,n,a,o)})(s,o,{bypassRequiredCheck:l,isOAS3:r});return a.setIn([paramToIdentifier(s),\"errors\"],(0,I.fromJS)(c))}),s)))},[ia]:(e,{payload:{pathMethod:t}})=>e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,I.fromJS)([]),(e=>e.map((e=>e.set(\"errors\",(0,I.fromJS)([])))))),[aa]:(e,{payload:{res:t,path:r,method:a}})=>{let n;n=t.error?Object.assign({error:!0,name:t.err.name,message:t.err.message,statusCode:t.err.statusCode},t.err.response):t,n.headers=n.headers||{};let s=e.setIn([\"responses\",r,a],fromJSOrdered(n));return U.Blob&&n.data instanceof U.Blob&&(s=s.setIn([\"responses\",r,a,\"text\"],n.data)),s},[na]:(e,{payload:{req:t,path:r,method:a}})=>e.setIn([\"requests\",r,a],fromJSOrdered(t)),[sa]:(e,{payload:{req:t,path:r,method:a}})=>e.setIn([\"mutatedRequests\",r,a],fromJSOrdered(t)),[ma]:(e,{payload:{path:t,value:r,key:a}})=>{let n=[\"paths\",...t],s=[\"meta\",\"paths\",...t];return e.getIn([\"json\",...n])||e.getIn([\"resolved\",...n])||e.getIn([\"resolvedSubtrees\",...n])?e.setIn([...s,a],(0,I.fromJS)(r)):e},[la]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"responses\",t,r]),[ca]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"requests\",t,r]),[da]:(e,{payload:{scheme:t,path:r,method:a}})=>r&&a?e.setIn([\"scheme\",r,a],t):r||a?void 0:e.setIn([\"scheme\",\"_defaultScheme\"],t)},wrap_actions_updateSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.parseToJson(...r)},wrap_actions_updateJsonSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.invalidateResolvedSubtreeCache();const[a]=r,n=Ge()(a,[\"paths\"])||{};Object.keys(n).forEach((e=>{Ge()(n,[e]).$ref&&t.requestResolvedSubtree([\"paths\",e])})),t.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(e,{specActions:t})=>r=>(t.logRequest(r),e(r)),wrap_actions_validateParams=(e,{specSelectors:t})=>r=>e(r,t.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...f},reducers:{...fa},actions:{...y},selectors:{...g}}}}),Sa=require(\"swagger-client/es/resolver/strategies/generic\");var Ea=__webpack_require__.n(Sa);const _a=require(\"swagger-client/es/resolver/strategies/openapi-2\");var va=__webpack_require__.n(_a);const wa=require(\"swagger-client/es/resolver/strategies/openapi-3-0\");var ba=__webpack_require__.n(wa);const Ca=require(\"swagger-client/es/resolver/strategies/openapi-3-1-apidom\");var xa=__webpack_require__.n(Ca);const Oa=require(\"swagger-client/es/resolver\"),Na=require(\"swagger-client/es/execute\"),ka=require(\"swagger-client/es/http\");var Aa=__webpack_require__.n(ka);const Ia=require(\"swagger-client/es/subtree-resolver\"),qa=require(\"swagger-client/es/helpers\"),configs_wrap_actions_loaded=(e,t)=>(...r)=>{e(...r);const a=t.getConfigs().withCredentials;void 0!==a&&(t.fn.fetch.withCredentials=\"string\"==typeof a?\"true\"===a:!!a)};function swagger_client({configs:e,getConfigs:t}){return{fn:{fetch:(0,ka.makeHttp)(Aa(),e.preFetch,e.postFetch),buildRequest:Na.buildRequest,execute:Na.execute,resolve:(0,Oa.makeResolve)({strategies:[xa(),ba(),va(),Ea()]}),resolveSubtree:async(e,r,a={})=>{const n=t(),s={modelPropertyMacro:n.modelPropertyMacro,parameterMacro:n.parameterMacro,requestInterceptor:n.requestInterceptor,responseInterceptor:n.responseInterceptor,strategies:[xa(),ba(),va(),Ea()]};return(0,Ia.makeResolveSubtree)(s)(e,r,a)},serializeRes:ka.serializeRes,opId:qa.opId},statePlugins:{configs:{wrapActions:{loaded:configs_wrap_actions_loaded}}}}}function util(){return{fn:{shallowEqualKeys}}}const ja=require(\"react-dom\");var Pa=__webpack_require__.n(ja);const Ma=require(\"react-redux\"),Ra=require(\"lodash/identity\");var Ta=__webpack_require__.n(Ra);const withSystem=e=>t=>{const{fn:r}=e();class WithSystem extends N.Component{render(){return k().createElement(t,rt()({},e(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${r.getDisplayName(t)})`,WithSystem},withRoot=(e,t)=>r=>{const{fn:a}=e();class WithRoot extends N.Component{render(){return k().createElement(Ma.Provider,{store:t},k().createElement(r,rt()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${a.getDisplayName(r)})`,WithRoot},withConnect=(e,t,r)=>(0,A.compose)(r?withRoot(e,r):Ta(),(0,Ma.connect)(((r,a)=>{const n={...a,...e()},s=t.prototype?.mapStateToProps||(e=>({state:e}));return s(r,n)})),withSystem(e))(t),handleProps=(e,t,r,a)=>{for(const n in t){const s=t[n];\"function\"==typeof s&&s(r[n],a[n],e())}},withMappedContainer=(e,t,r)=>(t,a)=>{const{fn:n}=e(),s=r(t,\"root\");class WithMappedContainer extends N.Component{constructor(t,r){super(t,r),handleProps(e,a,t,{})}UNSAFE_componentWillReceiveProps(t){handleProps(e,a,t,this.props)}render(){const e=qe()(this.props,a?Object.keys(a):[]);return k().createElement(s,e)}}return WithMappedContainer.displayName=`WithMappedContainer(${n.getDisplayName(s)})`,WithMappedContainer},render=(e,t,r,a)=>n=>{const s=r(e,t,a)(\"App\",\"root\"),{createRoot:o}=Pa();o(n).render(k().createElement(s,null))},getComponent=(e,t,r)=>(a,n,s={})=>{if(\"string\"!=typeof a)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof a);const o=r(a);return o?n?\"root\"===n?withConnect(e,o,t()):withConnect(e,o):o:(s.failSilently||e().log.warn(\"Could not find component:\",a),null)},getDisplayName=e=>e.displayName||e.name||\"Component\",view=({getComponents:e,getStore:t,getSystem:r})=>{const a=(n=getComponent(r,t,e),me(n,((...e)=>JSON.stringify(e))));var n;const s=(e=>utils_memoizeN(e,((...e)=>e)))(withMappedContainer(r,0,a));return{rootInjects:{getComponent:a,makeMappedContainer:s,render:render(r,t,getComponent,e)},fn:{getDisplayName}}},view_legacy=({React:e,getSystem:t,getStore:r,getComponents:a})=>{const n={},s=parseInt(e?.version,10);return s>=16&&s<18&&(n.render=((e,t,r,a)=>n=>{const s=r(e,t,a)(\"App\",\"root\");Pa().render(k().createElement(s,null),n)})(t,r,getComponent,a)),{rootInjects:n}};function downloadUrlPlugin(e){let{fn:t}=e;const r={download:e=>({errActions:r,specSelectors:a,specActions:n,getConfigs:s})=>{let{fetch:o}=t;const l=s();function next(t){if(t instanceof Error||t.status>=400)return n.updateLoadingStatus(\"failed\"),r.newThrownErr(Object.assign(new Error((t.message||t.statusText)+\" \"+e),{source:\"fetch\"})),void(!t.status&&t instanceof Error&&function checkPossibleFailReasons(){try{let t;if(\"URL\"in U?t=new URL(e):(t=document.createElement(\"a\"),t.href=e),\"https:\"!==t.protocol&&\"https:\"===U.location.protocol){const e=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${t.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void r.newThrownErr(e)}if(t.origin!==U.location.origin){const e=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${t.origin}) does not match the page (${U.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});r.newThrownErr(e)}}catch(e){return}}());n.updateLoadingStatus(\"success\"),n.updateSpec(t.text),a.url()!==e&&n.updateUrl(e)}e=e||a.url(),n.updateLoadingStatus(\"loading\"),r.clear({source:\"fetch\"}),o({url:e,loadSpec:!0,requestInterceptor:l.requestInterceptor||(e=>e),responseInterceptor:l.responseInterceptor||(e=>e),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:e=>{let t=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===t.indexOf(e)&&console.error(`Error: ${e} is not one of ${JSON.stringify(t)}`),{type:\"spec_update_loading_status\",payload:e}}};let a={loadingStatus:(0,be.createSelector)((e=>e||(0,I.Map)()),(e=>e.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:r,reducers:{spec_update_loading_status:(e,t)=>\"string\"==typeof t.payload?e.set(\"loadingStatus\",t.payload):e},selectors:a}}}}const Ja=require(\"lodash/zipObject\");var $a=__webpack_require__.n(Ja);const Ka=console.error,withErrorBoundary=e=>t=>{const{getComponent:r,fn:a}=e(),n=r(\"ErrorBoundary\"),s=a.getDisplayName(t);class WithErrorBoundary extends N.Component{render(){return k().createElement(n,{targetName:s,getComponent:r,fn:a},k().createElement(t,rt()({},this.props,this.context)))}}var o;return WithErrorBoundary.displayName=`WithErrorBoundary(${s})`,(o=t).prototype&&o.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=t.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:e})=>k().createElement(\"div\",{className:\"fallback\"},\"😱 \",k().createElement(\"i\",null,\"Could not render \",\"t\"===e?\"this component\":e,\", see the console.\"));class ErrorBoundary extends N.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:Ka},children:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}constructor(...e){super(...e),this.state={hasError:!1,error:null}}componentDidCatch(e,t){this.props.fn.componentDidCatch(e,t)}render(){const{getComponent:e,targetName:t,children:r}=this.props;if(this.state.hasError){const r=e(\"Fallback\");return k().createElement(r,{name:t})}return r}}const Da=ErrorBoundary,safe_render=({componentList:e=[],fullOverride:t=!1}={})=>({getSystem:r})=>{const a=t?e:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...e],n=$a()(a,Array(a.length).fill(((e,{fn:t})=>t.withErrorBoundary(e))));return{fn:{componentDidCatch:Ka,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:Da,Fallback:fallback},wrapComponents:n}};class App extends k().Component{getLayout(){const{getComponent:e,layoutSelectors:t}=this.props,r=t.current(),a=e(r,!0);return a||(()=>k().createElement(\"h1\",null,' No layout defined for \"',r,'\" '))}render(){const e=this.getLayout();return k().createElement(e,null)}}const Va=App;class AuthorizationPopup extends k().Component{close=()=>{let{authActions:e}=this.props;e.showDefinitions(!1)};render(){let{authSelectors:e,authActions:t,getComponent:r,errSelectors:a,specSelectors:n,fn:{AST:s={}}}=this.props,o=e.shownDefinitions();const l=r(\"auths\"),c=r(\"CloseIcon\");return k().createElement(\"div\",{className:\"dialog-ux\"},k().createElement(\"div\",{className:\"backdrop-ux\"}),k().createElement(\"div\",{className:\"modal-ux\"},k().createElement(\"div\",{className:\"modal-dialog-ux\"},k().createElement(\"div\",{className:\"modal-ux-inner\"},k().createElement(\"div\",{className:\"modal-ux-header\"},k().createElement(\"h3\",null,\"Available authorizations\"),k().createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},k().createElement(c,null))),k().createElement(\"div\",{className:\"modal-ux-content\"},o.valueSeq().map(((o,c)=>k().createElement(l,{key:c,AST:s,definitions:o,getComponent:r,errSelectors:a,authSelectors:e,authActions:t,specSelectors:n}))))))))}}class AuthorizeBtn extends k().Component{render(){let{isAuthorized:e,showPopup:t,onClick:r,getComponent:a}=this.props;const n=a(\"authorizationPopup\",!0),s=a(\"LockAuthIcon\",!0),o=a(\"UnlockAuthIcon\",!0);return k().createElement(\"div\",{className:\"auth-wrapper\"},k().createElement(\"button\",{className:e?\"btn authorize locked\":\"btn authorize unlocked\",onClick:r},k().createElement(\"span\",null,\"Authorize\"),e?k().createElement(s,null):k().createElement(o,null)),t&&k().createElement(n,null))}}class AuthorizeBtnContainer extends k().Component{render(){const{authActions:e,authSelectors:t,specSelectors:r,getComponent:a}=this.props,n=r.securityDefinitions(),s=t.definitionsToAuthorize(),o=a(\"authorizeBtn\");return n?k().createElement(o,{onClick:()=>e.showDefinitions(s),isAuthorized:!!t.authorized().size,showPopup:!!t.shownDefinitions(),getComponent:a}):null}}class AuthorizeOperationBtn extends k().Component{onClick=e=>{e.stopPropagation();let{onClick:t}=this.props;t&&t()};render(){let{isAuthorized:e,getComponent:t}=this.props;const r=t(\"LockAuthOperationIcon\",!0),a=t(\"UnlockAuthOperationIcon\",!0);return k().createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":e?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},e?k().createElement(r,{className:\"locked\"}):k().createElement(a,{className:\"unlocked\"}))}}class Auths extends k().Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,a=r.map(((e,t)=>t)).toArray();this.setState(a.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(a)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:a}=this.props;const n=t(\"AuthItem\"),s=t(\"oauth2\",!0),o=t(\"Button\");let l=r.authorized(),c=e.filter(((e,t)=>!!l.get(t))),i=e.filter((e=>\"oauth2\"!==e.get(\"type\"))),m=e.filter((e=>\"oauth2\"===e.get(\"type\")));return k().createElement(\"div\",{className:\"auth-container\"},!!i.size&&k().createElement(\"form\",{onSubmit:this.submitAuth},i.map(((e,r)=>k().createElement(n,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a}))).toArray(),k().createElement(\"div\",{className:\"auth-btn-wrapper\"},i.size===c.size?k().createElement(o,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):k().createElement(o,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),k().createElement(o,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),m&&m.size?k().createElement(\"div\",null,k().createElement(\"div\",{className:\"scope-def\"},k().createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),k().createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>k().createElement(\"div\",{key:t},k().createElement(s,{authorized:l,schema:e,name:t})))).toArray()):null)}}class auth_item_Auths extends k().Component{render(){let{schema:e,name:t,getComponent:r,onAuthChange:a,authorized:n,errSelectors:s}=this.props;const o=r(\"apiKeyAuth\"),l=r(\"basicAuth\");let c;const i=e.get(\"type\");switch(i){case\"apiKey\":c=k().createElement(o,{key:t,schema:e,name:t,errSelectors:s,authorized:n,getComponent:r,onChange:a});break;case\"basic\":c=k().createElement(l,{key:t,schema:e,name:t,errSelectors:s,authorized:n,getComponent:r,onChange:a});break;default:c=k().createElement(\"div\",{key:t},\"Unknown security definition type \",i)}return k().createElement(\"div\",{key:`${t}-jump`},c)}}class AuthError extends k().Component{render(){let{error:e}=this.props,t=e.get(\"level\"),r=e.get(\"message\"),a=e.get(\"source\");return k().createElement(\"div\",{className:\"errors\"},k().createElement(\"b\",null,a,\" \",t),k().createElement(\"span\",null,r))}}class ApiKeyAuth extends k().Component{constructor(e,t){super(e,t);let{name:r,schema:a}=this.props,n=this.getValue();this.state={name:r,schema:a,value:n}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,r=e.target.value,a=Object.assign({},this.state,{value:r});this.setState(a),t(a)};render(){let{schema:e,getComponent:t,errSelectors:r,name:a}=this.props;const n=t(\"Input\"),s=t(\"Row\"),o=t(\"Col\"),l=t(\"authError\"),c=t(\"Markdown\",!0),i=t(\"JumpToPath\",!0);let m=this.getValue(),p=r.allErrors().filter((e=>e.get(\"authId\")===a));return k().createElement(\"div\",null,k().createElement(\"h4\",null,k().createElement(\"code\",null,a||e.get(\"name\")),\" (apiKey)\",k().createElement(i,{path:[\"securityDefinitions\",a]})),m&&k().createElement(\"h6\",null,\"Authorized\"),k().createElement(s,null,k().createElement(c,{source:e.get(\"description\")})),k().createElement(s,null,k().createElement(\"p\",null,\"Name: \",k().createElement(\"code\",null,e.get(\"name\")))),k().createElement(s,null,k().createElement(\"p\",null,\"In: \",k().createElement(\"code\",null,e.get(\"in\")))),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),m?k().createElement(\"code\",null,\" ****** \"):k().createElement(o,null,k().createElement(n,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),p.valueSeq().map(((e,t)=>k().createElement(l,{error:e,key:t}))))}}class BasicAuth extends k().Component{constructor(e,t){super(e,t);let{schema:r,name:a}=this.props,n=this.getValue().username;this.state={name:a,schema:r,value:n?{username:n}:{}}}getValue(){let{authorized:e,name:t}=this.props;return e&&e.getIn([t,\"value\"])||{}}onChange=e=>{let{onChange:t}=this.props,{value:r,name:a}=e.target,n=this.state.value;n[a]=r,this.setState({value:n}),t(this.state)};render(){let{schema:e,getComponent:t,name:r,errSelectors:a}=this.props;const n=t(\"Input\"),s=t(\"Row\"),o=t(\"Col\"),l=t(\"authError\"),c=t(\"JumpToPath\",!0),i=t(\"Markdown\",!0);let m=this.getValue().username,p=a.allErrors().filter((e=>e.get(\"authId\")===r));return k().createElement(\"div\",null,k().createElement(\"h4\",null,\"Basic authorization\",k().createElement(c,{path:[\"securityDefinitions\",r]})),m&&k().createElement(\"h6\",null,\"Authorized\"),k().createElement(s,null,k().createElement(i,{source:e.get(\"description\")})),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),m?k().createElement(\"code\",null,\" \",m,\" \"):k().createElement(o,null,k().createElement(n,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),m?k().createElement(\"code\",null,\" ****** \"):k().createElement(o,null,k().createElement(n,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),p.valueSeq().map(((e,t)=>k().createElement(l,{error:e,key:t}))))}}function Example(e){const{example:t,showValue:r,getComponent:a,getConfigs:n}=e,s=a(\"Markdown\",!0),o=a(\"highlightCode\");return t?k().createElement(\"div\",{className:\"example\"},t.get(\"description\")?k().createElement(\"section\",{className:\"example__section\"},k().createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),k().createElement(\"p\",null,k().createElement(s,{source:t.get(\"description\")}))):null,r&&t.has(\"value\")?k().createElement(\"section\",{className:\"example__section\"},k().createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),k().createElement(o,{getConfigs:n,value:stringify(t.get(\"value\"))})):null):null}class ExamplesSelect extends k().PureComponent{static defaultProps={examples:q().Map({}),onSelect:(...e)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...e),currentExampleKey:null,showLabels:!0};_onSelect=(e,{isSyntheticChange:t=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(e,{isSyntheticChange:t})};_onDomSelect=e=>{if(\"function\"==typeof this.props.onSelect){const t=e.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(t,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:e,currentExampleKey:t}=this.props,r=e.get(t),a=e.keySeq().first(),n=e.get(a);return r||n||Map({})};componentDidMount(){const{onSelect:e,examples:t}=this.props;if(\"function\"==typeof e){const e=t.first(),r=t.keyOf(e);this._onSelect(r,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(e){const{currentExampleKey:t,examples:r}=e;if(r!==this.props.examples&&!r.has(t)){const e=r.first(),t=r.keyOf(e);this._onSelect(t,{isSyntheticChange:!0})}}render(){const{examples:e,currentExampleKey:t,isValueModified:r,isModifiedValueAvailable:a,showLabels:n}=this.props;return k().createElement(\"div\",{className:\"examples-select\"},n?k().createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,k().createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:a&&r?\"__MODIFIED__VALUE__\":t||\"\"},a?k().createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,e.map(((e,t)=>k().createElement(\"option\",{key:t,value:t},e.get(\"summary\")||t))).valueSeq()))}}const stringifyUnlessList=e=>I.List.isList(e)?e:stringify(e);class ExamplesSelectValueRetainer extends k().PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,I.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...e),updateValue:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...e)};constructor(e){super(e);const t=this._getCurrentExampleValue();this.state={[e.currentNamespace]:(0,I.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:t,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==t})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:e}=this.props;return(this.state[e]||(0,I.Map)()).toObject()};_setStateForCurrentNamespace=e=>{const{currentNamespace:t}=this.props;return this._setStateForNamespace(t,e)};_setStateForNamespace=(e,t)=>{const r=(this.state[e]||(0,I.Map)()).mergeDeep(t);return this.setState({[e]:r})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:e}=this.props;return this._getCurrentExampleValue()===e};_getValueForExample=(e,t)=>{const{examples:r}=t||this.props;return stringifyUnlessList((r||(0,I.Map)({})).getIn([e,\"value\"]))};_getCurrentExampleValue=e=>{const{currentKey:t}=e||this.props;return this._getValueForExample(t,e||this.props)};_onExamplesSelect=(e,{isSyntheticChange:t}={},...r)=>{const{onSelect:a,updateValue:n,currentUserInputValue:s,userHasEditedBody:o}=this.props,{lastUserEditedValue:l}=this._getStateForCurrentNamespace(),c=this._getValueForExample(e);if(\"__MODIFIED__VALUE__\"===e)return n(stringifyUnlessList(l)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof a&&a(e,{isSyntheticChange:t},...r),this._setStateForCurrentNamespace({lastDownstreamValue:c,isModifiedValueSelected:t&&o||!!s&&s!==c}),t||\"function\"==typeof n&&n(stringifyUnlessList(c))};UNSAFE_componentWillReceiveProps(e){const{currentUserInputValue:t,examples:r,onSelect:a,userHasEditedBody:n}=e,{lastUserEditedValue:s,lastDownstreamValue:o}=this._getStateForCurrentNamespace(),l=this._getValueForExample(e.currentKey,e),c=r.filter((e=>e.get(\"value\")===t||stringify(e.get(\"value\"))===t));if(c.size){let t;t=c.has(e.currentKey)?e.currentKey:c.keySeq().first(),a(t,{isSyntheticChange:!0})}else t!==this.props.currentUserInputValue&&t!==s&&t!==o&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(e.currentNamespace,{lastUserEditedValue:e.currentUserInputValue,isModifiedValueSelected:n||t!==l}))}render(){const{currentUserInputValue:e,examples:t,currentKey:r,getComponent:a,userHasEditedBody:n}=this.props,{lastDownstreamValue:s,lastUserEditedValue:o,isModifiedValueSelected:l}=this._getStateForCurrentNamespace(),c=a(\"ExamplesSelect\");return k().createElement(c,{examples:t,currentExampleKey:r,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!o&&o!==s,isValueModified:void 0!==e&&l&&e!==this._getCurrentExampleValue()||n})}}function oauth2_authorize_authorize({auth:e,authActions:t,errActions:r,configs:a,authConfigs:n={},currentServer:s}){let{schema:o,scopes:l,name:c,clientId:i}=e,m=o.get(\"flow\"),p=[];switch(m){case\"password\":return void t.authorizePassword(e);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void t.authorizeApplication(e);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":p.push(\"response_type=code\");break;case\"implicit\":p.push(\"response_type=token\")}\"string\"==typeof i&&p.push(\"client_id=\"+encodeURIComponent(i));let u=a.oauth2RedirectUrl;if(void 0===u)return void r.newAuthErr({authId:c,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});p.push(\"redirect_uri=\"+encodeURIComponent(u));let d=[];if(Array.isArray(l)?d=l:q().List.isList(l)&&(d=l.toArray()),d.length>0){let e=n.scopeSeparator||\" \";p.push(\"scope=\"+encodeURIComponent(d.join(e)))}let h=btoa(new Date);if(p.push(\"state=\"+encodeURIComponent(h)),void 0!==n.realm&&p.push(\"realm=\"+encodeURIComponent(n.realm)),(\"authorizationCode\"===m||\"authorization_code\"===m||\"accessCode\"===m)&&n.usePkceWithAuthorizationCodeGrant){const t=function generateCodeVerifier(){return b64toB64UrlEncoded(ne()(32).toString(\"base64\"))}(),r=function createCodeChallenge(e){return b64toB64UrlEncoded(oe()(\"sha256\").update(e).digest(\"base64\"))}(t);p.push(\"code_challenge=\"+r),p.push(\"code_challenge_method=S256\"),e.codeVerifier=t}let{additionalQueryStringParams:g}=n;for(let e in g)void 0!==g[e]&&p.push([e,g[e]].map(encodeURIComponent).join(\"=\"));const y=o.get(\"authorizationUrl\");let f;f=s?de()(sanitizeUrl(y),s,!0).toString():sanitizeUrl(y);let S,E=[f,p.join(\"&\")].join(-1===y.indexOf(\"?\")?\"?\":\"&\");S=\"implicit\"===m?t.preAuthorizeImplicit:n.useBasicAuthenticationWithAccessCodeGrant?t.authorizeAccessCodeWithBasicAuthentication:t.authorizeAccessCodeWithFormParams,t.authPopup(E,{auth:e,state:h,redirectUrl:u,callback:S,errCb:r.newAuthErr})}class Oauth2 extends k().Component{constructor(e,t){super(e,t);let{name:r,schema:a,authorized:n,authSelectors:s}=this.props,o=n&&n.get(r),l=s.getConfigs()||{},c=o&&o.get(\"username\")||\"\",i=o&&o.get(\"clientId\")||l.clientId||\"\",m=o&&o.get(\"clientSecret\")||l.clientSecret||\"\",p=o&&o.get(\"passwordType\")||\"basic\",u=o&&o.get(\"scopes\")||l.scopes||[];\"string\"==typeof u&&(u=u.split(l.scopeSeparator||\" \")),this.state={appName:l.appName,name:r,schema:a,scopes:u,clientId:i,clientSecret:m,username:c,password:\"\",passwordType:p}}close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};authorize=()=>{let{authActions:e,errActions:t,getConfigs:r,authSelectors:a,oas3Selectors:n}=this.props,s=r(),o=a.getConfigs();t.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:n.serverEffectiveValue(n.selectedServer()),authActions:e,errActions:t,configs:s,authConfigs:o})};onScopeChange=e=>{let{target:t}=e,{checked:r}=t,a=t.dataset.value;if(r&&-1===this.state.scopes.indexOf(a)){let e=this.state.scopes.concat([a]);this.setState({scopes:e})}else!r&&this.state.scopes.indexOf(a)>-1&&this.setState({scopes:this.state.scopes.filter((e=>e!==a))})};onInputChange=e=>{let{target:{dataset:{name:t},value:r}}=e,a={[t]:r};this.setState(a)};selectScopes=e=>{e.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=e=>{e.preventDefault();let{authActions:t,errActions:r,name:a}=this.props;r.clear({authId:a,type:\"auth\",source:\"auth\"}),t.logoutWithPersistOption([a])};render(){let{schema:e,getComponent:t,authSelectors:r,errSelectors:a,name:n,specSelectors:s}=this.props;const o=t(\"Input\"),l=t(\"Row\"),c=t(\"Col\"),i=t(\"Button\"),m=t(\"authError\"),p=t(\"JumpToPath\",!0),u=t(\"Markdown\",!0),d=t(\"InitializedInput\"),{isOAS3:h}=s;let g=h()?e.get(\"openIdConnectUrl\"):null;const y=\"implicit\",f=\"password\",S=h()?g?\"authorization_code\":\"authorizationCode\":\"accessCode\",E=h()?g?\"client_credentials\":\"clientCredentials\":\"application\";let _=!!(r.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,v=e.get(\"flow\"),w=v===S&&_?v+\" with PKCE\":v,b=e.get(\"allowedScopes\")||e.get(\"scopes\"),C=!!r.authorized().get(n),x=a.allErrors().filter((e=>e.get(\"authId\")===n)),O=!x.filter((e=>\"validation\"===e.get(\"source\"))).size,N=e.get(\"description\");return k().createElement(\"div\",null,k().createElement(\"h4\",null,n,\" (OAuth2, \",w,\") \",k().createElement(p,{path:[\"securityDefinitions\",n]})),this.state.appName?k().createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,N&&k().createElement(u,{source:e.get(\"description\")}),C&&k().createElement(\"h6\",null,\"Authorized\"),g&&k().createElement(\"p\",null,\"OpenID Connect URL: \",k().createElement(\"code\",null,g)),(v===y||v===S)&&k().createElement(\"p\",null,\"Authorization URL: \",k().createElement(\"code\",null,e.get(\"authorizationUrl\"))),(v===f||v===S||v===E)&&k().createElement(\"p\",null,\"Token URL:\",k().createElement(\"code\",null,\" \",e.get(\"tokenUrl\"))),k().createElement(\"p\",{className:\"flow\"},\"Flow: \",k().createElement(\"code\",null,w)),v!==f?null:k().createElement(l,null,k().createElement(l,null,k().createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),C?k().createElement(\"code\",null,\" \",this.state.username,\" \"):k().createElement(c,{tablet:10,desktop:10},k().createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),k().createElement(l,null,k().createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),C?k().createElement(\"code\",null,\" ****** \"):k().createElement(c,{tablet:10,desktop:10},k().createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),k().createElement(l,null,k().createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),C?k().createElement(\"code\",null,\" \",this.state.passwordType,\" \"):k().createElement(c,{tablet:10,desktop:10},k().createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},k().createElement(\"option\",{value:\"basic\"},\"Authorization header\"),k().createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(v===E||v===y||v===S||v===f)&&(!C||C&&this.state.clientId)&&k().createElement(l,null,k().createElement(\"label\",{htmlFor:`client_id_${v}`},\"client_id:\"),C?k().createElement(\"code\",null,\" ****** \"):k().createElement(c,{tablet:10,desktop:10},k().createElement(d,{id:`client_id_${v}`,type:\"text\",required:v===f,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(v===E||v===S||v===f)&&k().createElement(l,null,k().createElement(\"label\",{htmlFor:`client_secret_${v}`},\"client_secret:\"),C?k().createElement(\"code\",null,\" ****** \"):k().createElement(c,{tablet:10,desktop:10},k().createElement(d,{id:`client_secret_${v}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!C&&b&&b.size?k().createElement(\"div\",{className:\"scopes\"},k().createElement(\"h2\",null,\"Scopes:\",k().createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),k().createElement(\"a\",{onClick:this.selectScopes},\"select none\")),b.map(((e,t)=>k().createElement(l,{key:t},k().createElement(\"div\",{className:\"checkbox\"},k().createElement(o,{\"data-value\":t,id:`${t}-${v}-checkbox-${this.state.name}`,disabled:C,checked:this.state.scopes.includes(t),type:\"checkbox\",onChange:this.onScopeChange}),k().createElement(\"label\",{htmlFor:`${t}-${v}-checkbox-${this.state.name}`},k().createElement(\"span\",{className:\"item\"}),k().createElement(\"div\",{className:\"text\"},k().createElement(\"p\",{className:\"name\"},t),k().createElement(\"p\",{className:\"description\"},e))))))).toArray()):null,x.valueSeq().map(((e,t)=>k().createElement(m,{error:e,key:t}))),k().createElement(\"div\",{className:\"auth-btn-wrapper\"},O&&(C?k().createElement(i,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):k().createElement(i,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),k().createElement(i,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends N.Component{onClick=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearResponse(t,r),e.clearRequest(t,r)};render(){return k().createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const Headers=({headers:e})=>k().createElement(\"div\",null,k().createElement(\"h5\",null,\"Response headers\"),k().createElement(\"pre\",{className:\"microlight\"},e)),Duration=({duration:e})=>k().createElement(\"div\",null,k().createElement(\"h5\",null,\"Request duration\"),k().createElement(\"pre\",{className:\"microlight\"},e,\" ms\"));class LiveResponse extends k().Component{shouldComponentUpdate(e){return this.props.response!==e.response||this.props.path!==e.path||this.props.method!==e.method||this.props.displayRequestDuration!==e.displayRequestDuration}render(){const{response:e,getComponent:t,getConfigs:r,displayRequestDuration:a,specSelectors:n,path:s,method:o}=this.props,{showMutatedRequest:l,requestSnippetsEnabled:c}=r(),i=l?n.mutatedRequestFor(s,o):n.requestFor(s,o),m=e.get(\"status\"),p=i.get(\"url\"),u=e.get(\"headers\").toJS(),d=e.get(\"notDocumented\"),h=e.get(\"error\"),g=e.get(\"text\"),y=e.get(\"duration\"),f=Object.keys(u),S=u[\"content-type\"]||u[\"Content-Type\"],E=t(\"responseBody\"),_=f.map((e=>{var t=Array.isArray(u[e])?u[e].join():u[e];return k().createElement(\"span\",{className:\"headerline\",key:e},\" \",e,\": \",t,\" \")})),v=0!==_.length,w=t(\"Markdown\",!0),b=t(\"RequestSnippets\",!0),C=t(\"curl\");return k().createElement(\"div\",null,i&&(!0===c||\"true\"===c?k().createElement(b,{request:i}):k().createElement(C,{request:i,getConfigs:r})),p&&k().createElement(\"div\",null,k().createElement(\"div\",{className:\"request-url\"},k().createElement(\"h4\",null,\"Request URL\"),k().createElement(\"pre\",{className:\"microlight\"},p))),k().createElement(\"h4\",null,\"Server response\"),k().createElement(\"table\",{className:\"responses-table live-responses-table\"},k().createElement(\"thead\",null,k().createElement(\"tr\",{className:\"responses-header\"},k().createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),k().createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),k().createElement(\"tbody\",null,k().createElement(\"tr\",{className:\"response\"},k().createElement(\"td\",{className:\"response-col_status\"},m,d?k().createElement(\"div\",{className:\"response-undocumented\"},k().createElement(\"i\",null,\" Undocumented \")):null),k().createElement(\"td\",{className:\"response-col_description\"},h?k().createElement(w,{source:`${\"\"!==e.get(\"name\")?`${e.get(\"name\")}: `:\"\"}${e.get(\"message\")}`}):null,g?k().createElement(E,{content:g,contentType:S,url:p,headers:u,getConfigs:r,getComponent:t}):null,v?k().createElement(Headers,{headers:_}):null,a&&y?k().createElement(Duration,{duration:y}):null)))))}}class OnlineValidatorBadge extends k().Component{constructor(e,t){super(e,t);let{getConfigs:r}=e,{validatorUrl:a}=r();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===a?\"https://validator.swagger.io/validator\":a}}getDefinitionUrl=()=>{let{specSelectors:e}=this.props;return new(de())(e.url(),U.location).toString()};UNSAFE_componentWillReceiveProps(e){let{getConfigs:t}=e,{validatorUrl:r}=t();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===r?\"https://validator.swagger.io/validator\":r})}render(){let{getConfigs:e}=this.props,{spec:t}=e(),r=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof t&&Object.keys(t).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?k().createElement(\"span\",{className:\"float-right\"},k().createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${r}/debug?url=${encodeURIComponent(this.state.url)}`},k().createElement(ValidatorImage,{src:`${r}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends k().Component{constructor(e){super(e),this.state={loaded:!1,error:!1}}componentDidMount(){const e=new Image;e.onload=()=>{this.setState({loaded:!0})},e.onerror=()=>{this.setState({error:!0})},e.src=this.props.src}UNSAFE_componentWillReceiveProps(e){if(e.src!==this.props.src){const t=new Image;t.onload=()=>{this.setState({loaded:!0})},t.onerror=()=>{this.setState({error:!0})},t.src=e.src}}render(){return this.state.error?k().createElement(\"img\",{alt:\"Error\"}):this.state.loaded?k().createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends k().Component{render(){let{specSelectors:e}=this.props;const t=e.taggedOperations();return 0===t.size?k().createElement(\"h3\",null,\" No operations defined in spec!\"):k().createElement(\"div\",null,t.map(this.renderOperationTag).toArray(),t.size<1?k().createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(e,t)=>{const{specSelectors:r,getComponent:a,oas3Selectors:n,layoutSelectors:s,layoutActions:o,getConfigs:l}=this.props,c=r.validOperationMethods(),i=a(\"OperationContainer\",!0),m=a(\"OperationTag\"),p=e.get(\"operations\");return k().createElement(m,{key:\"operation-\"+t,tagObj:e,tag:t,oas3Selectors:n,layoutSelectors:s,layoutActions:o,getConfigs:l,getComponent:a,specUrl:r.url()},k().createElement(\"div\",{className:\"operation-tag-content\"},p.map((e=>{const r=e.get(\"path\"),a=e.get(\"method\"),n=q().List([\"paths\",r,a]);return-1===c.indexOf(a)?null:k().createElement(i,{key:`${r}-${a}`,specPath:n,op:e,path:r,method:a,tag:t})})).toArray()))}}function isAbsoluteUrl(e){return e.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(e,t){return e?isAbsoluteUrl(e)?function addProtocol(e){return e.match(/^\\/\\//i)?`${window.location.protocol}${e}`:e}(e):new URL(e,t).href:t}function safeBuildUrl(e,t,{selectedServer:r=\"\"}={}){try{return function buildUrl(e,t,{selectedServer:r=\"\"}={}){if(!e)return;if(isAbsoluteUrl(e))return e;const a=buildBaseUrl(r,t);return isAbsoluteUrl(a)?new URL(e,a).href:new URL(e,window.location.href).href}(e,t,{selectedServer:r})}catch{return}}class OperationTag extends k().Component{static defaultProps={tagObj:q().fromJS({}),tag:\"\"};render(){const{tagObj:e,tag:t,children:r,oas3Selectors:a,layoutSelectors:n,layoutActions:s,getConfigs:o,getComponent:l,specUrl:c}=this.props;let{docExpansion:i,deepLinking:m}=o();const p=m&&\"false\"!==m,u=l(\"Collapse\"),d=l(\"Markdown\",!0),h=l(\"DeepLink\"),g=l(\"Link\"),y=l(\"ArrowUpIcon\"),f=l(\"ArrowDownIcon\");let S,E=e.getIn([\"tagDetails\",\"description\"],null),_=e.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),v=e.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);S=isFunc(a)&&isFunc(a.selectedServer)?safeBuildUrl(v,c,{selectedServer:a.selectedServer()}):v;let w=[\"operations-tag\",t],b=n.isShown(w,\"full\"===i||\"list\"===i);return k().createElement(\"div\",{className:b?\"opblock-tag-section is-open\":\"opblock-tag-section\"},k().createElement(\"h3\",{onClick:()=>s.show(w,!b),className:E?\"opblock-tag\":\"opblock-tag no-desc\",id:w.map((e=>escapeDeepLinkPath(e))).join(\"-\"),\"data-tag\":t,\"data-is-open\":b},k().createElement(h,{enabled:p,isShown:b,path:createDeepLinkPath(t),text:t}),E?k().createElement(\"small\",null,k().createElement(d,{source:E})):k().createElement(\"small\",null),S?k().createElement(\"div\",{className:\"info__externaldocs\"},k().createElement(\"small\",null,k().createElement(g,{href:sanitizeUrl(S),onClick:e=>e.stopPropagation(),target:\"_blank\"},_||S))):null,k().createElement(\"button\",{\"aria-expanded\":b,className:\"expand-operation\",title:b?\"Collapse operation\":\"Expand operation\",onClick:()=>s.show(w,!b)},b?k().createElement(y,{className:\"arrow\"}):k().createElement(f,{className:\"arrow\"}))),k().createElement(u,{isOpened:b},r))}}var La;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_extends.apply(this,arguments)}const rolling_load=e=>N.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},e),La||(La=N.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},N.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"}))));class Operation extends N.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,I.List)(),summary:\"\"};render(){let{specPath:e,response:t,request:r,toggleShown:a,onTryoutClick:n,onResetClick:s,onCancelClick:o,onExecute:l,fn:c,getComponent:i,getConfigs:m,specActions:p,specSelectors:u,authActions:d,authSelectors:h,oas3Actions:g,oas3Selectors:y}=this.props,f=this.props.operation,{deprecated:S,isShown:E,path:_,method:v,op:w,tag:b,operationId:C,allowTryItOut:x,displayRequestDuration:O,tryItOutEnabled:N,executeInProgress:A}=f.toJS(),{description:I,externalDocs:j,schemes:P}=w;const M=j?safeBuildUrl(j.url,u.url(),{selectedServer:y.selectedServer()}):\"\";let R=f.getIn([\"op\"]),T=R.get(\"responses\"),J=function getList(e,t){if(!q().Iterable.isIterable(e))return q().List();let r=e.getIn(Array.isArray(t)?t:[t]);return q().List.isList(r)?r:q().List()}(R,[\"parameters\"]),$=u.operationScheme(_,v),K=[\"operations\",b,C],D=getExtensions(R);const V=i(\"responses\"),L=i(\"parameters\"),U=i(\"execute\"),z=i(\"clear\"),B=i(\"Collapse\"),F=i(\"Markdown\",!0),W=i(\"schemes\"),H=i(\"OperationServers\"),X=i(\"OperationExt\"),G=i(\"OperationSummary\"),Y=i(\"Link\"),{showExtensions:Q}=m();if(T&&t&&t.size>0){let e=!T.get(String(t.get(\"status\")))&&!T.get(\"default\");t=t.set(\"notDocumented\",e)}let Z=[_,v];const ee=u.validationErrors([_,v]);return k().createElement(\"div\",{className:S?\"opblock opblock-deprecated\":E?`opblock opblock-${v} is-open`:`opblock opblock-${v}`,id:escapeDeepLinkPath(K.join(\"-\"))},k().createElement(G,{operationProps:f,isShown:E,toggleShown:a,getComponent:i,authActions:d,authSelectors:h,specPath:e}),k().createElement(B,{isOpened:E},k().createElement(\"div\",{className:\"opblock-body\"},R&&R.size||null===R?null:k().createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),S&&k().createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),I&&k().createElement(\"div\",{className:\"opblock-description-wrapper\"},k().createElement(\"div\",{className:\"opblock-description\"},k().createElement(F,{source:I}))),M?k().createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},k().createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),k().createElement(\"div\",{className:\"opblock-external-docs\"},j.description&&k().createElement(\"span\",{className:\"opblock-external-docs__description\"},k().createElement(F,{source:j.description})),k().createElement(Y,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(M)},M))):null,R&&R.size?k().createElement(L,{parameters:J,specPath:e.push(\"parameters\"),operation:R,onChangeKey:Z,onTryoutClick:n,onResetClick:s,onCancelClick:o,tryItOutEnabled:N,allowTryItOut:x,fn:c,getComponent:i,specActions:p,specSelectors:u,pathMethod:[_,v],getConfigs:m,oas3Actions:g,oas3Selectors:y}):null,N?k().createElement(H,{getComponent:i,path:_,method:v,operationServers:R.get(\"servers\"),pathServers:u.paths().getIn([_,\"servers\"]),getSelectedServer:y.selectedServer,setSelectedServer:g.setSelectedServer,setServerVariableValue:g.setServerVariableValue,getServerVariable:y.serverVariableValue,getEffectiveServerValue:y.serverEffectiveValue}):null,N&&x&&P&&P.size?k().createElement(\"div\",{className:\"opblock-schemes\"},k().createElement(W,{schemes:P,path:_,method:v,specActions:p,currentScheme:$})):null,!N||!x||ee.length<=0?null:k().createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",k().createElement(\"ul\",null,ee.map(((e,t)=>k().createElement(\"li\",{key:t},\" \",e,\" \"))))),k().createElement(\"div\",{className:N&&t&&x?\"btn-group\":\"execute-wrapper\"},N&&x?k().createElement(U,{operation:R,specActions:p,specSelectors:u,oas3Selectors:y,oas3Actions:g,path:_,method:v,onExecute:l,disabled:A}):null,N&&t&&x?k().createElement(z,{specActions:p,path:_,method:v}):null),A?k().createElement(\"div\",{className:\"loading-container\"},k().createElement(\"div\",{className:\"loading\"})):null,T?k().createElement(V,{responses:T,request:r,tryItOutResponse:t,getComponent:i,getConfigs:m,specSelectors:u,oas3Actions:g,oas3Selectors:y,specActions:p,produces:u.producesOptionsFor([_,v]),producesValue:u.currentProducesFor([_,v]),specPath:e.push(\"responses\"),path:_,method:v,displayRequestDuration:O,fn:c}):null,Q&&D.size?k().createElement(X,{extensions:D,getComponent:i}):null)))}}class OperationContainer extends N.PureComponent{constructor(e,t){super(e,t);const{tryItOutEnabled:r}=e.getConfigs();this.state={tryItOutEnabled:!0===r||\"true\"===r,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(e,t){const{op:r,layoutSelectors:a,getConfigs:n}=t,{docExpansion:s,deepLinking:o,displayOperationId:l,displayRequestDuration:c,supportedSubmitMethods:i}=n(),m=a.showSummary(),p=r.getIn([\"operation\",\"__originalOperationId\"])||r.getIn([\"operation\",\"operationId\"])||(0,qa.opId)(r.get(\"operation\"),t.path,t.method)||r.get(\"id\"),u=[\"operations\",t.tag,p],d=o&&\"false\"!==o,h=i.indexOf(t.method)>=0&&(void 0===t.allowTryItOut?t.specSelectors.allowTryItOutFor(t.path,t.method):t.allowTryItOut),g=r.getIn([\"operation\",\"security\"])||t.specSelectors.security();return{operationId:p,isDeepLinkingEnabled:d,showSummary:m,displayOperationId:l,displayRequestDuration:c,allowTryItOut:h,security:g,isAuthorized:t.authSelectors.isAuthorized(g),isShown:a.isShown(u,\"full\"===s),jumpToKey:`paths.${t.path}.${t.method}`,response:t.specSelectors.responseFor(t.path,t.method),request:t.specSelectors.requestFor(t.path,t.method)}}componentDidMount(){const{isShown:e}=this.props,t=this.getResolvedSubtree();e&&void 0===t&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(e){const{response:t,isShown:r}=e,a=this.getResolvedSubtree();t!==this.props.response&&this.setState({executeInProgress:!1}),r&&void 0===a&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:e,tag:t,operationId:r,isShown:a}=this.props;const n=this.getResolvedSubtree();a||void 0!==n||this.requestResolvedSubtree(),e.show([\"operations\",t,r],!a)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=e=>{const t=this.props.oas3Selectors.selectDefaultRequestBodyValue(...e);this.props.oas3Actions.setRequestBodyValue({value:t,pathMethod:e})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:e,path:t,method:r,specPath:a}=this.props;return a?e.specResolvedSubtree(a.toJS()):e.specResolvedSubtree([\"paths\",t,r])};requestResolvedSubtree=()=>{const{specActions:e,path:t,method:r,specPath:a}=this.props;return a?e.requestResolvedSubtree(a.toJS()):e.requestResolvedSubtree([\"paths\",t,r])};render(){let{op:e,tag:t,path:r,method:a,security:n,isAuthorized:s,operationId:o,showSummary:l,isShown:c,jumpToKey:i,allowTryItOut:m,response:p,request:u,displayOperationId:d,displayRequestDuration:h,isDeepLinkingEnabled:g,specPath:y,specSelectors:f,specActions:S,getComponent:E,getConfigs:_,layoutSelectors:v,layoutActions:w,authActions:b,authSelectors:C,oas3Actions:x,oas3Selectors:O,fn:N}=this.props;const A=E(\"operation\"),q=this.getResolvedSubtree()||(0,I.Map)(),j=(0,I.fromJS)({op:q,tag:t,path:r,summary:e.getIn([\"operation\",\"summary\"])||\"\",deprecated:q.get(\"deprecated\")||e.getIn([\"operation\",\"deprecated\"])||!1,method:a,security:n,isAuthorized:s,operationId:o,originalOperationId:q.getIn([\"operation\",\"__originalOperationId\"]),showSummary:l,isShown:c,jumpToKey:i,allowTryItOut:m,request:u,displayOperationId:d,displayRequestDuration:h,isDeepLinkingEnabled:g,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return k().createElement(A,{operation:j,response:p,request:u,isShown:c,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:y,specActions:S,specSelectors:f,oas3Actions:x,oas3Selectors:O,layoutActions:w,layoutSelectors:v,authActions:b,authSelectors:C,getComponent:E,getConfigs:_,fn:N})}}const Ua=require(\"lodash/toString\");var za=__webpack_require__.n(Ua);class OperationSummary extends N.PureComponent{static defaultProps={operationProps:null,specPath:(0,I.List)(),summary:\"\"};render(){let{isShown:e,toggleShown:t,getComponent:r,authActions:a,authSelectors:n,operationProps:s,specPath:o}=this.props,{summary:l,isAuthorized:c,method:i,op:m,showSummary:p,path:u,operationId:d,originalOperationId:h,displayOperationId:g}=s.toJS(),{summary:y}=m,f=s.get(\"security\");const S=r(\"authorizeOperationBtn\",!0),E=r(\"OperationSummaryMethod\"),_=r(\"OperationSummaryPath\"),v=r(\"JumpToPath\",!0),w=r(\"CopyToClipboardBtn\",!0),b=r(\"ArrowUpIcon\"),C=r(\"ArrowDownIcon\"),x=f&&!!f.count(),O=x&&1===f.size&&f.first().isEmpty(),N=!x||O;return k().createElement(\"div\",{className:`opblock-summary opblock-summary-${i}`},k().createElement(\"button\",{\"aria-expanded\":e,className:\"opblock-summary-control\",onClick:t},k().createElement(E,{method:i}),k().createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},k().createElement(_,{getComponent:r,operationProps:s,specPath:o}),p?k().createElement(\"div\",{className:\"opblock-summary-description\"},za()(y||l)):null),g&&(h||d)?k().createElement(\"span\",{className:\"opblock-summary-operation-id\"},h||d):null),k().createElement(w,{textToCopy:`${o.get(1)}`}),N?null:k().createElement(S,{isAuthorized:c,onClick:()=>{const e=n.definitionsForRequirements(f);a.showDefinitions(e)}}),k().createElement(v,{path:o}),k().createElement(\"button\",{\"aria-label\":`${i} ${u.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":e,tabIndex:\"-1\",onClick:t},e?k().createElement(b,{className:\"arrow\"}):k().createElement(C,{className:\"arrow\"})))}}class OperationSummaryMethod extends N.PureComponent{static defaultProps={operationProps:null};render(){let{method:e}=this.props;return k().createElement(\"span\",{className:\"opblock-summary-method\"},e.toUpperCase())}}class OperationSummaryPath extends N.PureComponent{render(){let{getComponent:e,operationProps:t}=this.props,{deprecated:r,isShown:a,path:n,tag:s,operationId:o,isDeepLinkingEnabled:l}=t.toJS();const c=n.split(/(?=\\/)/g);for(let e=1;e<c.length;e+=2)c.splice(e,0,k().createElement(\"wbr\",{key:e}));const i=e(\"DeepLink\");return k().createElement(\"span\",{className:r?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":n},k().createElement(i,{enabled:l,isShown:a,path:createDeepLinkPath(`${s}/${o}`),text:c}))}}const operation_extensions=({extensions:e,getComponent:t})=>{let r=t(\"OperationExtRow\");return k().createElement(\"div\",{className:\"opblock-section\"},k().createElement(\"div\",{className:\"opblock-section-header\"},k().createElement(\"h4\",null,\"Extensions\")),k().createElement(\"div\",{className:\"table-container\"},k().createElement(\"table\",null,k().createElement(\"thead\",null,k().createElement(\"tr\",null,k().createElement(\"td\",{className:\"col_header\"},\"Field\"),k().createElement(\"td\",{className:\"col_header\"},\"Value\"))),k().createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>k().createElement(r,{key:`${e}-${t}`,xKey:e,xVal:t})))))))},operation_extension_row=({xKey:e,xVal:t})=>{const r=t?t.toJS?t.toJS():t:null;return k().createElement(\"tr\",null,k().createElement(\"td\",null,e),k().createElement(\"td\",null,JSON.stringify(r)))},Ba=require(\"classnames\");var Fa=__webpack_require__.n(Ba);const Wa=require(\"js-file-download\");var Ha=__webpack_require__.n(Wa);const highlight_code=({value:e,fileName:t=\"response.txt\",className:r,downloadable:a,getConfigs:n,canCopy:s,language:o})=>{const l=ee()(n)?n():null,c=!1!==Ge()(l,\"syntaxHighlight\")&&Ge()(l,\"syntaxHighlight.activated\",!0),i=(0,N.useRef)(null);(0,N.useEffect)((()=>{const e=Array.from(i.current.childNodes).filter((e=>!!e.nodeType&&e.classList.contains(\"microlight\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e,r,o]);const handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:a,offsetHeight:n,scrollTop:s}=t;a>n&&(0===s&&r<0||n+s>=a&&r>0)&&e.preventDefault()};return k().createElement(\"div\",{className:\"highlight-code\",ref:i},s&&k().createElement(\"div\",{className:\"copy-to-clipboard\"},k().createElement(dt.CopyToClipboard,{text:e},k().createElement(\"button\",null))),a?k().createElement(\"button\",{className:\"download-contents\",onClick:()=>{Ha()(e,t)}},\"Download\"):null,c?k().createElement(gt(),{language:o,className:Fa()(r,\"microlight\"),style:getStyle(Ge()(l,\"syntaxHighlight.theme\",\"agate\"))},e):k().createElement(\"pre\",{className:Fa()(r,\"microlight\")},e))};function createHtmlReadyId(e,t=\"_\"){return e.replace(/[^\\w-]/g,t)}class Responses extends k().Component{static defaultProps={tryItOutResponse:null,produces:(0,I.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);onResponseContentTypeChange=({controlsAcceptHeader:e,value:t})=>{const{oas3Actions:r,path:a,method:n}=this.props;e&&r.setResponseContentType({value:t,path:a,method:n})};render(){let{responses:e,tryItOutResponse:t,getComponent:r,getConfigs:a,specSelectors:n,fn:s,producesValue:o,displayRequestDuration:l,specPath:c,path:i,method:m,oas3Selectors:p,oas3Actions:u}=this.props,d=function defaultStatusCode(e){let t=e.keySeq();return t.contains(ie)?ie:t.filter((e=>\"2\"===(e+\"\")[0])).sort().first()}(e);const h=r(\"contentType\"),g=r(\"liveResponse\"),y=r(\"response\");let f=this.props.produces&&this.props.produces.size?this.props.produces:Responses.defaultProps.produces;const S=n.isOAS3()?function getAcceptControllingResponse(e){if(!q().OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;const t=e.find(((e,t)=>t.startsWith(\"2\")&&Object.keys(e.get(\"content\")||{}).length>0)),r=e.get(\"default\")||q().OrderedMap(),a=(r.get(\"content\")||q().OrderedMap()).keySeq().toJS().length?r:null;return t||a}(e):null,E=createHtmlReadyId(`${m}${i}_responses`),_=`${E}_select`;return k().createElement(\"div\",{className:\"responses-wrapper\"},k().createElement(\"div\",{className:\"opblock-section-header\"},k().createElement(\"h4\",null,\"Responses\"),n.isOAS3()?null:k().createElement(\"label\",{htmlFor:_},k().createElement(\"span\",null,\"Response content type\"),k().createElement(h,{value:o,ariaControls:E,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:f,controlId:_,onChange:this.onChangeProducesWrapper}))),k().createElement(\"div\",{className:\"responses-inner\"},t?k().createElement(\"div\",null,k().createElement(g,{response:t,getComponent:r,getConfigs:a,specSelectors:n,path:this.props.path,method:this.props.method,displayRequestDuration:l}),k().createElement(\"h4\",null,\"Responses\")):null,k().createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:E,role:\"region\"},k().createElement(\"thead\",null,k().createElement(\"tr\",{className:\"responses-header\"},k().createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),k().createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),n.isOAS3()?k().createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),k().createElement(\"tbody\",null,e.entrySeq().map((([e,l])=>{let h=t&&t.get(\"status\")==e?\"response_current\":\"\";return k().createElement(y,{key:e,path:i,method:m,specPath:c.push(e),isDefault:d===e,fn:s,className:h,code:e,response:l,specSelectors:n,controlsAcceptHeader:l===S,onContentTypeChange:this.onResponseContentTypeChange,contentType:o,getConfigs:a,activeExamplesKey:p.activeExamplesMember(i,m,\"responses\",e),oas3Actions:u,getComponent:r})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(e){return function canJsonParse(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?\"json\":null}class Response extends k().Component{constructor(e,t){super(e,t),this.state={responseContentType:\"\"}}static defaultProps={response:(0,I.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=e=>{const{onContentTypeChange:t,controlsAcceptHeader:r}=this.props;this.setState({responseContentType:e}),t({value:e,controlsAcceptHeader:r})};getTargetExamplesKey=()=>{const{response:e,contentType:t,activeExamplesKey:r}=this.props,a=this.state.responseContentType||t,n=e.getIn([\"content\",a],(0,I.Map)({})).get(\"examples\",null).keySeq().first();return r||n};render(){let{path:e,method:t,code:r,response:a,className:n,specPath:s,fn:o,getComponent:l,getConfigs:c,specSelectors:i,contentType:m,controlsAcceptHeader:p,oas3Actions:u}=this.props,{inferSchema:d,getSampleSchema:h}=o,g=i.isOAS3();const{showExtensions:y}=c();let f=y?getExtensions(a):null,S=a.get(\"headers\"),E=a.get(\"links\");const _=l(\"ResponseExtension\"),v=l(\"headers\"),w=l(\"highlightCode\"),b=l(\"modelExample\"),C=l(\"Markdown\",!0),x=l(\"operationLink\"),O=l(\"contentType\"),N=l(\"ExamplesSelect\"),A=l(\"Example\");var q,j;const P=this.state.responseContentType||m,M=a.getIn([\"content\",P],(0,I.Map)({})),R=M.get(\"examples\",null);if(g){const e=M.get(\"schema\");q=e?d(e.toJS()):null,j=e?(0,I.List)([\"content\",this.state.responseContentType,\"schema\"]):s}else q=a.get(\"schema\"),j=a.has(\"schema\")?s.push(\"schema\"):s;let T,J,$=!1,K={includeReadOnly:!0};if(g)if(J=M.get(\"schema\")?.toJS(),R){const e=this.getTargetExamplesKey(),getMediaTypeExample=e=>e.get(\"value\");T=getMediaTypeExample(R.get(e,(0,I.Map)({}))),void 0===T&&(T=getMediaTypeExample(R.values().next().value)),$=!0}else void 0!==M.get(\"example\")&&(T=M.get(\"example\"),$=!0);else{J=q,K={...K,includeWriteOnly:!0};const e=a.getIn([\"examples\",P]);e&&(T=e,$=!0)}const D=((e,t,r)=>{if(null==e)return null;const a=getKnownSyntaxHighlighterLanguage(e)?\"json\":null;return k().createElement(\"div\",null,k().createElement(t,{className:\"example\",getConfigs:r,language:a,value:stringify(e)}))})(h(J,P,K,$?T:void 0),w,c);return k().createElement(\"tr\",{className:\"response \"+(n||\"\"),\"data-code\":r},k().createElement(\"td\",{className:\"response-col_status\"},r),k().createElement(\"td\",{className:\"response-col_description\"},k().createElement(\"div\",{className:\"response-col_description__inner\"},k().createElement(C,{source:a.get(\"description\")})),y&&f.size?f.entrySeq().map((([e,t])=>k().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,g&&a.get(\"content\")?k().createElement(\"section\",{className:\"response-controls\"},k().createElement(\"div\",{className:Fa()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":p})},k().createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),k().createElement(O,{value:this.state.responseContentType,contentTypes:a.get(\"content\")?a.get(\"content\").keySeq():(0,I.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),p?k().createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",k().createElement(\"code\",null,\"Accept\"),\" header.\"):null),R?k().createElement(\"div\",{className:\"response-control-examples\"},k().createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),k().createElement(N,{examples:R,currentExampleKey:this.getTargetExamplesKey(),onSelect:a=>u.setActiveExamplesMember({name:a,pathMethod:[e,t],contextType:\"responses\",contextName:r}),showLabels:!1})):null):null,D||q?k().createElement(b,{specPath:j,getComponent:l,getConfigs:c,specSelectors:i,schema:fromJSOrdered(q),example:D,includeReadOnly:!0}):null,g&&R?k().createElement(A,{example:R.get(this.getTargetExamplesKey(),(0,I.Map)({})),getComponent:l,getConfigs:c,omitValue:!0}):null,S?k().createElement(v,{headers:S,getComponent:l}):null),g?k().createElement(\"td\",{className:\"response-col_links\"},E?E.toSeq().entrySeq().map((([e,t])=>k().createElement(x,{key:e,name:e,link:t,getComponent:l}))):k().createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:e,xVal:t})=>k().createElement(\"div\",{className:\"response__extension\"},e,\": \",String(t)),Xa=require(\"xml-but-prettier\");var Ga=__webpack_require__.n(Xa);const Ya=require(\"lodash/toLower\");var Qa=__webpack_require__.n(Ya);class ResponseBody extends k().PureComponent{state={parsedContent:null};updateParsedContent=e=>{const{content:t}=this.props;if(e!==t)if(t&&t instanceof Blob){var r=new FileReader;r.onload=()=>{this.setState({parsedContent:r.result})},r.readAsText(t)}else this.setState({parsedContent:t.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(e){this.updateParsedContent(e.content)}render(){let{content:e,contentType:t,url:r,headers:a={},getConfigs:n,getComponent:s}=this.props;const{parsedContent:o}=this.state,l=s(\"highlightCode\"),c=\"response_\"+(new Date).getTime();let i,m;if(r=r||\"\",(/^application\\/octet-stream/i.test(t)||a[\"Content-Disposition\"]&&/attachment/i.test(a[\"Content-Disposition\"])||a[\"content-disposition\"]&&/attachment/i.test(a[\"content-disposition\"])||a[\"Content-Description\"]&&/File Transfer/i.test(a[\"Content-Description\"])||a[\"content-description\"]&&/File Transfer/i.test(a[\"content-description\"]))&&(e.size>0||e.length>0))if(\"Blob\"in window){let n=t||\"text/html\",s=e instanceof Blob?e:new Blob([e],{type:n}),o=window.URL.createObjectURL(s),l=[n,r.substr(r.lastIndexOf(\"/\")+1),o].join(\":\"),c=a[\"content-disposition\"]||a[\"Content-Disposition\"];if(void 0!==c){let e=function extractFileNameFromContentDispositionHeader(e){let t;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((r=>(t=r.exec(e),null!==t))),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}(c);null!==e&&(l=e)}m=U.navigator&&U.navigator.msSaveOrOpenBlob?k().createElement(\"div\",null,k().createElement(\"a\",{href:o,onClick:()=>U.navigator.msSaveOrOpenBlob(s,l)},\"Download file\")):k().createElement(\"div\",null,k().createElement(\"a\",{href:o,download:l},\"Download file\"))}else m=k().createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(t)){let t=null;getKnownSyntaxHighlighterLanguage(e)&&(t=\"json\");try{i=JSON.stringify(JSON.parse(e),null,\"  \")}catch(t){i=\"can't parse JSON.  Raw result:\\n\\n\"+e}m=k().createElement(l,{language:t,downloadable:!0,fileName:`${c}.json`,value:i,getConfigs:n,canCopy:!0})}else/xml/i.test(t)?(i=Ga()(e,{textNodesOnSameLine:!0,indentor:\"  \"}),m=k().createElement(l,{downloadable:!0,fileName:`${c}.xml`,value:i,getConfigs:n,canCopy:!0})):m=\"text/html\"===Qa()(t)||/text\\/plain/.test(t)?k().createElement(l,{downloadable:!0,fileName:`${c}.html`,value:e,getConfigs:n,canCopy:!0}):\"text/csv\"===Qa()(t)||/text\\/csv/.test(t)?k().createElement(l,{downloadable:!0,fileName:`${c}.csv`,value:e,getConfigs:n,canCopy:!0}):/^image\\//i.test(t)?t.includes(\"svg\")?k().createElement(\"div\",null,\" \",e,\" \"):k().createElement(\"img\",{src:window.URL.createObjectURL(e)}):/^audio\\//i.test(t)?k().createElement(\"pre\",{className:\"microlight\"},k().createElement(\"audio\",{controls:!0,key:r},k().createElement(\"source\",{src:r,type:t}))):\"string\"==typeof e?k().createElement(l,{downloadable:!0,fileName:`${c}.txt`,value:e,getConfigs:n,canCopy:!0}):e.size>0?o?k().createElement(\"div\",null,k().createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),k().createElement(l,{downloadable:!0,fileName:`${c}.txt`,value:o,getConfigs:n,canCopy:!0})):k().createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return m?k().createElement(\"div\",null,k().createElement(\"h5\",null,\"Response body\"),m):null}}class Parameters extends N.Component{constructor(e){super(e),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(e,t,r)=>{let{specActions:{changeParamByIdentity:a},onChangeKey:n}=this.props;a(n,e,t,r)};onChangeConsumesWrapper=e=>{let{specActions:{changeConsumesValue:t},onChangeKey:r}=this.props;t(r,e)};toggleTab=e=>\"parameters\"===e?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===e?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:e,pathMethod:t})=>{let{specActions:r,oas3Selectors:a,oas3Actions:n}=this.props;const s=a.hasUserEditedBody(...t),o=a.shouldRetainRequestBodyValue(...t);n.setRequestContentType({value:e,pathMethod:t}),n.initRequestBodyValidateError({pathMethod:t}),s||(o||n.setRequestBodyValue({value:void 0,pathMethod:t}),r.clearResponse(...t),r.clearRequest(...t),r.clearValidateParams(t))};render(){let{onTryoutClick:e,onResetClick:t,parameters:r,allowTryItOut:a,tryItOutEnabled:n,specPath:s,fn:o,getComponent:l,getConfigs:c,specSelectors:i,specActions:m,pathMethod:p,oas3Actions:u,oas3Selectors:d,operation:h}=this.props;const g=l(\"parameterRow\"),y=l(\"TryItOutButton\"),f=l(\"contentType\"),S=l(\"Callbacks\",!0),E=l(\"RequestBody\",!0),_=n&&a,v=i.isOAS3(),w=`${createHtmlReadyId(`${p[1]}${p[0]}_requests`)}_select`,b=h.get(\"requestBody\"),C=Object.values(r.reduce(((e,t)=>{const r=t.get(\"in\");return e[r]??=[],e[r].push(t),e}),{})).reduce(((e,t)=>e.concat(t)),[]);return k().createElement(\"div\",{className:\"opblock-section\"},k().createElement(\"div\",{className:\"opblock-section-header\"},v?k().createElement(\"div\",{className:\"tab-header\"},k().createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},k().createElement(\"h4\",{className:\"opblock-title\"},k().createElement(\"span\",null,\"Parameters\"))),h.get(\"callbacks\")?k().createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},k().createElement(\"h4\",{className:\"opblock-title\"},k().createElement(\"span\",null,\"Callbacks\"))):null):k().createElement(\"div\",{className:\"tab-header\"},k().createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),a?k().createElement(y,{isOAS3:i.isOAS3(),hasUserEditedBody:d.hasUserEditedBody(...p),enabled:n,onCancelClick:this.props.onCancelClick,onTryoutClick:e,onResetClick:()=>t(p)}):null),this.state.parametersVisible?k().createElement(\"div\",{className:\"parameters-container\"},C.length?k().createElement(\"div\",{className:\"table-container\"},k().createElement(\"table\",{className:\"parameters\"},k().createElement(\"thead\",null,k().createElement(\"tr\",null,k().createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),k().createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),k().createElement(\"tbody\",null,C.map(((e,t)=>k().createElement(g,{fn:o,specPath:s.push(t.toString()),getComponent:l,getConfigs:c,rawParam:e,param:i.parameterWithMetaByIdentity(p,e),key:`${e.get(\"in\")}.${e.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:i,specActions:m,oas3Actions:u,oas3Selectors:d,pathMethod:p,isExecute:_})))))):k().createElement(\"div\",{className:\"opblock-description-wrapper\"},k().createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?k().createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},k().createElement(S,{callbacks:(0,I.Map)(h.get(\"callbacks\")),specPath:s.slice(0,-1).push(\"callbacks\")})):null,v&&b&&this.state.parametersVisible&&k().createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},k().createElement(\"div\",{className:\"opblock-section-header\"},k().createElement(\"h4\",{className:`opblock-title parameter__name ${b.get(\"required\")&&\"required\"}`},\"Request body\"),k().createElement(\"label\",{id:w},k().createElement(f,{value:d.requestContentType(...p),contentTypes:b.get(\"content\",(0,I.List)()).keySeq(),onChange:e=>{this.onChangeMediaType({value:e,pathMethod:p})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:w}))),k().createElement(\"div\",{className:\"opblock-description-wrapper\"},k().createElement(E,{setRetainRequestBodyValueFlag:e=>u.setRetainRequestBodyValueFlag({value:e,pathMethod:p}),userHasEditedBody:d.hasUserEditedBody(...p),specPath:s.slice(0,-1).push(\"requestBody\"),requestBody:b,requestBodyValue:d.requestBodyValue(...p),requestBodyInclusionSetting:d.requestBodyInclusionSetting(...p),requestBodyErrors:d.requestBodyErrors(...p),isExecute:_,getConfigs:c,activeExamplesKey:d.activeExamplesMember(...p,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(e,t)=>{if(t){const r=d.requestBodyValue(...p),a=I.Map.isMap(r)?r:(0,I.Map)();return u.setRequestBodyValue({pathMethod:p,value:a.setIn(t,e)})}u.setRequestBodyValue({value:e,pathMethod:p})},onChangeIncludeEmpty:(e,t)=>{u.setRequestBodyInclusion({pathMethod:p,value:t,name:e})},contentType:d.requestContentType(...p)}))))}}const parameter_extension=({xKey:e,xVal:t})=>k().createElement(\"div\",{className:\"parameter__extension\"},e,\": \",String(t)),Za={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends N.Component{static defaultProps=Za;componentDidMount(){const{isIncludedOptions:e,onChange:t}=this.props,{shouldDispatchInit:r,defaultValue:a}=e;r&&t(a)}onCheckboxChange=e=>{const{onChange:t}=this.props;t(e.target.checked)};render(){let{isIncluded:e,isDisabled:t}=this.props;return k().createElement(\"div\",null,k().createElement(\"label\",{htmlFor:\"include_empty_value\",className:Fa()(\"parameter__empty_value_toggle\",{disabled:t})},k().createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:t,checked:!t&&e,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends N.Component{constructor(e,t){super(e,t),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(e){let t,{specSelectors:r,pathMethod:a,rawParam:n}=e,s=r.isOAS3(),o=r.parameterWithMetaByIdentity(a,n)||new I.Map;if(o=o.isEmpty()?n:o,s){let{schema:e}=getParameterSchema(o,{isOAS3:s});t=e?e.get(\"enum\"):void 0}else t=o?o.get(\"enum\"):void 0;let l,c=o?o.get(\"value\"):void 0;void 0!==c?l=c:n.get(\"required\")&&t&&t.size&&(l=t.first()),void 0!==l&&l!==c&&this.onChangeWrapper(function numberToString(e){return\"number\"==typeof e?e.toString():e}(l)),this.setDefaultValue()}onChangeWrapper=(e,t=!1)=>{let r,{onChange:a,rawParam:n}=this.props;return r=\"\"===e||e&&0===e.size?null:e,a(n,r,t)};_onExampleSelect=e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=e=>{let{specActions:t,param:r,pathMethod:a}=this.props;const n=r.get(\"name\"),s=r.get(\"in\");return t.updateEmptyParamInclusion(a,n,s,e)};setDefaultValue=()=>{let{specSelectors:e,pathMethod:t,rawParam:r,oas3Selectors:a,fn:n}=this.props;const s=e.parameterWithMetaByIdentity(t,r)||(0,I.Map)(),{schema:o}=getParameterSchema(s,{isOAS3:e.isOAS3()}),l=s.get(\"content\",(0,I.Map)()).keySeq().first(),c=o?n.getSampleSchema(o.toJS(),l,{includeWriteOnly:!0}):null;if(s&&void 0===s.get(\"value\")&&\"body\"!==s.get(\"in\")){let r;if(e.isSwagger2())r=void 0!==s.get(\"x-example\")?s.get(\"x-example\"):void 0!==s.getIn([\"schema\",\"example\"])?s.getIn([\"schema\",\"example\"]):o&&o.getIn([\"default\"]);else if(e.isOAS3()){const e=a.activeExamplesMember(...t,\"parameters\",this.getParamKey());r=void 0!==s.getIn([\"examples\",e,\"value\"])?s.getIn([\"examples\",e,\"value\"]):void 0!==s.getIn([\"content\",l,\"example\"])?s.getIn([\"content\",l,\"example\"]):void 0!==s.get(\"example\")?s.get(\"example\"):void 0!==(o&&o.get(\"example\"))?o&&o.get(\"example\"):void 0!==(o&&o.get(\"default\"))?o&&o.get(\"default\"):s.get(\"default\")}void 0===r||I.List.isList(r)||(r=stringify(r)),void 0!==r?this.onChangeWrapper(r):o&&\"object\"===o.get(\"type\")&&c&&!s.get(\"examples\")&&this.onChangeWrapper(I.List.isList(c)?c:stringify(c))}};getParamKey(){const{param:e}=this.props;return e?`${e.get(\"name\")}-${e.get(\"in\")}`:null}render(){let{param:e,rawParam:t,getComponent:r,getConfigs:a,isExecute:n,fn:s,onChangeConsumes:o,specSelectors:l,pathMethod:c,specPath:i,oas3Selectors:m}=this.props,p=l.isOAS3();const{showExtensions:u,showCommonExtensions:d}=a();if(e||(e=t),!t)return null;const h=r(\"JsonSchemaForm\"),g=r(\"ParamBody\");let y=e.get(\"in\"),f=\"body\"!==y?null:k().createElement(g,{getComponent:r,getConfigs:a,fn:s,param:e,consumes:l.consumesOptionsFor(c),consumesValue:l.contentTypeValues(c).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:o,isExecute:n,specSelectors:l,pathMethod:c});const S=r(\"modelExample\"),E=r(\"Markdown\",!0),_=r(\"ParameterExt\"),v=r(\"ParameterIncludeEmpty\"),w=r(\"ExamplesSelectValueRetainer\"),b=r(\"Example\");let C,x,O,N,{schema:A}=getParameterSchema(e,{isOAS3:p}),q=l.parameterWithMetaByIdentity(c,t)||(0,I.Map)(),j=A?A.get(\"format\"):null,P=A?A.get(\"type\"):null,M=A?A.getIn([\"items\",\"type\"]):null,R=\"formData\"===y,T=\"FormData\"in U,J=e.get(\"required\"),$=q?q.get(\"value\"):\"\",K=d?getCommonExtensions(A):null,D=u?getExtensions(e):null,V=!1;return void 0!==e&&A&&(C=A.get(\"items\")),void 0!==C?(x=C.get(\"enum\"),O=C.get(\"default\")):A&&(x=A.get(\"enum\")),x&&x.size&&x.size>0&&(V=!0),void 0!==e&&(A&&(O=A.get(\"default\")),void 0===O&&(O=e.get(\"default\")),N=e.get(\"example\"),void 0===N&&(N=e.get(\"x-example\"))),k().createElement(\"tr\",{\"data-param-name\":e.get(\"name\"),\"data-param-in\":e.get(\"in\")},k().createElement(\"td\",{className:\"parameters-col_name\"},k().createElement(\"div\",{className:J?\"parameter__name required\":\"parameter__name\"},e.get(\"name\"),J?k().createElement(\"span\",null,\" *\"):null),k().createElement(\"div\",{className:\"parameter__type\"},P,M&&`[${M}]`,j&&k().createElement(\"span\",{className:\"prop-format\"},\"($\",j,\")\")),k().createElement(\"div\",{className:\"parameter__deprecated\"},p&&e.get(\"deprecated\")?\"deprecated\":null),k().createElement(\"div\",{className:\"parameter__in\"},\"(\",e.get(\"in\"),\")\"),d&&K.size?K.entrySeq().map((([e,t])=>k().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,u&&D.size?D.entrySeq().map((([e,t])=>k().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null),k().createElement(\"td\",{className:\"parameters-col_description\"},e.get(\"description\")?k().createElement(E,{source:e.get(\"description\")}):null,!f&&n||!V?null:k().createElement(E,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+x.map((function(e){return e})).toArray().join(\", \")}),!f&&n||void 0===O?null:k().createElement(E,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+O}),!f&&n||void 0===N?null:k().createElement(E,{source:\"<i>Example</i> : \"+N}),R&&!T&&k().createElement(\"div\",null,\"Error: your browser does not support FormData\"),p&&e.get(\"examples\")?k().createElement(\"section\",{className:\"parameter-controls\"},k().createElement(w,{examples:e.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:r,defaultToFirstExample:!0,currentKey:m.activeExamplesMember(...c,\"parameters\",this.getParamKey()),currentUserInputValue:$})):null,f?null:k().createElement(h,{fn:s,getComponent:r,value:$,required:J,disabled:!n,description:e.get(\"name\"),onChange:this.onChangeWrapper,errors:q.get(\"errors\"),schema:A}),f&&A?k().createElement(S,{getComponent:r,specPath:i.push(\"schema\"),getConfigs:a,isExecute:n,specSelectors:l,schema:A,example:f,includeWriteOnly:!0}):null,!f&&n&&e.get(\"allowEmptyValue\")?k().createElement(v,{onChange:this.onChangeIncludeEmpty,isIncluded:l.parameterInclusionSettingFor(c,e.get(\"name\"),e.get(\"in\")),isDisabled:!isEmptyValue($)}):null,p&&e.get(\"examples\")?k().createElement(b,{example:e.getIn([\"examples\",m.activeExamplesMember(...c,\"parameters\",this.getParamKey())]),getComponent:r,getConfigs:a}):null))}}class Execute extends N.Component{handleValidateParameters=()=>{let{specSelectors:e,specActions:t,path:r,method:a}=this.props;return t.validateParams([r,a]),e.validateBeforeExecute([r,a])};handleValidateRequestBody=()=>{let{path:e,method:t,specSelectors:r,oas3Selectors:a,oas3Actions:n}=this.props,s={missingBodyValue:!1,missingRequiredKeys:[]};n.clearRequestBodyValidateError({path:e,method:t});let o=r.getOAS3RequiredRequestBodyContentType([e,t]),l=a.requestBodyValue(e,t),c=a.validateBeforeExecute([e,t]),i=a.requestContentType(e,t);if(!c)return s.missingBodyValue=!0,n.setRequestBodyValidateError({path:e,method:t,validationErrors:s}),!1;if(!o)return!0;let m=a.validateShallowRequired({oas3RequiredRequestBodyContentType:o,oas3RequestContentType:i,oas3RequestBodyValue:l});return!m||m.length<1||(m.forEach((e=>{s.missingRequiredKeys.push(e)})),n.setRequestBodyValidateError({path:e,method:t,validationErrors:s}),!1)};handleValidationResultPass=()=>{let{specActions:e,operation:t,path:r,method:a}=this.props;this.props.onExecute&&this.props.onExecute(),e.execute({operation:t,path:r,method:a})};handleValidationResultFail=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearValidateParams([t,r]),setTimeout((()=>{e.validateParams([t,r])}),40)};handleValidationResult=e=>{e?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let e=this.handleValidateParameters(),t=this.handleValidateRequestBody(),r=e&&t;this.handleValidationResult(r)};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);render(){const{disabled:e}=this.props;return k().createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:e},\"Execute\")}}class headers_Headers extends k().Component{render(){let{headers:e,getComponent:t}=this.props;const r=t(\"Property\"),a=t(\"Markdown\",!0);return e&&e.size?k().createElement(\"div\",{className:\"headers-wrapper\"},k().createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),k().createElement(\"table\",{className:\"headers\"},k().createElement(\"thead\",null,k().createElement(\"tr\",{className:\"header-row\"},k().createElement(\"th\",{className:\"header-col\"},\"Name\"),k().createElement(\"th\",{className:\"header-col\"},\"Description\"),k().createElement(\"th\",{className:\"header-col\"},\"Type\"))),k().createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>{if(!q().Map.isMap(t))return null;const n=t.get(\"description\"),s=t.getIn([\"schema\"])?t.getIn([\"schema\",\"type\"]):t.getIn([\"type\"]),o=t.getIn([\"schema\",\"example\"]);return k().createElement(\"tr\",{key:e},k().createElement(\"td\",{className:\"header-col\"},e),k().createElement(\"td\",{className:\"header-col\"},n?k().createElement(a,{source:n}):null),k().createElement(\"td\",{className:\"header-col\"},s,\" \",o?k().createElement(r,{propKey:\"Example\",propVal:o,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends k().Component{render(){let{editorActions:e,errSelectors:t,layoutSelectors:r,layoutActions:a,getComponent:n}=this.props;const s=n(\"Collapse\");if(e&&e.jumpToLine)var o=e.jumpToLine;let l=t.allErrors().filter((e=>\"thrown\"===e.get(\"type\")||\"error\"===e.get(\"level\")));if(!l||l.count()<1)return null;let c=r.isShown([\"errorPane\"],!0),i=l.sortBy((e=>e.get(\"line\")));return k().createElement(\"pre\",{className:\"errors-wrapper\"},k().createElement(\"hgroup\",{className:\"error\"},k().createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),k().createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>a.show([\"errorPane\"],!c)},c?\"Hide\":\"Show\")),k().createElement(s,{isOpened:c,animated:!0},k().createElement(\"div\",{className:\"errors\"},i.map(((e,t)=>{let r=e.get(\"type\");return\"thrown\"===r||\"auth\"===r?k().createElement(ThrownErrorItem,{key:t,error:e.get(\"error\")||e,jumpToLine:o}):\"spec\"===r?k().createElement(SpecErrorItem,{key:t,error:e,jumpToLine:o}):void 0})))))}}const ThrownErrorItem=({error:e,jumpToLine:t})=>{if(!e)return null;let r=e.get(\"line\");return k().createElement(\"div\",{className:\"error-wrapper\"},e?k().createElement(\"div\",null,k().createElement(\"h4\",null,e.get(\"source\")&&e.get(\"level\")?toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"):\"\",e.get(\"path\")?k().createElement(\"small\",null,\" at \",e.get(\"path\")):null),k().createElement(\"span\",{className:\"message thrown\"},e.get(\"message\")),k().createElement(\"div\",{className:\"error-line\"},r&&t?k().createElement(\"a\",{onClick:t.bind(null,r)},\"Jump to line \",r):null)):null)},SpecErrorItem=({error:e,jumpToLine:t=null})=>{let r=null;return e.get(\"path\")?r=I.List.isList(e.get(\"path\"))?k().createElement(\"small\",null,\"at \",e.get(\"path\").join(\".\")):k().createElement(\"small\",null,\"at \",e.get(\"path\")):e.get(\"line\")&&!t&&(r=k().createElement(\"small\",null,\"on line \",e.get(\"line\"))),k().createElement(\"div\",{className:\"error-wrapper\"},e?k().createElement(\"div\",null,k().createElement(\"h4\",null,toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"),\" \",r),k().createElement(\"span\",{className:\"message\"},e.get(\"message\")),k().createElement(\"div\",{className:\"error-line\"},t?k().createElement(\"a\",{onClick:t.bind(null,e.get(\"line\"))},\"Jump to line \",e.get(\"line\")):null)):null)};function toTitleCase(e){return(e||\"\").split(\" \").map((e=>e[0].toUpperCase()+e.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends k().Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,I.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(e){e.contentTypes&&e.contentTypes.size&&(e.contentTypes.includes(e.value)||e.onChange(e.contentTypes.first()))}onChangeWrapper=e=>this.props.onChange(e.target.value);render(){let{ariaControls:e,ariaLabel:t,className:r,contentTypes:a,controlId:n,value:s}=this.props;return a&&a.size?k().createElement(\"div\",{className:\"content-type-wrapper \"+(r||\"\")},k().createElement(\"select\",{\"aria-controls\":e,\"aria-label\":t,className:\"content-type\",id:n,onChange:this.onChangeWrapper,value:s||\"\"},a.map((e=>k().createElement(\"option\",{key:e,value:e},e))).toArray())):null}}function xclass(...e){return e.filter((e=>!!e)).join(\" \").trim()}class Container extends k().Component{render(){let{fullscreen:e,full:t,...r}=this.props;if(e)return k().createElement(\"section\",r);let a=\"swagger-container\"+(t?\"-full\":\"\");return k().createElement(\"section\",rt()({},r,{className:xclass(r.className,a)}))}}const en={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends k().Component{render(){const{hide:e,keepContents:t,mobile:r,tablet:a,desktop:n,large:s,...o}=this.props;if(e&&!t)return k().createElement(\"span\",null);let l=[];for(let e in en){if(!Object.prototype.hasOwnProperty.call(en,e))continue;let t=en[e];if(e in this.props){let r=this.props[e];if(r<1){l.push(\"none\"+t);continue}l.push(\"block\"+t),l.push(\"col-\"+r+t)}}e&&l.push(\"hidden\");let c=xclass(o.className,...l);return k().createElement(\"section\",rt()({},o,{className:c}))}}class Row extends k().Component{render(){return k().createElement(\"div\",rt()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends k().Component{static defaultProps={className:\"\"};render(){return k().createElement(\"button\",rt()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=e=>k().createElement(\"textarea\",e),Input=e=>k().createElement(\"input\",e);class Select extends k().Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(e,t){let r;super(e,t),r=e.value?e.value:e.multiple?[\"\"]:\"\",this.state={value:r}}onChange=e=>{let t,{onChange:r,multiple:a}=this.props,n=[].slice.call(e.target.options);t=a?n.filter((function(e){return e.selected})).map((function(e){return e.value})):e.target.value,this.setState({value:t}),r&&r(t)};UNSAFE_componentWillReceiveProps(e){e.value!==this.props.value&&this.setState({value:e.value})}render(){let{allowedValues:e,multiple:t,allowEmptyValue:r,disabled:a}=this.props,n=this.state.value?.toJS?.()||this.state.value;return k().createElement(\"select\",{className:this.props.className,multiple:t,value:n,onChange:this.onChange,disabled:a},r?k().createElement(\"option\",{value:\"\"},\"--\"):null,e.map((function(e,t){return k().createElement(\"option\",{key:t,value:String(e)},String(e))})))}}class Link extends k().Component{render(){return k().createElement(\"a\",rt()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:e})=>k().createElement(\"div\",{className:\"no-margin\"},\" \",e,\" \");class Collapse extends k().Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?k().createElement(NoMargin,null,this.props.children):k().createElement(\"noscript\",null)}render(){let{animated:e,isOpened:t,children:r}=this.props;return e?(r=t?r:null,k().createElement(NoMargin,null,r)):this.renderNotAnimated()}}class Overview extends k().Component{constructor(...e){super(...e),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(e,t){this.props.layoutActions.show(e,t)}showOp(e,t){let{layoutActions:r}=this.props;r.show(e,t)}render(){let{specSelectors:e,layoutSelectors:t,layoutActions:r,getComponent:a}=this.props,n=e.taggedOperations();const s=a(\"Collapse\");return k().createElement(\"div\",null,k().createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),n.map(((e,a)=>{let n=e.get(\"operations\"),o=[\"overview-tags\",a],l=t.isShown(o,!0);return k().createElement(\"div\",{key:\"overview-\"+a},k().createElement(\"h4\",{onClick:()=>r.show(o,!l),className:\"link overview-tag\"},\" \",l?\"-\":\"+\",a),k().createElement(s,{isOpened:l,animated:!0},n.map((e=>{let{path:a,method:n,id:s}=e.toObject(),o=\"operations\",l=s,c=t.isShown([o,l]);return k().createElement(OperationLink,{key:s,path:a,method:n,id:a+\"-\"+n,shown:c,showOpId:l,showOpIdPrefix:o,href:`#operation-${l}`,onClick:r.show})})).toArray()))})).toArray(),n.size<1&&k().createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends k().Component{constructor(e){super(e),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:e,showOpIdPrefix:t,onClick:r,shown:a}=this.props;r([t,e],!a)}render(){let{id:e,method:t,shown:r,href:a}=this.props;return k().createElement(Link,{href:a,onClick:this.onClick,className:\"block opblock-link \"+(r?\"shown\":\"\")},k().createElement(\"div\",null,k().createElement(\"small\",{className:`bold-label-${t}`},t.toUpperCase()),k().createElement(\"span\",{className:\"bold-label\"},e)))}}class InitializedInput extends k().Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:e,defaultValue:t,initialValue:r,...a}=this.props;return k().createElement(\"input\",rt()({},a,{ref:e=>this.inputRef=e}))}}class InfoBasePath extends k().Component{render(){const{host:e,basePath:t}=this.props;return k().createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",e,t,\" ]\")}}class InfoUrl extends k().PureComponent{render(){const{url:e,getComponent:t}=this.props,r=t(\"Link\");return k().createElement(r,{target:\"_blank\",href:sanitizeUrl(e)},k().createElement(\"span\",{className:\"url\"},\" \",e))}}class Info extends k().Component{render(){const{info:e,url:t,host:r,basePath:a,getComponent:n,externalDocs:s,selectedServer:o,url:l}=this.props,c=e.get(\"version\"),i=e.get(\"description\"),m=e.get(\"title\"),p=safeBuildUrl(e.get(\"termsOfService\"),l,{selectedServer:o}),u=e.get(\"contact\"),d=e.get(\"license\"),h=safeBuildUrl(s&&s.get(\"url\"),l,{selectedServer:o}),g=s&&s.get(\"description\"),y=n(\"Markdown\",!0),f=n(\"Link\"),S=n(\"VersionStamp\"),E=n(\"OpenAPIVersion\"),_=n(\"InfoUrl\"),v=n(\"InfoBasePath\"),w=n(\"License\"),b=n(\"Contact\");return k().createElement(\"div\",{className:\"info\"},k().createElement(\"hgroup\",{className:\"main\"},k().createElement(\"h2\",{className:\"title\"},m,k().createElement(\"span\",null,c&&k().createElement(S,{version:c}),k().createElement(E,{oasVersion:\"2.0\"}))),r||a?k().createElement(v,{host:r,basePath:a}):null,t&&k().createElement(_,{getComponent:n,url:t})),k().createElement(\"div\",{className:\"description\"},k().createElement(y,{source:i})),p&&k().createElement(\"div\",{className:\"info__tos\"},k().createElement(f,{target:\"_blank\",href:sanitizeUrl(p)},\"Terms of service\")),u?.size>0&&k().createElement(b,{getComponent:n,data:u,selectedServer:o,url:t}),d?.size>0&&k().createElement(w,{getComponent:n,license:d,selectedServer:o,url:t}),h?k().createElement(f,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(h)},g||h):null)}}const tn=Info;class InfoContainer extends k().Component{render(){const{specSelectors:e,getComponent:t,oas3Selectors:r}=this.props,a=e.info(),n=e.url(),s=e.basePath(),o=e.host(),l=e.externalDocs(),c=r.selectedServer(),i=t(\"info\");return k().createElement(\"div\",null,a&&a.count()?k().createElement(i,{info:a,url:n,host:o,basePath:s,externalDocs:l,getComponent:t,selectedServer:c}):null)}}class Contact extends k().Component{render(){const{data:e,getComponent:t,selectedServer:r,url:a}=this.props,n=e.get(\"name\",\"the developer\"),s=safeBuildUrl(e.get(\"url\"),a,{selectedServer:r}),o=e.get(\"email\"),l=t(\"Link\");return k().createElement(\"div\",{className:\"info__contact\"},s&&k().createElement(\"div\",null,k().createElement(l,{href:sanitizeUrl(s),target:\"_blank\"},n,\" - Website\")),o&&k().createElement(l,{href:sanitizeUrl(`mailto:${o}`)},s?`Send email to ${n}`:`Contact ${n}`))}}const rn=Contact;class License extends k().Component{render(){const{license:e,getComponent:t,selectedServer:r,url:a}=this.props,n=e.get(\"name\",\"License\"),s=safeBuildUrl(e.get(\"url\"),a,{selectedServer:r}),o=t(\"Link\");return k().createElement(\"div\",{className:\"info__license\"},s?k().createElement(\"div\",{className:\"info__license__url\"},k().createElement(o,{target:\"_blank\",href:sanitizeUrl(s)},n)):k().createElement(\"span\",null,n))}}const an=License;class JumpToPath extends k().Component{render(){return null}}class CopyToClipboardBtn extends k().Component{render(){let{getComponent:e}=this.props;const t=e(\"CopyIcon\");return k().createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},k().createElement(dt.CopyToClipboard,{text:this.props.textToCopy},k().createElement(t,null)))}}class Footer extends k().Component{render(){return k().createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends k().Component{onFilterChange=e=>{const{target:{value:t}}=e;this.props.layoutActions.updateFilter(t)};render(){const{specSelectors:e,layoutSelectors:t,getComponent:r}=this.props,a=r(\"Col\"),n=\"loading\"===e.loadingStatus(),s=\"failed\"===e.loadingStatus(),o=t.currentFilter(),l=[\"operation-filter-input\"];return s&&l.push(\"failed\"),n&&l.push(\"loading\"),k().createElement(\"div\",null,null===o||!1===o||\"false\"===o?null:k().createElement(\"div\",{className:\"filter-container\"},k().createElement(a,{className:\"filter wrapper\",mobile:12},k().createElement(\"input\",{className:l.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:!0===o||\"true\"===o?\"\":o,disabled:n}))))}}const nn=Function.prototype;class ParamBody extends N.PureComponent{static defaultProp={consumes:(0,I.fromJS)([\"application/json\"]),param:(0,I.fromJS)({}),onChange:nn,onChangeConsumes:nn};constructor(e,t){super(e,t),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(e){this.updateValues.call(this,e)}updateValues=e=>{let{param:t,isExecute:r,consumesValue:a=\"\"}=e,n=/xml/i.test(a),s=/json/i.test(a),o=n?t.get(\"value_xml\"):t.get(\"value\");if(void 0!==o){let e=!o&&s?\"{}\":o;this.setState({value:e}),this.onChange(e,{isXml:n,isEditBox:r})}else n?this.onChange(this.sample(\"xml\"),{isXml:n,isEditBox:r}):this.onChange(this.sample(),{isEditBox:r})};sample=e=>{let{param:t,fn:r}=this.props,a=r.inferSchema(t.toJS());return r.getSampleSchema(a,e,{includeWriteOnly:!0})};onChange=(e,{isEditBox:t,isXml:r})=>{this.setState({value:e,isEditBox:t}),this._onChange(e,r)};_onChange=(e,t)=>{(this.props.onChange||nn)(e,t)};handleOnChange=e=>{const{consumesValue:t}=this.props,r=/xml/i.test(t),a=e.target.value;this.onChange(a,{isXml:r,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((e=>({isEditBox:!e.isEditBox})));render(){let{onChangeConsumes:e,param:t,isExecute:r,specSelectors:a,pathMethod:n,getConfigs:s,getComponent:o}=this.props;const l=o(\"Button\"),c=o(\"TextArea\"),i=o(\"highlightCode\"),m=o(\"contentType\");let p=(a?a.parameterWithMetaByIdentity(n,t):t).get(\"errors\",(0,I.List)()),u=a.contentTypeValues(n).get(\"requestContentType\"),d=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:h,isEditBox:g}=this.state,y=null;getKnownSyntaxHighlighterLanguage(h)&&(y=\"json\");const f=`${createHtmlReadyId(`${n[1]}${n[0]}_parameters`)}_select`;return k().createElement(\"div\",{className:\"body-param\",\"data-param-name\":t.get(\"name\"),\"data-param-in\":t.get(\"in\")},g&&r?k().createElement(c,{className:\"body-param__text\"+(p.count()?\" invalid\":\"\"),value:h,onChange:this.handleOnChange}):h&&k().createElement(i,{className:\"body-param__example\",language:y,getConfigs:s,value:h}),k().createElement(\"div\",{className:\"body-param-options\"},r?k().createElement(\"div\",{className:\"body-param-edit\"},k().createElement(l,{className:g?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},g?\"Cancel\":\"Edit\")):null,k().createElement(\"label\",{htmlFor:f},k().createElement(\"span\",null,\"Parameter content type\"),k().createElement(m,{value:u,contentTypes:d,onChange:e,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:f}))))}}class Curl extends k().Component{render(){let{request:e,getConfigs:t}=this.props,r=requestSnippetGenerator_curl_bash(e);const a=t(),n=Ge()(a,\"syntaxHighlight.activated\")?k().createElement(gt(),{language:\"bash\",className:\"curl microlight\",style:getStyle(Ge()(a,\"syntaxHighlight.theme\"))},r):k().createElement(\"textarea\",{readOnly:!0,className:\"curl\",value:r});return k().createElement(\"div\",{className:\"curl-command\"},k().createElement(\"h4\",null,\"Curl\"),k().createElement(\"div\",{className:\"copy-to-clipboard\"},k().createElement(dt.CopyToClipboard,{text:r},k().createElement(\"button\",null))),k().createElement(\"div\",null,n))}}class Schemes extends k().Component{UNSAFE_componentWillMount(){let{schemes:e}=this.props;this.setScheme(e.first())}UNSAFE_componentWillReceiveProps(e){this.props.currentScheme&&e.schemes.includes(this.props.currentScheme)||this.setScheme(e.schemes.first())}onChange=e=>{this.setScheme(e.target.value)};setScheme=e=>{let{path:t,method:r,specActions:a}=this.props;a.setScheme(e,t,r)};render(){let{schemes:e,currentScheme:t}=this.props;return k().createElement(\"label\",{htmlFor:\"schemes\"},k().createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),k().createElement(\"select\",{onChange:this.onChange,value:t,id:\"schemes\"},e.valueSeq().map((e=>k().createElement(\"option\",{value:e,key:e},e))).toArray()))}}class SchemesContainer extends k().Component{render(){const{specActions:e,specSelectors:t,getComponent:r}=this.props,a=t.operationScheme(),n=t.schemes(),s=r(\"schemes\");return n&&n.size?k().createElement(s,{currentScheme:a,schemes:n,specActions:e}):null}}class ModelCollapse extends N.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:q().List([])};constructor(e,t){super(e,t);let{expanded:r,collapsedContent:a}=this.props;this.state={expanded:r,collapsedContent:a||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:e,expanded:t,modelName:r}=this.props;e&&t&&this.props.onToggle(r,t)}UNSAFE_componentWillReceiveProps(e){this.props.expanded!==e.expanded&&this.setState({expanded:e.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=e=>{if(e&&this.props.layoutSelectors){const t=this.props.layoutSelectors.getScrollToKey();q().is(t,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,e.parentElement)}};render(){const{title:e,classes:t}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?k().createElement(\"span\",{className:t||\"\"},this.props.children):k().createElement(\"span\",{className:t||\"\",ref:this.onLoad},k().createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},e&&k().createElement(\"span\",{className:\"pointer\"},e),k().createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&k().createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:e,isExecute:t,schema:r,example:a})=>{const n=(0,N.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),s=(0,N.useMemo)((()=>Object.keys(n)),[n]).includes(e)&&r&&!t?e:n.example,o=(e=>{const t=(0,N.useRef)();return(0,N.useEffect)((()=>{t.current=e})),t.current})(t),[l,c]=(0,N.useState)(s),i=(0,N.useCallback)((e=>{c(e.target.dataset.name)}),[]);return(0,N.useEffect)((()=>{o&&!t&&a&&c(n.example)}),[o,t,a]),{activeTab:l,onTabChange:i,tabs:n}},model_example=({schema:e,example:t,isExecute:r=!1,specPath:a,includeWriteOnly:n=!1,includeReadOnly:s=!1,getComponent:o,getConfigs:l,specSelectors:c})=>{const{defaultModelRendering:i,defaultModelExpandDepth:m}=l(),p=o(\"ModelWrapper\"),u=o(\"highlightCode\"),d=ne()(5).toString(\"base64\"),h=ne()(5).toString(\"base64\"),g=ne()(5).toString(\"base64\"),y=ne()(5).toString(\"base64\"),f=c.isOAS3(),{activeTab:S,tabs:E,onTabChange:_}=useTabs({initialTab:i,isExecute:r,schema:e,example:t});return k().createElement(\"div\",{className:\"model-example\"},k().createElement(\"ul\",{className:\"tab\",role:\"tablist\"},k().createElement(\"li\",{className:Fa()(\"tabitem\",{active:S===E.example}),role:\"presentation\"},k().createElement(\"button\",{\"aria-controls\":h,\"aria-selected\":S===E.example,className:\"tablinks\",\"data-name\":\"example\",id:d,onClick:_,role:\"tab\"},r?\"Edit Value\":\"Example Value\")),e&&k().createElement(\"li\",{className:Fa()(\"tabitem\",{active:S===E.model}),role:\"presentation\"},k().createElement(\"button\",{\"aria-controls\":y,\"aria-selected\":S===E.model,className:Fa()(\"tablinks\",{inactive:r}),\"data-name\":\"model\",id:g,onClick:_,role:\"tab\"},f?\"Schema\":\"Model\"))),S===E.example&&k().createElement(\"div\",{\"aria-hidden\":S!==E.example,\"aria-labelledby\":d,\"data-name\":\"examplePanel\",id:h,role:\"tabpanel\",tabIndex:\"0\"},t||k().createElement(u,{value:\"(no example available)\",getConfigs:l})),S===E.model&&k().createElement(\"div\",{\"aria-hidden\":S===E.example,\"aria-labelledby\":g,\"data-name\":\"modelPanel\",id:y,role:\"tabpanel\",tabIndex:\"0\"},k().createElement(p,{schema:e,getComponent:o,getConfigs:l,specSelectors:c,expandDepth:m,specPath:a,includeReadOnly:s,includeWriteOnly:n})))};class ModelWrapper extends N.Component{onToggle=(e,t)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,t)};render(){let{getComponent:e,getConfigs:t}=this.props;const r=e(\"Model\");let a;return this.props.layoutSelectors&&(a=this.props.layoutSelectors.isShown(this.props.fullPath)),k().createElement(\"div\",{className:\"model-box\"},k().createElement(r,rt()({},this.props,{getConfigs:t,expanded:a,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}const sn=require(\"react-immutable-pure-component\");var on=__webpack_require__.n(sn);const decodeRefName=e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}};class Model extends(on()){static propTypes={schema:Fe().map.isRequired,getComponent:Ae().func.isRequired,getConfigs:Ae().func.isRequired,specSelectors:Ae().object.isRequired,name:Ae().string,displayName:Ae().string,isRef:Ae().bool,required:Ae().bool,expandDepth:Ae().number,depth:Ae().number,specPath:Fe().list.isRequired,includeReadOnly:Ae().bool,includeWriteOnly:Ae().bool};getModelName=e=>-1!==e.indexOf(\"#/definitions/\")?decodeRefName(e.replace(/^.*#\\/definitions\\//,\"\")):-1!==e.indexOf(\"#/components/schemas/\")?decodeRefName(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=e=>{let{specSelectors:t}=this.props;return t.findDefinition(e)};render(){let{getComponent:e,getConfigs:t,specSelectors:r,schema:a,required:n,name:s,isRef:o,specPath:l,displayName:c,includeReadOnly:i,includeWriteOnly:m}=this.props;const p=e(\"ObjectModel\"),u=e(\"ArrayModel\"),d=e(\"PrimitiveModel\");let h=\"object\",g=a&&a.get(\"$$ref\"),y=a&&a.get(\"$ref\");if(!s&&g&&(s=this.getModelName(g)),y){s=this.getModelName(y);const e=this.getRefSchema(s);I.Map.isMap(e)?(a=e.set(\"$$ref\",y),g=y):(a=null,s=y)}if(!a)return k().createElement(\"span\",{className:\"model model-title\"},k().createElement(\"span\",{className:\"model-title__text\"},c||s),!y&&k().createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const f=r.isOAS3()&&a.get(\"deprecated\");switch(o=void 0!==o?o:!!g,h=a&&a.get(\"type\")||h,h){case\"object\":return k().createElement(p,rt()({className:\"object\"},this.props,{specPath:l,getConfigs:t,schema:a,name:s,deprecated:f,isRef:o,includeReadOnly:i,includeWriteOnly:m}));case\"array\":return k().createElement(u,rt()({className:\"array\"},this.props,{getConfigs:t,schema:a,name:s,deprecated:f,required:n,includeReadOnly:i,includeWriteOnly:m}));default:return k().createElement(d,rt()({},this.props,{getComponent:e,getConfigs:t,schema:a,name:s,deprecated:f,required:n}))}}}class Models extends N.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(e,t)=>{const{layoutActions:r}=this.props;r.show([...this.getSchemaBasePath(),e],t),t&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),e])};onLoadModels=e=>{e&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),e)};onLoadModel=e=>{if(e){const t=e.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),t],e)}};render(){let{specSelectors:e,getComponent:t,layoutSelectors:r,layoutActions:a,getConfigs:n}=this.props,s=e.definitions(),{docExpansion:o,defaultModelsExpandDepth:l}=n();if(!s.size||l<0)return null;const c=this.getSchemaBasePath();let i=r.isShown(c,l>0&&\"none\"!==o);const m=e.isOAS3(),p=t(\"ModelWrapper\"),u=t(\"Collapse\"),d=t(\"ModelCollapse\"),h=t(\"JumpToPath\",!0),g=t(\"ArrowUpIcon\"),y=t(\"ArrowDownIcon\");return k().createElement(\"section\",{className:i?\"models is-open\":\"models\",ref:this.onLoadModels},k().createElement(\"h4\",null,k().createElement(\"button\",{\"aria-expanded\":i,className:\"models-control\",onClick:()=>a.show(c,!i)},k().createElement(\"span\",null,m?\"Schemas\":\"Models\"),i?k().createElement(g,null):k().createElement(y,null))),k().createElement(u,{isOpened:i},s.entrySeq().map((([s])=>{const o=[...c,s],i=q().List(o),m=e.specResolvedSubtree(o),u=e.specJson().getIn(o),g=I.Map.isMap(m)?m:q().Map(),y=I.Map.isMap(u)?u:q().Map(),f=g.get(\"title\")||y.get(\"title\")||s,S=r.isShown(o,!1);S&&0===g.size&&y.size>0&&this.props.specActions.requestResolvedSubtree(o);const E=k().createElement(p,{name:s,expandDepth:l,schema:g||q().Map(),displayName:f,fullPath:o,specPath:i,getComponent:t,specSelectors:e,getConfigs:n,layoutSelectors:r,layoutActions:a,includeReadOnly:!0,includeWriteOnly:!0}),_=k().createElement(\"span\",{className:\"model-box\"},k().createElement(\"span\",{className:\"model model-title\"},f));return k().createElement(\"div\",{id:`model-${s}`,className:\"model-container\",key:`models-section-${s}`,\"data-name\":s,ref:this.onLoadModel},k().createElement(\"span\",{className:\"models-jump-to-path\"},k().createElement(h,{specPath:i})),k().createElement(d,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(s),onToggle:this.handleToggle,title:_,displayName:f,modelName:s,specPath:i,layoutSelectors:r,layoutActions:a,hideSelfOnExpand:!0,expanded:l>0&&S},E))})).toArray()))}}const enum_model=({value:e,getComponent:t})=>{let r=t(\"ModelCollapse\"),a=k().createElement(\"span\",null,\"Array [ \",e.count(),\" ]\");return k().createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",k().createElement(\"br\",null),k().createElement(r,{collapsedContent:a},\"[ \",e.join(\", \"),\" ]\"))};class ObjectModel extends N.Component{render(){let{schema:e,name:t,displayName:r,isRef:a,getComponent:n,getConfigs:s,depth:o,onToggle:l,expanded:c,specPath:i,...m}=this.props,{specSelectors:p,expandDepth:u,includeReadOnly:d,includeWriteOnly:h}=m;const{isOAS3:g}=p;if(!e)return null;const{showExtensions:y}=s();let f=e.get(\"description\"),S=e.get(\"properties\"),E=e.get(\"additionalProperties\"),_=e.get(\"title\")||r||t,v=e.get(\"required\"),w=e.filter(((e,t)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(t))),b=e.get(\"deprecated\"),C=e.getIn([\"externalDocs\",\"url\"]),x=e.getIn([\"externalDocs\",\"description\"]);const O=n(\"JumpToPath\",!0),N=n(\"Markdown\",!0),A=n(\"Model\"),q=n(\"ModelCollapse\"),j=n(\"Property\"),P=n(\"Link\"),JumpToPathSection=()=>k().createElement(\"span\",{className:\"model-jump-to-path\"},k().createElement(O,{specPath:i})),M=k().createElement(\"span\",null,k().createElement(\"span\",null,\"{\"),\"...\",k().createElement(\"span\",null,\"}\"),a?k().createElement(JumpToPathSection,null):\"\"),R=p.isOAS3()?e.get(\"allOf\"):null,T=p.isOAS3()?e.get(\"anyOf\"):null,J=p.isOAS3()?e.get(\"oneOf\"):null,$=p.isOAS3()?e.get(\"not\"):null,K=_&&k().createElement(\"span\",{className:\"model-title\"},a&&e.get(\"$$ref\")&&k().createElement(\"span\",{className:\"model-hint\"},e.get(\"$$ref\")),k().createElement(\"span\",{className:\"model-title__text\"},_));return k().createElement(\"span\",{className:\"model\"},k().createElement(q,{modelName:t,title:K,onToggle:l,expanded:!!c||o<=u,collapsedContent:M},k().createElement(\"span\",{className:\"brace-open object\"},\"{\"),a?k().createElement(JumpToPathSection,null):null,k().createElement(\"span\",{className:\"inner-object\"},k().createElement(\"table\",{className:\"model\"},k().createElement(\"tbody\",null,f?k().createElement(\"tr\",{className:\"description\"},k().createElement(\"td\",null,\"description:\"),k().createElement(\"td\",null,k().createElement(N,{source:f}))):null,C&&k().createElement(\"tr\",{className:\"external-docs\"},k().createElement(\"td\",null,\"externalDocs:\"),k().createElement(\"td\",null,k().createElement(P,{target:\"_blank\",href:sanitizeUrl(C)},x||C))),b?k().createElement(\"tr\",{className:\"property\"},k().createElement(\"td\",null,\"deprecated:\"),k().createElement(\"td\",null,\"true\")):null,S&&S.size?S.entrySeq().filter((([,e])=>(!e.get(\"readOnly\")||d)&&(!e.get(\"writeOnly\")||h))).map((([e,r])=>{let a=g()&&r.get(\"deprecated\"),l=I.List.isList(v)&&v.contains(e),c=[\"property-row\"];return a&&c.push(\"deprecated\"),l&&c.push(\"required\"),k().createElement(\"tr\",{key:e,className:c.join(\" \")},k().createElement(\"td\",null,e,l&&k().createElement(\"span\",{className:\"star\"},\"*\")),k().createElement(\"td\",null,k().createElement(A,rt()({key:`object-${t}-${e}_${r}`},m,{required:l,getComponent:n,specPath:i.push(\"properties\",e),getConfigs:s,schema:r,depth:o+1}))))})).toArray():null,y?k().createElement(\"tr\",null,k().createElement(\"td\",null,\" \")):null,y?e.entrySeq().map((([e,t])=>{if(\"x-\"!==e.slice(0,2))return;const r=t?t.toJS?t.toJS():t:null;return k().createElement(\"tr\",{key:e,className:\"extension\"},k().createElement(\"td\",null,e),k().createElement(\"td\",null,JSON.stringify(r)))})).toArray():null,E&&E.size?k().createElement(\"tr\",null,k().createElement(\"td\",null,\"< * >:\"),k().createElement(\"td\",null,k().createElement(A,rt()({},m,{required:!1,getComponent:n,specPath:i.push(\"additionalProperties\"),getConfigs:s,schema:E,depth:o+1})))):null,R?k().createElement(\"tr\",null,k().createElement(\"td\",null,\"allOf ->\"),k().createElement(\"td\",null,R.map(((e,t)=>k().createElement(\"div\",{key:t},k().createElement(A,rt()({},m,{required:!1,getComponent:n,specPath:i.push(\"allOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,T?k().createElement(\"tr\",null,k().createElement(\"td\",null,\"anyOf ->\"),k().createElement(\"td\",null,T.map(((e,t)=>k().createElement(\"div\",{key:t},k().createElement(A,rt()({},m,{required:!1,getComponent:n,specPath:i.push(\"anyOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,J?k().createElement(\"tr\",null,k().createElement(\"td\",null,\"oneOf ->\"),k().createElement(\"td\",null,J.map(((e,t)=>k().createElement(\"div\",{key:t},k().createElement(A,rt()({},m,{required:!1,getComponent:n,specPath:i.push(\"oneOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,$?k().createElement(\"tr\",null,k().createElement(\"td\",null,\"not ->\"),k().createElement(\"td\",null,k().createElement(\"div\",null,k().createElement(A,rt()({},m,{required:!1,getComponent:n,specPath:i.push(\"not\"),getConfigs:s,schema:$,depth:o+1}))))):null))),k().createElement(\"span\",{className:\"brace-close\"},\"}\")),w.size?w.entrySeq().map((([e,t])=>k().createElement(j,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null)}}class ArrayModel extends N.Component{render(){let{getComponent:e,getConfigs:t,schema:r,depth:a,expandDepth:n,name:s,displayName:o,specPath:l}=this.props,c=r.get(\"description\"),i=r.get(\"items\"),m=r.get(\"title\")||o||s,p=r.filter(((e,t)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))),u=r.getIn([\"externalDocs\",\"url\"]),d=r.getIn([\"externalDocs\",\"description\"]);const h=e(\"Markdown\",!0),g=e(\"ModelCollapse\"),y=e(\"Model\"),f=e(\"Property\"),S=e(\"Link\"),E=m&&k().createElement(\"span\",{className:\"model-title\"},k().createElement(\"span\",{className:\"model-title__text\"},m));return k().createElement(\"span\",{className:\"model\"},k().createElement(g,{title:E,expanded:a<=n,collapsedContent:\"[...]\"},\"[\",p.size?p.entrySeq().map((([e,t])=>k().createElement(f,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null,c?k().createElement(h,{source:c}):p.size?k().createElement(\"div\",{className:\"markdown\"}):null,u&&k().createElement(\"div\",{className:\"external-docs\"},k().createElement(S,{target:\"_blank\",href:sanitizeUrl(u)},d||u)),k().createElement(\"span\",null,k().createElement(y,rt()({},this.props,{getConfigs:t,specPath:l.push(\"items\"),name:null,schema:i,required:!1,depth:a+1}))),\"]\"))}}const ln=\"property primitive\";class Primitive extends N.Component{render(){let{schema:e,getComponent:t,getConfigs:r,name:a,displayName:n,depth:s,expandDepth:o}=this.props;const{showExtensions:l}=r();if(!e||!e.get)return k().createElement(\"div\",null);let c=e.get(\"type\"),i=e.get(\"format\"),m=e.get(\"xml\"),p=e.get(\"enum\"),u=e.get(\"title\")||n||a,d=e.get(\"description\"),h=getExtensions(e),g=e.filter(((e,t)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))).filterNot(((e,t)=>h.has(t))),y=e.getIn([\"externalDocs\",\"url\"]),f=e.getIn([\"externalDocs\",\"description\"]);const S=t(\"Markdown\",!0),E=t(\"EnumModel\"),_=t(\"Property\"),v=t(\"ModelCollapse\"),w=t(\"Link\"),b=u&&k().createElement(\"span\",{className:\"model-title\"},k().createElement(\"span\",{className:\"model-title__text\"},u));return k().createElement(\"span\",{className:\"model\"},k().createElement(v,{title:b,expanded:s<=o,collapsedContent:\"[...]\",hideSelfOnExpand:o!==s},k().createElement(\"span\",{className:\"prop\"},a&&s>1&&k().createElement(\"span\",{className:\"prop-name\"},u),k().createElement(\"span\",{className:\"prop-type\"},c),i&&k().createElement(\"span\",{className:\"prop-format\"},\"($\",i,\")\"),g.size?g.entrySeq().map((([e,t])=>k().createElement(_,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:ln}))):null,l&&h.size?h.entrySeq().map((([e,t])=>k().createElement(_,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:ln}))):null,d?k().createElement(S,{source:d}):null,y&&k().createElement(\"div\",{className:\"external-docs\"},k().createElement(w,{target:\"_blank\",href:sanitizeUrl(y)},f||y)),m&&m.size?k().createElement(\"span\",null,k().createElement(\"br\",null),k().createElement(\"span\",{className:ln},\"xml:\"),m.entrySeq().map((([e,t])=>k().createElement(\"span\",{key:`${e}-${t}`,className:ln},k().createElement(\"br\",null),\"   \",e,\": \",String(t)))).toArray()):null,p&&k().createElement(E,{value:p,getComponent:t}))))}}const property=({propKey:e,propVal:t,propClass:r})=>k().createElement(\"span\",{className:r},k().createElement(\"br\",null),e,\": \",String(t));class TryItOutButton extends k().Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:e,onCancelClick:t,onResetClick:r,enabled:a,hasUserEditedBody:n,isOAS3:s}=this.props,o=s&&n;return k().createElement(\"div\",{className:o?\"try-out btn-group\":\"try-out\"},a?k().createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:t},\"Cancel\"):k().createElement(\"button\",{className:\"btn try-out__btn\",onClick:e},\"Try it out \"),o&&k().createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:r},\"Reset\"))}}class VersionPragmaFilter extends k().PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:e,isSwagger2:t,isOAS3:r,alsoShow:a}=this.props;return e?k().createElement(\"div\",null,this.props.children):t&&r?k().createElement(\"div\",{className:\"version-pragma\"},a,k().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},k().createElement(\"div\",null,k().createElement(\"h3\",null,\"Unable to render this definition\"),k().createElement(\"p\",null,k().createElement(\"code\",null,\"swagger\"),\" and \",k().createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),k().createElement(\"p\",null,\"Supported version fields are \",k().createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",k().createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",k().createElement(\"code\",null,\"openapi: 3.0.0\"),\").\")))):t||r?k().createElement(\"div\",null,this.props.children):k().createElement(\"div\",{className:\"version-pragma\"},a,k().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},k().createElement(\"div\",null,k().createElement(\"h3\",null,\"Unable to render this definition\"),k().createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),k().createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",k().createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",k().createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",k().createElement(\"code\",null,\"openapi: 3.0.0\"),\").\"))))}}const version_stamp=({version:e})=>k().createElement(\"small\",null,k().createElement(\"pre\",{className:\"version\"},\" \",e,\" \")),openapi_version=({oasVersion:e})=>k().createElement(\"small\",{className:\"version-stamp\"},k().createElement(\"pre\",{className:\"version\"},\"OAS \",e)),deep_link=({enabled:e,path:t,text:r})=>k().createElement(\"a\",{className:\"nostyle\",onClick:e?e=>e.preventDefault():null,href:e?`#/${t}`:null},k().createElement(\"span\",null,r)),svg_assets=()=>k().createElement(\"div\",null,k().createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},k().createElement(\"defs\",null,k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},k().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},k().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},k().createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},k().createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},k().createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},k().createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},k().createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},k().createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),k().createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},k().createElement(\"g\",{transform:\"translate(2, -1)\"},k().createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})))))),cn=require(\"remarkable\"),mn=require(\"remarkable/linkify\"),pn=require(\"dompurify\");var un=__webpack_require__.n(pn);un().addHook&&un().addHook(\"beforeSanitizeElements\",(function(e){return e.href&&e.setAttribute(\"rel\",\"noopener noreferrer\"),e}));const dn=function Markdown({source:e,className:t=\"\",getConfigs:r=(()=>({useUnsafeMarkdown:!1}))}){if(\"string\"!=typeof e)return null;const a=new cn.Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(mn.linkify);a.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:n}=r(),s=a.render(e),o=sanitizer(s,{useUnsafeMarkdown:n});return e&&s&&o?k().createElement(\"div\",{className:Fa()(t,\"markdown\"),dangerouslySetInnerHTML:{__html:o}}):null};function sanitizer(e,{useUnsafeMarkdown:t=!1}={}){const r=t,a=t?[]:[\"style\",\"class\"];return t&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),un().sanitize(e,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:r,FORBID_ATTR:a})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends k().Component{render(){const{errSelectors:e,specSelectors:t,getComponent:r}=this.props,a=r(\"SvgAssets\"),n=r(\"InfoContainer\",!0),s=r(\"VersionPragmaFilter\"),o=r(\"operations\",!0),l=r(\"Models\",!0),c=r(\"Webhooks\",!0),i=r(\"Row\"),m=r(\"Col\"),p=r(\"errors\",!0),u=r(\"ServersContainer\",!0),d=r(\"SchemesContainer\",!0),h=r(\"AuthorizeBtnContainer\",!0),g=r(\"FilterContainer\",!0),y=t.isSwagger2(),f=t.isOAS3(),S=t.isOAS31(),E=!t.specStr(),_=t.loadingStatus();let v=null;if(\"loading\"===_&&(v=k().createElement(\"div\",{className:\"info\"},k().createElement(\"div\",{className:\"loading-container\"},k().createElement(\"div\",{className:\"loading\"})))),\"failed\"===_&&(v=k().createElement(\"div\",{className:\"info\"},k().createElement(\"div\",{className:\"loading-container\"},k().createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),k().createElement(p,null)))),\"failedConfig\"===_){const t=e.lastError(),r=t?t.get(\"message\"):\"\";v=k().createElement(\"div\",{className:\"info failed-config\"},k().createElement(\"div\",{className:\"loading-container\"},k().createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),k().createElement(\"p\",null,r)))}if(!v&&E&&(v=k().createElement(\"h4\",null,\"No API definition provided.\")),v)return k().createElement(\"div\",{className:\"swagger-ui\"},k().createElement(\"div\",{className:\"loading-container\"},v));const w=t.servers(),b=t.schemes(),C=w&&w.size,x=b&&b.size,O=!!t.securityDefinitions();return k().createElement(\"div\",{className:\"swagger-ui\"},k().createElement(a,null),k().createElement(s,{isSwagger2:y,isOAS3:f,alsoShow:k().createElement(p,null)},k().createElement(p,null),k().createElement(i,{className:\"information-container\"},k().createElement(m,{mobile:12},k().createElement(n,null))),C||x||O?k().createElement(\"div\",{className:\"scheme-container\"},k().createElement(m,{className:\"schemes wrapper\",mobile:12},C||x?k().createElement(\"div\",{className:\"schemes-server-container\"},C?k().createElement(u,null):null,x?k().createElement(d,null):null):null,O?k().createElement(h,null):null)):null,k().createElement(g,null),k().createElement(i,null,k().createElement(m,{mobile:12,desktop:12},k().createElement(o,null))),S&&k().createElement(i,{className:\"webhooks-container\"},k().createElement(m,{mobile:12,desktop:12},k().createElement(c,null))),k().createElement(i,null,k().createElement(m,{mobile:12,desktop:12},k().createElement(l,null)))))}}const core_components=()=>({components:{App:Va,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:tn,InfoContainer,InfoUrl,InfoBasePath,Contact:rn,License:an,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,highlightCode:highlight_code,responses:Responses,response:Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,schemes:Schemes,SchemesContainer,modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,Property:property,TryItOutButton,Markdown:dn,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{...S}}),hn=require(\"react-debounce-input\");var gn=__webpack_require__.n(hn);const yn={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,I.List)()};class JsonSchemaForm extends N.Component{static defaultProps=yn;componentDidMount(){const{dispatchInitialValue:e,value:t,onChange:r}=this.props;e?r(t):!1===e&&r(\"\")}render(){let{schema:e,errors:t,value:r,onChange:a,getComponent:n,fn:s,disabled:o}=this.props;const l=e&&e.get?e.get(\"format\"):null,c=e&&e.get?e.get(\"type\"):null;let getComponentSilently=e=>n(e,!1,{failSilently:!0}),i=c?getComponentSilently(l?`JsonSchema_${c}_${l}`:`JsonSchema_${c}`):n(\"JsonSchema_string\");return i||(i=n(\"JsonSchema_string\")),k().createElement(i,rt()({},this.props,{errors:t,fn:s,getComponent:n,value:r,onChange:a,schema:e,disabled:o}))}}class JsonSchema_string extends N.Component{static defaultProps=yn;onChange=e=>{const t=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?e.target.files[0]:e.target.value;this.props.onChange(t,this.props.keyName)};onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,schema:r,errors:a,required:n,description:s,disabled:o}=this.props;const l=r&&r.get?r.get(\"enum\"):null,c=r&&r.get?r.get(\"format\"):null,i=r&&r.get?r.get(\"type\"):null,m=r&&r.get?r.get(\"in\"):null;if(t||(t=\"\"),a=a.toJS?a.toJS():[],l){const r=e(\"Select\");return k().createElement(r,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",allowedValues:[...l],value:t,allowEmptyValue:!n,disabled:o,onChange:this.onEnumChange})}const p=o||m&&\"formData\"===m&&!(\"FormData\"in window),u=e(\"Input\");return i&&\"file\"===i?k().createElement(u,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:this.onChange,disabled:p}):k().createElement(gn(),{type:c&&\"password\"===c?\"password\":\"text\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",value:t,minLength:0,debounceTimeout:350,placeholder:s,onChange:this.onChange,disabled:p})}}class JsonSchema_array extends N.PureComponent{static defaultProps=yn;constructor(e,t){super(e,t),this.state={value:valueOrEmptyList(e.value),schema:e.schema}}UNSAFE_componentWillReceiveProps(e){const t=valueOrEmptyList(e.value);t!==this.state.value&&this.setState({value:t}),e.schema!==this.state.schema&&this.setState({schema:e.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(e,t)=>{this.setState((({value:r})=>({value:r.set(t,e)})),this.onChange)};removeItem=e=>{this.setState((({value:t})=>({value:t.delete(e)})),this.onChange)};addItem=()=>{const{fn:e}=this.props;let t=valueOrEmptyList(this.state.value);this.setState((()=>({value:t.push(e.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=e=>{this.setState((()=>({value:e})),this.onChange)};render(){let{getComponent:e,required:t,schema:r,errors:a,fn:n,disabled:s}=this.props;a=a.toJS?a.toJS():Array.isArray(a)?a:[];const o=a.filter((e=>\"string\"==typeof e)),l=a.filter((e=>void 0!==e.needRemove)).map((e=>e.error)),c=this.state.value,i=!!(c&&c.count&&c.count()>0),m=r.getIn([\"items\",\"enum\"]),p=r.getIn([\"items\",\"type\"]),u=r.getIn([\"items\",\"format\"]),d=r.get(\"items\");let h,g=!1,y=\"file\"===p||\"string\"===p&&\"binary\"===u;if(p&&u?h=e(`JsonSchema_${p}_${u}`):\"boolean\"!==p&&\"array\"!==p&&\"object\"!==p||(h=e(`JsonSchema_${p}`)),h||y||(g=!0),m){const r=e(\"Select\");return k().createElement(r,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",multiple:!0,value:c,disabled:s,allowedValues:m,allowEmptyValue:!t,onChange:this.onEnumChange})}const f=e(\"Button\");return k().createElement(\"div\",{className:\"json-schema-array\"},i?c.map(((t,r)=>{const o=(0,I.fromJS)([...a.filter((e=>e.index===r)).map((e=>e.error))]);return k().createElement(\"div\",{key:r,className:\"json-schema-form-item\"},y?k().createElement(JsonSchemaArrayItemFile,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o,getComponent:e}):g?k().createElement(JsonSchemaArrayItemText,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o}):k().createElement(h,rt()({},this.props,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o,schema:d,getComponent:e,fn:n})),s?null:k().createElement(f,{className:`btn btn-sm json-schema-form-item-remove ${l.length?\"invalid\":null}`,title:l.length?l:\"\",onClick:()=>this.removeItem(r)},\" - \"))})):null,s?null:k().createElement(f,{className:`btn btn-sm json-schema-form-item-add ${o.length?\"invalid\":null}`,title:o.length?o:\"\",onClick:this.addItem},\"Add \",p?`${p} `:\"\",\"item\"))}}class JsonSchemaArrayItemText extends N.Component{static defaultProps=yn;onChange=e=>{const t=e.target.value;this.props.onChange(t,this.props.keyName)};render(){let{value:e,errors:t,description:r,disabled:a}=this.props;return e||(e=\"\"),t=t.toJS?t.toJS():[],k().createElement(gn(),{type:\"text\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",value:e,minLength:0,debounceTimeout:350,placeholder:r,onChange:this.onChange,disabled:a})}}class JsonSchemaArrayItemFile extends N.Component{static defaultProps=yn;onFileChange=e=>{const t=e.target.files[0];this.props.onChange(t,this.props.keyName)};render(){let{getComponent:e,errors:t,disabled:r}=this.props;const a=e(\"Input\"),n=r||!(\"FormData\"in window);return k().createElement(a,{type:\"file\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",onChange:this.onFileChange,disabled:n})}}class JsonSchema_boolean extends N.Component{static defaultProps=yn;onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,errors:r,schema:a,required:n,disabled:s}=this.props;r=r.toJS?r.toJS():[];let o=a&&a.get?a.get(\"enum\"):null,l=!o||!n,c=!o&&[\"true\",\"false\"];const i=e(\"Select\");return k().createElement(i,{className:r.length?\"invalid\":\"\",title:r.length?r:\"\",value:String(t),disabled:s,allowedValues:o?[...o]:c,allowEmptyValue:l,onChange:this.onEnumChange})}}const stringifyObjectErrors=e=>e.map((e=>{const t=void 0!==e.propKey?e.propKey:e.index;let r=\"string\"==typeof e?e:\"string\"==typeof e.error?e.error:null;if(!t&&r)return r;let a=e.error,n=`/${e.propKey}`;for(;\"object\"==typeof a;){const e=void 0!==a.propKey?a.propKey:a.index;if(void 0===e)break;if(n+=`/${e}`,!a.error)break;a=a.error}return`${n}: ${a}`}));class JsonSchema_object extends N.PureComponent{constructor(){super()}static defaultProps=yn;onChange=e=>{this.props.onChange(e)};handleOnChange=e=>{const t=e.target.value;this.onChange(t)};render(){let{getComponent:e,value:t,errors:r,disabled:a}=this.props;const n=e(\"TextArea\");return r=r.toJS?r.toJS():Array.isArray(r)?r:[],k().createElement(\"div\",null,k().createElement(n,{className:Fa()({invalid:r.length}),title:r.length?stringifyObjectErrors(r).join(\", \"):\"\",value:stringify(t),disabled:a,onChange:this.handleOnChange}))}}function valueOrEmptyList(e){return I.List.isList(e)?e:Array.isArray(e)?(0,I.fromJS)(e):(0,I.List)()}const json_schema_components=()=>({components:{...E}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5_samples,core_components,form_components,swagger_client,json_schema_components,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,safe_render()],fn=(0,I.Map)();function onlyOAS3(e){return(t,r)=>(...a)=>{if(r.getSystem().specSelectors.isOAS3()){const t=e(...a);return\"function\"==typeof t?t(r):t}return t(...a)}}const Sn=onlyOAS3(mr()(null)),En=onlyOAS3(((e,t)=>e=>e.getSystem().specSelectors.findSchema(t))),_n=onlyOAS3((()=>e=>{const t=e.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return I.Map.isMap(t)?t:fn})),vn=onlyOAS3((()=>e=>e.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),wn=onlyOAS3((0,be.createSelector)(Er,(e=>e.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(e,t)=>(r,...a)=>t.specSelectors.isOAS3()?t.oas3Selectors.validOperationMethods():e(...a),bn=Sn,Cn=Sn,xn=Sn,On=Sn,Nn=Sn;const kn=function wrap_selectors_onlyOAS3(e){return(t,r)=>(...a)=>{if(r.getSystem().specSelectors.isOAS3()){let t=r.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return e(r,t,...a)}return t(...a)}}((0,be.createSelector)((e=>e),(({specSelectors:e})=>e.securityDefinitions()),((e,t)=>{let r=(0,I.List)();return t?(t.entrySeq().forEach((([e,t])=>{const a=t.get(\"type\");if(\"oauth2\"===a&&t.get(\"flows\").entrySeq().forEach((([a,n])=>{let s=(0,I.fromJS)({flow:a,authorizationUrl:n.get(\"authorizationUrl\"),tokenUrl:n.get(\"tokenUrl\"),scopes:n.get(\"scopes\"),type:t.get(\"type\"),description:t.get(\"description\")});r=r.push(new I.Map({[e]:s.filter((e=>void 0!==e))}))})),\"http\"!==a&&\"apiKey\"!==a||(r=r.push(new I.Map({[e]:t}))),\"openIdConnect\"===a&&t.get(\"openIdConnectData\")){let a=t.get(\"openIdConnectData\");(a.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((n=>{let s=a.get(\"scopes_supported\")&&a.get(\"scopes_supported\").reduce(((e,t)=>e.set(t,\"\")),new I.Map),o=(0,I.fromJS)({flow:n,authorizationUrl:a.get(\"authorization_endpoint\"),tokenUrl:a.get(\"token_endpoint\"),scopes:s,type:\"oauth2\",openIdConnectUrl:t.get(\"openIdConnectUrl\")});r=r.push(new I.Map({[e]:o.filter((e=>void 0!==e))}))}))}})),r):r})));function OAS3ComponentWrapFactory(e){return(t,r)=>a=>\"function\"==typeof r.specSelectors?.isOAS3?r.specSelectors.isOAS3()?k().createElement(e,rt()({},a,r,{Ori:t})):k().createElement(t,a):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const An=(0,I.Map)(),selectors_isSwagger2=()=>e=>function isSwagger2(e){const t=e.get(\"swagger\");return\"string\"==typeof t&&\"2.0\"===t}(e.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>e=>function isOAS30(e){const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.0\\.([0123])(?:-rc[012])?$/.test(t)}(e.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>e=>e.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(e){return(t,...r)=>a=>{if(a.specSelectors.isOAS3()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null}}const In=selectors_onlyOAS3((()=>e=>e.specSelectors.specJson().get(\"servers\",An))),findSchema=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",t],null),a=e.getIn([\"json\",\"components\",\"schemas\",t],null);return r||a||null},qn=selectors_onlyOAS3(((e,{callbacks:t,specPath:r})=>e=>{const a=e.specSelectors.validOperationMethods();return I.Map.isMap(t)?t.reduce(((e,t,n)=>{if(!I.Map.isMap(t))return e;const s=t.reduce(((e,t,s)=>{if(!I.Map.isMap(t))return e;const o=t.entrySeq().filter((([e])=>a.includes(e))).map((([e,t])=>({operation:(0,I.Map)({operation:t}),method:e,path:s,callbackName:n,specPath:r.concat([n,s,e])})));return e.concat(o)}),(0,I.List)());return e.concat(s)}),(0,I.List)()).groupBy((e=>e.callbackName)).map((e=>e.toArray())).toObject():{}})),callbacks=({callbacks:e,specPath:t,specSelectors:r,getComponent:a})=>{const n=r.callbacksOperations({callbacks:e,specPath:t}),s=Object.keys(n),o=a(\"OperationContainer\",!0);return 0===s.length?k().createElement(\"span\",null,\"No callbacks\"):k().createElement(\"div\",null,s.map((e=>k().createElement(\"div\",{key:`${e}`},k().createElement(\"h2\",null,e),n[e].map((t=>k().createElement(o,{key:`${e}-${t.path}-${t.method}`,op:t.operation,tag:\"callbacks\",method:t.method,path:t.path,specPath:t.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(e,t,r,a)=>{const n=e.getIn([\"content\",t])??(0,I.OrderedMap)(),s=n.get(\"schema\",(0,I.OrderedMap)()).toJS(),o=void 0!==n.get(\"examples\"),l=n.get(\"example\"),c=o?n.getIn([\"examples\",r,\"value\"]):l;return stringify(a.getSampleSchema(s,t,{includeWriteOnly:!0},c))},request_body=({userHasEditedBody:e,requestBody:t,requestBodyValue:r,requestBodyInclusionSetting:a,requestBodyErrors:n,getComponent:s,getConfigs:o,specSelectors:l,fn:c,contentType:i,isExecute:m,specPath:p,onChange:u,onChangeIncludeEmpty:d,activeExamplesKey:h,updateActiveExamplesKey:g,setRetainRequestBodyValueFlag:y})=>{const handleFile=e=>{u(e.target.files[0])},setIsIncludedOptions=e=>{let t={key:e,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===a.get(e,\"no value\")&&(t.shouldDispatchInit=!0),t},f=s(\"Markdown\",!0),S=s(\"modelExample\"),E=s(\"RequestBodyEditor\"),_=s(\"highlightCode\"),v=s(\"ExamplesSelectValueRetainer\"),w=s(\"Example\"),b=s(\"ParameterIncludeEmpty\"),{showCommonExtensions:C}=o(),x=t?.get(\"description\")??null,O=t?.get(\"content\")??new I.OrderedMap;i=i||O.keySeq().first()||\"\";const N=O.get(i)??(0,I.OrderedMap)(),A=N.get(\"schema\",(0,I.OrderedMap)()),q=N.get(\"examples\",null),j=q?.map(((e,r)=>{const a=e?.get(\"value\",null);return a&&(e=e.set(\"value\",getDefaultRequestBodyValue(t,i,r,c),a)),e}));if(n=I.List.isList(n)?n:(0,I.List)(),!N.size)return null;const P=\"object\"===N.getIn([\"schema\",\"type\"]),M=\"binary\"===N.getIn([\"schema\",\"format\"]),R=\"base64\"===N.getIn([\"schema\",\"format\"]);if(\"application/octet-stream\"===i||0===i.indexOf(\"image/\")||0===i.indexOf(\"audio/\")||0===i.indexOf(\"video/\")||M||R){const e=s(\"Input\");return m?k().createElement(e,{type:\"file\",onChange:handleFile}):k().createElement(\"i\",null,\"Example values are not available for \",k().createElement(\"code\",null,i),\" media types.\")}if(P&&(\"application/x-www-form-urlencoded\"===i||0===i.indexOf(\"multipart/\"))&&A.get(\"properties\",(0,I.OrderedMap)()).size>0){const e=s(\"JsonSchemaForm\"),t=s(\"ParameterExt\"),o=A.get(\"properties\",(0,I.OrderedMap)());return r=I.Map.isMap(r)?r:(0,I.OrderedMap)(),k().createElement(\"div\",{className:\"table-container\"},x&&k().createElement(f,{source:x}),k().createElement(\"table\",null,k().createElement(\"tbody\",null,I.Map.isMap(o)&&o.entrySeq().map((([o,l])=>{if(l.get(\"readOnly\"))return;let i=C?getCommonExtensions(l):null;const p=A.get(\"required\",(0,I.List)()).includes(o),h=l.get(\"type\"),g=l.get(\"format\"),y=l.get(\"description\"),S=r.getIn([o,\"value\"]),E=r.getIn([o,\"errors\"])||n,_=a.get(o)||!1,v=l.has(\"default\")||l.has(\"example\")||l.hasIn([\"items\",\"example\"])||l.hasIn([\"items\",\"default\"]),w=l.has(\"enum\")&&(1===l.get(\"enum\").size||p),x=v||w;let O=\"\";\"array\"!==h||x||(O=[]),(\"object\"===h||x)&&(O=c.getSampleSchema(l,!1,{includeWriteOnly:!0})),\"string\"!=typeof O&&\"object\"===h&&(O=stringify(O)),\"string\"==typeof O&&\"array\"===h&&(O=JSON.parse(O));const N=\"string\"===h&&(\"binary\"===g||\"base64\"===g);return k().createElement(\"tr\",{key:o,className:\"parameters\",\"data-property-name\":o},k().createElement(\"td\",{className:\"parameters-col_name\"},k().createElement(\"div\",{className:p?\"parameter__name required\":\"parameter__name\"},o,p?k().createElement(\"span\",null,\" *\"):null),k().createElement(\"div\",{className:\"parameter__type\"},h,g&&k().createElement(\"span\",{className:\"prop-format\"},\"($\",g,\")\"),C&&i.size?i.entrySeq().map((([e,r])=>k().createElement(t,{key:`${e}-${r}`,xKey:e,xVal:r}))):null),k().createElement(\"div\",{className:\"parameter__deprecated\"},l.get(\"deprecated\")?\"deprecated\":null)),k().createElement(\"td\",{className:\"parameters-col_description\"},k().createElement(f,{source:y}),m?k().createElement(\"div\",null,k().createElement(e,{fn:c,dispatchInitialValue:!N,schema:l,description:o,getComponent:s,value:void 0===S?O:S,required:p,errors:E,onChange:e=>{u(e,[o])}}),p?null:k().createElement(b,{onChange:e=>d(o,e),isIncluded:_,isIncludedOptions:setIsIncludedOptions(o),isDisabled:Array.isArray(S)?0!==S.length:!isEmptyValue(S)})):null))})))))}const T=getDefaultRequestBodyValue(t,i,h,c);let J=null;return getKnownSyntaxHighlighterLanguage(T)&&(J=\"json\"),k().createElement(\"div\",null,x&&k().createElement(f,{source:x}),j?k().createElement(v,{userHasEditedBody:e,examples:j,currentKey:h,currentUserInputValue:r,onSelect:e=>{g(e)},updateValue:u,defaultToFirstExample:!0,getComponent:s,setRetainRequestBodyValueFlag:y}):null,m?k().createElement(\"div\",null,k().createElement(E,{value:r,errors:n,defaultValue:T,onChange:u,getComponent:s})):k().createElement(S,{getComponent:s,getConfigs:o,specSelectors:l,expandDepth:1,isExecute:m,schema:N.get(\"schema\"),specPath:p.push(\"content\",i),example:k().createElement(_,{className:\"body-param__example\",getConfigs:o,language:J,value:stringify(r)||T}),includeWriteOnly:!0}),j?k().createElement(w,{example:j.get(h),getComponent:s,getConfigs:o}):null)};class operation_link_OperationLink extends N.Component{render(){const{link:e,name:t,getComponent:r}=this.props,a=r(\"Markdown\",!0);let n=e.get(\"operationId\")||e.get(\"operationRef\"),s=e.get(\"parameters\")&&e.get(\"parameters\").toJS(),o=e.get(\"description\");return k().createElement(\"div\",{className:\"operation-link\"},k().createElement(\"div\",{className:\"description\"},k().createElement(\"b\",null,k().createElement(\"code\",null,t)),o?k().createElement(a,{source:o}):null),k().createElement(\"pre\",null,\"Operation `\",n,\"`\",k().createElement(\"br\",null),k().createElement(\"br\",null),\"Parameters \",function padString(e,t){if(\"string\"!=typeof t)return\"\";return t.split(\"\\n\").map(((t,r)=>r>0?Array(e+1).join(\" \")+t:t)).join(\"\\n\")}(0,JSON.stringify(s,null,2))||\"{}\",k().createElement(\"br\",null)))}}const jn=operation_link_OperationLink,components_servers=({servers:e,currentServer:t,setSelectedServer:r,setServerVariableValue:a,getServerVariable:n,getEffectiveServerValue:s})=>{const o=(e.find((e=>e.get(\"url\")===t))||(0,I.OrderedMap)()).get(\"variables\")||(0,I.OrderedMap)(),l=0!==o.size;(0,N.useEffect)((()=>{t||r(e.first()?.get(\"url\"))}),[]),(0,N.useEffect)((()=>{const n=e.find((e=>e.get(\"url\")===t));if(!n)return void r(e.first().get(\"url\"));(n.get(\"variables\")||(0,I.OrderedMap)()).map(((e,r)=>{a({server:t,key:r,val:e.get(\"default\")||\"\"})}))}),[t,e]);const c=(0,N.useCallback)((e=>{r(e.target.value)}),[r]),i=(0,N.useCallback)((e=>{const r=e.target.getAttribute(\"data-variable\"),n=e.target.value;a({server:t,key:r,val:n})}),[a,t]);return k().createElement(\"div\",{className:\"servers\"},k().createElement(\"label\",{htmlFor:\"servers\"},k().createElement(\"select\",{onChange:c,value:t,id:\"servers\"},e.valueSeq().map((e=>k().createElement(\"option\",{value:e.get(\"url\"),key:e.get(\"url\")},e.get(\"url\"),e.get(\"description\")&&` - ${e.get(\"description\")}`))).toArray())),l&&k().createElement(\"div\",null,k().createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",k().createElement(\"code\",null,s(t))),k().createElement(\"h4\",null,\"Server variables\"),k().createElement(\"table\",null,k().createElement(\"tbody\",null,o.entrySeq().map((([e,r])=>k().createElement(\"tr\",{key:e},k().createElement(\"td\",null,e),k().createElement(\"td\",null,r.get(\"enum\")?k().createElement(\"select\",{\"data-variable\":e,onChange:i},r.get(\"enum\").map((r=>k().createElement(\"option\",{selected:r===n(t,e),key:r,value:r},r)))):k().createElement(\"input\",{type:\"text\",value:n(t,e)||\"\",onChange:i,\"data-variable\":e})))))))))};class ServersContainer extends k().Component{render(){const{specSelectors:e,oas3Selectors:t,oas3Actions:r,getComponent:a}=this.props,n=e.servers(),s=a(\"Servers\");return n&&n.size?k().createElement(\"div\",null,k().createElement(\"span\",{className:\"servers-title\"},\"Servers\"),k().createElement(s,{servers:n,currentServer:t.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:t.serverVariableValue,getEffectiveServerValue:t.serverEffectiveValue})):null}}const Pn=Function.prototype;class RequestBodyEditor extends N.PureComponent{static defaultProps={onChange:Pn,userHasEditedBody:!1};constructor(e,t){super(e,t),this.state={value:stringify(e.value)||e.defaultValue},e.onChange(e.value)}applyDefaultValue=e=>{const{onChange:t,defaultValue:r}=e||this.props;return this.setState({value:r}),t(r)};onChange=e=>{this.props.onChange(stringify(e))};onDomChange=e=>{const t=e.target.value;this.setState({value:t},(()=>this.onChange(t)))};UNSAFE_componentWillReceiveProps(e){this.props.value!==e.value&&e.value!==this.state.value&&this.setState({value:stringify(e.value)}),!e.value&&e.defaultValue&&this.state.value&&this.applyDefaultValue(e)}render(){let{getComponent:e,errors:t}=this.props,{value:r}=this.state,a=t.size>0;const n=e(\"TextArea\");return k().createElement(\"div\",{className:\"body-param\"},k().createElement(n,{className:Fa()(\"body-param__text\",{invalid:a}),title:t.size?t.join(\", \"):\"\",value:r,onChange:this.onDomChange}))}}class HttpAuth extends k().Component{constructor(e,t){super(e,t);let{name:r,schema:a}=this.props,n=this.getValue();this.state={name:r,schema:a,value:n}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,{value:r,name:a}=e.target,n=Object.assign({},this.state.value);a?n[a]=r:n=r,this.setState({value:n},(()=>t(this.state)))};render(){let{schema:e,getComponent:t,errSelectors:r,name:a}=this.props;const n=t(\"Input\"),s=t(\"Row\"),o=t(\"Col\"),l=t(\"authError\"),c=t(\"Markdown\",!0),i=t(\"JumpToPath\",!0),m=(e.get(\"scheme\")||\"\").toLowerCase();let p=this.getValue(),u=r.allErrors().filter((e=>e.get(\"authId\")===a));if(\"basic\"===m){let t=p?p.get(\"username\"):null;return k().createElement(\"div\",null,k().createElement(\"h4\",null,k().createElement(\"code\",null,a||e.get(\"name\")),\"  (http, Basic)\",k().createElement(i,{path:[\"securityDefinitions\",a]})),t&&k().createElement(\"h6\",null,\"Authorized\"),k().createElement(s,null,k().createElement(c,{source:e.get(\"description\")})),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),t?k().createElement(\"code\",null,\" \",t,\" \"):k().createElement(o,null,k().createElement(n,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),t?k().createElement(\"code\",null,\" ****** \"):k().createElement(o,null,k().createElement(n,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),u.valueSeq().map(((e,t)=>k().createElement(l,{error:e,key:t}))))}return\"bearer\"===m?k().createElement(\"div\",null,k().createElement(\"h4\",null,k().createElement(\"code\",null,a||e.get(\"name\")),\"  (http, Bearer)\",k().createElement(i,{path:[\"securityDefinitions\",a]})),p&&k().createElement(\"h6\",null,\"Authorized\"),k().createElement(s,null,k().createElement(c,{source:e.get(\"description\")})),k().createElement(s,null,k().createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),p?k().createElement(\"code\",null,\" ****** \"):k().createElement(o,null,k().createElement(n,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),u.valueSeq().map(((e,t)=>k().createElement(l,{error:e,key:t})))):k().createElement(\"div\",null,k().createElement(\"em\",null,k().createElement(\"b\",null,a),\" HTTP authentication: unsupported scheme \",`'${m}'`))}}class OperationServers extends k().Component{setSelectedServer=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setSelectedServer(e,`${t}:${r}`)};setServerVariableValue=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...e,namespace:`${t}:${r}`})};getSelectedServer=()=>{const{path:e,method:t}=this.props;return this.props.getSelectedServer(`${e}:${t}`)};getServerVariable=(e,t)=>{const{path:r,method:a}=this.props;return this.props.getServerVariable({namespace:`${r}:${a}`,server:e},t)};getEffectiveServerValue=e=>{const{path:t,method:r}=this.props;return this.props.getEffectiveServerValue({server:e,namespace:`${t}:${r}`})};render(){const{operationServers:e,pathServers:t,getComponent:r}=this.props;if(!e&&!t)return null;const a=r(\"Servers\"),n=e||t,s=e?\"operation\":\"path\";return k().createElement(\"div\",{className:\"opblock-section operation-servers\"},k().createElement(\"div\",{className:\"opblock-section-header\"},k().createElement(\"div\",{className:\"tab-header\"},k().createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),k().createElement(\"div\",{className:\"opblock-description-wrapper\"},k().createElement(\"h4\",{className:\"message\"},\"These \",s,\"-level options override the global server options.\"),k().createElement(a,{servers:n,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const Mn={Callbacks:callbacks,HttpAuth,RequestBody:request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers,operationLink:jn},Rn=new cn.Remarkable(\"commonmark\");Rn.block.ruler.enable([\"table\"]),Rn.set({linkTarget:\"_blank\"});const Tn=OAS3ComponentWrapFactory((({source:e,className:t=\"\",getConfigs:r=(()=>({useUnsafeMarkdown:!1}))})=>{if(\"string\"!=typeof e)return null;if(e){const{useUnsafeMarkdown:a}=r(),n=sanitizer(Rn.render(e),{useUnsafeMarkdown:a});let s;return\"string\"==typeof n&&(s=n.trim()),k().createElement(\"div\",{dangerouslySetInnerHTML:{__html:s},className:Fa()(t,\"renderedMarkdown\")})}return null})),Jn=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:a,errSelectors:n,authorized:s,onAuthChange:o,name:l}=t,c=a(\"HttpAuth\");return\"http\"===r.get(\"type\")?k().createElement(c,{key:l,schema:r,name:l,errSelectors:n,authorized:s,getComponent:a,onChange:o}):k().createElement(e,t)})),$n=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends N.Component{render(){let{getConfigs:e,schema:t}=this.props,r=[\"model-box\"],a=null;return!0===t.get(\"deprecated\")&&(r.push(\"deprecated\"),a=k().createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),k().createElement(\"div\",{className:r.join(\" \")},a,k().createElement(Model,rt()({},this.props,{getConfigs:e,depth:1,expandDepth:this.props.expandDepth||0})))}}const Kn=OAS3ComponentWrapFactory(ModelComponent),Dn=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:a,errors:n,onChange:s}=t,o=r&&r.get?r.get(\"format\"):null,l=r&&r.get?r.get(\"type\"):null,c=a(\"Input\");return l&&\"string\"===l&&o&&(\"binary\"===o||\"base64\"===o)?k().createElement(c,{type:\"file\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",onChange:e=>{s(e.target.files[0])},disabled:e.isDisabled}):k().createElement(e,t)})),Vn={Markdown:Tn,AuthItem:Jn,OpenAPIVersion:function OAS30ComponentWrapFactory(e){return(t,r)=>a=>\"function\"==typeof r.specSelectors?.isOAS30?r.specSelectors.isOAS30()?k().createElement(e,rt()({},a,r,{Ori:t})):k().createElement(t,a):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((e=>{const{Ori:t}=e;return k().createElement(t,{oasVersion:\"3.0\"})})),JsonSchema_string:Dn,model:Kn,onlineValidatorBadge:$n},Ln=\"oas3_set_servers\",Un=\"oas3_set_request_body_value\",zn=\"oas3_set_request_body_retain_flag\",Bn=\"oas3_set_request_body_inclusion\",Fn=\"oas3_set_active_examples_member\",Wn=\"oas3_set_request_content_type\",Hn=\"oas3_set_response_content_type\",Xn=\"oas3_set_server_variable_value\",Gn=\"oas3_set_request_body_validate_error\",Yn=\"oas3_clear_request_body_validate_error\",Qn=\"oas3_clear_request_body_value\";function setSelectedServer(e,t){return{type:Ln,payload:{selectedServerUrl:e,namespace:t}}}function setRequestBodyValue({value:e,pathMethod:t}){return{type:Un,payload:{value:e,pathMethod:t}}}const setRetainRequestBodyValueFlag=({value:e,pathMethod:t})=>({type:zn,payload:{value:e,pathMethod:t}});function setRequestBodyInclusion({value:e,pathMethod:t,name:r}){return{type:Bn,payload:{value:e,pathMethod:t,name:r}}}function setActiveExamplesMember({name:e,pathMethod:t,contextType:r,contextName:a}){return{type:Fn,payload:{name:e,pathMethod:t,contextType:r,contextName:a}}}function setRequestContentType({value:e,pathMethod:t}){return{type:Wn,payload:{value:e,pathMethod:t}}}function setResponseContentType({value:e,path:t,method:r}){return{type:Hn,payload:{value:e,path:t,method:r}}}function setServerVariableValue({server:e,namespace:t,key:r,val:a}){return{type:Xn,payload:{server:e,namespace:t,key:r,val:a}}}const setRequestBodyValidateError=({path:e,method:t,validationErrors:r})=>({type:Gn,payload:{path:e,method:t,validationErrors:r}}),clearRequestBodyValidateError=({path:e,method:t})=>({type:Yn,payload:{path:e,method:t}}),initRequestBodyValidateError=({pathMethod:e})=>({type:Yn,payload:{path:e[0],method:e[1]}}),clearRequestBodyValue=({pathMethod:e})=>({type:Qn,payload:{pathMethod:e}}),Zn=require(\"lodash/escapeRegExp\");var es=__webpack_require__.n(Zn);const oas3_selectors_onlyOAS3=e=>(t,...r)=>a=>{if(a.getSystem().specSelectors.isOAS3()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null};const ts=oas3_selectors_onlyOAS3(((e,t)=>{const r=t?[t,\"selectedServer\"]:[\"selectedServer\"];return e.getIn(r)||\"\"})),rs=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyValue\"])||null)),as=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(e,t,r)=>e=>{const{oas3Selectors:a,specSelectors:n,fn:s}=e.getSystem();if(n.isOAS3()){const e=a.requestContentType(t,r);if(e)return getDefaultRequestBodyValue(n.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]),e,a.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),s)}return null},ns=oas3_selectors_onlyOAS3(((e,t,r)=>e=>{const{oas3Selectors:a,specSelectors:n,fn:s}=e;let o=!1;const l=a.requestContentType(t,r);let c=a.requestBodyValue(t,r);const i=n.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]);if(!i)return!1;if(I.Map.isMap(c)&&(c=stringify(c.mapEntries((e=>I.Map.isMap(e[1])?[e[0],e[1].get(\"value\")]:e)).toJS())),I.List.isList(c)&&(c=stringify(c)),l){const e=getDefaultRequestBodyValue(i,l,a.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),s);o=!!c&&c!==e}return o})),ss=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyInclusion\"])||(0,I.Map)())),os=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"errors\"])||null)),ls=oas3_selectors_onlyOAS3(((e,t,r,a,n)=>e.getIn([\"examples\",t,r,a,n,\"activeExample\"])||null)),cs=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"requestContentType\"])||null)),is=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"responseContentType\"])||null)),ms=oas3_selectors_onlyOAS3(((e,t,r)=>{let a;if(\"string\"!=typeof t){const{server:e,namespace:n}=t;a=n?[n,\"serverVariableValues\",e,r]:[\"serverVariableValues\",e,r]}else{a=[\"serverVariableValues\",t,r]}return e.getIn(a)||null})),ps=oas3_selectors_onlyOAS3(((e,t)=>{let r;if(\"string\"!=typeof t){const{server:e,namespace:a}=t;r=a?[a,\"serverVariableValues\",e]:[\"serverVariableValues\",e]}else{r=[\"serverVariableValues\",t]}return e.getIn(r)||(0,I.OrderedMap)()})),us=oas3_selectors_onlyOAS3(((e,t)=>{var r,a;if(\"string\"!=typeof t){const{server:n,namespace:s}=t;a=n,r=s?e.getIn([s,\"serverVariableValues\",a]):e.getIn([\"serverVariableValues\",a])}else a=t,r=e.getIn([\"serverVariableValues\",a]);r=r||(0,I.OrderedMap)();let n=a;return r.map(((e,t)=>{n=n.replace(new RegExp(`{${es()(t)}}`,\"g\"),e)})),n})),ds=function validateRequestBodyIsRequired(e){return(...t)=>r=>{const a=r.getSystem().specSelectors.specJson();let n=[...t][1]||[];return!a.getIn([\"paths\",...n,\"requestBody\",\"required\"])||e(...t)}}(((e,t)=>((e,t)=>(t=t||[],!!e.getIn([\"requestData\",...t,\"bodyValue\"])))(e,t))),validateShallowRequired=(e,{oas3RequiredRequestBodyContentType:t,oas3RequestContentType:r,oas3RequestBodyValue:a})=>{let n=[];if(!I.Map.isMap(a))return n;let s=[];return Object.keys(t.requestContentType).forEach((e=>{if(e===r){t.requestContentType[e].forEach((e=>{s.indexOf(e)<0&&s.push(e)}))}})),s.forEach((e=>{a.getIn([e,\"value\"])||n.push(e)})),n},hs=mr()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),gs={[Ln]:(e,{payload:{selectedServerUrl:t,namespace:r}})=>{const a=r?[r,\"selectedServer\"]:[\"selectedServer\"];return e.setIn(a,t)},[Un]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;if(!I.Map.isMap(t))return e.setIn([\"requestData\",a,n,\"bodyValue\"],t);let s,o=e.getIn([\"requestData\",a,n,\"bodyValue\"])||(0,I.Map)();I.Map.isMap(o)||(o=(0,I.Map)());const[...l]=t.keys();return l.forEach((e=>{let r=t.getIn([e]);o.has(e)&&I.Map.isMap(r)||(s=o.setIn([e,\"value\"],r))})),e.setIn([\"requestData\",a,n,\"bodyValue\"],s)},[zn]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;return e.setIn([\"requestData\",a,n,\"retainBodyValue\"],t)},[Bn]:(e,{payload:{value:t,pathMethod:r,name:a}})=>{let[n,s]=r;return e.setIn([\"requestData\",n,s,\"bodyInclusion\",a],t)},[Fn]:(e,{payload:{name:t,pathMethod:r,contextType:a,contextName:n}})=>{let[s,o]=r;return e.setIn([\"examples\",s,o,a,n,\"activeExample\"],t)},[Wn]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;return e.setIn([\"requestData\",a,n,\"requestContentType\"],t)},[Hn]:(e,{payload:{value:t,path:r,method:a}})=>e.setIn([\"requestData\",r,a,\"responseContentType\"],t),[Xn]:(e,{payload:{server:t,namespace:r,key:a,val:n}})=>{const s=r?[r,\"serverVariableValues\",t,a]:[\"serverVariableValues\",t,a];return e.setIn(s,n)},[Gn]:(e,{payload:{path:t,method:r,validationErrors:a}})=>{let n=[];if(n.push(\"Required field is not provided\"),a.missingBodyValue)return e.setIn([\"requestData\",t,r,\"errors\"],(0,I.fromJS)(n));if(a.missingRequiredKeys&&a.missingRequiredKeys.length>0){const{missingRequiredKeys:s}=a;return e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,I.fromJS)({}),(e=>s.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,I.fromJS)(n))),e)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),e},[Yn]:(e,{payload:{path:t,method:r}})=>{const a=e.getIn([\"requestData\",t,r,\"bodyValue\"]);if(!I.Map.isMap(a))return e.setIn([\"requestData\",t,r,\"errors\"],(0,I.fromJS)([]));const[...n]=a.keys();return n?e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,I.fromJS)({}),(e=>n.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,I.fromJS)([]))),e))):e},[Qn]:(e,{payload:{pathMethod:t}})=>{let[r,a]=t;const n=e.getIn([\"requestData\",r,a,\"bodyValue\"]);return n?I.Map.isMap(n)?e.setIn([\"requestData\",r,a,\"bodyValue\"],(0,I.Map)()):e.setIn([\"requestData\",r,a,\"bodyValue\"],\"\"):e}};function oas3(){return{components:Mn,wrapComponents:Vn,statePlugins:{spec:{wrapSelectors:_,selectors:w},auth:{wrapSelectors:v},oas3:{actions:{...b},reducers:gs,selectors:{...C}}}}}const webhooks=({specSelectors:e,getComponent:t})=>{const r=e.selectWebhooksOperations(),a=Object.keys(r),n=t(\"OperationContainer\",!0);return 0===a.length?null:k().createElement(\"div\",{className:\"webhooks\"},k().createElement(\"h2\",null,\"Webhooks\"),a.map((e=>k().createElement(\"div\",{key:`${e}-webhook`},r[e].map((t=>k().createElement(n,{key:`${e}-${t.method}-webhook`,op:t.operation,tag:\"webhooks\",method:t.method,path:e,specPath:t.specPath,allowTryItOut:!1})))))))},components_license=({getComponent:e,specSelectors:t})=>{const r=t.selectLicenseNameField(),a=t.selectLicenseUrl(),n=e(\"Link\");return k().createElement(\"div\",{className:\"info__license\"},a?k().createElement(\"div\",{className:\"info__license__url\"},k().createElement(n,{target:\"_blank\",href:sanitizeUrl(a)},r)):k().createElement(\"span\",null,r))},components_contact=({getComponent:e,specSelectors:t})=>{const r=t.selectContactNameField(),a=t.selectContactUrl(),n=t.selectContactEmailField(),s=e(\"Link\");return k().createElement(\"div\",{className:\"info__contact\"},a&&k().createElement(\"div\",null,k().createElement(s,{href:sanitizeUrl(a),target:\"_blank\"},r,\" - Website\")),n&&k().createElement(s,{href:sanitizeUrl(`mailto:${n}`)},a?`Send email to ${r}`:`Contact ${r}`))},oas31_components_info=({getComponent:e,specSelectors:t})=>{const r=t.version(),a=t.url(),n=t.basePath(),s=t.host(),o=t.selectInfoSummaryField(),l=t.selectInfoDescriptionField(),c=t.selectInfoTitleField(),i=t.selectInfoTermsOfServiceUrl(),m=t.selectExternalDocsUrl(),p=t.selectExternalDocsDescriptionField(),u=t.contact(),d=t.license(),h=e(\"Markdown\",!0),g=e(\"Link\"),y=e(\"VersionStamp\"),f=e(\"OpenAPIVersion\"),S=e(\"InfoUrl\"),E=e(\"InfoBasePath\"),_=e(\"License\",!0),v=e(\"Contact\",!0),w=e(\"JsonSchemaDialect\",!0);return k().createElement(\"div\",{className:\"info\"},k().createElement(\"hgroup\",{className:\"main\"},k().createElement(\"h2\",{className:\"title\"},c,k().createElement(\"span\",null,r&&k().createElement(y,{version:r}),k().createElement(f,{oasVersion:\"3.1\"}))),(s||n)&&k().createElement(E,{host:s,basePath:n}),a&&k().createElement(S,{getComponent:e,url:a})),o&&k().createElement(\"p\",{className:\"info__summary\"},o),k().createElement(\"div\",{className:\"info__description description\"},k().createElement(h,{source:l})),i&&k().createElement(\"div\",{className:\"info__tos\"},k().createElement(g,{target:\"_blank\",href:sanitizeUrl(i)},\"Terms of service\")),u.size>0&&k().createElement(v,null),d.size>0&&k().createElement(_,null),m&&k().createElement(g,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(m)},p||m),k().createElement(w,null))},json_schema_dialect=({getComponent:e,specSelectors:t})=>{const r=t.selectJsonSchemaDialectField(),a=t.selectJsonSchemaDialectDefault(),n=e(\"Link\");return k().createElement(k().Fragment,null,r&&r===a&&k().createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",k().createElement(n,{target:\"_blank\",href:sanitizeUrl(r)},r)),r&&r!==a&&k().createElement(\"div\",{className:\"error-wrapper\"},k().createElement(\"div\",{className:\"no-margin\"},k().createElement(\"div\",{className:\"errors\"},k().createElement(\"div\",{className:\"errors-wrapper\"},k().createElement(\"h4\",{className:\"center\"},\"Warning\"),k().createElement(\"p\",{className:\"message\"},k().createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",k().createElement(n,{target:\"_blank\",href:a},a),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:e,isSwagger2:t,isOAS3:r,isOAS31:a,alsoShow:n,children:s})=>e?k().createElement(\"div\",null,s):t&&(r||a)?k().createElement(\"div\",{className:\"version-pragma\"},n,k().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},k().createElement(\"div\",null,k().createElement(\"h3\",null,\"Unable to render this definition\"),k().createElement(\"p\",null,k().createElement(\"code\",null,\"swagger\"),\" and \",k().createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),k().createElement(\"p\",null,\"Supported version fields are \",k().createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",k().createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",k().createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):t||r||a?k().createElement(\"div\",null,s):k().createElement(\"div\",{className:\"version-pragma\"},n,k().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},k().createElement(\"div\",null,k().createElement(\"h3\",null,\"Unable to render this definition\"),k().createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),k().createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",k().createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",k().createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",k().createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=e=>\"string\"==typeof e&&e.includes(\"#/components/schemas/\")?(e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}})(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,ys=(0,N.forwardRef)((({schema:e,getComponent:t,onToggle:r=(()=>{})},a)=>{const n=t(\"JSONSchema202012\"),s=getModelName(e.get(\"$$ref\")),o=(0,N.useCallback)(((e,t)=>{r(s,t)}),[s,r]);return k().createElement(n,{name:s,schema:e.toJS(),ref:a,onExpand:o})})),fs=ys,models=({specActions:e,specSelectors:t,layoutSelectors:r,layoutActions:a,getComponent:n,getConfigs:s})=>{const o=t.selectSchemas(),l=Object.keys(o).length>0,c=[\"components\",\"schemas\"],{docExpansion:i,defaultModelsExpandDepth:m}=s(),p=m>0&&\"none\"!==i,u=r.isShown(c,p),d=n(\"Collapse\"),h=n(\"JSONSchema202012\"),g=n(\"ArrowUpIcon\"),y=n(\"ArrowDownIcon\");(0,N.useEffect)((()=>{const r=u&&m>1,a=null!=t.specResolvedSubtree(c);r&&!a&&e.requestResolvedSubtree(c)}),[u,m]);const f=(0,N.useCallback)((()=>{a.show(c,!u)}),[u]),S=(0,N.useCallback)((e=>{null!==e&&a.readyToScroll(c,e)}),[]),handleJSONSchema202012Ref=e=>t=>{null!==t&&a.readyToScroll([...c,e],t)},handleJSONSchema202012Expand=r=>(a,n)=>{if(n){const a=[...c,r];null!=t.specResolvedSubtree(a)||e.requestResolvedSubtree([...c,r])}};return!l||m<0?null:k().createElement(\"section\",{className:Fa()(\"models\",{\"is-open\":u}),ref:S},k().createElement(\"h4\",null,k().createElement(\"button\",{\"aria-expanded\":u,className:\"models-control\",onClick:f},k().createElement(\"span\",null,\"Schemas\"),u?k().createElement(g,null):k().createElement(y,null))),k().createElement(d,{isOpened:u},Object.entries(o).map((([e,t])=>k().createElement(h,{key:e,ref:handleJSONSchema202012Ref(e),schema:t,name:e,onExpand:handleJSONSchema202012Expand(e)})))))},mutual_tls_auth=({schema:e,getComponent:t})=>{const r=t(\"JumpToPath\",!0);return k().createElement(\"div\",null,k().createElement(\"h4\",null,e.get(\"name\"),\" (mutualTLS)\",\" \",k().createElement(r,{path:[\"securityDefinitions\",e.get(\"name\")]})),k().createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),k().createElement(\"p\",null,e.get(\"description\")))};class auths_Auths extends k().Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,a=r.map(((e,t)=>t)).toArray();this.setState(a.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(a)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:a}=this.props;const n=t(\"AuthItem\"),s=t(\"oauth2\",!0),o=t(\"Button\"),l=r.authorized(),c=e.filter(((e,t)=>!!l.get(t))),i=e.filter((e=>\"oauth2\"!==e.get(\"type\")&&\"mutualTLS\"!==e.get(\"type\"))),m=e.filter((e=>\"oauth2\"===e.get(\"type\"))),p=e.filter((e=>\"mutualTLS\"===e.get(\"type\")));return k().createElement(\"div\",{className:\"auth-container\"},i.size>0&&k().createElement(\"form\",{onSubmit:this.submitAuth},i.map(((e,r)=>k().createElement(n,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a}))).toArray(),k().createElement(\"div\",{className:\"auth-btn-wrapper\"},i.size===c.size?k().createElement(o,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):k().createElement(o,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),k().createElement(o,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),m.size>0?k().createElement(\"div\",null,k().createElement(\"div\",{className:\"scope-def\"},k().createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),k().createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>k().createElement(\"div\",{key:t},k().createElement(s,{authorized:l,schema:e,name:t})))).toArray()):null,p.size>0&&k().createElement(\"div\",null,p.map(((e,r)=>k().createElement(n,{key:r,schema:e,name:r,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a}))).toArray()))}}const Ss=auths_Auths,isOAS31=e=>{const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(t)},fn_createOnlyOAS31Selector=e=>(t,...r)=>a=>{if(a.getSystem().specSelectors.isOAS31()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null},createOnlyOAS31SelectorWrapper=e=>(t,r)=>(a,...n)=>{if(r.getSystem().specSelectors.isOAS31()){const s=e(a,...n);return\"function\"==typeof s?s(t,r):s}return t(...n)},fn_createSystemSelector=e=>(t,...r)=>a=>{const n=e(t,a,...r);return\"function\"==typeof n?n(a):n},createOnlyOAS31ComponentWrapper=e=>(t,r)=>a=>r.specSelectors.isOAS31()?k().createElement(e,rt()({},a,{originalComponent:t,getSystem:r.getSystem})):k().createElement(t,a),Es=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31License\",!0);return k().createElement(t,null)})),_s=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Contact\",!0);return k().createElement(t,null)})),vs=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Info\",!0);return k().createElement(t,null)})),ws=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e(),{getComponent:a,fn:n,getConfigs:s}=r,o=s(),l=a(\"OAS31Model\"),c=a(\"JSONSchema202012\"),i=a(\"JSONSchema202012Keyword$schema\"),m=a(\"JSONSchema202012Keyword$vocabulary\"),p=a(\"JSONSchema202012Keyword$id\"),u=a(\"JSONSchema202012Keyword$anchor\"),d=a(\"JSONSchema202012Keyword$dynamicAnchor\"),h=a(\"JSONSchema202012Keyword$ref\"),g=a(\"JSONSchema202012Keyword$dynamicRef\"),y=a(\"JSONSchema202012Keyword$defs\"),f=a(\"JSONSchema202012Keyword$comment\"),S=a(\"JSONSchema202012KeywordAllOf\"),E=a(\"JSONSchema202012KeywordAnyOf\"),_=a(\"JSONSchema202012KeywordOneOf\"),v=a(\"JSONSchema202012KeywordNot\"),w=a(\"JSONSchema202012KeywordIf\"),b=a(\"JSONSchema202012KeywordThen\"),C=a(\"JSONSchema202012KeywordElse\"),x=a(\"JSONSchema202012KeywordDependentSchemas\"),O=a(\"JSONSchema202012KeywordPrefixItems\"),N=a(\"JSONSchema202012KeywordItems\"),A=a(\"JSONSchema202012KeywordContains\"),I=a(\"JSONSchema202012KeywordProperties\"),q=a(\"JSONSchema202012KeywordPatternProperties\"),j=a(\"JSONSchema202012KeywordAdditionalProperties\"),P=a(\"JSONSchema202012KeywordPropertyNames\"),M=a(\"JSONSchema202012KeywordUnevaluatedItems\"),R=a(\"JSONSchema202012KeywordUnevaluatedProperties\"),T=a(\"JSONSchema202012KeywordType\"),J=a(\"JSONSchema202012KeywordEnum\"),$=a(\"JSONSchema202012KeywordConst\"),K=a(\"JSONSchema202012KeywordConstraint\"),D=a(\"JSONSchema202012KeywordDependentRequired\"),V=a(\"JSONSchema202012KeywordContentSchema\"),L=a(\"JSONSchema202012KeywordTitle\"),U=a(\"JSONSchema202012KeywordDescription\"),z=a(\"JSONSchema202012KeywordDefault\"),B=a(\"JSONSchema202012KeywordDeprecated\"),F=a(\"JSONSchema202012KeywordReadOnly\"),W=a(\"JSONSchema202012KeywordWriteOnly\"),H=a(\"JSONSchema202012Accordion\"),X=a(\"JSONSchema202012ExpandDeepButton\"),G=a(\"JSONSchema202012ChevronRightIcon\"),Y=a(\"withJSONSchema202012Context\")(l,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:o.defaultModelExpandDepth,includeReadOnly:Boolean(t.includeReadOnly),includeWriteOnly:Boolean(t.includeWriteOnly)},components:{JSONSchema:c,Keyword$schema:i,Keyword$vocabulary:m,Keyword$id:p,Keyword$anchor:u,Keyword$dynamicAnchor:d,Keyword$ref:h,Keyword$dynamicRef:g,Keyword$defs:y,Keyword$comment:f,KeywordAllOf:S,KeywordAnyOf:E,KeywordOneOf:_,KeywordNot:v,KeywordIf:w,KeywordThen:b,KeywordElse:C,KeywordDependentSchemas:x,KeywordPrefixItems:O,KeywordItems:N,KeywordContains:A,KeywordProperties:I,KeywordPatternProperties:q,KeywordAdditionalProperties:j,KeywordPropertyNames:P,KeywordUnevaluatedItems:M,KeywordUnevaluatedProperties:R,KeywordType:T,KeywordEnum:J,KeywordConst:$,KeywordConstraint:K,KeywordDependentRequired:D,KeywordContentSchema:V,KeywordTitle:L,KeywordDescription:U,KeywordDefault:z,KeywordDeprecated:B,KeywordReadOnly:F,KeywordWriteOnly:W,Accordion:H,ExpandDeepButton:X,ChevronRightIcon:G},fn:{upperFirst:n.upperFirst,isExpandable:n.jsonSchema202012.isExpandable,getProperties:n.jsonSchema202012.getProperties}});return k().createElement(Y,t)})),bs=ws,Cs=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const{getComponent:t,fn:r,getConfigs:a}=e(),n=a();if(Cs.ModelsWithJSONSchemaContext)return k().createElement(Cs.ModelsWithJSONSchemaContext,null);const s=t(\"OAS31Models\",!0),o=t(\"JSONSchema202012\"),l=t(\"JSONSchema202012Keyword$schema\"),c=t(\"JSONSchema202012Keyword$vocabulary\"),i=t(\"JSONSchema202012Keyword$id\"),m=t(\"JSONSchema202012Keyword$anchor\"),p=t(\"JSONSchema202012Keyword$dynamicAnchor\"),u=t(\"JSONSchema202012Keyword$ref\"),d=t(\"JSONSchema202012Keyword$dynamicRef\"),h=t(\"JSONSchema202012Keyword$defs\"),g=t(\"JSONSchema202012Keyword$comment\"),y=t(\"JSONSchema202012KeywordAllOf\"),f=t(\"JSONSchema202012KeywordAnyOf\"),S=t(\"JSONSchema202012KeywordOneOf\"),E=t(\"JSONSchema202012KeywordNot\"),_=t(\"JSONSchema202012KeywordIf\"),v=t(\"JSONSchema202012KeywordThen\"),w=t(\"JSONSchema202012KeywordElse\"),b=t(\"JSONSchema202012KeywordDependentSchemas\"),C=t(\"JSONSchema202012KeywordPrefixItems\"),x=t(\"JSONSchema202012KeywordItems\"),O=t(\"JSONSchema202012KeywordContains\"),N=t(\"JSONSchema202012KeywordProperties\"),A=t(\"JSONSchema202012KeywordPatternProperties\"),I=t(\"JSONSchema202012KeywordAdditionalProperties\"),q=t(\"JSONSchema202012KeywordPropertyNames\"),j=t(\"JSONSchema202012KeywordUnevaluatedItems\"),P=t(\"JSONSchema202012KeywordUnevaluatedProperties\"),M=t(\"JSONSchema202012KeywordType\"),R=t(\"JSONSchema202012KeywordEnum\"),T=t(\"JSONSchema202012KeywordConst\"),J=t(\"JSONSchema202012KeywordConstraint\"),$=t(\"JSONSchema202012KeywordDependentRequired\"),K=t(\"JSONSchema202012KeywordContentSchema\"),D=t(\"JSONSchema202012KeywordTitle\"),V=t(\"JSONSchema202012KeywordDescription\"),L=t(\"JSONSchema202012KeywordDefault\"),U=t(\"JSONSchema202012KeywordDeprecated\"),z=t(\"JSONSchema202012KeywordReadOnly\"),B=t(\"JSONSchema202012KeywordWriteOnly\"),F=t(\"JSONSchema202012Accordion\"),W=t(\"JSONSchema202012ExpandDeepButton\"),H=t(\"JSONSchema202012ChevronRightIcon\"),X=t(\"withJSONSchema202012Context\");return Cs.ModelsWithJSONSchemaContext=X(s,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:n.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},components:{JSONSchema:o,Keyword$schema:l,Keyword$vocabulary:c,Keyword$id:i,Keyword$anchor:m,Keyword$dynamicAnchor:p,Keyword$ref:u,Keyword$dynamicRef:d,Keyword$defs:h,Keyword$comment:g,KeywordAllOf:y,KeywordAnyOf:f,KeywordOneOf:S,KeywordNot:E,KeywordIf:_,KeywordThen:v,KeywordElse:w,KeywordDependentSchemas:b,KeywordPrefixItems:C,KeywordItems:x,KeywordContains:O,KeywordProperties:N,KeywordPatternProperties:A,KeywordAdditionalProperties:I,KeywordPropertyNames:q,KeywordUnevaluatedItems:j,KeywordUnevaluatedProperties:P,KeywordType:M,KeywordEnum:R,KeywordConst:T,KeywordConstraint:J,KeywordDependentRequired:$,KeywordContentSchema:K,KeywordTitle:D,KeywordDescription:V,KeywordDefault:L,KeywordDeprecated:U,KeywordReadOnly:z,KeywordWriteOnly:B,Accordion:F,ExpandDeepButton:W,ChevronRightIcon:H},fn:{upperFirst:r.upperFirst,isExpandable:r.jsonSchema202012.isExpandable,getProperties:r.jsonSchema202012.getProperties}}),k().createElement(Cs.ModelsWithJSONSchemaContext,null)}));Cs.ModelsWithJSONSchemaContext=null;const xs=Cs,wrap_components_version_pragma_filter=(e,t)=>e=>{const r=t.specSelectors.isOAS31(),a=t.getComponent(\"OAS31VersionPragmaFilter\");return k().createElement(a,rt()({isOAS31:r},e))},Os=createOnlyOAS31ComponentWrapper((({originalComponent:e,...t})=>{const{getComponent:r,schema:a}=t,n=r(\"MutualTLSAuth\",!0);return\"mutualTLS\"===a.get(\"type\")?k().createElement(n,{schema:a}):k().createElement(e,t)})),Ns=Os,ks=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e().getComponent(\"OAS31Auths\",!0);return k().createElement(r,t)})),As=(0,I.Map)(),Is=(0,be.createSelector)(((e,t)=>t.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>e=>{const t=e.specSelectors.specJson().get(\"webhooks\");return I.Map.isMap(t)?t:As},qs=(0,be.createSelector)([(e,t)=>t.specSelectors.webhooks(),(e,t)=>t.specSelectors.validOperationMethods(),(e,t)=>t.specSelectors.specResolvedSubtree([\"webhooks\"])],((e,t)=>e.reduce(((e,r,a)=>{if(!I.Map.isMap(r))return e;const n=r.entrySeq().filter((([e])=>t.includes(e))).map((([e,t])=>({operation:(0,I.Map)({operation:t}),method:e,path:a,specPath:(0,I.List)([\"webhooks\",a,e])})));return e.concat(n)}),(0,I.List)()).groupBy((e=>e.path)).map((e=>e.toArray())).toObject())),selectors_license=()=>e=>{const t=e.specSelectors.info().get(\"license\");return I.Map.isMap(t)?t:As},selectLicenseNameField=()=>e=>e.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>e=>e.specSelectors.license().get(\"url\"),js=(0,be.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectLicenseIdentifierField=()=>e=>e.specSelectors.license().get(\"identifier\"),selectors_contact=()=>e=>{const t=e.specSelectors.info().get(\"contact\");return I.Map.isMap(t)?t:As},selectContactNameField=()=>e=>e.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>e=>e.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>e=>e.specSelectors.contact().get(\"url\"),Ps=(0,be.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectContactUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectInfoTitleField=()=>e=>e.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>e=>e.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>e=>e.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>e=>e.specSelectors.info().get(\"termsOfService\"),Ms=(0,be.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectInfoTermsOfServiceField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectExternalDocsDescriptionField=()=>e=>e.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>e=>e.specSelectors.externalDocs().get(\"url\"),Rs=(0,be.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectExternalDocsUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectJsonSchemaDialectField=()=>e=>e.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",Ts=(0,be.createSelector)(((e,t)=>t.specSelectors.definitions()),((e,t)=>t.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((e,t)=>I.Map.isMap(e)?I.Map.isMap(t)?Object.entries(e.toJS()).reduce(((e,[r,a])=>{const n=t.get(r);return e[r]=n?.toJS()||a,e}),{}):e.toJS():{})),wrap_selectors_isOAS3=(e,t)=>(r,...a)=>t.specSelectors.isOAS31()||e(...a),Js=createOnlyOAS31SelectorWrapper((()=>(e,t)=>t.oas31Selectors.selectLicenseUrl())),$s=createOnlyOAS31SelectorWrapper((()=>(e,t)=>{const r=t.specSelectors.securityDefinitions();let a=e();return r?(r.entrySeq().forEach((([e,t])=>{\"mutualTLS\"===t.get(\"type\")&&(a=a.push(new I.Map({[e]:t})))})),a):a})),Ks=(0,be.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField(),(e,t)=>t.specSelectors.selectLicenseIdentifierField()],((e,t,r,a)=>r?safeBuildUrl(r,e,{selectedServer:t}):a?`https://spdx.org/licenses/${a}.html`:void 0)),keywords_Example=({schema:e,getSystem:t})=>{const{fn:r}=t(),{hasKeyword:a,stringify:n}=r.jsonSchema202012.useFn();return a(e,\"example\")?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Example\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},n(e.example))):null},keywords_Xml=({schema:e,getSystem:t})=>{const r=e?.xml||{},{fn:a,getComponent:n}=t(),{useIsExpandedDeeply:s,useComponent:o}=a.jsonSchema202012,l=s(),c=!!(r.name||r.namespace||r.prefix),[i,m]=(0,N.useState)(l),[p,u]=(0,N.useState)(!1),d=o(\"Accordion\"),h=o(\"ExpandDeepButton\"),g=n(\"JSONSchema202012DeepExpansionContext\")(),y=(0,N.useCallback)((()=>{m((e=>!e))}),[]),f=(0,N.useCallback)(((e,t)=>{m(t),u(t)}),[]);return 0===Object.keys(r).length?null:k().createElement(g.Provider,{value:p},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\"},c?k().createElement(k().Fragment,null,k().createElement(d,{expanded:i,onChange:y},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),k().createElement(h,{expanded:i,onClick:f})):k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===r.attribute&&k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===r.wrapped&&k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!i})},i&&k().createElement(k().Fragment,null,r.name&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.name))),r.namespace&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.namespace))),r.prefix&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.prefix)))))))},Discriminator_DiscriminatorMapping=({discriminator:e})=>{const t=e?.mapping||{};return 0===Object.keys(t).length?null:Object.entries(t).map((([e,t])=>k().createElement(\"div\",{key:`${e}-${t}`,className:\"json-schema-2020-12-keyword\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},e),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},t))))},Discriminator_Discriminator=({schema:e,getSystem:t})=>{const r=e?.discriminator||{},{fn:a,getComponent:n}=t(),{useIsExpandedDeeply:s,useComponent:o}=a.jsonSchema202012,l=s(),c=!!r.mapping,[i,m]=(0,N.useState)(l),[p,u]=(0,N.useState)(!1),d=o(\"Accordion\"),h=o(\"ExpandDeepButton\"),g=n(\"JSONSchema202012DeepExpansionContext\")(),y=(0,N.useCallback)((()=>{m((e=>!e))}),[]),f=(0,N.useCallback)(((e,t)=>{m(t),u(t)}),[]);return 0===Object.keys(r).length?null:k().createElement(g.Provider,{value:p},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\"},c?k().createElement(k().Fragment,null,k().createElement(d,{expanded:i,onChange:y},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),k().createElement(h,{expanded:i,onClick:f})):k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),r.propertyName&&k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},r.propertyName),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!i})},i&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(Discriminator_DiscriminatorMapping,{discriminator:r})))))},keywords_ExternalDocs=({schema:e,getSystem:t})=>{const r=e?.externalDocs||{},{fn:a,getComponent:n}=t(),{useIsExpandedDeeply:s,useComponent:o}=a.jsonSchema202012,l=s(),c=!(!r.description&&!r.url),[i,m]=(0,N.useState)(l),[p,u]=(0,N.useState)(!1),d=o(\"Accordion\"),h=o(\"ExpandDeepButton\"),g=n(\"JSONSchema202012KeywordDescription\"),y=n(\"Link\"),f=n(\"JSONSchema202012DeepExpansionContext\")(),S=(0,N.useCallback)((()=>{m((e=>!e))}),[]),E=(0,N.useCallback)(((e,t)=>{m(t),u(t)}),[]);return 0===Object.keys(r).length?null:k().createElement(f.Provider,{value:p},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\"},c?k().createElement(k().Fragment,null,k().createElement(d,{expanded:i,onChange:S},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),k().createElement(h,{expanded:i,onClick:E})):k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!i})},i&&k().createElement(k().Fragment,null,r.description&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(g,{schema:r,getSystem:t})),r.url&&k().createElement(\"li\",{className:\"json-schema-2020-12-property\"},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},k().createElement(y,{target:\"_blank\",href:sanitizeUrl(r.url)},r.url))))))))},keywords_Description=({schema:e,getSystem:t})=>{if(!e?.description)return null;const{getComponent:r}=t(),a=r(\"Markdown\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},k().createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},k().createElement(a,{source:e.description})))},Ds=createOnlyOAS31ComponentWrapper(keywords_Description),Vs=createOnlyOAS31ComponentWrapper((({schema:e,getSystem:t,originalComponent:r})=>{const{getComponent:a}=t(),n=a(\"JSONSchema202012KeywordDiscriminator\"),s=a(\"JSONSchema202012KeywordXml\"),o=a(\"JSONSchema202012KeywordExample\"),l=a(\"JSONSchema202012KeywordExternalDocs\");return k().createElement(k().Fragment,null,k().createElement(r,{schema:e}),k().createElement(n,{schema:e,getSystem:t}),k().createElement(s,{schema:e,getSystem:t}),k().createElement(l,{schema:e,getSystem:t}),k().createElement(o,{schema:e,getSystem:t}))})),Ls=Vs,keywords_Properties=({schema:e,getSystem:t})=>{const{fn:r}=t(),{useComponent:a}=r.jsonSchema202012,{getDependentRequired:n,getProperties:s}=r.jsonSchema202012.useFn(),o=r.jsonSchema202012.useConfig(),l=Array.isArray(e?.required)?e.required:[],c=a(\"JSONSchema\"),i=s(e,o);return 0===Object.keys(i).length?null:k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},k().createElement(\"ul\",null,Object.entries(i).map((([t,r])=>{const a=l.includes(t),s=n(t,e);return k().createElement(\"li\",{key:t,className:Fa()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":a})},k().createElement(c,{name:t,schema:r,dependentRequired:s}))}))))},Us=createOnlyOAS31ComponentWrapper(keywords_Properties),getProperties=(e,{includeReadOnly:t,includeWriteOnly:r})=>{if(!e?.properties)return{};const a=Object.entries(e.properties).filter((([,e])=>(!(!0===e?.readOnly)||t)&&(!(!0===e?.writeOnly)||r)));return Object.fromEntries(a)};const zs=function afterLoad({fn:e,getSystem:t}){if(e.jsonSchema202012){const r=((e,t)=>{const{fn:r}=t();if(\"function\"!=typeof e)return null;const{hasKeyword:a}=r.jsonSchema202012;return t=>e(t)||a(t,\"example\")||t?.xml||t?.discriminator||t?.externalDocs})(e.jsonSchema202012.isExpandable,t);Object.assign(this.fn.jsonSchema202012,{isExpandable:r,getProperties})}if(\"function\"==typeof e.sampleFromSchema&&e.jsonSchema202012){const r=((e,t)=>{const{fn:r,specSelectors:a}=t;return Object.fromEntries(Object.entries(e).map((([e,t])=>{const n=r[e];return[e,(...e)=>a.isOAS31()?t(...e):\"function\"==typeof n?n(...e):void 0]})))})({sampleFromSchema:e.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:e.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:e.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:e.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:e.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:e.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:e.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:e.jsonSchema202012.getXmlSampleSchema,getSampleSchema:e.jsonSchema202012.getSampleSchema},t());Object.assign(this.fn,r)}},oas31=({fn:e})=>{const t=e.createSystemSelector||fn_createSystemSelector,r=e.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:zs,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:components_license,OAS31Contact:components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:fs,OAS31Models:models,OAS31Auths:Ss,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs},wrapComponents:{InfoContainer:vs,License:Es,Contact:_s,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:bs,Models:xs,AuthItem:Ns,auths:ks,JSONSchema202012KeywordDescription:Ds,JSONSchema202012KeywordDefault:Ls,JSONSchema202012KeywordProperties:Us},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:$s}},spec:{selectors:{isOAS31:t(Is),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:r(selectLicenseIdentifierField),selectLicenseUrl:t(js),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:t(Ps),selectInfoTitleField,selectInfoSummaryField:r(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:t(Ms),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:t(Rs),webhooks:r(selectors_webhooks),selectWebhooksOperations:r(t(qs)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:t(Ts)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:Js}},oas31:{selectors:{selectLicenseUrl:r(t(Ks))}}}}},Bs=Ae().object,Fs=Ae().bool,Ws=(Ae().oneOfType([Bs,Fs]),(0,N.createContext)(null));Ws.displayName=\"JSONSchemaContext\";const Hs=(0,N.createContext)(0);Hs.displayName=\"JSONSchemaLevelContext\";const Xs=(0,N.createContext)(!1);Xs.displayName=\"JSONSchemaDeepExpansionContext\";const Gs=(0,N.createContext)(new Set),useConfig=()=>{const{config:e}=(0,N.useContext)(Ws);return e},useComponent=e=>{const{components:t}=(0,N.useContext)(Ws);return t[e]||null},useFn=(e=void 0)=>{const{fn:t}=(0,N.useContext)(Ws);return void 0!==e?t[e]:t},useLevel=()=>{const e=(0,N.useContext)(Hs);return[e,e+1]},useIsExpanded=()=>{const[e]=useLevel(),{defaultExpandedLevels:t}=useConfig();return t-e>0},useIsExpandedDeeply=()=>(0,N.useContext)(Xs),useRenderedSchemas=(e=void 0)=>{if(void 0===e)return(0,N.useContext)(Gs);const t=(0,N.useContext)(Gs);return new Set([...t,e])},Ys=(0,N.forwardRef)((({schema:e,name:t=\"\",dependentRequired:r=[],onExpand:a=(()=>{})},n)=>{const s=useFn(),o=useIsExpanded(),l=useIsExpandedDeeply(),[c,i]=(0,N.useState)(o||l),[m,p]=(0,N.useState)(l),[u,d]=useLevel(),h=(()=>{const[e]=useLevel();return e>0})(),g=s.isExpandable(e)||r.length>0,y=(e=>useRenderedSchemas().has(e))(e),f=useRenderedSchemas(e),S=s.stringifyConstraints(e),E=useComponent(\"Accordion\"),_=useComponent(\"Keyword$schema\"),v=useComponent(\"Keyword$vocabulary\"),w=useComponent(\"Keyword$id\"),b=useComponent(\"Keyword$anchor\"),C=useComponent(\"Keyword$dynamicAnchor\"),x=useComponent(\"Keyword$ref\"),O=useComponent(\"Keyword$dynamicRef\"),A=useComponent(\"Keyword$defs\"),I=useComponent(\"Keyword$comment\"),q=useComponent(\"KeywordAllOf\"),j=useComponent(\"KeywordAnyOf\"),P=useComponent(\"KeywordOneOf\"),M=useComponent(\"KeywordNot\"),R=useComponent(\"KeywordIf\"),T=useComponent(\"KeywordThen\"),J=useComponent(\"KeywordElse\"),$=useComponent(\"KeywordDependentSchemas\"),K=useComponent(\"KeywordPrefixItems\"),D=useComponent(\"KeywordItems\"),V=useComponent(\"KeywordContains\"),L=useComponent(\"KeywordProperties\"),U=useComponent(\"KeywordPatternProperties\"),z=useComponent(\"KeywordAdditionalProperties\"),B=useComponent(\"KeywordPropertyNames\"),F=useComponent(\"KeywordUnevaluatedItems\"),W=useComponent(\"KeywordUnevaluatedProperties\"),H=useComponent(\"KeywordType\"),X=useComponent(\"KeywordEnum\"),G=useComponent(\"KeywordConst\"),Y=useComponent(\"KeywordConstraint\"),Q=useComponent(\"KeywordDependentRequired\"),Z=useComponent(\"KeywordContentSchema\"),ee=useComponent(\"KeywordTitle\"),te=useComponent(\"KeywordDescription\"),re=useComponent(\"KeywordDefault\"),ae=useComponent(\"KeywordDeprecated\"),ne=useComponent(\"KeywordReadOnly\"),se=useComponent(\"KeywordWriteOnly\"),oe=useComponent(\"ExpandDeepButton\");(0,N.useEffect)((()=>{p(l)}),[l]),(0,N.useEffect)((()=>{p(m)}),[m]);const le=(0,N.useCallback)(((e,t)=>{i(t),!t&&p(!1),a(e,t,!1)}),[a]),ce=(0,N.useCallback)(((e,t)=>{i(t),p(t),a(e,t,!0)}),[a]);return k().createElement(Hs.Provider,{value:d},k().createElement(Xs.Provider,{value:m},k().createElement(Gs.Provider,{value:f},k().createElement(\"article\",{ref:n,\"data-json-schema-level\":u,className:Fa()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":h,\"json-schema-2020-12--circular\":y})},k().createElement(\"div\",{className:\"json-schema-2020-12-head\"},g&&!y?k().createElement(k().Fragment,null,k().createElement(E,{expanded:c,onChange:le},k().createElement(ee,{title:t,schema:e})),k().createElement(oe,{expanded:c,onClick:ce})):k().createElement(ee,{title:t,schema:e}),k().createElement(ae,{schema:e}),k().createElement(ne,{schema:e}),k().createElement(se,{schema:e}),k().createElement(H,{schema:e,isCircular:y}),S.length>0&&S.map((e=>k().createElement(Y,{key:`${e.scope}-${e.value}`,constraint:e})))),k().createElement(\"div\",{className:Fa()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!c})},c&&k().createElement(k().Fragment,null,k().createElement(te,{schema:e}),!y&&g&&k().createElement(k().Fragment,null,k().createElement(L,{schema:e}),k().createElement(U,{schema:e}),k().createElement(z,{schema:e}),k().createElement(W,{schema:e}),k().createElement(B,{schema:e}),k().createElement(q,{schema:e}),k().createElement(j,{schema:e}),k().createElement(P,{schema:e}),k().createElement(M,{schema:e}),k().createElement(R,{schema:e}),k().createElement(T,{schema:e}),k().createElement(J,{schema:e}),k().createElement($,{schema:e}),k().createElement(K,{schema:e}),k().createElement(D,{schema:e}),k().createElement(F,{schema:e}),k().createElement(V,{schema:e}),k().createElement(Z,{schema:e})),k().createElement(X,{schema:e}),k().createElement(G,{schema:e}),k().createElement(Q,{schema:e,dependentRequired:r}),k().createElement(re,{schema:e}),k().createElement(_,{schema:e}),k().createElement(v,{schema:e}),k().createElement(w,{schema:e}),k().createElement(b,{schema:e}),k().createElement(C,{schema:e}),k().createElement(x,{schema:e}),!y&&g&&k().createElement(A,{schema:e}),k().createElement(O,{schema:e}),k().createElement(I,{schema:e})))))))})),Qs=Ys,keywords_$schema=({schema:e})=>e?.$schema?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$schema)):null,$vocabulary_$vocabulary=({schema:e})=>{const t=useIsExpanded(),r=useIsExpandedDeeply(),[a,n]=(0,N.useState)(t||r),s=useComponent(\"Accordion\"),o=(0,N.useCallback)((()=>{n((e=>!e))}),[]);return e?.$vocabulary?\"object\"!=typeof e.$vocabulary?null:k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},k().createElement(s,{expanded:a,onChange:o},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",null,a&&Object.entries(e.$vocabulary).map((([e,t])=>k().createElement(\"li\",{key:e,className:Fa()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!t})},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e)))))):null},keywords_$id=({schema:e})=>e?.$id?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$id)):null,keywords_$anchor=({schema:e})=>e?.$anchor?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$anchor)):null,keywords_$dynamicAnchor=({schema:e})=>e?.$dynamicAnchor?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicAnchor)):null,keywords_$ref=({schema:e})=>e?.$ref?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$ref)):null,keywords_$dynamicRef=({schema:e})=>e?.$dynamicRef?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicRef)):null,keywords_$defs=({schema:e})=>{const t=e?.$defs||{},r=useIsExpanded(),a=useIsExpandedDeeply(),[n,s]=(0,N.useState)(r||a),[o,l]=(0,N.useState)(!1),c=useComponent(\"Accordion\"),i=useComponent(\"ExpandDeepButton\"),m=useComponent(\"JSONSchema\"),p=(0,N.useCallback)((()=>{s((e=>!e))}),[]),u=(0,N.useCallback)(((e,t)=>{s(t),l(t)}),[]);return 0===Object.keys(t).length?null:k().createElement(Xs.Provider,{value:o},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\"},k().createElement(c,{expanded:n,onChange:p},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),k().createElement(i,{expanded:n,onClick:u}),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!n})},n&&k().createElement(k().Fragment,null,Object.entries(t).map((([e,t])=>k().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},k().createElement(m,{name:e,schema:t}))))))))},keywords_$comment=({schema:e})=>e?.$comment?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$comment)):null,keywords_AllOf=({schema:e})=>{const t=e?.allOf||[],r=useFn(),a=useIsExpanded(),n=useIsExpandedDeeply(),[s,o]=(0,N.useState)(a||n),[l,c]=(0,N.useState)(!1),i=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),u=useComponent(\"KeywordType\"),d=(0,N.useCallback)((()=>{o((e=>!e))}),[]),h=(0,N.useCallback)(((e,t)=>{o(t),c(t)}),[]);return Array.isArray(t)&&0!==t.length?k().createElement(Xs.Provider,{value:l},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\"},k().createElement(i,{expanded:s,onChange:d},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),k().createElement(m,{expanded:s,onClick:h}),k().createElement(u,{schema:{allOf:t}}),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&k().createElement(k().Fragment,null,t.map(((e,t)=>k().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},k().createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null},keywords_AnyOf=({schema:e})=>{const t=e?.anyOf||[],r=useFn(),a=useIsExpanded(),n=useIsExpandedDeeply(),[s,o]=(0,N.useState)(a||n),[l,c]=(0,N.useState)(!1),i=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),u=useComponent(\"KeywordType\"),d=(0,N.useCallback)((()=>{o((e=>!e))}),[]),h=(0,N.useCallback)(((e,t)=>{o(t),c(t)}),[]);return Array.isArray(t)&&0!==t.length?k().createElement(Xs.Provider,{value:l},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\"},k().createElement(i,{expanded:s,onChange:d},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),k().createElement(m,{expanded:s,onClick:h}),k().createElement(u,{schema:{anyOf:t}}),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&k().createElement(k().Fragment,null,t.map(((e,t)=>k().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},k().createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null},keywords_OneOf=({schema:e})=>{const t=e?.oneOf||[],r=useFn(),a=useIsExpanded(),n=useIsExpandedDeeply(),[s,o]=(0,N.useState)(a||n),[l,c]=(0,N.useState)(!1),i=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),u=useComponent(\"KeywordType\"),d=(0,N.useCallback)((()=>{o((e=>!e))}),[]),h=(0,N.useCallback)(((e,t)=>{o(t),c(t)}),[]);return Array.isArray(t)&&0!==t.length?k().createElement(Xs.Provider,{value:l},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\"},k().createElement(i,{expanded:s,onChange:d},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),k().createElement(m,{expanded:s,onClick:h}),k().createElement(u,{schema:{oneOf:t}}),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&k().createElement(k().Fragment,null,t.map(((e,t)=>k().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},k().createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null},keywords_Not=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"not\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},k().createElement(r,{name:a,schema:e.not}))},keywords_If=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"if\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},k().createElement(r,{name:a,schema:e.if}))},keywords_Then=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"then\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},k().createElement(r,{name:a,schema:e.then}))},keywords_Else=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"else\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},k().createElement(r,{name:a,schema:e.else}))},keywords_DependentSchemas=({schema:e})=>{const t=e?.dependentSchemas||[],r=useIsExpanded(),a=useIsExpandedDeeply(),[n,s]=(0,N.useState)(r||a),[o,l]=(0,N.useState)(!1),c=useComponent(\"Accordion\"),i=useComponent(\"ExpandDeepButton\"),m=useComponent(\"JSONSchema\"),p=(0,N.useCallback)((()=>{s((e=>!e))}),[]),u=(0,N.useCallback)(((e,t)=>{s(t),l(t)}),[]);return\"object\"!=typeof t||0===Object.keys(t).length?null:k().createElement(Xs.Provider,{value:o},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\"},k().createElement(c,{expanded:n,onChange:p},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),k().createElement(i,{expanded:n,onClick:u}),k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!n})},n&&k().createElement(k().Fragment,null,Object.entries(t).map((([e,t])=>k().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},k().createElement(m,{name:e,schema:t}))))))))},keywords_PrefixItems=({schema:e})=>{const t=e?.prefixItems||[],r=useFn(),a=useIsExpanded(),n=useIsExpandedDeeply(),[s,o]=(0,N.useState)(a||n),[l,c]=(0,N.useState)(!1),i=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),u=useComponent(\"KeywordType\"),d=(0,N.useCallback)((()=>{o((e=>!e))}),[]),h=(0,N.useCallback)(((e,t)=>{o(t),c(t)}),[]);return Array.isArray(t)&&0!==t.length?k().createElement(Xs.Provider,{value:l},k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\"},k().createElement(i,{expanded:s,onChange:d},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),k().createElement(m,{expanded:s,onClick:h}),k().createElement(u,{schema:{prefixItems:t}}),k().createElement(\"ul\",{className:Fa()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&k().createElement(k().Fragment,null,t.map(((e,t)=>k().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},k().createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e})))))))):null},keywords_Items=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"items\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},k().createElement(r,{name:a,schema:e.items}))},keywords_Contains=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contains\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},k().createElement(r,{name:a,schema:e.contains}))},keywords_Properties_Properties=({schema:e})=>{const t=useFn(),r=e?.properties||{},a=Array.isArray(e?.required)?e.required:[],n=useComponent(\"JSONSchema\");return 0===Object.keys(r).length?null:k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},k().createElement(\"ul\",null,Object.entries(r).map((([r,s])=>{const o=a.includes(r),l=t.getDependentRequired(r,e);return k().createElement(\"li\",{key:r,className:Fa()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":o})},k().createElement(n,{name:r,schema:s,dependentRequired:l}))}))))},PatternProperties_PatternProperties=({schema:e})=>{const t=e?.patternProperties||{},r=useComponent(\"JSONSchema\");return 0===Object.keys(t).length?null:k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},k().createElement(\"ul\",null,Object.entries(t).map((([e,t])=>k().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},k().createElement(r,{name:e,schema:t}))))))},keywords_AdditionalProperties=({schema:e})=>{const t=useFn(),{additionalProperties:r}=e,a=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"additionalProperties\"))return null;const n=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===r?k().createElement(k().Fragment,null,n,k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===r?k().createElement(k().Fragment,null,n,k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):k().createElement(a,{name:n,schema:r}))},keywords_PropertyNames=({schema:e})=>{const t=useFn(),{propertyNames:r}=e,a=useComponent(\"JSONSchema\"),n=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return t.hasKeyword(e,\"propertyNames\")?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},k().createElement(a,{name:n,schema:r})):null},keywords_UnevaluatedItems=({schema:e})=>{const t=useFn(),{unevaluatedItems:r}=e,a=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedItems\"))return null;const n=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},k().createElement(a,{name:n,schema:r}))},keywords_UnevaluatedProperties=({schema:e})=>{const t=useFn(),{unevaluatedProperties:r}=e,a=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedProperties\"))return null;const n=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},k().createElement(a,{name:n,schema:r}))},keywords_Type=({schema:e,isCircular:t=!1})=>{const r=useFn().getType(e),a=t?\" [circular]\":\"\";return k().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${r}${a}`)},Enum_Enum=({schema:e})=>{const t=useFn();return Array.isArray(e?.enum)?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Allowed values\"),k().createElement(\"ul\",null,e.enum.map((e=>{const r=t.stringify(e);return k().createElement(\"li\",{key:r},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},r))})))):null},keywords_Const=({schema:e})=>{const t=useFn();return t.hasKeyword(e,\"const\")?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Const\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},t.stringify(e.const))):null},Constraint=({constraint:e})=>k().createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`},e.value),Zs=k().memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:e})=>0===e.length?null:k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),k().createElement(\"ul\",null,e.map((e=>k().createElement(\"li\",{key:e},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},e)))))),keywords_ContentSchema=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contentSchema\"))return null;const a=k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},k().createElement(r,{name:a,schema:e.contentSchema}))},Title_Title=({title:e=\"\",schema:t})=>{const r=useFn();return e||r.getTitle(t)?k().createElement(\"div\",{className:\"json-schema-2020-12__title\"},e||r.getTitle(t)):null},keywords_Description_Description=({schema:e})=>e?.description?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},k().createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},e.description)):null,keywords_Default=({schema:e})=>{const t=useFn();return t.hasKeyword(e,\"default\")?k().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"},k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Default\"),k().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"},t.stringify(e.default))):null},keywords_Deprecated=({schema:e})=>!0!==e?.deprecated?null:k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:e})=>!0!==e?.readOnly?null:k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:e})=>!0!==e?.writeOnly?null:k().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),Accordion_Accordion=({expanded:e=!1,children:t,onChange:r})=>{const a=useComponent(\"ChevronRightIcon\"),n=(0,N.useCallback)((t=>{r(t,!e)}),[e,r]);return k().createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:n},k().createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},t),k().createElement(\"span\",{className:Fa()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":e,\"json-schema-2020-12-accordion__icon--collapsed\":!e})},k().createElement(a,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:e,onClick:t})=>{const r=(0,N.useCallback)((r=>{t(r,!e)}),[e,t]);return k().createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:r},e?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>k().createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},k().createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),fn_upperFirst=e=>\"string\"==typeof e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,getTitle=e=>{const t=useFn();return e?.title?t.upperFirst(e.title):e?.$anchor?t.upperFirst(e.$anchor):e?.$id?e.$id:\"\"},getType=(e,t=new WeakSet)=>{const r=useFn();if(null==e)return\"any\";if(r.isBooleanJSONSchema(e))return e?\"any\":\"never\";if(\"object\"!=typeof e)return\"any\";if(t.has(e))return\"any\";t.add(e);const{type:a,prefixItems:n,items:s}=e,getArrayType=()=>{if(Array.isArray(n)){const e=n.map((e=>getType(e,t))),r=s?getType(s,t):\"any\";return`array<[${e.join(\", \")}], ${r}>`}if(s){return`array<${getType(s,t)}>`}return\"array<any>\"};if(e.not&&\"any\"===getType(e.not))return\"never\";const handleCombiningKeywords=(r,a)=>{if(Array.isArray(e[r])){return`(${e[r].map((e=>getType(e,t))).join(a)})`}return null},o=[Array.isArray(a)?a.map((e=>\"array\"===e?getArrayType():e)).join(\" | \"):\"array\"===a?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(a)?a:(()=>{if(Object.hasOwn(e,\"prefixItems\")||Object.hasOwn(e,\"items\")||Object.hasOwn(e,\"contains\"))return getArrayType();if(Object.hasOwn(e,\"properties\")||Object.hasOwn(e,\"additionalProperties\")||Object.hasOwn(e,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(e.format))return\"integer\";if([\"float\",\"double\"].includes(e.format))return\"number\";if(Object.hasOwn(e,\"minimum\")||Object.hasOwn(e,\"maximum\")||Object.hasOwn(e,\"exclusiveMinimum\")||Object.hasOwn(e,\"exclusiveMaximum\")||Object.hasOwn(e,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(e,\"pattern\")||Object.hasOwn(e,\"format\")||Object.hasOwn(e,\"minLength\")||Object.hasOwn(e,\"maxLength\"))return\"string\";if(void 0!==e.const){if(null===e.const)return\"null\";if(\"boolean\"==typeof e.const)return\"boolean\";if(\"number\"==typeof e.const)return Number.isInteger(e.const)?\"integer\":\"number\";if(\"string\"==typeof e.const)return\"string\";if(Array.isArray(e.const))return\"array<any>\";if(\"object\"==typeof e.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return t.delete(e),o||\"any\"},isBooleanJSONSchema=e=>\"boolean\"==typeof e,hasKeyword=(e,t)=>null!==e&&\"object\"==typeof e&&Object.hasOwn(e,t),isExpandable=e=>{const t=useFn();return e?.$schema||e?.$vocabulary||e?.$id||e?.$anchor||e?.$dynamicAnchor||e?.$ref||e?.$dynamicRef||e?.$defs||e?.$comment||e?.allOf||e?.anyOf||e?.oneOf||t.hasKeyword(e,\"not\")||t.hasKeyword(e,\"if\")||t.hasKeyword(e,\"then\")||t.hasKeyword(e,\"else\")||e?.dependentSchemas||e?.prefixItems||t.hasKeyword(e,\"items\")||t.hasKeyword(e,\"contains\")||e?.properties||e?.patternProperties||t.hasKeyword(e,\"additionalProperties\")||t.hasKeyword(e,\"propertyNames\")||t.hasKeyword(e,\"unevaluatedItems\")||t.hasKeyword(e,\"unevaluatedProperties\")||e?.description||e?.enum||t.hasKeyword(e,\"const\")||t.hasKeyword(e,\"contentSchema\")||t.hasKeyword(e,\"default\")},fn_stringify=e=>null===e||[\"number\",\"bigint\",\"boolean\"].includes(typeof e)?String(e):Array.isArray(e)?`[${e.map(fn_stringify).join(\", \")}]`:JSON.stringify(e),stringifyConstraintRange=(e,t,r)=>{const a=\"number\"==typeof t,n=\"number\"==typeof r;return a&&n?t===r?`${t} ${e}`:`[${t}, ${r}] ${e}`:a?`>= ${t} ${e}`:n?`<= ${r} ${e}`:null},stringifyConstraints=e=>{const t=[],r=(e=>{if(\"number\"!=typeof e?.multipleOf)return null;if(e.multipleOf<=0)return null;if(1===e.multipleOf)return null;const{multipleOf:t}=e;if(Number.isInteger(t))return`multiple of ${t}`;const r=10**t.toString().split(\".\")[1].length;return`multiple of ${t*r}/${r}`})(e);null!==r&&t.push({scope:\"number\",value:r});const a=(e=>{const t=e?.minimum,r=e?.maximum,a=e?.exclusiveMinimum,n=e?.exclusiveMaximum,s=\"number\"==typeof t,o=\"number\"==typeof r,l=\"number\"==typeof a,c=\"number\"==typeof n,i=l&&(!s||t<a),m=c&&(!o||r>n);if((s||l)&&(o||c))return`${i?\"(\":\"[\"}${i?a:t}, ${m?n:r}${m?\")\":\"]\"}`;if(s||l)return`${i?\">\":\"≥\"} ${i?a:t}`;if(o||c)return`${m?\"<\":\"≤\"} ${m?n:r}`;return null})(e);null!==a&&t.push({scope:\"number\",value:a}),e?.format&&t.push({scope:\"string\",value:e.format});const n=stringifyConstraintRange(\"characters\",e?.minLength,e?.maxLength);null!==n&&t.push({scope:\"string\",value:n}),e?.pattern&&t.push({scope:\"string\",value:`matches ${e?.pattern}`}),e?.contentMediaType&&t.push({scope:\"string\",value:`media type: ${e.contentMediaType}`}),e?.contentEncoding&&t.push({scope:\"string\",value:`encoding: ${e.contentEncoding}`});const s=stringifyConstraintRange(e?.hasUniqueItems?\"unique items\":\"items\",e?.minItems,e?.maxItems);null!==s&&t.push({scope:\"array\",value:s});const o=stringifyConstraintRange(\"contained items\",e?.minContains,e?.maxContains);null!==o&&t.push({scope:\"array\",value:o});const l=stringifyConstraintRange(\"properties\",e?.minProperties,e?.maxProperties);return null!==l&&t.push({scope:\"object\",value:l}),t},getDependentRequired=(e,t)=>t?.dependentRequired?Array.from(Object.entries(t.dependentRequired).reduce(((t,[r,a])=>Array.isArray(a)&&a.includes(e)?(t.add(r),t):t),new Set)):[],withJSONSchemaContext=(e,t={})=>{const r={components:{JSONSchema:Qs,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:keywords_Const,KeywordConstraint:Zs,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:keywords_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...t.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,...t.config},fn:{upperFirst:fn_upperFirst,getTitle,getType,isBooleanJSONSchema,hasKeyword,isExpandable,stringify:fn_stringify,stringifyConstraints,getDependentRequired,...t.fn}},HOC=t=>k().createElement(Ws.Provider,{value:r},k().createElement(e,t));return HOC.contexts={JSONSchemaContext:Ws},HOC.displayName=e.displayName,HOC},json_schema_2020_12=()=>({components:{JSONSchema202012:Qs,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:keywords_Const,JSONSchema202012KeywordConstraint:Zs,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:keywords_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,JSONSchema202012DeepExpansionContext:()=>Xs},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{isExpandable,hasKeyword,useFn,useConfig,useComponent,useIsExpandedDeeply}}}),eo=require(\"lodash/isPlainObject\");var to=__webpack_require__.n(eo);const array=(e,{sample:t})=>((e,t={})=>{const{minItems:r,maxItems:a,uniqueItems:n}=t,{contains:s,minContains:o,maxContains:l}=t;let c=[...e];if(null!=s&&\"object\"==typeof s){if(Number.isInteger(o)&&o>1){const e=c.at(0);for(let t=1;t<o;t+=1)c.unshift(e)}Number.isInteger(l)}if(Number.isInteger(a)&&a>0&&(c=e.slice(0,a)),Number.isInteger(r)&&r>0)for(let e=0;c.length<r;e+=1)c.push(c[e%c.length]);return!0===n&&(c=Array.from(new Set(c))),c})(t,e),object=()=>{throw new Error(\"Not implemented\")},bytes=e=>ne()(e),pick=e=>e.at(0),predicates_isBooleanJSONSchema=e=>\"boolean\"==typeof e,isJSONSchemaObject=e=>to()(e),isJSONSchema=e=>predicates_isBooleanJSONSchema(e)||isJSONSchemaObject(e),email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const ro=class Registry{data={};register(e,t){this.data[e]=t}unregister(e){void 0===e?this.data={}:delete this.data[e]}get(e){return this.data[e]}},ao=new ro,api_formatAPI=(e,t)=>\"function\"==typeof t?ao.register(e,t):null===t?ao.unregister(e):ao.get(e);var no=__webpack_require__(158).Buffer;const _7bit=e=>no.from(e).toString(\"ascii\");var so=__webpack_require__(158).Buffer;const _8bit=e=>so.from(e).toString(\"utf8\");var oo=__webpack_require__(158).Buffer;const binary=e=>oo.from(e).toString(\"binary\"),quoted_printable=e=>{let t=\"\";for(let r=0;r<e.length;r++){const a=e.charCodeAt(r);if(61===a)t+=\"=3D\";else if(a>=33&&a<=60||a>=62&&a<=126||9===a||32===a)t+=e.charAt(r);else if(13===a||10===a)t+=\"\\r\\n\";else if(a>126){const a=unescape(encodeURIComponent(e.charAt(r)));for(let e=0;e<a.length;e++)t+=\"=\"+(\"0\"+a.charCodeAt(e).toString(16)).slice(-2).toUpperCase()}else t+=\"=\"+(\"0\"+a.toString(16)).slice(-2).toUpperCase()}return t};var lo=__webpack_require__(158).Buffer;const base16=e=>lo.from(e).toString(\"hex\");var co=__webpack_require__(158).Buffer;const base32=e=>{const t=co.from(e).toString(\"utf8\"),r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let a=0,n=\"\",s=0,o=0;for(let e=0;e<t.length;e++)for(s=s<<8|t.charCodeAt(e),o+=8;o>=5;)n+=r.charAt(s>>>o-5&31),o-=5;o>0&&(n+=r.charAt(s<<5-o&31),a=(8-8*t.length%5)%5);for(let e=0;e<a;e++)n+=\"=\";return n};var io=__webpack_require__(158).Buffer;const base64=e=>io.from(e).toString(\"base64\");var mo=__webpack_require__(158).Buffer;const base64url=e=>mo.from(e).toString(\"base64url\");const po=new class EncoderRegistry extends ro{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(e,t)=>\"function\"==typeof t?po.register(e,t):null===t?po.unregister(e):po.get(e);encoderAPI.getDefaults=()=>po.defaults;const uo=encoderAPI,ho={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},go={\"image/*\":()=>bytes(25).toString(\"binary\")},yo={\"audio/*\":()=>bytes(25).toString(\"binary\")},fo={\"video/*\":()=>bytes(25).toString(\"binary\")},So={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const Eo=new class MediaTypeRegistry extends ro{#e={...ho,...go,...yo,...fo,...So};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(e,t)=>{if(\"function\"==typeof t)return Eo.register(e,t);if(null===t)return Eo.unregister(e);const r=e.split(\";\").at(0),a=`${r.split(\"/\").at(0)}/*`;return Eo.get(e)||Eo.get(r)||Eo.get(a)};mediaTypeAPI.getDefaults=()=>Eo.defaults;const _o=mediaTypeAPI,types_string=(e,{sample:t}={})=>{const{contentEncoding:r,contentMediaType:a,contentSchema:n}=e,{pattern:s,format:o}=e,l=uo(r)||Ta();let c;if(\"string\"==typeof s)c=(e=>{try{return new(Yt())(e).gen()}catch{return\"string\"}})(s);else if(\"string\"==typeof o)c=(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"email\":return email();case\"idn-email\":return idn_email();case\"hostname\":return hostname();case\"idn-hostname\":return idn_hostname();case\"ipv4\":return ipv4();case\"ipv6\":return ipv6();case\"uri\":return uri();case\"uri-reference\":return uri_reference();case\"iri\":return iri();case\"iri-reference\":return iri_reference();case\"uuid\":return uuid();case\"uri-template\":return uri_template();case\"json-pointer\":return json_pointer();case\"relative-json-pointer\":return relative_json_pointer();case\"date-time\":return date_time();case\"date\":return date();case\"time\":return time();case\"duration\":return duration();case\"password\":return generators_password();case\"regex\":return regex()}return\"string\"})(e);else if(isJSONSchema(n)&&\"string\"==typeof a&&void 0!==t)c=Array.isArray(t)||\"object\"==typeof t?JSON.stringify(t):String(t);else if(\"string\"==typeof a){const t=_o(a);\"function\"==typeof t&&(c=t(e))}else c=\"string\";return l(((e,t={})=>{const{maxLength:r,minLength:a}=t;let n=e;if(Number.isInteger(r)&&r>0&&(n=n.slice(0,r)),Number.isInteger(a)&&a>0){let e=0;for(;n.length<a;)n+=n[e++%n.length]}return n})(c,e))},generators_float=()=>.1,generators_double=()=>.1,applyNumberConstraints=(e,t={})=>{const{minimum:r,maximum:a,exclusiveMinimum:n,exclusiveMaximum:s}=t,{multipleOf:o}=t,l=Number.isInteger(e)?1:Number.EPSILON;let c=\"number\"==typeof r?r:null,i=\"number\"==typeof a?a:null,m=e;if(\"number\"==typeof n&&(c=null!==c?Math.max(c,n+l):n+l),\"number\"==typeof s&&(i=null!==i?Math.min(i,s-l):s-l),m=c>i&&e||c||i||m,\"number\"==typeof o&&o>0){const e=m%o;m=0===e?m:m+o-e}return m},types_number=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"float\":return generators_float();case\"double\":return generators_double()}return 0})(e):0,applyNumberConstraints(r,e)},int32=()=>2**30>>>0,int64=()=>2**53-1,types_integer=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=api_formatAPI(t);if(\"function\"==typeof r)return r(e);switch(t){case\"int32\":return int32();case\"int64\":return int64()}return 0})(e):0,applyNumberConstraints(r,e)},types_boolean=e=>\"boolean\"!=typeof e.default||e.default,vo=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(e,t)=>\"string\"==typeof t&&Object.hasOwn(e,t)?e[t]:()=>`Unknown Type: ${t}`}),wo=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=e=>{if(!isJSONSchemaObject(e))return!1;const{examples:t,example:r,default:a}=e;return!!(Array.isArray(t)&&t.length>=1)||(void 0!==a||void 0!==r)},extractExample=e=>{if(!isJSONSchemaObject(e))return null;const{examples:t,example:r,default:a}=e;return Array.isArray(t)&&t.length>=1?t.at(0):void 0!==a?a:void 0!==r?r:void 0},bo={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};bo.number=bo.integer;const Co=\"string\",inferTypeFromValue=e=>void 0===e?null:null===e?\"null\":Array.isArray(e)?\"array\":Number.isInteger(e)?\"integer\":typeof e,foldType=e=>{if(Array.isArray(e)&&e.length>=1){if(e.includes(\"array\"))return\"array\";if(e.includes(\"object\"))return\"object\";{const t=pick(e);if(wo.includes(t))return t}}return wo.includes(e)?e:null},inferType=(e,t=new WeakSet)=>{if(!isJSONSchemaObject(e))return Co;if(t.has(e))return Co;t.add(e);let{type:r,const:a}=e;if(r=foldType(r),\"string\"!=typeof r){const t=Object.keys(bo);e:for(let a=0;a<t.length;a+=1){const n=t[a],s=bo[n];for(let t=0;t<s.length;t+=1){const a=s[t];if(Object.hasOwn(e,a)){r=n;break e}}}}if(\"string\"!=typeof r&&void 0!==a){const e=inferTypeFromValue(a);r=\"string\"==typeof e?e:r}if(\"string\"!=typeof r){const combineTypes=r=>{if(Array.isArray(e[r])){const a=e[r].map((e=>inferType(e,t)));return foldType(a)}return null},a=combineTypes(\"allOf\"),n=combineTypes(\"anyOf\"),s=combineTypes(\"oneOf\"),o=e.not?inferType(e.not,t):null;(a||n||s||o)&&(r=foldType([a,n,s,o].filter(Boolean)))}if(\"string\"!=typeof r&&hasExample(e)){const t=extractExample(e),a=inferTypeFromValue(t);r=\"string\"==typeof a?a:r}return t.delete(e),r||Co},type_getType=e=>inferType(e),typeCast=e=>predicates_isBooleanJSONSchema(e)?(e=>!1===e?{not:{}}:{})(e):isJSONSchemaObject(e)?e:{},merge=(e,t,r={})=>{if(predicates_isBooleanJSONSchema(e)&&!0===e)return!0;if(predicates_isBooleanJSONSchema(e)&&!1===e)return!1;if(predicates_isBooleanJSONSchema(t)&&!0===t)return!0;if(predicates_isBooleanJSONSchema(t)&&!1===t)return!1;if(!isJSONSchema(e))return t;if(!isJSONSchema(t))return e;const a={...t,...e};if(t.type&&e.type&&Array.isArray(t.type)&&\"string\"==typeof t.type){const r=normalizeArray(t.type).concat(e.type);a.type=Array.from(new Set(r))}if(Array.isArray(t.required)&&Array.isArray(e.required)&&(a.required=[...new Set([...e.required,...t.required])]),t.properties&&e.properties){const n=new Set([...Object.keys(t.properties),...Object.keys(e.properties)]);a.properties={};for(const s of n){const n=t.properties[s]||{},o=e.properties[s]||{};n.readOnly&&!r.includeReadOnly||n.writeOnly&&!r.includeWriteOnly?a.required=(a.required||[]).filter((e=>e!==s)):a.properties[s]=merge(o,n,r)}}return isJSONSchema(t.items)&&isJSONSchema(e.items)&&(a.items=merge(e.items,t.items,r)),isJSONSchema(t.contains)&&isJSONSchema(e.contains)&&(a.contains=merge(e.contains,t.contains,r)),isJSONSchema(t.contentSchema)&&isJSONSchema(e.contentSchema)&&(a.contentSchema=merge(e.contentSchema,t.contentSchema,r)),a},xo=merge,main_sampleFromSchemaGeneric=(e,t={},r=void 0,a=!1)=>{if(null==e&&void 0===r)return;\"function\"==typeof e?.toJS&&(e=e.toJS()),e=typeCast(e);let n=void 0!==r||hasExample(e);const s=!n&&Array.isArray(e.oneOf)&&e.oneOf.length>0,o=!n&&Array.isArray(e.anyOf)&&e.anyOf.length>0;if(!n&&(s||o)){const r=typeCast(pick(s?e.oneOf:e.anyOf));!(e=xo(e,r,t)).xml&&r.xml&&(e.xml=r.xml),hasExample(e)&&hasExample(r)&&(n=!0)}const l={};let{xml:c,properties:i,additionalProperties:m,items:p,contains:u}=e||{},d=type_getType(e),{includeReadOnly:h,includeWriteOnly:g}=t;c=c||{};let y,{name:f,prefix:S,namespace:E}=c,_={};if(Object.hasOwn(e,\"type\")||(e.type=d),a&&(f=f||\"notagname\",y=(S?`${S}:`:\"\")+f,E)){l[S?`xmlns:${S}`:\"xmlns\"]=E}a&&(_[y]=[]);const v=objectify(i);let w,b=0;const hasExceededMaxProperties=()=>Number.isInteger(e.maxProperties)&&e.maxProperties>0&&b>=e.maxProperties,canAddProperty=t=>!(Number.isInteger(e.maxProperties)&&e.maxProperties>0)||!hasExceededMaxProperties()&&(!(t=>!Array.isArray(e.required)||0===e.required.length||!e.required.includes(t))(t)||e.maxProperties-b-(()=>{if(!Array.isArray(e.required)||0===e.required.length)return 0;let t=0;return a?e.required.forEach((e=>t+=void 0===_[e]?0:1)):e.required.forEach((e=>{t+=void 0===_[y]?.find((t=>void 0!==t[e]))?0:1})),e.required.length-t})()>0);if(w=a?(r,n=void 0)=>{if(e&&v[r]){if(v[r].xml=v[r].xml||{},v[r].xml.attribute){const e=Array.isArray(v[r].enum)?pick(v[r].enum):void 0;if(hasExample(v[r]))l[v[r].xml.name||r]=extractExample(v[r]);else if(void 0!==e)l[v[r].xml.name||r]=e;else{const e=typeCast(v[r]),t=type_getType(e),a=v[r].xml.name||r;l[a]=vo[t](e)}return}v[r].xml.name=v[r].xml.name||r}else v[r]||!1===m||(v[r]={xml:{name:r}});let s=main_sampleFromSchemaGeneric(v[r],t,n,a);canAddProperty(r)&&(b++,Array.isArray(s)?_[y]=_[y].concat(s):_[y].push(s))}:(r,n)=>{if(canAddProperty(r)){if(to()(e.discriminator?.mapping)&&e.discriminator.propertyName===r&&\"string\"==typeof e.$$ref){for(const t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){_[r]=t;break}}else _[r]=main_sampleFromSchemaGeneric(v[r],t,n,a);b++}},n){let n;if(n=void 0!==r?r:extractExample(e),!a){if(\"number\"==typeof n&&\"string\"===d)return`${n}`;if(\"string\"!=typeof n||\"string\"===d)return n;try{return JSON.parse(n)}catch{return n}}if(\"array\"===d){if(!Array.isArray(n)){if(\"string\"==typeof n)return n;n=[n]}let r=[];return isJSONSchemaObject(p)&&(p.xml=p.xml||c||{},p.xml.name=p.xml.name||c.name,r=n.map((e=>main_sampleFromSchemaGeneric(p,t,e,a)))),isJSONSchemaObject(u)&&(u.xml=u.xml||c||{},u.xml.name=u.xml.name||c.name,r=[main_sampleFromSchemaGeneric(u,t,void 0,a),...r]),r=vo.array(e,{sample:r}),c.wrapped?(_[y]=r,Zt()(l)||_[y].push({_attr:l})):_=r,_}if(\"object\"===d){if(\"string\"==typeof n)return n;for(const e in n)Object.hasOwn(n,e)&&(v[e]?.readOnly&&!h||v[e]?.writeOnly&&!g||(v[e]?.xml?.attribute?l[v[e].xml.name||e]=n[e]:w(e,n[e])));return Zt()(l)||_[y].push({_attr:l}),_}return _[y]=Zt()(l)?n:[{_attr:l},n],_}if(\"array\"===d){let r=[];if(isJSONSchemaObject(u))if(a&&(u.xml=u.xml||e.xml||{},u.xml.name=u.xml.name||c.name),Array.isArray(u.anyOf))r.push(...u.anyOf.map((e=>main_sampleFromSchemaGeneric(xo(e,u,t),t,void 0,a))));else if(Array.isArray(u.oneOf))r.push(...u.oneOf.map((e=>main_sampleFromSchemaGeneric(xo(e,u,t),t,void 0,a))));else{if(!(!a||a&&c.wrapped))return main_sampleFromSchemaGeneric(u,t,void 0,a);r.push(main_sampleFromSchemaGeneric(u,t,void 0,a))}if(isJSONSchemaObject(p))if(a&&(p.xml=p.xml||e.xml||{},p.xml.name=p.xml.name||c.name),Array.isArray(p.anyOf))r.push(...p.anyOf.map((e=>main_sampleFromSchemaGeneric(xo(e,p,t),t,void 0,a))));else if(Array.isArray(p.oneOf))r.push(...p.oneOf.map((e=>main_sampleFromSchemaGeneric(xo(e,p,t),t,void 0,a))));else{if(!(!a||a&&c.wrapped))return main_sampleFromSchemaGeneric(p,t,void 0,a);r.push(main_sampleFromSchemaGeneric(p,t,void 0,a))}return r=vo.array(e,{sample:r}),a&&c.wrapped?(_[y]=r,Zt()(l)||_[y].push({_attr:l}),_):r}if(\"object\"===d){for(let e in v)Object.hasOwn(v,e)&&(v[e]?.deprecated||v[e]?.readOnly&&!h||v[e]?.writeOnly&&!g||w(e));if(a&&l&&_[y].push({_attr:l}),hasExceededMaxProperties())return _;if(predicates_isBooleanJSONSchema(m)&&m)a?_[y].push({additionalProp:\"Anything can be here\"}):_.additionalProp1={},b++;else if(isJSONSchemaObject(m)){const r=m,n=main_sampleFromSchemaGeneric(r,t,void 0,a);if(a&&\"string\"==typeof r?.xml?.name&&\"notagname\"!==r?.xml?.name)_[y].push(n);else{const t=Number.isInteger(e.minProperties)&&e.minProperties>0&&b<e.minProperties?e.minProperties-b:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return _;if(a){const t={};t[\"additionalProp\"+e]=n.notagname,_[y].push(t)}else _[\"additionalProp\"+e]=n;b++}}}return _}let C;if(void 0!==e.const)C=e.const;else if(e&&Array.isArray(e.enum))C=pick(normalizeArray(e.enum));else{const r=isJSONSchemaObject(e.contentSchema)?main_sampleFromSchemaGeneric(e.contentSchema,t,void 0,a):void 0;C=vo[d](e,{sample:r})}return a?(_[y]=Zt()(l)?C:[{_attr:l},C],_):C},main_createXMLExample=(e,t,r)=>{const a=main_sampleFromSchemaGeneric(e,t,r,!0);if(a)return\"string\"==typeof a?a:Xt()(a,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(e,t,r)=>main_sampleFromSchemaGeneric(e,t,r,!1),main_resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Oo=utils_memoizeN(main_createXMLExample,main_resolver),No=utils_memoizeN(main_sampleFromSchema,main_resolver),ko=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Ao=[\"object\"],fn_get_json_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.jsonSchema202012.memoizedSampleFromSchema(t,r,n),l=typeof o,c=ko.reduce(((e,t)=>t.when.test(a)?[...e,...t.shouldStringifyTypes]:e),Ao);return G()(c,(e=>e===l))?JSON.stringify(o,null,2):o},fn_get_yaml_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.jsonSchema202012.getJsonSampleSchema(t,r,a,n);let l;try{l=Re().dump(Re().load(o),{lineWidth:-1},{schema:Me.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=e=>(t,r,a)=>{const{fn:n}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return n.jsonSchema202012.memoizedCreateXMLExample(t,r,a)},fn_get_sample_schema=e=>(t,r=\"\",a={},n=void 0)=>{const{fn:s}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof n?.toJS&&(n=n.toJS()),/xml/.test(r)?s.jsonSchema202012.getXmlSampleSchema(t,a,n):/(yaml|yml)/.test(r)?s.jsonSchema202012.getYamlSampleSchema(t,a,r,n):s.jsonSchema202012.getJsonSampleSchema(t,a,r,n)},json_schema_2020_12_samples=({getSystem:e})=>{const t=fn_get_json_sample_schema(e),r=fn_get_yaml_sample_schema(e),a=fn_get_xml_sample_schema(e),n=fn_get_sample_schema(e);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleEncoderAPI:uo,sampleFormatAPI:api_formatAPI,sampleMediaTypeAPI:_o,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:No,memoizedCreateXMLExample:Oo,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const{GIT_DIRTY:Io,GIT_COMMIT:qo,PACKAGE_VERSION:jo,BUILD_TIME:Po}={PACKAGE_VERSION:\"5.12.3\",GIT_COMMIT:\"gc002e597\",GIT_DIRTY:!0,BUILD_TIME:\"Wed, 27 Mar 2024 06:57:30 GMT\"};function SwaggerUI(e){U.versions=U.versions||{},U.versions.swaggerUi={version:jo,gitRevision:qo,gitDirty:Io,buildTimestamp:Po};const t={dom_id:null,domNode:null,spec:{},url:\"\",urls:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:null,filter:null,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:e=>e,responseInterceptor:e=>e,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],pluginsOptions:{pluginLoadType:\"legacy\"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"}};let r=e.queryConfigEnabled?(()=>{let e={},t=U.location.search;if(!t)return{};if(\"\"!=t){let r=t.substr(1).split(\"&\");for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(t=r[t].split(\"=\"),e[decodeURIComponent(t[0])]=t[1]&&decodeURIComponent(t[1])||\"\")}return e})():{};const a=e.domNode;delete e.domNode;const n=O()({},t,e,r),s={system:{configs:n.configs},plugins:n.presets,pluginsOptions:n.pluginsOptions,state:O()({layout:{layout:n.layout,filter:n.filter},spec:{spec:\"\",url:n.url},requestSnippets:n.requestSnippets},n.initialState)};if(n.initialState)for(var o in n.initialState)Object.prototype.hasOwnProperty.call(n.initialState,o)&&void 0===n.initialState[o]&&delete s.state[o];var l=new Store(s);l.register([n.plugins,()=>({fn:n.fn,components:n.components,state:n.state})]);var c=l.getSystem();const downloadSpec=e=>{let t=c.specSelectors.getLocalConfig?c.specSelectors.getLocalConfig():{},s=O()({},t,n,e||{},r);if(a&&(s.domNode=a),l.setConfigs(s),c.configsActions.loaded(),null!==e&&(!r.url&&\"object\"==typeof s.spec&&Object.keys(s.spec).length?(c.specActions.updateUrl(\"\"),c.specActions.updateLoadingStatus(\"success\"),c.specActions.updateSpec(JSON.stringify(s.spec))):c.specActions.download&&s.url&&!s.urls&&(c.specActions.updateUrl(s.url),c.specActions.download(s.url))),s.domNode)c.render(s.domNode,\"App\");else if(s.dom_id){let e=document.querySelector(s.dom_id);c.render(e,\"App\")}else null===s.dom_id||null===s.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\");return c},i=r.config||n.configUrl;return i&&c.specActions&&c.specActions.getConfigByUrl?(c.specActions.getConfigByUrl({url:i,loadRemoteConfig:!0,requestInterceptor:n.requestInterceptor,responseInterceptor:n.responseInterceptor},downloadSpec),c):downloadSpec()}SwaggerUI.System=Store,SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SafeRender:safe_render};const Mo=SwaggerUI})(),r=r.default})()));\n//# sourceMappingURL=swagger-ui.js.map"
  },
  {
    "path": "www/jsonrpc/config.go",
    "content": "package jsonrpc\n\n// Config defines parameters for the JSON-RPC server.\ntype Config struct {\n\tEnable  bool     `toml:\"enable\"`\n\tListen  string   `toml:\"listen\"`\n\tOrigins []string `toml:\"origins\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tEnable: false,\n\t\tListen: \"\",\n\t}\n}\n\n// BasicCheck performs basic checks on the configuration.\nfunc (*Config) BasicCheck() error {\n\treturn nil\n}\n"
  },
  {
    "path": "www/jsonrpc/server.go",
    "content": "package jsonrpc\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\n\tret \"github.com/grpc-ecosystem/go-grpc-middleware/retry\"\n\t\"github.com/pactus-project/pactus/util\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n\tpactus \"github.com/pactus-project/pactus/www/grpc/gen/go\"\n\t\"github.com/pacviewer/jrpc-gateway/jrpc\"\n\t\"github.com/rs/cors\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n)\n\ntype Server struct {\n\tctx      context.Context\n\tconfig   *Config\n\tlistener net.Listener\n\tserver   *jrpc.Server\n\tgrpcConn *grpc.ClientConn\n\tlogger   *logger.SubLogger\n}\n\nfunc NewServer(ctx context.Context, conf *Config) *Server {\n\treturn &Server{\n\t\tctx:    ctx,\n\t\tconfig: conf,\n\t\tlogger: logger.NewSubLogger(\"_jsonrpc\", nil),\n\t}\n}\n\nfunc (s *Server) StartServer(grpcServer string) error {\n\tif !s.config.Enable {\n\t\treturn nil\n\t}\n\n\tdialOpts := make([]grpc.DialOption, 0, 2)\n\tdialOpts = append(dialOpts,\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t\tgrpc.WithUnaryInterceptor(ret.UnaryClientInterceptor()),\n\t)\n\tgrpcConn, err := grpc.NewClient(\n\t\tgrpcServer,\n\t\tdialOpts...,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to dial server: %w\", err)\n\t}\n\n\ts.grpcConn = grpcConn\n\n\tblockchainService := pactus.RegisterBlockchainJsonRPC(grpcConn)\n\tnetworkService := pactus.RegisterNetworkJsonRPC(grpcConn)\n\ttransactionService := pactus.RegisterTransactionJsonRPC(grpcConn)\n\twalletService := pactus.RegisterWalletJsonRPC(grpcConn)\n\tutilsService := pactus.RegisterUtilsJsonRPC(grpcConn)\n\n\topts := make([]jrpc.Option, 0)\n\tif len(s.config.Origins) > 0 {\n\t\topts = append(opts, jrpc.WithCorsOrigins(&cors.Options{\n\t\t\tAllowedOrigins:   s.config.Origins,\n\t\t\tAllowedMethods:   []string{\"POST\"},\n\t\t\tAllowedHeaders:   []string{\"*\"},\n\t\t\tAllowCredentials: true,\n\t\t}))\n\t}\n\n\tserver := jrpc.NewServer(opts...)\n\tserver.RegisterServices(blockchainService, networkService, transactionService, walletService, utilsService)\n\n\tlistener, err := util.NetworkListen(s.ctx, \"tcp\", s.config.Listen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.server = server\n\ts.listener = listener\n\n\tgo func() {\n\t\ts.logger.Info(\"JSON-RPC server start listening\", \"address\", listener.Addr())\n\t\tif err := server.Serve(listener); err != nil {\n\t\t\ts.logger.Debug(\"error on JSON-RPC server\", \"error\", err)\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (s *Server) StopServer() {\n\tif s.server != nil {\n\t\t_ = s.server.GracefulStop(s.ctx)\n\t\t_ = s.listener.Close()\n\t}\n\n\tif s.grpcConn != nil {\n\t\t_ = s.grpcConn.Close()\n\t}\n}\n"
  },
  {
    "path": "www/zmq/config.go",
    "content": "package zmq\n\nimport (\n\t\"fmt\"\n)\n\n// Config defines parameters for the ZeroMQ publishers.\ntype Config struct {\n\tZmqPubBlockInfo string `toml:\"zmqpubblockinfo\"`\n\tZmqPubTxInfo    string `toml:\"zmqpubtxinfo\"`\n\tZmqPubRawBlock  string `toml:\"zmqpubrawblock\"`\n\tZmqPubRawTx     string `toml:\"zmqpubrawtx\"`\n\tZmqPubHWM       int    `toml:\"zmqpubhwm\"`\n}\n\nfunc DefaultConfig() *Config {\n\treturn &Config{\n\t\tZmqPubBlockInfo: \"\",\n\t\tZmqPubTxInfo:    \"\",\n\t\tZmqPubRawBlock:  \"\",\n\t\tZmqPubRawTx:     \"\",\n\t\tZmqPubHWM:       1000,\n\t}\n}\n\nfunc (c *Config) BasicCheck() error {\n\tif c.ZmqPubHWM < 0 {\n\t\treturn fmt.Errorf(\"invalid publisher hwm %d\", c.ZmqPubHWM)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "www/zmq/config_test.go",
    "content": "package zmq\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestDefaultConfig(t *testing.T) {\n\tcfg := DefaultConfig()\n\n\tassert.NotNil(t, cfg, \"DefaultConfig should not return nil\")\n\tassert.Empty(t, cfg.ZmqPubBlockInfo, \"ZmqPubBlockInfo should be empty\")\n\tassert.Empty(t, cfg.ZmqPubTxInfo, \"ZmqPubTxInfo should be empty\")\n\tassert.Empty(t, cfg.ZmqPubRawBlock, \"ZmqPubRawBlock should be empty\")\n\tassert.Empty(t, cfg.ZmqPubRawTx, \"ZmqPubRawTx should be empty\")\n\tassert.Equal(t, 1000, cfg.ZmqPubHWM, \"ZmqPubHWM should default to 1000\")\n}\n\nfunc TestBasicCheck(t *testing.T) {\n\ttests := []struct {\n\t\tname      string\n\t\tconfig    *Config\n\t\texpectErr bool\n\t}{\n\t\t{\n\t\t\tname: \"Valid configuration\",\n\t\t\tconfig: &Config{\n\t\t\t\tZmqPubBlockInfo: \"tcp://127.0.0.1:28332\",\n\t\t\t\tZmqPubTxInfo:    \"tcp://127.0.0.1:28333\",\n\t\t\t\tZmqPubRawBlock:  \"tcp://127.0.0.1:28334\",\n\t\t\t\tZmqPubRawTx:     \"tcp://127.0.0.1:28335\",\n\t\t\t\tZmqPubHWM:       1000,\n\t\t\t},\n\t\t\texpectErr: false,\n\t\t},\n\t\t{\n\t\t\tname: \"Negative ZmqPubHWM\",\n\t\t\tconfig: &Config{\n\t\t\t\tZmqPubHWM: -1,\n\t\t\t},\n\t\t\texpectErr: true,\n\t\t},\n\t\t{\n\t\t\tname:      \"Empty configuration\",\n\t\t\tconfig:    DefaultConfig(),\n\t\t\texpectErr: false,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\terr := tt.config.BasicCheck()\n\t\t\tif tt.expectErr {\n\t\t\t\trequire.Error(t, err, \"BasicCheck should return an error\")\n\t\t\t} else {\n\t\t\t\trequire.NoError(t, err, \"BasicCheck should not return an error\")\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "www/zmq/mock.go",
    "content": "package zmq\n\nimport \"github.com/pactus-project/pactus/types/block\"\n\n// MockPublisher is a mock implementation of the Publisher interface for testing.\ntype MockPublisher struct {\n\tMockAddress   string\n\tMockTopicName string\n\tMockHwm       int\n}\n\nvar _ Publisher = &MockPublisher{}\n\nfunc MockingPublisher(address, topicName string, hwm int) *MockPublisher {\n\treturn &MockPublisher{\n\t\tMockAddress:   address,\n\t\tMockTopicName: topicName,\n\t\tMockHwm:       hwm,\n\t}\n}\n\nfunc (m *MockPublisher) Address() string {\n\treturn m.MockAddress\n}\n\nfunc (m *MockPublisher) TopicName() string {\n\treturn m.MockTopicName\n}\n\nfunc (m *MockPublisher) HWM() int {\n\treturn m.MockHwm\n}\n\nfunc (*MockPublisher) onNewBlock(*block.Block) {\n}\n"
  },
  {
    "path": "www/zmq/publisher.go",
    "content": "package zmq\n\nimport (\n\t\"encoding/binary\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/crypto\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype Publisher interface {\n\tAddress() string\n\tTopicName() string\n\tHWM() int\n\n\tonNewBlock(blk *block.Block)\n}\n\ntype basePub struct {\n\ttopic     Topic\n\tseqNo     uint32\n\tzmqSocket zmq4.Socket\n\tlogger    *logger.SubLogger\n}\n\nfunc (b *basePub) Address() string {\n\treturn b.zmqSocket.Addr().String()\n}\n\nfunc (b *basePub) TopicName() string {\n\treturn b.topic.String()\n}\n\nfunc (b *basePub) HWM() int {\n\thwmOpt, _ := b.zmqSocket.GetOption(zmq4.OptionHWM)\n\n\treturn hwmOpt.(int)\n}\n\n// makeTopicMsg constructs a ZMQ message with a topic ID, message body, and sequence number.\n// The message is constructed as a byte slice with the following structure:\n// - Topic ID (2 Bytes)\n// - Message body (varies based on provided parts)\n// - Sequence number (4 Bytes).\nfunc (b *basePub) makeTopicMsg(parts ...any) []byte {\n\tresult := make([]byte, 0)\n\n\t// Append Topic ID to the message (2 Bytes)\n\tresult = append(result, b.topic.Bytes()...)\n\n\t// Append message body based on the provided parts\n\tfor _, part := range parts {\n\t\tswitch castedVal := part.(type) {\n\t\tcase crypto.Address:\n\t\t\tresult = append(result, castedVal.Bytes()...)\n\t\tcase []byte:\n\t\t\tresult = append(result, castedVal...)\n\t\tcase uint32:\n\t\t\tresult = binary.BigEndian.AppendUint32(result, castedVal)\n\t\tcase uint16:\n\t\t\tresult = binary.BigEndian.AppendUint16(result, castedVal)\n\t\tdefault:\n\t\t\tpanic(\"implement me!!\")\n\t\t}\n\t}\n\n\t// Append sequence number to the message (4 Bytes, Big Endian encoding)\n\tresult = binary.BigEndian.AppendUint32(result, b.seqNo)\n\n\treturn result\n}\n"
  },
  {
    "path": "www/zmq/publisher_block_info.go",
    "content": "package zmq\n\nimport (\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype blockInfoPub struct {\n\tbasePub\n}\n\nfunc newBlockInfoPub(socket zmq4.Socket, logger *logger.SubLogger) Publisher {\n\treturn &blockInfoPub{\n\t\tbasePub: basePub{\n\t\t\ttopic:     TopicBlockInfo,\n\t\t\tseqNo:     0,\n\t\t\tzmqSocket: socket,\n\t\t\tlogger:    logger,\n\t\t},\n\t}\n}\n\nfunc (b *blockInfoPub) onNewBlock(blk *block.Block) {\n\trawMsg := b.makeTopicMsg(\n\t\tblk.Header().ProposerAddress(),\n\t\tblk.Header().UnixTime(),\n\t\tuint16(len(blk.Transactions())),\n\t\tuint32(blk.Height()),\n\t)\n\n\tmessage := zmq4.NewMsg(rawMsg)\n\n\tif err := b.zmqSocket.Send(message); err != nil {\n\t\tb.logger.Error(\"zmq publish message error\", \"err\", err, \"publisher\", b.TopicName())\n\n\t\treturn\n\t}\n\n\tb.logger.Debug(\"ZMQ published the message successfully\",\n\t\t\"publisher\", b.TopicName(),\n\t\t\"block_height\", blk.Height())\n\n\tb.seqNo++\n}\n"
  },
  {
    "path": "www/zmq/publisher_block_info_test.go",
    "content": "package zmq\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestBlockInfoPublisher(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://localhost:%d\", port)\n\tconf := DefaultConfig()\n\tconf.ZmqPubBlockInfo = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\ttd.server.Publishers()\n\n\tsub := zmq4.NewSub(t.Context(), zmq4.WithAutomaticReconnect(false))\n\n\terr := sub.Dial(addr)\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicBlockInfo.Bytes()))\n\trequire.NoError(t, err)\n\n\tblk, _ := td.TestSuite.GenerateTestBlock(td.RandHeight())\n\ttd.pipe.Send(blk)\n\n\treceived, err := sub.Recv()\n\trequire.NoError(t, err)\n\n\trequire.NotNil(t, received.Frames)\n\trequire.GreaterOrEqual(t, len(received.Frames), 1)\n\n\tmsg := received.Frames[0]\n\trequire.Len(t, msg, 37)\n\n\ttopic := msg[:2]\n\tproposerBytes := msg[2:23]\n\ttimestamp := binary.BigEndian.Uint32(msg[23:27])\n\ttxCount := binary.BigEndian.Uint16(msg[27:29])\n\theight := binary.BigEndian.Uint32(msg[29:33])\n\tseqNo := binary.BigEndian.Uint32(msg[33:])\n\n\trequire.Equal(t, TopicBlockInfo.Bytes(), topic)\n\trequire.Equal(t, blk.Header().ProposerAddress().Bytes(), proposerBytes)\n\trequire.Equal(t, blk.Header().UnixTime(), timestamp)\n\trequire.Equal(t, uint16(len(blk.Transactions())), txCount)\n\trequire.Equal(t, uint32(blk.Height()), height)\n\trequire.Equal(t, uint32(0), seqNo)\n\n\trequire.NoError(t, sub.Close())\n}\n"
  },
  {
    "path": "www/zmq/publisher_raw_block.go",
    "content": "package zmq\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype rawBlockPub struct {\n\tbasePub\n}\n\nfunc newRawBlockPub(socket zmq4.Socket, logger *logger.SubLogger) Publisher {\n\treturn &rawBlockPub{\n\t\tbasePub: basePub{\n\t\t\ttopic:     TopicRawBlock,\n\t\t\tzmqSocket: socket,\n\t\t\tlogger:    logger,\n\t\t},\n\t}\n}\n\nfunc (r *rawBlockPub) onNewBlock(blk *block.Block) {\n\trawHeader := make([]byte, 0)\n\tbuf := bytes.NewBuffer(rawHeader)\n\n\tif err := blk.Header().Encode(buf); err != nil {\n\t\tr.logger.Error(\"failed to encode block header\", \"err\", err, \"publisher\", r.TopicName())\n\n\t\treturn\n\t}\n\n\trawMsg := r.makeTopicMsg(buf.Bytes(), uint32(blk.Height()))\n\tmessage := zmq4.NewMsg(rawMsg)\n\n\tif err := r.zmqSocket.Send(message); err != nil {\n\t\tr.logger.Error(\"zmq publish message error\", \"err\", err, \"publisher\", r.TopicName())\n\n\t\treturn\n\t}\n\n\tr.logger.Debug(\"ZMQ published the message successfully\",\n\t\t\"publisher\", r.TopicName(),\n\t\t\"block_height\", blk.Height())\n\n\tr.seqNo++\n}\n"
  },
  {
    "path": "www/zmq/publisher_raw_block_test.go",
    "content": "package zmq\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestRawBlockPublisher(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://localhost:%d\", port)\n\tconf := DefaultConfig()\n\tconf.ZmqPubRawBlock = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\ttd.server.Publishers()\n\n\tsub := zmq4.NewSub(t.Context(), zmq4.WithAutomaticReconnect(false))\n\n\terr := sub.Dial(addr)\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicRawBlock.Bytes()))\n\trequire.NoError(t, err)\n\n\tblk, _ := td.TestSuite.GenerateTestBlock(td.RandHeight())\n\ttd.pipe.Send(blk)\n\n\treceived, err := sub.Recv()\n\trequire.NoError(t, err)\n\n\trequire.NotNil(t, received.Frames)\n\trequire.GreaterOrEqual(t, len(received.Frames), 1)\n\n\tmsg := received.Frames[0]\n\n\ttopic := msg[:2]\n\tblockHeader := msg[2 : len(msg)-8]\n\theight := binary.BigEndian.Uint32(msg[140 : len(msg)-4])\n\tseqNo := binary.BigEndian.Uint32(msg[len(msg)-4:])\n\n\tbuf := bytes.NewBuffer(blockHeader)\n\theader := new(block.Header)\n\n\trequire.NoError(t, header.Decode(buf))\n\n\trequire.NotNil(t, header)\n\trequire.Equal(t, uint32(0), seqNo)\n\trequire.Equal(t, uint32(blk.Height()), height)\n\trequire.Equal(t, TopicRawBlock.Bytes(), topic)\n\trequire.Equal(t, header.PrevBlockHash(), blk.Header().PrevBlockHash())\n\trequire.Equal(t, header.StateRoot(), blk.Header().StateRoot())\n\n\trequire.NoError(t, sub.Close())\n}\n"
  },
  {
    "path": "www/zmq/publisher_raw_tx.go",
    "content": "package zmq\n\nimport (\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype rawTxPub struct {\n\tbasePub\n}\n\nfunc newRawTxPub(socket zmq4.Socket, logger *logger.SubLogger) Publisher {\n\treturn &rawTxPub{\n\t\tbasePub: basePub{\n\t\t\ttopic:     TopicRawTransaction,\n\t\t\tzmqSocket: socket,\n\t\t\tlogger:    logger,\n\t\t},\n\t}\n}\n\nfunc (r *rawTxPub) onNewBlock(blk *block.Block) {\n\tfor _, tx := range blk.Transactions() {\n\t\tbuf, err := tx.Bytes()\n\t\tif err != nil {\n\t\t\tr.logger.Error(\"failed to serializing raw tx\", \"err\", err, \"topic\", r.TopicName())\n\n\t\t\treturn\n\t\t}\n\n\t\trawMsg := r.makeTopicMsg(buf, uint32(blk.Height()))\n\t\tmessage := zmq4.NewMsg(rawMsg)\n\n\t\tif err := r.zmqSocket.Send(message); err != nil {\n\t\t\tr.logger.Error(\"zmq publish message error\", \"err\", err, \"publisher\", r.TopicName())\n\n\t\t\treturn\n\t\t}\n\n\t\tr.logger.Debug(\"ZMQ published the message successfully\",\n\t\t\t\"publisher\", r.TopicName(),\n\t\t\t\"block_height\", blk.Height())\n\n\t\tr.seqNo++\n\t}\n}\n"
  },
  {
    "path": "www/zmq/publisher_raw_tx_test.go",
    "content": "package zmq\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestRawTxPublisher(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://localhost:%d\", port)\n\tconf := DefaultConfig()\n\tconf.ZmqPubRawTx = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\ttd.server.Publishers()\n\n\tsub := zmq4.NewSub(t.Context(), zmq4.WithAutomaticReconnect(false))\n\n\terr := sub.Dial(addr)\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicRawTransaction.Bytes()))\n\trequire.NoError(t, err)\n\n\tblk, _ := td.TestSuite.GenerateTestBlock(td.RandHeight())\n\ttd.pipe.Send(blk)\n\n\tfor i := 0; i < len(blk.Transactions()); i++ {\n\t\treceived, err := sub.Recv()\n\t\trequire.NoError(t, err)\n\n\t\trequire.NotNil(t, received.Frames)\n\t\trequire.GreaterOrEqual(t, len(received.Frames), 1)\n\n\t\tmsg := received.Frames[0]\n\n\t\ttopic := msg[:2]\n\t\trawTx := msg[2 : len(msg)-8]\n\n\t\tblockNumberOffset := len(msg) - 8\n\t\theight := binary.BigEndian.Uint32(msg[blockNumberOffset : blockNumberOffset+4])\n\t\tseqNo := binary.BigEndian.Uint32(msg[len(msg)-4:])\n\n\t\ttxn, err := tx.FromBytes(rawTx)\n\t\trequire.NoError(t, err)\n\t\trequire.NotNil(t, txn)\n\n\t\trequire.Equal(t, TopicRawTransaction.Bytes(), topic)\n\t\trequire.Equal(t, types.Height(height), blk.Height())\n\t\trequire.Equal(t, uint32(i), seqNo)\n\t\trequire.NotEqual(t, 0, txn.SerializeSize())\n\t}\n\n\trequire.NoError(t, sub.Close())\n}\n"
  },
  {
    "path": "www/zmq/publisher_test.go",
    "content": "package zmq\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/crypto/hash\"\n\t\"github.com/pactus-project/pactus/types\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestPublisherOnSameSockets(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://localhost:%d\", port)\n\tconf := DefaultConfig()\n\tconf.ZmqPubRawTx = addr\n\tconf.ZmqPubTxInfo = addr\n\tconf.ZmqPubRawBlock = addr\n\tconf.ZmqPubBlockInfo = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\ttd.server.Publishers()\n\n\tsub := zmq4.NewSub(t.Context(), zmq4.WithAutomaticReconnect(false))\n\n\terr := sub.Dial(addr)\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicTransactionInfo.Bytes()))\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicRawTransaction.Bytes()))\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicBlockInfo.Bytes()))\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicRawBlock.Bytes()))\n\trequire.NoError(t, err)\n\n\tblk, _ := td.TestSuite.GenerateTestBlock(td.RandHeight())\n\ttd.pipe.Send(blk)\n\n\tfor i := 0; i < (len(blk.Transactions())*2)+2; i++ {\n\t\treceived, err := sub.Recv()\n\t\trequire.NoError(t, err)\n\n\t\trequire.NotNil(t, received.Frames)\n\t\trequire.GreaterOrEqual(t, len(received.Frames), 1)\n\n\t\tmsg := received.Frames[0]\n\n\t\ttopic := TopicFromBytes(msg[:2])\n\t\tblockNumberOffset := len(msg) - 8\n\t\theight := binary.BigEndian.Uint32(msg[blockNumberOffset : blockNumberOffset+4])\n\t\tseqNo := binary.BigEndian.Uint32(msg[len(msg)-4:])\n\t\tt.Logf(\"[%s] %d\", topic, seqNo)\n\n\t\trequire.Equal(t, types.Height(height), blk.Height())\n\n\t\tswitch topic {\n\t\tcase TopicRawTransaction:\n\t\t\trawTx := msg[2 : len(msg)-8]\n\n\t\t\ttxn, err := tx.FromBytes(rawTx)\n\n\t\t\trequire.NoError(t, err)\n\t\t\trequire.NotNil(t, txn)\n\t\t\trequire.Equal(t, TopicRawTransaction, topic)\n\t\t\trequire.NotEqual(t, 0, txn.SerializeSize())\n\t\tcase TopicTransactionInfo:\n\t\t\ttxHash := msg[2:34]\n\t\t\tid, err := hash.FromBytes(txHash)\n\n\t\t\trequire.NoError(t, err)\n\t\t\trequire.NotNil(t, id)\n\t\t\trequire.Equal(t, TopicTransactionInfo, topic)\n\n\t\tcase TopicRawBlock:\n\t\t\tblockHeader := msg[2 : len(msg)-8]\n\t\t\tbuf := bytes.NewBuffer(blockHeader)\n\t\t\theader := new(block.Header)\n\n\t\t\trequire.NoError(t, header.Decode(buf))\n\t\t\trequire.NotNil(t, header)\n\t\t\trequire.Equal(t, TopicRawBlock, topic)\n\t\t\trequire.Equal(t, header.PrevBlockHash(), blk.Header().PrevBlockHash())\n\t\t\trequire.Equal(t, header.StateRoot(), blk.Header().StateRoot())\n\t\tcase TopicBlockInfo:\n\t\t\tproposerBytes := msg[2:23]\n\t\t\ttimestamp := binary.BigEndian.Uint32(msg[23:27])\n\t\t\ttxCount := binary.BigEndian.Uint16(msg[27:29])\n\n\t\t\trequire.Equal(t, TopicBlockInfo, topic)\n\t\t\trequire.Equal(t, blk.Header().ProposerAddress().Bytes(), proposerBytes)\n\t\t\trequire.Equal(t, blk.Header().UnixTime(), timestamp)\n\t\t\trequire.Equal(t, uint16(len(blk.Transactions())), txCount)\n\t\t}\n\t}\n\n\trequire.NoError(t, sub.Close())\n}\n"
  },
  {
    "path": "www/zmq/publisher_tx_info.go",
    "content": "package zmq\n\nimport (\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype txInfoPub struct {\n\tbasePub\n}\n\nfunc newTxInfoPub(socket zmq4.Socket, logger *logger.SubLogger) Publisher {\n\treturn &txInfoPub{\n\t\tbasePub: basePub{\n\t\t\ttopic:     TopicTransactionInfo,\n\t\t\tzmqSocket: socket,\n\t\t\tlogger:    logger,\n\t\t},\n\t}\n}\n\nfunc (t *txInfoPub) onNewBlock(blk *block.Block) {\n\tfor _, txn := range blk.Transactions() {\n\t\trawMsg := t.makeTopicMsg(txn.ID().Bytes(), uint32(blk.Height()))\n\t\tmessage := zmq4.NewMsg(rawMsg)\n\n\t\tif err := t.zmqSocket.Send(message); err != nil {\n\t\t\tt.logger.Error(\"zmq publish message error\", \"err\", err, \"publisher\", t.TopicName())\n\n\t\t\tcontinue\n\t\t}\n\n\t\tt.logger.Debug(\"ZMQ published the message successfully\",\n\t\t\t\"publisher\", t.TopicName(),\n\t\t\t\"block_height\", blk.Height(),\n\t\t\t\"tx_hash\", txn.ID().String(),\n\t\t)\n\n\t\tt.seqNo++\n\t}\n}\n"
  },
  {
    "path": "www/zmq/publisher_tx_info_test.go",
    "content": "package zmq\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTxInfoPublisher(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://localhost:%d\", port)\n\tconf := DefaultConfig()\n\tconf.ZmqPubTxInfo = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\ttd.server.Publishers()\n\n\tsub := zmq4.NewSub(t.Context(), zmq4.WithAutomaticReconnect(false))\n\n\terr := sub.Dial(addr)\n\trequire.NoError(t, err)\n\n\terr = sub.SetOption(zmq4.OptionSubscribe, string(TopicTransactionInfo.Bytes()))\n\trequire.NoError(t, err)\n\n\tblk, _ := td.TestSuite.GenerateTestBlock(td.RandHeight())\n\ttd.pipe.Send(blk)\n\n\tfor i := 0; i < len(blk.Transactions()); i++ {\n\t\treceived, err := sub.Recv()\n\t\trequire.NoError(t, err)\n\n\t\trequire.NotNil(t, received.Frames)\n\t\trequire.GreaterOrEqual(t, len(received.Frames), 1)\n\n\t\tmsg := received.Frames[0]\n\t\trequire.Len(t, msg, 42)\n\n\t\ttopic := msg[:2]\n\t\ttxHash := msg[2:34]\n\t\theight := binary.BigEndian.Uint32(msg[34:38])\n\t\tseqNo := binary.BigEndian.Uint32(msg[38:])\n\n\t\trequire.Equal(t, TopicTransactionInfo.Bytes(), topic)\n\t\trequire.Equal(t, blk.Transactions()[i].ID().Bytes(), txHash)\n\t\trequire.Equal(t, uint32(blk.Height()), height)\n\t\trequire.Equal(t, uint32(i), seqNo)\n\t}\n\n\trequire.NoError(t, sub.Close())\n}\n"
  },
  {
    "path": "www/zmq/server.go",
    "content": "package zmq\n\nimport (\n\t\"context\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/go-zeromq/zmq4\"\n\t\"github.com/pactus-project/pactus/types/block\"\n\t\"github.com/pactus-project/pactus/types/tx\"\n\t\"github.com/pactus-project/pactus/util/logger\"\n)\n\ntype Server struct {\n\tctx        context.Context\n\tsockets    map[string]zmq4.Socket\n\tpublishers []Publisher\n\tconfig     *Config\n\teventPipe  pipeline.Pipeline[any]\n\tlogger     *logger.SubLogger\n}\n\nfunc New(ctx context.Context, conf *Config, eventPipe pipeline.Pipeline[any]) (*Server, error) {\n\tserver := &Server{\n\t\tctx:        ctx,\n\t\teventPipe:  eventPipe,\n\t\tlogger:     logger.NewSubLogger(\"_zmq\", nil),\n\t\tpublishers: make([]Publisher, 0),\n\t\tsockets:    make(map[string]zmq4.Socket),\n\t\tconfig:     conf,\n\t}\n\n\tpublisherOpts := []zmq4.Option{\n\t\t//\n\t}\n\n\tmakePublisher := func(addr string, newPublisher func(socket zmq4.Socket, logger *logger.SubLogger) Publisher) error {\n\t\tif addr == \"\" {\n\t\t\treturn nil\n\t\t}\n\n\t\tsocket, ok := server.sockets[addr]\n\t\tif !ok {\n\t\t\tsocket = zmq4.NewPub(ctx, publisherOpts...)\n\n\t\t\tif err := socket.SetOption(zmq4.OptionHWM, conf.ZmqPubHWM); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err := socket.Listen(addr); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tpublisher := newPublisher(socket, server.logger)\n\t\tserver.publishers = append(server.publishers, publisher)\n\t\tserver.sockets[addr] = socket\n\n\t\tserver.logger.Info(\"publisher initialized\", \"topic\", publisher.TopicName(), \"socket\", addr)\n\n\t\treturn nil\n\t}\n\n\tif err := makePublisher(conf.ZmqPubBlockInfo, newBlockInfoPub); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := makePublisher(conf.ZmqPubTxInfo, newTxInfoPub); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := makePublisher(conf.ZmqPubRawBlock, newRawBlockPub); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := makePublisher(conf.ZmqPubRawTx, newRawTxPub); err != nil {\n\t\treturn nil, err\n\t}\n\n\tserver.eventPipe.RegisterReceiver(server.publishEvent)\n\n\treturn server, nil\n}\n\nfunc (s *Server) Publishers() []Publisher {\n\treturn s.publishers\n}\n\nfunc (s *Server) Close() {\n\tfor _, sock := range s.sockets {\n\t\tif err := sock.Close(); err != nil {\n\t\t\ts.logger.Error(\"failed to close socket\", \"err\", err)\n\t\t}\n\t}\n}\n\nfunc (s *Server) publishEvent(event any) {\n\tswitch evt := event.(type) {\n\tcase *block.Block:\n\t\tfor _, pub := range s.publishers {\n\t\t\tpub.onNewBlock(evt)\n\t\t}\n\tcase *tx.Tx:\n\t\t// Ignore this event for now, as we only publish transactions that are included in a block.\n\tdefault:\n\t\ts.logger.Warn(\"invalid event type\")\n\t}\n}\n"
  },
  {
    "path": "www/zmq/server_test.go",
    "content": "package zmq\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/ezex-io/gopkg/pipeline\"\n\t\"github.com/pactus-project/pactus/state\"\n\t\"github.com/pactus-project/pactus/util/testsuite\"\n\t\"github.com/stretchr/testify/require\"\n)\n\ntype testData struct {\n\t*testsuite.TestSuite\n\n\tmockState *state.MockState\n\tserver    *Server\n\tpipe      pipeline.Pipeline[any]\n}\n\nfunc setup(t *testing.T, conf *Config) *testData {\n\tt.Helper()\n\n\tts := testsuite.NewTestSuite(t)\n\tmockState := state.MockingState(ts)\n\tpipe := pipeline.New[any](t.Context())\n\tserver, err := New(t.Context(), conf, pipe)\n\trequire.NoError(t, err)\n\n\treturn &testData{\n\t\tTestSuite: ts,\n\t\tmockState: mockState,\n\t\tserver:    server,\n\t\tpipe:      pipe,\n\t}\n}\n\nfunc (ts *testData) closeServer() {\n\tts.server.Close()\n}\n\nfunc TestTopicsWithSameSocket(t *testing.T) {\n\tport := testsuite.FindFreePort()\n\taddr := fmt.Sprintf(\"tcp://127.0.0.1:%d\", port)\n\n\tconf := DefaultConfig()\n\tconf.ZmqPubBlockInfo = addr\n\tconf.ZmqPubTxInfo = addr\n\tconf.ZmqPubRawBlock = addr\n\tconf.ZmqPubRawTx = addr\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\trequire.Len(t, td.server.Publishers(), 4)\n\trequire.Len(t, td.server.sockets, 1)\n\n\texpectedAddr := td.server.Publishers()[0].Address()\n\n\tfor _, pub := range td.server.Publishers() {\n\t\trequire.Equal(t, expectedAddr, pub.Address(), \"All publishers must have the same address\")\n\t\trequire.Equal(t, conf.ZmqPubHWM, pub.HWM(), \"All publishers must have the same HWM\")\n\t}\n}\n\nfunc TestTopicsWithDifferentSockets(t *testing.T) {\n\tconf := DefaultConfig()\n\tconf.ZmqPubBlockInfo = fmt.Sprintf(\"tcp://127.0.0.1:%d\", testsuite.FindFreePort())\n\tconf.ZmqPubTxInfo = fmt.Sprintf(\"tcp://127.0.0.1:%d\", testsuite.FindFreePort())\n\tconf.ZmqPubRawBlock = fmt.Sprintf(\"tcp://127.0.0.1:%d\", testsuite.FindFreePort())\n\tconf.ZmqPubRawTx = fmt.Sprintf(\"tcp://127.0.0.1:%d\", testsuite.FindFreePort())\n\n\ttd := setup(t, conf)\n\tdefer td.closeServer()\n\n\trequire.Len(t, td.server.Publishers(), 4)\n\trequire.Len(t, td.server.sockets, 4)\n\n\tfor _, pub := range td.server.Publishers() {\n\t\trequire.Equal(t, conf.ZmqPubHWM, pub.HWM(), \"All publishers must have the same HWM\")\n\t}\n}\n"
  },
  {
    "path": "www/zmq/topic.go",
    "content": "package zmq\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n)\n\ntype Topic int16\n\nconst (\n\tTopicBlockInfo       Topic = 0x0001\n\tTopicTransactionInfo Topic = 0x0002\n\tTopicRawBlock        Topic = 0x0003\n\tTopicRawTransaction  Topic = 0x0004\n)\n\nfunc (t Topic) String() string {\n\tswitch t {\n\tcase TopicBlockInfo:\n\t\treturn \"block_info\"\n\n\tcase TopicTransactionInfo:\n\t\treturn \"transaction_info\"\n\n\tcase TopicRawBlock:\n\t\treturn \"raw_block\"\n\n\tcase TopicRawTransaction:\n\t\treturn \"raw_transaction\"\n\n\tdefault:\n\t\treturn fmt.Sprintf(\"topic-%d\", t)\n\t}\n}\n\nfunc (t Topic) Bytes() []byte {\n\tb := make([]byte, 2)\n\tbinary.BigEndian.PutUint16(b, uint16(t))\n\n\treturn b\n}\n\nfunc TopicFromBytes(b []byte) Topic {\n\tif len(b) < 2 {\n\t\treturn 0\n\t}\n\n\treturn Topic(binary.BigEndian.Uint16(b))\n}\n"
  },
  {
    "path": "www/zmq/topic_test.go",
    "content": "package zmq\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestTopicFromBytes(t *testing.T) {\n\tvalidRawTopic := TopicRawTransaction.Bytes()\n\tinvalidRawTopic := make([]byte, 0)\n\n\ttopic := TopicFromBytes(validRawTopic)\n\trequire.Equal(t, TopicRawTransaction, topic)\n\n\ttopic = TopicFromBytes(invalidRawTopic)\n\trequire.Equal(t, 0, int(topic))\n}\n"
  }
]